<?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>true c0d3</title>
	<atom:link href="http://truecode.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://truecode.wordpress.com</link>
	<description>programação, nerdisses e afins</description>
	<lastBuildDate>Fri, 04 Dec 2009 15:56:38 +0000</lastBuildDate>
	<language>pt</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='truecode.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/83217d7f4e3d64886ffc64b3ef3924d2?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>true c0d3</title>
		<link>http://truecode.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://truecode.wordpress.com/osd.xml" title="true c0d3" />
	<atom:link rel='hub' href='http://truecode.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Recursividade: Somar intervalo entre dois números</title>
		<link>http://truecode.wordpress.com/2009/12/04/recursividade-somar-intervalo-entre-dois-numeros/</link>
		<comments>http://truecode.wordpress.com/2009/12/04/recursividade-somar-intervalo-entre-dois-numeros/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 15:56:38 +0000</pubDate>
		<dc:creator>ceb10n</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[recursividade]]></category>

		<guid isPermaLink="false">http://truecode.wordpress.com/?p=94</guid>
		<description><![CDATA[Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente. Escreva uma função recursiva que calcule a soma de todos os números compreendidos entre os valores A e B passados por parâmetro. /*=============================================================================* * includes * *=============================================================================*/ #include &#60;stdlib.h&#62; #include &#60;stdio.h&#62; /*=============================================================================* * declaracoes * *==============================================================================* /*-----------------------------------------------------------------------------* * declaracoes - prototipos de [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=94&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente.</p>
<p>Escreva uma função recursiva que calcule a soma de todos os números compreendidos entre os valores A e B passados por parâmetro. </p>
<p><span id="more-94"></span></p>
<pre class="brush: cpp;">
/*=============================================================================*
* includes                                                                     *
*=============================================================================*/

#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;

/*=============================================================================*
* declaracoes                                                                  *
*==============================================================================*
/*-----------------------------------------------------------------------------*
* declaracoes - prototipos de funcoes                                          *
*-----------------------------------------------------------------------------*/

int somaNumeros(int, int);

/*-----------------------------------------------------------------------------*
* funcao &quot;main&quot;                                                                *
*-----------------------------------------------------------------------------*/

int main(int argc, char *argv[]) {   

    int iNumA = 0, iNumB = 0, ret = 0;

    printf(&quot;Digite o valor do numero A: &quot;);
    scanf(&quot;%d&quot;, &amp;iNumA);
    printf(&quot;\nDigite o valor do numero B: &quot;);
    scanf(&quot;%d&quot;, &amp;iNumB);
    if (iNumA &lt; iNumB)
       ret = somaNumeros(iNumA, iNumB);
    else
        ret = somaNumeros(iNumB, iNumA);

    printf(&quot;\n\nResultado da soma do intervalo dos dois numeros: %d&quot;, ret);

    system(&quot;pause&quot;);

    return 1;
}

/*-----------------------------------------------------------------------------*
* corpo das funções - somaNumeros                                              *
*-----------------------------------------------------------------------------*/

int somaNumeros(int iNumA, int iNumB) {
    if (iNumB == iNumA + 1)
       return iNumA + iNumB;
    else
        return  iNumA + somaNumeros(iNumA + 1, iNumB);
}</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/truecode.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/truecode.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/truecode.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/truecode.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/truecode.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/truecode.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/truecode.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/truecode.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/truecode.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/truecode.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/truecode.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/truecode.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/truecode.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/truecode.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=94&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://truecode.wordpress.com/2009/12/04/recursividade-somar-intervalo-entre-dois-numeros/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7dd77bf33b3ab37df96a155b38c5685d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ceb10n</media:title>
		</media:content>
	</item>
		<item>
		<title>Ordenar vetor utilizando quicksort</title>
		<link>http://truecode.wordpress.com/2009/12/04/ordenar-vetor-utilizando-quicksort/</link>
		<comments>http://truecode.wordpress.com/2009/12/04/ordenar-vetor-utilizando-quicksort/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 15:53:15 +0000</pubDate>
		<dc:creator>ceb10n</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[quicksort]]></category>

		<guid isPermaLink="false">http://truecode.wordpress.com/?p=92</guid>
		<description><![CDATA[Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente. Ordene um vetor gerado pelo método quicksort. /*=============================================================================* * includes * *=============================================================================*/ #include &#60;stdlib.h&#62; #include &#60;stdio.h&#62; #include &#60;time.h&#62; /*=============================================================================* * typedef * *=============================================================================*/ struct lista { int iNum; struct lista *pLista; }; typedef lista Lista; /*=============================================================================* * declaracoes * *==============================================================================* /*-----------------------------------------------------------------------------* * [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=92&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente.</p>
<p>Ordene um vetor gerado pelo método quicksort.</p>
<p><span id="more-92"></span></p>
<pre class="brush: cpp;">
/*=============================================================================*
* includes                                                                     *
*=============================================================================*/

#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;time.h&gt;

/*=============================================================================*
* typedef                                                                      *
*=============================================================================*/

struct lista {
       int iNum;
       struct lista *pLista;
};

typedef lista Lista;

/*=============================================================================*
* declaracoes                                                                  *
*==============================================================================*
/*-----------------------------------------------------------------------------*
* declaracoes - prototipos de funcoes                                          *
*-----------------------------------------------------------------------------*/

Lista* insereLista(Lista *, int);
int getTamanhoLista(Lista *);
void ordenaVetor(int *, int, int);
void criaVetor(Lista *, int *);

/*-----------------------------------------------------------------------------*
* funcao &quot;main&quot;                                                                *
*-----------------------------------------------------------------------------*/

int main(int argc, char *argv[]) {
    Lista *pLista = NULL;
    int *pVet = NULL;

    for (int i = 0; i &lt; 10; i++) {
        int iNum = (int) rand() % 10;
        pLista = insereLista(pLista, iNum);
    }

    criaVetor(pLista, pVet);

    system(&quot;pause&quot;);
}

/*-----------------------------------------------------------------------------*
* corpo das funções - insereLista                                              *
*-----------------------------------------------------------------------------*/

Lista* insereLista(Lista *pLista, int iNum) {
       Lista *pAux = NULL;
       pAux = (Lista *) malloc(sizeof(Lista));
       pAux-&gt;iNum = iNum;
       pAux-&gt;pLista = pLista;
       return pAux;
}

/*-----------------------------------------------------------------------------*
* corpo das funções - getTamanhoLista                                          *
*-----------------------------------------------------------------------------*/

int getTamanhoLista(Lista *pLista) {
    int iTam = 0;
    Lista *pAux = pLista;
    while (pAux != NULL) {
          iTam++;
          pAux = pAux-&gt;pLista;
    }
    return iTam;
}

/*-----------------------------------------------------------------------------*
* corpo das funções - criaVetor                                                *
*-----------------------------------------------------------------------------*/

void criaVetor(Lista *pLista, int *pVet) {
     int iTamLista = 0;
     int i = 0;
     Lista *pAux = pLista;

     iTamLista = getTamanhoLista(pLista);
     pVet = (int *) malloc(sizeof(int) * iTamLista);

     while (pAux != NULL) {
           pVet[i] = pAux-&gt;iNum;
           pAux = pAux-&gt;pLista;
           i++;
     }

     ordenaVetor(pVet, 0, iTamLista - 1);

     printf(&quot;\n\n&quot;);
}

/*-----------------------------------------------------------------------------*
* corpo das funções - ordenaVetor                                              *
*-----------------------------------------------------------------------------*/

void ordenaVetor(int *pVet, int iPrim, int iUlt)
{
     int i, j, iMeio, iAux;
     i = iPrim;
     j = iUlt;
     iMeio = pVet[(i + j) / 2];
     do
     {
       while (pVet[i] &lt; iMeio) i++;
       while (pVet[j] &gt; iMeio) j--;
       if (i &lt;= j) {
          iAux = pVet[i];
          pVet[i] = pVet[j];
          pVet[j] = iAux;
          i++;
          j--;
       }
     } while (i &lt;= j);

     if (iPrim &lt; j)
        ordenaVetor(pVet, iPrim, j);
     if (iUlt &gt; i)
        ordenaVetor(pVet, i, iUlt);
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/truecode.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/truecode.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/truecode.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/truecode.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/truecode.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/truecode.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/truecode.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/truecode.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/truecode.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/truecode.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/truecode.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/truecode.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/truecode.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/truecode.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=92&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://truecode.wordpress.com/2009/12/04/ordenar-vetor-utilizando-quicksort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7dd77bf33b3ab37df96a155b38c5685d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ceb10n</media:title>
		</media:content>
	</item>
		<item>
		<title>Transformar uma lista em um vetor</title>
		<link>http://truecode.wordpress.com/2009/12/04/transformar-uma-lista-em-um-vetor/</link>
		<comments>http://truecode.wordpress.com/2009/12/04/transformar-uma-lista-em-um-vetor/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 15:49:28 +0000</pubDate>
		<dc:creator>ceb10n</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[lista]]></category>
		<category><![CDATA[Vetor]]></category>

		<guid isPermaLink="false">http://truecode.wordpress.com/?p=90</guid>
		<description><![CDATA[Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente. Transforme uma lista simplesmente encadeada em um vetor. Descubra antes o tamanho da lista para que o vetor possa ser convenientemente alocado. protótipo: void criaVetor(Lista *L, int *vetor) /*=============================================================================* * includes * *=============================================================================*/ #include &#60;stdlib.h&#62; #include &#60;stdio.h&#62; #include &#60;time.h&#62; /*=============================================================================* * typedef [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=90&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente.</p>
<p>Transforme uma lista simplesmente encadeada em um vetor. Descubra antes o tamanho da lista para que o vetor possa ser convenientemente alocado.<br />
protótipo: void criaVetor(Lista *L, int *vetor)</p>
<p><span id="more-90"></span></p>
<pre class="brush: cpp;">
/*=============================================================================*
* includes                                                                     *
*=============================================================================*/

#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;time.h&gt;

/*=============================================================================*
* typedef                                                                      *
*=============================================================================*/

struct lista {
       int iNum;
       struct lista *pLista;
};

typedef lista Lista;

/*=============================================================================*
* declaracoes                                                                  *
*==============================================================================*
/*-----------------------------------------------------------------------------*
* declaracoes - prototipos de funcoes                                          *
*-----------------------------------------------------------------------------*/

Lista* insereLista(Lista *pLista, int iNum);
int getTamanhoLista(Lista *pLista);
void criaVetor(Lista *pLista, int *pVet);

/*-----------------------------------------------------------------------------*
* funcao &quot;main&quot;                                                                *
*-----------------------------------------------------------------------------*/

int main(int argc, char *argv[]) {
    Lista *pLista = NULL;
    int *pVet = NULL;

    for (int i = 0; i &lt; 10; i++) {
        int iNum = (int) rand() % 10;
        pLista = insereLista(pLista, iNum);
    }

    criaVetor(pLista, pVet);

    system(&quot;pause&quot;);
}

/*-----------------------------------------------------------------------------*
* corpo das funções - insereLista                                              *
*-----------------------------------------------------------------------------*/

Lista* insereLista(Lista *pLista, int iNum) {
       Lista *pAux = NULL;
       pAux = (Lista *) malloc(sizeof(Lista));
       pAux-&gt;iNum = iNum;
       pAux-&gt;pLista = pLista;
       return pAux;
}

/*-----------------------------------------------------------------------------*
* corpo das funções - getTamanhoLista                                          *
*-----------------------------------------------------------------------------*/

int getTamanhoLista(Lista *pLista) {
    int iTam = 0;
    Lista *pAux = pLista;
    while (pAux != NULL) {
          iTam++;
          pAux = pAux-&gt;pLista;
    }
    return iTam;
}

/*-----------------------------------------------------------------------------*
* corpo das funções - criaVetor                                                *
*-----------------------------------------------------------------------------*/

void criaVetor(Lista *pLista, int *pVet) {
     int iTamLista = 0;
     int i = 0;
     Lista *pAux = pLista;

     iTamLista = getTamanhoLista(pLista);
     pVet = (int *) malloc(sizeof(int) * iTamLista);

     while (pAux != NULL) {
           pVet[i] = pAux-&gt;iNum;
           printf(&quot;\nPosicao vetor %d : %d &quot;, i, pVet[i]);
           pAux = pAux-&gt;pLista;
           i++;
     }
     printf(&quot;\n\n&quot;);
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/truecode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/truecode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/truecode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/truecode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/truecode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/truecode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/truecode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/truecode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/truecode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/truecode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/truecode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/truecode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/truecode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/truecode.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=90&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://truecode.wordpress.com/2009/12/04/transformar-uma-lista-em-um-vetor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7dd77bf33b3ab37df96a155b38c5685d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ceb10n</media:title>
		</media:content>
	</item>
		<item>
		<title>Função recursiva para procurar item de uma lista</title>
		<link>http://truecode.wordpress.com/2009/12/04/funcao-recursiva-para-procurar-item-de-uma-lista/</link>
		<comments>http://truecode.wordpress.com/2009/12/04/funcao-recursiva-para-procurar-item-de-uma-lista/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 15:46:40 +0000</pubDate>
		<dc:creator>ceb10n</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[lista]]></category>
		<category><![CDATA[recursividade]]></category>

		<guid isPermaLink="false">http://truecode.wordpress.com/?p=88</guid>
		<description><![CDATA[Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente. Procure recursivamente um determinado valor em uma lista simplesmente encadeada. A função recebe o valor (v) e o inicio da lista (*L) como parâmetros e devolve 1 se encontrou o valor, ou 0, caso contrário. /*=============================================================================* * includes * *=============================================================================*/ #include &#60;stdlib.h&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=88&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente.</p>
<p>Procure recursivamente um determinado valor em uma lista simplesmente encadeada. A função recebe o valor (v) e o inicio da lista (*L) como parâmetros e devolve 1 se encontrou o valor, ou 0, caso contrário.</p>
<p><span id="more-88"></span></p>
<pre class="brush: cpp;">
/*=============================================================================*
* includes                                                                     *
*=============================================================================*/

#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;time.h&gt;

/*=============================================================================*
* typedef                                                                      *
*=============================================================================*/

struct lista {
       int iNum;
       struct lista *pLista;
};

typedef lista Lista;

/*=============================================================================*
* declaracoes                                                                  *
*==============================================================================*
/*-----------------------------------------------------------------------------*
* declaracoes - prototipos de funcoes                                          *
*-----------------------------------------------------------------------------*/

Lista* insereLista(Lista *pLista, int iNum);
int procuraItem(Lista *pLista, int iNum);

/*-----------------------------------------------------------------------------*
* funcao &quot;main&quot;                                                                *
*-----------------------------------------------------------------------------*/

int main(int argc, char *argv[]) {
    int iQtdLista = 0, iProcura = 0;
    Lista *pLista = NULL;
    pLista = (Lista *) malloc(sizeof(Lista));

    do {
       printf(&quot;\nDigite com quantos numeros deseja preencher a lista: &quot;);
       scanf(&quot;%d&quot;, &amp;iQtdLista);
       } while (iQtdLista &lt;= 0);

    srand(time(NULL));

    for (int i = 0; i &lt; iQtdLista; i++) {
        int iNum = (int) rand() % 10000;
        printf(&quot;\n%d&quot;, iNum);
        pLista = insereLista(pLista, iNum);
    }

    printf(&quot;\n\nQual numero deseja procurar? &quot;);
    scanf(&quot;%d&quot;, &amp;iProcura);
    int ret = 100;
    ret = procuraItem(pLista, iProcura);

    if (ret == 1)
       printf(&quot;\nNumero encontrado&quot;);
    else
        printf(&quot;\nNumero nao encontrado&quot;);

    printf(&quot;\n&quot;);

    system(&quot;pause&quot;);
}

/*-----------------------------------------------------------------------------*
* corpo das funções - insereLista                                              *
*-----------------------------------------------------------------------------*/

Lista* insereLista(Lista *pLista, int iNum) {
       Lista *pAux = NULL;
       pAux = (Lista *) malloc(sizeof(Lista));
       pAux-&gt;iNum = iNum;
       pAux-&gt;pLista = pLista;
       return pAux;
}

/*-----------------------------------------------------------------------------*
* corpo das funções - procuraItem                                              *
*-----------------------------------------------------------------------------*/

int procuraItem(Lista *pLista, int iNum) {
    if (pLista) {
       if (pLista-&gt;iNum == iNum) {
          return 1;
       } else {
              return procuraItem(pLista-&gt;pLista, iNum);
              }
    }
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/truecode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/truecode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/truecode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/truecode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/truecode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/truecode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/truecode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/truecode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/truecode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/truecode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/truecode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/truecode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/truecode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/truecode.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=88&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://truecode.wordpress.com/2009/12/04/funcao-recursiva-para-procurar-item-de-uma-lista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7dd77bf33b3ab37df96a155b38c5685d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ceb10n</media:title>
		</media:content>
	</item>
		<item>
		<title>Armazenar txt em uma lista encadeada</title>
		<link>http://truecode.wordpress.com/2009/11/27/armazenar-txt-em-uma-lista-encadeada/</link>
		<comments>http://truecode.wordpress.com/2009/11/27/armazenar-txt-em-uma-lista-encadeada/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 11:57:48 +0000</pubDate>
		<dc:creator>ceb10n</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Lista encadeada]]></category>
		<category><![CDATA[txt]]></category>

		<guid isPermaLink="false">http://truecode.wordpress.com/?p=86</guid>
		<description><![CDATA[Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente. Leia um arquivo tipo texto e o transforme em uma lista simplesmente encadeada. A função deverá receber um ponteiro para o arquivo já aberto e um ponteiro para uma lista inicializada com NULL. /*=============================================================================* * includes * *=============================================================================*/ #include &#60;stdlib.h&#62; #include &#60;stdio.h&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=86&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente.</p>
<p>Leia um arquivo tipo texto e o transforme em uma lista simplesmente encadeada. A função deverá receber um ponteiro para o arquivo já aberto e um ponteiro para uma lista inicializada com NULL.</p>
<p><span id="more-86"></span></p>
<pre class="brush: cpp;">
/*=============================================================================*
* includes                                                                     *
*=============================================================================*/

#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;

/*=============================================================================*
* define                                                                       *
*=============================================================================*/

#define PATH_LEN 25
#define BUFF_LEN 255

/*=============================================================================*
* typedef                                                                      *
*=============================================================================*/

struct lista {
       int iNum;
       struct lista *pLista;
};

typedef lista Lista;

/*=============================================================================*
* declaracoes                                                                  *
*==============================================================================*
/*-----------------------------------------------------------------------------*
* declaracoes - prototipos de funcoes                                          *
*-----------------------------------------------------------------------------*/

FILE* abreArquivo(char *);
Lista* insereLista(Lista *, int);
void exibeLista(Lista *);

/*-----------------------------------------------------------------------------*
* funcao &quot;main&quot;                                                                *
*-----------------------------------------------------------------------------*/

int main(int argc, char *argv[]) {

    FILE *pArq = NULL;
    Lista *pLista = NULL;
    char *pPath = NULL;
    char *buff = NULL;

    buff = (char *) malloc(BUFF_LEN * sizeof(char));
    pPath = (char *) malloc(PATH_LEN * sizeof(char));

    printf(&quot;Digite o caminho do arquivo: &quot;);
    scanf(&quot;%s&quot;, pPath);

    pArq = abreArquivo(pPath);
    if (pArq) {
       do {
          fgets(buff, BUFF_LEN, pArq);
          pLista = insereLista(pLista, atoi(buff));
          }
       while (!feof(pArq));
       printf(&quot;\n*** Lista ***\n\n&quot;);
       exibeLista(pLista);
    }
    else {
    printf(&quot;\nError&quot;);
    }
    system(&quot;pause&quot;);
    return 0;
}

/*-----------------------------------------------------------------------------*
* corpo das funções - abreArquivo                                              *
*-----------------------------------------------------------------------------*/

FILE* abreArquivo(char *pPath) {
      FILE* pArq = NULL;
      pArq = fopen(pPath, &quot;r&quot;);
      if (pArq)
         return pArq;
      else
          return NULL;
}

/*-----------------------------------------------------------------------------*
* corpo das funções - insereLista                                              *
*-----------------------------------------------------------------------------*/

Lista* insereLista(Lista *pLista, int iNum) {
       Lista *pAux = NULL;
       pAux = (Lista *) malloc(sizeof(Lista));
       pAux-&gt;iNum = iNum;
       pAux-&gt;pLista = pLista;
       return pAux;
}

/*-----------------------------------------------------------------------------*
* corpo das funções - exibeLista                                            *
*-----------------------------------------------------------------------------*/

void exibeLista(Lista *pLista) {
     Lista *pAux = NULL;
     pAux = pLista;
     while (pAux != NULL) {
           printf(&quot;\n %d&quot;, pAux-&gt;iNum);
           pAux = pAux-&gt;pLista;
     }
     return;
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/truecode.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/truecode.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/truecode.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/truecode.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/truecode.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/truecode.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/truecode.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/truecode.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/truecode.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/truecode.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/truecode.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/truecode.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/truecode.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/truecode.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=86&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://truecode.wordpress.com/2009/11/27/armazenar-txt-em-uma-lista-encadeada/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7dd77bf33b3ab37df96a155b38c5685d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ceb10n</media:title>
		</media:content>
	</item>
		<item>
		<title>Salvar um vetor em txt</title>
		<link>http://truecode.wordpress.com/2009/11/27/salvar-um-vetor-em-txt/</link>
		<comments>http://truecode.wordpress.com/2009/11/27/salvar-um-vetor-em-txt/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 11:55:04 +0000</pubDate>
		<dc:creator>ceb10n</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[txt]]></category>

		<guid isPermaLink="false">http://truecode.wordpress.com/?p=84</guid>
		<description><![CDATA[Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente. Grave o conteúdo do vetor gerado no item 1, num arquivo tipo texto, sendo um número por linha. O nome do arquivo será solicitado pela função. /*=============================================================================* * includes * *=============================================================================*/ #include &#60;stdio.h&#62; #include &#60;stdlib.h&#62; #include &#60;time.h&#62; /*=============================================================================* * declaracoes * *==============================================================================* [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=84&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente.</p>
<p>Grave o conteúdo do vetor gerado no item 1, num arquivo tipo texto, sendo um número por linha. O nome do arquivo será solicitado pela função.</p>
<p><span id="more-84"></span></p>
<pre class="brush: cpp;">
/*=============================================================================*
* includes                                                                     *
*=============================================================================*/

#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;time.h&gt;

/*=============================================================================*
* declaracoes                                                                  *
*==============================================================================*
/*-----------------------------------------------------------------------------*
* declaracoes - prototipos de funcoes                                          *
*-----------------------------------------------------------------------------*/

void preencheVetor(int iNum, int *iVetor);

/*-----------------------------------------------------------------------------*
* funcao &quot;main&quot;                                                                *
*-----------------------------------------------------------------------------*/

int main(int argc, char *argv[]) {
    int iNum;
    printf(&quot;Digite um numero: \n&quot;);
    scanf(&quot;%d&quot;, &amp;iNum);
    int *iVet = (int *)malloc(sizeof(int) * iNum);
    preencheVetor(iNum, iVet);
    printf(&quot;\n&quot;);
    for (int i = 0; i &lt; iNum; i++)
        printf(&quot;\n %d &quot;, iVet[i]);
    system(&quot;pause&quot;);

    return 0;
}

/*-----------------------------------------------------------------------------*
* corpo das funções - preencheVetor                                            *
*-----------------------------------------------------------------------------*/

void preencheVetor(int iNum, int *iVetor) {
     FILE *pArq;
     char *cPath = (char *) malloc(50 * sizeof(char));
     printf(&quot;Digite o caminho do arquivo: &quot;);
     scanf(&quot;%s&quot;, cPath);
     pArq = fopen(cPath,&quot;w+&quot;);
     if (pArq) {
        int iAux, iFlag = 0;
        srand(time(NULL));
        for (int i = 0; i &lt; iNum; i++) {
            iAux = (int) rand() % 100;
            for (int j = 0; j &lt; i; j++) {
                if (iAux == iVetor[j])
                   iFlag = 1;
            }
            if (iFlag != 1){
               iVetor[i] = iAux;
               fprintf(pArq,&quot;%d\n&quot;, iVetor[i]);
            }
            else
                i--;
            iFlag = 0;
        }
     }
     fclose(pArq);
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/truecode.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/truecode.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/truecode.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/truecode.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/truecode.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/truecode.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/truecode.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/truecode.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/truecode.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/truecode.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/truecode.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/truecode.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/truecode.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/truecode.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=84&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://truecode.wordpress.com/2009/11/27/salvar-um-vetor-em-txt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7dd77bf33b3ab37df96a155b38c5685d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ceb10n</media:title>
		</media:content>
	</item>
		<item>
		<title>Preencher um vetor com números aleatórios</title>
		<link>http://truecode.wordpress.com/2009/11/27/preencher-um-vetor-com-numeros-aleatorios/</link>
		<comments>http://truecode.wordpress.com/2009/11/27/preencher-um-vetor-com-numeros-aleatorios/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 11:47:36 +0000</pubDate>
		<dc:creator>ceb10n</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[rand]]></category>
		<category><![CDATA[srand()]]></category>

		<guid isPermaLink="false">http://truecode.wordpress.com/?p=82</guid>
		<description><![CDATA[Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente. Preencha um vetor de tamanho n com números inteiros aleatórios sem repetição. protótipo: void preencheVetor(int n, int *v) * /*=============================================================================* * includes * *=============================================================================*/ #include &#60;stdlib.h&#62; #include &#60;stdio.h&#62; #include &#60;time.h&#62; /*=============================================================================* * declaracoes * *==============================================================================* /*-----------------------------------------------------------------------------* * declaracoes - prototipos de funcoes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=82&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Irei postando ao longo do tempo, alguns exercícios da faculdade que fiz recentemente.</p>
<p>Preencha um vetor de tamanho n com números inteiros aleatórios sem repetição.<br />
protótipo: void preencheVetor(int n, int *v) *</p>
<p><span id="more-82"></span></p>
<pre class="brush: cpp;">
/*=============================================================================*
* includes                                                                     *
*=============================================================================*/

#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;time.h&gt;

/*=============================================================================*
* declaracoes                                                                  *
*==============================================================================*
/*-----------------------------------------------------------------------------*
* declaracoes - prototipos de funcoes                                          *
*-----------------------------------------------------------------------------*/

void preencheVetor(int iNum, int *iVetor);

/*-----------------------------------------------------------------------------*
* funcao &quot;main&quot;                                                                *
*-----------------------------------------------------------------------------*/

int main(int argc, char *argv[]) {

    int iNum;
    printf(&quot;Digite um numero: \n&quot;);
    scanf(&quot;%d&quot;, &amp;iNum);
    int *iVet = (int *)malloc(sizeof(int) * iNum);
    preencheVetor(iNum, iVet);
    printf(&quot;\n&quot;);
    for (int i = 0; i &lt; iNum; i++)
        printf(&quot;\n %d &quot;, iVet[i]);
    system(&quot;pause&quot;);

    return 0;

}
/*-----------------------------------------------------------------------------*
* corpo das funções - preencheVetor                                            *
*-----------------------------------------------------------------------------*/

void preencheVetor(int iNum, int *iVetor) {
     int iAux, iFlag = 0;
     srand(time(NULL));
     for (int i = 0; i &lt; iNum; i++) {
          iAux = (int) rand() % 100;
          for (int j = 0; j &lt; i; j++) {
              if (iAux == iVetor[j])
                 iFlag = 1;
          }
     if (iFlag != 1)
        iVetor[i] = iAux;
     else
         i--;
     iFlag = 0;
     }
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/truecode.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/truecode.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/truecode.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/truecode.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/truecode.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/truecode.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/truecode.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/truecode.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/truecode.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/truecode.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/truecode.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/truecode.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/truecode.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/truecode.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=82&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://truecode.wordpress.com/2009/11/27/preencher-um-vetor-com-numeros-aleatorios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7dd77bf33b3ab37df96a155b38c5685d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ceb10n</media:title>
		</media:content>
	</item>
		<item>
		<title>Usando Vim no Windows</title>
		<link>http://truecode.wordpress.com/2009/10/03/usando-vim-no-windows/</link>
		<comments>http://truecode.wordpress.com/2009/10/03/usando-vim-no-windows/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 15:18:23 +0000</pubDate>
		<dc:creator>ceb10n</dc:creator>
				<category><![CDATA[Dicas e Curiosidades]]></category>
		<category><![CDATA[gVim]]></category>

		<guid isPermaLink="false">http://truecode.wordpress.com/?p=79</guid>
		<description><![CDATA[Como continuo sem tempo em colocar algumas coisas aqui (principalmente de estar estudando bastante para o projeto da faculdade &#8211; JPacman), eu estou apenas postando curiosidades, dicas, etc. Resolvi fazer este post, pois é uma dica muito boa, principalmente para quem não é apegado a grandes IDE&#8217;s e seus pesados e &#8220;poderosos&#8221; recursos. Estou falando [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=79&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Como continuo sem tempo em colocar algumas coisas aqui (principalmente de estar estudando bastante para o projeto da faculdade &#8211; JPacman), eu estou apenas postando curiosidades, dicas, etc. Resolvi fazer este post, pois é uma dica muito boa, principalmente para quem não é apegado a grandes IDE&#8217;s e seus pesados e &#8220;poderosos&#8221; recursos. Estou falando do Vim, o melhor editor de texto já feito. É muito comum utilizar o vi ou o vim quando se está em ambiente unix-based, porém o que muita gente não sabe, é que é possível utilizar o vim no Windows. Não há muito o que explicar, basta entrar nesse <a href="http://www.vim.org/download.php">link</a> e realizar o download para win32.</p>
<p><img src="http://charupload.files.wordpress.com/2008/04/gvim.png" alt="vim" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/truecode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/truecode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/truecode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/truecode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/truecode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/truecode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/truecode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/truecode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/truecode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/truecode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/truecode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/truecode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/truecode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/truecode.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=79&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://truecode.wordpress.com/2009/10/03/usando-vim-no-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7dd77bf33b3ab37df96a155b38c5685d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ceb10n</media:title>
		</media:content>

		<media:content url="http://charupload.files.wordpress.com/2008/04/gvim.png" medium="image">
			<media:title type="html">vim</media:title>
		</media:content>
	</item>
		<item>
		<title>Percorrendo uma ArrayList</title>
		<link>http://truecode.wordpress.com/2009/09/27/percorrendo-uma-arraylist/</link>
		<comments>http://truecode.wordpress.com/2009/09/27/percorrendo-uma-arraylist/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 01:42:14 +0000</pubDate>
		<dc:creator>ceb10n</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://truecode.wordpress.com/?p=76</guid>
		<description><![CDATA[Como ando meio sem tempo de atualizar o blog, resolvi postar algo simples e rápido, porém de grande ajuda para alguém que está ainda começando em Java. Abaixo mostrarei como percorrer uma ArrayList. List&#60;String&#62; lista = new ArrayList&#60;String&#62;(); lista.add(&#34;oi&#34;); lista.add(&#34;ola&#34;); lista.add(&#34;hey!&#34;); for (String str : lista) System.out.println(str);<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=76&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Como ando meio sem tempo de atualizar o blog, resolvi postar algo simples e rápido, porém de grande ajuda para alguém que está ainda começando em Java. Abaixo mostrarei como percorrer uma ArrayList.</p>
<p><span id="more-76"></span></p>
<pre class="brush: java;">
List&lt;String&gt; lista = new ArrayList&lt;String&gt;();

lista.add(&quot;oi&quot;);
lista.add(&quot;ola&quot;);
lista.add(&quot;hey!&quot;);

for (String str : lista)
     System.out.println(str);
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/truecode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/truecode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/truecode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/truecode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/truecode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/truecode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/truecode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/truecode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/truecode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/truecode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/truecode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/truecode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/truecode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/truecode.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=76&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://truecode.wordpress.com/2009/09/27/percorrendo-uma-arraylist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7dd77bf33b3ab37df96a155b38c5685d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ceb10n</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu de maneira fácil</title>
		<link>http://truecode.wordpress.com/2009/09/06/ubuntu-de-maneira-facil/</link>
		<comments>http://truecode.wordpress.com/2009/09/06/ubuntu-de-maneira-facil/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 23:56:15 +0000</pubDate>
		<dc:creator>ceb10n</dc:creator>
				<category><![CDATA[Dicas e Curiosidades]]></category>
		<category><![CDATA[instalar]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://truecode.wordpress.com/?p=73</guid>
		<description><![CDATA[Para quem nunca teve nenhum contato com Linux, mas lá no fundo tem uma curiosidade de descobrir como é este sistema operacional, uma boa pedida é instalar distribuições user-friendly. Hoje em dia, muitas delas são muito mais simples de serem instaladas do que o próprio Windows. Um exemplo muito interessante é o Ubuntu, uma das [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=73&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Para quem nunca teve nenhum contato com Linux, mas lá no fundo tem uma curiosidade de descobrir como é este sistema operacional, uma boa pedida é instalar distribuições user-friendly. Hoje em dia, muitas delas são muito mais simples de serem instaladas do que o próprio Windows. Um exemplo muito interessante é o Ubuntu, uma das distribuições mais populares hoje em dia. Neste post, descreverei como instalar o Ubuntu 9.04 junto com o Windows. O que é uma tarefa tão simples quanto instalar qualquer outro programa no Windows.<br />
<span id="more-73"></span></p>
<p><strong>Primeiro passo: Obtendo o Ubuntu</strong></p>
<p>Existe duas maneiras de conseguir a distribuição do Ubuntu. A primeira dela é fazendo o download em algum mirror. Para realizar o download, você pode visitar este <a href="http://www.ubuntu-br.org/download">link</a> do site ubuntu-br. A segunda opção é solicitar um CD, totalmente de graça no <a href="http://www.ubuntu.com">site oficial</a>.</p>
<p><strong>Segundo passo: Instalando o Ubuntu</strong></p>
<p>Para instalar o Ubuntu junto com o seu Windows, basta seguir dois passos extremamente simples. Primeiramente emule o iso do Ubuntu, ou rode o CD. Clique na opção <em>Instalar no Windows</em>. Logo em seguida, abrirá uma janela perguntando em qual partição deseja instalar, e qual o espaço que deseja reservar. Clique em OK e <strong>PRONTO</strong>. Agora é só esperar a instalação terminar e pronto, seu computador já estará rodando tanto o Windows quando o Ubuntu! Quando você for inicializar o computador, abrirá uma opção perguntando qual dos sistemas operacionais desejará inicializar.</p>
<p>Caso deseje desinstalar o Ubuntu, basta fazer igual a qualquer outro programa. Vá em Painel de Controle, Adicionar ou Remover Programas e selecione o Ubuntu.</p>
<p>Simples e fácil. </p>
<p>Espero ter ajudado.</p>
<p>Links úteis:</p>
<p>Ubuntu: <a href="http://www.ubuntu.com">www.ubuntu.com</a><br />
Ubuntu-Br:  <a href="http://www.ubuntu-br.org/download">www.ubuntu-br.org</a><br />
Ubuntu Geek:  <a href="http://www.ubuntugeek.com.br">www.ubuntugeek.com.br</a><br />
Viva o Linux:  <a href="http://www.vivaolinux.com.br">www.vivaolinux.com.br</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/truecode.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/truecode.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/truecode.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/truecode.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/truecode.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/truecode.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/truecode.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/truecode.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/truecode.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/truecode.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/truecode.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/truecode.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/truecode.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/truecode.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=truecode.wordpress.com&amp;blog=8077039&amp;post=73&amp;subd=truecode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://truecode.wordpress.com/2009/09/06/ubuntu-de-maneira-facil/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7dd77bf33b3ab37df96a155b38c5685d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ceb10n</media:title>
		</media:content>
	</item>
	</channel>
</rss>
