Category "javascript"

how can i implement or convert a python code to javascript to be used with tensorflow js

how could I use this code in python with tensorflow js? it is to occupy it with a model that was trained with the dataset tf.keras.applications.ResNet152(input_

Instruction 0: incorrect program id for instruction. Works on devnet but not mainnet

I am trying to make a spl-token transfer from a user wallet. The code below works perfectly on the devnet but throws Transaction simulation failed: Error proces

Axios POST with the server responded with a status of 500 (Internal Server Error)

I'm using ReactJS to build a blog app. I can use axios get, put, delete but NOT POST. Every time I post a new blog, it gives me server responded with a status

Change node style based on name / label

I'm using vis.js to visualise a network. The network is created based on the DOT language (Directed graphs). An example: 1 -> 1 -> 2; 2 -> 3; 2 -- 4; 2

Why am I getting this MySQL error with node?

I have connected to the database on MySQL, and was able to input data to a table. However, I am not able to input data to another table when it seems that I'm u

Why am I getting this MySQL error with node?

I have connected to the database on MySQL, and was able to input data to a table. However, I am not able to input data to another table when it seems that I'm u

Unmarshall of string set in DynamoDB fails

I have tried to marshall DynamoDB's String Set and unmarshall it back as below. import {marshall, unmarshall} from '@aws-sdk/util-dynamodb'; test('Marshall and

File reference in Chrome extension

I would like to load a model in contentScript.js using url './model/model.json' const MODEL_URL = './model/model.json'; const model = tf.loadLayersModel(MODEL_U

Css and Js not working after deploying the next+react project to server side

I have React+next and node js projects I want to deploy that project in one port. For that, I created ts file to js and ran the. next folder to the backend side

How to render different style css on same component?

I have react component which is a button and I render this component three times. I want to add some CSS on the second component but I don't know how. I tried t

How can I store data from JS into a MySQL database

First things first, I'm new to the forum, anything I write that isn't concise or just flatt out adjective let me know! I'm developing an app that can retrieve d

Updating create-react-app to latest version breaks async tests

I have an issue, I have recently upgraded my version of react to use react-script version 5.0.1 from version 4.0.3. Doing the instructions as per https://github

How to return the response from an asynchronous call

I have a function foo which makes an asynchronous request. How can I return the response/result from foo? I am trying to return the value from the callback, as

React Hooks - Using useRef without direct access to HTML Element Code?

With React I'm inside of one repository, and the HTML elements are loading from another repo, which I watch for using pageLoaded. Inside updateHeader there is j

React Native Animated setValue() problem?

Actually I'm trying to set value of the animation with setValue() after Animated.timing() is finished and want to use this updated animated value then in a loop

JEST: My Isolated module function depends on a function found on the same module. After mocking, it still relies on the original implementation

I have abc.js const a = (a)=>{ return (b(a) + 1) } const b = (num)=>{ return(num + 1) } module.exports = { a, b } When I do my test for

Problem with MERN app on netlify and heroku (CORS)

This my first question but I completely have noo idea what to do :/ I learn javascript technologies. I've written my MERN app where I handle login and register

Cypress: Add option to allow LocalStorage

The following facts: page 'X' Open -> cy.visit('/x'); check checkbox 'A'-> cy.checkCheckbox('A'); close browser or reopen page ?????? check if checkbox 'A

How to enable HTML input field from Javascript

I'm using localStorage to save string so the user could enter title and it will be saved for the next times. I want to add a button that will delete the display

Integrate mapbox with fabric js

I am using fabric.js for html 5 interactive canvas app and I'm tryna to do an integration with mapbox, basically putting the map inside a fabric js element such