Category "javascript"

My terminal done with javascript doesn't return the correct result

I have a lot of problems with my js code. So, I make an html page looks like terminal, for school exercise. The html and css works good, but now I have to make

How to convert buffer to image with react native

I am using pouchdb with react native (expo) to store the local data and also the images and when trying to recover the image I get the following data Object {

How to DRM protect an image

I am trying to create a comic website, but I want to protect the images to avoid copying the image. I want to do something like the Webtoons viewer. I have no i

Issue with click function not working after toggle

Sorry the title is vague, I'm not sure how best to describe this. I have a function which should do the following: If a menu link has children: preventDefault o

How to change the visibility of a div when browser reloads?

I want to make the main div hidden when someone hits the refresh button and then after sometime making the main div visible. The reload detection code is workin

Is there a way that an event listener function could execute although there's an if statement preventing it from doing so?

I've been trying to make this work but I can't seem to figure out where the problem is coming from or what's producing it. The script randomly executes parts of

Bootstrap 5 carousel with multiple items

i'm new to bootstrap and i'm doing an ecommerce template for learning bootstrap 5. There is a way to make the bootstrap 5 carousel to show multiple slide at the

How to access just the changed data of an 'input' event regardless of text deletion or insertion like pasted or typed or restored text for the latter?

I have a textarea and would like to return the most recent change to the text for use in avia JavaScript function. That would include: Text that is input via ke

React Native Community DateTimePicker value.getTime is undefined

Hey guys I have few questions regarding the community version of the RN DateTimePicker (https://github.com/react-native-datetimepicker/datetimepicker#value-requ

react-query - How can I access my queries in multiple components?

I'm just beginning with react query and used it to get a list of books from the server using useQuery in my ListBooks Component const { data, error, isLoading,

can not loop through $slots object in Vue 3 to pass all slots from parent to child

I can not loop through the $slots object in Vue 3 to pass all slots from parent to child, the $slots object seems empty in the child component. How can I loop t

Replace All references to email Pentaho Jobs error checking in Repository

I have over 100 jobs (kjb) that reference an email address that is no longer active. I wish to globally change the email address dynamically using PDI (spoon) i

CKEditor 5, jQuery - find and replace text

How could I find and replace text in CKEditor 5 using JavaScript and jQuery? I want to find special character '@' in the text and replace all characters after '

Collapsing columns in a table without jquery by click and by url

for our intranet i've to do a large table with lots of columns. As there are many columns, i want to be able to hide some "blocks" of columns for better overvie

Ethers.js returns the same wallet address even if I switch accounts

I'm using Ethers.js to allow users to connect their Metamask wallets to my app. Here's the code that I have: import { ethers } from "ethers" async function con

add Array using for loop (JS)

I'm recreating a hangman game where I create a random word and conceal this with "". i.e if the word is "monkey" then the array should be ["", "", "", "", "", "

Global getter javascript

In javascript, you can set object property getters like so const obj = { get a() { return 1 } } console.log(obj.a) // 1 Is it possible to define a glo

React-Router-Dom <Link /> tag is changing URL but not rendering the Component

Header Component import React from "react"; import { BrowserRouter as Router, Link } from "react-router-dom"; import { ReactComponent as Logo } from "../../asse

Not able to click on a button inside iframe using cypress

Not able to click on the button inside iframe using cypress HTML <button class="MuiButtonBase-root MuiCardActionArea-root jss9" tabindex="0" type="button">

Javascript function seems to prevent page from loading

So I have the following javascript that, as an exercise is supposed to multiply 2 object as matrices. The Mat4 object stores a 4 * 4 matrix as a 1 * 16 array. f