For those who are trying to format a price in JavaScript given a float, here are two functions that can do this.
Category Archives: Development
jQuery toggle() does not work in IE8
I have discovered today that jQuery toggle() does not working property in Internet Explorer 8 or 9. First I tried using toggle: This works in Chrome and Firefox but not Internet Explorer 8. I then changed it to this:
Rotating Text with CSS
To rotate text using CSS in different browsers , use the css id selector rotateText. Thus the style rule below will be applied any html element with id=”rotateText” ( The id selector uses the id attribute of the HTML element, and is defined with a “#”, if you want to use the class selector forContinue reading “Rotating Text with CSS”
Why do you get a ConcurrentModificationException when using an iterator?
The reason why you would get a ConcurrentModificationException The java.util Collection classes are fail-fast, which means that if one thread changes a collection while another thread is traversing it through with an iterator the iterator.hasNext() or iterator.next() call will throw ConcurrentModificationException . Even the synchronized collection wrapper classes SynchronizedMap and SynchronizedList are only conditionally thread-safe,Continue reading “Why do you get a ConcurrentModificationException when using an iterator?”
Integrating jQuery into an existing SEAM project
If you require jQuery in a Java SEAM project (or a web application using JSF or Struts but embedding Richfaces in it), you’ll need to redefine jQuery’s $() shortcut to avoid conflict with prototype.js which is widely used in Richfaces framework Luckily you can use a4j’s loadScript function since as of Richfaces 3.0, jQuery hasContinue reading “Integrating jQuery into an existing SEAM project”
Tips and Pitfuls for overriding equals method in Java
If you’re a java developer, you already know Class java.lang.Object defines an equals method, which subclasses may override. Here are some tips and pitfuls in implementing equals in this quick blog entry. But before we diverge into some pointers, let’s review the rules to override the equals method Java. As per following rule equals method in Java should be: 1) Reflexive : ObjectContinue reading “Tips and Pitfuls for overriding equals method in Java”
Hibernate One-To-Many Mapping Tutorial
In this example you will learn how to map one-to-many relationship using Hibernate. Consider the following relationship between Student and Phone entity. According to the relationship a student can have any number of phone numbers. The relational model is shown below. To create this relationship you need to have a STUDENT, PHONE and STUDENT_PHONE table. ToContinue reading “Hibernate One-To-Many Mapping Tutorial”
Loading First 3 items Demo
Setup Virtual Hosts Using WAMP
In order to run PHP on your local Windows computer, you need to install a server stack – either WAMP or XAMPP. Either will do, but for the purposes of this tutorial we’re going to stick with WAMP. Mac users: Most of what you need to run basic server-side scripts is already installed on your Mac.Continue reading “Setup Virtual Hosts Using WAMP”
How to get SpeakOut 7-Eleven Unlimited Mobile Browsing working on Unlocked Android Phones.
SpeakOut 7-Eleven is probably one of the best value phone plan in Canadas for those who require a very light data plan (i.e. (UMB) Unlimited Mobile Browsing!). For $10/month you can’t go wrong for Unlimited. There are a few caveats , mainly since Speakout uses a proxy to access their free mobile browisng feature, itContinue reading “How to get SpeakOut 7-Eleven Unlimited Mobile Browsing working on Unlocked Android Phones.”