Posts by Cláudio Hilário • 323 points
20 posts
-
2
votes3
answers252
viewsQ: Dependencies Nodejs
Hello, One thing that’s been bothering me is the amount of dependencies on nodejs projects I’ve seen. What happens if I have a job in a nodejs project and the author eliminates it? How can I ensure…
-
0
votes5
answers217
viewsQ: Overflow of text in flex elements
Hello, I have a problem with making the content I have inside the div with the class "box-center" inside the div Pai "wrapper". Someone can tell me compo I can solve the problem, I’ve tried the…
-
-1
votes2
answers6921
viewsQ: Css flex element spacing
Hello, Someone who can help me build a static grid if you can call it that: What I want is to be able to add 3 blocks per Row these with a fixed size equal, with tendency to grow vertically. And…
-
3
votes1
answer68
viewsQ: Keyboard shortcut system with special characters
Hello, I’m making a system to detect javascript shortcuts, and it works great, except if for example click on SHIFT + 1 what I get SHIFT+!, and all the other changes shift makes. There is some way…
-
0
votes0
answers21
viewsQ: Proxyapi Nodejs (Upload of files)
Good afternoon, I am creating a Proxy for an application. What is intended is to centralize a set of API’s and forward requests. I’m doing a basic example in nodejs. Where I have 2 servers: Server 1…
-
1
votes1
answer161
viewsQ: https.request does not send body if it is the DELETE method
I’m making a request to make a DELETE, and I have a problem, when I make the request, the bodyParams is not past. Has anyone ever had a similar problem? On the other side I’m using the express…
-
1
votes0
answers22
viewsQ: Upload file between API’s Node.Js
Hello, I have an API in nodejs, and I need to send a file to another API. Does anyone know how to forward the request? I’m using the https.request (https://nodejs.org/api/https.html) to make the…
-
1
votes1
answer121
viewsQ: Validate path nodejs
Hello, I’m developing a file manipulation system, and I just want it to be possible to manipulate folder with an absolute path for example /opt/file. In other words, I can only create/edit/delete…
-
0
votes1
answer42
viewsQ: Html5 - onContextMenu, block other events
Hello, I’m using the onContextMenu event with e.preventDefault(), to create a custom menu. The problem is that if it is the "native" behavior of the browser, events like Scroll and Zoom are…
-
3
votes1
answer223
viewsQ: CSS Border problem and list element placement
I am making a TAB component in HTML + CSS, and I have a question regarding css, the code I have is as follows: @import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,700"); .tabs {…
-
0
votes1
answer19
viewsA: Filter object with folder/file structure and return structure filtered by name
const tree = { "treeState":{ "opened":{ }, "selected":null }, "path":"./sounds/", "name":"sounds", "children":[ { "path":"sounds/Default", "name":"Default", "children":[ {…
javascriptanswered Cláudio Hilário 323 -
0
votes1
answer19
viewsQ: Filter object with folder/file structure and return structure filtered by name
Hello, I have the following data structure that I receive in Backend JSON format: const tree = { "treeState":{ "opened":{ }, "selected":null }, "path":"./sounds/", "name":"sounds", "children":[ {…
javascriptasked Cláudio Hilário 323 -
0
votes2
answers60
viewsQ: Canvas draw grid as backgound
I did some research but I didn’t find much information. What I intend to do is draw a grid as a background in the canvas. I saw some examples with svg and others directly on the canvas. Assuming…
-
-3
votes1
answer246
viewsQ: Clear objects with empty subobjects
Hello. Today I have a question. How can I efficiently create a function that allows me to clean a specific object? For example: const obj = { chave1: 'conteudo', chave2: {}, chave3: '', chave4: {…
javascriptasked Cláudio Hilário 323 -
1
votes0
answers51
viewsQ: Passing data by context (HOC) React
Good, I’m doing a form system in React. I’m using the context to pass some information to the child components. The structure of the project is as follows: /context - Where I’ve been saving the…
-
3
votes1
answer1777
viewsQ: How to delete a specific object in HTML5 canvas?
Good, for example I have two rectangles drawn on the canvas: const canvas = document.getElementById('canvas') const context = canvas.getContext('2d'); context.fillRect(20,20,150,100);…
-
3
votes2
answers3350
viewsQ: Join multiple commits from a branch
I have the following situation: I created a branch, for which I made several commits, I pushed to github, now I intended to join these commits, which are already on github in one, so that they don’t…
-
0
votes1
answer2326
viewsQ: Conflict Resolution in Git
Good afternoon I work with the Git version manager, and in turn when merging I come across complicated conflicts to resolve. Is there a tool that can somehow better deal with these conflicts? The…
-
0
votes1
answer48
viewsQ: Update of an installment form query
Good afternoon, today I had a little doubt. Somewhere in my code I have a query to do an update. The function is as follows: function updateUser(user_id, params) { const query = `UPDATE users SET…
-
2
votes1
answer453
viewsQ: Delete Rows in several tables dynamically in Postgres
I need to delete to clean the database automatically in tables that are within different schemas, "public" and "cine"; I have the following query that returns me SELECT concat('"',table_schema,'"',…