<?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>Science and Technology Explained</title>
	<atom:link href="http://www.scitechexplained.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scitechexplained.com</link>
	<description>Stories, News, Books, and Videos on Science, Technology, Computers, Environment and the Realites of Life, for the general, smart public</description>
	<lastBuildDate>Mon, 21 Mar 2011 12:09:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Peak Oil and Dire Straits &#8211; Securing the world oil supply &#8211; But for whom?</title>
		<link>http://www.scitechexplained.com/2011/03/peak-oil-and-dire-straits-securing-the-world-oil-supply-but-for-whom/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=peak-oil-and-dire-straits-securing-the-world-oil-supply-but-for-whom</link>
		<comments>http://www.scitechexplained.com/2011/03/peak-oil-and-dire-straits-securing-the-world-oil-supply-but-for-whom/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 07:06:11 +0000</pubDate>
		<dc:creator>kawa</dc:creator>
				<category><![CDATA[Energy]]></category>
		<category><![CDATA[Environment]]></category>
		<category><![CDATA[Peak Oil]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[biofuels]]></category>
		<category><![CDATA[debt]]></category>
		<category><![CDATA[economy]]></category>
		<category><![CDATA[energy crisis]]></category>
		<category><![CDATA[finance]]></category>
		<category><![CDATA[peak oil]]></category>
		<category><![CDATA[shale gas]]></category>

		<guid isPermaLink="false">http://www.scitechexplained.com/?p=8111</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fpeak-oil-and-dire-straits-securing-the-world-oil-supply-but-for-whom%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fpeak-oil-and-dire-straits-securing-the-world-oil-supply-but-for-whom%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="float: left; margin-right:0px; margin-bottom:5px;"><a href="http://www.scitechexplained.com/2011/03/peak-oil-and-dire-straits-securing-the-world-oil-supply-but-for-whom/"><img src="https://lh3.googleusercontent.com/__Yhm-R_Alck/TYb6a08huQI/AAAAAAAABys/TxiciHYawac/art124%20-%20videos%20-%20peak%20oil%20-%20securing%20the%20world%20supply%203.png" alt="Peak Oil and Dire Straits - Securing the world oil supply - But for whom?" width="637" height="159"/></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.scitechexplained.com/2011/03/peak-oil-and-dire-straits-securing-the-world-oil-supply-but-for-whom/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creationism vs. Evolution (Who will win the debate?) &#8211; Video (Michael Ruse, Eugenie C. Scott, Barry Lynn, and Kenneth Miller)</title>
		<link>http://www.scitechexplained.com/2011/03/creationism-vs-evolution-who-will-win-the-debate/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=creationism-vs-evolution-who-will-win-the-debate</link>
		<comments>http://www.scitechexplained.com/2011/03/creationism-vs-evolution-who-will-win-the-debate/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 17:20:57 +0000</pubDate>
		<dc:creator>kawa</dc:creator>
				<category><![CDATA[Mind / Brain]]></category>
		<category><![CDATA[Psychology / Behavior]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Theory of Evolution]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[abiogenesis]]></category>
		<category><![CDATA[animal behavior]]></category>
		<category><![CDATA[atheism]]></category>
		<category><![CDATA[critical thinking]]></category>
		<category><![CDATA[evidence for evolution]]></category>
		<category><![CDATA[evolutionary psychology]]></category>
		<category><![CDATA[human behavior]]></category>
		<category><![CDATA[human evolution]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[panspermia]]></category>
		<category><![CDATA[skepticism]]></category>

		<guid isPermaLink="false">http://www.scitechexplained.com/?p=8095</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fcreationism-vs-evolution-who-will-win-the-debate%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fcreationism-vs-evolution-who-will-win-the-debate%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="float: left; margin-right:0px; margin-bottom:5px;"><a href="http://www.scitechexplained.com/2011/03/creationism-vs-evolution-who-will-win-the-debate/"><img src="https://lh6.googleusercontent.com/__Yhm-R_Alck/TYcx-YoZqUI/AAAAAAAABzQ/upR_xz_R_yo/art123%20-%20videos%20-%20evolution%20debate%202.png" alt="Creationism vs. Evolution (Who will win the debate?) – Video (Michael Ruse, Eugenie C. Scott, Barry Lynn, and Kenneth Miller)" width="637" height="159"/></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.scitechexplained.com/2011/03/creationism-vs-evolution-who-will-win-the-debate/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>What you should know before you start application development on the Android system</title>
		<link>http://www.scitechexplained.com/2011/03/what-you-should-know-before-you-start-application-development-on-the-android-system/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-you-should-know-before-you-start-application-development-on-the-android-system</link>
		<comments>http://www.scitechexplained.com/2011/03/what-you-should-know-before-you-start-application-development-on-the-android-system/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 05:59:03 +0000</pubDate>
		<dc:creator>kawa</dc:creator>
				<category><![CDATA[Android Programming]]></category>
		<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[android development]]></category>
		<category><![CDATA[android howto]]></category>
		<category><![CDATA[android java programming]]></category>
		<category><![CDATA[android programming]]></category>
		<category><![CDATA[android software]]></category>

		<guid isPermaLink="false">http://www.scitechexplained.com/?p=8054</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;&#160;&#160; First of all, if you want to start developing Android applications you&#8217;re going to first have to get used to the Java programing language because this is the means by which you&#8217;ll code your applications. Of course, if you pretty savvy with C++ or some other object oriented language then simply having some good]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fwhat-you-should-know-before-you-start-application-development-on-the-android-system%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fwhat-you-should-know-before-you-start-application-development-on-the-android-system%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="float: left; margin-right:10px;">
