命令模式(command pattern) 撤销(undo) 详细解释本文地址:http://blog.csdn.net/caroline_wendy參考命令模式:http://blog.csdn.net/caroline_wendy/article/details/31379977命令模式能够用于...
分类:
其他好文 时间:
2014-10-05 23:51:59
阅读次数:
203
??????简单工厂模式解释: 简单工厂模式(Simple Factory Pattern)属于类的创新型模式,又叫静态工厂方法模式(Static FactoryMethod Pattern),是通过专门定义一个类来负责创建其它类的实例,被创建的实例通常都具有共同的父类。简单工厂模式的UML图: 简...
分类:
其他好文 时间:
2014-10-05 22:28:09
阅读次数:
322
建造者模式(Builder Pattern) 一听这个名字,你可能就会猜到一二分了。建造者简单理解就是造东西,仅仅只是建造者模式建造的不是一个简单的东西,是一个比較复杂的东西。就好像盖房子,须要打地基、砌墙、灌水泥、封顶,最后墙面贴瓷砖。 建造者设计模式是一个构造复杂对象的设计模式。在一个软件系.....
分类:
其他好文 时间:
2014-10-05 21:58:48
阅读次数:
230
reactor设计模式,是一种基于事件驱动的设计模式。《Pattern-Oriented Software Architecture, Volume 2》对这个模式做了具体的解说。这个模式的结构图例如以下:图中的handle相应的是操作系统提供的句柄,比如I/O句柄,Event_Handler类持有...
分类:
其他好文 时间:
2014-10-05 21:32:08
阅读次数:
220
An invalid XML character (Unicode: 0x1a) was found in the element content of the documentThe processing instruction target matching "[xX][mM][lL]" is ...
分类:
其他好文 时间:
2014-10-05 14:01:58
阅读次数:
194
java实现package 经典;import java.math.BigInteger;import java.util.regex.Matcher;import java.util.regex.Pattern;public class BigIntegerAddition { /** ...
分类:
其他好文 时间:
2014-10-05 12:43:48
阅读次数:
168
代理模式通过插入第三方(代理对象)来分离调用者和被调用者(不同于执行者),而远程代理是最经典的代理之一,被调用者不在本地(处于另一个JVM中),无法直接调用它,此时就需要一个远程代理,调用者把调用请求发送给远程代理,代理对象和被调用者通信,再把调用结果传递给调用者
分类:
其他好文 时间:
2014-10-05 12:39:48
阅读次数:
237
Cut命令的局限 df -h | cut -d “ ” -f 5 /etc/passwd cut命令无法正确截取以空格为分隔符的内容AWK格式awk ‘条件1{动作1} 条件2{动作2}…’ filename 条件(Pattern)[一般使用关系表达式作为条件]: x>10 判断变量 x是否大于10 x>=10 大于等于 x 动作(Action): 格式化输出:print...
分类:
其他好文 时间:
2014-10-05 11:32:58
阅读次数:
166
‘.’ Matches any single character.‘*’ Matches zero or more of the preceding element.The matching should cover theentireinput string (not partial).The f...
分类:
其他好文 时间:
2014-10-04 06:16:56
阅读次数:
232
Problem Description
Lee has a string of n pearls. In the beginning, all the pearls have no color. He plans to color the pearls to make it more fascinating. He drew his ideal pattern of the string o...
分类:
其他好文 时间:
2014-10-03 22:31:45
阅读次数:
363