Category "javascript"

How to find anagrams of each word contained by a sentence using JavaScript

E.g.: 'abba' and 'baab' are equal 'abba' and 'bbaa' are equal 'abba' and 'abbba' are NOT equal 'abba' and 'abca' are NOT equal You have to write a function whi

Exec, ExecSync, Spawn, SpawnSync fails in production on multiple MAC machines

Solved -- Official Electron bug solved in 17.0.2 I'm trying to write a cross-platform app that utilizes child processes to execute commands. I ran into a proble

Best way to replace strings inside an JavaScript object

I have an unknown javascript object (let's call it IncompleteObject just for readability) and an array of IVariables which can be anything, but in the following

If the condition is false stop the script in JQuery

In the code below, the pop up is appearing but the AJAX part is also getting executed. What I want here is, if the pop-up $('#confirmCloseFutureEvent').modal('s

swiper.js i want the scrolling to stop at end of the section and stop scrolling to next slide on its own, then continue to normal scrolling

<body> <div class="swiper swiper1"> <!-- Additional required wrapper --> <div class="swiper-wrapper"> &l

Getting File Directories as nested Array object

I want to get my file directories as nested array object but i can't seem to figure out how to convert [ 'routes/files', 'routes/files/emptyfolder', 'rout

How to access a #document inside an iframe using puppeteer

I am trying to access a document inside an iframe (iframe has no id). I can get to the iframe but, there is a document inside that iframe that i need to access.

Lightweight-charts doesn't show on html page

i'm trying to use a chart on my webpage using Lightweight-charts-library but the chart won't show. This is my HTMl <!DOCTYPE html> <html lang="en">

How to make Bootstrap 4 table keeps resizing to screen width when adding data in JS

I am specifying my table in HTML and populating it within JS. The desired column widths are as specified within <table> i.e. 500px. If I run the code with

Reaction not being triggered by nested observables

I have a observable class with nested observable properites: class TodoItem { @observable name: string = ""; @observable completed: boolean = false; @act

AWS Datastore doesnt query when app oppens for the first time

I use Datastore from Aws-amplify. I have a problem .The problem occurs only when app opens for the first time(when I wipe data of device/reinstall ). Data is lo

How to Make All Images Spin at the Same Time in JavaScript?

I am creating a simple spinner game that matches 3 images from a predifned array. Now when i click on start it starts spinning the first image only and the thre

Unable to download image to local directory from url in expo react native

I am unable to download image in expo application(React Native for Android) after building my app file, but I am able to download image while debugging the appl

How to ressolve TypeError: Network Request Failed for react project running at android device

While running my react native app on android device using expo the api response are not coming which is done using fetch and POST method and getting this error:

Page displays formula rather than result (but for only ONE of the cases)

I'm a student currently learning JavaScript. As practice, I wanted to make a cute reading randomizer for a friend with a simple form and a if else input validat

React Jest:- node:internal/process/promises:246 triggerUncaughtException(err, true /* fromPromise */);

I have below code in react. useEffect(() => { (async () => { await httpClient .get(`${config.resourceServerUrl}/invent

API call to crypto.com in node returns invalid JSON response

I'm sending a POST request to the crypto.com public API (reference) using node-fetch. More specifically, I'm am attempting to call the private method get-accoun

select all on checkbox is not working using jquery

Clicking on select all of the checkbox only the particular page is selected .not selecting all pages. Here using jquery. Datatable contains 100s of pages and us

Realm DB React native Schema - type must be of type 'string', got (undefined) Error

This is my Schema for a Message history i'm getting from the API export default class MessageSchema { static schema = { name: 'MessagesHistory', prim

How to redirect to another page and call a Function there on Angular ng-click

I have a page where I toggle between areas using angular functions onclick at home.php like <button class="btn btn-success btn-lg span6" ng-click="settingMa