码迷,mamicode.com
首页 >  
搜索关键字:match    ( 5193个结果)
PHP正则表达式匹配中文字符
网上有很多类似的文章,但往往都不能用 所以记录一下preg_match_all("/([\x{4e00}-\x{9fa5}])/u", $input, $match); 注意:限定代码文件和input字符串都是utf-8编码才可以
分类:Web程序   时间:2015-07-30 10:55:18    阅读次数:149
diff两个文件夹里的东西
diff --help -x, --exclude=PAT exclude files that match PAT 排除某个类型的文件 -u, -U NUM, --unified[=NUM] output NUM (default 3) lines of unified context 输...
分类:其他好文   时间:2015-07-29 22:54:38    阅读次数:172
php正则表达式中的非贪婪模式匹配的使用
php正则表达式中的非贪婪模式匹配的使用 通常我们会这么写: $str = "http://www.baidu/.com?url=www.sina.com/"; preg_match("/http:(.*)com/", $str, $matches); print_r($matches); 结果: Array ( [0] => http://www.baidu/...
分类:Web程序   时间:2015-07-29 10:15:25    阅读次数:119
写字板
activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:lay...
分类:其他好文   时间:2015-07-29 01:06:54    阅读次数:203
Android ViewPager引导页(三)
一:ViewPager和导航点的实现: 主布局为guide.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" ...
分类:移动开发   时间:2015-07-28 21:05:57    阅读次数:135
JS判断是PC浏览器还是手机设备浏览器
$(function () { var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "ipho...
分类:移动开发   时间:2015-07-28 18:29:10    阅读次数:148
剑指offer第53题
#includeusing namespace std;bool match(char *str,char* pattern){ if(*str=='\0'&&*pattern=='\0') return true; if(*str!='\0'&&*pattern=='\0') return f.....
分类:其他好文   时间:2015-07-28 10:34:23    阅读次数:121
组件的使用(一)Spinner的使用
Spinner即下拉菜单。在android中实现Spinner组件需要以下三个步骤:1.在XML文件中定义标签Spinner<Spinner android:id="@+id/spinner" android:layout_width="match_parent" android:layout_height="wrap_content" />2.在Str...
分类:其他好文   时间:2015-07-28 00:53:53    阅读次数:110
python中出现IndentationError:unindent does not match any outer indentation level错误
python中出现IndentationError:unindent does not match any outer indentation level今天在网上copy的一段代码,代码很简单,每行看起来该缩进的都缩进了,运行的时候出现了如下错误: 【解决过程】 1.对于此错误,最常见的原因是,的确没有缩进。根据错误提示的行数,去代码中看了下,看起来没有什么问题呀,都有缩进,而且语法也没...
分类:编程语言   时间:2015-07-27 21:08:55    阅读次数:125
xml布局内容总结(二)--Android
关于xml中margin和padding的内容,在刚接触xml的时候会有些混淆和模糊,在此进行总结,希望能帮助到有需要的人。 2.xml中margin和padding     android:layout_width="match_parent"     android:layout_height="match_parent"     android:layout_margin...
分类:移动开发   时间:2015-07-27 19:12:32    阅读次数:116
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!