I have a Rest API in Java, which makes use of JWT to authenticate users and generate tokens to access their resources. I have an application in AngularJS, which should consume these resources, but I must first request a token in the API. I would...
During college a teacher commented to me that declaring a variable before a loop and reusing it was an economical and more interesting way to do it. For example (in Java):
String str;
for(Pessoa p : pessoas){
str = p.getNome();...
I have the following number in scientific notation: 7.89894691515E12
I need to convert it to String in the common format: 7898946915150
How to do this through Java?
I am developing a website in JavaEE and would like it to be multilingual (at least English, Portuguese and Spanish). But I would like to know how large websites, such as Facebook, for example, do to identify the country of origin and offer the s...
I have a Java web application with Applets that access web services. These services are accessed through a specific hostname (example: services.webapp.com.br ) configured in the application. Knowing that it is the user's JVM that will exec...
I need to pass these values from a json file to a java class, the Json file is of this type:
{
"id":1,
"name":"Gold",
"description":"Shiny!",
"spriteId":1,
"consumable":true,
"effectsId":[1]...
I have an error after closing Hibernate Session
public String listarTodosClientes() {
session.getTransaction().begin();
List<Cliente> lista = session.createCriteria(Cliente.class).list();
session.close();
return lista.toS...
I need to work with times, such as a timer (not my case), which at the end of its execution would have to save its value.
So I thought of some possibilities like:
java.utils.Date : only the data in the case is not a Data;
In l...
I'm having trouble creating the interface in java, because I can not figure out the header of the function in C.
Example Header C function:
CMOEP_API char * CALLCONV CMP_GetLastError( );
Now in java I have this but I do not know how to i...