Questions tagged as 'lista'

2
answers

Generate random numbers in Python without repeating

I have the following situation: I have a vector with 4 indexes. At each index a random value of 0 to 100 is generated. I have a code that does it perfectly, but sometimes the numbers repeat. Below the code: from random import randint...
asked by 06.04.2017 / 04:28
2
answers

Why do not you have to instantiate the list to not accumulate?

I have the following class: public class TesteLista { public static void main(String[] args) { List<String> dados; Teste1 t = new Teste1(); dados = t.getList(); System.out.println(dados); } } Class that has method...
asked by 26.09.2017 / 20:12
2
answers

Sort a List in java that contains null values

Good morning! In my List , when I do the sort order I would like the null values to last. I'll show you an example to get clearer: Code output (in this case the word would be the letter after the number): SEM ORDENAÇÃO: 10c 2...
asked by 24.01.2018 / 14:20
1
answer

Question: Dynamic list chained inside another, in C

I'm having a hard time getting a dynamically linked list inside another using data structure and manipulating it, as I have not found anything that exemplifies how to create a list within another. I can create a single dynamic list, but I can no...
asked by 04.05.2015 / 04:18
4
answers

How to return values from a List in C #

I have a class Funcionario that has attributes: CPF , Nome and Salario . I have to create an X amount of instances of this class in a List<> and after that, return to the user the values of this list. Wi...
asked by 03.09.2018 / 14:45
3
answers

Reverse method returns None

I'm applying the reverse method to a list and it returns None . Ex. teste = ['audi', 'subaru', 'fiat', 'ford'] print(teste.reverse())    None     
asked by 12.09.2018 / 03:10
2
answers

What is the most efficient way to clean a List (List) with C #?

I have a scenario here where I create a list to check some items, and I need to clear this list inside the loop, and I had some doubts about performance Should I check the list before cleaning? ( .Any() ou .Count > 0 ? ) to not exe...
asked by 12.02.2018 / 10:46
2
answers

Remove elements from a list that have part of a character or that are of a certain class

Consider the list: mylist=structure(list(quem = 1:10, quer = c(1.1, 2.1, 3.1, 4.1, 5.1), isso = structure(list(X__1 = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), X__2 = c(123, 456, 789, 1122, NA, 1788, NA, 2454, 2787, NA, 3453, 3786), X__3 =...
asked by 04.12.2018 / 04:10
2
answers

Check for different elements in a list in R

I have a list that each element is a data frame containing various information about a particular pension provider. In the CLASSE column there can only be one type and I need to know who has more than one type. How to create a colu...
asked by 26.09.2017 / 14:33
2
answers

List separated by "-"

The theme is as follows: I have a list [1,5,3,6,22,45,63,30,344,22,12,25,10] And I wanted to print the elements of this list on a single line and separated by "-". I've tried it that way lista=[1,5,3,6,22,45,63,30,344,22,12,25,10]...
asked by 29.04.2018 / 17:51