上一页 1 ··· 3 4 5 6 7

2013年1月24日

实现网页打印实例

摘要: 代码如下:View Code 1 <%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%> 2 <%@include file="/docc/common.jsp"%> 3 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 4 <HTML><HEAD> 5 阅读全文

posted @ 2013-01-24 08:56 陈惟鲜的博客 阅读(286) 评论(0) 推荐(0) 编辑

2013年1月12日

设置页面那些ID对应的对象隐藏setDisplay

摘要: // 设置按钮是否可用,以逗号分割, "是否显示")// 如setDisabled("showBtn,updateBtn",true);function setDisabled(ids, isDisabled){ if (ids != null && ids != ""){ var arr = ids.split(","); for (var i=0; i<arr.length; i++){ if($(arr[i])!=null){ $(arr[i]).disabled=isDisabled; 阅读全文

posted @ 2013-01-12 11:22 陈惟鲜的博客 阅读(287) 评论(0) 推荐(0) 编辑

NumberUtils BigDecimal 对应的加减乘除、格式化等方法

摘要: View Code import java.math.BigDecimal;import java.text.DecimalFormat;import java.text.NumberFormat;/**BigDecimal 对应的加减乘除、格式化等方法<br /> * * @author EX-CHENWEIXIAN001 *2012-11-8 */public class NumberUtils { /** * 默认返回小数2位 */ public static final int DEFAULT_SCALE = 2; /** * 提供精... 阅读全文

posted @ 2013-01-12 11:01 陈惟鲜的博客 阅读(1383) 评论(0) 推荐(0) 编辑

DateUtil 日期常用工具

摘要: /** * 日期处理工具类 * @author BIANDONGYU850 * @date 2012-7-26 下午07:38:46 * @path com.pingan.saims.scms.common.util * @description */public class DateUtil { /** * 默认日期格式化字符串:yyyy-MM-dd */ public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd"; //日期格式化对象 private static SimpleDateFormat sdf 阅读全文

posted @ 2013-01-12 10:59 陈惟鲜的博客 阅读(183) 评论(0) 推荐(0) 编辑

获取异常详细信息,组成字符串

摘要: View Code 1 /** 2 * 获取exception详情信息 3 * 4 * @param e 5 * Excetipn type 6 * @return String type 7 */ 8 public static String getExceptionDetail(Exception e) { 9 10 StringBuffer msg = new StringBuffer(10); 11 12 if (e !=... 阅读全文

posted @ 2013-01-12 10:51 陈惟鲜的博客 阅读(187) 评论(0) 推荐(0) 编辑

2013年1月4日

js屏蔽鼠标右键

摘要: oncontextmenu="window.event.returnValue=false" style="overflow-y: hidden; overflow-x: hidden"ajs9 leftmargin="0" topmargin="0"<body oncontextmenu="return false"></body><!--禁止网页另存为: --><noscript><iframe src=*.html></if 阅读全文

posted @ 2013-01-04 08:53 陈惟鲜的博客 阅读(206) 评论(0) 推荐(0) 编辑

2012年12月31日

右下角自动弹出提示框实现

摘要: 因为有需求,当有新消息时,需要类似于QQ那样弹出提示框。实现如下:1、alertMessage.js/* * 消息构造 */ function CLASS_MSN_MESSAGE(id,width,height,caption,title,message,target,action){ this.id = id; this.title = title; this.caption= caption; this.message= message; this.target = target; this.action =... 阅读全文

posted @ 2012-12-31 17:46 陈惟鲜的博客 阅读(407) 评论(0) 推荐(0) 编辑

权限管理系统实现:

摘要: 1、实现表之间的数据缓存PopedomCache.javapublic class PopedomCache { // 日志 private Logger traceLogger = PafaCoreContexton.getInstance().getTracer(); private static PopedomCache cache; // 所有菜单 private Set<MenuInfoDTO> allMenuSet; // 所有权限 private Set<OprateInfoDTO> allOperateSet; // 所有... 阅读全文

posted @ 2012-12-31 17:35 陈惟鲜的博客 阅读(328) 评论(0) 推荐(0) 编辑

2012年6月26日

hibernate 悲观锁与乐观锁

摘要: 锁(locking)业务逻辑的实现过程中,往往需要保证数据访问的排他性。如在金融系统的日终结算处理中,我们希望针对某个cut-off时间点的数据进行处理,而不希望在结算进行过程中(可能是几秒种,也可能是几个小时),数据再发生变化。此时,我们就需要通过一些机制来保证这些数据在某个操作过程中不会被外界修改,这样的机制,在这里,也就是所谓的“锁”,即给我们选定的目标数据上锁,使其无法被其他程序修改。Hibernate支持两种锁机制:即通常所说的“悲观锁(Pessimistic Locking)”和“乐观锁(Optimistic Locking)”。悲观锁(Pessimistic Locking)悲观 阅读全文

posted @ 2012-06-26 18:55 陈惟鲜的博客 阅读(143) 评论(0) 推荐(0) 编辑

oracle union 跟union all ,exists跟in

摘要: 在sql 中据说使用,exists 效率高于in,那么exists 跟in等价的sql如下,aa跟bb表关联字段user_idselect * from aa where aa.user_id not in (select bb.user_id from bb);select * from aa where not exists(select bb.user_id from bb where bb.user_id=aa.user_id);select * from aa where aa.user_id in (select bb.user_id from bb);select * from 阅读全文

posted @ 2012-06-26 18:54 陈惟鲜的博客 阅读(284) 评论(0) 推荐(0) 编辑

apache2.2 + tomcat 6 集群

摘要: APACHE 2.2.8+TOMCAT6.0.14配置负载均衡目标: 使用 apache 和 tomcat 配置一个可以应用的 web 网站,要达到以下要求: 1、 Apache 做为 HttpServer ,后面连接多个 tomcat 应用实例,并进行负载均衡。 2、 为系统设定 Session 超时时间,包括 Apache 和 tomcat 3、 为系统屏蔽文件列表,包括 Apache 和 tomcat 注:本例程以一台机器为例子,即同一台机器上装一个apache和4个Tomcat。一、前期准备工作:安装用的程序(前提保证已安装了JDK1.5以上的版本)APAHCE 2.2.8下载:apa 阅读全文

posted @ 2012-06-26 18:53 陈惟鲜的博客 阅读(194) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7

导航