<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by hAtom2Atom.xsl (2007-08-09) -->
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US" xml:base="http://brunosilva.net"><updated><!--
Using the newest datetime from the entry level.

Here is a sorted list from all the dates at the feed level:

20090603T094910 (2009-06-03T10:49:10+01:00)
20090601T135046 (2009-06-01T14:50:46+01:00)
20090401T140110 (2009-04-01T15:01:10+01:00)
20090223T093014 (2009-02-23T09:30:14+00:00)
20090205T155220 (2009-02-05T15:52:20+00:00)
20090127T170357 (2009-01-27T17:03:57+00:00)

-->2009-06-03T10:49:10+01:00</updated><id>http://brunosilva.net</id><link rel="alternate" href="http://brunosilva.net" type="text/html"/><title>» Bruno Silva - Technology Blog</title><entry xml:lang="en-US"><title>What I almost can’t wait for from E3</title><id>http://brunosilva.net/what-i-almost-cant-wait-for-from-e3/558/</id><link rel="alternate" href="http://brunosilva.net/what-i-almost-cant-wait-for-from-e3/558/" title="What I almost can’t wait for from E3" type="text/html"/><published>2009-06-03T10:49:10+01:00</published><updated><!--Using the value of the first "published" element-->2009-06-03T10:49:10+01:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
<p>Yesterday I assisted to the 3 E3 main press conferences by
Microsoft, Nintendo and Sony.</p>
<p>Lately I haven’t been such an active video game player as I used
to be some months ago, but now I’m feeling that during this year
and the next one I’ll come to my roots <img src="http://brunosilva.net/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"/></p>
<p><strong>Microsoft XBox 360</strong></p>
<p>From Microsoft, as a XBox 360 owner I was glad to hear
that XBox Live will have integration with Facebook and
Twitter, my two main social networks. For gold membership owners
will get full access to Last.FM through their XBox 360 systems.</p>
<p>But the best of all, that really got me crazy was Project Natal.
My friend <a title="Marco Silva - XBox360 – Project Natal" href="http://marconsilva.wordpress.com/2009/06/03/xbox360-%e2%80%93-project-natal/" target="_blank">Marco wrote a post on his blog</a> about
it and it has 2 MUST SEE videos.</p>
<p><strong>Nintendo</strong></p>
<p>The news about Nintendo DS weren’t that appealing to me, since I
don’t own a Nintendo DS, but it’s obvious that Nintendo is
targeting young women with several games meant to them. The focus
in user generated content is a great initiative. It doesn’t apply
only to Nintendo DS applications but also video games with user
generated levels.</p>
<p>As a Wii owner I really must buy Wii Sports Resort with Wii
Motion Plus that is coming to stores in July.</p>
<p>As a fan of one of the best games I’ve ever played (if not the
best) I was glad to ear that a Super Mario Galaxy sequel is coming.
You can watch the trailer at <a title="GameTrailers - Super Mario Galaxy 2" href="http://www.gametrailers.com/video/e3-09-super-mario/50233" target="_blank">GameTrailers.com</a></p>
<p>Nintendo also announced <a title="Wii Vitality Sensor @ Engadget" href="http://www.engadget.com/2009/06/02/nintendo-wii-vitality-sensor-detects-your-pulse/" target="_blank">Wii Vitality Sensor</a> which can read your
vital signs and find out whether you’re anxious or focused, etc.
I’m not really convinced, but I’ll wait and see.</p>
<p><strong>Sony Entertainment</strong></p>
<p> I own a PSP 3000, and I won’t buy PSP Go, but a new
handheld video game console it’s always good news for gamers. And I
didn’t pay attention to Playstation 2 and 3 news…</p>
<p>You can what the 3 press conferences though Gamespot at <a href="http://e3.gamespot.com/press-conference/">http://e3.gamespot.com/press-conference/</a></p>
</div></content><author><name>Bruno Silva</name><uri>http://brunosilva.net</uri></author><category term="games" scheme="http://brunosilva.net/category/" label="Games"/><category term="my-life" scheme="http://brunosilva.net/category/" label="My Life"/><category term="xbox-360" scheme="http://brunosilva.net/category/" label="XBox 360"/></entry><entry xml:lang="en-US"><title>User Styles in Internet Explorer</title><id>http://brunosilva.net/user-styles-in-internet-explorer/554/</id><link rel="alternate" href="http://brunosilva.net/user-styles-in-internet-explorer/554/" title="User Styles in Internet Explorer" type="text/html"/><published>2009-06-01T14:50:46+01:00</published><updated><!--Using the value of the first "published" element-->2009-06-01T14:50:46+01:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
<p>As a Firefox user, one of the extensions that I can’t live
without is <a title="Userstyles.org" href="http://userstyles.org/" target="_blank">Userstyles</a>.  They allow me to remove tons
of ads and format some webpages that I use in my daily life in the
way I want.</p>
<p>A few months ago I started using IE8 as my main browser in my
personal laptop. And very happy about it because it’s lighter than
Firefox, and I don’t really need all the extensions outside work.
But I missed Userstyles…</p>
<p>After searching for a while I found information about <a title="Format Web pages using a custom style sheet" href="http://www.microsoft.com/enable/training/windowsvista/webstyle.aspx" target="_blank">custom cascade style sheets in IE</a> in a
Microsoft article.</p>
<p>By following this step-by-step tutorial, you can set a custom
css file for your browser. The changes are applied after browser
restart, and it’s somewhat limited when compared with userstyles,
since you can’t turn on/off setting on the fly and the css rules
are global, which means that you change a class properties for
a website, and you happen to navigate to another one that uses the
same class, the css rules will also be applied.</p>
<p>Nevertheless, now I was able to remove ads from Windows Live
Hotmail in IE8, remove the search bar that I don’t use and so
on.</p>
</div></content><author><name>Bruno Silva</name><uri>http://brunosilva.net</uri></author><category term="my-life" scheme="http://brunosilva.net/category/" label="My Life"/><category term="software" scheme="http://brunosilva.net/category/" label="Software"/><category term="usability" scheme="http://brunosilva.net/category/" label="Usability"/><category term="web" scheme="http://brunosilva.net/category/" label="Web"/></entry><entry xml:lang="en-US"><title>I just hate April Fool’s Day…</title><id>http://brunosilva.net/i-just-have-april-fools-day/551/</id><link rel="alternate" href="http://brunosilva.net/i-just-have-april-fools-day/551/" title="I just hate April Fool’s Day…" type="text/html"/><published>2009-04-01T15:01:10+01:00</published><updated><!--Using the value of the first "published" element-->2009-04-01T15:01:10+01:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
<p>… because while reading my RSS feed subscriptions, there are a
lot of news that are fake (clearly), and someones that I can’t tell
if they are.</p>
<p>Edit: I just “hate”, not “have”.</p>
</div></content><author><name>Bruno Silva</name><uri>http://brunosilva.net</uri></author><category term="my-life" scheme="http://brunosilva.net/category/" label="My Life"/></entry><entry xml:lang="en-US"><title>2º Seminário de Tecnologias Móveis IT PRO &amp; DEV</title><id>http://brunosilva.net/2%c2%ba-seminario-de-tecnologias-moveis-it-pro-dev/545/</id><link rel="alternate" href="http://brunosilva.net/2%c2%ba-seminario-de-tecnologias-moveis-it-pro-dev/545/" title="2º Seminário de Tecnologias Móveis IT PRO &amp; DEV" type="text/html"/><published>2009-02-23T09:30:14+00:00</published><updated><!--Using the value of the first "published" element-->2009-02-23T09:30:14+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
<p><a href="http://www.mtechseminar.com/09" target="_blank"><img class="aligncenter" title="2º Seminário de Tecnologias Móveis IT PRO &amp; DEV" src="http://brunosilva.net/bs-images/semtecmoveis2009.jpg" alt="" width="674" height="110"/></a></p>
<blockquote>
<p><span class="style6">A segunda edição
do evento da comunidade PocketPT.net para os Profissionais de
tecnologias móveis e relacionadas, dá continuidade ao sucesso
obtido pela primeira edição.<br/>
Este ano, de modo a oferecer um conjunto de conteúdos mais
alargado, as duas tracks foram divididas em dois dias, sendo o
primeiro dia reservado a programadores e o segundo a profissionais
de TI.<br/>
Consegue-se assim uma maior riqueza e abrangência de conteúdos e
intervenientes.</span></p>
</blockquote>
<p>Mais um evento sobre Windows Mobile promovido pela comunidade
PocketPT.NET. A julgar pelos a que já assisti irá valer bem a pena.
Inscrições abertas. Mais informações no <a title="2º Seminário de Tecnologias Móveis IT PRO &amp; DE" href="http://www.mtechseminar.com/09" target="_blank">site
oficial</a>.</p>
</div></content><author><name>Bruno Silva</name><uri>http://brunosilva.net</uri></author><category term="events" scheme="http://brunosilva.net/category/" label="Events"/><category term="mobility" scheme="http://brunosilva.net/category/" label="Mobility"/></entry><entry xml:lang="en-US"><title>ASP.NET Output Cache - Cleaning all at once</title><id>http://brunosilva.net/aspnet-output-cache-cleaning-all-at-once/540/</id><link rel="alternate" href="http://brunosilva.net/aspnet-output-cache-cleaning-all-at-once/540/" title="ASP.NET Output Cache - Cleaning all at once" type="text/html"/><published>2009-02-05T15:52:20+00:00</published><updated><!--Using the value of the first "published" element-->2009-02-05T15:52:20+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
<p>I’ve been using a feature of ASP.NET called Output Cache. It
allows you to have server-side cache for your ASP.NET webpages. You
can define several profiles and cache expiration rules. You can
read more about it in a <a title="Nothin' but - ASP.NET Page Output Caching, Part 1" href="http://msdn.microsoft.com/en-us/library/ms972362.aspx" target="_blank">simple and short article at MSDN</a> or in the <a title="ASP.NET Caching Overview" href="http://msdn.microsoft.com/en-us/library/ms972362.aspx" target="_blank">full documentation</a> also at MSDN.</p>
<p>A feature that I wasn’t able to find was cleaning all the cached
data. You can remove cache for a specific page using
<strong>HttpResponse.RemoveOutputCacheItem(”pagename”)</strong> but
to remove all pages (which can have several cached versions each)
you have to use some kind of workaround. You can <a title="Remove ASP.NET Page Output Cache Entries" href="http://aspalliance.com/668" target="_blank">use a Cache
dependency</a> relying in a item stored in
<strong>HttpContext.Cache</strong> items collection, but for my
particular scenario it wasn’t the right solution. Why?</p>
<p>If you have several front-end servers serving your website, you
have independent cache systems, so when forcing a cache cleaning,
you will force it only for the front-end serving your request. To
solve this issue I’ve created a cache system relying on a file
dependency. This way, when I change that file, all the front-end
servers will clean their cache. I’ve included a CacheManager class
that has the usual Add method, that automatically add the file
dependency to cached data ( usually using Response.Cache.Add) and
not only output cache.</p>
<p><a title="Output Cache Demo" href="http://brunosilva.net/bs-downloads/demoOutputCache.zip">Download
source code</a> and have fun exploring it.<a title="Output Cache Demo" href="http://brunosilva.net/bs-downloads/demoOutputCache.zip"><br/></a></p>
</div></content><author><name>Bruno Silva</name><uri>http://brunosilva.net</uri></author><category term="net" scheme="http://brunosilva.net/category/" label=".NET"/><category term="aspnet" scheme="http://brunosilva.net/category/" label="ASP.NET"/><category term="programming" scheme="http://brunosilva.net/category/" label="Programming"/><category term="web" scheme="http://brunosilva.net/category/" label="Web"/></entry><entry xml:lang="en-US"><title>List Random Order in .NET using Linq</title><id>http://brunosilva.net/list-random-order-in-net-using-linq/534/</id><link rel="alternate" href="http://brunosilva.net/list-random-order-in-net-using-linq/534/" title="List Random Order in .NET using Linq" type="text/html"/><published>2009-01-27T17:03:57+00:00</published><updated><!--Using the value of the first "published" element-->2009-01-27T17:03:57+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
<p>While refactoring some C# code I came across some lines that
seemed a bit awkward. I was trying to sort a list or an array
randomly. That code was written before Linq came into the .Net
Framework, so now I was able to figure out a new approach.</p>
<p>Since Linq to Objects has some similarities with SQL, I got the
idea of trying the same approach that I used several times in SQL,
which was ordering a SELECT statement using ORDER BY RAND().</p>
<p>The result is shown bellow.</p>
<p><img class="aligncenter" title="List Random Order in .NET using Linq" src="http://brunosilva.net/bs-images/LinqOrderRandom.png" alt="" width="551" height="106"/></p>
<p>It uses the Extension Methods syntax of Linq to save some bytes
on the source code <img src="http://brunosilva.net/wp-includes/images/smilies/icon_razz.gif" alt=":-P" class="wp-smiley"/></p>
</div></content><author><name>Bruno Silva</name><uri>http://brunosilva.net</uri></author><category term="net" scheme="http://brunosilva.net/category/" label=".NET"/><category term="programming" scheme="http://brunosilva.net/category/" label="Programming"/></entry>
 
        dp.SyntaxHighlighter.ClipboardSwf = 'http://brunosilva.net/wp-content/plugins/syntaxhighlighter/files/clipboard.swf'; 
        dp.SyntaxHighlighter.HighlightAll('code'); 
//</feed>
