Questions tagged as 'java'

1
answer

Format date in Android and SQLite

I am having difficulty setting the current date of my SQLite database in the% type attribute of my object. The SQLite date comes in the format "yyyy-MM-dd". I'm trying to convert to the format accepted in type java.util.Date and that a...
asked by 15.11.2015 / 06:27
2
answers

Formatting Text in a JTextPane

Hello, I have a JTextPane and would like to format parts of your content. Is it possible to do this? JTextPane areaDeTexto = new JTextPane(); areaDeTexto.setText = "Este texto está formatado em negrito.\nEste em itálico.\nEste em sublinhado.\n...
asked by 27.09.2015 / 18:12
2
answers

Compile error when sending to third party verify

I'm practicing Java in SPOJ and came up with a simple exercise:    Continue typing a number and when 42 appears, stop printing. And so I made it quiet here on my PC compiling as expected. The problem is that when I submit to SPOJ the solu...
asked by 30.09.2015 / 17:03
2
answers

What better way to parse a very large json file in java?

I have a very large file in json, it has 5 gigs and has 652339 lines, I was thinking of using the Gson library in java. I'd like to know, what is the best way to parse from file, since neither the json framework was able to extract it right....
asked by 26.09.2015 / 16:11
2
answers

Exit the loop when the string is empty or when entering a specific word

I'm making an algorithm that displays the total purchase price. I enter with the product, unit price and quantity. Again I have the possibility to enter with the product and so on. When you want to display the total, simply enter enter when orde...
asked by 07.10.2015 / 13:59
2
answers

Put files inside a .zip file

I have a class where I compile some files: public class CompactarArquivo { //Constante static final int TAMANHO_BUFFER = 4096; // 4kb //método para compactar arquivo public static void compactarParaZip(String arqSaida, String...
asked by 19.10.2015 / 13:33
2
answers

Add field when clicking button

I am developing a customer registration project, in a form using PrimeFaces I would like to click on a button and with this make an inputText appear, if I click again, another appears and so on. Is this possible with jsf and primefaces? The i...
asked by 21.09.2015 / 21:41
1
answer

Problem with displaying data in ArrayList

I have a problem with displaying data in arraylist, it always shows the duplicate result public static void main (String[]args){ Scanner ler=new Scanner(System.in); Pessoa p=new Pessoa(); ArrayList<Pessoa> listaDePessoas= new Arra...
asked by 24.09.2015 / 00:41
1
answer

How to insert an encrypted field into a table in PostgreSQL?

I wanted to know how to insert an encrypted field into a table in the database. To illustrate my question let's suppose I have the following java class: package pessoa; public class Pessoa { private String email; private String senha...
asked by 25.09.2015 / 23:07
2
answers

Android studio has ndk support?

I will start development geared towards digital tv, and will be 50% ndk.Android studio caters well? or is it better to eclipse?     
asked by 05.06.2015 / 14:51