Questions tagged as 'array'

1
answer

Change an array of char within a function

I'm trying to pass a char array pointer to a function. I want it to make changes to this char array. Here is the code for the function: void dhnfe( char tzd, char hverao, char *dh) { if (hverao == 1) { switdh(tzd) {...
asked by 24.06.2017 / 20:45
1
answer

Count True Values on an Object

I have this return from an API: object(stdClass)[2] public 'data' => object(stdClass)[44] public 'id' => float 3.5795374673835E+14 public 'completed' => boolean false public 'name' => string 'Dia dos Nam...
asked by 12.06.2017 / 17:27
1
answer

Variable not defined in SQL query for PHP

I'm trying to send a query with the information of a table in MySQL to an array in PHP, but I'm encountering the following error when I try to print an array position:    "Notice: Undefined variable: array in C: \ xampp \ htdocs \ Domiritmo...
asked by 20.06.2017 / 18:10
1
answer

Assigning Rows of a Document to a String Vector

I'm trying to try to assign to a string vector certain lines of document, the content of the document is this:    3   50   5,80,0   15,5,1   12,30,0 I want, from the third row, each row to be stored in a certain index of a String vect...
asked by 06.06.2017 / 16:43
1
answer

Error converting types

I'm doing a job for college that consists of creating an array of buildings based on some rules that are provided by txt. The code gives an error and I do not know what is happening. A detail that when I comment the line valor = Integer.pa...
asked by 07.06.2017 / 02:54
1
answer

Resize array

I have the following question, for example <?php $cesta = array("laranja", "banana", "melancia", "morango"); $fruta = array_pop($cesta); print_r($cesta); ?> the initial array goes from 0 to 3, when I do array_pop it stays from...
asked by 05.06.2017 / 23:44
1
answer

module.exports mount an array with the api data

Well, I have the following problem, so I can not solve it in any way. Well I have a config.js script module.exports = { "adsense": { "bloco728x90": { "google_ad_client": "ca-pub-x", "google_ad_slot": 00...
asked by 31.05.2017 / 21:50
1
answer

Display Java Database Values

I'm a beginner in Java and I'm doing a mini-RPG-style program for database testing, and I want to display the data contained in the DB using a ArrayList , however the output is always like this:    [rpg.Personagem@1de0aca6, rpg.Personag...
asked by 14.06.2017 / 06:07
1
answer

Removing brackets from an array

You would need to remove the brackets from an impression of the results of an array within a While. Here is the code: <?php $termo = $_GET['termo']; include "conn.php"; //Consulta busca informações para montar auto-complete $sql = "SELEC...
asked by 14.06.2017 / 02:52
1
answer

Treat multidimensional array in AngularJS

I have this function: getProducts(){ this.auth.getProducts().subscribe(data => { this.turmas = []; this.produtos = []; this.cursos = []; for (var i = 0; i < Object.keys(data).length; i++ ) {...
asked by 17.05.2017 / 16:01