<?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>Reflections of a scattered Mind !! &#187; Technical</title>
	<atom:link href="http://blog.saionline.co.in/category/technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.saionline.co.in</link>
	<description>&#34;Not all scattered pieces are of broken glass&#34;</description>
	<lastBuildDate>Mon, 14 Nov 2011 20:56:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<cloud domain='blog.saionline.co.in' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Learning Android : Why I moved away from Eclipse</title>
		<link>http://blog.saionline.co.in/2011/11/learning-android-why-i-moved-away-from-eclipse/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=learning-android-why-i-moved-away-from-eclipse</link>
		<comments>http://blog.saionline.co.in/2011/11/learning-android-why-i-moved-away-from-eclipse/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 20:55:40 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IntelliJ IDEA]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=388</guid>
		<description><![CDATA[So, after a very long break, I started back with getting familiar with Android development&#8230; Felt happy seeing that Google has made a lot of improvements / features in the ADT. But, everything evaporated when I tried to debug an app on my machine, and got this error: &#8220;Android Packaging Problem:  [...]]]></description>
			<content:encoded><![CDATA[<p>So, after a very long break, I started back with getting familiar with Android development&#8230; Felt happy seeing that Google has made a lot of improvements / features in the ADT. But, everything evaporated when I tried to debug an app on my machine, and got this error: &#8220;Android Packaging Problem: resources.ap_ does not exist&#8221;. I tried cleaning the project, restarted Eclipse, and re-creating the Eclipse project and this error didn&#8217;t go away&#8230; Googling it also didn&#8217;t help much&#8230; Then, I went to sleep&#8230;.</p>
<p>The next day, to my surprise, there was no error and I was able to debug my app, at last&#8230; But, it didn&#8217;t last long&#8230; After 3 hours, the same error is back&#8230;. It looked like this ADT solves everything else (Resource Editors, WYSIWYG Editor etc.) but the basic task it is supposed to do (Basic compiling / packaging / debugging)&#8230;</p>
<p>Now that perfect mood is set to go hunting for a new and *reliable* IDE, I searched in <a href="http://www.stackoverflow.com" target="_blank">stackoverflow.com</a> for answers&#8230; Found some thread saying <a href="http://www.jetbrains.com/idea/features/google_android.html" target="_blank">IntelliJ IDEA</a> is good&#8230;. So, downloaded it, downloaded its dependencies (JSDK 1.6) and installed them&#8230; And there is no turning back&#8230; I don&#8217;t miss the resource.ap_ error at all&#8230;</p>
<p><strong>The Pros of IDEA:</strong></p>
<ol>
<li><strong></strong>Reliable (unlike ADT for Eclipse) at compiling and packaging&#8230;</li>
<li>Supports the Android &#8220;Library&#8221; projects also&#8230; (Tried it with <a href="https://github.com/cyrilmottier/GreenDroid" target="_blank">GreenDroid</a>, and worked without a glitch)</li>
<li>Import Eclipse projects directly&#8230;</li>
<li>Integrated github support (and a few more Version Controls)</li>
<li>Decent enough features, for Refactoring, Imports optimization, Code completion etc.</li>
</ol>
<p><strong>The Cons:</strong></p>
<p>This could become a big list, but the reliability when compared to Eclipse beats everything in the below list combined..at least for me&#8230;</p>
<ol>
<li>Page Scrolling &#8211; Cannot use the Mouse Scroll.. Need to click on scrollbar and scroll it down.. <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </li>
<li>Logcat sucks!! The one in Eclipse is hell lot better.. Seriously needs Filter by Application, Colored text based on log level, and saved searches.. A simple textarea doesn&#8217;t justify such an important feature..</li>
<li>The keyboard shortcuts are completely different from Eclipse.. Why doesn&#8217;t IDEs come with keyboard binding set of other IDEs that user can choose to use? <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </li>
<li>Memory hogger, seems to be more than Eclipse.. Could it be because of Swing &amp; Java?</li>
<li>Basic XML Editor &#8211; There are no Android Resource Editors&#8230;. I prefer to write XML files by hand, though&#8230;</li>
<li>Some code warnings may misguide you.. It keeps telling me that <a href="http://developer.android.com/reference/android/database/Cursor.html" target="_blank">Cursor</a> cannot be NULL, though I have personally seen cases where it will be&#8230;</li>
</ol>
<p>In simpler words, IDEA may not be as good as Eclipse in general, but for Android development, it is certainly a better choice&#8230; at least for now..</p>
<p>Atleast, you&#8217;ll know you are frustrated not because of IDE&#8230; (Trust me, frustration because of an IDE, instead of logic/code isn&#8217;t even worth trying to know.. )</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2011/11/learning-android-why-i-moved-away-from-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser Wars: Learning from each other</title>
		<link>http://blog.saionline.co.in/2011/06/browser-wars-learning-from-each-other/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=browser-wars-learning-from-each-other</link>
		<comments>http://blog.saionline.co.in/2011/06/browser-wars-learning-from-each-other/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 09:20:42 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=347</guid>
		<description><![CDATA[The most popular browsers from the country I come from (where Mac is rare) are Google Chrome, Mozilla Firefox &#38; Microsoft Internet Explorer. Like any other browser, these all have the same goal &#8211; to make browsing experience richer &#38; better. Yet, there are a lot of differences in their ways and some  [...]]]></description>
			<content:encoded><![CDATA[<p>The most popular browsers from the country I come from (where Mac is rare) are Google Chrome, Mozilla Firefox &amp; Microsoft Internet Explorer. Like any other browser, these all have the same goal &#8211; to make browsing experience richer &amp; better. Yet, there are a lot of differences in their ways and some are better than other in some ways.</p>
<p>If I ever have to make a generic purpose browser, I&#8217;d certainly pick good (for inclusion) &amp; bad (for exclusion) things from the current browsers.</p>
<h5>Google Chrome:</h5>
<p>The recent one and certainly a game changer. It has improved the user expectations from a browser by 100x.</p>
<p><strong>The Good</strong>:</p>
<ul>
<li>The crashless browser -  protect the user even from the crashes in external plug-ins (Thankfully, Firefox also implemented out-of-box plugins)</li>
<li>Faster startup time &#8211; Do things that are only absolutely needed. Nothing more. Defer everything else, to post-startup (in parallel with the user&#8217;s browsing).</li>
<li>Sandboxing &#8211; Whatever you do on web stays on web. Protect the machine from all the various security issues.</li>
<li>Explicit permissions listed for Extensions &#8211; user must know what an extension is capable of (despite of what it claims to do)</li>
<li>Silent updation: Push updates only when it is good for users. Then, who would say &#8220;no&#8221; to better browsing experience? So, there is no point in showing an annoying dialog &#8220;Updates Available&#8221; when you already know the user clicks &#8220;yes&#8221;.</li>
<li>Incognito Mode starts a new session without closing the current session (sadly, Firefox does that)</li>
</ul>
<p><strong>The Bad: </strong></p>
<ul>
<li>Weakest &amp; the most limited extension model &#8211; So limited that it may give you a feeling that the word &#8220;extension&#8221; doesn&#8217;t suit it.</li>
<li>Still an immature platform for developers. Extension Model hasn&#8217;t moved but the other parts (rendering, UI etc.) are moving forward at a very fast pace. Even, many bugs in the chrome extensions are not getting fixed for many months.</li>
</ul>
<h5>Mozilla Firefox</h5>
<p><strong>The Good:</strong></p>
<ul>
<li>Super cool extension model. There is almost nothing that can&#8217;t be done by the addons. And, XPCOM works across all the platforms.</li>
<li>Known to be the developer-friendly browser from long time. One of the early browsers that emphasized on standards and innovation from its early days.</li>
</ul>
<p><strong>The Bad:</strong></p>
<ul>
<li>Known to be memory hog. Not efficient at Memory management. Have issues with Intel&#8217;s hyperthreading.</li>
<li>MaxVersion in addons is mandatory and is limited to current version (you can&#8217;t just use * for maxversion). The only issue with this is each and every addon is to be updated (you add features or not) with every major version release (which is once in 12 weeks as of now).</li>
<li>Private browsing closes the current session and starts a new one. After closing private session, it restores the earlier session. This means you can&#8217;t do both (with default command line options)</li>
<li>Every extension have complete control (including a binary component), because of lack of a permission model. You can never trust an extension because of this!</li>
</ul>
<h5>Internet Explorer</h5>
<p><strong>The Good:</strong></p>
<ul>
<li>Its never late to catch up with the standards, speed &amp; security (with IE 9 &amp; IE 10)</li>
<li>Native 64-bit for 64-bit OS. (I can&#8217;t believe Firefox and Chrome do not have them for Windows)</li>
</ul>
<p><strong>The Bad:</strong></p>
<ul>
<li>Still maintains the completely idiotic &#8216;Quirks Mode&#8217;. I don&#8217;t see  the greater cause of maintaining a version which is full of bugs,  extremely slow and follows no standards, and also all developers hate  it.</li>
<li>Extension Model &#8211; Its a big pain. You need to be comfortable  with COM to get started with. Its much comfortable to think addons  don&#8217;t exist at all for this version.</li>
<li>Supports ActiveX plugins when the whole world uses NPAPI plugins.</li>
</ul>
<p><em>Disclaimer: All the above are my own thoughts, and I&#8217;ve to confess I haven&#8217;t researched every point. So, not all the above may be true, but is to the best of my knowledge.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2011/06/browser-wars-learning-from-each-other/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 Reasons I dislike Flash</title>
		<link>http://blog.saionline.co.in/2011/06/5-reasons-i-dislike-flash/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=5-reasons-i-dislike-flash</link>
		<comments>http://blog.saionline.co.in/2011/06/5-reasons-i-dislike-flash/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 05:13:09 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[My Experiences]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=345</guid>
		<description><![CDATA[The times have changed to where we spend most of our lives on the web. But, web is far from perfect. It has annoyances lurking around at every corner. Most of the times I get annoyed is because of the bad code (in HTML, CSS, Javascript) by the developers. The next big annoyance is from Flash  [...]]]></description>
			<content:encoded><![CDATA[<p>The times have changed to where we spend most of our lives on the web. But, web is far from perfect. It has annoyances lurking around at every corner. Most of the times I get annoyed is because of the bad code (in HTML, CSS, Javascript) by the developers. The next big annoyance is from Flash content, but I can&#8217;t blame the content developers for their code. Its the design issue of the Flash runtime itself&#8230;</p>
<p>The top 5 things in Flash that annoys me daily:</p>
<ol>
<li>Browser shortcuts (like, Ctrl+W, Ctrl+T) do not work when focused on flash elements, since it consumes all the keyboard events. I&#8217;d expect it to at least pass them to browser if it doesn&#8217;t handle a key event, but it doesn&#8217;t even bother.</li>
<li>Zoom doesn&#8217;t work &#8211; Ctrl++, Ctrl+- are useless. You have to read the content in SWF in the published size itself. You cannot increase or decrease it size. <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </li>
<li>Middle Click doesn&#8217;t work &#8211; I can&#8217;t open a link in new tabs. Opening links in new tabs from SWF is a small-size challenge.</li>
<li>I can&#8217;t find the text I&#8217;m looking for with Ctrl + F. You can&#8217;t just search in Flash content, unless the SWF itself contains a search box &amp; search implementation.</li>
<li>Its pretty famous &amp; is gonna stay there longer. And the worst part &#8211; everyone uses it in their site, though there is absolutely no need for it (making my browsing experience annoying) <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </li>
</ol>
<p>Disclaimer: The above view is completely personal and has absolutely nothing to do with anything (including friends &amp; employer also) else.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2011/06/5-reasons-i-dislike-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox Addons: Little Housekeeping Tips</title>
		<link>http://blog.saionline.co.in/2011/03/firefox-addons-little-housekeeping-tips/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=firefox-addons-little-housekeeping-tips</link>
		<comments>http://blog.saionline.co.in/2011/03/firefox-addons-little-housekeeping-tips/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 14:23:47 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[addons]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[xpcom]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=304</guid>
		<description><![CDATA[I&#8217;m working on a Firefox addon in the last few weeks and this is my 1st experience with Firefox addons. During my tiny experience, I came across some of those little things that helps you when you&#8217;re in trouble &#38; here I&#8217;m writing about those simple tips. Of course, I mixed some changes in Gecko 2.0  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a Firefox addon in the last few weeks and this is my 1st experience with Firefox addons. During my tiny experience, I came across some of those little things that helps you when you&#8217;re in trouble &amp; here I&#8217;m writing about those simple tips. Of course, I mixed some changes in Gecko 2.0 also along with these&#8230;.</p>
<p>I know these are very basic, and almost everyone who worked on the addons might be knowing them, but hey, didn&#8217;t I mention you that this is my first encounter with building firefox addon?</p>
<p><strong>How can I be sure if a Binary XPCOM component is loaded / attempted to load from Firefox?</strong></p>
<p>Close all Firefox windows and run the following from command line:</p>
<p>set NSPR_LOG_MODULES=all:5<br />
set NSPR_LOG_FILE=c:\ff.log<br />
C:\Program Files\Mozilla Firefox\firefox.exe</p>
<p>What does it do? Line 1 sets the modules to load &amp; the log level. In the above commands, we are asking to log all modules with log level 5 (meaning all logs). Line 2 sets the path to log file. Now, just launch the Firefox from command line (so that the variables are set)</p>
<p>Troubleshooting Tip: Do not use quotes around the log file name, like set NSPR_LOG_FILE=&#8221;C:\ff.log&#8221;. I tried it the 1st time and it doesn&#8217;t work.</p>
<p>References: <a title="MDC: Troubleshooting XPCOM components registration" href="https://developer.mozilla.org/en/Troubleshooting_XPCOM_components_registration">Troubleshooting XPCOM components registration</a>, <a title="NSPR Reference: Logging" href="http://www.mozilla.org/projects/nspr/reference/html/prlog.html">NSPR Logging</a></p>
<p><strong>How can I sure if an XPCOM component is successfully registered?</strong></p>
<p>This works for both binary &amp; JS components.</p>
<p>Enable Chrome errors in Error Console, if you haven&#8217;t done already! To enable, set <em>javascript.options.showInConsole</em> to <em>true</em> in <em>about:config</em> preferences.</p>
<p>Open Error Console (Ctrl+Shift+J)</p>
<p>Evaluate <em>Components.classes["components-contract-id"].name</em>. Use with the components&#8217; contract id.</p>
<p>If it gives no error, the component is successfully registered.</p>
<p>References:  <a href="http://kb.mozillazine.org/Javascript.options.showInConsole">javascript.options.showInConsole</a>,  <a title="MDC: Troubleshooting XPCOM components registration" href="https://developer.mozilla.org/en/Troubleshooting_XPCOM_components_registration">Troubleshooting XPCOM components registration</a></p>
<p><strong>How to log errors from the XPCOM components?</strong></p>
<p>This is simple thing, and I realized a bit late about it. This is currently how I&#8217;m debugging my components (need to see if there is a better way). You can report error messages to the Error Console with:</p>
<p><em>Components.utils.reportError(&#8220;This is the description of the error&#8221;);</em></p>
<p>References: <a title="Error Console - MDC Doc Center" href="https://developer.mozilla.org/en/Error_Console">Error Console</a></p>
<p><strong>nsIConsoleService</strong></p>
<p>The inconvenience with the reportError API is that it logs all messages as errors. To log at various levels (debug / warning / info), we can use the nsIConsoleService. The <em>logStringMessage()</em> function of this service looks very handy.</p>
<p>I haven&#8217;t used it yet, so I cannot give any more information on this!</p>
<p>References: <a title="nsIConsoleService Documentation on MDC" href="https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIConsoleService">nsIConsoleService Reference</a></p>
<p><strong>UnPack option</strong></p>
<p>If you are using binary components in the addon, you MUST set the unpack value to true in <em>install.rdf</em> file.</p>
<p>References: <a href="https://developer.mozilla.org/en/Install_Manifests#unpack">unpack in Install Manifests</a></p>
<p><strong>Bootstrap Addons</strong></p>
<p>This feature introduced in Gecko 2.0 answers one of my long-time questions &#8211; <em>Why should I restart the browser everytime I add / update / disable / remove an addon?</em></p>
<p>Though this feature is good, it looks complicated to do all the manual work<em>. </em>I&#8217;ve skipped trying this feature for now, but I&#8217;ll look into this some other time.<em><br />
</em></p>
<p>References: <a href="https://developer.mozilla.org/en/Extensions/Bootstrapped_extensions">Bootstrapped Extensions</a><strong><br />
</strong></p>
<p><strong>Gecko 2.0 XPCOM Changes</strong></p>
<p>Though there are many changes, I&#8217;m listing the few which I came across.</p>
<ul>
<li>Javascript component must export NSGetFactory() instead of NSGetModule() function. Binary component must export NSModule() instead of NSGetModule() function. I&#8217;ve explained this in detail in the next section.</li>
<li>Components in components/ folder are no longer auto-registered &amp; auto-loaded. Components registration will be done through the manifest file.</li>
<li>Category Registrations are done through manifest file. Also, category names are modified.</li>
<li>You&#8217;ll have to use the XULRunner SDK 2.0 for Gecko 2.0</li>
</ul>
<p>Troubleshooting Tip: Use the sample CPP file (from the references) to get started for binary components. I got a few compilation errors initially, and then I has to add <em>MOZ_NO_MOZALLOC</em> to preprocessor definitions as read somewhere, and it worked..</p>
<p>References: <a title="XPCOM Changes in Gecko 2.0" href="https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0">XPCOM Changes in Gecko 2.0</a>, <a href="http://mxr.mozilla.org/mozilla-central/source/xpcom/sample/nsSampleModule.cpp">nsSampleModule.cpp source code</a><strong><br />
</strong></p>
<p><strong>Component Registration in Firefox 4.0</strong></p>
<p>All the components to be registered has to mentioned in the <em>chrome.manifest</em> file.</p>
<ul>
<li>All the interfaces (xpt files) are to be registered using <em>interfaces</em> command</li>
<li>A JS component must use <em>component</em> command. It needs to mention its class id also. The contract id can be assigned to this JS component by a separate <em>contract</em> command.</li>
<li>A binary component can be registered with <em>binary-component</em> command. A binary component registration need not specify any class-id or contract-id in the manifest file, since they are available through the exported NSModule() function.</li>
</ul>
<p>References: <a href="https://developer.mozilla.org/en/Chrome_Registration">Chrome Registration</a></p>
<p>If you have felt all the content is copied from somewhere, its ok because its true. I&#8217;ve learned many things from <a title="Mozilla Developer Center" href="https://developer.mozilla.org">MDC</a> itself, I&#8217;m just aggregating those things here!!</p>
<p>If I&#8217;ve got something wrong in here, please do mention them in the comments as I have to correct them in the post as well as in my mind&#8230;</p>
<div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Lucida, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 18px;">&nbsp;</p>
<h1 id="title" class="first" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.8em; margin-left: 0px; font-size: 1.857em; width: 819px; padding: 0px;">Troubleshooting XPCOM components registration</h1>
<p>&nbsp;</p>
<p></span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2011/03/firefox-addons-little-housekeeping-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debug PHP: Setup</title>
		<link>http://blog.saionline.co.in/2010/12/debug-php-setup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=debug-php-setup</link>
		<comments>http://blog.saionline.co.in/2010/12/debug-php-setup/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 09:09:35 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpeclipse]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=276</guid>
		<description><![CDATA[Okay! I forgot how to set up debug for my PHP, so I had trouble today trying to set it up today and had to spend about an hour to do so&#8230; So, I decided I should note it down for future reference and hence I&#8217;m here now!
Tools: PHPEclipse, PHP 5.3.3, XDebug

Make a PHP file with content as &#60;?php echo  [...]]]></description>
			<content:encoded><![CDATA[<p>Okay! I forgot how to set up debug for my PHP, so I had trouble today trying to set it up today and had to spend about an hour to do so&#8230; So, I decided I should note it down for future reference and hence I&#8217;m here now!</p>
<p>Tools: PHPEclipse, PHP 5.3.3, XDebug</p>
<ol>
<li>Make a PHP file with content as &lt;?php echo phpinfo(); ?&gt; and browse the page on localhost.</li>
<li>Copy the source of the above page from the browser and paste it in <a href="http://xdebug.org/find-binary.php">http://xdebug.org/find-binary.php</a> and click &#8220;Analyze my phpinfo() output&#8221;. This step will give you tailored instructions on how to setup, especially points to the right DLL to use.</li>
<li>Be careful with the editing php.ini file. Prefer to add the zend_extension line at the top of the file. (It doesn&#8217;t work if its the last line)</li>
<li>And start debugging from the Eclipse IDE !!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2010/12/debug-php-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C++ Quickies #I : Long live the STL</title>
		<link>http://blog.saionline.co.in/2010/09/c-quickies-i-long-live-the-stl/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=c-quickies-i-long-live-the-stl</link>
		<comments>http://blog.saionline.co.in/2010/09/c-quickies-i-long-live-the-stl/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 05:42:47 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[stl]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=247</guid>
		<description><![CDATA[Its been quite some time (16+ months) I&#8217;ve been out of college and started using STL. Trust me, I didn&#8217;t know much about STL in college, though I used std::string &#38; std::vector everywhere I could. Now, it seems like I couldn&#8217;t (wouldn&#8217;t ? ) write a program without using STL at all. A few snippets  [...]]]></description>
			<content:encoded><![CDATA[<p>Its been quite some time (16+ months) I&#8217;ve been out of college and started using STL. Trust me, I didn&#8217;t know much about STL in college, though I used std::string &amp; std::vector everywhere I could. Now, it seems like I couldn&#8217;t (wouldn&#8217;t ? ) write a program without using STL at all. A few snippets that I really found useful (and simple) and I regularly use where ever possible.</p>
<p>To output the elements (all / subset) in a container (lets say vector), separated by a delimiter, say new line:</p>
<pre class="brush: cpp; title: ; notranslate">
#include &lt;algorithm&gt;

std::copy(v.begin(), v.end(), std::ostream_iterator(std::cout, &quot;\n&quot;));
</pre>
<p>Want to sort an array? No problem &#8230; <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush: cpp; title: ; notranslate">

#include &lt;algorithm&gt;

std::sort(array, array + lengthOfArray);
</pre>
<p>Read from the standard input into a vector until the end-of-stream?</p>
<pre class="brush: cpp; title: ; notranslate">

#include &lt;algorithm&gt;
#include &lt;iterator&gt;
#include &lt;vector&gt;

typedef std::istream_iterator&lt;int&gt; istream_iterator_int;
std::vector&lt;int&gt; v;
istream_iterator_int start (std::cin);
istream_iterator_int end;
std::back_insert_iterator&lt;vector&lt;int&gt; &gt; dest (v);
std::copy (start, end, dest);
</pre>
<p>Count the no. of instances an object is found?</p>
<pre class="brush: cpp; title: ; notranslate">

#include &lt;algorithm&gt;

size_t count = std::count(v.begin(), v.end(), 42); // Returns no. of elements in v with value 42.
</pre>
<p>And let me inform you&#8230; This is just a grain of what STL can do&#8230;. <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>References:</p>
<p><a href="http://www.cs.brown.edu/~jak/proglang/cpp/stltut/tut.html">http://www.cs.brown.edu/~jak/proglang/cpp/stltut/tut.html</a></p>
<p><a href="http://www.cplusplus.com/reference/algorithm/">http://www.cplusplus.com/reference/algorithm/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2010/09/c-quickies-i-long-live-the-stl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning Android: Part I</title>
		<link>http://blog.saionline.co.in/2010/07/learning-android-part-one/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=learning-android-part-one</link>
		<comments>http://blog.saionline.co.in/2010/07/learning-android-part-one/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 17:10:58 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=225</guid>
		<description><![CDATA[I will use this post to talk about my &#8216;Getting familiar with Android&#8217; learning. As announced in the last post, I&#8217;ve started learning Android, but not even at half-pace as I wanted to.
Anyways, let me tell what I&#8217;m doing in learning. I&#8217;m using ADT on Eclipse Helios and using the Emulator for testing  [...]]]></description>
			<content:encoded><![CDATA[<p>I will use this post to talk about my &#8216;Getting familiar with Android&#8217; learning. As announced in the last post, I&#8217;ve started learning Android, but not even at half-pace as I wanted to.</p>
<p>Anyways, let me tell what I&#8217;m doing in learning. I&#8217;m using ADT on Eclipse Helios and using the Emulator for testing purposes. Currently focusing on the samples present along with Android SDK. Gone through the Application Fundamentals available along with the SDK.</p>
<p>Interesting Things:</p>
<ul>
<li>Most importantly, its good to see myself learning the things I&#8217;m interested in from the start (FYI, I always have that thing for Web &amp; Mobile Development)</li>
<li>Very clear &amp; highly helpful documentation (and, also downloadable). And the docs are developer-focused &amp; also lays emphasis on good practices at every step, like i18n, using resources instead of hard-coded strings etc. etc..</li>
<li>Separation of layout of the app and the application logic (supports XML files for layout). I get the feeling this is inspired from Flex (mxml &amp; as), but I don&#8217;t know.</li>
<li>Provides a very good mechanisms for interoperability between various applications. Simply said, I can use the capabilities of other applications installed, and also I can expose my app&#8217;s capabilities to other apps. Also, Android search also integrates good with any application&#8217;s search.</li>
<li>Application Development is done in Java, which is said to be a very developer-friendly. I can utilize this to brush my skills in java, as I have other plans to work in Java in some not-so-far future.</li>
</ul>
<p>Annoying Things:</p>
<ul>
<li>Tabs are NOT simple to use. I&#8217;d prefer a way to declare tabs and its contents in the XML itself.</li>
<li>In TabHost, mandatory referencing of elements to&#8217; tabs&#8217; &amp; &#8216;tabcontent&#8217; doesn&#8217;t look like a good programming feature.</li>
<li>Missing the tabs &amp; tabcontent id referencing in the TabHost would give no error / warning by Compiler, but fails at Runtime, without any proper information (even while debugging)</li>
<li>Emulator takes very long time to start. So, its preferred not to close the emulator after every run. (start along with eclipse and close it before closing eclipse)</li>
<li>Emulator keyboard shortcuts &#8211; Not too easy to remember (like, Ctrl + F12 for Toggle Portrait / Landscape modes). I&#8217;d have preferred if the emulator itself has a help button, to show the shortcuts.</li>
<li>Nothing to do with Android, but the bug in Helios (Eclipse Web tools plug-in) has become a pain, forcing me not to us any features while editing resources. Bug &#8211; https://bugs.eclipse.org/bugs/show-bug.cgi?id=318108</li>
<li>Again, may not be related to ADT (frankly, I don&#8217;t know), but the auto-complete context is very slow, taking 30-60 seconds (which is tooooo long, btw). Here again, I&#8217;m forced to disable Auto-Activation of context Assist at &#8216;Window -&gt; Preferences -&gt; Java -&gt; Editor -&gt; Context Assist -&gt; Enable Auto Activation&#8217;</li>
<li>I  can&#8217;t run the application when my focus is on layout files (on resource files, for that matter). I always need to switch to a java file, to run (Ctrl + F11) the application</li>
<li>The layout filenames cannot contain uppercase letters. If it contains, the error shown doesn&#8217;t help in identifying it</li>
</ul>
<p>Unclear points for me:</p>
<ul>
<li>In Android XML, for TabHost, @android:id/tabhost works ( i.e; referencing other element with tabhost id ). How can access this element from my Activity class? (since, no reference is created in R.id )</li>
<li>Is XML compiled ? Or interpreted at Runtime? If compiled, how can I see the generated Java (?) files? (something similar to -keep compiler option in Flash Builder)</li>
<li>And many other things (like, working of Intent, i18n, logging), but these are somethings I need to learn as I dive further in android..</li>
</ul>
<p>Tasks for coming days:</p>
<ul>
<li>Finish the Tutorials in the resources, and then go to the samples folder available with the SDK.</li>
<li>Try to make a couple of simple *usable* apps, so that I get enough practice with the SDK APIs</li>
</ul>
<p>Also, attaching the projects <a title="HelloAndroid.zip" href="http://blog.saionline.co.in/wp-content/uploads/2010/07/HelloAndroid.zip">HelloAndroid.zip</a> and <a title="HelloViews.zip" href="http://blog.saionline.co.in/wp-content/uploads/2010/07/HelloViews.zip">HelloViews.zip</a> I made during my learning.</p>
<p>Wish me that I gain pace in learning Android over the next few weeks&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2010/07/learning-android-part-one/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I had a problem</title>
		<link>http://blog.saionline.co.in/2009/12/i-had-a-problem/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=i-had-a-problem</link>
		<comments>http://blog.saionline.co.in/2009/12/i-had-a-problem/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 23:52:29 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[files]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=182</guid>
		<description><![CDATA[Symptoms: 

Language: C++, Operating System: Windows
Target Audience: Programmers
Sub Area: Reading ASCII / UTF-8 files from the disk using C++ streams.
Trouble: How to handle files whose file names contains non-ASCII characters?? (coz ifstream takes a ASCII file path   )

Solution:

Use  [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Symptoms: </strong></p>
<ul>
<li>Language: C++, Operating System: Windows</li>
<li>Target Audience: Programmers</li>
<li>Sub Area: Reading ASCII / UTF-8 files from the disk using C++ streams.</li>
<li>Trouble: How to handle files whose file names contains non-ASCII characters?? (coz ifstream takes a ASCII file path <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  )</li>
</ul>
<p><strong>Solution:</strong></p>
<ul>
<li>Use _wfopen_s(), the safe version of _wfopen(), which takes a wide-character file name &amp; gives a FILE pointer i.e; FILE*.</li>
<li>Use the obtained FILE* to create a stream, like ifstream in(fp);</li>
<li>We used wide-character file name &amp; are reading the file byte-by-byte (actually, its char). DONE !! <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<p>BTW, I got help from <a href="http://bytes.com/topic/net/answers/264598-iostream-question-how-open-unicode-file-name">here</a> ! Hope this saves  time for someone out there&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2009/12/i-had-a-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doing things the HTML way</title>
		<link>http://blog.saionline.co.in/2009/10/doing-things-the-html-way/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=doing-things-the-html-way</link>
		<comments>http://blog.saionline.co.in/2009/10/doing-things-the-html-way/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 17:52:53 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=113</guid>
		<description><![CDATA[Hi,
Some points that come into handy while developing in HTML:

Always use XHTML tags. meaning that, your HTML should be well-formed XML (closing  &#38; ending tags should be present). Like, for example, use &#60;br/&#62; instead of &#60;br&#62;
Try to use XHTML 1.0 strict as much as possible. But, this mode doesn&#8217;t  [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Some points that come into handy while developing in HTML:</p>
<ul>
<li>Always use XHTML tags. meaning that, your HTML should be well-formed XML (closing  &amp; ending tags should be present). Like, for example, use &lt;br/&gt; instead of &lt;br&gt;</li>
<li>Try to use XHTML 1.0 strict as much as possible. But, this mode doesn&#8217;t support target attribute on anchor (&lt;a&gt;) links. If you need to specify &#8216;target&#8217; on links, they you should be using XHTML 1.0 transitional doctype.</li>
<li>Always specify the doctype of your HTML page. Also just run the validator test available at w3c.org to know where are deviating from the standards specified. And fix as much as possible to make it closer to standards.</li>
<li>IE doesn&#8217;t support *.ico [Icons] files as Images in <img alt="" /> tags. So, make sure that your images are NOT ico types.</li>
<li>Are you developing site in non-English language? Then, knowing about<strong> Dynamic Fonts</strong> is a must before implementation. Try to find more about it from Google ( I have no experience with them to tell you <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  )</li>
<li>A common bad practice among beginners: Uploading a large image to the server (like, 1024 * 768) &amp; then set required image &amp; height(200 * 150)  in HTML. This would cause unnecessary bandwidth waste which can be easily avoided by uploading the resized image of the desired dimensions.</li>
<li>You should learn about &#8216;Alternate Style-sheets&#8217; if you wanna provide multiple themes to the webuser. Basic usage of this can be found at: <a href="http://javascript.about.com/library/blswitch.htm">http://javascript.about.com/library/blswitch.htm</a></li>
<li>One important, yet highly ignored practise, is providing a Print specific stylesheet for the page. This is possible by specifying media=&#8221;print&#8221; on the stylesheet link, like <em>&lt;link type=&#8221;text/css&#8221; rel=&#8221;stylesheet&#8221; href=&#8221;/css/print.css&#8221; media=&#8221;print&#8221; /&gt;</em>. And, let all the unneccesary data be hidden in this css file (like, ads, navigational menu, header, search bar etc.). Keep the print to minimum.</li>
<li>It would also look good if we provide the end-user a &#8216;Print Preview&#8217; from inside our page itself. This isn&#8217;t any magic, its similar to multi theming concept as said above.</li>
</ul>
<p>Yes, I understand these are very basics, but don&#8217;t we know that Basics are the building blocks of any application?</p>
<p><strong>Update:</strong> The Print Preview concept is borrowed from <br /><a href="http://www.alistapart.com/d/printtopreview/example.html">http://www.alistapart.com/d/printtopreview/example.html</a>. <br />Click on &#8216;Print this Page&#8217; on the LHS of the page &amp; see that page layout changes, giving the user the Print Preview Experience</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2009/10/doing-things-the-html-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GTalk: Display Images Cache</title>
		<link>http://blog.saionline.co.in/2009/09/gtalk-display-images-cache/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gtalk-display-images-cache</link>
		<comments>http://blog.saionline.co.in/2009/09/gtalk-display-images-cache/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 18:32:53 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[avatar]]></category>
		<category><![CDATA[display image]]></category>
		<category><![CDATA[gtalk]]></category>
		<category><![CDATA[IM]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=96</guid>
		<description><![CDATA[In my last article, I talked about the way of obtaining a user&#8217;s display image in Yahoo! Messenger &#38; Google Talk, over the internet through http protocol (the browser way). In this case, it is the browser&#8217;s decision about the cache to be used for those images. But, the IM client  [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a title="Display Images in Instant Messengers" href="http://http://blog.saionline.co.in/2009/08/display-images-in-instant-messengers/">last article</a>, I talked about the way of obtaining a user&#8217;s display image in Yahoo! Messenger &amp; Google Talk, over the internet through http protocol (the browser way). In this case, it is the browser&#8217;s decision about the cache to be used for those images. But, the IM client Applications(googletalk.exe, YahooMessenger.exe) are stand-alone applications. And we do not expect them to fetch the display image on the fly over the wire from the internet, whenever the image is to be displayed. The most simple, obvious but yet powerful solution is  to maintain the cache of images on the disk.</p>
<p>Now, my point of this article is, what is this cache location of images, so that I can easily navigate over to there and pick a friend&#8217;s avatar from there..  <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Well on Windows Systems, the display images cache directory for GTalk is:<span id="ctl00_MainContentPlaceholder_ctl01_ctl00_lblEntry"> </span></p>
<p><span id="ctl00_MainContentPlaceholder_ctl01_ctl00_lblEntry">C:\Documents and Settings\<em>&lt;windows username&gt;</em>\Local Settings\Application Data\Google\Google Talk\avatars</span></p>
<p><span>The images saved in there are PNG files with transparent background, so you can open them with basic image application [maybe, you need to change the application extension to .png]. Do you observe there are two images for each id  there ? One image is 32 x32 [ends with .online.avatar] and the other is 96 x 96 px image [ends with .original.avatar].</span></p>
<p>You can find much more information about GTalk at <a href="http://www.customizetalk.com">http://www.customizetalk.com</a>. This site has some useful information all about the GTalk Themes Development, GTalk Bots Development and many other interesting [and not complicated at the same time] stuff.</p>
<p>Its fun as well as  interesting to find how simple a powerful application can be. Sticking to development basics <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Update:</strong> Find some interesting Google Talk emoticons &amp; their string equivalents here : <a href="http://tkhere.blogspot.com/2007/12/brand-new-google-chat-emoticons-no-one.html">http://tkhere.blogspot.com/2007/12/brand-new-google-chat-emoticons-no-one.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2009/09/gtalk-display-images-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

