上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页
摘要: Load Balance 阅读全文
posted @ 2013-04-09 20:51 卜海清 阅读(306) 评论(0) 推荐(0)
摘要: Groovy对Java的语法支持算是做的比较好的了,但还是有些地方不尽相同。最近在项目中想用Groovy 写针对JNI方法的测试。发现Groovy的代码是不认Java 的native关键字。所以还得是中间用Java的Class做一个Proxy才可以。// in Demo.javapublic class Demo{ public native int testmethod(); public int doAction(){ return testmethod(); }}// in JNIDemoTest.groovypublic class JNIDemoTest{ @Testpublic.. 阅读全文
posted @ 2013-04-09 15:52 卜海清 阅读(466) 评论(0) 推荐(0)
摘要: 最近在产品中开发基于REST的API接口,结合自己最近对Node.js的研究,想基于它开发一个RESTClient做测试之用。通过初步研究,Node.js开发HTTPClient还是挺方便的。选用Node的理由:1. 使用完全基于JavaScript的Node测试JSON格式的数据,非常之方便2. Node有很好的社区支持。(现在GitHub上已成了JavaScript最大的开源社区)By Example:var http = require('http');var equal = require('assert').equal;var username = & 阅读全文
posted @ 2013-03-30 19:04 卜海清 阅读(20939) 评论(0) 推荐(0)
摘要: http://book.51cto.com/art/201303/384829.htmNIST(美国国家标准及技术研究所)提炼出了不同云计算模式的共性:1。自助式服务2.通过网络分发服务3. 资源池化4. 资源的灵活调度5.可衡量的服务延伸思考: 如果能在SM里引入上述的特性? (待续... ) 阅读全文
posted @ 2013-03-30 12:04 卜海清 阅读(443) 评论(0) 推荐(0)
摘要: 1. Build Helper Plugin -- http://mojo.codehaus.org/build-helper-maven-plugin/ 2. Remote reources plugin: http://maven.apache.org/plugins/maven-remote-resources-plugin/supplemental-models.html 3. ... 阅读全文
posted @ 2013-03-25 14:29 卜海清 阅读(258) 评论(0) 推荐(0)
摘要: Link: http://www.cnblogs.com/deepnighttwo/archive/2011/03/01/1968491.html上面的文章介绍了几个JUnit 4.x里使用的用法,他们是值得注意的1. 如何自己手动的组织Test Case,类似于TestNG里的group功能。-- org.junit.runners.Suit2. 如何让JUnit 4写的Case能在JUnit 3下也运行, /** * Allow JUnit 4 test to be run under JUnit 3. */ public static junit.framework... 阅读全文
posted @ 2013-02-13 12:04 卜海清 阅读(240) 评论(0) 推荐(0)
摘要: Groovy里的GString是immutable的,测试一下下面的代码输出a = 1quote = "${a}"println quotea = 2println quote上面的两次输出是一样的,都是1, 而不是期望的第一次是1,第二次是2那有什么办法能快速解决的。当然是有的。a = 1quote = "${->a}"println quotea = 2println quote使用Closure就可以搞定这个问题。【Note】Groovy里的Closure很是强大,应好好理解,善加使用,威力无比。 阅读全文
posted @ 2013-01-26 16:49 卜海清 阅读(316) 评论(0) 推荐(0)
摘要: 在学习underscore.js时对这两个函数的使用上确实存在很多模糊的地方,看过以下的Blog后清楚了许多http://blog.bigbinary.com/2011/08/18/understanding-bind-and-bindall-in-backbone.html 阅读全文
posted @ 2013-01-25 11:48 卜海清 阅读(1889) 评论(0) 推荐(1)
摘要: nodejs里的commander库可以方便的帮你写一个命令行程序.program = require 'commander'program .version("0.0.1") .option('-v --version', 'version info')console.log '0.0.1' if program.version?上面的脚本是用CoffeeScript写的,运行`coffee test.coffee -v`后就会输出 -- ‘0.0.1’ 阅读全文
posted @ 2013-01-19 17:32 卜海清 阅读(1572) 评论(0) 推荐(0)
摘要: 针对JavaScript里的arguments对象有如下问题1.是Array类型的吗?它有哪些属性?// Best practices: it is best not to use argumentsfunction test(){ console.log( arguments instanceof Array);//return false arguments is not a instance of Array console.log([1,2] instanceof Array);// return true console.log( arguments.length); // ok.. 阅读全文
posted @ 2013-01-15 11:06 卜海清 阅读(450) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页