#include int check_power(unsigned int n){
/**************************************** * 如果n是2的幂,那么(n-1)也就是其二进制全为1的数
********************************...
分类:
其他好文 时间:
2014-06-11 12:45:21
阅读次数:
231
配置好Genymotion虚拟机后,运行cocos2dx的应用时会崩溃,报"unfortunately
stop"一、要将libcocos2dcpp.so编译成x86架构:在proj.android/jni/Application.mk文件中加入APP_ABI
:= armeabi x86二、 在....
分类:
其他好文 时间:
2014-06-10 09:03:58
阅读次数:
336
this blog will make your emacs as C++ IDE. It
implements code-completion, google-style-check and project manager.
分类:
编程语言 时间:
2014-06-09 13:07:04
阅读次数:
696
1.程序运行后异常显示:解决方案:在项目上点击右键->properties->Java
Build Path,remove掉Android Dependences即可
分类:
编程语言 时间:
2014-06-09 00:52:35
阅读次数:
247
未翻译完 待续(英语烂,求斧正)Type Casting类型转换Type casting is
a way to check the type of an instance, and/or to treat that instance as if it
is a different supercla...
分类:
其他好文 时间:
2014-06-08 19:50:25
阅读次数:
269
题目
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 4 3
...
分类:
其他好文 时间:
2014-06-08 18:12:04
阅读次数:
248
题目:国际象棋,判断当前状态,哪一方被将军了。不会有同时被将军的情况。
分析:模拟。直接按照国际象棋的规则模拟即可。
把操作分成两种,单点判断和射线判断,写成函数减少公共代码,也降低错误率;
然后:兵、马、王(不用判断)都是单点判断,后、车、象都是射线判断。
每种情况,调用不同的方向向量即可。
说明:没有同时成立的情...
分类:
其他好文 时间:
2014-06-08 17:14:06
阅读次数:
265
extjs4 tree check 级联选择 实现效果:关键代码:
function changeAllNode(node, isCheck) {
allChild(node, isCheck);
allParent(node, isCheck);
function allChild(nodec, isCheckc) {
var chileNodes = n...
分类:
Web程序 时间:
2014-06-08 15:25:20
阅读次数:
222
日常工作中,对于MySQL主从复制检查,一方面我们要保证复制的整体结构是否正常,另一方面需要检查主从数据是否保持一致。对于前者我们可以通过监控复制线程是否工作正常以及主从延时是否在容忍范围内,对于后者则可以通过分别校验主从表中数据的md5码是否一致,来保证数据一致..
分类:
其他好文 时间:
2014-06-08 02:30:17
阅读次数:
312
这篇文章来自iOS Tutorial Team 成员Marcelo Fabri,
他是Movile的一个iOS开发者. Check out hispersonal websiteorfollow him on Twitter.原文地址
当我们开发iOS应用时,好的性能对我们的App来说是很重要的。你...
分类:
移动开发 时间:
2014-06-08 01:28:27
阅读次数:
507