摘要: 平时使用springMVC在方法中访问session中经常很自然地调用Servlet API。用起来非常直观方便,一直没有多考虑什么。比如这样:@RequestMapping(value = "/logout")public String logout(HttpSession session) { ... 阅读全文
posted @ 2014-07-17 17:59 Introspector 阅读(46591) 评论(2) 推荐(1) 编辑
摘要: static void swap(int[] data, int i, int j) { //记得加此条件,data[i]与data[j]相同时异或运算得0 if (data[i] != data[j]) { data[i] = data[i] ^ data[j]; data[j] = data[i] ^ data[j]; data[i] = data[i] ^ data[j]; } } static void sort(int[] data, int begin, int ... 阅读全文
posted @ 2013-04-21 16:08 Introspector 阅读(551) 评论(0) 推荐(0) 编辑
摘要: 泛型几乎都用‘E’来表示,写着写着就弄混淆了如下:class GenericArrayProblem { public static void main(String[] args) { // Exception in thread "main" java.lang.ClassCastException: // [Ljava.lang.Object; cannot be cast to [Ljava.lang.String; new PrinterWrapper<String>("abc", new StringPrinter()).prin 阅读全文
posted @ 2013-04-17 15:01 Introspector 阅读(433) 评论(0) 推荐(0) 编辑
摘要: interface a { void go(); void act();}interface b extends a {}abstract class c implements b { public void go() { }}class d extends c { @Override public void go() { super.go(); } /* * (non-Javadoc) * * @see pac.testin.a#act() */ public void act() { ... 阅读全文
posted @ 2013-03-29 22:09 Introspector 阅读(384) 评论(0) 推荐(0) 编辑
摘要: package pac.testin;import java.lang.reflect.InvocationHandler;import java.lang.reflect.Method;import java.lang.reflect.Proxy;interface Person { void showCommonAbility();}class Man implements Person { private String name; public Man(String name) { super(); this.name = name; ... 阅读全文
posted @ 2013-03-26 19:23 Introspector 阅读(162) 评论(0) 推荐(0) 编辑
摘要: package pac.testin;import java.lang.reflect.InvocationHandler;import java.lang.reflect.Method;import java.lang.reflect.Proxy;interface Subject { void request();}class RealSubject implements Subject { public void request() { System.out.println("Here RealSubject go!!"); }}class userSid... 阅读全文
posted @ 2013-03-25 19:04 Introspector 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 代码: BigDecimal d1 = new BigDecimal(666666); BigDecimal rate = new BigDecimal(0.00876 * 3); BigDecimal tax = new BigDecimal(1274.23); System.out.println(d1.multiply(rate).add(d1).subtract(tax).setScale(2, RoundingMode.HALF_UP));java.math.RoundingMode下七种方式:RO... 阅读全文
posted @ 2013-03-24 23:19 Introspector 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 易变业务用Script编写import javax.script.ScriptEngine;import javax.script.ScriptEngineManager;import javax.script.Bindings;import javax.script.ScriptContext;import javax.script.Invocable;import javax.script.ScriptException; ScriptEngine engine = new ScriptEngineManager() .getEngineByNa... 阅读全文
posted @ 2013-03-22 16:09 Introspector 阅读(829) 评论(0) 推荐(0) 编辑
摘要: windows下进入cmd,输入“sqlcmd”回车。输入:restore database boss from disk = 'F:\boss1355.bak' with replace, move 'boss' to 'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\boss.mdf',move 'boss_log' to 'D:\Program Files\Microsoft SQL Server\MSSQL10_50.M 阅读全文
posted @ 2013-02-04 10:03 Introspector 阅读(2267) 评论(0) 推荐(0) 编辑
摘要: 1 String keyStr = "SPARTAGO"; 2 String data = "这也是斯巴达"; 3 4 SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); 5 DESKeySpec keySpec = new DESKeySpec(keyStr.getBytes()); 6 Key key = keyFactory.generateSecret(keySpec); 7 8 Algo... 阅读全文
posted @ 2012-12-20 14:48 Introspector 阅读(259) 评论(0) 推荐(0) 编辑
摘要: config.php에 배치: //'URL_HTML_SUFFIX' => '.dlut' HTML_SUFFIX 배치엄금 'URL_MODEL ' => '2'project root에 .htaccess설치:<IfModule mod_rewrite.c>RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php/$1 [QSA, 阅读全文
posted @ 2012-08-31 21:48 Introspector 阅读(160) 评论(0) 推荐(0) 编辑
摘要: edit .reg file:Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\jinjj]"URL Protocol"="C:\\Program Files\\jinjj\\trans.exe"@="jinjjProtocol"[HKEY_CLASSES_ROOT\jinjj\DefaultIcon]@="C:\\Program Files\\jinjj\\trans.exe,1"[HKEY_CLASSES_ROOT\jinjj\shell][HKEY_ 阅读全文
posted @ 2012-08-17 16:49 Introspector 阅读(762) 评论(0) 推荐(0) 编辑
摘要: ORG의 Net.UpdateFile[ 속성 ]maxSize 최고크기allowExtsallowTypes 사용가능한 파일thumb 是否对上传图片进行缩略图处理thumbPath 缩略图保存路径thumbMaxWidth 缩略图最大宽度thumbMaxHeight 缩略图最大高度thumbPrefix 缩略图命名前缀thumbSuffix 缩略图命名后缀 默认为 _thumbautoSub 是否启用子目录保存subType 子目录创建方式 目前可以支持hash和datedateFormat 日期格式的上传子目录创建格式 当subType=date 时有效 默认值YmdsavePath 阅读全文
posted @ 2012-08-17 15:57 Introspector 阅读(697) 评论(0) 推荐(0) 编辑
摘要: 필요한 jar package(http://commons.apache.org)betwixt API 참고:http://commons.apache.org/betwixt/betwixt-0.8/docs/apidocs/index.htmlcommons-beanutils-1.8.3.jar commons-betwixt-0.8.jar commons-collections-3.2.1.jar commons-digester-2.1.jar commons-logging-1.1.1.jarpackage test;import java.beans.Introspecti 阅读全文
posted @ 2012-08-15 15:04 Introspector 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 构造方法摘要Object()方法摘要protected Object clone() 创建并返回此对象的一个副本。boolean equals(Object obj) 指示某个其他对象是否与此对象“相等”。protected void finalize() 当垃圾回收器确定不存在对该对象的更多引用时,由对象的垃圾回收器调用此方法。Class<? extends Object> getClass() 返回一个对象的运行时类。int hashCode() 返回该对象的哈希码值。void notify... 阅读全文
posted @ 2012-08-09 22:15 Introspector 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 第一,谈谈final, finally, finalize的区别。 第二,Anonymous Inner Class (匿名内部类)是否可以extends(继承)其它类,是否可以implements(实现)interface(接口)? 第三,Static Nested Class和Inner Class的不同,说得越多越好(面试题有的很笼统)。 第四,&和&&的区别。 第五,HashMap和Hashtable的区别。 第六,Collection和Collections的区别。 第七,什么时候用assert。 第八,GC是什么?为什么要有GC? ... 阅读全文
posted @ 2012-08-09 22:11 Introspector 阅读(222) 评论(0) 推荐(0) 编辑