Login   /   Register

Handling Java Arrays

June 19th, 2008 by Yaron Assa
     4 votes, average: 4.75 out of 54 votes, average: 4.75 out of 54 votes, average: 4.75 out of 54 votes, average: 4.75 out of 54 votes, average: 4.75 out of 5
Loading ... Loading ...

Tsachi Nimni reveals undocumented methods for reading and manipulating java arrays inherently in QTP.

Read Excel range into an array

May 1st, 2008 by Yaron Assa
     4 votes, average: 3.75 out of 54 votes, average: 3.75 out of 54 votes, average: 3.75 out of 54 votes, average: 3.75 out of 54 votes, average: 3.75 out of 5
Loading ... Loading ...

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 […]

Sorting a String Array

April 2nd, 2008 by daniva
     4 votes, average: 4 out of 54 votes, average: 4 out of 54 votes, average: 4 out of 54 votes, average: 4 out of 54 votes, average: 4 out of 5
Loading ... Loading ...

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:

Sorting Arrays - Heap Sort

April 2nd, 2008 by daniva
     0 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 5
Loading ... Loading ...

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.

Worst Case Array Statistics

April 2nd, 2008 by daniva
     0 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 5
Loading ... Loading ...

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

Sorting Arrays - Quick Sort

April 2nd, 2008 by daniva
     0 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 5
Loading ... Loading ...

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.

Sort Arrays - Merge Sort

April 2nd, 2008 by daniva
     0 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 5
Loading ... Loading ...

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.

Sorting Array - Bubble Sort

April 2nd, 2008 by daniva
     0 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 5
Loading ... Loading ...

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.