摘要:
最近心血来潮,想看看自己平时写的乱七八糟的代码都有多少行了,就写了这个脚本。因为我的代码都写在了一个总目录里面,所以统计起来还算比较方便。统计脚本是用shell写的,支持4个参数,-[qQhd],其中h :为帮助参数,显示如下的帮助信息$ cntline.sh -hUsage : cntline.... 阅读全文
摘要:
1、代码 1 package main 2 3 import "fmt" 4 /* 5 #include 6 #include 7 void hello() 8 { 9 printf("Hello World !\n");10 }11 */12 import "C"13 14 func... 阅读全文
摘要:
列举几个反射的例子:1)简单类型反射,2)复杂类型反射,3)对反射回来的数据的可修改属性1、简单类型反射 1.1)代码package mainimport ( "fmt" "reflect")func main() { var x float64 = 3.4 v := re... 阅读全文
摘要:
1、rc.loacl的启动 /etc/rc.d/rc.local 阅读全文
摘要:
1、安装Graphviz (windows 版本,后面说linux下的安装) 1.1)下载安装文件从graphviz官网下载http://www.graphviz.org/Download.php或者从我的百度网盘下载http://pan.baidu.com/s/1i3mzunV下载后双击安装,跟... 阅读全文
摘要:
1、C++ 中 string 类的 find 方法列表size_type std::basic_string::find(const basic_string &__str, size_type __pos);size_type std::basic_string::find(const _Char... 阅读全文
摘要:
1、使用了一个小程序输出所有的errno对应的error字符串,代码如下#include void showError(int err){ printf("errno : %5d , error : %s\n", err, strerror(err));}void showAllErr(){ i... 阅读全文