- 博客(8)
- 资源 (1)
- 收藏
- 关注
转载 executeQuery、executeUpdate 和 execute返回值
http://hi.baidu.com/miraclestorm/item/ea9b57421b667a83823ae12e Statement 接口提供了三种执行 SQL 语句的方法:executeQuery、executeUpdate 和 execute。使用哪一个方法由 SQL 语句所产生的内容决定。 方法executeQuery 用于产生单个结果集的语
2013-01-25 19:36:44
420
转载 derby获得查询结果条目数
http://zhidao.baidu.com/question/173527886.html getFetchSize()方法不是获得记录数,而是获得每次抓取的记录数,默认是0,也就是说不限制。可以用setFetchSize()来设置,而getFetchSize()是用来读出那个设置值。设置为正整数之后,ResultSet每次抓取的最多纪录数就有了上限,而不是所有符合条件的记录。 如果你
2013-01-25 18:33:26
639
转载 Java HashMap,ArrayList,LinkedList等的性能比较
https://www.ibm.com/developerworks/cn/java/j-codetoheap/ 集合 性能 默认容量 空时的大小 10K 条目的开销 准确设置大小? 扩展算法 HashSet O(1) 16 144 360K 否 x2 HashMap O
2013-01-25 16:50:05
3173
1
转载 Java 完美判断中文字符
原文链接http://www.micmiu.com/lang/java/java-check-chinese/ Java判断一个字符串是否有中文一般情况是利用Unicode编码(CJK统一汉字的编码区间:0x4e00–0x9fbb)的正则来做判断,但是其实这个区间来判断中文不是非常精确,因为有些中文的标点符号比如:,。等等是不能识别的。 以下是比较完善的判断方法:CharUtil.ja
2013-01-24 11:33:04
376
转载 java.util.ConcurrentModificationException
用iterator遍历集合时要注意的地方:不可以对iterator相关的地方做添加或删除操作。 下面用List为例来说明为什么会报 ConcurrentModificationException 这个异常,其它集合类似可以自己思考。 public static void main(String[] args){ List set = new
2013-01-12 14:24:31
253
转载 重载equals的方法
很多函数,都要用到实体类的equals方法,比如Map.contains()。 第一步 重载equals() @Override public boolean equals(Object obj) { boolean result = false; if(obj instanceof Person){ Person person = (
2013-01-07 16:14:33
2543
原创 Eclipse juno +Tomcat 7.0显示 server unbound
This is a known issue that can happens, to resolve this error, try one or all of the following: Go to Window–>Preferences–>Server–>Runtime Environments and fix the broken path/link for the serv
2012-12-26 17:28:30
690
转载 CRF++:error while loading shared libraries的解決方法
最近在用LINUX下的CRF++,需要编译后运行,但运行时报错:crf_test: error while loading shared libraries: libcrfpp.so.0: cannot open shared object file: No such file or directory 初步认为是找不到libcrfpp.so.0,但是看到这个文件已经存在于/usr/local/l
2012-12-26 17:26:59
3613
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