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

React JS get current date

I want to output the current date in my componnent. In the console my code works, but the React console says:"bundle.js:14744 Uncaught RangeError: Maximum call stack size exceeded"My component looks...

View Article


How to determine if any arrays in an object has an entry

This is unlike most questions, which concern arrays of objects, not objects of arrays. I have a data structure such as the following, and I need to determine if any of the arrays contained by the...

View Article


Image may be NSFW.
Clik here to view.

How does Firebase rtdb query on a range of strings using orderByKey, startAt,...

I have a firebase query that looks like this: this.db.object(`...irrelevent`).query .orderByKey().startAt(startVal).endAt(`${endVal}\uf8ff`).once('value').then(res => { if (res.val()) { // value...

View Article

What do people use Symbol functions in Javascript for?

I recently came across some code that was using syntax that I wasn't too familiar with. At first, it appeared to be a function that was part of an object, but I can't seem to access it. I've found...

View Article

JavaScript timer play/pause in one button

My goal is merge play and stop buttons to one. Buttons start/stop/reset timer.$(".start").click(function(){ $(".silent_lesson").TimeCircles().start(); $("#ding-audio").trigger("play"); });...

View Article


Remove LF inside specific field and nowhere else

I have been asked to clean data up in a MongoDB collection we have to stored addresses and generic customer contact data. Data contains occasionally carriage returns that tend to break the load process...

View Article

How to refer textfield name in ajax?

I am trying to autofill information from a database into text fields when the user selects the specific name. I initialized the text fields with unique names that are dynamically added.This is the...

View Article

How to modify the value of an object when it is cloned?

Given the following objectconst data = { "123-456": { "03": 2, "04": 0, "05": 0, "06": 0, "07": 0, "08": 1, "09": 1 }, "123-789": { "03": 2, "04": 0, "05": 0, "06": 0, "07": 0, "08": 1, "09": 1 } };...

View Article


Cannot post back calculation to server

The problem showing up when I click the button submit.The error coming out 404 not found and "Cannot POST/Index" in the website. Am I have logical problems on the code or problem that occur on the...

View Article


javascript Date.toISOString() return difference date value

I'm confusing about the javascript Date.toISOString() function which shown as below example, how come date value of x in ISO format become January?const date = new Date(); const x = (new...

View Article

Can message passing be used to detect if another extension is enabled?

I would like to check if another extension is enabled. I understand Management API can be used to check if another extension is enabled (Detect if another Chrome Extension is installed). However, I try...

View Article

ReactJS: How to make redux store inaccessible outside the react

How can I make the redux store inaccessible outside of react? Is there any way I can store a value in a private variable throughout the session?

View Article

Jestjs - uncaughtException: describe is not defined\nReferenceError: describe...

I got this error uncaughtException: describe is not defined\nReferenceError: describe is not defined while doing unit testing with Jestjs in my Nodejs app. However, all tests still run well with npm...

View Article


Image may be NSFW.
Clik here to view.

There is any standalone version of the treeview component of VSCode?

I'm looking to use the Treeview component of Vscode in a React App. Even a vanilla JS can help. I have looked in the source code of vs code, and in the NPM registry and didn't found. Even something...

View Article

Trying to run a .js file but I'm receiving an error:

This is the error:'node"' is not recognized as an internal or external command, operable program or batch file. [Finished in 0.139s]Also, this is coming from atom text editor, if that's necessary...

View Article


ES6 exporting/importing in index file

I am currently using ES6 in an React app via webpack/babel. I am using index files to gather all components of a module and export them. Unfortunately, that looks like this:import Comp1_ from...

View Article

Image may be NSFW.
Clik here to view.

Scrolling html table with header background

I have a table where the user can scroll though the rows when they are overflowing the div. However currently the table header row does not have a constant background for the full width of the table....

View Article


Allow CORS on Android React Native

I'm using superagent to upload files from my React Native app. It works perfectly fine on iOS, but on Android it gives a cross-domain error.I've created a minimal example here...

View Article

Image may be NSFW.
Clik here to view.

for of, False positive eslint(no-unused-vars)

My code: for (const i of [1, 2, 3]) { console.log(i) } eslint message: 'i' is defined but never used.eslint(no-unused-vars)

View Article

How can I allow users to overwrite the numbers in the input control (when...

Please see the JavaScript below:maxLengthDay(event) { const maxLength = 2; if (event.target.value.length + 1 > maxLength) return false; else return true; } and the HTML below:<input...

View Article
Browsing all 142591 articles
Browse latest View live


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