`
文章列表
jQuery validation验证框架 jQuery验证框架(一) 可选项 (jQuery validation) jQuery验证框架 Html代码 1. <script type="text/javascript" src=js/jquery-1.3.2.min.js></script> 2. <script type="text/javascript" src=js/jquery.validate.pack.js></script> 3. <script type=& ...
jquery-validation 使用 一、用前必备 官方网站:http://bassistance.de/jquery-plugins/jquery-plugin-validation/ API: http://jquery.bassistance.de/api-browser/plugins.html 当前版本:1.5.5 需要JQuery版本:1.2.6+, 兼容 1.3.2 <script src="../js/jquery.js" type="text/javascript"></script> <script s ...
myeclipse加载buiding workspace慢解决方案 . 最近自己写项目,导入了很多资源文件,如js,gif,css,一开始没觉得什么后来写着写着就发现保存越来越慢,查看日志和提示进程对话框发现验证验证js那块报错,而且每保存一次都要检查我这些资源,最后导致java虚拟机类存不够,myeclipse提示关闭。下面是网上找的解决方案:    1.选择菜单栏里的project里的properties; (如果properties显示为不可用(灰色),就先build all或者 build   project,就会出现properties);    2.进去找到builders 把 ...
/* 1 1 1 1 2 1 1 3 3 1 n=3; k=3; n*(n-1)*(n-2) ------------------ 1*2*3 */ import java.util.Arrays; class ProbabilityTable { public static void main(String[] args) { int max = 10; int[][] arr = new int[max][]; for(int i=0;i<arr.length;i++){ arr[i] = new ...

表的排序

/* 假如有这样一个业务逻辑:有大量的数据从数据库中读取出来,显示的时候是无序的,但是在 前台用户可以根据自己的需要点击按某些字段排序,难道要在传参从数据库查询根据字段排序 这样做虽然行的通,但如果考虑效率的话就不敢恭维了。 */ import java.util.Arrays; public class BinArraySort { public static void main(String[] args){ /*下面这样的数据我相信很容易就能获得,无论用ResultSet去组装还是用DBUtil去获取都可以很轻松的得到这种形式的数据*/ String[][] ta ...
enum Size { BIG, SMALL }; public class Test { public static strictfp void main(String[] args) throws InterruptedException { //以枚举作为case判断条件 Size size = Size.SMALL; switch(size){ case SMALL: System.out.println("小号"); break; case BIG: System.out.println(& ...
这是一个很疯狂的举动,这种冲动来自于一道面试题,当时有种暴走的举动,我一度认为这不可能做到,但是有一天我突然想到一个方法可以让它实现起来很简单,就是一个划整为零的问题。下面是实现代码: import java.util.Arrays; import java.util.Collections; import java.util.Queue; import java.util.concurrent.LinkedBlockingQueue; class ArrayTest { public static void main(String[] args) { int[][] ...
Xml_Rpc是采用http协议通过xml数据格式实现rpc(远程调用过程)一个项目。项目主页:http://ws.apache.org/xmlrpc/在download页面中可以下载xml_rpc的jar包。在Documenttation中有只用说明和小例子可以简单的做参考。 下面是对一个helloworld的程序 ...
java的注解其实很常见,如@Override标记重载,@SuppressWarnings("unused")用过Eclipse的应该都知道。其实注解的本身并不做任何的操作,就像接口一样。注解的定义也特有意思[public @interface 注解名]是不是看起来很像接口。 现在的 ...
javaSE本身自己就实现了web功能,分别有两种实现一种是HTTP、HTTPS,实现类分别为HttpServer和HttpsServer但是都要自己实现HttpHandler,而且HTTPS的实现要麻烦一些需要创建证书。创建证书的工具java的bin目录下有名字叫keytool创建方法入下: import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.InetAddress; i ...

线程池

package threadpool; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Collection; import java.util.LinkedList; import java.util.Queue; import java.util.concurrent.LinkedBlockingQueue; import org.apache.log4j.Logger; public class ThreadPoolManager { pri ...
JavaScript自带函数   concat   将两个或多个字符的文本组合起来,返回一个新的字符串。   var a = "hello"; var b = ",world"; var c = a.concat(b); alert(c); //c = "hello,world" indexOf   返回字符串中一个子串第一处出现的索引(从左到右搜索,且下标从0开始)。如果没有匹配项,返回 -1 。   var index1 = a.indexOf("l"); ...
//设置或获取对象指定的文件名或路径。 window.location.pathname; //设置或获取整个 URL 为字符串。 window.location.href; //设置或获取与 URL 关联的端口号码。 window.location.port; //设置或获取 URL 的协议部分。 window.location.protocol; //设置或获取 href 属性中在井号“#”后面的分段。 window.location.hash; ...
public static void main(String[] args) throws Exception{ Process process = Runtime.getRuntime().exec("cmd.exe"); InputStream in = process.getInputStream(); OutputStream out = process.getOutputStream(); Reader reader = new InputStreamReader(in); BufferedWriter w ...
public static void main(String[] args) throws IOException{ int[] cs = new int[Character.MAX_VALUE]; Reader reader = new FileReader(new File("F:/log.txt")); int index; while((index = reader.read()) != -1){ cs[index]++; } for(int i=0;i<cs.length;i++){ if(cs[i]!=0 ...
Global site tag (gtag.js) - Google Analytics