Skip to main content

Home/ InfokeyDEV/ Contents contributed and discussions participated by Benx Shen

Contents contributed and discussions participated by Benx Shen

Benx Shen

jQuery Plugin - FlyDOM: Create DOM on the Fly - 0 views

  • FlyDOM aims to be an easy-to-use plugin for jQuery that makes generating dynamic content quick and easy.
Benx Shen

» Microsoft Screen Sharing Software Available As Free Download » InsideMicro... - 0 views

  •  
    微軟出的 Screen Sharing 工具!看起來蠻不錯的,還整合了 Window Live 的帳號!在 NAT 局網內只要防火牆沒有擋,那麼就可以像 MSN 一樣通暢無阻啦!
Benx Shen

Downloads - Yod'm 3D - 0 views

  •  
    可以 3D 立體翻轉的虛擬桌面軟體 Cool!~~~
Benx Shen

什麼鬼?竟然還可以有論壇!!! - 65 views

HelloWorld
started by Benx Shen on 22 May 07 no follow-up yet
  • Benx Shen
     
    玩玩看!還有討論主題可以使用!....
Benx Shen

用Diff和Patch工具維護源碼 - PHP俱樂部 - 0 views

  • diff以"行"為單位比較兩個文本文件(也可以是目錄比較),並將不同之處以某種格式輸出到標準輸出上;patch可以讀入這種輸出,並按照一定指令使源文件(目錄)按照目標文件(目錄)更新
  •  
    如何使用 diff 和 patch 工具程式呢?本篇文章有入門性的介紹喔!
Benx Shen

胡侃:面向对象思想的进化-FP-综合技术 -JavaEye做最棒的软件开发交流社区 - 0 views

  • 面向對象編程思想的提出已經不是幾年而是幾十年了,考查其思想的變化,一方面是對現有語言的一些評判,另一方面,也算是對前輩計算機科學家的緬懷。 ——題記 Kristen Nygaard在1962年發明的 Simula 語言現在被認同為世界上第一種明確實現面向對象編程中某些"必要"元素(比如 class)的語言。Simula 是從 Algol 發展來的,可以說,是一種增加了 class 這個數據類型的 Algol,並將參數傳遞的默認模式從"按名調用"換成了"按引用調用",還提出了根據類型確定初始化過程的方法。 從 Simula 的時代開始,科學家們在解決軟件複雜度方面的思路開始"異常開闊"——當然也有資深的老派牛人們不這麼認為。比方說 Peter Norvig,寫了Design Patterns in Dynamic Programming一書來反駁。他認為設計模式早已體現在以 Lisp 為首的一批語言中了,根本不需要什麼面向對象。但我還是跟從偶像 Alan Kay 的觀點。某些時候,把一種特定的編程風格做進語言裡也是必要的。
Benx Shen

Bertrand's weblog: When was this Java class compiled? - 0 views

  • When was this Java class compiled? Credits to Dmitry Beransky on the advanced-java@discuss.develop.com list. import java.util.Date; import java.io.IOException; public class When { public static void main(String args[]) throws IOException { Date d = new Date( When.class.getResource("When.class") .openConnection() .getLastModified() ); System.out.println("This class was compiled on " + d); } }
  •  
    如何知道類別被 compile 的時間呢?... check it out!
Benx Shen

Groovy - User Guide - 0 views

Benx Shen

