Posts by renanvm • 3,797 points
117 posts
-
5
votes4
answers175
viewsA: Problem assigning HTML with . text() and . html()
.html() treats the string as HTML. .text() treats string as text.
-
3
votes2
answers481
viewsA: Cors error at angle 6
Add the following header to your back-end response. httpResponse.setHeader("Access-Control-Allow-Origin", "*");
-
0
votes2
answers947
viewsA: Spring Boot - Senseless 404 error
Put the main application class above the other packages. Switch to the Intellij Packages perspective and check if the class containing the annotation@SpringBootApplicationis at the root.…
-
0
votes2
answers682
viewsA: Error while trying to connect to a Postgresql database with Hibernate and Spring Boot
Remove the following dependency on your pom.xml. <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId>…
-
-1
votes2
answers39
viewsA: I need to create a shape via css so that the user knows he has selected a button
Add the selector active on your button. Example: button:active { background-color: yellow; }
-
0
votes2
answers2457
viewsA: How to use the controller in a java application
The main idea of MVC is to separate the code that creates and manipulates the data from the code that displays the data. In the case of a login, who will receive the request data is the Controller,…
-
1
votes1
answer990
viewsA: Error making an Angular POST request (Syntaxerror: Unexpected token s in JSON at position 0 at JSON.parse)
Add the header responseType in his constant httpOptions const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'responseType': 'text' }) }…
-
0
votes3
answers4910
viewsA: Consuming an API with Angular
Make the following change in the method getAlunos() getAlunos(): Observable<IStudent[]> { return this.http.get<IStudent[]>(this.list_students_url).pipe( tap(data =>…
-
1
votes2
answers2626
viewsA: Adjust image inside canvas
To prevent the image from being inside the canvas, it is necessary to limit the placement of the object obj which contains the image. The top and left position cannot be greater than 0. var canvas =…
-
0
votes2
answers173
viewsA: Pointing directories in git
I advise you to create a workbook for each project. After that, use the following command in the chosen folder. This command initializes a new local repository. git init Since you already have a…
-
2
votes4
answers801
viewsA: How to use switch in C?
"Opt" after "switch" is required? Yes, it is mandatory, first because without it the command does not work, second because the variable "opt" contains the value that will eventually correspond to…
-
1
votes1
answer239
viewsA: Problem retrieving JWT in Angular
Solution Import the Httpresponse import { HttpResponse } from '@angular/common/http'; Replace the class of Response for HttpResponse<any> Modified method login(username, password) { return…
-
0
votes1
answer239
viewsQ: Problem retrieving JWT in Angular
In the server-side I have a service using Spring Security and JWT for authentication and authorization, in the client-side I have a SPA in Angular. The problem occurs when I try to authenticate as I…
-
1
votes1
answer174
viewsA: Drag image outside of div using Jquery UI
I found a solution, added the following code inside the .draggable. appendTo: 'body', This property inserts the image as body daughter.
-
0
votes1
answer174
viewsQ: Drag image outside of div using Jquery UI
I have a div with a list of photos using the Bxslider plugin and I’m also using Jquery UI to perform drag and drop. Now, what I need is a way to drag the image out of this div (photos), because when…
-
5
votes2
answers2626
viewsQ: Adjust image inside canvas
I have a page that allows you to insert an image inside the canvas element and works perfectly. Now, what I need is a way to limit the positioning of the image within the canvas, not allowing it to…
-
2
votes1
answer121
viewsQ: Data persistence problem using JPA
I have a class that has two attributes, start time and end time, both Date type. @Temporal(TemporalType.TIME) private Date horarioInicio; @Temporal(TemporalType.TIME) private Date horarioFinal; In…