Collections.sort 异常
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeHi(TimSort.java:868)
at java.util.TimSort.mergeAt(Ti...
分类:
其他好文 时间:
2014-06-25 19:47:27
阅读次数:
250
Chapter1 and Chapter2方法定义:def methodName(param1: ParamType, param2: ParamType2, [maybe more]): ReturnType = { // method body}函数式编程中一个约定俗成的说法就是,方法会返回一....
分类:
其他好文 时间:
2014-06-25 19:15:35
阅读次数:
205
创建型: 1. 单件模式(SingletonPattern) 2. 抽象工厂(AbstractFactory) 3. 建造者模式(Builder) 4. 工厂方法模式(Factory Method) 5. 原型模式(Prototype)结构型: 6. 适配器模式(AdapterPattern)...
分类:
其他好文 时间:
2014-06-25 18:16:08
阅读次数:
148
/**
* Method 1: Delete the input element x
* and meanwhile keep the length of array after deleted n
* @param a the array
* @param n the length of array after deleted.
* @param x the element t...
分类:
其他好文 时间:
2014-06-25 08:27:27
阅读次数:
171
attribute method:
#include
struct packed
{
char a;
int b;
} __attribute__((packed));
struct not_packed
{
char a;
int b;
};
int main(void)
{
printf("Packed: %zu\n", sizeof(...
分类:
其他好文 时间:
2014-06-25 07:29:49
阅读次数:
155
1. 在Main中先是加载模块,启动REST服务,而后构建一个实现了IFloodlightProviderService接口的实例(即Controller)并运行;
2. 接下来进入Controller的run()方法,此时所有的环境初始化工作已经完成,构建一个基于netty的TCP server,最重要的是流水线factory OpenflowPipelineFactory 的设置,里面是co...
分类:
其他好文 时间:
2014-06-24 22:47:40
阅读次数:
277
(1) abstract方法没有具体的实现,同时必须被覆写
(2) 虚(Virtual)方法可以没有具体的实现,也不一定必须覆写(虚方法定义时,可以没有具体的实现代码,但是必须创建方法体:即必须有方法的左右花括号)。
(3) 抽象方法不可以使用base.method()方式调用,但是虚方法是可以的
//定义一个抽象方法
using System;
using System.Colle...
分类:
其他好文 时间:
2014-06-24 22:21:22
阅读次数:
331
该类为反射函数 获取和暴力获取ReflectPoin类中的属性
package com.tuozou.test;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class ReflectTes...
分类:
编程语言 时间:
2014-06-24 22:02:03
阅读次数:
252
login-config元素在部署描述符中仅仅出现一次,它包含了auth-method元素,指定了Authentiction方法。就这是说context仅仅有LoginConfig的一个实例对象并部署一个校验类的实现。
AuthentictorBase类的哪个子类用作context的校验值取决于部署描述符中auth-method元素的值。auth-method值有一下几种:
B...
分类:
其他好文 时间:
2014-06-24 20:26:39
阅读次数:
248
1:Class类中的方法
public Method getDeclaredMethod(String name,
Class... parameterTypes)
throws NoSuchMethodException,
...
分类:
编程语言 时间:
2014-06-24 15:37:45
阅读次数:
201