<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stiod Blog</title>
	<atom:link href="http://blog.stiod.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stiod.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 09 Feb 2010 02:44:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hypertext Access: htaccess</title>
		<link>http://blog.stiod.com/2010/02/09/hypertext-access-htaccess/</link>
		<comments>http://blog.stiod.com/2010/02/09/hypertext-access-htaccess/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 02:40:57 +0000</pubDate>
		<dc:creator>Yoshio Iwamoto</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.stiod.com/?p=767</guid>
		<description><![CDATA[O "Hypertext Access" ou apenas "htaccess" é um arquivo (oculto) com diretrizes de configuração do servidor HTTP Apache que são aplicadas por diretório.
Basicamente o htaccess utiliza a mesma sintaxe do arquivo de configuração principal do Apache, porém obedece as regras estabelecida pela diretriz AllowOverride.
Para utiliza-lo crie um arquivo ".htaccess" no diretório onde você deseja que [...]]]></description>
			<content:encoded><![CDATA[<p>O "<a title="Hypertext Access" href="http://httpd.apache.org/docs/2.0/howto/htaccess.html">Hypertext Access</a>" ou apenas "<a title="htaccess" href="http://httpd.apache.org/docs/2.0/howto/htaccess.html">htaccess</a>" é um arquivo (oculto) com diretrizes de configuração do servidor HTTP Apache que são aplicadas por diretório.</p>
<p>Basicamente o htaccess utiliza a mesma sintaxe do arquivo de configuração principal do Apache, porém obedece as regras estabelecida pela diretriz <a title="AllowOverride Directive" href="http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride">AllowOverride</a>.</p>
<p>Para utiliza-lo crie um arquivo ".htaccess" no diretório onde você deseja que as regras sejam aplicadas e adicione dentro dele as diretrizes. As regras são aplicadas sem a necessidade de reiniciar o Apache.</p>
<h2>Quando utilizar?</h2>
<p>Por questões de <strong>performance</strong> e <strong>segurança</strong>: NUNCA!!!!!!!!!!!!11...</p>
<p>Obviamente se o htaccess existe é porque há um motivo. Utilize nas seguintes condições:</p>
<ul>
<li> Se sua hospedagem não permitir alterações nas configurações principais do Apache (permissão).</li>
<li> Se você precisar permitir que seus usuários possam alterar as configurações do Apache (ex: servidor compartilhado), mas com uma certa limitação (hospedagem é um bom exemplo novamente).</li>
</ul>
<p>De toda forma evite o uso do htaccess.</p>
<h2>Dicas</h2>
<p>As dicas abaixo funcionam não só no ".htaccess", mas também no arquivo de configuração principal do Apache (onde é mais recomendável).</p>
<p>Algumas dicas podem necessitar do módulo Mod-Rewrite habilidado.</p>
<h3>301 Redirect</h3>
<p>O "301 redirect" é a melhor forma de ser fazer um redirecionamento de uma página, além de Search Engine Friendly.</p>
<p>Exemplo 1: Redirecionando todo o website para um outro domínio</p>
<pre class="apache"><span style="color: #00007f;">Redirect</span> <span style="color: #ff0000;">301</span> / http://outrodominio.com.br/</pre>
<p><br/><br />
Exemplo 2: Redirecionando uma página específica</p>
<pre class="apache"><span style="color: #00007f;">Redirect</span> <span style="color: #ff0000;">301</span> /pagina_de.html http://dominio.com.br/pagina_para.html</pre>
<p><br/><br />
<h3>404 Redirect</h3>
<p>Redirecionando erros 404, o famoso "Page not found" (Página não Encontrada), para um outra página.</p>
<pre class="apache"><span style="color: #00007f;">ErrorDocument</span> <span style="color: #ff0000;">404</span> /pagina_404_customizada.html</pre>
<p><br/><br />
O mesmo vale para redirecionar outras página de erro como 403, 500 e 666. o.O</p>
<h3>DirectoryIndex</h3>
<p>A diretriz "DirectoryIndex" permite escolher uma lista de recursos/páginas/arquivos que serão retornados para a requisição de um index de diretório. Se o arquivo index não for especificado será feita a listagem do diretório (se for permitido).</p>
<p>Por padrão é procurado pelo "index.html" (ou index.php ou outras extensões mais caóticas).</p>
<p>Exemplo:</p>
<ul>
<li>De http://seudominio.com.br/  para http://seudominio.com.br/index.html</li>
<li>De http://seudominio.com.br/diretorio/ para http://seudominio.com.br/diretorio/index.html</li>
</ul>
<pre class="apache"><span style="color: #00007f;">DirectoryIndex</span> index.html index.txt index.exe</pre>
<p><br/></p>
<h3>Negando listagem de diretório</h3>
<p>Já que eu comentei, para não permitir a listagem de diretórios adicione o seguinte comando no htaccess.</p>
<pre class="apache"><span style="color: #00007f;">Options</span> -Indexes</pre>
<p><br/></p>
<h3>Mudando extensões dos arquivos</h3>
<p>Se você quiser migrar/trocar suas páginas *.html para *.php poderá utilizar o seguinte comando.</p>
<pre class="apache"><span style="color: #00007f;">RedirectMatch</span> <span style="color: #ff0000;">301</span> <span style="color: #66cc66;">&#40;</span>.*<span style="color: #66cc66;">&#41;</span>\.html$ http://www.seudominio.com.br$<span style="color: #ff0000;">1</span>.php</pre>
<p><br/><br />
Só fique esperto com o uso de iframes <img src='http://blog.stiod.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>Tradução do Google</h3>
<p>Traduz o site automaticamente através do Google Translate. Este até que é interessante (apesar de ainda não ter pensado em como poderá ser útil) e encontrei hoje no site da <a href="http://wiki.dreamhost.com/Htaccess_tricks#Google_Text_Translation">Dreamhost</a>.</p>
<p>Fiz alterações para que seja de Português para outros idiomas e aviso que ainda não testei.</p>
<pre class="apache"><span style="color: #00007f;">Options</span> +<span style="color: #0000ff;">FollowSymlinks</span>
<span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
<span style="color: #00007f;">RewriteBase</span> /
<span style="color: #00007f;">RewriteRule</span> ^<span style="color: #66cc66;">&#40;</span>.*<span style="color: #66cc66;">&#41;</span>-<span style="color: #66cc66;">&#40;</span>en|es|it|jp|fr<span style="color: #66cc66;">&#41;</span>$ http://www.google.com/translate_c?hl=$<span style="color: #ff0000;">2</span>&amp;amp;sl=pt&amp;amp;u=http://seudominio.com.br/$<span style="color: #ff0000;">1</span> <span style="color: #66cc66;">&#91;</span>R,NC<span style="color: #66cc66;">&#93;</span></pre>
<p><br/><br />
Funciona da seguinte forma, quando alguém acessar "http://seudominio.com.br/-en" ele será traduzido de Português(pt) para Inglês(en) pelo Google Translate.</p>
<h3>AccessFileName</h3>
<p>Permite alterar o nome do arquivo htaccess (que por padrão é ".htaccess") para qualquer outra coisa como ".config". Esta diretriz na verdade deve ser utilizada no arquivo de configuração principal do Apache.</p>
<pre class="apache"><span style="color: #00007f;">AccessFileName</span> .config</pre>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stiod.com/2010/02/09/hypertext-access-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make e Makefile</title>
		<link>http://blog.stiod.com/2009/11/25/make-e-makefile/</link>
		<comments>http://blog.stiod.com/2009/11/25/make-e-makefile/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 13:43:43 +0000</pubDate>
		<dc:creator>Yoshio Iwamoto</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[Makefile]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://blog.stiod.com/?p=719</guid>
		<description><![CDATA[Você que utiliza algum *nix da vida já deve ter passado pelo momento mágico de ter executado o comando make em algum código fonte, não?
O make (GNU make) é uma ferramenta que executa os comandos inclusos dentro de um arquivo. É normalmente utilizado na compilação e instalação de programas.
Uma das vantagens do make é que [...]]]></description>
			<content:encoded><![CDATA[<p>Você que utiliza algum *nix da vida já deve ter passado pelo momento mágico de ter executado o comando make em algum código fonte, não?</p>
<p>O <strong>make</strong> (<a href="http://www.gnu.org/software/make/">GNU make</a>) é uma ferramenta que executa os comandos inclusos dentro de um arquivo. É normalmente utilizado na <strong>compilação</strong> e <strong>instalação</strong> de programas.</p>
<p>Uma das vantagens do make é que ele identifica quais partes do programa devem ser recompiladas de acordo com as mudanças efetuadas desde a última compilação.</p>
<p>Dependendo do tamanho do programa pode-se economizar minutos ou horas entre as recompilações, pois não será necessário recompilar o programa inteiro.</p>
<p>Exemplo de uso:</p>
<pre class="bash">$ <span style="color: #c20cb9; font-weight: bold;">make</span> -f arquivo_com_os_comandos</pre>
<p></p>
<p>Se você chamar o comando make sem passar nenhum parâmetro ele tentará utilizar o arquivo com nome de <strong>Makefile</strong> do diretório atual.</p>
<p>É o que normalmente acontece quando você precisa compilar e instalar um programa pelo código fonte.</p>
<ul>
<li>Descompactar o código fonte (se for um "<strong>*.tar.gz</strong>").</li>
<li>Entrar na pasta descompactada. Haverá um arquivo <strong>Makefile</strong> dentro.</li>
<li>Executar o comando "<strong>make</strong>" para compilar.</li>
<li>Executar o comando "<strong>make install</strong>" como root para instalar.</li>
</ul>
<p></p>
<h3>Makefile</h3>
<p>Se você quiser utilizar o comando make só é necessário criar um arquivo <strong>Makefile</strong> e dentro dele colocar as instruções que o make deve executar.</p>
<p>Formato do Makefile:</p>
<pre>regra: dependências...
	comandos
	...</pre>
<p></p>
<p>Os <strong>comandos</strong> são comandos normais do <strong>shell</strong> (bash). Pode-se colocar vários comandos, porém devem estar <strong>identados com tabulações</strong>. Isto é importante, <strong>não utilize espaços</strong> pois não irá funcionar.</p>
<p>A <strong>regra</strong> é só um nome para identificar um bloco de comandos. Fazendo uma analogia com programação, a "regra" seria semelhante a uma função.</p>
<p>As <strong>dependências</strong> são os arquivos necessários para a execução dos comandos da regra, o make irá fazer a verificação deles. Também podem ser outras <strong>regras</strong> que serão chamadas antes da execução dos comandos. Se houver mais de uma dependência elas devem ser separadas com espaços.</p>
<p>Aqui vai um exemplo de um Makefile que compila um programa em C:</p>
<pre>program:
	gcc -o meuprograma meuprograma.c</pre>
<p></p>
<p>Um exemplo com dependências:</p>
<pre>program: cod1.c cod2.c lib1.a
	gcc -c cod1.c cod2.c
	gcc cod1.o cod2.o lib1.a -o program

lib1.a: lib1.c cod3.c
	gcc -c lib1.c cod3.c
	ar rcs lib1.a lib1.o cod3.o
	ranlib lib1.a</pre>
<p></p>
<p>Pode-se utilizar variáveis também. A declaração é simples, mas devem ser chamados com a notação "<strong>$(variável)</strong>". Repare também que elas podem ser concatenadas:</p>
<pre>CC=gcc
CFLAGS=-O2
CFLAGS=$(CFLAGS) -Wall

program:
	$(CC) $(CFLAGS) -o program program.c</pre>
<p></p>
<p>Olha que legal no Makefile a seguir, advinha o que acontece ao executar o comando `make clean' no terminal?</p>
<pre>program: program.c
        gcc -o program program.c

clean:
        rm *.o
        rm program</pre>
<p></p>
<p>O que aconteceria também se houvesse um arquivo no diretório atual que se chamasse "clean"? O `make clean' não iria executar a lista de comandos da regra. Para evitar este tipo de conflito utilize a regra "<strong>.PHONY</strong>":</p>
<pre>program: program.c
        gcc -o program program.c

.PHONY: clean
clean:
        rm *.o
        rm program</pre>
<p></p>
<p>Agora a regra "clean" será executada mesmo se houver um arquivo no diretório atual com mesmo nome.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stiod.com/2009/11/25/make-e-makefile/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ordenação de tabelas com jQuery</title>
		<link>http://blog.stiod.com/2009/11/12/ordenacao-de-tabelas-com-jquery/</link>
		<comments>http://blog.stiod.com/2009/11/12/ordenacao-de-tabelas-com-jquery/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 13:19:36 +0000</pubDate>
		<dc:creator>Gabriel Verta</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://blog.stiod.com/?p=698</guid>
		<description><![CDATA[Em mais um post de jQuery, venho apresentar-lhes o plugin tablesorter. Este plugin ordena as colunas de uma tabela a partir do clique no cabeçalho da mesma:

No código, basta adicionar o javascript e o css do tablesorter, além da biblioteca jquery:
&#160;
&#60;html&#62;
&#60;head&#62;
&#60;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; href=&#34;tablesorter.css&#34; /&#62;
    &#60;script type=&#34;text/javascript&#34; src=&#34;jquery.js&#34;&#62;&#60;/script&#62;
    &#60;script [...]]]></description>
			<content:encoded><![CDATA[<p>Em mais um post de jQuery, venho apresentar-lhes o <a href="http://tablesorter.com/docs/" target="_blank">plugin tablesorter</a>. Este plugin ordena as colunas de uma tabela a partir do clique no cabeçalho da mesma:</p>
<p><iframe src="http://pub.stiod.com/jquery/tablesorter.html" style="width:500px; height:180px; border:0 none;" frameborder="0"></iframe></p>
<p>No código, basta adicionar o <a href="http://pub.stiod.com/jquery/js/jquery.tablesorter.js" target="_blank">javascript</a> e o <a href="http://pub.stiod.com/jquery/css/tablesorter.css" target="_blank">css</a> do tablesorter, além da biblioteca jquery:</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;html<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;head<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;link</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;tablesorter.css&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;jquery.js&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/script<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;jquery.tablesorter.js&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/script<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
        $(function(){
             $('.tablesorter').tablesorter()
         })
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/script<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/head<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;body<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;table</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;tablesorter&quot;</span> <span style="color: #000066;">cellspacing</span>=<span style="color: #ff0000;">&quot;1&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;thead<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;th<span style="font-weight: bold; color: black;">&gt;</span></span></span>first name<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/th<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;th<span style="font-weight: bold; color: black;">&gt;</span></span></span>last name<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/th<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;th<span style="font-weight: bold; color: black;">&gt;</span></span></span>age<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/th<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;th<span style="font-weight: bold; color: black;">&gt;</span></span></span>total<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/th<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;th<span style="font-weight: bold; color: black;">&gt;</span></span></span>discount<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/th<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;th<span style="font-weight: bold; color: black;">&gt;</span></span></span>date<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/th<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/thead<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tbody<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>peter<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>parker<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>28<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>$9.99<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>20%<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>jul 6, 2006 8:14 am<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>john<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>hood<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>33<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>$19.99<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>25%<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>dec 10, 2002 5:14 am<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>clark<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>kent<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>18<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>$15.89<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>44%<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>jan 12, 2003 11:14 am<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>bruce<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>almighty<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>45<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>$153.19<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>44%<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>jan 18, 2001 9:12 am<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>bruce<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>evans<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>22<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>$13.19<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>11%<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;td<span style="font-weight: bold; color: black;">&gt;</span></span></span>jan 18, 2007 9:12 am<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/td<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tr<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tbody<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/table<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;body<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/html<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p><br/><br />
<a href="http://tablesorter.com/docs/" target="_blank">Na documentação oficial</a> ainda, são listadas algumas das configurações possíveis, dentre as quais podemos destacar:</p>
<ul>
<li><a href="http://tablesorter.com/docs/example-option-sort-force.html" target="_blank">Forçar ordenação inicial</a></li>
<li><a href="http://tablesorter.com/docs/example-trigger-sort.html" target="_blank">Ordenar tabela com link fora dela</a></li>
<li><a href="http://tablesorter.com/docs/example-ajax.html" target="_blank">Adicionar conteúdo dinâmicamente a tabela com AJAX</a></li>
<li><a href="http://tablesorter.com/docs/example-parsers.html" target="_blank">É possível criar um parser para ordenar conteúdo com seu próprio critério</a></li>
<li><a href="http://tablesorter.com/docs/example-pager.html" target="_blank">Integração com plugin de paginação</a></li>
</ul>
<p>É isso ai <img src='http://blog.stiod.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stiod.com/2009/11/12/ordenacao-de-tabelas-com-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Carrossel de imagens com jQuery</title>
		<link>http://blog.stiod.com/2009/11/05/carrossel-de-imagens-com-jquery/</link>
		<comments>http://blog.stiod.com/2009/11/05/carrossel-de-imagens-com-jquery/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 13:46:50 +0000</pubDate>
		<dc:creator>Gabriel Verta</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://blog.stiod.com/?p=679</guid>
		<description><![CDATA[Neste post venho mostrar-lhes outro bom plugin para jQuery, o jCarousel.
Com este plugin podemos fazer com que diversas imagens rodem em um espaço limitado tornando o layout mais amigável.
Vamos ao nosso primeiro exemplo de carrossel:



Para fazer um carrossel simples, como este, precisaremos dos arquivos de js e css da biblioteca jCarousel, além do css de [...]]]></description>
			<content:encoded><![CDATA[<p>Neste post venho mostrar-lhes outro bom plugin para jQuery, o <a href="http://sorgalla.com/projects/jcarousel/" target="_blank">jCarousel</a>.<br />
Com este plugin podemos fazer com que diversas imagens rodem em um espaço limitado tornando o layout mais amigável.</p>
<p>Vamos ao nosso primeiro exemplo de carrossel:</p>
<p style="text-align:center;">
<iframe src="http://pub.stiod.com/jquery/carrossel.html" style="width:430px; height:200px;"></iframe>
</p>
<p>Para fazer um carrossel simples, como este, precisaremos dos arquivos de js e css da biblioteca jCarousel, além do css de skin do jCarousel a ser utilizado, e do js do jQuery. Segue o código:</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;html<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;head<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;title<span style="font-weight: bold; color: black;">&gt;</span></span></span>Carrossel simples com jQuery<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/title<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;link</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;css/style.css&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;link</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;css/jcarousel.css&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;link</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;css/tango-skin.css&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;js/jquery.js&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/script<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;js/jcarousel.js&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/script<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
$(function(){
    $('#carrossel').jcarousel()
})
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/script<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/head<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;body<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;h1<span style="font-weight: bold; color: black;">&gt;</span></span></span>jCarousel - Carrosel Simples<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/h1<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ul</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;carrossel&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;jcarousel-skin-tango&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;img/imagem1.jpg&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;img/imagem2.jpg&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;img/imagem3.jpg&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;img/imagem4.jpg&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;img/imagem5.jpg&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;img/imagem6.jpg&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ul<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/body<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/html<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p><br/><br />
Este é o exemplo mais simples de utilização do jCarousel, existem várias outras variações deste através de opções passadas a ele. Dentre as funcionalidades podemos destacar:</p>
<ul>
<li><a href="http://sorgalla.com/projects/jcarousel/examples/static_vertical.html" target="_blank">Carrossel Vertical</a></li>
<li><a href="http://sorgalla.com/projects/jcarousel/examples/static_auto.html" target="_blank">Carrossel com scroll automático</a></li>
<li><a href="http://sorgalla.com/projects/jcarousel/examples/static_controls.html" target="_blank">Carrosel com controles estáticos </a></li>
<li><a href="http://sorgalla.com/projects/jcarousel/examples/dynamic_flickr_api.html" target="_blank">Carrossel com conteúdo dinâmico via AJAX utilizando a API do Flickr</a></li>
<li><a href="http://sorgalla.com/projects/jcarousel/examples/special_textscroller.html" target="_blank">Scroll de Textos</a></li>
<li><a href="http://sorgalla.com/projects/jcarousel/examples/special_thickbox.html" target="_blank">Carrossel e Thickbox (clique na imagem do carrossel)</a></li>
</ul>
<p> <img src='http://blog.stiod.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stiod.com/2009/11/05/carrossel-de-imagens-com-jquery/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Python logging em Django</title>
		<link>http://blog.stiod.com/2009/11/03/python-logging-em-django/</link>
		<comments>http://blog.stiod.com/2009/11/03/python-logging-em-django/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 12:30:05 +0000</pubDate>
		<dc:creator>Rafael Sierra</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://blog.stiod.com/?p=661</guid>
		<description><![CDATA[Que o módulo logging e o framework Django são excelentes ferramentas pra qualquer trabalho todos sabem, mas como fazer para integrar os dois?
Eu sempre achei um saco o fato do Django não ter um módulo builtin/contrib que permitisse que ao fazer um simples logging.error('PAN!') a mensagem, a data, o nível, the universe and everything, fossem [...]]]></description>
			<content:encoded><![CDATA[<p>Que o módulo <a href="http://docs.python.org/library/logging.html" targe="_blank">logging</a> e o framework <a href="http://djangoproject.com">Django</a> são excelentes ferramentas pra qualquer trabalho todos sabem, mas como fazer para integrar os dois?</p>
<p>Eu sempre achei um saco o fato do Django não ter um módulo builtin/contrib que permitisse que ao fazer um simples <strong>logging.error('PAN!')</strong> a mensagem, a data, o nível, the universe and everything, fossem gravados no banco de dados. Pra resolver esse simples problema, nada como uma simples solução.</p>
<p><center><img src="http://blog.stiod.com/wp-content/uploads/2009/10/hiccup.gif" alt="Solução" title="Solução" width="250" height="281" class="aligncenter size-full wp-image-663" /><br/><small>A Solução</small></center></p>
<p>Para começar crie um aplicativo em sua aplicação chamado "log", nunca crie a aplicação com nome de "logging", a não ser que você queira problemas com imports não funcionando:</p>
<pre class="bash">python manage.py startapp log</pre>
<p>Em seguida crie o seguinte model:</p>
<pre class="python"><span style="color: #808080; font-style: italic;"># -*- encoding: utf-8 -*-</span>
<span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">db</span> <span style="color: #ff7700;font-weight:bold;">import</span> models
<span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">contrib</span> <span style="color: #ff7700;font-weight:bold;">import</span> admin
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">logging</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Log<span style="color: black;">&#40;</span>models.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
    level = models.<span style="color: black;">IntegerField</span><span style="color: black;">&#40;</span>db_index=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
    <span style="color: #008000;">file</span> = models.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">512</span>, db_index=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
    lineno = models.<span style="color: black;">IntegerField</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    date = models.<span style="color: black;">DateTimeField</span><span style="color: black;">&#40;</span>db_index=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
    message = models.<span style="color: black;">TextField</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> _get_level_name<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">logging</span>.<span style="color: black;">getLevelName</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">level</span><span style="color: black;">&#41;</span>
    levelName = <span style="color: #008000;">property</span><span style="color: black;">&#40;</span>fget=_get_level_name<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> _get_message_summary<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">message</span><span style="color: black;">&#41;</span> &gt; <span style="color: #ff4500;">100</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #483d8b;">'%s...'</span>%<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">message</span><span style="color: black;">&#91;</span>:<span style="color: #ff4500;">100</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.<span style="color: black;">message</span>
    messageSummary = <span style="color: #008000;">property</span><span style="color: black;">&#40;</span>fget=_get_message_summary<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> _get_file_summary<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: #008000;">file</span><span style="color: black;">&#41;</span> &gt; <span style="color: #ff4500;">30</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #483d8b;">'...%s'</span>%<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: #008000;">file</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">-30</span>:<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.<span style="color: #008000;">file</span>
    fileSummary = <span style="color: #008000;">property</span><span style="color: black;">&#40;</span>fget=_get_file_summary<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> LogAdmin<span style="color: black;">&#40;</span>admin.<span style="color: black;">ModelAdmin</span><span style="color: black;">&#41;</span>:
   date_hierarchy = <span style="color: #483d8b;">'date'</span>
   list_display = <span style="color: black;">&#40;</span><span style="color: #483d8b;">'level'</span>, <span style="color: #483d8b;">'levelName'</span>, <span style="color: #483d8b;">'date'</span>,<span style="color: #483d8b;">'messageSummary'</span>, <span style="color: #483d8b;">'fileSummary'</span>, <span style="color: #483d8b;">'lineno'</span><span style="color: black;">&#41;</span>
   list_filter = <span style="color: black;">&#40;</span><span style="color: #483d8b;">'level'</span>,<span style="color: black;">&#41;</span>
   search_fields = <span style="color: black;">&#40;</span><span style="color: #483d8b;">'message'</span>, <span style="color: #483d8b;">'file'</span><span style="color: black;">&#41;</span>
&nbsp;
admin.<span style="color: #dc143c;">site</span>.<span style="color: black;">register</span><span style="color: black;">&#40;</span>Log, LogAdmin<span style="color: black;">&#41;</span>
&nbsp;</pre>
<p>Em seguida crie o arquivo "handler.py" dentro do aplicativo "log" com o seguinte conteúdo:</p>
<pre class="python">&nbsp;
<span style="color: #808080; font-style: italic;"># -*- encoding: utf-8 -*-</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">logging</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">datetime</span>
<span style="color: #ff7700;font-weight:bold;">from</span> SEUPROJETO.<span style="color: black;">log</span>.<span style="color: black;">models</span> <span style="color: #ff7700;font-weight:bold;">import</span> Log
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> DjangoHandler<span style="color: black;">&#40;</span><span style="color: #dc143c;">logging</span>.<span style="color: black;">Handler</span><span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">''</span><span style="color: #483d8b;">'Executa a manipulação do log e insere no banco de dados'</span><span style="color: #483d8b;">''</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> emit<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, record<span style="color: black;">&#41;</span>:
        log = Log<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        log.<span style="color: black;">level</span> = record.<span style="color: black;">levelno</span>
        log.<span style="color: #008000;">file</span> = record.<span style="color: black;">pathname</span>
        log.<span style="color: black;">lineno</span> = record.<span style="color: black;">lineno</span>
        log.<span style="color: black;">message</span> = record.<span style="color: black;">msg</span>
        <span style="color: #808080; font-style: italic;"># TODO: Utiizar o record.created</span>
        log.<span style="color: black;">date</span> = <span style="color: #dc143c;">datetime</span>.<span style="color: #dc143c;">datetime</span>.<span style="color: black;">now</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        log.<span style="color: black;">save</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;</pre>
<p>Com isso você já tem tudo que precisa pra logar direto pro banco de dados, só falta uma coisa: Configurar o projeto para o logging usar nosso handler.</p>
<p>Pra fazer isso, edite o arquivo __init__.py (e você achando que esse arquivo era inutil <img src='http://blog.stiod.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  e adicione o seguinte conteúdo ao arquivo:</p>
<pre class="python">&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">logging</span>
<span style="color: #ff7700;font-weight:bold;">from</span> SEUPROJETO.<span style="color: black;">log</span>.<span style="color: black;">handler</span> <span style="color: #ff7700;font-weight:bold;">import</span> DjangoHandler
django_handler = DjangoHandler<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #dc143c;">logging</span>.<span style="color: black;">root</span>.<span style="color: black;">addHandler</span><span style="color: black;">&#40;</span>django_handler<span style="color: black;">&#41;</span>
&nbsp;</pre>
<p>E pronto, é só correr pro abraço, todo e qualquer log que você executar vai ser armazenado no banco de dados.</p>
<p><center><img src="http://blog.stiod.com/wp-content/uploads/2009/10/8.jpg" alt="Yes! Tudo que faltava pra terminar meu projeto!" title="É nois!" width="380" height="315" class="size-full wp-image-671" /><br/><small>Yes! Tudo que faltava pra terminar meu projeto!</small></center></p>
<p>... e antes que você venha me reclamar que a p0rr@ do log não ta aparecendo em lugar nenhum, verifique se você está usando o <strong>logging.debug</strong> com a configuração padrão do módulo logging (que só exibe mensagens de nível mais alto).</p>
<p>Em tempo: Eu sei que é extremamente simples criar um módulo/pacote com tudo isso, mas não seria tão didatico simplesmente falar "baixe aqui, copie ali e import lá".</p>
<p>Se você tiver interesse, sugira a implantação deste módulo ao <strong>django.contrib</strong> <img src='http://blog.stiod.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stiod.com/2009/11/03/python-logging-em-django/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Agregador de redes sociais em PHP</title>
		<link>http://blog.stiod.com/2009/10/28/agregador-de-redes-sociais-em-php/</link>
		<comments>http://blog.stiod.com/2009/10/28/agregador-de-redes-sociais-em-php/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 17:10:11 +0000</pubDate>
		<dc:creator>Rafael Monteiro</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://blog.stiod.com/?p=586</guid>
		<description><![CDATA[Cenário
Atualmente temos uma diversidade de conteúdo espalhado sob diversas formas, seja através de fotos, comentários, tweets, blogs, links favoritos, etc. Como exemplo podemos citar as redes: Flickr, Last.fm e Twitter.
Não seria interessante agregá-los em uma página ?
Isso pode ser feito utilizando a classe SimplePie,  de código aberto,  fácil utilização, escrita em PHP e [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Cenário</strong></p>
<p>Atualmente temos uma diversidade de conteúdo espalhado sob diversas formas, seja através de fotos, comentários, <em>tweets</em>, blogs, links favoritos, etc. Como exemplo podemos citar as redes: <a href="http://www.flickr.com/">Flickr</a>, <a href="http://www.lastfm.com.br/">Last.fm</a> e <a href="http://twitter.com/">Twitter</a>.</p>
<p>Não seria interessante agregá-los em uma página ?</p>
<p>Isso pode ser feito utilizando a classe SimplePie,  de código aberto,  fácil utilização, escrita em PHP e que nos ajudará a trabalhar com o RSS necessário para a manipulação dos dados.</p>
<p>Ela pode ser encontrada em: <a href="http://simplepie.org/downloads/" target="_blank">http://simplepie.org/downloads/</a>.</p>
<p><strong><span id="more-586"></span></strong></p>
<p><strong><br />
Utilização</strong></p>
<p>Primeiramente precisamos coletar os feeds desejados.</p>
<p>Para isso, acesse seus perfis (ou de quem você deseja seguir) e guarde as URLs que geralmente estão nos ícones de RSS.</p>
<p>Precisamos realizar um simples teste de compatibilidade (já disponível no pacote) para verificarmos se o servidor que rodará a aplicação oferece suporte completo à classe. Esse teste encontra-se na pasta "<em>compatibility_test</em>".</p>
<p>Devemos criar uma pasta para o cache da aplicação. Basicamente ela armazenará certificados.</p>
<p><strong><br />
Exemplo</strong></p>
<p>Definindo path da classe e variáveis de configuração</p>
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">require_once</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'./simplepie/simplepie.inc'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">$cache</span> = <span style="color: #ff0000;">&quot;./rsscache&quot;</span>;
<span style="color: #0000ff;">$duration</span> = <span style="color: #cc66cc;">2000</span>;</pre>
<p><br/><br />
Definindo os feeds</p>
<pre class="php"><span style="color: #808080; font-style: italic;">// Para o blog e twitter utilizamos o perfil da Stiod, como exemplo</span>
<span style="color: #0000ff;">$blog</span> = <span style="color: #000000; font-weight: bold;">new</span> SimplePie<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://blog.stiod.com/rss.xml&quot;</span>, <span style="color: #0000ff;">$cache</span>, <span style="color: #0000ff;">$duration</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0000ff;">$twitter</span> = <span style="color: #000000; font-weight: bold;">new</span> SimplePie<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://twitter.com/statuses/user_timeline/17368651.rss&quot;</span>, <span style="color: #0000ff;">$cache</span>, <span style="color: #0000ff;">$duration</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">// Substitua PERFIL pelo desejado</span>
<span style="color: #0000ff;">$lastfm</span> = <span style="color: #000000; font-weight: bold;">new</span> SimplePie<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://ws.audioscrobbler.com/2.0/user/PERFIL/lovedtracks.rss&quot;</span>, <span style="color: #0000ff;">$cache</span>, <span style="color: #0000ff;">$duration</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p><br/><br />
Função para transformar os nomes em links diretos</p>
<pre class="php">&nbsp;
 <span style="color: #000000; font-weight: bold;">function</span> twitterify<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$ret</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
   <span style="color: #0000ff;">$ret</span> = <a href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;#(^|[<span style="color: #000099; font-weight: bold;">\n</span> ])([<span style="color: #000099; font-weight: bold;">\w</span>]+?://[<span style="color: #000099; font-weight: bold;">\w</span>]+[^ <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\t</span>&lt; ]*)#&quot;</span>, <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>1&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\\</span>2<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #000099; font-weight: bold;">\\</span>2&lt;/a&gt;&quot;</span>, <span style="color: #0000ff;">$ret</span><span style="color: #66cc66;">&#41;</span>;
   <span style="color: #0000ff;">$ret</span> = <a href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;#(^|[<span style="color: #000099; font-weight: bold;">\n</span> ])((www|ftp)<span style="color: #000099; font-weight: bold;">\.</span>[^ <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span>&lt; ]*)#&quot;</span>, <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>1&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://<span style="color: #000099; font-weight: bold;">\\</span>2<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #000099; font-weight: bold;">\\</span>2&lt;/a&gt;&quot;</span>, <span style="color: #0000ff;">$ret</span><span style="color: #66cc66;">&#41;</span>;
   <span style="color: #0000ff;">$ret</span> = <a href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/@(<span style="color: #000099; font-weight: bold;">\w</span>+)/&quot;</span>, <span style="color: #ff0000;">&quot;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://www.twitter.com/<span style="color: #000099; font-weight: bold;">\\</span>1<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;@<span style="color: #000099; font-weight: bold;">\\</span>1&lt;/a&gt;&quot;</span>, <span style="color: #0000ff;">$ret</span><span style="color: #66cc66;">&#41;</span>;
   <span style="color: #0000ff;">$ret</span> = <a href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/#(<span style="color: #000099; font-weight: bold;">\w</span>+)/&quot;</span>, <span style="color: #ff0000;">&quot;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://search.twitter.com/search?q=<span style="color: #000099; font-weight: bold;">\\</span>1<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;#<span style="color: #000099; font-weight: bold;">\\</span>1&lt;/a&gt;&quot;</span>, <span style="color: #0000ff;">$ret</span><span style="color: #66cc66;">&#41;</span>;
   <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$ret</span>;
 <span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p><br/><br />
Para carregarmos os itens, utilizamos uma estrutura de repetição como a seguinte</p>
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$twitter</span>-&gt;<span style="color: #006600;">get_items</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$item</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;li&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> twitterify<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/str_replace"><span style="color: #000066;">str_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;raena: &quot;</span>, <span style="color: #ff0000;">&quot;&quot;</span>, <span style="color: #0000ff;">$item</span>-&gt;<span style="color: #006600;">get_title</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;a href=<span style="color: #ff0000;">&quot;&lt;?php echo $item-&gt;get_link(); ?&gt;&quot;</span>&gt;&lt;?php <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$item</span>-&gt;<span style="color: #006600;">get_date</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; ?&gt;&lt;/a&gt;
&lt;/li&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
<p><br/><br />
Baixe o exemplo completo do <a href="http://blog.stiod.com/wp-content/uploads/2009/10/agregador.zip"> agregador</a></p>
<p>Esse foi um exemplo básico, entretanto, não ficamos restritos ao exposto, é possível fazermos aplicações com maiores funcionalidades.</p>
<p>Para isso, acesse o <a href="http://simplepie.org/wiki/">Wiki</a>, onde existem inclusive plugins para a extensão da classe.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stiod.com/2009/10/28/agregador-de-redes-sociais-em-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Slide de Imagens com jQuery</title>
		<link>http://blog.stiod.com/2009/10/26/slide-de-imagens-jquery/</link>
		<comments>http://blog.stiod.com/2009/10/26/slide-de-imagens-jquery/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 14:44:38 +0000</pubDate>
		<dc:creator>Ricardo Perez</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://blog.stiod.com/?p=420</guid>
		<description><![CDATA[Continuando a série de post sobre jQuery iniciado por Gabriel.
Hoje vou mostrar um pouco sobre Effects e alguns métodos interessantes do jQuery, Usando como exemplo um simples slide de Imagem.
Neste código vemos o effect FadeIn(efeito de aparecer) e fadeOut(efeito de desaparecer) e o método next

&#160;
function slidein&#40;&#41;&#123;
    active_img = $&#40;&#34;.active&#34;&#41;;
    [...]]]></description>
			<content:encoded><![CDATA[<p>Continuando a série de post sobre jQuery iniciado por Gabriel.</p>
<p>Hoje vou mostrar um pouco sobre <a href="http://docs.jquery.com/Effects" target="_blank">Effects</a> e alguns métodos interessantes do jQuery, Usando como exemplo um simples slide de Imagem.</p>
<p>Neste código vemos o effect <i>FadeIn</i>(efeito de aparecer) e <i>fadeOut</i>(efeito de desaparecer) e o método <i>next</i><br />
<span id="more-420"></span></p>
<pre class="javascript">&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> slidein<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
    active_img = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;.active&quot;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #009900; font-style: italic;">//O método next pega o próximo objeto,  dentro do div #slide-img</span>
    next_img =active_img.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #009900; font-style: italic;">// verifica se existe um próximo objeto no div #slide-img</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>next_img.<span style="color: #006600;">length</span>==<span style="color: #CC0000;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #009900; font-style: italic;">//se não tem um próximo objeto retorna pro primeiro</span>
            next_img = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;.first-active&quot;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    active_img.<span style="color: #006600;">fadeOut</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #66cc66;">&#41;</span>;
    active_img.<span style="color: #006600;">removeClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    next_img.<span style="color: #006600;">fadeIn</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #66cc66;">&#41;</span>;
    next_img.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
$<span style="color: #66cc66;">&#40;</span>document<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
setInterval<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;slidein()&quot;</span>, <span style="color: #3366CC;">&quot;3500&quot;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p><br/><br />
O HTML para o slide de imagem deve ser o seguinte:</p>
<pre>&nbsp;
&lt;div id=&quot;slide-img&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;active first-active&quot;&gt;&lt;img src=&quot;img1.jpg&quot;/&gt;&lt;/li&gt;
&lt;li&gt;&lt;img src=&quot;img2.jpg&quot; /&gt;&lt;/li&gt;
&lt;li&gt;&lt;img src=&quot;img3.jpg&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&nbsp;</pre>
<p><br/><br />
Antes coloque esse trecho de CSS:</p>
<pre class="css">&nbsp;
<span style="color: #cc00cc;">#slide-img</span> <span style="color: #66cc66;">&#123;</span>
    float<span style="color: #3333ff;">:left</span>;
    height<span style="color: #3333ff;">:xxx</span> <span style="color: #993333;">px</span>;<span style="color: #808080; font-style: italic;">/* a largura padrão das imgs dentro do slide*/</span>
    overflow<span style="color: #3333ff;">:hidden</span>;
    width<span style="color: #3333ff;">:yyy</span> <span style="color: #993333;">px</span>;<span style="color: #808080; font-style: italic;">/* o altura padrão das imgs dentro do slide*/</span>;
<span style="color: #66cc66;">&#125;</span>
* <span style="color: #66cc66;">&#123;</span>
    margin<span style="color: #3333ff;">:<span style="color: #933;">0</span></span>;
    padding<span style="color: #3333ff;">:<span style="color: #933;">0</span></span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p></br><br />
</br><br />
Veja o exemplo aqui:<br />
<iframe src="http://pub.stiod.com/slides.html"  style="height: 300px; width: 500px;" frameborder="0" border="0"></iframe></p>
<p><br/><br/><br />
<em>O ideal que o tamanho das imagens dentro do slide sejam as mesmas</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stiod.com/2009/10/26/slide-de-imagens-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bordas arredondadas com jQuery</title>
		<link>http://blog.stiod.com/2009/10/22/bordas-arredondadas-com-jquery/</link>
		<comments>http://blog.stiod.com/2009/10/22/bordas-arredondadas-com-jquery/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 16:25:21 +0000</pubDate>
		<dc:creator>Gabriel Verta</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://blog.stiod.com/?p=557</guid>
		<description><![CDATA[Pulando um pouco a seqüência de posts anteriores, gostaria de mostrar-lhes o plugin Jquery Corner que cria bordas arredondas com o JQuery.
E como funciona?

Para adicionar bordas arredondas basta você adicionar a biblioteca do jquery na sua página e o arquivo js do plugin:
&#160;
&#60;html&#62;
&#60;head&#62;
&#60;title&#62;JQuery Corner&#60;/title&#62;
// Jquery
&#60;script src=&#34;jquery.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;
// JQuery Corner
&#60;script src=&#34;jquery.corner.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;
&#60;script type=&#34;text/javascript&#34;&#62;
$(function(){    [...]]]></description>
			<content:encoded><![CDATA[<p>Pulando um pouco a seqüência de posts anteriores, gostaria de mostrar-lhes o plugin <a href="http://www.malsup.com/jquery/corner/">Jquery Corner</a> que cria bordas arredondas com o JQuery.</p>
<p><strong>E como funciona?</strong></p>
<p><span id="more-557"></span></p>
<p>Para adicionar bordas arredondas basta você adicionar a biblioteca do jquery na sua página e o <a href="http://www.malsup.com/jquery/corner/jquery.corner.js">arquivo js</a> do plugin:</p>
<pre>&nbsp;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;JQuery Corner&lt;/title&gt;
// Jquery
&lt;script src=&quot;jquery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
// JQuery Corner
&lt;script src=&quot;jquery.corner.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function(){     
    // Arredonda a borda do elemento com id borda-arredondada
    $('#borda-arredondada').corner() 
})
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;borda-arredondada&quot;&gt;
Lorem ipsum dolor sit amet
&lt;/div&gt;
&nbsp;
&lt;/body&gt;
&lt;/html&gt;
&nbsp;</pre>
<p><br/>Segue o exemplo:<br />
<iframe src="http://pub.stiod.com/jquery/jquery-corner.html" frameborder="0" border="0" style="height:220px;width:100%;"></iframe><br />
<br/></p>
<p>
Você ainda pode passar parâmetros para colocar bordas com certo tamanho de arredondamento, ou somente no topo, em baixo, ou outras "formas de arredondamento":</p>
<pre>&nbsp;
// Borda de 30px em todas as pontas
$(&quot;#borda-arredondada').corner('30px')
// Somente no topo
$(&quot;#borda-arredondada').corner('top')
// Somente em baixo
$(&quot;#borda-arredondada').corner('bottom')
// Somente no topo direito (tr = top + right)
$(&quot;#borda-arredondada').corner('tr')
// Bevel
$(&quot;#borda-arredondada').corner('bevel')
&nbsp;</pre>
<p><br/><br />
Outros exemplos podem ser vistos no site <a href="http://www.malsup.com/jquery/corner/">http://www.malsup.com/jquery/corner/</a>.<br />
<br/><br />
É isso ai <img src='http://blog.stiod.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stiod.com/2009/10/22/bordas-arredondadas-com-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Envio de email utilizando a classe PHPMailer</title>
		<link>http://blog.stiod.com/2009/10/19/envio-de-email-utilizando-a-classe-phpmailer/</link>
		<comments>http://blog.stiod.com/2009/10/19/envio-de-email-utilizando-a-classe-phpmailer/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 12:31:13 +0000</pubDate>
		<dc:creator>Rafael Monteiro</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[email]]></category>

		<guid isPermaLink="false">http://blog.stiod.com/?p=438</guid>
		<description><![CDATA[Cenário
De início você pode estar pensando: "mas porquê vou incluir essa biblioteca se o PHP já possui a função mail() nativamente ?".
Através da classe PHPMailer, temos uma solução de envio de email mais robusta e com maiores funcionalidades, dentre elas a possibilidade de incluir anexos à mensagem, incluir CCs e CCOs, definir tamanho padrão para [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Cenário</strong></p>
<p>De início você pode estar pensando: "mas porquê vou incluir essa biblioteca se o PHP já possui a função <em>mail() </em>nativamente ?".</p>
<p>Através da classe PHPMailer, temos uma solução de envio de email mais robusta e com maiores funcionalidades, dentre elas a possibilidade de incluir anexos à mensagem, incluir CCs e CCOs, definir tamanho padrão para quebra de palavras (<em>wordwrap</em>) e utilizar um servidor SMTP, sendmail ou QMail para o envio.</p>
<p>O fato de podermos especificar como será feito o envio é particularmente útil no caso de hospedarmos uma aplicação em um ambiente que não possua um servidor de email integrado (cenário incomum mas que pode vir a ocorrer). Nesse caso, é possível, ainda, definirmos um <em>host</em> padrão para envio e um outro redundante, no caso de o primeiro falhar.</p>
<p><strong>Onde encontrar</strong></p>
<p>O download da biblioteca pode ser feito em: <a href="http://sourceforge.net/projects/phpmailer/files/">http://sourceforge.net/projects/phpmailer/files/</a>.<br />
Nesse endereço existem versões para o PHP 4 e PHP 5.</p>
<p><span id="more-438"></span><br />
<strong>Exemplo de utilização (adaptado do leiame do projeto):</strong><br />
<br/><br />
Configurações de envio</p>
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #b1b100;">require</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;class.phpmailer.php&quot;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$mail</span> = <span style="color: #000000; font-weight: bold;">new</span> PHPMailer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #808080; font-style: italic;">// configuramos o mailer para utilizar SMTP</span>
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">IsSMTP</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #808080; font-style: italic;">// especificamos o servidor principal e o reserva</span>
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">Host</span> = <span style="color: #ff0000;">&quot;smtp1.example.com;smtp2.example.com&quot;</span>;
    <span style="color: #808080; font-style: italic;">// ativamos a autenticação no SMTP</span>
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">SMTPAuth</span> = <span style="color: #000000; font-weight: bold;">true</span>;
    <span style="color: #808080; font-style: italic;">// usuário(s) de SMTP</span>
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">Username</span> = <span style="color: #ff0000;">&quot;usuario_smtp1;usuario_smtp2&quot;</span>;
    <span style="color: #808080; font-style: italic;">// senha(s) de SMTP</span>
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">Password</span> = <span style="color: #ff0000;">&quot;senha_smtp1;senha_smtp2&quot;</span>;</pre>
<p><br/><br />
Cabeçalho e conteúdo da mensagem</p>
<pre class="php">    <span style="color: #808080; font-style: italic;">/* podemos utilizar qualquer idioma presente na pasta languages,
    facilitando uma eventual depuração de erros */</span>
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">SetLanguage</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;br&quot;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">From</span> = <span style="color: #ff0000;">&quot;from@example.com&quot;</span>;
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">FromName</span> = <span style="color: #ff0000;">&quot;Mailer&quot;</span>;
    <span style="color: #808080; font-style: italic;">// o nome é opcional</span>
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">AddAddress</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;josh@example.net&quot;</span>, <span style="color: #ff0000;">&quot;Josh Adams&quot;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #808080; font-style: italic;">// quebra de palavra em 50 caracteres</span>
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">WordWrap</span> = <span style="color: #cc66cc;">50</span>;
    <span style="color: #808080; font-style: italic;">// anexo - nome é opcional</span>
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">AddAttachment</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/tmp/image.jpg&quot;</span>, <span style="color: #ff0000;">&quot;new.jpg&quot;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #808080; font-style: italic;">// configuramos o formato de email como HTML</span>
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">IsHTML</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">Subject</span> = <span style="color: #ff0000;">&quot;Este é o assunto&quot;</span>;
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">Body</span>    = <span style="color: #ff0000;">&quot;Este é o corpo da mensagem HTML &lt;b&gt;em negrito!&lt;/b&gt;&quot;</span>;
    <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">AltBody</span> = <span style="color: #ff0000;">&quot;Este é o texto puro para clientes de email que não suportam HTML&quot;</span>;</pre>
<p><br/><br />
Envio do email</p>
<pre class="php">    <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>!<span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">Send</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
        <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;A mensagem não pôde ser enviada.&lt;br/&gt;&quot;</span>;
        <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;Erro: &quot;</span> . <span style="color: #0000ff;">$mail</span>-&gt;<span style="color: #006600;">ErrorInfo</span>;
        <a href="http://www.php.net/exit"><span style="color: #000066;">exit</span></a>;
    <span style="color: #66cc66;">&#125;</span>
    <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;Mensagem enviada !&quot;</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.stiod.com/2009/10/19/envio-de-email-utilizando-a-classe-phpmailer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>API do Twitter para Python</title>
		<link>http://blog.stiod.com/2009/10/14/api-do-twitter-para-python/</link>
		<comments>http://blog.stiod.com/2009/10/14/api-do-twitter-para-python/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 04:50:52 +0000</pubDate>
		<dc:creator>Yoshio Iwamoto</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://blog.stiod.com/?p=528</guid>
		<description><![CDATA[Hoje vou mostrar como fazer uso da API do Twitter para Python, a Python Twitter API. Sua utilização é bem simples e podemos criar vários aplicativos ou scripts para automatizar algumas tarefas no microblog, como o script que fiz no meu último post.
Instalação no Linux
Baixe o código fonte da última versão aqui.
Descompacte com o comando:
$ [...]]]></description>
			<content:encoded><![CDATA[<p>Hoje vou mostrar como fazer uso da API do Twitter para Python, a <a href="http://code.google.com/p/python-twitter/">Python Twitter API</a>. Sua utilização é bem simples e podemos criar vários aplicativos ou scripts para automatizar algumas tarefas no microblog, como o script que fiz no meu <a href="http://blog.stiod.com/2009/10/07/seja-seguido-no-twitter-sem-incomodar-as-pessoas/">último post</a>.<br/></p>
<p><strong>Instalação no Linux</strong><br />
Baixe o código fonte da última versão <a href="http://code.google.com/p/python-twitter/downloads/list">aqui</a>.</p>
<p>Descompacte com o comando:<br />
<code>$ tar -zxvf python-twitter-XXX.tar.gz</code></p>
<p>Após descompactar entre no diretório criado e execute o seguinte comando como usuário root:<br />
<code># python setup.py install</code><br />
<br/><br />
<strong>Utilização</strong><br />
Para utilizar a API importe o módulo <a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html">twitter</a>:</p>
<pre class="python"><span style="color: #ff7700;font-weight:bold;">import</span> twitter
...</pre>
<p>As principais classes que você deve conhecer são:<br />
<a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html#Api">twitter.Api</a><br />
<a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html#User">twitter.User</a><br />
<a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html#Status">twitter.Status</a><br />
<a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html#DirectMessage">twitter.DirectMessage</a></p>
<p>Para iniciar, crie uma instancia da classe <a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html#Api">twitter.Api</a>:</p>
<pre class="python"><span style="color: #ff7700;font-weight:bold;">import</span> twitter
api = twitter.<span style="color: black;">Api</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre>
<p>Com este objeto você pode utilizar os métodos da API que não necessitam de autenticação do usuário. Um Exemplo é o método <a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html#Api-GetPublicTimeline">GetPublicTimeline</a>, que sem parâmetros retorna as últimas 20 mensagens de status dos usuários.</p>
<pre class="python"><span style="color: #ff7700;font-weight:bold;">import</span> twitter
api = twitter.<span style="color: black;">Api</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
status_list = api.<span style="color: black;">GetPublicTimeline</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">for</span> status <span style="color: #ff7700;font-weight:bold;">in</span> status_list:
    <span style="color: #ff7700;font-weight:bold;">print</span> status.<span style="color: #dc143c;">user</span>.<span style="color: black;">name</span></pre>
<p>No exemplo anterior o status é um objeto da classe <a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html#Status">twitter.Status</a>. A classe twitter.Status possui um atributo user que é um objeto da classe <a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html#User">twitter.User</a>.</p>
<p>Para realizar a autenticação de um usuário, instancie a classe <a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html#Api">twitter.Api</a>, porém passando o usuário e a senha como parâmetros:</p>
<pre class="python"><span style="color: #ff7700;font-weight:bold;">import</span> twitter
api = twitter.<span style="color: black;">Api</span><span style="color: black;">&#40;</span>username=<span style="color: #483d8b;">'joao'</span>, password=<span style="color: #483d8b;">'abc123'</span><span style="color: black;">&#41;</span></pre>
<p>Para enviar uma mensagem utilize o método <a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html#Api-PostUpdate">PostUpdate</a>:</p>
<pre class="python"><span style="color: #808080; font-style: italic;"># -*- encoding: utf-8 -*-</span>
<span style="color: #ff7700;font-weight:bold;">import</span> twitter
api = twitter.<span style="color: black;">Api</span><span style="color: black;">&#40;</span>username=<span style="color: #483d8b;">'joao'</span>, password=<span style="color: #483d8b;">'abc123'</span><span style="color: black;">&#41;</span>
status = api.<span style="color: black;">PostUpdate</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">''</span><span style="color: #483d8b;">'Yohohoho! Enviei uma mensagem! Mas cuidado
com os limite de 140 caracteres.'</span><span style="color: #483d8b;">''</span><span style="color: black;">&#41;</span></pre>
<p>Repare que ele retorna o status da mensagem enviada.<br/></p>
<p><strong>Várias mensagens contínuas</strong><br />
Um método interessante da API é o <a href="http://static.unto.net/python-twitter/0.6/doc/twitter.html#Api-PostUpdates">PostUpdates</a>, que permite que seja enviada uma mensagem com mais de 140 caracteres. A mensagem na verdade é enviada como se fosse várias mensagens com no máximo 140 caracteres.</p>
<p>Você também pode indicar uma string de continuação no segundo parâmetro, esta string é colocada no final das mensagens para indicar a continuação.</p>
<pre class="python"><span style="color: #808080; font-style: italic;"># -*- encoding: utf-8 -*-</span>
<span style="color: #ff7700;font-weight:bold;">import</span> twitter
api = twitter.<span style="color: black;">Api</span><span style="color: black;">&#40;</span>username=<span style="color: #483d8b;">'joao'</span>, password=<span style="color: #483d8b;">'abc123'</span><span style="color: black;">&#41;</span>
status = api.<span style="color: black;">PostUpdates</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">''</span><span style="color: #483d8b;">'Yohohoho! Enviei uma mensagem bem grande!
Agora você não precisa se preocupar com o tamanho da mensagem pois
este método irá dividi-la para você em várias mensagens, você também
pode utilizar uma string de continuação ao lado.'</span><span style="color: #483d8b;">''</span>, <span style="color: #483d8b;">'…'</span><span style="color: black;">&#41;</span></pre>
<p><em><strong>Obs: Segundo a documentação da API, o Twitter remove as reticências ("...") das strings das mensagem, por isso utilize o caractere UNICODE \u2026 ("…"). Também não ultrapasse o limite dos 150 requests permitidos por hora pelo Twitter.</strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stiod.com/2009/10/14/api-do-twitter-para-python/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
