上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
  2014年3月28日
摘要: Redis安装:$wgethttp://redis.googlecode.com/files/redis-2.4.5.tar.gz$tarxzfredis-2.4.5.tar.gz$cdredis-2.4.5$make&makeinstall测试:$src/redis-server$src/redis-cliauthhaojg//haojg是密码redis>setfoobarOKredis>getfoo"bar"将redis.conf中的daemonizeno变成daemonizeyes$cd../utils/$./install_server//安装启 阅读全文
posted @ 2014-03-28 14:02 zhaofeng555 阅读(147) 评论(0) 推荐(0) 编辑
  2014年3月26日
摘要: @RequestMapping(value = "/export.do")public void exportpushuserByareacode(HttpServletRequest req, HttpServletResponse rsp) throws Exception { List list = .....; String name="导出的文件.csv"; name = new String(name.getBytes("GBK"), "ISO8859-1"); rsp.setContentType(& 阅读全文
posted @ 2014-03-26 10:40 zhaofeng555 阅读(1845) 评论(0) 推荐(0) 编辑
  2014年3月11日
摘要: public class MergeSort { private static void mergeSortTest() { int[] in = { 2, 5, 3, 8, 6, 7, 1, 4, 0, 9 }; Utils.printArray("归并排序前:",in); int a[] = mergeSort(in); Utils.printArray("归并排序后:",a); } private static int[] mergeSort(int[] arr) { if (arr.length == 1) { return arr; } els 阅读全文
posted @ 2014-03-11 21:00 zhaofeng555 阅读(133) 评论(0) 推荐(0) 编辑
摘要: public class InsertSortUtils { public static void main(String[] args) { insertSortTest(); shellSortTest(); } private static void insertSortTest() { int[] values = { 5, 2, 4, 1, 3 }; System.out.print("直接插入排序前: "); Utils.printArray(values); insertSort(values); System.out.print("直接插入排序后: 阅读全文
posted @ 2014-03-11 20:59 zhaofeng555 阅读(135) 评论(0) 推荐(0) 编辑
摘要: public class ExchangeSortUtils { // 冒泡 public static void bubbleSort(int[] array) { int length = array.length; int temp; boolean isSort; for (int i = 1; i array[j + 1]) { // 交换 temp = array[j]; array[j] = array[j + 1]; array[j + 1] = temp; isSort = true; } } if (!isSo... 阅读全文
posted @ 2014-03-11 20:58 zhaofeng555 阅读(294) 评论(0) 推荐(0) 编辑
摘要: public class SelectionSort { private static void selectSortTest() { int[] sortArray = { 5, 2, 4, 1, 3 }; System.out.print("选择排序前: "); Utils.printArray(sortArray); selectSort(sortArray); System.out.print("选择排序后: "); Utils.printArray(sortArray); } public static void selectSort(int[ 阅读全文
posted @ 2014-03-11 20:56 zhaofeng555 阅读(136) 评论(0) 推荐(0) 编辑
  2014年2月25日
摘要: jquery实现tab停留半秒后,选中菜单、切换tab下的内容:var showHandler=null;function init(){ $("#tab_ul").find("li").each(function(index, ele){ var divId = "#nav"+index; $(ele).mouseover(function(){ //定时器,半秒后执行 showHandler = setTimeout(function(){ //实现操作 }, 500); }).mouseout(function(){ ... 阅读全文
posted @ 2014-02-25 11:23 zhaofeng555 阅读(487) 评论(0) 推荐(0) 编辑
  2014年2月11日
摘要: spring的applicationContext.xml配置文件:加入 com.job.Service 0 0 1 * * ? quartz与spring的BeanFactory整合的类:/** * 为定时器提供自动注入功能 */public class JobFactory extends SpringBeanJobFactory implements ApplicationContextAware { private ApplicationContext applicationC... 阅读全文
posted @ 2014-02-11 11:25 zhaofeng555 阅读(339) 评论(0) 推荐(0) 编辑
  2014年1月26日
摘要: 1,开闭原则(Open Close Principle:OCP)开闭原则就是说对扩展开放,对修改关闭。在程序需要进行扩展时候,不能修改原有的代码,实现一个热插拔的效果。所以一句话概括就是:为了使用程序的扩展性好,易于维护和升级。使用接口和抽象类达到这样的效果。2,里氏代换原则(Liskov Substitution Principle)里氏代换原则面向对象设计的基本原则之一。里氏代换原则中说,任何基类可以出现的地方,子类一定可以出现。LSP是继承复用的基石只有当衍生类可以替换掉基类,软件单位的功能不受影响时,基类才能真正被复用,而衍生类也能够在基类的基础上增加新的行为。里氏代换原则是对“开-闭 阅读全文
posted @ 2014-01-26 14:42 zhaofeng555 阅读(609) 评论(0) 推荐(0) 编辑
  2013年12月6日
摘要: 打开Eclipse,新建java项目,service_startcmd下运行wsimport(要配置jdk的环境变量,wsimport在JAVA_HOME/bin下)wsimport-dd:/webservice -keep-verbosehttp://localhost:8888/ns?wsdl-d:指定生成的目录-keep:指定是否生成Java源文件-verbose:显示生成的详细过程http://host.....?wsdl:网络WSDL的文件将d:/webservice下生成文件拷贝到工程src中去,就可以调用了。这样就可以调用远端的web Service了。 阅读全文
posted @ 2013-12-06 22:08 zhaofeng555 阅读(265) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页