NSString *pattern = @"(?).*?(?=)";
2.
3. NSString *pattern1 = @"";
4.
5. NSURL *URL = [NSURL URLWithString:@"http://www.weather.com.cn/weather/101010100.shtml"];
6. NSString *string = [NSStri...
分类:
移动开发 时间:
2014-05-15 15:12:23
阅读次数:
265
Sometime, we need to open a file or buffer which name began with current word in emacs.
Here I give the solution as follows.
(provide 'quick-file-jump)
(defun ab/quick-buffer-jump ()
"Quickly jum...
分类:
其他好文 时间:
2014-05-15 15:02:20
阅读次数:
373
【题目】
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
P A H N
A P L S I I G
Y I R
And then read line by line: "PAHNAPLSI...
分类:
其他好文 时间:
2014-05-15 04:30:57
阅读次数:
313
Description
Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the Universit...
分类:
其他好文 时间:
2014-05-15 00:20:39
阅读次数:
332
这个模式比较简单,嘿嘿,简单写一下。
老样子,先看 外观模式(Facade Pattern)定义:提供一个统一的接口,用来访问子系统中的一群接口,外观定义了一个高层的接口,让子系统更容易使用。其实就是为了方便客户的使用,把一群操作,封装成一个方法。
举个例子:我比较喜欢看电影,于是买了投影仪、电脑、音响、设计了房间的灯光、买了爆米花机,然后我想看电影的时候,我需要:
1、打开爆米花机
2、...
分类:
其他好文 时间:
2014-05-15 00:18:02
阅读次数:
265
grep命令可以从文本中或者通过管道送过来的字符流中或一个"-"符号代替文件名来搜索精确或者模糊的匹配信息,grep家族有三个命令:grep,egrep,fgrep。grep支持正则表达式匹配查找egrep支持扩展正则表达式匹配查找fgrep不支持正则表达式匹配查找grep命令的格式:grep[OPT]‘PATTERN‘F..
分类:
系统相关 时间:
2014-05-14 17:24:27
阅读次数:
428
解释器模式(Interpreter
Pattern)是一个应用比较少的模式,在软件构建过程中,如果某一特定领域的问题比较复杂,类似的模式不断重复出现,如果使用普通的编程方式来实现将面临非常频繁的变化。在这种情况下,将特定领域的问题表达为某种文法规则下的句子,然后构建一个解释器来解释这样的句子,从而达...
分类:
其他好文 时间:
2014-05-14 11:48:39
阅读次数:
225
备忘录模式(Memento Pattern)又叫做快照模式(Snapshot
Pattern)或Token模式,属于行为模式。定义(源于GoF《设计模式》):在不破坏封闭的前提下,捕获一个对象的内部状态,并在该对象之外保存这个状态。这样以后就可将该对象恢复到原先保存的状态。应用场景以保存游戏进度为例...
分类:
其他好文 时间:
2014-05-14 11:37:32
阅读次数:
238
tree --help以树型结构显示文件及文件夹usage: tree
[-acdfghilnpqrstuvxACDFQNSUX] [-H baseHREF] [-T title ] [-L level [-R]][-P
pattern] [-I pattern] [-o filename] [--...
分类:
系统相关 时间:
2014-05-14 11:15:56
阅读次数:
506