<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7608075799331204350</id><updated>2012-01-29T12:21:51.277-08:00</updated><category term='design'/><category term='Flex'/><category term='Flash'/><category term='Flex relative layout'/><category term='IntelliJ IDEA'/><category term='javascript'/><category term='maths'/><category term='html'/><category term='dhtml'/><title type='text'>UI Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-1026325192581431278</id><published>2011-11-23T08:15:00.000-08:00</published><updated>2011-11-27T15:49:22.472-08:00</updated><title type='text'>CSS3 My Favorite Tricks</title><content type='html'>CSS3 is cool. It's animation and 3D stuff are amazing. But things like rounded corner and gradients are the most useful. I am listing down few tricks that I use often for my own quick reference.&lt;br /&gt;&lt;h2&gt;Gradient&lt;/h2&gt;&lt;br /&gt;No more slicing.. and repeating images to make shaded backgrounds.&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;  background-image: -webkit-gradient(linear, left top, left bottom, from(#6f6f6f), to(#000000)); /* mozilla - FF3.6+ */&lt;br /&gt;    background-image: -moz-linear-gradient(top, #6f6f6f 0%, #000000 100%); /* IE 5.5 - 7 */&lt;br /&gt;    filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#6f6f6f',EndColorStr='#000000'); /* IE8 */&lt;br /&gt;    -ms-filter: progid: DXImageTransform . Microsoft . gradient(gradientType = 0, startColor = '#CCCCCC', endColoStr = '#000000'); /*Transparent back */&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Shadows. Rounded Corner, and Transparent Layers.&lt;/h2&gt;&lt;br /&gt;I like to give a div a transparent background and put some kind of a background image under it. Drop the shadow from that box make it look much nice..&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;  /*Transparent back */&lt;br /&gt;    opacity:0.4;&lt;br /&gt;&lt;br /&gt;    /*Rounded corners */&lt;br /&gt;    -moz-border-radius: 3px;&lt;br /&gt;    border-radius: 3px;&lt;br /&gt;    border: solid 1px #888888;&lt;br /&gt;&lt;br /&gt;    /*The shadow */&lt;br /&gt;    -moz-box-shadow: 3px 3px 2px #ddd;&lt;br /&gt;    -webkit-box-shadow: 3px 3px 2px #ddd;&lt;br /&gt;    box-shadow: 3px 3px 2px #ddd;&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Styling a table with CSS3&lt;/h2&gt;&lt;br /&gt;Interesting thing to note here is the &lt;i&gt;table.tableStyle tr:nth-child(even)&lt;/i&gt; selector. This is to color two rows with different colors, which we had to write javascript earlier. &lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;table, td, div, span, a {&lt;br /&gt;    font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;&lt;br /&gt;    font-size: 12px;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;table.tableStyle {&lt;br /&gt;    border-left: solid 1px #468aa6;&lt;br /&gt;    border-top: solid 1px #468aa6;&lt;br /&gt;    border-collapse: collapse;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;table.tableStyle th {&lt;br /&gt;    background-image: -webkit-gradient(linear, left top, left bottom, from(#56aed2), to(#417f98));&lt;br /&gt;    background-image: -moz-linear-gradient(top, #56aed2 0%, #417f98 100%); &lt;br /&gt;    filter: progid:DXImageTransform.Microsoft.gradient(gradientType = 0, startColor = 0, endColorStr = #417f98); &lt;br /&gt;    -ms-filter: progid:DXImageTransform.Microsoft.gradient(gradientType = 0, startColor = 0, endColoStr = #417f98);&lt;br /&gt;    color: #fff;&lt;br /&gt;    font-size: 11px;&lt;br /&gt;    text-align: left;&lt;br /&gt;    padding: 3px;&lt;br /&gt;&lt;br /&gt;    border-right: solid 1px #468aa6;&lt;br /&gt;    border-bottom: solid 1px #468aa6;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;table.tableStyle td {&lt;br /&gt;    border-right: solid 1px #468aa6;&lt;br /&gt;    border-bottom: solid 1px #468aa6;&lt;br /&gt;    margin: 0px;&lt;br /&gt;    padding: 3px;&lt;br /&gt;}&lt;br /&gt;table.tableStyle tr:nth-child(even) {background: #ccdde1}&lt;br /&gt;table.tableStyle tr:nth-child(odd) {background: #FFF}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-1026325192581431278?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/1026325192581431278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=1026325192581431278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1026325192581431278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1026325192581431278'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2011/11/css3-my-favorite-tricks.html' title='CSS3 My Favorite Tricks'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-175352669781912177</id><published>2010-12-29T19:31:00.001-08:00</published><updated>2010-12-29T19:33:47.349-08:00</updated><title type='text'>Happy 2011 WSO2 wallpaper</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Fk9gBeSftos/TRv9eUQnRDI/AAAAAAAAAHU/QI1lkmnFpIw/s1600/wso2%2Bwallpaper.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="http://2.bp.blogspot.com/_Fk9gBeSftos/TRv9eUQnRDI/AAAAAAAAAHU/QI1lkmnFpIw/s400/wso2%2Bwallpaper.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5556313262567932978" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-175352669781912177?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/175352669781912177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=175352669781912177' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/175352669781912177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/175352669781912177'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/12/happy-2011-wso2-wallpaper.html' title='Happy 2011 WSO2 wallpaper'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Fk9gBeSftos/TRv9eUQnRDI/AAAAAAAAAHU/QI1lkmnFpIw/s72-c/wso2%2Bwallpaper.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-1475285316114269883</id><published>2010-08-31T09:06:00.000-07:00</published><updated>2010-08-31T09:37:44.128-07:00</updated><title type='text'>WSO2Con 2010 -- Colombo ,Sri Lanka September 14 &amp; 15</title><content type='html'>&lt;object width="520" height="443"&gt;&lt;br /&gt;&lt;param name="movie" value="http://www.youtube.com/v/j-xtzwPb8Yc&amp;hl=en&amp;fs=1"&gt;&lt;br /&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;br /&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;br /&gt;&lt;/param&gt;&lt;embed src=http://www.youtube.com/v/j-xtzwPb8Yc&amp;hl=en&amp;fs=1 &lt;br /&gt;type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="315"&gt;&lt;br /&gt;&lt;/embed&gt;&lt;/object&gt; &lt;br /&gt;Designed to help prepare you for the future enterprise, WSO2Con features some of the most renowned technical thought leaders and focuses on the unique convergence of SOA and Cloud. For more information or to register visit &lt;a href="http://wso2.com/event"&gt;http://wso2.com/event&lt;/a&gt;&lt;br /&gt;&lt;div class="keynote"&gt;&lt;br /&gt;&lt;h2&gt;Keynotes&lt;/h2&gt;&lt;br /&gt;&lt;div class="speaker"&gt;&lt;img src="http://wso2.com/wp-content/themes/wso2ng-v2/con-images/prof-rohan.png"&gt;&lt;br /&gt;&lt;div class="name"&gt;&lt;span class="title"&gt;Imagining the Future and Making it Happen&lt;/span&gt;&lt;br&gt;&lt;span class="name"&gt;Prof. Rohan Samarajiva&lt;/span&gt;&lt;br&gt;Chairman &amp;amp; CEO, LIRNEasia&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="clear"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="speaker"&gt;&lt;img src="http://wso2.com/wp-content/themes/wso2ng-v2/con-images/paul.png"&gt;&lt;br /&gt;&lt;div class="name"&gt;&lt;span class="title"&gt;Enterprise Computing in 2020&lt;/span&gt;&lt;br&gt;&lt;span class="name"&gt;Paul Fremantle&lt;/span&gt;&lt;br&gt;Co-Founder &amp;amp; CTO, WSO2 Inc.&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="clear"&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;A Walk Down Memory Lane: XML, Web Services &amp;amp; SOA from 1990 to 2010&lt;/h3&gt;&lt;br /&gt;&lt;div class="speaker"&gt;&lt;img src="http://wso2.com/wp-content/themes/wso2ng-v2/con-images/james.png"&gt;&lt;br /&gt;&lt;div class="name"&gt;&lt;span class="name"&gt;&lt;br&gt;James Clark&lt;br&gt;&lt;/span&gt;Father of XML &amp;amp; Founder, Thai Open Source Software Center&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="speaker"&gt;&lt;img src="http://wso2.com/wp-content/themes/wso2ng-v2/con-images/sanjiva.png"&gt;&lt;br /&gt;&lt;div class="name"&gt;&lt;span class="name"&gt;&lt;br&gt;Sanjiva Weerawarana, Ph. D&lt;/span&gt;&lt;br&gt;Founder, Chairman &amp;amp; CEO, WSO2 Inc.&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="speaker"&gt;&lt;img src="http://wso2.com/wp-content/themes/wso2ng-v2/con-images/jonathan.png"&gt;&lt;br /&gt;&lt;div class="name"&gt;&lt;span class="name"&gt;&lt;br&gt;Jonathan Marsh&lt;/span&gt;&lt;br&gt;VP, Business Development &amp;amp; Marketing, WSO2 Inc.&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;      &lt;!--div class="more"&gt;&lt;a href="#"&gt;&lt;img src="/wp-content/themes/wso2ng-v2/con-images/more-speakers.png" alt="More Speakers"/&gt;&lt;/a&gt;&lt;/div--&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="clear"&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-1475285316114269883?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/1475285316114269883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=1475285316114269883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1475285316114269883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1475285316114269883'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/08/wso2con-2010-colombo-sri-lanka.html' title='WSO2Con 2010 -- Colombo ,Sri Lanka September 14 &amp; 15'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-8775996215443378250</id><published>2010-08-09T19:07:00.000-07:00</published><updated>2010-08-09T19:15:00.391-07:00</updated><title type='text'>Worst fruit in the world</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Fk9gBeSftos/TGC1T_lIWxI/AAAAAAAAAGk/efcx0-MnMKw/s1600/Kiwi_fruit_wine.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 273px;" src="http://2.bp.blogspot.com/_Fk9gBeSftos/TGC1T_lIWxI/AAAAAAAAAGk/efcx0-MnMKw/s400/Kiwi_fruit_wine.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5503598099736058642" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is kiwi fruit. If you want to catch a diarrhea, eat a small piece.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-8775996215443378250?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/8775996215443378250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=8775996215443378250' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/8775996215443378250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/8775996215443378250'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/08/worst-fruit-in-world.html' title='Worst fruit in the world'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Fk9gBeSftos/TGC1T_lIWxI/AAAAAAAAAGk/efcx0-MnMKw/s72-c/Kiwi_fruit_wine.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-4159292899975291348</id><published>2010-08-05T20:16:00.000-07:00</published><updated>2010-10-04T04:21:15.756-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Google analytics style  Hour/Day/Month range picker</title><content type='html'>&lt;a href="https://sites.google.com/site/chanaka3d/Home/datepicker.zip?attredirects=0&amp;d=1"&gt;Download Date Picker&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I was searching for a Google analytics date picker style control to put on &lt;a href="http://wso2.com/products/business-activity-monitor/"&gt;WSO2 BAM&lt;/a&gt;. All the date pickers out there are just selecting a date range. They don't support the ability to select an hour range or a month range. So I rote a one.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Fk9gBeSftos/TFuFmz6Bo7I/AAAAAAAAAGU/xcWWIn6nV0I/s1600/date+picker+hour.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 184px;" src="http://2.bp.blogspot.com/_Fk9gBeSftos/TFuFmz6Bo7I/AAAAAAAAAGU/xcWWIn6nV0I/s400/date+picker+hour.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5502138271578301362" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Fk9gBeSftos/TFuEzr9jO6I/AAAAAAAAAGE/Ot_sWL0uFH8/s1600/date+picker+day.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 184px;" src="http://3.bp.blogspot.com/_Fk9gBeSftos/TFuEzr9jO6I/AAAAAAAAAGE/Ot_sWL0uFH8/s400/date+picker+day.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5502137393272273826" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Fk9gBeSftos/TFuFvxLtdyI/AAAAAAAAAGc/cE4GyXU5ZRI/s1600/date+picker+month.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 184px;" src="http://2.bp.blogspot.com/_Fk9gBeSftos/TFuFvxLtdyI/AAAAAAAAAGc/cE4GyXU5ZRI/s400/date+picker+month.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5502138425465992994" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I use YUI to handle Dom. Plus the date rage picker is YUI date picker. This control is used in "&lt;a href="http://wso2.com/products/business-activity-monitor/"&gt;The WSO2 Business Activity Monitor (WSO2 BAM)&lt;/a&gt;".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-4159292899975291348?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/4159292899975291348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=4159292899975291348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/4159292899975291348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/4159292899975291348'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/08/google-analytics-style-hourdaymonth.html' title='Google analytics style  Hour/Day/Month range picker'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Fk9gBeSftos/TFuFmz6Bo7I/AAAAAAAAAGU/xcWWIn6nV0I/s72-c/date+picker+hour.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-7047545248587798870</id><published>2010-07-25T22:22:00.000-07:00</published><updated>2010-07-25T22:31:26.436-07:00</updated><title type='text'>How to randomly displaying images on page refresh</title><content type='html'>This script display images in "imageRot" div randomly on every page load.&lt;br /&gt;&lt;br /&gt;Replace "quote-xx.gif" with your image name.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;&amp;lt;div id="imageRot"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;    var images = new Array();&lt;br /&gt;    images.push("quote-01.gif");&lt;br /&gt;    images.push("quote-02.gif");&lt;br /&gt;    images.push("quote-03.gif");&lt;br /&gt;    images.push("quote-04.gif");&lt;br /&gt;    images.push("quote-05.gif");&lt;br /&gt;    images.push("quote-06.gif");&lt;br /&gt;    images.push("quote-07.gif");&lt;br /&gt;    var random = Math.floor(Math.random() * 7);&lt;br /&gt;    var imageRot = document.getElementById("imageRot");&lt;br /&gt;    imageRot.innerHTML = '&amp;lt;img src="images/' + images[random] + '" alt=""&amp;gt;';&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-7047545248587798870?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/7047545248587798870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=7047545248587798870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/7047545248587798870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/7047545248587798870'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/07/how-to-randomly-displaying-images-on.html' title='How to randomly displaying images on page refresh'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-3972314875926553798</id><published>2010-06-10T19:10:00.000-07:00</published><updated>2010-06-17T10:31:21.189-07:00</updated><title type='text'>Simple tree control</title><content type='html'>&lt;a href="http://sites.google.com/site/chanaka3d/Home/treeControl.zip?attredirects=0&amp;amp;d=1"&gt;download&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;HTML tree controls are often bit complicated than it should be. But the above tree control is very simple. It also has some animated effect. If you have simple tree to display in your user interface this tree will be a good starting point. Basically the tree is a structured list nested in to layers.&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;&amp;lt;div class="treeControl"&amp;gt;&lt;br /&gt;        &amp;lt;ul&amp;gt;&lt;br /&gt;            &amp;lt;li&amp;gt;&amp;lt;a class="nodata" onclick="treeColapse(this)"&amp;gt; &amp;lt;/a&amp;gt; &amp;lt;a class="treeNode" onclick="treeColapse(this)"&amp;gt;lev1-one&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;            &amp;lt;li&amp;gt;&amp;lt;a class="minus" onclick="treeColapse(this)"&amp;gt; &amp;lt;/a&amp;gt; &amp;lt;a class="treeNode" onclick="treeColapse(this)"&amp;gt;lev1-two&amp;lt;/a&amp;gt;&lt;br /&gt;            &amp;lt;ul&amp;gt;&lt;br /&gt;                &amp;lt;li&amp;gt;&amp;lt;a class="nodata" onclick="treeColapse(this)"&amp;gt; &amp;lt;/a&amp;gt; &amp;lt;a class="treeNode" onclick="treeColapse(this)"&amp;gt;lev2-one&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;                &amp;lt;li&amp;gt;&amp;lt;a class="nodata" onclick="treeColapse(this)"&amp;gt; &amp;lt;/a&amp;gt; &amp;lt;a class="treeNode" onclick="treeColapse(this)"&amp;gt;lev2-two&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;                &amp;lt;li&amp;gt;&amp;lt;a class="nodata" onclick="treeColapse(this)"&amp;gt; &amp;lt;/a&amp;gt; &amp;lt;a class="treeNode" onclick="treeColapse(this)"&amp;gt;lev2-three&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;            &amp;lt;/ul&amp;gt;&lt;br /&gt;            &amp;lt;/li&amp;gt;&lt;br /&gt;            &amp;lt;li&amp;gt;&amp;lt;a class="nodata" onclick="treeColapse(this)"&amp;gt; &amp;lt;/a&amp;gt; &amp;lt;a class="treeNode" onclick="treeColapse(this)"&amp;gt;level-three&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;        &amp;lt;/ul&amp;gt;&lt;br /&gt;   &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The code above will display a tree looks like following.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Fk9gBeSftos/TBpbEZeikTI/AAAAAAAAAFw/gREwaBmBq4Y/s1600/simple-tree-control.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 129px; height: 175px;" src="http://4.bp.blogspot.com/_Fk9gBeSftos/TBpbEZeikTI/AAAAAAAAAFw/gREwaBmBq4Y/s400/simple-tree-control.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5483795627393585458" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-3972314875926553798?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/3972314875926553798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=3972314875926553798' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/3972314875926553798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/3972314875926553798'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/06/simple-tree-control.html' title='Simple tree control'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Fk9gBeSftos/TBpbEZeikTI/AAAAAAAAAFw/gREwaBmBq4Y/s72-c/simple-tree-control.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-1611070844994717690</id><published>2010-03-07T08:04:00.000-08:00</published><updated>2010-03-07T09:02:53.132-08:00</updated><title type='text'>Getting Flexy - Flex quick start project with Ant build script</title><content type='html'>&lt;a href="http://sites.google.com/site/chanaka3d/flexy.zip?attredirects=0&amp;amp;d=1"&gt;download&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Flex has open up endless possibilities to web designers and developers around the world. Since Flex has been around for a while now ,there are tremendous amount of resources available on the subject. Most of these guides and tutorials are base on Flex builder.&lt;br /&gt;&lt;br /&gt;The above code is a starting point to your Flex project. It contains an Ant build file which will compile the source files to a swf file and create html wrappers for you. You have to edit the build.xml file inside the extracted  "flexy" directory.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Fk9gBeSftos/S5PXqULYz3I/AAAAAAAAAFI/iGCjSfJOAic/s1600-h/tree.png"&gt;&lt;img style="cursor: pointer; width: 283px; height: 322px;" src="http://3.bp.blogspot.com/_Fk9gBeSftos/S5PXqULYz3I/AAAAAAAAAFI/iGCjSfJOAic/s400/tree.png" alt="" id="BLOGGER_PHOTO_ID_5445933496392011634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is how the project is structured.  The following image will give you a guild lines to edit the build files.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Fk9gBeSftos/S5PbBlJjYFI/AAAAAAAAAFQ/2ko3B6wFRmM/s1600-h/xml.png"&gt;&lt;img style="cursor: pointer; width: 359px; height: 400px;" src="http://3.bp.blogspot.com/_Fk9gBeSftos/S5PbBlJjYFI/AAAAAAAAAFQ/2ko3B6wFRmM/s400/xml.png" alt="" id="BLOGGER_PHOTO_ID_5445937194619592786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you setup Ant, Flex Sdk and change the build.xml file you will be able to generate something like this.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Fk9gBeSftos/S5Pb08E8jOI/AAAAAAAAAFY/zB06MnDHaMw/s1600-h/final.png"&gt;&lt;img style="cursor: pointer; width: 400px; height: 216px;" src="http://1.bp.blogspot.com/_Fk9gBeSftos/S5Pb08E8jOI/AAAAAAAAAFY/zB06MnDHaMw/s400/final.png" alt="" id="BLOGGER_PHOTO_ID_5445938076947614946" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-1611070844994717690?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/1611070844994717690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=1611070844994717690' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1611070844994717690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1611070844994717690'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/03/getting-flexy-flex-quick-start-project.html' title='Getting Flexy - Flex quick start project with Ant build script'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Fk9gBeSftos/S5PXqULYz3I/AAAAAAAAAFI/iGCjSfJOAic/s72-c/tree.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-6712096529099983771</id><published>2010-02-14T05:36:00.000-08:00</published><updated>2010-02-14T05:59:40.265-08:00</updated><title type='text'>Drawing a cartoon character</title><content type='html'>I am using Inkscape to draw cartoon characters. You can easily draw cartoons even if you are not a born artist. It is not necessary to draw from start to end. You can using Bezier curve tool to draw layer by layer. One in top of the other one. Finally color them. Following is scren shots I got from a drawing sequence step by step until the final art.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Fk9gBeSftos/S3f9nPNfWWI/AAAAAAAAAD4/vOVU5SyKMpY/s1600-h/step01.png"&gt;&lt;img style="cursor: pointer; width: 187px; height: 187px;" src="http://1.bp.blogspot.com/_Fk9gBeSftos/S3f9nPNfWWI/AAAAAAAAAD4/vOVU5SyKMpY/s400/step01.png" alt="" id="BLOGGER_PHOTO_ID_5438093925613001058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Fk9gBeSftos/S3f9ulf3IoI/AAAAAAAAAEA/bteUMA3A83g/s1600-h/step02.png"&gt;&lt;img style="cursor: pointer; width: 227px; height: 274px;" src="http://3.bp.blogspot.com/_Fk9gBeSftos/S3f9ulf3IoI/AAAAAAAAAEA/bteUMA3A83g/s400/step02.png" alt="" id="BLOGGER_PHOTO_ID_5438094051854721666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Fk9gBeSftos/S3f90K8eHkI/AAAAAAAAAEI/I7OcMMBtRhY/s1600-h/step03.png"&gt;&lt;img style="cursor: pointer; width: 266px; height: 328px;" src="http://4.bp.blogspot.com/_Fk9gBeSftos/S3f90K8eHkI/AAAAAAAAAEI/I7OcMMBtRhY/s400/step03.png" alt="" id="BLOGGER_PHOTO_ID_5438094147806174786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Fk9gBeSftos/S3f94iS8ZvI/AAAAAAAAAEQ/xpDcw5cZow8/s1600-h/step04.png"&gt;&lt;img style="cursor: pointer; width: 319px; height: 400px;" src="http://4.bp.blogspot.com/_Fk9gBeSftos/S3f94iS8ZvI/AAAAAAAAAEQ/xpDcw5cZow8/s400/step04.png" alt="" id="BLOGGER_PHOTO_ID_5438094222793926386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Fk9gBeSftos/S3f980vRhaI/AAAAAAAAAEY/u3khP_7aB5U/s1600-h/step05.png"&gt;&lt;img style="cursor: pointer; width: 230px; height: 400px;" src="http://2.bp.blogspot.com/_Fk9gBeSftos/S3f980vRhaI/AAAAAAAAAEY/u3khP_7aB5U/s400/step05.png" alt="" id="BLOGGER_PHOTO_ID_5438094296464065954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Fk9gBeSftos/S3f-Bpdb70I/AAAAAAAAAEg/e9TpwHTDpmA/s1600-h/step06.png"&gt;&lt;img style="cursor: pointer; width: 227px; height: 400px;" src="http://3.bp.blogspot.com/_Fk9gBeSftos/S3f-Bpdb70I/AAAAAAAAAEg/e9TpwHTDpmA/s400/step06.png" alt="" id="BLOGGER_PHOTO_ID_5438094379335806786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Fk9gBeSftos/S3f-F2Fa81I/AAAAAAAAAEo/fuccc_T0KPc/s1600-h/step07.png"&gt;&lt;img style="cursor: pointer; width: 236px; height: 400px;" src="http://3.bp.blogspot.com/_Fk9gBeSftos/S3f-F2Fa81I/AAAAAAAAAEo/fuccc_T0KPc/s400/step07.png" alt="" id="BLOGGER_PHOTO_ID_5438094451444216658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Fk9gBeSftos/S3f-QXwjQEI/AAAAAAAAAEw/YwyuNsnY1K4/s1600-h/slide01.png"&gt;&lt;img style="cursor: pointer; width: 400px; height: 309px;" src="http://2.bp.blogspot.com/_Fk9gBeSftos/S3f-QXwjQEI/AAAAAAAAAEw/YwyuNsnY1K4/s400/slide01.png" alt="" id="BLOGGER_PHOTO_ID_5438094632282177602" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-6712096529099983771?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/6712096529099983771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=6712096529099983771' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/6712096529099983771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/6712096529099983771'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/02/drawing-cartoon-character.html' title='Drawing a cartoon character'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Fk9gBeSftos/S3f9nPNfWWI/AAAAAAAAAD4/vOVU5SyKMpY/s72-c/step01.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-6969208919297018477</id><published>2010-02-04T03:12:00.000-08:00</published><updated>2010-02-04T03:27:19.192-08:00</updated><title type='text'>New Lost Season Rocks !!!!!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Fk9gBeSftos/S2quMGAt6kI/AAAAAAAAADw/7syp08GhA0c/s1600-h/KcLostS06Poster_Small.jpg"&gt;&lt;img style="cursor: pointer; width: 300px; height: 382px;" src="http://2.bp.blogspot.com/_Fk9gBeSftos/S2quMGAt6kI/AAAAAAAAADw/7syp08GhA0c/s400/KcLostS06Poster_Small.jpg" alt="" id="BLOGGER_PHOTO_ID_5434347423171209794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;New &lt;a href="http://abc.go.com/shows/lost"&gt;Lost&lt;/a&gt;  season started on ABC network last Tuesday. In last two seasons they introduced time travel. Now it seems they are talking about parallel universe theory. They say this is going to be there last season of the long running amazing TV show.&lt;br /&gt;"The aftermath from the detonation of the hydrogen bomb is revealed."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-6969208919297018477?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/6969208919297018477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=6969208919297018477' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/6969208919297018477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/6969208919297018477'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/02/new-lost-season-rocks.html' title='New Lost Season Rocks !!!!!'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Fk9gBeSftos/S2quMGAt6kI/AAAAAAAAADw/7syp08GhA0c/s72-c/KcLostS06Poster_Small.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-3005592507953880565</id><published>2010-02-04T02:57:00.000-08:00</published><updated>2010-02-04T03:11:54.304-08:00</updated><title type='text'>Sql queries result table column selecting javascript function</title><content type='html'>I was looking for a script which do the above. I couldn't find any. So I wrote a one. The following function takes a sql query string such as&lt;br /&gt;"SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo FROM Persons INNER JOIN Orders ON Persons.P_Id=Orders.P_Id ORDER BY Persons.LastName SELECT AVG(OrderPrice) AS OrderAverage FROM Orders" and returns a string array containing LastName,FirstName,OrderNo.&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;function brakeColumns(query) {&lt;br /&gt;  var columnList = new Array();&lt;br /&gt;  var patten1 = /^[\w\$][\w]*/i;&lt;br /&gt;  var patten2 = /^[\w\$][\w]*\.[\w\$][\w]*$/i;&lt;br /&gt;  var numEnd = query.search(/\sfrom\s/i);&lt;br /&gt;   var elems = (query.substring(6, numEnd)).split(",");&lt;br /&gt;   for (var i = 0; i &amp;lt; elems.length; i++) {&lt;br /&gt;       var elem = elems[i].toString();&lt;br /&gt;       elem = trim(elem);&lt;br /&gt;       var stPoint = "";&lt;br /&gt;       var wanted = "";&lt;br /&gt;       if (elem.search(/\sas\s/i) != -1) {&lt;br /&gt;           stPoint = elem.search(/\sas\s/i);&lt;br /&gt;           wanted = elem.substring(stPoint + 4);&lt;br /&gt;           wanted = trim(wanted);&lt;br /&gt;           if (patten1.test(wanted)) {&lt;br /&gt;               columnList.push(wanted);&lt;br /&gt;           }&lt;br /&gt;       } else if (patten2.test(elem)) {   //check for tablename.column name pattern&lt;br /&gt;           stPoint = elem.search(/\./);&lt;br /&gt;           wanted = elem.substring(stPoint + 1);&lt;br /&gt;           wanted = trim(wanted);&lt;br /&gt;           if (patten1.test(wanted)) {&lt;br /&gt;               columnList.push(wanted);&lt;br /&gt;           }&lt;br /&gt;       } else {   //check for straight column name like username,passsword etc&lt;br /&gt;           if (patten1.test(elem)) {&lt;br /&gt;               columnList.push(elem);&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;   return(columnList);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function trim(stringToTrim) {&lt;br /&gt;   return stringToTrim.replace(/^\s+|\s+$/g, "");&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-3005592507953880565?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/3005592507953880565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=3005592507953880565' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/3005592507953880565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/3005592507953880565'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/02/sql-queries-result-table-column.html' title='Sql queries result table column selecting javascript function'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-384785583186298412</id><published>2010-02-02T21:59:00.000-08:00</published><updated>2010-02-02T22:09:55.439-08:00</updated><title type='text'>Legal identifier matching regex pattern</title><content type='html'>The following will match any legal identifier — an unlimited-length sequence of Unicode letters and digits, beginning with a letter, the dollar sign "$", or the underscore character&lt;br /&gt;&lt;br /&gt;/^[a-zA-Z\$_][a-zA-Z0-9]*/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The following is a example in Javascript&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;alert(/^[a-zA-Z\$_][a-zA-Z0-9]*/.test("testVar"));&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-384785583186298412?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/384785583186298412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=384785583186298412' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/384785583186298412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/384785583186298412'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/02/legal-identifier-matching-regex-pattern.html' title='Legal identifier matching regex pattern'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-6669659803578789664</id><published>2010-02-02T10:42:00.000-08:00</published><updated>2010-02-02T11:38:05.863-08:00</updated><title type='text'>Simple way to converting html tags to display in web pages</title><content type='html'>I think every one has tried at least ones to put some html code in your blog post. I tried several ways but finally I ended up replacing special characters like "&lt;" and "&gt;" with &amp;amp;lt; and &amp;amp;gt;&lt;br /&gt;&lt;br /&gt;Following is a solution that you can easily integrate in to your web page. Include this javascript method in your header section.&lt;pre class="codeStyle"&gt;function putInsidePre(txt,toPre){&lt;br /&gt;var preText = document.createTextNode(txt);&lt;br /&gt;document.getElementById(toPre).appendChild(preText);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;and put the following style class in your css or just include them in a new &amp;gt;style&amp;lt; tag.&lt;br /&gt;&lt;pre class="codeStyle"&gt;.codeStyle {&lt;br /&gt;background-color:#EAEFF1;&lt;br /&gt;border:1px solid #88BFCE;&lt;br /&gt;color:#325669;&lt;br /&gt;display:block;&lt;br /&gt;font-size:11px;&lt;br /&gt;height:200px;&lt;br /&gt;line-height:1.5em;&lt;br /&gt;overflow:auto;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then you can create a &lt;pre&gt; tag and give it a id and call "putInsidePre" method to populate it.&lt;br /&gt;&lt;br /&gt;Here is a full working example.&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;style&amp;gt;&lt;br /&gt;.codeStyle {&lt;br /&gt;background-color:#EAEFF1;&lt;br /&gt;border:1px solid #88BFCE;&lt;br /&gt;color:#325669;&lt;br /&gt;display:block;&lt;br /&gt;font-size:11px;&lt;br /&gt;height:200px;&lt;br /&gt;line-height:1.5em;&lt;br /&gt;overflow:auto;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;function putInsidePre(txt,toPre){&lt;br /&gt;var preText = document.createTextNode(txt);&lt;br /&gt;document.getElementById(toPre).appendChild(preText);&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;pre class="codeStyle" id="codeBlock"&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;putInsidePre('&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;Content&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;',"codeBlock");&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-6669659803578789664?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/6669659803578789664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=6669659803578789664' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/6669659803578789664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/6669659803578789664'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/02/simple-way-to-converting-html-tags-to.html' title='Simple way to converting html tags to display in web pages'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-1534597693186153404</id><published>2010-01-09T09:29:00.000-08:00</published><updated>2010-01-09T10:04:59.556-08:00</updated><title type='text'>Best of TV in 2009</title><content type='html'>&lt;h2&gt;FlashForward&lt;/h2&gt;(Sci-Fi | Mystery | Thriller)&lt;br /&gt;&lt;br /&gt;For me this is the best TV serious came out in 2009. A mysterious event causes nearly everyone on the planet to simultaneously lose consciousness for 137 seconds, during which people see what appear to be visions of their lives approximately six months in the future—a global “flashforward”. A team of Los Angeles FBI agents, led by Stanford Wedeck (Vance) and spearheaded by Mark Benford (Fiennes), begin the process of determining what happened, why, and whether it will happen again.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Fk9gBeSftos/S0i-jYtjLkI/AAAAAAAAADQ/YsDgSpCGqE8/s1600-h/flash-forward-scene.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://3.bp.blogspot.com/_Fk9gBeSftos/S0i-jYtjLkI/AAAAAAAAADQ/YsDgSpCGqE8/s400/flash-forward-scene.jpg" alt="" id="BLOGGER_PHOTO_ID_5424795266305961538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Dollhouse&lt;/h2&gt;(Sci-Fi | Mystery | Thriller)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Fk9gBeSftos/S0jBd7mFSQI/AAAAAAAAADY/SJ9khW_eAiU/s1600-h/0000048894_20080530150505.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 130px;" src="http://3.bp.blogspot.com/_Fk9gBeSftos/S0jBd7mFSQI/AAAAAAAAADY/SJ9khW_eAiU/s400/0000048894_20080530150505.jpg" alt="" id="BLOGGER_PHOTO_ID_5424798471125551362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The show revolves around a corporation running numerous underground establishments (known as "Dollhouses") across the globe which program individuals referred to as Actives (or Dolls) with temporary personalities and skills. Wealthy clients hire Actives from Dollhouses at great expense for various purposes. The series primarily follows the Active known as Echo, played by Eliza Dushku, on her journey towards self-awareness.&lt;br /&gt;&lt;br /&gt;Sadly Fox announced that the show had been canceled. Final episode will airing January 22, 2010. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;V&lt;/h2&gt;&lt;br /&gt;(Sci-Fi | Mystery | Thriller)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Fk9gBeSftos/S0jCxm9ZJ0I/AAAAAAAAADg/VlulWNIUJNQ/s1600-h/v2009.png"&gt;&lt;img style="cursor: pointer; width: 300px; height: 400px;" src="http://2.bp.blogspot.com/_Fk9gBeSftos/S0jCxm9ZJ0I/AAAAAAAAADg/VlulWNIUJNQ/s400/v2009.png" alt="" id="BLOGGER_PHOTO_ID_5424799908695189314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I remember watching the old TV serious when we were kids. The remake seems to be very good.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;The Vampire Diaries&lt;/h2&gt;&lt;br /&gt;(Horror | Romance)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Fk9gBeSftos/S0jD2GBhsKI/AAAAAAAAADo/WjIRXDeKUwI/s1600-h/vampire-diaries-new-pic-a.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 286px; height: 400px;" src="http://4.bp.blogspot.com/_Fk9gBeSftos/S0jD2GBhsKI/AAAAAAAAADo/WjIRXDeKUwI/s400/vampire-diaries-new-pic-a.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5424801085265129634" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The story centers around Elena Gilbert, a high school girl torn between two vampire brothers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-1534597693186153404?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/1534597693186153404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=1534597693186153404' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1534597693186153404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1534597693186153404'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/01/best-of-tv-in-2009.html' title='Best of TV in 2009'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Fk9gBeSftos/S0i-jYtjLkI/AAAAAAAAADQ/YsDgSpCGqE8/s72-c/flash-forward-scene.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-3610258504004540607</id><published>2010-01-07T08:56:00.000-08:00</published><updated>2010-01-07T08:57:49.122-08:00</updated><title type='text'>Vote</title><content type='html'>"Do you believe if the person you are voting for will not hesitate to kill you if you are the only thing that is keeping him/her from winning an election?"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-3610258504004540607?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/3610258504004540607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=3610258504004540607' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/3610258504004540607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/3610258504004540607'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/01/vote.html' title='Vote'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-9134767235752632283</id><published>2010-01-07T08:07:00.000-08:00</published><updated>2010-01-07T08:15:52.418-08:00</updated><title type='text'>WSO2 Data Services v2.2.0 released</title><content type='html'>WSO2 Data Services Server team has recently announce the release of version 2.2.0 of the &lt;a href="http://wso2.org/downloads/data-services-server"&gt;WSO2 Data Services Server&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://wso2.org/downloads/data-services-server"&gt;WSO2 Data Services Server&lt;/a&gt; is an extremely simple and elegant mechanism to take data and make it available as a set of WS-* style Web services or as a set of REST style Web resources. It augments SOA development efforts by providing an easy to use platform for creating and hosting data services. This enables easy integration of data into business processes, mashups, gadgets, BI applications and any service in general.&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;strong&gt;Why should you use the new version?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;    &lt;ul&gt;&lt;li&gt;Support for large XML outputs - &lt;a href="http://wso2.org/library/knowledge-base/large-scale-data-transfer-data-services-streaming"&gt;http://wso2.org/library/knowledge-base/large-scale-data-transfer-data-services-streaming&lt;/a&gt;&lt;br /&gt;    &lt;/li&gt;&lt;li&gt;Google Spreadsheets as a data source - &lt;a href="http://wso2.org/project/solutions/data-services/java/2.2.0/docs/google_spread_sheet.html"&gt;http://wso2.org/project/solutions/data-services/java/2.2.0/docs/google_spread_sheet.html&lt;/a&gt;&lt;br /&gt;    &lt;/li&gt;&lt;li&gt;Content filtering based on user roles - &lt;a href="http://wso2.org/library/articles/content-filtering-data-services-user-roles"&gt;http://wso2.org/library/articles/content-filtering-data-services-user-roles&lt;/a&gt;&lt;br /&gt;    &lt;/li&gt;&lt;li&gt; Support for named parameters&lt;br /&gt;    &lt;/li&gt;&lt;li&gt; Ability to configure schema type for output elements&lt;br /&gt;    &lt;/li&gt;&lt;li&gt; Mixing multiple data source types in nested queries&lt;br /&gt;    &lt;/li&gt;&lt;li&gt; Excel 2007 support&lt;br /&gt;    &lt;/li&gt;&lt;li&gt; Support for Oracle Ref Cursor - http://wso2.org/library/tutorials/use-oracle-ref-cursors-wso2-data-services-server&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-9134767235752632283?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/9134767235752632283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=9134767235752632283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/9134767235752632283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/9134767235752632283'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/01/wso2-data-services-v220-released.html' title='WSO2 Data Services v2.2.0 released'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-4787977814244229452</id><published>2010-01-06T17:40:00.000-08:00</published><updated>2010-01-06T17:44:00.618-08:00</updated><title type='text'>Open Source Business Activity Monitoring Tool</title><content type='html'>&lt;a title="WSO2 Business Activity Monitor" href="http://www.slideshare.net/wso2.org/wso2-business-activity-monitor" target="_blank"&gt;WSO2 Business Activity Monitor&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;View more&lt;br /&gt;&lt;a href="http://www.slideshare.net/" style="text-decoration: underline;" target="_blank"&gt;presentations&lt;/a&gt;&lt;br /&gt;from&lt;br /&gt;&lt;a href="http://www.slideshare.net/wso2.org" style="text-decoration: underline;" target="_blank"&gt;WSO2&lt;/a&gt;&lt;br /&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-4787977814244229452?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/4787977814244229452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=4787977814244229452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/4787977814244229452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/4787977814244229452'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2010/01/open-source-business-activity.html' title='Open Source Business Activity Monitoring Tool'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-7798571088769267707</id><published>2009-09-14T04:20:00.000-07:00</published><updated>2009-09-14T11:12:55.441-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IntelliJ IDEA'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex relative layout'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash'/><title type='text'>Laying out elements - Flex vs HTML</title><content type='html'>&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.2  (Win32)"&gt;&lt;meta name="CREATED" content="20090822;6333800"&gt;&lt;meta name="CHANGEDBY" content="Chanaka Jayasena"&gt;&lt;meta name="CHANGED" content="20090914;16525712"&gt;&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;I recently developed a Flex application. &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;Before everything else I wanted to layout things. I had a trial version of Flex Builder with me. Designing the layout with Flex Builder is very easy. I can simply drag and drop components and create the layout. But I wanted to use IntelliJ IDEA as my IED. The main draw back for using Idea was been not able to preview the layout in design time. The solution to this problem came in two parts.&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;1 Design the site in relative layout&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;2 Use Flex component explorer as a reference (http://www.adobe.com/devnet/flex/tourdeflex/web/)&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;All most all the tutorials out there explains how to create absolute layouts. This is ok when we have Flex builder. But when we are not with this tool, it's not easy to visualize the layout when we create absolute layouts.  &lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;So I experimented with relative layouts in “mxml”. It is almost the same as html/css relative layouts. You simply have to make sure layout=”horizontal” or layout=“vertical” is set in the Application tag in the main mxml file. Then we can use “HBox” components to float content horizontally and “VBox” components to float content vertically. And also you can have an external css file linked to this main mxml application and control the look and feel from there by assigning style classes to components. But I must say that we don't have complete control over each components through the style sheet. There are limitations. “&lt;a href="http://www.loscavio.com/downloads/blog/flex3_css_list/flex3_css_list.htm"&gt;http://www.loscavio.com/downloads/blog/flex3_css_list/flex3_css_list.htm&lt;/a&gt;” is a good reference on what styles can be use on which components.  Of cause you can always refer to the API documentation as well.&lt;/p&gt;&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;lt;div style=”float:right”&amp;gt;column 01&amp;lt;/div&amp;gt;&amp;lt;div style=”float:right”&amp;gt; column 02&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt; &lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;next row test content&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p style="margin-bottom: 0in;"&gt;The above code displays a layout with two columns with “column 01” and  “column 02” in one row and “next row test content” in the second row. We can achive the same in mxml as follows.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;&amp;lt;mx:vbox&amp;gt;&lt;br /&gt;   &amp;lt;mx:hbox&amp;gt;&amp;lt;mx:text&amp;gt;column 01&amp;lt;/mx:text&amp;gt;&amp;lt;mx:text&amp;gt;column 02&amp;lt;/mx:text&amp;gt;&amp;lt;/mx:hbox&amp;gt;&lt;br /&gt;   &amp;lt;mx:text&amp;gt;next row test content&amp;lt;/mx:text&amp;gt;&lt;br /&gt;&amp;lt;/mx:vbox&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When you grab the experience on how to layout content relatively you can use what ever IDE you prefer to develop your Flex application. Also you can use Flex Ant tasks and write an Ant build script to build the application and wrap it in in a html wrapper. I will be able to explain how to do these later with several other blog posts.  &lt;p&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-7798571088769267707?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/7798571088769267707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=7798571088769267707' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/7798571088769267707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/7798571088769267707'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2009/09/laying-out-elements-flex-vs-html.html' title='Laying out elements - Flex vs HTML'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-1244193124561237477</id><published>2009-03-20T09:37:00.000-07:00</published><updated>2009-03-20T10:03:55.044-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='dhtml'/><title type='text'>Vertical and horizontal drag/drop node tree</title><content type='html'>I was recently experimenting with a html tree which can manipulate it's nodes by drag and drop. I wanted to make it horizontally and vertically growable. When I was almost done, I had to rush for a much simpler version of this without the drag/drop part. I think the code I have written so far might be a good starting point to someone who is trying to do the same thing. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Fk9gBeSftos/ScPHktIcljI/AAAAAAAAADE/iNRG42wotQM/s1600-h/screenShot.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 206px;" src="http://4.bp.blogspot.com/_Fk9gBeSftos/ScPHktIcljI/AAAAAAAAADE/iNRG42wotQM/s400/screenShot.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5315311418631558706" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sites.google.com/site/chanaka3d/Home/horizontalTree.zip?attredirects=0"&gt;Download Code&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The above code use script.aculo.us Prototype and YUI javascript libraries together. Now I am realizing that, using YUI alone might be a better solution for this since YUI also comes with the drag/drop support.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-1244193124561237477?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/1244193124561237477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=1244193124561237477' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1244193124561237477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1244193124561237477'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2009/03/vertical-and-horizontal-dragdrop-node.html' title='Vertical and horizontal drag/drop node tree'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Fk9gBeSftos/ScPHktIcljI/AAAAAAAAADE/iNRG42wotQM/s72-c/screenShot.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-188513594147074902</id><published>2009-02-02T21:57:00.000-08:00</published><updated>2009-02-02T22:26:56.440-08:00</updated><title type='text'>Are You Adapting Your architecture TO suit a vendor??? Learn how to find a vendor who adapts to your architecture?</title><content type='html'>Countless vendors, including proprietary middleware industry giants like IBM and Oracle, and open source platform companies like WSO2, have built products that enable SOA to varying extents. &lt;br /&gt;&lt;br /&gt;But no middleware product has taken a componentized approach to their own middleware “silos”. The features and functions of each middleware product have been predetermined by the vendor’s software designers, not built to each individual customer’s specification.&lt;br /&gt;&lt;br /&gt;WSO2 is presenting &lt;a href="http://wso2.org/project/carbon/making_good_soa_great.pdf"&gt;this nice little article&lt;/a&gt; and explaining how we can benefit by using there all new  componentized Carbon as a solution for this problem. &lt;br /&gt;&lt;a href="http://wso2.org/project/carbon/making_good_soa_great.pdf"&gt;http://wso2.org/project/carbon/making_good_soa_great.pdf&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;strong&gt;Content&lt;/strong&gt;&lt;br /&gt;&lt;ul style="padding:0px;margin:0px;"&gt;&lt;br /&gt;&lt;li&gt;Componentization reaches enterprise it&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The need for modular middleware&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Use case base explanation &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Painless service creation &amp; integration&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Set the pace of your SOA adoptions&lt;/li&gt;&lt;br /&gt;&lt;li&gt;WSO2 Carbon: the evolution of middleware&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-188513594147074902?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/188513594147074902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=188513594147074902' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/188513594147074902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/188513594147074902'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2009/02/are-you-adapting-your-architecture-to.html' title='Are You Adapting Your architecture TO suit a vendor??? Learn how to find a vendor who adapts to your architecture?'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-2886331149703703897</id><published>2009-01-31T05:00:00.000-08:00</published><updated>2009-01-31T05:15:23.579-08:00</updated><title type='text'>Using javascript to Include a html file inside another html file</title><content type='html'>When there is no server side functionality needed we create the whole site in plain html. Usually these sites have left/right side menu, top header, footer etc.. If the site grows in to 20, 30 pages, it will be a headache to do a simple change like changing footer text. We will have to change each page. If we were using a server side technology like PHP, JSP, etc.., we will have the chance to keep the common areas in the site in different pages and include these parts in each page using a “include” statements. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Fk9gBeSftos/SYRL1xH9IVI/AAAAAAAAAC0/bE_GZu79HFo/s1600-h/html-include.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 233px;" src="http://3.bp.blogspot.com/_Fk9gBeSftos/SYRL1xH9IVI/AAAAAAAAAC0/bE_GZu79HFo/s320/html-include.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5297442448786399570" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;We can do the same thing with the plain old html and javascript. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;But how?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;First you need to create the site main layout using divs and give them unique ids.&lt;/p&gt;&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;HTML Includes&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;script language="javascript" src="js/main.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script src="js/prototype.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script language="javascript" xml:space="preserve"&amp;gt;&lt;br /&gt;    // &amp;lt;![CDATA[&lt;br /&gt;    Event.observe(window, 'load', loadCalls);&lt;br /&gt;    // ]]&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;link type="text/css" href="css/main.css" rel="stylesheet"/&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;div class="page-sizer"&amp;gt;&lt;br /&gt;    &amp;lt;div class="header" id="header"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;    &amp;lt;div&amp;gt;&amp;lt;div class="leftMenu" id="leftMenu"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class="content" id="content"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;    &amp;lt;span style="clear:both;" /&amp;gt;&lt;br /&gt;    &amp;lt;div class="footer" id="footer"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Also you'r gonna need a javascript library like prototype, Jquary, YUI. You don't have to have the whole library to do this. You only needs to have the files to make an ajax call. I am going to use prototype for my example but using other libraries wouldn't make much difference. So what I simply do is to access each div element and fetch it's content from a separate file and fill them. &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;function loadCalls() {&lt;br /&gt;    //Load the pages one by one to the divs&lt;br /&gt;    loadPages('common-pages/footer.html','footer');&lt;br /&gt;    loadPages('common-pages/header.html','header');&lt;br /&gt;    loadPages('common-pages/leftMenu.html','leftMenu');&lt;br /&gt;    loadPages('content/default.html','content');&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;function loadPages(path,loadToId){&lt;br /&gt;     //IE cache the response when the request parameters are the same&lt;br /&gt;    //So We send a random parameter weith the request&lt;br /&gt;    var random = Math.floor(Math.random() * 2000);&lt;br /&gt;&lt;br /&gt;    new Ajax.Request(path+'?rand=' + random,&lt;br /&gt;    {&lt;br /&gt;        method:'get',&lt;br /&gt;        evalScripts: true,&lt;br /&gt;        parameters:{random:random},&lt;br /&gt;        onSuccess: function(transport) {&lt;br /&gt;            document.getElementById(loadToId).innerHTML = transport.responseText;&lt;br /&gt;        },&lt;br /&gt;        onFailure: function() {&lt;br /&gt;            setError('Problem with loading the file');&lt;br /&gt;        }&lt;br /&gt;    });&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;And from the menu file I am loading each page to the “content” div as follows.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;a onclick="loadPages('content/page01.html','content');"&amp;gt;page1&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You can download the complete source code from here &lt;a href="http://sites.google.com/site/chanaka3d/Home/html-include.zip?attredirects=0"&gt;http://sites.google.com/site/chanaka3d/Home/html-include.zip?attredirects=0&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; This method will not work in IE if you are not hosting it in a sever. But in Firefox it doesn't necessarily need a sever to work.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-2886331149703703897?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/2886331149703703897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=2886331149703703897' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/2886331149703703897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/2886331149703703897'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2009/01/using-javascript-to-include-html-file.html' title='Using javascript to Include a html file inside another html file'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Fk9gBeSftos/SYRL1xH9IVI/AAAAAAAAAC0/bE_GZu79HFo/s72-c/html-include.png' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-1716594134161171088</id><published>2009-01-08T07:39:00.000-08:00</published><updated>2009-01-08T07:59:26.983-08:00</updated><title type='text'>Useful method to find the next list node in an unordered list from javascript</title><content type='html'>If we try to use object.nextSibling to get the next list object of an unordered list, it is not always returning a list object. The following method can be use to get the next list object of an unordered list.&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;function getNextLi(the_li) {&lt;br /&gt;&lt;br /&gt;    var next_li = false;&lt;br /&gt;    if (the_li.nextSibling != null &amp;&amp; the_li.nextSibling.nodeName == "LI") next_li = the_li.nextSibling;&lt;br /&gt;    return next_li;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-1716594134161171088?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/1716594134161171088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=1716594134161171088' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1716594134161171088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1716594134161171088'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2009/01/useful-method-to-find-next-list-node-in.html' title='Useful method to find the next list node in an unordered list from javascript'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-7694073731601851240</id><published>2009-01-07T10:02:00.000-08:00</published><updated>2009-01-07T10:14:01.920-08:00</updated><title type='text'>WSO2 is giving control back to software architects and developers to build and manage an SOA</title><content type='html'>&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.2  (Win32)"&gt;&lt;meta name="CREATED" content="20090107;23364384"&gt;&lt;meta name="CHANGED" content="20090107;23382365"&gt;&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 	--&gt; 	&lt;/style&gt; &lt;p&gt;SOA is a popular approach to enterprise architecture because it can improve IT flexibility, allowing a business to quickly adapt to changes. However, many specifications and implementations of "SOA solutions" are available making it somewhat difficult to figure what you really need (and what you don't) to build and manage an SOA. WSO2 is giving control back to software architects and developers, with a unified SOA middleware platform that allows you to seamlessly add product capabilities as your implementation grows.&lt;/p&gt; &lt;p&gt;This modular platform is WSO2 Carbon. The design of WSO2 Carbon focuses on separating key functionality of the SOA platform into separate components that can be mixed and matched, like customizable building blocks.&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;a href="http://wso2.org/projects/carbon"&gt;http://wso2.org/projects/carbon&lt;/a&gt;&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-7694073731601851240?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/7694073731601851240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=7694073731601851240' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/7694073731601851240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/7694073731601851240'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2009/01/wso2-is-giving-control-back-to-software.html' title='WSO2 is giving control back to software architects and developers to build and manage an SOA'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-3590812295174720495</id><published>2009-01-02T05:49:00.000-08:00</published><updated>2009-01-03T08:17:32.538-08:00</updated><title type='text'>Essential steps for cross browser compatible Javascript</title><content type='html'>&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.2  (Win32)"&gt;&lt;meta name="CREATED" content="20090102;19213801"&gt;&lt;meta name="CHANGED" content="20090103;20513003"&gt;&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt; 	&lt;/style&gt;  &lt;p style="margin-bottom: 0in;"&gt;Working with javascript opens up a whole set of possibilities for web developers. But at the same time, web developers have to deal with bunch of new issues when dealing with several browsers. The main reason behind this is because, each vendor has implemented the DOM in each browser differently. Some follows W3C standard while others don't. MS IE is the big bully in the block. IE usually doesn't respect W3C standards. So developers must put little extra effort from the very beginning of there development.&lt;br /&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Always use a cross browser 	compatible javascript library for your DOM methods.&lt;br /&gt;- YUI 	(&lt;a href="http://developer.yahoo.com/yui/event/"&gt;http://developer.yahoo.com/yui/event/&lt;/a&gt;)&lt;br /&gt;- 	JQuery (&lt;a href="http://jquery.com/"&gt;http://jquery.com/&lt;/a&gt;)&lt;/p&gt; 	&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Separate the view of the 	application (HTML) from its behavior (JavaScript).  	&lt;/p&gt; 	&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Always be extra careful when dealing with dynamic event handlers.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Ex:&lt;/span&gt;&lt;span style="font-style: italic;"&gt;(YUI is used in the 	following example and it outlines a practice example of the above 	three)&lt;/span&gt;&lt;br /&gt;The html file (test.html)&lt;br /&gt;&lt;/p&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;    &amp;lt;!-- Uncomment these lines if you want to keep YUI localy &lt;br /&gt;    &amp;lt;script type="text/javascript" src="yui/build/yahoo/yahoo-min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;script type="text/javascript" src="yui/build/event/event-min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;script type="text/javascript" src="yui/build/connection/connection-min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    --&amp;gt;&lt;br /&gt; &lt;br /&gt;    &amp;lt;script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/yahoo/yahoo-min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/event/event-min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/connection/connection-min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;!-- Source File --&amp;gt;&lt;br /&gt;    &amp;lt;script type="text/javascript" src="ext.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;        //when the DOM is ready execute the methord&lt;br /&gt;        YAHOO.util.Event.onDOMReady(init);&lt;br /&gt;    &amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;title&amp;gt;Page Title&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;div id="messageOut" style="display:none;"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;form&amp;gt;&lt;br /&gt;	&amp;lt;input type="text" id="messageIn" /&amp;gt;&lt;br /&gt;	&amp;lt;input type="button" id="messageButton" value="Test Me" /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;ext.js&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;function init(){&lt;br /&gt;	YAHOO.util.Event.addListener("messageButton", "click", showMessage);&lt;br /&gt;}&lt;br /&gt;function showMessage(){&lt;br /&gt;&lt;br /&gt;	var messageButton = document.getElementById('messageButton');&lt;br /&gt;	var messageIn = document.getElementById('messageIn');&lt;br /&gt;	var messageOut = document.getElementById('messageOut');&lt;br /&gt;	messageOut.style.display = "";&lt;br /&gt;	messageOut.innerHTML = messageIn.value;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note:&lt;/span&gt;&lt;span style="font-style: italic"&gt;To run the above example, you only need to save the two files “test.html” and “ext.js”. The YUI library files will be picked from the online sever.&lt;/span&gt;&lt;p&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-3590812295174720495?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/3590812295174720495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=3590812295174720495' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/3590812295174720495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/3590812295174720495'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2009/01/essential-steps-for-cross-browser.html' title='Essential steps for cross browser compatible Javascript'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-5715325751436929162</id><published>2008-11-18T16:12:00.000-08:00</published><updated>2008-11-18T16:27:56.454-08:00</updated><title type='text'>Converting Javascript XML Object to String</title><content type='html'>&lt;p&gt;I recently ran through a problem of XMLSerializer object. This is not working with IE. Fortunately IE support this simple method to convert an XML Objet to a String."XMLObject.xml". The following function will convert an XML Object in both browsers.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;function xmlToString(xmlObj) {&lt;br /&gt;    if (navigator.appName == "Netscape")&lt;br /&gt;    {&lt;br /&gt;       return (new XMLSerializer()).serializeToString(xmlObj);&lt;br /&gt;    }&lt;br /&gt;    if (navigator.appName == "Microsoft Internet Explorer")&lt;br /&gt;    {&lt;br /&gt;        return xmlObj.xml;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-5715325751436929162?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/5715325751436929162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=5715325751436929162' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/5715325751436929162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/5715325751436929162'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2008/11/converting-javascript-xml-object-to.html' title='Converting Javascript XML Object to String'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-5973993796241706205</id><published>2008-09-18T22:53:00.001-07:00</published><updated>2008-10-07T04:55:33.071-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='maths'/><category scheme='http://www.blogger.com/atom/ns#' term='dhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Projecting HTML Elements on a circle using Javascript</title><content type='html'>&lt;p style="margin-bottom: 0in;"&gt;Recently I wonted to create a tree control with a different approach. The requirement was to represent a node tree with main node on the circle center and it's child nodes projected on a circle around it. This is what i wanted.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Fk9gBeSftos/SNM-7nPz4eI/AAAAAAAAABI/zSsx69jsSXI/s1600-h/tree.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_Fk9gBeSftos/SNM-7nPz4eI/AAAAAAAAABI/zSsx69jsSXI/s320/tree.jpg" alt="" id="BLOGGER_PHOTO_ID_5247607184685261282" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.2  (Win32)"&gt;&lt;meta name="CREATED" content="20080918;13354100"&gt;&lt;meta name="CHANGED" content="20080919;11194857"&gt;&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt; 	&lt;/style&gt; &lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;My solution has 5 files&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;prototype.js&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;This is a handy javascript framework. You can download the latest version from there website (&lt;a href="http://www.prototypejs.org/download" target="_blank"&gt;www.prototypejs.org/download&lt;/a&gt;). I am using this to simply handle the onload event in the page.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;circle.html&lt;/li&gt;&lt;br /&gt;&lt;li&gt;script.js&lt;/li&gt;&lt;br /&gt;&lt;li&gt;node-main-left.gif&lt;/li&gt;&lt;br /&gt;&lt;li&gt;node-sub-left.gif&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;The circle.html, prototype.js and the script.js files are in the root folder and the two images are inside a folder named “images”.&lt;br /&gt;&lt;br /&gt;This is how the html file looks(circle.html).&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;script src="prototype.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script src="script.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script language="javascript" xml:space="preserve"&amp;gt;&lt;br /&gt;   // &amp;lt;![CDATA[&lt;br /&gt;   Event.observe(window, 'load', showTree);&lt;br /&gt;   // ]]&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;   .asso-content {&lt;br /&gt;       margin-left: 10px;&lt;br /&gt;       height: 200px;&lt;br /&gt;       overflow: auto;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   .node-main div, .node-sub div {&lt;br /&gt;       float: left;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   .node-content {&lt;br /&gt;       line-height: 29px;&lt;br /&gt;       text-indent: 5px;&lt;br /&gt;       border: solid 1px #cccccc;&lt;br /&gt;       border-left: none;&lt;br /&gt;       background-color: #ffffff;&lt;br /&gt;       padding-right: 3px;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   .node-sub {&lt;br /&gt;       position: absolute;&lt;br /&gt;   }&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;title&amp;gt;Association Tree&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;div id="assoContent" class="asso-content"&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The script.js file contain the logic to create the nodes in circle. The whole logic is base on the following principle.&lt;br /&gt;&lt;p style="margin-bottom: 0in; display: block; height: 340px;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Fk9gBeSftos/SNM-xLyLAmI/AAAAAAAAABA/E6JY44KILKA/s1600-h/sin-cos-circle.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_Fk9gBeSftos/SNM-xLyLAmI/AAAAAAAAABA/E6JY44KILKA/s320/sin-cos-circle.jpg" alt="" id="BLOGGER_PHOTO_ID_5247607005514498658" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;This is the script.js file&lt;br /&gt;&lt;pre class="codeStyle"&gt;&lt;br /&gt;function showTree() {&lt;br /&gt;  var assoContent = document.getElementById('assoContent');&lt;br /&gt;  //Define the center of the circle (cs,cy)&lt;br /&gt;  var cx = 100;&lt;br /&gt;  var cy = 100;&lt;br /&gt;&lt;br /&gt;  //Place the main node on the center of the circle (cx,cy)&lt;br /&gt;  var main_node = "&lt;div class="\&amp;quot;node-main\&amp;quot;" style="" cx="" cy=""&gt;&lt;div&gt;&lt;img src="http://www.blogger.com/%5C%22images/node-main-left.gif%5C%22" alt="\&amp;quot;\&amp;quot;" /&gt;&lt;/div&gt;&lt;div class="\&amp;quot;node-content\&amp;quot;"&gt;/foo/bar&lt;/div&gt;&lt;/div&gt;";&lt;br /&gt;  assoContent.innerHTML = main_node;&lt;br /&gt;&lt;br /&gt;  //This has to be get from the server side&lt;br /&gt;  var n = 6;                                //Number of child nodes&lt;br /&gt;  var r = 100;                              //The radious of the circle&lt;br /&gt;&lt;br /&gt;  //Calculate n if the number of child nodes are grater than 10&lt;br /&gt;  if (n &gt; 10) r = r + r * n;&lt;br /&gt;  var cone = 2 * (22 / 7) / n;&lt;br /&gt;&lt;br /&gt;  //Finding the cordinates of the points and show them&lt;br /&gt;  var x,y,new_node;&lt;br /&gt;  for (var i = 0; i &lt; x =" cx" y =" cy" x =" Math.round(x);" y =" Math.round(y);" new_node =" document.createElement('DIV');" csstext = "margin-left:" classname = "node-sub" innerhtml =" "&gt;&lt;img src="http://www.blogger.com/%5C%22images/node-sub-left.gif%5C%22" alt="\&amp;quot;\&amp;quot;" /&gt;&lt;div class="\&amp;quot;node-content\&amp;quot;"&gt;/foo/bar&lt;/div&gt;"&lt;br /&gt;      assoContent.appendChild(new_node);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Please read the in-line comments in the script.js file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The two images (node-main-left.gif, node-sub-left.gif) are here respectively.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Fk9gBeSftos/SNfX9-NcP4I/AAAAAAAAABo/A8O7y-j2pdQ/s1600-h/node-sub-left.gif"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_Fk9gBeSftos/SNfX9-NcP4I/AAAAAAAAABo/A8O7y-j2pdQ/s320/node-sub-left.gif" alt="" id="BLOGGER_PHOTO_ID_5248901350394969986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Fk9gBeSftos/SNfX5cUo1LI/AAAAAAAAABg/5N9S6TUAiLE/s1600-h/node-main-left.gif"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_Fk9gBeSftos/SNfX5cUo1LI/AAAAAAAAABg/5N9S6TUAiLE/s320/node-main-left.gif" alt="" id="BLOGGER_PHOTO_ID_5248901272578872498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;Download code from&lt;br /&gt;&lt;a target="_blank" href="http://sites.google.com/site/chanaka3d/Home/code.zip?attredirects=0"&gt;http://sites.google.com/site/chanaka3d/Home/code.zip?attredirects=0&lt;/a&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-5973993796241706205?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/5973993796241706205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=5973993796241706205' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/5973993796241706205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/5973993796241706205'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2008/09/projecting-html-elements-on-circle.html' title='Projecting HTML Elements on a circle using Javascript'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Fk9gBeSftos/SNM-7nPz4eI/AAAAAAAAABI/zSsx69jsSXI/s72-c/tree.jpg' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7608075799331204350.post-1115362052481151880</id><published>2008-08-22T03:55:00.001-07:00</published><updated>2008-09-19T03:01:04.947-07:00</updated><title type='text'>How to design a website - layout using free tools</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;There are many web development tools available on the market. Some of them ships with basic features and some contains very advanced features. What if you are unable to use any commercial tool available and still you want to design a pretty complex design, slice it, and convert  it to html/css.&lt;br /&gt;&lt;br /&gt;How do I know this? I know this since once I ran in to this situation by myself.&lt;br /&gt;&lt;br /&gt;What I did first was to download &lt;a target="_blank" href="http://www.inkscape.org/download/"&gt;Inkscape&lt;/a&gt;, which is a free vector graphic program. Creating a design in Inkscape is same as other vector graphic applications. But unfortunately there is no straight forward way of slicing the design and exporting. This is what I did as a workaround.&lt;br /&gt;&lt;br /&gt;I simply add a new layer to the project and named it as “slicing”. I made sure to keep the “slicing” layer above from the rest of the layers and locked all the other layers below it.&lt;br /&gt;&lt;br /&gt;I drew a rectangle surrounding the area I wanted to export. If the rectangle has stroke or fill it was critical to disable them since I wanted to export only the background. I have done this to each and every slice I wanted to export.&lt;br /&gt;&lt;br /&gt;Since the slicing layers have no stroke or fill, it seems very difficult to select them if I accidentally deselected them. But “xml tree” is a handy solution to this. The “xml tree” can be located from the top tool bar of the Inkscape UI.&lt;br /&gt;&lt;br /&gt;The exported slices are in png format. You can't export to jpeg or gif files directly from Inkscape. But you can use some other programs like &lt;a target="_blank" href="http://www.gimp.org/downloads/"&gt;Gimp&lt;/a&gt; to convert png files to jpeg or gif files.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre xml:space="preserve"&gt;&lt;br /&gt;&lt;style&gt;&lt;br /&gt;.test{&lt;br /&gt;background-color:#cccccc;&lt;br /&gt;}&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7608075799331204350-1115362052481151880?l=chanaka3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chanaka3d.blogspot.com/feeds/1115362052481151880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7608075799331204350&amp;postID=1115362052481151880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1115362052481151880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7608075799331204350/posts/default/1115362052481151880'/><link rel='alternate' type='text/html' href='http://chanaka3d.blogspot.com/2008/08/how-to-design-website-layout-using-free.html' title='How to design a website - layout using free tools'/><author><name>chanaka</name><uri>http://www.blogger.com/profile/12995850470768898083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/-0kmtd4CEj9U/TXAqRU1POwI/AAAAAAAAAHk/x3bQbfZQgu0/s220/me.jpg'/></author><thr:total>0</thr:total></entry></feed>
