Category "javascript"

Create a date object in a specific time zone and convert it to UTC in JavaScript

My application is currently storing the date and time of a particular event in the following format: date: 2022-05-06 time: 00:00 // (12:00 AM) Each event's ti

How to determine the winner in a race?

I have created a program that places several nodes (which act as animals) on the screen; they're supposed to race eachother. Animal.js is the parent object of t

Merging values from an array of strings into a nested object in javascript

I want to merge values from an array into a static nested object. The array containing the values is something like this, ['name=ABC XYZ', 'hobbies=[M,N,O,P]',

Why does FormData appends extra empty arrays?

I am trying to upload multiple images via axios to backend server on a new application. It worked perfectly on my previous applications I have developed. When I

Merging values from an array of strings into a nested object in javascript

I want to merge values from an array into a static nested object. The array containing the values is something like this, ['name=ABC XYZ', 'hobbies=[M,N,O,P]',

Extract Color Matrices Used by Filter?

I am trying to detect the color matrix applied to a filtered image so that I can apply a reasonably close approximation of the filter using fabric. Does anyone

Request for JavaScript works, but not for GoogleScreen. What's the difference?

Please, help. I can't find the error and I don't understand why the request is not working. It seems to me that it's just Google's IP blocked by the site I'm ma

JavaScript can I directly access to a property inside a property in the object?

In this object, I want to print out an array in the form of [userName, skills]. I know that these objects don't have indexes. Is it possible to detect the skill

Ajax undefined value in PHP

When I call the function I always get an undefined value, I don't understand what can ruin it. You are logged in as undefined, Error undefined Ajax script: fu

Ajax undefined value in PHP

When I call the function I always get an undefined value, I don't understand what can ruin it. You are logged in as undefined, Error undefined Ajax script: fu

Restart a generator by delegating to itself in the end

I am wondering about the drawbacks of restarting a generator by delegating to itself in the end. function* myGenerator(){ yield "value1"; yield "valu

How to clear user uploaded images if the limit of files exceeded in jquery

I have a simple form where a user can upload multiple images. I only want the user to upload 4 images at once, so I did the following: $("#myfile").on("chan

How do I clone a mouseevent for $emit in vue

I am trying to emit an event from a vue2 component have the event reflect exactly the native mouse event happening in the component and have two fields added -

MongoDB atlas connection error with nodejs

enter image description here This error is showing when I connect the MongoDB now how can I solve it

How can I turn my navbar links into a dropdown menu with HTML CSS and JavaScript?

I am trying to turn the first two links of my navbar into dropdown menus. I want to make it so that when you click on them, the dropdown menu shows and the arro

How to make redux function call on radio button click react native?

I am working on project of Food app. I have preference screen where user can click on any desired preference to add in order. This is working but I want to disp

How do I render components with different layouts/elements using react-router-dom v6

I am having trouble writing code to render a login page with no navbar and sidebar. I have come across some pages that ask similar questions but none seem to pe

Using Websocket Channel in React

I am working on a project where I have to make an api call to a websocket, and display certain information based on that call. As you can see I have used the su

Edit value for a key in a Map in Angular

I have a model that uses a Map for eg: (I also have other properties such as Name) export class User { _id!: string; accounts!: Map<String,Number>

KnockoutJS - How to hide certain elements inside foreach using Observable Arrays?

I have a list of WebsiteOwners. I'm trying to build a UI which will display more information about the owners when I click on them. this.toExpand = ko.ob