用cocos2d-x获取系统时间,格式为年月日时分秒:void GetTime(float dt) { struct tm *tm;#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) //win32平台 time_t timep; ...
分类:
其他好文 时间:
2014-07-22 23:06:32
阅读次数:
355
1.进程描述符 struct task_struct { volatile long state; ....... struct list_head tasks; ....... struct mm_struct *mm, *active_mm; ....... struct v...
分类:
系统相关 时间:
2014-07-22 22:47:52
阅读次数:
371
拓扑排序。
反向建边。
为了序号小的尽量在前面,我们每次都取出入度为0的最大的点。
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
struct list
{
int u,v,w;
int next;
}edge[110000];
int ...
分类:
其他好文 时间:
2014-07-22 22:38:54
阅读次数:
265
- (NSString*)deviceString{ // 需要#import "sys/utsname.h" struct utsname systemInfo; uname(&systemInfo); NSString *deviceString = [NSString ...
分类:
移动开发 时间:
2014-07-22 22:35:55
阅读次数:
165
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { struct XYZ { ...
分类:
其他好文 时间:
2014-07-22 22:34:55
阅读次数:
208
直接代码、、、
#include
#include
#include
#include
#include
using namespace std;
struct node
{
int fuel,dist;
//bool operator d.dist;
// }
}s[10005];
...
分类:
其他好文 时间:
2014-07-22 22:34:14
阅读次数:
178
package?com.sadhu;
/**
java枚举的定义
枚举中可以定义构造器、方法、字段
所有枚举类都集成了Enum类
*/
public?class?Sample
{
????public?enum?Size//定义枚举
????{
????????SMALL("S"...
分类:
编程语言 时间:
2014-07-22 22:32:55
阅读次数:
247
产生RST的三个条件:
1. 目的地为某端口的SYN到达,然而该端口上没有正在监听的服务器;
2. TCP想取消一个已有的连接;
3. TCP接收到一个根本不存在的连接上的分节;
现在模拟上面的三种情况:
client:
struct sockaddr_in serverAdd;
bzero(&serverAdd, sizeof(serverAdd));...
分类:
其他好文 时间:
2014-07-22 17:57:21
阅读次数:
333
避免含糊转换
参数匹配和相互转换
struct B;
struct A
{
A()=default;
A(const B&) //吧B负责给A,拷贝构造函数
{//嘿,这里我有点明白了,只要 后面调用了这个函数,那么这个函数就得有定义
//不能只声明不定义
cout<<"调用了A(const B&)转换!"<<endl;
}...
分类:
编程语言 时间:
2014-07-22 14:43:26
阅读次数:
297
题目:hdoj1754 I Hate It
分析:更新的话,建树的时候保存叶子编号的的节点信息,然后从下往上更新就ok。
求和的话,从根节点开始,然后找在根的左边还是右边,然后递归找一个所有中的最大值即可、
代码:
#include
#include
#include
using namespace std;
const int N = 205000;
struct...
分类:
其他好文 时间:
2014-07-22 14:33:36
阅读次数:
179