- 博客(8)
- 资源 (3)
- 收藏
- 关注
原创 GNU testing coverage tool
<br />Simple tool for statement coverage and block coverage<br />Gcov: http://gcc.gnu.org/onlinedocs/gcc/Gcov.html<br /> <br />
2011-04-28 18:40:00 941
转载 python执行shell命令
<br />转自:http://stackoverflow.com/questions/89228/how-to-call-external-command-in-python<br /> <br />Here's a summary of the ways to call external programs and the advantages and disadvantages of each:<br />os.system("some_command with args") passes the
2011-04-27 20:06:00 5089
原创 Python tricks
print without newline --> print "hello python",delete leading space --> s=s.lstrip()get the type of object --> type()NOP statement --> pass
2011-04-25 21:08:00 998
转载 Programs as Data: Function Pointers
<br />Forwarded from: http://www.cprogramming.com/tutorial/function-pointers.html<br /> <br />A function pointer is a variable that stores the address of a function thatcan later be called through that function pointer. This is useful becausefunctions
2011-04-19 21:39:00 814
原创 undefined reference to `exp'
<br />明明include math.h了,而且也用了一个小例子试验了下exp函数是可以用的.<br />但是一个大的程序就总是编译不过 undefined reference to `exp'<br />后来google了下, gcc -o main main.c -lm ((-lm tells the linker to link with /usr/lib/libm.so))<br />搞定
2011-04-15 23:10:00 7907
原创 使用launchd在系统启动时执行自定义任务
<br />这个问题困扰了我好久,今天连续搞了6个小时终于搞定.<br />需要的工具: lingon 可以通过mac port安装最后一个免费的版本,或者可以从sourceforge上下载. 最新的版本已经不能免费使用了,可以从mac app store花几美元买到. 建议用这个工具的原因是因为自己写plist file难免出错.<br /> <br />进入正题, 假设我们要借助launchd在系统启动或者某个user login的时候执行一个任务, 本处以系统启动时创建一个ramdisk为例子. 先假
2011-04-13 20:44:00 1965
原创 为什么要写makefile?
<br />很多的年轻程序员从学programming开始接触的便是功能强大的IDE, 只要写好header files 和 source files, 一键就能生成可执行文件. 但是作为一个professional, makefile的概念不能不清楚, 所以我就动手探究了下为什么我们要写makefile. 至于怎么写好makefile,请参考http://bbs.chinaunix.net/viewthread.php?tid=408225.<br /> <br />我们使用4个文件来说明这个问题<b
2011-04-07 16:14:00 3576
转载 VIM 常用命令(节选自Unix and Linux Forum)
Forwarded from http://www.unix.com/unix-dummies-questions-answers/132518-vim-tips-tricks.html:w => Save [:w filename writes the content to the specified file from current file] :q => Exit as long as there have been no changes:q! => Exit and ignore
2011-04-05 13:20:00 1122
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人