<a href="http://www.scitechexplained.com/2011/03/what-you-should-know-before-you-start-application-development-on-the-android-system/"><img alt="What you should know before you start application development on the Android system" src="https://lh3.googleusercontent.com/__Yhm-R_Alck/TYWXBBi96wI/AAAAAAAABxs/EojUVpXaxzY/art122%20-%20android.png" width="281" height="280"/></a>
</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; First of all, if you want to start developing Android applications you&#8217;re going to first have to get used to the Java programing language because this is the means by which you&#8217;ll code your applications. Of course, if you pretty savvy with C++ or some other object oriented language then simply having some good Java tutorials bookmarked (i like this <a href="http://download.oracle.com/javase/tutorial/reallybigindex.html" target="_blank">one</a>) and learning it on the way will not be a problem if you think you&#8217;re up to challenges that lie ahead. </p>
<p>Now, what is an Android system? It&#8217;s practically a complete development environment with a complete software stack which contains the operating system (based on the Linux 2.6 kernel), a middle-layer application framework, a set of C/C++ libraries used by various components of the system to which you have access through the  application framework mentioned above, and some core applications that you can also have access to, programmatically (I&#8217;ll explain below how why this is possible).</p>
<p>Having the Linux 2.6 Kernel at the core of the operating systems makes the platform pretty safe and well established when considering the Linux Kernel process management, memory management, networking stack, and driver model have undergone a long and arduous process of R&#038;D for years. </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The most important thing you need to know is that each application runs in its own safe-box: it has a unique <em>user ID</em> assigned by the OS, a unique process and therefore a unique virtual machine. No application can access the files or the memory of another one without being allowed to do so by Android&#8217;s kernel system. </p>
<p><font style="color:#41627E; font-size:20px; font-weight:bold;"><u><em>Application Components:</em></u></font></p>
<p>The second most important thing is the way applications are structured. Each application can be comprised of four distinct parts called <em>Application Components</em>: the <em>Activities</em>, <em>Services</em>, <em>Content Providers</em> and <em>Broadcast Receivers</em> components. What is remarkable is that from your application you can access components that belong to a different application and this is not achieved by loading the code of that component into your process&#8217; address space; no, it&#8217;s simply executed within its own kernel assigned process that has its uniquely assigned user ID. Because the Android system allows every application to start another application&#8217;s component you can practically use components from already developed applications into your own as if they are an integral part of your program. Pretty neat!</p>
<p>Because each application is loaded by its own process into its own address space, and because each application can start (use) any others&#8217; component this means that there is no central station, no entry point of the whole system or as Android&#8217;s Documentation puts it &#8220;<em>Android applications don&#8217;t have a single entry point (there&#8217;s no main() function, &#8230;..)</em>&#8220;. </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; What are the application components? <em>Activities</em> are simply a singe screen or window that contains a user interface. A certain application can contain lots of <em>activities</em> designed to achieve a specific goal. They all are part of the application even though they are treated as separate when you program their functionality. </p>
<p><em>Services</em> are simply background processes which can run for the whole execution time of the application. You can think of them as the core/heart of you application because they can coordinate the activities for the other components, they can trigger specific actions at certain times, they can access the network, etc. </p>
<p><em>Broadcast receivers</em> are simply listeners for system broadcasts or application broadcasts. Your own application can generate broadcasts that can be catched by Broadcast receivers. These components can have a wide variety of uses one being that they can be used as triggers in your application&#8217;s workflow logic when certain system events or other application generated events take place. </p>
<div class="wp-caption aligncenter" style="width: 650px"><img alt="Android Architecture" src="https://lh6.googleusercontent.com/__Yhm-R_Alck/TYZTrVlGEJI/AAAAAAAAByM/1sUjX2FfR2E/s800/art122%20-%20system-architecture%202.png" title="Android Architecture" width="640" height="460" /><p class="wp-caption-text">Android Architecture</p></div>
<p>And finally, <em>Content Providers</em>. They are data storage providers: databases, file system data, web storage, etc., these can all be accessed by means of a <em>Content Provider</em>. What&#8217;s interesting is that different applications can share (read, modify) data contained in the same Content Provider object which is practically a shared set of application data; one interesting example is the contacts (<em>ContactsContract.Data</em>) <em>Content Provider</em> which contains user contact information (such as a phone number) and its associated metadata (such as whether it is a work or home number, email, etc) and can be accessed and modified by applications that have the appropriate privileges (meaning the ones that have been programmed to have these privileges, and subsequently have been installed by the user of the device).</p>
<h1 style="text-align: left;"><strong><span id="more-8054"></span></strong></h1>
<p><font style="color:#41627E; font-size:20px; font-weight:bold;"><u><em>Activating Application Components:</em></u></font></p>
<p>The <em>Activities</em>, <em>Services</em> and <em>Broadcast Receivers</em> components can be activated directly by announcing the kernel your <em>intent</em> to use an <em>activity</em> that is part of your own application or someone else&#8217;s, to start a <em>service</em>, or to start a <em>broadcast</em>. You simply have to pass a <em>Intent</em> object to the Android system through a specific method (<strong>startActivity()</strong> or <strong>startActivityForResult()</strong> for <em>Activities</em>, <strong>startService()</strong> or <strong>bindService()</strong> for <em>Services</em>, and <strong>sendBroadcast()</strong>, <strong>sendOrderedBroadcast()</strong>, or <strong>sendStickyBroadcast()</strong> for <em>Broadcasting</em>).</p>
<p>What is more interesting is that besides, of course, being able to specify the name of the class of the component which you wish to start, the Android system lets you act more implicit by allowing you to use another type of intent : <em>Intent Actions </em>: these represent <em>types of actions</em> which you can let the OS handle for you. For example you can let the Android system know that your application is in need for a <em>&#8220;send&#8221; action</em> of an e-mail, so if the OS finds multiple components that are registered with this action it provides the user with a list to chose from. You can even create your own application components and register them with your own actions. Now that&#8217;s complete modularity! Genius!</p>
<p><font style="color:#41627E; font-size:20px; font-weight:bold;"><u><em>The Manifest File:</em></u></font></p>
<p>The manifest file is practically the application configuration file which the Android System reads in order to find out what components comprise your application. Here you declare all your activities, services, broadcasts, and content providers. </p>
<p>You can even create filters for your application so that only the devices that have the required hardware implementation and the specific software libraries will be able to run it. You can filter for the screen size and density, user input mechanisms, hardware capabilities like the camera, the light sensor, Bluetooth, or the fidelity of the touchscreen, the version of the Android system, etc. You can even create multiple language texts, different UIs for different devices so that your application can automatically load the correct ones with no need to modify the source code. All these can be achieved in the <em>AndroidManifest.xml</em> file.</p>
<p>More <a href="http://developer.android.com/guide/topics/fundamentals.html#ActivatingComponents" target="_blank">here</a> and <a href="http://developer.android.com/guide/basics/what-is-android.html" target="_blank">here</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.scitechexplained.com/2011/03/what-you-should-know-before-you-start-application-development-on-the-android-system/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Shinkansen Hayabusa &#8211; The ultimate bullet train &#8211; VIDEO</title>
		<link>http://www.scitechexplained.com/2011/03/shinkansen-hayabusa-the-ultimate-bullet-train-video/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=shinkansen-hayabusa-the-ultimate-bullet-train-video</link>
		<comments>http://www.scitechexplained.com/2011/03/shinkansen-hayabusa-the-ultimate-bullet-train-video/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 10:11:42 +0000</pubDate>
		<dc:creator>kawa</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[bullet trains]]></category>
		<category><![CDATA[japanesse bullet trains]]></category>
		<category><![CDATA[shinkansen hayabusa]]></category>

		<guid isPermaLink="false">http://www.scitechexplained.com/?p=8006</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fshinkansen-hayabusa-the-ultimate-bullet-train-video%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fshinkansen-hayabusa-the-ultimate-bullet-train-video%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="float: left; margin-right:0px; margin-bottom:5px;"><a href="http://www.scitechexplained.com/2011/03/shinkansen-hayabusa-the-ultimate-bullet-train-video/"><img alt="Shinkansen Hayabusa - The ultimate bullet train - VIDEO" src="https://lh3.googleusercontent.com/__Yhm-R_Alck/TYSGOmdkWeI/AAAAAAAABxU/ovVTp43RfyM/art121%20-%20videos%20-%20hayabusa%20bullet%20train%204.png" width="637" height="159"/></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.scitechexplained.com/2011/03/shinkansen-hayabusa-the-ultimate-bullet-train-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Peak Growth &#8211; Are Humans Smarter Than Yeast?</title>
		<link>http://www.scitechexplained.com/2011/03/peak-growth-are-humans-smarter-than-yeast/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=peak-growth-are-humans-smarter-than-yeast</link>
		<comments>http://www.scitechexplained.com/2011/03/peak-growth-are-humans-smarter-than-yeast/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 05:35:30 +0000</pubDate>
		<dc:creator>kawa</dc:creator>
				<category><![CDATA[Energy]]></category>
		<category><![CDATA[Environment]]></category>
		<category><![CDATA[Peak Oil]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[biofuels]]></category>
		<category><![CDATA[economy]]></category>
		<category><![CDATA[energy crisis]]></category>
		<category><![CDATA[finance]]></category>
		<category><![CDATA[human behavior]]></category>
		<category><![CDATA[peak oil]]></category>
		<category><![CDATA[richard heinberg]]></category>
		<category><![CDATA[shale gas]]></category>
		<category><![CDATA[solar energy]]></category>

		<guid isPermaLink="false">http://www.scitechexplained.com/?p=7877</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fpeak-growth-are-humans-smarter-than-yeast%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fpeak-growth-are-humans-smarter-than-yeast%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="float: left; margin-right:0px; margin-bottom:5px;"><a href="http://www.scitechexplained.com/2011/03/peak-growth-are-humans-smarter-than-yeast/"><img alt="Peak Growth - Are Humans Smarter Than Yeast? " src="https://lh6.googleusercontent.com/__Yhm-R_Alck/TYGd8zZpyTI/AAAAAAAABuc/L0cA7TDOGqw/art119%20-%20videos%20-%20peak%20growth%20-%20richard%20heinberg%202.png" width="637" height="159"/></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.scitechexplained.com/2011/03/peak-growth-are-humans-smarter-than-yeast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Peak Everything &#8211; Are Humans Smarter Than Yeast?</title>
		<link>http://www.scitechexplained.com/2011/03/peak-everything-are-humans-smarter-than-yeast/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=peak-everything-are-humans-smarter-than-yeast</link>
		<comments>http://www.scitechexplained.com/2011/03/peak-everything-are-humans-smarter-than-yeast/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 20:24:43 +0000</pubDate>
		<dc:creator>kawa</dc:creator>
				<category><![CDATA[Energy]]></category>
		<category><![CDATA[Environment]]></category>
		<category><![CDATA[Peak Oil]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[biofuels]]></category>
		<category><![CDATA[economy]]></category>
		<category><![CDATA[energy crisis]]></category>
		<category><![CDATA[finance]]></category>
		<category><![CDATA[human behavior]]></category>
		<category><![CDATA[peak oil]]></category>
		<category><![CDATA[richard heinberg]]></category>
		<category><![CDATA[shale gas]]></category>
		<category><![CDATA[solar energy]]></category>

		<guid isPermaLink="false">http://www.scitechexplained.com/?p=7872</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fpeak-everything-are-humans-smarter-than-yeast%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fpeak-everything-are-humans-smarter-than-yeast%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="float: left; margin-right:0px; margin-bottom:5px;"><a href="http://www.scitechexplained.com/2011/03/peak-everything-are-humans-smarter-than-yeast/"><img alt="Peak Everything - Are Humans Smarter Than Yeast? " src="https://lh5.googleusercontent.com/__Yhm-R_Alck/TYEcYjIpeNI/AAAAAAAABuA/J6uoaJFoXtQ/art118%20-%20videos%20-%20peak%20oil%20-%20richard%20heinberg.png" width="637" height="159"/></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.scitechexplained.com/2011/03/peak-everything-are-humans-smarter-than-yeast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Peak Oil Video Update &#8211; Interview with Colin Campbell</title>
		<link>http://www.scitechexplained.com/2011/03/peak-oil-video-update-interview-with-colin-campbell/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=peak-oil-video-update-interview-with-colin-campbell</link>
		<comments>http://www.scitechexplained.com/2011/03/peak-oil-video-update-interview-with-colin-campbell/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 15:19:26 +0000</pubDate>
		<dc:creator>kawa</dc:creator>
				<category><![CDATA[Energy]]></category>
		<category><![CDATA[Environment]]></category>
		<category><![CDATA[Peak Oil]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[biofuels]]></category>
		<category><![CDATA[colin campbell]]></category>
		<category><![CDATA[economy]]></category>
		<category><![CDATA[energy crisis]]></category>
		<category><![CDATA[finance]]></category>
		<category><![CDATA[human behavior]]></category>
		<category><![CDATA[peak oil]]></category>
		<category><![CDATA[shale gas]]></category>
		<category><![CDATA[solar energy]]></category>

		<guid isPermaLink="false">http://www.scitechexplained.com/?p=7704</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fpeak-oil-video-update-interview-with-colin-campbell%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fpeak-oil-video-update-interview-with-colin-campbell%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="float: left; margin-right:0px; margin-bottom:5px;"><a href="http://www.scitechexplained.com/2011/03/peak-oil-video-update-interview-with-colin-campbell/"><img alt="Peak Oil Video Update - Interview with Colin Campbell " src="https://lh3.googleusercontent.com/__Yhm-R_Alck/TX4wgbzfNiI/AAAAAAAABo4/cN4eSDvuKDg/art116%20-%20videos%20-%20peak%20oil%20campbell.png" width="637" height="159"/></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.scitechexplained.com/2011/03/peak-oil-video-update-interview-with-colin-campbell/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to write a &#8220;Hello World&#8221; Safari Extension in Windows</title>
		<link>http://www.scitechexplained.com/2011/03/how-to-write-a-hello-world-safari-extension-in-windows/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-write-a-hello-world-safari-extension-in-windows</link>
		<comments>http://www.scitechexplained.com/2011/03/how-to-write-a-hello-world-safari-extension-in-windows/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 12:40:52 +0000</pubDate>
		<dc:creator>kawa</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[browser addons]]></category>
		<category><![CDATA[browser extension programming]]></category>
		<category><![CDATA[browser extensions]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[safari addons]]></category>
		<category><![CDATA[safari extensions]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.scitechexplained.com/?p=7515</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;&#160;&#160; We&#8217;re going to build a simple Safari extension that will insert a bolded, italicized, Hello World text into the web-page of the current tab after it is loaded. We&#8217;re going to use Safari 5.0 or later in order to have access to Extension Builder, that is, the means by which we&#8217;ll build our extension.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fhow-to-write-a-hello-world-safari-extension-in-windows%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F03%2Fhow-to-write-a-hello-world-safari-extension-in-windows%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="float: left; margin-right:10px;">
<a href="http://www.scitechexplained.com/2011/03/how-to-write-a-hello-world-safari-extension-in-windows/"><img alt="How to write a Hello World Safari Extension in Windows" src="https://lh5.googleusercontent.com/__Yhm-R_Alck/TV0WrbzaHoI/AAAAAAAABkE/K-8KwVYfGTI/art115%20-%20safari%20hello%20world.jpg" width="281" height="280"/></a>
</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We&#8217;re going to build a simple Safari extension that will insert a bolded, italicized, <strong><em>Hello World</em></strong> text into the web-page of the current tab after it is loaded.</p>
<p>We&#8217;re going to use Safari 5.0 or later in order to have access to <strong>Extension Builder</strong>, that is, the means by which we&#8217;ll build our extension. Extensions were introduced in Safari 5.0, and were disabled by default, so in Safari 5.0 you must enable extensions in the Develop menu before you can show Extension Builder. <em>Extensions are enabled by default in Safari 5.0.1 and later.</em></p>
<p><font style="color:#41627E; font-size:20px; font-weight:bold;"><u>[Before we start coding]</u></font>:<br />
The <em>Safari Extensions Development Guide</em> states that before you can build and install an extension, you need to install a developer certificate. You obtain a certificate by first signing up for the Safari Developer Program at <a href="http://developer.apple.com/programs/safari/" target="_blank">http://developer.apple.com/programs/safari/</a>. You must first create an account and register all your personal information (phone, address, country code, etc &#8211; there&#8217;s no need of course to enter genuine information if you care for you privacy on the Internet &#8211; bogus data will suffice) .</p>
<p>You&#8217;ll obtain an Individual ID that will be usable for a period of 12 months. You then have to access <a href="http://developer.apple.com/membercenter/index.action" target="_blank">http://developer.apple.com/membercenter/index.action</a> and install your certificate by double-clicking the Developer Certificate Utility icon in order to Request and manage your Apple-issued Certificates for Mac and Safari. This launches the Certificate Import Wizard on a Windows machine. You then have to click <em>Create Certificates</em>, then <em>Add Certificate</em> and follow the instructions. Pretty arduous operation compared to what you have to do to get things working in Chrome or Firefox but hey, what are you going to do if you need the thing badly ?! (NOTE: Windows XP Professional and Windows Server 2003 will have to download the following <a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=86B71A4F-4122-44AF-BE79-3F101E533D95&#038;displaylang=en" target="_blank">Administration Tools Pack</a> in order to be able to follow the above steps)</p>
<p>After all this you&#8217;ll be prompted to download your certificate (<strong><em>safari_identity.cer</em></strong>). You&#8217;ll have to double-click the downloaded *.cer file to install it.</p>
<p><font style="color:#41627E; font-size:20px; font-weight:bold;"><u>[Activating Extension Builder]</u></font>:<br />
In order to use Extension Builder we&#8217;re going to first activate it; we do this by enabling the Safari developer tools when we click &#8220;<em>Show Develop menu in menu bar</em>&#8221; checkbox in the Advanced pane of Safari Preferences, as shown below. You can access Safari Preferences by clicking the top-right gear button that says &#8220;<em>Display a menu of general Safari settings</em>&#8220;.</p>
<div class="wp-caption aligncenter" style="width: 650px"><img alt="How to activate Develop menu in Safari" src="https://lh4.googleusercontent.com/__Yhm-R_Alck/TX4EKDjVMiI/AAAAAAAABoI/fsrHbwseNsI/s800/art115%20-%20extension%20builder%204.png" title="How to activate Develop menu in Safari" width="640" height="288" /><p class="wp-caption-text">How to activate Develop menu in Safari</p></div>
<p>We then go to the Develop menu and click <em>Show Extension Builder</em>; In the displayed dialog we hit the + button on the left-bottom and click New Extension, chose the path and the folder name and then insert the required fields of your extension:</p>
<div class="wp-caption aligncenter" style="width: 650px"><img alt="Extension Info, Details, Versions, Website Access and Global Page Settings" src="https://lh6.googleusercontent.com/__Yhm-R_Alck/TX4Ey1EcE6I/AAAAAAAABoM/IWyJil_sRec/s800/art115%20-%20extension%20bulder%2055.png" title="Extension Info, Details, Versions, Website Access and Global Page Settings" width="640" height="750" /><p class="wp-caption-text">Extension Info, Details, Versions, Website Access, Global Page, and Global Storage Settings </p></div>
<p>The required fields for the above are : </p>
<ul>
<li><strong>1. Display Name</strong>: the visible name of your extension</li>
<li><strong>2. Bundle Identifier</strong>: this is a string in reverse DNS format : your type of website (com, gov, edu, org, and so on), your company name, and the extension name, separated by dots -> ex: <em>com.lexdesign.hello</em>. </strong></li>
<li><strong>3. Display Version</strong>: the displayed version number for your extension.</li>
<li><strong>4. Bundle Version</strong>, that is, the internal version number used by the OS. One or more digits separated by periods (ex: 1 or 4.1.2). This is the version number Safari uses when checking for updates.</li>
</ul>
<div class="wp-caption aligncenter" style="width: 650px"><img alt="Chrome, Extension Scripts, and Settings " src="https://lh5.googleusercontent.com/__Yhm-R_Alck/TX4FTOYyBvI/AAAAAAAABoQ/HOjQDjlxVn8/s800/art115%20-%20extension%20bulder%2066.png" title="Chrome, Extension Scripts, and Settings " width="640" height="646" /><p class="wp-caption-text">Chrome, Extension Scripts, and Settings </p></div>
<p>The optional fields above can contain the following : </p>
<ul>
<li>The <strong>Extension Chrome</strong> section can include am <em>Extension Bar</em> to be included below the bookmarks bar and above the tab bar, which is uniquely reserved for your extension, <em>Context Menu Items</em>, and <em>Toolbar Items</em>, that is, buttons added to the main Safari toolbar (not your specific extension bar).</li>
<li>The <strong>Injected Extension Content</strong> section can include <em>Start Scripts</em>, that is, scripts executed before the webpage is loaded, <em>End Scripts</em> which execute when the body tag&#8217;s <em>onload</em> event occurs, and <em>Style Sheets</em>: CSS coding used to style the HTML. </li>
</ul>
<p>Of course there are a lot of other fields. If you want to get the grips with all of them you can check Apple&#8217;s Safari Extensions Development Guide -> <a href="http://developer.apple.com/library/safari/#documentation/Tools/Conceptual/SafariExtensionGuide/UsingExtensionBuilder/UsingExtensionBuilder.html#//apple_ref/doc/uid/TP40009977-CH2-SW1" target="_blank">Using Extension Builder</a>. </p>
<p>Now that we&#8217;ve bootstrapped the basic Safari Extension Starting Kit we will start to code the extension that will insert a bolded, italicized, <strong><em>Hello World</em></strong> text into the web-page of the current tab after it is loaded. This application can have various interesting uses: it could be used to insert specialized controls into specific websites that lack certain idiosyncratic features that the user may demand. Let&#8217;s begin!</p>
<p><font style="color:#41627E; font-size:20px; font-weight:bold;"><u>[Injecting the text]</u></font>:<br />
<strong>inject.js</strong> is going to be added as an <em>End Script</em> in the <em>Injected Extension Content</em> section of Extension Builder. Being an end script means that the *.js file will be executed after the body tag’s onload event occurs. We&#8217;ll also use jQuery for easy manipulation of the DOM. We&#8217;ll insert <a href="http://jquery.com/" target="_blank">jQuery</a> as an End Script also. </p>
<p>You can get the latest, Minified (compressed) jQuery from <a href="http://docs.jquery.com/Downloading_jQuery" target="_blank">http://docs.jquery.com/Downloading_jQuery</a>.</p>
<p>Here is the <strong>inject.js</strong> file that will insert our Hello World text :</p>
<pre class="brush: jscript; title: ;">
// &lt;inject.js&gt; insert a Hellow World text into the body of the document

function PageShowHandler(event)
{
	injectText();
}

function injectText()
{
    // get the document body
	var pageBody = jQuery('body', document);
	console.log('entered injectText');
	pageBody.prepend('&lt;h1&gt;Hello World&lt;/h1&gt;');
}

// wait 100 ms in order for jquery-1.5.1.min.js to be injected also
// if you don't want to wait just change the order of loading of jquery-1.5.1.min.js
//   and inject.js in Extension Builder-&gt; Injected Extension Content -&gt; End Scripts
setTimeout(PageShowHandler, 100);
</pre>
<p>Please notice that we use the jQuery <strong>.prepend( content, [ content ] )</strong> function that inserts content, specified by the parameter, to the beginning of each element in the set of matched elements. </p>
<p>Also, instead of directly executing the PageShowHandler function to insert our text into the body of the document, we user a timer and waited 100ms in order for jQuery to load. So, if you want to instantly use <em>PageShowHandler</em>, without a time, you should change the order of injection of the two javascript files in <em>Extension Builder -> Injected Extension Content -> End Scripts</em> as below: </p>
<div class="wp-caption aligncenter" style="width: 650px"><img alt="The order of injection matters; specify the jQuery file first" src=" https://lh3.googleusercontent.com/__Yhm-R_Alck/TX4DYl16VtI/AAAAAAAABoA/EajCECDTeM0/s800/art115%20-%20extension%20builder%203.png" title="The order of injection matters; specify the jQuery file first" width="640" height="300" /><p class="wp-caption-text">The order of injection matters; specify the jQuery file first</p></div>
<h1 style="text-align: left;"><strong><span id="more-7515"></span></strong></h1>
<p>In the code above we simply used the timer in order to prove that the order of injection matters, of course. </p>
<p>Now, if jQuery is loaded first that means our <strong>inject.js</strong> file can do its job without using the setTimeout timer function.</p>
<pre class="brush: jscript; title: ;">
// &lt;inject.js&gt; insert a Hellow World text into the body of the document

function PageShowHandler(event)
{
	injectText();
}

function injectText()
{
    // get the document body
	var pageBody = jQuery('body', document);
	console.log('entered injectText');
	pageBody.prepend('&lt;h1&gt;Hello World&lt;/h1&gt;');
}

PageShowHandler();
</pre>
<p>Now you just have to click the top-right <em>Install</em> button from the Extension Builder dialog and that&#8217;s all. Here&#8217;s the extension in action here : </p>
<p><center>
<p>
<iframe title="YouTube video player" width="640" height="480" src="http://www.youtube.com/embed/Yq930INDY6I" frameborder="0" allowfullscreen></iframe></p>
<p></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scitechexplained.com/2011/03/how-to-write-a-hello-world-safari-extension-in-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to move the position of a certain bit within a byte ( coding the C language )</title>
		<link>http://www.scitechexplained.com/2011/02/how-to-move-the-position-of-a-certain-bit-within-a-byte-c-language/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-move-the-position-of-a-certain-bit-within-a-byte-c-language</link>
		<comments>http://www.scitechexplained.com/2011/02/how-to-move-the-position-of-a-certain-bit-within-a-byte-c-language/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 14:05:36 +0000</pubDate>
		<dc:creator>kawa</dc:creator>
				<category><![CDATA[C language]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[bit operations in c]]></category>
		<category><![CDATA[bit programming in c]]></category>
		<category><![CDATA[c bitwise operators]]></category>
		<category><![CDATA[c bitwise programming]]></category>
		<category><![CDATA[c language]]></category>
		<category><![CDATA[c# programming]]></category>

		<guid isPermaLink="false">http://www.scitechexplained.com/?p=7456</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;&#160;&#160; You want to move bits inside a byte? Unfortunately, there aren&#8217;t any standard functions that deal with these sort of issues so we will have to use some smart and easy hacks. First of all we need to use the tilde operator (~). Tilde is a bitwise not operator; this practically means that applying]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F02%2Fhow-to-move-the-position-of-a-certain-bit-within-a-byte-c-language%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F02%2Fhow-to-move-the-position-of-a-certain-bit-within-a-byte-c-language%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="float: left; margin-right:10px;">
<a href="http://www.scitechexplained.com/2011/02/how-to-move-the-position-of-a-certain-bit-within-a-byte-c-language/"><img alt="How to move the position of a certain bit within a byte ( coding the C language )" src="https://lh3.googleusercontent.com/__Yhm-R_Alck/TVvZFZLC1PI/AAAAAAAABjI/7Kw6uCMItSA/art114%20-%20code%20bits.jpg" width="281" height="280"/></a>
</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; You want to move bits inside a byte? Unfortunately, there aren&#8217;t any standard functions that deal with these sort of issues so we will have to use some smart and easy hacks. </p>
<p>First of all we need to use the tilde operator (~). Tilde is a bitwise not operator; this practically means that applying it to a certain operand&#8217;s binary value converts all the 1s to 0s and viceversa (~b0001 0010 = b1110 1101). </p>
<p>So what&#8217;s the use of tilde in our little program. We&#8217;re going to use it to create a mask that will delete (make 0) the bit of a certain location, that is, the bit we&#8217;re trying to move to another position, but we&#8217;ll also delete the bit from the destination position. </p>
<p>For example we have the byte 0xc3, and we need to move the bit from position 1 to position 5. Tilde will create a mask that will be used to delete the bit in position 1 (all the mask&#8217;s bits are 1s besides the bit at the position we&#8217;re trying to delete from which is of value 0) and position 5 (see line 14 and 15). </p>
<p>The mask achieves the delete of the bit by being AND-ed with our byte. Then we will OR the byte that we deleted the bits from (<strong>oldvalue</strong>) with another mask that contains the bit &#8211; of which value we read at line 12 with <u>0&#215;01 &#038; ((*our)>>indexold)</u> &#8211; we will be writing at position 5. This new mask is of course made of all zeros besides the bit at position 5 which is of value <strong>valuetochange</strong>(=1 in our case) :</p>
<pre class="brush: cpp; title: ;">    //  example 1 (move bit from position 1 to position 5)
	//  1100 0011
    //    ^    ^     BYTE        MASK        DEL BIT
    //               bit to be changed position has value 1
	//               1100 0011 &amp; 1111 1101 = 1100 0001
    //               1100 0001 &amp; 1101 1111 = 1100 0001 

    //               DEL BIT     MASK        NEW BYTE
	//               1100 0001 | 0010 0000 = 1110 0001</pre>
<p>So practically we begin by registering the value of the bit we want to move in the <strong><em>valuetochange</em></strong> variable. We then delete the bits from both the current position of the bit we want to change the position of and its future position. Finally, we write the value from <strong><em>valuetochange</em></strong> into out byte. This is all achieved by: </p>
<pre class="brush: cpp; title: ;">	//
	valuetochange = 0x01 &amp; ((*our)&gt;&gt;indexold);         // get the value of the bit to be moved

	oldvalue = (*our) &amp; (~(1&lt;&lt;(indexold)));            // del the bit from position indexold
	oldvalue = oldvalue &amp; (~(1&lt;&lt;(indexnew)));          // del the bit from position indexnew

	newvalue = oldvalue | (valuetochange&lt;&lt;(indexnew)); // write bit in new position (indexnew)
	//</pre>
<p>Here&#8217;s all the code. I&#8217;ve compiled it using Visual Studio 2010, but earlier version should suffice for this little project. </p>
<pre class="brush: cpp; title: ;">#include &lt;stdio.h&gt;
#include &lt;malloc.h&gt;

typedef unsigned __int8 byte;

byte move(byte* our, int indexold, int indexnew)
{
	byte oldvalue;
	byte newvalue;
	byte valuetochange;

	valuetochange = 0x01 &amp; ((*our)&gt;&gt;indexold);         // get the value of the bit to be moved
	printf(&quot;value to change : %d\n&quot;, valuetochange);
	oldvalue = (*our) &amp; (~(1&lt;&lt;(indexold)));            // del the bit from position indexold
	oldvalue = oldvalue &amp; (~(1&lt;&lt;(indexnew)));          // del the bit from position indexnew
	printf(&quot;deleted: %x\n&quot;, oldvalue);

	newvalue = oldvalue | (valuetochange&lt;&lt;(indexnew)); // write bit in new position (indexnew)

	return newvalue;
}

int main()
{
	byte* example_byte;
	byte* new_byte;

	example_byte = (byte*)malloc(sizeof(byte));
	new_byte     = (byte*)malloc(sizeof(byte));

	*example_byte = 0xc3;  //  hex 0xc3 = binary 1100 0011
	printf(&quot;\n&quot;);

	//*****************************************************
	// example 1 (move bit from position 1 to position 5)
	// example_byte  1100 0011
    //                 ^    ^
    //               memorize bit -&gt; valuetochange = 0x01 &amp; ((*our)&gt;&gt;indexold) = 1
	//               1100 0011 &amp; 1111 1101 = 1100 0001 delete bit from oldindex (1)
	//               1100 0001 &amp; 1101 1111 = 1100 0001 delete bit from newindex (5)
	// new_byte      1100 0001 | 0010 0000 = 1110 0001
	*new_byte     = move(example_byte, 1, 5);

	printf(&quot;old byte : %x\n&quot;, *example_byte); // 0xc3 (1100 0011)
	printf(&quot;new byte : %x\n&quot;, *new_byte);     // 0xe1 (1110 0001)
	printf(&quot;\n&quot;);

	//*****************************************************
	// example 2 (move bit from position 6 to position 3)
	// example_byte  1100 0011
    //                ^   ^
    //               memorize bit -&gt; valuetochange = 0x01 &amp; ((*our)&gt;&gt;indexold) = 1
	//               1100 0011 &amp; 1011 1111 = 1000 0011 delete bit from oldindex (6)
	//               1000 0011 &amp; 1111 0111 = 1000 0011 delete bit ftom newindex (3)
	// new_byte      1000 0011 | 0000 1000 = 1000 1011
	*new_byte     = move(example_byte, 6, 3);

	printf(&quot;old byte : %x\n&quot;, *example_byte); // 0xc3 (1100 0011)
	printf(&quot;new byte : %x\n&quot;, *new_byte);     // 0x8b (1000 1011)
	printf(&quot;\n&quot;);

	//*****************************************************
	// example 3 (move bit from position 2 to position 6)
	// example_byte  1100 0011
    //                ^    ^
    //               memorize bit -&gt; valuetochange = 0x01 &amp; ((*our)&gt;&gt;indexold) = 0
	//               1100 0011 &amp; 1111 1011 = 1100 0011 delete bit from oldindex (2)
	//               1100 0011 &amp; 1011 1111 = 1000 0011 delete bit from oldindex (6)
	// new_byte      1000 0011 | 0000 0000 = 1000 0011
	*new_byte     = move(example_byte, 2, 6);

	printf(&quot;old byte : %x\n&quot;, *example_byte); // 0xc3 (1100 0011)
	printf(&quot;new byte : %x\n&quot;, *new_byte);     // 0x83 (1000 0011)
	printf(&quot;\n&quot;);

	//*****************************************************
	// example 4 (move bit from position 2 to position 4)
	// example_byte  1100 0011
    //                  ^  ^
    //               memorize bit -&gt; valuetochange = 0x01 &amp; ((*our)&gt;&gt;indexold) = 0
	//               1100 0011 &amp; 1111 1011 = 1100 0011 delete bit from oldindex (2)
	//               1100 0011 &amp; 1110 1111 = 1100 0011 delete bit from oldindex (4)
	// new_byte      1100 0011 | 0000 0000 = 1100 0011
	*new_byte     = move(example_byte, 2, 4);

	printf(&quot;old byte : %x\n&quot;, *example_byte); // 0xc3 (1100 0011)
	printf(&quot;new byte : %x  &quot;, *new_byte);     // 0xc3 (1100 0011)
	printf(&quot;\n&quot;);

	free(new_byte);
	free(example_byte);
	return 0;
}</pre>
<h1 style="text-align: left;"><strong><span id="more-7456"></span></strong></h1>
<p><img alt="Results" src="https://lh4.googleusercontent.com/__Yhm-R_Alck/TVwpdO3HexI/AAAAAAAABjw/Wq2yhVQjg8Q/arter.JPG" title="Results" class="aligncenter" width="600" height="297" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scitechexplained.com/2011/02/how-to-move-the-position-of-a-certain-bit-within-a-byte-c-language/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Book Review &#8211; Darwin&#8217;s Dangerous Idea by Daniel C. Dennett</title>
		<link>http://www.scitechexplained.com/2011/02/book-review-darwins-dangerous-idea-by-daniel-c-dennett/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=book-review-darwins-dangerous-idea-by-daniel-c-dennett</link>
		<comments>http://www.scitechexplained.com/2011/02/book-review-darwins-dangerous-idea-by-daniel-c-dennett/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 16:33:22 +0000</pubDate>
		<dc:creator>kawa</dc:creator>
				<category><![CDATA[Book Review]]></category>
		<category><![CDATA[Mind / Brain]]></category>
		<category><![CDATA[Psychology / Behavior]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Theory of Evolution]]></category>
		<category><![CDATA[animal behavior]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[atheism]]></category>
		<category><![CDATA[cognition]]></category>
		<category><![CDATA[consciousness]]></category>
		<category><![CDATA[daniel dennett]]></category>
		<category><![CDATA[evidence for evolution]]></category>
		<category><![CDATA[human behavior]]></category>
		<category><![CDATA[human evolution]]></category>
		<category><![CDATA[memetics]]></category>
		<category><![CDATA[skepticism]]></category>

		<guid isPermaLink="false">http://www.scitechexplained.com/?p=7405</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;&#160;&#160; The four aitia&#8230; That is what Aristotle used as tools of mind in order to fully understand all that is understandable about anything in the universe. For example, you want to know what a hammer is? Well, you&#8217;ll just have to ask yourself what is the material cause of this object, or what is]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F02%2Fbook-review-darwins-dangerous-idea-by-daniel-c-dennett%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scitechexplained.com%2F2011%2F02%2Fbook-review-darwins-dangerous-idea-by-daniel-c-dennett%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="float: left; margin-right:10px;">
<a href="http://www.scitechexplained.com/2011/02/book-review-darwins-dangerous-idea-by-daniel-c-dennett/"><img alt="Book Review - Darwin's Dangerous Idea by Daniel C. Dennett" src="https://lh5.googleusercontent.com/__Yhm-R_Alck/TVVlCG6nOfI/AAAAAAAABh8/BaLVGP9BlGw/art113%20-%20ddi%20review%203.jpg" width="281" height="280"/></a>
</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The four <em>aitia</em>&#8230; That is what Aristotle used as tools of mind in order to fully understand all that is understandable about anything in the universe. For example, you want to know what a hammer is? Well, you&#8217;ll just have to ask yourself what is the <em>material cause</em> of this object, or what is it made of; that&#8217;s an easy answer: it&#8217;s made of wood and iron, maybe cured steel or another high rigidity/resistance metal. After this, you&#8217;ll have to ask yourself what is the <em>formal cause</em> of this object called hammer, or what is its architecture, its design, how do all its elements hang on to each other, and what are its most inner workings; for a hammer this shouldn&#8217;t be a hard question to answer: the wooden rigid stick, which is tailor made for grabbing with one or two hands, is firmly attached to the metallic compact solid mass which represents the hammer head that comes in many forms and sizes depending on what the hammer was designed to do. And here we are at the third question we might ask about this object, and that is what is its <em>efficient cause</em>, who or what natural or artificial industrial process created this object; that&#8217;s an easy answer, right?! Yes, a interesting answer for an interesting question, but not as interesting as the last <em>aitia</em>&#8230;</p>
<p>What is the <em>final cause</em> of this object? What&#8217;s it made for? Well, even though it was designed for a specific purpose like driving nails, forging metal, fitting parts, and breaking up objects, its <em>reason d&#8217;etre</em> could be as various as human nature. Who hasn&#8217;t heard about Hell&#8217;s Angels favorite weapon, the ball pean hammer?! It&#8217;s as sexy and dangerous as it can be useful in the house. This <em>reason d&#8217;etre</em>, the purpose, the meaning of things stays at the heart of Dennett&#8217;s undertaking. Even though we start with hammers and simple things we will finally dodge the most sacred of mysteries&#8230; the origin of man, the meaning of life. How will Dennett manage to derive meaning, purpose from nature&#8217;s red in tooth and claw, that&#8217;s an answer you&#8217;ll find by reading the book. Here, we will skim through the ideas of the thinkers that lived before Darwin which laid down the most beautiful but least understood &#8211; by friend or foe &#8211; scientific theory that ever existed. Beautiful, but what dreadful implications to our human existence it had!</p>
<div class="wp-caption alignleft" style="width: 392px"><img alt="Hell&#039;s Angels Ball-Pean Hammer" src="https://lh5.googleusercontent.com/__Yhm-R_Alck/TVgNl67hURI/AAAAAAAABik/Boo0petsHEI/s512/hell%27s%20angels%20ball%20pean%20hammer%202.jpg" title="Hell&#039;s Angels Ball-Pean Hammer" width="382" height="512" /><p class="wp-caption-text">Hell&#039;s Angels Ball-Pean Hammer</p></div>
<p>For reasons easy to understand, much of the answers about the origin and the meaning of life have been bedeviled by naive assumptions and too much irrational wishful thinking.  The <em>why</em> questions have been replaced by <em>how</em> questions with the hope that maybe the answer to the latter one would somehow yield a spark of intellectual brilliance that would solve the conundrums of the first&#8230; but what a coward way to avoid answering the main problem <em>this</em> treacherous and avoiding road <em>would prove</em> to be!</p>
<p>How did the thinkers before Darwin explain the complexity of nature? John Locke goes at the heart of what many of today&#8217;s uneducated users of science and technology still think it&#8217;s common sense. Consider for example his following phrase: <em>&#8220;So if we will suppose nothing first, or eternal: Matter can never begin to be: If we suppose bare Mater, without Motion, eternal: Motion can never begin to be: If we suppose only Matter and Motion first, or eternal: Thought can never begin to be. For it is impossible to conceive that Matter either with or without Motion could have originally in and from itself Sense, Perception, and Knowledge, as is evident from hence, that then Sense, Perception, and Knowledge, must be a property eternally inseparable from Matter and every particle of it.&#8221;</em></p>
<p>The simple error in logic of the above statement muddled the meme complex of explanations that tried to explain the reason for man&#8217;s existence and for the causes of life and complexity. The fact of the matter is that to assume that something complex must derive from something more complex than the thing we&#8217;ve started to explain leads of course to a God that has a creator, this assuming we&#8217;re not going to throw away the logic in the middle of the argument; that is, the God of God has a God and so on &#8217;till eternity. What is that? Plain bullshit, if you ask me !</p>
<p>So, we needn&#8217;t use this kind of recursivity because the scientific evidence proves that nature works the other way around: <em><strong>complex things evolve from things that are not so complex</strong></em>. It&#8217;s more like a construction project coordinated by blind and purposeless forces in which cranes build by nature assemble less complex natural systems into more complex ones that have greater degrees of freedom. We don&#8217;t have to postulate sky-hooks, that is, god given metaphysical helping hands that defy scientific explanation, because there is a lot that we can explain without taking this road. As Darwin put it, <em>&#8220;from so simple a beginning endless forms most beautiful and most wonderful have been, and are being, evolved&#8221;</em>. </p>
<style type="text/css">
a.more-link1{background-color:#FFEECC;text-decoration:none;text-transform:uppercase; color:#0066CC;text-shadow:#fff 1px 1px 1px;padding:2px 12px 3px 12px;margin:0px 0px 0px 0px;font-size:85%; -moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;width:460px; border:0px}
a.more-link1:hover{background-color:#FF9100;color:#fff;text-shadow:#EDFF6F 1px 1px 1px;}
a.more-link2{background-color:#FFEECC;text-decoration:none;text-transform:uppercase; color:#0066CC;text-shadow:#fff 1px 1px 1px;padding:2px 12px 3px 12px;margin:0px 0px 0px 0px;font-size:85%; -moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;width:460px; border:0px}
a.more-link2:hover{background-color:#FF9100;color:#fff;text-shadow:#EDFF6F 1px 1px 1px;}
</style>
<h3 style="margin:-3px 0px 9px 0px"><strong><a href="http://www.amazon.com/gp/product/068482471X/ref=as_li_qf_sp_asin_tl?ie=UTF8&#038;tag=scite03-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=068482471X" target="_blank" class="more-link1">DARWIN&#8217;S DANGEROUS IDEA &#8211; Check Reviews on Amazon.com</a></strong></h3>
<h3 style="margin:9px 0px 9px 0px"><strong><a href="http://www.amazon.co.uk/gp/product/068482471X/ref=as_li_qf_sp_asin_tl?ie=UTF8&#038;tag=scienandtechn-21&#038;linkCode=as2&#038;camp=1634&#038;creative=6738&#038;creativeASIN=068482471X" target="_blank" class="more-link2">DARWIN&#8217;S DANGEROUS IDEA &#8211; Check Reviews on Amazon.co.uk</a></strong></h3>
<p>Much of Dennett&#8217;s book is directed at explaining the above logic, but don&#8217;t worry; things start to get more fiery in the end once we start to reverse engineer the most complex of cranes: the memes and their most intricate and time consuming effects on the human mind : the <em>quest for meaning, purpose and the perfect ethical algorithm</em>. This i think, is the most interesting part of the book. Dennett deconstructs the erroneous <em>assumption/intuition</em> that makes us think there is a real meaning, a real purpose in life, a perfect ethical course of action that anyone can take. The reality is that there is <em>no real meaning</em> just like there is <em>no real self</em>, (see <a href="http://www.scitechexplained.com/2010/06/book-review-consciousness-explained-written-by-daniel-c-dennett-the-story-of-how-consciousness-magic-fades-away/" target="_blank">here</a>), there is no real purpose in life just because there are no sky-hooks; there are cranes that serve distinct natural systems that have distinct interests which will more than likely conflict with each other. Just like Richard Dawkins put it, in this battle <em>&#8220;blind physical forces and genetic replication, some people are going to get hurt, other people are going to get lucky, and you won&#8217;t find any rhyme or reason in it, nor any justice. The universe that we observe has precisely the properties we should expect if there is, at bottom, no design, no purpose, no evil, no good, nothing but pitiless indifference.&#8221;</em> </p>
<p>Do you want to go deep down the rabbit whole? Then read this book ! </p>
<h1 style="text-align: left;"><strong><span id="more-7405"></span></strong></h1>
]]></content:encoded>
			<wfw:commentRss>http://www.scitechexplained.com/2011/02/book-review-darwins-dangerous-idea-by-daniel-c-dennett/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

