2,526,946 questions
-2
votes
0
answers
25
views
rails 8 error: Uncaught SyntaxError: import declarations may only appear at top level of a module
I have a new Rails 8 application built with Bootstrap, Ruby 3.4.7, MySQL, and Haml, running in Firefox 145.
It all looks good, except for the uncaught exception:
Uncaught SyntaxError: import ...
0
votes
1
answer
21
views
Python Tkinter / HTML JS CSS
I currently program in this two stacks when needed. I´m civil engineering not a programmer.
For some small programs that run local, no need for database or server. As much a link to a CDN to provide ...
0
votes
0
answers
24
views
Light Mode Flash(in dark mode) On Reload Page
Always I reload any page happens a quickly flash that change the entire system to dark mode and come back again, but really quick.
Before, this was happens also on dark mode too, but i could fix it ...
-4
votes
0
answers
26
views
My sidebar on my website keeps auto-closing when I scroll down on my website (mobile) [closed]
I'm building a website at the moment but having trouble with my sidebar disappearing while scrolling on mobile (I checked chrome). I noticed that it only disappears when the overlay disappears on the ...
0
votes
0
answers
10
views
Supabase Realtime Broadcast service sending but not receiving messages
I have an app where users are able to join a group and broadcast messages to that group. This is the relevant code:
await supabseClient.realtime.setAuth();
const channel = supabseClient.channel('test'...
1
vote
1
answer
40
views
Regex validator with expression
I am trying to validate the input based on previous selection using SurveyJS. The input in last section of Duration should depend on previous selection of Days or Months or Years.
If I keep only ...
1
vote
0
answers
19
views
How to manipulate the property "Show as Warning"?
I am using FormIO version 6.14.
In the "Select Component", under the "Validation" tab, in the "Custom Validation" (JavaScript) section, I see a property called Show as ...
1
vote
0
answers
23
views
Weird OpenAI streaming bug: concurrent JS streams randomly mix chunks across responses
I’m hitting a super weird issue with OpenAI’s streaming API and I’m lowkey losing my mind here so if anyone ran into this before pls tell me wtf is going on because I can’t tell anymore if it’s me or ...
Best practices
0
votes
2
replies
31
views
How to determine if a TypedArray is signed?
I am working on a byte editor like DataView but with more features and I was wondering how to detect if a TypedArray was signed or not.
I already have this,
const signedTypes = new Set([
Int8Array,...
0
votes
0
answers
27
views
Svelte with SVAR dynamic DataGrid: forced update
I'm trying to implement data logger using Svelte and SVAR's dynamic DataGrid.
Log data array is updated by polling REST API with a given interval (I'm using REST mockup for now).
For the first rows ...
Best practices
0
votes
2
replies
43
views
javascript : how to display and scroll a remote pdf, on a browser non dependant way
I wish to display in an html page and control its scrolling, the image of a pdf hosted on a server.
I am currently using Mozilla’s pdf.js scripts, which work well for pdf files stored on my computer.
...
0
votes
0
answers
11
views
CKEditorError: plugincollection-plugin-not-found {"plugin": null} when integrating custom CKEditor5 plugin with Drupal 10
I am trying to integrate a custom CKEditor 5 plugin (LanguageTool) into Drupal 10 using a custom module. The plugin builds successfully, but when Drupal loads the editor, the browser console shows:
...
0
votes
2
answers
44
views
How to display <NavLink> components outside MemoryRouter in React Router? [duplicate]
How to display <NavLink> components inside the Footer? I cannot place the Footer inside RouterProvider. The Footer component should be displayed on every page.
function App() {
const router = ...
0
votes
2
answers
74
views
Why does the checkbox become unclickable when width is lowered?
This is a incomplete website design I have been working with. The problem is when I reduce the width of the browser the triple dash appears but for some reason the checkbox becomes unclickable. I ...
1
vote
0
answers
22
views
Filter on worksheet columns re-triggering excel office.js custom functions even when it is not volatile functions
Excel re-triggers custom functions created in office.js api addin, but from documentation it should only re-trigger the formulas which are volatile function and in office.js api to specify custom ...
0
votes
0
answers
28
views
How to open Outlook Web with a pre-filled search query (Gmail-style email filtering link)?
I’m implementing a password-reset and email-verification flow.
After we send an email to the user, we want to provide quick-access links such as:
“Search this email in Gmail”
“Search this email in ...
-4
votes
0
answers
35
views
Why changning cloumn name now working in datatable creation? [closed]
I have this code
targets: 2,
data: null,
name:'serialValue',
defaultContent: '',
...
-2
votes
0
answers
70
views
How does datatable generates TDs? [closed]
I have this code :
this.dataTable2 = roles.$table.find(".organization-roles-table").DataTable({
paging: true,
serverSide: true,
processing: true,
deferLoading: 0, //prevents ...
0
votes
1
answer
33
views
React 18 streaming chat messages updating with stale state
i’m building a small AI chat ui in react (next.js app router, react 18) that streams tokens from my backend (openai style stream). basic flow:
user types a prompt
i push the user message into ...
0
votes
0
answers
36
views
Can't delete text from Google Doc
I’m trying to amend cells in a Google doc using their api. But I can’t seem to delete text from the tableCell.
I always get the invalid deletion range error. There is this duplicate question.
But the ...
-1
votes
2
answers
61
views
Missing semicolon in Playwright [closed]
I'm having error when trying to run below code:
import { test, expect} from '@playwright/test';
export class HomePage{
constructor(page){
this.page=page;
this.headerLabel='....
1
vote
0
answers
42
views
React SSR (being used as binding in cloudflare) HMR required in cloudflare worker
I'm working on a project, which uses a react SSR module (using Vite). Then I'm using a seperate worker which loads my site and there's link /load-ssr which loads the SSR module as a "binding"...
0
votes
1
answer
50
views
Alternative to local window storage in browser
I have an application that consists of three parts: a Python server application, a web front end that is connected to the Python tool via WebSocket, and a second website that is connected to the first ...
2
votes
1
answer
47
views
ECharts x-axis labels truncated with grid left/right 0: How to offset first/last labels without affecting spacing?
The Problem I am using ECharts and I need the chart to take up the full width of the container. Therefore, I set grid.left and grid.right to 0. However, this causes the first and last labels on the x-...
-5
votes
0
answers
140
views
How to force Google Translate to translate text between <code.....> and </code> tags on my webpage? [closed]
How do I force Google Translate to translate text inside <code> tags on my webpage?
I read online that the <code tag can be replaced with a <span tag and then reverted after allowing ...
-5
votes
0
answers
56
views
How to run a function after Google translate translates a webpage? [duplicate]
How to run a function after Google translate translates a webpage ?
I am asking to do so because Google translate does not translate text that is between the <code.....> and </code> tags ...
0
votes
0
answers
58
views
Unable to use the Alexa REST API to update the "datastore" for an Alexa Widget
I have written a simple Alexa skill which works and I've now added a Widget, these both display as expected.
I am now trying to use the datastore but every time I try to update the store, I am getting ...
0
votes
0
answers
35
views
PrimeReact InputNumber causes "Failed to execute 'removeChild'" only on macOS (Safari/Chrome) when toggling edit mode in React
I have a React + PrimeReact component that displays static text, and when the user clicks an edit button it switches to editable inputs (InputText, InputTextarea, InputNumber, etc.).
The entire ...
1
vote
0
answers
87
views
Run JavaScript in Python wrapper: problem by module calling [closed]
I try to execute the follow code fragment (actually the calling of JavaScript module inside of the python code):
from py_mini_racer import MiniRacer
ctx = MiniRacer()
ctx.eval("""
...
0
votes
0
answers
30
views
Unexpected stale state in React when setState runs inside a loop [duplicate]
Why does updating state in React inside a loop cause stale values even when using functional updates?
2
votes
1
answer
47
views
How to remove the iOS accessory bar on mobile?
On a React App, I'd like to remove the accessory bar that appears above the iOS keyboard when we are focusing on a textarea. Is it possible ? I tried a few things saw on the internet but nothing works ...
-3
votes
1
answer
70
views
How does the space complexity notation change with input type?
I'm wondering whether the variability in the size of individual items in the input array of a function changes how we represent its space complexity. If we have an algorithm that takes in an array and ...
1
vote
0
answers
29
views
Embedded Mobile layout not working in PBIP reports
I’m having an issue with Mobile Layout not being detected when using a PBIP/PBIR-Enhanced report, even though the exact same report works fine when published as a PBIX that was originally created ...
1
vote
0
answers
34
views
NG 21 + Vitest + Non-standalone component with async pipe
With Angular 21, I can't test (with vitest) a non-standalone component using the Async pipe. I get the following error:
X [ERROR] NG8004: No pipe found with name 'async'.
To fix this, import the "...
2
votes
1
answer
125
views
Handling YYYY-MM-DD as UTC
I use this package and my function is this:
const formatDate = (
date: string | Date,
dateFormat: string = 'PP p',
timezone?: string,
) => {
const zoneDate = toZonedTime(date, timezone ?? '...
0
votes
1
answer
49
views
Prevent a new tab from opening when opening WhatsApp from Googlesheet OnEdit
as per below code, from GoogleSheet, I wanted WhatsApp to open with some specific text ready to be sent when user sets a cell to "Ready to Print". The problem is every time a column in ...
0
votes
0
answers
77
views
Perspective transform breaks at extreme Z values
The following is my 3D renderer, written in HTML and JavaScript for the time being. I've ironed out many kinks in it so far, and have finally gotten it to render a somewhat normal cube, but when Z ...
0
votes
1
answer
46
views
Create clickable target in contenteditable div
I'm trying to change a variable when I click on specific text in a content editable div, trying to simulate a hyperlink.
When I console.log the target on Noteblock events and use an if statement to ...
-2
votes
0
answers
60
views
How to get an element into a variable in the dev console [duplicate]
What's the easiest way to put an HTML element into a variable in the browser dev console?
I usually use this pattern:
inspect the element, right click > copy selector path
open the console, foo = ...
Best practices
0
votes
0
replies
29
views
Best practice for converting Annex B H.265/HEVC bitstream to MP4 (hevc / length-prefixed) format in the browser?
I'm receiving an H.265 (HEVC) bitstream in Annex B format over a WebSocket in the browser. Using the received bytes I can construct EncodedVideoChunk objects and decode them with the VideoDecoder API. ...
0
votes
3
answers
101
views
What is the space complexity of this palindrome program? [closed]
In Scrimba's "Data Structures and Algorithms" course, in the lesson called "Challenge: Palindrome", the teacher analyzed the space complexity of the following program as O(n * k) (...
3
votes
0
answers
89
views
Can't get scroll animation code to execute
Thanks for the help in advance. For the life of me, I cannot get a particular scroll animation to execute which utilizes gsap and lenis.
I've assembled the code to the best of my ability: https://...
0
votes
1
answer
37
views
Kendo MultiColumnComboBox select event sometimes not triggered after item selection
I’m having an issue with Kendo MultiColumnComboBox where the select event is not fired from time to time.
Component: Kendo jQuery MultiColumnComboBox
Option: serverFiltering: true
Symptom: After ...
Best practices
0
votes
2
replies
77
views
Best way to initialize data in next js app router with zustand
I’m building an e-commerce type website in Next.js where there are multiple sections of stores. Each store card has a heart icon to mark it as a favourite.
The same store can appear in:
multiple ...
-4
votes
0
answers
80
views
Why isn't my config correct to build a webapp with 'object-inspect' using vite?
I have a webapp that depends on object-inspect, which has caused issues in the browser before, but there was a fix which I think is part of new package because the fix is part of the documentation for ...
Advice
1
vote
1
replies
44
views
I would like to know why the ref in my onMessage handler requires spreading before flushing
Here is my on message handler:
const onMessage = (event: MessageEvent) => {
try {
const message = JSON.parse(event.data);
const normalizedMsg = Array.isArray(message) ? message : [...
Advice
3
votes
3
replies
69
views
JavaScript: Why was dynamic *this* binding ever allowed into the language?
In JavaScript, the object that this refers to in an object method changes depending where the method is being called from:
window.myString = "what";
const o = {
myString: "Hello ...
-1
votes
0
answers
75
views
Can a React (Vite) SPA prevent a component from being included in the client bundle until after backend authentication? [closed]
I have a React (Vite) frontend and a FastAPI backend.
I want to protect /dashboard so that the Dashboard.jsx component is not downloaded by the browser unless the user is authenticated.
In a normal ...
3
votes
2
answers
71
views
Why isn't the class style applied and the button working inside the webcomponent
I am trying to understand how to make a web component with attributes. There is 2 problems I don't understand in the following code:
The div with the text 'the style of class is not applied' doesn't ...
Tooling
0
votes
0
replies
50
views
How to convert javascript object of mongodb based query to mongodb query as parse
So I have an MEAN stack application where user types query ( or copy from mongodb compass ) in a editor and I use nodejs in backend to perform that query ,
So I use codemirror editor to text codes , ...