Learn to programming in funtional way如果一个方法中存在var的话,那么这个方法很可能就是指令式编程。如果一个方法中只存在val的话,那么这个方法很可能是函数式编程。我们需要尝试着把方法中的val删除掉。副作用,一个方法满足函数式编程的基本要求,但是返回值是一个U...
分类:
其他好文 时间:
2014-06-25 18:31:47
阅读次数:
166
程序支持横竖屏首先要搞懂这个方法什么时候走! 不用测试了,当Frame发生改变的时候,这个方法就走了。那 你想当程序由竖屏变成横屏的时候上面的控件 保持在原来的地方。首先你要搞懂bounds 这个属性。然后控件写成相对的位置让后你重写viewWillLayoutSubViews这个方法。当让你要是用...
分类:
其他好文 时间:
2014-06-25 14:46:38
阅读次数:
255
ToolsKindle 3(2011-5-7)MacBook Pro(2012-2-10)Crucial M4 128GB SSD(2012-3-28)iPad 4(2012-12-7)Betas solo(2012-12-19)HHKB Pro 2(2012-12-15)Nexus 4(2012-...
分类:
其他好文 时间:
2014-06-25 13:31:23
阅读次数:
209
赋值语句variable=expression几种赋值的实例:x = x1+x2;x = sum(of x1-x6); 括号中要用ofsum(x,y);如果x或y中有一个为缺失值,sum的结果会将缺失值设为0,而如果用z=x+y;有缺失值的话z的结果会为缺失值ar(1) = br(1); *将数组b...
分类:
其他好文 时间:
2014-06-25 00:36:53
阅读次数:
1693
I won't forget Ki-kun until the day I forget Ki-kun — Mafuyu Shiina , Life is never too short to try again! — Kurimu Sakurano It's not that the world....
分类:
其他好文 时间:
2014-06-24 15:16:16
阅读次数:
210
//冒泡排序 $arr=array('5','3','7','6','4','8','2','1'); $n=count($arr); for($i=0;$i$arr[$j+1]) { $t=$arr[$j]; $arr[$j]=$arr[$j+1]; $arr[$j+1...
分类:
Web程序 时间:
2014-06-24 14:27:10
阅读次数:
175
$arr=array('','7','9','11','2','5','13','10','14','12'); $n=count($arr); for($i=2;$i$arr[0]) $high=$m-1; else $low=$m+1; } for($j=$i-1;...
分类:
其他好文 时间:
2014-06-24 14:09:04
阅读次数:
223
$arr=array('1','7','9','11','20','23','33','44','50'); $len=count($arr); $low=0;$high=$len-1; while($low'; if($arr[$mid]>9) { $high=$mid-1; ...
分类:
Web程序 时间:
2014-06-24 14:08:25
阅读次数:
223
var sp:Sprite=new Sprite(); sp.graphics.beginFill(0xffccdd); sp.graphics.drawRect(0,0,100,100); sp.graphics.beginFill(0x33eedd); sp.graphics.d...
分类:
其他好文 时间:
2014-06-24 12:13:29
阅读次数:
191
记:1.如果margin只有一个值,表示上右下左的margin同为这个值。例如:margin:10px; 就等于 margin:10px 10px 10px 10px;2.如果 margin 只有两个值,第一个值表示上下margin值,第二个值为左右margin的值。例如:margin:10px 2...
分类:
其他好文 时间:
2014-06-24 11:55:53
阅读次数:
171