LCM (Least Common Multiple) of a set of integers is defined as the minimum number, which is a multiple of all integers of that set. It is interesting to note that any positive integer can be expressed...
分类:
其他好文 时间:
2014-08-18 23:38:13
阅读次数:
275
D:\BaiDuYun\Plist>python unpack_plist.py lobbyRelieveTraceback (most recent call last): File "unpack_plist.py", line 70, in gen_png_from_plist( p...
分类:
编程语言 时间:
2014-08-18 23:21:13
阅读次数:
720
中括号和小括号的用法:一般而言,对象中的属性的值是通过点(.)运算符来取值,但是考虑到这样一种情况,我们在遍历一个对象的时候,对其中的属性的键(key)是一无所知的,我们怎么通过点(.)来访问呢?这时候我们就可以使用[]运算符:var obj = { id : "object1", "self......
分类:
其他好文 时间:
2014-08-18 20:20:32
阅读次数:
186
javascript中的location.href有非常多种使用方法,主要例如以下。self.location.href=”/url” 当前页面打开URL页面location.href=”/url” 当前页面打开URL页面windows.location.href=”/url” 当前页面打开URL页...
分类:
其他好文 时间:
2014-08-18 20:13:52
阅读次数:
195
1 class test(object): 2 def rangetest(self): 3 for i in range(2,0,-1): 4 print i 5 print i 6 i=2 7 wh...
分类:
编程语言 时间:
2014-08-18 18:27:12
阅读次数:
247
最终效果图:
代码片段:
DealListController继承自UICollectionViewController
self.view已经包含了一个UICollectionView
并且数据源和代理已经是当前控制器self
//
// DealListController.m
// 帅哥_团购
//
// Created by beyond on 14-8-1...
分类:
移动开发 时间:
2014-08-18 16:22:42
阅读次数:
183
不会写重试,我用了这么个方法来 作为重试机制: def web(self): time.sleep(5) i = 0 a = self.br.current_url print a while i < 10: self.br.back() if self.br.current_url == a: i...
分类:
其他好文 时间:
2014-08-18 16:12:22
阅读次数:
213
Now that you've solved 2sum, 3sum can be easily converted as 2sum.Also please note the while loops for i1 and i2: they are to make sure no duplicates....
分类:
其他好文 时间:
2014-08-18 10:45:23
阅读次数:
202
final:用来修饰类和方法,修饰类的时候表示这个类是终极类,不能被其他类继承,修饰方法的时候,表示这个方法是终极方法,不能被子类重写。static:用来修饰属性和方法,修饰属性的时候表示这个属性是静态属性,静态属性在类的外部只能用类名::$属性名这种方式访问,在类的内部还可以用self::$属性名...
分类:
其他好文 时间:
2014-08-18 10:33:03
阅读次数:
159
#测试网址: http://localhost/blog/testurl.php?id=5//获取域名或主机地址 echo $_SERVER['HTTP_HOST'].""; #localhost//获取网页地址 echo $_SERVER['PHP_SELF'].""; #/blog/te...
分类:
Web程序 时间:
2014-08-18 10:31:03
阅读次数:
176