Questions tagged as 'array'

2
answers

Targeting failure: Image of the recorded core

I made a code in C to find the smallest value and position of it in a vector x [N]. Every time I compile the program through the terminal (Linux), it gives the following message:    Targeting failure (recorded core image) I used the same...
asked by 05.08.2018 / 02:19
2
answers

Group value of an array in PHP

I have the following array: Array ( [0] => stdClass Object ( [anomes] => 201601 [codreg] => 41 [nomreg] => PR [codcin] => 1 [nomcin] => OUTROS [valven] => 6835.7000...
asked by 13.08.2018 / 21:55
1
answer

Counter adding an extra value in vector with pointer

I'm trying to finish an exercise that asks for 4 ages, and the output tells how many of the entered ages are greater than or equal to 18 but the counter always adds a value greater than 18 at the end and I do not understand the why. #include...
asked by 01.07.2018 / 23:42
1
answer

turn string into javascript array

Good afternoon, I have the following string [{"programa":"teste"},{"programa":"Aprender"},{"programa":"outro teste","indice":"0;1;0"}][{"programa":"Programando 1","indice":"1;2;3"},{"programa":"hostórico","indice":"1;2;2"},{"programa":"anál...
asked by 23.07.2018 / 20:01
1
answer

How to compare all the values of an array with a variable

I would like to know if it is possible for me to have an array with multiple dates and know if another date is longer than all the dates within the array. For example: Date[] datas = {"02/02/2000","03/03/2000","04/04/2000"}; Date data1 = "0...
asked by 03.09.2018 / 21:42
1
answer

How to Capture this array

I'm trying to make an API . Here is my code: require('conexao/conexao.php'); $jsonObj= array(); $query="SELECT * FROM filmes"; $sql = mysql_query($query)or die(mysql_error()); while($data = mysql_fetch_assoc($sql)) { $row[] =...
asked by 14.02.2018 / 21:14
1
answer

Move array item to the last position!

I need to move an item from an array to its last position! First I ordered it in high order, but an item needs to be the last one on the list, how can I do this with PHP? I have the following code: foreach ( $services as $key => $service )...
asked by 22.02.2018 / 21:11
1
answer

Transform vectors into an array

I have several signals, where s1, s2 to sn, are vectors of size n, I would like to join them in an array to look like this: matriz = ( [s1] [s2] ... [sn] ) So that I can access an element at any point, for e...
asked by 11.05.2018 / 21:12
2
answers

How to Randomize an Array in C ++

There is a lot of stuff here about array ordering methods (quicksort, bubblesort, etc.), but I was wondering if there is a method of "cluttering" arrays, that is, shuffling the array elements. > * There are even questions here on this topic, b...
asked by 15.05.2018 / 00:05
1
answer

Tie is from index 1 array java

I have a function that makes a for loop in a String array. I need the loop to start from index[1] of that array. But I'm not getting it. String arquivo[] = arquivoDecodificado.split("\r\n|\r|\n"); for(String linha: arquivo ) {...
asked by 12.06.2018 / 15:22