http://hjy2099.iteye.com/blog/290591 [crayon-68ab6b3d41…
不静之心

分类:专业技术
Spring读取配置文件,获取bean的几种方式
参考:http://blog.sina.com.cn/s/blog_45fd882f0100pgv0.html…
spring 读取properties配置文件
通过Spring读取properties配置文件的信息 Spring 读取properties 在配置文件里面…
DWR3 文件上传下载功能
DWR3 文件上传:http://blog.csdn.net/id19870510/article/detai…
Java InputStream 的mark 和reset操作
http://hi.baidu.com/lee_eva/blog/item/e60803dba2d00ad1b…
Android两个layout切换
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 59 60 61 62 |
package com.pandy.tl; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; public class TowLayoutActivity extends Activity { /** Called when the activity is first created. */ private Button button1; private Button button2; private TextView text1; private TextView text2; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button1 = (Button)findViewById(R.id.button1); button1.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v) { // TODO Auto-generated method stub jumpLayout2(); } }); //这里不能定义button2的的时间,否则会出错。但不知道什么原因,难道button2是R.layout.main的控件,才会出现这个情况? /* button2 = (Button)findViewById(R.id.button2); button2.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v) { // TODO Auto-generated method stub jumpLayout1(); } });*/ } public void jumpLayout1() { setContentView(R.layout.main); button1 = (Button) findViewById(R.id.button1); button1.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { jumpLayout2(); } }); } public void jumpLayout2() { setContentView(R.layout.mylayout); button2 = (Button) findViewById(R.id.button2); button2.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { jumpLayout1(); } }); } } |
Blob、InputStream、byte 互转
Blob、InputStream、byte 互转 本文URL: http://blog.csdn.net/su…
两个Activity通过Intent传递数据
http://blog.csdn.net/hongshan50/article/details/6585396…
javascript下Date对象的时间格式化函数
http://blog.csdn.net/yzy0612/article/details/1730732 [c…
javascript判断数据类型
http://blog.csdn.net/hongweigg/article/details/6824968 …
带有排序和过滤功能的JTable
http://blog.csdn.net/vanessa219/article/details/2795899…
用JAVA轻松操作properties文件
http://www.blogjava.net/action/archive/2006/08/21/64804…
使用BeanUtils时,Date类型值为空的解决方法
解决办法参考:http://hi.baidu.com/fcp_bd/blog/item/0e632783c08…
Hibernate中Criteria的完整用法
最近在项目中使用 Spring 和 Hibernate 进行开发,有感于 Criteria 比较好用,在查询方…
Struts2+Sitemesh
需要jar: sitemesh-2.4.2.jar struts2-sitemesh-plugin-2.2.1…
SSH全注解-annotation详细配置
SSH全注解-annotation详细配置 http://www.iteye.com/topic/816574…
监控和剖析数据库操作 — P6Spy、SQL Profiler、IronTrack SQL 使用
http://niyunjiu.iteye.com/blog/315451 http://www.ibm.co…
使用ApplicationContextAware得到一个ApplicationContext对象
http://blog.csdn.net/tohmin/article/details/6015289 [cr…
关于Hibernate的主键类型:uuid
升级到3.6.0后关于UUID的警告 原来的UUIDHexGenerator已不推荐使用,应用UUIDGene…
JAVA中怎么实现国际化(ResourceBundle 与locale的使用 )
http://bbsanwei.iteye.com/blog/271299 [crayon-68ab6b3d4…
JavaScript去除空格的三种方法 (trim),RepleaceAll
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); } String.prototype.LTrim = function() { return this.replace(/(^\s*)/g, ""); } String.prototype.RTrim = function() { return this.replace(/(\s*$)/g, ""); } str.replace(new RegExp(oStr, "gm"), nStr); |
详解spring事务属性和Transactional配置
详解spring事务属性:http://www.iteye.com/topic/78674 Transacti…
springMVC3集成DWR3
springMVC集成DWR: 参考: http://www.iteye.com/topic/209008 h…
Spring MVC3: Controller接受Form数据
Spring MVC3: Controller接受Form数据 [crayon-68ab6b3d43c7992…
Spring2.5 访问 Session 属性的四种策略
http://www.blogjava.net/mingj/archive/2008/10/12/233871…
at least 1 bean which qualifies as autowire candidate
参考: http://space.baidu.com.cn/%B5%DA%D2%BB%B8%F6%C9%CF%…
注解实现,报错sessionFactory’ or ‘hibernateTemplate’ is required
http://songfantasy.iteye.com/blog/656082 [crayon-68ab6b…
Spring3.0MVC和Hibernate基于annotation注解的整合
http://xlaohe1.iteye.com/blog/1139028 一下代码不完整的,可参考 http…
终于找到全annotation配置springMVC的方法了(事务不失效)
http://icanfly.iteye.com/blog/778401 icanfly 写道 如果带上事务,…
Spring 在配置中使用*.properties
http://www.blogjava.net/wmcoo/articles/333345.html [cra…
Spring,Hibernate注解
<context:component-scan />指定Bean扫描的包,多个包逗号隔开,任何标注…
关于注解的参考
参考: http://sducxh.iteye.com/blog/639761 http://zhangli-…
移动文件夹
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 |
function move_d($source, $target) { if (is_dir ( $source )) { $dest_name = basename ( $source ); if (! mkdir ( $target . $dest_name )) { return false; } $d = dir ( $source ); while ( ($entry = $d->read ()) !== false ) { if (is_dir ( $source . $entry )) { if ($entry == "." || $entry == "..") { continue; } else { move_d ( "$source$entry\\", "$target$dest_name\\" ); } } else { if (! copy ( "$source$entry", "$target$dest_name\\$entry" )) { return false; }else{ unlink($source); } } } } else { if (! copy ( "$source$entry", "$target$dest_name\\" )) { return false; } } return true; } |
删除文件夹
强制删除:[第二个参数true的时候是强制删除] [crayon-68ab6b3d44ada992115631…
php创建文件
1 2 3 4 5 6 |
<?php $counter_file = 'aa.txt ';//文件名及路径,在当前目录下新建aa.txt文件 $fopen = fopen($counter_file, 'wb ');//新建文件命令 fputs($fopen, 'aaaaaa ');//向文件中写入内容; fclose($fopen); ?> |