<?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>Everything I see, hear, and feel</title>
	<atom:link href="http://ondydharma.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ondydharma.wordpress.com</link>
	<description>Who does care? I do...</description>
	<lastBuildDate>Sat, 13 Aug 2011 13:31:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ondydharma.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Everything I see, hear, and feel</title>
		<link>http://ondydharma.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ondydharma.wordpress.com/osd.xml" title="Everything I see, hear, and feel" />
	<atom:link rel='hub' href='http://ondydharma.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Passing mutliple function parameters</title>
		<link>http://ondydharma.wordpress.com/2011/08/13/passing-mutliple-function-parameters/</link>
		<comments>http://ondydharma.wordpress.com/2011/08/13/passing-mutliple-function-parameters/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 13:30:19 +0000</pubDate>
		<dc:creator>ondydharma</dc:creator>
				<category><![CDATA[Inline Assembly]]></category>

		<guid isPermaLink="false">http://ondydharma.wordpress.com/?p=86</guid>
		<description><![CDATA[This writing is to demonstrate how to pass many values to a function. As the nature of stack, the last data come in will be the first data coming out. Therefore, the pushing data will be based on this order, as demonstrated in the following codes. #include &#60;stdio.h&#62; int foo(int a, int b) { return [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=86&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This writing is to demonstrate how to pass many values to a function. As the nature of stack, the last data come in will be the first data coming out. Therefore, the pushing data will be based on this order, as demonstrated in the following codes.</p>
<p><em>#include &lt;stdio.h&gt;</em></p>
<p><em>int foo(int a, int b) {</em></p>
<p style="padding-left:30px;"><em>return (a-b);</em></p>
<p><em>}</em></p>
<p><em>int main() {</em></p>
<p style="padding-left:30px;"><em>int y;</em></p>
<p style="padding-left:30px;"><em>asm(&#8220;movl $10, %eax&#8221;);</em></p>
<p style="padding-left:30px;"><em>asm(&#8220;push %eax&#8221;);</em></p>
<p style="padding-left:30px;"><em>asm(&#8220;movl $7, %eax&#8221;);</em></p>
<p style="padding-left:30px;"><em>asm(&#8220;push %eax&#8221;);</em></p>
<p style="padding-left:30px;"><em>asm(&#8220;call _foo&#8221; : &#8220;=r&#8221; (y));</em></p>
<p style="padding-left:30px;"><em>//printf(&#8220;%d\n&#8221;, y);</em></p>
<p style="padding-left:30px;"><em>//getchar();</em></p>
<p style="padding-left:30px;"><em>return 0;</em></p>
<p><em>}</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ondydharma.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ondydharma.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ondydharma.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ondydharma.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ondydharma.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ondydharma.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ondydharma.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ondydharma.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ondydharma.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ondydharma.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ondydharma.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ondydharma.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ondydharma.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ondydharma.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=86&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ondydharma.wordpress.com/2011/08/13/passing-mutliple-function-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c13ce600b6d6669bbe4b4e5c48977186?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ondydharma</media:title>
		</media:content>
	</item>
		<item>
		<title>Retrieving return value of C function</title>
		<link>http://ondydharma.wordpress.com/2011/08/13/retrieving-return-value-of-c-function/</link>
		<comments>http://ondydharma.wordpress.com/2011/08/13/retrieving-return-value-of-c-function/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 04:34:55 +0000</pubDate>
		<dc:creator>ondydharma</dc:creator>
				<category><![CDATA[Inline Assembly]]></category>

		<guid isPermaLink="false">http://ondydharma.wordpress.com/?p=75</guid>
		<description><![CDATA[In the recent few weeks, I have started learning how to incorporate assembly code to C code. Some examples of those can be found easily over internet, but only a few of them provide a fully working inline assembly code when I tried to execute the code in my compiler. So this writing is sort [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=75&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the recent few weeks, I have started learning how to incorporate assembly code to C code. Some examples of those can be found easily over internet, but only a few of them provide a fully working inline assembly code when I tried to execute the code in my compiler.</p>
<p>So this writing is sort of documentation of my study through this topic. The codes here are tested under <strong>Dev C compiler</strong> and produce result as expected.</p>
<p>Without any further ado, the following codes demonstrate the way of acquiring value produced by a C function.</p>
<p><em>#include &lt;stdio.h&gt;&gt;</em></p>
<p><em>int foo() {</em></p>
<p style="padding-left:30px;"><em>return 2;</em></p>
<p><em>}</em></p>
<p><em>int main() {</em></p>
<p style="padding-left:30px;"><em>int ivar; //to retrieve value of foo function</em></p>
<p style="padding-left:30px;"><em>asm(&#8220;call _foo&#8221; : &#8220;=r&#8221; (ivar)); //return value of foo is stored in ivar variable</em></p>
<p style="padding-left:30px;"><em>//printf(&#8220;%d\n&#8221;, ivar); //uncomment this line to print ivar to stdout</em></p>
<p style="padding-left:30px;"><em>//getchar(); //uncomment this line to freeze the text console; otherwise it will disappear immediately</em></p>
<p style="padding-left:30px;"><em>return 0;</em></p>
<p><em>}</em></p>
<p>The above code can be expanded by modifying foo function. This time, foo function returns value which is defined inside main function.</p>
<p><em>#include &lt;stdio.h&gt;</em></p>
<p><em>int foo(int fooParam) {</em></p>
<p style="padding-left:30px;"><em>return fooParam;</em></p>
<p><em>}</em></p>
<p><em>int main() {</em></p>
<p style="padding-left:30px;"><em>int ivar; //to retrieve value of foo function</em></p>
<p style="padding-left:30px;"><em>asm(&#8220;movl $10, %eax&#8221;); //to copy constant 10 into eax register</em></p>
<p style="padding-left:30px;"><em>asm(&#8220;push %eax&#8221;); //to push the value to the top of memory stack</em></p>
<p style="padding-left:30px;"><em>asm(&#8220;call _foo&#8221; : &#8220;=r&#8221; (ivar)); //return value of foo is stored in ivar variable</em></p>
<p style="padding-left:30px;"><em>//printf(&#8220;%d\n&#8221;, ivar); //uncomment this line to print ivar to stdout</em></p>
<p style="padding-left:30px;"><em>//getchar(); //uncomment this line to freeze the text console; otherwise it will disappear immediately</em></p>
<p style="padding-left:30px;"><em>return 0;</em></p>
<p><em>}</em></p>
<p>This is the end of my first writing related to inline assembly. I will add more writing on this topic in my future spare time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ondydharma.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ondydharma.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ondydharma.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ondydharma.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ondydharma.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ondydharma.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ondydharma.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ondydharma.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ondydharma.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ondydharma.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ondydharma.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ondydharma.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ondydharma.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ondydharma.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=75&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ondydharma.wordpress.com/2011/08/13/retrieving-return-value-of-c-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c13ce600b6d6669bbe4b4e5c48977186?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ondydharma</media:title>
		</media:content>
	</item>
		<item>
		<title>The future in classic theme</title>
		<link>http://ondydharma.wordpress.com/2010/06/30/the-future-in-classic-theme/</link>
		<comments>http://ondydharma.wordpress.com/2010/06/30/the-future-in-classic-theme/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 23:02:56 +0000</pubDate>
		<dc:creator>ondydharma</dc:creator>
				<category><![CDATA[My Photos]]></category>

		<guid isPermaLink="false">http://ondydharma.wordpress.com/?p=60</guid>
		<description><![CDATA[Enjoying the weather which had been really nice for a several days, my wife and me spent some time traveling to Utrecht and Nijmegen. During the relaxing visit, I took many memorable photos whereas my wife was the model for almost all photo shots. After doing a quick scanning to all the photos, my favorite [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=60&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://ondydharma.files.wordpress.com/2010/06/mg_8158_old-effect1.jpg"><img src="http://ondydharma.files.wordpress.com/2010/06/mg_8158_old-effect1.jpg?w=500&#038;h=333" alt="" title="_MG_8158_old-effect" width="500" height="333" class="alignnone size-full wp-image-62" /></a></p>
<p>Enjoying the weather which had been really nice for a several days, my wife and me spent some time traveling to Utrecht and Nijmegen. During the relaxing visit, I took many memorable photos whereas my wife was the model for almost all photo shots. After doing a quick scanning to all the photos, my favorite photos is the one displayed above because it is very unique and has distinguishing theme with the rest. I intentionally added old style effect to the picture, to enable the classical composition viewed more explicitly and perceivably.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ondydharma.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ondydharma.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ondydharma.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ondydharma.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ondydharma.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ondydharma.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ondydharma.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ondydharma.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ondydharma.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ondydharma.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ondydharma.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ondydharma.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ondydharma.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ondydharma.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=60&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ondydharma.wordpress.com/2010/06/30/the-future-in-classic-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c13ce600b6d6669bbe4b4e5c48977186?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ondydharma</media:title>
		</media:content>

		<media:content url="http://ondydharma.files.wordpress.com/2010/06/mg_8158_old-effect1.jpg" medium="image">
			<media:title type="html">_MG_8158_old-effect</media:title>
		</media:content>
	</item>
		<item>
		<title>Bible quote: Matthew 8:20</title>
		<link>http://ondydharma.wordpress.com/2009/09/27/bible-quote-matthew-820/</link>
		<comments>http://ondydharma.wordpress.com/2009/09/27/bible-quote-matthew-820/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 16:39:41 +0000</pubDate>
		<dc:creator>ondydharma</dc:creator>
				<category><![CDATA[My Diary]]></category>

		<guid isPermaLink="false">http://ondydharma.wordpress.com/?p=46</guid>
		<description><![CDATA[Live is not about money at all. It&#8217;s not guaranteed that we will undergo our life with abundant happiness when we own plenty of money to spend for. Money is as a means for us to fulfill our daily needs. We shouldn&#8217;t be trapped with our shallow understanding that we merely work for money. As [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=46&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Live is not about money at all. It&#8217;s not guaranteed that we will undergo our life with abundant happiness when we own plenty of money to spend for. Money is as a means for us to fulfill our daily needs. We shouldn&#8217;t be trapped with our shallow understanding that we merely work for money. As God says in Matthew 8:20: &#8220;Foxes have holes and birds of the air have nests, but the Son of Man has no place to lay his head.&#8221; By this verse, we are strengthened by His word that we are still able to have a decent life although we have a very limited financial treasure. May God be with us forever. Happy Sunday&#8230;..</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ondydharma.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ondydharma.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ondydharma.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ondydharma.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ondydharma.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ondydharma.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ondydharma.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ondydharma.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ondydharma.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ondydharma.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ondydharma.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ondydharma.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ondydharma.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ondydharma.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=46&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ondydharma.wordpress.com/2009/09/27/bible-quote-matthew-820/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c13ce600b6d6669bbe4b4e5c48977186?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ondydharma</media:title>
		</media:content>
	</item>
		<item>
		<title>An array as return value of a function</title>
		<link>http://ondydharma.wordpress.com/2009/09/18/an-array-as-return-value-of-a-function/</link>
		<comments>http://ondydharma.wordpress.com/2009/09/18/an-array-as-return-value-of-a-function/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 14:13:08 +0000</pubDate>
		<dc:creator>ondydharma</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://ondydharma.wordpress.com/?p=35</guid>
		<description><![CDATA[The motivation of this posting is to discuss some programming technique which enable a function to retrieve value returned by other function in a form of array. To make it clearer, let me take a sorting problem as the example. Assume that we have set the initial value to each array elements. To perform sorting [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=35&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The motivation of this posting is to discuss some programming technique which enable a function to retrieve value returned by other function in a form of array. To make it clearer, let me take a sorting problem as the example. Assume that we have set the initial value to each array elements. To perform sorting on the array, other function (named as callee) is called and data to be processed are provided by a caller. After a sorting process is over, a callee must return an array with sorted data back to its caller. A global variable is one of ways to exchange data amongs functions. As its name, a global variable has wider scope and lifetime and is accessible by other functions at the same and lower level. The following snippet is a brief implementation on this technique:</p>
<p>/* the declaration of global variable, target_array */<br />
int destination[size];<br />
void sorting(int *src_array, int size) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* do sorting here */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* store the result of data sorting<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;into a global variable (target_array) */<br />
}</p>
<p>int main() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* declare and initialize source before using it */</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sorting(source, size);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* user-defined function to print all array elements */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print_array(destination);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 0;<br />
}</p>
<p>Aside above technique, we also can use additional function argument as a way for caller and callee function to exchange their data. The implementation of this techinique is as follows:</p>
<p>void sorting(int *dest_array, int *src_array, int size) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* do sorting here */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* store the result of data sorting into which<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array is accessible at caller function (e.g. dest_array) */<br />
}</p>
<p>int main() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* declare source and destination before using it */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* initial source as sorting input */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sorting(destination, source, size);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* user-defined function to print all array elements */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print_array(destination);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 0;<br />
}</p>
<p>Both techniques described above require a variable which has wider scope (in the first case, the variable is known by all functions while in the later case, the scope of variable is at the same level of the caller function). The next technique is to declare an array inside a callee function and use the characteristic of dynamic memory allocation to preserve memory allocation although the lifetime of the callee function is over. Below is the implementation of this technique:</p>
<p>int *sorting(int *src_array, int size) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* declaration of dynamic array */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int *p_inside_sorting;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* memory allocation of dynamic array */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p_inside_sorting = (int *)malloc(sizeof(int)*size));</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* do sorting here */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* store the result of data sorting into p_inside_sorting */</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return p_inside_sorting;<br />
}</p>
<p>int main() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* declare and initialize source before using it */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* declare a pointer variable as a means for pointing<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;address reference returned by sorting function */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int *p;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p = sorting(source, size);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* user-defined function to print all array elements */<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print_array(p);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 0;<br />
}</p>
<p>Since we are allocating lot of memories designated to our dynamic array, we need to free (or de-allocate) the memories if we are going not to use it anymore (e.g. after the termination of the program).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ondydharma.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ondydharma.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ondydharma.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ondydharma.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ondydharma.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ondydharma.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ondydharma.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ondydharma.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ondydharma.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ondydharma.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ondydharma.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ondydharma.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ondydharma.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ondydharma.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=35&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ondydharma.wordpress.com/2009/09/18/an-array-as-return-value-of-a-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c13ce600b6d6669bbe4b4e5c48977186?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ondydharma</media:title>
		</media:content>
	</item>
		<item>
		<title>Playing with numerator and denominator</title>
		<link>http://ondydharma.wordpress.com/2009/03/13/playing-with-numerator-and-denominator/</link>
		<comments>http://ondydharma.wordpress.com/2009/03/13/playing-with-numerator-and-denominator/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 22:42:03 +0000</pubDate>
		<dc:creator>ondydharma</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://ondydharma.wordpress.com/?p=30</guid>
		<description><![CDATA[While I was working on the 3rd homework of computer arithmetic, suddenly I got bored somehow. Turning on the tv didn&#8217;t help as well, because there was no any interesting tv program at the time. Hmmm, then an idea came to my mind, eventhough it wasn&#8217;t not a relaxing one, he..he.. It was about divisioning [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=30&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While I was working on the 3rd homework of computer arithmetic, suddenly I got bored somehow. Turning on the tv didn&#8217;t help as well, because there was no any interesting tv program at the time. Hmmm, then an idea came to my mind, eventhough it wasn&#8217;t not a relaxing one, he..he..</p>
<p>It was about divisioning number. Assume that you would like to calculate the result of 5 divided by 7. Of course it&#8217;s very easy to solve, by either calculating by hand or using calculator. OK, let&#8217;s take the most practical one, with the help of calculator. I did the calculation using Windows calculator, and the result is 0.71428571428571428571428571428571. I discovered that the total number printed behind the dot sign is 32. For most of mathematical purpose, it&#8217;s probably more than enough. But then I questioned myselft, is it possible to extend the calculation of decimal number to more than 32 digits?</p>
<p>It didn&#8217;t take to much time to conclude that it&#8217;s possible to extend the digit number, but it obviously couldn&#8217;t be done with the existing calculator. I had to make a small program and it&#8217;s not a complicated one. Here I put the snapshot of the code I made in C language:</p>
<p>#include &lt;stdio.h&gt;<br />
#include &lt;string.h&gt;</p>
<p>#define STRING_SIZE 1024</p>
<p>char *udivide(int numerator, int denominator, int counter);</p>
<p>int main ()<br />
{<br />
int inumber, modnumber, counter=0;</p>
<p>printf(&#8220;%s&#8221;, udivide(17,116,300));</p>
<p>printf(&#8220;\n&#8221;);<br />
return 0;<br />
}</p>
<p>char *udivide(numerator, denominator, counter)<br />
int numerator;<br />
int denominator;<br />
int counter;<br />
{<br />
static char sresult[STRING_SIZE]=&#8221;";<br />
char temp_str[STRING_SIZE]=&#8221;";<br />
int local_counter=0, modnumber=numerator;<br />
while (local_counter&lt;counter)<br />
{<br />
numerator = (int) numerator/denominator;<br />
sprintf(temp_str, &#8220;%d&#8221;, numerator);<br />
if (local_counter==0)<br />
strcat(temp_str, &#8220;.&#8221;);<br />
if ((numerator = modnumber%denominator)==0)<br />
{<br />
strcat(sresult, temp_str);<br />
break;<br />
}<br />
if (numerator&lt;denominator)<br />
numerator*=10;<br />
modnumber = numerator;<br />
local_counter++;<br />
strcat(sresult, temp_str);<br />
}<br />
return sresult;<br />
}</p>
<p>Depending on the value of counter variable, now I&#8217;m able to find the division of any number in longer digit resolution (note: if  the digit resolution exceeds the size declared in above code, increase the size of string to a corresponding value). Then I observed  that the division of fraction number eventually will produce a periodic number. Below are some examples of the periodic division result:</p>
<p>1 : 116 = 0.0086206896551724137931034482758620689655172413793103448275<br />
86206896551724137931034482758620689655172413793103448275<br />
86206896551724137931034482758620689655172413793103448275<br />
86206896551724137931034482758620689655172413793103448275<br />
86206896551724137931034482758620689655172413793103448275<br />
86206896551724137</p>
<p>22 : 7 = 3.142857142857142857142857142857142857142857142857142857142857142857142857142857<br />
142857142857142857142857142857142857142857142857142857142857142857142857142857<br />
142857142857142857142857142857142857142857142857142857142857142857142857142857<br />
14285714285714285714285714285714285714285714285714285714285714285</p>
<p>I think it&#8217;s enough playing with numerator and denominator for today. Maybe if I have another spare time, I will make the function to be recursive, so it will be more elegant than it&#8217;s now. I also welcome you to share your recursive version at comment section. Cheers.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ondydharma.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ondydharma.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ondydharma.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ondydharma.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ondydharma.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ondydharma.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ondydharma.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ondydharma.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ondydharma.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ondydharma.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ondydharma.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ondydharma.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ondydharma.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ondydharma.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=30&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ondydharma.wordpress.com/2009/03/13/playing-with-numerator-and-denominator/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c13ce600b6d6669bbe4b4e5c48977186?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ondydharma</media:title>
		</media:content>
	</item>
		<item>
		<title>What a new world it is</title>
		<link>http://ondydharma.wordpress.com/2009/02/27/what-a-new-world-it-is/</link>
		<comments>http://ondydharma.wordpress.com/2009/02/27/what-a-new-world-it-is/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 16:39:11 +0000</pubDate>
		<dc:creator>ondydharma</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://ondydharma.wordpress.com/?p=26</guid>
		<description><![CDATA[I was very happy when I at last could follow a master program abroad. As graduate from physics engineering, my background academic is really in opposite direction with the knowledge base of the institution where I was working in. Then I tried to think over a win-win solution which could satify all parties involved. After [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=26&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was very happy when I at last could follow a master program abroad. As graduate from physics engineering, my background academic is really in opposite direction with the knowledge base of the institution where I was working in. Then I tried to think over a win-win solution which could satify all parties involved. After pondering all concerned aspects, then I finally decided to follow computer engineering&#8217;s master program for my further academic degree. The main reasons of this decision were computer engineering provides courses and research interest which  were very suitable with the core business of my institution and the department also provides the opportunity for student who holds bachelor degree of electrical and physics engineering (like me) to do research the that area.</p>
<p>I realized that the consequence of switching academic track to a new area was to face many new things which I never learnt before. Undoubtfully the consequence is becoming true. At the 6th month following master program at TU Delft, the burden to walk into unknown study area becomes larger. Everyday, when attending a class, the lecturer talked about  terminologies and principles which are really new to me and I became more suffered because the lecturer assumed that all those required and supported knowledge have been studied in bachelor (or,  if the assumption was considered to be wrong, the lecturer just give students the instruction  to read a bunch of prerequisite reading material). Following are few terminologies I must understand in order to pass the courses: carry look ahead, parallel prefix network, parse tree, LALR, finite state automaton, victim cache, cover of cube, etc. (if you&#8217;re interested to know what it is, type the keyword on google).</p>
<p>But it doesn&#8217;t mean I will quit the fight and walk out the arena. I will do my best to complete the courses and get the degree at the end. Right now, I&#8217;m trying to change my mindset to see difficulties as challenges.  When I succeed to do so, the remaining journey probably will be more insteresting and I don&#8217;t feel tortured, <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ondydharma.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ondydharma.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ondydharma.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ondydharma.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ondydharma.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ondydharma.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ondydharma.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ondydharma.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ondydharma.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ondydharma.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ondydharma.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ondydharma.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ondydharma.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ondydharma.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=26&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ondydharma.wordpress.com/2009/02/27/what-a-new-world-it-is/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c13ce600b6d6669bbe4b4e5c48977186?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ondydharma</media:title>
		</media:content>
	</item>
		<item>
		<title>Missing her to be nearby me</title>
		<link>http://ondydharma.wordpress.com/2009/02/14/missing-her-to-be-nearby-me/</link>
		<comments>http://ondydharma.wordpress.com/2009/02/14/missing-her-to-be-nearby-me/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 16:39:56 +0000</pubDate>
		<dc:creator>ondydharma</dc:creator>
				<category><![CDATA[My Diary]]></category>

		<guid isPermaLink="false">http://ondydharma.wordpress.com/?p=17</guid>
		<description><![CDATA[The time finally comes. Me and my beloved wife have to live away from each other for more less 9 months. Even though we just married 6 months ago, or you may say, living together as husband and wife is something new for us, but a big missing starts striking my mind, in just a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=17&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The time finally comes.  Me and my beloved wife have to live away from each other for more less 9 months. Even though we just married 6 months ago, or you may say, living together as husband and wife is something new for us, but a big missing starts striking my mind, in just a few hours after she went in to the passenger&#8217;s waiting room at Schipol airport.</p>
<p>I also felt a different feeling when I came to my room this afternoon. My room seems to be a lot less empty now. I don&#8217;t hear anymore romantic words that she usually says when I get in to the room.  Not only that, I couldn&#8217;t see  her very beautiful smile when I was entering the room, and the question about whether I felt hungry or not and when I said I was starved, she woke up from the bed and started to prepare the food for us. After she finished cooking the food, the best moment came when we ate together and in the same time having a little chat about anything we want to talk.</p>
<p>Now I have to be used to be &#8220;being alone&#8221;. Buying stuff to the market, enjoying light walk, spending spare time, etc. must be gone through without her. I have a very simple pray in my heart that I hope the time will tick faster, so I can meet her sooner and the empty space inhabiting my heart will disappear immediately.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ondydharma.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ondydharma.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ondydharma.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ondydharma.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ondydharma.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ondydharma.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ondydharma.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ondydharma.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ondydharma.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ondydharma.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ondydharma.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ondydharma.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ondydharma.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ondydharma.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=17&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ondydharma.wordpress.com/2009/02/14/missing-her-to-be-nearby-me/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c13ce600b6d6669bbe4b4e5c48977186?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ondydharma</media:title>
		</media:content>
	</item>
		<item>
		<title>Usaha sebagai fungsi gaya dan perpindahan</title>
		<link>http://ondydharma.wordpress.com/2009/02/08/usaha-sebagai-fungsi-gaya-dan-perpindahan/</link>
		<comments>http://ondydharma.wordpress.com/2009/02/08/usaha-sebagai-fungsi-gaya-dan-perpindahan/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 10:21:05 +0000</pubDate>
		<dc:creator>ondydharma</dc:creator>
				<category><![CDATA[My Diary]]></category>

		<guid isPermaLink="false">http://ondydharma.wordpress.com/?p=13</guid>
		<description><![CDATA[Sebenarnya sudah lama saya ingin menulis tentang hal ini, karena saya cukup tergelitik dengan fenomena yang terjadi. Dulu pada saat duduk di SMP atau SMA, kita pernah belajar Fisika dan membahas topik mengenai usaha (work). Dinyatakan bahwa usaha (work) sebanding dengan gaya (force) yang bekerja pada suatu benda, yang mengakibatkan benda tersebut berpindah posisi pada [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=13&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sebenarnya sudah lama saya ingin menulis tentang hal ini, karena saya cukup tergelitik dengan fenomena yang terjadi. Dulu pada saat duduk di SMP atau SMA, kita pernah belajar Fisika dan membahas topik mengenai usaha (<em>work</em>). Dinyatakan bahwa usaha (<em>work</em>) sebanding dengan gaya (<em>force</em>) yang bekerja pada suatu benda, yang mengakibatkan benda tersebut berpindah posisi pada jarak tertentu (<em>distance</em>). Untuk perpindahan posisi dalam gerak lurus tanpa membentuk sudut, maka formula untuk menghitung besarnya usaha dapat dinyatakan sebagai berikut:</p>
<p>usaha (<em>work</em>) = gaya (<em>force</em>) x jarak (<em>distance</em>)</p>
<p>Dari rumus di atas, ada empat permutasi untuk menghitung besarnya usaha yang dihasilkan, yaitu:</p>
<ul>
<li>tidak ada gaya yang bekerja pada benda, namun benda mengalami perpindahan posisi (gaya = 0, jarak &lt;&gt; 0)</li>
<li>tidak ada gaya yang bekerja dan tidak ada perpindahan jarak (gaya = jarak = 0)</li>
<li>ada gaya yang bekerja pada benda, mengakibatkan adanya perpindahan posisi (gaya &lt;&gt; 0, jarak &lt;&gt; 0)</li>
<li>ada gaya yang bekerja pada benda, namun benda tidak mengalami perpindahan posisi (gaya &lt;&gt; 0, jarak = 0)</li>
</ul>
<p>Mari kita ulas satu-satu keempat permutasi di atas. Pada permutasi yang pertama, menurut kesimpulan pribadi saya, sangat tidak mungkin terjadi. Bayangkan jika sebuah buku atau mobil yang berada di sebuah permukaan yang datar, tiba-tiba dapat bergerak dengan sendirinya, berpindah ke posisi yang lain. Kalau seandainya suatu masa kita kebetulan melihat fenomena ini, kemungkinan besar kita akan terlari terbirit-birit dan bulu kuduk sudah berdiri semua, he..he&#8230;</p>
<p>Permutasi yang kedua, ketiga, dan keempat merupakan fenomena yang sering terjadi di sekitar kita. Namun untuk permutasi keempat, ada hal yang menarik yang bisa diamati dan bila kita mencoba untuk melihatnya dari sisi yang berbeda, akan menghasilkan hal yang lebih menarik lagi. Perhatikan bahwa di permutasi keempat, besarnya usaha yang dihasilkan adalah nol karena tidak ada perpindahana jarak yang terjadi walaupun gaya diberikan pada benda tersebut. Dengan menggunakan istilah saya sendiri, hal ini saya sebut  sebagai &#8220;<em>tidak melakukan usaha</em>&#8220;. Contoh konkrit mengenai hal ini adalah ketika seseorang berusaha mendorong tembok rumah. Gaya yang diberikan ke tembok rumah tersebut sudah sedemikian besarnya sampai-sampai tenaga orang yang mendorong sudah habis dan banjir keringat, namun tetap saja tembok tidak bergerak sedikit pun. Lebih naas lagi, berdasarkan formula fisika di atas, kita dapat mengatakan bahwa orang tersebut tidak melakukan usaha (dengan istilah lain, <em>tidak berusaha</em>) ketika mendorong tembok tersebut.</p>
<p>Nah sekarang mari kita lihat peristiwa di atas melalui sudut pandang lain, yang lebih bersifat sosial-managerial. Misalkan seseorang berposisi sebagai atasan di suatu institusi, yang memiliki wewenang untuk mengambil keputusan strategis. Pada masa tertentu, dicanangkan program untuk membuat institusi tersebut menjadi lebih baik. Sekian puluh skenario dan program dirumuskan dan dengan memberdayakan potensi insani yang bekerja di perusahaan tersebut, ekspektasi bahwa kualitas institusi dapat lebih meningkat dapat tercapai. Segenap tenaga dan pikiran serta dedikasi dicurahkan demi tercapainya peningkatan kualitas. Namun tanpa disadari, dalam rangkaian kerja yang merupakan bagian dari program peningkatan kualitas institusi, tidak ada satu pun perubahan yang berhasil meningkatkan kualitas institusi. Singkat cerita,  di akhir masa pelaksanaan program, setelah melakukan  evaluasi tentunya, disimpulkan bahwa kualitas institusi tidak lebih buruk dan sekaligus juga tidak lebih baik dibandingkan kondisi sebelum program peningkatan kualitas dilaksanakan. Dengan kata lain, kualitas institusi tidak mengalami perubahan sama sekali.</p>
<p>Dengan mengandaikan bahwa besarnya gaya adalah total dari peluh keringat, tenaga, pikiran, waktu, dan dedikasi yang disumbangkan oleh orang per orang yang bekerja di dalam perusahaan tersebut dan jarak adalah besarnya peningkatan kualitas institusi (dalam kasus di atas, jarak sama dengan nol), maka dengan meminjam istilah yang telah disebutkan di atas, orang per orang di dalam institusi tersebut <em>tidak melakukan usaha</em>.</p>
<p>Inti dari ilustrasi di atas adalah sebesar apapun tenaga yang kita dedikasikan untuk suatu hal tertentu, tapi pada akhirnya tidak ada hasil yang dicapai, maka di akhir dapat dikatakan bahwa selama ini orang tersebut tidak melakukan usaha. Jadi berhati-hati dan cermatlah untuk menentukan pencapaian, sehingga segala jerih payah yang kita berikan (tenaga, waktu, dedikasi, pikiran) tidak berakhir dengan kesimpulan bahwa kita tidak melakukan usaha sama sekali.</p>
<p>Be rationale, don&#8217;t over confidence.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ondydharma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ondydharma.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ondydharma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ondydharma.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ondydharma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ondydharma.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ondydharma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ondydharma.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ondydharma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ondydharma.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ondydharma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ondydharma.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ondydharma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ondydharma.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=13&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ondydharma.wordpress.com/2009/02/08/usaha-sebagai-fungsi-gaya-dan-perpindahan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c13ce600b6d6669bbe4b4e5c48977186?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ondydharma</media:title>
		</media:content>
	</item>
		<item>
		<title>An unpleasant day</title>
		<link>http://ondydharma.wordpress.com/2007/08/03/an-unpleasant-day/</link>
		<comments>http://ondydharma.wordpress.com/2007/08/03/an-unpleasant-day/#comments</comments>
		<pubDate>Fri, 03 Aug 2007 14:34:48 +0000</pubDate>
		<dc:creator>ondydharma</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://ondydharma.wordpress.com/2007/08/03/an-unpleasant-day/</guid>
		<description><![CDATA[Phuuiiiih, I was just really having a bad experience yesterday. Why I say so? Because all data stored in my laptop accidentally were erased, because of my careless action. OK, let me try to tell you the complete story. A few months ago, my friends told me to use Windows 2003 Server SP1 as operating [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=12&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Phuuiiiih, I was just really having a bad experience yesterday. Why I say so? Because all data stored in my laptop accidentally were erased, because of my careless action. OK, let me try to tell you the complete story. A few months ago, my friends told me to use Windows 2003 Server SP1 as operating system, if I want to explore Visual Studio 2005. Then, inspired by that suggestion, I erased my old operating system and installed Windows 2003 Server SP1 inside my laptop. After successfully installing the new OS, I found some disturbing problem caused by incompatible drivers issue. Some of supporting application provided by laptop manufacturer are crashed after being executed. Even the incompatible issue made the applications were unable to be installed properly on the OS. Because of those things, some important features needed to increase laptop performance were disappeared.</p>
<p>Although OS installation consume quite a lot effort and time to spend to, I decided to replace the OS become XP again. I did the OS installation yesterday. At the beginning installation, firstly I put Windows XP installer into CD Rom and boot the laptop through CD. Then, I followed all instructions given along installation as usual, until I realized that something wrong happens during the installation, it didn&#8217;t show the list of hard disk partition at all. I tried to do some troubleshooting actions, but nothing can enable me to read the partition. I gathered helpful information from internet to overcome the problem, but still it didn&#8217;t work at all. With more less idea remained in my mind, I did a preliminary guess that the problem might have relation with partition manager stored in MBR. By this guessing, I focused the troubleshooting to the way of cleaning MBR from hard disk. On the first try, I used FDISK command provided by XP installer, but it seems to be failed. Then I seek another tool to do such job. From the forum I visited, they suggest to use MbrFix tool that it&#8217;s claimed to be more powerful than FDISK. Immediately I downloaded the tool and run it to clean the MBR information. And you know what? The beginning of disaster came. Without criticizing the tool feature, I executed the command as being instructed on the website. It seemed nothing wrong happened then. I repeated the installation process but still it couldn&#8217;t read the partition. Hmm, while thinking this weird situation, I decided to put another XP installer into CDRom. And guess what, it could read the partition, but only one. Ups sorry, I forgot to tell you that my hard disk had three partitions on it. Realizing what had happened, I was still in a few minutes, to give enough time for me to think over the stupid thing I had did. I lost all data I have collected since 7 months ago, movies, application, course deliverable, and many useful and important files.</p>
<p>But of course, the show must go on. Instead of tearing this sad story, I continued the installation and listed the remained information inside my mind which is useful to get all files I had lost.</p>
<p>Lesson learnt from this experience is to be aware for everything you will do, even though you are used to do it everyday.</p>
<p>Pondering the lost I got on that day, I categorized yesterday as my unpleasant day, <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ondydharma.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ondydharma.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ondydharma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ondydharma.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ondydharma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ondydharma.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ondydharma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ondydharma.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ondydharma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ondydharma.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ondydharma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ondydharma.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ondydharma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ondydharma.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ondydharma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ondydharma.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ondydharma.wordpress.com&amp;blog=660572&amp;post=12&amp;subd=ondydharma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ondydharma.wordpress.com/2007/08/03/an-unpleasant-day/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c13ce600b6d6669bbe4b4e5c48977186?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ondydharma</media:title>
		</media:content>
	</item>
	</channel>
</rss>
