發表文章

目前顯示的是 9月, 2006的文章
這一生花很多時間在羨慕別人有我所沒有的東西,害怕別人不好的狀態會落在我身上。 但是你知道生命就是如此,我知道我最重視的是平靜,心靈上的平靜安穩比任何東西價值更高,不是嗎? 阿們
待辦事項的作法 high 一週內辦完 med 幾週內 low 二個月內 待辦事項不寫超過七個
要讀完的好書 "The anatomy of programming languages" by ALICE E. FISCHER, FRNCES S. GRODZINSKY 把程語的結構描述的真的仔細
外界事物 -> 程式語言物件 ->電腦物理及記憶體表示 抽象化的三個層次 --KR 與 Process and Entity 知識庫 -> 推理機 <- 外部事物 -> 計算結果

論認知經濟性(Cognitive Economy)

目前的關連式資料庫是以資料來描述概念,也就是列舉概念的全部形式,而非以少數公理及邏輯法則來描述概念,所以當要用極少數的字符去描述許多個案,會出現困難,語意網提供一個更好的表達系統,在描述某些概念(如 law )可以用較少的字符去描述,但在解譯上則需要較多的運算。由上,當特例較多時,若想要資料傳輸(溝通、交換)量,則用後者去描述資料,而讓主機用較多的運算。 目前的關連式資料庫是以資料來描述概念,也就是 列舉概念的全部形式,而非以少數公理及邏輯法則來描述概念,所以當要用極少數的字符去描述許多個案,會出現困難,語意網提供一個更好的表達系統,在描述某 些概念(如 law )可以用較少的字符去描述,但在解譯上則需要較多的運算。 由上,當特例較多時,若想要資料傳輸(溝通、交換)量,則用後者去描述資料,而讓主機用較多的運算。 以用藥資訊系統為例 資料持久化(可存到硬碟)有兩種,一種為文件,一種為資料庫 ps.從我的 Xuite blog 轉來的

Rake: the way to configure specially task options.

The ANT experience make me naturally think that rake should suppot the following syntax to configure the options of an specially predifined task. task :javac do |opt| opt.classpath = 'build/classes' opt.target='1.4' end Isn't it?

代數結構:環

為了研究 CRC 錯誤偵測法,我猜想代數結構環,應可用來解釋其成因: 環公理 環是一序對 r= ,其中 R 是一組元素的集合,+ 及 * 是作用在 R 上的二元運算,且滿足以下的條件: 為交換群,令 0 表單元,並滿足以下公理: (a+b)+c=a+(b+c) 0+a=a+0=a a+b=b+a 對所有的 a 屬於 R,存在一元素 -a 屬於 R,使得 a+(-a)=0 為單子(monoid),令 1 表單元,並滿足以下公理: (a*b)*c=a*(b*c) 1*a=a*1=a 序對 <{R-{0}}, *>,記作 R* * 可分配於各個 + 上 a*(b+c)=(a*b)+(a*c) (a+b)*c=(a*c)+(b*c) 交換環 環的 * 不一定要滿足交換律,若所有元素滿足 a*b=b*a,R稱為交換環 單位 a 不一定要有 * 的反元,若 a 有 * 的反元 a' 稱 a 為單位,滿足 a*a'=1 R 所有 單位 形成一個在 * 上的群,此群記作 U(R)=

系統開發的格言

什麼都不用說,先把使用者介面作出來再說

ANT 的 depnedent 工具

ANT 對 file operation 有一項很不錯的功能, 若 file 的 directory 不存在, 就自動建立,若 file uptodate? 則不動作。 copy

字串處理的程式片段集合

以下是一堆字串處理的程式片段集合 #日期相關的 *2008/01/01 -> 20080101 Java: String.replaceAll("/", "');

Ruby Rake: Task[:javac]

I write a :javac task for rake. PLEASE try it. The file structure is like ANT, the complied classe will be stored under build/classes. USAGE : 1.copy the following source into java.rb 2.put "require 'path/to/java.rb'" into your rakefile.rb 3.type "rake javac" then this will complie all java file under the rake base dir, and copy all classes into 'build/classes' SOURCE :java.rb #!/usr/bin/env ruby # The 'rake/java.rb' file defines the [:javac] task and its helper # file. # # [:javac] complie all .java file in the working directory into # CLASSDIR(defaults is "build/classes") # # version 0.1 # fhope@2006/9/3 03:01:35pm require 'rake' require 'rake/clean.rb' def java_package_of(javafile) file=File.new(javafile) file.each do |line| return line.sub(/package /,'').sub(/;/,'').sub(/\s/,'') if line =~ /^package/ end return '' # empty string mean no package end def java_p