http://oj.leetcode.com/problems/edit-distance/class Solution: # @return an
integer def minDistance(self, word1, word2): len1 = len(word1)...
分类:
编程语言 时间:
2014-05-09 04:19:03
阅读次数:
407
# -*- coding: utf-8 -*-
try:
import httplib2
except ImportError:
print('错误:')
print(' httplib2这个XML解析库没有找到,程序无法继续执行!')
exit(255)
def network_get_proc(self, use_cache = True):
'''POST动作'...
分类:
编程语言 时间:
2014-05-09 01:39:09
阅读次数:
337
- (UIColor *)colorAtPixel:(CGPoint)point {
// Cancel if point is outside image coordinates
if (!CGRectContainsPoint(CGRectMake(0.0f,
0.0f, self.size.width,
self.size.height), point)) {...
分类:
移动开发 时间:
2014-05-09 01:04:12
阅读次数:
503
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self.tableView
deselectRowAtIndexPath:[self.tableView
indexPathForSelectedRow] animated:YES];
}...
分类:
其他好文 时间:
2014-05-08 17:23:54
阅读次数:
261
-(void) bringSublayerToFront:(CALayer*)layer{[layer
removeFromSuperlayer];[self insertSublayer:layer atIndex:[self.sublayers
count]-1];}-(void) sendSu...
分类:
移动开发 时间:
2014-05-08 14:01:24
阅读次数:
386
Found the solution myself in the end. The problem
was not with theLinearLayout,but with theScrollView(seems weird, considering the
fact that theScroll...
分类:
移动开发 时间:
2014-05-08 13:42:02
阅读次数:
321
CGRect focusFrame
=[_scrollViewconvertRect:_joinView.frametoView:self.view];这里_scrollView是self.view的子控件_joinView是_scrollView的子控件,这里是计算出_joinView在self....
分类:
移动开发 时间:
2014-05-08 11:59:01
阅读次数:
335
iOS 消息(即方法调用)的两个隐藏参数 :self 和 _cmd...
分类:
移动开发 时间:
2014-05-08 11:03:53
阅读次数:
535
一 、对style和attr的引用1.
当引用平台的style做为style的parent时,“@android:style/主题” == “@android:主题” ==“
android:style/主题 ”== “android:主题”;2. 当引用平台的style作为属性的引用时,“@and...
分类:
移动开发 时间:
2014-05-08 10:20:32
阅读次数:
535
最近做界面需要添加很多工具栏按钮,所以自己定义了一个Button直接上代码 1 #include
"SettingButton.h" 2 #include 3 #include 4 5 _DIYButton::_DIYButton(QWidget
*_Parent) : 6 QTool...
分类:
其他好文 时间:
2014-05-08 01:21:32
阅读次数:
310