<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Leoganda.net</title>
	<atom:link href="http://www.leoganda.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leoganda.net</link>
	<description></description>
	<lastBuildDate>Thu, 22 Nov 2012 18:06:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Installing XBMC for Raspbian</title>
		<link>http://www.leoganda.net/installing-xbmc-for-raspbian/</link>
		<comments>http://www.leoganda.net/installing-xbmc-for-raspbian/#comments</comments>
		<pubDate>Thu, 22 Nov 2012 17:42:47 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Raspberry]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[XBMC]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=190</guid>
		<description><![CDATA[I bought Raspberry a month ago and I had so many research plans for this device. One of my idea is to make my old TV become complete media center solution. After googling some references I found that XBMC could help me! Installing XBMC for Raspbian is really straight forward. 1. First add repository for [...]]]></description>
				<content:encoded><![CDATA[<p>I bought <a href="http://www.raspberrypi.org/">Raspberry</a> a month ago and I had so many research plans for this device. One of my idea is to make my old TV become complete media center solution. After googling some references I found that <a href="http://xbmc.org/">XBMC</a> could help me!</p>
<p>Installing XBMC for Raspbian is really straight forward.</p>
<p>1. First add repository for the <a href="http://www.deb-multimedia.org/">XBMC binaries</a>, type this on your console :</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;deb http://www.deb-multimedia.org wheezy main non-free&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list</pre></td></tr></table></div>

<p>2. Get the GPG key for this repository</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.deb-multimedia.org<span style="color: #000000; font-weight: bold;">/</span>pool<span style="color: #000000; font-weight: bold;">/</span>main<span style="color: #000000; font-weight: bold;">/</span>d<span style="color: #000000; font-weight: bold;">/</span>deb-multimedia-keyring<span style="color: #000000; font-weight: bold;">/</span>deb-multimedia-keyring_2012.05.05_all.deb</pre></td></tr></table></div>

<p>3. Install the GPG key you just download</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-i</span> deb-multimedia-keyring_2012.05.05_all.deb</pre></td></tr></table></div>

<p>4. Update your package list</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> udpate</pre></td></tr></table></div>

<p>5. Install XBMC</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> xbmc</pre></td></tr></table></div>

<p>Follow the instructions on your console.</p>
<p>6. Start XBMC<br />
Type &#8220;xbmc&#8221; on your console to start XBMC</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">xbmc</pre></td></tr></table></div>

<p>Here&#8217;s the screen of XBMC<br />
<img src="http://xbmc.org/wp-content/uploads/2012/11/xbmc_beta_front-300x155.jpg" alt="" /><br />
I tried some features such as Podcast, Internet Radio, Youtube, Vimeo, and Web browser. Everything works normally, but the web browser need more improvement! Also I test XBMC remote control using android device, this remote control is really helpful! Another thing what I love is we can install add-ons for XBMC from the XBMC dashboard.</p>
<h4>What people search:</h4><ul><li><a href="http://www.leoganda.net/installing-xbmc-for-raspbian/" title="raspbian xbmc">raspbian xbmc</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/installing-xbmc-for-raspbian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to archive email on Outlook for Mac</title>
		<link>http://www.leoganda.net/how-to-archive-email-on-outlook-for-mac/</link>
		<comments>http://www.leoganda.net/how-to-archive-email-on-outlook-for-mac/#comments</comments>
		<pubDate>Mon, 18 Jun 2012 02:00:55 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=175</guid>
		<description><![CDATA[Since there&#8217;s no archive menu on Outlook for Mac, in order to archive our email to our local computer we can do this trick. Open Preferences->General Then un-check the tick box &#8220;Hide On My Computer folders&#8221;. You will see &#8220;On My Computer&#8221; under Inbox folder. To archive your email, simply select your emails then right [...]]]></description>
				<content:encoded><![CDATA[<p>Since there&#8217;s no archive menu on Outlook for Mac, in order to archive our email to our local computer we can do this trick.<br />
Open Preferences->General<br />
Then un-check the tick box &#8220;Hide On My Computer folders&#8221;.</p>
<p>You will see &#8220;On My Computer&#8221; under Inbox folder. To archive your email, simply select your emails then right click and choose move to &#8220;On My Computer&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/how-to-archive-email-on-outlook-for-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove index.php on CodeIgniter using .htacces</title>
		<link>http://www.leoganda.net/remove-index-php-on-codeigniter-using-htacces/</link>
		<comments>http://www.leoganda.net/remove-index-php-on-codeigniter-using-htacces/#comments</comments>
		<pubDate>Thu, 07 Jun 2012 18:05:02 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[CodeIgniter]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=170</guid>
		<description><![CDATA[By default CodeIgniter framework url will includes index.php, it&#8217;s pretty easy to remove index.php from your url to work with CodeIgniter using .htaccess. I assume that your web server already enable mod_rewrite module (mostly any web hosting already enable it). Create new file .htaccess in your CodeIgniter code root (same level with index.php) as like [...]]]></description>
				<content:encoded><![CDATA[<p>By default CodeIgniter framework url will includes index.php, it&#8217;s pretty easy to remove index.php from your url to work with CodeIgniter using .htaccess.</p>
<p>I assume that your web server already enable mod_rewrite module (mostly any web hosting already enable it). Create new file .htaccess in your CodeIgniter code root (same level with index.php) as like this. </p>
<p><code>RewriteEngine on<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule .* index.php/$0 [PT,L]</code></p>
<p>Save it, and violaa&#8230; your CodeIgniter has pretty URL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/remove-index-php-on-codeigniter-using-htacces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to disable wordpress toolbar for all users</title>
		<link>http://www.leoganda.net/how-to-disable-wordpress-toolbar-for-all-users/</link>
		<comments>http://www.leoganda.net/how-to-disable-wordpress-toolbar-for-all-users/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 18:26:08 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Toolbar]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=166</guid>
		<description><![CDATA[New wordpress engine has a feature called toolbar and its shown in the top of our blog page. What ridiculous is there&#8217;s no built-in function to disable this toolbar for being shown to all our users, which mean the users have to manually disable it in their profile page. Fortunately we can use this snippet [...]]]></description>
				<content:encoded><![CDATA[<p>New wordpress engine has a feature called toolbar and its shown in the top of our blog page. What ridiculous is there&#8217;s no built-in function to disable this toolbar for being shown to all our users, which mean the users have to manually disable it in their profile page. Fortunately we can use this snippet to disable this toolbar.</p>
<p>Add this snippet to your theme functions.php file</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> my_function_admin_bar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'show_admin_bar'</span> <span style="color: #339933;">,</span> <span style="color: #0000ff;">'my_function_admin_bar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/how-to-disable-wordpress-toolbar-for-all-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to post JSON data from Android to PHP Codeigniter</title>
		<link>http://www.leoganda.net/how-to-post-json-data-from-android-to-php-codeigniter/</link>
		<comments>http://www.leoganda.net/how-to-post-json-data-from-android-to-php-codeigniter/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 10:01:21 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=160</guid>
		<description><![CDATA[JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. This article explains how to client-server web service communication using Android and PHP, we will use JSON as the data. We will build a simple calculator web service that [...]]]></description>
				<content:encoded><![CDATA[<p>JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. This article explains how to client-server web service communication using Android and PHP, we will use JSON as the data.</p>
<p>We will build a simple calculator web service that has features such as add and multiply.</p>
<p><code>apikey</code> represent key to access the webservice, the server will reject the request if the key is invalid, in this article we use &#8220;mykey123&#8243;<br />
<code>command</code> represent what command request we want to use, in this article we use &#8220;add&#8221; or &#8220;multiply&#8221;<br />
<code>a and b</code> represent input value we want to calculate<span id="more-160"></span></p>
<h3>Java Code :</h3>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;">HttpClient httpclient <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DefaultHttpClient<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
HttpPost httppost <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HttpPost<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://localhost/client/index.php/android&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">// Add your data</span>
&nbsp;
        	JSONObject json<span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> JSONObject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        	json.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;apikey&quot;</span>,<span style="color: #0000ff;">&quot;mykey123&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        	json.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;command&quot;</span>,<span style="color: #0000ff;">&quot;add&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        	json.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;a&quot;</span>,<span style="color: #0000ff;">&quot;10&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        	json.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;b&quot;</span>,<span style="color: #0000ff;">&quot;20&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        	Log.<span style="color: #006633;">d</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;JSON&quot;</span>,json.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">List</span> nameValuePairs <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">ArrayList</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            nameValuePairs.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> BasicNameValuePair<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;json&quot;</span>, json.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            httppost.<span style="color: #006633;">setEntity</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> UrlEncodedFormEntity<span style="color: #009900;">&#40;</span>nameValuePairs<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// Execute HTTP Post Request</span>
            HttpResponse response <span style="color: #339933;">=</span> httpclient.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span>httppost<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">String</span> responseBody <span style="color: #339933;">=</span> EntityUtils.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span>response.<span style="color: #006633;">getEntity</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            Log.<span style="color: #006633;">d</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;JSON&quot;</span>,<span style="color: #0000ff;">&quot;RESPONSE : &quot;</span> <span style="color: #339933;">+</span> responseBody<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span>ClientProtocolException e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        	Log.<span style="color: #006633;">e</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;JSON&quot;</span>,e.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        	Log.<span style="color: #006633;">e</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;JSON&quot;</span>,e.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span>JSONException e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                Log.<span style="color: #006633;">e</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;JSON&quot;</span>,e.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>CodeIgniter Code of Android.php Controller</h3>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'BASEPATH'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No direct script access allowed'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Android <span style="color: #000000; font-weight: bold;">extends</span> CI_Controller <span style="color: #009900;">&#123;</span>
&nbsp;
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$command</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$data</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$a</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$b</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$apikey</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$response</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> index<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">input</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #990000;">die</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #000088;">$raw</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">input</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$raw</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'json'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">apikey</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">apikey</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">command</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">command</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">a</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">a</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">b</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">b</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">apikey</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;mykey123&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
				<span style="color: #b1b100;">switch</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">command</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
					<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;add&quot;</span><span style="color: #339933;">:</span>	
							<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">response</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">a</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">b</span><span style="color: #339933;">;</span>
					<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
                                        <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;multiply&quot;</span><span style="color: #339933;">:</span>	
							<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">response</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">a</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">b</span><span style="color: #339933;">;</span>
					<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>			
				<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//end switch</span>
&nbsp;
				<span style="color: #000088;">$arr</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;command&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">command</span><span style="color: #339933;">,</span>
						<span style="color: #0000ff;">&quot;response&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">response</span>
				<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #b1b100;">echo</span> <span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$arr</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//end if</span>
			<span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;invalid request dear&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//end of index function</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//end of class Android</span></pre></td></tr></table></div>

<p>The code above will send response formated JSON data as <code>{"command":"add","response":"30"}</code></p>
<h4>What people search:</h4><ul><li><a href="http://www.leoganda.net/how-to-post-json-data-from-android-to-php-codeigniter/" title="codeigniter post android">codeigniter post android</a></li><li><a href="http://www.leoganda.net/how-to-post-json-data-from-android-to-php-codeigniter/" title="android receive json to php">android receive json to php</a></li><li><a href="http://www.leoganda.net/how-to-post-json-data-from-android-to-php-codeigniter/" title="codeigniter android post">codeigniter android post</a></li><li><a href="http://www.leoganda.net/how-to-post-json-data-from-android-to-php-codeigniter/" title="codeigniter webservice">codeigniter webservice</a></li><li><a href="http://www.leoganda.net/how-to-post-json-data-from-android-to-php-codeigniter/" title="how to bind android data with codeigniter in android">how to bind android data with codeigniter in android</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/how-to-post-json-data-from-android-to-php-codeigniter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enable PHP display_error on MAMP 2.0.5</title>
		<link>http://www.leoganda.net/enable-php-display_error-on-mamp-2-0-5/</link>
		<comments>http://www.leoganda.net/enable-php-display_error-on-mamp-2-0-5/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 04:21:40 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=158</guid>
		<description><![CDATA[By default display_error on MAMP 2.0.5 is off, in my opinion it would be useful for me to turn it on for development phase of my application. This is how to enable display_error Find MAMP directory under Application Directory Go to MAMP\bin\php\ Open PHP folder that you are using Then open \bin\conf\php.ini under your PHP [...]]]></description>
				<content:encoded><![CDATA[<p>By default display_error on MAMP 2.0.5 is off, in my opinion it would be useful for me to turn it on for development phase of my application. This is how to enable display_error</p>
<ol>
<li>Find MAMP directory under Application Directory</li>
<li>Go to MAMP\bin\php\</li>
<li>Open PHP folder that you are using</li>
<li>Then open \bin\conf\php.ini under your PHP folder</li>
<li>Find <code>error_reporting</code> line, and make sure as &#8220;<code>error_reporting = E_ALL</code>&#8220;</li>
<li>Find <code>display_errors = Off</code>, and change it to <code>display_errors = On</code></li>
<li>Save then restart your MAMP</li>
<li>Done</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/enable-php-display_error-on-mamp-2-0-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run web.py as a service in linux</title>
		<link>http://www.leoganda.net/run-web-py-as-a-service-in-linux/</link>
		<comments>http://www.leoganda.net/run-web-py-as-a-service-in-linux/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 04:08:58 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=156</guid>
		<description><![CDATA[web.py is a web framework for Python that is as simple as it is powerful. web.py is in the public domain; you can use it for whatever purpose with absolutely no restrictions. I was building a simple application with this library and need this run as a background service. python /opt/server.py 8080 2&#62;/dev/null &#38;]]></description>
				<content:encoded><![CDATA[<p><a href="http://webpy.org/">web.py</a> is a web framework for Python that is as simple as it is powerful. web.py is in the public domain; you can use it for whatever purpose with absolutely no restrictions.</p>
<p>I was building a simple application with this library and need this run as a background service.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">python <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>server.py <span style="color: #000000;">8080</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #000000; font-weight: bold;">&amp;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/run-web-py-as-a-service-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS X Terminal Color</title>
		<link>http://www.leoganda.net/mac-os-x-terminal-color/</link>
		<comments>http://www.leoganda.net/mac-os-x-terminal-color/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 17:44:38 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=152</guid>
		<description><![CDATA[I was using linux ubuntu for my work now I&#8217;m using Mac OS X 10.7.3, I was surprised when I did ls command, the ls result returned had the same color for files and folders. Fortunately there is a trick to set ls command with colors. Create or edit this file ~/.bash_profile Then insert this [...]]]></description>
				<content:encoded><![CDATA[<p>I was using linux ubuntu for my work now I&#8217;m using Mac OS X 10.7.3, I was surprised when I did ls command, the ls result returned had the same color for files and folders. Fortunately there is a trick to set ls command with colors.</p>
<p>Create or edit this file</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>.bash_profile</pre></td></tr></table></div>

<p>Then insert this inside it</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CLICOLOR</span>=<span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LSCOLORS</span>=ExFxCxDxBxegedabagacad</pre></td></tr></table></div>

<p>Save it, now open your new terminal instance. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/mac-os-x-terminal-color/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Date Timezone error ( date_default_timezone_set )</title>
		<link>http://www.leoganda.net/php_date_timezone_error_date_default_timezone_set/</link>
		<comments>http://www.leoganda.net/php_date_timezone_error_date_default_timezone_set/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 04:11:47 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=147</guid>
		<description><![CDATA[I was experiencing an error regarding date() function on PHP 5 with error message like this : Message: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting [...]]]></description>
				<content:encoded><![CDATA[<p>I was experiencing an error regarding <code>date() </code>function on PHP 5 with error message like this :<br />
<code>Message:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Jakarta' for 'WIT/7.0/no DST' instead</code></p>
<p>For quick fix in PHP5, add this line</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">date_default_timezone_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Asia/Jakarta&quot;</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/php_date_timezone_error_date_default_timezone_set/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[HD] Only Exception by Paramore &#8211; Live Concert at Jakarta August 19th 2011</title>
		<link>http://www.leoganda.net/only-exception-by-paramore-live-concert-at-jakarta-august-19th-2011/</link>
		<comments>http://www.leoganda.net/only-exception-by-paramore-live-concert-at-jakarta-august-19th-2011/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 18:32:40 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=142</guid>
		<description><![CDATA[Paramore was doing great performance in here, love them so much!]]></description>
				<content:encoded><![CDATA[<p>Paramore was doing great performance in here, love them so much!</p>
<p><object width="400" height="266" ><param name="allowfullscreen" value="true" /><param name="movie" value="http://www.facebook.com/v/2361962487665" /><embed src="http://www.facebook.com/v/2361962487665" type="application/x-shockwave-flash" allowfullscreen="true" width="400" height="266"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/only-exception-by-paramore-live-concert-at-jakarta-august-19th-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
