2009年8月26日星期三

中期業績

2009 http://www.hkexnews.hk/listedco/listconews/sehk/20090825/LTN20090825395_C.pdf

無咩時間..唯有睇下其他大行既推介價,
瑞信-40
野村-45
摩根大通-35.1
摩根士丹利-29.11
德銀-40.3

平均約$37,最高最低唔要,平均就係$38.
ev 雖然+11%, 約10蚊,現價己經係3倍,想係2倍ev既價錢入多幾手,睇怕無咩可能。
但係2倍ev個價係要d 天災或者人禍出現先可以有咁低。
雖然3倍ev 唔算好平,但係要記住股價係可以去到5倍ev....

2009年8月20日星期四

速讀速讀速讀速讀速讀速讀速讀

速讀是必要的技巧!點解?

以1分鐘計,有人只可以讀100隻英文字,有人可以讀800隻。
1個鐘相差700隻,
一日工作8小時,相差5600隻,
一個星期,相差39200隻.....................

大家對數字唔係好敏感,39200即係點?
以小弟來舉例,一份specifcaion有191300字,除以39200係4.88。
如果睇同一份speificaion,兩者就相差了4.88個星期,即係當你好辛苦睇完1份speifcation,
人地睇左5份!
如果以人工計,人地可以出5份糧了...或者可以吞pop1個月...點都好,時間就係金錢!

以一般學生來講,人地點解可以10個A,你就得6個丫?6個absent喎 = =
你身邊總有d人温得個一陣書, 考試又好鬼死高分(我唔係指我,雖然我係)
點解呢?點解呢?點解呢?
人地唔通一出世就識計數?一出世就識英文?唔係唔係....
因為人地讀野夠快,理解力,記憶力強。

e家就係研究第一步讀野點樣先夠快!

去片先!
http://www.youtube.com/watch?v=BQQjxj7sZi4&feature=fvw
http://www.youtube.com/watch?v=6TVxfe01aVY

仲有個測試,同練習
http://www.rocketreader.com/
我得28x per min..所以都要緊記以下心法,好好練習。

1.專心再專心,唔可以俾人嘈,唔可以聽歌
2.唔可以讀隻字出口,心讀更加唔可以,要記住當你一讀你就慢了
例如: 我係一隻狗,把口正在張開
你讀完呢十一隻字,你得到d咩資料丫?我當你叻,2秒讀完。

但係請你睇下呢幅圖,你一眼就睇完,呢幅圖就等於讀左個11集字。
1眼 同2秒,點比?



3.一望唔係望一隻字,係望幾隻字。 你隻死人眼咁大隻,用來望住一隻字?浪唔浪費d呀?一次望幾隻字絶對唔係問題,你起初可以3,4隻,慣左之後再慢慢加,之後就可以8隻,10隻的了。
4.焦點不可似停,眼要不停咁掃
5.仲有d基本野,例如先睇toc(table of content),睇頭睇尾,其實都係要大家係讀之前大既知道有d咩讀,係未你需要既野。

2009年8月17日星期一

10%的調整

高位己回落10%,所以依計劃行事,己經去到145%。
形形式式的下跌原因,我都唔在意。因為歷史都講左俾我知,調整會係10%以上,
己且調整完就會有驚人的升幅。

2009年8月16日星期日

one out-渡久地東亞

吓?只是一句對不起?
單憑別人的一句對不起,你會服氣嗎?
你們的監督,打算用這種如廢物一樣的道歉方式來負責任,
哼,一把年紀,連負責任的方法也不懂嗎?
所謂的負責任 就是要有痛苦的感覺
因為自己的緣故為別人帶來麻煩,所以自己也要去承受那份痛楚

弄壞別人的銀器餐具,就要買金器餐具作為賠償
散播惡臭的工廠的社長,就要住在那個工廠的煙旁
就這是負責任

可是這世上那些所謂的高層人仕,總是不想嚐到苦果。
稍有差池,就隨便低頭認錯,一句對不起,以為這樣就可以完事。

By 渡久地東亞

One Out 可是一套既特別又有趣的漫畫,渡久地東亞地是特別的人物,
作者是甲斐谷忍,同時也是Liar Game的作者。

2009年8月15日星期六

緩步跑

今天去了緩步跑,做了很久很久的熱身,拉筋。我己經跑得好慢好慢...係好L慢,但都係仲係要拐下拐下咁..雖然好過以前好多好多..但係都係會痛。
浪費晒我d錢同時間.都好唔返..唉

不過有得好L慢咁跑,總好過無L得跑!我同天講,你一起索性整跛我,或者再俾d病痛我,或者再玩我都好,但係你law唔走我條命,我條命係我既,而且又賤又硬,吹咩!

2009年8月14日星期五

container_of, offsetof

#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)

/**
* container_of - cast a member of a structure out to the containing structure
* @ptr: the pointer to the member.
* @type: the type of the container struct this is embedded in.
* @member: the name of the member within the struct.
*
*/
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})

