Java Annotations provide Java developers full potential of doing things in more easy and nice way. I will not go explaining Java annotations pros, cons, and the definitions; you can find out here http://java.sun.com/docs/books/tutorial/java/javaOO/annotations.html instead I will add some piece which I hardly found: how can I write my own Annotation class and make use [...]
Archive for the ‘code snippet’ Category
Java Annotations, First Step
Posted in 1, code snippet, howto, Java, tagged annotations, Java, tutorial on May 20, 2009 | 5 Comments »
open-flash-chart, IE and SSL
Posted in code snippet, howto, Open Source, troubleshooting, tagged https, ie, open flash chart, response headers, ssl on January 15, 2009 | 3 Comments »
solving open flash chart 1.x issue on IE behind HTTPS
JQuery and SELECT tag howto
Posted in code snippet, javascript, Markup Languages, tagged howto, html, javascript, jquery, select on January 7, 2009 | 1 Comment »
following is a JavaScript code snippet using Powerful JQuery library for dealing with select HTML tag (which is – by the way – pain to deal with core javascript language). the html code ….. <select id=”my-ml-list” name=”my-ml-list”> <option value=”java”>XML</option> <option value=”java”>HTML</option> <option value=”java”>XHTML</option> <option value=”java”>HAML</option> <option value=”java”>YAML</option> <option value=”java”>YASL</option> </select> ….. what can jquery do [...]
Phone Regexp
Posted in code snippet, Ruby and Ruby On Rails, tagged number, phone, regexp, ruby on April 22, 2008 | Leave a Comment »
I was working with struts validators and need to test a phone number to be digits and starts with a leading 00, I wanna share it here ^00+\d{9,17}$ below is a ruby code snippet: phone_no=”009621111111″ if phone_no =~ /^00+\d{0,9}$/ puts “match” else puts “No match” end a quick explain is ^ start from the beginning [...]