URLEncoder的只有一个参数的encode方法。。标明deprecated了,说会跟着平台不同而改变 用了,忘记了 移到linux上,出错了 调了俩小时……郁闷
Tag Archives: java
续关于iBatis
昨天用了一下iBatis,大概了解了它的用法,也有了实际感受这个东西不如Hibernate强啊@_@ 前面那个E文的文章说得很对。iBatis仍然是写SQL语句,封装的比较薄,嗯。更为“安心”,更可控制。但是……也更麻烦。对于我来说,显然会喜欢Hibernate一些……不过iBatis的架构做的看起来很不错的,虽然没有很认真的看。一看就是条分缕析,把SQLMAP和DAO分离开来,嗯。也有一个相当完善的JPetStore例子可以参考。这种东西一个完善的例程就是王道啊!
iBATIS vs Hibernate
首先从这里抄一段 Hibernate vs. iBATIS There’s an interesting thread taking place on the iBATIS User Mailing List. The basic jist of the responses are: Hibernate works well when you control the data model, iBATIS works well when you need to integrate with an existing database. I’ve said this for a couple years now, and I still […]
eclipse3.0.0部分中文不能显示问题
发信人: broom9 ( ), 信区: eclipse 标 题: eclipse3.0部分中文不能显示问题 发信站: 水木社区 (Thu Dec 15 09:19:35 2005), 站内 已经解决了上来发一下 eclipse3.0.0,winxp en pro,编辑中文是一种比较奇怪的字体,有部分字显示不出来 网上查到的大部分解决方法是把encoding改成GBK,改了之后不行,那种大概是对所有汉字都不能识别的问题 后来在eclipse启动的时候加上参数 -nl “zh-cn”解决 eclipse3.1默认就能正常显示汉字,其他版本没有测试 — ※ 来源:·水木社区 newsmth.net·[FROM: 59.66.74.196] 另:我用eclipse3.0而不用3.1是为了装Together。。。鄙视我吧,啊
matcher.appendReplacement …
matcher.appendReplacement 这个方法好像很好用啊,明天试一试,应该就是做我今天要做的事情的方法。hoho Pattern p = Pattern.compile("cat"); Matcher m = p.matcher("one cat two cats in the yard"); StringBuffer sb = new StringBuffer(); while (m.find()) { m.appendReplacement(sb, "dog"); } m.appendTail(sb); System.out.println(sb.toString());