Solving Firebug’s “Unable to show styles”

November 8, 2009

I recently installed Firebug to debug some CSS problems, but the only CSS information I got was the message “Unable to show styles”. The link in the message to the FAQ was not very helpful, either.

Fortunately, this post by Ingo was, as it solved this problem.

The problem is caused by a couple of ancient files under the Mozilla Firefox directory belonging to an ancient version of DOM Inspector, which seem to have remained there since the earliest version 1.0x of Firefox, and are easily identifiable by the file date (in my case, the year 2005).

To solve the problem, uninstall Firebug, remove the offending files, restart Firefox and reinstall Firebug.

The files are:

components.ini
defaults.ini
chrome\inspector.jar
chrome\pipnss.jar
components\inspector.dll
components\inspector.xpt
components\inspector-cmdline.js
defaults\pref\inspector.js
extensions\Extensions.rdf
extensions\installed-extensions-processed.txt
res\platform-forms.css
res\builtin\platformHTMLBindings.xml
res\inspector\search-registry.rdf
res\inspector\viewer-registry.rdf

(list taken from above link, but as I said, you find the outdated files by their age)


Comfort Zones

August 10, 2009

Bjarne Stroustrup says in a recent interview with devx (on page 2):

I object to the “Joe Coder” moniker. At best, it is patronizing. Realistically we are all “Joe Coder” outside our little comfort zones. Modern software is far too complex for a single person to be more than a novice in most aspects. I’m “Joe Coder” most of the time, and so are you.

How true!

Looking back, my “comfort zones” have been so far (in chronological order):

  • Basic (Spectrum, QL)
  • Turbo Pascal
  • dBase/Clipper
  • Delphi (for a looong time)
  • ASP+VBScript
  • ASP.Net+C#+TSQL (current)

(TSQL took me quite some time to feel comfortable, and it really is not as comfortable as C#)

150th post, so nothing technical today ;)


Notepad++ not shown in Explorer context menu

July 18, 2009

I recently installed Notepad++ on 2 PCs, and noticed that on one of them the “Edit with Notepad++” context menu entry was missing in Explorer.

After some digging I found that Notepad++ and SciTE register the same CLSID under

HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers.

Steps to register Notepad++ in the context menu:

  • Uninstall SciTE
  • Re-install Notepad++
  • Kill and restart explorer.exe from Task Manager (or reboot)

Works ;)


7zip has no Move command?

May 18, 2009

I just found that 7-zip, which is a great zipping tool with command line support, does not have a Move command. Never had, still hasn’t.

The semantics of Move should be: Add to archive, and Delete from filesystem if successfully added.

From this description it’s obvious that it’s close to impossible to achieve this functionality in a batch file.

Is there an online petition page for stuff like this? :)


Tools and Libraries for .Net Developers

May 14, 2009

Recovering Ubuntu 8.04 LTS from Failed Harddisk

April 30, 2009

You may have noticed that the web server hosting my homepage and download site has been down since the weekend. I noticed problems when the sites responded to request with MySQL errors.

Running fsck returned the message “Bad magic number in super-block” which means that e2fsck cannot completely repair the disk. It turned out that the partition table had been destroyed, but mke2fs -n still found some superblocks.

Started up the PC with a Knoppix Live CD to repair the broken disk.

In couple of forums I found the utility TestDisk which re-creates lost partitions, and it both recovered the boot and the swap partition. However, e2fsck still failed with the messages:

Attempt to read block from filesystem resulted in short read
Attempt to read block from filesystem resulted in short read
reading journal superblock
Attempt to read block from filesystem resulted in short read
while checking ext3 journal

It was now clear that the harddisk could not be repaired, so I got a new one and copied the original harddisk with a program called Ddrescue.

Ddrescue is a great tool (documentation), as it copies one device onto another, displaying the number of read errors and the size of the erroneous blocks. The amazing thing (if you don’t know how it works) is that the error size *reduces* after the first full scan of the source disk. The initial 2.5GB of unreadable disk finally reduced to about 15MB.

After ddrescue was finished, I ran another fsck on the new disk, this time successfully. Time to reboot.

Reboot brought a black screen, with “1234F” the only thing displayed. It turned out that that was the remainder of the TestDisk MBR which could not find a bootable partition. Need to get GRUB back.

The Knoppix disk would not help me now (disks are named /dev/hda instead of /dev/sda), but fortunately I had a Ubuntu 8.10 Desktop disk already which also offers a Live functionality.

Booted Ubuntu CD, and restored GRUB as sketched in this forum thread:

sudo grub
find /boot/grub/stage1
root (hd0,0)
setup (hd0)

Now at least GRUB was booting, but it also served me the next error message:

Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)

If tried to understand GRUB and the disk UUIDs mentioned in menu.lst, when I guessed that the problem was caused by a broken initrd.img.

I backed up the original initrd.img-2.6.24-16-server and copied the initrd.img-2.6.24-16-server.bak to the original name. And it worked!

As far as I can tell, the machine is back online and fully functioning again. But it was quite a trip ;)


50.000 Views

April 21, 2009

Dear reader,

Thank you for visiting this blog 50.000 times since my first post.

Thank you for downloading dbscript nearly 300 times since November 08.

Thank you for downloading my utilities graspx and automssqlbackup more than 100 times.

;)


Recovering defective DVDs

August 14, 2008

I recently noticed that some DVD players refuse to play a DVD if part of a recording of it is unreadable (even though you wanted to watch a different recording on the same disc).

Time to check DVD quality: Nero CD-DVD Speed provides scanning and testing functionality, but does not help you in recovering partially damaged files.

I found this blog entry on recovering data files from defective discs, which lists a couple of solutions: Unstoppable Copier, CDCheck, and IsoBuster.

I tried IsoBuster, and as it comes with a zillion options, so I trusted the default values. Once it hit an unreadable sector, it asked whether to replace the sector with zeros or random data, and optionally applies your answer to any subsequent defective sector. I selected zeros, and hope that DVD players are clever enough to handle the zero parts.


Minimalistic Word Processing

January 7, 2008

If you think that your current word processing application is too bloated, too feature-laden, too distracting from the actual task of creating text, why not try some alternatives: Read the rest of this entry »