Posts by Lucas Duete • 1,080 points
34 posts
-
8
votes3
answers1706
viewsA: Hibernate and JPA are the same thing?
Hibernate is a technology, it was the first ORM technics for Java. With the popularization of the same the Oracle (company maintainer of Java at the time) ended up inviting the creators of Hibernate…
-
3
votes2
answers626
viewsA: Install Docker in Mint
Try removing the libs and installing manually: apt remove -y libcurl4 apt install -y libcurl4 curl and then try again to continue the installation process: curl -fsSL…
-
1
votes1
answer1500
viewsA: Return a list of even numbers in a list and odd numbers in another list?
A possible solution would be to return a List from a list of integers that would have in the first position the even numbers and in the second the odd ones, would be like this: public…
javaanswered Lucas Duete 1,080 -
2
votes1
answer97
viewsA: Treatment of the Arithmeticexception exception exception
What happens in your code is that you first calculate the value of all variables and only then inform the result, this way as soon as the flow of the algorithm reaches the line div = a / b and if b…
javaanswered Lucas Duete 1,080 -
0
votes1
answer35
viewsA: Connection error send java email. Can anyone help me?
Apparently the problem is that the connection port is wrong, besides this the properties of the socketFactory not configured, use the following settings: props.put("mail.smtp.host",…
-
1
votes1
answer49
viewsA: Error:java.lang.Nullpointerexception at user.Mein.main(Mein.java:15)
Your code has some problems, the first problem and that was described in your question is in the method main on the following lines: System.out.println("Nome"); user[i].ID = id_cont++;…
javaanswered Lucas Duete 1,080 -
1
votes1
answer318
viewsA: Denied error when connecting spring boot to mysql
The problem, apparently, is that you are setting the login only for the DML scripts, as correction should add the login data in the default DB, besides this you need to define the properties…
-
2
votes2
answers129
viewsA: Code does not work and returns no error (Java)
Your code has two problems: First of all there is no %i in the Printf, for values of the type int or Integer use %d and that’s what’s causing UnknownFormatConversionException described in your…
javaanswered Lucas Duete 1,080 -
1
votes2
answers97
viewsA: Problem in C IF checking
The first problem is that you are using the operator || (AB) in the verifications of if. When the execution comes in if(conceito=="C" || frequencia>=75) he checks if the concept is equal to C OR…
canswered Lucas Duete 1,080 -
1
votes1
answer36
viewsA: Doubt for routine in Pascal
I suppose the following code solves your problem. function calcPorcentagem(valor, porcentagem: integer): double; var valorParcial: double; begin // Calcula o valor percentual valorParcial := ((valor…
pascalanswered Lucas Duete 1,080 -
1
votes1
answer239
viewsA: String size in PL/SQL
There were some errors in the writing of its function, correcting remained: CREATE OR REPLACE FUNCTION TamanhoString (texto IN CHAR) RETURN NUMBER AS tamanho NUMBER; BEGIN tamanho := LENGTH(texto);…
-
1
votes1
answer55
viewsA: Simulate Angular Binding with Pure Javascript
Just with pure JS would be something like: <!DOCTYPE html> <html> <body> <div> <p>Input something in the input box:</p> <p>Name : <input type="text"…
-
1
votes1
answer223
viewsA: Port redirection
Initially an important point, in iptables the rules of PREROUTING that do port redirects perform before filter rules that define which ports can be accessed and by which Ips, as can be seen in the…
-
1
votes1
answer142
viewsA: What is the correct way to run a web application in eclipse?
Note the right URL. In the first case you access the url http://localhost8080/Projeto and at the second moment http://localhost8080/Projeto/faces/index.xhtml. The difference becomes clear after…
-
0
votes1
answer60
viewsA: How to bring data from another table related to an id_user (JOIN??)
I believe the following query sql solve your problem: SELECT i.created_date, i.valor FROM Usuario AS u JOIN Investimento AS i ON u.id = i.id_usuario ORDER BY i.created_date; As you can see in this…
-
1
votes1
answer443
viewsA: How do I pass a lambda function as a parameter?
A lambda function is nothing more than an implementation of a functional interface. Knowing this we go for the answer, following the information you gave in my main class I will have an object List…
-
1
votes1
answer41
viewsA: Endpoint Rest with Jersey shows no expected result
I believe the problem lies in the class of inicalization, I propose the following changes: First add these (Jersey) dependencies to your pom.xml: <dependency>…
-
0
votes1
answer490
viewsA: How to check JWT on each request
A Rest API should not contain status between requests, so save the token in a cookie for verification would not be ideal. I don’t really know the language php but here’s a proposal: create a filter…
-
9
votes1
answer1019
viewsA: How to send Tokens from server to client?
The ideal is to have a feature that authenticates the client and resume a token for it. As for the header Token I don’t know you and I also didn’t find references to them, very likely it’s a custom…
-
1
votes1
answer65
viewsA: Code does not update in Hibernate JPA in Eclipse
Your code is probably not being updated on the application server. Suppose you are using Maven Cache and redo the application package with the following command: mvn clean package If you prefer to…
-
0
votes1
answer151
viewsA: Github image library for android that has the option to edit before loading
This first bilbioteca I used in some projects and she attended me very well, the second just tested to check the differences but I liked the first more(just my opinion).…
-
0
votes2
answers465
viewsA: Component ID does not appear in Mainactivity
The most likely problem is that you are not set the ID attribute correctly or it is not in the R file. First check if you are setting the component id attribute: <Button android:id="@+id/button"…
-
3
votes1
answer140
viewsA: How to make a delay or cause a wait on Android?
The problem, apparently, is that you are trying to make this delay within Uithread (or Main Thread if you prefer). By definition Uithread cannot contain any element that is blocking the user (which…
-
3
votes1
answer92
viewsA: Get value returned in a JS URL
To request the API and calculate the result would be something like this: function makeRequest() { var xmlHttp = new XMLHttpRequest(); xmlHttp.onreadystatechange = function() { if…
-
3
votes1
answer781
viewsA: How to restart app in android studio emulator without recovering status?
Open the VMD ( Virtual Device Manager ) and select Cold Boot Now in the Actions column of your device. In the thermial can do so: $ emulator -avd Nome_Do_Dispositivo -no-snapshot-load -no-snapshot…
android-studioanswered Lucas Duete 1,080 -
6
votes5
answers16554
viewsA: How to change all selected words at once in Vscode
There are three ways: 1 - Selection of Lines You can place multiple cursors by pressing Alt+Click in the place you want to add a new course, perform an action, like add letters or remove, Vscode…
visual-studio-codeanswered Lucas Duete 1,080 -
0
votes1
answer290
viewsA: Blocking routes for non-logged-in users
I usually do like this, maybe I’ll be useful to you: app.module.js file angular.module('ModuloDaApp', ['LoginController', 'AdminController', 'UserController', 'ngRoute']) .run(preAtivador); function…
-
4
votes4
answers1629
viewsA: Use color, RGB or hexa names?
The biggest difference is in your color definition power, using HEX you can define color much more precisely which you want than using RGB and the literal name. In addition, even with browsers…
cssanswered Lucas Duete 1,080 -
1
votes1
answer548
viewsA: How to display a textView of an Activity in another Activity
There are some ways to pass information between two Activities. One of these ways is to use one’s own Intent invoking the second Activity: Intent intent = new Intent(this, SegundaActivity.class);…
-
2
votes1
answer510
viewsA: Does Docker always check that the local image is of the same or lower version as the official Docker Hub repository?
Let’s start with the command run. When rotating docker run ubuntu Docker will check if there is a Ubuntu image locally using the tag :latest. If there is a Docker it will create a container using…
-
0
votes2
answers52
viewsA: Get mysql table id in application
I believe the problem lies in the space between the quotation marks ' Xiu ' and ' Técnico '. When he executes Preparedstatement, by reconciling these spaces, he ends up not finding any tuple that…
-
1
votes1
answer483
viewsA: Cross-Origin Golang with Gorilla/Mux
Just add as Header enabled the Content-Type, the variable allowedHeaders will look like this: allowedHeaders := handlers.AllowedHeaders([]string{"X-Requested-With", "Content-Type"})…
-
3
votes3
answers91
viewsA: By generating a Docker container, are we lifting a virtual linux passkey in the background?
When talking about "Are we lifting a virtual linux machine in the background?" , if you are asking if Docker creates a full virtual machine running its own linux kernel and the application itself…
-
1
votes1
answer800
viewsA: How to convert JSON to Object and find an id - JAVA
You can use the Json processing API available from Java 1.8 Dependencies Maven: <dependency> <groupId>javax.json</groupId> <artifactId>javax.json-api</artifactId>…