Categories
不学无术

Coyle's inspiring Sweet Spot | Critical Review on Coyle's 'The Sweet Spot'

这是我在Coursera上提交的一篇English Composition  I: Achieving Expertise的作业。如需使用我的文章,请至少在文末注明出处。本文为草稿性质的文章可能存在少许错误,最终成型的final版还在写作中,视情况公布。
This is a project essay of mine in English Composition  I: Achieving Expertise. Anyone who uses my work please at least cite this webpage at the end of your work. The text in this post is only a draft which may contain few syntax errors.


 
Project One: Critical Review of Coyle’s “The Sweet Spot”


 
Coyle’s inspiring Sweet Spot
The word “talent” can be seen through Coyle’s passage, but according to the author, the word is more or less linked with practice and mistakes. It’s obviously an inspiring and self-helping book, and this chapter gives a strong idea that greatness isn’t born. It’s grown, especially through mistakes.
In this chapter Coyle discusses a variety of ideas via different examples. He has visited different people from several countries. So he demonstrates his view with their personal experience. Brunio is an eleven-year-old Brazilian football player who is trying to learn the elastic, which is a ball-handling maneuver. Although he failed to finish the move at the first time, he stopped and thought with his taut face and focused eyes, practicing it slowly but progressively (P.13). Another girl Jennie kept working on the pop song, singing every note slowly, and finally sang the measure perfectly (P.13). Those two example presents the idea that practice deeply leads the way to success.
Coyle isn’t totally agree with the traditional explanation that such kind of concentrated talent is to attribute it to a combination of genes and environment (P.14). He offers his “deep practice” theory and reinforces it with a word list memorization exercise (P.16). The words in column B with fragments can be remembered more easily than column A because it evokes our deeper practice. The following life vest example (P.16) also proves his theory.
To further illustrate his idea, Coyle cites a UCLA professor Bjork. Bjork said “there’s an optimal gap between what you know and what you’re trying to do”, and that’s what the Sweet Spot is. In Coyle’s theory practice and making mistakes is a way to find the sweet spot, then one can turn mistakes into skills. And people use time more efficiently when they practice deeply (P.19).
According to Coyle’s theory, deep practice is a strange concept for two reasons. Firstly, it cuts against our intuition about talent. Secondly it turns mistakes into skills (which is mentioned above). His second reason provokes a question that what if the mistake has a decent chance of killing you (P.20). Then Edwin Link’s pilot simulation device is cited to deal with that question. As is described in the text that Edwin’s trainer allows a pilot to perform “take off” and “land” a dozen times on his instruments during a few hours (P.24). His invention successfully extended the deep practice idea onto dangerous jobs.
In order to assure his theory could take effect on other field, the author applies his idea to Brazil’s soccer players. In short, the special indoor football, futsal, helps local players gain more practice opportunities. Futsal is the lever through which those other factors transfer their force (P.28). However, I personally have some doubts that whether this magical ball is overestimated. In my opinion, other factors such as environment (e.g. poverty, popularity), passion of the kids might be taken into consideration as well. Though futsal does help improve their football skills, it isn’t quite clear that whether the mini-sized heavy ball is the key factor to such talent.
“As Coyle reports, deep practice actually changes the physical makeup of the brain. … However, mere repetition is not enough. To create myelin, the repetition requires powerful attention” said by Jade and Barbara (Eckard, et al. 2013). Coyle gives us hope and inspiration via a variety of stories, but it simply isn’t objective. He relates success (or talent) to deep practice regardless of innate capabilities and environments.
In summary, despite of Coyle’s little subjective, I have learned a lot from the first chapter of his book. Perhaps Coyle doesn’t need to be objective because the text itself is about making you feel good, energetic and ambitious, at least it inspired me well. I also admire his way of elaborating the concepts.
References
1.       Eckard, Bonnie J. “Embodying Deep Practice: A Pedagogical Approach to Actor Training.” Embodied Consciousness: Performance Technologies (2013): 46.
 
