Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 days ago.
The community is reviewing whether to reopen this question as of 6 days ago.
Improve this question
The below line used to work fine. All of a sudden last night it stopped working.
var aaa = time.split(' '); //the time contained the value - 12:00 AM
So, after a successful split, it should have been an array(2), but for me it was array(1). So the aaa[0] was '12:00 AM'
I tried
var aaa = time.split("/(\s+)/");
But it didn't workout, So my CTO advised to replace split by substring and it worked
var aaa = [time.substring(0, 5), time.substring(5)];
I am very curious and eager to know what just went wrong with split(). I even updated my browsers and my win-11 too. But it failed to work in edge latest and chrome latest but surprisingly it worked in firefox. And much surprisingly it failed only on my laptop and for others, it worked fine.
Debugging screenshot:
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 10 days ago.
The community is reviewing whether to reopen this question as of 7 days ago.
Improve this question
I am converting hex to hex strings then came across 2 ways to do it using the toString() method:
toString('hex')
toString(16)
I see a lot of resources online also use toString('hex') but when I tried to use it, it gives out an error message: RangeError: toString() radix argument must be between 2 and 36.
The toString(16) works perfect.
But just for curiousity, what is the story behind this? Is the toString('hex') deprecated of some sort? Or is there any specific use-case when that is used instead of toString(16)
Example:
let num = 0x7
console.log('Convert using toSting(hex): ' + num.toString('hex')) // throws an error
console.log('Convert using toSting(16): ' + num.toString(16))
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
The last updates of chrome stop showing the values of the variables on debugger mode when mouse over. The only access to the values is on the Scope and Watch tabs at the right bar.
I saw in other topics that this issue was resolved in old versions, but seems it came back in this version.
Why is not showing the value on mouse over anymore?
There is already an issue opened in the Google Chrome community website: Chrome community post. Looks like it is simply a Chrome bug and there's nothing we can do about it.
It has almost 1000 upvotes and 218 replies in 3 days. Hopefully the Chrome team is aware and working on it. I would follow that post for further update.
EDIT: Fixed in chrome 80. Bug report: https://bugs.chromium.org/p/chromium/issues/detail?id=1033022
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I am working on node.js. I created a function I want to call it 1 time after every 7 days. I am able to call it after 7 days but I want to call this after every 7 days.
You can use this amazing library
https://github.com/node-schedule/node-schedule
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have this question because I cant find official information from Google, Mozilla or Microsoft. I just found 2014 dated entries. I would like that kind of efficiency on the browser.
To the moderator: Please keep this question while as its answer evolve with time.
The latest Version of the spec is (in June 2016) still in "draft"-status: https://www.khronos.org/registry/webcl/specs/latest/1.0/
No browser vendor seems to have implemented it or even having concrete plans to implement it at the moment.
For performance-intensive calculations WebAssembly is currently probably the better horse to place a bet on: http://webassembly.github.io/
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am working on an application to get historical stock data from yahoo finance csv api. I am having trouble creating a script that will get the current day and count back 23 weekdays (not counting weekends or holidays). The idea is that it will plug the two dates in at yahoo, get the historical data and then create a moving average. I am unsure how to do this using the date function though.
You could use the Moment.js library, if you are able to provide that to your page. You could use it to do something like this:
var today = moment();
var pastDate = today.subtract('days', 23);
// then do something with those two variables...
if you need them in a certain format before you pass them along, just call .format on them
getHistoricalData(today.format('YYYYMMDD'), pastDate.format('YYYYMMDD'));