一个、概念 简单工厂模式(Simple Factory Pattern)它属于创建模式,又称静态工厂方法模式(Static FactoryMethod Pattern)。可是不属于23GOF设计模式之中的一个。简单工厂模式是由一个工厂对象决定创建出哪一种产品类的实例。二、UML图 简单工厂主要分.....
分类:
其他好文 时间:
2015-07-14 20:17:48
阅读次数:
171
设计模式 design pattern 它被设置为可重复使用,大多数人都知道,经过编目,的代码设计经验总结。设计模式是可重用的代码,使代码更easy别人所理解。设计模式使真正的编程代码project的。系统。一般分为两个大类,应用程序工具箱和框架。api就是工具箱。框架是构成一类特定软件可复用的一组...
分类:
其他好文 时间:
2015-07-14 15:07:01
阅读次数:
140
Suitable environment.
1.Creation of complex object and don’t want to know how it is assembled (need encapsulation of creation process)
2.For same object ,it have more than one construction representa...
分类:
其他好文 时间:
2015-07-14 13:42:26
阅读次数:
91
My first thought made it unnecessarily difficult. Well, the correct solution falls into a typical pattern: use DP to calc cumulative results of each c...
分类:
其他好文 时间:
2015-07-14 07:33:48
阅读次数:
1246
一、awk基本用法awk[options]‘scripts‘file1,file2...awk[options]‘pattern{action}‘file1,file2...#-F选项指定分隔符,$num,代表第num个字段
[root@docker1~]#awk-F:‘{print$1,$3}‘/tmp/passwd
root0
bin1
daemon2
adm3
......
#匹配正则表达式用:/正则表达式/,匹配以r开头..
分类:
其他好文 时间:
2015-07-14 06:26:21
阅读次数:
120
Decorator是用来解决如何动态的向一个对象添加额外功能问题的模式。...
分类:
其他好文 时间:
2015-07-13 20:42:01
阅读次数:
112
string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for ...
分类:
其他好文 时间:
2015-07-13 20:35:03
阅读次数:
103
package com.web服务器区端判断请求是否移动设备;import java.util.regex.Matcher;import java.util.regex.Pattern;public class WebRequestUtil { // \b 是单词边界(连着的两个(字母字符 与...
分类:
移动开发 时间:
2015-07-13 20:20:03
阅读次数:
135
$str=''; $pattern="//i"; preg_match_all($pattern,$str,$match); echo ''; print_r($match);
分类:
Web程序 时间:
2015-07-13 18:02:15
阅读次数:
149
public static List getDigit(String text) { List digitList = new ArrayList(); Pattern p = Pattern.compile("(\\d+)"); Matcher m = p.matcher(text); w...
分类:
编程语言 时间:
2015-07-13 17:32:37
阅读次数:
110