deejay的博客
deejay · 共 56 篇文章
RsaCrypto 数据库用户密码加密
1、将propertiesLoader.java和RsaCryptoUtil.java复制到项目中 2、修改applicationContext.xml中解析properties的bean 修改后的配置如下: classpath*:/application.properties 3、解压RSACrypto.zip,运行rsaCrypto.exe,点击生成密钥 输入数据库帐号,点击加密,得到密文。在peroperties文件中增加jdbc.username_ciphertext属性,值为上面生成的密文。 然后在明文中输入数据库密码,点击加密,得到密码的密文。然后在properties文件中增加…
2012-07-04 15:46 · 加密 · 评论(0)
java 程序员网站
英文网站 http://www.javaalmanac.com - Java开发者年鉴一书的在线版本. 要想快速查到某种Java技巧的用法及示例代码, 这是一个不错的去处. http://www.onjava.com - O'Reilly的Java网站. 每周都有新文章. http://java.sun.com - 官方的Java开发者网站 - 每周都有新文章发表. http://www.developer.com/java - 由Gamelan.com 维护的Java技术文章网站. http://www.java.net - Sun公司维护的一个Java社区网站. http://www.b…
2012-03-01 17:07 · 评论(0)
修改eclipse中的M2_REPO变量
从eclipse中增加了maven2的插件之后,maven默认的本地库的路径是${user}/.m2/repository/下,一般windows用户的操作系统都安装在C盘,所以这个目录 下的jar包比较危险。我尝试从myeclipse->preferences->java->build path->classpath variables中查找M2_REPO这个变量,发现其路径指向的是“C:/Documents and Settings/lvxda/.m2/repository/”,我想修改其路径为:d:/m2/repository,可是这个变量的编辑按钮是灰色的,不可编辑。从网上也没有找到…
2012-02-19 20:50 · maven · 评论(0)
检查公式括号配对
a)满足在字符串的任何位置处,其左边的左括号数不小于右括号数;b) 字符串中所有的左右括号数相等。 因此,可以采用栈的思想来匹配:遇到左括号入栈,遇到右括号出栈,直到栈为空,或字符串结束停止;字符串扫描结束时,栈也同时为空,则说明匹配。js如下: function checkBracket(algorithms){ var bracket = []; var algorithms= algorithms ||''; for(var i=0; i<algorithms.length; i++){ if(algorithms.charAt(i)=="("){ bracket.push('(');…
2011-12-27 09:27 · javascript · 评论(4)
js实现小数转百分比
Number.prototype.toPercent = function(n){n = n || 0;return ( Math.round( this * Math.pow( 10, n + 2 ) ) / Math.pow( 10, n ) ).toFixed( n ) + '%';} var A=0.358975, B=0.25554; alert([A, A.toPercent(3), B, B.toPercent()].join('\n'));
2011-12-26 15:05 · javascript · 评论(0)
IE6下链接ONCLICK事件处理中的请求被ABORTED
IE6下链接ONCLICK事件处理中的请求被ABORTED 一大早发现,ie6下点发起对话没法弹出窗口,ff浏览器就是可以的。开启HttpWatch检测,发现点击的被aborted。 查找资料显示aborted的原因如下。 The (Aborted) value is more complex in its origin. It occurs when IE has started to process the request for a URL (e.g. to download an image), but then decides to cancel the operation. He…
2011-08-25 17:16 · javascript · javascript httpwatch aborted · 评论(0)
oracle笔记
//删除表空间 DROP TABLESPACE gzgl_temp INCLUDING CONTENTS AND DATAFILES; //删除用户 DROP USER gzgl cascade create temporary tablespace GZGLPTDB_TEMP tempfile 'G:\oracle\oradata\gzgl_temp.dbf' size 50m autoextend on next 50m maxsize 20480m extent management local; //创建数据表空间 create tablespace GZGLPTDB_DATA lo…
2011-08-17 16:59 · 数据库 · 评论(0)
网页中打开notepad,word
<script language="JavaScript"> function open_exe(shellp,str) { a=new ActiveXObject("wscript.shell"); a.run(shellp+" "+str); } function cq() { b=new ActiveXObject("wscript.shell"); b.run("rundll32.exe") } </script> <button onclick="open_exe('notepad.exe','')">打开notepad</button> <button onclick="open…
2011-08-15 09:05 · javascript · 评论(1)
struts2 json plugin includeProperties 包含MAP属性
<action name="dl" class="com.dqgb.action.document.DocumentAction" method="getDocumentList"> <result type="json"> <param name="includeProperties">^documentss\[\d+\]\.attachGroup\.attachs.*</param> </result> </action> 其中attachs为Set集合
2011-05-12 17:29 · ssh2 · 评论(0)
iframe自适应高度的多种方法方法小结
iframe自适应高度的多种方法方法小结发布 类型:转载 对于自适应高度的代码有很多,可效率什么的考虑进来好代码就不多见了,不过思路倒是差不多的 不带边框的iframe因为能和网页无缝的结合从而不刷新页面的情况下更新页面的部分数据成为可能,可是 iframe的大小却不像层那样可以“伸缩自如”,所以带来了使用上的麻烦,给iframe设置高度的时候多了也不好,少了更是不行,现在,让我来告诉大 家一种iframe动态调整高度的方法,主要是以下JS函数: 第一种方法:代码简单,兼容性还可以,大家可以先测试下。 复制代码 代码如下: function SetWinHeight(obj) { var w…
2011-04-21 11:58 · 收藏 · 评论(0)
jquery 缓存问题
转载: http://halk.iteye.com/blog/592306 现象: 页面使用jQuery的Ajax方式更改内容,提交保存至数据库后使用jQuery.getJSON方式重新读取数据,页面没有更新,重新登录系统后页面才显示更改后的数据。 原因: IE会缓存jQuery的get请求,导致不能查询到新的数据 解决方法 : 1、在请求URL后添加随机数,例如: Js代码 var url ="/operaterMultiAction.do?randomNum="+Math.random(); var url ="/operaterMultiAction.do?randomNum="+Ma…
2011-03-21 10:11 · javascript · 评论(0)
js导出HTML到EXCEL(ONLY IE)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html xmlns=" http://www.w3.org/1999/xhtml "> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>js导出HTML到EXCEL(ONLY IE)</title> <script langu…
2011-02-25 14:22 · javascript · 评论(0)
JavaScript 图片变换效果(ie only)
http://www.cnblogs.com/cloudgamer/archive/2008/05/23/1205642.html
2011-02-14 17:07 · javascript · 评论(0)
System Properties
Properties props=System.getProperties(); // 系统属性 System.out.println("Java 的运行环境版本: "+props.getProperty("java.version")); System.out.println("Java 的运行环境供应商: "+props.getProperty("java.vendor")); System.out.println("Java 供应商的 URL : "+props.getProperty("java.vendor.url")); System.out.println("Java 的安装路…
2011-02-12 16:07 · java · 评论(0)
Eclipse出现Failed to create the Java Virtual Machine和The Eclipse executable launch
百度了一下,按照网上说法,将配置文件修改如下 -startup plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 -product org.eclipse.epp.package.jee.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash o…
2011-02-10 08:47 · 收藏 · 评论(1)