8/17/2006

USB 2.0 Issues on IBM T40

There are many posts out there about USB 2.0 not working on IBM laptops. I did not find this particular issue anywhere, so here we go:

When I connected my USB 2.0 harddrive to my T40 it would always complain about a 2.0 device being connected to a 1.1 port. From then on all USB 2.0 devices would work like 1.1 (even my good ol' memory stick). I was able to re-establish 2.0 connectivity (for my memory stick, that is) by either
  • removing all USB ports in Device Manager, then scan for hardware changes, or
  • as so often with Windows, rebooting my computer
But as soon as I would connect my harddrive, the laptop ports were degraded again.

Finally I found the reason: apparently the harddrive, although being a 2.5" laptop drive, sucked up too much power. When I connected the harddrive to an external power supply, the ports would work fine in 2.0 mode. (I was lucky enough not to have damaged my mainboard, as some people had reported elsewhere)

Hope this may help some people facing the same issue.

P.S.: I am not saying this is the only possible reason for this behaviour, as the many forums on the internet show plenty of other causes. So if this does not solve your issue, do check the forums too!

GMX on FritzBox

I got a GMX VoIP account yesterday (1c per minute for all calls in Germany, or 10 EUR flat, excludes mobiles of course) and set up my FritzBox to use it. All I got was a message code 401 and the FritzBox would not be able to connect.

It took me a while to find out why: I had chosen a password with more than 8 characters, which is not checked by the setup page in GMX. They do have a message there saying that the password must have 6-8 characters, but it was easy to overlook.

Once I had changed my password to fit the limits it worked like a charm. Also the FAQ on GMX is pretty helpful for setting things up. Mind you, this particular problem was not on their list. Hope this may help some people out there.

8/12/2006

Single Instance Application, Passing Command Line Arguments


Problem

I wanted to make sure that only one instance of a program is running on my machine, and when a second instance would be started, it would pass its command line arguments to the original instance, then terminate. Thus the original instance can handle everything else, such as opening a file, bringing itself to the foreground, etc. Also, the solution should not employ outdated techniques such as DDE, and should not use any unmanaged code, as I had seen in so many other solutions to this problem.

Solution

Part 1: Many solutions I have seen walk through the process list in order to identify a previous instance. Others use Mutex, which I found appealing as it is a lot faster, and completely managed code. This solution uses the full path of the executing assembly as the Mutex name, so it is definitely unique.

Part 2: Other solutions use DDE to communicate with the previous instance, I chose .NET remoting because again it is fully managed code and not a Windows legacy, and it also works with console applications, while DDE would require a window.

The whole functionality is encapsulated in a class, is written in C# using .NET 2.0. To make this work with .NET 1.1 you would have to change some namespaces, otherwise it is fully compatible.

To demonstrate the principle, I created a simple console application. Of course you'd need to enhance the class a little for general use, this example has for instance a fixed port number, and certainly other flaws for generic usage. But it should only demonstrate the principle.

The Full Article
... including code-walkthrough and downloadable sample code can be found at The Code Project

8/11/2006

Beautiful Women Before 8am

Usually I travel by underground shortly after 8am, however, this week I had some early appointments and thus had to travel around 7am. And I notices a big difference: it seems that before 8am there is not a single beautiful women on any of these trains. Not that I really need to see one, but it was really striking!

I have the following possible exaplanations:
  1. before 8am I am not able to recognize beauty (I would rather rule this out, but it's possible)
  2. travelling before 8am has a negative effect on womens' beauty
  3. beautiful women do not have to travel before 8am
  4. women only become beautiful after 8am (I don't think so, I have seen my wife early in the morning and she did look beautiful - this would also rule out number 1)

Any more explanations?

Man, I'm just glad that I will be back to my usual schedule next week, it's just a good start into the day to see beauty.
adaxas Web Directory