I have a ArrayList that is preloaded with some objects of the type of my Person class, see:
ArrayList<Pessoa> listaDePessoas = new ArrayList<>();
listaDePessoas.add(new Pessoa("Joao", 29));
listaDePessoas.add(new Pessoa("Ana...
I have two arrays with objects in javascript:
var a = [{objeto1}, {objeto2}, {objeto3}, {objeto4}, {objeto5}];
var b = [{objeto1}, {objeto2}];
How can I do what is in the array b exit the array a ?
I'm starting in python and always end up with some doubts in the beginning.
I need to know how to test if a list is empty.
As I always say, I come from PHP.
So I used to do these forms:
count($array) == 0
empty($array);...
I was studying about the lists in C # and I could not understand what's wrong with my code (it's probably going to be pretty basic), all items are the same as the last item added. I've simplified the code to focus on just that part of the erro...
Good morning, excuse my ignorance by simple doubt. I'll get right to the point.
I have a list of alerts
List<Alertas> alertas;
This list contains several messages sent to some users, I have the following methods that I can use:
g...
I am writing a program that receives a specific amount of values, and returns the lowest value in the list and its position. It is as follows:
quantidade = int(raw_input())
numeros = raw_input()
NumerosNaLista = numeros.split()
if len(NumerosN...
I have the following array
$array = [25, 'Wallace', '26 anos', 'linguagens' => ['PHP', 'Python', 'C#']
I would like to use the list function to capture some elements directly in variables, like this:
list($id, $nome, $...
I have a view in the bank of my application where I count the user's name, his sector and the total number of records issued (tale from another table):
TotalPorUsuario (View) Table
Columns: name (string), sector (String), total (i...
How can I use list comprehension for this case:
>>> a = 'A'
>>> lista = [1, 2, 8, 5, 10]
>>> l = [a, num for num in lista if num%2 == 0]
File "<stdin>", line 1
l = [a, num for num in lista if num%2 == 0...
Imagine the following scenario: A list of Object[] . Something similar to this:
List<Object[]> lista = new ArrayList<>();
Object[] dados = new Object[3];
dados[0] = 1;
dados[1] = 20;
dados[1] = "cristiano"...