摘要:
【Bash's ArithmeticExpression】let command: 1 let a=17+232 echo "a = $a" # Prints a = 403 let a=17 + 23 # WRONG4 let a="17 + 23" # Right5 let a=28/66 echo "a = $a" # Prints a = 4In addition to theletcommand, one may use the(())syntax to enforce an arithmetic context. 阅读全文
posted @ 2013-12-08 20:10
Tekkaman
阅读(459)
评论(0)
推荐(0)
摘要:
【shell's glob】 basic glob example: range glob example: 参考:http://bash.cumulonim.biz/glob.html 阅读全文
posted @ 2013-12-08 19:43
Tekkaman
阅读(361)
评论(0)
推荐(0)
摘要:
【int* V.S. int[]】 在C++中,int[]有2种形态,一种是指针形态,即使用方法和int*一样,另一种是符号形态,即只是一个编译期的符号(意味着在runtime期,所定义的int[]根本不存在) int *p = "abc"; int p[] = "abc"; 对于上面2行代码,调用p[i]时结果是一样的,但执行过程不一样。具体参见《C专家编程》。 阅读全文
posted @ 2013-12-08 19:31
Tekkaman
阅读(308)
评论(0)
推荐(0)
摘要:
【anonymous namespace V.S. static variant】 在C语言中,如果我们在多个tu(translationunit)中使用了同一个名字做为函数名或者全局变量名,则在链接阶段就会发生重定义错误,为了解决这个问题,我们可以在定义这些标识符(identifier)的时候加... 阅读全文
posted @ 2013-12-08 19:28
Tekkaman
阅读(557)
评论(0)
推荐(0)
摘要:
【screen command of linux】 常用键: 补充: Ctrl-a S # split terminal horizon Ctrl-a TAB # switch to another splitted part then use step 3 to select a screen C 阅读全文
posted @ 2013-12-08 18:38
Tekkaman
阅读(405)
评论(0)
推荐(0)
浙公网安备 33010602011771号