Posts by Gabriel Ribeiro • 495 points
16 posts
-
3
votes2
answers51
viewsQ: Are Mongodb’s "id" unique among collections?
It is possible that the same ObjectId is generated for a document in two different collections in the same database?
-
4
votes1
answer74
viewsQ: Optional dynamic keys Typescript
I’m trying to create an interface with dynamic keys: type Keys = 'a' | 'b' | 'c'; interface MyInterface { [key: Keys]: string; } In doing so, I get the following error: An index Signature Parameter…
typescriptasked Gabriel Ribeiro 495 -
2
votes0
answers377
viewsQ: How to run Typeorm Migrations on Heroku?
By putting my code into production at Heroku, Migrations database are not running. How could I run them once I start my application? Postgresql is the database used. Archive of database…
-
5
votes2
answers215
viewsQ: Did "Class Components" die in React?
Before the React update 16.8 it was not possible for functional components to be internal, so Hooks arrived to solve this problem, so the functional components became the standard of React. Then the…
-
2
votes1
answer48
viewsQ: How to sync Github with npm
Is there any way to update the package in the npm as I send updates to my repository’s master branch?
-
1
votes0
answers42
viewsQ: How do I use async/await with Javascript classes?
I created a class with a method async, however, when I instate this class and run the method, an error is generated in my console, follow the example code and error below: JS class MyClass{ async…
javascriptasked Gabriel Ribeiro 495 -
2
votes1
answer49
viewsQ: Web Scrapping Nodejs - I cannot use variable as parameter
I’m using the library Nightmare, for Web Scrapping, function works normally when I pass a string as parameter '.seletor', the problem occurs when I store this value in a variable and step as…
-
5
votes1
answer260
viewsQ: What is Headless Browser?
I am creating a program to compare prices in Nodejs, and in my researches I came across this term, what would be Headless Browser and how it works?
-
1
votes2
answers612
viewsQ: Mysql + Nodejs, SELECT Return Undefined
I’m trying to return the SELECT Mysql to make a listing, however, when I give a return for the function to return the result of the SELECT, the variable in which I saved this data gets the value…
-
3
votes1
answer3164
viewsQ: Create folder/directory with Node.JS
There is the module "Fs", which is used to create files: const fs = require("fs"); fs.writeFile(`./teste.txt`, "conteúdo", function (erro) { if (erro) { throw erro; } console.log("Arquivo salvo com…
node.jsasked Gabriel Ribeiro 495 -
3
votes1
answer1083
viewsQ: Limit contents of an Array
How can I limit the number of values/indices of a array? For example: let arr = [1, 2, 3, 4]; console.log(arr) // Exibirá: [1, 2, 3, 4] Goal: //Reduzindo o limite de índices do array para 2:…
-
1
votes2
answers108
viewsQ: Async Await / Promise / API Google JS Node Translator
I started using the Google Translator API (Google Cloud Translate API) today and am unable to apply the async/await in function translate. Follows the code: const api =…
-
1
votes2
answers123
viewsQ: Concatenate variable with another PHP variable
Mine inputs are being generated from a repetition of Javascript naming them as follows: input.setAttribute("name",`tubo_${i}`) and input.setAttribute("name",`largura_${i}`) My problem is when I need…
phpasked Gabriel Ribeiro 495 -
1
votes0
answers58
viewsQ: PHP Warning... should be compatible with
In performing deploy of my files, I noticed that some functions that were working normally on the localhost (local server) did not behave as expected on the hosting server, more specifically when I…
phpasked Gabriel Ribeiro 495 -
0
votes1
answer1436
viewsQ: How do I put my scheduled website on Nodejs on the air?
I am a PHP programmer and use the Filezilla for file management, this way, just putting the files inside a specific folder the hosting server looks for the file index and success. In the case of…
node.jsasked Gabriel Ribeiro 495 -
2
votes1
answer436
viewsQ: React Native 100% memory
I’m using the emulator Android Studio to view a app developed in React Nativand as soon as I turn the remote 'start' of React Native in the prompt, the application starts consuming memory infinitely…
react-nativeasked Gabriel Ribeiro 495