My Env.: React v17.0.2 node v16.6.1 npm v7.20.3 VS Code Windows 10 The Problem: I am currently working on a cooking recipe app for a friend’s website. My issue is that whenever I enter “node fileName.js” into my terminal to run and check the console.log’s and other outputs for my code,…
Category: Questions
can’t close message in django
I’m new to Django and I tried to integrate message alerts in my code using a tutorial. These are showed fine but I can’t close them using the ‘x’ button. This is the code for the message section: Answer
adding days to given date wired behavior
I want to add 90 days to the given start date, So I have this: But As you notice instead of getting 90 days late it returns -2 days! Why this is happening and how to fix this? Answer This is what exactly you want: https://stackoverflow.com/a/19691491/11359076 look at this code const end = new Date().setDate(s…
Regex match variable identifiers, function identifiers, function parameter and class name from a string
Hay, i need your help…So we have an example code at textarea and we will use regex to match all: class name function and variable identifier, and parameter inside parentheses (…) this is the expected return : (abc) (a) (abc123) (taHandler) (elem) (pattern) (caret_start) (ClassMates) (name) (age) (…
Client.users.fetch returning “Unknown user”
I’m trying to code a discord bot that send a message to all users in a list. I am having problems using the client.users.fetch(); method on discord.js. The error message says something about DiscordAPIError: Unknown user, Unhandled promise rejection, and DiscordAPIError: Cannot send messages to this use…
How to split a string by nth intervals of alphabetical characters while also separating specific characters?
If we have a string s = ‘abcdxefyghijxlm’ I can split it by 2 characters using s.match(/.{1,2}/g) and I will get [‘ab’, ‘cd’, ‘xe’, ‘fy’, ‘gh’, ‘ij’, ‘xl’, ‘m’] How would I split it this way while ̷…
Error on ordering of methods in controller Nestjs
I have this basic CRUD methods in Nestjs. The issue I am facing is that when I am applying the getCurrentUserId() method on top on all methods it works fine but when I am applying in bottom it doesnt …
what can’t be passed by vue slot props?
In official react docs, It says the difference between ‘other libraries’s slot’ and ‘react’s props.children’ is as follows : This approach may remind you of “slots” in other libraries but there are no limitations on what you can pass as props in React. https://reactjs.org/d…
Problem viewing a div with a simple function
I have a problem I would say stupid with html and javascript, a simple function that should make me visible and invisible a div crashes the html making it empty! js: before: after: Answer You don’t have to write pre-defined methods. It works same for all other tech stacks such as Mysql, PHP, etc. Recomm…
Customize the display in an input [Vue.Js]
I have an input that must contain values according to the selected checkboxes, and I would customize the display on the input according to the checked checkbox. I have initialized a watcher that updates the v-model of my input but the display is the following: my input : [Jhon,Eliott] While I would like to pu…