Handling Java Arrays
Yaron Assa Tsachi Nimni reveals undocumented methods for reading and manipulating java arrays inherently in QTP.
Yaron Assa Tsachi Nimni reveals undocumented methods for reading and manipulating java arrays inherently in QTP.
Yaron Assa Usually, we only want to read some data from an Excel worksheet, and we’ll be more than happy to get that data in a simple 2-dimensional array.
Later we can loop through the array, and access the data in a quick and easy fashion.
Here’s a function which receives an Excel file, the workbook name and returns […]
daniva Sorting arrays in VBScript has never been easy; that’s because VBScript doesn’t have a sort command of any kind. In turn, that always meant that VBScript were forced to write their own sort routines, be that a bubble sort, a heap sort, a quicksort, or some other type of sorting algorithm.
But that was before the advent of the .NET Framework. If you have the .NET Framework installed on your computer then you can sort an array using code no more complicated than this:
daniva 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.
daniva 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
daniva 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.
daniva 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.
daniva 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.