Questions tagged as 'array'

2
answers

How to separate data from arrays into rows?

I would like to ask you another help: I have a two-dimensional array, and I wanted to separate it in lines in a column, for example: Time 1 Jogador 1 Jogador 2 ... Time 2 Jogador 7 Jogador 8 ... I came up with the following code: var...
asked by 27.09.2018 / 02:48
3
answers

Transform String into an Array - Javascript

With this return I'm getting the following string : return $data.requestSuprimentos.value; String [[1, X340H22G, 30000, 3], [2, 64418XL, 32000, 1], [3, X644X11L, 32000, 1], [4, 64018HL, 21000, 1], [5, 12A7610, 32000, 1], [...
asked by 16.11.2017 / 18:57
3
answers

Doubt in Arrays - Beginner

How do I get the mostraEmpregados method to print the name of the employees I've already added? How to construct the array within the Enterprise class declaration itself, so that every time a Empresa is instantiated, the array o...
asked by 17.08.2014 / 04:11
3
answers

Create an array with objects in Javascript

I have defined the object, and array in scope. //Define o array que deve ser preenchido com os objetos var itensList = []; //Define os argumentos do objeto var oItem = { Codig: 0, Desc: "", Unid: "KG", Quant: 0, Custo: 0,...
asked by 09.04.2014 / 15:18
2
answers

JSON equals an associative array?

Are the two the same thing? Or is JSON a more complex library or technique?     
asked by 20.11.2014 / 05:58
7
answers

Extract content Array for PHP variables

I have a cURL statement that invokes a WS. The response from this WS is stored through: $reference = var_dump(json_decode($exec, true)); return $reference; Given that I have this in one function, in the other file I read as follows: $var...
asked by 18.01.2017 / 16:37
3
answers

Insert data into a multidimensional array

I have a multidimensional array [0] => Array ( [per] => Array ( [per_dep] => Array ( [0] => 1115921...
asked by 14.04.2016 / 21:11
2
answers

How to generate an array of years dynamically containing the index as the year and the value as the year itself?

I have a routine that generates a list of years dynamically from an initial year defined in the array which in this case is the year 2015 up to the current year. View array structure: $rray = array( "1" => "2015" #Ano inicial...
asked by 02.02.2017 / 19:58
1
answer

Typedef struct with C character vector is not working

I'm trying to create a constructive data type, but I'm having trouble with the strings. typedef struct { char nome[30]; int idade; } p; p x,y; x.nome = “ana”; x.idade = 20; y.nome = “caio”; y.idade...
asked by 02.02.2017 / 01:02
2
answers

Index searches on an R vector

In RStudio how to choose elements of a vector that are in odd or even positions?     
asked by 01.11.2017 / 10:22