Something I have now seen a few times in projects is people not being aware of how ThreadPoolExecutor works. When creating a ThreadPoolExecutor you have to arguments to set minPoolSize, maxPoolSize, keepAliveTime and workQueue. Now the gotcha is in when the ThreadPoolExecutor creates a new thread for execution especially when using unbounded size Queues. For example when looking at this ThreadPoolExecutor constructor:
I have been using a Evoluent VerticalMouse 4 now for just over a year and have really grow to like it up until a few weeks ago where it would only work when it felt like it. Fiddling around with the cable I realized there was a connection problem in the cable. After doing some searching it seems like a common problem.
Received my new toy today a NavSpark-GL : Arduino Compatible Development Board with GPS/GLONASS!
Implementing the Comparable interface in Java give the object a natural ordering, as in makes it Sortable. The comparable interface only has one method:
Ungit is the easiets way to use GIT. It is great tool that visiually represents your repository and completly removes the learning curve with GIT. It uses node.js and is available via npm.
The server hosting the GIT repository has moved to an new domain name. Now is very painfull to update manually so here is quick command to find all the GIT config files and replace the old domain name with the new domain name.
I have a application that needs to pull data from the database do some calculations (This takes a second or two) then returns. I have been using Guava’s LoadingCache to do this. The problem came in when a user makes a change to the source data which in effect invalidates the calculation results. Easy solution just invalidate. But what happens if the data is modified during the calculation process. For example you have 2 threads, Thread 1 calls get on the loading cache then during the Loading process in Thread 1, Thread 2 calls invalidate since the underlying data has changed. Is the data invalidated or is the invalid/stale data stored in the cache?
Received a NPE when I was exporting a WAR file in eclipse on a old project. Error below:
So far only IntelliJ 13.1 has support for Java 8 but now Eclipse also announced support for Java 8! Starting with I20140318-0830 all Luna (4.4) builds contain the Eclipse support for Java 8. There is also a feature patch available for Kepler SR2 (4.3.2). Source: https://dev.eclipse.org/mhonarc/lists/eclipse.org-committers/msg00948.html
Java 8 JDK final got released today so time install!