1.to_proc
class Array
def to_proc
proc { |receiver| receiver.send *self }
end
end
[ 'Hello', 'Goodbye' ].map &[ :+, ' BeiJing!' ]
#=> ["Hello BeiJing!", "Goodbye BeiJing!"]
recei...
分类:
其他好文 时间:
2014-08-29 18:18:48
阅读次数:
165
比如- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ [self.pickerViewremoveFromSuperview]; .....
分类:
其他好文 时间:
2014-08-29 17:59:28
阅读次数:
222
# Definition for a binary tree nodeclass TreeNode: def __init__(self, x): self.val = x self.left = None self.right = Noneclas...
分类:
其他好文 时间:
2014-08-29 17:36:18
阅读次数:
135
class Solution: # @param matrix, a list of lists of integers # RETURN NOTHING, MODIFY matrix IN PLACE. def setZeroes(self, matrix): di...
分类:
其他好文 时间:
2014-08-29 16:00:48
阅读次数:
203
1. Receiving 相关 參照 Note: 402245.1, 跑 rcv11i_sa.sql 就能够, 输入 po number, 其余默认. 參照 Note: 1294177.1, 假设上面的脚本有问题, 能够从这个 Note 里面下载脚本, 对各个表单独查找数据.2. Order M.....
分类:
其他好文 时间:
2014-08-29 14:26:07
阅读次数:
144
#?-*-?coding:?cp936?-*-
#jk409?于2014-8-27用python2.7编写的批量复制文件和修改虚拟机配置文件的脚本
import?os,os.path,shutil
import?re,time
class?main:
????def?__init__(self,name,drive,...
分类:
编程语言 时间:
2014-08-29 11:18:48
阅读次数:
251
//代码截屏
//(1)设置要截屏的图片大小
UIGraphicsBeginImageContext(self.view.frame.size);
//(2)对哪个视图截图固定大小得图片
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
//(3)获取截图的图片对象
UI...
分类:
其他好文 时间:
2014-08-29 11:08:07
阅读次数:
145
Introduction to "serial device driver" (My study note)
膜拜大神的作品....
分类:
其他好文 时间:
2014-08-29 02:53:07
阅读次数:
300
Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
分类:
其他好文 时间:
2014-08-29 01:18:36
阅读次数:
275
调用NSObject的方法[selfperformSelector:@selector(run)withObject:nilafterDelay:2.0];// 2秒后再调用self的run方法使用GCD函数dispatch_after(dispatch_time(DISPATCH_TIME_NOW...
分类:
移动开发 时间:
2014-08-28 22:39:56
阅读次数:
274