1.preg_match和preg_match_all的区别
preg_match和 preg_match_all区别是preg_match只匹配一次。而preg_match_all全部匹配,直到字符串结束。例:
<?php
//注:正则 /a.+?e/ 是非贪婪模式(因为量词‘+’后面加上了‘?’),如果使用 /a.+?e/U 则变回了贪婪模式
preg_match("/a.+?e/","a...
分类:
Web程序 时间:
2014-10-14 10:08:18
阅读次数:
266
<?php
$str = <<<EOT
微信公众平台 名称...
分类:
其他好文 时间:
2014-10-14 08:45:08
阅读次数:
344
有网友表示对于很多工程中的MATCH_PARENT出现在layout中感到不明白,过去只有FILL_PARENT和WRAP_CONTENT那么match_parent到底是什么类型呢? 其实从Android 2.2开始FILL_PARENT改名为MATCH_PARENT ,从API Level为8开...
分类:
其他好文 时间:
2014-10-13 18:14:59
阅读次数:
176
Angular model objects with JavaScript classes The missing piece in AngularJS Unlike Backbone and Ember, AngularJS does not provide a standardized way to define model objects. The model part of MVC*...
分类:
编程语言 时间:
2014-10-13 13:35:00
阅读次数:
242
Semantic Warnings
Warning
Message
-WCFString-literal
input conversion stopped due to an input byte that does not belong to the input codeset UTF-8
-WNSObject-attribute...
分类:
移动开发 时间:
2014-10-12 04:21:47
阅读次数:
340
写在前面,在研究Oracle logmnr 的时候看到http://www.askmaclean.com/archives/dbms_logmnr-unsupported-sqlredo.html 的文章,其中有一句不知道maclean测试的是哪个版本的数据库,我测试的情况是可以的。Connecte...
分类:
数据库 时间:
2014-10-11 20:12:26
阅读次数:
236
git init commit 等bug error:?src?refspec?master?does?not?match?any. 引起该错误的原因是,目录中没有文件,空目录是不能提交上去的 error:?insufficient?permission?for?adding?an?object?to?...
分类:
其他好文 时间:
2014-10-11 18:02:06
阅读次数:
239
安装rac10g,出现如下错误:
[root@rac2 oracle]# /u01/product/crs/root.sh
WARNING: directory '/u01/product' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does no...
分类:
其他好文 时间:
2014-10-11 17:29:05
阅读次数:
241
1264: [AHOI2006]基因匹配MatchTime Limit: 10 SecMemory Limit: 162 MBSubmit: 541Solved: 347[Submit][Status]Description基因匹配(match)卡卡昨天晚上做梦梦见他和可可来到了另外一个星球,这个星...
分类:
其他好文 时间:
2014-10-11 15:26:15
阅读次数:
212
题意:给两个字符串,求一个最短的子串。使得这个子串在两个字符串中出现的次数都等于1.出现的定义为:能够重叠的出现。解法:后缀数组的应用。从小枚举长度。假设一个长度len合法的话:则一定存在这个样的sa[i]排名。sa[i]与s[i+1]的公共前缀长度大于等于len,且sa[i]与[i-1]的公共前缀...
分类:
编程语言 时间:
2014-10-11 15:12:15
阅读次数:
213