Questions tagged as 'order'

1
answer

Order By with List

Is it possible to make a OrderBy in a List<> setting the value for comparison? Example: mRel.OrderBy(s => s.Status == EnumModel.StatusGeral.Novo).ToList() My Code: List<MotivosModel.MotivosRel> mRel = Carre...
asked by 04.05.2017 / 17:43
1
answer

The order function in R

I do not understand what happens. Please note > x<-c(-2,4,-6,5,9,7) > x [1] -2 4 -6 5 9 7 > order(x) [1] 3 1 2 4 6 5 I do not understand why the x-vector is not ordered. Look, when I give order(x) add 7 And in...
asked by 18.04.2014 / 18:43
3
answers

Order SQL for 1,2,3 instead of 1,10,2,3

I have a name field in a table that has the following data:    1-Course       2-Course       10-Course When sorting by name it returns 1,10,2 . How to order to bring: 1,2,10 ? Ps: The field is NVARCHAR .     
asked by 12.08.2014 / 23:26
1
answer

Order by command with accent in SQLite

I'm programming for Android and using the native database ( SQLite ). I want to make a query in the table of products sorted by name, but when doing SELECT like this: SELECT * FROM produtos ORDER BY nome; it returns, for exampl...
asked by 31.10.2018 / 19:24
3
answers

How to sort a data.frame by columns in R?

Suppose a data.frame with numeric values and strings: set.seed(1) dados <- data.frame(w=rep(c("A", "B"), 2), x= rep(c("D", "C"), 2), y= rnorm(4), z=rnorm(4), stringsAsFactors=FALSE) dados w x y z 1 A...
asked by 17.02.2014 / 18:51
1
answer

How to do a Lambda sort with a List property?

I believe this has already been asked before. I researched but did not find it. I'm having trouble with this query, specifically on the ThenBy command that tries to sort the sub-list of objects. I know it's in it because when you comme...
asked by 21.10.2014 / 18:23
2
answers

Error in ordering positive and negative numbers Jasvascript

I have an array with multiple numbers, these numbers are positive, negative and with decimal too: var array = [365, -1.304, -17.803, -3.529, -3.602, -2.942, -2.074, -115] I need to sort this array from MINOR to the LARGEST . The result y...
asked by 21.11.2016 / 19:22
4
answers

Sort divs by date in the format dd / mm / yyyy

Does anyone know how I can sort a set of divs by a date present in their content? For example: <div class="box" id="box1"> <div class="date">01/05/2018</div> </div> <div class="box" id="box2"> <div...
asked by 19.04.2018 / 19:13
2
answers

JAVASCRIPT: Sort HTML list by name and age

Good evening, I need to sort a list of HTML phrases by user name or by age, depending on which button is clicked. How can I do this? Below is a clearer version of the code: <html> <head> <title>JS</title> <...
asked by 27.06.2018 / 23:56
1
answer

Sort records containing numbers at the end

I have a table with the following records: +----+------------+--------------+ | id | title | url | +----+------------+--------------+ | 1 | Olá Mundo! | ola-mundo-1 | | 5 | Olá Mundo! | ola-mundo-3 | | 6 | Olá Mundo! | ola-m...
asked by 14.02.2017 / 07:37