Most voted "order" questions
Use this tag for specific questions about sorting results into datasets.
Learn more…40 questions
Sort by count of
-
11
votes1
answer1619
viewsThe order function in R
I don’t understand what happens. Watch > 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 don’t understand why vector x is not ordered. Note, when I give order(x)…
-
10
votes1
answer5341
viewsOrder By with List<>
It is 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:…
-
7
votes3
answers2562
viewsSort SQL by 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 ordering by name it returns 1,10,2. How to make order to bring: 1,2,10 ? Ps: The field is NVARCHAR.…
-
6
votes3
answers17265
viewsHow to sort a column-by-column data.frame in R?
Suppose a data.frame with numerical 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…
-
6
votes1
answer396
viewsOrder by command with Sqlite accent
I am programming for Android and using the native database(SQLite). I want to make a query in the product table ordered by name, but while doing the SELECT thus: SELECT * FROM produtos ORDER BY…
-
5
votes1
answer263
viewsHow do I sort Lambda by a List property?
I believe this has been asked before. I researched but did not find. I’m having trouble with this consultation, specifically in charge ThenBy that tries to sort the sub-list of objects. I know it is…
-
3
votes1
answer3650
viewsSort object array
I have as a result of a query to the database the following data: Array ( [0] => stdClass Object ( [id] => 1 [nome] => Pizzaria 1 [latitude] => -8.12044775643893 [longitude] =>…
-
3
votes2
answers260
viewsError sorting positive and negative numbers Jasvascript
I have an array with several numbers, these numbers are positive, negative and decimal as well: var array = [365, -1.304, -17.803, -3.529, -3.602, -2.942, -2.074, -115] I need to sort this array of…
-
3
votes2
answers1105
viewsJAVASCRIPT: Sort HTML list by name and age
Good night, I need to sort a list of HTML phrases by user name or age, depending on which button is clicked. How can I do this? Below is a clearer version of the code: <html> <head>…
-
2
votes4
answers745
viewsSort Divs by date in dd/mm/yyyy format
Does anyone know how I can sort a set of Ivs through a date present in their content? for example: <div class="box" id="box1"> <div class="date">01/05/2018</div> </div>…
-
2
votes1
answer24
viewsWhat is the behavior of the "order" property when not defined?
My goal is this: The site has a shopping area that displays 3 different plans. When this plane area is accessed on a screen larger than 800px wide, it is displayed as follows: The plans are laid out…
-
1
votes1
answer2993
viewsHow to loop a custom post type by following the menu_order?
On a static page in wordpress I’m looping a custom post type from a list of services as follows: $temp = $wp_query; $wp_query = null; $wp_query = new WP_Query();…
-
1
votes1
answer285
viewsHow to sort a category post by a Custom field?
I have a platform in Wordpress where a particular category has a Custom field (a date). You can make sure that when you show posts in this category they are sorted by the Custom field I added?…
-
1
votes1
answer263
views -
1
votes1
answer96
viewsSort 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…
-
1
votes0
answers52
viewsSort Metrogridview content by clicking on the Heder title of a particular column
Hey, guys, I got a problem, I’ve been fighting for a while. I am using in my application Metroframework and Linq,and noticed that Metroframework does not have certain properties or that they do not…
-
1
votes1
answer268
viewsjava Response json out of order
Guys I’m making a java API to be consumed by Excel. I’m making a bank select by bringing the columns in the right order, but when it arrives in Excel it arrives in a half crazy order. I also made a…
-
1
votes2
answers245
viewsorder by in oracle subquerys
RESOLVED I solved as follows, I created a view equal to my table of service orders more that was ordered by the team and by the priority, and then I kept the query above by only changing the table…
-
1
votes1
answer396
viewsHow to organize an array by size automatically?
I was looking to create a ranking system. For this I thought to put all the values within one Array and then through a function arrange it from the largest to the smallest. However, each time I make…
-
1
votes1
answer30
viewsSelect in Mysql sorted by the WHERE condition
I have a database in Mysql designed like this: id, nome At the following values: 1, Banana 2, Maçã 3, Uva 4, Laranja I have a select like this: select * FROM table WHERE id = 2 OR id = 1 OR id = 4;…
-
1
votes1
answer900
viewsSort a chained list with Java Selection algorithm
I am working on sorting algorithms. I have implemented sorting with Bubble Sort, however, must be implemented with an example where the algorithm is not stable( Selection ,Quicksort, Heapsort or…
-
1
votes0
answers68
viewsStreamline HTML with JQUERY
Hello, I’m having difficulties in a JS activity, I must make the last publication should be displayed first, already tried Sort, tried Sort with Function and nothing resolves, I can change the order…
-
1
votes2
answers133
viewsMysql - Sort a table and keep records together
I have this table below inside Mysql to which I need to order it from the following form: The table must be ordered in order of CPF. But I need the license plates that match, and I need them to…
-
1
votes1
answer37
viewsReorder Listbox with Drag and Drop
Good morning friends! I have a Listbox in my application C# Windows Form. I’d like a way to use the events Drag-n-Drop for reorder the items within the listbox the way the user wants it. Basically I…
-
1
votes1
answer64
viewsHow could I sort a list of records, from a certain attribute of my class in C#
How could I sort a list of records, from a certain attribute of my class as "Code"? My class being next: private int Codigo; private string Nome; private float SalarioMensal; private string CPF;…
-
1
votes1
answer93
viewsSorting objects in Javascript
Good evening, I’m having a difficult to sort array in javascript, the problem is that I need to sort it first by number of characters, ( Words with more characters appears first), I’ve done that,…
-
1
votes1
answer106
viewsSorting the contents of an Array
I have the following Array with the relevant data applied: Card Number Month (Validity or Maturity) Year I get this data from a API but in a "disorganized" way. I would like to treat these values to…
-
0
votes1
answer59
viewsOrder by timestamp dataTables Angular js
Good morning wanted to sort a datatable of Angular JS by a column that is a timestamp of descending form and for that I used: controllerScope.logsData = { ajax: { url:…
-
0
votes0
answers426
viewsSort GRID fields in alphabetical order - Delphi
I need to sort the grid fields of my chart in alphabetical order (Usage Delphi 10.1 Berlim and the component TcxDBPivotGrid devexpress), See attached image: OBS -> I need to order the fields that…
-
0
votes2
answers719
viewsHow do you put this in the ascending order?
<?php $var = 5; for ($i = 0; $i <= $var-1; $i++) { $new_data = array($i => $count[$i]["rank"]); foreach ($new_data as $i => $key) { print(var_export($key).","); } } ?> he returns it:…
-
0
votes2
answers913
viewsSort data by date in Firebase
I would like to sort the data returned from Firebase by Due Date, at the moment I am doing as follows: this.Collection = document.collection('values', ref => ref.orderBy('data_vencimento')); But…
-
0
votes1
answer412
viewsmysql select order by starting with today’s date
I have this appointment that seeks birthdays of the month: $mesHoje = date("m"); $sqlAni = $pdo->prepare('SELECT * FROM aniversario WHERE MONTH(dia) = :mesHoje ORDER BY dia ASC');…
-
0
votes2
answers690
viewsSQL - group by, Count
Good afternoon, I currently have the following code and result. I would like instead of having this result, to have only one row for each type (column 1), this row being the one whose column 4 has…
-
0
votes0
answers34
viewsSort 3 arrays according to the first array
I have 3 separate arrays in $Students, $sites, $considerations. I’m trying to sort my data output by $Students array. When I sort the $Students array, the other two arrays that have line-to-line…
-
0
votes1
answer441
viewsHow to get the index comparing two lists of different lengths in Python?
I have two different lists in two CSV files. The first list has 47843 items and the second 813331, which is the first multiplied by 17. I want to take the index position in the first, based on the…
-
0
votes1
answer64
viewsDetermine display order of ordered queries in MYSQL
I have three types of orders in the table and need to get the result so I choose who will index first. I specify the respective indexing order: ( ORDEM_COMUM IN FIRST ) ordem_comum,…
-
0
votes2
answers44
viewsChoose the order in which items are listed in Mysql
I have a table with three types of order, ordem1, ordem2 and ordem_especial . How can I list items in that order: EXAMPLE: ordem2 ordem_especial ordem1 I tried unsuccessfully something like : REAL…
-
0
votes1
answer35
viewsProblem sorting data resulting from Inner Join
Guys, I have a basic question but I’m having a huge difficulty in making an appointment. I have a protocol system in which protocol data is recorded in a table called PROTOCOL and the updates of…
-
0
votes1
answer181
viewsSort object list with PHP
Good afternoon, I’m doing an activity to get a little more handy with PHP, and I decided to take the data from a cvs file, and show them on the screen... until then ok, I got it. But I had the idea…
-
0
votes1
answer33
viewsProblem when trying to split an array of randomly ordered numbers into two equal parts using Godot/Gdscript
I am currently creating a game in Godot 3.2.3, and in this game I need to create an array that contains numbers from 1 to array.size() (example:[0,1,2,...,30]) and that such numbers are in random…