Posts

Showing posts from October, 2010

Another chinese input methods in MacPorts

除了內建的和 Yahoo 輸入法之外,在 MacPorts 裡也找到其它可用的選項。 dhcp-22007:~ shawn$ port search "Chinese input method" gcin @1.2.1 (x11) a Chinese input method server. openvanilla @0.7.2 (aqua, textproc) package of popular Chinese input methods Found 2 ports. Wow, gcin 也放進來了! Great job!

MacPorts update & upgrade

To update MacPorts $ sudo ports selfupdate To upgrade outdated installed applications $ sudo ports upgrade outdated

My settings for X on ArchLinux

[shawn@arch2k5 ~]$ cat .xprofile #export LANG=zh_TW.utf8 export LC_CTYPE=zh_TW.utf8 export LANGUAGE=zh_TW.utf8 export GTK_IM_MODULE=ibus export XMODIFIERS=@im=ibus export QT_IM_MODULE=ibus ibus-daemon -d nm-applet & gnome-power-manager &

?? operator

x=1; string NumberIs = (x==1)?"One":"Not Known"; Above code checks if X is queal to One then return "One" to NumberIs variable else return "Not Known" There is another operator ?? which specifically checks for null DataRow dr = myRow ?? DataRow.EmptyRow This is same as: If (myRow == null) dr = myRow else dr = Datarow.EmptyRow ?? checks for left side is null or not. If it is null then it returns right part.