一:NSTimer和NSRunLoop的关系? 只要出现NSTimer必须要有NSRunLoop,NSTimer必须依赖NSRunLoop才能执行 。NSTimer其实也是一种资源,如果看过多线程编程指引文档的话,我们会发现所有的source如果要起作用,就得加到runloop中去。同理timer这 ...
分类:
其他好文 时间:
2017-03-17 12:08:03
阅读次数:
181
静态 static关键字 普通成员普通成员是属于对象的 静态成员静态成员是属于类的 普通方法里面可以调用静态成员静态方法里面不能调用普通成员self关键字 在类里面代表该类 抽象类 abstract 关键字 不能被实例化做为父类使用 接口 关键词 interface implements极度抽象的类 ...
分类:
其他好文 时间:
2017-03-16 23:53:31
阅读次数:
276
Title 1 #!/usr/bin/env python 2 import tornado.ioloop 3 import tornado.web 4 class MainHandler(tornado.web.RequestHandler): 5 def get(self, *args,... ...
分类:
Web程序 时间:
2017-03-16 20:22:24
阅读次数:
183
import ldap class LDAPMgmt(): def __init__(self): self.ldap_host = 'xxx' self.ldap_base_dn = 'ou=xx,dc=xx,dc=xx,dc=xx' self.root_cn = 'cn=xx,dc=xx,dc=... ...
分类:
其他好文 时间:
2017-03-16 18:41:14
阅读次数:
490
#!/usr/bin/env python import tornado.ioloop import tornado.web container = {} class Session: def __init__(self,handler): self.handler = handler self.r ...
分类:
其他好文 时间:
2017-03-16 16:02:41
阅读次数:
189
/*函数的调用;给函数设置默认值*/function showSelf($name = 'lemon', $age = 18){ echo "{$name}今年{$age}了";}showSelf('小明');/*判断函数是否已经存在*/if (function_exists("showSelf") ...
分类:
Web程序 时间:
2017-03-15 18:22:59
阅读次数:
288
header ("content-type:text/html;charset=utf-8"); class A{ function __construct(){ echo "基类的构造方法<br/>"; } } class B extends A{ function __construct(){ ...
分类:
Web程序 时间:
2017-03-15 17:36:32
阅读次数:
170
假如你项目首页的URL是:www.mylgq.com/other/Form 假如当前模块是:Index 假如当前操作是:index 那么首页完整的URL:http://www.mylgq.com/other/Form/index.php/Index/index 以上缩写仅适用于模板中使用,如在php ...
分类:
Web程序 时间:
2017-03-15 14:24:08
阅读次数:
233
1.super基本概念 super是个编译器的指令符号,只是告诉编译器在执行的时候,去调谁的方法. self是一个隐私参数; self refers to the object receiving a message in objective-C programming. super 并不是隐藏的参 ...
分类:
其他好文 时间:
2017-03-15 11:53:53
阅读次数:
206