'''匹配原则,匹配的数据只能够接受字符串'''import rem=re.match('abc','abcdfe')print(m.group())o=re.match('[0-9][0-9]','567ab123c5')#[0-9]只代表一个数字,这样子代表匹配两个数字p=re.match('[
分类:
其他好文 时间:
2016-02-13 12:16:38
阅读次数:
209
<?xml version="1.0" encoding="utf-8"?><ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" andro
分类:
其他好文 时间:
2016-02-12 15:10:08
阅读次数:
230
学了很多的ui的知识,这里就来实现个聊天的界面,首先来实现个layout的xml,代码如下:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_p...
分类:
移动开发 时间:
2016-02-11 22:42:28
阅读次数:
477
1. 1 <?xml version="1.0" encoding="utf-8"?> 2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="match
分类:
移动开发 时间:
2016-02-11 18:00:57
阅读次数:
258
这篇文章主要介绍了PHP实现手机号码中间四位用星号(*)隐藏的自定义函数分享,这是一个比较常用的功能,需要的朋友可以参考下 php屏蔽电话号码中间四位: Method 1:function hidtel($phone){ $IsWhat = preg_match('/(0[0-9]{2,3}[\-]
分类:
移动开发 时间:
2016-02-11 15:39:34
阅读次数:
256
FunctionIsBlank([string]$InputObject){
if(($InputObject-eq"")-or($InputObject-eq$Null)){
Return$True
}else{
Return$False
}
}
FunctionIsInteger([string]$InputObject){
if($InputObject-match"^\d+$"){
Return$True
}else{
Return$False
}
}
FunctionIsFloat([strin..
分类:
系统相关 时间:
2016-02-11 10:05:33
阅读次数:
1393
多模匹配 题目大意:给定很多个字串A,B,C,D,E....,然后再给你目标串str字串,看目标串中出现多少个给定的字串。 经典AC自动机模板题,不多说。 1 #include <iostream> 2 #include <algorithm> 3 #include <functional> 4 #
分类:
其他好文 时间:
2016-02-10 00:30:49
阅读次数:
253
串珠子 题目大意:给定一个字串,要你找到如果要使之成为循环串,在末尾需要的最小的字数(只能添加字符,不能删减字符) 首先联动一下之前做过的动态规划问题POJ 3280,当然了3280这一题是用的LD,因为他可以添加或者删除(加上修改也行,但是要改状态方程了) 而我们现在要讨论的这一题(HDU 374
分类:
编程语言 时间:
2016-02-05 19:18:40
阅读次数:
182
奶牛矩阵 题目大意:给定一个矩阵,要你找到一个最小的矩阵,这个矩阵的无限扩充的矩阵包含着原来的矩阵 思路:乍一看这一题确实很那做,因为我们不知道最小矩阵的位置,但是仔细一想,如果我们能把矩阵都放在左上角该多好,这样一来这一题好像又是循环数组那个样子了(二维的)。 而事实上我们确实可以把所有情况都放在
分类:
编程语言 时间:
2016-02-05 19:12:32
阅读次数:
215
题 SmallR is an archer. SmallR is taking a match of archer with Zanoes. They try to shoot in the target in turns, and SmallR shoots first. The probabil
分类:
其他好文 时间:
2016-02-05 18:42:56
阅读次数:
129