Compaq HP 6910p with builtin 3G/GSM modem and Windows 7

A while ago I decided to start fresh with my HP Compaq 6910p laptop so I installed a new harddisk and Windows 7. My 6910p has an internal 3G/GSM modem (HS2300). When visiting the HP Support & Drivers page for the 6910p and Windows 7 I discovered there are no drivers or software for this 3G modem under Windows 7.

However, it turns out that both the driver and the connection manager for Vista works in Windows 7.

Download and install:

  1. HP WWAN Broadband Wireless drivers
  2. HP WWAN Connection Manager
  3. HP Broadband Wireless Client for Vodafone (or if there is one for your provider, pick that one instead)

If your 3G/GSM provider is Vodafone you’re done now. In my case I use the Swedish provider Tre (3). To use the Vodafone Connection Manager with another provider you must find out your providers APN and what number to dial (normally *99#). For Tre in Sweden the APN is "bredband.tre.se".

To use the connection manager with another provider just edit the connection profile that was installed by default and change (if necessary) the number to dial and the APN. To use Tre in Sweden the profile should look like this:

 

 

Create a start page without a corresponding menu item in Joomla!

In most cases when creating a site in Joomla!, the first choise on the menu is something like "Start" or "Home" that brings the user back to the landing page of the site. Normally you will also link the website logo to the start page.

But sometimes when creating a site in Joomla, it is not desirable to have a specific menu item with the sole purpose to bring up the start page. Just linking the logo to the start page may be sufficient and you don’t want to clutter up your menu with an additional item (or you are running out of menu space).

The solution to not having a menu item corresponding to the start page is to simply create a hidden menu, for example "hiddenmenu". Do not publish a module for it. Place the menu item that brings up the start page in this hidden menu. Done!

By the way, linking your logo to the start page can be done in the template html-file by something like this: 

<a href="<?php echo $this->baseurl; ?>"><div id="logo"></div></a>

 

 

Check if a file is open by another process in PHP (Linux/UNIX)

The PHP flock() function is good when the file locking method is used the same way by all programs that will lock the file.

However, you can’t check if any process in the system is actually using the file or not. If you for example are monitoring an incoming ftp folder, you don’t want to start processing a file until the file is completely tranferred (i.e. wait until the ftp daemon is no longer having the file open).

The following code illustrates how the command lsof can be used for the purpose: 

<?php
$filename = "locktest.txt";
$directory = ".";
while (1) {
        $result = exec("lsof +D $directory | grep -c -i $filename");
        if ($result == "0") {
                echo "$directory/$filename is NOT open ($result)\n";
        } else {
                echo "$directory/$filename IS OPEN ($result)\n";
        }
        sleep(1);
};
?>

 

Brain mouse for the brainiac

BrainmouseThis is a cool mouse from emmys.dk for all of you brainiacs. If not for yourself, maybe as a gift for your nerd friend.

They also have some funny female shaped mouses, which you of course has no need for as a cool nerd. Everybody knows that nerd is the new sexy and women stand in line to get one of their own (a nerd that is, not the mouses I’ve mentioned :)).