02 2012 档案
摘要:(本文章仅适用于C++程序)写服务程序时,如果需要提供命令行参数。传统的方法是手工解析argv参数,或者使用getopt函数。两种方法都比较费劲。使用Google gflags可以大大简化命令行参数处理。安装gflag从官方地址http://code.google.com/p/google-gflags/下载gflags并安装。比如我下载的是1.5版本。[yichi@yichi tmp]$ wgethttp://google-gflags.googlecode.com/files/gflags-1.5.tar.gz[yichi@yichi tmp]$ tar zxvf gflags-1.5.t
阅读全文
摘要:注释文件/usr/lib/rpm/redhat/macros里的/usr/lib/rpm/brp-python-bytecompile%__os_install_post \ /usr/lib/rpm/redhat/brp-compress \ %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip%{__strip}} \ /usr/lib/rpm/redhat/brp-strip-static-archive%{__strip} \ /usr/lib/rpm/redhat/brp-strip-comment-note...
阅读全文
摘要:http://www.cnblogs.com/Alexander-Lee/archive/2010/05/28/1745895.html
阅读全文
摘要:ipython:1.安装easy_install工具wgethttp://peak.telecommunity.com/dist/ez_setup.pypython ez_setup.py2.安装ipythoneasy_install ipythonbpython: http://bpython-interpreter.org/downloads/1.安装easy_install工具wgethttp://peak.telecommunity.com/dist/ez_setup.pypython ez_setup.py2.安装bpythoneasy_install bpython
阅读全文
摘要:from:http://apps.hi.baidu.com/share/detail/30042616【整理】如何取消Linux下,vi中显示的^M符号【背景知识】^M 是ascii中的'\r', 回车符,是16进制的0x0D,8进制的015,十进制的13。对于换行这个动作,unix下一般只有一个0x0A表示换行,windows下一般都是0x0D和0x0A两个字符。另外:^L 是ascii 0x0C '\f', 换页控制符。而对于Linux 的vi,有些版本,比如我当前开发板里面的vi,是用busybox编译出来的,不能识别windows下面编辑的,带0x0D的
阅读全文
摘要:dict1={1:[1,11,111],2:[2,22,222]}dict2={3:[3,33,333],4:[4,44,444]}合并两个字典得到类似{1:[1,11,111],2:[2,22,222],3:[3,33,333],4:[4,44,444]}方法1:dictMerged1=dict(dict1.items()+dict2.items())方法2:dictMerged2=dict(dict1, **dict2)方法2等同于:dictMerged=dict1.copy()dictMerged.update(dict2)或者dictMerged=dict(dict1)dictMerg
阅读全文