0%

保存客户端状态,Session Storage是用于

The sessionStorage property allows you to access a session Storage object. sessionStorage is similar to Window.localStorage, the only difference is while data stored in localStorage has no expiration set, data stored in sessionStorage gets cleared when the page session ends. A page session lasts for as long as the browser is open and survives over page reloads and restores. Opening a page in a new tab or window will cause a new session to be initiated, which differs from how session cookies work.

总纲

差的测试会增加维护的负担,好的测试才能指导开发。品质差的测试可能让开发慢如蜗牛。
测试需要达到目的的同时尽量保证不要给重构及变更带来阻碍。

阅读全文 »

常见误解

  1. 需求是被引出或者捕捉出来的(用户也不知道需求,需求只能被拖网捕捞,有大有小,有死有活,还有漏网的)
  2. 用户知道所有需求
  3. 原型要在开发阶段一直保留

tips

https://therealba.com/2016/10/26/working-effectively-in-a-distributed-team-across-australia-china-and-new-zealand/comment-page-1/#comment-31

深度学习Workshop总结

深度学习Workshop是我们AI俱乐部面向全中国区的发起的学习机器学习的系列session。这次Workshop最初由佟达发起,由于他当时在成都,所以我们就从成都开始了。

这次workshop从11.7开始,直到1.17结束,共七次session,历时10周。我们以Google在Udacity上面的Tensorflow课程为基础,适当扩展,作为本次workshop的内容。

本次workshop一共包含七次session:

阅读全文 »

Local Openshift Cluster Installation Guide

Preparation

Hosts

  • 1 control host, 1 master and 3 nodes
  • centos 7

Install packages on control host

  • Run yum install -y python2-passlib httpd-tools
阅读全文 »

AWS Openshift Cluster Installation Guide

The main reference is here: https://github.com/openshift/openshift-ansible-contrib/tree/master/reference-architecture/aws-ansible

Create

1
2
3
4
./ose-on-aws.py --region=us-east-2 --keypair=lgm-oc \
--public-hosted-zone=oc-tw.net --deployment-type=origin --ami=ami-cfdafaaa \
--github-client-secret=YOUR_SECRET --github-organization=xx \
--github-client-id=YOUR_ID
阅读全文 »

Target

  • A simple nodejs application
  • Add mongodb to the application
  • CI/CD for the application
  • Logging, Monitoring, Debugging

A simple nodejs application

Introduction

In this section, We are going to create a nodejs project with mongodb in OpenShift. We assume that you have done all the preparation work listed in the invitation email of this workshop. And there’re some additional steps to get yourself ready.

阅读全文 »

又到小米发布会了,这次发布会将从发布评论的人里面选人,每分钟送一台小米手机。
于是写了几行代码自动发评论,省去了手工的麻烦。娱乐一下,碰个运气。

直播地址:https://hd.mi.com/x/12041b/index.html?client_id=180100041086&masid=17409.0195

代码如下:

1
2
3
4
5
6
7
8
9
10
11
// 随机选择一个当前评论列表里面的评论
var r = () => Math.floor((Math.random() * $('.livechat-list-wrapper .list li').length))
// 提取选中的评论的内容
var text = () => $($('.livechat-list-wrapper .list li')[r()]).find('.content').text()
// 使用选中的内容自动发评论
var c = () => {$('#J_chatContent').val(text());$('#J_sendChatBtn').attr('class', 'btn active');$('#J_sendChatBtn').click();}
// 生成随机的间隔时间
var rtime = () => Math.floor(Math.random() * 15000 + 5000)
// 设置一个计时器定时发评论
var st = () => stt = setTimeout(() => {c(); st()}, rtime())
st();

以上代码粘贴到控制台执行就可以了。