摘要: 1 尽量不要在你的代码中使用无符号类型,以免增加不必要的复杂性。尤其是,不要仅仅因为无符号数不存在负值(如年龄、国债)而用它来表示数量。 2 无论在什么时候,如果遇见了这样一条语句malloc(strlen(str));,几乎可以断定它是错误的,而malloc(strlen(str)+1)才是正确的。这是因为其它的字符串处理库函数几乎都包含一个额外空间,用于容纳字符串结尾的'\0'字符。 3 ... 阅读全文
posted @ 2012-07-10 20:36 hello.world 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1 安装基本软件 sudo apt-get install openssh-server 2 安装开发工具 sudo apt-get install git-core subversion git-svn sudo apt-get install vim sudo apt-get install bison flex sudo apt-get install cscope... 阅读全文
posted @ 2012-07-07 13:34 hello.world 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1 配置篇 git config --global core.editor vim git config --global color.status auto git config --global color.branch auto git config --global color.diff auto git config --global color.ui auto git co... 阅读全文
posted @ 2012-07-07 13:34 hello.world 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1 配置IPsudo vi /etc/network/interfaces 1 # This file describes the network interfaces available on your system 2 # and how to activate them. For more information, see interfaces(5). 3 4 # The loopback network interface 5 auto lo 6 iface lo inet loopback 7 8 auto eth0 9 # static ip10 iface eth0 inet.. 阅读全文
posted @ 2012-07-07 11:36 hello.world 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 1 将就着用吧 修改eth1 IP配置文件,以后就使用eth1 2 找回eth0 按以下方法修改脚本文件: sudo vi /etc/udev/rules.d/70-persistent-net.rules 注释掉其中eth0的配置 修改其中eth1配置行的“NAME”字段的值为"eth0” 保存退出。 然后修改网卡IP配置文件。 阅读全文
posted @ 2012-07-07 11:31 hello.world 阅读(969) 评论(0) 推荐(0) 编辑