tag:blogger.com,1999:blog-354392922024-03-06T09:28:20.402+08:00Small WorkshopThis is a repository that is used to store some techniques and a number of tricks of programming.Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-35439292.post-84314444104378833662010-04-01T22:16:00.003+08:002010-04-01T22:46:17.641+08:00ZTL is ready!What is ZTL?It is a Zul Testing Language, which is used to test ZK based on Selenium automatically.Why is it coming?Because we want to solve the issue that the UUID of each component inside ZK changes every time. It is hard for application developer to test with ZK, even if ourselves. So we provide a way to naming bind the ZK component's ID to the code of Selenium(i.e. Junit), and the testing Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com1tag:blogger.com,1999:blog-35439292.post-80680180610916484412009-12-26T13:47:00.001+08:002009-12-26T13:49:16.161+08:00Release ZK Jet 0.8 for Google ChromePlease take a look at ZK Jet for Google Chrome.Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-73442207808748253312009-05-14T21:20:00.004+08:002009-05-14T21:27:22.341+08:00ZK Jet 1.0.0 ReleasedToday, I released the ZK Jet 1.0.0 version, which includes several features as follows.1. Open a zul file2. Support ZK Palette3. Support ZK Script called Zscript4. Code formatting5. Service URL historyHere is a demo.Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-53772527893864007202009-05-08T22:51:00.003+08:002009-05-08T23:06:26.843+08:00The cover people of IThomeLast week, I again interviewed with IThome to talk about why I changed my original career. The process was too big change of my life, because in the past I couldn't do anything with computer, but right now I was being web developer with ZK framework.Here is the complete content (Chinese only)Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-63231923899269941582009-04-18T23:05:00.003+08:002009-04-18T23:14:49.095+08:00Interview by IThome periodical talking about what's different in IE 8Last week, I had interviewed by IThome periodical talking about what's different in IE 8.Here is the complete content (Chinese only)Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-3515885526081000212008-05-07T22:02:00.004+08:002008-05-07T22:31:54.705+08:00A Tricky Level of HTML TagThis illustration is a level of HTML tag when you wanna manipulate them between each other to show the correct layout. Especially in IE6, when you develop a drag-drop Javascript code, you should find that the overlapped Div is placed under the Select tag (a drop-down list), even using the z-index CSS. Fortunately, the issue is only caused by IE6, and a solution is appeared that the Iframe tag isJumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-31558167487690099962008-03-08T21:13:00.003+08:002008-03-08T22:11:35.281+08:00ZK 3.0.4 ComeWhat's important in this version?If you have used the ZK 3.0.x version, you might find that the performance of Grid/Listbox/Tree with a large data(like many rows) is a sort of unacceptable, which ZK client engine needs to calculate the width of each cell. Especially in FF, even if ZK client engine just assigns a normal size to the TD tag of a single row in a big Dom tree(like table), the Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-17536373070408195732007-03-25T00:20:00.001+08:002009-05-14T21:28:59.335+08:00ZK-SimplyAjax跟我的機緣去年的Java2後,有聽同事分享到zk的Ajax Framework,不過我倒是沒去聽內容(太忙了)。不過等到今年初的新案子需要用到完整的Ajax Framework來輔助我們這個案子的前端架構,又讓我思考了zk的可用性(因有比較過),不知不覺也準備加入這個zk project team,說來說去不知道是不是真的有緣。現在zk也算是OOS(OpenSourceSoftware)裡很活躍的Porject,因為每天都有人去post問題,當然這Project的管理人也是很熱心的每天幫忙大家回答問題。Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-1167407857664095572006-12-29T23:57:00.000+08:002008-02-03T00:47:34.388+08:00Aecgi framework如何念呢? Ah-see-gee 念快一點,官網說的。這框架主要提供權限的驗證,感覺好像很不錯,滿完整的還支援Spring的功能。ps:正還在摸索中,改天在描寫詳情。Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-1167407733925910142006-12-29T23:51:00.000+08:002008-02-03T00:48:11.073+08:00什麼是Jcaptcha ?這是一種Java 實作的Open source,主要提供圖型驗證碼的功能。官網:Jcaptcha改天在去了解,先記下來!Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-1161789896134692502006-10-25T23:18:00.000+08:002008-02-03T00:52:12.982+08:00如何清除Javascript Array物件的方法原來,javascript可能取不到prototype的this物件,因此在實作Array.prototype時,只能用this.length = 0;來改變原本物件的index,目前只能用這樣來解決。Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-1161741829686948692006-10-25T09:58:00.000+08:002008-02-03T00:52:27.800+08:00Javascript 跟 ASCII 轉換// javascript 的charCodeAt 是取得字串的ASCII編碼String.charCodeAt();//num 為十進位的ASCII編碼,此formCharCode將取得對應ASCII的字串String.fromCharCode(num);Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-1161101513384545732006-10-17T23:51:00.000+08:002008-02-03T00:52:44.556+08:00如何計算JavaScript字元的長度當內容有中文時,字體的寬度會佔顯示的二個位元。String.prototype.getLength = function() {// 先找出佔二位元的字體(例如:中文)var zh = this.match(/[^\x00-\xff]/ig);// this.length + match到的字元個數(意思就是中文字會算二次) return this.length + (zh == null ? 0 : zh.length);}使用的方式:function test(){var src = "1234五";alert(src.getLength());}結果會出現 : 6Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-1161081532813824482006-10-17T18:38:00.000+08:002008-02-03T00:52:57.548+08:00如何取得游標的位置?Mozillar取得的方式:object.selectionStart;object.selectionEnd;IE取得的方式:// object就是textarea的物件 this.object.focus(); var range = document.selection.createRange(); var stored_range = range.duplicate(); stored_range.moveToElementText(this.object); stored_range.setEndPoint('EndToEnd', range); // 此selectionStart就是游標的起點 this.object.selectionStart = stored_range.text.length - range.text.length; Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-1160801348561382642006-10-14T12:43:00.000+08:002008-02-03T00:53:11.253+08:00如何取得javascript Textarea 反白的字元取得所選取的文字var range = document.selection.createRange();複製var temp=range.duplicate();設定選取的長度為:4range.moveStart('character',4);設定結束點的位置,從temp的字元開始range.setEndPoint("StartToStart",temp);將所設定的字元長度選取反白range.select();Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-1159971115424936952006-10-04T21:32:00.000+08:002008-02-03T00:53:42.829+08:00Signed Applet key toolJAVA SECURITY 中的 KEYTOOL執行方式: 用命令提示列直接下keytool的指令key的產生過程如下:產生key指令 keytool -genkey (預設key名為mykey) keytool -genkey -alias [名稱] (指定key的名稱)察看key keytool -list匯出key keytool -export -alias [key名稱] -file [檔名.crt]在jar檔簽個章 jarsigner [檔名.jar] [key名稱] jarsigner -verbose -verify [檔名.jar ] [key名稱] (檢示detail) Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-1159923406622432322006-10-04T08:39:00.000+08:002008-02-03T00:54:16.910+08:00BT 下載時造成 IE 、MSN都不能連線作業系統為:Windows XP Service Pack 2問題:Windows 為了防止 Worms 的攻擊,將 TCP/IP 連線數預設為10,BT下載時的連線數預設也是10 ,所以網路連線數已滿,因此IE、MSN要透過網路來連線時已經沒有可用的連線數。解決方式:下載http://www.lvllord.de/?lang=en&url=downloads EvID4226Patch223d-en.zip,此 patch 執行檔可修改windows的連線數限制,執行軟體便會出現幫你更改電腦的 TCP/IP 連線數為 50的畫面,只要按下『Y』即可,TCP/IP 連線數便會更改成 50 了,重新開機一次,執行BT下載軟體,在開IE、MSN做測試,此時,連線問題應該解決了。加強版: 若50個TCP/IP 連線數還不夠,這個軟體還有個進階功能,但需要到命令提示字元下去執行該軟體,Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0tag:blogger.com,1999:blog-35439292.post-1159887343072411622006-10-03T22:51:00.000+08:002008-02-03T00:54:34.555+08:00第一次用Google Blogger就出現IE小bug在blogger的檢視Blog裡,居然是白畫面,但經過FireFox使用並沒有任何問題。原因出在:範本--> <$BlogMetaData$>只要把 <$BlogMetaData$> 放到 <table><$BlogPageTitle> </table>的前面,就可以解決IE檢視的問題了。問題就是編碼,Blogger都是用utf-8來編碼,但是中文的title會造成它編碼後認定網頁的編碼不符合,而造成白畫面。Jumper Chenhttp://www.blogger.com/profile/12118542939668699138noreply@blogger.com0