Questions tagged as 'array'

2
answers

why is 8 appearing and not the number referring to i?

<style> .menu > li:hover .sub-menu{ display:block; } </style> <ul class="menu"> <li>li 1</li> <li>li 2</li> <li>li 3 <ul class="sub-menu"> <li>l...
asked by 08.05.2016 / 19:07
3
answers

Array sequenced within dropdown

Folks, I have a code that starts the arrays if I set the values, but I would like this sequence to be automatic. Let me show you to get clearer. <?php $busca_produtos = new Produto; $produto = $busca_produtos->busca_todos_produtos()...
asked by 04.09.2018 / 14:35
4
answers

Transform a Normal Array into Multidimensional

I have an array in this format: meuArray = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ...]; I would like to turn it into a multidimensional array with javascript / jquery leaving it like this: meuArray = [ [0] => [...
asked by 24.11.2016 / 12:57
4
answers

How to concatenate two byte arrays in Java?

I have: byte mensagem[]; byte nonce[]; How do I concatenate the array nonce at the end of the array mensagem and store it in a third array?     
asked by 20.05.2015 / 23:09
3
answers

How to compare 2 Arrays with Assert.Equals?

I need to compare two arrays in Assert.Equals . When I test the method on the race, it is correct but the test does not pass. Code: public void SeparaStringTest() { RecebeComando recebecomando = new RecebeComando(); string[]...
asked by 16.03.2017 / 13:07
2
answers

Separate equal values into an array

Well I have the following array: $produtos2[] = array( "cod" => (int) 768, "nome" => "LOGITECH M535", "GRUPO" => "MOUSE" ); $produtos2[] = array( "cod" => (int) 2334, "nome" => "MULTILASER DECT", "GRUPO"...
asked by 16.03.2018 / 14:52
2
answers

Difference of C / C ++ Array Declarations

What difference and impact do each of these 3 vector statements bring to my code? int n; cin >> n; int* arr = new int[n]; int n; cin >> n; int arr[n]; int n; cin >> n; vector <>int> arr(n);     
asked by 06.05.2017 / 19:31
2
answers

Logic to group data in array javascript

I'm having trouble grouping some data using JavaScript . I have the following array of objects that return from the database and send it to view : var object = [ { data: 1, categories: "Branca", name: "Feminino" }, { data: 1, ca...
asked by 09.11.2018 / 00:59
3
answers

Assign values to arrays

I noticed that by incrementing a value to a array using the following syntax: let array = []; array['nomeIndice'] = 10; length of this array is not incremented, and remains in 0 , even though array contains...
asked by 12.08.2018 / 18:15
2
answers

Unusual way to use a function in jquery

This answer to a question brought something I did not know: a return with two pairs of brackets return[][] in a function, solving a problem in a simple but unknown way for me. The question asked for the return of the correct day...
asked by 15.12.2016 / 13:03