Sort Numbers Snippets


06 August, 2012   

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

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.

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

C code snippet for merging sort algorithm to sort

Source code by Maganti Venkatesh for another way to swap 2 numbers

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

27 April, 2013   

PHP code for Fast Triangular Numbers

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}

Example code for merge sort of an integer list

To generate numbers of the form 2^i * 3^j * 5^k

02 January, 2012   

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

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.

How to dynamically update your Snippets

13 February, 2013   

Place line numbers in text output format using CSS and PHP

01 March, 2011   

Function that generates random passwords.

Example for using thousand separator (,) for decimal integer numbers

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

02 May, 2013   

A Closer Look at the I/O Operators