7.5 字符串模式匹配
re模块为高级字符串成处理提供了正则表达式匹配。 对于复杂的匹配和处理,正则表达式能够提供简明优化的方法:
>>> import re
>>> re.findall(r’\bf[a-z]*’, ’which foot or hand fell fastest’)
[’foot’, ’fell’, ’fastest’]
>>> re.sub(r’(\b[a-z]+)...
分类:
编程语言 时间:
2014-05-14 01:04:22
阅读次数:
490
asp.net 实现“九连环”小游戏
wildcatsky(原作)
public Class ChinaRing1
Inherits System.Web.UI.Page
#Region " Web 窗体设计器生成的代码 "
'该调用是 Web 窗体设计器所必需的。
Private Sub InitializeComponent()
End Sub
Protected Wi...
分类:
Web程序 时间:
2014-05-14 00:30:45
阅读次数:
390
2003打开Word窗口,依次点击“工具----宏----Visual
Basic编辑器”,打开“Microsoft visual
Basic”窗口,在左侧“工程”栏选中“Normal”工程,点击“插入----模块”选项打开一个模块窗口,输入以下代码:Sub
MyPaste()Selection.P...
分类:
其他好文 时间:
2014-05-12 07:34:37
阅读次数:
316
本节讲述PDSP监控的配置。
QMSS PDSP:The queue manager sub system contains two or eight packed data structure processors (PDSP) and associated hardware that allow autonomous QMSS-related tasks with interrupt not...
分类:
其他好文 时间:
2014-05-11 04:02:36
阅读次数:
507
此工具函数没实际意义,只是鉴于EXT的extend方法不太好理解,写了一个简化的extend方法,帮助理解.
/**
*
*/
E = {};
E.extend = function(sub, sup) {
//借用构造函数
sub.prototype = sup;
//保留父类的构造函数,以便在子类构造函数中用调用,将父类变量绑定在this下
sub.prototype.supe...
分类:
Web程序 时间:
2014-05-10 04:22:07
阅读次数:
327
asp.net上传图片并同时生成缩略图
Sub UploadFile(sender As Object, e As EventArgs)
If FileUp.PostedFile.ContentLength = 0 Then
FileInfo.Visible = False
Exit Sub
Else
FileInfo.Visible = True
FDisplay1...
分类:
Web程序 时间:
2014-05-10 04:19:36
阅读次数:
372
这篇文章总结了关于Java构造的常见??问题。
1)为什么创建一个子类对象要也需要调用父类的构造函数?
class Super {
String s;
public Super(){
System.out.println("Super");
}
}
public class Sub extends Super {
public Sub(){...
分类:
编程语言 时间:
2014-05-09 22:44:26
阅读次数:
443
题意:求长度不超过K的最大的连续序列的和
思路:采用单调队列,我们要求的是Max{sum[i]-sum[j]}(i-j#include
#include
#include
#include
using namespace std;
const int MAXN = 1000005;
const int INF = 0x3f3f3f3f;
int n,k;
int arr[MAXN],s...
分类:
其他好文 时间:
2014-05-09 01:57:07
阅读次数:
264
int main(){000000013FA01010 push rdi
000000013FA01012 sub rsp,50h 000000013FA01016 mov rdi,rsp 000000013FA01019 mov
...
分类:
其他好文 时间:
2014-05-08 23:40:05
阅读次数:
484
1
显示进度条先弄一个label标签,capation属性设为空白,背景色设为深蓝色然后弄一个timer控件,同时时间间隔为(Interval):100Private
Sub Timer1_Timer()Label1.Width = Label1.Width + 20End Sub
分类:
其他好文 时间:
2014-05-07 13:17:44
阅读次数:
363