码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
Swift学习一
let 声明常量,var 声明变量//创建一个按钮var btn = UIButton()btn.frame = CGRectMake(100,100,100,100)btn.backgroundColor = UIColor.redColor()self.view.addSubview(btn)/...
分类:编程语言   时间:2014-11-30 00:18:03    阅读次数:376
Python 列表元素去重的3种方法
以前面试的时候遇到过这个问题,今天闲着整理了以下,大概想到以下三种方法。 class delect_duplicate: def method_set(self,mlist): print("method_set is called") print("before process mlist is", mlist) l2 = set...
分类:编程语言   时间:2014-11-29 17:38:19    阅读次数:256
在Xcode中代码实现退出键盘和保存历史记录
1.通过调用函数 [self.view endEditing:YES];2.放弃第一响应者 [self.textFiled resignFirstResponder];//关闭键盘3.在TextView中保存历史记录:self.textView.text = [NSString stringW...
分类:其他好文   时间:2014-11-29 17:28:14    阅读次数:221
PHP redis负载均衡代码
conf = $config;} /** * Get a instance of MyRedisClient * * @param string $key * @return object */static function getInstance($configs){ if (!self::...
分类:Web程序   时间:2014-11-29 15:56:42    阅读次数:267
Python逃生游戏
从上看到的例子,小人在石头上跑跳直到达到门 我做了以下改进: 1. 模块化: helper.py 含有基类以及碰撞检测函数man.py 小人door,py 门stone.py 脚踩的石头game.py 主函数,初始化canvas,游戏主循环 2. 修复一个Bug,原先人踩在石头上会掉下来 if btm and falling and self.y == 0 and (co....
分类:编程语言   时间:2014-11-29 13:19:22    阅读次数:407
UIview lianxi
// 创建一个和屏幕大小相同的window,记住[UIScreen mainScreen].bounds 是获取当前屏幕大小 self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorel....
分类:其他好文   时间:2014-11-29 13:09:19    阅读次数:179
ASIHttprequest 报错
(void)requestReceivedResponseHeaders:(NSMutableDictionary *)newResponseHeaders { if ([self error] || [self mainRequest]) { return; } --> if (delega...
分类:Web程序   时间:2014-11-29 06:38:44    阅读次数:141
Javascript 中的window.parent ,window.top,window.self 详解
在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口, opener是用open方法打开当前窗口的那个窗口。window.self功能:是对当前窗口自身的引用。它和window属性是等...
分类:编程语言   时间:2014-11-29 00:13:38    阅读次数:197
a标签的target的四个值
特殊的目标有 4 个保留的目标名称用作特殊的文档重定向操作:_blank浏览器总在一个新打开、未命名的窗口中载入目标文档。_self这个目标的值对所有没有指定目标的 标签是默认目标,它使得目标文档载入并显示在相同的框架或者窗口中作为源文档。这个目标是多余且不必要的,除非和文档标题 标签中的 ta.....
分类:其他好文   时间:2014-11-28 21:19:57    阅读次数:291
iOS 图片保存手机相册
UIImageWriteToSavedPhotosAlbum(app.erweiImg,self,@selector(p_w_picpath:didFinishSavingWithError:contextInfo:),nil);-(void)p_w_picpath:(UIImage*)p_w_picpathdidFinishSavingWithError:(NSError*)errorcontextInfo:(void*)contextInfo{UIAlertView*alert;if(error==nil..
分类:移动开发   时间:2014-11-28 18:35:33    阅读次数:229
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!