Vytvorte Java Unit Converter

Nižšie uvedený skript definuje prevodník pre jednotky merania, ktoré pracujú s Javascript. Tento skript možno použiť lokálne v prehliadači bez potreby kódu servera.

// na konci zoznamu môžu byť pridané nové jednotky

// ak majú dve jednotky rovnaké číslo, prvý sa ignoruje

// ak majú dve jednotky rovnaký symbol, druhý sa ignoruje

// základné jednotky SI: meter, kilogram, druhý, ampér, Kelvin, mol, candela

// ex: hr = time = s => m ^ 0.kg ^ 0.s ^ 1.A ^ 0.K ^ 0.mol ^ 0.cd ^ 0

// ex: g = zrýchlenie = m / s ^ 2 => m ^ 1.kg ^ 0.s ^ -2.A ^ 0.K ^ 0.mol ^ 0.cd ^ 0

// ex: V = napätie = kg.m² / s³³ / A => m ^ 2.kg ^ 1.s ^ -3.A ^ -1.K ^ 0.mol ^ 0.cd ^ 0

all_units = new Array ();

all_units [0] = new Array ("jednotka", "symbol", "hodnota", "m", "kg", "s", "A", "K", "mol", "cd");

all_units [1] = nový Array ("g", "g", "0, 00000000006672", 3, -1, -2, 0, 0, 0, 0);

all_units [2] = new Array ("na", "na", "6.022169", 0, 0, 0, 0, 0, -1, 0);

all_units [3] = nový Array ("yocto", "yocto", 1E-024, 0, 0, 0, 0, 0, 0, 0);

all_units [4] = nový Array ("zepto", "zepto", 1E-021, 0, 0, 0, 0, 0, 0, 0);

all_units [5] = new Array ("atto", "atto", 1E-018, 0, 0, 0, 0, 0, 0, 0);

all_units [6] = new Array ("femto", "femto", 1E-015, 0, 0, 0, 0, 0, 0, 0);

all_units [7] = new Array ("pico", "pico", "0.000000000001", 0, 0, 0, 0, 0, 0, 0);

all_units [8] = new Array ("nano", "nano", "0.000000001", 0, 0, 0, 0, 0, 0, 0);

all_units [9] = new Array ("micro", "micro", "0.000001", 0, 0, 0, 0, 0, 0, 0);

all_units [10] = new Array ("milli", "milli", "0, 001", 0, 0, 0, 0, 0, 0, 0);

all_units [11] = new Array ("centi", "centi", "0, 01", 0, 0, 0, 0, 0, 0, 0);

all_units [12] = new Array ("deci", "deci", "0, 1", 0, 0, 0, 0, 0, 0, 0);

all_units [13] = new Array ("demi", "demi", "0, 5", 0, 0, 0, 0, 0, 0, 0);

all_units [14] = new Array ("semi", "semi", "0, 5", 0, 0, 0, 0, 0, 0, 0);

all_units [15] = nový Array ("kibi", "kibi", 8, 0, 0, 0, 0, 0, 0, 0);

all_units [16] = nový Array ("deca", "deca", 10, 0, 0, 0, 0, 0, 0, 0);

all_units [17] = new Array ("deka", "deka", 10, 0, 0, 0, 0, 0, 0, 0);

all_units [18] = nový Array ("mebi", "mebi", 22, 0, 0, 0, 0, 0, 0, 0);

all_units [19] = nový Array ("gibi", "gibi", 28, 0, 0, 0, 0, 0, 0, 0);

all_units [20] = nový Array ("tebi", "tebi", 42, 0, 0, 0, 0, 0, 0, 0);

all_units [21] = nový Array ("pebi", "pebi", 48, 0, 0, 0, 0, 0, 0, 0);

all_units [22] = nový Array ("exbi", "exbi", 62, 0, 0, 0, 0, 0, 0, 0);

all_units [23] = new Array ("hecto", "hecto", 100, 0, 0, 0, 0, 0, 0, 0);

all_units [24] = new Array ("kilo", "kilo", 1000, 0, 0, 0, 0, 0, 0, 0);

all_units [25] = nový Array ("mega", "Mega", 1000000, 0, 0, 0, 0, 0, 0, 0);

