Questions tagged as 'array'

1
answer

Array counter with while in JS

I need to count the elements of an array using the while loop and display a alert() , but it is not displaying the count in the browser . Using for worked fine. I leave my code below: var deuses = new Array(); deuses = ['...
asked by 25.07.2018 / 15:24
1
answer

Assigning values to an array of struct in Golang

I'm starting to learn go and need to fill popular the different structs with their values. I thought about creating an array of structs and trying to use a for to fill in the fields but a invalid operation: p[1].burst[i] (type int does not sup...
asked by 31.10.2018 / 22:39
1
answer

Stacks with vectors in C, is showing elements that have already been removed

How do I show my vector without the numbers that were removed? Because when I show him, even removing a number in the function, it still appears inside. #include <stdio.h> #include <stdlib.h> #define MAX 10 int pilha[MAX]; int ini...
asked by 16.08.2018 / 03:23
1
answer

How to edit data in a Struct using a function

I want to create an edit function that receives as a parameter by reference the vector of songs. (using pointers) The user must choose the number of the song and re-enter the data of that position of the vector. I created the struct, I'm a...
asked by 08.07.2018 / 11:14
1
answer

Needing Help on Vector Exercises in C

Why are not you displaying the 15 numbers? And how do you include 3 numbers at the beginning of this vector? int main() { int v[30]; int i,x; for(i=0; i < 15; i++) { printf("Digite 15 numeros"); scanf("%d", &...
asked by 12.06.2018 / 02:12
2
answers

Program with Warning and does not accomplish what was requested

Good evening! When I was studying for the test I will do, I faced this question. However, when the program was done, it had a warning and did not perform what I did. I would like you to see my code in order to better understand my error. Thanks...
asked by 31.05.2018 / 23:43
1
answer

How to print on screen or console, an array of strings in php

I've been seeing the documentation but it's not clear how I do it. I have an array of strings: $remetente = $con->real_escape_string($_REQUEST['rem']); $arrai= array(); $remetenteArray[] = str_split($remetente, 1); As you can see, $re...
asked by 27.05.2018 / 14:53
1
answer

Difficulties in receiving JSON data in PHP

Good evening everyone, I'm having a serious question about receiving JSON data via an external link. I have a link that pulls all the information I need to show, but there is my question, I'm using a form to show the data according to the...
asked by 12.07.2018 / 01:42
1
answer

Unchanging collection by adding strings

I'm starting java programming and am having a problem creating an immutable collection. Below is what I created: package br.com.estudos; import java.util.Collection; public class MinhaColecaoImutavel<String> extends MinhaColecao<St...
asked by 12.07.2018 / 16:53
1
answer

Group and sum values from each group of a php laravel array

I have the following array: array(9) { [0]=> object(stdClass)#2477 (4) { ["type"]=> string(2) "in" ["category"]=> string(24) "Tratamento Odontológico" ["value"]=> string(15) "333.333333...
asked by 12.07.2018 / 21:00