Most voted "classification" questions
Sorting algorithms are used to lay out the elements of a given list in a certain order defined according to a desired parameter.
Learn more…290 questions
Sort by count of
-
0
votes1
answer290
viewsPhoto gallery ordered in Python
Good morning I’m developing an image gallery listing them from a directory. What I have to do is separate these images or sort in order of creation. I have a script that generates the images as…
-
0
votes2
answers115
viewsSort object array with relation to each other
I came across a problem: I have data from a database that is related to each other so that each field has two others - one that refers to the previous field (in the table) and the other to the next…
-
0
votes0
answers115
viewsSort data Firebase
I am trying to sort my search by date, however I have to look for a value and it is not allowed to use two orderByChild. I need to either find the name passed by the search variable name or sort by…
-
0
votes1
answer75
viewsDifficulty in ordering
I’m doing a program that sorts the words, only if they’re the same size you can’t change places, I’m stuck in that part, the code I already have #include <stdio.h> #include <string.h>…
-
0
votes0
answers305
viewsShell Sort Ordering Algorithm Comparisons and Exchanges Count
How can I count the number of Shell Sort comparisons and exchanges? Where to use counters correctly? void ShellSort(int vetor[], int n) { int i , j , val, comp=0, swap=0; int gap = 1; while(gap <…
-
0
votes1
answer84
viewsSort by custom Fields and by publication date
My problem is this, I have a post_type in the name of "collections" and within it several posts with custom fields "situation of the piece" and "collection of the piece". The result of these two…
-
0
votes0
answers78
viewsHow to make quicksort "manual"
I’ve already made one Selectionsort manual in Pyhon see below: lista = [] # digite 0 para encerrar a entrada de dados while True: x = input('Entrada: ') if x == '0': break else: lista.append(x) nota…
-
0
votes1
answer105
viewsYii2 - How to sort gridview in a form [POST] without losing the filters using Windows arrayDataProvider
I have a form with 14 search fields and half of these fields are arrays, for this reason the form method is POST otherwise shows error (414 - Request URI Too long). I’m using the gridview to render…
-
0
votes1
answer280
viewsCount number of comparisons and exchange in a python sorting algorithm
I need to count the number of comparisons and exchange in the following sorting algorithm: def selecao(lista): c1 = c2 = 0 for i in range(0, (len(lista)-1)): mini = i c1 += 1 for j in range(i+1,…
-
0
votes2
answers95
viewsMergesort sorting algorithm error
I am having a problem with an mergesort sort algorithm in which the output of the ordered vector appears a repeated number and also a memory address. Follow the code: Mergesort /*Funcao que…
-
0
votes1
answer156
viewsReportbuilder report sorting error
In a report built in Delphi7 Reportbuilder I have vendor information in a group header and vendor items in a Detail tab just below. The problem is that it is not possible to sort items (Detail)…
-
0
votes1
answer76
viewsSort on an object [java]
Cheers guys, I’m having a doubt about a project I’m doing just to learn more about the language. following, I have a txt file in which I have to read it and separate the different contents (name,…
-
0
votes2
answers64
viewsHow to create some kind of "dynamic index" in the database
I have a table with 10000 records, but here I will represent with only 10 of them. +-------+---------+------------------+ | index | posicao | nome | +-------+---------+------------------+ | 1 | 0 |…
-
0
votes1
answer51
viewsHow to sort an array using two attributes?
Come on... I have a class Student, which contains the attributes name, idCurst and situation. I also have a vector that stores several objects of the Student type. I also have a method ordain() that…
-
0
votes1
answer58
viewsHow to sort an array using three attributes?
Come on... I have a class Student, which contains the attributes name, idCurst and situation. I also have a vector that stores several objects of the Student type. I also have a method sort() that…
-
0
votes1
answer485
viewsSort using tie-breaker criteria
I need to sort a list of objects with the following criteria: Higher average proficiency levels in each of the technical competence required for the task; If the averages are equal, unpack for the…
-
0
votes0
answers20
viewsArray sorting in C -- Error in float version
For some reason I don’t know, when I change the type of my int function to float it just doesn’t work properly: void organizeArray(float array[], int size){ int aux; for (int i = 1; i < size;…
-
0
votes2
answers152
viewsOrdering values by pointers
Good, I was doing an exercise that asked to read 3 real numbers, order them and show in an orderly way. I thought making a function that uses pointers would be a good idea, but the program always…
-
0
votes1
answer39
viewsHandle 2 json files with Javascript
I have 2 json with the following structure and would like to put them in the same order through id. It is only an example the 2 json originally has more than 1000 lines but follow this same…
-
-1
votes1
answer36794
viewsHow do I place items on a list in ascending or descending order?
I am trying to put the numbers of a list in ascending order but the Sort() method is putting the 10 and its multiples (20, 30) as being similar to itself divided by 10. For example, in the following…
-
-1
votes1
answer216
viewsPython sort list of dictionaries by key and value in separate orders
How to sort a list of dictionaries for example: nomes = [{'nome': 'joao', 'sobrenome' 'alves'},{'nome': 'joao', 'sobrenome' 'silva'}] In alphabetical order the names In reverse order, surnames that…
-
-1
votes1
answer64
viewsBubble Sort in C inconsistent
I’m trying to create the basic structure for a program that uses Bubble Sort. However, when testing its basic structure, I see that the final vector is not being returned correctly. #include…
-
-1
votes1
answer24
viewsVGG16: how to use Dense_2 layer as output - python
I am using vgg16 model for feature extraction https://github.com/fchollet/deep-learning-models/blob/master/vgg16.py call the same through function: model = VGG16(include_top=True,…
python classification image-processing model deep-learningasked 4 years, 9 months ago David Jordão 21 -
-1
votes1
answer91
viewsSort DIV’s by content thereof
I am making a kind of list in Foundation 5. In this list there is a head and the content, I need that when clicking on the field name in the head, the DIV is ordered according to the content in the…
-
-1
votes1
answer916
viewsOrdering a list of strings in python
Staff need to sort a list that inside it there is another list containing exactly a string and a number, the problem is that I’m not getting the desired result, let’s put an example, if I have the…
-
-1
votes1
answer651
viewsSort Array by data time in php
Hello, I have already looked into the matter but I have not yet obtained anything that works properly. I have a database with multiple orders and these have a deadline and also a fixed date, but the…
-
-1
votes1
answer137
viewsPHP - Sort object by date without key
I am receiving from an API the following object: { "30/01/2019": [ { "type": "document", "filepath": "url", "recipients": [ "Todos" ], "category": "Ata", "date": "30/01/2019" }, { "type": "note",…
-
-1
votes1
answer136
viewsHow to make a program in java that tells you which positions are ahead and behind a word
This method tells how many words you have in a sentence: public static int pesquisaPalavra(String palavra) { String frase = "Deus é bom o tempo todo, o tempo todo Deus é bom"; String[] arrayString =…
-
-1
votes1
answer96
viewsMultivariate analysis with only one table
1 I am trying to relate quantities of polykets in oyster samples from different locations, the locations and quantities are in the same table, I started by boxplot to have medias and variables in R,…
-
-1
votes1
answer72
viewsHow to classify a.csv file column without using PHP Sort functions?
I need your help to complete a college activity. I have to sort the rows of a.csv file according to one of the columns and display the result. I could use the array_multisort, but I need to write it…
-
-1
votes1
answer45
viewsdata not ordered after execution C
I need to put the columns a in order, however, only the names are getting sorted correctly. The functions that sort the notes and sex are not working. Can anyone tell me where I’m going wrong? The…
-
-1
votes1
answer159
viewsPython dictionary Alphabetical order and duplicate existing dictionary
Personal I am in doubt on how to write on the screen for the user the values of the dictionary without the bracket and in alphabetical order. I am also doubtful on how to make two new dictionaries…
-
-1
votes1
answer58
viewsHow do I alphabetize the Telephonic list that is separated between older and younger?
Before making a Phonebook containing name, phone and age, after capturing the data, I need to separate them into older and younger 18 years and print on the screen the result with all the data…
-
-2
votes1
answer207
viewsSort Map<String, Map<String, Map<String, Long>>
Hi, I did a search but I couldn’t find this sort of sorting by the last value of this Map. I need to order a Map<String, Map<String, Map<String, Long>>> for the last Long value, to…
-
-2
votes2
answers142
viewsHow to sort an object with Javascript?
I’m creating a function that takes elements from a . json file and creates options for a select in HTML dynamically. This file is ordered, but when it is presented in HTML it is disordered. Example…
-
-2
votes1
answer30
viewsIn a df, how to select items in column with datetime format, classify them into periods (morning, afternoon and evening) and place them in a new column
Hello!!! I am looking for help to solve the problem below. My df has a ' DATA column with format 29/01/2019 17:50:11), which by default is converted to 'object' type pandas. All in all, it has 640…
-
-3
votes1
answer156
viewsMajor algorithms of sorting?
What are the main sorting algorithms? If possible with examples in C. I don’t know when to use one or the other.
-
-3
votes1
answer123
viewsLogical Problem Bubblesort Sorting Method
I am sorting numbers from a CSV file. I import the numbers and step into an Array List and convert the ArrayList<String> for ArrayList<Integer>. It turns out I’m having a little logic…
-
-3
votes1
answer87
viewsPython - List sorting without Sort()
I was studying this list ordering code and there are some things I didn’t understand: Why is it necessary to break? Why leave the else ident with the if and without the break doesn’t work? Why with…
-
-6
votes2
answers120
viewsHow to organize a JSON by date
I have this JSON and I must arrange it by data: { "clients": [ { "id": 1, "name": "Juca" }, { "id": 2, "name": "Beto" } ], "purchase": [ { "client_id": 1, "data": "11/04/2021", "total": 100.0 }, {…