Posts by Ghért B. König • 360 points
9 posts
-
1
votes1
answer24
viewsA: How to interfere in the execution of a function called by event callback
In this case you can use the function clearTimeout it receives the timeout id and cancels its execution. The example below demonstrates how clearTimeout works. setTimeout(function () {…
-
2
votes2
answers769
viewsA: Set default input value without appearing to the user
The placeholder was used to display the number without the user being able to interact with it: <input type="number" name="numero" placeholder="0" /> In PHP use the function Empty it checks if…
-
2
votes2
answers108
viewsA: Async Await / Promise / API Google JS Node Translator
In Node has the util.promisify which converts a callback function to Promise. It automatically does the process described by Luiz Felipe, but promisify attention converts only callbacks as last…
-
0
votes1
answer41
viewsA: How to split a Node application into files
It’s a typo on the line: hres.appendClild(img) The method appendClild there is no right would be: hres.appendChild(img)
javascriptanswered Ghért B. König 360 -
3
votes3
answers356
viewsA: insert into the dictionary
In fact the variable dict is not a dictionary is a javascript object. Javascript has no dictionary, if you want to use a structure that holds key and value you can use one javascript object or Map.…
-
2
votes1
answer57
viewsA: Check if a tag has a class using Typescript
In the original this: if (tr.classList.contains(className)) { Change to: if (tr[ab].classList.contains(className)) { When you called the method getElementsByTagName he searched all elements with the…
-
1
votes1
answer132
viewsA: Nodejs Removal of @types folder
Researching a little I found this article. In it there are several ways to resolve this permission problem. One of them is to remove via command prompt (cmd). Open the cmd and execute the command:…
-
3
votes1
answer36
viewsA: Why am I printing in this order?
You’re making a echo printing and not a return in function foo. <?php function foo($var){ return $var + 3; } $x = 1; echo "foo($x) =".foo($x); ?>…
phpanswered Ghért B. König 360 -
-2
votes1
answer165
viewsA: If you put multiple web requests inside a while loop in python can you bring down a website?
It is possible. But generally the load required to take a website out of the air is too big for a single computer. However it is still possible if the site is poorly optimized or works on a less…
pythonanswered Ghért B. König 360