Utwórz konwerter jednostek Java

Poniższy skrypt definiuje konwerter jednostek miary, które działają z Javascriptem. Ten skrypt może być używany lokalnie w przeglądarce, bez konieczności używania kodu serwera.

// nowe jednostki można dodać na końcu listy

// jeśli 2 jednostki mają ten sam [numer], pierwszy z nich jest ignorowany

// jeśli 2 jednostki mają ten sam symbol, drugi jest ignorowany

// podstawowe jednostki SI: metr, kilogram, drugi, amper, kelwin, mol, kandela

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

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

// ex: V = napięcie = 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] = nowa tablica („Jednostka”, „Symbol”, „Wartość”, „m”, „kg”, „s”, „A”, „K”, „mol”, „cd”);

all_units [1] = nowa tablica („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] = nowa tablica („yocto”, „yocto”, 1E-024, 0, 0, 0, 0, 0, 0, 0);

all_units [4] = nowa tablica („zepto”, „zepto”, 1E-021, 0, 0, 0, 0, 0, 0, 0);

all_units [5] = nowa tablica („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] = nowa tablica („pico”, „pico”, „0.000000000001”, 0, 0, 0, 0, 0, 0, 0);

all_units [8] = nowa tablica („nano”, „nano”, „0, 000000001”, 0, 0, 0, 0, 0, 0, 0);

all_units [9] = nowa tablica („mikro”, „mikro”, „0, 000001”, 0, 0, 0, 0, 0, 0, 0);

all_units [10] = nowa tablica („milli”, „milli”, „0, 001”, 0, 0, 0, 0, 0, 0, 0);

all_units [11] = nowa tablica („centi”, „centi”, „0.01”, 0, 0, 0, 0, 0, 0, 0);

all_units [12] = nowa tablica („deci”, „deci”, „0, 1”, 0, 0, 0, 0, 0, 0, 0);

all_units [13] = nowa tablica („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] = nowa tablica („kibi”, „kibi”, 8, 0, 0, 0, 0, 0, 0, 0);

all_units [16] = new 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] = new Array („mebi”, „mebi”, 22, 0, 0, 0, 0, 0, 0, 0);

all_units [19] = new Array („gibi”, „gibi”, 28, 0, 0, 0, 0, 0, 0, 0);

all_units [20] = new Array („tebi”, „tebi”, 42, 0, 0, 0, 0, 0, 0, 0);

all_units [21] = new Array („pebi”, „pebi”, 48, 0, 0, 0, 0, 0, 0, 0);

all_units [22] = nowa tablica („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] = new 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] = nowa tablica („tera”, „Tera”, 1000000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [28] = new Array („peta”, „Peta”, 1E + 015, 0, 0, 0, 0, 0, 0, 0);

all_units [29] = nowa tablica („exa”, „Exa”, 1E + 018, 0, 0, 0, 0, 0, 0, 0);

all_units [30] = new 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] = nowa tablica („g0”, „g0”, „9.80665”, 1, 0, -2, 0, 0, 0, 0);

all_units [33] = new Array („barn”, „barn”, 1E-028, 2, 0, 0, 0, 0, 0, 0);

all_units [34] = new Array („stodoły”, „stodoły”, 1E-028, 2, 0, 0, 0, 0, 0, 0);

all_units [35] = nowa tablica („są”, „są”, 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] = new Array („acre”, „acre”, „4046.8564224”, 2, 0, 0, 0, 0, 0, 0);

all_units [38] = nowa tablica („akry”, „akry”, „4046.8564224”, 2, 0, 0, 0, 0, 0, 0);

all_units [39] = nowa tablica („hektar”, „hektar”, 10000, 2, 0, 0, 0, 0, 0, 0);

all_units [40] = nowa tablica („hektary”, „hektary”, 10000, 2, 0, 0, 0, 0, 0, 0);

all_units [41] = nowa tablica („pf”, „pf”, „0, 000000000001”, - 2, -1, 4, 2, 0, 0, 0);

all_units [42] = nowa tablica („statfarad”, „statfarad”, „0.000000000001113”, - 2, -1, 4, 2, 0, 0, 0);

all_units [43] = nowa tablica („statfarads”, „statfarads”, „0.000000000001113”, - 2, -1, 4, 2, 0, 0, 0);

all_units [44] = nowa tablica („uf”, „uf”, „0, 000001”, - 2, -1, 4, 2, 0, 0, 0);

all_units [45] = nowa tablica („f”, „f”, 1, -2, -1, 4, 2, 0, 0, 0);

all_units [46] = nowa tablica („farad”, „farad”, 1, -2, -1, 4, 2, 0, 0, 0);

all_units [47] = new Array („farads”, „farads”, 1, -2, -1, 4, 2, 0, 0, 0);

all_units [48] = nowa tablica („abfarad”, „abfarad”, 1000000000, -2, -1, 4, 2, 0, 0, 0);

all_units [49] = nowa tablica („abfarads”, „abfarads”, 1000000000, -2, -1, 4, 2, 0, 0, 0);

all_units [50] = new Array („elementary-charge”, „elementary-charge”, „1.6021892E-019”, 0, 0, 1, 1, 0, 0, 0);

all_units [51] = nowa tablica („eq”, „eq”, „1.6021892E-019”, 0, 0, 1, 1, 0, 0, 0);

all_units [52] = nowa tablica („statcoul”, „statcoul”, „0.0000000003336”, 0, 0, 1, 1, 0, 0, 0);

all_units [53] = nowa tablica („statcoulomb”, „statcoulomb”, „0.0000000003336”, 0, 0, 1, 1, 0, 0, 0);

all_units [54] = nowa tablica („statcoulombs”, „statcoulombs”, „0.0000000003336”, 0, 0, 1, 1, 0, 0, 0);

all_units [55] = new Array („coul”, „Coul”, 1, 0, 0, 1, 1, 0, 0, 0);

all_units [56] = new Array („kulomb”, „Coulomb”, 1, 0, 0, 1, 1, 0, 0, 0);

all_units [57] = nowa tablica („kulomb”, „C”, 1, 0, 0, 1, 1, 0, 0, 0);

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

all_units [59] = nowa tablica („abcoulomb”, „abcoulomb”, 10, 0, 0, 1, 1, 0, 0, 0);

all_units [60] = new Array („abcoulombs”, „abcoulombs”, 10, 0, 0, 1, 1, 0, 0, 0);

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

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

all_units [63] = new 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] = nowa tablica („statampere”, „statampere”, „0.0000000003336”, 0, 0, 0, 1, 0, 0, 0);

all_units [66] = nowa tablica („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] = nowa tablica („µA”, „µA”, „0, 000001”, 0, 0, 0, 1, 0, 0, 0);

all_units [69] = nowa tablica („mA”, „mA”, „0, 001”, 0, 0, 0, 1, 0, 0, 0);

