上一页 1 ··· 5 6 7 8 9 10 11 下一页
  2014年3月11日
摘要: 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 阅读(142) 评论(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 阅读(497) 评论(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 阅读(345) 评论(0) 推荐(0)
  2014年1月26日
摘要: 1,开闭原则(Open Close Principle:OCP)开闭原则就是说对扩展开放,对修改关闭。在程序需要进行扩展时候,不能修改原有的代码,实现一个热插拔的效果。所以一句话概括就是:为了使用程序的扩展性好,易于维护和升级。使用接口和抽象类达到这样的效果。2,里氏代换原则(Liskov Substitution Principle)里氏代换原则面向对象设计的基本原则之一。里氏代换原则中说,任何基类可以出现的地方,子类一定可以出现。LSP是继承复用的基石只有当衍生类可以替换掉基类,软件单位的功能不受影响时,基类才能真正被复用,而衍生类也能够在基类的基础上增加新的行为。里氏代换原则是对“开-闭 阅读全文
posted @ 2014-01-26 14:42 zhaofeng555 阅读(618) 评论(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 阅读(278) 评论(0) 推荐(0)
摘要: window.open打开新的连接时可能会被浏览器拦截掉。所以采用动态创建a标签的形式。var a = document.createElement('a');a.href = myUrl;a.target = '_blank';a.id=myid;document.body.appendChild(a);var alink = document.getElementById(myid);alink.click();alink.parentNode.removeChild(a); 阅读全文
posted @ 2013-12-06 10:11 zhaofeng555 阅读(384) 评论(0) 推荐(0)
  2013年12月5日
摘要: 当前页面打开一个链接:window.location="URL"打开一个新的页面,再打开一个新的链接:window.open(URL,窗口名称,窗口风格)window对象具有如下属性:statusstatusbarstatusbar.visibledefaultstatuslocationlocationbarlocationbar.visibleselfnameclosedframesframes.lengthlengthdocumenthistoryinnerHeightinnerWidthmenubarmenubar.visibleopenerouterHeighto 阅读全文
posted @ 2013-12-05 17:51 zhaofeng555 阅读(3446) 评论(0) 推荐(0)
  2013年11月29日
摘要: 1,建立自己的java项目my_service2,建立包,com.hjg.service3,创建类:IMyService.javapackage com.hjg.service;import javax.jws.WebService;@WebServicepublic interface IMyService { int add(int a, int b); int minus(int a,int b);}加上@Webservice注解JAX-WS注解,表示java api xml for webservice。JDK自带API的XML格式的webserviceMyServiceI... 阅读全文
posted @ 2013-11-29 23:01 zhaofeng555 阅读(512) 评论(0) 推荐(0)
摘要: 1.下载安装包 去oracle下载jdk-7u45-linux-i586.rpm2. 更改权限 #chmod 777jdk-7u45-linux-i586.rpm3. 安装 #rpm -ivh jdk-7u45-linux-i586.rpm默认安装在/usr/java/jdk1.7.0_454.创建链接代替默认的GCJ#cd /usr/bin[root@hman bin]# ls -s -f /usr/java/jdk1.7.0_45/jre/bin/java/usr/java/jdk1.7.0_45/jre/bin/java[root@hman bin]# ls -s -f /usr/jav 阅读全文
posted @ 2013-11-29 18:38 zhaofeng555 阅读(298) 评论(0) 推荐(0)
摘要: varobjArr = getObjArr(id);for(var i=0; i<objArr.length; i++){var param=objArr.paramaddEvent(objArr[i],'click',function(){new Image().src = [u, "?t=", new Date().getTime(),"&p=", param].join('');});}上述写法有问题,因为param会变成最后一个值,所以动态传递参数失败。相对于addEvent的object来说para 阅读全文
posted @ 2013-11-29 15:17 zhaofeng555 阅读(1699) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 下一页