Category "javascript"

drag the object group in XY plane only in three.js

The objective is to drag the objects in the scene using mouse. zoom in and zoom out are working properly. while dragging the object is rotated, but not dragged.

Run assertions directly in browser context in Playwright

I would like to test some apis which are tied directly into browser and not necessary have UI representation. Simpliest test beeing something like: import { tes

Variadic curried sum function

I need a js sum function to work like this: sum(1)(2) = 3 sum(1)(2)(3) = 6 sum(1)(2)(3)(4) = 10 etc. I heard it can't be done. But heard that if adding + in

Can someone explain me why "operator precedence" applies to logical operators like "||", "&&" in javaScript

Can someone explain me why operator precedence applies to logical operators like || and && in JavaScript? What does that mean in an operation like: tru

Reduce the react native ios/android size folder

Need help to reduce the react-native file size, my repo is getting heavy. cd ios xcodebuild clean cd android ./gradlew clean ./gradlew cleanBuildCache I tried

Jquery UI Sortable execute function on drop outside or inside the same list

I am working with Jquery ui sortables. I have made bootstrap cards sortable in a table. When i drop a card i want a to execute a function. This works fine when

Why i get added 5 hours instead 4 on daylight saving time when i use the add method and how can i resolve it?

I need to add 4 hours to my moment js date. So for that i am using /* this timestamp is this date 27-03-2045 00:00 */ const someday = moment(2374178400000); con

Calling useState inside useEffect on DOM load

I am building an app to track habits, and when a user is directed to a dashboard, I want them to immediately see their habits as pulled from a database. I have

execute next request once the execution of first request is completed in node

Let's assume I have an endpoint /print. Whenever a request is made to this endpoint, it executes a function printSomething(). While printSomething() is processi

jQuery unable to load mobile size view cart

I am trying to load the view cart area of my html and jQuery code in the mobile size, but unable to do so, I duplicate the function and added a 1 to the end of

LitElement appending custom elements using button

I have a custom LitElement and inside it, I need to have a button that will dynamically append new custom elements (preferably using TemplateResult objects gene

Build a multiplication table

I am having trouble with coding a calculator that asks the user to enter the starting and ending values. The program must use nested for loops. Including row an

How to merge multiple in index into single page applications

I have these two ReactDOM renders to merge into single ReactDOM, having difficulties in merging. ReactDOM.render( <Provider store={store}> <Brows

How to scroll horizontally to an item in a container while keeping it centered?

I have a list of items in a container. The container takes the full width of the parent, allowing the items to overflow horizontally if needed. Here's what it l

Angular Error trying to diff '[object Object]'. Only arrays and iterables are allowed

I have issue with this "Error trying to diff '[object Object]'. Only arrays and iterables are allowed" when i want to get my products in html Here is my product

How to Show result after uploaded file in PHP

I have a script that uploads the video to a server, everything is correct but there is a problem, after the upload of the video to the server is completed it sh

Why can't I set the text color of this span element to white

Simply put, I want to change the color of the first two texts of each line to white, but it doesn't work anyway. It is as if the span elements generated by js c

javascript plugin to display calendar

I am trying to find a package that i could install that would just display a view of a calendar as follows I dont need to add an event or anything i just solel

Month Navigation through increment arrow and decrement arrow in javascript

I want to implement code where the increment or decrement of a arrow happens when I have selected the arrow. I want a replica of a design and implementation of

discord.js check if user has permissions

I want a command that can only be used by people who have the ban permission current code: if(msg.member.guild.me.hasPermission('BAN_MEMBERS')) { msg.