Questions tagged as 'java'

1
answer

PrimeFaces - Select DataTable row via JQuery, Javascript or PF

How do I select a row from a DataTable, using JQuery, pure Javascript, or the javascript PF command?     
asked by 13.02.2017 / 15:25
1
answer

Checking file on web server

Next, I have an Android app, this app wants to verify the existence of a web image to be able to load Picasso, if the image does not exist in an address www.algumacoisa.com/img/imagem5.png I will show a message. So what I need is to validate the...
asked by 17.02.2017 / 15:12
1
answer

How to read a JSON from a second link in an API?

Talk guys, I'm trying to get the JSON, from a second link that is provided by the API. But it gives error. Here is the code: private static String URL = "https://google-play-api-znbelznpav.now.sh/api/apps/com.fungames.sniper3d/reviews/?lang=pt...
asked by 09.10.2016 / 17:03
1
answer

How do I import a .sql file into an android bank?

I have a .sql file that contains several inserts and I needed my application to read this file and make these inserts, in a table I have created. Is there any way?     
asked by 06.10.2016 / 16:24
1
answer

Uploading and Donwloading JSF files + Primefaces + Mysql

How to retrieve the file name saved as BLOB from the database and display on the screen? I am using a loop to retrieve, the value saved in the database column, but it returns memory values ([B @ 2248bd40): Another inconsistency, which is o...
asked by 16.05.2017 / 02:38
1
answer

How to change the background of a JDateChooser?

I have a JDateChooser and would like to change the background when it won focu , however I'm not getting it. I tried to do it in some ways: dataChooser.getDateEditor().getUiComponent().setBackground(new Color(0, 0, 0)); or...
asked by 02.09.2017 / 18:08
1
answer

What is optimistic locking field of JPA

What is and what is JPA's Optimistic Locking Field? I noticed that this option exists for Eclipse Link and for Hibernate and this function is enabled when annotating a version attribute within an entity class, but I do not understand what its pu...
asked by 21.03.2017 / 14:44
2
answers

Extract groups with regex

I need to extract the session and date from the line below, the date I have separated with a dash and a bar. The patterns work correctly individually but when I try to extract the two, nothing comes. Pattern p = Pattern.compile("(\w{8}-\w{4...
asked by 20.03.2017 / 15:15
1
answer

JSONP breaks in the colon (":")

The server sends a JSON, normal. Here is the code: @GET @Path("email") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public String getEmail(){ ViewStatisticsEmail statisticsEmail = new ViewStatisticsEmail();...
asked by 12.09.2016 / 15:52
1
answer

Persisting in the Bank from a file

What would be the most efficient way to read a file and write to the Postgres database? I'm posting a code where I can do it, but postgres limits me to the connection number. Nowfollowtheerror:Set12,20168:53:39AMorg.hibernate.tool.hbm2ddl.Sc...
asked by 12.09.2016 / 14:06