Questions tagged as 'array'

1
answer

Calculating Random Password using ArrayList and ResultSet in Java

Good morning, I have a question, I need to calculate a new password for each patient when I go through this method: ps = getConexao().prepareStatement(SQL_VERIFICAR_PROTOCOLOS_PENDENTES); ps.setDate(1, new java.sql.Date(dto.getDa...
asked by 28.03.2017 / 15:01
1
answer

Detect clicking elements in an array

If I have a div with id="banner-tooltips" , and within it I have n <span> tags declared in variables with javascript, how do I detect individual click in these span tags? var caixaTooltips = document.getEle...
asked by 22.03.2017 / 12:35
1
answer

How do I define certain values of an array for the same value? (Java)

Example, I have an array of two dimensions of type int: int array[][] = new int[10][10]; How do I set the value of, for example [2] [3], [6] [7] and [1] [9] to some even int, without having to define one at a time like this: array[2][3] =...
asked by 22.04.2017 / 19:06
1
answer

preecher array, struct in C?

How do I fill leds and seq without needing a for loop? int main() { struct ledvalue { int seq[10]; int leds[10]; }; struct ledvalue numbers; numbers.seq={0,1,2,3,4,5,6,7,8,9}; numbers....
asked by 11.03.2017 / 01:40
1
answer

Java Array List: How to show a jlist rm the String Array values and Positions

I made this code in the class: public class Dados { ArrayList<Contato> contatos = new ArrayList(); public void cadastraContato(Contato contato){ contatos.add(contato); } public String numeroDeContatos(){ return contatos.siz...
asked by 11.03.2017 / 05:40
1
answer

Save data from a textbox in a class and display in a datagrid

I am making a program for simple registration, without using a database, only with an array. The program was already functional when I noticed that the most important part was wrong because I had not understood correctly. I just did not use the...
asked by 02.03.2017 / 12:58
1
answer

Query with array returning only first record

I have the following querys: <?php $VarMensagem = 1; $pdo = new PDO($dsn, $un, $pwd, $opt); $data = array(); $dataGeral = array(); try { $stmt = $pdo->query("SELECT * FROM mensagem WHERE me...
asked by 14.03.2017 / 04:23
1
answer

I can not pass one vector per parameter in C

I'm trying to pass one vector per parameter to a function in C, but I'm experiencing difficulties. #include <stdio.h> #include <stdlib.h> #include <math.h> void calculafx( x2, *f3, *f4, m){ int j; float fx1=0; for(j...
asked by 18.02.2017 / 15:29
1
answer

UPDATE field BIGINT [] from a SELECT

I have an update in a field permissao_ver Being the same type bigint[] , field response: '{1,2,3,4,5,11,44,56,75,11}' My Query UPDATE callcenter.pausa SET permissao_ver = '{"(SELECT cod_grupo FROM crm.usuariosgru...
asked by 25.01.2017 / 20:11
1
answer

Filter Array and return a new array with objects that have been filtered

Using Javascript , I created a function as simple as possible that gets a _Array_ of objects Pessoa (example: {name: "Alex", age: 24} ) that returns a new _Array_ only with Pessoa objects that have age bet...
asked by 21.02.2017 / 22:19