This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.sun.jna.platform.win32.GDI32; | |
import com.sun.jna.platform.win32.WinDef; | |
import java.awt.Toolkit; | |
import java.math.BigDecimal; | |
import java.math.RoundingMode; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.ScheduledExecutorService; | |
import java.util.concurrent.TimeUnit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns the aspect ratio in "X:Y" format of given width and height | |
* e.g. getAspectRatio(1024, 768) > "4:3" | |
* e.g. getAspectRatio(1920, 1080) > "16:9" | |
* e.g. getAspectRatio(3440, 1440) > "21:9" | |
* <p> | |
* This function also works for 1366, 768 which is mathematically not 16:9, but marketed as such. | |
* | |
* @param width e.g. 1920 | |
* @param height e.g. 1080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
["AA", "AB", "AC", "AD", "AE", "AF", "AG", "AH", "AI", "AJ", "AK", "AL", "AM", "AN", "AO", "AP", "AQ", "AR", "AS", "AT", "AU", "AV", "AW", "AX", "AY", "AZ", "BA", "BB", "BC", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BK", "BL", "BM", "BN", "BO", "BP", "BQ", "BR", "BS", "BT", "BU", "BV", "BW", "BX", "BY", "BZ", "CA", "CB", "CC", "CD", "CE", "CF", "CG", "CH", "CI", "CJ", "CK", "CL", "CM", "CN", "CO", "CP", "CQ", "CR", "CS", "CT", "CU", "CV", "CW", "CX", "CY", "CZ", "DA", "DB", "DC", "DD", "DE", "DF", "DG", "DH", "DI", "DJ", "DK", "DL", "DM", "DN", "DO", "DP", "DQ", "DR", "DS", "DT", "DU", "DV", "DW", "DX", "DY", "DZ", "EA", "EB", "EC", "ED", "EE", "EF", "EG", "EH", "EI", "EJ", "EK", "EL", "EM", "EN", "EO", "EP", "EQ", "ER", "ES", "ET", "EU", "EV", "EW", "EX", "EY", "EZ", "FA", "FB", "FC", "FD", "FE", "FF", "FG", "FH", "FI", "FJ", "FK", "FL", "FM", "FN", "FO", "FP", "FQ", "FR", "FS", "FT", "FU", "FV", "FW", "FX", "FY", "FZ", "GA", "GB", "GC", "GD", "GE", "GF", "GG", "GH", "GI", "GJ", "GK", "GL", "GM", "GN", "GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{"alpha_2":"AD","alpha_3":"AND","name":"Andorra"}, | |
{"alpha_2":"AE","alpha_3":"ARE","name":"United Arab Emirates"}, | |
{"alpha_2":"AF","alpha_3":"AFG","name":"Afghanistan"}, | |
{"alpha_2":"AG","alpha_3":"ATG","name":"Antigua and Barbuda"}, | |
{"alpha_2":"AI","alpha_3":"AIA","name":"Anguilla"}, | |
{"alpha_2":"AL","alpha_3":"ALB","name":"Albania"}, | |
{"alpha_2":"AM","alpha_3":"ARM","name":"Armenia"}, | |
{"alpha_2":"AO","alpha_3":"AGO","name":"Angola"}, | |
{"alpha_2":"AR","alpha_3":"ARG","name":"Argentina"}, |