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

Thursday, June 18, 2020

Graalvm on windows 10

I have been trying to build graal vm native-image with quarkus for a long time now and I was having multiple errors. And finally made it last weekend. here what I installed.
MSVC tool and the sdk is important otherwise I was getting error related to some command or header not found.

and when I compile https://github.com/ozkanpakdil/quarkus-examples/tree/master/qute-test

Result was 27 mb :)

Important thing is user needs to run the mvn from special command prompt, otherwise cl.exe will not be found or may seen other errors



x64 Native Tools Command Prompt for VS 2019 or %comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"

And other environment variables

C:\Users\ozkan>mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.3\bin\..
Java version: 14.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\OpenJDK\jdk-14.0.1
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

C:\Users\ozkan>echo %GRAALVM_HOME%
C:\Program Files\GraalVM\graalvm-ce-java11-20.1.0

C:\Users\ozkan>echo %JAVA_HOME%
C:\Program Files\OpenJDK\jdk-14.0.1

odd string diff

 https://leetcode.com/problems/odd-string-difference/ Beats 19.92% of users with Java   class Solution { public String oddString ( S...