Questions tagged as 'array'

1
answer

Find the next "less than" value in an array

I have the following array and I need to find the next smaller value than the one defined in $valor : $seq = array(500, 490, 430, 370, 350, 240, 100, 90); $n_seq = count($seq); $valor = 400; // ASSUME DIFERENTES VALORES if ($valor &g...
asked by 05.04.2014 / 14:05
4
answers

Is it possible to check the size of a string inside an array?

I have an array that is built by the selected chekbox results ... It returns with var_dump : array(3) { [0]=> string(7) "BXT0022" [1]=> string(7) "BXT0010" [2]=> string(7) "BXT0024" } If you have something in the...
asked by 07.04.2014 / 01:08
1
answer

How to concatenate one vector in another elegantly in ADVPL?

I have two vectors of numbers, aBuffer and aCandidato . Depending on a condition (external to the vector), I need to have aBuffer receive the contents of aCandidato to work on it later. aBuffer will be used by...
asked by 07.12.2018 / 02:35
1
answer

Polymorphism with ArrayList

I have the Iinterface below and I would like to know how to override the method by passing another object to List because I have 4 classes in my entity, for example the entity classes are cliente , colaborador , produto...
asked by 09.11.2014 / 14:40
1
answer

Vector struct and pointers

I have to get data (name and phone) from some people in a struct , then store them in a vector, all by a function / procedure. At the time of printing some strange characters come out. I'm using the C ++ DEV platform # include <std...
asked by 15.10.2014 / 23:51
2
answers

How to 'increment' in variables

In the code below my variable y asks for the user to enter values until y reaches 10, I make the storage in the variable x and the last information entered is currently stored (which shows at the end of the code) what I would like to know it is...
asked by 06.10.2014 / 18:28
1
answer

Extract data from an array in javascript

I have an array, and its indexes have a serialized value. I would like to separate these values and put each value in another array (with indices properly separated). Here is my code: data = ["["RibS7K/JS+ZTYtjDxqh5hg==","lO/CWn5lb3eqCkDhm9Ppw...
asked by 13.05.2014 / 17:16
3
answers

How to get all information from $ _POST

I have an array sent by $ _POST: array(4) { ["gabarito"]=> string(1) "4" ["resposta1"]=> string(1) "A" ["resposta2"]=> string(1) "B" ["resposta3"]=> string(1) "A" } I need t...
asked by 09.10.2018 / 20:38
1
answer

PHP - How to find the least common element in an array

The work consists in creating 2 arrays with random numbers between 0 and 30. These 2 arrays should be drawn from the most common element to the least common one. Then I have to show the most common, less common element to the screen, and whic...
asked by 10.10.2018 / 18:06
2
answers

Popular inputs according to the value of the selected option

I have 3 arrays, cities, capitals and population. How can I do when clicking on a certain state to appear in the inputs the respective values, ie capital and population of the state selected. var cidades = new Array("Acre", "Bahia", "Minas...
asked by 23.08.2018 / 05:51