Questions tagged as 'array'

2
answers

require_once does not work

I'm trying to give require_once in a PHP file that has a class. The file I'm trying to include in PHP with the class has only one array with configuration data, but I can not get it properly. class CoreDatabase { public $database;...
asked by 14.11.2017 / 18:29
2
answers

Ties with arrays array not working

Why does y in second for not "run"? var i = 0; var bd = new Array(); bd[i++] = new Array(10,11,'Daniel'); bd[i++] = new Array(12,12,'Augusto'); bd[i++] = new Array(13, 12, 'Olavo'); Notice that I run the coordi...
asked by 28.08.2017 / 16:46
3
answers

Compare 2 arrays and save the difference between them in the database?

I have 2 object arrays, one of them is the one composed of emails that comes from the provider through IMAP protocol and I convert to objects and then put them in an array all of them. The other is an array of emails that I look for in MongoD...
asked by 05.09.2017 / 22:21
1
answer

Search within two arrays

The case is the following. I have a script I wanted to use and as with all the questions "I suppose" I do not know how to do it. I am trying to do a search of array data with javascript "because they do not suggest other languages if your answer...
asked by 12.09.2017 / 19:58
3
answers

Array in PHP that is not getting values

The purpose of the exercise was to create an array of 20 numbers ranging from -100 to 100. I have to distinguish between negative and positive values. If it is positive I have to add the value in its entirety to a variable and if they are negati...
asked by 24.10.2017 / 17:34
1
answer

Organize information

I have text like this: NICK:KEOME PTS:50 ASTS:6 DEFREB:2 OFFREB:7 STLS:14 BLKS:4 TOS:5 NICK:ARTHUR PTS:10 ASTS:3 DEFREB:5 OFFREB:4 STLS:4 BLKS:2 TOS:6 How do I store information more or less this way: Jogadores ( [nome] => Keome [s...
asked by 30.05.2017 / 20:46
1
answer

Store input values in Java

I need to store values with more than one entry. If a program requests 10 entries, should I store in 10 variables? In case the entries are of type Int .     
asked by 30.03.2018 / 02:16
1
answer

Print pre-defined phrases, randomly in C

Hello, I'm a beginner in programming and am learning to program in C. I want to make a program that has some already defined phrases. Ex with vectors: char vet1[100] = {"Hello World!"}; char vet2[100] = {"segunda frase"}; ... and wit...
asked by 05.06.2017 / 15:25
1
answer

Transform array into divs?

I have a page with php that brings me a list of records, however it brings a array and I would like every item of it to come in divs or table with lines. Below what I'm doing: $db = JFactory::getDbo(); $query = $db->...
asked by 16.03.2017 / 21:58
1
answer

Modifying the Size of an Array at Run Time

I'm doing a java application, and I used netbeans to build the screen. On this screen I have a button that generates random numbers and places them inside an array, but I can not change its size when it is running. What I did: I created a "ta...
asked by 03.10.2017 / 20:06