码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
PyQt挖地雷游戏学习笔记(1)
想学会PyQt。按习惯做法,从分析学习编程实例着手。 从网上找了个“挖地雷”的源码,大卸八块,仔细解剖,力图学到些东西。 原程序中有bug,如:“棋盘”没有下边界线;挖出全部地雷后,程序没反应,不认定获胜。 我已将其铲掉,可以正常运行了。 程序源码可在此下载 所做修改,都在game_scene.py。共有2处: 一是在函数checkWin()中,原文是: if ((self.mine...
分类:其他好文   时间:2014-09-09 12:51:09    阅读次数:279
Python9-8
python里一个class可以定义多个构造函数吗?实现方法:class A: def __init__(self, value): if isinstance(value, int): #整型构造函数 else ifinstance(valu...
分类:编程语言   时间:2014-09-09 10:56:28    阅读次数:183
Qt主窗口
用Qt写了两个多月的gui界面了,居然连怎么起头都单独写不出来了。。。惭愧from PyQt4 import QtGui,QtCoreclass MainWindow(QtGui.QMainWindow): def __init__(self): super (MainWindo...
分类:其他好文   时间:2014-09-09 10:49:38    阅读次数:215
[IOS UIalert模版]
1.alertview创建UIAlertView *alert; alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"题库有更新,需要更新吗?" delegate:self cancelButtonTitle:@"确定"...
分类:移动开发   时间:2014-09-09 10:35:58    阅读次数:212
基于redis的分布式锁
setnx("Lock:{$key}", self::$expire))) { break; } if($acquired = (self::recover($key))) { ...
分类:其他好文   时间:2014-09-06 17:20:43    阅读次数:294
【IOS】导航--跳转到任意级视图
1 //方法一: 2 for(UIViewController *controller in self.navigationController.viewControllers){ 3 4 if([controller isKindOfClass:[OverWorkRece...
分类:移动开发   时间:2014-09-05 22:21:32    阅读次数:280
根据View找控制器
- (UIViewController*)viewController{ for (UIView* next = [self superview]; next; next = next.superview) { UIResponder* nextResponder = [next...
分类:其他好文   时间:2014-09-05 19:50:01    阅读次数:160
DoodleView做一个画板和Touche的方法
类和文件其中有两个功能没有实现AppDelegate.m#import"AppDelegate.h" #import"ViewController.h" #import"DoodleView.h" @implementationAppDelegate -(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions { self.wind..
分类:其他好文   时间:2014-09-05 18:28:22    阅读次数:176
简单的计算器  
类和文件AppDelegate.m#import"AppDelegate.h" #import"CalculatorController.h" //#import"ViewController.h" @implementationAppDelegate -(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions { self.window=[[UIWin..
分类:其他好文   时间:2014-09-05 18:27:32    阅读次数:199
Windows Self Signed Driver
In particular, Microsoft® instituted a device driver certification process for itsWindows® desktop and server operating systems to ensure the drivers ...
分类:Windows程序   时间:2014-09-05 16:07:11    阅读次数:497
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!