`
文章列表

Date帮助类

    博客分类:
  • java
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * 时间工具类; * */ public class DateUtil { private static Log log = LogFactory.getLog(DateUtil.class); ...
function Person(name, age) { //实例属性 this.name = "this:"+name; //实例属性 this.age = 1000+age; //静态属性 Person.age = this.age; this.getName = function() { return this.name; }; this.setName = function(newName) { this.name = newName; }; this.g ...
function filter(pred, arr) { var len = arr.length; var filtered = []; // shorter version of new Array(); // iterate through every element in the array... for(var i = 0; i > len; i++) { var val = arr[i]; // if the element satisfies the predicate l ...

IBatis分页配置

IBatis分页方法我没去看,这里讲的分页为通过SQL语句来分页。 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <sqlMap> <!-- 定义别名 --> <typeAlias alias=" ...
org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV 今天出现这种错误,是源于项目中并没有servlet.jar和jsp-api.jar,而是引用tomcat中的这两个jar包;导致页面出现这种错误,这种情况属于jar冲突。 解决这种问题,把tomcat中的这两个jar复制到自己的项目中,就OK了.或是创建一个user lib引用这两个jar包,再让项目引用这个user lib ...

选项卡

    博客分类:
  • html
    <html>   <head>     <title>Queue Manager Attribute.</title>     <link rel="stylesheet" type="text/css" href="../style/styles.css">     <script type="text/javascript" src="../js/jquery-1.3.js"  ></script>   ...
1.邮箱: var re=/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/; if(!re.test(email.val())){ return false; } 2.第一个字符必须是字母,由4到15个字符组成! var re=/^([a-zA-Z]{1})+(\S{3,15})$/; if(!re.test(username)){ return false; ...
很简单的代码,功能还有点小Bug,不过很开心能实现。 JQuery代码: $(function(){ /* * 鼠标Resize */ $("#mouseMove").mousedown( function(ev){ var _dragingElement=$(this).prev("td").children("div"); $(document).mousemove(function(ev){ ev = ev || window.event; ...

分页页面

    博客分类:
  • html
<div id="pagination"> <input type="hidden" id="operation" name="dataPackage.operation" value="firstPage" /> <input type="hidden" id="currentPage" value='<s:property value="dataPackage.currentPage"/ ...
//兼容IE和火狐的回车键; $(document).ready(function loginEnterCheck(){ $("html").die().live("keydown",function(event){ if(event.keyCode==13){ //调用登陆方法; loginCheck(); } }); });
PatternEnumerateFile类 package com.huawei.esb; import java.util.List; import java.io.File; import java.util.ArrayList; import java.util.regex.Pattern; public class PatternEnumerateFile { public static final String REGEX="enumerate(\\w|_\\w|-\\w)*\\.xml"; public static final ...
EnumerateFile类: package com.@#¥.esb; import java.io.File; import java.util.Map; import org.kxml2.kdom.Element; public class EnumerateFile { //枚举文件对应一个File private File enumFile; //对应一个element private Element enumElement; //对应一个lastModified private Long enumLa ...
FileListener类,续: private void println() throws IOException { String line; StringBuffer buf = new StringBuffer(); FileInputStream in = new FileInputStream(enumerateFiles.get(currentEnumFilePath).getEnumFile()); java.io.BufferedReader reader = new java.io.BufferedReader(new java ...
FileListener类,续: private void loadProperties() { //更新时间 this.lastModified = file.lastModified(); try { logger.info("The properties file[" + getPath() + "] loading ..."); FileInputStream in = new FileInputStream(file); prop.load(in); // ...
FileListener类: import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; import java.util.List; import java.uti ...
Global site tag (gtag.js) - Google Analytics