Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Visual Basic > Algorithms

Algorithms

1-20 of 380     Previous     Next
Adding Workdays to a Date
by Chad Juliano
To calculate a future or past date taking only working days into account, use this handy function.
Algorithm to Switch Between RGB and HSB Color Values
by Duc Nguyen
Changing between RGB and HSB color values is easy using this algorithm.
Finding Modulus of a Very Large Number with a Normal Number
by Sameer Palande
Divide the number into smaller numbers, then find the remainders of these smaller numbers. Add up the remainders and repeat the process. As long as the remainders are retained, the final answer wont change.
Converting Numbers to Column Names in Excel 2007
by John P.
While converting to Excel 2007, I had to update the column number to string code in my program to handle columns of 703 and above (AAA). I found Yassine Moe's code and "simplified" it. This tip shows the results.
Reverse a Numeric Value Without Using String Utilities in Java
by Elayaraja David
Find out how to use the NumberReverse to reverse a given number without using string utilities.
Convert Numbers to Excel Column Names
by Yassine Moe
This algorithm converts column numbers (1-x) to Excel column names.
The Remove_if() Algorithm
by Alan Reynolds
It's easy to fall into the trap of thinking that the remove_if() algorithm moves the items that you wish to be deleted to the end of the vector prior to erasure. A number of Web pages also give this impression. Don't believe them!
Retrieving Only Unique Elements from Two Sets
by Mykola Rozhok
This algorithm helps you to retrieve all the elements contained in the first set (set1), but not in the second (set2).
Incrementing Iterators
by Wael Salman
You can use iterators for a STL set object to loop through the set elements 1 by 1. But did you know you can also increment the iterator by more than 1?
The reverse() Algorithm
by Saurabh Ramya
Find out how to use the reverse() algorithm to reverse the order of elements in any sequence container.
The generate() Algorithm
by Saurabh Ramya
Learn how to use the generate() algorithm to fill up a sequence container with values that you generate by repeatedly calling a function.
Using the count_if() Algorithm
by Saurabh Ramya
You can use the count_if() algorithm to count the number of elements in a container based on any condition.
Using Insert Iterators
by Saurabh Ramya
Insert iterators come in very handy when you need to populate a container using an STL algorithm which uses an assignment operator to fill in the data.
Using STL Binders
by Saurabh Ramya
Learn how to use STL binders to use binary function objects as unary function objects in many STL algorithms which need them.
Favor the Function Object to the Function Pointer in STL Algorithms
by Saurabh Ramya
Many of the STL algorithms have two versions, with one version taking one less parameter than what the second version takes. Learn the difference between the function pointer and the function object and why one is more effective than the other.
Hierarchical Tree Structures in Database Tables
by Rohit K. Gupta
This recursive function retrieves a hierarchical tree structure from a table with just four columns that describe each node in the tree: Level (the depth of the node in the tree), ID, Name, and ParentID. Given an ID and a Level, the function opens a cursor and retrieves the entire branch of the tree for the specified node at that level.
Algorithms: A Linear Search
by Wael Salman
Use the Count Algorithm to Perform Simple Validation on Strings
by Greg McClure
SemiCRC - A fast CRC-like algorithm
by Ernest Bayazitov
Evaluate the 16-bit Checksum of an array of bytes
Ternary QuickSort - A modification of QuickSort
by David B. Ring
Ternary QuickSort. See the summary of QuickSort for background before reading this one. Ternary QuickSort (also called MultiKey QuickSort) differs from the original QuickSort by examining keys one byte at a time (like RadixSort), and by handling keys in three categories -- less than pivot, ...
1-20 of 380     Previous     Next
Sitemap