Questions tagged as 'array'

1
answer

How to use ForEach in a multidimensional array in PHP

I would like to know how to run the entire array with ForEach only: $Marcas = array(array('Fiat', 'Volkswagen', 'Audi'),array('Yamaha', 'Suzuki', 'Honda'),array('Samsung', 'Motorola', 'Apple'));     
asked by 07.06.2018 / 23:13
1
answer

Error ArrayIndexOutOfBoundsException

I'm in this error: java.lang.ArrayIndexOutOfBoundsException: 1 at com.ronaldocarvalho.cursomc.resources.utils.URL.decodeIntList(URL.java:27) ~[classes/:na] at com.ronaldocarvalho.cursomc.resources.ProdutoResource.findPage(ProdutoResour...
asked by 22.05.2018 / 19:34
1
answer

Generate a list of sentences ordered by arraySort () in js

I'm trying to create a list of sentences sorted alphabetically using arraySort () in JS, but using the code below, returns a duplicate phrase. Any idea how to do it differently? //Cria lista de textos var lista = []; lista.push( "Amanhã vou...
asked by 17.05.2018 / 00:27
1
answer

How to get values from an array without array.push

I'm trying to get a user's location and it keeps updating from time to time, searching, I found this method, but I can not just do this with the current value of the array, it concatenates (push) and adds infinitely .. does anyone know how I can...
asked by 06.05.2018 / 23:09
1
answer

Wrong Output in C

I'm doing an activity and the result is giving values that I do not assign anywhere in the code. int main(){ int numeroDePessoas = 0, tarefa = 0; scanf("%d %d", &tarefa, &numeroDePessoas); float passageiros[numeroDePessoas][5]; for...
asked by 23.04.2018 / 02:10
2
answers

Number of elements that have at least the reported value

I have an array that can be any size, an example below: Array ( [0] => 40631 [1] => 40626 [2] => 40622 [3] => 40633 [4] => 59632 [5] => 40630 [6] => 40623 [7] => 40627 [8] => 40628 [9] => 54828...
asked by 13.04.2018 / 02:53
2
answers

Wordpress plugin error, ie blank field in array

Good evening! I'm developing a website for a restaurant, and I've installed a table-top booking plugin, called ( link ) The following happens, when I upload the site by hosting the time field, it does not work, it goes blank; even reinstallin...
asked by 11.06.2018 / 03:24
1
answer

Grouping, assigning and sorting values of a multidimensional array in PHP

Hello everyone. I have the following multidimensional array in PHP: Array ( [0] => Array ( [0] => teste0 [1] => 1 ) [1] => Array ( [0] => teste1 [1] => 1 ) [2] => Array ( [0] => teste2 [1] => 2 ) [3] => Array...
asked by 11.06.2018 / 05:32
2
answers

Remove element from a Vector in "C"

I need to fill two vectors, A and B, with 10 elements each, then make the Intersection and the Union, in the union, I have to remove the repeated elements. At the moment, the intersection was made, within the intersection for I put in another...
asked by 20.05.2018 / 18:03
1
answer

Why does my array return an undefined

I have this code, but I want to access a attribute of an object that is within an array , but is returning undefined obj1 = { nome : 'name', array : [], funcao : function(element){this.array.push(element)}, getArra...
asked by 10.04.2018 / 23:37