新增代码 if (winID == 2) { GUILayout.BeginVertical("box"); GUILayout.Box("日记",GUILayout.Height(fullHeight/8)); GUI...
分类:
其他好文 时间:
2014-07-18 23:23:11
阅读次数:
260
UVA 12293 - Box Game
题目链接
题意:两个盒子,一开始一个盒子有n个球,一个只有1个球,每次把球少的盒子中球消掉,把多的拿一些球给这个盒子,最后不能操作的输(球不能少于1个),Alice先手,问谁赢
思路:博弈,题目其实可以转化为,给定一个n,每次把减少1到n/2的数字,最后谁是1谁就输了,那么可以去递推前几项找个规律,或者推理,都可以发现只要是2^i - 1...
分类:
其他好文 时间:
2014-07-18 21:27:44
阅读次数:
186
也不知道为什么UILabel本身没有提供文本垂直顶部对齐的方法,真的有点晕。我们创建一个简单的UILabel来看看:[box type="info"]UILabel *myLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, 300, 10...
分类:
其他好文 时间:
2014-07-18 21:01:16
阅读次数:
195
经常copy网上的代码,但是代码中总有空行,使用VS格式化代码了,还是没有方法,如果让代码变得紧凑一些呢?答案:用UltraEdit【我用的是这个编辑器,好像editplus不行,不知道了,大家试试】打开文件后,选择Search菜单的Replace命令。在Replace对话框中,选中Regular ...
分类:
其他好文 时间:
2014-07-18 20:10:28
阅读次数:
355
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target value t...
分类:
其他好文 时间:
2014-07-18 20:00:41
阅读次数:
205
基础介绍:http://dongxicheng.org/search-engine/thrift-guide/白皮书:http://thrift.apache.org/static/files/thrift-20070401.pdf
分类:
其他好文 时间:
2014-07-18 19:36:56
阅读次数:
200
今天介绍input在HTML5中的最后5种类型,分别是:number,range,search,tel和color注意:此种类型的input在Opera10+中效果为佳,Chrome中效果不是十分好,外观取决于浏览器1、number类型: 复制代码此输入框是一种专门用来输入数字的文本框,并且在...
分类:
Web程序 时间:
2014-07-18 17:04:46
阅读次数:
272
destpath='/home/hadoop/soft/hadoop-2.0.0-cdh4.5.0/cdhlib/'jarpath='/home/hadoop/soft/hadoop-2.0.0-cdh4.5.0/share/hadoop/'search='jar'iterdir(){ cd $1 ...
分类:
其他好文 时间:
2014-07-18 16:35:53
阅读次数:
225
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:
其他好文 时间:
2014-07-17 18:09:32
阅读次数:
258
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:
其他好文 时间:
2014-07-17 17:32:50
阅读次数:
246