$x("//a") //xpathvar a=/d+/gia.exec(document.body.innerText) //regular expressiondocument.body.innerText.match(a)
分类:
其他好文 时间:
2014-10-03 19:12:05
阅读次数:
158
1 $content = "html代码";2 preg_match_all("/(href|src)=([\"|']?)([^ \"'>]+\.(gif|jpg|jpeg|bmp|png))\\2/i", $content, $img_array);3 print_r($img_array);
分类:
Web程序 时间:
2014-10-03 02:18:23
阅读次数:
176
xml文件:
<ListView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="#0...
分类:
移动开发 时间:
2014-09-30 20:40:20
阅读次数:
328
一个布局中包含另一个布局
1.在layout下定义activity_other.xml布局
2.代码中的包含如下:
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_par...
分类:
移动开发 时间:
2014-09-30 11:45:39
阅读次数:
184
方法作用:匹配指定的正则表达式并将结果放在$match数组中代码示例:$p = '/name:([\\ws]+)/';$str = "name:steven jobs";preg_match($p, $str, $match);var_dump($match); //结果为:steven jobs输...
分类:
Web程序 时间:
2014-09-29 19:54:11
阅读次数:
346
php字符串截取问题解答用两数组存放array1("今","星期","")array2("201111月2号","三")按照"(",")"字符截取解决方法:'; // www.jbxue.compreg_match_all('/((.+))/iU', $a, $match);$array2 = $m...
分类:
Web程序 时间:
2014-09-29 09:15:07
阅读次数:
155
由于不同的sim卡对应不同的mccmnc, 导致min_match的值发生变化,
新的min_match值与之前phone_lookup表中保存的min_match不一直,导致无法匹配上。
修改如下:
1. 添加URI
修改ContactsProvider2.java,
private static final int PHONE_LOOKUP = 4000;
下面加...
分类:
移动开发 时间:
2014-09-28 18:00:44
阅读次数:
208
自己写的,在MVC框架里面可以直接使用!
/**
* @author F.Z.B
* @description 循环检测目录
*
* @param $dir
* @param string $split
*
* @return bool
*/
function chkDir($dir, $split = '/')
{
preg_match_all...
分类:
Web程序 时间:
2014-09-27 22:29:50
阅读次数:
199
使用log4j.xml进行log4j的配置,在项目中报如下异常:
log4j:ERROR The content of element type "log4j:configuration" must match "(renderer*,appender*,(category|logger)*,root?,categoryFactory?)"....
分类:
移动开发 时间:
2014-09-26 20:42:18
阅读次数:
371
1、编写界面<WebViewandroid:id="@+id/webview"android:layout_width="match_parent"android:layout_height="match_parent"/>2、申请权限<uses-permissionandroid:name="android.permission.INTERNET"/>3、MainActivity.javapackagecom.malakana.webview;importand..
分类:
移动开发 时间:
2014-09-26 01:45:48
阅读次数:
431