covid note

 Today I prepared a small statistics about countries and their dead toll by case numbers. here is the result. rightest column shows how many died in percentage. if numbers goes like this it shows that 3.5 percent of world will die from covid, it makes 260 million, hopefully they find a vaccine.


World 22325128 784748 3.52
1 USA 5656204 175087 3.10
2 Brazil 3411872 110019 3.22
3 India 2768670 53026 1.92
4 Russia 937321 15989 1.71
5 South Africa 592144 12264 2.07
6 Peru 549321 26658 4.85
7 Mexico 531239 57774 10.88
8 Colombia 489122 15619 3.19
9 Chile 388855 10546 2.71
10 Spain 384270 28670 7.46
11 Iran 347835 19972 5.74
12 UK 320286 41381 12.92
13 Argentina 305966 6048 1.98
14 Saudi Arabia 301323 3470 1.15
15 Pakistan 290445 6201 2.13
16 Bangladesh 282344 3740 1.32
17 Italy 254636 35405 13.90
18 Turkey 251805 6016 2.39
19 Germany 228105 9305 4.08
20 France 221267 30451 13.76
21 Iraq 184709 6036 3.27
22 Philippines 173774 2795 1.61
23 Indonesia 144945 6346 4.38
24 Canada 123154 9045 7.34
25 Qatar 115661 193 0.17
26 Kazakhstan 103571 1415 1.37
27 Bolivia 103019 4172 4.05
28 Ecuador 102941 6105 5.93
29 Israel 96996 719 0.74
30 Egypt 96753 5184 5.36
31 Ukraine 96403 2144 2.22
32 Dominican Republic 87123 1489 1.71
33 Sweden 85219 5790 6.79
34 China 84888 4634 5.46
35 Oman 83418 597 0.72
36 Panama 82790 1809 2.19
37 Belgium 78897 9959 12.62
38 Kuwait 77470 505 0.65
39 Romania 72208 3074 4.26
40 Belarus 69673 617 0.89
41 UAE 64906 366 0.56
42 Netherlands 63973 6175 9.65
43 Guatemala 63847 2419 3.79
44 Poland 58611 1913 3.26
45 Japan 56685 1115 1.97
46 Singapore 56031 27 0.05
47 Portugal 54448 1784 3.28
48 Honduras 51670 1593 3.08
49 Nigeria 49895 981 1.97
50 Bahrain 47581 175 0.37
51 Morocco 44803 714 1.59
52 Ghana 42993 248 0.58
53 Kyrgyzstan 42146 1498 3.55
54 Armenia 42056 833 1.98
55 Algeria 39444 1391 3.53
56 Switzerland 38449 1992 5.18
57 Afghanistan 37599 1375 3.66
58 Uzbekistan 36518 243 0.67
59 Venezuela 35697 297 0.83
60 Azerbaijan 34474 509 1.48
61 Ethiopia 32722 572 1.75
62 Moldova 30789 908 2.95
63 Kenya 30636 487 1.59
64 Serbia 29890 681 2.28
65 Costa Rica 29643 314 1.06
66 Nepal 28257 114 0.40
67 Ireland 27499 1775 6.45
68 Austria 24084 729 3.03
69 Australia 23993 450 1.88
70 El Salvador 23462 625 2.66
71 Czechia 20483 401 1.96
72 Cameroon 18599 406 2.18
73 Palestine 17306 113 0.65
74 Ivory Coast 17150 110 0.64
75 Bosnia and Herzegovina 16351 495 3.03
76 S. Korea 16058 306 1.91
77 Denmark 15855 621 3.92
78 Bulgaria 14669 519 3.54
79 Madagascar 14009 173 1.23
80 North Macedonia 12970 549 4.23
81 Sudan 12546 808 6.44
82 Senegal 12305 256 2.08
83 Paraguay 10606 161 1.52
84 Norway 10111 262 2.59
85 Zambia 9981 264 2.65
86 Lebanon 9758 107 1.10
87 DRC 9721 243 2.50
88 Malaysia 9235 125 1.35
89 Libya 9068 164 1.81
90 Guinea 8715 52 0.60
91 French Guiana 8657 53 0.61
92 Gabon 8270 53 0.64
93 Tajikistan 8131 65 0.80
94 Haiti 7921 196 2.47
95 Finland 7776 334 4.30
96 Albania 7654 232 3.03
97 Luxembourg 7499 124 1.65
98 Greece 7472 232 3.10
99 Croatia 6855 166 2.42
100 Mauritania 6789 157 2.31
101 Maldives 6079 24 0.39
102 Zimbabwe 5378 141 2.62
103 Djibouti 5374 59 1.10
104 Malawi 5193 163 3.14
105 Hungary 5002 609 12.18
106 Equatorial Guinea 4821 83 1.72
107 CAR 4679 61 1.30
108 Hong Kong 4587 72 1.57
109 Namibia 4464 37 0.83
110 Nicaragua 4311 133 3.09
111 Montenegro 4132 80 1.94
112 Eswatini 3989 76 1.91
113 Congo 3831 76 1.98
114 Cuba 3408 88 2.58
115 Thailand 3382 58 1.71
116 Somalia 3257 93 2.86
117 Cabo Verde 3253 36 1.11
118 Suriname 3216 54 1.68
119 Mayotte 3160 39 1.23
120 Slovakia 3022 33 1.09
121 Mozambique 2991 19 0.64
122 Sri Lanka 2902 11 0.38
123 Mali 2666 125 4.69
124 Rwanda 2577 10 0.39
125 Lithuania 2496 81 3.25
126 Slovenia 2493 129 5.17
127 South Sudan 2490 47 1.89
128 Tunisia 2314 57 2.46
129 Estonia 2207 63 2.85
130 Guinea-Bissau 2117 33 1.56
131 Gambia 2116 63 2.98
132 Benin 2063 39 1.89
133 Iceland 2027 10 0.49
134 Angola 1966 90 4.58
135 Sierra Leone 1959 69 3.52
136 Yemen 1889 537 28.43
137 Syria 1844 73 3.96
138 New Zealand 1649 22 1.33
139 Uganda 1603 15 0.94
140 Uruguay 1485 40 2.69
141 Jordan 1438 11 0.76
142 Bahamas 1424 20 1.40
143 Malta 1423 9 0.63
144 Georgia 1361 17 1.25
145 Cyprus 1359 20 1.47
146 Latvia 1326 33 2.49
147 Botswana 1308 3 0.23
148 Liberia 1282 82 6.40
149 Burkina Faso 1280 55 4.30
150 Aruba 1205 4 0.33
151 Togo 1173 27 2.30
152 Niger 1167 69 5.91
153 Jamaica 1146 14 1.22
154 Andorra 1005 53 5.27
155 Vietnam 989 26 2.63
156 Chad 970 76 7.84
157 Lesotho 946 30 3.17
158 Réunion 903 5 0.55
159 Sao Tome and Principe 885 15 1.69
160 Guyana 737 25 3.39
161 Diamond Princess 712 13 1.83
162 San Marino 702 42 5.98
163 Trinidad and Tobago 629 12 1.91
164 Channel Islands 609 47 7.72
165 Belize 553 4 0.72
166 Guadeloupe 510 15 2.94
167 Tanzania 509 21 4.13
168 Taiwan 486 7 1.44
169 Burundi 416 1 0.24
170 Comoros 406 7 1.72
171 Faeroe Islands 377
0.00
172 Myanmar 376 6 1.60
173 Papua New Guinea 347 3 0.86
174 Mauritius 346 10 2.89
175 Isle of Man 336 24 7.14
176 Martinique 336 16 4.76
177 Sint Maarten 333 17 5.11
178 Turks and Caicos 315 2 0.63
179 Eritrea 304
0.00
180 Mongolia 298
0.00
181 Cambodia 273
0.00
182 Gibraltar 222
0.00
183 French Polynesia 211
0.00
184 Cayman Islands 203 1 0.49
185 Bermuda 166 9 5.42
186 Barbados 153 7 4.58
187 Monaco 148 4 2.70
188 Bhutan 147
0.00
189 Brunei 143 3 2.10
190 Seychelles 127
0.00
191 Saint Martin 121 5 4.13
192 Liechtenstein 97 1 1.03
193 Antigua and Barbuda 93 3 3.23
194 St. Vincent Grenadines 58
0.00
195 Macao 46
0.00
196 Curaçao 36 1 2.78
197 Fiji 28 1 3.57
198 Saint Lucia 26
0.00
199 Timor-Leste 25
0.00
200 Grenada 24
0.00
201 New Caledonia 23
0.00
202 Laos 22
0.00
203 Dominica 18
0.00
204 Saint Kitts and Nevis 17
0.00
205 St. Barth 16
0.00
206 Greenland 14
0.00
207 Montserrat 13 1 7.69
208 Caribbean Netherlands 13
0.00
209 Falkland Islands 13
0.00
210 Vatican City 12
0.00
211 British Virgin Islands 11 1 9.09
212 Western Sahara 10 1 10.00
213 MS Zaandam 9 2 22.22
214 Saint Pierre Miquelon 5
0.00
215 Anguilla 3
0.00

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

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 Studio2019CommunityVCAuxiliaryBuildvcvars64.bat”
And other environment variables
C:Usersozkan>mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:ProgramDatachocolateylibmavenapache-maven-3.6.3bin..
Java version: 14.0.1, vendor: Oracle Corporation, runtime: C:Program FilesOpenJDKjdk-14.0.1
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

