Code Snippets Submitted by Andery Smith


This function takes in two strings (value,key) and uses XOR encryption to encrypt (and decrypt) the value using the key. it returns the encrypted value as a C++ string. by John Shao

13 November, 2012   

Creating and maintaining an effective JavaScript toolbox can greatly reduce development time. This script will show you how to include specific snippet modules on individual pages.

C++ source code for a portable card deck class with shuffling

27 May, 2014   

PL/SQL Code for a searched CASE statement

28 May, 2012   

How to add days to NSDate

Create in dbgrid one column and insert the caption "RecNo" or other in title property. In dbgrid onDrawColumnCell event insert the following code:

This snippet shows how to add treenode's to a treeview control. It also shows how to add sub nodes.

This Delphi code example shown how to add and remove a shell extension

12 July, 2014   

This block finds all employees whose monthly wages (salary plus commission) are higher than $2000.

This code is useful for multi environment setups (staging, production, etc.) it allows you to keep your htaccess files in sync while maintaining an htpasswd on your development environment or anything but the live environment.

21 July, 2012   

VB.NET Code for Auto Scrolling Controls

MS SQL triggers for automatic Create and LastModified Dates

22 September, 2012   

Allows you to take a user to the previous page they were on using a button

09 October, 2011   

This code shows how to backup a table to a CSV file.

05 July, 2012   

Backup MySQL Database to SQL File with mysqldump

06 July, 2013   

Converts a bitmap into an extended meta file object.

24 June, 2014   

For downloading very large files (10 meg or more), split the file into chunks when sending.

This example code calculates the ratio between the X and Y columns of the RATIO table.

Python has no equivalent to Java's "super" keyword (so that some part of a method can be delegated to the superclass), but it's easy to get similar convenience despite Python's multiple-inheritance generality.

08 August, 2012   

Code for capturing the requested URI