OpenID and OAuth
OpenID and OAuth From http://cakebaker.42dh.com/2008/04/01/openid-versus-oauth-from-the-users-perspective/ In this article I want to show the diff...
Class Loader
Java ClassLoader 调用自定义ClassLoader1234567891011121314151617public class ClassLoaderTest { public static void main(String[] args) { ...
ClassNotFoundException and NoClassDefFoundError
ClassNotFoundException and NoClassDefFoundError From: http://jroller.com/sjivan/entry/difference_between_classnotfoundexception_and_noclassdeffound...
构建高性能Web站点读后
构建高性能Web站点读后 数据库层主要查询建索引,一个是全表扫描,一个是常量时间。通过explain 查询语句就知道了 通过memcached分布式缓存减少数据库或者磁盘文件IO,原则是把数据缓存到离使用者最近的地方 写操作也可以缓存,如果不要求实时更新到数据库的话。比如把某个页...
如何简单的得到Java进程的stack trace dump
如何简单的得到Java进程的stack trace dump 最简单直接变态的方法是:找到这个java进程的id(linux下的ps或者windows下的jps),直接kill掉。 1kill -3 pid java虚拟机没有hang住的情况下会立即dump stack trace;否则需要...
Javascript 数据类型和值
Javascript 类型 五个基本类型(primitive data type) number,特殊的是NaN,Infinity,-Infinity。 NaN(Not a Number)实际上还是Number类型 string boolean undefined,唯一值是unde...
cluster nad non-cluster index
clustered and nonclustered indexes A clustered index is a special type of index that reorders the way records in the table are physically stored. ...
JDK中用到的设计模式
JDK中用到的设计模式 java.io 中用到了装饰模式和适配器模式 装饰模式, In general, each read request made of a Reader causes a corresponding read request to be made of the under...
code review
Code Review时考虑到的有 从Collection中remove出来的对象标记为null 少用静态变量(全局变量,静态变量不会被GC自动回收?) 避免把生命周期不同的对象堆在一起成为一个大的对象 JDBC Connection/Statement&#x...
类的初始化
类的初始化顺序: 静态初始化块 main函数中的输出(调用构造函数前) 实例的初始化块(初始化匿名内部类的地方) 构造函数初始化 1234567891011121314151617181920import static java.lang.System.out;public cla...