i'm beneo
beneo · 共 21 篇文章
Gregorian Calendar ------ 有趣的日历
项目有个需求,每天生成一个文件。开始觉得用一个 TimeTask 或者 ScheduledThreadPoolExecutor 或者 quartz 来做,突然觉得太overweight了。后来想到了log4j的 DailyRollingFileAppender ,果然是我想要的,类似于quartz,通过与类似nextFireTime的参数作比较,判断是否触发append到新文件,不过这不是这篇博文要讲的。我有注意到了这个类,在DailyRollingFileAppender有个inner class RollingCalendar。 这个类的作用也说明了,是 computes the sta…
2010-12-01 13:50 · java · 评论(5)
Ubuntu 10.10 java 开发环境
ubuntu10.10正式版到来已经满月了,它的到来让程序员迈入linux的门槛又降低了一大截。如何usb安装,如何分区都傻瓜到令人发指的程度。ubuntu下面写java代码,不妨是种选择。 这个帖子的目的就是不断更新程序员在ubuntu下面开发需要的软件 try it, love it, share it !!! 安装ubuntu Tweak 这个google一下安装就好了 sudo dpkg -i ~/Downloads/ubuntu-tweak_0.5.7-1_all.deb 然后你就可以在 Applications -> System Tools 看到了 记住千万不要通过ubuntu…
2010-11-16 14:50 · 评论(1)
Pattern Greedy, Reluctant, and Possessive 扫盲
原文是 http://java.sun.com/docs/books/tutorial/essential/regex/quant.html 有时候感慨到底java人有多少看过了tutorial Greedy, Reluctant, and Possessive input string xfooxxxxxxfoo. Enter your regex: .*foo // greedy quantifier Enter input string to search: xfooxxxxxxfoo I found the text "xfooxxxxxxfoo" starting at index…
2010-06-12 15:38 · 评论(0)
Python + Spring 開發時間會縮短多少呢?
http://springpython.webfactional.com/node/6 也許 spring + java bytecode 不是夢
2010-05-18 00:21 · 评论(0)
Java FileChannel 的使用體會
今天看到一篇文章,說用NIO複製比較快。 原文是 http://www.iteye.com/topic/667457 我就寫一篇關於FileChannel的文章吧,大家可以一起討論。 首先來看 public abstract long transferTo(long position, long count, WritableByteChannel target) throws IOException An attempt is made to read up to count bytes starting at the given position in this channel's fi…
2010-05-17 21:14 · 评论(9)