download zip of files only
Fri Mar 10 20:49:16 AEDT 2017
From /weblog/java/concurrency
putall can cause ConcurrentModifcationException - http://cr.openjdk.java.net[..]ses/sun/management/Agent.java.sdiff.html Note on writing CopyOnWrite wrapper - http://flyingspaniel.blogspot.com[..]ot.com/2010/12/copyonwrite-wrappers.html Sometime this is a bit difficult for Chinese to be a good programmer, recently some colleague and me discuss about the behaviour of this class and look like we have difficult understanding A: ConcurrentHashMap support for locking as this is thread-safe B: ConcurrentHashMap is thread safe for read but not for write because there is no lock, we still need to have external lock to keep it thread safe. By the way, I get ConcurrentModificationException from this before. C: ConcurrentHashMap don't support for locking but they still thread safe for all operations, which is how "This class is fully interoperable with Hashtable in programs that rely on its thread safety but not on its synchronization details." mentioned. Too good that we can actually take a look at the source code to see what going on nowadays rather than just guessing - http://www.google.com[..]HashMap&sourceid=opera&ie=utf-8&oe=utf-8 By the way, this constructor is useful for a lot of concurrency access but actually not many developer notice about this - http://java.sun.com[..]rrentHashMap.html#ConcurrentHashMap(int, float, int) Lazy initialization of map values - http://artisans-serverintellect-com.si-eioswww6.com[..]ect-com.si-eioswww6.com/default.asp?W122 HashMap.get() can cause infinite loop - http://lightbody.net[..]5/07/hashmapget_can_cause_an_infini.html Discussing the effect of initCapacity() of HashMap in Java - http://saloon.javaranch.com[..]ltimatebb.cgi?ubb=get_topic&f=1&t=021171 OpenJDK and HashMap …. Safely Teaching an Old Dog New (Off-Heap!) Tricks - http://www.infoq.com/articles/Open-JDK-and-HashMap-Off-Heap We can run search in ConcurrenctHashMap - https://dzone.com/articles/concurrenthashmap-in-java8
(google search)
(amazon search)
Fri Dec 18 19:06:33 AEDT 2015
From /weblog/java/libraries
I think this will be a cool API that enable developer to use openoffice at their code. However there is not much tutorial / guide. Here are 2 I known http://technology.amis.nl/blog/?p=1243 http://technology.amis.nl/blog/?p=1244 Other than that, Lotus release an eclipse base Office suit recently, we suppose able to program using this, if there is no obfuscation - http://symphony.lotus.com/software/lotus/symphony/home.jspa Generate Graph directly - http://www.programming-free.com[..]2/create-charts-in-excel-using-java.html Alternative to POI, jXLS - http://fahdshariff.blogspot.com.au[..]ing-excel-file-into-javabeans-using.html Using POI to update MS Word document - http://www.infoq.com/articles/convert-microsoft-word-to-html
(google search)
(amazon search)
Mon Jul 06 11:26:54 AEST 2015
From /weblog/java/libraries
howto-create-https-connections-to-servers-with-self-signed-certificates-using-apache-jakarta-commons-httpclient-package http://orangevolt.com[..]ache-jakarta-commons-httpclient-package/ Some say this is the fastest - http://ruedigermoeller.github.io/kontraktor/
(google search)
(amazon search)
Tue Feb 10 20:33:40 AEDT 2015
From /weblog/java/performance
-XX:+TieredCompilation, -XX:+UseCompressedOops, Escape Analysis and -XX:+UseNUMA - http://docs.oracle.com[..]uides/vm/performance-enhancements-7.html Interestingly, PrintWriter, if pooled, shows considerable performance improvement. The creation of the object is expensive because of a call to get the line separator in its constructor. http://sachinhejip.blogspot.com[..]/08/experiences-in-java-performance.html Experience in twitter - http://www.umbrant.com/blog/2012/twitter_jvm_tuning.html Cases study on how to test performance from using difference GC algo - http://plumbr.eu/blog/g1-vs-cms-vs-parallel-gc A lot of information - http://www.javaadvent.com[..]-1-of-3-synopsis-of-articles-videos.html Basically use lower level construct - http://blog.jooq.org[..]-easy-performance-optimisations-in-java/
(google search)
(amazon search)
Sun Dec 14 12:38:06 AEDT 2014
From /weblog/java/fundamental
createTempFile() will not delete after JDK quit... which I also suppose it will List of issue about File api, which I totally agree. http://hoskinator.blogspot.com/2006/06/using-file-class.html delete() will delete the file immediately even using some 3rd undelete utility cannot recover , I think the implementation should allow recovery chance - http://www.ryanlowe.ca[..]es/000574_java_delete_to_recycle_bin.php http://blog.pengyifan.com/java-io-in-nutshell-22-case-studies/
(google search)
(amazon search)
Sun Dec 14 12:37:13 AEDT 2014
From /weblog/java/fundamental
One fact of System.nanoTime() , I think System.nanoTime()'s contract right now is that it *always* increases by a fixed amount. In other words, it's monotonic. So NTP updates, or user's changing system time can never cause any change to System.nanoTime(). https://jsr-310.dev.java.net/servlets/ReadMsg?list=dev&msgNo=1282 A more detailed explanation of nanoTime() and currentMilliSecond() - http://blogs.sun.com/dholmes/entry/inside_the_hotspot_vm_clocks http://blog.joda.org[..]nverting-from-joda-time-to-javatime.html
(google search)
(amazon search)
|