摘要: public static void copyFile(File sourceFile, File targetFile){ try { //新建文件输入流并对它进行缓冲 FileInputStream input = new FileInputStream(sourceFile); BufferedInputStream inBuff=new BufferedInputStream(input); //新建文件输出流并对它进行缓冲 FileOutputStream output = new FileOutputStream(targetF... 阅读全文
posted @ 2012-09-12 18:17 积累从点滴开始 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 代码:List<String>list=newArrayList<String>();list.add("hello");list.add("word");list.add("a");String[]o=newString[list.size()];list.toArray(o);for(inti=0;i<o.length;i++){System.out.println(o[i]);} 阅读全文
posted @ 2012-08-01 17:55 积累从点滴开始 阅读(488) 评论(0) 推荐(0) 编辑
摘要: functionfuncTest(){//每隔3秒执行一次timelyFun方法window.setInterval("timelyFun()",3000);}window.onload=funcTest;另外有setTimeout方法,这两个方法之间的区别就是:setInterval方法是每隔一段时间执行一次,是循环执行的,而setTimeout方法是页面加载完毕之后的规定时间内执行一次,就不再执行了 阅读全文
posted @ 2012-07-03 15:55 积累从点滴开始 阅读(30555) 评论(2) 推荐(2) 编辑
摘要: selectCURDATE()如果要比较日期,比如查询当天的呼出记录,那就可以这样写:selectcount(*)fromaliav_task_calloutwhereorderId='TestD_1340182435078'andcalloutTime>CURDATE() 阅读全文
posted @ 2012-07-03 15:53 积累从点滴开始 阅读(10422) 评论(0) 推荐(0) 编辑
摘要: var str = "abd def";var arr = new Array();arr = str.split(" ");if(arr.length != 1){ alert("字符串含有空格!"); return false;} 阅读全文
posted @ 2012-06-24 07:45 积累从点滴开始 阅读(16766) 评论(1) 推荐(0) 编辑
摘要: functionrotateImage(imgId){imageToRotate=document.getElementById(imgId);imageToRotate.style.filter="progid:DXImageTransform.Microsoft.Matrix(sizingMethod='autoexpand')";rotate();}varimageToRotate;vardegreeToRotate=0;functionrotate(){vardeg2radians=Math.PI*180/360;degreeToRotate++;d 阅读全文
posted @ 2012-06-23 22:21 积累从点滴开始 阅读(7429) 评论(0) 推荐(1) 编辑
摘要: 需要jar包:poi-3.7.jar、poi-examples-3.7.jar、poi-ooxml-3.7.jar、poi-ooxml-schemas-3.7.jar、poi-scratchpad-3.7.jaraction代码:publicStringpoiImportBusinessExcel(){List<CaAvApply>caAvApplies=newArrayList<CaAvApply>();InputStreaminput=FileUtils.openInputStream(importFileExcel);POIFSFileSystemfs=newPO 阅读全文
posted @ 2012-06-11 14:15 积累从点滴开始 阅读(6470) 评论(0) 推荐(0) 编辑
摘要: s:select用法和html的select用法不大相同先举个例子<s:select id="caAvApplycurrencyTypeCn" name="caAvApply.currencyTypeCn" list="#request.currencyTypeCnTypeList" listKey="dictValue" listValue="dictName" headerKey="" headerValue="请选择" value=" 阅读全文
posted @ 2012-06-11 13:39 积累从点滴开始 阅读(29218) 评论(0) 推荐(2) 编辑
摘要: 在子窗口中加入代码:<bodyonLoad="refreshParent()">......</body><scriptlanguage="javascript">functionrefreshParent(){window.opener.location.href=window.opener.location.href;if(window.opener.progressWindow)window.opener.progressWindow.close();alert("保存成功");window. 阅读全文
posted @ 2012-06-09 22:25 积累从点滴开始 阅读(4808) 评论(0) 推荐(0) 编辑
摘要: 在页面的顶部加入代码:<aname="startPotion"></a>然后置顶按钮:<inputtype="button"value="置顶"onclick="toTop()">js函数:functiontoTop(){Window.location.href="#startPotion"}置底的方法同置顶 阅读全文
posted @ 2012-06-09 22:22 积累从点滴开始 阅读(4153) 评论(0) 推荐(0) 编辑