text:
CREATE TABLE list (id VARCHAR(10) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id));

INSERT INTO "list" ("id", "value") VALUES (E'ALK', E'Albanian Lek (1946–1965)');
INSERT INTO "list" ("id", "value") VALUES (E'ARM', E'Argentine Peso (1881–1970)');
INSERT INTO "list" ("id", "value") VALUES (E'ARL', E'Argentine Peso Ley (1970–1983)');
INSERT INTO "list" ("id", "value") VALUES (E'BOL', E'Bolivian Boliviano (1863–1963)');
INSERT INTO "list" ("id", "value") VALUES (E'BAN', E'Bosnia-Herzegovina New Dinar (1994–1997)');
INSERT INTO "list" ("id", "value") VALUES (E'BRZ', E'Brazilian Cruzeiro (1942–1967)');
INSERT INTO "list" ("id", "value") VALUES (E'BGO', E'Bulgarian Lev (1879–1952)');
INSERT INTO "list" ("id", "value") VALUES (E'BGM', E'Bulgarian Socialist Lev');
INSERT INTO "list" ("id", "value") VALUES (E'CLE', E'Chilean Escudo');
INSERT INTO "list" ("id", "value") VALUES (E'CNX', E'Chinese People's Bank Dollar');
INSERT INTO "list" ("id", "value") VALUES (E'COU', E'Colombian Real Value Unit');
INSERT INTO "list" ("id", "value") VALUES (E'XEU', E'European Currency Unit');
INSERT INTO "list" ("id", "value") VALUES (E'ISJ', E'Icelandic Króna (1918–1981)');
INSERT INTO "list" ("id", "value") VALUES (E'ILR', E'Israeli Shekel (1980–1985)');
INSERT INTO "list" ("id", "value") VALUES (E'MKN', E'Macedonian Denar (1992–1993)');
INSERT INTO "list" ("id", "value") VALUES (E'MVP', E'Maldivian Rupee (1947–1981)');
INSERT INTO "list" ("id", "value") VALUES (E'MDC', E'Moldovan Cupon');
INSERT INTO "list" ("id", "value") VALUES (E'MCF', E'Monegasque Franc');
INSERT INTO "list" ("id", "value") VALUES (E'MZM', E'Mozambican Metical (1980–2006)');
INSERT INTO "list" ("id", "value") VALUES (E'KRH', E'South Korean Hwan (1953–1962)');
INSERT INTO "list" ("id", "value") VALUES (E'KRO', E'South Korean Won (1945–1953)');
INSERT INTO "list" ("id", "value") VALUES (E'SDP', E'Sudanese Pound (1957–1998)');
INSERT INTO "list" ("id", "value") VALUES (E'VNN', E'Vietnamese Dong (1978–1985)');
INSERT INTO "list" ("id", "value") VALUES (E'CHE', E'WIR Euro');
INSERT INTO "list" ("id", "value") VALUES (E'CHW', E'WIR Franc');
INSERT INTO "list" ("id", "value") VALUES (E'YUR', E'Yugoslavian Reformed Dinar (1992–1993)');
INSERT INTO "list" ("id", "value") VALUES (E'ZWR', E'Zimbabwean Dollar (2008)');
INSERT INTO "list" ("id", "value") VALUES (E'AFA', E'afgani (1927–2002)');
INSERT INTO "list" ("id", "value") VALUES (E'AFN', E'afghani');
INSERT INTO "list" ("id", "value") VALUES (E'CSD', E'antico dinaro serbo');
INSERT INTO "list" ("id", "value") VALUES (E'MGA', E'ariary malgascio');
INSERT INTO "list" ("id", "value") VALUES (E'ARA', E'austral argentino');
INSERT INTO "list" ("id", "value") VALUES (E'THB', E'baht thailandese');
INSERT INTO "list" ("id", "value") VALUES (E'PAB', E'balboa panamense');
INSERT INTO "list" ("id", "value") VALUES (E'ETB', E'birr etiope');
INSERT INTO "list" ("id", "value") VALUES (E'VEB', E'bolivar venezuelano (1871–2008)');
INSERT INTO "list" ("id", "value") VALUES (E'BOB', E'boliviano');
INSERT INTO "list" ("id", "value") VALUES (E'VEF', E'bolívar venezuelano');
INSERT INTO "list" ("id", "value") VALUES (E'GHC', E'cedi del Ghana');
INSERT INTO "list" ("id", "value") VALUES (E'GHS', E'cedi ghanese');
INSERT INTO "list" ("id", "value") VALUES (E'CRC', E'colón costaricano');
INSERT INTO "list" ("id", "value") VALUES (E'SVC', E'colón salvadoregno');
INSERT INTO "list" ("id", "value") VALUES (E'NIC', E'cordoba nicaraguense');
INSERT INTO "list" ("id", "value") VALUES (E'CZK', E'corona ceca');
INSERT INTO "list" ("id", "value") VALUES (E'DKK', E'corona danese');
INSERT INTO "list" ("id", "value") VALUES (E'EEK', E'corona dell'Estonia');
INSERT INTO "list" ("id", "value") VALUES (E'CSK', E'corona forte cecoslovacca');
INSERT INTO "list" ("id", "value") VALUES (E'ISK', E'corona islandese');
INSERT INTO "list" ("id", "value") VALUES (E'NOK', E'corona norvegese');
INSERT INTO "list" ("id", "value") VALUES (E'SKK', E'corona slovacca');
INSERT INTO "list" ("id", "value") VALUES (E'SEK', E'corona svedese');
INSERT INTO "list" ("id", "value") VALUES (E'BRC', E'cruzado brasiliano');
INSERT INTO "list" ("id", "value") VALUES (E'BRN', E'cruzado novo brasiliano');
INSERT INTO "list" ("id", "value") VALUES (E'BRR', E'cruzeiro brasiliano');
INSERT INTO "list" ("id", "value") VALUES (E'BRE', E'cruzeiro brasiliano (1990–1993)');
INSERT INTO "list" ("id", "value") VALUES (E'BRB', E'cruzeiro novo brasiliano (1967–1986)');
INSERT INTO "list" ("id", "value") VALUES (E'NIO', E'córdoba nicaraguense');
INSERT INTO "list" ("id", "value") VALUES (E'GMD', E'dalasi gambiano');
INSERT INTO "list" ("id", "value") VALUES (E'MKD', E'denar macedone');
INSERT INTO "list" ("id", "value") VALUES (E'BAD', E'dinar Bosnia-Herzegovina');
INSERT INTO "list" ("id", "value") VALUES (E'DZD', E'dinaro algerino');
INSERT INTO "list" ("id", "value") VALUES (E'YUN', E'dinaro convertibile yugoslavo');
INSERT INTO "list" ("id", "value") VALUES (E'HRD', E'dinaro croato');
INSERT INTO "list" ("id", "value") VALUES (E'BHD', E'dinaro del Bahrein');
INSERT INTO "list" ("id", "value") VALUES (E'YDD', E'dinaro dello Yemen');
INSERT INTO "list" ("id", "value") VALUES (E'YUD', E'dinaro forte yugoslavo');
INSERT INTO "list" ("id", "value") VALUES (E'JOD', E'dinaro giordano');
INSERT INTO "list" ("id", "value") VALUES (E'IQD', E'dinaro iracheno');
INSERT INTO "list" ("id", "value") VALUES (E'KWD', E'dinaro kuwaitiano');
INSERT INTO "list" ("id", "value") VALUES (E'LYD', E'dinaro libico');
INSERT INTO "list" ("id", "value") VALUES (E'YUM', E'dinaro noviy yugoslavo');
INSERT INTO "list" ("id", "value") VALUES (E'RSD', E'dinaro serbo');
INSERT INTO "list" ("id", "value") VALUES (E'SDD', E'dinaro sudanese');
INSERT INTO "list" ("id", "value") VALUES (E'TND', E'dinaro tunisino');
INSERT INTO "list" ("id", "value") VALUES (E'AED', E'dirham degli Emirati Arabi Uniti');
INSERT INTO "list" ("id", "value") VALUES (E'MAD', E'dirham marocchino');
INSERT INTO "list" ("id", "value") VALUES (E'STD', E'dobra di Sao Tomé e Principe');
INSERT INTO "list" ("id", "value") VALUES (E'AUD', E'dollaro australiano');
INSERT INTO "list" ("id", "value") VALUES (E'CAD', E'dollaro canadese');
INSERT INTO "list" ("id", "value") VALUES (E'XCD', E'dollaro dei Caraibi orientali');
INSERT INTO "list" ("id", "value") VALUES (E'BZD', E'dollaro del Belize');
INSERT INTO "list" ("id", "value") VALUES (E'BND', E'dollaro del Brunei');
INSERT INTO "list" ("id", "value") VALUES (E'SRD', E'dollaro del Suriname');
INSERT INTO "list" ("id", "value") VALUES (E'GYD', E'dollaro della Guyana');
INSERT INTO "list" ("id", "value") VALUES (E'RHD', E'dollaro della Rhodesia');
INSERT INTO "list" ("id", "value") VALUES (E'BSD', E'dollaro delle Bahamas');
INSERT INTO "list" ("id", "value") VALUES (E'BMD', E'dollaro delle Bermuda');
INSERT INTO "list" ("id", "value") VALUES (E'FJD', E'dollaro delle Figi');
INSERT INTO "list" ("id", "value") VALUES (E'KYD', E'dollaro delle Isole Cayman');
INSERT INTO "list" ("id", "value") VALUES (E'SBD', E'dollaro delle Isole Salomone');
INSERT INTO "list" ("id", "value") VALUES (E'ZWD', E'dollaro dello Zimbabwe');
INSERT INTO "list" ("id", "value") VALUES (E'BBD', E'dollaro di Barbados');
INSERT INTO "list" ("id", "value") VALUES (E'HKD', E'dollaro di Hong Kong');
INSERT INTO "list" ("id", "value") VALUES (E'SGD', E'dollaro di Singapore');
INSERT INTO "list" ("id", "value") VALUES (E'TTD', E'dollaro di Trinidad e Tobago');
INSERT INTO "list" ("id", "value") VALUES (E'JMD', E'dollaro giamaicano');
INSERT INTO "list" ("id", "value") VALUES (E'LRD', E'dollaro liberiano');
INSERT INTO "list" ("id", "value") VALUES (E'NAD', E'dollaro namibiano');
INSERT INTO "list" ("id", "value") VALUES (E'NZD', E'dollaro neozelandese');
INSERT INTO "list" ("id", "value") VALUES (E'USD', E'dollaro statunitense');
INSERT INTO "list" ("id", "value") VALUES (E'USN', E'dollaro statunitense (next day)');
INSERT INTO "list" ("id", "value") VALUES (E'USS', E'dollaro statunitense (same day)');
INSERT INTO "list" ("id", "value") VALUES (E'ZWL', E'dollaro zimbabwiano (2009)');
INSERT INTO "list" ("id", "value") VALUES (E'VND', E'dong vietnamita');
INSERT INTO "list" ("id", "value") VALUES (E'GRD', E'dracma greca');
INSERT INTO "list" ("id", "value") VALUES (E'AMD', E'dram armeno');
INSERT INTO "list" ("id", "value") VALUES (E'GQE', E'ekwele della Guinea Equatoriale');
INSERT INTO "list" ("id", "value") VALUES (E'CVE', E'escudo capoverdiano');
INSERT INTO "list" ("id", "value") VALUES (E'MZE', E'escudo del Mozambico');
INSERT INTO "list" ("id", "value") VALUES (E'GWE', E'escudo della Guinea portoghese');
INSERT INTO "list" ("id", "value") VALUES (E'TPE', E'escudo di Timor');
INSERT INTO "list" ("id", "value") VALUES (E'PTE', E'escudo portoghese');
INSERT INTO "list" ("id", "value") VALUES (E'EUR', E'euro');
INSERT INTO "list" ("id", "value") VALUES (E'SRG', E'fiorino del Suriname');
INSERT INTO "list" ("id", "value") VALUES (E'ANG', E'fiorino delle Antille olandesi');
INSERT INTO "list" ("id", "value") VALUES (E'AWG', E'fiorino di Aruba');
INSERT INTO "list" ("id", "value") VALUES (E'NLG', E'fiorino olandese');
INSERT INTO "list" ("id", "value") VALUES (E'HUF', E'fiorino ungherese');
INSERT INTO "list" ("id", "value") VALUES (E'XRE', E'fondi RINET');
INSERT INTO "list" ("id", "value") VALUES (E'XOF', E'franco CFA BCEAO');
INSERT INTO "list" ("id", "value") VALUES (E'XAF', E'franco CFA BEAC');
INSERT INTO "list" ("id", "value") VALUES (E'XPF', E'franco CFP');
INSERT INTO "list" ("id", "value") VALUES (E'XFU', E'franco UIC francese');
INSERT INTO "list" ("id", "value") VALUES (E'BEF', E'franco belga');
INSERT INTO "list" ("id", "value") VALUES (E'BEC', E'franco belga (convertibile)');
INSERT INTO "list" ("id", "value") VALUES (E'BEL', E'franco belga (finanziario)');
INSERT INTO "list" ("id", "value") VALUES (E'KMF', E'franco comoriano');
INSERT INTO "list" ("id", "value") VALUES (E'CDF', E'franco congolese');
INSERT INTO "list" ("id", "value") VALUES (E'LUC', E'franco convertibile del Lussemburgo');
INSERT INTO "list" ("id", "value") VALUES (E'BIF', E'franco del Burundi');
INSERT INTO "list" ("id", "value") VALUES (E'LUF', E'franco del Lussemburgo');
INSERT INTO "list" ("id", "value") VALUES (E'GNF', E'franco della Guinea');
INSERT INTO "list" ("id", "value") VALUES (E'DJF', E'franco di Gibuti');
INSERT INTO "list" ("id", "value") VALUES (E'MLF', E'franco di Mali');
INSERT INTO "list" ("id", "value") VALUES (E'LUL', E'franco finanziario del Lussemburgo');
INSERT INTO "list" ("id", "value") VALUES (E'FRF', E'franco francese');
INSERT INTO "list" ("id", "value") VALUES (E'MGF', E'franco malgascio');
INSERT INTO "list" ("id", "value") VALUES (E'MAF', E'franco marocchino');
INSERT INTO "list" ("id", "value") VALUES (E'XFO', E'franco oro francese');
INSERT INTO "list" ("id", "value") VALUES (E'RWF', E'franco ruandese');
INSERT INTO "list" ("id", "value") VALUES (E'CHF', E'franco svizzero');
INSERT INTO "list" ("id", "value") VALUES (E'HTG', E'gourde haitiano');
INSERT INTO "list" ("id", "value") VALUES (E'UAH', E'grivnia ucraina');
INSERT INTO "list" ("id", "value") VALUES (E'PYG', E'guaraní paraguayano');
INSERT INTO "list" ("id", "value") VALUES (E'PEI', E'inti peruviano');
INSERT INTO "list" ("id", "value") VALUES (E'UAK', E'karbovanetz ucraino');
INSERT INTO "list" ("id", "value") VALUES (E'PGK', E'kina papuana');
INSERT INTO "list" ("id", "value") VALUES (E'LAK', E'kip laotiano');
INSERT INTO "list" ("id", "value") VALUES (E'HRK', E'kuna croata');
INSERT INTO "list" ("id", "value") VALUES (E'GEK', E'kupon larit georgiano');
INSERT INTO "list" ("id", "value") VALUES (E'ZMW', E'kwacha dello Zambia');
INSERT INTO "list" ("id", "value") VALUES (E'ZMK', E'kwacha dello Zambia (1968–2012)');
INSERT INTO "list" ("id", "value") VALUES (E'MWK', E'kwacha malawiano');
INSERT INTO "list" ("id", "value") VALUES (E'AOA', E'kwanza angolano');
INSERT INTO "list" ("id", "value") VALUES (E'AOK', E'kwanza angolano (1977–1990)');
INSERT INTO "list" ("id", "value") VALUES (E'AOR', E'kwanza reajustado angolano (1995–1999)');
INSERT INTO "list" ("id", "value") VALUES (E'BUK', E'kyat birmano');
INSERT INTO "list" ("id", "value") VALUES (E'MMK', E'kyat di Myanmar');
INSERT INTO "list" ("id", "value") VALUES (E'GEL', E'lari georgiano');
INSERT INTO "list" ("id", "value") VALUES (E'LVL', E'lats lettone');
INSERT INTO "list" ("id", "value") VALUES (E'ALL', E'lek albanese');
INSERT INTO "list" ("id", "value") VALUES (E'HNL', E'lempira honduregna');
INSERT INTO "list" ("id", "value") VALUES (E'SLL', E'leone della Sierra Leone');
INSERT INTO "list" ("id", "value") VALUES (E'ROL', E'leu della Romania');
INSERT INTO "list" ("id", "value") VALUES (E'MDL', E'leu moldavo');
INSERT INTO "list" ("id", "value") VALUES (E'RON', E'leu rumeno');
INSERT INTO "list" ("id", "value") VALUES (E'BGN', E'lev bulgaro');
INSERT INTO "list" ("id", "value") VALUES (E'BGL', E'lev bulgaro (1962–1999)');
INSERT INTO "list" ("id", "value") VALUES (E'SZL', E'lilangeni dello Swaziland');
INSERT INTO "list" ("id", "value") VALUES (E'ITL', E'lira italiana');
INSERT INTO "list" ("id", "value") VALUES (E'LBP', E'lira libanese');
INSERT INTO "list" ("id", "value") VALUES (E'MTL', E'lira maltese');
INSERT INTO "list" ("id", "value") VALUES (E'SYP', E'lira siriana');
INSERT INTO "list" ("id", "value") VALUES (E'TRY', E'lira turca');
INSERT INTO "list" ("id", "value") VALUES (E'TRL', E'lira turca (1922–2005)');
INSERT INTO "list" ("id", "value") VALUES (E'LTL', E'litas lituano');
INSERT INTO "list" ("id", "value") VALUES (E'LSL', E'loti del Lesotho');
INSERT INTO "list" ("id", "value") VALUES (E'AZN', E'manat azero');
INSERT INTO "list" ("id", "value") VALUES (E'AZM', E'manat azero (1993–2006)');
INSERT INTO "list" ("id", "value") VALUES (E'TMT', E'manat turkmeno');
INSERT INTO "list" ("id", "value") VALUES (E'TMM', E'manat turkmeno (1993–2009)');
INSERT INTO "list" ("id", "value") VALUES (E'BAM', E'marco convertibile della Bosnia-Herzegovina');
INSERT INTO "list" ("id", "value") VALUES (E'DEM', E'marco tedesco');
INSERT INTO "list" ("id", "value") VALUES (E'FIM', E'markka finlandese');
INSERT INTO "list" ("id", "value") VALUES (E'MZN', E'metical mozambicano');
INSERT INTO "list" ("id", "value") VALUES (E'BOV', E'mvdol boliviano');
INSERT INTO "list" ("id", "value") VALUES (E'NGN', E'naira nigeriana');
INSERT INTO "list" ("id", "value") VALUES (E'ERN', E'nakfa eritreo');
INSERT INTO "list" ("id", "value") VALUES (E'BTN', E'ngultrum bhutanese');
INSERT INTO "list" ("id", "value") VALUES (E'TWD', E'nuovo dollaro taiwanese');
INSERT INTO "list" ("id", "value") VALUES (E'AON', E'nuovo kwanza angolano (1990–2000)');
INSERT INTO "list" ("id", "value") VALUES (E'BYB', E'nuovo rublo bielorusso (1994–1999)');
INSERT INTO "list" ("id", "value") VALUES (E'ILS', E'nuovo siclo israeliano');
INSERT INTO "list" ("id", "value") VALUES (E'ZRN', E'nuovo zaire dello Zaire');
INSERT INTO "list" ("id", "value") VALUES (E'DDM', E'ostmark della Germania Orientale');
INSERT INTO "list" ("id", "value") VALUES (E'MRO', E'ouguiya della Mauritania');
INSERT INTO "list" ("id", "value") VALUES (E'MOP', E'pataca di Macao');
INSERT INTO "list" ("id", "value") VALUES (E'TOP', E'paʻanga tongano');
INSERT INTO "list" ("id", "value") VALUES (E'ADP', E'peseta andorrana');
INSERT INTO "list" ("id", "value") VALUES (E'ESP', E'peseta spagnola');
INSERT INTO "list" ("id", "value") VALUES (E'ESA', E'peseta spagnola account');
INSERT INTO "list" ("id", "value") VALUES (E'ESB', E'peseta spagnola account convertibile');
INSERT INTO "list" ("id", "value") VALUES (E'ARS', E'peso argentino');
INSERT INTO "list" ("id", "value") VALUES (E'ARP', E'peso argentino (vecchio Cod.)');
INSERT INTO "list" ("id", "value") VALUES (E'BOP', E'peso boliviano');
INSERT INTO "list" ("id", "value") VALUES (E'CLP', E'peso cileno');
INSERT INTO "list" ("id", "value") VALUES (E'COP', E'peso colombiano');
INSERT INTO "list" ("id", "value") VALUES (E'CUP', E'peso cubano');
INSERT INTO "list" ("id", "value") VALUES (E'CUC', E'peso cubano convertibile');
INSERT INTO "list" ("id", "value") VALUES (E'GWP', E'peso della Guinea-Bissau');
INSERT INTO "list" ("id", "value") VALUES (E'DOP', E'peso dominicano');
INSERT INTO "list" ("id", "value") VALUES (E'PHP', E'peso filippino');
INSERT INTO "list" ("id", "value") VALUES (E'MXN', E'peso messicano');
INSERT INTO "list" ("id", "value") VALUES (E'MXP', E'peso messicano d'argento (1861–1992)');
INSERT INTO "list" ("id", "value") VALUES (E'UYP', E'peso uruguaiano (1975–1993)');
INSERT INTO "list" ("id", "value") VALUES (E'UYI', E'peso uruguaiano in unità indicizzate');
INSERT INTO "list" ("id", "value") VALUES (E'UYU', E'peso uruguayano');
INSERT INTO "list" ("id", "value") VALUES (E'BWP', E'pula del Botswana');
INSERT INTO "list" ("id", "value") VALUES (E'GTQ', E'quetzal guatemalteco');
INSERT INTO "list" ("id", "value") VALUES (E'ZAR', E'rand sudafricano');
INSERT INTO "list" ("id", "value") VALUES (E'ZAL', E'rand sudafricano (finanziario)');
INSERT INTO "list" ("id", "value") VALUES (E'BRL', E'real brasiliano');
INSERT INTO "list" ("id", "value") VALUES (E'CNY', E'renminbi cinese');
INSERT INTO "list" ("id", "value") VALUES (E'IRR', E'rial iraniano');
INSERT INTO "list" ("id", "value") VALUES (E'OMR', E'rial omanita');
INSERT INTO "list" ("id", "value") VALUES (E'QAR', E'rial qatariano');
INSERT INTO "list" ("id", "value") VALUES (E'KHR', E'riel cambogiano');
INSERT INTO "list" ("id", "value") VALUES (E'MYR', E'ringgit malese');
INSERT INTO "list" ("id", "value") VALUES (E'SAR', E'riyal saudita');
INSERT INTO "list" ("id", "value") VALUES (E'YER', E'riyal yemenita');
INSERT INTO "list" ("id", "value") VALUES (E'BYN', E'rublo bielorusso');
INSERT INTO "list" ("id", "value") VALUES (E'BYR', E'rublo bielorusso (2000–2016)');
INSERT INTO "list" ("id", "value") VALUES (E'TJR', E'rublo del Tajikistan');
INSERT INTO "list" ("id", "value") VALUES (E'RUR', E'rublo della CSI');
INSERT INTO "list" ("id", "value") VALUES (E'LVR', E'rublo lettone');
INSERT INTO "list" ("id", "value") VALUES (E'RUB', E'rublo russo');
INSERT INTO "list" ("id", "value") VALUES (E'SUR', E'rublo sovietico');
INSERT INTO "list" ("id", "value") VALUES (E'MVR', E'rufiyaa delle Maldive');
INSERT INTO "list" ("id", "value") VALUES (E'SCR', E'rupia delle Seychelles');
INSERT INTO "list" ("id", "value") VALUES (E'LKR', E'rupia di Sri Lanka');
INSERT INTO "list" ("id", "value") VALUES (E'INR', E'rupia indiana');
INSERT INTO "list" ("id", "value") VALUES (E'IDR', E'rupia indonesiana');
INSERT INTO "list" ("id", "value") VALUES (E'MUR', E'rupia mauriziana');
INSERT INTO "list" ("id", "value") VALUES (E'NPR', E'rupia nepalese');
INSERT INTO "list" ("id", "value") VALUES (E'PKR', E'rupia pakistana');
INSERT INTO "list" ("id", "value") VALUES (E'ATS', E'scellino austriaco');
INSERT INTO "list" ("id", "value") VALUES (E'TZS', E'scellino della Tanzania');
INSERT INTO "list" ("id", "value") VALUES (E'KES', E'scellino keniota');
INSERT INTO "list" ("id", "value") VALUES (E'SOS', E'scellino somalo');
INSERT INTO "list" ("id", "value") VALUES (E'UGX', E'scellino ugandese');
INSERT INTO "list" ("id", "value") VALUES (E'UGS', E'scellino ugandese (1966–1987)');
INSERT INTO "list" ("id", "value") VALUES (E'PEN', E'sol peruviano');
INSERT INTO "list" ("id", "value") VALUES (E'PES', E'sol peruviano (1863–1965)');
INSERT INTO "list" ("id", "value") VALUES (E'KGS', E'som kirghiso');
INSERT INTO "list" ("id", "value") VALUES (E'TJS', E'somoni tagiko');
INSERT INTO "list" ("id", "value") VALUES (E'GBP', E'sterlina britannica');
INSERT INTO "list" ("id", "value") VALUES (E'CYP', E'sterlina cipriota');
INSERT INTO "list" ("id", "value") VALUES (E'FKP', E'sterlina delle Falkland');
INSERT INTO "list" ("id", "value") VALUES (E'GIP', E'sterlina di Gibilterra');
INSERT INTO "list" ("id", "value") VALUES (E'SHP', E'sterlina di Sant'Elena');
INSERT INTO "list" ("id", "value") VALUES (E'EGP', E'sterlina egiziana');
INSERT INTO "list" ("id", "value") VALUES (E'IEP', E'sterlina irlandese');
INSERT INTO "list" ("id", "value") VALUES (E'ILP', E'sterlina israeliana');
INSERT INTO "list" ("id", "value") VALUES (E'MTP', E'sterlina maltese');
INSERT INTO "list" ("id", "value") VALUES (E'SSP', E'sterlina sud-sudanese');
INSERT INTO "list" ("id", "value") VALUES (E'SDG', E'sterlina sudanese');
INSERT INTO "list" ("id", "value") VALUES (E'ECS', E'sucre dell'Ecuador');
INSERT INTO "list" ("id", "value") VALUES (E'UZS', E'sum uzbeco');
INSERT INTO "list" ("id", "value") VALUES (E'GNS', E'syli della Guinea');
INSERT INTO "list" ("id", "value") VALUES (E'BDT', E'taka bangladese');
INSERT INTO "list" ("id", "value") VALUES (E'WST', E'tala samoano');
INSERT INTO "list" ("id", "value") VALUES (E'SIT', E'tallero sloveno');
INSERT INTO "list" ("id", "value") VALUES (E'LTT', E'talonas lituani');
INSERT INTO "list" ("id", "value") VALUES (E'KZT', E'tenge kazako');
INSERT INTO "list" ("id", "value") VALUES (E'MNT', E'tugrik mongolo');
INSERT INTO "list" ("id", "value") VALUES (E'MXV', E'unidad de inversion (UDI) messicana');
INSERT INTO "list" ("id", "value") VALUES (E'ECV', E'unidad de valor constante (UVC) dell'Ecuador');
INSERT INTO "list" ("id", "value") VALUES (E'CLF', E'unidades de fomento chilene');
INSERT INTO "list" ("id", "value") VALUES (E'VUV', E'vatu di Vanuatu');
INSERT INTO "list" ("id", "value") VALUES (E'KPW', E'won nordcoreano');
INSERT INTO "list" ("id", "value") VALUES (E'KRW', E'won sudcoreano');
INSERT INTO "list" ("id", "value") VALUES (E'JPY', E'yen giapponese');
INSERT INTO "list" ("id", "value") VALUES (E'ZRZ', E'zaire dello Zaire');
INSERT INTO "list" ("id", "value") VALUES (E'PLZ', E'złoty Polacco (1950–1995)');
INSERT INTO "list" ("id", "value") VALUES (E'PLN', E'złoty polacco');


text:
/**
 * Created by ttnd on 26/12/16.
 */
"use strict";

(() => {
    let path = require('path');

    global.appRoot = __dirname;
    global.model = path.join(global.appRoot, 'model');
    global.commonPath = path.join(global.appRoot, 'common');
    global.configPath = path.join(global.appRoot, 'config');
    global.constantPath = path.join(global.appRoot, 'constants');
    global.modules = path.join(global.appRoot, 'modules');

    global.constants = require('./constants'); // make constants available to each and every one.
    global.config = require('./config');    // make config available to each and every one.
    global.util = require('./common');      // make util available to each and every one.
})();

const tcpServer = require('./bin/tcp.server');
const apiApp = require('./bin/api.server');
const tcpOptions = global.config.SERVER_OPTIONS.tcp;
const apiOptions = global.config.SERVER_OPTIONS.api;

let onServerClose = (serverName) => () => console.log(`${serverName} has closed...`);
let onServerStartListening = (serverName) => () => console.log(`${serverName} has started listening ...`);
let onServerError = (serverName) => (error) => console.log(`${serverName} has thrown some error. Details\n ${error}`);

// tcpServer.on('connection', () => )
// tcpServer.on('error')

if(process.argv[2]) {
    console.log('Starting tcp server');
    tcpServer.listen(tcpOptions.port)
        .on('close', onServerClose('tcpServer'))
        .on('listening', onServerStartListening('tcpServer'))
        .on('error', onServerError('tcpServer'));
}
if(process.argv[3]) {
    console.log('Starting api Server');
    apiApp.listen(apiOptions.port)              // returns net.Server object.
        .on('error', onServerError('apiServer'))
        .on('listening', onServerStartListening('apiServer'))
        .on('close', onServerClose('apiServer'));
}

redpajama_set_name: RedPajamaGithub


text:
describe("CloudQuery - Encryption", function () {

    it("should get encrypted passwords", function (done) {

        this.timeout(30000);

        var username = util.makeEmail();

        var obj = new CB.CloudObject('User');
        obj.set('username',username);
        obj.set('password','password');
        obj.set('email',util.makeEmail());

        obj.save().then(function(obj){
            if(obj.get('password') !== 'password'){
                //now run CloudQuery.
                var query = new CB.CloudQuery('User');
                query.equalTo('password','password');
                query.equalTo('username',username);
                query.find({
                    success : function(list){
                        if(list.length>0){
                            done();
                        }
                        else{
                            done("Cannot get items.");
                        }
                    }, error : function(query){
                        //cannot query.
                        done("Cannot query over encrypted type");
                    }
                })
            }

            else
                done("Cannot encrypt");

        }, function(){
            done("Cannot save a CloudObject");
        });

    });

     it("should get encrypted passwords over OR query", function (done) {

        this.timeout(30000);

        var username = util.makeEmail();

        var obj = new CB.CloudObject('User');
        obj.set('username',username);
        obj.set('password','password');
        obj.set('email',util.makeEmail());

        obj.save().then(function(obj){
            if(obj.get('password') !== 'password'){
                //now run CloudQuery.
                var query1 = new CB.CloudQuery('User');
                query1.equalTo('password','password');

                 var query2 = new CB.CloudQuery('User');
                query2.equalTo('password','password1');

                var query = new CB.CloudQuery.or(query1, query2);
                query.equalTo('username',username);
                query.find({
                    success : function(list){
                        if(list.length>0){
                            done();
                        }
                        else{
                            done("Cannot get items.");
                        }
                    }, error : function(query){
                        //cannot query.
                        done("Cannot query over encrypted type");
                    }
                })
            }

            else
                done("Cannot encrypt");

        }, function(){
            done("Cannot save a CloudObject");
        });

    });

    it("should not encrypt already encrypted passwords", function (done) {

        this.timeout(20000);

        var obj = new CB.CloudObject('User');
        obj.set('username',util.makeEmail());
        obj.set('password','password');
        obj.set('email',util.makeEmail());
        obj.save().then(function(obj){
            var query = new CB.CloudQuery('User');
            query.findById(obj.get('id')).then(function(obj1){
                obj1.save().then(function(obj2){
                    if(obj2.get('password') === obj2.get('password'))
                        done();
                },function(){
                    done("Encrypted the password field again");
                });
            }, function (err) {
                done("unable to find object by id");
            });
        }, function(){
            done("Cannot save a CloudObject");
        });

    });

});


text:
[Use the Python version.](https://github.com/CVBDL/ccollab2eeplatform-python)

Extract data from CodeCollaborator to EagleEye-Platform

## Usage

```sh
ccollab2eeplatform [options]
```

### Options

| Option                 | Type      | Description                                                 |
| ---------------------- | --------- | ----------------------------------------------------------- |
| `--task-id` or `-t`    | string    | The `_id` property of the task which invoked this command.  |
| `--help` or `-h`       |           | Show helping message of this command.                       |

For example:

```sh
# Run this command with task id "57837029c66dc1a4570962b6"
ccollab2eeplatform --task-id="57837029c66dc1a4570962b6"

# Run this command with task id "57837029c66dc1a4570962b6"
ccollab2eeplatform -t "57837029c66dc1a4570962b6"

# Show `ccollab2eeplatform` helping message
ccollab2eeplatform -h

# Show `ccollab2eeplatform` helping message
ccollab2eeplatform --help
```

## Notes

1. in this version, the tool will wait a keyboard hit before exit.
2. the csv files file name will be displayed in the console window.
3. the csv file will be removed just before tool exit.

## Configuration Files

### `ConfigurationFiles\ccollab-cmd.json`

It's used for configuring code collaborator command line tool. For example:

```json
[
  {
    "Id": "Reviews",
    "CmdName": "ccollab.exe",
    "Args": "admin wget ",
    "ReviewsCreationDateLow": "2016-10-01",
    "ReviewsCreationDateHigh": "2016-10-02",
    "RelUrl": "..."
  },
  {
    "Id": "Defects",
    "CmdName": "ccollab.exe",
    "Args": "admin wget ",
    "ReviewsCreationDateLow": "2016-10-01",
    "ReviewsCreationDateHigh": "2016-10-02",
    "RelUrl": "..."
  }
]
```

You're able to modify `ReviewsCreationDateLow` and `ReviewsCreationDateHigh` pairs
to set a time range for extracting data from code collaborator.

Please don't modify other fields, because it requires the tweak and rebuild application.

### `ConfigurationFiles\employees.json`

It's used for configuring employee's login name, full name and his/her product name.

Only the review/defect records which are created by these configured employees will
be calculted.

For example:

```json
[
  {
    "LoginName": "pzhong",
    "FullName": "Patrick Zhong",
    "ProductName": "ViewPoint"
  }
]
```

`LoginName` is the id used for logging in code collaborator system.
`FullName` is user's full name, it will be shown on some types of chart.
`ProductName` is user's product name.

### `ConfigurationFiles\eagleeye-settings.json`

It's used for configuring charts to be generated. Fields details:

#### `ApiRootEndpoint`

EagleEye Platform API's root endpoint. For example:

```json
{ "ApiRootEndpoint": "http://localhost:3000/api/v1/" }
```

#### `Products`

Some of the charts are generated from specific products.

Like the "review count by month" charts collection.
We'll probably generate 2 charts:

1. Review count by month for FTView
2. Review count by month for ViewPoint

We'll use the products that is configured by this field.

```json
{ "Products": [ "FTView", "ViewPoint" ] }
```

Note: The product name here must be identical to the `ProductName` from employee.json.

#### `DefectInjectionStage`, `DefectSeverityTypes` and `DefectTypes`

It's used for configuring code collaborator specific lists.
The value must be identical with the value in code collaborator.

```json
{
  "DefectInjectionStage": [
    "Code/Unit Test",
    "Design",
    "Requirements",
    "Integration/Test"
  ],
  "DefectSeverityTypes": [
    "Major",
    "Minor"
  ],
  "DefectTypes": [
    "algorithm/logic",
    "build",
    "data access",
    "documentation",
    "initialization",
    "interface",
    "maintainability",
    "performance",
    "requirements/design",
    "robustness/error handling",
    "style",
    "testing"
  ]
}
```

#### Others

All the other fields are used for configuring chart ids.
Don't modify the existing keys like `CodeDefectDensityUploaded`.
Please update the `ChartId` to the real chart id in EagleEye Platform.

Chart collection `CommentDensityChangedByMonth` may contain multiple charts.
We're able to generate a chart for each product.

`"ProductName": "*"` means generated a chart for all of the products.

```json
{
  "CodeDefectDensityUploaded": {
    "ChartId": "5799641be24561202bc7190d"
  },
  "CommentDensityChangedByMonth": [
    {
      "ProductName": "*",
      "ChartId": "5809b2827e9254582e54116d"
    },
    {
      "ProductName": "ViewPoint",
      "ChartId": "5809b2827e9254582e54116d"
    },
    {
      "ProductName": "FTView",
      "ChartId": "5809b2827e9254582e54116d"
    },
    {
      "ProductName": "FTSP_FTAE",
      "ChartId": "5809b2827e9254582e54116d"
    }
  ]
}
```


text:
package org.apache.usergrid.rest;

import java.util.Map;

import javax.ws.rs.NotAllowedException;
import javax.ws.rs.ServerErrorException;

import org.junit.Test;

import org.apache.usergrid.persistence.Entity;
import org.apache.usergrid.persistence.index.utils.UUIDUtils;
import org.apache.usergrid.rest.test.resource.AbstractRestIT;
import org.apache.usergrid.rest.test.resource.model.Organization;
import org.apache.usergrid.rest.test.resource.model.Token;
import org.apache.usergrid.services.exceptions.UnsupportedServiceOperationException;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

public class ExceptionResourceIT extends AbstractRestIT{

    @Test
    public void testNonExistingEndpoint(){
        try {

            clientSetup.getRestClient()
                       .pathResource( getOrgAppPath( "non_existant_delete_endpoint" ) ).delete( );
            fail("Should have thrown below exception");

        }catch(NotAllowedException e){
            assertEquals( 405,e.getResponse().getStatus());
        }
    }

    //test uncovered endpoints
    @Test
    public void testNotImplementedException(){
        try {

            clientSetup.getRestClient().management().orgs().delete( true );
            fail("Should have thrown below exception");

        }catch(NotAllowedException e){
            assertEquals( 405,e.getResponse().getStatus());
        }
    }
    @Test
    public void testDeleteFromWrongEndpoint(){
        try {
            clientSetup.getRestClient()
                       .pathResource( clientSetup.getOrganizationName() + "/" + clientSetup.getAppName()  ).delete( );
            fail("Should have thrown below exception");

        }catch(NotAllowedException e){
            assertEquals( 405,e.getResponse().getStatus());
        }
    }

    @Test
    public void testUnsupportedServiceOperation(){
        try {
            clientSetup.getRestClient()
                       .pathResource( getOrgAppPath( "users" ) ).delete( );
            fail("Should have thrown below exception");

        }catch(NotAllowedException e){
            assertEquals( 405,e.getResponse().getStatus());
        }
    }

}


text:
<?php
/* Prototype  : string vsprintf(string format, array args)
 * Description: Output a formatted string
 * Source code: ext/standard/formatted_print.c
*/

/*
 * Test vprintf() when different scientific formats and scientific values
 * are passed to the '$format' and '$args' arguments of the function
*/

echo "*** Testing vprintf() : scientific formats and scientific values ***\n";

// defining array of scientific formats
$formats = array(
  '%e %+e %-e',
  '%le %Le %4e %-4e',
  '%10.4e %-10.4e %.4e',
  '%\'#20e %\'20e %\'$20e %\'_20e',
  '%3$e %4$e %1$e %2$e'
);

// Arrays of scientific values for the format defined in $format.
// Each sub array contains scientific values which correspond to each format string in $format
$args_array = array(
  array(0, 1e0, "10e2" ),
  array(2.2e2, 10e10, 1000e-2, 1000e7),
  array(-22e12, 10e20, 1.2e2),
  array(1e1, +1e2, -1e3, "1e2_"),
  array(3e3, 4e3, 1e3, 2e3)
);

// looping to test vprintf() with different scientific formats from the above $format array
// and with signed and other types of  values from the above $args_array array
$counter = 1;
foreach($formats as $format) {
  echo "\n-- Iteration $counter --\n";
  $result = vprintf($format, $args_array[$counter-1]);
  echo "\n";
  var_dump($result);
  $counter++;
}

?>
===DONE===


text:
[![Build
Status](https://travis-ci.org/boxen/puppet-nginx.svg?branch=master)](https://travis-ci.org/boxen/puppet-nginx)

## Usage

```puppet
include nginx
```

## Required Puppet Modules

* boxen
* homebrew
* stdlib

## Development

Write code. Run `script/cibuild` to test it. Check the `script`
directory for other useful tools.


text:
/**
 * Partial implementation of OGC Catalog Services on the Web (CSW).
 * This package implements a framework for publishing and accessing digital catalogues
 * of metadata for geospatial data, services, and related resource information.
 *
 * @author  Thi Phuong Hao Nguyen (VNSC)
 * @since   0.8
 * @version 0.8
 * @module
 */
@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.CSW, xmlns = {
    @XmlNs(prefix = "csw", namespaceURI = Namespaces.CSW),
    @XmlNs(prefix = "ows", namespaceURI = CswConfigure.OWS),
    @XmlNs(prefix = "dc",  namespaceURI = CswConfigure.DUBLIN_CORE),
    @XmlNs(prefix = "dct", namespaceURI =CswConfigure.DUBLIN_TERMS)
})
@XmlAccessorType(XmlAccessType.FIELD)
package org.apache.sis.services.csw.reponse;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;
import org.apache.sis.services.csw.CswConfigure;
import org.apache.sis.xml.Namespaces;


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VisitorPattern
{
    // Concrete class.
    public class Computer : IComputerPart
    {
        List<IComputerPart> parts = new List<IComputerPart>();
        public Computer()
        {
            parts.Add(new Mouse());
            parts.Add(new Keyboard());
            parts.Add(new Monitor());
        }

        public void accept(IComputerPartVisitor cpv)
        {
            for (int i = 0; i < parts.Count(); i++)
            {
                parts[i].accept(cpv);
            }
            cpv.visit(this);
        }
    }
}


text:
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.

Imports Microsoft.CodeAnalysis
Imports Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem

Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.ProjectSystemShim
    Friend Class EntryPointFinder
        Inherits AbstractEntryPointFinder

        Private ReadOnly _findFormsOnly As Boolean

        Public Sub New(findFormsOnly As Boolean)
            Me._findFormsOnly = findFormsOnly
        End Sub

        Protected Overrides Function MatchesMainMethodName(name As String) As Boolean
            If _findFormsOnly Then
                Return False
            End If

            Return String.Equals(name, "Main", StringComparison.OrdinalIgnoreCase)
        End Function

        Public Shared Function FindEntryPoints(symbol As INamespaceSymbol, findFormsOnly As Boolean) As IEnumerable(Of INamedTypeSymbol)
            Dim visitor = New EntryPointFinder(findFormsOnly)
            ' Attempt to only search source symbols
            ' Some callers will give a symbol that is not part of a compilation
            If symbol.ContainingCompilation IsNot Nothing Then
                symbol = symbol.ContainingCompilation.SourceModule.GlobalNamespace
            End If

            visitor.Visit(symbol)
            Return visitor.EntryPoints
        End Function

        Public Overrides Sub VisitNamedType(symbol As INamedTypeSymbol)
            ' It's a form if it Inherits System.Windows.Forms.Form.
            Dim baseType = symbol.BaseType
            While baseType IsNot Nothing
                If baseType.ToDisplayString() = "System.Windows.Forms.Form" Then
                    EntryPoints.Add(symbol)
                    Exit While
                End If

                baseType = baseType.BaseType
            End While

            MyBase.VisitNamedType(symbol)
        End Sub

    End Class
End Namespace


text:
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="android:textColor">@color/font_black</item>
    </style>

</resources>


text: export { default } from './changePasswordErrorCodes';


text:
<?php
/**
 * Created by PhpStorm.
 * User: zyy
 * Date: 2017/8/29
 * Time: 10:57
 */

namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Services\WeixinServices;
use EasyWeChat\Foundation\Application;

class WxCheckController extends Controller
{
    protected $request;
    private $service;

    public function __construct(Request $request,WeixinServices $weixinServices)
    {
        $this->request = $request;
        $this->service = $weixinServices;

    }

    public function index()
    {

        if(env('WX_IS_MEG')){  //第一次验证
            $this->urlCheck();
        }else{   //消息处理
            $this->msgTypeSeparate();
        }
    }

    /** 微信回调地址检测
     * @throws \Exception
     */
    public function urlCheck()
    {
        try{
            $weiXinInfo = $this->request->all();
            $param = [env('wx_url_token') ,$weiXinInfo['timestamp'],$weiXinInfo['nonce']];
            sort($param,SORT_STRING);
            $requestString = sha1(implode($param));
            if($requestString===$weiXinInfo['signature']){
                echo $weiXinInfo['echostr'];
            }
            return false;
        }catch (\Exception $e){
            throw new \Exception($e->getMessage());
        }
    }

    /** 获取accessToken
     * @throws \Exception
     */
    public function getAccessToken()
    {
        echo $this->service->getAccToken();

    }

    public function msgTypeSeparate()
    {
        $option = [
            'debug'  => true,
            'app_id' =>config('wechat.app_id'),
            'secret' => config('wechat.secret'),
            'token'  =>config('wechat.token')
        ];
        $app = new Application($option);
        $server = $app->server;
        // dd($server->getMessage());
        $server->setMessageHandler(function ($message) {
            return "您好!欢迎关注我!";
        });
        $response = $server->serve();
        return $response;
    }

}


text:
<?php

namespace Taller\Bundle\CursoBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class TallerCursoBundle extends Bundle
{
}


text:
#include <usModuleActivator.h>
#include <usModuleContext.h>

#include <mitkRTDoseReaderService.h>
#include <mitkRTPlanReaderService.h>
#include <mitkRTStructureSetReaderService.h>

#include <mitkCoreServices.h>
#include <mitkIPropertyDescriptions.h>
#include <mitkIPropertyPersistence.h>

#include "mitkDicomRTIOMimeTypes.h"

namespace mitk
{
  /**
  \brief Registers services for segmentation module.
  */
  class DicomRTIOActivator : public us::ModuleActivator
  {
  public:

    void Load(us::ModuleContext* context) override
    {
      us::ServiceProperties props;
      props[ us::ServiceConstants::SERVICE_RANKING() ] = 100;

      m_MimeTypes = mitk::DicomRTIOMimeTypes::Get();
      for (std::vector<mitk::CustomMimeType*>::const_iterator mimeTypeIter = m_MimeTypes.begin(),
        iterEnd = m_MimeTypes.end(); mimeTypeIter != iterEnd; ++mimeTypeIter)
      {
        context->RegisterService(*mimeTypeIter, props);
      }

      m_RTDoseReader = new RTDoseReaderService();
      m_RTPlanReader = new RTPlanReaderService();
      m_RTStructureSetReader = new RTStructureSetReaderService();
    }

    void Unload(us::ModuleContext*) override
    {
      for (auto& aMimeType : m_MimeTypes)
      {
        delete aMimeType;
      }

      delete m_RTDoseReader;
      delete m_RTPlanReader;
      delete m_RTStructureSetReader;
    }

  private:

    RTDoseReaderService * m_RTDoseReader;
    RTPlanReaderService * m_RTPlanReader;
    RTStructureSetReaderService * m_RTStructureSetReader;

    std::vector<mitk::CustomMimeType*> m_MimeTypes;

  };
}

US_EXPORT_MODULE_ACTIVATOR(mitk::DicomRTIOActivator)


text:
package com.querydsl.core.types;

import static org.junit.Assert.assertEquals;

import java.util.Collections;

import org.junit.Test;

import com.querydsl.core.Tuple;
import com.querydsl.core.types.dsl.Expressions;
import com.querydsl.core.types.dsl.StringPath;

public class DeepPopulationTest {

    public static class Entity1 {

        private Entity2 entity2;

        public Entity2 getEntity2() {
            return entity2;
        }

        public void setEntity2(Entity2 entity2) {
            this.entity2 = entity2;
        }

    }

    public static class Entity2 {

        private String name, id;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

    }

    @Test
    public void deep_population_via_qBean() {
        StringPath name = Expressions.stringPath("name");
        StringPath id = Expressions.stringPath("id");
        QBean<Entity2> entity2Bean = new QBean<Entity2>(Entity2.class, name, id);
        QBean<Entity1> entity1Bean = new QBean<Entity1>(Entity1.class,
                Collections.singletonMap("entity2", entity2Bean));

        Entity1 entity1 = FactoryExpressionUtils.wrap(entity1Bean).newInstance("nameX","idX");
        assertEquals("nameX", entity1.getEntity2().getName());
        assertEquals("idX", entity1.getEntity2().getId());
    }

    @Test
    public void deep_population_via_qTuple() {
        StringPath name = Expressions.stringPath("name");
        StringPath id = Expressions.stringPath("id");
        QBean<Entity2> entity2Bean = new QBean<Entity2>(Entity2.class, name, id);
        QTuple tupleExpr = new QTuple(entity2Bean);

        Tuple tuple = FactoryExpressionUtils.wrap(tupleExpr).newInstance("nameX","idX");
        assertEquals("nameX", tuple.get(entity2Bean).getName());
        assertEquals("idX", tuple.get(entity2Bean).getId());
    }

}


text:
The NUnit 3.0 team is led by [Charlie Poole](https://github.com/CharliePoole) and
[Rob Prouse](https://github.com/rprouse). [Terje Sandstrom](https://github.com/OsirisTerje)
maintains the Visual Studio adapters and [Neil Colvin](https://github.com/oznetmaster)
keeps the CF version of the framework on track.

Other members of the NUnit team are;

- [Simone Busoli](https://github.com/simoneb)
- [Andreas Schlapsi](https://github.com/aschlapsi)
- [Igor Ziselman](https://github.com/constructor-igor)
- [Vladimir Kloz](https://github.com/voloda)
- [Matthew Moore](https://github.com/acco32)
- [Andrew Gray](https://github.com/agray)
- [Chris Smith](https://github.com/chris-smith-zocdoc)
- [Sergey Popov](https://github.com/psg1234)
- [elksson](https://github.com/elksson)
- [Nikolay Pianikov](https://github.com/NikolayPianikov)

NUnit would also not be possible without the numerous contributions from the community. A
complete list of contributors since NUnit migrated to Git can be
[found on GitHub](https://github.com/nunit/nunit/graphs/contributors).

Earlier versions of NUnit were developed by Charlie Poole, James W. Newkirk, Alexei A. Vorontsov,
Michael C. Two and Philip A. Craig.

We would also like to thank the following people for their contributions and support:
Jamie Cansdale, Cvetomir Todorov, Doug de la Torre, David White, Ethan Smith, Al Gonzalez,
Ron Jeffries and Rob Jeffries. A special acknowledgment needs to be sent to Kent Beck
and Erich Gamma because without their efforts none of this would have been possible.


text:
<?php

require_once 'lib/Twig/Autoloader.php';
Twig_Autoloader::register();

$loader = new Twig_Loader_Filesystem('tmp');
$twig = new Twig_Environment($loader);

$tmp = (isset($_GET['tmp'])) ? $_GET['tmp'].'.html' : 'base.html';

include('data.php');

echo $twig->render($tmp, array('data' => $data));

?>


text:
import { takeLatest } from 'redux-saga'
import { fork, call, put } from 'redux-saga/effects'
import array from 'lodash/array'
import {
    getOrganizeLessonInfo,
    editOrganizeLesson,
    addOrganizeLesson,
    getOrganizeLessonList,
    // getOrganizeLesson
} from '../services/organizeLesson.js'
import { getOrganizeList } from '../services/organize'
import { listLesson } from '../services/lesson'
import { getLessonTeamList } from '../services/lessonTeam'
import { getUserList } from '../services/user'

function* watchList() {
  yield takeLatest('organize_lesson/list', function *(action) {
    try {
      const { list } = yield call(getOrganizeLessonList, action.payload.params)
      if (list && list.length > 0) {
        if (action.payload.params.lesson_id > 0) {
          const result = yield call(getOrganizeList, {
            id_list: list.map(i => i.organize_id).join(','),
            state: 1
          })
          if (action.payload.resolve) {
            action.payload.resolve(result.list)
          }
        } else {
          const result = yield call(listLesson, {
            id_list: list.map(i => i.lesson_id).join(','),
            state: 1
          })
          if (action.payload.resolve) {
            action.payload.resolve(result.list)
          }
        }

      } else {
        if (action.payload.resolve) {
          action.payload.resolve([])
        }
      }
    } catch (error) {
      if (action.payload.reject) {
        action.payload.reject(error)
      }
    }
  })
}

function* organizeLessonInfoHandler(action){
    try{
        const result = yield call(getOrganizeLessonInfo,action.payload.params)
        if (action.payload.resolve) {
          action.payload.resolve(result.count)
        }
    }catch(error){
        if (action.payload.reject) {
          action.payload.reject(error)
        }
    }
}

function* watchOrganzieLessonInfo(){
    yield* takeLatest('organize_lesson/info',organizeLessonInfoHandler)
}

function* editOrganizeLessonHandler(action){
    try {
        yield call(editOrganizeLesson,action.payload.params)
        if (action.payload.resolve) {
          action.payload.resolve()
        }
    } catch(error) {
      if (action.payload.reject) {
        action.payload.reject(error)
      }
    }
}

function* watchOrganzieLessonEdit(){
    yield* takeLatest('organize_lesson/edit',editOrganizeLessonHandler)
}

function* newHandler(action){
    try {
        yield call(addOrganizeLesson,action.payload.params)
        if (action.payload.resolve) {
          action.payload.resolve()
        }
    } catch (error) {
      if (action.payload.reject) {
        action.payload.reject(error)
      }
    }
}

function* watchNew(){
    yield* takeLatest('organize_lesson/add',newHandler)
}

// function* watchGet() {
//   yield takeLatest('organize_lesson/get', function *(action) {
//     try {
//       const { get } = yield call(getOrganizeLesson, action.payload.params)
//       if (action.payload.resolve) {
//         action.payload.resolve(get)
//       }
//     } catch (error) {
//       if (action.payload.reject) {
//         action.payload.reject(error)
//       }
//     }
//   })
// }

function* watchOrganizeLessonList() {
  yield* takeLatest('organize/lesson/list', function*(action) {
    try {
      const result = yield  call(getOrganizeLessonList, action.payload.params)
      let payload = []
      if (result.list && result.length > 0) {
        const lessons = yield call(listLesson, {
          id_list: result.list.map(i => i.lesson_id).join(','),
          state: action.payload.params.lesson_state || 0
        })
        if (lessons.list && lessons.list.length > 0) {
          const teams = yield call(getLessonTeamList, {
            lesson_id_list: lessons.list.map(i => i.id).join(','),
            role: 1
          })
          if (teams.list && teams.list.length > 0) {
            const users = yield call(getUserList, { id_list: array.uniq(teams.list.map(i => i.account_id).join(',')) })
            payload = lessons.list.map(item => {
              const user = users.list.find(u => u.id === item.account_id)
              if (user) {
                item.admin = `${user.cname}/${user.mobile}`
                return item
              }
              return item
            })
          } else {
            payload = lessons.list
          }
        }
      }
      yield put({
        type: 'organize/lesson/list/success',
        payload
      })
    } catch(error) {
      yield put({
        type: 'organize/lesson/list/failure'
      })
      if (action.payload.reject) {
        action.payload.reject(error)
      }
    }
  })
}
export default function* () {
    yield [
        fork( watchOrganzieLessonInfo ),
        fork( watchOrganzieLessonEdit ),
        fork(watchNew),
        fork(watchList),
        fork(watchOrganizeLessonList)
        // fork(watchGet)
    ]
}


text:
title: ui-modal
---

```js
import 'xin-ui/ui-modal';
```

## Usage

```html
<ui-modal>
  This is modal
</ui-modal>
```

Example

### Properties

Name | Type | Description
- | - | -
full | Boolean | Show full modal


text:
<?hh

namespace Rider\Route;

class Router {
  public static function dispatch(string $path, string $method): void {

    // Get the auto-generated URI Map
    $routes = URIMap::getURIMap();

    // Match the path
    $uri = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
    foreach ($routes as $route_path => $controller_name) {
      if (preg_match("@^$route_path$@i", "$uri", $_SESSION['route_params'])) {
        $controller = (new ReflectionClass($controller_name))->newInstance();
        invariant(
          $controller instanceof \Rider\Controller\BaseController,
          "Tried to instanciate a controller which does not extend BaseController",
        );

        Auth::runChecks($controller->getConfig()->getChecks());

        try {
          \Rider\Views\Render::go($controller, $method);
        } catch (RedirectException $ex) {
          header('Location: '.$ex->getURI());
          exit();
        }

        return;
      }
    }
  }
}


text:
<?php

declare(strict_types=1);

namespace Sphp\Tests\Documentation\Linkers\PHP\PHPManual;

use Sphp\Documentation\Linkers\PHP\PHPApiUrlGenerator;
use Sphp\Documentation\Linkers\PHP\PHPManual\PHPManualURLs;
use Sphp\Documentation\Linkers\PHP\PHPManual\ManualURL;
use Sphp\Tests\Documentation\Linkers\PHP\URLGenerators\AbstractPHPApiUrlGeneratorTest;
use Sphp\Documentation\Linkers\Exceptions\NonDocumentedFeatureException;
use Sphp\Documentation\Linkers\PHP\PHPManual\PHPManualUrlBuilder;

/**
 * Class PHPManualURLSTest
 *
 * @author  Sami Holck <sami.holck@gmail.com>
 * @license https://opensource.org/licenses/MIT MIT License
 * @link    https://github.com/samhol/SPHP-framework Github repository
 * @filesource
 */
class PHPManualURLSTest extends AbstractPHPApiUrlGeneratorTest {

  use \Sphp\Tests\Documentation\Linkers\PHP\PHPManual\ManualURLTestTrait;

  public function createManualURL(string $lang = 'en'): ManualURL {
    return $this->createUrlGen($lang);
  }

  public function createUrlGen(string $lang = 'en', string $apiName = 'PHP Manual'): PHPApiUrlGenerator {
    return new PHPManualURLs(new PHPManualUrlBuilder($lang, $apiName));
  }

  /**
   * @return void
   */
  public function testConstructor() {
    $emptyBuilder = new PHPManualUrlBuilder();
    $emptyGen = new PHPManualURLs();
    $this->assertSame($emptyBuilder->getLanguage(), $emptyGen->getLanguage());
    $this->assertSame($emptyBuilder->getApiname(), $emptyGen->getApiname());
    $urlGen = new PHPManualURLs(new PHPManualUrlBuilder('fr', 'france'));
    $this->assertSame('fr', $urlGen->getLanguage());
    $this->assertSame('france', $urlGen->getApiname());
  }

  public function classMap(): array {
    $map = [];
    $map[] = [\ReflectionClass::class, 'class.reflectionclass.php'];
    $map[] = ['UI\Area', 'class.ui-area.php'];
    return $map;
  }

  public function classPropertyMap(): array {
    $map = [];
    $map[] = [\ReflectionClass::class, 'name', 'class.reflectionclass.php#reflectionclass.props.name'];
    $map[] = ['UI\Area', 'prop', 'class.ui-area.php#ui-area.props.prop'];
    return $map;
  }

  public function classMethodMap(): array {
    $map = [];
    $map[] = [\ReflectionParameter::class, '__clone', 'reflectionparameter.clone.php'];
    $map[] = [\ReflectionClass::class, '__clone', 'reflectionclass.clone.php'];
    $map[] = [\ReflectionClass::class, 'getName', 'reflectionclass.getname.php'];
    $map[] = ['UI\Area', 'onMouse', 'ui-area.onmouse.php'];
    $map[] = ['UI\Controls\Picker', '__construct', 'ui-controls-picker.construct.php'];
    return $map;
  }

  public function classConstantMap(): array {
    $map = [];
    $map[] = [\ReflectionClass ::class, 'IS_IMPLICIT_ABSTRACT', 'class.reflectionclass.php#reflectionclass.constants.is-implicit-abstract'];
    $map[] = ['UI\Area', 'Super', 'class.ui-area.php#ui-area.constants.super'];
    $map[] = [\Phar::class, 'CURRENT_AS_PATHNAME', 'class.filesystemiterator.php#filesystemiterator.constants.current-as-pathname'];
    return $map;
  }

  public function functionMap(): array {
    $map = [];
    $map[] = ['abs', 'function.abs.php'];
    $map[] = ['ctype_print', 'function.ctype-print.php'];
    return $map;
  }

  public function testGetExtensionUrl(): array {
    $gen = new PHPManualURLs();
    // print_r(get_loaded_extensions());
    foreach (get_loaded_extensions() as $extName) {
      // $gen->getExtensionUrl($extName);
      if (!\Sphp\Documentation\Linkers\PHP\PHPManual\Books\ExtensionDataManager::instance()->isReference($extName)) {
        //echo "\nEXT: $extName";
        $this->expectException(NonDocumentedFeatureException::class);
        $gen->getExtensionUrl($extName);
      } else {
        $book = $gen->getExtensionUrl($extName);
      }
    }
  }

  public function constantMap(): array {
    $output = [];
    $output[] = ['__LINE__', 'language.constants.magic.php#constant.line'];
    $output[] = ['LOG_CONS', 'network.constants.php#constant.log-cons'];
    $output[] = ['DNS_A', 'network.constants.php#constant.dns-a'];
    $output[] = ['STREAM_BUFFER_NONE', 'stream.constants.php#constant.stream-buffer-none'];
    $output[] = ['CREDITS_FULLPAGE', 'info.constants.php#constant.credits-fullpage'];
    $output[] = ['IMG_JPEG', 'image.constants.php#constant.img-jpeg'];
    $output[] = ['PHP_VERSION', 'reserved.constants.php#constant.php-version'];
    $output[] = ['DATE_RFC3339_EXTENDED', 'class.datetimeinterface.php#datetime.constants.rfc3339_extended'];
    $output[] = ['E_WARNING', 'errorfunc.constants.php#errorfunc.constants.errorlevels.e-warning'];
    return $output;
  }

  public function namespaceMap(): array {
    $output = [];
    $output[] = ['\\Ui', 'book.ui.php'];
    return $output;
  }

}


text:
"""
Aaron Buchanan
Nov. 2012

Plug-in for py.test for reporting to TeamCity server
Report results to TeamCity during test execution for immediate reporting
    when using TeamCity.

This should be installed as a py.test plugin and will be automatically enabled by running
tests under TeamCity build.
"""

import os
import re
import sys
import traceback
from datetime import timedelta

from teamcity import diff_tools
from teamcity import is_running_under_teamcity
from teamcity.common import convert_error_to_string, dump_test_stderr, dump_test_stdout
from teamcity.messages import TeamcityServiceMessages

diff_tools.patch_unittest_diff()
_ASSERTION_FAILURE_KEY = '_teamcity_assertion_failure'

def pytest_addoption(parser):
    group = parser.getgroup("terminal reporting", "reporting", after="general")

    group._addoption('--teamcity', action="count",
                     dest="teamcity", default=0, help="force output of JetBrains TeamCity service messages")
    group._addoption('--no-teamcity', action="count",
                     dest="no_teamcity", default=0, help="disable output of JetBrains TeamCity service messages")
    parser.addoption('--jb-swapdiff', action="store_true", dest="swapdiff", default=False, help="Swap actual/expected in diff")

    kwargs = {"help": "skip output of passed tests for JetBrains TeamCity service messages"}
    kwargs.update({"type": "bool"})

    parser.addini("skippassedoutput", **kwargs)
    parser.addini("swapdiff", **kwargs)

def pytest_configure(config):
    if config.option.no_teamcity >= 1:
        enabled = False
    elif config.option.teamcity >= 1:
        enabled = True
    else:
        enabled = is_running_under_teamcity()

    if enabled:
        output_capture_enabled = getattr(config.option, 'capture', 'fd') != 'no'
        coverage_controller = _get_coverage_controller(config)
        skip_passed_output = bool(config.getini('skippassedoutput'))

        config.option.verbose = 2  # don't truncate assert explanations
        config._teamcityReporting = EchoTeamCityMessages(
            output_capture_enabled,
            coverage_controller,
            skip_passed_output,
            bool(config.getini('swapdiff') or config.option.swapdiff)
        )
        config.pluginmanager.register(config._teamcityReporting)

def pytest_unconfigure(config):
    teamcity_reporting = getattr(config, '_teamcityReporting', None)
    if teamcity_reporting:
        del config._teamcityReporting
        config.pluginmanager.unregister(teamcity_reporting)

def _get_coverage_controller(config):
    cov_plugin = config.pluginmanager.getplugin('_cov')
    if not cov_plugin:
        return None

    return cov_plugin.cov_controller

class EchoTeamCityMessages(object):
    def __init__(self, output_capture_enabled, coverage_controller, skip_passed_output, swap_diff):
        self.coverage_controller = coverage_controller
        self.output_capture_enabled = output_capture_enabled
        self.skip_passed_output = skip_passed_output

        self.teamcity = TeamcityServiceMessages()
        self.test_start_reported_mark = set()
        self.current_test_item = None

        self.max_reported_output_size = 1 * 1024 * 1024
        self.reported_output_chunk_size = 50000
        self.swap_diff = swap_diff

    def get_id_from_location(self, location):
        if type(location) is not tuple or len(location) != 3 or not hasattr(location[2], "startswith"):
            return None

        def convert_file_to_id(filename):
            filename = re.sub(r"\.pyc?$", "", filename)
            return filename.replace(os.sep, ".").replace("/", ".")

        def add_prefix_to_filename_id(filename_id, prefix):
            dot_location = filename_id.rfind('.')
            if dot_location <= 0 or dot_location >= len(filename_id) - 1:
                return None

            return filename_id[:dot_location + 1] + prefix + filename_id[dot_location + 1:]

        pylint_prefix = '[pylint] '
        if location[2].startswith(pylint_prefix):
            id_from_file = convert_file_to_id(location[2][len(pylint_prefix):])
            return id_from_file + ".Pylint"

        if location[2] == "PEP8-check":
            id_from_file = convert_file_to_id(location[0])
            return id_from_file + ".PEP8"

        return None

    def format_test_id(self, nodeid, location):
        id_from_location = self.get_id_from_location(location)

        if id_from_location is not None:
            return id_from_location

        test_id = nodeid

        if test_id:
            if test_id.find("::") < 0:
                test_id += "::top_level"
        else:
            test_id = "top_level"

        first_bracket = test_id.find("[")
        if first_bracket > 0:
            # [] -> (), make it look like nose parameterized tests
            params = "(" + test_id[first_bracket + 1:]
            if params.endswith("]"):
                params = params[:-1] + ")"
            test_id = test_id[:first_bracket]
            if test_id.endswith("::"):
                test_id = test_id[:-2]
        else:
            params = ""

        test_id = test_id.replace("::()::", "::")
        test_id = re.sub(r"\.pyc?::", r"::", test_id)
        test_id = test_id.replace(".", "_").replace(os.sep, ".").replace("/", ".").replace('::', '.')

        if params:
            params = params.replace(".", "_")
            test_id += params

        return test_id

    def format_location(self, location):
        if type(location) is tuple and len(location) == 3:
            return "%s:%s (%s)" % (str(location[0]), str(location[1]), str(location[2]))
        return str(location)

    def pytest_collection_finish(self, session):
        self.teamcity.testCount(len(session.items))

    def pytest_runtest_logstart(self, nodeid, location):
        # test name fetched from location passed as metainfo to PyCharm
        # it will be used to run specific test
        # See IDEA-176950, PY-31836
        test_name = location[2]
        if test_name:
            test_name = str(test_name).split(".")[-1]
        self.ensure_test_start_reported(self.format_test_id(nodeid, location), test_name)

    def pytest_runtest_protocol(self, item):
        self.current_test_item = item
        return None  # continue to next hook

    def ensure_test_start_reported(self, test_id, metainfo=None):
        if test_id not in self.test_start_reported_mark:
            if self.output_capture_enabled:
                capture_standard_output = "false"
            else:
                capture_standard_output = "true"
            self.teamcity.testStarted(test_id, flowId=test_id, captureStandardOutput=capture_standard_output, metainfo=metainfo)
            self.test_start_reported_mark.add(test_id)

    def report_has_output(self, report):
        for (secname, data) in report.sections:
            if report.when in secname and ('stdout' in secname or 'stderr' in secname):
                return True
        return False

    def report_test_output(self, report, test_id):
        for (secname, data) in report.sections:
            # https://github.com/JetBrains/teamcity-messages/issues/112
            # CollectReport didn't have 'when' property, but now it has.
            # But we still need output on 'collect' state
            if hasattr(report, "when") and report.when not in secname and report.when != 'collect':
                continue
            if not data:
                continue

            if 'stdout' in secname:
                dump_test_stdout(self.teamcity, test_id, test_id, data)
            elif 'stderr' in secname:
                dump_test_stderr(self.teamcity, test_id, test_id, data)

    def report_test_finished(self, test_id, duration=None):
        self.teamcity.testFinished(test_id, testDuration=duration, flowId=test_id)
        self.test_start_reported_mark.remove(test_id)

    def report_test_failure(self, test_id, report, message=None, report_output=True):
        if hasattr(report, 'duration'):
            duration = timedelta(seconds=report.duration)
        else:
            duration = None

        if message is None:
            message = self.format_location(report.location)

        self.ensure_test_start_reported(test_id)
        if report_output:
            self.report_test_output(report, test_id)

        diff_error = None
        try:
            err_message = str(report.longrepr.reprcrash.message)
            diff_name = diff_tools.EqualsAssertionError.__name__
            # There is a string like "foo.bar.DiffError: [serialized_data]"
            if diff_name in err_message:
                serialized_data = err_message[err_message.index(diff_name) + len(diff_name) + 1:]
                diff_error = diff_tools.deserialize_error(serialized_data)

            assertion_tuple = getattr(self.current_test_item, _ASSERTION_FAILURE_KEY, None)
            if assertion_tuple:
                op, left, right = assertion_tuple
                if self.swap_diff:
                    left, right = right, left
                diff_error = diff_tools.EqualsAssertionError(expected=right, actual=left)
        except Exception:
            pass

        if not diff_error:
            from .jb_local_exc_store import get_exception
            diff_error = get_exception()

        if diff_error:
            # Cut everything after postfix: it is internal view of DiffError
            strace = str(report.longrepr)
            data_postfix = "_ _ _ _ _"
            # Error message in pytest must be in "file.py:22 AssertionError" format
            # This message goes to strace
            # With custom error we must add real exception class explicitly
            if data_postfix in strace:
                strace = strace[0:strace.index(data_postfix)].strip()
                if strace.endswith(":") and diff_error.real_exception:
                    strace += " " + type(diff_error.real_exception).__name__
            self.teamcity.testFailed(test_id, diff_error.msg or message, strace,
                                     flowId=test_id,
                                     comparison_failure=diff_error
                                     )
        else:
            self.teamcity.testFailed(test_id, message, str(report.longrepr), flowId=test_id)
        self.report_test_finished(test_id, duration)

    def report_test_skip(self, test_id, report):
        if type(report.longrepr) is tuple and len(report.longrepr) == 3:
            reason = report.longrepr[2]
        else:
            reason = str(report.longrepr)

        if hasattr(report, 'duration'):
            duration = timedelta(seconds=report.duration)
        else:
            duration = None

        self.ensure_test_start_reported(test_id)
        self.report_test_output(report, test_id)
        self.teamcity.testIgnored(test_id, reason, flowId=test_id)
        self.report_test_finished(test_id, duration)

    def pytest_assertrepr_compare(self, config, op, left, right):
        setattr(self.current_test_item, _ASSERTION_FAILURE_KEY, (op, left, right))

    def pytest_runtest_logreport(self, report):
        """
        :type report: _pytest.runner.TestReport
        """
        test_id = self.format_test_id(report.nodeid, report.location)

        duration = timedelta(seconds=report.duration)

        if report.passed:
            # Do not report passed setup/teardown if no output
            if report.when == 'call':
                self.ensure_test_start_reported(test_id)
                if not self.skip_passed_output:
                    self.report_test_output(report, test_id)
                self.report_test_finished(test_id, duration)
            else:
                if self.report_has_output(report) and not self.skip_passed_output:
                    block_name = "test " + report.when
                    self.teamcity.blockOpened(block_name, flowId=test_id)
                    self.report_test_output(report, test_id)
                    self.teamcity.blockClosed(block_name, flowId=test_id)
        elif report.failed:
            if report.when == 'call':
                self.report_test_failure(test_id, report)
            elif report.when == 'setup':
                if self.report_has_output(report):
                    self.teamcity.blockOpened("test setup", flowId=test_id)
                    self.report_test_output(report, test_id)
                    self.teamcity.blockClosed("test setup", flowId=test_id)

                self.report_test_failure(test_id, report, message="test setup failed", report_output=False)
            elif report.when == 'teardown':
                # Report failed teardown as a separate test as original test is already finished
                self.report_test_failure(test_id + "_teardown", report)
        elif report.skipped:
            self.report_test_skip(test_id, report)

    def pytest_collectreport(self, report):
        test_id = self.format_test_id(report.nodeid, report.location) + "_collect"

        if report.failed:
            self.report_test_failure(test_id, report)
        elif report.skipped:
            self.report_test_skip(test_id, report)

    def pytest_terminal_summary(self):
        if self.coverage_controller is not None:
            try:
                self._report_coverage()
            except Exception:
                tb = traceback.format_exc()
                self.teamcity.customMessage("Coverage statistics reporting failed", "ERROR", errorDetails=tb)

    def _report_coverage(self):
        from coverage.misc import NotPython
        from coverage.results import Numbers

        class _Reporter(object):
            def __init__(self, coverage, config):
                try:
                    from coverage.report import Reporter
                except ImportError:
                    # Support for coverage >= 5.0.1.
                    from coverage.report import get_analysis_to_report

                    class Reporter(object):

                        def __init__(self, coverage, config):
                            self.coverage = coverage
                            self.config = config
                            self._file_reporters = []

                        def find_file_reporters(self, morfs):
                            return [fr for fr, _ in get_analysis_to_report(self.coverage, morfs)]

                self._reporter = Reporter(coverage, config)

            def find_file_reporters(self, morfs):
                self.file_reporters = self._reporter.find_file_reporters(morfs)

            def __getattr__(self, name):
                return getattr(self._reporter, name)

        class _CoverageReporter(_Reporter):
            def __init__(self, coverage, config, messages):
                super(_CoverageReporter, self).__init__(coverage, config)

                if hasattr(coverage, 'data'):
                    self.branches = coverage.data.has_arcs()
                else:
                    self.branches = coverage.get_data().has_arcs()
                self.messages = messages

            def report(self, morfs, outfile=None):
                if hasattr(self, 'find_code_units'):
                    self.find_code_units(morfs)
                else:
                    self.find_file_reporters(morfs)

                total = Numbers()

                if hasattr(self, 'code_units'):
                    units = self.code_units
                else:
                    units = self.file_reporters

                for cu in units:
                    try:
                        analysis = self.coverage._analyze(cu)
                        nums = analysis.numbers
                        total += nums
                    except KeyboardInterrupt:
                        raise
                    except Exception:
                        if self.config.ignore_errors:
                            continue

                        err = sys.exc_info()
                        typ, msg = err[:2]
                        if typ is NotPython and not cu.should_be_python():
                            continue

                        test_id = cu.name
                        details = convert_error_to_string(err)

                        self.messages.testStarted(test_id, flowId=test_id)
                        self.messages.testFailed(test_id, message="Coverage analysis failed", details=details, flowId=test_id)
                        self.messages.testFinished(test_id, flowId=test_id)

                if total.n_files > 0:
                    covered = total.n_executed
                    total_statements = total.n_statements

                    if self.branches:
                        covered += total.n_executed_branches
                        total_statements += total.n_branches

                    self.messages.buildStatisticLinesCovered(covered)
                    self.messages.buildStatisticTotalLines(total_statements)
                    self.messages.buildStatisticLinesUncovered(total_statements - covered)
        reporter = _CoverageReporter(
            self.coverage_controller.cov,
            self.coverage_controller.cov.config,
            self.teamcity,
        )
        reporter.report(None)


text:
                    <input type="text" autocomplete="off" placeholder-translate="Link URL" ng-model="data.link" ng-keydown="popoverHide($event, 'makeLink')" />

                <button ng-show="canRemoveLink()" ng-click="popoverHide($event, 'removeLink')" translate-context="Action" translate>Remove link</button>
                <button ng-show="canRemoveLink()" ng-class="{disabled: !canAddLink()}" ng-click="popoverHide($event, 'makeLink')" translate-context="Action" translate>Update link</button>
                <button class="btn primary" ng-hide="canRemoveLink()" ng-class="{disabled: !canAddLink()}" ng-click="popoverHide($event, 'makeLink')" translate>Insert link</button>

                    <input type="text" autocomplete="off" placeholder-translate="URL to image" ng-model="data.image" ng-keydown="popoverHide($event, 'insertImage')" />

                <button class="btn primary" ng-click="popoverHide($event, 'insertImage')" ng-class="{disabled: !canAddImage()}" translate-context="Action" translate>Insert image</button>

    <ng-transclude></ng-transclude>


text:
namespace Fasetto.Word.Core
{
    /// <summary>
    /// The credentials for  an API client to register on the server
    /// </summary>
    public class RegisterCredentialsApiModel
    {
        #region Public Properties

        /// <summary>
        /// The users username
        /// </summary>
        public string Username { get; set; }

        /// <summary>
        /// The users email
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// The users first name
        /// </summary>
        public string FirstName { get; set; }

        /// <summary>
        /// The users last name
        /// </summary>
        public string LastName { get; set; }

        /// <summary>
        /// The users password
        /// </summary>
        public string Password { get; set; }

        #endregion

        #region Constructor

        /// <summary>
        /// Default constructor
        /// </summary>
        public RegisterCredentialsApiModel()
        {

        }

        #endregion
    }
}


text:
module.exports = {
  tags: ['login'],
  demoTagTest: function (client) {
    client.url('http://localhost')
      .assert.elementPresent('#weblogin')
      .end();
  }
};


text:
<?php

class Application_Service_SettingTest extends AbstractManagerBase
{
    private $_currencies;
    private $_repoMock;

    public function setUp()
    {
        parent::setUp();

        $this->_currencies = array(
            'EUR' => array('Euro', '€'),
            'GBP' => array('Pond Sterling', '£'),
            'USD' => array('United States Dollar', '$'),
            'YEN' => array('Yen', '¥'),
        );

        $this->_repoMock = $this->getMock(
            'App\Entity\Repository\SettingRepository',
            array(
                'findAll',
                'findOneBy',
                'saveSetting',
            ),
            array(),
            '',
            FALSE
        );
    }

    public function testFetchAll()
    {
        $this->_repoMock->expects($this->once())
            ->method('findAll')
            ->will($this->returnValue(TRUE));
        $service = new Application_Service_Setting();
        $service->setSettingRepository($this->_repoMock);
        $this->assertTrue($service->fetchAll());
    }

    public function testFetchByParameter()
    {
        $this->_repoMock->expects($this->once())
            ->method('findOneBy')
            ->will($this->returnValue(TRUE));
        $service = new Application_Service_Setting();
        $service->setSettingRepository($this->_repoMock);
        $this->assertTrue($service->fetchByParameter(1));
    }

    public function testTryToSaveEmptySettings()
    {
        $service = new Application_Service_Setting();
        $this->assertFalse($service->saveSettings(array()));
    }

    public function testSaveSettings()
    {
        $this->_repoMock->expects($this->once())
            ->method('findOneBy')
            ->will($this->returnValue(new \App\Entity\Setting('foo', 'bar')));
       $this->_repoMock->expects($this->once())
            ->method('saveSetting')
            ->will($this->returnValue(TRUE));

        $service = new Application_Service_Setting();
        $service->setSettingRepository($this->_repoMock);
        $service->setEntityManager($this->getEmMock());
        $this->assertTrue($service->saveSettings(array(array('foo' => 'bar'))));
    }

    public function testCreateCurrencyOptions()
    {
        $expected = array();
        foreach ($this->_currencies as $iso => $value) {
            $expected[$iso] = $value[0];
        }

        $service = new Application_Service_Setting();
        $this->assertEquals($expected, $service->createCurrencyOptions());
    }

    /**
     * @dataProvider isoCurrencyProvider
     */
    public function testGetCurrencySymbol($iso, $expected)
    {
        $service = new Application_Service_Setting();
        $this->assertEquals($expected, $service->getCurrenySymbol($iso));
    }

    public function isoCurrencyProvider()
    {
        return array(
            array('EUR', '€'),
            array('GBP', '£'),
            array('USD', '$'),
            array('YEN', '¥'),
            array('HULU', NULL),
        );
    }
}


text:
<?php

declare(strict_types=1);

namespace Sylius\Behat\Client;

use Symfony\Component\HttpFoundation\Response;

interface ApiIriClientInterface
{
    public function showByIri(string $iri): Response;
}


text:
A reminder to myself: how to add a new project...
- add to ProjectItems.ts, along with an thumbnail for the card
- add a vue component under projects
- use the src/components/util/ProjectTemplate.vue, and slot content into that
- any images used inside the new project should use the PreallocatedImage.vue component, to stop load jumping
- ?
- profit


text:
using NUnit.Framework;

namespace Google.GData.Apps.UnitTests
{
    [TestFixture]
    [Category("GoogleApps")]
    public class AppsServiceTest
    {

        [SetUp]
        public void Init()
        {
            service = new AppsService("example.com", "admin", "password");
        }

        [TearDown]
        public void Dispose()
        {

        }

        private AppsService service;

        [Test]
        public void GetApplicationName()
        {
            Assert.AreEqual("apps-example.com", service.ApplicationName,
                "Application name should initially be apps-example.com");
        }

        [Test]
        public void GetDomainTest()
        {
            Assert.AreEqual("example.com", service.Domain, "Domain should initially be example.com");
        }

        [Test]
        public void SetApplicationName()
        {
            string applicationName = "apps-foo.com";
            service.ApplicationName = applicationName;
            Assert.AreEqual("apps-foo.com", service.ApplicationName,
                "Application name should be apps-foo.com after setting");
        }

        [Test]
        public void SetDomainTest()
        {
            string domain = "foo.com";
            service.Domain = domain;
            Assert.AreEqual("foo.com", service.Domain, "Domain should be foo.com after setting");
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ASF.UI.Process;
using ASF.Entities;

namespace ASF.UI.WbSite.Areas.OrderDetails.Controllers
{
    public class OrderDetailController : Controller
    {
        // GET: OrderDetails/OrderDetail
        public ActionResult Index()
        {
            var Order = Int32.Parse(Request.Cookies["OrderNumber"].Value);

            var op = new OrderProcess();
            var orderconid = op.FindByOrderNumber(Order);

            var odp = new OrderDetailProcess();
            var lista = odp.FindeByOrderId(orderconid.Id);

            var cookie = Request.Cookies[".AspNet.ApplicationCookie"].Value;
            Response.Cookies[".AspNet.ApplicationCookie"].Value = cookie + 2;

            return View(lista);
        }

        // GET: OrderDetails/Details
        public ActionResult Details(int id)
        {
            var op = new OrderDetailProcess();
            var order = op.Find(id);

            return View(order);
        }

        // GET: OrderDetails/Create
        public ActionResult Create()
        {
            return View();
        }

        [HttpPost]
        // POST: OrderDetails/Create
        public ActionResult Create(OrderDetail orderDetails)
        {
            var op = new OrderDetailProcess();
            op.Insert(orderDetails);
            return RedirectToAction("Index");
        }

        // GET: OrderDetails/Delete
        public ActionResult Delete(int id)
        {
            var op = new OrderDetailProcess();
            op.Delete(id);
            return RedirectToAction("Index");
        }

        // GET: OrderDetails/Edit
        public ActionResult Edit(int id)
        {
            var op = new OrderDetailProcess();
            var order = op.Find(id);

            return View(order);
        }

        [HttpPost]
        // POST: OrderDetails/Edit
        public ActionResult Edit(OrderDetail orderDetails)
        {
            var op = new OrderDetailProcess();
            op.Edit(orderDetails);
            return RedirectToAction("Index");
        }

    }
}


text:
using System;
using System.Diagnostics;
using System.Threading;

namespace RockLib.Logging.LogProcessing
{
    /// <summary>
    /// A log processor that processes logs on the same thread as the caller.
    /// </summary>
    public sealed class SynchronousLogProcessor : LogProcessor
    {
        /// <inheritdoc/>
        protected override void SendToLogProvider(ILogProvider logProvider, LogEntry logEntry,
            IErrorHandler errorHandler, int failureCount)
        {
            SynchronizationContext old = SynchronizationContext.Current;
            try
            {
                SynchronizationContext.SetSynchronizationContext(null);
                logProvider.WriteAsync(logEntry, CancellationToken.None).GetAwaiter().GetResult();

                TraceSource.TraceEvent(TraceEventType.Information, 0,
                    "[{0:s}] - [" + nameof(SynchronousLogProcessor) + "] - Successfully processed log entry {1} from log provider {2}.",
                    DateTime.Now, logEntry.UniqueId, logProvider);
            }
            finally
            {
                SynchronizationContext.SetSynchronizationContext(old);
            }
        }
    }
}


text: <script type="text/javascript">text-javascript</script>


text:
using Awful.Parser.Models.Users;
using System;
using System.Collections.Generic;
using System.Text;

namespace Awful.Parser.Models.Posts
{
    public class Post
    {
        public User User { get; set; }

        public string PostDate { get; set; }

        public string PostReportLink { get; set; }

        public string PostQuoteLink { get; set; }

        public string PostLink { get; set; }

        public string PostFormatted { get; set; }

        public string PostHtml { get; set; }

        public string PostMarkdown { get; set; }

        public long PostId { get; set; }

        public long PostIndex { get; set; }

        public string PostDivString { get; set; }

        public bool HasSeen { get; set; }

        public bool IsQuoting { get; set; }

        public bool IsIgnored { get; set; }
    }
}


text:
package rest.commos;

/**
 *
 * @author Francesco Cina'
 *
 * 30 May 2012
 */
public interface Constants {

	String URI_HELLOWORLD = "/helloworld";
	String HELLOWORLD_MESSAGE = "Hello world!!";

	String URI_MATHEMATICS = "/mathematics";
	String URI_MATHEMATICS_ADD = "/add";
	String URI_MATHEMATICS_MULTIPLY = "/multiply";

	String URI_FAMILY = "/family";
}


text:
import random

from app.models import Performance
from app.tasks import send_push_notifications, send_verify_notification

def performance_test_push_notifications(modeladmin, request, queryset):
    p = random.choice(list(Performance.objects.all()))
    ds = list(queryset.values_list('device_id', flat=True))
    send_push_notifications.delay(ds, p.id)
performance_test_push_notifications.short_description = "Send performance test notification"

def verification_test_push_notifications(modeladmin, request, queryset):
    for q in queryset:
        send_verify_notification.delay(q.device_id, 0)
verification_test_push_notifications.short_description = "Send verification test notification"


text:
package org.divy.sonar.check.java;

import org.divy.sonar.check.java.hybris.HybrisFileCheckRegistrar;
import org.sonar.api.Plugin;

/**
 * Entry point of your plugin containing your custom rules
 */
public class HybrisRulesPlugin implements Plugin {

  @Override
  public void define(Context context) {

    // server extensions -> objects are instantiated during server startup
    context.addExtension(HybrisRulesDefinition.class);

    // batch extensions -> objects are instantiated during code analysis
    context.addExtension(HybrisFileCheckRegistrar.class);

  }

}


text:
import wallaby.FX as FX

from wallaby.qt_combat import *

import sys

from ..baseWidget import *
from ..logics import *

from wallaby.pf.peer.viewer import *
from wallaby.pf.peer.editor import *

class PlainTextEdit(QtGui.QPlainTextEdit, BaseWidget, EnableLogic, ViewLogic, EditLogic):
    __metaclass__ = QWallabyMeta

    isJson  = Meta.property("bool", default=False)
    throwWhileEditing = Meta.property("bool", extended=True, default=True)

    def __init__(self, *args):
        QtGui.QPlainTextEdit.__init__(self, *args)
        BaseWidget.__init__(self, QtGui.QPlainTextEdit, *args)
        EnableLogic.__init__(self)
        ViewLogic.__init__(self, Viewer, self._setValue)
        EditLogic.__init__(self, Editor, self._toPlainText)

        self._cb = None
        self._changed = True

        self._readOnly = self.isReadOnly()
        self.textChanged.connect(self._textChanged)

    def focusOutEvent ( self, event ):
        # self.setCursorWidth(0)

        if self._editor and self._changed:
            self._editor._fieldChanged()

        QtGui.QPlainTextEdit.focusOutEvent(self, event)

    def focusInEvent ( self, event ):
        # self.setCursorWidth(1)
        QtGui.QPlainTextEdit.focusInEvent(self, event)

    def _toPlainText (self):
        value = unicode(self.toPlainText())

        if self.isJson:
            if value.startswith('{'):
                try:
                    import json
                    value = json.loads(value)
                except:
                    pass
        else:
            return value

    def _setEnabled(self, enabled):
        if self._readOnly: return

        if self.hideIfDisabled:
            self.setVisible(enabled)
        else:
            self.setReadOnly(not enabled)

    def deregister(self, remove=False):
        EnableLogic.deregister(self, remove)
        ViewLogic.deregister(self, remove)
        EditLogic.deregister(self, remove)

    def register(self):
        EnableLogic.register(self)
        ViewLogic.register(self, raw=True)
        EditLogic.register(self)

    def _resolve(self, value, **ka):
        if value == None:
            self._setValue( "")
        else:
            self._setValue(value)

        if self._editor: self._editor._resolve(**ka)

    def _setValue(self, val):
        if isinstance(val, (str, unicode)):
            val = unicode(val)
        else:
            if val != None:
                if self.isJson:
                    try:
                        import json
                        val = json.dumps(val, sort_keys=True, indent=4, separators=(',', ': '))
                    except:
                        val = unicode(val)
                else:
                    val = unicode(val)
            else:
                val = u""

        if self.toPlainText() != val:
            self._changed = False
            self.setPlainText(val)
            self._changed = True

    def _textChanged(self):
        if self.throwWhileEditing and self._editor and self._changed:
            self._editor._fieldChanged()
        self._changed = True

    def _docCB(self, document):
        print "doc", document
        print self.objectName()
        print "obj name", document.get(self.objectName())


text:
namespace TraceSpy
{
    public enum FilterType
    {
        IncludeAll,
        Include,
        Exclude,
    }
}


text:
package dev.jeka.core.tool;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class EnvironmentTest {

    @Test
    public void initialize() {
        Environment.initialize(new String[] {"-lv=true", "-kb=HttpClientTaskBuild", "clean", "project#pack", "project#publish"
                , "project#publish.localOnly", "-lb"});
        assertEquals("HttpClientTaskBuild", Environment.standardOptions.jkCBeanName());
    }
}


text:
require_relative 'pipeline'

require_relative 'formatter/bar'
require_relative 'formatter/current'
require_relative 'formatter/current_byte'
require_relative 'formatter/elapsed'
require_relative 'formatter/estimated'
require_relative 'formatter/percent'
require_relative 'formatter/rate'
require_relative 'formatter/byte_rate'
require_relative 'formatter/mean_rate'
require_relative 'formatter/mean_byte'
require_relative 'formatter/total'
require_relative 'formatter/total_byte'

module TTY
  class ProgressBar
    class Formatter
      extend Forwardable

      def_delegators :@pipeline, :decorate, :use

      # @api private
      def initialize(pipeline = nil)
        @pipeline = pipeline || TTY::ProgressBar::Pipeline.new
      end

      # Prepare default pipeline formatters
      #
      # @api private
      def load
        @pipeline.use TTY::ProgressBar::CurrentFormatter
        @pipeline.use TTY::ProgressBar::TotalFormatter
        @pipeline.use TTY::ProgressBar::TotalByteFormatter
        @pipeline.use TTY::ProgressBar::ElapsedFormatter
        @pipeline.use TTY::ProgressBar::EstimatedFormatter
        @pipeline.use TTY::ProgressBar::PercentFormatter
        @pipeline.use TTY::ProgressBar::ByteFormatter
        @pipeline.use TTY::ProgressBar::ByteRateFormatter
        @pipeline.use TTY::ProgressBar::RateFormatter
        @pipeline.use TTY::ProgressBar::MeanRateFormatter
        @pipeline.use TTY::ProgressBar::MeanByteFormatter
        @pipeline.use TTY::ProgressBar::BarFormatter
      end
    end # Formatter
  end # ProgressBar
end # TTY