`
tianyalinfeng
  • 浏览: 432509 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论
文章列表

新博开启

    博客分类:
  • Java
天涯临枫:http://www.tianyalinfeng.com/
$("a[name='file']").click(function(){ $("input[class='cke_dialog_ui_input_text'",window.opener.document).val(this.id); window.close(); });
org.apache.commons.io.FileUtils   public static Collection<File> listFiles(File directory, String[] extensions, boolean recursive) Finds files within a given directory (and optionally its subdirectories) which match an array of extensio ...
DetachedCriteria dc = DetachedCriteria.forClass(Group.class); dc.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); return getHibernateTemplate().findByCriteria(dc);

ckeditor简单应用

    博客分类:
  • Java
准备 ckeditor前端源码ckeditor_4.2_full.zip ckeditor包ckeditor-java-core-3.5.3.jar 下载:http://ckeditor.com/   jsp示例 <%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %> <%  CKEditorConfig settings = new CKEditorConfig();  settings.addConfigValue("filebrowserUpl ...

深度复制

    博客分类:
  • Java
浅复制:将一个对象复制后,基本数据类型的变量都会重新创建,而引用类型,指向的还是原对象所指向的。 深复制:将一个对象复制后,不论是基本数据类型还有引用类型,都是重新创建的。简单来说,就是深复制进行了完全彻底的复制,而浅复制不彻底。    /* 写入当前对象的二进制流 */           ByteArrayOutputStream bos = new ByteArrayOutputStream();           ObjectOutputStream oos = 

Java的23中设计模式

    博客分类:
  • Java
Java的23中设计模式 从这一块开始,我们详细介绍Java中23种设计模式的概念,应用场景等情况,并结合他们的特点及设计模式的原则进行分析。 1、工厂方法模式(Factory Method) 工厂方法模式分为三种: 11、普通工厂模式,就是建立一个工厂类,对实现了同一接口的一些类进行实例的创建。首先看下关系图: 举例如下:(我们举一个发送邮件和短信的例子) 首先,创建二者的共同接口: [java] view plain

设计模式的六大原则

    博客分类:
  • Java
 
设计模式的六大原则 1、开闭原则(Open Close Principle) 开闭原则就是说对扩展开放,对修改关闭。在程序需要进行拓展的时候,不能去修改原有的代码,实现一个热插拔的效果。所以一句话概括就是:为了使程序的扩展性好,易于维护和升级。想要达到这样的效果,我们需要使用接口和抽象类,后面的具体设计中我们会提到这点。 2、里氏代换原则(Liskov Substitution Principle) 里氏代换原则(Liskov Substitution Principle LSP)面向对象设计的基本原则之一。 里氏代换原则中说,任何基类可以出现的地方,子类一定可以出现。 LSP是继承 ...
1.下载heritrix-3.1.1-dist.zip(此包内包含所有相关jar包) 2.解压并将项目导入至myclipse 3.打开Heritrix.java   ->  右击 Run As -> Open Run Dialog -> Arguments 输入-a admin:admin 点击Run启动Heritrix.java 4.用浏览器打开https://127.0.0.1:8443/   参考:https://webarchive.jira.com/wiki/display/Heritrix/Heritrix+3.0+and+3.1+User+Gui ...
在web.xml中添加如下代码: <security-constraint>       <web-resource-collection>              <web-resource-name>ABC</web-resource-name>              <url-pattern>*.list</url-pattern>               <url-pattern>*.conf</url-pattern>        </web-resource ...
Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_CURRENT); // Store the index in memory: Directory directory = new RAMDirectory(); // To store an index on disk, use this instead: //Directory directory = FSDirectory.open("/tmp/testindex"); IndexWriterConfi ...
安装 http://blog.csdn.net/liu_jason/article/details/7705484   java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName   http://www.360doc.com/content/10/1228/14/2159920_82011026.shtml   cygwin sshd 服务无法启动 http://www.cnblogs.com/tiga/archive/2012/11/16/2772643.html   java.io.IOExc ...

基本技术

1. 贪心法 2. 分治法 3. 动态规划

迭代器模式

意图: 提供一种方法顺序访问一个聚合对象中各个元素,而又不需暴露该对象的内部表示 编辑本段   适用性: 访问一个聚合对象的内容而无需暴露它的内部表示 支持对聚合对象的多种遍历 为便利不同的聚合结构提供一个统一的接口
struts action里的属性值正常都是存放在request中 而iframe里的页面取不到父页面request里的值,只能将父页面的值存放在session里,iframe子页面才能正常获取 存放到session的方法如下: ActionContext ac = ActionContext.getContext(); ac.getSession().put("user", user);  
Global site tag (gtag.js) - Google Analytics