Archives for May, 2012

Apache: Commons collection (example ListUtils lazyList)
A simple post concerning a very good class ListUtils in the library commons-collections-3.2.jar of Apache for the collection's manipulation. The method lazyList returns a "lazy" list whose elements will be created on demand. So, the outputs in console would be: Some comments: - after the code , the list is initialized with 4 elements ( from index 0 to index 3). - after the ...more»
Spring: Expose all Spring beans as HTTP/AJAX service returning content in JSON format in Spring MVC application
Here, a homemade "securized" solution (questionable ??!!!) allowing the generic calls to Spring bean on server side from the client side with Ajax requests on the format: In fact, this solution exposes the Spring BEANs as a HTTP/AJAX SERVICE, returning a content like JSON objects in a Spring MVC application. This solution uses several technologies: Spring: the HttpRequestHandler interface for the creation ...more»
JAVA API: WeakHashMap, WeakReference, SoftReference, Garbage collector
Newly, having the opportunity to study and use the following classes of the JAVA's API: WeakHashMap, WeakReference, SoftReference, I would expose you some codes and explanations in this article which is composed by 2 sections. 1) WeakHashMap, WeakReference and Garbage collector First, the two major differences between Java and previous languages low-level like C or C++ is that: Java is an interpreted ...more»
Javascript: Confirm closing/unloading the page with the javascript event onbeforeunload
In some scenarios, it is good to ask the user for confirmation if he really wants change pages and therefore lose all data entered in a form. This can be handy when the form is time consuming. For this, there is a DOM event beforeunload which occurs just before unloading the page. The return value is the text that is displayed ...more»
Page 2 of 5:« 1 2 3 4 5 »
Copyright ® 2012 Hüseyin Özveren. No reproduction, even partial, can be used from this site and all its contents including text, documents, images, etc.. without the express permission of the author.