语法# grep match_pattern filename //将会输出符合match_pattern规定的内容,match pattern为通配符# grep -E match_pattern filename //这里的match_pattern为正则表达式# grep -o -E matc...
分类:
其他好文 时间:
2015-06-07 13:49:49
阅读次数:
102
String对象的replace方法包含两个参数,第一个参数表示执行匹配的正则表达式,也可以传递字符串,第二个参数表示代替匹配的子字符串。 var b = s.replace("str1","str2");与search和match方法不同,replace方法不会吧字符串转换为正则表达式对象,而.....
分类:
其他好文 时间:
2015-06-07 13:43:03
阅读次数:
160
纵观现在的应用程序,九宫格是非常常见的一种布局方式。很多优秀的手机应用程序都采用了这一布局。下面就android中九宫格布局方式的实现和大家做一个简单的介绍。
首先在youxi.xml的布局
android:layout_width="match_parent"
android:layout_height="match_parent"
>
...
分类:
移动开发 时间:
2015-06-07 09:37:52
阅读次数:
187
1.静态类部署方法:
layout.xml
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:id="@+id/fragment1"
...
分类:
移动开发 时间:
2015-06-06 09:14:03
阅读次数:
146
Gallery组件用于拖拽浏览图片,下面我们就来看一下如何实现。
一、实现Gallery
1.布局文件很简单:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/MyLayout"
android:layout_width="match_p...
分类:
移动开发 时间:
2015-06-05 17:43:52
阅读次数:
191
activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layou...
分类:
其他好文 时间:
2015-06-05 00:45:01
阅读次数:
169
三个属性都用来适应视图的水平或垂直大小,一个以视图的内容或尺寸为基础的布局比精确地指定视图范围更加方便。1)fill_parent设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。这跟Windows控件的dockstyle属性大体一致。设置一个顶部布局或...
分类:
移动开发 时间:
2015-06-05 00:38:10
阅读次数:
121
切记:js 正则表达式无需用双引号,正则表达式不是字符串。参考网址:http://www.w3school.com.cn/jsref/jsref_obj_regexp.asp个人用于查找字条串匹配的几个常用 函数: test(), search(),match() test()用法:返回值为true...
分类:
编程语言 时间:
2015-06-04 22:39:47
阅读次数:
171
maven的clean时报错 -Dmaven.multiModuleProjectDirectory system propery is not set.Check $M2_HOME environment variable and mvn script match.解决办法 1.添加M2_HO.....
分类:
其他好文 时间:
2015-06-04 19:00:15
阅读次数:
128
演示效果如下主要代码如下布局文件如下:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layo...
分类:
移动开发 时间:
2015-06-04 17:10:28
阅读次数:
194