码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
pyqt练习之显示坐标信息
defmouseMoveEvent(self,e):px=e.x()py=e.y()locats=QtCore.QString('x:%1,y:%2').arg(px).arg(py)self._tools.las.setText(unicode(locats))如图:self.visi.sizeT...
分类:其他好文   时间:2014-11-15 12:51:05    阅读次数:301
抽屉效果的实现
效果图:工程文件:代码:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. self.title=@"抽屉效果的实现"; UI...
分类:其他好文   时间:2014-11-15 10:00:28    阅读次数:124
quick-cocos2d-x 踩坑日记(一)------ NodeEx 与 shortcodes
今天在模仿一个demo,想自己去完善一些功能,自己写的时候就遇见了一个坑。。。先看代码:locallabel=cc.ui.UILabel.new({ UILabelType=1, text="MaxScore10", font="fonts/font-issue1343.fnt", x=boardSize.width/2, y=boardSize.height*0.4, }):addTo(self.overboard) :set..
分类:其他好文   时间:2014-11-15 06:43:55    阅读次数:207
每帧创建一个item
-- 加载列表测试function UIBagController:onLoadTest() self.goodsprop = DB.getTable("goodsprop"); local itemAmount = 50; -- 计算高度 local nAmount...
分类:其他好文   时间:2014-11-14 21:02:29    阅读次数:167
php oop
$this 指向实例化的对象;不能在静态方法中使用$this调用非静态的方法和属性;self 类本身,一般用的静态变量,例如:静态方法里面调用静态变量;调用静态方法;非静态方法;不能用self调用非静态的属性;parent 这个一般调用父类的方法,例如:析构函数,静态方法,非静态方法都可以。静态方法...
分类:Web程序   时间:2014-11-14 17:14:37    阅读次数:198
如何领导一个自组织团队?(转)
英文原文:What Is Leading Self-Organising Teams All About? 敏捷宣言(Agile Manifesto)声称:“最好的架构、需求和设计来自于自组织团队”。这引出了一些问题:什么是自组织团队?我们为什么需要它们?自组织团队的重要作用体现在何处?我们如何支....
分类:其他好文   时间:2014-11-14 13:58:17    阅读次数:284
获取当前视图所在控制器的方法
/** *获取视图当前的控制器**/- (UIViewController*)viewController { for (UIView* next = [self superview]; next; next = next.superview) { UIResponder* ne...
分类:其他好文   时间:2014-11-14 10:46:10    阅读次数:149
[iOS] 如何在 NSArray 中存放 weak 的引用
遇到一个问题,把 self 加到静态变量的 NSArray 的时候,由于被 NSArray 持有,所以无法释放,因此不能调用 dealloc 方法,也就无法将自己从 array 中 remove 掉。问题整理一下,就是如何在 NSArray 中存放 weak 的引用?解决的方案是:在外面加上一层 NSValue。答案地址:http://stackoverflow.com/questions/933...
分类:移动开发   时间:2014-11-13 22:35:00    阅读次数:270
ios8以上远程推送 demo
-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions{self.window=[[UIWindowalloc]initWithFrame:[[UIScreenmainScreen]bounds]];//Overridepointforcustomizationafterapplicationlaunch.//注册推送通知//[[UIApplic..
分类:移动开发   时间:2014-11-13 19:04:42    阅读次数:440
Beginning Python From Novice to Professional (7) - 类
类 创建简单类: #!/usr/bin/env python __metaclass__ = type class Person: def setName(self,name): self.name = name def getName(self): return self.name def greet(self): print "Hello,world! I'm %s."...
分类:编程语言   时间:2014-11-13 18:57:27    阅读次数:295
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!