`
文章列表

BundleHelper

    博客分类:
  • Java
import java.util.Locale; import java.util.ResourceBundle; public class BundleHelper { public static String GetStringFromBundle(String BundleName, String key, String defaultString) { String result = defaultString; if (util.isEmpty(key)|| util.isEmpty(BundleName)) { return result; ...

HTMLEncode

    博客分类:
  • Java
public class HTMLEncode implements java.io.Serializable { public static String encode(String value) { if (value == null) { return ""; } else { return (value.replaceAll("&", "&"). replaceAll("/", "&#4 ...
 第一种形式: 定义一个类,它的构造函数为private的,它有一个static的private的该类变量,在类初始化时实例话,通过一个public的getInstance方法获取对它的引用,继而调用其中的方法。   public class Singleton { private Singleton(){}    //在自己内部定义自己一个实例,是不是很奇怪?    //注意这是private 只供内部调用    private static Singleton instance = new Singleton();    //这里提供了一个供外部访问本c ...
JAVA相关基础知识 1、面向对象的特征有哪些方面 1.抽象: 抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关的方面。抽象并不打算了解全部问题,而只是选择其中的一部分,暂时不用部分细节。抽象包括两个方面,一是过程抽象,二是数据抽象。 2.继承: 继承是一种联结类的层次模型,并且允许和鼓励类的重用,它提供了一种明确表述共性的方法。对象的一个新类可以从现有的类中派生,这个过程称为类继承。新类继承了原始类的特性,新类称为原始类的派生类(子类),而原始类称为新类的基类(父类)。派生类可以从它的基类那里继承方法和实例变量,并且类可以修改或增加新的方法使之更适合特殊的需要。 ...

UnicodeHelper

    博客分类:
  • Java
public class UnicodeHelper { public static String ConvertToUnicode(String sInput) { String sResult = ""; char[] oCharAry = new char[sInput.length()]; for(int i=0; i<oCharAry.length; i++) { oCharAry[i] = (char)sInput.charAt(i); ...

File Util

    博客分类:
  • Java
/** * */ package src.com; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.Print ...

Calendar Util

    博客分类:
  • Java
/** * */ package src.com; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; public class CalendarUtil { private static final int AP_DAILY_START_TIME_HOUR ...
3.  demo_calendar.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Cross browser javascript calendar</title> <style type="text/css"> body{ /* You can re ...
2.dhtml_calendar.js /************************************************************************************************************ JS Calendar Copyright (C) September 2006 DTHMLGoodies.com, Alf Magne Kalleland This library is free software; you can redistribute it and/or modify it under the te ...
This is a cross browser Javascript calendar. 1. open the js_calendar.html file in your browser. You use the displayCalendar() or displayCalendarSelectBox() function to display the calendar. 2. 12 languages are currently supported(English, German, Dutch, Norwegian, Spanish, Portuguese, French, Russ ...
1. JSP Setting as below: <body> <form id ="fromName" ...> ... <input type="hidden" id="htmlTOKEN" name="htmlTOKEN" value="${htmlTOKEN}"/> .... </form> ....    2. Java (Constants) -- CommonCo ...

Form field tooltip

    博客分类:
  • JS
Files included in the package: form-field-tooltip.html = Main demo HTML file js/form-field-tooltip.js = Main JS file for the script js/rounded-corners.js = JS file created to add rounded corners dynamically to the tooltip css/form-field-tooltip.css = Main CSS file for the tooltip images/* = ...
Put this into your <HEAD> section <style type="text/css"> /* YOU CAN REMOVE THIS PART */ body{ background-image:url('../../images/heading3.gif'); background-repeat:no-repeat; padding-top:85px; font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; ...

js获取屏幕相关

    博客分类:
  • JS
<SCRIPT LANGUAGE="JavaScript"> var s ="网页可见区域宽:"+ document.body.clientWidth; s+="\r\n网页可见区域高:"+ document.body.clientHeight; s += "\r\n网页正文全文宽:"+ document.body.scrollWidth; s += "\r\n网页正文全文高:"+ document.body ...
    jsp对上传文件的支持不象php中支持的那么好,直接做成了函数,也不象asp中要通过组件才能实现。jsp中可以通过javabean来实现。但是我们没有必要自己去写一个上载的bean,在网上已经有了很多成型的技术,smartupload就是其中的一个。但是smartupload是将文件先读到服务器的内存中,所以上传太大的文件(超过100兆)有可能会出问题,也算是一个美中不足吧:)     先说一下提交的页面,smartupload组件要求用字节流的方式来提交<FORM action="upload.jsp"   encType=multipart/form- ...
Global site tag (gtag.js) - Google Analytics