Category "javascript"

Writing to a JSON file from an electron web app

Using electron I have made an app that can generate 6 arrays that create a frame for an animation, these arrays are going to be interpreted by another program t

Can't import the named export 'Directive' from non EcmaScript module (only default export is available)

this is a ionic angular project that i'm working on, i'm using ng-lazyload-image plugin Link. when i start compiling it showing errors like this. Error: ./node_

Adding an image while using mongoose Schema

How can I add an image to my mongodb when using the mongoose.schema in JS? const chequeSchema = new schema({ chequeImageUri: { type: Image, req

NodejS Read/Write Binary Data to/from file

Alright, so I have a string with binary data ("111011 10001 etc"), and I'm trying to save it to a file to them read it on another file using streams, the issue

Redux toolkit filter() not working when wanting to display new array at the same time

I am currently building a clothing shop in which you can add products to the cart, and delete each one of them as you like and it makes the cart re-render and d

How would I get the data I need from this array?

I am trying to get all the data from my firebase firestore and put it into a javascript react table but I am having a difficult time. async function GetAllDataO

Create an array of object properties for each item that has the same key

I'm merging two objects together to create a filter object. However I want to group the merged objects property values where the keys are the same. So... [{cate

Does next js implement a maximum cache size with an invalidation algorithm such as LRU?

I have a next js site that uses getServerSideProps. I would like to use getStaticProps and incremental static regeneration (ISR) instead for the performance adv

No environment variables with Next.js TypeScript Custom server

I am currently building a next.js app for a course at uni. I want to run a script when the development server starts that performs some API calls to update the

Redux & TypeScript: Property 'X' is missing in type 'DefaultRootState' - but the property is declared in Interface

Here's my Interface which I'm using with mapStateToProps: export interface IStore { cache?: any; dataManager?: IUR; userPrefs: IUP; fingerprintModal?: I

How to style scroll bar in code using css?

I am developing an online code editor similar to CodePen, and I was trying to style the scrollbar of code mirror, but I don't know what is the exact line of cod

recoverTypedSignature function on @metamask/eth-sig-util is not working

It seems that every that the updated recoverTypedSignature function on @metamask/eth-sig-util is not working properly. As soon as I add it into the project, it

How can I make the picture sticky on scroll locomotive

I want to make my picture sticky when I scroll, I'm using locomotive-scroll and VueJS. So I want the content on the left to move but not the image on the right

The content overflows after the echarts line chart refreshes the page

The content overflows after the echarts line chart refreshes the page... It is normal to load the chart for the first time。but after refreshing the page,

ag-grid - Set cellRendererParams to data.field items so they are usable in cellRenderer

I am working on an AG-Grid using JavaScript and am having difficulty passing additional parameters for use in a cellRenderer using cellRendererParams and valueG

Why can't I display more data from firebase?

I know I am making a mistake somewhere. I am trying to display all food items from my firebase database onto my restaurant website. So far, I can only display "

Creating an array from each key in an array of objects

I have an array that looks similar to this: The array of objects is much larger and each object has more properties, this is the structure though. let arr = [

i can not pass parameters to backend ( from Ajax to IActionResult or JsonResult) .net core 5

i have problem i can't pass params to backend use fech or ajax call , but from another PC i can pass params, here is a sample from code Backend : [HttpPost]

Three JS Wireframe with rounded edges

I'm working on a project with 3D objects and decided to try using Three.js. I need a wireframe with rounded corners on a single axis. I've been able to achieve

Generating random whole numbers in JavaScript in a specific range

How can I generate random whole numbers between two specified variables in JavaScript, e.g. x = 4 and y = 8 would output any of 4, 5, 6, 7, 8?