上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 41 下一页
  2012年8月24日
摘要: sort -k 3,3rn -k 2,2rn text_hz_info.txt >text_hz_info.txt.sort 阅读全文
posted @ 2012-08-24 11:05 finallyly 阅读(354) 评论(0) 推荐(0) 编辑
  2012年8月16日
摘要: 阅读全文
posted @ 2012-08-16 09:36 finallyly 阅读(182) 评论(0) 推荐(0) 编辑
  2012年8月8日
摘要: #!/usr/bin/python#-*-coding:gbk-*-'''spec:根据是否命中126W人名,将usrdict分为两个部分parms:[IN][IN][OUT]author:liuyusi0121@sogou-inc.comdate20120808'''importre;importsys;defLoadKeys(filename):'''加载key到内存'''keys=[];p=re.compile('^\s+|\s+$');fid=file(filename,&q 阅读全文
posted @ 2012-08-08 21:05 finallyly 阅读(2275) 评论(0) 推荐(0) 编辑
  2012年8月1日
摘要: unsigned char,short,int ,long在16位32位和64位机器的长度转自 http://blog.sina.com.cn/s/blog_8c612cae01012arj.html(2012-02-08 22:23:55) 转载▼标签: 杂谈最近经常见到这些unsigned char,short,int ,long的定义,有时真的不确定位长是多少,上网查,又话是跟编译器有关,没一个准确答案。于是只好自己找答案,其实用一个最简单地方就可以知道其长度,就是用sizeof函数。于是我写了如下一段:unsigned char uint8 = 0;signed char int8 = 阅读全文
posted @ 2012-08-01 09:59 finallyly 阅读(512) 评论(0) 推荐(0) 编辑
  2012年7月26日
摘要: assert的作用是现计算表达式 expression ,如果其值为假(即为0),那么它先向stderr打印一条出错信息,然后通过调用 abort 来终止程序运行。 文章出处:飞诺网(www.diybl.com):http://www.diybl.com/course/3_program/c++/cppjs/20071111/85534.html 阅读全文
posted @ 2012-07-26 15:32 finallyly 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 看Makefile.am 知道二进制文件由哪些代码生成;grep -n main *.cpp 阅读全文
posted @ 2012-07-26 11:10 finallyly 阅读(343) 评论(0) 推荐(0) 编辑
  2012年7月24日
摘要: 为什么fgets()会读取文件最后一行两次?我们在读取文件时,书中经常提到的逻辑是这样的,但这是错误的!while(!feof(Fp)){fgets(readLine,10000,Fp);//////do something.}原因在于feof()只有在你尝试读取文件结尾之后,才会返回true。也就是说,feof()之解释上次文件读写是否到达结尾,而不是下一次。所以正确的逻辑应该是这样的。while(true) {fgets(readLine,10000,Fp);if( feof(Fp) ) break;////do something.}http://tomsawyer.diandian.c 阅读全文
posted @ 2012-07-24 18:30 finallyly 阅读(2843) 评论(0) 推荐(0) 编辑
  2012年7月23日
摘要: core文件用于gdb调试比较有用 你可以用 ulimit -a 看一下core file size 如果是0, 可以用ulimit -c unlimited 来指定大小不限, 或者指定固定的大小 http://blog.csdn.net/oyangyufu/article/details/6362798http://cs.baylor.edu/~donahoo/tools/gdb/tutorial.html采用automake方式时,要在makefile.am中加入:xx_LDFLAGS=-static-libtool-libs然后make clean && make DEB 阅读全文
posted @ 2012-07-23 20:39 finallyly 阅读(249) 评论(0) 推荐(0) 编辑
摘要: yum -y install xxxxyum -y remove xxxx 阅读全文
posted @ 2012-07-23 12:15 finallyly 阅读(255) 评论(0) 推荐(0) 编辑
  2012年7月19日
摘要: 1 shell echo 命令会自动加入换行符2. $?接受exit 返回值3.变量等于`执行脚本` ,变量获取的值为脚本最后向STDOUT输出的值例子如下1. perl 调用shell1.sh中的内容#!/usr/bin/shecho `date`;exit 1;test.pl中的内容 1 use strict; 2 use warnings; 3 my $s=`sh 1.sh`; 4 print STDOUT "$s"; 5 my $exitcode=$?>>8; 6 print "$exitcode\n"; 2 shell调用perls 阅读全文
posted @ 2012-07-19 11:18 finallyly 阅读(2813) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 41 下一页