Posts by Victor Henrique • 817 points
43 posts
-
6
votes1
answer502
viewsQ: Manage transactions in Java EE @Transactional
I’m having trouble trying to "inherit" the transaction from Java EE of my layer of service to the layer of repository. My intention is for the transaction to target my service function. Enabling me…
-
1
votes3
answers530
viewsA: Find an object in the array that has a specific key
this.specifications.forEach( item ->{ if(item.key === "Valor"){ minhaVariavel = item.value } }) Always remember to use ===, so it checks the type of the variable and the value. Using ==, the…
-
0
votes2
answers355
viewsA: Angular - Page without showing previous components
You are probably using the <router-outlet> within the form part. Place the form into a separate component without the <router-outlet>. Let the <router-outlet> only for…
-
0
votes1
answer69
viewsA: Check JSON Login Result with Angular 2x
The second call to jogadorService is not doing anything, since it is not given a subscribe in it. Then you can remove it. The function subscribe is the one that actually executes the call or…
-
0
votes1
answer42
viewsA: Focusin event does not work
I took the test on stackblitz and it seems to me that the function (focusis) works even within a div. It seems to me that the function call is wrong. Then the code should be the html: <div…
-
2
votes1
answer250
viewsA: Leave some input select Multiple(Angular Material) pre-marked
As quoted in documentation, you can create a list with the results and you can already put the values of value included in that list. public selecionados = [RDC1, RDC4]; and then make Binding, data…
-
1
votes2
answers501
viewsA: How to disable an edit module property in Angular?
As seen in this post, to disable the field you can put in the creation of the form the code { disabled: true } or { disabled: variável }, so the creation of your form would look like this:…
angular-6answered Victor Henrique 817 -
0
votes2
answers332
viewsA: Problems with Angular 6 script import
In the angular-cli.json place the following string src/main/frontend/src/Assets "scripts": [ "..." "../src/assets/js/custom.js" <~ arquivo adicionado ... ], So the file will be visible to the…
-
1
votes1
answer130
viewsA: Repeat structure to replace the value of one array to another
Try to use this code. In the code it goes through all this.produtoAlvoAlterar.variacao and this.anuncioAlterar.variations, he gets the Preço of each anuncioAlterar and settar no produtoAlvoAlterar.…
-
1
votes1
answer196
viewsA: Update array value with IONIC Storage
At first if you place only one item in the array and save that 1 item array in the Storage. Instead, try to find the Index of the object in the array of data and modifies that object. let index =…
-
1
votes1
answer1323
viewsA: [Angular][Bootstrap] -Open and close Collapse effect with just one click
I used a lib call ngx-bootstrap and used the Component Collapse for that reason. ngx-bootstrap The Input collapse is responsible for showing/hiding the elements. So I created a control variable for…
-
1
votes1
answer221
viewsQ: Text encoding for RTF in java
I’m trying to modify a file .RTF, where the parameters that will be modified are settados as numbers. However, their characters are in ANSI believe me, because the file has its header the following…
-
0
votes1
answer53
viewsA: Error using Angular Delete method
In your code Spring boot, you must create a class that extends the class WebSecurityConfigurerAdapter and implement the method configure(HttpSecurity http), calling the function call…
-
1
votes1
answer54
viewsA: Difficulty accessing elements in a C vector
First remove the pointer from the greater and comparator: int maior; int comparador; Then you must correct the function return parameter CriarVetor so that it returns int * instead of int and the…
canswered Victor Henrique 817 -
1
votes1
answer153
viewsQ: Error doing Many to Many interface with Spring Boot
I’m trying to make a phone call Many-to-Many between classes usuario and permissao, using the documentation of Hibernate as reference . But when I try to generate a class JSON file usuario the…
-
1
votes1
answer331
viewsA: Implementation of Containerrequestfilter with Jersey
Unfortunately I couldn’t do the filtro function to the Jersey 1.x. So I had to split it into two parts: Migration of Jersey 1.x to the 2.x Configuration of web xml. 1. Migration from the Jersey 1.x…
-
1
votes1
answer331
viewsQ: Implementation of Containerrequestfilter with Jersey
I’m doing the token implementation through this tutorial, but when I try to implement Containerrequestfilter the program sends the error below. The error occurs only with the implementation of the…
-
1
votes1
answer3056
viewsA: Name [name] is not bound in this Context. Unable to find [jdbc]
I solved my problem and had to solve several other problems together. Then I will show the solution of all step by step. Version change for Hibernate I was using the version hibernate-core-4.3.0 and…
-
5
votes1
answer705
viewsQ: "No Persistence Provider for Entitymanager" for Hibernate 5.x
Well, you have to update the version of hibernate that was already I want to implement in my project to avoid bugs of the past version, but I’m having difficulty making the persistence in the new…
-
0
votes1
answer3056
viewsQ: Name [name] is not bound in this Context. Unable to find [jdbc]
In the expectation of improving the performance of BD access I started to implement a pool of connections within my Web Application. But every time I will give a lookup on the application I think…
-
0
votes2
answers467
viewsA: Calculation of word similarity with Java
Instead of spending a lot of String, is easier if you pass as parameter a Array or List of String. And as a return it is not possible to create a return that has T Lines of the kind Interger, the…
-
1
votes1
answer513
viewsQ: Exception handling (Try) error in python
I am making a program that makes numerical calculations, but constantly appear to me operations where there is division by 0 (zero). I ended up finding a solution using if, but still wanted to know…
-
3
votes1
answer1446
viewsQ: Line exchange in the matrix
Hello. I was programming in python and wanted to change the line (between the second and third lines) of an array using the following code. But I wanted to know why the variable auxLinha changes…
pythonasked Victor Henrique 817 -
1
votes1
answer57
viewsQ: Relation between entities returns null
I’m having difficulty checking a parameter in a relationship between Historico and Login. public class Historico { public int ID { get; set; } public virtual Login login{ get; set; } public DateTime…
-
0
votes4
answers582
viewsA: Entity Inner Join in LINQ
Manage to solve my problem with the following code using the syntax lambda. In it I quote the table I want to group LoginDao.getListUsuario(). I join the table and then select active user names…
-
2
votes4
answers582
viewsQ: Entity Inner Join in LINQ
I wanted to make an Inner Join so that I get a list of the names of Logins from the Integer List of UsuarioID class LoginsAtivos. public class Login { public int ID { get; set; } [Required] public…
-
1
votes2
answers97
viewsA: Loop in Constructor c#
The properties were not set correctly. For the set and the get were calling themselves in order to cause overflow. To solve it is necessary to create a field backing field to store the value of the…
-
2
votes2
answers97
viewsQ: Loop in Constructor c#
I’m trying to set mine Senha using the md5, but there is a loop at settar. public class Usuario { public int ID { get; set; } [Required] public string Nome { get; set; } [Required] public string…
-
1
votes2
answers71
viewsA: Do not modify cell for a given result.( History)
After clicking on the spreadsheet I was working on (at the bottom left corner) and selecting the option exibir código I put the following code Private Sub Worksheet_Change(ByVal Target As Range)…
-
1
votes2
answers71
viewsQ: Do not modify cell for a given result.( History)
In a management table I have two columns a Status(Coluna A) and another Estado Anterior status. In this I want to keep the same value as in column A, except for some case. So that it keeps a status…
-
0
votes3
answers818
viewsA: Validate Select jqueryValidate with Materializecss
Try that code. I added the tag requiredhtml 5 and took placeholder value. <div class="input-field col s1"> <select id="comboBasculante" name="comboBasculante" required> <option…
-
2
votes1
answer227
viewsA: Archive template for Eclipse IDE
This way you can change the eclipse Web file templates, just select the New File type. Click on Window > Preferences. Expand the Language you want Expands editor Select Templates You can check…
-
1
votes1
answer128
viewsA: Jquery captures ID of div in scroll and changes title
To get the first ID using jquery you could use the code below, which would bring you an object: code 1 $( 'tag[id!=""]:visible:first' ); Where the tag would be where the id is. If the id identifies…
jqueryanswered Victor Henrique 817 -
4
votes2
answers567
viewsQ: Test without "fouling" (adding data) the database
I am having trouble doing integration testing. I test my database functions. My web application does not use any framework database connection and I am unable to do tests without fouling my…
-
6
votes3
answers72
viewsQ: Page does Submit even with validation error
Hello, I’m having trouble with a page because it’s doing Submit even when validation returns false. $("#botao1").click(function() { $.ajax({ url : 'adicionadaIdeia', type : 'POST', async : false,…
-
1
votes1
answer1646
viewsA: Shows image in JSP
One solution I found was to add this code to WEB.xml <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.png</url-pattern>…
-
1
votes2
answers68
viewsQ: Is it necessary to place the element type inside the Try?
When optimizing my JDBC code I started using a condition within Try. /** Função PreparedStatement stmt */ public PreparedStatement stmt; /** Funçãoo ResultSet rs */ public ResultSet rs; /** Método…
-
1
votes1
answer253
viewsQ: How to use jquery variable value
I am having trouble using the value that is inside my variable when I use it jquery var id_pais = $('#endUF option[value=id_pais]').text(); $('#endUF option[value=id_pais]').remove(); $('#endPAIS…
-
0
votes2
answers176
viewsQ: As foreign key reference alternating tables
I have a City, State and Country Database. But I want to add Cities to my table and it doesn’t always contain a state to be referenced. However, every city is located in a country. My question is:…
-
2
votes1
answer1646
viewsQ: Shows image in JSP
I’m having trouble showing an image on my JSP page. I’m trying to use several different ways to get the file and I can’t show it on the page. Folders are arranged as follows WebContent |_1.jpg…
-
1
votes1
answer57
viewsQ: JSP: Item page not found
I am programming a page to inform you that the searched item has not been found. I wanted to know what I’m doing wrong and what would be a solution. <c:forEach items="${proposta}"…
-
2
votes1
answer64
viewsQ: Requestmapping to a large URL
Wanted to know how I make one @RequestMapping for a large URL. In case I wanted to map the word authenticate.…
-
5
votes2
answers3756
viewsQ: How to save the path of an image in the Database?
I’m using JDBC and picking up an image to save in the database. However I want to save the image in the hard drive and save in the database only the way (path) hers. I wanted to know which is the…