跳到主要內容

發表文章

目前顯示的是 12月, 2007的文章

目前 正著手進行 gtalk 相關計畫

目前正在進行gtalk 的機器人實作,我想把google的(英翻中)翻譯做在gtalk 上,這當然不是什麼新鮮的事,而且目前google 已經釋出相關的功能,不過;獨缺英文->繁體中文,沒錯! 我就是想做世界第一個英翻中(繁體)的機器人,事實上我只是想展示公司在xmpp 上的應用能夠做到什麼程度,如果我們撇開rfid middle 的xmpp server應用,這應該是我第一次在gtalk 上做相關應用 目前;已經突破gtalk 使用TLS 的認證部份,整個工作大概完成了40%,希望能夠在這個星期前釋出第一個版本

Concurrent Programming II

1.Concurrency is easy…? ( http://armstrongonsoftware.blogspot.com/2006/08/concurrency-is-easy.html ) 2.Sequential Programming -module(factorial). -export([factoriala/1, factorialb/1, factorialc/1, factoriald/1]). %Simplest: factoriala(0) -> 1; factoriala(N) -> N * factoriala(N - 1). %Using function guards: factorialb(0) -> 1; factorialb(N) when N > 0 -> N * factorialb(N - 1). %Using if: factorialc(N) -> if N == 0 -> 1; N > 0 -> N * factorialc(N - 1) end. %Using case: factoriald(N) -> case N of 0 -> 1; N when N > 0 -> N * factoriald(N - 1) end. -module(set). -export([new/0, add_element/2, del_element/2,is_element/2, is_empty/1, union/2, intersection/2]). new() -> []. is_element(H, [H|_]) -> true; is_element(H, [_|Set]) -> is_element(H, Set); is_element(_, []) -> false. is_empty([]) -> true; is_empty(_) -> false add_element(X, Set) -> case is_element(X, Set) o

[微程式-技術研討會] 12月份研討會 主講人 ZNUL [XMPP RFC3920 10-~15章]

Xmpp Rfc3920 10-~15章 研討會報告 10. 伺服器處理XML節的規則 (Server Rules for Handling XML Stanzas) 相容的伺服器實做必須(MUST)確保兩個實體之間的XML節按次序處理. 除了按次序處理的需求之外, 每個伺服器實作將包含它自己的遞送樹"delivery tree"以處理它接收到的節.這個樹決定一個節是否需要路由到其他域, 在內部處理, 還是遞送到和一個已連接的節點相關的資源. 以下規則適用: ________________________________________ 10.1. 沒有'to'地址 (No 'to' Address) 如果這個節沒有'to'屬性, 伺服器應該(SHOULD)為發送它的實體處理這個節. 因為所有從其他伺服器收到的節必須(MUST)擁有'to'屬性, 這個規則僅適用於從一個連接到這台伺服器的已註冊實體(如一個用戶端)收到的節,如果這個伺服器收到一個沒有'to'屬性的出席資訊節, 伺服器應該(SHOULD)向那些訂閱了這個發送實體的出席資訊的所有實體廣播它, 如果可能的話(即時消息和出席資訊應用程式中出席資訊廣播的語義定義在XMPP-IM). 如果伺服器接收到一個IQ類型為 "get" 或 "set" 且沒有'to'屬性的節並且它理解這個節的名字空間下的內容, 它必須(MUST)為這個發送實體處理節(在這裏"處理"的含義是由相關的名字空間的語義所決定的)或返回一個錯誤給發送實體. #c to s 可以不用有 to 屬性 ,因為c to s 預設的 to 即是 server #若是出席訊息<presence>沒有to屬性,即為廣播給所有訂閱者,rfc3921第五章說明如下: (5.1.1初始化出席資訊 : 建立起一個會話之後, 一個用戶端應該(SHOULD)發送初始化出席資訊給伺服器來通知它的通信可用性.如這裏定義的, 初始化出席資訊節 (1) 必須(MUST) 不擁有'to'屬性(這表示它是由伺服器代替用戶端發送的廣播) 並且 (2) 必須(MUST) 不擁有'type&

Erlang/OTP R12B released

Major relese : otp_src_R12B-0 Build date : 2007-12-04 R12B-0 is a major new release of Erlang/OTP. You can download the full source distribution from http://www.erlang.org/download/otp_src_R12B-0.tar.gz http://www.erlang.org/download/otp_src_R12B-0.readme (this file) Note: To unpack the TAR archive you need a GNU TAR compatible program. For installation instructions please read the README that is part of the distribution. The Windows binary distribution can be downloaded from http://www.erlang.org/download/otp_win32_R12B-0.exe On-line documentation can be found at http://www.erlang.org/doc/ . You can also download the complete HTML documentation or the Unix manual files http://www.erlang.org/download/otp_doc_html_R12B-0.tar.gz http://www.erlang.org/download/otp_doc_man_R12B-0.tar.gz We also want to thank those that sent us patches, suggestions and bug reports,