2,532,970 questions
0
votes
0
answers
5
views
How to improve EventEmitter event notification function?
I wrote the following EventEmitter class, and it works great so far. But today I came across a scenario where if event listeners are created and destroyed frequently, and the off function is not used ...
0
votes
0
answers
5
views
xterm.js generates full row of characters before writeln output
While experimenting with xterm.js I made the follwing fiddle.
const divTerm = document.querySelector("#term");
const xterm = new Terminal({
cols: 100,
rows: 80,
cursorBlink: true
});
xterm....
0
votes
0
answers
7
views
How can we change a pie-doughnut chart into an arrow ring chart?
Currently I've below design in echarts apache
and i want as below pie doughnut chart with arrows inside
Here is my current code:
var data = [
{ name: 'Label 1 \n', value: 16.67, },
{ name: '...
0
votes
0
answers
6
views
visibilitychange not firing on app switch on macOS
visibilitychange event is not fired when switching between apps when the window is not maximized.
I have pasted this code block in the console. While this is working on tab change, it is not ...
0
votes
0
answers
25
views
Dispatch event not working during page route
I'm working on a Angular 14 application in which on a specific scenario where the page load gets the current date (selected from a datepicker) and pass it to the backend to get the data .
In this case ...
0
votes
0
answers
10
views
How to force instagram to redirect a link from instagram app to safari using javascript
I am trying to force instagram to redirect a link to safari using Javascript.
I have depployed the below code on netlify and using the hosted link on my instagram bio. Would want the appclip to open ...
0
votes
0
answers
24
views
Sync vs Async function execution time confusion [duplicate]
I am struggling to understand why an asynchronous function with some calculations takes such a long time to execute. I have simplified my code like so:
const syncCalc = () => {
let v = 0;
...
0
votes
0
answers
6
views
How to synchronize two or more graphics with converFromPixel in same echarts.instance?
I have two dot graphics (scatter) and I need to move the mouse (mousemove) over one of them and pass the tooltip effect to the other. That is, when I move the mouse over series[0], the tooltip must ...
0
votes
1
answer
15
views
SvelteKit + MySQL + Drizzle: Cannot read properties of undefined (reading 'promise')
I'm setting up a test project with SvelteKit, using MySQL for the DB and Drizzle as an ORM. It's using TypeScript.
This is the db/index.ts file:
import { drizzle } from 'drizzle-orm/mysql2';
...
0
votes
0
answers
21
views
Storybook - Element type is invalid: Expected a string
I have check my imports and component name but while running below code in Storybook, getting below error
Element type is invalid: Expected a string ( for built-in components) or a class/function (for ...
0
votes
0
answers
28
views
How do I format the string to POST data through XMLHttpRequest in Laravel?
I'm trying to send my data through XMLHttpRequest but don't know how to format the string with all the data
My JS Code:
function savePhotos() {
var csrf = document.querySelector('meta[name="...
0
votes
0
answers
33
views
Deployed React App not loading on Laptop Browsers
I have deployed a React Web App on Azure Static Web App using the free tier with my custom domain. I am able to react the site perfectly fine from mobile devices which includes safari and google ...
-3
votes
0
answers
26
views
Why does php built-in server works, but Apache doesn't [closed]
As a question says, when I run command php -S localhost:8000 in terminal(after positioning in project root), and after that, I try testing out the URL http://localhost:8000/app.php, (app.php is my ...
-1
votes
0
answers
29
views
How to store and manage user generated javascript code on website [closed]
I am currently working on a website where people can upload their pictures, put them in frames, add certian already coded effects. But, i know that there are some more invested users that would be ...
-7
votes
0
answers
40
views
Ideas for Javascript libraries and tools [closed]
I am trying to improve my coding skills and to have a better portfolio, and I thought it'd be a great idea to create a library or a tool that could also be useful to others. Unfortunately, I don't ...
0
votes
0
answers
3
views
Show two dimensons in a wms layer with leaflet
I have a map and a WMS layer with two dimensions (time and height). I have used leaflet timedimension to show time, but I can not to display the second dimension (height) in the map. Is it possible to ...
-4
votes
0
answers
53
views
Console.log HTML elements [closed]
Starting out in JavaScript with VScode and Chrome on PC
this line of code
console.log(document.getElementById(app-title'));
puts this on the console
(solid triagle)h1#iapp-title
but the tutorial I'...
0
votes
0
answers
13
views
Encountering issue in reusable components with react-multi-carousel
I’m developing a reusable component using react-multi-carousel for a React app. However, when I try to integrate it into a different React application, I encounter an error. Could there be issues with ...
0
votes
0
answers
18
views
in power automate variable produced by JavaScript is visible as [object Object]
function ExecuteScript() {
return (async function() {
const CHECK_INTERVAL = 500; // Sprawdzenie co 500 ms
const TIMEOUT = 45000; // Maksymalny czas oczekiwania w milisekundach
...
-1
votes
0
answers
18
views
Is it possible to have a FullCalendar dayGridYear to span across the year break
For example, if I have the following:
visibleRange: {
start: '2024-12-23',
end: '2025-01-19'
},
validRange: {
start: '2024-12-23',
end: '2025-01-19'
}...
0
votes
0
answers
9
views
How to add additionalProperties in nested schema in typebox ajv which has common schema import?
I tried to add the { additionalProperties : false} to one of my typebox schema
schema.ts
export const numericString = (options: { default: string }) =>
Type.String({
...options,
pattern:...
0
votes
0
answers
10
views
Masonry using ajax resize
I m working on a responsive site using masonry to show pictures . The grid container is fill with Pictures ( items ) called from an ajax function : item fill from ajax this working well untill i ...
0
votes
0
answers
12
views
ClerkMiddleware Not Functioning as Expected [closed]
With the deprecation of authMiddleware, I’m looking for guidance on how to update my code. My previous implementation was structured like this:The code
What would be the recommended approach to ...
2
votes
2
answers
65
views
Don't understand async await execution order
async function funcTwo() {
return new Promise((r) => r());
}
async function funcOne() {
console.log("A");
(async () => {
await funcTwo();
console.log("B");
}...
-3
votes
2
answers
57
views
in JS what is more efficient for determining if a string is one of many options: compare with multiple ORs or switch?
Example: I want to see if a key press is one of 4 different keys.
Option 1:
if(e.key === "ArrowUp" ||
e.key === "ArrowDown" ||
e.key === "Control" ||
e.key ==...
0
votes
4
answers
62
views
Css using display style with fade-in animation togather
I developed an HTML code and I intend to display the text related to each link with a fade-in animation when the link is clicked.
In this code, I have a card with two columns. The first column ...
0
votes
1
answer
45
views
JavaScript popup calling different images onclick
I have created an image popup which uses javaScript to call different images onClick.
HTML Code snippet for the same as below.
<img onmouseover="imgload();" src="11.jpg">
<...
0
votes
0
answers
15
views
How to have multiple vidstack players on one page?
I need to set up vidstack player this way
<zzVideo class="zzVideo" data-src="youtube/ssvK18GSsEA"></zzVideo>
Now I am trying to figure out how to intialize multiple ...
1
vote
1
answer
37
views
Firefox rendering issue for ellipses
In Firefox browser , truncation of string is not working, when typing into the input box at first time truncation is not working, but when focusing out and typing once again it start working , seems ...
0
votes
3
answers
61
views
Why is React state variable not reinitialized on re-render
I created a simple React function component.
Here is how it looks:
import React, { useState } from "react";
const Parent = () => {
const [data, setData] = useState("");
...
1
vote
0
answers
27
views
Updating the primary entry for a google contact using the people API without deleting previous primary entry
I am working on a Google Apps Script project that integrates with the Google People API. My goal is to update a field designated as primary (e.g., primary address). However, I haven't found a way to ...
1
vote
0
answers
18
views
I'm trying to implement the Web Share Api functionality on my web app but when i test it on my iphone 14 on chrome, is not working
Has anyone else ran into this issue? I'm implementing the Web Share API and it works when i tested it using my desktop but when i tested it using my iphone 14 it works on safari but when i use chrome, ...
0
votes
0
answers
19
views
Vue: returning non-reactive values from a composable
Is it okay to return non-reactive values from a composable?
E.g., like so:
// useNavLink.js
import { toValue } from 'vue'
import { useRouter } from 'vue-router'
export default function useNavLink(...
1
vote
3
answers
58
views
How to correctly enable/disable a parent section based on child selection?
I have a scenario where I am dynamically creating child buttons for a parent section, and I need to manage the state of the parent based on whether the child sections are selected or unselected. The ...
-1
votes
0
answers
31
views
PWA Payload and JSON
First time here, I have a problem with PWA push notifications.
It's a chatting page made with PHP.
My push notifications are sent OK (on the phone and on the web). I have a push notification.
But ...
0
votes
0
answers
20
views
Firebase Security Rules: Unable to Read Custom Token Claims in request.auth.token
I am having trouble with reading Firebase custom token in my security rules; it was working fine previously, but idk why now, I am unable to read tokens and due to this, all of my security rules are ...
0
votes
0
answers
23
views
calling json 2nd dimension array in php [duplicate]
I had trouble to call the 2nd dimension data of the array, I have an array like this
(13) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
0: {azimuth: 1.9834929332749562, altitude: -...
1
vote
1
answer
31
views
React - onSubmit and useNavigate Pattern
I'm trying to submit & redirect in React using useCallback but I'm not using the hook properly. What's the pattern for saving data and then redirecting?
const onSubmit = useCallback((data: ...
0
votes
0
answers
9
views
Dynamically change HTML column in Matrix based on row information in SurveyJS
I want to create a SurveyJS matrix with rows that contain a text & HTML element. Thus, the HTML content should change in each row. The Survey is a reasoning test that contains a text statement and ...
0
votes
0
answers
14
views
How to open a URL in a new tab and redirect the current tab without triggering mobile browser popup blockers?
I'm working on a feature where I send a request to a server and receive a response. The response may or may not include a URL. If a URL is present in the response:
I need to open that URL in a new ...
0
votes
0
answers
12
views
Go to definition does not work in Vscode for the components declared inside index.jsx
I have a component named Messages defined inside this path: components/src/components/common/messages/index.jsx like the below image
I imported the Messages component as shown below image
When I use ...
0
votes
0
answers
10
views
Issue with OneDrive Picker V8 Integration: Invalid Client ID and MSAL Authentication Loop
I am attempting to integrate the OneDrive FilePicker V8 in my application. I followed the official documentation: https://learn.microsoft.com/en-us/onedrive/developer/controls/file-pickers/?view=odsp-...
0
votes
1
answer
27
views
designing to overcome 3rd party API rate limits in firebase functions
My product tracks the user's stock portfolio. I have created a Firebase function that is called every 24 hours. This function goes over the user's stock data and makes a call to a 3rd party API to get ...
2
votes
2
answers
43
views
Give buttons an active styling for change content javascript
I am creating a section in Elementor that has five buttons. Each one changes the content inside an adjacent section using Javascript. The functioning code is:
var $ = jQuery
$(document).ready(...
0
votes
1
answer
31
views
Why can't I access my backend file that is used for routing(app.php)? [duplicate]
I am making a chat application using PHP on backend and React.js on frontend. However, I am encountering a problem with fetch API.
My fetch that calls an endpoint
fetch('http://localhost/...
1
vote
0
answers
14
views
Paragraph Not Appearing in DOCX.js When Using Conditional Statement
I am using DOCX.js to generate a word document which has an address section. I am trying to create a paragraph that always shows the first paragraph with the text "Address" and then insert a ...
-1
votes
1
answer
22
views
Order of adding ice-candidates to webrtc-connection
MDN documentation for RTCPeerConnection.addIceCandidate() says that it returns a promise.
So an ice-candidate will likely is being processed yet when this methods returns.
I get several ice-candidates ...
0
votes
0
answers
18
views
Precondition Failed (412) error when using Phone pe Web API for getting transaction list
I am using the POST method on a Phone Pe Web API endpoint to get a list of transactions. I include cookies for authorization, but I’m encountering a 412 Precondition Failed error after a few hours. ...
0
votes
0
answers
17
views
How to store docx files to cloudinary with Multer
I am trying to upload docx file to cloudinary with multer-storage-cloudinary.
Here is the code I use
const storage = new CloudinaryStorage({
cloudinary,
params: async (req, file) => ({
...
0
votes
2
answers
41
views
Javascript shipping countdown timer not working
I am having a issue with some javascript code on a category page, here is an example of such a page. I am trying to add a javascript shipping countdown timer that says order within x amount of time ...