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 (1647)
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

(Page 1 of 2) 36 Result(s) found 

Find if a value exists in an Array
Total Hit (384)
Rating
CBitArray - a class for dealing with large arrays of Boolean
Total Hit (629) «Code LangId=1» ' ------------------------------------------------------------------------ ' The CBITARRAY class ' ' simiulates an array of Boolean values ' saves memory by packing one element in one bit ' ' IMPORTANT: you make make ITEM the default member for this class ' do ....Read More
Rating
CombSort - A very efficient algorithm
Total Hit (606) «Code LangId=1»' Comb Sort an array of any type ' ' CombSort is faster than all but QuickSort and close to it. ' On the other hand, the code is much simpler than QuickSort ' and can be easily customized for any array type ' This routine is based on an article appeared on the Byte ' magazine i ....Read More
Rating
Filter - A replacement for VB6's Filter function under VB5
Total Hit (636) «Code LangId=1»' A replace for the Filter function under VB4 and VB5 ' ' Note that the source array is modified. For this reason ' this is declared as a Sub rather than a Function Sub Filter(arr() As String, ByVal Search As String, Optional ByVal Include As _ Boolean, Optional ByVal Comp ....Read More
Rating
FilterDuplicates - Delete duplicate items in an array
Total Hit (597) «Code LangId=1» ' Filter out duplicate values in an array and compact ' the array by moving items to "fill the gaps". ' Returns the number of duplicate values ' ' it works with arrays of any type, except objects ' ' The array is not REDIMed, but you can do it easily using ' the following co ....Read More
Rating
GetArrayInfo - Retreive number of dimensions and the SAFEARRAY memory structure
Total Hit (1148) «Code LangId=1» Type SAFEARRAYBOUND cElements As Long ' # of elements in the array dimension lLbound As Long ' lower bounds of the array dimension End Type Type SAFEARRAY cDims As Integer ' Count of dimensions in this array. fFeatures As Integer ....Read More
Rating
TransposeMatrix - Rotate a bi-dimensional array
Total Hit (583) «Code LangId=1» ' evaluate the transposed matrix ' ' a transposed matrix is the array you get when ' you "rotate" a bi-dimensional array Function TransposeMatrix(arr() As Double) As Double() Dim startRow As Long, startCol As Long Dim endRow As Long, endCol As Long Dim r As Lon ....Read More
Rating
HasDuplicateValues - Check if an array has duplicate values
Total Hit (679) «Code LangId=1»' Returns True if an array contains duplicate values ' it works with arrays of any type Function HasDuplicateValues(arr As Variant) As Boolean Dim col As Collection, index As Long Set col = New Collection ' assume that the array contains duplicates HasDu ....Read More
Rating
ListBoxEnsureVisible - Ensure that a ListBox element is visible
Total Hit (540) «Code LangId=1»' ensure that a listbox item is visible ' if the second argument is omitted, the index of current item is used ' ' NOTE: uses the ListBoxVisibleItems function Sub ListBoxEnsureVisible(lst As ListBox, Optional ByVal itemIndex As Long = -1) Dim visibleCount As Long ....Read More
Rating
NdxShellSort -Sort Indexed Arrays using ShellSort
Total Hit (684) «Code LangId=1»' Indexed ShellSort of an array of any type ' ' Indexed Sorts are sort procedures that sort an index array ' instead of the main array. You can then list the items in ' sorted member by simply scanning the index, as in ' For i = 1 To numEls: Print arr(ndx(i)): Next ' ' NUMEL ....Read More
Rating
QuickSort - Sort Arrays using the QuickSort Algorithm
Total Hit (471) «Code LangId=1»' QuickSort an array of any type ' QuickSort is especially convenient with large arrays (>1,000 ' items) that contains items in random order. Its performance ' quickly degrades if the array is already almost sorted. (There are ' variations of the QuickSort algorithm that work goo ....Read More
Rating
RLECompress - Compress a block of memory using RLE algorithm
Total Hit (1291) «Code LangId=1»Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (dest As _ Any, source As Any, ByVal Bytes As Long) ' compress a block of memory (a string, an array, a bitmap) ' using the RLE compression algorithm ' ' Returns True if the block has been compressed, ' ....Read More
Rating
SemiCRC - A fast CRC-like algorithm
Total Hit (333) «Code LangId=1» ' Evaluate the 16-bit Checksum of an array of bytes Function SemiCRC(bSource() As Byte) As Long Dim lngCRC As Long Dim lngTemp As Long Dim lngSize As Long Dim I As Long Const divisor As Long = 32768 lngSize = UBound(bSource()) For I = 0 T ....Read More
Rating
ShellSort - Sort Arrays using the ShellSort Algorithm
Total Hit (328) «Code LangId=1» ' ShellSort an array of any type ' ' ShellSort behaves pretty well with arrays of any size, even ' if the array is already "nearly-sorted", even though in ' particular cases BubbleSort or QuickSort can be more efficient. ' ' LASTEL is the index of the last item to be sorted, ....Read More
Rating
ArrayAny - Return an initialized array of any type
Total Hit (564) «Code LangId=1» ' Returns an array and initializes it with passed data. ' ' It is similar to the Array function, but it works with ' array of any type. The type of the returned array is ' assumed to be the type of the first element in the ' parameter list, so you might need to force a given ....Read More
Rating
ArrayAvg - The average of an array of any type
Total Hit (519) «Code LangId=1» ' The average of an array of any type ' ' FIRST and LAST indicate which portion of the array ' should be considered; they default to the first ' and last element, respectively ' if IGNOREEMPTY argument is True or omitted, ' Empty values aren't accounted for Function ArrayA ....Read More
Rating
ArrayMax - The value and index of highest element in an array of any type
Total Hit (560) «Code LangId=1»' Return the maximum value in an array of any type ' ' FIRST and LAST indicate which portion of the array ' should be considered; they default to the first ' and last element, respectively ' If MAXINDEX is passed, it receives the index of the ' maximum element in the array F ....Read More
Rating
ArrayMin - The value and index of lowest element in an array of any type
Total Hit (515) «Code LangId=1» ' Return the minimum value in an array of any type ' ' FIRST and LAST indicate which portion of the array ' should be considered; they default to the first ' and last element, respectively ' If MININDEX is passed, it receives the index of the ' minimum element in the array ....Read More
Rating
ArrayShuffle - Randomize the order of elements in an array
Total Hit (892) «Code LangId=1» ' Shuffle the elements of an array of any type ' (it doesn't work with arrays of objects or UDT) Sub ArrayShuffle(arr As Variant) Dim index As Long Dim newIndex As Long Dim firstIndex As Long Dim itemCount As Long Dim tmpValue As Variant firs ....Read More
Rating
ArrayStdDev - The standard deviation of a numeric array
Total Hit (849) «Code LangId=1»' The standard deviation of an array of any type ' ' if the second argument is True or omitted, ' it evaluates the standard deviation of a sample, ' if it is False it evaluates the standard deviation of a population ' ' if the third argument is True or omitted, Empty values are ....Read More
Rating
ArraySum - The sum of all the items in an array of any type
Total Hit (803) «Code LangId=1» ' Return the sum of the values in an array of any type ' (for string arrays, it concatenates all its elements) ' ' FIRST and LAST indicate which portion of the array ' should be considered; they default to the first ' and last element, respectively Function ArraySum(arr As ....Read More
Rating
ArrLongestItem - The value and index of the longest element of an array of any type
Total Hit (530) «Code LangId=1»' The longest item in an array of any type ' (it applies the LEN function to all the items in the array ' and then takes the highest value) ' ' FIRST and LAST indicate which portion of the array ' should be considered; they default to the first ' and last element, respectively ....Read More
Rating
ArrShortestItem - The value and index of the shortest element of an array of any type
Total Hit (503) «Code LangId=1»' The shortest item in an array of any type ' (it applies the LEN function to all the items in the array ' and then takes the highest value) ' ' FIRST and LAST indicate which portion of the array ' should be considered; they default to the first ' and last element, respectivel ....Read More
Rating
ArrShortestItem - The value and index of the shortest element of an array of any type
Total Hit (494) «Code LangId=1»' The shortest item in an array of any type ' (it applies the LEN function to all the items in the array ' and then takes the highest value) ' ' FIRST and LAST indicate which portion of the array ' should be considered; they default to the first ' and last element, respectivel ....Read More
Rating
BubbleSort - Sort Arrays using the BubbleSort Algorithm
Total Hit (822) «Code LangId=1» ' Bubble Sort an array of any type ' BubbleSort is especially convenient with small arrays (1,000 ' items or fewer) or with arrays that are already almost sorted ' ' NUMELS is the index of the last item to be sorted, and is ' useful if the array is only partially filled. ' ' ....Read More
Rating
Check whether a string array contains an item (without a loop)
Total Hit (890) To determine whether a String array contains a given item it seems that you can't avoid writing a loop. However, you can do it with just one line of code, using the new VB6 Join function: «Code LangId=1» ' ARR is an array of string, SEARCH is the value to be searched Found = InStr(1, vbNullChar ....Read More
Rating
Count Sort, a special case of indexed sort
Total Hit (840) CountSort is yet another sort algorithm, which can be applied only under very particular conditions but that, when such conditions are met, turns to be the fastest of the lot. Count Sort can be used when the key is of Integer type, or when it is of Long type but the range of values is not too large. ....Read More
Rating
Polymorphic array procedures
Total Hit (637) You can create "polymorphic" routines that work with any type of array (except arrays of fixed-length strings, or UDTs) by using Variant parameters. Take for example the following code: «Code LangId=1» Function Sum(arr As Variant) As Variant Dim i As Long For i = LBound(arr) To UBound( ....Read More
Rating
Quickly clear a portion of an array
Total Hit (830) The fastest way to clear an array is to ReDim (if the array is dynamic) or Erase it (if the array is Static). However, if you want to clear a portion of an array, it seems that you must code a For-Next loop. If you are dealing with numeric arrays, there is a faster alternative, based on the ZeroM ....Read More
Rating
Quickly initialize Variant and String arrays
Total Hit (941) Visual Basic doesn't provide any way to declare an array and initialize its elements at the same time. In most cases you end up with setting individual elements one by one, as in: «Code LangId=1» Dim strArray(0 To 3) As String strArray(0) = "Spring" strArray(1) = "Summer" strArray(2) = "Fall" ....Read More
Rating


(Page 1 of 2) 36 Result(s) found  1 2

Recommanded Links

 

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

© 2008 BinaryWorld LLC. All rights reserved.