LeetCode 1 class Solution: 2 # @return a string 3 def countAndSay(self, n): 4 if n==1: 5 return "1" 6 else: 7 ...
分类:
其他好文 时间:
2014-10-09 00:28:07
阅读次数:
176
UIViewController *target = nil;for (UIViewController * controller in self.navigationController.viewControllers) { //遍历 if ([controller isKindOfClas...
分类:
其他好文 时间:
2014-10-08 18:15:15
阅读次数:
201
PHP类常量的常见访问方法class Math { const num=3.14; public function showNum(){ return self::num; }}echo Math::num."";$math=new Math();echo $math->showNum();结果:....
分类:
Web程序 时间:
2014-10-08 14:20:35
阅读次数:
204
_executing =
NO;
_finished =
NO;
改为:
self.executing =
NO;
self.finished =
NO;...
分类:
移动开发 时间:
2014-10-08 11:38:46
阅读次数:
205
对象的概念同其他语言的对象相同一个基本的类#!/usr/bin/pythonclass person: def hi(self,name): print 'Hello,%s'%namep1= person()p1.hi('lk')[root@likun p...
分类:
其他好文 时间:
2014-10-07 20:24:23
阅读次数:
223
Hey all,I'm gonna explain you how make a self injecting program in C#.I hope you guys thinks its usefull and have a nice readingRequirements:Visual St...
分类:
其他好文 时间:
2014-10-07 16:53:43
阅读次数:
297
01 大图展示设置scrollView内容的尺寸(滚动的范围)self.scrollView.contentSize = CGSizeMake(555,555);self.scrollView.contentSize = self.minionView.image.size;self.scrollV...
分类:
其他好文 时间:
2014-10-06 21:49:20
阅读次数:
185
对于面向对象总是要提到,万物皆对象。好似博大精深的感觉。接下来一起看看python的面向对象的例子创建一个对象 class Person: type = 'person' def __init__(self, name = 'Noname'): self.name = name def h...
分类:
编程语言 时间:
2014-10-06 20:17:00
阅读次数:
343
任务:在进行长时间操作时,向用户显示一个"进度指示条"。解决方案:#coding=utf-8import sysclass progressbar(object): def __init__(self,finalcount,block_char='.'): self.finalc...
分类:
其他好文 时间:
2014-10-06 01:03:19
阅读次数:
216
给自己发消息 @startuml Alice -> Alice : This is a signal to self.\nIt also demonstrates \nmultiline text. @enduml 各种参与者 ...
分类:
其他好文 时间:
2014-10-05 20:30:49
阅读次数:
633