Questions tagged as 'java'

2
answers

How to do if in sql - Postgres

I need to do an if in postgres example. SELECT log."data" AS log_data, log."tipomovimento" AS log_tipomovimento, log."nomefornecedor" AS log_nomefornecedor, log."nomeproduto" AS log_nomeproduto FROM "public"."log" log WHERE if(l...
asked by 27.06.2018 / 16:27
1
answer

Infinite loop when retrieving and writing data in Firebase

I'm new to Android and had a problem retrieving a data from Firebase and recording again, I know the reason for the infinite loop but I do not know how to fix it. public static void setVoto (String candidato){ votoFirebase = referenciaData...
asked by 26.07.2018 / 20:28
1
answer

Display only results that satisfy the condition within the loop

I am building a small algorithm that traverses a ArrayList and compares the value found with a value entered by the user. But I want to print on the screen only the value that satisfies the operation, not the other values that do not m...
asked by 09.09.2018 / 22:24
1
answer

How to compare all the values of an array with a variable

I would like to know if it is possible for me to have an array with multiple dates and know if another date is longer than all the dates within the array. For example: Date[] datas = {"02/02/2000","03/03/2000","04/04/2000"}; Date data1 = "0...
asked by 03.09.2018 / 21:42
1
answer

Problem due to add at the end of a Simple Chained List

I have a simple linked list and need to do a recursive function that adds at the end of the list an element, I already have the function without recursion, but the one with recursion is giving error. Here is the code and error: Function with...
asked by 10.09.2018 / 19:11
1
answer

How to get the value of a JSpinner, inside a loop?

I am putting together a screen where products from a database are displayed: product title, price, button, and a spinner. I try to give a getValue of jspinner, however it does not return the value that the user indicates. public class Minimo e...
asked by 31.08.2018 / 17:33
2
answers

List always returns only the first row of the bank sqlite [closed]

I have a list, which shows all sqlite bank data, image path, latitude and longitude, but in the list only changes the image path, latitude and longitude always stays the first record. public List<Foto> todasFotos(){ List<Foto>...
asked by 27.09.2016 / 16:59
1
answer

"Java exception has occurred" error while running PostgreSQL JDBC driver

Here's my problem: 1 - I'm using the Postgre 9.6 database. 2 - I downloaded and opened in ECLIPSE a project with Java application example with the use of Hibernate and Postgre that the teacher created (that is, the code is correct) I put t...
asked by 16.03.2018 / 02:28
3
answers

Convert String to double in Java

I'm reading data from an external file with the CSV format. But this data is coming in String format. There is a price field that I need to convert to double for manipulation purposes. Class Catalogs import java.io.File...
asked by 17.03.2018 / 05:04
1
answer

findViewById (2131230729) What are these numbers?

I'm analyzing a class from an Android app project, I'm new and I did not understand these numbers within the findViewById(2131230729) , within the parenthesis it was to have R.id. "layout" how do I go through that number to figure out the l...
asked by 20.03.2018 / 16:58