Category "javascript"

Regex splitting on newline outside of quotes

I want to split a stream of data on new lines that are NOT within double quotes. The stream contains rows of data, where each row is separated by a newline. How

How to properly apply ternary operator in v-model in vue.js?

I am trying to apply the ternary operator in the v-model but it's not working. I also read a lot of similar questions and answers on StackOverflow but none answ

Query and get data from an endpoint through the a search bar input in javascript

This endpoint http://vk-data:8003/v1/entity/ returns this: [ { "id": "country", "url": "http://vk-data:8003/v1/entity/country", "nam

react material table export button not view correct

[in my react use export button material table not show complete bar my code i use the source code in material table: options= {{exportButton:true }} how solvet

Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves

I am trying to write tests for electron using spectron. This is my code. describe ('Application launch', function(done) { this.timeout(30000); const app

How To Solve The React Hook Closure Issue?

import React, { useState} from "react"; import ReactDOM from "react-dom"; function App() { const [count, setCount] = useState(0); function handleAlertCli

How to use `firebase-admin` inside firebase functions using ES2015

Nothing I do here seems to work, I can't find an example anywhere that actually seems correct This: import { initializeApp } from 'firebase-admin/app'; Throws:

Functional Component: Write functions inside or outside the component?

I often wrote functional components following a 'Class architecture' where all my function that concern the component are written inside of it like a method in

Angular double curly braces expressions being executed multiple times on mouse down and up

In our Angular app, given code like the following: <div>{{ aGetProperty }}</div> <div>{{ aMethod() }}</div> Whenever I click anywhere

How do i use the MS graph api in react?

I'm completely new to JS and React and im trying to upload a file with my MS custom teams app. I've found the information i need to make it work, i just dont un

How can I display a users name and profile picture after signing in with google on my site?

I am trying to add a Google Sign-in system to my website. For now, I'd like it to display their first & last name as well as their profile picture. How can

Sum All Numbers in a Range

freecodecamp algorithm challenge. I can't determine at which point in my function I am returning more than one value. The correct return value should be 10. The

Class 'NunoMaduro\Collision\Adapters\Laravel\CollisionServiceProvider' not found

When trying to install composer in laravel project get this error. Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover

FlatList moves/drags in all directions

When I click on my FlatList I can drag and move it in all directions (up/down/right left). Although the list appears to be vertical (maybe because of the stylin

How to reduce size on QR code scanner, customize QR code scanner

How can I reduce the size of my QR Code scanner. When I am trying to apply style prop, its not working In below code my scanner is working but it is coming on f

431 - (Request Header Fields Too Large)

First time posting a question please keep it in mind when reading Things i tried: Cleared my google chrome cache and cookies, tried incognito mode, updated my n

Image animation resets page scroll on mobile devices

EDIT 2: I just figured it out. The overflow css property applied on the body is not being inherited by the slideshow div. Adding "overflow: hidden" to the slide

Infinite loop with a useEffect in React native [duplicate]

I have a problem, on the two functions below, when I check the debug of my request, there is an infinite loop of my GET request and I don't un

How to convert camelcase to snake case in Javascript? [closed]

I want to convert a string of that is in camel case to snake case using TypeScript. Remember that the "snake case" refers to the format style

Create MediaStream from Hls.js

I have a HLS stream that I am attaching to an audio element using the Hls.js library. I want to then take that stream and feed it into Wave.js. I want to use th