Sort Array Snippets


29 March, 2015   

When creating an index, the default method Oracle uses to sort the index is in ascending order (SORT). However, if the rows are already stored in the database in ascending order you can use the NOSORT clause to skip the sorting process. If neither SORT or NOSORT is provided, Oracle will use SORT as the clause.

06 August, 2012   

Showing how to sort array of numbers using built-in qsort

09 July, 2011   

How to sort array in smarty template? Create sort modifier file and save it in smarty / plugins with modifier.sortby.php name use this modifier in smarty template like... {foreach item=item key=key from=$users|@sortby:"firstname"} {$item.id}-{$item.firstname} {/foreach}

PHP & Mysql based code to Print table with client-side sorting function.

C code snippet for merging sort algorithm to sort

13 September, 2015   

C code snippet for another merge sort of integer list

02 November, 2016   

A PHP template for dealing with any sort of error

Open up a text editor, copy & paste the code below. Save the file as: "commandlinefu.py" and exit the editor.

Example code for merge sort of an integer list

02 February, 2013   

Example code for Generic Array To String Function

Convert a coordinate (x,y) into the index for a 1D array. For example, the coordinate (3,1) would be at array index 8 if there are 5 columns. Assumption: Arrays start at 0.

01 July, 2015   

Loads and saves a compressed dump of an array

01 February, 2011   

Associative Array Syntax

I was trying to pass an array through SWFObject flashvars and realized it can't be done. Instead you need to use a string for your array, pass it into Flash , then convert it to an array using the actionscript "split" function.

I was trying to pass an array through SWFObject flashvars and realized it can't be done. Instead you need to use a string for your array, pass it into Flash , then convert it to an array using the actionscript "split" function.

19 February, 2013   

PHP is_assoc_array function to check if given array is associative or not

13 October, 2015   

This function removes all duplicated lines of the given text file.

01 April, 2015   

PHP code example for using the array_walk function to format an array.

02 January, 2012   

The ORDER BY keyword is used to sort the result set by a specified column.

06 June, 2011   

This reorders the elements of an array into a random order.