The Linux Page

restore

Recover name of message registered with RegisterWindowMessage()

Today I was confronted with an error in a process that would run in the background and slowly fill up the Windows message queue when it should have been dormant.

I looked at the messages that were being processed once the process woke up and the message number was 0xC10C or so. Nothing in the software has such a number. So I looked around and found out that the message was one of those created using the RegisterWindowMessage() function. (This is wrong in that application since the messages are never used from external applications, but oh well... that does not change the basic problem.)

So, ...

Copying a PostgreSQL database from one computer to another

When moving a database from one computer to another, you've got to copy all the data.

For PostgreSQL, there is a pair of functions named pg_dump and pg_restore.

In most cases that works great, however, some systems may create things such as additional functions that will NOT make it across. I do not know how to get that to work (and maybe it works in newer version of PostgreSQL?)

In any event, in most cases the following commands are enough (I used them with Drupal websites and since they stopped using some of the definitions they have in the system.install file used on initialization, ...

Your Bookmarks are auto-backed up in SeaMonkey! (and maybe FireFox?)

I started the stock SeaMonkey browser by mistake as my Unity icons disappeared (i.e. seamonkey as is on my command line started /usr/bin/seamonkey which is not the correct version!) This had several bad side effects. For of all, it destroyed my bookmarks (argh!) and then it decided to install the 64bit Flash plugin. That did not work well since the version I like is a 32bit version.

Once I had the correct version started again, each time it was trying to open a Flash animation, it would be "stuck" for a few minutes, until I tried to open a page with a movie in a Flash shell. That ...

Restore Firefox warnings when viewing non-secure data on a secure page

One thing that I quickly do on my browsers is turn off warnings about non-secure data when browsing secure pages (with HTTPS .)

It's rarely a problem and with all those features you like to have (Facebook, Twitter, AddThis, ShareThis, Google Plus, and othe fun widgets...) it's hard to avoid. Actually, many times the problem lies in one of these scripts and thus you cannot just fix your website. Without that 3rd party script owner fixing their code, it just won't work at all.

Now, once in a while I work on a customer website and they really want to have a 100% clean slate. Thus,

pg_upgradecluster to move clusters between versions

Until now, I only had to upgrade my PostgreSQL databases between computers so I would pg_dump + pg_restore the databases.

However, PostgreSQL offers a tool named pg_upgradecluster that does that work for you, plus it will copy all the different things that pg_dump doesn't always catch such as functions, existing users, etc.

This sounds all good...

So I ran it against our cluster of 298 databases and got a little surprise: it takes about 10 minutes to run on one database, whatever its size. Yes! 10 minutes. Our big database has over 1 million rows, the smallest have a few hundred. Impressive

I put that radio button in the wrong Option Group, MS-Access

It happens all the time. You create two or three option groups and start adding radio buttons.

Then you write some VBA code attached to each button and/or their option group.

And at some point in the development you notice that one was put in the wrong option group.

Just deleting the option and creating a new one is not a good option because then you have to make totally sure you have the right setup and that can take some time to review.

Instead, you can move a radio button from one option group to another by following these steps:

Top Secret

This page is a test page of the Menu per Role module for Drupal (Yes. This site is a Drupal site, did not guess yet?!) The module controls whether a menu entry should be shown to a given set of customer without having to change the permissions of the destination. This is particularly useful whenever the destination is not a node.

As of Dec 2008, I'm the maintainer so I needed a place to test the module. Here it is.

You will need to be registered and logged in to see the corresponding menu item in the drop down. Good luck.

And the following is a node with comments that I use to test the ...

External Links

Use at your own risk! These are links to other pages outside of this website:

Copying a partition

Copying an entire partition to another when both are not of the exact same size (in blocks) can be tricky, especially if that partition includes special files such as /dev/hda and FIFOs.1

Yet, there are several ways to do so:

  • 1. Note that was the case especially in the 90's. As of today, things have come a long way and there are command line options one can use with the cp and tar instructions to copy pretty much anything. You will still have problems with some files such as locks, though. But you should not have to copy them!

X11 failing without errors...

I got a bad one today with Debian which took me an extra hour (at least) to find out.

It can happen to you and that's why I'm writing this page:

X11 starts and quits right away without any error — I had some errors about the system not being able to load some modules, I removed them by fixing my XFree86 configuration file. Really, there was no errors.

Ha! But there was ONE error. 

Syndicate content Syndicate content

SMS From Me Logo

SMS From Me

To automatically start one on one conversations with your online leads.

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • HTTPS

    Hyper Text Transfer Protocol Secure—The protocol used by browsers to communicate to web servers securely. The security is done with similarly to SSH. The transfer uses FTP like commands, but only one connection. Since HTTP 1.1 it is also possible to reuse the same connection for multiple files (pages, images, videos, etc.)

  • g++
    C++ compiler from the GNU compiler suite. Compliant as much as possible to the C++ standard. Includes support of a complete standard library (STL).
  • installation
  • msdn

    Microsoft Developer Network, a website, many documentations, all for developers on Microsoft Windows.

  • strong