Questions tagged as 'array'

1
answer

Modify Array () form HTML result

I have the following Array () return: [item] => Array ( [data_vencimento] => Array ( [0] => 2016-12-05 [1] => 2016-12-07 [2] => 2016-12-22 )...
asked by 01.12.2016 / 18:00
1
answer

Differences between Python and JavaScript in relation to arrays?

I'm having a hard time because in JavaScript it was possible to do this: const x = [] x[0] = 1 x[1] = 2 But in Python when I create an empty list and try to make a statement it says the index is out of range. I can work around the append...
asked by 07.10.2017 / 15:52
2
answers

Use array_search in a multidimensional array php

In a list of books within a% multidimensional%, every array has a different column category , I would like to search this sub_array for a category > for example: Array "livros" ( [Livro 1] => Array...
asked by 19.11.2016 / 00:45
2
answers

Concatenating Javascript Object

I have the following javascript array: for(var k in lista) { for(var x in lista[k]){ var donutData = [ {label: x, data: lista[k][x], color: "#3c8dbc"} ]; }...
asked by 06.06.2016 / 22:23
3
answers

Modify array elements

I need to create a query with the insertion of several lines. Change an array / list:    arrayOriginal = [10,20,30,40]     valueChave = 999 The return must be:    arrayNew = [(valueChave, 10), (valueChave, 20), (valueChave, 30)...
asked by 22.06.2016 / 23:21
2
answers

How to check for a null position in the vector

Why does if(array[i] == null) not correct? What would be the best way to check if that vector space is "empty"?     
asked by 23.06.2016 / 20:39
1
answer

Problem with login system - array

Hello. I'm creating a login system for study purposes. I have identified in the file that is not populating the array with the information of the database ... and yes, I already made sure that the entered email and password already exists in...
asked by 03.01.2017 / 23:23
3
answers

Constant containing Array (array)

When I try to define a constant as an Array it gives error. define('COLORS', ['red', 'blue', 'green']); Is there any way to define an Array in the value of a constant?     
asked by 20.06.2015 / 03:50
2
answers

Using Array.Foreach to modify the collection

I want to remove spaces from the beginning and end of the string ( Trim ) in all positions of the array , but none of the forms below worked. What am I doing wrong? var optionArray = new string[] { "in the jungle ", " the mighty jungle"...
asked by 26.07.2016 / 19:34
2
answers

I used an array in the parameter of a method and I do not know how to execute

import javax.swing.JOptionPane; public class Cliente { private String nome; private String telefone; private int codigo; private String rua; void setRua(String z) { rua = z; } void setTelefone(String t) {...
asked by 01.02.2015 / 20:45