自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 资源 (1)
  • 收藏
  • 关注

原创 看书理解的tcp握手

tcp的三次握手分别是可以理解一共交互三个报文,客户端向服务端发送两个,服务端向客户端发送一个。 tcp的四次挥手分别是可以理解为一共交互四个报文,客户端和服务端各向对方发两个报文。

2016-01-23 14:10:42 303

原创 快速排序

public static Integer CUTOFF = 10; /**  * 交换位置  */ public static > void swapReferences(AnyType [] a,int left,int right){  AnyType temp ;  temp = a[ left ];  a[ left ] = a[ right ];  a[ right ] = temp; }   /**    * 插入排序    */ public static > void insertSort

2010-12-07 10:41:00 493

原创 合并排序

package cn.cnooc.algorithm;/** * 归并排序 * @author 选自《数据结构与算法分析 Java语言描述》 Mark Allen Weiss * */public class MergeSort { /**  * MergeSort Algorithm  * @param   * @param a an array of Comparable items  */    @SuppressWarnings({ "unchecked" }) private static > v

2010-11-21 16:21:00 410

原创 java bean concept

 JavaBeans Concepts<br />The JavaBeans™ architecture is based on a component model which enables developers to create software units called components. Components are self-contained, reusable software units that can be visually assembled into composite com

2010-09-30 13:14:00 458

翻译 动态代理混合

<br />用动态代理可能产生一种比装饰器模式更接近混型模式的机制,用动态代理,产生的类型就是已经被混合后产生的组合类型。由于动态代理的限制,每个参与混型的类都必须实现某个或某些接口。<br />class MixinProxy implements InvocationHandler{<br />  Map<String,Object> delegatesByMethod;<br />  public MinxinProxy(TwoTuple<Object,Class<?>>...pairs){<br /

2010-09-23 12:59:00 433

原创 元组 tuple

public class TwoTuple{   public final A first;   public final B second;   public TwoTuple(A a,B b){     first = a;     second = b;  }  public String toString(){     return "(" + first + ","+ second+")";  }}

2010-09-23 11:42:00 451

翻译 混型

      由于存在类型擦除,泛型中异常的处理受到限制。由于异常的类型必须在编译或运行时,确切知晓,否则,异常无法被捕获。泛型类型通常不能直接的或者间接的继承Throwable,这进一步阻止了你处理不能被捕获的异常。      尽管如此,类型参数还是被用在方法声明的异常语句中的,他允许你通过检查类型信息来写泛型的代码  interface Processor{    void process(List resultCollector) throw E;}   class ProcessRunner exte

2010-09-21 15:44:00 783

翻译 泛型中的异常处理

<br />      由于存在类型擦除,泛型中异常的处理受到限制。由于异常的类型必须在编译或运行时,确切知晓,否则,异常无法被捕获。泛型类型通常不能直接的或者间接的继承Throwable,这进一步阻止了你处理不能被捕获的异常。<br />      尽管如此,类型参数还是被用在方法声明的异常语句中的,他允许你通过检查类型信息来写泛型的代码<br />  interface Processor<T,E extends Exception>{<br />    void process(List<T> res

2010-09-20 17:03:00 598 1

翻译 no-generic code

在没有泛型的代码中,参数类型不能随着子类型变化,而变化:  class OrdinarySetter{   void set(Base base){      System.out.println("OrdinarySetter.set(Base)");    } }  class DerivedSetter extends OrdinarySetter{    void set(Derived derived){     System.out.println("DerivedSetter.set(Deri

2010-09-20 15:04:00 429

翻译 Java泛型中类型信息的擦除

public  class Erased{    private final int SIZE = 100;    public static void f(Object arg){      if(arg instanceof T){} //Error      T var = new T();//Error      T[] array = new T[SIZE];//Error      T[] array = (T)new Object[SIZE];//Unchecked warning   }} 

2010-09-13 20:42:00 590

翻译 Why security

   Java's security model is one of the key architectural features that makes it an appropriate technology for networked environments. Security is important because networks represent a potential avenue of attack to any computer hooked to them. This concern

2010-09-11 17:54:00 491

翻译 Security

    Aside from platform independence, discussed in the previous chapter, the other major technical challenge a network-oriented software technology must deal with is security. Networks, because they allow computers to share data and distribute processing,

2010-09-10 19:05:00 355

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除