<?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>Tohir Solomons &#187; Software and Technology</title>
	<atom:link href="http://www.tohir.co.za/category/software-and-technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tohir.co.za</link>
	<description></description>
	<lastBuildDate>Sat, 04 Sep 2010 06:05:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Installing SASS 3.0 on Ubuntu 10.4</title>
		<link>http://www.tohir.co.za/2010/07/09/installing-sass-3-0-on-ubuntu-10-4/</link>
		<comments>http://www.tohir.co.za/2010/07/09/installing-sass-3-0-on-ubuntu-10-4/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 13:40:51 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[HTML, CSS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software and Technology]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sass]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=409</guid>
		<description><![CDATA[Currently, the HAML/Sass version on Ubuntu is 2.2.17. Version 3, also known as Classy Cassidy, includes new features. So how can you install it on Ubuntu. Firstly, you need Ruby: sudo apt-get install ruby Thereafter (without sudo): gem install haml-edge This will install Haml and Sass into your directory, but at least you will have [...]]]></description>
			<content:encoded><![CDATA[<p>Currently, the <a href="http://sass-lang.com/">HAML/Sass</a> version on Ubuntu is 2.2.17. Version 3, also known as Classy Cassidy, includes new features. So how can you install it on Ubuntu.</p>
<p>Firstly, you need Ruby:</p>
<pre>sudo apt-get install ruby</pre>
<p>Thereafter (without sudo):</p>
<pre>gem install haml-edge</pre>
<p>This will install Haml and Sass into your directory, but at least you will have access to the latest version. Message that appears:</p>
<pre>WARNING:  Installing to ~/.gem since /var/lib/gems/1.8 and
 /var/lib/gems/1.8/bin aren't both writable.
WARNING:  You don't have /home/tohir/.gem/ruby/1.8/bin in your PATH,
 gem executables will not run.
Successfully installed haml-edge-3.1.49
1 gem installed</pre>
<p>You can test that it is the latest version by:</p>
<pre>~/.gem/ruby/1.8/bin/sass -version
</pre>
<p>Which should return:</p>
<pre>Haml/Sass 3.1.49 (Bleeding Edge)</pre>
<p>Lastly, there is a nice command to watch files and auto generate an updated version:</p>
<pre>~/.gem/ruby/1.8/bin/sass -t compact --watch [inputfile]:[outputfile]</pre>
<p>like:</p>
<pre>~/.gem/ruby/1.8/bin/sass -t compact --watch browseView.scss:browseView.css</pre>
<p><map name='google_ad_map_409_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/409?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_409_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=409&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F07%2F09%2Finstalling-sass-3-0-on-ubuntu-10-4%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/07/09/installing-sass-3-0-on-ubuntu-10-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Blocking Search Results in Google</title>
		<link>http://www.tohir.co.za/2010/05/20/blocking-search-results-in-google/</link>
		<comments>http://www.tohir.co.za/2010/05/20/blocking-search-results-in-google/#comments</comments>
		<pubDate>Thu, 20 May 2010 13:50:51 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Software and Technology]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/2010/05/20/blocking-search-results-in-google/</guid>
		<description><![CDATA[I find it quite annoying that when ever I do a search related to ExtJS, two sites (codeweblog.com and defafe.com) are on the first page of results. These two sites simply aggregate ExtJS forum posts, and then present them in a SEO friendly page. Given this, I took to finding a way that can block [...]]]></description>
			<content:encoded><![CDATA[<p>I find it quite annoying that when ever I do a search related to ExtJS, two sites (codeweblog.com and defafe.com) are on the first page of results. These two sites simply aggregate ExtJS forum posts, and then present them in a SEO friendly page.</p>
<p>Given this, I took to finding a way that can block search results. Officially, there&#8217;s no way you can do that from within Google settings (which would have preserved that as you moved from machine to machine), but there are extensions for Firefox. Still looking for a Chrome one!</p>
<p>For Firefox, there are a few extensions. One is <a href="http://www.customizegoogle.com">CustomizeGoogle</a>, but it doesnt work in the latest version of Firefox.</p>
<p>The one that does work is <a href="https://addons.mozilla.org/en-US/firefox/addon/12305/">SurfClarity</a>. It allows you to list of a sites that should be filtered out. It doesn&#8217;t do it from the server-side which would save a 1kb of traffic, but nonetheless is good enough.</p>
<p><map name='google_ad_map_407_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/407?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_407_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=407&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F05%2F20%2Fblocking-search-results-in-google%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/05/20/blocking-search-results-in-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Loop through the Properties of an Object in JavaScript</title>
		<link>http://www.tohir.co.za/2010/05/10/how-to-loop-through-the-properties-of-an-object-in-javascript/</link>
		<comments>http://www.tohir.co.za/2010/05/10/how-to-loop-through-the-properties-of-an-object-in-javascript/#comments</comments>
		<pubDate>Mon, 10 May 2010 12:41:39 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=404</guid>
		<description><![CDATA[for (var key in object) {    alert('value of '+key+is+object[key]); }]]></description>
			<content:encoded><![CDATA[<pre>for (var key in object) {
    alert('value of '+key+is+object[key]);
}</pre>
<p><map name='google_ad_map_404_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/404?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_404_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=404&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F05%2F10%2Fhow-to-loop-through-the-properties-of-an-object-in-javascript%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/05/10/how-to-loop-through-the-properties-of-an-object-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wireshark and [truncated]</title>
		<link>http://www.tohir.co.za/2010/05/10/wireshark-and-trucated/</link>
		<comments>http://www.tohir.co.za/2010/05/10/wireshark-and-trucated/#comments</comments>
		<pubDate>Mon, 10 May 2010 09:49:00 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=399</guid>
		<description><![CDATA[I&#8217;ve posted a tutorial on how to get wireshark up and running on Ubuntu. The one problem , though, is that sometimes (actually often) you get [truncated]. How can you untruncate or turn it off or increase its size. This isn&#8217;t the answer, but a way of how to get access to the full response: [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve posted a tutorial on <a href="http://www.tohir.co.za/2010/02/01/getting-started-with-wireshark-the-fiddler-for-ubuntu/">how to get wireshark up and running on Ubuntu</a>. The one problem , though, is that sometimes (actually often) you get [truncated]. How can you untruncate or turn it off or increase its size.</p>
<p>This isn&#8217;t the answer, but a way of how to get access to the full response:</p>
<p>Right Click on the Packet in Line-based text data, then choose Copy &gt; Bytes (Printable Text Only).</p>
<p>This will place the full response, and you can paste it in a text editor.</p>
<p><map name='google_ad_map_399_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/399?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_399_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=399&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F05%2F10%2Fwireshark-and-trucated%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/05/10/wireshark-and-trucated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starting to like the toolbar in Ubuntu 10.4 file manager</title>
		<link>http://www.tohir.co.za/2010/05/04/starting-to-like-the-toolbar-in-ubuntu-10-4-file-manager/</link>
		<comments>http://www.tohir.co.za/2010/05/04/starting-to-like-the-toolbar-in-ubuntu-10-4-file-manager/#comments</comments>
		<pubDate>Tue, 04 May 2010 08:52:08 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software and Technology]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=395</guid>
		<description><![CDATA[The one thing that horrified me in the latest version of Ubuntu was the &#8216;new&#8217; toolbar for Nautilus or the file manager. However, after reading Deconstructing Nautilus and rebuilding it better, I have to admit, I enjoy it. Why? Even though I tend to browser elsewhere by typing in the path, the UP button is [...]]]></description>
			<content:encoded><![CDATA[<p>The one thing that horrified me in the latest version of Ubuntu was the &#8216;new&#8217; toolbar for Nautilus or the file manager.</p>
<p><img class="aligncenter size-full wp-image-396" title="ubuntu10.4toolbar" src="http://www.tohir.co.za/wp-content/uploads/2010/05/ubuntu10.4toolbar.png" alt="" width="802" height="106" /></p>
<p>However, after reading <a href="http://www.design-by-izo.com/2010/02/27/deconstructing-nautilus-and-rebuilding-it-better/">Deconstructing Nautilus and rebuilding it better</a>, I have to admit, I enjoy it. Why?</p>
<p>Even though I tend to browser elsewhere by typing in the path, the UP button is probably the most used button by myself. Switching to the location bar provides no alternative, but keeping the button bar allows one a form of up button.</p>
<p>Secondly, CTRL+L is probably something I can live with.</p>
<p>Given the whole debate around this, the lesson I believe is that don&#8217;t ignore your existing users. If you are going to change something, inform your users!</p>
<p>Given the opensource community spirit, it wont be long before someone does a quick script to bring back the old toolbar. If you are looking to do that today, have a look at: <a href="https://help.ubuntu.com/community/RestoreNautilusLocationBar">https://help.ubuntu.com/community/RestoreNautilusLocationBar</a></p>
<p><map name='google_ad_map_395_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/395?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_395_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=395&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F05%2F04%2Fstarting-to-like-the-toolbar-in-ubuntu-10-4-file-manager%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/05/04/starting-to-like-the-toolbar-in-ubuntu-10-4-file-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL &#8211; getting two items per source in a single query</title>
		<link>http://www.tohir.co.za/2010/02/04/mysql-getting-two-items-per-source-in-a-single-query/</link>
		<comments>http://www.tohir.co.za/2010/02/04/mysql-getting-two-items-per-source-in-a-single-query/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 21:46:27 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Software and Technology]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=366</guid>
		<description><![CDATA[Assume you have the following table called stories with the following data. And you have run the following query: SELECT * FROM stories ORDER BY storydate DESC id source title storydate 10 cnn Story 10 2010-01-21 9 bbcnews Story 9 2010-01-20 8 bbcnews Story 8 2010-01-19 7 skynews Story 7 2010-01-18 6 cnn Story 6 [...]]]></description>
			<content:encoded><![CDATA[<p>Assume you have the following table called stories with the following data. And you have run the following query:</p>
<pre>SELECT * FROM stories ORDER BY storydate DESC</pre>
<table border="1" width="100%">
<tbody>
<tr>
<td>id</td>
<td>source</td>
<td>title</td>
<td>storydate</td>
</tr>
<tr>
<td>10</td>
<td>cnn</td>
<td>Story 10</td>
<td>2010-01-21</td>
</tr>
<tr>
<td>9</td>
<td>bbcnews</td>
<td>Story 9</td>
<td>2010-01-20</td>
</tr>
<tr>
<td>8</td>
<td>bbcnews</td>
<td>Story 8</td>
<td>2010-01-19</td>
</tr>
<tr>
<td>7</td>
<td>skynews</td>
<td>Story 7</td>
<td>2010-01-18</td>
</tr>
<tr>
<td>6</td>
<td>cnn</td>
<td>Story 6</td>
<td>2010-01-17</td>
</tr>
<tr>
<td>5</td>
<td>bbcnews</td>
<td>Story 5</td>
<td>2010-01-16</td>
</tr>
<tr>
<td>4</td>
<td>cnn</td>
<td>Story 4</td>
<td>2010-01-15</td>
</tr>
<tr>
<td>3</td>
<td>skynews</td>
<td>Story 3</td>
<td>2010-01-14</td>
</tr>
<tr>
<td>2</td>
<td>skynews</td>
<td>Story 2</td>
<td>2010-01-13</td>
</tr>
<tr>
<td>1</td>
<td>cnn</td>
<td>Story 1</td>
<td>2010-01-12</td>
</tr>
</tbody>
</table>
<p>Now for the challenge. What happens if you are required to get the top two stories from each source? One option is to first get the order of the sources, and then loop through each one of them:</p>
<pre>SELECT DISTINCT source FROM stories ORDER BY storydate DESC</pre>
<p>&lt;loop &#8220;source&#8221; as &#8220;sourceid&#8221;&gt;</p>
<pre>      SELECT * FROM stories WHERE source = "{sourceid}" ORDER BY storydate DESC LIMIT 2</pre>
<p>&lt;/loop&gt;</p>
<p>Another option is to do the in MySQL itself! Unsure if there is a better way of doing this, but here&#8217;s mine using UNION and Sub Selects:</p>
<pre>(SELECT * FROM stories WHERE source =
<strong>(SELECT DISTINCT source FROM stories ORDER BY storydate DESC LIMIT 0,1)</strong> ORDER BY storydate DESC LIMIT 2)
UNION
(SELECT * FROM stories WHERE source =
<strong>(SELECT DISTINCT source FROM stories ORDER BY storydate DESC LIMIT 1,1)</strong> ORDER BY storydate DESC LIMIT 2)
UNION
(SELECT * FROM stories WHERE source =
<strong>(SELECT DISTINCT source FROM stories ORDER BY storydate DESC LIMIT 2,1)</strong> ORDER BY storydate DESC LIMIT 2)</pre>
<h3>Explanation:</h3>
<p>The bold section are subselects and form the WHERE clause of the query. Here  we want the first, second and third as per source, but only one at a time. Once we have two results per item, we use UNION to join them together.</p>
<p>One thing to note though. Even though it returns the latest two stories per source, the final table is not sorted by storydate! This can be done using PHP sorting techniques. Is there a way of doing this one time in MySQL?</p>
<p><map name='google_ad_map_366_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/366?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_366_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=366&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F02%2F04%2Fmysql-getting-two-items-per-source-in-a-single-query%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/02/04/mysql-getting-two-items-per-source-in-a-single-query/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting started with Wireshark, the Fiddler for Ubuntu</title>
		<link>http://www.tohir.co.za/2010/02/01/getting-started-with-wireshark-the-fiddler-for-ubuntu/</link>
		<comments>http://www.tohir.co.za/2010/02/01/getting-started-with-wireshark-the-fiddler-for-ubuntu/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 07:38:59 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software and Technology]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[fiddler]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=349</guid>
		<description><![CDATA[Fiddler is a useful tool for tracking http requests and responses. It&#8217;s similar to the Net tag in Firebug, except that it can be used to track all requests, not only browser-based ones. For Ubuntu users, the recommended alternative is Wireshark. Wireshark is noted as being more powerful than Fiddler, but the focus will be [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fiddler2.com/fiddler2/">Fiddler</a> is a useful tool for tracking http requests and responses. It&#8217;s similar to the Net tag in Firebug, except that it can be used to track all requests, not only browser-based ones.</p>
<p>For Ubuntu users, the recommended alternative is <a href="http://www.wireshark.org/">Wireshark</a>. Wireshark is noted as being more powerful than Fiddler, but the focus will be on the features most commonly used by web developers for tracking.</p>
<h2>Installation</h2>
<p>Wireshark is found in the Ubuntu repositories, so simply search for <strong>wireshark</strong> in Synaptic, or enter <em>sudo apt-get install wireshark</em></p>
<h2>Usage</h2>
<p>Under Applications &gt; Internet, you will notice there are two options. Wireshark and Wireshark (as root). Run the second one (as root) as this gives you more data to track.</p>
<p><a href="http://www.tohir.co.za/wp-content/uploads/2010/01/wireshark-1.png"><img class="alignnone size-full wp-image-357" title="wireshark-1" src="http://www.tohir.co.za/wp-content/uploads/2010/01/wireshark-1.png" alt="wireshark-1" width="399" height="92" /></a></p>
<p>After wireshark has started, the process is straightforward:</p>
<ol>
<li>Choose which network interfaces to capture traffic from</li>
<li>Start capturing</li>
<li>Filter captured requests</li>
</ol>
<p>1. Choosing which network interfaces to capture traffic from. From the menu, choose: Capture &gt; Interfaces</p>
<p><a href="http://www.tohir.co.za/wp-content/uploads/2010/02/wireshark-2.png"><img class="alignnone size-full wp-image-358" title="wireshark-2" src="http://www.tohir.co.za/wp-content/uploads/2010/02/wireshark-2.png" alt="wireshark-2" width="745" height="272" /></a></p>
<p>This will bring up a list of network devices.</p>
<p>2. Since my work involves debugging work off my laptop (http://localhost etc), I only start device <strong>lo</strong> (127.0.0.1). This is useful as it immediately ignores all other traffic.</p>
<p>3. The one thing you will notice is that fiddler will log both the TCP and HTTP requests. For the purpose of debugging AJAX, etc., we are only interested in HTTP requests, TCP requests are not required. These can be hidden by adding a filter.</p>
<p><a href="http://www.tohir.co.za/wp-content/uploads/2010/02/wireshark-3.png"><img class="alignnone size-full wp-image-359" title="wireshark-3" src="http://www.tohir.co.za/wp-content/uploads/2010/02/wireshark-3.png" alt="wireshark-3" width="861" height="327" /></a></p>
<p>In the field next to Filter:, enter http and click on Apply.</p>
<p><a href="http://www.tohir.co.za/wp-content/uploads/2010/02/wireshark-4.png"><img class="alignnone size-full wp-image-360" title="wireshark-4" src="http://www.tohir.co.za/wp-content/uploads/2010/02/wireshark-4.png" alt="wireshark-4" width="715" height="213" /></a></p>
<p>The steps will now show all traffic coming on 127.0.0.1 via HTTP. The last step is picking up the AJAX parts for debugging. Notice that for each request, there is a response. Unlike Fiddler, Wireshark does not combine the request and the response. So click on the response line, and then expand the <strong>Line-based text data row</strong>. This will show the text of the AJAX response.</p>
<p><a href="http://www.tohir.co.za/wp-content/uploads/2010/02/wireshark-5.png"><img class="alignnone size-full wp-image-361" title="wireshark-5" src="http://www.tohir.co.za/wp-content/uploads/2010/02/wireshark-5.png" alt="wireshark-5" width="693" height="569" /></a></p>
<h3>Conclusion</h3>
<p>Wireshark takes more steps than Fiddler, and Fiddler is a more focussed program than Wireshark. Wireshark also captures traffic without having to install a plugin into firefox, etc., so it&#8217;s useful for debugging applications as well. The biggest improvement to make Wireshark truly replace Fiddler is to turn off truncation of the response text. Wish I knew how!</p>
<p><map name='google_ad_map_349_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/349?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_349_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=349&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F02%2F01%2Fgetting-started-with-wireshark-the-fiddler-for-ubuntu%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/02/01/getting-started-with-wireshark-the-fiddler-for-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to use ExtJS Abstract functions</title>
		<link>http://www.tohir.co.za/2009/09/22/how-to-use-extjs-abstract-functions/</link>
		<comments>http://www.tohir.co.za/2009/09/22/how-to-use-extjs-abstract-functions/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 12:35:44 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[ExtJS]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=332</guid>
		<description><![CDATA[For some methods in ExtJS, you will see: Class Ext.grid.GridDragZone &#8230; onDrag( Event e ) : void Abstract method called during the onMouseMove event while dragging an object. Parameters: e : Event the mousemove event Returns:Class Ext.grid.GridDragZone void In this case, GridDragZone is part of GridView which is part of GridPanel. Accessing it will be, [...]]]></description>
			<content:encoded><![CDATA[<p>For some methods in ExtJS, you will see:</p>
<blockquote style="border: 1px solid #000; background-color: #FFFFF0">
<h1>Class Ext.grid.GridDragZone</h1>
<p>&#8230;</p>
<h2>onDrag( Event e ) : void</h2>
<p>Abstract method called during the onMouseMove event while dragging an object.</p>
<p>Parameters:</p>
<p>e : Event</p>
<p>the mousemove event</p>
<p>Returns:Class Ext.grid.GridDragZone</p>
<p>void</p></blockquote>
<p>In this case, GridDragZone is part of GridView which is part of GridPanel. Accessing it will be, GridPanel-&gt;GridView-&gt;GridDragZone.</p>
<p>The GridDragZone gets implemented for a GridPanel when you set enableDragDrop to true, but it only becomes available when the grid renders, so:</p>
<pre>var grid = new Ext.grid.GridPanel({
    // etc
});</pre>
<pre>grid.on('render', function(obj) {
    obj.getView().dragZone.onDrag=function(evt){
        alert('being dragged');
    }
});</pre>
<p><map name='google_ad_map_332_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/332?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_332_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=332&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2009%2F09%2F22%2Fhow-to-use-extjs-abstract-functions%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2009/09/22/how-to-use-extjs-abstract-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Drag and Drop from Adobe AIR</title>
		<link>http://www.tohir.co.za/2009/08/21/simple-drag-and-drop-from-adobe-air/</link>
		<comments>http://www.tohir.co.za/2009/08/21/simple-drag-and-drop-from-adobe-air/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 13:47:54 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=324</guid>
		<description><![CDATA[Quite a few articles and tutorials show you how to drag and drop a file onto an Adobe AIR application. This one will show you how to drag one FROM an Adobe AIR application TO YOUR DESKTOP (or any other location you provide. The code is really simple: #dragcontent { margin: 20px; padding: 10px; /* Spacing */ background: lightyellow; [...]]]></description>
			<content:encoded><![CDATA[<p>Quite a few articles and tutorials show you how to drag and drop a file onto an Adobe AIR application. This one will show you how to drag one FROM an Adobe AIR application TO YOUR DESKTOP (or any other location you provide. The code is really simple:</p>
<pre class="brush:javascript">
<script type="text/javascript" src="AIRAliases.js"></script>
<style type="text/css">
	#dragcontent {
		margin: 20px; padding: 10px; /* Spacing */ 
		background: lightyellow; 
		border: 1px solid red;
		border-right: 20px solid red; 
		-khtml-user-drag: element; /* This makes the element draggable*/ 
	}
</style>

<script type="text/javascript">
    function onDragStart(event)
    {
     	event.dataTransfer.effectAllowed = "copy";
		var dragFile = new air.File("app:/capetown.jpg");
		event.dataTransfer.setData("application/x-vnd.adobe.air.file-list", new Array(dragFile));
	}
</script>
<span id="dragcontent" ondragstart="onDragStart(event)">Drag Me to the Desktop</span>
</pre>
<p>Download: <a href="http://www.tohir.co.za/wp-content/uploads/2009/08/simpledragfromair.zip">Source Code</a></p>
<p>To run, extract files from archive, and then run: adl application.xml</p>
<p><map name='google_ad_map_324_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/324?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_324_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=324&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2009%2F08%2F21%2Fsimple-drag-and-drop-from-adobe-air%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2009/08/21/simple-drag-and-drop-from-adobe-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamically generating a Sandbox in Adobe AIR</title>
		<link>http://www.tohir.co.za/2009/08/19/dynamically-generating-a-sandbox-in-adobe-air/</link>
		<comments>http://www.tohir.co.za/2009/08/19/dynamically-generating-a-sandbox-in-adobe-air/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 12:12:17 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=318</guid>
		<description><![CDATA[Something that seems to have worked document.write( '' ); Thoughts?]]></description>
			<content:encoded><![CDATA[<p>Something that seems to have worked</p>
<pre class="brush:javascript"><script type="text/javascript">
    document.write(
        '<iframe id="ctools" src="' + serverURL + "
        sandboxRoot="' + serverURL + '" 
        ondominitialize="yourFunction" 
        style="width:100%; height:100%; 
        border:none;"></iframe>'
    ); 
</script>
</pre>
<p>Thoughts?</p>
<p><map name='google_ad_map_318_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/318?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_318_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=318&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2009%2F08%2F19%2Fdynamically-generating-a-sandbox-in-adobe-air%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2009/08/19/dynamically-generating-a-sandbox-in-adobe-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
