Questions tagged as 'java'

1
answer

How to deserialize a geometric polygon with Gson?

I'm using Vraptor 4 and the intent is to create a polygon convert class that does deserialization and which serialize. My problem is just deserializing. How to deserialize a geometric polygon with Gson? Follow the json where I need to deseria...
asked by 17.10.2014 / 15:44
1
answer

IDE Tips / How to do?

I have the following problem I have some text that will be inserted by the user and we will take as an example Implemented phrase: I would like to know how to program better #hoje. I wanted to loop through words beginning with # a lis...
asked by 09.07.2018 / 22:35
1
answer

Data structure - arithmetic expressions

Recently I received the following challenge in college, but I'm having a hard time doing The challenge is:    Identify how a subset of numbers from 1 to 1000 can be   written using arithmetic expressions that have only the following   elem...
asked by 04.07.2018 / 21:30
1
answer

reverseOrder () In java not reversing

I have a method in java to sort a vector in descending method, but when I run the test it returns the unordered vector. Follow Method: public void sort() { int vet[] = this.vetor; inverter(vet); } private void inverter(int[] vet) {...
asked by 20.06.2018 / 00:05
1
answer

Thread independent from the result

I have a query where returns a list of results; Example: 192.168.1.2 192.168.1.3 192.168.1.4 192.168.1.5 I would like to start from this list creating a thread for each one independent. For each one to do its processing. Currently I u...
asked by 19.06.2018 / 21:31
1
answer

Error generating Id automatically in hibernate

I am making an application with hibernate, but it is generating and error: "ids for this class must be manually assigned before calling save ()" The class that is saying it is wrong is like this. @Entity @Table(name = "USER") public clas...
asked by 01.09.2018 / 19:09
1
answer

Search with accents and no accents Postgresql

Hello, I'm trying to do a search through a field in the application, it looks for the word in the database (postgres), however, there is a lot of product registered in the database, with and without an accent, for example, coffee and coffee a...
asked by 19.07.2018 / 16:20
2
answers

Andorid - Open Activity only once

How do I make an Activity open only the first time the app is initialized?     
asked by 05.05.2018 / 12:10
1
answer

Firebase database resets data when logo

I was studying FireBase and I created a login method with email and password, but I did not want to use this, so I learned how to use Google Auth, so I decided to associate the google auth account in the database. When I log in with the accou...
asked by 09.05.2018 / 05:01
1
answer

Querying in a List (IN) - Predicate and Specification - JPA CriteriaBuilder

Hello, I have to create a dynamic query based on the following scenario in a RESTFUL application using Springboot and JPA (I'm using JpaSpecificationExecutor): I have two entity classes (Entity), the first is that of products: Produto Long i...
asked by 06.05.2018 / 20:23