I’ve created an array of volcanoes with latitudes and longitudes from a geoJSON file. I would like to see if its possible to create a loop which iterates through the array to create points with the values. Previously when I have attempted this I am presented with an empty map if it even loads. My array …
Category: Questions
How to make a date given a utc offset in minutes using php?
I use this method using js on the frontend to get the utc offset in minutes. It gives me a result like -300 for UTC+500 Now how do I make the date in php using this offset? More specifically, how do I convert this offset to something acceptable by a solution like this: Do I have to manually get my
.find() returns undefined using JSON data, using node.js
I’m creating a server using node and want to output JSON data, when a specific ID is clicked. I’ve set up a dynamic URL which will pull the data from the clicked video using params and then compare it with the one from the JSON data, using .find() When I log out the “req.params.id” I g…
Get Min date and Max date from Object
How can I find out the min and the max date from an object? Currently, I am getting an array like this: min date should be ‘2010-02-24’ and max date should be ‘2022-10-04’. Is there any built-in function to do this? Thanks in advance. Answer A sort will do the job here, by packing all …
Get channels of category discord v14
i’m trying to get all channels and delete these channels of category in discord v14, but throw me an error: client.channels.cache.get(…).children.forEach is not a function Answer CategoryChannel.children is type CategoryChannelChildManager, which doesn’t have a forEach method, so you canR…
Json file data to Chart.JS
I’m trying to add multiple datasets from a json file to a linechart in chart.JS. Here’s my JS code: Here’s my HTML: All other neccessary HTML code is added to make the file valid. There is something wrong with this code i just can’t figure out, I’m able to use the charts to input…
Push to array and convert to string
I need to pass a value as a string and not an array from inside an event listener to a global variable. Currently when the page loads, I check for a cookie inside the event listener and pass that value (‘de’, ‘es’, ‘en’ etc) to an empty array. I don’t know a better wa…
Can I get away with not using useEffect in this instance?
I’m still learning React and the proper way to do things. In this React project I am using the TinyMCE editor: https://www.tiny.cloud/docs/tinymce/6/react-cloud/ I want to display a warning message about unsaved changes once the editor has been made “dirty” that is that the user has modified…
Recursive function returns weird output?
So i have this problem where i need to fill a list with objects of children’s ids,names and parents ids and names for further backend work. When i select a child and I recursively fill the list it gives me this output I use this function to fill the list The function expects a node with parent nodes whi…
React: multiple sliders sharing a common state
I have two sliders, each with an event listener. Using your mouse to adjust one slider should update a shared state, which should then cause a change in the second slider. However, I only want the event listener for the first slider to fire. In the code I have below, the second slider’s event listener i…