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

"I need to sort an array of songs by the top 5 bands with most songs" [closed]

sort an array by top 5I have created an object Playlist with an array of songs, I need a method that returns an array with songs only from the five top artists, I honestly have tried different...

View Article


Whitelist / Blocking with chrome.webRequest

so I've been trying to add whitelist ability to chrome extension, where that list can be updated via or whitelist can be totally disabled.After checking the documentation and all possible answers here,...

View Article


Serving json data on Javascript with flask

i want to serve my csv data to google charts for bubble chart on google, but i have little problem, i cannot create a arrayThis is my python data``` python_data = { 'some_list': ["USA", "CN", "EU"],...

View Article

Cannot get rid of "Warning: Each child in a list should have a unique "key"...

This question already has an answer here:Warning: Each child in an array or iterator should have a unique “key” prop. Check the render method of `ListView` 14 answersCan't get rid of "Warning: Each...

View Article

TypeError: Translate is not a function Google Cloud Translation API v5.0.1

I am unable to instantiate a translate object according to the documentation found here https://googleapis.dev/nodejs/translate/latest/index.htmlI have looked at this question but the answers don't...

View Article


What is the best way to check if a windows user has privileges to write to a...

I am trying to validate a directory path. All I need is to throw an error in case if folder is not accessible at all or user has no write permissions. I need to run the validation synchronously. The...

View Article

trying to redirect to some page when pressing browser back button but not...

Below is my code:window.addEventListener("beforeunload", function(event) { <br/> event.preventDefault(); <br/> event.returnValue = ''; <br/> window.location.href =...

View Article

How to find the reason of "Cannot find module" for nrwl modules?

I use nrwl.io in my project.I created several libs: ng g lib rest //ok ng g lib services //ok ng g lib models //created ok, but "Cannot find module " later on! All of these libs were successfully...

View Article


Image may be NSFW.
Clik here to view.

I want to play next video automatically after current video is over

I have several videos on my page I want to play the next video automatically if the current video is over.My code:<div class="container-fluid"> <br><br><br><br> <div...

View Article


How in JS to group subarrays by common elements

I have an array of subarrays. Each subarray has at least one element which is duplicated at least in one more subarray. For example:[ ['aaa', 'bbb', 'ccc'], ['ddd', 'aaa'], ['aaa', 'bbb', 'ccc',...

View Article

How to create bookmark system using existing heading tag in HTML page through...

I want to create a bookmark system using headings which are present in my HTML document. I want to do that using heading hierarchy. My headings are like below. I tried it but failed. enter image...

View Article

Unable to loop through a string to find regex pattern number

I'm trying to make an app where a client will search some string in a textarea and that string will be looped through to find an IP address. If it finds an IP then it will take its value and use it in...

View Article

Row ID is undefined for new added row in datatables?

I think this is repeated question, but i see all answers and nothing clear ? I used datatables in my MVC app and everything work perfectly , till i add new row to this datatable...

View Article


How to delete full duplicate values from JSON

I have 2 JSON objects as obj1 = [ { "start": "2019-11-15T00:00:00", "end": "2019-11-15T23:59:59", "Room Night": "2019-11-15" }, { "start": "2019-11-13T00:00:00", "end": "2019-11-13T23:59:59", "Room...

View Article

Ternary operator not working properly in JS [closed]

I am stuck in a very strange situation. I am running the following code and getting weird results. var a = 1, b =2 ,c = 3; console.log(5*a+ b>0?b:c); Expected result was : 7 but getting 2.

View Article


If my Angular Controller is not using any $scope, then how do i do 2 way data...

I have been using Angular without $scopeController:angular .module('app') .controller('requestController', requestController); requestController.$inject = ['$location','requestService']; function...

View Article

How to convert html,css,script into a javascript

I am created a custom web chat widget using html,css,javascript and ajax calls.I want to convert or generate into a script that script is placed in any other websites or webpages that widget is loaded...

View Article


How can I set auto-width/length on text input field?

I'm getting the value of a Stripe transaction fee and displaying it via a disabled text field.There is a large gap in the sentence due to the input text fieldThis is the amount $3.50____________that...

View Article

Node.js loop on API calls

I am trying to get few API calls with different parameters. Get the data and convert it into CSV file by day, city highest temp, city lowest temp and cities with rain.I have the following Object with...

View Article

How to enter values on an HTML webpage and use them to calculate using java...

Here is what I want to do: I have created a HTML webpage and I want to enter 2 values. When I press submit I want to get those values to eclipse, assign them as variable values and use them to...

View Article
Browsing all 138134 articles
Browse latest View live


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