“The unpopulated area of the Sahara desert is over 9 million km², which if covered with solar panels would provide 630 terawatts total power. The Earth’s current energy consumption rate is around 13.5 TW at any given moment (including oil, gas, coal, nuclear, and hydroelectric)” Source: Wikipedia.org
You may be running several independent but similar servers at the same time and wasting time by executing commands in all of them one by one. Wouldn’t it be nice to send a command to all of them at once? or to monitor all of them at once. The following script can be used as […]
/** * 1 + Floor(LogBase10(number)) * */ function digits(n) { return 1+Math.floor(Math.log(n)/Math.log(10)); } Yes, javascript doesn’t have a Math.log10() function. I tried doing it by dividing by Math.ln10 constant but the function won’t return the correct number of digits when you pass numbers like 100,1000,10000,etc. So I just divided by Math.log(10) and it seems to […]