Category "javascript"

Enforce one describe per file

The Story: We have a rather big test codebase with Protractor+Jasmine tests. One of the current problems we have is that some of the test/spec files contain

How to pass values without using onChange() in HTML but in JavaScript?

I know this is a simple question. But I couldn't find a way to overcome this issue. All I want is this. I have a drop-down created using select element & wh

ReactJS: How to determine if the application is being viewed on mobile or desktop browser

In ReactJS, is there a way to determine if the website is being viewed on mobile or desktop? Because, depending on which device I would like to render different

How to save MediaRecorder Web API output to disk using a stream

I am experimenting with the MediaStream Recording API within Electron (therefore Node.js) and wish to handle the output as a stream. Handling as a stream would

How can I add rel = "nofollow" to a link in CKEditor if it's an external link

i want to give rel="nofollow" to my external links which its content managed by ckeditor. example.com = my site externallink.com = any external link For exa

HighCharts Stacked Column Adding Onclick Event to the chart

I am working on a Highchart column chart. I need to add an onclick event to it so I can get data back when I click on the different columns. Here is my curren

Firebase error - call Firebase App.initializeApp() -

I have problem with firebase in react. It shows "Uncaught FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeAp

How to remove generated node on page

I'm creating a node manually using vanilla JS. The idea is this alert appears after an input field if the maxlength limit has been reached and is removed if it

How to create a build for multiple environments in Nuxt?

I am building a Nuxt application where I will have two environments staging and production, the local should also be considered as staging, now I need to create

expression not in aggregate or GROUP BY columns

I have a table that contains the following columns: ProductID, ProductName, Price, CategoryID. The goal is to print all the details (ProductID, ProductName, Pri

How to do update in AWS Dynamo DB using NodeJS

I have written this function to do update in dynamo table const updateTask = async (req, res) => { try { const { existingTaskText,updatedTaskText } = r

How to transfer custom SPL token by '@solana/web3.js' and '@solana/sol-wallet-adapter'

Hello I am trying to transfer a custom SPL token with the solana-wallet adapter. However i am having trouble getting the wallet's secret key/signing the transac

DataTables: Cannot read property style of undefined

I am getting this error with the following: jquery.dataTables.js:4089 Uncaught TypeError: Cannot read property 'style' of undefined(…) _fnCalculateColum

Android webkitSpeechRecognition .isFinal variable not showing correct value

I'm attempting to do some voice recognition stuff on mobile. Here's some code.. var recognition = new webkitSpeechRecognition(); recognition.onresult = functi

YouTube Auto-Like script not working until I refresh

I am not the author of the code and have no prior experience with code, the credits go to the original author, JoeSimmons. So the problem I am having is the cod

How to conditionally apply CSS classes in React JS

I've been musing on how best to conditionally apply a CSS class in React JS. I've seen some answers banding around but there aren't many out there or they're ju

Javascript code not worked in Internet Explorer but working on chrome and firefox

I have 2 files index.jsp and index.js index.jsp file as below <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" language="java"%> <

How to conditionally apply CSS classes in React JS

I've been musing on how best to conditionally apply a CSS class in React JS. I've seen some answers banding around but there aren't many out there or they're ju

Jest matcher to match any one of three values

I have this selector in my component whose default state is '' (empty) string but when change event is fired user can select any one of the three values that is

Codility like button angular

Hi I have a problem with the codility exercises on the square, I am trying to do something 2 days and nothing anyone has a solutions Build a like button compone