Questions tagged as 'array'

2
answers

Doubt about displaying inverted array

Could you explain how it works to return an array with inverted values? I took this exercise to do but I could not. So a colleague gave me this exercise so I could dissect him, but I did not understand anything: S. package pct; import java.uti...
asked by 16.08.2017 / 04:11
2
answers

Why do you accept values beyond the size of the vector?

INT vetor[3]; vetor[0] = 110; vetor[1] = 12; vetor[2] = 30; vetor[3] = 13; vetor[4] = 1; Cout << vetor[0]; Cout << vetor[1]; Cout << vetor[2]; Cout << vetor[3]; Cout << vetor[4]; In shor...
asked by 01.08.2017 / 04:19
1
answer

Access information in Multidimensional Associative Array (PHP)? [duplicate]

I have the following structure: $arrDados = Array ( [0] => Array ( [NumeroEmpenhoNumero] => Array ( [type] => NULL [size] => 0 [deci] => 0 [code] => 0...
asked by 21.05.2017 / 03:07
1
answer

Select ID vectors with certain characteristics in R

I have a data frame with four columns of values for each ID and I need to create a new df excluding the IDs whose vectors have more than zero or more than one NA. I created the DF library(dplyr) co_entidade<-c(23, 40, 58, 82, 104, 171,...
asked by 24.05.2017 / 20:05
2
answers

Matrix 4x4 is getting 20 elements

Galera made a code in Python whose exercise asked to make a 4x4 matrix, show the number of elements greater than 10 and show the final matrix. I did and it was all right only that the array is getting 20 elements and is not separated by brackets...
asked by 23.05.2017 / 19:46
2
answers

When triggering an event in an array element (with querySelectAll) trigger only one element of another array (also with querySelectAll)

In the code below, I would like that when passing and removing the mouseover and mouseout ) on a li , change would be made only in the corresponding element to this li , in this case, the tags a and i within li...
asked by 14.03.2017 / 17:30
2
answers

Operator "!=" does not work in my code?

I have a part of my program that does several checks when the button is clicked and one of these checks is: it takes the value entered in textboxRankTecnica and has to buy with the array ranksAceitaveis . If it enters a value tha...
asked by 26.02.2017 / 00:20
1
answer

Dynamic Array Allocation in C ++

I would like to allocate this array dynamically in C ++: int main() { int n,m; cin>>n>>m; if(n>m){cedula tabela[n][n];} else {cedula tabela[m][m];} return 0;} But the code does not compile, I think it has to d...
asked by 13.02.2017 / 13:29
2
answers

What is the limit of multidimensional vectors?

I'm running a test and it gives me an error when I try to create a vector [1000] [1000]. Are there limits for vectors? The error code ( Application stops responding ) is as follows: int main (){ int DIM_X = 1000; int DIM_Y = 1000;...
asked by 12.02.2017 / 14:01
1
answer

Get all the dates of a day of the week

I have a code that takes all dates on a certain day of the week. Ex. 5/06/2017 = Monday. The code is working perfectly. More is limited only 1 day of the week, I would like to "spend" more days an array. function dias($dia_semana, $mes,...
asked by 22.06.2017 / 19:12