Works of others that indirectly helps me with my critical review
1.       Critical Review on “The Sweet Spot” by Daniel Coyle. http://criticalreviewthesweetspot.blogspot.com/
2.       Critical Review of Coyle’s The Sweet Spot        http://book.douban.com/review/5866658/
3.       Critical Review of Daniel Coyle’s “The Sweet Spot”http://www.researchgate.net/publication/252930427_Critical_Review_of_Daniel_Coyle’s_The_Sweet_Spot


 
以下是peer review的结果:
The following texts are results of peer review:
1 2 3 4

Categories
木有技术

Ubuntu14 搭建openVPN服务器翻GREATWALL啦! iOS也可以用哦~

本文的参考文献:
https://help.ubuntu.com/lts/serverguide/openvpn.html
http://jingpin.org/set-up-openvpn-in-vps/
http://linji.cn/6684.html


 本文实现以下功能:

  • 在Ubuntu服务器上搭建openVPN服务
  • 启用openVPN服务器的ipv4流量转发已实现[BI!!!!]功能
  • 在Windows上创建客户端连接
  • 在iOS上创建客户端连接

 

 Part i 在Ubuntu服务器上搭建openVPN服务

  1. 安装openVPN及RSA工具
    sudo apt-get install openvpn easy-rsa
  2. 配置公钥:
    mkdir /etc/openvpn/easy-rsa/
    cp -r /usr/share/easy-rsa/* /etc/openvpn/easy-rsa/

    这步操作将默认的配置文件复制到openvpn的配置目录下

  3. (可选)修改公司…之类的联系方式:

    nano /etc/openvpn/easy-rsa/vars
  4. 建立数字证书(CA)
    cd /etc/openvpn/easy-rsa/
    source vars
    ./clean-all
    ./build-ca

     

  5. 建立服务器端的私钥,注意有两个问yes/no的确认,都打y确认
    ./build-key-server myservername

     

  6. 建立Diffie Hellman变量文件,这个过程可能持续2分钟或更久:
    ./build-dh

    至此服务器端需要的证书及密钥文件都会在keys/目录下
    将他们拷贝至openVPN的目录

    cd keys/
    cp myservername.crt myservername.key ca.crt dh2048.pem /etc/openvpn/

     

  7. 客户端也需要密钥文件来登录(当然也可以配置成使用用户名/密码登录,本人还没学到这里…).使用下面的方法 创建这些文件
    cd /etc/openvpn/easy-rsa/
    source vars
    ./build-key client1

    往后在客户端登录时,需要以下三个文件
    /etc/openvpn/ca.crt
    /etc/openvpn/easy-rsa/keys/client1.crt
    /etc/openvpn/easy-rsa/keys/client1.key

  8. 上面三个文件找个办法从服务器拷贝到本机吧,因为登录要用哦

Part ii 开启ipv4流量转发及配置服务器

服务器上还需开启ipv4的流量转发,不然你只能通过VPN连服务器,其他别的啥都做不来。

1.开启ip转发

输入以下命令:

nano /etc/sysctl.conf

找到 “#net.ipv4.ip_forward=1” 这一行,删除那个 “#” 号,然后输按”Ctrl+X” 退出,退出时会问你是否保存,输入y然后回车确认文件名即可。

2.使转发生效

输入以下命令:

sysctl -p

如果一切正常,你将只会看到以下结果:

net.ipv4.ip_forward=1

3.创建iptables规则

输入以下命令:

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j SNAT --to 178.18.17.142

记得将 “178.18.17.142” 改为你 VPS 的 IP 地址!
为了避免 VPS 重启后重新设置一遍 iptables 规则,你可以输入以下命令:

vi /etc/rc.local

回车,按下 “i” 键,并将以下内容粘贴到 “exit 0” 这一行的上面:

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j SNAT --to 178.18.17.142
openvpn /etc/openvpn/server.conf

记得将 “178.18.17.142” 替换成你 VPS 的 IP 地址。完了之后,按下 “esc” 键退出插入模式,然后输入 “:wq” 保存。
小技巧:以上的命令是针对 Xen 类型的 VPS,如果是 OpenVZ 类型的,则需要将 “eth0” 替换成 “venet0″。

4.配置服务器规则

接下来是配置openVPN的设置
输入以下命令:

vi /etc/openvpn/server.conf

将会创建openVPN配置文件
回车,按下 “i” 键,然后粘贴以下内容:

port 1194
proto udp
dev tun
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/myservername.crt
key /etc/openvpn/easy-rsa/keys/myservername.key
dh /etc/openvpn/easy-rsa/keys/dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 8.8.4.4"
client-to-client
duplicate-cn
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
log /var/log/openvpn.log
verb 3

按下 “esc” 键退出插入模式,输入 “:wq” 保存文件。

5.启动openVPN

输入以下命令:

 /etc/init.d/openvpn start

回车。
 


Part iii 使用Windows系统作客户端连接

打开http://openvpn.net/download.html,点击Windows Installer后的链接,下载OpenVPN Windows客户端。
下载完成后,安装,安装中的选项全部按默认即可。
找个记事本,创建配置文件client.ovpn:

client
dev tun
proto udp
remote 178.18.17.142 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
comp-lzo
verb 3
redirect-gateway
script-security 2

里面的178.18.17.142改成你服务器的IP地址。
把他丢到C:Program FilesOpenVPNconfig 目录下
另外,之前的三个文件:ca.crt client1.crt client1.key也都放在同一个目录
运行OpenVPN GUI,会在屏幕右下角的系统托盘区,会显示openvpn_tray 右击该图标,会在菜单中出现我们添加的服务器,点击Connect,OpenVPN客户端就会开通链接OpenVPN服务器,过一会儿,OpenVPN图标变成绿色就是链接成功了。


 

Part iv 使用iOS系统作客户端连接

刚发现某个教程写的不错,试了下确实可用,就不赘述啦
参考:http://jingyan.baidu.com/article/f0e83a25da438222e5910193.html
请把上文中提到的ca.crt client1.crt client1.key以及client.ovpn都拖到iTunes的openVPN的应用程序共享文件中就行。
 

Categories
不学无术

PAT 1012. The Best Rank (25)

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C – C Programming Language, M – Mathematics (Calculus or Linear Algebra), and E – English. At the mean time, we encourage students by emphasizing on their best ranks — that is, among the four ranks with respect to the three courses and the average grade, we print the best rank for each student.
For example, The grades of C, M, E and A – Average of 4 students are given as the following:

StudentID  C  M  E  A
310101     98 85 88 90
310102     70 95 88 84
310103     82 87 94 88
310104     91 91 91 91

Then the best ranks for all the students are No.1 since the 1st one has done the best in C Programming Language, while the 2nd one in Mathematics, the 3rd one in English, and the last one in average.
Input
Each input file contains one test case. Each case starts with a line containing 2 numbers N and M (<=2000), which are the total number of students, and the number of students who would check their ranks, respectively. Then N lines follow, each contains a student ID which is a string of 6 digits, followed by the three integer grades (in the range of [0, 100]) of that student in the order of C, M and E. Then there are M lines, each containing a student ID.
Output
For each of the M students, print in one line the best rank for him/her, and the symbol of the corresponding rank, separated by a space.
The priorities of the ranking methods are ordered as A > C > M > E. Hence if there are two or more ways for a student to obtain the same best rank, output the one with the highest priority.
If a student is not on the grading list, simply output “N/A”.
Sample Input

5 6
310101 98 85 88
310102 70 95 88
310103 82 87 94
310104 91 91 91
310105 85 90 90
310101
310102
310103
310104
310105
999999

Sample Output

1 C
1 M
1 E
1 A
3 A
N/A

===============================================


又回来做PAT题目了,C++都忘得差不多干净了有没有!下次尝试下提交Python的答案吧~诶嘿嘿
这道题没什么难的,因为它时间要求不高。
我做了个链表把学生成绩的节点连起来,这样是因为学号有6位数(其实要是弄个1000000行的矩阵也没什么了不起的嘛哼!),反正之后就是链表查找的问题了,没啥可说。

#include <iostream>
using namespace std;
struct RecordNode
{
	//存放单个学生数据的链表节点
	int studentID;
	int results[4];	//0-A, 1-C, 2-M, 3-E
	RecordNode* nextNode;
	RecordNode(int sid, int c, int m, int e, int a)
	{
		studentID = sid;
		results[0] = a;
		results[1] = c;
		results[2] = m;
		results[3] = e;
		nextNode = NULL;
	}
};
RecordNode* rootNode = NULL;
RecordNode* getNodePointer(int studentID)
{
	//没有则返回NULL
	RecordNode* currNode = rootNode;
	while (currNode != NULL)
	{
		if (currNode->studentID == studentID)
			return currNode;
		currNode = currNode->nextNode;
	}
	return currNode;
}
void getRankInMatrix(int studentID, int* ranks)
//从矩阵中得到某人的all排位
//(subj:  0-C, 1-M, 2-E, 3-A)
{
	//int ranks[4] = { 1, 1, 1, 1 };
	RecordNode* node = getNodePointer(studentID);
	if (node == NULL)
	{
		//ranks = NULL;
		//delete ranks;
		ranks[0] = -1;
		return;
	}
	int* results = node->results;	//所有课的成绩
	RecordNode* opNode = rootNode;
	while (opNode != NULL)
	{
		//遍历
		for (int subj = 0; subj < 4; subj++)
		{
			//subjects
			if (opNode->results[subj] > results[subj])
				ranks[subj] ++;
		}
		opNode = opNode->nextNode;
	}
	//return ranks;
}
char ACME[] = "ACME";
int main()
{
	int M, N;
	cin >> N >> M;
	RecordNode* opNode = rootNode;
	for (int i = 0; i < N; i++)
	{
		int sid, c, m, e, a;
		cin >> sid >> c >> m >> e;
		a = (int)(((c + m + e) / 3.0) + 0.5); //四舍五入
		if (opNode == NULL)
		{
			//新建根节点
			opNode = new RecordNode(sid, c, m, e, a);
			rootNode = opNode;
			continue;
		}
		RecordNode *currNode = new RecordNode(sid, c, m, e, a);
		opNode->nextNode = currNode;
		opNode = opNode->nextNode;  //move forward
	}
	for (int i = 0; i < M; i++)
	{
		int sid;
		cin >> sid;
		int ranks[] = { 1, 1, 1, 1 };
		getRankInMatrix(sid, ranks);
		if (ranks[0] == -1)
		{
			cout << "N/A";
			if (i < M - 1)
				cout << endl;
			continue;
		}
		int bestRank = ranks[0];
		int bestRankSubj = 0;
		for (int x = 1; x < 4; x++)
		{
			if (ranks[x] < bestRank)
			{
				bestRank = ranks[x];
				bestRankSubj = x;
			}
		}
		cout << bestRank << " " << ACME[bestRankSubj];
		if (i < M - 1)
			cout << endl;
	}
	return 0;
}

 
 

Categories
生活琐碎

转运JAPAN JSHOPPERS实时监控录像


 
刷新一下就能看到最新的图啦~

Categories
不学无术

以用户为中心的设计

摘自《设计心理学》(中文)第194页
在设计中,应当考虑到以下几个方面:

  • 保证用户能够随时看出哪些是可行的操作(利用各种限制类因素)
  • 注重产品的可视性,包括系统的概念模型、可供选择的操作和操作的结果
  • 便于用户评估系统的工作状态
  • 再用户意图和所需操作之间、操作与结果之间、课件信息与对系统状态的评估之间建立自然匹配关系

换言之,设计人员要确保:1.用户能弄明白操作方法;2.用户能够看出系统的工作状态

Categories
不学无术

与差错相关的设计原则

以下是设计人员应该注意的事项:

  1. 了解各种导致差错的因素,在设计中,尽量减少这些因素;
  2. 使操作者能够撤销以前的指令,或是增加那些不能逆转的操作的难度;
  3. 使操作者能够比较容易地发现并纠正错误;
  4. 改变对差错的态度。要认为操作者不过是想完成某一任务,只是采取的措施不够完美,不要认为操作者是在犯错误。

…一旦你设身处地地想明白人们出错的原因,就会发现大多差错都是可以理解的,而且合乎逻辑。…想办法设计出可以容错的系统,人们正常的行为并非总是准确无误的,要尽量让用户很容易的发现差错,…

——摘自《设计心理学》

Categories
木有技术

Word中不同样式的内容如何强制在同一行上 样式分隔符 正文接排

论文排版中说要“后面正文接排”,就是这种样子
Word正文接排
 
 
 
不同样式的文本内容强制在同一行中
可以使用样式分隔符来隔开。方法是按快捷键ctrl+alt+enter

Categories
木有技术

联想 Thinkpad 4337 扩展坞 底座拆解 拆挡板 教程

亲身时间经历,不过偷懒没有拍照,就挪用别人的照片啦~

 照片来自http://bbs.mydigit.cn/read.php?tid=845798

1.拆掉背面的螺丝(下图红圈处)
1
2.拆掉上测的一颗螺丝(下图红圈处)
2
3.拆掉左上侧的一颗螺丝(红圈)
3
5.用螺丝刀或者其他什么东西,翘下图上方两个绿色箭头所示的位置,把突出的改版翘起,然后沿黄色箭头方向拔出改版
46.盖板掀起后移除下面几个螺丝
57. 掀开整个上部份,下图所示红圈处是挡板的螺丝之一,不远处还有个螺丝。拆掉这两个螺丝后,挡板就自动掉下来了~
6
8.拆挡板到此结束。其他过程参考我上面给的链接。
装回后千万注意那个弹出按钮的可用性,我第一次装回没有调试好,结果本本插上去,那个弹出的按钮按下没反应了,折腾了好久才把本本和底座分离掉。拆解前记住按下按钮是怎么样个机械动作,装回后看看是否是一样的,某个卡扣没按紧或者什么的就容易有问题咯。。
 
 

Categories
木有技术

WNDR3800 openWrt: Enable WiFi toggle

We could just follow the wiki page of WNDR3700 to enable Wifi switch button 🙂
http://wiki.openwrt.org/toh/netgear/wndr3700#activate.the.buttons
Here are the commands for SSH terminal:

opkg update
opkg install wifitoggle
uci set wifitoggle.@wifitoggle[0].button=BTN_2
uci set wifitoggle.@wifitoggle[0].timer=0
uci commit wifitoggle

BTW, these are hardware button keystrokes:

Reset WPS WiFi
Backfire BTN_0 BTN_1 BTN_2
Trunk reset wps BTN_2
Categories
生活琐碎

杭州驾驶证从外地迁入的流程|杭州车管所电话

先是杭州车管所的电话:96345转3,或者88945680。
这个电话工作日才有人回复,而且人家中午休息,并且需要等待好久好久才能接通,做好心理准备!


 
需要携带:本人身份证原件,原驾驶证原件,3张一寸白色背景照(现场办理20元一套),身份证复印件一份(现场复印0.5元一份)
另外,户口不在杭州本地的,需携带杭州的暂住证明(且需要在杭州已暂住6个月以上)
流程:

  1. 前往河坊街33号/白石巷1号办理体检及领取换证单。我去河坊街33号办理的,工作时间是周一至周五8:30-11:30,13:30-16:30;此外,县级以上医院也可体检,但是请先前往上述两个地点或车管所领体检单子。体检费收15元。
  2. 弄好之后去古墩路699号的机动车辆管理所继续办理(目前需要找前台预约,我9月5日的预约至10月13日了)
  3. 到预约时间之后,去车管所领号,然后给工作人员办理(5分钟),办理后会把你原来的驾驶证收走;
  4. 接着去25/25号窗口付10元钱工本费,然后在17号窗口等叫到你的名字拿证即可。

还有就是,现在已经不用重新考核科目三之类的东西了。