自从blogspot被封以后,好长时间没有去登录,今天得闲,tor + FoxyProxy登录,把前段时间在http://liuhongdan.bokee.com的文章转到我的http://liuhongdan.blogspot.com和http://hongdanliu.blogspot.com上,速度还行,呵呵。
ok,以后记着,别再落下了。
读书写字看风景...
自从blogspot被封以后,好长时间没有去登录,今天得闲,tor + FoxyProxy登录,把前段时间在http://liuhongdan.bokee.com的文章转到我的http://liuhongdan.blogspot.com和http://hongdanliu.blogspot.com上,速度还行,呵呵。
ok,以后记着,别再落下了。
说明:本文旨在在fedora中安装lxr,此安装方法与fedora版本无关,本文在fedora 11中进行的安装,参考的是fedora 4/9等文章说明,成功。使用普通用户安装,过程中使用到su命令,lxr设置为可以同时查看多个版本源代码。
1.下载lxr-0.3
下载地址:http://sourceforge.net/projects/lxr/files/
说明:lxr的最新版使用的是PostgreSQL,麻烦,0.3则不需要数据库,方便。
2.下载glimpse
http://webglimpse.net/download.php
http://webglimpse.net/trial/glimpse-latest.tar.gz
3.安装lxr
3.1解压lxr,进入解压后的文件夹lxr-0.3,修改Makefile文件,主要有两项:
# The location of your perl5 binary
PERLBIN=/usr/bin/perl
这是perl的路径名,/usr/bin/perl是大多数情况下的默认配置,如果不同,请用whereis perl查找。
# LXR will be installed here
INSTALLPREFIX=/var/www/html/lxr
这是lxr脚本的安装目录,其中/var/www/html取自Apache配置文件/etc/httpd/conf/httpd.conf中的DocumentRoot(文件根目录)的值。
su
make install
./configure
su
make install
linux-1.0
linux-2.4.0
linux-2.6.18.8
linux-2.4.0
# cp lxr.conf lxr.conf.bak
# Configuration file.
# Define typed variable "v", read valueset from file.
variable: v, Version, [/var/www/html/lxr/source/versions], [/var/www/html/lxr/source/defversion]
# Define typed variable "a". First value is default.
variable: a, Architecture, (i386, alpha, m68k, mips, ppc, sparc, sparc64)
# Define the base url for the LXR files.
baseurl: http://localhost/lxr/http/
# These are the templates for the HTML heading, directory listing and
# footer, respectively.
htmlhead: /var/www/html/lxr/http/template-head
htmltail: /var/www/html/lxr/http/template-tail
htmldir: /var/www/html/lxr/http/template-dir
# The source is here.
sourceroot: /var/www/htl/lxr/source/$v/
srcrootname: $v
# "#include" is mapped to this directory (in the LXR source
# tree)
incprefix: /include
# The database files go here.
dbdir: /var/www/html/lxr/source/dbdir/$v/
# Glimpse can be found here.
glimpsebin: /usr/local/bin/glimpse
# The power of regexps. This is pretty Linux-specific, but quite
# useful. Tinker with it and see what it does. (How's that for
# documentation?)
map: /include/asm[^\/]*/ /include/asm-$a/
map: /arch/[^\/]+/ /arch/$a/
SetHandler cgi-script
# Cross Reference Stuff
Options All
AllowOverride All
Options All
AllowOverride All
order allow,deny
allow from all
ServerName localhost
#service httpd start
Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
Starting httpd: [ OK ]
# cd /var/www/html/lxr/source/dbdir/linux-1.0
# /var/www/html/lxr/bin/genxref /var/www/html/lxr/source/linux-1.0/
生成fileidx和xref两个文件
# glimpseindex -H . /var/www/html/lxr/source/linux-1.0/
生成7个.glimpse_*文件
# chmod 755 *; chmod 755 .g*
(中间是分号)将这几个数据文件修改为任何人均可读可执行。
# /etc/rc.d/init.d/httpd start
或者
# service httpd start
# setenforce 0
查看selinux状态:
# getenforce
fedora非常cool的主题,只要你看到,你一定会喜欢,那黑色的任务栏,深邃的蓝色,绿色的麦地,以及地平线上的太阳,没有刺眼,却很辽阔,没有灿烂,却有犹豫的晴朗。
上图:



