Questions tagged as 'array'

1
answer

Difficulties getting values inside an array

I am making a code where I select information from the database and feed an array, in the sequence I am trying to use the contents of this array to compare with other information and process the rest of the code. But I'm having trouble gettin...
asked by 06.10.2017 / 02:52
1
answer

JavaScript Array with JSON object

I have the following objects: var category = [ {"category" : "fruity"}, {"category" : "Cakes"} ] and var products = [ {"description" : "Apple", "price" : 12.99, "category" : "Fruity"}, {"description" : "Peach", "price" : 1...
asked by 01.09.2017 / 00:38
1
answer

Strange values when generating array in a dynamic object in PHP

Follow this example code: class Object{ private $keys = []; private $values = []; public function criarArray(){ $obj=get_object_vars($this); foreach($obj as $key => $value): $this-&g...
asked by 19.09.2017 / 20:19
1
answer

How to sum the values of an index?

I'm new to python and need to do a program that adds the digits that belong to the same position in a list, for example: Lista = ['22659', '387685', '89546'] The result of the sum of the list [0] would be 24 (2 + 2 + 6 + 5 + 9), putting all...
asked by 20.09.2017 / 20:15
1
answer

Finding values in a python array and assigning specific values

I have the following vector: posicao = [47, 62, 24, 18, 47, 62, 63, 78, 68, 87, 24, 18, 68, 87, 63, 78] I need to look at this vector for values [24, 18]. After locating all, I need to assign a random value to these positions, but EQUAL....
asked by 10.08.2017 / 03:49
1
answer

Correlating vectors through indexes in Python

I have the following vectors: posicao_1 = [4, 62, 24, 18, 47, 62, 63, 78, 68, 87, 24, 18, 6, 8, 12, 17] posicao_2 = [43, 61, 21, 19, 46, 63, 68, 72, 66, 89, 29, 10, 8, 7, 6, 15] I need to look at the vector POSITION_1 the value [24, 18]....
asked by 11.08.2017 / 00:50
1
answer

Compare two object arrays?

I need to compare 2 arrays in Javascript, one that returns from one MongoDB query and the other comes from the email provider. The two comparison criteria are the email ID and the box to which it belongs, and the email will be discarded if th...
asked by 05.09.2017 / 19:08
1
answer

Return Vector in Array JSON Retrofit

How do I bring information from a vector into another vector in json format for the retrofit: I have my feedback: [ [ {"prato":"BROCOLIS C\/ SALSINHA"}, {"prato":"ACELGA"}, {"prato":"ALFACE + JERIMUM COZIDO"} ], [ {"pr...
asked by 02.08.2017 / 17:58
1
answer

Question about vector [closed]

I'm trying to list the numbers that the user types but I'm not finding the function, can anyone give me a light? class Program { static void Main(string[] args) { int[] atividade = new int[6];...
asked by 19.08.2017 / 04:13
1
answer

Write AJAX Data

I need to send data via ajax to write, and one of the information is an array, but the array loses position when I get it in PHP, I do not know if there is a size limit for the AJAX object sent, if I need to split the array in several how would...
asked by 21.07.2017 / 15:53