Questions tagged as 'array'

1
answer

Save results from a query to an array

Good afternoon! I need to get the results of this query: sql = "SELECT controle.ID FROM controle WHERE BP = '" & controlectform.nmbpbox.Value & "';" And save to an array. Subsequently I will do a for each in that array and I will...
asked by 03.04.2017 / 21:40
1
answer

extract data from a json

I have the following JSON : [{ "ItensReceitaModel": [{ "t0081_id_receita_itens": 1, "t0081_lote": "1233" }, { "t0081_id_receita_itens": 2, "t0081_lote": "123" }], "PacienteModel": { "t0031_id_pessoa": 1, "...
asked by 08.01.2017 / 14:38
2
answers

Insert data from an array into a mysql database

I get a json from an android application. This json is a java class that was converted with json's Gson to a string. After the web server in php receives this json I convert to an array. I want to make a generic insert in my web server, where...
asked by 07.01.2017 / 14:16
1
answer

Random ads with viewer counter

I have the following script to put random ads on the site, in addition to simple and easy also works very well and fast with multiple ads. The problem is as follows: How many times have each ad been chosen by this script (how many times have...
asked by 13.12.2016 / 15:16
1
answer

Doubt about matrix values

   A good example of a data set is the booking of a flight ticket. Build a C program for booking airline tickets. The plane has 50 rows with 6 seats each. The program should have:       Two vectors whose number of positions is the total numbe...
asked by 24.02.2017 / 22:55
1
answer

Vector of struct in C

I can not find the error in this code of my exercise. It prints right the first reading, then prints random things. I could not find out if the error is in the reading or the printing. #include <stdio.h> #include <stdlib.h> /*Defin...
asked by 26.12.2016 / 01:16
2
answers

Getting information from a select and passing in an array

I want to get all fields of a select and store them in array . I thought about doing it, but it did not work. var lista = []; lista = $('#Model').text(); $('#Model').append('<option value="' + data.ModelID + '">' + data.N...
asked by 21.12.2016 / 22:57
1
answer

Show string string typed

How to display values read inside a loop in Java? Ex: for(int i = 1; i <= 2; i++){ System.out.print("Nome: "); String nome = tecla.nextLine(); } ?? < - Make read names appear here     
asked by 15.02.2017 / 20:16
2
answers

String_diff () method in JAVA

In PHP there is the array_diff() method that checks values of two arrays and returns the items for the difference between them. For example: $arrExclusion = array('as', 'coisas', 'acontece', 'no', 'tempo', 'certo'); $arr = array('tud...
asked by 06.03.2017 / 02:08
1
answer

Problems with Javascript arrays

Well, I'm having some problems with the following code snippet: alert(lineOut[i].trim() + " - - " + lineOut[i + 1].trim());    Uncaught TypeError: Can not read property 'trim' of undefined (...) The array lineOut is a dynamically...
asked by 14.11.2016 / 23:02