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

Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )

CBitArray - a class for dealing with large arrays of Boolean
Total Hit (2390) «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 (2298) «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 (2187) «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 (2226) «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 (3715) «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 (2331) «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 (2612) «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 (2264) «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 (2821) «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 (1796) «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 (3621) «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 (1592) «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 (1657) «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
ArrayDeleteElement - Deleting an element in any type of array
Total Hit (2642) «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 (2695) «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 (2947) «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 (3273) «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 (3628) «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
AddBackslash - Append a backslash to a path if needed
Total Hit (3156) «Code LangId=1»' Append a backslash (or any character) at the end of a path ' if it isn't there already Function AddBackslash(Path As String, Optional Char As String = "\") As String If Right$(Path, 1) <> Char Then AddBackslash = Path & Char Else AddBackslash = Path ....Read More
Rating
ChangeFileExtension - Modify the extension in a file name
Total Hit (2780) «Code LangId=1» ' Change the extension of a file name ' if the last argument is True, it adds the extension even if the file doesn't ' have one Function ChangeFileExtension(FileName As String, Extension As String, _ Optional AddIfMissing As Boolean) As String Dim i As Long For ....Read More
Rating
CompactPathToWindow - Shorten a path so that it fits a window's width
Total Hit (3494) «Code LangId=1» Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Private Declare Function IsWindow Lib "user32" (ByVal hWnd As Long) As Long Private Declare Function GetClientRect Lib "user32" (ByVal hWnd As Long, _ lpRect As RECT) As Lon ....Read More
Rating
CompareDirectories - Find different files in two directories
Total Hit (3032) «Code LangId=1» Enum CompareDirectoryEnum cdeSourceDirOnly = -2 ' file is present only in the source directory cdeDestDirOnly = -1 ' file is present only in the dest directory cdeEqual = 0 ' file is present in both directories, ' with s ....Read More
Rating
CompareFiles - Check whether two files contain the same data
Total Hit (3149) «Code LangId=1»' compare two files ' return True if they're equal Function CompareFiles(ByVal file1 As String, ByVal file2 As String) As Boolean Dim fnum1 As Integer, isOpen1 As Boolean Dim fnum2 As Integer, isopen2 As Boolean Dim buffer1 As String, buffer2 As String Dim byt ....Read More
Rating
ConcatenateFiles - Merge multiple text files in one
Total Hit (3093) «Code LangId=1» ' Concatenate a variable number of text files into a single result file ' ' Params: ' - ResultFile: the complete path of the result file you want to create ' - Separator: a string that is written when a file is added to the result ' file. ' Note: this string can conta ....Read More
Rating
DirExists - Check that a directory exists
Total Hit (3275) «Code LangId=1» ' Return True if a directory exists ' (the directory name can also include a trailing backslash) Function DirExists(DirName As String) As Boolean On Error GoTo ErrorHandler ' test the directory attribute DirExists = GetAttr(DirName) And vbDirectory ErrorHandler: ....Read More
Rating
EvalFileName - Ensure that the basename of a file or directory is valid
Total Hit (2667) «Code LangId=1»' EvalFileName ensures that the basename of a file or directory ' conforms to the Microsoft file naming guidelines (see MSDN webpage) ' http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/ ' naming_a_file.asp ' ' Return value: ' True = Valid basename ....Read More
Rating
FileExists - Check that a file exists
Total Hit (3803) «Code LangId=1»' Return True if a file exists Function FileExists(FileName As String) As Boolean On Error GoTo ErrorHandler ' get the attributes and ensure that it isn't a directory FileExists = (GetAttr(FileName) And vbDirectory) = 0 ErrorHandler: ' if an error occurs, this ....Read More
Rating
FilesToArray - Read all the files or subdirectories in a directory using API functions
Total Hit (4224) «Code LangId=1» Private Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" _ (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long Private Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" _ (ByVal hFindFile As Long, lpFindFileData As ....Read More
Rating
FolderHasSubfolders - Determine whether a directory has one or more subdirectories
Total Hit (3028) «Code LangId=1»Private Const MAX_PATH = 260 Private Type SHFILEINFO hIcon As Long iIcon As Long dwAttributes As Long szDisplayName As String * MAX_PATH szTypeName As String * 80 End Type Private Declare Function SHGetFileInfo Lib "Shell32" Alias "SHGetFileInfoA" _ ....Read More
Rating
BubbleSort - Sort Arrays using the BubbleSort Algorithm
Total Hit (3097) «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


(Page 104 of 133) 3968 Result(s) found  ... 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 ...

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

© 2008 BinaryWorld LLC. All rights reserved.