内存管理重写dealloc方法@implementation Dog#pragma mark
当一个对象从内存中移除的时候,就会被调用- (void) dealloc{ NSLog(@"----Dog被销毁了------");
//一定要调用super的方法,写在该方法的最后 [sup...
分类:
移动开发 时间:
2014-05-23 12:03:27
阅读次数:
347
其实我觉得这题可以用费用流的,可是光建图就超时了。。。不科学啊。。。因为边太多了,不然一定能过的,最后想啊想,还是用dp吧。。。。
居然想到一种一维dp。。。。我也不知道我怎么想的,反正就是ac了
//#pragma comment(linker, "/STACK:102400000,102400000")
#include
#include
#include
#include
#includ...
分类:
其他好文 时间:
2014-05-22 13:20:14
阅读次数:
286
Remove Duplicates from Sorted Array IGiven a
sorted array, remove the duplicates in place such that each element appear only
once and return the new l...
分类:
其他好文 时间:
2014-05-19 12:10:41
阅读次数:
329
【题目】
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in place with constant memory.
For example,
Given input array A ...
分类:
其他好文 时间:
2014-05-18 18:25:19
阅读次数:
272
1 Object-aduitor审计具体分析
上一篇文章中,讲解了Object-aduitor的启动,其中审计的具体执行是AuditorWorker实现的,在run_audit中实例化了AuditorWorker类,并调用audit_all_objects方法,下面看此方法的具体代码实现:
def audit_all_objects(self, mode='once', device_dirs...
分类:
其他好文 时间:
2014-05-18 16:06:57
阅读次数:
427
经过前两两篇博文的讲解,我们已经完成了渲染工作,但只是渲染而没有交互性,本篇博文我们就来加上事件的处理方法。
首先我们需要为项目添加一个帧监听类:CMyFrameListener,为了直观,在这直接贴上代码
头文件
#pragma once
#include "ogre.h"
#include "OgreConfigFile.h"
#include "OgreFrameListener.h"...
分类:
其他好文 时间:
2014-05-18 14:48:46
阅读次数:
285
#pragma hdrstop
#pragma argsused
#include
#include
#include
#include "hdd.h"
const WORD IDE_ATAPI_IDENTIFY = 0xA1; // 读取ATAPI设备的命令
const WORD IDE_ATA_IDENTIFY = 0xEC; // 读取ATA设备的命令
const in...
分类:
其他好文 时间:
2014-05-18 14:36:24
阅读次数:
430
【题目】
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without any intervening characters.
For example, given:
S:...
分类:
其他好文 时间:
2014-05-18 08:31:48
阅读次数:
228
Problem Description
GG is some what afraid of his MM. Once his MM asks, he will always try his best to rush to their home.
Obvious, he can run home in straight line directly. Alternatively, he ca...
分类:
其他好文 时间:
2014-05-18 07:28:10
阅读次数:
268
>_ 100010 #pragma once11 #endif // _MSC_VER >
100012 13 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows
headers14 15 16 /...
分类:
移动开发 时间:
2014-05-18 01:39:27
阅读次数:
403