主要思路是:override
move系列的方法,让cursor以自己想要的顺序来移动,从而达到对cursor排序的目的。比如数组A0里有
4(0),3(1),1(2),2(3),括号内为位置,排序后用数据记录A1:1(2),2(3),3(1),4(0)。要访问第一个元素,则访问
A1[0]得到1(...
分类:
移动开发 时间:
2014-05-26 08:42:44
阅读次数:
422
数组属性length计算长度方法join()将数组元素组合成reverse()反转数组sort()进行排序内置函数eval(string)eval函数直接计算出string的值isNaN(变量)检验参数是否是一个数字,如果不是数字返回trueString对象属性length返回字符串的长度方法big...
分类:
编程语言 时间:
2014-05-26 08:15:15
阅读次数:
241
Problem Description
Today is Yukari's n-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday cake! But it's a big challenge for them to place n ca...
分类:
其他好文 时间:
2014-05-26 04:38:35
阅读次数:
239
-好软件的定义就是它的体积不大不小,功能不多不少,一切都是那么的恰到好处。 -Good
software is neither too big nor too small,neither too Complex nor too
Simple,everything is so right. +点击.....
分类:
其他好文 时间:
2014-05-26 00:54:15
阅读次数:
254
MMapDirectory继承自FSDirectory,针对jre至今没解决的Mmap close不回收空间(直至full gc才回收)的bug,lucene用hack方式回收(仅对sun jam)(线上目前还是出现这个问题,是什么情况,得确认一下)。其中64位linux下chunk是1G,MMAP之后返回ByteBuffer数组,其IndexInput类是MMapIndexInput。
FSD...
分类:
其他好文 时间:
2014-05-25 18:17:00
阅读次数:
314
Problem Description
Some days ago, I learned the concept of LCM (least common multiple). I've played with it for several times and I want to make a big number with it.
But I also don't want to use...
分类:
其他好文 时间:
2014-05-25 16:39:53
阅读次数:
266
Problem Description
Some days ago, I learned the concept of LCM (least common multiple). I've played with it for several times and I want to make a big number with it.
But I also don't want to use...
分类:
其他好文 时间:
2014-05-25 16:32:49
阅读次数:
214
http://poj.org/problem?id=3013
题意:
Because of a technical difficulty, price of an edge will be (sum of weights of all descendant nodes) × (unit price of the edge).这句话一直没看懂。后面还以为是最小生成树。
正确...
分类:
其他好文 时间:
2014-05-24 20:27:13
阅读次数:
266
下面提供几个命令,用来剪切文件、重命名文件、创建或修改文件访问时间,如下:...
分类:
其他好文 时间:
2014-05-24 19:39:49
阅读次数:
305
默认每个连接数占用10M内存ulimit -a 查看stack
sizeMongoDB服务器内存要满足 connection overhead + data size + index
size即连接数开销+热点数据+索引连接数太多的问题:如果在日志中遇到类似如下的错误信息:"too many ope...
分类:
数据库 时间:
2014-05-24 11:18:25
阅读次数:
378