Skip to main content

Home/ InfokeyDEV/ Group items tagged programming

Rss Feed Group items tagged

涼鞋

Ajaxian - 0 views

Benx Shen

5 Tips for Better jQuery Code: jQuery, Tutorial - 3 views

  •  
    Chinese new year animals horoscope2016
    Happy Chinese new year 2016 messages & quotes
    Happy new year 2016 greetings for Chinese
    Chinese new year 2016 funny poems
  •  
    Dubai Independent Escorts Service Dubai Independent Escorts Agency Independent Escort In Dubai Independent Escort In UAE Independent Escort Service Dubai Independent Escort Agency In Dubai
东 邪

Stevey's Blog Rants: Dynamic Languages Strike Back - 0 views

  •  
    Chinese new year animals horoscope2016
    Happy Chinese new year 2016 messages & quotes
    Happy new year 2016 greetings for Chinese
    Chinese new year 2016 funny poems
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

InfoQ: 一圖勝千言? - 0 views

  • Arnon也明確地評價了一圖是否真的勝過千言: 如果你把模型看作是綱領性的框架,那麼你可以按自己的意願提高抽象的層次,進而比較明晰地表達你的觀點,那麼這句話成立。然而,當你需要把模型建得非常具體,從而得以進行代碼生成——在這種情況下,用代碼來建模,再搭配自動生成或預先建立的DSL和框架,會更加合宜。
  • Dean最後解釋說他並不認為圖形表示法沒有存在的空間,但是: 就一般情況來說,用簡潔的語言加上設計良好的API和DSL來編寫的代碼,對上圖形驅動的方式仍然是必勝的。
Benx Shen

InfoQ: 将程序记在脑子里 - 0 views

  • 开发人员怎么做才能让程序牢记在脑中呢?Graham给出了八点建议: 避免分心 一口气做久一点 使用简洁的编程语言 持续重构 写易读的代码 小团队工作 避免多人编辑同一代码块 从小事做起
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
Ching Yi Chan

ONLamp.com -- Uploading, Saving and Downloading Binary Data in a MySQL Database - 0 views

Benx Shen

John Resig - JavaScript as a Language - 2 views

  • I think we"ve seen the JavaScript language move through many individual phases: The "We need scripting for web pages" phase. (Netscape) The "We should standardize this" phase. (ECMAScript) The "JavaScript isn"t a toy" phase. (Ajax) The "JavaScript as a programming language" phase.
    • Benx Shen
       
      John Resig 認為,Javascript 歷經了這些成長階段: 1. "網頁所需的腳本(script)語言" (網景 Netscape) 2. "標準化" (ECMAScript) 3. "不只是玩具" (Ajax) 4. "成為真正的程式語言" (!?)
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() 或之類的
1 - 20 of 23 Next ›
Showing 20 items per page