I have a problem when doing some React exercises with DELETING an item. When I do it like this, using axios.delete and .filter using a function deleteProduct which is activated when I confirm the action, it always takes as an id the id of the last element in list, so e.g. when I delete 3rd item, it deletes la…
Category: Questions
Discord.js (v13) SlashCommandBuilder addIntegerOption set Range
I want to write a slash command that clears messages. Everything is fine, but there one thing I couldn’t really figure out: How would I set the range for an integer option in a slash command build, or is there even something like this or do I need to do the old-school way and response that the value is …
Access variable inside javascript function (generator)
In Javascript suppose I have a generator which i cannot modify the source code of. I iterate through a couple of times and now want to look inside at the variables of the generator. How can I do this …
How does variable setting work with await?
Can someone explain to me why this is not working the way I am expecting? I am expecting the last console.log to run after my functions run, but it is returning empty length string instead of the actual date. These are the variables I want to set after my function call. Declaring them now so the scope is set …
Make a container for each selected checkbox in VueJS
How can I make a container for each selected checkbox? like in this image When a check box is selected, a container appears with its value inside Answer Try like following snippet:
Issues displaying OpenWeatherMap with leaflet
I am practicing on a simple weather app using OWM. I am fetching the coordinates and pass them to a function to display a map using leaflet. Here is my code function drawMap(lat,lon){ const mymap …
Error in camera App / Type error: null on ‘getContext’
I have a b-modal with a camara app. First I had my and my canvas seperate – but now I want to have them overlapping each other. So first I want to show my video with my button make photo …
Move Cursor on the string
Following the screenshot below I’m trying to move the cursor through the string which I have no idea how to do. I’m trying to achieve the effect of an old-phone UI. I’m already managed to make it blink. I’m using ReactJs and styled-components. Follow the code below: and the css file us…
HTML canvas element contact detection
I am trying to make a website with static effect and I’ve come across the canvas. While learning about it, I wanted the font colours to change when that specific element is over the stroke. I’m sorry …
Firebase 9 – How to do new doc ref
Hello guys i’ve been trying to convert this code into modular firebase 9: fb8: const userRef = db.collection(‘Users’).doc(); to fb9: const userRef = doc(db, ‘Users’); But i’m getting this error: FirebaseError: Invalid document reference. Document references must have an eve…