自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 查看linux的操作系统是否64位

1 查看cpu是否64位执行cat /proc/cpuinfo 看看里面flags 字段是否有“lm”2.查看操作系统是否64位。使用命令getconf LONG_BIT 可以快速的知道当前操作系统是32位还是64位。...

2012-04-14 11:27:07 159

原创 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 105

原创 DBMS vs NOSQL

NOSQLDB categorieskey / value pairs, sharded arrays, and document-orientedapproaches) google App data stores. Its syntax in Python is simple and clear, and it was specificallycreated to be...

2012-03-16 07:57:34 236

原创 NOSQL DB concurrency

Optimistic Concurrency, also known as MVCC (Multi-VersionConcurrency Control). This mechanism relies on timestamps (presupposing a sharedclock) or Vector Clocks, as described in [Lamport, 19...

2012-03-16 07:57:18 124

原创 mmap的使用

mmap 使用1. 1mmap 映射1G大小的文件,如果超过1G,再新建一个1G的mmap,映射的位置当前的位置。2. 1mmap 映射128M大小,没超过128M,就重新从头来mmap,大小增加128M。性能 2 > 1...

2012-03-16 07:57:06 126

原创 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 446

原创 利用百度构造拼音词表[python]

做中文查询纠错,需要一个拼音到中文词汇的对应表。网上找不到,只要利用baidu来构建一个。原理:难点是多音字。输入一个词,根据拼音汉字表,可以得到其搜有发音,比如“银行”的发音有可能有 “yinhang”, “yinxing”,哪一个才是对的呢?发送 GET 请求到 to baidu.com, "http://www.baidu.com/s?bs=zhongguo&f=...

2012-03-05 23:15:31 155

size_t 和 unsigned int 不一样

在64位机器上sizeof(size_t) = 8sizeof(unsigned int) = 4size_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 192

原创 Query Correction 项目总结

1. Important things > urgent thingsTo 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 182

原创 cout和cerr的区别

cout输出的信息可以重定向,cerr只能输出到标准输出

2012-03-05 22:47:26 100

一个自己患的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 72

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除