<?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>My (mostly technical) blog</title>
	<atom:link href="http://sabbour.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sabbour.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sun, 22 Jan 2012 14:12:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sabbour.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>My (mostly technical) blog</title>
		<link>http://sabbour.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sabbour.wordpress.com/osd.xml" title="My (mostly technical) blog" />
	<atom:link rel='hub' href='http://sabbour.wordpress.com/?pushpress=hub'/>
		<item>
		<title>MeeGo/Harmattan: Finished running remote process. Exit code was 127.</title>
		<link>http://sabbour.wordpress.com/2011/09/28/meegoharmattan-finished-running-remote-process-exit-code-was-127/</link>
		<comments>http://sabbour.wordpress.com/2011/09/28/meegoharmattan-finished-running-remote-process-exit-code-was-127/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 09:53:23 +0000</pubDate>
		<dc:creator>sabbour</dc:creator>
				<category><![CDATA[MeeGo/Harmattan]]></category>
		<category><![CDATA[harmattan]]></category>
		<category><![CDATA[meego]]></category>
		<category><![CDATA[n950]]></category>
		<category><![CDATA[nokia]]></category>

		<guid isPermaLink="false">http://sabbour.wordpress.com/?p=115</guid>
		<description><![CDATA[If you are developing using Qt Creator for the MeeGo/Harmattan target, and upon launching the emulator for your application you get a message like this in the compiler window: chmod: /opt/MeeGoApp/bin/MeeGoApp: No such file or directory warning: aegisSessionOpen() - failed to open platsec device (ret=-1) warning: aegisSessionOpen() - failed to open platsec device (ret=-1) sh: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=115&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are developing using Qt Creator for the MeeGo/Harmattan target, and upon launching the emulator for your application you get a message like this in the compiler window:<br />
<code><br />
chmod: /opt/MeeGoApp/bin/MeeGoApp: No such file or directory<br />
warning: aegisSessionOpen() - failed to open platsec device (ret=-1)<br />
warning: aegisSessionOpen() - failed to open platsec device (ret=-1)<br />
sh:<br />
/opt/MeeGoApp/bin/MeeGoApp: not found<br />
Killing remote process(es)...<br />
Finished running remote process. Exit code was 127.<br />
</code><br />
Make sure your <strong>project path</strong> has <strong>no spaces</strong>. For example <strong>C:\Qt Projects\MeeGoApp</strong> will fail. Notice the space in “Qt Projects”.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sabbour.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sabbour.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sabbour.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sabbour.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sabbour.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sabbour.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sabbour.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sabbour.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sabbour.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sabbour.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sabbour.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sabbour.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sabbour.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sabbour.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=115&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sabbour.wordpress.com/2011/09/28/meegoharmattan-finished-running-remote-process-exit-code-was-127/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50e0ba60439b30889bc9d653c9732dfd?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sabbour</media:title>
		</media:content>
	</item>
		<item>
		<title>Steps to force a 32-bit DEB to install on a 64-bit system</title>
		<link>http://sabbour.wordpress.com/2011/04/19/steps-to-force-a-32-bit-deb-to-install-on-a-64-bit-system/</link>
		<comments>http://sabbour.wordpress.com/2011/04/19/steps-to-force-a-32-bit-deb-to-install-on-a-64-bit-system/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 07:18:55 +0000</pubDate>
		<dc:creator>sabbour</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://sabbour.wordpress.com/?p=105</guid>
		<description><![CDATA[I came across some packages compiled for 32-bit, like Adobe Air that I needed to install on my 64-bit ubuntu, the following commands will fix the flags on the .deb package to force install it on a 64-bit system. Note that it the converted package might install but not work correctly, so you are at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=105&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I came across some packages compiled for 32-bit, like Adobe Air that I needed to install on my 64-bit ubuntu, the following commands will fix the flags on the .deb package to force install it on a 64-bit system.</p>
<p>Note that it the converted package might install but not work correctly, so you are at luck whether it will work after that or not.</p>
<p><code> cd ~/Downloads<br />
mkdir tmp<br />
dpkg-deb -x package_i386.deb tmp<br />
dpkg-deb --control package_i386.deb tmp/DEBIAN<br />
sed -i "s/i386/all/" tmp/DEBIAN/<br />
dpkg -b tmp package_64.deb<br />
sudo dpkg -i package_64.deb<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sabbour.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sabbour.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sabbour.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sabbour.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sabbour.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sabbour.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sabbour.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sabbour.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sabbour.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sabbour.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sabbour.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sabbour.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sabbour.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sabbour.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=105&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sabbour.wordpress.com/2011/04/19/steps-to-force-a-32-bit-deb-to-install-on-a-64-bit-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50e0ba60439b30889bc9d653c9732dfd?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sabbour</media:title>
		</media:content>
	</item>
		<item>
		<title>Compatibility: Microsoft SQL Server Azure Spatial</title>
		<link>http://sabbour.wordpress.com/2010/06/28/compatibility-microsoft-sql-server-azure-spatial/</link>
		<comments>http://sabbour.wordpress.com/2010/06/28/compatibility-microsoft-sql-server-azure-spatial/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 09:15:23 +0000</pubDate>
		<dc:creator>sabbour</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Spatial]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[spatial]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://sabbour.wordpress.com/?p=99</guid>
		<description><![CDATA[As I&#8217;m just trying out Microsoft SQL Server Azure Spatial, the following things need to be removed from any generated SQL script in order to make it run on SQL Server Azure as they are not supported: ON [PRIMARY] PAD_INDEX ALLOW_ROW_LOCKS ALLOW_PAGE_LOCKS SORT_IN_TEMPDB newsequentialid() I will keep this post updated as I discover new booby [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=99&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m just trying out Microsoft SQL Server Azure Spatial, the following things need to be removed from any generated SQL script in order to make it run on SQL Server Azure as they are not supported:</p>
<pre>ON [PRIMARY]
PAD_INDEX
ALLOW_ROW_LOCKS
ALLOW_PAGE_LOCKS
SORT_IN_TEMPDB
<strong>newsequentialid()</strong>

<span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;white-space:normal;font-size:13px;">I will keep this post updated as I discover new booby traps!
For a full list, check: <a href="http://msdn.microsoft.com/en-us/library/ee336253.aspx">http://msdn.microsoft.com/en-us/library/ee336253.aspx</a> </span></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sabbour.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sabbour.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sabbour.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sabbour.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sabbour.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sabbour.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sabbour.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sabbour.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sabbour.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sabbour.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sabbour.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sabbour.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sabbour.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sabbour.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=99&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sabbour.wordpress.com/2010/06/28/compatibility-microsoft-sql-server-azure-spatial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50e0ba60439b30889bc9d653c9732dfd?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sabbour</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixing: Could not load type &#8216;Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExistException&#8217; from assembly &#8216;Microsoft.TeamFoundation.WorkItemTracking.Client, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&#8217;.</title>
		<link>http://sabbour.wordpress.com/2010/06/28/fixing-could-not-load-type-microsoft-teamfoundation-workitemtracking-client-workitemtypedeniedornotexistexception-from-assembly-microsoft-teamfoundation-workitemtracking-client-version9-0-0-0/</link>
		<comments>http://sabbour.wordpress.com/2010/06/28/fixing-could-not-load-type-microsoft-teamfoundation-workitemtracking-client-workitemtypedeniedornotexistexception-from-assembly-microsoft-teamfoundation-workitemtracking-client-version9-0-0-0/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 05:45:30 +0000</pubDate>
		<dc:creator>sabbour</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sabbour.wordpress.com/?p=96</guid>
		<description><![CDATA[Simply, if you get this error: --------------------------- Microsoft Visual Studio --------------------------- Could not load type 'Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExistException' from assembly 'Microsoft.TeamFoundation.WorkItemTracking.Client, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. --------------------------- OK --------------------------- Then you probably installed Visual Studio, Visual Studio service pack, then the Team explorer. Doing it in that matter overwrites parts of Visual Studio SP hence giving you such errors. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=96&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Simply, if you get this error:</p>
<p><code> ---------------------------<br />
Microsoft Visual Studio<br />
---------------------------<br />
Could not load type 'Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExistException' from assembly 'Microsoft.TeamFoundation.WorkItemTracking.Client, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.<br />
---------------------------<br />
OK<br />
---------------------------<br />
</code><br />
<a href="http://sabbour.files.wordpress.com/2010/06/tfs-error.png"><img class="alignnone size-full wp-image-97" title="tfs-error" src="http://sabbour.files.wordpress.com/2010/06/tfs-error.png?w=480&#038;h=201" alt="" width="480" height="201" /></a></p>
<p>Then you probably installed Visual Studio, Visual Studio service pack, then the Team explorer. Doing it in that matter overwrites parts of Visual Studio SP hence giving you such errors.</p>
<p><strong>The correct way to install would be:</strong></p>
<ol>
<li>Visual Studio (Team Edition)</li>
<li>Team Explorer</li>
<li>Team Foundation 2008 October Power Tools</li>
<li>Visual Studio 2008 Service Pack 1</li>
</ol>
<p><strong>To fix the error now, just re-install Visual Studio 2008 Service Pack 1.</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sabbour.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sabbour.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sabbour.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sabbour.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sabbour.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sabbour.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sabbour.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sabbour.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sabbour.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sabbour.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sabbour.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sabbour.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sabbour.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sabbour.wordpress.com/96/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=96&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sabbour.wordpress.com/2010/06/28/fixing-could-not-load-type-microsoft-teamfoundation-workitemtracking-client-workitemtypedeniedornotexistexception-from-assembly-microsoft-teamfoundation-workitemtracking-client-version9-0-0-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50e0ba60439b30889bc9d653c9732dfd?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sabbour</media:title>
		</media:content>

		<media:content url="http://sabbour.files.wordpress.com/2010/06/tfs-error.png" medium="image">
			<media:title type="html">tfs-error</media:title>
		</media:content>
	</item>
		<item>
		<title>Deploying Symbian Qt Applications on the phone</title>
		<link>http://sabbour.wordpress.com/2010/04/07/deploying-symbian-qt-applications-on-the-phone/</link>
		<comments>http://sabbour.wordpress.com/2010/04/07/deploying-symbian-qt-applications-on-the-phone/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 10:38:40 +0000</pubDate>
		<dc:creator>sabbour</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sabbour.wordpress.com/?p=87</guid>
		<description><![CDATA[As a reminder to myself, these are the steps to deploy an Qt application on the mobile phone. Project settings: Add new build configuration S60_5th_Edition_SDK_v1.0 (Qt 4.6.0) Release Change its Tool Chain to be WINSCW Add a new Run Setting (ProjectName in Symbian Emulator) Open the project file (TestLBSWS.pro) and add the following to enable [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=87&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As a reminder to myself, these are the steps to deploy an Qt application on the mobile phone.</p>
<ol>
<li><strong> Project settings: </strong>
<ol>
<li>Add new build configuration <strong>S60_5th_Edition_SDK_v1.0 (Qt 4.6.0) Release<br />
<a href="http://sabbour.files.wordpress.com/2010/03/1.jpg"><img class="alignnone size-full wp-image-88" title="Add" src="http://sabbour.files.wordpress.com/2010/03/1.jpg?w=480&#038;h=103" alt="" width="480" height="103" /></a></strong></li>
<li>Change its Tool Chain to be <strong>WINSCW</strong><br />
<a href="http://sabbour.files.wordpress.com/2010/03/2.jpg"><img class="alignnone size-full wp-image-89" title="2" src="http://sabbour.files.wordpress.com/2010/03/2.jpg?w=480" alt=""   /><br />
</a></li>
<li>Add a new Run Setting (<strong>ProjectName in Symbian Emulator</strong>)<br />
<a href="http://sabbour.files.wordpress.com/2010/03/3.jpg"><img class="alignnone size-full wp-image-93" title="3" src="http://sabbour.files.wordpress.com/2010/03/3.jpg?w=480&#038;h=79" alt="" width="480" height="79" /></a></li>
<li>Open the project file (TestLBSWS.pro) and add the following to enable network usage:<br />
<pre class="brush: plain;">
symbian {
    TARGET.CAPABILITY = NetworkServices
}
</pre></li>
</ol>
</li>
<li> <strong>Mobile deployment: </strong>
<ol>
<li><strong>Without smart installer (Qt 4.6.0)</strong>
<ul>
<li>Open command prompt</li>
<li>Navigate to project path</li>
<li>Run:
<pre>qmake &amp;&amp; make release-gcce</pre>
</li>
<li>Then run:
<pre>make sis</pre>
</li>
<li>You now have your .sis file ready. Make sure qt in already installed on the device</li>
</ul>
</li>
<li><strong>With smart installer (Qt 4.6.2+)</strong> <a href="http://labs.trolltech.com/blogs/2010/02/15/qt-for-symbian-and-the-nokia-smart-installer-beta/">steps</a></li>
</ol>
</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sabbour.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sabbour.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sabbour.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sabbour.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sabbour.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sabbour.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sabbour.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sabbour.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sabbour.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sabbour.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sabbour.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sabbour.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sabbour.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sabbour.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=87&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sabbour.wordpress.com/2010/04/07/deploying-symbian-qt-applications-on-the-phone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50e0ba60439b30889bc9d653c9732dfd?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sabbour</media:title>
		</media:content>

		<media:content url="http://sabbour.files.wordpress.com/2010/03/1.jpg" medium="image">
			<media:title type="html">Add</media:title>
		</media:content>

		<media:content url="http://sabbour.files.wordpress.com/2010/03/2.jpg" medium="image">
			<media:title type="html">2</media:title>
		</media:content>

		<media:content url="http://sabbour.files.wordpress.com/2010/03/3.jpg" medium="image">
			<media:title type="html">3</media:title>
		</media:content>
	</item>
		<item>
		<title>Data binding from a property in the code behind</title>
		<link>http://sabbour.wordpress.com/2010/02/17/data-binding-from-a-property-in-the-code-behind/</link>
		<comments>http://sabbour.wordpress.com/2010/02/17/data-binding-from-a-property-in-the-code-behind/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 10:13:54 +0000</pubDate>
		<dc:creator>sabbour</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://sabbour.wordpress.com/?p=79</guid>
		<description><![CDATA[I&#8217;ve run across this situation multiple times, where I have for example, an ID that I get in the code behind, and I want to append it to some href in the aspx, and each time I forget how to do it, so as a reminder for myself, here is how to do it and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=79&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve run across this situation multiple times, where I have for example, an ID that I get in the code behind, and I want to append it to some href in the aspx, and each time I forget how to do it, so as a reminder for myself, here is how to do it and problems I ran into:</p>
<p>Assuming I have a property in the code behind that returns a GUID<br />
<pre class="brush: csharp;">
protected Guid CustomerId {
 get { return new Guid(); }
}
</pre></p>
<p>And assuming I have a link in my aspx page that I want to append this property to, here is how to do it<br />
<pre class="brush: csharp; html-script: true;">
&lt;a href=&quot;upgrade.aspx?id=&lt;%= CustomerId .ToString() %&gt;&quot;&gt;Upgrade&lt;/a&gt;
</pre></p>
<p>Note that this will <strong>not work</strong> if you specify a <strong>runat=server</strong> to the href for any reason, for example. to show the link or hide it according to specific logic.</p>
<p>If you need to show and hide the link, you can enclose it in a place holder and access that placeholder from the code behind<br />
<pre class="brush: csharp; html-script: true;">
&lt;asp:PlaceHolder ID=&quot;UpdgradeLinkPlaceholder&quot; runat=&quot;server&quot;&gt;
&lt;a href=&quot;upgrade.aspx?id=&lt;%= CustomerId .ToString() %&gt;&quot;&gt;Upgrade&lt;/a&gt;
&lt;/asp:PlaceHolder&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sabbour.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sabbour.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sabbour.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sabbour.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sabbour.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sabbour.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sabbour.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sabbour.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sabbour.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sabbour.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sabbour.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sabbour.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sabbour.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sabbour.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=79&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sabbour.wordpress.com/2010/02/17/data-binding-from-a-property-in-the-code-behind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50e0ba60439b30889bc9d653c9732dfd?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sabbour</media:title>
		</media:content>
	</item>
		<item>
		<title>cPanel Password Protect directory bug</title>
		<link>http://sabbour.wordpress.com/2009/04/25/cpanel-password-protect-directory-bug/</link>
		<comments>http://sabbour.wordpress.com/2009/04/25/cpanel-password-protect-directory-bug/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 01:22:26 +0000</pubDate>
		<dc:creator>sabbour</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpanel]]></category>

		<guid isPermaLink="false">http://sabbour.wordpress.com/2009/04/25/cpanel-password-protect-directory-bug/</guid>
		<description><![CDATA[Today, I was trying to password protect a directory on a website that operated the cPanel software on Bluehost and I went ahead and used the &#8220;Generate Password&#8221; function which generated this nice looking password Now when I was trying to login with this password, whatever I tried to do it gave me a 401 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=57&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today, I was trying to password protect a directory on a website that operated the cPanel software on Bluehost and I went ahead and used the &#8220;Generate Password&#8221; function which generated this nice looking password</p>
<p><pre class="brush: xml;">w7WY/a3HIUx&gt;</pre></p>
<p>Now when I was trying to login with this password, whatever I tried to do it gave me a 401 Authorization required. It just didn&#8217;t accept my password. I contacted the support of Bluehost but they weren&#8217;t able to help!</p>
<p>After some searching, I found this forum post <a href="http://forums.cpanel.net/showthread.php?t=112117">http://forums.cpanel.net/showthread.php?t=112117</a> which makes me wonder why hasn&#8217;t cPanel fixed that bug so far?</p>
<p>If your password or the generated password contains greater than (&lt;) or less than (&gt;) characters (or maybe other ones that I haven&#8217;t discovered yet), they will be filtered out by cPanel before the password is saved, effectivley changing the password you set.</p>
<p>As a work around if you really need to use those characters (I liked the generated password <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ) you can set it through the shell</p>
<p><pre class="brush: xml;">htpasswd -n username
New password: w7WY/a3HIUx&gt;
Re-type new password: w7WY/a3HIUx&gt; 

username:hash
</pre></p>
<p>Then copy the last line (username:hash) into your .htpasswd file which you can find by editing the .htaccess file in the directory that you were trying to protect. (Does this make sense?)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sabbour.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sabbour.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sabbour.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sabbour.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sabbour.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sabbour.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sabbour.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sabbour.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sabbour.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sabbour.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sabbour.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sabbour.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sabbour.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sabbour.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=57&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sabbour.wordpress.com/2009/04/25/cpanel-password-protect-directory-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50e0ba60439b30889bc9d653c9732dfd?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sabbour</media:title>
		</media:content>
	</item>
		<item>
		<title>CakePHP: Edit view mysteriously changing to Add on Save validation failure</title>
		<link>http://sabbour.wordpress.com/2009/03/25/cakephp-edit-view-mysteriously-changing-to-add-on-save-validation-failure/</link>
		<comments>http://sabbour.wordpress.com/2009/03/25/cakephp-edit-view-mysteriously-changing-to-add-on-save-validation-failure/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 01:02:18 +0000</pubDate>
		<dc:creator>sabbour</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[bugs]]></category>

		<guid isPermaLink="false">http://sabbour.wordpress.com/?p=52</guid>
		<description><![CDATA[I have never been more in need of a proper PHP debugger in my whole life. I have been stuck with a very mysterious behavior with CakePHP for the past 4 hours. I was editing a model, then saving it. For some reason, my form action was changing from /controller/edit/1 to /controller/add it was making [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=52&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have never been more in need of a proper PHP debugger in my whole life. I have been stuck with a very mysterious behavior with CakePHP for the past 4 hours.</p>
<p>I was editing a model, then saving it. For some reason, my form action was changing from</p>
<pre>/controller/edit/1
to
/controller/add</pre>
<p>it was making me go crazy!</p>
<p>After seaching around (finally) I found this: <a href="https://trac.cakephp.org/ticket/5871">https://trac.cakephp.org/ticket/5871</a><br />
I came to realize that I have actually omitted the</p>
<p><pre class="brush: php;">&lt;?= form-&gt;input('id'); ?&gt;</pre></p>
<p>from my edit view because I thought &#8220;why the hell do I need to edit the primary key?&#8221;</p>
<p>As it turns out, CakePHP needs a field (hidden or not) with the name ID or else it will revert to the ADD form.</p>
<p>Luckily though, it is smart enough to render it as a hidden field.</p>
<p>Google is your friend.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sabbour.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sabbour.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sabbour.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sabbour.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sabbour.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sabbour.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sabbour.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sabbour.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sabbour.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sabbour.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sabbour.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sabbour.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sabbour.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sabbour.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=52&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sabbour.wordpress.com/2009/03/25/cakephp-edit-view-mysteriously-changing-to-add-on-save-validation-failure/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50e0ba60439b30889bc9d653c9732dfd?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sabbour</media:title>
		</media:content>
	</item>
		<item>
		<title>Indoor Localization using Wireless LAN/WiFi Infrastructure</title>
		<link>http://sabbour.wordpress.com/2008/10/20/indoor-localization-using-wireless-lan-infrastructure/</link>
		<comments>http://sabbour.wordpress.com/2008/10/20/indoor-localization-using-wireless-lan-infrastructure/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 02:56:20 +0000</pubDate>
		<dc:creator>sabbour</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bachelorthesis]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[location based services]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://sabbour.wordpress.com/2008/10/20/indoor-localization-using-wireless-lan-infrastructure/</guid>
		<description><![CDATA[This was my bachelor thesis that I have done as part of my studies for a B.Sc. degree in Computer Science and Engineering from the German University in Cairo. Download presentation: Indoor Localization Using Wireless LAN/WiFi Infrastructure Download thesis: Indoor Localization using Wireless LAN/WiFi Infrastructure Abstract: The rapid advances in wireless technology as well as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=43&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-style:italic;">This was my bachelor thesis that I have done as part of my studies for a B.Sc. degree in Computer Science and Engineering from the German University in Cairo.</span></p>
<p><span style="font-weight:bold;">Download presentation:</span><br />
<a href="http://sabbour.files.wordpress.com/2008/10/indoor-localization-using-wireless-lan-infrastructure.ppt">Indoor Localization Using Wireless LAN/WiFi Infrastructure</a></p>
<p><span style="font-weight:bold;">Download thesis:</span><br />
<a href="http://sabbour.files.wordpress.com/2008/10/indoor_localization_using_wireless_lan_infrastructure.pdf">Indoor Localization using Wireless LAN/WiFi Infrastructure</a></p>
<p><span style="font-weight:bold;">Abstract:</span><br />
The rapid advances in wireless technology as well as in the manufacturing of portable devices caused a growing interest in location aware services. A location sensing<br />
system responsible for locating a mobile user, is a crucial factor for the success of such services. With the prevalence of wireless hotspots and wireless area networks, the use of a wireless network infrastructure as basis for an indoor positioning system becomes a viable option. In this work, we propose an indoor guide system that provides information about points of interest and objects within the vicinity of the user. Our system can be deployed on a university campus or inside a museum equipped with a wireless network.</p>
<p>The system uses the fingerprinting technique to associate position dependent information such as the strength of the received signal with a location. A range based matching algorithm for matching the physical signal strength with the fingerprints in the database is used and its performance is compared to an Euclidean distance based matching algorithm. The properties of the wireless signals and their distribution under several controlled experiments are analyzed.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sabbour.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sabbour.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sabbour.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sabbour.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sabbour.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sabbour.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sabbour.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sabbour.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sabbour.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sabbour.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sabbour.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sabbour.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sabbour.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sabbour.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=43&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sabbour.wordpress.com/2008/10/20/indoor-localization-using-wireless-lan-infrastructure/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50e0ba60439b30889bc9d653c9732dfd?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sabbour</media:title>
		</media:content>
	</item>
		<item>
		<title>Interview question: Check that an integer number is a power of two</title>
		<link>http://sabbour.wordpress.com/2008/07/24/interview-question-check-that-an-integer-is-a-power-of-two/</link>
		<comments>http://sabbour.wordpress.com/2008/07/24/interview-question-check-that-an-integer-is-a-power-of-two/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 18:36:23 +0000</pubDate>
		<dc:creator>sabbour</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[interview]]></category>

		<guid isPermaLink="false">http://sabbour.wordpress.com/?p=32</guid>
		<description><![CDATA[I got asked this question during an interview last week. I think I gave a wrong answer in the interview but I decided I needed to find the correct answer! I searched and found this solution which involved bit manipulations, though I didn&#8217;t find it intuitive. I came up with this simple solution maybe not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=32&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I got asked this question during an interview last week. I think I gave a wrong answer in the interview but I decided I needed to find the correct answer! I searched and found this <a href="http://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2">solution</a> which involved bit manipulations, though I didn&#8217;t find it intuitive.</p>
<p>I came up with this simple solution<br />
<pre class="brush: java;">
public class PowerOfTwo {
	public static void main(String args[]){
		for(int n=0,limit=16; n&lt;Math.pow(2, limit);n++)
			if(isPowerOfTwo(n))
				System.out.println(n);
	}

	private static boolean isPowerOfTwo(int n) {
		double logNbase2 =  Math.log(n)/Math.log(2);	
		int logNbase2Integer = (int) (Math.floor(logNbase2));
		
		if(logNbase2-logNbase2Integer==0)
			return true;
		else
			return false;
	}
}
</pre></p>
<p>maybe not quite as elegant as the bit hack, but I understand it!</p>
<p><b>Update:</b><br />
Actually, I understood how the bit hack function below works:<br />
<pre class="brush: java;">
	private static boolean isPowerOfTwoFast(int n) {
		return ((n!=0) &amp;&amp; (n&amp;(n-1))==0);
	}
</pre><br />
Note that powers of two have only 1 bit set to one:</p>
<pre>
1:  000001
2:  000010
4:  000100
8:  001000
16: 010000
32: 100000
</pre>
<p>and so on, so we need to check if the number only has one bit that is set, and that the number is not 0 (because zero is not a power of two).</p>
<p>We can count the number of set bits (which is another interview question!), and if the number of set bits is one, then the number is a power of two. A smarter way to do it would be bitwise ANDing of the number and the number-1, and then check that the result == 0.</p>
<p>For example, to check that 32 is a power of 2, convert 32  to binary to be 100000, convert 31 to binary to be 011111. Bitwise ANDing of those 2 numbers would obviously result in 0.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sabbour.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sabbour.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sabbour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sabbour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sabbour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sabbour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sabbour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sabbour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sabbour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sabbour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sabbour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sabbour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sabbour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sabbour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sabbour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sabbour.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sabbour.wordpress.com&amp;blog=645851&amp;post=32&amp;subd=sabbour&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sabbour.wordpress.com/2008/07/24/interview-question-check-that-an-integer-is-a-power-of-two/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50e0ba60439b30889bc9d653c9732dfd?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">sabbour</media:title>
		</media:content>
	</item>
	</channel>
</rss>
