Multidimensional Array Snippets

Two simple functions to read an write tab seperated files (like CSV files, etc).

This function is used to reverse an integer array. For example, if the array is {1,2,3,4,5}, these functions will return an array like {5,4,3,2,1}. The user needs to pass in a pointer to the array and the size of the array, and the function will return a pointer to an array in the reverse order.

This is a PHP Class that calculates the size, number of files & folders of a specific directory.

07 May, 2012   

An example code to Copy data into dotNet array

Example shown here how to convert a PHP array into a string

18 May, 2011   

To randomize an array we loop over the length of the array, removing an object chosen at random and then adding it back onto the Array’s end position. Think of this as having a deck of cards where you pick a card at random from the deck and move it to the top of the stack repeated for the total number of cards in the deck. It’s important to...

When creating a new object, pass the initial variables as an array. Then use this code to quickly assign the array vars to the class vars. This will mean importing large arrays into the object in three lines of code.

12 August, 2012   

Simple but utilitarian function returns a numeric array of associative arrays containing an entire result set.

02 November, 2016   

A PHP template for dealing with any sort of error

Iterate enumerative and associate array using for loop in php.

This MATLAB code snippet reads in a file stored in the current directory and stores specified lines from the file in a new cell array for manipulation in MATLAB.

13 September, 2015   

C code snippet for another merge sort of integer list

12 January, 2012   

Here shown a php code example how to associative Array by Column Name

24 September, 2012   

An array of states to convert "AL" for example to "Alabama"

This snippet will check memory and then print initial, final and peak usages.

Example code for a short BubbleSort algoritm for Integer Arrays

07 January, 2012   

ASP code example to create an Array

Find the length of the array before using it in the for function

02 February, 2013   

An array that could dynamically adjust its size for a fluctuating capacity by SunnyD

27 April, 2013   

Returns an array of ints representing the indices of the triangles