上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页
摘要: http://stackoverflow.com/questions/2266789/is-there-an-equivalent-of-the-nosuchmethod-feature-for-properties-or-a-way不过注意到不是所有的浏览器里都支持的。https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/noSuchMethod上面说到的可以再Firefox里跑通,但到了Chrome中就不行了。 阅读全文
posted @ 2012-12-11 10:59 卜海清 阅读(216) 评论(0) 推荐(0)
摘要: http://confluence.jetbrains.net/display/WI/Getting+Started+with+JsTestDriver+IntelliJ+plugin 阅读全文
posted @ 2012-12-06 15:37 卜海清 阅读(211) 评论(0) 推荐(0)
摘要: Link:http://msdn.microsoft.com/en-us/magazine/gg655487.aspx 阅读全文
posted @ 2012-12-06 14:49 卜海清 阅读(133) 评论(0) 推荐(0)
摘要: https://github.com/pivotal/jasmine/pull/181 阅读全文
posted @ 2012-12-06 09:01 卜海清 阅读(160) 评论(0) 推荐(0)
摘要: The operator in can be used to test whether an object has a certain property.var person = {}person.name = "buhaiqing"console.debug( "name" in person) // return : true 阅读全文
posted @ 2012-12-04 11:25 卜海清 阅读(219) 评论(0) 推荐(0)
摘要: Spock is a testing and specification framework for Java and Groovy applications. What makes it stand out from the crowd is its beautiful and highly expressive specification language.Link: http://code.google.com/p/spock/sample Maven pom.xml:http://code.google.com/p/spock/wiki/HelloSpockPom可以使用when/th 阅读全文
posted @ 2012-12-02 15:10 卜海清 阅读(999) 评论(0) 推荐(1)
摘要: 希望是能在使用Singleton模式的时候既能考虑到性能,又能延迟加载。publicclassStaticSingleton{privateStaticSingleton(){System.out.println("StaticSingletoniscreate");}privatestaticclassSingletonHolder{privatestaticStaticSingletoninstance=newStaticSingleton();}publicstaticStaticSingletongetInstance(){returnSingletonHolder 阅读全文
posted @ 2012-12-01 17:04 卜海清 阅读(160) 评论(0) 推荐(0)
摘要: Link : http://stackoverflow.com/questions/11580057/using-class-from-groovy-file-located-in-another-folder-gradle If you change your build.gradle to simply be task hello << { def utils = new ... 阅读全文
posted @ 2012-11-29 09:58 卜海清 阅读(244) 评论(0) 推荐(0)
摘要: 今天看一用法可以实现Thread-safe closure in Groovy class Stock { def order Stock(orderObject) { order = orderObject } def shares(closure) { closure = closure.clone() // Ensure thread safity closure.delegate = order closure() order } } 阅读全文
posted @ 2012-11-23 13:59 卜海清 阅读(503) 评论(0) 推荐(0)
摘要: Groovy里with 关键字的使用 def calendar = Calendar.instancecalendar.with { clear() set MONTH, JULY set DATE, 4 set YEAR, 1776 println time} 阅读全文
posted @ 2012-11-23 13:11 卜海清 阅读(598) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页