Skip to main content

Posts

Showing posts from June, 2011

芝加哥周边一日游好去处(转)

小镇子, 公园, 建筑, 餐饮之类的 1. county line orchard http://countylineorchard.com/ 2.一家德国农家餐馆 http://www.bayernstube.com/ 3. Matthiessen State Park http://dnr.state.il.us/lands/Landmgt/PARKS/R1/mttindex.htm 4. Indiana Dunes, Natioanl Lakeshore http://www.nps.gov/indu/index.htm 5. Chicago Botanic Garden http://www.chicagobotanic.org/ 6. Anderson Japnese Garden http://andersongardens.org/plan-your-visit/ 7.Long Grove http://www.longgroveonline.com/ 8. Starved Rock State Park http://www.destination360.com/north-america/us/illinois/starved 9. Rockford Sock Monkey Museum, Time Museum, etc 10. Lake Geneva, tons to do. http://www.lakegenevawi.com/ 11. Goebberts Farm in Barrington or Hampshire, great for Fall activities http://www.pumpkinfarms.com/BarA.html 12. Apple picking: http://www.allaboutapples.com/orchard/il01.htm 13. House on the Rock (个人建议一定要去一次) http://www.thehouseontherock.com/index.htm 转自 "UIC自驾游小组: http://xiaozu.renren.com/xiaozu/212618 "

实用 Eclipse 插件 Plug-in (转)

clipse插件原来喜欢用WTP,后来在eclipse网站上有了整合了WTP的Eclipse IDE for Java EE Developers,就一直用到现在,还挺顺手的,现在版本是Helios(3.6.1),翻译过来就是太阳神,名字还不错。 以下为现在还在用的插件: Subclipse 地址:http://subclipse.tigris.org/ 整合SVN客户端到Eclipse中,在IDE中方便地进行各种SVN操作。如果是Linux系统,记得要顺便装上 JNA Library,点击查看安装方法。 EasyExplorer 地址:http://sourceforge.net/projects/easystruts/ 这是个十分简单的插件,但功能非常实用:将当前文件在Windows Explorer中打开,省去了你很多的重复操作。 使用ubuntu的同学可以选择OpenExplorer,在ubuntu10.10上我测试有些小问题(nautilus提示找不到打开的文件夹路径),修改了部分源代码后ok了,如果有遇到相同问题的同学可以给我留言。 Jadclipse 地址:http://sourceforge.net/projects/jadclipse/ 这是个Java的反编译插件,需要将jad.exe路径添加至$PATH,或者在eclipse中自己配置jad的路径。 使用ubuntu的同学可以用JodeEclipse,也是很不错的反编译插件,安装很简单,就是一个jar包。 Properties Editor 地址:http://sourceforge.jp/projects/propedit/ 以前在做国际化或者写properties文件时,总是要使用sun的提供的工具native2ascii.exe,转来转去很麻烦,现在有了Properties Editor,一口气转10个,不费劲。 FindBugs 地址:http://findbugs.sourceforge.net 静态代码检查工具三剑客之一,不纠结于代码的样式,而是试图只寻找真正的缺陷

equals and hashcode function in Java (not my writing)

It is not always necessary to override hashcode and equals. But if you think you need to override one, then you need to override both of them. Let's analyze what whould happen if we override one but not the other and we attempt to use a Map . Say we have a class like this and that two objects of MyClass are equal if their importantField is equal (with hashCode and equals generated by eclipse) public class MyClass { private final String importantField ; private final String anotherField ; public MyClass ( final String equalField , final String anotherField ) { this . importantField = equalField ; this . anotherField = anotherField ; } public String getEqualField () { return importantField ; } public String getAnotherField () { return anotherField ; } @Override public int hashCode () { final int prime = 31 ; int result = 1 ; result = prime * result + (( importantField == null ) ? 0 : importantField . hashCode (