__Array类在Cocos2d-x 2.x时代它就是CCArray类。它是模仿Objective-C中的NSArray类而设计的,通过引用计数管理内存。__Array继承于Ref类,因此它所能容纳的是Ref及子类所创建的对象指针。1、创建__Array对象创建__Array对象有很多函数,下面是总结常用的函数:?static __Array* create()。创建__Array。?static...
分类:
其他好文 时间:
2014-10-12 22:28:18
阅读次数:
188
Vector 是Cocos2d-x 3.x推出的列表容器,因此它所能容纳的是Ref及子类所创建的对象指针,其中的T是模板,表示能够放入到容器中的类型,在Cocos2d-x 3.x中T表示Ref类。Vector是模仿C++的std::vector模板类而设计的。在内存管理方面不使用__Array的引用计数,它的内存管理是由编译器自动处理的,可以不用考虑内存释放问题。Vector的性能优于__Arra...
分类:
其他好文 时间:
2014-10-12 22:43:58
阅读次数:
246
首先来看一段从《UNIX环境高级编程》中摘录的一段非常有意思的代码。借此我们再来谈谈fork()函数的一些问题。
#include "apue.h"
static void charatatime(char*);
int
main(void)
{
pid_t pid;
if((pid=fork())<0){
err_sys("fork error");
}else ...
分类:
其他好文 时间:
2014-10-12 23:16:58
阅读次数:
278
题目链接:
Known Notation
Time Limit: 2 Seconds Memory Limit: 65536 KB
Do you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It...
分类:
其他好文 时间:
2014-10-12 22:26:48
阅读次数:
250
__Dictionary类在Cocos2d-x 2.x时代它就是CCDictionary类,它是模仿Objective-C中的NSDictionary类而设计的,通过引用计数管理内存。__Dictionary继承于Ref类,因此它所能容纳的是Ref及子类所创建的对象指针。 1、创建__Dictionary对象创建__Dictionary对象有很多函数,下面是总结常用的函数:static __Dic...
分类:
其他好文 时间:
2014-10-12 23:33:18
阅读次数:
413
作为新手我们,我们在学习的时候往往对这些关键词,也就是所谓的修饰符理解不彻底,那么作为初学者,自己总结了点小经验,给大家分享出来!...
分类:
其他好文 时间:
2014-10-12 22:09:48
阅读次数:
157
Kindergarten
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 5317
Accepted: 2589
Description
In a kindergarten, there are a lot of kids. All girls of the...
分类:
其他好文 时间:
2014-10-12 22:59:38
阅读次数:
274
Kettle是ETL工具,它可以把文本文件的数据导入数据到HBase中,本文主要描述如何使用最新的Kettle 5.X版本把文本文件导入到hadoop-1.2.1+HBase 0.94.19的数据库中。...
分类:
其他好文 时间:
2014-10-12 23:32:38
阅读次数:
168
ZOJ 3822 Domination(概率dp)2014年ACM/ICPC 亚洲区域赛牡丹江(第一站)...
分类:
其他好文 时间:
2014-10-12 23:49:08
阅读次数:
241
Do you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It is also known as postfix notation since every operator in an expression
follows ...
分类:
其他好文 时间:
2014-10-12 22:58:58
阅读次数:
263
ZOJ 3819 Average Score(数学题 牡丹江)2014年ACM/ICPC 亚洲区域赛牡丹江(第一站)...
分类:
其他好文 时间:
2014-10-12 23:15:28
阅读次数:
273
ZOJ 3827 Information Entropy(数学题)2014年ACM/ICPC 亚洲区域赛牡丹江(第一站)...
分类:
其他好文 时间:
2014-10-12 21:51:48
阅读次数:
263
Edward is the headmaster of Marjar University. He is enthusiastic about chess and often plays chess with his friends. What's more, he bought a large decorative chessboard with N rows
and M columns.
...
分类:
其他好文 时间:
2014-10-12 21:51:28
阅读次数:
382
题意 一只狗要逃离迷宫 可以往上下左右4个方向走 每走一步耗时1s 每个格子只能走一次且迷宫的门只在t时刻打开一次 问狗是否有可能逃离这个迷宫
直接DFS 直道找到满足条件的路径 或者走完所有可能路径都不满足
注意剪枝 当前位置为(r,c) 终点为(ex,ey) 剩下的时间为lt 当前点到终点的直接距离为 d=(ex-r)+(ey-c) 若多走的时间rt=lt-d
...
分类:
其他好文 时间:
2014-10-12 22:07:58
阅读次数:
249
一、测试机安装OS+Oracle Software,包括配置oracle用户组和环境变量(略)
二、开始异机恢复
1. 复制源库最新备份集、初始化参数、密码文件到测试机
[oracle@ora10g backupsets]$ scp *20141012* 192.168.1.213:/tmp
The authenticity of host '192.168.1.213...
分类:
其他好文 时间:
2014-10-12 23:47:32
阅读次数:
493
Problem Description
You have an array consisting of n integers: a1=1,a2=2,a3=3,…,an=n.
Then give you m operators, you should process all the operators in order. Each operator is one of four types...
分类:
其他好文 时间:
2014-10-12 22:56:58
阅读次数:
311
老调重弹系列,软件设计原则之Bob大叔的SOLID原则
分类:
其他好文 时间:
2014-10-12 23:29:28
阅读次数:
194