Miguel Miranda de Mattos

I am a software developer living in southern Brazil.

Updates

Photos

Favorites

Posts

April 11, 04:34 PM

Meu amigo Paulo Bridi teve, após tensos dias de espera, seu aplicativo, Olho no Lance, desenvolvido para iPhone baseado no sistema iOS, aprovada no ITunes Apple Store.
O objetivo é bem claro. Acompanhar os resultados dos jogos de futebol das jornadas dos campeonatos Gauchão e Brasileiro, e como um plus receber notificações “PUSH” para os jogos selectionados.
Hoje o aplicativo pode ser baixado gratuitamente no App Store.

Projetos pessoais, a.k.a. “kabritos” como este do Paulo, são uma forma proativa de se aprofundar em novas tecnologias nas horas livres.
Alem de ampliar a bagagem de conhecimentos do autor, é muito recompensador, mesmo o produto sendo gratuito.

Em breve espero poder escrever sobre o “kabrito” que estou criando, e que deve ficar pronto antes de 19/Maio atendendo ao desafio do meu brother Cícero Rolim, emprendedor, criador do Muambator e mentor de kabritos meu e do Paulinho.

Mais uma vez: Parabéns ao Paulo por mais essa conquista!
Abraço,

September 28, 11:53 PM

I´ve been looking for a way to verify, from within Visual C#, whether a required COM component dynamic link library (DLL) has  indeed been registered in the system and that our dependent class can you use without fear.

In the way to the solution I found approaches using kernel32 LoadLibrary and FreeLibrary calls which actually only verify the existence of the component but nothing about whether it has been registered in the Windows registry.

The most reliable way to do this verification is to use a static method named GetTypeFromProgID,  available in the TYPE class, from the CLR,

This method attempts to load a particular type from the DLL under test.
If successfull it should return the full qualified type. Otherwise, if the DLL is not registered, it will render a NULL result.

This method takes a string parameter which is the ProgID. If progID is a valid entry in the registry and a type is associated with it; otherwise, Nothing

The sample code:


using System;
using System.Runtime.InteropServices;
namespace ComDllVerification
{
    class Program
    {
        static void Main(string[] args)        
        {
            try
            {
                Type T = Type.GetTypeFromProgID("WIA.DeviceManager");
                
                if (T != null)
                {
                    // Safe to go...
                }
            }
            catch (COMException ex)
            {
                // Handle the COM exception here...
            }
        }
    }
}
September 18, 12:47 AM

Source control management has never changed so much its paradigm until GIT.

Git revolutionized they way you deal and manage source code repositories breaking traditional concepts as those found in CVS and SVN.

Working on a branch of one of the mainstream projects I participate, the time came where a merge is needed.
Both master (trunk) and our branch (remote, because it sits on the server) have evolved and merging wouldn´t be easy.

To make things safer I decided to bring the master changes into our branch and for that purpose I choose to use “git rebase” that was expected to “replay” the master changes from the begining and finally apply our changes on top of them, all onto our branch.

The command is pretty easy:

$ git rebase origin/master

If there are many conflicts, they can be resolved manually. Rebase will stop on each conflict, allowing you to fix it and procced or abort.

To proceed:

$ git rebase –continue

To abort:

$ git rebase –abort.

You can also skip a patch by issuing:

$ git rebase –skip

 

And one very important note. Once it´s finished, NO commits or push commands are needed. I made that mistake once and ended up with a merge commit on top of the actual rebase. So don´t doi it!
Everything should be rebased on your remote server.
Verify the Git logs or use gitk and you´ll how ended up.

The good point is that commit history, authors, etc..are all preserved.That´s good.

 

September 18, 12:25 AM

To keep up the pace of running multiple development environments simultaneously, xp, win7, and to avoid dealing with multiple mice/keyboards combinations, I downloaded and installed Synergy, a little tool that allows you to control many computer desktops from just one of them, extending and embracing the combined dektops with a unique experience.

It allows your mouse to roll from one machine´s desktop to the other one, transparently.

My setup has a the Windows 7 box configured as the Synergy server, so others (clients) desktops connect to it to get access to the input devices.

Everything worked smoothly until a recent windows automatic update that took phace las Thursday, September 15th.
Albeit the server service was up and running and client machines connected ok to the server one, the server consistently refused to share its input devices with the clients.

After experimenting with different configurations, I realized the problem was related to the Synergy Windows service accessing the user desktop area.

Fixing this situation, involved:

  1. Disable the Synergy Windows service.
  2. Granting the Synergy app shortcut administrator execution privileges.
  3. Set the app Synergy app to automatically startup with Windows (through msconfig).

Now Synergy is back to normal!

July 18, 12:01 PM

