Posts by Guilherme Nass • 939 points
42 posts
-
0
votes0
answers10
viewsQ: Enzyme - Check whether a function of a Functional Component has been called
I have an React project that had unit tests with Jest and Enzyme. Inside the component I want to create a unit test, I need to know if an internal function (myFunction in the example below) of the…
-
0
votes1
answer23
viewsQ: Create alias for css Imports
I have a React project that uses typescript and would like to have some way to import css without putting the whole css site path. I would like to avoid such import time: @import…
-
4
votes2
answers346
viewsQ: Differences between Monolith and Monorepo
I have read some articles on Monorepo and still do not understand what would be the difference between Monolito and Monorepo. Would someone explain to me?
front-endasked Guilherme Nass 939 -
1
votes1
answer191
viewsQ: Align span tag with html to add edge
I need to perform an image alignment with a span tag and place an edge on that span tag. I was able to align, but it only worked by placing a margin-bottom of 1px. It worked, but I didn’t like the…
-
1
votes1
answer41
viewsQ: TSLINT - Private variable rule
Is there any rule in tslint to define what a private variable needs to have _ (underline) before the name? Example: private _router: Router,
typescriptasked Guilherme Nass 939 -
3
votes1
answer3444
viewsQ: .gitignore com . env
I added a . env to my .gitignore. file. But when I change something in . env, the changes are going up together in the commit. Follow my . gitignore: # Logs logs *.log npm-debug.log* yarn-debug.log*…
gitasked Guilherme Nass 939 -
0
votes1
answer78
viewsQ: Javascript - Setting url’s according to environment
My application has a login repository, very simple with pure javascript, at most a jquery. How do I make an ajax call by passing the correct url according to the environment I’m in? If I’m in the…
-
0
votes1
answer535
viewsQ: Angular 6 - Comparison of values
In the database I save an integer number to represent the user type. The integer number can receive 1, 2, 3, 4, 5, 6 or 7. When I show the type of user on the screen, I would have to do several…
-
1
votes2
answers86
viewsQ: User with more than one profile
In the business rule of the system I am working on, a user can have more than one profile. Profiles are: administrator, evaluator and responsible. For example: So-and-so can be an administrator and…
-
0
votes1
answer191
viewsQ: ASP . NET - Local file directory using Chrome
I have the following code snippet: <div class='upload-border'> <input class='file-upload' id="fileUpload" runat="server" type="file" name='upload'/> </div> I need to get the local…
-
0
votes1
answer1332
viewsQ: Angular - Browser does not update after code changes
I’m using Angular (version 4) and my code changes don’t make an automatic build of the application. The default is to make changes to the code and already give the automatic build, as get Started…
angularasked Guilherme Nass 939 -
0
votes0
answers45
viewsQ: Pass token by query param
I have an application that runs on one door and I need to call another application on another port, to pass a token. Passing a token per query param in the url is good practice? Example:…
webrequestasked Guilherme Nass 939 -
0
votes1
answer526
viewsQ: Setar localStorage in different Omains
I have three applications: 1. Login (which runs on door 8080) with jQuery very simple 2. API (wheel at port 4000) with Nodejs 3. Web (rotating at port 4200) with Angular When I am logged in and…
-
1
votes1
answer104
viewsQ: Angular 4 and Nodejs Express - Problem with CORS
Hello, I have two applications that run locally on different ports. One application is for API’s and another is the web part. When I send the form data to my typescript service, the data is arriving…
-
2
votes3
answers4284
viewsQ: Problem with special character "ç" in javascript
I have a switch case to check the month and had to add a hexcode for the month of March not get problem in the character "ç". The March string was like this: Mar o One of the ways to solve the…
-
0
votes2
answers220
viewsQ: #GRAILS gsp search filter not passing parameters to controller
I have a form on a gsp page and this form has a g:textField that the user will enter values and then click on a button to filter the grid values. For example: there are 3 registers on the grid...…
-
4
votes3
answers430
viewsQ: Replace part of a Java String
I have repeating Strings, just changing a word. I have one case to assemble email content, but do not want to keep repeating the whole string, being that the only value that will be different, is…
javaasked Guilherme Nass 939 -
1
votes1
answer157
viewsQ: Print document to printer without user interaction
I need to print a document by sending directly to the printer without the user having to choose the printer. How do I do this with PHP5 or JavaScript? I found that with JavaScript has the…
-
0
votes1
answer32
viewsQ: Route not working with ui-router - Angularjs 1.6
I have the /main route, which when prompted redirects to an html page. The url is correct, but is not loading anything, remains on the login page. This route is accessed when the user logs in to the…
-
1
votes1
answer260
viewsQ: Java filter for specific pages
How do I control the access of pages with Java? I have a filter already implemented, which controls whether the user is logged in or not. However, I have a page that I need to check the user’s…
-
1
votes1
answer355
viewsA: Save user - Angular2/4
You can set the user logged in to localStorage. For example: When logging in, you can check the user in the back end (in your case php) and set directly in localStorage. localStorage.setItem("user",…
angularanswered Guilherme Nass 939 -
3
votes4
answers995
viewsQ: User permission - Angularjs
I have permission levels for users on my system: admin user and basic user. I have a page that only administrator users can access. I put an ng-if="isAdmin()" in the menu to hide, if not…
-
0
votes0
answers266
viewsQ: Retrieve data from the logged-in user - Angularjs
I need to get the data of the logged-in user, because some screens, only users with administrator permission will have access. How do I save session data with Angularjs? I’m using Java in the…
angularjsasked Guilherme Nass 939 -
0
votes1
answer180
viewsQ: Routes - Angularjs
I’m using routes from angularjs 1.6 and I’m having problems with the java connection filter part. When I log into my system and access a page of my system, the filter works normally, but when I open…
-
0
votes1
answer1265
viewsQ: Configure sql server without instance
Use SQL Management Studio to execute queries and the installation has been configured to use with INSTANCE. How do I remove this instance from the configuration or use a pattern? The instance I have…
sql-serverasked Guilherme Nass 939 -
3
votes1
answer227
viewsQ: Fire automated e-mail at a certain time with java
My system has the part of dental consultations and I need to send email to the client, if your consultation is on that day. For example: Run an automatic e-mail trigger at midnight every day. This…
-
1
votes1
answer1777
viewsQ: Access SQL Server base via CMD
In Oracle I know you have how to access and execute queries through sqlplus in CMD. Can anyone tell if SQL SERVER also has a similar command?
-
1
votes1
answer29
viewsQ: Data editing problem - Angularjs
I have a grid with the data and also has an edit button. Problem: When I click on change and start modifying the data, there on the grid the data is being changed too, even without having saved. My…
-
0
votes1
answer699
viewsQ: Ignore files from target folder
How do I ignore the files in the folder target maven’s? I want to ignore them so that the git don’t see the files.
-
1
votes1
answer34
viewsQ: Date format
I need to format date to present on the grid, but I don’t know the best way to do this. I’m doing it this way: $scope.formato[x].dataFormatada = formatDate($scope.consultas[x].data); function…
-
14
votes3
answers1028
viewsQ: Facilitation in PHP projects
I work with PHP using Sublime Text and would like something similar to what it is in Eclipse. For example: In Eclipse I can open exactly where the method was declared. In Sublime Text I did not find…
-
7
votes1
answer1030
viewsQ: Best practices with Java exception handling
How best to work with more than one exception in Java? In the code below, I see the possibility of giving two errors NullPointer or SQLException. If I put one catch for every exception is the best…
-
1
votes1
answer847
viewsQ: @Queryparam - Type Date
I’m having trouble sending a Date, it’s always null on my Rest controller. I’ve tried it without $.param as well and it didn’t roll. My $Scope.filter.Begin is already going in Date format on request…
javaasked Guilherme Nass 939 -
1
votes1
answer561
viewsQ: Using enums in java
I created an Enum and I need to set the values in the bank that way: If it is Revenue, the value is 0; If it is Expense, the value is 1; This is my Enum: public enum EntryType { INCOME, OUTPUT; } In…
-
0
votes1
answer751
viewsQ: Base64 and MD5 - Java
What are the differences between MD5 and Base64 for encryption? Which is the safest? I read that the MD5 is the most used, but I wanted to understand the reason.
-
1
votes1
answer445
viewsQ: Angularjs - remove items selected according to checkbox
How do I get the ids of the selected items from the checkbox(s) to send to the backend and later remove? <a href=""> **O QUE PASSO POR PARAMETRO PARA A FUNÇÃO? ** <i class="material-icons"…
-
2
votes1
answer1016
viewsQ: CDI Java - Configuration
I created a simple design containing a Test class and a Testeinterface interface. In the interface test I created any method just to test. In the Test class I only put @Inject Service service; When…
-
0
votes1
answer589
viewsQ: Request without @Xmlrootelement
I’m doing a simple user registration with Java and Angularjs. My javascript request looks like this: $http({ url: "rest/user/register", method: "POST", data: $scope.newUser }); In java, I have a…
-
14
votes1
answer33017
viewsQ: Delete folders on Github
I committed my project on github and after a while, some folders wouldn’t need to be there anymore. I have knowledge that you can delete manually on github, but for that to happen, I need to delete…
githubasked Guilherme Nass 939 -
0
votes2
answers208
viewsA: Email Alert - TFS Visual Studio
Guys, a friend explained to me and I need to install Microsoft Team Foundation Server Power Tools. After the installation, go to the visual studio and just right-click on the folder you want to…
-
2
votes2
answers208
viewsQ: Email Alert - TFS Visual Studio
I would like to know if there is any possibility of setting up TFS alerts according to the branch that has been changed. I do not have lock objects with me, but I need to follow check in certain…
-
4
votes1
answer715
viewsQ: File comparison
I need to compare files from different directories and show the differences. But I don’t want to list the name of the files, I just want you to make a comparison of the directories and show the…