Groovy - Regular Expressions - 0 views

  • Groovy supports regular expressions natively using the ~"pattern" expression
    • Benx Shen
       
      Groovy 對於 regexp 的支援有 3 個特殊的表示方式:
      ~"pattern" (create java.util.regex.Pattern)=~ (create java.util.regex.Matcher)==~ (do Matcher.matches() )
  • // lets create a regex Pattern def pattern = ~/foo/ assert pattern instanceof Pattern
  • Groovy also supports the =~ (create Matcher) and ==~ (matches regex) operators.
  • ...6 more annotations...
  • Since a Matcher coerces to a boolean by calling its find method, the =~ operator is consistent with the simple use of Perl's =~ operator, when it appears as a predicate (in 'if', 'while', etc.). The "stricter-looking" ==~ operator requires an exact match of the whole subject string.
  • def m = "foobarfoo" =~ /o(b.*r)f/ assert m[0][1] == "bar"
  • def matcher = "\$abc." =~ /\$(.*)\./ // no need to double-escape! assert "\\\$(.*)\\." == /\$(.*)\./ matcher.matches(); // must be invoked assert matcher.group(1) == "abc" // is one, not zero
  • // lets create a Matcher def matcher = "cheesecheese" =~ /cheese/ assert matcher instanceof Matcher answer = matcher.replaceAll("edam")
    • Benx Shen
       
      以下是一些 groovy regexp 的程式碼,請特別注意劃線的部份!
  • // fancier group demo matcher = "\$abc." =~ "\\\$(.*)\\." matcher.matches(); // must be invoked [Question: is this still true? Not in my experience with jsr-04.] assert matcher.group(1) == "abc" // is one, not zero
    • Benx Shen
       
      這裡需要特別注意的是,如果想要使用 matcher.group() 方法,那麼必須先執行 matcher.matches() 方法呼叫(我記得呼叫 find() 也行)。然而,如果是直接使用 groovy 的語法,那麼就可以直接使用 matcher[0][?] 的用法了!
Benx Shen

無類語言的OOP(JavaScript描述)-FP-綜合技術 -JavaEye做最棒的軟件開發交流社區 - 0 views

  • 本文以 JavaScript 語言為例,介紹了無類面向對象語言中實現各種面向對象概念的方法。
  • 無類語言的OOP(JavaScript描述)
Benx Shen

Initialization on demand holder idiom - Wikipedia, the free encyclopedia - 0 views

  • public class Something { private Something() { } private static class LazyHolder { private static final Something something = new Something(); } public static Something getInstance() { return LazyHolder.something; } }
    • Benx Shen
       
      Singleton pattern 終極解法!
  •  
    Java Singlton 模式的終極解決之道!
  •  
    對了會發現這篇文章,是因為 http://www.eclipsezone.com/eclipse/forums/t97263.rhtml 這裡討論在 eclipse 裡如何使用最簡單的步驟創建一個 singlton 類別設計。
Benx Shen

Groovy - Groovy Categories - 0 views

  • import groovy.xml.* def html = DOMBuilder.newInstance().html { head { title (class:'mytitle', 'Test') } body { p (class:'mystyle', 'This is a test.') } } use (groovy.xml.dom.DOMCategory.class) { assert html.head.title.text() == 'Test' assert html.body.p.text() == 'This is a test.' assert html.find{ it.tagName == 'body' }.tagName == 'body' assert html.getElementsByTagName('*').grep{ it.'@class' }.size() == 2 }
    • Benx Shen
       
      這裡是一個範例,可以看到透過 DOMCategory 的協助,xml dom 元素的存取直接可以用 "expression" 的方式就可以很方便地取用,而不需要很囉唆地 getElement() 或之類的
Benx Shen

Java object queries using JXPath - Java World - 0 views

  • Java object queries using JXPath Query complex Java object trees using the XPath expression language
Benx Shen

openjfx: openjfx: JavaFX編程語言 - 0 views

  • JavaFX Script™ (下文中成為JavaFX)語言是一種聲明式的靜態類型編程語言。它具有第一級函數(first-class functions)、聲明式的語法、列表推導(list-comprehensions)及基於依賴關係的增量式求值(incremental dependency-based evaluation)等特徵。JavaFX 腳本式語言特別適用於Java2D swing GUI組件,它允許簡單地創建圖形界面。 譯者註:第一級函數指函數被當作對象對待,可以在運行時賦值、傳遞和返回。詳見wikipedia上的解釋。 譯者註:列表推導指一種在函數語言中的表達式,它表示了在一個或者多個列表的成員(被選擇的)進行某種操作的結果。它被稱為"syntactic sugar",即為開發者提供了便捷的多種函數的應用組合。詳見FOLDC對list comprehension的解釋。 本文檔給出了JavaFX 腳本式編程語言的非正式描述。
Benx Shen

從分佈式系統的角度看REST-企業應用-Java -JavaEye做最棒的軟件開發交流社區 - 0 views

  • 從REST具備的內在特徵來說,它包括了這些特徵: 1、基於HTTP的資源 2、以HTTP協議去操作 3、數據和表象分離
« First ‹ Previous 201 - 220 of 236 Next ›
Showing 20 items per page