Defensive Programming Techniques

This source code is from Thinking in C++, 2nd Edition, Volume 2, by Bruce Eckel & Chuck Allison. You can use Borland, G++ (For version 3 and above only), Microsoft (For C++ with .NET only) to compile and build this source code. Writing perfect software may be a daunting task for developers, but a few defensive techniques which are routinely applied can go a long way toward narrowing the gap between code and ideal. Defensive programming practices are often used where high availability of the application is required, safety if utmost concern, or security is needed for application to work.

Inverts the case of the selected text

This is a visual basic 6.0 source code that inverts the case of the selected text. If the upper case text is selected then it will convert it into lower case text. Otherwise to upper case. 123456789101112131415161718192021222324252627...

wav sound player class

This is a visual basic 6.0 wav sound player class that plays any selected sound file in .wav format. It has the filename property to select the file and play property to play the sound file. 123456789101112131415161718192021222324252627282930313233343536...

256-bit Serpent VB Implementation

This is a slow but working Visual Basic implementation of the 256-bit Serpent algorithm. Serpent was a finalist for Advanced Encryption Standard (AES) and appears to be a very secure powerful algorithm. The Advanced Encryption Standard, or AES, is a symmetric block cipher chosen by the U.S. government for the encryption of classified electronic data and is implemented in software and hardware throughout the world to encrypt sensitive data.

BASE 85 Encoding VB Class

This is a BASE85 Encoding Visual Basic class that expands the text to be encoded by 4:5 i.e. uses 5 ASCII characters to represent 4 bytes with 80% accuracy. Used in Postscript and PDF documents. Useful if binary data needs to be persisted in ASCII text.

Count the characters in a specified string

This is a visual basic 6.0 source code to count the characters in a specified string. This function can be useful in Text editors or where you want to tell the user that how much characters have been inputted in the text field. You can also define which characters to...

Counts the number of words in a specified string

This is a visual basic 6.0 source code that counts the number of words in a specified string. This function can be useful in Text editors or where you want to tell the user that how much words have been inputted in the text field....

Export all the slides from a powerpoint presentation

This is a very simple Visual Basic source code to export all the slides from a powerpoint presentation. This source code can export images in any specified image format like .jpg, .bmp or .gif. I wrote this function while I was working on my undergraduate project...

Block a Specified IP address in ASP

This is a very simple programme that demonstrate how to block specified IP addresses from accessing the website or webpages. In this code I used array to store the IP adresses but database can also be used to store the IP adresses. You can redirect the user to a...

Print pyramids and diamonds in C Language

I have been receiving a lot of emails and requests through the forums and inline forums attached to the tutorials on my website C and C++ Programming Resources about how to print pyramids and diamonds in different formats using C program. This article demonstrates how...