先写下这个问题的模式
def preorderTraversal(self, root):
if root == None: return []
re = []
insert root to stack s
while s not empty:
cur_root = top of stack s
s.pop()
how to handle cur_root
how to ...
分类:
其他好文 时间:
2014-07-15 10:17:43
阅读次数:
274
NSIndexPath *scrollIndexPath = [NSIndexPath indexPathForRow:10 inSection:0];[[self tableView] scrollToRowAtIndexPath:scrollIndexPath atScrollPo...
分类:
其他好文 时间:
2014-07-14 23:25:38
阅读次数:
212
1,OC里面传参数个数不同,可以是两个完全不同的方法。如- (void)addCard:(Card *)card atTop:(BOOL)atTop;- (void)addCard:(Card *)card;第二个方法可以这样实现- (void)addCard:(Card *)card{ [self...
分类:
移动开发 时间:
2014-07-14 22:22:47
阅读次数:
316
#import [self.content.layer setBackgroundColor:[[UIColor whiteColor] CGColor]];[self.content.layer setBorderColor:[[UIColor grayColor] CGColor]];[self...
分类:
其他好文 时间:
2014-07-14 21:59:15
阅读次数:
201
// 网络变化消息 [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(checkNetwork) name: kReachabilityChangedNotification object: nil...
分类:
Web程序 时间:
2014-07-14 21:50:23
阅读次数:
212
自定义相机的时候,调用系统的相机,由于相机的分辨率,会出现短小的矩形框,总会出现黑色边框,如下图:
如果想实现全屏相机的话,这样做就可以了:
CALayer *viewLayer = self.imagePickerController.view.layer;
[viewLayer setBounds:CGRectMake(0.0, 0....
分类:
移动开发 时间:
2014-07-14 20:45:01
阅读次数:
290
{loop subcat(0,0,0,$siteid) $r}{/loop}
/**
* 获取子栏目
* @param $parentid 父级id
* @param $type 栏目类型
* @param $self 是否包含本身 0为不包含
* @param $siteid 站点id
*/
function subcat($parentid = NULL, $...
分类:
Web程序 时间:
2014-07-14 20:30:49
阅读次数:
522
Doc ID 428681.1Applies to: Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.1.0 [Release 10.2 to 11.2]Information in this document applies to any platform.GoalThe goal of this note i...
分类:
其他好文 时间:
2014-07-14 18:12:01
阅读次数:
343
G - Self Numbers(2.2.1)
Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
In 1949 the Indian mathematician D.R. Kaprekar discovered...
分类:
其他好文 时间:
2014-07-14 16:18:29
阅读次数:
194
@interface MoveView : UIView{ CGPoint startPoint;}#import "MoveView.h"@implementation MoveView- (id)initWithFrame:(CGRect)frame{ self = [super i...
分类:
其他好文 时间:
2014-07-14 15:42:42
阅读次数:
157