The Linux Page

Help other users realize that everything is possible, especially avoiding Windows for their own personal use.

Welcome to The Linux Page


Fox Trot by Bill Amend. Click to enlarge.
Click to enlarge

This site is a collection of my own work with Linux. Certain things are easy, others take time to decipher and if I ever need to repeat the work (which usually happens!), then I need to remember everything by memory or... have a site with all the steps taken and to take again.

The following are my most recent posts:

Problem

I have to use Qt these days. It's a good system, but there are a few tricks to know about.

As I was starting to write a test, the test needed a lot of numbers but nothing much otherwise. So I decided to limit the #include to a minimum by deleting all of those that I did not need.

The result was this error:

"Cannot create a QWidget when no GUI is being used"

I looked into it and sure enough people talking about it say: Well... where is your GUI?

Great, but I don't see how that helps me in fixing the problem, does it do it for you? Neither?!

Solution

...

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

Connection problem with Shredder

Today I got a little surprised by Shredder (the base used to build Thunderbird.)

Somehow, the certificates for my mail server had reached maturation (i.e. it was showing an end date as of today.)

On each connection to the server I would get the following error:

<name>: uses an invalid security certificate
The certificate is not trusted because it is self signed.
(Error code: sec_error_ca_cert_invalid)

Interestingly enough, I search on this error and mainly found things about FireFox and SeaMonkey instead of Thunderbird (and nothing about

Today I found a table describing the keystrokes you can use to generate different letters in another language than the bare ASCII set used in the US. For example, it is nice to use "à" in French whenever necessary because "à" (a preposition) has nothing to do with "a" (a conjugated verb).

Microsoft includes that feature for most of their software. It may not work in all software, although you can always open wordpad and then copy and paste the output. (Notepad is not enough, it does not support UTF-8 or Unicode too well.)

...

Somehow I receive many weird requests from one of Googlebot's. These use some very strange HTTP header, if I can even call that a header! modsecurity blocks all of them at once, but it just seems very strange since it has nothing to do with HTTP.

The two requests I have seen go like this:

0x16 0x03 0x01

0x80 0x2B 0x03 0x01

As you can see I show you the hexadecimal codes because these are controls!!! (Ctrl-V, Ctrl-C, Ctrl-A in the first request, and PAD, +, Ctrl-C, Ctrl-A)

I just have no idea what that is. I'm glad that modsecurity kicks those request out, but I'm wondering why am I

I got a problem with Qt that took me a whole day to fix!

I created a widget with many children. At first I used the QVBoxLayout and QHBoxLayout to lay out the child buttons in a grid like layout without paying much attention to the details. This was not too bad except that somehow the system picked up the smallest possible size for each button. Once I put a minimum size, it was better, but still not giving me much control in comparison to the specification for my project.

So at that point I looked around to learn how to create your own layout. Got the idea to look at the existing layout

I've been using Drupal for a while and only now started to notice a problem with the cache of JavaScript code. In general, I don't cache the JS since they are not dynamic files. But we do that with Snap!.

The Apache mime module offers two options: AddType and AddEncoding

Both options are used in a similar way meaning that both react on file extensions. When a match is found, the corresponding MIME type or content encoding is attached to the content being sent.

If you install the MIME module, it will attempt encode data properly for the most general case, but not all cases. That is, it does

The following is a list of points one wants to follow in order to create a log in form and the necessary code in the backend.

Generate a secure Log In form (session id)

Each time you create a Log In form (or any form if that matters,) you should include a hidden session identifier in it. This will help you prevent users from posting to your server without first loading the form. This alone already prevents a large number of robots from flooding your server with totally useless POST commands1

  • 1. If you know why they do that, let me know because there is really no reason to send totally ...

To avoid recreating the same styles and title, summary pages over and over again one wants to create a template file. These are called <name>.dot where dot means document template.

To create a .dot just create a regular .doc file and then when saving it, change the extension to .dot. Nothing complicated here.

Now, if you are with a large company, the template file would be saved in a folder where Microsoft Office can find it automatically so when you say New you can then choose your template, it has to be placed here:

    C:\Users\<name>\AppData\Roaming\Microsoft\Templates

On MS-Windows, you get really strange errors and at times some of those errors are difficult to fix.

Sams Teach Yourself C++The error 0xC0150002 means that a DLL could not be loaded and thus the software could not get started since a piece of it was missing. The only solution is to "close the application" (since it wasn't really started, closing it sounds a bit funny here.)

There are several ways to find out about the problem. In Visual Studio, the output should tell you what is happening and that a library could not be loaded. However, many times, low level libraries will not be displayed in the ...

Unfreeze your Mouse when it Froze

Thank you for visiting my website.