Java Code Geeks http://www.javacodegeeks.com/ Java 2 Java Developers Resource Center Tue, 05 May 2015 16:00:58 +0000 en-US hourly 1 http://wordpress.org/?v=4.2.1 Using @Context in JAX-RS [part 1]http://www.javacodegeeks.com/2015/05/using-context-in-jax-rs-part-1.html http://www.javacodegeeks.com/2015/05/using-context-in-jax-rs-part-1.html#comments Tue, 05 May 2015 16:00:58 +0000 http://www.javacodegeeks.com/?p=39809 JAX-RS provides the @Context annotation to inject a variety of resources in your RESTful services. Some of the most commonly injected components are HTTP headers, HTTP URI related information. Here is a complete list (in no specific order)           HTTP headers HTTP URI details Security Context Resource Context Request Configuration Application ...

 

]]>
http://www.javacodegeeks.com/2015/05/using-context-in-jax-rs-part-1.html/feed/ 0
Java Code Geeks are giving away FREE copies of their JSF 2.0 Programming Cookbook eBook!http://www.javacodegeeks.com/2015/05/java-code-geeks-are-giving-away-free-copies-of-their-jsf-programming-cookbook-ebook.html http://www.javacodegeeks.com/2015/05/java-code-geeks-are-giving-away-free-copies-of-their-jsf-programming-cookbook-ebook.html#comments Tue, 05 May 2015 13:53:19 +0000 http://www.javacodegeeks.com/?p=39839 Want to boost your knowledge on JSF Programming ? Then we have something especially for you! Enter the contest now to win your very own copy of our JSF 2.0 Programming Cookbook eBook. JavaServer Faces (JSF) is a Java specification for building component-based user interfaces for web applications, using Facelets as its default templating system. ...

 

]]>
http://www.javacodegeeks.com/2015/05/java-code-geeks-are-giving-away-free-copies-of-their-jsf-programming-cookbook-ebook.html/feed/ 0
How to optimize Hibernate EllementCollection statementshttp://www.javacodegeeks.com/2015/05/how-to-optimize-hibernate-ellementcollection-statements.html http://www.javacodegeeks.com/2015/05/how-to-optimize-hibernate-ellementcollection-statements.html#comments Tue, 05 May 2015 13:00:05 +0000 http://www.javacodegeeks.com/?p=39808 Introduction Hibernate supports three data mapping types: basic (e.g String, int), Embeddable and Entity. Most often, a database row is mapped to an Entity, each database column being associated to a basic attribute. Embeddable types are more common when combining several field mappings into a reusable group (the Embeddable being merged into the owning Entity ...

 

]]>
http://www.javacodegeeks.com/2015/05/how-to-optimize-hibernate-ellementcollection-statements.html/feed/ 0
How to show a Toast for a specific duration in Androidhttp://www.javacodegeeks.com/2015/05/how-to-show-a-toast-for-a-specific-duration-in-android.html http://www.javacodegeeks.com/2015/05/how-to-show-a-toast-for-a-specific-duration-in-android.html#comments Tue, 05 May 2015 10:00:51 +0000 http://www.javacodegeeks.com/?p=39807 In the Android SDK, an android.widget.Toast is a small message that pops up at the bottom of the screen to display an information. The toast will disappears by itself after a specified duration. Here is an example of what a toast looks like and how to display one :           Context ...

 

]]>
http://www.javacodegeeks.com/2015/05/how-to-show-a-toast-for-a-specific-duration-in-android.html/feed/ 0
Coding: Visualising a bitmaphttp://www.javacodegeeks.com/2015/05/coding-visualising-a-bitmap.html http://www.javacodegeeks.com/2015/05/coding-visualising-a-bitmap.html#comments Tue, 05 May 2015 07:00:30 +0000 http://www.javacodegeeks.com/?p=39806 Over the last month or so I’ve spent some time each day reading a new part of the Neo4j code base to get more familiar with it, and one of my favourite classes is the Bits class which does all things low level on the wire and to disk. In particular I like its toString ...

 

]]>
http://www.javacodegeeks.com/2015/05/coding-visualising-a-bitmap.html/feed/ 0
Sublime VS. Atom: Can GitHub Take the Lead?http://www.javacodegeeks.com/2015/05/sublime-vs-atom-can-github-take-the-lead.html http://www.javacodegeeks.com/2015/05/sublime-vs-atom-can-github-take-the-lead.html#comments Mon, 04 May 2015 22:00:16 +0000 http://www.javacodegeeks.com/?p=39743 Comparing Sublime and Github’s Atom in 10 major categories Sublime has been the undisputed text editing champion for a while now. But a new contender – GitHub’s Atom – is stepping into the spotlight, making noise and trying to steal the not-so-old champion’s thunder. Some 30 versions after the release of Atom’s beta, we felt it would be a good time to ...

 

]]>
http://www.javacodegeeks.com/2015/05/sublime-vs-atom-can-github-take-the-lead.html/feed/ 0
Grails Goodness: Custom Data Binding with @DataBinding Annotationhttp://www.javacodegeeks.com/2015/05/grails-goodness-custom-data-binding-with-databinding-annotation.html http://www.javacodegeeks.com/2015/05/grails-goodness-custom-data-binding-with-databinding-annotation.html#comments Mon, 04 May 2015 19:00:59 +0000 http://www.javacodegeeks.com/?p=39733 Grails has a data binding mechanism that will convert request parameters to properties of an object of different types. We can customize the default data binding in different ways. One of them is using the @DataBinding annotation. We use a closure as argument for the annotation in which we must return the converted value. We ...

 

]]>
http://www.javacodegeeks.com/2015/05/grails-goodness-custom-data-binding-with-databinding-annotation.html/feed/ 0
Software Development Lessons Learned from Consumer Experiencehttp://www.javacodegeeks.com/2015/05/software-development-lessons-learned-from-consumer-experience.html http://www.javacodegeeks.com/2015/05/software-development-lessons-learned-from-consumer-experience.html#comments Mon, 04 May 2015 16:00:32 +0000 http://www.javacodegeeks.com/?p=39732 Because we software developers are also inevitably consumers of others’ software applications, we are undoubtedly influenced in the creation of our own software by the software we use. For example, our opinions of what makes an effective interface for users are influenced by our experiences “on the other side” using someone else’s software interface. This ...

 

]]>
http://www.javacodegeeks.com/2015/05/software-development-lessons-learned-from-consumer-experience.html/feed/ 0
Simple Class to Measure Latencyhttp://www.javacodegeeks.com/2015/05/simple-class-to-measure-latency.html http://www.javacodegeeks.com/2015/05/simple-class-to-measure-latency.html#comments Mon, 04 May 2015 13:00:14 +0000 http://www.javacodegeeks.com/?p=39731 This is a very simple class I wrote to measure latency.  It’s not the Rolls Royce solution that is HDRHistogram but if you want to add just one class to your project this does the trick quite nicely. Here’s a simple test program to show you how it’s used: package util; public class LatencyMeasureExample { public ...

 

]]>
http://www.javacodegeeks.com/2015/05/simple-class-to-measure-latency.html/feed/ 0
#102030: Celebrating 20 Years of Java by Running 20 10K in 30 Dayshttp://www.javacodegeeks.com/2015/05/102030-celebrating-20-years-of-java-by-running-20-10k-in-30-days.html http://www.javacodegeeks.com/2015/05/102030-celebrating-20-years-of-java-by-running-20-10k-in-30-days.html#comments Mon, 04 May 2015 10:00:34 +0000 http://www.javacodegeeks.com/?p=39730 May 23rd, 1995 was a momentous day in the history of technology. It does not seem the industry realized that a language released on that day would completely change the landscape of technology in the coming years. Java will be celebrating 20th birthday on the same date this year. 20 years of Java, wow! Go back 20 ...

 

]]>
http://www.javacodegeeks.com/2015/05/102030-celebrating-20-years-of-java-by-running-20-10k-in-30-days.html/feed/ 0