题目链接:ZigZag Conversion
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)
...
分类:
其他好文 时间:
2015-01-28 14:45:26
阅读次数:
93
标题:ZigZag Conversion通过率:22.7%难度:简单The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to displ...
分类:
其他好文 时间:
2015-01-28 14:23:47
阅读次数:
129
1 语法 1.1 直接量语法 /pattern/attributes 1.2 创建RegExp对象 new RegExp(pattern,attributes) 1.3 说明 pattern是正则表达式,attributes是指修饰符如i,g,m2 RegExp 对象方法方法描述exec...
分类:
Web程序 时间:
2015-01-28 14:20:36
阅读次数:
187
题目: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...
分类:
其他好文 时间:
2015-01-27 18:26:07
阅读次数:
184
今天主要看下re.sub函数和Handler类的sub函数
先看下re.sub函数
re.sub共有5个参数,不过一般写前三个就好了,即pattern,repl和string
pattern表示正则中的模式字符串,repl可以是字符串,也可以是函数。string为要进行替换的字符串
先看一段代码:
import re
def Num2A(match):
return 'A'
a...
分类:
编程语言 时间:
2015-01-27 16:28:12
阅读次数:
219
题目: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...
分类:
其他好文 时间:
2015-01-27 16:26:55
阅读次数:
172
原文链接http://www.cnblogs.com/anlyren/archive/2008/01/25/simple_Factory_Pattern.html引入:我们在编程的时候,每当"new"一个对象之后,这个对象就依赖于这个类了。如果在后期的维护过程中由于某些原因需要修改一下这个类,则唯一...
分类:
其他好文 时间:
2015-01-27 13:06:36
阅读次数:
111
ZigZag ConversionThe string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern i...
分类:
其他好文 时间:
2015-01-27 00:30:10
阅读次数:
202
文本处理工具之grep、egrep:grep:(globalsearchregularexpression(RE)andprintouttheline文本搜索工具,根据用户指定的文本模式对目标文件进行逐行搜索,显示能够被模式所匹配到的行格式:grep[options]‘PATTERN‘file,...正则表达式:是一类字符所书写出的模式(pattern)元字..
分类:
其他好文 时间:
2015-01-26 19:29:46
阅读次数:
182
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 fo...
分类:
其他好文 时间:
2015-01-26 13:27:13
阅读次数:
148