- 博客(11)
- 收藏
- 关注
原创 查看linux的操作系统是否64位
1 查看cpu是否64位 执行cat /proc/cpuinfo 看看里面flags 字段是否有“lm” 2.查看操作系统是否64位。 使用命令getconf LONG_BIT 可以快速的知道 当前操作系统是32位还是64位。 ...
2012-04-14 11:27:07
148
原创 Mongrel _rails 错误, Too many openfiles 的解决
mongrel_rails,出错,显示too many open files。 ulimit -a 显示open file 1024 修改/etc/security/limits.conf 设置为4096,可以添加如下内容: * soft nofile 4096 * hard nofile 4096 重启ok ...
2012-04-14 11:26:41
100
原创 DBMS vs NOSQL
NOSQLDB categories key / value pairs, sharded arrays, and document-oriented approaches) google App data stores. Its syntax in Python is simple and clear, and it was specifically created to be...
2012-03-16 07:57:34
229
原创 NOSQL DB concurrency
Optimistic Concurrency, also known as MVCC (Multi-Version Concurrency Control). This mechanism relies on timestamps (presupposing a shared clock) or Vector Clocks, as described in [Lamport, 19...
2012-03-16 07:57:18
116
原创 mmap的使用
mmap 使用 1. 1mmap 映射1G大小的文件,如果超过1G,再新建一个1G的mmap,映射的位置当前的位置。 2. 1mmap 映射128M大小,没超过128M,就重新从头来mmap,大小增加128M。 性能 2 > 1...
2012-03-16 07:57:06
116
原创 ruby on rails 打包
1. 打包Gems 有用的命令 # rake gems # List the gems that this rails application depends on # rake gems:install # Installs all required gems for this application. # rake gems:unpack ...
2012-03-16 07:56:43
432
原创 利用百度构造拼音词表[python]
做中文查询纠错,需要一个拼音到中文词汇的对应表。网上找不到,只要利用baidu来构建一个。 原理: 难点是多音字。输入一个词,根据拼音汉字表,可以得到其搜有发音,比如“银行”的发音有可能有 “yinhang”, “yinxing”,哪一个才是对的呢? 发送 GET 请求到 to baidu.com, "http://www.baidu.com/s?bs=zhongguo&f=...
2012-03-05 23:15:31
143
size_t 和 unsigned int 不一样
在64位机器上 sizeof(size_t) = 8 sizeof(unsigned int) = 4 size_t a = 4; boost::any b = (a); boost::any_cast(b); 会抛出 异常信息 Detail: boost::bad_any_cast: failed conversion using boost::any_cast...
2012-03-05 23:12:57
181
原创 Query Correction 项目总结
1. Important things > urgent things To fix bug in QC is urgent , to prevent and discover bug beforehand is important. To test the tescases listed in QC is urgent, to add similar testcases to smoket...
2012-03-05 23:10:12
149
一个自己患的sizeof的错误
string sf1[] = { "SAd", "aaA" }; 那sizeof sf = ? 对于char *sf2[]={"SAd", "aaA" }呢? 那应该等于多少呢?答案 sizeof(sf1)= 2*sizeof(string)= 16; sizeof(sf2)= 2*sizeof(*s...
2012-03-05 21:59:33
64
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人