Questions tagged as 'array'

3
answers

Separate the values from List

I'm using List to sort some values, but I need to separate them after I've manipulated the values. List<Map.Entry<String,Integer>> lista = new ArrayList<Map.Entry<String,Integer>>(fila); And for printi...
asked by 25.09.2014 / 16:48
3
answers

Combining arrays

Well, I'll try to explain a little better as you asked. I have 3 arrays simple, I'm using an example with 3 arrays , but in fact the arrays number is not set, since they are set from the user's choices, so I can have 2 to...
asked by 19.10.2017 / 21:13
2
answers

Error executing program using "args"

I'm trying to run a program by passing some values as partions on the command line but it is returning the error below. C:\Users\joao.mello\Documents\C#> .\exercicio32.exe 5 1 0 4 9 32 4    Unhandled Exception: System.IndexOutOfRangeExce...
asked by 05.02.2017 / 23:13
1
answer

PHP get value from a multidimensional array

$arquivo = '{"nome":"João","cpf":"00000","teste":"ooooo"}'; $dd = json_decode($arquivo, TRUE); foreach($dd as $value) { $nome = $value->{'nome'}; $cpf = $value->{'cpf'}; } I want to get the value of name and cpf from the array but th...
asked by 22.01.2017 / 19:36
1
answer

Operate elements of an array

It is possible to operate elements of an array in JavaScript without the need to use a repeat structure as for or while. For example, suppose I have an array with 10 elements and I want to get each element and divide them by 2 without using the...
asked by 25.01.2018 / 06:10
2
answers

Click detection and value collection

I'm developing a basic calculator to learn a little more javascript, but right from the start came the doubt. How do I go through all the li's and get their values individually inside the array, how do I detect the click on a particular li and g...
asked by 10.04.2017 / 22:53
2
answers

Size of arrays

If the theory says that the size of an array can not be changed, only the elements. Because when I print the size of a the value is 10 and not 5 or 15? int[] a; a = new int[5]; a = new int[10];     
asked by 21.11.2017 / 01:42
2
answers

How to create an array from text strings in a string?

Can someone help me with some method, function, or whatever, to make a string become an array made up of pieces of the same string example: var string = "stackoverflow"; var array = []; console.log(array) // ['stack'], ['over'], ['flow'] an...
asked by 27.10.2017 / 18:44
1
answer

How to iterate array php

I have the following block that feeds an array $insert = array(); for($i = 0; $i < 2; $i++){ $insert[] = array( "os" => $cdOs, "name" => $iten->name ); } The array...
asked by 14.11.2017 / 18:08
2
answers

Create a separate array by date groups

I want to create a separate array in groups by date of the result of a query made in DB example: // [...] $sql = $this->db->query($query) or die (sprintf("Falha: %s", $this->db->error())); if ($sql->num_rows) { while ($ro...
asked by 13.01.2016 / 12:44