In this article we are about to see the efficiency of a dictionary when checking or retrieving values from a web-table, For this purpose we have the following table in our AUT. This is the script that will parse the table and will upload the dictionary. After running the script above, the solarExch dictionary loaded [...]
Posts in category Scripting Techniques
Complex Dictionary Usage
Sending an HTML Email from a Pre-Made File
This QTip is another variation of Sending an HTML email. Windows 2000 and Windows XP use CDO messaging as a replacement for CDONTS. Sending email with CDO is a simple task. First we create a reference to the CDO component: Set objMessage = CreateObject(“CDO.Message”) Then fill-in Sender, Subject and Recipient (To) fields of the headers [...]
Fast Count Specific Words in a log File
The following example will count the appearance of a word or expression inside a log file. The log file: [1/27/2008 15:6:47] LogFile Open. [***** Search on FAIL/MessageBox keywords for failures *****]. [1/27/2008 15:6:47] Initial thread locale=409 [1/27/2008 15:6:47] returned from France fix with locale 409 [1/27/2008 15:6:47] OC_PREINITIALIZE:[iis] End. Return=1 (OCFLAG_UNICODE) [1/27/2008 15:6:47] OC_INIT_COMPONENT:[iis,(null)] Start. [...]
Sorting Array – Bubble Sort
Bubble sort is a simple sorting algorithm. It works by repeatedly stepping through the list to be sorted, comparing two items at a time and swapping them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which means the list is sorted. The algorithm gets [...]
Sort Arrays – Merge Sort
In computer science, merge sort or mergesort is an O(n log n) comparison-based sorting algorithm. It is stable, meaning that it preserves the input order of equal elements in the sorted output. It is an example of the divide and conquer algorithmic paradigm. It was invented by John von Neumann in 1945. Merge Sort Animation [...]
Sorting Arrays – Quick Sort
Quicksort in action on a list of random numbers. The horizontal lines are pivot values.Quicksort is a well-known sorting algorithm developed by C. A. R. Hoare that, on average, makes (big O notation) comparisons to sort n items. However, in the worst case, it makes L(n2) comparisons. Typically, quicksort is significantly faster in practice than [...]
Worst Case Array Statistics
Worst case means that the array is already sorted in reverse order from the required. Worst Case Function just loop from max to min to create a sorted array in descending order Worst Case Function Public Sub WorstCase( ByRef arr(), Byval nSize ) Dim i, nCount Redim arr( nSize – 1 ) nCount = 0 [...]
Sorting Arrays – Heap Sort
Heapsort is a comparison-based sorting algorithm, and is part of the selection sort family. Although somewhat slower in practice on most machines than a good implementation of quicksort, it has the advantage of a worst-case O(n log n) runtime. Heapsort is an in-place algorithm, but is not a stable sort. Heap Sort Animation Heapsort inserts [...]
The Regex Coach – Interactive Regular Expressions
The Regex Coach is a graphical application for Windows which can be used to experiment with regular expressions interactively. It has the following features: It shows whether a regular expression matches a particular target string. It can also show which parts of the target string correspond to captured register groups or to arbitrary parts of [...]
Where Is ‘93′ hides?
VBScript has no built-in function where we can find all occurrences of a sub string inside a string. Only regular with expressions ( Regexp ) the task is easier. However you need to use Regexp, Matches, and Match objects. p>I am sure that many users would choose the Regexp object for this task, and maybe [...]




Recent Comments