Questions tagged as 'array'

2
answers

Read an Array or Bulk Collect as a table in an Oracle PLSQL

How do I load an Array or Bulk into a PLSQL and then read this as a table. Example DECLARE VA_ARRAY ....DEFINIÇÃO DO ARRAY VN_QTD NUMBER; BEGIN -- TABELA01 É UMA TABELA FÍSICA EXISTENTE NO BANCO SELECT * BULK COLLECT INTO VA_ARRAY F...
asked by 25.05.2016 / 18:31
1
answer

Exception in Thread "Main" java.land.NullPointerException in com.Login.Login.mai (Login.java:18)

Today I tried to make a login system (again), but this time I used a one-dimensional array to save my values. When I ran my program, Eclipse accused an error (null pointer to be more specific), my theory is that assigning a value to array ca...
asked by 09.06.2016 / 23:02
2
answers

Why is not the recursive function return being used?

What happens when I call a function, recursively, without assigning its return to a variable? Why is it not necessary, in this case, to explicitly assign the mergeSort function to the array variable? public static int[] mergeSort(int[...
asked by 05.12.2015 / 21:34
2
answers

How does creating an Array work?

When using the new() command to create any object, we call the constructor of that object's class and get the reference to the created instance. However, what happens when creating an Array? Where do you point to (I know this term is i...
asked by 14.03.2016 / 13:11
2
answers

Extract JSON object item with Angular.js

I have an Angular app that uses the Maps API to fetch latitude and longitude, but I can not get latitude and longitude separately. My application works as follows, the user types the zip code and the system using the ViaCEP API loads all data...
asked by 10.03.2016 / 20:16
2
answers

How to test whole arrays in javascript?

Good evening! I need to create a function that accepts an array of numbers and returns true if it contains at least an even number and false , otherwise. The code below even does this, SQN: var ParOuImpar = function(num){ var i, co...
asked by 10.10.2015 / 01:50
2
answers

Is it possible to improve the writing of this code?

I have the following code below: memo1.Lines.Add('def' + ' ' + nome + ' ' + '('+ variavel1 +',' + ' '+ variavel2 + ',' + ' ' + raster1 + ')' +':'); That results in something like this: def nome (variavel1, variavel2, raster): But I wou...
asked by 01.02.2016 / 12:22
1
answer

How to complement these queries to get the buyer's data in the bank?

I made these queries below to get the data from the buyer's database and the products he bought. With the first query, I took the ID of the requests and with these IDS I made a new foreach that took the products that each ID acquire...
asked by 22.01.2016 / 11:52
2
answers

Convert string into array format into an array and retrieve values

In the database I have a TEXT where an array is saved in this format: [ [ resumo: null ] [ datainicio: 2015-09-17T00:00:00.000-0300 ] [ datafim: 2015-09-22T00:00:00.000-0300 ] [ equipamento: 3421 ] ] I need to retrieve...
asked by 22.09.2015 / 14:32
2
answers

How to check the 4 vertical and horizontal elements in an array based on the current position?

Let's suppose I have an array like this: $matrix = [[0, 1, 1, 0], [1, 1, 1, 0], [1, 0, 0, 0]]; Imagine that you are looping and capturing the position of this array as in the example below, y lines with my arrays and...
asked by 21.09.2015 / 21:16