Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover t...
分类:
其他好文 时间:
2015-01-21 15:21:59
阅读次数:
184
sed的语法格式:sed [option] {sed-command} {input-file}sed在正常情况下,将处理的行读入模式空间(pattern space),脚本中的“sed-command(sed命令)”就一条接着一条进行处理,知道脚本执行完毕。然后该行呗输出,模式(pattern s...
分类:
系统相关 时间:
2015-01-21 15:09:07
阅读次数:
142
### Behavioral Pattern#### interpreter pattern string -> code instruction set: 提供基本操作virtual machine: 执行指令front-end: 生成效率更高的字节码```void setHe...
分类:
其他好文 时间:
2015-01-20 19:50:35
阅读次数:
187
Awk 程序的结构如下:awk 'BEGIN{ print "start" } pattern { commands } END{ print "end" } fileAwk程序由3部分组成:BEGIN语句块,END语句块,和能够使用模式(正则表达式/关系表达式)匹配的通用语句,这三部分中的任何一....
分类:
其他好文 时间:
2015-01-20 17:38:58
阅读次数:
262
匹配href对应的内容hrefs*=s*(?:"([^"]*)"|'([^']*)'|([^"'>s]+))(?: pattern)是非捕获型括号匹配pattern,但不捕获匹配结果。(pattern )是捕获型括号。 匹配pattern,匹配pattern并捕获结果,自动获取组号(? patter...
分类:
其他好文 时间:
2015-01-20 15:38:46
阅读次数:
127
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 ...
分类:
其他好文 时间:
2015-01-20 10:29:45
阅读次数:
133
??
单例模式很简单,就是在构造函数中多了加一个构造函数,访问权限是 private 的就可以了,这个模式是简单,但是简单中透着风险,风险?什么风险?在一个 B/S 项目中,每个 HTTPRequest 请求到 J2EE的容器上后都创建了一个线程,每个线程都要创建同一个单例对象。
/**
* I'm glad to share my knowledge with you all.
* 中国...
分类:
编程语言 时间:
2015-01-20 09:04:25
阅读次数:
175
什么是grepgrep(GlobalsearchREgularexpressionandPrintouttheline),即全局搜索正则表达式并打印出匹配的行,它是Linux系统中一个强大的文本搜索工具,它根据用户指定的“模式(pattern)”对目标文本进行过滤,显示被模式匹配到的行。grep命令的基本语法格式grep[options]PATTE..
分类:
系统相关 时间:
2015-01-20 06:38:48
阅读次数:
209
JavaScript的RegExp对象有两种创建方式,一种是字面量,一种是对象。var r = /pattern/attributes或者new RegExp(pattern, attributes);参数pattern是一个字符串,指定了正则表达式的模式或其他正则表达式。参数attributes是...
分类:
其他好文 时间:
2015-01-20 00:43:03
阅读次数:
295
一、动态代理概述:
与静态代理对照(关于静态代理的介绍 可以阅读上一篇:JAVA设计模式之 代理模式【Proxy Pattern】),
动态代理类的字节码是在程序运行时由Java反射机制动态生成。
注意:
1、AspectJ是采用编译时生成AOP代理类,具有更好的性能,但是需要使用特定的编译器进行处理
2、Spring AOP...
分类:
编程语言 时间:
2015-01-19 23:38:43
阅读次数:
438