<?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:blogger='http://schemas.google.com/blogger/2008' 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-9217060024670477726</id><updated>2014-12-16T23:30:23.352-08:00</updated><category term="PHP"/><category term="Geo Programming"/><category term="codeigniter"/><category term="C"/><category term="google map"/><category term="openlayers"/><category term="HTML5"/><category term="jQuery"/><category term="opencv"/><category term="Java"/><category term="JavaScript"/><category term="Python"/><category term="excel"/><category term="jQueryMobile"/><category term="timezone"/><category term="ubuntu"/><category term="ASP.NET MVC3"/><category term="ASP.Net"/><category term="CSS"/><category term="Data sets"/><category term="Edge detection"/><category term="Google Map Polygons"/><category term="HTML"/><category term="HTTP Cache"/><category term="Image Search API"/><category term="JpGraph"/><category term="MapServer"/><category term="Miscellaneous"/><category term="MongoDB"/><category term="MySQL"/><category term="OOP"/><category term="Order Statistic Filters"/><category term="PhoneGap"/><category term="Products"/><category term="YOURS API"/><category term="ci custom callbacks"/><category term="ci email"/><category term="date"/><category term="directions"/><category term="email crawler"/><category term="facebook login"/><category term="flicker"/><category term="form validation"/><category term="fpdf"/><category term="geojson"/><category term="html5 sql"/><category term="image morphology"/><category term="ip address"/><category term="iphone"/><category term="j2ee"/><category term="jFreeChart"/><category term="jQuery UI Dialog"/><category term="jsp"/><category term="localStorage"/><category term="map waypoints"/><category term="mongodb crud"/><category term="offset"/><category term="pgrouting"/><category term="php graphs"/><category term="postGIS"/><category term="progress bar"/><category term="push notifications"/><category term="reverse geocoding"/><category term="session bean"/><category term="socket"/><category term="socket-programming"/><category term="street view"/><category term="swift mailer"/><category term="swing"/><category term="vector layer"/><category term="voicexml"/><category term="web crawler"/><category term="web storage"/><title type='text'>codezone4</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default?start-index=26&amp;max-results=25'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>50</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-1722372215855802024</id><published>2014-11-17T00:00:00.002-08:00</published><updated>2014-11-17T03:56:32.656-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data sets"/><category scheme="http://www.blogger.com/atom/ns#" term="Products"/><title type='text'>Download Australian Postcode Data </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;style type=&quot;text/css&quot;&gt; .product-spec {  margin:0px;padding:0px;  width:100%;  box-shadow: 10px 10px 5px #888888;  border:1px solid #000000;    -moz-border-radius-bottomleft:0px;  -webkit-border-bottom-left-radius:0px;  border-bottom-left-radius:0px;    -moz-border-radius-bottomright:0px;  -webkit-border-bottom-right-radius:0px;  border-bottom-right-radius:0px;    -moz-border-radius-topright:0px;  -webkit-border-top-right-radius:0px;  border-top-right-radius:0px;    -moz-border-radius-topleft:0px;  -webkit-border-top-left-radius:0px;  border-top-left-radius:0px; }.product-spec table{     border-collapse: collapse;         border-spacing: 0;  width:100%;  height:100%;  margin:0px;padding:0px; }.product-spec tr:last-child td:last-child {  -moz-border-radius-bottomright:0px;  -webkit-border-bottom-right-radius:0px;  border-bottom-right-radius:0px; } .product-spec table tr:first-child td:first-child {  -moz-border-radius-topleft:0px;  -webkit-border-top-left-radius:0px;  border-top-left-radius:0px; } .product-spec table tr:first-child td:last-child {  -moz-border-radius-topright:0px;  -webkit-border-top-right-radius:0px;  border-top-right-radius:0px; }.product-spec tr:last-child td:first-child{  -moz-border-radius-bottomleft:0px;  -webkit-border-bottom-left-radius:0px;  border-bottom-left-radius:0px; }.product-spec tr:hover td{   } .product-spec tr:nth-child(odd){ background-color:#e5e5e5; } .product-spec tr:nth-child(even)    { background-color:#ffffff; }.product-spec td{  vertical-align:middle;      border:1px solid #000000;  border-width:0px 1px 1px 0px;  text-align:left;  padding:16px;  font-size:10px;  font-family:Arial;  font-weight:normal;  color:#000000; }.product-spec tr:last-child td{  border-width:0px 1px 0px 0px; }.product-spec tr td:last-child{  border-width:0px 0px 1px 0px; }.product-spec tr:last-child td:last-child{  border-width:0px 0px 0px 0px; } .product-spec tr:first-child td{   background:-o-linear-gradient(bottom, #000000 5%, #4c4c4c 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #000000), color-stop(1, #4c4c4c) );  background:-moz-linear-gradient( center top, #000000 5%, #4c4c4c 100% );  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=&quot;#000000&quot;, endColorstr=&quot;#4c4c4c&quot;); background: -o-linear-gradient(top,#000000,4c4c4c);   background-color:#000000;  border:0px solid #000000;  text-align:center;  border-width:0px 0px 1px 1px;  font-size:14px;  font-family:Arial;  font-weight:bold;  color:#ffffff; } .product-spec tr:first-child:hover td{  background:-o-linear-gradient(bottom, #000000 5%, #4c4c4c 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #000000), color-stop(1, #4c4c4c) );  background:-moz-linear-gradient( center top, #000000 5%, #4c4c4c 100% );  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=&quot;#000000&quot;, endColorstr=&quot;#4c4c4c&quot;); background: -o-linear-gradient(top,#000000,4c4c4c);   background-color:#000000; } .product-spec tr:first-child td:first-child{  border-width:0px 0px 1px 0px; } .product-spec tr:first-child td:last-child{  border-width:0px 0px 1px 1px; }  /* buy now btn */ /* Button Style */  a.buybtn{  color: #fff;  text-decoration: none; }  .buybtn{     font-family: Arial, sans-serif;     background:#ff8400;     background:-webkit-gradient(linear,left top,left bottom,color-stop(#ff8400,0),color-stop(#ff6600,1));     background:-webkit-linear-gradient(top, #ff8400 0%, #ff6600 100%);     background:-moz-linear-gradient(top, #ff8400 0%, #ff6600 100%);     background:-o-linear-gradient(top, #ff8400 0%, #ff6600 100%);     background:linear-gradient(top, #ff8400 0%, #ff6600 100%);     filter:progid:DXImageTransform.Microsoft.gradient( startColorstr=&#39;#ff8400&#39;, endColorstr=&#39;#ff6600&#39;,GradientType=0 );     padding-left:20px;     padding-right:65px;     height:45px;     display:inline-block;     position:relative;     border:1px solid #ff5a00;     -webkit-box-shadow:0px 1px 1px rgba(255,255,255,0.8) inset, 1px 1px 3px rgba(0,0,0,0.2), 0px 0px 0px 4px rgba(188,188,188,0.5);     -moz-box-shadow:0px 1px 1px rgba(255,255,255,0.8) inset, 1px 1px 3px rgba(0,0,0,0.2), 0px 0px 0px 4px rgba(188,188,188,0.5);     box-shadow:0px 1px 1px rgba(255,255,255,0.8) inset, 1px 1px 3px rgba(0,0,0,0.2), 0px 0px 0px 4px rgba(188,188,188,0.5);     -webkit-box-shadow:0px 1px 1px rgba(255,255,255,0.8) inset, 1px 1px 3px rgba(0,0,0,0.2);     -moz-box-shadow:0px 1px 1px rgba(255,255,255,0.8) inset, 1px 1px 3px rgba(0,0,0,0.2);     box-shadow:0px 1px 1px rgba(255,255,255,0.8) inset, 1px 1px 3px rgba(0,0,0,0.2);     -webkit-border-radius:5px;     -moz-border-radius:5px;     border-radius:5px;         clear:both;     margin:10px 0px;     overflow:hidden;     -webkit-transition:all 0.3s linear;     -moz-transition:all 0.3s linear;     -o-transition:all 0.3s linear;     transition:all 0.3s linear; }  .buybtn-text{     padding-top:10px;     display:block;     font-size:18px;     white-space:nowrap;     text-shadow:0px 1px 1px rgba(255,255,255,0.3);     color:#6e1d08;     -webkit-transition:all 0.2s linear;     -moz-transition:all 0.2s linear;     -o-transition:all 0.2s linear;     transition:all 0.2s linear; }  .buybtn-hidden-text{     position:absolute;     height:100%;     top:0px;     right:52px;     width:0px;     background:#6e1d08;     text-shadow:0px -1px 1px #363f49;     color:#fff;     font-size:18px;     white-space:nowrap;     text-transform:uppercase;     text-align:left;     text-indent:17px;     overflow:hidden;     line-height:42px;     -webkit-box-shadow:-1px 0px 1px rgba(255,255,255,0.4), 1px 1px 2px rgba(0,0,0,0.2) inset;     -moz-box-shadow:-1px 0px 1px rgba(255,255,255,0.4), 1px 1px 2px rgba(0,0,0,0.2) inset;     box-shadow:-1px 0px 1px rgba(255,255,255,0.4), 1px 1px 2px rgba(0,0,0,0.2) inset;     -webkit-transition:width 0.3s linear;     -moz-transition:width 0.3s linear;     -o-transition:width 0.3s linear;     transition:width 0.3s linear; }  .buybtn-image{     position:absolute;     right:0px;     top:0px;     height:100%;     width:52px;     border-left:1px solid #ff5a00;     -webkit-box-shadow:1px 0px 1px rgba(255,255,255,0.4) inset;     -moz-box-shadow:1px 0px 1px rgba(255,255,255,0.4) inset;     box-shadow:1px 0px 1px rgba(255,255,255,0.4) inset; }  .buybtn-image span{     width:38px;     height:38px;     opacity:0.7;     position:absolute;     left:50%;     top:50%;     margin:-20px 0px 0px -20px;     background:transparent url(&quot;http://lh4.googleusercontent.com/-0ZbieKHzrX4/VGna1GrC7tI/AAAAAAAABWo/Lu65lhGbXv0/w32-h22-no/cart.png&quot;) no-repeat 75% 55%;     -webkit-transition:all 0.3s linear;     -moz-transition:all 0.3s linear;     -o-transition:all 0.3s linear;     transition:all 0.3s linear; }  /* Hover Style*/  .buybtn:hover .buybtn-text{     text-shadow:0px 1px 1px #5d81ab;     color:#fff; }  .buybtn:hover .buybtn-hidden-text{     width:100px; }  .buybtn:hover .buybtn-image span{     opacity:1; }   /* Active Style */  .buybtn:active{     background:#ff5a00; }  &lt;/style&gt;  &lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-_QG7aSOkKr8/VGmqllGB5BI/AAAAAAAABWQ/9nBCkqnqRho/s1600/post_thumb_6cd562.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-_QG7aSOkKr8/VGmqllGB5BI/AAAAAAAABWQ/9nBCkqnqRho/s1600/post_thumb_6cd562.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a class=&quot;buybtn&quot; href=&quot;https://www.blogger.com/blogger.g?blogID=9217060024670477726#&quot;&gt;      &lt;span class=&quot;buybtn-text&quot;&gt;Buy Now&lt;/span&gt;        &lt;span class=&quot;buybtn-hidden-text&quot;&gt;$30.00&lt;/span&gt;      &lt;span class=&quot;buybtn-image&quot;&gt;&lt;/span&gt;     &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Postcodes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2,952&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Suburbs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14,665&lt;/span&gt; &lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt; &lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;States&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;New South Wales&lt;br /&gt;South Australia&lt;br /&gt;Western Australia&lt;br /&gt;Queensland&lt;br /&gt;Tasmania&lt;br /&gt;Victoria&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Self-governing territories&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Australian Capital Territory&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Northern Territory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #783f04;&quot;&gt;&lt;u&gt;&lt;span style=&quot;background-color: #073763;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #20124d;&quot;&gt;&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;Sample Data set&lt;/span&gt;&lt;span style=&quot;background-color: #b4a7d6;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #073763;&quot;&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;post-body-tpl&quot;&gt;&lt;div class=&quot;product-spec&quot;&gt;&lt;table&gt;                    &lt;tbody&gt;&lt;tr&gt;                        &lt;td&gt;ID                         &lt;/td&gt;                        &lt;td&gt;Suburb                         &lt;/td&gt;                        &lt;td&gt;Postcode                         &lt;/td&gt;                        &lt;td&gt;state_shortname                         &lt;/td&gt;                        &lt;td&gt;state_longname                         &lt;/td&gt;                        &lt;td&gt;lat                         &lt;/td&gt;                        &lt;td&gt;lng                         &lt;/td&gt;                                             &lt;/tr&gt;&lt;tr&gt;                        &lt;td&gt;15603&lt;/td&gt;                                                &lt;td&gt;Waterloo&lt;/td&gt;                                                &lt;td&gt;7109&lt;/td&gt;                                                &lt;td&gt;TAS&lt;/td&gt;                        &lt;td&gt;Tasmania&lt;/td&gt;                        &lt;td&gt;-43.204994&lt;/td&gt;                        &lt;td&gt;146.968018&lt;/td&gt;                         &lt;/tr&gt;&lt;tr&gt;                        &lt;td&gt;12267&lt;/td&gt;                                                &lt;td&gt;Waterloo corner&lt;/td&gt;                                                &lt;td&gt;5110&lt;/td&gt;                                                &lt;td&gt;SA&lt;/td&gt;                        &lt;td&gt;South Australia&lt;/td&gt;                        &lt;td&gt;-34.732128&lt;/td&gt;                        &lt;td&gt;138.583435&lt;/td&gt;                         &lt;/tr&gt;&lt;tr&gt;                        &lt;td&gt;13713&lt;/td&gt;                                                &lt;td&gt;Watermans bay&lt;/td&gt;                                                &lt;td&gt;6020&lt;/td&gt;                                                &lt;td&gt;WA&lt;/td&gt;                        &lt;td&gt;Western Australia&lt;/td&gt;                        &lt;td&gt;-31.850863&lt;/td&gt;                        &lt;td&gt;115.754890&lt;/td&gt;                         &lt;/tr&gt;&lt;tr&gt;                        &lt;td&gt;15603&lt;/td&gt;                                                &lt;td&gt;Waterloo&lt;/td&gt;                                                &lt;td&gt;7109&lt;/td&gt;                                                &lt;td&gt;TAS&lt;/td&gt;                        &lt;td&gt;Tasmania&lt;/td&gt;                        &lt;td&gt;-43.204994&lt;/td&gt;                        &lt;td&gt;146.968018&lt;/td&gt;                         &lt;/tr&gt;&lt;tr&gt;                        &lt;td&gt;3340&lt;/td&gt;                                                &lt;td&gt;Watersleigh&lt;/td&gt;                                                &lt;td&gt;2540&lt;/td&gt;                                                &lt;td&gt;NSW&lt;/td&gt;                        &lt;td&gt;New South Wales&lt;/td&gt;                        &lt;td&gt;-34.855186&lt;/td&gt;                        &lt;td&gt;150.520370&lt;/td&gt;                         &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;Features&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Available in multiple formats - .csv&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .sql &amp;nbsp; &amp;nbsp;&amp;nbsp; .doc &amp;nbsp;&amp;nbsp; .json&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; .xml &amp;nbsp; &amp;nbsp;&amp;nbsp; .yml &amp;nbsp; &amp;nbsp; &amp;nbsp; .ods&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .odt &amp;nbsp; &amp;nbsp; .pdf &lt;/li&gt;&lt;li&gt;Easy integration for existing or new web sites, mobiles apps...etc.&lt;/li&gt;&lt;li&gt;Well-ordered, clean data set&lt;/li&gt;&lt;li&gt;GIS related PHP scripts and functions free for developers&lt;/li&gt;&lt;li&gt;Satisfaction&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;form action=&quot;https://www.paypal.com/cgi-bin/webscr&quot; method=&quot;post&quot; target=&quot;_top&quot;&gt;&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;&lt;input name=&quot;hosted_button_id&quot; type=&quot;hidden&quot; value=&quot;DTFSV7KLNN3SS&quot; /&gt;&lt;input alt=&quot;PayPal - The safer, easier way to pay online!&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif&quot; type=&quot;image&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypalobjects.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt;&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://codezone4.blogspot.com/p/contact-us.html&quot;&gt;Contact us&lt;/a&gt; for any queries.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;* Please note that there may be slight accuracy related problems in the data set as Australian postcodes are changing constantly.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/1722372215855802024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/11/download-australian-postcode-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/1722372215855802024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/1722372215855802024'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/11/download-australian-postcode-data.html' title='Download Australian Postcode Data '/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-_QG7aSOkKr8/VGmqllGB5BI/AAAAAAAABWQ/9nBCkqnqRho/s72-c/post_thumb_6cd562.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-7202038443018821175</id><published>2014-10-11T23:27:00.001-07:00</published><updated>2014-10-11T23:27:10.943-07:00</updated><title type='text'>Firefox Geolocation Spoofing</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;a href=&quot;http://codezone4.files.wordpress.com/2013/08/geolocater.jpg&quot;&gt;&lt;img alt=&quot;Geolocater&quot; class=&quot;size-full wp-image-886&quot; src=&quot;http://codezone4.files.wordpress.com/2013/08/geolocater.jpg&quot; height=&quot;335&quot; width=&quot;645&quot; /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Firefox Geolocater is a great for playing with fake geolocations. You can add geolocations as you wish and check how your Firefox browser take each of those locations as your current location. The plugin is very useful for developers who are building&amp;nbsp; GIS web applications. You can download it &lt;a href=&quot;https://addons.mozilla.org/en-us/firefox/addon/geolocater/#&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/7202038443018821175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/10/firefox-geolocation-spoofing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/7202038443018821175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/7202038443018821175'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/10/firefox-geolocation-spoofing.html' title='Firefox Geolocation Spoofing'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-5738113198686643145</id><published>2014-10-03T08:00:00.001-07:00</published><updated>2014-10-03T08:00:13.481-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google map"/><category scheme="http://www.blogger.com/atom/ns#" term="javaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="map waypoints"/><title type='text'>Google Map Multiple WayPoints</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-QXM7iDU4Ccw/VC63kz83gWI/AAAAAAAABMI/pgCDRLEbkVY/s1600/Google%2BMap%2BMultiple%2BWayPoints.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Google Map Multiple WayPoints&quot; border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-QXM7iDU4Ccw/VC63kz83gWI/AAAAAAAABMI/pgCDRLEbkVY/s1600/Google%2BMap%2BMultiple%2BWayPoints.JPG&quot; height=&quot;221&quot; title=&quot;Google Map Multiple WayPoints&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Google Map Multiple WayPoints&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div class=&quot;post-body-tpl&quot;&gt;&lt;div class=&quot;btn-panel&quot;&gt;&lt;a href=&quot;http://demos.site11.com/jqm/jQueryMobile%20with%20Google%20Map.html&quot; class=&quot;demo-btn&quot;&gt;Demo&lt;/a&gt;&lt;/div&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;!doctype html&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;    &amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://maps.google.com/maps/api/js?sensor=false&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;        var myRouter = {&lt;br /&gt;            map_: null,&lt;br /&gt;            directionsHelper_: null,&lt;br /&gt;&lt;br /&gt;            stores: [&lt;br /&gt;                    {name: &amp;quot;Thalawa Station&amp;quot;, location: new google.maps.LatLng(8.231796, 80.348333)},&lt;br /&gt;                    {name: &amp;quot;Maho Station&amp;quot;, location: new google.maps.LatLng(7.8228, 80.2778)},&lt;br /&gt;                    {name: &amp;quot;Mirigama Station&amp;quot;, location: new google.maps.LatLng(7.242555, 80.126472)},&lt;br /&gt;                    {name: &amp;quot;Veyangoda Station&amp;quot;, location: new google.maps.LatLng(7.153015, 80.058488)},&lt;br /&gt;                    {name: &amp;quot;Gampaha Station&amp;quot;, location: new google.maps.LatLng(7.093543, 79.993703)}&lt;br /&gt;                ],&lt;br /&gt;&lt;br /&gt;            calcRoute: function() {&lt;br /&gt;&lt;br /&gt;                var waypts = [];&lt;br /&gt;&lt;br /&gt;                for (var i in this.stores) {&lt;br /&gt;                    waypts.push({&lt;br /&gt;                        location: this.stores[i].location,&lt;br /&gt;                        stopover:true&lt;br /&gt;                    });&lt;br /&gt;                }&lt;br /&gt;                var request = {&lt;br /&gt;                    //origin: new google.maps.LatLng(8.344216, 80.410917),&lt;br /&gt;					origin: &amp;quot;Anuradhapura Railway Station&amp;quot;,&lt;br /&gt;                    destination: &amp;quot;Colombo Fort Railway Station&amp;quot;,&lt;br /&gt;                    waypoints: waypts,&lt;br /&gt;                    optimizeWaypoints: true,&lt;br /&gt;                    travelMode: google.maps.DirectionsTravelMode.DRIVING&lt;br /&gt;                };&lt;br /&gt;&lt;br /&gt;                var _SELF = this;&lt;br /&gt;                this.directionsHelper_.route(request, function(response, status) {&lt;br /&gt;                    if (status == google.maps.DirectionsStatus.OK) {&lt;br /&gt;                        _SELF.directionsDisplay_.setDirections(response);&lt;br /&gt;                        return;&lt;br /&gt;                    }&lt;br /&gt;                    console.log(&#39;Directions Status: &#39; + status);&lt;br /&gt;                });&lt;br /&gt;            },&lt;br /&gt;&lt;br /&gt;            init: function(mapid) {&lt;br /&gt;&lt;br /&gt;                this.directionsHelper_ = new google.maps.DirectionsService();&lt;br /&gt;                this.directionsDisplay_ = new google.maps.DirectionsRenderer();&lt;br /&gt;&lt;br /&gt;                var center = new google.maps.LatLng(8.344216, 80.410917);&lt;br /&gt;                var myOptions = {&lt;br /&gt;                    zoom:7,&lt;br /&gt;                    mapTypeId: google.maps.MapTypeId.ROADMAP,&lt;br /&gt;                    center: center&lt;br /&gt;                }&lt;br /&gt;                this.map_ = new google.maps.Map(document.getElementById(mapid), myOptions);&lt;br /&gt;                this.directionsDisplay_.setMap(this.map_);&lt;br /&gt;&lt;br /&gt;                this.calcRoute();&lt;br /&gt;            }&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        $(document).ready(function() {&lt;br /&gt;            myRouter.init(&#39;map&#39;);&lt;br /&gt;        });&lt;br /&gt;&lt;br /&gt;    &amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;&lt;br /&gt;        #map {&lt;br /&gt;            height: 500px;&lt;br /&gt;            width: 600px;&lt;br /&gt;            border: 1px solid #000;&lt;br /&gt;        }&lt;br /&gt;    &amp;lt;/style&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=&amp;quot;map&amp;quot;&amp;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;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/5738113198686643145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/10/google-map-multiple-waypoints.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/5738113198686643145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/5738113198686643145'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/10/google-map-multiple-waypoints.html' title='Google Map Multiple WayPoints'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-QXM7iDU4Ccw/VC63kz83gWI/AAAAAAAABMI/pgCDRLEbkVY/s72-c/Google%2BMap%2BMultiple%2BWayPoints.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-8640718419466685864</id><published>2014-10-03T04:24:00.002-07:00</published><updated>2014-10-03T04:24:21.219-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="date"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>MySQL Check Time Duration Passed?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-PiZVqKtx1bA/VC6ExNjFxGI/AAAAAAAABL4/QsHYZ2-hOgU/s1600/mysql-time-duration.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;MySQL  Time Duration&quot; border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-PiZVqKtx1bA/VC6ExNjFxGI/AAAAAAAABL4/QsHYZ2-hOgU/s1600/mysql-time-duration.jpg&quot; height=&quot;311&quot; title=&quot;MySQL  Time Duration&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;MySQL&amp;nbsp; Time Duration&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div class=&quot;post-body-tpl&quot;&gt;You may want to check whether a particular date has passed using start date, time duration and current date&amp;nbsp; when the target date is not physically stored.&lt;br /&gt;&lt;br /&gt;For clarity, consider a db table schema as follows.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;+-----------+--------------------------+------------------+&lt;br /&gt;| event_id | start_time               | duration_seconds |&lt;br /&gt;+-----------+--------------------------+------------------+&lt;br /&gt;| 005      |&#39;2014-10-1 12:13:08&#39;      | 86400            |&lt;br /&gt;+-----------+--------------------------+------------------+&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Here `duration_seconds` is stored using integers. If TIME is used, there &#39;s a limit for 24 hrs.&lt;br /&gt;If you want to get only adverts that have not expired, you will run a query like this.&lt;br /&gt;&lt;pre class=&quot;language-mysql&quot;&gt;&lt;code&gt;&lt;br /&gt;SELECT * FROM  `events` WHERE TIME_TO_SEC(timediff(now(),start_time))&amp;lt;=`duration_seconds`;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/8640718419466685864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/10/mysql-check-time-duration-passed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/8640718419466685864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/8640718419466685864'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/10/mysql-check-time-duration-passed.html' title='MySQL Check Time Duration Passed?'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-PiZVqKtx1bA/VC6ExNjFxGI/AAAAAAAABL4/QsHYZ2-hOgU/s72-c/mysql-time-duration.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-878868818972613328</id><published>2014-09-25T04:58:00.000-07:00</published><updated>2014-09-25T04:58:00.527-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTTP Cache"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Prevent HTTP Cache with PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-8gdiHERP5dw/VCFgG0MhzSI/AAAAAAAABLg/RC2RPvJwDLc/s1600/http-cache-headers.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;HTTP Cache&quot; border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-8gdiHERP5dw/VCFgG0MhzSI/AAAAAAAABLg/RC2RPvJwDLc/s1600/http-cache-headers.png&quot; height=&quot;169&quot; title=&quot;HTTP Cache&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;HTTP Cache&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;post-body-tpl&quot;&gt;HTTP Cache can be troublesome during development in some occasions specially in developing and testing web services, testing endpoints. We can use PHP headers to prevent and disable HTTP cache.&amp;nbsp;  &lt;br /&gt;&lt;pre class=&quot;language-php&quot;&gt;&lt;code&gt;&lt;br /&gt;header(&quot;Content-Type: application/json&quot;);&lt;br /&gt;header(&quot;Expires: 0&quot;);&lt;br /&gt;header(&quot;Last-Modified: &quot; . gmdate(&quot;D, d M Y H:i:s&quot;) . &quot; GMT&quot;);&lt;br /&gt;header(&quot;Cache-Control: no-store, no-cache, must-revalidate&quot;);&lt;br /&gt;header(&quot;Cache-Control: post-check=0, pre-check=0&quot;, false);&lt;br /&gt;header(&quot;Pragma: no-cache&quot;);&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&amp;nbsp;Other than the above, there are other techniques of prevent&amp;nbsp; browser caching. &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/878868818972613328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/09/prevent-http-cache-with-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/878868818972613328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/878868818972613328'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/09/prevent-http-cache-with-php.html' title='Prevent HTTP Cache with PHP'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-8gdiHERP5dw/VCFgG0MhzSI/AAAAAAAABLg/RC2RPvJwDLc/s72-c/http-cache-headers.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-6478566924598714345</id><published>2014-09-23T04:52:00.000-07:00</published><updated>2014-09-23T04:52:46.099-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>CodeIgniter Like Flash Data in PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-0jousaDpEmI/VArjah42EkI/AAAAAAAABF4/n5lDfEyteP8/s1600/codeigniter.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;CodeIgniter&quot; border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-0jousaDpEmI/VArjah42EkI/AAAAAAAABF4/n5lDfEyteP8/s1600/codeigniter.jpeg&quot; title=&quot;CodeIgniter&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;CodeIgniter&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div class=&quot;post-body-tpl&quot;&gt;&lt;pre class=&quot;language-php&quot;&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;class FlashMessage {&lt;br /&gt;&lt;br /&gt;    public static function render() {&lt;br /&gt;        if (!isset($_SESSION[&#39;my_my_messages&#39;])) {&lt;br /&gt;            return null;&lt;br /&gt;        }&lt;br /&gt;        $my_messages = $_SESSION[&#39;my_messages&#39;];&lt;br /&gt;        unset($_SESSION[&#39;my_messages&#39;]);&lt;br /&gt;        return implode(&#39;&amp;lt;br/&amp;gt;&#39;, $my_messages);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static function add($message) {&lt;br /&gt;        if (!isset($_SESSION[&#39;my_messages&#39;])) {&lt;br /&gt;            $_SESSION[&#39;my_messages&#39;] = array();&lt;br /&gt;        }&lt;br /&gt;        $_SESSION[&#39;my_messages&#39;][] = $message;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/6478566924598714345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/09/codeigniter-like-flash-data-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/6478566924598714345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/6478566924598714345'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/09/codeigniter-like-flash-data-in-php.html' title='CodeIgniter Like Flash Data in PHP'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-0jousaDpEmI/VArjah42EkI/AAAAAAAABF4/n5lDfEyteP8/s72-c/codeigniter.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-896368238863166495</id><published>2014-07-25T08:42:00.000-07:00</published><updated>2014-09-06T07:15:08.757-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="push notifications"/><title type='text'>iPhone Push Notifications PHP Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-_gHopb5TcXc/VAFhhWmm5DI/AAAAAAAABFs/ck3ulP_LSN4/s1600/iphone-push-notifications-php-server.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-_gHopb5TcXc/VAFhhWmm5DI/AAAAAAAABFs/ck3ulP_LSN4/s1600/iphone-push-notifications-php-server.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre class=&quot;language-php&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;$ctx = stream_context_create();&lt;br /&gt;stream_context_set_option($ctx, &#39;ssl&#39;, &#39;local_cert&#39;, YOUR_.PEM_FILE);&lt;br /&gt;stream_context_set_option($ctx, &#39;ssl&#39;, &#39;passphrase&#39;, YOUR_PASSPHRASE);&lt;br /&gt; &lt;br /&gt;$fp = stream_socket_client(&lt;br /&gt;        &#39;ssl://gateway.sandbox.push.apple.com:2195&#39;, $err, $errstr, 60, STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT, $ctx);&lt;br /&gt; &lt;br /&gt;if (!$fp) {&lt;br /&gt;    exit(&quot;Failed to connect: $err $errstr&lt;br /&gt;&lt;br /&gt;&quot;);&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;echo &#39;Connected to APN&lt;br /&gt;&#39;;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;// Create the payload body&lt;br /&gt;$body[&#39;aps&#39;] = array(&lt;br /&gt;    &#39;badge&#39; =&amp;gt; +1,&lt;br /&gt;    &#39;alert&#39; =&amp;gt; &#39;Testing push notifications&#39;,&lt;br /&gt;    &#39;sound&#39; =&amp;gt; &#39;new_wall_paper.wav&#39;,&lt;br /&gt;    &#39;action-loc-key&#39; =&amp;gt; &#39;OK&#39;&lt;br /&gt;);&lt;br /&gt; &lt;br /&gt;$payload = json_encode($body);&lt;br /&gt; &lt;br /&gt;for ($i = 0; $i &amp;lt; count($tokens); $i++) {&lt;br /&gt;    $msg = chr(0) . pack(&#39;n&#39;, 32) . pack(&#39;H*&#39;, $tokens [$i]) . pack(&#39;n&#39;, strlen($payload)) . $payload;&lt;br /&gt;    fwrite($fp, $msg, strlen($msg));&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;echo &quot;Completed sending messages&quot;;&lt;br /&gt;fclose($fp);&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/896368238863166495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/07/iphone-push-notifications-php-server.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/896368238863166495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/896368238863166495'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/07/iphone-push-notifications-php-server.html' title='iPhone Push Notifications PHP Server'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-_gHopb5TcXc/VAFhhWmm5DI/AAAAAAAABFs/ck3ulP_LSN4/s72-c/iphone-push-notifications-php-server.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-5586240964950678055</id><published>2014-06-30T07:06:00.000-07:00</published><updated>2014-09-06T07:16:02.016-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ci custom callbacks"/><category scheme="http://www.blogger.com/atom/ns#" term="codeigniter"/><category scheme="http://www.blogger.com/atom/ns#" term="form validation"/><title type='text'>Passing Multiple Parameters to Form Validation Custom Callbacks in Codeigniter</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-0jousaDpEmI/VArjah42EkI/AAAAAAAABF4/n5lDfEyteP8/s1600/codeigniter.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-0jousaDpEmI/VArjah42EkI/AAAAAAAABF4/n5lDfEyteP8/s1600/codeigniter.jpeg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=9217060024670477726&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;CI natively only allows for&amp;nbsp; single parameter in custom callbacks. For an instance see the following code.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-php&quot;&gt;&lt;code&gt;&lt;br /&gt;$this-&amp;gt;form_validation-&amp;gt;set_rules&lt;br /&gt;(&#39;hstate&#39;, &#39;State&#39;, &#39;required|callback_suburb_check[&#39; . $suburb . &#39;]&#39;);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;If you need to pass multiple parameters, you have several options. Obviously you can change CI behaviour by subclassing the core library. But in this tutorial we follow the less pain approach. That &#39;s to access required parameters via POST variables within your custom callback function. They are still available in this scope.&lt;br /&gt;&lt;br /&gt;There is another way using your PHP string handling knowledge. Just formatting all the parameters as single string and passing to the callback function.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-php&quot;&gt;&lt;code&gt;&lt;br /&gt;$parameters = &#39;first_arg&#39; . &#39;||&#39; . &#39;second_arg&#39; . &#39;||&#39; . &#39;third_arg&#39;;&lt;br /&gt;$this-&amp;gt;form_validation-&amp;gt;set_rules&lt;br /&gt;(&#39;some_field&#39;, &#39;Some Field Name&#39;, &#39;callback__my_callback_function[&#39;.$parameters.&#39;]&#39;);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Then in your callback,&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-php&quot;&gt;&lt;code&gt;&lt;br /&gt;function _my_callback_function($field_value, $second_parameter){&lt;br /&gt;    list($first_param, $second_param, $third_param) = split(&#39;||&#39;, $second_parameter);&lt;br /&gt;    ...&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/5586240964950678055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/06/passing-multiple-parameters-to-form.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/5586240964950678055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/5586240964950678055'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/06/passing-multiple-parameters-to-form.html' title='Passing Multiple Parameters to Form Validation Custom Callbacks in Codeigniter'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-0jousaDpEmI/VArjah42EkI/AAAAAAAABF4/n5lDfEyteP8/s72-c/codeigniter.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-6493531209129301243</id><published>2014-06-26T05:27:00.000-07:00</published><updated>2014-09-06T07:12:56.901-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="web storage"/><title type='text'>How to check HTML5 Web Storage Support in JavaScript?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-QeYPkuab0D8/VArlq36BwiI/AAAAAAAABGE/yu_XEfRlM_4/s1600/html5-data-storage.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;HTML5 Data Storage&quot; border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-QeYPkuab0D8/VArlq36BwiI/AAAAAAAABGE/yu_XEfRlM_4/s1600/html5-data-storage.jpg&quot; height=&quot;320&quot; title=&quot;HTML5 Data Storage&quot; width=&quot;255&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;HTML5 Data Storage&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code&gt;&lt;br /&gt;function supports_html5_storage() {&lt;br /&gt;                try {&lt;br /&gt;                    return &#39;sessionStorage&#39; in window &amp;amp;&amp;amp; window[&#39;sessionStorage&#39;] !== null;&lt;br /&gt;                } catch (e) {&lt;br /&gt;                    return false;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            alert(supports_html5_storage());&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/6493531209129301243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/06/how-to-check-html5-web-storage-support.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/6493531209129301243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/6493531209129301243'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/06/how-to-check-html5-web-storage-support.html' title='How to check HTML5 Web Storage Support in JavaScript?'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-QeYPkuab0D8/VArlq36BwiI/AAAAAAAABGE/yu_XEfRlM_4/s72-c/html5-data-storage.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-4608251593196538789</id><published>2014-05-03T04:56:00.000-07:00</published><updated>2014-09-06T07:12:14.777-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="codeigniter"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>How to remove index.php from CodeIgniter URL in Ubuntu</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-0jousaDpEmI/VArjah42EkI/AAAAAAAABF4/n5lDfEyteP8/s1600/codeigniter.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;CodeIgniter&quot; border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-0jousaDpEmI/VArjah42EkI/AAAAAAAABF4/n5lDfEyteP8/s1600/codeigniter.jpeg&quot; title=&quot;CodeIgniter&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;CodeIgniter&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;In &lt;code&gt;application/config/config.php&lt;/code&gt;&lt;br /&gt;change:&lt;br /&gt;&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;$config&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;index_page&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;index.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;to&lt;br /&gt;&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;$config&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;index_page&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Create or modify .htaccess in project root with following content.&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;&lt;br /&gt;# Customized error messages.&lt;br /&gt;ErrorDocument 404 /index.php&lt;br /&gt;# Set the default handler.&lt;br /&gt;DirectoryIndex index.php&lt;br /&gt;# Various rewrite rules.&lt;br /&gt;&lt;ifmodule mod_rewrite.c=&quot;&quot;&gt;&lt;br /&gt;  RewriteEngine on&lt;br /&gt;  RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;  RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;  RewriteRule ^(.*)$ index.php?/$1 [L,QSA]&lt;br /&gt;&lt;/ifmodule&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Also allow overriding .htaccess in your apache&lt;br /&gt;&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;str&quot;&gt;/etc/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;apache2&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;sites&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;available&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;default&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;and edit the file &amp;amp; change to&lt;br /&gt;&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;typ&quot;&gt;AllowOverride&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;All&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;and Restart Apache&lt;br /&gt;&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;sudo &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;etc&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;apache2 reload&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;or&lt;br /&gt;&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;sudo service apache2 reload&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;or&lt;br /&gt;&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;sudo &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;etc&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;httpd reload&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class=&quot;post-body-tpl&quot;&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/4608251593196538789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/05/how-to-remove-indexphp-from-codeigniter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/4608251593196538789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/4608251593196538789'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/05/how-to-remove-indexphp-from-codeigniter.html' title='How to remove index.php from CodeIgniter URL in Ubuntu'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-0jousaDpEmI/VArjah42EkI/AAAAAAAABF4/n5lDfEyteP8/s72-c/codeigniter.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-3779048569729033363</id><published>2014-05-01T03:36:00.000-07:00</published><updated>2014-09-06T07:29:57.057-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PhoneGap"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>How to Install PhoneGap in Ubuntu</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-W4C6NUukK_Y/VAsXxK1X9QI/AAAAAAAABHY/irBy6gQJ_Eg/s1600/phonegap.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot; PhoneGap&quot; border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-W4C6NUukK_Y/VAsXxK1X9QI/AAAAAAAABHY/irBy6gQJ_Eg/s1600/phonegap.png&quot; height=&quot;133&quot; title=&quot; PhoneGap&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;PhoneGap&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. First, check you’ve got Java and Ant installed – you’ll need those later:&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;&lt;br /&gt;sudo apt-get install default-jre&lt;br /&gt;sudo apt-get install default-jdk&lt;br /&gt;sudo apt-get install ant&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;2. Install npm&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;sudo apt-get install npm&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;3. Get the latest nodejs (by installing ‘n’ and running that):&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;sudo npm update npm -g&lt;br /&gt;sudo npm install n -g&lt;br /&gt;sudo n stable&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;4. Now install phonegap itself&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;sudo npm install -g phonegap&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;5. Download the Android sdk from http://developer.android.com/sdk/index.html, put it somewhere sensible and unpack it:&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;sudo mv ~/Downloads/adt-bundle-linux-x86-20130917.zip /opt/&lt;br /&gt;cd /opt&lt;br /&gt;sudo unzip adt-bundle-linux-x86-20130917.zip&lt;br /&gt;sudo chmod -R 777 /opt/adt-bundle-linux-x86-20130917&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;6. Update PATH in ~/.bashrc to include the phonegap tools:&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;# Add android sdk&lt;br /&gt;PATH=$PATH:/opt/adt-bundle-linux-x86-20130917/sdk/platform-tools:/opt/adt-bundle-linux-x86-20130917/sdk/tools&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;and then ‘source ~/.bashrc’ to make sure you’ve got the new path setup.&lt;br /&gt;&lt;br /&gt;7. Create a phonegap app (I use a “projects” subdirectoy):&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;cd ~/projects&lt;br /&gt;phonegap create my-app&lt;br /&gt;cd my-app&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;8. Before you run the app, you’ll need to set up an emulator – run the android tool:&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;android&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;9. You may need to select a target (e.g. “Android 4.2.2 (API 17)”), and click the “Install 8 packages..” button (may need several clicks to accept all the licences)&lt;br /&gt;&lt;br /&gt;Now setup and start an emulator – in the ‘android’ util, go to Tools -&amp;gt; Manage AVDs, go to the “Device Definitions”, select a device, and use the “Create AVD” button to create a new AVD. Then use the “Start..” button to start the AVD (it may take a surprisingly long time to start fully).&lt;br /&gt;&lt;br /&gt;Run the app:&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;phonegap local run android&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;You should see the app compile and install on the emulator.&lt;br /&gt;&lt;br /&gt;You can do the compile and install steps separately:&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;phonegap local build android&lt;br /&gt;phonegap install android&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;10. Add plugins&lt;br /&gt;Optional Step&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git&lt;br /&gt;phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-media.git&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Original tutorial found at &lt;/b&gt;&lt;br /&gt;&lt;a href=&quot;http://julianhigman.com/blog/2013/10/17/notes-on-setting-up-phonegap-on-ubuntu-for-android-app-development/&quot; target=&quot;_blank&quot;&gt;http://julianhigman.com/blog/2013/10/17/notes-on-setting-up-phonegap-on-ubuntu-for-android-app-development/&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/3779048569729033363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/05/how-to-install-phonegap-in-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/3779048569729033363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/3779048569729033363'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/05/how-to-install-phonegap-in-ubuntu.html' title='How to Install PhoneGap in Ubuntu'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-W4C6NUukK_Y/VAsXxK1X9QI/AAAAAAAABHY/irBy6gQJ_Eg/s72-c/phonegap.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-4836935551687554409</id><published>2014-03-15T09:02:00.000-07:00</published><updated>2014-09-06T07:42:25.951-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Geo Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Map Polygons"/><category scheme="http://www.blogger.com/atom/ns#" term="javaScript"/><title type='text'>Google Map Polygons Demo</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-YcF6zkA91NA/VAscRZB1VFI/AAAAAAAABHg/7ievgHQ4rZQ/s1600/polygon_area.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Google Map Polygon&quot; border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-YcF6zkA91NA/VAscRZB1VFI/AAAAAAAABHg/7ievgHQ4rZQ/s1600/polygon_area.jpg&quot; height=&quot;282&quot; title=&quot;Google Map Polygon&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Google Map Polygon&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;h2&gt;How to get coordinates of a polygon?&lt;/h2&gt;&lt;br /&gt;&lt;h2&gt;How to delete a polygon?&lt;/h2&gt;&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;meta name=&quot;viewport&quot; content=&quot;initial-scale=1.0, user-scalable=no&quot;&amp;gt;&lt;br /&gt;&amp;lt;meta charset=&quot;UTF-8&quot;&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Drawing Tools&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;script src=&quot;jquery-1.10.2.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt; &lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot;&lt;br /&gt;src=&quot;http://maps.google.com/maps/api/js?sensor=false&amp;amp;libraries=drawing&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;br /&gt;#map, html, body {&lt;br /&gt;padding: 0;&lt;br /&gt;margin: 0;&lt;br /&gt;height: 100%;&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;#panel {&lt;br /&gt;width: 200px;&lt;br /&gt;font-family: Arial, sans-serif;&lt;br /&gt;font-size: 13px;&lt;br /&gt;float: right;&lt;br /&gt;margin: 10px;&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;#color-palette {&lt;br /&gt;clear: both;&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;.color-button {&lt;br /&gt;width: 14px;&lt;br /&gt;height: 14px;&lt;br /&gt;font-size: 0;&lt;br /&gt;margin: 2px;&lt;br /&gt;float: left;&lt;br /&gt;cursor: pointer;&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;#delete-button {&lt;br /&gt;margin-top: 5px;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;var drawingManager;&lt;br /&gt;var selectedShape;&lt;br /&gt;var colors = [&#39;#1E90FF&#39;, &#39;#FF1493&#39;, &#39;#32CD32&#39;, &#39;#FF8C00&#39;, &#39;#4B0082&#39;];&lt;br /&gt;var selectedColor;&lt;br /&gt;var colorButtons = {};&lt;br /&gt;var polygons = [];&lt;br /&gt;var drawingManager = null;&lt;br /&gt;var bermudaTriangle;&lt;br /&gt; &lt;br /&gt;function clearSelection() {&lt;br /&gt;if (selectedShape) {&lt;br /&gt;selectedShape.setEditable(false);&lt;br /&gt;selectedShape = null;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;function setSelection(shape) {&lt;br /&gt;clearSelection();&lt;br /&gt;selectedShape = shape;&lt;br /&gt;shape.setEditable(true);&lt;br /&gt;selectColor(shape.get(&#39;fillColor&#39;) || shape.get(&#39;strokeColor&#39;));&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;function deleteSelectedShape() {&lt;br /&gt;if (selectedShape) {&lt;br /&gt;selectedShape.setMap(null);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;function selectColor(color) {&lt;br /&gt;selectedColor = color;&lt;br /&gt;for (var i = 0; i &amp;lt; colors.length; ++i) {&lt;br /&gt;var currColor = colors[i];&lt;br /&gt;colorButtons[currColor].style.border = currColor == color ? &#39;2px solid #789&#39; : &#39;2px solid #fff&#39;;&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;// Retrieves the current options from the drawing manager and replaces the&lt;br /&gt;// stroke or fill color as appropriate.&lt;br /&gt;var polylineOptions = drawingManager.get(&#39;polylineOptions&#39;);&lt;br /&gt;polylineOptions.strokeColor = color;&lt;br /&gt;drawingManager.set(&#39;polylineOptions&#39;, polylineOptions);&lt;br /&gt; &lt;br /&gt;var rectangleOptions = drawingManager.get(&#39;rectangleOptions&#39;);&lt;br /&gt;rectangleOptions.fillColor = color;&lt;br /&gt;drawingManager.set(&#39;rectangleOptions&#39;, rectangleOptions);&lt;br /&gt; &lt;br /&gt;var circleOptions = drawingManager.get(&#39;circleOptions&#39;);&lt;br /&gt;circleOptions.fillColor = color;&lt;br /&gt;drawingManager.set(&#39;circleOptions&#39;, circleOptions);&lt;br /&gt; &lt;br /&gt;var polygonOptions = drawingManager.get(&#39;polygonOptions&#39;);&lt;br /&gt;polygonOptions.fillColor = color;&lt;br /&gt;drawingManager.set(&#39;polygonOptions&#39;, polygonOptions);&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;function setSelectedShapeColor(color) {&lt;br /&gt;if (selectedShape) {&lt;br /&gt;if (selectedShape.type == google.maps.drawing.OverlayType.POLYLINE) {&lt;br /&gt;selectedShape.set(&#39;strokeColor&#39;, color);&lt;br /&gt;} else {&lt;br /&gt;selectedShape.set(&#39;fillColor&#39;, color);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;function makeColorButton(color) {&lt;br /&gt;var button = document.createElement(&#39;span&#39;);&lt;br /&gt;button.className = &#39;color-button&#39;;&lt;br /&gt;button.style.backgroundColor = color;&lt;br /&gt;google.maps.event.addDomListener(button, &#39;click&#39;, function() {&lt;br /&gt;selectColor(color);&lt;br /&gt;setSelectedShapeColor(color);&lt;br /&gt;});&lt;br /&gt; &lt;br /&gt;return button;&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;function buildColorPalette() {&lt;br /&gt;var colorPalette = document.getElementById(&#39;color-palette&#39;);&lt;br /&gt;for (var i = 0; i &amp;lt; colors.length; ++i) {&lt;br /&gt;var currColor = colors[i];&lt;br /&gt;var colorButton = makeColorButton(currColor);&lt;br /&gt;colorPalette.appendChild(colorButton);&lt;br /&gt;colorButtons[currColor] = colorButton;&lt;br /&gt;}&lt;br /&gt;selectColor(colors[0]);&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;function initialize() {&lt;br /&gt;var map = new google.maps.Map(document.getElementById(&#39;map&#39;), {&lt;br /&gt;zoom: 10,&lt;br /&gt;center: new google.maps.LatLng(22.344, 114.048),&lt;br /&gt;mapTypeId: google.maps.MapTypeId.ROADMAP,&lt;br /&gt;disableDefaultUI: true,&lt;br /&gt;zoomControl: true&lt;br /&gt;});&lt;br /&gt; &lt;br /&gt;var polyOptions = {&lt;br /&gt;strokeWeight: 0,&lt;br /&gt;fillOpacity: 0.45,&lt;br /&gt;editable: true&lt;br /&gt;};&lt;br /&gt;// Creates a drawing manager attached to the map that allows the user to draw&lt;br /&gt;// markers, lines, and shapes.&lt;br /&gt;drawingManager = new google.maps.drawing.DrawingManager({&lt;br /&gt;drawingMode: google.maps.drawing.OverlayType.POLYGON,&lt;br /&gt;markerOptions: {&lt;br /&gt;draggable: true&lt;br /&gt;},&lt;br /&gt;polylineOptions: {&lt;br /&gt;editable: true&lt;br /&gt;},&lt;br /&gt;rectangleOptions: polyOptions,&lt;br /&gt;circleOptions: polyOptions,&lt;br /&gt;polygonOptions: polyOptions,&lt;br /&gt;map: map&lt;br /&gt;});&lt;br /&gt; &lt;br /&gt;google.maps.event.addListener(drawingManager, &#39;overlaycomplete&#39;, function(e) {&lt;br /&gt;if (e.type != google.maps.drawing.OverlayType.MARKER) {&lt;br /&gt;// Switch back to non-drawing mode after drawing a shape.&lt;br /&gt;drawingManager.setDrawingMode(null);&lt;br /&gt; &lt;br /&gt;// Add an event listener that selects the newly-drawn shape when the user&lt;br /&gt;// mouses down on it.&lt;br /&gt;var newShape = e.overlay;&lt;br /&gt;newShape.type = e.type;&lt;br /&gt;google.maps.event.addListener(newShape, &#39;click&#39;, function() {&lt;br /&gt;setSelection(newShape);&lt;br /&gt;});&lt;br /&gt;setSelection(newShape);&lt;br /&gt;}&lt;br /&gt;});&lt;br /&gt; &lt;br /&gt;// Clear the current selection when the drawing mode is changed, or when the&lt;br /&gt;// map is clicked.&lt;br /&gt;google.maps.event.addListener(drawingManager, &#39;drawingmode_changed&#39;, clearSelection);&lt;br /&gt;google.maps.event.addListener(map, &#39;click&#39;, clearSelection);&lt;br /&gt;google.maps.event.addDomListener(document.getElementById(&#39;delete-button&#39;), &#39;click&#39;, deleteSelectedShape);&lt;br /&gt; &lt;br /&gt;buildColorPalette();&lt;br /&gt;google.maps.event.addListener(drawingManager, &#39;overlaycomplete&#39;, function(polygon) {&lt;br /&gt;polygons.push(polygon);&lt;br /&gt; &lt;br /&gt;});&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt;google.maps.event.addDomListener(window, &#39;load&#39;, initialize);&lt;br /&gt; &lt;br /&gt;function pointsToText() {&lt;br /&gt; &lt;br /&gt;for (i = 0; i &amp;lt; polygons.length; i++) {&lt;br /&gt;var coordinates = (polygons[i].overlay.getPath().getArray());&lt;br /&gt; &lt;br /&gt;for (i = 0; i &amp;lt; coordinates.length; i++) {&lt;br /&gt; &lt;br /&gt;$(&quot;#points&quot;).append(&quot;(&quot; + coordinates[i][&#39;k&#39;] + &quot;,&quot; + coordinates[i][&#39;A&#39;] + &quot;),&quot;);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt;}&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;&amp;lt;div id=&quot;panel&quot;&amp;gt;&lt;br /&gt;&amp;lt;div id=&quot;color-palette&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;lt;button id=&quot;delete-button&quot;&amp;gt;Delete Selected Shape&amp;lt;/button&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;button&quot; onclick=&quot;pointsToText()&quot; value=&quot;Get Coordinates&quot;&amp;gt;&lt;br /&gt;&amp;lt;textarea id=&quot;points&quot; cols=&quot;30&quot; rows=&quot;20&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt; &lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt; &lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div id=&quot;map&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt; &lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/4836935551687554409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/03/google-map-polygons-demo.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/4836935551687554409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/4836935551687554409'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/03/google-map-polygons-demo.html' title='Google Map Polygons Demo'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-YcF6zkA91NA/VAscRZB1VFI/AAAAAAAABHg/7ievgHQ4rZQ/s72-c/polygon_area.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-2275528075535913878</id><published>2014-02-19T04:35:00.000-08:00</published><updated>2014-09-06T07:47:53.392-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="excel"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Import Excel Data into MySQL with PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-MqgPxS0XjLM/VAseOZOrEqI/AAAAAAAABHs/Pfm5i2DDJyI/s1600/phpexcel.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;PHPExcelReader.&quot; border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-MqgPxS0XjLM/VAseOZOrEqI/AAAAAAAABHs/Pfm5i2DDJyI/s1600/phpexcel.jpeg&quot; title=&quot;PHPExcelReader.&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;PHPExcelReader.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;To import Excel data, first you need to have a Excel reader. It should be accurate enough to interpret Excel data as expected. There &#39;s a good old Excel reader.&lt;br /&gt;&lt;br /&gt;Download &lt;a href=&quot;http://sourceforge.net/projects/phpexcelreader/&quot; target=&quot;_blank&quot;&gt;PHPExcelReader&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In the downloaded archive, you only need Excel directory with files including oleread.inc and reader.php.&lt;br /&gt;&lt;br /&gt;Just extract it where your web server can access.&lt;br /&gt;&lt;br /&gt;Next place your excel file or just create one with some dummy data. Make sure this file is readble by the web server.&lt;br /&gt;&lt;br /&gt;Finally create your php script to connect with database, read Excel file and insert data into db.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-php&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;require_once &#39;Excel/reader.php&#39;;&lt;br /&gt;&lt;br /&gt;$data = new Spreadsheet_Excel_Reader();&lt;br /&gt;&lt;br /&gt;$data-&amp;gt;setOutputEncoding(&#39;CP1251&#39;);&lt;br /&gt;&lt;br /&gt;$data-&amp;gt;read(&#39;a.xls&#39;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$conn = mysql_connect(&quot;localhost&quot;,&quot;root&quot;,&quot;&quot;);&lt;br /&gt;&lt;br /&gt;mysql_select_db(&quot;test&quot;,$conn);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;for ($x = 2; $x &amp;lt;= count($data-&amp;gt;sheets[0][&quot;cells&quot;]); $x++) {&lt;br /&gt;&lt;br /&gt;$first = $data-&amp;gt;sheets[0][&quot;cells&quot;][$x][1];&lt;br /&gt;&lt;br /&gt;$middle = $data-&amp;gt;sheets[0][&quot;cells&quot;][$x][2];&lt;br /&gt;&lt;br /&gt;$last = $data-&amp;gt;sheets[0][&quot;cells&quot;][$x][3];&lt;br /&gt;&lt;br /&gt;$sql = &quot;INSERT INTO mytable (First,Middle,Last)&lt;br /&gt;&lt;br /&gt;VALUES (&#39;$first&#39;,&#39;$middle&#39;,&#39;$last&#39;)&quot;;&lt;br /&gt;&lt;br /&gt;echo $sql.&quot;\n&quot;;&lt;br /&gt;&lt;br /&gt;mysql_query($sql);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/2275528075535913878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/02/import-excel-data-into-mysql-with-php.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/2275528075535913878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/2275528075535913878'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/02/import-excel-data-into-mysql-with-php.html' title='Import Excel Data into MySQL with PHP'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-MqgPxS0XjLM/VAseOZOrEqI/AAAAAAAABHs/Pfm5i2DDJyI/s72-c/phpexcel.jpeg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-7449217527260767040</id><published>2014-01-28T06:51:00.000-08:00</published><updated>2014-09-06T07:51:02.705-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Best Symfony Bundles</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-BR-zt00ju_0/VAsfO5OD-qI/AAAAAAAABH4/fIbZtyYNvrU/s1600/bundles-symfony-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Symfony Bundles&quot; border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-BR-zt00ju_0/VAsfO5OD-qI/AAAAAAAABH4/fIbZtyYNvrU/s1600/bundles-symfony-2.jpg&quot; height=&quot;160&quot; title=&quot;Symfony Bundles&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Symfony Bundles&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;1. &lt;a href=&quot;http://knpbundles.com/KnpLabs/KnpSnappyBundle&quot; target=&quot;_blank&quot;&gt;Export to PDF &lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/7449217527260767040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/01/best-symfony-bundles.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/7449217527260767040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/7449217527260767040'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/01/best-symfony-bundles.html' title='Best Symfony Bundles'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-BR-zt00ju_0/VAsfO5OD-qI/AAAAAAAABH4/fIbZtyYNvrU/s72-c/bundles-symfony-2.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-550439238903625233</id><published>2014-01-18T13:39:00.000-08:00</published><updated>2014-09-06T07:52:33.700-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fpdf"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Create PDF with fpdf</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-YTUcfUUjHyc/VAsfdSuz5mI/AAAAAAAABIA/GFaPFLIKRwU/s1600/fpdf.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-YTUcfUUjHyc/VAsfdSuz5mI/AAAAAAAABIA/GFaPFLIKRwU/s1600/fpdf.jpeg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;There are various PHP libraries to create PDF documents. FPDF, MPDF, DomPDF, HTML2PDF are among those popular ones. Each of them has some sort of uniqueness in terms of functionality. This tutorial is just a demo of FPDF using official distribution.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://demos.site11.com/php/fpdf/tutorial/&quot;&gt;&lt;b&gt;Demo&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/550439238903625233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2014/01/create-pdf-with-fpdf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/550439238903625233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/550439238903625233'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2014/01/create-pdf-with-fpdf.html' title='Create PDF with fpdf'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-YTUcfUUjHyc/VAsfdSuz5mI/AAAAAAAABIA/GFaPFLIKRwU/s72-c/fpdf.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-4009128763250260795</id><published>2013-12-21T05:44:00.000-08:00</published><updated>2014-09-06T07:55:00.735-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="excel"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Generate Excel Data in PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-EH-G3vqiobE/VAsf67x5GcI/AAAAAAAABII/wpdoPjy_GyU/s1600/excel1.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Create Excel&quot; border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-EH-G3vqiobE/VAsf67x5GcI/AAAAAAAABII/wpdoPjy_GyU/s1600/excel1.gif&quot; height=&quot;252&quot; title=&quot;Create Excel&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Create Excel&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-php&quot;&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;header(&quot;Content-Type: application/xls&quot;);&lt;br /&gt;&lt;br /&gt;header(&quot;Content-disposition: attachment; filename=data.xls&quot;);&lt;br /&gt;&lt;br /&gt;echo &#39;Id&#39; . &quot;\t&quot; . &#39;Item&#39; . &quot;\t&quot; . &#39;Qty&#39; . &quot;\n&quot;;&lt;br /&gt;&lt;br /&gt;echo &#39;001&#39; . &quot;\t&quot; . &#39;Compaq 610 laptop&#39; . &quot;\t&quot; . &#39;02&#39; . &quot;\n&quot;;&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/4009128763250260795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2013/12/generate-excel-data-in-php.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/4009128763250260795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/4009128763250260795'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2013/12/generate-excel-data-in-php.html' title='Generate Excel Data in PHP'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-EH-G3vqiobE/VAsf67x5GcI/AAAAAAAABII/wpdoPjy_GyU/s72-c/excel1.gif" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-8801641560388417493</id><published>2013-11-23T15:00:00.000-08:00</published><updated>2014-09-06T07:59:02.922-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="flicker"/><category scheme="http://www.blogger.com/atom/ns#" term="Image Search API"/><category scheme="http://www.blogger.com/atom/ns#" term="javaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>Flicker Image Search API Demo</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-_CzbMg7xpjw/VAsg1i8AQJI/AAAAAAAABIU/1wk0X4KEMzo/s1600/flicker.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Flicker API&quot; border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-_CzbMg7xpjw/VAsg1i8AQJI/AAAAAAAABIU/1wk0X4KEMzo/s1600/flicker.jpg&quot; title=&quot;Flicker API&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Flicker API&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script src=&quot;http://code.jquery.com/jquery-latest.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;title&amp;gt;Flicker Image Search API Demo&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;Search for &amp;lt;b&amp;gt;girls, dogs, cakes&amp;lt;/b&amp;gt; ...etc)&lt;br /&gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input id=&quot;searchterm&quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;button id=&quot;search&quot;&amp;gt;search&amp;lt;/button&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id=&quot;results&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;&lt;br /&gt;$(&quot;#search&quot;).click(function(){&lt;br /&gt;&lt;br /&gt;$.getJSON(&quot;http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?&quot;,&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;tags: $(&quot;#searchterm&quot;).val(),&lt;br /&gt;&lt;br /&gt;format: &quot;json&quot;&lt;br /&gt;&lt;br /&gt;},&lt;br /&gt;&lt;br /&gt;function(data) {&lt;br /&gt;&lt;br /&gt;$.each(data.items, function(i,item){&lt;br /&gt;&lt;br /&gt;$(&quot;&amp;lt;img/&amp;gt;&quot;).attr(&quot;src&quot;, item.media.m).prependTo(&quot;#results&quot;);&lt;br /&gt;&lt;br /&gt;if ( i == 10 ) return false;&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/8801641560388417493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2013/11/flicker-image-search-api-demo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/8801641560388417493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/8801641560388417493'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2013/11/flicker-image-search-api-demo.html' title='Flicker Image Search API Demo'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-_CzbMg7xpjw/VAsg1i8AQJI/AAAAAAAABIU/1wk0X4KEMzo/s72-c/flicker.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-9136279975686501550</id><published>2013-11-09T06:45:00.000-08:00</published><updated>2014-09-08T02:15:37.515-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="j2ee"/><category scheme="http://www.blogger.com/atom/ns#" term="jsp"/><category scheme="http://www.blogger.com/atom/ns#" term="session bean"/><title type='text'>How to access Session Bean from JSP in GlassFish</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-kL54lXXYf8Y/VA1zPnVV_uI/AAAAAAAABIo/u02PzlfONEY/s1600/java-ee-container.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-kL54lXXYf8Y/VA1zPnVV_uI/AAAAAAAABIo/u02PzlfONEY/s1600/java-ee-container.png&quot; height=&quot;181&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;Using Session Bean in JSP differs from the usage in servlets. We can inject session bean in servlets or in another session bean. But in JSP we can not use EJB in the same way. Most common approach would be a JNDI lookup to&amp;nbsp; find the required bean.&lt;br /&gt;&lt;br /&gt;First add a reference in deployment descriptor to the session bean.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;ejb-local-ref&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;ejb-ref-name&amp;gt;AccountTypeFacadeRef&amp;lt;/ejb-ref-name&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;ejb-ref-type&amp;gt;Session&amp;lt;/ejb-ref-type&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;local&amp;gt;com.my.ejb.AccountTypeFacade&amp;lt;/local&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;ejb-link&amp;gt;BankApp-ejb.jar#AccountTypeFacade&amp;lt;/ejb-link&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/ejb-local-ref&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;is optional.&lt;br /&gt;&lt;br /&gt;In JSP use JNDI lookup to find the resource.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%&lt;br /&gt;&lt;br /&gt;String prefix = &quot;java:comp/env/&quot;;&lt;br /&gt;&lt;br /&gt;String ejbRefName = &quot;AccountTypeFacadeRef&quot;;&lt;br /&gt;&lt;br /&gt;String jndiUrl = prefix + ejbRefName;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;javax.naming.Context ctx = new javax.naming.InitialContext();&lt;br /&gt;&lt;br /&gt;AccountTypeFacade atf = ( AccountTypeFacade ) ctx.lookup( jndiUrl );&lt;br /&gt;&lt;br /&gt;List&amp;lt;AccountType&amp;gt; accountTypeList = atf.findAll();&lt;br /&gt;&lt;br /&gt;%&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/9136279975686501550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2013/11/how-to-access-session-bean-from-jsp-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/9136279975686501550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/9136279975686501550'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2013/11/how-to-access-session-bean-from-jsp-in.html' title='How to access Session Bean from JSP in GlassFish'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-kL54lXXYf8Y/VA1zPnVV_uI/AAAAAAAABIo/u02PzlfONEY/s72-c/java-ee-container.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-3495044621211373127</id><published>2013-10-30T15:40:00.000-07:00</published><updated>2014-09-08T02:20:28.036-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="swing"/><title type='text'>Swing File Chooser Demo</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-vZx8_xoAD3I/VA10LBpI99I/AAAAAAAABIw/MxHVbqOeNjs/s1600/swing-file-chooser.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-vZx8_xoAD3I/VA10LBpI99I/AAAAAAAABIw/MxHVbqOeNjs/s1600/swing-file-chooser.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-java&quot;&gt;&lt;code&gt;&lt;br /&gt;package main;&lt;br /&gt;&lt;br /&gt;import java.awt.BorderLayout;&lt;br /&gt;import java.awt.Insets;&lt;br /&gt;import java.awt.event.ActionEvent;&lt;br /&gt;import java.awt.event.ActionListener;&lt;br /&gt;import java.io.File;&lt;br /&gt;import javax.swing.JButton;&lt;br /&gt;import javax.swing.JComponent;&lt;br /&gt;import javax.swing.JDialog;&lt;br /&gt;import javax.swing.JFileChooser;&lt;br /&gt;import javax.swing.JFrame;&lt;br /&gt;import javax.swing.JPanel;&lt;br /&gt;import javax.swing.JScrollPane;&lt;br /&gt;import javax.swing.JTextArea;&lt;br /&gt;&lt;br /&gt;public class SwingFileChooser extends JPanel implements ActionListener{&lt;br /&gt;private static final String newLine = &amp;quot;\n&amp;quot;;&lt;br /&gt;private JButton openButton,saveButton;&lt;br /&gt;private JTextArea log;&lt;br /&gt;private JFileChooser fc;&lt;br /&gt;&lt;br /&gt;public SwingFileChooser(){&lt;br /&gt;super(new BorderLayout());&lt;br /&gt;initComponents();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void initComponents(){&lt;br /&gt;log = new JTextArea();&lt;br /&gt;log.setMargin(new Insets(5, 5, 5, 5));&lt;br /&gt;log.setEditable(false);&lt;br /&gt;JScrollPane jsp = new JScrollPane(log);&lt;br /&gt;fc = new JFileChooser();&lt;br /&gt;fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);&lt;br /&gt;openButton = new JButton(&amp;quot;Open File&amp;quot;);&lt;br /&gt;openButton.addActionListener(this);&lt;br /&gt;saveButton = new JButton(&amp;quot;Save File&amp;quot;);&lt;br /&gt;saveButton.addActionListener(this);&lt;br /&gt;JPanel buttonPanel = new JPanel();&lt;br /&gt;buttonPanel.add(openButton);&lt;br /&gt;buttonPanel.add(saveButton);&lt;br /&gt;add(buttonPanel,BorderLayout.NORTH);&lt;br /&gt;add(jsp,BorderLayout.CENTER);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@Override&lt;br /&gt;public void actionPerformed(ActionEvent e) {&lt;br /&gt;if(e.getSource() == openButton){&lt;br /&gt;int returnVal = fc.showOpenDialog(this);&lt;br /&gt;if(returnVal == JFileChooser.APPROVE_OPTION){&lt;br /&gt;File file = fc.getSelectedFile();&lt;br /&gt;log.append(&amp;quot;Opening &amp;quot; + file.getName() + newLine);&lt;br /&gt;}else{&lt;br /&gt;log.append(&amp;quot;cancelled file opening&amp;quot; + newLine);&lt;br /&gt;}&lt;br /&gt;log.setCaretPosition(log.getDocument().getLength());&lt;br /&gt;&lt;br /&gt;}else if(e.getSource() == saveButton){&lt;br /&gt;int returnVal = fc.showSaveDialog(this);&lt;br /&gt;if(returnVal == JFileChooser.APPROVE_OPTION){&lt;br /&gt;File file = fc.getSelectedFile();&lt;br /&gt;log.append(&amp;quot;Saving &amp;quot; + file.getName() + newLine);&lt;br /&gt;}else{&lt;br /&gt;log.append(&amp;quot;cancelled file saving&amp;quot; + newLine);&lt;br /&gt;}&lt;br /&gt;log.setCaretPosition(log.getDocument().getLength());&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private static void createGUI(){&lt;br /&gt;JFrame.setDefaultLookAndFeelDecorated(true);&lt;br /&gt;JDialog.setDefaultLookAndFeelDecorated(true);&lt;br /&gt;JFrame frame = new JFrame(&amp;quot;SwingFileChooser&amp;quot;);&lt;br /&gt;frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);&lt;br /&gt;&lt;br /&gt;JComponent newContentPane = new SwingFileChooser();&lt;br /&gt;newContentPane.setOpaque(true);&lt;br /&gt;frame.setContentPane(newContentPane);&lt;br /&gt;frame.pack();&lt;br /&gt;frame.setVisible(true);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void main(String[] args) {&lt;br /&gt;javax.swing.SwingUtilities.invokeLater(new Runnable() {&lt;br /&gt;&lt;br /&gt;@Override&lt;br /&gt;public void run() {&lt;br /&gt;createGUI();&lt;br /&gt;}&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/3495044621211373127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2013/10/swing-file-chooser-demo.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/3495044621211373127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/3495044621211373127'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2013/10/swing-file-chooser-demo.html' title='Swing File Chooser Demo'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-vZx8_xoAD3I/VA10LBpI99I/AAAAAAAABIw/MxHVbqOeNjs/s72-c/swing-file-chooser.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-3885910539643100272</id><published>2013-10-25T15:21:00.000-07:00</published><updated>2014-09-08T02:24:16.879-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Geo Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="MapServer"/><category scheme="http://www.blogger.com/atom/ns#" term="openlayers"/><category scheme="http://www.blogger.com/atom/ns#" term="pgrouting"/><category scheme="http://www.blogger.com/atom/ns#" term="postGIS"/><title type='text'>MapServer + PostGIS + pgRouting + OpenLayers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-uLuV0OtsSmQ/VA11jOmM47I/AAAAAAAABI4/AQ3xkXfzWGM/s1600/MapServer%2B%2B%2BPostGIS%2B%2B%2BpgRouting%2B%2B%2BOpenLayers.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;MapServer + PostGIS + pgRouting + OpenLayers&quot; border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-uLuV0OtsSmQ/VA11jOmM47I/AAAAAAAABI4/AQ3xkXfzWGM/s320/MapServer%2B%2B%2BPostGIS%2B%2B%2BpgRouting%2B%2B%2BOpenLayers.jpg&quot; title=&quot;MapServer + PostGIS + pgRouting + OpenLayers&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;MapServer + PostGIS + pgRouting + OpenLayers&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height=&quot;350&quot; width=&quot;425&quot;&gt;&lt;br/&gt;      &lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/CaIK_Ge5BM8&quot;&gt;&lt;br/&gt;      &lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;br/&gt;      &lt;embed src=&quot;http://www.youtube.com/v/CaIK_Ge5BM8;rel=0&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; height=&quot;350&quot; width=&quot;425&quot;&gt;&lt;br/&gt;      &lt;/object&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/3885910539643100272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2013/10/mapserver-postgis-pgrouting-openlayers.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/3885910539643100272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/3885910539643100272'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2013/10/mapserver-postgis-pgrouting-openlayers.html' title='MapServer + PostGIS + pgRouting + OpenLayers'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-uLuV0OtsSmQ/VA11jOmM47I/AAAAAAAABI4/AQ3xkXfzWGM/s72-c/MapServer%2B%2B%2BPostGIS%2B%2B%2BpgRouting%2B%2B%2BOpenLayers.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-6705000948721622450</id><published>2013-10-07T04:06:00.000-07:00</published><updated>2014-09-08T02:29:52.719-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="directions"/><category scheme="http://www.blogger.com/atom/ns#" term="javaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="YOURS API"/><title type='text'>OpenSource Directions API Demo - YOURS Navigation API</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-LQ_BT10QuVQ/VA117008wsI/AAAAAAAABJA/qjxE-hmaDoI/s1600/yours-api.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-LQ_BT10QuVQ/VA117008wsI/AAAAAAAABJA/qjxE-hmaDoI/s1600/yours-api.jpg&quot; height=&quot;175&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In this tutorial, I &#39;ll introduce you to &lt;a href=&quot;http://wiki.openstreetmap.org/wiki/YOURS&quot; target=&quot;_blank&quot;&gt;YOURS&lt;/a&gt;, an OpenSource directions API. There are few OpenSource directions APIs available such as MapQuest, GeoSmart, &lt;a href=&quot;http://wiki.openstreetmap.org/wiki/Nominatim&quot; target=&quot;_blank&quot;&gt;&lt;i&gt;Nominatim&lt;/i&gt;&lt;/a&gt; in addition to YOURS. However in my opinion, YOURS is the best and a good alternative to Google Directions which is the most popular Directions provider obviously.&lt;br /&gt;&lt;br /&gt;The flexibility of usage has given more power in YOURS over other APIs in the same family. MapQuest is nice but it is not working for many geographical locations of the world other than North America and Europe. Nominatim is poor in its functional level and has less support for geographical diversity.&lt;br /&gt;&lt;br /&gt;According to YOURS doucmentation, the API provide following features.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Generate fastest or shortest routes in different modes:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;using all available roads for Car, Bicycle and Pedestrians .&lt;/li&gt;&lt;br /&gt;&lt;li&gt;using only national, regional or local cycle routes/networks for Bicycle.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Unlimited via points (waypoints) to make complex routes.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Drag and drop waypoints moving.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Drag and drop waypoint ordering.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Geolocation: Lookup street- and placenames to determine their coordinates.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Reverse geolocation: Lookup coordinates to determing their street- and placenames.You can read other features in doucmentation.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h4&gt;&lt;b&gt;Example URL&lt;/b&gt;&lt;/h4&gt;&lt;br /&gt;&lt;code&gt;&lt;a href=&quot;http://www.yournavigation.org/api/1.0/gosmore.php?format=kml&amp;amp;flat=52.215676&amp;amp;flon=5.963946&amp;amp;tlat=52.2573&amp;amp;tlon=6.1799&amp;amp;v=motorcar&amp;amp;fast=1&amp;amp;layer=mapnik&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.yournavigation.org/api/1.0/gosmore.php?format=kml&amp;amp;flat=52.215676&amp;amp;flon=5.963946&amp;amp;tlat=52.2573&amp;amp;tlon=6.1799&amp;amp;v=motorcar&amp;amp;fast=1&amp;amp;layer=mapnik&lt;/a&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This tutorial provides sample code for accessing the API in JavaScript. As JavaScript does not allow&amp;nbsp; cross domain requests we &#39;re using a proxy which accepts requests from client, forward it to the API and send back server response. The proxy is written in PHP using CURL which is more safe than file_get_contents() and similar content loading functions.&lt;br /&gt;&lt;br /&gt;We are using OpenLayers map with a vector layer which is going get features from server response. The route is drawn on map using vector data.&lt;br /&gt;&lt;br /&gt;The API also provides travelling time, distance and turn by turn directions.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://demos.site11.com/geo/yours-api-client.html&quot;&gt;&lt;b&gt;Demo&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;client.html&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;    &amp;lt;head&amp;gt;&lt;br /&gt;        &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;meta name=&amp;quot;description&amp;quot; content=&amp;quot;OpenSource Directions API Demo - YOURS Navigation API&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;title&amp;gt;OpenSource Directions API Demo&amp;lt;/title&amp;gt;&lt;br /&gt;        &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;http://demos.site11.com/assets/css/style.css&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;script src=&amp;quot;http://code.jquery.com/jquery-1.9.1.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;        &amp;lt;script src=&amp;quot;http://openlayers.org/api/OpenLayers.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;            var lon = 0;&lt;br /&gt;            var lat = 0;&lt;br /&gt;            var zoom = 0;&lt;br /&gt;&lt;br /&gt;            var wgs84 = new OpenLayers.Projection(&amp;quot;EPSG:4326&amp;quot;);&lt;br /&gt;            var mercator = new OpenLayers.Projection(&amp;quot;EPSG:900913&amp;quot;);&lt;br /&gt;&lt;br /&gt;            $(document).ready(function(){&lt;br /&gt;                layer = new OpenLayers.Layer.OSM(&amp;quot;OSM&amp;quot;);&lt;br /&gt;                geojson_layer = new OpenLayers.Layer.Vector(&amp;quot;GeoJSON&amp;quot;, {&lt;br /&gt;                    styleMap: new OpenLayers.StyleMap({&lt;br /&gt;                        strokeColor: &amp;quot;#F00&amp;quot;,&lt;br /&gt;                        projection: mercator&lt;br /&gt;                    }),&lt;br /&gt;                    strategies: [new OpenLayers.Strategy.Fixed()],&lt;br /&gt;                    protocol: new OpenLayers.Protocol.HTTP({&lt;br /&gt;                        url: &#39;proxy.php?flat=6.9344&amp;amp;flon=79.8428&amp;amp;tlat=7.2844590&amp;amp;tlon=80.637459&amp;amp;v=motorcar&amp;amp;fast=1&amp;amp;layer=mapnik&#39;,&lt;br /&gt;                        format: new OpenLayers.Format.GeoJSON()&lt;br /&gt;&lt;br /&gt;                    })&lt;br /&gt;                });&lt;br /&gt;&lt;br /&gt;                var options = {&lt;br /&gt;                    div : &amp;quot;map&amp;quot;,&lt;br /&gt;                    projection : wgs84,&lt;br /&gt;                    units: &amp;quot;dd&amp;quot;,&lt;br /&gt;                    numZoomLevels : 7&lt;br /&gt;                };&lt;br /&gt;                var map = new OpenLayers.Map(options);&lt;br /&gt;&lt;br /&gt;                map.addLayers([layer,geojson_layer]);&lt;br /&gt;                map.setCenter(new OpenLayers.LonLat(79.8428, 6.9344).transform(wgs84,mercator), 12);&lt;br /&gt;&lt;br /&gt;                //Get Directions&lt;br /&gt;                $.ajax({&lt;br /&gt;                    type: &#39;GET&#39;,&lt;br /&gt;&lt;br /&gt;                    dataType: &#39;json&#39;,&lt;br /&gt;                    url: &#39;proxy.php?flat=6.9344&amp;amp;flon=79.8428&amp;amp;tlat=7.2844590&amp;amp;tlon=80.637459&amp;amp;v=motorcar&amp;amp;fast=1&amp;amp;layer=mapnik&#39;,&lt;br /&gt;                    cache: false,&lt;br /&gt;                    success: function(response){&lt;br /&gt;                        $(&amp;quot;#travel_time&amp;quot;).html(response.properties.traveltime);&lt;br /&gt;                        $(&amp;quot;#distance&amp;quot;).html(response.properties.distance + &#39; miles&#39;);&lt;br /&gt;                        $(&amp;quot;#directions&amp;quot;).html(response.properties.description);&lt;br /&gt;                    },error: function(){&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;                });&lt;br /&gt;&lt;br /&gt;            });&lt;br /&gt;&lt;br /&gt;        &amp;lt;/script&amp;gt;&lt;br /&gt;        &amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;&lt;br /&gt;            #map{&lt;br /&gt;                width: 800px;&lt;br /&gt;                height: 400px;&lt;br /&gt;                border: 2px solid black;&lt;br /&gt;                padding:0;&lt;br /&gt;                margin:0;&lt;br /&gt;            }&lt;br /&gt;        &amp;lt;/style&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=&amp;quot;map&amp;quot; style=&amp;quot;width: 700px; height: 300px;margin-bottom : 50px;&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;                    &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Travel Time&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;div id=&amp;quot;travel_time&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;                    &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Distance&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;div id=&amp;quot;distance&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;                    &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Directions&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;div id=&amp;quot;directions&amp;quot;&amp;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;/code&gt;&lt;/pre&gt; &lt;b&gt;Proxy.php&lt;/b&gt; &lt;pre class=&quot;language-php&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;$flat = $_GET[&#39;flat&#39;];&lt;br /&gt;$flon = $_GET[&#39;flon&#39;];&lt;br /&gt;$tlat = $_GET[&#39;tlat&#39;];&lt;br /&gt;$tlon = $_GET[&#39;tlon&#39;];&lt;br /&gt;$v = $_GET[&#39;v&#39;];&lt;br /&gt;$fast = $_GET[&#39;fast&#39;];&lt;br /&gt;$layer = $_GET[&#39;layer&#39;];&lt;br /&gt;&lt;br /&gt;$myURL = &amp;quot;http://www.yournavigation.org/api/1.0/gosmore.php?format=geojson&amp;amp;instructions=1&amp;amp;flat=&amp;quot;.$flat.&amp;quot;&amp;amp;flon=&amp;quot;.$flon.&amp;quot;&amp;amp;tlat=&amp;quot;.$tlat.&amp;quot;&amp;amp;tlon=&amp;quot;.$tlon.&amp;quot;&amp;amp;v=&amp;quot;.$v.&amp;quot;&amp;amp;fast=&amp;quot;.$fast.&amp;quot;&amp;amp;layer=&amp;quot;.$layer;&lt;br /&gt;$curl = curl_init();&lt;br /&gt;&lt;br /&gt;curl_setopt_array($curl, array(&lt;br /&gt;CURLOPT_RETURNTRANSFER =&amp;gt; 1,&lt;br /&gt;CURLOPT_URL =&amp;gt; $myURL&lt;br /&gt;&lt;br /&gt;));&lt;br /&gt;&lt;br /&gt;$resp = curl_exec($curl);&lt;br /&gt;curl_close($curl);&lt;br /&gt;echo $resp;&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/6705000948721622450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2013/10/opensource-directions-api-demo-yours.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/6705000948721622450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/6705000948721622450'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2013/10/opensource-directions-api-demo-yours.html' title='OpenSource Directions API Demo - YOURS Navigation API'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-LQ_BT10QuVQ/VA117008wsI/AAAAAAAABJA/qjxE-hmaDoI/s72-c/yours-api.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-7610418436281395301</id><published>2013-10-05T03:47:00.000-07:00</published><updated>2014-09-20T22:13:15.164-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="javaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="localStorage"/><title type='text'>How to store an array in localStorage</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-ey7CncbEvSA/VB5cuQSKvxI/AAAAAAAABKU/zwoTRv_IVfA/s1600/html5storage.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;HTML5 LocalStorage&quot; border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-ey7CncbEvSA/VB5cuQSKvxI/AAAAAAAABKU/zwoTRv_IVfA/s1600/html5storage.jpg&quot; height=&quot;271&quot; title=&quot;HTML5 LocalStorage&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;HTML5 LocalStorage&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;This tutorial assumes that you are already familiar with&amp;nbsp;HTML5 &amp;nbsp;localStorage.&lt;br /&gt;&lt;br /&gt;Although HTML5 &amp;nbsp;localStorage is very useful, its usage is restricted to key value mechanism. Key and value is stored in string format despite what we need. For an instance, though you can specify a boolean type (either true or false) as the value, it is stored as a string.&lt;br /&gt;&lt;br /&gt;What if we need to store multiple items as the value for a certain key. This can be little bit tricky if you gonna place an array directly as the value. When we scratch the surface of localStorage basic principles this is not possible. However you can come up with your own solutions that might work for you.&lt;br /&gt;&lt;br /&gt;This tutorial demonstrates a simple way of handling above problem using json. We gonna store array as a json string. So nothing new here.&lt;br /&gt;&lt;br /&gt;First add jQuery library as we are using some jQuery functions.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt; var favorites_str = localStorage.getItem(&#39;my_favorites&#39;);&lt;br /&gt; if(favorites_str == null) {&lt;br /&gt; favorites = [];&lt;br /&gt; favorites.push({ &amp;quot;name&amp;quot;:&amp;quot;keshi&amp;quot;, &amp;quot;id&amp;quot;:&amp;quot;6&amp;quot; });&lt;br /&gt; } else{&lt;br /&gt; favorites = JSON.parse(favorites_str);&lt;br /&gt; favorites.push({ &amp;quot;name&amp;quot;:&amp;quot;sara&amp;quot;, &amp;quot;id&amp;quot;:&amp;quot;6&amp;quot; });&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; localStorage.setItem(&#39;my_favorites&#39;,JSON.stringify(favorites));&lt;br /&gt; &amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; &lt;br /&gt;To verify that above script is functioning please copy and run below script. It will make things easy, if you put this code in &amp;nbsp;a separate file.&lt;br /&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt; var data = localStorage.getItem(&#39;my_favorites&#39;);&lt;br /&gt; if(data == null){&lt;br /&gt; alert(&amp;quot;0 favorites&amp;quot;);&lt;br /&gt; }else{&lt;br /&gt; favorites = JSON.parse(data);&lt;br /&gt; $.each(favorites, function(index,item){&lt;br /&gt; alert(item.name);&lt;br /&gt; &lt;br /&gt;});&lt;br /&gt; }&lt;br /&gt; &amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/7610418436281395301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2013/10/how-to-store-array-in-localstorage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/7610418436281395301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/7610418436281395301'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2013/10/how-to-store-array-in-localstorage.html' title='How to store an array in localStorage'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-ey7CncbEvSA/VB5cuQSKvxI/AAAAAAAABKU/zwoTRv_IVfA/s72-c/html5storage.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-4951454476668085110</id><published>2013-10-01T10:48:00.000-07:00</published><updated>2014-09-20T22:16:38.914-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JpGraph"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="php graphs"/><title type='text'>OpenSource PHP Graph libraries</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-l0Lvigc6L8g/VB5fEgWAfcI/AAAAAAAABKk/GS5ZG0JxXTg/s1600/bar-chart-jpgraph.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;PHP Graphs&quot; border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-l0Lvigc6L8g/VB5fEgWAfcI/AAAAAAAABKk/GS5ZG0JxXTg/s1600/bar-chart-jpgraph.png&quot; height=&quot;136&quot; title=&quot;PHP Graphs&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;PHP Graphs&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;There are so many PHP graph projects which you can find on internet. At the time of writing this post, JpGraph, phpgraphlib and pChart should appear in top Google search results. In my experience, phpgraphlib is developer-friendly and easy to use whereas JpGraph is more robust than others. pChart seems to be little bit outdated though they have updated their project.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://jpgraph.net/features/gallery.php&quot;&gt;JpGraph&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.ebrueggeman.com/phpgraphlib/examples&quot;&gt;phpgraphlib&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/4951454476668085110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2013/10/opensource-php-graph-libraries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/4951454476668085110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/4951454476668085110'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2013/10/opensource-php-graph-libraries.html' title='OpenSource PHP Graph libraries'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-l0Lvigc6L8g/VB5fEgWAfcI/AAAAAAAABKk/GS5ZG0JxXTg/s72-c/bar-chart-jpgraph.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-4178412576173489019</id><published>2013-09-29T10:52:00.000-07:00</published><updated>2014-09-20T22:20:45.096-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="jFreeChart"/><title type='text'>Create Charts with jFreeChart</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-GHng9n8NZEE/VB5fgasIx4I/AAAAAAAABKs/xMOlFEB0ASM/s1600/jfreechart.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-GHng9n8NZEE/VB5fgasIx4I/AAAAAAAABKs/xMOlFEB0ASM/s1600/jfreechart.jpg&quot; height=&quot;320&quot; width=&quot;319&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This tutorial is all about creating graphs. There are several tools for generating graphs without any hassle. Programming a graph from scratch might little be&amp;nbsp; tricky as it also deals with some graphics. Using a tool or library reduces the development time a lot. So we gonna use an OpenSource chart tool named jFreeChart for Java development.&lt;br /&gt;&lt;br /&gt;Creating a graph with jFreeChart is just a matter of entering the required graph data and a little piece of code. Therefore, as the CodeZone4 norm I just go ahead with a 3D bar graph implementation using jFreeChart.&lt;br /&gt;&lt;br /&gt;You can find source code for other types of graph on the internet.&lt;br /&gt;&lt;br /&gt;First download required JARs from &lt;a href=&quot;http://www.jfree.org/jfreechart/download.html&quot;&gt;jFreeChart &lt;/a&gt;and add them in your project&#39;s classpath.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-java&quot;&gt;&lt;code&gt;&lt;br /&gt;import org.jfree.chart.*;&lt;br /&gt;import org.jfree.data.category.*;&lt;br /&gt;import org.jfree.data.general.DefaultPieDataset;&lt;br /&gt;import org.jfree.data.xy.*;&lt;br /&gt;import org.jfree.data.*;&lt;br /&gt;import org.jfree.chart.renderer.category.*;&lt;br /&gt;import org.jfree.chart.plot.*;&lt;br /&gt;import java.awt.*;&lt;br /&gt;&lt;br /&gt;public class Main {&lt;br /&gt;&lt;br /&gt;public static void main(String[] args) {&lt;br /&gt;DefaultCategoryDataset dataset = new DefaultCategoryDataset();&lt;br /&gt;dataset.setValue(3780, &amp;quot;A&amp;quot;, &amp;quot;2008&amp;quot;);&lt;br /&gt;dataset.setValue(5000, &amp;quot;B&amp;quot;, &amp;quot;2008&amp;quot;);&lt;br /&gt;dataset.setValue(6500, &amp;quot;A&amp;quot;, &amp;quot;2009&amp;quot;);&lt;br /&gt;dataset.setValue(6000, &amp;quot;B&amp;quot;, &amp;quot;2009&amp;quot;);&lt;br /&gt;dataset.setValue(9000, &amp;quot;A&amp;quot;, &amp;quot;2010&amp;quot;);&lt;br /&gt;dataset.setValue(10000, &amp;quot;B&amp;quot;, &amp;quot;2010&amp;quot;);&lt;br /&gt;JFreeChart chart = ChartFactory.createBarChart3D(&amp;quot;Annual Income Analysis&amp;quot;, &amp;quot;Year&amp;quot;, &amp;quot;Income&amp;quot;,&lt;br /&gt;dataset, PlotOrientation.VERTICAL, true, true, false);&lt;br /&gt;chart.setBackgroundPaint(Color.yellow);&lt;br /&gt;chart.getTitle().setPaint(Color.blue);&lt;br /&gt;CategoryPlot p = chart.getCategoryPlot();&lt;br /&gt;p.setRangeGridlinePaint(Color.red);&lt;br /&gt;ChartFrame frame1 = new ChartFrame(&amp;quot;Income Data&amp;quot;, chart);&lt;br /&gt;frame1.setVisible(true);&lt;br /&gt;frame1.setSize(300, 300);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/4178412576173489019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2013/09/create-charts-with-jfreechart.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/4178412576173489019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/4178412576173489019'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2013/09/create-charts-with-jfreechart.html' title='Create Charts with jFreeChart'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-GHng9n8NZEE/VB5fgasIx4I/AAAAAAAABKs/xMOlFEB0ASM/s72-c/jfreechart.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9217060024670477726.post-9169561905678962929</id><published>2013-09-15T15:19:00.000-07:00</published><updated>2014-09-20T22:24:26.865-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Miscellaneous"/><category scheme="http://www.blogger.com/atom/ns#" term="voicexml"/><title type='text'>Develop Voice Applications with VoiceXML</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-LpOeiFoFLG8/VB5gm42ijNI/AAAAAAAABK4/sdCibl2yZRg/s1600/voice-xml1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;voice xml&quot; border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-LpOeiFoFLG8/VB5gm42ijNI/AAAAAAAABK4/sdCibl2yZRg/s1600/voice-xml1.jpg&quot; height=&quot;167&quot; title=&quot;voice xml&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;voice xml&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;a href=&quot;http://codezone4.files.wordpress.com/2013/09/voice-xml1.jpg&quot;&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Web pages consist of HTML that is rendered into a visible page by a Web browser. Similarly, a voice application consists of XML (VoiceXML, CCXML, or CallXML) which becomes an interactive voice application when processed by the Voxeo Corporation VoiceCenter network. All you need to do is write the application&#39;s XML, map it to a phone number in the Voxeo Application Manager, and give it a call.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://evolution.voxeo.com/&quot; target=&quot;_blank&quot;&gt;https://evolution.voxeo.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Sample vxml file&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;vxml version=&amp;quot;2.0&amp;quot; xmlns=&amp;quot;http://www.w3.org/2001/vxml&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form id=&amp;quot;login&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;field name=&amp;quot;phone_number&amp;quot; type=&amp;quot;phone&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;prompt&amp;gt;Please say your complete phone number&amp;lt;/prompt&amp;gt;&lt;br /&gt;&amp;lt;/field&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;field name=&amp;quot;pin_code&amp;quot; type=&amp;quot;digits&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;prompt&amp;gt;Please say your PIN code&amp;lt;/prompt&amp;gt;&lt;br /&gt;&amp;lt;/field&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;block&amp;gt;&lt;br /&gt;&amp;lt;submit next=&amp;quot;http://www.example.com/servlet/login&amp;quot;&lt;br /&gt;namelist=&amp;quot;phone_number pin_code&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/block&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/vxml&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href=&quot;http://www.w3.org/Voice/Guide/&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;Getting started with VoiceXML 2.0&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codezone4.blogspot.com/feeds/9169561905678962929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codezone4.blogspot.com/2013/09/develop-voice-applications-with-voicexml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/9169561905678962929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9217060024670477726/posts/default/9169561905678962929'/><link rel='alternate' type='text/html' href='http://codezone4.blogspot.com/2013/09/develop-voice-applications-with-voicexml.html' title='Develop Voice Applications with VoiceXML'/><author><name>Rajitha</name><uri>http://www.blogger.com/profile/08338797615365947207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-LpOeiFoFLG8/VB5gm42ijNI/AAAAAAAABK4/sdCibl2yZRg/s72-c/voice-xml1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>