09 2009 档案
gnome通过蓝牙接收文件?
摘要:用gnome-bluetooth感觉比bluez-gnome更好。但是它接收文件没有在gnome-bluetooth中实现。 File reception is not implemented in gnome-bluetooth, but in gnome-user-share, so you have to install this application to be able t... 阅读全文
posted @ 2009-09-30 22:07 lbsx 阅读(357) 评论(0) 推荐(0)
bluetooth-wizard bug
摘要:bluetooth-wizard出现如下错误:** (bluetooth-wizard:4810): WARNING **: Could not load UI from /usr/share/gnome-bluetooth/wizard.ui: Duplicate object id 'label1' on line 214 (previously on line 20)补丁:213c213&l... 阅读全文
posted @ 2009-09-30 21:08 lbsx 阅读(201) 评论(0) 推荐(0)
尽量用引用(提醒)
摘要:通常在能用引用的情况下尽量用引用,引用比较安全,而且简单,不像指针那么复杂容易出问。引用和指针使用原则: 1.在可以用引用的情况下,不要用指针; 2.引用不允许重新赋值.,当使用一个变量指向不同的对象时,必须用指针; 3.引用不允许为空,当存在对象为空时,必须使用指针。 阅读全文
posted @ 2009-09-27 09:55 lbsx 阅读(205) 评论(0) 推荐(0)
结构体指定初始化
摘要:标准C89需要初始化语句的元素以固定的顺序出现,和被初始化的数组或结构体中的元素顺序一样。在ISO C99中,你可以按任何顺序给出这些元素,指明它们对应的数组的下标或结构体的成员名。 gcc采用ANSI C的struct结构体的初始化形式:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1structs2{3inta;4intb;5};67structsi=8{9 .a=3,10 .b=4,11};12数组初始化也类似:Code highli 阅读全文
posted @ 2009-09-17 09:01 lbsx 阅读(697) 评论(0) 推荐(0)
use fgets or fread
摘要:It’s better to use a field specifier, or a combination of fgets and sscanf, to read in a line of input and scan it. This will prevent possible buffer overflows that could be exploited by a malic... 阅读全文
posted @ 2009-09-15 20:59 lbsx 阅读(180) 评论(0) 推荐(0)
c++数组作形参
摘要:void foo(char **arg[3][4]);void foo(char **(*arg)[4]);这二者完全相同; char **arg[10][4]; foo(arg); 传到foo中的数组arg会退化成为指针,该指针指向有四个元素的一块连续内存,每个元素是一个指向指针的指针(便于理解可叫二级指针,虽然不正确)。此时arg[1]的地址会比arg[0]的地址高16个字节,即4个指针的长度... 阅读全文
posted @ 2009-09-06 22:30 lbsx 阅读(410) 评论(0) 推荐(0)
ldd nm
摘要:ldd - print shared library dependenciesnm - list symbols from object files 阅读全文
posted @ 2009-09-06 16:50 lbsx 阅读(182) 评论(0) 推荐(0)
debian下emacs的安装目录
摘要:安装cscope的时候出了问题,解决的过程中顺便了解了下debian下emacs的目录结构凡是目录名没有带版本号的,一般都是emacsen-common,即与emacs版本无关的内容约定:<emacs>表示所有emacs, emacs22, emacs23...<flavor>表示emacs22,emacs23...<upstream>表示上游的版本号如 20.... 阅读全文
posted @ 2009-09-06 16:18 lbsx 阅读(978) 评论(0) 推荐(0)
cp: cannot stat `xscope.el': No such file or directory
摘要:安装cscopt的时候出现错误install/cscope: Byte-compiling for emacs23cp: cannot stat `xscope.el': No such file or directory>>Error occurred processing xscope.el: File error (("Opening input file" "no such f... 阅读全文
posted @ 2009-09-06 15:35 lbsx 阅读(2950) 评论(0) 推荐(0)