Below are snippets for psykoprogrammer.
6
Below is a function written in ColdFusion MX that will return an array containing all matches found when running a regex against a particular string. Each array item is a structure with the match, the starting character position, the ending character position, and an array of any
sub-pattern captures.
sub-pattern captures.
16
A simple AJAX class. The code for the class is provided as well as example HTML and PHP code for usage.
9
Below is a bit of code which sets up drag and drop in a treeview. This is handy for if you have a list of items that can be sorted by the user.
Here is a bit of code to demonstrate how to do this. First create a new Windows executable project. Drop a TreeView component on the form, and let's name it 'myTree' for this demonstration. Go ahead and populate it with some dummy data; enough data to see the dragging and dropping in action. You will need a variable global to the form's scope.
private TreeNode sourceNode;
This is used to track the item we are dragging in our TreeView. Then define the event handlers listed below.
Here is a bit of code to demonstrate how to do this. First create a new Windows executable project. Drop a TreeView component on the form, and let's name it 'myTree' for this demonstration. Go ahead and populate it with some dummy data; enough data to see the dragging and dropping in action. You will need a variable global to the form's scope.
private TreeNode sourceNode;
This is used to track the item we are dragging in our TreeView. Then define the event handlers listed below.
10
A small example demonstrating inheritance in Javascript, complete with calling base class constructors and methods. For the more detailed description, visit http://www.adampresley.com.









