Custom JARs in Maven

I had a situation where I have been learning Maven more and more every day and with the new application I was writing, I was splitting the code into separate maven modules/JARs.  When I was first setting up my projects, I soon came…

Comparing Values using BigDecimals in Java

Being a JDK 1.4 programmer for probably far too many years, I was never able to learn the correct ways to use some of the latest JDK 1.5+ features.  Thanks to a colleague that I work with, he was able to give me…

Iterating through HashMaps

In my JDK 1.4 world, I had a very common way of iterating through lists and maps.  Switching to JDK 1.7 had me learning so many new ways of doing things in so many areas.  One of them was iterating over HashMaps, so…

sass watch compress

Just a handy command if you use sass watch.  This command will compress (or minify, uglify) the CSS file generated by sass watch sass –watch style.scss:style.css –style compressed

Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom

So you’ve spent countless hours trying to figure out why your pom.xml file generates the following error: Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom I spent a great deal of time looking for proxy issues etc and finally found out that the reason I was having…

Backbone Events Firing Multiple Times

Be careful how you define your Backbone events.  When you are setting up an event such as: this.someCollection.on(‘reset’, this.render, this); you’ll need to be very careful that you define this only once (ie in the constructor of the view … initialize) otherwise there…

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket

Ugh, seen this error before?  I had it from a XAMPP installation where my Mac hard drive had some problems and I had to restore my drive from a time machine backup.  When I restored the files, it ends up I could no…

Clone Javascript Objects

Working with Javascript for the past few months, I soon learned the objects being passed around in an application were passing objects by reference.  Every change I made to an instance variable that was assigned from another object, I noticed the original reference…

Simulate SwipeLeft and SwipeRight in Chrome on a Desktop

Another great tip I came across when testing mobile apps via my laptop.  I wanted to test swipeleft and swiperight in my Chrome browser on my MacBook and using the left mouse button didn’t work, it drags the image around the screen.  What…

Light weight HTTP Server for Mac

Did you know that Mac ships with a light weight http server to test out stuff like mobile apps, or simple http request based apps?  Yes its a python based.  I use a local HTTP server all of the time when I am…

Categories