ArrayCountOccurrences – Count the occurrences of a string within the input array
‘ Return the number of occurrences found in the input array,’ with the specified search options” Example:’ Dim arr As String() = {“this is a string for my test”, “test
‘ Return the number of occurrences found in the input array,’ with the specified search options” Example:’ Dim arr As String() = {“this is a string for my test”, “test
‘ Shuffle the elements of an array of any type” Example:’ Dim arr As Integer() = {3, 7, 8, 2, 0, 9}’ ArrayShuffle(arr)’ Dim o As Object’ For Each o
‘ An extended version of Array.IndexOf, with more options for string searches. ‘ The function returns the index of the found element,’ or -1 if no element is found” Example:’
‘ An extended version of Array.LastIndexOf, with more options for string ‘ searches. The function returns the index of the found element,’ or -1 if no element is found” Example:’
‘ Scramble the words of the input string’ Note: requires the ArrayShuffle routine” Example:’ Dim text As String = “This is a test string for the ScrambleWords function”‘ Debug.WriteLine(ScrambleWords(text))Function ScrambleWords(ByVal
‘ Merge two ArrayList, avoiding duplicate values (if there are already ‘ duplicate values in same input ArrayList however, they are not discarded)’ ‘ Example:’ Dim al1 As New ArrayList’
If you’re still using classic ASP, this is a simple little VBScript function that emulates the VB IIf(). It helps in intializing and making your code look a little cleaner.
A group of objects can be organized into arrays or collections. Arrays are nice because you can statically initialize them, but collections have far more functionality. Using this tip you
This version of bubble sort stops when there are no more exchanges and it also sorts a smaller range each time. void bubbleSort3(int x[], int n) { bool exchanges; do