Category Archives: Linux

Debian6 自动补全问题

新的vps商提供的模板实在太“精简”了,连自动补全都没设置好,哎……

在Debian6下开启自动补全(主要是sudo模式下)的步骤是:

1、apt安装包(如果已经安装,可以跳过)
sudo apt-get install bash-completion
2、bashrc中设置
sudo vim /etc/bash.bashrc
在最后追加上如下内容:
. /etc/bash_completion
搞定![......]

继续阅读

解决vc2003、2005、2008不支持c99中int定义的办法。。

gcc可以通过-c99来强制打开c99,并且按规矩实现了stdint.h。但是vc就没这么规矩了,必须升级到vc2010才行,实验室的服务器显然没这么先进。。。。。。

解决方法:

http://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-studio

这里给出了一些很猛的人写的“可移植版本”stdint.h,在你的程序中直接引用这些可移植版本的stdint.h就可以了!

哎,觉得[......]

继续阅读

Debian 6下安装JDK

在Debian(6及以下版本)的默认源中,并没有默认包含JDK,我们需要从non-free源中找到它。
1、设置源
确认你的apt源包含了non-free,类似如下的:
sudo vim /etc/apt/sources.list
deb http://debian.cn99.com/debian/ testing main contrib non-free
deb-src http://debian.cn99.com/debian/ testing main contrib non-[......]

继续阅读