Questions tagged as 'array'

1
answer

How to check if two vectors have equal values quickly

The element number reaches 100000 and I have to compare it with another vector of 100000, how can I do this with a very high gain gain? How I'm comparing vectors for(i = 0; i < teste; i++) { for(j = 0; j < teste; j++) {...
asked by 30.05.2018 / 04:22
1
answer

Delete equal values within a dynamic array

I have an array with several dynamic names that can change every moment, what is the most correct way to go through this array and create a condition to exclude them from iguail? (in this case two elements with the same name) I have seen some...
asked by 03.10.2017 / 13:31
1
answer

How to create an ArrayList of arrays?

I'm having some problems creating a List of Arrays, I'm using Visual C #, .NET 3.5. Code: using Database; //... namespace Sample { public partial class Form1 : Form { //... private void Button1_Click(object sender, Event...
asked by 23.04.2014 / 03:19
2
answers

Pass object list between files

How to pass a list of objects through two JavaScript files? I have a list: var elementsList = []; And this list is populated with N objects: var oElement = { elem: "", emin: 0.0000, emax: 0.0000 } I need to pass this all...
asked by 24.04.2014 / 19:52
2
answers

Error declaring JTextField vector in class

Well, I would like to store all my JTextField in an array, but when I define the array, I get the following error: llegal forward reference . Below is the code where I define the array. private JTextField campos[] = {campoNome, ca...
asked by 10.09.2017 / 16:38
1
answer

Iterate an array (vector) via IEnumerator? For what reason?

In what case would it make sense for me to forgo an array using loops "normal" ( for/foreach/while ) via index to use IEnumerator as shown in Example 3? Example1 //Usando for int[] array = new int[]{1, 2, 3, 4, 5 };  ...
asked by 20.03.2017 / 12:10
1
answer

How to transform this Json into an ArrayList of objects?

I'm working on a project where I'm doing a query in the database and need to return a list of database users to be listed in my application. I have the following line Json (returned by the server): {"id": 1, "nome": Raphael, "sexo": M}{"id"...
asked by 08.10.2016 / 08:45
1
answer

JavaScript - Execute Data from an array always in the same order

Good / Good Day / Afternoon / Evening, I would like JavaScript help, how do I execute data from an array in the same order, for example: var teste = ["valor1", "valor2"]; document.getElementById("id").innerHTML = As I do when I click a but...
asked by 03.07.2016 / 22:59
1
answer

Read array elements and print them

I created an algorithm that received a single variable with 9 different records that would display these values typed in matrix form (table). But by displaying the result, you are only returning the last three values in three rows in a row....
asked by 11.12.2018 / 22:47
2
answers

Add prime numbers within a vector

I have this problem: Make an algorithm that receives 1500 numbers, compute and show the sum of the even numbers and the sum of the prime numbers. So far so good, I have been able to filter and add even numbers, BUT, the sum of prime numbers a...
asked by 02.06.2016 / 18:10