SQL2005 des加密算法存储过程 http://blog.csdn.net/fuyajun001/art…
不静之心

分类:专业技术
两个Java加密解密例子
两个Java加密解密例子java 加密解密 示例:http://rian.iteye.com/blog/196…
关于Jquery jqGrid的使用
关于Jquery jqGrid的使用 官方文档: http://www.trirand.com/jqgridw…
CSS 控制最小宽度,最小高度
http://blog.163.com/chenzhenhua_007/blog/static/1284926…
Spring自定义注解
java自定义注解 http://my.oschina.net/OkSerIous/blog/402718 深…
WebApplicationUtils
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
package com.common; import javax.servlet.ServletContext; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.web.context.ServletContextAware; public class WebApplicationUtils implements ApplicationContextAware,ServletContextAware{ public static ApplicationContext applicationContext = null; public static ServletContext servletContext = null; private static SessionFactory factory; private static Session session; public static SessionFactory getFactory() { factory = (SessionFactory)WebApplicationUtils.getApplicationContext().getBean("sessionFactory"); return factory; } public static Session getSession() { session = getFactory().getCurrentSession(); return session; } public void setApplicationContext(ApplicationContext actx) throws BeansException { if(WebApplicationUtils.applicationContext==null){ WebApplicationUtils.applicationContext = actx; } } public void setServletContext(ServletContext sctx) { if(WebApplicationUtils.servletContext==null){ WebApplicationUtils.servletContext=sctx; } } public static ApplicationContext getApplicationContext() { return applicationContext; } public static ServletContext getServletContext() { return servletContext; } } |
Spring MVC注解方式service和controller的扫描顺序
Spring MVC注解方式service和controller的扫描顺序 获得WebApplicationC…
在web.xml中通过contextConfigLocation配置spring
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Jxml代码 <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath*:conf/spring/applicationContext_core*.xml, classpath*:conf/spring/applicationContext_dict*.xml, classpath*:conf/spring/applicationContext_hibernate.xml, classpath*:conf/spring/applicationContext_staff*.xml, classpath*:conf/spring/applicationContext_security.xml classpath*:conf/spring/applicationContext_modules*.xml classpath*:conf/spring/applicationContext_cti*.xml classpath*:conf/spring/applicationContext_apm*.xml </param-value> </context-param> |
contextConfigLocation …
SpringMVC3AndHibernate3 & springMVC集成DWR
SpringMVC3AndHibernate3 & springMVC集成DWR http://p…
Java基于Socket文件传输示例
Java基于Socket文件传输示例 原文:http://www.blogjava.net/sterning/…
java调用dos命令
java调用dos命令
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
package com; import java.io.BufferedReader; import java.io.InputStreamReader; public class CommonUtils { public static String exeCMD1(String cmd){ cmd = "cmd.exe /c "+cmd; Process process = null; StringBuffer sb = new StringBuffer(); BufferedReader reader = null; try { process = Runtime.getRuntime().exec(cmd); reader = new BufferedReader(new InputStreamReader(process.getInputStream())); while(true){ String str = reader.readLine(); if(str==null) break; System.out.println(str); sb.append(str); } process.destroy(); } catch (Exception e) { // TODO: handle exception } return sb.toString(); } public static String exeCMD2(String cmd){ String[] args = new String[]{"cmd","/c",cmd}; Process process = null; StringBuffer sb = new StringBuffer(); BufferedReader reader = null; try { process = Runtime.getRuntime().exec(args); reader = new BufferedReader(new InputStreamReader(process.getInputStream())); while(true){ String str = reader.readLine(); if(str==null) break; System.out.println(str); sb.append(str); } process.destroy(); } catch (Exception e) { // TODO: handle exception } return sb.toString(); } public static void main(String[] args){ CommonUtils.exeCMD1("tree"); CommonUtils.exeCMD1("tree"); } } |
JAVA socket编程实例
JAVA socket编程实例 http://daoyongyu.iteye.com/blog/265677 …
tinyMCE使用详解
tinyMCE使用详解 http://www.iwms.net/n2065c17.aspx
ServerSocket & Socket
服务器: 以应用程序的方式启动: Server1Main.java [crayon-68a842dfe3368…
总结了一些经常涉及到的权限
http://topic.csdn.net/u/20101116/10/ecb5fde2-39dc-44d0-…
Android文件读写
Android SDCard操作(文件读写,容量计算) :http://zhuyonghui116.blog….
Java MD5加密
Java MD5加密 http://warren.iteye.com/blog/107386 […
利用 JAVA 操作 EXCEL 文件
利用 JAVA 操作 EXCEL 文件 http://www.ibm.com/developerworks/c…
声明注解式事务
参考错误解决: 终于找到全annotation配置springMVC的方法了(事务不失效): http://i…
当 IDENTITY_INSERT 设置为 OFF 时,不能为表中的标识列插入显式值
http://www.cnblogs.com/xgcblog/archive/2011/08/10/21339…
spring mvc 中文乱码问题解决
在eclipse环境里,页面传输数据的时候通常用ISO-8859-1这个字符集 可以用 str = new S…
SpringMVC 接收表单数据的方式
http://blog.csdn.net/w40338544/article/details/6881784 …
Hibernate的MYSQL序列问题
1.mysql的主键是自动增加的increment。 2.生成entity.java的时候选择org.hibe…
Generating JSON from TSQL Query
原文地址:http://www.firozansari.com/2008/11/21/generating-j…
从文件得到ByteArrayOutputStream
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
public static ByteArrayOutputStream getOutputStream(String filePath){ File file = new File(filePath); FileInputStream in = null; ByteArrayOutputStream out = new ByteArrayOutputStream(); try { in = new FileInputStream(file); byte[] buffer = new byte[in.available()]; in.read(buffer); out.write(buffer); } catch (Exception e) { e.printStackTrace(); }finally{ try { if(in!=null) in.close(); } catch (Exception e2) { } } return out; } |
Convert HTML to PDF using iText
http://www.rgagnon.com/javadetails/java-html-to-pdf-usi…
Java实现HTML代码生成PDF文档
参考: http://blog.csdn.net/zdtwyjp/article/details/576935…
java调用存储过程和函数
存储过程:有参数
1 2 3 4 5 6 7 8 9 10 11 12 13 |
String rSet=null; CallableStatement cStatement=null; try { cStatement=connection.prepareCall("{Call sellTicketPROC(?,?,?,?,?,?,?)}"); cStatement.setString(1, lineID); cStatement.setString(2, beginStation); cStatement.setString(3, endStation); cStatement.setString(4, date); cStatement.setString(5, TrainNum); cStatement.setString(6, seatTyle); cStatement.registerOutParameter(7,Types.VARCHAR); cStatement.execute(); rs=cStatement.getString(7);//得到输出结果 |
调用函数: [crayon…
Android 之 下拉框(Spinner)的使用
参考:http://imshare.iteye.com/blog/770950 获得被选中的选项的文本,Ind…
用xml来定义imagebutton的状态
res/drawable/drawable_x.xml [crayon-68a842dfe6e5d187747…
Android资源的使用之String
http://www.cnblogs.com/dawei/archive/2010/04/26/1721525…
DataFactory 产生数据
http://luyongxin88.blog.163.com/blog/static/92558072011…
PowerDesigner使用心得
详细请参考:http://blog.csdn.net/mlemon/article/details/55284…
Java反射经典实例 Java Reflection Cookbook
http://orangewhy.iteye.com/blog/56011 Java提供了一套机制来动态执行方…
JAVA 随机字符串生成方法
http://hi.baidu.com/yinfuqing666/blog/item/b9c3a0d21917…