text
stringlengths
1
22.8M
This is a list of alumni notable in their own right of the University of the Philippines College of Law (U.P. College of Law), having obtained their LL.B. or Juris Doctor degree from the College, and their organizations while in the College. For a list of notable University of the Philippines graduates, see University of the Philippines people. Government of the Philippines Executive branch Presidents Elpidio Quirino - Pan Xenia Fraternity Manuel Roxas - UP Vanguard Fraternity José P. Laurel - Upsilon Sigma Phi Ferdinand Marcos - Upsilon Sigma Phi Vice Presidents Jejomar Binay - Alpha Phi Omega Salvador Laurel - Upsilon Sigma Phi Arturo Tolentino - Upsilon Sigma Phi Cabinet officials Department of Public Works and Highways Secretary Simeon A. Datumanong (2001-2003, appointed as DoJ Secretary in 2003) Justice Secretary Simeon A. Datumanong (2003 - 2004 resigned to sun for Congress) Joker Arroyo, 52, Executive Secretary (Aquino) - Upsilon Sigma Phi Catalino Macaraig, Jr., 52, Executive Secretary (Aquino) - Upsilon Sigma Phi Salvador Panelo 74, Chief Presidential Legal Counsel and Spokesperson (Duterte) - Sigma Rho Simeon Datumanong, 59, Secretary of Justice (Arroyo) - Sigma Rho Oscar Orbos, 76, Executive Secretary and DOTC Secretary (Aquino) - Alpha Phi Beta Sabino B. Padilla Sr., 15, Secretary of Justice (1948–1949) José E. Romero, 22, Secretary of Education (1959–1962; Garcia, Macapagal) Gilbert Teodoro, 89, Secretary of National Defense (Arroyo and Marcos Jr.) Also elected as Representative of Tarlac, 1998-2007 Perfecto Yasay, 72, Secretary of Foreign Affairs (2016–17; Duterte) Also served as Chair of Securities and Exchange Commission, 1995-2000) Jesus Crispin Remulla, 87; 60th Secretary of Justice;Former Member of the Philippines House of Representatives from Cavite; Former Governor of Cavite- Upsilon Sigma Phi Solicitors-General Francisco Chavez, 71, (1986-1992) - Sigma Rho Estelito Mendoza - Upsilon Sigma Phi Querube Makalintal - Upsilon Sigma Phi Juan Liwag - Upsilon Sigma Phi Ricardo P. Galvez - Upsilon Sigma Phi Romeo C. de la Cruz, 57, (1998) Florin Hilbay, 99 (2014–2016) Diplomats Lauro L. Baja, Jr., 60, Ambassador to the United Nations (2003-2007) - Alpha Phi Beta Rosario Gonzalez Manalo, 58, first woman to pass the Foreign Service Officers (FSO) Examination in 1959 - Delta Lambda Sigma Rafael M. Salas, 53, first head of United Nations Population Fund - Sigma Rho, Pan Xenia Roberto S. Benedicto, Ambassador to Japan (1972-1978); First Class, Order of the Rising Sun (1977) - Upsilon Sigma Phi Jaime Victor B. Ledda 89 - Ambassador to The Hague, Netherlands; current Organisation for the Prohibition of Chemical Weapons (OPCW) Asian Group Coordinator - Upsilon Sigma Phi Carlos Sorreta, 91, current Ambassador to Russia and former Director-General of the Foreign Service Institute - Upsilon Sigma Phi José E. Romero, 22, first Philippine Ambassador to the United Kingdom (1949–1953) Other Executive Branch officials Darlene Berberabe-Lim, 99'', CEO, [[Home Development Mutual Fund]] (2010-2017) [[Mateo A. T. Caparas]], 63; Chairperson, Presidential Commission on Good Government (1988-1990) Arnel Casanova, 99, President, Bases Conversion and Development Authority (2011-2016) Jorge B. Vargas, 14, Presiding Officer of the Philippine Executive Commission during Japanese Occupation Haydee Yorac, 63; Chairperson, Presidential Commission on Good Government (2001-2005) - Portia Sorority, Alpha Phi Omega Terry Ridon, ‘11, Chairperson and Chief Executive Officer, Presidential Commission for the Urban Poor (2016-2017) Medardo G. De Lemos, '83, National Bureau of Investigation (NBI) Director, 2022-present Mehol Sadain, '86, Chairperson, National Commission on Muslim Filipinos (2012-2014) - Scintilla Juris Judicial branch Chief Justices of the Supreme Court Ramon Aquino, 39, (1985-1986) Felix Makasiar, 39, (1985) Ricardo Paras, 13, (1951-1961) Reynato Puno, 62, (2006–2010) - Alpha Phi Beta/International Order of DeMolay Hilario Davide, Jr., 59, (1998 -2005) - Brotherhood of the Filipinos Maria Lourdes Sereno, 84, (2012–2018) - Portia Sorority César Bengzon, 19, (1961-1966) - Rizal Center Teresita Leonardo-De Castro, 72, (2018) - Sigma Alpha, Portia Sorority Marcelo Fernan, 52, (1988-1991) - Sigma Rho Pedro Yap, 46, (1988) - Sigma Rho Fred Ruiz Castro, 36, (1975-1979) - UP Vanguard Fraternity José Yulo, 14, (1942-1944) UP Vanguard Fraternity Enrique Fernando, 38, (1979-1985) - Upsilon Sigma Phi Querube Makalintal, 33, (1973-1975) - Upsilon Sigma Phi Associate Justices of the Supreme Court Estanislao Fernandez, 33, (1973-1975) - Upsilon Sigma Phi Nestor Alampay 41 – Upsilon Sigma Phi Ramon Fernandez 40 – Upsilon Sigma Phi Vicente Ericta 39 – Upsilon Sigma Phi Hermogenes Concepcion 38 – Upsilon Sigma Phi Emilio Gancayco 49 – Upsilon Sigma Phi Jose Campos 50 – Upsilon Sigma Phi Camilo Quiason 51 – Upsilon Sigma Phi Florentino Feliciano 53 – Upsilon Sigma Phi Josue Bellosillo 58 – Upsilon Sigma Phi Alicia Austria-Martinez, 62, (2002-2009) - Alpha Phi Omega Vicente Abad Santos, 40, (1979-1986) Jesus Barrera, 21, (1959-1966) Abdulwahid Bidin, 53, (1987-1997) - Alpha Phi Beta Rosmari Carandang, 75, (2018–present) - Tau Gamma Sigma Antonio Carpio, 75, (2001–present) - Sigma Rho Conchita Carpio Morales, 68, (2004 - 2011) - Portia Sorority; Phi Delta Alpha Minita Chico-Nazario, 62, (2004-2010) Irene Cortes, 48, (1987-1990) Cancio Garcia, 61, (2004-2007) Carolina Griño-Aquino, 50, (1988-1993)<ref name="sunstar">{{cite news |title=SC Justice Carolina Griño-Aquino passes away |url=http://www.sunstar.com.ph/breaking-news/2012/12/24/sc-justice-carolina-grino-aquino-passes-away-259936 |work=[[Sun.Star]] |date=2012-12-24 |access-date=2013-01-06 |archive-url=https://archive.today/20130416135717/http://www.sunstar.com.ph/breaking-news/2012/12/24/sc-justice-carolina-grino-aquino-passes-away-259936 |archive-date=2013-04-16 |url-status=dead }}</ref> - Delta Lambda Sigma [[Hugo Gutierrez, Jr.]], '''52, (1982-1993) - Alpha Phi Beta Marvic Leonen, 87, (2012–present) Ameurfina Melencio-Herrera, 47, (1979-1992) - Portia Sorority; Sigma Delta Phi Vicente Mendoza, 57, (1994-2003) - Beta Sigma Cecilia Muñoz-Palma, 37, (1973-1978) - Portia Sorority Sabino Padilla Sr., '15 (1946-1964) Teodoro Padilla, '51 (1987-1997) - Beta Sigma Leonardo Quisumbing, 64, (1998-2009) - Alpha Phi Beta Alexander Reyes, 14, (1948-1959) J.B.L. Reyes, 22, (1954-1972) Flerida Ruth Romero, 52, (1991-1999) Abraham Sarmiento, 49, (1987-1991) - Alpha Phi Beta Conrado Vasquez, 37, (1982-1983) Presbitero Velasco, Jr., 71, (2006–present) - Sigma Rho James Vickers, 13, (1932-1936) Consuelo Ynares-Santiago, 62, (1999-2010) - Alpha Phi Omega Calixto Zaldivar, 28, (1964-1974) Jhosep Lopez, 88, (2021–present) - Sigma Rho Legislative branch Senate Presidents Aquilino Pimentel III '89 Jovito Salonga '46 - Sigma Rho (resigned) Marcelo Fernan '52 - Sigma Rho Edgardo Angara '58 - Sigma Rho Juan Ponce Enrile '53 - Sigma Rho, UP Vanguard Fraternity Franklin Drilon '69 - Sigma Rho Sotero Laurel '40 - Upsilon Sigma Phi Arturo Tolentino '34 - Upsilon Sigma Phi Ferdinand E. Marcos '39 - Upsilon Sigma Phi Senators Francis Pangilinan, (2001–present) - Upsilon Sigma Phi Richard J. Gordon (2004–present) - Upsilon Sigma Phi Joker Arroyo (2001–present) - Upsilon Sigma Phi Mamintal A.J. Tamano (1987-1992) - Upsilon Sigma Phi Estanislao Fernandez, (1962-1965)- Upsilon Sigma Phi Sotero Laurel (1987-1992) - Upsilon Sigma Phi Juan R. Liwag (1963-1969) - Upsilon Sigma Phi Gerardo Roxas (1963-1972) - Upsilon Sigma Phi Domocao Alonto (1965-1961) - Upsilon Sigma Phi Francis G. Escudero, (2007–2019) - Alpha Phi Beta Ambrosio Padilla, (1957-1973) - Alpha Phi Beta Pia Cayetano, (2004–present) - Delta Lambda Sigma Sonny Angara, (2013–present) - Sigma Rho Miriam Defensor Santiago, (1995-2001, 2004–2016) - UP Lady Vanguard Salipada Pendatun, (1946-1951, 1969-1972) - UP Vanguard Fraternity Justiniano Montano, (1949-1955) Rene Cayetano (1998-2003) Francisco Rodrigo, (1955-1972) José E. Romero, (1946) Jose Roy, (1962-1972) Lorenzo Sumulong, (1949-1972) Lorenzo Tañada, (1947-1972) Speakers of the House of Representatives Querube Makalintal - Upsilon Sigma Phi José B. Laurel, Jr. - Upsilon Sigma Phi Nicanor Yñiguez - Upsilon Sigma Phi Eugenio Pérez Daniel Romualdez - Alpha Phi Omega Arnulfo Fuentebella Ferdinand Martin Romualdez, Class of 1994. Upsilon Sigma Phi Representatives Class 1959 House Deputy Speaker Simeon A. Datumanong Maguindanao Second District (1992-2001; 2004-2019) Roman Romulo, 94; Lone District, Pasig (2007–present) - Upsilon Sigma Phi Wenceslao Vinzons, 33; Lone District, Camarines Norte (1941-1942) - Upsilon Sigma Phi Cyrille Abueg-Zaldivar, 03; Legislative districts of Palawan (1995-2004) Bellaflor J. Angara-Castillo, 62; Lone District, Aurora (1995-2004) Juan Edgardo "Sonny" M Angara, 00; Lone District, Aurora (2004–2013) - Sigma Rho Kit Belmonte, 02; 6th District, Quezon City (2013–present) Neri Colmenares, 96; Bayan Muna (2010-2016) Arthur Defensor, 63; 3rd District, Iloilo (2001–present) Sigma Rho Matias Defensor Jr., 71; 3rd District, Quezon City (2004-2010) - Beta Sigma Pio Duran, 23; 3rd District, Albay (1949-1961) Constantino Jaraula, 60; Lone District, Cagayan de Oro City (1998-2007) Edcel Lagman, 66; 1st District, Albay (1987-1998, 2004–present) - Alpha Phi Beta Romulo Lumauig, 57; First elected Congressman, Ifugao (1969-1972) - Beta Sigma Romero Quimbo, 96; 2nd District, Marikina (2010–present) - Alpha Sigma Terry Ridon, 11; Kabataan Party List (2013-2016) Rufus Rodriguez, 80; 2nd District, Cagayan de Oro City (2007–present) José E. Romero, 22; 2nd District, Negros Oriental (1931–1941, 1945-1946) Ron Salo, 03; KABAYAN Party List (2016–present) Victor Sumulong, 73; 2nd District, Antipolo City (1998-2007) - Sigma Rho Luis Villafuerte, 59; 2nd District, Camarines Sur (2004–present) - Sigma Rho Liwayway Vinzons-Chato, 68; Lone District, Camarines Norte (2007–present) Ronaldo Zamora, 69; Lone District, San Juan City (1987-1998, 2004–present) Maria Salud Vivero - Parreno, 42; 2nd District, Leyte (1965 - 1969) Heads of Constitutional Offices Christian Monsod, 60, COMELEC Chairperson (1991-1995) - Upsilon Sigma Phi Bartolome C. Fernandez, Jr.; Commissioner, Commission on Audit - Upsilon Sigma Phi Vicente Ericta - Ombudsman - Upsilon Sigma Phi Romeo Brawner, 59'', [[Commission on Elections (Philippines)|COMELEC]] Acting Chairperson (2008) [[Simeon Marcelo]], 79, Ombudsman (2002-2005) - Sigma Rho Conchita Carpio Morales, 68, Ombudsman (2011–present) - Portia Sorority Purificacion Quisumbing, 64, Chairperson, Commission on Human Rights Lucineto Tagle, 68,COMELEC Commissioner(2008-2015); Former Associate Justice, Court of Appeals - Beta Sigma Ma. Rowena Amelia V. Guanzon, 84, COMELEC Commissioner (2015–present) - Delta Lambda Sigma Mehol Sadain, '86, COMELEC Commissioner (2000-2006) - Scintilla Juris Notable local government executives Richard J. Gordon, '75; chairman of the Subic Bay Metropolitan Authority; Senator; Chairman, Philippine Red Cross - Upsilon Sigma Phi Jejomar Binay, 67; Makati mayor (1986-1998, 2001-2010) - Alpha Phi Omega/International Order of DeMolay Cesar Climaco, 41; Zamboanga City mayor Carmen Planas, 40, first woman elected to a city council (Manila) - Sigma Delta Phi Isidro Rodriguez, 38, former Rizal governor Jesus Crispin Remulla, 88 former Cavite governor and incumbent Congressman - Upsilon Sigma Phi International Organizations Jolly Bugarin, only Filipino elected as President, International Criminal Police Organization (Interpol) - Upsilon Sigma Phi Mateo A. T. Caparas, only Filipino elected as President of Rotary International - Upsilon Sigma Phi Florentino P. Feliciano, Chairman of the Appellate Body of the World Trade Organization - Upsilon Sigma Phi Raul Pangalangan, judge of the International Criminal Court - Alpha Sigma Academe Edgardo Carlo Lasam Vistan II - current Dean, UP College of Law - Upsilon Sigma Phi Danilo Concepcion '84 – current President, University of the Philippines; Dean, UP College of Law; Commissioner, Securities and Exchange Commission; President, Gregorio Araneta University Foundation - Upsilon Sigma Phi Joseph Emmanuelle Angeles '03 – President, Angeles University Foundation - Upsilon Sigma Phi Carmelino Alvendia, Sr., 30; founder of Quezon City Academy, co-founder of MLQU - Upsilon Sigma Phi Sotero Laurel '40 - President, Lyceum of Batangas; Chairman, Lyceum of the Philippines University - Upsilon Sigma Phi Carmelino Alvendia, Sr., 30; founder of Quezon City Academy, co-founder of MLQU - Upsilon Sigma Phi Conrado Benitez, 16; co-founder, Philippine Women's University - Upsilon Sigma Phi Raul Pangalangan, 83 – International Criminal Court judge, law professor, newspaper columnist and former U.P. Law Dean - Alpha Sigma Antonio La Viña, 89; former Dean of Ateneo School of Government, U.P. Law Professor Katrina Legarda, 80; family law specialist; former Manila Times publisher; author; former television host Raoul Victorino, 57; former dean, College of Law Philippine Christian University, Former Associate Justice, Sandiganbayan - Beta Sigma Social activism and advocacy Antonio Oposa, 82; environmental activist Ahmad Domocao Alonto; King Faisal International Prize Awardee for Service to Islam - Upsilon Sigma Phi Industry Chito Salud, '85; Chairman and CEO, Philippine Basketball Association - Upsilon Sigma Phi Jake Almeda Lopez, '52; general manager and Vice Chairman, ABS-CBN - Upsilon Sigma Phi Antonio Quirino, 32; founder of (ABS) Alto Broadcasting System (precursor to ABS-CBN), first television station in the Philippines - Upsilon Sigma Phi Eugenio Lopez, Sr., 23; founder of Chronicle Broadcasting Network and Manila Chronicle Felipe Gozon, 62, Chairman and CEO, GMA Network Loida Nicolas-Lewis, 68; CEO, TLC Beatrice Don M. Ferry, '''57; former Vice Chairman, Development Bank of the Philippines; former Chairman, Board of Transportation (Now LTFRB) - Beta Sigma Arts Literature Stevan Javellana, 48; novelist (Without Seeing the Dawn) - Sigma Rho Linda Ty Casper, 55; novelist (The Peninsulares, DreamEden) News and entertainment industry Television Jake Almeda Lopez, '52; general manager and Vice Chairman, ABS-CBN - Upsilon Sigma Phi Danilo Concepcion 83 - UP President, DZMM announcer; Law Professor, U.P College of Law - Upsilon Sigma Phi Zorayda Ruth Andam, '''04; Binibining Pilipinas-Universe 2001; television host; commercial endorser Anna Theresa Licaros 09 - Binibining Pilipinas-Universe 2007; commercial endorser - Portia Sorority Jose Mari Velez '''70 - television newscaster with ABC and GMA - Scintilla Juris Print journalism Billy Balbastro, '62; entertainment columnist - Sigma Rho Daisy Catherine Mandap, '85, Print and Broadcast Journalist and Editor (Manila and HK) ; UPAA Distinguished Alumna in Public Service, 2014 Footnotes References List of Graduates of the UP College of Law, 1999 Souvenir Program of the Silver Jubilarians University of the Philippines Law Alumni Association, Certificate of Merit plaque presented to Oscar Araneta, 1988-12-12. Law alumni Philippines College of Law
```python import time from ray.tests.conftest import * # noqa from filelock import FileLock import pytest import ray from ray import workflow def test_basic_workflows(workflow_start_regular_shared): @ray.remote def source1(): return "[source1]" @ray.remote def append1(x): return x + "[append1]" @ray.remote def append2(x): return x + "[append2]" @ray.remote def simple_sequential(): x = source1.bind() y = append1.bind(x) return workflow.continuation(append2.bind(y)) @ray.remote def identity(x): return x @ray.remote def simple_sequential_with_input(x): y = append1.bind(x) return workflow.continuation(append2.bind(y)) @ray.remote def loop_sequential(n): x = source1.bind() for _ in range(n): x = append1.bind(x) return workflow.continuation(append2.bind(x)) @ray.remote def nested_task(x): return workflow.continuation(append2.bind(append1.bind(x + "~[nested]~"))) @ray.remote def nested(x): return workflow.continuation(nested_task.bind(x)) @ray.remote def join(x, y): return f"join({x}, {y})" @ray.remote def fork_join(): x = source1.bind() y = append1.bind(x) y = identity.bind(y) z = append2.bind(x) return workflow.continuation(join.bind(y, z)) @ray.remote def mul(a, b): return a * b @ray.remote def factorial(n): if n == 1: return 1 else: return workflow.continuation(mul.bind(n, factorial.bind(n - 1))) # This test also shows different "style" of running workflows. assert workflow.run(simple_sequential.bind()) == "[source1][append1][append2]" wf = simple_sequential_with_input.bind("start:") assert workflow.run(wf) == "start:[append1][append2]" wf = loop_sequential.bind(3) assert workflow.run(wf) == "[source1]" + "[append1]" * 3 + "[append2]" wf = nested.bind("nested:") assert workflow.run(wf) == "nested:~[nested]~[append1][append2]" wf = fork_join.bind() assert workflow.run(wf) == "join([source1][append1], [source1][append2])" assert workflow.run(factorial.bind(10)) == 3628800 def test_async_execution(workflow_start_regular_shared): @ray.remote def blocking(): time.sleep(10) return 314 start = time.time() output = workflow.run_async(blocking.bind()) duration = time.time() - start assert duration < 5 # workflow.run is not blocked assert ray.get(output) == 314 @pytest.mark.skip(reason="Ray DAG does not support partial") def test_partial(workflow_start_regular_shared): ys = [1, 2, 3] def add(x, y): return x + y from functools import partial f1 = workflow.task(partial(add, 10)).task(10) assert "__anonymous_func__" in f1._name assert f1.run() == 20 fs = [partial(add, y=y) for y in ys] @ray.remote def chain_func(*args, **kw_argv): # Get the first function as a start wf_task = workflow.task(fs[0]).task(*args, **kw_argv) for i in range(1, len(fs)): # Convert each function inside tasks into workflow task # function and then use the previous output as the input # for them. wf_task = workflow.task(fs[i]).task(wf_task) return wf_task assert workflow.run(chain_func.bind(1)) == 7 def test_run_or_resume_during_running(workflow_start_regular_shared, tmp_path): @ray.remote def source1(): return "[source1]" @ray.remote def append1(x): return x + "[append1]" @ray.remote def append2(x): return x + "[append2]" @ray.remote def simple_sequential(): with FileLock(tmp_path / "lock"): x = source1.bind() y = append1.bind(x) return workflow.continuation(append2.bind(y)) with FileLock(tmp_path / "lock"): output = workflow.run_async( simple_sequential.bind(), workflow_id="running_workflow" ) with pytest.raises(RuntimeError): workflow.run_async(simple_sequential.bind(), workflow_id="running_workflow") with pytest.raises(RuntimeError): workflow.resume_async(workflow_id="running_workflow") assert ray.get(output) == "[source1][append1][append2]" def test_dynamic_output(workflow_start_regular_shared): @ray.remote def exponential_fail(k, n): if n > 0: if n < 3: raise Exception("Failed intentionally") return workflow.continuation( exponential_fail.options(**workflow.options(task_id=f"task_{n}")).bind( k * 2, n - 1 ) ) return k # When workflow fails, the dynamic output should points to the # latest successful task. try: workflow.run( exponential_fail.options(**workflow.options(task_id="task_0")).bind(3, 10), workflow_id="dynamic_output", ) except Exception: pass from ray.workflow.workflow_storage import get_workflow_storage from ray._private.client_mode_hook import client_mode_wrap @client_mode_wrap def _check_storage(): wf_storage = get_workflow_storage(workflow_id="dynamic_output") result = wf_storage.inspect_task("task_0") return result.output_task_id assert _check_storage() == "task_3" if __name__ == "__main__": import sys sys.exit(pytest.main(["-v", __file__])) ```
Bussières () is a commune in the Saône-et-Loire department in the region of Bourgogne-Franche-Comté in eastern France. See also Communes of the Saône-et-Loire department References Communes of Saône-et-Loire
```javascript const reportWebVitals = onPerfEntry => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry); getFID(onPerfEntry); getFCP(onPerfEntry); getLCP(onPerfEntry); getTTFB(onPerfEntry); }); } }; export default reportWebVitals; ```
The original Georgia and Alabama Railroad was based in Rome, GA, incorporated in 1853, and started initial rail construction in 1857. In August 1866, the G&A officially consolidated with the Dalton and Jacksonville Railroad and the Alabama and Tennessee River Railroad Company with the intent to create a consolidated rail system from Selma, AL to Dalton, GA. The consolidated corporation was to do business under the name of the latter, but it officially took the name Selma, Rome and Dalton Railroad Company in December of that same year. Still, in some cases, business continued under the name of Georgia and Alabama Railroad. For instance, in May 1868, a contract was executed to the Georgia and Alabama Railroad, leasing 100 African American convicts in the state of Georgia to work for the railroad company without pay. The Georgia and Alabama Railroad is not to be confused with the Georgia and Alabama Railway, which was a different entity entirely, formed in 1895 and based in Savannah. However, due to the similarity in their names, the G&A Railway was often referred to as the G&A Railroad until it became part of the Seaboard Air Line Railway ca. 1900. In 1989, the next iteration of the Georgia and Alabama Railroad was formed as a shortline railroad operating between Smithville, Georgia and White Oak, Alabama, . RailTex consolidated its holdings in the area into the Georgia Southwestern in 1995, and the Georgia & Alabama ceased to operate under that name. The rail system, however, is still in use by the Georgia Southwestern Railroad. History The Southwestern Railroad originally constructed the line west out of Smithville towards the Alabama state line, completing the railroad in 1860. The Southwestern was leased to the Central of Georgia in 1869 and completely integrated into the system in 1954. The remainder of the line into Alabama was constructed by the Vicksburg & Brunswick from Eufaula to Clayton, Alabama, and became part of the Central of Georgia. An extension to Ozark was later built, however, it was abandoned in 1977. Eventually the Central of Georgia was acquired by the Southern, and later became part of Norfolk Southern. The line was cut back to White Oak February 28, 1986. The Georgia & Alabama railroad began operation on June 1, 1989 under the Thoroughbred Shortline Program between Smithville and White Oak. Freight included peanuts, aggregates, pulpwood, and cement, which generated approximately 3,300 annual carloads for the line in 1995. Interchange was made with Norfolk Southern at Smithville, CSX Transportation at Dawson until 1990, and fellow RailTex subsidiary Georgia Southwestern at Cuthbert. After 1990, the railroad interchanged with the Georgia Great Southern at Dawson. The Georgia & Alabama no longer existed in name after the division was merged into the Georgia Southwestern division of Railtex in 1995. References Defunct Alabama railroads Defunct Georgia (U.S. state) railroads Railway companies disestablished in 1995 Railway companies established in 1989
```java /* * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.apache.rocketmq.remoting; import io.netty.channel.Channel; public interface ChannelEventListener { void onChannelConnect(final String remoteAddr, final Channel channel); void onChannelClose(final String remoteAddr, final Channel channel); void onChannelException(final String remoteAddr, final Channel channel); void onChannelIdle(final String remoteAddr, final Channel channel); } ```
Joannes (Ioannes, Johannes) was a 12th century Roman Catholic Cardinal, and Cardinal-priest of the titulus of Santa Cecilia in Trastevere in Rome. Alfonso Chacón writes that he was a member of the Capizucchi family, but he was deceived by the forgeries of Alfonso Ceccarelli, a contemporary acquaintance. In fact, according to Agostino Paravicini Bagliani, in the 11th and 12th centuries the Capizucchi family had no cardinals. Early career Alfonso Chacón writes that he was present at the Council of Guastalla on 22 October 1106, but there is no evidence to support his statement. The point is passed by in silence by Rudolf Hüls. He calculates, however, that Joannes should have become a cardinal by 1106, working from the subscription lists on papal documents, and the order in which cardinals signed their names (his Anciennitätprinzip). Cardinal Cardinal Joannes was present at the Lateran synod of March 1112, and signed its decrees on 23 March. Cardinal Joannes of S. Cecilia participated in the election of Cardinal Giovanni Gaetani as Pope Gelasius II on 24 January 1118. The electoral meeting took place at the monastery of the Palladium (Santa Maria in Pallara, near the Arch of Titus and the Arch of Constantine) for reasons of security. Cardinal Joannes was one of those present. During the enthronement ceremony, Cencius Frangipani and his supporters broke into the monastery, seized and abused the pope and others, and carried Gelasius off to one of their prisons. He was rescued, but, on the approach of Henry V to Rome, he fled to Gaeta, to Capua, and then to Pisa. Cardinal Joannes remained behind in Rome, and functioned in Rome as a member of the curia, headed by the Vicar of Rome, Cardinal Petrus of Porto. His name appears on a curial decision with those of five other cardinals, in favor of the monastery of S. Sofia in Benevento. Pope Gelasius died at Cluny in Burgundy on 29 January 1119. Following his death, the ten cardinals who were present, after consultation with other prelates, Roman officials, and other Romans who were present, proceeded to an election, with the agreement that the name of the successful candidate would be sent to Rome for confirmation. Archbishop Guy of Vienne was elected on 2 February 1119. Within days, Cardinal Pietro Senex presided over the ratification by the Roman clergy of the election of Pope Calixtus II, which was sent to France in time for him to be enthroned in the cathedral of Vienne on 9 February 1119. Various cardinals in Rome sent supplementary letters, approving of the actions at Cluny. Cardinal Joannes shared a letter with several of the cardinal-priests. In 1121, from January through April, he participated in the subscribing of papal documents at the Lateran. On 8 July 1123, Joannes participated at the consecration of a chapel at his own titular church of Santa Cecilia, performed by Bishops Pietro of Porto, Vitalis of Albano, and Guilelmus of Palestrina, in the presence of Pope Calixtus II. The chapel had been the gift of Cardinal Giovanni da Crema. It is not known whether, or in what way, he may have participated in the electoral events, canonical or uncanonical, of December 1124, which led to the enthronement of Pope Honorius II. His latest known subscription to a papal document took place at the Lateran on 7 May 1128. His successor, Cardinal Goselinus, subscribed on 24 March 1129. Notes and references Bibliography Gregorovius, Ferdinand (1896), History of Rome in the Middle Ages. Volume IV. part 2, second edition (London: George Bell, 1896). Year of death unknown 12th-century Italian cardinals Cardinal-priests Year of birth unknown
```javascript var $ = require('cheerio'); module.exports = { // Photos only for now. TODO: Stay tuned for when video embeds become available re: /^https?:\/\/www\.gettyimages\.(com|ca|com\.au|be|dk|de|es|fr|in|ie|it|nl|co\.nz|no|at|pt|ch|fi|se|ae|co\.uk|co\.jp)\/detail\/([^\/]+)\/[^\/]+\/(\d+)/i, provides: 'getty', mixins: [ "og-image", "favicon", "canonical", "og-description", "og-site", "twitter-title" ], getData: function(urlMatch, request, cb) { request({ uri: "path_to_url" + urlMatch[3], json: true, limit: 1, timeout: 1000, prepareResult: function(error, response, body, cb) { if (error) { return cb(error); } if (body.message) { return cb(body.message); } cb(null, { getty: body }); } }, cb); }, getLink: function(getty) { var $container = $('<div>'); try { $container.html(getty.embedTag); } catch (ex) {} var $iframe = $container.find('iframe'); // if embed code contains <iframe>, return src if ($iframe.length == 1) { return { href: $iframe.attr('src'), type: CONFIG.T.text_html, rel: CONFIG.R.image, "aspect-ratio": $iframe.attr('width') / $iframe.attr('height'), "max-width": $iframe.attr('width') }; } }, tests: [ "path_to_url", "path_to_url", "path_to_url", "path_to_url" ] }; ```
Making Mathematics Count is the title of a report on mathematics education in the United Kingdom (U.K.). The report was written by Adrian Smith as leader of an "Inquiry into Post–14 Mathematics Education", which was commissioned by the UK Government in 2002. The report recommended an increase in mathematics schooling; the report recommended that statistics be taught as part of the natural sciences rather than as part of the mathematics curriculum. Inquiry and report Making Mathematics Count is the title of a report on mathematics education in the United Kingdom (U.K.). The report was written by Adrian Smith as leader of an "Inquiry into Post–14 Mathematics Education", which was commissioned by the UK Government in 2002. The purpose of the Inquiry was: "To make recommendations on changes to the curriculum, qualifications and pedagogy for those aged 14 and over in schools, colleges and higher education institutions to enable those students to acquire the mathematical knowledge and skills necessary to meet the requirements of employers and of further and higher education." Publication of the report was followed two years later by a conference of 241 delegates, who included mathematics teachers, college lecturers, as well as university mathematicians, head teachers, local authority consultants and advisers, and other mathematics professionals. There is a report of the conclusions of this conference, which was intended to bring together policymakers and practitioners to share information and discuss ways in which changes in mathematics education could be implemented to benefit schools, teachers and students. Influence The Smith report has influenced debate on U.K. educational policy. A particular concern of the report was where and how statistics should be taught: the report recommended that statistics should be embedded in application subjects and taught by teachers of those subjects where it is applied. The government decision was that statistics teaching should remain within the mathematics curriculum. A more recent report for the Royal Statistical Society, The Future of Statistics in our Schools and Colleges retains this view. Predecessor reports The report's title recalls the Cockcroft report Mathematics Counts which addressed some of the same issues but was compiled 2 decades earlier, instigated by Callaghan and submitted under the Thatcher government. Notes References Mathematics education in the United Kingdom Mathematics education reform Reports of the United Kingdom government Statistics education
```objective-c /* * */ #pragma once #include <stdbool.h> #include <stdint.h> #include <stddef.h> #include "soc/soc.h" #include "soc/lp_aon_reg.h" #include "soc/reset_reasons.h" #include "esp_assert.h" #ifdef __cplusplus extern "C" { #endif /** \defgroup rtc_apis, rtc registers and memory related apis * @brief rtc apis */ /** @addtogroup rtc_apis * @{ */ /************************************************************************************** * Note: * * Some Rtc memory and registers are used, in ROM or in internal library. * * Please do not use reserved or used rtc memory or registers. * * * ************************************************************************************* * RTC Memory & Store Register usage ************************************************************************************* * rtc memory addr type size usage * 0x3f421000(0x50000000) Slow SIZE_CP Co-Processor code/Reset Entry * 0x3f421000+SIZE_CP Slow 8192-SIZE_CP * * 0x3ff80000(0x40070000) Fast 8192 deep sleep entry code * ************************************************************************************* * RTC store registers usage * LP_AON_STORE0_REG Reserved * LP_AON_STORE1_REG RTC_SLOW_CLK calibration value * LP_AON_STORE2_REG Boot time, low word * LP_AON_STORE3_REG Boot time, high word * LP_AON_STORE4_REG External XTAL frequency * LP_AON_STORE5_REG APB bus frequency * LP_AON_STORE6_REG FAST_RTC_MEMORY_ENTRY * LP_AON_STORE7_REG FAST_RTC_MEMORY_CRC * LP_AON_STORE8_REG Store light sleep wake stub addr * LP_AON_STORE9_REG Store the sleep mode at bit[0] (0:light sleep 1:deep sleep) ************************************************************************************* */ #define RTC_SLOW_CLK_CAL_REG LP_AON_STORE1_REG #define RTC_BOOT_TIME_LOW_REG LP_AON_STORE2_REG #define RTC_BOOT_TIME_HIGH_REG LP_AON_STORE3_REG #define RTC_XTAL_FREQ_REG LP_AON_STORE4_REG #define RTC_APB_FREQ_REG LP_AON_STORE5_REG #define RTC_ENTRY_ADDR_REG LP_AON_STORE6_REG #define RTC_RESET_CAUSE_REG LP_AON_STORE6_REG #define RTC_MEMORY_CRC_REG LP_AON_STORE7_REG #define RTC_SLEEP_WAKE_STUB_ADDR_REG LP_AON_STORE8_REG #define RTC_SLEEP_MODE_REG LP_AON_STORE9_REG #define RTC_DISABLE_ROM_LOG ((1 << 0) | (1 << 16)) //!< Disable logging from the ROM code. typedef enum { AWAKE = 0, //<CPU ON LIGHT_SLEEP = BIT0, //CPU waiti, PLL ON. We don't need explicitly set this mode. DEEP_SLEEP = BIT1 //CPU OFF, PLL OFF, only specific timer could wake up } SLEEP_MODE; typedef enum { NO_MEAN = 0, POWERON_RESET = 1, /**<1, Vbat power on reset*/ RTC_SW_SYS_RESET = 3, /**<3, Software reset digital core*/ DEEPSLEEP_RESET = 5, /**<5, Deep Sleep reset digital core*/ TG0WDT_SYS_RESET = 7, /**<7, Timer Group0 Watch dog reset digital core*/ TG1WDT_SYS_RESET = 8, /**<8, Timer Group1 Watch dog reset digital core*/ RTCWDT_SYS_RESET = 9, /**<9, RTC Watch dog Reset digital core*/ TG0WDT_CPU_RESET = 11, /**<11, Time Group0 reset CPU*/ RTC_SW_CPU_RESET = 12, /**<12, Software reset CPU*/ RTCWDT_CPU_RESET = 13, /**<13, RTC Watch dog Reset CPU*/ RTCWDT_BROWN_OUT_RESET = 15, /**<15, Reset when the vdd voltage is not stable*/ RTCWDT_RTC_RESET = 16, /**<16, RTC Watch dog reset digital core and rtc module*/ TG1WDT_CPU_RESET = 17, /**<17, Time Group1 reset CPU*/ SUPER_WDT_RESET = 18, /**<18, super watchdog reset digital core and rtc module*/ EFUSE_RESET = 20, /**<20, efuse reset digital core*/ USB_UART_CHIP_RESET = 21, /**<21, usb uart reset digital core */ USB_JTAG_CHIP_RESET = 22, /**<22, usb jtag reset digital core */ POWER_GLITCH_RESET = 23, /**<23, power glitch reset digital core and rtc module*/ JTAG_CPU_RESET = 24, /**<24, jtag reset CPU*/ } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); typedef enum { NO_SLEEP = 0, EXT_EVENT0_TRIG = BIT0, EXT_EVENT1_TRIG = BIT1, GPIO_TRIG = BIT2, TIMER_EXPIRE = BIT3, SDIO_TRIG = BIT4, MAC_TRIG = BIT5, UART0_TRIG = BIT6, UART1_TRIG = BIT7, TOUCH_TRIG = BIT8, SAR_TRIG = BIT9, BT_TRIG = BIT10, RISCV_TRIG = BIT11, XTAL_DEAD_TRIG = BIT12, RISCV_TRAP_TRIG = BIT13, USB_TRIG = BIT14 } WAKEUP_REASON; typedef enum { DISEN_WAKEUP = NO_SLEEP, EXT_EVENT0_TRIG_EN = EXT_EVENT0_TRIG, EXT_EVENT1_TRIG_EN = EXT_EVENT1_TRIG, GPIO_TRIG_EN = GPIO_TRIG, TIMER_EXPIRE_EN = TIMER_EXPIRE, SDIO_TRIG_EN = SDIO_TRIG, MAC_TRIG_EN = MAC_TRIG, UART0_TRIG_EN = UART0_TRIG, UART1_TRIG_EN = UART1_TRIG, TOUCH_TRIG_EN = TOUCH_TRIG, SAR_TRIG_EN = SAR_TRIG, BT_TRIG_EN = BT_TRIG, RISCV_TRIG_EN = RISCV_TRIG, XTAL_DEAD_TRIG_EN = XTAL_DEAD_TRIG, RISCV_TRAP_TRIG_EN = RISCV_TRAP_TRIG, USB_TRIG_EN = USB_TRIG } WAKEUP_ENABLE; /** * @brief Get the reset reason for CPU. * * @param int cpu_no : CPU no. * * @return RESET_REASON */ RESET_REASON rtc_get_reset_reason(int cpu_no); /** * @brief Get the wakeup cause for CPU. * * @param int cpu_no : CPU no. * * @return WAKEUP_REASON */ WAKEUP_REASON rtc_get_wakeup_cause(void); typedef void (* esp_rom_wake_func_t)(void); /** * @brief Read stored RTC wake function address * * Returns pointer to wake address if a value is set in RTC registers, and stored length & CRC all valid. * valid means that both stored stub length and stored wake function address are four-byte aligned non-zero values * and the crc check passes * * @param None * * @return esp_rom_wake_func_t : Returns pointer to wake address if a value is set in RTC registers */ esp_rom_wake_func_t esp_rom_get_rtc_wake_addr(void); /** * @brief Store new RTC wake function address * * Set a new RTC wake address function. If a non-NULL function pointer is set then the function * memory is calculated and stored also. * * @param entry_addr Address of function. should be 4-bytes aligned otherwise it will not start from the stub after wake from deepsleep * if NULL length will be ignored and all registers are cleared to 0. * * @param length length of function in RTC fast memory. should be less than RTC Fast memory size and aligned to 4-bytes. * otherwise all registers are cleared to 0. * * @return None */ void esp_rom_set_rtc_wake_addr(esp_rom_wake_func_t entry_addr, size_t length); /** * @brief Suppress ROM log by setting specific RTC control register. * @note This is not a permanent disable of ROM logging since the RTC register can not retain after chip reset. * * @param None * * @return None */ static inline void rtc_suppress_rom_log(void) { /* To disable logging in the ROM, only the least significant bit of the register is used, * but since this register is also used to store the frequency of the main crystal (RTC_XTAL_FREQ_REG), * you need to write to this register in the same format. * Namely, the upper 16 bits and lower should be the same. */ REG_SET_BIT(LP_AON_STORE4_REG, RTC_DISABLE_ROM_LOG); } /** * @brief Software Reset digital core. * * It is not recommended to use this function in esp-idf, use * esp_restart() instead. * * @param None * * @return None */ void software_reset(void); /** * @brief Software Reset digital core. * * It is not recommended to use this function in esp-idf, use * esp_restart() instead. * * @param int cpu_no : The CPU to reset, 0 for PRO CPU, 1 for APP CPU. * * @return None */ void software_reset_cpu(int cpu_no); /** * @} */ #ifdef __cplusplus } #endif ```
```javascript import { keyCodes } from '@fluentui/keyboard-keys'; console.log(keyCodes.Enter, keyCodes.Tab, keyCodes.ArrowDown, keyCodes.ArrowLeft, keyCodes.ArrowRight); export default { name: 'Multiple keyCodes', }; ```
Chelyocarpus is a genus of small to medium-sized fan palms which are native to northwestern South America. Some are upright trees, while others creep along the ground. Species are used for thatch, to weave hats, stuff pillows and as a source of salt. Description Chelyocarpus is a type of small to medium-sized, single or multi-stemmed palms with fan shaped leaves. Stems range from short and creeping along the ground to as much as tall. Stem diameters range from . Individuals have between 10 and 20 leaves with circular blades, the lower surface of which is usually whitish in colour. The flowers are small and bisexual—they have both male and female sex organs in the same flower. The fruit have one or two seeds and ripen to a greenish yellow or brown. Taxonomy The name Chelyocarpus is derived from Ancient Greek and means "turtle carapace-fruited", a reference to cracked surface of the fruits of the genus, which resemble the shell of a turtle. The species was first described by German botanist Carl Dammer in 1920. In the first edition of Genera Palmarum (1987), Natalie Uhl and John Dransfield placed the genus Chelyocarpus in subfamily Coryphoideae, tribe Corypheae and subtribe Thrinacinae Subsequent phylogenetic analysis showed that the Old World and New World members of Thrinacinae are not closely related. As a consequence, Chelyocarpus and related genera have been placed in their own tribe, Cryosophileae. Chelyocarpus is considered to form the sister clade to the rest of the tribe. Distribution Three species of Chelyocarpus are native to the western Amazon, while the fourth is from western Colombia. Chelyocarpus chuco is found in Brazil and Bolivia, C. ulei in Colombia, Ecuador, Peru and Brazil, C. repens near Iquitos, Peru, and C. dianeurus is found in the Pacific lowlands of Colombia. Uses The leaves of Chelyocarpus chuco are used for thatch and to weave hats. The woolly covering of the leaf sheaths of C. dianeurus are used to stuff pillows, and salt is extracted from the trunks of C. ulei. References Arecaceae genera Taxonomy articles created by Polbot Taxa named by Carl Lebrecht Udo Dammer
Sophronica basigranulata is a species of beetle in the family Cerambycidae. It was described by Stephan von Breuning in 1940. References Sophronica Beetles described in 1940
```yaml apiVersion: v1 name: helm-dependency-example description: A minimal Helm chart to demonstrate how to use terratest to test helm charts with dependency version: 0.0.1 dependencies: - name: helm-basic-example alias: basic repository: file://../helm-basic-example condition: basic.enabled version: 0.0.1 ```
```smalltalk // ========================================================================== // Squidex Headless CMS // ========================================================================== // ========================================================================== using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Core.ConvertContent; using Squidex.Domain.Apps.Core.ExtractReferenceIds; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Assets.Repositories; using Squidex.Domain.Apps.Entities.Contents.Repositories; using Squidex.Infrastructure; using Squidex.Infrastructure.Json; using Squidex.Infrastructure.Tasks; #pragma warning disable MA0073 // Avoid comparison with bool constant namespace Squidex.Domain.Apps.Entities.Contents.Queries.Steps; public sealed class ConvertData : IContentEnricherStep { private readonly IUrlGenerator urlGenerator; private readonly IAssetRepository assetRepository; private readonly IContentRepository contentRepository; private readonly ExcludeChangedTypes excludeChangedTypes; public ConvertData(IUrlGenerator urlGenerator, IJsonSerializer serializer, IAssetRepository assetRepository, IContentRepository contentRepository) { this.urlGenerator = urlGenerator; this.assetRepository = assetRepository; this.contentRepository = contentRepository; excludeChangedTypes = new ExcludeChangedTypes(serializer); } public async Task EnrichAsync(Context context, IEnumerable<EnrichedContent> contents, ProvideSchema schemas, CancellationToken ct) { // Get the references across all references to reduce number of database calls. var referenceCleaner = await CleanReferencesAsync(context, contents, schemas, ct); // Get the fields, because they are the same for all schemas. var fieldNames = GetFieldNames(context); foreach (var group in contents.GroupBy(x => x.SchemaId.Id)) { ct.ThrowIfCancellationRequested(); var (schema, components) = await schemas(group.Key); // Reuse the converter for all contents of this schema. var converter = GenerateConverter(context, components, schema, fieldNames, referenceCleaner); foreach (var content in group) { content.Data = converter.Convert(content.Data); } } } private async Task<ValueReferencesConverter?> CleanReferencesAsync(Context context, IEnumerable<EnrichedContent> contents, ProvideSchema schemas, CancellationToken ct) { if (context.NoCleanup()) { return null; } using (Telemetry.Activities.StartActivity("ConvertData/CleanReferencesAsync")) { var ids = new HashSet<DomainId>(); foreach (var group in contents.GroupBy(x => x.SchemaId.Id)) { var (schema, components) = await schemas(group.Key); foreach (var content in group) { content.Data.AddReferencedIds(schema, ids, components); } } if (ids.Count > 0) { var (assets, refContents) = await AsyncHelper.WhenAll( QueryAssetIdsAsync(context, ids, ct), QueryContentIdsAsync(context, ids, ct)); var foundIds = assets.Union(refContents).ToHashSet(); return new ValueReferencesConverter(foundIds); } } return null; } private async Task<IEnumerable<DomainId>> QueryContentIdsAsync(Context context, HashSet<DomainId> ids, CancellationToken ct) { var result = await contentRepository.QueryIdsAsync(context.App, ids, context.Scope(), ct); return result.Select(x => x.Id); } private async Task<IEnumerable<DomainId>> QueryAssetIdsAsync(Context context, HashSet<DomainId> ids, CancellationToken ct) { var result = await assetRepository.QueryIdsAsync(context.App.Id, ids, ct); return result; } private ContentConverter GenerateConverter(Context context, ResolvedComponents components, Schema schema, HashSet<string>? fieldNames, ValueReferencesConverter? cleanReferences) { var converter = new ContentConverter(components, schema); if (!context.IsFrontendClient) { converter.Add(ExcludeHidden.Instance); } converter.Add(excludeChangedTypes); if (cleanReferences != null) { converter.Add(cleanReferences); } converter.Add(new ResolveFromPreviousPartitioning(context.App.Languages)); if (!context.IsFrontendClient && !context.NoDefaults()) { converter.Add(new AddDefaultValues(context.App.PartitionResolver()) { IgnoreNonMasterFields = true, IgnoreRequiredFields = false, // If field names are given we run the enrichment only on the specified fields. FieldNames = fieldNames }); } converter.Add( new ResolveLanguages( context.App.Languages, context.Languages().ToArray()) { ResolveFallback = !context.IsFrontendClient && !context.NoResolveLanguages(), // If field names are given we run the enrichment only on the specified fields. FieldNames = fieldNames }); if (!context.IsFrontendClient) { var assetUrls = context.ResolveUrls().ToList(); if (assetUrls.Count > 0) { converter.Add(new ResolveAssetUrls(context.App.NamedId(), urlGenerator, assetUrls)); } } if (!context.IsFrontendClient || context.ResolveSchemaNames()) { converter.Add(new AddSchemaNames(components)); } return converter; } private static HashSet<string>? GetFieldNames(Context context) { var source = context.Fields(); if (source is not { Count: > 0 }) { return null; } var fields = new HashSet<string>(); foreach (var field in source) { if (FieldNames.IsDataField(field, out var dataField)) { fields.Add(dataField); } else { fields.Add(field); } } return fields.Count == 0 ? null : fields; } } ```
Nutt is an English surname. List of people surnamed Nutt Alfred Nutt (1856–1910), British publisher Alfred Young Nutt (1847–1924), English architect and artist Commodore Nutt (1844–1881), American dwarf who worked for P. T. Barnum Danny Nutt, American football coach David Nutt; several people including David Nutt, British scientist David Nutt, English publisher David H. Nutt, American lawyer and philanthropist Dennis Nutt, American basketball player Dickey Nutt, American basketball coach Edwin C. Nutt (1868–1933), American farmer and politician Eliza Hall Nutt, American philanthropist and schoolteacher Emma Nutt, first female telephone switchboard operator Gordon Nutt (1932–2014), English footballer Grady Nutt, American writer Houston Nutt, American football coach Jim Nutt, American artist John Nutt; several people including John Nutt, English pirate John Nutt (politician), English MP John Nutt (printer), English printer Levi G. Nutt (1866–1938), American Treasury Department agent Mart Nutt (1962–2019), Estonian politician and historian Roy Nutt, American businessman Samantha Nutt, Canadian co-founder of War Child Canada William Nutt (1836–1909), American Civil War colonel See also Nut (disambiguation) Nutt. taxonomic author abbreviation of Thomas Nuttall (1786–1859), English botanist Nutt, New Mexico English-language surnames
```c++ // MallocSizeofChecker.cpp - Check for dubious malloc arguments ---*- C++ -*-=// // // See path_to_url for license information. // //===your_sha256_hash------===// // // Reports inconsistencies between the casted type of the return value of a // malloc/calloc/realloc call and the operand of any sizeof expressions // contained within its argument(s). // //===your_sha256_hash------===// #include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h" #include "clang/AST/StmtVisitor.h" #include "clang/AST/TypeLoc.h" #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h" #include "clang/StaticAnalyzer/Core/Checker.h" #include "clang/StaticAnalyzer/Core/CheckerManager.h" #include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/raw_ostream.h" using namespace clang; using namespace ento; namespace { typedef std::pair<const TypeSourceInfo *, const CallExpr *> TypeCallPair; typedef llvm::PointerUnion<const Stmt *, const VarDecl *> ExprParent; class CastedAllocFinder : public ConstStmtVisitor<CastedAllocFinder, TypeCallPair> { IdentifierInfo *II_malloc, *II_calloc, *II_realloc; public: struct CallRecord { ExprParent CastedExprParent; const Expr *CastedExpr; const TypeSourceInfo *ExplicitCastType; const CallExpr *AllocCall; CallRecord(ExprParent CastedExprParent, const Expr *CastedExpr, const TypeSourceInfo *ExplicitCastType, const CallExpr *AllocCall) : CastedExprParent(CastedExprParent), CastedExpr(CastedExpr), ExplicitCastType(ExplicitCastType), AllocCall(AllocCall) {} }; typedef std::vector<CallRecord> CallVec; CallVec Calls; CastedAllocFinder(ASTContext *Ctx) : II_malloc(&Ctx->Idents.get("malloc")), II_calloc(&Ctx->Idents.get("calloc")), II_realloc(&Ctx->Idents.get("realloc")) {} void VisitChild(ExprParent Parent, const Stmt *S) { TypeCallPair AllocCall = Visit(S); if (AllocCall.second && AllocCall.second != S) Calls.push_back(CallRecord(Parent, cast<Expr>(S), AllocCall.first, AllocCall.second)); } void VisitChildren(const Stmt *S) { for (const Stmt *Child : S->children()) if (Child) VisitChild(S, Child); } TypeCallPair VisitCastExpr(const CastExpr *E) { return Visit(E->getSubExpr()); } TypeCallPair VisitExplicitCastExpr(const ExplicitCastExpr *E) { return TypeCallPair(E->getTypeInfoAsWritten(), Visit(E->getSubExpr()).second); } TypeCallPair VisitParenExpr(const ParenExpr *E) { return Visit(E->getSubExpr()); } TypeCallPair VisitStmt(const Stmt *S) { VisitChildren(S); return TypeCallPair(); } TypeCallPair VisitCallExpr(const CallExpr *E) { VisitChildren(E); const FunctionDecl *FD = E->getDirectCallee(); if (FD) { IdentifierInfo *II = FD->getIdentifier(); if (II == II_malloc || II == II_calloc || II == II_realloc) return TypeCallPair((const TypeSourceInfo *)nullptr, E); } return TypeCallPair(); } TypeCallPair VisitDeclStmt(const DeclStmt *S) { for (const auto *I : S->decls()) if (const VarDecl *VD = dyn_cast<VarDecl>(I)) if (const Expr *Init = VD->getInit()) VisitChild(VD, Init); return TypeCallPair(); } }; class SizeofFinder : public ConstStmtVisitor<SizeofFinder> { public: std::vector<const UnaryExprOrTypeTraitExpr *> Sizeofs; void VisitBinMul(const BinaryOperator *E) { Visit(E->getLHS()); Visit(E->getRHS()); } void VisitImplicitCastExpr(const ImplicitCastExpr *E) { return Visit(E->getSubExpr()); } void VisitParenExpr(const ParenExpr *E) { return Visit(E->getSubExpr()); } void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *E) { if (E->getKind() != UETT_SizeOf) return; Sizeofs.push_back(E); } }; // Determine if the pointee and sizeof types are compatible. Here // we ignore constness of pointer types. static bool typesCompatible(ASTContext &C, QualType A, QualType B) { // sizeof(void*) is compatible with any other pointer. if (B->isVoidPointerType() && A->getAs<PointerType>()) return true; // sizeof(pointer type) is compatible with void* if (A->isVoidPointerType() && B->getAs<PointerType>()) return true; while (true) { A = A.getCanonicalType(); B = B.getCanonicalType(); if (A.getTypePtr() == B.getTypePtr()) return true; if (const PointerType *ptrA = A->getAs<PointerType>()) if (const PointerType *ptrB = B->getAs<PointerType>()) { A = ptrA->getPointeeType(); B = ptrB->getPointeeType(); continue; } break; } return false; } static bool compatibleWithArrayType(ASTContext &C, QualType PT, QualType T) { // Ex: 'int a[10][2]' is compatible with 'int', 'int[2]', 'int[10][2]'. while (const ArrayType *AT = T->getAsArrayTypeUnsafe()) { QualType ElemType = AT->getElementType(); if (typesCompatible(C, PT, AT->getElementType())) return true; T = ElemType; } return false; } class MallocSizeofChecker : public Checker<check::ASTCodeBody> { public: void checkASTCodeBody(const Decl *D, AnalysisManager& mgr, BugReporter &BR) const { AnalysisDeclContext *ADC = mgr.getAnalysisDeclContext(D); CastedAllocFinder Finder(&BR.getContext()); Finder.Visit(D->getBody()); for (CastedAllocFinder::CallVec::iterator i = Finder.Calls.begin(), e = Finder.Calls.end(); i != e; ++i) { QualType CastedType = i->CastedExpr->getType(); if (!CastedType->isPointerType()) continue; QualType PointeeType = CastedType->getPointeeType(); if (PointeeType->isVoidType()) continue; for (CallExpr::const_arg_iterator ai = i->AllocCall->arg_begin(), ae = i->AllocCall->arg_end(); ai != ae; ++ai) { if (!(*ai)->getType()->isIntegralOrUnscopedEnumerationType()) continue; SizeofFinder SFinder; SFinder.Visit(*ai); if (SFinder.Sizeofs.size() != 1) continue; QualType SizeofType = SFinder.Sizeofs[0]->getTypeOfArgument(); if (typesCompatible(BR.getContext(), PointeeType, SizeofType)) continue; // If the argument to sizeof is an array, the result could be a // pointer to any array element. if (compatibleWithArrayType(BR.getContext(), PointeeType, SizeofType)) continue; const TypeSourceInfo *TSI = nullptr; if (i->CastedExprParent.is<const VarDecl *>()) { TSI = i->CastedExprParent.get<const VarDecl *>()->getTypeSourceInfo(); } else { TSI = i->ExplicitCastType; } SmallString<64> buf; llvm::raw_svector_ostream OS(buf); OS << "Result of "; const FunctionDecl *Callee = i->AllocCall->getDirectCallee(); if (Callee && Callee->getIdentifier()) OS << '\'' << Callee->getIdentifier()->getName() << '\''; else OS << "call"; OS << " is converted to a pointer of type '" << PointeeType << "', which is incompatible with " << "sizeof operand type '" << SizeofType << "'"; SmallVector<SourceRange, 4> Ranges; Ranges.push_back(i->AllocCall->getCallee()->getSourceRange()); Ranges.push_back(SFinder.Sizeofs[0]->getSourceRange()); if (TSI) Ranges.push_back(TSI->getTypeLoc().getSourceRange()); PathDiagnosticLocation L = PathDiagnosticLocation::createBegin(i->AllocCall->getCallee(), BR.getSourceManager(), ADC); BR.EmitBasicReport(D, this, "Allocator sizeof operand mismatch", categories::UnixAPI, OS.str(), L, Ranges); } } } }; } void ento::registerMallocSizeofChecker(CheckerManager &mgr) { mgr.registerChecker<MallocSizeofChecker>(); } bool ento::shouldRegisterMallocSizeofChecker(const CheckerManager &mgr) { return true; } ```
The Hutchinson House is a historic home completed in 1908 in Tampa, Florida, United States. It is a three-story brick building in the Second Empire architecture. The building includes a high mansard roof and large porch with tall Corinthian columns. It was built by Currie J. Hutchinson, a local merchant, and is one of the few structures of its style in Florida. It was added to the U.S. National Register of Historic Places on November 1, 1977, and is located at 304 Plant Avenue. History The Hutchinson House was built by Mr. Currie Hutchinson. Construction began in 1906 and the building was finished in 1908. Most of the building materials were shipped from Hutchinson's home state of Ohio. The masonry technique was rather unusual and allowed for a very tight mortar line in between the red bricks. The exterior walls are approximately 18 inches thick of solid brick. The building even has a basement, which has remained dry for over 100 years, despite being situated less than 1/8 of a mile from the Tampa Bay. There are 5 working fireplaces, 3 on the first floor, two on the second floor and a stove in the basement. The total construction cost was reported to be approximately six thousand five hundred dollars. A small fortune back then. The Hutchinson Mansion was occupied by the Hutchinson family while Mr. Hutchinson operated his pharmacy on Franklin Street in downtown Tampa. It was next used as a hospital from approximately 1932 to 1946. Hutchinson House was then used as a rooming house until 1958 when it became the Pi Kappa Phi fraternity. It remained a fraternity house until 1977 the University of Tampa kicked all the fraternities off the campus and the Hutchinson house was left empty (and in very rough shape). The University of Tampa sold the mansion to the City of Tampa. The City of Tampa sold the Hutchinson House to the Tampa Preservation Society, which commenced a major restoration of the building which continued for approximately two years. In 1980, attorney William B. Plowman began negotiations with the Tampa Preservation Society to purchase the Hutchinson House. He purchased the building in 1981, and continued the restoration including improvements to the first, second and third floors, most notably restoring access to the third floor without interfering with the interior flow of the house. All historical aspects were strictly adhered to during all the restorations. In 1989, Matt Powell rented space from Mr. Plowman. Matt loved the building so much that he was able to persuade Mr. Plowman to transfer the duties of the Hutchinson House to him in 1999. Matt Powell purchased the historical building and has continued to preserve, restore and maintain this magnificent building. Architecture One of the most interesting things about the Historical Hutchinson house is the architecture style. It is of the "Second Empire" style, which is reflected in the third Floor exterior walls. The third floor is contained inside the mansard roof. The mansard roof is made of slate. Each slate shingle was cut by hand, and has lasted over a century. The Hutchinson house has been through 100 years of hurricanes, heat and cold, and still remains in excellent condition. Second Empire is an architectural style popular during the Victorian era, reaching its zenith between 1865 and 1880, and so named for the "French" elements in vogue during the era of the Second French Empire. The canonical example of Second Empire style is the Opera Garnier (formerly known as the "Paris Opera") in Paris. In the United States, the Second Empire style usually includes a steep, mansard roof; the roof being the most noteworthy link to the style's French roots. This tower element could be of equal height of the top most floor. As was done with the Hutchinson House. The mansard roof crest was often topped with an iron trim, sometimes referred to as "cresting". The Hutchinson Mansion also prominently displays 3 separate chimneys extending 10 feet above the roof top. These chimneys service the 5 fireplaces, and stove. In 2007, a replica of the original gas lantern was restored to the front yard. And the Hutchinson House Stone, seen above, was used as a stepping stone to make it easier to sit upon your horse. Landmark status The Hutchinson House has been a historical landmark building since 1977, when the United States Department of the Interior decided that due to the architecture, age, and condition of the building that it should be preserved as a historical landmark. References Additional sources and external links Hillsborough County listings at National Register of Historic Places Florida's Office of Cultural and Historical Programs Hillsborough County listings Hutchinson House Houses in Tampa, Florida Houses on the National Register of Historic Places in Hillsborough County, Florida National Register of Historic Places in Tampa, Florida 1908 establishments in Florida
```xml import { IReadonlyTheme } from '@microsoft/sp-component-base'; export interface IAdaptiveCardHostProps { themeVariant: IReadonlyTheme | undefined; template: string; data: string; useTemplating: boolean; } ```
Stroudville is an unincorporated community in Robertson County, Tennessee, in the United States. History A post office was established at Stroudsville in 1900, and remained in operation until it was discontinued in 1903. References Unincorporated communities in Robertson County, Tennessee Unincorporated communities in Tennessee
```objective-c //===-- SystemInitializerTest.h ---------------------------------*- C++ -*-===// // // See path_to_url for license information. // //===your_sha256_hash------===// #ifndef LLDB_TOOLS_LLDB_TEST_SYSTEMINITIALIZERTEST_H #define LLDB_TOOLS_LLDB_TEST_SYSTEMINITIALIZERTEST_H #include "lldb/Initialization/SystemInitializerCommon.h" namespace lldb_private { /// Initializes lldb. /// /// This class is responsible for initializing all of lldb system /// services needed to use the full LLDB application. This class is /// not intended to be used externally, but is instead used /// internally by SBDebugger to initialize the system. class SystemInitializerTest : public SystemInitializerCommon { public: SystemInitializerTest(); ~SystemInitializerTest() override; llvm::Error Initialize() override; void Terminate() override; }; } // namespace lldb_private #endif // LLDB_TOOLS_LLDB_TEST_SYSTEMINITIALIZERTEST_H ```
Suzanne B. Labarge (born 1940) is a Canadian businesswoman, and past chancellor of McMaster University. Labarge is a member of The Coca-Cola Company's board of directors, and was the vice-chairman of the Royal Bank of Canada. Career Labarge was born in Canada. Labarge received a B.A. in Economics from McMaster University, and a M.B.A. from Harvard Business School. Then she worked in the federal public service, including 2 years as assistant auditor general and 8 years in the Office of the Superintendent of Financial Institutions. She joined the Royal Bank of Canada where she became the first woman to be appointed as a Royal Bank executive in 1979, and Executive Vice-President in 1995. In 1999, she became RBC's Chief Risk Officer. During her time with RBC, she served as the chief risk officer of RBC Capital Markets Corporation and RBC Capital Markets. Labarge served as the chief risk officer of Royal Bank of Canada until September 2004 and its executive vice president and corporate treasurer from 1995 to 1998. Labarge had served as the chief risk officer at RBC Financial Group and the vice chairman at RBC Capital Markets Corporation and RBC Capital Markets. She served as the vice chairman at RBC Financial Group. Labarge served as vice chairman of Royal Bank of Canada until September 2004. Labarge assumed the role of chancellor at McMaster University on 1 September 2013, and served a three-year term. In the previous year, Labarge contributed C$10 million to the university in an effort to fund inter-disciplinary research into the subject of aging. The university operates the Labarge Optimal Ageing Initiative. In 2007, she had endowed the Raymond and Margaret Labarge Chair in Research and Knowledge Application for Optimal Aging. Labarge made a second gift to the University in October 2016. This gift, valued at C$15 million, established the Labarge Centre for Mobility in Aging. The focus of the Centre is to fund "interdisciplinary research into ways seniors can live more independently through greater mobility, better health and fitness and increased social connection." Other roles Since December 2007: Director at Coca-Cola s. January 2005-May 2007: Independent Director at Novelis Inc. Previously: Director at XL Group Previously: Member of supervisory board at Deutsche Bank AG and of Deutsche Bank AG Chairwoman of CLS Group (2001-2003) Distinctions 2000: Awards of Distinction by the Concordia University 2019: Member of the Order of Canada. References 1940 births Living people Harvard Business School alumni Chancellors of McMaster University McMaster University alumni Directors of The Coca-Cola Company Canadian women in business Women business executives Members of the Order of Canada
```shell Adding a remote repository Search for commits by author How to write a git commit message Recover lost code Dates in git ```
```java /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package com.google.android.material.ripple; import android.content.res.ColorStateList; import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.drawable.Drawable; import androidx.annotation.ColorInt; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.RestrictTo; import androidx.annotation.RestrictTo.Scope; import androidx.core.graphics.drawable.TintAwareDrawable; import androidx.dynamicanimation.animation.SpringForce; import com.google.android.material.shape.MaterialShapeDrawable; import com.google.android.material.shape.ShapeAppearanceModel; import com.google.android.material.shape.Shapeable; import com.google.android.material.shape.StateListShapeAppearanceModel; /** * A compat {@link Drawable} that is used to provide an overlay for pressed, focused, and hovered * states (only when in enabled). This is intended to be used pre-Lollipop. * * <p>This Drawable is a {@link MaterialShapeDrawable} so that it can be shaped to match a * MaterialShapeDrawable background. * * <p>Unlike the framework {@link android.graphics.drawable.RippleDrawable}, this will <b>not</b> * apply different alphas for pressed, focused, and hovered states and it does not provide a ripple * animation for the pressed state. */ @RestrictTo(Scope.LIBRARY_GROUP) public class RippleDrawableCompat extends Drawable implements Shapeable, TintAwareDrawable { private RippleDrawableCompatState drawableState; /** * Creates a {@link RippleDrawableCompat} with the given shape that will only draw when enabled * and at least one of: pressed, focused, or hovered. * * @param shapeAppearanceModel The shape for the ripple. */ public RippleDrawableCompat(ShapeAppearanceModel shapeAppearanceModel) { this(new RippleDrawableCompatState(new MaterialShapeDrawable(shapeAppearanceModel))); } private RippleDrawableCompat(RippleDrawableCompatState state) { super(); this.drawableState = state; } @Override public void setTint(@ColorInt int tintColor) { drawableState.delegate.setTint(tintColor); } @Override public void setTintMode(@Nullable PorterDuff.Mode tintMode) { drawableState.delegate.setTintMode(tintMode); } @Override public void setTintList(@Nullable ColorStateList tintList) { drawableState.delegate.setTintList(tintList); } @Override public void setShapeAppearanceModel(@NonNull ShapeAppearanceModel shapeAppearanceModel) { drawableState.delegate.setShapeAppearanceModel(shapeAppearanceModel); } /** * Get the {@link ShapeAppearanceModel} containing the path that will be rendered in this * drawable. * * @return the current model. */ @Override @NonNull public ShapeAppearanceModel getShapeAppearanceModel() { return drawableState.delegate.getShapeAppearanceModel(); } public void setStateListShapeAppearanceModel( @NonNull StateListShapeAppearanceModel stateListShapeAppearanceModel) { drawableState.delegate.setStateListShapeAppearanceModel(stateListShapeAppearanceModel); } @Nullable public StateListShapeAppearanceModel getStateListShapeAppearanceModel() { return drawableState.delegate.getStateListShapeAppearanceModel(); } public void setCornerSpringForce(@NonNull SpringForce springForce) { drawableState.delegate.setCornerSpringForce(springForce); } @Nullable public SpringForce getCornerSpringForce() { return drawableState.delegate.getCornerSpringForce(); } /* * This is always stateful as it draws on the canvas only when enabled and (pressed, focused, or * hovered). */ @Override public boolean isStateful() { return true; } @Override protected boolean onStateChange(@NonNull int[] stateSet) { boolean changed = super.onStateChange(stateSet); if (drawableState.delegate.setState(stateSet)) { changed = true; } boolean shouldDrawRipple = RippleUtils.shouldDrawRippleCompat(stateSet); // If shouldDrawRipple is changing, this needs to be redrawn even if the paint / tint values // are not changing in order to support setting a ColorStateList with a single color. if (drawableState.shouldDrawDelegate != shouldDrawRipple) { drawableState.shouldDrawDelegate = shouldDrawRipple; changed = true; } return changed; } @Override public void draw(Canvas canvas) { // Only draw the delegate Drawable when enabled and at least one of: pressed, focused, hovered. if (drawableState.shouldDrawDelegate) { drawableState.delegate.draw(canvas); } } @Override protected void onBoundsChange(@NonNull Rect bounds) { super.onBoundsChange(bounds); drawableState.delegate.setBounds(bounds); } @Nullable @Override public ConstantState getConstantState() { return drawableState; } @NonNull @Override public RippleDrawableCompat mutate() { RippleDrawableCompatState newDrawableState = new RippleDrawableCompatState(drawableState); drawableState = newDrawableState; return this; } @Override public void setAlpha(int alpha) { drawableState.delegate.setAlpha(alpha); } @Override public void setColorFilter(@Nullable ColorFilter colorFilter) { drawableState.delegate.setColorFilter(colorFilter); } @Override public int getOpacity() { return drawableState.delegate.getOpacity(); } /** * A {@link ConstantState} for {@link Ripple} * */ static final class RippleDrawableCompatState extends ConstantState { @NonNull MaterialShapeDrawable delegate; boolean shouldDrawDelegate; public RippleDrawableCompatState(MaterialShapeDrawable delegate) { this.delegate = delegate; this.shouldDrawDelegate = false; } public RippleDrawableCompatState(@NonNull RippleDrawableCompatState orig) { this.delegate = (MaterialShapeDrawable) orig.delegate.getConstantState().newDrawable(); this.shouldDrawDelegate = orig.shouldDrawDelegate; } @NonNull @Override public RippleDrawableCompat newDrawable() { return new RippleDrawableCompat(new RippleDrawableCompatState(this)); } @Override public int getChangingConfigurations() { return 0; } } } ```
```javascript /* eslint-env jest */ import cheerio from 'cheerio' import fs from 'fs-extra' import { findPort, killApp, launchApp, nextBuild, nextStart, renderViaHTTP, } from 'next-test-utils' import { join } from 'path' const appDir = join(__dirname, '..') const appPage = join(appDir, 'pages/_app.js') const indexPage = join(appDir, 'pages/index.js') let app let appPort let indexPageContent const runTests = (isDev) => { const getData = async () => { if (isDev) { appPort = await findPort() app = await launchApp(appDir, appPort) } else { const { code } = await nextBuild(appDir) if (code !== 0) throw new Error(`build faild, exit code: ${code}`) appPort = await findPort() app = await nextStart(appDir, appPort) } const html = await renderViaHTTP(appPort, '/') await killApp(app) const $ = cheerio.load(html) return JSON.parse($('#__NEXT_DATA__').text()) } it('should not have gip or appGip in NEXT_DATA for page without getInitialProps', async () => { const data = await getData() expect(data.gip).toBe(undefined) expect(data.appGip).toBe(undefined) }) it('should have gip in NEXT_DATA for page with getInitialProps', async () => { indexPageContent = await fs.readFile(indexPage, 'utf8') await fs.writeFile( indexPage, ` const Page = () => 'hi' Page.getInitialProps = () => ({ hello: 'world' }) export default Page ` ) const data = await getData() expect(data.gip).toBe(true) }) it('should have gip and appGip in NEXT_DATA for page with getInitialProps and _app with getInitialProps', async () => { await fs.writeFile( appPage, ` const App = ({ Component, pageProps }) => <Component {...pageProps} /> App.getInitialProps = async (ctx) => { let pageProps = {} if (ctx.Component.getInitialProps) { pageProps = await ctx.Component.getInitialProps(ctx.ctx) } return { pageProps } } export default App ` ) const data = await getData() expect(data.gip).toBe(true) expect(data.appGip).toBe(true) }) it('should only have appGip in NEXT_DATA for page without getInitialProps and _app with getInitialProps', async () => { await fs.writeFile(indexPage, indexPageContent) const data = await getData() await fs.remove(appPage) expect(data.gip).toBe(undefined) expect(data.appGip).toBe(true) }) } describe('gip identifiers', () => { ;(process.env.TURBOPACK_BUILD ? describe.skip : describe)( 'development mode', () => { runTests(true) } ) ;(process.env.TURBOPACK_DEV ? describe.skip : describe)( 'production mode', () => { runTests() } ) }) ```
Montoulieu (; ) is a commune in the Ariège department in southwestern France. Population See also Communes of the Ariège department References Communes of Ariège (department) Ariège communes articles needing translation from French Wikipedia
```viml " Author: Christian Gibbons <cgibbons@gmu.edu> " Description: flawfinder linter for c files call ale#Set('c_flawfinder_executable', 'flawfinder') call ale#Set('c_flawfinder_options', '') call ale#Set('c_flawfinder_minlevel', 1) call ale#Set('c_flawfinder_error_severity', 6) function! ale_linters#c#flawfinder#GetCommand(buffer) abort " Set the minimum vulnerability level for flawfinder to bother with let l:minlevel = ' --minlevel=' . ale#Var(a:buffer, 'c_flawfinder_minlevel') return '%e -CDQS' \ . ale#Pad(ale#Var(a:buffer, 'c_flawfinder_options')) \ . l:minlevel \ . ' %t' endfunction call ale#linter#Define('c', { \ 'name': 'flawfinder', \ 'output_stream': 'stdout', \ 'executable': {b -> ale#Var(b, 'c_flawfinder_executable')}, \ 'command': function('ale_linters#c#flawfinder#GetCommand'), \ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat', \}) ```
```xml import { Component } from '@angular/core'; @Component({ selector: 'ngx-profit-card', styleUrls: ['./profit-card.component.scss'], templateUrl: './profit-card.component.html', }) export class ProfitCardComponent { flipped = false; toggleView() { this.flipped = !this.flipped; } } ```
Dutch Indies literature or Dutch East Indies literature (Dutch: Indische letteren or Nederlands Indische literatuur, Indonesia: Sastra Hindia Belanda) is the Dutch language literature of colonial and post-colonial Indonesia from the Dutch Golden Age to the present day. It includes Dutch, Indo-European and Indonesian authors. Its subject matter thematically revolves around the VOC and Dutch East Indies eras, but also includes the postcolonial discourse. Even though the socio-economic environment of the Dutch East Indies' colonial society was not particularly conducive to literary pursuits an influential Dutch literary subgenre developed described as follows: [...] a descriptive quality about them in the way they treated ordinary aspects of life in the Indies. This set them for ever apart from those writings in Europe, even if the language was still Dutch. It was this backdrop, or decor, that was different. The idea that whilst the language was Dutch, the scene, the scenery, everything was somehow different. This sense of the different permeated all that was written, even if their own (authors) reference point was still a belief that they were part of the metropolitan literary tradition. —Ian Campbell, Sydney University, 2000. Most masterpieces in this genre have international appeal and have been translated to English. In December 1958 for instance American Time magazine praised the translation of Maria Dermoût's The Ten Thousand Things, and named it one of the best books of the year. Since 1985 academic working groups on Dutch Indies literature have existed in the Netherlands and the USA. The University of Massachusetts Amherst maintains a Library of the Indies and describes this literature as follows: It is a literature of great creativity and irony, a record of the lost cause and expectations of a colonial power. Canon of Dutch Indies literature The three iconic authors of the 19th century are Multatuli, P. A. Daum and Louis Couperus. Mandatory reading when studying Dutch Indies literature includes: Multatuli: Max Havelaar; (Multatuli. Max Havelaar: Or The Coffee Auctions of the Dutch Trading Company. Translated by Roy Edwards. Introduction by D. H. Lawrence. Afterword by E. M. Beekman) Louis Couperus: De stille kracht; (L. Couperus. E. M. Beekman, ed. The Hidden Force. Translated by Alexander Teixeira de Mattos. Revised and edited, with an introduction and notes by E. M. Beekman.) P. A. Daum: Uit de suiker in de tabak and Goena Goena; E. du Perron: Het land van herkomst; (E.du Perron. Country of Origin. Translated by Francis Bulhof and Elizabeth Daverman. Introduction and notes by Francis Bulhof.) Maria Dermoût: De tienduizend dingen; (Maria Dermoût. The Ten Thousand Things. Translated by Hans Koning. Afterword by E. M. Beekman.) Vincent Mahieu (aka Tjalie Robinson): Tjoek and Tjies; Hella S. Haasse: Oeroeg, Sleuteloog and Heren van de Thee; (The Lords of Tea (1992) translated into English by Ina Rilke as The Tea Lords, 2010.) Brouwers: Bezonken rood; Rudy Kousbroek: Het Oostindisch kampsyndroom; Adriaan van Dis: Indische duinen. (My Father’s War, London, Heinemann, 2004) and Familieziek (Family Fray) Academic authorities The two authoritative reference books on Dutch Indies literature are the "Oostindische spiegel" by literary historian Rob Nieuwenhuys and "Paradijzen van weleer" by literary professor E.M. Beekman. Nieuwenhuys (1908–1999) born in the Dutch East Indies and of Indo descent from his mother's side is the nestor of Dutch Indies literature. The most important American literary professor specialised in Dutch Indies literature was E.M.Beekman (1939-2008), who spent his early childhood in the Dutch East Indies, and was associated with the University of Massachusetts. With the support of the 'Translations Program' of the 'National Endowment for the Humanities', the 'Foundation for the Promotion of the Translation of Dutch Literary Work', and the 'Prince Bernhard Fund', Beekman has edited many translations of Dutch Indies literature and published widely on the topic. In recent years the University of California, Berkeley has shown particular interest in the Dutch Indies subject matter. Berkeley professor J. Dewulf is now a driving force behind further study and deepening of existing knowledge with initiatives such as the 'Amerindo Research Project' and the 2011 'International Conference on Colonial and Post-Colonial Connections in Dutch Literature'. In the Netherlands the leading professor is Pamela Pattynama associated with Amsterdam University. Indo European authors Seventy-five percent of the Dutch speaking community in the Dutch East Indies were so called Indo-Europeans, i.e. Eurasians belonging to the European legal class. Although most published work was written by full blooded Dutchmen, so called 'Totoks', many Indo authors have also written Dutch Indies literature covering a vast array of topics. While Louis Couperus wrote about the upper class elite, Victor Ido wrote about the lower class paupers. After the Indo diaspora from the former Dutch East Indies (now: Indonesia) Indo authors have mostly contributed to the postcolonial discourse of a.o. identity formation. List of Indo authors A considerable number of authors of Dutch Indies literature are Indo-European i.e. Dutch-Indonesian Eurasians. Authors include: Louis Couperus (1863–1923) Victor Ido (1869–1948) Ernest Douwes Dekker (1879–1950) Maria Dermoût (1888–1962) Edgar du Perron (1899–1940) Beb Vuyk (1905–1991) Rob Nieuwenhuys (1908–1999) Much of the postcolonial literary discourse has been written by second generation immigrant authors of Indo (Eurasian) descent. Authors include: Adriaan van Dis (1946– ) Ernst Jansz (1948– ) Marion Bloem (1952– ) The most significant and influential author that studied postcolonial identity formation however is the avant garde and visionary writer Tjalie Robinson (1911–1974), a first generation repatriant. Indonesian authors During the "Dutch Ethical Policy" in the interbellum period of the first half of the twentieth century, indigenous authors and intellectuals from the Dutch East Indies came to the Netherlands to study and/or work. During their stay of some years they participated in and contributed to the Dutch literary system. They wrote literary works and published literature in important literary reviews such as Het Getij, De Gemeenschap, Links Richten and Forum and as such contributed to Dutch Indies literature. By exploring new literary themes and/or focusing on indigenous protagonists, they drew at the same time attention to indigenous culture and the indigenous plight. An early example was the Javanese prince and poet Noto Soeroto, a writer and journalist from the Dutch East Indies. He was not a radical Indonesian nationalist, but a supporter of the so-called association politics, which sought collaboration between the Dutch and the native peoples of the Dutch East Indies. Noto Soeroto came to the Netherlands to study Law in Leiden in 1910. He published in the avant-garde review Het Getij. His non-political poems were published in many volumes. They had exotic titles such as Melati-knoppen, Melati buds, De geur van moeders haarwrong, the odour/smell of mothers hair knot or Lotos of morgendauw, Lotos or morning dew. He wrote a famous brochure on Kartini, the Javanese princess and Indonesian national heroine, whose popular letters were published in 1912 and also contributed to Dutch Indies literature. Although Dutch had no formal status in the Dutch East Indies, among the indigenous elite of the colony many were fluent in the Dutch language. Authors include: Chairil Anwar; Soewarsih Djojopoespito; Noto Soeroto; Sutan Sjahrir; Kartini. The wider definition of Dutch Indies literature also includes Sukarno's historic defence speech at his 1930 trial in Bandung. Another historic piece is Sutan Sjahrir's political pamphlet Onze Strijd (Our Struggle) or his book Indonesische Overpeinzingen (Indonesian Musings) of 1945, which were first written in Dutch and only later translated to Indonesian and English. List of Dutch Indies literature authors (1713–1779) Sultan van Bantam (1979) Wolter Robert, Baron van Hoevell (1812–1879) Multatuli (1820–1887) Conrad Busken Huet (1826–1886) Justus van Maurik (1846–1905) Indrukken van een Totok (1897) P. A. Daum (1850–1898) Louis Couperus (1863–1923) Victor Ido (1869–1948) Jan Fabricius (1871-1964) Ernest Douwes Dekker (1879–1950) Henri van Wermeskerken (1882-1937) Maria Dermoût (1888–1962) Edgar du Perron (1899–1940) Madelon Szekely-Lulofs (1899–1958) Rubber (1931) Koelie (1931) Johan Fabricius (1899–1981) De Scheepsjongens van Bontekoe (1923) Beb Vuyk (1905–1991) Rob Nieuwenhuys (1908–1999) Oostindische spiegel (1972) Tjalie Robinson (1911–1974) Suwarsih Djojopuspito (1912–1977) Hella Haasse (1918–2011) Ernst Jansz (1948– ) Marion Bloem (1952– ) A. Alberts Chairil Anwar Augusta de Wit Kartini Rudy Kousbroek Helga Ruebsamen Soetan Sjahrir Noto Soeroto F. Springer Marie van Zeggelen Willem Walraven See also Canon of Dutch Literature Dutch literature Indonesian literature Indos in colonial history List of Dutch language writers Notes References Nieuwenhuys, Rob Mirror of the Indies: A History of Dutch Colonial Literature - translated from Dutch by E. M. Beekman (Publisher: Periplus, 1999) Beekman E.M. Fugitive dreams: an anthology of Dutch colonial literature (Publisher: University of Massachusetts Amherst Press, Amherst, 1988) Further reading Paasman, Bert ‘Tjalie Robinson, de stem van Indisch Nederland’ (Publisher: Stichting Tong Tong, 1994) Review: Sastrowardoyo, Subagio Sastra Hindia Belanda dan kita (Publisher: PT Balai Pustaka, Jakarta, 1990) Chapter VIII P.145-155 Willems, Wim Tjalie Robinson; Biografie van een Indo-schrijver (Publisher: Bert Bakker, 2008) Willems, Wim Schrijven met je vuisten; brieven van Tjalie Robinson (Publisher: Prometheus, 2009) Dewulf, Jeroen, Olf Praamstra and Michiel van Kempen Shifting the Compass: Pluricontinental Connections in Dutch Colonial and Postcolonial Literature'' (Publisher: Cambridge Scholars Publishing, 2013) External links Research programme Berkeley University Research programme Amsterdam University DBNL - Digital library of Dutch literature ING - Institute for Dutch history Literature of the Dutch East Indies Dutch-language literature Indonesian literature
```elixir defmodule PhoenixTrello.SessionController do use PhoenixTrello.Web, :controller plug :scrub_params, "session" when action in [:create] def create(conn, %{"session" => session_params}) do case PhoenixTrello.Session.authenticate(session_params) do {:ok, user} -> {:ok, jwt, _full_claims} = user |> Guardian.encode_and_sign(:token) conn |> put_status(:created) |> render("show.json", jwt: jwt, user: user) :error -> conn |> put_status(:unprocessable_entity) |> render("error.json") end end def delete(conn, _) do {:ok, claims} = Guardian.Plug.claims(conn) conn |> Guardian.Plug.current_token |> Guardian.revoke!(claims) conn |> render("delete.json") end def unauthenticated(conn, _params) do conn |> put_status(:forbidden) |> render(PhoenixTrello.SessionView, "forbidden.json", error: "Not Authenticated") end end ```
```smalltalk /* This file is part of the iText (R) project. Authors: Apryse Software. This program is offered under a commercial and under the AGPL license. For commercial licensing, contact us at path_to_url For AGPL licensing, see below. AGPL licensing: This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the along with this program. If not, see <path_to_url */ using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; using iText.Commons; using iText.Commons.Utils; using iText.Forms; using iText.Forms.Fields; using iText.Forms.Form.Element; using iText.Forms.Util; using iText.Kernel.Colors; using iText.Kernel.Geom; using iText.Kernel.Pdf; using iText.Layout.Element; using iText.Layout.Font; using iText.Layout.Layout; using iText.Layout.Properties; using iText.Layout.Renderer; namespace iText.Forms.Form.Renderer { /// <summary> /// The /// <see cref="AbstractTextFieldRenderer"/> /// implementation for SigFields. /// </summary> public class SignatureAppearanceRenderer : AbstractTextFieldRenderer { /// <summary>Extra space at the top.</summary> private const float TOP_SECTION = 0.3f; private const float EPS = 1e-5f; private readonly SignatureAppearanceRenderer.RenderingMode renderingMode; private bool isFontSizeApproximated = false; /// <summary> /// Creates a new /// <see cref="SignatureAppearanceRenderer"/> /// instance. /// </summary> /// <param name="modelElement">the model element</param> public SignatureAppearanceRenderer(SignatureFieldAppearance modelElement) : base(modelElement) { renderingMode = RetrieveRenderingMode(); } /// <summary><inheritDoc/></summary> /// <returns> /// /// <inheritDoc/> /// </returns> protected internal override bool IsLayoutBasedOnFlatRenderer() { return false; } /// <summary><inheritDoc/></summary> /// <returns> /// /// <inheritDoc/> /// </returns> protected internal override IRenderer CreateFlatRenderer() { Div div = new Div(); foreach (IElement element in ((SignatureFieldAppearance)modelElement).GetContentElements()) { if (element is Image) { div.Add((Image)element); } else { div.Add((IBlockElement)element); } } return div.CreateRendererSubTree(); } /// <summary><inheritDoc/></summary> public override LayoutResult Layout(LayoutContext layoutContext) { ApproximateFontSizeToFitLayoutArea(layoutContext); return base.Layout(layoutContext); } /// <summary><inheritDoc/></summary> /// <param name="layoutContext"> /// /// <inheritDoc/> /// </param> protected internal override void AdjustFieldLayout(LayoutContext layoutContext) { Rectangle bBox = GetOccupiedArea().GetBBox().Clone(); ApplyPaddings(bBox, false); ApplyBorderBox(bBox, false); ApplyMargins(bBox, false); if (bBox.GetY() < 0) { bBox.SetHeight(bBox.GetY() + bBox.GetHeight()); bBox.SetY(0); } Rectangle descriptionRect = null; Rectangle signatureRect = null; switch (renderingMode) { case SignatureAppearanceRenderer.RenderingMode.NAME_AND_DESCRIPTION: case SignatureAppearanceRenderer.RenderingMode.GRAPHIC_AND_DESCRIPTION: { // Split the signature field into two and add the name of the signer or an image to the one side, // the description to the other side. UnitValue[] paddings = GetPaddings(); if (bBox.GetHeight() > bBox.GetWidth()) { float topPadding = paddings[0].GetValue(); float bottomPadding = paddings[2].GetValue(); signatureRect = new Rectangle(bBox.GetX(), bBox.GetY() + bBox.GetHeight() / 2 + bottomPadding / 2, bBox.GetWidth (), bBox.GetHeight() / 2 - bottomPadding / 2); descriptionRect = new Rectangle(bBox.GetX(), bBox.GetY(), bBox.GetWidth(), bBox.GetHeight() / 2 - topPadding / 2); } else { // origin is the bottom-left float rightPadding = paddings[1].GetValue(); float leftPadding = paddings[3].GetValue(); signatureRect = new Rectangle(bBox.GetX(), bBox.GetY(), bBox.GetWidth() / 2 - rightPadding / 2, bBox.GetHeight ()); descriptionRect = new Rectangle(bBox.GetX() + bBox.GetWidth() / 2 + leftPadding / 2, bBox.GetY(), bBox.GetWidth () / 2 - leftPadding / 2, bBox.GetHeight()); } break; } case SignatureAppearanceRenderer.RenderingMode.GRAPHIC: { // The signature field will consist of an image only; no description will be shown. signatureRect = bBox; break; } case SignatureAppearanceRenderer.RenderingMode.DESCRIPTION: { // Default one, it just shows whatever description was defined for the signature. float additionalHeight = CalculateAdditionalHeight(); if (RetrieveHeight() == null) { // Adjust calculated occupied area height to keep the same font size. float calculatedHeight = GetOccupiedArea().GetBBox().GetHeight(); // (calcHeight + addHeight + topSect) * (1 - TOP_SECTION) - addHeight = calcHeight, => float topSection = (calculatedHeight + additionalHeight) * TOP_SECTION / (1 - TOP_SECTION); GetOccupiedArea().GetBBox().MoveDown(topSection + additionalHeight).SetHeight(calculatedHeight + topSection + additionalHeight); bBox.MoveDown(bBox.GetBottom() - GetOccupiedArea().GetBBox().GetBottom() - additionalHeight / 2); } descriptionRect = bBox.SetHeight(GetOccupiedArea().GetBBox().GetHeight() * (1 - TOP_SECTION) - additionalHeight ); break; } default: { return; } } AdjustChildrenLayout(renderingMode, signatureRect, descriptionRect, layoutContext.GetArea().GetPageNumber( )); } /// <summary><inheritDoc/></summary> /// <returns> /// /// <inheritDoc/> /// </returns> public override IRenderer GetNextRenderer() { return new iText.Forms.Form.Renderer.SignatureAppearanceRenderer((SignatureFieldAppearance)modelElement); } /// <summary>Gets the default value of the form field.</summary> /// <returns>the default value of the form field.</returns> public override String GetDefaultValue() { // FormProperty.FORM_FIELD_VALUE is not supported for SigField element. return ""; } /// <summary><inheritDoc/></summary> /// <param name="drawContext"> /// /// <inheritDoc/> /// </param> protected internal override void ApplyAcroField(DrawContext drawContext) { String name = GetModelId(); UnitValue fontSize = (UnitValue)this.GetPropertyAsUnitValue(Property.FONT_SIZE); if (!fontSize.IsPointValue()) { ILogger logger = ITextLogManager.GetLogger(typeof(iText.Forms.Form.Renderer.SignatureAppearanceRenderer)); logger.LogError(MessageFormatUtil.Format(iText.IO.Logs.IoLogMessageConstant.PROPERTY_IN_PERCENTS_NOT_SUPPORTED , Property.FONT_SIZE)); } PdfDocument doc = drawContext.GetDocument(); Rectangle area = GetOccupiedArea().GetBBox().Clone(); ApplyMargins(area, false); IDictionary<int, Object> properties = FormFieldRendererUtil.RemoveProperties(this.modelElement); PdfPage page = doc.GetPage(occupiedArea.GetPageNumber()); Background background = this.GetProperty<Background>(Property.BACKGROUND); // Background is light gray by default, but can be set to null by user. Color backgroundColor = background == null ? null : background.GetColor(); float fontSizeValue = fontSize.GetValue(); if (font == null) { font = doc.GetDefaultFont(); } // Some properties are set to the HtmlDocumentRenderer, which is root renderer for this SigFieldRenderer, but // in forms logic root renderer is CanvasRenderer, and these properties will have default values. So // we get them from renderer and set these properties to model element, which will be passed to forms logic. modelElement.SetProperty(Property.FONT_PROVIDER, this.GetProperty<FontProvider>(Property.FONT_PROVIDER)); modelElement.SetProperty(Property.RENDERING_MODE, this.GetProperty<SignatureAppearanceRenderer.RenderingMode? >(Property.RENDERING_MODE)); PdfSignatureFormField sigField = new SignatureFormFieldBuilder(doc, name).SetWidgetRectangle(area).SetConformanceLevel (GetConformanceLevel(doc)).SetFont(font).CreateSignature(); sigField.DisableFieldRegeneration(); sigField.SetFontSize(fontSizeValue); sigField.GetFirstFormAnnotation().SetBackgroundColor(backgroundColor); ApplyDefaultFieldProperties(sigField); ApplyAccessibilityProperties(sigField, doc); sigField.GetFirstFormAnnotation().SetFormFieldElement((SignatureFieldAppearance)modelElement); sigField.EnableFieldRegeneration(); PdfAcroForm forms = PdfFormCreator.GetAcroForm(doc, true); forms.AddField(sigField, page); FormFieldRendererUtil.ReapplyProperties(modelElement, properties); } private void AdjustChildrenLayout(SignatureAppearanceRenderer.RenderingMode renderingMode, Rectangle signatureRect , Rectangle descriptionRect, int pageNum) { switch (renderingMode) { case SignatureAppearanceRenderer.RenderingMode.NAME_AND_DESCRIPTION: { ParagraphRenderer name = (ParagraphRenderer)flatRenderer.GetChildRenderers()[0]; RelayoutParagraph(name, signatureRect, pageNum); ParagraphRenderer description = (ParagraphRenderer)flatRenderer.GetChildRenderers()[1]; RelayoutParagraph(description, descriptionRect, pageNum); break; } case SignatureAppearanceRenderer.RenderingMode.GRAPHIC_AND_DESCRIPTION: { RelayoutImage(signatureRect, pageNum); ParagraphRenderer description = (ParagraphRenderer)flatRenderer.GetChildRenderers()[1]; RelayoutParagraph(description, descriptionRect, pageNum); break; } case SignatureAppearanceRenderer.RenderingMode.GRAPHIC: { RelayoutImage(signatureRect, pageNum); break; } default: { ParagraphRenderer description = (ParagraphRenderer)flatRenderer.GetChildRenderers()[0]; RelayoutParagraph(description, descriptionRect, pageNum); break; } } // Apply vertical alignment for children including floats. VerticalAlignment? verticalAlignment = this.GetProperty<VerticalAlignment?>(Property.VERTICAL_ALIGNMENT); float multiplier = 0; if (VerticalAlignment.MIDDLE == verticalAlignment) { multiplier = 0.5f; } else { if (VerticalAlignment.BOTTOM == verticalAlignment) { multiplier = 1; } } float lowestChildBottom = GetLowestChildBottom(flatRenderer, GetInnerAreaBBox().GetTop()); float deltaY = lowestChildBottom - GetInnerAreaBBox().GetY(); if (deltaY > 0) { flatRenderer.Move(0, -deltaY * multiplier); } } private void RelayoutImage(Rectangle signatureRect, int pageNum) { ImageRenderer image = (ImageRenderer)flatRenderer.GetChildRenderers()[0]; Rectangle imageBBox = image.GetOccupiedArea().GetBBox(); float imgWidth = imageBBox.GetWidth(); if (imgWidth < EPS) { imgWidth = signatureRect.GetWidth(); } float imgHeight = imageBBox.GetHeight(); if (imgHeight < EPS) { imgHeight = signatureRect.GetHeight(); } float multiplierH = signatureRect.GetWidth() / imgWidth; float multiplierW = signatureRect.GetHeight() / imgHeight; float multiplier = Math.Min(multiplierH, multiplierW); imgWidth *= multiplier; imgHeight *= multiplier; float x = signatureRect.GetLeft() + (signatureRect.GetWidth() - imgWidth) / 2; float y = signatureRect.GetBottom() + (signatureRect.GetHeight() - imgHeight) / 2; // We need to re-layout image since signature was divided into 2 parts and bBox was changed. LayoutContext layoutContext = new LayoutContext(new LayoutArea(pageNum, new Rectangle(x, y, imgWidth, imgHeight ))); image.GetModelElement().SetProperty(Property.WIDTH, UnitValue.CreatePointValue(imgWidth)); image.GetModelElement().SetProperty(Property.HEIGHT, UnitValue.CreatePointValue(imgHeight)); image.Layout(layoutContext); } private void RelayoutParagraph(IRenderer renderer, Rectangle rect, int pageNum) { UnitValue fontSizeAsUV = this.HasOwnProperty(Property.FONT_SIZE) ? (UnitValue)this.GetOwnProperty<UnitValue >(Property.FONT_SIZE) : (UnitValue)modelElement.GetOwnProperty<UnitValue>(Property.FONT_SIZE); if (fontSizeAsUV == null || fontSizeAsUV.GetValue() < EPS || isFontSizeApproximated) { // Calculate font size. IRenderer helper = ((Paragraph)renderer.GetModelElement()).CreateRendererSubTree().SetParent(renderer.GetParent ()); this.DeleteProperty(Property.FONT_SIZE); LayoutContext layoutContext = new LayoutContext(new LayoutArea(pageNum, rect)); float lFontSize = 0.1f; float rFontSize = 100; int numberOfIterations = 15; // 15 iterations with lFontSize = 0.1 and rFontSize = 100 should result in ~0.003 precision. float fontSize = CalculateFittingFontSize(helper, lFontSize, rFontSize, layoutContext, numberOfIterations); renderer.GetModelElement().SetProperty(Property.FONT_SIZE, UnitValue.CreatePointValue(fontSize)); } // Relayout the element after font size was changed or signature was split into 2 parts. LayoutContext layoutContext_1 = new LayoutContext(new LayoutArea(pageNum, rect)); renderer.Layout(layoutContext_1); } private float CalculateAdditionalHeight() { Rectangle dummy = new Rectangle(0, 0); this.ApplyMargins(dummy, true); this.ApplyBorderBox(dummy, true); this.ApplyPaddings(dummy, true); return dummy.GetHeight(); } private void ApproximateFontSizeToFitLayoutArea(LayoutContext layoutContext) { if (this.HasOwnProperty(Property.FONT_SIZE) || modelElement.HasOwnProperty(Property.FONT_SIZE)) { return; } if (SignatureAppearanceRenderer.RenderingMode.GRAPHIC == renderingMode || SignatureAppearanceRenderer.RenderingMode .GRAPHIC_AND_DESCRIPTION == renderingMode || SignatureAppearanceRenderer.RenderingMode.CUSTOM == renderingMode ) { // We can expect CLIP_ELEMENT log messages since the initial image size may be larger than the field height. // But image size will be adjusted during its relayout in #adjustFieldLayout. return; } float fontSize = ApproximateFontSize(layoutContext, 0.1f, AbstractPdfFormField.DEFAULT_FONT_SIZE); if (fontSize > 0) { isFontSizeApproximated = true; modelElement.SetProperty(Property.FONT_SIZE, UnitValue.CreatePointValue(fontSize)); } } private SignatureAppearanceRenderer.RenderingMode RetrieveRenderingMode() { IList<IElement> contentElements = ((SignatureFieldAppearance)modelElement).GetContentElements(); if (contentElements.Count == 2 && contentElements[1] is Paragraph) { if (contentElements[0] is Paragraph) { return SignatureAppearanceRenderer.RenderingMode.NAME_AND_DESCRIPTION; } if (contentElements[0] is Image) { return SignatureAppearanceRenderer.RenderingMode.GRAPHIC_AND_DESCRIPTION; } } if (contentElements.Count == 1) { if (contentElements[0] is Paragraph) { return SignatureAppearanceRenderer.RenderingMode.DESCRIPTION; } if (contentElements[0] is Image) { return SignatureAppearanceRenderer.RenderingMode.GRAPHIC; } } return SignatureAppearanceRenderer.RenderingMode.CUSTOM; } /// <summary>Signature rendering modes.</summary> private enum RenderingMode { /// <summary>The rendering mode is just the description.</summary> DESCRIPTION, /// <summary>The rendering mode is the name of the signer and the description.</summary> NAME_AND_DESCRIPTION, /// <summary>The rendering mode is an image and the description.</summary> GRAPHIC_AND_DESCRIPTION, /// <summary>The rendering mode is just an image.</summary> GRAPHIC, /// <summary>The rendering mode is div.</summary> CUSTOM } } } ```
```java /** * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.thingsboard.server.common.data.notification.targets; public interface NotificationRecipient { Object getId(); String getTitle(); default String getFirstName() { return null; } default String getLastName() { return null; } default String getEmail() { return null; } } ```
```smalltalk using System.IO; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Shouldly; using SixLabors.ImageSharp.Formats.Jpeg; using SixLabors.ImageSharp.Formats.Webp; using Xunit; namespace Volo.Abp.Imaging; public class ImageSharpImageCompressor_Tests : AbpImagingImageSharpTestBase { public IImageCompressor ImageCompressor { get; } public ImageSharpImageCompressor_Tests() { ImageCompressor = GetRequiredService<IImageCompressor>(); } protected override void AfterAddApplication(IServiceCollection services) { services.Configure<ImageSharpCompressOptions>(options => { options.JpegEncoder = new JpegEncoder { Quality = 50 }; options.WebpEncoder = new WebpEncoder { Quality = 50 }; }); base.AfterAddApplication(services); } [Fact] public async Task Should_Compress_Jpg() { await using var jpegImage = ImageFileHelper.GetJpgTestFileStream(); var compressedImage = await ImageCompressor.CompressAsync(jpegImage); compressedImage.ShouldNotBeNull(); compressedImage.State.ShouldBe(ImageProcessState.Done); compressedImage.Result.Length.ShouldBeLessThan(jpegImage.Length); compressedImage.Result.Dispose(); } [Fact] public async Task Should_Compress_Png() { await using var pngImage = ImageFileHelper.GetPngTestFileStream(); var compressedImage = await ImageCompressor.CompressAsync(pngImage); compressedImage.ShouldNotBeNull(); if (compressedImage.State == ImageProcessState.Done) { compressedImage.Result.Length.ShouldBeLessThan(pngImage.Length); }else { compressedImage.Result.Length.ShouldBe(pngImage.Length); } compressedImage.Result.Dispose(); } [Fact] public async Task Should_Compress_Webp() { await using var webpImage = ImageFileHelper.GetWebpTestFileStream(); var compressedImage = await ImageCompressor.CompressAsync(webpImage); compressedImage.ShouldNotBeNull(); compressedImage.State.ShouldBe(ImageProcessState.Done); compressedImage.Result.Length.ShouldBeLessThan(webpImage.Length); compressedImage.Result.Dispose(); } [Fact] public async Task Should_Compress_Stream_And_Byte_Array_The_Same() { await using var jpegImage = ImageFileHelper.GetJpgTestFileStream(); var byteArr = await jpegImage.GetAllBytesAsync(); var compressedImage1 = await ImageCompressor.CompressAsync(jpegImage); var compressedImage2 = await ImageCompressor.CompressAsync(byteArr); compressedImage1.ShouldNotBeNull(); compressedImage1.State.ShouldBe(ImageProcessState.Done); compressedImage2.ShouldNotBeNull(); compressedImage2.State.ShouldBe(ImageProcessState.Done); compressedImage1.Result.Length.ShouldBeLessThan(jpegImage.Length); compressedImage2.Result.LongLength.ShouldBeLessThan(jpegImage.Length); compressedImage1.Result.Length.ShouldBe(compressedImage2.Result.LongLength); compressedImage1.Result.Dispose(); } } ```
```objective-c /******************************************************************************* * * All rights reserved. This program and the accompanying materials * * path_to_url * path_to_url * * Contributors: * Ian Craggs - initial API and implementation and/or initial documentation *******************************************************************************/ #if !defined(COUNTDOWN_H) #define COUNTDOWN_H class Countdown { public: Countdown() { interval_end_ms = 0L; } Countdown(int ms) { countdown_ms(ms); } bool expired() { return (interval_end_ms > 0L) && (millis() >= interval_end_ms); } void countdown_ms(unsigned long ms) { interval_end_ms = millis() + ms; } void countdown(int seconds) { countdown_ms((unsigned long)seconds * 1000L); } int left_ms() { return interval_end_ms - millis(); } private: unsigned long interval_end_ms; }; #endif ```
John Lambert may refer to: John Lambert (martyr) (died 1538), English Protestant martyred during the reign of Henry VIII John Lambert (general) (1619–1684), Parliamentary general in the English Civil War John Lambert of Creg Clare (fl. c. 1645 – c. 1669), Irish soldier and Royalist Sir John Lambert, 1st Baronet (1666–1723), French-born English merchant John Lambert (politician) (1746–1823), U.S. senator from and Acting Governor of New Jersey John Lambert (British Army officer) (1772–1847), British Army general and cricketer John William Lambert (1860–1952), American automotive pioneer John Lambert (civil servant) (1815–1892), British civil servant John Lambert (composer) (1926–1995), British composer and teacher John Lambert (diplomat) (1921–2015), British ambassador John Laurence Lambert (1936–2014), Australian educator and author John Lambert (naval historian) (1937–2016), naval illustrator and author Jack Lambert (American football) (John Harold Lambert, born 1952), American football player John Lambert (basketball) (born 1953), American basketball player See also Jack Lambert (disambiguation)
```go // // // path_to_url // // or in the "license" file accompanying this file. This file is distributed // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, // Package packagemanagers holds functions querying using local package manager package packagemanagers import ( "fmt" "path/filepath" "strings" "time" "github.com/aws/amazon-ssm-agent/agent/log" "github.com/aws/amazon-ssm-agent/agent/setupcli/managers/common" "github.com/aws/amazon-ssm-agent/agent/setupcli/managers/servicemanagers" "github.com/aws/amazon-ssm-agent/agent/setupcli/managers/verificationmanagers" "github.com/aws/amazon-ssm-agent/agent/setupcli/utility" ) type snapManager struct { managerHelper common.IManagerHelper } const ( assertFile = "amazon-ssm-agent.assert" snapFile = "amazon-ssm-agent.snap" snapAutoRefreshInProgressExitCode = 10 snapAgentdir = "/snap/amazon-ssm-agent/current/amazon-ssm-agent" ) var waitTimeInterval = 10 * time.Second // GetFilesReqForInstall returns all the files the package manager needs to install the agent func (m *snapManager) GetFilesReqForInstall(log log.T) []string { return []string{ assertFile, snapFile, } } // InstallAgent installs the agent using package manager, folderPath should contain all files required for installation func (m *snapManager) InstallAgent(log log.T, folderPath string) error { assertPath := filepath.Join(folderPath, assertFile) snapPath := filepath.Join(folderPath, snapFile) output, err := m.managerHelper.RunCommand("snap", "ack", assertPath) if err != nil { if m.managerHelper.IsTimeoutError(err) { return fmt.Errorf("snap ack: Command timed out") } return fmt.Errorf("snap install: Failed to ack assert file with output '%s' and error: %v", output, err) } output, err = m.managerHelper.RunCommand("snap", "install", snapPath, "--classic") if err != nil { if m.managerHelper.IsTimeoutError(err) { return fmt.Errorf("snap install: Command timed out") } if m.managerHelper.IsExitCodeError(err) && m.managerHelper.GetExitCode(err) == snapAutoRefreshInProgressExitCode { // Note: Greengrass install step has a default timeout of 120 seconds const maxAttempts = 6 for i := 1; i < maxAttempts; i++ { output, err = m.managerHelper.RunCommand("snap", "install", snapPath, "--classic") if err == nil { return nil } if m.managerHelper.IsTimeoutError(err) { return fmt.Errorf("snap install: Command timed out") } isUpdateInProgressError := m.managerHelper.IsExitCodeError(err) && m.managerHelper.GetExitCode(err) == snapAutoRefreshInProgressExitCode if !isUpdateInProgressError { break } time.Sleep(waitTimeInterval) } } return fmt.Errorf("snap install: Failed to install snap with output '%s' and error: %v", output, err) } return nil } // UninstallAgent uninstalls the agent using the package manager func (m *snapManager) UninstallAgent(log log.T, installedAgentVersionPath string) error { output, err := m.managerHelper.RunCommand("snap", "remove", "amazon-ssm-agent") if err != nil { if m.managerHelper.IsTimeoutError(err) { return fmt.Errorf("snap uninstall: Command timed out") } if m.managerHelper.IsExitCodeError(err) && m.managerHelper.GetExitCode(err) == snapAutoRefreshInProgressExitCode { // Note: Greengrass install step has a default timeout of 120 seconds const maxAttempts = 5 for i := 1; i < maxAttempts; i++ { output, err = m.managerHelper.RunCommand("snap", "remove", "amazon-ssm-agent") if err == nil { return nil } if m.managerHelper.IsTimeoutError(err) { return fmt.Errorf("snap uninstall: Command timed out") } isUpdateInProgressError := m.managerHelper.IsExitCodeError(err) && m.managerHelper.GetExitCode(err) == snapAutoRefreshInProgressExitCode if !isUpdateInProgressError { break } time.Sleep(waitTimeInterval) } } return fmt.Errorf("snap uninstall: Failed with output '%s' and error: %v", output, err) } return nil } // IsAgentInstalled returns true if agent is installed using package manager, returns error for any unexpected errors func (m *snapManager) IsAgentInstalled() (bool, error) { output, err := m.managerHelper.RunCommand("snap", "list", "amazon-ssm-agent") if err == nil { return true, nil } if err != nil { if m.managerHelper.IsExitCodeError(err) { exitCode := m.managerHelper.GetExitCode(err) if exitCode == common.PackageNotInstalledExitCode { return false, nil } if exitCode == snapAutoRefreshInProgressExitCode { output, err := m.managerHelper.RunCommand(snapAgentdir, "--version") if err != nil { return false, fmt.Errorf("agent not installed with snap: %w", err) } if output != "" { return true, nil } } return false, fmt.Errorf("snap isInstalled: Unexpected exit code with output '%s' and exit code: %v", output, exitCode) } if m.managerHelper.IsTimeoutError(err) { return false, fmt.Errorf("snap isInstalled: Command timed out") } } return false, fmt.Errorf("snap isInstalled: Unexpected error with output '%s' and error: %w", output, err) } // GetInstalledAgentVersion returns the version of the installed agent func (m *snapManager) GetInstalledAgentVersion() (string, error) { output, err := m.managerHelper.RunCommand("snap", "list", "amazon-ssm-agent") if err != nil { if m.managerHelper.IsExitCodeError(err) { exitCode := m.managerHelper.GetExitCode(err) if exitCode == common.PackageNotInstalledExitCode { return "", fmt.Errorf("agent not installed with snap") } if exitCode == snapAutoRefreshInProgressExitCode { output, err := m.managerHelper.RunCommand(snapAgentdir, "--version") if err != nil { return "", fmt.Errorf("agent not installed with snap: %w", err) } snapInfoVersionOutput := strings.Split(output, ":") if len(snapInfoVersionOutput) == 2 { return utility.CleanupVersion(strings.TrimSpace(snapInfoVersionOutput[len(snapInfoVersionOutput)-1])), nil } } return "", fmt.Errorf("snap getVersion: Unexpected exit code with output '%s' and exit code: %v", output, exitCode) } if m.managerHelper.IsTimeoutError(err) { return "", fmt.Errorf("snap getVersion: Command timed out") } return "", fmt.Errorf("snap getVersion: Unexpected error with output '%s' and error: %w", output, err) } snapInfoLines := strings.Split(strings.TrimSpace(output), "\n") if len(snapInfoLines) == 2 { headerFields := strings.Fields(snapInfoLines[0]) agentFields := strings.Fields(snapInfoLines[1]) for i, header := range headerFields { if header == "Version" { return utility.CleanupVersion(agentFields[i]), nil } } return "", fmt.Errorf("failed to extract agent version from snap info output") } return "", fmt.Errorf("failed to extract agent version because of unexpected output from snap info") } // IsManagerEnvironment returns true if all commands required by the package manager are available func (m *snapManager) IsManagerEnvironment() bool { return m.managerHelper.IsCommandAvailable("snap") && m.managerHelper.IsCommandAvailable("systemctl") } // GetName returns the package manager name func (m *snapManager) GetName() string { return "snap" } // GetSupportedServiceManagers returns all the service manager types that the package manager supports func (m *snapManager) GetSupportedServiceManagers() []servicemanagers.ServiceManager { return []servicemanagers.ServiceManager{servicemanagers.Snap} } // GetType returns the package manager type func (m *snapManager) GetType() PackageManager { return Snap } // GetSupportedVerificationManager returns verification manager types that the package manager supports func (m *snapManager) GetSupportedVerificationManager() verificationmanagers.VerificationManager { return verificationmanagers.Skip } // GetFileExtension returns the file extension of the agent using the package manager func (m *snapManager) GetFileExtension() string { return ".snap" } ```
```c /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at path_to_url * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ***************************************************************************/ #include "curl_setup.h" #include <curl/curl.h> #include "urldata.h" #include "url.h" #include "progress.h" #include "multiif.h" #include "sendf.h" #include "conncache.h" #include "share.h" #include "sigpipe.h" #include "connect.h" /* The last 3 #include files should be in this order */ #include "curl_printf.h" #include "curl_memory.h" #include "memdebug.h" #ifdef CURLDEBUG /* the debug versions of these macros make extra certain that the lock is never doubly locked or unlocked */ #define CONN_LOCK(x) if((x)->share) { \ Curl_share_lock((x), CURL_LOCK_DATA_CONNECT, CURL_LOCK_ACCESS_SINGLE); \ DEBUGASSERT(!(x)->state.conncache_lock); \ (x)->state.conncache_lock = TRUE; \ } #define CONN_UNLOCK(x) if((x)->share) { \ DEBUGASSERT((x)->state.conncache_lock); \ (x)->state.conncache_lock = FALSE; \ Curl_share_unlock((x), CURL_LOCK_DATA_CONNECT); \ } #else #define CONN_LOCK(x) if((x)->share) \ Curl_share_lock((x), CURL_LOCK_DATA_CONNECT, CURL_LOCK_ACCESS_SINGLE) #define CONN_UNLOCK(x) if((x)->share) \ Curl_share_unlock((x), CURL_LOCK_DATA_CONNECT) #endif static void conn_llist_dtor(void *user, void *element) { struct connectdata *conn = element; (void)user; conn->bundle = NULL; } static CURLcode bundle_create(struct Curl_easy *data, struct connectbundle **cb_ptr) { (void)data; DEBUGASSERT(*cb_ptr == NULL); *cb_ptr = malloc(sizeof(struct connectbundle)); if(!*cb_ptr) return CURLE_OUT_OF_MEMORY; (*cb_ptr)->num_connections = 0; (*cb_ptr)->multiuse = BUNDLE_UNKNOWN; Curl_llist_init(&(*cb_ptr)->conn_list, (curl_llist_dtor) conn_llist_dtor); return CURLE_OK; } static void bundle_destroy(struct connectbundle *cb_ptr) { if(!cb_ptr) return; Curl_llist_destroy(&cb_ptr->conn_list, NULL); free(cb_ptr); } /* Add a connection to a bundle */ static void bundle_add_conn(struct connectbundle *cb_ptr, struct connectdata *conn) { Curl_llist_insert_next(&cb_ptr->conn_list, cb_ptr->conn_list.tail, conn, &conn->bundle_node); conn->bundle = cb_ptr; cb_ptr->num_connections++; } /* Remove a connection from a bundle */ static int bundle_remove_conn(struct connectbundle *cb_ptr, struct connectdata *conn) { struct curl_llist_element *curr; curr = cb_ptr->conn_list.head; while(curr) { if(curr->ptr == conn) { Curl_llist_remove(&cb_ptr->conn_list, curr, NULL); cb_ptr->num_connections--; conn->bundle = NULL; return 1; /* we removed a handle */ } curr = curr->next; } return 0; } static void free_bundle_hash_entry(void *freethis) { struct connectbundle *b = (struct connectbundle *) freethis; bundle_destroy(b); } int Curl_conncache_init(struct conncache *connc, int size) { int rc; /* allocate a new easy handle to use when closing cached connections */ connc->closure_handle = curl_easy_init(); if(!connc->closure_handle) return 1; /* bad */ rc = Curl_hash_init(&connc->hash, size, Curl_hash_str, Curl_str_key_compare, free_bundle_hash_entry); if(rc) { Curl_close(connc->closure_handle); connc->closure_handle = NULL; } else connc->closure_handle->state.conn_cache = connc; return rc; } void Curl_conncache_destroy(struct conncache *connc) { if(connc) Curl_hash_destroy(&connc->hash); } /* creates a key to find a bundle for this connection */ static void hashkey(struct connectdata *conn, char *buf, size_t len) /* something like 128 is fine */ { const char *hostname; if(conn->bits.socksproxy) hostname = conn->socks_proxy.host.name; else if(conn->bits.httpproxy) hostname = conn->http_proxy.host.name; else if(conn->bits.conn_to_host) hostname = conn->conn_to_host.name; else hostname = conn->host.name; DEBUGASSERT(len > 32); /* put the number first so that the hostname gets cut off if too long */ snprintf(buf, len, "%ld%s", conn->port, hostname); } void Curl_conncache_unlock(struct connectdata *conn) { CONN_UNLOCK(conn->data); } /* Returns number of connections currently held in the connection cache. Locks/unlocks the cache itself! */ size_t Curl_conncache_size(struct Curl_easy *data) { size_t num; CONN_LOCK(data); num = data->state.conn_cache->num_conn; CONN_UNLOCK(data); return num; } /* Returns number of connections currently held in the connections's bundle Locks/unlocks the cache itself! */ size_t Curl_conncache_bundle_size(struct connectdata *conn) { size_t num; CONN_LOCK(conn->data); num = conn->bundle->num_connections; CONN_UNLOCK(conn->data); return num; } /* Look up the bundle with all the connections to the same host this connectdata struct is setup to use. **NOTE**: When it returns, it holds the connection cache lock! */ struct connectbundle *Curl_conncache_find_bundle(struct connectdata *conn, struct conncache *connc) { struct connectbundle *bundle = NULL; CONN_LOCK(conn->data); if(connc) { char key[128]; hashkey(conn, key, sizeof(key)); bundle = Curl_hash_pick(&connc->hash, key, strlen(key)); } return bundle; } static bool conncache_add_bundle(struct conncache *connc, char *key, struct connectbundle *bundle) { void *p = Curl_hash_add(&connc->hash, key, strlen(key), bundle); return p?TRUE:FALSE; } static void conncache_remove_bundle(struct conncache *connc, struct connectbundle *bundle) { struct curl_hash_iterator iter; struct curl_hash_element *he; if(!connc) return; Curl_hash_start_iterate(&connc->hash, &iter); he = Curl_hash_next_element(&iter); while(he) { if(he->ptr == bundle) { /* The bundle is destroyed by the hash destructor function, free_bundle_hash_entry() */ Curl_hash_delete(&connc->hash, he->key, he->key_len); return; } he = Curl_hash_next_element(&iter); } } CURLcode Curl_conncache_add_conn(struct conncache *connc, struct connectdata *conn) { CURLcode result = CURLE_OK; struct connectbundle *bundle; struct connectbundle *new_bundle = NULL; struct Curl_easy *data = conn->data; /* *find_bundle() locks the connection cache */ bundle = Curl_conncache_find_bundle(conn, data->state.conn_cache); if(!bundle) { int rc; char key[128]; result = bundle_create(data, &new_bundle); if(result) { goto unlock; } hashkey(conn, key, sizeof(key)); rc = conncache_add_bundle(data->state.conn_cache, key, new_bundle); if(!rc) { bundle_destroy(new_bundle); result = CURLE_OUT_OF_MEMORY; goto unlock; } bundle = new_bundle; } bundle_add_conn(bundle, conn); conn->connection_id = connc->next_connection_id++; connc->num_conn++; DEBUGF(infof(conn->data, "Added connection %ld. " "The cache now contains %zu members\n", conn->connection_id, connc->num_conn)); unlock: CONN_UNLOCK(data); return result; } void Curl_conncache_remove_conn(struct connectdata *conn, bool lock) { struct Curl_easy *data = conn->data; struct connectbundle *bundle = conn->bundle; struct conncache *connc = data->state.conn_cache; /* The bundle pointer can be NULL, since this function can be called due to a failed connection attempt, before being added to a bundle */ if(bundle) { if(lock) { CONN_LOCK(data); } bundle_remove_conn(bundle, conn); if(bundle->num_connections == 0) conncache_remove_bundle(connc, bundle); conn->bundle = NULL; /* removed from it */ if(connc) { connc->num_conn--; DEBUGF(infof(data, "The cache now contains %zu members\n", connc->num_conn)); } if(lock) { CONN_UNLOCK(data); } } } /* This function iterates the entire connection cache and calls the function func() with the connection pointer as the first argument and the supplied 'param' argument as the other. The conncache lock is still held when the callback is called. It needs it, so that it can safely continue traversing the lists once the callback returns. Returns 1 if the loop was aborted due to the callback's return code. Return 0 from func() to continue the loop, return 1 to abort it. */ bool Curl_conncache_foreach(struct Curl_easy *data, struct conncache *connc, void *param, int (*func)(struct connectdata *conn, void *param)) { struct curl_hash_iterator iter; struct curl_llist_element *curr; struct curl_hash_element *he; if(!connc) return FALSE; CONN_LOCK(data); Curl_hash_start_iterate(&connc->hash, &iter); he = Curl_hash_next_element(&iter); while(he) { struct connectbundle *bundle; bundle = he->ptr; he = Curl_hash_next_element(&iter); curr = bundle->conn_list.head; while(curr) { /* Yes, we need to update curr before calling func(), because func() might decide to remove the connection */ struct connectdata *conn = curr->ptr; curr = curr->next; if(1 == func(conn, param)) { CONN_UNLOCK(data); return TRUE; } } } CONN_UNLOCK(data); return FALSE; } /* Return the first connection found in the cache. Used when closing all connections. NOTE: no locking is done here as this is presumably only done when cleaning up a cache! */ struct connectdata * Curl_conncache_find_first_connection(struct conncache *connc) { struct curl_hash_iterator iter; struct curl_hash_element *he; struct connectbundle *bundle; Curl_hash_start_iterate(&connc->hash, &iter); he = Curl_hash_next_element(&iter); while(he) { struct curl_llist_element *curr; bundle = he->ptr; curr = bundle->conn_list.head; if(curr) { return curr->ptr; } he = Curl_hash_next_element(&iter); } return NULL; } /* * Give ownership of a connection back to the connection cache. Might * disconnect the oldest existing in there to make space. * * Return TRUE if stored, FALSE if closed. */ bool Curl_conncache_return_conn(struct connectdata *conn) { struct Curl_easy *data = conn->data; /* data->multi->maxconnects can be negative, deal with it. */ size_t maxconnects = (data->multi->maxconnects < 0) ? data->multi->num_easy * 4: data->multi->maxconnects; struct connectdata *conn_candidate = NULL; if(maxconnects > 0 && Curl_conncache_size(data) > maxconnects) { infof(data, "Connection cache is full, closing the oldest one.\n"); conn_candidate = Curl_conncache_extract_oldest(data); if(conn_candidate) { /* the winner gets the honour of being disconnected */ (void)Curl_disconnect(data, conn_candidate, /* dead_connection */ FALSE); } } return (conn_candidate == conn) ? FALSE : TRUE; } /* * This function finds the connection in the connection bundle that has been * unused for the longest time. * * Does not lock the connection cache! * * Returns the pointer to the oldest idle connection, or NULL if none was * found. */ struct connectdata * Curl_conncache_extract_bundle(struct Curl_easy *data, struct connectbundle *bundle) { struct curl_llist_element *curr; timediff_t highscore = -1; timediff_t score; struct curltime now; struct connectdata *conn_candidate = NULL; struct connectdata *conn; (void)data; now = Curl_now(); curr = bundle->conn_list.head; while(curr) { conn = curr->ptr; if(!CONN_INUSE(conn)) { /* Set higher score for the age passed since the connection was used */ score = Curl_timediff(now, conn->now); if(score > highscore) { highscore = score; conn_candidate = conn; } } curr = curr->next; } if(conn_candidate) { /* remove it to prevent another thread from nicking it */ bundle_remove_conn(bundle, conn_candidate); data->state.conn_cache->num_conn--; DEBUGF(infof(data, "The cache now contains %zu members\n", data->state.conn_cache->num_conn)); conn_candidate->data = data; /* associate! */ } return conn_candidate; } /* * This function finds the connection in the connection cache that has been * unused for the longest time and extracts that from the bundle. * * Returns the pointer to the connection, or NULL if none was found. */ struct connectdata * Curl_conncache_extract_oldest(struct Curl_easy *data) { struct conncache *connc = data->state.conn_cache; struct curl_hash_iterator iter; struct curl_llist_element *curr; struct curl_hash_element *he; timediff_t highscore =- 1; timediff_t score; struct curltime now; struct connectdata *conn_candidate = NULL; struct connectbundle *bundle; struct connectbundle *bundle_candidate = NULL; now = Curl_now(); CONN_LOCK(data); Curl_hash_start_iterate(&connc->hash, &iter); he = Curl_hash_next_element(&iter); while(he) { struct connectdata *conn; bundle = he->ptr; curr = bundle->conn_list.head; while(curr) { conn = curr->ptr; if(!CONN_INUSE(conn)) { /* Set higher score for the age passed since the connection was used */ score = Curl_timediff(now, conn->now); if(score > highscore) { highscore = score; conn_candidate = conn; bundle_candidate = bundle; } } curr = curr->next; } he = Curl_hash_next_element(&iter); } if(conn_candidate) { /* remove it to prevent another thread from nicking it */ bundle_remove_conn(bundle_candidate, conn_candidate); connc->num_conn--; DEBUGF(infof(data, "The cache now contains %zu members\n", connc->num_conn)); conn_candidate->data = data; /* associate! */ } CONN_UNLOCK(data); return conn_candidate; } void Curl_conncache_close_all_connections(struct conncache *connc) { struct connectdata *conn; conn = Curl_conncache_find_first_connection(connc); while(conn) { SIGPIPE_VARIABLE(pipe_st); conn->data = connc->closure_handle; sigpipe_ignore(conn->data, &pipe_st); conn->data->easy_conn = NULL; /* clear the easy handle's connection pointer */ /* This will remove the connection from the cache */ connclose(conn, "kill all"); (void)Curl_disconnect(connc->closure_handle, conn, FALSE); sigpipe_restore(&pipe_st); conn = Curl_conncache_find_first_connection(connc); } if(connc->closure_handle) { SIGPIPE_VARIABLE(pipe_st); sigpipe_ignore(connc->closure_handle, &pipe_st); Curl_hostcache_clean(connc->closure_handle, connc->closure_handle->dns.hostcache); Curl_close(connc->closure_handle); sigpipe_restore(&pipe_st); } } #if 0 /* Useful for debugging the connection cache */ void Curl_conncache_print(struct conncache *connc) { struct curl_hash_iterator iter; struct curl_llist_element *curr; struct curl_hash_element *he; if(!connc) return; fprintf(stderr, "=Bundle cache=\n"); Curl_hash_start_iterate(connc->hash, &iter); he = Curl_hash_next_element(&iter); while(he) { struct connectbundle *bundle; struct connectdata *conn; bundle = he->ptr; fprintf(stderr, "%s -", he->key); curr = bundle->conn_list->head; while(curr) { conn = curr->ptr; fprintf(stderr, " [%p %d]", (void *)conn, conn->inuse); curr = curr->next; } fprintf(stderr, "\n"); he = Curl_hash_next_element(&iter); } } #endif ```
```python from . import _ccallback_c import ctypes PyCFuncPtr = ctypes.CFUNCTYPE(ctypes.c_void_p).__bases__[0] ffi = None class CData(object): pass def _import_cffi(): global ffi, CData if ffi is not None: return try: import cffi ffi = cffi.FFI() CData = ffi.CData except ImportError: ffi = False class LowLevelCallable(tuple): """ Low-level callback function. Parameters ---------- function : {PyCapsule, ctypes function pointer, cffi function pointer} Low-level callback function. user_data : {PyCapsule, ctypes void pointer, cffi void pointer} User data to pass on to the callback function. signature : str, optional Signature of the function. If omitted, determined from *function*, if possible. Attributes ---------- function Callback function given user_data User data given signature Signature of the function. Methods ------- from_cython Class method for constructing callables from Cython C-exported functions. Notes ----- The argument ``function`` can be one of: - PyCapsule, whose name contains the C function signature - ctypes function pointer - cffi function pointer The signature of the low-level callback must match one of those expected by the routine it is passed to. If constructing low-level functions from a PyCapsule, the name of the capsule must be the corresponding signature, in the format:: return_type (arg1_type, arg2_type, ...) For example:: "void (double)" "double (double, int *, void *)" The context of a PyCapsule passed in as ``function`` is used as ``user_data``, if an explicit value for `user_data` was not given. """ # Make the class immutable __slots__ = () def __new__(cls, function, user_data=None, signature=None): # We need to hold a reference to the function & user data, # to prevent them going out of scope item = cls._parse_callback(function, user_data, signature) return tuple.__new__(cls, (item, function, user_data)) def __repr__(self): return "LowLevelCallable({!r}, {!r})".format(self.function, self.user_data) @property def function(self): return tuple.__getitem__(self, 1) @property def user_data(self): return tuple.__getitem__(self, 2) @property def signature(self): return _ccallback_c.get_capsule_signature(tuple.__getitem__(self, 0)) def __getitem__(self, idx): raise ValueError() @classmethod def from_cython(cls, module, name, user_data=None, signature=None): """ Create a low-level callback function from an exported Cython function. Parameters ---------- module : module Cython module where the exported function resides name : str Name of the exported function user_data : {PyCapsule, ctypes void pointer, cffi void pointer}, optional User data to pass on to the callback function. signature : str, optional Signature of the function. If omitted, determined from *function*. """ try: function = module.__pyx_capi__[name] except AttributeError: raise ValueError("Given module is not a Cython module with __pyx_capi__ attribute") except KeyError: raise ValueError("No function {!r} found in __pyx_capi__ of the module".format(name)) return cls(function, user_data, signature) @classmethod def _parse_callback(cls, obj, user_data=None, signature=None): _import_cffi() if isinstance(obj, LowLevelCallable): func = tuple.__getitem__(obj, 0) elif isinstance(obj, PyCFuncPtr): func, signature = _get_ctypes_func(obj, signature) elif isinstance(obj, CData): func, signature = _get_cffi_func(obj, signature) elif _ccallback_c.check_capsule(obj): func = obj else: raise ValueError("Given input is not a callable or a low-level callable (pycapsule/ctypes/cffi)") if isinstance(user_data, ctypes.c_void_p): context = _get_ctypes_data(user_data) elif isinstance(user_data, CData): context = _get_cffi_data(user_data) elif user_data is None: context = 0 elif _ccallback_c.check_capsule(user_data): context = user_data else: raise ValueError("Given user data is not a valid low-level void* pointer (pycapsule/ctypes/cffi)") return _ccallback_c.get_raw_capsule(func, signature, context) # # ctypes helpers # def _get_ctypes_func(func, signature=None): # Get function pointer func_ptr = ctypes.cast(func, ctypes.c_void_p).value # Construct function signature if signature is None: signature = _typename_from_ctypes(func.restype) + " (" for j, arg in enumerate(func.argtypes): if j == 0: signature += _typename_from_ctypes(arg) else: signature += ", " + _typename_from_ctypes(arg) signature += ")" return func_ptr, signature def _typename_from_ctypes(item): if item is None: return "void" elif item is ctypes.c_void_p: return "void *" name = item.__name__ pointer_level = 0 while name.startswith("LP_"): pointer_level += 1 name = name[3:] if name.startswith('c_'): name = name[2:] if pointer_level > 0: name += " " + "*"*pointer_level return name def _get_ctypes_data(data): # Get voidp pointer return ctypes.cast(data, ctypes.c_void_p).value # # CFFI helpers # def _get_cffi_func(func, signature=None): # Get function pointer func_ptr = ffi.cast('uintptr_t', func) # Get signature if signature is None: signature = ffi.getctype(ffi.typeof(func)).replace('(*)', ' ') return func_ptr, signature def _get_cffi_data(data): # Get pointer return ffi.cast('uintptr_t', data) ```
```c /* * */ #include "soc/i2c_periph.h" #include "soc/gpio_sig_map.h" #include "soc/regdma.h" #include "soc/i2c_reg.h" /* Bunch of constants for every I2C peripheral: GPIO signals, irqs, hw addr of registers etc */ const i2c_signal_conn_t i2c_periph_signal[SOC_I2C_NUM] = { { .sda_out_sig = I2CEXT0_SDA_OUT_IDX, .sda_in_sig = I2CEXT0_SDA_IN_IDX, .scl_out_sig = I2CEXT0_SCL_OUT_IDX, .scl_in_sig = I2CEXT0_SCL_IN_IDX, .irq = ETS_I2C_EXT0_INTR_SOURCE, }, { .sda_out_sig = I2CEXT1_SDA_OUT_IDX, .sda_in_sig = I2CEXT1_SDA_IN_IDX, .scl_out_sig = I2CEXT1_SCL_OUT_IDX, .scl_in_sig = I2CEXT1_SCL_IN_IDX, .irq = ETS_I2C_EXT1_INTR_SOURCE, }, }; // I2C sleep retention entries // I2C registers require set the reg_update bit to make the configuration take effect /* I2C Registers Context Include: I2C_SCL_LOW_PERIOD_REG / I2C_CTR_REG / I2C_TO_REG / I2C_SLAVE_ADDR_REG / I2C_FIFO_CONF_REG I2C_INT_ENA_REG / I2C_SDA_HOLD_REG / I2C_SDA_SAMPLE_REG / I2C_SCL_START_HOLD_REG I2C_SCL_RSTART_SETUP_REG / I2C_SCL_STOP_HOLD_REG / I2C_SCL_STOP_SETUP_REG /I2C_FILTER_CFG_REG / I2C_CLK_CONF_REG / I2C_SCL_ST_TIME_OUT_REG / I2C_SCL_MAIN_ST_TIME_OUT_REG / I2C_SCL_SP_CONF_REG / I2C_SCL_STRETCH_CONF_REG */ #define I2C0_RETENTION_REGS_CNT 18 #define I2C0_RETENTION_MAP_BASE I2C_SCL_LOW_PERIOD_REG(0) static const uint32_t i2c0_regs_map[4] = {0xc03f345b, 0x3, 0, 0}; static const regdma_entries_config_t i2c0_regs_retention[] = { [0] = {.config = REGDMA_LINK_ADDR_MAP_INIT(REGDMA_I2C_LINK(0x00), I2C0_RETENTION_MAP_BASE, I2C0_RETENTION_MAP_BASE, I2C0_RETENTION_REGS_CNT, 0, 0, i2c0_regs_map[0], i2c0_regs_map[1], i2c0_regs_map[2], i2c0_regs_map[3]), \ .owner = ENTRY(0) | ENTRY(2) }, \ [1] = {.config = REGDMA_LINK_WRITE_INIT(REGDMA_I2C_LINK(0x01), I2C_CTR_REG(0), I2C_FSM_RST, I2C_FSM_RST_M, 1, 0), \ .owner = ENTRY(0) | ENTRY(2) }, \ [2] = {.config = REGDMA_LINK_WRITE_INIT(REGDMA_I2C_LINK(0x02), I2C_CTR_REG(0), 0x0, I2C_FSM_RST_M, 1, 0), \ .owner = ENTRY(0) | ENTRY(2) }, \ [3] = {.config = REGDMA_LINK_WRITE_INIT(REGDMA_I2C_LINK(0x03), I2C_CTR_REG(0), I2C_CONF_UPGATE, I2C_CONF_UPGATE_M, 1, 0), \ .owner = ENTRY(0) | ENTRY(2) }, \ [4] = {.config = REGDMA_LINK_WAIT_INIT(REGDMA_I2C_LINK(0x04), I2C_CTR_REG(0), 0x0, I2C_CONF_UPGATE_M, 1, 0), \ .owner = ENTRY(0) | ENTRY(2) }, \ }; #define I2C1_RETENTION_REGS_CNT 18 #define I2C1_RETENTION_MAP_BASE I2C_SCL_LOW_PERIOD_REG(1) static const uint32_t i2c1_regs_map[4] = {0xc03f345b, 0x3, 0, 0}; static const regdma_entries_config_t i2c1_regs_retention[] = { [0] = {.config = REGDMA_LINK_ADDR_MAP_INIT(REGDMA_I2C_LINK(0x00), I2C1_RETENTION_MAP_BASE, I2C1_RETENTION_MAP_BASE, I2C1_RETENTION_REGS_CNT, 0, 0, i2c1_regs_map[0], i2c1_regs_map[1], i2c1_regs_map[2], i2c1_regs_map[3]), \ .owner = ENTRY(0) | ENTRY(2) }, \ [1] = {.config = REGDMA_LINK_WRITE_INIT(REGDMA_I2C_LINK(0x01), I2C_CTR_REG(1), I2C_FSM_RST, I2C_FSM_RST_M, 1, 0), \ .owner = ENTRY(0) | ENTRY(2) }, \ [2] = {.config = REGDMA_LINK_WRITE_INIT(REGDMA_I2C_LINK(0x02), I2C_CTR_REG(1), 0x0, I2C_FSM_RST_M, 1, 0), \ .owner = ENTRY(0) | ENTRY(2) }, \ [3] = {.config = REGDMA_LINK_WRITE_INIT(REGDMA_I2C_LINK(0x03), I2C_CTR_REG(1), I2C_CONF_UPGATE, I2C_CONF_UPGATE_M, 1, 0), \ .owner = ENTRY(0) | ENTRY(2) }, \ [4] = {.config = REGDMA_LINK_WAIT_INIT(REGDMA_I2C_LINK(0x04), I2C_CTR_REG(1), 0x0, I2C_CONF_UPGATE_M, 1, 0), \ .owner = ENTRY(0) | ENTRY(2) }, \ }; const i2c_reg_ctx_link_t i2c_regs_retention[SOC_HP_I2C_NUM] = { {i2c0_regs_retention, ARRAY_SIZE(i2c0_regs_retention)}, {i2c1_regs_retention, ARRAY_SIZE(i2c1_regs_retention)}, }; ```
```xml import { Component } from '@angular/core'; @Component({ selector: 'style-doc', template: ` <app-docsectiontext> <p>Following is the list of structural style classes, for theming classes visit <a href="#" [routerLink]="['/theming']">theming</a> page.</p> </app-docsectiontext> <div class="doc-tablewrapper"> <table class="doc-table"> <thead> <tr> <th>Name</th> <th>Element</th> </tr> </thead> <tbody> <tr> <td>p-editor-container</td> <td>Container element</td> </tr> <tr> <td>p-editor-toolbar</td> <td>Toolbar of the editor</td> </tr> <tr> <td>p-editor-content</td> <td>Editable area</td> </tr> </tbody> </table> </div> ` }) export class StyleDoc {} ```
```javascript (window.webpackJsonp=window.webpackJsonp||[]).push([[87],{867:function(n,a){n.exports=function(n){return{contains:[{className:"meta",begin:/^julia>/,relevance:10,starts:{end:/^(?![ ]{6})/,subLanguage:"julia"},aliases:["jldoctest"]}]}}}}]); ```
```rust use futures::channel::{mpsc, oneshot}; use futures::executor::{block_on, block_on_stream}; use futures::future::{poll_fn, FutureExt}; use futures::pin_mut; use futures::sink::{Sink, SinkExt}; use futures::stream::{Stream, StreamExt}; use futures::task::{Context, Poll}; use futures_test::task::{new_count_waker, noop_context}; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::{Arc, Mutex}; use std::thread; #[allow(dead_code)] trait AssertSend: Send {} impl AssertSend for mpsc::Sender<i32> {} impl AssertSend for mpsc::Receiver<i32> {} #[test] fn send_recv() { let (mut tx, rx) = mpsc::channel::<i32>(16); block_on(tx.send(1)).unwrap(); drop(tx); let v: Vec<_> = block_on(rx.collect()); assert_eq!(v, vec![1]); } #[test] fn send_recv_no_buffer() { // Run on a task context block_on(poll_fn(move |cx| { let (tx, rx) = mpsc::channel::<i32>(0); pin_mut!(tx, rx); assert!(tx.as_mut().poll_flush(cx).is_ready()); assert!(tx.as_mut().poll_ready(cx).is_ready()); // Send first message assert!(tx.as_mut().start_send(1).is_ok()); assert!(tx.as_mut().poll_ready(cx).is_pending()); // poll_ready said Pending, so no room in buffer, therefore new sends // should get rejected with is_full. assert!(tx.as_mut().start_send(0).unwrap_err().is_full()); assert!(tx.as_mut().poll_ready(cx).is_pending()); // Take the value assert_eq!(rx.as_mut().poll_next(cx), Poll::Ready(Some(1))); assert!(tx.as_mut().poll_ready(cx).is_ready()); // Send second message assert!(tx.as_mut().poll_ready(cx).is_ready()); assert!(tx.as_mut().start_send(2).is_ok()); assert!(tx.as_mut().poll_ready(cx).is_pending()); // Take the value assert_eq!(rx.as_mut().poll_next(cx), Poll::Ready(Some(2))); assert!(tx.as_mut().poll_ready(cx).is_ready()); Poll::Ready(()) })); } #[test] fn send_shared_recv() { let (mut tx1, rx) = mpsc::channel::<i32>(16); let mut rx = block_on_stream(rx); let mut tx2 = tx1.clone(); block_on(tx1.send(1)).unwrap(); assert_eq!(rx.next(), Some(1)); block_on(tx2.send(2)).unwrap(); assert_eq!(rx.next(), Some(2)); } #[test] fn send_recv_threads() { let (mut tx, rx) = mpsc::channel::<i32>(16); let t = thread::spawn(move || { block_on(tx.send(1)).unwrap(); }); let v: Vec<_> = block_on(rx.take(1).collect()); assert_eq!(v, vec![1]); t.join().unwrap(); } #[test] fn send_recv_threads_no_capacity() { let (mut tx, rx) = mpsc::channel::<i32>(0); let t = thread::spawn(move || { block_on(tx.send(1)).unwrap(); block_on(tx.send(2)).unwrap(); }); let v: Vec<_> = block_on(rx.collect()); assert_eq!(v, vec![1, 2]); t.join().unwrap(); } #[test] fn recv_close_gets_none() { let (mut tx, mut rx) = mpsc::channel::<i32>(10); // Run on a task context block_on(poll_fn(move |cx| { rx.close(); assert_eq!(rx.poll_next_unpin(cx), Poll::Ready(None)); match tx.poll_ready(cx) { Poll::Pending | Poll::Ready(Ok(_)) => panic!(), Poll::Ready(Err(e)) => assert!(e.is_disconnected()), }; Poll::Ready(()) })); } #[test] fn tx_close_gets_none() { let (_, mut rx) = mpsc::channel::<i32>(10); // Run on a task context block_on(poll_fn(move |cx| { assert_eq!(rx.poll_next_unpin(cx), Poll::Ready(None)); Poll::Ready(()) })); } // #[test] // fn spawn_sends_items() { // let core = local_executor::Core::new(); // let stream = unfold(0, |i| Some(ok::<_,u8>((i, i + 1)))); // let rx = mpsc::spawn(stream, &core, 1); // assert_eq!(core.run(rx.take(4).collect()).unwrap(), // [0, 1, 2, 3]); // } // #[test] // fn spawn_kill_dead_stream() { // use std::thread; // use std::time::Duration; // use futures::future::Either; // use futures::sync::oneshot; // // // a stream which never returns anything (maybe a remote end isn't // // responding), but dropping it leads to observable side effects // // (like closing connections, releasing limited resources, ...) // #[derive(Debug)] // struct Dead { // // when dropped you should get Err(oneshot::Canceled) on the // // receiving end // done: oneshot::Sender<()>, // } // impl Stream for Dead { // type Item = (); // type Error = (); // // fn poll(&mut self) -> Poll<Option<Self::Item>, Self::Error> { // Ok(Poll::Pending) // } // } // // // need to implement a timeout for the test, as it would hang // // forever right now // let (timeout_tx, timeout_rx) = oneshot::channel(); // thread::spawn(move || { // thread::sleep(Duration::from_millis(1000)); // let _ = timeout_tx.send(()); // }); // // let core = local_executor::Core::new(); // let (done_tx, done_rx) = oneshot::channel(); // let stream = Dead{done: done_tx}; // let rx = mpsc::spawn(stream, &core, 1); // let res = core.run( // Ok::<_, ()>(()) // .into_future() // .then(move |_| { // // now drop the spawned stream: maybe some timeout exceeded, // // or some connection on this end was closed by the remote // // end. // drop(rx); // // and wait for the spawned stream to release its resources // done_rx // }) // .select2(timeout_rx) // ); // match res { // Err(Either::A((oneshot::Canceled, _))) => (), // _ => { // panic!("dead stream wasn't canceled"); // }, // } // } #[test] fn stress_shared_unbounded() { const AMT: u32 = if cfg!(miri) { 100 } else { 10000 }; const NTHREADS: u32 = 8; let (tx, rx) = mpsc::unbounded::<i32>(); let t = thread::spawn(move || { let result: Vec<_> = block_on(rx.collect()); assert_eq!(result.len(), (AMT * NTHREADS) as usize); for item in result { assert_eq!(item, 1); } }); for _ in 0..NTHREADS { let tx = tx.clone(); thread::spawn(move || { for _ in 0..AMT { tx.unbounded_send(1).unwrap(); } }); } drop(tx); t.join().ok().unwrap(); } #[test] fn stress_shared_bounded_hard() { const AMT: u32 = if cfg!(miri) { 100 } else { 10000 }; const NTHREADS: u32 = 8; let (tx, rx) = mpsc::channel::<i32>(0); let t = thread::spawn(move || { let result: Vec<_> = block_on(rx.collect()); assert_eq!(result.len(), (AMT * NTHREADS) as usize); for item in result { assert_eq!(item, 1); } }); for _ in 0..NTHREADS { let mut tx = tx.clone(); thread::spawn(move || { for _ in 0..AMT { block_on(tx.send(1)).unwrap(); } }); } drop(tx); t.join().unwrap(); } #[test] fn stress_receiver_multi_task_bounded_hard() { const AMT: usize = if cfg!(miri) { 100 } else { 10_000 }; const NTHREADS: u32 = 2; let (mut tx, rx) = mpsc::channel::<usize>(0); let rx = Arc::new(Mutex::new(Some(rx))); let n = Arc::new(AtomicUsize::new(0)); let mut th = vec![]; for _ in 0..NTHREADS { let rx = rx.clone(); let n = n.clone(); let t = thread::spawn(move || { let mut i = 0; loop { i += 1; let mut rx_opt = rx.lock().unwrap(); if let Some(rx) = &mut *rx_opt { if i % 5 == 0 { let item = block_on(rx.next()); if item.is_none() { *rx_opt = None; break; } n.fetch_add(1, Ordering::Relaxed); } else { // Just poll let n = n.clone(); match rx.poll_next_unpin(&mut noop_context()) { Poll::Ready(Some(_)) => { n.fetch_add(1, Ordering::Relaxed); } Poll::Ready(None) => { *rx_opt = None; break; } Poll::Pending => {} } } } else { break; } } }); th.push(t); } for i in 0..AMT { block_on(tx.send(i)).unwrap(); } drop(tx); for t in th { t.join().unwrap(); } assert_eq!(AMT, n.load(Ordering::Relaxed)); } /// Stress test that receiver properly receives all the messages /// after sender dropped. #[test] fn stress_drop_sender() { const ITER: usize = if cfg!(miri) { 100 } else { 10000 }; fn list() -> impl Stream<Item = i32> { let (tx, rx) = mpsc::channel(1); thread::spawn(move || { block_on(send_one_two_three(tx)); }); rx } for _ in 0..ITER { let v: Vec<_> = block_on(list().collect()); assert_eq!(v, vec![1, 2, 3]); } } async fn send_one_two_three(mut tx: mpsc::Sender<i32>) { for i in 1..=3 { tx.send(i).await.unwrap(); } } /// Stress test that after receiver dropped, /// no messages are lost. fn stress_close_receiver_iter() { let (tx, rx) = mpsc::unbounded(); let mut rx = block_on_stream(rx); let (unwritten_tx, unwritten_rx) = std::sync::mpsc::channel(); let th = thread::spawn(move || { for i in 1.. { if tx.unbounded_send(i).is_err() { unwritten_tx.send(i).expect("unwritten_tx"); return; } } }); // Read one message to make sure thread effectively started assert_eq!(Some(1), rx.next()); rx.close(); for i in 2.. { match rx.next() { Some(r) => assert!(i == r), None => { let unwritten = unwritten_rx.recv().expect("unwritten_rx"); assert_eq!(unwritten, i); th.join().unwrap(); return; } } } } #[test] fn stress_close_receiver() { const ITER: usize = if cfg!(miri) { 50 } else { 10000 }; for _ in 0..ITER { stress_close_receiver_iter(); } } async fn stress_poll_ready_sender(mut sender: mpsc::Sender<u32>, count: u32) { for i in (1..=count).rev() { sender.send(i).await.unwrap(); } } /// Tests that after `poll_ready` indicates capacity a channel can always send without waiting. #[test] fn stress_poll_ready() { const AMT: u32 = if cfg!(miri) { 100 } else { 1000 }; const NTHREADS: u32 = 8; /// Run a stress test using the specified channel capacity. fn stress(capacity: usize) { let (tx, rx) = mpsc::channel(capacity); let mut threads = Vec::new(); for _ in 0..NTHREADS { let sender = tx.clone(); threads.push(thread::spawn(move || block_on(stress_poll_ready_sender(sender, AMT)))); } drop(tx); let result: Vec<_> = block_on(rx.collect()); assert_eq!(result.len() as u32, AMT * NTHREADS); for thread in threads { thread.join().unwrap(); } } stress(0); stress(1); stress(8); stress(16); } #[test] fn try_send_1() { const N: usize = if cfg!(miri) { 100 } else { 3000 }; let (mut tx, rx) = mpsc::channel(0); let t = thread::spawn(move || { for i in 0..N { loop { if tx.try_send(i).is_ok() { break; } } } }); let result: Vec<_> = block_on(rx.collect()); for (i, j) in result.into_iter().enumerate() { assert_eq!(i, j); } t.join().unwrap(); } #[test] fn try_send_2() { let (mut tx, rx) = mpsc::channel(0); let mut rx = block_on_stream(rx); tx.try_send("hello").unwrap(); let (readytx, readyrx) = oneshot::channel::<()>(); let th = thread::spawn(move || { block_on(poll_fn(|cx| { assert!(tx.poll_ready(cx).is_pending()); Poll::Ready(()) })); drop(readytx); block_on(tx.send("goodbye")).unwrap(); }); let _ = block_on(readyrx); assert_eq!(rx.next(), Some("hello")); assert_eq!(rx.next(), Some("goodbye")); assert_eq!(rx.next(), None); th.join().unwrap(); } #[test] fn try_send_fail() { let (mut tx, rx) = mpsc::channel(0); let mut rx = block_on_stream(rx); tx.try_send("hello").unwrap(); // This should fail assert!(tx.try_send("fail").is_err()); assert_eq!(rx.next(), Some("hello")); tx.try_send("goodbye").unwrap(); drop(tx); assert_eq!(rx.next(), Some("goodbye")); assert_eq!(rx.next(), None); } #[test] fn try_send_recv() { let (mut tx, mut rx) = mpsc::channel(1); tx.try_send("hello").unwrap(); tx.try_send("hello").unwrap(); tx.try_send("hello").unwrap_err(); // should be full rx.try_next().unwrap(); rx.try_next().unwrap(); rx.try_next().unwrap_err(); // should be empty tx.try_send("hello").unwrap(); rx.try_next().unwrap(); rx.try_next().unwrap_err(); // should be empty } #[test] fn same_receiver() { let (mut txa1, _) = mpsc::channel::<i32>(1); let txa2 = txa1.clone(); let (mut txb1, _) = mpsc::channel::<i32>(1); let txb2 = txb1.clone(); assert!(txa1.same_receiver(&txa2)); assert!(txb1.same_receiver(&txb2)); assert!(!txa1.same_receiver(&txb1)); txa1.disconnect(); txb1.close_channel(); assert!(!txa1.same_receiver(&txa2)); assert!(txb1.same_receiver(&txb2)); } #[test] fn is_connected_to() { let (txa, rxa) = mpsc::channel::<i32>(1); let (txb, rxb) = mpsc::channel::<i32>(1); assert!(txa.is_connected_to(&rxa)); assert!(txb.is_connected_to(&rxb)); assert!(!txa.is_connected_to(&rxb)); assert!(!txb.is_connected_to(&rxa)); } #[test] fn hash_receiver() { use std::collections::hash_map::DefaultHasher; use std::hash::Hasher; let mut hasher_a1 = DefaultHasher::new(); let mut hasher_a2 = DefaultHasher::new(); let mut hasher_b1 = DefaultHasher::new(); let mut hasher_b2 = DefaultHasher::new(); let (mut txa1, _) = mpsc::channel::<i32>(1); let txa2 = txa1.clone(); let (mut txb1, _) = mpsc::channel::<i32>(1); let txb2 = txb1.clone(); txa1.hash_receiver(&mut hasher_a1); let hash_a1 = hasher_a1.finish(); txa2.hash_receiver(&mut hasher_a2); let hash_a2 = hasher_a2.finish(); txb1.hash_receiver(&mut hasher_b1); let hash_b1 = hasher_b1.finish(); txb2.hash_receiver(&mut hasher_b2); let hash_b2 = hasher_b2.finish(); assert_eq!(hash_a1, hash_a2); assert_eq!(hash_b1, hash_b2); assert!(hash_a1 != hash_b1); txa1.disconnect(); txb1.close_channel(); let mut hasher_a1 = DefaultHasher::new(); let mut hasher_a2 = DefaultHasher::new(); let mut hasher_b1 = DefaultHasher::new(); let mut hasher_b2 = DefaultHasher::new(); txa1.hash_receiver(&mut hasher_a1); let hash_a1 = hasher_a1.finish(); txa2.hash_receiver(&mut hasher_a2); let hash_a2 = hasher_a2.finish(); txb1.hash_receiver(&mut hasher_b1); let hash_b1 = hasher_b1.finish(); txb2.hash_receiver(&mut hasher_b2); let hash_b2 = hasher_b2.finish(); assert!(hash_a1 != hash_a2); assert_eq!(hash_b1, hash_b2); } #[test] fn send_backpressure() { let (waker, counter) = new_count_waker(); let mut cx = Context::from_waker(&waker); let (mut tx, mut rx) = mpsc::channel(1); block_on(tx.send(1)).unwrap(); let mut task = tx.send(2); assert_eq!(task.poll_unpin(&mut cx), Poll::Pending); assert_eq!(counter, 0); let item = block_on(rx.next()).unwrap(); assert_eq!(item, 1); assert_eq!(counter, 1); assert_eq!(task.poll_unpin(&mut cx), Poll::Ready(Ok(()))); let item = block_on(rx.next()).unwrap(); assert_eq!(item, 2); } #[test] fn send_backpressure_multi_senders() { let (waker, counter) = new_count_waker(); let mut cx = Context::from_waker(&waker); let (mut tx1, mut rx) = mpsc::channel(1); let mut tx2 = tx1.clone(); block_on(tx1.send(1)).unwrap(); let mut task = tx2.send(2); assert_eq!(task.poll_unpin(&mut cx), Poll::Pending); assert_eq!(counter, 0); let item = block_on(rx.next()).unwrap(); assert_eq!(item, 1); assert_eq!(counter, 1); assert_eq!(task.poll_unpin(&mut cx), Poll::Ready(Ok(()))); let item = block_on(rx.next()).unwrap(); assert_eq!(item, 2); } /// Test that empty channel has zero length and that non-empty channel has length equal to number /// of enqueued items #[test] fn unbounded_len() { let (tx, mut rx) = mpsc::unbounded(); assert_eq!(tx.len(), 0); assert!(tx.is_empty()); tx.unbounded_send(1).unwrap(); assert_eq!(tx.len(), 1); assert!(!tx.is_empty()); tx.unbounded_send(2).unwrap(); assert_eq!(tx.len(), 2); assert!(!tx.is_empty()); let item = block_on(rx.next()).unwrap(); assert_eq!(item, 1); assert_eq!(tx.len(), 1); assert!(!tx.is_empty()); let item = block_on(rx.next()).unwrap(); assert_eq!(item, 2); assert_eq!(tx.len(), 0); assert!(tx.is_empty()); } ```
Ben Marwood is an English singer-songwriter from Reading, Berkshire, England. As part of the contemporary London folk scene, Marwood has performed alongside Frank Turner, Chris T-T and Emily Barker amongst others. Musical career Playing solo shows from 2002, in 2008 Marwood released his debut mini-album, This Is Not What You Had Planned to some critical acclaim, followed by a three-way split album entitled Exclamation at Asterisk Hash which also featured friends Oxygen Thief and Jim Lockey. Both were released on Broken Tail Records, a small indie label run by Marwood. The debut album Outside There's A Curse was released on London-based Xtra Mile Recordings on 31 January 2011 to further critical acclaim, with Kerrang! awarding it a score of four out of a possible five Ks and Rocksound awarding an eight out of ten. The album release was supported by two national headline tours alongside Oxygen Thief, and a support slot with Frank Turner in May 2011. All undistributed copies of the album were subsequently destroyed in the arson attack on the Sony DADC warehouse during the 2011 England Riots in August 2011. Marwood is a good friend of Turner's and was part of his extended backing band at the 2012 Summer Olympics opening ceremony, and also appeared in the video for Turner's single Long Live the Queen. After unreleased material featured on a couple of compilation appearances towards the end of 2011, BBC News reported that Marwood was working on a second album. It was confirmed in a blog post on 23 December 2012 that the new album would follow in 2013 and was preceded by a five-song EP featuring re-recorded live takes of previous songs entitled Incidents/Accidents, released via Bandcamp on a pay-what-you-like basis. Following the Bandcamp release, two further digital EPs were released in February 2013 through Josaka Music, Demons and Ben Marwood & Quiet Quiet Band Lay Low, a split with Reading band Quiet Quiet Band which had shortened to Lay Low by the time it reached retailers, after which Rock Sound announced that the new album Back Down would be released on 13 May 2013 through Xtra Mile Recordings. A headline UK tour was subsequently announced which also featured prominent members of the underground UK acoustic scene, as well as a video for the single Under Lock and Key, before heading to the US as opening support for Frank Turner. Outside of performing, Marwood also hosts a monthly show on a weekly alternative podcast "edit radio". Discography Albums Outside There's a Curse (2011) Back Down (2013) Get Found (2017) EPs goodPROPAGANDA (2003) Give Up.. just once, give up (2005) This Is Not What You Had Planned (2008) Incidents/Accidents (2012) Demons (2013) Split EPs Ben Marwood vs. Heartwear Process (7" vinyl – 2007) Exclamation at Asterisk Hash (w/Oxygen Thief & Jim Lockey and the Solemn Sun – 2009) Lay Low (w/Quiet Quiet Band – 2013) Compilation appearances Four By Four EP – "More Good Propaganda" (2007) Four By Four More EP – "Question Marks?" (2008) Xtra Mile High Club Vol. 3 – "We Are No Longer Twenty-Five [Mile High Version]" (2011) Lamp Light the Fire – "Horatio Dies" (2011) References External links Official site Ben Marwood on Myspace Broken Tail Records on MySpace Year of birth missing (living people) Living people English male singer-songwriters English singer-songwriters English folk singers English folk guitarists Folk punk musicians
The Märkischer Kreis is a district (Kreis) in central North Rhine-Westphalia, Germany. Neighbouring districts are Unna, Soest, Hochsauerland, Olpe, Oberbergischer Kreis, Ennepe-Ruhr, and the city of Hagen. History The district was created in 1975 as part of the reorganization of North Rhine-Westphalian districts. The former districts of Lüdenscheid and Iserlohn, together with the City of Iserlohn, previously an urban district, plus the area around Balve (previously part of Arnsberg District) were amalgamated to form the new district. Lüdenscheid District itself had been created just a few years earlier, in 1968, when the city of Lüdenscheid was merged with Altena District (originally created in 1753). The name Märkischer Kreis was chosen in recognition of the fact that most of its territory formerly belonged to the county of the Mark. Twinning Twinning with Wrexham County Borough (Wales, United Kingdom) dates from 1970 and was initiated by the precursor district, Iserlohn. In 1992 a twinning agreement was reached with the Finsterwalde District of Brandenburg, unofficial relations between the two districts having existed since German reunification in 1990. Following Finsterwald's merger with the district of Elbe-Elster, twinning with the new district was reconfirmed in 1996. In 2001 a twinning agreement was officially established with the district of Racibórz, in southern Poland. Geography The Märkischer Kreis covers the northwestern part of the Sauerland mountains, south of the Ruhr valley. The highest point, at 663 metres above sea level, is the Nordhelle. The district's principal river is the Lenne, another river is the Hönne. Although most of the district is covered by forest and is rather sparsely inhabited, the area has had a long industrial history: it was, in fact, the very abundance of timber in the area which made steel-working possible here long before Ruhr coal became readily available. Coat of arms The lion and fess chequy are taken from the old coat of arms of the district of Altena, which derived from the arms of the Counts of the Mark. In the first half of the 13th century a seal with both the fess and the lion was in use, as first used by Adolf I of Altena (1199–1241). Engelbert I of the Mark (1249–1277) removed the lion in his seal. The original colour of the lion was unknown, so a black lion with red tongue and claws was chosen, as in the arms of the Dukes of Jülich. The black cross comes from the arms of Cologne, as the eastern part of the area historically belonged to the Electorate of Cologne. The coat of arms was designed by the herald Waldemar Mallek, and was granted on May 6, 1976. Towns and municipalities Politics and administration The district is led by a Landrat. Originally the Landrat was only a representative post, while the Oberkreisdirektor was the head of the administration; however, since 1999 the two posts have been unified. The headquarters of the administration of the county are located in Lüdenscheid, but there are county halls with parts of the administration in Iserlohn and Altena, too. The police headquarters of the county are in Iserlohn. The county council meets in the county hall in Iserlohn. Its last election was on September 26, 2004. Culture From 1970 to 2005 the Märkischer Kreis hosted an international Jazzfestival. Since 2002 the cave in Balve is the home of the Irish Folk & Celtic Music festival. Since 1991 the Balver Maerchenwochen are organized by the Festspiele Balver Höhle. The Luisenhütte is an industrial monument in Balve. References External links Website for Märkischer Kreis tourism Districts of North Rhine-Westphalia
Pleurotomella spinosa is an extinct species of sea snail, a marine gastropod mollusk in the family Raphitomidae. Description Distribution Fossils of this marine species were found in Oligocene strata in Aquitaine, France. References Lozouet P. (2015). Nouvelles espèces de gastéropodes (Mollusca: Gastropoda) de l'Oligocène et du Miocène inférieur d'Aquitaine (Sud-Ouest de la France). Partie 5. Cossmanniana. 17: 15–84. External links MNHN, Paris: holotype spinosa Gastropods described in 2015
```html <html lang="en"> <head> <title>Misnesting - The C Preprocessor</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="The C Preprocessor"> <meta name="generator" content="makeinfo 4.8"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Macro-Pitfalls.html#Macro-Pitfalls" title="Macro Pitfalls"> <link rel="next" href="Operator-Precedence-Problems.html#Operator-Precedence-Problems" title="Operator Precedence Problems"> <link href="path_to_url" rel="generator-home" title="Texinfo Homepage"> <!-- Permission is granted to copy, distribute and/or modify this document any later version published by the Free Software Foundation. A copy of the license is included in the This manual contains no Invariant Sections. The Front-Cover Texts are (a) (see below), and the Back-Cover Texts are (b) (see below). (a) The FSF's Front-Cover Text is: A GNU Manual (b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <p> <a name="Misnesting"></a> Next:&nbsp;<a rel="next" accesskey="n" href="Operator-Precedence-Problems.html#Operator-Precedence-Problems">Operator Precedence Problems</a>, Up:&nbsp;<a rel="up" accesskey="u" href="Macro-Pitfalls.html#Macro-Pitfalls">Macro Pitfalls</a> <hr> </div> <h4 class="subsection">3.10.1 Misnesting</h4> <p>When a macro is called with arguments, the arguments are substituted into the macro body and the result is checked, together with the rest of the input file, for more macro calls. It is possible to piece together a macro call coming partially from the macro body and partially from the arguments. For example, <pre class="smallexample"> #define twice(x) (2*(x)) #define call_with_1(x) x(1) call_with_1 (twice) ==&gt; twice(1) ==&gt; (2*(1)) </pre> <p>Macro definitions do not have to have balanced parentheses. By writing an unbalanced open parenthesis in a macro body, it is possible to create a macro call that begins inside the macro body but ends outside of it. For example, <pre class="smallexample"> #define strange(file) fprintf (file, "%s %d", ... strange(stderr) p, 35) ==&gt; fprintf (stderr, "%s %d", p, 35) </pre> <p>The ability to piece together a macro call can be useful, but the use of unbalanced open parentheses in a macro body is just confusing, and should be avoided. </body></html> ```
```html <!DOCTYPE html> <html xmlns="path_to_url"><head><title>Linalg (owl-base.Owl_computation_cpu_init.Make.Graph.Optimiser.Operator.Linalg)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../../../../index.html">owl-base</a> &#x00BB; <a href="../../../../../index.html">Owl_computation_cpu_init</a> &#x00BB; <a href="../../../../index.html">Make</a> &#x00BB; <a href="../../../index.html">Graph</a> &#x00BB; <a href="../../index.html">Optimiser</a> &#x00BB; <a href="../index.html">Operator</a> &#x00BB; Linalg</nav><header class="odoc-preamble"><h1>Module <code><span>Operator.Linalg</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-inv"><a href="#val-inv" class="anchor"></a><code><span><span class="keyword">val</span> inv : <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a></span></code></div><div class="spec-doc"><p><code>inv a</code> computes the inverse of the matrix <code>a</code>. Returns a new array representing the inverse matrix.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-logdet"><a href="#val-logdet" class="anchor"></a><code><span><span class="keyword">val</span> logdet : <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-elt">Symbol.Shape.Type.elt</a></span></code></div><div class="spec-doc"><p><code>logdet a</code> computes the natural logarithm of the determinant of the matrix <code>a</code>. Returns the logarithm of the determinant as a scalar.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-chol"><a href="#val-chol" class="anchor"></a><code><span><span class="keyword">val</span> chol : <span><span class="optlabel">?upper</span>:bool <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a></span></code></div><div class="spec-doc"><p><code>chol ?upper a</code> performs the Cholesky decomposition of the positive-definite matrix <code>a</code>.</p><ul><li><code>upper</code> specifies whether to return the upper or lower triangular matrix. If <code>upper</code> is true, returns the upper triangular matrix, otherwise the lower triangular matrix. Returns a new array representing the Cholesky factor.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-qr"><a href="#val-qr" class="anchor"></a><code><span><span class="keyword">val</span> qr : <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> * <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a></span></code></div><div class="spec-doc"><p><code>qr a</code> performs the QR decomposition of the matrix <code>a</code>. Returns a tuple of two arrays (Q, R), where <code>Q</code> is an orthogonal matrix and <code>R</code> is an upper triangular matrix.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-lq"><a href="#val-lq" class="anchor"></a><code><span><span class="keyword">val</span> lq : <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> * <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a></span></code></div><div class="spec-doc"><p><code>lq a</code> performs the LQ decomposition of the matrix <code>a</code>. Returns a tuple of two arrays (L, Q), where <code>L</code> is a lower triangular matrix and <code>Q</code> is an orthogonal matrix.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-svd"><a href="#val-svd" class="anchor"></a><code><span><span class="keyword">val</span> svd : <span><span class="optlabel">?thin</span>:bool <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> * <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> * <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a></span></code></div><div class="spec-doc"><p><code>svd ?thin a</code> performs the Singular Value Decomposition (SVD) of the matrix <code>a</code>.</p><ul><li><code>thin</code> specifies whether to return the reduced form of the SVD. Returns a tuple of three arrays (U, S, V), where <code>U</code> and <code>V</code> are orthogonal matrices, and <code>S</code> is a diagonal matrix containing the singular values.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sylvester"><a href="#val-sylvester" class="anchor"></a><code><span><span class="keyword">val</span> sylvester : <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a></span></code></div><div class="spec-doc"><p><code>sylvester a b c</code> solves the Sylvester equation A*X + X*B = C for the unknown matrix X. Returns a new array representing the solution matrix X.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-lyapunov"><a href="#val-lyapunov" class="anchor"></a><code><span><span class="keyword">val</span> lyapunov : <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a></span></code></div><div class="spec-doc"><p><code>lyapunov a q</code> solves the continuous Lyapunov equation A*X + X*A^T = Q for the unknown matrix X. Returns a new array representing the solution matrix X.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-discrete_lyapunov"><a href="#val-discrete_lyapunov" class="anchor"></a><code><span><span class="keyword">val</span> discrete_lyapunov : <span><span class="optlabel">?solver</span>:<span>[ `default <span>| `bilinear</span> <span>| `direct</span> ]</span> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a></span></code></div><div class="spec-doc"><p><code>discrete_lyapunov ?solver a q</code> solves the discrete Lyapunov equation A*X*A^T - X + Q = 0 for the unknown matrix X.</p><ul><li><code>solver</code> specifies the method to use: `default`, `bilinear`, or `direct`. Returns a new array representing the solution matrix X.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-linsolve"><a href="#val-linsolve" class="anchor"></a><code><span><span class="keyword">val</span> linsolve : <span><span class="optlabel">?trans</span>:bool <span class="arrow">&#45;&gt;</span></span> <span><span class="optlabel">?typ</span>:<span>[ `n <span>| `u</span> <span>| `l</span> ]</span> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a></span></code></div><div class="spec-doc"><p><code>linsolve ?trans ?typ a b</code> solves the linear system A*X = B for the unknown matrix X.</p><ul><li><code>trans</code> specifies whether to transpose the matrix A.</li><li><code>typ</code> specifies the type of matrix A: `n` for normal, `u` for upper triangular, and `l` for lower triangular. Returns a new array representing the solution matrix X.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-care"><a href="#val-care" class="anchor"></a><code><span><span class="keyword">val</span> care : <span><span class="optlabel">?diag_r</span>:bool <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a></span></code></div><div class="spec-doc"><p><code>care ?diag_r a b q r</code> solves the Continuous-time Algebraic Riccati Equation (CARE) A*X + X*A^T - X*B*R^-1*B^T*X + Q = 0 for the unknown matrix X.</p><ul><li><code>diag_r</code> if true, <code>R</code> is assumed to be diagonal. Returns a new array representing the solution matrix X.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-dare"><a href="#val-dare" class="anchor"></a><code><span><span class="keyword">val</span> dare : <span><span class="optlabel">?diag_r</span>:bool <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Symbol/Shape/Type/index.html#type-arr">Symbol.Shape.Type.arr</a></span></code></div><div class="spec-doc"><p><code>dare ?diag_r a b q r</code> solves the Discrete-time Algebraic Riccati Equation (DARE) A*X*A^T - X - (A*X*B^T)*inv(B*X*B^T + R)*(A*X*B^T)^T + Q = 0 for the unknown matrix X.</p><ul><li><code>diag_r</code> if true, <code>R</code> is assumed to be diagonal. Returns a new array representing the solution matrix X.</li></ul></div></div></div></body></html> ```
Franklin Edgerton (July 24, 1885 – December 7, 1963) was an American linguistic scholar. He was Salisbury Professor of Sanskrit and Comparative Philology at Yale University (1926) and visiting professor at Benares Hindu University (1953–4). Between 1913 and 1926, he was the Professor of Sanskrit at the University of Pennsylvania. He is well known for his exceptionally literal translation of the Bhagavad Gita which was published as volume 38-39 of the Harvard Oriental Series in 1944. He also edited the parallel edition of four recensions of the Simhāsana Dvātrṃśika ("32 Tales of the Throne", also known as Vikrama Charita: "Adventures of Vikrama"), and a reconstruction of the (lost) original Sanskrit text of the Panchatantra. Edgerton was elected to the American Academy of Arts and Sciences in 1920, the American Philosophical Society in 1935, and the United States National Academy of Sciences in 1964. Publications Edgerton, Franklin (1924). Panchatantra reconstructed. 2 Volumes. New Haven, CT: American Oriental Society. , Edgerton, Franklin (1926). Vikrama's Adventures. Harvard Oriental Series, Volumes 26 & 27. Cambridge, MA: Harvard University Press. , Edgerton, Franklin (1931) The elephant-lore of the Hindus. Yale University Press. Edgerton, Franklin (1944) The Bhagavad Gita, Translated and interpreted from the Sanskrit, Harvard University Press: Cambridge, Mass. Edgerton, Franklin (1953). Buddhist hybrid sanskrit grammar and dictionary, Vol. 1: Grammar. New Haven: Yale University Press Edgerton, Franklin (1953). Buddhist hybrid sanskrit grammar and dictionary, Vol. 2: Dictionary. New Haven: Yale University Press Edgerton, Franklin (1965). The Beginnings of Indian Philosophy: Selections from the Rig Veda, Atharva Veda, Upanisads, and Mahabharata, Translated from the Sanskrit with an Introduction, notes, and glossarial index. Harvard University Press & George Allen & Unwin London References External links Franklin Edgerton at Google Scholar Franklin Edgerton at Google Books Franklin Edgerton Papers (MS 1720). Manuscripts and Archives, Yale University Library. 1885 births 1963 deaths Linguists from the United States Translators to Sanskrit Translators of the Bhagavad Gita Linguistic Society of America presidents 20th-century translators American Sanskrit scholars Yale University faculty University of Pennsylvania faculty 20th-century linguists Members of the American Philosophical Society
Ruby T. Hooper (October 5, 1924 – October 12, 2007) was an American dietitian, healthcare food service director, and politician from North Carolina. In 1984, Hooper made history by becoming the first woman to run for Governor of North Carolina as a major party candidate. Education and personal life Hooper was born in Saluda, North Carolina. She earned an associate degree from Mars Hill College in 1943 and a bachelor's degree from the University of North Carolina, Greensboro in 1945. She married John O. Hooper in 1946. They had one child, Dr. Elizabeth Hooper Jackson. Hooper died on October 12, 2007, at Memorial Mission Hospital in Asheville, North Carolina. She was 83 years old. Career and Political Activity Following college graduation in 1946, Hooper began work as an assistant dietitian Broughton Hospital. In 1953, she became director of food service at Broughton Hospital, a position she held until retirement in 1982. Hooper served as the chairperson of the Burke County Republican Party and unsuccessfully sought election to the North Carolina House of Representatives in 1982. She later ran as a Republican Party candidate in the 1984 North Carolina gubernatorial election. However, she was defeated in the Republican primary by James G. Martin, who went on to be elected the governor of North Carolina in the general election. She served as deputy secretary of the Department of Human Resources in Martin's administration. She resigned from this position in 1991 to seek the nomination as the Republican gubernatorial candidate. She lost the nomination to Lt. Gov. James C. Gardner. Hooper was also involved with the N.C. Committee on Fetal Alcohol Syndrome, the N.C. Caring Program for Children, and served as secretary on the Governor's Advisory Council on Aging. Among other awards, Hooper was named Burke County Woman of the Year in 1984, recognized as the Mars Hill College 1987 Alumna of the Year, and received a community service award from the Governor in 1990. References External links Blue Ridge Times-News: Ruby Hooper obituary Blue Ridge Times-News: Services for Hooper to be held in Saluda 1924 births 2007 deaths North Carolina Republicans University of North Carolina at Greensboro alumni Dietitians American women nutritionists American nutritionists American civil rights activists Women in North Carolina politics People from Saluda, North Carolina Candidates in the 1984 United States elections 20th-century American politicians Activists from North Carolina 20th-century American women politicians 21st-century American women
```python # # # path_to_url # # Unless required by applicable law or agreed to in writing, software # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. import torch import os import logging import json from abc import ABC from ts.torch_handler.base_handler import BaseHandler from transformers import T5Tokenizer, T5ForConditionalGeneration logger = logging.getLogger(__name__) class TransformersSeqGeneration(BaseHandler, ABC): _LANG_MAP = { "ro": "Romanian", "fr": "French", "de": "German", "en": "English", } def __init__(self): super().__init__() self.initialized = False def initialize(self, ctx): self.manifest = ctx.manifest properties = ctx.system_properties model_dir = properties.get("model_dir") serialized_file = self.manifest["model"]["serializedFile"] model_pt_path = os.path.join(model_dir, serialized_file) self.device = torch.device( "cuda:" + str(properties.get("gpu_id")) if torch.cuda.is_available() else "cpu" ) # read configs for the mode, model_name, etc. from setup_config.json setup_config_path = os.path.join(model_dir, "setup_config.json") if os.path.isfile(setup_config_path): with open(setup_config_path) as setup_config_file: self.setup_config = json.load(setup_config_file) else: logger.warning("Missing the setup_config.json file.") # Loading the model and tokenizer from checkpoint and config files based on the user's choice of mode # further setup config can be added. self.tokenizer = T5Tokenizer.from_pretrained(model_dir) if self.setup_config["save_mode"] == "torchscript": self.model = torch.jit.load(model_pt_path) elif self.setup_config["save_mode"] == "pretrained": self.model = T5ForConditionalGeneration.from_pretrained(model_dir) else: logger.warning("Missing the checkpoint or state_dict.") self.model.to(self.device) self.model.eval() logger.info("Transformer model from path %s loaded successfully", model_dir) self.initialized = True def preprocess(self, requests): input_batch = None texts_batch = [] for idx, data in enumerate(requests): data = data["body"] input_text = data["text"] src_lang = data["from"] tgt_lang = data["to"] if isinstance(input_text, (bytes, bytearray)): input_text = input_text.decode("utf-8") src_lang = src_lang.decode("utf-8") tgt_lang = tgt_lang.decode("utf-8") texts_batch.append(f"translate {self._LANG_MAP[src_lang]} to {self._LANG_MAP[tgt_lang]}: {input_text}") inputs = self.tokenizer(texts_batch, return_tensors="pt") input_batch = inputs["input_ids"].to(self.device) return input_batch def inference(self, input_batch): generations = self.model.generate(input_batch) generations = self.tokenizer.batch_decode(generations, skip_special_tokens=True) return generations def postprocess(self, inference_output): return [{"text": text} for text in inference_output] ```
The 1883 Minnesota gubernatorial election was held on November 6, 1883 to elect the governor of Minnesota. Results References 1883 Minnesota gubernatorial November 1883 events
Mark Cavallin (born October 20, 1971) is a Canadian-British former professional ice hockey goaltender. He played in the British Ice Hockey Superleague for the London Knights, Belfast Giants and the Ayr Scottish Eagles. He also played in the German 2nd Bundesliga for the EC Bad Tölz and EV Regensburg. He played for the Great Britain national ice hockey team in two World Championships. External links 1971 births Living people Ayr Scottish Eagles players Belfast Giants players British ice hockey goaltenders Canadian ice hockey goaltenders Chatham Wheels players EC Bad Tölz players EV Regensburg players Lake Charles Ice Pirates players London Knights (UK) players Ice hockey people from Mississauga Tulsa Oilers (1992–present) players Oakland Skates players St. Louis Vipers players Canadian expatriate ice hockey players in England Canadian expatriate ice hockey players in Germany Naturalised citizens of the United Kingdom Naturalised sports competitors British expatriate ice hockey people British expatriate sportspeople in Italy British expatriate sportspeople in Germany Canadian expatriate sportspeople in Italy Canadian ice hockey coaches British ice hockey coaches
Stade Français Basket is the basketball section of French multi-sports club Stade Français, which is based in Paris. The club was established in 1920, and it currently has 23 teams competing in different categories, with the main two being women's teams, in the national championships of France. Men's basketball The men's teams currently include Under-20, Under-17, Under-15 and Under-13 divisions, which compete in regional championships. Titles Ligue Nationale 1921, 1927 Men's players Men's head coaches Women's basketball The club's women's teams have the most significant achievements for the club, as they won six French national championships in the 1980s, including five titles in a row. They were also a regular participant in the Euroleague Women. In 1985, the club moved to nearby Versailles, competing as "Union Stade Français Versailles", until it was disestablished in 1989. Titles Ligue Nationale 1980, 1983, 1984, 1985, 1986, 1987 Coupe de France 1982, 1983, 1985 See also Stade Français football Stade Français rugby References External links Stade Français Paris Basketball teams established in 1920 Women's basketball teams in France
```python """ Test module for Shared PD. """ import unittest import errno import os from tests.test_qpex import QpExRCRDMAWrite from tests.base import RDMATestCase from pyverbs.device import Context from pyverbs.pd import PD from pyverbs.mr import MR import pyverbs.enums as e import tests.utils as u def get_import_res_class(base_class): """ This function creates a class that inherits base_class of any BaseResources type. Its purpose is to behave exactly as base_class does, except for the objects creation, which instead of creating context, PD and MR, it imports them. Hence the returned class must be initialized with (cmd_fd, pd_handle, mr_handle, mr_addr, **kwargs), while kwargs are the arguments needed (if any) for base_class. In addition it has unimport_resources() method which unimprot all the resources and closes the imported PD object. :param base_class: The base resources class to inherit from :return: ImportResources(cmd_fd, pd_handle, mr_handle, mr_addr, **kwargs) class """ class ImportResources(base_class): def __init__(self, cmd_fd, pd_handle, mr_handle, mr_addr=None, **kwargs): self.cmd_fd = cmd_fd self.pd_handle = pd_handle self.mr_handle = mr_handle self.mr_addr = mr_addr super(ImportResources, self).__init__(**kwargs) def create_context(self): try: self.ctx = Context(cmd_fd=self.cmd_fd) except u.PyverbsRDMAError as ex: if ex.error_code in [errno.EOPNOTSUPP, errno.EPROTONOSUPPORT]: raise unittest.SkipTest('Importing a device is not supported') raise ex def create_pd(self): self.pd = PD(self.ctx, handle=self.pd_handle) def create_mr(self): self.mr = MR(self.pd, handle=self.mr_handle, address=self.mr_addr) def unimport_resources(self): self.mr.unimport() self.pd.unimport() self.pd.close() return ImportResources class SharedPDTestCase(RDMATestCase): def setUp(self): super().setUp() self.iters = 10 self.server_res = None self.imported_res = [] def tearDown(self): for res in self.imported_res: res.unimport_resources() super().tearDown() def test_imported_rc_ex_rdma_write(self): setup_params = {'dev_name': self.dev_name, 'ib_port': self.ib_port, 'gid_index': self.gid_index} self.server_res = QpExRCRDMAWrite(**setup_params) cmd_fd_dup = os.dup(self.server_res.ctx.cmd_fd) import_cls = get_import_res_class(QpExRCRDMAWrite) server_import = import_cls( cmd_fd_dup, self.server_res.pd.handle, self.server_res.mr.handle, # The imported MR's address is NULL, so using the address of the # "main" MR object to be able to validate the message self.server_res.mr.buf, **setup_params) self.imported_res.append(server_import) client = QpExRCRDMAWrite(**setup_params) client.pre_run(server_import.psns, server_import.qps_num) server_import.pre_run(client.psns, client.qps_num) client.rkey = server_import.mr.rkey server_import.rkey = client.mr.rkey client.raddr = server_import.mr.buf server_import.raddr = client.mr.buf u.rdma_traffic(client, server_import, self.iters, self.gid_index, self.ib_port, send_op=e.IBV_WR_RDMA_WRITE, new_send=True) ```
```javascript // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; // Flags: --expose-internals require('../common'); const assert = require('assert'); const util = require('util'); const errors = require('internal/errors'); const context = require('vm').runInNewContext; // isArray assert.strictEqual(util.isArray([]), true); assert.strictEqual(util.isArray(Array()), true); assert.strictEqual(util.isArray(new Array()), true); assert.strictEqual(util.isArray(new Array(5)), true); assert.strictEqual(util.isArray(new Array('with', 'some', 'entries')), true); assert.strictEqual(util.isArray(context('Array')()), true); assert.strictEqual(util.isArray({}), false); assert.strictEqual(util.isArray({ push: function() {} }), false); assert.strictEqual(util.isArray(/regexp/), false); assert.strictEqual(util.isArray(new Error()), false); assert.strictEqual(util.isArray(Object.create(Array.prototype)), false); // isRegExp assert.strictEqual(util.isRegExp(/regexp/), true); assert.strictEqual(util.isRegExp(RegExp(), 'foo'), true); assert.strictEqual(util.isRegExp(new RegExp()), true); assert.strictEqual(util.isRegExp(context('RegExp')()), true); assert.strictEqual(util.isRegExp({}), false); assert.strictEqual(util.isRegExp([]), false); assert.strictEqual(util.isRegExp(new Date()), false); assert.strictEqual(util.isRegExp(Object.create(RegExp.prototype)), false); // isDate assert.strictEqual(util.isDate(new Date()), true); assert.strictEqual(util.isDate(new Date(0), 'foo'), true); assert.strictEqual(util.isDate(new (context('Date'))()), true); assert.strictEqual(util.isDate(Date()), false); assert.strictEqual(util.isDate({}), false); assert.strictEqual(util.isDate([]), false); assert.strictEqual(util.isDate(new Error()), false); assert.strictEqual(util.isDate(Object.create(Date.prototype)), false); // isError assert.strictEqual(util.isError(new Error()), true); assert.strictEqual(util.isError(new TypeError()), true); assert.strictEqual(util.isError(new SyntaxError()), true); assert.strictEqual(util.isError(new (context('Error'))()), true); assert.strictEqual(util.isError(new (context('TypeError'))()), true); assert.strictEqual(util.isError(new (context('SyntaxError'))()), true); assert.strictEqual(util.isError({}), false); assert.strictEqual(util.isError({ name: 'Error', message: '' }), false); assert.strictEqual(util.isError([]), false); assert.strictEqual(util.isError(Object.create(Error.prototype)), true); // isObject assert.strictEqual(util.isObject({}), true); assert.strictEqual(util.isObject([]), true); assert.strictEqual(util.isObject(new Number(3)), true); assert.strictEqual(util.isObject(Number(4)), false); assert.strictEqual(util.isObject(1), false); // isPrimitive assert.strictEqual(util.isPrimitive({}), false); assert.strictEqual(util.isPrimitive(new Error()), false); assert.strictEqual(util.isPrimitive(new Date()), false); assert.strictEqual(util.isPrimitive([]), false); assert.strictEqual(util.isPrimitive(/regexp/), false); assert.strictEqual(util.isPrimitive(function() {}), false); assert.strictEqual(util.isPrimitive(new Number(1)), false); assert.strictEqual(util.isPrimitive(new String('bla')), false); assert.strictEqual(util.isPrimitive(new Boolean(true)), false); assert.strictEqual(util.isPrimitive(1), true); assert.strictEqual(util.isPrimitive('bla'), true); assert.strictEqual(util.isPrimitive(true), true); assert.strictEqual(util.isPrimitive(undefined), true); assert.strictEqual(util.isPrimitive(null), true); assert.strictEqual(util.isPrimitive(Infinity), true); assert.strictEqual(util.isPrimitive(NaN), true); assert.strictEqual(util.isPrimitive(Symbol('symbol')), true); // isBuffer assert.strictEqual(util.isBuffer('foo'), false); assert.strictEqual(util.isBuffer(Buffer.from('foo')), true); // _extend assert.deepStrictEqual(util._extend({ a: 1 }), { a: 1 }); assert.deepStrictEqual(util._extend({ a: 1 }, []), { a: 1 }); assert.deepStrictEqual(util._extend({ a: 1 }, null), { a: 1 }); assert.deepStrictEqual(util._extend({ a: 1 }, true), { a: 1 }); assert.deepStrictEqual(util._extend({ a: 1 }, false), { a: 1 }); assert.deepStrictEqual(util._extend({ a: 1 }, { b: 2 }), { a: 1, b: 2 }); assert.deepStrictEqual(util._extend({ a: 1, b: 2 }, { b: 3 }), { a: 1, b: 3 }); // deprecated assert.strictEqual(util.isBoolean(true), true); assert.strictEqual(util.isBoolean(false), true); assert.strictEqual(util.isBoolean('string'), false); assert.strictEqual(util.isNull(null), true); assert.strictEqual(util.isNull(undefined), false); assert.strictEqual(util.isNull(), false); assert.strictEqual(util.isNull('string'), false); assert.strictEqual(util.isUndefined(undefined), true); assert.strictEqual(util.isUndefined(), true); assert.strictEqual(util.isUndefined(null), false); assert.strictEqual(util.isUndefined('string'), false); assert.strictEqual(util.isNullOrUndefined(null), true); assert.strictEqual(util.isNullOrUndefined(undefined), true); assert.strictEqual(util.isNullOrUndefined(), true); assert.strictEqual(util.isNullOrUndefined('string'), false); assert.strictEqual(util.isNumber(42), true); assert.strictEqual(util.isNumber(), false); assert.strictEqual(util.isNumber('string'), false); assert.strictEqual(util.isString('string'), true); assert.strictEqual(util.isString(), false); assert.strictEqual(util.isString(42), false); assert.strictEqual(util.isSymbol(Symbol()), true); assert.strictEqual(util.isSymbol(), false); assert.strictEqual(util.isSymbol('string'), false); assert.strictEqual(util.isFunction(() => {}), true); assert.strictEqual(util.isFunction(function() {}), true); assert.strictEqual(util.isFunction(), false); assert.strictEqual(util.isFunction('string'), false); { assert.strictEqual(util.types.isNativeError(new Error()), true); assert.strictEqual(util.types.isNativeError(new TypeError()), true); assert.strictEqual(util.types.isNativeError(new SyntaxError()), true); assert.strictEqual(util.types.isNativeError(new (context('Error'))()), true); assert.strictEqual( util.types.isNativeError(new (context('TypeError'))()), true ); assert.strictEqual( util.types.isNativeError(new (context('SyntaxError'))()), true ); assert.strictEqual(util.types.isNativeError({}), false); assert.strictEqual( util.types.isNativeError({ name: 'Error', message: '' }), false ); assert.strictEqual(util.types.isNativeError([]), false); assert.strictEqual( util.types.isNativeError(Object.create(Error.prototype)), false ); assert.strictEqual( util.types.isNativeError(new errors.codes.ERR_IPC_CHANNEL_CLOSED()), true ); } ```
```javascript /*!----------------------------------------------------------- * Version: 0.20.0(6363745c0a33c27b149b89342a7b96d354fb554c) * Released under the MIT license * path_to_url *-----------------------------------------------------------*/ define("vs/editor/editor.main.nls.ru",{"vs/base/browser/ui/actionbar/actionbar":["{0} ({1})"],"vs/base/browser/ui/aria/aria":["{0} ( )","{0} ( {1} )"],"vs/base/browser/ui/findinput/findInput":[""],"vs/base/browser/ui/findinput/findInputCheckboxes":[" "," "," "],"vs/base/browser/ui/findinput/replaceInput":[""," "],"vs/base/browser/ui/inputbox/inputBox":[": {0}",": {0}",": {0}"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":[""],"vs/base/browser/ui/list/listWidget":["{0}. ."],"vs/base/browser/ui/menu/menu":["{0} ({1})"],"vs/base/browser/ui/tree/abstractTree":[""," "," "," "," : {0} {1}"], "vs/base/common/keybindingLabels":["CTRL","SHIFT","ALT","Windows","CTRL","SHIFT","ALT","","CTRL","SHIFT","ALT","","CTRL","SHIFT","ALT","Windows","CTRL","SHIFT","ALT",""],"vs/base/common/severity":["","",""],"vs/base/parts/quickopen/browser/quickOpenModel":["{0}, "," "],"vs/base/parts/quickopen/browser/quickOpenWidget":[" . , ."," ",": {0}"],"vs/editor/browser/controller/coreCommands":["&& ","&&","&&"],"vs/editor/browser/controller/textAreaHandler":[" . , ALT+F1."],"vs/editor/browser/widget/codeEditorWidget":[" {0}."],"vs/editor/browser/widget/diffEditorWidget":[" , ."], "vs/editor/browser/widget/diffReview":[""," ","1 ",": {0}"," {0} {1}; : {2}, {3}, : {4}, {5}",""," : {0}, : {1}: {2}","+ : {0}: {1}","- : {0}: {1}"," "," "],"vs/editor/browser/widget/inlineDiffMargin":[" "," "," ({0})"," "," ({0})"], "vs/editor/common/config/commonEditorConfig":["",' . , "#editor.detectIndentation#".',' TAB. , "#editor.detectIndentation#". ',' , "#editor.tabSize#" "#editor.insertSpaces#" .'," ."," , .",", .","Controls whether the semanticHighlighting is shown for the languages that support it."," ESC.",", , "," , . 0, .",", : .",", - .",", +/- ."], "vs/editor/common/config/editorOptions":[" , , API- ."," ."," .",", .",", ."," , .",", - , .",' " " ( )',' " " ',' " " .',", .",", - macOS.",", - . true, - .","/ ."," ."," ."," ."," ( )"," "," "," . , , 'editor.editor.gotoLocation.multipleDefinitions' 'editor.editor.gotoLocation.multipleImplementations'.",' " " .',' " " .',' " " .',' " " .',' " " .',' , , " " .',' , , " " .',' , , " " .',' , , " " .',' , , " " .'," , ."," ."," , ."," ."," . 0 .",", -.",", -.",", -."," , -."," ."," -, ."," , .",", ."," ."," ."," .",", ."," ."," ."," ."," 10 ."," ."," . . , ."," ."," .",", . , , .",', , , "insertMode", "insert".'," , .",", , .",', ( "#editor.suggestSelection#").'," , .",", .",", IntelliSense ( 15)."," . , , 'editor.suggest.showKeywords' 'editor.suggest.showSnippets'.",' , IntelliSense "method".',' , IntelliSense "function".',' , IntelliSense "constructor".',' , IntelliSense "field".',' , IntelliSense "variable".',' , IntelliSense "class".',' , IntelliSense "struct".',' , IntelliSense "interface".',' , IntelliSense "module".',' , IntelliSense "property".',' , IntelliSense "event".',' , IntelliSense "operator".',' , IntelliSense "unit".',' , IntelliSense "value".',' , IntelliSense "constant".',' , IntelliSense "enum".',' , IntelliSense "enumMember".',' , IntelliSense "keyword".',' , IntelliSense "text".',' , IntelliSense "color".',' , IntelliSense "file".',' , IntelliSense "reference".',' , IntelliSense "customcolor".',' , IntelliSense "folder".',' , IntelliSense "typeParameter".',' , IntelliSense "snippet".'," .",', . , JavaScript (";") , .'," , .",", TAB. ."," , . : - ."," "," ."," , .",", ."," , .",", ."," ."," , .",", , ."," ."," ."," ."," , onEnterRules, ."," , , onEnterRules, indentationRules, .",", , , ."," ."," , ."," , .",", .",", CodeLens .",", .",", ."," ."," , ."," .",' , . "scrollOff" "scrollOffset" .','"cursorSurroundingLines" API.','"cursorSurroundingLines" .',', "cursorSurroundingLines".'," , \"#editor.cursorStyle#\" 'line'",", ."," ALT.",", ."," , . 'auto' , . 'indentation' .",", ."," ."," .",", . ."," , , ."," . ."," ."," , ."," .",", ."," .",", deltaX deltaY ."," CTRL ."," , ."," CTRL Windows Linux COMMAND macOS."," ALT Windows Linux OPTION macOS.",', . " " " " , . [ ](path_to_url#_multicursor-modifier). '," ."," ."," , .",", .",", ."," "," ",", ."," ( ) .",", .",", ."," , ."," .",", .","Render whitespace characters except for single spaces between words."," .",", ."," , ."," , .",", .",", Linux.",", , .",", ."," ."," ."," ."," ."," ."," .",", ",' - . "0", "#editor.fontSize#".',' - . "0", "#editor.lineHeight#".',", ."," .",' , , "console.| -> console.log", "log" .',' , , "co -> console" "con -> const".'," ."," TAB TAB."," TAB.",' TAB . , "quickSuggestions" .'," TAB."," ",", , ."," ."," .",' "#editor.wordWrapColumn#".',' : "#editor.wordWrapColumn#".'," , .",' , "#editor.wordWrap#" "wordWrapColumn" "bounded".'," . 1."," , ."," , . "," , ."," .",", . , (, ), ."," . , , ."," , ."], "vs/editor/common/modes/modesRegistry":[" "], "vs/editor/common/standaloneStrings":[" "," {0}, {1} (: {2})"," {0}, {1}",": {0} ( : {1})",": {0}",' "accessibilitySupport" "".'," ."," ."," ."," "," "," , COMMAND+E."," , CTRL+E."," ."," , ."," TAB , . , {0}."," TAB , . {0} ."," TAB . , {0}."," TAB . {0} ."," COMMAND+H, ."," CTRL+H, ."," , ESCAPE SHIFT+ESCAPE."," ",": "," {0} {1}"," {0}"," 1 {0} "," 1 {0} "," : {0}. {1}."," , "," ...","{0}, {1}, ","{0}, "," , "," ","{0}, "," , "," ..."," ({0})"," ({0})"," ({0})"," ({0})"," ({0})"," ({0})"," ({0})"," ({0})"," ({0})"," ({0})"," ({0})"," "," CTRL+F1 ."," ALT+F1 ."," "," ({1}): {0}."], "vs/editor/common/view/editorColorRegistry":[" ."," ."," , Quick Open . , ."," .",' , , " " " / ". , .'," ."," ."," . , ."," ."," ."," ."," ."," "," 'Id' . 'editorLineNumber.activeForeground'."," "," ."," CodeLens "," "," "," ."," . ."," () .",' () . , "#000000c0" 75 %. "editorUnnecessaryCode.border".'," ."," ."," ."], "vs/editor/contrib/bracketMatching/bracketMatching":[" ."," "," "," &&"],"vs/editor/contrib/caretOperations/caretOperations":[" "," "],"vs/editor/contrib/caretOperations/transpose":[" "],"vs/editor/contrib/clipboard/clipboard":["","&&","","&&","","&&"," "], "vs/editor/contrib/codeAction/codeActionCommands":[" .",", ."," ."," , ."," .",", ."," "," ..."," ",' "{0}".',' "{0}" '," "," ","...",' "{0}"',' "{0}"'," "," "," ..."," '{0}'",' "{0}"'," "," "," "," "," "," ","..."," "], "vs/editor/contrib/codeAction/lightBulbWidget":[" . ({0})"," ({0})"," "],"vs/editor/contrib/comment/comment":[" "," &&"," "," "," "," &&"],"vs/editor/contrib/contextmenu/contextmenu":[" "],"vs/editor/contrib/cursorUndo/cursorUndo":[" "," "], "vs/editor/contrib/documentSymbols/outlineTree":[" . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," NULL. , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."," . , - ."], "vs/editor/contrib/find/findController":["","&&"," "," "," "," "," "," "," ","","&&"],"vs/editor/contrib/find/findWidget":["",""," "," "," ","","","",""," ",' " "'," {0} , .","{0} {1}"," ","{0} ","{0} {1}","{0} {1} {2}","{0} {1}"," CTRL+ . editor.action.replaceAll, ."], "vs/editor/contrib/folding/folding":[""," ",""," "," "," "," "," "," "," "," {0}"," ."],"vs/editor/contrib/fontZoom/fontZoom":[" "," "," "],"vs/editor/contrib/format/format":[" {0}."," ({0}) {1}."," {0} {1}."," ({0}) {1} {2}."],"vs/editor/contrib/format/formatActions":[" "," "], "vs/editor/contrib/gotoError/gotoError":[" (, , )"," (, , )"," (, , )"," (, , )"," &&"," &&"],"vs/editor/contrib/gotoError/gotoErrorWidget":[": {0} {1}",": {0} {1}"," - ."," - ."," - ."," - ."], "vs/editor/contrib/gotoSymbol/goToCommands":["","",' "{0}" .'," ."," "," &&"," "," ","",' "{0}" .'," "," "," &&",' "{0}" .'," "," "," ",' "{0}".'," ."," "," && "," ","",' "{0}".'," ."," "," &&"," ",' "{0}" '," "," "," &&",""," ",""," ","",' "{0}" ',""], "vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition":[", ({0})."],"vs/editor/contrib/gotoSymbol/peek/referencesController":["...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/peek/referencesTree":[" .",": {0}","{0} "],"vs/editor/contrib/gotoSymbol/peek/referencesWidget":[" ",""," ",""],"vs/editor/contrib/gotoSymbol/referencesModel":[" {0} {1} {2}","1 {0}, : {1}","{0} {1}, : {2} "," "," 1 {0}"," {0} {1}"," {0} {1} "],"vs/editor/contrib/gotoSymbol/symbolNavigation":[" {0} {1}, {2} "," {0} {1}"],"vs/editor/contrib/hover/hover":[" "," "], "vs/editor/contrib/hover/modesContentHover":["..."," "," ..."," "," ..."],"vs/editor/contrib/inPlaceReplace/inPlaceReplace":[" "," "],"vs/editor/contrib/linesOperations/linesOperations":[" ","&& "," "," &&"," ","&& "," "," && "," ","&& "," "," "," -"," "," "," "," "," "," "," ","_ "," "," "," "," "], "vs/editor/contrib/links/links":[" "," "," OPTION "," CTRL "," OPTION "," ALT "," , : {0}"," , ."," "],"vs/editor/contrib/message/messageController":[" "], "vs/editor/contrib/multicursor/multicursor":[" "," &&"," "," &&"," "," && "," "," "," "," && "," "," && "," "," "," "," &&"," "],"vs/editor/contrib/parameterHints/parameterHints":[" "],"vs/editor/contrib/parameterHints/parameterHintsWidget":["{0}, "], "vs/editor/contrib/peekView/peekView":[""," ."," ."," ."," ."," ."," ."," ."," ."," ."," ."," ."," ."," ."," ."], "vs/editor/contrib/rename/rename":[" ."," ",' "{0}"',"{0} {1}. : {2}"," "," "," ","/ "],"vs/editor/contrib/rename/renameInputField":[" .","{0} , {1} "],"vs/editor/contrib/smartSelect/smartSelect":[" ","&& "," ","&& "], "vs/editor/contrib/snippet/snippetVariables":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"vs/editor/contrib/suggest/suggestController":[' "{0}" ({1})'," "], "vs/editor/contrib/suggest/suggestWidget":[" ."," ."," - ."," - ."," - .","...{0}","...{0}","...","..."," .","{0} ...","{0} ..."," {0}, : {1}","{0} , {1} ","{0} , {1} ","{0} "],"vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode":[" TAB ."," TAB , "," TAB "],"vs/editor/contrib/tokenization/tokenization":[": "], "vs/editor/contrib/wordHighlighter/wordHighlighter":[" , , . , ."," , . , ."," , , ."," , , . "," . , ."," . , ."," "," "," "], "vs/platform/configuration/common/configurationRegistry":[" "," , ."," ."," \"{0}\". '\\\\[.*\\\\]$' , . configurationDefaults.",' "{0}". .'],"vs/platform/keybinding/common/abstractKeybindingService":[" ({0}). ..."," ({0} {1}) ."], "vs/platform/list/browser/listService":[" "," CTRL Windows Linux COMMAND macOS."," ALT Windows Linux OPTION macOS.",', (, , scm). " " ( ) , .'," , ( ). , . , , . ",", Workbench.",", .",' , "{0}".'," .",", ."," , . ."," , . ."," , ."," Workbench. , .",', . "false", "list.toggleKeyboardNavigation", .'], "vs/platform/markers/common/markers":["","",""], "vs/platform/theme/common/colorRegistry":[" . , ."," . ."," . , ."," , ."," , ."," ."," .",' - , "/".'," ."," ."," ."," ."," .",' "".',' "".',' "".',' "".',' "".',' "".',' "".',' "".',' "".'," ."," ."," ."," ."," . - , , , ."," . - , , , ."," , , ."," ."," ."," ."," , ."," ."," ."," ."," ."," ."," ."," ."," ."," ."," ."," , /.",' - , "/".'," - . , - -."," - . , - -."," ."," ."," . , ."," , . , ."," , ."," ."," . , ."," , . , ."," ."," ."," , . , ."," , . , ."," ."," ."," ."," ."," .",", .",", ."," . , ."," . , ."," ."," ."," ."," List/Tree, List/Tree . List/Tree , ."," List/Tree, List/Tree . List/Tree , ."," List/Tree, List/Tree . List/Tree , ."," List/Tree, List/Tree . List/Tree , ."," List/Tree, List/Tree . List/Tree , ."," List/Tree, List/Tree . List/Tree , ."," List/Tree, List/Tree . List/Tree , ."," List/Tree ."," List/Tree ."," List/Tree ."," List/Tree."," - ."," - ."," - ."," ."," ."," ."," ."," ."," ."," ."," ."," ."," ."," ."," . "," . , ."," . , ."," - ."," - ."," ."," .",", , .",", , .",", , ."] }); //# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.ru.js.map ```
The Columbus Blue Jackets are an American professional ice hockey team based in Columbus, Ohio. They play in the Metropolitan Division of the Eastern Conference in the National Hockey League (NHL). The team joined the NHL in 2000 as an expansion team. The Blue Jackets have played their home games at the Nationwide Arena since their inaugural season. The franchise is owned by John P. McConnell and Jarmo Kekalainen is their general manager. There have been 10 full-time head coaches for the Blue Jackets franchise. The team's first head coach was Dave King, who coached for three seasons. Ken Hitchcock coached the team to its first playoff appearance. Scott Arniel was the head coach of the Blue Jackets from 2010 through 2012. Todd Richards was named interim head coach on January 9, 2012, and would remain with the team for more than 3½ seasons. John Tortorella became the head coach on October 21, 2015, and left the team following the 2020–21 season with the Blue Jackets' highest winning percentage (.568). Tortorella was replaced by Brad Larsen, who served as head coach for two years before being fired at the conclusion of the season. Mike Babcock was subsequently hired to replace Larsen; however, Babcock resigned before coaching a game for Columbus, after allegations of improper behavior via the Spittin' Chiclets podcast led to an NHLPA investigation. After Babcock's resignation, Pascal Vincent was subsequently named head coach. Key Coaches Note: Statistics are correct through the end of the 2022–23 season. Notes A running total of the number of coaches of the Blue Jackets. Thus, any coach who has two or more separate terms as head coach is only counted once. Before the 2005–06 season, the NHL instituted a penalty shootout for regular season games that remained tied after a five-minute overtime period, which prevented ties. Each year is linked to an article about that particular NHL season. Babcock resigned two and a half months after being named head coach, without coaching a game for the Blue Jackets. References General Specific Columbus Blue Jackets head coaches Head coaches
```python # # Authors: # Michael Vogt # # This program is free software; you can redistribute it and/or modify it under # Foundation; version 3. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # details. # # this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import dbus from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) import locale import logging import os import xml.etree.ElementTree from gettext import dgettext from gettext import gettext as _ LOG = logging.getLogger(__name__) # warning displayed if region does not match REGION_WARNING_STRING = _("Sorry, this software is not available in your " "region.") # the prefix tag for regions that the software is most useful in REGIONTAG = "iso3166::" # blacklist this region REGION_BLACKLIST_TAG = "blacklist-iso3166::" def get_region_name(countrycode): """ return translated region name from countrycode using iso3166 """ # find translated name if countrycode: for iso in ["iso_3166", "iso_3166_2"]: path = os.path.join("/usr/share/xml/iso-codes/", iso + ".xml") if os.path.exists(path): root = xml.etree.ElementTree.parse(path) xpath = ".//%s_entry[@alpha_2_code='%s']" % (iso, countrycode) match = root.find(xpath) if match is not None: name = match.attrib.get("common_name") if not name: name = match.attrib["name"] return dgettext(iso, name) return "" # the first parameter of SetRequirements class AccuracyLevel: NONE = 0 COUNTRY = 1 REGION = 2 LOCALITY = 3 POSTALCODE = 4 STREET = 5 DETAILED = 6 class AllowedResources: NONE = 0 NETWORK = 1 << 0 CELL = 1 << 1 GPS = 1 << 2 ALL = (1 << 10) - 1 class RegionDiscover(object): def get_region(self): """ return a dict with at least "county" and "countrycode" as keys - they may be empty if no region is found """ res = {} # try geoclue first try: res = self._get_region_geoclue() if res: return res except Exception as e: LOG.warn("failed to use geoclue: '%s'" % e) # fallback res = self._get_region_dumb() return res def _get_region_dumb(self): """ return dict estimate about the current countrycode/country """ res = {'countrycode': '', 'country': '', } try: # use LC_MONETARY as the best guess loc = locale.getlocale(locale.LC_MONETARY)[0] except Exception as e: LOG.warn("Failed to get locale: '%s'" % e) return res if not loc: return res countrycode = loc.split("_")[1] res["countrycode"] = countrycode res["country"] = get_region_name(countrycode) return res def _get_region_geoclue(self): """ return the dict with at least countrycode,country from a geoclue provider """ bus = dbus.SessionBus() master = bus.get_object( 'org.freedesktop.Geoclue.Master', '/org/freedesktop/Geoclue/Master') client = bus.get_object( 'org.freedesktop.Geoclue.Master', master.Create()) client.SetRequirements(AccuracyLevel.COUNTRY, # (i) accuracy_level 0, # (i) time False, # (b) require_updates AllowedResources.ALL) # (i) allowed_resoures # this is crucial client.AddressStart() # now get the data time, address_res, accuracy = client.GetAddress() return address_res my_region = None def get_region_cached(): global my_region if my_region is None: rd = RegionDiscover() my_region = rd.get_region() return my_region ```
Airpower and the Environment: The Ecological Implications of Modern Air Warfare is a 2013 non-fiction book on airpower (military aviation) edited by British-New Zealand scholar Joel Hayward. It analyses the impact of modern warfare, especially airpower, on the natural environment. Summary Hayward assembled a team of military and civilian experts in various disciplines to chronicle and analyze the effects of airpower on the environment. Their analysis highlights the fact that air forces now take far more care of the environment than ever before and that many air forces, even in less developed regions such as central Africa, have created strategies to minimize all harm and even to do environmentally beneficial activities. This book reveals that some military forces have nonetheless struggled to deal with these critical issues. Creating air bases and then later vacating them after intensive use has caused harm, as has the failure in airpower’s first seventy years to create aircraft than can be repurposed or deconstructed with minimal environmental harm. The book argues that, during both peace and war, air forces have far greater carbon footprints than armies and navies. They use potentially more harmful ordnance. Their targets traditionally include objects in or around population centers and the aquifers, waterways, soils, and food sources that sustain human life. Also, because of historic targeting trends that will continue for some years, air forces cause far worse harm to environmentally significant production, storage, and distribution infrastructure, much of it based on petroleum, oil, lubricants, or chemicals. Reviews In 2013, the American Library Association selected this book as one of that year’s "Notable Government Documents", an annual award list designed to "recognize excellence and raise awareness of information resources produced by all levels of government and promote their use". The Gulf Today newspaper called it "innovative" and a "ground-breaking book highlighting the environmental impact of the world’s air forces.” References 2013 non-fiction books Aviation books Aerial warfare strategy Books about military history Military strategy books English non-fiction books Books by Joel Hayward
```assembly page ,132 title strcat - concatenate (append) one string to another ;*** ;strcat.asm - contains strcat() and strcpy() routines ; ; ;Purpose: ; STRCAT concatenates (appends) a copy of the source string to the ; end of the destination string, returning the destination string. ; ;******************************************************************************* .xlist include cruntime.inc .list page ;*** ;char *strcat(dst, src) - concatenate (append) one string to another ; ;Purpose: ; Concatenates src onto the end of dest. Assumes enough ; space in dest. ; ; Algorithm: ; char * strcat (char * dst, char * src) ; { ; char * cp = dst; ; ; while( *cp ) ; ++cp; /* Find end of dst */ ; while( *cp++ = *src++ ) ; ; /* Copy src to end of dst */ ; return( dst ); ; } ; ;Entry: ; char *dst - string to which "src" is to be appended ; const char *src - string to be appended to the end of "dst" ; ;Exit: ; The address of "dst" in EAX ; ;Uses: ; EAX, ECX ; ;Exceptions: ; ;******************************************************************************* page ;*** ;char *strcpy(dst, src) - copy one string over another ; ;Purpose: ; Copies the string src into the spot specified by ; dest; assumes enough room. ; ; Algorithm: ; char * strcpy (char * dst, char * src) ; { ; char * cp = dst; ; ; while( *cp++ = *src++ ) ; ; /* Copy src over dst */ ; return( dst ); ; } ; ;Entry: ; char * dst - string over which "src" is to be copied ; const char * src - string to be copied over "dst" ; ;Exit: ; The address of "dst" in EAX ; ;Uses: ; EAX, ECX ; ;Exceptions: ;******************************************************************************* CODESEG % public strcat, strcpy ; make both functions available strcpy proc \ dst:ptr byte, \ src:ptr byte OPTION PROLOGUE:NONE, EPILOGUE:NONE push edi ; preserve edi mov edi,[esp+8] ; edi points to dest string jmp short copy_start strcpy endp align 16 strcat proc \ dst:ptr byte, \ src:ptr byte OPTION PROLOGUE:NONE, EPILOGUE:NONE .FPO ( 0, 2, 0, 0, 0, 0 ) mov ecx,[esp+4] ; ecx -> dest string push edi ; preserve edi test ecx,3 ; test if string is aligned on 32 bits je short find_end_of_dest_string_loop dest_misaligned: ; simple byte loop until string is aligned mov al,byte ptr [ecx] add ecx,1 test al,al je short start_byte_3 test ecx,3 jne short dest_misaligned align 4 find_end_of_dest_string_loop: mov eax,dword ptr [ecx] ; read 4 bytes mov edx,7efefeffh add edx,eax xor eax,-1 xor eax,edx add ecx,4 test eax,81010100h je short find_end_of_dest_string_loop ; found zero byte in the loop mov eax,[ecx - 4] test al,al ; is it byte 0 je short start_byte_0 test ah,ah ; is it byte 1 je short start_byte_1 test eax,00ff0000h ; is it byte 2 je short start_byte_2 test eax,0ff000000h ; is it byte 3 je short start_byte_3 jmp short find_end_of_dest_string_loop ; taken if bits 24-30 are clear and bit ; 31 is set start_byte_3: lea edi,[ecx - 1] jmp short copy_start start_byte_2: lea edi,[ecx - 2] jmp short copy_start start_byte_1: lea edi,[ecx - 3] jmp short copy_start start_byte_0: lea edi,[ecx - 4] ; jmp short copy_start ; edi points to the end of dest string. copy_start:: mov ecx,[esp+0ch] ; ecx -> sorc string test ecx,3 ; test if string is aligned on 32 bits je short main_loop_entrance src_misaligned: ; simple byte loop until string is aligned mov dl,byte ptr [ecx] add ecx,1 test dl,dl je short byte_0 mov [edi],dl add edi,1 test ecx,3 jne short src_misaligned jmp short main_loop_entrance main_loop: ; edx contains first dword of sorc string mov [edi],edx ; store one more dword add edi,4 ; kick dest pointer main_loop_entrance: mov edx,7efefeffh mov eax,dword ptr [ecx] ; read 4 bytes add edx,eax xor eax,-1 xor eax,edx mov edx,[ecx] ; it's in cache now add ecx,4 ; kick dest pointer test eax,81010100h je short main_loop ; found zero byte in the loop ; main_loop_end: test dl,dl ; is it byte 0 je short byte_0 test dh,dh ; is it byte 1 je short byte_1 test edx,00ff0000h ; is it byte 2 je short byte_2 test edx,0ff000000h ; is it byte 3 je short byte_3 jmp short main_loop ; taken if bits 24-30 are clear and bit ; 31 is set byte_3: mov [edi],edx mov eax,[esp+8] ; return in eax pointer to dest string pop edi ret byte_2: mov [edi],dx mov eax,[esp+8] ; return in eax pointer to dest string mov byte ptr [edi+2],0 pop edi ret byte_1: mov [edi],dx mov eax,[esp+8] ; return in eax pointer to dest string pop edi ret byte_0: mov [edi],dl mov eax,[esp+8] ; return in eax pointer to dest string pop edi ret strcat endp end ```
The map data is for year 2012 from the World Bank. Numbers are in kWh per year. Table The table uses 2012 data from the World Bank. Numbers are in kWh per year. See also Plotted maps European countries by employment in agriculture (% of employed) European countries by fossil fuel use (% of total energy) European countries by health expense per person European countries by military expenditure as a percentage of government expenditure European countries by percent of population aged 0-14 European countries by percentage of urban population European countries by percentage of women in national parliaments List of sovereign states in Europe by life expectancy List of sovereign states in Europe by number of Internet users References External links Electric power in Europe Electricity economics Lists of countries by per capita values
```javascript /* For licensing, see LICENSE.md or path_to_url */ CKEDITOR.dialog.add("hiddenfield",function(d){return{title:d.lang.forms.hidden.title,hiddenField:null,minWidth:350,minHeight:110,onShow:function(){delete this.hiddenField;var a=this.getParentEditor(),b=a.getSelection(),c=b.getSelectedElement();c&&c.data("cke-real-element-type")&&"hiddenfield"==c.data("cke-real-element-type")&&(this.hiddenField=c,c=a.restoreRealElement(this.hiddenField),this.setupContent(c),b.selectElement(this.hiddenField))},onOk:function(){var a=this.getValueOf("info","_cke_saved_name"), b=this.getParentEditor(),a=CKEDITOR.env.ie&&8>CKEDITOR.document.$.documentMode?b.document.createElement('\x3cinput name\x3d"'+CKEDITOR.tools.htmlEncode(a)+'"\x3e'):b.document.createElement("input");a.setAttribute("type","hidden");this.commitContent(a);a=b.createFakeElement(a,"cke_hidden","hiddenfield");this.hiddenField?(a.replace(this.hiddenField),b.getSelection().selectElement(a)):b.insertElement(a);return!0},contents:[{id:"info",label:d.lang.forms.hidden.title,title:d.lang.forms.hidden.title,elements:[{id:"_cke_saved_name", type:"text",label:d.lang.forms.hidden.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){this.getValue()?a.setAttribute("name",this.getValue()):a.removeAttribute("name")}},{id:"value",type:"text",label:d.lang.forms.hidden.value,"default":"",accessKey:"V",setup:function(a){this.setValue(a.getAttribute("value")||"")},commit:function(a){this.getValue()?a.setAttribute("value",this.getValue()):a.removeAttribute("value")}}]}]}}); ```
```python # # # path_to_url # # Unless required by applicable law or agreed to in writing, software # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # ============================================================================== """A module containing TensorFlow ops whose API may change in the future.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function # TODO(ptucker): Add these to tf.contrib.variables? # pylint: disable=wildcard-import from tensorflow.contrib.framework.python.ops.arg_scope import * from tensorflow.contrib.framework.python.ops.ops import * from tensorflow.contrib.framework.python.ops.prettyprint_ops import * from tensorflow.contrib.framework.python.ops.variables import * # pylint: enable=wildcard-import ```
John Dromo (July 7, 1916 - September 29, 1992) was an American basketball coach. He served as the head basketball coach at the University of Louisville from 1967 to 1971. From 1942 to 1947, Dromo served as coach of "nearly everything" at St. Xavier High School in Cincinnati, Ohio. In 1948, Dromo joined the staff at Louisville as an assistant coach for both football and basketball. For 17 years, he served under Bernard Hickman. Upon Hickman's retirement, Dromo assumed the position of head coach. During his four-year tenure, he achieved a 68–23 record. During the 1970–71 season, he suffered a heart attack and subsequently retired; he was succeeded by Denny Crum. Dromo died in 1992. References 1916 births 1992 deaths American men's basketball coaches Louisville Cardinals football coaches Louisville Cardinals men's basketball coaches St. Xavier High School (Ohio) people
```c++ This program is free software; you can redistribute it and/or modify the Free Software Foundation This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ void CRenderer::DrawBrushPolygonVerticesAndEdges(CBrushPolygon &bpo) { // get transformed polygon's plane CWorkingPlane &wplPolygonPlane = *bpo.bpo_pbplPlane->bpl_pwplWorking; CBrushSector &bsc = *bpo.bpo_pbscSector; CBrushMip *pbm = bsc.bsc_pbmBrushMip; CBrush3D &br = *pbm->bm_pbrBrush; INDEX iMinVx = bsc.bsc_ivvx0; INDEX iMaxVx = bsc.bsc_ivvx0+bsc.bsc_awvxVertices.Count(); // set line type and color for edges and vertices ULONG ulEdgesLineType = EdgeLineType(wplPolygonPlane.wpl_bVisible); COLOR colorEdges = ColorForEdges(bpo.bpo_colColor, bpo.bpo_pbscSector->bsc_colColor); COLOR colorVertices = ColorForVertices(bpo.bpo_colColor, bpo.bpo_pbscSector->bsc_colColor); if (bpo.IsSelected(BPOF_SELECTED)) { // for all edges in the polygon INDEX cttri = bpo.bpo_aiTriangleElements.Count()/3; for(INDEX itri=0; itri<cttri; itri++) { for(INDEX ied=0; ied<3; ied++) { // get transformed end vertices INDEX ielem0 = bpo.bpo_aiTriangleElements[itri*3+ied]; INDEX ielem1 = bpo.bpo_aiTriangleElements[itri*3+(ied+1)%3]; CBrushVertex &bvx0 = *bpo.bpo_apbvxTriangleVertices[ielem0]; CBrushVertex &bvx1 = *bpo.bpo_apbvxTriangleVertices[ielem1]; INDEX ivx0 = bsc.bsc_abvxVertices.Index(&bvx0); INDEX ivx1 = bsc.bsc_abvxVertices.Index(&bvx1); FLOAT3D &tv0 = re_avvxViewVertices[bsc.bsc_ivvx0+ivx0].vvx_vView; FLOAT3D &tv1 = re_avvxViewVertices[bsc.bsc_ivvx0+ivx1].vvx_vView; // clip the edge line FLOAT3D vClipped0 = tv0; FLOAT3D vClipped1 = tv1; ULONG ulClipFlags = br.br_prProjection->ClipLine(vClipped0, vClipped1); // if the edge remains after clipping to front plane if (ulClipFlags != LCF_EDGEREMOVED) { // project the vertices FLOAT3D v3d0, v3d1; br.br_prProjection->PostClip(vClipped0, v3d0); br.br_prProjection->PostClip(vClipped1, v3d1); // make 2d vertices FLOAT fI0 = v3d0(1); FLOAT fJ0 = v3d0(2); FLOAT fI1 = v3d1(1); FLOAT fJ1 = v3d1(2); // if the edge is too short if( Abs(fI1-fI0)<2 && fabs(fJ1-fJ0)<2) { // skip it continue; } // draw line between vertices re_pdpDrawPort->DrawLine((PIX)fI0, (PIX)fJ0, (PIX)fI1, (PIX)fJ1, colorEdges|CT_OPAQUE, ulEdgesLineType); } }} } FOREACHINSTATICARRAY(bpo.bpo_abpePolygonEdges, CBrushPolygonEdge, itpe) { // get transformed end vertices CBrushVertex &bvx0 = *itpe->bpe_pbedEdge->bed_pbvxVertex0; CBrushVertex &bvx1 = *itpe->bpe_pbedEdge->bed_pbvxVertex1; INDEX ivx0 = bsc.bsc_abvxVertices.Index(&bvx0); INDEX ivx1 = bsc.bsc_abvxVertices.Index(&bvx1); FLOAT3D &tv0 = re_avvxViewVertices[bsc.bsc_ivvx0+ivx0].vvx_vView; FLOAT3D &tv1 = re_avvxViewVertices[bsc.bsc_ivvx0+ivx1].vvx_vView; // clip the edge line FLOAT3D vClipped0 = tv0; FLOAT3D vClipped1 = tv1; ULONG ulClipFlags = br.br_prProjection->ClipLine(vClipped0, vClipped1); // if the edge remains after clipping to front plane if (ulClipFlags != LCF_EDGEREMOVED) { // project the vertices FLOAT3D v3d0, v3d1; br.br_prProjection->PostClip(vClipped0, v3d0); br.br_prProjection->PostClip(vClipped1, v3d1); // make 2d vertices FLOAT fI0 = v3d0(1); FLOAT fJ0 = v3d0(2); FLOAT fI1 = v3d1(1); FLOAT fJ1 = v3d1(2); // if the edge is too short if( Abs(fI1-fI0)<2 && fabs(fJ1-fJ0)<2) { // skip it continue; } BOOL bDrawVertex0 = ulClipFlags&LCFVERTEX0(LCF_UNCLIPPED) && !(bvx0.bvx_ulFlags&BVXF_DRAWNINWIREFRAME); BOOL bDrawVertex1 = ulClipFlags&LCFVERTEX1(LCF_UNCLIPPED) && !(bvx1.bvx_ulFlags&BVXF_DRAWNINWIREFRAME); // if edges should be drawn if (_wrpWorldRenderPrefs.wrp_ftEdges != CWorldRenderPrefs::FT_NONE) { // draw line between vertices re_pdpDrawPort->DrawLine((PIX)fI0, (PIX)fJ0, (PIX)fI1, (PIX)fJ1, colorEdges|CT_OPAQUE, ulEdgesLineType); #if 0 // used for debugging edge directions DrawArrow(*re_pdpDrawPort, (PIX)fI0, (PIX)fJ0, (PIX)fI1, (PIX)fJ1, colorEdges|CT_OPAQUE, ulEdgesLineType); #endif } extern void SelectVertexOnRender(CBrushVertex &bvx, const PIX2D &vpix); if (_wrpWorldRenderPrefs.wrp_stSelection== CWorldRenderPrefs::ST_VERTICES) { // draw them if (bDrawVertex0) { SelectVertexOnRender(bvx0, PIX2D((PIX)fI0, (PIX)fJ0)); if (bvx0.bvx_ulFlags&BVXF_SELECTED) { PutMoreFatPixel(*re_pdpDrawPort, (PIX)fI0, (PIX)fJ0, C_BLACK|CT_OPAQUE); } bvx0.bvx_ulFlags|=BVXF_DRAWNINWIREFRAME; } if (bDrawVertex1) { SelectVertexOnRender(bvx1, PIX2D((PIX)fI1, (PIX)fJ1)); if (bvx1.bvx_ulFlags&BVXF_SELECTED) { PutMoreFatPixel(*re_pdpDrawPort, (PIX)fI1, (PIX)fJ1, C_BLACK|CT_OPAQUE); } bvx1.bvx_ulFlags|=BVXF_DRAWNINWIREFRAME; } } // if vertices should be drawn if (_wrpWorldRenderPrefs.wrp_ftVertices != CWorldRenderPrefs::FT_NONE) { // draw them if (bDrawVertex0) { PutFatPixel(*re_pdpDrawPort, (PIX)fI0, (PIX)fJ0, colorVertices); bvx0.bvx_ulFlags|=BVXF_DRAWNINWIREFRAME; } if (bDrawVertex1) { PutFatPixel(*re_pdpDrawPort, (PIX)fI1, (PIX)fJ1, colorVertices); bvx1.bvx_ulFlags|=BVXF_DRAWNINWIREFRAME; } } } } } /* * Draw vertices and/or edges of a brush */ void CRenderer::DrawBrushSectorVerticesAndEdges(CBrushSector &bscSector) { CBrushMip *pbm = bscSector.bsc_pbmBrushMip; CBrush3D &br = *pbm->bm_pbrBrush; // clear all vertex drawn flags FOREACHINSTATICARRAY(bscSector.bsc_abvxVertices, CBrushVertex, itbvx) { itbvx->bvx_ulFlags&=~BVXF_DRAWNINWIREFRAME; } // first render visible polygons FOREACHINSTATICARRAY(bscSector.bsc_abpoPolygons, CBrushPolygon, itpo) { CBrushPolygon &bpo = *itpo; CWorkingPlane &wplPolygonPlane = *bpo.bpo_pbplPlane->bpl_pwplWorking; if (wplPolygonPlane.wpl_bVisible) { DrawBrushPolygonVerticesAndEdges(bpo); } } // if hidden edges should be drawn if (_wrpWorldRenderPrefs.wrp_bHiddenLinesOn) { // render invisible polygons FOREACHINSTATICARRAY(bscSector.bsc_abpoPolygons, CBrushPolygon, itpo) { CBrushPolygon &bpo = *itpo; CWorkingPlane &wplPolygonPlane = *bpo.bpo_pbplPlane->bpl_pwplWorking; if (!wplPolygonPlane.wpl_bVisible) { DrawBrushPolygonVerticesAndEdges(bpo); } } } } /* Draw edges of a field brush sector. */ void CRenderer::DrawFieldBrushSectorEdges(CBrushSector &bscSector) { CBrushMip *pbm = bscSector.bsc_pbmBrushMip; CBrush3D &br = *pbm->bm_pbrBrush; // for all polygons in sector FOREACHINSTATICARRAY(bscSector.bsc_abpoPolygons, CBrushPolygon, itpo) { CBrushPolygon &bpo = *itpo; // get transformed polygon's plane CWorkingPlane &wplPolygonPlane = *bpo.bpo_pbplPlane->bpl_pwplWorking; // set line type and color for edges and vertices ULONG ulEdgesLineType = EdgeLineType(wplPolygonPlane.wpl_bVisible); COLOR colorEdges = _wrpWorldRenderPrefs.wrp_colEdges; // for all edges in the polygon FOREACHINSTATICARRAY(itpo->bpo_abpePolygonEdges, CBrushPolygonEdge, itpe) { // get transformed end vertices INDEX ivx0 = bscSector.bsc_abvxVertices.Index(itpe->bpe_pbedEdge->bed_pbvxVertex0); INDEX ivx1 = bscSector.bsc_abvxVertices.Index(itpe->bpe_pbedEdge->bed_pbvxVertex1); FLOAT3D &tv0 = re_avvxViewVertices[bscSector.bsc_ivvx0+ivx0].vvx_vView; FLOAT3D &tv1 = re_avvxViewVertices[bscSector.bsc_ivvx0+ivx1].vvx_vView; // clip the edge line FLOAT3D vClipped0 = tv0; FLOAT3D vClipped1 = tv1; ULONG ulClipFlags = br.br_prProjection->ClipLine(vClipped0, vClipped1); // if the edge remains after clipping to front plane if (ulClipFlags != LCF_EDGEREMOVED) { // project the vertices FLOAT3D v3d0, v3d1; br.br_prProjection->PostClip(vClipped0, v3d0); br.br_prProjection->PostClip(vClipped1, v3d1); // make 2d vertices FLOAT2D v2d0, v2d1; v2d0(1) = v3d0(1); v2d0(2) = v3d0(2); v2d1(1) = v3d1(1); v2d1(2) = v3d1(2); re_pdpDrawPort->DrawLine((PIX)v2d0(1), (PIX)v2d0(2), (PIX)v2d1(1), (PIX)v2d1(2), colorEdges|CT_OPAQUE, ulEdgesLineType); } } } } /* Prepare a brush entity for rendering if it is not yet prepared. */ void CRenderer::PrepareBrush(CEntity *penBrush) { _pfRenderProfile.StartTimer(CRenderProfile::PTI_PREPAREBRUSH); ASSERT(penBrush!=NULL); // get its brush CBrush3D &brBrush = *penBrush->en_pbrBrush; // if the brush is already active in rendering if (brBrush.br_lnInActiveBrushes.IsLinked()) { // skip it _pfRenderProfile.StopTimer(CRenderProfile::PTI_PREPAREBRUSH); return; } brBrush.br_ulFlags&=~BRF_DRAWFIRSTMIP; // if it has zero sectors and rendering of editor models is enabled if (brBrush.GetFirstMip()->bm_abscSectors.Count()==0 && _wrpWorldRenderPrefs.IsEditorModelsOn() && wld_bRenderEmptyBrushes) { // add it for delayed rendering as a model (will use empty brush model) AddModelEntity(penBrush); } // add it to list of active brushes re_lhActiveBrushes.AddTail(brBrush.br_lnInActiveBrushes); // add it to container of all drawn entities re_cenDrawn.Add(penBrush); // set up a projection for the brush if (re_bBackgroundEnabled && (penBrush->en_ulFlags & ENF_BACKGROUND)) { brBrush.br_prProjection = re_prBackgroundProjection; } else { brBrush.br_prProjection = re_prProjection; } // prepare the brush projection if (penBrush->en_ulPhysicsFlags&EPF_MOVABLE) { // for moving brushes brBrush.br_prProjection->ObjectPlacementL() = penBrush->GetLerpedPlacement(); brBrush.br_prProjection->ObjectStretchL() = FLOAT3D(1.0f, 1.0f, 1.0f); brBrush.br_prProjection->ObjectFaceForwardL() = FALSE; brBrush.br_prProjection->Prepare(); } else { // for static brushes CProjection3D &pr = *brBrush.br_prProjection; const FLOATmatrix3D &mRot = penBrush->en_mRotation; const FLOAT3D &vRot = penBrush->en_plPlacement.pl_PositionVector; // fixup projection to use placement of this brush pr.pr_mDirectionRotation = pr.pr_ViewerRotationMatrix*mRot; pr.pr_RotationMatrix = pr.pr_mDirectionRotation; brBrush.br_prProjection->ObjectPlacementL() = penBrush->en_plPlacement; pr.pr_TranslationVector = pr.pr_ObjectPlacement.pl_PositionVector - pr.pr_vViewerPosition; pr.pr_TranslationVector = pr.pr_TranslationVector*pr.pr_ViewerRotationMatrix; pr.pr_Prepared = TRUE; } // mark brush as selected if the entity is selected if (penBrush->IsSelected(ENF_SELECTED)) { brBrush.br_ulFlags |= BRF_DRAWSELECTED; } else { brBrush.br_ulFlags &= ~BRF_DRAWSELECTED; } _pfRenderProfile.StopTimer(CRenderProfile::PTI_PREPAREBRUSH); } /* * Render wireframe brushes. */ void CRenderer::RenderWireFrameBrushes(void) { BOOL bRenderNonField = _wrpWorldRenderPrefs. wrp_ftEdges != CWorldRenderPrefs::FT_NONE ||_wrpWorldRenderPrefs.wrp_ftVertices != CWorldRenderPrefs::FT_NONE ||_wrpWorldRenderPrefs.wrp_stSelection== CWorldRenderPrefs::ST_VERTICES; // for all active sectors {FORDELETELIST(CBrushSector, bsc_lnInActiveSectors, re_lhActiveSectors, itbsc) { CBrushSector &bsc = *itbsc; // if invisible if (bsc.bsc_ulFlags&BSCF_INVISIBLE) { // skip it continue; } // if it is field brush if (bsc.bsc_pbmBrushMip->bm_pbrBrush->br_pfsFieldSettings!=NULL) { // if fields should be drawn if (_wrpWorldRenderPrefs.IsFieldBrushesOn()) { // draw it (all brush sectors in the list are already prepared and transformed) DrawFieldBrushSectorEdges(bsc); } } else { if (bRenderNonField) { // draw it (all brush sectors in the list are already prepared and transformed) DrawBrushSectorVerticesAndEdges(bsc); } } }} } /* * Compare two polygons for sorting. */ static inline int CompareTranslucentPolygons( const CTranslucentPolygon &tp0, const CTranslucentPolygon &tp1) { if (tp0.tp_fViewerDistance<tp1.tp_fViewerDistance) return -1; else if (tp0.tp_fViewerDistance>tp1.tp_fViewerDistance) return +1; else return 0; } static int qsort_CompareTranslucentPolygons( const void *pptp0, const void *pptp1) { CTranslucentPolygon &tp0 = **(CTranslucentPolygon **)pptp0; CTranslucentPolygon &tp1 = **(CTranslucentPolygon **)pptp1; return +CompareTranslucentPolygons(tp0, tp1); } /* * Sort a list of translucent polygons. */ ScenePolygon *CRenderer::SortTranslucentPolygons(ScenePolygon *pspoFirst) { // if there are no polygons in list if (pspoFirst==NULL) { // do nothing return NULL; } // for each polygon in list for (ScenePolygon *pspo = pspoFirst; pspo!=NULL; pspo = pspo->spo_pspoSucc) { // add it to container for sorting CTranslucentPolygon &tp = re_atcTranslucentPolygons.Push(); tp.tp_pspoPolygon = pspo; tp.tp_fViewerDistance = ((CBrushPolygon*)pspo->spo_pvPolygon)->bpo_pbplPlane ->bpl_pwplWorking->wpl_plView.Distance(); } // sort the container qsort(re_atcTranslucentPolygons.GetArrayOfPointers(), re_atcTranslucentPolygons.Count(), sizeof(CTranslucentPolygon *), qsort_CompareTranslucentPolygons); // make empty new list of polygons ScenePolygon *pspoNewFirst = NULL; // for each polygon in container for(INDEX iPolygon=0; iPolygon<re_atcTranslucentPolygons.Count(); iPolygon++) { ScenePolygon *pspo = re_atcTranslucentPolygons[iPolygon].tp_pspoPolygon; // add it to new list pspo->spo_pspoSucc = pspoNewFirst; pspoNewFirst = pspo; } // clear containr for future use re_atcTranslucentPolygons.Clear(); // return new list return pspoNewFirst; } ```
The Country and Progressive National Party was a short-lived conservative political party in the Australian state of Queensland. Formed in 1925, it combined the state's conservative forces in a single party and held office between 1929 and 1932 under the leadership of Arthur Edward Moore. Following repeated election defeat it split into separate rural and urban wings in 1936. History It was created in 1925 as the result of a merger between the state's two conservative parties, the United Party (the Queensland branch of the Nationalist Party) and the Country Party, in an attempt to end a decade of Labor domination in the state. Initially called the Country Progressive Party it was formed in May 1925 by all of the Country MLAs and all but four United MLAs; the outstanding four joined in December when the party took the name Country and Progressive National Party. The party was led throughout the entirety of its existence by Arthur Edward Moore, previously the leader of the Country Party. In the 1929 state election the party won power, defeating Labor in a landslide. The election was further notable for the surprise victory of Irene Longman, a Country and Progressive National candidate and the first woman ever to be elected to the Queensland parliament. However, the government floundered amidst the difficulties of the Great Depression, and was swept from power in 1932 by the Labor Party, led by William Forgan Smith. It contested the 1935 state election, but was severely beaten, being reduced to sixteen seats, which left Labor with a massive majority. As a result, in 1936, the party again split, leaving two-state based parties - the Country Party and the United Australia Party, each aligned with the federal parties of the same names. From 1941-1944 another merger was attempted as the Country-National Organisation but this failed within a few years. A later merger between the two parties' successors, the Liberal and National parties, gave birth to the Liberal National Party of Queensland in 2008. Election results See also Liberal National Party References Defunct political parties in Queensland Political parties established in 1925 Political parties disestablished in 1936 1925 establishments in Australia 1936 disestablishments in Australia
Harbour Buffett was a Way Office established in 1854. The first Waymaster was Thomas E. Collett. It was changed to a Post Office on May 30, 1891. It was only served by the Canadian National Railway in 1953. Harbour Buffett was established in 1836. It was a small place with ten families in the St. Mary's area by 1864. The Way Station became a Post Office in 1891. Harbour Buffett, located on the southeastern side of Long Island in inner Placentia Bay, has a deep, sheltered harbour. It recorded a population of 266 (down from the previous census figure of 285) in 1966, shortly before suffering abandonment, another victim of the controversial Resettlement program. Both Harbour Buffett itself and it's smaller sub-settlement Northeast Arm Harbour Buffett were evacuated, along with the smaller still population at Whiffin's Cove, leaving the harbour empty. Reunions in summer are frequent, as at Merasheen on the island of the same name. See also List of communities in Newfoundland and Labrador References on main article page. Ghost towns in Newfoundland and Labrador
Domenico Bruni (c. 1600–1666) was an Italian painter of the Baroque period, mainly active in Brescia. He trained with Tommaso Sandrino. He helped decorate the chorus of the church of the Carmini in Brescia in 1634. References 1600s births 1666 deaths 17th-century Italian painters Italian male painters Painters from Brescia Italian Baroque painters Quadratura painters
Judy Mann (December 24, 1943 in Washington, D.C. – July 8, 2005) was a correspondent for The Washington Post where she wrote about women, children, and the politics of the women's movement. Biography Mann spent her childhood in Paris and was able to speak fluent French before returning to the US to go to high school. She graduated from Washington-Lee High School in Arlington. While still in high school, Mann worked for the Northern Virginia Sun where she was an assistant teen editor. Mann later obtained her degree from Barnard College. During her time here, she joined a group of students who traveled to Cuba, disobeying federal law of the United States. In 1966, Mann worked as a sales representative for Avon products. From 1968 to 1972, she worked as a reporter and editor for the Washington Daily News. Mann was known for her liberal and feminist outlook and writings. She truly wanted to expand women's rights, which is why she put so much passion into her writing on this subject. She began working for The Post in 1972 as a city reporter and worked there for almost 30 years. She eventually worked her way up to becoming day city editor and finally a columnist in 1978. Mann was married three times, the first two ending in divorce. Her first husband was Phillip Abbott Luce, with whom she had a son named Devin Mann. Her second husband was Jack Mann, with whom she had two children: Jeffery Mann and Katherine Mann. Her third husband was Richard Starnes, whom she married fifteen years prior to her death. She died from breast cancer at the age of 61 at Desert Regional Medical Center in Palm Springs, California. Awards Mann won many awards for her work on women's rights, population control, and child welfare from institutions including: Washington-Baltimore Newspaper Guild National Women's Political Caucus the National Abortion Rights Action League American Association of University Women. American University gave her its Myra Sadker Equity Award; Planned Parenthood gave her the Margaret Sanger Award; and the Population Institute gave her its Global Media Award. Books Mann for All Seasons, 1990, Mastermedia Publishing Company, The Difference: Growing Up Female in America, 1994, Warner Books, References External links Boston Globe Obituary 1943 births 2005 deaths Deaths from breast cancer 20th-century American women journalists 20th-century American journalists Barnard College alumni 21st-century American women
```java /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * * Subject to the condition set forth below, permission is hereby granted to any * person obtaining a copy of this software, associated documentation and/or * data (collectively the "Software"), free of charge and under any and all * copyright rights in the Software, and any and all patent rights owned or * freely licensable by each licensor hereunder covering either (i) the * unmodified Software as contributed to or provided by such licensor, or (ii) * the Larger Works (as defined below), to deal in both * * (a) the Software, and * * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if * one is included with the Software each a "Larger Work" to which the Software * is contributed by such licensors), * * without restriction, including without limitation the rights to copy, create * derivative works of, display, perform, and distribute the Software and make, * use, sell, offer for sale, import, export, have made, and have sold the * Software and the Larger Work(s), and to sublicense the foregoing rights on * either these or other terms. * * This license is subject to the following condition: * * The above copyright notice and either this complete permission notice or at a * minimum a reference to the UPL must be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /** * The GraalVM SDK package contains classes for GraalVM. * * @since 23.1 * @deprecated Do not use the sdk module. Use one of the newly split modules: nativeimage, polyglot, * collections or word instead. */ package org.graalvm.sdk; ```
Dialampsis is a genus of flies in the family Stratiomyidae. Distribution Papua New Guinea. Species Dialampsis argentata (Wulp, 1898) References Stratiomyidae Brachycera genera Taxa named by Kálmán Kertész Diptera of Australasia Endemic fauna of Papua New Guinea
```python # -*- coding: utf-8 -*- from ._common import * class Kuwo(Extractor): name = 'KuWo ()' def prepare_mid(self): return match1(self.url, '/play_detail/(\d+)') def prepare(self): info = MediaInfo(self.name) install_cookie() if not self.is_list: resp = get_response('path_to_url kw_token = get_cookie('www.kuwo.cn', '/', 'kw_token').value params = { 'mid': self.mid, 'httpsStatus': 1, 'reqId': get_random_uuid() } data = get_response('path_to_url headers={'csrf': kw_token}, params=params).json() assert data.get('code') == 200, data['message'] data = data['data'] pay = data['isListenFee'] if pay: if self.is_list: # just skip pay when extract from list self.logger.warning('Skip pay song: %s', self.mid) return raise AssertionError('Pay song: %s' % self.mid) albumpic = data['albumpic'] album = data['album'] title = data['name'] info.title = album in title and title or '{title} - {album}'.format(**vars()) info.artist = data['artist'] info.album = data['album'] info.duration = data['duration'] info.add_comment(data['albuminfo']) params['type'] = 'music' data = get_response('path_to_url params=params).json() assert data.get('code') == 200, data['message'] url = data['data']['url'] info.streams['current'] = { 'container': 'mp3', 'profile': 'current', 'src': [(albumpic, url)] } return info def list_only(self): return 'playlist_detail' in self.url def prepare_list(self): install_cookie() html = get_content(self.url) return matchall(html, 'href="/play_detail/(\d+)"') site = Kuwo() ```
```handlebars <!doctype html> <html> <head> <title>Rocket Example - {{ title }}</title> </head> <body> {{> hbs/nav}} {{~> page}} {{> hbs/footer}} </body> </html> ```
In birds, sleep consists of "periods of eye closure interrupted by short periods of eye-opening." During the short periods of eye-opening, electroencephalographic (EEG) studies indicate that the birds are still sleeping; the voltage level in the brain is identical. Birds restore their arousal thresholds during sleep. During their short eye-open periods, sleeping birds can mobilize almost instantaneously when threatened by a predator. Avian species have been found to rely on flock size and height for predatory precautions. Between the eye-opening and group sleep, these precautions allow sleep to be beneficial and safe. The amount of sleep necessary to function can vary by species. Pectoral sandpipers migrate from the Southern Hemisphere to the Arctic Circle, their mating ground (where they breed during daylight. Since the sandpipers are polygamous, they mate (or search for a mate) for the duration of daylight. Males do not require as much sleep during this time; some have been observed to give up 95 percent of their sleep time during the nineteen mating days. Most act similarly to humans when sleep-deprived, getting them into potentially life-threatening situations or slowing their migration speed. Comparative anatomy of avian brain and nervous system The typical avian nervous system is similar to that of mammals. The central nervous system includes the brain and spinal cord, and a peripheral nervous system consists of nerves and sensory organs. Key attributes have evolved compared to other species, especially vision; avian visual capabilities are believed to be more advanced than any other group of vertebrates. In addition to larger eyes, birds have larger-than-average optic lobes. With a larger, more intricate optic lobe, some bird species can view the ultraviolet (UV) spectrum (beyond the visual range of the human eye). This UV visual capability facilitates hunting, as seen in nighthawks. UV-sensitive cone opsin is typically responsible for avian ability to see UV, but some species have circumvented this; owls can see UV light, but lack opsins. They compensate for this with essential enzymes which allow heightened rod sensitivity. UV is seen by several other animal groups, including cats and insects (where it has appeared to evolve in response to predator-prey relationships). Trade-offs in anatomy and physiology are common, and this is seen in the olfactory lobes of most avian species. Possibly due to the larger-than-average optic lobes, avian olfactory lobes are relatively small; few bird species use smell to find food. Falcons and eagles do not tend to have larger cerebellums for flying. According to comparative neuroanatomy researcher Ludwig Edinger, avian brains consist mostly of basal ganglia (responsible for instinctive behavior, rather than behavioral plasticity). Scientists have challenged some of Edinger's findings, and called for the renaming of avian nervous-system organs to reflect their similarity to those of mammals. REM and slow-wave sleep Avian sleep shares two similarities with that of mammals: rapid eye movement (REM) and slow-wave sleep (SWS). REM sleep is believed to have an important effect on motor functions and memory storage. EEGs show high-amplitude and low-frequency waves during REM sleep; SWS tends toward lower-amplitude, higher-frequency waves, and is believed to be a form of deep sleep. During SWS, membrane potentials in the neurons of the neocortex oscillate slowly. A number of avian species exhibit unihemispheric slow-wave sleep: the ability to rest one half of the brain in SWS, while the other half appears to be awake. This type of sleep has also been seen in dolphins and whales. The organism is typically able to keep one eye open during this process, which allows added vigilance in high-predation environments. The evolution of this trait in birds and aquatic mammals is of interest to researchers because of the pressures involved. Unihemispheric SWS is thought to have evolved in aquatic mammals because they must return to the surface for oxygen; it is believed to help birds avoid predation, demonstrating homoplasy in the two groups. Dove experiment In a study of how the Barbary dove's sleep patterns are affected by flock size, D. W. Lendrum intended to prove that larger flocks reduced overall vigilance, and the apparent increase in predation risk of a smaller flock would harm the doves' sleep cycle. At the beginning of the study, the doves were caged alone or in pairs of cages containing two, three or six. They were then placed in one of two environments. In the calm environment, Lendrum walked alone past the cage between 10 am and noon; in the aggressive environment, Lendrum walked past the cage with a domesticated ferret at the same time of day. Lendrum discovered that the birds in the calm environment spent substantially more time with their eyes closed than those in the aggressive environment. Lendrum collected data on the doves' opened- and closed-eye sleep; flocking was associated with an increase in a bird's overall eye-closure time and a decrease in its amount of eye-opening. In the presence of a predator, Lendrum found that the doves exhibited higher levels of individual vigilance and increase in open-eye sleep; this reduced the active-sleep component of their total sleep time. Perch height Predators are believed to play a large role in an organism's sleeping patterns. To adapt to predation, two common techniques have evolved: positioning oneself out of harm's way while sleeping, and sleeping more lightly (such as unihemispheric sleep). In birds, perch height is believed to play a significant role in sleep; lower perch height has been shown to reduce the number and length of REM sleep episodes in pigeons, and a higher perch increases REM sleep and decreases slow-wave sleep. Findings also suggest that the time spent awake by pigeons increases when nesting on lower perches. Lower perch height correlates to a higher risk of predation; REM sleep would place the pigeon in more danger, since it is a less reactive form of sleep. Light pollution Light is one of the more common threats to sufficient sleep for birds living in anthropogenic environments, known as "artificial light pollution at night" (ALAN). ALAN eliminates darkness, a necessity for rest. Disrupting the birds' light and dark cycles can impact circadian rhythms, eventually harming sleep patterns. Biologist Thomas Raap conducted a study which suggested that exposure to ALAN affected the sleep behavior of Eurasian blue tits (Cyanistes caeruleus). In this study, birds woke up earlier due to ALAN factors such as seasonal timekeeping. Because light usually indicates a day's passage to birds, exposure to light pollution disrupts their ability to measure the length of a day. Outside densely-populated areas, there is normally about a five-percent drop in sleep duration for blue-tit females during their nesting period. The researchers found a 50-percent reduction in the females' sleep duration during this period in urban centers, and suggested that the effects of ALAN were responsible. References Sleep Birds Bird behavior
Ricardo Wright Herrero (April 3, 1943 – March 14, 2013), better known by his stage name Subas Herrero, was a Filipino actor, comedian and singer. Early life Subas Herrero was born on April 3, 1943 as Ricardo Wright Herrero in the City of Greater Manila (now Manila). Career Herrero is best known for Champoy (1980–85), a Philippine gag show where he formed a Laurel and Hardy-like tandem with fellow Ateneo de Manila University alumnus and Filipino actor Noel Trinidad. Aside from television, Herrero also appeared in several films, which include Bakekang (1978), Karapatan ko ang pumatay... Kapitan Guti (1990), and Gao ya xian (1995). He played villain for several action stars like Fernando Poe, Jr., Ramon Revilla, Joseph Estrada and Rudy Fernandez in films and also co-starred in comedy films with Dolphy, Chiquito, Redford White and the trio of Tito, Vic and Joey. In 1986, Herrero and Trinidad went live on Philippine television to call for the Filipino public to join the crowds at EDSA calling for the ouster of then-Philippine President Ferdinand Marcos. After the revolution, Herrero recorded Handog ng Pilipino sa Mundo (The Gift of the Filipinos to the World) along with 14 other Filipino artists to celebrate the peaceful revolt. Herrero remained very active in showbusiness until he suffered from a stroke in 2000. Despite his subsequent state of health, he remained sporadically active and even took part in the EDSA Revolution of 2001, this time to call for the ouster of then-Philippine President Joseph Estrada and make a guest appearance in Bubble Gang'''s tribute to Champoy in 2003. Incidentally, Herrero previously appeared with Estrada in the films Erap Is My Guy (1973) and Diligin mo ng hamog ang uhaw na lupa'' (1975). Personal life Herrero was a practicing Roman Catholic. He was married to his wife Maripaz and had five children. Herrero moved to the United States in 2010. Death Herrero died in Rochester, New York on 14 March 2013 of heart failure caused by double pneumonia. He had used a wheelchair as a result of some mild strokes and other health issues caused by diabetes. Filmography Film Television References External links 1943 births 2013 deaths Ateneo de Manila University alumni Filipino male comedians Filipino expatriates in the United States Filipino male film actors Filipino male television actors Filipino Roman Catholics Filipino television personalities Deaths from pneumonia in New York (state) Male actors from Manila Comedians from Manila
```xml <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Library</OutputType> <TargetFramework>netcoreapp3.1</TargetFramework> <PackageId>Microsoft.Bot.Components.Samples.MemberUpdates</PackageId> <Description>This library implements .NET support for custom triggers for conversation member updates.</Description> <Summary>This library implements .NET support for custom triggers for conversation member updates. OnMembersAdded and OnMembersRemoved.</Summary> <ContentTargetFolders>content</ContentTargetFolders> <PackageTags>msbot-component;msbot-trigger</PackageTags> </PropertyGroup> <ItemGroup> <Content Include="**/*.schema" /> <Content Include="**/*.uischema" /> <None Include="exported/**/*.*" Pack="true" PackagePath="exported" /> <None Include="README.md" Condition="Exists('README.md')" Pack="true" PackagePath="" /> </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime" Version="4.13.1" /> </ItemGroup> </Project> ```
```javascript Function declarations vs function expressions Function constructor vs. function declaration vs. function expression Functions can be declared after use Anonymous functions Get query/url variables ```
USS Donald W. Wolf (APD-129) was a of the United States Navy, in service from 1945 to 1946. In 1965, she was transferred to the Republic of China Navy as ROCS Hua Shan (PF-33) and served until being struck and scrapped. Namesake Donald William Wolf was born on 7 February 1919 in Hart, Michigan. He enlisted in the United States Marine Corps on 5 December 1939. On 9 October 1942 Sergeant Wolf was killed in action during the Battle of Guadalcanal at the second battle of Matanikau River. He shared in the Presidential Unit Citation awarded the 1st Marine Division and was posthumously awarded the Navy Cross for leading his platoon in hand-to-hand combat against an overwhelming enemy attacking force. History Donald W. Wolf was laid down by the Defoe Shipbuilding Company in Bay City, Michigan as a with the hull number DE-713. A week before launching, on 17 July 1944, it was decided that Wolf would be completed as a Crosley-class fast transport, with the designation APD-129. She was launched on 22 July 1944, sponsored by Corporal B. S. Wolf, United States Marine Corps Women's Reserve, widow of Sergeant Wolf. She was commissioned on 14 April 1945, at the Todd-Johnson Dry Dock Company of New Orleans, Louisiana. U.S. Navy (1945–1946) After training at Guantanamo Bay, Cuba, and overhaul at Norfolk, Virginia, Donald W. Wolf arrived at San Diego, California, on 22 June 1945 for additional training. She embarked an Underwater Demolition Team, and sailed for the western Pacific on 16 August, touching at Pearl Harbor and Eniwetok, before arrival at Buckner Bay, Okinawa, on 4 September. The next day, she got underway to land men at Jinsen for the occupation of Korea, returning to Okinawa on 18 September. A week later, she sailed for the Chinese mainland, stopping at Tientsin, Chefoo, and Tsingtao before returning to Okinawa on 20 October. Donald W. Wolf sailed the next day for the United States, debarking her passengers at San Diego on 11 November. She was placed out of commission in reserve on 15 May 1946 and laid up in the Pacific Reserve Fleet. She never saw any action in World War II, and was in commission for a little over one year. Republic of China Navy (1965–?) Donald W. Wolf was transferred to the Republic of China on 3 April 1965 and served in the Republic of China Navy as ROCS Hua Shan (PF-33). The ship was eventually struck by the Republic of China Navy and broken up for scrap. References External links Crosley-class high speed transports Ships built in Bay City, Michigan 1944 ships World War II frigates and destroyer escorts of the United States World War II amphibious warfare vessels of the United States Crosley-class high speed transports of the Republic of China Navy
Nazira is a town and a municipal board in India. It may also refer to: Nazira (name), list of people with the name Nazira Assembly constituency, assembly constituency in Assam, India
Karl Ludwig Friedrich Becker (18 December 1820 – 20 December 1900) was a German history painter and president of the Berlin Academy. Biography Becker was born and died in Berlin. He was a pupil of August von Klöber, Peter von Cornelius, and Heinrich Maria von Hess, and afterwards studied a year in Paris, two years in Rome, and visited Venice. He first attained success with subjects of the Venetian Renaissance. Later in life, he made many visits to Venice to study paintings drawn from life in the 15th and 16th centuries. The chief characteristics of his manner are historical fidelity, skillfulness of technique, and richness of coloring. His works include “Belisarius as a Beggar” (1850), “Jeweler at a Venetian Senator's” (1855), “Visit of Sebastian del Piombo to Titian” (1861), “Doge in Council” (1864), “Charles V and Fugger” (1870), “Dürer in Venice” (1873), “Charles V Visiting Titian” (1873), “In the Picture Gallery” (1874), “Bianca Capello” (1874), “Scene from the Marriage of Figaro” (1874), “Emperor Maximilian Receiving the Venetian Embassy” (1877), and frescos for the Neues Museum in Berlin. Honours 1874 : Member of the Académie royale de Belgique. Gallery See also List of German painters References Attribution External links Works by Carl Ludwig Friedrich Becker, Artnet Carl Ludwig Friedrich Becker - Artworks, The Athenaeum German male painters 1820 births 1900 deaths 19th-century German painters 19th-century German male artists German history painters Academic staff of the Prussian Academy of Arts Members of the Royal Academy of Belgium
Karen Abgarovich Khachanov (; born 21 May 1996) is a Russian-Armenian professional tennis player. Khachanov has won five ATP Tour singles titles, including a Masters 1000 title at the 2018 Paris Masters, has claimed an Olympic silver medal at the 2020 Tokyo Olympics, and has reached two Major semifinals at the 2022 US Open and 2023 Australian Open. He has also won one doubles Masters 1000 title at the 2023 Madrid Open partnering Andrey Rublev. He achieved his career-high singles ranking of world No. 8 on 15 July 2019. Early life and background Khachanov started playing tennis at the age of three in kindergarten when his parents put him into the tennis group. His father Abgar, an Armenian from Yerevan, played volleyball before studying medicine, while his mother, Nataliya, a Russian, also studied medicine. Khachanov's maternal grandfather was also half Armenian. Despite having been born in Russia, Khachanov tweeted: "I always say that I have Armenian roots." He has a sister and a brother. His idols growing up were Marat Safin and Juan Martín del Potro, and favourite sports teams are Real Madrid and the Miami Heat. He decided to become a professional player at 12. After Khachanov turned 15, he moved to Split, Croatia, where he trained under Vedran Martić, Goran Ivanišević's former coach. Later, he moved to Barcelona and was coached by Galo Blanco. Junior career Khachanov won the Under-18 European Championship title in Switzerland in July 2013. Together with Andrey Rublev he won a silver medal in doubles at the 2014 Summer Youth Olympics. They lost in the final to Brazilian players Orlando Luz and Marcelo Zormann. Professional career 2013–15: Davis Cup debut, first Future & Challenger titles Still as under 18, Khachanov made his ITF Circuit debut at the $15K event in Russia, losing his first match against compatriot Alexey Vatutin. In September of the following year, he got a wildcard for his first ATP Tour participation at the St. Petersburg Open. There he recorded his first win by defeating Victor Hănescu in the first round. He then faced Lukáš Rosol, but lost in straight sets. A month later he got another wildcard, for the Kremlin Cup. Things got even better there, as he defeated Albert Ramos Vinolas and top 30 Janko Tipsarević. In the next round he lost to Ivo Karlović. The following week he made his debut for Russia at the Davis Cup, and at age 17 years and 157 days he became the youngest Russian tennis player in the pro series, surpassing Mikhail Youzhny. There, he defeated Dean O'Brien of South Africa to help Russia advance in the 2013 Davis Cup Europe/Africa Zone Group I. He finished the season by playing at the two Challengers, reaching the quarterfinal in Geneva and then the first round in Helsinki. After a slow start at the Chennai Open and two lower-ITF tournaments, Khachanov then played at the Davis Cup. He lost to Jerzy Janowicz of Poland in the first round of the 2014 Davis Cup Europe/Africa Zone Group I. He then continued with no success at one ITF event and Challenger events in Kazakhstan. However, he then made his Masters debut, after receiving a wildcard entry to the 2014 Miami Open, but lost in the first round to Daniel Gimeno Traver. In August, he achieved his first significant result, winning his first ITF title at the $15K event in Kaohsiung. Two weeks later, he won another ITF title at the $15K event in Mulhouse. For the second year in a row, he got a wildcard for the Kremlin Cup, but again lost in the first round. Despite playing at a few ATP Tour events in previous years, in 2015 Khachanov played mostly at ITF and Challenger tournaments. In the first half of the year, he won two $10K/15K events in France, both in March. In April he reached the semifinal and won the title at the $15K events in Uzbekistan. After that at the Challengers, in June, he advanced to the quarterfinal in Fergana and then the semifinal in Marburg. His next step was Wimbledon, in his first Grand Slam qualification appearance. He lost in the first round of qualifications. Later, at the US Open, he also failed to qualify for the main draw, this time losing in the second round of qualifications. In mid-July, he faced Pablo Andújar in the second round of the 2015 Davis Cup Europe/Africa Zone Group I. He lost that match in three sets. In September, Khachanov won his first ATP Challenger Tour title in Istanbul, where he was unseeded. In the final he defeated top seed Sergiy Stakhovsky. He followed up this performance and finished the year with four consecutive Challenger quarterfinals, in Mons, Rennes, Brest and Mouilleron-le-Captif. 2016: First ATP title, Major debut Khachanov had a slow start in 2016 with only a first round at the Chennai Open and the final stage of Australian Open qualifications, as well as failing to reach the main draw at Open Sud de France and Open 13. His following matches were on the Challenger Tour, making it to the quarterfinal in Cherbourg and later the final of Jönköping and the quarterfinal in Kazan. He then entered the qualifications for Monte Carlo as his first clay Masters 1000 appearance. He lost to Taro Daniel in the first round. The following week he qualified for the Barcelona Open, beating Ramkumar Ramanathan and Marco Trungelliti. In his first-round match he came back from a set down to beat Aljaž Bedene. In the second round he beat fifth seed Roberto Bautista Agut, also in three sets. He eventually lost in the third round to the eleventh seed Alexandr Dolgopolov. After that he played at the Istanbul Open as a wildcard player. In his first match, he beat Aljaž Bedene for the second time in the month. In the following round, he lost to Albert Ramos Vinolas, despite winning the first set. He then at Challengers reached the quarterfinal in Qarshi and won the title in Samarkand the following week. Playing in the qualification of the French Open, Khachanov completed his appearances at all four Grand Slams, but with no qualifications into the main draw. Two Challenger semifinals in Prostějov and Moscow followed, as well as another loss in the qualifications of Wimbledon. In July, at the Kitzbühel Open, he defeated Filippo Volandri and Philipp Kohlscreiber to reach his first ATP Tour quarterfinal since the 2013 Kremlin Cup, before losing to Dušan Lajović. At the US Open, he made his main draw debut after passing the qualifications. In the first round he recorded his first Grand Slam win, over Thomas Fabbiano, but lost in the second round to Kei Nishikori. After that, he lost in the first round of the St. Petersburg Open to Alexander Zverev. However, he progressed further the following week at the 2016 Chengdu Open. He defeated João Sousa, Adrian Mannarino, Feliciano López and Victor Troicki to reach his first ATP Tour final. By reaching an ATP singles final, Khachanov became the first Russian in an ATP Tour final since Mikhail Youzhny, who beat David Ferrer in the final at the 2013 Valencia Open 500. Khachanov won his first ATP tournament there, beating Albert Ramos Viñolas in three sets. He finished the year with his first ATP 500 quarterfinal run at the Vienna Open, where he recorded wins over Andreas Seppi and Nikoloz Basilashvili, before Ivo Karlović defeated him. 2017: First top 10 win, first Major fourth round Thanks to big progress in the past, he was now able to avoid qualifications. He started the year with a win at the Qatar Open, but then lost to Ivo Karlović in two tie breaks. He performed no better at the following Auckland Open, losing in the first round to Yen-Hsun Lu. He then made his main-draw debut at the Australian Open. His first opponent was Adrian Mannarino, whom Khachanov defeated in four sets. Against Jack Sock in the following round, he attempted to reach his first Grand Slam third round, but without success. His next step was participating at the Davis Cup against Serbia in the World Group. He lost his match against Viktor Troicki in five sets. Losses then continued for the next four tournaments: Open Sud de France, Rotterdam Open, Open 13 and Dubai Championships. At the Indian Wells, he passed the first round after defeating Tommy Robredo. In the following round, he lost to David Goffin. In late April, he reached his first quarterfinal of the year, at the ATP 500 Barcelona. There he defeated Thomaz Bellucci, Pablo Cuevas and top 10 David Goffin before losing to Horacio Zeballos. A month later he advanced to another quarterfinal, at the Lyon Open. He followed up this win with another great performance at the French Open. Wins over Nicolas Jarry and top 30 players, Tomáš Berdych and John Isner, brought him to the fourth round at a Grand Slam for the first time in his career. He failed to reach his first Grand Slam quarterfinal, losing to Andy Murray. He continued with good performances, reaching the semifinal of the Halle Open. There he achieved his first win on grass over Gilles Simon, and then recorded his second career top 10 win, after defeating Kei Nishikori. He lost to Roger Federer and failed to reach the final. This result ensured him a first Grand Slam seed place at the following Grand Slam at Wimbledon. There, he also had another great result, reaching his first third round, after wins over Andrey Kuznetsov and Thiago Monteiro. He then lost to Rafael Nadal. His successful journey then continued with two consecutive quarterfinals at the Båstad Open and the Hamburg Open. However, he then started to struggle with form. He was eliminated in the first round at both the Canadian Open and the US Open, but reached the third round of the Cincinnati Open. In September he played in the Davis Cup for the second time in a year. He played against Hungarian players, winning against Attila Balázs and losing to Márton Fucsovics. He then went to China, reaching the second round of the Chengdu Open and the China Open and losing in the first round of the Shanghai Masters. He then returned to Europe, but still with no success, with only first rounds of the Vienna Open and the Paris Mastes. He finished the year with his debut at the Next Gen ATP Finals. He overcame Jared Donaldson, but lost to Daniil Medvedev and Borna Ćorić, so failed to pass the round robin group. 2018: First Masters 1000 title Khachanov started the year at the Auckland Open, reaching the quarterfinal after wins over Yūichi Sugita and Pablo Cuevas, but then lost to Juan Martín del Potro. Next, he participated in the Australian Open, where he lost to del Potro in the second round. In February he first reached the quarterfinal of Open Sud de France, followed up with only a first round at the Rotterdam Open, but then he won his second ATP title at Open 13 in Marseille, France. In the semifinal he defeated former top 10 player Tomáš Berdych to reach final. To get the title, he needed to defeat Frenchman Lucas Pouille. In the next three months he showed average results. In Dubai he reached the second round, then only the first round of Indian Wells and the third round of the Miami Open. However, he reached the final of the Miami Open in the doubles event, alongside Andrey Rublev, but they lost to Bob and Mike Bryan. Then the clay court season came, but he was still not showing good form. He reached the third rounds of Monte Carlo and the Barcelona Open, but only the first rounds of Madrid and Rome. However, his form peaked on time for the French Open, where he again reached the fourth round, defeating top 20 player Lucas Pouille in the third round, before losing to Alexander Zverev. During the grass season, he played only two tournaments. First, he advanced to the quarterfinal of the Halle Open for the second year in a row. Second, he reached the fourth round of Wimbledon, but then lost to Novak Djokovic. In the North American summer hard-court swing, Khachanov reached the semifinals of a Masters 1000 tournament for the first time in his career at the Canadian Open, losing to Nadal. He again lost to Nadal at the US Open in a marathon third round match. Khachanov then helped Team Russia to progress through the 1st Round play-off of the Europe/Africa Zone Group I by winning both matches and securing Russia a place in the World Group. In Asia, Khachanov struggled to find form. He reached only the second rounds of Beijing and Shanghai. He then rebounded at the Kremlin Cup, winning his second ATP title of the season by defeating Adrian Mannarino in the final. In the semifinal he defeated his compatriot Daniil Medvedev. Khachanov finished the year by claiming his first ATP Masters 1000 title at the Rolex Paris Masters, defeating Filip Krajinović, Matthew Ebden, world No. 9 John Isner (saving two match points), world No. 5 Alexander Zverev, world No. 8 Dominic Thiem and world No. 1 Novak Djokovic. He was the first tennis player representing Russia to win a Masters 1000 final since Nikolay Davydenko, who won the inaugural 2009 Shanghai Masters. No. 18 Khachanov was the lowest-ranked player to win a Masters 1000 title since Ivan Ljubičić took the 2010 Indian Wells Masters. As a result, Khachanov climbed to world No. 11 and was an alternate at the 2018 ATP Finals. He became the fifth Russian tennis player to win a Masters tournament after Marat Safin, Andrei Chesnokov, Yevgeny Kafelnikov and Nikolay Davydenko. 2019: French Open quarterfinal, top 10 Despite starting the season as the 11th ranked player in the world, Khachanov struggled to achieve any notable results for the first five months of the season. Leading up to the French Open, Khachanov's record for the year was ten wins and twelve losses, and he had failed to reach a single tournament semifinal. At the French Open, Khachanov won his first three rounds to set up a last-16 encounter with Juan Martín del Potro. Khachanov beat del Potro for the first time to reach his first major quarterfinal, where he lost to Dominic Thiem. Khachanov's maiden Slam quarterfinal saw him enter the top-10 for the first time as world No. 9. In August, Khachanov reached his first tournament semifinal of the year after beating Alexander Zverev in the quarterfinals of the Montreal Masters. In the semifinals, he was defeated by compatriot Daniil Medvedev. After the Rogers Cup, Khachanov reached the semifinals of the China Open. He failed to defend his title at the Paris Masters, losing in the second round to Jan-Lennard Struff, and dropped out of the top 10. 2020: ATP Cup semifinals, French Open fourth round Khachanov entered the Auckland Open as third-seeded, losing the first match against John Millman. He then joined team Russia, also consisting of Medvedev, Gabashvili and Kravchuk, at the ATP Cup. He beat four out of five players, with team Russia progressing to the semifinals, where they lost to eventual champion Serbia. At the 2020 US Open, Khachanov beat Jannik Sinner, coming back from 2 sets down, then beat Andrey Kuznetsov, before losing to Alex de Minaur in the third round. In Rome, Khachanov lost in the first round to Casper Ruud. He came back to form in time for the French Open, where he reached the fourth round for a fourth consecutive year, beating Kamil Majchrzak, Jiří Veselý and Cristian Garín, before losing to world No. 1 Novak Djokovic. 2021: Wimbledon quarterfinal, Olympic silver medalist At the 2021 Australian Open, Khachanov progressed to the third round for the third year in a row. He reached two semifinals, at the lead-up event to the AO at the 2021 Great Ocean Road Open, where he was defeated by eventual champion Jannik Sinner, and at the clay warm-up event to the French Open at the 2021 Lyon Open, where he was defeated by Cameron Norrie. At the 2021 Wimbledon Championships he reached the fourth round for the second time. This marked the first time three Russian players reached the fourth round at the All England Club since 2006, when Elena Dementieva, Anastasia Myskina and Maria Sharapova made their run. He continued by reaching the quarterfinals for the first time in his career, defeating Sebastian Korda in a tight match that finished in a fifth set tiebreak. He then lost in another five-set match, against Denis Shapovalov. At the Tokyo Olympics, Khachanov defeated Yoshihito Nishioka, James Duckworth, Diego Schwartzman and Ugo Humbert to reach the semi-finals. There, he defeated Pablo Carreño Busta in straight sets, to guarantee himself at least a silver medal. He lost to Alexander Zverev in the gold medal match. 2022: US Open semifinal & back to top 20 Khachanov started his 2022 season at the Adelaide International 1. Seeded second, he beat third seed, Marin Čilić, in the semifinals to reach his sixth ATP singles final. He lost in the final to top seed Gaël Monfils. Seeded third at the Adelaide International 2, he reached the quarterfinals where he was defeated by eventual finalist Arthur Rinderknech. Seeded 28th at the Australian Open, he made it to the third round where he was ousted from the tournament by sixth seed Rafael Nadal. In February, Khachanov competed at the Rotterdam Open. He lost in the second round to sixth seed Cameron Norrie. Seeded sixth at the Qatar ExxonMobil Open, he upset fourth seed, Marin Čilić, in the quarterfinals. He fell in his semifinal match to second seed, Roberto Bautista Agut, in three sets. In Dubai, he lost in the second round to world no. 1 and five-time champion, Novak Djokovic. Seeded 25th at the Indian Wells Masters, he was defeated in the second round by American Jenson Brooksby. Seeded 23rd at the Miami Open, he was eliminated in the second round by American Tommy Paul. Khachanov started his clay-court season at the Monte-Carlo Masters. He lost in the first round to 12th seed Diego Schwartzman. Seeded third at the Serbia Open, he reached the semifinals where he was defeated by World No. 1 Novak Djokovic. At the Madrid Open, he was beaten in the first round by Lucas Pouille in straight sets. In Rome, he sweeped past Pablo Carreño Busta to reach the third round where he was ousted by eventual finalist Stefanos Tsitsipas in three sets. At the French Open, he defeated Cameron Norrie to reach the fourth round of this tournament for a fifth time, but was outlasted by 6th seed Carlos Alcaraz in straight sets. Khachanov played two tournaments in the grass swing. He reached the quarterfinals of both Libéma Open and Halle Open, losing to Félix Auger-Aliassime and Oscar Otte respectively. At the Hamburg Open, he lost to Alcaraz again in the quarterfinals. Khachanov started the North American hard court swing at the Citi Open. He lost to eventual finalist Yoshihito Nishioka in the third round. Following early exits at both Canadian Open and Cincinnati Open, Khachanov reached the fourth round at the US Open defeating Jack Draper after he retired in the third set. He went one step further with a win over Pablo Carreño Busta, in a five sets match lasting over 3 hours, to reach the quarterfinals for the first time at this Major. Khachanov defeated Nick Kyrgios in five sets to reach his first career semifinal at a Major. He became the first player of Armenian descent to do so, since Andre Agassi reached his first Major semifinal at the French Open in 1988, and most recently, David Nalbandian at the French Open in 2006. In the semifinals, Khachanov lost to Casper Ruud in four sets. In October, Khachanov reached the quarterfinals of Astana Open, where he lost in straight sets to an eventual champion Novak Djokovic. In receipt of a first-round bye in Antwerp, he lost to eventual finalist Sebastian Korda in the second round. It was followed by another early exit at the Erste Bank Open to Dan Evans in the second round. 2023: Major & Masters semifinals in singles and title in doubles, first title in 5 years, back to top 10 Ranked No. 18 at the 2023 Australian Open he defeated three seeds in a row to reach the semifinals 16th seed Frances Tiafoe, 31th seed Yoshihito Nishioka and 29th seed Sebastian Korda in the quarterfinals after retirement. He moved back to the Top 15 to No. 13 in the rankings on 30 January 2023. At the 2023 Miami Open he reached the quarterfinals with his first top-5 win for the season and first ever win against second seed Stefanos Tsitsipas. It was also his 11th top-10 career overall and first since Canada 2019 where he reached a Masters quarterfinal for the last time. He broke a 23-match losing streak against Top 10 players. Next he defeated 25th seed Francisco Cerundolo to reach his first Masters semifinal since 2019. Khachanov began his European clay-court campaign at the Monte-Carlo Masters where he lost to fellow countryman Andrey Rublev in the fourth round. At the next Masters tournament, the 2023 Mutua Madrid Open, he reached the quarterfinals following wins over Thiago Monteiro, Roberto Bautista Agut, and Andrey Rublev before falling to top seed Carlos Alcaraz in straight sets. In doubles, he partnered with Rublev and the pair went on to win the title, their first as a pair. Following a quarterfinal showing at the 2023 French Open he returned to the top 10 in the singles rankings. Khachanov missed 2023 Wimbledon because of a partial stress fracture in his sacrum S1 bone. He returned to the US Open but lost in the first round to Michael Mmoh. At the next tournament, the 2023 Zhuhai Championships as the top seed, he recorded his first win since coming back from injury over qualifier Alex Bolt. He reached the final defeating two Americans sixth seed Mackenzie McDonald and fourth seed Sebastian Korda. In the final, he defeated eight seed Yoshihito Nishioka in straight sets to claim his first title in five years. Coaching team Early in his career, Khachanov was coached by Igor Bitsenko in Moscow and Vedran Martić in Split, Croatia. In 2014 he joined 4Slam Tennis Academy led by Galo Blanco. Khachanov parted ways with Blanco in November 2017. He has been training for a few years now with his previous coach Vedran Martić. Currently, his other coach is José Clavet. Personal life In April 2016, Khachanov married Veronika Shkliaeva, his childhood sweetheart, who he had been dating since 2011. Their child was born in 2019. Fellow tennis player Ilya Ivashka is his brother-in-law, as their wives are twin sisters. In March 2022, the Russian state-run RIA Novosti reported that, amid the 2022 Russian invasion of Ukraine, Khachanov had removed the Russian flag from his Instagram page. During the 2023 Australian Open, Khachanov wrote messages on the television camera lens (traditionally signed by the winner following a match) after his victories over Frances Tiafoe and Yoshihito Nishioka, expressing support for Armenians in the Republic of Artsakh during its 2022–2023 blockade. The Azerbaijan Tennis Federation complained to the International Tennis Federation, demanding Khachanov receive punishment for "his dirty plans". Khachanov stated he had not been discouraged by the ITF or anyone else for his messages. Endorsements Khachanov has been endorsed by Nike for apparel and shoes, and Wilson for racquets. He has also been sponsored by Lavazza, Armani for luxury apparel, Cadillac Escalade for cars, and Rolex for watches. He was earlier endorsed by Mercedes Benz and Head, for racquets. Career statistics Grand Slam tournament performance timeline Current through the 2023 Australian Open. Olympic medal finals Singles: 1 (1 silver medal) Masters tournaments Singles: 1 (1 title) Doubles: 3 (1 title, 2 runners-up) Awards and honours National The Russian Cup in the nominations: Junior of the Year: 2013; Male Player of the Year: 2018; Olympians-2020; Team of the Year: 2019, 2021. Sports title "Merited Master of Sports of Russia" (6 August 2021) Medal of the Order "For Merit to the Fatherland", 1st class (11 August 2021). Notes References External links 1996 births Tennis players from Moscow Russian male tennis players Living people Tennis players at the 2014 Summer Youth Olympics Hopman Cup competitors Olympic tennis players for Russia Tennis players at the 2020 Summer Olympics Medalists at the 2020 Summer Olympics Olympic medalists in tennis Olympic silver medalists for the Russian Olympic Committee athletes Russian sportspeople of Armenian descent
```kotlin package mega.privacy.android.feature.sync.data.gateway import kotlinx.coroutines.flow.Flow import mega.privacy.android.feature.sync.data.model.MegaSyncListenerEvent import nz.mega.sdk.MegaError import nz.mega.sdk.MegaNode import nz.mega.sdk.MegaSync import nz.mega.sdk.MegaSyncList import nz.mega.sdk.MegaSyncStallList import nz.mega.sdk.MegaSyncStats /** * Gateway for accessing Sync portion of Mega API */ internal interface SyncGateway { /** * Flow that emits events when syncs are created, deleted, paused, resumed, etc. */ val syncUpdate: Flow<MegaSyncListenerEvent> /** * Creates a new folder pair between localPath and MEGA folder * * @param name - name of the folder pair * @param localPath - local path on the device * @param remoteFolderId - MEGA folder handle * @return Boolean - indicates whether the folder was set up * successfully or not */ suspend fun syncFolderPair( name: String?, localPath: String, remoteFolderId: Long ): Boolean /** * Returns all folder pairs */ suspend fun getFolderPairs(): MegaSyncList /** * Remove folder pair (a sync) * * @param folderPairId */ suspend fun removeFolderPair(folderPairId: Long) /** * Monitor changes to MegaSync objects * */ fun monitorOnSyncDeleted(): Flow<MegaSync> fun monitorOnSyncStatsUpdated(): Flow<MegaSyncStats> fun monitorOnSyncStateChanged(): Flow<MegaSync> /** * Resume sync * * @param folderPairId - id of the folder pair to resume */ fun resumeSync(folderPairId: Long) /** * Pause sync * * @param folderPairId - id of the folder pair to pause */ fun pauseSync(folderPairId: Long) suspend fun getSyncStalledIssues(): MegaSyncStallList? suspend fun isNodeSyncableWithError(megaNode: MegaNode): MegaError } ```
Kataraki is a panchayat village in the southern state of Karnataka, India. Administratively, kataraki under Bilagi Taluka of Bagalkot District in Karnataka. The village of Kataraki was a mandal panchayat including 7 villages. The village is 5 km from to Kaladgi which was a district place in British reign and known for its fruit gardens, 24 km by road east of Mudhol and 29 km by road southwest of the town of Bilagi, and 35 km from Bagalkot. Katarki is on the north shore of the Ghataprabha River. There is famous temple called Ramalingeshwara on the banks of the Ghataprabha River and Patri Basaveshwara temple is there. Divisions The Kataraki gram panchayat oversees three villages: Katarki, Lingapur (S.K.) and Shiraguppi. References External links Villages in Bagalkot district
```javascript //--file--- my-project\src\vuex-demo\v01_app.js import Vue from 'vue' import App from './mint_ui1v.vue' import FastClick from 'fastclick' FastClick.attach(document.body) /* eslint-disable no-new */ new Vue({ el: '#app', render: h => h(App) }) ```
```objective-c // // SubtleVolume.h // SubtleVolume // // Created by Andrea Mazzini on 15/03/16. // #import <UIKit/UIKit.h> //! Project version number for SubtleVolume. FOUNDATION_EXPORT double SubtleVolumeVersionNumber; //! Project version string for SubtleVolume. FOUNDATION_EXPORT const unsigned char SubtleVolumeVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <SubtleVolume/PublicHeader.h> ```
```javascript import 'vtk.js/Sources/favicon'; // Load the rendering pieces we want to use (for both WebGL and WebGPU) import 'vtk.js/Sources/Rendering/Profiles/Geometry'; import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; import vtkFullScreenRenderWindow from 'vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow'; import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; import vtkSTLReader from 'vtk.js/Sources/IO/Geometry/STLReader'; // your_sha256_hash------------ // Example code // your_sha256_hash------------ const reader = vtkSTLReader.newInstance(); const mapper = vtkMapper.newInstance({ scalarVisibility: false }); const actor = vtkActor.newInstance(); actor.setMapper(mapper); mapper.setInputConnection(reader.getOutputPort()); // your_sha256_hash------------ function update() { const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance(); const renderer = fullScreenRenderer.getRenderer(); const renderWindow = fullScreenRenderer.getRenderWindow(); const resetCamera = renderer.resetCamera; const render = renderWindow.render; renderer.addActor(actor); resetCamera(); render(); } // your_sha256_hash------------ // Use a file reader to load a local file // your_sha256_hash------------ const myContainer = document.querySelector('body'); const fileContainer = document.createElement('div'); fileContainer.innerHTML = '<input type="file" class="file"/>'; myContainer.appendChild(fileContainer); const fileInput = fileContainer.querySelector('input'); function handleFile(event) { event.preventDefault(); const dataTransfer = event.dataTransfer; const files = event.target.files || dataTransfer.files; if (files.length === 1) { myContainer.removeChild(fileContainer); const fileReader = new FileReader(); fileReader.onload = function onLoad(e) { reader.parseAsArrayBuffer(fileReader.result); update(); }; fileReader.readAsArrayBuffer(files[0]); } } fileInput.addEventListener('change', handleFile); // your_sha256_hash------------ // Use the reader to download a file // your_sha256_hash------------ // reader.setUrl(`${__BASE_PATH__}/data/stl/segmentation.stl`, { binary: true }).then(update); ```
The Office of the State Counsellor of the Republic of the Union of Myanmar () is a ministry-level body that serves the State Counsellor of Myanmar. The office was led by union minister Kyaw Tint Swe. It was dissolved by SAC on 22 February 2021. Departments Union Minister Office Department of Union Peace Formation Department of Policy Affairs List of ministers References StateCounsellorOffice Ministries established in 2017 2017 establishments in Myanmar
The Breginj Combe () is a valley in extreme western Slovenia. It lies between the elongated ridge of Mount Stol () to the north and Mount Mia (, ) to the south. To the east it expands into the broad Staro Selo Lowland (Staroselsko podolje), and to the west it meets the border with Italy. The Slovenian–Italian border runs along the Nadiža/Natisone River and its tributary, Black Creek (, ). The Breginj Combe includes the villages of Borjana, Kred, Potoki, Podbela, Breginj, Stanovišče, Homec, Robidišče, Sedlo, and Logje. The Breginj Combe is part of the cultural region of Venetian Slovenia. The heritage of the region include ethnographic monuments, especially architectural heritage, which was extensively damaged by the 1976 Friuli earthquake. Some of this heritage is preserved in the Breginj Museum in Breginj. Popular tourism destinations in the Breginj Combe include the Napoleon Bridge in Logje and the village of Robidišče, which is the westernmost settlement in Slovenia. The Nadiža River is warm during the summers and popular for swimming. References External links The Breginj Combe on Geopedia Valleys in the Slovene Littoral Municipality of Kobarid
```objective-c // This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // // This Source Code Form is subject to the terms of the Mozilla // with this file, You can obtain one at path_to_url #ifndef EIGEN_COLPIVOTINGHOUSEHOLDERQR_H #define EIGEN_COLPIVOTINGHOUSEHOLDERQR_H namespace Eigen { namespace internal { template<typename _MatrixType> struct traits<ColPivHouseholderQR<_MatrixType> > : traits<_MatrixType> { enum { Flags = 0 }; }; } // end namespace internal /** \ingroup QR_Module * * \class ColPivHouseholderQR * * \brief Householder rank-revealing QR decomposition of a matrix with column-pivoting * * \tparam _MatrixType the type of the matrix of which we are computing the QR decomposition * * This class performs a rank-revealing QR decomposition of a matrix \b A into matrices \b P, \b Q and \b R * such that * \f[ * \mathbf{A} \, \mathbf{P} = \mathbf{Q} \, \mathbf{R} * \f] * by using Householder transformations. Here, \b P is a permutation matrix, \b Q a unitary matrix and \b R an * upper triangular matrix. * * This decomposition performs column pivoting in order to be rank-revealing and improve * numerical stability. It is slower than HouseholderQR, and faster than FullPivHouseholderQR. * * This class supports the \link InplaceDecomposition inplace decomposition \endlink mechanism. * * \sa MatrixBase::colPivHouseholderQr() */ template<typename _MatrixType> class ColPivHouseholderQR { public: typedef _MatrixType MatrixType; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime }; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; // FIXME should be int typedef typename MatrixType::StorageIndex StorageIndex; typedef typename internal::plain_diag_type<MatrixType>::type HCoeffsType; typedef PermutationMatrix<ColsAtCompileTime, MaxColsAtCompileTime> PermutationType; typedef typename internal::plain_row_type<MatrixType, Index>::type IntRowVectorType; typedef typename internal::plain_row_type<MatrixType>::type RowVectorType; typedef typename internal::plain_row_type<MatrixType, RealScalar>::type RealRowVectorType; typedef HouseholderSequence<MatrixType,typename internal::remove_all<typename HCoeffsType::ConjugateReturnType>::type> HouseholderSequenceType; typedef typename MatrixType::PlainObject PlainObject; private: typedef typename PermutationType::StorageIndex PermIndexType; public: /** * \brief Default Constructor. * * The default constructor is useful in cases in which the user intends to * perform decompositions via ColPivHouseholderQR::compute(const MatrixType&). */ ColPivHouseholderQR() : m_qr(), m_hCoeffs(), m_colsPermutation(), m_colsTranspositions(), m_temp(), m_colNormsUpdated(), m_colNormsDirect(), m_isInitialized(false), m_usePrescribedThreshold(false) {} /** \brief Default Constructor with memory preallocation * * Like the default constructor but with preallocation of the internal data * according to the specified problem \a size. * \sa ColPivHouseholderQR() */ ColPivHouseholderQR(Index rows, Index cols) : m_qr(rows, cols), m_hCoeffs((std::min)(rows,cols)), m_colsPermutation(PermIndexType(cols)), m_colsTranspositions(cols), m_temp(cols), m_colNormsUpdated(cols), m_colNormsDirect(cols), m_isInitialized(false), m_usePrescribedThreshold(false) {} /** \brief Constructs a QR factorization from a given matrix * * This constructor computes the QR factorization of the matrix \a matrix by calling * the method compute(). It is a short cut for: * * \code * ColPivHouseholderQR<MatrixType> qr(matrix.rows(), matrix.cols()); * qr.compute(matrix); * \endcode * * \sa compute() */ template<typename InputType> explicit ColPivHouseholderQR(const EigenBase<InputType>& matrix) : m_qr(matrix.rows(), matrix.cols()), m_hCoeffs((std::min)(matrix.rows(),matrix.cols())), m_colsPermutation(PermIndexType(matrix.cols())), m_colsTranspositions(matrix.cols()), m_temp(matrix.cols()), m_colNormsUpdated(matrix.cols()), m_colNormsDirect(matrix.cols()), m_isInitialized(false), m_usePrescribedThreshold(false) { compute(matrix.derived()); } /** \brief Constructs a QR factorization from a given matrix * * This overloaded constructor is provided for \link InplaceDecomposition inplace decomposition \endlink when \c MatrixType is a Eigen::Ref. * * \sa ColPivHouseholderQR(const EigenBase&) */ template<typename InputType> explicit ColPivHouseholderQR(EigenBase<InputType>& matrix) : m_qr(matrix.derived()), m_hCoeffs((std::min)(matrix.rows(),matrix.cols())), m_colsPermutation(PermIndexType(matrix.cols())), m_colsTranspositions(matrix.cols()), m_temp(matrix.cols()), m_colNormsUpdated(matrix.cols()), m_colNormsDirect(matrix.cols()), m_isInitialized(false), m_usePrescribedThreshold(false) { computeInPlace(); } /** This method finds a solution x to the equation Ax=b, where A is the matrix of which * *this is the QR decomposition, if any exists. * * \param b the right-hand-side of the equation to solve. * * \returns a solution. * * \note_about_checking_solutions * * \note_about_arbitrary_choice_of_solution * * Example: \include ColPivHouseholderQR_solve.cpp * Output: \verbinclude ColPivHouseholderQR_solve.out */ template<typename Rhs> inline const Solve<ColPivHouseholderQR, Rhs> solve(const MatrixBase<Rhs>& b) const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); return Solve<ColPivHouseholderQR, Rhs>(*this, b.derived()); } HouseholderSequenceType householderQ() const; HouseholderSequenceType matrixQ() const { return householderQ(); } /** \returns a reference to the matrix where the Householder QR decomposition is stored */ const MatrixType& matrixQR() const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); return m_qr; } /** \returns a reference to the matrix where the result Householder QR is stored * \warning The strict lower part of this matrix contains internal values. * Only the upper triangular part should be referenced. To get it, use * \code matrixR().template triangularView<Upper>() \endcode * For rank-deficient matrices, use * \code * matrixR().topLeftCorner(rank(), rank()).template triangularView<Upper>() * \endcode */ const MatrixType& matrixR() const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); return m_qr; } template<typename InputType> ColPivHouseholderQR& compute(const EigenBase<InputType>& matrix); /** \returns a const reference to the column permutation matrix */ const PermutationType& colsPermutation() const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); return m_colsPermutation; } /** \returns the absolute value of the determinant of the matrix of which * *this is the QR decomposition. It has only linear complexity * (that is, O(n) where n is the dimension of the square matrix) * as the QR decomposition has already been computed. * * \note This is only for square matrices. * * \warning a determinant can be very big or small, so for matrices * of large enough dimension, there is a risk of overflow/underflow. * One way to work around that is to use logAbsDeterminant() instead. * * \sa logAbsDeterminant(), MatrixBase::determinant() */ typename MatrixType::RealScalar absDeterminant() const; /** \returns the natural log of the absolute value of the determinant of the matrix of which * *this is the QR decomposition. It has only linear complexity * (that is, O(n) where n is the dimension of the square matrix) * as the QR decomposition has already been computed. * * \note This is only for square matrices. * * \note This method is useful to work around the risk of overflow/underflow that's inherent * to determinant computation. * * \sa absDeterminant(), MatrixBase::determinant() */ typename MatrixType::RealScalar logAbsDeterminant() const; /** \returns the rank of the matrix of which *this is the QR decomposition. * * \note This method has to determine which pivots should be considered nonzero. * For that, it uses the threshold value that you can control by calling * setThreshold(const RealScalar&). */ inline Index rank() const { using std::abs; eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); RealScalar premultiplied_threshold = abs(m_maxpivot) * threshold(); Index result = 0; for(Index i = 0; i < m_nonzero_pivots; ++i) result += (abs(m_qr.coeff(i,i)) > premultiplied_threshold); return result; } /** \returns the dimension of the kernel of the matrix of which *this is the QR decomposition. * * \note This method has to determine which pivots should be considered nonzero. * For that, it uses the threshold value that you can control by calling * setThreshold(const RealScalar&). */ inline Index dimensionOfKernel() const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); return cols() - rank(); } /** \returns true if the matrix of which *this is the QR decomposition represents an injective * linear map, i.e. has trivial kernel; false otherwise. * * \note This method has to determine which pivots should be considered nonzero. * For that, it uses the threshold value that you can control by calling * setThreshold(const RealScalar&). */ inline bool isInjective() const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); return rank() == cols(); } /** \returns true if the matrix of which *this is the QR decomposition represents a surjective * linear map; false otherwise. * * \note This method has to determine which pivots should be considered nonzero. * For that, it uses the threshold value that you can control by calling * setThreshold(const RealScalar&). */ inline bool isSurjective() const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); return rank() == rows(); } /** \returns true if the matrix of which *this is the QR decomposition is invertible. * * \note This method has to determine which pivots should be considered nonzero. * For that, it uses the threshold value that you can control by calling * setThreshold(const RealScalar&). */ inline bool isInvertible() const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); return isInjective() && isSurjective(); } /** \returns the inverse of the matrix of which *this is the QR decomposition. * * \note If this matrix is not invertible, the returned matrix has undefined coefficients. * Use isInvertible() to first determine whether this matrix is invertible. */ inline const Inverse<ColPivHouseholderQR> inverse() const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); return Inverse<ColPivHouseholderQR>(*this); } inline Index rows() const { return m_qr.rows(); } inline Index cols() const { return m_qr.cols(); } /** \returns a const reference to the vector of Householder coefficients used to represent the factor \c Q. * * For advanced uses only. */ const HCoeffsType& hCoeffs() const { return m_hCoeffs; } /** Allows to prescribe a threshold to be used by certain methods, such as rank(), * who need to determine when pivots are to be considered nonzero. This is not used for the * QR decomposition itself. * * When it needs to get the threshold value, Eigen calls threshold(). By default, this * uses a formula to automatically determine a reasonable threshold. * Once you have called the present method setThreshold(const RealScalar&), * your value is used instead. * * \param threshold The new value to use as the threshold. * * A pivot will be considered nonzero if its absolute value is strictly greater than * \f$ \vert pivot \vert \leqslant threshold \times \vert maxpivot \vert \f$ * where maxpivot is the biggest pivot. * * If you want to come back to the default behavior, call setThreshold(Default_t) */ ColPivHouseholderQR& setThreshold(const RealScalar& threshold) { m_usePrescribedThreshold = true; m_prescribedThreshold = threshold; return *this; } /** Allows to come back to the default behavior, letting Eigen use its default formula for * determining the threshold. * * You should pass the special object Eigen::Default as parameter here. * \code qr.setThreshold(Eigen::Default); \endcode * * See the documentation of setThreshold(const RealScalar&). */ ColPivHouseholderQR& setThreshold(Default_t) { m_usePrescribedThreshold = false; return *this; } /** Returns the threshold that will be used by certain methods such as rank(). * * See the documentation of setThreshold(const RealScalar&). */ RealScalar threshold() const { eigen_assert(m_isInitialized || m_usePrescribedThreshold); return m_usePrescribedThreshold ? m_prescribedThreshold // this formula comes from experimenting (see "LU precision tuning" thread on the list) // and turns out to be identical to Higham's formula used already in LDLt. : NumTraits<Scalar>::epsilon() * RealScalar(m_qr.diagonalSize()); } /** \returns the number of nonzero pivots in the QR decomposition. * Here nonzero is meant in the exact sense, not in a fuzzy sense. * So that notion isn't really intrinsically interesting, but it is * still useful when implementing algorithms. * * \sa rank() */ inline Index nonzeroPivots() const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); return m_nonzero_pivots; } /** \returns the absolute value of the biggest pivot, i.e. the biggest * diagonal coefficient of R. */ RealScalar maxPivot() const { return m_maxpivot; } /** \brief Reports whether the QR factorization was succesful. * * \note This function always returns \c Success. It is provided for compatibility * with other factorization routines. * \returns \c Success */ ComputationInfo info() const { eigen_assert(m_isInitialized && "Decomposition is not initialized."); return Success; } #ifndef EIGEN_PARSED_BY_DOXYGEN template<typename RhsType, typename DstType> void _solve_impl(const RhsType &rhs, DstType &dst) const; #endif protected: friend class CompleteOrthogonalDecomposition<MatrixType>; static void check_template_parameters() { EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar); } void computeInPlace(); MatrixType m_qr; HCoeffsType m_hCoeffs; PermutationType m_colsPermutation; IntRowVectorType m_colsTranspositions; RowVectorType m_temp; RealRowVectorType m_colNormsUpdated; RealRowVectorType m_colNormsDirect; bool m_isInitialized, m_usePrescribedThreshold; RealScalar m_prescribedThreshold, m_maxpivot; Index m_nonzero_pivots; Index m_det_pq; }; template<typename MatrixType> typename MatrixType::RealScalar ColPivHouseholderQR<MatrixType>::absDeterminant() const { using std::abs; eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); eigen_assert(m_qr.rows() == m_qr.cols() && "You can't take the determinant of a non-square matrix!"); return abs(m_qr.diagonal().prod()); } template<typename MatrixType> typename MatrixType::RealScalar ColPivHouseholderQR<MatrixType>::logAbsDeterminant() const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); eigen_assert(m_qr.rows() == m_qr.cols() && "You can't take the determinant of a non-square matrix!"); return m_qr.diagonal().cwiseAbs().array().log().sum(); } /** Performs the QR factorization of the given matrix \a matrix. The result of * the factorization is stored into \c *this, and a reference to \c *this * is returned. * * \sa class ColPivHouseholderQR, ColPivHouseholderQR(const MatrixType&) */ template<typename MatrixType> template<typename InputType> ColPivHouseholderQR<MatrixType>& ColPivHouseholderQR<MatrixType>::compute(const EigenBase<InputType>& matrix) { m_qr = matrix.derived(); computeInPlace(); return *this; } template<typename MatrixType> void ColPivHouseholderQR<MatrixType>::computeInPlace() { check_template_parameters(); // the column permutation is stored as int indices, so just to be sure: eigen_assert(m_qr.cols()<=NumTraits<int>::highest()); using std::abs; Index rows = m_qr.rows(); Index cols = m_qr.cols(); Index size = m_qr.diagonalSize(); m_hCoeffs.resize(size); m_temp.resize(cols); m_colsTranspositions.resize(m_qr.cols()); Index number_of_transpositions = 0; m_colNormsUpdated.resize(cols); m_colNormsDirect.resize(cols); for (Index k = 0; k < cols; ++k) { // colNormsDirect(k) caches the most recent directly computed norm of // column k. m_colNormsDirect.coeffRef(k) = m_qr.col(k).norm(); m_colNormsUpdated.coeffRef(k) = m_colNormsDirect.coeffRef(k); } RealScalar threshold_helper = numext::abs2<RealScalar>(m_colNormsUpdated.maxCoeff() * NumTraits<RealScalar>::epsilon()) / RealScalar(rows); RealScalar norm_downdate_threshold = numext::sqrt(NumTraits<RealScalar>::epsilon()); m_nonzero_pivots = size; // the generic case is that in which all pivots are nonzero (invertible case) m_maxpivot = RealScalar(0); for(Index k = 0; k < size; ++k) { // first, we look up in our table m_colNormsUpdated which column has the biggest norm Index biggest_col_index; RealScalar biggest_col_sq_norm = numext::abs2(m_colNormsUpdated.tail(cols-k).maxCoeff(&biggest_col_index)); biggest_col_index += k; // Track the number of meaningful pivots but do not stop the decomposition to make // sure that the initial matrix is properly reproduced. See bug 941. if(m_nonzero_pivots==size && biggest_col_sq_norm < threshold_helper * RealScalar(rows-k)) m_nonzero_pivots = k; // apply the transposition to the columns m_colsTranspositions.coeffRef(k) = biggest_col_index; if(k != biggest_col_index) { m_qr.col(k).swap(m_qr.col(biggest_col_index)); std::swap(m_colNormsUpdated.coeffRef(k), m_colNormsUpdated.coeffRef(biggest_col_index)); std::swap(m_colNormsDirect.coeffRef(k), m_colNormsDirect.coeffRef(biggest_col_index)); ++number_of_transpositions; } // generate the householder vector, store it below the diagonal RealScalar beta; m_qr.col(k).tail(rows-k).makeHouseholderInPlace(m_hCoeffs.coeffRef(k), beta); // apply the householder transformation to the diagonal coefficient m_qr.coeffRef(k,k) = beta; // remember the maximum absolute value of diagonal coefficients if(abs(beta) > m_maxpivot) m_maxpivot = abs(beta); // apply the householder transformation m_qr.bottomRightCorner(rows-k, cols-k-1) .applyHouseholderOnTheLeft(m_qr.col(k).tail(rows-k-1), m_hCoeffs.coeffRef(k), &m_temp.coeffRef(k+1)); // update our table of norms of the columns for (Index j = k + 1; j < cols; ++j) { // The following implements the stable norm downgrade step discussed in // path_to_url // and used in LAPACK routines xGEQPF and xGEQP3. // See lines 278-297 in path_to_url if (m_colNormsUpdated.coeffRef(j) != RealScalar(0)) { RealScalar temp = abs(m_qr.coeffRef(k, j)) / m_colNormsUpdated.coeffRef(j); temp = (RealScalar(1) + temp) * (RealScalar(1) - temp); temp = temp < RealScalar(0) ? RealScalar(0) : temp; RealScalar temp2 = temp * numext::abs2<RealScalar>(m_colNormsUpdated.coeffRef(j) / m_colNormsDirect.coeffRef(j)); if (temp2 <= norm_downdate_threshold) { // The updated norm has become too inaccurate so re-compute the column // norm directly. m_colNormsDirect.coeffRef(j) = m_qr.col(j).tail(rows - k - 1).norm(); m_colNormsUpdated.coeffRef(j) = m_colNormsDirect.coeffRef(j); } else { m_colNormsUpdated.coeffRef(j) *= numext::sqrt(temp); } } } } m_colsPermutation.setIdentity(PermIndexType(cols)); for(PermIndexType k = 0; k < size/*m_nonzero_pivots*/; ++k) m_colsPermutation.applyTranspositionOnTheRight(k, PermIndexType(m_colsTranspositions.coeff(k))); m_det_pq = (number_of_transpositions%2) ? -1 : 1; m_isInitialized = true; } #ifndef EIGEN_PARSED_BY_DOXYGEN template<typename _MatrixType> template<typename RhsType, typename DstType> void ColPivHouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const { eigen_assert(rhs.rows() == rows()); const Index nonzero_pivots = nonzeroPivots(); if(nonzero_pivots == 0) { dst.setZero(); return; } typename RhsType::PlainObject c(rhs); // Note that the matrix Q = H_0^* H_1^*... so its inverse is Q^* = (H_0 H_1 ...)^T c.applyOnTheLeft(householderSequence(m_qr, m_hCoeffs) .setLength(nonzero_pivots) .transpose() ); m_qr.topLeftCorner(nonzero_pivots, nonzero_pivots) .template triangularView<Upper>() .solveInPlace(c.topRows(nonzero_pivots)); for(Index i = 0; i < nonzero_pivots; ++i) dst.row(m_colsPermutation.indices().coeff(i)) = c.row(i); for(Index i = nonzero_pivots; i < cols(); ++i) dst.row(m_colsPermutation.indices().coeff(i)).setZero(); } #endif namespace internal { template<typename DstXprType, typename MatrixType> struct Assignment<DstXprType, Inverse<ColPivHouseholderQR<MatrixType> >, internal::assign_op<typename DstXprType::Scalar,typename ColPivHouseholderQR<MatrixType>::Scalar>, Dense2Dense> { typedef ColPivHouseholderQR<MatrixType> QrType; typedef Inverse<QrType> SrcXprType; static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename QrType::Scalar> &) { dst = src.nestedExpression().solve(MatrixType::Identity(src.rows(), src.cols())); } }; } // end namespace internal /** \returns the matrix Q as a sequence of householder transformations. * You can extract the meaningful part only by using: * \code qr.householderQ().setLength(qr.nonzeroPivots()) \endcode*/ template<typename MatrixType> typename ColPivHouseholderQR<MatrixType>::HouseholderSequenceType ColPivHouseholderQR<MatrixType> ::householderQ() const { eigen_assert(m_isInitialized && "ColPivHouseholderQR is not initialized."); return HouseholderSequenceType(m_qr, m_hCoeffs.conjugate()); } /** \return the column-pivoting Householder QR decomposition of \c *this. * * \sa class ColPivHouseholderQR */ template<typename Derived> const ColPivHouseholderQR<typename MatrixBase<Derived>::PlainObject> MatrixBase<Derived>::colPivHouseholderQr() const { return ColPivHouseholderQR<PlainObject>(eval()); } } // end namespace Eigen #endif // EIGEN_COLPIVOTINGHOUSEHOLDERQR_H ```
```objective-c /** * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * * path_to_url * * Unless required by applicable law or agreed to in writing, * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * specific language governing permissions and limitations */ // This file is autogenerated by // incubator-weex/weex_core/Source/android/jniprebuild/jni_generator.py // For // org/apache/weex/base/SystemMessageHandler #ifndef com_taobao_weex_base_SystemMessageHandler_JNI #define com_taobao_weex_base_SystemMessageHandler_JNI #include <jni.h> #include "base/android/jni/android_jni.h" // Step 1: forward declarations. namespace { const char kSystemMessageHandlerClassPath[] = "org/apache/weex/base/SystemMessageHandler"; // Leaking this jclass as we cannot use LazyInstance from some threads. jclass g_SystemMessageHandler_clazz = NULL; #define SystemMessageHandler_clazz(env) g_SystemMessageHandler_clazz } // namespace static void RunWork(JNIEnv* env, jobject jcaller, jlong delegateNative); // Step 2: method stubs. static intptr_t g_SystemMessageHandler_create = 0; static base::android::ScopedLocalJavaRef<jobject> Java_SystemMessageHandler_create(JNIEnv* env, jlong messagePumpDelegateNative) { /* Must call RegisterNativesImpl() */ //CHECK_CLAZZ(env, SystemMessageHandler_clazz(env), // SystemMessageHandler_clazz(env), NULL); jmethodID method_id = base::android::GetMethod( env, SystemMessageHandler_clazz(env), base::android::STATIC_METHOD, "create", "(" "J" ")" "Lorg/apache/weex/base/SystemMessageHandler;", &g_SystemMessageHandler_create); jobject ret = env->CallStaticObjectMethod(SystemMessageHandler_clazz(env), method_id, messagePumpDelegateNative); base::android::CheckException(env); return base::android::ScopedLocalJavaRef<jobject>(env, ret); } static intptr_t g_SystemMessageHandler_scheduleWork = 0; static void Java_SystemMessageHandler_scheduleWork(JNIEnv* env, jobject obj) { /* Must call RegisterNativesImpl() */ //CHECK_CLAZZ(env, obj, // SystemMessageHandler_clazz(env)); jmethodID method_id = base::android::GetMethod( env, SystemMessageHandler_clazz(env), base::android::INSTANCE_METHOD, "scheduleWork", "(" ")" "V", &g_SystemMessageHandler_scheduleWork); env->CallVoidMethod(obj, method_id); base::android::CheckException(env); } static intptr_t g_SystemMessageHandler_scheduleDelayedWork = 0; static void Java_SystemMessageHandler_scheduleDelayedWork(JNIEnv* env, jobject obj, jlong delayMillis) { /* Must call RegisterNativesImpl() */ //CHECK_CLAZZ(env, obj, // SystemMessageHandler_clazz(env)); jmethodID method_id = base::android::GetMethod( env, SystemMessageHandler_clazz(env), base::android::INSTANCE_METHOD, "scheduleDelayedWork", "(" "J" ")" "V", &g_SystemMessageHandler_scheduleDelayedWork); env->CallVoidMethod(obj, method_id, delayMillis); base::android::CheckException(env); } static intptr_t g_SystemMessageHandler_stop = 0; static void Java_SystemMessageHandler_stop(JNIEnv* env, jobject obj) { /* Must call RegisterNativesImpl() */ //CHECK_CLAZZ(env, obj, // SystemMessageHandler_clazz(env)); jmethodID method_id = base::android::GetMethod( env, SystemMessageHandler_clazz(env), base::android::INSTANCE_METHOD, "stop", "(" ")" "V", &g_SystemMessageHandler_stop); env->CallVoidMethod(obj, method_id); base::android::CheckException(env); } // Step 3: RegisterNatives. static const JNINativeMethod kMethodsSystemMessageHandler[] = { { "nativeRunWork", "(" "J" ")" "V", reinterpret_cast<void*>(RunWork) }, }; static bool RegisterNativesImpl(JNIEnv* env) { g_SystemMessageHandler_clazz = reinterpret_cast<jclass>(env->NewGlobalRef( base::android::GetClass(env, kSystemMessageHandlerClassPath).Get())); const int kMethodsSystemMessageHandlerSize = sizeof(kMethodsSystemMessageHandler)/sizeof(kMethodsSystemMessageHandler[0]); if (env->RegisterNatives(SystemMessageHandler_clazz(env), kMethodsSystemMessageHandler, kMethodsSystemMessageHandlerSize) < 0) { //jni_generator::HandleRegistrationError( // env, SystemMessageHandler_clazz(env), __FILE__); return false; } return true; } #endif // com_taobao_weex_base_SystemMessageHandler_JNI ```
John Howard (born Howard Michael Jones, 9 April 1953) is an English singer-songwriter, pianist and recording artist and published author. With his February 1975 debut album Kid in a Big World (CBS Records), Howard emerged as a late voice of the glam-pop wave of the early 1970s. Across a musical career that has included two main periods of recording activity – 1974-84 and 2004–present – Howard has released 20 studio albums and 12 studio EPs. In March 2018, he became a published author, his first autobiography, Incidents Crowded With Life, covering his childhood up to 1976, was published by Fisher King Publishing. In August 2020, the second volume of his autobiography, Illusions of Happiness, covering the years 1976 - 1986, was published by Fisher King Publishing. In February 2022, the third volume of his autobiography, In The Eyeline of Furtherance, covering 1986 to 2001, was published by Fisher King Publishing. In September 2023, Howard's first novel, Across My Dreams With Nets of Wonder, was published by Fisher King Publishing. Beginnings and early years, 1953–1973 John Howard was born Howard Michael Jones in Bury, a market town in North West England which historically is part of Lancashire and administratively is within Greater Manchester. Having started playing the piano at the age of four years, Howard began classical training at seven. He attended St. Gabriel's Roman Catholic High School in Bury, and in 1969 enrolled at the Accrington College of Art. Starting in March 1970 and continuing for the next three years, Howard – having adopted the professional moniker "Jon Howard" – played his own songs at universities and folk clubs, and at the Bolton Octagon Theatre. At the Octagon, Howard often played support for the folk/progressive rock band Spirogyra. The band at the time was managed by Howard's contemporary, Max Hole, who later, as an A&R manager at WEA Records U.K. in the early 1980s, went on to sign Howard Jones, whose birth name – ironically – is John Howard Jones. Hole went on to serve as chief operating officer of Universal Music Group International. CBS Records, 1973–1976 Shortly after moving to London in August 1973, Howard was playing at the Troubadour folk club, when he was spotted by "Hurricane" Smith's manager Stuart Reid, who was the head of pop at Chappell Music. Reid signed Howard to a management contract – changing "Jon" to "John," in the process – and Howard signed with CBS at the end of that year. Kid in a Big World (1975) was the first of three albums that Howard recorded for CBS in 1974 and 1975. The album – recorded at Abbey Road and Apple Studio – was produced by ex-Shadows drummer Tony Meehan and Paul Phillips. Session players included founding Zombies and Argent keyboardist Rod Argent and founding Argent drummer Bob Henrit. CBS initially put considerable resources behind its new artist – promoting Howard's debut album with a major print advertising campaign, life-sized cardboard cutouts of Howard at record shops, and a launch concert for recording industry executives and press at the Purcell Room in London's Southbank Centre. But BBC Radio 1 refused to play the first single, "Goodbye Suzie," calling it "too depressing," and also passed on the second single, "Family Man," calling it "anti-woman." Following his debut album release in February 1975, Howard recorded two more albums of material for CBS that year. His second album – Technicolour Biography (recorded 1974 and 1975), produced by Paul Phillips – was a collection of songs in a vein similar to those on Kid in a Big World. Indeed, the songs on both of Howard's first two albums were among the group of songs, written between 1970 and 1973, that led CBS to sign Howard in late 1973. But after BBC Radio 1's rejection of the two singles from the debut album, CBS balked at this new set and shelved the project, with the songs never being developed beyond the initial "vocals and piano" demonstrations. At this point, CBS, anxious for a hit, paired Howard with Biddu, a producer best known for his pioneering work in disco. Howard set about writing a new collection of songs, and the result was his third album, Can You Hear Me OK? (recorded 1975). CBS's promotion of the only single, "I Got My Lady," from that fully produced third album included Howard's only live television appearance – on a December 1975 episode of the BBC television program The Musical Time Machine, which ran from 1975 to 1977. Also appearing on that episode were Johnny Mathis and Lynsey de Paul. In his first autobiography, "Incidents Crowded With Life", he writes about this appearance Howard recalls that he was greeted by a beaming Lynsey De Paul "Brilliant", she said, "I watched you on my monitor! Such a pro!” "Lovely, John", Patsy, my manager's wife, said, squeezing my arm, "and not a head move anywhere!” "Aren’t you allowed to move your head?” Lynsey asked conspiratorially. "Not if you’re a male performer on a BBC show, apparently", I replied. "Have you seen the dancers on this show?” she laughed. "Try telling them that!” But when the single did not chart as well as CBS had hoped, CBS shelved that album too. Having failed to find an audience for Howard's music, CBS ultimately released only the first "installment" of Howard's first three albums – sometimes now referred to as the "Kid trilogy." Howard left the label in early 1976. Stephen Thomas Erlewine called this sequence of events one of the most extreme of examples of Murphy's Law in record company history." Many years later, Howard's mentor Paul Phillips – who at the time was Howard's producer and A&R manager at CBS – had a more specific explanation. Phillips told Howard that his difficulty in getting radio airplay was due primarily to homophobia in the recording industry. Howard, who is gay, presented a louche and effete image at a time – the early 1970s – when, despite the shattering of gender stereotypes that was being heralded by the emergence of glam and disco, record label executives and radio programmers still often expected gay male artists to conform to traditional ideals of masculinity and to keep their sexuality to themselves. Howard wrote about his experience of this dynamic in his 2007 song, "My Beautiful Days." Post-Kid singles, 1977–1984 After leaving CBS, Howard spent a brief time playing London's fashionable restaurants and piano bars – including a regular stint, for several months in 1976, at April Ashley's AD8 club. In late 1976, Howard suffered a fall in which he broke his back and feet. But after a period of recuperation and recovery, he resumed recording and released a number of singles over the next several years. Howard's work with the producer Trevor Horn in 1977 and 1978 resulted in two 7" singles – "I Can Breathe Again"/"You Take My Breath Away" (Ariola, 1978) and "Don't Shine Your Light"/"Baby Go Now" (SRT, 1979) – that were among Horn's earliest commercially released production credits. And a brief return to CBS in late 1979 led to two more 7" singles – "I Tune into You"/"Gotta New Toy" and "Lonely I, Lonely Me"/"Gotta New Toy (remix) – both released in 1980. In 1981 – the year before Culture Club released its debut album, Kissing to Be Clever – Howard teamed up with Culture Club producer Steve Levine, a collaboration that resulted in another two 7" singles, "It's You I Want"/"Searching for Someone" and "And the World"/"Call on You." A second life in A&R, 1985–2000 But by the mid-1980s, Howard had stopped recording and moved to the business side of music, where he forged a successful career in A&R for fifteen years, before "retiring" to Pembrokeshire, Wales, in 2000. Among the artists Howard worked with during this period were: Elkie Brooks, Maria Friedman, Connie Francis, Hazell Dean, Sonia, Gary Glitter, The Crickets, Lonnie Donegan, Madness, Barry Manilow and Sir Tim Rice. Howard did record one album during this period, The Pros and Cons of Passion. The album – a collection of Howard originals and covers of songs by George Harrison, Brian Wilson, k.d. lang, Stephen Sondheim, Lou Reed, Neil Young, Paul McCartney and Janet Hood/Bill Russell – was slated for 1996 release on the Carlton label. But – as if to remind Howard that Murphy's law still was in effect – the label folded the week before the album's street date, and the album remained unreleased until Howard released it himself in 2008. Rediscovering the muse, 2003–2005 The album cover of Kid in a Big World was featured in Matsui Takumi's 2002 book, In Search of the Lost Record: British Album Cover Art of 50's to 80s. This turned out to be one signpost of a revival of interest in Howard's early work. Responding to this, Cherry Red Records subsidiary RPM Records in September 2003 featured "Goodbye Suzie" – the song which, when it was released in October 1974, BBC Radio 1 had scuttled as being "too depressing" – on its compilation Zigzag: 20 Junkshop Soft Rock Singles 1970–1974. Two months later, and nearly thirty years after the album's original release, RPM re-issued Kid in a Big World. In early 2004, Uncut magazine gave the re-issue a 5-star review, in which reviewer Paul Lester wrote that Kid in a Big World is a magnificent collection of rococo balladry and florid vignettes from a singer-songwriter who might have rivalled Elton or Bowie had his record company managed to market him right during that strange nether-period between glam and punk. Howard, wrote Lester, is "the missing link between Noel Coward and ... Momus." Coward is a frequent reference in reviews of Howard's music. In 2006, a couple of years after the re-issue of Kid, the Manchester poet Robert Cochrane – who collaborated as the lyricist on Howard's 2005 album The Dangerous Hours – observed that Kid is "Noel Coward getting fruit with Elton and Ziggy." Writing in The Guardian, in 2005, Alex Petridis mused that, when Kid was "[r]eissued to critical raves, its florid, glam piano balladry seemed more contemporary in the age of Rufus Wainwright than it must have done at the height of pub rock." A few weeks after the Uncut review, a London show by Howard – organized by RPM to celebrate the re-issue of Kid – included in the audience Lawrence of Felt, Peter Astor of The Weather Prophets and rock biographer Nina Antonia, further attesting to Howard's influence. In 2004 and 2005, respectively, RPM issued the other two (unreleased) albums of the Kid trilogy – Technicolour Biography and Can You Hear Me OK? The first of these prompted a less predictable appearance by Coward, in a review by Anthony Reynolds, who wrote that Technicolour Biography's "title track...sound[s] like the hangover to the night out of the preceding track. Grand, grand piano and a masterful vocal hinting at distant choirs and philharmonics, telling of wide-screen sagas of beaches and car lots, of premieres at empty cinemas. It's like Coward writes Kerouac." During this period, Howard entered a second stage of creative output, recording and releasing more than seven albums' worth of new material from 2004 to the present. In a four-star review of The Dangerous Hours (2005), Howard's collaboration with Robert Cochrane and his first new album release in 30 years, Alexis Petridis wrote in The Guardian that the intervening decades have done nothing to blunt the edge on Howard's songs. Nor have they dulled the flamboyance of his delivery ... Thirty years on, he still sounds astonishing – a man making up for lost time with enviable panache." The album, wrote Stephen Thomas Erlewine in his own four-star review, has "all of the hallmarks of [Howard's] '70s work – big, sweeping, cinematic choruses, lush, sighing melodies, music that is once dramatic and intimate," and "Cochrane's words...flow like Howard's own." Musically "spare and simple, just Howard and his piano, occasionally embellished with a synthesizer and overdubbed vocals," the album is "a perfect soundtrack for either late-night introspection or a contemplative Sunday morning. The best thing about The Dangerous Hours...[is] that it proves that his skills as a craftsman are untarnished after all these years." Later that year, Howard released on RPM parent label Cherry Red what Erlewine called Howard's "true comeback" album, the wryly titled As I Was Saying (2005), the first album collection of new, original all-Howard songs since 1975. The album features ex-Lush bass guitarist Phil King on electric bass and Andre Barreau – who plays George Harrison in the Beatles tribute band The Bootleg Beatles and who also was the lead guitarist on Robbie Williams's 1997 single, "Angels" – on guitars. "The voice," wrote Helen Wright, "is in peak condition – richer than in his youth but retaining all the character, and sounding more and more like a slightly posher John Lennon." Wright singled out the song "Oh, Do Give It A Rest, Love" – which Dickon Edwards had called the album's "epic centrepiece" – as "a tour-de-force, a seven-minute epic of wit and bitchiness that manages to include pretty well the entire history of pop music." Erlewine wrote that Howard's writing is as strong as it was in the '70s – clever...in his lyrics and graceful in his melodies....Howard is clearly an older songwriter, and has become more sentimental with time, but instead of turning him saccharine, it has given him a warm, hazy glow appropriate for his sweet melodicism, which has not diminished over time....[I]t's a quiet, understated gem of a comeback. "The songs are still pouring out," 2006–2007 The momentum of new songwriting and recording continued with Howard's next album Same Bed, Different Dreams (2006), released on the small French label Disques Eurovisions. Although the release of Same Bed was delayed until the summer of 2006 – the year after 2005's Dangerous Hours and As I Was Saying – Howard had laid down and sent to Eurovisions demos of all 14 of the album's songs in January 2004. So these actually were the first new songs that Howard recorded after the re-issue of Kid in a Big World in November 2003. Reviewing Same Bed for the French magazine Les Inrockuptibles, Celine Remy called it "an authentic hidden treasure of eccentric pop: the kind of disc that one could imagine had been reissued as a vestige of a time when Bowie still haunted the cabarets and Elton John preferred writing to shopping," with Matthieu Grunfeld in another French magazine, Magic RPM, suggesting that the album "should find a strong echo among...the fans of Ben Folds." Howard followed Same Bed, Different Dreams with Barefoot With Angels (2007). Released on the small Spanish label, Hanky Panky Records, the album includes the song, "The Exquisites," that Howard wrote for his 2005 London show at the Glam-ou-rama community's Night of a Thousand Ziggys. John Howard calls the song – which initially was inspired by Oscar Wilde's dictum that "The future belongs to the dandy. It is the exquisites who are going to rule." – my take on how glam rock saved pop music in the early '70s after the Beatles had left the scene and the '60s had ended with a whimper. T. Rex, Bowie, Roxy Music and their gorgeous chart-colleagues brought fun, great singles and beauty back to a pop scene badly in need of a polish. Barefoot also includes the song "Magdalena Merrywidow," Howard's tribute to April Ashley. Howard appeared as a pianist on two other albums in 2007: Anthony Reynolds's British Ballads (Spinney) and Darren Hayman's Darren Hayman and the Secondary Modern (Track & Field). Both albums tapped the contributions of musicians who had been extremely influential in 1980s British indie pop, with the Reynolds album featuring ex-Cocteau Twin Simon Raymonde and the Hayman album featuring Pete Astor, who had founded The Loft and The Weather Prophets. Independent releases, 2008–2013 After releasing four new albums on small independent labels from 2005 to 2007, Howard began recording, releasing and selling CDs of his music on his own label, 'John Howard' via his website Kid in a Big World, with digital releases of his entire catalog through AWAL. Howard's ninth studio album, Navigate Home (2009) – which he wrote while waiting to move from Wales to Spain and completed recording in Spain – was the first album to reflect this new approach. Reviewing the album in Dusty Wright's online pop culture magazine Culture Catch, Robert Cochrane observed: John Howard has in his early fifties reached a point of creative maturity few achieve, especially after almost twenty-five years in the "dump-bin" and it is a further irony that this album is entitled Navigate Home. During the period of its gestation, he was a temporary resident of transitory homes: the home of the past, the home within his head, and a home as yet unbuilt. Waiting to emigrate to Spain, he realized a series of songs sublimely inhabited by English ghosts, a haunting and restful work, completed and refined in his new country, but without even a hint of sunshine or sangria, only suggestions of clouds and summer showers. Knowing he was leaving England allowed him to plunder his past with a fresh and concise perspective. These songs have a longing and a sense of focused regret. Nostalgia is too obvious and unsubtle a label. There is a strange air of resolution and refinement present. It is a gathering up of half a century's memories, his most personal album so far, but free of anger and misery. Tranquil in tone, but pulled by the magnets of retrospection and anticipation, these songs have a striving but restful nature, a certain sadness, but balanced by a spirit of joyful projection. These are kindly conversations sung into an unsuspecting ear. In October 2011, Howard released the original demos for Navigate Home as a separate album, Dry Run: The "Navigate Home" Demos. This collection – chronologically, Howard's eleventh studio album – includes demos of two additional songs, "Genius" and "In Your Dreams," that did not make it onto the original album. Howard's tenth studio album, Exhibiting Tendencies (2011), had its digital release in February 2011 and its CD release in May 2011. His eleventh studio album, You Shall Go to the Ball! (2012), was released on 24 September 2012. On this 15-track collection, Howard "revisits" and elaborates on nine of his 1970s-era songs that previously had been recorded only as musically spare demos. He interweaves these revisitations with a half-dozen "soundscapes." The result, writes Joe Lepper for the digital magazine Neon Filler, "gives the album a dreamlike, almost Brian Wilson produced feel, with his forgotten songs shining brightly throughout." John Howard's twelfth studio album, Storeys (2013), was released on 25 November 2013. In his Pennyblack Music review of the album, Benjamin Howarth writes that, "for all those people who enjoyed the reissues but haven’t heard anything else, his new album Storeys feels like an ideal opportunity to catch up." Howarth continues: The process of recording music in studios has become increasingly professionalised. Most studio albums will have been engineered by someone who studiously "knows what they are doing." Indeed, they probably studied what they are doing to degree level. The author Vikram Seth once pointed out that amateur is an abused term. Its root meaning is in fact, "to love." Modern society – driven largely by corporate values – has increasingly twisted it so you automatically associate amateurism with shoddiness. I write this because John Howard is, now, effectively an "amateur" – he makes his music at home, at his own pace and releases it on his own label. Having once been bound by the requirements of an unappreciative label, he now has only himself to blame if any of his new songs fail to be released. But you'll be amazed at the scale of his ambition on these home recordings. It has become standard to automatically insert the word "humble" before the phrase "home recorded." You wouldn't do that here. Piano and keyboards are the main instruments, but underneath there are lush orchestral strings, multi-layered backing vocals and carefully placed percussion. I get the impression of the kind of reckless, uninhibited inventiveness that made pop music so exciting in the 1960s and 70s. The songs on Storeys could all have been written and recorded in any decade since the birth of pop music. The show-tune style that made Kid in a World so out-of-place in 1975 and so charming by 2001 has largely been abandoned. Instead, Howard aims for something not dissimilar to Harry Nilsson – that much sought after form of "perfect pop"...that delights record collectors, but rarely seems to catch the ear of average pop fans.... New collaborators, 2013–present Storeys was the occasion for John's Howard's first live performance in seven years. Earlier in 2013, Howard had been introduced to guitarist and music journalist Robert Rotifer – and it was Rotifer who invited him to perform in London again. The upshot was a November 2013 triple bill with Ralegh Long and Darren Hayman at the North London venue The Servant Jazz Quarters. For this show, Howard performed with his first live band for many years: Rotifer, Andy Lewis (Paul Weller's bassist) and drummer Ian Button (Papernut Cambridge). Reviewing Howard's set, Patricia Turk wrote: And then there was John Howard, and all I could think was "This is how it's done." I swiftly realised we were in the presence of an old-school master. Once touted as the next big thing, his is a story of the almost made it, a tale of the machinations of the music industry, dropped in the 1970s, only to experience a resurrection since the early 2000s, that has included influencing emerging artists like Long. His are piano-driven pop ballads that I would liken to early Elton John with a bit of Bowie. The songs have a slight glam, show-tunes touch, but they don’t feel dated or twee – instead, it's mood-enhancing music with a story to tell, songs that you feel you've known your whole life. Building on the success of this show, the four musicians hatched a plan to write and record a new album together. The fruits of their labours, John Howard & The Night Mail, was released in August 2015 on Hamburg-based Tapete Records. It was received with rapturous reviews in Mojo, Record Collector and Q magazine, as well as German Rolling Stone and several online music sites like Drowned in Sound (10 out of 10), musicOMH and Neon Filler. The band played gigs around Europe in 2016, beginning in Vienna and on to Germany, where they played Augsburg, Hamburg, Cologne and Berlin. In the Summer of 2016, Howard's first album with the Exeter-based label, Occultation Recordings, Across the Door Sill, was released in October 2016. In March 2018, Howard's first autobiography, Incidents Crowded With Life, was published by Fisher King Publishing (http://www.fisherkingpublishing.co.uk/ ). The book has been featured in a five-page article in Shindig! magazine, and had very positive reviews from the likes of David Quantick (in Mojo) and Charles Donovan (in Shindig). In April 2018, Howard's debut album, Kid in a Big World was released on L.P. by Spanish label, You Are The Cosmos. Issued with the same artwork as the original 1975 album, it promises to be a series of releases by Howard on the label, which is run by Pedro Vizcaino in Zaragoza. (http://www.youarethecosmos.com/) Also in April 2018, You Are The Cosmos put together and released a new collection of John Howard's rarer 1970s recordings, The Hidden Beauty 1973-1979. Featuring tracks produced by Eddie Pumer (Fairfield Parlour), Chris Rainbow and Trevor Horn, the L.P. has become the perfect companion-piece to Kid in a Big World, including tracks recorded leading up to and immediately following the release of that album. In March 2019, You Are The Cosmos released John's album, Cut The Wire, recorded at his home in Spain during 2018. In October 2019, John released the EP 'Four Piano Pieces', instrumental meditation pieces. In August 2020, John's 17th studio album, To The Left of The Moon's Reflection was released in America on Kool Kat Musik, his first release in The States in his 45-year recording career. The album was also issued in the UK on Howard's own label, 'John Howard', with copies of the CD also being available via You Are The Cosmos. In May 2021, Kool Kat Musik issued the first ever commercially-released Best of John Howard, the 2CD set 'Collected'. It was compiled by Edward Rogers (of duo Rogers & Butler) and mastered by Ian Button (drummer with John Howard & The Night Mail). In March 2022, Howard released his album LOOK - The Unknown Story of Danielle Du Bois, dedicated to and inspired by John's friend April Ashley. The album's fictitious narrative told how early 1960s pop star Daniel Wood moved to Paris and transitioned into Danielle Du Bois, who became one of society's glitterati, befriending the likes of Brigitte Bardot, Pierre Cardin and Josephine Baker. The album received wide acclaim from many music critics. There is a possibility that LOOK will be turned into a stage musical. LOOK was released by Kool Kat Musik. The same month in 2022, the third volume of Howard's memoirs, In The Eyeline of Furtherance, was published by Fisher King Publishing, who had published the first two volumes, Incidents Crowded With Life in 2018, and Illusions of Happiness in 2020. In September 2022, Howard's album From The Far Side of A Near Miss was released. It comprises just one 37-minute song, the title song, inspired by Howard's teenage heroes Roy Harper and The Incredible String Band, who also specialised in longform pieces. The album was released by Kool Kat Musik. In January 2023, Think Like A Key Music released John's 2019 album, Cut The Wire (which had only previously been available on CD). Then in April that year, Kool Kat Musik issued a double CD set of John's 1975 debut album, Kid In A Big World. The new reissue, Kid In A Big World + The Original Demos, contained on CD2 the previously unreleased demo recordings of the songs John eventually recorded at Abbey Road for the CBS LP. The demos were recorded in 1973 and early 1974 before John went into Abbey Road with producer Tony Meehan. The demos were also released as a single online album, Kid In A Big World: The Original Demos in June '23. In September 2023, John's first novel, Across My Dreams With Nets of Wonder, was published by Fisher King Publishing (who had also published the three volumes of Howard's memoirs). The book is a time-travel adventure which John wrote between March 2022 and July 2023. Personal life In 2006, Howard and retired theatre actor and director Neil France – Howard's partner of 20 years – were united in a civil partnership ceremony in Pembrokeshire. The next year, 2007, Howard and France moved from the United Kingdom to Murcia, Spain, where they continue to live. In May 2015, following the United Kingdom's legalization of same-sex marriage in March 2014, Howard and France had their civil partnership converted to a marriage. The ceremony took place in Anglesey in Wales. Discography Studio albums Kid In A Big World (1975 CBS (LP)/2003 RPM Records (CD)/2018 You Are The Cosmos (LP)/2007 John Howard (Online)) Technicolour Biography (1974/5 Recorded for CBS/2004 First Release RPM Records (CD)/2007 John Howard (Online)) Can You Hear Me OK? (1975 Recorded for CBS/First Released 2005 RPM Records (CD)/2018 You Are The Cosmos (LP)/2010 John Howard (Online)) The Pros And Cons Of Passion (1996 Recorded for Carlton/Released 2008 Kid In A Big World (CD)/2008 John Howard (Online)) The Dangerous Hours (2005 Bad Pressings (CD)/2007 John Howard (Online)) As I Was Saying (2005 Cherry Red (CD)/2010 John Howard (Online)) Same Bed, Different Dreams (2006 Euro Visions (CD)/2006 John Howard (Online)) Barefoot With Angels (2007 Hanky Panky (CD)/2007 John Howard (Online)) Navigate Home (2009 Kid In A Big World CD)/2009 John Howard (Online)) Dry Run: The "Navigate Home" [Demos] (2011 Kid In A Big World (CD)/2011 John Howard (Online)) Exhibiting Tendencies (2011 Kid In A Big World (CD)/2011 John Howard (Online)) You Shall Go To The Ball! (2012 Kid In A Big World (CD)/2012 John Howard (Online)) Storeys (2013 Kid In A Big World (CD)/2013 John Howard (Online)) Hello, My Name Is (2014 Kid In A Big World/2014 John Howard (Online)) John Howard & The Night Mail (2015 Tapete (CD/LP/Online)) Across the Door Sill (2016 Occultation CD/LP/Online/2019 John Howard (Online)) Cut The Wire (2019 You Are The Cosmos (CD)/2019 John Howard (Online)) To The Left of The Moon's Reflection (2020 Kool Kat Musik (CD)/2020 John Howard (Online)) LOOK: The Unknown Story Of Danielle Du Bois (2022 Kool Kat Musik (CD)/2022 John Howard (Online)) From The Far Side of A Near Miss (2022 Kool Kat Musik (CD)/2022 John Howard (Online)) Reissues Kid In A Big World (2003-2023) UK/Europe: 2003 RPM (CD), 2007 AWAL (Digital), 2018 You Are The Cosmos (Vinyl) Japan: 2018 Air Mail Records (CD), 2023 Kool Kat Musik 2CD set Can You Hear Me OK? (2005/2018) UK/Europe/USA: 2010 AWAL (Digital), 2018 You Are The Cosmos (Vinyl) Cut The Wire UK/Europe/USA: 2023 Think Like A Key Music (Vinyl) Studio E.P.s Walk on the Wild Side (John Howard/AWAL (digital), 2007) My Beautiful Days (John Howard/AWAL (digital), 2007) The Bewlay Brothers (John Howard/AWAL (digital), 2007) Songs for the Lost and Found (John Howard/AWAL (digital), 2008) Songs for a Lifetime (John Howard/AWAL (digital), 2009) Atmospheres & Soundscapes (John Howard/AWAL (digital), 2012) Loved Songs (John Howard/AWAL (digital), 2013) Front Room Fables: Home Demos 1970–1972 (John Howard/AWAL (digital), 2013) Songs for Someone (John Howard/AWAL (digital), 2014) Songs For Randall (John Howard/AWAL (digital), 2016) Songs From The Morning (John Howard/AWAL (digital), 2018) Four Piano Pieces (John Howard/AWAL (digital), 2019) Released singles and B-sides Solo "Goodbye Suzie," from Kid in a Big World; Tony Meehan, producer/"Third Man," Paul Phillips, producer (CBS 1974) "Family Man," from Kid in a Big World; Paul Phillips, producer/"Missing Key," from Kid In A Big World; Tony Meehan, producer (CBS, 1975) "I Got My Lady," from Can You Hear Me OK?; Biddu, producer/"You're Mine Tonight," from Can You Hear Me OK?; Biddu, producer (CBS, 1975) "I Can Breathe Again" / "You Take My Breath Away" (Ariola, 1978; Trevor Horn, producer) "Don't Shine Your Light" / "Baby Go Now" (double A-side) (SRT, 1979; Trevor Horn, producer) "I Tune into You" / "Gotta New Toy" (CBS, 1980; Nicky Graham, producer) "Lonely I, Lonely Me" / "Gotta New Toy (remix)" (CBS, 1980; Nicky Graham, producer) "Nothing More To Say" (written by Pete Bite) / "You Keep Me Steady" (written by John Howard) (Loose Records, 1984; Pete Bite, producer) "Lion in My Winter" / "Take the Weight" (John Howard/AWAL (digital), 2009) "The Dilemma of the Homosapien" / "These Fifty Years" (John Howard/AWAL (digital) reissue, 2009) "Ballad of Sam Mary Ann" (written by John Howard/Robert Cochrane) / "Beautiful Poppies at Even" (written by John Howard/James Lyons) (John Howard/AWAL (digital), 2012) "The Deal (Revisited)" / "The Deal (Original 1975 demo version)" (John Howard/AWAL (digital), 2012) "I Tune Into You" / "Lonely I, Lonely Me" (original release CBS, March 1980 & August 1980; John Howard/AWAL (digital) double A-sided reissue, 2013) "From The Morning" (John Howard/AWAL (digital), 2017) "It's Not All Over Yet" (John Howard/AWAL (digital), 2020) "In The Stillbeat of A Silent Day" (John Howard/AWAL (digital), 2020) "One of Those Pretty Mornings" (John Howard/AWAL (digital), 2020) "Christmas Was Made For The Children" / "No Return" (John Howard/AWAL (digital) 2022) As Quiz (with Steve Levine) "It's You I Want" (written by John Howard) / "Searching for Someone" (written by Steve Levine/Simon Humphreys) (Satril, 1981; Steve Levine, producer) "And the World" (written by John Howard/Steve Levine) / "Call on You" (written by John Howard) (Hit City, 1981; Steve Levine, producer) John Howard & The Night Mail: "Intact & Smiling" (written by John Howard/Andy Lewis) (Tapete Records, July 2015) "In The Light of Fires Burning" (written by John Howard/Ian Button) (Tapete Records, February 2016) Collections Sketching the Landscape: Demos, 1973–1979 (John Howard/AWAL (digital), 2008) Creating Impressions: Singles & Rarities, 1980–1990 (John Howard/AWAL (digital), 2008) These Fifty Years: The Best of John Howard (John Howard/AWAL (digital), 2009) Making Tracks: Curios & Collectables, 2001–2009 (John Howard/AWAL (digital), 2010) Not Forgotten: The Best of John Howard Vol. 2 (John Howard/AWAL (digital) (2016) The Hidden Beauty 1973-1979 (You Are The Cosmos, 2018) Collected - The Best of John Howard (2CD set) (Kool Kat Musik (CD)/John Howard (digital)) 2021 Live albums In the Room Upstairs: Live at the Briton's Protection (John Howard/AWAL (digital), 2007) More from the Room Upstairs: Live at the Briton's Protection (John Howard/AWAL (digital), 2008) Live at The Servant Jazz Quarters (John Howard/AWAL (digital), 2014) Compilation appearances Original songs "Goodbye Suzie" on Zigzag: 20 Junkshop Soft Rock Singles, 1970–1974 (RPM Records, 2003) "Goodbye Suzie" on 15-Track Pick of the Best Recent Music (Uncut magazine, June 2004) "Missing Key" on Best of 2004 Reissues, vol. 2 (Uncut magazine, December 2004) "Guess Who's Coming To Dinner" on All The Young Droogs (Cherry Red, 2019 "Small Town, Big Adventures" on Oh! You Pretty Things (Cherry Red, 2021) "Kid In A Big World" on Good As Gold (Cherry Red, 2021) "Family Man" on Separate Paths (Cherry Red, 2021) "Small Town, Big Adventures (Live)" on Pop Aid (Kool Kat Musik, 2022) "No Return" on Redrawn - A Tribute To The Pencils (Kool Kat Musik, 2023) Cover versions "Beautiful Lies" on Songs for the Next Generation, Michael Weston King tribute album (ARC Music Group, 2007) "The Bewlay Brothers" on Rebel Rebel: A Tribute to David Bowie (Uncut magazine, June 2008) "Something" on While My Guitar Gentle Weeps: Covers, Curios & the Music That Inspired George Harrison (Uncut magazine, August 2008) "No Use" (Ralegh Long cover) and "Creosote Summer" (Rotifer cover) on Ebbsfleet International: Gare du Nord Records Compilation Vol. 1 (Gare du Nord Records, October 2013) "No Return" (written by Den Pugsley) on Redrawn - A Tribute To The Pencils (Kool Kat Musik, 2023) Other album contributions Anthony Reynolds: British Ballads (Spinney, 2007) – piano Darren Hayman: Darren Hayman and the Secondary Modern (Track & Field, 2007) – piano Alex Highton: Nobody Knows Anything (Gard Du Nord, 2014) - piano Papernut Cambridge: Nutlets (Gard Du Nord, 2015) - piano The Granite Shore: Suspended Second (Occultation, 2017) - backing vocals, piano Ex Norwegian & Friends Sing Jimmy Campbell (Think Like A Key / Beyond Before, 2021) - sung and played piano on one track, "Baby Walk Out With Your Darling Man" Bibliography (Books Published)Incidents Crowded With Life'' (Autobiography), Fisher King Publishing, 2018) Illusions of Happiness (Autobiography), Fisher King Publishing, 2020) In The Eyeline of Furtherance (Autobiography), Fisher King Publishing, 2022) Across My Dreams With Nets of Wonder (Novel), Fisher King Publishing, 2023) References External links 1953 births Living people English male singer-songwriters English singer-songwriters English pop singers English rock singers Singers from Manchester Columbia Records artists Musicians from Lancashire
```xml <!-- Description: rss channel title - mixed content --> <rss version="2.0"> <channel> <title>Feed Title</title> Mixed content </channel> </rss> ```
```python # encoding: utf-8 # # # # path_to_url # # Unless required by applicable law or agreed to in writing, software # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # import logging from datetime import datetime from backend.lk.logic import appstore from backend.lk.logic import appstore_app_info from backend.lk.logic import appstore_review_notify from backend.lk.models import AppStoreApp from backend.lk.models import AppStoreAppInterest from backend.lk.models import AppStoreReview from backend.lk.models import AppStoreReviewSubscription def create_email_subscription(user, email): subs = AppStoreReviewSubscription.objects.filter(user=user) subs = list(subs.extra(where=["data->'email'=%s"], params=[email])) if subs: sub = subs[0] else: sub = AppStoreReviewSubscription(user=user) sub.email = email if sub.enabled: # Already have this sub. return None sub.enabled = True if sub.last_notification_time: # Move pointer to now so they don't get a deluge of reviews. sub.last_notification_time = datetime.now() sub.save() my_apps = appstore.mark_should_track_reviews_for_my_apps(user) appstore_review_notify.send_new_subscription_email(sub, my_apps) return sub def create_my_email_subscription(user): subs = AppStoreReviewSubscription.objects.filter(user=user) subs = list(subs.extra(where=["data->'my_email'='1'"])) if subs: sub = subs[0] else: sub = AppStoreReviewSubscription(user=user) sub.my_email = True if sub.enabled: # Already have this sub. return None sub.enabled = True if sub.last_notification_time: # Move pointer to now so they don't get a deluge of reviews. sub.last_notification_time = datetime.now() sub.save() # Note: No subscription review notification because they get a # "Reviews ready" email in a little bit. appstore.mark_should_track_reviews_for_my_apps(user) return sub def create_slack_subscription(user, slack_url): subs = AppStoreReviewSubscription.objects.filter(user=user) subs = list(subs.extra(where=["data->'slack_url'=%s"], params=[slack_url])) if subs: sub = subs[0] else: sub = AppStoreReviewSubscription(user=user) sub.slack_url = slack_url if sub.enabled: # Already have this sub. return None sub.enabled = True if sub.last_notification_time: # Move pointer to now so they don't get a deluge of reviews. sub.last_notification_time = datetime.now() sub.save() my_apps = appstore.mark_should_track_reviews_for_my_apps(user) appstore_review_notify.send_slack_subscription_configured_message(sub, my_apps) return sub def create_slack_channel_subscription(user, slack_channel_name): subs = AppStoreReviewSubscription.objects.filter(user=user) subs = list(subs.extra(where=["data->'slack_channel_name'=%s"], params=[slack_channel_name])) if subs: sub = subs[0] else: sub = AppStoreReviewSubscription(user=user) if sub.enabled: # Already have this sub. return None sub.slack_channel_name = slack_channel_name sub.enabled = True if sub.last_notification_time: # Move pointer to now so they don't get a deluge of reviews. sub.last_notification_time = datetime.now() sub.save() my_apps = appstore.mark_should_track_reviews_for_my_apps(user) appstore_review_notify.send_slack_subscription_configured_message(sub, my_apps) return sub def subscribed_slack_channel_names(user): subs = AppStoreReviewSubscription.objects.filter(user=user, enabled=True) subs = list(subs.extra(where=["(data->'slack_channel_name')::text IS NOT NULL"])) return [sub.slack_channel_name for sub in subs] def invalidate_slack_channel_subscriptions(user): AppStoreReviewSubscription.objects \ .filter(user=user) \ .extra(where=["(data->'slack_channel_name')::text IS NOT NULL"]) \ .update(enabled=False) def create_twitter_subscription_from_connection(twitter_connection): user = twitter_connection.user app = twitter_connection.app # FIXME: Add "country" to filter_app subs. interest = AppStoreAppInterest.objects.filter(user=user, app=app)[0] appstore_app_info.decorate_app(app, interest.country) twitter_handle = twitter_connection.handle if twitter_handle not in user.twitter_handles: return None subs = AppStoreReviewSubscription.objects.filter(user=user, filter_app=app, twitter_connection=twitter_connection) if subs: sub = subs[0] sub.filter_app = app else: sub = AppStoreReviewSubscription(user=user) sub.filter_app = app sub.twitter_connection = twitter_connection mark_subscription_filtered_very_good(sub, True) if sub.enabled: # Already have this sub. return None sub.enabled = True if sub.last_notification_time: # Move pointer to now so they don't get a deluge of reviews. sub.last_notification_time = datetime.now() sub.save() appstore.mark_should_track_reviews_for_my_apps(user) return sub def get_user_subscription_by_encrypted_id(user, encrypted_sub_id): sub = AppStoreReviewSubscription.find_by_encrypted_id(encrypted_sub_id) if sub and sub.user_id == user.id and sub.enabled: return sub return None def disable_subscription(subscription): subscription.enabled = False subscription.save() appstore.maybe_disable_review_tracking_for_my_apps(subscription.user) def mark_subscription_filtered_good(subscription, do_filter): subscription.filter_good = (do_filter and 1) or 0 subscription.save() def mark_subscription_filtered_very_good(subscription, do_filter): subscription.filter_very_good = (do_filter and 1) or 0 subscription.save() def subscriptions_for_user(user): my_subs = ( AppStoreReviewSubscription.objects .filter(user=user, enabled=True) .select_related('filter_app', 'twitter_connection') ) for sub in my_subs: if sub.filter_app_id: # FIXME: Add "country" to filter_app subs. interests = AppStoreAppInterest.objects.filter(user_id=user.id, app_id=sub.filter_app_id)[:1] appstore_app_info.decorate_app(sub.filter_app, interests[0].country) return my_subs def subscribed_reviews_for_user(user, app=None, start_review=None, rating=None, limit=None, country=None): if not limit: limit = 25 interested_apps = AppStoreAppInterest.objects.filter(user=user, enabled=True).values_list('app_id', 'country') if app: interested_apps = interested_apps.filter(app=app) if country: interested_apps = interested_apps.filter(country=country) interested_apps = list(interested_apps) if not interested_apps: return [] matching_apps_by_country = {} for app_id, country in interested_apps: if country not in matching_apps_by_country: matching_apps_by_country[country] = [] matching_apps_by_country[country].append(app_id) where_ors = [] params = [] for country, app_ids in matching_apps_by_country.items(): where_ors.append('country = %%s AND app_id IN (%s)' % ','.join(['%s'] * len(app_ids))) params.append(country) params += app_ids where = '((%s))' % ') OR ('.join(where_ors) if rating: where += ' AND rating = %s' params.append(rating) if start_review: where += ' AND appstore_review_id < %s' params.append(start_review.appstore_review_id) params.append(limit) reviews = AppStoreReview.objects.raw(""" WITH reviews AS ( SELECT * FROM lk_appstorereview WHERE invalidated_time IS NULL AND (%s) ) SELECT * FROM reviews ORDER BY appstore_review_id DESC LIMIT %%s """ % where, params) reviews = list(reviews) app_ids = set(r.app_id for r in reviews) apps = AppStoreApp.objects.filter(id__in=list(app_ids)) apps_by_id = dict((a.id, a) for a in apps) for r in reviews: r.app = apps_by_id[r.app_id] appstore_app_info.decorate_app(r.app, r.country) return reviews ```
```c++ // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // path_to_url #if !defined(BOOST_VMD_DETAIL_IS_ARRAY_COMMON_HPP) #define BOOST_VMD_DETAIL_IS_ARRAY_COMMON_HPP #include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/comparison/equal.hpp> #include <boost/preprocessor/control/if.hpp> #include <boost/preprocessor/control/iif.hpp> #include <boost/preprocessor/facilities/empty.hpp> #include <boost/preprocessor/tuple/elem.hpp> #include <boost/preprocessor/tuple/size.hpp> #include <boost/vmd/identity.hpp> #include <boost/vmd/is_empty.hpp> #include <boost/vmd/is_number.hpp> #include <boost/vmd/is_tuple.hpp> #include <boost/vmd/detail/is_empty_tuple.hpp> #define BOOST_VMD_DETAIL_IS_ARRAY_SYNTAX(tuple) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_PP_EQUAL(2,BOOST_PP_TUPLE_SIZE(tuple)), \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_ARRAY_FORM, \ BOOST_VMD_IDENTITY(0) \ ) \ (tuple) \ ) \ /**/ #define BOOST_VMD_DETAIL_IS_ARRAY_SYNTAX_D(d,tuple) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_PP_EQUAL_D(d,2,BOOST_PP_TUPLE_SIZE(tuple)), \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_ARRAY_FORM_D, \ BOOST_VMD_IDENTITY(0) \ ) \ (d,tuple) \ ) \ /**/ /* Check if the first element of the tuple is equal to the number of tuple elements of the second element */ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC_MATCH_SIZE(x) \ BOOST_PP_EQUAL(BOOST_PP_TUPLE_ELEM(0,x),BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_ELEM(1,x))) \ /**/ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC_MATCH_SIZE_D(d,x) \ BOOST_PP_EQUAL_D(d,BOOST_PP_TUPLE_ELEM(0,x),BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_ELEM(1,x))) \ /**/ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_EMPTY(tuple) \ BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_SIZE(BOOST_PP_TUPLE_ELEM(1,tuple)) \ /**/ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_EMPTY_D(d,tuple) \ BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_SIZE(BOOST_PP_TUPLE_ELEM(1,tuple)) \ /**/ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC_MATCH(tuple) \ BOOST_PP_IF \ ( \ BOOST_PP_TUPLE_ELEM(0,tuple), \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC_MATCH_SIZE, \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_EMPTY \ ) \ (tuple) \ /**/ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC_MATCH_D(d,tuple) \ BOOST_PP_IF \ ( \ BOOST_PP_TUPLE_ELEM(0,tuple), \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC_MATCH_SIZE_D, \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_EMPTY_D \ ) \ (d,tuple) \ /**/ /* Check if the first element is numeric */ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC(tuple) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_VMD_DETAIL_IS_ARRAY_NUM(BOOST_PP_TUPLE_ELEM(0,tuple)), \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC_MATCH, \ BOOST_VMD_IDENTITY(0) \ ) \ (tuple) \ ) \ /**/ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC_D(d,tuple) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_VMD_DETAIL_IS_ARRAY_NUM(BOOST_PP_TUPLE_ELEM(0,tuple)), \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC_MATCH_D, \ BOOST_VMD_IDENTITY(0) \ ) \ (d,tuple) \ ) \ /**/ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMBER(tuple) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_VMD_IS_NUMBER(BOOST_PP_TUPLE_ELEM(0,tuple)), \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC, \ BOOST_VMD_IDENTITY(0) \ ) \ (tuple) \ ) \ /**/ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMBER_D(d,tuple) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_VMD_IS_NUMBER(BOOST_PP_TUPLE_ELEM(0,tuple)), \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMERIC_D, \ BOOST_VMD_IDENTITY(0) \ ) \ (d,tuple) \ ) \ /**/ /* Check if the second element is a tuple */ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_ARRAY_FORM(tuple) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_VMD_IS_TUPLE(BOOST_PP_TUPLE_ELEM(1,tuple)), \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMBER, \ BOOST_VMD_IDENTITY(0) \ ) \ (tuple) \ ) \ /**/ #define BOOST_VMD_DETAIL_IS_ARRAY_CHECK_ARRAY_FORM_D(d,tuple) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_VMD_IS_TUPLE(BOOST_PP_TUPLE_ELEM(1,tuple)), \ BOOST_VMD_DETAIL_IS_ARRAY_CHECK_NUMBER_D, \ BOOST_VMD_IDENTITY(0) \ ) \ (d,tuple) \ ) \ /**/ #define BOOST_VMD_DETAIL_IS_ARRAY_NUM(x) BOOST_VMD_IS_EMPTY(BOOST_PP_CAT(BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_, x) BOOST_PP_EMPTY()) #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_0 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_1 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_2 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_3 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_4 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_5 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_6 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_7 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_8 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_9 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_10 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_11 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_12 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_13 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_14 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_15 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_16 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_17 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_18 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_19 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_20 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_21 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_22 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_23 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_24 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_25 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_26 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_27 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_28 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_29 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_30 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_31 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_32 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_33 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_34 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_35 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_36 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_37 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_38 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_39 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_40 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_41 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_42 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_43 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_44 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_45 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_46 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_47 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_48 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_49 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_50 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_51 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_52 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_53 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_54 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_55 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_56 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_57 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_58 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_59 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_60 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_61 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_62 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_63 #define BOOST_VMD_DETAIL_IS_ARRAY_NUM_HELPER_64 #endif /* BOOST_VMD_DETAIL_IS_ARRAY_COMMON_HPP */ ```
Stefko Konstantinov Velichkov (; born 15 August 1949) is a former Bulgarian football defender who played for Bulgaria at the 1974 FIFA World Cup. He also played for Spartak Pleven, Akademik Svishtov, Etar Veliko Tarnovo and CSKA Sofia. Honours Club CSKA Sofia Bulgarian A Group (2): 1974–75, 1975–76 References External links FIFA profile 1949 births Living people Bulgarian men's footballers Bulgaria men's international footballers OFC Spartak Pleven players OFC Akademik Svishtov players FC Etar (Veliko Tarnovo) players PFC CSKA Sofia players First Professional Football League (Bulgaria) players Men's association football defenders 1974 FIFA World Cup players Bulgarian football managers Footballers from Pleven OFC Spartak Pleven managers
```html <!DOCTYPE html> <title>404/301 redirect</title> <meta http-equiv="refresh" content="0;URL=path_to_url"/> ```
Arsenic and Old Lace (also called the Attention Cocktail or the Atty) is a classic cocktail with its origins in the 1910's made with gin, crème de violette, dry vermouth and absinthe. The first appearance of a cocktail with these four parts, albeit in equal quantities, was in Hugo Ensslin's Recipes for Mixed Drinks published in 1917, called the "Attention Cocktail". The 1930 edition of The Savoy Cocktail Book, a drink with those four ingredients, rebranded as the "Atty Cocktail" had ratios that more closely matched the modern Arsenic and Old Lace. "The Atty" first appears under the name "Arsenic and Old Lace" in 1941, published in the Cocktail Guide and Ladies' Companion by former Broadway producer Crosby Gaige. Around the same time, Joseph Kesselring's play Arsenic and Old Lace opened on Broadway in January 1941. The timing strongly implies a connection, though it is speculative to say whether Gaige was the one who renamed the cocktail. Variations A similar drink with orange juice in place of absinthe is called the "Jupiter cocktail". See also White Cargo Aviation References Cocktails with gin Cocktails with crème de violette Cocktails with vermouth Cocktails with absinthe Cocktails with orange juice
Arroyo Hondo (Spanish: deep stream) may refer to: United States Arroyo Hondo (Santa Clara County, California), a stream Arroyo Hondo, Santa Fe County, New Mexico, a census-designated place Arroyo Hondo, Taos County, New Mexico, a census-designated place Arroyo Hondo Pueblo in New Mexico Hondo Creek, Texas; site of the 1842 Battle of Arroyo Hondo Other nations Arroyohondo, a municipality in Colombia Arroyo Hondo, Cuba, a settlement in Guantánamo municipality
```java package org.eclipse.milo.opcua.sdk.client.model.nodes.variables; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import org.eclipse.milo.opcua.sdk.client.OpcUaClient; import org.eclipse.milo.opcua.sdk.client.model.types.variables.DataTypeDescriptionType; import org.eclipse.milo.opcua.sdk.client.nodes.UaNode; import org.eclipse.milo.opcua.stack.core.AttributeId; import org.eclipse.milo.opcua.stack.core.StatusCodes; import org.eclipse.milo.opcua.stack.core.UaException; import org.eclipse.milo.opcua.stack.core.types.builtin.ByteString; import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId; import org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText; import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId; import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName; import org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode; import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte; import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger; import org.eclipse.milo.opcua.stack.core.types.enumerated.NodeClass; public class DataTypeDescriptionTypeNode extends BaseDataVariableTypeNode implements DataTypeDescriptionType { public DataTypeDescriptionTypeNode(OpcUaClient client, NodeId nodeId, NodeClass nodeClass, QualifiedName browseName, LocalizedText displayName, LocalizedText description, UInteger writeMask, UInteger userWriteMask, DataValue value, NodeId dataType, Integer valueRank, UInteger[] arrayDimensions, UByte accessLevel, UByte userAccessLevel, Double minimumSamplingInterval, Boolean historizing) { super(client, nodeId, nodeClass, browseName, displayName, description, writeMask, userWriteMask, value, dataType, valueRank, arrayDimensions, accessLevel, userAccessLevel, minimumSamplingInterval, historizing); } @Override public String getDataTypeVersion() throws UaException { PropertyTypeNode node = getDataTypeVersionNode(); return (String) node.getValue().getValue().getValue(); } @Override public void setDataTypeVersion(String dataTypeVersion) throws UaException { PropertyTypeNode node = getDataTypeVersionNode(); node.setValue(new Variant(dataTypeVersion)); } @Override public String readDataTypeVersion() throws UaException { try { return readDataTypeVersionAsync().get(); } catch (ExecutionException | InterruptedException e) { throw UaException.extract(e).orElse(new UaException(StatusCodes.Bad_UnexpectedError, e)); } } @Override public void writeDataTypeVersion(String dataTypeVersion) throws UaException { try { writeDataTypeVersionAsync(dataTypeVersion).get(); } catch (ExecutionException | InterruptedException e) { throw UaException.extract(e).orElse(new UaException(StatusCodes.Bad_UnexpectedError, e)); } } @Override public CompletableFuture<? extends String> readDataTypeVersionAsync() { return getDataTypeVersionNodeAsync().thenCompose(node -> node.readAttributeAsync(AttributeId.Value)).thenApply(v -> (String) v.getValue().getValue()); } @Override public CompletableFuture<StatusCode> writeDataTypeVersionAsync(String dataTypeVersion) { DataValue value = DataValue.valueOnly(new Variant(dataTypeVersion)); return getDataTypeVersionNodeAsync() .thenCompose(node -> node.writeAttributeAsync(AttributeId.Value, value)); } @Override public PropertyTypeNode getDataTypeVersionNode() throws UaException { try { return getDataTypeVersionNodeAsync().get(); } catch (ExecutionException | InterruptedException e) { throw UaException.extract(e).orElse(new UaException(StatusCodes.Bad_UnexpectedError, e)); } } @Override public CompletableFuture<? extends PropertyTypeNode> getDataTypeVersionNodeAsync() { CompletableFuture<UaNode> future = getMemberNodeAsync("path_to_url", "DataTypeVersion", ExpandedNodeId.parse("nsu=path_to_url"), false); return future.thenApply(node -> (PropertyTypeNode) node); } @Override public ByteString getDictionaryFragment() throws UaException { PropertyTypeNode node = getDictionaryFragmentNode(); return (ByteString) node.getValue().getValue().getValue(); } @Override public void setDictionaryFragment(ByteString dictionaryFragment) throws UaException { PropertyTypeNode node = getDictionaryFragmentNode(); node.setValue(new Variant(dictionaryFragment)); } @Override public ByteString readDictionaryFragment() throws UaException { try { return readDictionaryFragmentAsync().get(); } catch (ExecutionException | InterruptedException e) { throw UaException.extract(e).orElse(new UaException(StatusCodes.Bad_UnexpectedError, e)); } } @Override public void writeDictionaryFragment(ByteString dictionaryFragment) throws UaException { try { writeDictionaryFragmentAsync(dictionaryFragment).get(); } catch (ExecutionException | InterruptedException e) { throw UaException.extract(e).orElse(new UaException(StatusCodes.Bad_UnexpectedError, e)); } } @Override public CompletableFuture<? extends ByteString> readDictionaryFragmentAsync() { return getDictionaryFragmentNodeAsync().thenCompose(node -> node.readAttributeAsync(AttributeId.Value)).thenApply(v -> (ByteString) v.getValue().getValue()); } @Override public CompletableFuture<StatusCode> writeDictionaryFragmentAsync(ByteString dictionaryFragment) { DataValue value = DataValue.valueOnly(new Variant(dictionaryFragment)); return getDictionaryFragmentNodeAsync() .thenCompose(node -> node.writeAttributeAsync(AttributeId.Value, value)); } @Override public PropertyTypeNode getDictionaryFragmentNode() throws UaException { try { return getDictionaryFragmentNodeAsync().get(); } catch (ExecutionException | InterruptedException e) { throw UaException.extract(e).orElse(new UaException(StatusCodes.Bad_UnexpectedError, e)); } } @Override public CompletableFuture<? extends PropertyTypeNode> getDictionaryFragmentNodeAsync() { CompletableFuture<UaNode> future = getMemberNodeAsync("path_to_url", "DictionaryFragment", ExpandedNodeId.parse("nsu=path_to_url"), false); return future.thenApply(node -> (PropertyTypeNode) node); } } ```
```java /******************************************************************************* * All rights reserved. This program and the accompanying materials * which accompanies this distribution, and is available at * path_to_url * * * Contributors: * Microsoft Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.ls.core.internal.managers; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.io.File; import java.nio.file.FileVisitOption; import java.nio.file.Files; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.EnumSet; import java.util.List; import java.util.Set; import java.util.function.Function; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.launching.JavaRuntime; import org.eclipse.jdt.ls.core.internal.JavaProjectHelper; import org.eclipse.jdt.ls.core.internal.ProjectUtils; import org.eclipse.jdt.ls.core.internal.ResourceUtils; import org.eclipse.jdt.ls.core.internal.TestVMType; import org.eclipse.jdt.ls.core.internal.managers.InvisibleProjectImporter.JavaFileDetector; import org.eclipse.jdt.ls.core.internal.preferences.ClientPreferences; import org.eclipse.jdt.ls.core.internal.preferences.Preferences; import org.eclipse.lsp4j.FileSystemWatcher; import org.eclipse.lsp4j.RelativePattern; import org.junit.Test; public class InvisibleProjectImporterTest extends AbstractInvisibleProjectBasedTest { @Test public void importIncompleteFolder() throws Exception { IProject invisibleProject = copyAndImportFolder("maven/salut/src/main/java/org/sample", "Bar.java"); assertFalse(invisibleProject.exists()); } @Test public void importCompleteFolder() throws Exception { IProject invisibleProject = copyAndImportFolder("singlefile/lesson1", "src/org/samples/HelloWorld.java"); assertTrue(invisibleProject.exists()); assertTrue(invisibleProject.hasNature(UnmanagedFolderNature.NATURE_ID)); IPath sourcePath = invisibleProject.getFolder(new Path(ProjectUtils.WORKSPACE_LINK).append("src")).getFullPath(); assertTrue(ProjectUtils.isOnSourcePath(sourcePath, JavaCore.create(invisibleProject))); } @Test public void importCompleteFolderWithoutTriggerFile() throws Exception { IProject invisibleProject = copyAndImportFolder("singlefile/lesson1", null); assertFalse(invisibleProject.exists()); } @Test public void importPartialMavenFolder() throws Exception { File projectFolder = copyFiles("maven/salut-java11", true); IPath projectFullPath = Path.fromOSString(projectFolder.getAbsolutePath()); IPath rootPath = projectFullPath.append("src"); IProject invisibleProject = importRootFolder(rootPath, "main/java/org/sample/Bar.java"); assertFalse(invisibleProject.exists()); } @Test public void importPartialGradleFolder() throws Exception { File projectFolder = copyFiles("gradle/gradle-11", true); IPath projectFullPath = Path.fromOSString(projectFolder.getAbsolutePath()); IPath rootPath = projectFullPath.append("src"); IProject invisibleProject = importRootFolder(rootPath, "main/java/foo/bar/Foo.java"); assertFalse(invisibleProject.exists()); } @Test public void automaticJarDetectionLibUnderSource() throws Exception { ClientPreferences mockCapabilies = mock(ClientPreferences.class); when(mockCapabilies.isWorkspaceChangeWatchedFilesDynamicRegistered()).thenReturn(Boolean.TRUE); when(preferenceManager.getClientPreferences()).thenReturn(mockCapabilies); File projectFolder = createSourceFolderWithLibs("automaticJarDetectionLibUnderSource"); IProject invisibleProject = importRootFolder(projectFolder, "Test.java"); assertNoErrors(invisibleProject); IJavaProject javaProject = JavaCore.create(invisibleProject); IClasspathEntry[] classpath = javaProject.getRawClasspath(); assertEquals("Unexpected classpath:\n" + JavaProjectHelper.toString(classpath), 3, classpath.length); assertEquals("foo.jar", classpath[2].getPath().lastSegment()); assertEquals("foo-sources.jar", classpath[2].getSourceAttachmentPath().lastSegment()); List<FileSystemWatcher> watchers = projectsManager.registerWatchers(); //watchers.sort((a, b) -> a.getGlobPattern().compareTo(b.getGlobPattern())); assertEquals(12, watchers.size()); // basic(9) + project(1) + library(1) String srcGlobPattern = watchers.stream().map(FileSystemWatcher::getGlobPattern).map(globPattern -> globPattern.map(Function.identity(), RelativePattern::getPattern)).filter("**/src/**"::equals).findFirst().get(); assertTrue("Unexpected source glob pattern: " + srcGlobPattern, srcGlobPattern.equals("**/src/**")); String projGlobPattern = watchers.stream().map(FileSystemWatcher::getGlobPattern).map(globPattern -> globPattern.map(Function.identity(), RelativePattern::getPattern)).filter(w -> w.endsWith(projectFolder.getName() + "/**")) .findFirst().get(); assertTrue("Unexpected project glob pattern: " + projGlobPattern, projGlobPattern.endsWith(projectFolder.getName() + "/**")); String libGlobPattern = watchers.stream().map(FileSystemWatcher::getGlobPattern).map(globPattern -> globPattern.map(Function.identity(), RelativePattern::getPattern)).filter(w -> w.endsWith(projectFolder.getName() + "/lib/**")) .findFirst().get(); assertTrue("Unexpected library glob pattern: " + libGlobPattern, libGlobPattern.endsWith(projectFolder.getName() + "/lib/**")); } public void automaticJarDetection() throws Exception { ClientPreferences mockCapabilies = mock(ClientPreferences.class); when(mockCapabilies.isWorkspaceChangeWatchedFilesDynamicRegistered()).thenReturn(Boolean.TRUE); when(preferenceManager.getClientPreferences()).thenReturn(mockCapabilies); File projectFolder = createSourceFolderWithLibs("automaticJarDetection", "src", true); IProject invisibleProject = importRootFolder(projectFolder, "Test.java"); assertNoErrors(invisibleProject); IJavaProject javaProject = JavaCore.create(invisibleProject); IClasspathEntry[] classpath = javaProject.getRawClasspath(); assertEquals("Unexpected classpath:\n" + JavaProjectHelper.toString(classpath), 3, classpath.length); assertEquals("foo.jar", classpath[2].getPath().lastSegment()); assertEquals("foo-sources.jar", classpath[2].getSourceAttachmentPath().lastSegment()); List<FileSystemWatcher> watchers = projectsManager.registerWatchers(); watchers.sort((a, b) -> a.getGlobPattern().map(Function.identity(), RelativePattern::getPattern).compareTo(b.getGlobPattern().map(Function.identity(), RelativePattern::getPattern))); assertEquals(10, watchers.size()); String srcGlobPattern = watchers.get(7).getGlobPattern().map(Function.identity(), RelativePattern::getPattern); assertTrue("Unexpected source glob pattern: " + srcGlobPattern, srcGlobPattern.equals("**/src/**")); String libGlobPattern = watchers.get(9).getGlobPattern().map(Function.identity(), RelativePattern::getPattern); assertTrue("Unexpected lib glob pattern: " + libGlobPattern, libGlobPattern.endsWith(projectFolder.getName() + "/lib/**")); } @Test public void getPackageNameFromRelativePathOfEmptyFile() throws Exception { File projectFolder = copyFiles("singlefile", true); IProject invisibleProject = importRootFolder(projectFolder, "lesson1/Test.java"); assertTrue(invisibleProject.exists()); IPath workspaceRoot = Path.fromOSString(projectFolder.getAbsolutePath()); IPath javaFile = workspaceRoot.append("lesson1/Test.java"); String packageName = InvisibleProjectImporter.getPackageName(javaFile, workspaceRoot, JavaCore.create(invisibleProject)); assertEquals("lesson1", packageName); } @Test public void getPackageNameFromNearbyNonEmptyFile() throws Exception { File projectFolder = copyFiles("singlefile", true); IProject invisibleProject = importRootFolder(projectFolder, "lesson1/samples/Empty.java"); assertTrue(invisibleProject.exists()); IPath workspaceRoot = Path.fromOSString(projectFolder.getAbsolutePath()); IPath javaFile = workspaceRoot.append("lesson1/samples/Empty.java"); String packageName = InvisibleProjectImporter.getPackageName(javaFile, workspaceRoot, JavaCore.create(invisibleProject)); assertEquals("samples", packageName); } @Test public void getPackageNameInSrcEmptyFile() throws Exception { File projectFolder = copyFiles("singlefile", true); IProject invisibleProject = importRootFolder(projectFolder, "lesson1/src/main/java/demosamples/Empty1.java"); assertTrue(invisibleProject.exists()); IPath workspaceRoot = Path.fromOSString(projectFolder.getAbsolutePath()); IPath javaFile = workspaceRoot.append("lesson1/src/main/java/demosamples/Empty1.java"); String packageName = InvisibleProjectImporter.getPackageName(javaFile, workspaceRoot, JavaCore.create(invisibleProject)); assertEquals("main.java.demosamples", packageName); } @Test public void getPackageName() throws Exception { File projectFolder = copyFiles("singlefile", true); IProject invisibleProject = importRootFolder(projectFolder, "Single.java"); assertTrue(invisibleProject.exists()); IPath workspaceRoot = Path.fromOSString(projectFolder.getAbsolutePath()); IPath javaFile = workspaceRoot.append("Single.java"); String packageName = InvisibleProjectImporter.getPackageName(javaFile, workspaceRoot, JavaCore.create(invisibleProject)); assertEquals("", packageName); } @Test public void testPreviewFeaturesEnabledByDefault() throws Exception { String defaultJVM = JavaRuntime.getDefaultVMInstall().getId(); try { TestVMType.setTestJREAsDefault("22"); IProject invisibleProject = copyAndImportFolder("singlefile/java14", "foo/bar/Foo.java"); assertTrue(invisibleProject.exists()); assertNoErrors(invisibleProject); IJavaProject javaProject = JavaCore.create(invisibleProject); assertEquals(JavaCore.ENABLED, javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, false)); assertEquals(JavaCore.IGNORE, javaProject.getOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, false)); } finally { TestVMType.setTestJREAsDefault(defaultJVM); } } @Test public void testPreviewFeaturesDisabledForNotLatestJDK() throws Exception { String defaultJVM = JavaRuntime.getDefaultVMInstall().getId(); try { String secondToLastJDK = JavaCore.getAllVersions().get(JavaCore.getAllVersions().size() - 2); TestVMType.setTestJREAsDefault(secondToLastJDK); IProject invisibleProject = copyAndImportFolder("singlefile/lesson1", "src/org/samples/HelloWorld.java"); assertTrue(invisibleProject.exists()); assertNoErrors(invisibleProject); IJavaProject javaProject = JavaCore.create(invisibleProject); assertEquals(JavaCore.DISABLED, javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true)); } finally { TestVMType.setTestJREAsDefault(defaultJVM); } } @Test public void testSpecifyingOutputPath() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectOutputPath("output"); IProject invisibleProject = copyAndImportFolder("singlefile/java14", "foo/bar/Foo.java"); waitForBackgroundJobs(); IJavaProject javaProject = JavaCore.create(invisibleProject); assertEquals(String.join("/", "", javaProject.getElementName(), ProjectUtils.WORKSPACE_LINK, "output"), javaProject.getOutputLocation().toString()); } @Test public void testSpecifyingOutputPathInsideSourcePath() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectOutputPath("output"); IProject invisibleProject = copyAndImportFolder("singlefile/java14", "foo/bar/Foo.java"); waitForBackgroundJobs(); IJavaProject javaProject = JavaCore.create(invisibleProject); boolean isOutputExcluded = false; for (IClasspathEntry entry : javaProject.getRawClasspath()) { if (entry.getEntryKind() != IClasspathEntry.CPE_SOURCE) { continue; } for (IPath excludePath : entry.getExclusionPatterns()) { if (excludePath.toString().equals("output/")) { isOutputExcluded = true; break; } } } assertTrue("Output path should be excluded from source path", isOutputExcluded); } @Test public void testSpecifyingOutputPathEqualToSourcePath() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectOutputPath("src"); copyAndImportFolder("singlefile/simple2", "src/App.java"); waitForBackgroundJobs(); } @Test(expected = CoreException.class) public void testSpecifyingAbsoluteOutputPath() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectOutputPath(new File("projects").getAbsolutePath()); copyAndImportFolder("singlefile/simple", "src/App.java"); waitForBackgroundJobs(); } @Test public void testSpecifyingEmptyOutputPath() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectOutputPath(""); IProject invisibleProject = copyAndImportFolder("singlefile/simple", "src/App.java"); waitForBackgroundJobs(); IJavaProject javaProject = JavaCore.create(invisibleProject); assertEquals(String.join("/", "", javaProject.getElementName(), "bin"), javaProject.getOutputLocation().toString()); } @Test public void testSpecifyingSourcePaths() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectSourcePaths(Arrays.asList("foo", "bar")); IProject invisibleProject = copyAndImportFolder("singlefile/java14", "foo/bar/Foo.java"); waitForBackgroundJobs(); IJavaProject javaProject = JavaCore.create(invisibleProject); IFolder linkFolder = invisibleProject.getFolder(ProjectUtils.WORKSPACE_LINK); List<String> sourcePaths = new ArrayList<>(); for (IClasspathEntry entry : javaProject.getRawClasspath()) { if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) { sourcePaths.add(entry.getPath().makeRelativeTo(linkFolder.getFullPath()).toString()); } } assertEquals(1, sourcePaths.size()); assertTrue(sourcePaths.contains("foo")); } @Test public void testSpecifyingEmptySourcePaths() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectSourcePaths(Collections.emptyList()); IProject invisibleProject = copyAndImportFolder("singlefile/java14", "foo/bar/Foo.java"); waitForBackgroundJobs(); IJavaProject javaProject = JavaCore.create(invisibleProject); IFolder linkFolder = invisibleProject.getFolder(ProjectUtils.WORKSPACE_LINK); List<String> sourcePaths = new ArrayList<>(); for (IClasspathEntry entry : javaProject.getRawClasspath()) { if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) { sourcePaths.add(entry.getPath().makeRelativeTo(linkFolder.getFullPath()).toString()); } } assertEquals(0, sourcePaths.size()); } @Test public void testSpecifyingNestedSourcePaths() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectSourcePaths(Arrays.asList("foo", "foo/bar")); IProject invisibleProject = copyAndImportFolder("singlefile/java14", "foo/bar/Foo.java"); waitForBackgroundJobs(); IJavaProject javaProject = JavaCore.create(invisibleProject); IFolder linkFolder = invisibleProject.getFolder(ProjectUtils.WORKSPACE_LINK); List<String> sourcePaths = new ArrayList<>(); for (IClasspathEntry entry : javaProject.getRawClasspath()) { if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) { sourcePaths.add(entry.getPath().makeRelativeTo(linkFolder.getFullPath()).toString()); } } assertEquals(2, sourcePaths.size()); assertTrue(sourcePaths.contains("foo")); assertTrue(sourcePaths.contains("foo/bar")); } @Test public void testSpecifyingDuplicatedSourcePaths() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectSourcePaths(Arrays.asList("foo", "foo")); IProject invisibleProject = copyAndImportFolder("singlefile/java14", "foo/bar/Foo.java"); waitForBackgroundJobs(); IJavaProject javaProject = JavaCore.create(invisibleProject); IFolder linkFolder = invisibleProject.getFolder(ProjectUtils.WORKSPACE_LINK); List<String> sourcePaths = new ArrayList<>(); for (IClasspathEntry entry : javaProject.getRawClasspath()) { if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) { sourcePaths.add(entry.getPath().makeRelativeTo(linkFolder.getFullPath()).toString()); } } assertEquals(1, sourcePaths.size()); assertTrue(sourcePaths.contains("foo")); } @Test public void testSpecifyingRootAsSourcePaths() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectSourcePaths(Arrays.asList("")); IProject invisibleProject = copyAndImportFolder("singlefile/java14", "foo/bar/Foo.java"); waitForBackgroundJobs(); IJavaProject javaProject = JavaCore.create(invisibleProject); IFolder linkFolder = invisibleProject.getFolder(ProjectUtils.WORKSPACE_LINK); List<String> sourcePaths = new ArrayList<>(); for (IClasspathEntry entry : javaProject.getRawClasspath()) { if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) { sourcePaths.add(entry.getPath().makeRelativeTo(linkFolder.getFullPath()).toString()); } } assertEquals(1, sourcePaths.size()); assertTrue(sourcePaths.contains("")); } @Test(expected = CoreException.class) public void testSpecifyingAbsoluteSourcePath() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectSourcePaths(Arrays.asList(new File("projects").getAbsolutePath())); copyAndImportFolder("singlefile/simple", "src/App.java"); waitForBackgroundJobs(); } @Test public void testSpecifyingSourcePathsContainingOutputPath() throws Exception { Preferences preferences = preferenceManager.getPreferences(); preferences.setInvisibleProjectSourcePaths(Arrays.asList("")); preferences.setInvisibleProjectOutputPath("bin"); IProject invisibleProject = copyAndImportFolder("singlefile/java14", "foo/bar/Foo.java"); waitForBackgroundJobs(); IJavaProject javaProject = JavaCore.create(invisibleProject); for (IClasspathEntry entry : javaProject.getRawClasspath()) { if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) { assertEquals("bin/", entry.getExclusionPatterns()[0].toString()); } } } @Test public void testInferSourceRoot() throws Exception { preferenceManager.getPreferences().setJavaImportExclusions(Arrays.asList("**/excluded")); IProject invisibleProject = copyAndImportFolder("singlefile/inferSourceRoot", "lesson1/Lesson1.java"); waitForBackgroundJobs(); IFolder projectFolder = invisibleProject.getFolder(ProjectUtils.WORKSPACE_LINK); IPath workspaceRoot = projectFolder.getLocation(); preferenceManager.getPreferences().setRootPaths(Arrays.asList(workspaceRoot)); IJavaProject javaProject = JavaCore.create(invisibleProject); long sourceRootsCount = Arrays.stream(javaProject.getRawClasspath()) .filter(cp -> cp.getEntryKind() == IClasspathEntry.CPE_SOURCE) .count(); assertEquals(3, sourceRootsCount); IFile unDiscoveredFile = invisibleProject.getFile("_/a/very/deep/path/Source.java"); InvisibleProjectImporter.inferSourceRoot(javaProject, unDiscoveredFile.getLocation()); waitForBackgroundJobs(); sourceRootsCount = Arrays.stream(javaProject.getRawClasspath()) .filter(cp -> cp.getEntryKind() == IClasspathEntry.CPE_SOURCE) .count(); assertEquals(4, sourceRootsCount); List<IMarker> markers = ResourceUtils.getErrorMarkers(invisibleProject); assertEquals(0, markers.size()); } @Test public void testInferSourceRoot2() throws Exception { preferenceManager.getPreferences().setJavaImportExclusions(Arrays.asList("**/excluded")); IProject invisibleProject = copyAndImportFolder("singlefile/inferSourceRoot", "Main.java"); waitForBackgroundJobs(); IFolder projectFolder = invisibleProject.getFolder(ProjectUtils.WORKSPACE_LINK); IPath workspaceRoot = projectFolder.getLocation(); preferenceManager.getPreferences().setRootPaths(Arrays.asList(workspaceRoot)); IJavaProject javaProject = JavaCore.create(invisibleProject); long sourceRootsCount = Arrays.stream(javaProject.getRawClasspath()) .filter(cp -> cp.getEntryKind() == IClasspathEntry.CPE_SOURCE) .count(); assertEquals(3, sourceRootsCount); IFile unDiscoveredFile = invisibleProject.getFile("_/a/very/deep/path/Source.java"); InvisibleProjectImporter.inferSourceRoot(javaProject, unDiscoveredFile.getLocation()); waitForBackgroundJobs(); sourceRootsCount = Arrays.stream(javaProject.getRawClasspath()) .filter(cp -> cp.getEntryKind() == IClasspathEntry.CPE_SOURCE) .count(); assertEquals(4, sourceRootsCount); List<IMarker> markers = ResourceUtils.getErrorMarkers(invisibleProject); assertEquals(0, markers.size()); } @Test public void javaFileDetectorTest() throws Exception { createMockProject(); preferenceManager.getPreferences().setJavaImportExclusions(Arrays.asList("**/excluded")); File root = new File(getSourceProjectDirectory(), "singlefile/invisibleFileDetector"); List<File> foldersToSearch = new ArrayList<>(); for (File folder : root.listFiles()) { if (folder.isDirectory()) { foldersToSearch.add(folder); } } JavaFileDetector detector = new JavaFileDetector(null); for (File file : foldersToSearch) { Files.walkFileTree(file.toPath(), EnumSet.noneOf(FileVisitOption.class), 3 /*maxDepth*/, detector); } Set<IPath> triggerFiles = detector.getTriggerFiles(); assertEquals(0, triggerFiles.size()); } private void createMockProject() throws CoreException { IProgressMonitor monitor = new NullProgressMonitor(); IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("mock"); if (!project.exists()) { IProjectDescription description = ResourcesPlugin.getWorkspace().newProjectDescription("mock"); project.create(description, monitor); project.open(monitor); description.setNatureIds(new String[] { JavaCore.NATURE_ID }); project.setDescription(description, monitor); IFolder folder = project.getFolder("_"); if (!folder.exists()) { folder.create(true, true, monitor); } IFile fakeFile = project.getFile("_/Other.java"); File file = new File(getSourceProjectDirectory(), "singlefile/invisibleFileDetector/other-project/Other.java"); fakeFile.createLink(file.toURI(), IResource.REPLACE, monitor); } } } ```