Sort 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.

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

C code snippet for merging sort algorithm to sort

06 August, 2012   

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

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

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

02 January, 2012   

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

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

13 October, 2015   

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

07 April, 2013   

A simple example code for user login with a login form and database query

07 August, 2014   

All hints except /*+ rule */ cause the CBO to be used. Therefore, it is good practise to analyze the underlying tables if hints are used (or the query is fully hinted.