Mememento Pattern
Without violating encapsulation,capture and externalize an object's internal state so that the object can be restored to
this state later.(在不破坏封装性的前提下,捕获一个对象的内部状态,并在该对象之外保存这个...
分类:
其他好文 时间:
2015-07-25 15:18:02
阅读次数:
212
在脚本中,判断执行者是否为root。判断方法1,#!/bin/bashif [ `whoami` != "root" ];thenecho " only root can run me"exit 1fi判断方法2(但是用sudo执行回报脚本有语法错误,不知为何,有知道的高手请回复我)。if [ $U...
分类:
系统相关 时间:
2015-07-25 11:58:53
阅读次数:
209
【027-Remove Element(删除数组中的元素)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given an array and a value, remove all instances of that value in place and return the new length.
The order of elements can be ch...
分类:
编程语言 时间:
2015-07-25 09:33:10
阅读次数:
165
回归初心,好难。 今天下班后和石洋聊了聊,感觉说话做事还是欠考虑。 下班在地铁上好纠结好压抑,感觉忘记了初心,然后就突然豁然开朗。 一年时间什么概念,突然有这么一个念头。一年,一生才有多个一年。 我不会在意太多,做好自己就是了,心存善念,回归初心。 如果这辈子都不能成功的话,这些事都永...
分类:
其他好文 时间:
2015-07-25 00:11:02
阅读次数:
96
Each of the six faces on a cube has a different digit (0 to 9) written on it; the same is done to a second cube. By placing the two cubes side-by-side in different positions we can
form a variety of...
分类:
其他好文 时间:
2015-07-24 22:42:52
阅读次数:
231
Problem Definition:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be chan...
分类:
其他好文 时间:
2015-07-24 22:29:06
阅读次数:
148
这个主要总是,开启的线程和 UI 线程(主线程)不是同一个线程.可以Runnable方式避免,如下例所示就可以解决这个问题了。public static void updateText(Activity act, resID){ loadingText = (TextView) activity.f...
分类:
其他好文 时间:
2015-07-24 17:58:35
阅读次数:
115
Jenkins supports Groovy script very well, so you can use Groovy to do a lot of tricky and interesting things. First, if you have a Groovy script, and ...
分类:
其他好文 时间:
2015-07-24 17:40:03
阅读次数:
91
最好是跟CBM一起来使用。 Presentation Here: https://ibm.biz/BdXJrQ CAN ONLY ACCESS at IBM internal.
分类:
其他好文 时间:
2015-07-24 15:41:07
阅读次数:
159
- (void)didReceiveMemoryWarning//内存警告{ [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. NSLog(@"内存快爆了"); //判断是否加载过....
分类:
移动开发 时间:
2015-07-24 10:29:55
阅读次数:
213