I have a problem that I cannot resolve. I have a table in MongoDB, and this is structure: I need to list all names from the table (shopData.name) and then check if the typed name exists in the database. I tried to do something like the one below, but it doesn’t work. Could someone take a look at this an…
How to filter the member counter in discord.js v13
I made a member counting system for my server but it counts every member that is joined. I want to filter the counter to just count the humans/users My code: I am using discord.js v13 and node.js v16 Answer You can just filter through all the members in a server and remove all the members which are bots by ch…
How to connect db ID to a db Value in javascript?
So I got a function that executes every X minutes/hours, when it executes it will select a random database array value, when it does, the selected will get + 1. Selected stands for the amount of times the row has been selected. This is my code from which I catch all of my database values Lets say if we have
Importing images from public folder in react
OK last hail mary here. I’ve seen this question a lot but no clear answer. I moved all of my images out of my src folder to my public folder into a sub-folder images. And used the URL like ./images/my-image.png but the image isn’t populating. I am using create-react-app. How do I call images from …
REACT TABLE- Hide rows in table & reset button to display hidden rows
In my column Show there is a switch button (Toggle doesn’t seems working in sandbox, maybe because of tailwindcss? but it works in local…) when you click on it, it will turn the selected row into gray (as if the row is disabled but you can still view the content). We may have also the possibility …
How can i get formdata with .net core web api and vue.js
I am trying to write an announcement system. i am using vue 2 and net core 3.1. The announcement has a photo, title, and content. (The department id field is static for now.) I’m trying to send the announcement’s information with the photo in the formdata, but the api can only capture the photo. S…
How to make a dropdown of the data receive from ajax response as array of objects
I want to make a dropdown in my table which is populated with the dynamic data coming from ajax response and append to the table. My postman collection looks like this. And below is my ajax response code in which I am appending the data into table. The itme.children name , age I want to make a dropdown of it
Hide message after a few seconds in React
The question is about hiding a message after 5 seconds. In the code below, if I click on the Generate Room Name button , it will generate the url in the textbox. I will be copying that url using the Copy button and a “Copied to clipboard” message will be displayed. I want to hide that message afte…
Why some statements can’t be used with boolean operators
I like to use this style for single line conditional function calls: It’s much more terse than it’s if counter part. However some statements dont work, e.g. return and debugger: Why does it not work for the above statements? Instead I use: Answer For the same reason you can’t say things like…
How can I store/setStates of several inputs from a mapped array
So I am working on a project, where a user would provide questions and at the time of applying, the applicant would provide responses to these questions. Here is my array of the user’s questions from this array, I’ve mapped each of them The answer of the first one overrides the answer of the secon…