Questions tagged as 'java'

2
answers

My arraylist is returning the same value on all "nodes"

This code should take all the elements of a login.txt file and place it inside a user array. public ArrayList<User> takeAll(){ ArrayList<User> list = new ArrayList(); User u = new User(); String result = ""...
asked by 05.09.2018 / 01:19
1
answer

Java Spring Boot - Read a file from the Resources folder inside a .jar

I am writing a class that will read an ETL Pentaho Kettle (transformation). I put the file that the class will read in the Resources / KTR folder. But when I try to run the code as a java (java -jar) application, I get an error saying that th...
asked by 28.08.2018 / 14:12
1
answer

How to make two Retrofit calls in jail with RxJava?

I make a call to retrieve some data and the second call - which should be done within the first - uses one of the fields of the previous call. val restApi = retrofit.create(RestAPI::class.java) testAPI.searchDoc("language", "title_query")...
asked by 12.12.2017 / 00:12
1
answer

Save frames / images of a video

Hello, I need to save images / frames of a video. The idea is to create a movie preview before it starts. The problem is that I'm not able to implement the examples I found. 1st Example to take a screenshot of the component with JavaFX,...
asked by 30.11.2017 / 15:54
2
answers

How to send JSONObject to a Web Service?

I'm trying for the first time to consume a Web Service in my Android application, sending data in JSON format. To accomplish the task I have a class to make the connection. public class ConexaoHttpJson { public static JSONObject enviarSoli...
asked by 13.05.2014 / 20:47
1
answer

Method not found using JPA

I've created a method for autocomplete. But when I am going to invoke this method the same is not found, it follows error: Advertência: /pessoal/cadastrar.xhtml @35,186 completeMethod="#{pessoalController.lookupFornecedores}": Method not...
asked by 12.05.2014 / 20:37
1
answer

Android MediaPlayer class warning: Should have subtitle controller already set

After updating to Android KitKat (4.4), an object of class MediaPlayer Android generates the following alert in LogCat :    Should have subtitle controller already set As explained in that question of the OS, it would suffice to...
asked by 18.05.2014 / 21:59
1
answer

Partial object update / Do not update null values with JPA

I'm using JPA for a webservice, and I'm using Merge to update, but it updates all my object values, is there any way to perform a partial update of it? Example, only change values that are not null?     
asked by 08.09.2017 / 15:34
2
answers

Count duplicate values in list

I have ArrayList with multiple numbers inside it. I need to identify how many times each number appears and then eliminate redundancies. I was able to eliminate redundancies, but I'm having great problems in identifying how many of them e...
asked by 17.05.2015 / 00:51
2
answers

Repeated elements in an array

I'm trying to make an algorithm that finds repeating elements in any array but I do not know how. The algorithm should not check the repetition only in rows or columns, but in the whole array (this seems to me to be the most complicated). Cou...
asked by 20.05.2015 / 15:19