Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
VB VB (1648)
VB.net VB.net (736)
C# C# (15)
ASP.net ASP.net (779)
ASP ASP (41)
VC++ VC++ (25)
PHP PHP (0)
JAVA JAVA (4)
JScript JScript (5)
  Database
» SQL Server (708)
» ORACLE (5)
» MySQL (0)
» DB2 (0)
Automation
» C/C++/ASM (11)
» Microcontroller (1)
» Circuit Design (0)
OS/Networking
» Networking (5)
» Unix/Linux (1)
» WinNT/2k/2003 (8)
Graphics
» Flash (0)
» Maya (0)
» 3D max (0)
» Photoshop (0)
Links
» ASP.net (2)
» PC Interfacing (1)
» Networking (4)
» SQL Server (4)
» VB (23)
» VB.net (4)
» VC (3)
» HTML/CSS/JavaScript (10)
Tools
» Regular Expr Tester
» Free Tools

 

A For Each loop that iterates in reverse order
Total Hit (11612) The For Each loop always iterates orderly on all the elements of an array or a collection (more precisely, on all the elements of a class that implements the IEnumerable interface). What happens if you need to iterate in reverse order, though? If you have an array or an ArrayList you can always refe ....Read More
Rating
A For Each statement that visits items in random order
Total Hit (2702) At times you may need to process elements of an array, a collection, or a dictionary object in random order, for example when sampling a population or (more often) when writing a game, such as a card game. Here's a class that you can use in a For Each statement to randomly process all the elements o ....Read More
Rating
Building arrays on the fly
Total Hit (2866) VB.NET supports the creation of arrays on-the-fly, by using the New operator. For example, look at the following code, that uses GDI methods to display few connected lines «Code LangId=2» ' Get the Graphics object from the form. Dim gr As Graphics = Me.CreateGraphics ' Draw three straight line ....Read More
Rating
Create zero-elements arrays
Total Hit (2559) The .NET framework lets you create two types of "empty" arrays: unitialized arrays and arrays that are initialized with zero elements. Uninitialized arrays are actually array variables that are set to Nothing, whereas zero-element arrays are non-Nothing variables that point to arrays with zero eleme ....Read More
Rating
Store bits and small integers efficiently in a BitVector32
Total Hit (3289) The System.Collections.Specialized.BitVector32 structure can be used to store up to 32 boolean values, or a set of small integers that can take up to 32 consecutive bits. The BitVector32 is similar to the BitArray class, in that it can hold boolean values that take only one bit each, yet it is more ....Read More
Rating
Store large Boolean arrays in a BitArray object
Total Hit (5850) .NET Boolean values require 4 bytes each, as opposed to the 2 byte taken under previous VB versions. When creating very large Boolean arrays this extra memory impacts negatively on the application's performance. The .NET Framework offers a specialized class, the System.Collection.BitArray class, whi ....Read More
Rating
Understanding passing arrays by reference
Total Hit (3557) .NET arrays are object types, thus an array variable is actually a pointer to the object where data is actually stored. For this reason, when you pass an array to a procedure the pointer is passed and the called procedure is always able to modify the elements of the array, regardless of whether the ....Read More
Rating
BinarySearch - Fast search in a sorted array
Total Hit (3302) «Code LangId=2» ' Binary search in an array of any type ' Returns the index of the matching item, or -1 if the search fails ' ' The arrays *must* be sorted, in ascending or descending ' order (the routines finds out the sort direction). ' LASTEL is the index of the last item to be searched, a ....Read More
Rating
ArrayDeleteElement - Deleting an element in any type of array
Total Hit (2567) «Code LangId=2»' A generic routine that deletes an element in any type of array. ' Example: deleting the 2nd element of the array arr ' ArrayDeleteElement(arr, 1) Sub ArrayDeleteElement(ByVal arr As Array, ByVal index As Integer) ' Shift elements from arr(index+1) to arr(index). ....Read More
Rating
ArrayInsertElement - Inserting an element in any type of array
Total Hit (2614) «Code LangId=2»' A generic routine that inserts an element in any type of array. ' Example: inserting an entry of value 5 between the 1st and 2nd entry of the ' array arr ' ArrayInsertElement(arr, 1, 5) Sub ArrayInsertElement(ByVal arr As Array, ByVal index As Integer, _ Optional By ....Read More
Rating
ArrayListJoin - Merging two ArrayList objects
Total Hit (2868) «Code LangId=2»' A reusable function that merges two ArrayList objects ' Example: ' Dim al As New ArrayList() ' al.Add("Jack") ' al.Add("Mary") ' val.Add("Bob") ' al.Add("Tom") ' ' Dim al2 As New ArrayList() ' al2.Add("Frank") ' al2.Add("Lee") ' a ....Read More
Rating
FilterDuplicates - Delete duplicate items in an array
Total Hit (3195) «Code LangId=2» ' Filter out duplicate values in an array and compact ' the array by moving items to "fill the gaps". ' Returns the number of duplicate values ' ' The array is not REDIMed, but you can do it easily using ' the following code: ' a() is a string array ' dups = FilterDu ....Read More
Rating
HasDuplicateValues - Check if an array has duplicate values
Total Hit (3446) «Code LangId=2» ' Returns True if an array contains duplicate values ' it works with arrays of any type Function HasDuplicateValues(ByVal arr As Array) As Boolean Dim ht As New Collections.Hashtable(arr.Length * 2) Dim index As Integer For index = 0 To arr ....Read More
Rating
This is a link to a different site Efficiently Searching a Sorted Array
Total Hit (1526) Pop quiz, hotshot: you have an array of strings consisting of the various IP addresses of the visitors of the last 24 hours to your Web site. You want to determine if your site has been visited by the IP address 231.34.124.3. How can you quickly figure out if the string "231.34.124.3" is in the arra ....Read More
Rating


Recommanded Links

 

Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.