http://www.imooc.com/learn/350 $pattern='/[0-9]/'; $subject="bjd5454f121fff52"; $m1=array(); $t1=preg_match($patte...
分类:
其他好文 时间:
2015-04-22 17:59:49
阅读次数:
85
refresh_pattern指令在squid配置文件中定义,此参数控制着数据在磁盘上缓存的时间。语法如下:refresh_pattern[-i]regexpminpercentmax[options]1,regexp:是匹配正则表达式,注意这里是区分大小写的,使用-i选项来定义它忽略大小写2,min和max:单位是分钟,表示某个响应驻留..
分类:
其他好文 时间:
2015-04-22 15:56:00
阅读次数:
147
HTML5 新特性
新的DocType: 不需要声明文档类型;脚本和链接不需要type属性,如 lingk, script;语义化标签,如:header, footer, hgroup, mark, figure, small, article,属性及校验,
新的属性,如:placeholder, required, autofocus, pattern, autocompl...
分类:
Web程序 时间:
2015-04-22 13:54:46
阅读次数:
228
关于设计模式(Design Pattern),自从“四人帮”第一次在《Design Patterns: Elements of Reusable Object-Oriented Software》中将其上升到理论高度,发展到今天已经成为众所周知的代码设计经验的总结。然而,关于设计模式的具体使用,.....
分类:
其他好文 时间:
2015-04-22 13:14:35
阅读次数:
124
The MVC application modelA Play application follows the MVC architectural pattern applied to the web architecture.This pattern splits the application ...
分类:
其他好文 时间:
2015-04-22 12:59:46
阅读次数:
191
seq 9 | sed 'H;g' | awk -v RS='' '{for(i=1;i
预备知识:
seq:产生一个序列
sed:模式空间和存储空间
H:将pattern space中的内容append到hold
space\n后
g:将存储空间的数据覆盖模式空间
输出的时候使用的模式空间,存储空间只是一个暂存器
1、seq产生1,然后加到sed模式空间,H将模式空...
分类:
其他好文 时间:
2015-04-22 11:51:01
阅读次数:
172
package cn.outofmemory.snippets.core;import java.util.regex.Pattern;/** * A collection of utilities relating to InetAddresses. */public class InetAddr...
分类:
编程语言 时间:
2015-04-22 11:34:04
阅读次数:
394
什么是正则表达式?根据模式匹配搜索文本,并将符合模式的文本行显示出来。模式(Pattern):文本字符和正则表达式的元字符组合而成的匹配条件。grep:-i忽略字母大小写-v反向查找-o只显示被匹配到的字符串本身--color将匹配到的字符用颜色显示-A显示被匹配到的行的下面几行,..
分类:
其他好文 时间:
2015-04-22 02:07:43
阅读次数:
125
单例模式(Singleton Pattern)是 Java 中最简单的设计模式之一,属于创建型模式。
单例模式定义:保证一个类仅有一个实例,并提供一个访问它的全局访问点。单例模式的使用场景: 比如要求产生唯一序列号; 比如创建的对象需要消耗的资源过多,如 I/O 与数据库的连接等。 单例模式的特点:①构造函数是私有的;②单例类只能有一个实例。其实②是①的结果。通常可以使用下面的几种方式创建单例模式...
分类:
其他好文 时间:
2015-04-22 00:41:02
阅读次数:
124
Binary numbers and their pattern of bits are always very interesting to computer programmers. In this problem you need to count the number of positive...
分类:
其他好文 时间:
2015-04-22 00:13:50
阅读次数:
287