摘要: http://johnjobe.iteye.com/blog/1017984在实现数据挖掘一些算法或者是利用空间向量模型来发现相似文档的时候,会遇到求两个集合的交集的情况。以前一般是采用比较笨拙的办法,依次遍历其中一个集 合的元素,然后判断它是否包含在另一个集合中。这样做非常机械繁琐,代码编得让人心烦,其实java的api中提供了对集合进行交、并、差运算的功能,灰 常强大!看下面的例子:1.publicclassSetOpt{2.3.publicListintersect(Listls,Listls2){4.Listlist=newArrayList(Arrays.asList(newObje 阅读全文
posted @ 2011-09-14 21:33 网络大豆 阅读(1191) 评论(1) 推荐(0)
摘要: 一共执行了10次,每次先用PropertyUtils.copyProperties,再用逐个域值拷贝的方式。奇怪的时第一次中使用PropertyUtils.copyProperties居然用了530毫秒,这是为什么呢??虽然使用PropertyUtils.copyProperties,会方便一些,但性能确实下降了很多(第一次)。5300---------------------1-------------------------10---------------------2-----------------------11---------------------3------------. 阅读全文
posted @ 2011-09-14 20:44 网络大豆 阅读(954) 评论(0) 推荐(0)
摘要: http://blogs.oracle.com/geertjan/entry/programmatically_putting_topcomponents_in_modesFirst a picture: 图片略 The list of menu items above appears when the TopComponent's tab is right-clicked. When a menu item is selected, the TopComponent moves to the selected mode. Next, the two things you need . 阅读全文
posted @ 2011-09-14 12:23 网络大豆 阅读(368) 评论(0) 推荐(0)
摘要: http://netbeans.dzone.com/news/secrets-netbeans-window-system&sa=U&ei=JPBvTqSlNsSXiQfC1JGsCQ&ved=0CCQQFjAI&usg=AFQjCNEZyrb8mNth56umvuSGJiGKj3JCnAToday I learned about some hidden options of the NetBeans Window System. These can't be set via user interface elements in the NetBeans 阅读全文
posted @ 2011-09-14 08:50 网络大豆 阅读(442) 评论(0) 推荐(0)