`
cywhoyi
  • 浏览: 421251 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论
文章列表
We need to make multiple web-based projects with a lot of shared functionality. For that, some sort of a plugin system would be a good option (as an alternative to copy-pasting stuff). Some frameworks (like grails) have the option to make web plugins, but most don’t, so something custom-made is to ...
se Case Implement separation between the code that holds resource from that of accessing it such that the accessing code doesn’t need to manage the resources. The use case mentioned holds true when we write code to read/write to a file or querying SQL / NOSQL dbs. There are certainly API’s handled ...
Memento pattern is one of the behavioral design pattern. Memento design pattern is used when we want to save the state of an object so that we can restore later on. Memento pattern is used to implement this in such a way that the saved state data of the object is not accessible outside of the objec ...

Garbage Collection

 
Garbage Collectionby Bill Venners The Java virtual machine's heap stores all objects created by a running Java application. Objects are created by the new, newarray, anewarray, and multianewarray instructions, but never freed explicitly by the code. Garbage collection is the process of automatica ...
Without argument, java collections is one of the most important area where you will be tested in any position whether junior or senior. The scope is so much wide, that its almost impossible to cover all the questions. Yet based on my previous interviews, I am attempting to put as many as possible G ...

序列化

    博客分类:
  • JAVA
This article explains version control in serialization.If you serialize an object, then you must have the same class to deserialize it and use the object. If you modify the class then that can cause incompatibility and that can cause deserialization to fail. There are some changes you can make to a ...

What is CountDownLatch?

    博客分类:
  • JAVA
CountDownLatch was introduced with JDK 1.5 along with other concurrent utilities like CyclicBarrier, Semaphore, ConcurrentHashMap and BlockingQueue in java.util.concurrent package. This class enables a java thread to wait until other set of threads completes their tasks. e.g. Application’s main thre ...
多表关联处理获取结果,大致意思把数据切割成左右表 package org.apache.hadoop.examples; import java.io.IOException; import java.util.Iterator; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.Text; import org.apache ...
 android与服务端的服务架构,整体设计概念,模仿了ibatis的早期设计理念。   提供一个关于如何android解析webservice相应报文的解析工具,我大致概括了下,应该能够大致满足大家的需要,主要参考了ksoap2框架的api,进行再一次的封装。 package cc.ewell.mcs.portal.engine.parse; import java.util.ArrayList; import java.util.List; import org.ksoap2.serialization.SoapObject; public class KSoap ...

动态解析

    博客分类:
  • JAVA
用token的方式动态的解析替换特殊值,举个小例子挺不错。   public class GenericTokenParser { private final String openToken; private final String closeToken; private final TokenHandler handler; public GenericTokenParser(String openToken, String closeToken, TokenHandler handler) { this.openToken = openTo ...

myibatis分页

    博客分类:
  • JAVA
采用的myibaits的插件方式 import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Properties; import org.apache.ibatis.executor.Executor; import org.apache.ibatis.mapping.BoundSql; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.mapping ...

parameter拦截器

    博客分类:
  • JAVA
拦截一些非法的参数信息,使用注解的方式 mport java.lang.annotation.Annotation; import java.util.Collection; import java.util.Collections; import java.util.Map; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.apache.commons.logging.Log; import ...
http://www.redmine.org/projects/redmine/wiki/HowTo_Mylyn http://stackoverflow.com/questions/7506357/eclipse-mylyn-with-redmine
环境:ubantu12.4  EclipseJuno apache hadoop1.1.2 如果安装插件成功,打开Window-->Preferens,你会发现Hadoop Map/Reduce选项,在这个选项里你需要配置Hadoop installation directory。配置完成后退出。 3.配置Map/Reduce Locations。 在Window-->Show View中打开Map/Reduce Locations。 在Map/Reduce Locations中新建一个Hadoop Location。在这个View中,右键-->New Hadoop ...
Hadoop1.1.2、ubantu12.04、eclipse juno、JDK1.7 下载http://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/hadoop-1.1.2/,二进制版本,解压、安装 http://hadoop.apache.org/docs/r1.1.2/ 1.进入hadoop_home 运行./bin/hadoop namenode -format 2.进入hadoop_home/bin 运行./start-all.sh 3.localhost:50030  localhost:50070查看   jd ...
Global site tag (gtag.js) - Google Analytics