项目结构是这样子的:主场景代码是这样子的:local MainScene = class("MainScene", function() return display.newScene("MainScene")end)function MainScene:ctor() self.laye...
分类:
其他好文 时间:
2014-07-07 12:00:52
阅读次数:
170
typedef void (^dd)(void);@property (strong) dd a ;@property (copy) dd a ;__weak id b=self; self.a=^{ NSLog(@"%@",self); };编译器都会有警告:循环引用造成的内存泄露---...
分类:
其他好文 时间:
2014-07-07 09:17:36
阅读次数:
221
NSThread:利用NSThread创建和启用一个线程1.NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil];,调用后调用[thread start];2.创建.....
分类:
移动开发 时间:
2014-07-03 19:12:31
阅读次数:
223
1 class FaultyInfoHandler(tornado.web.RequestHandler): 2 def get(self): 3 import xmlrpc.client 4 s = xmlrpc.client.ServerProxy(Lo...
分类:
其他好文 时间:
2014-07-03 12:09:31
阅读次数:
272
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; i...
分类:
其他好文 时间:
2014-07-02 22:03:44
阅读次数:
220
UINavigationController返回总结:1、弹出当前视图控制器(弹出并向左显示前一个视图)[self.navigationController popViewControllerAnimated:YES];2、弹出到指定视图控制器(回到指定视图控制器,也就是不只弹出一个)[self.n...
分类:
其他好文 时间:
2014-07-02 18:30:38
阅读次数:
171
//单指单击UITapGestureRecognizer *singleFingerOne = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleFingerE...
分类:
其他好文 时间:
2014-07-02 17:44:34
阅读次数:
196
1 创建Ring 代码具体分析在OpenStack_Swift——Ring组织架构中我们具体分析了Ring的具体工作过程,以下就Ring中添加?设备,删除设备,已经又一次平衡的实现过程作具体的介绍。首先看RingBuilder类 def __init__(self, part_power, r...
分类:
其他好文 时间:
2014-07-02 15:02:11
阅读次数:
268
需要实现在打印 WARN, ERROR, CRITICAL的log时显示函数/方法名和行号,在INFO级不显示
import logging
def AltCustomFormatter(logging.Formatter):
def __init__(self, fmt=None, datefmt=None):
super(AltCustomFormatter, self).__ini...
分类:
编程语言 时间:
2014-07-02 08:44:51
阅读次数:
432
让状态栏隐藏在controllor中实现方法便可实现状态栏隐藏-(BOOL)prefersStatusBarHidden{returnYES;}2.让导航栏隐藏self.navigationController.navigationBar.hidden=YES;
分类:
其他好文 时间:
2014-07-02 06:31:56
阅读次数:
221