2,533,098 questions
0
votes
0
answers
4
views
Input type file retrieval/access question
Can someone tell me why the first code snippet works and the second does not? I am able to get filelist in the first snippet but its empty in the second one?
Works:
<label class="bi bi-...
0
votes
0
answers
4
views
Is V8 Ignition "Interpreter" capable of producing byte code only because it was built on top of TurboFan Compiler?
The V8 Engine contains both Ignition "Interpreter" (which is an interesting name for something that not only interprets) and TurboFan Compiler. TurboFan compiler helps to optimize "hot&...
0
votes
1
answer
17
views
Hover button with javascript
good afternoon.
Im trying to make a hover-able button with javascript. It works but the onmouseout function hide the div to soon. Not sure what im doing wrong here. I know you can use CSS to this but ...
-1
votes
0
answers
13
views
weird answers to uninitialized variables/properties in javascript [duplicate]
Case 1:
The below snippet throws a reference error because let variables are hoisted but not initialized.
console.log(x);
let x = 5;
Case 2:
const arr = [1, 2];
arr.length = 10;
console.log(arr[5])
...
0
votes
1
answer
19
views
Is JavaScript code executed now by CPU instead of Interpreter?
Before the Sparkplug compiler, JS code was first converted into byte code and executed, all done by the Ignition Interpreter. The Sparkplug compiler nowadays will take the byte code generated by ...
0
votes
0
answers
7
views
Mix-Blend-Mode Overlay - prevent images in lower stacking context to be effected
This might be a pretty specific question.
I have this running text marquee animation. On hover the animation pauses and shows a gradient as "text color". The mouse is being tracked to pin ...
0
votes
0
answers
17
views
How to make dialog show up in 3 seconds after event onMouseOver
I have an element and after over mouse on it, i show up additional information
document.getElementById(item.id).getElementsByTagName("div")[0].classList.add(classes.hoverDescription)
....
2
votes
0
answers
13
views
How to Customize Browser's PDF Viewer Without Changing the URL in the Omnibox
I'm trying to develop a browser extension to customize the PDF preview page. In the Stack Overflow question Chrome Extension: How to show custom UI for a PDF file, the main author of the PDF.js Chrome ...
1
vote
0
answers
14
views
How to structure scalable data for a drag-and-drop page builder with responsive styling?
I’m building a drag-and-drop page builder using React, and I’m trying to design a scalable data structure for the canvas. The goal is to support dynamic layouts (using Flexbox/Grid) and responsive ...
0
votes
0
answers
21
views
Next-auth 403 forbidden important error while everything is correct
after entering correct email and password combination i can see the user in the server console which means it is correctly returning the user but after the signin the response i get in the console is:
...
0
votes
1
answer
23
views
Jquery : Uncaught SyntaxError: Failed to execute 'appendChild' on 'Node': missing ) after argument list
I'm trying to upload an image with jquery $.ajax method. I have been using the $.ajax code since many years, but strangely it is not working on this particular project. Here is the code
<form id=&...
1
vote
0
answers
7
views
WebGL mesh not working when I add things to mesh
I'm making a 3D physics engine and I need to add balls when I press a button, but whenever I click it, everything goes blank.
Here's the code for the loop, event, and Ball object.
Loop: Cleares mesh, ...
1
vote
0
answers
7
views
How can I get this d3js custom shape?
enter image description here
I am trying to create the shape of the image using d3js (if it's any simpler way, please let me know)
I tried doing it but I don't get it right, I don't get the end and ...
0
votes
2
answers
40
views
center megamenu div under nav button
I have used some code which I got from W3 schools to create a megamenu. I want the box to appear centred to the nav button selected, not centred to the whole page. I'm not really concerned about the ...
1
vote
1
answer
13
views
How to format POST request for Microsoft Graph API to create a new choice column on Sharepoint List with multi-select enabled?
I have a simple script that adds new columns to a specific List on my company's Sharepoint site. I am having trouble figuring out how to create a new column/column definition as a Choice Field that ...
0
votes
0
answers
19
views
(python socket) Is there a way to trigger a JS script on the front-end when a condition is met?
I am making a website and I want to change the view past-login with JavaScript.
The code responsible for detecting a valid login attempt looks like this:
def messages(status_OK, status_400, status_401,...
0
votes
0
answers
6
views
Error: Unable to resolve module '../../tls_certs/server-keystore.p12' in React Native project
I am working on a React Native project where I am trying to include a .p12 file for TLS configuration. However, I am facing the following error:
Error: Unable to resolve module ../../tls_certs/server-...
0
votes
0
answers
6
views
Astro JS with astro@i18next at <HeadHrefLangs /> Cannot read properties of undefined (reading 'map') at supportedLanguages.map
I am using Astro js With astro-i18next
I have correctly integrated at astro.config
import astroI18next from "astro-i18next";
// https://astro.build/config
export default defineConfig({
...
0
votes
0
answers
10
views
window.open equivalent to axios Sending post data
I made the data with FormDta
var url = `/myapi`;
var formData = new FormData();
formData.append('metadata',JSON.stringify(export_param));
var dataurl = imagePreviewRef.current....
0
votes
0
answers
23
views
Django serializer depth doesn't serialize nested models
I use django and react and I want to make some workspaces where they have inside channel instances.
Models.py
class Workspace(models.Model):
channels = models.ManyToManyField('Channel', ...
1
vote
0
answers
10
views
Why does $(code).find('option:selected').text() return different results when selecting options in 'add' and 'edit' modes?
I am using the following code to retrieve the selected option text from a dropdown:
var selected = $(code).find('option:selected').text();
In 'add' mode, when I change the selection from the default ...
2
votes
0
answers
14
views
How to detect if an iframe fails to load due to X-Frame-Options or CSP frame-ancestors restrictions?
I'm trying to detect if an iframe fails to load because the target website has either:
Set X-Frame-Options to prevent embedding
Implemented Content Security Policy (CSP) with restrictive frame-...
0
votes
1
answer
26
views
Blank screen when lazy loading many images in NextJS tsx + Tailwindcss
I am displaying a series of images hosted in CDN on my NextJS page in the "masonry layout" structure (Just like Pinterest). As shown in .
When I try to load it on my desktop it's working ...
0
votes
0
answers
23
views
"SyntaxError: Cannot use import statement outside a module" when running compiled javascript code with Node.js
I am using TypeScript to build a Node.js application. After compiling the code, when I run the output JavaScript file using npm start, it throws the following error:
When I run the following command:
...
0
votes
1
answer
15
views
Getting a "The file for this url was not found" error on tus/server
I have a @tus/server backend with a react uppy frontend. And when uploading I'm getting this response
"The file for this url was not found"
Im runnin multiple containers and the vps is ...
0
votes
0
answers
47
views
How to intercept and modify user input in a Chrome extension before sending it to ChatGPT?
I am developing a Chrome extension to intercept user messages sent to ChatGPT. The goal is to verify whether the message contains sensitive data before sending it to the ChatGPT API.
Here’s the flow I ...
2
votes
2
answers
36
views
How to render my components in a tree structure, like default file structure in IDE using React
I have a component, which is called TreeNode, it is 1 file in my tree stucture.
import React from "react";
import classes from "./TreeNode.module.css"
function TreeNode({children, ...
2
votes
0
answers
39
views
"QUOTA_BYTES quota exceeded" error in React app using IndexedDB
I have a React app that uses IndexedDB to store some user-entered values before sending it off to the backend. I am repeatedly getting Uncaught (in promise) Error: QUOTA_BYTES quota exceeded every ...
1
vote
0
answers
15
views
Highcharts yAxis Categories Not Aligning Closest to Axis Line
I want to adjust the positioning of the yAxis categories. Specifically, I want the first category ("Low") to start right at the xAxis line without any padding or space before it.
...
0
votes
2
answers
53
views
How to locally test javascript that contains classes that require secure context
EDIT: It looks like I was making a false assumption that the reason why my code was not working (I was getting AudioWorkletProcessor is undefined) was because the context was insecure... but I will ...
0
votes
3
answers
55
views
Javascript in NextJS - How To Structure?
I'm building a NextJS website and wanting to incorporate some javascript. I want this javascript to run each time a user navigates to a separate page.
I want to log something to the console each time.
...
0
votes
0
answers
24
views
App not opening in react-native on click of notification
I am using React Native Notifee for displaying notifications and encountering an issue where the app does not open upon clicking a notification.
This problem occurs in two specific scenarios:
When the ...
1
vote
1
answer
35
views
Is it possible to sync data in background React Native?
I'm struggling with a functionality in my app since few weeks.
I will explain my project ; I have a react native app, that connect multiples user. A user can create an event, like a meeting, and the ...
0
votes
2
answers
48
views
Group capturing Regular expression to validate `tictac` string with repentance requirement
I'm working on a code challenge from hackerrank and wonder why my solution failed on this task. (https://www.hackerrank.com/challenges/forward-references/problem)
Task
You have a test string 𝑆.
Your ...
0
votes
0
answers
53
views
Why won't console.log run in if statement
I'm using supabase to authenticate users. I'm trying to return a message to the console if it fails however I can't get the console.log to work. I know the function is working because I can get it to ...
0
votes
2
answers
24
views
Updating data ot attribute using a lambda in jQuery
I have the following code:
let value = $(this).data('value');
value = System.decrypt(value, key);
$(this).data('value', value);
I'd like it to support chaining:
$(this)
.data('value', (value) =&...
-2
votes
2
answers
67
views
React state is not updating 2d array
I'm building a React application that asks the user for an input, and if correct (enter "3"), we render a 10x10 grid of buttons, each tied to a click handler.
Code sandbox url
When any ...
0
votes
1
answer
18
views
firebase firestore querying based on a property in a map
i have data structured in firestore like this
users (collection)
--> uid (document)
--> profile (map field)
--> status (field)
I want to query the data that matches to a ...
0
votes
1
answer
26
views
How to get the Error page to render instead of page.js for client side errors in Nextjs App Router?
For some reason I can not get the error.js page to render instead of the page.js whenever I throw an error on the client on some specific user interaction, for example a drop event.
"use client&...
-1
votes
1
answer
41
views
Get local time from ISO8601 offset string in JS?
I have an ISO8601 fixed-offset datetime 2024-12-26T22:22:00+12:00 and I want to be able to format the datetime in both original timezone, in this case 22:22, and user timezones (I.e. 04:22 for CST)
I ...
0
votes
1
answer
43
views
How to dynamically update drag ghost image text during drag operation in React?
I'm trying to update the text of a custom drag ghost image while dragging over specific elements. However, the ghost image text doesn't update even though the state changes.
Here's my code:
export ...
1
vote
0
answers
33
views
TypeError: Cannot read properties of undefined (reading 'Link')
I am working on a piece of code on Nextjs that create a unique id if a user has their profile info in their browser localstorage and redirect them to a link. I have been getting this error message for ...
2
votes
0
answers
18
views
Material-UI DateCalendar Closes When Interacting with Year/Month Dropdowns in React
I am working on a React component that uses Material-UI's DateCalendar. The component includes an input field that, when clicked, opens a date picker. The date picker should remain open while the user ...
2
votes
0
answers
25
views
Apply style to separate span elements in Rich Text Editor
I recently decided to make my own Rich Text Editor, I was generally satisfied with the version via execCommand, but I wanted to take on my own implementation because of the work with.
Here is the code ...
3
votes
0
answers
35
views
Unable to Delete Class Code in Flask Application
I'm working on a Flask application where I need to delete class codes from the database using a DELETE request. I'm using JavaScript on the front-end to trigger the deletion, and I have a Flask route ...
1
vote
1
answer
21
views
Bootstrap 5 Dropdown Arrow displays incorrectly when the page is refreshed or accessed for the first time
I have a Bootstrap 5 dropdown menu using Vue.js and Nuxt.js :
<div class="collapse navbar-collapse justify-content-end" id="navbarSupportedContent">
<ul ...
1
vote
1
answer
26
views
React bundle size increased by more than the file that it included
require(`./path/to/large_file`)
Without this file being required, the React app build bundle resulted in 36 MB.
With this file included, it resulted in 80 MB.
However, the size of the file itself, ./...
2
votes
0
answers
11
views
TypeScript error when using registerRichText with Lexical Editor: "Excessive stack depth comparing types 'LexicalEditor' and 'LexicalEditor'"
I'm working on implementing a rich text editor using the Lexical library with vanilla JavaScript and TypeScript. My understanding is that the editor should be attached to a contenteditable div, and ...
0
votes
0
answers
13
views
How to Implement Server-Sided Seeking in Shaka Player for Seamless Playback
I'm developing a custom video player interface using Shaka Player for adaptive streaming. The unique requirement is to handle server-sided seeking, where any seek action by the user triggers an API ...
-1
votes
2
answers
42
views
Unable to reduce React app build bundle size
This line of code is expensive to run:
require(`./path/to/large_file`)
Without it, the React app build bundle resulted in 36 MB.
With it, it resulted in 92 MB.
The above line of code is run during ...