Most voted "list" questions
A list is an abstract type of data that represents a sequence of values, in which the same value can occur more than once. The main ways to implement a list is through an array (array, vector or one-dimensional matrix) or a chained list.
Learn more…1,022 questions
Sort by count of
-
0
votes1
answer95
viewsCreate php list of valid ips for a mysql table
Good morning guys, I need to create a list of valid ips from my network. I have 15 class A subnets. That is, my network is 10.5.5.0 until 10.5.20.255. I was thinking something like: $IP for (i=1;…
-
0
votes1
answer555
viewsError >> TESTE500K.c:(.text+0x8f): Undefined Reference to `INSERT' <<
Guys, I’m trying to create a list but it’s making these mistakes TESTE500K.c:(.text+0x8f): Undefined Reference to `INSERT' TESTE500K.c:(.text+0xa5): Undefined Reference to `IMPRIME' [Error] Ld…
-
0
votes1
answer54
viewsDoubt - Hashmap
I need to go through a list of hotel reservations and, for each such reservation, capture the Event that is associated with it. At the end of the process I need to say how many hotel reservations…
-
0
votes1
answer540
viewsHow to assign the elements of a list to different variables in Python?
I have a list, like the following: lista = [1, 2, 3, 4, 5] Even without knowing how many elements there are inside the list, how do I assign each element of the list to a distinct variable? (as in…
-
0
votes1
answer804
viewsHow to create a list of objects of variable size, and assign their attributes without listing them one by one?
I need to read a file and pass your information to a list of objects. The file is in format: "attribute 1", "attribute 2", "attribute 3", ...,"attribute" each row contains the information of a…
-
0
votes1
answer50
viewsDoubt - Hashmap & List
My need was as follows: A report that would bring the Event and the number of hotel reservations that was associated with that Event. And so it followed as the code below shows:…
-
0
votes1
answer133
viewsList in Android Studio
I have a listview that brings data when I add it to mine ArrayAdapter. For example: adaptador.add("algum dado"). But I wanted this listview to bring data from a register of products, such as the…
-
0
votes1
answer792
viewsHow to remove a dropdown from within a list
Good Afternoon, I have a problem with a job that is: I have a function that needs lists to organize various elements according to predefined characteristics. My question is how to remove a dropdown…
-
0
votes1
answer97
viewsError: Could not parse type 'xxx[]' because it does not have any known mapping to the value layer
In the controller I have my session built. public const string ListaPermissao_SessionName = "ListaPermissao"; private List<ListaPermissao> ListaPermissaoEnvio { get { if…
-
0
votes0
answers434
viewsI need to pick up and display a list of client objects by Id
MY CLASS CLIENTEBUS class ClienteBus:AplicacaoBus<Cliente> { public ClienteBus() { Tabela = new List<Cliente>(); } } MY CLIENT CLASS class Cliente:Entity { private static int _Id; public…
-
0
votes1
answer306
viewsString Encoding - Haskell
The following code encodes a sequence of equal characters, replacing the sequence with ! na, where n is the number of times the character a is repeated. Note that it only compresses sequences…
-
0
votes1
answer147
viewsInsert in list order in C
I have the following function: Nodo * insertOrder(Nodo *L,Nodo *nv){ //11,1,50,7,5 if(L==NULL){ return nv; } if(nv->id < L->id){ return (insertFirst(L, nv)); } int c=0; Nodo *aux2=L; Nodo…
-
0
votes3
answers127
viewsHow to clear a list without losing all positions?
In my application in C#, I have a list List< float> where I store data arriving through serial port. With the execution of the application in progress this list begins to get huge. I am not…
-
0
votes2
answers111
views -
0
votes3
answers347
viewsReturn the oldest person from a list with tuples
The question is this: ; Consider that a person has the format Tuplo - (name, year of birth, city). Create a senior function that receives a list of people and returns the oldest person in the group.…
-
0
votes1
answer101
viewsError in the interlayer method elements with Mergesort in a List<Integer>
This part of the algorithm has the function of bridging the elements of a List<Integer> (list of normal integers) using the Mergesort sorting algorithm. ERROR ON LINE 7 private static List…
-
0
votes1
answer51
viewsProblems when creating lists
I am trying to get the program to create a list with the name of the files found in the directory and within each entry of this list, create a list of strings with the contents found inside the…
-
0
votes1
answer1589
viewsDouble chained list printing in reverse order
Good morning, this is my first post here at Stack Overflow. I was trying to get a double-chained list printed in reverse order. However, after going through this list in reverse, it produced the…
-
0
votes1
answer75
viewsSimply Chained Linear List
My question was how to do the program without dynamic allocation, I’m learning LLSE now, and everyone I think is with dynamic allocation, but my teacher said he would only use dynamic allocation in…
-
0
votes3
answers703
viewsHow to leave the program open in python
I made a program that reads a file but it reads and already closes, how to add a 'Press S to exit' for example and leave the print on the screen for longer? -below is the code…
-
0
votes1
answer29
viewsHow to get duplicate items for specific Ids?
How do I get the list of repeating items with the same fpId and eclId? var lst = (from fp in FPIds from et in ETIds from ec in ECIds join eclp in ECLP on ec equals eclp.ecId join ecl in ECL on…
-
0
votes2
answers596
viewsChained list - Error inserting element - [Warning] Passing argument 1 of 'strncpy' makes Pointer from integer without a cast
Good afternoon, would you be kind enough to help me with my project? I have to create a chained list that records bus schedule data, but when I try to execute, soon after entering the time data…
-
0
votes1
answer430
viewsObject list for another Activity
I’m trying to save a list of objects with sharedpreference and gson. And the idea is that I can upload this list to a Listview, I ran the tests and when it goes to listview it only loads the…
-
0
votes1
answer37
viewsAndroid: Use component id as key in Array
I have an Android app that has 7 imageButtons, need to store the captured images in a List Bitmap, I am trying to define the indices of the array list as the id of the imageButtons, however the…
-
0
votes1
answer72
viewsReturn/save problem in a JAVA list
Good night, I have a Master Class: import static javax.swing.JOptionPane.*; import java.util.ArrayList; import java.util.List; import static java.lang.Integer.parseInt; public class Principal {…
-
0
votes1
answer53
viewsHow to create a list of objects?
Good afternoon, I’m developing a project. NET Core Razor Pages and in it I will need to create and add items in a list... these items are strings and are extracted from an XML. I’ll leave a part of…
-
0
votes1
answer213
viewsPopular List c#
I’m trying to return data from a list in a foreach. In the first foreach, it is returning the correct data, but it is not recording in the nflist variable of the first foreach, so as soon as it…
-
0
votes1
answer168
viewsCreate a list with a Model and an Int in C#
I have the following class: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Dynamic; namespace Model { class PromocaoQtdeVendidaModel { private int…
-
0
votes1
answer895
viewsFirebase for a List
I need to take all the data from firebase and create a list, to use in a listadaper that I created. This is the structure of the Bank in Firebase: As you can see, I want to get all the child…
-
0
votes1
answer359
viewsAppear list only when Searchbar is filled - Ionic 3
Hi, I’m using this Separchbar code and it’s working. But I want the list of items to appear ONLY when you have something written in the Archbar. Basically I DO NOT want a "list of all items" to…
-
0
votes1
answer298
viewsHow to pass the reference of an object?
I am trying to pass the reference of an object that is in a list to another list, without needing to delete the object and updating the first list so that the object is no longer referenced in it.…
-
0
votes0
answers36
viewsProblem in removing nodes on a list
Good night, I’m doing a show that’s sort of a "Candy Crush" on SDL. And I needed your help to help me remove the balls from the game, which in this case are the nodes on the list. The program is…
-
0
votes5
answers158
viewsPython - Function that copies content from one list to another list
I need a function (copie_list, transcribed below) that takes two lists, dest and orig, and copies the content of orig to dest, see example below: >>> a = [8, 9] >>> b = [1, 2, 3,…
-
0
votes1
answer53
viewsHow to pass a value to a list and make it static?
I have a list of objects that I am filling it in as follows: var props = type.GetRuntimeProperties(); var obj = new T(); for (int i = 0; i < readerCache.Count; i++) { var prop = props.Single(x…
-
0
votes1
answer432
viewsHow to change an attribute in a list of objects and write that list in a file
I have a list of objectsconList I want to change an attribute of an object and then write that list in a file, where each line of the file is an attribute of each object in the list. How do I do it…
-
0
votes2
answers81
viewsPython: Return a list in 2D format
I want to use the __str__ to receive a list and returns it in the form of a matrix. Example: list_exemplo = [[0,1], [2,3]]would return as: [[0, 1], [2, 3]] How do I do it in the method __str__?…
-
0
votes2
answers146
viewsHow to associate items from a String list to the code name of a C#label?
My goal is to play a hangman’s game. Basically my problem is this: I have a word divided into substrings for each letter of the word, all stored in an array. For example: string[] letras = new…
-
0
votes1
answer582
viewsHow to take the item information from a java listview and insert it into an android studio textview?
I am learning to program, and I started a project in q shows the information about the Formula 1 teams, such as pilots, age, nationality and titles of each. When you click on an item, you will be…
-
0
votes1
answer8329
viewsFormatting two decimal places using list (Python)
I have a question about the formatting of decimal digits using two houses, for example "2.00", I did this exercise but I have a little problem that I can not solve as I do not know if there is a way…
-
0
votes2
answers84
viewshow to get the element from a list based on another list
I wanted to remove a doubt I’m having with lists in Python, follow an example below: lista1 = [2, -1 , 4, -5] lista2 = [1, 2, 4, 9] As long as the list element is > 0, I need to take the list…
-
0
votes1
answer44
viewsProgram Crashing at random
I am working with C++ Lists and while doing the following list implementation code: #include <iostream> using namespace std; class NO{ int idade; string nome; NO *no; public: void…
-
0
votes1
answer732
viewsLoop to run python scripts
I have a loop process to run scripts in parallel, but the VPS that I will last does not allow to use parallelism, In that case I need to create a code like: scripts = [ 'siteodonto.py',…
-
0
votes1
answer588
views -
0
votes2
answers455
viewsRead a TXT file and put its content into a Linkedlist
I need to read a TXT file and add its contents to variables in a list. However, the file does not have the same amount of characters on all lines. In the input we have a sequence of two numbers in…
-
0
votes1
answer303
viewsSimply chained list - Method problem
I’m having a problem with the method delete_find_number of my code. It is as follows: this method must exclude a specific number which is passed as a parameter. After receiving the parameter, this…
-
0
votes0
answers1141
viewsHow to read . csv file and use as a list in Python
I need Python to read a CSV file and use the data in it as a list. example of CSV data francisco, carlos, melo, luis, claudia, and I need that after reading Python use this data as this list below:…
-
0
votes1
answer748
viewsEfficient method for comparing lists
I have a problem where I need to compare Strings and define their proximity. The problem is that I have a list with 21,000 records and I need to compare them all, with each other, which would give a…
-
0
votes5
answers821
viewsAvoid blank input data
I have an empty list that will be fed by inputs. In case, how do I go through the list and check if any data has been entered blank and treat it to fill in again? Example: lista = [] variavel_1 =…
-
0
votes4
answers2542
viewsAccess list element within Python list
I have two lists within a list and each index of the list contains an ordered pair, in this way: [[2, 5], [3, 6], ..., [x, f(x)]]. I want to know how to access a specific item of one of the lists,…
-
0
votes0
answers69
viewsDoubt about relationship implementation N:N using C#
I am having to make a relationship between classes N:N but storing objects in memory, follows the following relationship: I did the implementation as follows and I would like to know if it is…