November 16, 2011
Awesome tip for traffic ticket

http://www-cs-students.stanford.edu/~eswierk/traffic-tix.html

Some more reference:

http://www.helpigotaticket.com/speed/basic.html

November 11, 2011
时间

还车贷要三年

申绿卡要四年

买房子要几十年

所有所有年少时候的梦想都必需要用无能为力的时间去实现。而所有的梦想又会不会在无声的岁月里被吹灭吗?我想知道在等待的尽头,我会飞身雀跃,还是只是转身继续默默地生活…

7:16pm  |   URL: http://tumblr.com/Zi3hLyBopjM9
Filed under: life 
November 10, 2011
Replace IBM R52 Hard Drive

It’s hard to find an old compatible ATA Hard Drive for my beloved IBM.  I bought it in 2005 as I was in the college.  It still works perfectly under Linux.  

http://www.thinkwiki.org/wiki/Problem_with_non-ThinkPad_hard_disks

6:46pm  |   URL: http://tumblr.com/Zi3hLyBm3B_J
Filed under: life 
October 20, 2011
Best Red Lipstick

http://www.elle.com/Beauty/Makeup-Skin-Care/Red-Alert

11:43pm  |   URL: http://tumblr.com/Zi3hLyAwfh7O
Filed under: life 
October 15, 2011
Ticket dispute

http://www.ehow.com/how_5043875_beat-speeding-ticket-california.html

1:28am  |   URL: http://tumblr.com/Zi3hLyAhYyTF
  
Filed under: life 
October 11, 2011
PMP certificate

http://www.preparepm.com/faq.html

http://www.articlesnatch.com/Article/How-To-Satisfy-35-Hours-Of-Project-Management-Education-For-The-Pmp/391396

CISSP

http://www.investopedia.com/articles/financial-theory/09/capm-error-problem.asp#axzz1aRy5OuuK

http://pmtips.net/

12:11am  |   URL: http://tumblr.com/Zi3hLyAXvLZe
Filed under: PMP 
August 28, 2011
Get started with ‘Linux Device Drivers’

If you’re reading the book ‘Linux Device Drivers’, you probably will meet the same problem.

First, you will see this error,

error: linux/module.h: No such file or directory

I f you use your gcc with -v, you will find

#include “…” search starts here:
#include <…> search starts here:
 /usr/local/include
 /usr/lib/gcc/i486-linux-gnu/4.4.3/include
 /usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed
 /usr/include
End of search list.
GNU C (Ubuntu 4.4.3-4ubuntu5) version 4.4.3 (i486-linux-gnu)
    compiled by GNU C version 4.4.3, GMP version 4.3.2, MPFR version 2.4.2-p1.
GGC heuristics: —param ggc-min-expand=100 —param ggc-min-heapsize=131072
Compiler executable checksum: 5998ce5f1765e99eea5269f4c1e38d44
1.c:2:25: error: linux/module.h: No such file or directory

You will see module.h is not included within /usr/include.  Instead, it’s under /usr/src/linux-headers-2.6.32-33-generic/include/linux/.

So, how to make gcc check my path instead of default one?

Make your own Makefile:

bj-m += hello-1.o
all:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

Then type command: make.  You will see:

$ make
make -C /lib/modules/2.6.32-33-generic/build M=/home/lixian/LinuxDeviceDrivers/ex modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-33-generic’
  Building modules, stage 2.
  MODPOST 0 modules
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-33-generic’

Make V=1, then get

test -e include/linux/autoconf.h -a -e include/config/auto.conf || (        \
    echo;                                \
    echo “  ERROR: Kernel configuration is invalid.”;        \
    echo “         include/linux/autoconf.h or include/config/auto.conf are missing.”;    \
    echo “         Run ‘make oldconfig && make prepare’ on kernel src to fix it.”;    \
    echo;                                \
    /bin/false)

But actually, under include/linux exists autoconf.h.

Reference:

http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html

http://en.tldp.org/LDP/lkmpg/2.6/html/index.html

http://stackoverflow.com/questions/4715259/linux-modpost-does-not-build-anything

Documentation/kbuild/modules.txt

http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html

(Source: learningdevicedrivers.blogspot.com)

August 15, 2011
Some Interesting Open Source Hardware Webpages

http://antipastohw.blogspot.com/2009/03/introducing-open-source-hardware.html

KiCAD: http://en.wikipedia.org/wiki/KiCAD

http://en.wikipedia.org/wiki/List_of_open_source_hardware_projects

http://www.dmoz.org/Computers/Hardware/Open_Source/

12:46am  |   URL: http://tumblr.com/Zi3hLy8KtUym
Filed under: Open Source 
August 14, 2011
Ex 4-1

4:33pm  |   URL: http://tumblr.com/Zi3hLy8JfF3w
Filed under: K&amp;R 
August 13, 2011
The Benefit of Two’s Complement System

A two’s-complement system, or two’s-complement arithmetic, is a system in which negative numbers are represented by the two’s complement of the absolute value.  An N-bit two’s-complement numeral system can represent every integer in the range −1×2N−1 to 2N−1−1(-128 - 127).

The two’s-complement system has the advantage:

  • not requiring that the addition and subtraction circuitry examine the signs of the operands to determine whether to add or subtract
  • zero has only a single representation, obviating the subtleties associated with negative zero

(Source: Wikipedia)

1:34am  |   URL: http://tumblr.com/Zi3hLy8FqNQ_
  
Filed under: Hardware 
Liked posts on Tumblr: More liked posts »