Questions tagged as 'array'

1
answer

Is there any function for arrays in Java like PHP's join ()?

Is there a function in Java that is the same (or similar) as the join of PHP? If so, demonstrate its use.     
asked by 26.05.2017 / 16:53
1
answer

Multiplication of vectors A and B resulting in matrix C

I have a Java exercise here to solve but I can not understand exactly what I need to do, if anyone can give me an explanation, thank you! I need to do the following: Given the A = [1,2,3,4,5] and B = [1,2,3,4,5] vectors, create algori...
asked by 04.06.2017 / 21:36
2
answers

How do I check if a String is null and add to an array?

I have a problem, I have several variables (String) with the following names: texttransfer1, texttransfer2 to 73 (texttransfer73). At times the variable textTransfer2 for example may assume an empty value or not, depending on the situation....
asked by 01.06.2017 / 02:34
1
answer

ArrayList adding wrong values

I have ArrayList that should be receiving numbers from 0 to 15, within for , however it seems that the last value 15 is being written to all indexes. ArrayList <PaginaPrincipalSO> FilaTPSO= new ArrayList(); PaginaPrincipalSO...
asked by 30.10.2014 / 23:32
1
answer

How do I get the index number of an array?

I have the following array: Array ( [CPF_CNPJ] => Array ( ) [TIPO] => Array ( ) [NOME] => Array ( ) ) I know that key(array) returns the NAME of the current key in a loop, but would like t...
asked by 03.08.2016 / 15:47
2
answers

How to compare all the positions of an array in PHP [closed]

I filled in my two arrays that I need to compare perfectly, but I can not compare all the positions ... This is the case: foreach($periodo as $data){ $arrayDiasSemestre[] = $data->format("w"); } include_once 'classes/professo...
asked by 29.11.2014 / 21:18
2
answers

Sort a struct

Do you have some way to sort% of the form: struct cidadecoord { char cidade[90]; int coordx, coordy; }cidades[N]; N is worth 30 in the case, and I would like to order the coordinates x and y, to find out which cities were more to the ea...
asked by 30.11.2014 / 19:18
2
answers

How is the logic to print the numbers in ascending order in C

I created a code that takes a certain number of numbers set by the user, and does the separation of odd and even, until I got to do it, my problem is to put the numbers in ascending order so that the code looks more beautiful visually at the tim...
asked by 17.10.2018 / 20:37
1
answer

JAVASCRIPT ARRAY (map and reduce)

How's personal? I have this array here: [ {dia:2,turno: turno1,M:1,T:0,N:0}, {dia:2,turno: turno2,M:0,T:2,N:0}, {dia:2,turno: turno3,M:0,T:0,N:1}, {dia:3,turno: turno1,M:122,T:0,N:0}, {dia:3,turno: turno2,M:0,T:21,N:0}, {dia:3,...
asked by 17.12.2018 / 07:19
1
answer

How to transform this array?

I have a form that in certain fields returns me several possibilities of data in a single index when I make print of array . This situation can be seen in índices 3, 4, 5 e 7 . Array ( [0] => APARTAMENTO [1] => CASA...
asked by 04.10.2014 / 13:39