This marco is very useful, it will find a pointer pointing to the containner address.
I just use it for a long time, but don't know how it works, today I am going to check it out.

The first line find a pointer __mptr pointer to the member,
second line use __mptr to substract the offset the member's offset in the container.

I like the following trick,
((TYPE *)0)->MEMBER
Cast a '0' to the containter structure pointer,
->MEMBER , will give the offset accordingly.

The marco are inside kernel.h and stddef.h

2009年8月10日星期一

setup my basic ubuntu

download latest ubuntu ISO image
$sudo passwd root
#apt-get install samba
edit /etc/samba/smb.conf
#smbpasswd -a
#apt-get install nfs-common
#apt-get install nfs-kernel-server
add /mnt/iso *(ro,sync) to /etc/exports
#apt-get install subversion
#apt-set install ssh
#apt-get install build-essential
#apt-get install libncurses5-dev
#apt-get install tofrodos
#apt-get install xinetd tftpd tftp


/etc/xinetd.d/tftp

service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}

2009年8月5日星期三

color the shell

Put this in the home directory ~/.bashrc

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
[ -e "$HOME/.dircolors" ] && DIR_COLORS="$HOME/.dircolors"
[ -e "$DIR_COLORS" ] || DIR_COLORS=""
eval "`dircolors -b $DIR_COLORS`"
alias ls='ls --color=auto'
fi



Create a file .dircolors to include the following, where I have to set
DIR 07;31;47, which means, reverse, background color is red, text color is white.
Then it is easy to differenate a directory or normal file.



# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.

# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.

# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM linux-c
TERM mach-color
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM dtterm
TERM xterm
TERM xterm-color
TERM xterm-debian
TERM rxvt
TERM screen
TERM screen-w
TERM vt100
TERM Eterm

# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 07;31;47 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file

# This is for files with execute permission:
EXEC 01;32

# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')

# If you use DOS-style suffixes, you may want to uncomment the following:
#.cmd 01;32 # executables (bright green)
#.exe 01;32
#.com 01;32
#.btm 01;32
#.bat 01;32

.tar 01;31 # archives or compressed (bright red)
.tgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.zip 01;31
.z 01;31
.Z 01;31
.gz 01;31
.bz2 01;31
.deb 01;31
.rpm 01;31
.jar 01;31

# image formats
.jpg 01;35
.jpeg 01;35
.gif 01;35
.bmp 01;35
.pbm 01;35
.pgm 01;35
.ppm 01;35
.tga 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35
.tiff 01;35
.png 01;35
.mpg 01;35
.mpeg 01;35
.avi 01;35
.fli 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35

# audio formats
.ogg 01;35
.mp3 01;35
.wav 01;35

2009年8月3日星期一

壽仔派息3

8月3日收到2628股息接近五千元,好慘呀!我上年..估2萬=_=!真係笑死人
無計啦..派息由0.42跌去0.23..我真係估唔到!
而且我明明股數多左一倍,但係上年差唔多五千今年又係得五千>_<
下年千祈唔好又係得五千呀>_<
如果股息係咁得五千又五千,五千又五千,幾時先五萬呀?

0.05->0.14->0.42->0.23
下年要多返d派息呀!=____________________________=

2009年8月1日星期六

VIM , ctags and supertab

唔知大家用咩editor去寫programme,ultraedit?source insight?呢d都係要俾錢,雖然有得crack,但係唔好用,唔夠快!小弟數年前有人介紹vim我用,個位人兄就係mike少,唔知佢仲有無用或者仲係未好懶咁用呢..哈哈.....我都懶用嫁,只不過好既plugin就一定要用!咁0岩轉工都要執下,順便係度介紹下啦!

plugin:
bufexplorer.vim
getscriptPlugin.vim
gzip.vim
matchparen.vim
minibufexpl.vim
netrwPlugin.vim
rrhelper.vim
ShowFunc.vim
spellfile.vim
supertab.vim
taglist.vim
tarPlugin.vim
themes.vim
tohtml.vim
vimballPlugin.vim
zipPlugin.vim


當中taglist.vim 同supertab.vim 好用到不得了。

taglist.vim 跟ctags 一起用,裝好ctags,
$ ctags -R ./
把cursor移到variable,function,marco name,按下
'ctrl'+']'
就會跳去declartion
'ctrl'+'t'
就會返回。

supertab.vim
只要按一下'tab',就會自動幫你完成長長的variable/function/marco name.....
就好似係shell 按'tab'完成file名 一樣..真係好正呀!@0@

常用command
:Tlist
:set fileformat=unix
:WMToggle
ctrl+w s

最喜愛的color scheme
metacosm.vim


小弟的_vimrc
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\ let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
colorscheme MetaCosm

let g:Tlist_Auto_Open = 1
let g:showfuncctagsbin = 'E:\work\Ctags.exe'