Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Browsing all 138134 articles
Browse latest View live

React: How does one access a phone's actual camera app (not load feed in...

I've come across quite a few packages and APIs for opening a stream and capturing images, but all of these solutions entail loading the feed in a component, so the 'camera' is an in-browser utility. Is...

View Article


Image may be NSFW.
Clik here to view.

Easiest way to scrape out child elements of a parent div

Learning to build a small Chrome scraper extension, which will scrape a LinkedIn search page and return certain information. If I go into the console and use a forEach loop as such,...

View Article


Image may be NSFW.
Clik here to view.

Using Cypress - how to find adjacent items in a certain state

I have a long table with status buttons:<td class="evaluation-button-cell"> <button class="conduct btn btn-tertiary">Met</button> <button class="conduct btn btn-tertiary">Not...

View Article

jsx unexpected identifier when running jest test

when runnning jest test, error is as below. Demo ✕ should pass this demo test (3537ms) ● Demo › should pass this demo test...

View Article

Problem with receiving data by POST after transaction on Tpay for Wix page

I have a problem with the POST method for receiving data after the transaction. My page is on Wix, and I use Tpay for online payments. After a successful transaction, Tpay sends transaction...

View Article


Javascript Array Specific Order

I have an array of js objectconst name = 'Levi' var data = [ { firstname: 'Levi', food: 'apple' }, { firstname: 'Eren', food: 'orange' }, { firstname: 'Levi', food: 'grapes' }, { firstname: 'Miks',...

View Article

How to share react component between two react app

I have a internal component to show employee id car from employee portal and the same id card needs to be shown from admin portal as well. How to achieve this. Which is the best approach ?

View Article

What are express.json() and express.urlencoded()?

I cannot find any documentation on express.json() and express.urlencoded(). What do each of them do exactly?

View Article


How can I share timeout across tabs to only get fired once or block a timeout...

In my SPA, I'm using a timeout to refresh a token before it expires. This timeout gets set once I land on the application based on the current stored token expiration time.For example, if the token...

View Article


How to delete compiled JS files from previous typescript(.ts) files?

I am following Angular 2 quick start tutorial. Following is my folder structure - ├── gulpfile.js ├── index.html ├── js | ├── app.component.js | └── boot.js ├── source | ├── app.component.ts | └──...

View Article

Upload Array in IPFS

I know how to upload file in IPFS but what if I want to upload simple JS array of strings? it returns unknown file and I can't see it's contentvar bufferFile = Buffer.Buffer.from(uuidArray);...

View Article

Rendering a view in express.Router()

I'm trying to render EJS in a file that uses express.Router(), but I don't know how I would do that, since something like router.set('view engine', 'ejs') doesn't exist. How would I render my view?

View Article

jQuery find and replace string

I have somewhere on website a specific text, let's say "lollypops", and I want to replace all the occurrences of this string with "marshmellows". The problem is that I don't know where exactly the text...

View Article


Get PHP or Javascript response from Node.js

I have a node.js program specifically a discord bot using discord.js. I am trying to integrate Googles Teachable Machine API which is just a super easy way of training an image classifier and getting...

View Article

react + webpack failing on difference machine

I have cloned a git repository that is working fine on a different machine. I am failing to run sudo npm start with following error messageERROR in ./src/routes/index.js 11:37 Module parse failed:...

View Article


Click function being called twice but only on the first click?

I'm passing an action down form Context. The onClick has to go a few levels but for some reason when you click it the first time it fires twice. Only the first time, though, after that it fires once...

View Article

How to get scroll started event using vanilla javascript

I want to get an event when a user starts scrolling. There is a way available in JQuery using scrollstart.Is there any way we can achieve the same in vanilla JavaScript?

View Article


Javascript combining arrays using first array as key

I have the following arrays:var a = ["F", "M"]; var b = ["female", "male"]; var c = ["fa-female", "fa-male"]; and I am able to assign b to a using for loop with:ans[a[i]] = values[i]; // { M: "male",...

View Article

ReactJs Pass data between multiple components using Id field

How can i pass Data from Main Component to child component based on the record Id. I have a index.js and detail.js pages. In the index page i have a link as <Link to={{...

View Article

Threejs how to make The Camera Shake

I can't figure this out i have searched for hours on the web can't find anything is their anyway to do this if so please let me know i expect this to be possible i found this snippted somewhare so how...

View Article
Browsing all 138134 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>