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

<channel>
	<title>Pointer RulZ</title>
	<atom:link href="http://fahadshaon.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fahadshaon.wordpress.com</link>
	<description></description>
	<lastBuildDate>Wed, 01 Jun 2011 15:38:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='fahadshaon.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Pointer RulZ</title>
		<link>http://fahadshaon.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://fahadshaon.wordpress.com/osd.xml" title="Pointer RulZ" />
	<atom:link rel='hub' href='http://fahadshaon.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Bookmarklet Link Extractor</title>
		<link>http://fahadshaon.wordpress.com/2008/06/25/bookmarklet-link-extractor/</link>
		<comments>http://fahadshaon.wordpress.com/2008/06/25/bookmarklet-link-extractor/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 07:52:32 +0000</pubDate>
		<dc:creator>Fahad</dc:creator>
				<category><![CDATA[BookMarkLet]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[BookMarkLet Link Extractor]]></category>
		<category><![CDATA[Google filetype: search]]></category>
		<category><![CDATA[Google Search Result Link Extractor]]></category>
		<category><![CDATA[JavaScript Link Extractor]]></category>

		<guid isPermaLink="false">http://fahadshaon.wordpress.com/?p=52</guid>
		<description><![CDATA[For a while I was wondering how could I write a button like google bookmark. Few days ago I came to know this technology&#8217;s name is bookmarklet. The word bookmarklet came from bookmark + applet, is just a bookmark having a javascript function in its URL. Javascript function in URL is possible, as modern browser [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=52&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For a while I was wondering how could I write a button like google bookmark. Few days ago I came to know this technology&#8217;s name is bookmarklet. The word bookmarklet came from bookmark + applet, is just a bookmark having a javascript function in its URL. Javascript function in URL is possible, as modern browser supports javascript: prefix like http:, ftp:, or https:. It offers a lot of advanced feature in browsing. Wikipedia have good details, take a look, <a title="Wikipedia - Bookmarklet" href="http://en.wikipedia.org/wiki/Bookmarklet" target="_blank">BOOKMARKLET on Wikipedia</a>.</p>
<p>Then i gave a try to write one. this typical bookmarklet firstly ask for few predefined options then extract all the link of matching types. And options are optimized for google filetype : *** search result.</p>
<p>To use copy following lines and then create a bookmark with this text in url.<span id="more-52"></span></p>
<pre>javascript:w=open('','linkextractor','scrollbars,resizable,menubar');d=document.links;p=prompt('Enter number form bellow list: \n1 \.pdf but not contain google.com \n2 .ppt but not contain google.com\nOr Enter file type without * and . ie svg \nOr Simply keep empty for all links','');var nreg=new RegExp(%22google.com%22);with(w.document){if(p==1){var fileType=%22\.pdf$%22;}else if (p==2){var fileType=%22\.ppt$%22;}else if (p== null || p==%22%22){var fileType=%22.*%22;}else{var fileType=%22\.%22 + p + %22$%22;}var reg=new RegExp(fileType);for(i=0;i&lt;d.length;i++){var s =d[i].toString();if(reg.test(s) == true &amp;&amp;  nreg.test(s) == false ){write(document.links[i].toString() +'&lt;br/&gt;\n');}};void(close());}</pre>
<p><strong>How to use:</strong></p>
<p>Firstly search in google using filetype: option (say filetype:pdf binary heap)<br />
the click this bookmark.</p>
<p>will see a prompt, choose a number or type the filetype or left empty to list all.</p>
<p><a href="http://fahadshaon.files.wordpress.com/2008/06/firstbookmarklet.png"><img class="aligncenter size-medium wp-image-53" src="http://fahadshaon.files.wordpress.com/2008/06/firstbookmarklet.png?w=300&#038;h=185" alt="Google Search Result Extractor" width="300" height="185" /></a></p>
<p>another window will open, with the list of links. copy it or save it in plain text format use wget or any download manager you like, grab the files.</p>
<p><strong>NB:</strong> this is my first bookmarklet, could face error, let me know. And have some idea to develop it.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fahadshaon.wordpress.com/52/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fahadshaon.wordpress.com/52/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fahadshaon.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fahadshaon.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fahadshaon.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fahadshaon.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fahadshaon.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fahadshaon.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fahadshaon.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fahadshaon.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fahadshaon.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fahadshaon.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fahadshaon.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fahadshaon.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fahadshaon.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fahadshaon.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=52&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fahadshaon.wordpress.com/2008/06/25/bookmarklet-link-extractor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/81f1e3749b3c4c51de59d4dfa458a50e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shaon</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/06/firstbookmarklet.png?w=300" medium="image">
			<media:title type="html">Google Search Result Extractor</media:title>
		</media:content>
	</item>
		<item>
		<title>Epiphany: Smart Bookmark (Address Bar as Search Bar)</title>
		<link>http://fahadshaon.wordpress.com/2008/06/03/epiphany_smart_bookmarks/</link>
		<comments>http://fahadshaon.wordpress.com/2008/06/03/epiphany_smart_bookmarks/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 12:54:44 +0000</pubDate>
		<dc:creator>Fahad</dc:creator>
				<category><![CDATA[Epiphany]]></category>
		<category><![CDATA[SmartBookmarks]]></category>
		<category><![CDATA[Epiphany Address Bar]]></category>
		<category><![CDATA[Epiphany Search Bar]]></category>
		<category><![CDATA[List of Smart Bookmarks]]></category>
		<category><![CDATA[Smart Bookmarks]]></category>

		<guid isPermaLink="false">http://fahadshaon.wordpress.com/?p=49</guid>
		<description><![CDATA[For long days I was using FireFox, was very happy with this browser but only problem it is a very resource hungry browser. In some case it just crashes, probably because I add lot&#8217;s of add-ons. I was bit desperate to find a fast browser at least with search bars like in FireFox. As a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=49&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For long days I was using FireFox, was very happy with this browser but only problem it is a very resource hungry browser. In some case it just crashes, probably because I add lot&#8217;s of add-ons. I was bit desperate to find a fast browser at least with search bars like in FireFox. As a result download near about 9 to 10 browsers. But got the solution in Epiphany.</p>
<p>Epiphany is very light weight browser, built on Gecko engine, never takes time to start. No customization supported by default. There is only one address bar, no default search bar. But the interesting point is this address bar could be used as the replacement of FireFox&#8217;s search bar.<span id="more-49"></span></p>
<p>Tricks is very simple &#8211; Almost all search engine today&#8217;s world use <a title="Search Google for learn more about GET Method of HTML" href="http://www.google.com/search?hl=en&amp;safe=off&amp;q=html+get+method&amp;btnG=Search" target="_blank">GET method</a> to take input search string. As a result the search  string is visible in the link address. Just add a bookmark of a result page, while adding bookmark replace the input search string with <span style="color:#ff0000;">%s</span> in Address box. that will do the rest. Next time you type a word in address bar the title of this bookmark will be listed below select it for search. This type of bookmarks are called smartbookmarks. <a title="Smart Bookmark" href="http://www.gnome.org/projects/epiphany/smartbookmarks.html" target="_blank">Official site</a>. It is also possible to make a serach bar like Firefox by clicking &#8220;Show in bookmarks bar&#8221; in Bookmark editing mode.</p>
<p><a href="http://fahadshaon.files.wordpress.com/2008/06/epiphany_add_bookmarks.png"><img class="aligncenter size-medium wp-image-47" src="http://fahadshaon.files.wordpress.com/2008/06/epiphany_add_bookmarks.png?w=300&#038;h=149" alt="Epiphany Add Bookmar" width="300" height="149" /></a></p>
<p style="margin-bottom:0;"><a href="http://fahadshaon.files.wordpress.com/2008/06/epiphany_search_options.png"><img class="aligncenter size-medium wp-image-48" src="http://fahadshaon.files.wordpress.com/2008/06/epiphany_search_options.png?w=300&#038;h=165" alt="Epiphany Search Options" width="300" height="165" /></a></p>
<p>Few smart bookmark search strings</p>
<p>Google Search</p>
<p>http://www.google.com/search?q=%s&#038;ie=UTF-8&#038;oe=UTF-8</p>
<p>Google Bookmark Search</p>
<p>http://www.google.com/bookmarks/find?hl=en&#038;q=%s&#038;btnSMH=Search+Bookmarks</p>
<p>*Wikipedia Search</p>
<p>http://www.wikipedia.org/w/wiki.phtml?search=%s</p>
<p>Yahoo Search</p>
<p>http://search.yahoo.com/bin/search?p=%s</p>
<p>Dogpile Search</p>
<p>http://search.dogpile.com/texis/search?q=%s&#038;geo=no&#038;fs=web&#038;av=custom&#038;engines=goto&#038;engines=looksmart&#038;engines=thunderstone&#038;engines=findwhat&#038;engines=sprinks&#038;engines=directhit&#038;engines=google&#038;engines=infoseek&#038;engines=lycos&#038;engines=kanoodle&#038;engines=opendir&#038;engines=realnames&#038;engines=altavista&#038;engines=yahoo</p>
<p>The Free Dictionary</p>
<p>http://www.thefreedictionary.com/%s</p>
<p>Finally &#8211;</p>
<p><span style="font-size:2em;text-align:center;color:#f85d06;">In Love of Epiphany for simplicity.</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fahadshaon.wordpress.com/49/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fahadshaon.wordpress.com/49/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fahadshaon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fahadshaon.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fahadshaon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fahadshaon.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fahadshaon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fahadshaon.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fahadshaon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fahadshaon.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fahadshaon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fahadshaon.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fahadshaon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fahadshaon.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fahadshaon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fahadshaon.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=49&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fahadshaon.wordpress.com/2008/06/03/epiphany_smart_bookmarks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/81f1e3749b3c4c51de59d4dfa458a50e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shaon</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/06/epiphany_add_bookmarks.png?w=300" medium="image">
			<media:title type="html">Epiphany Add Bookmar</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/06/epiphany_search_options.png?w=300" medium="image">
			<media:title type="html">Epiphany Search Options</media:title>
		</media:content>
	</item>
		<item>
		<title>Configuring Anjuta for NASM</title>
		<link>http://fahadshaon.wordpress.com/2008/02/01/configuring-anjuta-for-nasm/</link>
		<comments>http://fahadshaon.wordpress.com/2008/02/01/configuring-anjuta-for-nasm/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 05:05:53 +0000</pubDate>
		<dc:creator>Fahad</dc:creator>
				<category><![CDATA[Assembly Language]]></category>
		<category><![CDATA[Anjuta]]></category>
		<category><![CDATA[Cofiguring Anjuta for DDD]]></category>
		<category><![CDATA[Configuraing Anjuta for NASM]]></category>
		<category><![CDATA[Nams Anjuta]]></category>
		<category><![CDATA[Nasm]]></category>

		<guid isPermaLink="false">http://fahadshaon.wordpress.com/?p=39</guid>
		<description><![CDATA[Anjuta 1.2 could be configured with NASM. follow these simple steps to configure Anjuta. firstly nasm and ddd have to working properly. Click Settings &#62; Commands Set Language as Assembler Fill up the values Terminal: gnome-terminal --working-directory="$(current.file.dir)" -e "$(anjuta.current.command)" Compile: nasm -f elf "$(current.file.name.ext)" -o "$(current.file.name).o" -gstab Build a file: ld -o "$(current.file.name)" "$(current.file.name).o" Execute: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=39&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a title="Anjuta" href="http://anjuta.sourceforge.net/" target="_blank">Anjuta</a> 1.2 could be configured with NASM. follow these simple steps to configure Anjuta.  <span id="more-39"></span></p>
<p><a title="Anjuta Screen Shot opening an assembly file" href="http://fahadshaon.files.wordpress.com/2008/02/anjuta_assembly.png"></a></p>
<div style="text-align:center;"><a title="Anjuta Screen Shot opening an assembly file" href="http://fahadshaon.files.wordpress.com/2008/02/anjuta_assembly.png"><img src="http://fahadshaon.files.wordpress.com/2008/02/anjuta_assembly.png?w=530&#038;h=484" alt="Anjuta Screen Shot opening an assembly file" width="530" height="484" /></a></div>
<p>firstly nasm and ddd have to working properly.</p>
<p>Click Settings &gt;  Commands</p>
<p>Set Language as Assembler</p>
<p>Fill up the values</p>
<pre>Terminal: gnome-terminal --working-directory="$(current.file.dir)" -e "$(anjuta.current.command)"
Compile: nasm -f elf "$(current.file.name.ext)" -o "$(current.file.name).o" -gstab
Build a file: ld -o "$(current.file.name)" "$(current.file.name).o"
Execute: "$(current.full.filename)" $(anjuta.program.arguments)</pre>
<p>Click OK</p>
<p><a title="Setting up Values for Asembler" href="http://fahadshaon.files.wordpress.com/2008/02/set-up-assambler-values.png"></a></p>
<div style="text-align:center;"><a title="Setting up Values for Asembler" href="http://fahadshaon.files.wordpress.com/2008/02/set-up-assambler-values.png"><img src="http://fahadshaon.files.wordpress.com/2008/02/set-up-assambler-values.png?w=448&#038;h=354" alt="Setting up Values for Asembler" width="448" height="354" /></a></div>
<p>After doing so anjuta is ready for compiling to building and excuting a .asm file</p>
<p><strong>Debugging Configuration:</strong></p>
<p>Click Settings &gt; Tools Editor<br />
Click Add</p>
<p>Fill up the values</p>
<pre>Name: DDD Debug (Could be any thing)
Menu location: Debug (Could be any thing)
Command: ddd  "$(current.file.name)"  &amp;
Working Directory: "$(current.file.dir)"</pre>
<p>Click OK</p>
<p><a title="Setting values of in Tool Editor" href="http://fahadshaon.files.wordpress.com/2008/02/tool-editor.png"></a></p>
<div style="text-align:center;"><a title="Setting values of in Tool Editor" href="http://fahadshaon.files.wordpress.com/2008/02/tool-editor.png"><img src="http://fahadshaon.files.wordpress.com/2008/02/tool-editor.png?w=540&#038;h=277" alt="Setting values of in Tool Editor" width="540" height="277" /></a></div>
<p>Now in time of coding .asm file first build the file and then click Debug &gt; DDD Debug to debug the file.</p>
<p>Actually this information are saved in ~/.anjuta/ folder<br />
i am shearing my configs file. could be pasted in that folder. should be no problem. but i am not sure.</p>
<div style="text-align:center;"><a title="Download my Anjuta Configs" href="http://www.box.net/shared/088ji14g8o" target="_blank"><img src="http://fahadshaon.files.wordpress.com/2008/02/download.png?w=630" alt="Download" /></a></div>
<p>if it worked let me know</p>
<p><strong>Please Note: To work in this way u have to have nasm and ddd working properly</strong></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fahadshaon.wordpress.com/39/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fahadshaon.wordpress.com/39/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fahadshaon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fahadshaon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fahadshaon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fahadshaon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fahadshaon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fahadshaon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fahadshaon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fahadshaon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fahadshaon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fahadshaon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fahadshaon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fahadshaon.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fahadshaon.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fahadshaon.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=39&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fahadshaon.wordpress.com/2008/02/01/configuring-anjuta-for-nasm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/81f1e3749b3c4c51de59d4dfa458a50e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shaon</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/anjuta_assembly.png" medium="image">
			<media:title type="html">Anjuta Screen Shot opening an assembly file</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/set-up-assambler-values.png" medium="image">
			<media:title type="html">Setting up Values for Asembler</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/tool-editor.png" medium="image">
			<media:title type="html">Setting values of in Tool Editor</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/download.png" medium="image">
			<media:title type="html">Download</media:title>
		</media:content>
	</item>
		<item>
		<title>Assembly Code Executing Script</title>
		<link>http://fahadshaon.wordpress.com/2008/02/01/assembly-code-executing-script/</link>
		<comments>http://fahadshaon.wordpress.com/2008/02/01/assembly-code-executing-script/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 03:31:36 +0000</pubDate>
		<dc:creator>Fahad</dc:creator>
				<category><![CDATA[Assembly Language]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[Bash Script]]></category>
		<category><![CDATA[Script that generates Scripts]]></category>

		<guid isPermaLink="false">http://fahadshaon.wordpress.com/?p=38</guid>
		<description><![CDATA[If you are coding in assembly language in linux and not using any IDE then this post worth reading. We have stared a new semester in our computer science and engineering graduation. Most of this semester&#8217;s courses very important for a computer engineer and should be added another adjective bit difficult. One of those is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=38&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are coding in assembly language in linux and not using any IDE then this post worth reading.</p>
<p style="margin-bottom:0;">We have stared a new semester in our computer science and engineering graduation. Most of this semester&#8217;s courses very important for a computer engineer and should be added another adjective bit difficult. One of those is assembly. Course instructor&#8217;s recommendation is to compile and run the code in linux using nasm.</p>
<p style="margin-bottom:0;">Using no IDE, it is very boring to code. As each time any edition in source file, have to type command to compile and link and finally execute the code. if error occurred then again type command for debugger. Have to waste time for typing commands. In time of programming this is not any programmer willing to do.</p>
<p style="margin-bottom:0;">Then the universal scripting theory<span id="more-38"></span></p>
<p style="border:2px solid gray;margin:10px;padding:5px;"><strong><span style="color:#ff0000;">Linux</span> +<span style="color:#ff6600;"> <span style="color:#99cc00;">Lots of command</span></span><span style="color:#99cc00;">s</span> + <span style="color:#0000ff;">Same commands <span style="color:#ff6600;">again</span> and <span style="color:#ff6600;">again</span></span> =<span style="color:#993300;"> Shell Script</span></strong></p>
<p style="margin-bottom:0;">And</p>
<p style="border:2px solid gray;margin:10px;padding:5px;"><strong><span style="color:#ff0000;">Linux</span> +<span style="color:#ff6600;"> <span style="color:#99cc00;">Lots of command</span></span><span style="color:#99cc00;">s</span> + <span style="color:#0000ff;">Same commands <span style="color:#ff6600;">again</span> and <span style="color:#ff6600;">again</span></span></strong><strong> + <span style="color:#800080;">Bit different for each file</span> = <span style="color:#993300;">Shell Script that <span style="color:#ff00ff;">generates Shell Script</span> for each file</span>.</strong></p>
<p style="margin-bottom:0;">So I worte a shell script that generates shell script for each .asm file in the current directory.  This is my first long shell script.</p>
<p style="margin-bottom:0;"><strong>Script:</strong></p>
<p style="margin-bottom:0;">
<p><pre class="brush: cpp;">
&lt;pre&gt;#!/bin/bash

msg=&quot;Press Enter to exit ...&quot;

# running a for loop for each asm file in the directory
for name_asm in $(ls | grep &quot;.asm$&quot; )
do
	name=${name_asm%%&quot;.asm&quot;}
	name_execute_sh=$name&quot;_execute.sh&quot;
	name_debug_sh=$name&quot;_debug.sh&quot;

	# generating executable sh file

	if (ls | grep &quot;^$name_execute_sh$&quot;) then
		echo &quot;Skipping ... , as exists&quot;
	else
		echo &quot;Creating ... $name_execute_sh&quot;
		name_o=$name&quot;.o&quot;

		# openning file to write
		exec 4&gt; $name_execute_sh
		echo &quot;#!/bin/bash&quot; &gt;&amp;4
		echo &quot;&quot; &gt;&amp;4
		echo &quot;nasm -f elf $name_asm&quot; &gt;&amp;4
		echo &quot;ld -o $name $name_o&quot; &gt;&amp;4
		echo &quot;echo \&quot;Executing : \$PWD/\$name\&quot;&quot; &gt;&amp;4
		echo &quot;echo \&quot;--------------------------------\&quot;&quot; &gt;&amp;4
		echo &quot;./$name&quot; &gt;&amp;4

		echo &quot;echo \&quot;--------------------------------\&quot;&quot; &gt;&amp;4
		echo &quot;echo -n \&quot;$msg\&quot;&quot; &gt;&amp;4
		echo &quot;read&quot; &gt;&amp;4
		exec 4&lt;&amp;- 		# relezing the file

		# making sh file execute able
		chmod a+x $name_execute_sh
	fi

	#generating debuging sh file

	if (ls | grep &quot;^$name_debug_sh$&quot;) then
		echo &quot;Skipping ... , as exists&quot;
	else
		echo &quot;Creating ... $name_debug_sh&quot;
		name_o=$name&quot;.o&quot;

		# openning file to write
		exec 4&gt; $name_debug_sh
		echo &quot;#!/bin/bash&quot; &gt;&amp;4
		echo &quot;&quot; &gt;&amp;4
		echo &quot;nasm -f elf $name_asm -gstab&quot; &gt;&amp;4
		echo &quot;ld -o $name $name_o&quot; &gt;&amp;4
		echo &quot;ddd $name &amp;&quot; &gt;&amp;4

		echo &quot;read&quot; &gt;&amp;4
		exec 4&lt;&amp;- 		# relezing the file

		# making sh file execute able
		chmod a+x $name_debug_sh
	fi
done

#suspending the terminal
echo -n $msg
read</pre></p>
<p style="margin-bottom:0;"><strong>Process of Using this script:</strong></p>
<p style="margin-bottom:0;" align="left">Make a script (anyname.sh) using the given code. If u don&#8217;t wish to do that. download using this link</p>
<p style="margin-bottom:0;" align="center"><a title="Download the shell script" href="http://www.box.net/shared/wnukjtquc0" target="_blank"><img src="http://fahadshaon.files.wordpress.com/2008/02/download.png?w=630" alt="Download" /></a></p>
<p style="margin-bottom:0;">paste this .sh file in a directory that contains .asm file. run this script. (may run it double clicking or executing in command prompt). it will generates two sh file one for compiling, linking and executing. and other for compiling, linking and debugging.</p>
<p style="margin-bottom:0;"><strong>Please Note:</strong> if you create .sh file make sure, make it executable by invoking</p>
<p><code>chmod a+x filename<br />
</code></p>
<p style="margin-bottom:0;">or go to &#8220;Properties&#8221; of that file and in &#8220;Permission&#8221; tab, check &#8220;Allow executing file as program&#8221;. with out doing so u may not be able to double click run it.</p>
<p style="margin-bottom:0;"><strong>Also note that I used nasm as assembler and ddd as debuger. so u have to have this two working before using this.</strong></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fahadshaon.wordpress.com/38/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fahadshaon.wordpress.com/38/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fahadshaon.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fahadshaon.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fahadshaon.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fahadshaon.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fahadshaon.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fahadshaon.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fahadshaon.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fahadshaon.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fahadshaon.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fahadshaon.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fahadshaon.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fahadshaon.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fahadshaon.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fahadshaon.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=38&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fahadshaon.wordpress.com/2008/02/01/assembly-code-executing-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/81f1e3749b3c4c51de59d4dfa458a50e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shaon</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/download.png" medium="image">
			<media:title type="html">Download</media:title>
		</media:content>
	</item>
		<item>
		<title>My Pacman Game</title>
		<link>http://fahadshaon.wordpress.com/2008/01/21/my-pacman-game/</link>
		<comments>http://fahadshaon.wordpress.com/2008/01/21/my-pacman-game/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 16:50:42 +0000</pubDate>
		<dc:creator>Fahad</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[BFS]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Pacman]]></category>
		<category><![CDATA[TurboC]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[SourceCode]]></category>
		<category><![CDATA[TC Game]]></category>
		<category><![CDATA[TurboC BGI]]></category>
		<category><![CDATA[TurboC Graphics]]></category>

		<guid isPermaLink="false">http://fahadshaon.wordpress.com/2008/01/21/my-pacman-game/</guid>
		<description><![CDATA[Introduction: I developed this game as my term assignment in Level-1 and Term-2 (February &#8211; March 2007) in C Programming course. This is my first huge project in C, technically last one (as already have learned C++ and Java). Brief Description: This is a typical Pacman game. where player plays as a Pacman who&#8217;s object [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=28&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--></p>
<p style="margin-bottom:0;"><strong>Introduction:</strong></p>
<p style="margin-bottom:0;">I developed this game as my term assignment in Level-1 and Term-2 (February &#8211; March 2007) in C Programming course. This is my first huge project in C, technically last one (as already have learned C++ and Java).</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>Brief Description:</strong></p>
<p style="margin-bottom:0;">This is a typical Pacman game. where player plays as a Pacman who&#8217;s object is to eat all the seeds in the board or better I say it maze. In the maze player is not alone. There are enemies, four of them, to catch u. If they catch player loses life. Right now there is four levels. Hope I could increase level in recent future.<span id="more-28"></span></p>
<p style="margin-bottom:0;"><img src="http://fahadshaon.files.wordpress.com/2008/02/splash-screen.png?w=500&#038;h=382" alt="Pacman Splash Screen" width="500" height="382" /></p>
<p style="margin-bottom:0;">
<p><strong>Project Detail:</strong></p>
<p style="margin-bottom:0;"><strong>Developing Language:</strong> C (could be said C++ as I have used few feature exclusive to c++ but this program is a structured not object oriented one)</p>
<p style="margin-bottom:0;"><strong>Used API:</strong> Turbo C&#8217;s BGI</p>
<p style="margin-bottom:0;"><strong>Operating System:</strong> Windows (though I have developed this project in windows xp sp2, wish that in all version of windows this code would work)</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>Software Architectural Information:</strong></p>
<p style="margin-bottom:0;">In my consideration this project could be divided into two part. firstly the algorithmic part and next is display oriented part.</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>Algorithmic Part: </strong></p>
<p style="margin-bottom:0;">Main algorithmic part of this code is BFS. BFS is used to calculate the distance of each block of maze. The enemies ran through the shortest path. When I have wrote this code, I didn&#8217;t have much knowledge of algorithms. So the code could be little bit frustrating for advanced programmers. As a result new comers will be enjoying the code.</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>Display Oriented Part:</strong></p>
<p style="margin-bottom:0;">As already I have specified that this project is developed in Turbo C so the display and color oriented work is done using Turbo C&#8217;s BGI. More specifically by drawing raw circle and rectangle.  This is very ideal project for those how wanted to do better graphics with TC&#8217;s circle and rectangle functions.</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>Few Screen Shots Taken Using DosBox :</strong></p>
<p style="margin-bottom:0;"><a title="্্Pacman Begining Level" href="http://fahadshaon.files.wordpress.com/2008/02/begining.png"><img src="http://fahadshaon.files.wordpress.com/2008/02/begining.thumbnail.png?w=630" alt="্্Pacman Begining Level" /></a><a title="Pyramid" href="http://fahadshaon.files.wordpress.com/2008/02/pyramid.png"><img src="http://fahadshaon.files.wordpress.com/2008/02/pyramid.thumbnail.png?w=630" alt="Pyramid" /></a><a title="Rectangular" href="http://fahadshaon.files.wordpress.com/2008/02/rectangular.png"><img src="http://fahadshaon.files.wordpress.com/2008/02/rectangular.thumbnail.png?w=630" alt="Rectangular" /></a><a title="Two Cities" href="http://fahadshaon.files.wordpress.com/2008/02/two-cities.png"><img src="http://fahadshaon.files.wordpress.com/2008/02/two-cities.thumbnail.png?w=630" alt="Two Cities" /></a><a title="Spiral" href="http://fahadshaon.files.wordpress.com/2008/02/spiral.png"><img src="http://fahadshaon.files.wordpress.com/2008/02/spiral.thumbnail.png?w=630" alt="Spiral" /></a><a title="Pacman Game Over" href="http://fahadshaon.files.wordpress.com/2008/02/game-over.png"><img src="http://fahadshaon.files.wordpress.com/2008/02/game-over.thumbnail.png?w=630" alt="Pacman Game Over" /></a></p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>Lastly:</strong></p>
<p style="margin-bottom:0;">Sharing my one of best creations &#8230;. &#8230;</p>
<p style="margin-bottom:0;">
<div style="text-align:center;"><a title="My Pacman Game" href="http://www.box.net/shared/niuh4wlc0s" target="_blank"><img src="http://fahadshaon.files.wordpress.com/2008/02/download.png?w=630" alt="Download" /></a></div>
<p style="margin-bottom:0;"><a title="My Pacman Game" href="http://www.box.net/shared/niuh4wlc0s" target="_blank">Click Here</a> to download the game. This is a zip file where an exe file and other necessary files are given. This game could be run only in windows as this is developed in Turbo C.</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fahadshaon.wordpress.com/28/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fahadshaon.wordpress.com/28/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fahadshaon.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fahadshaon.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fahadshaon.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fahadshaon.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fahadshaon.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fahadshaon.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fahadshaon.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fahadshaon.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fahadshaon.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fahadshaon.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fahadshaon.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fahadshaon.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fahadshaon.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fahadshaon.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=28&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fahadshaon.wordpress.com/2008/01/21/my-pacman-game/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/81f1e3749b3c4c51de59d4dfa458a50e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shaon</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/splash-screen.png" medium="image">
			<media:title type="html">Pacman Splash Screen</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/begining.thumbnail.png" medium="image">
			<media:title type="html">্্Pacman Begining Level</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/pyramid.thumbnail.png" medium="image">
			<media:title type="html">Pyramid</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/rectangular.thumbnail.png" medium="image">
			<media:title type="html">Rectangular</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/two-cities.thumbnail.png" medium="image">
			<media:title type="html">Two Cities</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/spiral.thumbnail.png" medium="image">
			<media:title type="html">Spiral</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/game-over.thumbnail.png" medium="image">
			<media:title type="html">Pacman Game Over</media:title>
		</media:content>

		<media:content url="http://fahadshaon.files.wordpress.com/2008/02/download.png" medium="image">
			<media:title type="html">Download</media:title>
		</media:content>
	</item>
		<item>
		<title>Prefix to Postfix Stack Emplementation</title>
		<link>http://fahadshaon.wordpress.com/2008/01/18/prefix-to-postfix-stack-emplementation/</link>
		<comments>http://fahadshaon.wordpress.com/2008/01/18/prefix-to-postfix-stack-emplementation/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 06:24:21 +0000</pubDate>
		<dc:creator>Fahad</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[DataStructure]]></category>
		<category><![CDATA[Stack]]></category>
		<category><![CDATA[Expression Conversion]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Prefix]]></category>
		<category><![CDATA[Prefix to Posfix conversion]]></category>
		<category><![CDATA[Prefix to Posfix conversion Stack impelmentation]]></category>

		<guid isPermaLink="false">http://fahadshaon.wordpress.com/2008/01/18/prefix-to-postfix-stack-emplementation/</guid>
		<description><![CDATA[It&#8217;s been long time. sorry to them those who want some explanation from me. was bit busy can&#8217;t give enough time for blogging. but now i have sorted out that &#8220;i will always be busy&#8221;. so if i want to continue blogging then i have to write something on the fly. For them who have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=23&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been long time. sorry to them those who want some explanation from me. was bit busy can&#8217;t give enough time for blogging. but now i have sorted out that &#8220;i will always be busy&#8221;. so if i want to continue blogging then i have to write something on the fly.</p>
<p>For them who have got some help &#8220;Prefix to Postfix using Binary Teer&#8221;. Here same code is implemented using stack. But keep in mind that if case of implementation using stack binary tree is not used at all.</p>
<p>Here is a pdf file discribing the algorithm. <a href="http://fahadshaon.files.wordpress.com/2008/01/prefix-to-postfix-stack-algo.pdf" title="Prefix to Postfix using Stack Algorithm">Prefix to Postfix using Stack Algorithm</a></p>
<p>Here is the code written in C++<span id="more-23"></span></p>
<p><pre class="brush: cpp;">
#include &lt;iostream&gt;
#include &lt;stack&gt;
using namespace std;

#define MAX 100
#define LEFT_DONE '#'

bool isOperator(char ch){
    return ch=='+' || ch=='-' || ch == '*' ||
        ch == '/' || ch == '$' || ch == '%';
}

int main(){

	//e input expression and p output expression
	char e[MAX],p[MAX];
	stack&lt;char&gt; stk;

	cout &lt;&lt; &quot;Enter a prefix : &quot;;
	cin &gt;&gt; e;

	int j=0;
	//until the end of expression riches
	for (int i=0;e[i];i++){ 

		if(isOperator(e[i])){
			stk.push(e[i]);
		}
		else {
			p[j++]=e[i];

			while(!stk.empty() &amp;&amp; stk.top()==LEFT_DONE){
				stk.pop();
				p[j++]=stk.top();
				stk.pop();
			}
			stk.push(LEFT_DONE);
		}
	}
	p[j]=0;
	cout &lt;&lt; &quot;Postfix expression is :&quot; &lt;&lt; p &lt;&lt; endl;

	return 0;
}</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fahadshaon.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fahadshaon.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fahadshaon.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fahadshaon.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fahadshaon.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fahadshaon.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fahadshaon.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fahadshaon.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fahadshaon.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fahadshaon.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fahadshaon.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fahadshaon.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fahadshaon.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fahadshaon.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fahadshaon.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fahadshaon.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=23&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fahadshaon.wordpress.com/2008/01/18/prefix-to-postfix-stack-emplementation/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/81f1e3749b3c4c51de59d4dfa458a50e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shaon</media:title>
		</media:content>
	</item>
		<item>
		<title>Prefix to Postfix using Binary Tree</title>
		<link>http://fahadshaon.wordpress.com/2007/07/30/prefix-to-postfix-using-binary-treearrayed-implementation/</link>
		<comments>http://fahadshaon.wordpress.com/2007/07/30/prefix-to-postfix-using-binary-treearrayed-implementation/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 03:31:25 +0000</pubDate>
		<dc:creator>Fahad</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[BinaryTree]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[DataStructure]]></category>
		<category><![CDATA[Tree]]></category>
		<category><![CDATA[BinaryTree Arrayed implementation]]></category>
		<category><![CDATA[Expression Conversion]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Prefix]]></category>
		<category><![CDATA[Prefix to Posfix conversion]]></category>
		<category><![CDATA[Prefix to Posfix conversion BinaryTree Arrayed impelmen]]></category>

		<guid isPermaLink="false">http://fahadshaon.wordpress.com/2007/07/30/prefix-to-postfix-using-binary-treearrayed-implementation/</guid>
		<description><![CDATA[Recently we have given a online assignment to convert a prefix expression to postfix using binary tree. but it is very odd to say that we had learn tree only a day before. as a result only three or four of us among 30 could complete the code in 2 hours limited time. fortunately i [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=3&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently we have given a online assignment to convert a prefix expression to postfix using binary tree. but it is very odd to say that we had learn tree only a day before. as a result only three or four of us among 30  could complete the code in 2 hours limited time.  fortunately i was one of them. and for all of my friends who are struggling with it could see the following code.</p>
<p><b>This section is Updated later:</b></p>
<p>I wanted to explain a lot but i can&#8217;t because of time. have lots of thing to share. firstly i have made a power point slide that actually simulates how a binary expression tree is made from a prefix expression. hope this will at least help to understand the logic behind the conversion. click this link <a href="http://fahadshaon.files.wordpress.com/2008/01/prefix_to_expression_tree.ppt" title="Prefix to Expression Tree Simulation">Prefix to Expression Tree Simulation</a></p>
<p><b>Updated section ends here</b></p>
<p>Here is the code of prefix to binary tree(arrayed implementation).</p>
<p><span id="more-3"></span></p>
<p><pre class="brush: cpp;">

#include&lt;iostream&gt;
using namespace std;

#define MAX 100
int count=1;
char e[MAX],b[2*MAX];

bool isOperator(char ch){
    return ch=='+' || ch=='-' || ch == '*' ||
        ch == '/' || ch == '$' || ch == '%';
}

void left(char,int);
void right(char,int);

void left(char op,int i){

    if(isOperator(op)){

        b[2*i]=op;
        count++;
        left(e[count],2*i);
        right(e[count],2*i);
    }
    else
    {
        b[2*i]=op;
        count++;
    }
}

void right(char op,int i){

    if(isOperator(op)){

        b[2*i+1]=op;
        count++;
        left(e[count],2*i+1);
        right(e[count],2*i+1);
    }
    else
    {
        b[2*i+1]=op;
        count++;
    }
}

void postorder(int i){
    if(isOperator(b[i]))postorder(2*i);
    if(isOperator(b[i]))postorder(2*i+1);
    cout &lt;&lt; b[i] ;

}

int main(){

    cout &lt;&lt; &quot;Enter a prefix : &quot;;
    cin &gt;&gt; e;
    int len=strlen(e);

    count=0;
    b[1]=e[count];

    count++;
    left(e[count],1);
    right(e[count],1);

    postorder(1);

    return 0;
}</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fahadshaon.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fahadshaon.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fahadshaon.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fahadshaon.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fahadshaon.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fahadshaon.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fahadshaon.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fahadshaon.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fahadshaon.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fahadshaon.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fahadshaon.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fahadshaon.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fahadshaon.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fahadshaon.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fahadshaon.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fahadshaon.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=3&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fahadshaon.wordpress.com/2007/07/30/prefix-to-postfix-using-binary-treearrayed-implementation/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/81f1e3749b3c4c51de59d4dfa458a50e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shaon</media:title>
		</media:content>
	</item>
		<item>
		<title>My first Post</title>
		<link>http://fahadshaon.wordpress.com/2007/07/18/my-first-post/</link>
		<comments>http://fahadshaon.wordpress.com/2007/07/18/my-first-post/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 17:10:12 +0000</pubDate>
		<dc:creator>Fahad</dc:creator>
				<category><![CDATA[First]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[This is my first post. Love the idea of Blogging. This is the best idea of  shearing  over the net.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=1&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is my first post. Love the idea of Blogging. This is the best idea of  shearing  over the net.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fahadshaon.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fahadshaon.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fahadshaon.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fahadshaon.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fahadshaon.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fahadshaon.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fahadshaon.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fahadshaon.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fahadshaon.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fahadshaon.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fahadshaon.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fahadshaon.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fahadshaon.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fahadshaon.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fahadshaon.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fahadshaon.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fahadshaon.wordpress.com&amp;blog=1386182&amp;post=1&amp;subd=fahadshaon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fahadshaon.wordpress.com/2007/07/18/my-first-post/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/81f1e3749b3c4c51de59d4dfa458a50e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shaon</media:title>
		</media:content>
	</item>
	</channel>
</rss>
