摘要: import java.awt.AWTException; import java.awt.Desktop; import java.awt.Dimension; import java.awt.Rectangle; import java.awt.Robot; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStr 阅读全文
posted @ 2013-04-03 14:28 暗夜螃蟹 阅读(311) 评论(0) 推荐(0)
摘要: /** * 生成固定长度的随机字符和数字 * @param len * @return */ public static String GetRandomCharAndNumber(int len) { StringBuffer sb = new StringBuffer(); for (int i = 0; i <len; i++) { int intRand = (int) (Math.random() * 52); int numValue = (int)... 阅读全文
posted @ 2013-03-18 17:58 暗夜螃蟹 阅读(265) 评论(0) 推荐(0)
摘要: package com.util;import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URL;import java.util.Enumeration; import java.util.z... 阅读全文
posted @ 2013-03-01 15:08 暗夜螃蟹 阅读(192) 评论(0) 推荐(0)
摘要: <HTML><HEAD><TITLE>WMI Scripting HTML</TITLE><META http-equiv=Content-Type content="text/html; charset=gb2312"><SCRIPT language=JScript event="OnCompleted(hResult,pErrorObject, pAsyncContext)" for=foo> document.forms[0].txtMACAddr.value=unescap 阅读全文
posted @ 2013-02-21 14:51 暗夜螃蟹 阅读(340) 评论(0) 推荐(0)
摘要: 采用JAVA 获取google analytics产生的流量检测数据。 配置:JDK5.0及以上 GoogleAnalytics.java package com.cms.util; // Copyright 2010 Google Inc. All Rights Reserved. /* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ob. 阅读全文
posted @ 2013-02-19 17:15 暗夜螃蟹 阅读(482) 评论(0) 推荐(0)
摘要: String wpu_no= "1"; String wpu_url= "2"; String wpu_pr_url="3"; String wpu_page_name="4"; String wpu_page_type="5"; HashMap map=new HashMap(); map.put("wpu_no",wpu_no); map.put("wpu_url",wpu_url); map.put("wpu_pr_url",wp 阅读全文
posted @ 2013-02-18 15:28 暗夜螃蟹 阅读(1922) 评论(0) 推荐(0)
摘要: java 用struts2 提交一个表单,表单内容太长,报这个错很容易看到是表单input的问题,于是我找啊找~~每一个字段每一个字段的对比与数据库无异,我就特别奇怪为什么会提示这样的错误而且还是404。最终无数遍查找后找到原因是:Bean 配置与实际得到的值的类型不一致导致。。一气之下全部改成String类型成功了...... 阅读全文
posted @ 2013-01-30 14:03 暗夜螃蟹 阅读(159) 评论(0) 推荐(0)
摘要: <ul id="ul"><li id=1>11111111111111111<a href="javascript:del(1);">del</a></li><li id=2 >22222222222222222<a href="javascript:del(2);">del</a></li><li id=3>33333333333333333<a href="javascript:del(3);&q 阅读全文
posted @ 2013-01-25 15:31 暗夜螃蟹 阅读(394) 评论(0) 推荐(0)
摘要: package com.sayes.util;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date;import java.util.Timer;import java.util.TimerTask;public class ProTimer { public void StartTimer(String date,final String Close){ //"2013-01-17 16:25:00" SimpleDateFormat sdf = ne 阅读全文
posted @ 2013-01-17 16:21 暗夜螃蟹 阅读(173) 评论(0) 推荐(0)
摘要: 网上发的EMAIL正则有的不可用,收藏一个不错的。var reMail = /^(?:[a-zA-Z0-9]+[_\-\+\.]?)*[a-zA-Z0-9]+@(?:([a-zA-Z0-9]+[_\-]?)*[a-zA-Z0-9]+\.)+([a-zA-Z]{2,})+$/;JS,数字比较强转一下 parseInt(str)>10function $$(id){//多一些这样的方法就好了 var obj=document.getElementById(id); return obj;} 阅读全文
posted @ 2013-01-04 19:26 暗夜螃蟹 阅读(157) 评论(0) 推荐(0)