js判断undefined类型 if (reValue== undefined){ alert("undefined"); } 发现判断不出来,最后查了下资料要用typeof方法:if (typeof(reValue) == "undefined") { alert("undefined"); } typeof 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、& Read More
posted @ 2013-03-19 11:09 七郎 Views(124) Comments(0) Diggs(0) Edit
https://github.com/douglascrockford/JSON-js/blob/master/json.jshttp://www.JSON.org/js.html var json = JSON.parse(str); //转对象 var str = JSON.stringify(json) //转字符串 Read More
posted @ 2013-03-18 15:34 七郎 Views(179) Comments(0) Diggs(0) Edit
1.JDK访问httpstry {URL url = new URL("https://www.mg.com/miugogate/gateway?service=unifiedLogin&mchntLoginUserName=miugobuyadmin&mchntLoginPwd=21218CCA77804D2BA1922C33E0151105&charset=utf-8&signType=MD5&sign=BE1938CA5FBBCD8BD2BEED0135B96420&token=20130304175557255110&c Read More
posted @ 2013-03-08 14:45 七郎 Views(5461) Comments(0) Diggs(0) Edit
HTML://登录function login(){ var URL = "http://127.0.0.1:8080/miugogate/GateWay";//RSA私钥设置setMaxDigits(130);var key = new RSAKeyPair("8b33d1d7027cb8f910d538d6cd1e0c7344b3fc3728c83f39fec7d4149a4332f740ba6867ce585addbd3c6e3df6cac316956fc316843cb62604495fdfbd11ab607b9696e04ca7e1afda894d39f Read More
posted @ 2013-03-08 14:39 七郎 Views(706) Comments(0) Diggs(0) Edit
类型:TIMESTAMP(6)select to_char(systimestamp,'yyyy-mm-dd HH24:MI:ss.ff3') from dual; Read More
posted @ 2013-03-03 13:49 七郎 Views(205) Comments(0) Diggs(0) Edit
被调用端由于session消失,ajax请求error,需要加上<% response.addHeader("P3P", "CP=\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\""); %>其他浏览器无此问题。以下为引用:问题根源:IE6/IE7支持的P3P(Platform for Privacy Preferences Project (P3P) specification)协议默认阻止第三方无隐私安全声明的cookie,Firefox目前还不支持P3P安全特性,fir Read More
posted @ 2013-02-20 11:53 七郎 Views(749) Comments(0) Diggs(0) Edit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keyword Read More
posted @ 2013-01-16 16:25 七郎 Views(545) Comments(0) Diggs(0) Edit
会有bug,换种方法可将<tr><td>动态插入一个<div> Read More
posted @ 2013-01-14 13:37 七郎 Views(233) Comments(0) Diggs(0) Edit
$(function() { // var brow = $.browser; // var bInfo = ""; // if(brow.msie) {bInfo="Microsoft Internet Explorer "+brow.version;} // if(brow.mozilla) {bInfo="Mozilla Firefox "+brow.version;} // if(brow.safari) {bInfo="Apple Safari "+brow.version;} // if(brow.op Read More
posted @ 2013-01-10 09:29 七郎 Views(129) Comments(0) Diggs(0) Edit
$.ajax({ url:encodeURI("这里是你要请求的地址"), data:{name:"John",location:"Boston"}, //以键值对的形式 "name=John&location=Boston",//如果出现会&#会截断 async : false, //默认为true异步,此时当前ajax未返回也会继续执行下面的js(后台action会等得到返回) ,在机顶盒上,同步时会产生新的sessionid,异步却不会cache : false, //默认为true,当数据不 Read More
posted @ 2013-01-08 11:15 七郎 Views(161) Comments(0) Diggs(0) Edit
<c:forEach items="${menu.subMenuList}" var="submenu"> <li><a href="${submenu.url }" onclick="changeColor(this);" flag_color>${submenu.name }</a></li> </c:forEach><script type="text/javascript"> function chang Read More
posted @ 2013-01-06 15:47 七郎 Views(3775) Comments(0) Diggs(0) Edit
var begin = 0; var end = 3; var page = 1; var pagesize = 3; var orderDetail = '${sessionScope.orderDetail}'; var jsonList = eval("("+orderDetail+")"); var length = jsonList.length; if(length<=3){ $("#lastPage").hide(); $("#nextPage").hide(); end = l Read More
posted @ 2013-01-04 13:48 七郎 Views(714) Comments(0) Diggs(0) Edit
*------------------------------------------------------------2* S.SamsLifexperience3*CopyRight(C)2003-2007S.SamsLifexperienceScriptClassLib4*MSNLive:S.Sams#msn.com5*Http://blog.8see.net/6*UPdateby:2007-01-19转载传播请保留版权7*-----------------------------------------------------------*/8910/*$获取指定对象11@eleme Read More
posted @ 2012-12-26 13:58 七郎 Views(188) Comments(0) Diggs(0) Edit
<script type="text/javascript" src="jquery-1.8.2.js"></script><table id="myTable"></table><input type="button" id="newBtn" value="add"/><input type="button" id="delBtn" value="del&qu Read More
posted @ 2012-12-13 17:48 七郎 Views(188) Comments(0) Diggs(0) Edit
JS:jquery.cookie.js<script>$(document).ready(function() { $.cookie('name', 'gzgd',{expires: 7}); //设置 var test1 = $.cookie('name');//获取 alert (test1); //$.cookie('name', null); //删除});</script>JAVA: public static Cookie FindCookie(String name,HttpServletRe Read More
posted @ 2012-12-13 12:05 七郎 Views(2433) Comments(0) Diggs(0) Edit
1. //排序 Collections.sort(rrlist,new Comparator<TblSysRolesResources>(){ public int compare(TblSysRolesResources o1, TblSysRolesResources o2) { return o2.getTblSysResources().getOrderno().intValue()-o1.getTblSysResources().getOrderno().intValue(); //return Long.parseLong(o2.getTb... Read More
posted @ 2012-12-13 11:00 七郎 Views(152) Comments(0) Diggs(0) Edit
JAVA:1.金额Pattern pattern = Pattern.compile("^?(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){1,2})?$");Matcher matcher = pattern.matcher(".11");System.out.println(matcher.matches()); Read More
posted @ 2012-12-12 16:35 七郎 Views(124) Comments(0) Diggs(0) Edit
http://blueram.iteye.com/blog/1613602 Read More
posted @ 2012-12-11 16:57 七郎 Views(181) Comments(0) Diggs(0) Edit
J2EE集群http://blog.csdn.net/esoftwind/article/details/1341089 Read More
posted @ 2012-12-11 16:29 七郎 Views(108) Comments(0) Diggs(0) Edit
http://www.cnblogs.com/xia520pi/archive/2012/04/20/2459374.htmlhttp://www.cnblogs.com/xia520pi/category/346943.html Read More
posted @ 2012-12-11 16:14 七郎 Views(110) Comments(0) Diggs(0) Edit
http://developer.51cto.com/art/201004/197524.htm Read More
posted @ 2012-12-11 14:29 七郎 Views(109) Comments(0) Diggs(0) Edit
var brow = $.browser; var bInfo = ""; if(brow.msie) {bInfo="Microsoft Internet Explorer "+brow.version;} if(brow.mozilla) {bInfo="Mozilla Firefox "+brow.version;} if(brow.safari) {bInfo="Apple Safari "+brow.version;} if(brow.opera) {bInfo="Opera "+br Read More
posted @ 2012-12-11 11:18 七郎 Views(183) Comments(0) Diggs(0) Edit
JSTL XML processing 标签库:为程序设计者提供了基本的对 XML 格式文件的操作被分为了三类,分别是: XML 核心标签: <x:parse> 、 <x:out> 、 <x:set> XML 流控制标签: <x:if> 、 <x:choose> 、 <x:when> 、 <x:otherwise> 、 <x:forEach> XML 转换标签: <x:transform> 、 <x:param>1.<x:parse> 标签:解析 XML 文件属性 Read More
posted @ 2012-12-07 10:34 七郎 Views(1983) Comments(0) Diggs(0) Edit
SQL标签库,顾名思义,提供对数据库的操作,包括连接数据库,查询,修改,事务等。只需提供相应属性值,即可完成对数据库的相关操作,比JSP中使用一大堆Scriptlet操作数据库简单。SQL标签库的taglib:<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %><sql:setDataSource />JSTL的SQL标签所有的操作都是通过data source,也就是基于javax.sql.DataSource接口获取数据库连接。通过<sql:s Read More
posted @ 2012-12-07 10:23 七郎 Views(2786) Comments(0) Diggs(1) Edit
Core标签库Core标签库主要包括了一般用途的标签、条件标签、迭代标签和URL相关的标签。在JSP页面使用Core标签,要使用taglig指令,指定引用的标签库,如下:<%@tagliburi=”http://java.sun.com/jsp/jstl/core”prefix=”c”%>一般用途的标签有<c:out>、<c:set>、<c:remove>、<c:cath>1.<c:out>用于计算一个表达式并将结果输出。类似于JSP中<%=%>表达式,或者是EL中$ ${el-expression}。2.&l Read More
posted @ 2012-12-07 10:18 七郎 Views(2408) Comments(0) Diggs(1) Edit
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" 将<%@ taglib uri="htt Read More
posted @ 2012-12-07 10:13 七郎 Views(4404) Comments(0) Diggs(0) Edit
select a.month, nvl(b.amount,0) amount --decode(b.amount,'',0) from (select to_char(sysdate, 'yyyy') || lpad(level, 2, 0) month from dual connect by level < 13) a, (select to_char(((sum(t.txn_amt) + sum(t.coupon_amt)) / 100), 'FM999,999,999,990.90')... Read More
posted @ 2012-12-06 18:12 七郎 Views(1521) Comments(0) Diggs(0) Edit
//begin---------------上下左右键控制if('${iscontrol_mchntid}'.indexOf('${mchntid}')!=-1){ var texts = new Array(); //设置为focus所在的location var x = 2; var y = 3; var maxx = 0; var maxy = 0; window.onload=function(){ var inputs = $("[location]"); for(var i = 0; i < inputs.length; i Read More
posted @ 2012-12-01 20:13 七郎 Views(2743) Comments(0) Diggs(0) Edit
几天做项目,生成一堆注解的实体,当实体数超过86个时,jvm报错:## A fatal error has been detected by the Java Runtime Environment:## Internal Error (c1_Optimizer.cpp:271), pid=5104, tid=6488# guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp## JRE version: 6.0_35-b10# Java VM: Java Hot.. Read More
posted @ 2012-11-30 13:47 七郎 Views(18743) Comments(0) Diggs(0) Edit
js分割:var s='我1234567890我1234567890我1234567890我1234567890我1234567890我1234567890',reg=/.{4}/g,rs=s.match(reg);rs.push(s.substring(rs.join('').length));alert(rs)java分割:public static String[] split(String msg, int num) {num = num + 1; int len = msg.length(); if (len <= num) return new Read More
posted @ 2012-11-23 10:30 七郎 Views(251) Comments(0) Diggs(0) Edit
Win32OpenSSL_Light-0_9_8k.exe1. 生成不含密码保护的私钥:openssl genrsa -out private-rsa.key 10242. 生成证书openssl req -new -x509 -key private-rsa.key -days 750 -out public-rsa.cer3. 生成Keystore3.1. 生成PKCS12 格式Keystoreopenssl pkcs12 -export -name test-alias -in public-rsa.cer -inkey private-rsa.key -out 99bill-rsa.p Read More
posted @ 2012-11-16 14:26 七郎 Views(8337) Comments(0) Diggs(0) Edit
经验:getRootPath1在tomcat和weblogic以war包发布有效getRootPath1在tomcat和weblogic以文件夹发布有效 public static String getRootPath1() { return System.getProperty("miugonavi.root"); } public static String getRootPath2() { String classPath = null; try { //toURI() 20% to 空格 classPath = CommonUtil.class.get... Read More
posted @ 2012-10-23 19:25 七郎 Views(2703) Comments(0) Diggs(0) Edit
关键字: json gson javaGson网址http://code.google.com/p/google-gson/1.简单的处理list和map?1234567891011121314Gson gson = new Gson(); List testList = new ArrayList(); testList.add("first"); testList.add("second"); String listToJson = gson.toJson(testList); System.out.println(listToJson); //pr Read More
posted @ 2012-10-22 17:46 七郎 Views(5160) Comments(0) Diggs(0) Edit
JSONObject与JSONArray的使用1.JAR包简介要使程序可以运行必须引入JSON-lib包,JSON-lib包同时依赖于以下的JAR包:commons-lang.jarcommons-beanutils.jarcommons-collections.jarcommons-logging.jarezmorph.jarjson-lib-2.2.2-jdk15.jar2.JSONObject对象使用JSON-lib包是一个beans,collections,maps,java arrays 和XML和JSON互相转换的包。在本例中,我们将使用JSONObject类创建JSONObjec Read More
posted @ 2012-10-18 15:50 七郎 Views(219) Comments(0) Diggs(0) Edit
读取src下的属性文件的某个key值 /** * 读取src下某个属性文件中的某个key所对应的value * * @param args * */ public static void main(String[] args) { String key = "file.upload.folder"; String propertiesFileFullName = "myProperty.properties"; String pbundle = "myProperty"; fun1(propertiesFileFullName, ke Read More
posted @ 2012-10-16 18:39 七郎 Views(350) Comments(0) Diggs(0) Edit
1.选择java类型,会生成Long,hibernate只会生成long2.SEQUENCE主键 @Id @GeneratedValue(strategy = GenerationType.SEQUENCE,generator="role_seq") @SequenceGenerator(name="role_seq", sequenceName="SEQ_SYS_ROLES") @Column(name = "ID", unique = true, nullable = false, precision = 22 Read More
posted @ 2012-09-26 12:54 七郎 Views(1109) Comments(0) Diggs(0) Edit
一、JPA通用策略生成器通过annotation来映射hibernate实体的,基于annotation的hibernate主键标识为@Id,其生成规则由@GeneratedValue设定的.这里的@id和@GeneratedValue都是JPA的标准用法,JPA提供四种标准用法,由@GeneratedValue的源代码可以明显看出.Java代码@Target({METHOD,FIELD})@Retention(RUNTIME)public@interfaceGeneratedValue{GenerationTypestrategy()defaultAUTO;Stringgenerator() Read More
posted @ 2012-09-25 14:36 七郎 Views(13329) Comments(0) Diggs(1) Edit
@ManyToOne(fetch = FetchType.LAZY)出现懒加载异常:org.hibernate.LazyInitializationException: could not initialize proxy - no Session我以为是我配置问题,测试了好久,发现问题所在:我使用springsecurity,服务器启动就注入baseDao查询,因为不是通过request查询,spring就不能管理session的范围,web.xml配置的OpenSessionInViewFilter就没有起作用,其实,除了这2个人员角色,角色资源实体懒加载无效外,进去系统只用用reques Read More
posted @ 2012-09-23 20:18 七郎 Views(672) Comments(0) Diggs(0) Edit
保存数据:AaaTest aaaTest = new AaaTest();aaaTest.setId(id);aaaTest.setName(name);aaaTest.setAddress(address);this.baseDao.save(aaaTest);QueryHelper helper = new QueryHelper();helper.append(" from AaaTest");List<AaaTest> l = (List<AaaTest>) baseDao.getList(helper);调用存储过程://调存储过程Conn Read More
posted @ 2012-09-13 16:08 七郎 Views(1723) Comments(0) Diggs(0) Edit
PRC:CREATE OR REPLACE PROCEDURE BUZ_TEXMATCH( p_date in varchar2, --对账日期 p_file in varchar2, --对账文件名 o_result out NUMBER, --返回对账结果,成功为1 出现异常为0 o_cursor out MYPACKAGE.TEXMATCH_CURSOR--返回本地记录不存在,主机存在的对账记录) as--本地记录存在,主机存在的对账,根据对账结果修改本地库成功或失败CURSOR cur_tb_texmatch (l_date PUPS_DTL_TEXMATCH.HCMPDATE%TYP Read More
posted @ 2012-09-13 16:04 七郎 Views(492) Comments(0) Diggs(0) Edit