码迷,mamicode.com
首页 >  
搜索关键字:note to self    ( 21530个结果)
Single Number
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:其他好文   时间:2014-09-13 20:00:25    阅读次数:195
IOS7 适配时导航栏变黑
当适配IOS的布局时遇到问题:导航栏和菜单栏后台会变黑色。self.edgesForExtendedLayout = UIRectEdgeNone;原因是系统默认这两个控件是半通明的。解决方案:self.navigationController.navigationBar.translucent =...
分类:移动开发   时间:2014-09-13 15:45:45    阅读次数:242
二维凸包 Graham 算法
三点以下的情况就不写了 Python: import math class Point( object ): def __init__( self, x, y ): self.x = x self.y = y def __cmp__( self, other ): if self.y < other.y:...
分类:其他好文   时间:2014-09-13 00:50:24    阅读次数:409
IOS 页面跳转控制器有延迟
一般控制器有延迟是应该我们控制器的视图view是栏加载的,等我们用到的时候才会加载,所有我们在利用UINavigationCongtroller,的这个方法[self.navigationController pushViewController:controller animated:YES];跳...
分类:移动开发   时间:2014-09-12 19:03:03    阅读次数:438
IOS应用启动时渐变等待
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [U...
分类:移动开发   时间:2014-09-12 17:12:03    阅读次数:235
凸包 Graham 算法
import math class Point( object ): def __init__( self, x, y ): self.x = x self.y = y def __cmp__( self, other ): if self.y < other.y: return -1...
分类:其他好文   时间:2014-09-12 15:13:23    阅读次数:190
Python 多级排序
class C( object ): def __init__( self, x1, x2, x3 ): self.x1 = x1 self.x2 = x2 self.x3 = x3 def __cmp__( self, other ): if self.x1 < other.x1: ...
分类:编程语言   时间:2014-09-12 13:35:03    阅读次数:201
iOS中添加UITapGestureRecognizer手势识别后,UITableView的didSelectRowAtIndexPath失效
UIScrollView中添加了一个手势 UITapGestureRecognizer *_tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(foregroundTapped:)]...
分类:移动开发   时间:2014-09-12 11:39:13    阅读次数:184
block的传值和使用
block的传值1.第一页中声明一个block,需要传入一个颜色,让当前的view变色//声明一个block,需要传入一个颜色,让当前的view变色void(^changeColor)(UIColor*color)=^(UIColor*color){self.view.backgroundColor=color;};2.第一页中//block传值---------将block给第二个页面Second..
分类:其他好文   时间:2014-09-12 10:21:04    阅读次数:210
PyQt挖地雷游戏学习笔记(3)
这个程序使用了Python有特色的语法套路。先看第一个。 main.py里的class MainWindow的函数init()中,有这样的语句: self.scene.setMap((conf.w, conf.h), conf.mines) 这里的变量conf,定义在config.py中,由以下语句引入的: from config import * 这里的conf.w和conf.h是...
分类:其他好文   时间:2014-09-12 06:45:53    阅读次数:241
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!