From the very first time you attempt a domain name search to begin the setup of your own website to the moment when you “launch” your site on the Internet, a great deal of thought and creativity goes into making your own website. If you have ever attempted this feat, you know just how much goes into it – you want the right domain name, the right format, adequate capabilities, and the ability to adapt and manage your site as easily as possible. Fortunately, professional web hosting companies like Network Solutions simplify the process as much as possible, allowing people the ability to focus almost entirely on the creative side of the experience rather than worry about the technological side, which can be very complicated. However, if you have ever been more curious about how things work on the Internet, it is well worth researching things like what is called the Semantic Web, in order to gain a greater understanding of the Internet’s abilities and inner-workings.

For those who are unfamiliar or merely curious, the Semantic Web is, in simple terms, a sort of data network that exists beneath the surface of the World Wide Web. More specifically, the Semantic Web is defined on its Wikipedia page as “a web of data that facilitates machines to understand the semantics, or meaning, of information on the World Wide Web.” Essentially, the Semantic Web exists to make automated, machine reading of the Internet as fast as possible, so that Internet data can be accessed and understood quickly by machines, allowing the Web to run more smoothly. The idea is to help machines to understand human-related Internet activity, and be able to respond to our requests and needs.

Ultimately, the simplest way to think of the Semantic Web is that it is the “how.” In other words, the Semantic Web represents how the Internet works. Every time you search a phrase, look up a word, purchase something online, etc. you are making a demand of the Internet to respond to whatever it is you have requested. However, it is not up to you to sift through the entire World Wide Web to actually find or accomplish whatever it is you want – this is where the Semantic Web comes in. The idea is that it allows the Internet to automatically take care of the searching, or the completion of whatever task you have laid before it. There is of course more to the Semantic Web than this, as it is a complex and ever-evolving concept, but this has been a basic introduction for anyone curious to find out more about the ways in which the Internet works.

In our Breathing Semantics blog, you will find some examples of semantic web implementations using the FOAF (Friend Of A Friend) ontology concepts.

May 29, 01:05 AM

Unfortunately after a recent update of WP my blog wen to an unstable state which required me to restore a plain new one off from the database backup I was able to make days before.

Hopefully there will be no disruption on the posts flow but just in case you find something unusual, please just let me know and I´ll try to fix it.

Some broken images are expected.

Thanks!

May 24, 10:29 PM

Here is something that was in my plans for quite some time. Writing a Chrome browser extension. Wanted to write something useful. Not being happy with the extensions currently available for browsing the Delicious bookmarking system, I decided to create a new one.

Requirements would be:
1) Not to require server side code.
2) Provide auto-complete on tag typing.
3) Use JSON instead of XML.
4) REST – This is actually a Delicious premise.

Oh. And by the way. You don´t need to have a Delicious account to use it. If you know a friends account there, add it in the Options page, and you´ll be able to browse his public bookmarks.

 

Even further. If you don´t provide an account (yours or from someone you know) it does not matter!!! You will be able to browse from all the bookmarks available at Delicious.

The extension is available at the Chrome Web Store.

If you are curious about it (I would be) the source code for this extension is available at my Github.

Try it out!

May 21, 10:05 PM

Join me as my colleague and friend Claudio explores the differences
between these two online backup solutions.

Read the full story here.

November 25, 11:12 AM

Recently I made an investigation to find a free alternative for source code repository.
GitHub is a great one, but all your repos will be public. For the private ones you have to pay.
DropBox, as mentioned in this blog, provides some versioning and works great for some projects.

A couple of days ago I was browsing for dev tools I found the Atlassian site where they offer different (and very useful) solutions for developers.
Among these solutions, there is the Bitbucket.org hosted Mercurial SCM repository, that is offered for free for accounts of up to five users. For those who are not familiar with Mercurial, it is very similar to Git in concept. Bitbucket also allows you to create a dns redirection from one of your host subdomains and it works great!…

October 29, 10:06 PM

Chrome is a goergeous, clean, minimal browser. One of the only problems I had that was stopping me from using it as a my default browser, was the fact the it would not let me override font sizes and types, favoring the selections made by each website.

Well, as explained here, I set up my customized configuration for Webkit within Google Chrome´s Preference file, that is located (in Windows Vista) at

  • …AppData\Local\Google\Chrome\User Data\Default

The Webkit section of my Preference file, that sits close to the end of the file, now looks like this:


...
"webkit": {
    "webprefs": {
        "default_fixed_font_size": 13,
        "default_font_size": 16,
        "fixed_font_family": "Consolas",
        "minimum_font_size": 14,
        "minimum_logical_font_siz": 13,
        "sansserif_font_family": "Segoe UI",
        serif_font_family": "Segoe UI",
        "standard_font_is_serif": false,
        "text_areas_are_resizable": true
    }
}
...

That seems to , at list partially have fixed the problem for me.
Oh, just a quick reminder. Shutdown Chrome before editing the Preference file.

abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz