打印width和heightNSLog("width: %f, height: %f",self.View.frame.size.width, self.View.navigationBar.frame.size.height);打印frameNSLog(@"%@",[NSValue valueWi...
分类:
移动开发 时间:
2014-07-29 11:08:16
阅读次数:
194
#Card.pyimport randomclass Card: def __init__(self,suit_id,rank_id): self.rank_id = rank_id self.suit_id = suit_id if self.ran...
分类:
其他好文 时间:
2014-07-29 11:04:46
阅读次数:
263
#finalPyPong.pyimport pygame,sysclass MyBallClass(pygame.sprite.Sprite): def __init__(self,image_file,speed,location=[0,0]): pygame.sprite.S...
分类:
编程语言 时间:
2014-07-29 11:02:36
阅读次数:
404
# QVTKRenderWindowInteractor要求必须有初始化好的parent ? ? def CreateScene(self, parent): ? ? ? ? view = QVTKRenderWindowInteractor(parent) ? ? ? ? renderer = vtkRenderer() ? ? ?...
分类:
其他好文 时间:
2014-07-28 17:00:34
阅读次数:
333
phpfunctionclass语言c this,self,parent三个关键字从字面上比较好理解,分别是指这、自己、父亲。 this是指向当前对象的指针(姑且用C里面的指针来看吧) self是指向当前类的指针 parent是指向父类的指针(我 们这里频繁使用指针来描述,是因为没有更好的语言来表达...
分类:
Web程序 时间:
2014-07-28 15:30:13
阅读次数:
225
在ruby中写顶层函数的时候,总会有一个问题,self是谁,这些方法是谁的,是什么方法。如下:1 p self2 3 p self.class4 5 def talk6 p self7 end8 9 talk 输出main,Object,main 由此可见,在写顶层代码的时候,rub...
分类:
其他好文 时间:
2014-07-28 15:02:16
阅读次数:
229
ruby中的私有方法是指方法只能被隐含调用,不能被显示调用。而当没有显示接收者的时候,会把self当成接收者。因此,只能在自身中调用私有方法,这也是私有方法的调用规则。 ruby的私有方法机制目的是:使得你很容易将方法分为两种,外部世界可以访问的方法和外部世界不可以访问的方法。如下: 1 cl...
分类:
其他好文 时间:
2014-07-28 14:40:33
阅读次数:
244
在viewdidiload方法中除了[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyBoardWillShow:) name:UIKeyboardWillShowNotification obj...
分类:
其他好文 时间:
2014-07-28 13:51:10
阅读次数:
298
---------------------- ASP.Net+Unity开发、.Net培训、期待与您交流! ----------------------一、self1.谁调用了当前方法,self就代表谁。两种情况:self出现在对象方法里,self就代表对象;self出现在类方法里,self就代表类...
分类:
其他好文 时间:
2014-07-28 11:21:31
阅读次数:
205
1、显示Toolbar在RootViewController.m的- (void)viewDidLoad方法中添加代码,这样Toobar就显示出来了。[cpp] view plaincopyprint?[self.navigationControllersetToolbarHidden:NOanim...
分类:
移动开发 时间:
2014-07-28 11:18:20
阅读次数:
268