导读: php用正则表达式判断手机号码的写法:从文章中匹配出所有的手机号就可以preg_match_all(),如果要检查用户输入的手机号是否正确可这样来检查:preg_match().用正则匹配手机号码的时候, 我们先分析一下手机号码的规律:1. 手机号通常是11位的2. 经常是1开头3. 第二个...
分类:
移动开发 时间:
2015-04-14 12:43:30
阅读次数:
181
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:id="@+id/short...
分类:
移动开发 时间:
2015-04-14 11:22:10
阅读次数:
152
解决办法:
Tools-Options,选中Debugging选项卡,里面有个“Require source to exactly match...”的勾先去掉,然后稍微修改下代码,保存后,再把勾勾上,然后直接运行,发现断点已经命中(注意:在稍微修改代码之后,不能马上clean/rebuild)...
分类:
其他好文 时间:
2015-04-14 11:21:07
阅读次数:
199
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:id="@+id/top_tv"
android:layout_wi...
分类:
移动开发 时间:
2015-04-14 11:13:02
阅读次数:
223
1、listview增加footer时,为footer下面设置横线,使用android:footerDividersEnabled="true"不好使。 解决办法: 将该listview的android:layout_height="wrap_content"改成match_parent就好了。 2、给TextView设...
分类:
移动开发 时间:
2015-04-13 13:08:46
阅读次数:
156
采用正则表达式获取地址栏参数:functionGetQueryString(name){varreg=newRegExp("(^|&)"+name+"=([^&]*)(&|$)");varr=window.location.search.substr(1).match(reg);if(r!=null...
分类:
Web程序 时间:
2015-04-13 12:23:55
阅读次数:
129
三个属性都用来适应视图的水平或垂直大小,一个以视图的内容或尺寸为基础的布局比精确地指定视图范围更加方便。1)fill_parent 设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。如:设置一个顶部布局或控件为fill_parent后将强制性让它布满整....
分类:
移动开发 时间:
2015-04-12 01:14:42
阅读次数:
128
android屏幕适配详解官方地址:http://developer.android.com/guide/practices/screens_support.html一、关于布局适配建议1、不要使用绝对布局2、尽量使用match_parent 而不是fill_parent 。3、能够使用权重的地方尽...
分类:
移动开发 时间:
2015-04-11 23:51:23
阅读次数:
179
python初学者,非常喜欢虫师的文章。练习时发现一个小bug,http://www.cnblogs.com/fnng/p/3782515.html验证邮箱格式一题中,第三个x不允许有数字,但是测试发现abc@de.f2g 仍显示验证邮箱地址正确发现 re.match() 匹配的只是开头,故想到了分...
分类:
其他好文 时间:
2015-04-11 10:14:49
阅读次数:
129
http://www.crifan.com/python_syntax_error_indentationerror/【问题】一个python脚本,本来都运行好好的,然后写了几行代码,而且也都确保每行都对齐了,但是运行的时候,却出现语法错误:IndentationError: unindent do...
分类:
编程语言 时间:
2015-04-10 21:45:35
阅读次数:
113