all_units [70] = new Array („amp”, „amp”, 1, 0, 0, 0, 1, 0, 0, 0);

all_units [71] = nowa tablica („Ampere”, „Ampere”, 1, 0, 0, 0, 1, 0, 0, 0);

all_units [72] = new Array („Amperes”, „Amperes”, 1, 0, 0, 0, 1, 0, 0, 0);

all_units [73] = nowa tablica („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] = new Array ("abampere", "abampere", 10, 0, 0, 0, 1, 0, 0, 0);

all_units [76] = new Array ("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] = nowa tablica („bit”, „bit”, 1, 0, 0, 0, 0, 0, 0, 0);

all_units [79] = nowa tablica („bity”, „bity”, 1, 0, 0, 0, 0, 0, 0, 0);

all_units [80] = new Array („bajt”, „bajt”, 8, 0, 0, 0, 0, 0, 0, 0);

all_units [81] = nowa tablica („bajty”, „bajty”, 8, 0, 0, 0, 0, 0, 0, 0);

all_units [82] = new Array („quintillionth”, „quintillionth”, 1E-018, 0, 0, 0, 0, 0, 0, 0);

all_units [83] = nowa tablica („biliardowa”, „biliardowa”, 1E-015, 0, 0, 0, 0, 0, 0, 0);

all_units [84] = nowa tablica („bilion”, „bilion”, „0, 000000000001”, 0, 0, 0, 0, 0, 0, 0);

all_units [85] = nowa tablica („miliard”, „miliard”, „0, 000000001”, 0, 0, 0, 0, 0, 0, 0);

all_units [86] = nowa tablica („milionowa”, „milionowa”, „0, 000001”, 0, 0, 0, 0, 0, 0, 0);

all_units [87] = nowa tablica („tysięczna”, „tysięczna”, „0, 001”, 0, 0, 0, 0, 0, 0, 0);

all_units [88] = nowa tablica („%”, „%”, „0, 01”, 0, 0, 0, 0, 0, 0, 0);

all_units [89] = nowa tablica („setna”, „setna”, „0, 01”, 0, 0, 0, 0, 0, 0, 0);

all_units [90] = nowa tablica („procent”, „procent”, „0, 01”, 0, 0, 0, 0, 0, 0, 0);

all_units [91] = nowa tablica („dziesiąta”, „dziesiąta”, „0, 1”, 0, 0, 0, 0, 0, 0, 0);

all_units [92] = nowa tablica („e”, „e”, „2.71828182845904”, 0, 0, 0, 0, 0, 0, 0);

all_units [93] = nowa tablica („pi”, „pi”, „3.14159265358979”, 0, 0, 0, 0, 0, 0, 0);

all_units [94] = new Array („sto”, „sto”, 100, 0, 0, 0, 0, 0, 0, 0);

all_units [95] = nowa tablica („setki”, „setki”, 100, 0, 0, 0, 0, 0, 0, 0);

all_units [96] = new Array („brutto”, „brutto”, 144, 0, 0, 0, 0, 0, 0, 0);

all_units [97] = nowa tablica („tysiąc”, „tysiąc”, 1000, 0, 0, 0, 0, 0, 0, 0);

all_units [98] = nowa tablica („tysiące”, „tysiące”, 1000, 0, 0, 0, 0, 0, 0, 0);

all_units [99] = nowa tablica („milion”, „milion”, 1000000, 0, 0, 0, 0, 0, 0, 0);

all_units [100] = nowa tablica („miliony”, „miliony”, 1000000, 0, 0, 0, 0, 0, 0, 0);

all_units [101] = nowa tablica („miliard”, „miliard”, 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] = nowa tablica („bilion”, „bilion”, 1000000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [104] = nowa tablica („biliony”, „biliony”, 1000000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [105] = nowa tablica („kwadrylion”, „biliard”, 1E + 015, 0, 0, 0, 0, 0, 0, 0);

all_units [106] = new Array („kwadryliony”, „kwadryliony”, 1E + 015, 0, 0, 0, 0, 0, 0, 0);

all_units [107] = nowa tablica („quintillion”, „quintillion”, 1E + 018, 0, 0, 0, 0, 0, 0, 0);

all_units [108] = new Array („quintillions”, „quintillions”, 1E + 018, 0, 0, 0, 0, 0, 0, 0);

all_units [109] = nowa tablica („Ang”, „Ang”, „0.0000000001”, 1, 0, 0, 0, 0, 0, 0);

all_units [110] = nowa tablica („Angstrom”, „Angstrom”, „0, 0000000001”, 1, 0, 0, 0, 0, 0, 0);

all_units [111] = nowa tablica („Angstromy”, „Angstroms”, „0, 0000000001”, 1, 0, 0, 0, 0, 0, 0);

all_units [112] = nowa tablica („mikron”, „mikron”, „0, 000001”, 1, 0, 0, 0, 0, 0, 0);

all_units [113] = nowa tablica („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] = nowa tablica („mil”, „mil”, „0.0000254”, 1, 0, 0, 0, 0, 0, 0);

all_units [116] = nowa tablica („mils”, „mils”, „0.0000254”, 1, 0, 0, 0, 0, 0, 0);

all_units [117] = nowa tablica („punkt”, „punkt”, „0.000352777777778”, 1, 0, 0, 0, 0, 0, 0);

all_units [118] = nowa tablica („pica”, „pica”, „0, 004233333333333”, 1, 0, 0, 0, 0, 0, 0);

all_units [119] = nowa tablica („cm”, „cm”, „0, 01”, 1, 0, 0, 0, 0, 0, 0);

all_units [120] = nowa tablica („in”, „in”, „0.0254”, 1, 0, 0, 0, 0, 0, 0);

all_units [121] = nowa tablica („cale”, „cale”, „0.0254”, 1, 0, 0, 0, 0, 0, 0);

all_units [122] = nowa tablica („cale”, „cale”, „0, 0254”, 1, 0, 0, 0, 0, 0, 0);

all_units [123] = nowa tablica („stopy”, „stopy”, „0.3048”, 1, 0, 0, 0, 0, 0, 0);

all_units [124] = nowa tablica („stopa”, „stopa”, „0.3048”, 1, 0, 0, 0, 0, 0, 0);

all_units [125] = nowa tablica („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] = nowa tablica („jardy”, „jardy”, „0.9144”, 1, 0, 0, 0, 0, 0, 0);

all_units [128] = nowa tablica („m”, „m”, 1, 1, 0, 0, 0, 0, 0, 0);

all_units [129] = nowa tablica („metr”, „metr”, 1, 1, 0, 0, 0, 0, 0, 0);

all_units [130] = new Array („metry”, „metry”, 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 („perches”, „perches”, 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [135] = new Array („pole”, „pole”, 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [136] = nowa tablica („bieguny”, „bieguny”, 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [137] = nowa tablica („pręt”, „pręt”, 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] = nowa tablica („furlong”, „furlong”, „201.168”, 1, 0, 0, 0, 0, 0, 0);

all_units [140] = new Array („furlongs”, „furlongs”, „201.168”, 1, 0, 0, 0, 0, 0, 0);

all_units [141] = nowa tablica („km”, „km”, 1000, 1, 0, 0, 0, 0, 0, 0);

all_units [142] = nowa tablica („mi”, „mi”, „1609.344”, 1, 0, 0, 0, 0, 0, 0);

all_units [143] = nowa tablica („mila”, „mila”, „1609.344”, 1, 0, 0, 0, 0, 0, 0);

all_units [144] = nowa tablica („mile”, „mile”, „1609.344”, 1, 0, 0, 0, 0, 0, 0);

all_units [145] = nowa tablica („mila morska”, „mila morska”, 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [146] = nowa tablica („mil morskich”, „mil morskich”, 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [147] = new Array („nauticalmile”, „nauticalmile”, 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [148] = new Array („nauticalmiles”, „nauticalmiles”, 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [149] = nowa tablica („NM”, „NM”, 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [150] = nowa tablica („rp”, „rp”, 6356912, 1, 0, 0, 0, 0, 0, 0);

all_units [151] = nowa tablica („re”, „re”, 6378388, 1, 0, 0, 0, 0, 0, 0);

all_units [152] = nowa tablica („jednostka astronomiczna”, „jednostka astronomiczna”, 149598000000, 1, 0, 0, 0, 0, 0, 0);

all_units [153] = nowa tablica („au”, „au”, 149598000000, 1, 0, 0, 0, 0, 0, 0);

all_units [154] = nowa tablica („rok świetlny”, „rok świetlny”, „9.46E + 015”, 1, 0, 0, 0, 0, 0, 0);

all_units [155] = new Array („lata świetlne”, „lata świetlne”, „9.46E + 015”, 1, 0, 0, 0, 0, 0, 0);

all_units [156] = nowa tablica („lightyear”, „lightyear”, „9.46E + 015”, 1, 0, 0, 0, 0, 0, 0);

all_units [157] = nowa tablica („lightyears”, „lightyears”, „9.46E + 015”, 1, 0, 0, 0, 0, 0, 0);

all_units [158] = nowa tablica („ly”, „ly”, „9.46E + 015”, 1, 0, 0, 0, 0, 0, 0);

all_units [159] = nowa tablica („parsec”, „parsec”, „3.083E + 016”, 1, 0, 0, 0, 0, 0, 0);

all_units [160] = new Array („parsecs”, „parsecs”, „3.083E + 016”, 1, 0, 0, 0, 0, 0, 0);

all_units [161] = nowa tablica („rad”, „rad”, „0.01”, 2, 0, -2, 0, 0, 0, 0);

all_units [162] = nowa tablica („rem”, „rem”, „0.01”, 2, 0, -2, 0, 0, 0, 0);

all_units [163] = new Array („szary”, „szary”, 1, 2, 0, -2, 0, 0, 0, 0);

all_units [164] = new Array ("gy", "gy", 1, 2, 0, -2, 0, 0, 0, 0);

all_units [165] = nowa tablica („Sievert”, „Sievert”, 1, 2, 0, -2, 0, 0, 0, 0);

all_units [166] = nowa tablica („Sv”, „Sv”, 1, 2, 0, -2, 0, 0, 0, 0);

all_units [167] = nowa tablica („abvolt”, „abvolt”, „0.00000001”, 2, 1, -3, -1, 0, 0, 0);

all_units [168] = new Array („abvolts”, „abvolts”, „0.00000001”, 2, 1, -3, -1, 0, 0, 0);

all_units [169] = nowa tablica („µV”, „µV”, „0, 000001”, 2, 1, -3, -1, 0, 0, 0);

all_units [170] = nowa tablica („mV”, „mV”, „0, 001”, 2, 1, -3, -1, 0, 0, 0);

all_units [171] = nowa tablica („V”, „V”, 1, 2, 1, -3, -1, 0, 0, 0);

all_units [172] = nowa tablica („Volt”, „Volt”, 1, 2, 1, -3, -1, 0, 0, 0);

all_units [173] = nowa tablica („wolty”, „wolty”, 1, 2, 1, -3, -1, 0, 0, 0);

all_units [174] = nowa tablica ("statvolt", "statvolt", "299.8", 2, 1, -3, -1, 0, 0, 0);

all_units [175] = nowa tablica („statvolts”, „statvolts”, „299.8”, 2, 1, -3, -1, 0, 0, 0);

all_units [176] = nowa tablica („elektronowolt”, „elektronowolt”, „1.60217733E-019”, 2, 1, -2, 0, 0, 0, 0);

all_units [177] = nowa tablica („elektronowolt”, „elektronowolt”, „1.60217733E-019”, 2, 1, -2, 0, 0, 0, 0);

all_units [178] = nowa tablica („electronvolt”, „electronvolt”, „1.60217733E-019”, 2, 1, -2, 0, 0, 0, 0);

all_units [179] = nowa tablica („elektronowolty”, „elektronowolty”, „1.60217733E-019”, 2, 1, -2, 0, 0, 0, 0);

all_units [180] = nowa tablica („ev”, „eV”, „1.60217733E-019”, 2, 1, -2, 0, 0, 0, 0);

all_units [181] = nowa tablica („mev”, „meV”, „0, 000000000000160217733”, 2, 1, -2, 0, 0, 0, 0);

all_units [182] = nowa tablica („gev”, „geV”, „0.000000000160217733”, 2, 1, -2, 0, 0, 0, 0);

all_units [183] ​​= nowa tablica („erg”, „erg”, „0.0000001”, 2, 1, -2, 0, 0, 0, 0);

all_units [184] = nowa tablica („ergs”, „ergs”, „0.0000001”, 2, 1, -2, 0, 0, 0, 0);

all_units [185] = nowa tablica („teV”, „teV”, „0, 000000160217733”, 2, 1, -2, 0, 0, 0, 0);

all_units [186] = nowa tablica („Joule”, „J”, 1, 2, 1, -2, 0, 0, 0, 0);

all_units [187] = nowa tablica („dżul”, „dżul”, 1, 2, 1, -2, 0, 0, 0, 0);

all_units [188] = nowa tablica („dżule”, „dżule”, 1, 2, 1, -2, 0, 0, 0, 0);

all_units [189] = nowa tablica („cal”, „Cal”, 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [190] = nowa tablica („calorie”, „Calorie”, 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [191] = nowa tablica („kalorie”, „kalorie”, 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [192] = nowa tablica („jednostka brytyjsko-termiczna”, „jednostka brytyjsko-termiczna”, „1055.056”, 2, 1, -2, 0, 0, 0, 0);

all_units [193] = nowa tablica („jednostki brytyjsko-termiczne”, „jednostki brytyjsko-termiczne”, „1055.056”, 2, 1, -2, 0, 0, 0, 0);

all_units [194] = nowa tablica („britishthermalunit”, „britishthermalunit”, „1055.056”, 2, 1, -2, 0, 0, 0, 0);

all_units [195] = nowa tablica („britishthermalunits”, „britishthermalunits”, „1055.056”, 2, 1, -2, 0, 0, 0, 0);

all_units [196] = nowa tablica („Btu”, „Btu”, „1055.056”, 2, 1, -2, 0, 0, 0, 0);

all_units [197] = nowa tablica („Btus”, „Btus”, „1055.056”, 2, 1, -2, 0, 0, 0, 0);

all_units [198] = nowa tablica („kcal”, „kcal”, 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [199] = nowa tablica („kwh”, „kwh”, 3600000, 2, 1, -2, 0, 0, 0, 0);

all_units [200] = nowa tablica („dyne”, „dyne”, 10, 1, 1, -2, 0, 0, 0, 0);

all_units [201] = new Array („dynes”, „dynes”, 10, 1, 1, -2, 0, 0, 0, 0);

all_units [202] = nowa tablica („gram-siła”, „gram-siła”, „0, 00980665”, 1, 1, -2, 0, 0, 0, 0);

all_units [203] = new Array („gram-weight”, „gram-weight”, „0, 00980665”, 1, 1, -2, 0, 0, 0, 0);

all_units [204] = nowa tablica („uncja-siła”, „uncja-siła”, „0.278013850953781”, 1, 1, -2, 0, 0, 0, 0);

all_units [205] = nowa tablica („ozf”, „ozf”, „0.278013850953781”, 1, 1, -2, 0, 0, 0, 0);

all_units [206] = nowa tablica („newton”, „newton”, 1, 1, 1, -2, 0, 0, 0, 0);

all_units [207] = nowa tablica („N”, „N”, 1, 1, 1, -2, 0, 0, 0, 0);

all_units [208] = nowa tablica („nt”, „nt”, 1, 1, 1, -2, 0, 0, 0, 0);

all_units [209] = nowa tablica („lb”, „lb”, „4.4482216152605”, 1, 1, -2, 0, 0, 0, 0);

all_units [210] = nowa tablica („lbf”, „lbf”, „4.4482216152605”, 1, 1, -2, 0, 0, 0, 0);

all_units [211] = new Array („lbs”, „lbs”, „4.4482216152605”, 1, 1, -2, 0, 0, 0, 0);

all_units [212] = nowa tablica („funt”, „funt”, „4.4482216152605”, 1, 1, -2, 0, 0, 0, 0);

all_units [213] = nowa tablica („funt-siła”, „funt-siła”, „4.4482216152605”, 1, 1, -2, 0, 0, 0, 0);

all_units [214] = nowa tablica („funt-waga”, „funt-waga”, „4.4482216152605”, 1, 1, -2, 0, 0, 0, 0);

all_units [215] = nowa tablica („funty”, „funty”, „4.4482216152605”, 1, 1, -2, 0, 0, 0, 0);

all_units [216] = nowa tablica („funt-siła”, „funt-siła”, „4.4482216152605”, 1, 1, -2, 0, 0, 0, 0);

all_units [217] = nowa tablica („kgf”, „kgf”, „9.80665”, 1, 1, -2, 0, 0, 0, 0);

all_units [218] = nowa tablica („rpm”, „rpm”, „0.016666666666667”, 0, 0, -1, 0, 0, 0, 0);

all_units [219] = nowa tablica („becquerel”, „becquerel”, 1, 0, 0, -1, 0, 0, 0, 0);

all_units [220] = nowa tablica („Bq”, „Bq”, 1, 0, 0, -1, 0, 0, 0, 0);

all_units [221] = nowa tablica („hertz”, „hertz”, 1, 0, 0, -1, 0, 0, 0, 0);

all_units [222] = nowa tablica („Hz”, „Hz”, 1, 0, 0, -1, 0, 0, 0, 0);

all_units [223] = new Array („abhenry”, „abhenry”, „0.000000001”, 2, 1, -2, -2, 0, 0, 0);

all_units [224] = nowa tablica („abhenrys”, „abhenrys”, „0.000000001”, 2, 1, -2, -2, 0, 0, 0);

all_units [225] = nowa tablica („uH”, „uH”, „0.000001”, 2, 1, -2, -2, 0, 0, 0);

all_units [226] = nowa tablica („mH”, „mH”, „0, 001”, 2, 1, -2, -2, 0, 0, 0);

all_units [227] = nowa tablica („Henry”, „Henry”, 1, 2, 1, -2, -2, 0, 0, 0);

all_units [228] = nowa tablica („Henrys”, „H”, 1, 2, 1, -2, -2, 0, 0, 0);

all_units [229] = nowa tablica („stathenry”, „stathenry”, 898700000000, 2, 1, -2, -2, 0, 0, 0);

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

all_units [231] = nowa tablica („candela”, „candela”, 1, 0, 0, 0, 0, 0, 0, 1);

all_units [232] = nowa tablica („candelas”, „candelas”, 1, 0, 0, 0, 0, 0, 0, 1);

all_units [233] = nowa tablica („świeca”, „świeca”, 1, 0, 0, 0, 0, 0, 0, 1);

all_units [234] = nowa tablica („świece”, „świece”, 1, 0, 0, 0, 0, 0, 0, 1);

all_units [235] = nowa tablica („cd”, „cd”, 1, 0, 0, 0, 0, 0, 0, 1);

all_units [236] = nowa tablica („gauss”, „gauss”, „0, 0001”, 1, 0, -2, -1, 0, 0, 0);

all_units [237] = nowa tablica („tesla”, „tesla”, 1, 1, 0, -2, -1, 0, 0, 0);

all_units [238] = nowa tablica („teslas”, „T”, 1, 1, 0, -2, -1, 0, 0, 0);

all_units [239] = nowa tablica („maxwell”, „maxwell”, „0.00000001”, 2, 1, -2, -1, 0, 0, 0);

all_units [240] = new Array („maxwells”, „maxwells”, „0.00000001”, 2, 1, -2, -1, 0, 0, 0);

all_units [241] = nowa tablica („wb”, „Wb”, 1, 2, 1, -2, -1, 0, 0, 0);

all_units [242] = nowa tablica („weber”, „weber”, 1, 2, 1, -2, -1, 0, 0, 0);

all_units [243] = nowa tablica („webers”, „webers”, 1, 2, 1, -2, -1, 0, 0, 0);

all_units [244] = nowa tablica („amu”, „amu”, „1.6605402E-027”, 0, 1, 0, 0, 0, 0, 0);

all_units [245] = nowa tablica („jednostka masy atomowej”, „jednostka masy atomowej”, „1.6605402E-027”, 0, 1, 0, 0, 0, 0, 0);

all_units [246] = nowa tablica („jednostki masy atomowej”, „jednostki masy atomowej”, „1.6605402E-027”, 0, 1, 0, 0, 0, 0, 0);

all_units [247] = nowa tablica („u”, „u”, „1.6605402E-027”, 0, 1, 0, 0, 0, 0, 0);

all_units [248] = nowa tablica („ug”, „ug”, „0, 000000001”, 0, 1, 0, 0, 0, 0, 0);

all_units [249] = nowa tablica („mg”, „mg”, „0, 000001”, 0, 1, 0, 0, 0, 0, 0);

all_units [250] = nowa tablica („cg”, „cg”, „0, 00001”, 0, 1, 0, 0, 0, 0, 0);

all_units [251] = nowa tablica („ziarno”, „ziarno”, „0, 0000648”, 0, 1, 0, 0, 0, 0, 0);

all_units [252] = nowa tablica („ziarna”, „ziarna”, „0, 0000648”, 0, 1, 0, 0, 0, 0, 0);

all_units [253] = nowa tablica („dg”, „dg”, „0, 0001”, 0, 1, 0, 0, 0, 0, 0);

all_units [254] = nowa tablica („carat”, „carat”, „0.0002”, 0, 1, 0, 0, 0, 0, 0);

all_units [255] = new Array („carats”, „carats”, „0.0002”, 0, 1, 0, 0, 0, 0, 0);

all_units [256] = nowa tablica („karat”, „karat”, „0.0002”, 0, 1, 0, 0, 0, 0, 0);

all_units [257] = nowa tablica („karaty”, „karaty”, „0.0002”, 0, 1, 0, 0, 0, 0, 0);

all_units [258] = nowa tablica („j-point”, „j-point”, „0.0004”, 0, 1, 0, 0, 0, 0, 0);

all_units [259] = nowa tablica („gm”, „gm”, „0, 001”, 0, 1, 0, 0, 0, 0, 0);

all_units [260] = nowa tablica („gram”, „gram”, „0, 001”, 0, 1, 0, 0, 0, 0, 0);

all_units [261] = nowa tablica („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] = new Array („skrupuły”, „skrupuły”, „0, 001296”, 0, 1, 0, 0, 0, 0, 0);

all_units [264] = nowa tablica („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] = nowa tablica („dram”, „dram”, „0, 0017718451953125”, 0, 1, 0, 0, 0, 0, 0);

all_units [267] = new Array („dramy”, „dramy”, „0, 0017718451953125”, 0, 1, 0, 0, 0, 0, 0);

all_units [268] = nowa tablica („dag”, „dag”, „0.01”, 0, 1, 0, 0, 0, 0, 0);

all_units [269] = new Array („uncja”, „uncja”, „0.028349523125”, 0, 1, 0, 0, 0, 0, 0);

all_units [270] = nowa tablica („uncje”, „uncje”, „0, 028349523125”, 0, 1, 0, 0, 0, 0, 0);

all_units [271] = nowa tablica („oz”, „oz”, „0.028349523125”, 0, 1, 0, 0, 0, 0, 0);

all_units [272] = nowa tablica („uncja-troy”, „uncja-troy”, „0.031103”, 0, 1, 0, 0, 0, 0, 0);

all_units [273] = nowa tablica („uncje-troy”, „uncje-troy”, „0.031103”, 0, 1, 0, 0, 0, 0, 0);

all_units [274] = nowa tablica („troy-uncja”, „troy-uncja”, „0.031103”, 0, 1, 0, 0, 0, 0, 0);

all_units [275] = nowa tablica („troy-uncje”, „troy-uncje”, „0.031103”, 0, 1, 0, 0, 0, 0, 0);

all_units [276] = nowa tablica („hg”, „hg”, „0, 1”, 0, 1, 0, 0, 0, 0, 0);

all_units [277] = nowa tablica („troy-funt”, „troy-funt”, „0.373”, 0, 1, 0, 0, 0, 0, 0);

all_units [278] = nowa tablica („troy-funtów”, „troy-funtów”, „0.373”, 0, 1, 0, 0, 0, 0, 0);

all_units [279] = nowa tablica („lbm”, „lbm”, „0.45359237”, 0, 1, 0, 0, 0, 0, 0);

all_units [280] = nowa tablica („lbms”, „lbms”, „0.45359237”, 0, 1, 0, 0, 0, 0, 0);

all_units [281] = nowa tablica („masa funtowa”, „masa funtowa”, „0, 45359237”, 0, 1, 0, 0, 0, 0, 0);

all_units [282] = nowa tablica („masa funtów”, „masa funtów”, „0, 45359237”, 0, 1, 0, 0, 0, 0, 0);

all_units [283] = nowa tablica („kg”, „kg”, 1, 0, 1, 0, 0, 0, 0, 0);

all_units [284] = nowa tablica („kamień”, „kamień”, „6.35029318”, 0, 1, 0, 0, 0, 0, 0);

all_units [285] = nowa tablica („kamienie”, „kamienie”, „6.35029318”, 0, 1, 0, 0, 0, 0, 0);

all_units [286] = nowa tablica („slug”, „slug”, „14.5939029372064”, 0, 1, 0, 0, 0, 0, 0);

all_units [287] = nowa tablica („ślimaki”, „ślimaki”, „14.5939029372064”, 0, 1, 0, 0, 0, 0, 0);

all_units [288] = nowa tablica („sto ciężkich”, „sto ciężkich”, „45.359237”, 0, 1, 0, 0, 0, 0, 0);

all_units [289] = new Array („sto wagi”, „sto wagi”, „45.359237”, 0, 1, 0, 0, 0, 0, 0);

all_units [290] = nowa tablica („short-ton”, „short-ton”, „907.18474”, 0, 1, 0, 0, 0, 0, 0);

all_units [291] = nowa tablica („krótkie tony”, „krótkie tony”, „907.18474”, 0, 1, 0, 0, 0, 0, 0);

all_units [292] = nowa tablica („ton”, „ton”, „907.18474”, 0, 1, 0, 0, 0, 0, 0);

all_units [293] = nowa tablica („tony”, „tony”, „907.18474”, 0, 1, 0, 0, 0, 0, 0);

all_units [294] = nowa tablica („tonometryczny”, „tonometryczny”, 1000, 0, 1, 0, 0, 0, 0, 0);

all_units [295] = nowa tablica („tony metryczne”, „tony metryczne”, 1000, 0, 1, 0, 0, 0, 0, 0);

all_units [296] = nowa tablica („tona”, „tona”, 1000, 0, 1, 0, 0, 0, 0, 0);

all_units [297] = nowa tablica („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 („long-tons”, „long-tons”, „1016.0469088”, 0, 1, 0, 0, 0, 0, 0);

all_units [300] = nowa tablica („h”, „h”, „6.626196E-034”, 2, 1, -3, 0, 0, 0, 0);

all_units [301] = nowa tablica („W”, „W”, 1, 2, 1, -3, 0, 0, 0, 0);

all_units [302] = nowa tablica („Watt”, „Watt”, 1, 2, 1, -3, 0, 0, 0, 0);

all_units [303] = nowa tablica („Watts”, „Watts”, 1, 2, 1, -3, 0, 0, 0, 0);

all_units [304] = new Array („horsepower”, „horsepower”, „745.69987158227”, 2, 1, -3, 0, 0, 0, 0);

all_units [305] = nowa tablica („hp”, „hp”, „745.69987158227”, 2, 1, -3, 0, 0, 0, 0);

all_units [306] = nowa tablica („Pa”, „Pa”, 1, -1, 1, -2, 0, 0, 0, 0);

all_units [307] = nowa tablica („Pascal”, „Pascal”, 1, -1, 1, -2, 0, 0, 0, 0);

all_units [308] = nowa tablica („torr”, „torr”, „133.322368421053”, - 1, 1, -2, 0, 0, 0, 0);

all_units [309] = nowa tablica („psi”, „psi”, „6894.75729316836”, - 1, 1, -2, 0, 0, 0, 0);

all_units [310] = nowa tablica („bar”, „bar”, 100000, -1, 1, -2, 0, 0, 0, 0);

all_units [311] = new Array („słupki”, „słupki”, 100000, -1, 1, -2, 0, 0, 0, 0);

all_units [312] = nowa tablica („atm”, „atm”, 101325, -1, 1, -2, 0, 0, 0, 0);

all_units [313] = nowa tablica („atmosfera”, „atmosfera”, 101325, -1, 1, -2, 0, 0, 0, 0);

all_units [314] = nowa tablica („abohm”, „abohm”, „0.000000001”, 2, 1, -3, -2, 0, 0, 0);

all_units [315] = nowa tablica („abohms”, „abohms”, „0.000000001”, 2, 1, -3, -2, 0, 0, 0);

all_units [316] = nowa tablica („Ohm”, „Ohm”, 1, 2, 1, -3, -2, 0, 0, 0);

all_units [317] = nowa tablica („Ohm”, „Ohms”, 1, 2, 1, -3, -2, 0, 0, 0);

all_units [318] = nowa tablica („kilohm”, „kilohm”, 1000, 2, 1, -3, -2, 0, 0, 0);

all_units [319] = new Array („kilohms”, „kilohms”, 1000, 2, 1, -3, -2, 0, 0, 0);

all_units [320] = nowa tablica („megohm”, „megohm”, 1000000, 2, 1, -3, -2, 0, 0, 0);

all_units [321] = nowa tablica („megohms”, „megohms”, 1000000, 2, 1, -3, -2, 0, 0, 0);

all_units [322] = nowa tablica („statohm”, „statohm”, 898700000000, 2, 1, -3, -2, 0, 0, 0);

all_units [323] = nowa tablica („statohms”, „statohms”, 898700000000, 2, 1, -3, -2, 0, 0, 0);

all_units [324] = nowa tablica („kph”, „kph”, „0.277777777777778”, 1, 0, -1, 0, 0, 0, 0);

all_units [325] = nowa tablica („fps”, „fps”, „0.3048”, 1, 0, -1, 0, 0, 0, 0);

all_units [326] = nowa tablica („mph”, „mph”, „0.44704”, 1, 0, -1, 0, 0, 0, 0);

all_units [327] = nowa tablica („węzeł”, „kn”, „0, 514444444444444”, 1, 0, -1, 0, 0, 0, 0);

all_units [328] = nowa tablica („węzły”, „kt”, „0, 514444444444444”, 1, 0, -1, 0, 0, 0, 0);

all_units [329] = nowa tablica („mps”, „mps”, 1, 1, 0, -1, 0, 0, 0, 0);

all_units [330] = nowa tablica („kps”, „kps”, 1000, 1, 0, -1, 0, 0, 0, 0);

all_units [331] = nowa tablica („c”, „c”, 299792458, 1, 0, -1, 0, 0, 0, 0);

all_units [332] = nowa tablica („prędkość światła”, „prędkość światła”, 299792458, 1, 0, -1, 0, 0, 0, 0);

all_units [333] = nowa tablica („mol”, „mol”, 1, 0, 0, 0, 0, 0, 1, 0);

all_units [334] = nowa tablica („mol”, „mol”, 1, 0, 0, 0, 0, 0, 1, 0);

all_units [335] = nowa tablica („mole”, „mole”, 1, 0, 0, 0, 0, 0, 1, 0);

all_units [336] = nowa tablica („degree-rankine”, „degree-rankine”, „0.555555555555556”, 0, 0, 0, 0, 0, 0, 0);

all_units [337] = nowa tablica („stopnie-rankingine”, „stopnie-rankingine”, „0, 555555555555556”, 0, 0, 0, 0, 0, 0, 0);

all_units [338] = nowa tablica („stopień-kelwin”, „stopień-kelwin”, 1, 0, 0, 0, 0, 1, 0, 0);

all_units [339] = nowa tablica („stopień-kelvins”, „stopień-kelvins”, 1, 0, 0, 0, 0, 1, 0, 0);

all_units [340] = nowa tablica („stopnie-kelwin”, „stopnie-kelwin”, 1, 0, 0, 0, 0, 1, 0, 0);

all_units [341] = nowa tablica („K”, „K”, 1, 0, 0, 0, 0, 1, 0, 0);

all_units [342] = new Array („Kelvin”, „Kelvin”, 1, 0, 0, 0, 0, 1, 0, 0);

all_units [343] = nowa tablica („Kelvins”, „Kelvins”, 1, 0, 0, 0, 0, 1, 0, 0);

all_units [344] = nowa tablica („ps”, „ps”, „0.000000000001”, 0, 0, 1, 0, 0, 0, 0);

all_units [345] = nowa tablica („psec”, „psec”, „0, 000000000001”, 0, 0, 1, 0, 0, 0, 0);

all_units [346] = nowa tablica („psecs”, „psecs”, „0.000000000001”, 0, 0, 1, 0, 0, 0, 0);

all_units [347] = nowa tablica („ns”, „ns”, „0, 000000001”, 0, 0, 1, 0, 0, 0, 0);

all_units [348] = nowa tablica („nsec”, „nsec”, „0.000000001”, 0, 0, 1, 0, 0, 0, 0);

all_units [349] = nowa tablica („nsecs”, „nsecs”, „0, 000000001”, 0, 0, 1, 0, 0, 0, 0);

all_units [350] = nowa tablica („µs”, „Âs”, „0, 000001”, 0, 0, 1, 0, 0, 0, 0);

all_units [351] = nowa tablica („µsec”, „µsec”, „0.000001”, 0, 0, 1, 0, 0, 0, 0);

all_units [352] = nowa tablica („µscs”, „µsecs”, „0.000001”, 0, 0, 1, 0, 0, 0, 0);

all_units [353] = nowa tablica („ms”, „ms”, „0, 001”, 0, 0, 1, 0, 0, 0, 0);

all_units [354] = nowa tablica („msec”, „msec”, „0, 001”, 0, 0, 1, 0, 0, 0, 0);

all_units [355] = nowa tablica („msecs”, „msecs”, „0, 001”, 0, 0, 1, 0, 0, 0, 0);

all_units [356] = nowa tablica („s”, „s”, 1, 0, 0, 1, 0, 0, 0, 0);

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

all_units [358] = nowa tablica („druga”, „druga”, 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] = nowa tablica („min”, „min”, 60, 0, 0, 1, 0, 0, 0, 0);

all_units [362] = nowa tablica („min”, „min”, 60, 0, 0, 1, 0, 0, 0, 0);

all_units [363] = nowa tablica („minuta”, „minuta”, 60, 0, 0, 1, 0, 0, 0, 0);

all_units [364] = nowa tablica („minuty”, „minuty”, 60, 0, 0, 1, 0, 0, 0, 0);

all_units [365] = nowa tablica („godzina”, „godzina”, 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [366] = nowa tablica („godziny”, „godziny”, 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [367] = nowa tablica („hr”, „hr”, 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [368] = nowa tablica („hrs”, „hrs”, 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [369] = new Array („day”, „day”, 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] = nowa tablica („tydzień”, „tydzień”, 604800, 0, 0, 1, 0, 0, 0, 0);

all_units [372] = new Array („tygodnie”, „tygodnie”, 604800, 0, 0, 1, 0, 0, 0, 0);

all_units [373] = nowa tablica („wk”, „wk”, 604800, 0, 0, 1, 0, 0, 0, 0);

all_units [374] = nowa tablica („dwa tygodnie”, „dwa tygodnie”, 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] = nowa tablica („mon”, „mon”, 2629800, 0, 0, 1, 0, 0, 0, 0);

all_units [377] = nowa tablica („mons”, „mons”, 2629800, 0, 0, 1, 0, 0, 0, 0);

all_units [378] = nowa tablica („miesiąc”, „miesiąc”, 2629800, 0, 0, 1, 0, 0, 0, 0);

all_units [379] = nowa tablica („miesiące”, „miesiące”, 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 („lata”, „lata”, 31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [382] = nowa tablica („yr”, „yr”, 31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [383] = nowa tablica („yrs”, „yrs”, 31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [384] = nowa tablica („wynik”, „wynik”, 631152000, 0, 0, 1, 0, 0, 0, 0);

all_units [385] = nowa tablica („wyniki”, „wyniki”, 631152000, 0, 0, 1, 0, 0, 0, 0);

all_units [386] = nowa tablica („wieki”, „wieki”, 3155760000, 0, 0, 1, 0, 0, 0, 0);

all_units [387] = nowa tablica („wiek”, „wiek”, 3155760000, 0, 0, 1, 0, 0, 0, 0);

all_units [388] = new Array („millenia”, „millenia”, 31557600000, 0, 0, 1, 0, 0, 0, 0);

all_units [389] = nowa tablica („millenium”, „millenium”, 31557600000, 0, 0, 1, 0, 0, 0, 0);

all_units [390] = new Array („foot-pound”, „foot-pound”, „1.3558179483314”, 2, 1, -2, 0, 0, 0, 0);

all_units [391] = nowa tablica („stopy-funty”, „stopa-funty”, „1.3558179483314”, 2, 1, -2, 0, 0, 0, 0);

all_units [392] = nowa tablica („footpound”, „footpound”, „1.3558179483314”, 2, 1, -2, 0, 0, 0, 0);

all_units [393] = new Array („footpounds”, „footpounds”, „1.3558179483314”, 2, 1, -2, 0, 0, 0, 0);

all_units [394] = nowa tablica („ft-lb”, „ft-lb”, „1.3558179483314”, 2, 1, -2, 0, 0, 0, 0);

all_units [395] = nowa tablica („ftlb”, „ftlb”, „1.3558179483314”, 2, 1, -2, 0, 0, 0, 0);

all_units [396] = nowa tablica („minim”, „minim”, „0, 000000059194”, 3, 0, 0, 0, 0, 0, 0);

all_units [397] = nowa tablica („minimy”, „minimy”, „0, 000000059194”, 3, 0, 0, 0, 0, 0, 0);

all_units [398] = nowa tablica („cc”, „cc”, „0, 000001”, 3, 0, 0, 0, 0, 0, 0);

all_units [399] = nowa tablica („ml”, „ml”, „0, 000001”, 3, 0, 0, 0, 0, 0, 0);

all_units [400] = nowa tablica („fluidram”, „fluidram”, „0, 0000035516”, 3, 0, 0, 0, 0, 0, 0);

all_units [401] = new Array („fluidrams”, „fluidrams”, „0, 0000035516”, 3, 0, 0, 0, 0, 0, 0);

all_units [402] = nowa tablica („łyżeczka”, „łyżeczka”, „0, 00000492892159375”, 3, 0, 0, 0, 0, 0, 0);

all_units [403] = new Array („łyżeczki do herbaty”, „łyżeczki do herbaty”, „0, 00000492892159375”, 3, 0, 0, 0, 0, 0, 0);

all_units [404] = nowa tablica („tsp”, „tsp”, „0.00000492892159375”, 3, 0, 0, 0, 0, 0, 0);

all_units [405] = nowa tablica („cl”, „cl”, „0, 00001”, 3, 0, 0, 0, 0, 0, 0);

all_units [406] = nowa tablica („łyżka”, „łyżka”, „0, 00001478676478125”, 3, 0, 0, 0, 0, 0, 0);

all_units [407] = nowa tablica („łyżki stołowe”, „łyżki stołowe”, „0, 00001478676478125”, 3, 0, 0, 0, 0, 0, 0);

all_units [408] = nowa tablica („łyżka”, „łyżka”, „0, 00001478676478125”, 3, 0, 0, 0, 0, 0, 0);

all_units [409] = nowa tablica („floz”, „floz”, „0, 0000295735295625”, 3, 0, 0, 0, 0, 0, 0);

all_units [410] = nowa tablica („fluid-uncja”, „fluid-uncja”, „0, 0000295735295625”, 3, 0, 0, 0, 0, 0, 0);

all_units [411] = nowa tablica („fluid-uncje”, „fluid-uncje”, „0, 0000295735295625”, 3, 0, 0, 0, 0, 0, 0);

all_units [412] = new 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] = nowa tablica („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 („skrzela”, „skrzela”, „0, 00011829411825”, 3, 0, 0, 0, 0, 0, 0);

all_units [417] = new Array („cup”, „cup”, „0.0002365882365”, 3, 0, 0, 0, 0, 0, 0);

all_units [418] = new Array („cups”, „cups”, „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] = nowa tablica („pt”, „pt”, „0.000473176473”, 3, 0, 0, 0, 0, 0, 0);

all_units [422] = nowa tablica („piąta”, „piąta”, „0.0007570823568”, 3, 0, 0, 0, 0, 0, 0);

all_units [423] = nowa tablica („piąte”, „piąte”, „0.0007570823568”, 3, 0, 0, 0, 0, 0, 0);

all_units [424] = nowa tablica („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 („quarts”, „quarts”, „0.000946352946”, 3, 0, 0, 0, 0, 0, 0);

all_units [427] = nowa tablica („l”, „l”, „0, 001”, 3, 0, 0, 0, 0, 0, 0);

all_units [428] = nowa tablica („litr”, „litr”, „0, 001”, 3, 0, 0, 0, 0, 0, 0);

all_units [429] = nowa tablica („L”, „L”, „0, 001”, 3, 0, 0, 0, 0, 0, 0);

all_units [430] = nowa tablica („gal”, „gal”, „0, 003785411784”, 3, 0, 0, 0, 0, 0, 0);

all_units [431] = nowa tablica („galon”, „galon”, „0, 003785411784”, 3, 0, 0, 0, 0, 0, 0);

all_units [432] = nowa tablica („galony”, „galony”, „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] = nowa tablica („buszle”, „buszle”, „0.030283294272”, 3, 0, 0, 0, 0, 0, 0);

all_units [437] = nowa tablica („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);

funkcja min (a, b) {jeśli (a

funkcja max (a, b) {jeśli (a> b) powrót (a); else return (b);}

funkcja analizy (coef, str) // ============================ dzieli jednostki na podstawowe jednostki SI

{

var pos_dot;

var pos_slash;

var pos;

var unit;

var wykładnik;

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) // dla każdej jednostki w ciągu wejściowym jednostki

{

pos_dot = str.indexOf (".");

pos_slash = str.indexOf ("/");

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

pos = max (pos_dot, pos_slash);

jeszcze

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) // jeśli nie ma wykładnika

{

unit = list_units_in [i];

wykładnik = 1;

}

inaczej // istnieje wykładnik

{

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

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

}

// jeśli po jednostce znajduje się a /, następny wykładnik ma zostać odwrócony

if (invert_next) exponent = -exponent;

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

table_base_unit = fetch_unit (jednostka); // pobierz odpowiednik SI wybranej jednostki

if (table_base_unit) // jeśli znaleziono na liście

{

table_base [0] = table_base [0] * Math.pow (table_base_unit [2], wykładnik);

dla (j = 1; j <8; j ++) // na podstawie danych o jednostkach bazowych

{

table_base [j] = table_base [j] + (wykładnik * table_base_unit [j + 2]);

}

}

else return (0); // tam jest problem

i = i + 1;

}

return (table_base);

}

funkcja fetch_unit (symbol) // ============================ pobiera odpowiedniki SI jednostki

{

k = 1;

while (all_units [k])

{

if (all_units [k] [1] == symbol) zwraca (all_units [k]); // znaleziono!

k = k + 1;

}

return (0); // nie znaleziono

}

funkcja exp_nice (string) // ============================ zastępuje ^ 2 z ²

{

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", "³");

return (string);

}

funkcja exp_clean (ciąg) // ============================ zastąp ² z ^ 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”);

return (string);

}

funkcja display_unit (base_values, base) // ============================ Wyświetl wyniki

{

if (base) // jeśli wymagane są podstawowe jednostki SI

{

var str_display = "";

dla (p = 1; p <8; p ++) // dla 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] + "^" + wartości_podstawowe [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) == "/") // jeśli pierwszy wykładnik jest ujemny

str_display = "1" + str_display

jeszcze

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

}

w przeciwnym razie // pozostaw jednostki tak jak jest

{

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 = wartości_podstawowe [0];

}

funkcja convert () // ============================ main function

{

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 = "???"; wyjście;}

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 = analysis (document.forms [0] .quantity_in.value, document.forms [0] .units_in.value);

if (document.forms [0] .units_out.value! = "") // jeśli żądane są konkretne jednostki dla wyniku

{

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

if (units_base_out) // jeśli jednostki znajdują się w bazie danych

{

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]) // jeśli jednostki nie są kompatybilne

display_unit (units_base_in, 1);

inaczej // wszystko jest w porządku

{

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

display_unit (units_base_in, 0);

}

}

else // jednostka nie została znaleziona

display_unit (units_base_in, 1);

}

else // nie zażądano żadnych konkretnych jednostek

display_unit (units_base_in, 1);

}

funkcja init_form () // ============================ Inicjalizacja formularza

{

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 () // ============================ Wyświetla klikalną listę dostępnych jednostek

{

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;

while (lista [n])

{

document.write (" ");

document.write (list [n]);

document.write (", ");

n = n + 1;

}

}

// ============================ Koniec skryptów

Uniwersalny konwerter

td {font-family: Arial; rozmiar czcionki: 10px; wyrównanie tekstu: środek;}

.red {color: # ff0000;}


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

1mph Przykłady

pola w kolorze czarnym

są wypełniane przez użytkownika

pola na czerwono

są wyniki

0, 44704m / s
1mi / hr0, 44704m / s
1mi.hr ^ -10, 44704m / s
1mph1, 609344km / h
9kilo.m / godz250centi.m / s
1, 2345e + 8mph55187088m / s
1mph1.4911649311738188e-9do
1cm.kg/min^2/µA^22777.77777777777H / mm
1cm.kg/min^2/µA^22777777.77777777m.kg/s²/A²


Pomoc: Jednostki muszą być oddzielone kropkami (.) Lub ukośnikami (/). Przestrzeń NIE jest separatorem. Wykładniki mogą być używane z symbolem ^ i mogą być dodatnie lub ujemne. Dopuszczalne są wykładniki ² i ³. Jeśli jednostki docelowe nie są dostarczane lub niekompatybilne z jednostkami źródłowymi, wartości zostaną przekształcone na podstawowe jednostki SI. W jednostkach rozróżniana jest wielkość liter. Wartości mogą być dostarczane w formacie naukowym.


init_form ();

list_units ();


O uniwersalnym konwerterze: Ten konwerter Javascript jest dostarczany jako samodzielny plik, który może być używany online lub offline. Można go swobodnie kopiować i rozpowszechniać, o ile ta informacja jest widoczna. (see the source code for information on how to declare new units). Błędy, sugestie i nowe jednostki można wysyłać do [email protected] (patrz kod źródłowy, aby dowiedzieć się, jak zadeklarować nowe jednostki).

Zdjęcie: © Signs And Symbols - Shutterstock.com

Poprzedni Artykuł Następny Artykuł

Najważniejsze Wskazówki