sorting

Sort strings and numbers in Ruby

I want to sort an array by strings first and then numbers. How do I do this? ...

Find criteria must contain at least one sort field value.

Hi Guys. I have this datagrid which dataProvider is a ArrayCollection of 2 different types of objects (FolderVO and FileVO). I have a size column which in the case of the FolderVO is populated by an attribute called contentSize and in the case of the FileVO it is populated by the size attribute (the difference is handled by a itemrender...

INSYNC vs SORT.. How can i achieve it?

I have a INSYNC batch to 'extract' certain conditioned data output. For instance, below insync code extracts the data if 44 pos has a value of '25'. Question here is, I wanna get the output in a sorted manner based on a particular field. Can we incorporate the SORT criteria below. Suggestions are really appreciated. FUNCTION=EXTRACT IND...

sort problem ??

hello !! i try to program radix sort , but i have NullPointerException when i run this code public class ThreeRadixSort { public Queue getSortedData(Queue queue){ Queue array[] = new Queue[10]; for(int i=1;i<=3;i++){ while(queue.front != null){ Student student = queue.dequeue(); if( i == 1) ...

Gridview Sorting, Updating and Editing

Hello all - seasons greetings to you all. I really need some help as this is driving me mad. The aim. I have a textbox which a client enters a number, they click on a radio button list to select a material and hit a button to populate a gridview. This is the front end code: <asp:TextBox ID="tbxHowMany" runat="server" style="z...

How do you sort a list in Jinja2?

I am trying to do this: {% for movie in movie_list | sort(movie.rating) %} But that's not right...the documentation is vague...how do you do this in Jinja2? ...

Generate directory tree from large flat directory list

Let's say I have one directory in my filesystem, which has a number of subdirectories and files. The number of subdirectories and files in this directory runs to many tens of thousands. You'll be familiar with the significant delay you'll get in attempting to view the contents of this directory, even in a terminal. I've seen this solu...

Tk treeview column sort

Is there a way to sort the entries in a Tk Treeview by clicking the column? Surprisingly, I could not find any documentation/tutorial for this. ...

Email threading

I'm working at a helpdesk application where i have a standalone script that queries a mail server and parses the mail it finds there. I'm facing the following issue: How do i figure it out in a reliable way what mail is in reply to what mail? I could add something in the subject like "[ticket:21312]" and look for that but what if the use...

SortedDictionary behavior

Hello everyone, I'm using a SortedDictonary(Of String, String) in my application, and I experience a strange sorting behavior. Consider the following code example: Dim Dic As New SortedDictionary(Of String, String) Dic.Add("'A", "") Dic.Add("A", "") Dic.Add("'B", "") Dic.Add("B", "") Dic.Add("'C", "") Dic.Add("C", "") I would expect ...

Sorting Javascript Array with Chrome?

Hi all, Is there a way to sort an array using Chrome? Using the sort function does not work as seen in this example: var myArray = [1,4,5,3,2]; myArray.sort ( function( a , b ){ return b>a }); for ( var i = 0; i < myArray.length; i++ ) { document.write( myArray[i] ) } Firefox / IE / Opera / Safri output: 54321 Chrome output...

how many variations of merge sort there are?

i'm looking to find how many different implementation of merge sort in .net there are because i was checking this post Sorting Algorithms in VB.Net: How To Implement Merge Sort and the article mentions that there are several other versions such as in-place and dunno what else... ...

GridView sorting doesn't work when I Enable Caching in Custome Paging and sorting

Hi , I have a GridView that use a stored procedure for custom paging and sorting . It's OK and works fine (Both paging and sorting) , But the problem is when i Enable Caching in ObjectDataSource like : EnableCaching="True" It properly cache every page that the user visit , But at this case when the user want to sort it raise an e...

Graphical Representation of array Sorting in vb.net

Does anyone know of a program that visualizes array Sorting in vb.net (Bubble sort,selection sort etc)? Pointers to how I could implement one myself would also be appreciated. Thanks in advance. ...

question about merge sort under php

hello, i'v been trying to implement merge sort under php. but seems unsuccessful :( couldn't find source of error. any kind of help is very much appreciated! function merge_sort(&$input, $start, $end) { if($start < $end) { $mid = (int) floor($start + $end / 2); merge_sort($input, $start, $mid); merge_sort($in...

Silverlight 4 datagrid not re-sorting

I'm new to both Silverlight and RIA. I have a simple form with a DataGrid bound to a DomainDataSource object. The rows displayed represent section headings to be displayed on a webpage. One of the columns is called OrdinalPosition and I have specified that the grid is to sort by this column. I have a custom column with up and down ar...

How to sort an List collection of classes with properties in them?

Hi I have a List of classes in my collection like List<MyClass> test = new List<MyClass>(); In my classes I have just some properties public string id {get; set;} public DateTime date {get; set;} Now I make these classes by getting some queries from 2 different database tables. I then take those 2 results from the database tables ...

Solved : Problem with tablesorter & Jquery sorting prices with Euro sign

Hello there, My question concerns the Jquery plugin Tablesorter : I've a problem with the sorting of a columns with prices, formatted like that : 135.35 €, 149.99 €, 1500 €, etc The sorting works well with the numbers only, but when i add the Euro symbol , the sorting is not working anyore. I have this ASC order for the third column...

How do I do a Client side sort of a DataTable using LINQ

How do I sort a DataTable on the client side using LINQ? (Server side sorting is not supported with my data store) I was doing something like this which doesn't work IEnumerable<DataRow> dr = GetDataTableData().AsEnumerable(); if (sortDirection == "Ascending") { dr = dr.Or...

Sorting/Paginating/Filtering Complex Multi-AR Object Tables in Rails

I have a complex table pulled from a multi-ActiveRecord object array. This listing is a combined display of all of a particular user's "favorite" items (songs, messages, blog postings, whatever). Each of these items is a full-fledged AR object. My goal is to present the user with a simplified search, sort, and pagination interface. The ...