usingSystem;namespaceFactoryMethod{//////MainAppstartupclassforStructural///FactoryMethodDesignPattern.///classMainApp{//////Entrypointintoconsoleappl...
分类:
其他好文 时间:
2014-05-29 04:12:05
阅读次数:
248
出现原因:PHP版本6中
取消了get_magic_quotes_gpc()函数,首先这个函数的作用:是为了防止sql注入,当该函数打开时将所有单引号,双引号,反斜线和空字符转会自动转为含有反斜线的溢出字符。PHP6取消magic_quotes机制,那么就是默认转义一些特殊字符来防止sql注入。可以...
分类:
Web程序 时间:
2014-05-29 02:31:10
阅读次数:
282
模板方法模式Template Method
Pattern定义一个操作的算法的框架,是的子类可以不改变算法结构即可重定义该算法一些特定步骤public abstract class
AbstractClass{//抽象模板类protected abstract void method1();//算法...
分类:
其他好文 时间:
2014-05-29 00:11:54
阅读次数:
309
利用 Method 对象的 invoke 方法调用目标对象的方法时,
若在目标对象的方法内部抛出异常,会被包装成 InvocationTargetException 异常抛出, 可以通过调用
InvocationTargetException异常类的的 getTargetException() 方法...
分类:
其他好文 时间:
2014-05-28 04:13:42
阅读次数:
202
一、单一职责原则 (1)核心思想:一个类最好只做一件事,只有一个引起它变化的原因
(2)常用模式:Facade模式、Proxy模式 (3)基本方法:Extract Interface 抽取接口、Extract Class
抽取类、Extract Method 抽取方法 (4)DEMO:数据库...
分类:
Web程序 时间:
2014-05-26 19:22:27
阅读次数:
398
C++的静态方法是用static关键字,python
j是没用static的。python中实现静态方法和类方法都是依赖于python的修饰器来实现的。classMyClass:defmethod(self):print("method")@staticmethoddefstaticMethod()...
分类:
编程语言 时间:
2014-05-26 18:16:42
阅读次数:
282
异常:java.lang.LinkageError: loader constraint
violation: when resolving interface method
"javax.servlet.jsp.JspApplicationContext.getExpressionFactory(...
分类:
编程语言 时间:
2014-05-26 17:37:46
阅读次数:
262
We are the World词曲:Michael Jackson & Lionel
RichThere comes a time when we heed a certain call (Lionel Richie 莱昂纳尔.里奇)When
the world must come togethe...
分类:
其他好文 时间:
2014-05-26 17:07:17
阅读次数:
266
Question0Sign in to voteFolks,In my
application, when the user hits "Submit" button, I have to make a Web service
call asynchronously. Here is what I ...
分类:
其他好文 时间:
2014-05-25 22:19:32
阅读次数:
657
文件上传:这里用得时表单上传的方式,表单上传到的时候
method一定指定为POST,enctype="multipart/form-data".第一种方式,直接上传、读取、显示内容,并没有存储到服务器端。 1 2
6 7 8 9 10 ">11 12 My J...
分类:
Web程序 时间:
2014-05-25 15:12:42
阅读次数:
363