text
stringlengths
1
22.8M
The Bolshoy Irgiz (, literally Great Irgiz) or Irgiz () is a river in Samara and Saratov Oblast, Russia, a left tributary of the Volga, south of the Samara River. It is long and the area of its drainage basin is . Its headwaters are at the Obshchy Syrt adjoining the Ural River basin. It flows west and joins the Volga south of Samara. Irgiz's meandering riverbed passes the steppes. The river has snow feeding. The town of Pugachyov is located along the Irgiz. The river flows to the Volgograd Reservoir of the Volga downstream Balakovo, near Volsk. References Rivers of Samara Oblast Rivers of Saratov Oblast
```html <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>partials/extract-style | @xarc/webpack</title><meta name="description" content="Documentation for @xarc/webpack"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@xarc/webpack</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@xarc/webpack</a></li><li><a href="partials_extract_style.html">partials/extract-style</a></li></ul><h1>Module partials/extract-style</h1></div><aside class="tsd-sources"><ul><li>Defined in <a href="path_to_url#L1">partials/extract-style.ts:1</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@xarc/webpack</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="path_to_url" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> ```
```xml import { Code } from "./code"; export class QuickInput { public static QUICK_INPUT = ".quick-input-widget"; public static QUICK_INPUT_ROW = `${QuickInput.QUICK_INPUT} .quick-input-list .monaco-list-row`; public static QUICK_INPUT_INPUT = `${QuickInput.QUICK_INPUT} .quick-input-box input`; public static QUICK_INPUT_FOCUSED_ELEMENT = `${QuickInput.QUICK_INPUT_ROW}.focused .monaco-highlighted-label`; public static QUICK_INPUT_ENTRY_LABEL = `${QuickInput.QUICK_INPUT_ROW} .label-name`; public static QUICK_INPUT_ENTRY_LABEL_SPAN = `${QuickInput.QUICK_INPUT_ROW} .monaco-highlighted-label span`; constructor(private code: Code) { } public async closeQuickInput(): Promise<void> { await this.code.dispatchKeybinding("escape"); await this.waitForQuickInputClosed(); } public async waitForQuickInputOpened(retryCount?: number): Promise<void> { await this.code.waitForActiveElement(QuickInput.QUICK_INPUT_INPUT, retryCount); } public async selectQuickInputElement(index: number, close: boolean = true): Promise<void> { await this.waitForQuickInputOpened(); for (let from = 0; from < index; from++) { await this.code.dispatchKeybinding("down"); } await this.code.dispatchKeybinding("enter"); if (close) { await this.waitForQuickInputClosed(); } } private async waitForQuickInputClosed(): Promise<void> { await this.code.waitForElement(QuickInput.QUICK_INPUT, r => !!r && r.attributes.style.indexOf("display: none;") !== -1); } public async inputAndSelect(text: string): Promise<void> { await this.code.waitForSetValue(QuickInput.QUICK_INPUT_INPUT, text); await this.code.dispatchKeybinding("enter"); } public async submit(text: string): Promise<void> { await this.code.waitForSetValue(QuickInput.QUICK_INPUT_INPUT, text); await this.code.dispatchKeybinding("enter"); await this.waitForQuickInputClosed(); } public async waitForQuickInputElements(accept: (names: string[]) => boolean): Promise<void> { await this.code.waitForElements(QuickInput.QUICK_INPUT_ENTRY_LABEL, false, els => accept(els.map(e => e.textContent))); } } ```
Cedarville Airport is a public airport located two miles (3.2 km) north of Cedarville, serving Modoc County, California, United States. It is mostly used for general aviation. Facilities Cedarville Airport covers and has one runway: Runway 1/19: 4,415 x 50 ft (1,346 x 15 m), surface: asphalt References External links Airports in Modoc County, California
```c++ /*============================================================================= file LICENSE_1_0.txt or copy at path_to_url This is an auto-generated file. Do not edit! ==============================================================================*/ namespace boost { namespace fusion { struct void_; struct set_tag; struct set_iterator_tag; template < typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_ , typename T10 = void_ , typename T11 = void_ , typename T12 = void_ , typename T13 = void_ , typename T14 = void_ , typename T15 = void_ , typename T16 = void_ , typename T17 = void_ , typename T18 = void_ , typename T19 = void_ , typename T20 = void_ , typename T21 = void_ , typename T22 = void_ , typename T23 = void_ , typename T24 = void_ , typename T25 = void_ , typename T26 = void_ , typename T27 = void_ , typename T28 = void_ , typename T29 = void_ , typename T30 = void_ , typename T31 = void_ , typename T32 = void_ , typename T33 = void_ , typename T34 = void_ , typename T35 = void_ , typename T36 = void_ , typename T37 = void_ , typename T38 = void_ , typename T39 = void_ > struct set; }} ```
This is a list of the Masters (later Headmasters) and Ushers (later Second Masters) of Gresham's School, Holt. Masters, 1562–1900 1571: Master Robinson 1574–1582: Master Harrison 1585–1602: Christopher Williams 1602–1605: Rev. Richard Snoden MA 1605–1606: Rev. Francis Catlyn MA 1606–1639: Thomas Tallis MA 1639–1640: Rev. Nathaniel Gill 1640: Thomas Tallis (again) 1640–1644: Sir Thomas Witherley 1644–1646: John Fenn 1646–1659: Rev. Francis Wright MA, fellow of Merton College, Oxford 1659–1660: Rev. William Hickes MA, previously Master of Oundle 1660–1665: Rev. Henry Mazy MA 1665–1667: Rev. John Goodman (acting Master) 1667–1692: Rev. Thomas Bainbridge MA 1692–1697: Rev. William Reynolds MA 1697–1702: Edward Reynolds 1702–1715: Rev. William Reynolds MA 1715–1729: Rev. David Duncombe MA (d. 1729) 1730–1760: John Holmes - writer of textbooks on grammar, rhetoric and astronomy 1760: John Knox 1760–1787: James Smith 1787–1806: Thomas Atkins 1806–1807: Rev. Mr Babington (acting Master) 1807–1809: Thomas Atkins (again) 1809–1857: Rev. Benjamin Pulleyne, or Pullan MA, fellow of Clare College, Cambridge 1858–1867: Rev. Charles Allen Elton MA BD, fellow of Sidney Sussex College, Cambridge 1867–1900: Rev. Reginald Jolliffe Roberts MA Headmasters, 1900 to date 1900–1919: George William Saul Howson MA, formerly of Uppingham, reforming headmaster 1919–1935: J. R. Eccles MA 1935–1944: Philip Staniforth Newell MA 1944–1955: Martin John Olivier MA - previously of Rossall, later head of Guthlaxton College, Wigston Magna 1955–1982: Logie Bruce Lockhart, international rugby footballer 1982–1985: Dr Timothy Phillips Woods MA DPhil 1985–1991: Hugh Wright MA, later Chief Master of King Edward's School, Birmingham (1991–1998) and Chairman of the HMC 1991–2002: John Hardy Arkell MA, formerly head of Wrekin College 2002–2008: Anthony Roy Clark MA, - formerly head of St. Andrew's College, Grahamstown, South Africa 2008–2013 : Philip John - formerly head of King William's College, Isle of Man 2013–2014 : Nigel Flower (acting headmaster) 2014– : Douglas Robb MA MEd Ushers 1602–1606: Nicholas Stephenson ? to 1621: John Watson 1627–1632: Thomas Cooper 1632–1638: Nicholas Davie 1638: Thomas Cooper (again) 1638–1639: Henry Luce 1640: Henry Luce (again) 1640–1643: Timothy Cutler 1643–1644: Thomas Cooper (again) - hanged in 1650 as a Royalist rebel 1658–1660: Henry Mazy 1661–1665: John Goodman 1689–1692: Thomas Kellway 1692: William Chambers 1692–1695: Thomas Garrett 1695: William Rowland 1696–1697: Thomas Turner 1697–1704: Thomas Plumstead 1705–1708: John Reynolds 1708: John Fox 1708–1713: William Selth 1713–1714: John Spurling 1714–1715: William Chaplyn c. 1718: John Brooke c. 1725: John Holmes 1729: Edward Read 1770s: Christopher Stangroom 1796–1801: David Kinnebrook 1810–1811: Reverend Robert Davies 1811–1813: Peter Barney 1813–1821: Daniel Carr 1821: James Sturley 1821–1828: Thomas Beckwith 1828–1843: William Robert Taylor 1843–1851: John Slann (first Second Master) Thomas Beckwith used the title "undermaster" in 1821. Second masters 1843–1851: John Slann (last Usher) 1851: William Allen Rudkin 1851–1857: John Hubbert Kent 1858–1860: J. Rodney Phillips 1860: Berney Wodehouse Raven 1860–1862: Charles Frederick Furbank 1862–1863: Frederick Roy Dowson 1863–1864: George W. Anstiss 1864–1865: Henry David Jones 1865–1866: William Henry Hooper 1866–1867: Matthew Walter Tunnicliffe 1867: William Remington Backhouse 1867: John Robinson Wells 1867–1869: Robert Stokes 1869–1871: Robert Campbell Conolly 1871–1872: John Lowndes> 1872–1880: Stephen Bousfield 1881–1900: John Henry Howell 1900–1907: John Goodrich Wemyss Woods 1907–1919: James Ronald Eccles, later headmaster 1919–1928: John Chambré Miller 1928–1942: Joseph Foster 1942–1963: A. Bruce Douglas 1963–1970: Bernard Sankey 1970–1977: Paul V. A. Colombé 1977–1985: John Coleridge 1985–2001: Richard N. K. Copas Deputy heads (Pastoral) 2001–2006: S. Smart 2006–2016: N. C. Flower 2016–present: W.A.M. Chuter Deputy Heads (Academic) 2001–2010: N. White 2010–2013: D. Miles 2013–2016 : S. Kinder 2016–present: T.P. Hipperson Chaplains 1900–1901: R. L. Langford 1901–1908: E. E. M. Benson 1908–1930: Francis George Elwes Field, MA (Cantab.), previously headmaster of Truro Grammar School 1930–1932: J. W. Reynolds 1932–1946: Edward Francis Habershon 1946–1950: Charles L. S. Linnell 1950–1959: Wilfred Andrews 1959–1974: Douglas C. Argyle 1974–1975: Percival Hallewell Rogers (previously headmaster of Portora Royal School, Enniskillen, 1954–1973) 1975–1983 T. Ray Bowen 1983–1991: A. Wadge 1991–1992: R. Buckner 1992–2000: R. N. Myerscough 2000–2020 Bryan R. Roberts Headmasters of the Junior School 1954–1969: John B. Williams 1969–1979: Michael Hughes 1979–1984: Neville Jones The Junior School was reorganized into the Preparatory School and the Pre-Preparatory School in 1984. Headmasters of the Preparatory School 1984–2003: Tony Cuff 2003–2018: James Quick 2018-date: Catherine Braithwaite Heads of the Pre-Preparatory School 1984–1991: Penelope Moore 1991–1997: Lesley Gillick 1997–2002: Daphne Dawson-Smith 2002–2017: Janette Davidson 2017–present: Sarah Hollingsworth Housemasters and staff Boys' houses Girls' houses Notable masters John Holmes (master, 1730–1760), writer of textbooks on grammar, rhetoric and astronomy George Howson (headmaster, 1900–1919) Geoffrey Shaw (music master, 1902–1910), organist and composer C. V. Durell (assistant master, 1904–05), writer of mathematics textbooks Warin Foster Bushell (assistant master, 1907–1912), later headmaster of Michaelhouse and Birkenhead School and president of the Mathematical Association Dalziel Llewellyn Hammick (assistant master, Chemistry, 1910–1918) - research chemist Walter Greatorex (director of music, 1911–1949), composer Arnold Powell (assistant master, early 1900s), later head of Bedford Modern School and Epsom College Frank McEachran (assistant master from 1924), author Denys Thompson (assistant master, English, 1930s), editor of the quarterly Scrutiny with F. R. Leavis and of the journal The Use of English Richard D'Aeth (assistant master, 1938–1940) Charles W. Lloyd (assistant master, 1946–1951), later master of Dulwich College Logie Bruce Lockhart (headmaster, 1955–1982), Scotland rugby footballer Richard Smyth (born 1951), later head of King's School, Bruton Hugh Wright (headmaster 1985-1991), later chief master of King Edward's School, Birmingham (1991–1998) and Chairman of the HMC Patrick Thompson (assistant master, physics, 1965–1983), Conservative Member of Parliament Graeme Fife (classics master, 1970–1979), writer, playwright and broadcaster See also Gresham's School List of Old Greshamians :Category:People educated at Gresham's School References Gresham's School Lists of people by employer Lists of educators Lists of people by English school affiliation Norfolk-related lists
```java package com.tencent.wstt.gt.analysis4.obj; /** * Created by p_hongjcong on 2017/8/2. */ public class GCShake { public long startTime; public long endTime; } ```
Pericompsus ephippiatus is a species of ground beetle in the family Carabidae. It is found in Central America and North America. References Further reading Trechinae Articles created by Qbugbot Beetles described in 1830
Channa pleurophthalma, the ocellated snakehead is a species of Southeast Asian freshwater fish in the snakehead family. Description Channa pleurophthalma can reach a length of about . The body is cylindrical, laterally flattened and has an iridescent greenish or bluish basic color, with two or three big black patches, which are outlined in orange and an additional ocellus on both the opercle and tail fin. The belly is usually yellowish. The long dorsal fin has 40-43 fin rays, while the soft anal fin has 28-31 rays. This species is caught for human consumption and for the aquarium trade. Distribution and habitat This species is present in Indonesia in Sumatra and in Borneo. These fish prefer areas with black and clear waters. Species description and etymology Channa pleurophthalma was formally described in 1851 by the Dutch ichthyologist Pieter Bleeker as Ophiocephalus pleurophthalmus with the type locality given as Bandjarmasin on Borneo. The specific name is a compound of pleuro- meaning "side" and ophthalma meaning "eyed" a reference to the 2-3 eyespots or ocelli on its flanks and the single eye spots on the gill cover and on its caudal fin. References Bibliography Nora Brede, Pascal Antler: Art für Art: Schlangenkopffische: Amazonas / Die Gattungen Channa und Parachanna. Natur und Tier-Verlag (2009), Günther Sterba: Süsswasserfische der Welt. Urania-Verlag, 1990, Walter R. Courtenay & James D. Williams: Snakeheads (Pisces, Channidae) − A Biological Synopsis and Risk Assessment. U.S. Department of the Interior, U.S. Geological Survey Circular 1251, 2004 PDF pleurophthalma Taxa named by Pieter Bleeker Fish described in 1851
Manchurian is a class of Indian Chinese dish made by roughly chopping and deep-frying ingredients such as chicken, cauliflower (gobi), prawns, fish, mutton, and paneer, and then sautéeing them in a sauce flavored with soy sauce. Manchurian is the result of the adaptation of Chinese cooking and seasoning techniques to suit Indian tastes. It has become a staple of Indian Chinese cuisine. History The word "Manchurian" means native or inhabitant of Manchuria (in northeast China); the dish, however, is a creation of Chinese restaurants in India, and bears little resemblance to traditional Manchu cuisine or Northeastern Chinese cuisine. It is said to have been invented in 1975 by Nelson Wang, a cook at the Cricket Club of India in Mumbai, when a customer asked him to create a new dish, different from what was available on the menu. Wang described his invention process as starting from the basic ingredients of an Indian dish, namely chopped garlic, ginger, and green chilis, but next, instead of adding garam masala, he put in soy sauce, followed by cornstarch and the chicken itself. The dish is popular across South Asia. A popular vegetarian variant replaces chicken with cauliflower, and is commonly known as gobi manchurian. Other vegetarian variants include mushroom, baby corn, and veggie ball as the main ingredient. Variations There are two different variants of Manchurian, dry or semi dry and with gravy. Both variants are prepared by using common ingredients like corn flour, maida flour, spring onion, bell peppers, soy sauce, chili sauce, minced garlic, ground pepper, etc. and has typical garnish of spring onion. Some recipes call for use of monosodium glutamate (MSG) to increase the taste profile, though there are those who avoid it due to health concerns. Its taste can vary from mildly spicy to hot and fiery based on the recipe and personal preference. Dry or crispy Manchurian The fritters are served comparatively dry, often as a snack or starter with tomato ketchup as dipping sauce. It is popular among alcohol drinkers as a bar snack, and has been described as "an excellent drinking companion to cold beer". Manchurian with gravy The fritters are coated with a thick sauce like spicy gravy curry made of corn flour. It is generally served with varieties of rice dishes like steamed rice, Chinese fried rice, or Sichuan fried rice, as the main course. See also List of deep fried foods List of vegetable dishes References Vegetable dishes Chicken dishes Indian vegetable dishes Vegetarian dishes of India Indian chicken dishes Brassica oleracea dishes Deep fried foods Indian Chinese cuisine
The 2005 National Invitation Tournament was the 2005 edition of the annual NCAA college basketball competition. South Carolina defeated Saint Joseph's, 60–57, to earn the program's first NIT title. Selected teams Below is a list of the 40 teams selected for the tournament. Bracket Below are the four first round brackets, along with the four-team championship bracket. Semifinals & finals See also 2005 Women's National Invitation Tournament 2005 NCAA Division I men's basketball tournament 2005 NCAA Division II men's basketball tournament 2005 NCAA Division III men's basketball tournament 2005 NCAA Division I women's basketball tournament 2005 NCAA Division II women's basketball tournament 2005 NCAA Division III women's basketball tournament 2005 NAIA Division I men's basketball tournament 2005 NAIA Division II men's basketball tournament 2005 NAIA Division I women's basketball tournament 2005 NAIA Division II women's basketball tournament References National Invitation National Invitation Tournament 2000s in Manhattan Basketball competitions in New York City College sports in New York City Madison Square Garden National Invitation Tournament National Invitation Tournament Sports in Manhattan
```c /** \file ssl_helpers.c * * \brief Helper functions to set up a TLS connection. */ /* */ #include <test/ssl_helpers.h> #include "mbedtls/psa_util.h" #if defined(MBEDTLS_SSL_TLS_C) int mbedtls_test_random(void *p_rng, unsigned char *output, size_t output_len) { (void) p_rng; for (size_t i = 0; i < output_len; i++) { output[i] = rand(); } return 0; } void mbedtls_test_ssl_log_analyzer(void *ctx, int level, const char *file, int line, const char *str) { mbedtls_test_ssl_log_pattern *p = (mbedtls_test_ssl_log_pattern *) ctx; (void) level; (void) line; (void) file; if (NULL != p && NULL != p->pattern && NULL != strstr(str, p->pattern)) { p->counter++; } } void mbedtls_test_init_handshake_options( mbedtls_test_handshake_test_options *opts) { #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED) static int rng_seed = 0xBEEF; srand(rng_seed); rng_seed += 0xD0; #endif memset(opts, 0, sizeof(*opts)); opts->cipher = ""; opts->client_min_version = MBEDTLS_SSL_VERSION_UNKNOWN; opts->client_max_version = MBEDTLS_SSL_VERSION_UNKNOWN; opts->server_min_version = MBEDTLS_SSL_VERSION_UNKNOWN; opts->server_max_version = MBEDTLS_SSL_VERSION_UNKNOWN; opts->expected_negotiated_version = MBEDTLS_SSL_VERSION_TLS1_3; opts->pk_alg = MBEDTLS_PK_RSA; opts->srv_auth_mode = MBEDTLS_SSL_VERIFY_NONE; opts->mfl = MBEDTLS_SSL_MAX_FRAG_LEN_NONE; opts->cli_msg_len = 100; opts->srv_msg_len = 100; opts->expected_cli_fragments = 1; opts->expected_srv_fragments = 1; opts->legacy_renegotiation = MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION; opts->resize_buffers = 1; opts->early_data = MBEDTLS_SSL_EARLY_DATA_DISABLED; opts->max_early_data_size = -1; #if defined(MBEDTLS_SSL_CACHE_C) TEST_CALLOC(opts->cache, 1); mbedtls_ssl_cache_init(opts->cache); #if defined(MBEDTLS_HAVE_TIME) TEST_EQUAL(mbedtls_ssl_cache_get_timeout(opts->cache), MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT); #endif exit: return; #endif } void mbedtls_test_free_handshake_options( mbedtls_test_handshake_test_options *opts) { #if defined(MBEDTLS_SSL_CACHE_C) mbedtls_ssl_cache_free(opts->cache); mbedtls_free(opts->cache); #else (void) opts; #endif } #if defined(MBEDTLS_TEST_HOOKS) static void set_chk_buf_ptr_args( mbedtls_ssl_chk_buf_ptr_args *args, unsigned char *cur, unsigned char *end, size_t need) { args->cur = cur; args->end = end; args->need = need; } static void reset_chk_buf_ptr_args(mbedtls_ssl_chk_buf_ptr_args *args) { memset(args, 0, sizeof(*args)); } #endif /* MBEDTLS_TEST_HOOKS */ void mbedtls_test_ssl_buffer_init(mbedtls_test_ssl_buffer *buf) { memset(buf, 0, sizeof(*buf)); } int mbedtls_test_ssl_buffer_setup(mbedtls_test_ssl_buffer *buf, size_t capacity) { buf->buffer = (unsigned char *) mbedtls_calloc(capacity, sizeof(unsigned char)); if (NULL == buf->buffer) { return MBEDTLS_ERR_SSL_ALLOC_FAILED; } buf->capacity = capacity; return 0; } void mbedtls_test_ssl_buffer_free(mbedtls_test_ssl_buffer *buf) { if (buf->buffer != NULL) { mbedtls_free(buf->buffer); } memset(buf, 0, sizeof(*buf)); } int mbedtls_test_ssl_buffer_put(mbedtls_test_ssl_buffer *buf, const unsigned char *input, size_t input_len) { size_t overflow = 0; if ((buf == NULL) || (buf->buffer == NULL)) { return -1; } /* Reduce input_len to a number that fits in the buffer. */ if ((buf->content_length + input_len) > buf->capacity) { input_len = buf->capacity - buf->content_length; } if (input == NULL) { return (input_len == 0) ? 0 : -1; } /* Check if the buffer has not come full circle and free space is not in * the middle */ if (buf->start + buf->content_length < buf->capacity) { /* Calculate the number of bytes that need to be placed at lower memory * address */ if (buf->start + buf->content_length + input_len > buf->capacity) { overflow = (buf->start + buf->content_length + input_len) % buf->capacity; } memcpy(buf->buffer + buf->start + buf->content_length, input, input_len - overflow); memcpy(buf->buffer, input + input_len - overflow, overflow); } else { /* The buffer has come full circle and free space is in the middle */ memcpy(buf->buffer + buf->start + buf->content_length - buf->capacity, input, input_len); } buf->content_length += input_len; return (input_len > INT_MAX) ? INT_MAX : (int) input_len; } int mbedtls_test_ssl_buffer_get(mbedtls_test_ssl_buffer *buf, unsigned char *output, size_t output_len) { size_t overflow = 0; if ((buf == NULL) || (buf->buffer == NULL)) { return -1; } if (output == NULL && output_len == 0) { return 0; } if (buf->content_length < output_len) { output_len = buf->content_length; } /* Calculate the number of bytes that need to be drawn from lower memory * address */ if (buf->start + output_len > buf->capacity) { overflow = (buf->start + output_len) % buf->capacity; } if (output != NULL) { memcpy(output, buf->buffer + buf->start, output_len - overflow); memcpy(output + output_len - overflow, buf->buffer, overflow); } buf->content_length -= output_len; buf->start = (buf->start + output_len) % buf->capacity; return (output_len > INT_MAX) ? INT_MAX : (int) output_len; } int mbedtls_test_ssl_message_queue_setup( mbedtls_test_ssl_message_queue *queue, size_t capacity) { queue->messages = (size_t *) mbedtls_calloc(capacity, sizeof(size_t)); if (NULL == queue->messages) { return MBEDTLS_ERR_SSL_ALLOC_FAILED; } queue->capacity = (capacity > INT_MAX) ? INT_MAX : (int) capacity; queue->pos = 0; queue->num = 0; return 0; } void mbedtls_test_ssl_message_queue_free( mbedtls_test_ssl_message_queue *queue) { if (queue == NULL) { return; } if (queue->messages != NULL) { mbedtls_free(queue->messages); } memset(queue, 0, sizeof(*queue)); } int mbedtls_test_ssl_message_queue_push_info( mbedtls_test_ssl_message_queue *queue, size_t len) { int place; if (queue == NULL) { return MBEDTLS_TEST_ERROR_ARG_NULL; } if (queue->num >= queue->capacity) { return MBEDTLS_ERR_SSL_WANT_WRITE; } place = (queue->pos + queue->num) % queue->capacity; queue->messages[place] = len; queue->num++; return (len > INT_MAX) ? INT_MAX : (int) len; } int mbedtls_test_ssl_message_queue_pop_info( mbedtls_test_ssl_message_queue *queue, size_t buf_len) { size_t message_length; if (queue == NULL) { return MBEDTLS_TEST_ERROR_ARG_NULL; } if (queue->num == 0) { return MBEDTLS_ERR_SSL_WANT_READ; } message_length = queue->messages[queue->pos]; queue->messages[queue->pos] = 0; queue->num--; queue->pos++; queue->pos %= queue->capacity; if (queue->pos < 0) { queue->pos += queue->capacity; } return (message_length > INT_MAX && buf_len > INT_MAX) ? INT_MAX : (message_length > buf_len) ? (int) buf_len : (int) message_length; } /* * Take a peek on the info about the next message length from the queue. * This will be the oldest inserted message length(fifo). * * \retval MBEDTLS_TEST_ERROR_ARG_NULL, if the queue is null. * \retval MBEDTLS_ERR_SSL_WANT_READ, if the queue is empty. * \retval 0, if the peek was successful. * \retval MBEDTLS_TEST_ERROR_MESSAGE_TRUNCATED, if the given buffer length is * too small to fit the message. In this case the \p msg_len will be * set to the full message length so that the * caller knows what portion of the message can be dropped. */ static int test_ssl_message_queue_peek_info( mbedtls_test_ssl_message_queue *queue, size_t buf_len, size_t *msg_len) { if (queue == NULL || msg_len == NULL) { return MBEDTLS_TEST_ERROR_ARG_NULL; } if (queue->num == 0) { return MBEDTLS_ERR_SSL_WANT_READ; } *msg_len = queue->messages[queue->pos]; return (*msg_len > buf_len) ? MBEDTLS_TEST_ERROR_MESSAGE_TRUNCATED : 0; } void mbedtls_test_mock_socket_init(mbedtls_test_mock_socket *socket) { memset(socket, 0, sizeof(*socket)); } void mbedtls_test_mock_socket_close(mbedtls_test_mock_socket *socket) { if (socket == NULL) { return; } if (socket->input != NULL) { mbedtls_test_ssl_buffer_free(socket->input); mbedtls_free(socket->input); } if (socket->output != NULL) { mbedtls_test_ssl_buffer_free(socket->output); mbedtls_free(socket->output); } if (socket->peer != NULL) { memset(socket->peer, 0, sizeof(*socket->peer)); } memset(socket, 0, sizeof(*socket)); } int mbedtls_test_mock_socket_connect(mbedtls_test_mock_socket *peer1, mbedtls_test_mock_socket *peer2, size_t bufsize) { int ret = -1; peer1->output = (mbedtls_test_ssl_buffer *) mbedtls_calloc( 1, sizeof(mbedtls_test_ssl_buffer)); if (peer1->output == NULL) { ret = MBEDTLS_ERR_SSL_ALLOC_FAILED; goto exit; } mbedtls_test_ssl_buffer_init(peer1->output); if (0 != (ret = mbedtls_test_ssl_buffer_setup(peer1->output, bufsize))) { goto exit; } peer2->output = (mbedtls_test_ssl_buffer *) mbedtls_calloc( 1, sizeof(mbedtls_test_ssl_buffer)); if (peer2->output == NULL) { ret = MBEDTLS_ERR_SSL_ALLOC_FAILED; goto exit; } mbedtls_test_ssl_buffer_init(peer2->output); if (0 != (ret = mbedtls_test_ssl_buffer_setup(peer2->output, bufsize))) { goto exit; } peer1->peer = peer2; peer2->peer = peer1; peer1->input = peer2->output; peer2->input = peer1->output; peer1->status = peer2->status = MBEDTLS_MOCK_SOCKET_CONNECTED; ret = 0; exit: if (ret != 0) { mbedtls_test_mock_socket_close(peer1); mbedtls_test_mock_socket_close(peer2); } return ret; } int mbedtls_test_mock_tcp_send_b(void *ctx, const unsigned char *buf, size_t len) { mbedtls_test_mock_socket *socket = (mbedtls_test_mock_socket *) ctx; if (socket == NULL || socket->status != MBEDTLS_MOCK_SOCKET_CONNECTED) { return -1; } return mbedtls_test_ssl_buffer_put(socket->output, buf, len); } int mbedtls_test_mock_tcp_recv_b(void *ctx, unsigned char *buf, size_t len) { mbedtls_test_mock_socket *socket = (mbedtls_test_mock_socket *) ctx; if (socket == NULL || socket->status != MBEDTLS_MOCK_SOCKET_CONNECTED) { return -1; } return mbedtls_test_ssl_buffer_get(socket->input, buf, len); } int mbedtls_test_mock_tcp_send_nb(void *ctx, const unsigned char *buf, size_t len) { mbedtls_test_mock_socket *socket = (mbedtls_test_mock_socket *) ctx; if (socket == NULL || socket->status != MBEDTLS_MOCK_SOCKET_CONNECTED) { return -1; } if (socket->output->capacity == socket->output->content_length) { return MBEDTLS_ERR_SSL_WANT_WRITE; } return mbedtls_test_ssl_buffer_put(socket->output, buf, len); } int mbedtls_test_mock_tcp_recv_nb(void *ctx, unsigned char *buf, size_t len) { mbedtls_test_mock_socket *socket = (mbedtls_test_mock_socket *) ctx; if (socket == NULL || socket->status != MBEDTLS_MOCK_SOCKET_CONNECTED) { return -1; } if (socket->input->content_length == 0) { return MBEDTLS_ERR_SSL_WANT_READ; } return mbedtls_test_ssl_buffer_get(socket->input, buf, len); } void mbedtls_test_message_socket_init( mbedtls_test_message_socket_context *ctx) { ctx->queue_input = NULL; ctx->queue_output = NULL; ctx->socket = NULL; } int mbedtls_test_message_socket_setup( mbedtls_test_ssl_message_queue *queue_input, mbedtls_test_ssl_message_queue *queue_output, size_t queue_capacity, mbedtls_test_mock_socket *socket, mbedtls_test_message_socket_context *ctx) { int ret = mbedtls_test_ssl_message_queue_setup(queue_input, queue_capacity); if (ret != 0) { return ret; } ctx->queue_input = queue_input; ctx->queue_output = queue_output; ctx->socket = socket; mbedtls_test_mock_socket_init(socket); return 0; } void mbedtls_test_message_socket_close( mbedtls_test_message_socket_context *ctx) { if (ctx == NULL) { return; } mbedtls_test_ssl_message_queue_free(ctx->queue_input); mbedtls_test_mock_socket_close(ctx->socket); memset(ctx, 0, sizeof(*ctx)); } int mbedtls_test_mock_tcp_send_msg(void *ctx, const unsigned char *buf, size_t len) { mbedtls_test_ssl_message_queue *queue; mbedtls_test_mock_socket *socket; mbedtls_test_message_socket_context *context = (mbedtls_test_message_socket_context *) ctx; if (context == NULL || context->socket == NULL || context->queue_output == NULL) { return MBEDTLS_TEST_ERROR_CONTEXT_ERROR; } queue = context->queue_output; socket = context->socket; if (queue->num >= queue->capacity) { return MBEDTLS_ERR_SSL_WANT_WRITE; } if (mbedtls_test_mock_tcp_send_b(socket, buf, len) != (int) len) { return MBEDTLS_TEST_ERROR_SEND_FAILED; } return mbedtls_test_ssl_message_queue_push_info(queue, len); } int mbedtls_test_mock_tcp_recv_msg(void *ctx, unsigned char *buf, size_t buf_len) { mbedtls_test_ssl_message_queue *queue; mbedtls_test_mock_socket *socket; mbedtls_test_message_socket_context *context = (mbedtls_test_message_socket_context *) ctx; size_t drop_len = 0; size_t msg_len; int ret; if (context == NULL || context->socket == NULL || context->queue_input == NULL) { return MBEDTLS_TEST_ERROR_CONTEXT_ERROR; } queue = context->queue_input; socket = context->socket; /* Peek first, so that in case of a socket error the data remains in * the queue. */ ret = test_ssl_message_queue_peek_info(queue, buf_len, &msg_len); if (ret == MBEDTLS_TEST_ERROR_MESSAGE_TRUNCATED) { /* Calculate how much to drop */ drop_len = msg_len - buf_len; /* Set the requested message len to be buffer length */ msg_len = buf_len; } else if (ret != 0) { return ret; } if (mbedtls_test_mock_tcp_recv_b(socket, buf, msg_len) != (int) msg_len) { return MBEDTLS_TEST_ERROR_RECV_FAILED; } if (ret == MBEDTLS_TEST_ERROR_MESSAGE_TRUNCATED) { /* Drop the remaining part of the message */ if (mbedtls_test_mock_tcp_recv_b(socket, NULL, drop_len) != (int) drop_len) { /* Inconsistent state - part of the message was read, * and a part couldn't. Not much we can do here, but it should not * happen in test environment, unless forced manually. */ } } mbedtls_test_ssl_message_queue_pop_info(queue, buf_len); return (msg_len > INT_MAX) ? INT_MAX : (int) msg_len; } #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED) /* * Deinitializes certificates from endpoint represented by \p ep. */ static void test_ssl_endpoint_certificate_free(mbedtls_test_ssl_endpoint *ep) { mbedtls_test_ssl_endpoint_certificate *cert = &(ep->cert); if (cert != NULL) { if (cert->ca_cert != NULL) { mbedtls_x509_crt_free(cert->ca_cert); mbedtls_free(cert->ca_cert); cert->ca_cert = NULL; } if (cert->cert != NULL) { mbedtls_x509_crt_free(cert->cert); mbedtls_free(cert->cert); cert->cert = NULL; } if (cert->pkey != NULL) { #if defined(MBEDTLS_USE_PSA_CRYPTO) if (mbedtls_pk_get_type(cert->pkey) == MBEDTLS_PK_OPAQUE) { psa_destroy_key(cert->pkey->priv_id); } #endif mbedtls_pk_free(cert->pkey); mbedtls_free(cert->pkey); cert->pkey = NULL; } } } int mbedtls_test_ssl_endpoint_certificate_init(mbedtls_test_ssl_endpoint *ep, int pk_alg, int opaque_alg, int opaque_alg2, int opaque_usage) { int i = 0; int ret = -1; mbedtls_test_ssl_endpoint_certificate *cert = NULL; #if defined(MBEDTLS_USE_PSA_CRYPTO) mbedtls_svc_key_id_t key_slot = MBEDTLS_SVC_KEY_ID_INIT; #endif if (ep == NULL) { return MBEDTLS_ERR_SSL_BAD_INPUT_DATA; } cert = &(ep->cert); TEST_CALLOC(cert->ca_cert, 1); TEST_CALLOC(cert->cert, 1); TEST_CALLOC(cert->pkey, 1); mbedtls_x509_crt_init(cert->ca_cert); mbedtls_x509_crt_init(cert->cert); mbedtls_pk_init(cert->pkey); /* Load the trusted CA */ for (i = 0; mbedtls_test_cas_der[i] != NULL; i++) { ret = mbedtls_x509_crt_parse_der( cert->ca_cert, (const unsigned char *) mbedtls_test_cas_der[i], mbedtls_test_cas_der_len[i]); TEST_ASSERT(ret == 0); } /* Load own certificate and private key */ if (ep->conf.endpoint == MBEDTLS_SSL_IS_SERVER) { if (pk_alg == MBEDTLS_PK_RSA) { ret = mbedtls_x509_crt_parse( cert->cert, (const unsigned char *) mbedtls_test_srv_crt_rsa_sha256_der, mbedtls_test_srv_crt_rsa_sha256_der_len); TEST_ASSERT(ret == 0); ret = mbedtls_pk_parse_key( cert->pkey, (const unsigned char *) mbedtls_test_srv_key_rsa_der, mbedtls_test_srv_key_rsa_der_len, NULL, 0, mbedtls_test_rnd_std_rand, NULL); TEST_ASSERT(ret == 0); } else { ret = mbedtls_x509_crt_parse( cert->cert, (const unsigned char *) mbedtls_test_srv_crt_ec_der, mbedtls_test_srv_crt_ec_der_len); TEST_ASSERT(ret == 0); ret = mbedtls_pk_parse_key( cert->pkey, (const unsigned char *) mbedtls_test_srv_key_ec_der, mbedtls_test_srv_key_ec_der_len, NULL, 0, mbedtls_test_rnd_std_rand, NULL); TEST_ASSERT(ret == 0); } } else { if (pk_alg == MBEDTLS_PK_RSA) { ret = mbedtls_x509_crt_parse( cert->cert, (const unsigned char *) mbedtls_test_cli_crt_rsa_der, mbedtls_test_cli_crt_rsa_der_len); TEST_ASSERT(ret == 0); ret = mbedtls_pk_parse_key( cert->pkey, (const unsigned char *) mbedtls_test_cli_key_rsa_der, mbedtls_test_cli_key_rsa_der_len, NULL, 0, mbedtls_test_rnd_std_rand, NULL); TEST_ASSERT(ret == 0); } else { ret = mbedtls_x509_crt_parse( cert->cert, (const unsigned char *) mbedtls_test_cli_crt_ec_der, mbedtls_test_cli_crt_ec_len); TEST_ASSERT(ret == 0); ret = mbedtls_pk_parse_key( cert->pkey, (const unsigned char *) mbedtls_test_cli_key_ec_der, mbedtls_test_cli_key_ec_der_len, NULL, 0, mbedtls_test_rnd_std_rand, NULL); TEST_ASSERT(ret == 0); } } #if defined(MBEDTLS_USE_PSA_CRYPTO) if (opaque_alg != 0) { psa_key_attributes_t key_attr = PSA_KEY_ATTRIBUTES_INIT; /* Use a fake key usage to get a successful initial guess for the PSA attributes. */ TEST_EQUAL(mbedtls_pk_get_psa_attributes(cert->pkey, PSA_KEY_USAGE_SIGN_HASH, &key_attr), 0); /* Then manually usage, alg and alg2 as requested by the test. */ psa_set_key_usage_flags(&key_attr, opaque_usage); psa_set_key_algorithm(&key_attr, opaque_alg); if (opaque_alg2 != PSA_ALG_NONE) { psa_set_key_enrollment_algorithm(&key_attr, opaque_alg2); } TEST_EQUAL(mbedtls_pk_import_into_psa(cert->pkey, &key_attr, &key_slot), 0); mbedtls_pk_free(cert->pkey); mbedtls_pk_init(cert->pkey); TEST_EQUAL(mbedtls_pk_setup_opaque(cert->pkey, key_slot), 0); } #else (void) opaque_alg; (void) opaque_alg2; (void) opaque_usage; #endif mbedtls_ssl_conf_ca_chain(&(ep->conf), cert->ca_cert, NULL); ret = mbedtls_ssl_conf_own_cert(&(ep->conf), cert->cert, cert->pkey); TEST_ASSERT(ret == 0); TEST_ASSERT(ep->conf.key_cert != NULL); ret = mbedtls_ssl_conf_own_cert(&(ep->conf), NULL, NULL); TEST_ASSERT(ret == 0); TEST_ASSERT(ep->conf.key_cert == NULL); ret = mbedtls_ssl_conf_own_cert(&(ep->conf), cert->cert, cert->pkey); TEST_ASSERT(ret == 0); exit: if (ret != 0) { test_ssl_endpoint_certificate_free(ep); } return ret; } int mbedtls_test_ssl_endpoint_init( mbedtls_test_ssl_endpoint *ep, int endpoint_type, mbedtls_test_handshake_test_options *options, mbedtls_test_message_socket_context *dtls_context, mbedtls_test_ssl_message_queue *input_queue, mbedtls_test_ssl_message_queue *output_queue) { int ret = -1; uintptr_t user_data_n; if (dtls_context != NULL && (input_queue == NULL || output_queue == NULL)) { return MBEDTLS_ERR_SSL_BAD_INPUT_DATA; } if (ep == NULL) { return MBEDTLS_ERR_SSL_BAD_INPUT_DATA; } memset(ep, 0, sizeof(*ep)); ep->name = (endpoint_type == MBEDTLS_SSL_IS_SERVER) ? "Server" : "Client"; mbedtls_ssl_init(&(ep->ssl)); mbedtls_ssl_config_init(&(ep->conf)); mbedtls_ssl_conf_rng(&(ep->conf), mbedtls_test_random, NULL); TEST_ASSERT(mbedtls_ssl_conf_get_user_data_p(&ep->conf) == NULL); TEST_EQUAL(mbedtls_ssl_conf_get_user_data_n(&ep->conf), 0); TEST_ASSERT(mbedtls_ssl_get_user_data_p(&ep->ssl) == NULL); TEST_EQUAL(mbedtls_ssl_get_user_data_n(&ep->ssl), 0); (void) mbedtls_test_rnd_std_rand(NULL, (void *) &user_data_n, sizeof(user_data_n)); mbedtls_ssl_conf_set_user_data_n(&ep->conf, user_data_n); mbedtls_ssl_set_user_data_n(&ep->ssl, user_data_n); if (dtls_context != NULL) { TEST_ASSERT(mbedtls_test_message_socket_setup(input_queue, output_queue, 100, &(ep->socket), dtls_context) == 0); } else { mbedtls_test_mock_socket_init(&(ep->socket)); } /* Non-blocking callbacks without timeout */ if (dtls_context != NULL) { mbedtls_ssl_set_bio(&(ep->ssl), dtls_context, mbedtls_test_mock_tcp_send_msg, mbedtls_test_mock_tcp_recv_msg, NULL); } else { mbedtls_ssl_set_bio(&(ep->ssl), &(ep->socket), mbedtls_test_mock_tcp_send_nb, mbedtls_test_mock_tcp_recv_nb, NULL); } ret = mbedtls_ssl_config_defaults(&(ep->conf), endpoint_type, (dtls_context != NULL) ? MBEDTLS_SSL_TRANSPORT_DATAGRAM : MBEDTLS_SSL_TRANSPORT_STREAM, MBEDTLS_SSL_PRESET_DEFAULT); TEST_ASSERT(ret == 0); if (MBEDTLS_SSL_IS_CLIENT == endpoint_type) { if (options->client_min_version != MBEDTLS_SSL_VERSION_UNKNOWN) { mbedtls_ssl_conf_min_tls_version(&(ep->conf), options->client_min_version); } if (options->client_max_version != MBEDTLS_SSL_VERSION_UNKNOWN) { mbedtls_ssl_conf_max_tls_version(&(ep->conf), options->client_max_version); } } else { if (options->server_min_version != MBEDTLS_SSL_VERSION_UNKNOWN) { mbedtls_ssl_conf_min_tls_version(&(ep->conf), options->server_min_version); } if (options->server_max_version != MBEDTLS_SSL_VERSION_UNKNOWN) { mbedtls_ssl_conf_max_tls_version(&(ep->conf), options->server_max_version); } } if (options->group_list != NULL) { mbedtls_ssl_conf_groups(&(ep->conf), options->group_list); } mbedtls_ssl_conf_authmode(&(ep->conf), MBEDTLS_SSL_VERIFY_REQUIRED); #if defined(MBEDTLS_SSL_EARLY_DATA) mbedtls_ssl_conf_early_data(&(ep->conf), options->early_data); #if defined(MBEDTLS_SSL_SRV_C) if (endpoint_type == MBEDTLS_SSL_IS_SERVER && (options->max_early_data_size >= 0)) { mbedtls_ssl_conf_max_early_data_size(&(ep->conf), options->max_early_data_size); } #endif #if defined(MBEDTLS_SSL_ALPN) /* check that alpn_list contains at least one valid entry */ if (options->alpn_list[0] != NULL) { mbedtls_ssl_conf_alpn_protocols(&(ep->conf), options->alpn_list); } #endif #endif #if defined(MBEDTLS_SSL_CACHE_C) && defined(MBEDTLS_SSL_SRV_C) if (endpoint_type == MBEDTLS_SSL_IS_SERVER && options->cache != NULL) { mbedtls_ssl_conf_session_cache(&(ep->conf), options->cache, mbedtls_ssl_cache_get, mbedtls_ssl_cache_set); } #endif ret = mbedtls_ssl_setup(&(ep->ssl), &(ep->conf)); TEST_ASSERT(ret == 0); #if defined(MBEDTLS_SSL_PROTO_DTLS) && defined(MBEDTLS_SSL_SRV_C) if (endpoint_type == MBEDTLS_SSL_IS_SERVER && dtls_context != NULL) { mbedtls_ssl_conf_dtls_cookies(&(ep->conf), NULL, NULL, NULL); } #endif #if defined(MBEDTLS_DEBUG_C) #if defined(MBEDTLS_SSL_SRV_C) if (endpoint_type == MBEDTLS_SSL_IS_SERVER && options->srv_log_fun != NULL) { mbedtls_ssl_conf_dbg(&(ep->conf), options->srv_log_fun, options->srv_log_obj); } #endif #if defined(MBEDTLS_SSL_CLI_C) if (endpoint_type == MBEDTLS_SSL_IS_CLIENT && options->cli_log_fun != NULL) { mbedtls_ssl_conf_dbg(&(ep->conf), options->cli_log_fun, options->cli_log_obj); } #endif #endif /* MBEDTLS_DEBUG_C */ ret = mbedtls_test_ssl_endpoint_certificate_init(ep, options->pk_alg, options->opaque_alg, options->opaque_alg2, options->opaque_usage); TEST_ASSERT(ret == 0); TEST_EQUAL(mbedtls_ssl_conf_get_user_data_n(&ep->conf), user_data_n); mbedtls_ssl_conf_set_user_data_p(&ep->conf, ep); TEST_EQUAL(mbedtls_ssl_get_user_data_n(&ep->ssl), user_data_n); mbedtls_ssl_set_user_data_p(&ep->ssl, ep); exit: return ret; } void mbedtls_test_ssl_endpoint_free( mbedtls_test_ssl_endpoint *ep, mbedtls_test_message_socket_context *context) { test_ssl_endpoint_certificate_free(ep); mbedtls_ssl_free(&(ep->ssl)); mbedtls_ssl_config_free(&(ep->conf)); if (context != NULL) { mbedtls_test_message_socket_close(context); } else { mbedtls_test_mock_socket_close(&(ep->socket)); } } int mbedtls_test_move_handshake_to_state(mbedtls_ssl_context *ssl, mbedtls_ssl_context *second_ssl, int state) { enum { BUFFSIZE = 1024 }; int max_steps = 1000; int ret = 0; if (ssl == NULL || second_ssl == NULL) { return MBEDTLS_ERR_SSL_BAD_INPUT_DATA; } /* Perform communication via connected sockets */ while ((ssl->state != state) && (--max_steps >= 0)) { /* If /p second_ssl ends the handshake procedure before /p ssl then * there is no need to call the next step */ if (!mbedtls_ssl_is_handshake_over(second_ssl)) { ret = mbedtls_ssl_handshake_step(second_ssl); if (ret != 0 && ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { return ret; } } /* We only care about the \p ssl state and returns, so we call it last, * to leave the iteration as soon as the state is as expected. */ ret = mbedtls_ssl_handshake_step(ssl); if (ret != 0 && ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { return ret; } } return (max_steps >= 0) ? ret : -1; } #endif /* MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED */ /* * Write application data. Increase write counter if necessary. */ int mbedtls_ssl_write_fragment(mbedtls_ssl_context *ssl, unsigned char *buf, int buf_len, int *written, const int expected_fragments) { int ret; /* Verify that calling mbedtls_ssl_write with a NULL buffer and zero length is * a valid no-op for TLS connections. */ if (ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) { TEST_ASSERT(mbedtls_ssl_write(ssl, NULL, 0) == 0); } ret = mbedtls_ssl_write(ssl, buf + *written, buf_len - *written); if (ret > 0) { *written += ret; } if (expected_fragments == 0) { /* Used for DTLS and the message size larger than MFL. In that case * the message can not be fragmented and the library should return * MBEDTLS_ERR_SSL_BAD_INPUT_DATA error. This error must be returned * to prevent a dead loop inside mbedtls_test_ssl_exchange_data(). */ return ret; } else if (expected_fragments == 1) { /* Used for TLS/DTLS and the message size lower than MFL */ TEST_ASSERT(ret == buf_len || ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE); } else { /* Used for TLS and the message size larger than MFL */ TEST_ASSERT(expected_fragments > 1); TEST_ASSERT((ret >= 0 && ret <= buf_len) || ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE); } return 0; exit: /* Some of the tests failed */ return -1; } /* * Read application data and increase read counter and fragments counter * if necessary. */ int mbedtls_ssl_read_fragment(mbedtls_ssl_context *ssl, unsigned char *buf, int buf_len, int *read, int *fragments, const int expected_fragments) { int ret; /* Verify that calling mbedtls_ssl_write with a NULL buffer and zero length is * a valid no-op for TLS connections. */ if (ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) { TEST_ASSERT(mbedtls_ssl_read(ssl, NULL, 0) == 0); } ret = mbedtls_ssl_read(ssl, buf + *read, buf_len - *read); if (ret > 0) { (*fragments)++; *read += ret; } if (expected_fragments == 0) { TEST_ASSERT(ret == 0); } else if (expected_fragments == 1) { TEST_ASSERT(ret == buf_len || ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE); } else { TEST_ASSERT(expected_fragments > 1); TEST_ASSERT((ret >= 0 && ret <= buf_len) || ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE); } return 0; exit: /* Some of the tests failed */ return -1; } #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED) static void set_ciphersuite(mbedtls_ssl_config *conf, const char *cipher, int *forced_ciphersuite) { const mbedtls_ssl_ciphersuite_t *ciphersuite_info; forced_ciphersuite[0] = mbedtls_ssl_get_ciphersuite_id(cipher); forced_ciphersuite[1] = 0; ciphersuite_info = mbedtls_ssl_ciphersuite_from_id(forced_ciphersuite[0]); TEST_ASSERT(ciphersuite_info != NULL); TEST_ASSERT(ciphersuite_info->min_tls_version <= conf->max_tls_version); TEST_ASSERT(ciphersuite_info->max_tls_version >= conf->min_tls_version); if (conf->max_tls_version > ciphersuite_info->max_tls_version) { conf->max_tls_version = (mbedtls_ssl_protocol_version) ciphersuite_info->max_tls_version; } if (conf->min_tls_version < ciphersuite_info->min_tls_version) { conf->min_tls_version = (mbedtls_ssl_protocol_version) ciphersuite_info->min_tls_version; } mbedtls_ssl_conf_ciphersuites(conf, forced_ciphersuite); exit: return; } #endif /* MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED */ #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED) && \ defined(MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED) && \ defined(MBEDTLS_SSL_SRV_C) static int psk_dummy_callback(void *p_info, mbedtls_ssl_context *ssl, const unsigned char *name, size_t name_len) { (void) p_info; (void) ssl; (void) name; (void) name_len; return 0; } #endif /* MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED && MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED && MBEDTLS_SSL_SRV_C */ #if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \ defined(MBEDTLS_SSL_HAVE_CBC) && defined(MBEDTLS_SSL_HAVE_AES) int mbedtls_test_psa_cipher_encrypt_helper(mbedtls_ssl_transform *transform, const unsigned char *iv, size_t iv_len, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen) { #if defined(MBEDTLS_USE_PSA_CRYPTO) psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; psa_cipher_operation_t cipher_op = PSA_CIPHER_OPERATION_INIT; size_t part_len; status = psa_cipher_encrypt_setup(&cipher_op, transform->psa_key_enc, transform->psa_alg); if (status != PSA_SUCCESS) { return PSA_TO_MBEDTLS_ERR(status); } status = psa_cipher_set_iv(&cipher_op, iv, iv_len); if (status != PSA_SUCCESS) { return PSA_TO_MBEDTLS_ERR(status); } status = psa_cipher_update(&cipher_op, input, ilen, output, ilen, olen); if (status != PSA_SUCCESS) { return PSA_TO_MBEDTLS_ERR(status); } status = psa_cipher_finish(&cipher_op, output + *olen, ilen - *olen, &part_len); if (status != PSA_SUCCESS) { return PSA_TO_MBEDTLS_ERR(status); } *olen += part_len; return 0; #else return mbedtls_cipher_crypt(&transform->cipher_ctx_enc, iv, iv_len, input, ilen, output, olen); #endif /* MBEDTLS_USE_PSA_CRYPTO */ } #endif /* MBEDTLS_SSL_PROTO_TLS1_2 && MBEDTLS_SSL_HAVE_CBC && MBEDTLS_SSL_HAVE_AES */ static void mbedtls_test_ssl_cipher_info_from_type(mbedtls_cipher_type_t cipher_type, mbedtls_cipher_mode_t *cipher_mode, size_t *key_bits, size_t *iv_len) { switch (cipher_type) { case MBEDTLS_CIPHER_AES_128_CBC: *cipher_mode = MBEDTLS_MODE_CBC; *key_bits = 128; *iv_len = 16; break; case MBEDTLS_CIPHER_AES_256_CBC: *cipher_mode = MBEDTLS_MODE_CBC; *key_bits = 256; *iv_len = 16; break; case MBEDTLS_CIPHER_ARIA_128_CBC: *cipher_mode = MBEDTLS_MODE_CBC; *key_bits = 128; *iv_len = 16; break; case MBEDTLS_CIPHER_ARIA_256_CBC: *cipher_mode = MBEDTLS_MODE_CBC; *key_bits = 256; *iv_len = 16; break; case MBEDTLS_CIPHER_CAMELLIA_128_CBC: *cipher_mode = MBEDTLS_MODE_CBC; *key_bits = 128; *iv_len = 16; break; case MBEDTLS_CIPHER_CAMELLIA_256_CBC: *cipher_mode = MBEDTLS_MODE_CBC; *key_bits = 256; *iv_len = 16; break; case MBEDTLS_CIPHER_AES_128_CCM: *cipher_mode = MBEDTLS_MODE_CCM; *key_bits = 128; *iv_len = 12; break; case MBEDTLS_CIPHER_AES_192_CCM: *cipher_mode = MBEDTLS_MODE_CCM; *key_bits = 192; *iv_len = 12; break; case MBEDTLS_CIPHER_AES_256_CCM: *cipher_mode = MBEDTLS_MODE_CCM; *key_bits = 256; *iv_len = 12; break; case MBEDTLS_CIPHER_CAMELLIA_128_CCM: *cipher_mode = MBEDTLS_MODE_CCM; *key_bits = 128; *iv_len = 12; break; case MBEDTLS_CIPHER_CAMELLIA_192_CCM: *cipher_mode = MBEDTLS_MODE_CCM; *key_bits = 192; *iv_len = 12; break; case MBEDTLS_CIPHER_CAMELLIA_256_CCM: *cipher_mode = MBEDTLS_MODE_CCM; *key_bits = 256; *iv_len = 12; break; case MBEDTLS_CIPHER_AES_128_GCM: *cipher_mode = MBEDTLS_MODE_GCM; *key_bits = 128; *iv_len = 12; break; case MBEDTLS_CIPHER_AES_192_GCM: *cipher_mode = MBEDTLS_MODE_GCM; *key_bits = 192; *iv_len = 12; break; case MBEDTLS_CIPHER_AES_256_GCM: *cipher_mode = MBEDTLS_MODE_GCM; *key_bits = 256; *iv_len = 12; break; case MBEDTLS_CIPHER_CAMELLIA_128_GCM: *cipher_mode = MBEDTLS_MODE_GCM; *key_bits = 128; *iv_len = 12; break; case MBEDTLS_CIPHER_CAMELLIA_192_GCM: *cipher_mode = MBEDTLS_MODE_GCM; *key_bits = 192; *iv_len = 12; break; case MBEDTLS_CIPHER_CAMELLIA_256_GCM: *cipher_mode = MBEDTLS_MODE_GCM; *key_bits = 256; *iv_len = 12; break; case MBEDTLS_CIPHER_CHACHA20_POLY1305: *cipher_mode = MBEDTLS_MODE_CHACHAPOLY; *key_bits = 256; *iv_len = 12; break; case MBEDTLS_CIPHER_NULL: *cipher_mode = MBEDTLS_MODE_STREAM; *key_bits = 0; *iv_len = 0; break; default: *cipher_mode = MBEDTLS_MODE_NONE; *key_bits = 0; *iv_len = 0; } } int mbedtls_test_ssl_build_transforms(mbedtls_ssl_transform *t_in, mbedtls_ssl_transform *t_out, int cipher_type, int hash_id, int etm, int tag_mode, mbedtls_ssl_protocol_version tls_version, size_t cid0_len, size_t cid1_len) { mbedtls_cipher_mode_t cipher_mode = MBEDTLS_MODE_NONE; size_t key_bits = 0; int ret = 0; #if defined(MBEDTLS_USE_PSA_CRYPTO) psa_key_type_t key_type; psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; psa_algorithm_t alg; psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; #else mbedtls_cipher_info_t const *cipher_info; #endif size_t keylen, maclen, ivlen = 0; unsigned char *key0 = NULL, *key1 = NULL; unsigned char *md0 = NULL, *md1 = NULL; unsigned char iv_enc[16], iv_dec[16]; #if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID) unsigned char cid0[SSL_CID_LEN_MIN]; unsigned char cid1[SSL_CID_LEN_MIN]; mbedtls_test_rnd_std_rand(NULL, cid0, sizeof(cid0)); mbedtls_test_rnd_std_rand(NULL, cid1, sizeof(cid1)); #else ((void) cid0_len); ((void) cid1_len); #endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */ maclen = 0; mbedtls_test_ssl_cipher_info_from_type((mbedtls_cipher_type_t) cipher_type, &cipher_mode, &key_bits, &ivlen); /* Pick keys */ keylen = key_bits / 8; /* Allocate `keylen + 1` bytes to ensure that we get * a non-NULL pointers from `mbedtls_calloc` even if * `keylen == 0` in the case of the NULL cipher. */ CHK((key0 = mbedtls_calloc(1, keylen + 1)) != NULL); CHK((key1 = mbedtls_calloc(1, keylen + 1)) != NULL); memset(key0, 0x1, keylen); memset(key1, 0x2, keylen); #if !defined(MBEDTLS_USE_PSA_CRYPTO) /* Pick cipher */ cipher_info = mbedtls_cipher_info_from_type((mbedtls_cipher_type_t) cipher_type); CHK(cipher_info != NULL); CHK(mbedtls_cipher_info_get_iv_size(cipher_info) <= 16); CHK(mbedtls_cipher_info_get_key_bitlen(cipher_info) % 8 == 0); /* Setup cipher contexts */ CHK(mbedtls_cipher_setup(&t_in->cipher_ctx_enc, cipher_info) == 0); CHK(mbedtls_cipher_setup(&t_in->cipher_ctx_dec, cipher_info) == 0); CHK(mbedtls_cipher_setup(&t_out->cipher_ctx_enc, cipher_info) == 0); CHK(mbedtls_cipher_setup(&t_out->cipher_ctx_dec, cipher_info) == 0); #if defined(MBEDTLS_CIPHER_MODE_CBC) if (cipher_mode == MBEDTLS_MODE_CBC) { CHK(mbedtls_cipher_set_padding_mode(&t_in->cipher_ctx_enc, MBEDTLS_PADDING_NONE) == 0); CHK(mbedtls_cipher_set_padding_mode(&t_in->cipher_ctx_dec, MBEDTLS_PADDING_NONE) == 0); CHK(mbedtls_cipher_set_padding_mode(&t_out->cipher_ctx_enc, MBEDTLS_PADDING_NONE) == 0); CHK(mbedtls_cipher_set_padding_mode(&t_out->cipher_ctx_dec, MBEDTLS_PADDING_NONE) == 0); } #endif /* MBEDTLS_CIPHER_MODE_CBC */ CHK(mbedtls_cipher_setkey(&t_in->cipher_ctx_enc, key0, (keylen << 3 > INT_MAX) ? INT_MAX : (int) keylen << 3, MBEDTLS_ENCRYPT) == 0); CHK(mbedtls_cipher_setkey(&t_in->cipher_ctx_dec, key1, (keylen << 3 > INT_MAX) ? INT_MAX : (int) keylen << 3, MBEDTLS_DECRYPT) == 0); CHK(mbedtls_cipher_setkey(&t_out->cipher_ctx_enc, key1, (keylen << 3 > INT_MAX) ? INT_MAX : (int) keylen << 3, MBEDTLS_ENCRYPT) == 0); CHK(mbedtls_cipher_setkey(&t_out->cipher_ctx_dec, key0, (keylen << 3 > INT_MAX) ? INT_MAX : (int) keylen << 3, MBEDTLS_DECRYPT) == 0); #endif /* !MBEDTLS_USE_PSA_CRYPTO */ /* Setup MAC contexts */ #if defined(MBEDTLS_SSL_SOME_SUITES_USE_MAC) if (cipher_mode == MBEDTLS_MODE_CBC || cipher_mode == MBEDTLS_MODE_STREAM) { #if !defined(MBEDTLS_USE_PSA_CRYPTO) mbedtls_md_info_t const *md_info = mbedtls_md_info_from_type((mbedtls_md_type_t) hash_id); CHK(md_info != NULL); #endif maclen = mbedtls_md_get_size_from_type((mbedtls_md_type_t) hash_id); CHK(maclen != 0); /* Pick hash keys */ CHK((md0 = mbedtls_calloc(1, maclen)) != NULL); CHK((md1 = mbedtls_calloc(1, maclen)) != NULL); memset(md0, 0x5, maclen); memset(md1, 0x6, maclen); #if defined(MBEDTLS_USE_PSA_CRYPTO) alg = mbedtls_md_psa_alg_from_type(hash_id); CHK(alg != 0); t_out->psa_mac_alg = PSA_ALG_HMAC(alg); t_in->psa_mac_alg = PSA_ALG_HMAC(alg); t_in->psa_mac_enc = MBEDTLS_SVC_KEY_ID_INIT; t_out->psa_mac_enc = MBEDTLS_SVC_KEY_ID_INIT; t_in->psa_mac_dec = MBEDTLS_SVC_KEY_ID_INIT; t_out->psa_mac_dec = MBEDTLS_SVC_KEY_ID_INIT; psa_reset_key_attributes(&attributes); psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_MESSAGE); psa_set_key_algorithm(&attributes, PSA_ALG_HMAC(alg)); psa_set_key_type(&attributes, PSA_KEY_TYPE_HMAC); CHK(psa_import_key(&attributes, md0, maclen, &t_in->psa_mac_enc) == PSA_SUCCESS); CHK(psa_import_key(&attributes, md1, maclen, &t_out->psa_mac_enc) == PSA_SUCCESS); if (cipher_mode == MBEDTLS_MODE_STREAM || etm == MBEDTLS_SSL_ETM_DISABLED) { /* mbedtls_ct_hmac() requires the key to be exportable */ psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_VERIFY_HASH); } else { psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_VERIFY_HASH); } CHK(psa_import_key(&attributes, md1, maclen, &t_in->psa_mac_dec) == PSA_SUCCESS); CHK(psa_import_key(&attributes, md0, maclen, &t_out->psa_mac_dec) == PSA_SUCCESS); #else CHK(mbedtls_md_setup(&t_out->md_ctx_enc, md_info, 1) == 0); CHK(mbedtls_md_setup(&t_out->md_ctx_dec, md_info, 1) == 0); CHK(mbedtls_md_setup(&t_in->md_ctx_enc, md_info, 1) == 0); CHK(mbedtls_md_setup(&t_in->md_ctx_dec, md_info, 1) == 0); CHK(mbedtls_md_hmac_starts(&t_in->md_ctx_enc, md0, maclen) == 0); CHK(mbedtls_md_hmac_starts(&t_in->md_ctx_dec, md1, maclen) == 0); CHK(mbedtls_md_hmac_starts(&t_out->md_ctx_enc, md1, maclen) == 0); CHK(mbedtls_md_hmac_starts(&t_out->md_ctx_dec, md0, maclen) == 0); #endif } #else ((void) hash_id); #endif /* MBEDTLS_SSL_SOME_SUITES_USE_MAC */ /* Pick IV's (regardless of whether they * are being used by the transform). */ memset(iv_enc, 0x3, sizeof(iv_enc)); memset(iv_dec, 0x4, sizeof(iv_dec)); /* * Setup transforms */ #if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) && \ defined(MBEDTLS_SSL_SOME_SUITES_USE_MAC) t_out->encrypt_then_mac = etm; t_in->encrypt_then_mac = etm; #else ((void) etm); #endif t_out->tls_version = tls_version; t_in->tls_version = tls_version; t_out->ivlen = ivlen; t_in->ivlen = ivlen; switch (cipher_mode) { case MBEDTLS_MODE_GCM: case MBEDTLS_MODE_CCM: #if defined(MBEDTLS_SSL_PROTO_TLS1_3) if (tls_version == MBEDTLS_SSL_VERSION_TLS1_3) { t_out->fixed_ivlen = 12; t_in->fixed_ivlen = 12; } else #endif /* MBEDTLS_SSL_PROTO_TLS1_3 */ { t_out->fixed_ivlen = 4; t_in->fixed_ivlen = 4; } t_out->maclen = 0; t_in->maclen = 0; switch (tag_mode) { case 0: /* Full tag */ t_out->taglen = 16; t_in->taglen = 16; break; case 1: /* Partial tag */ t_out->taglen = 8; t_in->taglen = 8; break; default: ret = 1; goto cleanup; } break; case MBEDTLS_MODE_CHACHAPOLY: t_out->fixed_ivlen = 12; t_in->fixed_ivlen = 12; t_out->maclen = 0; t_in->maclen = 0; switch (tag_mode) { case 0: /* Full tag */ t_out->taglen = 16; t_in->taglen = 16; break; case 1: /* Partial tag */ t_out->taglen = 8; t_in->taglen = 8; break; default: ret = 1; goto cleanup; } break; case MBEDTLS_MODE_STREAM: case MBEDTLS_MODE_CBC: t_out->fixed_ivlen = 0; /* redundant, must be 0 */ t_in->fixed_ivlen = 0; /* redundant, must be 0 */ t_out->taglen = 0; t_in->taglen = 0; switch (tag_mode) { case 0: /* Full tag */ t_out->maclen = maclen; t_in->maclen = maclen; break; default: ret = 1; goto cleanup; } break; default: ret = 1; goto cleanup; break; } /* Setup IV's */ memcpy(&t_in->iv_dec, iv_dec, sizeof(iv_dec)); memcpy(&t_in->iv_enc, iv_enc, sizeof(iv_enc)); memcpy(&t_out->iv_dec, iv_enc, sizeof(iv_enc)); memcpy(&t_out->iv_enc, iv_dec, sizeof(iv_dec)); #if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID) /* Add CID */ memcpy(&t_in->in_cid, cid0, cid0_len); memcpy(&t_in->out_cid, cid1, cid1_len); t_in->in_cid_len = (uint8_t) cid0_len; t_in->out_cid_len = (uint8_t) cid1_len; memcpy(&t_out->in_cid, cid1, cid1_len); memcpy(&t_out->out_cid, cid0, cid0_len); t_out->in_cid_len = (uint8_t) cid1_len; t_out->out_cid_len = (uint8_t) cid0_len; #endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */ #if defined(MBEDTLS_USE_PSA_CRYPTO) status = mbedtls_ssl_cipher_to_psa(cipher_type, t_in->taglen, &alg, &key_type, &key_bits); if (status != PSA_SUCCESS) { ret = PSA_TO_MBEDTLS_ERR(status); goto cleanup; } t_in->psa_alg = alg; t_out->psa_alg = alg; if (alg != MBEDTLS_SSL_NULL_CIPHER) { psa_reset_key_attributes(&attributes); psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_ENCRYPT); psa_set_key_algorithm(&attributes, alg); psa_set_key_type(&attributes, key_type); status = psa_import_key(&attributes, key0, PSA_BITS_TO_BYTES(key_bits), &t_in->psa_key_enc); if (status != PSA_SUCCESS) { ret = PSA_TO_MBEDTLS_ERR(status); goto cleanup; } status = psa_import_key(&attributes, key1, PSA_BITS_TO_BYTES(key_bits), &t_out->psa_key_enc); if (status != PSA_SUCCESS) { ret = PSA_TO_MBEDTLS_ERR(status); goto cleanup; } psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_DECRYPT); status = psa_import_key(&attributes, key1, PSA_BITS_TO_BYTES(key_bits), &t_in->psa_key_dec); if (status != PSA_SUCCESS) { ret = PSA_TO_MBEDTLS_ERR(status); goto cleanup; } status = psa_import_key(&attributes, key0, PSA_BITS_TO_BYTES(key_bits), &t_out->psa_key_dec); if (status != PSA_SUCCESS) { ret = PSA_TO_MBEDTLS_ERR(status); goto cleanup; } } #endif /* MBEDTLS_USE_PSA_CRYPTO */ cleanup: mbedtls_free(key0); mbedtls_free(key1); mbedtls_free(md0); mbedtls_free(md1); return ret; } #if defined(MBEDTLS_SSL_SOME_SUITES_USE_MAC) int mbedtls_test_ssl_prepare_record_mac(mbedtls_record *record, mbedtls_ssl_transform *transform_out) { #if defined(MBEDTLS_USE_PSA_CRYPTO) psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT; #endif /* Serialized version of record header for MAC purposes */ unsigned char add_data[13]; memcpy(add_data, record->ctr, 8); add_data[8] = record->type; add_data[9] = record->ver[0]; add_data[10] = record->ver[1]; add_data[11] = (record->data_len >> 8) & 0xff; add_data[12] = (record->data_len >> 0) & 0xff; /* MAC with additional data */ #if defined(MBEDTLS_USE_PSA_CRYPTO) size_t sign_mac_length = 0; TEST_EQUAL(PSA_SUCCESS, psa_mac_sign_setup(&operation, transform_out->psa_mac_enc, transform_out->psa_mac_alg)); TEST_EQUAL(PSA_SUCCESS, psa_mac_update(&operation, add_data, 13)); TEST_EQUAL(PSA_SUCCESS, psa_mac_update(&operation, record->buf + record->data_offset, record->data_len)); /* Use a temporary buffer for the MAC, because with the truncated HMAC * extension, there might not be enough room in the record for the * full-length MAC. */ unsigned char mac[PSA_HASH_MAX_SIZE]; TEST_EQUAL(PSA_SUCCESS, psa_mac_sign_finish(&operation, mac, sizeof(mac), &sign_mac_length)); #else TEST_EQUAL(0, mbedtls_md_hmac_update(&transform_out->md_ctx_enc, add_data, 13)); TEST_EQUAL(0, mbedtls_md_hmac_update(&transform_out->md_ctx_enc, record->buf + record->data_offset, record->data_len)); /* Use a temporary buffer for the MAC, because with the truncated HMAC * extension, there might not be enough room in the record for the * full-length MAC. */ unsigned char mac[MBEDTLS_MD_MAX_SIZE]; TEST_EQUAL(0, mbedtls_md_hmac_finish(&transform_out->md_ctx_enc, mac)); #endif memcpy(record->buf + record->data_offset + record->data_len, mac, transform_out->maclen); record->data_len += transform_out->maclen; return 0; exit: #if defined(MBEDTLS_USE_PSA_CRYPTO) psa_mac_abort(&operation); #endif return -1; } #endif /* MBEDTLS_SSL_SOME_SUITES_USE_MAC */ #if defined(MBEDTLS_SSL_PROTO_TLS1_2) int mbedtls_test_ssl_tls12_populate_session(mbedtls_ssl_session *session, int ticket_len, int endpoint_type, const char *crt_file) { (void) ticket_len; #if defined(MBEDTLS_HAVE_TIME) session->start = mbedtls_time(NULL) - 42; #endif session->tls_version = MBEDTLS_SSL_VERSION_TLS1_2; TEST_ASSERT(endpoint_type == MBEDTLS_SSL_IS_CLIENT || endpoint_type == MBEDTLS_SSL_IS_SERVER); session->endpoint = endpoint_type; session->ciphersuite = 0xabcd; session->id_len = sizeof(session->id); memset(session->id, 66, session->id_len); memset(session->master, 17, sizeof(session->master)); #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED) && defined(MBEDTLS_FS_IO) if (crt_file != NULL && strlen(crt_file) != 0) { mbedtls_x509_crt tmp_crt; int ret; mbedtls_x509_crt_init(&tmp_crt); ret = mbedtls_x509_crt_parse_file(&tmp_crt, crt_file); if (ret != 0) { return ret; } #if defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE) /* Move temporary CRT. */ session->peer_cert = mbedtls_calloc(1, sizeof(*session->peer_cert)); if (session->peer_cert == NULL) { return -1; } *session->peer_cert = tmp_crt; memset(&tmp_crt, 0, sizeof(tmp_crt)); #else /* MBEDTLS_SSL_KEEP_PEER_CERTIFICATE */ /* Calculate digest of temporary CRT. */ session->peer_cert_digest = mbedtls_calloc(1, MBEDTLS_SSL_PEER_CERT_DIGEST_DFL_LEN); if (session->peer_cert_digest == NULL) { return -1; } #if defined(MBEDTLS_USE_PSA_CRYPTO) psa_algorithm_t psa_alg = mbedtls_md_psa_alg_from_type( MBEDTLS_SSL_PEER_CERT_DIGEST_DFL_TYPE); size_t hash_size = 0; psa_status_t status = psa_hash_compute( psa_alg, tmp_crt.raw.p, tmp_crt.raw.len, session->peer_cert_digest, MBEDTLS_SSL_PEER_CERT_DIGEST_DFL_LEN, &hash_size); ret = PSA_TO_MBEDTLS_ERR(status); #else ret = mbedtls_md(mbedtls_md_info_from_type( MBEDTLS_SSL_PEER_CERT_DIGEST_DFL_TYPE), tmp_crt.raw.p, tmp_crt.raw.len, session->peer_cert_digest); #endif /* MBEDTLS_USE_PSA_CRYPTO */ if (ret != 0) { return ret; } session->peer_cert_digest_type = MBEDTLS_SSL_PEER_CERT_DIGEST_DFL_TYPE; session->peer_cert_digest_len = MBEDTLS_SSL_PEER_CERT_DIGEST_DFL_LEN; #endif /* MBEDTLS_SSL_KEEP_PEER_CERTIFICATE */ mbedtls_x509_crt_free(&tmp_crt); } #else /* MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED && MBEDTLS_FS_IO */ (void) crt_file; #endif /* MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED && MBEDTLS_FS_IO */ session->verify_result = 0xdeadbeef; #if defined(MBEDTLS_SSL_SESSION_TICKETS) #if defined(MBEDTLS_SSL_CLI_C) if (ticket_len != 0) { session->ticket = mbedtls_calloc(1, ticket_len); if (session->ticket == NULL) { return -1; } memset(session->ticket, 33, ticket_len); } session->ticket_len = ticket_len; session->ticket_lifetime = 86401; #endif /* MBEDTLS_SSL_CLI_C */ #if defined(MBEDTLS_SSL_SRV_C) && defined(MBEDTLS_HAVE_TIME) if (session->endpoint == MBEDTLS_SSL_IS_SERVER) { session->ticket_creation_time = mbedtls_ms_time() - 42; } #endif #endif /* MBEDTLS_SSL_SESSION_TICKETS */ #if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) session->mfl_code = 1; #endif #if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) session->encrypt_then_mac = 1; #endif exit: return 0; } #endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ #if defined(MBEDTLS_SSL_PROTO_TLS1_3) int mbedtls_test_ssl_tls13_populate_session(mbedtls_ssl_session *session, int ticket_len, int endpoint_type) { ((void) ticket_len); session->tls_version = MBEDTLS_SSL_VERSION_TLS1_3; session->endpoint = endpoint_type == MBEDTLS_SSL_IS_CLIENT ? MBEDTLS_SSL_IS_CLIENT : MBEDTLS_SSL_IS_SERVER; session->ciphersuite = 0xabcd; session->ticket_age_add = 0x87654321; session->ticket_flags = 0x7; session->resumption_key_len = 32; memset(session->resumption_key, 0x99, sizeof(session->resumption_key)); #if defined(MBEDTLS_SSL_EARLY_DATA) session->max_early_data_size = 0x87654321; #if defined(MBEDTLS_SSL_ALPN) && defined(MBEDTLS_SSL_SRV_C) int ret = mbedtls_ssl_session_set_ticket_alpn(session, "ALPNExample"); if (ret != 0) { return -1; } #endif /* MBEDTLS_SSL_ALPN && MBEDTLS_SSL_SRV_C */ #endif /* MBEDTLS_SSL_EARLY_DATA */ #if defined(MBEDTLS_HAVE_TIME) && defined(MBEDTLS_SSL_SRV_C) if (session->endpoint == MBEDTLS_SSL_IS_SERVER) { session->ticket_creation_time = mbedtls_ms_time() - 42; } #endif #if defined(MBEDTLS_SSL_CLI_C) if (session->endpoint == MBEDTLS_SSL_IS_CLIENT) { #if defined(MBEDTLS_HAVE_TIME) session->ticket_reception_time = mbedtls_ms_time() - 40; #endif session->ticket_lifetime = 0xfedcba98; session->ticket_len = ticket_len; if (ticket_len != 0) { session->ticket = mbedtls_calloc(1, ticket_len); if (session->ticket == NULL) { return -1; } memset(session->ticket, 33, ticket_len); } } #endif /* MBEDTLS_SSL_CLI_C */ #if defined(MBEDTLS_SSL_RECORD_SIZE_LIMIT) session->record_size_limit = 2048; #endif return 0; } #endif /* MBEDTLS_SSL_PROTO_TLS1_3 */ int mbedtls_test_ssl_exchange_data( mbedtls_ssl_context *ssl_1, int msg_len_1, const int expected_fragments_1, mbedtls_ssl_context *ssl_2, int msg_len_2, const int expected_fragments_2) { unsigned char *msg_buf_1 = malloc(msg_len_1); unsigned char *msg_buf_2 = malloc(msg_len_2); unsigned char *in_buf_1 = malloc(msg_len_2); unsigned char *in_buf_2 = malloc(msg_len_1); int msg_type, ret = -1; /* Perform this test with two message types. At first use a message * consisting of only 0x00 for the client and only 0xFF for the server. * At the second time use message with generated data */ for (msg_type = 0; msg_type < 2; msg_type++) { int written_1 = 0; int written_2 = 0; int read_1 = 0; int read_2 = 0; int fragments_1 = 0; int fragments_2 = 0; if (msg_type == 0) { memset(msg_buf_1, 0x00, msg_len_1); memset(msg_buf_2, 0xff, msg_len_2); } else { int i, j = 0; for (i = 0; i < msg_len_1; i++) { msg_buf_1[i] = j++ & 0xFF; } for (i = 0; i < msg_len_2; i++) { msg_buf_2[i] = (j -= 5) & 0xFF; } } while (read_1 < msg_len_2 || read_2 < msg_len_1) { /* ssl_1 sending */ if (msg_len_1 > written_1) { ret = mbedtls_ssl_write_fragment(ssl_1, msg_buf_1, msg_len_1, &written_1, expected_fragments_1); if (expected_fragments_1 == 0) { /* This error is expected when the message is too large and * cannot be fragmented */ TEST_ASSERT(ret == MBEDTLS_ERR_SSL_BAD_INPUT_DATA); msg_len_1 = 0; } else { TEST_ASSERT(ret == 0); } } /* ssl_2 sending */ if (msg_len_2 > written_2) { ret = mbedtls_ssl_write_fragment(ssl_2, msg_buf_2, msg_len_2, &written_2, expected_fragments_2); if (expected_fragments_2 == 0) { /* This error is expected when the message is too large and * cannot be fragmented */ TEST_ASSERT(ret == MBEDTLS_ERR_SSL_BAD_INPUT_DATA); msg_len_2 = 0; } else { TEST_ASSERT(ret == 0); } } /* ssl_1 reading */ if (read_1 < msg_len_2) { ret = mbedtls_ssl_read_fragment(ssl_1, in_buf_1, msg_len_2, &read_1, &fragments_2, expected_fragments_2); TEST_ASSERT(ret == 0); } /* ssl_2 reading */ if (read_2 < msg_len_1) { ret = mbedtls_ssl_read_fragment(ssl_2, in_buf_2, msg_len_1, &read_2, &fragments_1, expected_fragments_1); TEST_ASSERT(ret == 0); } } ret = -1; TEST_ASSERT(0 == memcmp(msg_buf_1, in_buf_2, msg_len_1)); TEST_ASSERT(0 == memcmp(msg_buf_2, in_buf_1, msg_len_2)); TEST_ASSERT(fragments_1 == expected_fragments_1); TEST_ASSERT(fragments_2 == expected_fragments_2); } ret = 0; exit: free(msg_buf_1); free(in_buf_1); free(msg_buf_2); free(in_buf_2); return ret; } /* * Perform data exchanging between \p ssl_1 and \p ssl_2. Both of endpoints * must be initialized and connected beforehand. * * \retval 0 on success, otherwise error code. */ #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED) && \ (defined(MBEDTLS_SSL_RENEGOTIATION) || \ defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH)) static int exchange_data(mbedtls_ssl_context *ssl_1, mbedtls_ssl_context *ssl_2) { return mbedtls_test_ssl_exchange_data(ssl_1, 256, 1, ssl_2, 256, 1); } #endif /* MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED && (MBEDTLS_SSL_RENEGOTIATION || MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH) */ #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED) static int check_ssl_version( mbedtls_ssl_protocol_version expected_negotiated_version, const mbedtls_ssl_context *ssl) { const char *version_string = mbedtls_ssl_get_version(ssl); mbedtls_ssl_protocol_version version_number = mbedtls_ssl_get_version_number(ssl); TEST_EQUAL(ssl->tls_version, expected_negotiated_version); if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { TEST_EQUAL(version_string[0], 'D'); ++version_string; } switch (expected_negotiated_version) { case MBEDTLS_SSL_VERSION_TLS1_2: TEST_EQUAL(version_number, MBEDTLS_SSL_VERSION_TLS1_2); TEST_ASSERT(strcmp(version_string, "TLSv1.2") == 0); break; case MBEDTLS_SSL_VERSION_TLS1_3: TEST_EQUAL(version_number, MBEDTLS_SSL_VERSION_TLS1_3); TEST_ASSERT(strcmp(version_string, "TLSv1.3") == 0); break; default: TEST_FAIL( "Version check not implemented for this protocol version"); } return 1; exit: return 0; } #endif /* MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED */ #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED) void mbedtls_test_ssl_perform_handshake( mbedtls_test_handshake_test_options *options) { /* forced_ciphersuite needs to last until the end of the handshake */ int forced_ciphersuite[2]; enum { BUFFSIZE = 17000 }; mbedtls_test_ssl_endpoint client, server; #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED) const char *psk_identity = "foo"; #endif #if defined(MBEDTLS_TIMING_C) mbedtls_timing_delay_context timer_client, timer_server; #endif #if defined(MBEDTLS_SSL_CONTEXT_SERIALIZATION) unsigned char *context_buf = NULL; size_t context_buf_len; #endif #if defined(MBEDTLS_SSL_RENEGOTIATION) int ret = -1; #endif int expected_handshake_result = options->expected_handshake_result; MD_OR_USE_PSA_INIT(); mbedtls_platform_zeroize(&client, sizeof(client)); mbedtls_platform_zeroize(&server, sizeof(server)); mbedtls_test_ssl_message_queue server_queue, client_queue; mbedtls_test_message_socket_context server_context, client_context; mbedtls_test_message_socket_init(&server_context); mbedtls_test_message_socket_init(&client_context); #if defined(MBEDTLS_DEBUG_C) if (options->cli_log_fun || options->srv_log_fun) { mbedtls_debug_set_threshold(4); } #endif /* Client side */ if (options->dtls != 0) { TEST_ASSERT(mbedtls_test_ssl_endpoint_init(&client, MBEDTLS_SSL_IS_CLIENT, options, &client_context, &client_queue, &server_queue) == 0); #if defined(MBEDTLS_TIMING_C) mbedtls_ssl_set_timer_cb(&client.ssl, &timer_client, mbedtls_timing_set_delay, mbedtls_timing_get_delay); #endif } else { TEST_ASSERT(mbedtls_test_ssl_endpoint_init(&client, MBEDTLS_SSL_IS_CLIENT, options, NULL, NULL, NULL) == 0); } if (strlen(options->cipher) > 0) { set_ciphersuite(&client.conf, options->cipher, forced_ciphersuite); } /* Server side */ if (options->dtls != 0) { TEST_ASSERT(mbedtls_test_ssl_endpoint_init(&server, MBEDTLS_SSL_IS_SERVER, options, &server_context, &server_queue, &client_queue) == 0); #if defined(MBEDTLS_TIMING_C) mbedtls_ssl_set_timer_cb(&server.ssl, &timer_server, mbedtls_timing_set_delay, mbedtls_timing_get_delay); #endif } else { TEST_ASSERT(mbedtls_test_ssl_endpoint_init(&server, MBEDTLS_SSL_IS_SERVER, options, NULL, NULL, NULL) == 0); } mbedtls_ssl_conf_authmode(&server.conf, options->srv_auth_mode); #if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) TEST_ASSERT(mbedtls_ssl_conf_max_frag_len(&(server.conf), (unsigned char) options->mfl) == 0); TEST_ASSERT(mbedtls_ssl_conf_max_frag_len(&(client.conf), (unsigned char) options->mfl) == 0); #else TEST_ASSERT(MBEDTLS_SSL_MAX_FRAG_LEN_NONE == options->mfl); #endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED) if (options->psk_str != NULL && options->psk_str->len > 0) { TEST_ASSERT(mbedtls_ssl_conf_psk( &client.conf, options->psk_str->x, options->psk_str->len, (const unsigned char *) psk_identity, strlen(psk_identity)) == 0); TEST_ASSERT(mbedtls_ssl_conf_psk( &server.conf, options->psk_str->x, options->psk_str->len, (const unsigned char *) psk_identity, strlen(psk_identity)) == 0); #if defined(MBEDTLS_SSL_SRV_C) mbedtls_ssl_conf_psk_cb(&server.conf, psk_dummy_callback, NULL); #endif } #endif #if defined(MBEDTLS_SSL_RENEGOTIATION) if (options->renegotiate) { mbedtls_ssl_conf_renegotiation(&(server.conf), MBEDTLS_SSL_RENEGOTIATION_ENABLED); mbedtls_ssl_conf_renegotiation(&(client.conf), MBEDTLS_SSL_RENEGOTIATION_ENABLED); mbedtls_ssl_conf_legacy_renegotiation(&(server.conf), options->legacy_renegotiation); mbedtls_ssl_conf_legacy_renegotiation(&(client.conf), options->legacy_renegotiation); } #endif /* MBEDTLS_SSL_RENEGOTIATION */ TEST_ASSERT(mbedtls_test_mock_socket_connect(&(client.socket), &(server.socket), BUFFSIZE) == 0); #if defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH) if (options->resize_buffers != 0) { /* Ensure that the buffer sizes are appropriate before resizes */ TEST_ASSERT(client.ssl.out_buf_len == MBEDTLS_SSL_OUT_BUFFER_LEN); TEST_ASSERT(client.ssl.in_buf_len == MBEDTLS_SSL_IN_BUFFER_LEN); TEST_ASSERT(server.ssl.out_buf_len == MBEDTLS_SSL_OUT_BUFFER_LEN); TEST_ASSERT(server.ssl.in_buf_len == MBEDTLS_SSL_IN_BUFFER_LEN); } #endif if (options->expected_negotiated_version == MBEDTLS_SSL_VERSION_UNKNOWN) { expected_handshake_result = MBEDTLS_ERR_SSL_BAD_PROTOCOL_VERSION; } TEST_ASSERT(mbedtls_test_move_handshake_to_state(&(client.ssl), &(server.ssl), MBEDTLS_SSL_HANDSHAKE_OVER) == expected_handshake_result); if (expected_handshake_result != 0) { /* Connection will have failed by this point, skip to cleanup */ goto exit; } TEST_ASSERT(mbedtls_ssl_is_handshake_over(&client.ssl) == 1); /* Make sure server state is moved to HANDSHAKE_OVER also. */ TEST_EQUAL(mbedtls_test_move_handshake_to_state(&(server.ssl), &(client.ssl), MBEDTLS_SSL_HANDSHAKE_OVER), 0); TEST_ASSERT(mbedtls_ssl_is_handshake_over(&server.ssl) == 1); /* Check that both sides have negotiated the expected version. */ mbedtls_test_set_step(0); if (!check_ssl_version(options->expected_negotiated_version, &client.ssl)) { goto exit; } mbedtls_test_set_step(1); if (!check_ssl_version(options->expected_negotiated_version, &server.ssl)) { goto exit; } if (options->expected_ciphersuite != 0) { TEST_EQUAL(server.ssl.session->ciphersuite, options->expected_ciphersuite); } #if defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH) if (options->resize_buffers != 0) { /* A server, when using DTLS, might delay a buffer resize to happen * after it receives a message, so we force it. */ TEST_ASSERT(exchange_data(&(client.ssl), &(server.ssl)) == 0); TEST_ASSERT(client.ssl.out_buf_len == mbedtls_ssl_get_output_buflen(&client.ssl)); TEST_ASSERT(client.ssl.in_buf_len == mbedtls_ssl_get_input_buflen(&client.ssl)); TEST_ASSERT(server.ssl.out_buf_len == mbedtls_ssl_get_output_buflen(&server.ssl)); TEST_ASSERT(server.ssl.in_buf_len == mbedtls_ssl_get_input_buflen(&server.ssl)); } #endif if (options->cli_msg_len != 0 || options->srv_msg_len != 0) { /* Start data exchanging test */ TEST_ASSERT(mbedtls_test_ssl_exchange_data( &(client.ssl), options->cli_msg_len, options->expected_cli_fragments, &(server.ssl), options->srv_msg_len, options->expected_srv_fragments) == 0); } #if defined(MBEDTLS_SSL_CONTEXT_SERIALIZATION) if (options->serialize == 1) { TEST_ASSERT(options->dtls == 1); TEST_ASSERT(mbedtls_ssl_context_save(&(server.ssl), NULL, 0, &context_buf_len) == MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL); context_buf = mbedtls_calloc(1, context_buf_len); TEST_ASSERT(context_buf != NULL); TEST_ASSERT(mbedtls_ssl_context_save(&(server.ssl), context_buf, context_buf_len, &context_buf_len) == 0); mbedtls_ssl_free(&(server.ssl)); mbedtls_ssl_init(&(server.ssl)); TEST_ASSERT(mbedtls_ssl_setup(&(server.ssl), &(server.conf)) == 0); mbedtls_ssl_set_bio(&(server.ssl), &server_context, mbedtls_test_mock_tcp_send_msg, mbedtls_test_mock_tcp_recv_msg, NULL); mbedtls_ssl_set_user_data_p(&server.ssl, &server); #if defined(MBEDTLS_TIMING_C) mbedtls_ssl_set_timer_cb(&server.ssl, &timer_server, mbedtls_timing_set_delay, mbedtls_timing_get_delay); #endif #if defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH) if (options->resize_buffers != 0) { /* Ensure that the buffer sizes are appropriate before resizes */ TEST_ASSERT(server.ssl.out_buf_len == MBEDTLS_SSL_OUT_BUFFER_LEN); TEST_ASSERT(server.ssl.in_buf_len == MBEDTLS_SSL_IN_BUFFER_LEN); } #endif TEST_ASSERT(mbedtls_ssl_context_load(&(server.ssl), context_buf, context_buf_len) == 0); #if defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH) /* Validate buffer sizes after context deserialization */ if (options->resize_buffers != 0) { TEST_ASSERT(server.ssl.out_buf_len == mbedtls_ssl_get_output_buflen(&server.ssl)); TEST_ASSERT(server.ssl.in_buf_len == mbedtls_ssl_get_input_buflen(&server.ssl)); } #endif /* Retest writing/reading */ if (options->cli_msg_len != 0 || options->srv_msg_len != 0) { TEST_ASSERT(mbedtls_test_ssl_exchange_data( &(client.ssl), options->cli_msg_len, options->expected_cli_fragments, &(server.ssl), options->srv_msg_len, options->expected_srv_fragments) == 0); } } #endif /* MBEDTLS_SSL_CONTEXT_SERIALIZATION */ #if defined(MBEDTLS_SSL_RENEGOTIATION) if (options->renegotiate) { /* Start test with renegotiation */ TEST_ASSERT(server.ssl.renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE); TEST_ASSERT(client.ssl.renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE); /* After calling this function for the server, it only sends a handshake * request. All renegotiation should happen during data exchanging */ TEST_ASSERT(mbedtls_ssl_renegotiate(&(server.ssl)) == 0); TEST_ASSERT(server.ssl.renego_status == MBEDTLS_SSL_RENEGOTIATION_PENDING); TEST_ASSERT(client.ssl.renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE); TEST_ASSERT(exchange_data(&(client.ssl), &(server.ssl)) == 0); TEST_ASSERT(server.ssl.renego_status == MBEDTLS_SSL_RENEGOTIATION_DONE); TEST_ASSERT(client.ssl.renego_status == MBEDTLS_SSL_RENEGOTIATION_DONE); /* After calling mbedtls_ssl_renegotiate for the client, * all renegotiation should happen inside this function. * However in this test, we cannot perform simultaneous communication * between client and server so this function will return waiting error * on the socket. All rest of renegotiation should happen * during data exchanging */ ret = mbedtls_ssl_renegotiate(&(client.ssl)); #if defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH) if (options->resize_buffers != 0) { /* Ensure that the buffer sizes are appropriate before resizes */ TEST_ASSERT(client.ssl.out_buf_len == MBEDTLS_SSL_OUT_BUFFER_LEN); TEST_ASSERT(client.ssl.in_buf_len == MBEDTLS_SSL_IN_BUFFER_LEN); } #endif TEST_ASSERT(ret == 0 || ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE); TEST_ASSERT(server.ssl.renego_status == MBEDTLS_SSL_RENEGOTIATION_DONE); TEST_ASSERT(client.ssl.renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS); TEST_ASSERT(exchange_data(&(client.ssl), &(server.ssl)) == 0); TEST_ASSERT(server.ssl.renego_status == MBEDTLS_SSL_RENEGOTIATION_DONE); TEST_ASSERT(client.ssl.renego_status == MBEDTLS_SSL_RENEGOTIATION_DONE); #if defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH) /* Validate buffer sizes after renegotiation */ if (options->resize_buffers != 0) { TEST_ASSERT(client.ssl.out_buf_len == mbedtls_ssl_get_output_buflen(&client.ssl)); TEST_ASSERT(client.ssl.in_buf_len == mbedtls_ssl_get_input_buflen(&client.ssl)); TEST_ASSERT(server.ssl.out_buf_len == mbedtls_ssl_get_output_buflen(&server.ssl)); TEST_ASSERT(server.ssl.in_buf_len == mbedtls_ssl_get_input_buflen(&server.ssl)); } #endif /* MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH */ } #endif /* MBEDTLS_SSL_RENEGOTIATION */ TEST_ASSERT(mbedtls_ssl_conf_get_user_data_p(&client.conf) == &client); TEST_ASSERT(mbedtls_ssl_get_user_data_p(&client.ssl) == &client); TEST_ASSERT(mbedtls_ssl_conf_get_user_data_p(&server.conf) == &server); TEST_ASSERT(mbedtls_ssl_get_user_data_p(&server.ssl) == &server); exit: mbedtls_test_ssl_endpoint_free(&client, options->dtls != 0 ? &client_context : NULL); mbedtls_test_ssl_endpoint_free(&server, options->dtls != 0 ? &server_context : NULL); #if defined(MBEDTLS_DEBUG_C) if (options->cli_log_fun || options->srv_log_fun) { mbedtls_debug_set_threshold(0); } #endif #if defined(MBEDTLS_SSL_CONTEXT_SERIALIZATION) if (context_buf != NULL) { mbedtls_free(context_buf); } #endif MD_OR_USE_PSA_DONE(); } #endif /* MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED */ #if defined(MBEDTLS_TEST_HOOKS) int mbedtls_test_tweak_tls13_certificate_msg_vector_len( unsigned char *buf, unsigned char **end, int tweak, int *expected_result, mbedtls_ssl_chk_buf_ptr_args *args) { /* * The definition of the tweaks assume that the certificate list contains only * one certificate. */ /* * struct { * opaque cert_data<1..2^24-1>; * Extension extensions<0..2^16-1>; * } CertificateEntry; * * struct { * opaque certificate_request_context<0..2^8-1>; * CertificateEntry certificate_list<0..2^24-1>; * } Certificate; */ unsigned char *p_certificate_request_context_len = buf; size_t certificate_request_context_len = buf[0]; unsigned char *p_certificate_list_len = buf + 1 + certificate_request_context_len; unsigned char *certificate_list = p_certificate_list_len + 3; size_t certificate_list_len = MBEDTLS_GET_UINT24_BE(p_certificate_list_len, 0); unsigned char *p_cert_data_len = certificate_list; unsigned char *cert_data = p_cert_data_len + 3; size_t cert_data_len = MBEDTLS_GET_UINT24_BE(p_cert_data_len, 0); unsigned char *p_extensions_len = cert_data + cert_data_len; unsigned char *extensions = p_extensions_len + 2; size_t extensions_len = MBEDTLS_GET_UINT16_BE(p_extensions_len, 0); *expected_result = MBEDTLS_ERR_SSL_DECODE_ERROR; switch (tweak) { case 1: /* Failure when checking if the certificate request context length * and certificate list length can be read */ *end = buf + 3; set_chk_buf_ptr_args(args, buf, *end, 4); break; case 2: /* Invalid certificate request context length. */ *p_certificate_request_context_len = (unsigned char) certificate_request_context_len + 1; reset_chk_buf_ptr_args(args); break; case 3: /* Failure when checking if certificate_list data can be read. */ MBEDTLS_PUT_UINT24_BE(certificate_list_len + 1, p_certificate_list_len, 0); set_chk_buf_ptr_args(args, certificate_list, *end, certificate_list_len + 1); break; case 4: /* Failure when checking if the cert_data length can be read. */ MBEDTLS_PUT_UINT24_BE(2, p_certificate_list_len, 0); set_chk_buf_ptr_args(args, p_cert_data_len, certificate_list + 2, 3); break; case 5: /* Failure when checking if cert_data data can be read. */ MBEDTLS_PUT_UINT24_BE(certificate_list_len - 3 + 1, p_cert_data_len, 0); set_chk_buf_ptr_args(args, cert_data, certificate_list + certificate_list_len, certificate_list_len - 3 + 1); break; case 6: /* Failure when checking if the extensions length can be read. */ MBEDTLS_PUT_UINT24_BE(certificate_list_len - extensions_len - 1, p_certificate_list_len, 0); set_chk_buf_ptr_args( args, p_extensions_len, certificate_list + certificate_list_len - extensions_len - 1, 2); break; case 7: /* Failure when checking if extensions data can be read. */ MBEDTLS_PUT_UINT16_BE(extensions_len + 1, p_extensions_len, 0); set_chk_buf_ptr_args( args, extensions, certificate_list + certificate_list_len, extensions_len + 1); break; default: return -1; } return 0; } #endif /* MBEDTLS_TEST_HOOKS */ /* * Functions for tests based on tickets. Implementations of the * write/parse ticket interfaces as defined by mbedtls_ssl_ticket_write/parse_t. * Basically same implementations as in ticket.c without the encryption. That * way we can tweak easily tickets characteristics to simulate misbehaving * peers. */ #if defined(MBEDTLS_SSL_SESSION_TICKETS) int mbedtls_test_ticket_write( void *p_ticket, const mbedtls_ssl_session *session, unsigned char *start, const unsigned char *end, size_t *tlen, uint32_t *lifetime) { int ret; ((void) p_ticket); if ((ret = mbedtls_ssl_session_save(session, start, end - start, tlen)) != 0) { return ret; } /* Maximum ticket lifetime as defined in RFC 8446 */ *lifetime = 7 * 24 * 3600; return 0; } int mbedtls_test_ticket_parse(void *p_ticket, mbedtls_ssl_session *session, unsigned char *buf, size_t len) { ((void) p_ticket); return mbedtls_ssl_session_load(session, buf, len); } #endif /* MBEDTLS_SSL_SESSION_TICKETS */ #if defined(MBEDTLS_SSL_CLI_C) && defined(MBEDTLS_SSL_SRV_C) && \ defined(MBEDTLS_SSL_PROTO_TLS1_3) && defined(MBEDTLS_SSL_SESSION_TICKETS) && \ defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED) int mbedtls_test_get_tls13_ticket( mbedtls_test_handshake_test_options *client_options, mbedtls_test_handshake_test_options *server_options, mbedtls_ssl_session *session) { int ret = -1; unsigned char buf[64]; mbedtls_test_ssl_endpoint client_ep, server_ep; mbedtls_platform_zeroize(&client_ep, sizeof(client_ep)); mbedtls_platform_zeroize(&server_ep, sizeof(server_ep)); ret = mbedtls_test_ssl_endpoint_init(&client_ep, MBEDTLS_SSL_IS_CLIENT, client_options, NULL, NULL, NULL); TEST_EQUAL(ret, 0); ret = mbedtls_test_ssl_endpoint_init(&server_ep, MBEDTLS_SSL_IS_SERVER, server_options, NULL, NULL, NULL); TEST_EQUAL(ret, 0); mbedtls_ssl_conf_session_tickets_cb(&server_ep.conf, mbedtls_test_ticket_write, mbedtls_test_ticket_parse, NULL); ret = mbedtls_test_mock_socket_connect(&(client_ep.socket), &(server_ep.socket), 1024); TEST_EQUAL(ret, 0); TEST_EQUAL(mbedtls_test_move_handshake_to_state( &(server_ep.ssl), &(client_ep.ssl), MBEDTLS_SSL_HANDSHAKE_OVER), 0); TEST_EQUAL(server_ep.ssl.handshake->new_session_tickets_count, 0); do { ret = mbedtls_ssl_read(&(client_ep.ssl), buf, sizeof(buf)); } while (ret != MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET); ret = mbedtls_ssl_get_session(&(client_ep.ssl), session); TEST_EQUAL(ret, 0); exit: mbedtls_test_ssl_endpoint_free(&client_ep, NULL); mbedtls_test_ssl_endpoint_free(&server_ep, NULL); return ret; } #endif /* MBEDTLS_SSL_CLI_C && MBEDTLS_SSL_SRV_C && MBEDTLS_SSL_PROTO_TLS1_3 && MBEDTLS_SSL_SESSION_TICKETS && MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED */ #endif /* MBEDTLS_SSL_TLS_C */ ```
Thesinge (Gronings: Taisen) is a village in the municipality of Groningen, in the Dutch province of Groningen. The Benedictine monastery of Germania was founded in Thesinge in 1205. History The village was first mentioned in 786 or 787 as Thelingi, and means "(monastery) of the people of Thiasa (person)". The Benedictine monastery Germania was founded in 1205 near the village. Thesinge is a terp (artificial living hill) village with a rectangular structure. The monastery was destroyed in 1584 during the Reformation. Most of the buildings were demolished 1629 except for the church. The St Felicitas Church of the monastery became the Dutch Reformed church. It was built in the 13th century, but extensively modified and rebuilt in 1786. The church was restored between 1972 and 1973. It was decommissioned in 1971, and is used to weddings. The grist mill Germania was built in 1825, however a wind mill had been at the location before 1649. It was originally a post mill, but converted into a tower mill in 1852. In 1950, an electro motor was installed and the sails were removed. In 1968, it was sold to the municipality of Ten Boer and restored in 1973. Thesinge was home to 208 people in 1840. In 1999, the forge museum Smidshouk opened. Thesinge used to be part of the municipality of Ten Boer, but become part of Groningen in 2019. Notable people Dirk van der Borg (born 1955), mayor of Sliedrecht Gallery References External links www.thesinge.com Populated places in Groningen (province) Groningen (city)
```javascript #! /usr/local/bin/node // <xbar.title>Discordian Date</xbar.title> // <xbar.version>v1.0</xbar.version> // <xbar.author>Volker Wieban</xbar.author> // <xbar.author.github>hpcodecraft</xbar.author.github> // <xbar.desc>Shows the current date of the Discordian calendar</xbar.desc> // <xbar.image>path_to_url // <xbar.dependencies>bash,node</xbar.dependencies> // SETUP // You need to have node installed for this to work // On Mac OS with Homebrew, `brew install node` will set you up // JS port of ddate // Copypasta'ed from: // path_to_url const days = [ { l: "Sweetmorn", s: "SM" }, { l: "Boomtime", s: "BT" }, { l: "Pungenday", s: "PD" }, { l: "Prickle-Prickle", s: "PP" }, { l: "Setting Orange", s: "SO" } ]; const seasons = [ { l: "Chaos", s: "Chs" }, { l: "Discord", s: "Dsc" }, { l: "Confusion", s: "Cfn" }, { l: "Bureaucracy", s: "Bcy" }, { l: "The Aftermath", s: "Afm" } ]; const holydays = { Chaos: { 5: "Mungday", 50: "Chaoflux" }, Discord: { 5: "Mojoday", 50: "Discoflux" }, Confusion: { 5: "Syaday", 50: "Confuflux" }, Bureaucracy: { 5: "Zaraday", 50: "Bureflux" }, "The Aftermath": { 5: "Maladay", 50: "Afflux" } }; const minute = 1000 * 60; const day = minute * 60 * 24; const year = day * 365; const DDate = function(epooch) { /* for reference, epoch is Sweetmorn, 1 Chaos 3136 */ this.date = {}; this.initificate = function(epooch) { epooch -= new Date().getTimezoneOffset() * minute; const leps = Math.floor(epooch / year / 4); epooch -= leps * day; let cur = Math.floor((epooch % year) / day); const flarf = Math.floor(epooch / (day * 365)) + 3136; const ist = (flarf - 3130) % 4 == 0; this.tabby = ist && cur == 59; if (ist && cur > 59) cur -= 1; const gwar = Math.floor(cur % 73) + 1; const sn = Math.floor(cur / 73); let woody = 0; for (let i = 1; i <= cur; i++) { woody = woody == 4 ? 0 : woody + 1; } const hoyl = holydays[seasons[sn].l][gwar] || false; this.numricks = [woody, sn, gwar, flarf, hoyl]; if (this.tabby) return { tibs: true, year: flarf }; return { tibs: false, day: days[woody], season: seasons[sn], date: gwar, year: flarf, holyday: hoyl }; }; this.numberize = function(num) { const thtaghn = num % 100 > 9 && num % 100 < 15; switch (num % 10) { case 1: return num + (thtaghn ? "th" : "st"); case 2: return num + (thtaghn ? "th" : "nd"); case 3: return num + (thtaghn ? "th" : "rd"); case 4: default: return num + "th"; } }; this.toOldImmediateDateFormat = function() { return ( this.date.day.l + ", the " + this.numberize(this.date.date) + " day of " + this.date.season.l + " in the YOLD " + this.date.year ); }; this.toDateString = function() { return this.format("%{%A, %B %e%}, %Y YOLD"); }; this.getDate = function() { return this.date; }; this.format = function(str) { if (!str) return; let r = ""; let stopit = false; let tibsing = false; for (let i = 0; i < str.length; i++) { if (stopit) break; if (str[i] == "%" && str[i + 1] == "}") tibsing = (i += 2) == Infinity; if (tibsing) continue; if (str[i] == "%") { switch (str[i + 1]) { case "A": r += days[this.numricks[0]].l; break; case "a": r += days[this.numricks[0]].s; break; case "B": r += seasons[this.numricks[1]].l; break; case "b": r += seasons[this.numricks[1]].s; break; case "d": r += this.numricks[2]; break; case "e": r += this.numberize(this.numricks[2]); break; case "H": r += this.numricks[4] || ""; break; case "N": stopit = !Boolean(this.numricks[4]); break; case "n": r += "\n"; break; case "t": r += "\t"; break; case "{": // if(this.tabby) tibsing = ((r += "St. Tib's Day") != Infinity); if (this.tabby) tibsing = (r += "") != Infinity; break; case ".": r += "I've nothing to say to you. (yet)"; break; case "Y": r += this.numricks[3]; break; default: r += str[i]; break; } i++; } else { r += str[i]; } } return r; }; this.date = this.initificate(epooch || new Date().getTime()); }; // ---------------------------------------- // Bitbar script // ---------------------------------------- const color = "goldenrod"; const specialDayColor = "seagreen"; // Current date/time const d = new Date(); // DDate format const shortDate = "%a, %b %e"; const longDate = `%A|color=${color}%nThe %e day of %B|color=${color}%nIn %Y Year of Our Lady of Discord|color=${color}%n`; // Display Special Day let specialDay = false; const dd = new DDate(); const ddProps = dd.getDate(); if (ddProps.tibs) { specialDay = "St. Tib's Day"; } else if (ddProps.holyday) { specialDay = ddProps.holyday; } else if (d.getDay() === 5) { specialDay = "Hot Dog Day"; } const output = dd.format(shortDate) + `|dropdown=false color=${color}\n` + "---\n" + dd.format(longDate) + (specialDay ? "\nIt's " + specialDay + `!|color=${specialDayColor}` : ""); console.log(output); ```
```java /* * */ package io.debezium.testing.system.tools.databases.mongodb.sharded; public class OcpMongoShardedConstants { public static final String MONGO_CONFIG_DEPLOYMENT_NAME = "mongo-config"; public static final String MONGO_CONFIG_REPLICASET_NAME = "mongo-config"; public static final String MONGO_SHARD_DEPLOYMENT_PREFIX = "mongo-shard"; public static final String MONGO_CONFIG_ROLE = "mongo-config"; public static final String MONGO_MONGOS_ROLE = "mongo-mongos"; public static final String MONGO_SHARD_ROLE = "mongo-shard"; public static final int MONGO_MONGOS_PORT = 27017; public static final int MONGO_SHARD_PORT = 27018; public static final int MONGO_CONFIG_PORT = 27019; public static final int SHARD_COUNT = 2; public static final int REPLICAS_IN_SHARD = 3; public static final int CONFIG_SERVER_REPLICAS = 3; public static final String ADMIN_DB = "admin"; public final static String INIT_RS_TEMPLATE = "init-rs.js"; public final static String CREATE_CERT_USER_TEMPLATE = "create-dbz-user-x509.js"; public final static String CREATE_DBZ_USER_TEMPLATE = "create-dbz-user.js"; public final static String INSERT_MONGOS_DATA_SCRIPT_LOC = "/database-resources/mongodb/sharded/insert-mongos-data.js"; public final static String KEYFILE_PATH_IN_CONTAINER = "/etc/mongodb.keyfile"; } ```
Duncan Mills is an unincorporated community in Fulton County, Illinois, United States. Duncan Mills is located at the junction of US 24, US 136, and IL 100 south of Lewistown. History A post office called Duncans Mills was established in 1858, and remained in operation until 1905. The community was named for George Duncan, the owner of a local mill. References Unincorporated communities in Fulton County, Illinois Unincorporated communities in Illinois
```css /* Pojoaque Style by Jason Tate path_to_url Based on Solarized Style from path_to_url */ .hljs { display: block; overflow-x: auto; padding: 0.5em; color: #dccf8f; background: url(./pojoaque.jpg) repeat scroll left top #181914; -webkit-text-size-adjust: none; } .hljs-comment, .diff .hljs-header, .hljs-doctype, .lisp .hljs-string { color: #586e75; font-style: italic; } .hljs-keyword, .css .rule .hljs-keyword, .hljs-winutils, .javascript .hljs-title, .method, .hljs-addition, .css .hljs-tag, .hljs-list .hljs-keyword, .nginx .hljs-title { color: #b64926; } .hljs-number, .hljs-command, .hljs-string, .hljs-tag .hljs-value, .hljs-doctag, .tex .hljs-formula, .hljs-regexp, .hljs-hexcolor { color: #468966; } .hljs-title, .hljs-localvars, .hljs-function .hljs-title, .hljs-chunk, .hljs-decorator, .hljs-built_in, .hljs-identifier, .hljs-name, .hljs-id { color: #ffb03b; } .hljs-attribute, .hljs-variable, .lisp .hljs-body, .smalltalk .hljs-number, .hljs-constant, .hljs-class .hljs-title, .hljs-parent, .hljs-type { color: #b58900; } .css .hljs-attribute { color: #b89859; } .css .hljs-number, .css .hljs-hexcolor { color: #dccf8f; } .css .hljs-class { color: #d3a60c; } .hljs-preprocessor, .hljs-pragma, .hljs-pi, .hljs-shebang, .hljs-symbol, .hljs-symbol .hljs-string, .diff .hljs-change, .hljs-special, .hljs-attr_selector, .hljs-important, .hljs-subst, .hljs-cdata { color: #cb4b16; } .hljs-deletion { color: #dc322f; } .tex .hljs-formula { background: #073642; } ```
Jeremy Roger Horne (born October 25, 1986) is an American football wide receiver who is with the Calgary Stampeders. He was signed by the Kansas City Chiefs after going undrafted in the 2010 NFL Draft. He played college football at Massachusetts after transferring from Syracuse after his freshman year. College career Horne attended Syracuse University his freshman year and played in seven games, primarily on special teams. He transferred to UMass after his first season. In three years at UMass, Horne recorded 85 catches for 1,343 yards and scored 11 touchdowns and also served as a kickoff returner. He was named a third-team All-Colonial Athletic Conference Wide Receiver in his junior season. Professional career Kansas City Chiefs Horne signed as a free agent with the Kansas City Chiefs after going undrafted in the 2010 NFL Draft. He was on the Chiefs active roster for the first six games of the season making appearances in three of them. He spent the last ten games of the year on the practice squad. On January 11, 2011, Horne was signed by the Chiefs to a reserve/future deal. He was waived during final cuts during the 2011 season. After clearing waivers, he was signed to the Chiefs practice squad. On September 21, 2011, Horne was activated to the Chiefs active roster, taking running back Jamaal Charles's roster spot, after he was placed on injured reserve. He was waived on October 26, but was signed to the practice squad the following day. Horne was once again activated to the active roster on November 21. Horne finished the season with 5 rushing yards on 1 carry. New York Giants On May 12, 2013, Horne signed as a free agent with the New York Giants. On July 30, 2013, Horne was carted off the field with a foot injury. On August 1, 2013, Horne was waived/injured by the New York Giants. He cleared waivers and was placed on injured reserve. On August 7, 2013, Horne was released with an injury settlement. External links Kansas City Chiefs bio UMass Minutemen bio References UMass Minutemen football players Syracuse Orange football players Kansas City Chiefs players New York Giants players American football wide receivers Sportspeople from Albany, New York Players of American football from New York (state) Living people 1986 births
The Chinese Eastern Railway or CER (, , or , Kitaysko-Vostochnaya Zheleznaya Doroga or KVZhD), is the historical name for a railway system in Northeast China (also known as Manchuria). The Russian Empire constructed the line from 1897 to 1902 using a concession from the Qing dynasty government of Imperial China. The system linked Chita with Vladivostok in the Russian Far East and with Port Arthur, then an Imperial Russian leased ice-free port. The T-shaped line consisted of three branches: the western branch, now the Harbin–Manzhouli Railway the eastern branch, now the Harbin–Suifenhe Railway the southern branch, now part of the Beijing–Harbin Railway which intersected in Harbin. Saint Petersburg administered the railway and the concession, known as the Chinese Eastern Railway Zone, from the city of Harbin, which grew into a major rail-hub. The southern branch of the CER, known as the Japanese South Manchuria Railway from 1906, became a locus and partial casus belli for the Russo-Japanese War of 1904–1905, the 1929 Sino-Soviet Conflict, and the Second Sino-Japanese War of 1937–1945. The Soviet Union sold the railway to the Japanese puppet state of Manchukuo in 1935; later in 1945 the Soviets regained co-ownership of the railway by treaty. The Soviet Union returned the Chinese Eastern Railway to the People's Republic of China in 1952. Name The official Chinese name of this railway was Great Qing Eastern Provinces Railway (), also known as Eastern Qing Railway () or Eastern Provinces Railway(). After the Xinhai Revolution, the northern branches was renamed to Chinese Eastern Provinces Railway () in 1915, shortened form as (). The southern branch was renamed to South Manchuria Railway (Japanese kyujitai/) after Japanese took over from Russians in 1905. It is also known in English as the Chinese Far East Railway, Trans-Manchurian Railway and North Manchuria Railway. History The Chinese Eastern Railway, a single-track line, provided a shortcut for the world's longest railroad, the Trans-Siberian Railway, from near the Siberian city of Chita, across northern Manchuria via Harbin to the Russian port of Vladivostok. This route drastically reduced the travel distance required along the originally proposed main northern route to Vladivostok, which lay completely on Russian soil but was not completed until a decade after the Manchurian "shortcut". In 1896 China granted a construction concession through northern Manchuria under the supervision of Vice Minister of Public Works Xu Jingcheng. Work on the CER began in July 1897 along the line Tarskaya (east of Chita) — Hailar — Harbin — Nikolsk-Ussuriski, and accelerated drastically after Russia concluded a 25-year lease of Liaodong from China in 1898. Officially, traffic on the line started in November 1901, but regular passenger traffic from St. Petersburg to Vladivostok across the Trans-Siberian railway did not commence until July 1903. In 1898, construction of a 550-mile (880 km) spur line, most of which later formed the South Manchuria Railway, began at Harbin, leading southwards through Eastern Manchuria, along the Liaodong Peninsula, to the ice-free deep-water port at Lüshun, which Russia was fortifying and developing into a first-class strategic naval base and marine coaling station for its Far East Fleet and Merchant Marine. This town was known in the west as Port Arthur, and the Russo-Japanese War (1904–1905) was fought largely over who would possess this region and its excellent harbor, as well as whether it would remain open to traders of all nations (Open Door Policy). The Chinese Eastern Railway was essentially completed in 1902, a few years earlier than the stretch around Lake Baikal. Until the Circumbaikal portion was completed (1904–1905; double-tracked, 1914), goods carried on the Trans-Siberian Railway had to be trans-shipped by ferry almost a hundred kilometers across the lake (from Port Baikal to Mysovaya). The Chinese Eastern Railway became important in international relations. After the first Sino-Japanese War of 1894–1895, Russia gained the right to build the Chinese Eastern Railway in Manchuria. They had a large army and occupied Northern Manchuria, which was of some concern to the Japanese. Russia wanted the railway badly. It loaned money to China and promised to use the proposed railway to help defend China against Japan, in the secret Li–Lobanov Treaty of 1896. Construction started in 1898 and was completed in 1903. In 1900 during the Boxer Rebellion – which was suppressed by the Eight Nation Alliance including Russia – Russia also launched a separate invasion of Manchuria sending 100,000 troops to protect their interests in the railroad. During the Russo-Japanese War, Russia lost both the Liaodong Peninsula and much of the South Manchurian branch to Japan. The rail line from Changchun to Lüshun — transferred to Japanese control — became the South Manchuria Railway. During the Russian Civil War (1917–1924) the Russian part of the CER came under the administration of the White Army. From the 1919 Karakhan Manifesto to 1927, diplomats of the Soviet Union would promise to revoke concessions in China, but the Soviets secretly kept tsarist concessions such as the Chinese Eastern Railway, as well as consulates, barracks, and Orthodox churches. This led Chiang Kai-Shek — who pushed foreign powers such as Britain to return some of their concessions from 1925 to 1927 — to turn against his former Soviet ally in 1927, seizing Soviet legations. The Soviets would later fight an armed conflict to keep control over the northern CER in the Sino-Soviet conflict of 1929. while Japan maintained control of the southern spur line. After the establishment of Manchukuo it was known as the North Manchuria Railway until 23 March 1935, when the USSR sold its rights to the railway to the Manchukuo government; it was then merged into the Manchukuo National Railway and converted to standard gauge in four hours on 31 August. From August 1945, the CER again came under the joint control of the USSR and China. After World War II the Soviet government insisted on occupying the Liaodong Peninsula but allowed joint control over the Southern branch with China; all this together received the name of the "Chinese Changchun Railway" (). In 1952, the Soviet Union transferred (free of charge) all of its rights to the Chinese Changchun Railway to the People's Republic of China. Flags The flag of the Chinese Eastern Railway is a combination of Chinese and Russian flags. It changed several times with the political changes of both owners. The first CER flag (1897–1915) was a combination of the triangular version of the flag of the Qing dynasty and the flag of Russia, with East Provinces Railway of Great Qing () in Chinese. The 1915–1925 flag replaced the flag of the Qing dynasty with a triangular version of the five-colored flag, with East Provinces Railway Company of China () in Chinese. The flag was changed again in 1925 and 1932, with the flag of the Soviet Union and the flag of Manchukuo added. Fleet The only train that covers the entire route is the train #19/20 "Vostok" (translated as "East") Moscow — Beijing. The trip from Moscow to Beijing takes 146 hours (6 days, 2 hours). The journey in the opposite direction lasts 143 hours (5 days, 23 hours). There is also a train #653/654 Zabaikalsk — Manzhouli which one can use to cross the Russian-Chinese border. The trip takes 25 minutes. See also Harbin–Manzhouli railway Harbin Russians Harbin–Suifenhe railway Kaiping Tramway and Imperial Railways of North China Russian Railway Museum, St.Petersburg Russian gauge Empire of Japan–Russian Empire relations History of Sino-Russian relations References Further reading Chia-pin, Liang. “History of the Chinese Eastern Railway: A Chinese Version.” Pacific Affairs 3#2 (1930), pp. 188–211, online in English translation Deane, Frederick. "The Chinese Eastern Railway." Foreign Affairs 3#1 (1924), pp. 147–52, online Elleman, Bruce A. "The Soviet Union's Secret Diplomacy Concerning the Chinese Eastern Railway, 1924–1925." Journal of Asian Studies 53.2 (1994): 459–486. Kantorovich, A. J. “The Sale of the Chinese Eastern Railway.” Pacific Affairs 8#4 (1935) pp. 397–408, online Wang, Chin-Chun. "The Chinese Eastern Railway." Annals of the American Academy of Political and Social Science 122.1 (1925): 57–69. online Wang, C. C. “The Sale of the Chinese Eastern Railway.” Foreign Affairs 12#1 (1933), pp. 57–70, online External links Archival collections Guide to the Photograph Album of the Chinese Eastern Railway. Special Collections and Archives, The UC Irvine Libraries, Irvine, California. Views of the Chinese Eastern Railway This album contains 42 photographic prints depicting depots, railroad shops and yards, rolling stock, car interiors, tracks, health resorts, and other views along the line. Captions for the photographs are in Russian, Mandarin, and English. Other Chinese Eastern Railroad Zone History of the line “The Chinese Eastern Railway – A Glimpse of History” by Peter Crush. Hong Kong Railway Society web pages: under “English, Members Corner, Feature Articles”. Retrieved January 2009 History of Manchuria Railway lines in China Rail transport in Siberia Railway companies of China Concessions in China China–Russia relations China–Soviet Union relations 1520 mm gauge railways in Russia Standard gauge railways in China Standard gauge railways in Russia 1520 mm gauge railways in China Major National Historical and Cultural Sites in Heilongjiang
```python import pytest from dbt.contracts.graph.semantic_manifest import SemanticManifest # Overwrite the default nods to construct the manifest @pytest.fixture def nodes(metricflow_time_spine_model): return [metricflow_time_spine_model] @pytest.fixture def semantic_models( semantic_model, ) -> list: return [semantic_model] @pytest.fixture def metrics( metric, ) -> list: return [metric] class TestSemanticManifest: def test_validate(self, manifest): sm_manifest = SemanticManifest(manifest) assert sm_manifest.validate() ```
```ruby require "rails_helper" RSpec.describe Articles::Feeds do describe "NUMBER_OF_HOURS_TO_OFFSET_USERS_LATEST_ARTICLE_VIEWS" do it "sets NUMBER_OF_HOURS_TO_OFFSET_USERS_LATEST_ARTICLE_VIEWS to ApplicationConfig" do allow(ApplicationConfig).to receive(:[]) .with("NUMBER_OF_HOURS_TO_OFFSET_USERS_LATEST_ARTICLE_VIEWS").and_return(4) expect(described_class.number_of_hours_to_offset_users_latest_article_views).to eq(4) end it "returns default 18 when ApplicationConfig is not defined" do expect(described_class.number_of_hours_to_offset_users_latest_article_views).to eq(18) end end describe ".oldest_published_at_to_consider_for" do subject(:function_call) { described_class.oldest_published_at_to_consider_for(user: user) } context "when the given user is nil" do let(:user) { nil } it "returns Article::Feeds::DEFAULT_DAYS_SINCE_PUBLISHED days ago" do # Why the to_date coercion? Because Integer.days.ago is an # ActiveSupport::TimeWithZone variable that includes # microseconds, and in the time between the function_call and # the expectation test, there's a few microseconds that passed # (based on your processor). In theory, this test might fail # if someone ran the test right around the stroke of midnight. expect(function_call.to_date).to eq(Articles::Feeds::DEFAULT_DAYS_SINCE_PUBLISHED.days.ago.to_date) end end context "when the given user has no page views" do let(:user) { instance_double(User) } before do allow(user).to receive(:page_views).and_return(nil) end it { is_expected.to be_a ActiveSupport::TimeWithZone } end context "when the user has page views" do let(:user) { instance_double(User) } let(:page_viewed_at) { Time.current } let(:expected_result) do page_viewed_at - described_class.number_of_hours_to_offset_users_latest_article_views.hours end before do # This is a distinct code smell. The other option is adding a # method to user and perhaps to page views and then testing # delegation. This is, instead, an ActiveRecord call chain, # so I'm going to ask that we accept this smell to ease # testing. # rubocop:disable RSpec/MessageChain allow(user).to receive_message_chain(:page_views, :second_to_last, :created_at).and_return(page_viewed_at) # rubocop:enable RSpec/MessageChain end it { is_expected.to eq(expected_result) } end end end ```
Arkansas Arts Academy High School (formerly Benton County School of the Arts High School) is a public charter school located in the city of Rogers, Arkansas. The school provides secondary education focused on artistic and academic programs for students in grades 7 through 12. It is one of nine public high schools in Benton County, one of three charter schools in Northwest Arkansas, and the sole high school administered by the Arkansas Arts Academy, which acts as a school district for the high school and the Arkansas Arts Academy Elementary/Middle School (kindergarten through grade 6). History On September 4, 2001, the first day of class for the then Benton County School of the Arts charter school began for students kindergarten through grade 8. Subsequently, in August 2007, the Northwest Arkansas Academy of Fine Arts (NWAAFA) was established for grades 9 through 12. On July 1, 2009, the two schools merged to form the Benton County School of the Arts (BCSA) school district to include the renamed BCSA High School. In 2014, both the high school and elementary/middle school were renamed Arkansas Arts Academy. In 2018, the high school campus was renovated and made much bigger, the only building left untouched being the Performing Arts Center (PAC). Arkansas Arts Academy has a school board of seven members. Academics Arkansas Arts Academy High School is accredited by the Arkansas Department of Education (ADE) and the assumed course of study follows the Smart Core curriculum developed by the ADE, which requires students complete at least 28 units prior to graduation. Students complete regular coursework and exams and may take Advanced Placement (AP) courses and exam with the opportunity to receive college credit. In 2019, Arkansas Arts Academy High School was listed and ranked #5 in Arkansas Rankings and #530 in National Rankings in the Best High Schools Report developed by U.S. News & World Report. Arkansas Arts Academy High School is currently listed as the 13th best high school in Arkansas by the ADE. Athletics The Arkansas Arts Academy mascot is the Diamonds, changed from the Penguins in March 2018. The Arkansas Arts Academy Diamonds participate in cross country, basketball, and mountain biking. References External links Charter schools in Arkansas Educational institutions established in 2007 Public high schools in Arkansas Schools in Benton County, Arkansas Buildings and structures in Rogers, Arkansas 2007 establishments in Arkansas Rogers, Arkansas
```yaml commonfields: id: IncidentToContext version: -1 name: IncidentToContext script: >- # These comments are required to make sure that all pre-defined labels are selectable in the playbook # demisto.setContext('Label/Application', '') # demisto.setContext('Label/Database', '') # demisto.setContext('Label/Directory', '') # demisto.setContext('Label/Email', '') # demisto.setContext('Label/Email/cc', '') # demisto.setContext('Label/Email/from', '') # demisto.setContext('Label/Email/format', '') # demisto.setContext('Label/Email/html', '') # demisto.setContext('Label/Email/text', '') # demisto.setContext('Label/Email/subject', '') # demisto.setContext('Label/Email/attachments', '') # demisto.setContext('Label/Email/headers', '') # demisto.setContext('Label/IP', '') # demisto.setContext('Label/System', '') # demisto.setContext('Label/URL', '') # demisto.setContext('Label/User', '') # demisto.setContext('Label/Brand', '') # demisto.setContext('Label/Instance', '') i = demisto.incidents()[0] demisto.setContext('id', i['id']) demisto.setContext('created', i['created']) demisto.setContext('modified', i['modified']) demisto.setContext('occurred', i['occurred']) demisto.setContext('dueDate', i['dueDate']) demisto.setContext('name', i['name']) demisto.setContext('owner', i['owner']) demisto.setContext('type', i['type']) demisto.setContext('severity', i['severity']) demisto.setContext('phase', i['phase']) demisto.setContext('status', i['status']) demisto.setContext('details', i['details']) # Setting initial score based on severity. Severity "Unknown" yields score 0. score = i['severity'] * 25 demisto.setContext('score', score) if 'labels' in i and i['labels']: labels = {} for l in i['labels']: name = 'Label/' + l['type'] labels[name] = [l['value']] + (labels[name] if name in labels else []) for k, v in labels.iteritems(): demisto.setContext(k, v if len(v) > 1 else v[0]) if 'CustomFields' in i and i['CustomFields']: for key in i['CustomFields'].keys(): demisto.setContext(key, i['CustomFields'][key]) demisto.results('Incident context set') type: python subtype: python2 args: [] tags: - infra comment: Deprecated. Inserts incident info and labels into context for use inside playbooks. system: true deprecated: true scripttarget: 0 dependson: {} timeout: 0s fromversion: 5.0.0 dockerimage: demisto/python:2.7.18.20958 ```
PK-19 Bajaur-II () is a constituency for the Khyber Pakhtunkhwa Assembly of the Khyber Pakhtunkhwa province of Pakistan.It was created in 2018 after merger of FATA with Khyber Pakhtunkhwa before 2019 elections. Members of Assembly 2019-2023: PK-101 Bajaur-II Election 2019 After merger of FATA with Khyber Pakhtunkhwa provincial elections were held for the very first time. Pakistan Tehreek-e-Insaf candidate Ajmal Khan Wazir won the seat by getting 12,204 votes. Election 2023 See also PK-18 Bajaur-I PK-20 Bajaur-III References External links Khyber Pakhtunkhwa Assembly's official website Election Commission of Pakistan's official website Awaztoday.com Search Result Election Commission Pakistan Search Result Khyber Pakhtunkhwa Assembly constituencies
```c++ //===your_sha256_hash------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // //===your_sha256_hash------===// // // file LICENSE_1_0.txt or copy at path_to_url // <boost/thread/future.hpp> // class packaged_task<R> // packaged_task& operator=(packaged_task&) = delete; #define BOOST_THREAD_VERSION 4 #if BOOST_THREAD_VERSION == 4 #define BOOST_THREAD_DETAIL_SIGNATURE double() #else #define BOOST_THREAD_DETAIL_SIGNATURE double #endif #include <boost/thread/future.hpp> #include <boost/detail/lightweight_test.hpp> class A { long data_; public: explicit A(long i) : data_(i) {} long operator()() const {return data_;} long operator()(long i, long j) const {return data_ + i + j;} }; int main() { { boost::packaged_task<BOOST_THREAD_DETAIL_SIGNATURE> p0(A(5)); boost::packaged_task<BOOST_THREAD_DETAIL_SIGNATURE> p; p = p0; } return boost::report_errors(); } #include "../../../remove_error_code_unused_warning.hpp" ```
Shiroka Polyana () is a reservoir lake situated in the Western Rhodopes mountains in Bulgaria. The lake is situated 30 km south of Batak, on the road to Dospat. It is located 1500 meters above sea level amidst a forest of old pine trees. Different legends are told about the lake. The shape of Shiroka Poliana reservoir is unique. Viewed from the ring-road it seems that the lake is composed of numerous small lakes with separate walls. This illusion is due to the indented relief of the lake bed that consists of several mountain gullies. Although the banks of the lake are far from the road and comparatively hard to access, it attracts many visitors and sports fishermen because of the abundance of fish, including grey mullet, European perch, and trout. Reservoirs in Bulgaria Landforms of Pazardzhik Province Rhodope Mountains Tourist attractions in Pazardzhik Province
Mohanna Waqes Al-Enezi (; born 18 November 1983) is a Saudi professional footballer who plays as a right back for Al-Qaisumah. Honours Al-Batin MS League: 2019–20 References External links 1983 births Living people Saudi Arabian men's footballers Al Batin FC players Al-Tai FC players Al-Qaisumah FC players Saudi Fourth Division players Saudi Second Division players Saudi First Division League players Saudi Pro League players Men's association football fullbacks Men's association football wingers
```ruby # 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 require "arrow" require "parquet/version" require "parquet/loader" module Parquet class Error < StandardError end Loader.load end ```
Mitchell Jon Reinke (born February 4, 1996) is an American professional ice hockey defenseman who is currently playing with the Coachella Valley Firebirds in the American Hockey League (AHL) while under contract with the Seattle Kraken of the National Hockey League (NHL). He has formerly played with the St. Louis Blues in the NHL. Early life Reinke was born on February 4, 1996, in St. Paul, Minnesota, to parents Chris and Mickie Reinke. He came from an athletic family as his father played hockey at Hamline University and his sister played soccer at the University of Minnesota. He also has another sister, Kelsey. Upon graduating from Hamline, his father became a masters division world championship boxer. Playing career Reinke attended Stillwater High before playing junior hockey with the Cedar Rapids RoughRiders of the United States Hockey League (USHL). He committed to play collegiate hockey with Michigan Tech of the Western Collegiate Hockey Association (WCHA). In his freshman season in 2016–17 season, Reinke developed a scoring touch and sound defensive game with 20 points in 41 games to earn a selection to the WCHA All-Rookie Team. In the following 2017–18 season, Reinke notched a new career high with 24 points in 35 games before opting to end his collegiate career after his sophomore year in signing as an Undrafted free agent to a two-year, entry-level contract with the St. Louis Blues on March 26, 2018. Reinke was immediately added to the Blues roster and made his NHL debut with the Blues in a 6–0 defeat to the Arizona Coyotes on March 31, 2018. After spending his first three full professional seasons within the Blues organization, Reinke was not tendered a qualifying offer to be released as a free agent. On September 2, 2021, he was signed to a one-year contract to continue in the AHL with the Wilkes-Barre/Scranton Penguins, the primary affiliate to the Pittsburgh Penguins. Following two productive seasons within the Penguins organization, Reinke was rewarded with an NHL contract as a free agent, in signing a one-year, two-way deal with the Seattle Kraken on September 2, 2023. Career statistics Awards and honors References External links 1996 births Living people American men's ice hockey defensemen Cedar Rapids RoughRiders players Michigan Tech Huskies men's ice hockey players Ice hockey players from Minnesota People from Stillwater, Minnesota Sportspeople from Washington County, Minnesota St. Louis Blues players San Antonio Rampage players Undrafted National Hockey League players Utica Comets players Wilkes-Barre/Scranton Penguins players
```objective-c /* * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef RTC_BASE_SYNCHRONIZATION_MUTEX_RACE_CHECK_H_ #define RTC_BASE_SYNCHRONIZATION_MUTEX_RACE_CHECK_H_ #include <atomic> #include "rtc_base/checks.h" #include "rtc_base/system/unused.h" #include "rtc_base/thread_annotations.h" namespace webrtc { // This implementation class is useful when a consuming project can guarantee // that all WebRTC invocation is happening serially. Additionally, the consuming // project cannot use WebRTC code that spawn threads or task queues. // // The class internally check fails on Lock() if it finds the consumer actually // invokes WebRTC concurrently. // // To use the race check mutex, define WEBRTC_RACE_CHECK_MUTEX globally. This // also adds a dependency to absl::Mutex from logging.cc because even though // objects are invoked serially, the logging is static and invoked concurrently // and hence needs protection. class RTC_LOCKABLE MutexImpl final { public: MutexImpl() = default; MutexImpl(const MutexImpl&) = delete; MutexImpl& operator=(const MutexImpl&) = delete; void Lock() RTC_EXCLUSIVE_LOCK_FUNCTION() { bool was_free = free_.exchange(false, std::memory_order_acquire); RTC_CHECK(was_free) << "WEBRTC_RACE_CHECK_MUTEX: mutex locked concurrently."; } RTC_WARN_UNUSED_RESULT bool TryLock() RTC_EXCLUSIVE_TRYLOCK_FUNCTION(true) { bool was_free = free_.exchange(false, std::memory_order_acquire); return was_free; } void Unlock() RTC_UNLOCK_FUNCTION() { free_.store(true, std::memory_order_release); } private: // Release-acquire ordering is used. // - In the Lock methods we're guaranteeing that reads and writes happening // after the (Try)Lock don't appear to have happened before the Lock (acquire // ordering). // - In the Unlock method we're guaranteeing that reads and writes happening // before the Unlock don't appear to happen after it (release ordering). std::atomic<bool> free_{true}; }; } // namespace webrtc #endif // RTC_BASE_SYNCHRONIZATION_MUTEX_RACE_CHECK_H_ ```
```java Updating interfaces by using `default` methods Using bounded type parameters in generic methods Metadata: setting a file's owner There is no such thing as *pass-by-reference* in Java Supply `toString()` in all classes ```
```objective-c // // AttachmentsHelper.m // Strongbox // // Created by Strongbox on 22/12/2020. // #import "MinimalPoolHelper.h" #import "NSArray+Extensions.h" #import "NSData+Extensions.h" @implementation MinimalPoolHelper + (NSArray<KeePassAttachmentAbstractionLayer*>*)getMinimalAttachmentPool:(Node*)rootNode { NSArray<Node*>* currentNodesWithAttachments = [rootNode filterChildren:YES predicate:^BOOL(Node * _Nonnull node) { return !node.isGroup && node.fields.attachments.count > 0; }]; NSArray<Node*>* allNodesWithHistoryNodeAttachments = [rootNode filterChildren:YES predicate:^BOOL(Node * _Nonnull node) { return !node.isGroup && [node.fields.keePassHistory anyMatch:^BOOL(Node * _Nonnull obj) { return obj.fields.attachments.count > 0; }]; }]; NSArray<Node*>* allHistoricalNodesWithAttachments = [allNodesWithHistoryNodeAttachments flatMap:^id _Nonnull(Node * _Nonnull node, NSUInteger idx) { return [node.fields.keePassHistory filter:^BOOL(Node * _Nonnull obj) { return obj.fields.attachments.count > 0; }]; }]; NSMutableArray<Node*>* allNodesWithAttachments = currentNodesWithAttachments.mutableCopy; [allNodesWithAttachments addObjectsFromArray:allHistoricalNodesWithAttachments]; NSArray<KeePassAttachmentAbstractionLayer*>* allAttachments = [allNodesWithAttachments flatMap:^NSArray * _Nonnull(Node * _Nonnull obj, NSUInteger idx) { return obj.fields.attachments.allValues; }]; NSMutableDictionary<NSString*, KeePassAttachmentAbstractionLayer*>* attachmentsByHash = NSMutableDictionary.dictionary; for (KeePassAttachmentAbstractionLayer* attachment in allAttachments) { attachmentsByHash[attachment.digestHash] = attachment; } return attachmentsByHash.allValues; } @end ```
```objective-c // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_ARM64_INSTRUCTIONS_ARM64_H_ #define V8_ARM64_INSTRUCTIONS_ARM64_H_ #include "src/arm64/constants-arm64.h" #include "src/arm64/utils-arm64.h" #include "src/globals.h" #include "src/utils.h" namespace v8 { namespace internal { // ISA constants. -------------------------------------------------------------- typedef uint32_t Instr; // The following macros initialize a float/double variable with a bit pattern // without using static initializers: If ARM64_DEFINE_FP_STATICS is defined, the // symbol is defined as uint32_t/uint64_t initialized with the desired bit // pattern. Otherwise, the same symbol is declared as an external float/double. #if defined(ARM64_DEFINE_FP_STATICS) #define DEFINE_FLOAT(name, value) extern const uint32_t name = value #define DEFINE_DOUBLE(name, value) extern const uint64_t name = value #else #define DEFINE_FLOAT(name, value) extern const float name #define DEFINE_DOUBLE(name, value) extern const double name #endif // defined(ARM64_DEFINE_FP_STATICS) DEFINE_FLOAT(kFP32PositiveInfinity, 0x7f800000); DEFINE_FLOAT(kFP32NegativeInfinity, 0xff800000); DEFINE_DOUBLE(kFP64PositiveInfinity, 0x7ff0000000000000UL); DEFINE_DOUBLE(kFP64NegativeInfinity, 0xfff0000000000000UL); // This value is a signalling NaN as both a double and as a float (taking the // least-significant word). DEFINE_DOUBLE(kFP64SignallingNaN, 0x7ff000007f800001); DEFINE_FLOAT(kFP32SignallingNaN, 0x7f800001); // A similar value, but as a quiet NaN. DEFINE_DOUBLE(kFP64QuietNaN, 0x7ff800007fc00001); DEFINE_FLOAT(kFP32QuietNaN, 0x7fc00001); // The default NaN values (for FPCR.DN=1). DEFINE_DOUBLE(kFP64DefaultNaN, 0x7ff8000000000000UL); DEFINE_FLOAT(kFP32DefaultNaN, 0x7fc00000); #undef DEFINE_FLOAT #undef DEFINE_DOUBLE enum LSDataSize { LSByte = 0, LSHalfword = 1, LSWord = 2, LSDoubleWord = 3 }; LSDataSize CalcLSPairDataSize(LoadStorePairOp op); enum ImmBranchType { UnknownBranchType = 0, CondBranchType = 1, UncondBranchType = 2, CompareBranchType = 3, TestBranchType = 4 }; enum AddrMode { Offset, PreIndex, PostIndex }; enum FPRounding { // The first four values are encodable directly by FPCR<RMode>. FPTieEven = 0x0, FPPositiveInfinity = 0x1, FPNegativeInfinity = 0x2, FPZero = 0x3, // The final rounding mode is only available when explicitly specified by the // instruction (such as with fcvta). It cannot be set in FPCR. FPTieAway }; enum Reg31Mode { Reg31IsStackPointer, Reg31IsZeroRegister }; // Instructions. --------------------------------------------------------------- class Instruction { public: V8_INLINE Instr InstructionBits() const { return *reinterpret_cast<const Instr*>(this); } V8_INLINE void SetInstructionBits(Instr new_instr) { *reinterpret_cast<Instr*>(this) = new_instr; } int Bit(int pos) const { return (InstructionBits() >> pos) & 1; } uint32_t Bits(int msb, int lsb) const { return unsigned_bitextract_32(msb, lsb, InstructionBits()); } int32_t SignedBits(int msb, int lsb) const { int32_t bits = *(reinterpret_cast<const int32_t*>(this)); return signed_bitextract_32(msb, lsb, bits); } Instr Mask(uint32_t mask) const { return InstructionBits() & mask; } V8_INLINE const Instruction* following(int count = 1) const { return InstructionAtOffset(count * static_cast<int>(kInstructionSize)); } V8_INLINE Instruction* following(int count = 1) { return InstructionAtOffset(count * static_cast<int>(kInstructionSize)); } V8_INLINE const Instruction* preceding(int count = 1) const { return following(-count); } V8_INLINE Instruction* preceding(int count = 1) { return following(-count); } #define DEFINE_GETTER(Name, HighBit, LowBit, Func) \ int32_t Name() const { return Func(HighBit, LowBit); } INSTRUCTION_FIELDS_LIST(DEFINE_GETTER) #undef DEFINE_GETTER // ImmPCRel is a compound field (not present in INSTRUCTION_FIELDS_LIST), // formed from ImmPCRelLo and ImmPCRelHi. int ImmPCRel() const { DCHECK(IsPCRelAddressing()); int offset = ((ImmPCRelHi() << ImmPCRelLo_width) | ImmPCRelLo()); int width = ImmPCRelLo_width + ImmPCRelHi_width; return signed_bitextract_32(width - 1, 0, offset); } uint64_t ImmLogical(); float ImmFP32(); double ImmFP64(); LSDataSize SizeLSPair() const { return CalcLSPairDataSize( static_cast<LoadStorePairOp>(Mask(LoadStorePairMask))); } // Helpers. bool IsCondBranchImm() const { return Mask(ConditionalBranchFMask) == ConditionalBranchFixed; } bool IsUncondBranchImm() const { return Mask(UnconditionalBranchFMask) == UnconditionalBranchFixed; } bool IsCompareBranch() const { return Mask(CompareBranchFMask) == CompareBranchFixed; } bool IsTestBranch() const { return Mask(TestBranchFMask) == TestBranchFixed; } bool IsImmBranch() const { return BranchType() != UnknownBranchType; } bool IsLdrLiteral() const { return Mask(LoadLiteralFMask) == LoadLiteralFixed; } bool IsLdrLiteralX() const { return Mask(LoadLiteralMask) == LDR_x_lit; } bool IsPCRelAddressing() const { return Mask(PCRelAddressingFMask) == PCRelAddressingFixed; } bool IsAdr() const { return Mask(PCRelAddressingMask) == ADR; } bool IsBrk() const { return Mask(ExceptionMask) == BRK; } bool IsUnresolvedInternalReference() const { // Unresolved internal references are encoded as two consecutive brk // instructions. return IsBrk() && following()->IsBrk(); } bool IsLogicalImmediate() const { return Mask(LogicalImmediateFMask) == LogicalImmediateFixed; } bool IsAddSubImmediate() const { return Mask(AddSubImmediateFMask) == AddSubImmediateFixed; } bool IsAddSubShifted() const { return Mask(AddSubShiftedFMask) == AddSubShiftedFixed; } bool IsAddSubExtended() const { return Mask(AddSubExtendedFMask) == AddSubExtendedFixed; } // Match any loads or stores, including pairs. bool IsLoadOrStore() const { return Mask(LoadStoreAnyFMask) == LoadStoreAnyFixed; } // Match any loads, including pairs. bool IsLoad() const; // Match any stores, including pairs. bool IsStore() const; // Indicate whether Rd can be the stack pointer or the zero register. This // does not check that the instruction actually has an Rd field. Reg31Mode RdMode() const { // The following instructions use csp or wsp as Rd: // Add/sub (immediate) when not setting the flags. // Add/sub (extended) when not setting the flags. // Logical (immediate) when not setting the flags. // Otherwise, r31 is the zero register. if (IsAddSubImmediate() || IsAddSubExtended()) { if (Mask(AddSubSetFlagsBit)) { return Reg31IsZeroRegister; } else { return Reg31IsStackPointer; } } if (IsLogicalImmediate()) { // Of the logical (immediate) instructions, only ANDS (and its aliases) // can set the flags. The others can all write into csp. // Note that some logical operations are not available to // immediate-operand instructions, so we have to combine two masks here. if (Mask(LogicalImmediateMask & LogicalOpMask) == ANDS) { return Reg31IsZeroRegister; } else { return Reg31IsStackPointer; } } return Reg31IsZeroRegister; } // Indicate whether Rn can be the stack pointer or the zero register. This // does not check that the instruction actually has an Rn field. Reg31Mode RnMode() const { // The following instructions use csp or wsp as Rn: // All loads and stores. // Add/sub (immediate). // Add/sub (extended). // Otherwise, r31 is the zero register. if (IsLoadOrStore() || IsAddSubImmediate() || IsAddSubExtended()) { return Reg31IsStackPointer; } return Reg31IsZeroRegister; } ImmBranchType BranchType() const { if (IsCondBranchImm()) { return CondBranchType; } else if (IsUncondBranchImm()) { return UncondBranchType; } else if (IsCompareBranch()) { return CompareBranchType; } else if (IsTestBranch()) { return TestBranchType; } else { return UnknownBranchType; } } static int ImmBranchRangeBitwidth(ImmBranchType branch_type) { switch (branch_type) { case UncondBranchType: return ImmUncondBranch_width; case CondBranchType: return ImmCondBranch_width; case CompareBranchType: return ImmCmpBranch_width; case TestBranchType: return ImmTestBranch_width; default: UNREACHABLE(); return 0; } } // The range of the branch instruction, expressed as 'instr +- range'. static int32_t ImmBranchRange(ImmBranchType branch_type) { return (1 << (ImmBranchRangeBitwidth(branch_type) + kInstructionSizeLog2)) / 2 - kInstructionSize; } int ImmBranch() const { switch (BranchType()) { case CondBranchType: return ImmCondBranch(); case UncondBranchType: return ImmUncondBranch(); case CompareBranchType: return ImmCmpBranch(); case TestBranchType: return ImmTestBranch(); default: UNREACHABLE(); } return 0; } int ImmUnresolvedInternalReference() const { DCHECK(IsUnresolvedInternalReference()); // Unresolved references are encoded as two consecutive brk instructions. // The associated immediate is made of the two 16-bit payloads. int32_t high16 = ImmException(); int32_t low16 = following()->ImmException(); return (high16 << 16) | low16; } bool IsBranchAndLinkToRegister() const { return Mask(UnconditionalBranchToRegisterMask) == BLR; } bool IsMovz() const { return (Mask(MoveWideImmediateMask) == MOVZ_x) || (Mask(MoveWideImmediateMask) == MOVZ_w); } bool IsMovk() const { return (Mask(MoveWideImmediateMask) == MOVK_x) || (Mask(MoveWideImmediateMask) == MOVK_w); } bool IsMovn() const { return (Mask(MoveWideImmediateMask) == MOVN_x) || (Mask(MoveWideImmediateMask) == MOVN_w); } bool IsNop(int n) { // A marking nop is an instruction // mov r<n>, r<n> // which is encoded as // orr r<n>, xzr, r<n> return (Mask(LogicalShiftedMask) == ORR_x) && (Rd() == Rm()) && (Rd() == n); } // Find the PC offset encoded in this instruction. 'this' may be a branch or // a PC-relative addressing instruction. // The offset returned is unscaled. int64_t ImmPCOffset(); // Find the target of this instruction. 'this' may be a branch or a // PC-relative addressing instruction. Instruction* ImmPCOffsetTarget(); static bool IsValidImmPCOffset(ImmBranchType branch_type, ptrdiff_t offset); bool IsTargetInImmPCOffsetRange(Instruction* target); // Patch a PC-relative offset to refer to 'target'. 'this' may be a branch or // a PC-relative addressing instruction. void SetImmPCOffsetTarget(Instruction* target); void SetUnresolvedInternalReferenceImmTarget(Instruction* target); // Patch a literal load instruction to load from 'source'. void SetImmLLiteral(Instruction* source); uintptr_t LiteralAddress() { int offset = ImmLLiteral() << kLoadLiteralScaleLog2; return reinterpret_cast<uintptr_t>(this) + offset; } enum CheckAlignment { NO_CHECK, CHECK_ALIGNMENT }; V8_INLINE const Instruction* InstructionAtOffset( int64_t offset, CheckAlignment check = CHECK_ALIGNMENT) const { // The FUZZ_disasm test relies on no check being done. DCHECK(check == NO_CHECK || IsAligned(offset, kInstructionSize)); return this + offset; } V8_INLINE Instruction* InstructionAtOffset( int64_t offset, CheckAlignment check = CHECK_ALIGNMENT) { // The FUZZ_disasm test relies on no check being done. DCHECK(check == NO_CHECK || IsAligned(offset, kInstructionSize)); return this + offset; } template<typename T> V8_INLINE static Instruction* Cast(T src) { return reinterpret_cast<Instruction*>(src); } V8_INLINE ptrdiff_t DistanceTo(Instruction* target) { return reinterpret_cast<Address>(target) - reinterpret_cast<Address>(this); } static const int ImmPCRelRangeBitwidth = 21; static bool IsValidPCRelOffset(ptrdiff_t offset) { return is_int21(offset); } void SetPCRelImmTarget(Instruction* target); void SetBranchImmTarget(Instruction* target); }; // Where Instruction looks at instructions generated by the Assembler, // InstructionSequence looks at instructions sequences generated by the // MacroAssembler. class InstructionSequence : public Instruction { public: static InstructionSequence* At(Address address) { return reinterpret_cast<InstructionSequence*>(address); } // Sequences generated by MacroAssembler::InlineData(). bool IsInlineData() const; uint64_t InlineData() const; }; // Simulator/Debugger debug instructions --------------------------------------- // Each debug marker is represented by a HLT instruction. The immediate comment // field in the instruction is used to identify the type of debug marker. Each // marker encodes arguments in a different way, as described below. // Indicate to the Debugger that the instruction is a redirected call. const Instr kImmExceptionIsRedirectedCall = 0xca11; // Represent unreachable code. This is used as a guard in parts of the code that // should not be reachable, such as in data encoded inline in the instructions. const Instr kImmExceptionIsUnreachable = 0xdebf; // A pseudo 'printf' instruction. The arguments will be passed to the platform // printf method. const Instr kImmExceptionIsPrintf = 0xdeb1; // Most parameters are stored in ARM64 registers as if the printf // pseudo-instruction was a call to the real printf method: // x0: The format string. // x1-x7: Optional arguments. // d0-d7: Optional arguments. // // Also, the argument layout is described inline in the instructions: // - arg_count: The number of arguments. // - arg_pattern: A set of PrintfArgPattern values, packed into two-bit fields. // // Floating-point and integer arguments are passed in separate sets of registers // in AAPCS64 (even for varargs functions), so it is not possible to determine // the type of each argument without some information about the values that were // passed in. This information could be retrieved from the printf format string, // but the format string is not trivial to parse so we encode the relevant // information with the HLT instruction. const unsigned kPrintfArgCountOffset = 1 * kInstructionSize; const unsigned kPrintfArgPatternListOffset = 2 * kInstructionSize; const unsigned kPrintfLength = 3 * kInstructionSize; const unsigned kPrintfMaxArgCount = 4; // The argument pattern is a set of two-bit-fields, each with one of the // following values: enum PrintfArgPattern { kPrintfArgW = 1, kPrintfArgX = 2, // There is no kPrintfArgS because floats are always converted to doubles in C // varargs calls. kPrintfArgD = 3 }; static const unsigned kPrintfArgPatternBits = 2; // A pseudo 'debug' instruction. const Instr kImmExceptionIsDebug = 0xdeb0; // Parameters are inlined in the code after a debug pseudo-instruction: // - Debug code. // - Debug parameters. // - Debug message string. This is a NULL-terminated ASCII string, padded to // kInstructionSize so that subsequent instructions are correctly aligned. // - A kImmExceptionIsUnreachable marker, to catch accidental execution of the // string data. const unsigned kDebugCodeOffset = 1 * kInstructionSize; const unsigned kDebugParamsOffset = 2 * kInstructionSize; const unsigned kDebugMessageOffset = 3 * kInstructionSize; // Debug parameters. // Used without a TRACE_ option, the Debugger will print the arguments only // once. Otherwise TRACE_ENABLE and TRACE_DISABLE will enable or disable tracing // before every instruction for the specified LOG_ parameters. // // TRACE_OVERRIDE enables the specified LOG_ parameters, and disabled any // others that were not specified. // // For example: // // __ debug("print registers and fp registers", 0, LOG_REGS | LOG_FP_REGS); // will print the registers and fp registers only once. // // __ debug("trace disasm", 1, TRACE_ENABLE | LOG_DISASM); // starts disassembling the code. // // __ debug("trace rets", 2, TRACE_ENABLE | LOG_REGS); // adds the general purpose registers to the trace. // // __ debug("stop regs", 3, TRACE_DISABLE | LOG_REGS); // stops tracing the registers. const unsigned kDebuggerTracingDirectivesMask = 3 << 6; enum DebugParameters { NO_PARAM = 0, BREAK = 1 << 0, LOG_DISASM = 1 << 1, // Use only with TRACE. Disassemble the code. LOG_REGS = 1 << 2, // Log general purpose registers. LOG_FP_REGS = 1 << 3, // Log floating-point registers. LOG_SYS_REGS = 1 << 4, // Log the status flags. LOG_WRITE = 1 << 5, // Log any memory write. LOG_STATE = LOG_REGS | LOG_FP_REGS | LOG_SYS_REGS, LOG_ALL = LOG_DISASM | LOG_STATE | LOG_WRITE, // Trace control. TRACE_ENABLE = 1 << 6, TRACE_DISABLE = 2 << 6, TRACE_OVERRIDE = 3 << 6 }; } } // namespace v8::internal #endif // V8_ARM64_INSTRUCTIONS_ARM64_H_ ```
Berville may refer to several communes in France: Berville, Val-d'Oise, in the Val-d'Oise département Berville-en-Roumois, in the Eure département Berville-la-Campagne, in the Eure département Berville-sur-Mer, in the Eure département Berville-en-Caux, in the Seine-Maritime département Berville-sur-Seine, in the Seine-Maritime département
Hinton Daubney is a small hamlet in Hampshire, England, located between Catherington and Hambledon. It is the site of one of the earliest recorded sightings of ball lightning. Hinton Daubney played a role in the escape of Charles II from England after the battle of Worcester. It is one of the places where he and Lord Wilmot found loyal support in the person of Lawrence Hyde. See _Last Act_, by George Gounter, published by J. R. Smith, 1873, available at archive.org, document ID lastactinmiracul00goun. References Villages in Hampshire
In mathematics, elliptic curve primality testing techniques, or elliptic curve primality proving (ECPP), are among the quickest and most widely used methods in primality proving. It is an idea put forward by Shafi Goldwasser and Joe Kilian in 1986 and turned into an algorithm by A. O. L. Atkin the same year. The algorithm was altered and improved by several collaborators subsequently, and notably by Atkin and , in 1993. The concept of using elliptic curves in factorization had been developed by H. W. Lenstra in 1985, and the implications for its use in primality testing (and proving) followed quickly. Primality testing is a field that has been around since the time of Fermat, in whose time most algorithms were based on factoring, which become unwieldy with large input; modern algorithms treat the problems of determining whether a number is prime and what its factors are separately. It became of practical importance with the advent of modern cryptography. Although many current tests result in a probabilistic output (N is either shown composite, or probably prime, such as with the Baillie–PSW primality test or the Miller–Rabin test), the elliptic curve test proves primality (or compositeness) with a quickly verifiable certificate. Previously-known prime-proving methods such as the Pocklington primality test required at least partial factorization of in order to prove that is prime. As a result, these methods required some luck and are generally slow in practice. Elliptic curve primality proving It is a general-purpose algorithm, meaning it does not depend on the number being of a special form. ECPP is currently in practice the fastest known algorithm for testing the primality of general numbers, but the worst-case execution time is not known. ECPP heuristically runs in time: for some . This exponent may be decreased to for some versions by heuristic arguments. ECPP works the same way as most other primality tests do, finding a group and showing its size is such that is prime. For ECPP the group is an elliptic curve over a finite set of quadratic forms such that is trivial to factor over the group. ECPP generates an Atkin–Goldwasser–Kilian–Morain certificate of primality by recursion and then attempts to verify the certificate. The step that takes the most CPU time is the certificate generation, because factoring over a class field must be performed. The certificate can be verified quickly, allowing a check of operation to take very little time. , the largest prime that has been proved with ECPP method is . The certification was performed by Andreas Enge using his fastECPP software CM. Proposition The elliptic curve primality tests are based on criteria analogous to the Pocklington criterion, on which that test is based, where the group is replaced by and E is a properly chosen elliptic curve. We will now state a proposition on which to base our test, which is analogous to the Pocklington criterion, and gives rise to the Goldwasser–Kilian–Atkin form of the elliptic curve primality test. Let N be a positive integer, and E be the set which is defined by the equation Consider E over use the usual addition law on E, and write 0 for the neutral element on E. Let m be an integer. If there is a prime q which divides m, and is greater than and there exists a point P on E such that (1) mP = 0 (2) (m/q)P is defined and not equal to 0 Then N is prime. Proof If N is composite, then there exists a prime that divides N. Define as the elliptic curve defined by the same equation as E but evaluated modulo p rather than modulo N. Define as the order of the group . By Hasse's theorem on elliptic curves we know and thus and there exists an integer u with the property that Let be the point P evaluated modulo p. Thus, on we have by (1), as is calculated using the same method as mP, except modulo p rather than modulo N (and ). This contradicts (2), because if (m/q)P is defined and not equal to 0 (mod N), then the same method calculated modulo p instead of modulo N will yield: Goldwasser–Kilian algorithm From this proposition an algorithm can be constructed to prove an integer, N, is prime. This is done as follows: Choose three integers at random, a, x, y and set Now P = (x,y) is a point on E, where we have that E is defined by . Next we need an algorithm to count the number of points on E. Applied to E, this algorithm (Koblitz and others suggest Schoof's algorithm) produces a number m which is the number of points on curve E over FN, provided N is prime. If the point-counting algorithm stops at an undefined expression this allows to determine a non-trivial factor of N. If it succeeds, we apply a criterion for deciding whether our curve E is acceptable. If we can write m in the form where is a small integer and q a large probable prime (a number that passes a probabilistic primality test, for example), then we do not discard E. Otherwise, we discard our curve and randomly select another triple (a, x, y) to start over. The idea here is to find an m that is divisible by a large prime number q. This prime is a few digits smaller than m (or N) so q will be easier to prove prime than N. Assuming we find a curve which passes the criterion, proceed to calculate mP and kP. If any of the two calculations produce an undefined expression, we can get a non-trivial factor of N. If both calculations succeed, we examine the results. If it is clear that N is not prime, because if N were prime then E would have order m, and any element of E would become 0 on multiplication by m. If kP = 0, then the algorithm discards E and starts over with a different a, x, y triple. Now if and then our previous proposition tells us that N is prime. However, there is one possible problem, which is the primality of q. This is verified using the same algorithm. So we have described a recursive algorithm, where the primality of N depends on the primality of q and indeed smaller 'probable primes' until some threshold is reached where q is considered small enough to apply a non-recursive deterministic algorithm. Problems with the algorithm Atkin and Morain state "the problem with GK is that Schoof's algorithm seems almost impossible to implement." It is very slow and cumbersome to count all of the points on E using Schoof's algorithm, which is the preferred algorithm for the Goldwasser–Kilian algorithm. However, the original algorithm by Schoof is not efficient enough to provide the number of points in short time. These comments have to be seen in the historical context, before the improvements by Elkies and Atkin to Schoof's method. A second problem Koblitz notes is the difficulty of finding the curve E whose number of points is of the form kq, as above. There is no known theorem which guarantees we can find a suitable E in polynomially many attempts. The distribution of primes on the Hasse interval , which contains m, is not the same as the distribution of primes in the group orders, counting curves with multiplicity. However, this is not a significant problem in practice. Atkin–Morain elliptic curve primality test (ECPP) In a 1993 paper, Atkin and Morain described an algorithm ECPP which avoided the trouble of relying on a cumbersome point counting algorithm (Schoof's). The algorithm still relies on the proposition stated above, but rather than randomly generating elliptic curves and searching for a proper m, their idea was to construct a curve E where the number of points is easy to compute. Complex multiplication is key in the construction of the curve. Now, given an N for which primality needs to be proven we need to find a suitable m and q, just as in the Goldwasser–Kilian test, that will fulfill the proposition and prove the primality of N. (Of course, a point P and the curve itself, E, must also be found.) ECPP uses complex multiplication to construct the curve E, doing so in a way that allows for m (the number of points on E) to be easily computed. We will now describe this method: Utilization of complex multiplication requires a negative discriminant, D, such that D can be written as the product of two elements , or completely equivalently, we can write the equation: For some a, b. If we can describe N in terms of either of these forms, we can create an elliptic curve E on with complex multiplication (described in detail below), and the number of points is given by: For N to split into the two elements, we need that (where denotes the Legendre symbol). This is a necessary condition, and we achieve sufficiency if the class number h(D) of the order in is 1. This happens for only 13 values of D, which are the elements of {−3, −4, −7, −8, −11, −12, −16, −19, −27, −28, −43, −67, −163} The test Pick discriminants D in sequence of increasing h(D). For each D check if and whether 4N can be written as: This part can be verified using Cornacchia's algorithm. Once acceptable D and a have been discovered, calculate . Now if m has a prime factor q of size use the complex multiplication method to construct the curve E and a point P on it. Then we can use our proposition to verify the primality of N. Note that if m does not have a large prime factor or cannot be factored quickly enough, another choice of D can be made. Complex multiplication method For completeness, we will provide an overview of complex multiplication, the way in which an elliptic curve can be created, given our D (which can be written as a product of two elements). Assume first that and (these cases are much more easily done). It is necessary to calculate the elliptic j-invariants of the h(D) classes of the order of discriminant D as complex numbers. There are several formulas to calculate these. Next create the monic polynomial , which has roots corresponding to the h(D) values. Note, that is the class polynomial. From complex multiplication theory, we know that has integer coefficients, which allows us to estimate these coefficients accurately enough to discover their true values. Now, if N is prime, CM tells us that splits modulo N into a product of h(D) linear factors, based on the fact that D was chosen so that N splits as the product of two elements. Now if j is one of the h(D) roots modulo N we can define E as: c is any quadratic nonresidue mod N, and r is either 0 or 1. Given a root j there are only two possible nonisomorphic choices of E, one for each choice of r. We have the cardinality of these curves as or Discussion Just as with the Goldwasser–Killian test, this one leads to a down-run procedure. Again, the culprit is q. Once we find a q that works, we must check it to be prime, so in fact we are doing the whole test now for q. Then again we may have to perform the test for factors of q. This leads to a nested certificate where at each level we have an elliptic curve E, an m and the prime in doubt, q. Example of Atkin–Morain ECPP We construct an example to prove that is prime using the Atkin–Morain ECPP test. First proceed through the set of 13 possible discriminants, testing whether the Legendre Symbol , and if 4N can be written as . For our example is chosen. This is because and also, using Cornacchia's algorithm, we know that and thus a = 25 and b = 1. The next step is to calculate m. This is easily done as which yields Next we need to find a probable prime divisor of m, which was referred to as q. It must satisfy the condition that In this case, m = 143 = 11×13. So unfortunately we cannot choose 11 or 13 as our q, for it does not satisfy the necessary inequality. We are saved, however, by an analogous proposition to that which we stated before the Goldwasser–Kilian algorithm, which comes from a paper by Morain. It states, that given our m, we look for an s which divides m, , but is not necessarily prime, and check whether, for each which divides s for some point P on our yet to be constructed curve. If s satisfies the inequality, and its prime factors satisfy the above, then N is prime. So in our case, we choose s = m = 143. Thus our possible 's are 11 and 13. First, it is clear that , and so we need only check the values of But before we can do this, we must construct our curve, and choose a point P. In order to construct the curve, we make use of complex multiplication. In our case we compute the J-invariant Next we compute and we know our elliptic curve is of the form: , where k is as described previously and c a non-square in . So we can begin with which yields Now, utilizing the point P = (6,6) on E it can be verified that It is simple to check that 13(6, 6) = (12, 65) and 11P = (140, 147), and so, by Morain's proposition, N is prime. Complexity and running times Goldwasser and Kilian's elliptic curve primality proving algorithm terminates in expected polynomial time for at least of prime inputs. Conjecture Let be the number of primes smaller than x for sufficiently large x. If one accepts this conjecture then the Goldwasser–Kilian algorithm terminates in expected polynomial time for every input. Also, if our N is of length k, then the algorithm creates a certificate of size that can be verified in . Now consider another conjecture, which will give us a bound on the total time of the algorithm. Conjecture 2 Suppose there exist positive constants and such that the amount of primes in the interval is larger than Then the Goldwasser Kilian algorithm proves the primality of N in an expected time of For the Atkin–Morain algorithm, the running time stated is for some Primes of special form For some forms of numbers, it is possible to find 'short-cuts' to a primality proof. This is the case for the Mersenne numbers. In fact, due to their special structure, which allows for easier verification of primality, the six largest known prime numbers are all Mersenne numbers. There has been a method in use for some time to verify primality of Mersenne numbers, known as the Lucas–Lehmer test. This test does not rely on elliptic curves. However we present a result where numbers of the form where , n odd can be proven prime (or composite) using elliptic curves. Of course this will also provide a method for proving primality of Mersenne numbers, which correspond to the case where n = 1. The following method is drawn from the paper Primality Test for using Elliptic Curves, by Yu Tsumura. Group structure of E(FN) We take E as our elliptic curve, where E is of the form for where is prime, and with odd. Theorem 1. Theorem 2. or depending on whether or not m is a quadratic residue modulo p. Theorem 3. Let Q = (x,y) on E be such that x a quadratic non-residue modulo p. Then the order of Q is divisible by in the cyclic group First we will present the case where n is relatively small with respect to , and this will require one more theorem: Theorem 4. Choose a and suppose Then p is a prime if and only if there exists a Q = (x,y) on E, such that for i = 1, 2, ...,k − 1 and where is a sequence with initial value . The algorithm We provide the following algorithm, which relies mainly on Theorems 3 and 4. To verify the primality of a given number , perform the following steps: (1) Choose such that , and find such that . Take and . Then is on . Calculate . If then is composite, otherwise proceed to (2). (2) Set as the sequence with initial value . Calculate for . If for an , where then is composite. Otherwise, proceed to (3). (3) If then is prime. Otherwise, is composite. This completes the test. Justification of the algorithm In (1), an elliptic curve, E is picked, along with a point Q on E, such that the x-coordinate of Q is a quadratic nonresidue. We can say Thus, if N is prime, Q has order divisible by , by Theorem 3, and therefore the order of Q''' is d | n. This means Q = nQ has order . Therefore, if (1) concludes that N is composite, it truly is composite. (2) and (3) check if Q has order . Thus, if (2) or (3) conclude N is composite, it is composite. Now, if the algorithm concludes that N is prime, then that means satisfies the condition of Theorem 4, and so N is truly prime. There is an algorithm as well for when n'' is large; however, for this we refer to the aforementioned article. References External links Elliptic Curves and Primality Proving by Atkin and Morain. Chris Caldwell, "Primality Proving 4.2: Elliptic curves and the ECPP test" at the Prime Pages. François Morain, "The ECPP home page" (includes old ECPP software for some architectures). Marcel Martin, "Primo" (binary for Linux 64-bit) PARI/GP, a computer algebra system with functions to create Atkin-Morain and Primo primality certificates GMP-ECPP, a free ECPP implementation LiDIA, a free C++ library for Linux with ECPP support CM , another free library that contains an ECPP implementation Primality tests
```javascript /** * @license Apache-2.0 * * * * 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. */ 'use strict'; // MODULES // var tape = require( 'tape' ); var hasProxySupport = require( '@stdlib/assert/has-proxy-support' ); var Int32Array = require( '@stdlib/array/int32' ); var Uint8Array = require( '@stdlib/array/uint8' ); var array2fancy = require( './../lib' ); // VARIABLES // var opts = { 'skip': !hasProxySupport() }; // TESTS // tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); t.strictEqual( typeof array2fancy, 'function', 'main export is a function' ); t.end(); }); tape( 'the function returns an array-like object which throws an error when provided an invalid serialized slice (generic)', opts, function test( t ) { var values; var x; var y; var i; x = [ 1, 2, 3, 4 ]; y = array2fancy( x ); values = [ 'Slice(a,b,c)', 'Slice(1.5)', 'Slice(0,1,0)' ]; for ( i = 0; i < values.length; i++ ) { t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] ); } t.end(); function badValue( value ) { return function badValue() { y[ value ] = 0; }; } }); tape( 'the function returns an array-like object which throws an error when provided an invalid serialized slice (typed)', opts, function test( t ) { var values; var x; var y; var i; x = new Int32Array( [ 1, 2, 3, 4 ] ); y = array2fancy( x ); values = [ 'Slice(a,b,c)', 'Slice(1.5)', 'Slice(0,1,0)' ]; for ( i = 0; i < values.length; i++ ) { t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] ); } t.end(); function badValue( value ) { return function badValue() { y[ value ] = 0; }; } }); tape( 'the function returns an array-like object which throws an error when provided an invalid subsequence indexing expression (generic)', opts, function test( t ) { var values; var x; var y; var i; x = [ 1, 2, 3, 4 ]; y = array2fancy( x ); values = [ 'a:b:c', ':1.5', '0:1:0', ':::', '0:1:1:2' ]; for ( i = 0; i < values.length; i++ ) { t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] ); } t.end(); function badValue( value ) { return function badValue() { y[ value ] = 0; }; } }); tape( 'the function returns an array-like object which throws an error when provided an invalid subsequence indexing expression (typed)', opts, function test( t ) { var values; var x; var y; var i; x = new Int32Array( [ 1, 2, 3, 4 ] ); y = array2fancy( x ); values = [ 'a:b:c', ':1.5', '0:1:0', ':::', '0:1:1:2' ]; for ( i = 0; i < values.length; i++ ) { t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] ); } t.end(); function badValue( value ) { return function badValue() { y[ value ] = 0; }; } }); tape( 'the function returns an array-like object which throws an error when provided an invalid serialized array index (generic)', opts, function test( t ) { var values; var x; var y; var i; x = [ 1, 2, 3, 4 ]; y = array2fancy( x ); values = [ 'ArrayIndex<9999999>', 'ArrayIndex<9999999999>' ]; for ( i = 0; i < values.length; i++ ) { t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] ); } t.end(); function badValue( value ) { return function badValue() { y[ value ] = 0; }; } }); tape( 'the function returns an array-like object which throws an error when provided an invalid serialized array index (typed)', opts, function test( t ) { var values; var x; var y; var i; x = new Int32Array( [ 1, 2, 3, 4 ] ); y = array2fancy( x ); values = [ 'ArrayIndex<9999999>', 'ArrayIndex<9999999999>' ]; for ( i = 0; i < values.length; i++ ) { t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] ); } t.end(); function badValue( value ) { return function badValue() { y[ value ] = 0; }; } }); tape( 'the function returns an array-like object which throws an error when provided an unsupported array index (generic)', opts, function test( t ) { var values; var x; var y; var i; x = [ 1, 2, 3, 4 ]; y = array2fancy( x, { 'cache': { 'get': get } }); values = [ array2fancy.idx( [ 0, 1, 2, 3 ] ), array2fancy.idx( [ true, false, true, false ] ), array2fancy.idx( new Uint8Array( [ 0, 1, 0, 1 ] ) ) ]; for ( i = 0; i < values.length; i++ ) { t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] ); } t.end(); function badValue( value ) { return function badValue() { y[ value ] = 0; }; } function get() { return { 'data': [], 'type': 'beep', 'dtype': 'generic' }; } }); tape( 'the function returns an array-like object which throws an error when provided an unsupported array index (typed)', opts, function test( t ) { var values; var x; var y; var i; x = new Int32Array( [ 1, 2, 3, 4 ] ); y = array2fancy( x, { 'cache': { 'get': get } }); values = [ array2fancy.idx( [ 0, 1, 2, 3 ] ), array2fancy.idx( [ true, false, true, false ] ), array2fancy.idx( new Uint8Array( [ 0, 1, 0, 1 ] ) ) ]; for ( i = 0; i < values.length; i++ ) { t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] ); } t.end(); function badValue( value ) { return function badValue() { y[ value ] = 0; }; } function get() { return { 'data': [], 'type': 'beep', 'dtype': 'generic' }; } }); ```
```smalltalk using MongoDB.Driver; using Volo.Abp.Data; using Volo.Abp.MongoDB; using Volo.Abp.MultiTenancy; using Volo.Abp.OpenIddict.Applications; using Volo.Abp.OpenIddict.Authorizations; using Volo.Abp.OpenIddict.Scopes; using Volo.Abp.OpenIddict.Tokens; namespace Volo.Abp.OpenIddict.MongoDB; [IgnoreMultiTenancy] [ConnectionStringName(AbpOpenIddictDbProperties.ConnectionStringName)] public interface IOpenIddictMongoDbContext : IAbpMongoDbContext { IMongoCollection<OpenIddictApplication> Applications { get; } IMongoCollection<OpenIddictAuthorization> Authorizations { get; } IMongoCollection<OpenIddictScope> Scopes { get; } IMongoCollection<OpenIddictToken> Tokens { get; } } ```
In telecommunications, cable Internet access, shortened to cable Internet, is a form of broadband internet access which uses the same infrastructure as cable television. Like digital subscriber line and fiber to the premises services, cable Internet access provides network edge connectivity (last mile access) from the Internet service provider to an end user. It is integrated into the cable television infrastructure analogously to DSL which uses the existing telephone network. Cable TV networks and telecommunications networks are the two predominant forms of residential Internet access. Recently, both have seen increased competition from fiber deployments, wireless, mobile networks and satellite internet access. Hardware and bit rates Broadband cable Internet access requires a cable modem at the customer's premises and a cable modem termination system (CMTS) at a cable operator facility, typically a cable television headend. The two are connected via coaxial cable to a hybrid fibre-coaxial (HFC) network. While access networks are referred to as last-mile technologies, cable Internet systems can typically operate where the distance between the modem and the termination system is up to . If the HFC network is large, the cable modem termination system can be grouped into hubs for efficient management. Several standards have been used for cable internet, but the most common is DOCSIS. A cable modem at the customer is connected via coaxial cable to an optical node, and thus into an HFC network. An optical node serves many modems as the modems are connected with coaxial cable to a coaxial cable "trunk" via distribution "taps" on the trunk, which then connects to the node, possibly using amplifiers along the trunk. The optical node converts the Radiofrequency (RF) signal in the coaxial cable trunk into light pulses to be sent through optical fibers in the HFC network. At the other end of the network, an optics platform or headend platform converts the light pulses into RF signals in coaxial cables again using transmitter and receiver modules, and the cable modem termination system (CMTS) connects to these coaxial cables. An example of an optics platform is the Arris CH3000. There are two coaxial cables at the CMTS for each node: one for the downstream (download speed signal), and the other for the upstream (upload speed signal). The CMTS then connects to the ISP's IP (Internet Protocol) network. Downstream, the direction toward the user, bit rates can be as high as 1 Gbit/s. Upstream traffic, originating at the user, ranges from 384 kbit/s to more than 50 Mbit/s, although maximum effective range seems to be unknown. One downstream channel can handle hundreds of cable modems. As the system grows, the CMTS can be upgraded with more downstream and upstream ports, and grouped into hub CMTSs for efficient management. Most Data Over Cable Service Interface Specification (DOCSIS) cable modems restrict upload and download rates, with customizable limits. These limits are set in configuration files which are downloaded to the modem using the Trivial File Transfer Protocol, when the modem first establishes a connection to the provider's equipment. Some users have attempted to override the bandwidth cap and gain access to the full bandwidth of the system by uploading their own configuration file to the cable modem - a process called uncapping. Shared bandwidth In most residential broadband technologies, such as cable Internet, DSL, satellite internet, or wireless broadband, a population of users share the available bandwidth. Some technologies share only their core network, while some including cable internet and passive optical network (PON) also share the access network. This arrangement allows the network operator to take advantage of statistical multiplexing, a bandwidth sharing technique which is employed to distribute bandwidth fairly, in order to provide an adequate level of service at an acceptable price. However, the operator has to monitor usage patterns and scale the network appropriately, to ensure that customers receive adequate service even during peak-usage times. If the network operator does not provide enough bandwidth for a particular neighborhood, the connection would become saturated and speeds would drop if many people are using the service at the same time, or drop out completely. Operators have been known to use a bandwidth cap, or other bandwidth throttling technique; users' download speed is limited during peak times, if they have downloaded a large amount of data that day. See also Cable modem Digital cable Internet service provider Network service provider Internet access Triple play (telecommunications) - single coaxial cable connection for internet, TV and telephone service References Internet access Digital cable
Cyprus–India relations are the bilateral relations between the Cyprus and India. India maintains a High Commission in Nicosia. Cyprus maintains a High Commission in New Delhi. History India supported Cyprus during its struggle for independence from British colonial rule. Diplomatic relations between Cyprus and India were established on 10 February 1962, two years after the former gained independence. The Indian military has participated in United Nations peacekeeping operations in Cyprus on numerous occasions. Three Indian Generals have served as Commanders of the United Nations Peacekeeping Force in Cyprus (UNFICYP), since its creation in 1964. A road in Larnaca is named after Maj. General Kodandera Subayya Thimayya who died in 1965, while serving as the UNFICYP Force Commander. In 1966, the Government of Cyprus issued a stamp commemorating Thimayya. Cyprus supports the India–United States Civil Nuclear Agreement, and also supports India within the Nuclear Suppliers Group (NSG) and the International Atomic Energy Agency (IAEA). Prime Minister Atal Bihari Vajpayee visited Cyprus in October 2002. During the visit, Cyprus declared its support for India's candidature as a permanent member on the UN Security Council. President Pratibha Patil visited the country in October 2009. President Tassos Papadopoulos visited India in April 2006. Former First of Lady of Cyprus, Lila Erulkar, the wife of President Glafcos Clerides, was born in Ahmedabad and was of Indian Jewish descent. Her father, Dr Abraham Erulkar, was Mahatma Gandhi's personal physician in London in September 1946.[1] The street in Nicosia on which the High Commission of India is located is named after Indira Gandhi. In India, an avenue in New Delhi is named after Archbishop Makarios III. Economic relations Bilateral trade between Cyprus and India totaled EUR 76.5 million in 2015. Cyprus imported 64.5 million and exported 11.1 million worth goods to India. Both countries traded steel and iron with each other. Between April 2000 and September 2015, Cyprus invested a cumulative total of $8.328 billion making it the eighth largest FDI investor in India. Most of the investments are in the construction and real estate industries. The Double Taxation Avoidance Agreement between Cyprus and India was revised in 2016. Indians in Cyprus As of July 2015, around 2700 Indian citizens reside in Cyprus. More than of half of them are employed as cosmetics industry, while the other common professions are computer engineers, software programmers and the shipping industry. Approximately 900 Indian students were enrolled at private colleges in Cyprus in 2010–11, but this number reduced to less than 100 by 2015, as Indian students were unable to find part-time jobs owing to the financial crisis in Cyprus. Recent developments Prime Minister of India Narendra Modi met the President of Cyprus Nicos Anastasiades in New York. There India and Cyprus agreed to enhance the trade as well as people to people relations, for the benefit of the citizens of both the countries. India has reassured its support to Cyprus with respect to its territorial integrity. See also Foreign relations of Cyprus Foreign relations of India References External links High Commission of Cyprus in New Delhi High Commission of India in Nicosia Text of Cultural Co-operation Agreement India Bilateral relations of India
Kelly Kovski (born June 16, 1981) is an American professional racing driver and crew chief. He has competed in the ARCA Menards Series for nineteen years, primarily racing at the Illinois State Fairgrounds and DuQuoin State Fairgrounds. He has also competed in and won at various dirt track events alongside his starts in ARCA competition. Racing career Kovski would make his ARCA Re/Max Series debut in 2004 driving for Fast Track Racing at the DuQuoin State Fairgrounds Racetrack in the No. 10 Chevrolet, where he would finish 15th, a lap down behind race winner Frank Kimmel. From 2005 to 2011, Kovski would primarily run the dirt races with his own team in collaboration with Roulo Brothers Racing in the No. 39 Chevrolet. In 2005, he would finish in the top-15 in both dirt events, and in 2006, he would finish 11th at the Illinois State Fairgrounds Racetrack. In the following year, he would earn his first top-10 at Springfield, finishing in sixth place, and in the following year, he would finish in the top-10 in both events, finishing in ninth and seventh at Springfield and DuQuoin respectively. In 2009, would get a best finish of 12th at Springfield, before he would finish in the top-10 in both events again in the following year, running in the No. 17 that year. He would finish sixth at Springfield in 2011, and would go on to earn his first top-5 in ARCA competition, finishing fourth at DuQuoin. In 2012, Kovski switched to Allgaier Motorsports, a team that had won the series championship with Justin Allgaier in 2008. He would start off his tenure with the team by finishing fourth at Springfield in their first race together in the No. 99 Chevrolet. For 2013, he would make his first asphalt race at Toledo Speedway, where he would start 26th, and finish ninth. He would also finish tenth at Berlin Raceway before returning to the dirt events, where he would finish 13th at Springfield and eighth at DuQuoin. In 2014, he would delve into a career as a crew chief, working with Team BCR and No. 90 Ford for Grant Enfinger. He would also make starts at the dirt tracks, finishing sixth at Springfield, and finishing 26th due to an engine issue at DuQuoin. He would move with Enfinger to GMS Racing midway through 2014, and would move to the No. 23 Chevrolet in 2015, a year year Enfinger would win the championship. Kovski would finish third at Springfield. In 2016, he would earn his best finish of second place behind Tom Hessert III at DuQuoin. In 2017, Kovski would suffer an accident at a sprint car race at Volusia County Speedway, where he would be struck in the pits by a flipping sprint car. His injuries were significant enough that he would skip both the ARCA dirt races as a driver. He would serve as the crew chief for Enfinger in the No. 16 Chevrolet at Springfield, a race where Enfinger would win. Kovski would return to driving duties the following year in 2018, and would finish eighth and seventh at Springfield and DuQuoin respectively. In 2019, he would get his first top-5 since 2016, finishing fifth at DuQuoin, and in his only race of 2020, he would finish fifth at Springfield. In the following year at DuQuoin, Kovski would not start the race and would be classified in 16th position. In 2022, he would finish 15th at Springfield due to an engine failure, and tenth at DuQuoin due to suspension issues. In 2023, Kovski's results improved, finishing 4th at Springfield and 6th at DuQoin. Motorsports results ARCA Menards Series (key) (Bold – Pole position awarded by qualifying time. Italics – Pole position earned by points standings or practice time. * – Most laps led.) References External links 1981 births Living people NASCAR drivers ARCA Menards Series drivers Racing drivers from Illinois Sportspeople from Springfield, Illinois
Tet Htun Aung (, , born 16 June 1956) is a Burmese politician who currently serves as a Regional Hluttaw MP for Pauktaw Township No. 2 constituency and an Amyotha Hluttaw MP for Rakhine State No. 2 Constituency. He is a member of Rakhine National Party. Early life and education He was born on 16 June 1956 in Rakhine State, Burma (Myanmar). He had served as Secretary of Arakan National Party Pauktaw Township and as Central Executive Committee of Finance. Political career He is a member of the Rakhine National Party. In the 2015 Myanmar general election, he was elected as an Amyotha Hluttaw MP and elected representative from Rakhine State No. 2 parliamentary constituency. He also serves as the Regional Hluttaw MP for Pauktaw Township No. 2 constituency. References National League for Democracy politicians 1956 births Living people People from Rakhine State
Mario Alberto Hernández Lash (born January 24, 1979) is a retired Mexican football defender. Hernández debuted with Atlante F.C. on September 29, 2002, during a 2–0 loss to CF Monterrey. From there, he became a common fixture in the Potros starting line-up, often delighting fans with his top-notch defending. But after winning the Apertura 2007 title with Atlante, he fell out of the coach's plans. Most recently, he has been playing with Atlante's filial team, Potros Chetumal as their captain. Honors Club Atlante F.C. Apertura 2007 External links 1979 births Living people Footballers from Nuevo León Liga MX players Atlante F.C. footballers Men's association football defenders Footballers from Monterrey Mexican men's footballers
```c++ /* This file is part of Kismet Kismet is free software; you can redistribute it and/or modify (at your option) any later version. Kismet 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 Kismet; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "macaddr.h" std::ostream& operator<<(std::ostream& os, const mac_addr& m) { os << m.mac_to_string(); return os; } std::istream& operator>>(std::istream& is, mac_addr& m) { std::string sline; std::getline(is, sline); m.string2long(sline.c_str()); if (m.state.error) is.setstate(std::ios::failbit); return is; } ```
```php <?php declare(strict_types=1); /** */ namespace OCA\Talk\Model; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\MultipleObjectsReturnedException; use OCP\AppFramework\Db\QBMapper; use OCP\DB\Exception; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; /** * @template-extends QBMapper<Poll> */ class PollMapper extends QBMapper { /** * @param IDBConnection $db */ public function __construct(IDBConnection $db) { parent::__construct($db, 'talk_polls', Poll::class); } /** * @param int $pollId * @return Poll * @throws DoesNotExistException * @throws MultipleObjectsReturnedException * @throws Exception */ public function getByPollId(int $pollId): Poll { $query = $this->db->getQueryBuilder(); $query->select('*') ->from($this->getTableName()) ->where($query->expr()->eq('id', $query->createNamedParameter($pollId, IQueryBuilder::PARAM_INT))); return $this->findEntity($query); } public function deleteByRoomId(int $roomId): void { $query = $this->db->getQueryBuilder(); $query->delete($this->getTableName()) ->where($query->expr()->eq('room_id', $query->createNamedParameter($roomId, IQueryBuilder::PARAM_INT))); $query->executeStatement(); } public function deleteByPollId(int $pollId): void { $query = $this->db->getQueryBuilder(); $query->delete($this->getTableName()) ->where($query->expr()->eq('id', $query->createNamedParameter($pollId, IQueryBuilder::PARAM_INT))); $query->executeStatement(); } } ```
```objective-c /* This file is free software: you can redistribute it and/or modify (at your option) any later version. This file 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 the this software. If not, see <path_to_url */ #ifndef OGLRENDER_ES3_H #define OGLRENDER_ES3_H #include "OGLRender_3_2.h" // A port that wants to use the OpenGL ES renderer must assign the two following functions // to OGLLoadEntryPoints_ES_3_0_Func and OGLCreateRenderer_ES_3_0_Func, respectively. // // In addition, the port must add the following GPU3DInterface objects to core3DList: // - gpu3Dgl_ES_3_0: Selects the OpenGL ES 3.0 renderer, and returns an error if it is // not available on the host system. // // Finally, the port must call GPU->Set3DRendererByID() and pass in the index where // gpu3Dgl_ES_3_0 exists in core3DList so that the emulator can create the appropriate // OpenGLRenderer object. // // Example code: // OGLLoadEntryPoints_ES_3_0_Func = &OGLLoadEntryPoints_ES_3_0; // OGLCreateRenderer_ES_3_0_Func = &OGLCreateRenderer_ES_3_0; // GPU3DInterface *core3DList[] = { &gpu3DNull, &gpu3DRasterize, &gpu3Dgl_ES_3_0, NULL }; // GPU->Set3DRendererByID(2); void OGLLoadEntryPoints_ES_3_0(); void OGLCreateRenderer_ES_3_0(OpenGLRenderer **rendererPtr); class OpenGLESRenderer_3_0 : public OpenGLRenderer_3_2 { protected: virtual Render3DError CreateGeometryPrograms(); virtual Render3DError CreateClearImageProgram(const char *vsCString, const char *fsCString); virtual Render3DError CreateGeometryZeroDstAlphaProgram(const char *vtxShaderCString, const char *fragShaderCString); virtual Render3DError CreateEdgeMarkProgram(const bool isMultisample, const char *vtxShaderCString, const char *fragShaderCString); virtual Render3DError CreateFogProgram(const OGLFogProgramKey fogProgramKey, const bool isMultisample, const char *vtxShaderCString, const char *fragShaderCString); virtual Render3DError CreateFramebufferOutput6665Program(const char *vtxShaderCString, const char *fragShaderCString); public: OpenGLESRenderer_3_0(); virtual Render3DError InitExtensions(); }; #endif // OGLRENDER_ES3_H ```
Timothy or Tim Jones may refer to: Sports Tim Jones (American football) (born 1998), American football wide receiver Tim Jones (infielder) (born 1962), baseball infielder Tim Jones (pitcher) (born 1954), American baseball pitcher Tim Jones (sledge hockey) (born 1987), American sledge hockey player Tim Jones (swimmer) (born 1967), British swimmer Timothy Jones (cricketer) (born 1978), former English cricketer Timothy Jones (cyclist) (born 1975), Zimbabwe cyclist Timothy Booth Jones (born 1952), former English cricketer Politics Tim Jones (politician) (born 1971), Republican member of the Missouri House of Representatives Tim Jones (Canadian politician) Other Tim Jones (Search and Rescue) (1956–2014), Canadian media spokesperson for North Shore Rescue in Vancouver Tim Jones (writer) (born 1959), New Zealand poet and author Tim Jones (film composer) (born 1971), American composer and musician Timothy Jones Jr., (born 1981), murdered his five children in Lexington County, South Carolina See also Timothy Clement-Jones, Baron Clement-Jones (born 1949), Liberal Democrat peer and spokesman for Culture, Media and Sport
Precis tugela, the African leaf butterfly or eared commodore, is a butterfly of the family Nymphalidae. It is found in eastern and southern Africa, ranging from Ethiopia to South Africa. It is commonly included in the genus Precis instead of Junonia. The wingspan is 55–60 mm in males and 58–64 mm in females. The larvae feed on Plectranthus species and Englerastrum scandens. Subspecies Precis tugela tugela — eastern Zimbabwe, Eswatini, South Africa: Limpopo, Mpumalanga, KwaZulu-Natal Precis tugela aurorina (Butler, 1894) — southern Sudan, Ethiopia, Kenya, northern and eastern Tanzania, Malawi Precis tugela pyriformis (Butler, 1896) — western Uganda, Rwanda, Burundi, north-western Tanzania, northern Zambia, Democratic Republic of the Congo: Kivu, Shaba, Lomami, Lualaba References Butterflies described in 1879 Junoniini Butterflies of Africa Taxa named by Roland Trimen
```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 io.pravega.test.system.framework.metronome.model.v1; import io.pravega.test.system.framework.metronome.ModelUtils; import lombok.Getter; import lombok.Setter; import java.util.List; import java.util.Map; @Getter @Setter public class Job { private String id; private String description; private Map<String, String> labels; private Run run; private History history; private List<ActiveRun> activeRuns; @Override public String toString() { return ModelUtils.toString(this); } } ```
```yaml --- enhancements: - | When using a `secret_backend_command` STDERR is always logged with a debug log level. This eases troubleshooting a user's `secret_backend_command` in a containerized environment. - | `secret_backend_timeout` has been increased from 5s to 30s. This increases support for the slow to load Python script used for `secret_backend_command`. This was an issue when importing large libraries in a containerized environment. ```
Florida Man is an Internet meme first popularized in 2013, referring to an alleged prevalence of people performing irrational or maniacal actions in the U.S. state of Florida. Internet users typically submit links to news stories and articles about unusual or strange crimes and other events occurring in Florida, with stories' headlines often beginning with "Florida Man..." followed by the main event of the story. Because of the way news headlines are typically written, they can be creatively interpreted as implying that the subjects of the articles are all a single individual known as "Florida Man". There have been criticisms and concerns surrounding the "Florida Man" meme, with some suggesting that the trend perpetuates harmful stereotypes and may have racist undertones, especially when disproportionately highlighting stories involving people of color or those from marginalized communities. The Miami New Times claimed that freedom of information laws in Florida make it easier for journalists to obtain information about arrests from the police than in other states and that this is responsible for the large number of news articles. A CNN article on the meme also suggested that the breadth of reports of bizarre activities is due to a confluence of factors, including public records laws giving journalists fast and easy access to police reports, the relatively high population of the state, its highly variable weather, and gaps in mental health funding. Origin The meme originated in February 2013 with the now abandoned Twitter account @_FloridaMan, which quoted notably strange or bizarre news headlines containing the words "Florida man," such as "Florida man run over by van after dog pushes accelerator" or "Police arrest Florida man for drunken joy ride on motorized scooter at Walmart." The account referred to 'Florida Man' as the "World's Worst Superhero" jokingly implying the headlines are not a variety of people but a single prolific suspect. Spread Before the creation of the meme, the state of Florida had already garnered a colorful reputation on the Internet, with the social aggregation site Fark hosting a 'Florida' content tag in the years before the Twitter account @_FloridaMan appeared. After the creation of the account in January 2013, and its ensuing popularization on social media sites such as Reddit and Tumblr, initially through the subreddit 'r/FloridaMan' and the Tumblr blog 'StuckInABucket', the meme was featured in numerous news articles and stories throughout February 2013. 'Florida Man' was also referred to in the opening episode of Season 2 of the FX show Atlanta as a sinister entity, referred to by Darius as an "alt-right Johnny Appleseed" who commits a variety of strange crimes in Florida as part of a plot to keep black voters out, portrayed by Kevin Waterman. On November 1, 2018, Desi Lydic of The Daily Show filed a report comedically investigating the phenomenon of "Florida Man". In 2018, IO Interactive released the stealth action video game Hitman 2. In the game's second level, set in Miami, Florida, the players can disguise themselves as "Florida Man," an owner of a local food stand. The player can use this disguise to poison and eliminate their target. The character of Florida Man also makes an appearance in a level set in Berlin, Germany in Hitman 3, where the player can again take his disguise. A play titled "Florida Man" by Michael Presley Bobbitt premiered July 31, 2019, at New York's Theatre Row Studios. In 2019, a variation of the meme developed on social media, in which people were encouraged to look up "Florida Man" and the date of their birthday, typically finding a bizarre news report involving a 'Florida Man' on that date. The "Black Judas" who turns in the title characters for reward money in Queen & Slim (2019) and played by Bertrand E. Boyd II, is credited as "Florida Man". On October 31, 2019, Donald Trump, then president of the United States, was reported as changing his main residence from New York City to Palm Beach, Florida, the location of the Mar-a-Lago resort he owns and frequently visits. Sources joked about Trump becoming 'Florida Man', including The Daily Show, which released an extension for Google Chrome and Firefox that changed all instances of Trump's name to "Florida Man". On October 24, 2020, during his rally for presidential candidate Joe Biden in Florida, former President Barack Obama mocked Trump, saying, "'Florida Man' wouldn't even do this stuff", referring to Trump's handling of the COVID-19 pandemic and his handling of domestic and foreign affairs. American classic rock band Blue Öyster Cult referred to the phenomenon in the song "Florida Man" on their 2020 album The Symbol Remains. The maintainer of the Twitter account @_FloridaMan stated in 2019 that he had "retired" from creating tweets at that account. On November 16, 2022, the New York Post reported his 2024 presidential campaign announcement on the front page as "Florida Man Makes Announcement", proceeding to mock the former president on page 26 referring to Mar-a-Lago as containing his "classified-documents library". In March 2023 Netflix announced a streaming television limited series titled Florida Man from showrunner (and Florida native) Donald Todd, starring Edgar Ramírez as a disgraced ex-policeman who is forced to return to his native Florida in search of a mobster's missing girlfriend. Reception The meme has widely been seen as a confirmation of the association between the state of Florida and bizarre or humorous activity, and has been compared to the Darwin Awards. However, the meme has also faced isolated backlash from a single media source, with the Columbia Journalism Review calling it "one of journalism's darkest and most lucrative cottage industries," where "stories tend to stand as exemplars of the mythical hyper-weirdness of the Sunshine State, but more often simply document the travails of the drug-addicted, mentally ill, and homeless." See also List of Internet phenomena References External links Florida Man on Reddit 2010s in Florida Computer-related introductions in 2013 Crime in Florida Florida culture Internet memes Internet memes introduced in 2013 Men in Florida Socioeconomic stereotypes
```go package logger import ( "fmt" "os" "regexp" "strings" "time" ) // Info provides enough information for a logging driver to do its function. type Info struct { Config map[string]string ContainerID string ContainerName string ContainerEntrypoint string ContainerArgs []string ContainerImageID string ContainerImageName string ContainerCreated time.Time ContainerEnv []string ContainerLabels map[string]string LogPath string DaemonName string } // ExtraAttributes returns the user-defined extra attributes (labels, // environment variables) in key-value format. This can be used by log drivers // that support metadata to add more context to a log. func (info *Info) ExtraAttributes(keyMod func(string) string) (map[string]string, error) { extra := make(map[string]string) labels, ok := info.Config["labels"] if ok && len(labels) > 0 { for _, l := range strings.Split(labels, ",") { if v, ok := info.ContainerLabels[l]; ok { if keyMod != nil { l = keyMod(l) } extra[l] = v } } } envMapping := make(map[string]string) for _, e := range info.ContainerEnv { if kv := strings.SplitN(e, "=", 2); len(kv) == 2 { envMapping[kv[0]] = kv[1] } } env, ok := info.Config["env"] if ok && len(env) > 0 { for _, l := range strings.Split(env, ",") { if v, ok := envMapping[l]; ok { if keyMod != nil { l = keyMod(l) } extra[l] = v } } } envRegex, ok := info.Config["env-regex"] if ok && len(envRegex) > 0 { re, err := regexp.Compile(envRegex) if err != nil { return nil, err } for k, v := range envMapping { if re.MatchString(k) { if keyMod != nil { k = keyMod(k) } extra[k] = v } } } return extra, nil } // Hostname returns the hostname from the underlying OS. func (info *Info) Hostname() (string, error) { hostname, err := os.Hostname() if err != nil { return "", fmt.Errorf("logger: can not resolve hostname: %v", err) } return hostname, nil } // Command returns the command that the container being logged was // started with. The Entrypoint is prepended to the container // arguments. func (info *Info) Command() string { terms := []string{info.ContainerEntrypoint} terms = append(terms, info.ContainerArgs...) command := strings.Join(terms, " ") return command } // ID Returns the Container ID shortened to 12 characters. func (info *Info) ID() string { return info.ContainerID[:12] } // FullID is an alias of ContainerID. func (info *Info) FullID() string { return info.ContainerID } // Name returns the ContainerName without a preceding '/'. func (info *Info) Name() string { return strings.TrimPrefix(info.ContainerName, "/") } // ImageID returns the ContainerImageID shortened to 12 characters. func (info *Info) ImageID() string { return info.ContainerImageID[:12] } // ImageFullID is an alias of ContainerImageID. func (info *Info) ImageFullID() string { return info.ContainerImageID } // ImageName is an alias of ContainerImageName func (info *Info) ImageName() string { return info.ContainerImageName } ```
I Predict a Clone: A Steve Taylor Tribute is a various artists album released in 1994. The album is a tribute to the Christian music artist Steve Taylor. The music is in a variety of styles which generally reflect the artist which recorded the track. Taylor himself took no part in the production of the project, and opted to donate all proceeds to Jesus People USA. He also stated that he liked the new versions better than his own, and in later concerts he began emulating the reworked styles of some songs. Track listing References Steve Taylor tribute albums 1994 compilation albums Contemporary Christian music compilation albums
Canyon station could refer to: Canyon station (Via Rail) in Canyon, Kenora District, Ontario, Canada Canyon station (Algoma Central Railway) in Canyon, Algoma District, Ontario, Canada
The Temple of Augustus and Livia is a Roman peripteral sine postico hexastyle Corinthian temple built at the beginning of the 1st century, which was in the center of the ancient city of Vienne, also corresponding to the center of the modern city, in the French department of Isère and the region of Auvergne-Rhône-Alpes. Ancient history During its construction, the temple was dedicated to the imperial cult, to honor the Emperor Augustus and his wife Livia. It has two states of construction. Of the original building built in southern stone, only the rear part remains: large wall to the west, corner pilasters, returns with pilasters and columns. The first state is dated last quarter of the 1st century BC. AD, by comparison with the Maison Carrée in Nîmes, the Roman temple of Château-Bas in Vernègues, and other buildings in Narbonnaise. Most of the building is rebuilt in Seyssel stones and choin. According to specialists of ancient ornamentation, the more naturally treated capitals were carved around the middle of 1st century, which corresponds to the first uses of choin in the city. Partial reconstruction would therefore take place a few decades after construction. However, one cannot imagine that such a building intended to honor Augustus has remained unfinished for so long. The building must therefore have suffered a fire (traces of which can be seen on the rear part and on the podium), or a slight earthquake which caused the collapse of the eastern part of the building (this assertion is disputed by the scientific community ), the rear part having resisted better due to the presence of the cella and the west wall. This reconstruction undoubtedly took place before Livia was deified in 42 because the initial inscription was put back on the frieze of the new pediment and then that of Livia was added to the architrave. Modern history With the fall of the Western Roman Empire and the Christianization of Gaul, the temple became the parish church of Sainte-Marie-la-Vieille then Notre-Dame-de-la-Vie until the French Revolution. From 1792, the church became the temple of Reason, then the commercial court of Vienne, then the museum and the library of Vienne (until 1852), and finally, after 28 years of work, the building regained its original aspect of Roman temple. Today the temple is the subject of a classification under the historical monuments by the List of 1840. Notes References External links Ancient Roman temples
```html <html> <head> <body> Hello, {{.Name}} </body> </head> </html> ```
Al-Husayn ibn al-Qasim () was a senior official of the Abbasid Caliphate who served as vizier from September 931 until May 932. Life Hailing from the Banu Wahb, a family of Nestorian Christian origin that had served in the caliphal bureaucracy since late Umayyad times, al-Husayn was the son, grandson and great-grandson of viziers. The family however had lost power after the death of al-Husayn's father al-Qasim in 904. He was appointed to the vizierate and the title of Amid al-Dawla ("Mainstay/Pillar of the State") by Caliph al-Muqtadir () in September 931, with the support of the Banu'l-Furat faction against the rival faction around Ali ibn Isa al-Jarrah and the commander-in-chief Mu'nis al-Muzaffar. He quickly managed to win over Mu'nis' proteges, the chamberlain Muhammad ibn Ra'iq and his brother Ibrahim, and began plotting against Mu'nis. The latter tried to secure his dismissal from the caliph, and almost succeeded; it was only his demand that al-Husayn be exiled to Oman that made al-Muqtadir oppose it. At the same time, al-Husayn felt so threatened by the powerful general that he slept in a different house each night to prevent his arrest. According to the scholar C.E. Bosworth, al-Husayn was "perhaps the last vizier to attempt to retain for the vizierate a measure of its former independence". He tried to restore the state finances, but fell from power due to the incessant court rivalries in May 932. References Sources 9th-century births 10th-century deaths Viziers of the Abbasid Caliphate Banu Wahb 10th-century people from the Abbasid Caliphate 9th-century Arab people 10th-century Arab people
```javascript 'use strict'; function register(param, param$1) { } function register_exception(param, param$1) { } exports.register = register; exports.register_exception = register_exception; /* No side effect */ ```
```php <?php namespace Doctrine\DBAL\Platforms; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\ColumnDiff; use Doctrine\DBAL\Schema\ForeignKeyConstraint; use Doctrine\DBAL\Schema\Identifier; use Doctrine\DBAL\Schema\Index; use Doctrine\DBAL\Schema\PostgreSQLSchemaManager; use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Types\BinaryType; use Doctrine\DBAL\Types\BlobType; use Doctrine\DBAL\Types\Types; use Doctrine\Deprecations\Deprecation; use UnexpectedValueException; use function array_diff; use function array_merge; use function array_unique; use function array_values; use function count; use function explode; use function implode; use function in_array; use function is_array; use function is_bool; use function is_numeric; use function is_string; use function sprintf; use function strpos; use function strtolower; use function trim; /** * Provides the behavior, features and SQL dialect of the PostgreSQL database platform of the oldest supported version. */ class PostgreSQLPlatform extends AbstractPlatform { private bool $useBooleanTrueFalseStrings = true; /** @var string[][] PostgreSQL booleans literals */ private array $booleanLiterals = [ 'true' => [ 't', 'true', 'y', 'yes', 'on', '1', ], 'false' => [ 'f', 'false', 'n', 'no', 'off', '0', ], ]; /** * PostgreSQL has different behavior with some drivers * with regard to how booleans have to be handled. * * Enables use of 'true'/'false' or otherwise 1 and 0 instead. * * @param bool $flag * * @return void */ public function setUseBooleanTrueFalseStrings($flag) { $this->useBooleanTrueFalseStrings = (bool) $flag; } /** * {@inheritDoc} */ public function getSubstringExpression($string, $start, $length = null) { if ($length === null) { return 'SUBSTRING(' . $string . ' FROM ' . $start . ')'; } return 'SUBSTRING(' . $string . ' FROM ' . $start . ' FOR ' . $length . ')'; } /** * {@inheritDoc} * * @deprecated Generate dates within the application. */ public function getNowExpression() { Deprecation::trigger( 'doctrine/dbal', 'path_to_url 'PostgreSQLPlatform::getNowExpression() is deprecated. Generate dates within the application.', ); return 'LOCALTIMESTAMP(0)'; } /** * {@inheritDoc} */ public function getRegexpExpression() { return 'SIMILAR TO'; } /** * {@inheritDoc} */ public function getLocateExpression($str, $substr, $startPos = false) { if ($startPos !== false) { $str = $this->getSubstringExpression($str, $startPos); return 'CASE WHEN (POSITION(' . $substr . ' IN ' . $str . ') = 0) THEN 0' . ' ELSE (POSITION(' . $substr . ' IN ' . $str . ') + ' . $startPos . ' - 1) END'; } return 'POSITION(' . $substr . ' IN ' . $str . ')'; } /** * {@inheritDoc} */ protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) { if ($unit === DateIntervalUnit::QUARTER) { $interval *= 3; $unit = DateIntervalUnit::MONTH; } return '(' . $date . ' ' . $operator . ' (' . $interval . " || ' " . $unit . "')::interval)"; } /** * {@inheritDoc} */ public function getDateDiffExpression($date1, $date2) { return '(DATE(' . $date1 . ')-DATE(' . $date2 . '))'; } public function getCurrentDatabaseExpression(): string { return 'CURRENT_DATABASE()'; } /** * {@inheritDoc} */ public function supportsSequences() { return true; } /** * {@inheritDoc} */ public function supportsSchemas() { return true; } /** * {@inheritDoc} * * @deprecated */ public function getDefaultSchemaName() { Deprecation::trigger( 'doctrine/dbal', 'path_to_url '%s is deprecated.', __METHOD__, ); return 'public'; } /** * {@inheritDoc} */ public function supportsIdentityColumns() { return true; } /** * {@inheritDoc} * * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ public function supportsPartialIndexes() { return true; } /** * {@inheritDoc} * * @deprecated */ public function usesSequenceEmulatedIdentityColumns() { Deprecation::trigger( 'doctrine/dbal', 'path_to_url '%s is deprecated.', __METHOD__, ); return true; } /** * {@inheritDoc} * * @deprecated */ public function getIdentitySequenceName($tableName, $columnName) { Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'path_to_url '%s is deprecated.', __METHOD__, ); return $tableName . '_' . $columnName . '_seq'; } /** * {@inheritDoc} * * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ public function supportsCommentOnStatement() { return true; } /** * {@inheritDoc} * * @deprecated */ public function hasNativeGuidType() { Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'path_to_url '%s is deprecated.', __METHOD__, ); return true; } /** * {@inheritDoc} * * @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ public function getListDatabasesSQL() { return 'SELECT datname FROM pg_database'; } /** * {@inheritDoc} * * @deprecated Use {@see PostgreSQLSchemaManager::listSchemaNames()} instead. */ public function getListNamespacesSQL() { Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'path_to_url 'PostgreSQLPlatform::getListNamespacesSQL() is deprecated,' . ' use PostgreSQLSchemaManager::listSchemaNames() instead.', ); return "SELECT schema_name AS nspname FROM information_schema.schemata WHERE schema_name NOT LIKE 'pg\_%' AND schema_name != 'information_schema'"; } /** * {@inheritDoc} * * @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ public function getListSequencesSQL($database) { return 'SELECT sequence_name AS relname, sequence_schema AS schemaname, minimum_value AS min_value, increment AS increment_by FROM information_schema.sequences WHERE sequence_catalog = ' . $this->quoteStringLiteral($database) . " AND sequence_schema NOT LIKE 'pg\_%' AND sequence_schema != 'information_schema'"; } /** * @deprecated The SQL used for schema introspection is an implementation detail and should not be relied upon. * * {@inheritDoc} */ public function getListTablesSQL() { return "SELECT quote_ident(table_name) AS table_name, table_schema AS schema_name FROM information_schema.tables WHERE table_schema NOT LIKE 'pg\_%' AND table_schema != 'information_schema' AND table_name != 'geometry_columns' AND table_name != 'spatial_ref_sys' AND table_type != 'VIEW'"; } /** * {@inheritDoc} * * @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ public function getListViewsSQL($database) { return 'SELECT quote_ident(table_name) AS viewname, table_schema AS schemaname, view_definition AS definition FROM information_schema.views WHERE view_definition IS NOT NULL'; } /** * @deprecated The SQL used for schema introspection is an implementation detail and should not be relied upon. * * @param string $table * @param string|null $database * * @return string */ public function getListTableForeignKeysSQL($table, $database = null) { return 'SELECT quote_ident(r.conname) as conname, pg_catalog.pg_get_constraintdef(r.oid, true) as condef FROM pg_catalog.pg_constraint r WHERE r.conrelid = ( SELECT c.oid FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n WHERE ' . $this->getTableWhereClause($table) . " AND n.oid = c.relnamespace ) AND r.contype = 'f'"; } /** * @deprecated * * {@inheritDoc} */ public function getListTableConstraintsSQL($table) { $table = new Identifier($table); $table = $this->quoteStringLiteral($table->getName()); return sprintf( <<<'SQL' SELECT quote_ident(relname) as relname FROM pg_class WHERE oid IN ( SELECT indexrelid FROM pg_index, pg_class WHERE pg_class.relname = %s AND pg_class.oid = pg_index.indrelid AND (indisunique = 't' OR indisprimary = 't') ) SQL , $table, ); } /** * @deprecated The SQL used for schema introspection is an implementation detail and should not be relied upon. * * {@inheritDoc} * * @link path_to_url */ public function getListTableIndexesSQL($table, $database = null) { return 'SELECT quote_ident(relname) as relname, pg_index.indisunique, pg_index.indisprimary, pg_index.indkey, pg_index.indrelid, pg_get_expr(indpred, indrelid) AS where FROM pg_class, pg_index WHERE oid IN ( SELECT indexrelid FROM pg_index si, pg_class sc, pg_namespace sn WHERE ' . $this->getTableWhereClause($table, 'sc', 'sn') . ' AND sc.oid=si.indrelid AND sc.relnamespace = sn.oid ) AND pg_index.indexrelid = oid'; } /** * @param string $table * @param string $classAlias * @param string $namespaceAlias */ private function getTableWhereClause($table, $classAlias = 'c', $namespaceAlias = 'n'): string { $whereClause = $namespaceAlias . ".nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') AND "; if (strpos($table, '.') !== false) { [$schema, $table] = explode('.', $table); $schema = $this->quoteStringLiteral($schema); } else { $schema = 'ANY(current_schemas(false))'; } $table = new Identifier($table); $table = $this->quoteStringLiteral($table->getName()); return $whereClause . sprintf( '%s.relname = %s AND %s.nspname = %s', $classAlias, $table, $namespaceAlias, $schema, ); } /** * @deprecated The SQL used for schema introspection is an implementation detail and should not be relied upon. * * {@inheritDoc} */ public function getListTableColumnsSQL($table, $database = null) { return "SELECT a.attnum, quote_ident(a.attname) AS field, t.typname AS type, format_type(a.atttypid, a.atttypmod) AS complete_type, (SELECT tc.collcollate FROM pg_catalog.pg_collation tc WHERE tc.oid = a.attcollation) AS collation, (SELECT t1.typname FROM pg_catalog.pg_type t1 WHERE t1.oid = t.typbasetype) AS domain_type, (SELECT format_type(t2.typbasetype, t2.typtypmod) FROM pg_catalog.pg_type t2 WHERE t2.typtype = 'd' AND t2.oid = a.atttypid) AS domain_complete_type, a.attnotnull AS isnotnull, (SELECT 't' FROM pg_index WHERE c.oid = pg_index.indrelid AND pg_index.indkey[0] = a.attnum AND pg_index.indisprimary = 't' ) AS pri, (SELECT pg_get_expr(adbin, adrelid) FROM pg_attrdef WHERE c.oid = pg_attrdef.adrelid AND pg_attrdef.adnum=a.attnum ) AS default, (SELECT pg_description.description FROM pg_description WHERE pg_description.objoid = c.oid AND a.attnum = pg_description.objsubid ) AS comment FROM pg_attribute a, pg_class c, pg_type t, pg_namespace n WHERE " . $this->getTableWhereClause($table, 'c', 'n') . ' AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND n.oid = c.relnamespace ORDER BY a.attnum'; } /** * {@inheritDoc} * * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey) { $query = ''; if ($foreignKey->hasOption('match')) { $query .= ' MATCH ' . $foreignKey->getOption('match'); } $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey); if ($foreignKey->hasOption('deferrable') && $foreignKey->getOption('deferrable') !== false) { $query .= ' DEFERRABLE'; } else { $query .= ' NOT DEFERRABLE'; } if ( ($foreignKey->hasOption('feferred') && $foreignKey->getOption('feferred') !== false) || ($foreignKey->hasOption('deferred') && $foreignKey->getOption('deferred') !== false) ) { $query .= ' INITIALLY DEFERRED'; } else { $query .= ' INITIALLY IMMEDIATE'; } return $query; } /** * {@inheritDoc} */ public function getAlterTableSQL(TableDiff $diff) { $sql = []; $commentsSQL = []; $columnSql = []; $table = $diff->getOldTable() ?? $diff->getName($this); $tableNameSQL = $table->getQuotedName($this); foreach ($diff->getAddedColumns() as $addedColumn) { if ($this->onSchemaAlterTableAddColumn($addedColumn, $diff, $columnSql)) { continue; } $query = 'ADD ' . $this->getColumnDeclarationSQL( $addedColumn->getQuotedName($this), $addedColumn->toArray(), ); $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; $comment = $this->getColumnComment($addedColumn); if ($comment === null || $comment === '') { continue; } $commentsSQL[] = $this->getCommentOnColumnSQL( $tableNameSQL, $addedColumn->getQuotedName($this), $comment, ); } foreach ($diff->getDroppedColumns() as $droppedColumn) { if ($this->onSchemaAlterTableRemoveColumn($droppedColumn, $diff, $columnSql)) { continue; } $query = 'DROP ' . $droppedColumn->getQuotedName($this); $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; } foreach ($diff->getModifiedColumns() as $columnDiff) { if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { continue; } if ($this->isUnchangedBinaryColumn($columnDiff)) { continue; } $oldColumn = $columnDiff->getOldColumn() ?? $columnDiff->getOldColumnName(); $newColumn = $columnDiff->getNewColumn(); $oldColumnName = $oldColumn->getQuotedName($this); if ( $columnDiff->hasTypeChanged() || $columnDiff->hasPrecisionChanged() || $columnDiff->hasScaleChanged() || $columnDiff->hasFixedChanged() ) { $type = $newColumn->getType(); // SERIAL/BIGSERIAL are not "real" types and we can't alter a column to that type $columnDefinition = $newColumn->toArray(); $columnDefinition['autoincrement'] = false; // here was a server version check before, but DBAL API does not support this anymore. $query = 'ALTER ' . $oldColumnName . ' TYPE ' . $type->getSQLDeclaration($columnDefinition, $this); $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; } if ($columnDiff->hasDefaultChanged()) { $defaultClause = $newColumn->getDefault() === null ? ' DROP DEFAULT' : ' SET' . $this->getDefaultValueDeclarationSQL($newColumn->toArray()); $query = 'ALTER ' . $oldColumnName . $defaultClause; $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; } if ($columnDiff->hasNotNullChanged()) { $query = 'ALTER ' . $oldColumnName . ' ' . ($newColumn->getNotnull() ? 'SET' : 'DROP') . ' NOT NULL'; $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; } if ($columnDiff->hasAutoIncrementChanged()) { if ($newColumn->getAutoincrement()) { // add autoincrement $seqName = $this->getIdentitySequenceName( $table->getName(), $oldColumnName, ); $sql[] = 'CREATE SEQUENCE ' . $seqName; $sql[] = "SELECT setval('" . $seqName . "', (SELECT MAX(" . $oldColumnName . ') FROM ' . $tableNameSQL . '))'; $query = 'ALTER ' . $oldColumnName . " SET DEFAULT nextval('" . $seqName . "')"; } else { // Drop autoincrement, but do NOT drop the sequence. It might be re-used by other tables or have $query = 'ALTER ' . $oldColumnName . ' DROP DEFAULT'; } $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; } $oldComment = $this->getOldColumnComment($columnDiff); $newComment = $this->getColumnComment($newColumn); if ( $columnDiff->hasCommentChanged() || ($columnDiff->getOldColumn() !== null && $oldComment !== $newComment) ) { $commentsSQL[] = $this->getCommentOnColumnSQL( $tableNameSQL, $newColumn->getQuotedName($this), $newComment, ); } if (! $columnDiff->hasLengthChanged()) { continue; } $query = 'ALTER ' . $oldColumnName . ' TYPE ' . $newColumn->getType()->getSQLDeclaration($newColumn->toArray(), $this); $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; } foreach ($diff->getRenamedColumns() as $oldColumnName => $column) { if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { continue; } $oldColumnName = new Identifier($oldColumnName); $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' RENAME COLUMN ' . $oldColumnName->getQuotedName($this) . ' TO ' . $column->getQuotedName($this); } $tableSql = []; if (! $this->onSchemaAlterTable($diff, $tableSql)) { $sql = array_merge($sql, $commentsSQL); $newName = $diff->getNewName(); if ($newName !== false) { Deprecation::trigger( 'doctrine/dbal', 'path_to_url 'Generation of "rename table" SQL using %s is deprecated. Use getRenameTableSQL() instead.', __METHOD__, ); $sql[] = sprintf( 'ALTER TABLE %s RENAME TO %s', $tableNameSQL, $newName->getQuotedName($this), ); } $sql = array_merge( $this->getPreAlterTableIndexForeignKeySQL($diff), $sql, $this->getPostAlterTableIndexForeignKeySQL($diff), ); } return array_merge($sql, $tableSql, $columnSql); } /** * Checks whether a given column diff is a logically unchanged binary type column. * * Used to determine whether a column alteration for a binary type column can be skipped. * Doctrine's {@see BinaryType} and {@see BlobType} are mapped to the same database column type on this platform * as this platform does not have a native VARBINARY/BINARY column type. Therefore the comparator * might detect differences for binary type columns which do not have to be propagated * to database as there actually is no difference at database level. */ private function isUnchangedBinaryColumn(ColumnDiff $columnDiff): bool { $newColumnType = $columnDiff->getNewColumn()->getType(); if (! $newColumnType instanceof BinaryType && ! $newColumnType instanceof BlobType) { return false; } $oldColumn = $columnDiff->getOldColumn() instanceof Column ? $columnDiff->getOldColumn() : null; if ($oldColumn !== null) { $oldColumnType = $oldColumn->getType(); if (! $oldColumnType instanceof BinaryType && ! $oldColumnType instanceof BlobType) { return false; } return count(array_diff($columnDiff->changedProperties, ['type', 'length', 'fixed'])) === 0; } if ($columnDiff->hasTypeChanged()) { return false; } return count(array_diff($columnDiff->changedProperties, ['length', 'fixed'])) === 0; } /** * {@inheritDoc} */ protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName) { if (strpos($tableName, '.') !== false) { [$schema] = explode('.', $tableName); $oldIndexName = $schema . '.' . $oldIndexName; } return ['ALTER INDEX ' . $oldIndexName . ' RENAME TO ' . $index->getQuotedName($this)]; } /** * {@inheritDoc} * * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ public function getCommentOnColumnSQL($tableName, $columnName, $comment) { $tableName = new Identifier($tableName); $columnName = new Identifier($columnName); $comment = $comment === null ? 'NULL' : $this->quoteStringLiteral($comment); return sprintf( 'COMMENT ON COLUMN %s.%s IS %s', $tableName->getQuotedName($this), $columnName->getQuotedName($this), $comment, ); } /** * {@inheritDoc} */ public function getCreateSequenceSQL(Sequence $sequence) { return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) . ' INCREMENT BY ' . $sequence->getAllocationSize() . ' MINVALUE ' . $sequence->getInitialValue() . ' START ' . $sequence->getInitialValue() . $this->getSequenceCacheSQL($sequence); } /** * {@inheritDoc} */ public function getAlterSequenceSQL(Sequence $sequence) { return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . ' INCREMENT BY ' . $sequence->getAllocationSize() . $this->getSequenceCacheSQL($sequence); } /** * Cache definition for sequences */ private function getSequenceCacheSQL(Sequence $sequence): string { if ($sequence->getCache() > 1) { return ' CACHE ' . $sequence->getCache(); } return ''; } /** * {@inheritDoc} */ public function getDropSequenceSQL($sequence) { return parent::getDropSequenceSQL($sequence) . ' CASCADE'; } /** * {@inheritDoc} */ public function getDropForeignKeySQL($foreignKey, $table) { return $this->getDropConstraintSQL($foreignKey, $table); } /** * {@inheritDoc} */ public function getDropIndexSQL($index, $table = null) { if ($index instanceof Index && $index->isPrimary() && $table !== null) { $constraintName = $index->getName() === 'primary' ? $this->tableName($table) . '_pkey' : $index->getName(); return $this->getDropConstraintSQL($constraintName, $table); } if ($index === '"primary"' && $table !== null) { $constraintName = $this->tableName($table) . '_pkey'; return $this->getDropConstraintSQL($constraintName, $table); } return parent::getDropIndexSQL($index, $table); } /** * @param Table|string|null $table * * @return string */ private function tableName($table) { return $table instanceof Table ? $table->getName() : (string) $table; } /** * {@inheritDoc} */ protected function _getCreateTableSQL($name, array $columns, array $options = []) { $queryFields = $this->getColumnDeclarationListSQL($columns); if (isset($options['primary']) && ! empty($options['primary'])) { $keyColumns = array_unique(array_values($options['primary'])); $queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')'; } $unlogged = isset($options['unlogged']) && $options['unlogged'] === true ? ' UNLOGGED' : ''; $query = 'CREATE' . $unlogged . ' TABLE ' . $name . ' (' . $queryFields . ')'; $sql = [$query]; if (isset($options['indexes']) && ! empty($options['indexes'])) { foreach ($options['indexes'] as $index) { $sql[] = $this->getCreateIndexSQL($index, $name); } } if (isset($options['uniqueConstraints'])) { foreach ($options['uniqueConstraints'] as $uniqueConstraint) { $sql[] = $this->getCreateConstraintSQL($uniqueConstraint, $name); } } if (isset($options['foreignKeys'])) { foreach ($options['foreignKeys'] as $definition) { $sql[] = $this->getCreateForeignKeySQL($definition, $name); } } return $sql; } /** * Converts a single boolean value. * * First converts the value to its native PHP boolean type * and passes it to the given callback function to be reconverted * into any custom representation. * * @param mixed $value The value to convert. * @param callable $callback The callback function to use for converting the real boolean value. * * @return mixed * * @throws UnexpectedValueException */ private function convertSingleBooleanValue($value, $callback) { if ($value === null) { return $callback(null); } if (is_bool($value) || is_numeric($value)) { return $callback((bool) $value); } if (! is_string($value)) { return $callback(true); } /** * Better safe than sorry: path_to_url#106319 */ if (in_array(strtolower(trim($value)), $this->booleanLiterals['false'], true)) { return $callback(false); } if (in_array(strtolower(trim($value)), $this->booleanLiterals['true'], true)) { return $callback(true); } throw new UnexpectedValueException(sprintf("Unrecognized boolean literal '%s'", $value)); } /** * Converts one or multiple boolean values. * * First converts the value(s) to their native PHP boolean type * and passes them to the given callback function to be reconverted * into any custom representation. * * @param mixed $item The value(s) to convert. * @param callable $callback The callback function to use for converting the real boolean value(s). * * @return mixed */ private function doConvertBooleans($item, $callback) { if (is_array($item)) { foreach ($item as $key => $value) { $item[$key] = $this->convertSingleBooleanValue($value, $callback); } return $item; } return $this->convertSingleBooleanValue($item, $callback); } /** * {@inheritDoc} * * Postgres wants boolean values converted to the strings 'true'/'false'. */ public function convertBooleans($item) { if (! $this->useBooleanTrueFalseStrings) { return parent::convertBooleans($item); } return $this->doConvertBooleans( $item, /** @param mixed $value */ static function ($value) { if ($value === null) { return 'NULL'; } return $value === true ? 'true' : 'false'; }, ); } /** * {@inheritDoc} */ public function convertBooleansToDatabaseValue($item) { if (! $this->useBooleanTrueFalseStrings) { return parent::convertBooleansToDatabaseValue($item); } return $this->doConvertBooleans( $item, /** @param mixed $value */ static function ($value): ?int { return $value === null ? null : (int) $value; }, ); } /** * {@inheritDoc} * * @param T $item * * @return (T is null ? null : bool) * * @template T */ public function convertFromBoolean($item) { if ($item !== null && in_array(strtolower($item), $this->booleanLiterals['false'], true)) { return false; } return parent::convertFromBoolean($item); } /** * {@inheritDoc} */ public function getSequenceNextValSQL($sequence) { return "SELECT NEXTVAL('" . $sequence . "')"; } /** * {@inheritDoc} */ public function getSetTransactionIsolationSQL($level) { return 'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSQL($level); } /** * {@inheritDoc} */ public function getBooleanTypeDeclarationSQL(array $column) { return 'BOOLEAN'; } /** * {@inheritDoc} */ public function getIntegerTypeDeclarationSQL(array $column) { if (! empty($column['autoincrement'])) { return 'SERIAL'; } return 'INT'; } /** * {@inheritDoc} */ public function getBigIntTypeDeclarationSQL(array $column) { if (! empty($column['autoincrement'])) { return 'BIGSERIAL'; } return 'BIGINT'; } /** * {@inheritDoc} */ public function getSmallIntTypeDeclarationSQL(array $column) { if (! empty($column['autoincrement'])) { return 'SMALLSERIAL'; } return 'SMALLINT'; } /** * {@inheritDoc} */ public function getGuidTypeDeclarationSQL(array $column) { return 'UUID'; } /** * {@inheritDoc} */ public function getDateTimeTypeDeclarationSQL(array $column) { return 'TIMESTAMP(0) WITHOUT TIME ZONE'; } /** * {@inheritDoc} */ public function getDateTimeTzTypeDeclarationSQL(array $column) { return 'TIMESTAMP(0) WITH TIME ZONE'; } /** * {@inheritDoc} */ public function getDateTypeDeclarationSQL(array $column) { return 'DATE'; } /** * {@inheritDoc} */ public function getTimeTypeDeclarationSQL(array $column) { return 'TIME(0) WITHOUT TIME ZONE'; } /** * {@inheritDoc} */ protected function _getCommonIntegerTypeDeclarationSQL(array $column) { return ''; } /** * {@inheritDoc} */ protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) { return $fixed ? ($length > 0 ? 'CHAR(' . $length . ')' : 'CHAR(255)') : ($length > 0 ? 'VARCHAR(' . $length . ')' : 'VARCHAR(255)'); } /** * {@inheritDoc} */ protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) { return 'BYTEA'; } /** * {@inheritDoc} */ public function getClobTypeDeclarationSQL(array $column) { return 'TEXT'; } /** * {@inheritDoc} */ public function getName() { Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'path_to_url 'PostgreSQLPlatform::getName() is deprecated. Identify platforms by their class.', ); return 'postgresql'; } /** * {@inheritDoc} */ public function getDateTimeTzFormatString() { return 'Y-m-d H:i:sO'; } /** * {@inheritDoc} */ public function getEmptyIdentityInsertSQL($quotedTableName, $quotedIdentifierColumnName) { return 'INSERT INTO ' . $quotedTableName . ' (' . $quotedIdentifierColumnName . ') VALUES (DEFAULT)'; } /** * {@inheritDoc} */ public function getTruncateTableSQL($tableName, $cascade = false) { $tableIdentifier = new Identifier($tableName); $sql = 'TRUNCATE ' . $tableIdentifier->getQuotedName($this); if ($cascade) { $sql .= ' CASCADE'; } return $sql; } /** * {@inheritDoc} */ public function getReadLockSQL() { return 'FOR SHARE'; } /** * {@inheritDoc} */ protected function initializeDoctrineTypeMappings() { $this->doctrineTypeMapping = [ 'bigint' => Types::BIGINT, 'bigserial' => Types::BIGINT, 'bool' => Types::BOOLEAN, 'boolean' => Types::BOOLEAN, 'bpchar' => Types::STRING, 'bytea' => Types::BLOB, 'char' => Types::STRING, 'date' => Types::DATE_MUTABLE, 'datetime' => Types::DATETIME_MUTABLE, 'decimal' => Types::DECIMAL, 'double' => Types::FLOAT, 'double precision' => Types::FLOAT, 'float' => Types::FLOAT, 'float4' => Types::FLOAT, 'float8' => Types::FLOAT, 'inet' => Types::STRING, 'int' => Types::INTEGER, 'int2' => Types::SMALLINT, 'int4' => Types::INTEGER, 'int8' => Types::BIGINT, 'integer' => Types::INTEGER, 'interval' => Types::STRING, 'json' => Types::JSON, 'jsonb' => Types::JSON, 'money' => Types::DECIMAL, 'numeric' => Types::DECIMAL, 'serial' => Types::INTEGER, 'serial4' => Types::INTEGER, 'serial8' => Types::BIGINT, 'real' => Types::FLOAT, 'smallint' => Types::SMALLINT, 'text' => Types::TEXT, 'time' => Types::TIME_MUTABLE, 'timestamp' => Types::DATETIME_MUTABLE, 'timestamptz' => Types::DATETIMETZ_MUTABLE, 'timetz' => Types::TIME_MUTABLE, 'tsvector' => Types::TEXT, 'uuid' => Types::GUID, 'varchar' => Types::STRING, 'year' => Types::DATE_MUTABLE, '_varchar' => Types::STRING, ]; } /** * {@inheritDoc} * * @deprecated */ public function getVarcharMaxLength() { Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'path_to_url 'PostgreSQLPlatform::getVarcharMaxLength() is deprecated.', ); return 65535; } /** * {@inheritDoc} */ public function getBinaryMaxLength() { Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'path_to_url 'PostgreSQLPlatform::getBinaryMaxLength() is deprecated.', ); return 0; } /** * {@inheritDoc} * * @deprecated */ public function getBinaryDefaultLength() { Deprecation::trigger( 'doctrine/dbal', 'path_to_url 'Relying on the default binary column length is deprecated, specify the length explicitly.', ); return 0; } /** * {@inheritDoc} * * @deprecated */ public function hasNativeJsonType() { Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'path_to_url '%s is deprecated.', __METHOD__, ); return true; } /** * {@inheritDoc} * * @deprecated Implement {@see createReservedKeywordsList()} instead. */ protected function getReservedKeywordsClass() { Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'path_to_url 'PostgreSQLPlatform::getReservedKeywordsClass() is deprecated,' . ' use PostgreSQLPlatform::createReservedKeywordsList() instead.', ); return Keywords\PostgreSQL94Keywords::class; } /** * {@inheritDoc} */ public function getBlobTypeDeclarationSQL(array $column) { return 'BYTEA'; } /** * {@inheritDoc} * * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ public function getDefaultValueDeclarationSQL($column) { if (isset($column['autoincrement']) && $column['autoincrement'] === true) { return ''; } return parent::getDefaultValueDeclarationSQL($column); } /** * {@inheritDoc} * * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ public function supportsColumnCollation() { return true; } /** * {@inheritDoc} */ public function getJsonTypeDeclarationSQL(array $column) { if (! empty($column['jsonb'])) { return 'JSONB'; } return 'JSON'; } private function getOldColumnComment(ColumnDiff $columnDiff): ?string { $oldColumn = $columnDiff->getOldColumn(); if ($oldColumn !== null) { return $this->getColumnComment($oldColumn); } return null; } /** @deprecated The SQL used for schema introspection is an implementation detail and should not be relied upon. */ public function getListTableMetadataSQL(string $table, ?string $schema = null): string { if ($schema !== null) { $table = $schema . '.' . $table; } return sprintf( <<<'SQL' SELECT obj_description(%s::regclass) AS table_comment; SQL , $this->quoteStringLiteral($table), ); } public function createSchemaManager(Connection $connection): PostgreSQLSchemaManager { return new PostgreSQLSchemaManager($connection, $this); } } ```
Daniel Jędraszko (born April 6, 1976 in Szczecin) is a Polish sprint canoeist who has competed since the late 1990s. He has been world champion four times in the Canadian canoe C-2 event with partner Paweł Baraszkiewicz. They also won a C-2 500 m silver medal at the 2000 Summer Olympics in Sydney. The same year Jędraszko won his only European title to date (again in the C-2 500 m). However at the 2004 Athens games they underperformed and came away without a medal. Injuries prevented him from competing in 2005 but in 2006 he formed a new C-2 partnership with Roman Rynkiewicz. They finished fifth at the world championships in Szeged, Hungary. At the 2008 Summer Olympics in Beijing, they finished ninth in the C-2 500 m event. Jędraszko has a total of ten medals at the ICF Canoe Sprint World Championships. Jędraszko is a member of the Posnania Poznań club. He is 192 cm (6'4") tall and weighs 93 kg (205 lb). For hts sport achievements, he received: Golden Cross of Merit in 2000; Knight's Cross of the Order of Polonia Restituta (5th Class) in 2007. References 1976 births Canoeists at the 2000 Summer Olympics Canoeists at the 2004 Summer Olympics Canoeists at the 2008 Summer Olympics Living people Olympic canoeists for Poland Olympic silver medalists for Poland Sportspeople from Szczecin Polish male canoeists Olympic medalists in canoeing ICF Canoe Sprint World Championships medalists in Canadian Medalists at the 2000 Summer Olympics
Anime in hip hop is an amalgamation of anime and the hip hop music genre. Many rappers have been influenced by anime, such as lyrics and things. Hip hop has also influenced anime. Anime's influence on Hip Hop Rappers and artists such as RZA, Kanye West, Robb Bank$, and Frank Ocean have taken inspiration from anime when creating their music. From as early as 1990 and onwards, Akira was called one of the first influences to hip hop culture. A music video that features clips from Akira is the 1995 song titled "Scream" performed by Michael Jackson and Janet Jackson. Kanye West has also cited Akira as a major influence on his work, West paid homage to the film in the "Stronger" (2007) music video. Lupe Fiasco's album Tetsuo & Youth (2015) is named after Tetsuo Shima. The Dragon Ball franchise, particularly Dragon Ball Z, had an impact on hip hop culture from the 1990s onwards. It has been referenced in numerous hip hop songs by rappers and artists such as Chris Brown, Chance the Rapper, Big Sean, Lil Uzi Vert, The Weeknd, Childish Gambino, Thundercat, B.o.B, Soulja Boy, Drake, Frank Ocean, XXXTentacion, Juice Wrld, Trippie Redd, OhSo Kew and Sese. Mark Sammut of TheGamer notes that Gohan occasionally performs the dab move (as The Great Saiyaman), it's now known as being a hip-hop dance move in American popular culture. In mid-2015 Canadian rapper Sese released his mixtape The Frieza Saga, which was inspired by Dragon Ball Z. "One of my friends was talking about how epic the battles on Dragon Ball Z were and then we started talking about how crazy the parallels between hip-hop and the show are," Sese explains. American rapper Lil Uzi Vert owns several cars decorated with anime characters (also known as Itasha), including one with characters from K-On! and Sword Art Online. With his 2021 album Trip At Knight, Trippie Redd released the song Super Cell which incorporates multiple references to Dragon Ball in its lyrics. Another well known hip hop artist who has been influenced by anime is the rapper Megan Thee Stallion. She has anime all across her social media platforms. She has been seen doing cosplay, such as when she went to Japan’s Summer Sonic Festival where she wore Sailor Moon (1992-1997) inspired costume. Having anime inspired nails, which can be seen all over her instagram. Even referencing popular animes in her songs, such as in her song Girls in the Hood from July, 2020, she says “pussy like a wild fox, looking for a Sasuke,” which is a reference to the Naruto anime. During a shoot for Paper Magazine she dressed up as a character from the anime My Hero Academia (2016). During many of her interviews she mentions some type of anime reference and during an interview with Crunchyroll, she talks about how anime has been a part of her life since childhood. She also has her own merch line with Crunchyroll celebrating Naruto and the Hidden Leaf. Hip Hop's influence on anime Since the early 1960s, anime has become increasingly more profitable in Western countries. The growth of the Internet has provided Western audiences an easy way to access Japanese content. This has seemingly influenced many anime creators to incorporate more Western culture in their productions. The Western market has influenced the creation of many popular hip-hop inspired anime titles such as Afro Samurai, Samurai Champloo, Tokyo Tribes, PaRappa the Rapper, and Detroit Metal City. Afro Samurai, is an excellent example of hip hop influence on anime the accompanying musical stylings of RZA (of the Wu-Tang Clan), allow the viewer to dive deep into understanding the powerful concepts behind the anime such as the ideas of racial identity, liberation, and honor. Additionally, Samurai Champloo, is one of the most strongly influenced hip-hop anime's. The anime features the late Japanese hip hop producer Nujabes. From the creators of Cowboy Bebop, The anime uses hip hop and rap musical influences rather than the jazz influences of its prior counterpart to help convey its story and during many of the action and fighting scenes. Other anime that has been influenced by hip hop include Naruto (particularly the character Killer B), Megalo Box, Michiko & Hatchin, Tokyo Tribe 2 and Devilman Crybaby. The anime series Gurren Lagann also draws influence from hip hop, including "what might be the greatest hip-hop song in the genre" according to Michael Iacono of Comic Book Resources (CBR). The Boondocks is an anime-influenced animation that combines elements of both anime and hip hop. Furthermore, Gorillaz is an animated musical group influenced heavily by hip-hop, rap, funk, pop, and rhythm and blues. The group features different musical artists to help accompany the virtual band on their songs many being hip-hop and rap recording artists like De La Soul, featured on the group's Grammy Award-winning song, Feel Good Inc. The animated act helped shaped the hip-hop genre and infused animation with elements of music, art, storytelling, and cinematography. See also Anime-influenced animation Japanese hip hop Alternative Hip Hop References Anime Hip hop
```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.springframework.kafka.listener; import java.util.Collection; import org.apache.kafka.common.TopicPartition; /** * Objects that can publish consumer pause/resume events. * * @author Gary Russell * @since 2.8.10 * */ public interface ConsumerPauseResumeEventPublisher { /** * Publish a consumer paused event. * @param partitions the paused partitions. * @param reason the reason. */ void publishConsumerPausedEvent(Collection<TopicPartition> partitions, String reason); /** * Publish a consumer resumed event. * @param partitions the resumed partitions. */ void publishConsumerResumedEvent(Collection<TopicPartition> partitions); } ```
Muhammad Anis Qureshi is a Pakistani politician who was a Member of the Provincial Assembly of the Punjab, from May 2013 to May 2018. Early life and education Mr Muhammad Anis Qureshi son of Mr Muhammad Yasin was born on March 10, 1946, in Kasur. He has the degree of Master of Arts in English which he obtained from Government College, Lahore in 1967 and the degree of Master in Development Administration which he received in 1990 from University of Birmingham. He graduated in Law in 2005 from Bahauddin Zakariya University and has the degree of Bachelor of Laws. Career as a Civil Servant He joined Civil Service after qualifying the Punjab provincial competitive civil service examination and served as Deputy Commissioner and DCO Khusab district during 1992-93 and 2005 respectively; as Deputy Commissioner Narowal district during 1999-2001; as DCO, Mandi Bahauddin district during 2001-03; as DCO Muzaffargarh during 2004; as DCO (BPS20) Layyah during 2004-05; and retired in 2006 while serving as Member Board of Revenue Punjab. He was also sent for higher studies by Government of Punjab on British Council Scholarship in 1989 for one year. Foreign Visits He has visited UK, Canada, USA and Saudi Arabia in different capacities. Political career He was elected to the Provincial Assembly of the Punjab as a candidate of Pakistan Muslim League (Nawaz) from Constituency PP-176 (Kasur-II) in 2013 Pakistani general election. References Living people Punjab MPAs 2013–2018 1946 births Pakistan Muslim League (N) politicians People from Kasur District
Sairocarpus coulterianus (syn. Antirrhinum coulterianum) is a species of New World snapdragon known by the common name Coulter's snapdragon. Distribution It is native to southern California and Baja California, where it grows in desert shrublands and in the coastal hills and mountains, especially in areas that have recently burned. Description Sairocarpus coulterianus is an annual herb producing an erect stem which often clings to objects or other plants for support. It is mostly hairless, except for the inflorescence at the top, which can be quite woolly. Leaves are sparse and generally linear and there is often a basal rosette of leaves at the base of the stem. The top of the mostly naked stem is occupied by a raceme inflorescence of white snapdragon flowers, which are often tinted with lavender or pink, especially when newly opened. Each flower is about a centimeter wide. References External links Jepson Manual Treatment: Antirrhinum coulterianum USDA Plants Profile Antirrhinum coulterianum — U.C. Photo gallery Plantaginaceae Flora of California Flora of Baja California Flora of the California desert regions Natural history of the California chaparral and woodlands Natural history of the Mojave Desert Natural history of the Peninsular Ranges Natural history of the Transverse Ranges Flora without expected TNC conservation status
```objective-c #pragma once #include <vespa/searchlib/common/sortresults.h> #include <vespa/vespalib/util/dual_merge_director.h> namespace search { namespace engine { class SearchReply; } namespace grouping { class GroupingContext; class GroupingSession; } struct IDocumentMetaStore; class BitVector; } namespace proton::matching { class SessionManager; class PartialResult; class ResultProcessor { using GroupingContext = search::grouping::GroupingContext; using GroupingSession = search::grouping::GroupingSession; using IAttributeContext = search::attribute::IAttributeContext; using PartialResultUP = std::unique_ptr<PartialResult>; public: /** * Sorter selection and owner of additional data needed for * multi-level sorting. **/ struct Sort { using UP = std::unique_ptr<Sort>; FastS_IResultSorter *sorter; std::unique_ptr<search::common::ConverterFactory> _ucaFactory; FastS_SortSpec sortSpec; Sort(const Sort &) = delete; Sort & operator = (const Sort &) = delete; Sort(uint32_t partitionId, const vespalib::Doom & doom, IAttributeContext &ac, const std::string &ss); bool hasSortData() const noexcept { return (sorter == (const FastS_IResultSorter *) &sortSpec); } }; /** * Adapter to use grouping contexts as merging sources. **/ struct GroupingSource : vespalib::DualMergeDirector::Source { GroupingContext *ctx; explicit GroupingSource(GroupingContext *g) noexcept : ctx(g) {} void merge(Source &s) override; }; /** * Context per thread used for result processing. **/ struct Context { using GroupingContextUP = std::unique_ptr<GroupingContext>; const search::BitVector & _validLids; Sort::UP sort; PartialResultUP result; GroupingContextUP grouping; GroupingSource groupingSource; Context(const search::BitVector & validLids, Sort::UP s, PartialResultUP r, GroupingContextUP g); ~Context(); }; struct Result { using UP = std::unique_ptr<Result>; using SearchReply = search::engine::SearchReply; Result(std::unique_ptr<SearchReply> reply, size_t numFs4Hits); ~Result(); std::unique_ptr<SearchReply> _reply; size_t _numFs4Hits; }; private: IAttributeContext &_attrContext; const search::IDocumentMetaStore &_metaStore; SessionManager &_sessionMgr; GroupingContext &_groupingContext; std::unique_ptr<GroupingSession> _groupingSession; const std::string &_sortSpec; size_t _offset; size_t _hits; bool _wasMerged; public: ResultProcessor(IAttributeContext &attrContext, const search::IDocumentMetaStore & metaStore, SessionManager & sessionMgr, GroupingContext & groupingContext, const std::string & sessionId, const std::string & sortSpec, size_t offset, size_t hits); ~ResultProcessor(); void prepareThreadContextCreation(size_t num_threads); std::unique_ptr<Context> createThreadContext(const vespalib::Doom & hardDoom, size_t thread_id, uint32_t distributionKey); std::vector<std::pair<uint32_t,uint32_t>> extract_docid_ordering(const PartialResult &result) const; std::unique_ptr<Result> makeReply(PartialResultUP full_result); }; } ```
```makefile ################################################################################ # # xapp_xmh # ################################################################################ XAPP_XMH_VERSION = 1.0.4 XAPP_XMH_SOURCE = xmh-$(XAPP_XMH_VERSION).tar.xz XAPP_XMH_SITE = path_to_url XAPP_XMH_LICENSE = MIT XAPP_XMH_LICENSE_FILES = COPYING XAPP_XMH_DEPENDENCIES = xlib_libXaw xdata_xbitmaps $(eval $(autotools-package)) ```
Andrusova () is a village in Rozdilna Raion, Odesa Oblast, Ukraine. It belongs to Zatyshshia settlement hromada, one of the hromadas of Ukraine. Population is 68. Until 18 July 2020, Andrusova belonged to Zakharivka Raion. The raion was abolished in July 2020 as part of the administrative reform of Ukraine, which reduced the number of raions of Odesa Oblast to seven. The area of Zakharivka Raion was merged into Rozdilna Raion. References Villages in Rozdilna Raion Zatyshshia settlement hromada
```objective-c // // DatabaseSyncOperationalData.m // Strongbox // // Created by Strongbox on 08/08/2020. // #import "DatabaseSyncOperationalData.h" #import "ConcurrentMutableArray.h" @interface DatabaseSyncOperationalData () @property ConcurrentMutableArray<SyncDatabaseRequest*>* requestQueue; @end @implementation DatabaseSyncOperationalData - (instancetype)initWithDatabaseId:(NSString *)databaseUuid { self = [super init]; if (self) { self.requestQueue = ConcurrentMutableArray.mutableArray; const char* queuename = [databaseUuid cStringUsingEncoding:NSASCIIStringEncoding]; _dispatchSerialQueue = dispatch_queue_create(queuename ? queuename : "database-sync-queue", DISPATCH_QUEUE_SERIAL); _status = [[SyncStatus alloc] initWithDatabaseId:databaseUuid]; } return self; } - (void)enqueueSyncRequest:(SyncDatabaseRequest *)request { [self.requestQueue addObject:request]; } - (SyncDatabaseRequest*)dequeueSyncRequest { return [self.requestQueue dequeueHead]; } - (NSArray*)dequeueAllJoinRequests { return [self.requestQueue dequeueAllMatching:^BOOL(SyncDatabaseRequest * _Nonnull obj) { return obj.parameters.inProgressBehaviour == kInProgressBehaviourJoin; }]; } @end ```
The South East Atlantic Fisheries Organisation (SEAFO) is an organization that maintains controls over fishing and fishing related acts in the Southeastern Atlantic Ocean. Introduction Predating the Independence of Namibia in 1990, the International Commission for South East Atlantic Fisheries (ICSEAF) was responsible for the management of the fisheries in the region both in the exclusive economic zones of Angola, Namibia and South Africa and in the adjacent water of the high seas. ICSEAF Convention came into force in 1971, with the Secretariat located in Madrid, Spain and was established mainly in response to increased levels of exploitation of newly discovered rich fishing grounds off the Namibian coast by the fleet of Distant Water Fishing Nations (DWFNs). ICSEAF failed its mandate largely because Contracting Parties did not comply with the conservation and management measures they adopted and that the Commission lacked effective compliance and enforcement mechanisms. Fishing efforts increased rapidly during the 1960s and throughout the 1970s and 1980s on targeted species such as hake, horse mackerel and pilchards off Namibia and horse mackerels (Trachurus capensis and T. trecae) and sardinellas (Sardinella aurita and S. maderensis) in southern Angolan waters. For example, in 1965 about 193,000 tonnes of hake were caught mainly off Namibia and by 1972, a peak of 820,000 tonnes was recorded, followed by a declining trend to about 338,000 tonnes landed by 1988. At Independence in 1990, the new government of Namibia proclaimed through the Act of Parliament a EEZ and the jurisdiction over the fisheries within the zone. The organisation became inoperative following Namibia's refusal to join it. Meanwhile, the high seas fisheries of the southeast Atlantic were left without a managing body. With new mandate and direction, SEAFO replaced ICSEAF. SEAFO is an intergovernmental regional fisheries management organisation responsible for ensuring the long-term conservation and sustainable use of the fishery resources (excluding migratory fish stocks) in the high seas of southeast Atlantic Ocean, within the Convention Area. The SEAFO Convention Area is situated in the southeast Atlantic region, outside the exclusive economic zones of the coastal states of Angola, Namibia, South Africa and United Kingdom’s overseas territory of St. Helena and its dependencies Tristan da Cunha and Ascension Island. It covers an area of about 16 million square kilometres. The idea to establish SEAFO came from Namibia in 1995 because of the concern that certain commercially valuable straddling fish stocks required better protection to avoid compromising their potential in Namibian waters as a result of unsustainable fishing practices on the adjacent high seas. The idea was welcomed and greatly supported by the coastal neighbours of Angola, South Africa and United Kingdom (on behalf of St. Helena and its dependencies Tristan da Cunha and Ascension Islands) and by DWFN's of EU, Iceland, Japan, Norway, Poland, Republic of Korea, the Russian Federation, Ukraine and United States – all of which have history of fishing or demonstrated real interest in the fisheries in the area. Complex negotiations between the coastal States and the DWFN started in 1997 and were completed in 2000 with the adoption of SEAFO Convention. SEAFO Convention is largely based on 1982 United Nations Convention on the Law of the Sea (UNCLOS) and the 1995 United Nations Fish Stock Agreement (UNFSA) and is internationally hailed as the most contemporary, responsive instrument for conservation and sustainable utilisation of living marine resources in high seas. The Convention was signed on 20 April 2001 in Windhoek by Angola, the European Community, Iceland, Namibia, Norway, Republic of Korea, South Africa, United Kingdom (on behalf of St. Helena and its dependencies Tristan da Cunha and Ascension Islands) and the United States of America. It entered into force on 13 April 2003 after the deposit of instruments of ratification by Namibia and Norway and approval by the European Community. Angola deposited its instrument of ratification on 7 March 2006, making it a 4th Contracting Party of SEAFO. The role played by the developing coastal States in the drafting of SEAFO Convention was extensive. The Commission is the highest decision-making body of the Organisation and it meets annually to among others, formulate fisheries conservation and management measures, review compliance issues and adopt the budget. Decision on matters of substance, within SEAFO is taken by consensus among the Parties. There is also a provision for non acceptance of a decision by a Contracting Party. Budgetary contributions are made up of an equal basic fee and a fee determined from the total catch of species covered by the Convention. SEAFO allows States and regional economic integration organizations to become parties to the Convention and encourages cooperation with non-Parties. Compliance with monitoring, control and surveillance (MCS) is one of the criteria for consideration in determining the nature and extent of participatory rights in SEAFO fishing opportunities. SEAFO Convention foresees the creation of a robust system of observation, inspection, compliance and enforcement that includes control measures linked to flag State duties and port State duties as well as at-sea and in port inspection, boarding and inspection of vessels on a reciprocal basis, observer programs and procedures to follow up on infringements. For transparency and openness, SEAFO accords accessibility of observers to its meetings and to its documents. SEAFO Scientific Committee provides scientific advice to the Commission on the conservation and management issues such as the status of the resources and the harvesting levels. Subsidiary bodies may be established by the Commission, as needs arise, from time-to-time. The day-to-day work of the Organisation is coordinated, administered and overseen by the Secretariat, based in Swakopmund, Namibia. General Principles SEAFO Convention provides fundamental principles that govern conservation and management of living marine resources under SEAFO's jurisdiction. Fisheries management is based on the best available scientific evidence, and where scientific information is uncertain, unreliable or inadequate, the precautionary approach principle prevails, until such time when more information is known about the resources dynamics, ecosystem structures and functions. The general principles encompass the concept of ecosystem approach to fisheries management. In particular conservation and protection of species that belong to the same ecosystem as, or are associated with or dependent upon the harvested fishery resources (e.g., seabirds, cetaceans, seals and marine turtle)s are given emphasis. In addition the general principles call for the minimization of harmful impacts on all living marine resources and protection of marine environment and its biodiversity. Fish stocks covered Living marine resources covered by SEAFO including fish (such as orange roughy Hoplostethus atlanticus, alfonsino Beryx splendens, Patagonian toothfish Dissostichus eleginoides, hake Merluccius paradoxus, horse mackerel Trachurus capensis, chub mackerel Scomber japonicus, cardinalfishes Epigonus species, oreo dories and armourhead Pseudopentaceros species, some shark species and rays), molluscs (such as octopus and squid) and crustaceans (such as deep sea red crab Chaceon maritae). Some of the most notable commercially important species are orange roughy, alfonsino – harvested by bottom trawling, and deep sea red crab – capture by pots or traps and Patagonian toothfish caught by longlining. Highly migratory fish stocks such as tuna, swordfish, marlin and sharks in the region are covered by the International Commission for the Conservation of Atlantic Tunas (ICCAT). Most of SEAFO fish resources are found in deep waters (greater than 500 m depth) and tend to be slow grower, long-lived, late-matured and therefore could be vulnerable to over–exploitation. Their biological and ecological dynamics are not well known and there are no good historic time series. Conservation and management regime SEAFO has adopted innovative ways to manage deep sea fisheries, taking into account the EAF management, the precautionary approach principles as well as the reliance on the best scientific available evidence. Since 2005 and 2007, the following conservation and management measures were adopted: Limiting catches for deep sea red crab and Patagonian toothfish in South East Atlantic waters due to concerns on the sustainability of the current fisheries and of the potential negative impacts on the vulnerable marine habitats Reducing incidental mortality of seabirds, especially petrels and albatrosses, by fishing gear adjustments and other technical measures during fishing operations Prohibiting the “shark finning” practice whereby vessels cut the valuable shark fins off and retain them on board while discarding the carcass of the shark Reducing incidental mortality of sea turtles in fishing operations, notably by promptly releasing turtles entangled in fishing gear Implementing closed areas in numerous fragile marine ecosystems such as seamounts to ensure long-term conservation and protection in line with precautionary approach principles while more scientific information is becoming available. For monitoring, control and surveillance (MCS) of fishing activities, SEAFO has adopted comprehensive and stringent measures including the following: Mandatory on board the fishing vessel a scientific observers in order to collect the required catch and biological data on the stocks Mandatory automatic satellite vessel monitoring system (VMS) for all vessels fishing in the SEAFO area Port State inspection scheme based on standards set forth in the FAO Model Scheme Prohibiting fishing activities in vulnerable marine areas with prominent seamounts Banning of transshipments at sea in order to combat illegal, unregulated and unreported fisheries (IUU) Establishment of a Register of SEAFO-authorised fishing vessels Established a list of vessels presumed to have carried out IUU fishing activities including IUU vessels that are in the IUU lists of Northwest Atlantic Fisheries Organization (NAFO), North East Atlantic Fisheries Commission (NEAFC) and the Commission for the Conservation of Antarctic Marine Living Resources (CCAMLR). Cooperation with other organisations SEAFO recognizes the need to cooperate with coastal States and all other States and Organisations having a real interest in the fishery resources of the South East Atlantic Ocean. At regional level, SEAFO and Angola, Namibia, South Africa and UK’s overseas territories in the region are working closely to ensure compatibility of conservation and management measures adopted for straddling fish stocks on the high seas and in areas of national jurisdiction. SEAFO has strong link with the Benguela Current Large Marine Ecosystem Programme (BCLME) and the Benguela Current Commission (BCC) and shares information on the fisheries and the environment. At international level, SEAFO has working relationships with various regional fisheries management organisations, notably North East Atlantic Fisheries Commission (NEAFC), Commission for the Conservation of the Antarctic Marine Living Resources (CCAMLR), Northwest Atlantic Fisheries Commission (NAFO) and the International Commission for the Conservation of the Atlantic Tunas (ICCAT). Cooperation with these organisations is centred on the exchange of experiences on all matters of mutual interests, including on sharing of data on by-catch species and information on compliance matters such as on IUU fishing activities. SEAFO is working closely with the United Nations in particular with FAO and with the Division for Ocean Affairs and the Law of the Sea (DOALOS) aiming at strengthening high seas fisheries governance. Additional information can be obtained from the SEAFO Secretariat at info@seafo.org and from SEAFO website . References A. Jackson. The Convention on the Conservation and Management of Fishery Resources in the South East Atlantic Ocean 2001: An Intreoduction. International Journal of Marine and Coastal Law 17 (2002): 33-77. D.G.M. Miller and E.J. Molenaar. The SEAFC Convention: A Comparative Analysis in a Developing Coastal State Perspective. Eds. A. Chircop, S. Coffen-Smout and M. McConnel (New York: Transnational Publishers, 2006). Ocean Yearbook 20(2006): 305-375. H. Hamukuaya. SEAFO: A Modern Instrument to Address Typical Fisheries Management Issues. Eds.A. Chircop, S. Coffen-Smout and M. McConnel (New York: Transnational Publishers, 2007). Ocean Yearbook 21(2007): 203-236. External links Fisheries agencies Atlantic Ocean Intergovernmental organizations established by treaty Business organisations based in Namibia Organizations established in 2003
Haaren () is a town and former municipality in the southern Netherlands, in the province of North Brabant. The former municipality of Haaren ceased to exist on 1 January 2021. It was divided among four municipalities: Boxtel, Oisterwijk, Tilburg, and Vught. The former municipality of Haaren contained three other villages: Helvoirt, Esch, and Biezenmortel. An unusual thing about the municipality was that it belonged to two regions, Tilburg and 's-Hertogenbosch. The village belongs to the region of Tilburg. The eastern part of national park the Loonse en Drunense Duinen was part of the municipality. Haaren is known as 'The Garden of Brabant' because of the many plantations of trees, plants etc. Population centres Biezenmortel (1,498) added to Tilburg Esch (2,225) added to Boxtel Haaren (5,584) added to Oisterwijk Helvoirt (4,741) added to Vught (Population in 2003) Topography Dutch topographic map of the municipality of Haaren, June 2015 Gallery References External links Populated places in North Brabant Former municipalities of North Brabant Municipalities of the Netherlands disestablished in 2021 Oisterwijk
The siege of Caen took place in 1450 during the Hundred Years War when French forces laid siege to Caen in the English-controlled Duchy of Normandy following their decisive victory at the Battle of Formigny. After Formingy, the remnants of the English Army under Edmund Beaufort, 2nd Duke of Somerset withdrew to Caen, pursued by the much larger French army commanded by Arthur de Richemont. After three weeks of siege Somerset surrendered. English control of Normandy rapidly collapsed, ending with the loss of Cherbourg in August. References Bibliography Tony Jaques, Dictionary of Battles and Sieges: A-E. Greenwood Publishing Group, 2007. Sieges of the Hundred Years' War 1450 in England 1450s in France Caen Hundred Years' War, 1415–1453 Military history of Normandy Caen
is a Japanese actor who is represented by the talent agencies Shōnen Shachu and Ace Agent. Biography Taira went to Toho Koto Gakko in Nagoya, Aichi Prefecture, and was later a member of the Waseda University Theatre Research Society (also known as Gekken). He founded the troupe Shōnen Shachu with Nobuhiro Mori. He was also later affiliated with Ace Agent. Filmography TV series Films References External links Official profile at Shōnen Shachu Official profile at Ace Agent Japanese male actors 1975 births Living people Actors from Aichi Prefecture
```java package externalizable; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; public class BadExternalizableTest6 implements Externalizable { private String name; private int UID; @Override public void writeExternal(ObjectOutput out) throws IOException { } @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { Object initialized = null; if (initialized == null) { name = (String) in.readObject(); UID = in.readInt(); System.out.printf("name: %s, UID: %d, localVariable: %d%n", name, UID); initialized = new Object(); } else { throw new IllegalStateException(); } } } ```
Between Two Worlds () is a 1919 German silent drama film directed by Adolf Gärtner and starring Olga Engl, Bruno Kastner, and Lucie Mannheim. Plot summary Cast References Bibliography External links 1919 films Films of the Weimar Republic Films directed by Adolf Gärtner German silent feature films German black-and-white films 1919 drama films Silent German drama films 1910s German films 1910s German-language films
```smalltalk // // Unit tests for EKRecurrenceRule // // Authors: // Rolf Bjarne Kvinge <rolf@xamarin.com> // // #if !__TVOS__ using System; using EventKit; using Foundation; using ObjCRuntime; using NUnit.Framework; using Xamarin.Utils; namespace MonoTouchFixtures.EventKit { [TestFixture] [Preserve (AllMembers = true)] public class RecurrenceRuleTest { [SetUp] public void Setup () { TestRuntime.AssertSystemVersion (ApplePlatform.MacOSX, 10, 8, throwIfOtherPlatform: false); } [Test] public void DefaultProperties () { using (var rule = new EKRecurrenceRule ()) { Assert.AreEqual ("gregorian", rule.CalendarIdentifier, "CalendarIdentifier"); Assert.IsNull (rule.RecurrenceEnd, "RecurrenceEnd"); Assert.AreEqual (EKRecurrenceFrequency.Weekly, rule.Frequency, "Frequency"); Assert.AreEqual ((nint) 1, rule.Interval, "Interval"); #if NET Assert.AreEqual (EKWeekday.Monday, rule.FirstDayOfTheWeek, "FirstDayOfTheWeek"); #else Assert.AreEqual (EKDay.Monday, rule.FirstDayOfTheWeek, "FirstDayOfTheWeek"); #endif Assert.IsNull (rule.DaysOfTheWeek, "DaysOfTheWeek"); Assert.IsNull (rule.DaysOfTheMonth, "DaysOfTheMonth"); Assert.IsNull (rule.DaysOfTheYear, "DaysOfTheYear"); Assert.IsNull (rule.WeeksOfTheYear, "WeeksOfTheYear"); Assert.IsNull (rule.MonthsOfTheYear, "MonthsOfTheYear"); Assert.IsNull (rule.SetPositions, "SetPositions"); } } [Test] public void Constructors () { using (var rule = new EKRecurrenceRule (EKRecurrenceFrequency.Daily, 9, null)) { } using (var rule = new EKRecurrenceRule (EKRecurrenceFrequency.Yearly, 8, null, null, null, null, null, null, null)) { } } } } #endif // !__TVOS__ ```
```scss @import "icons"; ```
```smalltalk using Microsoft.Bot.Builder.FormFlow; using System; using System.Collections.Generic; using System.Text; #pragma warning disable 649 namespace Microsoft.Bot.Sample.PizzaBot { public enum SizeOptions { // 0 value in enums is reserved for unknown values. Either you can supply an explicit one or start enumeration at 1. Unknown, [Terms(new string[] { "med", "medium" })] Medium, Large, [Terms(new string[] { "family", "extra large" })] Family }; public enum PizzaOptions { Unknown, SignaturePizza, GourmetDelitePizza, StuffedPizza, [Terms(new string[] { "byo", "build your own" })] [Describe("Build your own")] BYOPizza }; public enum SignatureOptions { Hawaiian = 1, Pepperoni, MurphysCombo, ChickenGarlic, TheCowboy }; public enum GourmetDeliteOptions { SpicyFennelSausage = 1, AngusSteakAndRoastedGarlic, GourmetVegetarian, ChickenBaconArtichoke, HerbChickenMediterranean }; public enum StuffedOptions { ChickenBaconStuffed = 1, ChicagoStyleStuffed, FiveMeatStuffed }; // Fresh Pan is large pizza only public enum CrustOptions { Original = 1, Thin, Stuffed, FreshPan, GlutenFree }; public enum SauceOptions { [Terms(new string[] { "traditional", "tomatoe?" })] Traditional = 1, CreamyGarlic, OliveOil }; public enum ToppingOptions { Beef = 1, BlackOlives, CanadianBacon, CrispyBacon, Garlic, GreenPeppers, GrilledChicken, [Terms(new string[] { "herb & cheese", "herb and cheese", "herb and cheese blend", "herb" })] HerbAndCheeseBlend, ItalianSausage, ArtichokeHearts, MixedOnions, MozzarellaCheese, Mushroom, Onions, ParmesanCheese, Pepperoni, Pineapple, RomaTomatoes, Salami, Spinach, SunDriedTomatoes, Zucchini, ExtraCheese }; public enum CouponOptions { Large20Percent = 1, Pepperoni20Percent }; [Serializable] class BYOPizza { public CrustOptions Crust; public SauceOptions Sauce; public List<ToppingOptions> Toppings = new List<ToppingOptions>(); }; [Serializable] class PizzaOrder { public SizeOptions Size; [Prompt("What kind of pizza do you want? {||}")] [Template(TemplateUsage.NotUnderstood, "What does \"{0}\" mean???")] [Describe("Kind of pizza")] public PizzaOptions Kind; public SignatureOptions Signature; public GourmetDeliteOptions GourmetDelite; public StuffedOptions Stuffed; public BYOPizza BYO; public string Address; [Optional] public CouponOptions Coupon; public override string ToString() { var builder = new StringBuilder(); builder.AppendFormat("PizzaOrder({0}, ", Size); switch (Kind) { case PizzaOptions.BYOPizza: builder.AppendFormat("{0}, {1}, {2}, [", Kind, BYO.Crust, BYO.Sauce); foreach (var topping in BYO.Toppings) { builder.AppendFormat("{0} ", topping); } builder.AppendFormat("]"); break; case PizzaOptions.GourmetDelitePizza: builder.AppendFormat("{0}, {1}", Kind, GourmetDelite); break; case PizzaOptions.SignaturePizza: builder.AppendFormat("{0}, {1}", Kind, Signature); break; case PizzaOptions.StuffedPizza: builder.AppendFormat("{0}, {1}", Kind, Stuffed); break; } builder.AppendFormat(", {0}, {1})", Address, Coupon); return builder.ToString(); } }; } ```
```xml import gql from 'graphql-tag'; export const WPColumns = gql` fragment WPColumns on WpCoreColumnsBlock { __typename attributes { ... on WpCoreColumnsBlockAttributes { align verticalAlignment } } innerBlocks { ...WpColumnFields ...WpCoreImageBlockFragment ...WpCoreGalleryBlockFragment innerBlocks { __typename ...WpCoreImageBlockForGalleryFragment ...WpCoreGalleryBlockFragment saveContent dynamicContent isDynamic # ... on WpCoreGalleryBlock { __typename ...WpCoreGalleryBlockFragment innerBlocks { __typename ...WpCoreImageBlockForGalleryFragment } } ... on WpCoreColumnsBlock { innerBlocks { ...WpColumnFields innerBlocks { ...WpCoreImageBlockFragment ...WpCoreGalleryBlockFragment ... on WpCoreColumnsBlock { innerBlocks { ...WpColumnFields innerBlocks { ...WpCoreImageBlockForGalleryFragment ...WpCoreGalleryBlockFragment } } } } } } } } } `; export const wpColumnFields = gql` fragment WpColumnFields on WpCoreColumnBlock { __typename saveContent dynamicContent isDynamic attributes { __typename } } `; export const WpCoreImageBlockFragment = gql` fragment WpCoreImageBlockFragment on WpCoreImageBlock { __typename saveContent originalContent attributes { __typename ... on WpCoreImageBlockAttributes { id alt caption width title height linkTarget url imageFluid { childImageSharp { gatsbyImageData(quality: 100, layout: FULL_WIDTH) } } } } } `; export const WpCoreImageBlockForGalleryFragment = gql` fragment WpCoreImageBlockForGalleryFragment on WpCoreImageBlock { __typename saveContent attributes { __typename ... on WpCoreImageBlockAttributes { id alt caption width title height linkTarget url imageFluid { childImageSharp { full: gatsbyImageData(quality: 100, layout: FULL_WIDTH) thumbnail: gatsbyImageData(layout: CONSTRAINED) } } } } } `; export const WpCoreParagraphBlockFragment = gql` fragment WpCoreParagraphBlockFragment on WpCoreParagraphBlock { __typename saveContent isDynamic dynamicContent } `; export const WpCoreGalleryBlockFragment = gql` fragment WpCoreGalleryBlockFragment on WpCoreGalleryBlock { dynamicContent attributes { ... on WpCoreGalleryBlockAttributes { align anchor ids caption images { id url link alt caption } className } } } `; ```
```html <div> <div> <div class="col-xs-12"> <div class="panel panel-primary" style="margin-top: 15px;"> <table class="table table-bordered table-hover"> <thead> <tr> <th>(DC-Cluster-Shard-Peer)</th> <th>socket-stats</th> <th>tunnel-stats</th> </tr> </thead> <tbody> <tr ng-repeat="tunnel in tunnels"> <td><a ui-sref="cluster_dc_proxy_chains({clusterName: tunnel.clusterId, currentDcName: tunnel.backupDcId})">{{tunnel.backupDcId}}-{{tunnel.clusterId}}-{{tunnel.shardId}}-{{tunnel.peerDcId}}</a></td> <td> <span> <p align="center" style= "margin: 0cm 0cm 0pt; text-align: left">Frontend:</p> <p align="center" style= "margin: 0cm 0cm 0pt; text-align: left">{{prettyPrint(tunnel.socketStatsMetricOverview.frontend)}}</p> </span> <span> <p align="center" style= "margin: 0cm 0cm 0pt; text-align: left">Backend:</p> <p align="center" style= "margin: 0cm 0cm 0pt; text-align: left">{{prettyPrint(tunnel.socketStatsMetricOverview.backend)}}</p> </span> </td> <td> <span> <p align="center" style= "margin: 0cm 0cm 0pt; text-align: left">frontend: {{prettyJson(tunnel.tunnelStatsResult.frontend)}}</p> <p align="center" style= "margin: 0cm 0cm 0pt; text-align: left">backend: {{prettyJson(tunnel.tunnelStatsResult.backend)}}</p> <p align="center" style= "margin: 0cm 0cm 0pt; text-align: left">protocol receive: {{tunnel.tunnelStatsResult.protocolRecvTime | date:'yyyy-MM-dd HH:mm:ss:sss'}}</p> <p align="center" style= "margin: 0cm 0cm 0pt; text-align: left">protocol send: {{tunnel.tunnelStatsResult.protocolSndTime | date:'yyyy-MM-dd HH:mm:ss:sss'}}</p> </span> </td> </tr> </tbody> </table> </div> </div> </div> </div> ```
The theatre of Denmark continues to thrive thanks to the many theatres in Copenhagen and across the country which put on a wide variety of Danish and foreign performances. The flagship Royal Danish Theatre presents drama, opera, ballet and music. Since the 18th century, Danish playwrights have been successful in attracting wide public interest. History It was in the 18th century with the plays of Ludvig Holberg (1684–1754) that Danish theatre began to prosper. Holberg, sometimes known as the Danish Molière in view of his successful satirical comedies (1722), is considered to be the founder of the Danish theatre. Plays such as Jean de France and Jeppe of the Hill are still performed today. Adam Oehlenschläger (1779–1850) introduced romanticism to the Danish theatre. Especially successful was his Earl Hakon the Mighty, premiered in 1808. The Norwegian Henrik Ibsen (1828–1906) also travelled to Copenhagen where he produced plays such as A Doll's House (1879). It deals with the hypocrisy of the bourgeoisie and a woman’s struggle to emancipate herself. For Ibsen and his contemporaries, drama was not a question of entertainment but an exercise in critical commentary on the lifestyle of the times. During this period, the Royal Theatre dominated the scene, but around 1850 other, to some extent more popular, theatres were established, starting with the Casino (1848) where Hans Christian Andersen produced his Ole Lukøie (1850). The Casino became popular for satirical revues in the 1870s. In the 20th century, theatres were established in the large cities Århus, Odense and Aalborg as well as several in Copenhagen. Kjeld Abell (1901–1961), the first Danish modernist playwright, wrote the successful The Melody That Got Lost in 1935 with productions in both Copenhagen and London. Kaj Munk (1898–1944), a Lutheran pastor, brought religion into his plays. Ordet (The Word) is often said to have been his best work. Carl Erik Soya (1896–1983) is remembered especially for his anti-Nazi plays such as En Gæst (A Guest) a satire aimed against the German occupation of Denmark and in 1943, Min Farmors Hus (made into the 1984 film Grandmother's House). Leif Panduro (1923–1977) wrote a number of plays, some filmed or televised, criticising the middle class, the welfare state and the conflict between normal and abnormal, often questioning the views generally shared by the audience. His I Adams verden (1973) and Louises hus (1974) are among the best Scandinavian television dramas of the 1970s. In recent years, there has been something of a revival in Danish theatre. Many new playwrights and producers have appeared. These include: Astrid Saalbach (born 1955), winner of the Nordic Drama Award in 2004 for he play End of the World, whose drama Morning and Evening (1993) was also played at the Hampstead Theatre in London; Peter Asmussen (born 1957), who wrote the film script for Lars von Trier's Breaking the Waves as well as numerous radio and television plays and staged dramas. Danish musicals Encouraged by the success of the Danish version of Les Misérables, a number of Danish musicals have been written and performed in Copenhagen and elsewhere. Knud Christensen, commonly known as Sebastian, was particularly successful with Cyrano (1992), based on Rostand's play and Klokkeren fra Notre Dame (The Hunchback of Notre Dame) (2001). Bent Fabricius-Bjerre's musical Matador with lyrics by Clemens Telling based on an earlier, highly successful television series was premiered at the new Copenhagen Opera in June 2007 to full houses. See also Danish television drama Danish Culture Canon References Theatre in Denmark Culture of Denmark
"Girl Come Running" is a song recorded by The Four Seasons and released as a single in 1965. It was composed by group member Bob Gaudio and Bob Crewe. Considered a "minor hit" for the group in context of their string of records reaching the upper levels of the Billboard Hot 100 singles chart, "Girl Come Running" peaked at #30 in July 1965. Billboard described the single as "powerful production and vocal performance on a good Bob Crewe teen ballad with a driving dance beat in strong support." Cash Box described it as "one of the [Four Seasons'] most dynamic showings." References 1965 singles The Four Seasons (band) songs Songs written by Bob Gaudio Songs written by Bob Crewe Song recordings produced by Bob Crewe 1965 songs Philips Records singles
Grete Minde is an 1880 German novel by Theodor Fontane, based on the case of Margarete von Minden who in 1619 took revenge on corrupt officials in Tangermünde by setting fire to the town, in which she and her child also perished. Works based on the novel include: Grete Minde (film), 1977 German film Grete Minde (opera), German opera by Eugen Engel
Maria Kühn (born 14 February 1982) is a 1.0-point wheelchair basketball player who plays for SV Reha Augsburg in the German wheelchair basketball league. She has also played in the German national team, with which she won two European titles, was runner-up at 2010 World Championships, and won a gold medal at the 2012 Summer Paralympics in London. Having won the gold medal, President Joachim Gauck awarded the team the Silbernes Lorbeerblatt (Silver Laurel Leaf), Germany's highest sporting honour. Personal Kühn was born in Dresden, Germany on 14 February 1982. At the age of 20, after finishing high school, she took a holiday in the United States. While horseback riding in Monument Valley, she had a bad fall and became paralysed from the fifth thoracic vertebra down. She earned a degree in management student from the Baden-Württemberg Cooperative State University (DHBW). Since 2011, she has worked in Human Resources at the Gesellschaft für Technische Überwachung (GTÜ) (Society for Technical Supervision). Wheelchair basketball Kühn is a 1.0-point wheelchair basketball player. Before her accident, she was physically active with swimming, cycling and running. Afterwards, she took up wheelchair dancing as a form of exercise, but later switched to wheelchair basketball, although she had never been much interested in ball sports. She moved to Ludwigsburg to play for SV Reha Augsburg in the German national league in 2009, but switched to the Frankfurt for the 2011/12 season. Since 2009, her coach has been Brigit Meitner. Kühn joined the national team in 2009, while in Stuttgart, where she now lives. On 11 July 2009 during the International Paralympic Day celebration in Berlin, the team showed up at the Brandenburg Gate before 58,000 visitors, and Kühn gave President Horst Köhler a demonstration of the sport. The team won gold at the European Wheelchair Basketball Championship in Stoke Mandeville, England, in 2009, and silver at the Wheelchair Basketball World Championship in Birmingham, England the following year. In 2011, they again won the European Championship, which this time was held in Nazareth, Israel. In June 2012, Kühn was named as one of the team that competed at the 2012 Summer Paralympic Games in London. In the Gold Medal match, the team faced the Australia women's national wheelchair basketball team, a team that had defeated them 48–46 in Sydney just a few months before. They defeated the Australians 44–58 in front of a capacity crowd of over 12,000 at the North Greenwich Arena to win the gold medal, the first that Germany had won in women's wheelchair basketball at the Paralympic Games since Stoke Mandeville in 1984. They were awarded a Silbernes Lorbeerblatt (Silver Laurel Leaf), Germany's highest sporting honour, by President Joachim Gauck in November 2012, named Team of the Year for 2012. Achievements 2009: Gold at the European Championships (Stoke Mandeville, England) 2010: Silver at the Women's World Championships (Birmingham, England) 2011: Gold at the European Championships (Nazareth, Israel) 2012: Gold at the Paralympic Games (London, England) Awards 2012: Team of the Year 2012: Silver Laurel Leaf Notes External links 1982 births Living people German women's wheelchair basketball players Paralympic wheelchair basketball players for Germany Paralympic medalists in wheelchair basketball Paralympic gold medalists for Germany Wheelchair basketball players at the 2012 Summer Paralympics Medalists at the 2012 Summer Paralympics Recipients of the Silver Laurel Leaf Sportspeople from Dresden
The John Gillin Residence is a large single-story Usonian house, designed by Frank Lloyd Wright in 1950 and built in Dallas, Texas, in 1958. The Gillin House is Wright's only residential project in Dallas. Gillin, a successful oilman, geophysicist and electronics "gadgeteer", commissioned Wright to design a work of art that would also be suitable for living and entertaining. A self-made man, Wright respected him and allowed him to design many details including all door hardware, the stainless steel kitchenettes and even the diving board support. This sprawling Usonian is one of Wright's most extensive single-story residences. Three wings spin off a central hexagon much as might have happened had Wingspread been based on an equilateral parallelogram rather than a square. The home is organized around a massive angular fireplace. The acute angles of 60 and 120 degrees give intimacy to the rooms with ample light-filled space and volume that is unusual for a Frank Lloyd Wright designed home. The grand living room is under a hexagonal copper dome roof and ventilator specifically copied from the Arizona Biltmore Hotel's Aztec ballroom. The home was designed in response to the south central prairie's climate and its site of seven acres overlooking a creek. Long horizontal outer walls of understated native sandstone and horizontal bands of windows converge to create a dramatic entry. The Gillin House was featured as Bob Mapplethorpe's house in the 1996 Wes Anderson film, Bottle Rocket. See also List of Frank Lloyd Wright works References Storrer, William Allin. The Frank Lloyd Wright Companion. University Of Chicago Press, 2006, (S.338) External links Details of the house and interior from owner Gillin House on waymarking.com Frank Lloyd Wright - Preston Hollow Modern Home Big houses in Big D Photo of the Gillin House Photos on Arcaid Frank Lloyd Wright buildings Houses in Dallas Buildings and structures completed in 1958 1948 establishments in Texas
The 2023–24 season is SC Freiburg's 120th season in existence and eighth consecutive season in the Bundesliga. They are also competing in the DFB-Pokal and the UEFA Europa League. Players Out on loan Transfers In Out Pre-season and friendlies Competitions Overall record Bundesliga League table Results summary Results by round Matches The league fixtures were unveiled on 30 June 2023. DFB-Pokal UEFA Europa League Group stage The draw for the group stage was held on 1 September 2023. Statistics Appearances and goals |- ! colspan=14 style=background:#dcdcdc; text-align:center| Goalkeepers |- ! colspan=14 style=background:#dcdcdc; text-align:center| Defenders |- ! colspan=14 style=background:#dcdcdc; text-align:center| Midfielders |- ! colspan=14 style=background:#dcdcdc; text-align:center| Forwards |- ! colspan=14 style=background:#dcdcdc; text-align:center| Players transferred out during the season Goalscorers Last updated: 21 October 2023 References External links SC Freiburg seasons Freiburg Freiburg
```c /* * */ #include "sdkconfig.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_check.h" #include "driver/dedic_gpio.h" #include "driver/gpio.h" #include "soft_spi.h" #define ERR_CHECK_OR_GOTO(ret, label) do { if((ret) != ESP_OK ) goto label; } while (0) /* Forward declaration of static functions */ /** * @brief Send data on the emulated SPI MOSI while reading at the same time from MISO * Fast GPIOs are used for the emulation, 4 I/Os are required. * * @param tx Buffer containing the bytes to send. * @param rx Buffer to store the received bytes in. * @param size Size of both buffers. */ void IRAM_ATTR asm_emulate_spi_shift_byte(const uint8_t* tx, uint8_t* rx, uint32_t size, uint32_t clock_bit, uint32_t mosi_bit, uint32_t cs_bit, uint32_t miso_bit); /* Mutex required to enter critical sections */ static portMUX_TYPE g_lock = portMUX_INITIALIZER_UNLOCKED; const char* __attribute__((used)) SOFT_SPI_TAG = "soft_spi"; struct soft_spi_bus_impl_t { uint32_t clk_bit; uint32_t mosi_bit; uint32_t miso_bit; uint32_t cs_bit; dedic_gpio_bundle_handle_t out_bundle; dedic_gpio_bundle_handle_t in_bundle; }; esp_err_t soft_spi_new(soft_spi_config_t *config, soft_spi_bus_t *bus) { esp_err_t ret; struct soft_spi_bus_impl_t *bus_impl = NULL; /* Check the parameters */ ESP_GOTO_ON_FALSE(config != NULL && bus != NULL, ESP_ERR_INVALID_ARG, error, SOFT_SPI_TAG, "Parameters must not be NULL"); const int clk = config->clk_pin; const int mosi = config->mosi_pin; const int miso = config->miso_pin; const int cs = config->cs_pin; /** * Create a dedicated GPIO bundle configuration for the SPI output pins: Clock, MOSI, and CS, in this order. * The order will define the position of each I/O in the bundle, which is important when writing to it and * reading from it. */ int output_array[] = { clk, mosi, cs }; dedic_gpio_bundle_config_t output_config = { .gpio_array = output_array, .array_size = 3, .flags = { .out_en = 1 } }; /** * Same goes for the input pin: MISO. */ int input_array[] = { miso }; dedic_gpio_bundle_config_t input_config = { .gpio_array = input_array, .array_size = 1, .flags = { .in_en = 1 } }; /* Allocate the master bus structure now that we need it. */ bus_impl = malloc(sizeof(struct soft_spi_bus_impl_t)); ESP_GOTO_ON_FALSE(bus_impl != NULL, ESP_ERR_NO_MEM, error, SOFT_SPI_TAG, "No more memory available in the system"); /* Initialize the dedicated GPIO bundles with the configurations we made above. */ ret = dedic_gpio_new_bundle(&output_config, &bus_impl->out_bundle); ERR_CHECK_OR_GOTO(ret, error_output); ret = dedic_gpio_new_bundle(&input_config, &bus_impl->in_bundle); ERR_CHECK_OR_GOTO(ret, error_input); /** * Before executing the assembly routine, get the offset (bit) of each of the pins in the dedicated GPIO * registers. For example, if CLK pin's offset is 0, then bit 0 of the special register will be assigned * to it. */ ret = dedic_gpio_get_out_offset(bus_impl->out_bundle, &bus_impl->clk_bit); ERR_CHECK_OR_GOTO(ret, error_offset); ret = dedic_gpio_get_in_offset(bus_impl->in_bundle, &bus_impl->miso_bit); ERR_CHECK_OR_GOTO(ret, error_offset); /* MOSI and CS immediately follow the Clock in the special register. */ bus_impl->mosi_bit = bus_impl->clk_bit + 1; bus_impl->cs_bit = bus_impl->clk_bit + 2; /* Return the bus to the user */ *bus = bus_impl; return ret; error_offset: dedic_gpio_del_bundle(bus_impl->in_bundle); error_input: dedic_gpio_del_bundle(bus_impl->out_bundle); error_output: if (bus_impl != NULL) { free(bus_impl); } error: return ret; } esp_err_t soft_spi_del(soft_spi_bus_t bus) { esp_err_t ret; ESP_GOTO_ON_FALSE(bus != NULL, ESP_ERR_INVALID_ARG, error, SOFT_SPI_TAG, "Bus must not be NULL"); dedic_gpio_del_bundle(bus->out_bundle); dedic_gpio_del_bundle(bus->in_bundle); free(bus); error: return ret; } esp_err_t soft_spi_transfer(soft_spi_bus_t bus, const uint8_t* write_buffer, uint8_t* read_buffer, size_t buf_size) { esp_err_t ret = ESP_OK; ESP_GOTO_ON_FALSE(bus != NULL, ESP_ERR_INVALID_ARG, error, SOFT_SPI_TAG, "Bus must not be NULL"); ESP_GOTO_ON_FALSE(write_buffer != NULL, ESP_ERR_INVALID_ARG, error, SOFT_SPI_TAG, "Write buffer must not be NULL"); ESP_GOTO_ON_FALSE(buf_size != 0, ESP_ERR_INVALID_ARG, error, SOFT_SPI_TAG, "Buffer size must not be 0"); portENTER_CRITICAL(&g_lock); asm_emulate_spi_shift_byte(write_buffer, read_buffer, buf_size, /* Provide the offset in special dedicated GPIO register for Clock, MOSI and Clock * respectively */ bus->clk_bit, bus->mosi_bit, bus->cs_bit, bus->miso_bit); portEXIT_CRITICAL(&g_lock); error: return ret; } ```
Gayanjeh (, also Romanized as Gāyanjeh) is a village in Behi Dehbokri Rural District, Simmineh District, Bukan County, West Azerbaijan Province, Iran. At the 2006 census, its population was 97, in 21 families. References Populated places in Bukan County
```python """ Given a list of tasks, each with a deadline and reward, calculate which tasks can be completed to yield the maximum reward. Each task takes one unit of time to complete, and we can only work on one task at a time. Once a task has passed its deadline, it can no longer be scheduled. Example : tasks_info = [(4, 20), (1, 10), (1, 40), (1, 30)] max_tasks will return (2, [2, 0]) - Scheduling these tasks would result in a reward of 40 + 20 This problem can be solved using the concept of "GREEDY ALGORITHM". Time Complexity - O(n log n) path_to_url """ from dataclasses import dataclass from operator import attrgetter @dataclass class Task: task_id: int deadline: int reward: int def max_tasks(tasks_info: list[tuple[int, int]]) -> list[int]: """ Create a list of Task objects that are sorted so the highest rewards come first. Return a list of those task ids that can be completed before i becomes too high. >>> max_tasks([(4, 20), (1, 10), (1, 40), (1, 30)]) [2, 0] >>> max_tasks([(1, 10), (2, 20), (3, 30), (2, 40)]) [3, 2] >>> max_tasks([(9, 10)]) [0] >>> max_tasks([(-9, 10)]) [] >>> max_tasks([]) [] >>> max_tasks([(0, 10), (0, 20), (0, 30), (0, 40)]) [] >>> max_tasks([(-1, 10), (-2, 20), (-3, 30), (-4, 40)]) [] """ tasks = sorted( ( Task(task_id, deadline, reward) for task_id, (deadline, reward) in enumerate(tasks_info) ), key=attrgetter("reward"), reverse=True, ) return [task.task_id for i, task in enumerate(tasks, start=1) if task.deadline >= i] if __name__ == "__main__": import doctest doctest.testmod() print(f"{max_tasks([(4, 20), (1, 10), (1, 40), (1, 30)]) = }") print(f"{max_tasks([(1, 10), (2, 20), (3, 30), (2, 40)]) = }") ```
```xml // Libraries import React, {PureComponent} from 'react' import _ from 'lodash' import uuid from 'uuid' // Components import FancyScrollbar from 'src/shared/components/FancyScrollbar' import Threshold from 'src/dashboards/components/Threshold' import GraphOptionsDecimalPlaces from 'src/dashboards/components/GraphOptionsDecimalPlaces' // Constants import { COLOR_TYPE_THRESHOLD, THRESHOLD_COLORS, MAX_THRESHOLDS, MIN_THRESHOLDS, } from 'src/shared/constants/thresholds' // Types import {ErrorHandling} from 'src/shared/decorators/errors' import {Axes} from 'src/types' import {DecimalPlaces} from 'src/types/dashboards' import {ColorNumber} from 'src/types/colors' interface Props { axes: Axes gaugeColors: ColorNumber[] decimalPlaces: DecimalPlaces onResetFocus: () => void onUpdateAxes: (a: Axes) => void onUpdateDecimalPlaces: (d: DecimalPlaces) => void onUpdateGaugeColors: (g: ColorNumber[]) => void } class GaugeOptions extends PureComponent<Props> { public render() { const {gaugeColors, axes, decimalPlaces} = this.props const {y} = axes return ( <FancyScrollbar className="display-options" autoHide={false}> <div className="display-options--wrapper"> <h5 className="display-options--header">Gauge Controls</h5> <div className="thresholds-list"> <button className="btn btn-sm btn-primary" onClick={this.handleAddThreshold} disabled={this.disableAddThreshold} > <span className="icon plus" /> Add Threshold </button> {this.sortedGaugeColors.map((color, index) => ( <Threshold isMin={index === 0} isMax={index === gaugeColors.length - 1} visualizationType="gauge" threshold={color} key={index} disableMaxColor={this.disableMaxColor} onChooseColor={this.handleChooseColor} onValidateColorValue={this.handleValidateColorValue} onUpdateColorValue={this.handleUpdateColorValue} onDeleteThreshold={this.handleDeleteThreshold} /> ))} </div> <div className="graph-options-group form-group-wrapper"> <div className="form-group col-xs-6"> <label>Prefix</label> <input className="form-control input-sm" placeholder="%, MPH, etc." defaultValue={y.prefix} onChange={this.handleUpdatePrefix} /> </div> <div className="form-group col-xs-6"> <label>Suffix</label> <input className="form-control input-sm" placeholder="%, MPH, etc." defaultValue={y.suffix} onChange={this.handleUpdateSuffix} /> </div> <GraphOptionsDecimalPlaces digits={decimalPlaces.digits} isEnforced={decimalPlaces.isEnforced} onDecimalPlacesChange={this.handleDecimalPlacesChange} /> </div> </div> </FancyScrollbar> ) } private get disableMaxColor(): boolean { const {gaugeColors} = this.props return gaugeColors.length > MIN_THRESHOLDS } private get disableAddThreshold(): boolean { const {gaugeColors} = this.props return gaugeColors.length > MAX_THRESHOLDS } private handleDecimalPlacesChange = (decimalPlaces: DecimalPlaces) => { const {onUpdateDecimalPlaces} = this.props onUpdateDecimalPlaces(decimalPlaces) } private handleAddThreshold = () => { const {gaugeColors, onUpdateGaugeColors, onResetFocus} = this.props const sortedColors = _.sortBy(gaugeColors, color => color.value) if (sortedColors.length <= MAX_THRESHOLDS) { const randomColor = _.random(0, THRESHOLD_COLORS.length - 1) const maxValue = sortedColors[sortedColors.length - 1].value const minValue = sortedColors[0].value const colorsValues = _.mapValues(gaugeColors, 'value') let randomValue do { randomValue = _.round(_.random(minValue, maxValue, true), 2) } while (_.includes(colorsValues, randomValue)) const newThreshold = { type: COLOR_TYPE_THRESHOLD, id: uuid.v4(), value: randomValue, hex: THRESHOLD_COLORS[randomColor].hex, name: THRESHOLD_COLORS[randomColor].name, } const updatedColors: ColorNumber[] = _.sortBy<ColorNumber>( [...gaugeColors, newThreshold], color => color.value ) onUpdateGaugeColors(updatedColors) } else { onResetFocus() } } private handleDeleteThreshold = threshold => { const {onUpdateGaugeColors, onResetFocus} = this.props const gaugeColors = this.props.gaugeColors.filter( color => color.id !== threshold.id ) const sortedColors = _.sortBy(gaugeColors, color => color.value) onUpdateGaugeColors(sortedColors) onResetFocus() } private handleChooseColor = threshold => { const {onUpdateGaugeColors} = this.props const gaugeColors = this.props.gaugeColors.map(color => color.id === threshold.id ? {...color, hex: threshold.hex, name: threshold.name} : color ) onUpdateGaugeColors(gaugeColors) } private handleUpdateColorValue = (threshold, value) => { const {onUpdateGaugeColors} = this.props const gaugeColors = this.props.gaugeColors.map(color => color.id === threshold.id ? {...color, value} : color ) onUpdateGaugeColors(gaugeColors) } private handleValidateColorValue = (threshold, targetValue) => { const {gaugeColors} = this.props const thresholdValue = threshold.value let allowedToUpdate = false const sortedColors = _.sortBy(gaugeColors, color => color.value) const minValue = sortedColors[0].value const maxValue = sortedColors[sortedColors.length - 1].value // If lowest value, make sure it is less than the next threshold if (thresholdValue === minValue) { const nextValue = sortedColors[1].value allowedToUpdate = targetValue < nextValue } // If highest value, make sure it is greater than the previous threshold if (thresholdValue === maxValue) { const previousValue = sortedColors[sortedColors.length - 2].value allowedToUpdate = previousValue < targetValue } // If not min or max, make sure new value is greater than min, less than max, and unique if (thresholdValue !== minValue && thresholdValue !== maxValue) { const greaterThanMin = targetValue > minValue const lessThanMax = targetValue < maxValue const colorsWithoutMinOrMax = sortedColors.slice( 1, sortedColors.length - 1 ) const isUnique = !colorsWithoutMinOrMax.some( color => color.value === targetValue && color.id !== threshold.id ) allowedToUpdate = greaterThanMin && lessThanMax && isUnique } return allowedToUpdate } private handleUpdatePrefix = e => { const {onUpdateAxes, axes} = this.props const newAxes = {...axes, y: {...axes.y, prefix: e.target.value}} onUpdateAxes(newAxes) } private handleUpdateSuffix = e => { const {onUpdateAxes, axes} = this.props const newAxes = {...axes, y: {...axes.y, suffix: e.target.value}} onUpdateAxes(newAxes) } get sortedGaugeColors() { const {gaugeColors} = this.props const sortedColors = _.sortBy(gaugeColors, 'value') return sortedColors } } export default ErrorHandling(GaugeOptions) ```
```makefile ################################################################################ # # termcolor # ################################################################################ TERMCOLOR_VERSION = 2.1.0 TERMCOLOR_SITE = $(call github,ikalnytskyi,termcolor,v$(TERMCOLOR_VERSION)) TERMCOLOR_LICENSE = BSD-3-Clause TERMCOLOR_LICENSE_FILES = LICENSE TERMCOLOR_INSTALL_STAGING = YES TERMCOLOR_INSTALL_TARGET = NO $(eval $(cmake-package)) ```
James Dun (born 7 July 1999) is an English rugby union player who plays for Bristol Bears in the Premiership Rugby. References External links Bristol Bears Profile ESPN Profile Ultimate Rugby Profile 1999 births Living people Bristol Bears players English rugby union players Rugby union players from Bath, Somerset Rugby union flankers
```python Following PEP 8 styling guideline. `Module`s everywhere! Special attributes of objects and classes Prioritize your `queue` `weakref` proxies ```
```dart // MIT-style license that can be found in the LICENSE file or at // path_to_url import 'package:meta/meta.dart'; import 'ast/selector.dart'; import 'deprecation.dart'; import 'evaluation_context.dart'; import 'exception.dart'; import 'utils.dart'; import 'value/boolean.dart'; import 'value/calculation.dart'; import 'value/color.dart'; import 'value/function.dart'; import 'value/list.dart'; import 'value/map.dart'; import 'value/mixin.dart'; import 'value/number.dart'; import 'value/string.dart'; import 'visitor/interface/value.dart'; import 'visitor/serialize.dart'; export 'value/argument_list.dart'; export 'value/boolean.dart'; export 'value/calculation.dart'; export 'value/color.dart'; export 'value/function.dart'; export 'value/list.dart'; export 'value/map.dart'; export 'value/mixin.dart'; export 'value/null.dart'; export 'value/number.dart' hide conversionFactor; export 'value/string.dart'; /// A SassScript value. /// /// All SassScript values are unmodifiable. New values can be constructed using /// subclass constructors like [SassString.new]. Untyped values can be cast to /// particular types using `assert*()` functions like [assertString], which /// throw user-friendly error messages if they fail. /// /// {@category Value} @sealed abstract class Value { /// Whether the value counts as `true` in an `@if` statement and other /// contexts. bool get isTruthy => true; /// The separator for this value as a list. /// /// All SassScript values can be used as lists. Maps count as lists of pairs, /// and all other values count as single-value lists. ListSeparator get separator => ListSeparator.undecided; /// Whether this value as a list has brackets. /// /// All SassScript values can be used as lists. Maps count as lists of pairs, /// and all other values count as single-value lists. bool get hasBrackets => false; /// This value as a list. /// /// All SassScript values can be used as lists. Maps count as lists of pairs, /// and all other values count as single-value lists. List<Value> get asList => [this]; /// The length of [asList]. /// /// This is used to compute [sassIndexToListIndex] without allocating a new /// list. /// /// @nodoc @protected int get lengthAsList => 1; /// Whether the value will be represented in CSS as the empty string. /// /// @nodoc @internal bool get isBlank => false; /// Whether this is a value that CSS may treat as a number, such as `calc()` /// or `var()`. /// /// Functions that shadow plain CSS functions need to gracefully handle when /// these arguments are passed in. /// /// @nodoc @internal bool get isSpecialNumber => false; /// Whether this is a call to `var()`, which may be substituted in CSS for a /// custom property value. /// /// Functions that shadow plain CSS functions need to gracefully handle when /// these arguments are passed in. /// /// @nodoc @internal bool get isVar => false; /// Returns Dart's `null` value if this is [sassNull], and returns `this` /// otherwise. Value? get realNull => this; /// @nodoc const Value(); /// Calls the appropriate visit method on [visitor]. /// /// @nodoc @internal T accept<T>(ValueVisitor<T> visitor); /// Converts [sassIndex] into a Dart-style index into the list returned by /// [asList]. /// /// Sass indexes are one-based, while Dart indexes are zero-based. Sass /// indexes may also be negative in order to index from the end of the list. /// /// Throws a [SassScriptException] if [sassIndex] isn't a number, if that /// number isn't an integer, or if that integer isn't a valid index for /// [asList]. If [sassIndex] came from a function argument, [name] is the /// argument name (without the `$`). It's used for error reporting. int sassIndexToListIndex(Value sassIndex, [String? name]) { var indexValue = sassIndex.assertNumber(name); if (indexValue.hasUnits) { warnForDeprecation( "\$$name: Passing a number with unit ${indexValue.unitString} is " "deprecated.\n" "\n" "To preserve current behavior: " "${indexValue.unitSuggestion(name ?? 'index')}\n" "\n" "More info: path_to_url", Deprecation.functionUnits); } var index = indexValue.assertInt(name); if (index == 0) throw SassScriptException("List index may not be 0.", name); if (index.abs() > lengthAsList) { throw SassScriptException( "Invalid index $sassIndex for a list with $lengthAsList elements.", name); } return index < 0 ? lengthAsList + index : index - 1; } /// Throws a [SassScriptException] if `this` isn't a boolean. /// /// Note that generally, functions should use [isTruthy] rather than requiring /// a literal boolean. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassBoolean assertBoolean([String? name]) => throw SassScriptException("$this is not a boolean.", name); /// Throws a [SassScriptException] if `this` isn't a calculation. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassCalculation assertCalculation([String? name]) => throw SassScriptException("$this is not a calculation.", name); /// Throws a [SassScriptException] if `this` isn't a color. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassColor assertColor([String? name]) => throw SassScriptException("$this is not a color.", name); /// Throws a [SassScriptException] if `this` isn't a function reference. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassFunction assertFunction([String? name]) => throw SassScriptException("$this is not a function reference.", name); /// Throws a [SassScriptException] if `this` isn't a mixin reference. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassMixin assertMixin([String? name]) => throw SassScriptException("$this is not a mixin reference.", name); /// Throws a [SassScriptException] if `this` isn't a map. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassMap assertMap([String? name]) => throw SassScriptException("$this is not a map.", name); /// Returns `this` as a [SassMap] if it is one (including empty lists, which /// count as empty maps) or returns `null` if it's not. SassMap? tryMap() => null; /// Throws a [SassScriptException] if `this` isn't a number. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassNumber assertNumber([String? name]) => throw SassScriptException("$this is not a number.", name); /// Throws a [SassScriptException] if `this` isn't a string. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassString assertString([String? name]) => throw SassScriptException("$this is not a string.", name); /// Converts a `selector-parse()`-style input into a string that can be /// parsed. /// /// Throws a [SassScriptException] if `this` isn't a type or a structure that /// can be parsed as a selector. String _selectorString([String? name]) { if (_selectorStringOrNull() case var string?) return string; throw SassScriptException( "$this is not a valid selector: it must be a string,\n" "a list of strings, or a list of lists of strings.", name); } /// Converts a `selector-parse()`-style input into a string that can be /// parsed. /// /// Returns `null` if `this` isn't a type or a structure that can be parsed as /// a selector. String? _selectorStringOrNull() { var self = this; if (self is SassString) return self.text; if (self is! SassList) return null; if (self.asList.isEmpty) return null; var result = <String>[]; switch (self.separator) { case ListSeparator.comma: for (var complex in self.asList) { switch (complex) { case SassString(): result.add(complex.text); case SassList(separator: ListSeparator.space): var string = complex._selectorStringOrNull(); if (string == null) return null; result.add(string); case _: return null; } } case ListSeparator.slash: return null; case _: for (var compound in self.asList) { if (compound is! SassString) return null; result.add(compound.text); } } return result.join(self.separator == ListSeparator.comma ? ', ' : ' '); } /// Returns a new list containing [contents] that defaults to this value's /// separator and brackets. SassList withListContents(Iterable<Value> contents, {ListSeparator? separator, bool? brackets}) { return SassList(contents, separator ?? this.separator, brackets: brackets ?? hasBrackets); } /// The SassScript `=` operation. /// /// @nodoc @internal Value singleEquals(Value other) => SassString("${toCssString()}=${other.toCssString()}", quotes: false); /// The SassScript `>` operation. /// /// @nodoc @internal SassBoolean greaterThan(Value other) => throw SassScriptException('Undefined operation "$this > $other".'); /// The SassScript `>=` operation. /// /// @nodoc @internal SassBoolean greaterThanOrEquals(Value other) => throw SassScriptException('Undefined operation "$this >= $other".'); /// The SassScript `<` operation. /// /// @nodoc @internal SassBoolean lessThan(Value other) => throw SassScriptException('Undefined operation "$this < $other".'); /// The SassScript `<=` operation. /// /// @nodoc @internal SassBoolean lessThanOrEquals(Value other) => throw SassScriptException('Undefined operation "$this <= $other".'); /// The SassScript `*` operation. /// /// @nodoc @internal Value times(Value other) => throw SassScriptException('Undefined operation "$this * $other".'); /// The SassScript `%` operation. /// /// @nodoc @internal Value modulo(Value other) => throw SassScriptException('Undefined operation "$this % $other".'); /// The SassScript `+` operation. /// /// @nodoc @internal Value plus(Value other) => switch (other) { SassString() => SassString(toCssString() + other.text, quotes: other.hasQuotes), SassCalculation() => throw SassScriptException('Undefined operation "$this + $other".'), _ => SassString(toCssString() + other.toCssString(), quotes: false) }; /// The SassScript `-` operation. /// /// @nodoc @internal Value minus(Value other) => other is SassCalculation ? throw SassScriptException('Undefined operation "$this - $other".') : SassString("${toCssString()}-${other.toCssString()}", quotes: false); /// The SassScript `/` operation. /// /// @nodoc @internal Value dividedBy(Value other) => SassString("${toCssString()}/${other.toCssString()}", quotes: false); /// The SassScript unary `+` operation. /// /// @nodoc @internal Value unaryPlus() => SassString("+${toCssString()}", quotes: false); /// The SassScript unary `-` operation. /// /// @nodoc @internal Value unaryMinus() => SassString("-${toCssString()}", quotes: false); /// The SassScript unary `/` operation. /// /// @nodoc @internal Value unaryDivide() => SassString("/${toCssString()}", quotes: false); /// The SassScript unary `not` operation. /// /// @nodoc @internal Value unaryNot() => sassFalse; /// Returns a copy of `this` without [SassNumber.asSlash] set. /// /// If this isn't a [SassNumber], returns it as-is. /// /// @nodoc @internal Value withoutSlash() => this; /// Returns a valid CSS representation of `this`. /// /// Throws a [SassScriptException] if `this` can't be represented in plain /// CSS. Use [toString] instead to get a string representation even if this /// isn't valid CSS. // // Internal-only: If [quote] is `false`, quoted strings are emitted without // quotes. String toCssString({@internal bool quote = true}) => serializeValue(this, quote: quote); /// Returns a string representation of `this`. /// /// Note that this is equivalent to calling `inspect()` on the value, and thus /// won't reflect the user's output settings. [toCssString] should be used /// instead to convert `this` to CSS. String toString() => serializeValue(this, inspect: true); } /// Extension methods that are only visible through the `sass_api` package. /// /// These methods are considered less general-purpose and more liable to change /// than the main [Value] interface. /// /// {@category Value} extension SassApiValue on Value { /// Parses `this` as a selector list, in the same manner as the /// `selector-parse()` function. /// /// Throws a [SassScriptException] if this isn't a type that can be parsed as a /// selector, or if parsing fails. If [allowParent] is `true`, this allows /// [ParentSelector]s. Otherwise, they're considered parse errors. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SelectorList assertSelector({String? name, bool allowParent = false}) { var string = _selectorString(name); try { return SelectorList.parse(string, allowParent: allowParent); } on SassFormatException catch (error, stackTrace) { // TODO(nweiz): colorize this if we're running in an environment where // that works. throwWithTrace( SassScriptException( error.toString().replaceFirst("Error: ", ""), name), error, stackTrace); } } /// Parses `this` as a simple selector, in the same manner as the /// `selector-parse()` function. /// /// Throws a [SassScriptException] if this isn't a type that can be parsed as a /// selector, or if parsing fails. If [allowParent] is `true`, this allows /// [ParentSelector]s. Otherwise, they're considered parse errors. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SimpleSelector assertSimpleSelector( {String? name, bool allowParent = false}) { var string = _selectorString(name); try { return SimpleSelector.parse(string, allowParent: allowParent); } on SassFormatException catch (error, stackTrace) { // TODO(nweiz): colorize this if we're running in an environment where // that works. throwWithTrace( SassScriptException( error.toString().replaceFirst("Error: ", ""), name), error, stackTrace); } } /// Parses `this` as a compound selector, in the same manner as the /// `selector-parse()` function. /// /// Throws a [SassScriptException] if this isn't a type that can be parsed as a /// selector, or if parsing fails. If [allowParent] is `true`, this allows /// [ParentSelector]s. Otherwise, they're considered parse errors. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. CompoundSelector assertCompoundSelector( {String? name, bool allowParent = false}) { var string = _selectorString(name); try { return CompoundSelector.parse(string, allowParent: allowParent); } on SassFormatException catch (error, stackTrace) { // TODO(nweiz): colorize this if we're running in an environment where // that works. throwWithTrace( SassScriptException( error.toString().replaceFirst("Error: ", ""), name), error, stackTrace); } } /// Parses `this` as a complex selector, in the same manner as the /// `selector-parse()` function. /// /// Throws a [SassScriptException] if this isn't a type that can be parsed as a /// selector, or if parsing fails. If [allowParent] is `true`, this allows /// [ParentSelector]s. Otherwise, they're considered parse errors. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. ComplexSelector assertComplexSelector( {String? name, bool allowParent = false}) { var string = _selectorString(name); try { return ComplexSelector.parse(string, allowParent: allowParent); } on SassFormatException catch (error, stackTrace) { // TODO(nweiz): colorize this if we're running in an environment where // that works. throwWithTrace( SassScriptException( error.toString().replaceFirst("Error: ", ""), name), error, stackTrace); } } } ```
World Women's Snooker, founded as the World Ladies Billiards and Snooker Association (WLBSA) in 1981, and known as World Ladies Billiards and Snooker (WLBS) from 2015 to 2018, is a subsidiary company of the World Professional Billiards and Snooker Association concerned with governing and promoting snooker and billiards for women. Precursors Women's Snooker and Billiards had been governed by the Women's Billiards Association (WBA), formed in 1931. However, the last professional billiards and snooker championships organised by the WBA were those held in 1950, and by the early 1970s the organisation had "fallen on hard times" according to leading snooker journalist and author Clive Everton. A Women's Billiards & Snooker Association (WBSA) was formed in 1976, and in 1978 appointed Wally West, snooker club owner, and holder of the world record break of 151, as Secretary. The Association organised the 1976 Women's World Open snooker championship and further championships in 1980 and 1981. World Ladies Billiards and Snooker Association (WLBSA), 1981–2015 Mandy Fisher, a leading woman player, founded the World Ladies Billiards and Snooker Association (WLBSA) in 1981. The WLBSA held its first open snooker competition in Leeds in March 1982, and within a couple of years, the WBSA lost control of snooker to the WLBSA. In 1997, the World Professional Billiards and Snooker Association (WPBS) started providing support and prize money for WLBSA tournaments, but the WPBSA's support for the women's circuit stopped in 2002 following the loss of income due to the UK government's restrictions on tobacco sponsorship of sport. World Ladies Billiards and Snooker (WLBS), 2015–2018 The WLBSA was restructured as a subsidiary of the World Professional Billiards and Snooker Association in 2015, and became a full member of the World Snooker Federation in 2017. It was known as World Ladies Billiards and Snooker from July 2015 to November 2018. World Women’s Snooker, 2018–present In November 2018 the WLBSA was renamed as World Women's Snooker, and is responsible for women's snooker and billiards and the women's ranking list. References External links Official Website Snooker governing bodies Organisations based in Bristol Sports organizations established in 1981 Snooker in the United Kingdom Women's sports governing bodies in England
Heribert Maier (7 February 1932 – 6 November 2007) was an Austrian trade union leader. Born in Graz, Maier studied at the local gymnasium and then the University of Vienna, from which he obtained a doctorate in economics. Maier began working for the Austrian Trade Union Federation in 1955, then in 1958 moved to Brussels to work for the International Confederation of Free Trade Unions (ICFTU). In 1972, he was appointed as assistant general secretary of the ICFTU, but he left the following year to become general secretary of the International Federation of Commercial, Clerical and Technical Employees (FIET). As leader of FIET, Maier focused on recruiting unions and supporting workers' struggles in Latin America, Asia and Africa. He became a worker representative at the International Labour Organization (ILO), jointly drafting its Tripartite Declaration on Multinationals in 1977, and championing the Health and Safety in Mines Convention. In 1989, Maier left FIET to become deputy director-general of the ILO. He retired in 1996, and was awarded the Grand Decoration of Honour in Silver with Star by the Austrian government. In retirement, he served on the Education International's Committee of Experts. References 1932 births 2007 deaths Austrian trade union leaders People from Graz Recipients of the Grand Decoration with Star for Services to the Republic of Austria University of Vienna alumni
```asciidoc = nats_stream :type: input :status: stable :categories: ["Services"] //// THIS FILE IS AUTOGENERATED! To make changes, edit the corresponding source file under: path_to_url And: path_to_url //// // 2024 Redpanda Data Inc. component_type_dropdown::[] Subscribe to a NATS Stream subject. Joining a queue is optional and allows multiple clients of a subject to consume using queue semantics. [tabs] ====== Common:: + -- ```yml # Common config fields, showing default values input: label: "" nats_stream: urls: [] # No default (required) cluster_id: "" # No default (required) client_id: "" queue: "" subject: "" durable_name: "" unsubscribe_on_close: false ``` -- Advanced:: + -- ```yml # All config fields, showing default values input: label: "" nats_stream: urls: [] # No default (required) cluster_id: "" # No default (required) client_id: "" queue: "" subject: "" durable_name: "" unsubscribe_on_close: false start_from_oldest: true max_inflight: 1024 ack_wait: 30s tls: enabled: false skip_cert_verify: false enable_renegotiation: false root_cas: "" root_cas_file: "" client_certs: [] auth: nkey_file: ./seed.nk # No default (optional) user_credentials_file: ./user.creds # No default (optional) user_jwt: "" # No default (optional) user_nkey_seed: "" # No default (optional) extract_tracing_map: root = @ # No default (optional) ``` -- ====== [CAUTION] .Deprecation notice ==== The NATS Streaming Server is being deprecated. Critical bug fixes and security fixes will be applied until June of 2023. NATS-enabled applications requiring persistence should use path_to_url ==== Tracking and persisting offsets through a durable name is also optional and works with or without a queue. If a durable name is not provided then subjects are consumed from the most recently published message. When a consumer closes its connection it unsubscribes, when all consumers of a durable queue do this the offsets are deleted. In order to avoid this you can stop the consumers from unsubscribing by setting the field `unsubscribe_on_close` to `false`. == Metadata This input adds the following metadata fields to each message: - nats_stream_subject - nats_stream_sequence You can access these metadata fields using xref:configuration:interpolation.adoc#bloblang-queries[function interpolation]. == Authentication There are several components within Redpanda Connect which uses NATS services. You will find that each of these components support optional advanced authentication parameters for path_to_url and path_to_url Credentials^]. See an path_to_url tutorial^]. === NKey file The NATS server can use these NKeys in several ways for authentication. The simplest is for the server to be configured with a list of known public keys and for the clients to respond to the challenge by signing it with its private NKey configured in the `nkey_file` field. path_to_url details^]. === User credentials NATS server supports decentralized authentication based on JSON Web Tokens (JWT). Clients need an path_to_url#json-web-tokens[user JWT^] and a corresponding path_to_url secret^] when connecting to a server which is configured to use this authentication scheme. The `user_credentials_file` field should point to a file containing both the private key and the JWT and can be generated with the path_to_url tool^]. Alternatively, the `user_jwt` field can contain a plain text JWT and the `user_nkey_seed`can contain the plain text NKey Seed. path_to_url details^]. == Fields === `urls` A list of URLs to connect to. If an item of the list contains commas it will be expanded into multiple URLs. *Type*: `array` ```yml # Examples urls: - nats://127.0.0.1:4222 urls: - nats://username:password@127.0.0.1:4222 ``` === `cluster_id` The ID of the cluster to consume from. *Type*: `string` === `client_id` A client ID to connect as. *Type*: `string` *Default*: `""` === `queue` The queue to consume from. *Type*: `string` *Default*: `""` === `subject` A subject to consume from. *Type*: `string` *Default*: `""` === `durable_name` Preserve the state of your consumer under a durable name. *Type*: `string` *Default*: `""` === `unsubscribe_on_close` Whether the subscription should be destroyed when this client disconnects. *Type*: `bool` *Default*: `false` === `start_from_oldest` If a position is not found for a queue, determines whether to consume from the oldest available message, otherwise messages are consumed from the latest. *Type*: `bool` *Default*: `true` === `max_inflight` The maximum number of unprocessed messages to fetch at a given time. *Type*: `int` *Default*: `1024` === `ack_wait` An optional duration to specify at which a message that is yet to be acked will be automatically retried. *Type*: `string` *Default*: `"30s"` === `tls` Custom TLS settings can be used to override system defaults. *Type*: `object` === `tls.enabled` Whether custom TLS settings are enabled. *Type*: `bool` *Default*: `false` === `tls.skip_cert_verify` Whether to skip server side certificate verification. *Type*: `bool` *Default*: `false` === `tls.enable_renegotiation` Whether to allow the remote server to repeatedly request renegotiation. Enable this option if you're seeing the error message `local error: tls: no renegotiation`. *Type*: `bool` *Default*: `false` Requires version 3.45.0 or newer === `tls.root_cas` An optional root certificate authority to use. This is a string, representing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate. [CAUTION] ==== This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info]. ==== *Type*: `string` *Default*: `""` ```yml # Examples root_cas: |- -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- ``` === `tls.root_cas_file` An optional path of a root certificate authority file to use. This is a file, often with a .pem extension, containing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate. *Type*: `string` *Default*: `""` ```yml # Examples root_cas_file: ./root_cas.pem ``` === `tls.client_certs` A list of client certificates to use. For each certificate either the fields `cert` and `key`, or `cert_file` and `key_file` should be specified, but not both. *Type*: `array` *Default*: `[]` ```yml # Examples client_certs: - cert: foo key: bar client_certs: - cert_file: ./example.pem key_file: ./example.key ``` === `tls.client_certs[].cert` A plain text certificate to use. *Type*: `string` *Default*: `""` === `tls.client_certs[].key` A plain text certificate key to use. [CAUTION] ==== This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info]. ==== *Type*: `string` *Default*: `""` === `tls.client_certs[].cert_file` The path of a certificate to use. *Type*: `string` *Default*: `""` === `tls.client_certs[].key_file` The path of a certificate key to use. *Type*: `string` *Default*: `""` === `tls.client_certs[].password` A plain text password for when the private key is password encrypted in PKCS#1 or PKCS#8 format. The obsolete `pbeWithMD5AndDES-CBC` algorithm is not supported for the PKCS#8 format. Because the obsolete pbeWithMD5AndDES-CBC algorithm does not authenticate the ciphertext, it is vulnerable to padding oracle attacks that can let an attacker recover the plaintext. [CAUTION] ==== This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info]. ==== *Type*: `string` *Default*: `""` ```yml # Examples password: foo password: ${KEY_PASSWORD} ``` === `auth` Optional configuration of NATS authentication parameters. *Type*: `object` === `auth.nkey_file` An optional file containing a NKey seed. *Type*: `string` ```yml # Examples nkey_file: ./seed.nk ``` === `auth.user_credentials_file` An optional file containing user credentials which consist of an user JWT and corresponding NKey seed. *Type*: `string` ```yml # Examples user_credentials_file: ./user.creds ``` === `auth.user_jwt` An optional plain text user JWT (given along with the corresponding user NKey Seed). [CAUTION] ==== This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info]. ==== *Type*: `string` === `auth.user_nkey_seed` An optional plain text user NKey Seed (given along with the corresponding user JWT). [CAUTION] ==== This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info]. ==== *Type*: `string` === `extract_tracing_map` EXPERIMENTAL: A xref:guides:bloblang/about.adoc[Bloblang mapping] that attempts to extract an object containing tracing propagation information, which will then be used as the root tracing span for the message. The specification of the extracted fields must match the format used by the service wide tracer. *Type*: `string` Requires version 4.23.0 or newer ```yml # Examples extract_tracing_map: root = @ extract_tracing_map: root = this.meta.span ``` ```
```html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url"> <html xmlns="path_to_url"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.8"/> <title>GLFW: monitor.dox File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="extra.css" rel="stylesheet" type="text/css"/> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <div class="glfwheader"> <a href="path_to_url" id="glfwhome">GLFW</a> <ul class="glfwnavbar"> <li><a href="path_to_url">Documentation</a></li> <li><a href="path_to_url">Download</a></li> <li><a href="path_to_url">Media</a></li> <li><a href="path_to_url">Community</a></li> </ul> </div> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.8 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="pages.html"><span>Related&#160;Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File&#160;List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Modules</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">monitor.dox File Reference</div> </div> </div><!--header--> <div class="contents"> </div><!-- contents --> <address class="footer"> <p> Last update on Mon Oct 12 2015 for GLFW 3.1.2 </p> </address> </body> </html> ```
Carumbium can be one of these two plant genera: Carumbium Kurz, which is a synonym of Sapium. Carumbium Reinw., which is a synonym of Homalanthus.
```javascript /** * @license Apache-2.0 * * * * 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. */ 'use strict'; // MODULES // var bench = require( '@stdlib/bench' ); var isIteratorLike = require( '@stdlib/assert/is-iterator-like' ); var isndarrayLike = require( '@stdlib/assert/is-ndarray-like' ); var array = require( '@stdlib/ndarray/array' ); var pkg = require( './../package.json' ).name; var nditerMatrices = require( './../lib' ); // MAIN // bench( pkg, function benchmark( b ) { var iter; var x; var i; x = array( [ [ [ 1, 2, 3, 4 ] ] ] ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { iter = nditerMatrices( x ); if ( typeof iter !== 'object' ) { b.fail( 'should return an object' ); } } b.toc(); if ( !isIteratorLike( iter ) ) { b.fail( 'should return an iterator protocol-compliant object' ); } b.pass( 'benchmark finished' ); b.end(); }); bench( pkg+'::iteration', function benchmark( b ) { var xbuf; var iter; var x; var z; var i; xbuf = []; xbuf.length = b.iterations + 1; x = array( xbuf, { 'shape': [ xbuf.length, 1, 1 ], 'dtype': 'generic', 'copy': false }); iter = nditerMatrices( x ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { z = iter.next().value; if ( typeof z !== 'object' ) { b.fail( 'should return an ndarray' ); } } b.toc(); if ( !isndarrayLike( z ) ) { b.fail( 'should return an ndarray' ); } b.pass( 'benchmark finished' ); b.end(); }); ```
```asciidoc The examples in this section are based on the following sample graph: [source,cypher] ---- MERGE (joe:Person {name: "Joe"}) MERGE (ryan:Person {name: "Ryan"}) MERGE (ryan)-[:FOLLOWS {since: datetime("2020-11-04")}]->(joe); ---- The following generates the fingerprint for Ryan: [source,cypher] ---- MATCH (person:Person {name: "Ryan"}) RETURN apoc.hashing.fingerprinting(person) AS output; ---- .Results [opts="header"] |=== | output | "D41D8CD98F00B204E9800998ECF8427E" |=== The following generates the fingerprint for Ryan, using the `EAGER` strategy, which includes node properties: [source,cypher] ---- MATCH (person:Person {name: "Ryan"}) RETURN apoc.hashing.fingerprinting(person, { strategy: "EAGER" }) AS output; ---- .Results [opts="header"] |=== | output | "81C99DD6C9382C4E01A1873F9E818CE0" |=== The following generates the fingerprint for Ryan, excluding the `name` property: [source,cypher] ---- MATCH (person:Person {name: "Ryan"}) RETURN apoc.hashing.fingerprinting(person, { allNodesDisallowList: ["name"] }) AS output; ---- .Results [opts="header"] |=== | output | "D41D8CD98F00B204E9800998ECF8427E" |=== The following generates the fingerprint for Ryan, using the `SHA-256` algorithm: [source,cypher] ---- MATCH (person:Person {name: "Ryan"}) RETURN apoc.hashing.fingerprinting(person, { digestAlgorithm: "SHA-256" }) AS output; ---- .Results [opts="header"] |=== | output | your_sha256_hash |=== If we want less control over the generation of the fingerprint, see xref::overview/apoc.hashing/apoc.hashing.fingerprint.adoc[]. ```