Questions tagged as 'array'

1
answer

Multidimensional javascript array with angular is undefined

I'm trying to create a multidimensional array but it returns me results [array.status] is undefined . I'm using angularjs : results = new Array (); var indice = 0; angular.forEach($scope.filteredDados, function(array, key){...
asked by 21.10.2016 / 18:23
2
answers

How to change the delimiter of the Php array obtained via POST, replacing the comma?

I get a array via POST which is generated from a% field of the form, the problem is that this array has information with a comma. Example: 2.7 cm, 3.1 cm. I enter the database separated by commas to be retrieved using them, but in this c...
asked by 16.03.2017 / 15:25
1
answer

Insert n points of a vector randomly into any array in java [closed]

I am a beginner in Java, I wanted to know if there is any function that would make my life easier: Having a vector of n positions filled with (pre-defined) numbers, distribute those numbers in randomly array positions. For example: havin...
asked by 28.08.2018 / 04:09
1
answer

Transform elements of a string into array PHP [closed]

mysql returns the following string: ["Element1", "Element2", "Element3", "Element4", "Element5", "Element6"] I need to transform each of the words between "" into an element of an array. I tried from the preg_split and preg_match_all function...
asked by 18.12.2018 / 04:58
1
answer

Show Div and hide others that are visible with 2 arrays in JavaScript

I have the following code based on JavaScript : var perguntas = new Array(); var respostas = new Array(); var totalPerguntas = 2; perguntas[1] = "Pergunta um"; respostas[1] = "Resposta um"; perguntas[2] = "Pergunta dois"; respostas[2] =...
asked by 22.10.2018 / 15:27
1
answer

How to read items from one array inside another?

This is my multidimensional array: <?php $beneficiarios = array ( array( "codigo_membro" =>$cod, "nome" => $_POST['nome1'], "n_identificacao" => $_POST['n_i...
asked by 19.10.2018 / 15:09
3
answers

ArrayList - Place index next to element

I have an application where the user informs via JSF a drive name. When the system finds the drive, it fills in List<String> with the drive data. With this List filled, I need to put the index of each line next to its elem...
asked by 05.09.2018 / 18:38
1
answer

How to check if the limit of a vector has not been exceeded?

Good afternoon, gentlemen! I am doing a college job that asks you to create a schedule. I've done most of the code, but I can not see the light so when the user tries to register a person in the calendar, show whether the calendar is already...
asked by 20.09.2018 / 19:59
3
answers

Java: How do I store a vector in another vector and using library Math

My question is this, I have to read 20 integers in a vector and then I have to calculate the square of that vector and store it in another one and then display the two. Only at the time of making the square I use a java library which is the M...
asked by 23.08.2018 / 18:53
1
answer

Generate 9-digit keys with Python

I would like to generate several values following the pattern XXX-XXX-XXX where all the possibilities will be generated, for example: 1 - 000-000-000 2 - 000-000-001 3 - 000-000-002 . . . x - 999-999-999 . . . x - 000-000-00A x - 000-00...
asked by 18.12.2017 / 23:04