2009年5月23日

Ubuntu 8.10 + eclipse 3.4.1 + subclipse 問題

在 Ubuntu 8.10 上裝好 eclipse 3.4.1 後,接著安裝 subclipse 套件,第一次連 SVN 時一直出現 Unable to load default SVN Client 的錯誤,在 Fedora 8 並沒有這樣的問題,查了一下安裝時要注意 2 個步驟:

1. 必須利用 ubuntu 的套件管理程式安裝 libsvn-java 這個套件
2. 在 eclipse.ini 要加一行設定 -Djava.library.path=/usr/lib/jni

轉錄自 Ubuntu 8.10 + eclipse 3.4.1 + subclipse 問題

2009年4月12日

/etc/ppp/options 的一些重要 options

sudo vim /etc/ppp/options

lcp-echo-failure次數被設為4,而lcp-echo-interval設為30秒。

可以提高 lcp-echo-failure 防止經常斷線。

2009年3月28日

設定 dvorak

Linux 上的配置

1.設定

$setxkbmap dvorak

2.回復

$setxkbmap us

最好設 alias

alias aaaaa='setxkbmap us'

這樣就可以馬上回復回原來的鍵盤設定。

3.練習
sudo apt-get install dvorak7min

Windows 上的配置

要強制嘸蝦米採用 Dvorak 的話或可參考此法:
利用 regedit.exe 來修改登錄檔,先找到 HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Keyboard Layouts,再找到嘸蝦米的項目,你應該會發現有一個名為 Layout File 的字串,它的值是「KBDUS.DLL」,把它改成「kbddv.dll」

[Ubunwux31] 使用 LXDE 設定自動啟動 network manager

如何設定自動啟動 network manager

sudo leafpad /etc/xdg/lxsession/LXDE/autostart

加上 nm-applet --sm-disable


安裝 Ubuntu Base + LXDE 指南 (特別適合低階硬體)

2009年3月26日

[Ubunwu]gcin使用無蝦米輸入法

無蝦米安裝程序:
1. 於/etc/apt/sources.lst 加入這行
deb http://www.calno.com unstable main
2. sudo apt-get update;sudo apt-get install gcin (安裝gcin)
3. sudo im-switch -s gcin (下次登入即可使用gcin)
4. wget http://edt1023.sayya.org/misc/noseeing-6.tar.gz (下載無蝦米表格檔)
5. tar zxvf noseeing-6.tar.gz
6. sudo cp noseeing.gtab /usr/share/gcin/table/
7. (system restart)

參考:
【Ubuntu】gcin使用無蝦米輸入法

2009年3月17日

[Ubunwux31]讓 evince 能看中文

原本以為 ubuntu 8.10 只要 sudo apt-get insatll poppler-data 即可。

還有手動安裝。參考

可是試驗結果都不行,只好安裝 xpdf ,用他看中文文件。
原文電子書還是用 evince ,因為它有記憶你看到哪一頁的功能。

2009年3月6日

[Ubunwu007]linux flash 中文亂碼問題

安裝了flash播放器,播放正常,但中文全是亂碼,解決方法如下:

打開配置文件:
cd /etc/fonts/conf.d/
sudo vim 49-sansserif.conf

修改edit節點,將sans-serif
改為 sans

文章節錄自 linux flash 中文亂碼 的解決

2009年3月5日

[Ubunwu006] LiHei Pro

sudo fc-cache -v -f

參考:

Ubuntu 更換 LiHei Pro 儷黑Pro 字型 (超詳細教學)

[Ubunwu005]螢幕解析度

