摘要: 最近心血来潮,想看看自己平时写的乱七八糟的代码都有多少行了,就写了这个脚本。因为我的代码都写在了一个总目录里面,所以统计起来还算比较方便。统计脚本是用shell写的,支持4个参数,-[qQhd],其中h :为帮助参数,显示如下的帮助信息$ cntline.sh -hUsage : cntline.... 阅读全文
posted @ 2015-07-31 22:57 fengbohello 阅读(1262) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-07-31 22:40 fengbohello 阅读(981) 评论(0) 推荐(0) 编辑
摘要: 列举几个反射的例子:1)简单类型反射,2)复杂类型反射,3)对反射回来的数据的可修改属性1、简单类型反射 1.1)代码package mainimport ( "fmt" "reflect")func main() { var x float64 = 3.4 v := re... 阅读全文
posted @ 2015-07-31 22:36 fengbohello 阅读(596) 评论(0) 推荐(0) 编辑
摘要: 1、rc.loacl的启动 /etc/rc.d/rc.local 阅读全文
posted @ 2015-07-31 22:06 fengbohello 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1、安装Graphviz (windows 版本,后面说linux下的安装) 1.1)下载安装文件从graphviz官网下载http://www.graphviz.org/Download.php或者从我的百度网盘下载http://pan.baidu.com/s/1i3mzunV下载后双击安装,跟... 阅读全文
posted @ 2015-07-31 22:04 fengbohello 阅读(16469) 评论(1) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-07-31 21:38 fengbohello 阅读(2836) 评论(0) 推荐(0) 编辑
摘要: 1、使用了一个小程序输出所有的errno对应的error字符串,代码如下#include void showError(int err){ printf("errno : %5d , error : %s\n", err, strerror(err));}void showAllErr(){ i... 阅读全文
posted @ 2015-07-31 17:27 fengbohello 阅读(6513) 评论(0) 推荐(0) 编辑