2011年12月25日
摘要:
http://forums.linuxmint.com/viewtopic.php?f=198&t=67502&p=510197#p512994bug report:https://bugzilla.gnome.org/show_bug.cgi?id=656054https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/816762
阅读全文
posted @ 2011-12-25 10:48
lbsx
阅读(272)
推荐(0)
2011年9月6日
摘要:
本文内容适用于编译运行于本机的内核模块。开发内核模块往往第一步的编译环境设置最容易出错,需要安装的主要有build-essential, 对应版本的linux-header。然后就是Makefile的写法1 obj-m := hello.o2 # 网上很多是自己下载源码,然后用的是3 # KDIR :=/usr/src/kernel-source-2.6.8类似的路径,这样很容易出错,造成4 # 编译出来的内核版本号和实际运行的内核版本号不一致。在insmod时就会得到这5 # 个错误 insmod: error inserting '': -1 Invalid module
阅读全文
posted @ 2011-09-06 20:10
lbsx
阅读(285)
推荐(0)
2011年4月19日
摘要:
source:Git cheat sheethttp://files.cnblogs.com/lbsx/git-cheat-sheet-large.png.zip
阅读全文
posted @ 2011-04-19 11:00
lbsx
阅读(458)
推荐(0)
2011年4月18日
摘要:
这是针对前文的问题的回答。本文强调的是为什么在“执行期”调整,而不是为什么要调整。类层次:1 class A {...}2 3 class B {...}4 5 class C: public A, public B {...}6 7 B* b = new C;8 9 b->foo(); //virtual function在这种情况下,是需要在执行期调整作为参数的this指针的,以例其指向真正的C对象,也就是前文提到的两种方法。为什么编译期不能决定this指针的偏移呢?因为编译期无法确定b指向的真正对象。不需要调整this指针的情况1 B *b = new B;2 3 b->fo
阅读全文
posted @ 2011-04-18 16:47
lbsx
阅读(868)
推荐(0)
摘要:
1 class A {...}2 3 class B {...}4 5 class C: public A, public B {...}6 7 B* b = new C;8 9 b->foo(); //virtual function在为line 9实现多态的时候,b指向的不是C对象的开头,而是其subobject B的开头。因此在调用foo时,作为参数的this指针需要被调整,以指向真正的C对象的开始。在《Inside the C++ Object Model》一书中,Lippman提到了两种方案,一种是在虚函数表中不光存放真正调用函数的地址,还存上需要对this指针进行调整的偏移,
阅读全文
posted @ 2011-04-18 16:06
lbsx
阅读(1424)
推荐(1)
摘要:
http://code.alexreisner.com/articles/character-encoding.html对于以UTF-8编码的字节:if it starts with 0it’s an ASCII characterif it starts with 10it’s a continuation of a multi-byte characterif it starts with 110it’s the first byte of a 2-byte characterif it starts with 1110it’s the first byte of a 3-byte ch
阅读全文
posted @ 2011-04-18 15:56
lbsx
阅读(284)
推荐(0)
2010年12月29日
摘要:
$ lsb_release -aNo LSB modules are available.Distributor ID: DebianDescription: Debian GNU/Linux testing (squeeze)Release: testingCodename: squeeze$ cat /etc/debian_version squeeze/sid/usr/share/doc/base-files/FAQ:Q. Ok, but how do I know which distribution I'm running?A. If you are running testing
阅读全文
posted @ 2010-12-29 18:17
lbsx
阅读(17827)
推荐(0)
2010年12月26日
摘要:
来源:https://help.ubuntu.com/community/RenameUSBDriveRenameUSBDriveContents1.Using the Partition Editor2.Using the Command line (1) Identify your Partition (2) Install the Labeling Program (3) Unmount the Partition (4) Changing the Label3.Filesystems (1) FAT16 and FAT32 (2) NTFS (3) ext2, ext3,
阅读全文
posted @ 2010-12-26 16:36
lbsx
阅读(435)
推荐(0)
摘要:
转自:查看文件系统类型的Linux命令1. 不需要挂载:(1) file -s(2) parted #p命令(3) fdisk -l(4) cfdiskI prefer parted. 2. 需要挂载:(1) mount(2) df -T(3) stat
阅读全文
posted @ 2010-12-26 11:48
lbsx
阅读(310)
推荐(0)
摘要:
对home目录采用snapshot方式实现persistence$ dd if=/dev/null of=home-sn bs=1G seek=1$ ls home-sn | cpio -o | gzip home-sn.cpio.gz$ cp home-sn.cpio.gz $(USB)在每次启动的时候,加上persistent参数,live系统即会自动将home-sn.cpio.gz挂载为主目录在关机的时候,才会进行同步
阅读全文
posted @ 2010-12-26 10:59
lbsx
阅读(363)
推荐(0)