<?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" and ...
分类:
其他好文 时间:
2016-04-19 18:59:59
阅读次数:
233
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" ...
分类:
其他好文 时间:
2016-04-19 15:42:04
阅读次数:
189
首先,我们先看一段PHP代码: <?php $time = date ("Y-m-d H:i:s"); $pattern = "/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/i"; if(preg_match($pattern,$time,$arr)){ echo "<p ...
分类:
其他好文 时间:
2016-04-19 08:50:00
阅读次数:
128
有时候我们需要使用php获取网页中的图片并保存下来,这里我们可以使用preg_match_all用来匹配图片地址,需要的码农可以参考下 preg_match_all 函数:int preg_match_all ( string pattern, string subject, array match ...
分类:
Web程序 时间:
2016-04-18 15:32:21
阅读次数:
149
item.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_p ...
分类:
其他好文 时间:
2016-04-18 11:55:54
阅读次数:
165
test test 返回 Boolean,查找对应的字符串中是否存在模式。var str = "1a1b1c";var reg = new RegExp("1.", "");alert(reg.test(str)); // true exec exec 查找并返回当前的匹配结果,并以数组的形式返回。 ...
分类:
Web程序 时间:
2016-04-17 12:55:47
阅读次数:
155
http://acm.hdu.edu.cn/showproblem.php?pid=1797 就是模拟 我的思路是标记aba 和h的位置 然后就判断是否正确 就行了 还有就是 最后 fkfkfkfk交叉也可以 ...
分类:
其他好文 时间:
2016-04-16 21:33:45
阅读次数:
256
一.新建一个工程其activity_main.xml文件如下<?xmlversion="1.0"encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout..
分类:
其他好文 时间:
2016-04-16 19:44:28
阅读次数:
239
ToggleButton有两种状态,选中和未选中,即开和关,需要在不同状态下显示不同的文本。属性:android:checked="true"android:textOn="开"android:textOff="关"具体文本可以自己设置新建View:<ImageView
android:id="@+id/iv1"
android:layout_width="match_parent"
android:..
分类:
其他好文 时间:
2016-04-16 19:36:09
阅读次数:
115
短语匹配(Phrase Matching)就像用于全文搜索的的match查询一样,当你希望寻找邻近的单词时,match_phrase查询可以帮你达到目的。GET /my_index/my_type/_search
{
"query": {
"match_phrase": {
"title": "quick brown fox"
}...
分类:
其他好文 时间:
2016-04-16 11:02:58
阅读次数:
324