Questions tagged as 'array'

1
answer

Size of an ArrayList

In Java ... What is the initial size of a ArrayList ? Attaining the maximum size, when it "expands", is its size doubled?
asked by 13.03.2015 / 20:12
1
answer

Get array name inside array

Well, what I want is this: get the name of an array inside another array, just the name. EX: local a = { ["oi"] = {sim=1, nao=2}, ["tchau"] = {sim=2, nao=1} } local falas = {} table.insert(falas, a) - I would add the "hi" and "bye" values...
asked by 21.08.2014 / 11:29
1
answer

Inserting Selected Objects in Array

I'm doing a Formula 1 Racing program, my program reads various racing files, and creates the test objects. I need to deploy in this program a class that has an array to store only the Pilots that have points above 0, and if the pilot is already...
asked by 16.09.2014 / 18:09
1
answer

Working with Struct and problem in print, changing Struct and deleting a Struct [closed]

I have a job of the faculty to do that is to create a struct of "Library Register" (cataloging code, name of the work, name of the author, publisher, donated works of each area, number of pages) with options of "Register book, search for catalog...
asked by 19.06.2014 / 19:20
3
answers

Search for word in the first array column [closed]

How do I search for a word in all rows, but only in the first column of an array that will always increase in size? string[,] array = new string[1,6]{{"texto","","","","",""}}; if(array[array.Length, 0].Contains("texto")){...
asked by 17.10.2016 / 00:26
2
answers

How to pass an array to a JTexfield?

I'm doing a college job where we have to do a kind of login screen, however, with array and not Arraylist . My question is how do I pass information from JTexfield to array ? This array needs to have the funct...
asked by 28.10.2014 / 15:32
1
answer

calculate percentage of iterated items in a loop

How to get the percentage of total items in an array that were processed in a loop? Example: // array fictício (238 itens) var arr = ["AF","AL","DZ","AS","AD","AO","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","...
asked by 18.06.2017 / 05:38
3
answers

Problem with sum in vector in C

Problem with sum of vectors, I'm trying to put the sum of the vectors directly in the loop , but it is not doing the sum of all, but duplicating the last vector, I tested the same code in Portugol and worked perfectly, what would be the problem...
asked by 03.10.2018 / 15:43
2
answers

How to print a vector of integers by removing the last comma in Python 3?

I want to print on the screen a vector of integers on the same line and separated by commas, and I want to remove the comma after the last number. How could I do this in Python? My code looks like this: for i in range(12): print(nume...
asked by 22.05.2017 / 17:44
2
answers

How to insert an item in a certain position of the php array?

I have the following array, $status = array(); $status["Visualizar"] = "Visualizar"; $status["Editar"] = "Editar"; $status["Status"] = "Alterar Status"; $status["Boleto"] = "Gerar Boleto"; It turns out that depending on the current status t...
asked by 04.04.2017 / 20:17