Posts by Thiago Cunha • 1,356 points
108 posts
-
0
votes0
answers21
viewsQ: How to verify and manipulate native LOG in Sqlserver?
I am working in an application generating a Batch service being developed in T-SQL. Just like Mysql and Postgresql have their LOG files, where are these LOG files in Sqlserver? Another question is…
-
2
votes0
answers37
viewsQ: Action Pattern VS. Controller Pattern: What’s the difference?
I was taking a look at the architecture of a PHP project, and I noticed the use of Action Pattern instead of Controller Pattern. I would like to know the difference between the Standards as well as…
-
0
votes1
answer416
viewsQ: Spring Data JPA: How to Project Data?
I’m following a tutorial to make projection based at this link. However, it seems that the application is generating an error in the serialization of the data emitted by the reflection of Jackson.…
-
0
votes2
answers2620
viewsA: How to resolve? No converter found capable of Converting from type [java.lang.String] to type [@org.springframework.data.jpa.Repository.Query]
You are having problems with the serialization of the data. Jackson is in charge of this through Reflection. To solve this case, you need to create a DTO to serialize the data you really need. You…
-
1
votes1
answer448
viewsQ: How to filter selected fields through Spring JPA using JPQL?
I would like to know how to proceed to filter selected fields using JPQL within the JPA/Hibernate implementation? The following scenario will be presented to facilitate understanding, following…
-
7
votes2
answers97
viewsQ: How to see the implementation of the Typescript code?
In several programming languages that I have worked or currently work with, I can see the implementation of the developed codes. In Dart or Java for example, I can go to the source code and analyze…
-
2
votes1
answer258
viewsQ: Request made to Spring Boot is returning another endpoint API
I set up a test scenario to treat an error that was happening on my frontend. Situation Problema: The problem was that I was making a requisition for a route ‘/api/v1/telefones’, Spring ends up…
-
0
votes2
answers81
viewsQ: How to refactor my method by eliminating the setTimeOut that is controlling the life cycle?
A profile is coming from a parent component: <app-telefone-form [perfil]="perfil"></app-telefone-form> But when it arrives at the child component, it is necessary to delay the…
-
0
votes1
answer73
viewsQ: Java: Error passing references in a Supertype using Convert Pattern to convert DTO/Entity
I’m doing a serialization process of a DTO class for Entity and vice versa. And for that, I use a design pattern called Convert Pattern. At first, I created a generic class that performs these…
-
0
votes0
answers587
viewsQ: How to create an Annotation to validate data from a DTO in Java?
I have a class of a DTO object that I receive in my control through a request using REST. See an example of a request using the verb Post: @PostMapping public…
-
1
votes1
answer374
viewsA: How to test java exceptions using spring and Junit 5 lib?
The Junit 5 testing library offers many features to work with TDD. One of the methods present is the Assertions. At this link the methods present in Assertions. To test a code that returns an…
-
2
votes1
answer374
viewsQ: How to test java exceptions using spring and Junit 5 lib?
I’m in doubt about how to test my java exceptions using the Spring Framework’s own resources. I’m testing a class called UsuarioValidator.java and in it I have a method called…
-
0
votes1
answer89
viewsA: User Creation Api Is Returning Status 204 In Content
I don’t have the Adonis on my machine to simulate this test. But reading, it seems to be only something related to Javascript. I don’t know what its variable token is returning. But, let’s assume…
-
1
votes1
answer60
viewsA: SASS: Are there any features to avoid repetitions and lines of code color variations?
Sass works perfectly in our favor to automate repetitive tasks. And to solve the problem of creating classes, we need to establish some basic knowledge. First, create a mixin, in my case, called…
-
1
votes1
answer60
viewsQ: SASS: Are there any features to avoid repetitions and lines of code color variations?
Problem situation I am creating a palette of colors that vary a lot in their references, being 10% of the base color down. For example: $primary: #0069FF; A 10% subtraction of this value is:…
-
0
votes1
answer224
viewsQ: How do I make an angular application work only on a specific browser?
I would like to make my angular application work on a particular browser, and block any other version. Ex: Work only on Google Chrome 75. And if the user tries to access in a Firefox, Edge, or…
-
-2
votes1
answer94
viewsQ: Difficulty writing a REGEX to validate URL
I’m having trouble creating a regular expression that validates the following URL: https://firebasestorage.googleapis.com/v0/b/nome-app/* *would be anything! Someone could give me a related surpote?…
-
0
votes0
answers30
viewsQ: Duplicating writing in php file
I am implementing a Fileimpl class that contains a write method. However, at the time I write, it seems that the request is duplicated. That is, if I try to add 1 date, as in the example below...…
phpasked Thiago Cunha 1,356 -
0
votes2
answers688
viewsA: How to load a Selectonemenu based on Select Previous using JSF?
To solve this problem, we needed to define a Class that implements the Faces Framework Converter. @FacesConverter(forClass = Estado.class) public class EstadoConverter implements Converter {…
-
1
votes2
answers688
viewsQ: How to load a Selectonemenu based on Select Previous using JSF?
I am trying to register a Neighborhood based in the City and the selected state. The list of the city depends on the state selected. Follows my code: <div class="form-group">…
-
0
votes1
answer1326
viewsQ: Nullinjectorerror: No Provider for Formcontrol! Error in simple form with Reactiveforms
I’m having an error trying to render a simple contact form, but I don’t have a vision of why. Follow the error: core.js:14597 ERROR Error: Uncaught (in promise): Error:…
-
7
votes1
answer170
viewsQ: Does DDD restrict code writing based on the client’s language?
My little knowledge about DDD has been subpoenaed and would like to know more about. The DDD restricts code writing based on the client’s language because of the ubiquitous language?
-
0
votes1
answer39
viewsA: Error in the findById of a generic class for persistence and queries using Hibernate JPA
In the generic class, you need to manually pull the value by instantiating the class. public BaseRepositoryImpl(Class<T> entity) { ... this.entity = entity; } As it is working with…
-
0
votes1
answer39
viewsQ: Error in the findById of a generic class for persistence and queries using Hibernate JPA
I have a generic class I’m using to perform queries with JPA Hibernate. My class is like this: public class BaseRepositoryImpl<T> implements BaseRepository<T> The problem is that in some…
-
2
votes1
answer253
viewsQ: How to generate a value containing the "last Friday of the month" using Java Localdate?
I am receiving data from a CSV file with some data, and one of these data contains random dates in the following format: mm/YYYY. I have a parameter private LocalDate date. And from the generated…
-
1
votes1
answer1105
viewsQ: Problem Injecting a Service into the Controller: An unhandled Exception occurred while Processing the request
I’m getting error below when trying to inject a service into a controler. I already checked my configuration on Statup.Cs. Error: An unhandled Exception occurred while Processing the request.…
-
2
votes2
answers177
viewsQ: Converting (Mapping) a List of an entity to another reference explitically
How do I convert/map a list from one entity to another reference explicitly. Here’s an example I was able to perform with an entity: public static explicit operator UserResponse(Entities.User…
-
3
votes1
answer77
viewsQ: How to redeem data that was saved in the bank during a creation process
In some Orms Nodejs I have this feature. However, I would like to know how to rescue an entity that was persisted in the bank? For example: User has an attribute ID. If I return the item, the ID…
-
0
votes0
answers14
viewsQ: Invalidoperationexception: Unable to resolve service for type while attempting to Activate
This is probably a duplicate question, but all the questions I saw didn’t solve the problem. The mistake happening is: The flow is as follows: View -> Controller -> Service -> Repository…
-
1
votes1
answer86
viewsQ: Timestamp in C# for persistence in Sqlserver
Is there any typing that already treats this in C# to perform persistence in Sqlserver database? I need to resolve the Createdat and Updatedat property. For each change, it will be stored in the…
-
2
votes1
answer772
viewsQ: Paging library for . Net Core
I’ve worked on some frameworks like Spring and Nestjs, and there I worked with a library that listed a query page. Here at . Net Core, I have to create a method to work with it. For example: public…
-
0
votes1
answer120
viewsA: Angular 6+: Page update goes to the application’s login area
Solution 1: Since User is not an Interface, the reference is lost. So, I changed the format of Interface to Class, and I instated the same. this.user = new User(); The way above, I couldn’t lose my…
-
1
votes1
answer120
viewsQ: Angular 6+: Page update goes to the application’s login area
I performed the composition of my Canactivate and Canload, through the Loggedinguard class. The problem is that whenever I refresh the page, I am redirected to the Login page, even logged in. Below…
-
0
votes1
answer118
viewsA: How to put this form below the header?
First you need to abuse HTML5 semantics to organize your content. Usually, the tag <header> is in the header of the site. Think of an Organization of the main tags: header: Top of the site…
-
1
votes1
answer435
viewsQ: Recover Header from an angular Http Response
I need to recover the token that comes in Authorization and save in localstorage, but, I’m not getting. My login method within my service is: public login(email: string, password: string):…
-
0
votes1
answer33
viewsQ: Error 500 when performing an authentication request with Adonisjs
I have a Sessioncontroller, which is the method that performs the user authentication process in the application. class SessionController { async store ({ request, response, auth }) { const data =…
-
1
votes1
answer167
viewsQ: Configuration error on JPA and Postgresql connection
I am having problems connecting JPA with Postgresql. I believe the problem is in the configuration of the application. I am using the Java 8 version, and my pom.xml file is: <project…
-
3
votes2
answers129
viewsQ: Kotlin for Creation and Apis: Only for Android?
I saw some features offered by the Kotlin tool, especially when it comes to saving lines of code and verbosity generated in Java. How is the tool to generate services and be consumed by web…
-
0
votes1
answer2990
viewsQ: How to import and configure a Maven project with Tomcat server in Intellij?
I have a simple project and would like to run this project in Intellij IDE, but I believe that unlike Eclipse, the IDE requires other settings in parallel to import. I would like to know how this…
-
0
votes0
answers363
viewsQ: APPLICATION FAILED TO START: Persistence error while starting the application
Projeto Completo: https://github.com/codenome/ponto-inteligente-api I am developing an application with Spring Boot, and when starting the application I found an error that I could not solve after…
-
1
votes1
answer742
viewsQ: How do I get the Header of a Sponse with Angular 2+?
How do I get a response header with Angular 2+? In my case, I’m using version 6. I would like to take this Authorization data to be stored in the Browser Localsession. I am using the following…
-
1
votes1
answer424
viewsQ: Problem with routerLink at angle 6
I’m having the following mistake: Can't bind to 'routerLink' since it isn't a known property of 'a'. (" <h6 class="text-center"> Do not have an account yet? <a [ERROR…
-
-1
votes2
answers412
viewsQ: Javascript: How to pick up an array of objects within a child of an array of objects
I have the following example object: const empresa = { nome: 'Tal tal', endereco: 'taltaltal', groupos: [ { nome: 'taltaltal', codenome: 'tal', as: [ { nome: 'grupo a', apelido: 'ga' }, { nome:…
-
0
votes1
answer127
viewsQ: CSS/SCSS: Generic validation element accompanying input format
I’m having a problem on my style sheet. I have a generic Input as shown below: I put an element to validate my form, the validation this OK, but I’m having problems in alignment, because if I…
-
0
votes2
answers1557
viewsQ: Problem when integrating Jquery, bootstrap and Popper.Js scripts at angular 6
I have a problem integrating bootstrap.js, Popper.js and jquery.js scripts into my Angular project. I’ve made some attempts, but nothing has solved so far. My scripts are being embedded as follows:…
-
1
votes1
answer439
viewsQ: How to take the first and last class Parent of a div contained within a TD via CSS/SASS?
I would like to know how to get the first and last Rent of a class set (.date) that is contained in a div within an element . Following is an example of a code tree: <table> <tr>…
-
-1
votes1
answer287
viewsA: How to distribute column spacing of a responsive table equally?
You can use the property table-layout: fixed table { width: 100%; table-layout: fixed; } table td { border: 1px solid #000; } <table> <tr> <td>Nome</td>…
-
-4
votes1
answer287
viewsQ: How to distribute column spacing of a responsive table equally?
How can I distribute column spacing equally from a table using CSS? Ex: <table> <tr> <td>Nome</td> <td>Email</td> <td>Telefone</td> <tr>…
-
0
votes0
answers242
viewsQ: Error: Cors when integrating nodejs and Angular 6
I have a problem that I need to treat, but I’m not getting any solution so far. I have an application in Nodejs that I developed in #Expressjs and I face some problems related to CORS Browser. In my…
-
1
votes1
answer146
viewsQ: Some dynamic way to select Ids with Javascript
I would like to know a possibility of an algorithm for me to select a DOM in a more dynamic way, without having to use the getElementById every time. I would like to select all the elements and…