C++

Programming Error – Incorrect Array Declaration

In C++, we can declare an array by using the new operator: char *p = new char[50]; // dynamically allocate an array of 50 char This is useful in functions when we don’t know in advance how large the array should be or if we want to allocate the array in the heap instead of […]

C

Preprocessor – The Token Pasting (##) Operator

This is probably the least understood and most poorly documented preprocessor operator. The token pasting (##) operator simply eliminates any white space around it and concatenates (joins together) the non-whitespace characters together. It can only be used in a macro definition. It is used to create new tokens. It may not be the first or […]

Writing

Why Writing is Hard

“There’s nothing to writing. All you do is sit down at a typewriter and open a vein.” ~Walter Wellesley “Red” Smith “Writing is easy: All you do is sit staring at a blank sheet of paper until drops of blood form on your forehead.” ~Gene Fowler Pretty much anyone who has ever sat down to […]

Mathematics

Proving the Pythagorean Theorem

We learned the Pythagorean Theorem in grade school: The square of the length of the hypotenuse is equal to the sum of the squares of the other two sides. Often written as A2 + B2= C2. The Pythagorean Theorem is much more than just a mathematical curiosity, it is a basic and useful mathematical property […]

Mathematics

Understanding the Distance Equation (Formula)

If you want to find the distance between two points, the length of a line, or the magnitude of a vector then you use the distance formula, which usually looks something like this: This is just the Pythagorean Theorem, slightly rearranged. The solution to this problem shows how (with a few steps) it is possible […]

WordPress

How to Install WordPress into a Folder Other than \wordpress under XAMPP

These instructions are for WordPress version 3.1, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.2.0, and 3.2.1 into a folder other than \wordpress under XAMPP 1.7.3 running on Windows XP with Service Pack 3 installed. You may want to install into a different folder for various reasons, the two most common being: (1) you want to have multiple […]

Blog

An Easy Way to Fragment Your Hard Drive

Following on yesterdays blog post on A Faster Way To Defragment Your Hard Drive, I decided to blog on an easy way to fragment your hard drive – although, this is usually not what we intend to do. After a while, our hard drives tend to fill up with (mostly junk), and we get a […]

Blog

A Faster Way to Defragment Your Hard Drive

File fragmentation is, pretty much, a fact of life. You can run utilities like Windows Disk Defragmenter or Piriform‘s Defraggler (which lets you defrag just a single file instead of the whole disk), but they are slow – even if left running overnight, they often don’t finish on heavily fragmented drives (at least on my […]

Joomla

Installing the Movable Type API Plugin for Joomla! 1.6

This installation procedure is for Movable Type XML-RPC 1.0.0 for Joomla! version 1.6.x. It is likely the same for other version combinations, but there is no guarantee. Joomla! 1.6 is now obsolete. Joomla.org will continue to provide support for 1.6 until 19-August-2011. I have not tested these instructions with Joomla! 1.7 (and will not until […]

Web Tools

How to Change the Apache Port in XAMPP

These instructions are for XAMPP 1.7.3 running on Windows XP. They should be similar for other configuration combinations, but no guarantee is made. These instructions should also work for an Apache Server install that is not part of a XAMPP install (specific details regarding file locations and restarting of the Apache Server will differ). NOTE: […]

Blog

Estimating Your Web Host's Limits

Many low cost web hosts advertise “unlimited bandwidth”, “unlimited storage”, etc … Of course, it is not unlimited. If you read the terms of service, you will find some definitions or rules setting out “reasonable” use. For the typical website the average user or small business is going to set up – these are more […]

Joomla

How to Turn Off 'display_errors' in XAMPP

If you are here because: (1) when you try to run Joomla 1.5.x, 1.6.x, or 1.7.x under XAMPP 1.7.4 or 1.7.7 you get lots of errors like Strict Standards: Accessing static property JCache … or (2) you are running a popular PHP application and gettings errors when installing or running it out-of-the-box then see this […]