Saturday, June 27, 2020

new mint version

I was reading https://blog.linuxmint.com/?p=3926, at the end of the page you will see a lot of donations in May.

I start wondering which country did donated max times. They already put the values, it is 14879 $ anyway I wrote a small code which works in console :)

        m=new Map();
jQuery('.entry-content img.flag').each(function() {
n = this.src.split('/').pop().substring(0,2);
if(isNaN(n)){
let count = m.get(n)
m.set(n, count ? count+1 : 1)
}
});
m[Symbol.iterator] = function* () {
yield* [...this.entries()].sort((a, b) => a[1] - b[1]);
}
for (let [key, value] of m) { // get data sorted
console.log(key + ' ' + value);
}

And the winner is USA :) you just need to open dev console, f12 is the shortcut key. and copy paste the code to see yourself. here is the screen gif
linux ming donations of may
How to run the code

No comments:

sony xperia 10 VI did not like the case

After iphone 16 I wanted to test an android and looks like sony xperia 10 VI is nice, which is 6.1 inches, but it was narrow and longer than...