Category "javascript"

NodeJS : Share a log module instance inside my app

I create for my project a log module and i am actually creating a new instance in all module to allow them to log in cli with the right syntax,color conf etc. F

Inconsistent results between Graphql playground and Apollo Client

I've run into an issue where Apollo client and the GQL playground return different data with the exact same query. The schema looks something like this: interfa

Is there a way to view any worker_threads that are currently in use in node.js?

I am looking at worker_threads in node and have a simple endpoint that will create a new worker thread and run a CPU intensive script that takes a long time to

How to save the current time of the audio when it is played

I wanted to play the audio from a specific time whenever the user plays the audio, So, I wanted to save the current time of play while the audio is being played

Drop or Paste file on the Textarea

I want to make a message input like this. But I have a question how to get file data, which I drag & drop or Ctrl+V on the textarea to upload. I am using R

how to render a JS variable into a html element

I am new to Javascript and want to be able to display a JS variable onto my page without the user going into the console as it is neater, and I find a lot of pe

What is a rich object?

I'm learning Express. While doing a tutorial, I stopped to try to figure out why the tutor used express.urlencoded({extended: false}). I learned what url-encodi

How to do a secure login with web3 (Metamask)?

So, I want to do a webpage, where you have to log in with metamask, only. I've seen that cryptokitties.co did a really good job, not even prompting for a passwo

Want to show/hide Div Query - JavaScript - based on what a sql query returns

My project is a MVC c# Asp.NET project. I want to check if an attachment has been loaded, if there is an attachment it shows the div that contains the attachmen

Laravel Livewire wire:click not firing

I am working on an e-commerce platform based on Laravel and Livewire using the bumbummen99 shopping cart. My problem is that I can only add items to the cart, b

Unable to cast object of type 'System.Text.Json.JsonElement' to type 'System.IConvertible'

After converting my application into .NET Core 3.1 , the FromBody json attribute is not working . So Ichanged into [FromBody] JsonElement model. After changin

Isotope is not defined

In the https://unpkg.com/[email protected]/dist/isotope.pkgd.min.js isotope package, there is an error occurred Uncaught ReferenceError: Isotope is not defin

Executing a bash script from Electron app

I am trying to execute bash script within Electron index.html button click. Here's my code which index.html calling renderer.js, and renderer.js opens the bash

what is the easiest way to refresh the form in react without 'using react hook form' right after submission?

I created a form with html5 in react app but did not find any simple way to clear all input field with clicking the submit button. So I wrote a function and wri

Sequelize filter the included tables by where

I am trying to findAll records included nested tables, but did not understand how could I filter included tables by where clause. Here are the words: const play

Sortablejs drag and drop with multiple container

sortablejs is a drag and drop plugin link How the plugin working <div id="example3Left"> <div class="list-group-item"> Item 1</div> <div c

vulnerabilities error while installing via NPM, ( npm audit fix ) also not working

I was working on a react project and wanted to install react-icons so run npm install react-icons in the command prompt. but after a while it throws these error

What does "First Load JS" in @next/bundle-analyzer actually measure?

The NextJS bundle analyzer gives some output like this: Page Size First Load JS ^

Active image tab image gallary

I have a tab gallery (from W3Schools) where you can choose an image to show under. I was wondering how to have an active class for the chosen image after I choo

How to use hourly and minute timeframes in Lightweight charts TradingView?

In the examples Lightweight charts TradingView show plotting on a daily timeframe, but I can't figure out how to correctly pass data to setData in order to use