2009年1月30日

在ubuntu下编c++程序

要在ubuntu下学C++程序,就必须装C++的编译环境,所以要装个gcc,gcc是一套编译器,可以编译c,c++, Fortran,Pascal,Objective-C,Java,等很多语言,下面看下怎么使用gcc。
加入在 /home/tinguys/c 下建立hello.c,内容为:
#include
int main(void)
{
printf("hello,world!\n");
return 0;
}

打开 终端 输入 gcc -Wall /home/tinguys/c/hello.c -o hello
-Wall参数的作用是程序错误时发出警告。
-o hello是根据代码生成一个可执行文件,并命名为hello,因为没有说明路径,这个可执行文件将建在原程序所在的文件夹内。
接着输入 ./hello
就会输出 hello,world!










vim帮助册 vim user manual



vim是强大的文本编辑器,但入门并不是很简单,这本《vim user manual》对我们初学者学会vim很有帮助.


下载:rayfile

ubuntu pocket guide and reference




装ubuntu也有好些天了,过年的繁琐事不断,在电脑上的时间远没有我想的那么多,也一直没有完成我的预期的目标。
  • 装LAMP
  • 建立c++编译环境,gcc+vim
其实也就这么两样事,网上的教程也有,但基本上所有的教程都一样,对于没接触过Linux的我,根本没有安装运行那些软件的思路,按着教程一步步装,也会出现各种问题,总之问题不断,还得慢慢来,一点点问。

《ubuntu pocket guide and reference》听名字应该适合初学者,不过是E文,看不下来阿。这书包含7章:
  1. 第一章:安装Ubuntu(Chapter 1:Installing Ubuntu)
  2. 第二章:配置Ubuntu(Chapter 2:Configuring Ubuntu)
  3. 第三章:熟悉桌面(Chapter 3:Getting to grips with the desktop)
  4. 第四章:用户和文件系统(Chapter 4:Users and the filesystem)
  5. 第五章:命令行上手(Chapter 5:Hands-on at the command-line)
  6. 第六章:软件管理(Chapter 6:Software management)
  7. 第七章:系统安全(Chapter7:Securing the system)
下载地址:pdf

2009年1月28日

apache 问题

tinguys@tinguys-desktop:~$ apache2 -k graceful
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs


tinguys@tinguys-desktop:~$ sudo /etc/init.d/apache2 restart
[sudo] password for tinguys:
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
tinguys@tinguys-desktop:~$

2009年1月27日

卓为 情人眼 315 驱动 下载

很早时候买的摄像头(右图),找出来继续发挥余热,不过130万像素还不如手机。现在500万像素的摄像头都不过百,考虑下是不是该升级了。


卓为 情人眼315基本参数


传感器类型 CMOS
传感器像素(万)130
最高分辨率(dpi)640×480

发个驱动:rayfile
我找的这个是64位的驱动,安装后可行,64位不是cpu的位数,而是摄像头程序的位数,