The Freeware
Nugget Mine
Site Map Feedback

This is where little applications that are made to solve quick problems get shared in case they may also be useful to other people.

Atomic Clock Synchronisation

Use Atomic Clocks!

If your PC is connected to the internet you can use Atomic Clocks to synchronise your PCs clock over the internet for free! For System Administrators this can be great on your file servers. Every 24 hours (if you leave the program running) it will re-synchronise your clock (so make sure you have an internet connection that hangs up automatically) if you pay call charges!

Here's the C++ source code as an MSVC++ Project: (it demonstrates the usage of Atomic.h.)

Directory Tree Copier

This is very similar to the functionality of the DOS command XCOPY /T/S/E.
The idea is that you have a directory tree full of files and you want to recreate the directory tree without the files in it.
This application allows you to do this on unconnected computers (providing both have a floppy disk drive or other similar media exchange capability).
All it does is make a batch file which is a list of Make Directory (MD) commands.
So you can run CopyTree in the root folder that you wish to copy, then copy the batch file to the computer where you want to recreate the directory tree.
Run the batch file and the duplicate tree gets created: easy!

Here's the C++ source code as an MSVC++ Project: (it demonstrates the usage of DTree.h.)

Quick and Dirty on-line Gallery

Simply put Gallery.exe in the top Directory that you want to share and run it. It will create a file called Gallery.htm in that Directory and each sub-Directory which will show the pictures in that Directory and links to any sub-Directories. If you add or remove images, just re-run Gallery.exe and it will re-create the Gallery.htm files. You only need a link to the top Gallery.htm file, you can access the rest from there. The pages show the images at 200 pixels high. Clicking a picture opens the normal sized picture. The following types are recognised: .gif .jpg .jpeg .png .bmp .swf

Here's the C++ source code as an MSVC++ Project: (it demonstrates the usage of DTree.h.)

Colour Wheel

This program allows you to choose colours which should mix together well (with the exception of monochromatic colours (grey)). You can enter Web-style hexadecimal numbers, or RGB or HSL values. Colour Space convertion is such a simple thing to want to do and yet is presented inacurately or incompletely everywhere. This code converts between RGB colours and HSL (Sometimes called HLS) where the RGB components are BYTE values. The gColor class provides HSL and HSV conversion as well, but holds the RGBA components as doubles.

Colours are specified on computers in terms of the intensity of each of the electron guns in the monitor. There are three guns, one Red, one Green and one Blue (ultimately this means there are just different coloured dots which is what you get on an LCD screen). The human eye can only perceive 256 levels of intensity, so a Byte is sufficient to store the intensity value. Unfortunately, when you want to describe a colour it's not very easy to do accurately using RGB. The HSL Colour Space is supposed to be easier.

H is the Hue or colour; S is the Saturation and L is the Lightness (Luminescence).
The ranges are supposed to be:
0-360 for Hue (degrees) - Red being at 0
0-240 for Saturation and Lightness...
H is undefined when S=0;
The Colour Selector in Microsoft Windows, rewrites the standards (anyone surprised?) and uses:
0-239 for Hue
0-240 for Saturation and Lightness...
H is 160 when S=0;

This program reproduces the conversion the Microsoft way.

Here's the C++ source code as an MSVC++ Project: (it demonstrates the usage of HSL.h.)

Picture File Automatic Namer

Many people have large collections of pictures, either from their Digital Camera; downloaded Porn; Clipart they'll never use etc. If you create a well thought out directory tree structure you can keep similar pictures together and find them more quickly. Most pictures in large collections have senseless names and if you mix collections of pictures the names become utterly meaningless. This application brings order to the chaos. It works its way through a directory tree; in each directory it renames all the files so that they have the same name as the directory they are in, with a three digit number appended. It does this very intelligently. The following Picture files are effected:

As an example: if you have a directory: C:\Pictures\Home\Family\Holidays\Newquay\Aug97\BeachParty and this folder contains files:
MSX-0724.jpg MSX-0753.jpg Cave.bmp Pool.bmp If you run Name.exe and it touches this folder, it will create entries in its output batch file to rename the files to:
BeachParty001.jpg BeachParty002.jpg BeachParty001.bmp BeachParty002.bmp Note that it doesn't actually rename anything, it just creates a batch file called Name.bat (which it automatically opens for editing when it's finished scanning the tree).
Once you have edited the batch file you must run it to rename the files.

If you then deleted BeachParty001.jpg and added:
MSX-0766.jpg MSX-0772.jpg When you run Name.exe again it will create entries in its output batch file to rename the files (respectively) to:
BeachParty001.jpg BeachParty003.jpg

So it fills in spaces in the numbers but never changes the number of a correctly formatted file name. This lets you (and any picture databases you have) remember that 'BeachParty002.bmp is the one in the Pool' safe in the knowledge that its name won't change. Unfortunately it doesn't Help you to remember... It just won't shuffle pictures it's already dealt with.

Here's the C++ source code as an MSVC++ Project (it demonstrates some complex things, hopefully gracefully): (it uses DTree.h, TreeList.h and CList.h.)

Zeroed File Finder

Some viruses overwrite the data in files with zeros (so the file isn't deleted and the size doesn't change, but the data is lost). One of the simplest demonstrations of how to use the DTree class is this application. When you run this application it looks in the current directory and all subdirectories for files filled with zeros. It creates a list of the paths to any zeroed files it find in a file called Zeroed.txt which you could edit into a batch file to move or delete the files later. Files which are in use are ignored (if someone's using a file it isn't zeroed (unless that someone is the virus)! it's been used on large networks with great success.

Here's the C++ source code as an MSVC++ Project: (it demonstrates the usage of DTree.h.)