As a Firefox user, one of the extensions that I can’t live without is Userstyles. They allow me to remove tons of ads and format some webpages that I use in my daily life in the way I want.
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…
After searching for a while I found information about custom cascade style sheets in IE in a Microsoft article.
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.
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.

Foi lançado hoje um novo portal português destinado aos mais novos. É o Sapo Kids! Além de diversos conteúdos lúdicos e didácticos reunidos a partir dos diversos serviços do mundo Sapo, conta com parcerias como a Porto Editora ou até mesmo o MIT.
Realço a integração do Scratch no portal. O Scratch que nasceu no MIT permite aos mais novos criarem animações interactivas de forma simples e divertida enquanto aprendem. O Sapo Kids tem a plataforma Scratch totalmente em Português, tornando-a ainda mais atractiva às crianças portuguesas.
Antes mesmo do projecto criar raízes em Portugal já existia uma escola pioneira a utilizar o sistema do MIT. Espero que outras lhe sigam o exemplo agora com este portal Português.
Mais informações no site http://kids.sapo.pt
During the last weeks I’ve been doing some research related to my Master thesis. One of the topics I’m studying is Unsupervised Machine Learning. The main goal is to have a piece of software that given a training set (a set of examples representative of the whole population) allow the software to accept input that it has never seen before and behave as expected.
Imagine for instance a concept called Color Classifier. We usually have several named colors such as red, green, blue, yellow, gray, orange, etc. You have different flavors of each color, and you can consider different combinations of RGB colors the same color. How can you, given a RGB Color code, name that color?
One approach is using Neural Networks (which is a unsupervised learning method) for classification.
I won’t talk about the details of Neural Networks algorithms, since it is the reason why many people avoid this kind of approach: complexity. I’ll just show you how, with a library that hides the implementation details, you can use them.
NeuronDotNet is a .NET library which allows you to use Neural Networks algorithms as a black box. They have some samples which can guide you, as they guided me.
The algorithm I’m using is called Self-organizing Map (SOM). The main idea is to generate a 2D map which topology (dispersion of the points and their positions) is based on the relation between the input data. Back to the example, from a set of random colors which can be represented as a vector with 3 dimensions (input), we generate a map with 2 dimensions, where similar colors get close to each other and completely different colors are set apart. The picture bellow represents the results.
(Left: input, Right: 2D map that results from the algorithm)

The number of colors that will be recognized (the number of neurons of the output layer) can be customized in the neural network configuration, prior to the training phase. In the example above I recognize 25 different colors.
Once the SOM algorithm runs in training mode, the resultant neural network is able to classify new colors into the different slots of the map. If you name each slot with the name of a color, you get a color classifier. In the example above you can label several flavors of green, blue, red, brown, pink, etc. In each slot you have several stripes that represent the colors from the training set and in which slot they ended up.
In the demo application the basic steps are:
- Play with the different settings (or leave them alone… take special attention to Layer Width/Height and Set Size)
- Generate Training Set
- Start (Learning)
- Choose Color (to classify)
- Classify (the neuron that best matches the selected color will be highlighted with a red border)
Download and try the Color Classifier. Keep in mind that a lot of the source code is UI-related, and not Algorithm-related, so don’t be afraid!
Download Demo | Download Source Code
Probably I haven’t mentioned before, but after my Qtek S200 crashed a few months ago, I’ve bought an HTC Diamond. At first it was a little slow and battery consuming, but 3 days after I bought it, HTC released a new ROM for TMN customers which solved those issues. Great timing I had.
Yesterday I tried a new version of a tool I didn’t know about. It is called GPS Cycle and it uses your built-in GPS receiver to track your position and draw a graph.

But the feature that I really like, is the ability to save your path into a file which can be read by applications such as Google Earth. This way you can review your tracking, if you go for a walk by foot or bicycle , or something like that.

If you enable the geo-referenced photographs in your phone, you can decorate your path with those pictures (with some additional work).

GPS Cycle is available at the XDA Developers Forum. You can enable the geo-referencing in your photos in HTC Diamond using Diamond Tweak. (Other devices that have builtin GPS have similar tools that change some register keys).
Today I had to generate files in ASP.NET for download which was supposed to open a save file dialog in the web brower. The file name was based on a title field extracted from a database. The title had spaces which I allowed to be used in the file name (I replaced accents and other invalid characters). In the source code bellow you can see a simple illustrative example.

Perhaps you have noticed that I am generating a plain text file, but I am not using the “text/plain” mime type. When you use “text/plain” the browser automatically knows which application to use for opening the file. If you use “application/octet-stream” instead, the browser uses the file extension in order to find out which is the operating system default program for that file extension. But when you have spaces in you file name as in the example above, you get different behaviours from different browsers.
In Internet Explorer 7, the spaces are replaced by underscores, the the browser recognizes the file extension “.txt”.

If you download the same generated file using Firefox, it cuts the file name ending at the first space. This way the browser considers that your file name is “Just” which has no extension. As a consequence Firefox doesn’t know which application to suggest you for opening the file.

I haven’t tried other browsers, but I took a safe approach. In the server side, while defining the file name I replace the spaces by underscores, this way the download has a consistent behavior in both browsers.