Category "javascript"

Get user tag by user ID

how I can get user tag (example#0000 (No Mention)) by user ID? const userid = message.channel.topic bot.channels.get(`channelid`).send(`User ID: ${userid}\nUser

Javascript Jest MockImplementation : mocking values in a called function

I'm trying to test my backend's methods (to check users quota, like if they can use the app) and I have some trouble with a specific one. Indeed I have a functi

Change Button Text in loop using React

Is it possible to change button text that is created using array. If it is possible, what should I do with the onClick function in the button. Here is the sampl

How do I fix "the requested module does not provide an export named 'default'"?

I'm developing app using JS and Vue.js and get error on line: import Vue from 'vue' I'm getting this: Uncaught SyntaxError: The requested module '/node_module

How do I resolve the "Module not found: Can't resolve [css file] in [directory]" when deploying next.js site to Netlify?

I am trying to deploy this site to netlify: https://github.com/Koda-Pig/joshkoter.com But I am getting this error: 10:02:31 AM: Module not found: Can't resolve

firebaseAuth.onAuthStateChanged return user null

I'm trying to implement authentification using firebase auth, the things is that when it comes to persistance i'm stuck. I tried to use local storage as you can

How do I delete all unused imports in the active file with one command in VS Code (typescript)?

Previously, I used to be able to do CMD+SHIFT+p > Organize imports and this would both sort and delete unused imports. This functionality seems to have broke

find nearest location using node js and mysql telegram bot

I was trying to do a telegram bot that finds a nearby location using node js and mysql. but after finding users coordinate(latitude,Longitude) in mycase (mylat,

How to target a styled component inside another styled component?

Instead of using div:first-child or div:nth-of-type(2) I would like to say Row or ColSm3 like we usually do in normal CSS, Is it possible to target a styled com

Redux -Having a 404 errror and state.category.push(action.payload) not a function error

I'm getting a 400 client error and saying state.category.push is not a function and the current state is pending. I will be happy if someone helps me out on thi

Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths

I upgraded React v16.14 app to run with Webpack v5 from v4. I'm seeing hundreds of warnings with .scss files like below even though the app seems to run fine. I

Selenium : googlemap markers dont appear in my xpath elements?

I would like to scrape some informations from a googlemap applet. The page is here : http://www.annuaire-des-psychologues.fr/psychologue/limousin/ You can click

Form.io form builder how to emit or submit data

I am building a dynamic drag and drop form builder and i cant find a way to console log out the data of the form. here is the form component.html in which i am

How to pass a video return from JavaScript to python backend in Django view for OpenCV

I want to do certain tasks and the processes are as follows: 1. Access the camera of the user to get the video-frames from them. 2. Process the video frames fro

"Content Security Policy of your site blocks the use of 'eval' in JavaScript" warning when setting CSP meta tag in Electron

I am creating an Electron application, and per the Electron security tutorial I have added a CSP meta tag. When running the application, this issue appears in d

Tidy up and combine document.ready and eventlistener

I have this code and it works great: $(document).ready(function () { if (window.location.href.indexOf("emotion--1") > -1) { $('#scro

Setting a chart.js Scale Min as the Y-Axis Bottom Ticker minus the Generated Step Size

Suppose I have a chart.js chart with no stepSize so the y-axis ticker values are generated as below based on my data as an example: How can I insert a new bott

How to get value from TextInput and set it with Button React Native?

I want to assign the username I get from a TextInput to a username variable via a button and output it in the text below. Meaning, if the user enters the userna

Salesforce OAuth 2.0 implementation CRA

I am attempting to grab the authorization code appended to the redirect uri using the OAuth2.0 Web Server Flow for Web App Integration seen here: https://help.s

MongooseError: Operation 'featureds.find()` buffering timed out after 10000ms

I have a collection on MongoDB from which I'm trying to query all the elements using find(): const mongoose = require('mongoose'); const Featured = mongoose.mod