码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
Leetcode 39. Combination Sum
Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums ...
分类:其他好文   时间:2017-01-05 07:52:07    阅读次数:161
Leetcode 230. Kth Smallest Element in a BST
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's ...
分类:其他好文   时间:2017-01-05 07:50:54    阅读次数:139
python 面向对象
classPeoson(object): #self代表自己 def__init__(self,name,age): self.name=name self.age=age #self强制参数 defrun(self): print"%sisrunning.."%self.name defspeak(self,msg): print"%s:%sisspeaking.."%(self.name,msg) p1=Peoson("jack",23) p1.run() p1.speak("hello")
分类:编程语言   时间:2017-01-04 07:59:59    阅读次数:199
具有提示功能的KeyPath宏
宏的定义: 示例代码: 输出: 备注: 该宏在使用中可以在输入完KeyPath(self.view后,再输入字符f,可以利用代码提示功能提示出self.view对象以字母f开头的所有属性。 ...
分类:其他好文   时间:2017-01-03 22:17:24    阅读次数:259
Redis 排行榜 自己简单练习
redis = $redis; } /* 添加到排行榜 */ public function addScores($gameid,$score){ $key = self::PREFIX . date('Ymd'); return $this->redis->zIncrBy($key, $score... ...
分类:其他好文   时间:2017-01-03 20:59:49    阅读次数:208
Web Service和WCF的区别。其实二者不属于一个范畴!!!
Web Service:严格来说是行业标准,也就是Web Service 规范,WCF:WCF 是一个分布式应用的开发框架,属于特定的技术,或者平台。二者不是一个范畴。 ...
分类:Web程序   时间:2017-01-03 12:58:50    阅读次数:174
UI第十五节——UIWebView
- (void)viewDidLoad { [super viewDidLoad]; UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.bounds]; webView.delegate = self; //设置代理 [s ...
分类:Web程序   时间:2017-01-03 12:07:07    阅读次数:182
类的单列模式
呵呵哒....class clss: #等于触发对象 clss() __static = None def __init__(self): pass @staticmethod def static_def(): if clss.__static: return clss.__static ... ...
分类:其他好文   时间:2017-01-01 21:30:21    阅读次数:135
【Python】使用多个迭代器
如果要达到多个迭代器的效果,__iter__()只需替迭代器定义新的状态对象,而不是返回self 参考资料:Python学习手册 ...
分类:编程语言   时间:2016-12-31 22:57:15    阅读次数:243
类的寻找方法
class A: def bar(self): print('bar') self.f1() class B(A): def f1(self): print('B') class C: def f1(self): print('C') class D(C,B): pass d1 = B() d1..... ...
分类:其他好文   时间:2016-12-31 21:53:41    阅读次数:229
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!