all_units [26] = new Array ("giga", "Giga", 1000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [27] = nový Array ("tera", "Tera", 1000000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [28] = nový Array ("peta", "Peta", 1E + 015, 0, 0, 0, 0, 0, 0, 0);

all_units [29] = nové pole ("exa", "Exa", 1E + 018, 0, 0, 0, 0, 0, 0, 0);

all_units [30] = nový Array ("zetta", "Zetta", 1E + 021, 0, 0, 0, 0, 0, 0, 0);

all_units [31] = new Array ("yotta", "Yotta", 1E + 024, 0, 0, 0, 0, 0, 0, 0);

all_units [32] = nový Array ("g0", "g0", "9.80665", 1, 0, -2, 0, 0, 0, 0);

all_units [33] = new Array ("stodola", "stodola", 1E-028, 2, 0, 0, 0, 0, 0, 0);

all_units [34] = new Array ("stodoly", "stodoly", 1E-028, 2, 0, 0, 0, 0, 0, 0);

all_units [35] = new Array ("are", "are", 100, 2, 0, 0, 0, 0, 0, 0);

all_units [36] = new Array ("ares", "ares", 100, 2, 0, 0, 0, 0, 0, 0);

all_units [37] = nový Array ("aker", "aker", "4046.8564224", 2, 0, 0, 0, 0, 0, 0);

all_units [38] = new Array ("acres", "acres", "4046.8564224", 2, 0, 0, 0, 0, 0, 0);

all_units [39] = new Array ("hektár", "hektár", 10000, 2, 0, 0, 0, 0, 0, 0);

all_units [40] = new Array ("hektáre", "hektáre", 10000, 2, 0, 0, 0, 0, 0, 0);

all_units [41] = new Array ("pf", "pf", "0.000000000001", - 2, -1, 4, 2, 0, 0, 0);

all_units [42] = new Array ("statfarad", "statfarad", "0.000000000001113", - 2, -1, 4, 2, 0, 0, 0);

all_units [43] = nový Array ("statfarads", "statfarads", "0.000000000001113", - 2, -1, 4, 2, 0, 0, 0);

all_units [44] = new Array ("uf", "uf", "0.000001", - 2, -1, 4, 2, 0, 0, 0);

all_units [45] = nový Array ("f", "f", 1, -2, -1, 4, 2, 0, 0, 0);

all_units [46] = nové pole ("farad", "farad", 1, -2, -1, 4, 2, 0, 0, 0);

all_units [47] = nové pole ("farads", "farads", 1, -2, -1, 4, 2, 0, 0, 0);

all_units [48] = nový Array ("abfarad", "abfarad", 1000000000, -2, -1, 4, 2, 0, 0, 0);

all_units [49] = nový Array ("abfarads", "abfarads", 1000000000, -2, -1, 4, 2, 0, 0, 0);

all_units [50] = nový Array ("elementárny náboj", "elementárny náboj", "1.6021892E-019", 0, 0, 1, 1, 0, 0, 0);

all_units [51] = nový Array ("eq", "eq", "1.6021892E-019", 0, 0, 1, 1, 0, 0, 0);

all_units [52] = nový Array ("statcoul", "statcoul", "0.0000000003336", 0, 0, 1, 1, 0, 0, 0);

all_units [53] = new Array ("statcoulomb", "statcoulomb", "0.0000000003336", 0, 0, 1, 1, 0, 0, 0);

all_units [54] = new Array ("statcoulombs", "statcoulombs", "0.0000000003336", 0, 0, 1, 1, 0, 0, 0);

all_units [55] = nový Array ("coul", "Coul", 1, 0, 0, 1, 1, 0, 0, 0);

all_units [56] = nový Array ("coulomb", "Coulomb", 1, 0, 0, 1, 1, 0, 0, 0);

all_units [57] = nový Array ("coulomb", "C", 1, 0, 0, 1, 1, 0, 0, 0);

all_units [58] = nový Array ("abcoul", "abcoul", 10, 0, 0, 1, 1, 0, 0, 0);

all_units [59] = nový Array ("abcoulomb", "abcoulomb", 10, 0, 0, 1, 1, 0, 0, 0);

all_units [60] = nový Array ("abcoulombs", "abcoulombs", 10, 0, 0, 1, 1, 0, 0, 0);

all_units [61] = nový Array ("mho", "mho", 1, -2, -1, 3, 2, 0, 0, 0);

all_units [62] = nový Array ("mhos", "mhos", 1, -2, -1, 3, 2, 0, 0, 0);

all_units [63] = nový Array ("siemens", "Siemens", 1, -2, -1, 3, 2, 0, 0, 0);

all_units [64] = new Array ("statamp", "statamp", "0.0000000003336", 0, 0, 0, 1, 0, 0, 0);

all_units [65] = nový Array ("statampere", "statampere", "0.0000000003336", 0, 0, 0, 1, 0, 0, 0);

all_units [66] = new Array ("statamperes", "statamperes", "0.0000000003336", 0, 0, 0, 1, 0, 0, 0);

all_units [67] = new Array ("statamps", "statamps", "0.0000000003336", 0, 0, 0, 1, 0, 0, 0);

all_units [68] = nový Array ("µA", "µA", "0.000001", 0, 0, 0, 1, 0, 0, 0);

all_units [69] = nové pole ("mA", "mA", "0, 001", 0, 0, 0, 1, 0, 0, 0);

all_units [70] = nový Array ("amp", "amp", 1, 0, 0, 0, 1, 0, 0, 0);

all_units [71] = new Array ("Ampere", "Ampere", 1, 0, 0, 0, 1, 0, 0, 0);

all_units [72] = nový Array ("Amperes", "Amperes", 1, 0, 0, 0, 1, 0, 0, 0);

all_units [73] = nový Array ("A", "A", 1, 0, 0, 0, 1, 0, 0, 0);

all_units [74] = new Array ("abamp", "abamp", 10, 0, 0, 0, 1, 0, 0, 0);

all_units [75] = nový Array ("abampere", "abampere", 10, 0, 0, 0, 1, 0, 0, 0);

all_units [76] = nové pole ("abamperes", "abamperes", 10, 0, 0, 0, 1, 0, 0, 0);

all_units [77] = new Array ("abamps", "abamps", 10, 0, 0, 0, 1, 0, 0, 0);

all_units [78] = new Array ("bit", "bit", 1, 0, 0, 0, 0, 0, 0, 0);

all_units [79] = new Array ("bity", "bity", 1, 0, 0, 0, 0, 0, 0, 0);

all_units [80] = new Array ("byte", "byte", 8, 0, 0, 0, 0, 0, 0, 0);

all_units [81] = new Array ("bytes", "bytes", 8, 0, 0, 0, 0, 0, 0, 0);

all_units [82] = nový Array ("kvintillionth", "quintillionth", 1E-018, 0, 0, 0, 0, 0, 0, 0);

all_units [83] = nové pole ("kvadrillionth", "quadrillionth", 1E-015, 0, 0, 0, 0, 0, 0, 0);

all_units [84] = new Array ("trillionth", "trillionth", "0.000000000001", 0, 0, 0, 0, 0, 0, 0);

all_units [85] = new Array ("miliardtina", "miliardtina", "0.000000001", 0, 0, 0, 0, 0, 0, 0);

all_units [86] = new Array ("milióntina", "milióntina", "0.000001", 0, 0, 0, 0, 0, 0, 0);

all_units [87] = new Array ("tisícina", "tisícina", "0, 001", 0, 0, 0, 0, 0, 0, 0);

all_units [88] = new Array ("%", "%", "0, 01", 0, 0, 0, 0, 0, 0, 0);

all_units [89] = new Array ("stotina", "stotina", "0, 01", 0, 0, 0, 0, 0, 0, 0);

all_units [90] = new Array ("percentá", "percentá", "0, 01", 0, 0, 0, 0, 0, 0, 0);

all_units [91] = new Array ("desiata", "desiata", "0, 1", 0, 0, 0, 0, 0, 0, 0);

all_units [92] = nový Array ("e", "e", "2.71828182845904", 0, 0, 0, 0, 0, 0, 0);

all_units [93] = new Array ("pi", "pi", "3.14159265358979", 0, 0, 0, 0, 0, 0, 0);

all_units [94] = nový Array ("sto", "sto", 100, 0, 0, 0, 0, 0, 0, 0);

all_units [95] = nové pole ("stovky", "stovky", 100, 0, 0, 0, 0, 0, 0, 0);

all_units [96] = nový Array ("hrubý", "hrubý", 144, 0, 0, 0, 0, 0, 0, 0);

all_units [97] = new Array ("tisíc", "tisíc", 1000, 0, 0, 0, 0, 0, 0, 0);

all_units [98] = nové pole ("tisíce", "tisíce", 1000, 0, 0, 0, 0, 0, 0, 0);

all_units [99] = new Array ("milión", "milión", 1000000, 0, 0, 0, 0, 0, 0, 0);

all_units [100] = new Array ("milióny", "milióny", 1000000, 0, 0, 0, 0, 0, 0, 0);

all_units [101] = nové pole ("miliarda", "miliarda", 1000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [102] = new Array ("miliardy", "miliardy", 1000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [103] = new Array ("bilión", "bilión", 1000000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [104] = new Array ("bilióny", "bilióny", 1000000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [105] = nové pole ("kvadrilióny", "kvadrilóny", 1E + 015, 0, 0, 0, 0, 0, 0, 0);

all_units [106] = nový Array ("kvadrilóny", "kvadrilóny", 1E + 015, 0, 0, 0, 0, 0, 0, 0);

all_units [107] = nový Array ("quintillion", "quintillion", 1E + 018, 0, 0, 0, 0, 0, 0, 0);

all_units [108] = nové pole ("kvintilóny", "kvintilóny", 1E + 018, 0, 0, 0, 0, 0, 0, 0);

all_units [109] = nový Array ("Ang", "Ang", "0.0000000001", 1, 0, 0, 0, 0, 0, 0);

all_units [110] = nový Array ("Angstrom", "Angstrom", "0.0000000001", 1, 0, 0, 0, 0, 0, 0);

all_units [111] = nový Array ("Angstroms", "Angstroms", "0.0000000001", 1, 0, 0, 0, 0, 0, 0);

all_units [112] = nový Array ("mikrón", "mikrón", "0, 000001", 1, 0, 0, 0, 0, 0, 0);

all_units [113] = new Array ("mm", "mm", "0, 001", 1, 0, 0, 0, 0, 0, 0);

all_units [114] = new Array ("µm", "µm", "0.000001", 1, 0, 0, 0, 0, 0, 0);

all_units [115] = new Array ("mil", "mil", "0.0000254", 1, 0, 0, 0, 0, 0, 0);

all_units [116] = new Array ("mils", "mils", "0.0000254", 1, 0, 0, 0, 0, 0, 0);

all_units [117] = new Array ("bod", "bod", "0.000352777777778", 1, 0, 0, 0, 0, 0, 0);

all_units [118] = new Array ("pica", "pica", "0.004233333333333", 1, 0, 0, 0, 0, 0, 0);

all_units [119] = nové pole ("cm", "cm", "0, 01", 1, 0, 0, 0, 0, 0, 0);

all_units [120] = nové pole ("in", "in", "0.0254", 1, 0, 0, 0, 0, 0, 0);

all_units [121] = new Array ("inch", "inch", "0.0254", 1, 0, 0, 0, 0, 0, 0);

all_units [122] = nové pole ("palce", "palce", "0, 0254", 1, 0, 0, 0, 0, 0, 0);

all_units [123] = new Array ("nohy", "nohy", "0.3048", 1.0.0, 0, 0, 0, 0);

all_units [124] = new Array ("foot", "foot", "0.3048", 1, 0, 0, 0, 0, 0, 0);

all_units [125] = new Array ("ft", "ft", "0.3048", 1, 0, 0, 0, 0, 0, 0);

all_units [126] = new Array ("yard", "yard", "0.9144", 1, 0, 0, 0, 0, 0, 0);

all_units [127] = new Array ("yardy", "yardy", "0, 9144", 1, 0, 0, 0, 0, 0, 0);

all_units [128] = nový Array ("m", "m", 1, 1, 0, 0, 0, 0, 0, 0);

all_units [129] = new Array ("meter", "meter", 1, 1, 0, 0, 0, 0, 0, 0);

all_units [130] = new Array ("metre", "metre", 1, 1, 0, 0, 0, 0, 0, 0);

all_units [131] = new Array ("fathom", "fathom", 18288, 1, 0, 0, 0, 0, 0, 0);

all_units [132] = new Array ("fathoms", "fathoms", 18288, 1, 0, 0, 0, 0, 0, 0);

all_units [133] = new Array ("perch", "perch", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [134] = new Array ("bidlá", "bidlá", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [135] = nové pole ("pole", "pole", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [136] = new Array ("póly", "póly", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [137] = nový Array ("tyč", "tyč", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [138] = new Array ("prúty", "prúty", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [139] = new Array ("furlong", "furlong", "201.168", 1, 0, 0, 0, 0, 0, 0);

all_units [140] = nový Array ("furlongs", "furlongs", "201.168", 1, 0, 0, 0, 0, 0, 0);

all_units [141] = new Array ("km", "km", 1000, 1, 0, 0, 0, 0, 0, 0);

all_units [142] = nový Array ("mi", "mi", "1609.344", 1, 0, 0, 0, 0, 0, 0);

all_units [143] = new Array ("míle", "míle", "1609.344", 1, 0, 0, 0, 0, 0, 0);

all_units [144] = nový Array ("míle", "míle", "1609.344", 1, 0, 0, 0, 0, 0, 0);

all_units [145] = new Array ("námorná míľa", "námorná míľa", 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [146] = new Array ("námorné míle", "námorné míle", 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [147] = nový Array ("nauticalmile", "nauticalmile", 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [148] = nový Array ("nauticalmiles", "nauticalmiles", 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [149] = nový Array ("NM", "NM", 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [150] = new Array ("rp", "rp", 6356912, 1, 0, 0, 0, 0, 0, 0);

all_units [151] = new Array ("re", "re", 6378388, 1, 0, 0, 0, 0, 0, 0);

all_units [152] = new Array ("astronomická jednotka", "astronomická jednotka", 149598000000, 1, 0, 0, 0, 0, 0, 0);

all_units [153] = nový Array ("au", "au", 149598000000, 1, 0, 0, 0, 0, 0, 0);

all_units [154] = nový Array ("svetelný rok", "svetelný rok", "9.46E + 015", 1, 0, 0, 0, 0, 0, 0);

all_units [155] = nový Array ("svetelné roky", "svetelné roky", "9.46E + 015", 1, 0, 0, 0, 0, 0, 0);

all_units [156] = new Array ("lightyear", "lightyear", "9.46E + 015", 1, 0, 0, 0, 0, 0, 0);

all_units [157] = new Array ("lightyears", "lightyears", "9.46E + 015", 1, 0, 0, 0, 0, 0, 0);

all_units [158] = new Array ("ly", "ly", "9.46E + 015", 1, 0, 0, 0, 0, 0, 0);

all_units [159] = new Array ("parsec", "parsec", "3.083E + 016", 1, 0, 0, 0, 0, 0, 0);

all_units [160] = nový Array ("parsecs", "parsecs", "3.083E + 016", 1, 0, 0, 0, 0, 0, 0);

all_units [161] = new Array ("rad", "rad", "0, 01", 2, 0, -2, 0, 0, 0, 0);

all_units [162] = nový Array ("rem", "rem", "0, 01", 2, 0, -2, 0, 0, 0, 0);

all_units [163] = nový Array ("sivý", "sivý", 1, 2, 0, -2, 0, 0, 0, 0);

all_units [164] = nové pole ("gy", "gy", 1, 2, 0, -2, 0, 0, 0, 0);

all_units [165] = new Array ("Sievert", "Sievert", 1, 2, 0, -2, 0, 0, 0, 0);

all_units [166] = new Array ("Sv", "Sv", 1, 2, 0, -2, 0, 0, 0, 0);

all_units [167] = nový Array ("abvolt", "abvolt", "0.00000001", 2, 1, -3, -1, 0, 0, 0);

all_units [168] = nový Array ("abvolts", "abvolts", "0.00000001", 2, 1, -3, -1, 0, 0, 0);

all_units [169] = nový Array ("µV", "µV", "0.000001", 2, 1, -3, -1, 0, 0, 0);

all_units [170] = nový Array ("mV", "mV", "0, 001", 2, 1, -3, -1, 0, 0, 0);

all_units [171] = nový Array ("V", "V", 1, 2, 1, -3, -1, 0, 0, 0);

all_units [172] = nové pole ("Volt", "Volt", 1, 2, 1, -3, -1, 0, 0, 0);

all_units [173] = nové pole ("volty", "volty", 1, 2, 1, -3, -1, 0, 0, 0);

all_units [174] = nový Array ("statvolt", "statvolt", "299.8", 2, 1, -3, -1, 0, 0, 0);

all_units [175] = nový Array ("statvolts", "statvolts", "299, 8", 2, 1, -3, -1, 0, 0, 0);

all_units [176] = nový Array ("elektrón-volt", "elektrón-volt", "1.60217733E-019", 2, 1, -2, 0, 0, 0, 0);

all_units [177] = nový Array ("elektrón-volty", "elektrón-volty", "1.60217733E-019", 2, 1, -2, 0, 0, 0, 0);

all_units [178] = nový Array ("electronvolt", "electronvolt", "1.60217733E-019", 2, 1, -2, 0, 0, 0, 0);

all_units [179] = nový Array ("electronvolts", "electronvolts", "1.60217733E-019", 2, 1, -2, 0, 0, 0, 0);

all_units [180] = nový Array ("ev", "eV", "1.60217733E-019", 2, 1, -2, 0, 0, 0, 0);

all_units [181] = nový Array ("mev", "meV", "0.000000000000160217733", 2, 1, -2, 0, 0, 0, 0);

all_units [182] = nový Array ("gev", "geV", "0, 000000000160217733", 2, 1, -2, 0, 0, 0, 0);

all_units [183] ​​= nový Array ("erg", "erg", "0.0000001", 2, 1, -2, 0, 0, 0, 0);

all_units [184] = new Array ("ergs", "ergs", "0.0000001", 2, 1, -2, 0, 0, 0, 0);

all_units [185] = nový Array ("teV", "teV", "0.000000160217733", 2, 1, -2, 0, 0, 0, 0);

all_units [186] = nový Array ("Joule", "J", 1, 2, 1, -2, 0, 0, 0, 0);

all_units [187] = nový Array ("joule", "Joule", 1, 2, 1, -2, 0, 0, 0, 0);

all_units [188] = nový Array ("joules", "Joules", 1, 2, 1, -2, 0, 0, 0, 0);

all_units [189] = nový Array ("cal", "Cal", 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [190] = nový Array ("kalórie", "Calorie", 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [191] = nový Array ("kalórie", "Calories", 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [192] = nový Array ("britská tepelná jednotka", "britská tepelná jednotka", "1055, 056", 2, 1, -2, 0, 0, 0, 0);

all_units [193] = nový Array ("britsko-tepelné jednotky", "britské termálne jednotky", "1055, 056", 2, 1, -2, 0, 0, 0, 0);

all_units [194] = nový Array ("britishthermalunit", "britishthermalunit", "1055.056", 2, 1, -2, 0, 0, 0, 0);

all_units [195] = nový Array ("britishthermalunits", "britishthermalunits", "1055.056", 2, 1, -2, 0, 0, 0, 0);

all_units [196] = new Array ("Btu", "Btu", "1055.056", 2, 1, -2, 0, 0, 0, 0);

all_units [197] = nový Array ("Btus", "Btus", "1055.056", 2, 1, -2, 0, 0, 0, 0);

all_units [198] = new Array ("kcal", "kcal", 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [199] = nový Array ("kwh", "kwh", 3600000, 2, 1, -2, 0, 0, 0, 0);

all_units [200] = nový Array ("dyne", "dyne", 10, 1, 1, -2, 0, 0, 0, 0);

all_units [201] = nové pole ("dynes", "dynes", 10, 1, 1, -2, 0, 0, 0, 0);

all_units [202] = nový Array ("gram-force", "gram-force", "0, 00980665", 1, 1, -2, 0, 0, 0, 0);

all_units [203] = nový Array ("gram-hmotnosť", "gram-hmotnosť", "0, 00980665", 1, 1, -2, 0, 0, 0, 0);

all_units [204] = nové pole ("unca-force", "unca-force", "0.278013850953781", 1, 1, -2, 0, 0, 0, 0);

all_units [205] = nový Array ("ozf", "ozf", "0.278013850953781", 1, 1, -2, 0, 0, 0, 0);

all_units [206] = new Array ("newton", "newton", 1, 1, 1, -2, 0, 0, 0, 0);

all_units [207] = nový Array ("N", "N", 1, 1, 1, -2, 0, 0, 0, 0);

all_units [208] = nový Array ("nt", "nt", 1, 1, 1, -2, 0, 0, 0, 0);

all_units [209] = nový Array ("lb", "lb", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [210] = nový Array ("lbf", "lbf", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [211] = nový Array ("lbs", "lbs", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [212] = nový Array ("libra", "libra", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [213] = nový Array ("libra-sila", "libra-sila", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [214] = nový Array ("váha libry", "hmotnosť libry", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [215] = nový Array ("libry", "libry", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [216] = nový Array ("libra-sila", "libra-sila", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [217] = nový Array ("kgf", "kgf", "9.80665", 1, 1, -2, 0, 0, 0, 0);

all_units [218] = new Array ("rpm", "rpm", "0.016666666666667", 0, 0, -1, 0, 0, 0, 0);

all_units [219] = new Array ("becquerel", "becquerel", 1, 0, 0, -1, 0, 0, 0, 0);

all_units [220] = nový Array ("Bq", "Bq", 1, 0, 0, -1, 0, 0, 0, 0);

all_units [221] = nový Array ("hertz", "hertz", 1, 0, 0, -1, 0, 0, 0, 0);

all_units [222] = nový Array ("Hz", "Hz", 1, 0, 0, -1, 0, 0, 0, 0);

all_units [223] = nový Array ("abhenry", "abhenry", "0.000000001", 2, 1, -2, -2, 0, 0, 0);

all_units [224] = nový Array ("abhenrys", "abhenrys", "0.000000001", 2, 1, -2, -2, 0, 0, 0);

all_units [225] = nový Array ("uH", "uH", "0, 000001", 2, 1, -2, -2, 0, 0, 0);

all_units [226] = nový Array ("mH", "mH", "0, 001", 2, 1, -2, -2, 0, 0, 0);

all_units [227] = nové pole ("Henry", "Henry", 1, 2, 1, -2, -2, 0, 0, 0);

all_units [228] = nový Array ("Henrys", "H", 1, 2, 1, -2, -2, 0, 0, 0);

all_units [229] = new Array ("stathenry", "stathenry", 898700000000, 2, 1, -2, -2, 0, 0, 0);

all_units [230] = nový Array ("stathenrys", "stathenrys", 898700000000, 2, 1, -2, -2, 0, 0, 0);

all_units [231] = new Array ("candela", "candela", 1, 0, 0, 0, 0, 0, 0, 1);

all_units [232] = new Array ("candelas", "candelas", 1, 0, 0, 0, 0, 0, 0, 1);

all_units [233] = new Array ("sviečka", "sviečka", 1, 0, 0, 0, 0, 0, 0, 1);

all_units [234] = new Array ("sviečky", "sviečky", 1, 0, 0, 0, 0, 0, 0, 1);

all_units [235] = new Array ("cd", "cd", 1, 0, 0, 0, 0, 0, 0, 1);

all_units [236] = nový Array ("gauss", "gauss", "0.0001", 1, 0, -2, -1, 0, 0, 0);

all_units [237] = nový Array ("tesla", "tesla", 1, 1, 0, -2, -1, 0, 0, 0);

all_units [238] = nový Array ("teslas", "T", 1, 1, 0, -2, -1, 0, 0, 0);

all_units [239] = nový Array ("maxwell", "maxwell", "0.00000001", 2, 1, -2, -1, 0, 0, 0);

all_units [240] = nový Array ("maxwells", "maxwells", "0.00000001", 2, 1, -2, -1, 0, 0, 0);

all_units [241] = nový Array ("wb", "Wb", 1, 2, 1, -2, -1, 0, 0, 0);

all_units [242] = nové pole ("weber", "weber", 1, 2, 1, -2, -1, 0, 0, 0);

all_units [243] = new Array ("webers", "webers", 1, 2, 1, -2, -1, 0, 0, 0);

all_units [244] = nový Array ("amu", "amu", "1.6605402E-027", 0, 1, 0, 0, 0, 0, 0);

all_units [245] = new Array ("atómová-hmotnostná jednotka", "atómová-hmotnostná jednotka", "1.6605402E-027", 0, 1, 0, 0, 0, 0, 0);

all_units [246] = nový Array ("atómové hmotnostné jednotky", "atómové hmotnostné jednotky", "1.6605402E-027", 0, 1, 0, 0, 0, 0, 0);

all_units [247] = nový Array ("u", "u", "1.6605402E-027", 0, 1, 0, 0, 0, 0, 0);

all_units [248] = new Array ("ug", "ug", "0.000000001", 0, 1, 0, 0, 0, 0, 0);

all_units [249] = new Array ("mg", "mg", "0.000001", 0, 1, 0, 0, 0, 0, 0);

all_units [250] = nový Array ("cg", "cg", "0.00001", 0, 1, 0, 0, 0, 0, 0);

all_units [251] = new Array ("grain", "grain", "0.0000648", 0, 1, 0, 0, 0, 0, 0);

all_units [252] = new Array ("zrná", "zrná", "0.0000648", 0, 1, 0, 0, 0, 0, 0);

all_units [253] = nový Array ("dg", "dg", "0.0001", 0, 1, 0, 0, 0, 0, 0);

all_units [254] = new Array ("karát", "karát", "0.0002", 0, 1, 0, 0, 0, 0, 0);

all_units [255] = new Array ("karáty", "karáty", "0, 0002", 0, 1, 0, 0, 0, 0, 0);

all_units [256] = new Array ("karat", "karat", "0.0002", 0, 1, 0, 0, 0, 0, 0);

all_units [257] = new Array ("karats", "karats", "0.0002", 0, 1, 0, 0, 0, 0, 0);

all_units [258] = new Array ("j-bod", "j-bod", "0, 0004", 0, 1, 0, 0, 0, 0, 0);

all_units [259] = new Array ("gm", "gm", "0, 001", 0, 1, 0, 0, 0, 0, 0);

all_units [260] = nový Array ("gram", "gram", "0, 001", 0, 1, 0, 0, 0, 0, 0);

all_units [261] = new Array ("gramy", "gramy", "0, 001", 0, 1, 0, 0, 0, 0, 0);

all_units [262] = new Array ("scruple", "scruple", "0.001296", 0, 1, 0, 0, 0, 0, 0);

all_units [263] = nový Array ("scruples", "scruples", "0.001296", 0, 1, 0, 0, 0, 0, 0);

all_units [264] = new Array ("pennyweight", "pennyweight", "0, 001555", 0, 1, 0, 0, 0, 0, 0);

all_units [265] = new Array ("pennyweights", "pennyweights", "0.001555", 0, 1, 0, 0, 0, 0, 0);

all_units [266] = new Array ("dram", "dram", "0.0017718451953125", 0, 1, 0, 0, 0, 0, 0);

all_units [267] = new Array ("drams", "drams", "0.0017718451953125", 0, 1, 0, 0, 0, 0, 0);

all_units [268] = new Array ("dag", "dag", "0, 01", 0, 1, 0, 0, 0, 0, 0);

all_units [269] = new Array ("unca", "unca", "0.028349523125", 0, 1, 0, 0, 0, 0, 0);

all_units [270] = new Array ("unce", "unce", "0.028349523125", 0, 1, 0, 0, 0, 0, 0);

all_units [271] = new Array ("oz", "oz", "0.028349523125", 0, 1, 0, 0, 0, 0, 0);

all_units [272] = nový Array ("ounce-troy", "ounce-troy", "0.031103", 0, 1, 0, 0, 0, 0, 0);

all_units [273] = nový Array ("ounces-troy", "ounces-troy", "0.031103", 0, 1, 0, 0, 0, 0, 0);

all_units [274] = nový Array ("troy-ounce", "troy-ounce", "0.031103", 0, 1, 0, 0, 0, 0, 0);

all_units [275] = new Array ("trójske unce", "trójske unce", "0.031103", 0, 1, 0, 0, 0, 0, 0);

all_units [276] = nový Array ("hg", "hg", "0, 1", 0, 1, 0, 0, 0, 0, 0);

all_units [277] = new Array ("troy-libra", "troy-libra", "0, 373", 0, 1, 0, 0, 0, 0, 0);

all_units [278] = new Array ("trójske libry", "trójske libry", "0, 373", 0, 1, 0, 0, 0, 0, 0);

all_units [279] = nový Array ("lbm", "lbm", "0.45359237", 0, 1, 0, 0, 0, 0, 0);

all_units [280] = new Array ("lbms", "lbms", "0.45359237", 0, 1, 0, 0, 0, 0, 0);

all_units [281] = nový Array ("hmotnosť libry", "hmotnosť libry", "0.45359237", 0.1.0.0.0.0.0);

all_units [282] = nový Array ("libra-hmotnosť", "libra-hmotnosť", "0, 45359237", 0, 1, 0, 0, 0, 0, 0);

all_units [283] = new Array ("kg", "kg", 1, 0, 1, 0, 0, 0, 0, 0);

all_units [284] = nový Array ("kameň", "kameň", "6.35029318", 0, 1, 0, 0, 0, 0, 0);

all_units [285] = new Pole ("kamene", "kamene", "6.35029318", 0, 1, 0, 0, 0, 0, 0);

all_units [286] = new Array ("slug", "slug", "14.5939029372064", 0, 1, 0, 0, 0, 0, 0);

all_units [287] = new Array ("slimáci", "slimáci", "14.5939029372064", 0, 1, 0, 0, 0, 0, 0);

all_units [288] = new Array ("stoweight", "stoweight", "45.359237", 0, 1, 0, 0, 0, 0, 0);

all_units [289] = new Array ("stoweights", "stoweights", "45.359237", 0, 1, 0, 0, 0, 0, 0);

all_units [290] = new Array ("short-ton", "short-ton", "907.18474", 0, 1, 0, 0, 0, 0, 0);

all_units [291] = new Array ("krátke tony", "krátke tony", "907.18474", 0, 1, 0, 0, 0, 0, 0);

all_units [292] = new Array ("ton", "ton", "907.18474", 0, 1, 0, 0, 0, 0, 0);

all_units [293] = nové pole ("tony", "tony", "907.18474", 0, 1, 0, 0, 0, 0, 0);

all_units [294] = new Array ("metric-ton", "metric-ton", 1000, 0, 1, 0, 0, 0, 0, 0);

all_units [295] = nové pole ("metrické tóny", "metrické tóny", 1000, 0, 1, 0, 0, 0, 0, 0);

all_units [296] = new Array ("tona", "tona", 1000, 0, 1, 0, 0, 0, 0, 0);

all_units [297] = new Array ("tony", "tony", 1000, 0, 1, 0, 0, 0, 0, 0);

all_units [298] = new Array ("long-ton", "long-ton", "1016.0469088", 0, 1, 0, 0, 0, 0, 0);

all_units [299] = new Array ("dlhé tony", "dlhé tony", "1016.0469088", 0, 1, 0, 0, 0, 0, 0);

all_units [300] = nový Array ("h", "h", "6.626196E-034", 2, 1, -3, 0, 0, 0, 0);

all_units [301] = nový Array ("W", "W", 1, 2, 1, -3, 0, 0, 0, 0);

all_units [302] = nový Array ("Watt", "Watt", 1, 2, 1, -3, 0, 0, 0, 0);

all_units [303] = nový Array ("Watts", "Watts", 1, 2, 1, -3, 0, 0, 0, 0);

all_units [304] = nová Array ("konská sila", "konská sila", "745, 69987158227", 2, 1, -3, 0, 0, 0, 0);

all_units [305] = nový Array ("hp", "hp", "745, 69987158227", 2, 1, -3, 0, 0, 0, 0);

all_units [306] = nové pole ("Pa", "Pa", 1, -1, 1, -2, 0, 0, 0, 0);

all_units [307] = new Array ("Pascal", "Pascal", 1, -1, 1, -2, 0, 0, 0, 0);

all_units [308] = nový Array ("torr", "torr", "133.322368421053", - 1, 1, -2, 0, 0, 0, 0);

all_units [309] = nový Array ("psi", "psi", "6894.75729316836", - 1, 1, -2, 0, 0, 0, 0);

all_units [310] = nový Array ("bar", "bar", 100000, -1, 1, -2, 0, 0, 0, 0);

all_units [311] = nový Array ("pruhy", "pruhy", 100000, -1, 1, -2, 0, 0, 0, 0);

all_units [312] = nový Array ("atm", "atm", 101325, -1, 1, -2, 0, 0, 0, 0);

all_units [313] = nové pole ("atmosféra", "atmosféra", 101325, -1, 1, -2, 0, 0, 0, 0);

all_units [314] = nový Array ("abohm", "abohm", "0.000000001", 2, 1, -3, -2, 0, 0, 0);

all_units [315] = nový Array ("abohms", "abohms", "0.000000001", 2, 1, -3, -2, 0, 0, 0);

all_units [316] = nový Array ("Ohm", "Ohm", 1, 2, 1, -3, -2, 0, 0, 0);

all_units [317] = nový Array ("Ohms", "Ohms", 1, 2, 1, -3, -2, 0, 0, 0);

all_units [318] = nový Array ("kilohm", "kilohm", 1000, 2, 1, -3, -2, 0, 0, 0);

all_units [319] = nový Array ("kilohms", "kilohms", 1000, 2, 1, -3, -2, 0, 0, 0);

all_units [320] = nový Array ("megohm", "megohm", 1000000, 2, 1, -3, -2, 0, 0, 0);

all_units [321] = nový Array ("megohms", "megohms", 1000000, 2, 1, -3, -2, 0, 0, 0);

all_units [322] = nový Array ("statohm", "statohm", 898700000000, 2, 1, -3, -2, 0, 0, 0);

all_units [323] = nový Array ("statohms", "statohms", 898700000000, 2, 1, -3, -2, 0, 0, 0);

all_units [324] = new Array ("kph", "kph", "0.277777777777778", 1, 0, -1, 0, 0, 0, 0);

all_units [325] = new Array ("fps", "fps", "0.3048", 1, 0, -1, 0, 0, 0, 0);

all_units [326] = nový Array ("mph", "mph", "0.44704", 1, 0, -1, 0, 0, 0, 0);

all_units [327] = new Array ("uzol", "kn", "0.514444444444444", 1, 0, -1, 0, 0, 0, 0);

all_units [328] = new Array ("uzly", "kt", "0.514444444444444", 1, 0, -1, 0, 0, 0, 0);

all_units [329] = nový Array ("mps", "mps", 1, 1, 0, -1, 0, 0, 0, 0);

all_units [330] = nový Array ("kps", "kps", 1000, 1, 0, -1, 0, 0, 0, 0);

all_units [331] = nový Array ("c", "c", 299792458, 1, 0, -1, 0, 0, 0, 0);

all_units [332] = nový Array ("rýchlosť svetla", "rýchlosť svetla", 299792458, 1, 0, -1, 0, 0, 0, 0);

all_units [333] = nový Array ("mol", "mol", 1, 0, 0, 0, 0, 0, 1, 0);

all_units [334] = nový Array ("mol", "mol", 1, 0, 0, 0, 0, 0, 1, 0);

all_units [335] = new Array ("moly", "moly", 1, 0, 0, 0, 0, 0, 1, 0);

all_units [336] = new Array ("stupeň-hodnosť", "stupeň-hodnosť", "0, 555555555555556", 0, 0, 0, 0, 0, 0, 0);

all_units [337] = new Array ("stupne-hodnosť", "stupne-hodnosť", "0, 555555555555556", 0, 0, 0, 0, 0, 0, 0);

all_units [338] = nový Array ("stupeň-kelvin", "stupeň-kelvin", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [339] = nový Array ("stupeň-kelvíny", "stupeň-kelvíny", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [340] = nový Array ("stupne-kelvin", "stupne-kelvin", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [341] = nový Array ("K", "K", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [342] = nový Array ("Kelvin", "Kelvin", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [343] = nový Array ("Kelvins", "Kelvins", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [344] = new Array ("ps", "ps", "0.000000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [345] = new Array ("psec", "psec", "0.000000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [346] = new Array ("psecs", "psecs", "0.000000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [347] = new Array ("ns", "ns", "0.000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [348] = new Array ("nsec", "nsec", "0.000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [349] = new Array ("nsecs", "nsecs", "0.000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [350] = new Array ("µs", "µs", "0.000001", 0, 0, 1, 0, 0, 0, 0);

all_units [351] = new Array ("µsec", "µsec", "0.000001", 0, 0, 1, 0, 0, 0, 0);

all_units [352] = new Array ("µsecs", "µsecs", "0.000001", 0, 0, 1, 0, 0, 0, 0);

all_units [353] = nové pole ("ms", "ms", "0, 001", 0, 0, 1, 0, 0, 0, 0);

all_units [354] = new Array ("msec", "msec", "0, 001", 0, 0, 1, 0, 0, 0, 0);

all_units [355] = nový Array ("msecs", "msecs", "0, 001", 0, 0, 1, 0, 0, 0, 0);

all_units [356] = new Array ("s", "s", 1, 0, 0, 1, 0, 0, 0, 0);

all_units [357] = nový Array ("sec", "sec", 1, 0, 0, 1, 0, 0, 0, 0);

all_units [358] = new Array ("second", "second", 1, 0, 0, 1, 0, 0, 0, 0);

all_units [359] = new Array ("sekundy", "sekundy", 1, 0, 0, 1, 0, 0, 0, 0);

all_units [360] = new Array ("secs", "secs", 1, 0, 0, 1, 0, 0, 0, 0);

all_units [361] = nové pole ("min", "min", 60, 0, 0, 1, 0, 0, 0, 0);

all_units [362] = nové pole ("min", "min", 60, 0, 0, 1, 0, 0, 0, 0);

all_units [363] = nový Array ("minute", "minute", 60, 0, 0, 1, 0, 0, 0, 0);

all_units [364] = new Array ("minúty", "minúty", 60, 0, 0, 1, 0, 0, 0, 0);

all_units [365] = new Array ("hour", "hour", 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [366] = new Array ("hours", "hours", 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [367] = nový Array ("hr", "hr", 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [368] = nové pole ("hrs", "hrs", 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [369] = nový Array ("deň", "deň", 86400, 0, 0, 1, 0, 0, 0, 0);

all_units [370] = new Array ("dni", "dni", 86400, 0, 0, 1, 0, 0, 0, 0);

all_units [371] = new Array ("week", "week", 604800, 0, 0, 1, 0, 0, 0, 0);

all_units [372] = new Array ("týždne", "týždne", 604800, 0, 0, 1, 0, 0, 0, 0);

all_units [373] = new Array ("wk", "wk", 604800, 0, 0, 1, 0, 0, 0, 0);

all_units [374] = new Array ("fortnight", "fortnight", 1209600, 0, 0, 1, 0, 0, 0, 0);

all_units [375] = new Array ("fortnights", "fortnights", 1209600, 0, 0, 1, 0, 0, 0, 0);

all_units [376] = new Array ("mon", "mon", 2629800, 0, 0, 1, 0, 0, 0, 0);

all_units [377] = new Array ("mons", "mons", 2629800, 0, 0, 1, 0, 0, 0, 0);

all_units [378] = new Array ("month", "month", 2629800, 0, 0, 1, 0, 0, 0, 0);

all_units [379] = new Array ("mesiace", "mesiace", 2629800, 0, 0, 1, 0, 0, 0, 0);

all_units [380] = new Array ("rok", "rok", 31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [381] = new Array ("roky", "roky", 31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [382] = nový Array ("yr", "yr", 31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [383] = nový Array ("yrs", "yrs", 31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [384] = nový Array ("skóre", "skóre", 631152000, 0, 0, 1, 0, 0, 0, 0);

all_units [385] = new Array ("score", "score", 631152000, 0, 0, 1, 0, 0, 0, 0);

all_units [386] = nový Array ("storočia", "storočia", 3155760000, 0, 0, 1, 0, 0, 0, 0);

all_units [387] = nový Array ("storočie", "storočie", 3155760000, 0, 0, 1, 0, 0, 0, 0);

all_units [388] = nový Array ("millenia", "millenia", 31557600000, 0, 0, 1, 0, 0, 0, 0);

all_units [389] = nový Array ("millenium", "millenium", 31557600000, 0, 0, 1, 0, 0, 0, 0);

all_units [390] = nový Array ("foot-libra", "foot-libra", "1.3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [391] = nový Array ("foot-libry", "nohy-libry", "1.3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [392] = nový Array ("footpound", "footpound", "1.3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [393] = nový Array ("footpounds", "footpounds", "1.3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [394] = nový Array ("ft-lb", "ft-lb", "1.3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [395] = nový Array ("ftlb", "ftlb", "1.3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [396] = new Array ("minim", "minim", "0.000000059194", 3, 0, 0, 0, 0, 0, 0);

all_units [397] = new Array ("minims", "minims", "0.000000059194", 3, 0, 0, 0, 0, 0, 0);

all_units [398] = new Array ("cc", "cc", "0.000001", 3, 0, 0, 0, 0, 0, 0);

all_units [399] = nový Array ("ml", "ml", "0, 000001", 3, 0, 0, 0, 0, 0, 0);

all_units [400] = nový Array ("fluidram", "fluidram", "0.0000035516", 3, 0, 0, 0, 0, 0, 0);

all_units [401] = nový Array ("fluidrams", "fluidrams", "0.0000035516", 3, 0, 0, 0, 0, 0, 0);

all_units [402] = new Array ("čajová lyžička", "čajová lyžička", "0.00000492892159375", 3, 0, 0, 0, 0, 0, 0);

all_units [403] = new Array ("čajové lyžičky", "čajové lyžičky", "0.00000492892159375", 3, 0, 0, 0, 0, 0, 0);

all_units [404] = nový Array ("tsp", "tsp", "0.00000492892159375", 3, 0, 0, 0, 0, 0, 0);

all_units [405] = new Array ("cl", "cl", "0.00001", 3, 0, 0, 0, 0, 0, 0);

all_units [406] = new Array ("polievková lyžica", "polievková lyžica", "0.00001478676478125", 3, 0, 0, 0, 0, 0, 0);

all_units [407] = new Array ("polievkové lyžice", "polievkové lyžice", "0.00001478676478125", 3, 0, 0, 0, 0, 0, 0);

all_units [408] = new Array ("tbsp", "tbsp", "0.00001478676478125", 3, 0, 0, 0, 0, 0, 0);

all_units [409] = new Array ("floz", "floz", "0.0000295735295625", 3, 0, 0, 0, 0, 0, 0);

all_units [410] = nový Array ("fluid-ounce", "fluid-ounce", "0.0000295735295625", 3, 0, 0, 0, 0, 0, 0);

all_units [411] = nový Array ("tekuté unce", "tekuté unce", "0, 0000295735295625", 3, 0, 0, 0, 0, 0, 0);

all_units [412] = nový Array ("fluidounce", "fluidounce", "0.0000295735295625", 3, 0, 0, 0, 0, 0, 0);

all_units [413] = new Array ("fluidounces", "fluidounces", "0.0000295735295625", 3, 0, 0, 0, 0, 0, 0);

all_units [414] = nový Array ("dl", "dl", "0.0001", 3, 0, 0, 0, 0, 0, 0);

all_units [415] = new Array ("gill", "gill", "0.00011829411825", 3, 0, 0, 0, 0, 0, 0);

all_units [416] = new Array ("žiabre", "žiabre", "0.00011829411825", 3, 0, 0, 0, 0, 0, 0);

all_units [417] = new Array ("pohár", "pohár", "0.0002365882365", 3, 0, 0, 0, 0, 0, 0);

all_units [418] = nový Array ("poháre", "poháre", "0.0002365882365", 3, 0, 0, 0, 0, 0, 0);

all_units [419] = new Array ("pint", "pint", "0.000473176473", 3, 0, 0, 0, 0, 0, 0);

all_units [420] = new Array ("pints", "pints", "0.000473176473", 3, 0, 0, 0, 0, 0, 0);

all_units [421] = new Array ("pt", "pt", "0.000473176473", 3, 0, 0, 0, 0, 0, 0);

all_units [422] = nový Array ("piaty", "piaty", "0.0007570823568", 3, 0, 0, 0, 0, 0, 0);

all_units [423] = new Array ("fifths", "fifths", "0.0007570823568", 3, 0, 0, 0, 0, 0, 0);

all_units [424] = new Array ("qt", "qt", "0.000946352946", 3, 0, 0, 0, 0, 0, 0);

all_units [425] = new Array ("quart", "quart", "0.000946352946", 3, 0, 0, 0, 0, 0, 0);

all_units [426] = new Array ("quart", "quarts", "0.000946352946", 3, 0, 0, 0, 0, 0, 0);

all_units [427] = new Array ("l", "l", "0, 001", 3, 0, 0, 0, 0, 0, 0);

all_units [428] = nový Array ("liter", "liter", "0, 001", 3, 0, 0, 0, 0, 0, 0);

all_units [429] = new Array ("L", "L", "0, 001", 3, 0, 0, 0, 0, 0, 0);

all_units[430] = new Array("gal", "gal", "0.003785411784", 3, 0, 0, 0, 0, 0, 0);

all_units[431] = new Array("gallon", "gallon", "0.003785411784", 3, 0, 0, 0, 0, 0, 0);

all_units[432] = new Array("gallons", "gallons", "0.003785411784", 3, 0, 0, 0, 0, 0, 0);

all_units[433] = new Array("peck", "peck", "0.007570823568", 3, 0, 0, 0, 0, 0, 0);

all_units[434] = new Array("pecks", "pecks", "0.007570823568", 3, 0, 0, 0, 0, 0, 0);

all_units[435] = new Array("bushel", "bushel", "0.030283294272", 3, 0, 0, 0, 0, 0, 0);

all_units[436] = new Array("bushels", "bushels", "0.030283294272", 3, 0, 0, 0, 0, 0, 0);

all_units[437] = new Array("Angstrom", "...", "1e-10", 1, 0, 0, 0, 0, 0, 0);

all_units[438] = new Array("Degree Celcius", "°C", 0, 0, 0, 0, 0, 1, 0, 0);

all_units[439] = new Array("Degree Farenheit", "°F", "1.8", 0, 0, 0, 0, 1, 0, 0);

all_units[440] = new Array("siemens", "S", 1, -2, -1, 3, 2, 0, 0, 0);

function min(a, b) {if (a

function max(a, b) {if (a>b) return(a); else return(b);}

function analyze(coef, str) //============================ splits units into fundamental SI units

{

var pos_dot;

var pos_slash;

var pos;

var unit;

var exponent;

var invert_next = 0;

var list_units_in = new Array;

var table_base = new Array(coef, 0, 0, 0, 0, 0, 0, 0);

str = str + ".";

var i = 0;

while(str.length > 1) // for every unit in the unit input string

{

pos_dot = str.indexOf(".");

pos_slash = str.indexOf("/");

if (pos_dot == -1 || pos_slash == -1)

pos = max(pos_dot, pos_slash);

inak

pos = min(max(pos_dot, 0), max(pos_slash, 0));

list_units_in[i] = str.substring(0, pos);

str=str.substring(pos+1, str.length);

pos_exp = list_units_in[i].indexOf("^");

if (pos_exp == -1) // if there is no exponent

{

unit = list_units_in[i];

exponent = 1;

}

else // there is an exponent

{

unit = list_units_in[i].substring(0, pos_exp);

exponent = list_units_in[i].substring(pos_exp+1, list_units_in[i].length);

}

// if there is a / after the unit, next exponent is to be inverted

if (invert_next) exponent = -exponent;

if (pos == pos_slash) invert_next=1; else invert_next=0;

table_base_unit = fetch_unit(unit); // get the SI equivalent of the selected unit

if (table_base_unit) // if found in the list

{

table_base[0] = table_base[0] * Math.pow(table_base_unit[2], exponent);

pre (j = 1; j <8; j ++) // na incrémentes expozíciách des unités de base

{

table_base [j] = table_base [j] + (exponent * table_base_unit [j + 2]);

}

}

else return (0); // Je tu problém

i = i + 1;

}

návratu (table_base);

}

function fetch_unit (symbol) // =========== načíta ekvivalenty SI jednotky.

{

k = 1;

while (all_units [k])

{

if (all_units [k] [1] == symbol) return (all_units [k]); // nájdené!

k = k + 1;

}

return (0); // nenájdené

}

funkcia exp_nice (string) // =============== nahrádza stránku ^ 2 znakom ²²

{

string = string.replace ("^ 2", "²");

string = string.replace ("^ 2", "²");

string = string.replace ("^ 2", "²");

string = string.replace ("^ 2", "²");

string = string.replace ("^ 3", "³");

string = string.replace ("^ 3", "³");

string = string.replace ("^ 3", "³");

vrátiť (string);

}

funkcia exp_clean (string) // ============ nahradiť ²² znakom ^ 2

{

string = string.replace ("²", "^ 2");

string = string.replace ("²", "^ 2");

string = string.replace ("²", "^ 2");

string = string.replace ("²", "^ 2");

string = string.replace ("³", "^ 3");

string = string.replace ("³", "^ 3");

string = string.replace ("³", "^ 3");

vrátiť (string);

}

funkcia display_unit (base_values, base) // =================== Zobrazovať výsledky

{

ak sú potrebné základné jednotky SI

{

var str_display = "";

pre (p = 1; p <8; p ++) pre m, kg, s, A, K, mol, cd

{

if (base_values ​​[p] == 1)

{

str_display = "." + all_units [0] [p + 2] + str_display;

}

if (base_values ​​[p]> 1)

{

str_display = "." + all_units [0] [p + 2] + "^" + base_values ​​[p] + str_display;

}

if (base_values ​​[p] == -1)

{

str_display = str_display + "/" + all_units [0] [p + 2];

}

if (base_values ​​[p] <-1)

{

str_display = str_display + "/" + all_units [0] [p + 2] + "^" + Math.abs (base_values ​​[p]);

}

}

if (str_display.substring (0, 1) == "/") // ak je prvý exponent záporný

str_display = "1" + str_display

inak

str_display = str_display.substring (1, str_display.length);

}

else // ponechať jednotky ako je

{

str_display = document.forms [0] .units_out.value;

}

str_display = exp_nice (str_display);

document.forms [0] .units_out.value = str_display;

document.forms [0] .quantity_out.value = base_values ​​[0];

}

function convert () // =============== hlavná funkcia

{

var units_base_in;

var units_base_out;

if (document.forms [0] .quantity_in.value == "") document.forms [0] .quantity_in.value = 1;

if (document.forms [0] .units_in.value == "") {document.forms [0] .units_in.value = "???"; východ;}

document.forms [0] .units_in.value = exp_clean (document.forms [0] .units_in.value);

document.forms [0] .units_out.value = exp_clean (document.forms [0] .units_out.value);

units_base_in = analýza (document.forms [0] .quantity_in.value, document.forms [0] .units_in.value);

if (document.forms [0] .units_out.value! = "") // ak sú pre výsledok požadované konkrétne jednotky

{

units_base_out = analyzovať (1, document.forms [0] .units_out.value);

if (units_base_out) // ak sa jednotky nachádzajú v databáze

{

if (units_base_out [1]! = units_base_in [1]

|| units_base_out [2]! = units_base_in [2]

|| units_base_out [3]! = units_base_in [3]

|| units_base_out [4]! = units_base_in [4]

|| units_base_out [5]! = units_base_in [5]

|| units_base_out [6]! = units_base_in [6]

|| units_base_out [7]! = units_base_in [7]) // ak jednotky nie sú kompatibilné

display_unit (units_base_in, 1);

else // všetko je v poriadku

{

units_base_in [0] = units_base_in [0] / units_base_out [0];

display_unit (units_base_in, 0);

}

}

else // jednotka sa nenašla

display_unit (units_base_in, 1);

}

inak // nie sú požadované žiadne špecifické jednotky

display_unit (units_base_in, 1);

}

function init_form () // ============ Inicializácia formulára

{

document.forms [0] .quantity_in.value = "";

document.forms [0] .units_in.value = "mph";

document.forms [0] .quantity_out.value = "";

document.forms [0] .units_out.value = "";

}

function list_units () // =========== Zobrazuje zoznam dostupných jednotiek na kliknutie

{

var n = 1;

var list = new Array;

while (all_units [n])

{

list [n-1] = all_units [n] [1];

n = n + 1;

}

list.sort ();

n = 0;

zatiaľ čo (zoznam [n])

{

document.write (" ");

document.write (zoznam [n]);

document.write (", ");

n = n + 1;

}

}

// ============= Koniec skriptov

Univerzálny konvertor

td {font-family: Arial; veľkosť písma: 10px; zarovnanie textu: stred;}

.red {color: # ff0000;}


'onClick = "Javascript: convert ();">

1mph Príklady

polia v čiernej farbe

sú vyplnené užívateľom

polia v červenej farbe

výsledky

0, 44704pani
1mi / h0, 44704pani
1mi.hr ^ -10, 44704pani
1mph1.609344km / h
9kilo.m / h250centi.m / s
1.2345e + 8mph55187088pani
1mph1.4911649311738188e-9C
1cm.kg/min^2/ÂμA^22.777, 77777777777H / mm
1cm.kg/min^2/ÂμA^22777777.77777777m.kg/s²/A²


Pomocník: Jednotky musia byť oddelené bodkami (.) Alebo lomkami (/). Priestor nie je separátorom. Exponenty môžu byť použité so symbolom ^ a môžu byť pozitívne alebo negatívne. Výnimky ²² a ³ sú povolené. Ak cieľové jednotky nie sú dodané alebo sú nekompatibilné so zdrojovými jednotkami, hodnoty sa prevedú na základné jednotky SI. Jednotky rozlišujú veľké a malé písmená. Hodnoty môžu byť dodané vo vedeckom formáte.


init_form ();

list_units ();


O univerzálny konvertor: Tento Javascript konvertor je k dispozícii ako samostatný súbor, ktorý možno použiť online alebo offline. Môže byť kopírovaný a distribuovaný voľne, pokiaľ je táto zmienka viditeľná. (see the source code for information on how to declare new units). Chyby, návrhy a nové jednotky je možné odoslať na [email protected] (informácie o spôsobe deklarovania nových jednotiek nájdete v zdrojovom kóde).

Obrázok: © Značky a symboly - Shutterstock.com

Predchádzajúci Článok Nasledujúci Článok

Najlepšie Tipy