Posts by Guilherme • 165 points
12 posts
-
1
votes1
answer1170
viewsQ: Remove aquifers with File System
I am trying to remove two aquivos from my server with the following code: const fs = require('fs'); const express = require('express'); const app = express(); app.delete('/delete', function(req,…
-
5
votes3
answers718
viewsQ: Assign values to arrays
I realized that by increasing a value to one array using the following syntax: let array = []; array['nomeIndice'] = 10; the length that array is not incremented, and continues in 0, despite the…
-
0
votes1
answer246
viewsA: Regular Expression | Picking part of content between 2 markers
let string = "placeholder:https:\/\/ci.hdv6.com\/videos\/78\/13\/8787575\/thumbs_65\/(m=eaAaGwObaaaweyaY)(mh=c_sPzVwXUfENWpYI)6.jpg" let result =…
-
0
votes1
answer154
viewsQ: HTML snippets for JSX
Does anyone know where I can get HTML Snippets to use in Javascript? Example: input: h1 + tab output: <h1></h1>
-
0
votes1
answer63
viewsA: Create the code to fill the array - Javascript/Logic
Resolution: let n = 3; let i = 1; let a = []; while(n <= 84){ a.push(n); n += i; i += 2; } console.log(a);…
-
0
votes2
answers119
viewsQ: Attributes in functions - Javascript
I was observing that the $ jQuery is a function, but if I do $. i can access several other functions, which are function attributes $. How is it possible for a function to have attributes that are…
javascriptasked Guilherme 165 -
2
votes1
answer403
viewsA: What is the difference between Constructors and Factories in JS?
FACTORY X CONSTRUCTOR The biggest difference between Builders and Factorys beyond the operator new, is that the Factorys return an object, while the Constructors do not. Let’s look at an example:…
javascriptanswered Guilherme 165 -
0
votes1
answer135
viewsA: Javascript onClick event does not work with data-modal - Asp.Net Core MVC
We’re missing a ] in the $('a[data-modal')
-
1
votes2
answers225
viewsA: Center text according to length
Take the full width of the certificate subtracts the width of the text, and divide the subtraction result equally into each margin of the text.
-
1
votes3
answers48
viewsA: how to take the initial and final schedules and store in two variables with javascript?
var hora1 = '9h - 22h'.split('-'); //uso o 'split' para isolar cada valor var h1 = hora1[0].replace(/h\s|h|\s/g, ''); //uso 'replace' com uma var h2 = hora1[1].replace(/h\s|h|\s/g,…
-
1
votes2
answers53
viewsQ: Scope of Literal Objects - Javascript
I was doing some tests here, and I noticed a difference in the this within literal objects: obj = { context: this, showContext: function(){ return this } } If I do pessoa.context the this will point…
javascriptasked Guilherme 165 -
-1
votes1
answer229
viewsQ: Problem with iframe
I try to open a simple link in an iframe, and it throws this error: Refused to display in a frame because it set 'X-Frame-Options' to 'sameorigin' This is the complete code: <html>…
javascriptasked Guilherme 165