preg_match_all—执行一个全局正则表达式匹配int preg_match_all ( string pattern, string subject, array matches [, int flags] )在 subject 中搜索所有与 pattern 给出的正则表达式匹配的内容并将...
分类:
Web程序 时间:
2014-07-31 20:01:12
阅读次数:
207
import java.util.regex.Pattern;/*** 过滤标签字符串,返回纯文本**/public class ChangePlainText {public static void main(String[] args) {String test="hihello~";Strin...
分类:
编程语言 时间:
2014-07-31 19:48:37
阅读次数:
303
前言:有很多时候,在一个生命周期中我们只要一个对象就可以了,比如:线程池,缓存,对话框,日志,显卡驱动等等。如果造出多个实例,就会导致许多问题产生,例如:程序的行为异常、资源使用过量,或者说不一致的结果。public class Singleton { private stati...
分类:
其他好文 时间:
2014-07-31 15:58:36
阅读次数:
287
KMP算法:/** KMP算法中获取模式中每位的next值。next[i]=j表示pattern[0..i]中最长前后缀后面的那个元素的位置为j在进行匹配的过程中,匹配失败则取得上一个 next 函数的值*/void get_next(char *pattern, int *next){int le...
分类:
其他好文 时间:
2014-07-31 13:03:16
阅读次数:
167
Pattern是要符合的模式
Matcher是用模...
分类:
其他好文 时间:
2014-07-30 20:48:04
阅读次数:
175
直接量语法:/pattern[/attributes]创建RegExp对象:var reg = new RegExp(pattern[,attributes]);pattern是一个字符串,指定正则表达式;attributes是一个可选的字符串,包含g,i,m,分别表示全局匹配、忽略大小写匹配和多行...
分类:
编程语言 时间:
2014-07-30 14:40:43
阅读次数:
216
?匹配任意一个字符,*匹配任务多个字符(包括0)#include #include int match(const char *src, const char *pattern){ if (src == NULL || pattern == NULL) { return 0...
分类:
其他好文 时间:
2014-07-30 11:34:53
阅读次数:
193
Detecting and Matching Interest Points
分类:
其他好文 时间:
2014-07-29 17:11:22
阅读次数:
470
昨天原本打算是写salt的WebUi-halite的,不过想了想,还是先写一些“看得见、摸得着的”的一些显而易见,最基本的用处吧。(尝到一些甜头后,才会继续去钻研吧。。。哈哈~)那,什么是Targeting呢?官方给到的解释是:Specifyingwhichminionsshouldrunacommandorexecuteastateb..
分类:
其他好文 时间:
2014-07-29 15:27:39
阅读次数:
369
关键词:factory pattern , Dependency Injection(DI), Guice(pronounced “juice” )
参考:
【1】维基DI :http://en.wikipedia.org/wiki/Dependency_injection
【2】一篇博文:http://www.blogjava.net/xylz/archive/2009/xylz/arch...
分类:
其他好文 时间:
2014-07-29 15:10:38
阅读次数:
266