码迷,mamicode.com
首页 >  
搜索关键字:match    ( 5193个结果
php抓取网站图片源码
/'; $ret = preg_match_all($reg_tag, $site_content, $match_result); fclose($site_fd); return $match_result[1];}/* 对图片链接进行修正 */function revise_site($sit...
分类:Web程序   时间:2015-05-07 14:07:44    阅读次数:164
int preg_match( string pattern
preg_match -- 进行正则表达式匹配。并且只匹配一次,注意与preg_match_all区别。int preg_match( string pattern, string subject [, array matches [, int flags]] ) 在 subject 字符串中搜索与...
分类:其他好文   时间:2015-05-07 14:00:32    阅读次数:156
生产环境服务CPU高问题分析
问题描述: 现网个别时候会出现CPU突然飙高的现象,飙高后不能恢复正常。 分析过程: CPU飙高后抓dump,最好本机看,其它机器看dump可能需要下载服务运行机器的sos,clr 0:000> !threadpool The version of SOS does not match the ve...
分类:其他好文   时间:2015-05-07 06:24:20    阅读次数:132
Python中字符串查找效率比较
Python中字符串查找方式有多种,常见的有re.match/search or str.find 用一个例子来说明各种方式的效率如下: from timeit import timeit import re def find(string, text): if string.find(text) > -1: pass def re_find(string, t...
分类:编程语言   时间:2015-05-06 22:59:55    阅读次数:247
android布局--Android fill_parent、wrap_content和match_parent的区别
1)fill_parent设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。这跟Windows控件的dockstyle属性大体一致。设置一个顶部布局或控件为fill_parent将强制性让它布满整个屏幕。2) wrap_content设置一个视图的尺寸为...
分类:移动开发   时间:2015-05-06 14:30:46    阅读次数:123
navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) 判断是不是 移动设备 'ontouchstart' in window; 判断支不支
navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) 判断是不是 移动设备   'ontouchstart' in window; 判断支不支触屏...
分类:移动开发   时间:2015-05-06 13:24:01    阅读次数:710
vi技巧合集
VIM 技巧 match & replace match the whole word(eg: match printf but not snprintf/fprintf)You can use \ to match the end: %s/\/PRINTF/gc match the current...
分类:其他好文   时间:2015-05-06 12:44:36    阅读次数:139
Scala匹配模式-----序列匹配
鉴于用Scala工作通常意味着和序列打交道,要是能和列表、数组的长度和内容来匹配岂不美哉?下面的例子就做到了,它测试了两个列表来检查它们是否包含4个元素,并且第二个元素是3。//code-examples/Rounding/match-seq-script.scalavalwillWork=List(1,3,23,90)valwillNotWork=L..
分类:其他好文   时间:2015-05-05 19:53:44    阅读次数:128
一些二分匹配的题
/*poj1469简单的二分匹配*/#include#includeint map[1005][1005],vis[2000],match[2000];int n,m;int dfs(int u){ int i,j; for(i=1;i#includeint map[50][50],g[...
分类:其他好文   时间:2015-05-05 16:18:05    阅读次数:114
JS判断请求来自Android手机还是iPhone手机,根据不同的手机跳转到不同的链接。
var browser = {versions: function () {var u = navigator.userAgent, app = navigator.appVersion;return { //移动终端浏览器版本信息ios: !!u.match(/\(i[^;]+;( U;)? CP...
分类:移动开发   时间:2015-05-05 16:05:03    阅读次数:156
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!