Questions tagged as 'java'

1
answer

Doubt on regex

Have this string and need to scroll through it by taking only the values that are within () . The string is: String estados = “(1, ‘AC', ‘Acre’), (2,’AL', ‘Alagoas’), (3, AM, ‘Amazonas’)… “ I've mounted the following regex : Patt...
asked by 07.10.2016 / 16:00
2
answers

Search for information in the database with Hibernate parameter validation

Analyze the following situation: request will provide country information that can be {0, 1, 2} . The repository method will look like this: Country Parameter Naming: 0: Bring all countries; 1: National only (Brazil) 2: Internat...
asked by 15.08.2018 / 16:30
1
answer

Why use ObservableList?

I have a theoretical doubt. I was studying JavaFX and I do not know what the function of ObservableList in this case: public void start(Stage stage) { //Creating a Text object Text text = new Text(); //Setting font to...
asked by 30.06.2017 / 15:31
1
answer

Image capture for base64

My app takes an image from the gallery or takes a photo, how to take that image and convert it to base64 ? private void onCaptureImageResult(Intent data) { Bitmap thumbnail = (Bitmap) data.getExtras().get("data"); ByteArrayOutputS...
asked by 03.07.2017 / 15:22
1
answer

Blank space JSTL

I'm having a really annoying problem, when my jsp is mounted I have a foreach in jstl that leaves my absurdly giant final code, worse than I realized it's just white space. Here is the code: <c:forEach var="column" items="${tela.targetXm...
asked by 29.06.2017 / 15:01
2
answers

How to make an object in the ListView have an absolute position?

I have a listView with several items, I also have a searchView to make a filter on these items, being "clickable", starting another Activity. The problem is that the numbering of lisView items changes according to what I search in searchView....
asked by 30.12.2016 / 05:01
1
answer

Change the HttpParams code to httpurlconnection

I have a code that connects json to a mysql database, but HttpParams is obsolete in the java version I'm using, so I'd like to know how to do it or how best to put new parameters and keep that format to get the data, this is a login and password...
asked by 20.04.2016 / 16:19
2
answers

Close the entityManager after operations? How to manage?

I have been doing some courses and all the material I have read so far exemplifies the use of JPA / Hibernate in small examples, however, when we are developing something more concrete as a project, some questions arise. For example, before an...
asked by 29.03.2017 / 03:39
3
answers

Hibernate vs EclipseLink

Both persistence frameworks implement JPA. 1 - Is there a difference between the two? 2 - Which is the best in performance? 3 - How do the two implement the same specification, after developing a complete application is it possible to c...
asked by 21.03.2017 / 15:34
1
answer

Backslash in Regular Expression

I was studying java and the course instructor left me a challenge to validate an email using regular expressions. I researched the regex API documentation ... part of the pattern .. The problem is that I found a code on the internet (which wo...
asked by 29.01.2018 / 01:29