2010年11月24日

为什么会出现 java.util.ConcurrentModificationException 异常?

摘要: 在Map或者Collection的时候,不要用它们的API直接修改集合的内容(否则会出现 java.util.ConcurrentModificationException 异常),如果要修改可以用Iterator的remove()方法,例如: [代码]如上写会在运行期报ConcurrentModificationException,可以如下修改: [代码]转自:http://www.javaey... 阅读全文

posted @ 2010-11-24 20:09 izumi 阅读(287) 评论(0) 推荐(0) 编辑

2010年11月15日

jar not loaded

摘要: 信息: validateJarFile(E:\workspace\build\WebContent\WEB-INF\lib\javax.servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class2010-11-15 17:43:55 ... 阅读全文

posted @ 2010-11-15 17:51 izumi 阅读(3869) 评论(0) 推荐(0) 编辑

2010年10月27日

用java实现,数字四舍五入时,只小数部分四舍五入,整数不进位

摘要: 代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--/** * 只小数部分四舍五入,整数不进位 * @param d * @return */public Double checkNumber(Double d){ String[] strArray... 阅读全文

posted @ 2010-10-27 15:34 izumi 阅读(1540) 评论(0) 推荐(0) 编辑

2010年10月25日

hibernate char 字段的数据表只查出一个字符

摘要: 问题描述: orcal和sqlserver(其他数据库未曾验证,估计也是)下经常会遇到数据表中的字段如果为char类型的话,查询语句使用sql但是是使用hibernate去查询执行,返回结果往往会只显示一个字符, 解决方法: (1)修改字段类型为varchar或者其他; (2)修改查询语句,如修改 String sql = "SELECT DISTINCTCASt(JHNF as varchar... 阅读全文

posted @ 2010-10-25 23:37 izumi 阅读(5125) 评论(0) 推荐(0) 编辑

2010年9月28日

用oracle的trunc函数处理日期类型数据

摘要: 如果当日日期是:2007-9-19 那么有以下结果:select trunc(sysdate ,'dd') from dual ; --> 2007-9-19 select trunc(sysdate ,'yyyy') from dual ; -->2007-1-1select trunc(sysdate ,'mm') from dual ; -->2007-9-1计算两个日期相... 阅读全文

posted @ 2010-09-28 16:59 izumi 阅读(578) 评论(0) 推荐(0) 编辑

2010年9月21日

javascript弹出窗口居中

摘要: function selectCustomer(){var iTop = (window.screen.availHeight-30-500)/2;var iLeft = (window.screen.availWidth-10-750)/2; window.open("../customer/creditApprManage.do?method=toGetCustomer", "searchCo... 阅读全文

posted @ 2010-09-21 10:44 izumi 阅读(416) 评论(0) 推荐(0) 编辑

javascript四舍五入保留两位小数

摘要: function count(){//alert("count");var size=~~(document.getElementById("size").value);var value=0;for(var i=0;i<size;i++){var val=1*(document.getElementById("afterAdjScor"+i).value);if(null!=val){va... 阅读全文

posted @ 2010-09-21 09:01 izumi 阅读(1160) 评论(0) 推荐(0) 编辑

文本框失去焦点事件、获得焦点事件

摘要: onBlur:当失去输入焦点后产生该事件onFocus:当输入获得焦点后,产生该文件Onchange:当文字值改变时,产生该事件Onselect:当文字加亮后,产生该文件onpropertychange 当属性改变发生该事件 无论粘贴 keyup onchange等,最为敏感 阅读全文

posted @ 2010-09-21 08:58 izumi 阅读(92729) 评论(1) 推荐(1) 编辑

2010年9月20日

struts1.2中将ActionForm放在HttpSession中的实践

摘要: <action path="/customer/customerInfoManage" parameter="method"scope="session" name="cusCustomerInfoForm"type="com.byttersoft.customer.action.CusCustomerInfoAction"validate="false"><forward na... 阅读全文

posted @ 2010-09-20 09:56 izumi 阅读(1746) 评论(0) 推荐(0) 编辑

浏览器兼容的JS写法总结

摘要: -、元素查找问题1. document.all[name] (1)现有问题:Firefox不支持document.all[name] (2)解决方法:使用getElementsByName(name),getElementById(id)等来替代。2. 集合类对象问题 (1)现有问题:IE中对许多集合类对象取用时可以用 (),但在Firefox只能用[]。 如:IE中可以使用document.fo... 阅读全文

posted @ 2010-09-20 08:32 izumi 阅读(3306) 评论(0) 推荐(2) 编辑

导航