C:Usersozkan>echo %GRAALVM_HOME%
C:Program FilesGraalVMgraalvm-ce-java11-20.1.0

C:Usersozkan>echo %JAVA_HOME%
C:Program FilesOpenJDKjdk-14.0.1

Spring-boot vs Quarkus

I have been using springboot remote command runner from  ozkanpakdil/CommandRunner around 2 years. And last week I had a chance to play with quarkus. And I really like the startup time and speed of development is two times faster.

So I decided to write same command runner with quarkus and see how it works. ozkanpakdil/quarkus-command-runner 

Only difference is in spring I used hazelcast and in quarkus I used ehcache. Because hazelcast configuration was not easy as in spring-boot.

Then I decided to install haproxy and run these 2 microservices behind it. You can see the configuration here

I must say the “command” running at linux side sometimes takes longer then 60 seconds so I gave haproxy longer timeout instructions. here is the haproxy admin

According to numbers spring having downtimes. actually those are times when springboot responds slower then expected. and quarkus has longer uptime.

Conclusion: Quarkus is nice and reliable fast solution for microservices. I cant say faster then spring. after all this was just a small use case.

some study

I decided to study in hackerrank these days. just for practice and think more. for this question

https://www.hackerrank.com/challenges/staircase

java 7 solution


 at least there is not two for loop :)

google city are searches

I did not know this feature of google. I used to live in istanbul now in wroclaw. and I was wondering how small this city is. and search wroclow city are in google

https://www.google.pl/search?q=wroclaw+city+area

https://www.google.pl/search?q=istanbul+city+area

5343 km square is huge. population and traffic huge too. but I am happy with my small wroclaw 🙂