EhCache 分布式缓存/缓存集群

摘要: 开发环境:System:WindowsJavaEE Server:tomcat5.0.2.8、tomcat6JavaSDK: jdk6+IDE:eclipse、MyEclipse 6.6开发依赖库:JDK6、 JavaEE5、ehcache-core-2.5.2.jarEmail:hoojo_@126.comBlog:http://blog.csdn.net/IBM_hoojohttp://hoojo.cnblogs.com/http://hoojo.blogjava.net前面2篇文章介绍到Ehcache 整合Spring 使用页面、对象缓存http://www.cnblogs.com/ho 阅读全文
posted @ 2013-09-22 11:42 square198901 阅读(187) 评论(0) 推荐(0)

java 导出excel

摘要: 1)jsp:form:<form id="excelForm" action="${path }/jsp/excel.jsp" method="post"><input type="hidden" name="title" value="月度风险监测指标监测结果汇总表——日常监控类指标" /><textarea id="excelInput" name="excel" rows="10" 阅读全文
posted @ 2012-02-28 17:16 square198901 阅读(607) 评论(0) 推荐(0)

java数据中 数据合并工具类

摘要: public class VerticalMerger {public static List<Map<String, Object>> transform(LinkedList<String> keyList, List<Map<String, Object>> mapList) {List<Map<String, Object>> newMapList = new LinkedList<Map<String, Object>>();Map<String, Object> 阅读全文
posted @ 2012-02-28 16:46 square198901 阅读(551) 评论(0) 推荐(0)

jsva中 数据库行转列 合并数据 在jsp展示

摘要: 1)jsp<!-- 数据展示 --><c:set var="i" value="1" /><c:forEach var="bean" items="${beanList}"><c:forEach var="bean1" items="${bean.children}" varStatus="s1"><c:forEach var="bean2" items="${bean1. 阅读全文
posted @ 2012-02-28 16:44 square198901 阅读(699) 评论(0) 推荐(0)

jsp 正则表达式实现 文字居左,数字居右

摘要: var reg = /^\-?[\d|,]*\.?\d*%?$/;$('#dataTable td').each(function() {var str = $(this).text();str = str.replace(/(^\s*)|(\s*$)/g, '');if ('' == str) {$(this).text('--').attr('align', 'right');} else if ('%' == str) {$(this).text('--').a 阅读全文
posted @ 2012-02-28 16:26 square198901 阅读(675) 评论(0) 推荐(0)

util工具类 读取excel

摘要: //读取Excel的类 import java.io.*;import jxl.*;public class ReadXLS {public static void main(String args[]) {try {Workbook book = Workbook.getWorkbook(new File("测试.xls"));// 获得第一个工作表对象Sheet sheet = book.getSheet(0);// 得到第一列第一行的单元格Cell cell1 = sheet.getCell(0, 0);String result = cell1.getContent 阅读全文
posted @ 2012-02-28 09:38 square198901 阅读(207) 评论(0) 推荐(0)

将数据库的数据循环进行封装

摘要: 将数据库的数据循环进行封装ListmeasureDept=reportDao.searchMeasureDept(param);//存放合并后指标值的MapLinkedHashMapmeasureDeptMap=newLinkedHashMap();//行转列将从数据库查询出一个指标多个月份多条值的记录合并为一条记录for(inti=0;i<measureDept.size();i++){LinkedHashMaptempLinkedMap=(LinkedHashMap)measureDept.get(i);Stringdepartmentcode=tempLinkedMap.get(& 阅读全文
posted @ 2011-12-12 16:45 square198901 阅读(473) 评论(0) 推荐(0)

正则表达式用法示例

摘要: JS的正则表达式 //校验是否全由数字组成 function isDigit(s) { var patrn=/^[0-9]{1,20}$/; if (!patrn.exec(s)) return false return true } //校验登录名:只能输入5-20个以字母开头、可带数字、“_”、“.”的字串 function isRegisterUserName(s){var patrn=/^[a-zA-Z]{1}([a-zA-Z0-9]|[._]){4,19}$/;if (!patrn.exec(s)) return falsereturn true}/校验用户姓名:只能输入1-30.. 阅读全文
posted @ 2011-12-12 16:15 square198901 阅读(277) 评论(0) 推荐(0)