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:

Network connections

This morning I was attacked by a robot. I quickly noticed that my websites were slow and saw a pretty large amount of traffic on port 80: 208 connections!

tcp        0      0 192.168.1.1:80          109.230.213.100:65413   ESTABLISHED
tcp      441      0 192.168.1.1:80          109.230.213.100:65445   ESTABLISHED
tcp        0      0 192.168.1.1:80          109.230.213.100:65071   TIME_WAIT 
tcp        0      0 192.168.1.1:80          109.230.213.100:65279   TIME_WAIT 
tcp      497      0 192.168.1.1:80          109.230.213.100:49326   ESTABLISHED
tcp ...

Today I discovered that I couldn't include the QDebug header file at the time I need it.

When I write in C/C++ I like to add my test libraries at the point where I'm writing the debug function I'm working on so that way I can delete it all at once.

So the skeleton of a file would look something like this:

Comment (copyright/purpose of file)

#include of all headers necessary

code

#include of debug headers

debug code

However, today I had problems compiling and/or linking doing so. The qDebug() << ... expressions did not want to work.

Moving the #include of debug headers to

I create this page to talk about the work I've done to create a small Flash animation (under 1Kb) used to play a stream of audio (most specifically, from the radio Hotmix 106.)

Ubuntu Installation

In the last few days, I've been testing SquirrelMail. It's neat. Really ugly, but neat as it is very small and still quite functional.

To install on Ubuntu, just use apt-get install as in:

apt-get install squirrelmail

The available plugins as of Ubuntu 10.04:

  squirrelmail-compatibility - SquirrelMail plugin: Let other plugins work with older/newer SM versions
  squirrelmail-decode - SquirrelMail support for decoding exotic character sets
  squirrelmail-locales - Translations for the SquirrelMail Webmail package
  squirrelmail-lockout - SquirrelMail plugin:

Of Note: This only applies to C99, not C++.

I learned something quite interesting today and wanted to keep a note of it.

Whenever I use a printf() with a format such as %ld and try to compile my code on "many" different platforms, I often get warnings on another one.

The fact is that an int, a long, a long long, an int32_t, int64_t all use a different combination depending on your platform and whether you're running in 32 or 64 bit.

So, the answer to this problem are the #define found in the inttypes.h header file:

PRId8
PRId16
PRId32
PRId64

These entries are used after

I have been wondering why gcc adds so many nop instruction in the binary code of my 64 bit programs.

The fact is that code is expected to run faster if properly aligned.

How's that?

A nop instruction does nothing, by definition: No OPeration.

On amd64, the CPU instruction cache (called L1) works by loading 16 bytes at once in the processor decoder. So if you can align your code to a 16 byte boundary, all the better. That way the instructions part of these 16 bytes will be executed at once. When you jump to a non-boundary area, the processor only executes what is left (i.e. say you jump ...

Today I unearthed an old hard drive with Windows XP on it. After a few hours twiddling I finally got the wireless to work on it... although even before that, the svchost application would make use of 99%+ of the processing time.

With just the default System Manager it's hard to find out what really takes time, so I downloaded procexp.exe from the Windows website (DON'T DOWNLOAD A VERSION FROM ANYWHERE ELSE!) and that showed me the tree and thus which tool was using all the processor time.

Surprise! Surprise!

The problem was the automatic windows update. (the

Server Memory Upgrade

I got some new memory for my GA-P55A-UD4P motherboard. It is supposed to support 16Gb of RAM: sweet!!!

So, I got some Kingston which in general the Gigabyte motherboards support. (I had some before.)

I turned off the server and then the powersupply1.

I remove the 2 x 2Gb of RAM and install the new 4 x 4Gb sticks. Make sure it's well sited multiple ...

  • 1. I have one of those power supply you can turn off, there is a switch on it... Without doing so, I can still see some lights on the network connectors meaning that electricity is still running in the machine!

I had a problem for the last 2 days and had a hard time to determine what it was...

Now I know how to resolve such a problem, so I wanted to share my finding! It's very simple, but writing about it here may help me later to save time...

So... I wrote a C++ class for a DLL, this means I want it's public functions to be exported:

class MY_CLASS_API myClass {
public:
    ... // declarations and functions
};

Up to here, nothing strange.

The MY_CLASS_API is a macro defined in some random header file:

#if defined(MSWINDOWS)
#  if MY_CLASS_EXPORTS
#    define MY_CLASS_API

Problem

A few days ago, I made many updates in one of the MS-Access forms I'm working on.

Then, when I tried to open the form I'd get this error...

The Expression On Load you entered as the event property setting produced the following error: User-defined type not defined

This doesn't mean anything to me since I did not define any type... Removing the Form_Load function (commenting it out) made that very error go away, however, since that's the sub-form of another form, it still generates errors when the main form is trying to initialize the sub-form.

Note that it ...

Unfreeze your Mouse when it Froze

Thank you for visiting my website.