一。比较Comparable & Comparator 都是用来实现集合中元素的比较、排序的,只是 Comparable 是在内部实现的排序,Comparator 是在外部实现的排序。用 Comparator 是策略模式(strategy design pattern),不改变对象自身,而用一个策略...
分类:
其他好文 时间:
2014-07-16 22:55:37
阅读次数:
181
用相对路径有时居然是这样,所以还是用绝对路径好点,加上比如create页面的action为ssh/pages/User/create,那么create页面的上的action路径如果为pages/Role/save,那么其实访问后台的路径是为ssh/pages/User/pages/Role/save...
分类:
其他好文 时间:
2014-07-16 22:51:40
阅读次数:
319
sudo apt-get install golanggccgo安装gcc -v 查看--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin 如果有一个go,说明你的gcc支持golang,那么就执行...
分类:
其他好文 时间:
2014-07-16 21:33:13
阅读次数:
268
//获得类类型的两种方式1、 Class cls1 = Role.class; 2、 Class cls2 = Class.forName("yui.Role"); 注意第二种方式中,forName中的参数一定是完整的类名(包名+类名),并且这个方法需要捕获异常。 现在得到cls1就可以创建一个.....
分类:
其他好文 时间:
2014-07-16 19:48:03
阅读次数:
146
This is the 1st pattern I study. In here, I will mark down my doubts, java study, DESIGN PRINCIPLES, DESIGN PATTERN. There are 3 design principles in ...
分类:
其他好文 时间:
2014-07-13 10:51:33
阅读次数:
229
持久化session 背景 使用maven管理项目,使用jetty插件启动项目,虽然jetty是热部署的,但是没有配置的jetty并不算真正的热部署。因为在没有配置前每次热部署都会把session丢了。导致测试期间的数据丢失,重来一遍很麻烦。 本人使用的是jetty-maven-plugin,...
分类:
其他好文 时间:
2014-07-11 23:35:49
阅读次数:
342
Plugin methodsName Typevalidate( options ) Returns: Validator验证所选的FORMvalid( ) Returns: Boolean检查是否验证通过rules( ) Returns: Options返回元素的验证规则rules( "add",...
分类:
Web程序 时间:
2014-07-11 22:37:07
阅读次数:
253
4.0.0 mymaven mymaven 0.0.1-SNAPSHOT org.hibernate hibernate 3.5.4-Final pom org.hibernate hibernate-annotations 3.5.4-Final org.hibernate hibe...
分类:
其他好文 时间:
2014-07-11 08:59:03
阅读次数:
199
在运行项目的时候,eclipse弹出提示框“Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If it's being used by something else, choose a new port number in the preferences.”
在终端输入:netstat -ano ...
分类:
其他好文 时间:
2014-07-10 23:03:07
阅读次数:
432
public enum ResType { Role = 0, Dept = 1, Group = 2, Site = 3, Org = 4, Sub=8 }这里定义了一个enum ResType用R...
分类:
其他好文 时间:
2014-07-10 16:07:45
阅读次数:
192