摘要: 原文http://tools.android.com/tech-docs/new-build-system/user-guide构建文件build.gradleBasic Project1.最简单的配置:apply plugin: 'java'使用自带的java插件,用gradle编译java2.最... 阅读全文
posted @ 2014-10-30 20:43 1987zfp 阅读(10460) 评论(1) 推荐(0) 编辑
摘要: int ia[3][4] = {1,2,3,4,5,6,7,8};//下标for (int i = 0; i < 3; i++){ for (int j = 0; j < 4; j++) { cout << ia[i][j] << endl; }}//指针for (i... 阅读全文
posted @ 2014-09-02 11:39 1987zfp 阅读(7332) 评论(1) 推荐(0) 编辑
摘要: addEventListenerWithSceneGraphPriority1.跟node关联,通过event->getCurrentTarget() 可以获取到node2.如果有两个SceneGraphPriority,node的ZOrder大的先被触发,即如果两个重叠,前面那个先受到触发事件ad... 阅读全文
posted @ 2014-08-30 15:07 1987zfp 阅读(1132) 评论(0) 推荐(0) 编辑
摘要: Point point1 = sprite1->convertToNodeSpace(sprite2->getPosition());绝对坐标转相对坐标newP2 = (p2.x-p1.x, p2.y-p1.y)Point point2 = sprite1->convertToWorldSpace(... 阅读全文
posted @ 2014-08-30 14:53 1987zfp 阅读(263) 评论(0) 推荐(0) 编辑
摘要: select round(round(rand(),15)*1000000000000000); 阅读全文
posted @ 2011-12-14 18:19 1987zfp 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 用 Blue theme 的情况下,第四个series没有显示,IE debug报错,用dev版调了下initializeSeries: function(series, idx) {...config.markerStyle = Ext.apply(markerObj, markerThemes[idx % markerThemes.length]);...默认的markerTheme有5个,第三,第四个type似乎忘写了,结果drawSeries: function() {............出错,导致绘制第三个series时出错。theme.base没这个问题。 阅读全文
posted @ 2011-07-20 21:18 1987zfp 阅读(1206) 评论(0) 推荐(0) 编辑
摘要: 多个Timer的使用困扰了很久,今天在解决一个bug的过程中,Timer的使用理了遍。在使用多个timer时,最好用一个类封装下,里面放一个timer,一些处理逻辑。比如这样:然后这么调用:或者lstNa.ForEach(na=>{new NotifyTimer().Dispatch(na)});lstNa可以是一堆需要时间操作的对象。在另一个逻辑里获取。宗旨就是,把timer操作相关的事件捕捉封装到一起,把获取需要timer操作的对象的逻辑封装到一起。这样就不会乱了。 阅读全文
posted @ 2011-06-30 18:14 1987zfp 阅读(1043) 评论(0) 推荐(1) 编辑
摘要: 很简单encodeURI(url)一下就行了firefox不用encodeURI也能识别,估计是自动转码了 阅读全文
posted @ 2011-06-28 10:23 1987zfp 阅读(409) 评论(0) 推荐(0) 编辑
摘要: _height=120px;min-height=120px; 阅读全文
posted @ 2011-06-27 23:31 1987zfp 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 判断如果是奇数个,就加个全角空格if(xxx[length]%2!=0)xxx+=String.fromCharCode(12288);s 阅读全文
posted @ 2011-06-27 23:30 1987zfp 阅读(369) 评论(0) 推荐(0) 编辑