http://www.jcp.org/en/jsr/detail?id=133
http://ifeve.com/jmm-faq/
jps, jstack, jmap, jconsole, jinfo, jhat, javap, …
http://kenai.com/projects/btrace
http://www.crashub.org/
https://github.com/taobao/TProfiler
https://github.com/CSUG/HouseMD
http://wiki.cyclopsgroup.org/jmxterm
https://github.com/jlusdy/TBJMap
http://www.eclipse.org/mat/
http://visualvm.java.net/oqlhelp.html
HeapOutOfMemory
Young OutOfMemory
MethodArea OutOfMemory
ConstantPool OutOfMemory
DirectMemory OutOfMemory
Stack OutOfMemory
Stack OverFlow
当一个Java程序响应很慢时如何查找问题
当一个Java程序频繁FullGC时如何解决问题,如何查看垃圾回收日志
当一个Java应用发生OutOfMemory时该如何解决,年轻代、年老代、永久代解决办法不同,导致原因也不同
http://docs.oracle.com/javase/specs/jvms/se7/html/
http://www.cs.umd.edu/~pugh/java/memoryModel/
http://gee.cs.oswego.edu/dl/jmm/cookbook.html
java.lang.String
java.lang.Integer
java.lang.Long
java.lang.Enum
java.math.BigDecimal
java.lang.ThreadLocal
java.lang.ClassLoader & java.net.URLClassLoader
java.util.ArrayList & java.util.LinkedList
java.util.HashMap & java.util.LinkedHashMap & java.util.TreeMap
java.util.HashSet & java.util.LinkedHashSet & java.util.TreeSet
上述数据结构的遍历
上述数据结构的使用场景
Java实现对Array/List排序
java.uti.Arrays.sort()
java.util.Collections.sort()
Java实现对List去重
Java实现对List去重,并且需要保留数据原始的出现顺序
Java实现最近最少使用cache,用LinkedHashMap
java.io.*
java.nio.*
nio和reactor设计模式
文件编码,字符集
反射与工厂模式
java.lang.reflect.*
java.io. Serializable
什么是序列化,为什么序列化
序列化与单例模式
google序列化protobuf
java.lang.ref.*
实验这些引用的回收
java.util.Properties
java.lang.annotation.*
javax.jms.*
java.lang.management.*
javax.management.*
java.lang.instrument
Junit,http://junit.org/
Jmockit,https://code.google.com/p/jmockit/
djUnit,http://works.dgic.co.jp/djunit/
java.lang.util.regex.*
commons.lang, commons.*…
guava-libraries
netty
http://en.wikipedia.org/wiki/Application_programming_interface
http://en.wikipedia.org/wiki/Service_provider_interface
JDK src.zip 源代码
http://openjdk.java.net/
http://commons.apache.org/
https://code.google.com/p/guava-libraries/
http://netty.io/
http://stackoverflow.com/questions/2954372/difference-between-spi-and-api
http://stackoverflow.com/questions/11404230/how-to-implement-the-api-spi-pattern-in-java
java.lang.Thread
java.lang.Runnable
java.util.concurrent.Callable
java.util.concurrent.locks.ReentrantLock
java.util.concurrent.locks.ReentrantReadWriteLock
java.util.concurrent.atomic.Atomic*
java.util.concurrent.Semaphore
java.util.concurrent.CountDownLatch
java.util.concurrent.CyclicBarrier
java.util.concurrent.ConcurrentHashMap
java.util.concurrent.Executors
什么是锁,锁的种类有哪些,每种锁有什么特点,适用场景是什么
在并发编程中锁的意义是什么
C++ volatile关键字和Java volatile关键字
happens-before语义
编译器指令重排和CPU指令重排
http://en.wikipedia.org/wiki/Memory_ordering
http://en.wikipedia.org/wiki/Volatile_variable
http://preshing.com/20130702/the-happens-before-relation/
<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:undefined; padding:0px; color:inherit; white-space:pre-wrap; background-color:transparent"><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">public</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">class</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">Sample</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">{</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">private</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">static</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">int</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> count </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">0</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">public</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">static</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">void</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> increment</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">()</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">{</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> count</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">++;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">}</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">}</span></span></code>
<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:undefined; padding:0px; color:inherit; white-space:pre-wrap; background-color:transparent"><span class="com" style="color:#93a1a1;"><span class="com" style="color:#93a1a1;">// 代码1</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">public</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">class</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">Sample</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">{</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">private</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">static</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">int</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> count </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">0</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">synchronized</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">public</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">static</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">void</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> increment</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">()</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">{</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> count</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">++;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">}</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">}</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="com" style="color:#93a1a1;"><span class="com" style="color:#93a1a1;">// 代码2</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">public</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">class</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">Sample</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">{</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">private</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">static</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">AtomicInteger</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> count </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">new</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">AtomicInteger</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">0</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">);</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">public</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">static</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">void</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> increment</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">()</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">{</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> count</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">getAndIncrement</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">();</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">}</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">}</span></span></code>
http://book.douban.com/subject/10484692/
http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html
http://en.wikipedia.org/wiki/Java_class_file
http://en.wikipedia.org/wiki/Java_bytecode
http://en.wikipedia.org/wiki/Java_bytecode_instruction_listings
http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/
http://asm.ow2.org/
如Java源代码:
<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:undefined; padding:0px; color:inherit; white-space:pre-wrap; background-color:transparent"><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">public</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">static</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">void</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> main</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">String</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">[]</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> args</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">)</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">{</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">int</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> i </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">0</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> i </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">+=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> i </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">*=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">System</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">out</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">println</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">i</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">);</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">}</span></span></code>
编译后读取class文件输出以下代码:
<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:undefined; padding:0px; color:inherit; white-space:pre-wrap; background-color:transparent"><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">public</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">static</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">void</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> main</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">java</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">lang</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">String</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">[]);</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">Code</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">Stack</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">2</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">,</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">Locals</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">2</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">,</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">Args_size</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">0</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> iconst_0 </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> istore_1 </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">2</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> iinc </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">,</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">5</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> iload_1 </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">6</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> iconst_1 </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">7</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> imul </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">8</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> istore_1 </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">9</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> getstatic </span></span><span class="com" style="color:#93a1a1;"><span class="com" style="color:#93a1a1;">#2; //Field java/lang/System.out:Ljava/io/PrintStream;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">12</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> iload_1 </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">13</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> invokevirtual </span></span><span class="com" style="color:#93a1a1;"><span class="com" style="color:#93a1a1;">#3; //Method java/io/PrintStream.println:(I)V</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">16</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">return</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">LineNumberTable</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> line </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">4</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">0</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> line </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">5</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">2</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> line </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">6</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">5</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> line </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">7</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">9</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> line </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">8</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">16</span></span></code>
http://duartes.org/gustavo/blog/post/intel-cpu-caches/
http://mechanical-sympathy.blogspot.com/2011/07/false-sharing.html
用位运算实现加、减、乘、除、取余
http://book.douban.com/subject/1138768/
http://book.douban.com/subject/6522893/
http://en.wikipedia.org/wiki/Java_class_file
http://en.wikipedia.org/wiki/Java_bytecode
http://en.wikipedia.org/wiki/Java_bytecode_instruction_listings
CGLIB和InvocationHandler的区别
http://cglib.sourceforge.net/
动态代理模式
Javassist实现AOP
http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/
ASM实现AOP
http://asm.ow2.org/
http://asm.ow2.org/
http://cglib.sourceforge.net/
http://www.javassist.org/
实现客户端缓存功能,支持返回304
实现可并发下载一个文件
使用线程池处理客户端请求
使用nio处理客户端请求
支持简单的rewrite规则
上述功能在实现的时候需要满足“开闭原则”
http://nginx.org/
http://httpd.apache.org/
搭建一个DNS服务器
搭建一个 Squid 或 Apache Traffic Server 服务器
http://www.squid-cache.org/
http://trafficserver.apache.org/
http://en.wikipedia.org/wiki/Domain_Name_System
http://www.ietf.org/rfc/rfc2616.txt
http://tools.ietf.org/rfc/rfc5321.txt
http://en.wikipedia.org/wiki/Open/closed_principle
spring,spring mvc,阅读主要源码
ibatis,阅读主要源码
用spring和ibatis搭建java server
熟悉使用jboss,https://www.jboss.org/overview/
熟悉使用tomcat,http://tomcat.apache.org/
熟悉使用jetty,http://www.eclipse.org/jetty/
<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:undefined; padding:0px; color:inherit; white-space:pre-wrap; background-color:transparent"><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> sysdate sysdate </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">-</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> sysdate </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">-</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">/</span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">24</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> sysdate </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">-</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">/(</span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">12</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">*</span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">2</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">)</span></span></code>
<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:undefined; padding:0px; color:inherit; white-space:pre-wrap; background-color:transparent"><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">QList</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;"><</span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">Map</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;"><</span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">String</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">,</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">Object</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">>></span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> mapList </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">new</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">QList</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;"><</span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">Map</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;"><</span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">String</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">,</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">Object</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">>>;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> mapList</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">add</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">({</span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"name"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"hatter test"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">});</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> mapList</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">add</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">({</span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"id"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">-</span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">,</span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"name"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"hatter test"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">});</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> mapList</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">add</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">({</span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"id"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">0</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">,</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"name"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"hatter test"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">});</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> mapList</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">add</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">({</span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"id"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">,</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"name"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"test test"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">});</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> mapList</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">add</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">({</span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"id"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">2</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">,</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"name"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"hatter test"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">});</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> mapList</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">add</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">({</span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"id"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">3</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">,</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"name"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"test hatter"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">});</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> mapList</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">query</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"id is not null and id > 0 and name like '%hatter%'"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">);</span></span></code>
要求返回列表中匹配的对象,即最后两个对象;
代码:
<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:undefined; padding:0px; color:inherit; white-space:pre-wrap; background-color:transparent"><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">var</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> a </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">var</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> b </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">2</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">var</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> c </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">function</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">()</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">{</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">var</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> a </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">3</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> println</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">a</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">);</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> println</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">b</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">);</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">};</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> c</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">();</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> println</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">a</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">);</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> println</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">b</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">);</span></span></code>
输出:
<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:undefined; padding:0px; color:inherit; white-space:pre-wrap; background-color:transparent"><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">3</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">2</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">1</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="lit" style="color:#ae81ff;"><span class="lit" style="color:#ae81ff;">2</span></span></code>
http://en.wikipedia.org/wiki/Abstract_syntax_tree
https://javacc.java.net/
http://www.antlr.org/
Ubuntu
Centos
使用linux,熟悉shell脚本
MySQL
如何看执行计划
如何搭建MySQL主备
binlog是什么
Derby,H2,PostgreSQL
SQLite
Cache
Redis
Memcached
Leveldb
Bigtable
HBase
Cassandra
Mongodb
图数据库
neo4j
http://db-engines.com/en/ranking
http://redis.io/
https://code.google.com/p/leveldb/
http://hbase.apache.org/
http://cassandra.apache.org/
http://www.mongodb.org/
http://www.neo4j.org/
在linux上部署solr,solrcloud,,新增、删除、查询索引
在linux上部署storm,用zookeeper做协调,运行storm hello world,local和remote模式运行调试storm topology。
Hdfs:部署NameNode,SecondaryNameNode,DataNode,上传文件、打开文件、更改文件、删除文件
MapReduce:部署JobTracker,TaskTracker,编写mr job
Hive:部署hive,书写hive sql,得到结果
Presto:类hive,不过比hive快,非常值得学习
http://zookeeper.apache.org/
https://lucene.apache.org/solr/
https://github.com/nathanmarz/storm/wiki
http://hadoop.apache.org/
http://prestodb.io/
http://flume.apache.org/,http://logstash.net/,http://kafka.apache.org/
http://mahout.apache.org/
http://www.openauthentication.org/
HOTP http://www.ietf.org/rfc/rfc4226.txt
TOTP http://tools.ietf.org/rfc/rfc6238.txt
OCRA http://tools.ietf.org/rfc/rfc6287.txt
http://en.wikipedia.org/wiki/Salt_(cryptography)
http://en.wikipedia.org/wiki/Cryptographic_hash_function
http://en.wikipedia.org/wiki/Block_cipher
http://en.wikipedia.org/wiki/Public-key_cryptography
http://en.wikipedia.org/wiki/Transport_Layer_Security
http://www.openssl.org/
https://code.google.com/p/google-authenticator/
https://linuxcontainers.org/
http://www.linux-kvm.org/page/Main_Page
http://www.xenproject.org/
https://www.docker.io/
http://www.nagios.org/
http://ganglia.info/
http://www.linuxvirtualserver.org/
https://github.com/
https://git.oschina.net/
http://maven.apache.org/
http://www.gradle.org/
Groovy
Scala
LISP, Common LISP, Schema, Clojure
R
Julia
Lua
Ruby
了解以下概念
ASCII, ISO-8859-1
GB2312, GBK, GB18030
Unicode, UTF-8
不使用 String.getBytes() 等其他工具类/函数完成下面功能
<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:undefined; padding:0px; color:inherit; white-space:pre-wrap; background-color:transparent"><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">public</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">static</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">void</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> main</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">String</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">[]</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> args</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">)</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">throws</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">IOException</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">{</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">String</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> str </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"Hello, 我们是中国人。"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">byte</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">[]</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> utf8Bytes </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> toUTF8Bytes</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">str</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">);</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">FileOutputStream</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> fos </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">=</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">new</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">FileOutputStream</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="str" style="color:#e6db74;"><span class="str" style="color:#e6db74;">"f.txt"</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">);</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> fos</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">write</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">utf8Bytes</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">);</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> fos</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">.</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">close</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">();</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">}</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">public</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">static</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">byte</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">[]</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> toUTF8Bytes</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">(</span></span><span class="typ" style="color:#a6e22e;"><span class="typ" style="color:#a6e22e;">String</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> str</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">)</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">{</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">return</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="kwd" style="color:#f92659;"><span class="kwd" style="color:#f92659;">null</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">;</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="com" style="color:#93a1a1;"><span class="com" style="color:#93a1a1;">// TODO</span></span><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;"> </span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">}</span></span></code>
想一下上面的程序能不能写一个转GBK的?
写个程序自动判断一个文件是哪种编码
时区 & 冬令时、夏令时
http://en.wikipedia.org/wiki/Time_zone
ftp://ftp.iana.org/tz/data/asia
http://zh.wikipedia.org/wiki/%E4%B8%AD%E5%9C%8B%E6%99%82%E5%8D%80
闰年
http://en.wikipedia.org/wiki/Leap_year
闰秒
ftp://ftp.iana.org/tz/data/leapseconds
System.currentTimeMillis() 返回的时间是什么
http://git-scm.com/
http://en.wikipedia.org/wiki/UTF-8
http://www.iana.org/time-zones
修改代码,使程序输出“1 3 5”:
http://jsfiddle.net/Ts7Fk/
看一下这段代码,并解释一下为什么按Button1时没有alert出“This is button: 1”,如何修改:
http://jsfiddle.net/FDPj3/1/
jQuery
ExtJS
ArgularJS
<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:undefined; padding:0px; color:inherit; white-space:pre-wrap; background-color:transparent"><span class="pln" style="color:#66d9ef;"><span class="pln" style="color:#66d9ef;">http</span></span><span class="pun" style="color:#f8f8f2;"><span class="pun" style="color:#f8f8f2;">:</span></span><span class="com" style="color:#93a1a1;"><span class="com" style="color:#93a1a1;">//en.wikipedia.org/wiki/Greasemonkey</span></span></code>
http://nodejs.org/
ArgularJS,https://docs.angularjs.org/api
http://www.ecmascript.org/
http://jsfiddle.net/
http://jsbin.com/
http://runjs.cn/
http://userscripts.org/
《深入Java虚拟机》
《深入理解Java虚拟机》
《Effective Java》
《七周七语言》
《七周七数据》
《Hadoop技术内幕》
《Hbase In Action》
《Mahout In Action》
《这就是搜索引擎》
《Solr In Action》
《深入分析Java Web技术内幕》
《大型网站技术架构》
《高性能MySQL》
《算法导论》
《计算机程序设计艺术》
《代码大全》
《JavaScript权威指南》