Posts by Gleidson Henrique • 442 points
19 posts
-
0
votes0
answers36
viewsQ: Connect to Mongodb with Token
My current connection file is this: const mongoose = require('mongoose') mongoose.connect('connect string url', { useNewUrlParser: true }) mongoose.Promise = global.Promise module.exports = mongoose…
-
1
votes1
answer42
viewsA: Return list of files contained in a web page
Hello, as you listed only the bz2, I put a filter to show only it. However, I saw that you did not list all of them, but I did not make this filter, since you did not specify if you only needed a…
-
1
votes2
answers72
viewsA: Mix of CLASS and ID in HTML and CSS
CLASS and ID are different things. ID is unique per page, CLASS can have several. It was mixed several precisely to confuse, because it is a proof. And one code overwrites the other. All would work,…
-
0
votes1
answer108
viewsA: Problem with result Undefined - nodejs
Test like this: var pool = async function(){ var conn = await new sql.ConnectionPool(config, async function(err){ var request = await new sql.Request(conn); //console.dir(request); return request;…
-
0
votes1
answer57
viewsA: Github - Uploading Files
Did you give git clone? If not, do: git clone https://github.com/patricchubaca/Calculadora-em-JavaScrip.git seu-diretorio/. The folder should be empty, and only then do you put the code in it. After…
githubanswered Gleidson Henrique 442 -
5
votes2
answers829
viewsA: What is Svelte JS?
Yes, another framework/library, but with some differences, as described on the home page itself. Write less code Different from React and Vue, he does not work with Virtual DOM, which ensures…
-
1
votes2
answers710
viewsA: Error handling a JSON return in AJAX
There is a difference between JSON and JSON STRING. If the previous console displays a JSON, but when picking up data from it does not work, it is possibly a string, and needs to be converted to…
-
2
votes1
answer361
viewsQ: Change parent properties if CSS child exists
I have the following CSS: .react-tagsinput .react-tagsinput-input { width: 100% !important; } // coloquei aqui apenas para lembrar que existe essa opção caso desejar usar //.react-tagsinput--focused…
cssasked Gleidson Henrique 442 -
0
votes1
answer327
viewsA: Select HASH Code SHA256 Nodejs
You may never be able to generate the same hash, as it is a different form of encryption. The question is to compare the hashes to see if they both deal with the same encrypted information. This…
-
1
votes2
answers2024
viewsA: Return of Request (Node.js)
The ideal is that you give a Return in the Weather that consumed by the API in the getWeather method and so use the getWeather method where you want. For example: async function getWeather() {…
-
1
votes5
answers388
viewsA: How to exclude only a certain data from a React state
Friend, your question is a little difficult to understand, maybe even because you still do not understand very well React. You said you want to delete an item from 'React Status'. This means to me…
-
-2
votes1
answer123
viewsA: Which technology and Motodology to choose to develop an app?
Well, faster way is not always the best. For example, PHP really is widely used yet, but is no longer one of the new technologies. I always advise, especially when there is nothing created, to…
appanswered Gleidson Henrique 442 -
0
votes2
answers54
viewsA: Sorts PHP Array Frequency
Why do you want them in the end? Maybe what you are thinking of doing, has some other better logic. Because there are basically two things for you to do with the repeaters: remove, or count. I’m…
-
2
votes1
answer247
viewsA: How to find nearest value in an array?
Since this looks like college work, I won’t do it, I’ll just show you how to do it. Taking a quick look, I found the following: https://stackoverflow.com/a/49436218/5565024 As you can see, he says…
-
1
votes1
answer686
viewsA: Insert value in the Mongoose array
The correct way to use push is like this: exports.put = async (req, res, next) => { const id = req.params.id; const document = { title: 'Teste', content: 'Teste', notes: [ {note: 'note1'}, {note:…
-
1
votes1
answer77
viewsA: Context of the this property in Typescript + Node
When you are going to log in elsewhere, this.treatRespose will be referenced to that other place, not that class. Strange no? But JS is like that. haha For that, inside the builder, put: this.login…
-
1
votes1
answer435
viewsA: How to make character jump while walking?
As it is your first contact with the language, I advise you to give a study on Debugger, or as most JS programmers who do gambiarra (as I haha), at least use the console.log to know what is…
-
0
votes2
answers3089
viewsA: JS node - Mongodb x Mysql
The non-relational databases (Nosql) are excellent for current new projects, as one of the main problems today is related to processing and fast delivery to the user. And Nosql databases allow this.…
-
1
votes1
answer202
viewsA: Every time I start a server Mongoose makes an unnecessary connection to the database
Mongodb works different from relational database. It is advisable you NAY close the connection while using the app, only do so when it is closed. The connection is being made because you are…