Questions tagged as 'array'

0
answers

How to join information in a multidimensional array having the value of a key as a base?

I'm trying to organize a multidimensional array (just one) so that a child array always looks like your parent's "children", given your id. If there are duplicates, it should join (so that only one is left). I have tried to mix functions l...
asked by 04.06.2018 / 17:38
0
answers

How to use each and list in a multidimensional array

I need to traverse the entire multidimensional array with each and list only. Here is the code: $Carros = array( array("BMW", 130000, "Novo"), array("Strada", 40000, "Usado"), array("CRUZE", 100000, "Semi-novo") );...
asked by 08.06.2018 / 19:21
1
answer

char and constructors in c ++

I need a constructor for a class that has char vectors as attributes, like this: class Anthem { private: int Id; char Name[50]; char Country[50]; int Year; char Composer[30]; char Historic[20...
asked by 30.05.2018 / 20:04
2
answers

Use array_search in a multidimensional array php

In a list of books within a% multidimensional%, every array has a different column category , I would like to search this sub_array for a category > for example: Array "livros" ( [Livro 1] => Array...
asked by 19.11.2016 / 00:45
2
answers

Combine array of alternatives with array of php / jquery question

My question is this: I have this jquery code where I capture all the questions of a test and just below the alternatives of it; but I can not relate the alternatives to the questions, someone can help me, I tried everything I think. follows h...
asked by 18.05.2018 / 09:51
0
answers

How to jump to the next value of the two-dimensional array and start this value

I would like to get the value of the second array index "game [0] [1] = [" 1 "," 15/06 "," 09:00 "," Egypt ", I have to skip to the next game (next line) until I find a game that hits the condition of my if ... var atualizacao="10/05/2018 17:0...
asked by 15.05.2018 / 14:52
1
answer

How can I filter objects in a Array with Typescript?

Example: function isBigEnough(element, index, array) { return (element >= 10); } var passed = [12, 5, 8, 130, 44].filter(isBigEnough); console.log("Test Value : " + passed );     
asked by 13.05.2018 / 08:10
0
answers

accumulate a value for each for () before adding to the array

I have a List that contains objects of the type of ProductBuy. My question is the following, I need to go through the ArrayList of this class and generate a new array with the total payable per vendor report, that is, I have to keep the vendo...
asked by 18.05.2018 / 18:32
1
answer

Array in JavaScript showing duplicate values

I'm making a very basic JavaScript registration code. However, after I register my data and store it inside the vector and display it, the data is duplicated. If I type Code: 1 Name: 1 and Author 1, it shows 3 times the code, 3 times the n...
asked by 12.05.2018 / 03:01
1
answer

How to do operations between arrays in python

Hello, I'm learning python, I saw the basics and I'm in a problem where I need to do operations between arrays. I have, for example, two arrays of equal size D. For each index I in the array, I want to make the difference between the two i-th el...
asked by 11.05.2018 / 00:49