星期三, 3月 11, 2009

判斷,診斷

diagnose  [di·ag·nose || 'daɪəgnəʊz]


v. 診斷

What more will you want to know to diagnose this problem?

要弄清這個問題,你還需要知道些什麼?
http://www.cartoonstock.com/newscartoons/cartoonists/rma/lowres/rman5170l.jpg

 

 

 

 


judge  [dʒʌdʒ]


n. 法官, 推事, 審判官


v. 審理; 判斷; 鑒定; 下判斷; 作評價

當表示由……來判斷的時候,要用Judging from的形式作狀語。

It is only shallow people who judge by appearances.

只有淺薄的人才會以貌取人。

 


consider  [con·sid·er || kən'sɪdə]


v. 考慮; 認為; 照顧; 考慮, 細想


 

A thorough analysis would consider both the demand and supply side approaches.

徹底的分析應當同時考慮需求和供給兩方面的方法。

 

analyze  ['ænəlaiz]


A good accountant can analyze an unprofitable operation quickly.

align="middle" quality="high" bgcolor="#FFFEF2" name="FlashVars"
allowScriptAccess="sameDomain"
FlashVars="word=http://www.jukuu.com/sent/83/57/107008357-e"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" play="false"
/>

一名優秀的會計師能迅速分析出虧損的環節。

align="middle" quality="high" bgcolor="#FFFEF2" name="FlashVars"
allowScriptAccess="sameDomain"
FlashVars="word=http://www.jukuu.com/sent/83/57/107008357-c"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" play="false"
/>

 


interpret  [in·ter·pret || ɪn'tɜrprɪt /-'tɜːp-]


v. 解釋, 詮釋, 說明; 口譯, 翻譯; 理解; 演奏, 演; 作解釋; 作口譯, 當翻譯


We have to interpret his words in a modern light.

我們必須以現代的觀點來解釋他的話。


I interpret his answer as a refusal.

我把他的回答理解為拒絕。

 

 


deduce  [de·duce || dɪ'djuːs]


v. 推論; 演繹出


From the presence of so many people at the party, we can deduce that it is a welcomed one.

從參加聚會的人數之多我們可以看出,這次聚會是受人歡迎的。


What do you deduce from these facts?

從這些事實你能推斷出什麼?


On the basis of the evidence we deduced that he was guilty.

根據這些證據,我們推論他是有罪的。

 


inference  [in·fer·ence || 'ɪnfərəns]


n. 推論


He hasn't written to us for ages, and my inference is that his eyesight must have gotten worse.

他許久沒來信了,我想他的視力一定變得更糟了。


This inference is warranted by the facts.

這一假設得到事實的證明。

 


illation  


n. 推理; 演繹; 推論

星期一, 3月 09, 2009

locate

Locate


Linux 要快速找到檔案在哪, 除了 find 外, 另一個選擇就是 locate.


find是在硬碟中直接查詢,如果已知檔案在特定目錄時使用會比較好。


若都不知道時可考慮使用locate。它是直接查詢linux 內db 的index 速度較快,不過較新的檔案可能會找不到,這時就由root 可以使用updatedb 來更新檔案index資料.

預設該檔案是放在 /var/lib/mlocate/mlocate.db
 locate [OPTION...] PATTERN...

常用的參數有


-i --ignore-case
-c --count
-r --regexp 


    例如我要用正規化查te[某個符合]t.txt的檔案在那裡。

    [root@localhost etc]# locate -r te[sabcde]t.txt
    /home/webadm/test.txt


星期二, 3月 03, 2009

安裝新版本Java至CentOS5.2



CentOS 5.2中已有內建JDK1.4.2的版本了。

若是直接從
sun下載新版的RPM安裝後,執行起來還是JDK1.4

這時候可以考慮使用alternatives 指令。

它必需是
su - 的方式才可執行。



加入一個新的
java link

alternatives --install /sur/bin/java java /usr/java/jdk1.6.0_12/bin/java 2

config

alternatives --config java



有 2 程式提供 'java'。



選擇 指令

-----------------------------------------------

* 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java

+ 2 /usr/java/jdk1.6.0_12/bin/java



就選擇
2就可以使用新的java

星期一, 3月 02, 2009

用Ant包特定package

一般在用Ant 包jar 檔時可能只要包某package 下的classes,這個時候可以使用include 及exclude 欄位參數


一般爬文通常看到的是./xxx/xxx/*.class 針對檔案類型。若是只要特定package下(或目錄)的所有classes時,就使用include


例如pakcage 的路徑是


bin/


   com.atvoa.


   JavaMapper.com.mapforce


   Utility


   WorkFlow


   Action


但只有JavaMapper.com.mapforce內的所有package及classes才要包成jar時,請在include 最前面的路徑加上**/


include name="**/JavaMapper/com/mapforce/**"/>  


 


 


    <target name="package"  depends="setProperties" description="package all class files">


        <jar jarfile="${jar.file}" manifest="./META-INF/MANIFEST.MF">


        <fileset dir="${classes.dir}">       


        <include name="**/JavaMapper/com/mapforce/**"/>       


          fileset>       


        jar>


       


    target>


這樣的jar 就會有完整的路徑,而只包特定的package 下的classes..