rainyear
rainyear · 共 152 篇文章
JQUERY 复制table
function addSortTr(){ var attrValue= $.trim($("#attrValue").val()); var valueNames=document.getElementsByName("valueNames"); if (null == attrValue || trim(attrValue).length == 0) { alertDialog("属性值名称不能为空!"); return false; } if(attrValue.length>40){ alertDialog("名称超过最大文字长度,不能添加!"); return false; } f…
2011-10-09 10:22 · JS,JQUERY和CSS · 评论(0)
线程池
最近业务需求,需要导出大量数据到Excel文档中。 1>Action文件 //ExecutorService pool = Executors.newSingleThreadExecutor(); // 记录日志 异步将导出的xls文件写到服务器的制定目录 ExpProductThread thread = new ExpProductThread(new Long(0),this.getCommandContext().getUserId(),workbook,exportFileName); //thread.start(); XiuECThreadPoolRegistry.getIns…
2011-09-28 11:51 · 并行线程开发 · 评论(0)
使用BoneCP的必备条件
使用BoneCP需要如下类库支持: 被连接的数据库的JDBC驱动程序,这个可以到该数据库厂商网站下载; Google的集合框架Guava,它的网址是:http://code.google.com/p/guava-libraries/,这个需要说明的是BoneCP官方网站说的必备框架是Google Collect框架,但是这个框架已经不再支持了,而是转为新的集合框架Guava; SLF4J日志类库(在早期的BoneCP版本中直接使用了Log4J类库); JDK1.5及更高版本。 下面是测试项目中的类库截图: 也就是需要了如下Jar包: bonecp-0.7.0.jar mysql-connec…
2011-09-21 19:36 · Orcale SQL 及优化 · 评论(0)
hashcode equal方法
import java.util.ArrayList; 02 import java.util.HashSet; 03 import java.util.List; 04 import java.util.Set; 05 06 /** 07 * 编写者:CP 08 * 编写日期:2011-9-7 09 * 类描述:set集合针对String 类型和8大基础数据类型 过滤掉重复数据,如果存放的是其他类型对象,则需要重写hashCode方法和equals方法,当equals 比较相等时,则会去比较hashCode值 hashCode的值 如果一致的话,则不会存进set 10 */ 11 publ…
2011-09-17 10:04 · Java基础 · 评论(0)
要过滤的字符
String.prototype.TextFilter=function(){ var pattern=new RegExp(""); //要过滤的字符 var rs=""; for(var i=0;i<this.length;i++){ rs+=this.substr(i,1).replace(pattern,''); } return rs; }
2011-09-15 19:23 · JS,JQUERY和CSS · 评论(0)
JQERY 和窗口居中
function del(){ var checkbox=document.getElementsByName("checkBoxId"); var j=0; var id_list=""; for(var i=0;i<checkbox.length;i++){ if(checkbox*.checked){ var value=checkbox*.value; j=j+1; id_list+=value+","; } } id_list= id_list.substring(0, id_list.length-1); alert(id_list); if(j==0){ alert("你致少应…
2011-09-07 10:30 · JS,JQUERY和CSS · 评论(0)
JQERY 大全
1、先讲讲JQuery的概念 JQuery首先是由一个 America 的叫什么 John Resig的人创建的,后来又很多的JS高手也加入了这个团队。其实 JQuery是一个JavaScript的类库,这个类库集合了很多功能方法,利用类库你可以用简单的一些代码实现一些复杂的JS效果。 2、JQuery实现了 代码的分离 不用再网页中加入如:onclick之类的事件来调用函数了,直接引入JQuery类库和自己编写的JQuery代码就可以了; 如: $(function(){ $("Element").click{function(){ alert("点击我哦!"); } } }); 上面的代…
2011-09-07 10:29 · JS,JQUERY和CSS · 评论(0)
JS的document 详细学习
JS的document 详细学习 document 文挡对象 - JavaScript脚本语言描述 注:页面上元素name属性和JavaScript引用的名称必须一致包括大小写 否则会提示你一个错误信息 "引用的元素为空或者不是对象" 对象属性 document.title //设置文档标题等价于HTML的 标签 document.bgColor //设置页面背景色 document.fgColor //设置前景色(文本颜色) document.linkColor //未点击过的链接颜色 document.alinkColor //激活链接(焦点在此链接上)的颜色 document.vlin…
2011-09-07 10:22 · JS,JQUERY和CSS · 评论(0)
JQERY
<s:if test="{#flag=='result'}"> 以下是你搜索的结果: </s:if> <s:if test="{#flag=='notfind'}"> 对不起没有找到你要搜索的结果: <s:if test='%{flag=="result"}'>归还单</s:if> <s:if test='%{flag=="notfind"}'>e归还单</s:if> </s:if> <s:if test="%{#art.articleTitle.length()>6}"> ${fn:substring(art.articleTitle,0,15)} </s:if> <s:if test="…
2011-09-07 10:21 · JS,JQUERY和CSS · 评论(0)
Spring与memcached整合
Spring与memcached整合 import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.FileSystemXmlApplicationContext; import com.danga.MemCached.MemCachedClient; public class MClient { public …
2011-09-05 18:19 · 框架开发 · 评论(0)
instanceof 运算符
instanceof 运算符是用来在运行时指出对象是否是特定类的一个实例。instanceof通过返回一个布尔值来指出,这个对象是否是这个特定类或者是它的子类的一个实例。 用法: result = object instanceof class 参数: result 必选项。任意变量。 object 必选项。任意对象表达式。 class 必选项。任意已定义的对象类。 说明: 如果 object 是 class 的一个实例,则 instanceof 运算符返回 true。如果 object 不是指定类的一个实例,或者 object 是 null,则返回 false。 例如: Boolean b…
2011-09-05 10:00 · Java基础 · 评论(0)
oracle 树结构查询
select * from table_name where 条件1 connect by prior cols_1=cols_2 start with cols_3 我这样理解 connect by 后的prior可以放在等号的两边,其实放哪一边都没关系,主要是放在哪一列的前面(cols_1还是cols_2)。 prior所放那一列(这里是cols_1),可以理解为是另一列cols_2的子标识,即cols_2是cols_1的父标识。树结构查询总是遍历子标识(即把儿子全部找出来)。 start with是指从哪条记录开始查询 举例 有一个emp表 id name pid 10 jack 11…
2011-08-24 23:31 · Orcale SQL 及优化 · 评论(0)
sql语句优化
最近几周一直在进行数据库培训,老师精湛的技术和生动的讲解使我受益匪浅。为了让更多的新手受益,我抽空把SQL语句优化部分进行了整理,希望大家一起进步。 4、另一个有用的脚本:查找前十条性能差的sql. 1、通过top sql找出有问题的sql语句 select * from (select * from v$sqlstats order by DISK_READS desc) where rownum<=10; 还可以对ELAPSED_TIME,AVG_HARD_PARSE_TIME等排序 一、操作符优化 1、IN 操作符 用IN写出来的SQL的优点是比较容易写及清晰易懂,这比较适合现代软件开…
2011-08-22 15:56 · Orcale SQL 及优化 · 评论(0)
js左移右移
function add(oSourceSel,oTargetSel ){ var arrSelValue = new Array(); var arrSelText = new Array(); var arrValueTextRelation = new Array(); var index = 0; for(var i=0; i<oSourceSel.options.length; i++) { if(oSourceSel.options*.selected) { arrSelValue = oSourceSel.options*.value; arrSelText = oSource…
2011-08-22 15:41 · JS ,JQUERY和CSS · 评论(0)
Jquery 动态增加和删除行列
function addSortTr(){ var attrValue=trim(document.getElementById("attrValue").value); var valueNames=document.getElementsByName("valueNames"); if (null == attrValue || trim(attrValue).length == 0) { alert("属性值名称不能为空!"); return false; } if(attrValue.length>40){ alert("属性组名称超过最大文字长度,不能添加!"); return f…
2011-08-22 15:40 · JS ,JQUERY和CSS · 评论(0)