Questions tagged as 'java'

1
answer

Download svg image to present in Android ImageView how?

I have a api link that returns me a json on Android. That json is binded to a class using Jackson. But I need to use the url that is contained in json which is a svg image. I want to use this image to display the image in my custom listview bu...
asked by 19.12.2017 / 19:07
1
answer

Problems trying to change a text view of nav_header_main.xml

I am working for the first time with the Navigation Drawer Activity, and would like to change (by java) the text that appears in the menu nav_header_main.xml Inredit'sthetextthatIwanttochange.Belowisthexmlautomaticallygeneratedbyandroidstudi...
asked by 17.11.2017 / 01:08
1
answer

java.lang.ArrayIndexOutOfBoundsException: length = 0; index = 0

I am developing an application that will consume the price and time calculation service of the mails, however I have a problem in the service response, it returns me the following message: java.lang.ArrayIndexOutOfBoundsException: length = 0; in...
asked by 16.11.2017 / 15:04
2
answers

How to convert from hexadecimal to base64?

I'm getting a hexadecimal image from the database and I have to convert it to base 64, but I do not know how to do this. I'm currently setting it as string and returning it in json: Model private String image; public String getImage() {...
asked by 09.11.2017 / 04:45
1
answer

How to work with object as attribute in the register of another object using JSP?

I have a Scheduling class. In this class I have a Task object. My question is, when creating the screen to register the schedule, I will have a field to register the Task of this schedule. Imagining that these tasks are already registered in the...
asked by 16.11.2017 / 21:47
1
answer

* .CSV file with UTF-8

I created a process that takes content from a certain web page filters what is necessary and generates a file *.csv of this content, you work correctly however the words that have some accentuation ends up giving error in generating time,...
asked by 08.11.2017 / 11:26
1
answer

Call DAO methods foreach jstl

I'm starting my studies in jsp and I came across the following situation: I want to use the forEach of jstl c: foreach and want to use a list that is returned by my DAO method. <body> <jsp:useBean id="dao" class="teste.ContatoDAO"/&g...
asked by 08.11.2017 / 22:30
1
answer

Get the last table value from the database and display it in JTextField

I have a program here in the factory that, every 1 minute, an equipment connected to a supervisor sends a direct value into a table in the database (SQL Server). I would like to know how to always get the last value and display it in a JTe...
asked by 31.10.2017 / 12:51
1
answer

IntelliJ IDEA Community and use of database

Well, I'm thinking of using IntelliJ IDEA Community to develop in Java, but I've seen that this version has no database tools. I saw it on the site but it was not clear on that. Does anyone work with this version that can help me understand t...
asked by 29.10.2017 / 00:43
4
answers

Doubt about generating random numbers

I'm doing an exercise in java. I was able to generate 6 random numbers, now, sometimes the number is being repeated. Could someone help me? Follow the code: public class MegaSenna { public static void main(String[] args) { Ran...
asked by 08.11.2017 / 20:05