Skip to main content

Home/ Groups/ InfokeyDEV
涼鞋

Java Community discussing server side development - 0 views

  •  
    1337 fibonacci aggression...
Benx Shen

Javascript Closures - 0 views

  • Closure A "closure" is an expression (typically a function) that can have free variables together with an environment that binds those variables (that "closes" the expression).
  • Example 2: Associating Functions with Object Instance Methods
Benx Shen

Coding In Paradise: AJAX Tutorial: Saving Session Across Page Loads Without Cookies, On... - 0 views

  •  
    介紹如何透過瀏覽器的小技巧,在 AJAX 的系統環境中,可以在瀏覽器端記住一些狀態資料。... 答案是:隱藏欄位!
Benx Shen

Floatutorial: Float basics - 0 views

  • When you float an element it becomes a block box.
  • You should always set a width on floated items (except if applied directly to an image - which has implicit width). W3C's Cascading Style Sheets, level 2, CSS2 Specifications states: "A floated box must have an explicit width..." If no width is set, the results can be unpredictable.
Benx Shen

Luke - Lucene Index Toolbox - 0 views

  • Luke is a handy development and diagnostic tool, which accesses already existing Lucene indexes and allows you to display and modify their contents in several ways: browse by document number, or by term view documents / copy to clipboard retrieve a ranked list of most frequent terms execute a search, and browse the results analyze search results selectively delete documents from the index reconstruct the original document fields, edit them and re-insert to the index optimize indexes and much more...
  • ...2 more annotations...
  •  
    Luke 是一個 GUI 的 Lucene index 的瀏覽工具,很不錯!
Benx Shen

Preventing Java's java.lang.OutOfMemoryError: PermGen space failure | Eric's Agile Answers - 0 views

  • The "OutOfMemoryError: PermGen space" message is normally encountered during development activites where a long-running JVM is asked to load/unload builds.
  • The message is a symptom of an incomplete garbage collection sweep where resources are not properly released upon unload/restart. There is no shortage of debate (Hibernate forum, Sun forum, Spring Framework forum ) regarding which codebase is responsible for this symptom, but the finger of blame has been pointed at CGLIB, Hibernate, Tomcat, and even Sun's JVM.
  • In my experience, the most pain-free method of resolving this issue is to switch from Sun's JDK implementation to BEA's freely available JRockit implementation.
  • ...1 more annotation...
  • On a recent project utilizing Tomcat 5.5.12 with Hibernate, I was plagued with this PermGen error, at times even experiencing it during web-based unit testing. Since making the switch to JRockit, I have not encountered this issue even once.
  •  
    又是一位和我一樣都慘遭 "PermGen Space" 錯誤的開發者了!
    很奇怪,為何會發生這樣的錯誤呢?
    其中這篇文章所提到的技術,恰巧都是我現在所發生問題的架構,像是 Hibernate, Spring, Tomcat 等,還有 Sun JVM.... Orz
    比較特別的是,多數提供的解決方式,都是去調整 JVM 的設定(-XX:MaxPermSize=256m)。這位老兄則是採用了 BEA JRockit 版本的 JVM 解決此問題,他表示至少這招對他是管用的!
    不過,軟體開發很多時候都會發生這種「魔咒」,這種狀況底下,就好像一個並無可醫的人,只好嘗試各種偏方了!

Ching Yi Chan

When Runtime.exec() won't - Java World - 0 views

  •  
    使用 java 執行外部程式的注意事項
Ching Yi Chan

Pastie - 0 views

shared by Ching Yi Chan on 22 Oct 07 - Cached
  •  
    貼程式碼的好工具, 中文沒問題。程式碼保存時間也不短,至少還看得到 2006 的 code
kooala lo

Storing Hierarchical Data in a Database [PHP & MySQL Tutorials] - 0 views

  •  
    除了傳統遞迴的建樹方式 這篇文章使用了二元樹的改進方式來儲存 避免遞迴對大資料的效率與資源問題
Benx Shen

HOW-TO: Debug JavaScript in Internet Explorer - 0 views

  • HOW-TO: Debug JavaScript in Internet Explorer The best tool for debugging JavaScript on Internet Explorer is the Microsoft Script Editor, a free component of Microsoft Office XP/2003.
Ching Yi Chan

Default Policy Implementation and Policy File Syntax - 0 views

  •  
    有了這篇文章就不再對 Security Policy 的寫法有疑惑了
Benx Shen

Javascript - Event order - 0 views

  • When you use event capturing | | ---------------| |----------------- | element1 | | | | -----------| |----------- | | |element2 \ / | | | ------------------------- | | Event CAPTURING | ----------------------------------- the event handler of element1 fires first, the event handler of element2 fires last. Event bubbling When you use event bubbling / \ ---------------| |----------------- | element1 | | | | -----------| |----------- | | |element2 | | | | | ------------------------- | | Event BUBBLING | ----------------------------------- the event handler of element2 fires first, the event handler of element1 fires last.
  • addEventListener() method explained on the Advanced models page. If its last argument is true the event handler is set for the capturing phase, if it is false the event handler is set for the bubbling phase.
  • In the Microsoft model you must set the event’s cancelBubble property to true. window.event.cancelBubble = true In the W3C model you must call the event’s stopPropagation() method. e.stopPropagation()
Benx Shen

gotchas : Java Glossary - 0 views

  • A gotcha is a nasty surprise in the Java language or the standard libraries.
  •  
    Java 被認為不好設計的語言特性列表。 當然,Java肯定不是一個十全十美的程式語言,發現不好的設計,其實也是一種進步。看一看,究竟我們這些Java programmer算不算是在泥巴裡面打仗。
Benx Shen

CrossLoop - Simple Secure Screen Sharing - 4 views

  •  
    又一個遠端桌面分享/協助的軟體工具,有時間來試試看吧!
Benx Shen

How I Explained REST to My Wife - 0 views

  • Machines don't have a universal noun - that's why they suck.
Benx Shen

jmesa - Google Code - 0 views

  • JMesa is a dynamic HTML table that allows you to filter, sort, paginate, export and edit your data however you need to. What you will find here is a carefully thought out API that is very easy to use and can be modified for your own needs. Note: JMesa requires JDK1.5 or above.
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 matcher = "\$abc." =~ /\$(.*)\./ // no need to double-escape! assert "\\\$(.*)\\." == /\$(.*)\./ matcher.matches(); // must be invoked assert matcher.group(1) == "abc" // is one, not zero
  • def m = "foobarfoo" =~ /o(b.*r)f/ assert m[0][1] == "bar"
  • // 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][?] 的用法了!
‹ Previous 21 - 40 Next › Last »
Showing 20 items per page