Questions tagged as 'array'

1
answer

Ask the user which element they want to remove from the JavaScript Array

I'm trying to create a program in which an element can be added or removed from the Array, according to what the user places in the prompt command. I'm having a hard time removing elements from Array. Here's my program: var regiaoAmazoni...
asked by 05.10.2017 / 04:39
2
answers

How to replace values of a string from all values of an array?

Good afternoon guys, well the problem is the following .. I have a string named x, and I have two arrays, name and value. in both arrays I identify if in the string X has some field equal to $ name, if it has substitution by $ value, Is there a...
asked by 02.10.2017 / 21:33
1
answer

Pass a php array in a query and return multiple results [closed]

I want to pass a POST dynamic array of type: array(2) { [0]=> string(1) "1" [1]=> string(1) "3" } For an SQL query that returns multiple results depending on the string values in the array Select nome, count(avaliacao) FROM tabela W...
asked by 27.09.2017 / 10:49
2
answers

Remove duplicate array element

I have the following array: Array ( [0] => Array ( [forn_nome_fantasia] => FORNECEDOR TESTE [class_nvl4_descricao] => DESPESAS COM FRETES ) [1] => Array ( [forn_nome_fantasia] => DJ/ DE...
asked by 16.11.2017 / 18:05
1
answer

Correlating values in Python Arrays

I have a vector called POSITION, with the following values: position = [40.51, 30.52, 30.31] I have a vector called COORDINATES, with the following values: coordinates = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120] Each index...
asked by 10.08.2017 / 01:09
2
answers

How to read Json with Android

I would like to know how I read json in two different ways. 1 - I have a Json {"nome": "JOA", "cpf": 7.4417, "idade": "15"},{"nome": "PAT", "cpf": 8.5528, "idade": "20"}"}; This even can read and play in variables, but only the first par...
asked by 14.09.2017 / 22:03
1
answer

Improvement and simplification of the code

I'm in the first semester of college, and as a final project the teacher asked me to do a hangman game, I already did my code but wanted them to suggest improvements or report future code problems. #include<stdio.h> #include<locale.h&...
asked by 10.11.2017 / 18:04
3
answers

Numbers below average

I need to average 20 numbers and have all numbers smaller than average. package pag1; import java.util.Arrays; import java.util.Scanner; public class ex2 { public static void main (String[] args){ Scanner x = new Scanner(System.in);...
asked by 04.07.2017 / 00:18
1
answer

Count arrays inside PHP array

Good people, I have the following array [[],[{"id":3,"image_name":"47440_planet_mars.jpg","path":"59c1d5ddd862547440_planet_mars.jpg","imageable_id":9,"imageable_type":"App\Assay","created_at":"2017-09-20 02:43:41","updated_at":"2017-09-20 02:...
asked by 20.09.2017 / 06:17
1
answer

Doubt about changing data in arrays in java

I have an array of the Person class called vector. I have already populated the vector with the instances of people named p1 . My question is how to change the value of p1 when inside the array : Example: Person Array n...
asked by 08.06.2017 / 21:10