<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>gcc &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/gcc/</link>
	<description>Feed of posts on WordPress.com tagged "gcc"</description>
	<pubDate>Thu, 26 Nov 2009 20:23:36 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[OpenCV on Linux again with G++]]></title>
<link>http://rorasa.wordpress.com/2009/11/26/opencv-on-linux-again-with-g/</link>
<pubDate>Thu, 26 Nov 2009 16:03:56 +0000</pubDate>
<dc:creator>rorasa</dc:creator>
<guid>http://rorasa.wordpress.com/2009/11/26/opencv-on-linux-again-with-g/</guid>
<description><![CDATA[After a long way try to develop C program with OpenCV library on Ubuntu Linux using NetBeans and Ecl]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>After a long way try to develop C program with OpenCV library on Ubuntu Linux using NetBeans and Eclispe IDE, no succeed at all. There are always some problems occurs and the project cannot move on further so everything has to be move back onto Windows to be developed. But now all these thing can be developed in Linux by  using traditional GNU C Compiler (GCC) that most of Linux users know it very well. This is the complete procedure from the beginning(install) till the end(compile-build).</p>
<p><strong>Part A. Install OpenCV 2.0.0</strong></p>
<p>1. Install prerequisites</p>
<p>Enter this line into Linux Terminal: </p>
<p><code>$sudo apt-get install libavformat-dev libgtk2.0-dev pkg-config cmake libswscale-dev bzip2</code>;</p>
<p>All these packages are the prerequisites for compiling and running OpenCV.</p>
<p>2.Get OpenCV 2.0.0 sourcecode</p>
<p>Obtains the sourcecode of OpenCV by visit <a href="http://sourceforge.net/projects/opencvlibrary/">Sourceforge</a> or by enter this line to Terminal:<br />
<code>$wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.0/OpenCV-2.0.0.tar.bz2</code></p>
<p>3. Extract and Compile OpenCV 2.0.0</p>
<p>3.1 Extract by enter<br />
<code>$tar xvjf OpenCV-2.0.0.tar.bz2</code><br />
3.2 Enter the directory<br />
<code>$ cd OpenCV-2.0.0/</code><br />
3.3 Create a output directory<br />
<code>$mkdir release; cd release</code><br />
3.4 COMPILE The OpenCV<br />
This is the important one! For more information please see in Ref1 below.<br />
<code>$cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON ..</code><br />
3.5 Install OpenCV<br />
<code>$make</code><br />
<code>$sudo make install</code><br />
3.6 Exporting Part<br />
<code>$export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH</code><br />
<code>$sudo ldconfig</code></p>
<p><strong>Part B Compile application with GCC using G++</strong></p>
<p>This part is <strong>amazingly</strong> easy as eating an ice-cream!<br />
All we have to do is to get into your project directory in Terminal, then use this command to compile your program!</p>
<p><code>$g++ `pkg-config opencv --cflags --libs` ProgramName.c -o ProgramName</code></p>
<p>That&#8217;s it! And we can execute our program by using command:<br />
<code>$./ProgramName</code></p>
<p>That&#8217;s all we need to do to use OpenCV 2.0.0 on Linux system.</p>
<p><strong>Part C Program Example</strong><br />
Example code of OpenCV application can be found on Ref1. below.</p>
<p>This is the screenshot of my running program.<br />
<a href="http://rorasa.wordpress.com/files/2009/11/opencv-linux.png"><img src="http://rorasa.wordpress.com/files/2009/11/opencv-linux.png?w=300" alt="" title="opencv-linux" width="300" height="214" class="aligncenter size-medium wp-image-111" /></a></p>
<p>Reference: <a href="http://www.linuxconfig.org/introduction-to-computer-vision-with-opencv-on-linux">http://www.linuxconfig.org/introduction-to-computer-vision-with-opencv-on-linux</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Noah Sings @ Georgetown Christian]]></title>
<link>http://4tanners.wordpress.com/2009/11/23/noah-sings-georgetown-christian/</link>
<pubDate>Tue, 24 Nov 2009 04:40:50 +0000</pubDate>
<dc:creator>4tanners</dc:creator>
<guid>http://4tanners.wordpress.com/2009/11/23/noah-sings-georgetown-christian/</guid>
<description><![CDATA[Wee Worship Singers Pre School from Georgetown Christian on Vimeo.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://vimeo.com/7785126">Wee Worship Singers Pre School</a> from <a href="http://vimeo.com/user2685508">Georgetown Christian</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[and we have networking]]></title>
<link>http://thebusker.wordpress.com/2009/11/23/and-we-have-networking/</link>
<pubDate>Mon, 23 Nov 2009 06:25:09 +0000</pubDate>
<dc:creator>thebusker</dc:creator>
<guid>http://thebusker.wordpress.com/2009/11/23/and-we-have-networking/</guid>
<description><![CDATA[hrmmm&#8230; Not sure what to call this. I ran across a helpful article which has been misplaced tha]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>hrmmm&#8230;</p>
<p>Not sure what to call this. I ran across a helpful article which has been misplaced that stated whilst working with NetworkManager you must comment everything which isn&#8217;t lo or loop in your /etc/network/interfaces file. That should leave you with two lines. Then you &#8230; wish I wouldn&#8217;t have lost it &#8230; basically restart the file and restart NetworkManager. Coming from Windows, I just rebooted my machine.</p>
<p>Anyhow, I followed his advice and it worked. For that night. All the next day it didn&#8217;t. So I was trying different techniques with NetworkManager as well as studying wpa_supplicant in case I hadn&#8217;t gotten anything going.</p>
<p>The next day, today, I gave up on NetworkManager and started writing the .conf file for wpa_supplicant. Felt like a true hero, I did, but my network still wouldn&#8217;t work. So after a spell of trying that, I stripped security on my network. Edit the /etc/network/interfaces file so NetworkManager would pick up wlan0, reboot because I couldn&#8217;t (can&#8217;t) remember how to bash restart the file, and &#8230;</p>
<p>It worked. But you can&#8217;t have a non-secured network. So I met Debian half way. I had wanted to use WPA2, but by backing down to WPA I seem to have made NetworkManager happy. I still don&#8217;t know if that was the true fix or what&#8230; I guess only time will tell.</p>
<p>p.s. ~ When I got the internet up that first night my first act was to install emacs. As I was dealing with NetworkManager, et. al., I decided to write some code to relax. In attempts to compile it I discovered that Debian does not ship with a compiler in their standard install. Huh, though I. So the very first thing I typed in bash after the internet was up again was su -c &#8216;aptitude install gcc&#8217;. Still prolly need to install the debugging libraries, but we&#8217;ll cross that bridge&#8230;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[gcc compiler ]]></title>
<link>http://nasir8891.wordpress.com/2009/11/21/gcc-compiler/</link>
<pubDate>Fri, 20 Nov 2009 18:12:02 +0000</pubDate>
<dc:creator>nasir khan</dc:creator>
<guid>http://nasir8891.wordpress.com/2009/11/21/gcc-compiler/</guid>
<description><![CDATA[GCC (GNU Compiler Collection) অনেকগুলা কম্পাইলারের সমন্বয়ে তৈরী একটি কম্পাইলার যার মাধ্যমে C, C++, F]]></description>
<content:encoded><![CDATA[GCC (GNU Compiler Collection) অনেকগুলা কম্পাইলারের সমন্বয়ে তৈরী একটি কম্পাইলার যার মাধ্যমে C, C++, F]]></content:encoded>
</item>
<item>
<title><![CDATA[C++ tuples, a quick overview]]></title>
<link>http://arkaitzj.wordpress.com/2009/11/20/c-tuples-a-quick-overview/</link>
<pubDate>Fri, 20 Nov 2009 15:00:52 +0000</pubDate>
<dc:creator>Arkaitz Jimenez</dc:creator>
<guid>http://arkaitzj.wordpress.com/2009/11/20/c-tuples-a-quick-overview/</guid>
<description><![CDATA[Ok, c++ tuples, here is quick and dirty: // g++ 4.1 #include &lt;string&gt; #include &lt;iostream]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ok, c++ tuples, here is quick and dirty:</p>
<pre class="brush: cpp;">
// g++ 4.1
#include &#60;string&#62;
#include &#60;iostream&#62;
#include &#60;tr1/tuple&#62;
using std::tr1::tuple;
using std::tr1::tie;
using std::tr1::make_tuple;

tuple&#60;std::string,int&#62; parse_url(const std::string&#38; url){
    return make_tuple(&#34;127.0.0.1&#34;,9000); //Cheat for parsing
}
int main(){
    std::string host;
    int port;
    tie(host,port) = parse_url(&#34;127.0.0.1:9000&#34;);
    std::cout &#60;&#60; &#34;Host: &#34;&#60;&#60;host&#60;&#60; &#34;:&#34;&#60;&#60;port&#60;&#60;&#34;\n&#34;;
}
</pre>
<p>At the first look, returning several values from a function/method in C++ may look awkward and contrary to the C++ way, being more usual in languages like python or perl.<br />
However the fact is that template metaprogramming gives us the ability to do such good tricks and renders the rest for us in compile-time. This tuple templates are part of the TR1 and thats why we need to include them from &#60;tr1/tuple&#62; and use them from std::tr1 namespace, but they&#8217;ll be part of the next standard c++0x. </p>
<p>The logic behind the metaprogramming is simple, by the time you compile a tuple the compiler knows perfectly the size of the new type because you supply the template parameters.</p>
<p><strong>tie()</strong> for example is a template that gets the given parameters and put references to them in an lvalue obj that can be assigned to, so its a painless way of getting results from a tuple_returning method.<br />
<strong>make_tuple()</strong> goes the same way but creates a new tuple with copies of the provided parameters, so it is a quick way of creating tuples of any size, its like the current <em>make_pair()</em> but for tuples.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Growth]]></title>
<link>http://1yeardeepintheheart.wordpress.com/2009/11/20/growth/</link>
<pubDate>Fri, 20 Nov 2009 04:25:02 +0000</pubDate>
<dc:creator>Alyssa-Michelle</dc:creator>
<guid>http://1yeardeepintheheart.wordpress.com/2009/11/20/growth/</guid>
<description><![CDATA[In one week I will go home to a place that knows me differently. A town that doesn&#8217;t really kn]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In one week I will go home to a place that knows me differently. A town that doesn&#8217;t really know me at all. I didn&#8217;t know myself there, either, it seems. I spent my whole life there, but in 3 months here I am knowing myself and the world more than I ever did at home. Maybe that&#8217;s not true. Maybe it&#8217;s just the world I am seeing now and am adjusting to. A world I&#8217;m trying to keep up with or maybe move against&#8230;trying to set waves in a positive motion&#8230;</p>
<p>. . .Crises-level truancy/drop-out/pregnancy/drug-use/domestic abuse rates&#8230; Social services\tutoring\mentoring\food &#38; clothing give-aways\character-development programs\free counseling\outreach. . .</p>
<p>Although I&#8217;ve spent time working or thinking about work for about 30 hours these past two days&#8230;I still have to give thanks for my job. God took a chance on me (or maybe I took a chance on Him?) in sending me here, and I&#8217;m doing just fine. I feel blessed to go above and beyond for the community center where I&#8217;ve spent these last three months. I feel humbled to be given the position I was given&#8230;one that is overflowing with the possibility for growth.</p>
<p>Our after school program has history of serving 50 kids + in the past. There&#8217;s different accounts as to why it decreases every year and it can be disheartening to hear of the past especially when all I know of The GCC is the present.</p>
<p>So, our average 20 kids a day has been manageable and I prefer to think that the continual decline of the program (which existed before I got there) is not my fault. But, it is also not my crutch. I am hating the idea of complacency as time goes on because it underlies the sentiment of many people around me. I realize my fresh stance on the center plays an effect on why nothing but optimism is how I choose to (try to) deal with the struggles of a non-profit with potential to serve so many needy individuals&#8230;on so few staff members.</p>
<p>Anyways, within two weeks we have added probably 10 kids to the program. It tells me that my and Elys&#8217;s outreach is not going unnoticed. We spend many volunteer-volunteer hours outside of our regular schedules around the community we are serving. We&#8217;ve been to Housing Association events, PTA meetings, Community Network meetings&#8230;we&#8217;ve posted fliers on bus-stops, in the &#8220;projects&#8221; (known as courts here), at schools, libraries, and every festival we&#8217;ve had access to (which, if you know San Antonio, you know festivals are this city&#8217;s forte&#8230;there&#8217;s one for any occasion). These new members lived in the low-income housing areas and our fliers caught their eye.</p>
<p>Expansion of our program to about 30-35 kids per day is both a blessing and a curse. Amidst 3 staff&#8230;we managed yesterday when kids bombarded us with the need to be occupied, attended to, etc.</p>
<p>It felt good to know that our work is being recognized as the <em>other </em>portion of &#8220;new kids&#8221; was junior high schoolers who&#8217;d heard good things about the program from their friends.</p>
<p>It made me feel inadequate, though, when I didn&#8217;t quite know how to cater to 10 extra kids. With planning an early-December Christmas party for 110 kids taking the biggest portion of my daily plate, it&#8217;s been hard to follow an agenda  for after school.</p>
<p>I felt beat down momentarily when I heard so many &#8220;Miss! What do we do now?!&#8221;s, but my co-workers picked me back up.</p>
<p>I&#8217;m learning that I can&#8217;t do it all&#8230;I&#8217;m learning I can do much more than I ever imagined and I, despite my shortcomings, refuse to stop trying&#8230;</p>
<p>Complacency won&#8217;t get the best of me.</p>
<p>1 year will be over before I know it&#8230;</p>
<p>&#160;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Compiling C in Ubuntu]]></title>
<link>http://williambuell.wordpress.com/2009/11/19/compiling-c-in-ubuntu/</link>
<pubDate>Fri, 20 Nov 2009 03:19:55 +0000</pubDate>
<dc:creator>William Buell</dc:creator>
<guid>http://williambuell.wordpress.com/2009/11/19/compiling-c-in-ubuntu/</guid>
<description><![CDATA[from THIS thread link: To C program in Ubuntu, follow the following steps: 1. Click on Places on men]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>from <a href="http://www.linuxforums.org/forum/linux-programming-scripting/131935-how-do-i-do-c-programming-ubuntu.html">THIS</a> thread link: </p>
<p>To C program in Ubuntu, follow the following steps:<br />
1. Click on Places on menu bar &#62; go to Home Folder.<br />
2. A new window appears containing folders like<br />
3. Here rightclick<br />
on your mouse button &#62; Create Document &#62; click on Empty File.<br />
4. Select the file &#62; press F2 &#62; rename it as neilay.c.<br />
5. Double click on neilay.c.<br />
6. There you type the simplest C Code:<br />
#include<br />
int main()<br />
{<br />
printf(&#8220;Neilay from India\n&#8221;);<br />
return 0;<br />
}<br />
7. Save and minimize everything.<br />
8. Click on Applications on the menu bar &#62; Accessories &#62; click on Terminal.<br />
9. A new window appears and since my username is “neilay”, neilay@ubuntu: ~ appears on its<br />
title bar as default – this will be different in your case.<br />
10. Now neglecting everything, just type: gcc neilay.c and press the Enter key.<br />
11. Wait and if your code is correct no error will be found and simply neilay@ubuntu: ~ $ will be<br />
appeared and indicates you can execute this compiled file.<br />
12. Now type: ./a.out and press the Enter key and see how nicely your file is executed!</p>
<p>Here is a light powerful IDE for C<br />
<a href="http://www.codelite.org/" target="_blank">http://www.codelite.org/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[attribute]]></title>
<link>http://pedorro.wordpress.com/2009/11/19/attribute/</link>
<pubDate>Fri, 20 Nov 2009 02:47:53 +0000</pubDate>
<dc:creator>ignacio</dc:creator>
<guid>http://pedorro.wordpress.com/2009/11/19/attribute/</guid>
<description><![CDATA[void __attribute__ ((constructor)) check_license(void) { /* Paid or not paid? */ }; Un pedazo de cód]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><pre class="brush: cpp;">
void __attribute__ ((constructor)) check_license(void)
{
/* Paid or not paid? */
};
</pre>
<p>Un pedazo de código así, incha muchísimo los huevos&#8230; <strong>hermoso.</strong></p>
<p>Por otro lado, muchas veces es muy práctico, para mas info: <a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function-Attributes">functions attributes</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Why We Exist]]></title>
<link>http://pastorpeter.wordpress.com/2009/11/18/why-we-exist/</link>
<pubDate>Wed, 18 Nov 2009 19:51:06 +0000</pubDate>
<dc:creator>pbonanno</dc:creator>
<guid>http://pastorpeter.wordpress.com/2009/11/18/why-we-exist/</guid>
<description><![CDATA[I made a phone call the other day, kind of out of the blue.  Something in me wanted to call a man th]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I made a phone call the other day, kind of out o<a href="http://pastorpeter.wordpress.com/files/2009/11/them2.jpg"><img class="alignleft size-medium wp-image-200" title="Them2" src="http://pastorpeter.wordpress.com/files/2009/11/them2.jpg?w=300" alt="" width="300" height="168" /></a>f the blue.  Something in me wanted to call a man that I had spoken to in the past about some business.  As the conversation went on, I knew that the call was much more than business.  It was clear that he was struggling with some things and needed some prayer.  I&#8217;m always reluctant to ask someone if I can pray for them, especially if I&#8217;m unsure of how they&#8217;ll respond.  This was true in this case.   Although I&#8217;m a pastor, I&#8217;m not this man&#8217;s pastor and I&#8217;m not even certain that he goes to church.</p>
<p>How many times do we miss the opportunity to reach out with the love of God, so consumed with our own lives and our own plans that the people right in front of us is invisible?  I think this is so true of many of us in the church.  We look at the blessings of being a Christian without understanding that we are blessed to be a blessing.  It&#8217;s really why we exist as followers of Christ- why the church exits in the world.</p>
<p>Someone once said that the church is the only organization that exists for those who aren&#8217;t members of it.  I like that quote&#8230;but I need to live it out more.  To be outward focused instead of inward focused is more than a matter of self-discipline.  It takes a constant remembering of where we came from and how God brought others into our lives when we were not following Him.  It&#8217;s how God came to us in the form of another person- to bring life.</p>
<p>The Christmas story speaks to us about God being &#8220;incarnate&#8221; in Christ; meaning God became man in order to relate to us and reach us on our level.  &#8220;He came to his own, but his own did not receive Him.  Yet to all who did receive Him, he gave the right to become children of God-&#8221; (Jn 1:11-12)  Incarnation didn&#8217;t stop with Jesus.  The church and those who are members of it, need to continue the process of restoring the broken, completing the task of Jesus.  Until we return to this mission, we will just be living our faith for ourselves alone.  And eventually that becomes a real drag!</p>
<p>It&#8217;s so easy to focus inward and miss the bigger picture of the world around us.  Like a light that is under a bushel, it makes no difference, shines in a very limited space, and even has the potential for internal combustion causing pain and damage.  But when we are engaged with the community that God has called us to reach, light shines so that the world may see our good deeds and praise the Father in heaven.</p>
<p>I&#8217;ve missed it so many times, but I&#8217;m grateful I made that phone call the other day.  Even though I believed I was calling for one thing (something that was about me), I obeyed the Holy Spirit who loves to draw people to Jesus.  God offers us many opportunities, and this is the season for giving, so let&#8217;s be a &#8220;go church&#8221;-<strong> a people that look outward not inward.</strong> This is why we exist!  We&#8217;ll be talking more about it beginning this Sunday in our new series: Them.  http://www.gccnh.com</p>
<p>-Peter</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Glindow / Werder Havel]]></title>
<link>http://wochenmarktfoto.wordpress.com/2009/11/18/glindow-werder-havel/</link>
<pubDate>Wed, 18 Nov 2009 10:32:19 +0000</pubDate>
<dc:creator>wochenmarktfoto</dc:creator>
<guid>http://wochenmarktfoto.wordpress.com/2009/11/18/glindow-werder-havel/</guid>
<description><![CDATA[. . siehe auch : www.glindow.brandenburghalle.com . Glindow ist seit der Brandenburger Gemeindegebie]]></description>
<content:encoded><![CDATA[. . siehe auch : www.glindow.brandenburghalle.com . Glindow ist seit der Brandenburger Gemeindegebie]]></content:encoded>
</item>
<item>
<title><![CDATA[Install GCC di OpenSolaris]]></title>
<link>http://thepetarung.wordpress.com/2009/11/13/install-gcc-di-opensolaris/</link>
<pubDate>Fri, 13 Nov 2009 03:01:38 +0000</pubDate>
<dc:creator>The Petarung</dc:creator>
<guid>http://thepetarung.wordpress.com/2009/11/13/install-gcc-di-opensolaris/</guid>
<description><![CDATA[Nah&#8230;penting banget ni gcc. Gak usah nyari kemana2, langsung aja menuju tutorial mas w3hol a.k.]]></description>
<content:encoded><![CDATA[Nah&#8230;penting banget ni gcc. Gak usah nyari kemana2, langsung aja menuju tutorial mas w3hol a.k.]]></content:encoded>
</item>
<item>
<title><![CDATA[The Little Things]]></title>
<link>http://1yeardeepintheheart.wordpress.com/2009/11/12/the-little-things/</link>
<pubDate>Thu, 12 Nov 2009 16:30:19 +0000</pubDate>
<dc:creator>Alyssa-Michelle</dc:creator>
<guid>http://1yeardeepintheheart.wordpress.com/2009/11/12/the-little-things/</guid>
<description><![CDATA[On a good day, I enjoy appreciating life&#8217;s little things. Life&#8217;s little accomplishments.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>On a good day, I enjoy appreciating life&#8217;s little things. Life&#8217;s little accomplishments.</p>
<p style="text-align:center;">
<p style="text-align:center;"><img class="aligncenter size-full wp-image-285" title="Bilingualism" src="http://1yeardeepintheheart.wordpress.com/files/2009/11/bilingualism.jpg" alt="Bilingualism" width="226" height="298" /></p>
<p>-Over the phone, invite parents/their kids to an exclusive Christmas party we are hosting. Carry-out the conversation in Spanish only? Check.</p>
<p>-Repeat the above process about 50 or so times and(<span style="text-decoration:underline;">make sure</span> you&#8217;re intelligible with your Spanish because it&#8217;s <em>your</em> butt if they don&#8217;t get the invitation)&#8230;Check.</p>
<p>-Babysit 3 rowdy (especially collectively) brothers who only know Spanish? Piece of <a title="Tres Leches" href="http://mexicanfood.about.com/od/sweetsanddesserts/r/treslechescake.htm" target="_blank">Tres Leches</a>.</p>
<p>After yesterday, I know that I am getting better at not only surviving your regular phone conversation (yes, I generally hate phone conversations), I can float by in the conversations where Spanish is the language of choice. On top of all of that&#8230;I now know that I am <em>at least (or almost?)</em> as fluent in Spanish as a 4-year-old. My vocabularly in communicating with the oh-so-adorable boys from my <a title="church" href="http://www.sanantonio.tx.us.mennonite.net/">church</a> was enough to get by&#8230;although it <em>would have</em> helped to remember the command &#8220;share&#8221;.</p>
<p>When I didn&#8217;t have the words, I made faces or goofy motions that they brought laughs and imitation.</p>
<p>They gave me hugs and butterfly kisses almost immediately. They played with pretend swords and were &#8220;caballeros&#8221;&#8230;and, when I asked them who I was, they said:</p>
<p style="text-align:center;">&#8220;Tu eres el Rey&#8221; (&#8220;You are the king&#8221;). I double-checked that declaration:</p>
<p style="text-align:center;">&#8220;Yo soy el Rey?!&#8221; (<em>I&#8217;M</em> the King?!&#8221;)</p>
<p style="text-align:center;">&#8220;Siii, <em>claaaro</em>!&#8221; (&#8220;Yes, of course!&#8221;).</p>
<p>I felt like Max from <span style="text-decoration:underline;"><a title="Where the Wild Things Are" href="http://wherethewildthingsare.warnerbros.com/" target="_blank">Where the Wild Things Are</a></span> and was comforted in my efforts toward bilingualism.</p>
<p>Needless to say, before I went to bed last night, I praised the linguistic Gods above.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[All new Daisy Park]]></title>
<link>http://dumbartonroad.wordpress.com/2009/11/10/all-new-daisy-park/</link>
<pubDate>Tue, 10 Nov 2009 18:04:03 +0000</pubDate>
<dc:creator>dumbartonroad</dc:creator>
<guid>http://dumbartonroad.wordpress.com/2009/11/10/all-new-daisy-park/</guid>
<description><![CDATA[GHA and GCC have put together a nice new play area at Daisy Park, and this morning was the official ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.gha.org.uk">GHA</a> and <a href="http://www.glasgow.gov.uk/">GCC</a> have put together a nice new play area at Daisy Park, and this morning was the official opening. St. Paul&#8217;s and Scotstoun PS kids were there to do the important stuff. They did a great job cutting the ribbon and going bananas.  Councillors Jean McFadden and Graeme Hendry were there too, it&#8217;s good to see the council investing in play facilities.  Next stop, Jordan Street!</p>
<p><a href="http://dumbartonroad.wordpress.com/files/2009/11/10112009062.jpg"><img src="http://dumbartonroad.wordpress.com/files/2009/11/10112009062.jpg" alt="10112009062" title="10112009062" width="500" height="375" class="alignnone size-full wp-image-14" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Parameter ใน gcc ที่น่าสนใจ]]></title>
<link>http://ipass.wordpress.com/2009/11/10/parameter-%e0%b9%83%e0%b8%99-gcc-%e0%b8%97%e0%b8%b5%e0%b9%88%e0%b8%99%e0%b9%88%e0%b8%b2%e0%b8%aa%e0%b8%99%e0%b9%83%e0%b8%88/</link>
<pubDate>Tue, 10 Nov 2009 09:18:21 +0000</pubDate>
<dc:creator>ipass</dc:creator>
<guid>http://ipass.wordpress.com/2009/11/10/parameter-%e0%b9%83%e0%b8%99-gcc-%e0%b8%97%e0%b8%b5%e0%b9%88%e0%b8%99%e0%b9%88%e0%b8%b2%e0%b8%aa%e0%b8%99%e0%b9%83%e0%b8%88/</guid>
<description><![CDATA[ตามที่ Nathdodo ไปหามานั้น มีสอง parameter ที่น่าสนใจสำหรับ gcc คือ -fpack-struct และ -fPIC ครับ อนึ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><span style="widows:2;text-transform:none;text-indent:0;border-collapse:separate;font:22px Tahoma;white-space:normal;orphans:2;letter-spacing:normal;color:rgb(83,100,130);word-spacing:0;" class="Apple-style-span"><span style="line-height:21px;font-family:'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif;color:rgb(0,0,0);font-size:16px;" class="Apple-style-span"><img src="http://ipass.files.wordpress.com/2009/11/zrclip_001p2b408b0b.png" style="width:49px;display:inline;float:left;height:60px;" height="60">ตามที่ Nathdodo ไปหามานั้น <span style="text-decoration:underline;margin:0;padding:0;">มีสอง parameter ที่น่าสนใจสำหรับ gcc</span> คือ <span style="font-weight:bold;margin:0;padding:0;">-fpack-struct</span> และ <span style="font-weight:bold;margin:0;padding:0;">-fPIC</span> ครับ <br /> อนึ่งหากขึ้นต้นด้วย <span style="font-weight:bold;margin:0;padding:0;">-f</span> นั้นหมายถึงเรากำลังคุยกับ gcc เพื่อกำหนดกรรมวิธี ในการ Generate Code .. เป็นอย่างไรมาลองดู</span></span><span style="widows:2;text-transform:none;text-indent:0;border-collapse:separate;font:22px Tahoma;white-space:normal;orphans:2;letter-spacing:normal;color:rgb(83,100,130);word-spacing:0;" class="Apple-style-span"><span style="line-height:21px;font-family:'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif;color:rgb(0,0,0);font-size:16px;" class="Apple-style-span"><br /></span></span></p>
<p> <!--more--><br />
<h1>-fpack-struct</h1>
<p>เพื่อแก้ปัญหาการกำหนดค่าตัวแปร 16-bit หรือ 8-bit ใน 32-bit system <br /> ..โดยเฉพาะการจอง member ของ struct แล้วทาง gcc กำหนดให้ทุก member มี sizeof ขั้นต่ำเป็น 4-byte (32-bit) เท่ากันหมด ถึงแม้เราจะจองเป็น char (8-bit) ก็ตาม <br /> ทางแก้ไขสามารถทำได้ทั้งที่ gcc และการกำหนด #pragma ของภาษา C <br /> <a style="border-bottom:rgb(54,138,210) 1px solid;outline-style:none;color:rgb(16,82,137);text-decoration:none;margin:0;padding:0;" href="http://en.wikipedia.org/wiki/Data_structure_alignment" class="postlink">http://en.wikipedia.org/wiki/Data_structure_alignment</a></p>
<h1>-fPIC</h1>
<p>(Position-Independent Code ) <br /> เพื่อแก้ปัญหาคล้ายคลึงกับปัญหาข้องต้น แต่เกิดขึ้นใน Machine Code (ไม่ใช่ Data เหมือนปัญหาแรก) <br /> ..ใน Dynamic Link Library <br /> &#8230; ทำไมนะหรือ.. ก็เพราะว่าปรกติแล้วในบาง Machine ไม่ Support การอ่าน Code ทีละ 8-bit หรือ 16-bit หากตัวเองเป็น 32-bit (เช่นใน Motorola บางรุ่น) <br /> ดังนั้นเมื่อต้อง Load Dynamic Link Library ที่ปราศจาก -fPIC ตอน Compile จะทำให้ CPU ต้องเสียเวลา Convert Code ให้ Compatible เสียก่อน .. เสียเวลา <br /> ดังนั้นการใช้ -fPIC จึงช่วยประหยัดเวลาลงไปได้ <br /> <a style="border-bottom:rgb(54,138,210) 1px solid;outline-style:none;color:rgb(16,82,137);text-decoration:none;margin:0;padding:0;" href="http://en.wikipedia.org/wiki/Position-independent_code" class="postlink">http://en.wikipedia.org/wiki/Position-independent_code</a></p>
<p class="zoundry_raven_tags">  <!-- Tag links generated by Zoundry Raven. Do not manually edit. http://www.zoundryraven.com -->  <span class="ztags"><span class="ztagspace">Technorati</span> : <a href="http://www.technorati.com/tag/fpack-struct" class="ztag" rel="tag">fpack-struct</a>, <a href="http://www.technorati.com/tag/fpic" class="ztag" rel="tag">fpic</a>, <a href="http://www.technorati.com/tag/gcc" class="ztag" rel="tag">gcc</a>, <a href="http://www.technorati.com/tag/packed+structure" class="ztag" rel="tag">packed structure</a>, <a href="http://www.technorati.com/tag/position-independent+code" class="ztag" rel="tag">position-independent code</a></span>  <br /> <span class="ztags"><span class="ztagspace">Del.icio.us</span> : <a href="http://del.icio.us/tag/fpack-struct" class="ztag" rel="tag">fpack-struct</a>, <a href="http://del.icio.us/tag/fpic" class="ztag" rel="tag">fpic</a>, <a href="http://del.icio.us/tag/gcc" class="ztag" rel="tag">gcc</a>, <a href="http://del.icio.us/tag/packed%20structure" class="ztag" rel="tag">packed structure</a>, <a href="http://del.icio.us/tag/position-independent%20code" class="ztag" rel="tag">position-independent code</a></span> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[linux] How to install compilers on Puppy Linux]]></title>
<link>http://nixtricks.wordpress.com/2009/11/08/linux-how-to-install-compilers-on-puppy-linux/</link>
<pubDate>Sun, 08 Nov 2009 09:46:57 +0000</pubDate>
<dc:creator>kousik</dc:creator>
<guid>http://nixtricks.wordpress.com/2009/11/08/linux-how-to-install-compilers-on-puppy-linux/</guid>
<description><![CDATA[Recently I have started playing with the Puppy (Puppy Linux 4.3.1, that is). I liked the speed and e]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Recently I have started playing with the Puppy (Puppy Linux 4.3.1, that is). I liked the speed and ease of using it so much that I decided to do a full install on my hard drive. It&#8217;s very lightweight and very fast.</p>
<p>However, after the initial phase of likeness, I realized that it is missing a lot of things &#8212;- including the build essentials (e.g., gcc).  That means Puppy has trimmed its fat in order to become so lean (the .iso file is about 100 MB)  that it does not have some of the necessary packages &#8212; especially the ones, that someone may need to compile packages from the source code if there is a need. However, the default software suit is very nice and useful: I haven&#8217;t seen such a good collection in a such a lean size before.</p>
<p>But, the tools I was looking for was not in their repository either. After searching in puppy <a href="http://www.murga-linux.com/puppy/" target="_blank">forums</a>, I realized that I need a package called devx-431.sfs [<a href="ftp://ibiblio.org/pub/linux/distributions/puppylinux/puppy-4.3.1/" target="_blank">download link</a>].  But for a hard puppy (a full installation of puppy on the hard drive) it is a special case if you want to install a .sfs file &#8212;- which I had a hard time figuring out skimming through various posts in the forum (which are very old by the way!).</p>
<p>However, it is <a href="http://www.puppylinux.com/hard-puppy.htm" target="_blank">explained</a> in the main <a href="http://www.puppylinux.com/index.html" target="_blank">website</a> in a very clear fashion (I wish I looked there first!).</p>
<blockquote>
<pre>1. Click on the devx_xxx.sfs in a ROX-Filer window to mount it.
2. Open a terminal in the mounted directory.
3. # cp -a --remove-destination ./* /mnt/hda2/
4. # sync
5. Close the terminal.
6. Click on the devx_xxx.sfs file to unmount it</pre>
<p>Note, the &#8216;&#8211;remove-destination&#8217; option is essential. If you only use &#8216;-f&#8217; to force overwrite, it will follow (dereference) a symlink, that can cause unexpected overwrites.</p></blockquote>
<p>I had a problem performing the second step. If you save the devx_xxx.sfs file in the /root directory (which is startup directory, i.e. if you do a &#8220;cd ~&#8221; you&#8217;ll reach there), then the mounted directory will look like &#8220;<code>+root+devx_xxx.sfs/</code>&#8221;. Just cd to there in the console and perform the following steps above.</p>
<p><strong>Credit:</strong> <a href="http://www.puppylinux.com/hard-puppy.htm">here</a>.</p>
<p><strong>Further reading:</strong> <a href="http://lifehacker.com/307542/taking-puppy-linux-for-a-walk" target="_blank">Lifehacker&#8217;s review</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Static locals and threadsafety in g++]]></title>
<link>http://arkaitzj.wordpress.com/2009/11/07/static-locals-and-threadsafety-in-g/</link>
<pubDate>Sat, 07 Nov 2009 19:38:51 +0000</pubDate>
<dc:creator>Arkaitz Jimenez</dc:creator>
<guid>http://arkaitzj.wordpress.com/2009/11/07/static-locals-and-threadsafety-in-g/</guid>
<description><![CDATA[Often when looking in the internet for implementations of some patterns in C++ we come across the we]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Often when looking in the internet for implementations of some patterns in C++ we come across the well-known <em>Meyers singleton</em>, which is basically the next code:</p>
<pre class="brush: cpp;">
class Singleton{
    Singleton(){
        // Thread-unsafe code
    }
    static Singleton* getInstance(){
        static Singleton instance;
        return &#38;instance;
    }
};
</pre>
<p>This essentially reserves static memory for the size of the instance and executes the class constructor <strong>during the first call to getInstance()</strong>, this of course occurs only if we are dealing with a non-<a href="http://en.wikipedia.org/wiki/Plain_old_data_structures">POD</a> object.</p>
<p>The problem here is that we might run in problems if we get inside <strong>getInstance</strong> with 2 threads at the same time <strong>for the first time</strong>. Obviously the constructor is not thread-safe <em>per se</em>.</p>
<p>However, GCCs g++ gives us a help here and protects every local static variable <strong>construction</strong> with thread-safe guards, <em>__cxa_guard_acquire</em> and <em>__cxa_guard_release</em> do the job here protecting the constructor. Note that this only happens with local statics as global static construction occurs before any function of the translation unit gets executed.</p>
<p>Differences are obvious if we take a look at the generated code, PODs are just data so no construction is needed, non-PODs are properly protected</p>
<p>POD type, function body highlighted:</p>
<pre class="brush: cpp; highlight: [3,4];">
class pod_class {    public:
        static pod_class* instance(){
            static pod_class once;
            return &#38;once;
        }};
int main(){ return (int)pod_class::instance; }
</pre>
<pre class="brush: plain; highlight: [4];">
080483fd &#60;_ZN9pod_class8instanceEv&#62;:
 80483fd:       55                push   %ebp
 80483fe:       89 e5             mov    %esp,%ebp
 8048400:       b8 f8 95 04 08    mov    $0x80495f8,%eax
 8048405:       5d                pop    %ebp
 8048406:       c3                ret
</pre>
<p>Non-POD type, <strong>class constructor</strong> and function body higlighted:<br />
<!--more--></p>
<pre class="brush: cpp; highlight: [2,4];">
class nonpod_class {    public:
        nonpod_class(){}
        static nonpod_class* instance(){
            static nonpod_class once; return &#38;once;
        }};
int main(){ return (int)nonpod_class::instance; }
</pre>
<pre class="brush: plain; highlight: [5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]; wrap-lines: false;">
080484b3 &#60;_ZN12nonpod_class8instanceEv&#62;:
 80484b3:  55                    push   %ebp
 80484b4:  89 e5                 mov    %esp,%ebp
 80484b6:  83 ec 08              sub    $0x8,%esp
 80484b9:  b8 f0 96 04 08        mov    $0x80496f0,%eax
 80484be:  0f b6 00              movzbl (%eax),%eax
 80484c1:  84 c0                 test   %al,%al
 80484c3:  75 2d                 jne    80484f2 &#60;_ZN12nonpod_class8instanceEv+0x3f&#62;
 80484c5:  c7 04 24 f0 96 04 08  movl   $0x80496f0,(%esp)
 80484cc:  e8 c7 fe ff ff        call   8048398 &#60;__cxa_guard_acquire@plt&#62;
 80484d1:  85 c0                 test   %eax,%eax
 80484d3:  0f 95 c0              setne  %al
 80484d6:  84 c0                 test   %al,%al
 80484d8:  74 18                 je     80484f2 &#60;_ZN12nonpod_class8instanceEv+0x3f&#62;
 80484da:  c7 04 24 f8 96 04 08  movl   $0x80496f8,(%esp)
 80484e1:  e8 c8 ff ff ff        call   80484ae &#60;_ZN12nonpod_classC1Ev&#62;
 80484e6:  c7 04 24 f0 96 04 08  movl   $0x80496f0,(%esp)
 80484ed:  e8 d6 fe ff ff        call   80483c8 &#60;__cxa_guard_release@plt&#62;
 80484f2:  b8 f8 96 04 08        mov    $0x80496f8,%eax
 80484f7:  c9                    leave
 80484f8:  c3                    ret
</pre>
<p>This behaviour can be avoided by using -fno-threadsafe-statics in the g++s commandline.</p>
<p><strong>EDIT:</strong> Thanks to Tom in the comment below I updated the post with the involved code_comment from gcc project<br />
<a href="http://gcc.gnu.org/viewcvs/branches/gcc-4_2-branch/gcc/cp/decl.c?view=markup&#38;pathrev=129388">http://gcc.gnu.org/viewcvs/branches/gcc-4_2-branch/gcc/cp/decl.c?view=markup&#38;pathrev=129388</a></p>
<pre class="brush: cpp;">
/* Emit code to perform this initialization but once. This code looks like:
static guard;
if (!guard.first_byte) {
    if (__cxa_guard_acquire (&#38;guard)) {
        bool flag = false;
        try {
            // Do initialization.
            flag = true; __cxa_guard_release (&#38;guard);
            // Register variable for destruction at end of program.
        } catch {
            if (!flag) __cxa_guard_abort (&#38;guard);
        }
}
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Compiling C/C++ Programs w/ GCC]]></title>
<link>http://orangeverest.wordpress.com/2009/11/07/compiling-cc-programs-w-gcc/</link>
<pubDate>Sat, 07 Nov 2009 07:27:59 +0000</pubDate>
<dc:creator>orangeverest</dc:creator>
<guid>http://orangeverest.wordpress.com/2009/11/07/compiling-cc-programs-w-gcc/</guid>
<description><![CDATA[GCC or the GNU Compiler Collection is undeniably the most widely used C/C++ compiler today. Unlike t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>GCC or the GNU Compiler Collection is undeniably the most widely used C/C++ compiler today. Unlike to Microsoft Visual C++ or Turbo C++ compilers, GCC is developed and used by majority of the Open Source community. In fact, GCC is ready out of the box in all Linux distros. Also, GCC is ANSI/ ISO compliant so we are confident that standard functions/ headers such as &#60;string&#62;, etc. are supported. However, since GCC on its own does not have a GUI, we are forced to compile it using the command line/ Terminal. So, how do we use GCC anyway (assuming that an IDE is not available)?</p>
<p>Step 1. In the command line, make sure that you are in the same directory as the  C/C++ source code (.c, .cpp, .cc, .cxx ) you want to compile.</p>
<p>Step 2. If you want to compile a C++ file called &#8217;srcFile.cpp&#8217; and you want to name its executable output as &#8216;outFile&#8217;, type the GCC command following this format:</p>
<p>g++ srcFile.cpp -o outFile</p>
<p>*Note that you should change &#8216;g++&#8217; to &#8216;gcc&#8217; if you want to compile C programs.</p>
<p>OrEv.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[GCC tricks for the Linux Kernel]]></title>
<link>http://shoaibmir.wordpress.com/2009/11/03/gcc-tricks-for-the-linux-kernel/</link>
<pubDate>Mon, 02 Nov 2009 15:06:10 +0000</pubDate>
<dc:creator>shoaibmir</dc:creator>
<guid>http://shoaibmir.wordpress.com/2009/11/03/gcc-tricks-for-the-linux-kernel/</guid>
<description><![CDATA[While debugging some GCC specific linking problems, came across this very handy resource for gcc tip]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>While debugging some GCC specific linking problems, came across this very handy resource for gcc tips and tricks&#8230; very helpful indeed! </p>
<p>Check it out at &#8211;&#62; <a href="http://www.ibm.com/developerworks/linux/library/l-gcc-hacks/index.html">http://www.ibm.com/developerworks/linux/library/l-gcc-hacks/index.html</a></p>
<p>&#8211;<br />
Shoaib Mir<br />
shoaibmir[@]gmail.com</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Free Drugs?]]></title>
<link>http://1yeardeepintheheart.wordpress.com/2009/10/30/free-drugs/</link>
<pubDate>Fri, 30 Oct 2009 14:01:29 +0000</pubDate>
<dc:creator>Alyssa-Michelle</dc:creator>
<guid>http://1yeardeepintheheart.wordpress.com/2009/10/30/free-drugs/</guid>
<description><![CDATA[At school, the elementary-age kids at the GCC are learning about saying &#8220;No&#8221; to drugs. T]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="aligncenter size-medium wp-image-170" title="Alejandra" src="http://1yeardeepintheheart.wordpress.com/files/2009/10/sany0761.jpg?w=300" alt="Alejandra" width="300" height="225" />At school, the elementary-age kids at the GCC are learning about saying &#8220;No&#8221; to drugs.</p>
<p>They all have been proudly wearing their red &#8220;Drug-Free Zone&#8221; ribbons to the center as a result.</p>
<p>Yesterday, Alejandra, in her Spanish-accent started yelling:</p>
<p>&#8220;Free drugs! Free drugs! Free drugs!&#8221;</p>
<p>Before I could reprimand her and the message she was not-so-subtly sending to her more mature but still impressionable peers, I looked down at her ribbon and realized&#8230;she didn&#8217;t mean it.</p>
<p>What she meant to yell was,</p>
<p>&#8220;Drug-free! Drug-free! Drug-free!&#8221;</p>
<p>Minor detail&#8230;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Adobe Alchemy and Flash Magic]]></title>
<link>http://bison.wordpress.com/2009/10/29/adobe-alchemy-and-flash-magic/</link>
<pubDate>Thu, 29 Oct 2009 20:46:40 +0000</pubDate>
<dc:creator>bison</dc:creator>
<guid>http://bison.wordpress.com/2009/10/29/adobe-alchemy-and-flash-magic/</guid>
<description><![CDATA[So todays hot discovery was Alchemy by Adobe (I&#8217;m not as up to date as I used to be&#8230;). T]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>So todays hot discovery was <a href="http://labs.adobe.com/technologies/alchemy/">Alchemy</a> by Adobe (I&#8217;m not as up to date as I used to be&#8230;). Taking C/C++ and translating it into byte-code for AVM2. Totally awesome. Now initially I was under the impression that it uses <a href="http://llvm.org/">LLVM</a> for code generation (backend), but it seems that GCC can be used instead on the downloads page. Anyways, there are a few really cool <a href="http://www.unitzeroone.com/blog/2009/03/18/flash-10-massive-amounts-of-3d-particles-with-alchemy-source-included/">demos</a> of what could be done and the concept is promising to say the least. The fact that Alchemy compiled code actually becomes faster (due to compiler optimization not present in <a href="http://www.adobe.com/products/flex/">FLEX</a>) is a real kicker. Also I&#8217;m toying with the idea of writing a C/C++ rendering module for Flash in the current framework and then just using FLEX for final touches. I think it still has some way to go in ways of documentation before I can get anything working (I know little to zero ActionScript). Now skip ahead to 5:02 for the real magic!</p>
<p style="text-align:center;"><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/0hX-Uh3oTcE&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/0hX-Uh3oTcE&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Một số khác biệt giữa gcc và Borland C]]></title>
<link>http://ubuntufanboy.wordpress.com/2009/10/28/m%e1%bb%99t-s%e1%bb%91-khac-bi%e1%bb%87t-gi%e1%bb%afa-gcc-va-borland-c/</link>
<pubDate>Wed, 28 Oct 2009 10:34:17 +0000</pubDate>
<dc:creator>ubuntu fanboy</dc:creator>
<guid>http://ubuntufanboy.wordpress.com/2009/10/28/m%e1%bb%99t-s%e1%bb%91-khac-bi%e1%bb%87t-gi%e1%bb%afa-gcc-va-borland-c/</guid>
<description><![CDATA[Ở trường, giáo viên và các học viên khác sử dụng Borland C 3.1 (cũ mèm) trên windows còn tôi thì vẫn]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ở trường, giáo viên và các học viên khác sử dụng Borland C 3.1 (cũ mèm) trên windows còn tôi thì vẫn cứ Ubuntu với gcc để làm công cụ biên dịch. Trong quá trình sử dụng tôi gặp một số khác biệt giữa gcc và BC, khiến trình biên dịch báo lỗi. Nhưng nhờ có google đỡ đầu nên những khó khăn ấy cũng được giải quyết.</p>
<p>Hãy dùng <strong>int main()</strong> thay cho <strong>void main()</strong> nếu trình biên dịch báo lỗi</p>
<blockquote><p>main must return &#8216;int&#8217;</p></blockquote>
<p>Và trước khi kết thúc chương trình nên cho thêm dòng return 0; (mặc dù trình biên dịch không báo lỗi)</p>
<p>Khi muốn khai báo biến trong switch-case, hãy bọc case bằng cặp {&#8230;}. Ví dụ:</p>
<pre>switch (menu)
{
    case 1:    <strong>
    <span style="color:red;">{</span></strong>
         <strong>int sum=0;</strong>
         for (i=0;i&#60;3;i++)
               sum = sum + i;
         printf("sum = %d", sum);
         break; <strong>
    <span style="color:red;">}</span></strong>
}
</pre>
<p>Sẵn nói về vòng lặp, ta không thể khai báo biến trong vòng lặp như BC được, mà phải khai báo trước. Ví dụ:</p>
<blockquote><p><del datetime="2009-10-28T09:20:52+00:00">for(int i=0; i&#60;3;i++)</del> -&#62; <strong>int i;  for(i=0;i&#60;3;i++)</strong></p></blockquote>
<p>Khi cho nhập 1 kí tự, sẽ thường xảy ra hiện tượng trượt. Trong BC giải quyết bằng lệnh:</p>
<blockquote><p>fflush(stdin);</p></blockquote>
<p>Để làm sạch bộ đệm. Tuy nhiên gcc có vẻ như không hiểu câu này, vậy thì hãy giải phóng bộ đệm bằng lệnh này:</p>
<blockquote><p>getchar():</p></blockquote>
<p>hoặc</p>
<blockquote><p>while (getchar() != &#8216;\n&#8217;) continue;</p></blockquote>
<p>Lệnh tương ứng của<strong> clrscr();</strong> là <strong>system(&#8220;clear&#8221;);</strong></p>
<p>Trong gcc trong có thư viện conio.h nên một số yêu câu như getch(); sẽ không thực hiện được. Lời khuyên là bổ sung thư viện <strong>ncurses.h</strong> (xem thêm về ncurses tại <a href="http://www.faqs.org/faqs/faqresults.html?cx=012585674615115756003%3A0rnper8ld_o&#38;cof=FORID%3A11&#38;ie=UTF-8&#38;hq=more%3Afaq&#38;q=ncurses&#38;sa=Search#1142">đây</a>)</p>
<p>Một tiện lợi của gcc là thư viện stdio.h có thể đảm nhận các phép toán về căng bậc 2 và luỹ thừa mà không cần phải gọi thư viện math.h.</p>
<p>Lệnh nhập chuỗi <strong>gets(s)</strong> không được chấp nhận trong gcc, do đó hãy dùng <strong>fgets(s, 50, stdin)</strong> trong đó: s là tên biến, 50 là chiều dài của chuỗi.</p>
<p>Do mới tiếp xúc với C chưa lâu nên tạm thời tôi chỉ mới biết tới đó, sau này có thể bổ sung thêm, nếu bạn nào biết thêm nhiều điều nữa, hãy chia sẻ với tôi nhé!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Sand Dunes]]></title>
<link>http://helminadia.wordpress.com/2009/10/28/snd-dunes/</link>
<pubDate>Wed, 28 Oct 2009 06:36:24 +0000</pubDate>
<dc:creator>helminadia</dc:creator>
<guid>http://helminadia.wordpress.com/2009/10/28/snd-dunes/</guid>
<description><![CDATA[Shakeer-Bahrain]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div id="attachment_90" class="wp-caption alignleft" style="width: 310px"><img class="size-medium wp-image-90" title="Sand dunes " src="http://helminadia.wordpress.com/files/2009/10/img_0108.jpg?w=300" alt="Sand dunes " width="300" height="198" /><p class="wp-caption-text">Shakeer-Bahrain</p></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Intellectual Capital Arabia (UAE &amp; Yemen)]]></title>
<link>http://ummulhaarith.wordpress.com/2009/10/27/intellectual-capital-dubai-yemen/</link>
<pubDate>Tue, 27 Oct 2009 01:10:45 +0000</pubDate>
<dc:creator>ummulhaarith</dc:creator>
<guid>http://ummulhaarith.wordpress.com/2009/10/27/intellectual-capital-dubai-yemen/</guid>
<description><![CDATA[Those of you looking for funding to start a business may contact Wael Mahmoud at IC Arabia on wael@i]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="alignleft size-thumbnail wp-image-88" title="logo1" src="http://ummulhaarith.wordpress.com/files/2009/10/logo11.gif?w=150" alt="logo1" width="150" height="121" />Those of you looking for funding to start a business may contact Wael Mahmoud at IC Arabia on <a href="mailto:wael@icarabia.com">wael@icarabia.com</a></p>
<p>The only criteria are a sound idea and a professional business plan.</p>
<p><a href="http://www.icarabia.com">http://www.icarabia.com</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Finding unused functions, variables, symbols]]></title>
<link>http://zenjedihitchhiker.wordpress.com/2009/10/22/finding-unused-functions-variables-symbols/</link>
<pubDate>Thu, 22 Oct 2009 18:23:54 +0000</pubDate>
<dc:creator>tpb261</dc:creator>
<guid>http://zenjedihitchhiker.wordpress.com/2009/10/22/finding-unused-functions-variables-symbols/</guid>
<description><![CDATA[Well here goes the first copy-paste blog from blogger my new project at work: make a script that can]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Well here goes the first copy-paste blog from blogger<br />
my new project at work:<br />
make a script that can find all the unused variables, functions etc in the code. what&#8217;s to it you say?<br />
Use gcc&#8217;s &#8211;unused-functions i hear? Well problem is we dont use gcc &#8211; soe modified version of it for our h/w platform, which does not support that option. So you see I fall back to some ever helpful guys:</p>
<p>   1. nm;<br />
   2. objdump;<br />
   3. grep;<br />
   4. gawk;<br />
   5. uniq; and<br />
   6. cut</p>
<p>the idea is simple:</p>
<p>   1. generate a symbols file<br />
   2. generate 2 assembly instruction file</p>
<p>    * one contains all normal functions<br />
    * one contais even functions that we place on a &#8220;spl&#8221; RAM</p>
<p>now for each line from symbols serach these two files for atleast 3 and 2 occurences of the address respectively. Simple? Well not so very. I will put the scipt in the next post. Meanwhile I make my life more miserable, &#8220;I&#8221; have been asked to do it for C++ !!! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Well cant help it now Can I?<br />
I think a step ahead. How about a script that also adds &#8220;#if 0&#8243; to the source code? Well more work.<br />
That shall come later if completed. </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[the parts are greater than the sum of the whole. ]]></title>
<link>http://patlab09.wordpress.com/2009/10/17/the-parts-are-greater-than-the-sum-of-the-whole/</link>
<pubDate>Sat, 17 Oct 2009 15:11:37 +0000</pubDate>
<dc:creator>patlab</dc:creator>
<guid>http://patlab09.wordpress.com/2009/10/17/the-parts-are-greater-than-the-sum-of-the-whole/</guid>
<description><![CDATA[When the first of school year 09-10 started, i told myself that i will do everything to make my Seme]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>When the first of school year 09-10 started, i told myself that i will do everything to make my Semestral QPA higher than before. I swore I will be more GCC.I even wrote it on my planner so I&#8217;ll always see it.</p>
<p>But alas! My GCC drive wore off. Iam not inspired to study anymore. Plus, facebook always tempts me to log in and check what is happening to my friends-to everybody. We had an internet connected in our dorm, that made studying easier to ignore.</p>
<p>I did not entirely slacked off, when I really need to study or finish a project, I can stay awake up until 3 or 4am in the morning (then be late for the next day:D). It was just I felt that this sem, I&#8217;m studying not because I want to, but because I have to. Suddenly, studying became 100% responsibility. It was not fun anymore to learn. I always long for that feeling when I was so inspired and driven to study and have an excellent grade.</p>
<p>But after typhoon Ondoy devastated the country, that time when papers poured like Ondoy rain- I went back to my last sem self. I studied- read, gave all my effort to doing my research paper, edit other papers. Didn&#8217;t even slept (for the first time) before research paper submission (envi research). I know I gave all I can to the projects- and they were appreciated! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  My envi research paper is high so is our envi cost that was why I am very happy these past few days. I can&#8217;t believe what I got.</p>
<p>But, in this rare case,the parts are greater than the sum of the whole. I only I did my best on the first part of the sem- if only I did not became lazy. If only I studied more, i would&#8217;ve had a higher grade. The scores of the first exams, papers, etc are so low, it pulled my total grade down to hell. Sayang. My card looks good ( except the incompletes) but when you sum it up, nope- it&#8217;s not so good. I&#8217;m not satissfied at all.</p>
<p>Because of my laziness, my goal of having a better semestral QPA than last sem is busted! I need to have super high grades for my two incompletes- i can&#8217;t do that. It&#8217;s too late. I guess the DSLR is not really for me. Sorry.</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
