<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>A blog by Osama Dwairi &#187; code snippet</title>
	<atom:link href="http://dwairi.wordpress.com/category/code-snippet/feed/" rel="self" type="application/rss+xml" />
	<link>http://dwairi.wordpress.com</link>
	<description>Thoughts and Ideas about Software Engineering and the rest</description>
	<lastBuildDate>Wed, 09 Sep 2009 08:04:34 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='dwairi.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/4d9f44aef83cafcaae06d96d55b9c945?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>A blog by Osama Dwairi &#187; code snippet</title>
		<link>http://dwairi.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dwairi.wordpress.com/osd.xml" title="A blog by Osama Dwairi" />
		<item>
		<title>Java Annotations, First Step</title>
		<link>http://dwairi.wordpress.com/2009/05/20/java-annotations-first-step/</link>
		<comments>http://dwairi.wordpress.com/2009/05/20/java-annotations-first-step/#comments</comments>
		<pubDate>Wed, 20 May 2009 09:15:27 +0000</pubDate>
		<dc:creator>dwairi</dc:creator>
				<category><![CDATA[1]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[code snippet]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[annotations]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://dwairi.wordpress.com/?p=92</guid>
		<description><![CDATA[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 of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dwairi.wordpress.com&blog=421552&post=92&subd=dwairi&ref=&feed=1" />]]></description>
		<wfw:commentRss>http://dwairi.wordpress.com/2009/05/20/java-annotations-first-step/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">dwairi</media:title>
		</media:content>
	</item>
		<item>
		<title>open-flash-chart, IE and SSL</title>
		<link>http://dwairi.wordpress.com/2009/01/15/open-flash-chart-ie-and-ssl/</link>
		<comments>http://dwairi.wordpress.com/2009/01/15/open-flash-chart-ie-and-ssl/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 13:10:01 +0000</pubDate>
		<dc:creator>dwairi</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[code snippet]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[open flash chart]]></category>
		<category><![CDATA[response headers]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://dwairi.wordpress.com/?p=59</guid>
		<description><![CDATA[solving open flash chart 1.x issue on IE behind HTTPS<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dwairi.wordpress.com&blog=421552&post=59&subd=dwairi&ref=&feed=1" />]]></description>
		<wfw:commentRss>http://dwairi.wordpress.com/2009/01/15/open-flash-chart-ie-and-ssl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">dwairi</media:title>
		</media:content>
	</item>
		<item>
		<title>JQuery and SELECT tag howto</title>
		<link>http://dwairi.wordpress.com/2009/01/07/jquery-and-select-tag-howto/</link>
		<comments>http://dwairi.wordpress.com/2009/01/07/jquery-and-select-tag-howto/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 16:26:47 +0000</pubDate>
		<dc:creator>dwairi</dc:creator>
				<category><![CDATA[Markup Languages]]></category>
		<category><![CDATA[code snippet]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[select]]></category>

		<guid isPermaLink="false">http://dwairi.wordpress.com/?p=53</guid>
		<description><![CDATA[following is a JavaScript code snippet using Powerful JQuery library for dealing with select HTML tag (which is &#8211; by the way &#8211; pain to deal with core javascript language).
the html code
&#8230;..
&#60;select id=&#8221;my-ml-list&#8221; name=&#8221;my-ml-list&#8221;&#62;
&#60;option value=&#8221;java&#8221;&#62;XML&#60;/option&#62;
&#60;option value=&#8221;java&#8221;&#62;HTML&#60;/option&#62;
&#60;option value=&#8221;java&#8221;&#62;XHTML&#60;/option&#62;
&#60;option value=&#8221;java&#8221;&#62;HAML&#60;/option&#62;
&#60;option value=&#8221;java&#8221;&#62;YAML&#60;/option&#62;
&#60;option value=&#8221;java&#8221;&#62;YASL&#60;/option&#62;
&#60;/select&#62;
&#8230;..
what can jquery do for you with this list, some is follow:
iterate on all elements
&#60;script language=&#8221;javascript&#8221;&#62;
$(&#8220;my-ml-list [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dwairi.wordpress.com&blog=421552&post=53&subd=dwairi&ref=&feed=1" />]]></description>
		<wfw:commentRss>http://dwairi.wordpress.com/2009/01/07/jquery-and-select-tag-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">dwairi</media:title>
		</media:content>
	</item>
		<item>
		<title>Phone Regexp</title>
		<link>http://dwairi.wordpress.com/2008/04/22/phone-regexp/</link>
		<comments>http://dwairi.wordpress.com/2008/04/22/phone-regexp/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 14:32:22 +0000</pubDate>
		<dc:creator>dwairi</dc:creator>
				<category><![CDATA[Ruby and Ruby On Rails]]></category>
		<category><![CDATA[code snippet]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://dwairi.wordpress.com/?p=27</guid>
		<description><![CDATA[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=&#8221;009621111111&#8243;
if phone_no =~ /^00+\d{0,9}$/

 puts &#8220;match&#8221;

else
 puts &#8220;No match&#8221;
end



a quick explain is
^ start from the beginning of the string
+\d{9,17} should include digits with at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dwairi.wordpress.com&blog=421552&post=27&subd=dwairi&ref=&feed=1" />]]></description>
		<wfw:commentRss>http://dwairi.wordpress.com/2008/04/22/phone-regexp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">dwairi</media:title>
		</media:content>
	</item>
	</channel>
</rss>