void PrintClassName(void *p){ type_info *** vtable
= (type_info ***)(*(int*)p); type_info ** v1 = vtable[-1]; type_info * v =
v1[3]; print...
分类:
编程语言 时间:
2014-06-12 20:41:59
阅读次数:
309
while loops
定义与实例
i = 0
numbers = []
while i < 6:
print "At the top i is %d" % i
numbers.append(i)
i = i + 1
print "Numbers now: ", numbers
print "At the bottom i is %d" % ...
分类:
编程语言 时间:
2014-06-11 00:59:17
阅读次数:
410
RS,ORS,FS,OFS,NR,NF,$0,$nRS输入的行分隔号ORS输出的行分隔号FS输入的列分隔号OFS输入的列分隔号NR行号NF尾列号$0表示所有列(整行)$n表示第n列例如:cataa123456awk‘ORS=",\n"{print}‘aa12,34,56,RS反之awk‘OFS="|"{print$1,$2}‘1|23|45|6FS反之ifconfig|awk-F"[|:]+"‘NR==2..
分类:
其他好文 时间:
2014-06-10 23:39:38
阅读次数:
258
Write an algorithm to print all ways of arranging
eight queens on an 8*8 chess board so that none of them share the same row,
column or diagonal.思路:本质...
分类:
其他好文 时间:
2014-06-10 10:36:29
阅读次数:
182
在linux中有时需要获得登录者的IP,这里有两种方法,先使用who am i 获取登录IP,然后截取字符串:
1、awk截取,sed替换
who am i | awk '{print $5}' | sed 's/(//g' | sed 's/)//g'
2、cut 截取
who am i|cut -d\( -f2|cut -d\) -f1
使用方法,若在脚本中如.bashrc中,可...
分类:
系统相关 时间:
2014-06-10 07:49:49
阅读次数:
320
定义:#include std::function
myPrintFunction;函数指针void directPrint(const QString &msg){
qDebug()<<"direct print:"<<msg;}myPrintFunction =
directPrint;lamb...
分类:
其他好文 时间:
2014-06-09 17:41:16
阅读次数:
267
文件,目录 pwd:查看当前目录 Print Working Directory
cd,ls(ll),mkdir -p Change Directory List Make Directory du -sh 评估目录或者文件大小 touch
创建新文件 ln -s source dest ...
分类:
系统相关 时间:
2014-06-09 00:05:22
阅读次数:
334
先给大家来个干活^~^,学习Python的一个好网站,http://learnpythonthehardway.org/book/
经典例子
下面是几个老经典的例子喽,刚接触Python的可以敲一敲,看看结果喽!
my_name='Zed A. Shaw'
my_age=35#not a lie
my_height=74#inches
my_weight=180#1bs
my_eye...
分类:
编程语言 时间:
2014-06-08 17:15:58
阅读次数:
369
TinyXML中主要class的类图:
文档类代表一个XML文档,通过它,你可以载入、输出和保存文档。
载入文档:
TiXmlDocument doc("note.xml");
doc.LoadFile();
输出文档:
TiXmlDocument doc("note.xml");
doc.LoadFile();
doc.Print();...
分类:
其他好文 时间:
2014-06-08 15:16:22
阅读次数:
717