Category "javascript"

override injection token in unit test

I have a simple service with an Injection token that is used to provide some kind of configuration for the service. It's all working as expected. Although I was

How to automatically reload the ajax/jQuery table data after a button click

I have created a jQuery/ajax API call function to read the JSON data and insert it into the HTML table and it works fine, But I want to auto-reload the table da

Do web workers allow you to go over the browser http connection limit?

There are a few questions on SO related to web worker http limits, including: Http connection limit on webworker or service worker, Maximum number of http reque

Why is an underscore (_) not regarded as a non-word character?

Why is an underscore (_) not regarded as a non-word character? This regexp \W matches all non-word character but not the underscore.

Google Developer Sheets API Javascript Quickstart Uses Deprecated gapi.auth2

The Google Developer Sheets API for Javascript has a great quickstart: https://developers.google.com/sheets/api/quickstart/js My application is based on this an

Update a single property of local JSON file using put call in Angular 8

I want to update my JSON file which I have placed in my assets folder, so If I am updating just one property of my JSON object so it should update that property

Update a single property of local JSON file using put call in Angular 8

I want to update my JSON file which I have placed in my assets folder, so If I am updating just one property of my JSON object so it should update that property

Is CallCC an improved version of goto?

My background is Javascript, Python & a bit of Haskell. I am trying to understand callCC, there are many explanations but I can't find them trivial & I

Fetching local JSON

How can I fetch a local JSON file that is in my directory? the JSON file looks like this: [ { "name": "Sara", "id": 3232 }, { "name": "Jim

Visual Studio Code - how to Go To Definition / open file in JavaScript import statements?

I have a html file with JavaScript module in it, like so: <script type="module"> import * as LOADER from './path/loader.js' import { add } from

How to props through the deeply nested child to parent data ? React

To explain the situation. I have a child component that has one chevron that spins on a click. I need to implement from child to parent and to grand parent prop

How would a functional language actually define/translate primitives to hardware?

Let's say I have a few primitives defined, here using javascript: const TRUE = x => y => x; const FALSE = x => y => y; const ZERO = f => a =>

Breakpoints css is not applied over props in React-jss

I am getting an issue with React-JSS. I have created a modal class for which the property of height depends on the prop passed to the component. In responsive d

How to plot x axis values over bars?

I changed the attributes of the X axis to plot its values over the bars of the chart. But anywhere I put the code, the values are always plotted before ("behind

React, Graphql schema type declaration

I'm using graphql in React and Apollo:generate to create types from the graphql schema. I'm also using react-apollo-hooks useQuery to output the data. Everyth

How can I edit this TextField?

I have an Material UI text field which is populated by a nested JSON object pulled from an API. Data can be displayed in either a TextField, a Date Picker, or a

how to group by riskTypeNo property and calulate sum and averge by selectedValue in javascript?

I have achieved the result by running separate reduce functions for sum and count and then creating finalobj using Object.entries. Can this be achieved with les

VSCode - Import suggestions for JavaScript don't work

Any ideas why Import intellisense/suggestions wouldn't work in a JS project? Here's the jsconfig.json file: { "compilerOptions": { "module": "commo

vue3) Google Login Api (GSI)'s redirect mode can't find http://localhost:3000

I want to adjust google login api(GSI) redirect mode. If api complecated, redirect the url to "http://localhost:3000/oauth", post credential token to backend an

I'm trying to hide JUST the header on a few pages on my Wix site. There seems to be no way to do this. Ideas?

I'm attempting to hide JUST the header on a few pages on my Wix site. There literally seems to be no way to do this. Here's what I've already tried (to no avail