Category "javascript"

D3 js filter select

I dont knoe exactly what is going on here tried everything to no success, here is my code, i am trying to add color by changing the opacity with the rgba, but i

Data table Print, pdf EXPORT and CSV NOT WORKING IN Electron app

I am developing an Electron js application and new in data table. i have added print and export option on my script. unfortunately blank popup screen showing wh

Trigger problem mouseover/mouseleave javascript

I'm trying to make an effect when the user switches elements on hover but I have an issue. Here is my code var oStudyRows = document.querySelectorAll('.stud

Why does reCaptcha disappear when I navigate to another page?

if I want to load the captcha by clicking refresh button its loading, but when we navigate to another page and clicking browser back button then captcha is goin

Why is CssMinimizerWebpackPlugin preventing my main js file from being minified?

I am using webpack's CssMinimizerWebpackPlugin (docs). I initially configured it as recommended on the documentation optimization: { minimize: true, m

How to change the style of a div and reset it after 1000ms?

I have multiple (only 2 in this example) divs overlapping with each other... What I'd like to do is to add buttons that represents each div, which when clicked,

In postman we are sending the file as binary but how will that request body will be made in fetch api

if we are selecting the file as binary in postman , how we can form the body of the request with Axios or fetch

freeCodeCamp Challenge Guide: Use the reduce Method to Analyze Data

I am in the freeCodeCamp Use the reduce Method to Analyze Data challenge. I tried: function getRating(watchList){ // Add your code below this line var count

In mongoose I have executed the example program given in the website but I'm getting the same error that is: TypeError: fluffy.speak is not a function

const mongoose = require('mongoose'); main().catch(err => console.log(err)); async function main() { await mongoose.connect('mongodb://localhost:27017/t

Handling Sessions & Idle Timer between multiple tabs in React SPA

I'm developing a React Application that has User Authentication with session duration. while login the response will give session duration with userObject. I'm

'TypeError: Cannot set properties of undefined (setting '0')'----Array assignment

When I was solving a problem on Leetcode, I've defined an empty array. I tried push some numbers then I got this Error. I don't know why. My code here.

How can I make a simple website that changes content each time it's refreshed?

I understand this question could be more specific, though I'm hoping someone can point me in the right direction when it comes to creation a simple website that

How can I enable tailwind intelliSense outside of "className"?

I'm using the tailwind CSS intellisense vscode extension, and it seems to only work when typing inside a className property. I'm using a package called cntl ht

nextjs does not support an empty link - what is a workaround for this?

I want to use a <Link /> with no content inside of it within my app, but for whatever reason, if I don't pass any content to it I get the "multiple childr

How to do thousand comma separator for javascript calculator?

I'm trying to make a thousand comma separator for JavaScript calculator. But something works weird for me. Here is the code that should work: var commas = r

How can I rotate a vector 90 degrees into a perpendicular plane, and then 15 degrees free from that plane?

What I ultimately want is a vector, giving the direction of the green line in the image below, knowing only the position of the yellow and green dots. To be mor

JavaScript Function find and return largest number

I'm attempting to create a function that takes two numbers, finds the highest one, and returns that. When I run my code: <script type="text/JavaScript">

Preloading a .css file with NextJS

We are using NextJS and Material-UI for our site, and upon loading the pages, it gives a FOUC. I've narrowed the problem down to the fact that the JS loads fast

How to use ternary operator for a return in JS?

I have a function to check sums in an array : function checkSum(array, sum) { // array = [1,4,6,11] sum = 10 var answers = []; var map = new Map();

Cannot find module 'webpack' using webpack-dev-server

Trying to get familiar to chat apps using this tutorial. Everything looks good, but when I try to run npm run watch according to the directions in the end, I ge