<?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>Programando na madrugada &#187; Tecnologia</title>
	<atom:link href="http://www.luizpicanco.com/category/tecnologia/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.luizpicanco.com</link>
	<description>Programação na melhor hora do dia</description>
	<lastBuildDate>Sun, 31 Jul 2011 03:44:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Script para dar commit/deploy automático no Heroku</title>
		<link>http://www.luizpicanco.com/2011/07/31/script-para-dar-commitdeploy-automatico-no-heroku/</link>
		<comments>http://www.luizpicanco.com/2011/07/31/script-para-dar-commitdeploy-automatico-no-heroku/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 03:44:51 +0000</pubDate>
		<dc:creator>Luiz Picanço</dc:creator>
				<category><![CDATA[Linha de Comando]]></category>
		<category><![CDATA[MAC OSX]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[heroku commits osx]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.luizpicanco.com/?p=839</guid>
		<description><![CDATA[Para realizar commit e deploy automático no Heroku, utilizo o seguinte script: git add . git commit -m "Automatic Commit" git push heroku master]]></description>
			<content:encoded><![CDATA[<p>Para realizar commit e deploy automático no Heroku, utilizo o seguinte script:<br />
<code><br />
git add .<br />
git commit -m "Automatic Commit"<br />
git push heroku master<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.luizpicanco.com/2011/07/31/script-para-dar-commitdeploy-automatico-no-heroku/feed/</wfw:commentRss>
		<slash:comments>2077</slash:comments>
		</item>
		<item>
		<title>Removendo a acentuação e os caracteres especiais de uma String</title>
		<link>http://www.luizpicanco.com/2010/05/28/removendo-a-acentuacao-e-os-caracteres-especiais-de-uma-string/</link>
		<comments>http://www.luizpicanco.com/2010/05/28/removendo-a-acentuacao-e-os-caracteres-especiais-de-uma-string/#comments</comments>
		<pubDate>Fri, 28 May 2010 13:56:37 +0000</pubDate>
		<dc:creator>Luiz Picanço</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[algoritmo]]></category>

		<guid isPermaLink="false">http://www.luizpicanco.com/?p=212</guid>
		<description><![CDATA[Estava precisando remover a acentuação e os caracteres especiais do nome de um arquivo. Para isso, desenvolvi um extension method para a classe String. Exemplo: String de entrada: Adobe Acrobat &#8211; Pacy-Paraná_05.12_áèïôúã+.pdf String de retorno: AdobeAcrobatPacyParana_05.12_aeioua.pdf Desenvolvi o método utilizando uma HashTable e expressão regular. Caso você tenha alguma sugestão de melhoria, poste aí nos [...]]]></description>
			<content:encoded><![CDATA[<p>Estava precisando remover a acentuação e os caracteres especiais do nome de um arquivo. Para isso, desenvolvi um extension method para a classe String.</p>
<p>Exemplo:<br />
String de entrada:<br />
<strong>Adobe Acrobat &#8211; Pacy-Paraná_05.12_áèïôúã+.pdf</strong></p>
<p>String de retorno:<br />
<strong>AdobeAcrobatPacyParana_05.12_aeioua.pdf</strong></p>
<p>Desenvolvi o método utilizando uma HashTable e expressão regular. Caso você tenha alguma sugestão de melhoria, poste aí nos comentários.</p>
<p>Extension method:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">String</span> RemoveSpecialCharacters<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span> <span style="color: #FF0000;">String</span> self<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	var normalizedString <span style="color: #008000;">=</span> self<span style="color: #008000;">;</span>
&nbsp;
	<span style="color: #008080; font-style: italic;">// Prepara a tabela de símbolos.</span>
	var symbolTable <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Dictionary<span style="color: #008000;">&lt;</span><span style="color: #FF0000;">char</span>, <span style="color: #FF0000;">char</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span><span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	symbolTable.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">'a'</span>, <span style="color: #008000;">new</span> <span style="color: #FF0000;">char</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#123;</span><span style="color: #666666;">'à'</span>, <span style="color: #666666;">'á'</span>, <span style="color: #666666;">'ä'</span>, <span style="color: #666666;">'â'</span>, <span style="color: #666666;">'ã'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	symbolTable.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">'c'</span>, <span style="color: #008000;">new</span> <span style="color: #FF0000;">char</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#123;</span> <span style="color: #666666;">'ç'</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	symbolTable.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">'e'</span>, <span style="color: #008000;">new</span> <span style="color: #FF0000;">char</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#123;</span> <span style="color: #666666;">'è'</span>, <span style="color: #666666;">'é'</span>, <span style="color: #666666;">'ë'</span>, <span style="color: #666666;">'ê'</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	symbolTable.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">'i'</span>, <span style="color: #008000;">new</span> <span style="color: #FF0000;">char</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#123;</span> <span style="color: #666666;">'ì'</span>, <span style="color: #666666;">'í'</span>, <span style="color: #666666;">'ï'</span>, <span style="color: #666666;">'î'</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	symbolTable.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">'o'</span>, <span style="color: #008000;">new</span> <span style="color: #FF0000;">char</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#123;</span> <span style="color: #666666;">'ò'</span>, <span style="color: #666666;">'ó'</span>, <span style="color: #666666;">'ö'</span>, <span style="color: #666666;">'ô'</span>, <span style="color: #666666;">'õ'</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	symbolTable.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">'u'</span>, <span style="color: #008000;">new</span> <span style="color: #FF0000;">char</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#123;</span> <span style="color: #666666;">'ù'</span>, <span style="color: #666666;">'ú'</span>, <span style="color: #666666;">'ü'</span>, <span style="color: #666666;">'û'</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
	<span style="color: #008080; font-style: italic;">// Substitui os símbolos.</span>
	<span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var key <span style="color: #0600FF;">in</span> symbolTable.<span style="color: #0000FF;">Keys</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var symbol <span style="color: #0600FF;">in</span> symbolTable<span style="color: #000000;">&#91;</span>key<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			normalizedString <span style="color: #008000;">=</span> normalizedString.<span style="color: #0000FF;">Replace</span><span style="color: #000000;">&#40;</span>symbol, key<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #008080; font-style: italic;">// Remove os outros caracteres especiais.</span>
	normalizedString <span style="color: #008000;">=</span> Regex.<span style="color: #0000FF;">Replace</span><span style="color: #000000;">&#40;</span>normalizedString, <span style="color: #666666;">&quot;[^0-9a-zA-Z._]+?&quot;</span>, <span style="color: #666666;">&quot;&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	<span style="color: #0600FF;">return</span> normalizedString<span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.luizpicanco.com/2010/05/28/removendo-a-acentuacao-e-os-caracteres-especiais-de-uma-string/feed/</wfw:commentRss>
		<slash:comments>2054</slash:comments>
		</item>
		<item>
		<title>Webcam Life Log</title>
		<link>http://www.luizpicanco.com/2010/05/23/webcam-life-log/</link>
		<comments>http://www.luizpicanco.com/2010/05/23/webcam-life-log/#comments</comments>
		<pubDate>Mon, 24 May 2010 00:10:35 +0000</pubDate>
		<dc:creator>Luiz Picanço</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[LifeHack]]></category>
		<category><![CDATA[lifecaching]]></category>
		<category><![CDATA[lifelog]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://www.luizpicanco.com/?p=139</guid>
		<description><![CDATA[O Webcam Life Log é um utilitário que tira fotos com a webcam, em um intervalo de tempo definido. Desenvolvi ele utilizando o Adobe AIR. Para instalar, basta clicar na imagem abaixo. Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 6.0.65 or [...]]]></description>
			<content:encoded><![CDATA[<p>O Webcam Life Log é um utilitário que tira fotos com a webcam, em um intervalo de tempo definido. Desenvolvi ele utilizando o Adobe AIR.</p>
<p>Para instalar, basta clicar na imagem abaixo.</p>
<div id="flashcontent" style="width: 215px; height: 180px;">
   <strong>Please upgrade your Flash Player</strong><br />
   This is the content that would be shown if the user does not have Flash Player 6.0.65 or higher installed.
</div>
<p><script type="text/javascript">
// <![CDATA[
 		// version 9.0.115 or greater is required for launching AIR apps. 		 			
var so = new SWFObject("http://webcamlifelog.googlecode.com/svn/wiki/AIRInstallBadge.swf", "", "215", "180", "9.0.115", "#000000"); 		     so.useExpressInstall("http://webcamlifelog.googlecode.com/svn/wiki/expressinstall.swf"); 		
so.addVariable("airversion", "1.5.3"); 		
so.addVariable("appname", "Webcam%20Life%20Log"); 		
so.addVariable("appurl", "http://webcamlifelog.googlecode.com/files/WebCamLifeLog.air"); 		
so.addVariable("appid", "com.luizpicanco.WebCamLifeLog"); 		
so.addVariable("appversion", "0.1"); 		
so.write("flashcontent");
// ]]&gt;
</script></p>
<p>Screenshot:<br />
<img class="aligncenter" title="Webcam Life Log screenshot" src="http://webcamlifelog.googlecode.com/svn/wiki/webcamlifelog.png" alt="" width="474" height="177" /></p>
<p>O código-fonte está disponível no google code:<br />
<a href="http://code.google.com/p/webcamlifelog/">http://code.google.com/p/webcamlifelog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.luizpicanco.com/2010/05/23/webcam-life-log/feed/</wfw:commentRss>
		<slash:comments>2096</slash:comments>
		</item>
		<item>
		<title>SessionScope e FlushAction no Castle ActiveRecord</title>
		<link>http://www.luizpicanco.com/2010/04/09/sessionscope-e-flushaction-no-castle-activerecord/</link>
		<comments>http://www.luizpicanco.com/2010/04/09/sessionscope-e-flushaction-no-castle-activerecord/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 03:21:51 +0000</pubDate>
		<dc:creator>Luiz Picanço</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[castle]]></category>
		<category><![CDATA[cshap]]></category>
		<category><![CDATA[dotnet]]></category>
		<category><![CDATA[flush]]></category>
		<category><![CDATA[flushaction]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[persistence]]></category>

		<guid isPermaLink="false">http://www.luizpicanco.com/?p=131</guid>
		<description><![CDATA[O Castle ActiveRecord é uma implementação do padrão homônimo feita em cima nHibernate. Um ORM bastante conhecido no mundo Java. Apesar de alguns comportamentos serem realizados pelo nHibernate, estarei aqui citando o ActiveRecord como responsável por tais comportamentos. Um problema muito comum que eu costumo me deparar, é com a utilização de lazy loading no [...]]]></description>
			<content:encoded><![CDATA[<p>O Castle ActiveRecord é uma implementação do padrão homônimo feita em cima nHibernate. Um ORM bastante conhecido no mundo Java. Apesar de alguns comportamentos serem realizados pelo nHibernate, estarei aqui citando o ActiveRecord como responsável por tais comportamentos.</p>
<p>Um problema muito comum que eu costumo me deparar, é com a utilização de lazy loading no ActiveRecord.</p>
<p>Geralmente na utilização de lazy loading em aplicações web, é utilizado o padrão Session per Request para o SessionScope. Só que por padrão, o ActiveRecord persiste automaticamente (em algumas situações) as entidades, mesmo que seus métodos Save ou Update não tenham sido invocados. Isso costuma gerar uma série de problemas, como por exemplo, entidades com o seu estado interno inválido sendo persistido.</p>
<p>Para resolver esse problema, deve ser especificado o FlushAction como Never:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">SessionScope session <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SessionScope<span style="color: #000000;">&#40;</span>FlushAction.<span style="color: #0000FF;">Never</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>Assim, o ActiveRecord não irá mais persistir automaticamente as entidades. Em contrapartida, mesmo invocando os métodos Save ou Update as entidades não serão persistidas. Para que isso ocorra, será necessário utilizar os métodos SaveAndFlush e UpdateAndFlush, respectivamente, ou utilizar o método Flush da instância do SessionScope.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luizpicanco.com/2010/04/09/sessionscope-e-flushaction-no-castle-activerecord/feed/</wfw:commentRss>
		<slash:comments>3044</slash:comments>
		</item>
		<item>
		<title>Erro ao utilizar o mysql no ruby: LIBMYSQL.dll is missing</title>
		<link>http://www.luizpicanco.com/2010/02/21/erro-ao-utilizar-o-mysql-no-ruby-libmysql-dll-is-missing/</link>
		<comments>http://www.luizpicanco.com/2010/02/21/erro-ao-utilizar-o-mysql-no-ruby-libmysql-dll-is-missing/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 04:39:26 +0000</pubDate>
		<dc:creator>Luiz Picanço</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[libmysql]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://www.luizpicanco.com/?p=120</guid>
		<description><![CDATA[Um erro muito comum que costuma acontecer no ruby/rails, em ambiente windows é: &#8220;LIBMYSQL.dll is missing from your computer&#8221; E a mensagem também pode aparecer no console da seguinte forma: ruby.exe - Unable to locate Component This application has failed to start because LIBMYSQL.DLL was not found. Re-installing the application might fix this problem. Esse [...]]]></description>
			<content:encoded><![CDATA[<p>Um erro muito comum que costuma acontecer no ruby/rails, em ambiente windows é: &#8220;LIBMYSQL.dll is missing from your computer&#8221;</p>
<p><img class="aligncenter size-full wp-image-121" title="erro" src="http://www.luizpicanco.com/wp-content/uploads/2010/02/erro.png" alt="LIMYSQL.dll is missing" width="476" height="171" /></p>
<p>E a mensagem também pode aparecer no console da seguinte forma:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">ruby.exe - Unable to locate Component
This application has failed to start because LIBMYSQL.DLL was not
found. Re-installing the application might
fix this problem.</pre></div></div>

<p>Esse erro ocorre porque a dll do mysql, LIBMYSQL.dll, não foi localizada. Para resolver esse problema, faça o seguinte:</p>
<p>1 &#8211; Instale a gem do mysql</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">gem install mysql</pre></td></tr></table></div>

<p>2 &#8211; Copie o arquivo LIBMYSQL.dll do diretório bin do mysql(ex.: c:\mysql\bin) para o diretório bin do ruby (ex.: c:\ruby\bin)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luizpicanco.com/2010/02/21/erro-ao-utilizar-o-mysql-no-ruby-libmysql-dll-is-missing/feed/</wfw:commentRss>
		<slash:comments>4988</slash:comments>
		</item>
		<item>
		<title>Obtendo as Properties pela ordem de declaração no C#</title>
		<link>http://www.luizpicanco.com/2009/08/18/obtendo-as-properties-pela-ordem-de-declaracao-no-c/</link>
		<comments>http://www.luizpicanco.com/2009/08/18/obtendo-as-properties-pela-ordem-de-declaracao-no-c/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 21:07:25 +0000</pubDate>
		<dc:creator>Luiz Picanço</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[reflection]]></category>

		<guid isPermaLink="false">http://www.luizpicanco.com/?p=106</guid>
		<description><![CDATA[Em alguns momentos, pode ser necessário obter a lista de properties de um objeto. Um jeito simples de fazer isso é: 1 2 3 4 private IEnumerable&#60;PropertyInfo&#62; GetProperties&#40;Type type&#41; &#123; return type.GetProperties&#40;&#41;; &#125; O problema é que, segundo a Microsoft, a ordem em que as properties são retornadas não é garantido: The GetProperties method does [...]]]></description>
			<content:encoded><![CDATA[<p>Em alguns momentos, pode ser necessário obter a lista de properties de um objeto. Um jeito simples de fazer isso é:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> IEnumerable<span style="color: #008000;">&lt;</span>PropertyInfo<span style="color: #008000;">&gt;</span> GetProperties<span style="color: #000000;">&#40;</span>Type type<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">return</span> type.<span style="color: #0000FF;">GetProperties</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>O problema é que, segundo a Microsoft, a ordem em que as properties são retornadas não é garantido:</p>
<blockquote><p>The GetProperties method does not return properties in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which properties are returned, because that order varies.</p></blockquote>
<p>Uma solução para resolver esse problema é ordenar a lista de properties pela property MetadataToken.</p>
<p>O código então, ficaria assim:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> IEnumerable<span style="color: #008000;">&lt;</span>PropertyInfo<span style="color: #008000;">&gt;</span> GetProperties<span style="color: #000000;">&#40;</span>Type type<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">return</span> type.<span style="color: #0000FF;">GetProperties</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">OrderBy</span><span style="color: #000000;">&#40;</span>p <span style="color: #008000;">=&gt;</span> p.<span style="color: #0000FF;">MetadataToken</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Se a intenção for obter as properties na ordem inversa, o código ficaria assim:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> IEnumerable<span style="color: #008000;">&lt;</span>PropertyInfo<span style="color: #008000;">&gt;</span> GetPropertiesDescending<span style="color: #000000;">&#40;</span>Type type<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">return</span> type.<span style="color: #0000FF;">GetProperties</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">OrderByDescending</span><span style="color: #000000;">&#40;</span>p <span style="color: #008000;">=&gt;</span> p.<span style="color: #0000FF;">MetadataToken</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>O ideal é que o seu código não dependa da ordem dos membros para executar, mas em alguns casos, como geração automática de código, isso pode ser útil.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luizpicanco.com/2009/08/18/obtendo-as-properties-pela-ordem-de-declaracao-no-c/feed/</wfw:commentRss>
		<slash:comments>1625</slash:comments>
		</item>
		<item>
		<title>Jamais compre um notebook HP !!!</title>
		<link>http://www.luizpicanco.com/2009/07/02/jamais-compre-um-notebook-hp/</link>
		<comments>http://www.luizpicanco.com/2009/07/02/jamais-compre-um-notebook-hp/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 03:19:25 +0000</pubDate>
		<dc:creator>Luiz Picanço</dc:creator>
				<category><![CDATA[Tecnologia]]></category>
		<category><![CDATA[descaso]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[hp]]></category>

		<guid isPermaLink="false">http://www.luizpicanco.com/2009/07/02/jamais-compre-um-notebook-hp/</guid>
		<description><![CDATA[Eu fui proprietário de um notebook HP, modelo tx1070br, que parou de funcionar de forma repentina. Pesquisando nos fóruns, qual não foi a minha surpresa ao constatar que CENTENAS de pessoas tiveram o mesmo problema ? Em quase todos os casos, para não generalizar, a HP ignorou o caso e como a maioria dos problemas [...]]]></description>
			<content:encoded><![CDATA[<p>Eu fui proprietário de um notebook HP, modelo tx1070br, que parou de funcionar de forma repentina. Pesquisando nos fóruns, qual não foi a minha surpresa ao constatar que CENTENAS de pessoas tiveram o mesmo problema ?</p>
<p>Em quase todos os casos, para não generalizar, a HP ignorou o caso e como a maioria dos problemas &#8220;estranhamente&#8221; ocorreram logo após o término de garantia, cobrou pelo serviço. Algumas pessoas pagaram e logo após receberem o notebook de volta(após 2 meses), o notebook apresentou o mesmo problema.</p>
<p>Pesquisando mais sobre o assunto, descobrir que diversos modelos de notebook da HP estão &#8220;morrendo&#8221; logo após o término da garantia (aproximadamente 1 mês depois).</p>
<p>Eu sempre respeitei os produtos da HP, mas isso não pode passar assim em branco. Uma empresa do porte da HP tem o dever de respeitar os consumidores.</p>
<p>Link para um outro blog que relata o mesmo problema:<br /><a href="http://www.mycheaplaptop.net/2009/03/never-buy-hp-laptop/">NEVER buy an HP laptop | Cheap Laptop Blog</a><br />
<blockquote></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.luizpicanco.com/2009/07/02/jamais-compre-um-notebook-hp/feed/</wfw:commentRss>
		<slash:comments>3880</slash:comments>
		</item>
		<item>
		<title>Guia rápido do Grails</title>
		<link>http://www.luizpicanco.com/2009/04/26/guia-rapido-do-grails/</link>
		<comments>http://www.luizpicanco.com/2009/04/26/guia-rapido-do-grails/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 02:27:29 +0000</pubDate>
		<dc:creator>Luiz Picanço</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.luizpicanco.com/2009/04/26/guia-rapido-do-grails/</guid>
		<description><![CDATA[É bom ver a comunidade Grails crescendo no Brasil. O Henrique Weissmann produziu esse ótimo guia sobre o Grails. O guia está divido da seguinte forma: 1 &#8211; Introdução2 &#8211; Como instalar o Grails3 &#8211; Groovy &#8211; O básico para quem for aprender Grails4 &#8211; Grails Acesse aqui: Grails: um guia rápido e indireto « [...]]]></description>
			<content:encoded><![CDATA[<p>É bom ver a comunidade Grails crescendo no Brasil.</p>
<p>O <a href="http://www.itexto.net/devkico">Henrique Weissmann</a> produziu esse ótimo guia sobre o Grails.</p>
<p>O guia está divido da seguinte forma:</p>
<p>1 &#8211; Introdução<br />2 &#8211; Como instalar o Grails<br />3 &#8211; Groovy &#8211; O básico para quem for aprender Grails<br />4 &#8211; Grails</p>
<p>Acesse aqui: <a href="http://www.itexto.net/devkico/?page_id=220">Grails: um guia rápido e indireto « /dev/Kico</a></p>
<p>
<blockquote></blockquote>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=26a8f052-3a26-8c0f-bf7e-9cac765a1c23" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.luizpicanco.com/2009/04/26/guia-rapido-do-grails/feed/</wfw:commentRss>
		<slash:comments>5992</slash:comments>
		</item>
		<item>
		<title>Batalha de RAP de geeks</title>
		<link>http://www.luizpicanco.com/2009/04/17/batalha-de-rap-de-geeks/</link>
		<comments>http://www.luizpicanco.com/2009/04/17/batalha-de-rap-de-geeks/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 18:53:45 +0000</pubDate>
		<dc:creator>Luiz Picanço</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.luizpicanco.com/?p=90</guid>
		<description><![CDATA[Veja como os geeks fazem uma batalha de RAP: djahandarie: we ain&#8217;t here to do e-c-e djahandarie: we&#8217;re here to do c-s-e on the w-e-b djahandarie: listen to me spit these rhymes djahandarie: while i program lines djahandarie: and commit web accessibility crimes djahandarie: word, son http402: You talk like your big on these I-Net [...]]]></description>
			<content:encoded><![CDATA[<p>Veja como os geeks fazem uma batalha de RAP:</p>
<p>djahandarie: we ain&#8217;t here to do e-c-e<br />
djahandarie: we&#8217;re here to do c-s-e on the w-e-b<br />
djahandarie: listen to me spit these rhymes<br />
djahandarie: while i program lines<br />
djahandarie: and commit web accessibility crimes<br />
djahandarie: word, son<br />
http402: You talk like your big on these I-Net kicks,<br />
http402: But your shit flows slower than a two-eighty-six.<br />
http402: I&#8217;m tracking down hosts and nmap scans,<br />
http402: While Code Igniter&#8217;s got you wringing your hands.<br />
http402: Cut the crap rap,<br />
http402: Or I&#8217;ll run ettercap,<br />
http402: Grab your AIM chat,<br />
http402: N&#8217; send a PC bitch-slap!<br />
http402: peace<br />
djahandarie: you&#8217;re talkin bout down hosts and nmap scans<br />
djahandarie: while i got other plans<br />
djahandarie: you&#8217;re at your new job, but you can&#8217;t even do it right<br />
djahandarie: you just create a plight with your http rewrites<br />
djahandarie: i&#8217;ve been on the web since the age of three<br />
djahandarie: you just got on directly off the bus from mississippi<br />
djahandarie: respect yo&#8217; elders, bitch<br />
http402: You&#8217;ve been webbin&#8217; since three, but still ain&#8217;t grown up,<br />
http402: Gotta update your config and send the brain a SIGHUP.<br />
http402: You say you&#8217;re that old? No wonder you&#8217;re slow!<br />
http402: You&#8217;re knocking at the door while I run this show!<br />
http402: Elders my ass, you&#8217;re shit&#8217;s still in school,<br />
http402: Hunt and pecking at the keyboard like a spaghetti-damned fool,<br />
http402: Rim-riffing your hard drive like a tool,<br />
http402: Face it. I rule.<br />
djahandarie: i erase my harddrives with magnets (bitch)<br />
djahandarie: all you can do is troll on the fagnets<br />
djahandarie: and son, my brain&#8217;s wrapped in a nohup<br />
djahandarie: it wont be hurt by the words you throwup<br />
djahandarie: dont mind me while i emerge my ownage<br />
djahandarie: while you&#8217;re still over there apt-getting your porridge<br />
djahandarie: you say i&#8217;m still in school<br />
djahandarie: but the fact is that i know the rule<br />
djahandarie: cuz you need to go back to grade three<br />
djahandarie: and you better plea, that they take sucky graduates from c-s-e<br />
http402: Time to bend over and apply a patch,<br />
http402: Your brain&#8217;s throwing static like a CD with a scratch.<br />
http402: Your connection got nuked and you&#8217;ve met your match.<br />
http402: You run a single process like a VAX with a batch.<br />
http402: I&#8217;d pass the torch to a real winner<br />
http402: But it&#8217;d just scorch a while-loop spinner<br />
http402: Caught in a loop that you cant escape,<br />
http402: I run clock cycles around your words and flows,<br />
http402: Cuz your rhyme is like a PS fan: it&#8217; blows,<br />
http402: Your water-cooled lyrics leak and it shows,<br />
http402: Take your ass back to alt.paid.for.windows.<br />
djahandarie: Good god, I can&#8217;t even respond to that. <img src='http://www.luizpicanco.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br />
djahandarie: You win haha</p>
<p>Fonte: <a href="http://www.bash.org/?870063">http://www.bash.org/?870063</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.luizpicanco.com/2009/04/17/batalha-de-rap-de-geeks/feed/</wfw:commentRss>
		<slash:comments>1849</slash:comments>
		</item>
		<item>
		<title>Client para twitter em .Net</title>
		<link>http://www.luizpicanco.com/2009/03/25/client-para-twitter-em-net/</link>
		<comments>http://www.luizpicanco.com/2009/03/25/client-para-twitter-em-net/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 04:30:30 +0000</pubDate>
		<dc:creator>Luiz Picanço</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Projetos]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[linq]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.luizpicanco.com/2009/03/25/client-para-twitter-em-net/</guid>
		<description><![CDATA[Criei um client para twitter utilizando a plataforma .Net. Funcionalidades: Lista as mensagens dos seus amigos Lista os seus replies Lista as suas mensagens Adiciona novas mensagens A aplicação está funcional mas precisa de aprimoramentos no layout. Com o tempo vou atualizando. Screenshot da tela principal: Faça o download: Twitter.Net O código pode ser acessado [...]]]></description>
			<content:encoded><![CDATA[<p>Criei um client para twitter utilizando a plataforma .Net.</p>
<p>Funcionalidades:</p>
<ul>
<li>Lista as mensagens dos seus amigos</li>
<li>Lista os seus replies</li>
<li>Lista as suas mensagens</li>
<li>Adiciona novas mensagens</li>
</ul>
<p>A aplicação está funcional mas precisa de aprimoramentos no layout. Com o tempo vou atualizando.</p>
<p>Screenshot da tela principal:</p>
<div id="attachment_84" class="wp-caption alignnone" style="width: 1034px"><a href="http://www.luizpicanco.com/wp-content/uploads/2009/03/twitternet1.jpg"><img class="size-large wp-image-84" style="border: 0pt none;" title="twitternet1" src="http://www.luizpicanco.com/wp-content/uploads/2009/03/twitternet1-1024x455.jpg" alt="Twitter.Net Screenshot" width="1024" height="455" /></a><p class="wp-caption-text">Twitter.Net Screenshot</p></div>
<p>Faça o download:<br />
<a href="http://twitterclient.googlecode.com/files/TwitterNet.zip">Twitter.Net</a></p>
<p>O código pode ser acessado aqui:<br />
<a href="http://code.google.com/p/twitterclient/">twitterclient &#8211; Google Code</a></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=dbb868ae-1d13-43e9-b0df-f72ff5404a60" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.luizpicanco.com/2009/03/25/client-para-twitter-em-net/feed/</wfw:commentRss>
		<slash:comments>2342</slash:comments>
		</item>
	</channel>
</rss>