Section "Monitor"
Identifier "Configured Monitor"
Vendorname "Dell"
Modelname "Dell E196FP"
Horizsync 31.0-83.0
Vertrefresh 56.0-76.0
modeline "640x480@60" 25.2 640 656 752 800 480 490 492 525 -vsync -hsync
modeline "640x480@72" 31.5 640 664 704 832 480 489 491 520 -vsync -hsync
modeline "640x480@75" 31.5 640 656 720 840 480 481 484 500 -vsync -hsync
modeline "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
modeline "800x600@72" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync
modeline "800x600@75" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
modeline "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
modeline "832x624@75" 57.284 832 864 928 1152 624 625 628 667 -vsync -hsync
modeline "1024x768@75" 78.8 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
modeline "1024x768@70" 75.0 1024 1048 1184 1328 768 771 777 806 -vsync -hsync
modeline "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -vsync -hsync
modeline "1152x864@75" 108.0 1152 1216 1344 1600 864 865 868 900 +hsync +vsync
modeline "1280x1024@75" 135.0 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
modeline "1280x960@60" 102.1 1280 1360 1496 1712 960 961 964 994 -hsync +vsync
modeline "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
modeline "1280x960@75" 129.86 1280 1368 1504 1728 960 961 964 1002 -hsync +vsync
modeline "1400x1050@60" 122.61 1400 1488 1640 1880 1050 1051 1054 1087 -hsync +vsync
modeline "1400x1050@75" 155.85 1400 1496 1648 1896 1050 1051 1054 1096 -hsync +vsync
modeline "1600x1200@65" 175.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
modeline "1600x1200@60" 162.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
modeline "1792x1344@60" 204.8 1792 1920 2120 2448 1344 1345 1348 1394 -hsync +vsync
Gamma 1.0
EndSection
#
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
Defaultdepth 24
SubSection "Display"
Depth 24
Virtual 1792 1344
Modes "1280x1024@60" "1280x960@75" "1280x960@60" "1400x1050@60" "1280x1024@75" "1400x1050@75" "1152x864@75" "1600x1200@65" "1024x768@60" "1600x1200@60" "1024x768@70" "1792x1344@60" "1024x768@75" "832x624@75" "800x600@60" "800x600@75" "800x600@72" "800x600@56" "640x480@75" "640x480@72" "640x480@60"
EndSubSection
EndSection

2009年2月26日

[Ubunwu004]安裝 Subversion

如果要用 url ,記得要裝 libapache2-svn 套件

Ubuntu - 安裝 SVN (Subversion Server)

Subversion - Ubuntu documentation

[Ubunwu003] 安裝 Web server

無庸說就是 Apache 。

參考:
Install Apache Web Server on Ubuntu
ubuntu 8.04.1 設定 apache2 網頁根目錄

[Ubunwu002] 安裝 SSH

安裝 SSH server ,是為了可以遠端簽入管理。

作法很簡單,直接 apt-get install OpenSSH Server 即可。

參考:
Ubuntu Linux OpenSSH Server installation and configuration

[Ubunwu001]Ubunwu 誕生

我一直都沒有一台屬於自己的 server,因為一直沒有那個需求。也就懶得去架設,因為我想要的一些日常服務,Google 相關的服務都可以滿足我。

但是工作時發現需要有些 server 管理經驗,如果沒有實際去架設管理過,是學不到這方面的知識。臨時需要作些什麼處理時,很容易因為經驗的不足,而會不知道要怎麼下手。

而我又是學資訊的,不去瞭解,不去學習,不去體驗這些好像又說不過去。所以今天我就從我的桌機切一塊空間出來,灌了 Ubuntu 8.10 Desktop。準備架設一些 server 好好研究,像是 subversion, web server, mail server,等等都有計畫要架設。

沒有什麼目標,也沒有什麼確切的時間表要達架設好什麼 server,反正可以遠端控制,隨時可以上線修改,就讓它慢慢演化吧。

2009年1月9日

FlexTable 的 clear method

GWT 中的 GridFlexTable 都繼承自 HTMLTable,也就是相對於 HTML 中的 table 標籤。

其中 HTMLTable 有個 clear() method, 使用時要小心。看一下 GWT Javadoc 解釋:

Removes all widgets from this table, but does not remove other HTML or text contents of cells.

意思是說,clear method 只清掉所加入的 widget 而已。所以如果你有為它加 CSS style,比如畫出 td 標籤的邊框。假設原本有 3 筆資料的 table ,clear 後,再加入 1 筆的資料。table 的呈現還是有 3 筆,但下面 2 筆資料都是空白的。

就像這樣



所以原本這樣的寫法

table.clear()

改用 removeRow 土法煉鋼。


while (table.getRowCount() > 0) {
table.removeRow(0);
}