October 22, 2024
Chicago 12, Melborne City, USA
javascript

display button into html form failed with initialize

My script doesn’t work well. When the button “b5” clicked with ouside <form …> … element, the buttons b5 and b4 deseapper and the buttons b1,b2,b3 appear. This work normaly when my code about button is not inside the <form …> … element… When i put inside and i press or click the button b5,

Read More
javascript

Using OpenAI's real-time api with server-vad mode

I’m trying to setup the real-time api, but I’m a little confused on how the audio to audio events are suppose to work in server_vad mode. Currently I do the following: setup the real-time client const client = new RealtimeClient({ apiKey: process.env.OPENAI_API_KEY }); set the client session: instructions: "be nice and helpful", input_audio_transcription: { model:

Read More
javascript

Azure Function App – No HTTP triggers found (works fine locally)

I’m looking to create a relatively simple javascript app that runs on node as an azure function app and will eventually return a generated png. I installed the Azure Function extension to get me going with a really simple hello world app. I published this to azure and it works fine. The issue is –

Read More
javascript

Running into “Target page, context or browser has been closed” issue

The below code is my Playwright test function test("@Login @Testing Sign In Page Test", async ({ page }) => { console.log("Sign In Page Test"); const pageManager = new pageObjectManager(page); const homePage = pageManager.getHomePage(); const loginPage = pageManager.getLoginPage(); const signInPage = pageManager.getSignInPage(); // await homePage.goToHomePage(); await page.goto("https://magento.softwaretestingboard.com/"); // await loginPage.goToSignInPage(); console.log(await page.title()); await page.locator("//li[@class="authorization-link"]").first().click(); // await

Read More
javascript

Copy response from Chrome Dev tools network tab

I am working with Typescript React.I want to copy paste a response into my react code as a mock-file.But when I copy from Network tab, the JSON response’s keys are in double quotes.I want to convert this JSON response to a pure JavaScript object so that folding and unfolding works in my vs code. When

Read More
javascript

Creating and using dynamic variables based on a dynamic component

I have a table as a component, and now I am trying to build a column wise search within it. The table that will be created will have a dynamic number of columns. Hence I need to create multiple variables for binding with the search input. I was trying to create those variables with eval

Read More
javascript

Fake 'Please select a variation' alert on Add to Cart button in WooCommerce product variation selection

I’m working on a custom WooCommerce product page where the user can select product variations (like size, color, etc.) and then add the product to the cart. Everything is functioning correctly, including the variation selection and the dynamic price update based on the selected variation. However, I’ve encountered a problem. When a user selects a

Read More
javascript

React application lazy imports – TypeError: undefined is not an object (evaluating 'a._result.default')

I have a react application which I monitor with Sentry. Inside the Sentry I see quite often the following error: React ErrorBoundary TypeError: undefined is not an object (evaluating 'a._result.default') As far as I understand the Error seems to be related to some lazy imports. But I am unsure since none of the listed files

Read More
javascript

static/css/3d055d199bf4c760.css:29:22: Unknown word in next js

`npm run build current@0.1.0 build next build ▲ Next.js 14.2.15 Environments: .env Creating an optimized production build … (node:10710) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) (node:10732) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland

Read More
javascript

Integrating Verifone V400c Plus terminal with browser-based POS system using ZVT protocol

The company I am working for has been tasked by a client to integrate a Verifone V400c Plus terminal with our existing browser-based point-of-sale system. This is our first time working with a payment terminal, and we need to implement communication using the ZVT protocol. Here are the details: Our POS system is custom-developed and

Read More