
Reading Notes
westwin
这个作者很懒,什么都没留下…
展开
-
Understand Java String Identity
import junit.framework.TestCase;import junit.framework.Assert;public class TestStringIdentical extends TestCase { public void [color=red]testTwoConstantStringAreTheSame[/color]() { Asse...2009-10-13 17:59:59 · 105 阅读 · 0 评论 -
why wait() always in a loop
As we know ,jdk API doc suggests to use wait() always in a loop as below: As in the one argument version, interrupts and spurious wakeups are possible, and this method should always be used in a l...原创 2010-01-19 00:17:47 · 145 阅读 · 0 评论 -
What is an MXBean?
refer to http://weblogs.java.net/blog/2006/02/13/what-mxbean原创 2010-01-28 11:10:34 · 96 阅读 · 0 评论 -
UCM
Two links about UCMThe power of Unified Change Managementhttp://www.ibm.com/developerworks/rational/library/701.html UCM with SVNhttp://www.riedquat.de/articles/UCMwithSVN原创 2010-05-08 11:41:40 · 997 阅读 · 0 评论 -
Document Type Declaration
Document Type Declaration http://en.wikipedia.org/wiki/Document_Type_Declaration Formal Public Identifierhttp://en.wikipedia.org/wiki/Formal_Public_Identifier原创 2010-07-19 22:01:39 · 217 阅读 · 0 评论 -
css sprite
http://css-tricks.com/css-sprites/http://spriteme.org/原创 2010-12-15 16:57:24 · 101 阅读 · 0 评论 -
what is DAO
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html原创 2011-04-15 13:42:18 · 141 阅读 · 0 评论 -
XML Declaration must be the first line in the document.
The XML declaration typically appears as the first line in an XML document. The XML declaration is not required, however, if used it must be the first line in the document and no other content or whit...原创 2010-06-12 17:54:20 · 332 阅读 · 0 评论 -
indenting xml in vim with xmllint
I added to my “.vimrc” file:map <F2> <Esc>:1,$!xmllint --format -<CR>Now I can press “F2″ button, and vim indents the text.原创 2011-01-10 09:48:42 · 114 阅读 · 0 评论 -
GPS Bearing VS Heading
http://gps.about.com/od/glossary/g/Heading.htm Definition: The compass direction toward which a traveler or vehicle is (or should be) moving. Examples: "This heading will take us to ...原创 2010-10-21 15:40:27 · 831 阅读 · 0 评论 -
最牛B 的 Linux Shell 命令
http://hi.baidu.com/hy0kl/blog/item/5508384fec1ec438aec3ab0e.htmlhttp://hi.baidu.com/hy0kl/blog/item/6151c3dcb0f789afcc116616.htmlhttp://hi.baidu.com/hy0kl/blog/item/caf7383baf4ffae414cecb12.html...原创 2010-10-30 00:08:30 · 153 阅读 · 0 评论 -
What is Optimistic Locking vs. Pessimistic Locking
What is Optimistic Locking vs. Pessimistic Lockingfrom http://www.dbasupport.com/forums/archive/index.php/t-7282.html These are methodologies used to handle multi-user issues. How does one h...原创 2011-09-09 16:50:25 · 249 阅读 · 0 评论 -
ghost text (aka in-field text)
http://archive.plugins.jquery.com/project/overlabel原创 2012-04-01 11:18:02 · 144 阅读 · 0 评论 -
java collection matrix
http://www.janeve.me/articles/which-java-collection-to-use原创 2012-08-07 11:24:02 · 115 阅读 · 0 评论 -
GZip compressing HTML, JavaScript, CSS etc. makes the data sent to the browser s
this is fun.http://tutorials.jenkov.com/java-servlets/gzip-servlet-filter.html GZip HTTP HeadersThe browser includes the Accept-Encoding HTTP header in requests sent to an HTTP server (e.g. a...原创 2013-07-31 15:48:13 · 146 阅读 · 0 评论 -
js module pattern
http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html原创 2013-10-12 16:21:22 · 197 阅读 · 0 评论 -
Locks in Java
copied from http://tutorials.jenkov.com/java-concurrency/locks.html Notes:This tutorial is a very easy to read and understand version of java concurrent lock mechanism. I do suggest to take a look....原创 2010-01-18 22:48:25 · 139 阅读 · 0 评论 -
use jps instead of ps to find jvm process
copied from http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jps.html jps - Java Virtual Machine Process Status ToolSynopsis Description Options Host Identifier ...原创 2010-01-11 14:21:32 · 123 阅读 · 0 评论 -
My first error of Hello Wolrd Struts
It's my first time to touch Struts. Here refers to Struts 2.1.8.1. The Hello World is deployed under Tomcat 6.0.20. The error is caused by a typo error of the struts tag url , should be <%@ t...原创 2010-01-04 09:10:15 · 105 阅读 · 0 评论 -
TestCases to understand Thread.State
Explainations of Thread.State: /** * Thread state for a thread which has not yet started. */ NEW, /** * Thread state for a runnable t...2009-10-14 20:27:16 · 134 阅读 · 0 评论 -
java.lang.StringBuffer VS java.lang.StringBuilder
java.lang.StringBuffer: thread-safe(之所以是thread-safe的是因为它的所有方法(构造函数除外)都是synchronized的)java.lang.StringBuilder: not thread-safe, much faster than StringBuffer since no synchronization.StringBuilder...2009-10-14 23:47:33 · 127 阅读 · 0 评论 -
TestReflectionGetFields
import junit.framework.TestCase;import junit.framework.Assert;import java.lang.reflect.Field;import java.lang.reflect.Modifier;import java.lang.reflect.Constructor;public class TestReflectio...2009-10-15 21:35:50 · 93 阅读 · 0 评论 -
Dynamic Proxy
import junit.framework.TestCase;import junit.framework.Assert;import java.lang.reflect.Method;import java.lang.reflect.Modifier;import java.lang.reflect.Proxy;import java.lang.reflect.Invoca...2009-10-18 22:05:23 · 88 阅读 · 0 评论 -
SAX Quick Start
refer to http://www.saxproject.org/QuickstartThis document provides a quick-start tutorial for Java programmers who wish to use SAX2 in their programs. RequirementsSAX is a common interfac...原创 2009-10-19 20:20:35 · 100 阅读 · 0 评论 -
XML Namespaces by Example
refer to http://www.xml.com/pub/a/1999/01/namespaces.htmlXML Namespaces by Exampleby Tim Bray January 19, 1999 January 14th saw the arrival of a new W3C Recommendation, Namespaces ...原创 2009-10-20 17:17:48 · 111 阅读 · 0 评论 -
Why clone() is protected rather than public,it's a bug
Why clone() is protected rather than public ?一直以来不明白,网上给的解释貌似也不合理,看到sun的bug repository上的一个帖子,感觉这是sun的一个bug,参见http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4098033Bug ID: 4098033...原创 2009-10-20 20:46:34 · 192 阅读 · 0 评论 -
The trap of System.identityHashCode()
Why a trap ?First ,let's take a look at the comments of this API provided by Sun: /** * Returns the same hash code for the given object as * would be returned by the default method ...2009-11-19 22:27:15 · 98 阅读 · 0 评论 -
JUnit4 in 60 Seconds
copy from http://www.cavdar.net/2008/07/21/junit-4-in-60-seconds/ played with JUnit 4 library this weekend and here is the short introduction to it:@Test Mark your test cases with @Test ...原创 2009-12-02 20:54:05 · 142 阅读 · 0 评论 -
Reverse an array
private void reverse(Object[] anArray){ if (anArray == null){ return; } reverseArgrithmTwo(anArray); } // private void reverseArgrithmOne(Object[] anArray){// int maxIndex = an...2009-12-04 20:12:42 · 214 阅读 · 0 评论 -
Language Fundamentals - Arrays
copy from http://www.janeg.ca/scjp/lang/arrays.html Array declarationsarrays are Java objects all Java arrays are technically one-dimensional. Two-dimensional arrays are arrays of array...原创 2009-12-04 21:00:47 · 183 阅读 · 0 评论 -
Operators and Assignments - Numeric Promotion
copy from http://www.janeg.ca/scjp/oper/promotions.html#unary Operators and Assignments - Numeric PromotionUnary Numeric Promotionthe Unary operators + and - when applied to byte, char o...原创 2009-12-04 21:57:46 · 140 阅读 · 0 评论 -
Debug into rt.jar,but cannot watch local variable
copy from http://bbs.et8.net/bbs/archive/index.php/t-876835.html feiyan2007-08-26, 16:46Debug into rt.jarAugust 4th, 2007 If you ever use Eclipse trying to debug into Java’s system A...原创 2009-12-16 20:37:50 · 123 阅读 · 0 评论 -
communicate between plug-ins in different sandboxes
Given that there are many cases where it is necessary to communicate between plug-ins in different sandboxes, what can we do?1. We can communicate through a shared data structure or event passing ...2009-12-17 21:17:06 · 106 阅读 · 0 评论 -
Unit Testing Equals and HashCode of Java Beans
copy from http://blog.cornetdesign.com/2008/05/unit-testing-equals-and-hashcode-of-java-beans/ Unit Testing Equals and HashCode of Java Beans Posted on May 28th, 2008 We’ve been c...原创 2009-12-29 10:07:49 · 115 阅读 · 0 评论 -
How to be a Programmer: A Short,Comprehensive,and Personal Summary
well written.http://samizdat.mines.edu/howto/HowToBeAProgrammer.html?x原创 2013-10-28 10:38:12 · 185 阅读 · 0 评论