Questions tagged as 'array'

1
answer

Download Javascript Array in a Combobox

I would like help in this small problem, I have to do a combobox shows 5 states being loaded by an array in javascript, my code is like this. HTML <select > <option id="estado"></option> </select> My Javascrip...
asked by 15.05.2017 / 16:37
1
answer

How to count how many elements an array has?

I have a array of 10 positions that is filled by a function, ARMultiEachMarkerInfoT marcadoresVisiveis[10]; Always before adding elements to array , the function clears all elements and populates again. I want to know the best...
asked by 27.04.2017 / 15:27
1
answer

Array and the type being created

In Java, when I have the following statement: int[] ns = new int[5]; the following doubts arise: Is an object created of what type? For each value in an index, do I call it an instance?
asked by 03.02.2018 / 18:52
1
answer

C # Application Console. Read file Json

I have a Json file and it always goes wrong when I try to read it. I think because it's an array inside another array and I can not read it. Json: { "map": [ ["S", "S", "S", "S"], ["S", "S", "C", "S"], [ "S", "S", "S", "S" ],...
asked by 31.01.2018 / 13:37
1
answer

Similarity of elements in different vectors

I have two vectors: A <- c("RS", "DF", "CE") B <- c("Porto Alegre - RS", "Brasília - DF", "Fortaleza - CE", "Porto Alegre - RS", "Acre - AC", "Recife - PE") and a function: f <- function(a,b) { lista <- grep(a,b, fixed = FA...
asked by 20.01.2017 / 20:36
1
answer

Java Table Table Test

I'm having difficulty solving the table test of the following code, could someone show me the output and how do I do it? public class Principal { public static void main(String args[]) { int array[] = {1, 2, 3, 4, 5}; int a...
asked by 24.03.2016 / 22:47
1
answer

How does callback ordering work internally?

In php, when we want to sort a array in a custom way we can use the function usort . I know that for this function to work, we should use values 1 , 0 and -1 . In case, if I wanted to sort this array...
asked by 30.03.2016 / 18:20
1
answer

Adding objects to the array

I have the following error: <?php class CarrinhoDao { private $carrinhoDao = Array(); public function __construct() { } public function insereProduto($_produto) { $carrinhoDao[] = $_produto; print "<pre>"; print_r...
asked by 17.12.2015 / 13:07
3
answers

Make copies of lists in certain positions with Python

Hello, please, I would like to copy a certain list in python. The total size of the list is 150 and I want to remove the last 50 items from the list. Here I will represent a list 100 times smaller, that is to say with 15 elements and that I want...
asked by 17.07.2016 / 03:39
1
answer

Array items relating to adding new item

I have a array that has 10 items, for example: var array_exemplo = ["item_1", "item_2", "item_3", "item_4", "item_5", "item_6", "item_7", "item_8", "item_9", "item_10"]; And in my html, I have several buttons, with id's, for example:...
asked by 28.11.2015 / 02:13