I am drawing a canvas that needs to be on full available screen (100% width and height). I set the width and height of canvas using javascript like this    var w = window.innerWidth;   var h = window.innerHeight;   var canvas = document.getElementB...
I am interested in finding the credit card number whose digits sum to the largest number. If  more than one has the same largest sum of digits, I want the last one in the list with that sum.   I am trying to write a single function that takes one arg...
I am using jQuery Masonry to display a grid of boxes (all the same size).  Here is my testing site.  Works great when the browser width is 1100px or below.  When viewing it at 1270px and above, Masonry keeps adding columns on the right hand side.  I...
I have a series of input fields. I never know how many, so I need to get the value from a class. In this case the class is .total.  The bestresult is a text field that gets it's value from mysql, but I want it to be changed manually or by the hig...
I created a line chart in Highcharts and i want the maximum to be 19.  So i found the option max  yAxis: {    max: 19; }   But Highcharts rounds the max to 20 and i realy don't want this becouse 19 is the highest value posible for this variable....
I m trying to solve https://www.spoj.com/problems/FIBOSUM/ problem.  MOD = 1000000007;  function copy(a, b) {     a[0][0] = b[0][0];     a[0][1] = b[0][1];     a[1][0] = b[1][0];     a[1][1] = b[1][1];  }  function multiply(fib, base) {     let mat =...
When I detect keys being pressed with JavaScript in Mozilla Firefox 22, I am unable to detect any more than 3 keys being pressed when using document.onkeydown and document.onkeyup, setting each key to either true or false. My code is:  document.onkey...
Lets suppose I have object like this:  var obj = {a : 5, b : 10, c : 15, d : 20, e : 20, f : 25};   I would like to get top 3 highest values - notice that d and e key have the same value and I need to get the keys also, so it would looks like:     Hi...
I'm trying to find the largest and smallest value in an group of items with same attributes. For example from the screenshot, the max value for crop: 18157 would be 1.77 and the smallest 1.68  JsFiddle: https://jsfiddle.net/kf3qhsge/  var myCrops...
I try to make a little game but if I start it it says : Uncaught RangeError: Maximum call stack size exceeded"  What's wrong with my code? ;-)  function move(top,left){     y_ball = $('#ball').offset().top - $('#spielfeld').of...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.