This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "fmt" | |
// fibonacci 函数会返回一个返回 int 的函数。 | |
func fibonacci() func() int { | |
a := -1 | |
b := 1 | |
return func() int { | |
a, b = b, a+b | |
return b | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
import os | |
import sys | |
import shutil | |
import multiprocessing | |
'''os.system("cleartool setview elqstux_ki_ppb")''' | |
ftPath = "/vobs/mgwblade/PPB/SBG_HSD10196_1/test/auto" | |
sgcPath = "/vobs/mgwblade/SGC/SGC_CSA10105_4/SGC_CRA1190962" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation UIView (KLCPopupExample) | |
- (UITableViewCell*)parentCell { | |
// Iterate over superviews until you find a UITableViewCell | |
UIView* view = self; | |
while (view != nil) { | |
if ([view isKindOfClass:[UITableViewCell class]]) { | |
return (UITableViewCell*)view; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillShow:) | |
name:UIKeyboardWillShowNotification | |
object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillHide:) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentViewController.m | |
// | |
// Created by Johnnie Walker on 07/06/2013. | |
// | |
#import "ContentViewController.h" | |
@interface ContentViewController () <UITableViewDataSource, UITableViewDelegate> | |
@property (nonatomic, weak) UITableView *tableView; |
NewerOlder