方法:
主题为Overglossed:
http://gnome-look.org/content/show.p...13&forumpage=0
图标为black-white 2 Vista:
http://dbgthekafu.deviantart.com/art...Vista-73277142
图标里面有一些其他的图标,可以用来设置自己的主目录的各个文件夹的图标,在文件的属性里面改变图标即可。
背景为Grassy Sunset:
http://interfacelift.com/wallpaper/details.php?id=1537
参考:
10 Of The Best Linux Desktop Customization Screenshots To Inspire Your Creativity
http://maketecheasier.com/10-of-the-...ity/2008/11/28
1) My Desktop by ramios
* GTK2.0 Theme: Overglossed by TheRob [link]
* Emerald: Overglossed by TheRob [link]
* Icons: Black-White 2 Neon/Style by DBGtheKafu [link] [link]
* Wallpaper: Grassy Sunset by mattyv8 [link]
以前在bbs.fedora-zh.org写的文章,没想到似乎论坛的数据丢失了一部分,幸好有其他人转载,想起放在博客中备份一下,记录自己,方便后人。















)
未被支持的 Nvidia 显卡
RIVA TNT
RIVA TNT2/TNT2 Pro
RIVA TNT2 Ultra
Vanta/Vanta LT
RIVA TNT2 Model 64/Model 64 Pro
Aladdin TNT2
GeForce 256
GeForce DDR
Quadro
GeForce2 GTS/GeForce2 Pro
GeForce2 Ti
GeForce2 Ultra
Quadro2 Pro
[liuhongdan@dan ~]$ rpm -qa | grep 185
akmod-nvidia-185.18.14-1.fc11.i686
kmod-nvidia-185.18.14-1.fc11.i586
xorg-x11-drv-nvidia-libs-185.18.14-2.fc11.i586
xorg-x11-drv-nvidia-185.18.14-2.fc11.i586
kmod-nvidia-2.6.29.4-167.fc11.i586-185.18.14-1.fc11.i586
kmod-nvidia-2.6.29.4-167.fc11.i686.PAE-185.18.14-1.fc11.i686
[liuhongdan@dan ~]$ rpm -qa | grep nvidia
akmod-nvidia-185.18.14-1.fc11.i686
kmod-nvidia-185.18.14-1.fc11.i586
xorg-x11-drv-nvidia-libs-185.18.14-2.fc11.i586
xorg-x11-drv-nvidia-185.18.14-2.fc11.i586
kmod-nvidia-2.6.29.4-167.fc11.i586-185.18.14-1.fc11.i586
kmod-nvidia-2.6.29.4-167.fc11.i686.PAE-185.18.14-1.fc11.i686
由于我的程序需要改动比较多,想想就懒得去改了,有没有简单的办法一劳永逸呢?想到除了crontab以外其他地方都没问题,估计是crontab的环境变量出了问题,没有系统的环境变量,所以必须加上绝对路径。于是写了一个小程序测试了一下,果然如此。
随后google之,发现crontab启动加载的环境变量很少,root的是/etc/crontab,也可以在/var/spool/cron/root查看,不过却发现似乎crontab一点点环境变量都没继承进去,于是自己加上环境变量试试看,ok。于是直接把# env | grep ^SHELL, # env | grep ^PATH, env | grep ^HOME这些环境变量直接放入
SHELL=/bin/bash
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:.:/root/bin
HOME=/root
0 1 * * * /xxx/....
0 1 * * * /xxx/....
if (x = y)
foo();
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int x = 1;
int y = 1;
if ( x = y)
printf(“x = y is true\n”);
exit(0);
}
gcc -o prog prog.c
gcc -Wall -o prog prog.c
if ((x = y) != 0)
foo();
If the input stream has been separated into tokens up to a given character, the next token is the longest string of characters that could constitute a token.
printf("Hello world\n");
char hello[] = {'H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '\n', '\0'}
printf(hello);
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
printf('\n');
exit(0);
}
$ gcc -o prog prog.c
prog.c: In function ‘main’:
prog.c:6: warning: passing argument 1 of ‘printf’ makes pointer from integer without a cast
$ ./prog
Segmentation fault
$ cat prog.c
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
char c = 'yes';
printf("%c\n", c);
exit(0);
}
$ gcc -o prog prog.c运行结果:
prog.c:6:11: warning: multi-character character constant
prog.c: In function ‘main’:
prog.c:6: warning: overflow in implicit constant conversion
$ ./prog
s
A.7.3.4 Postfix Incrementation ... ... The result is not an lvalue.当然前缀的也不能作为lvalue,出处就是A.7.4.1 Prefix Incrementation Operators ... ... The result is not an lvalue. ^_^
#include <stdio.h>
main()
{
printf("Hello world");
}
% cc prog.c
% a.out (注意,现在应该使用./a.out来运行这个默认的gcc编译出来的a.out了)
Hello world%
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int i;
int a[10];
for (i = 0; i <= 10; i++) {
a[i] = 0;
printf("a[%d] = 0\n", i);
}
exit(0);
}

xmame kof97
Alt + Home/Pgup
Alt + Pgup + PgDn
Esc
| cpzn1.zip.tar.bz2 | |
| cpzn2.zip.tar.bz2 | |
| neogeo.7z |


