text
stringlengths
1
22.8M
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\CloudKMS; class Operation extends \Google\Model { /** * @var bool */ public $done; protected $errorType = Status::class; protected $errorDataType = ''; /** * @var array[] */ public $metadata; /** * @var string */ public $name; /** * @var array[] */ public $response; /** * @param bool */ public function setDone($done) { $this->done = $done; } /** * @return bool */ public function getDone() { return $this->done; } /** * @param Status */ public function setError(Status $error) { $this->error = $error; } /** * @return Status */ public function getError() { return $this->error; } /** * @param array[] */ public function setMetadata($metadata) { $this->metadata = $metadata; } /** * @return array[] */ public function getMetadata() { return $this->metadata; } /** * @param string */ public function setName($name) { $this->name = $name; } /** * @return string */ public function getName() { return $this->name; } /** * @param array[] */ public function setResponse($response) { $this->response = $response; } /** * @return array[] */ public function getResponse() { return $this->response; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(Operation::class, 'Google_Service_CloudKMS_Operation'); ```
```xml import * as React from 'react'; import { DemoPage } from '../DemoPage'; import { PeoplePickerPageProps } from '@fluentui/react-examples/lib/react/PeoplePicker/PeoplePicker.doc'; export const PeoplePickerPage = (props: { isHeaderVisible: boolean }) => ( <DemoPage jsonDocs={require('../../../dist/api/react/PeoplePicker.page.json')} {...{ ...PeoplePickerPageProps, ...props }} /> ); ```
```javascript import _ from 'lodash' export default function parseShowTagValues(response) { // Currently only supports SHOW TAG VALUES responses that explicitly specify a measurement, // Ceaning we can safely work with just the first result from the response. const result = response.results[0] if (result.error) { return {errors: [], tags: []} } const tags = {} ;(result.series || []).forEach(({columns, values}) => { values.forEach(v => { const tagKey = v[columns.indexOf('key')] const tagValue = v[columns.indexOf('value')] if (!tags[tagKey]) { tags[tagKey] = [] } tags[tagKey].push(tagValue) }) }) // uniqueness of tag values are no longer guaranteed see showTagValueSpec for example _.each(tags, (v, k) => { tags[k] = _.uniq(v).sort() }) return {errors: [], tags} } ```
```python from ray.util.annotations import PublicAPI @PublicAPI(stability="stable") class RayServeException(Exception): pass @PublicAPI(stability="alpha") class BackPressureError(RayServeException): """Raised when max_queued_requests is exceeded on a DeploymentHandle.""" def __init__(self, *, num_queued_requests: int, max_queued_requests: int): self._message = ( f"Request dropped due to backpressure " f"(num_queued_requests={num_queued_requests}, " f"max_queued_requests={max_queued_requests})." ) super().__init__(self._message) @property def message(self) -> str: return self._message ```
The Fell Locomotive Museum in Featherston, New Zealand, exhibits the only remaining steam-powered Fell railway locomotive in the world. From 1877, locomotive H 199 climbed up the Rimutaka Incline using John Barraclough Fell's unique method of four grip wheels on a raised centre rail. It is housed and tended to by a group of dedicated rail enthusiasts. H 199 is one of six H class locomotives designed for use on the 1 in 15 Rimutaka Incline, where they worked for 77 years. Their story is recalled by audio-visual programmes, models, photographs and memorabilia in the museum. History At the official opening ceremony for the Rimutaka Tunnel on 3 November 1955 at Speedy's Crossing, the Minister for Railways, Mr McAlpine, presented H 199 to the Borough of Featherston for display. After H 199 completed its duties on the demolition trains removing the Incline track it was towed to Hutt Workshops where it was stored until August 1958, when it was towed to Featherston and mounted on a plinth in a playground for children to play on. In 1980, it became obvious that the locomotive was deteriorating through age and exposure to the elements. The Friends of the Fell Society was formed with the objective of preserving and housing it. Restoration work commenced in 1981 and proceeded as volunteer labour was available. During the restoration work, the museum was constructed across the main road and next to the town's old courthouse. In late February 1984, H 199 was prepared for relocation to the museum, scheduled to happen on 10 March. On relocation day the locomotive was loaded onto a house removal truck and transported to the museum, where it was lifted onto a temporary trackset that enabled it to be winched into the building. Restoration work continued until 1988. It has never been the intention of the Friends of the Fell to steam the locomotive, though it has been restored to near fully working order. It is mounted on rollers driven by an electric motor so visitors to the museum can see the moving parts in action. In 1995 the Friends of the Fell Society secured a lease on F 210, the sole remaining Fell brake van, from MoTaT for display in the museum. One of the conditions of the lease was that the van would be restored to the condition it was in when in service. With the arrival of F 210 in Featherston in June 1995 courtesy of Tranz Rail, restoration commenced in the workshop of the nearby Batavia Rubber Company. The museum was extended, and on 11 December 1996 F 210 was transported to its new home, where restoration was completed on 20 August 1997. References Citations Bibliography Further reading External links Fell Locomotive Museum Buildings and structures in the Wairarapa History of the Wellington Region Museums in the Wellington Region Railway museums in New Zealand Featherston, New Zealand
```kotlin import com.android.build.gradle.internal.tasks.factory.dependsOn plugins { id("com.android.application") id("kotlin-android") id("com.google.gms.google-services") } tasks { check.dependsOn("assembleDebugAndroidTest") } android { namespace = "com.google.samples.quickstart.config" compileSdk = 35 defaultConfig { applicationId = "com.google.samples.quickstart.config" minSdk = 21 targetSdk = 35 versionCode = 1 versionName = "1.0" multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } buildTypes { getByName("release") { isMinifyEnabled = false proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") } } compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = "17" } buildFeatures { viewBinding = true } } dependencies { implementation(project(":internal:lintchecks")) implementation(project(":internal:chooserx")) implementation("com.google.android.material:material:1.12.0") // Import the Firebase BoM (see: path_to_url#bom) implementation(platform("com.google.firebase:firebase-bom:33.1.2")) // Firebase Remote Config implementation("com.google.firebase:firebase-config") // For an optimal experience using Remote Config, add the Firebase SDK // for Google Analytics. This is recommended, but not required. implementation("com.google.firebase:firebase-analytics") androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1") androidTestImplementation("androidx.test:rules:1.6.1") androidTestImplementation("androidx.test:runner:1.6.2") androidTestImplementation("androidx.test.ext:junit:1.2.1") } ```
```go package user import ( "testing" "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/test" "github.com/stretchr/testify/assert" ) func TestUserAvatarLink(t *testing.T) { defer test.MockVariableValue(&setting.AppURL, "path_to_url")() defer test.MockVariableValue(&setting.AppSubURL, "")() u := &User{ID: 1, Avatar: "avatar.png"} link := u.AvatarLink(db.DefaultContext) assert.Equal(t, "path_to_url", link) setting.AppURL = "path_to_url" setting.AppSubURL = "/sub-path" link = u.AvatarLink(db.DefaultContext) assert.Equal(t, "path_to_url", link) } ```
The "AIM Song" is the name given to a Native American intertribal song. Although the song originally did not have a name, it gained its current alias through association with the American Indian Movement. History The origins of the song itself are uncertain, and there are various theories attributing the song to various locations across North America and various points in history. For many tribes, the origins of the song have been legendized. A popular theory is that it developed from a simple song hummed by a child at Crow Fair. This is possible, because the vocables are not particularly complex, however the claim remains largely without any basis in fact. A more likely theory is that it was developed between two early members of the American Indian Movement. Edward Benton-Banai, from the Lac Courte Oreilles Band of Ojibwe Indians, co-founded the movement in 1972, and is rumoured as the songwriter. The song could have been inspired by a traditional Ojibwe honoring song, known as the Airforce Song. Severt Young Bear, an Oglala Lakota from Porcupine, South Dakota, was also involved in AIM. As the lead singer of the Porcupine Singers, he made the song popular in the early 1970s. Although he admits he did not write it, collaboration between himself and Benton-Banai could have helped the song to develop. Although Severt does give credit to Drury Cook (A Mnicoujou Lakota and a member of the Cheyenne River Sioux Tribe) for possibly making the AIM song, which at time of selecting a song, other songs were brought to AIM leaders as possible songs, Porcupine Singers performed the song for AIM leaders and the song was accepted by the Leaders at that time as the AIM Song or Anthem (Severt quoted this in his book "Standing in the Light"). It may have been written as a victory song after the AIM protest in Gordon, Nebraska regarding the murder of Raymond Yellow Thunder resulted in criminal charges and the dismissal of the Chief of Police Several Ktunaxa Elders (Marianne Michel, Leo Williams, Wilfred Jacobs, and Joe Skookum) were tape recorded at a powwow in 1981 at the Lower Kootenay Band at Creston British Columbia and stated that the song people are using in association with AIM and the Constitutional Express Constitution Express in 1980 which went from Vancouver to Ottawa is a Ktunaxa warrior song. Two of the Elders stated, "It is very important to me". The Ktunaxa songs are almost all melodic and most do not include the Ktunaxa language, which is in the same style as the "AIM Song". Form The song comprises non-lexical vocables (abstract sounds rather than semantic words). This involves the heavy use of vowels and semi-vowels, as consonants would bias the song towards a particular tribe (whose language uses those consonants). The song is intended as an intertribal, therefore it is deliberately not language-specific. As is characteristic of many Native American songs, the song involves vocal harmony. The men are backed up by around twice the number of women. The female vocal line becomes particularly prominent in this repeated motif: The song is usually accompanied with a steady beat on a traditional man’s drum. It has also been heard with the accompaniment of a water drum, which suggests the song originated amongst the Plains tribes. Uses This song was sung by Omaha leader Nathan Phillips at an Indigenous People's March in Washington DC in a viral video incident to defuse a tense situation between a group of 200 Catholic high school boys and a group of four Black Israelites on January 18, 2019. References Native American music American Indian Movement
is a woodblock print by Japanese ukiyo-e artist Hokusai, created in late 1831 during the Edo period of Japanese history. The print depicts three boats moving through a storm-tossed sea, with a large, cresting wave forming a spiral in the centre and Mount Fuji visible in the background. The print is Hokusai's best-known work and the first in his series Thirty-six Views of Mount Fuji, in which the use of Prussian blue revolutionized Japanese prints. The composition of The Great Wave is a synthesis of traditional Japanese prints and use of graphical perspective developed in Europe, and earned him immediate success in Japan and later in Europe, where Hokusai's art inspired works by the Impressionists. Several museums throughout the world hold copies of The Great Wave, many of which came from 19th-century private collections of Japanese prints. The Great Wave Kanagawa has been described as "possibly the most reproduced image in the history of all art", as well as being a contender for the "most famous artwork in Japanese history". This woodblock print has influenced several notable artists and musicians, including Vincent van Gogh, Claude Debussy, Claude Monet and Utagawa Hiroshige. Context Ukiyo-e art Ukiyo-e is a Japanese printmaking technique which flourished in the 17th through 19th centuries. Its artists produced woodblock prints and paintings of subjects including female beauties; kabuki actors and sumo wrestlers; scenes from history and folk tales; travel scenes and landscapes; Japanese flora and fauna; and erotica. The term translates as "picture[s] of the floating world". After Edo (now Tokyo) became the seat of the ruling Tokugawa shogunate in 1603, the chōnin class of merchants, craftsmen, and workers benefited most from the city's rapid economic growth, and began to indulge in and patronise the entertainment of kabuki theatre, geisha, and courtesans of the pleasure districts; the term ("floating world") came to describe this hedonistic lifestyle. Printed or painted ukiyo-e works were popular with the chōnin class, who had become wealthy enough to afford to decorate their homes with them. The earliest ukiyo-e works, Hishikawa Moronobu's paintings and monochromatic prints of women, emerged in the 1670s. Colour prints were introduced gradually, and at first were only used for special commissions. By the 1740s, artists such as Okumura Masanobu used multiple woodblocks to print areas of colour. In the 1760s, the success of Suzuki Harunobu's "brocade prints" led to full-colour production becoming standard, with ten or more blocks used to create each print. Some ukiyo-e artists specialized in creating paintings, but most works were prints. Artists rarely carved their own woodblocks; production was divided between the artist, who designed the prints; the carver, who cut the woodblocks; the printer, who inked and pressed the woodblocks onto hand-made paper; and the publisher who financed, promoted, and distributed the works. As printing was done by hand, printers were able to achieve effects impractical with machines, such as the blending or gradation of colours on the printing block. Artist Katsushika Hokusai was born in Katsushika, Japan, in 1760 in a district east of Edo. He was the son of a shogun mirrormaker, and at the age of 14, he was named Tokitarō. As Hokusai was never recognised as an heir, it is likely his mother was a concubine. Hokusai began painting when he was six years old, and when he was twelve his father sent him to work in a bookstore. At sixteen, he became an engraver's apprentice, which he remained for three years while also beginning to create his own illustrations. At eighteen, Hokusai was accepted as an apprentice to artist Katsukawa Shunshō, one of the greatest ukiyo-e artists of his time. When Shunshō died in 1793, Hokusai studied Japanese and Chinese styles, as well as some Dutch and French paintings on his own. In 1800, he published Famous Views of the Eastern Capital and Eight Views of Edo, and began to accept trainees. During this period he began to use the name Hokusai; during his life, he would use more than 30 pseudonyms. In 1804, Hokusai rose to prominence when he created a drawing of a Buddhist monk named Daruma for a festival in Tokyo. Due to his precarious financial situation, in 1812, he published Quick Lessons in Simplified Drawing, and began to travel to Nagoya and Kyoto to recruit more students. In 1814, he published the first of 15 manga; volumes of sketches of subjects that interested him, such as people, animals, and Buddha. He published his famous series Thirty-six Views of Mount Fuji in the late 1820s; it was so popular he later had to add ten more prints. Hokusai died in 1849 at the age of 89. According to Calza (2003), years before his death Hokusai stated: Description The Great Wave off Kanagawa is a landscape-format yoko-e print that was produced in an ōban size of . The landscape is composed of three elements: a stormy sea, three boats, and a mountain. The artist's signature is visible in the upper left-hand corner. Mountain In the background is Mount Fuji and its snow-capped summit; Mount Fuji is the central figure of the Thirty-six Views of Mount Fuji series, which depicts the mountain from different angles. In The Great Wave off Kanagawa, Mount Fuji is depicted in blue with white highlights in a similar way to the wave in the foreground. The dark colour surrounding the mountain appears to indicate the painting is set in the early morning, with the sun rising from the viewer's vantage point and beginning to illuminate the snowy peak. There are cumulonimbus clouds between the mountain and the viewer; although these clouds typically indicate a storm, there is no rain on Fuji or in the main scene. Boats The scene shows three oshiokuri-bune, fast barges that were used to transport live fish from the Izu and Bōsō peninsulas to markets in Edo Bay. According to analysis by Cartwright and Nakamura (2009), the boats are located in Edo (Tokyo) Bay off Yokohama in present-day Kanagawa Prefecture, with Edo to the north and Mount Fuji to the west. The boats are facing south, likely to Sagami Bay to collect a cargo of fish for sale in Edo. Each boat has eight rowers who are holding their oars. At the front of each boat are two more relief crew members; 30 men are represented in the picture but only 22 are visible. The size of the wave can be approximated using the boats as a reference: the oshiokuri-bune were generally between long. Taking into account Hokusai reduced the vertical scale by 30%, the wave is between high. Sea and waves The sea dominates the composition, which is based on the shape of a wave that spreads out and dominates the entire scene before falling. At this point, the wave forms a perfect spiral with its centre passing through the centre of the design, allowing viewers to see Mount Fuji in the background. The image is made up of curves, with the water's surface being an extension of the curves inside the waves. The big wave's foam-curves generate other curves, which are divided into many small waves that repeat the image of the large wave. Edmond de Goncourt, a French writer, described the wave as follows: The wave is generally described as that produced by a tsunami, a giant wave or more likely a rogue wave, but also as a monstrous or ghostly wave like a white skeleton threatening the fishermen with its "claws" of foam. This interpretation of the work recalls Hokusai's mastery of Japanese fantasy, which is evidenced by the ghosts in his Hokusai Manga. An examination of the wave on the left side reveals many more "claws" that are ready to seize the fishermen behind the white foam strip. This image recalls many of Hokusai's previous works, including his Hyaku Monogatari series One Hundred Ghost Stories, produced from 1831 to 1832, which more explicitly depicts supernatural themes. The wave's silhouette resembles that of a dragon, which the author frequently depicts, even on Mount Fuji. Signature The Great Wave off Kanagawa has two inscriptions. The title of the series is written in the upper-left corner within a rectangular frame, which reads: "冨嶽三十六景/神奈川沖/浪裏" Fugaku Sanjūrokkei / Kanagawa oki / nami ura, meaning "Thirty-six views of Mount Fuji / On the high seas in Kanagawa / Under the wave". The inscription to the left of the box bears the artist's signature: 北斎改爲一筆 Hokusai aratame Iitsu hitsu which reads as "(painting) from the brush of Hokusai, who changed his name to Iitsu". Due to his humble origins, Hokusai had no surname; his first nickname Katsushika was derived from the region he came from. Throughout his career, Hokusai used over 30 names and never started a new cycle of work without changing his name, sometimes leaving his name to his students. Depth and perspective Depth and perspective (uki-e) work in The Great Wave off Kanagawa stand out, with a strong contrast between background and foreground. Two great masses dominate the visual space: the violence of the great wave contrasts with the serenity of the empty background, evoking the yin and yang symbol. Man, powerless, struggles between the two, which may be a reference to Buddhism (in which man-made things are ephemeral), as represented by the boats being swept away by the giant wave, and Shintoism (in which nature is omnipotent). Creation Hokusai faced numerous challenges during the composition of The Great Wave off Kanagawa. In 1826, whilst in his sixties, he suffered financial difficulty, and in 1827 apparently suffered a serious health problem, probably a stroke. His wife died the following year, and in 1829 he had to rescue his grandson from financial problems, a situation that pushed Hokusai into poverty. Despite sending his grandson to the countryside with his father in 1830, the financial ramifications continued for several years, during which time he was working on Thirty-six Views of Mount Fuji. Cartwright and Nakamura (2009) interpret Hokusai's tribulations as the source of the series' powerful and innovative imagery. Hokusai's goal for the series appears to have been depicting the contrast between the sacred Mount Fuji and secular life. After several years of work and other drawings, Hokusai arrived at the final design for The Great Wave off Kanagawa in late 1831. Two similar works from around 30 years before the publication of The Great Wave can be considered forerunners: Kanagawa-oki Honmoku no Zu and Oshiokuri Hato Tsusen no Zu, both of which depict a boat (a sailing boat in the former, and a rowing boat in the latter) in the midst of a storm and at the base of a great wave that threatens to engulf them. The Great Wave off Kanagawa demonstrates Hokusai's drawing skill. The print, though simple in appearance to the viewer, is the result of a lengthy process of methodical reflection. Hokusai established the foundations of this method in his 1812 book Quick Lessons in Simplified Drawing, in which he explains that any object can be drawn using the relationship between the circle and the square: "The book consists of showing the technique of drawing using only a ruler and a compass ... This method starts with a line and the most naturally obtained proportion". He continues in the book's preface: "All forms have their own dimensions which we must respect ... It must not be forgotten that such things belong to a universe whose harmony we must not break". Hokusai returned to the image of The Great Wave a few years later when he produced Kaijo no Fuji for the second volume of One Hundred Views of Fuji. This print features the same relationship between the wave and the mountain, and the same burst of foam. There are no humans or boats in the latter image, and the wave fragments coincide with the flight of birds. While the wave in The Great Wave moves in the opposite direction of the Japanese reading – from right to left – the wave and birds in Kaijo no Fuji move in unison. Reading direction The Japanese interpret The Great Wave off Kanagawa from right to left, emphasising the danger posed by the enormous wave. This is traditional for Japanese paintings, as Japanese script is also read from right to left. Analyzing the boats in the image, particularly that at the top, reveals the slender, tapering bow faces left, implying the Japanese interpretation is correct. The boats' appearances can also be analysed in Hokusai's print Sōshū Chōshi from the series Chie no umi ("Oceans of Wisdom"), in which the boat moves against the current in a rightward direction, as shown by the boat's wake. Western influence on the work Perspective The concept of perspective prints arrived in Japan in the 18th century. These prints rely on a single-point perspective rather than a traditional foreground, middle ground, and background, which Hokusai consistently rejected. Objects in traditional Japanese painting and Far Eastern painting in general were not drawn in perspective but rather, as in ancient Egypt, the sizes of objects and figures were determined by the subject's importance within the context. Perspective, which was first used in Western paintings by Paolo Uccello and Piero della Francesca, was introduced to Japanese artists through Western – particularly Dutch – merchants arriving in Nagasaki. Okumura Masanobu and especially Utagawa Toyoharu made the first attempts to imitate the use of Western perspective, producing engravings depicting the canals of Venice or the ruins of ancient Rome in perspective as early as 1750. Toyoharu's work greatly influenced Japanese landscape painting, which evolved with the works of Hiroshige – an indirect student of Toyoharu through Toyohiro – and Hokusai. Hokusai became acquainted with Western perspective in the 1790s through Shiba Kōkan's investigations, from whose teaching he benefited. Between 1805 and 1810, Hokusai published the series Mirror of Dutch Pictures – Eight Views of Edo. The Great Wave off Kanagawa would not have been as successful in the West if audiences did not have a sense of familiarity with the work. It has been interpreted as a Western play seen through the eyes of a Japanese. According to Richard Lane: The "blue revolution" During the 1830s, Hokusai's prints underwent a "blue revolution", in which he made extensive use of the dark-blue pigment Prussian blue. He used this shade of blue for The Great Wave off Kanagawa with indigo, the delicate, quickly fading shade of blue that was commonly used in ukiyo-e works at the time. Prussian blue, also known in Japanese at the time as , was imported from Holland beginning in 1820, and was extensively used by Hiroshige and Hokusai after its arrival in Japan in large quantities in 1829. The first 10 prints in the series, including The Great Wave off Kanagawa, are among the first Japanese prints to feature Prussian blue, which was most likely suggested to the publisher in 1830. This innovation was an immediate success. In early January 1831, Hokusai's publisher Nishimuraya Yohachi (Eijudō) widely advertised the innovation, and the following year published the next 10 prints in the Thirty-six Views of Mount Fuji series, and unique for their predominantly-blue aizuri-e style, with Kōshū Kajikazawa ("Kajikazawa in Kai Province") being a notable example. In addition to the extensive use of Prussian blue, the outlines on these 10 supplementary prints, known collectively as ura Fuji ("Fuji seen from behind"), are sumi black with India ink. Prints in the world About 1,000 copies of The Great Wave off Kanagawa were initially printed, resulting in wear in later editions of print copies. It is estimated approximately 8,000 copies were eventually printed. The first signs of wear were in the pink and yellow of the sky, which fades more in worn copies, resulting in vanishing clouds, a more uniform sky, and broken lines around the box containing the title. Some of the surviving copies have been damaged by light, as woodblock prints of the Edo period used light sensitive colourants. , about 100 copies of The Great Wave off Kanagawa are known to survive; some of these copies are housed at Tokyo National Museum, the Japan Ukiyo-e Museum in Matsumoto, the British Museum in London, the Metropolitan Museum of Art in New York City, the Art Institute of Chicago, the Los Angeles County Museum of Art, the Sackler Gallery in Washington D.C., the Giverny Museum of Impressionisms in Giverny, the Musée Guimet and the Bibliothèque Nationale de France both in Paris, the Edoardo Chiossone Museum of Oriental Art in Genoa, the National Gallery of Victoria in Melbourne, the Civico Museo d'Arte Orientale in Trieste, the Museo d'arte orientale in Turin, and the Bavarian State Library in Munich. Some private collections such as the Gale Collection also have copies of The Great Wave off Kanagawa. Nineteenth-century private collectors were frequently the source of museum collections of Japanese prints; for example, the copy in the Metropolitan Museum came from Henry Osborne Havemeyer's former collection, which his wife donated to the museum in 1929. The copy in the Bibliothèque nationale de France came from the collection of Samuel Bing in 1888, and the copy in the Musée Guimet is a bequest from , who gave it to the museum in 1932. In 2023, one of the prints that had been held by a private family since the early 1900s and for a time was displayed at the Glyptotek, Copenhagen, was sold for a record price, 2.8 million dollars. Influence Western culture After the 1868 Meiji Restoration, Japan ended a long period of isolation and opened to imports from the West. In turn, much Japanese art was exported to Europe and America, and quickly gained popularity. The influence of Japanese art on Western culture became known as Japonisme. Japanese woodblock prints inspired Western artists in many genres, particularly the Impressionists. As the most famous Japanese print, The Great Wave off Kanagawa influenced great works: in painting, works by Claude Monet; in music, Claude Debussy's La Mer; and in literature, Rainer Maria Rilke's Der Berg. Claude Debussy, who loved the sea and painted images of the Far East, kept a copy of The Great Wave off Kanagawa in his studio. During his work on La Mer, he was inspired by the print and asked for the image to be used on the cover of the original 1905 score. Henri Rivière, a draughtsman, engraver, and watercolourist who was also an important figure behind the Paris entertainment venue Le Chat Noir, was one of the first artists to be heavily influenced by Hokusai's work, particularly The Great Wave off Kanagawa. In homage to Hokusai's work, Rivière published a series of lithographs titled The Thirty-Six Views of the Eiffel Tower in 1902. Rivière was a collector of Japanese prints who purchased works from Siegfried Bing, Tadamasa Hayashi and Florine Langweil. Vincent van Gogh, a great admirer of Hokusai, praised the quality of drawing and use of line in The Great Wave off Kanagawa, and wrote it had a "terrifying" emotional impact. French sculptor Camille Claudel's (1897) replaced the boats in Hokusai's The Great Wave off Kanagawa with three women dancing in a circle. In popular culture Wayne Crothers, the curator of a 2017 Hokusai exhibition at the National Gallery of Victoria, described The Great Wave off Kanagawa as "possibly the most reproduced image in the history of all art" while the Wall Street Journal'''s Ellen Gamerman wrote it "may be the most famous artwork in Japanese history". Hiroshige paid homage to The Great Wave off Kanagawa with his print The Sea off Satta in Suruga Province while French artist Gustave-Henri Jossot produced a satirical painting in the style of The Great Wave off Kanagawa to mock the popularity of Japonisme. Many modern artists have reinterpreted and adapted the image. Indigenous Australian artist Lin Onus used The Great Wave off Kanagawa as the basis for his 1992 painting Michael and I are just slipping down the pub for a minute. A work named Uprisings by Japanese-American artist Kozyndan is based on the print; the foam of the wave is replaced with rabbits. On computer operating systems designed by Apple Inc., the emoji character for a water wave strongly resembles the wave depicted in the print. In 2022, the Bank of Japan announced a redesign of Japan's banknotes to begin circulation in 2024. Among other redesigns and security enhancements, the engraving of Mt. Fuji on the obverse of the 1,000 yen banknote will be replaced by a reproduction of the Great Wave, including the portion of the print which depicts Mt. Fuji in the background. Media Special television programmes and documentaries about The Great Wave off Kanagawa have been produced; these include the 30-minute, French-language documentary La menace suspendue: La Vague (1995) and a 2004 English-language special programme part of the BBC series The Private Life of a Masterpiece. The Great Wave off Kanagawa is also the subject of the 93rd episode of the BBC radio series A History of the World in 100 Objects produced in collaboration with the British Museum, which was released on 4 September 2010. A replica of The Great Wave off Kanagawa was created for a documentary film about Hokusai released by the British Museum in 2017. Explanatory notes Citations General and cited sources External links The Metropolitan Museum of Art's (New York) entry on The Great Wave at Kanagawa "Hokusai's 'The Great Wave—Episode from the BBC show A History of the World in 100 Objects'' Study of original work opposed to various copies from different publishers The Great Wave (making the woodblock print)—Step-by-step video series on recreating the work by David Bull Replica of The Great Wave made by Suga Kayoko for a documentary film by the British Museum 1831 works Asian objects in the British Museum Marine art Water in art Works by Hokusai
```smalltalk using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xamarin.Forms; using Xamarin.Forms.Xaml; namespace DualScreen { [XamlCompilation(XamlCompilationOptions.Compile)] public partial class Details : Grid { public Details() { InitializeComponent(); } } } ```
Dorothy Akinyi Ooko is a Kenyan activist and technology professional. Born in Mater Hospital, Nairobi, She attended Fort Hall Road Primary School in her home city and then Pangani Girls High School for her "O" Level and completed her "A" Level at Alliance Girls' High School. After her "A" levels she went to Université de Haute Bretagne in France, where she studied Lettres Modernes before switching to English Language. She returned to Kenya and pursued her Bachelor of Education (French and English in Literature) from 1985 to 1988. She taught at Mukumu Girls' for a short stint and then received a scholarship to do a Masters in French from Kenya University. She also has a Masters in International Business Administration from United States International University (USIU). Ooko is the Communications Manager, East and Francophone Africa for Google based in Nairobi. Prior to that, she was working for Nokia in Nairobi as well. Achievements Ooko spearheaded the lobbying for the removal of Value Added Tax (VAT) on mobile phones in Kenya. As part of the Nokia East and Southern Africa team, she worked with the LG team, Safaricom and mobile handset distributors. References Year of birth missing (living people) Living people Kenyan Luo people 21st-century Kenyan businesswomen 21st-century Kenyan businesspeople People from Nairobi
```go /* */ package bbs12381g2pub import ( "errors" "fmt" ml "github.com/IBM/mathlib" ) // Signature defines BLS signature. type Signature struct { A *ml.G1 E *ml.Zr S *ml.Zr } // ParseSignature parses a Signature from bytes. func ParseSignature(sigBytes []byte) (*Signature, error) { if len(sigBytes) != bls12381SignatureLen { return nil, errors.New("invalid size of signature") } pointG1, err := curve.NewG1FromCompressed(sigBytes[:g1CompressedSize]) if err != nil { return nil, fmt.Errorf("deserialize G1 compressed signature: %w", err) } e := parseFr(sigBytes[g1CompressedSize : g1CompressedSize+frCompressedSize]) s := parseFr(sigBytes[g1CompressedSize+frCompressedSize:]) return &Signature{ A: pointG1, E: e, S: s, }, nil } // ToBytes converts signature to bytes using compression of G1 point and E, S FR points. func (s *Signature) ToBytes() ([]byte, error) { bytes := make([]byte, bls12381SignatureLen) copy(bytes, s.A.Compressed()) copy(bytes[g1CompressedSize:g1CompressedSize+frCompressedSize], s.E.Bytes()) copy(bytes[g1CompressedSize+frCompressedSize:], s.S.Bytes()) return bytes, nil } // Verify is used for signature verification. func (s *Signature) Verify(messages []*SignatureMessage, pubKey *PublicKeyWithGenerators) error { p1 := s.A q1 := curve.GenG2.Mul(frToRepr(s.E)) q1.Add(pubKey.w) p2 := computeB(s.S, messages, pubKey) p2.Neg() if compareTwoPairings(p1, q1, p2, curve.GenG2) { return nil } return errors.New("invalid BLS12-381 signature") } ```
Mornas - cantigas crioulas de Eugénio Tavares (Mornas - Creole Songs by Eugénio Tavares) is a Capeverdean collection of morna poems published by Eugénio Tavares. His poems were the greatest in the nation during most of the 20th century. The collection covers the morna poems that he done from 1890 to 1930. A publication was printed in Luanda, Angola in 1969, then a Portuguese colony. It was one of the first written books in Cape Verdean Creole. It was published by the Liga dos Amigos de Cabo Verde. Selected morna poems The book features many of the mornas that Eugénio Tavares had made: Bidjica Çancao ao Mar (Song of the Sea) Força di cretcheu Hino de Brava (Song/Hymn of Brava) Mal de amor Morna aguada Morna de desperdida Nha Santana "Morna aguada" One of the examples is "morna aguada": Se é pam vivê na es mal De ca tem Quem que q'rem, Ma'n q're morré sem luz Na nha cuz, Na es dor De dâ nha bida Na martirio de amor Depictions One of his morna poem named "morna aguada" was featured on the back of the Cape Verdean $2000 escudo note that also featured Eugénio Tavares. A flower native to Brava was shown on the bottom, it was issued between 1999 and 2014. Quote One quote from one of the mornas was "Si ka badu, ka ta biradu". The quote would be displayed on top of a stone statue named the "Monument to Emigrants" of Eugénio Tavares. It is erected in Praia's Achada Grande Tras on a circle intersecting Avenida Aristides Pereira, Praia Circular Road and the road to the airport west of Nelson Mandela International Airport. References External links Mornas at eugeniotavares.org Cape Verdean poems Cape Verdean literature
We Could Be Together is a career-spanning box set by American singer-songwriter Debbie Gibson. Named after Gibson's 1989 single of the same name, it was released on October 20, 2017 by Edsel Records, celebrating her 30th anniversary in the music industry. The 12" x 12" box set consists of eight of her studio albums appended with bonus tracks (excluding her 2003 cover album Colored Lights: The Broadway Album), a remix album, and a bonus album of rare tracks, plus three DVDs and a 32-page coffee table book. An Amazon exclusive release included a signed 12" x 12" frameable print and was limited to 750 copies. The box set was named "Best Reissue" on Pop Dose's Best of 2017: 10 Albums for the Buy Curious. Track listing All tracks are written by Deborah Gibson, except where indicated. DVD 1 - The Videos DVD 2 DVD 3 References External links 2017 compilation albums Debbie Gibson compilation albums
The 1958–59 season was the 79th season of competitive football by Rangers. Overview Rangers played a total of 43 competitive matches during the 1959–60 season. Results All results are written with Rangers' score first. Scottish First Division Scottish Cup League Cup Appearances See also 1958–59 in Scottish football 1958–59 Scottish Cup 1958–59 Scottish League Cup References Scottish football championship-winning seasons Rangers F.C. seasons Rangers
```javascript /** * @author Marton Csordas * See LICENSE file in root directory for full license. */ 'use strict' const path = require('path') const casing = require('../utils/casing') const utils = require('../utils') const RESERVED_NAMES_IN_VUE3 = new Set( require('../utils/vue3-builtin-components') ) module.exports = { meta: { type: 'suggestion', docs: { description: 'require component names to be always multi-word', categories: ['vue3-essential', 'vue2-essential'], url: 'path_to_url }, schema: [ { type: 'object', properties: { ignores: { type: 'array', items: { type: 'string' }, uniqueItems: true, additionalItems: false } }, additionalProperties: false } ], messages: { unexpected: 'Component name "{{value}}" should always be multi-word.' } }, /** @param {RuleContext} context */ create(context) { /** @type {Set<string>} */ const ignores = new Set() ignores.add('App') ignores.add('app') for (const ignore of (context.options[0] && context.options[0].ignores) || []) { ignores.add(ignore) if (casing.isPascalCase(ignore)) { // PascalCase ignores.add(casing.kebabCase(ignore)) } } let hasVue = utils.isScriptSetup(context) let hasName = false /** * Returns true if the given component name is valid, otherwise false. * @param {string} name * */ function isValidComponentName(name) { if (ignores.has(name) || RESERVED_NAMES_IN_VUE3.has(name)) { return true } const elements = casing.kebabCase(name).split('-') return elements.length > 1 } /** * @param {Expression | SpreadElement} nameNode */ function validateName(nameNode) { if (nameNode.type !== 'Literal') return const componentName = `${nameNode.value}` if (!isValidComponentName(componentName)) { context.report({ node: nameNode, messageId: 'unexpected', data: { value: componentName } }) } } return utils.compositingVisitors( utils.executeOnCallVueComponent(context, (node) => { hasVue = true if (node.arguments.length !== 2) return hasName = true validateName(node.arguments[0]) }), utils.executeOnVue(context, (obj) => { hasVue = true const node = utils.findProperty(obj, 'name') if (!node) return hasName = true validateName(node.value) }), utils.defineScriptSetupVisitor(context, { onDefineOptionsEnter(node) { if (node.arguments.length === 0) return const define = node.arguments[0] if (define.type !== 'ObjectExpression') return const nameNode = utils.findProperty(define, 'name') if (!nameNode) return hasName = true validateName(nameNode.value) } }), { /** @param {Program} node */ 'Program:exit'(node) { if (hasName) return if (!hasVue && node.body.length > 0) return const fileName = context.getFilename() const componentName = path.basename(fileName, path.extname(fileName)) if ( utils.isVueFile(fileName) && !isValidComponentName(componentName) ) { context.report({ messageId: 'unexpected', data: { value: componentName }, loc: { line: 1, column: 0 } }) } } } ) } } ```
```python # # # path_to_url # # Unless required by applicable law or agreed to in writing, software # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # ============================================================================== """SSDFeatureExtractor for Keras MobilenetV1 features.""" import tensorflow.compat.v1 as tf from object_detection.meta_architectures import ssd_meta_arch from object_detection.models import feature_map_generators from object_detection.models.keras_models import mobilenet_v1 from object_detection.utils import ops from object_detection.utils import shape_utils class SSDMobileNetV1KerasFeatureExtractor( ssd_meta_arch.SSDKerasFeatureExtractor): """SSD Feature Extractor using Keras MobilenetV1 features.""" def __init__(self, is_training, depth_multiplier, min_depth, pad_to_multiple, conv_hyperparams, freeze_batchnorm, inplace_batchnorm_update, use_explicit_padding=False, use_depthwise=False, num_layers=6, override_base_feature_extractor_hyperparams=False, name=None): """Keras MobileNetV1 Feature Extractor for SSD Models. Args: is_training: whether the network is in training mode. depth_multiplier: float depth multiplier for feature extractor. min_depth: minimum feature extractor depth. pad_to_multiple: the nearest multiple to zero pad the input height and width dimensions to. conv_hyperparams: A `hyperparams_builder.KerasLayerHyperparams` object containing convolution hyperparameters for the layers added on top of the base feature extractor. freeze_batchnorm: Whether to freeze batch norm parameters during training or not. When training with a small batch size (e.g. 1), it is desirable to freeze batch norm update and use pretrained batch norm params. inplace_batchnorm_update: Whether to update batch norm moving average values inplace. When this is false train op must add a control dependency on tf.graphkeys.UPDATE_OPS collection in order to update batch norm statistics. use_explicit_padding: Use 'VALID' padding for convolutions, but prepad inputs so that the output dimensions are the same as if 'SAME' padding were used. use_depthwise: Whether to use depthwise convolutions. Default is False. num_layers: Number of SSD layers. override_base_feature_extractor_hyperparams: Whether to override hyperparameters of the base feature extractor with the one from `conv_hyperparams`. name: A string name scope to assign to the model. If 'None', Keras will auto-generate one from the class name. """ super(SSDMobileNetV1KerasFeatureExtractor, self).__init__( is_training=is_training, depth_multiplier=depth_multiplier, min_depth=min_depth, pad_to_multiple=pad_to_multiple, conv_hyperparams=conv_hyperparams, freeze_batchnorm=freeze_batchnorm, inplace_batchnorm_update=inplace_batchnorm_update, use_explicit_padding=use_explicit_padding, use_depthwise=use_depthwise, num_layers=num_layers, override_base_feature_extractor_hyperparams= override_base_feature_extractor_hyperparams, name=name) self._feature_map_layout = { 'from_layer': ['Conv2d_11_pointwise', 'Conv2d_13_pointwise', '', '', '', ''][:self._num_layers], 'layer_depth': [-1, -1, 512, 256, 256, 128][:self._num_layers], 'use_explicit_padding': self._use_explicit_padding, 'use_depthwise': self._use_depthwise, } self.classification_backbone = None self._feature_map_generator = None def build(self, input_shape): full_mobilenet_v1 = mobilenet_v1.mobilenet_v1( batchnorm_training=(self._is_training and not self._freeze_batchnorm), conv_hyperparams=(self._conv_hyperparams if self._override_base_feature_extractor_hyperparams else None), weights=None, use_explicit_padding=self._use_explicit_padding, alpha=self._depth_multiplier, min_depth=self._min_depth, include_top=False) conv2d_11_pointwise = full_mobilenet_v1.get_layer( name='conv_pw_11_relu').output conv2d_13_pointwise = full_mobilenet_v1.get_layer( name='conv_pw_13_relu').output self.classification_backbone = tf.keras.Model( inputs=full_mobilenet_v1.inputs, outputs=[conv2d_11_pointwise, conv2d_13_pointwise]) self._feature_map_generator = ( feature_map_generators.KerasMultiResolutionFeatureMaps( feature_map_layout=self._feature_map_layout, depth_multiplier=self._depth_multiplier, min_depth=self._min_depth, insert_1x1_conv=True, is_training=self._is_training, conv_hyperparams=self._conv_hyperparams, freeze_batchnorm=self._freeze_batchnorm, name='FeatureMaps')) self.built = True def preprocess(self, resized_inputs): """SSD preprocessing. Maps pixel values to the range [-1, 1]. Args: resized_inputs: a [batch, height, width, channels] float tensor representing a batch of images. Returns: preprocessed_inputs: a [batch, height, width, channels] float tensor representing a batch of images. """ return (2.0 / 255.0) * resized_inputs - 1.0 def _extract_features(self, preprocessed_inputs): """Extract features from preprocessed inputs. Args: preprocessed_inputs: a [batch, height, width, channels] float tensor representing a batch of images. Returns: feature_maps: a list of tensors where the ith tensor has shape [batch, height_i, width_i, depth_i] """ preprocessed_inputs = shape_utils.check_min_image_dim( 33, preprocessed_inputs) image_features = self.classification_backbone( ops.pad_to_multiple(preprocessed_inputs, self._pad_to_multiple)) feature_maps = self._feature_map_generator({ 'Conv2d_11_pointwise': image_features[0], 'Conv2d_13_pointwise': image_features[1]}) return list(feature_maps.values()) ```
Sheryl Crow is the second studio album by American singer and songwriter Sheryl Crow, released on September 24, 1996, by A&M Records. Unlike its predecessor Tuesday Night Music Club, which was written by a casual collective formed by Crow and several other musicians, Sheryl Crow was entirely produced by Crow, who wrote most of the songs alone or with only one collaborator. Most of the album was recorded at Kingsway Studios in New Orleans, Louisiana. The album covers topics of American life, relationship breakups, and moral and ethical issues, while encompassing a variety of music genres such as rock, blues, alternative rock, country, and folk. Sheryl Crow was a commercial success, being certified triple platinum by both the RIAA and the BPI. It reached number six on the Billboard 200 and produced five singles, including the international hit "If It Makes You Happy". The album received very positive reviews from critics, who praised its intricate production and Crow's louder and more assured singing. At the 39th Annual Grammy Awards, the album was awarded Best Rock Album and Crow received the Best Female Rock Vocal Performance award for "If It Makes You Happy". Retrospectively, it is often regarded as Crow's best album. Background and recording Sheryl Crow is the follow-up to Sheryl Crow's 1993 album Tuesday Night Music Club, which was written by a group of musicians known as the "Tuesday Music Club". The group existed as a casual collective formed by Crow and musicians Bill Bottrell, David Baerwald, Kevin Gilbert, Brian MacLeod, David Ricketts, and Dan Schwartz. The album was a commercial success and produced several hit singles, including "All I Wanna Do", "Strong Enough", and "Leaving Las Vegas". It was certified 7× Platinum in the United States and 2× Platinum in the United Kingdom. Crow was also awarded Best New Artist, Best Female Pop Vocal Performance, and Record of the Year at the 37th Annual Grammy Awards. Tensions between Crow and other members of the group began to arise following Crow's performance of "Leaving Las Vegas" on the Late Show with David Letterman in March 1994. Crow offhandedly agreed with the host when she was asked if the track was autobiographical, even though it was primarily written by Baerwald and based on the book of the same name by his friend John O'Brien. As a result, several members of the Tuesday Music Club group felt betrayed, and O'Brien himself committed suicide three weeks later. Nevertheless, O'Brien's parents insisted that Crow had nothing to do with the tragedy, noting that he "was just mad about it [...] But the problems that drove him toward the end were – you know, that's a long, long bloody trip." After Tuesday Night Music Club, Crow wanted to prove her authority as a musician. According to her, "My only objective on this record was to get under people's skin, because I was feeling like I had so much shit to hurl at the tape." Work on the new album began at Toad Hall in Pasadena, California, the same studio where Tuesday Night Music Club was recorded, but sessions were then relocated to New Orleans, Louisiana because Crow "was feeling ghosts in that room". Bottrell was designated to produce the record and co-wrote three songs that would appear on the album, but eventually left because he could not sort out his differences with Crow. As a result, Crow took over production duties and wrote most of the songs alone or with only one collaborator. She also played most of the instruments on the album, including bass and guitar work and nearly all the keyboard parts. Most of the album was recorded at Kingsway Studios in New Orleans, although Crow would later return to Los Angeles to complete work at The Sound Factory and Sunset Sound. Audio mastering took place at Gateway Mastering Studios in Portland, Maine. Music and lyrics Musically, Sheryl Crow was described as a combination of rock, blues, alternative rock, country, folk, and light hip hop loops. Unlike its predecessor, it also features a more off-balance production and a richer instrumentation, with "lots of fuzz, wurlitzer, hammond, moog. Nothing extreme, perhaps, but almost psychedelic when joined to big mainstream melodies", one critic explained. The album covers topics of American life, relationship breakups, and moral and ethical issues, among others. For example, "Home" is a folk ballad where Crow recounts the emotional difficulties of a deteriorating relationship, while "Superstar" deals with a woman fantasizing about stardom. The song "A Change Would Do You Good", which features hand claps and organ licks, is about the need to escape a constricted life. The opening track, "Maybe Angels", was described as "a cryptic ode to UFOs and government conspiracies that plays like an X-Files theme song." Crow explained that the song is "an extraterrestrial yarn that finds Kurt Cobain joining John Lennon in heaven's winged choir". The track "Redemption Day" is a protest against the US indifference to the Bosnian War. It was inspired when Crow visited the country as part of a USO trip with Hillary and Chelsea Clinton. The song was later covered by Johnny Cash, appearing on his 2010 posthumous record American VI: Ain't No Grave. The track "Hard to Make a Stand" references abortion, while "Love Is a Good Thing" criticizes Walmart's gun sales policy with the lyrics "Watch out sister/Watch out brother/Watch our children as they kill each other/with a gun they bought at the Wal-Mart discount stores." The song caused some controversy, resulting in Walmart banning sales of the album at their stores. The album's lead single, "If It Makes You Happy", underwent several different arrangements before being turned into a rock song. According to musician Jeff Trott, who co-wrote the song along with Crow, "It started off as a twangy, David Lynch-esque sort of thing. Then [...] we played it like punk rock, really fast, as well as country and funky. You know, you get a song and put clothes on it to see what looks good and what doesn't, and usually when you find the right one it's pretty obvious. With that song it was real obvious!" Trott initially wrote the song when he was a member of Pete Droge's backing band, but Crow added a second verse and strengthened the melody. Sheryl Crow also has contributions by notable musicians. For example, "Sweet Rosalyn" features saxophone by Steve Berlin of Los Lobos, while "Everyday Is a Winding Road" features harmony vocals by Neil Finn of Crowded House. Release Sheryl Crow was released on CD and cassette formats on September 24, 1996. The album reached number six on the US Billboard 200 chart and sold 143,000 copies in the first two weeks of release. As of January 2008, the album had sold 2,400,000 units in the US according to Nielsen SoundScan, and has been certified three-times platinum by the RIAA. In the United Kingdom, Sheryl Crow reached number five on the UK Albums Chart and was certified three-times platinum by the BPI, signifying sales of over 900,000 units. Unlike the American edition, the British edition of the album contains the bonus track "Free Man". Sheryl Crow also reached the top ten in Austria, Belgium, New Zealand, Sweden and Switzerland. In Europe, it was certified platinum by the IFPI. A special edition of the album, entitled Sheryl Crow – Signature Tour Edition, was released in Australia and Japan in 1997. It contains the bonus tracks "Sad Sad World" and an alternate version of "Hard to Make a Stand" as well as a bonus CD with six songs recorded live at Shepherd's Bush Empire in London on November 26, 1996. This 2-CD set was also released as Sheryl Crow – Special Edition in the United Kingdom in 1997. The song "If It Makes You Happy" was released as the lead single on September 3, 1996, and became an international hit, peaking at number 10 on the Billboard Hot 100 chart and selling 82,000 units in the first two weeks of release. It was also a success in the United Kingdom, where it reached number nine on the UK Singles Chart. Other countries where the single charted include Australia, Canada, France, New Zealand and Switzerland. A music video was made for the song under the direction of Keir McFarlane. "Everyday Is a Winding Road" was released on November 18, 1996, as the album's second single. The song was also a success, reaching number 11 on the Billboard Hot 100 and number 12 on the UK Singles Chart. The tracks "Hard to Make a Stand", "A Change Would Do You Good", and "Home" were released as the album's last three singles. "A Change Would Do You Good" was a modest success, peaking at number 16 on the Mainstream Top 40 and number eight on the UK Singles Chart. Critical reception Upon release, Sheryl Crow received very positive reviews from music critics. Eric Weisbard of Spin praised the album's production, stating that the record "goes much further" than its predecessor and that its "bigger beats and dirtier guitar/keyboard effects [work] well with Crow's literate hippie-chick persona". David Browne of Entertainment Weekly stated similar pros, commenting: "If there's such a thing as a professional lo-fi album, Sheryl Crow is it." He also noted Crow's louder and more assured singing, concluding that she "doesn't expose that much of herself [...] she's an emotional centrist. But at the very least, she's building a bridge to a lasting career". Writing for The Baltimore Sun, J. D. Considine praised Crow's vocals, especially on "If It Makes You Happy", which he felt was probably the album's best song. Despite the praise, the last third of the album was considered the weakest part and the song "Ordinary Morning" was considered a poor choice for a closer. Rolling Stone editor David Fricke also criticized the album for being underdeveloped and lacking originality, and unfavorably compared the song "Hard to Make a Stand" to "Tumbling Dice" by the Rolling Stones and "Sweet Jane" by the Velvet Underground. The Village Voices Robert Christgau gave the album a one-star honorable mention grade and quipped that it was indebted to "not just Alanis but Tchad". In February 1997, Sheryl Crow was ranked at number 26 in The Village Voices 1996 Pazz & Jop critics' poll. At the 39th Annual Grammy Awards, the album was awarded Best Rock Album and Crow received the Best Female Rock Vocal Performance award for the song "If It Makes You Happy". Retrospectively, AllMusic critic Stephen Thomas Erlewine referred to the album as "a postmodern masterpiece of sorts – albeit a mainstream, post-alternative, postmodern masterpiece. It may not be as hip or innovative as, say, the Beastie Boys' Paul's Boutique, but it is as self-referential, pop culture obsessed, and musically eclectic." Sal Cinquemani of Slant Magazine highlighted the album's "quirky, stream-of-conscious lyrics" and elaborate sound collages, stating that "none of [Crow's] other full-length albums have been as consistent, immaculately produced or distinctly modern." In 1999, Rolling Stone selected Sheryl Crow as one of the essential albums of the decade. In 2002, the magazine also ranked it at number 44 in its list of Women in Rock: The 50 Essential Albums. In 2003, the album was featured in the Vital Pop: 50 Essential Pop Albums list by Slant Magazine. In 2008, Entertainment Weekly magazine placed the album at number 39 in their list of Top 100 Best Albums of the past 25 years. In 2020, Rolling Stone ranked Sheryl Crow at number 475 in its list of The 500 Greatest Albums of All Time. Track listing Personnel Credits are adapted from AllMusic. Sheryl Crow – lead vocals, background vocals, bass guitar, acoustic guitar, electric guitar, harmonium, keyboards, Moog bass, Hammond organ, piano, Wurlitzer, pennyosley, loops, producer Jeri Heiden – art direction, design Steve Berlin – saxophone Ron Black – assistant engineer Tchad Blake – engineer, mixing R.S. Bryan – wah wah guitar Steve Donnelly – dobro, electric guitar Dave Douglas – horn Davey Faragher – fuzz bass Neil Finn – background vocals Curtis Fowlkes – horn Mitchell Froom – assistant producer, harmonium, horn arrangements, keyboards, string arrangements S. "Husky" Höskulds – assistant engineer Wally Ingram – drums, djembe Cappy Japngie – assistant engineer Jim Keltner – drums Blair Lamb – engineer Bob Ludwig – mastering Brian MacLeod – drums, loops James Minchin – photography John Paterno – assistant engineer Stephanie Pfriender – photography Josh Roseman – horn Dan Rothchild – bass guitar Anders Rundblad – bass guitar, acoustic guitar Bob Salcedo – engineer Jane Scarpantoni – strings Trina Shoemaker – engineer Bob Stewart – horn Steen Sundland – photography Pete Thomas – drums Jeff Trott – acoustic guitar, electric guitar, background vocals, loop Michael Urbano – drums, snare drums, loop Tad Wadhams – bass guitar Karen Walker – art direction, design Stephen Weintraub – executive producer Pam Werheimer – coordination Todd Wolfe – dobro, electric guitar Charts and certifications Weekly charts Year-end charts Certifications References External links 1996 albums A&M Records albums Grammy Award for Best Rock Album Sheryl Crow albums
Derric van Rensburg (born 1952 in Cape Town, South Africa) is an internationally known impressionist painter. Career Since his first exhibition in Cape Town in 1976 van Rensburg has been commissioned by various clients including multinational corporate clients such as First National Bank, South African Airways, Price Waterhouse Coopers and Mobil. His work is internationally recognised and he has been rated as one of South Africa's top artists. British artist JJ Adams worked in van Rensburg's studio following his family's emigration to South Africa from the UK and cites him as one of his greatest influences. van Rensburg's career was celebrated in a coffee table book published in 2007 to coincide with the artist's 55th birthday. References External links Official website Impressionist painters Living people 1952 births South African contemporary artists White South African people Artists from Cape Town
Gustavo Warburg (born 7 August 1964) is an Argentine sailor. He competed in the men's 470 event at the 1992 Summer Olympics. References External links 1964 births Living people Argentine male sailors (sport) Olympic sailors for Argentina Sailors at the 1992 Summer Olympics – 470 Place of birth missing (living people)
Power electronics is the application of electronics to the control and conversion of electric power. The first high-power electronic devices were made using mercury-arc valves. In modern systems, the conversion is performed with semiconductor switching devices such as diodes, thyristors, and power transistors such as the power MOSFET and IGBT. In contrast to electronic systems concerned with the transmission and processing of signals and data, substantial amounts of electrical energy are processed in power electronics. An AC/DC converter (rectifier) is the most typical power electronics device found in many consumer electronic devices, e.g. television sets, personal computers, battery chargers, etc. The power range is typically from tens of watts to several hundred watts. In industry, a common application is the variable speed drive (VSD) that is used to control an induction motor. The power range of VSDs starts from a few hundred watts and ends at tens of megawatts. The power conversion systems can be classified according to the type of the input and output power: AC to DC (rectifier) DC to AC (inverter) DC to DC (DC-to-DC converter) AC to AC (AC-to-AC converter) History Power electronics started with the development of the mercury arc rectifier. Invented by Peter Cooper Hewitt in 1902, it was used to convert alternating current (AC) into direct current (DC). From the 1920s on, research continued on applying thyratrons and grid-controlled mercury arc valves to power transmission. Uno Lamm developed a mercury valve with grading electrodes making them suitable for high voltage direct current power transmission. In 1933 selenium rectifiers were invented. Julius Edgar Lilienfeld proposed the concept of a field-effect transistor in 1926, but it was not possible to actually construct a working device at that time. In 1947, the bipolar point-contact transistor was invented by Walter H. Brattain and John Bardeen under the direction of William Shockley at Bell Labs. In 1948 Shockley's invention of the bipolar junction transistor (BJT) improved the stability and performance of transistors, and reduced costs. By the 1950s, higher power semiconductor diodes became available and started replacing vacuum tubes. In 1956, the silicon controlled rectifier (SCR) was introduced by General Electric, greatly increasing the range of power electronics applications. By the 1960s, the improved switching speed of bipolar junction transistors had allowed for high frequency DC/DC converters. R. D. Middlebrook made important contributions to power electronics. In 1970, he founded the Power Electronics Group at Caltech. He developed the state-space averaging method of analysis and other tools crucial to modern power electronics design. Power MOSFET A breakthrough in power electronics came with the invention of the MOSFET (metal–oxide–semiconductor field-effect transistor) by Mohamed Atalla and Dawon Kahng at Bell Labs in 1959. Generations of MOSFET transistors enabled power designers to achieve performance and density levels not possible with bipolar transistors. Due to improvements in MOSFET technology (initially used to produce integrated circuits), the power MOSFET became available in the 1970s. In 1969, Hitachi introduced the first vertical power MOSFET, which would later be known as the VMOS (V-groove MOSFET). From 1974, Yamaha, JVC, Pioneer Corporation, Sony and Toshiba began manufacturing audio amplifiers with power MOSFETs. International Rectifier introduced a 25 A, 400 V power MOSFET in 1978. This device allows operation at higher frequencies than a bipolar transistor, but is limited to low voltage applications. The power MOSFET is the most common power device in the world, due to its low gate drive power, fast switching speed, easy advanced paralleling capability, wide bandwidth, ruggedness, easy drive, simple biasing, ease of application, and ease of repair. It has a wide range of power electronic applications, such as portable information appliances, power integrated circuits, cell phones, notebook computers, and the communications infrastructure that enables the Internet. In 1982, the insulated-gate bipolar transistor (IGBT) was introduced. It became widely available in the 1990s. This component has the power handling capability of the bipolar transistor and the advantages of the isolated gate drive of the power MOSFET. Devices The capabilities and economy of power electronics system are determined by the active devices that are available. Their characteristics and limitations are a key element in the design of power electronics systems. Formerly, the mercury arc valve, the high-vacuum and gas-filled diode thermionic rectifiers, and triggered devices such as the thyratron and ignitron were widely used in power electronics. As the ratings of solid-state devices improved in both voltage and current-handling capacity, vacuum devices have been nearly entirely replaced by solid-state devices. Power electronic devices may be used as switches, or as amplifiers. An ideal switch is either open or closed and so dissipates no power; it withstands an applied voltage and passes no current or passes any amount of current with no voltage drop. Semiconductor devices used as switches can approximate this ideal property and so most power electronic applications rely on switching devices on and off, which makes systems very efficient as very little power is wasted in the switch. By contrast, in the case of the amplifier, the current through the device varies continuously according to a controlled input. The voltage and current at the device terminals follow a load line, and the power dissipation inside the device is large compared with the power delivered to the load. Several attributes dictate how devices are used. Devices such as diodes conduct when a forward voltage is applied and have no external control of the start of conduction. Power devices such as silicon controlled rectifiers and thyristors (as well as the mercury valve and thyratron) allow control of the start of conduction but rely on periodic reversal of current flow to turn them off. Devices such as gate turn-off thyristors, BJT and MOSFET transistors provide full switching control and can be turned on or off without regard to the current flow through them. Transistor devices also allow proportional amplification, but this is rarely used for systems rated more than a few hundred watts. The control input characteristics of a device also significantly affect design; sometimes, the control input is at a very high voltage with respect to ground and must be driven by an isolated source. As efficiency is at a premium in a power electronic converter, the losses generated by a power electronic device should be as low as possible. Devices vary in switching speed. Some diodes and thyristors are suited for relatively slow speed and are useful for power frequency switching and control; certain thyristors are useful at a few kilohertz. Devices such as MOSFETS and BJTs can switch at tens of kilohertz up to a few megahertz in power applications, but with decreasing power levels. Vacuum tube devices dominate high power (hundreds of kilowatts) at very high frequency (hundreds or thousands of megahertz) applications. Faster switching devices minimize energy lost in the transitions from on to off and back but may create problems with radiated electromagnetic interference. Gate drive (or equivalent) circuits must be designed to supply sufficient drive current to achieve the full switching speed possible with a device. A device without sufficient drive to switch rapidly may be destroyed by excess heating. Practical devices have a non-zero voltage drop and dissipate power when on, and take some time to pass through an active region until they reach the "on" or "off" state. These losses are a significant part of the total lost power in a converter. Power handling and dissipation of devices is also critical factor in design. Power electronic devices may have to dissipate tens or hundreds of watts of waste heat, even switching as efficiently as possible between conducting and non-conducting states. In the switching mode, the power controlled is much larger than the power dissipated in the switch. The forward voltage drop in the conducting state translates into heat that must be dissipated. High power semiconductors require specialized heat sinks or active cooling systems to manage their junction temperature; exotic semiconductors such as silicon carbide have an advantage over straight silicon in this respect, and germanium, once the main-stay of solid-state electronics is now little used due to its unfavorable high-temperature properties. Semiconductor devices exist with ratings up to a few kilovolts in a single device. Where very high voltage must be controlled, multiple devices must be used in series, with networks to equalize voltage across all devices. Again, switching speed is a critical factor since the slowest-switching device will have to withstand a disproportionate share of the overall voltage. Mercury valves were once available with ratings to 100 kV in a single unit, simplifying their application in HVDC systems. The current rating of a semiconductor device is limited by the heat generated within the dies and the heat developed in the resistance of the interconnecting leads. Semiconductor devices must be designed so that current is evenly distributed within the device across its internal junctions (or channels); once a "hot spot" develops, breakdown effects can rapidly destroy the device. Certain SCRs are available with current ratings to 3000 amperes in a single unit. DC/AC converters (inverters) DC to AC converters produce an AC output waveform from a DC source. Applications include adjustable speed drives (ASD), uninterruptible power supplies (UPS), Flexible AC transmission systems (FACTS), voltage compensators, and photovoltaic inverters. Topologies for these converters can be separated into two distinct categories: voltage source inverters and current source inverters. Voltage source inverters (VSIs) are named so because the independently controlled output is a voltage waveform. Similarly, current source inverters (CSIs) are distinct in that the controlled AC output is a current waveform. DC to AC power conversion is the result of power switching devices, which are commonly fully controllable semiconductor power switches. The output waveforms are therefore made up of discrete values, producing fast transitions rather than smooth ones. For some applications, even a rough approximation of the sinusoidal waveform of AC power is adequate. Where a near sinusoidal waveform is required, the switching devices are operated much faster than the desired output frequency, and the time they spend in either state is controlled so the averaged output is nearly sinusoidal. Common modulation techniques include the carrier-based technique, or Pulse-width modulation, space-vector technique, and the selective-harmonic technique. Voltage source inverters have practical uses in both single-phase and three-phase applications. Single-phase VSIs utilize half-bridge and full-bridge configurations, and are widely used for power supplies, single-phase UPSs, and elaborate high-power topologies when used in multicell configurations. Three-phase VSIs are used in applications that require sinusoidal voltage waveforms, such as ASDs, UPSs, and some types of FACTS devices such as the STATCOM. They are also used in applications where arbitrary voltages are required, as in the case of active power filters and voltage compensators. Current source inverters are used to produce an AC output current from a DC current supply. This type of inverter is practical for three-phase applications in which high-quality voltage waveforms are required. A relatively new class of inverters, called multilevel inverters, has gained widespread interest. The normal operation of CSIs and VSIs can be classified as two-level inverters, due to the fact that power switches connect to either the positive or to the negative DC bus. If more than two voltage levels were available to the inverter output terminals, the AC output could better approximate a sine wave. It is for this reason that multilevel inverters, although more complex and costly, offer higher performance. Each inverter type differs in the DC links used, and in whether or not they require freewheeling diodes. Either can be made to operate in square-wave or pulse-width modulation (PWM) mode, depending on its intended usage. Square-wave mode offers simplicity, while PWM can be implemented in several different ways and produces higher quality waveforms. Voltage Source Inverters (VSI) feed the output inverter section from an approximately constant-voltage source. The desired quality of the current output waveform determines which modulation technique needs to be selected for a given application. The output of a VSI is composed of discrete values. In order to obtain a smooth current waveform, the loads need to be inductive at the select harmonic frequencies. Without some sort of inductive filtering between the source and load, a capacitive load will cause the load to receive a choppy current waveform, with large and frequent current spikes. There are three main types of VSIs: Single-phase half-bridge inverter Single-phase full-bridge inverter Three-phase voltage source inverter Single-phase half-bridge inverter The single-phase voltage source half-bridge inverters are meant for lower voltage applications and are commonly used in power supplies. Figure 9 shows the circuit schematic of this inverter. Low-order current harmonics get injected back to the source voltage by the operation of the inverter. This means that two large capacitors are needed for filtering purposes in this design. As Figure 9 illustrates, only one switch can be on at a time in each leg of the inverter. If both switches in a leg were on at the same time, the DC source would be shorted out. Inverters can use several modulation techniques to control their switching schemes. The carrier-based PWM technique compares the AC output waveform, vc, to a carrier voltage signal, vΔ. When vc is greater than vΔ, S+ is on, and when vc is less than vΔ, S- is on. When the AC output is at frequency fc with its amplitude at vc, and the triangular carrier signal is at frequency fΔ with its amplitude at vΔ, the PWM becomes a special sinusoidal case of the carrier based PWM. This case is dubbed sinusoidal pulse-width modulation (SPWM).For this, the modulation index, or amplitude-modulation ratio, is defined as . The normalized carrier frequency, or frequency-modulation ratio, is calculated using the equation . If the over-modulation region, ma, exceeds one, a higher fundamental AC output voltage will be observed, but at the cost of saturation. For SPWM, the harmonics of the output waveform are at well-defined frequencies and amplitudes. This simplifies the design of the filtering components needed for the low-order current harmonic injection from the operation of the inverter. The maximum output amplitude in this mode of operation is half of the source voltage. If the maximum output amplitude, ma, exceeds 3.24, the output waveform of the inverter becomes a square wave. As was true for Pulse-Width Modulation (PWM), both switches in a leg for square wave modulation cannot be turned on at the same time, as this would cause a short across the voltage source. The switching scheme requires that both S+ and S- be on for a half cycle of the AC output period. The fundamental AC output amplitude is equal to . Its harmonics have an amplitude of . Therefore, the AC output voltage is not controlled by the inverter, but rather by the magnitude of the DC input voltage of the inverter. Using selective harmonic elimination (SHE) as a modulation technique allows the switching of the inverter to selectively eliminate intrinsic harmonics. The fundamental component of the AC output voltage can also be adjusted within a desirable range. Since the AC output voltage obtained from this modulation technique has odd half and odd quarter-wave symmetry, even harmonics do not exist. Any undesirable odd (N-1) intrinsic harmonics from the output waveform can be eliminated. Single-phase full-bridge inverter The full-bridge inverter is similar to the half bridge-inverter, but it has an additional leg to connect the neutral point to the load. Figure 3 shows the circuit schematic of the single-phase voltage source full-bridge inverter. To avoid shorting out the voltage source, S1+, and S1- cannot be on at the same time, and S2+ and S2- also cannot be on at the same time. Any modulating technique used for the full-bridge configuration should have either the top or the bottom switch of each leg on at any given time. Due to the extra leg, the maximum amplitude of the output waveform is Vi, and is twice as large as the maximum achievable output amplitude for the half-bridge configuration. States 1 and 2 from Table 2 are used to generate the AC output voltage with bipolar SPWM. The AC output voltage can take on only two values, either Vi or –Vi. To generate these same states using a half-bridge configuration, a carrier based technique can be used. S+ being on for the half-bridge corresponds to S1+ and S2- being on for the full-bridge. Similarly, S- being on for the half-bridge corresponds to S1- and S2+ being on for the full bridge. The output voltage for this modulation technique is more or less sinusoidal, with a fundamental component that has an amplitude in the linear region of less than or equal to one . Unlike the bipolar PWM technique, the unipolar approach uses states 1, 2, 3, and 4 from Table 2 to generate its AC output voltage. Therefore, the AC output voltage can take on the values Vi, 0 or –V [1]i. To generate these states, two sinusoidal modulating signals, Vc and –Vc, are needed, as seen in Figure 4. Vc is used to generate VaN, while –Vc is used to generate VbN. The following relationship is called unipolar carrier-based SPWM . The phase voltages VaN and VbN are identical, but 180 degrees out of phase with each other. The output voltage is equal to the difference of the two-phase voltages, and do not contain any even harmonics. Therefore, if mf is taken, even the AC output voltage harmonics will appear at normalized odd frequencies, fh. These frequencies are centered on double the value of the normalized carrier frequency. This particular feature allows for smaller filtering components when trying to obtain a higher quality output waveform. As was the case for the half-bridge SHE, the AC output voltage contains no even harmonics due to its odd half and odd quarter-wave symmetry. Three-phase voltage source inverter Single-phase VSIs are used primarily for low power range applications, while three-phase VSIs cover both medium and high power range applications. Figure 5 shows the circuit schematic for a three-phase VSI. Switches in any of the three legs of the inverter cannot be switched off simultaneously due to this resulting in the voltages being dependent on the respective line current's polarity. States 7 and 8 produce zero AC line voltages, which result in AC line currents freewheeling through either the upper or the lower components. However, the line voltages for states 1 through 6 produce an AC line voltage consisting of the discrete values of Vi, 0 or –Vi. For three-phase SPWM, three modulating signals that are 120 degrees out of phase with one another are used in order to produce out-of-phase load voltages. In order to preserve the PWM features with a single carrier signal, the normalized carrier frequency, mf, needs to be a multiple of three. This keeps the magnitude of the phase voltages identical, but out of phase with each other by 120 degrees. The maximum achievable phase voltage amplitude in the linear region, ma less than or equal to one, is . The maximum achievable line voltage amplitude is The only way to control the load voltage is by changing the input DC voltage. Current source inverters Current source inverters convert DC current into an AC current waveform. In applications requiring sinusoidal AC waveforms, magnitude, frequency, and phase should all be controlled. CSIs have high changes in current over time, so capacitors are commonly employed on the AC side, while inductors are commonly employed on the DC side. Due to the absence of freewheeling diodes, the power circuit is reduced in size and weight, and tends to be more reliable than VSIs. Although single-phase topologies are possible, three-phase CSIs are more practical. In its most generalized form, a three-phase CSI employs the same conduction sequence as a six-pulse rectifier. At any time, only one common-cathode switch and one common-anode switch are on. As a result, line currents take discrete values of –ii, 0 and ii. States are chosen such that a desired waveform is output and only valid states are used. This selection is based on modulating techniques, which include carrier-based PWM, selective harmonic elimination, and space-vector techniques. Carrier-based techniques used for VSIs can also be implemented for CSIs, resulting in CSI line currents that behave in the same way as VSI line voltages. The digital circuit utilized for modulating signals contains a switching pulse generator, a shorting pulse generator, a shorting pulse distributor, and a switching and shorting pulse combiner. A gating signal is produced based on a carrier current and three modulating signals. A shorting pulse is added to this signal when no top switches and no bottom switches are gated, causing the RMS currents to be equal in all legs. The same methods are utilized for each phase, however, switching variables are 120 degrees out of phase relative to one another, and the current pulses are shifted by a half-cycle with respect to output currents. If a triangular carrier is used with sinusoidal modulating signals, the CSI is said to be utilizing synchronized-pulse-width-modulation (SPWM). If full over-modulation is used in conjunction with SPWM the inverter is said to be in square-wave operation. The second CSI modulation category, SHE is also similar to its VSI counterpart. Utilizing the gating signals developed for a VSI and a set of synchronizing sinusoidal current signals, results in symmetrically distributed shorting pulses and, therefore, symmetrical gating patterns. This allows any arbitrary number of harmonics to be eliminated. It also allows control of the fundamental line current through the proper selection of primary switching angles. Optimal switching patterns must have quarter-wave and half-wave symmetry, as well as symmetry about 30 degrees and 150 degrees. Switching patterns are never allowed between 60 degrees and 120 degrees. The current ripple can be further reduced with the use of larger output capacitors, or by increasing the number of switching pulses. The third category, space-vector-based modulation, generates PWM load line currents that equal load line currents, on average. Valid switching states and time selections are made digitally based on space vector transformation. Modulating signals are represented as a complex vector using a transformation equation. For balanced three-phase sinusoidal signals, this vector becomes a fixed module, which rotates at a frequency, ω. These space vectors are then used to approximate the modulating signal. If the signal is between arbitrary vectors, the vectors are combined with the zero vectors I7, I8, or I9. The following equations are used to ensure that the generated currents and the current vectors are on the average equivalent. Multilevel inverters A relatively new class called multilevel inverters has gained widespread interest. Normal operation of CSIs and VSIs can be classified as two-level inverters because the power switches connect to either the positive or the negative DC bus. If more than two voltage levels were available to the inverter output terminals, the AC output could better approximate a sine wave. For this reason multilevel inverters, although more complex and costly, offer higher performance. A three-level neutral-clamped inverter is shown in Figure 10. Control methods for a three-level inverter only allow two switches of the four switches in each leg to simultaneously change conduction states. This allows smooth commutation and avoids shoot through by only selecting valid states. It may also be noted that since the DC bus voltage is shared by at least two power valves, their voltage ratings can be less than a two-level counterpart. Carrier-based and space-vector modulation techniques are used for multilevel topologies. The methods for these techniques follow those of classic inverters, but with added complexity. Space-vector modulation offers a greater number of fixed voltage vectors to be used in approximating the modulation signal, and therefore allows more effective space vector PWM strategies to be accomplished at the cost of more elaborate algorithms. Due to added complexity and the number of semiconductor devices, multilevel inverters are currently more suitable for high-power high-voltage applications. This technology reduces the harmonics hence improves overall efficiency of the scheme. AC/AC converters Converting AC power to AC power allows control of the voltage, frequency, and phase of the waveform applied to a load from a supplied AC system . The two main categories that can be used to separate the types of converters are whether the frequency of the waveform is changed. AC/AC converter that don't allow the user to modify the frequencies are known as AC Voltage Controllers, or AC Regulators. AC converters that allow the user to change the frequency are simply referred to as frequency converters for AC to AC conversion. Under frequency converters there are three different types of converters that are typically used: cycloconverter, matrix converter, DC link converter (aka AC/DC/AC converter). AC voltage controller: The purpose of an AC Voltage Controller, or AC Regulator, is to vary the RMS voltage across the load while at a constant frequency. Three control methods that are generally accepted are ON/OFF Control, Phase-Angle Control, and Pulse-Width Modulation AC Chopper Control (PWM AC Chopper Control). All three of these methods can be implemented not only in single-phase circuits, but three-phase circuits as well. ON/OFF Control: Typically used for heating loads or speed control of motors, this control method involves turning the switch on for n integral cycles and turning the switch off for m integral cycles. Because turning the switches on and off causes undesirable harmonics to be created, the switches are turned on and off during zero-voltage and zero-current conditions (zero-crossing), effectively reducing the distortion. Phase-Angle Control: Various circuits exist to implement a phase-angle control on different waveforms, such as half-wave or full-wave voltage control. The power electronic components that are typically used are diodes, SCRs, and Triacs. With the use of these components, the user can delay the firing angle in a wave, which will only cause part of the wave to be in output. PWM AC Chopper Control: The other two control methods often have poor harmonics, output current quality, and input power factor. In order to improve these values PWM can be used instead of the other methods. What PWM AC Chopper does is have switches that turn on and off several times within alternate half-cycles of input voltage. Matrix converters and cycloconverters: Cycloconverters are widely used in industry for ac to ac conversion, because they are able to be used in high-power applications. They are commutated direct frequency converters that are synchronised by a supply line. The cycloconverters output voltage waveforms have complex harmonics with the higher-order harmonics being filtered by the machine inductance. Causing the machine current to have fewer harmonics, while the remaining harmonics causes losses and torque pulsations. Note that in a cycloconverter, unlike other converters, there are no inductors or capacitors, i.e. no storage devices. For this reason, the instantaneous input power and the output power are equal. Single-Phase to Single-Phase Cycloconverters: Single-Phase to Single-Phase Cycloconverters started drawing more interest recently because of the decrease in both size and price of the power electronics switches. The single-phase high frequency ac voltage can be either sinusoidal or trapezoidal. These might be zero voltage intervals for control purpose or zero voltage commutation. Three-Phase to Single-Phase Cycloconverters: There are two kinds of three-phase to single-phase cycloconverters: 3φ to 1φ half wave cycloconverters and 3φ to 1φ bridge cycloconverters. Both positive and negative converters can generate voltage at either polarity, resulting in the positive converter only supplying positive current, and the negative converter only supplying negative current. With recent device advances, newer forms of cycloconverters are being developed, such as matrix converters. The first change that is first noticed is that matrix converters utilize bi-directional, bipolar switches. A single phase to a single phase matrix converter consists of a matrix of 9 switches connecting the three input phases to the tree output phase. Any input phase and output phase can be connected together at any time without connecting any two switches from the same phase at the same time; otherwise this will cause a short circuit of the input phases. Matrix converters are lighter, more compact and versatile than other converter solutions. As a result, they are able to achieve higher levels of integration, higher temperature operation, broad output frequency and natural bi-directional power flow suitable to regenerate energy back to the utility. The matrix converters are subdivided into two types: direct and indirect converters. A direct matrix converter with three-phase input and three-phase output, the switches in a matrix converter must be bi-directional, that is, they must be able to block voltages of either polarity and to conduct current in either direction. This switching strategy permits the highest possible output voltage and reduces the reactive line-side current. Therefore, the power flow through the converter is reversible. Because of its commutation problem and complex control keep it from being broadly utilized in industry. Unlike the direct matrix converters, the indirect matrix converters has the same functionality, but uses separate input and output sections that are connected through a dc link without storage elements. The design includes a four-quadrant current source rectifier and a voltage source inverter. The input section consists of bi-directional bipolar switches. The commutation strategy can be applied by changing the switching state of the input section while the output section is in a freewheeling mode. This commutation algorithm is significantly less complex, and has higher reliability as compared to a conventional direct matrix converter. DC link converters: DC Link Converters, also referred to as AC/DC/AC converters, convert an AC input to an AC output with the use of a DC link in the middle. Meaning that the power in the converter is converted to DC from AC with the use of a rectifier, and then it is converted back to AC from DC with the use of an inverter. The end result is an output with a lower voltage and variable (higher or lower) frequency. Due to their wide area of application, the AC/DC/AC converters are the most common contemporary solution. Other advantages to AC/DC/AC converters is that they are stable in overload and no-load conditions, as well as they can be disengaged from a load without damage. Hybrid matrix converter: Hybrid matrix converters are relatively new for AC/AC converters. These converters combine the AC/DC/AC design with the matrix converter design. Multiple types of hybrid converters have been developed in this new category, an example being a converter that uses uni-directional switches and two converter stages without the dc-link; without the capacitors or inductors needed for a dc-link, the weight and size of the converter is reduced. Two sub-categories exist from the hybrid converters, named hybrid direct matrix converter (HDMC) and hybrid indirect matrix converter (HIMC). HDMC convert the voltage and current in one stage, while the HIMC utilizes separate stages, like the AC/DC/AC converter, but without the use of an intermediate storage element. Applications: Below is a list of common applications that each converter is used in. AC voltage controller: Lighting control; domestic and industrial heating; speed control of fan, pump or hoist drives, soft starting of induction motors, static AC switches (temperature control, transformer tap changing, etc.) Cycloconverter: High-power low-speed reversible AC motor drives; constant frequency power supply with variable input frequency; controllable VAR generators for power factor correction; AC system interties linking two independent power systems. Matrix converter: Currently the application of matrix converters are limited due to the non-availability of bilateral monolithic switches capable of operating at high frequency, complex control law implementation, commutation, and other reasons. With these developments, matrix converters could replace cycloconverters in many areas. DC link: Can be used for individual or multiple load applications of machine building and construction. Simulations of power electronic systems Power electronic circuits are simulated using computer simulation programs such as SIMBA, PLECS, PSIM, SPICE, and MATLAB/simulink. Circuits are simulated before they are produced to test how the circuits respond under certain conditions. Also, creating a simulation is both cheaper and faster than creating a prototype to use for testing. Applications Applications of power electronics range in size from a switched mode power supply in an AC adapter, battery chargers, audio amplifiers, fluorescent lamp ballasts, through variable frequency drives and DC motor drives used to operate pumps, fans, and manufacturing machinery, up to gigawatt-scale high voltage direct current power transmission systems used to interconnect electrical grids. Power electronic systems are found in virtually every electronic device. For example: DC/DC converters are used in most mobile devices (mobile phones, PDA etc.) to maintain the voltage at a fixed value whatever the voltage level of the battery is. These converters are also used for electronic isolation and power factor correction. A power optimizer is a type of DC/DC converter developed to maximize the energy harvest from solar photovoltaic or wind turbine systems. AC/DC converters (rectifiers) are used every time an electronic device is connected to the mains (computer, television etc.). These may simply change AC to DC or can also change the voltage level as part of their operation. AC/AC converters are used to change either the voltage level or the frequency (international power adapters, light dimmer). In power distribution networks, AC/AC converters may be used to exchange power between utility frequency 50 Hz and 60 Hz power grids. DC/AC converters (inverters) are used primarily in UPS or renewable energy systems or emergency lighting systems. Mains power charges the DC battery. If the mains fails, an inverter produces AC electricity at mains voltage from the DC battery. Solar inverter, both smaller string and larger central inverters, as well as solar micro-inverter are used in photovoltaics as a component of a PV system. Motor drives are found in pumps, blowers, and mill drives for textile, paper, cement and other such facilities. Drives may be used for power conversion and for motion control. For AC motors, applications include variable-frequency drives, motor soft starters and excitation systems. In hybrid electric vehicles (HEVs), power electronics are used in two formats: series hybrid and parallel hybrid. The difference between a series hybrid and a parallel hybrid is the relationship of the electric motor to the internal combustion engine (ICE). Devices used in electric vehicles consist mostly of dc/dc converters for battery charging and dc/ac converters to power the propulsion motor. Electric trains use power electronic devices to obtain power, as well as for vector control using pulse-width modulation (PWM) rectifiers. The trains obtain their power from power lines. Another new usage for power electronics is in elevator systems. These systems may use thyristors, inverters, permanent magnet motors, or various hybrid systems that incorporate PWM systems and standard motors. Inverters In general, inverters are utilized in applications requiring direct conversion of electrical energy from DC to AC or indirect conversion from AC to AC. DC to AC conversion is useful for many fields, including power conditioning, harmonic compensation, motor drives, renewable energy grid integration, and spacecraft solar power systems. In power systems it is often desired to eliminate harmonic content found in line currents. VSIs can be used as active power filters to provide this compensation. Based on measured line currents and voltages, a control system determines reference current signals for each phase. This is fed back through an outer loop and subtracted from actual current signals to create current signals for an inner loop to the inverter. These signals then cause the inverter to generate output currents that compensate for the harmonic content. This configuration requires no real power consumption, as it is fully fed by the line; the DC link is simply a capacitor that is kept at a constant voltage by the control system. In this configuration, output currents are in phase with line voltages to produce a unity power factor. Conversely, VAR compensation is possible in a similar configuration where output currents lead line voltages to improve the overall power factor. In facilities that require energy at all times, such as hospitals and airports, UPS systems are utilized. In a standby system, an inverter is brought online when the normally supplying grid is interrupted. Power is instantaneously drawn from onsite batteries and converted into usable AC voltage by the VSI, until grid power is restored, or until backup generators are brought online. In an online UPS system, a rectifier-DC-link-inverter is used to protect the load from transients and harmonic content. A battery in parallel with the DC-link is kept fully charged by the output in case the grid power is interrupted, while the output of the inverter is fed through a low pass filter to the load. High power quality and independence from disturbances is achieved. Various AC motor drives have been developed for speed, torque, and position control of AC motors. These drives can be categorized as low-performance or as high-performance, based on whether they are scalar-controlled or vector-controlled, respectively. In scalar-controlled drives, fundamental stator current, or voltage frequency and amplitude, are the only controllable quantities. Therefore, these drives are employed in applications where high quality control is not required, such as fans and compressors. On the other hand, vector-controlled drives allow for instantaneous current and voltage values to be controlled continuously. This high performance is necessary for applications such as elevators and electric cars. Inverters are also vital to many renewable energy applications. In photovoltaic purposes, the inverter, which is usually a PWM VSI, gets fed by the DC electrical energy output of a photovoltaic module or array. The inverter then converts this into an AC voltage to be interfaced with either a load or the utility grid. Inverters may also be employed in other renewable systems, such as wind turbines. In these applications, the turbine speed usually varies, causing changes in voltage frequency and sometimes in the magnitude. In this case, the generated voltage can be rectified and then inverted to stabilize frequency and magnitude. Smart grid A smart grid is a modernized electrical grid that uses information and communications technology to gather and act on information, such as information about the behaviors of suppliers and consumers, in an automated fashion to improve the efficiency, reliability, economics, and sustainability of the production and distribution of electricity. Electric power generated by wind turbines and hydroelectric turbines by using induction generators can cause variances in the frequency at which power is generated. Power electronic devices are utilized in these systems to convert the generated ac voltages into high-voltage direct current (HVDC). The HVDC power can be more easily converted into three phase power that is coherent with the power associated to the existing power grid. Through these devices, the power delivered by these systems is cleaner and has a higher associated power factor. Wind power systems optimum torque is obtained either through a gearbox or direct drive technologies that can reduce the size of the power electronics device. Electric power can be generated through photovoltaic cells by using power electronic devices. The produced power is usually then transformed by solar inverters. Inverters are divided into three different types: central, module-integrated, and string. Central converters can be connected either in parallel or in series on the DC side of the system. For photovoltaic "farms", a single central converter is used for the entire system. Module-integrated converters are connected in series on either the DC or AC side. Normally several modules are used within a photovoltaic system, since the system requires these converters on both DC and AC terminals. A string converter is used in a system that utilizes photovoltaic cells that are facing different directions. It is used to convert the power generated to each string, or line, in which the photovoltaic cells are interacting. Power electronics can be used to help utilities adapt to the rapid increase in distributed residential/commercial solar power generation. Germany and parts of Hawaii, California, and New Jersey require costly studies to be conducted before approving new solar installations. Relatively small-scale ground- or pole-mounted devices create the potential for a distributed control infrastructure to monitor and manage the flow of power. Traditional electromechanical systems, such as capacitor banks or voltage regulators at substations, can take minutes to adjust voltage and can be distant from the solar installations where the problems originate. If voltage on a neighborhood circuit goes too high, it can endanger utility crews and cause damage to both utility and customer equipment. Further, a grid fault causes photovoltaic generators to shut down immediately, spiking the demand for grid power. Smart grid-based regulators are more controllable than far more numerous consumer devices. In another approach, a group of 16 western utilities called the Western Electric Industry Leaders called for the mandatory use of "smart inverters." These devices convert DC to household AC and can also help with power quality. Such devices could eliminate the need for expensive utility equipment upgrades at a much lower total cost. See also Multi-port power electronic interface FET amplifier Power management integrated circuit RF power amplifier Notes References Issa Batarseh, "Power Electronic Circuits" by John Wiley, 2003. S.K. Mazumder, "High-Frequency Inverters: From Photovoltaic, Wind, and Fuel-Cell based Renewable- and Alternative-Energy DER/DG Systems to Battery based Energy-Storage Applications", Book Chapter in Power Electronics handbook, Editor M.H. Rashid, Academic Press, Burlington, Massachusetts, 2010. V. Gureich "Electronic Devices on Discrete Components for Industrial and Power Engineering", CRC Press, New York, 2008, 418 p. Editor: Semikron, Authors: Dr. Ulrich Nicolai, Dr. Tobias Reimann, Prof. Jürgen Petzoldt, Josef Lutz: Application Manual IGBT- and MOSFET-power modules, 1. edition, ISLE Verlag, 1998, online version R. W. Erickson, D. Maksimovic, Fundamentals of Power Electronics, 2nd Ed., Springer, 2001, External links Electronics industry
```java /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.graalvm.visualvm.core.properties; import org.graalvm.visualvm.core.datasource.DataSource; import org.graalvm.visualvm.core.datasource.descriptor.DataSourceDescriptorFactory; import java.awt.BorderLayout; import java.awt.Dialog; import java.awt.Dimension; import java.util.HashMap; import java.util.Map; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import org.openide.DialogDescriptor; import org.openide.DialogDisplayer; import org.openide.util.NbBundle; /** * * @author Jiri Sedlacek */ class PropertiesConfigurator extends JPanel { private static Dimension MIN_SIZE = new Dimension(400, 300); private static Dimension MAX_SIZE = new Dimension(700, 600); private static Map<String, Dimension> SAVED_SIZES = new HashMap<>(); public static void editProperties(DataSource dataSource, int propertiesCategory) { PropertiesCustomizer customizer = PropertiesSupport.sharedInstance().getCustomizer(dataSource, null); customizer.selectCategory(propertiesCategory); PropertiesConfigurator pc = new PropertiesConfigurator(customizer); final DialogDescriptor dd = new DialogDescriptor(pc, NbBundle.getMessage( PropertiesConfigurator.class, "CAP_EditProperties", new Object[] { // NOI18N DataSourceDescriptorFactory.getDescriptor(dataSource).getName() }), true, new Object[] { pc.okButton, DialogDescriptor.CANCEL_OPTION }, pc.okButton, 0, null, null); final Dialog d = DialogDisplayer.getDefault().createDialog(dd); String className = dataSource.getClass().getName(); Dimension savedSize = SAVED_SIZES.get(className); if (savedSize != null) pc.setPreferredSize(savedSize); d.pack(); d.setVisible(true); SAVED_SIZES.put(className, pc.getSize()); pc.cleanup(); if (dd.getValue() == pc.okButton) customizer.propertiesChanged(); else customizer.propertiesCancelled(); } private PropertiesConfigurator(PropertiesCustomizer customizer) { this.customizer = customizer; initComponents(); update(); customizer.addChangeListener(listener); } private void cleanup() { customizer.removeChangeListener(listener); removeAll(); } private void update() { SwingUtilities.invokeLater(new Runnable() { public void run() { okButton.setEnabled(customizer.settingsValid()); } }); } public Dimension getPreferredSize() { Dimension prefSize = super.getPreferredSize(); prefSize.width = Math.max(prefSize.width, MIN_SIZE.width); prefSize.width = Math.min(prefSize.width, MAX_SIZE.width); prefSize.height = Math.max(prefSize.height, MIN_SIZE.height); prefSize.height = Math.min(prefSize.height, MAX_SIZE.height); return prefSize; } private void initComponents() { setLayout(new BorderLayout()); setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 5)); add(customizer, BorderLayout.CENTER); okButton = new JButton(NbBundle.getMessage(PropertiesConfigurator.class, "LBL_OK")); // NOI18N } private final PropertiesCustomizer customizer; private final ChangeListener listener = new ChangeListener() { public void stateChanged(ChangeEvent e) { update(); } }; private JButton okButton; } ```
```javascript Async and defer scripts Use hosted scripts to increase performance Form a `URL` from its parts User Timing API Drag and Drop API ```
```java package com.github.ybq.android.spinkit.style; import android.animation.ValueAnimator; import android.os.Build; import com.github.ybq.android.spinkit.animation.SpriteAnimatorBuilder; import com.github.ybq.android.spinkit.sprite.CircleSprite; import com.github.ybq.android.spinkit.sprite.Sprite; import com.github.ybq.android.spinkit.sprite.SpriteContainer; /** * Created by ybq. */ public class DoubleBounce extends SpriteContainer { @Override public Sprite[] onCreateChild() { return new Sprite[]{ new Bounce(), new Bounce() }; } @Override public void onChildCreated(Sprite... sprites) { super.onChildCreated(sprites); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { sprites[1].setAnimationDelay(1000); } else { sprites[1].setAnimationDelay(-1000); } } private class Bounce extends CircleSprite { Bounce() { setAlpha(153); setScale(0f); } @Override public ValueAnimator onCreateAnimation() { float fractions[] = new float[]{0f, 0.5f, 1f}; return new SpriteAnimatorBuilder(this).scale(fractions, 0f, 1f, 0f). duration(2000). easeInOut(fractions) .build(); } } } ```
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\Apigee\Resource; use Google\Service\Apigee\GoogleCloudApigeeV1DeveloperSubscription; use Google\Service\Apigee\GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest; use Google\Service\Apigee\GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse; /** * The "subscriptions" collection of methods. * Typical usage is: * <code> * $apigeeService = new Google\Service\Apigee(...); * $subscriptions = $apigeeService->organizations_developers_subscriptions; * </code> */ class OrganizationsDevelopersSubscriptions extends \Google\Service\Resource { /** * Creates a subscription to an API product. (subscriptions.create) * * @param string $parent Required. Email address of the developer that is * purchasing a subscription to the API product. Use the following structure in * your request: `organizations/{org}/developers/{developer_email}` * @param GoogleCloudApigeeV1DeveloperSubscription $postBody * @param array $optParams Optional parameters. * @return GoogleCloudApigeeV1DeveloperSubscription * @throws \Google\Service\Exception */ public function create($parent, GoogleCloudApigeeV1DeveloperSubscription $postBody, $optParams = []) { $params = ['parent' => $parent, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('create', [$params], GoogleCloudApigeeV1DeveloperSubscription::class); } /** * Expires an API product subscription immediately. (subscriptions.expire) * * @param string $name Required. Name of the API product subscription. Use the * following structure in your request: `organizations/{org}/developers/{develop * er_email}/subscriptions/{subscription}` * @param GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest $postBody * @param array $optParams Optional parameters. * @return GoogleCloudApigeeV1DeveloperSubscription * @throws \Google\Service\Exception */ public function expire($name, GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('expire', [$params], GoogleCloudApigeeV1DeveloperSubscription::class); } /** * Gets details for an API product subscription. (subscriptions.get) * * @param string $name Required. Name of the API product subscription. Use the * following structure in your request: `organizations/{org}/developers/{develop * er_email}/subscriptions/{subscription}` * @param array $optParams Optional parameters. * @return GoogleCloudApigeeV1DeveloperSubscription * @throws \Google\Service\Exception */ public function get($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('get', [$params], GoogleCloudApigeeV1DeveloperSubscription::class); } /** * Lists all API product subscriptions for a developer. * (subscriptions.listOrganizationsDevelopersSubscriptions) * * @param string $parent Required. Email address of the developer. Use the * following structure in your request: * `organizations/{org}/developers/{developer_email}` * @param array $optParams Optional parameters. * * @opt_param int count Number of API product subscriptions to return in the API * call. Use with `startKey` to provide more targeted filtering. Defaults to * 100. The maximum limit is 1000. * @opt_param string startKey Name of the API product subscription from which to * start displaying the list of subscriptions. If omitted, the list starts from * the first item. For example, to view the API product subscriptions from * 51-150, set the value of `startKey` to the name of the 51st subscription and * set the value of `count` to 100. * @return GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse * @throws \Google\Service\Exception */ public function listOrganizationsDevelopersSubscriptions($parent, $optParams = []) { $params = ['parent' => $parent]; $params = array_merge($params, $optParams); return $this->call('list', [$params], GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(OrganizationsDevelopersSubscriptions::class, your_sha256_hashons'); ```
Adipiplon (developmental code name NG2-73) is an anxiolytic drug developed by Neurogen Corporation. It has similar effects to benzodiazepine drugs, but is structurally distinct and classed as a nonbenzodiazepine anxiolytic. Adipiplon is a subtype-selective GABAA receptor partial agonist, which binds preferentially to the α3 subtype. This is significant as while several previous nonbenzodiazepine drugs have been developed that are selective for α2/3 over the other subtypes, adipiplon is one of the first drugs selected for clinical development which can discriminate between α2 and α3, as well as showing a little affinity for the α1 or α5 subtypes - alpidem is selective for α3 over α2, but still has moderate affinity for α1, whereas adipiplon is highly α3-selective with little affinity for either α1, α2 or α5. Adipiplon is being researched as a potential medication for the treatment of anxiety and insomnia, and in 2008 it was being used in Phase IIb trials. These trials were suspended after significant next-day side effects were discovered. See also Nonbenzodiazepine References Anxiolytics Triazolopyrimidines Imidazoles Pyridines Fluoroarenes GABAA receptor positive allosteric modulators
A simple lipid is a fatty acid ester of different alcohols and carries no other substance. These lipids belong to a heterogeneous class of predominantly nonpolar compounds, mostly insoluble in water, but soluble in nonpolar organic solvents such as chloroform and benzene. Simple lipids: esters of fatty acids with various alcohols. a. Fats: esters of fatty acids with glycerol. Oils are fats in the liquid state. Fats are also called triglycerides because all the three hydroxyl groups of glycerol are esterified. b. Waxes: Solid esters of long-chain fatty acids such as palmitic acid with aliphatic or alicyclic higher molecular weight monohydric alcohols. Waxes are water-insoluble due to the weakly polar nature of the ester group. See also Lipid Lipids
Al-Juzjani is a toponymic surname or nisba for people from Juzjan (or Guzgan). Notable people with the surname include: Abu 'Ubayd al-Juzjani (980–1037), physician and pupil of Ibn Sina Ibrahim ibn Ya'qub al-Juzajani (790–872), Islamic hadith scholar Minhaj-i Siraj Juzjani (born 1193), thirteenth-century chronicler of India under the Delhi Sultanate, writer of Tabaqat-i Nasiri Nisbas Toponymic surnames People from Jowzjan Province
Pagla Halt Railway Station is a railway station located in Fatulla Union, Narayanganj Sadar Upazila, Narayanganj District, Dhaka Division, Bangladesh. History The demand for jute was increasing all over the world. For the purpose of meeting that growing demand, there was a need for better communication system than the existing communication system to supply jute from Eastern Bengal to Port of Kolkata. Therefore in 1885 a 144 km wide meter gauge railway line named Dhaka State Railway was constructed to bring raw jute to Kolkata mainly by river which connects Mymensingh with Narayanganj. Pagla railway station was built as part of the project during the construction of Narayanganj–Bahadurabad Ghat line. References External links Railway stations in Narayanganj District Railway stations opened in 1885 1885 establishments in British India Railway stations in Bangladesh opened in the 19th century
```protocol buffer // Protocol Buffers for Go with Gadgets // // path_to_url // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. syntax = "proto2"; package unmarshalmerge; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.equal_all) = true; option (gogoproto.verbose_equal_all) = true; option (gogoproto.stringer_all) = true; option (gogoproto.gostring_all) = true; option (gogoproto.goproto_stringer_all) = false; option (gogoproto.testgen_all) = true; option (gogoproto.populate_all) = true; option (gogoproto.benchgen_all) = true; message Big { option (gogoproto.unmarshaler) = true; optional Sub Sub = 1; optional int64 Number = 2; } message BigUnsafe { option (gogoproto.unsafe_unmarshaler) = true; optional Sub Sub = 1; optional int64 Number = 2; } message Sub { option (gogoproto.unmarshaler) = true; optional int64 SubNumber = 1; } message IntMerge { option (gogoproto.unmarshaler) = true; required int64 Int64 = 1 [(gogoproto.nullable) = false]; optional int32 Int32 = 2 [(gogoproto.nullable) = false]; required sint32 Sint32 = 3 [(gogoproto.nullable) = false]; optional sint64 Sint64 = 4 [(gogoproto.nullable) = false]; optional uint64 Uint64 = 5 [(gogoproto.nullable) = false]; required uint32 Uint32 = 6 [(gogoproto.nullable) = false]; optional fixed64 Fixed64 = 7 [(gogoproto.nullable) = false]; optional fixed32 Fixed32 = 8 [(gogoproto.nullable) = false]; required sfixed32 Sfixed32 = 9 [(gogoproto.nullable) = false]; optional sfixed64 Sfixed64 = 10 [(gogoproto.nullable) = false]; optional bool Bool = 11 [(gogoproto.nullable) = false]; } ```
```scss // // !!! THIS FILE WAS AUTOMATICALLY GENERATED !!! // !!! DO NOT MODIFY IT BY HAND !!! // Design system display name: Google Material 3 // Design system version: v0.132 // @use 'sass:map'; @use './md-sys-color'; @use './md-sys-elevation'; @use './md-sys-shape'; @use './md-sys-state'; $_default: ( 'md-sys-color': md-sys-color.values-light(), 'md-sys-elevation': md-sys-elevation.values(), 'md-sys-shape': md-sys-shape.values(), 'md-sys-state': md-sys-state.values(), ); @function values($deps: $_default, $exclude-hardcoded-values: false) { @return ( 'container-color': map.get($deps, 'md-sys-color', 'secondary-container'), 'container-elevation': map.get($deps, 'md-sys-elevation', 'level3'), 'container-height': if($exclude-hardcoded-values, null, 56px), 'container-shadow-color': map.get($deps, 'md-sys-color', 'shadow'), 'container-shape': map.get($deps, 'md-sys-shape', 'corner-large'), 'container-width': if($exclude-hardcoded-values, null, 56px), 'focus-container-elevation': map.get($deps, 'md-sys-elevation', 'level3'), 'focus-icon-color': map.get($deps, 'md-sys-color', 'on-secondary-container'), 'focus-state-layer-color': map.get($deps, 'md-sys-color', 'on-secondary-container'), 'focus-state-layer-opacity': map.get($deps, 'md-sys-state', 'focus-state-layer-opacity'), 'hover-container-elevation': map.get($deps, 'md-sys-elevation', 'level4'), 'hover-icon-color': map.get($deps, 'md-sys-color', 'on-secondary-container'), 'hover-state-layer-color': map.get($deps, 'md-sys-color', 'on-secondary-container'), 'hover-state-layer-opacity': map.get($deps, 'md-sys-state', 'hover-state-layer-opacity'), 'icon-color': map.get($deps, 'md-sys-color', 'on-secondary-container'), 'icon-size': if($exclude-hardcoded-values, null, 24px), 'lowered-container-elevation': map.get($deps, 'md-sys-elevation', 'level1'), 'lowered-focus-container-elevation': map.get($deps, 'md-sys-elevation', 'level1'), 'lowered-hover-container-elevation': map.get($deps, 'md-sys-elevation', 'level2'), 'lowered-pressed-container-elevation': map.get($deps, 'md-sys-elevation', 'level1'), 'pressed-container-elevation': map.get($deps, 'md-sys-elevation', 'level3'), 'pressed-icon-color': map.get($deps, 'md-sys-color', 'on-secondary-container'), 'pressed-state-layer-color': map.get($deps, 'md-sys-color', 'on-secondary-container'), 'pressed-state-layer-opacity': map.get($deps, 'md-sys-state', 'pressed-state-layer-opacity') ); } ```
```objective-c /* ============================================================================== ActionUI.h Created: 28 Oct 2016 8:05:24pm Author: bkupe ============================================================================== */ #pragma once class ActionUI : public ProcessorUI, public Action::AsyncListener, public ConsequenceManager::AsyncListener, public UITimerTarget { public: ActionUI(Action*, bool showMiniModeBT = false); virtual ~ActionUI(); Action* action; std::unique_ptr<TriggerButtonUI> triggerUI; std::unique_ptr<FloatSliderUI> progressionUI; std::unique_ptr<FloatSliderUI> staggerUI; virtual void paint(Graphics& g) override; void controllableFeedbackUpdateInternal(Controllable* c) override; void updateStaggerUI(); virtual void resizedInternalHeader(Rectangle<int>& r) override; virtual void paintOverChildren(Graphics& g) override; virtual void itemDropped(const SourceDetails& details) override; void newMessage(const Action::ActionEvent& e) override; void newMessage(const ConsequenceManager::ConsequenceManagerEvent& e) override; void handlePaintTimerInternal(); virtual void addContextMenuItems(PopupMenu& p) override; virtual void handleContextMenuResult(int result) override; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ActionUI) }; ```
Flavoparmelia is a genus of foliose lichens in the family Parmeliaceae. Because of their appearance, they are commonly known as greenshield lichens. The widely distributed genus contains 32 species. It was circumscribed by American lichenologist Mason Hale in 1986 to contain 17 former Pseudoparmelia species with broad lobes, usnic acid in the cortex, and isolichenan in the cell walls. Description Flavoparmelia lichens are medium sized foliose lichens that are yellow-green in colour, with a thallus comprising rounded lobed that measure 2–8 mm wide, which form flat and loosely attached patches that are wide. Older parts of the upper thallus surface are wrinkled, while the newer parts are smooth. There is a black lower surface with simple, unbranched rhizines, and a distinct bare zone around the margin. The photobiont partner is green algae from genus Trebouxia. Flavoparmelia has larger spores than other segregate genera of Pseudoparmelia. Biogeography The distributional ranges of Flavoparmelia species have been shaped by both long-distance dispersal and vicariance. A 2013 study identified more geographical structure within Flavoparmelia than previously recognized, with some species having wider distributions than others. The authors suggest that phenotypical species delimitation often underestimates true diversity. Flavoparmelia originated in southern South America, and its major radiation began in the late Oligocene. The splits in the genus occurred at different times, shaping the diversity of the main lineages within the genus. The South American ancestor of Flavoparmelia originated before the separation of southern South America and Australia from Antarctica, suggesting that vicariance could have played a role in shaping this distribution. Recent diversification in Australia resulted from recent diversification at the Miocene-Pliocene boundary. Group 3 (a cluster of Flavoparmelia species that have wider distributions, such as the subcosmopolitan F. soredians) is estimated to have originated in the Cape Region of South Africa during the late Miocene. Long-distance dispersal can account for the current distribution of some species, while evidence for vicariance has also been shown in Parmeliaceae. Species Flavoparmelia baltimorensis (Gyeln. & Fóriss) Hale (1986) Flavoparmelia caperata (L.) Hale (1986) Flavoparmelia caperatula (Nyl.) Elix, O.Blanco & A.Crespo (2010) Flavoparmelia citrinescens (Gyeln.) O.Blanco, A.Crespo & Elix (2010) Flavoparmelia diffractaica Elix & J.Johnst. (1988) Flavoparmelia ecuadorensis T.H.Nash, Elix & J.Johnst. (1987) Flavoparmelia euplecta (Stirt.) Hale (1986) Flavoparmelia ferax (Müll.Arg.) Hale (1986) Flavoparmelia haysomii (C.W.Dodge) Hale (1986) Flavoparmelia haywardiana Elix & J.Johnst. (1988) Flavoparmelia helmsii (Kurok. & Filson) Hale (1986) Flavoparmelia kantvilasii Elix (1993) – New South Wales Flavoparmelia marchantii Elix, O.Blanco & A.Crespo (2005) – Australia Flavoparmelia norfolkensis Elix & Streimann (1989) – Norfolk Island Flavoparmelia plicata Aptroot & M.Cáceres (2014) – Brazil Flavoparmelia proeuplecta Elix & J.Johnst. (1988) Flavoparmelia rutidota (Hook.f. & Taylor) Hale (1986) Flavoparmelia scabrosina Elix & J.Johnst. (1988) Flavoparmelia secalonica Elix & J.Johnst. (1988) Flavoparmelia soredians (Nyl.) Hale (1986) Flavoparmelia springtonensis (Elix) Hale (1986) Flavoparmelia subambigua (Hale) O.Blanco, A.Crespo & Elix (2010) Flavoparmelia succinprotocetrarica Elix & J.Johnst. (1988) Flavoparmelia virensica Elix, O.Blanco & A.Crespo (2010) References Parmeliaceae Lichen genera Taxa named by Mason Hale Lecanorales genera Taxa described in 1986
In music, a double stop is the technique of playing two notes simultaneously on a stringed instrument such as a violin, a viola, a cello, or a double bass. On instruments such as the Hardanger fiddle it is common and often employed. In performing a double stop, two separate strings are bowed or plucked simultaneously. Although the term itself suggests these strings are to be fingered (stopped), in practice one or both strings may be open. A triple stop is the same technique applied to three strings; a quadruple stop applies to four strings. Double, triple, and quadruple stopping are collectively known as multiple stopping. Early extensive examples of the double stop and string chords appear in Carlo Farina's Capriccio Stravagante from 1627, and in certain of the sonatas of Biagio Marini's Op. 8 of 1629. Bowing On instruments with a curved bridge, it is difficult to bow more than two strings simultaneously. Early treatises make it clear that composers did not expect three notes to be played at once, even though the notes may be written in a way as to suggest this. Playing four notes at once is almost impossible. The normal way of playing three or four note chords is to sound the lower notes briefly and allow them to ring while the bow plays the upper notes (a broken chord). This gives the illusion of a true triple or quadruple stop. In forte, however, it is possible to play three notes at once, especially when bowed toward the fingerboard. With this technique more pressure than usual is needed on the bow, so this cannot be practiced in softer passages. This technique is mainly used in music with great force, such as the cadenza-like solo at the beginning of the last movement of Tchaikovsky's violin concerto. Bach bow The "Bach bow" with its arched back uses a system of levers to slacken or tighten bow hair immediately while playing so as to (according to its advocates) facilitate the performance of polyphonic music. Such a bow was conceived early in the 20th century by Arnold Schering and Albert Schweitzer and constructed by Rolf Schröder in 1933. A similar device called the "Vega bow" was built in 1954 under the sponsorship of the violinist Emil Telmányi. Neither of these bows bears any particular relation to historical Baroque bows and neither has ever been widely employed. In 1990, German cellist Michael Bach invented a curved bow for cello, violin, viola and bass. He named it "BACH.Bogen" (BACH.Bow) after his own name. Notation In longer three-note or four-note chords, either the top note or the top two notes are sustained after the lower notes have been played as grace notes. Sometimes the noteheads for the lower notes are filled in to show they are of short duration while the noteheads for the notes to be held are left open. This notation occurs, for example, at the beginning of the fourth movement of Beethoven's fifth symphony. Simultaneous notes in a single part for an orchestral string section may be played as multiple stops or the individual notes may be distributed among the players within the section. Where the latter is intended, divisi or div. is written above the staff. Plucking Guitar double stops are commonly used in rock, blues, metal, and jazz music. They are often played by fingerpicking or hybrid picking, but can also be strummed, or executed with hammer-ons or pull-offs. Jimi Hendrix was especially known for utilizing double stops on the guitar. When three or more notes are played simultaneously on a plucked string instrument, it is simply called a chord rather than a triple stop or quadruple stop. See also Glossary of music terminology References String performance techniques Extended techniques
```smalltalk // your_sha256_hash------------ // <copyright file="RoomInfo.cs" company="Exit Games GmbH"> // </copyright> // <summary> // This class resembles info about available rooms, as sent by the Master // server's lobby. Consider all values as readonly. // </summary> // <author>developer@exitgames.com</author> // your_sha256_hash------------ using System; using ExitGames.Client.Photon; /// <summary> /// A simplified room with just the info required to list and join, used for the room listing in the lobby. /// The properties are not settable (open, MaxPlayers, etc). /// </summary> /// <remarks> /// This class resembles info about available rooms, as sent by the Master server's lobby. /// Consider all values as readonly. None are synced (only updated by events by server). /// </remarks> /// \ingroup publicApi public class RoomInfo { /// <summary>Used internally in lobby, to mark rooms that are no longer listed.</summary> public bool removedFromList { get; internal set; } /// <summary>Backing field for property.</summary> private Hashtable customPropertiesField = new Hashtable(); /// <summary>Backing field for property.</summary> protected byte maxPlayersField = 0; /// <summary>Backing field for property.</summary> protected string[] expectedUsersField; /// <summary>Backing field for property.</summary> protected bool openField = true; /// <summary>Backing field for property.</summary> protected bool visibleField = true; /// <summary>Backing field for property. False unless the GameProperty is set to true (else it's not sent).</summary> protected bool autoCleanUpField = PhotonNetwork.autoCleanUpPlayerObjects; /// <summary>Backing field for property.</summary> protected string nameField; /// <summary>Backing field for master client id (actorNumber). defined by server in room props and ev leave.</summary> protected internal int masterClientIdField; protected internal bool serverSideMasterClient { get; private set; } /// <summary>Read-only "cache" of custom properties of a room. Set via Room.SetCustomProperties (not available for RoomInfo class!).</summary> /// <remarks>All keys are string-typed and the values depend on the game/application.</remarks> /// <see cref="Room.SetCustomProperties"/> public Hashtable CustomProperties { get { return this.customPropertiesField; } } /// <summary>The name of a room. Unique identifier (per Loadbalancing group) for a room/match.</summary> public string Name { get { return this.nameField; } } /// <summary> /// Only used internally in lobby, to display number of players in room (while you're not in). /// </summary> public int PlayerCount { get; private set; } /// <summary> /// State if the local client is already in the game or still going to join it on gameserver (in lobby always false). /// </summary> public bool IsLocalClientInside { get; set; } /// <summary> /// Sets a limit of players to this room. This property is shown in lobby, too. /// If the room is full (players count == maxplayers), joining this room will fail. /// </summary> /// <remarks> /// As part of RoomInfo this can't be set. /// As part of a Room (which the player joined), the setter will update the server and all clients. /// </remarks> public byte MaxPlayers { get { return this.maxPlayersField; } } /// <summary> /// Defines if the room can be joined. /// This does not affect listing in a lobby but joining the room will fail if not open. /// If not open, the room is excluded from random matchmaking. /// Due to racing conditions, found matches might become closed before they are joined. /// Simply re-connect to master and find another. /// Use property "IsVisible" to not list the room. /// </summary> /// <remarks> /// As part of RoomInfo this can't be set. /// As part of a Room (which the player joined), the setter will update the server and all clients. /// </remarks> public bool IsOpen { get { return this.openField; } } /// <summary> /// Defines if the room is listed in its lobby. /// Rooms can be created invisible, or changed to invisible. /// To change if a room can be joined, use property: open. /// </summary> /// <remarks> /// As part of RoomInfo this can't be set. /// As part of a Room (which the player joined), the setter will update the server and all clients. /// </remarks> public bool IsVisible { get { return this.visibleField; } } /// <summary> /// Constructs a RoomInfo to be used in room listings in lobby. /// </summary> /// <param name="roomName"></param> /// <param name="properties"></param> protected internal RoomInfo(string roomName, Hashtable properties) { this.InternalCacheProperties(properties); this.nameField = roomName; } /// <summary> /// Makes RoomInfo comparable (by name). /// </summary> public override bool Equals(object other) { RoomInfo otherRoomInfo = other as RoomInfo; return (otherRoomInfo != null && this.Name.Equals(otherRoomInfo.nameField)); } /// <summary> /// Accompanies Equals, using the name's HashCode as return. /// </summary> /// <returns></returns> public override int GetHashCode() { return this.nameField.GetHashCode(); } /// <summary>Simple printingin method.</summary> /// <returns>Summary of this RoomInfo instance.</returns> public override string ToString() { return string.Format("Room: '{0}' {1},{2} {4}/{3} players.", this.nameField, this.visibleField ? "visible" : "hidden", this.openField ? "open" : "closed", this.maxPlayersField, this.PlayerCount); } /// <summary>Simple printingin method.</summary> /// <returns>Summary of this RoomInfo instance.</returns> public string ToStringFull() { return string.Format("Room: '{0}' {1},{2} {4}/{3} players.\ncustomProps: {5}", this.nameField, this.visibleField ? "visible" : "hidden", this.openField ? "open" : "closed", this.maxPlayersField, this.PlayerCount, this.customPropertiesField.ToStringFull()); } /// <summary>Copies "well known" properties to fields (IsVisible, etc) and caches the custom properties (string-keys only) in a local hashtable.</summary> /// <param name="propertiesToCache">New or updated properties to store in this RoomInfo.</param> protected internal void InternalCacheProperties(Hashtable propertiesToCache) { if (propertiesToCache == null || propertiesToCache.Count == 0 || this.customPropertiesField.Equals(propertiesToCache)) { return; } // check of this game was removed from the list. in that case, we don't // need to read any further properties // list updates will remove this game from the game listing if (propertiesToCache.ContainsKey(GamePropertyKey.Removed)) { this.removedFromList = (Boolean)propertiesToCache[GamePropertyKey.Removed]; if (this.removedFromList) { return; } } // fetch the "well known" properties of the room, if available if (propertiesToCache.ContainsKey(GamePropertyKey.MaxPlayers)) { this.maxPlayersField = (byte)propertiesToCache[GamePropertyKey.MaxPlayers]; } if (propertiesToCache.ContainsKey(GamePropertyKey.IsOpen)) { this.openField = (bool)propertiesToCache[GamePropertyKey.IsOpen]; } if (propertiesToCache.ContainsKey(GamePropertyKey.IsVisible)) { this.visibleField = (bool)propertiesToCache[GamePropertyKey.IsVisible]; } if (propertiesToCache.ContainsKey(GamePropertyKey.PlayerCount)) { this.PlayerCount = (int)((byte)propertiesToCache[GamePropertyKey.PlayerCount]); } if (propertiesToCache.ContainsKey(GamePropertyKey.CleanupCacheOnLeave)) { this.autoCleanUpField = (bool)propertiesToCache[GamePropertyKey.CleanupCacheOnLeave]; } if (propertiesToCache.ContainsKey(GamePropertyKey.MasterClientId)) { this.serverSideMasterClient = true; bool isUpdate = this.masterClientIdField != 0; this.masterClientIdField = (int) propertiesToCache[GamePropertyKey.MasterClientId]; if (isUpdate) { PhotonNetwork.networkingPeer.UpdateMasterClient(); } } //if (propertiesToCache.ContainsKey(GamePropertyKey.PropsListedInLobby)) //{ // // could be cached but isn't useful //} if (propertiesToCache.ContainsKey((byte)GamePropertyKey.ExpectedUsers)) { this.expectedUsersField = (string[])propertiesToCache[GamePropertyKey.ExpectedUsers]; } // merge the custom properties (from your application) to the cache (only string-typed keys will be kept) this.customPropertiesField.MergeStringKeys(propertiesToCache); this.customPropertiesField.StripKeysWithNullValues(); } #region Obsoleted variable names [Obsolete("Please use CustomProperties (updated case for naming).")] public Hashtable customProperties { get { return this.CustomProperties; } } [Obsolete("Please use Name (updated case for naming).")] public string name { get { return this.Name; } } [Obsolete("Please use PlayerCount (updated case for naming).")] public int playerCount { get { return this.PlayerCount; } set { this.PlayerCount = value; } } [Obsolete("Please use IsLocalClientInside (updated case for naming).")] public bool isLocalClientInside { get { return this.IsLocalClientInside; } set { this.IsLocalClientInside = value; } } [Obsolete("Please use MaxPlayers (updated case for naming).")] public byte maxPlayers { get { return this.MaxPlayers; } } [Obsolete("Please use IsOpen (updated case for naming).")] public bool open { get { return this.IsOpen; } } [Obsolete("Please use IsVisible (updated case for naming).")] public bool visible { get { return this.IsVisible; } } #endregion } ```
```python """ If a user uses Trainer API directly with wandb integration, they expect to see * train_loop_config to show up in wandb.config. This test uses mocked call into wandb API. """ import pytest import ray from ray.air.integrations.wandb import WANDB_ENV_VAR from ray.air.tests.mocked_wandb_integration import WandbTestExperimentLogger from ray.train import RunConfig, ScalingConfig from ray.train.examples.pytorch.torch_linear_example import ( train_func as linear_train_func, ) from ray.train.torch import TorchTrainer @pytest.fixture def ray_start_4_cpus(): address_info = ray.init(num_cpus=4) yield address_info # The code after the yield will run as teardown code. ray.shutdown() CONFIG = {"lr": 1e-2, "hidden_size": 1, "batch_size": 4, "epochs": 3} @pytest.mark.parametrize("with_train_loop_config", (True, False)) def test_trainer_wandb_integration( ray_start_4_cpus, with_train_loop_config, monkeypatch ): monkeypatch.setenv(WANDB_ENV_VAR, "9012") def train_func(config=None): config = config or CONFIG result = linear_train_func(config) assert len(result) == config["epochs"] assert result[-1]["loss"] < result[0]["loss"] scaling_config = ScalingConfig(num_workers=2) logger = WandbTestExperimentLogger(project="test_project") if with_train_loop_config: trainer = TorchTrainer( train_loop_per_worker=train_func, train_loop_config=CONFIG, scaling_config=scaling_config, run_config=RunConfig(callbacks=[logger]), ) else: trainer = TorchTrainer( train_loop_per_worker=train_func, scaling_config=scaling_config, run_config=RunConfig(callbacks=[logger]), ) trainer.fit() config = list(logger.trial_logging_actor_states.values())[0].config if with_train_loop_config: assert "train_loop_config" in config else: assert "train_loop_config" not in config if __name__ == "__main__": import sys import pytest sys.exit(pytest.main(["-v", "-x", __file__])) ```
City of Crime may refer to: Batman: City of Crime, a 2005-2006 Batman comic book story arc "City of Crime," a song performed by Dan Aykroyd and Tom Hanks from the 1987 film Dragnet See also Whispering City, also known as Crime City, a 1947 film City Crimes, an 1840 novel
A Casing-cutter is a device used in petroleum industry to cut a complete section of a casing, a liner or all others tubular components in a well bore. This cutting tool is composed by several cutting blades (reinforced with Tungsten carbide) pivotally mounted on support body. During cutting operations, the cutting blades are gradually deployed outside the support body by hydraulic pressure or mechanical action See also Drilling rig Driller (oil) Drag bit Drill bit Drilling stabilizer Hole opener Roller reamer External links Hydraulic Casing Cutter sheet from Drillstar Industries Hydraulic Casing Cutter sheet from PionnerOilTools Drilling technology
```go package query import ( "context" "strings" "sync" "time" "github.com/go-kit/log" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/util/annotations" "github.com/thanos-io/thanos/pkg/dedup" "github.com/thanos-io/thanos/pkg/extprom" "github.com/thanos-io/thanos/pkg/gate" "github.com/thanos-io/thanos/pkg/store" "github.com/thanos-io/thanos/pkg/store/storepb" "github.com/thanos-io/thanos/pkg/tenancy" "github.com/thanos-io/thanos/pkg/tracing" ) type seriesStatsReporter func(seriesStats storepb.SeriesStatsCounter) var NoopSeriesStatsReporter seriesStatsReporter = func(_ storepb.SeriesStatsCounter) {} func NewAggregateStatsReporter(stats *[]storepb.SeriesStatsCounter) seriesStatsReporter { var mutex sync.Mutex return func(s storepb.SeriesStatsCounter) { mutex.Lock() defer mutex.Unlock() *stats = append(*stats, s) } } // QueryableCreator returns implementation of promql.Queryable that fetches data from the proxy store API endpoints. // If deduplication is enabled, all data retrieved from it will be deduplicated along all replicaLabels by default. // When the replicaLabels argument is not empty it overwrites the global replicaLabels flag. This allows specifying // replicaLabels at query time. // maxResolutionMillis controls downsampling resolution that is allowed (specified in milliseconds). // partialResponse controls `partialResponseDisabled` option of StoreAPI and partial response behavior of proxy. type QueryableCreator func( deduplicate bool, replicaLabels []string, storeDebugMatchers [][]*labels.Matcher, maxResolutionMillis int64, partialResponse, skipChunks bool, shardInfo *storepb.ShardInfo, seriesStatsReporter seriesStatsReporter, ) storage.Queryable // NewQueryableCreator creates QueryableCreator. // NOTE(bwplotka): Proxy assumes to be replica_aware, see thanos.store.info.StoreInfo.replica_aware field. func NewQueryableCreator( logger log.Logger, reg prometheus.Registerer, proxy storepb.StoreServer, maxConcurrentSelects int, selectTimeout time.Duration, ) QueryableCreator { gf := gate.NewGateFactory(extprom.WrapRegistererWithPrefix("concurrent_selects_", reg), maxConcurrentSelects, gate.Selects) return func( deduplicate bool, replicaLabels []string, storeDebugMatchers [][]*labels.Matcher, maxResolutionMillis int64, partialResponse, skipChunks bool, shardInfo *storepb.ShardInfo, seriesStatsReporter seriesStatsReporter, ) storage.Queryable { return &queryable{ logger: logger, replicaLabels: replicaLabels, storeDebugMatchers: storeDebugMatchers, proxy: proxy, deduplicate: deduplicate, maxResolutionMillis: maxResolutionMillis, partialResponse: partialResponse, skipChunks: skipChunks, gateProviderFn: func() gate.Gate { return gf.New() }, maxConcurrentSelects: maxConcurrentSelects, selectTimeout: selectTimeout, shardInfo: shardInfo, seriesStatsReporter: seriesStatsReporter, } } } type queryable struct { logger log.Logger replicaLabels []string storeDebugMatchers [][]*labels.Matcher proxy storepb.StoreServer deduplicate bool maxResolutionMillis int64 partialResponse bool skipChunks bool gateProviderFn func() gate.Gate maxConcurrentSelects int selectTimeout time.Duration shardInfo *storepb.ShardInfo seriesStatsReporter seriesStatsReporter } // Querier returns a new storage querier against the underlying proxy store API. func (q *queryable) Querier(mint, maxt int64) (storage.Querier, error) { return newQuerier(q.logger, mint, maxt, q.replicaLabels, q.storeDebugMatchers, q.proxy, q.deduplicate, q.maxResolutionMillis, q.partialResponse, q.skipChunks, q.gateProviderFn(), q.selectTimeout, q.shardInfo, q.seriesStatsReporter), nil } type querier struct { logger log.Logger mint, maxt int64 replicaLabels []string storeDebugMatchers [][]*labels.Matcher proxy storepb.StoreServer deduplicate bool maxResolutionMillis int64 partialResponseStrategy storepb.PartialResponseStrategy skipChunks bool selectGate gate.Gate selectTimeout time.Duration shardInfo *storepb.ShardInfo seriesStatsReporter seriesStatsReporter } // newQuerier creates implementation of storage.Querier that fetches data from the proxy // store API endpoints. func newQuerier( logger log.Logger, mint, maxt int64, replicaLabels []string, storeDebugMatchers [][]*labels.Matcher, proxy storepb.StoreServer, deduplicate bool, maxResolutionMillis int64, partialResponse, skipChunks bool, selectGate gate.Gate, selectTimeout time.Duration, shardInfo *storepb.ShardInfo, seriesStatsReporter seriesStatsReporter, ) *querier { if logger == nil { logger = log.NewNopLogger() } rl := make(map[string]struct{}) for _, replicaLabel := range replicaLabels { rl[replicaLabel] = struct{}{} } partialResponseStrategy := storepb.PartialResponseStrategy_ABORT if partialResponse { partialResponseStrategy = storepb.PartialResponseStrategy_WARN } return &querier{ logger: logger, selectGate: selectGate, selectTimeout: selectTimeout, mint: mint, maxt: maxt, replicaLabels: replicaLabels, storeDebugMatchers: storeDebugMatchers, proxy: proxy, deduplicate: deduplicate, maxResolutionMillis: maxResolutionMillis, partialResponseStrategy: partialResponseStrategy, skipChunks: skipChunks, shardInfo: shardInfo, seriesStatsReporter: seriesStatsReporter, } } func (q *querier) isDedupEnabled() bool { return q.deduplicate && len(q.replicaLabels) > 0 } type seriesServer struct { // This field just exist to pseudo-implement the unused methods of the interface. storepb.Store_SeriesServer ctx context.Context seriesSet []storepb.Series seriesSetStats storepb.SeriesStatsCounter warnings annotations.Annotations } func (s *seriesServer) Send(r *storepb.SeriesResponse) error { if r.GetWarning() != "" { s.warnings.Add(errors.New(r.GetWarning())) return nil } if r.GetSeries() != nil { s.seriesSet = append(s.seriesSet, *r.GetSeries()) s.seriesSetStats.Count(r.GetSeries()) return nil } // Unsupported field, skip. return nil } func (s *seriesServer) Context() context.Context { return s.ctx } // aggrsFromFunc infers aggregates of the underlying data based on the wrapping // function of a series selection. func aggrsFromFunc(f string) []storepb.Aggr { if f == "min" || strings.HasPrefix(f, "min_") { return []storepb.Aggr{storepb.Aggr_MIN} } if f == "max" || strings.HasPrefix(f, "max_") { return []storepb.Aggr{storepb.Aggr_MAX} } if f == "count" || strings.HasPrefix(f, "count_") { return []storepb.Aggr{storepb.Aggr_COUNT} } // f == "sum" falls through here since we want the actual samples. if strings.HasPrefix(f, "sum_") { return []storepb.Aggr{storepb.Aggr_SUM} } if f == "increase" || f == "rate" || f == "irate" || f == "resets" { return []storepb.Aggr{storepb.Aggr_COUNTER} } // In the default case, we retrieve count and sum to compute an average. return []storepb.Aggr{storepb.Aggr_COUNT, storepb.Aggr_SUM} } func (q *querier) Select(ctx context.Context, _ bool, hints *storage.SelectHints, ms ...*labels.Matcher) storage.SeriesSet { if hints == nil { hints = &storage.SelectHints{ Start: q.mint, End: q.maxt, } } else { // NOTE(GiedriusS): need to make a copy here // because the PromQL engine sorts these and // we later on call String() the whole request (including this slice). grouping := make([]string, 0, len(hints.Grouping)) grouping = append(grouping, hints.Grouping...) hints.Grouping = grouping } matchers := make([]string, len(ms)) for i, m := range ms { matchers[i] = m.String() } tenant := ctx.Value(tenancy.TenantKey) // The context gets canceled as soon as query evaluation is completed by the engine. // We want to prevent this from happening for the async store API calls we make while preserving tracing context. // TODO(bwplotka): Does the above still is true? It feels weird to leave unfinished calls behind query API. ctx = tracing.CopyTraceContext(context.Background(), ctx) ctx = context.WithValue(ctx, tenancy.TenantKey, tenant) ctx, cancel := context.WithTimeout(ctx, q.selectTimeout) span, ctx := tracing.StartSpan(ctx, "querier_select", opentracing.Tags{ "minTime": hints.Start, "maxTime": hints.End, "matchers": "{" + strings.Join(matchers, ",") + "}", }) promise := make(chan storage.SeriesSet, 1) go func() { defer close(promise) var err error tracing.DoInSpan(ctx, "querier_select_gate_ismyturn", func(ctx context.Context) { err = q.selectGate.Start(ctx) }) if err != nil { promise <- storage.ErrSeriesSet(errors.Wrap(err, "failed to wait for turn")) return } defer q.selectGate.Done() span, ctx := tracing.StartSpan(ctx, "querier_select_select_fn") defer span.Finish() set, stats, err := q.selectFn(ctx, hints, ms...) if err != nil { promise <- storage.ErrSeriesSet(err) return } q.seriesStatsReporter(stats) promise <- set }() return &lazySeriesSet{create: func() (storage.SeriesSet, bool) { defer cancel() defer span.Finish() // Only gets called once, for the first Next() call of the series set. set, ok := <-promise if !ok { return storage.ErrSeriesSet(errors.New("channel closed before a value received")), false } return set, set.Next() }} } func (q *querier) selectFn(ctx context.Context, hints *storage.SelectHints, ms ...*labels.Matcher) (storage.SeriesSet, storepb.SeriesStatsCounter, error) { sms, err := storepb.PromMatchersToMatchers(ms...) if err != nil { return nil, storepb.SeriesStatsCounter{}, errors.Wrap(err, "convert matchers") } aggrs := aggrsFromFunc(hints.Func) // TODO(bwplotka): Pass it using the SeriesRequest instead of relying on context. ctx = context.WithValue(ctx, store.StoreMatcherKey, q.storeDebugMatchers) // TODO(bwplotka): Use inprocess gRPC when we want to stream responses. // Currently streaming won't help due to nature of the both PromQL engine which // pulls all series before computations anyway. resp := &seriesServer{ctx: ctx} req := storepb.SeriesRequest{ MinTime: hints.Start, MaxTime: hints.End, Matchers: sms, MaxResolutionWindow: q.maxResolutionMillis, Aggregates: aggrs, ShardInfo: q.shardInfo, PartialResponseStrategy: q.partialResponseStrategy, SkipChunks: q.skipChunks, } if q.isDedupEnabled() { // Soft ask to sort without replica labels and push them at the end of labelset. req.WithoutReplicaLabels = q.replicaLabels } if err := q.proxy.Series(&req, resp); err != nil { return nil, storepb.SeriesStatsCounter{}, errors.Wrap(err, "proxy Series()") } warns := annotations.New().Merge(resp.warnings) if !q.isDedupEnabled() { return NewPromSeriesSet( newStoreSeriesSet(resp.seriesSet), q.mint, q.maxt, aggrs, warns, ), resp.seriesSetStats, nil } // TODO(bwplotka): Move to deduplication on chunk level inside promSeriesSet, similar to what we have in dedup.NewDedupChunkMerger(). // This however require big refactor, caring about correct AggrChunk to iterator conversion and counter reset apply. // For now we apply simple logic that splits potential overlapping chunks into separate replica series, so we can split the work. set := NewPromSeriesSet( dedup.NewOverlapSplit(newStoreSeriesSet(resp.seriesSet)), q.mint, q.maxt, aggrs, warns, ) return dedup.NewSeriesSet(set, hints.Func), resp.seriesSetStats, nil } // LabelValues returns all potential values for a label name. func (q *querier) LabelValues(ctx context.Context, name string, _ *storage.LabelHints, matchers ...*labels.Matcher) ([]string, annotations.Annotations, error) { span, ctx := tracing.StartSpan(ctx, "querier_label_values") defer span.Finish() // TODO(bwplotka): Pass it using the SeriesRequest instead of relying on context. ctx = context.WithValue(ctx, store.StoreMatcherKey, q.storeDebugMatchers) pbMatchers, err := storepb.PromMatchersToMatchers(matchers...) if err != nil { return nil, nil, errors.Wrap(err, "converting prom matchers to storepb matchers") } req := &storepb.LabelValuesRequest{ Label: name, PartialResponseStrategy: q.partialResponseStrategy, Start: q.mint, End: q.maxt, Matchers: pbMatchers, } if q.isDedupEnabled() { req.WithoutReplicaLabels = q.replicaLabels } resp, err := q.proxy.LabelValues(ctx, req) if err != nil { return nil, nil, errors.Wrap(err, "proxy LabelValues()") } var warns annotations.Annotations for _, w := range resp.Warnings { warns.Add(errors.New(w)) } return resp.Values, warns, nil } // LabelNames returns all the unique label names present in the block in sorted order constrained // by the given matchers. func (q *querier) LabelNames(ctx context.Context, _ *storage.LabelHints, matchers ...*labels.Matcher) ([]string, annotations.Annotations, error) { span, ctx := tracing.StartSpan(ctx, "querier_label_names") defer span.Finish() // TODO(bwplotka): Pass it using the SeriesRequest instead of relying on context. ctx = context.WithValue(ctx, store.StoreMatcherKey, q.storeDebugMatchers) pbMatchers, err := storepb.PromMatchersToMatchers(matchers...) if err != nil { return nil, nil, errors.Wrap(err, "converting prom matchers to storepb matchers") } req := &storepb.LabelNamesRequest{ PartialResponseStrategy: q.partialResponseStrategy, Start: q.mint, End: q.maxt, Matchers: pbMatchers, } if q.isDedupEnabled() { req.WithoutReplicaLabels = q.replicaLabels } resp, err := q.proxy.LabelNames(ctx, req) if err != nil { return nil, nil, errors.Wrap(err, "proxy LabelNames()") } var warns annotations.Annotations for _, w := range resp.Warnings { warns.Add(errors.New(w)) } return resp.Names, warns, nil } func (q *querier) Close() error { return nil } ```
```go // // // 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 credentials implements gRPC credential interface with etcd specific logic. // e.g., client handshake with custom authority parameter package credentials import ( "context" "crypto/tls" "net" "sync" "go.etcd.io/etcd/clientv3/balancer/resolver/endpoint" "go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes" grpccredentials "google.golang.org/grpc/credentials" ) // Config defines gRPC credential configuration. type Config struct { TLSConfig *tls.Config } // Bundle defines gRPC credential interface. type Bundle interface { grpccredentials.Bundle UpdateAuthToken(token string) } // NewBundle constructs a new gRPC credential bundle. func NewBundle(cfg Config) Bundle { return &bundle{ tc: newTransportCredential(cfg.TLSConfig), rc: newPerRPCCredential(), } } // bundle implements "grpccredentials.Bundle" interface. type bundle struct { tc *transportCredential rc *perRPCCredential } func (b *bundle) TransportCredentials() grpccredentials.TransportCredentials { return b.tc } func (b *bundle) PerRPCCredentials() grpccredentials.PerRPCCredentials { return b.rc } func (b *bundle) NewWithMode(mode string) (grpccredentials.Bundle, error) { // no-op return nil, nil } // transportCredential implements "grpccredentials.TransportCredentials" interface. // transportCredential wraps TransportCredentials to track which // addresses are dialed for which endpoints, and then sets the authority when checking the endpoint's cert to the // hostname or IP of the dialed endpoint. // This is a workaround of a gRPC load balancer issue. gRPC uses the dialed target's service name as the authority when // checking all endpoint certs, which does not work for etcd servers using their hostname or IP as the Subject Alternative Name // in their TLS certs. // To enable, include both WithTransportCredentials(creds) and WithContextDialer(creds.Dialer) // when dialing. type transportCredential struct { gtc grpccredentials.TransportCredentials mu sync.Mutex // addrToEndpoint maps from the connection addresses that are dialed to the hostname or IP of the // endpoint provided to the dialer when dialing addrToEndpoint map[string]string } func newTransportCredential(cfg *tls.Config) *transportCredential { return &transportCredential{ gtc: grpccredentials.NewTLS(cfg), addrToEndpoint: map[string]string{}, } } func (tc *transportCredential) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (net.Conn, grpccredentials.AuthInfo, error) { // Set the authority when checking the endpoint's cert to the hostname or IP of the dialed endpoint tc.mu.Lock() dialEp, ok := tc.addrToEndpoint[rawConn.RemoteAddr().String()] tc.mu.Unlock() if ok { _, host, _ := endpoint.ParseEndpoint(dialEp) authority = host } return tc.gtc.ClientHandshake(ctx, authority, rawConn) } // return true if given string is an IP. func isIP(ep string) bool { return net.ParseIP(ep) != nil } func (tc *transportCredential) ServerHandshake(rawConn net.Conn) (net.Conn, grpccredentials.AuthInfo, error) { return tc.gtc.ServerHandshake(rawConn) } func (tc *transportCredential) Info() grpccredentials.ProtocolInfo { return tc.gtc.Info() } func (tc *transportCredential) Clone() grpccredentials.TransportCredentials { copy := map[string]string{} tc.mu.Lock() for k, v := range tc.addrToEndpoint { copy[k] = v } tc.mu.Unlock() return &transportCredential{ gtc: tc.gtc.Clone(), addrToEndpoint: copy, } } func (tc *transportCredential) OverrideServerName(serverNameOverride string) error { return tc.gtc.OverrideServerName(serverNameOverride) } func (tc *transportCredential) Dialer(ctx context.Context, dialEp string) (net.Conn, error) { // Keep track of which addresses are dialed for which endpoints conn, err := endpoint.Dialer(ctx, dialEp) if conn != nil { tc.mu.Lock() tc.addrToEndpoint[conn.RemoteAddr().String()] = dialEp tc.mu.Unlock() } return conn, err } // perRPCCredential implements "grpccredentials.PerRPCCredentials" interface. type perRPCCredential struct { authToken string authTokenMu sync.RWMutex } func newPerRPCCredential() *perRPCCredential { return &perRPCCredential{} } func (rc *perRPCCredential) RequireTransportSecurity() bool { return false } func (rc *perRPCCredential) GetRequestMetadata(ctx context.Context, s ...string) (map[string]string, error) { rc.authTokenMu.RLock() authToken := rc.authToken rc.authTokenMu.RUnlock() return map[string]string{rpctypes.TokenFieldNameGRPC: authToken}, nil } func (b *bundle) UpdateAuthToken(token string) { if b.rc == nil { return } b.rc.UpdateAuthToken(token) } func (rc *perRPCCredential) UpdateAuthToken(token string) { rc.authTokenMu.Lock() rc.authToken = token rc.authTokenMu.Unlock() } ```
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\BeyondCorp; class ListAppGatewaysResponse extends \Google\Collection { protected $collection_key = 'unreachable'; protected $appGatewaysType = AppGateway::class; protected $appGatewaysDataType = 'array'; /** * @var string */ public $nextPageToken; /** * @var string[] */ public $unreachable; /** * @param AppGateway[] */ public function setAppGateways($appGateways) { $this->appGateways = $appGateways; } /** * @return AppGateway[] */ public function getAppGateways() { return $this->appGateways; } /** * @param string */ public function setNextPageToken($nextPageToken) { $this->nextPageToken = $nextPageToken; } /** * @return string */ public function getNextPageToken() { return $this->nextPageToken; } /** * @param string[] */ public function setUnreachable($unreachable) { $this->unreachable = $unreachable; } /** * @return string[] */ public function getUnreachable() { return $this->unreachable; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ListAppGatewaysResponse::class, 'Google_Service_BeyondCorp_ListAppGatewaysResponse'); ```
Daniel S. Delp (born December 26, 1964) was a Republican member of the Pennsylvania State Senate for the 28th District from 1985 to 1988. Life Born in York, Pennsylvania on December 26, 1964, Delp earned a degree in chemistry from Lebanon Valley College and an engineering degree from Penn State-Reading. Delp was elected to represent the state's 28th senatorial district in 1994. He did not run for re-election in 1998 after he was prosecuted for hiring an underage prostitute and buying her alcohol with his Senate expense account. References External links Pennsylvania State Senate profile Living people 1964 births Politicians from York County, Pennsylvania Pennsylvania state senators Pennsylvania politicians convicted of crimes
```yaml # # # 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. # This YAML file contains all RBAC objects that are necessary to run external # CSI resizer. # # In production, each CSI driver deployment has to be customized: # - to avoid conflicts, use non-default namespace and different names # for non-namespaced entities like the ClusterRole # - decide whether the deployment replicates the external CSI # resizer, in which case leadership election must be enabled; # this influences the RBAC setup, see below apiVersion: v1 kind: ServiceAccount metadata: name: csi-resizer namespace: kube-system --- # Resizer must be able to work with PVCs, PVs, SCs. kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: external-resizer-runner rules: # The following rule should be uncommented for plugins that require secrets # for provisioning. # - apiGroups: [""] # resources: ["secrets"] # verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["persistentvolumes"] verbs: ["get", "list", "watch", "patch"] - apiGroups: [""] resources: ["persistentvolumeclaims"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["pods"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["persistentvolumeclaims/status"] verbs: ["patch"] - apiGroups: [""] resources: ["events"] verbs: ["list", "watch", "create", "update", "patch"] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: csi-resizer-role subjects: - kind: ServiceAccount name: csi-resizer namespace: kube-system roleRef: kind: ClusterRole name: external-resizer-runner apiGroup: rbac.authorization.k8s.io --- # Resizer must be able to work with `leases` in current namespace # if (and only if) leadership election is enabled kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: namespace: kube-system name: external-resizer-cfg rules: - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "watch", "list", "delete", "update", "create"] --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: csi-resizer-role-cfg namespace: kube-system subjects: - kind: ServiceAccount name: csi-resizer namespace: kube-system roleRef: kind: Role name: external-resizer-cfg apiGroup: rbac.authorization.k8s.io ```
```xml export { ConfigureForm } from './ConfigureForm'; ```
```yaml description: STMicroelectronics MPXXDTYY digital PDM microphone family compatible: "st,mpxxdtyy" include: i2s-device.yaml ```
```ruby # typed: strict # frozen_string_literal: true require "abstract_command" require "shell_command" module Homebrew module Cmd class Update < AbstractCommand include ShellCommand cmd_args do description <<~EOS Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations. EOS switch "--merge", description: "Use `git merge` to apply updates (rather than `git rebase`)." switch "--auto-update", description: "Run on auto-updates (e.g. before `brew install`). Skips some slower steps." switch "-f", "--force", description: "Always do a slower, full update check (even if unnecessary)." switch "-q", "--quiet", description: "Make some output more quiet." switch "-v", "--verbose", description: "Print the directories checked and `git` operations performed." switch "-d", "--debug", description: "Display a trace of all shell commands as they are executed." end end end end ```
Felipe Castaldo Curcio (born 8 June 1993) is a Brazilian professional footballer of Italian descent who plays as a midfielder. He also holds Italian citizenship. Club career He made his Serie C debut for Foggia on 21 September 2014 in a game against Benevento. On 23 January 2020, he signed a contract with Salernitana until the end of 2019–20 season with an option to extend it for two more seasons. On 5 October 2020, he was loaned to Padova. References External links 1993 births Living people Sportspeople from Jundiaí Brazilian people of Italian descent Footballers from São Paulo (state) Brazilian men's footballers Men's association football midfielders Cianorte Futebol Clube players Serie B players Serie C players Calcio Foggia 1920 players Lupa Roma FC players ASD Martina Calcio 1947 players Fidelis Andria 2018 players Brescia Calcio players US Salernitana 1919 players Calcio Padova players Brazilian expatriate men's footballers Brazilian expatriate sportspeople in Italy Expatriate men's footballers in Italy
```objective-c /* * WARNING: do not edit! * Generated by util/mkbuildinf.pl * * * in the file LICENSE in the source distribution or at * path_to_url */ #define PLATFORM "platform: linux64-loongarch64" #define DATE "built on: Wed Jan 31 13:08:49 2024 UTC" /* * Generate compiler_flags as an array of individual characters. This is a * workaround for the situation where CFLAGS gets too long for a C90 string * literal */ static const char compiler_flags[] = { 'c','o','m','p','i','l','e','r',':',' ','g','c','c',' ','-','f', 'P','I','C',' ','-','p','t','h','r','e','a','d',' ','-','W','a', 'l','l',' ','-','O','3',' ','-','D','O','P','E','N','S','S','L', '_','U','S','E','_','N','O','D','E','L','E','T','E',' ','-','D', 'O','P','E','N','S','S','L','_','P','I','C',' ','-','D','O','P', 'E','N','S','S','L','_','B','U','I','L','D','I','N','G','_','O', 'P','E','N','S','S','L',' ','-','D','N','D','E','B','U','G','\0' }; ```
```go // mgo - MongoDB driver for Go // // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this // list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package mgo type queue struct { elems []interface{} nelems, popi, pushi int } func (q *queue) Len() int { return q.nelems } func (q *queue) Push(elem interface{}) { //debugf("Pushing(pushi=%d popi=%d cap=%d): %#v\n", // q.pushi, q.popi, len(q.elems), elem) if q.nelems == len(q.elems) { q.expand() } q.elems[q.pushi] = elem q.nelems++ q.pushi = (q.pushi + 1) % len(q.elems) //debugf(" Pushed(pushi=%d popi=%d cap=%d): %#v\n", // q.pushi, q.popi, len(q.elems), elem) } func (q *queue) Pop() (elem interface{}) { //debugf("Popping(pushi=%d popi=%d cap=%d)\n", // q.pushi, q.popi, len(q.elems)) if q.nelems == 0 { return nil } elem = q.elems[q.popi] q.elems[q.popi] = nil // Help GC. q.nelems-- q.popi = (q.popi + 1) % len(q.elems) //debugf(" Popped(pushi=%d popi=%d cap=%d): %#v\n", // q.pushi, q.popi, len(q.elems), elem) return elem } func (q *queue) expand() { curcap := len(q.elems) var newcap int if curcap == 0 { newcap = 8 } else if curcap < 1024 { newcap = curcap * 2 } else { newcap = curcap + (curcap / 4) } elems := make([]interface{}, newcap) if q.popi == 0 { copy(elems, q.elems) q.pushi = curcap } else { newpopi := newcap - (curcap - q.popi) copy(elems, q.elems[:q.popi]) copy(elems[newpopi:], q.elems[q.popi:]) q.popi = newpopi } for i := range q.elems { q.elems[i] = nil // Help GC. } q.elems = elems } ```
```c /* * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other materials provided * with the distribution. * * 3. Neither the name of the copyright holder nor the names of its contributors may be used to * endorse or promote products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * The bitcode format tests are also executed on linux, leading to a dependency issue, because * kernel32.dll file is missing. To resolve this issue, we introduce a dummy dll that can be * used instead. The file requires an empty _DllMainCRTStatup function to correctly load. * * The dll can be compiled by executing the following command: * `clang.cmd kernel32.c -shared -emit-llvm -o KERNEL32.dll -nostdlib` */ void _DllMainCRTStartup() { } ```
Satisfaction 1720 () is a Danish feature film directed by Henrik Ruben Genz. The drama takes place in 1720 and follows the acclaimed Danish-Norwegian Vice-Admiral Peter Tordenskjold at the end of his life, after the Great Nordic War, when he embarks on a proposal journey with his butler Kold. The script is written by Erlend Loe. The film is produced by Nimbus film with co-producers in the Czech Republic, Norway and Sweden. Plot Tordenskjold has been appointed Vice-Admiral after the war against Sweden. He is extremely restless after a period of the successful naval battles. He is a prominent hero in Denmark and a draw in the corporate world. His butler Kold works as the hero's impressionario and arranges his visits to suitable companies. Kold also tries to arrange a marriage with a rich English noblewoman for him. To meet her, he travels through southern Jutland, to some of the great cities of northern Germany. But when he reaches Hanover, he is tricked into a duel, apparently arranged by vengeful Swedes. Cast Jakob Oftebro as Tordenskjold Martin Buch as butler Kold Natalie Madueño as Leonora Ployart Kenneth M. Christensen as captain Ployart David Dencik as doctor Mabuse Björn Kjellman as Axel Staël von Holstein Martin Greis as king Frederick IV of Denmark References External links 2016 films 2016 drama films Films directed by Henrik Ruben Genz Danish drama films 2010s Danish-language films
```smalltalk using System; using System.IO; using Blazorise.Bootstrap5; using Blazorise.Icons.FontAwesome; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Extensions.DependencyInjection; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; using Microsoft.OpenApi.Models; using MyCompanyName.MyProjectName.Blazor.Server.Components; using MyCompanyName.MyProjectName.Blazor.Server.Menus; using MyCompanyName.MyProjectName.EntityFrameworkCore; using MyCompanyName.MyProjectName.Localization; using MyCompanyName.MyProjectName.MultiTenancy; using OpenIddict.Validation.AspNetCore; using Volo.Abp; using Volo.Abp.Account.Web; using Volo.Abp.AspNetCore.Components.Web; using Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme; using Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite; using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite.Bundling; using Volo.Abp.AspNetCore.Components.Web.Theming.Routing; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; using Volo.Abp.AutoMapper; using Volo.Abp.Identity.Blazor.Server; using Volo.Abp.Modularity; using Volo.Abp.Security.Claims; using Volo.Abp.SettingManagement.Blazor.Server; using Volo.Abp.Swashbuckle; using Volo.Abp.TenantManagement.Blazor.Server; using Volo.Abp.OpenIddict; using Volo.Abp.UI; using Volo.Abp.UI.Navigation; using Volo.Abp.UI.Navigation.Urls; using Volo.Abp.VirtualFileSystem; namespace MyCompanyName.MyProjectName.Blazor.Server; [DependsOn( typeof(MyProjectNameApplicationModule), typeof(MyProjectNameEntityFrameworkCoreModule), typeof(MyProjectNameHttpApiModule), typeof(AbpAutofacModule), typeof(AbpSwashbuckleModule), typeof(AbpAspNetCoreSerilogModule), typeof(AbpAccountWebOpenIddictModule), typeof(AbpAspNetCoreComponentsServerLeptonXLiteThemeModule), typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule), typeof(AbpIdentityBlazorServerModule), typeof(AbpTenantManagementBlazorServerModule), typeof(AbpSettingManagementBlazorServerModule) )] public class MyProjectNameBlazorModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) { var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.GetConfiguration(); context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options => { options.AddAssemblyResource( typeof(MyProjectNameResource), typeof(MyProjectNameDomainModule).Assembly, typeof(MyProjectNameDomainSharedModule).Assembly, typeof(MyProjectNameApplicationModule).Assembly, typeof(MyProjectNameApplicationContractsModule).Assembly, typeof(MyProjectNameBlazorModule).Assembly ); }); PreConfigure<OpenIddictBuilder>(builder => { builder.AddValidation(options => { options.AddAudiences("MyProjectName"); options.UseLocalServer(); options.UseAspNetCore(); }); }); if (!hostingEnvironment.IsDevelopment()) { PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => { options.AddDevelopmentEncryptionAndSigningCertificate = false; }); PreConfigure<OpenIddictServerBuilder>(serverBuilder => { serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000"); }); } PreConfigure<AbpAspNetCoreComponentsWebOptions>(options => { options.IsBlazorWebApp = true; }); } public override void ConfigureServices(ServiceConfigurationContext context) { var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.GetConfiguration(); // Add services to the container. context.Services.AddRazorComponents() .AddInteractiveServerComponents(); ConfigureAuthentication(context); ConfigureUrls(configuration); ConfigureBundles(); ConfigureAutoMapper(); ConfigureVirtualFileSystem(hostingEnvironment); ConfigureSwaggerServices(context.Services); ConfigureAutoApiControllers(); ConfigureBlazorise(context); ConfigureRouter(context); ConfigureMenu(context); } private void ConfigureAuthentication(ServiceConfigurationContext context) { context.Services.ForwardIdentityAuthenticationForBearer(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme); context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options => { options.IsDynamicClaimsEnabled = true; }); } private void ConfigureUrls(IConfiguration configuration) { Configure<AppUrlOptions>(options => { options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"]; options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"]?.Split(',') ?? Array.Empty<string>()); }); } private void ConfigureBundles() { Configure<AbpBundlingOptions>(options => { // MVC UI options.StyleBundles.Configure( LeptonXLiteThemeBundles.Styles.Global, bundle => { bundle.AddFiles("/global-styles.css"); } ); //BLAZOR UI options.StyleBundles.Configure( BlazorLeptonXLiteThemeBundles.Styles.Global, bundle => { bundle.AddFiles("/blazor-global-styles.css"); //You can remove the following line if you don't use Blazor CSS isolation for components bundle.AddFiles(new BundleFile("/MyCompanyName.MyProjectName.Blazor.Server.styles.css", true)); } ); }); } private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment) { if (hostingEnvironment.IsDevelopment()) { Configure<AbpVirtualFileSystemOptions>(options => { //<TEMPLATE-REMOVE> options.FileSets.ReplaceEmbeddedByPhysical<AbpUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<AbpAspNetCoreMvcUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<AbpAspNetCoreMvcUiBootstrapModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Bootstrap", Path.DirectorySeparatorChar))); //options.FileSets.ReplaceEmbeddedByPhysical<AbpAspNetCoreMvcUiThemeSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<AbpAspNetCoreMvcUiMultiTenancyModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy", Path.DirectorySeparatorChar))); //options.FileSets.ReplaceEmbeddedByPhysical<AbpPermissionManagementWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}modules{0}permission-management{0}src{0}Volo.Abp.PermissionManagement.Web", Path.DirectorySeparatorChar))); //options.FileSets.ReplaceEmbeddedByPhysical<AbpFeatureManagementWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}modules{0}feature-management{0}src{0}Volo.Abp.FeatureManagement.Web", Path.DirectorySeparatorChar))); //options.FileSets.ReplaceEmbeddedByPhysical<AbpIdentityWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}modules{0}identity{0}src{0}Volo.Abp.Identity.Web", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<AbpAccountWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}modules{0}account{0}src{0}Volo.Abp.Account.Web", Path.DirectorySeparatorChar))); //options.FileSets.ReplaceEmbeddedByPhysical<AbpTenantManagementWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}modules{0}tenant-management{0}src{0}Volo.Abp.TenantManagement.Web", Path.DirectorySeparatorChar))); //</TEMPLATE-REMOVE> options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain.Shared")); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain")); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Application.Contracts")); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Application")); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameBlazorModule>(hostingEnvironment.ContentRootPath); }); } } private void ConfigureSwaggerServices(IServiceCollection services) { services.AddAbpSwaggerGen( options => { options.SwaggerDoc("v1", new OpenApiInfo { Title = "MyProjectName API", Version = "v1" }); options.DocInclusionPredicate((docName, description) => true); options.CustomSchemaIds(type => type.FullName); } ); } private void ConfigureBlazorise(ServiceConfigurationContext context) { context.Services .AddBootstrap5Providers() .AddFontAwesomeIcons(); } private void ConfigureMenu(ServiceConfigurationContext context) { Configure<AbpNavigationOptions>(options => { options.MenuContributors.Add(new MyProjectNameMenuContributor()); }); } private void ConfigureRouter(ServiceConfigurationContext context) { Configure<AbpRouterOptions>(options => { options.AppAssembly = typeof(MyProjectNameBlazorModule).Assembly; }); } private void ConfigureAutoApiControllers() { Configure<AbpAspNetCoreMvcOptions>(options => { options.ConventionalControllers.Create(typeof(MyProjectNameApplicationModule).Assembly); }); } private void ConfigureAutoMapper() { Configure<AbpAutoMapperOptions>(options => { options.AddMaps<MyProjectNameBlazorModule>(); }); } public override void OnApplicationInitialization(ApplicationInitializationContext context) { var env = context.GetEnvironment(); var app = context.GetApplicationBuilder(); app.UseAbpRequestLocalization(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseCorrelationId(); app.UseStaticFiles(); app.UseRouting(); app.UseAuthentication(); app.UseAbpOpenIddictValidation(); if (MultiTenancyConsts.IsEnabled) { app.UseMultiTenancy(); } app.UseUnitOfWork(); app.UseDynamicClaims(); app.UseAntiforgery(); app.UseAuthorization(); app.UseSwagger(); app.UseAbpSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "MyProjectName API"); }); app.UseConfiguredEndpoints(builder => { builder.MapRazorComponents<App>() .AddInteractiveServerRenderMode() .AddAdditionalAssemblies(builder.ServiceProvider.GetRequiredService<IOptions<AbpRouterOptions>>().Value.AdditionalAssemblies.ToArray()); }); } } ```
Richard Foerster may refer to: Richard Foerster (classical scholar) (1843–1922), German scholar Richard Foerster (poet) (born 1949), American poet See also Richard Forster (disambiguation)
John Strype (1 November 1643 – 11 December 1737) was an English clergyman, historian and biographer from London. He became a merchant when settling in Petticoat Lane. In his twenties, he became perpetual curate of Theydon Bois, Essex and later became curate of Leyton; this allowed him direct correspondence with several highly notable ecclesiastical figures of his time. He wrote extensively in his later years. Life Born in Houndsditch, London, he was the son of John Strype (or van Stryp) and cousin to sailor and writer Robert Knox. A member of a Huguenot family who, in order to escape religious persecution within Brabant, had settled in East London. Located in what has now become known as Strype Street in Petticoat Lane, he was a merchant and silk throwster. The younger John was educated at St Paul's School, and on 5 July 1662 entered Jesus College, Cambridge; he went on from there to St Catharine's Hall, where he graduated B.A. in 1665 and M.A. in 1669. On 14 July 1669 Strype became perpetual curate of Theydon Bois, and a few months afterwards curate and lecturer of Leyton in the same county. He was never instituted or inducted to the living of St Mary's Church, Leyton, but in 1674 he was licensed by the Bishop of London to preach and expound the word of God, and to perform the office of priest and curate while it was vacant, and until his death he received the profits of it. In 1711 he obtained from Archbishop Thomas Tenison the sinecure of West Tarring, Sussex, and he discharged the duties of lecturer at Hackney from 1689 until 1724. In Hackney, he spent his last years with a married granddaughter, the wife of a surgeon, Thomas Harris, dying there at the age of 94. He was buried in the church at Leyton. Works Through his friendship with Sir William Hicks, Strype obtained access to the papers of Sir Michael Hicks, secretary to Lord Burghley, from which he made extensive transcripts; he also carried on an extensive correspondence with Archbishop William Wake and Bishops Gilbert Burnet, Francis Atterbury and Nicholson. The materials he obtained were used in his historical and biographical works, which relate chiefly to the period of the Protestant Reformation. Most of his original materials have been preserved, and are included among the Lansdowne manuscripts in the British Library. His publications consist historical reference material of considerable value, and are convenient books of reference. Strype's major works are: the Memorials of Thomas Cranmer, Archbishop of Canterbury, 1694 (ed. for the EccI. Hist. Soc., in 3 vols., Oxford, 1848–1854; and in 2 vols. with notes by PE Barnes, London, 1853) Life of the learned Sir Thomas Smith (1698) Life and Acts of John Aylmer, Lord Bishop of London (1701) Life of the learned Sir John Cheke, with his Treatise on Superstition (1705) Annals of the Reformation in England (4 volumes: vol. I 1709–1725; vol. II 1725; vol. III 1728; vol. IV 1731, 2nd ed. 1735, 3rd ed. 1736–1738) Life and Acts of Edmund Grindal, Archbishop of Canterbury (1710) Life and Acts of Matthew Parker, Archbishop of Canterbury (1711) Life and Acts of John Whitgift, Archbishop of Canterbury (1718) A Survey of the Cities of London and Westminster (1720), an updated edition of the original A Survey of London by John Stow (1598, 2nd edition 1603) Ecclesiastical Memorials (5 vols., 1721; 3 vols., 1733). His Historical and Biographical Works were reprinted in 59 vols. at the Clarendon Press, Oxford, between 1812 (Cranmer) and 1824 (Annals). A general index by Robert French Laurence in 2 vols. was added in 1828. Strype also published, besides a number of single sermons, an edition of John Lightfoot's Works (1684); and in 1700 Some genuine Remains of John Lightfoot ... with a large preface concerning the author. Online versions Memorials of the Most Reverend Father in God, Thomas Cranmer, Sometime Lord Archbishop of Canterbury by John Strype (Oxford University Press, 1812): Volume I, Volume II The Life of the Learned Sir Thomas Smith, Kt.D.C.L. by John Strype (Clarendon Press, 1820) Historical Collection of the Life and Acts of John Aylmer by John Strype (1821 ed.) The Life of the Learned Sir John Cheke, Kt. by John Strype (1821 ed.) The Life and Acts of Edmund Grindal by John Strype (1821 ed.) The Life and Acts of Matthew Parker by John Strype (1821 ed.): Volume I, Volume II, Volume III The Life and Acts of John Whitgift, D.D. by John Strype (1822 ed.): Volume I,Volume II, Volume III Ecclesiastical Memorials, Relating Chiefly to Religion, and the Reformation of It, and the Emergencies of the Church of England, Under King Henry VIII, King Edward VI, and Queen Mary I by John Strype (Clarendon Press, 1822): Vol. I, Pt. I, Vol. I, Pt. II, Vol. II, Pt. I, Vol. II, Pt. II, Vol. III, Pt. I, Vol. III, Pt. II Annals of the Reformation and Establishment of Religion, and Other Various Occurrences in the Church of England, During Queen Elizabeth's Happy Reign by John Strype (1824 ed.): Vol. I, Pt. I, Vol. I, Pt. II, Vol. II, Pt. I, Vol. II., Pt. II, Vol. III, Pt. I, Vol. III, Pt. II, Vol. IV References Sources External links An electronic edition of John Strype's A SURVEY OF THE CITIES OF London and Westminster 1643 births 1737 deaths 17th-century English Anglican priests 18th-century English Anglican priests People educated at St Paul's School, London Alumni of Jesus College, Cambridge Alumni of St Catharine's College, Cambridge 17th-century English historians English male non-fiction writers 18th-century English historians 17th-century Anglican theologians 18th-century Anglican theologians
Michèle Edith A'Court (born 1961) is a New Zealand comedian, writer and feminist. She has toured New Zealand and international venues with her standup comedy shows and in 2010 was awarded the Female Comedian of the Decade at the NZ Comedy Guild Awards. A'Court has appeared in many TV shows since the late 1980s including What Now, 7Days and The Project. She is a regular columnist with The Spinoff and the author of two books. She was appointed an Officer of the New Zealand Order of Merit, for services to the entertainment and comedy industries, in the 2023 New Year Honours. Biography A'Court trained in journalism, and has a degree in English literature and drama from Victoria University of Wellington. In the mid-1980s she worked as a TVNZ publicist. She then got a job as a host on children's television show What Now starting in 1987. She saw comedy as a vehicle for social activism as a feminist as well as making people feel 'better about life'. When she was young was inspired by the comedy of Danny Kaye and Carol Burnett. When she started doing stand-up comedy in the 1990s there were very few women. A'Court acknowledged in 2022 the fight for women to get a fairer representation as performers was continuing and also recognised that now comedy billing that used to be often one women per show are now often a 50:50 ratio. In stand-up A'Court has toured New Zealand and performed around the world including Las Vegas, Edinburgh, and Vancouver. A'Court supported the comedy industry of New Zealand by establishing the New Zealand Comedy Guild and she was the chairperson from 1999 to 2006. Since 2009 A'Court regularly appears on the comedy TV show 7Days and since 2018 has been a regular host on the current affairs programme The Project (both on the New Zealand Three TV channel). Some recent stand-up comedy performances include headlining Mt Eden Comedy with Michele A'Court in 2015, and Friday Laughs in 2022 alongside her husband, comedian Jeremy Elwood. A'Court has written two books. Her first book, Stuff I Forgot To Tell My Daughter (2015), was based on her stand-up comedy show of the same name. A'Court has written guest columns for Stuff and is a guest writer for The Spinoff. Books Stuff I Forgot To Tell My Daughter (2015) How We Met (2018) Foreword – Funny As: The Story of New Zealand Comedy Selected screenography L&P Top Town (1986) Final What Now? (1987–1988), Presenter, Writer – Television Choice Not Chance (1992), Presenter – Short Film Pulp Comedy (1995–2003), Subject – Television Comedy Central (1995–1997), As: Various roles – Television Newsflash (1998), Writer – Television A Kiwi Christmas (1998), Narrator – Television Teen Sex (2005), Narrator – Television Breakfast (2006–2008), Presenter – Television Shortland Street (2008–2009), Writer, As: Helen Carson – Television 7 Days (2009) – ongoing, Subject – Television Staines Down Drains – Fool's Gold (2011), Writer, As: Mary–Jane Staines, Herk and Beanz – Television A Night at the Classic (2012), As: Michele – Television Go Girls (2013), As: Miriam Hirsch – Television Funny As: The Story of New Zealand Comedy (2019), Subject – Television The Project (2018) – ongoing, Presenter – Television On the Rag (2019–2022), Presenter – Web Awards and nominations Special Recognition Award for Excellence in Presentation (1991): Choice Not Chance ITVA Awards (New Zealand arm of the International Television Association) Female Comedian of the Decade (2010) New Zealand Comedy Awards (NZ Comedy Guild) VAC Reilly Award for Excellence in Comedy (2015) Nominated – Best Presenter: Entertainment (2020) (with Leonie Hayden and Alex Casey): On the Rag New Zealand Television Awards Appointed Officer of the New Zealand Order of Merit in the 2023 New Year Honours, for services to the entertainment and comedy industries Personal life A'Court lives in Auckland and is married to comedian Jeremy Elwood. References 1961 births Living people New Zealand entertainers 21st-century New Zealand writers 21st-century New Zealand women writers 21st-century New Zealand non-fiction writers Officers of the New Zealand Order of Merit New Zealand women comedians New Zealand comedians New Zealand stand-up comedians Victoria University of Wellington alumni
```javascript /* eslint-env jest */ import { nextBuild, nextServer, startApp, stopApp } from 'next-test-utils' import webdriver from 'next-webdriver' import { join } from 'path' jest.setTimeout(1000 * 60 * 2) let appPort let app let server describe('Top Level Error', () => { ;(process.env.TURBOPACK_DEV ? describe.skip : describe)( 'production mode', () => { beforeAll(async () => { const appDir = join(__dirname, '../') await nextBuild(appDir) app = nextServer({ dir: appDir, dev: false, quiet: true, }) server = await startApp(app) appPort = server.address().port }) afterAll(() => stopApp(server)) it('should render error page', async () => { const browser = await webdriver(appPort, '/') try { const text = await browser.waitForElementByCss('#error-p').text() expect(text).toBe('Error Rendered') } finally { await browser.close() } }) } ) }) ```
Zipp McCoy Duncan (born July 15, 1987) is a former American football guard. He was signed by the Philadelphia Eagles as an undrafted free agent in 2010. He played college football at Kentucky. Duncan was also a member of the Edmonton Eskimos, Dallas Vigilantes and Philadelphia Soul. Early years Duncan was born and raised in Magnolia, Kentucky. He is the son of Steve and Fonda Duncan. Duncan has three younger siblings Drey, Christian, and Christina Duncan. Zipp attended Elizabethtown High School in Elizabethtown, Kentucky and graduated in 2005, along with football teammates Brandon Deaderick and Chris Todd. Duncan played under his father Steve Duncan who was an assistant coach. Duncans father also coached at Ft. Knox, Lone Oak high school and Murray High School. College career Duncan played college football at the University of Kentucky. He played in 12 games as a tight end before switching over to the offensive line in 2007. As a senior in 2009, Duncan earned second-team All-SEC honors as a left tackle. Professional career Philadelphia Eagles Duncan was signed by the Philadelphia Eagles as an undrafted free agent following the 2010 NFL Draft on April 26, 2010. He was waived on August 28. Present day He is a football coach at Dublin Jerome High school in Dublin Ohio References External links Philadelphia Eagles bio 1987 births Living people American football offensive guards American football offensive tackles American football tight ends Edmonton Elks players Kentucky Wildcats football players People from Elizabethtown, Kentucky Philadelphia Eagles players Dallas Vigilantes players Philadelphia Soul players
```java package jvmgo.book.ch10; public class ExceptionTest1 { public static void main(String[] args) { test(0); test(1); test(2); test(3); } private static void test(int x) { try { if (x == 0) { throw new IllegalArgumentException("0!"); } if (x == 1) { throw new RuntimeException("1!"); } if (x == 2) { throw new Exception("2!"); } } catch (IllegalArgumentException e) { System.out.println(e.getMessage()); } catch (RuntimeException e) { System.out.println(e.getMessage()); } catch (Exception e) { System.out.println(e.getMessage()); } finally { System.out.println(x); } } } ```
```objective-c /* -*- mode: objc -*- */ // // Project: Workspace // // Description: The FileOperation main function. // // // This application is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public // // This application 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 GNU // // You should have received a copy of the GNU General Public // Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. // #import <Foundation/Foundation.h> #import "../Communicator.h" #import "Copy.h" #import "Move.h" #import "Link.h" #import "Delete.h" BOOL isStopped; void PrintHelp(void) { printf("Usage: FileOperation <options>\n\n" "Options:" " -Operation Copy|Move|Link|Delete \n" " -Source directory \n" " -Files (Source, Filename, Array) \n" " -Destination directory \n"); } void SignalHandler(int sig) { // if (sig == SIGTERM) // fprintf(stderr, "FileOperation.tool: received TERMINATE signal\n"); if (sig == SIGINT) { fprintf(stderr, "FileMover.tool: received INTERRUPT signal\n"); StopOperation(); } } void StopOperation() { isStopped = YES; } int main(int argc, const char **argv) { NSString *op; NSString *source; NSString *dest; NSArray *files; NSUserDefaults *df; BOOL argsOK = YES; CREATE_AUTORELEASE_POOL(pool); // Signals signal(SIGINT, SignalHandler); // signal(SIGTERM, SignalHandler); // Get args df = [NSUserDefaults standardUserDefaults]; op = [df objectForKey:@"Operation"]; source = [df objectForKey:@"Source"]; dest = [df objectForKey:@"Destination"]; // files = [df objectForKey:@"Files"]; files = [[[[NSProcessInfo processInfo] environment] objectForKey:@"Files"] propertyList]; NSDebugLLog(@"Tools", @"FileMover.tool: files: %@", files); NSDebugLLog(@"Tools", @"FileMover.tool: files count: %lu", [files count]); // Check args if (op == nil || ![op isKindOfClass:[NSString class]]) { printf("FileMover.tool: unknown operation type (-Operation)!\n"); argsOK = NO; } else if (source == nil || ![source isKindOfClass:[NSString class]]) { printf("FileMover.tool: incorrect source path (-Source)!\n"); argsOK = NO; } else if (![op isEqualToString:@"Delete"] && ![op isEqualToString:@"Duplicate"]) { if (dest == nil || ![dest isKindOfClass:[NSString class]]) { printf("FileMover.tool: incorrect destination path (-Destination)!\n"); argsOK = NO; } else if (files == nil || ![files isKindOfClass:[NSArray class]]) { printf("FileMover.tool: incorect file list (-Files)!\n"); argsOK = NO; } } if (argsOK == NO) { PrintHelp(); return 1; } isStopped = NO; if ([op isEqualToString:@"Copy"]) { CopyOperation(source, files, dest, CopyOp); } else if ([op isEqualToString:@"Move"]) { MoveOperation(source, files, dest); } else if ([op isEqualToString:@"Link"]) { LinkOperation(source, files, dest); } else if ([op isEqualToString:@"Duplicate"]) { DuplicateOperation(source, files); // located in Copy.m } else if ([op isEqualToString:@"Delete"]) { DeleteOperation(source, files); } else { printf("FileMover.tool: unknown operation type!\n"); PrintHelp(); return 1; } [[Communicator shared] finishOperation:op stopped:isStopped]; DESTROY(pool); return 0; } ```
```python import unittest from ray.rllib.env.wrappers.group_agents_wrapper import GroupAgentsWrapper from ray.rllib.env.multi_agent_env import make_multi_agent class TestGroupAgentsWrapper(unittest.TestCase): def test_group_agents_wrapper(self): MultiAgentCartPole = make_multi_agent("CartPole-v1") grouped_ma_cartpole = GroupAgentsWrapper( env=MultiAgentCartPole({"num_agents": 4}), groups={"group1": [0, 1], "group2": [2, 3]}, ) obs, _ = grouped_ma_cartpole.reset() self.assertTrue(len(obs) == 2) self.assertTrue("group1" in obs and "group2" in obs) self.assertTrue(isinstance(obs["group1"], list) and len(obs["group1"]) == 2) self.assertTrue(isinstance(obs["group2"], list) and len(obs["group2"]) == 2) if __name__ == "__main__": import sys import pytest sys.exit(pytest.main(["-v", __file__])) ```
Rebecca Pan Di-hua (; also Poon Tik-wah, Pan Wan Ching) is a Hong Kong actress and singer. Early life She was born in Shanghai on 29 December 1931 and moved to Hong Kong in 1949. Career Her singing career began in 1957. One of her songs, which she recorded when she was 18, is played briefly in In the Mood for Love — the English version of an Indonesian folk song, "Bengawan Solo". Discography 《Pan Wan Ching Sings The Four Seasons 潘迪華與世界名曲》, Diamond Records LP1004, 1961. 《Oriental Pearls》, Diamond Records LP1006, 1962. Recorded with the Diamond Studio Orchestra conducted by Vic Christobal. 《The Exciting Rebecca Pan 我的心.潘迪華》, Diamond Records LP1009, 1963. 《我愛你 (I Love You)》, Diamond Records LP1013, 1964. 《潘迪華唱 (Rebecca Pan Sings)》, Diamond Records LP1017, 1965. 《I Am Yours‧Japanese Good-Day Baby‧Till‧First Night Of The Full Moon》, Life Records EP-2001, 1965. 《Tropical Love Song‧Pachanga‧I Could Have Danced All Night‧Chit Chit Rit Chit》, Life Records EP-2002, 1965. 《Pan Wan Ching Greatest Hits! 潘迪華 1965 最新名曲》, Life Records LP-9001/LSP-9001, 1965. 《潘迪華 - 花弄影‧我永遠等着你》, EMI Parlophone Records, 1965. 《Rebecca Pan Wan-Ching.Rendezvous On Bridge 潘迪華.情人橋》, EMI Pathe Records 7EPA-182, 1965. 《Rebecca Pan 潘迪華.When You Were Mine》, EMI Columbia Records ECHK 507, 1966. 《Rebecca Pan.Essence Of Love 潘迪華.給我一杯愛的咖啡》, EMI Pathe Records S-CPAX-329, 1967. 《Rebecca Pan.A Man And A Woman 潘迪華.男歡女愛》, EMI Angel Records S-3AEX-326, 1968. 《Rebecca Pan.Moonlit Villa 潘迪華.月滿西樓》, EMI Angel Records, 1968. 《潘迪華.東方時代曲 Vol. 1》, Life Records, 1969. 《Rebecca Pan.How Strange 潘迪華.真稀奇》, Life Records LSP-9005, 1969. 《Rebecca Pan》, Life Records LELP 1, 1969. 《我又想起你》, Life Records LSP-9013, 1970. 《Hong Kong Sound With Rebecca Pan》, Sounds Of Asia Records SOA 001, 1970. 《Rebecca Live In The Eagle's Nest》, Life Records, 1971. 《潘迪華.今夜忘不了》, Yangtze Music YTZEP 301, 1971. 《白孃孃 Pai Niang Niang》, EMI Regal Recordings, 1973 《White Christmas.Rebecca Pan & The Voices Of Maryknoll》, Man Chi Records MCLP-10201, 1974. Filmography as actress Look for a Star (2009) - Sam's Mother Chinese Odyssey 2002 (2002) - Queen Mother In the Mood for Love (2000) - Mrs. Suen Flowers of Shanghai (1998) - Huang Days of Being Wild (1990) (as Tik-Wa Poon) - Rebecca Starry Is the Night (1988) The Greatest Lover (1988) - Fiona's Mum See also Cinema of Hong Kong References External links Hong Kong film actresses 20th-century Hong Kong women singers Living people English-language singers from Hong Kong 1931 births Singers from Shanghai Hong Kong television actresses Actresses from Shanghai 20th-century Hong Kong actresses 21st-century Hong Kong actresses Pathé Records (Hong Kong) artists
Non Nước Pagoda is a Buddhist temple in Sóc Sơn, Hanoi. The main attraction is a bronze Buddha. References Buddhist temples in Hanoi
Bonnie Lynn Bernstein (born August 16, 1970) is an Emmy Award-winning American sports journalist and media executive. She has been named one of the most accomplished female sportscasters in history by the American Sportscasters Association, spending nearly 20 years as a reporter and studio host at ESPN, ABC and CBS Sports, covering the NFL, NBA, MLB and college football and basketball. Bernstein is currently the founder and CEO of Walk Swiftly Productions, a multimedia production company specializing in non-scripted sports and entertainment content. Biography Early life and education Bernstein was born in Brooklyn, New York, and grew up in Howell, New Jersey. She was salutatorian of her class at Howell High School, where she is a member of the school’s Hall of Fame. Bernstein was a four-time MVP of the Rebels gymnastics team, and also received varsity letters in indoor track and outdoor track and field, where she competed in hurdles, the 4x400 relay, javelin and shotput. Bernstein attended the University of Maryland, where she graduated magna cum laude with a degree in broadcast journalism. She was a four-time Academic All-America in gymnastics, receiving the Thomas M. Fields award for excellence in academics and athletics. Bernstein maintains close ties to her alma mater, serving on the Board of Visitors for the Philip Merrill College of Journalism at the University of Maryland and the advisory board for the Povich Center for Sports Journalism. Early career Bernstein spent three years climbing the local broadcast ladder, launching her career as the news and sports director at WXJN-FM radio in Lewes, Delaware. She transitioned to television at WMDT-TV in Salisbury, Maryland as the ABC affiliate's weekend news anchor, then became Reno, Nevada's, first-ever female weekday sports anchor at NBC affiliate KRNV-TV. ESPN Bernstein first joined ESPN in 1995 as its Chicago Bureau Chief, where she covered Michael Jordan and the Chicago Bulls' record-setting championship run (1996–98). She also served as a correspondent for Sunday NFL Countdown and College GameDay and filed reports for SportsCenter during the Major League Baseball post-season and the NCAA Women's Division I Basketball Championship. CBS Sports Bernstein joined CBS Sports in 1998 as the lead sideline reporter for the NCAA Men's Basketball Championships and feature reporter for The NFL Today. The following year, she transitioned to sideline reporting for the NFL on CBS. She worked with the Verne Lundquist/Dick Enbergand Dan Dierdorf crew until 2003, when she was promoted to the lead crew of Jim Nantz and Phil Simms. Bernstein covered Super Bowls XXXV and XXXVIII for the network and during Super Bowl XXXVIII, became the first correspondent ever to cover the game for both network television and network radio, filing reports for CBS Sports and Westwood One Radio. Upon signing with CBS/Westwood One Radio in 2001, Bernstein often pulled "double duty" during the NFL season, covering a Sunday game for CBS and Monday Night Football for radio. In addition to her NFL and college basketball duties, Bernstein hosted the NCAA Women's Gymnastics Championship and CBS' Emmy-nominated anthology series, Championships of the NCAA, and served as a studio host for CBS SportsDesk and At The Half, CBS Sports' college basketball halftime studio show. Bernstein also covered tennis, track and field, horse racing and figure skating for the network and  hosted the U.S. Open Tennis Championships studio show and the Hambletonian. Return to ESPN In July 2006, Bernstein rejoined ESPN as the lead college football reporter for ESPN on ABC and the field reporter for Sunday Night Baseball with Jon Miller and Joe Morgan. On October 11, 2006, five days after experiencing severe leg pain while covering the Texas-Oklahoma Red River Rivalry, doctors discovered life-threatening blood clots in both of Bernstein's lungs (pulmonary emboli) that originated in her left leg (deep vein thrombosis). She returned to ESPN and ABC several weeks later, but reduced her travel schedule the following season as a precautionary health measure, shifting focus to studio hosting many of ESPN’s high-profile shows, including NFL Live, Jim Rome Is Burning, Outside the Lines, First Take and College Football Live. Radio hosting In September 2009, Bernstein was named co-host of The Michael Kay Show on 1050 ESPN Radio in New York. She also covered the New York Jets and hosted specialty programming during the 2009–10 NFL playoffs. In July 2010, Bernstein was given her own daily NFL show, New York Football Live, co-hosted by Jets linebacker Greg Buttle. Campus Insiders In April 2013, Bernstein was named vice president of Content and Brand Development for Campus Insiders, a digital partnership between Silver Chalice Ventures, founded by Chicago Bulls and White Sox owner Jerry Reinsdorf, and IMG College, the nation's largest collegiate sports marketing company. Bernstein was also the on-air "face" of the network, hosting daily studio shows during the college football season and NCAA Basketball Championship. Her off-air responsibilities included creating original programming for the network, developing and securing new sponsor partnerships, and designing brand extensions that enhanced the reach of CI's digital and social platforms. Walk Swiftly Productions In January 2017, Bernstein founded Walk Swiftly Productions, where she also serves as CEO. Through WSP and her consultancy, Velvet Hammer Media, Bernstein collaborates with some of sports’ most prominent organizations, including the NCAA and the College Football Playoff (CFP). In 2019, ESPN's docuseries, GOOD GAME: UC Irvine, produced by WSP and executive produced by Bernstein, received the Tempest Award for "Best Esports-Themed Program;", and CMT's Country on Campus received nominations for "Best Music Series" and "Best Sports and Recreation" series at the Cynopsis Short Form Video Awards. Other notable WSP titles include the XFL’s signature series, “For the Love of Football" and the Audible Originals audio series, She Got Game. Other broadcast work Bernstein is the only female ever to solo fill-in host for the award-winning syndicated radio and TV program, The Dan Patrick Show and appears as a guest commentator on several news networks, including NBC, MSNBC and FOX News Channel, to discuss prominent sports stories. Outside endeavors Bernstein's philanthropic efforts focus on two areas: deep vein thrombosis awareness and youth health and wellness. Bernstein has served as the co-national spokesperson for the Coalition to Prevent Deep Vein Thrombosis, raising awareness about the blood disorder she was diagnosed with in 2006. In 2010, she co-chaired the coalition supporting congressional passage of the National Foundation on Fitness, Sports and Nutrition, which raises private funds for childhood obesity initiatives. From 2012-15, Bernstein was a media strategist and national ambassador for ING KiDS ROCK, one of the nation's largest school-based running programs. Bernstein currently servies as a Celebrity Ambassador for the Alliance for a Healthier Generation and Co-Chair of the Advisory Board for Every Kid Sports, a nonprofit that provide grants to cover youth sports league registration fees for children in underserved communities (link). Notes and references External links American television sports announcers American sports radio personalities Howell High School (New Jersey) alumni People from Howell Township, New Jersey Women sports announcers Maryland Terrapins women's gymnasts ESPN people American television reporters and correspondents Sportspeople from Brooklyn Tennis commentators Major League Baseball broadcasters American horse racing announcers Figure skating commentators College football announcers National Football League announcers College basketball announcers in the United States Gymnastics broadcasters Track and field broadcasters 1970 births Living people Jewish American journalists American women television journalists University of Maryland, College Park alumni 21st-century American Jews 21st-century American women
KFGE (98.1 FM) is a radio station broadcasting a country music format licensed to Milford, Nebraska, United States. The station serves the Lincoln area. Studios are located at Broadcast House at 44th Street and East O Street in Lincoln, while its transmitter is located near Utica. It is one of several stations across the United States that uses the "Froggy" branding. The current 98.1 station dates to July 15, 1996. Froggy had been started at 105.3 MHz (now KLNC) on February 3, 1992. Since August 2007, the station has been owned by NRG Media. In August 2007, Triad Broadcasting sold the station, along with its sister stations in the Lincoln market, to NRG. References External links FGE NRG Media radio stations Country radio stations in the United States
Baile Liam or Baile Uilliam is the Irish for "William's town" and may refer to several places in Ireland: Ballywilliam, County Wexford, a village Williamstown, County Galway, a village Williamstown, County Limerick, a townland
```java /* * * This file is part of LibreTorrent. * * LibreTorrent is free software: you can redistribute it and/or modify * (at your option) any later version. * * LibreTorrent 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 LibreTorrent. If not, see <path_to_url */ package org.proninyaroslav.libretorrent.core.model.session; import androidx.core.util.Pair; import org.apache.commons.io.IOUtils; import org.junit.Test; import java.io.InputStream; import java.util.List; import static org.junit.Assert.*; public class IPFilterParserTest { private String dat_file = "# Accept this ranges\n" + "000.000.000.000 - 000.255.255.255 , 000 , Bogon\n" + "2002:0000:0000:0:0:0:0:0 - 2002:00ff:ffff:0:0:0:0:0 , 000 , Bogon\n" + "001.002.004.000 - 001.002.004.255 , 000 , China Internet Information Center (CNNIC)\n" + "001.002.008.000 - 001.002.008.255 , 000 , China Internet Information Center (CNNIC)\n" + "001.009.096.105 - 001.009.096.105 , 000 , Botnet on Telekom Malaysia\n" + "001.009.102.251 - 001.009.102.251 , 000 , Botnet on Telekom Malaysia\n" + "001.009.106.186 - 001.009.106.186 , 000 , Botnet on Telekom Malaysia\n" + "001.016.000.000 - 001.019.255.255 , 000 , Korea Internet & Security Agency (KISA) - IPv6 Policy\n" + "001.055.241.140 - 001.055.241.140 , 000 , Botnet on FPT Telecom\n" + "// Ignore this ranges\n" + "1.093.021.147-001.093.021.147,200,SMSHoax FakeAV Fraud Trojan\n" + "001.093.026.097-001.093.026.97,200,SMSHoax FakeAV Fraud Trojan\n"; private String p2p_file = "# This is a comment\n" + "Bogon : 000.000.000.000 - 000.255.255.255\n" + "China Internet Information Center (CNNIC) : 001.002.004.000 - 001.002.004.255\n" + "China Internet Information Center (CNNIC) : 001.002.008.000 - 001.002.008.255\n" + "Botnet on Telekom Malaysia : 001.009.096.105 - 001.009.096.105\n" + "Botnet on Telekom Malaysia : 001.009.102.251 - 001.009.102.251\n" + "Botnet on Telekom Malaysia : 001.009.106.186 - 001.009.106.186\n" + "Korea Internet & Security Agency (KISA) - IPv6 Policy : 001.016.000.000 - 001.019.255.255\n" + "Botnet on FPT Telecom : 001.055.241.140 - 001.055.241.140\n" + "// This is another comment\n" + "SMSHoax FakeAV Fraud Trojan:1.093.021.147-001.093.021.147\n" + "SMSHoax FakeAV Fraud Trojan:001.093.026.97-001.093.026.097\n"; private Pair[] dat_expected_ranges = new Pair[] { Pair.create("000.000.000.000", "000.255.255.255"), Pair.create("2002:0000:0000:0:0:0:0:0", "2002:00ff:ffff:0:0:0:0:0"), Pair.create("001.002.004.000", "001.002.004.255"), Pair.create("001.002.008.000", "001.002.008.255"), Pair.create("001.009.096.105", "001.009.096.105"), Pair.create("001.009.102.251", "001.009.102.251"), Pair.create("001.009.106.186", "001.009.106.186"), Pair.create("001.016.000.000", "001.019.255.255"), Pair.create("001.055.241.140", "001.055.241.140"), }; private Pair[] p2p_expected_ranges = new Pair[] { Pair.create("000.000.000.000", "000.255.255.255"), Pair.create("001.002.004.000", "001.002.004.255"), Pair.create("001.002.008.000", "001.002.008.255"), Pair.create("001.009.096.105", "001.009.096.105"), Pair.create("001.009.102.251", "001.009.102.251"), Pair.create("001.009.106.186", "001.009.106.186"), Pair.create("001.016.000.000", "001.019.255.255"), Pair.create("001.055.241.140", "001.055.241.140"), Pair.create("1.093.021.147", "001.093.021.147"), Pair.create("001.093.026.97", "001.093.026.097"), }; @Test public void parseDAT() { FakeIPFilter filter = new FakeIPFilter(); try (InputStream is = IOUtils.toInputStream(dat_file, "UTF-8")) { int ruleCount = new IPFilterParser(false).parseDAT(is, filter); assertEquals(dat_expected_ranges.length, ruleCount); List<Pair<String, String>> ranges = filter.getRanges(); assertEquals(dat_expected_ranges.length, ranges.size()); for (int i = 0; i < dat_expected_ranges.length; i++) assertEquals(dat_expected_ranges[i], ranges.get(i)); } catch (Exception e) { fail(e.toString()); } } @Test public void parseP2P() { FakeIPFilter filter = new FakeIPFilter(); try (InputStream is = IOUtils.toInputStream(p2p_file, "UTF-8")) { int ruleCount = new IPFilterParser(false).parseP2P(is, filter); assertEquals(p2p_expected_ranges.length, ruleCount); List<Pair<String, String>> ranges = filter.getRanges(); assertEquals(p2p_expected_ranges.length, ranges.size()); for (int i = 0; i < p2p_expected_ranges.length; i++) assertEquals(p2p_expected_ranges[i], ranges.get(i)); } catch (Exception e) { fail(e.toString()); } } } ```
```python Double ended queues with `deque` Best way to implement a simple `queue` Immutable sets with `frozenset` Get more with `collections`! Get the most of `int`s ```
The Hampshire Regiment was a line infantry regiment of the British Army, created as part of the Childers Reforms in 1881 by the amalgamation of the 37th (North Hampshire) Regiment of Foot and the 67th (South Hampshire) Regiment of Foot. The regiment existed continuously for 111 years and served in the Second Boer War, World War I and World War II. An Army Order of the 28 November 1946 stated, due to distinguished service in the Second World War, the regiment would be re-titled as the Royal Hampshire Regiment. On 9 September 1992, after over 111 years of service, the Royal Hampshire Regiment was amalgamated with the Queen's Regiment to form a new large regiment, the Princess of Wales's Royal Regiment, which continues the traditions of the Royal Hampshires. History Formation and antecedents The Hampshire Regiment was formed on 1 July 1881 under the Childers reforms from the merger of the 37th (North Hampshire) Regiment of Foot and the 67th (South Hampshire) Regiment of Foot along with the militia and rifle volunteers of the county of Hampshire. As part of the formation of the regiment, the following Volunteer Force and Militia units were placed under command of the regiment: 3rd (Hampshire Militia) Battalion based in Winchester [4th] 1st Volunteer Battalion based in Winchester, former 1st Hampshire Rifle Volunteers [5th] 2nd Volunteer Battalion based in Southampton, former 2nd Hampshire Rifle Volunteers [6th] 3rd Volunteer Battalion based in Portsmouth, former 3rd Hampshire Rifle Volunteers [7th] 4th Volunteer Battalion based in Newport, former 1st Isle of Wight Rifle Volunteers Second Boer War At the turn of the 20th century, there were two regular battalions of the regiment. The 1st battalion was stationed at Malta from 1884, then transferred to British India where it had various postings. In early 1903 the battalion transferred from Lucknow to Aden. In April 1904 three companies were attached to the Royal Navy and saw service in the Somaliland campaign. Landing on the Somali coast, they served alongside a naval detachment that stormed and captured the forts at Illig. The 2nd Battalion was deployed to South Africa as reinforcement for the British Army during the Second Boer War in January 1900, and took part in an action at Karee Siding on 29 March 1900, when one officer and 11 troops died. The battalion served in South Africa throughout the war, which ended in June 1902 with the Peace of Vereeniging. They returned home three months later, arriving in late September 1902, and a few days after their return was entertained to a large celebratory banquet by the Mayor of Portsmouth. A third militia battalion was formed from the former Hampshire Militia, with headquarters in Winchester. The battalion was embodied in January 1900 for service in South Africa, and disembodied in December the same year. A Volunteer battalion was also formed to serve in South Africa. Men from this battalion were involved in the worst train accident during the war, near Barberton, on 30 March 1902. Following the accident, the battalion returned to the United Kingdom, arriving at Southampton in May 1902. In 1908, the Volunteers and Militia were reorganised nationally, with the former becoming the Territorial Force and the latter the Special Reserve; the regiment now had one Reserve battalion and five Territorial battalions. First World War During the First World War, the regiment expanded to 34 battalions. By the end of the First World War, the Hampshire Regiment had lost 7,580 officers and men killed in action. Regular Army The 1st Battalion was a Regular Army unit stationed in Colchester on the outbreak of war in August 1914. The battalion was assigned to the 11th Brigade, 4th Division. With the division, the battalion joined the British Expeditionary Force and was sent overseas to France in August 1914, landing at Le Havre on 23 August. The 1st Battalion saw its first combat against the German Army at Le Cateau. The battalion served on the Western Front for the rest of the war, participating in many battles in 1914 alone such as the First Battle of the Marne, the First Battle of the Aisne, and the Battle of Messines. In 1914, on Christmas Day, men of the 1st Battalion participated in the legendary Christmas Truce of 1914 where British and German soldiers fraternised in No man's land. In 1915, the battalion took part in the Second Battle of Ypres, famous for its use of poison gas. In 1916 it fought at Albert and Le Transloy, which was part of the larger Somme offensive. The 2nd Battalion was also a Regular Army battalion that was serving in India at the outbreak of war and arrived in England on 22 December 1914. In early 1915, the battalion became part of the 88th Brigade, assigned to the 29th Division. The 2nd Battalion took part in the Battle of Gallipoli when engaged in the fatal Landing at Cape Helles in April 1915 and fought in the Battle of Krithia. In 1916, the 2nd Battalion was evacuated to Alexandria due to a mixture of heavy casualties from combat, disease and the terrible weather conditions. In March 1916, the battalion was sent to France and would serve on the Western Front for the rest of the war, participating in the battle of Albert and Le Transloy rides, alongside the 1st Battalion. Territorial Force The 1/4th Battalion landed at Karachi in India in November 1914 as part of the 4th (Rawalpindi) Brigade in the 2nd (Rawalpindi) Division before moving to Basra in March 1915: it remained in Mesopotamia and Persia for the rest of the war. The 1/5th Battalion landed at Karachi in India in November 1914: it remained in India for the rest of the war. The 1/6th (Duke of Connaught's Own) Battalion landed at Karachi in India in November 1914: it remained in India for the rest of the war. The 1/7th Battalion landed at Karachi in India in November 1914: it remained in India until January 1918 when it moved to Aden. The 1/8th (Isle of Wight Rifles, Princess Beatrice's) Battalion landed at Suvla Bay in Gallipoli as part of the 163rd Brigade in the 54th (East Anglian) Division on 9 August 1915 and, having been evacuated from Gallipoli in December 1915, moved to Egypt and then to Palestine. The 1/9th (Cyclist) Battalion sailed for India in February 1916 and then to Vladivostok in October 1918. The 2/4th Battalion sailed for India in December 1914 as part of 2/1st Hampshire Brigade in the 2nd Wessex Division and then sailed for Egypt in April 1917 and to France in May 1918. The 2/5th Battalion sailed for India in December 1914 as part of 2/1st Hampshire Brigade in the 2nd Wessex Division and then sailed for Egypt in April 1917 before being disbanded in Palestine in August 1918. The 2/7th Battalion sailed for India in December 1914 as part of 2/1st Hampshire Brigade in the 2nd Wessex Division and then moved to Mesopotamia in September 1917. New Armies The 10th (Service) Battalion landed at Gallipoli in August 1915 and was then transferred to Salonika in October 1915. The 11th (Service) Battalion (Pioneers) landed at Le Havre in December 1915. The 12th (Service) Battalion landed in France in September 1915, but moved to Salonika in November 1915. The 14th (Service) Battalion (1st Portsmouth) landed at Le Havre in March 1916. The 15th (Service) Battalion (2nd Portsmouth) landed in France in May 1916. Irish War of Independence The 2nd Battalion was sent to Ireland to fight the Irish Republican Army during the Irish War of Independence. On 20 February 1921, soldiers from the battalion took part in the Clonmult ambush during which the IRA suffered its greatest loss of volunteers in conflict. Regimental historian Scott Daniell commented on the action that "like all the Irish operations, it was hateful to the British troops". On 31 May 1921, seven soldiers, all with the band of the 2nd Battalion, Hampshire Regiment were on their way to the rifle range at Youghal County Cork when a road mine exploded under the truck they were travelling in. Three soldiers were killed outright, while a further four died later from their wounds. Second World War In the Second World War, the Hampshire Regiment had six battalions that fought abroad (the 1st, 2nd, 1/4th, 2/4th, 5th and 7th), whilst more battalions stayed at home. By the end of the Second World War, 2,094 officers and men of the Hampshire Regiment had died. The 1st Battalion The 1st Battalion, Hampshire Regiment was a Regular Army unit that was deployed on Garrison duties in El Daba, Egypt at the beginning of the war. It moved to Palestine on peace keeping duties in December 1939 and then moved to Moascar in Egypt, then to Mearsa Matruh in Summer 1940. One of its duties was to look after the large number of Italian prisoners after the fall of Sidi Barrani. In February 1941, the 1st Battalion arrived in Malta, where it became part of the 1st (Malta) Infantry Brigade (with 1st Dorset Regiment and 2nd Devonshire Regiment). This later became the 231st Infantry Brigade. Duties in Malta included airfield repair and working as stevedores in the docks. Malta was subjected to a prolonged siege and, by July 1942, the food situation had become serious, but the situation eased as the Allies' fortunes improved in the North African campaign. In April 1943, the 231st Brigade, including the 1st Hampshires, was moved to Alexandria, then subsequently to Cairo and Suez, where it trained as an independent assault brigade. Then, in July 1943, the 1st Battalion invaded Sicily as part of the first wave of Operation Husky, the Allied invasion of Sicily. The beach landing went smoothly, but the 1st Battalion ran into resistance at Vizzini on 13 July when it ran into the 1st Hermann Göring Parachute Panzer Division. On 22 July, the 1st Battalion was engaged in hard fighting for Agria, which only fell on 29 July. The 1st Battalion was reduced to three companies after the battle. There was further hard fighting to capture the Regalbuto Ridge, which ended the Sicilian Campaign. The 1st Battalion suffered 18 officers and 286 other ranks killed or wounded in action in Sicily. On 8 September 1943, the 231st Brigade landed in Italy, coming ashore at Potro San Venere near Pizzo. The 1st Battalion was involved in fighting as the Germans withdrew northwards. By October 1943, the 1st Battalion was back in Sicily waiting for transport back to the United Kingdom and, by November, the battalion was back in the United Kingdom for the first time in 22 years. The battalion was allocated to the 50th (Northumbrian) Infantry Division, one of the assault divisions for the invasion of North West Europe, which had an excellent reputation after fighting in the Mediterranean theatre. On 6 June 1944, the 1st Battalion came ashore as part of Operation Overlord without any supporting tanks. Despite facing machine gun fire, the men captured Le Hamel and Arromanches after a hard fight. By the end of D-Day , the 1st Battalion had suffered 182 casualties, 64 of them being killed in action. The battalion started a three-week fight for the village of Hottot, against the German Panzer-Lehr-Division, in June 1944. This culminated in a major assault on 11 July. The 1st Battalion was withdrawn from the line the next day, testimony to the hard fighting. The battalion was in the vanguard of the assault towards Villiers Bocage later in the month. There were stiff fights at St Germain d’Ectot and Launay. Villiers Bocage was taken on 4 August, following which the 50th Division was taken out of the line. In August 1944, a brigade attack was launched towards Conde, and the battalion attacked St Pierre la Vielle. The fighting was particularly hard and, after the 11-hour battle, three of its Rifle companies were severely reduced – 'B' Company had 25 men, 'C' Company had 35 men, and 'D' Company was down to just 12 men; as 'A' Company was only lightly engaged, it was not so depleted. On 12 August, the 1st Battalion was withdrawn from the line. The battalion was motorised and joined with the 11th Armoured Division for the breakout attack later in the month. There was no fighting and, on 31 August, the 1st Battalion crossed the river Seine at Vernon and swept on to Amiens. The battalion was then placed under command of the Guards Armoured Division and swept into Brussels on 3 September. The battalion, still under command of the Guards Armoured, then started the attack towards Eindhoven, which was the attack designed to relieve the British and Polish airborne troops fighting at Arnhem, who had dropped as part of Operation Market Garden, which ended in a failure. The battalion, as part of 231st Infantry Brigade, was charged with defending the "Corridor" formed by the armoured advance. In October, the 1st Battalion moved up to Nijmegen and moved onto "The Island", the bridgehead over the river Waal but behind the river Lek. In October 1944, the battalion attacked north of Bemmel, and expanded the bridgehead up to the Wettering Canal. The battalion then went onto the defensive until the end of November. The battalion then moved back to Ypres in Belgium, and subsequently was moved back to the United Kingdom with the rest of the 50th Division, and the men were mainly used as replacements for other infantry battalions, with the exception of a small training cadre consisting of 12 officers and 100 other ranks. The battalion ended the war in Louth, Lincolnshire. Since D-Day, the 1st Battalion, Hampshire Regiment had suffered over 1,281 casualties, including 231 officers and men killed in action, the rest being either wounded or missing in action. The 2nd Battalion The 2nd Battalion was also a Regular Army battalion and started the war in Aldershot, Hampshire, England. In September 1939, the 2nd Battalion moved to Cherbourg, France with the 1st Guards Brigade, alongside the 3rd Battalion, Grenadier Guards and the 2nd Battalion, Coldstream Guards, attached to 1st Infantry Division. It then moved to Sille-le-Guillaume, and from there 250 miles north to take its allocated place on the "Gort Line", which it reached on 3 October. Later that month, the battalion moved to the Belgian/French border and, in February 1940, the battalion spent three weeks on the Maginot Line before returning to Metz. The battalion crossed into Belgium in response to the German invasion of Belgium and, by 14 May, was digging into a defensive position. While an attack never came, with the retreat of the Dutch and the French Ninth Army, the 1st Division was ordered to retreat on 16 May. A slow retreat then commenced, ending at Dunkirk. The battalion began to be embarked from Dunkirk for the United Kingdom (some were evacuated on 2 June). The battalion managed to carry away 100% of their small-arms, mortars and anti-tank rifles. It was congratulated by the Minister for War, Mr Anthony Eden. The battalion then spent two years on home defence, training and preparing for a German invasion that never arrived. In November 1942, the battalion, Hampshire Regiment sailed for North Africa, taking part in Operation Torch with the 1st Guards Brigade, which was now part of the 78th Infantry Division. They disembarked at Algiers on 21 November and joined the British First Army. Later that month, the battalion moved to Tebourba. The following day the 2nd Battalion were attacked by heavy shelling and, on 1 December, the battalion was attacked by a force four times its size, which was able to outflank it and rake it with enfilading fire. This was the start of three days of fierce close combat, fought at close quarters and featuring bayonet charges and counter-charges. The battalion was forced back a mile and a half and, on 3 December, Major Wallace Le Patourel was awarded the Victoria Cross for his gallantry in leading counter-attacks against the enemy. After three days, the battalion retreated through Tebourba, only to find all other troops had been withdrawn and the road behind them was cut. The battalion broke into small groups and attempted to break through to allied lines, reuniting at Medjez-el-Bab; many, including the Commanding Officer, were captured. The battalion, which had started the battle with 689 men, was down to 194 men. The battalion was withdrawn from the line and in December, nine officers and 260 other ranks joined the 2nd Battalion. After the fall of Tunis on 13 May 1943, the 2nd Battalion joined the 128th (Hampshire) Brigade attached to 46th Infantry Division. The 128th Infantry Brigade The Hampshire Regiment had a number of Territorial Army (TA) battalions, whose ranks were swelled throughout 1939 when the TA was ordered to be doubled in size. During 1939, due to the number of new recruits, the 5/7th Battalion was split into the 5th Battalion and the 7th Battalion, and the 4th Battalion was split into the 1/4th Battalion and the 2/4th Battalion. The 1/4th, 2/4th and 5th Battalions were all grouped into the 128th Infantry Brigade (the "Hampshire Brigade") and the 7th Battalion was part of the 130th Infantry Brigade. Both brigades were part of the 43rd (Wessex) Infantry Division. However, on 6 June 1942, the 128th Brigade was detached from the 43rd Division until 15 August, when it was transferred to the 46th Infantry Division, where it would remain for the rest of the war. In January 1943, the brigade left Britain with the rest of the 46th Infantry Division, for North Africa, as part of Operation Torch. The brigade disembarked at Algiers on 17 January, moving to Bone, where it remained until the end of January, when the brigade moved to Hunts Gap. The 5th Battalion was sent 12 miles further ahead to Sidi Nsir. The 5th Battalion at Sidi N'sir was attacked in overwhelming strength in February 1943 as the Germans began Operation "Ox Head", a corps-level assault by German Paratroopers, elements of 10th Panzer Division and the 501st Heavy Tank Battalion. The 5th Battalion was supported by 155th Battery, Royal Artillery. The Germans had to take the Hampshires' hilltop positions before they could attack the artillery, knocking out all the guns, whose crews stood and died firing over open sights at the German tanks. Only nine gunners survived. At 5pm, 'B' Company of the 5th Battalion, reduced to 30 men, was overrun. At dusk, the battalion considered its position untenable, and it withdrew to a feature known as "Hampshire Farm". Of the four Rifle Companies, only 'C' Company, less a single platoon, and 30 men of 'D' Company, remained. The German force was delayed for one critical day. Later in the month, the Hampshire Brigade was attacked at Hunt's Gap by the German force that had been delayed at Sidi N'sir. 2/4th was the main Battalion engaged, with 1/4th Battalion in support. The 2/5th Leicesters was attached to the brigade as well. The situation was so precarious that the 2nd Hampshires, still training its new recruits, was put into the line alongside 1/4th Battalion. The brigade was supported by plenty of artillery and the Churchill tanks of the North Irish Horse. Extensive minefields and heavy dive bombing kept the German tanks at bay. On 28 February, a pre-dawn attack penetrated the 2/4th battalion's 'B' Company positions, but heroic resistance and the tanks of the North Irish Horse kept the Germans at bay until dusk, when 'B' Company was overrun. 'C' Company was overrun by German infantry. On 1 March, the Germans attacked again, and 'D' Company was overrun, but 2/4th Battalion hung on to their remaining positions. On 2 March, the Germans withdrew, and on 5 March the 2/4th Battalion was relieved by the 8th Battalion, Argyll and Sutherland Highlanders of 36th Brigade of the 78th Battleaxe Division. The 2/4th Battalion had suffered 243 men killed or missing. During March, the brigade was engaged on defensive patrolling, under heavy shelling. 1/4th Battalion lost 100 casualties during March, but 5th Battalion received 5 officers and 150 men as replacements. On 5 April, the brigade handed over its positions and moved 100 miles south to El Ala. The 128th Brigade subsequently captured the Fondouk Gap, allowing the 6th Armoured Division to pass through and debouche onto the Kairouan Plain. In April 1943, the 128th Infantry Brigade attacked Bou Arada. The 16th Battalion, Durham Light Infantry was added to the brigade for the attack. Five Field regiments and two Medium regiments of the Royal Artillery supported the 128th Brigade. Early progress was good, but when the mist cleared all four battalions were caught in the open under heavy fire, and losses mounted. The rifle companies of 1/4th Battalion only had 3 officers and 80 men left between them, and the 2/4th Battalion had to reorganise onto a three-company basis. Tunis fell and the North African campaign was over in May 1943. The 128th Infantry Brigade was reconstituted to consist of 2nd Battalion, 1/4th Battalion and 5th Battalion. The 2/4th Battalion was split into two to form two Defence Units of two Beach Groups. Their role was to protect the maintenance area of a Beach Group when it made a landing where no port was available. The 128th Infantry Brigade was one of three British brigades that made an assault landing at Salerno in Italy as part of British X Corps under command of US Fifth Army, led by Mark Clark in September 1943. The landing was opposed by shore batteries firing shrapnel, and the beaches were raked by machine gun fire. 2nd Battalion and 1/4th Battalion made steady progress, but 5th Battalion had been landed in the wrong place and suffered heavily. A German counter-attack overran 'B' Company and the battalion HQ of 5th Battalion. The 5th Battalion lost 40 men killed and over 300 were wounded or taken prisoner. On 12 September, the Germans started a general assault against the Salerno bridgehead, which made good progress; the US VI Corps were almost driven into the sea. However, the arrival of US paratroops and the British 7th Armoured Division turned the tide. The 128th Brigade was in the hills above Salerno, and the fighting was hard, but on 20 September the Germans began to withdraw northwards, and the pressure eased. All three battalions had suffered – 2nd Battalion suffered 304 casualties, 1/4th Battalion suffered 159 casualties and the 5th Battalion suffered 29 officer and over 400 other rank casualties. The 128th Brigade, still part of the X Corps, moved up to the River Volturno, behind which the Germans had withdrawn. On 10 October, the 1/4th Battalion captured the town of Castel Volturno, alongside the river, and on 12 October the 1/4th made a night assault across the river, establishing a small bridgehead. The 2nd and 5th battalions moved across the river in support, but the entire 128th Brigade was soon engaged in a stiff fire-fight. The brigade advanced some 2,500 yards, and then dug in behind a canal as the Germans bought up tanks. The brigade remained in the low-lying, swampy, mosquito-ridden land between the river and the canal until the Germans withdrew due to a breakthrough elsewhere. The brigade then advanced along Route 7, meeting little resistance. The 128th Brigade was then taken out of the line for R&R. In November 1943, the Hampshire Brigade moved up to the River Garigliano. It was relieved on 11 January, and moved back to the River Volturno. They were selected as the Assault Brigade of the 46th Infantry Division, and trained in river crossings. Then, in January 1944, the Hampshire Brigade made a night assault across the swift flowing River Garigliano. The brigade had severe problems getting the boats through the minefields down to the river, and in the darkness confusion reigned. Only a few men managed to get across, and these were withdrawn at daylight. The Hampshire Brigade then assaulted Monte Damiano, a bare, razor-backed feature, already strewn with British dead from 56th (London) Infantry Division. The assault was made by the 1/4th and 2nd battalions in daylight, and immediately came under heavy mortar and machine-gun fire. The attack was made with great dash, but it failed, with heavy casualties. The 5th Battalion was put under the command of the 138th Infantry Brigade, part of the 46th Division, to assault Mounts Ornito and Cerasola in February 1944. The assault met little opposition, although the Germans put in spirited counter-attacks on Mount Ornito, which were all driven off. However, as the days passed, the casualties mounted from heavy shelling; the bare rock made cover difficult. In eight days, the 5th Battalion suffered 200 casualties. Supply was particularly difficult, as supplies had to be carried up by mules and porters for 3 to 4 hours from the nearest road. On 7 February, the 5th Battalion attacked Mount Cerasola, a successful assault. On 10 February, the 5th Battalion was relieved. The Hampshire Brigade was relieved later in the month. It moved south to Naples and, on 16 March, sailed for Egypt, and subsequently moved to Palestine, Lebanon, Syria, and back to Egypt. All battalions were brought up to strength, largely from gunners from disbanded Middle-East Anti-Aircraft units who were retrained as infantrymen. On 27 June, the 128th Brigade sailed from Alexandria, and subsequently landed in Taranto. The move north through Italy was at an easy pace. In August 1944, the 128th Brigade started its assault on the "Gothic Line", a line of German defences across the Etruscan Apennines. The Hampshire brigade, with the North Irish Horse under command, led the 46th Division's assault (along with the 46th Reconnaissance Regiment). The brigade's first target was to cross the River Metauro and take Monte Bartolo. The assault went to plan against little opposition, and Mount Bartolo was captured by the morning of 29 August. The brigade had marched 25 miles to cover 12 miles as the crow flies, and climbed 1,500 feet. Only the 1/4th Battalion had come across serious opposition, engaging in heavy fighting around Montegaudio. Later in the month the brigade assaulted the Gothic Line proper, crossing the River Foglia and assaulting Monte Gridolfo. This was heavily defended, with all cover cleared from its bare slopes. Nevertheless, the men of the 2nd Battalion assaulted them with great vigour, and by dawn on 31 August they had captured the first crest. The 1/4th Battalion passed through, driving deeper into Gothic Line. During this assault, Lieutenant Gerard Norton was awarded the Victoria Cross. On 1 September, the 5th Battalion took the lead, and by 2 September had captured Meleto. The Gothic Line had been breached. A fighting advance continued northwards. On 5 September the 128th Brigade was relieved, and sent to the rear for rest, but they were back in the line by 11 September. The 128th Brigade began an assault on Montescudo in September 1944. Montescudo was defended by the German 100th Mountain Regiment, and they put up a desperate resistance. Other elements of the Brigade assaulted Trarivi, which was captured by 16 September. On 18 September, the brigade was relieved. All three battalions were short of men, even after replacements were received from the 1st Battalion, Buffs (Royal East Kent Regiment). The Hampshire Brigade crossed the River Fiumicino, and then the Rubicon. The weather was atrocious, and movement was slowed by deep mud, and supply was difficult. Fighting continued until 9 October. A steady advance was made, and by 12 November the River Montone was crossed; on 26 November the River Lamone was reached. This was crossed on 3 December in the face of stiff opposition, and by 6 December the Brigade had captured Casa Nova. The Brigade was relieved the following day, and moved well to the rear. From 24 August (when the 128th Brigade moved up to the Gothic Line) to 7 December, when they were relieved, the 128th (Hampshire) Brigade had suffered 1,276 casualties. In January 1945 the 2nd Battalion and the 5th Battalion embarked from Taranto and disembarked in Piraeus, Greece, two days later. 1/4th Battalion arrived on 22 January. The 128th (Hampshire) Brigade (now known as "Tigerforce") split its battalions, and set about disarming the ELAS. The troops were welcomed everywhere, and there was no fighting. Then, in April 1945, the brigade began to return to Italy for the final offensive. By 1 May, the brigade was back in the line around Forlimpopoli; but the war ended before the brigade was in action again. The 2/4th Battalion The 20th Beach Group ("A" and "B" companies) invaded Sicily as part of Operation Husky in July 1943. The role of the Beach Group was to land supplies until a harbour could be captured. On 12 July, 20 Beach Group moved inland, behind the advancing infantry, but by 22 July the half-battalion was in the line, capturing Mount Scalpello. On 4 August, the half-battalion moved to Catania, where it remained on garrison duty. In September 1943, the 21st Beach Group ("C" and "D" companies) invaded Salerno. The assault went in at dawn against stiff opposition and, rather than take its allotted role, the half-battalion was moved straight into the line. However, there was little action until 13 September, when the half-battalion was attacked by armoured half-tracks. This happened again on 15 September when 'D' Company was overrun. However, the half-tracks did not assault 'D' Company as such, they ran over the slit trenches until picked off by 6pdr anti-tank guns. On 17 September, the half-battalion was moved back into reserve and, by 23 September, it was back on the beaches unloading cargo. In November 1943, the two-halves of the 2/4th Battalion were re-united at Pontecagnano near Salerno. However, there was no immediate employment, and orders were received to send cadres to the three battalions in the 128th (Hampshire) Brigade (this was rescinded after protests). However, six officers and 77 other ranks were posted away to form the "2/4th Hampshire Training Centre", three officers and 188 other ranks were assigned to 'porterage duties' and a detachment of 50 men was assigned to help the Provost Corps with traffic duties. The battalion was back in the line in Italy, near Garigliano, as part of 28th Infantry Brigade, in 4th Infantry Division in February 1944. This was the same ground where the Hampshire Brigade had suffered through the Italian winter. The battalion was relieved for short periods on a regular basis before returning to the line. In May 1944, the battalion assisted the brigade's two other battalions (2nd King's and 2nd Somersets) in crossing the River Rapido as part of the assault on Monte Cassino. The river and bank were under intense enemy fire, and the river so swift that swimmers from 2/4th had to cross with lines to enable the boats to get across. Troops got across the river, but could make little headway against the storm of machine gun fire. The 2/4th could not get across to join their fellow battalions, and so, on 12 May, it came under command of 12th Infantry Brigade and crossed via a bridge on 13 May. Supported by the 17th/21st Lancers's Sherman tanks, the 2/4th Battalion attacked along the river, taking 200 prisoners. On 14 May, back in the 28th Brigade, the 2/4th attempted to cross the River Pioppeta. The tank bridge sank in the mud, and the battalion took 100 casualties in two minutes. The 2/4th waded the river and, in spite of heavy casualties and fierce resistance, the advance continued. During this advance, Captain Richard Wakeford was awarded the Victoria Cross. By 6.30pm, all objectives had been captured, and the 2/4th reorganised on a three-company basis. On 16 May, the battalion was relieved. Two days later, Cassino was captured by the Polish II Corps. In June 1944, the battalion was back in the line near the village of Villastrada, between Lake Chiusi and Lake Trasimeno to north of Rome. On 24 June, a major attack was launched on that section of the Trasimene Line by 2nd Battalion, Somerset Light Infantry supported by the tanks of the 12th Canadian Armoured Regiment. 2/4th Hampshires was to follow on, but its entry into battle was delayed until the next day. Having passed through the village of Vaiano, which was unoccupied, an attack was launched on a ridge being held by the German 1st Parachute Division. Although "C" Company established a foothold on the ridge, occupying a farmhouse, that night a fierce German counter-attack was made by the Germans, who overran the company headquarters. Fighting was close and confused, and the company ran low on ammunition. It was forced back to literally the last ditch, but hung on. At dawn the next day, 26 June, the battalion counter-attacked and managed to recapture its previous positions; the Germans were withdrawing to the Arezzo Line. The 2/4th Battalion followed up, coming into action again on 21 July. Supported by the North Irish Horse, a steady advance was made. The 2/4th Battalion was then taken out of the line again – some platoons were down to ten men each with no officer. The battalion then attacked Santa Lucia, which was captured on 30 July 1944 after a small but fierce battle. The enemy then withdrew, and the battalion moved up to the River Arno. On 10 August, the battalion was withdrawn. In September 1944, the battalion began its assault on the Gothic Line, attacking across the River Marano and capturing Casa Bagli. All the first day objectives were achieved, and the 2/4th defended them on 16 September against German counter-attacks. On 17 September, the battalion captured Cerasola; it was relieved the following day. The battalion then moved north behind the British Eighth Army's advance, arriving in time to stand by to support the Hampshire Brigade's assault on Forli during November. During 22 November, the 2/4th attacked and captured a bridgehead over the River Cosina against heavy shelling; this was the battalion's last action in Italy. In December 1944, the battalion was flown to Greece in the bomb-bays of Wellington and Liberator bombers in response to the outbreak of the Greek Civil War, arriving on 12 December. The ELAS, armed and trained by the British, was trying to overthrow the Greek Government. On arrival, the 2/4th Battalion was split up, primarily defending the airfield, then clearing ELAS forces from Athens. This did involve some fighting, and the 2/4th Battalion lost three men killed. The 2/4th Battalion then settled down to peace-keeping duties. In May 1945, the battalion was moved to Crete to take charge of the Germans, who had surrendered, and they ended the war there. The 7th Battalion The 7th Battalion was a Territorial Army unit, originally the 5/7th Battalion until it was split into the 5th and 7th battalions when the Territorial Army was doubled in size in the spring and summer of 1939. The 7th Battalion remained in the United Kingdom training long and hard for many years until after the D-Day landings of 6 June 1944. The battalion was sent to Normandy as reinforcements with the 130th Infantry Brigade attached to the 43rd (Wessex) Infantry Division. In June 1944, the battalion landed near Le Hamel. They were with 130th Brigade (with 4th and 5th Dorsets) and were initially held in reserve. The battalion attacked Maltot, supported by tanks of 9th Royal Tank Regiment (9th RTR) in July 1944. The village was defended by Waffen-SS troops supported by Tiger tanks. Both the 7th Battalion and 9th RTR suffered severe casualties, and although the 7th Battalion managed to fight its way into the village it was withdrawn. The 7th Battalion suffered 18 officer and 208 other rank casualties, including 4 officers and 12 other ranks killed, but was back in the line two days later. The battalion attacked the village of Cahagnes later in the month. This was fought in typical ‘bocage’ countryside, but after the initial attack by the brigade ran into difficulties, 7th Battalion deployed from reserves and captured Cahagnes, beating off several German counter-attacks. On 2 August, the battalion moved up to Jurques, and after a short stiff fight advanced to "Point 132", close to Mount Pincon. On 6 August, the battalion put in a deceptive attack on Mount Pincon, making a diversion whilst 129th Infantry Brigade made a flank attack. During heavy fighting, 'C' Company incurred many casualties, including all the officers. Following the successful flank attack by the 129th Brigade, the 7th Battalion mopped up and concentrated near Mauny by 10 August. In August 1944, the battalion captured St Denis de Mere after a bombardment by nine artillery regiments. The battalion took 74 prisoners and then prepared for "The Breakout". The battalion then moved 50 miles north-east to Conches and, by 27 August, the 7th Battalion was across the River Seine. The battalion then participated in the capture of Tilly, and thereafter spent 11 days taking in replacements and resting. In September 1944, the battalion started to move to Brussels for temporary garrison duty, arriving the next day. This easy duty was welcome; since landing in Normandy in June, the 7th Hampshires had lost (including wounded) 35 officers and 450 other ranks. The battalion fought in Operation Market Garden in September 1944. On 20 September, the battalion moved through Eindhoven to Grave. The battalion was tasked with defending the southern end of the two large bridges over the Waal. On 23 September, the 7th was sent into the line, fighting west of the bridges in the Valburg-Elst area. It then moved to the "Island" and stayed there until 4 October helping to defeat the German counter offensive, before moving to the Groesbeek-Mook area on the Dutch-German border. In November 1944, the battalion was moved to Maastricht, and then moved around as divisional reserve. On 19 December, the German launched their Ardennes offensive, which caused the 7th Battalion to move north of Liege to guard the bridges over the Meuse. On 26 December, the 7th Battalion moved to Aachen, and on 12 January moved again to Teveren. Then, in January 1945, the battalion captured Putt, then Waldenrath, and on 25 January captured Dremmen and Porselen. The battalion advanced south-east from Cleves as part of the big Reichwald offensive. Over two days fighting for Berkhofel, the 7th lost 70 casualties. It was relieved on 17 February. The battalion crossed the Rhine in assault craft, consolidating on the far bank and then advancing across the IJssel Canal to Milligen, which was captured on 26 March. German resistance was collapsing, and the 7th moved over the Twente Canal on 1 April, liberating Hengelo. In April 1945, the 7th Battalion took part in operation "Forward On", sweeping through Germany against minimal resistance. However, on 13 April, the battalion had a hard fight for Cloppenburg, a fight that was as hard as any they had fought, vicious hand-to-hand fighting from street to street. Luckily, they were supported by tanks, sappers of the Royal Engineers and a single Armoured Vehicle Royal Engineers, which demolished several buildings with its petard. Cloppenburg was captured the next day. Then, in April, the battalion embarked on its final advance, moving through Bahlum, Bremen, then Bremerhavan, capturing hundreds then thousands of prisoners. The 7th Battalion reached Gnarrenburg on 3 May, and were still there when the Germans surrendered the following day. The Home Based Battalions Although the Hampshire Regiment sent six battalions overseas, many more stayed at home as training units or were converted to other roles. Before the war, the 6th Battalion (Duke of Connaught's Own), Hampshire Regiment was converted into the 59th Anti-Tank Regiment, Royal Artillery, and upon the Territorial Army being doubled in size in 1939, formed a 2nd Line duplicate. The 59th Anti-Tank Regiment served with the 43rd (Wessex) Infantry Division and went with them to Normandy. The original 8th Battalion (Isle of Wight Rifles), Hampshire Regiment was transferred to the Royal Artillery and made into an artillery battery in 1937. However, a new 8th Battalion was formed, shortly after the war began, at Southampton in December 1939. It subsequently split into the 1/8th and 2/8th Battalions, before the 2/8th Battalion was renamed the 13th Battalion, and then both battalions were re-formed into the 8th Battalion again, which was subsequently renumbered the 30th Battalion and was disbanded in September 1942. The 9th Battalion was formed on the Isle of Wight in July 1940 and was later assigned to the 201st Independent Infantry Brigade (Home). In 1942, the battalion was converted to armour as the 157th Regiment Royal Armoured Corps and assigned to 36th Army Tank Brigade. Units converted in this way continued to wear their infantry cap badge on the black beret of the Royal Armoured Corps. However, the brigade was disbanded in July 1943 and 157 RAC was broken up in August, without having seen active service. The 10th Battalion was formed in Aldershot in July 1940; it was assigned to the 201st Independent Infantry Brigade (Home), alongside the 9th Battalion. In 1941, the 10th Hampshire was also transferred to the Royal Armoured Corps, becoming the 147th Regiment Royal Armoured Corps, and was assigned to the 34th Army Tank Brigade. Its Churchill tanks were named after Hampshire Regiment battles (the CO's tank was called "Minden"). The regiment went to serve with distinction with 34th Tank Brigade in the North West Europe campaign at Normandy, Le Havre, the Reichswald Forest and Operation Plunder from 1944 to 1945. The 50th (Holding) Battalion, which was formed on the Isle of Wight in June 1940, absorbed the Royal Militia of the Island of Jersey. The Jersey Militia subsequently became the 11th Battalion, whilst the rest of the 50th Battalion became the 12th Battalion. The 11th Battalion stayed in the United Kingdom as a training battalion until the war ended, first with the 209th Brigade and later with the 135th Brigade, 45th (Holding) Division. The 12th Battalion also stayed in the United Kingdom, with the 136th Brigade, but was disbanded in September 1944 after sending a large final draft to the 7th Battalion serving in North-west Europe. In September 1940, the 70th (Young Soldiers) Battalion was formed in Southampton, but soon moved to Basingstoke. It was raised for those soldiers around the age of 18 or 19 who had volunteered for the Army but were not old enough to be conscripted, the age being 20 at the time. However, the battalion was disbanded in July 1943 as the British government lowered the age of conscription for the British Armed Forces from 20 to 18. The Hampshire Regiment's Depot had been in Winchester since long before the Second World War. However, in September 1939, it moved to Parkhurst, Isle of Wight, where it stayed for the rest of the war. Post war and amalgamation In 1946, the regiment was awarded the title of Royal Hampshire Regiment in recognition of its service during the Second World War. The regiment was in Northern Ireland (Operation Banner) in 1972 and undertook a further eight tours over the next two decades. In 1992, as part of the Options for Change reorganisations, the regiment was merged with the Queen's Regiment to become the Princess of Wales's Royal Regiment. Regimental museum The Royal Hampshire Regiment Museum is based at Lower Barracks in Winchester. It is one of several regimental museums that comprise Winchester's Military Museums. Battle honours The Regiment was awarded the following battle honours: From the 37th (North Hampshire) Regiment of Foot: Minden, Tournay, Peninsula From the 67th (South Hampshire) Regiment of Foot: Barrosa, Peninsula, India, Taku Forts, Pekin 1860, Charasiah, Kabul 1879, Afghanistan 1878-80 Blenheim1, Ramillies1, Oudenarde1, Malplaquet1, Dettingen1, Belleisle2, Burma 1885–87, Paardeberg, South Africa 1900-02 The Great War (32 battalions): Le Cateau, Retreat from Mons, Marne 1914 '18, Aisne 1914, Armentières 1914, Ypres 1915 '17 '18, St. Julien, Frezenberg, Bellewaarde, Somme 1916 '18, Albert 1916, Guillemont, Ginchy, Flers-Courcelette, Thiepval, Le Transloy, Ancre Heights, Ancre 1916, Arras 1917 '18, Vimy 1917, Scarpe 1917 '18, Messines 1917, Pilckem, Langemarck 1917, Menin Road, Polygon Wood, Broodseinde, Poelcappelle, Passchendaele, Cambrai 1917 '18, St. Quentin, Bapaume 1918, Rosières, Lys, Estaires, Hazebrouck, Bailleul, Kemmel, Béthune, Tardenois, Drocourt-Quéant, Hindenburg Line, Havrincourt, Canal du Nord, Courtrai, Selle, Valenciennes, Sambre, France and Flanders 1914–18, Italy 1917–18, Kosturino, Struma, Doiran 1917 '18, Macedonia 1915–18, Helles, Landing at Helles, Krithia, Suvla, Sari Bair, Landing at Suvla, Scimitar Hill, Gallipoli 1915–16, Egypt 1915–17, Gaza, El Mughar, Nebi Samwil, Jerusalem, Jaffa, Tell 'Asur, Megiddo, Sharon, Palestine 1917–18, Aden, Shaiba, Kut al Amara 1915 '17, Tigris 1916, Baghdad, Sharqat, Mesopotamia 1915–18, Persia 1918–19, Archangel 1919, Siberia 1918-19 The Second World War: Dunkirk 1940, Normandy Landing, Tilly sur Seulles, Caen, Hill 112, Mont Pincon, Jurques, St. Pierre La Vielle, Nederrijn, Roer, Rhineland, Goch, Rhine, North-West Europe 1940 '44-45, Tebourba Gap, Sidi Nsir, Hunt's Gap, Montagne Farm, Fondouk, Pichon, El Kourzia, Ber Rabal, North Africa 1940–43, Landing in Sicily, Regalbuto, Sicily 1943, Landing at Porto S. Venere, Salerno, Salerno Hills, Battipaglia, Cava di Tirreni, Volturno Crossing, Garigliano Crossing, Damiano, Monte Ornito, Cerasola, Cassino II, Massa Vertecchi, Trasimene Line, Advance to Florence, Gothic Line, Monte Gridolfo, Montegaudio, Coriano, Montilgallo, Capture of Forli, Cosina Canal Crossing, Lamone Crossing, Pideura, Rimini Line, Montescudo, Frisoni, Italy 1943–45, Athens, Greece 1944–45, Malta 1941-42 Recipients of the Victoria Cross 2nd Lieutenant George Raymond Dallas Moor, 2nd Battalion, Hampshire Regiment, Great War 2nd Lieutenant Dennis George Wyldbore Hewitt, 14th (Service) Battalion, Hampshire Regiment, Great War 2nd Lieutenant Montague Shadworth Seymour Moore, 15th (Service) Battalion, Hampshire Regiment, Great War Major Wallace Le Patourel, 2nd Battalion, Hampshire Regiment, Second World War Captain Richard Wakeford, 2/4th Battalion, Hampshire Regiment, Second World War Lieutenant Gerard Ross Norton, 1/4th Battalion, Hampshire Regiment, Second World War Regimental Colonels Regimental Colonels were: The Hampshire Regiment - (1881) 1881–1888 (1st Bn): Gen. Sir Edmund Haythorne, KCB 1881–1883 (2nd Bn): Lt-Gen. William Mark Wood 1883–1888 (2nd Bn): Gen. Sir Henry Errington Longden, KCB, CSI 1888–1893: Gen. Thomas Edmond Knox, CB 1893–1908: Lt-Gen. Sir John Wellesley Thomas, KCB 1908–1924: Maj-Gen. Sir Charles Knowles, KCB 1924–1945: Gen. Sir Richard Haking, GBE, KCB, KCMG 1945–1948: Gen. Sir George Jeffreys, 1st Baron Jeffreys, KCB, KCVO, CMG, JP The Royal Hampshire Regiment - (1946) 1948–1954: Brig. Philip Herbert Cadoux-Hudson, MC, DL 1954–1964: Brig. Gerald Dominick Browne, CBE, DL 1964–1971: Maj-Gen. Richard Hutchinson Batten, CB, CBE, DSO, DL 1971–1981: Brig. David John Warren, DSO, OBE, MC, DL 1981–1987: Gen. Sir David Fraser, GCB, OBE, DL 1987–1992: Brig. Robert Long, CBE, MC, DL Alliances – The Wellington West Coast Regiment (1925-1948) – The Wellington West Coast and Taranaki Regiment (1948-1992) Notes and references Sources J.B.M. Frederick, Lineage Book of British Land Forces 1660-1978, Volume I, 1984: Microform Academic Publishers, Wakefield, United Kingdom. . External links An account by Jack Durey of his service with 2nd Battalion Hampshire Regiment in France, his capture, time at Stalag XX-B and his escape, and journey home via Odessa Contemporary account of Battle of Sidi Nsir and Hunt's Gap History of regiment Regiment Museum (Serles House) Military units and formations in Hampshire Military units and formations in Winchester Military units and formations established in 1881 Regiments of the British Army in World War I Regiments of the British Army in World War II Military units and formations disestablished in 1992 1881 establishments in the United Kingdom Princess of Wales's Royal Regiment
```c #include <stdlib.h> #include <gstdio.h> #include <glib-object.h> typedef struct _TestObject { GObject parent_instance; gint foo; gboolean bar; gchar *baz; gchar *quux; } TestObject; typedef struct _TestObjectClass { GObjectClass parent_class; } TestObjectClass; enum { PROP_0, PROP_FOO, PROP_BAR, PROP_BAZ, PROP_QUUX, N_PROPERTIES }; static GParamSpec *properties[N_PROPERTIES] = { NULL, }; static GType test_object_get_type (void); G_DEFINE_TYPE (TestObject, test_object, G_TYPE_OBJECT); static void test_object_set_foo (TestObject *obj, gint foo) { if (obj->foo != foo) { obj->foo = foo; g_assert (properties[PROP_FOO] != NULL); g_object_notify_by_pspec (G_OBJECT (obj), properties[PROP_FOO]); } } static void test_object_set_bar (TestObject *obj, gboolean bar) { bar = !!bar; if (obj->bar != bar) { obj->bar = bar; g_assert (properties[PROP_BAR] != NULL); g_object_notify_by_pspec (G_OBJECT (obj), properties[PROP_BAR]); } } static void test_object_set_baz (TestObject *obj, const gchar *baz) { if (g_strcmp0 (obj->baz, baz) != 0) { g_free (obj->baz); obj->baz = g_strdup (baz); g_assert (properties[PROP_BAZ] != NULL); g_object_notify_by_pspec (G_OBJECT (obj), properties[PROP_BAZ]); } } static void test_object_set_quux (TestObject *obj, const gchar *quux) { if (g_strcmp0 (obj->quux, quux) != 0) { g_free (obj->quux); obj->quux = g_strdup (quux); g_assert (properties[PROP_QUUX] != NULL); g_object_notify_by_pspec (G_OBJECT (obj), properties[PROP_QUUX]); } } static void test_object_finalize (GObject *gobject) { g_free (((TestObject *) gobject)->baz); /* When the ref_count of an object is zero it is still * possible to notify the property, but it should do * nothing and silenty quit (bug #705570) */ g_object_notify (gobject, "foo"); g_object_notify_by_pspec (gobject, properties[PROP_BAR]); G_OBJECT_CLASS (test_object_parent_class)->finalize (gobject); } static void test_object_set_property (GObject *gobject, guint prop_id, const GValue *value, GParamSpec *pspec) { TestObject *tobj = (TestObject *) gobject; g_assert_cmpint (prop_id, !=, 0); g_assert_cmpint (prop_id, !=, N_PROPERTIES); g_assert (pspec == properties[prop_id]); switch (prop_id) { case PROP_FOO: test_object_set_foo (tobj, g_value_get_int (value)); break; case PROP_BAR: test_object_set_bar (tobj, g_value_get_boolean (value)); break; case PROP_BAZ: test_object_set_baz (tobj, g_value_get_string (value)); break; case PROP_QUUX: test_object_set_quux (tobj, g_value_get_string (value)); break; default: g_assert_not_reached (); } } static void test_object_get_property (GObject *gobject, guint prop_id, GValue *value, GParamSpec *pspec) { TestObject *tobj = (TestObject *) gobject; g_assert_cmpint (prop_id, !=, 0); g_assert_cmpint (prop_id, !=, N_PROPERTIES); g_assert (pspec == properties[prop_id]); switch (prop_id) { case PROP_FOO: g_value_set_int (value, tobj->foo); break; case PROP_BAR: g_value_set_boolean (value, tobj->bar); break; case PROP_BAZ: g_value_set_string (value, tobj->baz); break; case PROP_QUUX: g_value_set_string (value, tobj->quux); break; default: g_assert_not_reached (); } } static void test_object_class_init (TestObjectClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "Foo", -1, G_MAXINT, 0, G_PARAM_READWRITE); properties[PROP_BAR] = g_param_spec_boolean ("bar", "Bar", "Bar", FALSE, G_PARAM_READWRITE); properties[PROP_BAZ] = g_param_spec_string ("baz", "Baz", "Baz", NULL, G_PARAM_READWRITE); properties[PROP_QUUX] = g_param_spec_string ("quux", "quux", "quux", NULL, G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY); gobject_class->set_property = test_object_set_property; gobject_class->get_property = test_object_get_property; gobject_class->finalize = test_object_finalize; g_object_class_install_properties (gobject_class, N_PROPERTIES, properties); } static void test_object_init (TestObject *self) { self->foo = 42; self->bar = TRUE; self->baz = g_strdup ("Hello"); self->quux = NULL; } static void properties_install (void) { TestObject *obj = g_object_new (test_object_get_type (), NULL); GParamSpec *pspec; g_assert (properties[PROP_FOO] != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (obj), "foo"); g_assert (properties[PROP_FOO] == pspec); g_object_unref (obj); } typedef struct { const gchar *name; GParamSpec *pspec; gboolean fired; } TestNotifyClosure; static void on_notify (GObject *gobject, GParamSpec *pspec, TestNotifyClosure *clos) { g_assert (clos->pspec == pspec); g_assert_cmpstr (clos->name, ==, pspec->name); clos->fired = TRUE; } static void properties_notify (void) { TestObject *obj = g_object_new (test_object_get_type (), NULL); TestNotifyClosure clos; g_assert (properties[PROP_FOO] != NULL); g_assert (properties[PROP_QUUX] != NULL); g_signal_connect (obj, "notify", G_CALLBACK (on_notify), &clos); clos.name = "foo"; clos.pspec = properties[PROP_FOO]; clos.fired = FALSE; g_object_set (obj, "foo", 47, NULL); g_assert (clos.fired); clos.name = "baz"; clos.pspec = properties[PROP_BAZ]; clos.fired = FALSE; g_object_set (obj, "baz", "something new", NULL); g_assert (clos.fired); /* baz lacks explicit notify, so we will see this twice */ clos.fired = FALSE; g_object_set (obj, "baz", "something new", NULL); g_assert (clos.fired); /* quux on the other hand, ... */ clos.name = "quux"; clos.pspec = properties[PROP_QUUX]; clos.fired = FALSE; g_object_set (obj, "quux", "something new", NULL); g_assert (clos.fired); /* no change; no notify */ clos.fired = FALSE; g_object_set (obj, "quux", "something new", NULL); g_assert (!clos.fired); g_object_unref (obj); } typedef struct { GParamSpec *pspec[3]; gint pos; } Notifys; static void on_notify2 (GObject *gobject, GParamSpec *pspec, Notifys *n) { g_assert (n->pspec[n->pos] == pspec); n->pos++; } static void properties_notify_queue (void) { TestObject *obj = g_object_new (test_object_get_type (), NULL); Notifys n; g_assert (properties[PROP_FOO] != NULL); n.pspec[0] = properties[PROP_BAZ]; n.pspec[1] = properties[PROP_BAR]; n.pspec[2] = properties[PROP_FOO]; n.pos = 0; g_signal_connect (obj, "notify", G_CALLBACK (on_notify2), &n); g_object_freeze_notify (G_OBJECT (obj)); g_object_set (obj, "foo", 47, NULL); g_object_set (obj, "bar", TRUE, "foo", 42, "baz", "abc", NULL); g_object_thaw_notify (G_OBJECT (obj)); g_assert (n.pos == 3); g_object_unref (obj); } static void properties_construct (void) { TestObject *obj; gint val; gboolean b; gchar *s; g_test_bug ("630357"); /* more than 16 args triggers a realloc in g_object_new_valist() */ obj = g_object_new (test_object_get_type (), "foo", 1, "foo", 2, "foo", 3, "foo", 4, "foo", 5, "bar", FALSE, "foo", 6, "foo", 7, "foo", 8, "foo", 9, "foo", 10, "baz", "boo", "foo", 11, "foo", 12, "foo", 13, "foo", 14, "foo", 15, "foo", 16, "foo", 17, "foo", 18, NULL); g_object_get (obj, "foo", &val, NULL); g_assert (val == 18); g_object_get (obj, "bar", &b, NULL); g_assert (!b); g_object_get (obj, "baz", &s, NULL); g_assert_cmpstr (s, ==, "boo"); g_free (s); g_object_unref (obj); } int main (int argc, char *argv[]) { g_test_init (&argc, &argv, NULL); g_test_bug_base ("path_to_url"); g_test_add_func ("/properties/install", properties_install); g_test_add_func ("/properties/notify", properties_notify); g_test_add_func ("/properties/notify-queue", properties_notify_queue); g_test_add_func ("/properties/construct", properties_construct); return g_test_run (); } ```
```javascript import Vue from "vue"; import * as dayjs from "dayjs"; Vue.filter('NumberFormat', function (value) { if (!value) { return '0' } let intPartFormat = value.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // return intPartFormat }) Vue.filter('dayjs', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { return dayjs(dataStr).format(pattern) }) Vue.filter('moment', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { return dayjs(dataStr).format(pattern) }) /** */ Vue.filter('ellipsis', function (value, vlength = 25) { if(!value){ return ""; } console.log('vlength: '+ vlength); if (value.length > vlength) { return value.slice(0, vlength) + '...' } return value }) ```
```xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="path_to_url" android:shape="oval"> <solid android:color="@color/color_schedule_blue"/> <stroke android:width="@dimen/schedule_hint_dash_line_width" android:color="@color/color_circle_border"/> </shape> ```
Wolfgang Templin (born in 1948) – politician of the democratic opposition in Eastern Germany, publicist, concerned with the history of the GDR, the former Eastern Bloc and the German reunification. From 1973 to 1975, he was a Stasi informer under the codename "Peter". Later, Templin was a victim of the Stasi's psychological warfare program, which he sought to expose to the public with modest success. In 1985 he co-founded the Initiative for Peace and Human Rights. He published in the underground journal “Grenzfall”, cooperated with opposition in Eastern Europe and integrated environmental and pacifist groups in the GDR. After the fall of the Berlin Wall, he took part in the Round Table discussions. He was a member of the Alliance 90 faction in the People's Chamber and a co-founder of the Alliance 90 party. 1994-96 he was a research worker at the Berlin Wall Museum, whereas 1996 he became a co-founder of the Federal Foundation for the Reconciliation of the SED Dictatorship. In 2009 he was awarded Dialog Magazine Prize of the Polish-German Society and the 2010 European Solidarity Centre medal. Since July 2010 Wolfgang Templin has been the Director of the Warsaw office of the Heinrich Böll Foundation. References German politicians 1948 births Living people Officers Crosses of the Order of Merit of the Federal Republic of Germany Recipients of the Order of Merit of Berlin People of the Stasi
```objective-c // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // // path_to_url // // Unless required by applicable law or agreed to in writing, // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // specific language governing permissions and limitations #pragma once #include <cstddef> #include <cstdint> #include <hdfs.h> #include "arrow/util/visibility.h" #include "arrow/util/windows_compatibility.h" // IWYU pragma: keep using std::size_t; struct hdfsBuilder; namespace arrow { class Status; namespace io::internal { // NOTE(wesm): cpplint does not like use of short and other imprecise C types struct LibHdfsShim { void* handle; hdfsBuilder* (*hdfsNewBuilder)(void); void (*hdfsBuilderSetNameNode)(hdfsBuilder* bld, const char* nn); void (*hdfsBuilderSetNameNodePort)(hdfsBuilder* bld, tPort port); void (*hdfsBuilderSetUserName)(hdfsBuilder* bld, const char* userName); void (*hdfsBuilderSetKerbTicketCachePath)(hdfsBuilder* bld, const char* kerbTicketCachePath); void (*hdfsBuilderSetForceNewInstance)(hdfsBuilder* bld); hdfsFS (*hdfsBuilderConnect)(hdfsBuilder* bld); int (*hdfsBuilderConfSetStr)(hdfsBuilder* bld, const char* key, const char* val); int (*hdfsDisconnect)(hdfsFS fs); hdfsFile (*hdfsOpenFile)(hdfsFS fs, const char* path, int flags, int bufferSize, short replication, tSize blocksize); // NOLINT int (*hdfsCloseFile)(hdfsFS fs, hdfsFile file); int (*hdfsExists)(hdfsFS fs, const char* path); int (*hdfsSeek)(hdfsFS fs, hdfsFile file, tOffset desiredPos); tOffset (*hdfsTell)(hdfsFS fs, hdfsFile file); tSize (*hdfsRead)(hdfsFS fs, hdfsFile file, void* buffer, tSize length); tSize (*hdfsPread)(hdfsFS fs, hdfsFile file, tOffset position, void* buffer, tSize length); tSize (*hdfsWrite)(hdfsFS fs, hdfsFile file, const void* buffer, tSize length); int (*hdfsFlush)(hdfsFS fs, hdfsFile file); int (*hdfsAvailable)(hdfsFS fs, hdfsFile file); int (*hdfsCopy)(hdfsFS srcFS, const char* src, hdfsFS dstFS, const char* dst); int (*hdfsMove)(hdfsFS srcFS, const char* src, hdfsFS dstFS, const char* dst); int (*hdfsDelete)(hdfsFS fs, const char* path, int recursive); int (*hdfsRename)(hdfsFS fs, const char* oldPath, const char* newPath); char* (*hdfsGetWorkingDirectory)(hdfsFS fs, char* buffer, size_t bufferSize); int (*hdfsSetWorkingDirectory)(hdfsFS fs, const char* path); int (*hdfsCreateDirectory)(hdfsFS fs, const char* path); int (*hdfsSetReplication)(hdfsFS fs, const char* path, int16_t replication); hdfsFileInfo* (*hdfsListDirectory)(hdfsFS fs, const char* path, int* numEntries); hdfsFileInfo* (*hdfsGetPathInfo)(hdfsFS fs, const char* path); void (*hdfsFreeFileInfo)(hdfsFileInfo* hdfsFileInfo, int numEntries); char*** (*hdfsGetHosts)(hdfsFS fs, const char* path, tOffset start, tOffset length); void (*hdfsFreeHosts)(char*** blockHosts); tOffset (*hdfsGetDefaultBlockSize)(hdfsFS fs); tOffset (*hdfsGetCapacity)(hdfsFS fs); tOffset (*hdfsGetUsed)(hdfsFS fs); int (*hdfsChown)(hdfsFS fs, const char* path, const char* owner, const char* group); int (*hdfsChmod)(hdfsFS fs, const char* path, short mode); // NOLINT int (*hdfsUtime)(hdfsFS fs, const char* path, tTime mtime, tTime atime); void Initialize() { this->handle = nullptr; this->hdfsNewBuilder = nullptr; this->hdfsBuilderSetNameNode = nullptr; this->hdfsBuilderSetNameNodePort = nullptr; this->hdfsBuilderSetUserName = nullptr; this->hdfsBuilderSetKerbTicketCachePath = nullptr; this->hdfsBuilderSetForceNewInstance = nullptr; this->hdfsBuilderConfSetStr = nullptr; this->hdfsBuilderConnect = nullptr; this->hdfsDisconnect = nullptr; this->hdfsOpenFile = nullptr; this->hdfsCloseFile = nullptr; this->hdfsExists = nullptr; this->hdfsSeek = nullptr; this->hdfsTell = nullptr; this->hdfsRead = nullptr; this->hdfsPread = nullptr; this->hdfsWrite = nullptr; this->hdfsFlush = nullptr; this->hdfsAvailable = nullptr; this->hdfsCopy = nullptr; this->hdfsMove = nullptr; this->hdfsDelete = nullptr; this->hdfsRename = nullptr; this->hdfsGetWorkingDirectory = nullptr; this->hdfsSetWorkingDirectory = nullptr; this->hdfsCreateDirectory = nullptr; this->hdfsSetReplication = nullptr; this->hdfsListDirectory = nullptr; this->hdfsGetPathInfo = nullptr; this->hdfsFreeFileInfo = nullptr; this->hdfsGetHosts = nullptr; this->hdfsFreeHosts = nullptr; this->hdfsGetDefaultBlockSize = nullptr; this->hdfsGetCapacity = nullptr; this->hdfsGetUsed = nullptr; this->hdfsChown = nullptr; this->hdfsChmod = nullptr; this->hdfsUtime = nullptr; } hdfsBuilder* NewBuilder(void); void BuilderSetNameNode(hdfsBuilder* bld, const char* nn); void BuilderSetNameNodePort(hdfsBuilder* bld, tPort port); void BuilderSetUserName(hdfsBuilder* bld, const char* userName); void BuilderSetKerbTicketCachePath(hdfsBuilder* bld, const char* kerbTicketCachePath); void BuilderSetForceNewInstance(hdfsBuilder* bld); int BuilderConfSetStr(hdfsBuilder* bld, const char* key, const char* val); hdfsFS BuilderConnect(hdfsBuilder* bld); int Disconnect(hdfsFS fs); hdfsFile OpenFile(hdfsFS fs, const char* path, int flags, int bufferSize, short replication, tSize blocksize); // NOLINT int CloseFile(hdfsFS fs, hdfsFile file); int Exists(hdfsFS fs, const char* path); int Seek(hdfsFS fs, hdfsFile file, tOffset desiredPos); tOffset Tell(hdfsFS fs, hdfsFile file); tSize Read(hdfsFS fs, hdfsFile file, void* buffer, tSize length); bool HasPread(); tSize Pread(hdfsFS fs, hdfsFile file, tOffset position, void* buffer, tSize length); tSize Write(hdfsFS fs, hdfsFile file, const void* buffer, tSize length); int Flush(hdfsFS fs, hdfsFile file); int Available(hdfsFS fs, hdfsFile file); int Copy(hdfsFS srcFS, const char* src, hdfsFS dstFS, const char* dst); int Move(hdfsFS srcFS, const char* src, hdfsFS dstFS, const char* dst); int Delete(hdfsFS fs, const char* path, int recursive); int Rename(hdfsFS fs, const char* oldPath, const char* newPath); char* GetWorkingDirectory(hdfsFS fs, char* buffer, size_t bufferSize); int SetWorkingDirectory(hdfsFS fs, const char* path); int MakeDirectory(hdfsFS fs, const char* path); int SetReplication(hdfsFS fs, const char* path, int16_t replication); hdfsFileInfo* ListDirectory(hdfsFS fs, const char* path, int* numEntries); hdfsFileInfo* GetPathInfo(hdfsFS fs, const char* path); void FreeFileInfo(hdfsFileInfo* hdfsFileInfo, int numEntries); char*** GetHosts(hdfsFS fs, const char* path, tOffset start, tOffset length); void FreeHosts(char*** blockHosts); tOffset GetDefaultBlockSize(hdfsFS fs); tOffset GetCapacity(hdfsFS fs); tOffset GetUsed(hdfsFS fs); int Chown(hdfsFS fs, const char* path, const char* owner, const char* group); int Chmod(hdfsFS fs, const char* path, short mode); // NOLINT int Utime(hdfsFS fs, const char* path, tTime mtime, tTime atime); Status GetRequiredSymbols(); }; // TODO(wesm): Remove these exports when we are linking statically ARROW_EXPORT Status ConnectLibHdfs(LibHdfsShim** driver); } // namespace io::internal } // namespace arrow ```
The 2000–01 Real Murcia season was the club's 82nd season in existence and the first season back in the second division of Spanish football since 1994. In addition to the domestic league, Real Murcia participated in this season's edition of the Copa del Rey. The season covered the period from 1 July 2000 to 30 June 2021. Pre-season and friendlies Competitions Overview Segunda División League table Results summary Results by round Matches Copa del Rey Statistics Goalscorers References External links Real Murcia
Wait A While (foaled March 4, 2003) is an American Thoroughbred racehorse and broodmare. Although she showed some good form on dirt she had her greatest success on turf and won twelve of her twenty-four races in a track career which lasted from August 2005 until October 2008. As a two-year-old she won two of her four races including the Miss Grillo Stakes. In the following year she won the Davona Dale Stakes, Sands Point Stakes, American Oaks, Lake Placid Stakes and Yellow Ribbon Stakes in a campaign which saw her being voted that season's American Champion Three-Year-Old Filly. Her third season was disrupted by illness and injury but she did win the Honey Fox Stakes and the Ballston Spa Handicap. In her final season Wait A While won the San Gorgonio Handicap and recorded repeat victories in the Ballston Spa Handicap and the Yellow Ribbon Stakes. Her racing career ended controversially when she was disqualified for failing a drug test after finishing third in the Breeders' Cup Filly & Mare Turf. Background Wait A While is a gray mare bred in Kentucky by || & W. Temple Webber Jr. She was sired by the 1995 American Champion Two-Year-Old Colt Maria's Mon, whose other progeny included the Kentucky Derby winners Monarchos and Super Saver. Wait A While was the first of four recorded foals produced by her dam Flirtatious, who won four minor races from twelve stats. Flirtatious's dam Grand Charmer was a half-sister of the dam of the Preakness Stakes winner Lookin At Lucky, and a more distant relative of the Irish Derby winner Sir Harry Lewis. In September 2004 the yearling filly was consigned by Lane's End to the Keeneland sale and was bought for $50,000 by Tim Hamm. In February 2005, she returned to the sales ring at Ocala, Florida and was sold for $260,000 to Ocala Horses. She raced in the ownership of Alan & Karen Cohen's Arindel Farm and was sent into training with Todd Pletcher. Racing career 2005: two-year-old season On her track debut, Wait A While finished fifth in a maiden race over six furlongs on dirt at Saratoga Race Course on August 29, 2005. A month later she was switched to the turf surface at Belmont Park and won a one-mile maiden, taking the lead on the final turn and drawing away in the closing stages to win by five lengths under a ride from John Velazquez. On the dirt at Belmont on 23 October she started the 1.6/1 favorite for the nine furlong Miss Grillo Stakes in which she was ridden as on her debut by Jerry Bailey. She took the lead from the start and was never challenged, winning by six and a half lengths from Swap Fliparoo. The filly was then moved up in class for the Grade II Demoiselle Stakes over nine furlongs at Aqueduct Racetrack in November. After showing some reluctance to enter the starting gate she set a "dawdling" for three-quarters of a mile before tiring to finish third behind Wonder Lady Anne L and Cinderella's Dream. 2006: three-year-old season Wait A While began her championship season with two races at Gulfstream Park, in both of which she was ridden by Velazquez. On February 4, racing on a sloppy track she won the Grade II Davona Dale Stakes by fourteen lengths from Teammate with Wonder Lady Anne L in third. She had delayed the start of the race for several minutes as she refused to enter the gate. After the race Pletcher admitted that while he believed the filly was better suited by grass, he felt obliged to follow the Kentucky Oaks trail. In March she started favorite for the Bonnie Miss Stakes but after racing in second for most of the nine furlong distance she faded in the closing stages to finish third behind Teammate and Wonder Lady Anne L. She was then moved up to Grade I class for the Ashland Stakes (a major trial for the Kentucky Oaks) at Keeneland on April 8. She was once again reluctant to enter the starting gate even after Velazquez dismounted, before finishing second, six and a half lengths behind the winner Bushfire. Garrett Gomez, who became the filly's regular jockey, took over the ride when Wait A While (after completing a series of starting gate tests) contested the 132nd running of the Kentucky Oaks at Churchill Downs on May 5 and started the 8.3/1 fourth choice in the betting behind Balance, Bushfire and Wonder Lady Anne L. She finished fourth of the fourteen runners behind the 47/1 outsider Lemons Forever, Ermine and Bushfire, but was promoted to third after Bushfire was disqualified for causing interference in the closing stages. Wait A While was dropped in class for the Grade III Sands Point Stakes over nine furlongs at Belmont on June 3 and started the 0.5/1 favorite against three opponents. The race was run on a sloppy dirt track having been transferred from the waterlogged turf course. She led from the start before going clear approaching the straight and won by four and a half lengths from Diamond Spirit. Wait A While returned to Grade I class for the American Oaks on turf at Hollywood Park Racetrack on July 2 and started 2.9/1 third favorite behind the Japanese filly Asahi Rising (third in the Yushun Himba) and the Honeymoon Handicap winner Attima. After racing in fourth place she survived a bump a quarter of a mile from the finish before taking the lead and drawing clear to win by four and a half lengths from Asahi Rising with the Canadian filly Arravale in third. After the race her owner's racing manager Cody Richardson said that the filly would probably stick to turf racing in the immediate future observing "she's obviously a very competitive filly on the dirt as well, but after a performance like this against this caliber of fillies, you'd have to think she'd be here for a while". In the Grade II Lake Placid Stakes on turf at Saratoga on August 18 she started 1.05/1 favorite against four opponents and won for the third time in a row, beating the French-bred Regret Stakes winner Lady of Venice by four and three quarter lengths. Pletcher described her win as "a dominant performance", and added "She is one of those special fillies that can do a little bit of everything. She's actually competitive on dirt, but this is her true calling: on the turf." Gomez commented; "this is a beautiful filly. When I asked her, she just exploded for me". On September 30, Wait A While was matched against older fillies and mares for the first time in the Grade I Yellow Ribbon Stakes over ten furlongs at Santa Anita Park and started the 0.7/1 favorite against seven opponents including Three Degrees (Honeymoon Handicap), Moscow Burning (Sheepshead Bay Stakes) and Dancing Edie (John C. Mabee Handicap). She tracked the leader Dancing Edie, before taking the lead approaching the stretch and going clear to win by four and a half lengths. Dancing Edie took second place by a neck from Three Degrees. Gomez commented "all I can say is that everything she's done has been impressive...I'm really glad Todd decided to put her on the grass." Wait A While ended her second season by contesting the eighth running of the Breeders' Cup Filly & Mare Turf run that year at Churchill Downs. She started 2.3/1 second favorite behind the British mare Ouija Board who had won the race in 2004. Wait A While raced in fifth place before moving up to third on the final turn but could make no further progress and finished fourth behind Ouija Board, Film Maker and Honey Ryder, being the first three-year-old to finish. 2007: four-year-old season As in the previous year, Wait A While began her third season at Gulfstream. John Velazquez took the ride in the Grade III Honey Fox Stakes in which the filly started 0.4/1 favorite and won by one and a quarter lengths from Precious Kitten after leading from the start. Velazquez said "she was awesome. I gave her one spank and she took off." She was reunited with Gomez and started favorite for the Grade III Jenny Wiley Stakes at Keeneland in April but finished fifth of the six runners behind My Typhoon (to whom she was conceding four pounds), almost seven lengths behind the winner. Wait A While started favorite again for the Just A Game Handicap at Belmont on June 9, but again proved no match for My Typhoon (at level weights), beaten three and three quarter lengths into second place. The filly was sent to contest the CashCall Mile Invitational Stakes but was scratched from the race after developing a fever. Wait A While met My Typhoon for the third time in the Grade II Ballston Spa Handicap at Saratoga on August 23 and started 3/1 second favorite behind her rival, from whom she was receiving one pound. The filly recovered from a bump at the start to settle in fifth place before taking the lead on the outside entering the stretch and winning by two and a quarter lengths from Vacare, with My Typhoon in sixth. After the race Pletcher said "people may have lost some respect for her... things haven’t gone exactly right with her... she showed today that she is as good as she has ever been." Wait A While started odds-on favorite for the Grade I Flower Bowl Invitational Stakes at Belmont on September 29, but, after racing in second place on the outside for most of the way she faded in the stretch and finished third, beaten three quarters of a length and half a length by Lahudood and Rosinka. Plans to race the filly in the Breeders' Cup Filly & Mare Turf were abandoned after she sustained a knee injury. On her final appearance of the season, Wait A While started 6/5 favorite for the Matriarch Stakes at Hollywood Park on 25 November and finished second to Precious Kitten, with Lady of Venice and Live Life in third and fourth. 2008: five-year-old season On January 14, 2008 at Santa Anita, Wait A While contested the Grade II San Gorgonio Handicap a race which had been postponed for a week as the racecourse struggled with drainage problems caused by the newly installed Cushion Track. Starting the odds-on favorite against four opponents, she raced in third place before taking the lead a quarter of a mile from the finish and winning by one and a half lengths from Lavender Sky. Commenting on the mare's relatively unimpressive performance, Gomez said "She was looking around, and I couldn’t get her focused on her task [but] when I found a spot, she did what she was supposed to do". Wait A While then sustained a stress fracture to her left tibia and was off the course for more than six months. Wait A While returned for the Grade I Diana Stakes at Saratoga on 26 July. Ridden for the first and only time by Rafael Bejarano she was made the 3.05/1 favorite but finished seventh of the ten runners almost six lengths behind the winner Forever Together. On August 21, the mare attempted to repeat her 2007 success in the Ballston Spa Handicap and started the 0.85/1 favorite against four opponents. With John Velazquez reclaiming the ride, Wait A While tracked the leader Sharp Susan before taking the lead entering the stretch and held off the challenge of Carriage Trail to win by a length. Pletcher expressed the view that the firmer ground had been the key to the mare's improved performance and added "She's a special filly... she's won some tremendous races. This is her fourth year at Saratoga, so when you have one that long, it gets a little extra special". On 27 September, Wait A While attempted to become the first horse to win the Yellow Ribbon Stakes for a second time. Ridden by Velaquez she started favorite ahead of the New Zealand-bred Black Mamba (winner of the John C. Mabee Handicap) and Vacare. After racing in third place on the outside, the mare took the lead entering the stretch, accelerated into a clear lead, and held off a challenge from Vacare to win by three-quarters of a length, with Black Mamba a length away in third. Velazquez reported that the mare "got a little bit aggressive with me when we started down the backside, but she does everything easy and I was able to bide my time. When we made the lead turning for home I thought she was going to just open up, but instead she waited on those horses. When Vacare came to her outside, though, she dug in and got it done." Wait A While ended her career by contesting the tenth running of the Breeders' Cup Filly & Mare Turf run at Santa Anita on October 24 and started 4/1 second favorite behind the three-year-old Irish filly Halfway to Heaven. After racing in third place she moved forward on the outside on the final turn and briefly took the lead inside the final furlong but was overtaken in the final strides and finished third behind Forever Together and the Canadian outsider Sealy Hill. Following the race, Wait A While was disqualified from third place after testing positive for procaine, a local anaesthetic component of "procaine penicillin G" an antibiotic preparation which was administered to the mare to treat a fever she contracted after winning the Yellow Ribbon. Pletcher insisted that the drug had last been administered to the mare eighteen days before the Filly & Mare Turf after he had been assured that it would be clear of her system in fourteen days. Assessment and awards In the Eclipse Awards for 2006, Wait A While was named American Champion Three-Year-Old Filly. She received 138 votes with 108 going to the Alabama Stakes winner Pine Island and 21 to other contenders. She finished third to Ouija Board in the voting for American Champion Female Turf Horse Breeding record Zaikov, grey colt, foaled in 2010, sired by Distorted Humor, unbeaten in two races Wait No More, grey filly, 2011, by Medaglia d'Oro, won two races (active in 2014) Partiro, colt, 2013, by Smart Strike Pedigree References 2003 racehorse births Racehorses bred in Kentucky Racehorses trained in the United States Thoroughbred family 9-f
Tunisia is scheduled to compete at the 2024 Summer Olympics in Paris from 26 July to 11 August 2024. Since the nation's official debut in 1960, Tunisian athletes have appeared in every edition of the Summer Olympic Games, except for Moscow 1980 as part of the United States-led boycott. Competitors The following is the list of number of competitors in the Games. Athletics Tunisian track and field athletes achieved the entry standards for Paris 2024, either by passing the direct qualifying mark (or time for track and road races) or by world ranking, in the following events (a maximum of 3 athletes each): Track and road events Boxing Tunisia entered one boxers into the Olympic tournament. Khouloud Hlimi (women's featherweight) secured a spots in her division by advancing to the final match at the 2023 African Olympic Qualification Tournament in Dakar, Senegal. Rowing Tunisian rowers qualified two boats, each in the women's lightweight double sculls and men's single sculls for the Games through the 2023 African Qualification Regatta in Tunis, Tunisia. Qualification Legend: FA=Final A (medal); FB=Final B (non-medal); FC=Final C (non-medal); FD=Final D (non-medal); FE=Final E (non-medal); FF=Final F (non-medal); SA/B=Semifinals A/B; SC/D=Semifinals C/D; SE/F=Semifinals E/F; QF=Quarterfinals; R=Repechage Shooting Tunisian shooters achieved quota places for the following events based on their results at the 2022 and 2023 ISSF World Championships, 2023 African Championships, and 2024 ISSF World Olympic Qualification Tournament. Swimming Tunisian swimmers achieved the entry standards in the following events for Paris 2024 (a maximum of two swimmers under the Olympic Qualifying Time (OST) and potentially at the Olympic Consideration Time (OCT)): References Nations at the 2024 Summer Olympics 2024 2024 in Tunisian sport
Olivetolic acid cyclase (EC 4.4.1.26, OAC) is an enzyme with systematic name 3,5,7-trioxododecanoyl-CoA CoA-lyase (2,4-dihydroxy-6-pentylbenzoate-forming). This enzyme catalyses the following chemical reaction 3,5,7-trioxododecanoyl-CoA → CoA + 2,4-dihydroxy-6-pentylbenzoate This enzymes participates in the cannabinoids biosynthesis in the plant Cannabis sativa. References External links EC 4.4.1
Champignol malgré lui (Champignol despite himself) is a farce in three acts, by Georges Feydeau and Maurice Desvallières. It was first performed in Paris in 1892–93, and ran for 434 performances. The play depicts the complications arising when one man is obliged by circumstances to do military service for another, while the latter, unaware, is doing military service on his own account, under the same name. Background and first production In 1886 the 24-year-old Feydeau had a great success with his first full-length play, Tailleur pour dames (Ladies' Tailor), but his next five plays had been failures or very modest successes. After a period of studying the works of the earlier comic masters of the 19th century he wrote two new plays in 1892: Monsieur chasse! (Monsieur is hunting) and Champignol malgré lui – the latter in collaboration with Maurice Desvallières. The management of the Théâtre du Palais-Royal accepted Monsieur chasse! for production, but rejected Champignol malgré lui as too far-fetched and implausible to convince an audience. Feydeau's old friend, Henri Micheau, the owner of the Théâtre des Nouveautés, insisted on seeing the rejected script and immediately recognised it as a potential winner. His judgment was vindicated by the runs achieved by the two plays: Monsieur chasse! had a good run of 144 performances, but Champignol malgré lui had an exceptional run for its day: 434 performances, at a time when a run of more than 100 performances was rated as a success for a Parisian theatre. The play opened at the Nouveautés on 5 November 1892. Original cast Champignol – Alexandre Germain Saint Florimond – M. Guy Captain Camaret – M. Tarride Célestin – M. Clerget Charnel – M. Polin Ledoux – M. Poudrier Fourrageot – Mr Lauret Singleton – M. Samson Grosbond – M. Calvin, fils Le Prince de Valence – M. Rablet La Fauchette – M. Cave Belouette – M. Sarborg Badin – M. Boniface Lavalanche – M. Girault Jérôme – M. Prosper Brigadier – M. Petibon Perruquier – M. Ragot Joseph – M. Leroy Pinçon – M. Aunoble Rouche – M. Destrem Angèle – Jane Pierny Charlotte – Mme Netty Mauricette – Mme Narlay Adrienne – Mme Aumont Source: Les Annales du théâtre et de la musique. Synopsis A prominent young painter called Champignol is away from home, and during his absence his attractive wife imprudently flirts with a young flâneur called St Florimond. She intends nothing more than the most innocent flirtation; the pair go to spend a day at Fontainebleau, where during the excursion they meet her uncle, Charnel, and his daughter, and her husband, Singleton. These people have not met Angèle's husband, and in the confusion of the moment she introduces St Florimond to them as M. Champignol. Angèle, irritated with herself for this blunder, immediately takes the train for Paris, leaving St Florimond crestfallen. He visits her but Madame Champignol makes it plain she does not wish to be further acquainted with him. She is imprudent enough to allow him to give her a farewell kiss on the cheek. They are at the front door when this takes place, and at that moment there arrives Charlotte, a new servant from the country, who assumes St Florimond is Champignol. Angèle does not attempt to undeceive Charlotte, who displays her zeal by bringing St Florimond her master's dressing-gown. While he is thus attired, the Charnels and Singletons arrive, and are delighted to renew their acquaintance with the supposed Champignol. The next arrival is a military man, Captain Camaret, who wants his daughter's portrait painted, and St Florimond feels he has to accept, as any hesitation would compromise Angèle. It now turns out that Champignol, being away, has failed to respond to a summons to a fortnight's compulsory military service, and gendarmes arrive to enforce it. The servant girl tells them St Florimond is her master, he is taken away to join the regiment at Clermont. As soon as he has been removed, Champignol returns. His valet hands him the summons which had arrived in his absence, and he hastens to comply. At the barracks the real and the false Champignols are mistaken at every moment for each other. St Florimond still wears his hair long, Captain Camaret tells the adjutant to have it cut. The latter transmits the order to the corporal, who informs the real Champignol that he must submit himself to the barber. He is duly cropped, but Camaret again meets St Florimond, and perceiving that his tresses remain luxuriant assumes that his orders have been neglected. He reprimands the adjutant, the order goes down the command chain and Champignol is subjected to the scissors once more. By this point his head is "shaved as white as a billiard ball". Further mistakes of identity follow. Angèle arrives, and explains to her husband that tired of St Florimond's advances she let him be removed by the gendarmes. St Florimond is obliged to continue to do Champignol's two weeks of service, while the real Champignol makes matters up with his wife. As the curtain falls Camaret orders the false Champignol to get his hair cut. Source: The Era. Critical reception When the play opened in November 1892 one critic wrote of: Another critic said that it had been years since he heard such laughter in a Paris theatre – "I could return to it again and again with pleasure". He predicted that the piece "will have an interminable run". Adaptations An English version of the play, called The Other Fellow opened in London in September 1893 and ran for three months. In the same year an American adaptation, The Other Man, opened at the New National Theatre, Washington. References and sources References Sources 1892 plays Plays by Georges Feydeau Comedy plays Paris in fiction
Sana Sadeghi (; born 12 June 2000) is an Iranian footballer who plays as a midfielder for Kowsar Women Football League club Sepahan SC and the Iran women's national team. International career Sadeghi plays for the Iran's senior women's national team and participated in International official tournaments as following: AFC Women's Olympic Qualifying CAFA Women's Championship AFC Women's Asian Cup References External links 2000 births Living people Iranian women's footballers Iran women's international footballers Women's association football midfielders People from Kermanshah Province Iranian expatriate women's footballers 21st-century Iranian women
```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Spinner</title> </head> <style> #html-spinner{ width:40px; height:40px; border:4px solid #fcd779; border-top:4px solid white; border-radius:50%; } #html-spinner, #svg-spinner{ -webkit-transition-property: -webkit-transform; -webkit-transition-duration: 1.2s; -webkit-animation-name: rotate; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear; -moz-transition-property: -moz-transform; -moz-animation-name: rotate; -moz-animation-duration: 1.2s; -moz-animation-iteration-count: infinite; -moz-animation-timing-function: linear; transition-property: transform; animation-name: rotate; animation-duration: 1.2s; animation-iteration-count: infinite; animation-timing-function: linear; } @-webkit-keyframes rotate { from {-webkit-transform: rotate(0deg);} to {-webkit-transform: rotate(360deg);} } @-moz-keyframes rotate { from {-moz-transform: rotate(0deg);} to {-moz-transform: rotate(360deg);} } @keyframes rotate { from {transform: rotate(0deg);} to {transform: rotate(360deg);} } /* Rest of page style*/ body{ background:#FABC20; font-family: 'Open Sans', sans-serif; -webkit-font-smoothing: antialiased; color:#393D3D; } #container{ width:90%; max-width:700px; margin:1em auto; position:relative; } /* spinner positioning */ #html-spinner, #svg-spinner{ position:absolute; top:80px; margin-left:-24px; } #html-spinner{ left:25%; } #svg-spinner{ left:75%; } #html-para, #svg-para{ position:absolute; top:100px; width:40%; padding:5%; text-align:center; } #svg-para{ left:50%; } </style> <body> <div id="container"> <!--Element for spinner made with HTML + CSS--> <div id="html-spinner"></div> <p id="html-para">Spinner created with only HTML and CSS</p> <!--Element for custom SVG spinner--> <svg id="svg-spinner" xmlns="path_to_url" width="48" height="48" viewBox="0 0 48 48"> <circle cx="24" cy="4" r="4" fill="#fff"/> <circle cx="12.19" cy="7.86" r="3.7" fill="#fffbf2"/> <circle cx="5.02" cy="17.68" r="3.4" fill="#fef7e4"/> <circle cx="5.02" cy="30.32" r="3.1" fill="#fef3d7"/> <circle cx="12.19" cy="40.14" r="2.8" fill="#feefc9"/> <circle cx="24" cy="44" r="2.5" fill="#feebbc"/> <circle cx="35.81" cy="40.14" r="2.2" fill="#fde7af"/> <circle cx="42.98" cy="30.32" r="1.9" fill="#fde3a1"/> <circle cx="42.98" cy="17.68" r="1.6" fill="#fddf94"/> <circle cx="35.81" cy="7.86" r="1.3" fill="#fcdb86"/> </svg> <p id="svg-para">Spinner created with custom SVG and CSS Animation</p> </div> </div> </body> <script> document.addEventListener("DOMContentLoaded", function(event) { //Removing article link when on mobiforge console.log(document.referrer); if (parent !== window && document.referrer.indexOf('path_to_url === 0 && document.referrer.indexOf('path_to_url === 0) { console.log(document.referrer); document.getElementById('article-link').className = "fade-out"; } }); </script> </html> ```
```c++ /* [auto_generated] boost/numeric/odeint/external/mkl/mkl_operations.hpp [begin_description] Wrapper classes for intel math kernel library types. Get a free, non-commercial download of MKL at path_to_url [end_description] (See accompanying file LICENSE_1_0.txt or copy at path_to_url */ #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_MKL_MKL_OPERATIONS_HPP_INCLUDED #define BOOST_NUMERIC_ODEINT_EXTERNAL_MKL_MKL_OPERATIONS_HPP_INCLUDED #include <iostream> #include <mkl_cblas.h> #include <boost/numeric/odeint/algebra/default_operations.hpp> /* exemplary example for writing bindings to the Intel MKL library * see test/mkl for how to use mkl with odeint * this is a quick and dirty implementation showing the general possibility. * It works only with containers based on double and sequential memory allocation. */ namespace boost { namespace numeric { namespace odeint { /* only defined for doubles */ struct mkl_operations { //template< class Fac1 , class Fac2 > struct scale_sum2; template< class F1 = double , class F2 = F1 > struct scale_sum2 { typedef double Fac1; typedef double Fac2; const Fac1 m_alpha1; const Fac2 m_alpha2; scale_sum2( const Fac1 alpha1 , const Fac2 alpha2 ) : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) { } template< class T1 , class T2 , class T3 > void operator()( T1 &t1 , const T2 &t2 , const T3 &t3) const { // t1 = m_alpha1 * t2 + m_alpha2 * t3; // we get Containers that have size() and [i]-access const int n = t1.size(); //boost::numeric::odeint::copy( t1 , t3 ); if( &(t2[0]) != &(t1[0]) ) { cblas_dcopy( n , &(t2[0]) , 1 , &(t1[0]) , 1 ); } cblas_dscal( n , m_alpha1 , &(t1[0]) , 1 ); cblas_daxpy( n , m_alpha2 , &(t3[0]) , 1 , &(t1[0]) , 1 ); //daxpby( &n , &m_alpha2 , &(t3[0]) , &one , &m_alpha1 , &(t1[0]) , &one ); } }; template< class F1 = double , class F2 = F1 , class F3 = F2 > struct scale_sum3 { typedef double Fac1; typedef double Fac2; typedef double Fac3; const Fac1 m_alpha1; const Fac2 m_alpha2; const Fac3 m_alpha3; scale_sum3( const Fac1 alpha1 , const Fac2 alpha2 , const Fac3 alpha3 ) : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) , m_alpha3( alpha3 ) { } template< class T1 , class T2 , class T3 , class T4 > void operator()( T1 &t1 , const T2 &t2 , const T3 &t3 , const T4 &t4 ) const { // t1 = m_alpha1 * t2 + m_alpha2 * t3 + m_alpha3 * t4; // we get Containers that have size() and [i]-access const int n = t1.size(); //boost::numeric::odeint::copy( t1 , t3 ); if( &(t2[0]) != &(t1[0]) ) { cblas_dcopy( n , &(t2[0]) , 1 , &(t1[0]) , 1 ); } cblas_dscal( n , m_alpha1 , &(t1[0]) , 1 ); cblas_daxpy( n , m_alpha2 , &(t3[0]) , 1 , &(t1[0]) , 1 ); //daxpby( &n , &m_alpha2 , &(t3[0]) , &one , &m_alpha1 , &(t1[0]) , &one ); cblas_daxpy( n , m_alpha3 , &(t4[0]) , 1 , &(t1[0]) , 1 ); } }; template< class F1 = double , class F2 = F1 , class F3 = F2 , class F4 = F3 > struct scale_sum4 { typedef double Fac1; typedef double Fac2; typedef double Fac3; typedef double Fac4; const Fac1 m_alpha1; const Fac2 m_alpha2; const Fac3 m_alpha3; const Fac4 m_alpha4; scale_sum4( const Fac1 alpha1 , const Fac2 alpha2 , const Fac3 alpha3 , const Fac4 alpha4 ) : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) , m_alpha3( alpha3 ) , m_alpha4( alpha4 ) { } template< class T1 , class T2 , class T3 , class T4 , class T5 > void operator()( T1 &t1 , const T2 &t2 , const T3 &t3 , const T4 &t4 , const T5 &t5 ) const { // t1 = m_alpha1 * t2 + m_alpha2 * t3 + m_alpha3 * t4 + m_alpha4 * t5; // we get Containers that have size() and [i]-access const int n = t1.size(); //boost::numeric::odeint::copy( t1 , t3 ); if( &(t2[0]) != &(t1[0]) ) { cblas_dcopy( n , &(t2[0]) , 1 , &(t1[0]) , 1 ); } cblas_dscal( n , m_alpha1 , &(t1[0]) , 1 ); cblas_daxpy( n , m_alpha2 , &(t3[0]) , 1 , &(t1[0]) , 1 ); //daxpby( &n , &m_alpha2 , &(t3[0]) , &one , &m_alpha1 , &(t1[0]) , &one ); cblas_daxpy( n , m_alpha3 , &(t4[0]) , 1 , &(t1[0]) , 1 ); cblas_daxpy( n , m_alpha4 , &(t5[0]) , 1 , &(t1[0]) , 1 ); } }; template< class F1 = double , class F2 = F1 , class F3 = F2 , class F4 = F3 , class F5 = F4 > struct scale_sum5 { typedef double Fac1; typedef double Fac2; typedef double Fac3; typedef double Fac4; typedef double Fac5; const Fac1 m_alpha1; const Fac2 m_alpha2; const Fac3 m_alpha3; const Fac4 m_alpha4; const Fac5 m_alpha5; scale_sum5( const Fac1 alpha1 , const Fac2 alpha2 , const Fac3 alpha3 , const Fac4 alpha4 , const Fac5 alpha5 ) : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) , m_alpha3( alpha3 ) , m_alpha4( alpha4 ) , m_alpha5( alpha5 ) { } template< class T1 , class T2 , class T3 , class T4 , class T5 , class T6 > void operator()( T1 &t1 , const T2 &t2 , const T3 &t3 , const T4 &t4 , const T5 &t5 , const T6 &t6 ) const { // t1 = m_alpha1 * t2 + m_alpha2 * t3 + m_alpha3 * t4 + m_alpha4 * t5 + m_alpha5 * t6; // we get Containers that have size() and [i]-access const int n = t1.size(); //boost::numeric::odeint::copy( t1 , t3 ); if( &(t2[0]) != &(t1[0]) ) { cblas_dcopy( n , &(t2[0]) , 1 , &(t1[0]) , 1 ); } cblas_dscal( n , m_alpha1 , &(t1[0]) , 1 ); cblas_daxpy( n , m_alpha2 , &(t3[0]) , 1 , &(t1[0]) , 1 ); //daxpby( &n , &m_alpha2 , &(t3[0]) , &one , &m_alpha1 , &(t1[0]) , &one ); cblas_daxpy( n , m_alpha3 , &(t4[0]) , 1 , &(t1[0]) , 1 ); cblas_daxpy( n , m_alpha4 , &(t5[0]) , 1 , &(t1[0]) , 1 ); cblas_daxpy( n , m_alpha5 , &(t6[0]) , 1 , &(t1[0]) , 1 ); } }; }; } // odeint } // numeric } // boost #endif // BOOST_NUMERIC_ODEINT_EXTERNAL_MKL_MKL_OPERATIONS_HPP_INCLUDED ```
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "path_to_url"> <mapper namespace="com.zheng.cms.rpc.mapper.CmsArticleExtMapper"> <resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsArticle"> <id column="article_id" jdbcType="INTEGER" property="articleId" /> <result column="topic_id" jdbcType="INTEGER" property="topicId" /> <result column="title" jdbcType="VARCHAR" property="title" /> <result column="author" jdbcType="VARCHAR" property="author" /> <result column="fromurl" jdbcType="VARCHAR" property="fromurl" /> <result column="image" jdbcType="VARCHAR" property="image" /> <result column="keywords" jdbcType="VARCHAR" property="keywords" /> <result column="description" jdbcType="VARCHAR" property="description" /> <result column="type" jdbcType="TINYINT" property="type" /> <result column="allowcomments" jdbcType="TINYINT" property="allowcomments" /> <result column="status" jdbcType="TINYINT" property="status" /> <result column="user_id" jdbcType="INTEGER" property="userId" /> <result column="readnumber" jdbcType="INTEGER" property="readnumber" /> <result column="top" jdbcType="INTEGER" property="top" /> <result column="system_id" jdbcType="INTEGER" property="systemId" /> <result column="ctime" jdbcType="BIGINT" property="ctime" /> <result column="orders" jdbcType="BIGINT" property="orders" /> </resultMap> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zheng.cms.dao.model.CmsArticle"> <result column="content" jdbcType="LONGVARCHAR" property="content" /> </resultMap> <!-- --> <select id="up" resultType="java.lang.Integer" parameterType="java.lang.Integer"> select u.id u_id,u.username,u.password,u.nickname,u.sex,u.ctime,u.content, b.id b_id,b.userid,b.name from cms_user u left join cms_book b on u.id=b.userid where u.id=#{id,jdbcType=INTEGER} </select> <!-- --> <select id="selectCmsArticlesByCategoryId" resultMap="ResultMapWithBLOBs" parameterType="map"> select ca.* from cms_article_category cac left join cms_article ca on cac.article_id=ca.article_id join ( select article_id from cms_article order by article_id desc ) ca_order on ca_order.article_id=ca.article_id where ca.status=1 and cac.category_id=#{categoryId,jdbcType=INTEGER} limit #{offset,jdbcType=INTEGER}, #{limit,jdbcType=INTEGER} </select> <!-- --> <select id="countByCategoryId" resultType="java.lang.Long" parameterType="map"> select count(*) from cms_article_category cac left join cms_article ca on cac.article_id=ca.article_id join ( select article_id from cms_article order by article_id desc ) ca_order on ca_order.article_id=ca.article_id where ca.status=1 and cac.category_id=#{categoryId,jdbcType=INTEGER} </select> <!-- --> <select id="selectCmsArticlesByTagId" resultMap="ResultMapWithBLOBs" parameterType="map"> select ca.* from cms_article_tag cat left join cms_article ca on cat.article_id=ca.article_id join ( select article_id from cms_article order by article_id desc ) ca_order on ca_order.article_id=ca.article_id where ca.status=1 and cat.tag_id=#{tagId,jdbcType=INTEGER} limit #{offset,jdbcType=INTEGER}, #{limit,jdbcType=INTEGER} </select> <!-- --> <select id="countByTagId" resultType="java.lang.Long" parameterType="map"> select count(*) from cms_article_tag cat left join cms_article ca on cat.article_id=ca.article_id join ( select article_id from cms_article order by article_id desc ) ca_order on ca_order.article_id=ca.article_id where ca.status=1 and cat.tag_id=#{tagId,jdbcType=INTEGER} </select> <!-- --> <cache type="org.mybatis.caches.ehcache.LoggingEhcache" /> </mapper> ```
```python # # # path_to_url # # Unless required by applicable law or agreed to in writing, software # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """External dependencies for Cartographer.""" load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def cartographer_repositories(): _maybe( http_archive, name = "com_github_nelhage_rules_boost", sha256 = your_sha256_hash, strip_prefix = "rules_boost-c3fae06e819ed8b93e31b150387dce4864758643", urls = [ "path_to_url", ], ) _maybe( http_archive, name = "com_github_antonovvk_bazel_rules", sha256 = your_sha256_hash, strip_prefix = "bazel_rules-c76e47ebe6f0a03b9dd99e245d5a0611813c36f9", urls = [ "path_to_url", ], ) _maybe( http_archive, name = "com_github_gflags_gflags", sha256 = your_sha256_hash, strip_prefix = "gflags-77592648e3f3be87d6c7123eb81cbad75f9aef5a", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "com_google_glog", sha256 = your_sha256_hash, strip_prefix = "glog-dd2b93d761a19860190cb3fa92066c8031e912e3", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "net_zlib_zlib", sha256 = your_sha256_hash, build_file = "@com_github_googlecartographer_cartographer//bazel/third_party:zlib.BUILD", strip_prefix = "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "org_cairographics_pixman", build_file = "@com_github_googlecartographer_cartographer//bazel/third_party/pixman:pixman.BUILD", sha256 = your_sha256_hash, strip_prefix = "pixman-0.34.0", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "org_cairographics_cairo", build_file = "@com_github_googlecartographer_cartographer//bazel/third_party/cairo:cairo.BUILD", sha256 = your_sha256_hash, strip_prefix = "cairo-1.14.10", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "org_freetype_freetype2", build_file = "@com_github_googlecartographer_cartographer//bazel/third_party:freetype2.BUILD", sha256 = your_sha256_hash, strip_prefix = "freetype-2.8", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "org_libgd_libgd", build_file = "@com_github_googlecartographer_cartographer//bazel/third_party:gd.BUILD", sha256 = your_sha256_hash, strip_prefix = "libgd-2.2.5", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "org_freedesktop_fontconfig", build_file = "@com_github_googlecartographer_cartographer//bazel/third_party/fontconfig:fontconfig.BUILD", sha256 = your_sha256_hash, strip_prefix = "fontconfig-2.12.4", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "org_ceres_solver_ceres_solver", build_file = "@com_github_googlecartographer_cartographer//bazel/third_party:ceres.BUILD", sha256 = your_sha256_hash, strip_prefix = "ceres-solver-58c5edae2f7c4d2533fe8a975c1f5f0b892dfd3e", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "org_tuxfamily_eigen", build_file = "@com_github_googlecartographer_cartographer//bazel/third_party:eigen.BUILD", sha256 = your_sha256_hash, strip_prefix = "eigen-eigen-f3a22f35b044", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "com_github_libexpat_libexpat", build_file = "@com_github_googlecartographer_cartographer//bazel/third_party:expat.BUILD", sha256 = your_sha256_hash, strip_prefix = "libexpat-R_2_2_4/expat", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "libjpeg", build_file = "@com_github_googlecartographer_cartographer//bazel/third_party:libjpeg.BUILD", sha256 = your_sha256_hash, strip_prefix = "jpeg-9b", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "org_libpng_libpng", build_file = "@com_github_googlecartographer_cartographer//bazel/third_party:libpng.BUILD", sha256 = your_sha256_hash, strip_prefix = "libpng-1.2.57", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "com_google_googletest", sha256 = your_sha256_hash, strip_prefix = "googletest-e3bd4cbeaeef3cee65a68a8bd3c535cb779e9b6d", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "bazel_skylib", sha256 = your_sha256_hash, strip_prefix = "bazel-skylib-1.0.2", urls = ["path_to_url"], ) _maybe( http_archive, name = "com_google_protobuf", sha256 = your_sha256_hash, strip_prefix = "protobuf-3.13.0", urls = [ "path_to_url", "path_to_url", ], repo_mapping = {"@zlib": "@net_zlib_zlib"}, ) _maybe( http_archive, name = "org_lua_lua", build_file = "@com_github_googlecartographer_cartographer//bazel/third_party:lua.BUILD", sha256 = your_sha256_hash, strip_prefix = "lua-5.2.4", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "com_github_grpc_grpc", sha256 = your_sha256_hash, strip_prefix = "grpc-1.19.1", urls = [ "path_to_url", "path_to_url", ], ) _maybe( http_archive, name = "com_github_jupp0r_prometheus_cpp", sha256 = your_sha256_hash, strip_prefix = "prometheus-cpp-4b11ee7a0aa7157494df06c4a324bf6d11bd0eec", urls = [ "path_to_url", ], ) _maybe( http_archive, name = "com_github_googlecartographer_async_grpc", sha256 = your_sha256_hash, strip_prefix = "async_grpc-771af45374af7f7bfc3b622ed7efbe29a4aba403", urls = [ "path_to_url", ], ) _maybe( http_archive, name = "com_google_absl", sha256 = your_sha256_hash, strip_prefix = "abseil-cpp-5441bbe1db5d0f2ca24b5b60166367b0966790af", urls = ["path_to_url"], ) _maybe( http_archive, name = "rules_python", sha256 = your_sha256_hash, strip_prefix = "rules_python-4b84ad270387a7c439ebdccfd530e2339601ef27", urls = [ "path_to_url", "path_to_url", ], ) # TODO(rodrigoq): remove these binds once grpc#14140 has been merged, as well # as removing `use_external` in cartographer_grpc/BUILD.bazel. # path_to_url native.bind( name = "grpc_cpp_plugin", actual = "@com_github_grpc_grpc//:grpc_cpp_plugin", ) native.bind( name = "grpc++_codegen_proto", actual = "@com_github_grpc_grpc//:grpc++_codegen_proto", ) def _maybe(repo_rule, name, **kwargs): if name not in native.existing_rules(): repo_rule(name = name, **kwargs) ```
Melastoma sanguineum is called red melastome or fox-tongued melastoma in English. They are erect shrubs or small slender trees with medium-sized violet-pink colored flowers with 6 petals that have made them attractive for cultivation. The leaves have the 5 distinctive longitudinal veins (nerves) typical of plants in the family Melastomataceae. Description Melastoma sanguineum are erect shrubs or small trees up to 2 to 4 m tall. Leaves are ovate-lanceolate 10 to 20 cm long. Fruit in the form of berries 15 mm long with 6 cells and many small seeds. Chromosome number 2n = 56. Distribution Native to Malay Peninsula, Java, Sumatra, Vietnam, and southern China. Occasionally cultivated in Hawaii. Naturalized populations have escaped cultivation and are spreading on Hawaii Island in the Keaukaha area and on the highway from Hawaii Volcanoes National Park to Hilo. Taxonomy Melastoma sanguineum was first described by John Sims in 1821 (Botanical Magazine 48: pl. 2241). References sanguineum Trees of Hawaii Flora without expected TNC conservation status
```java // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.physicalweb; import android.content.Context; import android.content.SharedPreferences; import android.os.AsyncTask; import org.chromium.base.ContextUtils; import org.chromium.base.Log; import org.chromium.base.library_loader.LibraryLoader; import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.metrics.RecordUserAction; import org.chromium.components.location.LocationUtils; import org.json.JSONArray; import org.json.JSONException; import java.util.concurrent.TimeUnit; import javax.annotation.concurrent.ThreadSafe; /** * Centralizes UMA data collection for the Physical Web feature. */ @ThreadSafe public class PhysicalWebUma { private static final String TAG = "PhysicalWeb"; private static final String HAS_DEFERRED_METRICS_KEY = "PhysicalWeb.HasDeferredMetrics"; private static final String OPT_IN_DECLINE_BUTTON_PRESS_COUNT = "PhysicalWeb.OptIn.DeclineButtonPressed"; private static final String OPT_IN_ENABLE_BUTTON_PRESS_COUNT = "PhysicalWeb.OptIn.EnableButtonPressed"; private static final String OPT_IN_HIGH_PRIORITY_NOTIFICATION_COUNT = "PhysicalWeb.OptIn.HighPriorityNotificationShown"; private static final String OPT_IN_MIN_PRIORITY_NOTIFICATION_COUNT = "PhysicalWeb.OptIn.MinPriorityNotificationShown"; private static final String OPT_IN_NOTIFICATION_PRESS_COUNT = "PhysicalWeb.OptIn.NotificationPressed"; private static final String PREFS_FEATURE_DISABLED_COUNT = "PhysicalWeb.Prefs.FeatureDisabled"; private static final String PREFS_FEATURE_ENABLED_COUNT = "PhysicalWeb.Prefs.FeatureEnabled"; private static final String PREFS_LOCATION_DENIED_COUNT = "PhysicalWeb.Prefs.LocationDenied"; private static final String PREFS_LOCATION_GRANTED_COUNT = "PhysicalWeb.Prefs.LocationGranted"; private static final String PWS_BACKGROUND_RESOLVE_TIMES = "PhysicalWeb.ResolveTime.Background"; private static final String PWS_FOREGROUND_RESOLVE_TIMES = "PhysicalWeb.ResolveTime.Foreground"; private static final String PWS_REFRESH_RESOLVE_TIMES = "PhysicalWeb.ResolveTime.Refresh"; private static final String OPT_IN_NOTIFICATION_PRESS_DELAYS = "PhysicalWeb.ReferralDelay.OptInNotification"; private static final String STANDARD_NOTIFICATION_PRESS_DELAYS = "PhysicalWeb.ReferralDelay.StandardNotification"; private static final String URL_SELECTED_COUNT = "PhysicalWeb.UrlSelected"; private static final String TOTAL_URLS_INITIAL_COUNTS = "PhysicalWeb.TotalUrls.OnInitialDisplay"; private static final String TOTAL_URLS_REFRESH_COUNTS = "PhysicalWeb.TotalUrls.OnRefresh"; private static final String ACTIVITY_REFERRALS = "PhysicalWeb.ActivityReferral"; private static final String PHYSICAL_WEB_STATE = "PhysicalWeb.State"; private static final String LAUNCH_FROM_PREFERENCES = "LaunchFromPreferences"; private static final String LAUNCH_FROM_DIAGNOSTICS = "LaunchFromDiagnostics"; private static final String BLUETOOTH = "Bluetooth"; private static final String DATA_CONNECTION = "DataConnection"; private static final String LOCATION_PERMISSION = "LocationPermission"; private static final String LOCATION_SERVICES = "LocationServices"; private static final String PREFERENCE = "Preference"; private static final int BOOLEAN_BOUNDARY = 2; private static final int TRISTATE_BOUNDARY = 3; /** * Records a URL selection. */ public static void onUrlSelected(Context context) { handleAction(context, URL_SELECTED_COUNT); } /** * Records a tap on the opt-in decline button. */ public static void onOptInDeclineButtonPressed(Context context) { handleAction(context, OPT_IN_DECLINE_BUTTON_PRESS_COUNT); } /** * Records a tap on the opt-in enable button. */ public static void onOptInEnableButtonPressed(Context context) { handleAction(context, OPT_IN_ENABLE_BUTTON_PRESS_COUNT); } /** * Records a display of a high priority opt-in notification. */ public static void onOptInHighPriorityNotificationShown(Context context) { handleAction(context, OPT_IN_HIGH_PRIORITY_NOTIFICATION_COUNT); } /** * Records a display of a min priority opt-in notification. */ public static void onOptInMinPriorityNotificationShown(Context context) { handleAction(context, OPT_IN_MIN_PRIORITY_NOTIFICATION_COUNT); } /** * Records a display of the opt-in activity. */ public static void onOptInNotificationPressed(Context context) { handleAction(context, OPT_IN_NOTIFICATION_PRESS_COUNT); } /** * Records when the user disables the Physical Web fetaure. */ public static void onPrefsFeatureDisabled(Context context) { handleAction(context, PREFS_FEATURE_DISABLED_COUNT); } /** * Records when the user enables the Physical Web fetaure. */ public static void onPrefsFeatureEnabled(Context context) { handleAction(context, PREFS_FEATURE_ENABLED_COUNT); } /** * Records when the user denies the location permission when enabling the Physical Web from the * privacy settings menu. */ public static void onPrefsLocationDenied(Context context) { handleAction(context, PREFS_LOCATION_DENIED_COUNT); } /** * Records when the user grants the location permission when enabling the Physical Web from the * privacy settings menu. */ public static void onPrefsLocationGranted(Context context) { handleAction(context, PREFS_LOCATION_GRANTED_COUNT); } /** * Records a response time from PWS for a resolution during a background scan. * @param duration The length of time PWS took to respond. */ public static void onBackgroundPwsResolution(Context context, long duration) { handleTime(context, PWS_BACKGROUND_RESOLVE_TIMES, duration, TimeUnit.MILLISECONDS); } /** * Records a response time from PWS for a resolution during a foreground scan that is not * explicitly user-initiated through a refresh. * @param duration The length of time PWS took to respond. */ public static void onForegroundPwsResolution(Context context, long duration) { handleTime(context, PWS_FOREGROUND_RESOLVE_TIMES, duration, TimeUnit.MILLISECONDS); } /** * Records a response time from PWS for a resolution during a foreground scan that is explicitly * user-initiated through a refresh. * @param duration The length of time PWS took to respond. */ public static void onRefreshPwsResolution(Context context, long duration) { handleTime(context, PWS_REFRESH_RESOLVE_TIMES, duration, TimeUnit.MILLISECONDS); } /** * Records number of URLs displayed to a user when the URL list is first displayed. * @param numUrls The number of URLs displayed to a user. */ public static void onUrlsDisplayed(Context context, int numUrls) { if (LibraryLoader.isInitialized()) { RecordHistogram.recordCountHistogram(TOTAL_URLS_INITIAL_COUNTS, numUrls); } else { storeValue(context, TOTAL_URLS_INITIAL_COUNTS, numUrls); } } /** * Records number of URLs displayed to a user when the user refreshes the URL list. * @param numUrls The number of URLs displayed to a user. */ public static void onUrlsRefreshed(Context context, int numUrls) { if (LibraryLoader.isInitialized()) { RecordHistogram.recordCountHistogram(TOTAL_URLS_REFRESH_COUNTS, numUrls); } else { storeValue(context, TOTAL_URLS_REFRESH_COUNTS, numUrls); } } /** * Records a ListUrlActivity referral. * @param refer The type of referral. This enum is listed as PhysicalWebActivityReferer in * histograms.xml. */ public static void onActivityReferral(Context context, int referer) { handleEnum(context, ACTIVITY_REFERRALS, referer, ListUrlsActivity.REFERER_BOUNDARY); switch (referer) { case ListUrlsActivity.NOTIFICATION_REFERER: handleTime(context, STANDARD_NOTIFICATION_PRESS_DELAYS, UrlManager.getInstance().getTimeSinceNotificationUpdate(), TimeUnit.MILLISECONDS); break; case ListUrlsActivity.OPTIN_REFERER: handleTime(context, OPT_IN_NOTIFICATION_PRESS_DELAYS, UrlManager.getInstance().getTimeSinceNotificationUpdate(), TimeUnit.MILLISECONDS); break; case ListUrlsActivity.PREFERENCE_REFERER: recordPhysicalWebState(context, LAUNCH_FROM_PREFERENCES); break; case ListUrlsActivity.DIAGNOSTICS_REFERER: recordPhysicalWebState(context, LAUNCH_FROM_DIAGNOSTICS); break; default: break; } } /** * Calculate a Physical Web state. * The Physical Web state includes: * - The location provider * - The location permission * - The bluetooth status * - The data connection status * - The Physical Web preference status */ public static void recordPhysicalWebState(Context context, String actionName) { LocationUtils locationUtils = LocationUtils.getInstance(); handleEnum(context, createStateString(LOCATION_SERVICES, actionName), locationUtils.isSystemLocationSettingEnabled() ? 1 : 0, BOOLEAN_BOUNDARY); handleEnum(context, createStateString(LOCATION_PERMISSION, actionName), locationUtils.hasAndroidLocationPermission() ? 1 : 0, BOOLEAN_BOUNDARY); handleEnum(context, createStateString(BLUETOOTH, actionName), Utils.getBluetoothEnabledStatus(), TRISTATE_BOUNDARY); handleEnum(context, createStateString(DATA_CONNECTION, actionName), Utils.isDataConnectionActive() ? 1 : 0, BOOLEAN_BOUNDARY); int preferenceState = 2; if (!PhysicalWeb.isOnboarding()) { preferenceState = PhysicalWeb.isPhysicalWebPreferenceEnabled() ? 1 : 0; } handleEnum(context, createStateString(PREFERENCE, actionName), preferenceState, TRISTATE_BOUNDARY); } /** * Uploads metrics that we have deferred for uploading. */ public static void uploadDeferredMetrics() { // Read the metrics. SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); if (prefs.getBoolean(HAS_DEFERRED_METRICS_KEY, false)) { AsyncTask.THREAD_POOL_EXECUTOR.execute(new UmaUploader(prefs)); } } private static String createStateString(String stateName, String actionName) { return PHYSICAL_WEB_STATE + "." + stateName + "." + actionName; } private static void storeAction(Context context, String key) { SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); int count = prefs.getInt(key, 0); prefs.edit() .putBoolean(HAS_DEFERRED_METRICS_KEY, true) .putInt(key, count + 1) .apply(); } private static void storeValue(Context context, String key, Object value) { SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); SharedPreferences.Editor prefsEditor = prefs.edit(); JSONArray values = null; try { values = new JSONArray(prefs.getString(key, "[]")); values.put(value); prefsEditor .putBoolean(HAS_DEFERRED_METRICS_KEY, true) .putString(key, values.toString()) .apply(); } catch (JSONException e) { Log.e(TAG, "JSONException when storing " + key + " stats", e); prefsEditor.remove(key).apply(); return; } prefsEditor.putString(key, values.toString()).apply(); } private static void handleAction(Context context, String key) { if (LibraryLoader.isInitialized()) { RecordUserAction.record(key); } else { storeAction(context, key); } } private static void handleTime(Context context, String key, long duration, TimeUnit tu) { if (LibraryLoader.isInitialized()) { RecordHistogram.recordTimesHistogram(key, duration, tu); } else { storeValue(context, key, duration); } } private static void handleEnum(Context context, String key, int value, int boundary) { if (LibraryLoader.isInitialized()) { RecordHistogram.recordEnumeratedHistogram(key, value, boundary); } else { storeValue(context, key, value); } } private static class UmaUploader implements Runnable { SharedPreferences mPrefs; UmaUploader(SharedPreferences prefs) { mPrefs = prefs; } @Override public void run() { uploadActions(URL_SELECTED_COUNT); uploadActions(OPT_IN_DECLINE_BUTTON_PRESS_COUNT); uploadActions(OPT_IN_ENABLE_BUTTON_PRESS_COUNT); uploadActions(OPT_IN_HIGH_PRIORITY_NOTIFICATION_COUNT); uploadActions(OPT_IN_MIN_PRIORITY_NOTIFICATION_COUNT); uploadActions(OPT_IN_NOTIFICATION_PRESS_COUNT); uploadActions(PREFS_FEATURE_DISABLED_COUNT); uploadActions(PREFS_FEATURE_ENABLED_COUNT); uploadActions(PREFS_LOCATION_DENIED_COUNT); uploadActions(PREFS_LOCATION_GRANTED_COUNT); uploadTimes(PWS_BACKGROUND_RESOLVE_TIMES, TimeUnit.MILLISECONDS); uploadTimes(PWS_FOREGROUND_RESOLVE_TIMES, TimeUnit.MILLISECONDS); uploadTimes(PWS_REFRESH_RESOLVE_TIMES, TimeUnit.MILLISECONDS); uploadTimes(STANDARD_NOTIFICATION_PRESS_DELAYS, TimeUnit.MILLISECONDS); uploadTimes(OPT_IN_NOTIFICATION_PRESS_DELAYS, TimeUnit.MILLISECONDS); uploadCounts(TOTAL_URLS_INITIAL_COUNTS); uploadCounts(TOTAL_URLS_REFRESH_COUNTS); uploadEnums(ACTIVITY_REFERRALS, ListUrlsActivity.REFERER_BOUNDARY); uploadEnums(createStateString(LOCATION_SERVICES, LAUNCH_FROM_DIAGNOSTICS), BOOLEAN_BOUNDARY); uploadEnums(createStateString(LOCATION_PERMISSION, LAUNCH_FROM_DIAGNOSTICS), BOOLEAN_BOUNDARY); uploadEnums(createStateString(BLUETOOTH, LAUNCH_FROM_DIAGNOSTICS), TRISTATE_BOUNDARY); uploadEnums(createStateString(DATA_CONNECTION, LAUNCH_FROM_DIAGNOSTICS), BOOLEAN_BOUNDARY); uploadEnums(createStateString(PREFERENCE, LAUNCH_FROM_DIAGNOSTICS), TRISTATE_BOUNDARY); uploadEnums(createStateString(LOCATION_SERVICES, LAUNCH_FROM_PREFERENCES), BOOLEAN_BOUNDARY); uploadEnums(createStateString(LOCATION_PERMISSION, LAUNCH_FROM_PREFERENCES), BOOLEAN_BOUNDARY); uploadEnums(createStateString(BLUETOOTH, LAUNCH_FROM_PREFERENCES), TRISTATE_BOUNDARY); uploadEnums(createStateString(DATA_CONNECTION, LAUNCH_FROM_PREFERENCES), BOOLEAN_BOUNDARY); uploadEnums(createStateString(PREFERENCE, LAUNCH_FROM_PREFERENCES), TRISTATE_BOUNDARY); removePref(HAS_DEFERRED_METRICS_KEY); } private void removePref(String key) { mPrefs.edit() .remove(key) .apply(); } private static Number[] parseJsonNumberArray(String jsonArrayStr) { try { JSONArray values = new JSONArray(jsonArrayStr); Number[] array = new Number[values.length()]; for (int i = 0; i < values.length(); i++) { Object object = values.get(i); if (!(object instanceof Number)) { return null; } array[i] = (Number) object; } return array; } catch (JSONException e) { return null; } } private static Long[] parseJsonLongArray(String jsonArrayStr) { Number[] numbers = parseJsonNumberArray(jsonArrayStr); if (numbers == null) { return null; } Long[] array = new Long[numbers.length]; for (int i = 0; i < numbers.length; i++) { array[i] = numbers[i].longValue(); } return array; } private static Integer[] parseJsonIntegerArray(String jsonArrayStr) { Number[] numbers = parseJsonNumberArray(jsonArrayStr); if (numbers == null) { return null; } Integer[] array = new Integer[numbers.length]; for (int i = 0; i < numbers.length; i++) { array[i] = numbers[i].intValue(); } return array; } private void uploadActions(String key) { int count = mPrefs.getInt(key, 0); removePref(key); for (int i = 0; i < count; i++) { RecordUserAction.record(key); } } private void uploadTimes(final String key, final TimeUnit tu) { String jsonTimesStr = mPrefs.getString(key, "[]"); removePref(key); Long[] times = parseJsonLongArray(jsonTimesStr); if (times == null) { Log.e(TAG, "Error reporting " + key + " with values: " + jsonTimesStr); return; } for (Long time : times) { RecordHistogram.recordTimesHistogram(key, time, TimeUnit.MILLISECONDS); } } private void uploadCounts(final String key) { String jsonCountsStr = mPrefs.getString(key, "[]"); removePref(key); Integer[] counts = parseJsonIntegerArray(jsonCountsStr); if (counts == null) { Log.e(TAG, "Error reporting " + key + " with values: " + jsonCountsStr); return; } for (Integer count: counts) { RecordHistogram.recordCountHistogram(key, count); } } private void uploadEnums(final String key, int boundary) { String jsonEnumsStr = mPrefs.getString(key, "[]"); removePref(key); Integer[] values = parseJsonIntegerArray(jsonEnumsStr); if (values == null) { Log.e(TAG, "Error reporting " + key + " with values: " + jsonEnumsStr); return; } for (Integer value: values) { RecordHistogram.recordEnumeratedHistogram(key, value, boundary); } } } } ```
```java /* */ package docs.javadsl; import akka.Done; import akka.NotUsed; import akka.stream.alpakka.geode.javadsl.Geode; import akka.stream.alpakka.testkit.javadsl.LogCapturingJunit4; import akka.stream.javadsl.Keep; import akka.stream.javadsl.RunnableGraph; import akka.stream.javadsl.Sink; import akka.stream.javadsl.Source; import org.junit.Rule; import org.junit.Test; import java.util.concurrent.CompletionStage; import java.util.concurrent.ExecutionException; public class GeodeSinkTestCase extends GeodeBaseTestCase { @Rule public final LogCapturingJunit4 logCapturing = new LogCapturingJunit4(); @Test public void sinkTest() throws ExecutionException, InterruptedException { Geode geode = createGeodeClient(); Sink<Person, CompletionStage<Done>> sink = geode.sink(personRegionSettings, new PersonPdxSerializer()); Source<Person, NotUsed> source = buildPersonsSource(100, 101, 103, 104, 105); RunnableGraph<CompletionStage<Done>> runnableGraph = source.toMat(sink, Keep.right()); CompletionStage<Done> stage = runnableGraph.run(system); stage.toCompletableFuture().get(); geode.close(); } @Test public void sinkAnimalTest() throws ExecutionException, InterruptedException { Geode geode = createGeodeClient(); Source<Animal, NotUsed> source = buildAnimalsSource(100, 101, 103, 104, 105); // #sink Sink<Animal, CompletionStage<Done>> sink = geode.sink(animalRegionSettings, new AnimalPdxSerializer()); RunnableGraph<CompletionStage<Done>> runnableGraph = source.toMat(sink, Keep.right()); // #sink CompletionStage<Done> stage = runnableGraph.run(system); stage.toCompletableFuture().get(); geode.close(); } } ```
Garbh Eileach is an uninhabited island in the Inner Hebrides of the west coast of Scotland. It is the largest of the Garvellachs and lies in the Firth of Lorne between Mull and Argyll. The name is Gaelic for "rough rock". The Anglicised version of the name gives the whole group of islands its name, the Garvellachs. There is a small ruined fort above a bay on the eastern coast. Footnotes References External links Uninhabited islands of Argyll and Bute
In computer networking, Semaphore Flag Signaling System (SFSS) is a humorous proposal to carry Internet Protocol (IP) traffic by semaphores. Semaphore Flag Signaling System was initially described in RFC 4824, an April Fools' Day RFC issued by the Internet Engineering Task Force edited by J. Hofmueller, et al. and released on April Fools' Day 2007. It is one of several April 1 RFCs. Reference implementation A reference implementation of IP over SFS has been done by the authors of the RFC within the project "Talking the Fish". An email was transmitted using SMTP over Semaphore Flag Signals. See also IP over Avian Carriers, a similar humorous proposal Semaphore, for other kinds of semaphores Victorian Internet, for the serious relation between semaphore and the internet Free-space optical communication, a more effective method of high-speed communication using visible light in free space Optical telegraph References Semaphore Internet architecture Link protocols Physical layer protocols Wireless networking 2007 hoaxes
```xml <?xml version="1.0" encoding="utf-8"?> <Refactorings> <Refactoring Id="RR0002" Identifier="AddBraces" Title="Add braces"> <OptionKey>add_braces</OptionKey> <Syntaxes> <Syntax>do statement</Syntax> <Syntax>else clause</Syntax> <Syntax>fixed statement</Syntax> <Syntax>for statement</Syntax> <Syntax>foreach statement</Syntax> <Syntax>if statement</Syntax> <Syntax>lock statement</Syntax> <Syntax>using statement</Syntax> <Syntax>while statement</Syntax> </Syntaxes> <Span>embedded statement</Span> </Refactoring> <Refactoring Id="RR0003" Identifier="AddBracesToIfElse" Title="Add braces to if-else"> <OptionKey>add_braces_to_if_else</OptionKey> <Syntaxes> <Syntax>if-else chain</Syntax> </Syntaxes> <Span>embedded statement</Span> </Refactoring> <Refactoring Id="RR0004" Identifier="AddBracesToSwitchSection" Title="Add braces to switch section"> <OptionKey>add_braces_to_switch_section</OptionKey> <Syntaxes> <Syntax>switch section</Syntax> </Syntaxes> <Span>case or default keyword</Span> </Refactoring> <Refactoring Id="RR0005" Identifier="AddBracesToSwitchSections" Title="Add braces to switch sections"> <OptionKey>add_braces_to_switch_sections</OptionKey> <Syntaxes> <Syntax>switch statement</Syntax> </Syntaxes> <Span>case or default keyword</Span> </Refactoring> <Refactoring Id="RR0006" Identifier="AddExplicitCast" Title="Add explicit cast" IsObsolete="true"> <OptionKey>add_explicit_cast</OptionKey> <Syntaxes> <Syntax>argument</Syntax> <Syntax>assignment expression</Syntax> <Syntax>return statement</Syntax> <Syntax>variable declaration</Syntax> </Syntaxes> <Images> <Image>AddCastExpressionToArgument</Image> <Image>AddCastExpressionToAssignmentExpression</Image> <Image>AddCastExpressionToReturnStatement</Image> <Image>AddCastExpressionToVariableDeclaration</Image> </Images> </Refactoring> <Refactoring Id="RR0007" Identifier="AddDefaultValueToParameter" Title="Add default value to parameter"> <OptionKey>add_default_value_to_parameter</OptionKey> <Syntaxes> <Syntax>parameter without default value</Syntax> </Syntaxes> <Span>identifier</Span> </Refactoring> <Refactoring Id="RR0008" Identifier="AddDefaultValueToReturnStatement" Title="Add default value to return statement" IsObsolete="true"> <Syntaxes> <Syntax>return statement without expression</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0009" Identifier="AddExceptionElementToDocumentationComment" Title="Add 'exception' element to documentation comment"> <OptionKey>add_exception_element_to_documentation_comment</OptionKey> <Syntaxes> <Syntax>throw statement</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0010" Identifier="AddIdentifierToVariableDeclaration" Title="Add identifier to variable declaration" IsObsolete="true"> <Syntaxes> <Syntax>variable declaration</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0011" Identifier="AddArgumentName" Title="Add argument name"> <OptionKey>add_argument_name</OptionKey> <Syntaxes> <Syntax>argument list</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0012" Identifier="AddIdentifierToParameter" Title="Add identifier to parameter" IsObsolete="true"> <Syntaxes> <Syntax>parameter</Syntax> </Syntaxes> <Span>missing identifier</Span> </Refactoring> <Refactoring Id="RR0013" Identifier="AddUsingDirective" Title="Add using directive"> <OptionKey>add_using_directive</OptionKey> <Syntaxes> <Syntax>qualified name</Syntax> </Syntaxes> <Span>selected namespace</Span> </Refactoring> <Refactoring Id="RR0014" Identifier="AddUsingStaticDirective" Title="Add using static directive"> <OptionKey>add_using_static_directive</OptionKey> <Syntaxes> <Syntax>member access expression (public or internal static class)</Syntax> </Syntaxes> <Span>selected class name</Span> </Refactoring> <Refactoring Id="RR0015" Identifier="CallConfigureAwait" Title="Call 'ConfigureAwait(false)'" IsObsolete="true"> <Syntaxes> <Syntax>awaitable method invocation</Syntax> </Syntaxes> <Span>method name</Span> </Refactoring> <Refactoring Id="RR0016" Identifier="CallExtensionMethodAsInstanceMethod" Title="Call extension method as instance method"> <OptionKey>call_extension_method_as_instance_method</OptionKey> <Syntaxes> <Syntax>method invocation</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0017" Identifier="CallToMethod" Title="Call 'To...' method (ToString, ToArray, ToList)" IsObsolete="true"> <Syntaxes> <Syntax>argument</Syntax> <Syntax>assignment expression</Syntax> <Syntax>return statement</Syntax> <Syntax>variable declaration</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0018" Identifier="UseImplicitType" Title="Use implicit type"> <OptionKey>use_implicit_type</OptionKey> <Syntaxes> <Syntax>variable declaration</Syntax> <Syntax>foreach statement</Syntax> </Syntaxes> <Span>type</Span> </Refactoring> <Refactoring Id="RR0019" Identifier="ChangeMemberTypeAccordingToReturnExpression" Title="Change method/property/indexer type according to return expression" IsObsolete="true"> <Syntaxes> <Syntax>return statement in method/property/indexer</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0020" Identifier="ChangeMemberTypeAccordingToYieldReturnExpression" Title="Change method/property/indexer type according to yield return expression" IsObsolete="true"> <Syntaxes> <Syntax>yield return statement in method/property/indexer</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0021" Identifier="ChangeMethodReturnTypeToVoid" Title="Change method return type to 'void'"> <OptionKey>change_method_return_type_to_void</OptionKey> <Syntaxes> <Syntax>method</Syntax> <Syntax>local function</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0022" Identifier="ChangeTypeAccordingToExpression" Title="Change type according to expression"> <OptionKey>change_type_according_to_expression</OptionKey> <Syntaxes> <Syntax>variable declaration</Syntax> <Syntax>foreach statement</Syntax> </Syntaxes> <Span>type</Span> <Samples> <Sample> <Before><![CDATA[IEnumerable<object> items = new List<object>();]]></Before> <After><![CDATA[List<object> items = new List<object>();]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0023" Identifier="UseExplicitType" Title="Use explicit type"> <OptionKey>use_explicit_type</OptionKey> <Syntaxes> <Syntax>variable declaration</Syntax> <Syntax>foreach statement</Syntax> </Syntaxes> <Span>type</Span> </Refactoring> <Refactoring Id="RR0024" Identifier="CheckExpressionForNull" Title="Check expression for null"> <OptionKey>check_expression_for_null</OptionKey> <Syntaxes> <Syntax>local declaration (identifier)</Syntax> <Syntax>assignment expression (left)</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0025" Identifier="CheckParameterForNull" Title="Check parameter for null"> <OptionKey>check_parameter_for_null</OptionKey> <Syntaxes> <Syntax>parameter</Syntax> </Syntaxes> <Span>parameter identifier</Span> </Refactoring> <Refactoring Id="RR0026" Identifier="UseObjectInitializer" Title="Use object initializer"> <OptionKey>use_object_initializer</OptionKey> <Syntaxes> <Syntax>selected statements (object creation followed with assignment(s))</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0027" Identifier="CommentOutMemberDeclaration" Title="Comment out member declaration"> <OptionKey>comment_out_member_declaration</OptionKey> <Syntaxes> <Syntax>method</Syntax> <Syntax>constructor</Syntax> <Syntax>property</Syntax> <Syntax>indexer</Syntax> <Syntax>operator</Syntax> <Syntax>event</Syntax> <Syntax>namespace</Syntax> <Syntax>class</Syntax> <Syntax>struct</Syntax> <Syntax>interface</Syntax> </Syntaxes> <Span>opening or closing brace</Span> </Refactoring> <Refactoring Id="RR0028" Identifier="CommentOutStatement" Title="Comment out statement"> <OptionKey>comment_out_statement</OptionKey> <Syntaxes> <Syntax>do statement</Syntax> <Syntax>fixed statement</Syntax> <Syntax>for statement</Syntax> <Syntax>foreach statement</Syntax> <Syntax>checked statement</Syntax> <Syntax>if statement</Syntax> <Syntax>lock statement</Syntax> <Syntax>switch statement</Syntax> <Syntax>try statement</Syntax> <Syntax>unchecked statement</Syntax> <Syntax>unsafe statement</Syntax> <Syntax>using statement</Syntax> <Syntax>while statement</Syntax> </Syntaxes> <Span>opening or closing brace</Span> </Refactoring> <Refactoring Id="RR0029" Identifier="CopyDocumentationCommentFromBaseMember" Title="Copy documentation comment from base member"> <OptionKey>copy_documentation_comment_from_base_member</OptionKey> <Syntaxes> <Syntax>constructor</Syntax> <Syntax>method</Syntax> <Syntax>property</Syntax> <Syntax>indexer</Syntax> <Syntax>event</Syntax> </Syntaxes> <Images> <Image>CopyDocumentationCommentFromBaseMember</Image> <Image>CopyDocumentationCommentFromImplementedMember</Image> </Images> </Refactoring> <Refactoring Id="RR0030" Identifier="CopyArgument" Title="Copy argument"> <OptionKey>copy_argument</OptionKey> <Syntaxes> <Syntax>missing argument</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0031" Identifier="CopyMemberDeclaration" Title="Copy member declaration"> <OptionKey>copy_member_declaration</OptionKey> <Syntaxes> <Syntax>method</Syntax> <Syntax>constructor</Syntax> <Syntax>property</Syntax> <Syntax>indexer</Syntax> <Syntax>operator</Syntax> <Syntax>event</Syntax> <Syntax>namespace</Syntax> <Syntax>class</Syntax> <Syntax>struct</Syntax> <Syntax>interface</Syntax> </Syntaxes> <Span>opening or closing brace</Span> </Refactoring> <Refactoring Id="RR0032" Identifier="CopyParameter" Title="Copy parameter"> <OptionKey>copy_parameter</OptionKey> <Syntaxes> <Syntax>missing parameter</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0033" Identifier="CopyStatement" Title="Copy statement"> <OptionKey>copy_statement</OptionKey> <Syntaxes> <Syntax>do statement</Syntax> <Syntax>fixed statement</Syntax> <Syntax>for statement</Syntax> <Syntax>foreach statement</Syntax> <Syntax>checked statement</Syntax> <Syntax>if statement</Syntax> <Syntax>lock statement</Syntax> <Syntax>switch statement</Syntax> <Syntax>try statement</Syntax> <Syntax>unchecked statement</Syntax> <Syntax>unsafe statement</Syntax> <Syntax>using statement</Syntax> <Syntax>while statement</Syntax> </Syntaxes> <Span>opening or closing brace</Span> </Refactoring> <Refactoring Id="RR0034" Identifier="ExpandCompoundAssignment" Title="Expand compound assignment"> <OptionKey>expand_compound_assignment</OptionKey> <Syntaxes> <Syntax>compound assignment expression</Syntax> </Syntaxes> <Span>operator</Span> </Refactoring> <Refactoring Id="RR0035" Identifier="ExpandCoalesceExpression" Title="Expand coalesce expression"> <OptionKey>expand_coalesce_expression</OptionKey> <Syntaxes> <Syntax>coalesce expression</Syntax> </Syntaxes> <Span>?? operator</Span> </Refactoring> <Refactoring Id="RR0036" Identifier="ExpandEventDeclaration" Title="Expand event declaration"> <OptionKey>expand_event_declaration</OptionKey> <Syntaxes> <Syntax>event field declaration</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0037" Identifier="ConvertExpressionBodyToBlockBody" Title="Convert expression body to block body"> <OptionKey>convert_expression_body_to_block_body</OptionKey> <Syntaxes> <Syntax>expression body</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0038" Identifier="ExpandInitializer" Title="Expand initializer" IsEnabledByDefault="false"> <OptionKey>expand_initializer</OptionKey> <Syntaxes> <Syntax>initializer</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0039" Identifier="ConvertLambdaExpressionBodyToBlockBody" Title="Convert lambda expression body to block body"> <OptionKey>convert_lambda_expression_body_to_block_body</OptionKey> <Syntaxes> <Syntax>lambda expression's expression body</Syntax> </Syntaxes> <Span>body</Span> </Refactoring> <Refactoring Id="RR0040" Identifier="ConvertAutoPropertyToFullPropertyWithoutBackingField" Title="Convert auto-property to full property (without backing field)"> <OptionKey>convert_auto_property_to_full_property_without_backing_field</OptionKey> <Syntaxes> <Syntax>auto-property</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0041" Identifier="ConvertAutoPropertyToFullProperty" Title="Convert auto-property to full property"> <OptionKey>convert_auto_property_to_full_property</OptionKey> <Syntaxes> <Syntax>auto-property</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0043" Identifier="ExtractExpressionFromCondition" Title="Extract expression from condition"> <OptionKey>extract_expression_from_condition</OptionKey> <Syntaxes> <Syntax>if statement</Syntax> <Syntax>while statement</Syntax> </Syntaxes> <Span>condition</Span> <Samples> <Sample> <Before><![CDATA[if (x && y) // Select 'y' { }]]></Before> <After><![CDATA[if(x) { if (y) { } }]]></After> </Sample> <Sample> <Before><![CDATA[if (x || y) // Select 'y' { }]]></Before> <After><![CDATA[if(x) { } if (y) { }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0044" Identifier="ExtractGenericType" Title="Extract generic type" IsObsolete="true"> <Syntaxes> <Syntax>generic name with single type argument</Syntax> </Syntaxes> <Span>type argument</Span> </Refactoring> <Refactoring Id="RR0045" Identifier="RemoveContainingStatement" Title="Remove containing statement"> <OptionKey>remove_containing_statement</OptionKey> <Syntaxes> <Syntax>else clause</Syntax> <Syntax>fixed statement</Syntax> <Syntax>for statement</Syntax> <Syntax>foreach statement</Syntax> <Syntax>checked statement</Syntax> <Syntax>if statement</Syntax> <Syntax>lock statement</Syntax> <Syntax>try statement</Syntax> <Syntax>unsafe statement</Syntax> <Syntax>using statement</Syntax> <Syntax>while statement</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0046" Identifier="ExtractTypeDeclarationToNewFile" Title="Extract type declaration to a new file" IsEnabledByDefault="false"> <OptionKey>extract_type_declaration_to_new_file</OptionKey> <Syntaxes> <Syntax>class declaration</Syntax> <Syntax>struct declaration</Syntax> <Syntax>interface declaration</Syntax> <Syntax>enum declaration</Syntax> <Syntax>delegate declaration</Syntax> </Syntaxes> <Span>identifier</Span> </Refactoring> <Refactoring Id="RR0047" Identifier="FormatAccessorBraces" Title="Format accessor braces" IsObsolete="true"> <Syntaxes> <Syntax>get accessor</Syntax> <Syntax>set accessor</Syntax> <Syntax>add accessor</Syntax> <Syntax>remove accessor</Syntax> </Syntaxes> <Span>block</Span> <Images> <Image>FormatAccessorBracesOnMultipleLines</Image> <Image>FormatAccessorBracesOnSingleLine</Image> </Images> </Refactoring> <Refactoring Id="RR0048" Identifier="WrapArguments" Title="Wrap arguments"> <OptionKey>wrap_arguments</OptionKey> <Syntaxes> <Syntax>argument list</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[M(x, y, z);]]></Before> <After> <![CDATA[M( x, y, z);]]></After> </Sample> <Sample> <Before> <![CDATA[void M( x, y, z);]]> </Before> <After> <![CDATA[void M(x, y, z);]]> </After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0049" Identifier="WrapBinaryExpression" Title="Wrap binary expression"> <OptionKey>wrap_binary_expression</OptionKey> <Syntaxes> <Syntax>logical and/or expression</Syntax> <Syntax>bitwise and/or expression</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[if (x && y && z) { }]]></Before> <After><![CDATA[if (x && y && z) { }]]></After> </Sample> <Sample> <Before> <![CDATA[if (x && y && z) { }]]> </Before> <After> <![CDATA[if (x && y && z) { }]]> </After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0050" Identifier="WrapConditionalExpression" Title="Wrap conditional expression"> <OptionKey>wrap_conditional_expression</OptionKey> <Syntaxes> <Syntax>conditional expression</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[x ? y : z]]></Before> <After><![CDATA[x ? y : z]]></After> </Sample> </Samples> <Samples> <Sample> <Before><![CDATA[x ? y : z]]></Before> <After><![CDATA[x ? y : z]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0051" Identifier="WrapCallChain" Title="Wrap call chain"> <OptionKey>wrap_call_chain</OptionKey> <Syntaxes> <Syntax>call chain</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[x.M().N().O()]]></Before> <After><![CDATA[x .M() .N() .O()]]></After> </Sample> <Sample> <Before><![CDATA[x .M() .N() .O()]]></Before> <After><![CDATA[x.M().N().O()]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0052" Identifier="WrapInitializerExpressions" Title="Wrap initializer expressions"> <OptionKey>wrap_initializer_expressions</OptionKey> <Syntaxes> <Syntax>initializer</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[var x = new string[] { "a", "b", "c" }]]></Before> <After><![CDATA[var x = new string[] { "a", "b", "c" }]]></After> </Sample> <Sample> <Before><![CDATA[var x = new string[] { "a", "b", "c" }]]></Before> <After><![CDATA[var x = new string[] { "a", "b", "c" }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0053" Identifier="WrapParameters" Title="Wrap parameters"> <OptionKey>wrap_parameters</OptionKey> <Syntaxes> <Syntax>parameter list</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[void M(object x, object y, object z) { }]]></Before> <After> <![CDATA[void M( object x, object y, object z) { }]]></After> </Sample> <Sample> <Before> <![CDATA[void M( object x, object y, object z) { }]]> </Before> <After> <![CDATA[void M(object x, object y, object z) { }]]> </After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0054" Identifier="GenerateBaseConstructors" Title="Generate base constructors"> <OptionKey>generate_base_constructors</OptionKey> <Syntaxes> <Syntax>class declaration</Syntax> </Syntaxes> <Span>identifier</Span> </Refactoring> <Refactoring Id="RR0055" Identifier="GenerateCombinedEnumMember" Title="Generate combined enum member"> <OptionKey>generate_combined_enum_member</OptionKey> <Syntaxes> <Syntax>enum declaration (with FlagsAttribute)</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0056" Identifier="GenerateEnumMember" Title="Generate enum member"> <OptionKey>generate_enum_member</OptionKey> <Syntaxes> <Syntax>enum declaration (with FlagsAttribute)</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0057" Identifier="GenerateEnumValues" Title="Generate enum values"> <OptionKey>generate_enum_values</OptionKey> <Syntaxes> <Syntax>enum declaration (with FlagsAttribute)</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0058" Identifier="GenerateEventInvokingMethod" Title="Generate event invoking method"> <OptionKey>generate_event_invoking_method</OptionKey> <Syntaxes> <Syntax>event</Syntax> </Syntaxes> <Span>identifier</Span> </Refactoring> <Refactoring Id="RR0059" Identifier="AddMissingCasesToSwitchStatement" Title="Add missing cases to switch statement"> <OptionKey>add_missing_cases_to_switch</OptionKey> <Syntaxes> <Syntax>switch statement</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[switch (dayOfWeek) { case DayOfWeek.Sunday: break; case DayOfWeek.Monday: break; case DayOfWeek.Tuesday: break; case DayOfWeek.Wednesday: break; case DayOfWeek.Thursday: break; } ]]></Before> <After><![CDATA[switch (dayOfWeek) { case DayOfWeek.Sunday: break; case DayOfWeek.Monday: break; case DayOfWeek.Tuesday: break; case DayOfWeek.Wednesday: break; case DayOfWeek.Thursday: break; case DayOfWeek.Friday: break; case DayOfWeek.Saturday: break; }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0060" Identifier="InitializeLocalVariableWithDefaultValue" Title="Initialize local variable with default value"> <OptionKey>initialize_local_variable_with_default_value</OptionKey> <Syntaxes> <Syntax>local declaration without initializer</Syntax> </Syntaxes> <Span>identifier</Span> </Refactoring> <Refactoring Id="RR0061" Identifier="InlineAliasExpression" Title="Inline alias expression"> <OptionKey>inline_alias_expression</OptionKey> <Syntaxes> <Syntax>using alias directive</Syntax> </Syntaxes> <Span>identifier</Span> </Refactoring> <Refactoring Id="RR0062" Identifier="InlineMethod" Title="Inline method"> <OptionKey>inline_method</OptionKey> <Syntaxes> <Syntax>method invocation</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0063" Identifier="InsertStringInterpolation" Title="Insert string interpolation"> <OptionKey>insert_string_interpolation</OptionKey> <Syntaxes> <Syntax>string literal</Syntax> <Syntax>interpolated string</Syntax> </Syntaxes> <Images> <Image>InsertInterpolationIntoStringLiteral</Image> <Image>InsertInterpolationIntoInterpolatedString</Image> </Images> </Refactoring> <Refactoring Id="RR0064" Identifier="IntroduceAndInitializeField" Title="Introduce and initialize field"> <OptionKey>introduce_and_initialize_field</OptionKey> <Syntaxes> <Syntax>constructor parameter</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0065" Identifier="IntroduceAndInitializeProperty" Title="Introduce and initialize property"> <OptionKey>introduce_and_initialize_property</OptionKey> <Syntaxes> <Syntax>constructor parameter</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0066" Identifier="IntroduceConstructor" Title="Introduce constructor" IsEnabledByDefault="false"> <OptionKey>introduce_constructor</OptionKey> <Syntaxes> <Syntax>field</Syntax> <Syntax>property</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0067" Identifier="IntroduceFieldToLockOn" Title="Introduce field to lock on"> <OptionKey>introduce_field_to_lock_on</OptionKey> <Syntaxes> <Syntax>lock statement</Syntax> </Syntaxes> <Span>missing expression</Span> </Refactoring> <Refactoring Id="RR0068" Identifier="IntroduceLocalVariable" Title="Introduce local variable"> <OptionKey>introduce_local_variable</OptionKey> <Syntaxes> <Syntax>expression statement</Syntax> <Syntax>expression in using statement</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0069" Identifier="MakeMemberAbstract" Title="Make member abstract"> <OptionKey>make_member_abstract</OptionKey> <Syntaxes> <Syntax>non-abstract indexer/method/property in abstract class</Syntax> </Syntaxes> <Span>indexer/method/property header</Span> </Refactoring> <Refactoring Id="RR0070" Identifier="MakeMemberVirtual" Title="Make member virtual"> <OptionKey>make_member_virtual</OptionKey> <Syntaxes> <Syntax>method declaration</Syntax> <Syntax>indexer declaration</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0073" Identifier="RemoveUnnecessaryAssignment" Title="Remove unnecessary assignment"> <OptionKey>remove_unnecessary_assignment</OptionKey> <Syntaxes> <Syntax>assignment expression followed with return statement</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0074" Identifier="MergeAttributes" Title="Merge attributes"> <OptionKey>merge_attributes</OptionKey> <Syntaxes> <Syntax>selected attribute lists</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0075" Identifier="MergeIfStatements" Title="Merge 'if' statements"> <OptionKey>merge_if_statements</OptionKey> <Syntaxes> <Syntax>selected 'if' statements</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[if (x) { return false; } if (y) { return false; } return true;]]></Before> <After><![CDATA[if (x || y) { return false; } return true;]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0076" Identifier="MergeInterpolationIntoInterpolatedString" Title="Merge interpolation into interpolated string" IsObsolete="true"> <OptionKey>merge_interpolation_into_interpolated_string</OptionKey> <Syntaxes> <Syntax>interpolation</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0077" Identifier="MergeLocalDeclarations" Title="Merge local declarations"> <OptionKey>merge_local_declarations</OptionKey> <Syntaxes> <Syntax>local declarations with same type</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0078" Identifier="JoinStringExpressions" Title="Join string expressions"> <OptionKey>join_string_expressions</OptionKey> <Syntaxes> <Syntax>concatenated string expressions</Syntax> </Syntaxes> <Images> <Image>JoinStringExpressions</Image> <Image>JoinStringLiterals</Image> <Image>JoinStringLiteralsIntoMultilineStringLiteral</Image> </Images> </Refactoring> <Refactoring Id="RR0079" Identifier="InvertBinaryExpression" Title="Invert binary expression"> <OptionKey>invert_binary_expression</OptionKey> <Syntaxes> <Syntax>logical and/or expression</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0080" Identifier="InvertBooleanLiteral" Title="Invert boolean literal"> <OptionKey>invert_boolean_literal</OptionKey> <Syntaxes> <Syntax>boolean literal</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0081" Identifier="InvertIsExpression" Title="Invert is expression"> <OptionKey>invert_is_expression</OptionKey> <Syntaxes> <Syntax>is expression</Syntax> </Syntaxes> <Span>operator</Span> </Refactoring> <Refactoring Id="RR0082" Identifier="InvertOperator" Title="Invert operator"> <OptionKey>invert_operator</OptionKey> <Syntaxes> <Syntax>!=</Syntax> <Syntax>&amp;&amp;</Syntax> <Syntax>||</Syntax> <Syntax>&lt;</Syntax> <Syntax>&lt;=</Syntax> <Syntax>==</Syntax> <Syntax>&gt;</Syntax> <Syntax>&gt;=</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0083" Identifier="NotifyWhenPropertyChanges" Title="Notify when property changes"> <OptionKey>notify_when_property_changes</OptionKey> <Syntaxes> <Syntax>property in class/struct that implements System.ComponentModel.INotifyPropertyChanged</Syntax> </Syntaxes> <Span>setter</Span> </Refactoring> <Refactoring Id="RR0084" Identifier="ParenthesizeExpression" Title="Parenthesize expression"> <OptionKey>parenthesize_expression</OptionKey> <Syntaxes> <Syntax>selected expression</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0085" Identifier="PromoteLocalVariableToParameter" Title="Promote local variable to parameter"> <OptionKey>promote_local_variable_to_parameter</OptionKey> <Syntaxes> <Syntax>local declaration in method</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0086" Identifier="RemoveAllComments" Title="Remove all comments"> <OptionKey>remove_all_comments</OptionKey> <Syntaxes> <Syntax>singleline/multiline comment</Syntax> <Syntax>singleline/multiline documentation documentation comment</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0087" Identifier="RemoveAllCommentsExceptDocumentationComments" Title="Remove all comments (except documentation comments)"> <OptionKey>remove_all_comments_except_documentation_comments</OptionKey> <Syntaxes> <Syntax>singleline/multiline comment</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0088" Identifier="RemoveAllDocumentationComments" Title="Remove all documentation comments" IsEnabledByDefault="false"> <OptionKey>remove_all_documentation_comments</OptionKey> <Syntaxes> <Syntax>singleline/multiline documentation comment</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0089" Identifier="RemoveAllMemberDeclarations" Title="Remove all member declarations"> <OptionKey>remove_all_member_declarations</OptionKey> <Syntaxes> <Syntax>namespace</Syntax> <Syntax>class</Syntax> <Syntax>struct</Syntax> <Syntax>interface</Syntax> </Syntaxes> <Span>opening or closing brace</Span> </Refactoring> <Refactoring Id="RR0090" Identifier="RemoveAllPreprocessorDirectives" Title="Remove all preprocessor directives"> <OptionKey>remove_all_preprocessor_directives</OptionKey> <Syntaxes> <Syntax>preprocessor directive</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0091" Identifier="RemoveAllRegionDirectives" Title="Remove all region directives"> <OptionKey>remove_all_region_directives</OptionKey> <Syntaxes> <Syntax>region directive</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0092" Identifier="RemoveAllStatements" Title="Remove all statements"> <OptionKey>remove_all_statements</OptionKey> <Syntaxes> <Syntax>method</Syntax> <Syntax>constructor</Syntax> <Syntax>operator</Syntax> </Syntaxes> <Span>opening or closing brace</Span> </Refactoring> <Refactoring Id="RR0093" Identifier="RemoveAllSwitchSections" Title="Remove all switch sections"> <OptionKey>remove_all_switch_sections</OptionKey> <Syntaxes> <Syntax>switch statement</Syntax> </Syntaxes> <Span>opening or closing brace</Span> </Refactoring> <Refactoring Id="RR0094" Identifier="RemoveBraces" Title="Remove braces"> <OptionKey>remove_braces</OptionKey> <Syntaxes> <Syntax>do statement</Syntax> <Syntax>else clause</Syntax> <Syntax>fixed statement</Syntax> <Syntax>for statement</Syntax> <Syntax>foreach statement</Syntax> <Syntax>if statement</Syntax> <Syntax>lock statement</Syntax> <Syntax>using statement</Syntax> <Syntax>while statement</Syntax> </Syntaxes> <Span>block with a single statement</Span> </Refactoring> <Refactoring Id="RR0095" Identifier="RemoveBracesFromIfElse" Title="Remove braces from if-else"> <OptionKey>remove_braces_from_if_else</OptionKey> <Syntaxes> <Syntax>if-else chain</Syntax> </Syntaxes> <Span>embedded statement</Span> </Refactoring> <Refactoring Id="RR0096" Identifier="RemoveBracesFromSwitchSection" Title="Remove braces from switch section"> <OptionKey>remove_braces_from_switch_section</OptionKey> <Syntaxes> <Syntax>switch section</Syntax> </Syntaxes> <Span>case or default keyword</Span> </Refactoring> <Refactoring Id="RR0097" Identifier="RemoveBracesFromSwitchSections" Title="Remove braces from switch sections"> <OptionKey>remove_braces_from_switch_sections</OptionKey> <Syntaxes> <Syntax>switch statement</Syntax> </Syntaxes> <Span>case or default keyword</Span> </Refactoring> <Refactoring Id="RR0098" Identifier="RemoveComment" Title="Remove comment"> <OptionKey>remove_comment</OptionKey> <Syntaxes> <Syntax>singleline/multiline comment</Syntax> <Syntax>singleline/multiline xml documentation comment</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0099" Identifier="RemoveConditionFromLastElse" Title="Remove condition from last else clause"> <OptionKey>remove_condition_from_last_else</OptionKey> <Syntaxes> <Syntax>else clause</Syntax> </Syntaxes> <Span>else keyword</Span> </Refactoring> <Refactoring Id="RR0100" Identifier="RemovePreprocessorDirective" Title="Remove preprocessor directive"> <OptionKey>remove_preprocessor_directive</OptionKey> <Syntaxes> <Syntax>#if directive</Syntax> <Syntax>#region directive</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0101" Identifier="RemoveEmptyLines" Title="Remove empty lines"> <OptionKey>remove_empty_lines</OptionKey> <Syntaxes> <Syntax>selected lines</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0102" Identifier="RemoveInterpolation" Title="Remove interpolation"> <OptionKey>remove_interpolation</OptionKey> <Syntaxes> <Syntax>string interpolation</Syntax> </Syntaxes> <Span>opening or closing brace</Span> </Refactoring> <Refactoring Id="RR0103" Identifier="RemoveMemberDeclaration" Title="Remove member declaration"> <OptionKey>remove_member_declaration</OptionKey> <Syntaxes> <Syntax>method</Syntax> <Syntax>constructor</Syntax> <Syntax>property</Syntax> <Syntax>indexer</Syntax> <Syntax>operator</Syntax> <Syntax>event</Syntax> <Syntax>namespace</Syntax> <Syntax>class</Syntax> <Syntax>struct</Syntax> <Syntax>interface</Syntax> </Syntaxes> <Span>opening or closing brace</Span> </Refactoring> <Refactoring Id="RR0104" Identifier="RemoveMemberDeclarations" Title="Remove member declarations above/below"> <OptionKey>remove_member_declarations_above_or_below</OptionKey> <Syntaxes> <Syntax>empty line between member declarations</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0105" Identifier="RemoveArgumentName" Title="Remove argument name"> <OptionKey>remove_argument_name</OptionKey> <Syntaxes> <Syntax>selected argument(s)</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0106" Identifier="RemoveParentheses" Title="Remove parentheses"> <OptionKey>remove_parentheses</OptionKey> <Syntaxes> <Syntax>parenthesized expression</Syntax> </Syntaxes> <Span>opening or closing parenthesis</Span> </Refactoring> <Refactoring Id="RR0107" Identifier="RemovePropertyInitializer" Title="Remove property initializer"> <OptionKey>remove_property_initializer</OptionKey> <Syntaxes> <Syntax>property initializer</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0108" Identifier="RemoveRegion" Title="Remove region"> <OptionKey>remove_region</OptionKey> <Syntaxes> <Syntax>region directive</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0109" Identifier="RemoveStatement" Title="Remove statement"> <OptionKey>remove_statement</OptionKey> <Syntaxes> <Syntax>do statement</Syntax> <Syntax>fixed statement</Syntax> <Syntax>for statement</Syntax> <Syntax>foreach statement</Syntax> <Syntax>checked statement</Syntax> <Syntax>if statement</Syntax> <Syntax>lock statement</Syntax> <Syntax>switch statement</Syntax> <Syntax>try statement</Syntax> <Syntax>unchecked statement</Syntax> <Syntax>unsafe statement</Syntax> <Syntax>using statement</Syntax> <Syntax>while statement</Syntax> </Syntaxes> <Span>open/close brace</Span> </Refactoring> <Refactoring Id="RR0110" Identifier="MergeSwitchSections" Title="Merge switch sections"> <OptionKey>merge_switch_sections</OptionKey> <Syntaxes> <Syntax>selected switch sections</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0111" Identifier="SyncPropertyNameAndBackingFieldName" Title="Synchronize property name and backing field name"> <OptionKey>sync_property_name_and_backing_field_name</OptionKey> <Syntaxes> <Syntax>field identifier inside property declaration</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0112" Identifier="RenameIdentifierAccordingToTypeName" Title="Rename identifier according to type name"> <OptionKey>rename_identifier_according_to_type_name</OptionKey> <Syntaxes> <Syntax>foreach statement</Syntax> <Syntax>local/field/constant declaration</Syntax> </Syntaxes> <Span>identifier</Span> <Images> <Image>RenameForEachIdentifierAccordingToTypeName</Image> <Image>RenameFieldIdentifierAccordingToTypeName</Image> </Images> </Refactoring> <Refactoring Id="RR0113" Identifier="RenameMethodAccordingToTypeName" Title="Rename method according to type name"> <OptionKey>rename_method_according_to_type_name</OptionKey> <Syntaxes> <Syntax>method</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0114" Identifier="RenameParameterAccordingToTypeName" Title="Rename parameter according to its type name"> <OptionKey>rename_parameter_according_to_type_name</OptionKey> <Syntaxes> <Syntax>parameter</Syntax> </Syntaxes> <Span>parameter identifier</Span> </Refactoring> <Refactoring Id="RR0115" Identifier="RenamePropertyAccordingToTypeName" Title="Rename property according to type name"> <OptionKey>rename_property_according_to_type_name</OptionKey> <Syntaxes> <Syntax>property identifier</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0116" Identifier="InvertLinqMethodCall" Title="Invert LINQ method call"> <OptionKey>invert_linq_method_call</OptionKey> <Syntaxes> <Syntax>System.Linq.Enumerable.Any(Func&lt;T, bool&gt;) or System.Linq.Enumerable.All(Func&lt;T, bool&gt;)</Syntax> </Syntaxes> <Span>method name</Span> <Samples> <Sample> <Before><![CDATA[if (items.Any(predicate)) { }]]></Before> <After><![CDATA[if (items.All(!predicate)) { }]]></After> </Sample> <Sample> <Before><![CDATA[if (items.All(predicate)) { }]]></Before> <After><![CDATA[if (items.Any(!predicate)) { }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0117" Identifier="ReplaceAsExpressionWithExplicitCast" Title="Replace 'as' expression with explicit cast"> <OptionKey>replace_as_expression_with_explicit_cast</OptionKey> <Syntaxes> <Syntax>as expression</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0118" Identifier="ReplaceExplicitCastWithAsExpression" Title="Replace explicit cast expression 'as' expression"> <OptionKey>replace_explicit_cast_with_as_expression</OptionKey> <Syntaxes> <Syntax>cast expression</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0119" Identifier="ReplaceConditionalExpressionWithTrueOrFalseBranch" Title="Replace conditional expression with true/false branch"> <OptionKey>replace_conditional_expression_with_true_or_false_branch</OptionKey> <Syntaxes> <Syntax>conditional expression</Syntax> </Syntaxes> <Span>selected true/false expression</Span> </Refactoring> <Refactoring Id="RR0120" Identifier="ConvertConditionalExpressionToIfElse" Title="Convert ?: to if-else"> <OptionKey>convert_conditional_expression_to_if_else</OptionKey> <Syntaxes> <Syntax>?: operator that is part of local declaration, assignment or (yield) return statement</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[string s = (x) ? "a" : "b";]]></Before> <After><![CDATA[string s; if (x) { s = "a"; } else { s = "b"; }]]></After> </Sample> <Sample> <Before><![CDATA[string s = (x) ? "a" : (y) ? "b" : "c";]]></Before> <After><![CDATA[string s; if (x) { s = "a"; } else if (y) { s = "b"; } else { s = "c"; }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0121" Identifier="UseReadOnlyFieldInsteadOfConstant" Title="Use read-only field instead of constant"> <OptionKey>use_readonly_field_instead_of_constant</OptionKey> <Syntaxes> <Syntax>constant declaration</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0123" Identifier="ConvertDoToWhile" Title="Convert 'do' to 'while'"> <OptionKey>convert_do_to_while</OptionKey> <Syntaxes> <Syntax>do statement</Syntax> </Syntaxes> <Span>do keyword</Span> <Samples> <Sample> <Before><![CDATA[do { } while (condition);]]></Before> <After><![CDATA[while (condition) { }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0124" Identifier="ReplaceEqualityOperatorWithStringEquals" Title="Replace equality operator with string.Equals"> <OptionKey>replace_equality_operator_with_string_equals</OptionKey> <Syntaxes> <Syntax>equals expression</Syntax> <Syntax>not equals expression</Syntax> </Syntaxes> <Span>operator</Span> </Refactoring> <Refactoring Id="RR0125" Identifier="ReplaceEqualityOperatorWithStringIsNullOrEmpty" Title="Replace equality operator with string.IsNullOrEmpty"> <OptionKey>replace_equality_operator_with_string_isnullorempty</OptionKey> <Syntaxes> <Syntax>equals expression</Syntax> <Syntax>not equals expression</Syntax> </Syntaxes> <Span>operator</Span> </Refactoring> <Refactoring Id="RR0126" Identifier="ReplaceEqualityOperatorWithStringIsNullOrWhiteSpace" Title="Replace equality operator with string.IsNullOrWhiteSpace"> <OptionKey>replace_equality_operator_with_string_isnullorwhitespace</OptionKey> <Syntaxes> <Syntax>equals expression</Syntax> <Syntax>not equals expression</Syntax> </Syntaxes> <Span>operator</Span> </Refactoring> <Refactoring Id="RR0127" Identifier="InlineConstantValue" Title="Inline constant value"> <OptionKey>inline_constant_value</OptionKey> <Syntaxes> <Syntax>expression that has constant value</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[public const string Value = "x"; void Foo() { string x = Value; }]]></Before> <After><![CDATA[public const string Value = "x"; void Foo() { string x = "x"; }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0128" Identifier="UseConstantInsteadOfReadOnlyField" Title="Use constant instead of read-only field"> <OptionKey>use_constant_instead_of_readonly_field</OptionKey> <Syntaxes> <Syntax>read-only field</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0129" Identifier="ConvertForEachToFor" Title="Convert 'foreach' to 'for'"> <OptionKey>convert_foreach_to_for</OptionKey> <Syntaxes> <Syntax>foreach statement</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0130" Identifier="ConvertForToForEach" Title="Convert 'for' to 'foreach'"> <OptionKey>convert_for_to_foreach</OptionKey> <Syntaxes> <Syntax>for statement</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0131" Identifier="ConvertForToWhile" Title="Convert 'for' to 'while'"> <OptionKey>convert_for_to_while</OptionKey> <Syntaxes> <Syntax>for statement</Syntax> </Syntaxes> <Span>for keyword or selected for statement</Span> </Refactoring> <Refactoring Id="RR0132" Identifier="ConvertHexadecimalLiteralToDecimalLiteral" Title="Convert hexadecimal literal to decimal literal"> <OptionKey>convert_hexadecimal_literal_to_decimal_literal</OptionKey> <Syntaxes> <Syntax>hexadecimal literal</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0133" Identifier="ConvertIfToSwitch" Title="Convert 'if' to 'switch'"> <OptionKey>convert_if_to_switch</OptionKey> <Syntaxes> <Syntax>if statement</Syntax> </Syntaxes> <Span>top if keyword or selected if statement</Span> <Samples> <Sample> <Before><![CDATA[var ch = stringReader.Read(); if (ch == 10 || ch == 13) { return; } else { stringBuilder.Append(ch); }]]></Before> <After><![CDATA[var ch = stringReader.Read(); switch (ch) { case 10: case 13: { return; } default: { stringBuilder.Append(ch); break; } }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0134" Identifier="InvertPrefixOrPostfixUnaryOperator" Title="Invert prefix/postfix unary operator"> <OptionKey>invert_prefix_or_postfix_unary_expression</OptionKey> <Syntaxes> <Syntax>prefix/postfix unary expression</Syntax> </Syntaxes> <Span>operator token</Span> <Samples> <Sample> <Before><![CDATA[int i = 0; i++;]]></Before> <After><![CDATA[int i = 0; i--;]]></After> </Sample> <Sample> <Before><![CDATA[int i = 0; ++i;]]></Before> <After><![CDATA[int i = 0; --i;]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0135" Identifier="ReplaceInterpolatedStringWithInterpolationExpression" Title="Replace interpolated string with interpolation expression"> <OptionKey>replace_interpolated_string_with_interpolation_expression</OptionKey> <Syntaxes> <Syntax>interpolated string with single interpolation and no text</Syntax> </Syntaxes> <Span>interpolation</Span> </Refactoring> <Refactoring Id="RR0136" Identifier="ConvertInterpolatedStringToStringLiteral" Title="Convert interpolated string to string literal"> <OptionKey>convert_interpolated_string_to_string_literal</OptionKey> <Syntaxes> <Syntax>Interpolated string without any interpolation</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0137" Identifier="ConvertMethodGroupToLambda" Title="Convert method group to lambda"> <OptionKey>convert_method_group_to_lambda</OptionKey> <Syntaxes> <Syntax>method group</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[Func<object, object, object> func = Foo;]]></Before> <After><![CDATA[Func<object, object, object> func = (f, g) => Foo(f, g)]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0138" Identifier="ReplaceMethodWithProperty" Title="Replace method with property" IsEnabledByDefault="false"> <OptionKey>replace_method_with_property</OptionKey> <Syntaxes> <Syntax>method</Syntax> </Syntaxes> <Span>method header</Span> </Refactoring> <Refactoring Id="RR0139" Identifier="ReplaceNullLiteralWithDefaultExpression" Title="Replace 'null' with 'default(...)'"> <OptionKey>replace_null_literal_with_default_expression</OptionKey> <Syntaxes> <Syntax>argument</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0140" Identifier="ReplacePrefixOperatorWithPostfixOperator" Title="Replace prefix operator to postfix operator"> <OptionKey>replace_prefix_operator_with_postfix_operator</OptionKey> <Syntaxes> <Syntax>prefix/postfix unary expression</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0141" Identifier="ReplacePropertyWithMethod" Title="Replace property with method"> <OptionKey>replace_property_with_method</OptionKey> <Syntaxes> <Syntax>read-only property</Syntax> </Syntaxes> <Span>property header</Span> </Refactoring> <Refactoring Id="RR0142" Identifier="ConvertRegularStringLiteralToVerbatimStringLiteral" Title="Convert regular string literal to verbatim string literal"> <OptionKey>convert_regular_string_literal_to_verbatim_string_literal</OptionKey> <Syntaxes> <Syntax>regular string literal</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0143" Identifier="ConvertReturnStatementToIf" Title="Convert 'return' statement to 'if'"> <OptionKey>convert_return_statement_to_if</OptionKey> <Syntaxes> <Syntax>return statement</Syntax> <Syntax>yield return statement</Syntax> </Syntaxes> <Span>selected statement, yield keyword or return keyword</Span> <Images> <Image>ReplaceReturnStatementWithIfElse</Image> </Images> </Refactoring> <Refactoring Id="RR0144" Identifier="CallIndexOfInsteadOfContains" Title="Call string.IndexOf instead of string.Contains"> <OptionKey>call_indexof_instead_of_contains</OptionKey> <Syntaxes> <Syntax>method invocation</Syntax> </Syntaxes> <Span>method name</Span> <Samples> <Sample> <Before><![CDATA[if (s.Contains("a")) { {]]></Before> <After><![CDATA[if (s.IndexOf("a", StringComparison.OrdinalIgnoreCase) != -1) { {]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0145" Identifier="ConvertStringFormatToInterpolatedString" Title="Convert 'string.Format' to interpolated string"> <OptionKey>convert_string_format_to_interpolated_string</OptionKey> <Syntaxes> <Syntax>string.Format method</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0147" Identifier="ConvertSwitchToIf" Title="Convert 'switch' to 'if'"> <OptionKey>convert_switch_to_if</OptionKey> <Syntaxes> <Syntax>switch statement</Syntax> </Syntaxes> <Span>switch keyword</Span> </Refactoring> <Refactoring Id="RR0148" Identifier="ConvertVerbatimStringLiteralToRegularStringLiteral" Title="Convert verbatim string literal to regular string literal"> <OptionKey>convert_verbatim_string_literal_to_regular_string_literal</OptionKey> <Syntaxes> <Syntax>verbatim string literal</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0149" Identifier="ConvertVerbatimStringLiteralToRegularStringLiterals" Title="Convert verbatim string literal to regular string literals"> <OptionKey>convert_verbatim_string_literal_to_regular_string_literals</OptionKey> <Syntaxes> <Syntax>multiline verbatim string literal</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0150" Identifier="ConvertWhileToDo" Title="Convert 'while' statement to 'do' statement"> <OptionKey>convert_while_to_do</OptionKey> <Syntaxes> <Syntax>while statement</Syntax> </Syntaxes> <Span>while keyword</Span> <Samples> <Sample> <Before><![CDATA[while (condition) { }]]></Before> <After><![CDATA[if (condition) { do { } while (condition); }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0151" Identifier="ConvertWhileToFor" Title="Convert 'while' statement to 'for' statement"> <OptionKey>convert_while_to_for</OptionKey> <Syntaxes> <Syntax>while statement</Syntax> </Syntaxes> <Span>while keyword or selected statement(s)</Span> </Refactoring> <Refactoring Id="RR0152" Identifier="ReverseForStatement" Title="Reverse 'for' statement"> <OptionKey>reverse_for_statement</OptionKey> <Syntaxes> <Syntax>for statement</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0153" Identifier="SimplifyIf" Title="Simplify if"> <OptionKey>simplify_if</OptionKey> <Syntaxes> <Syntax>if statement</Syntax> </Syntaxes> <Span>top if keyword or selected if statement</Span> </Refactoring> <Refactoring Id="RR0154" Identifier="ConvertLambdaBlockBodyToExpressionBody" Title="Convert lambda block body to expression body"> <OptionKey>convert_lambda_block_body_to_expression_body</OptionKey> <Syntaxes> <Syntax>lambda expression with block body with single single-line statement</Syntax> </Syntaxes> <Span>body</Span> </Refactoring> <Refactoring Id="RR0155" Identifier="SortMemberDeclarations" Title="Sort member declarations"> <OptionKey>sort_member_declarations</OptionKey> <Syntaxes> <Syntax>namespace declarations</Syntax> <Syntax>class declarations</Syntax> <Syntax>struct declarations</Syntax> <Syntax>interface declarations</Syntax> <Syntax>enum declarations</Syntax> </Syntaxes> <Span>selected member declarations</Span> <Images> <Image>SortMembersByKind</Image> <Image>SortMembersByName</Image> <Image>SortEnumMembersByName</Image> <Image>SortEnumMembersByValue</Image> </Images> </Refactoring> <Refactoring Id="RR0156" Identifier="SplitAttributes" Title="Split attributes"> <OptionKey>split_attributes</OptionKey> <Syntaxes> <Syntax>selected attribute list</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0157" Identifier="SplitSwitchLabels" Title="Split switch labels"> <OptionKey>split_switch_labels</OptionKey> <Syntaxes> <Syntax>selected switch labels</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0158" Identifier="SplitVariableDeclaration" Title="Split variable declaration"> <OptionKey>split_variable_declaration</OptionKey> <Syntaxes> <Syntax>local declaration</Syntax> <Syntax>field declaration</Syntax> <Syntax>event field declaration</Syntax> </Syntaxes> <Images> <Image>SplitLocalDeclaration</Image> </Images> </Refactoring> <Refactoring Id="RR0159" Identifier="SwapBinaryOperands" Title="Swap binary operands"> <OptionKey>swap_binary_operands</OptionKey> <Syntaxes> <Syntax>binary expression</Syntax> </Syntaxes> <Span>binary operator</Span> <Samples> <Sample> <Before> <![CDATA[if (x && y) { {]]> </Before> <After> <![CDATA[if (y && x) { {]]> </After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0160" Identifier="InvertConditionalExpression" Title="Invert conditional expression"> <OptionKey>invert_conditional_expression</OptionKey> <Syntaxes> <Syntax>conditional expression</Syntax> </Syntaxes> <Span>condition</Span> </Refactoring> <Refactoring Id="RR0161" Identifier="SwapMemberDeclarations" Title="Swap member declarations"> <OptionKey>swap_member_declarations</OptionKey> <Syntaxes> <Syntax>empty line between member declarations</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0162" Identifier="InvertIfElse" Title="Invert if-else"> <OptionKey>invert_if_else</OptionKey> <Syntaxes> <Syntax>if-else statement</Syntax> </Syntaxes> <Span>if keyword</Span> </Refactoring> <Refactoring Id="RR0163" Identifier="UncommentSingleLineComment" Title="Uncomment single-line comment"> <OptionKey>uncomment_singleline_comment</OptionKey> <Syntaxes> <Syntax>single-line comment(s)</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0164" Identifier="ConvertHasFlagCallToBitwiseOperation" Title="Convert 'HasFlag' call to bitwise operation"> <OptionKey>convert_hasflag_call_to_bitwise_operation</OptionKey> <Syntaxes> <Syntax>Enum.HasFlag method invocation</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0165" Identifier="UseCoalesceExpressionInsteadOfIf" Title="Use coalesce expression instead of if"> <OptionKey>use_coalesce_expression_instead_of_if</OptionKey> <Syntaxes> <Syntax>if statement</Syntax> </Syntaxes> <Span>top if keyword or selected if statement</Span> </Refactoring> <Refactoring Id="RR0166" Identifier="ConvertIfToConditionalExpression" Title="Convert 'if' to ?:"> <OptionKey>convert_if_to_conditional_expression</OptionKey> <Syntaxes> <Syntax>if statement</Syntax> </Syntaxes> <Span>top if keyword or selected if statement</Span> </Refactoring> <Refactoring Id="RR0167" Identifier="UseElementAccessInsteadOfLinqMethod" Title="Use element access instead of LINQ method"> <OptionKey>use_element_access_instead_of_linq_method</OptionKey> <Syntaxes> <Syntax>First/Last/ElementAt method invocation</Syntax> </Syntaxes> <Span>method name</Span> </Refactoring> <Refactoring Id="RR0168" Identifier="UseEmptyStringLiteralInsteadOfStringEmpty" Title="Use &quot;&quot; instead of string.Empty" IsObsolete="true"> <OptionKey>use_empty_string_literal_instead_of_string_empty</OptionKey> <Syntaxes> <Syntax>string.Empty field</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0169" Identifier="ConvertBlockBodyToExpressionBody" Title="Convert block body to expression body"> <OptionKey>convert_block_body_to_expression_body</OptionKey> <Syntaxes> <Syntax>method</Syntax> <Syntax>property</Syntax> <Syntax>indexer</Syntax> <Syntax>operator</Syntax> </Syntaxes> <Span>body or accessor list</Span> </Refactoring> <Refactoring Id="RR0170" Identifier="UseLambdaInsteadOfAnonymousMethod" Title="Use lambda instead of anonymous method"> <OptionKey>use_lambda_instead_of_anonymous_method</OptionKey> <Syntaxes> <Syntax>anonymous method</Syntax> </Syntaxes> <Span>delegate keyword</Span> </Refactoring> <Refactoring Id="RR0171" Identifier="UseStringEmptyInsteadOfEmptyStringLiteral" Title="Convert &quot;&quot; to string.Empty" IsEnabledByDefault="false"> <OptionKey>use_string_empty_instead_of_empty_string_literal</OptionKey> <Syntaxes> <Syntax>empty string literal</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0172" Identifier="WrapStatementsInCondition" Title="Wrap statements in condition"> <OptionKey>wrap_statements_in_condition</OptionKey> <Syntaxes> <Syntax>selected statements</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0173" Identifier="WrapInElseClause" Title="Wrap in else clause" IsObsolete="true"> <Syntaxes> <Syntax>statement</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0174" Identifier="WrapLinesInPreprocessorDirective" Title="Wrap lines in preprocessor directive"> <OptionKey>wrap_lines_in_preprocessor_directive</OptionKey> <Syntaxes> <Syntax>selected lines</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0175" Identifier="WrapLinesInRegion" Title="Wrap lines in #region directive"> <OptionKey>wrap_lines_in_region</OptionKey> <Syntaxes> <Syntax>selected lines</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0176" Identifier="WrapLinesInTryCatch" Title="Wrap lines in try-catch"> <OptionKey>wrap_lines_in_try_catch</OptionKey> <Syntaxes> <Syntax>selected statements</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0177" Identifier="WrapStatementsInUsingStatement" Title="Wrap statements in 'using' statement"> <OptionKey>wrap_statements_in_using_statement</OptionKey> <Syntaxes> <Syntax>selected statements where first is local declaration of type that implements IDisposable</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0178" Identifier="AddGenericParameterToDeclaration" Title="Add generic parameter to a declaration"> <OptionKey>add_generic_parameter_to_declaration</OptionKey> <Syntaxes> <Syntax>class declaration</Syntax> <Syntax>struct declaration</Syntax> <Syntax>interface declaration</Syntax> <Syntax>delegate declaration</Syntax> <Syntax>method declaration</Syntax> <Syntax>local function</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0179" Identifier="ImplementIEquatableOfT" Title="Implement IEquatable&lt;T&gt;"> <OptionKey>implement_iequatable</OptionKey> <Syntaxes> <Syntax>class declaration</Syntax> <Syntax>struct declaration</Syntax> <Syntax>interface declaration</Syntax> </Syntaxes> <Span>base list</Span> </Refactoring> <Refactoring Id="RR0180" Identifier="InlineUsingStaticDirective" Title="Inline using static directive"> <OptionKey>inline_using_static</OptionKey> <Syntaxes> <Syntax>using static directive</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0181" Identifier="InlineConstantDeclaration" Title="Inline constant declaration"> <OptionKey>inline_constant</OptionKey> <Syntaxes> <Syntax>constant declaration</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0182" Identifier="UseStringBuilderInsteadOfConcatenation" Title="Use StringBuilder instead of concatenation"> <OptionKey>use_stringbuilder_instead_of_concatenation</OptionKey> <Syntaxes> <Syntax>string concatenation</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0183" Identifier="UseListInsteadOfYield" Title="Use List&lt;T&gt; instead of yield"> <OptionKey>use_list_instead_of_yield</OptionKey> <Syntaxes> <Syntax>yield return</Syntax> <Syntax>yield break</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0184" Identifier="SplitIf" Title="Split if"> <OptionKey>split_if</OptionKey> <Syntaxes> <Syntax>if statement that has 'logical or' expression as a condition</Syntax> </Syntaxes> <Span>top if keyword or selected if statement</Span> </Refactoring> <Refactoring Id="RR0185" Identifier="RemoveInstantiationOfLocalVariable" Title="Remove instantiation of a local variable"> <OptionKey>remove_instantiation_of_local_variable</OptionKey> <Syntaxes> <Syntax>local variable with a new object creation</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[var x = new object();]]></Before> <After><![CDATA[object x = null;]]></After> </Sample> <Sample> <Before><![CDATA[var arr = new object[0];]]></Before> <After><![CDATA[object[] arr = null;]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0186" Identifier="ChangeAccessibility" Title="Change accessibility"> <OptionKey>change_accessibility</OptionKey> <Syntaxes> <Syntax>access modifier</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0187" Identifier="WrapConstraintClauses" Title="Wrap constraint clauses"> <OptionKey>wrap_constraint_clauses</OptionKey> <Syntaxes> <Syntax>type parameter constraint clause</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[private void Foo<T1, T2, T3>() where T1 : class where T2 : class where T3 : class { }]]></Before> <After><![CDATA[private void Foo<T1, T2, T3>() where T1 : class where T2 : class where T3 : class { }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0188" Identifier="ConvertForEachToForAndReverseLoop" Title="Convert 'foreach' to 'for' and reverse loop" IsEnabledByDefault="false"> <OptionKey>convert_foreach_to_for_and_reverse_loop</OptionKey> <Syntaxes> <Syntax>foreach statement</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[foreach (object item in items) { yield return item; }]]></Before> <After><![CDATA[for (int i = items.Count - 1; i >= 0; i--) { yield return items[i]; }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0189" Identifier="InvertIf" Title="Invert if"> <OptionKey>invert_if</OptionKey> <Syntaxes> <Syntax>if statement</Syntax> </Syntaxes> <Span>if keyword</Span> <Samples> <Sample> <Before><![CDATA[if (condition1) { if (condition2) { Foo(); } }]]></Before> <After><![CDATA[if (!condition1) { return; } if (!condition2) { return; } Foo();]]></After> </Sample> <Sample> <Before><![CDATA[if (!condition1) { return; } if (!condition2) { return; } Foo();]]></Before> <After><![CDATA[if (condition1) { if (condition2) { Foo(); } }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0190" Identifier="SplitIfElse" Title="Split if-else"> <OptionKey>split_if_else</OptionKey> <Syntaxes> <Syntax>if statement</Syntax> </Syntaxes> <Span>selected if statement or topmost if keyword</Span> <Samples> <Sample><Before><![CDATA[if (condition1) { return Foo1(); { else if (condition2) { return Foo2(); } else { return false; }]]></Before><After><![CDATA[if (condition1) { return Foo1(); { if (condition2) { return Foo2(); } return false;]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0191" Identifier="UseIndexInitializer" Title="Use index initializer"> <OptionKey>use_index_initializer</OptionKey> <Syntaxes> <Syntax>collection initializer</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[var dic = new Dictionary<int, string>() { { 0, "0" } };]]></Before> <After><![CDATA[var dic = new Dictionary<int, string>() { [0] = "0" };]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0192" Identifier="ConvertCommentToDocumentationComment" Title="Convert comment to documentation comment"> <OptionKey>convert_comment_to_documentation_comment</OptionKey> <Syntaxes> <Syntax>single-line comment</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[// comment public class Foo { }]]></Before> <After><![CDATA[/// <summary> /// comment /// </summary> public class Foo { }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0193" Identifier="ConvertInterpolatedStringToConcatenation" Title="Convert interpolated string to concatenation"> <OptionKey>convert_interpolated_string_to_concatenation</OptionKey> <Syntaxes> <Syntax>interpolated string</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[string s = $"a{b}c";]]></Before> <After><![CDATA[string s = "a" + b + "c";]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0194" Identifier="SplitLocalDeclarationAndAssignment" Title="Split local declaration and assignment"> <OptionKey>split_local_declaration_and_assignment</OptionKey> <Syntaxes> <Syntax>local variable declaration</Syntax> </Syntaxes> <Span>equals token</Span> <Samples> <Sample> <Before><![CDATA[var s = GetValue();]]></Before> <After><![CDATA[string s; s = GetValue();]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0195" Identifier="AddMemberToInterface" Title="Add member to interface"> <OptionKey>add_member_to_interface</OptionKey> <Syntaxes> <Syntax>method</Syntax> <Syntax>property</Syntax> <Syntax>indexer</Syntax> <Syntax>event</Syntax> </Syntaxes> <Span>identifier</Span> <Samples> <Sample> <Before><![CDATA[public class Foo : IFoo { public void Bar() { } } public interface IFoo { }]]></Before> <After><![CDATA[public class Foo : IFoo { public void Bar() { } } public interface IFoo { void Bar(); }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0196" Identifier="MergeIfWithParentIf" Title="Merge if with parent if"> <OptionKey>merge_if_with_parent_if</OptionKey> <Syntaxes> <Syntax>if statement</Syntax> </Syntaxes> <Span>if keyword</Span> <Samples> <Sample> <Before><![CDATA[if (x) { if (y) { } } else { }]]></Before> <After><![CDATA[if (x && y) { } else { }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0197" Identifier="InitializeFieldFromConstructor" Title="Initialize field from constructor"> <OptionKey>initialize_field_from_constructor</OptionKey> <Syntaxes> <Syntax>field declaration</Syntax> </Syntaxes> <Span>identifier</Span> <Samples> <Sample> <Before><![CDATA[public class Foo { private string _bar; public Foo() { } public Foo(object parameter) { } public Foo(object parameter1, object parameter2) : this(parameter1) { } }]]></Before> <After><![CDATA[public class Foo { private string _bar; public Foo(string bar) { _bar = bar; } public Foo(object parameter, string bar) { _bar = bar; } public Foo(object parameter1, object parameter2, string bar) : this(parameter1, bar) { _bar = bar; } }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0198" Identifier="InlineProperty" Title="Inline property"> <OptionKey>inline_property</OptionKey> <Syntaxes> <Syntax>property access</Syntax> </Syntaxes> </Refactoring> <Refactoring Id="RR0199" Identifier="RemoveEnumMemberValue" Title="Remove enum member value(s)"> <OptionKey>remove_enum_member_value</OptionKey> <Syntaxes> <Syntax>selected enum member(s)</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[public enum Foo { One = 1, Two = 2, Three = 3 }]]></Before> <After><![CDATA[public enum Foo { One, Two, Three }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0200" Identifier="UncommentMultiLineComment" Title="Uncomment multi-line comment"> <OptionKey>uncomment_multiline_comment</OptionKey> <Syntaxes> <Syntax>multi-line comment</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[/*string s = null;*/]]></Before> <After><![CDATA[string s = null;]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0201" Identifier="ConvertInterpolatedStringToStringFormat" Title="Convert interpolated string to 'string.Format'"> <OptionKey>convert_interpolated_string_to_string_format</OptionKey> <Syntaxes> <Syntax>interpolated string</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[$"name: {name,0:f}, value: {value}"]]></Before> <After><![CDATA[string.Format("name: {0,0:f} value: {1}", name, value)]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0202" Identifier="MoveUnsafeContextToContainingDeclaration" Title="Move unsafe context to containing declaration"> <OptionKey>move_unsafe_context_to_containing_declaration</OptionKey> <Syntaxes> <Syntax>unsafe declaration</Syntax> </Syntaxes> <Span>unsafe modifier</Span> <Samples> <Sample> <Before><![CDATA[public class Foo { public unsafe void Bar() { } }]]></Before> <After><![CDATA[public unsafe class Foo { public void Bar() { } }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0203" Identifier="ExtractEventHandlerMethod" Title="Extract event handler method"> <OptionKey>extract_event_handler_method</OptionKey> <Syntaxes> <Syntax>lambda expression</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[void Foo() { x.Changed += (s, e) => Bar(); }]]></Before> <After><![CDATA[void Foo() { x.Changed += Changed; } void OnChanged(object sender, EventArgs e) { Bar(); }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0204" Identifier="GeneratePropertyForDebuggerDisplayAttribute" Title="Generate property for DebuggerDisplay attribute"> <OptionKey>generate_property_for_debuggerdisplay_attribute</OptionKey> <Syntaxes> <Syntax>DebuggerDisplay attribute</Syntax> </Syntaxes> <Links> <Link> <Url>path_to_url#using-expressions-in-debuggerdisplay</Url> <Text>Using Expressions in DebuggerDisplay</Text> </Link> <Link> <Url>path_to_url <Text>DebuggerDisplay attribute best practices</Text> </Link> </Links> <Samples> <Sample> <Before><![CDATA[[DebuggerDisplay("A: {A} B: {B}")] public class Foo { public string A { get; } public string B { get; } }]]></Before> <After><![CDATA[DebuggerDisplay("{DebuggerDisplay,nq}")] public class Foo { public string A { get; } public string B { get; } [DebuggerBrowsable(DebuggerBrowsableState.Never)] private string DebuggerDisplay { get { return $"A: {A} B: {B}"; } } }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0205" Identifier="AddEmptyLineBetweenDeclarations" Title="Add empty line between declarations"> <OptionKey>add_empty_line_between_declarations</OptionKey> <Syntaxes> <Syntax>selected declarations</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[private object x; private object y; private object z;]]></Before> <After><![CDATA[private object x; private object y; private object z;]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0206" Identifier="UseEnumeratorExplicitly" Title="Use enumerator explicitly"> <OptionKey>use_enumerator_explicitly</OptionKey> <Syntaxes> <Syntax>foreach statement</Syntax> </Syntaxes> <Span>foreach keyword</Span> <Samples> <Sample> <Before> <![CDATA[foreach (var item in items) { yield return item; }]]> </Before> <After> <![CDATA[using (var en = items.GetEnumerator()) { while (en.MoveNext()) { yield return item; } }]]> </After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0207" Identifier="SortCaseLabels" Title="Sort case labels"> <OptionKey>sort_case_labels</OptionKey> <Syntaxes> <Syntax>selected case labels with string literal or enum field</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[bool Foo(string s) { switch (s) { case "d": case "b": case "a": case "c": return true; default: return false; } }]]></Before> <After><![CDATA[bool Foo(string s) { switch (s) { case "a": case "b": case "c": case "d": return true; default: return false; } }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0208" Identifier="AddTagToDocumentationComment" Title="Add tag to documentation comment"> <OptionKey>add_tag_to_documentation_comment</OptionKey> <Syntaxes> <Syntax>selected word(s) in documentation comment</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[/// <summary> /// null /// </summary> public class Foo { } ]]></Before> <After><![CDATA[/// <summary> /// <c>null</c> /// </summary> public class Foo { }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0209" Identifier="RemoveAsyncAwait" Title="Remove async/await"> <OptionKey>remove_async_await</OptionKey> <Syntaxes> <Syntax>method declaration</Syntax> <Syntax>local function</Syntax> <Syntax>lambda</Syntax> <Syntax>anonymous method</Syntax> </Syntaxes> <Span>async keyword</Span> <Samples> <Sample> <Before><![CDATA[class C { async Task<object> FooAsync() { return await BarAsync().ConfigureAwait(false); } }]]></Before> <After><![CDATA[class C { Task<object> FooAsync() { return BarAsync(); } }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0210" Identifier="ImplementCustomEnumerator" Title="Implement custom enumerator"> <OptionKey>implement_custom_enumerator</OptionKey> <Syntaxes> <Syntax>class that implements IEnumerable&lt;T&gt;</Syntax> </Syntaxes> <Span>identifier</Span> <Samples> <Sample> <Before><![CDATA[using System; using System.Collections; using System.Collections.Generic; class C<T> : IEnumerable<T> { IEnumerator<T> IEnumerable<T>.GetEnumerator() { throw new NotImplementedException(); } IEnumerator IEnumerable.GetEnumerator() { throw new NotImplementedException(); } }]]></Before> <After><![CDATA[using System; using System.Collections; using System.Collections.Generic; class C<T> : IEnumerable<T> { IEnumerator<T> IEnumerable<T>.GetEnumerator() { throw new NotImplementedException(); } IEnumerator IEnumerable.GetEnumerator() { throw new NotImplementedException(); } public Enumerator GetEnumerator() { return new Enumerator(this); } public struct Enumerator { private readonly C<T> _c; private int _index; internal Enumerator(C<T> c) { _c = c; _index = -1; } public T Current { get { throw new NotImplementedException(); } } public bool MoveNext() { throw new NotImplementedException(); } public void Reset() { _index = -1; throw new NotImplementedException(); } public override bool Equals(object obj) { throw new NotSupportedException(); } public override int GetHashCode() { throw new NotSupportedException(); } } //TODO: IEnumerable.GetEnumerator() and IEnumerable<T>.GetEnumerator() should return instance of EnumeratorImpl. private class EnumeratorImpl : IEnumerator<T> { private Enumerator _e; internal EnumeratorImpl(C<T> c) { _e = new Enumerator(c); } public T Current { get { return _e.Current; } } object IEnumerator.Current { get { return _e.Current; } } public bool MoveNext() { return _e.MoveNext(); } void IEnumerator.Reset() { _e.Reset(); } void IDisposable.Dispose() { } } }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0211" Identifier="ConvertStatementsToIfElse" Title="Convert statements to if-else"> <OptionKey>convert_statements_to_if_else</OptionKey> <Syntaxes> <Syntax>selected statements (first statement must be 'if' statement)</Syntax> </Syntaxes> <Samples> <Sample> <Before><![CDATA[if (x) return 1; if (y) { return 2; } else if (z) { return 3; } return 0;]]></Before> <After><![CDATA[if (x) { return 1; } else if (y) { return 2; } else if (z) { return 3; } else { return 0; }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0212" Identifier="CopySwitchSection" Title="Copy switch section"> <OptionKey>copy_switch_section</OptionKey> <Syntaxes> <Syntax>switch section</Syntax> </Syntaxes> <Span>close brace or empty line after switch section</Span> <Samples> <Sample> <Before> <![CDATA[switch (s) { case "a": { // ... break; } default: { break; } }]]> </Before> <After> <![CDATA[switch (s) { case "a": { // ... break; } case "a": { // ... break; } default: { break; } }]]> </After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0213" Identifier="AddParameterToInterfaceMember" Title="Add parameter to interface member"> <OptionKey>add_parameter_to_interface_member</OptionKey> <Syntaxes> <Syntax>method declaration</Syntax> <Syntax>indexer declaration</Syntax> </Syntaxes> <Span>method name or 'this' keyword</Span> <Samples> <Sample> <Before><![CDATA[interface IFoo { void Bar(object p); } class Foo : IFoo { public void Bar(object p, object p2) { } }]]></Before> <After><![CDATA[interface IFoo { void Bar(object p, object p2); } class Foo : IFoo { public void Bar(object p, object p2) { } }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0214" Identifier="ConvertSwitchExpressionToSwitchStatement" Title="Convert 'switch' expression to 'switch' statement"> <OptionKey>convert_switch_expression_to_switch_statement</OptionKey> <Syntaxes> <Syntax>switch expression</Syntax> </Syntaxes> <Span>switch keyword</Span> <Samples> <Sample> <Before><![CDATA[return dayOfWeek switch { DayOfWeek.Monday => 1, DayOfWeek.Tuesday => 2, DayOfWeek.Wednesday => 3, DayOfWeek.Thursday => 4, DayOfWeek.Friday => 5, _ => throw new Exception(), }; ]]></Before> <After><![CDATA[switch (dayOfWeek) { case DayOfWeek.Monday: return 1; case DayOfWeek.Tuesday: return 2; case DayOfWeek.Wednesday: return 3; case DayOfWeek.Thursday: return 4; case DayOfWeek.Friday: return 5; default: throw new Exception(); } ]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0215" Identifier="ExpandPositionalConstructor" Title="Expand positional constructor"> <OptionKey>expand_positional_constructor</OptionKey> <Syntaxes> <Syntax>positional record</Syntax> </Syntaxes> <Span>parameter list</Span> <Samples> <Sample> <Before><![CDATA[public record Foo([property: Obsolete] string Value1, string Value2);]]></Before> <After><![CDATA[public record Foo { public Foo(string value1, string value2) { Value1 = value1; Value2 = value2; } [Obsolete] public string Value1 { get; init; } public string Value2 { get; init; } } ]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0216" Identifier="AddAllPropertiesToInitializer" Title="Add all properties to initializer"> <OptionKey>add_all_properties_to_initializer</OptionKey> <Syntaxes> <Syntax>object/record initializer</Syntax> </Syntaxes> <Summary></Summary> <Samples> <Sample> <Before><![CDATA[class C { public string P1 { get; set; } public string P2 { get; set; } void M() { var x = new C() { }; } }]]></Before> <After><![CDATA[class C { public string P1 { get; set; } public string P2 { get; set; } void M() { var x = new C() { P1 = , P2 = }; } }]]></After> </Sample> </Samples> </Refactoring> <Refactoring Id="RR0217" Identifier="DeconstructForeachVariable" Title="Deconstruct foreach variable"> <OptionKey>deconstruct_foreach_variable</OptionKey> <Syntaxes> <Syntax>foreach statement</Syntax> </Syntaxes> <Span></Span> <Summary>type or identifier</Summary> <Samples> <Sample> <Before><![CDATA[var dic = new Dictionary<string, object>(); foreach (var kvp in dic) { var k = kvp.Key; var v = kvp.Value.ToString(); } ]]></Before> <After><![CDATA[var dic = new Dictionary<string, object>(); foreach (var (key, value) in dic) { var k = key; var v = value.ToString(); } ]]></After> </Sample> </Samples> </Refactoring> </Refactorings> ```
```swift // // BolusEntryViewModelTests.swift // LoopTests // // Created by Rick Pasetto on 9/28/20. // import HealthKit import LoopCore import LoopKit import LoopKitUI import SwiftUI import XCTest @testable import Loop @MainActor class BolusEntryViewModelTests: XCTestCase { // Some of the tests depend on a date on the hour static let now = ISO8601DateFormatter().date(from: "2020-03-11T07:00:00-0700")! static let exampleStartDate = now - .hours(2) static let exampleEndDate = now - .hours(1) static fileprivate let exampleGlucoseValue = MockGlucoseValue(quantity: exampleManualGlucoseQuantity, startDate: exampleStartDate) static let exampleManualGlucoseQuantity = HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 123.4) static let exampleManualGlucoseSample = HKQuantitySample(type: HKQuantityType.quantityType(forIdentifier: .bloodGlucose)!, quantity: exampleManualGlucoseQuantity, start: exampleStartDate, end: exampleEndDate) static let exampleManualStoredGlucoseSample = StoredGlucoseSample(sample: exampleManualGlucoseSample) static let exampleCGMGlucoseQuantity = HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 100.4) static let exampleCGMGlucoseSample = HKQuantitySample(type: HKQuantityType.quantityType(forIdentifier: .bloodGlucose)!, quantity: exampleCGMGlucoseQuantity, start: exampleStartDate, end: exampleEndDate) static let exampleCarbQuantity = HKQuantity(unit: .gram(), doubleValue: 234.5) static let exampleBolusQuantity = HKQuantity(unit: .internationalUnit(), doubleValue: 1.0) static let noBolus = HKQuantity(unit: .internationalUnit(), doubleValue: 0.0) static let exampleGlucoseRangeSchedule = GlucoseRangeSchedule(unit: .milligramsPerDeciliter, dailyItems: [ RepeatingScheduleValue(startTime: TimeInterval(0), value: DoubleRange(minValue: 100, maxValue: 110)), RepeatingScheduleValue(startTime: TimeInterval(28800), value: DoubleRange(minValue: 90, maxValue: 100)), RepeatingScheduleValue(startTime: TimeInterval(75600), value: DoubleRange(minValue: 100, maxValue: 110)) ], timeZone: .utcTimeZone)! static let mockUUID = UUID() static let exampleScheduleOverrideSettings = TemporaryScheduleOverrideSettings(unit: .millimolesPerLiter, targetRange: nil, insulinNeedsScaleFactor: nil) static let examplePreMealOverride = TemporaryScheduleOverride(context: .preMeal, settings: exampleScheduleOverrideSettings, startDate: exampleStartDate, duration: .indefinite, enactTrigger: .local, syncIdentifier: mockUUID) static let exampleCustomScheduleOverride = TemporaryScheduleOverride(context: .custom, settings: exampleScheduleOverrideSettings, startDate: exampleStartDate, duration: .indefinite, enactTrigger: .local, syncIdentifier: mockUUID) var bolusEntryViewModel: BolusEntryViewModel! fileprivate var delegate: MockBolusEntryViewModelDelegate! var now: Date = BolusEntryViewModelTests.now let mockOriginalCarbEntry = StoredCarbEntry( startDate: BolusEntryViewModelTests.exampleStartDate, quantity: BolusEntryViewModelTests.exampleCarbQuantity, uuid: UUID(), provenanceIdentifier: "provenanceIdentifier", syncIdentifier: "syncIdentifier", syncVersion: 0, foodType: "foodType", absorptionTime: 1, createdByCurrentApp: true, userCreatedDate: BolusEntryViewModelTests.now, userUpdatedDate: BolusEntryViewModelTests.now) let mockPotentialCarbEntry = NewCarbEntry(quantity: BolusEntryViewModelTests.exampleCarbQuantity, startDate: BolusEntryViewModelTests.exampleStartDate, foodType: "foodType", absorptionTime: 1) let mockFinalCarbEntry = StoredCarbEntry( startDate: BolusEntryViewModelTests.exampleStartDate, quantity: BolusEntryViewModelTests.exampleCarbQuantity, uuid: UUID(), provenanceIdentifier: "provenanceIdentifier", syncIdentifier: "syncIdentifier", syncVersion: 1, foodType: "foodType", absorptionTime: 1, createdByCurrentApp: true, userCreatedDate: BolusEntryViewModelTests.now, userUpdatedDate: BolusEntryViewModelTests.now) let mockUUID = BolusEntryViewModelTests.mockUUID.uuidString let queue = DispatchQueue(label: "BolusEntryViewModelTests") var saveAndDeliverSuccess = false override func setUp(completion: @escaping (Error?) -> Void) { now = Self.now delegate = MockBolusEntryViewModelDelegate() delegate.mostRecentGlucoseDataDate = now delegate.mostRecentPumpDataDate = now saveAndDeliverSuccess = false Task { await setUpViewModel() completion(nil) } } func setUpViewModel(originalCarbEntry: StoredCarbEntry? = nil, potentialCarbEntry: NewCarbEntry? = nil, selectedCarbAbsorptionTimeEmoji: String? = nil) async { bolusEntryViewModel = BolusEntryViewModel(delegate: delegate, now: { self.now }, screenWidth: 512, debounceIntervalMilliseconds: 0, uuidProvider: { self.mockUUID }, timeZone: TimeZone(abbreviation: "GMT")!, originalCarbEntry: originalCarbEntry, potentialCarbEntry: potentialCarbEntry, selectedCarbAbsorptionTimeEmoji: selectedCarbAbsorptionTimeEmoji) bolusEntryViewModel.authenticationHandler = { _ in return true } bolusEntryViewModel.maximumBolus = HKQuantity(unit: .internationalUnit(), doubleValue: 10) await bolusEntryViewModel.generateRecommendationAndStartObserving() } func testInitialConditions() throws { XCTAssertEqual(0, bolusEntryViewModel.glucoseValues.count) XCTAssertEqual(0, bolusEntryViewModel.predictedGlucoseValues.count) XCTAssertNil(bolusEntryViewModel.activeCarbs) XCTAssertNil(bolusEntryViewModel.activeInsulin) XCTAssertEqual(bolusEntryViewModel.targetGlucoseSchedule, BolusEntryViewModelTests.exampleGlucoseRangeSchedule) XCTAssertNil(bolusEntryViewModel.preMealOverride) XCTAssertNil(bolusEntryViewModel.scheduleOverride) XCTAssertFalse(bolusEntryViewModel.isManualGlucoseEntryEnabled) XCTAssertNil(bolusEntryViewModel.manualGlucoseQuantity) XCTAssertEqual(HKQuantity(unit: .internationalUnit(), doubleValue: 0), bolusEntryViewModel.recommendedBolus) XCTAssertEqual(HKQuantity(unit: .internationalUnit(), doubleValue: 0), bolusEntryViewModel.enteredBolus) XCTAssertNil(bolusEntryViewModel.activeAlert) XCTAssertNil(bolusEntryViewModel.activeNotice) } func testChartDateInterval() throws { // TODO: Test different screen widths // TODO: Test different insulin models // TODO: Test different chart history settings let expected = DateInterval(start: now - .hours(2), duration: .hours(8)) XCTAssertEqual(expected, bolusEntryViewModel.chartDateInterval) } // MARK: updating state func testUpdateDisableManualGlucoseEntryIfNecessary() async throws { bolusEntryViewModel.isManualGlucoseEntryEnabled = true bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity await bolusEntryViewModel.update() XCTAssertFalse(bolusEntryViewModel.isManualGlucoseEntryEnabled) XCTAssertNil(bolusEntryViewModel.manualGlucoseQuantity) XCTAssertEqual(.glucoseNoLongerStale, bolusEntryViewModel.activeAlert) } func testUpdateDisableManualGlucoseEntryIfNecessaryStaleGlucose() async throws { delegate.mostRecentGlucoseDataDate = Date.distantPast bolusEntryViewModel.isManualGlucoseEntryEnabled = true bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity await bolusEntryViewModel.update() XCTAssertTrue(bolusEntryViewModel.isManualGlucoseEntryEnabled) XCTAssertEqual(Self.exampleManualGlucoseQuantity, bolusEntryViewModel.manualGlucoseQuantity) XCTAssertNil(bolusEntryViewModel.activeAlert) } func testUpdateGlucoseValues() async throws { XCTAssertEqual(0, bolusEntryViewModel.glucoseValues.count) delegate.getGlucoseSamplesResponse = [StoredGlucoseSample(sample: Self.exampleCGMGlucoseSample)] await bolusEntryViewModel.update() XCTAssertEqual(1, bolusEntryViewModel.glucoseValues.count) XCTAssertEqual([100.4], bolusEntryViewModel.glucoseValues.map { return $0.quantity.doubleValue(for: .milligramsPerDeciliter) }) } func testUpdateGlucoseValuesWithManual() async throws { XCTAssertEqual(0, bolusEntryViewModel.glucoseValues.count) bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity delegate.getGlucoseSamplesResponse = [StoredGlucoseSample(sample: Self.exampleCGMGlucoseSample)] await bolusEntryViewModel.update() XCTAssertEqual([100.4, 123.4], bolusEntryViewModel.glucoseValues.map { return $0.quantity.doubleValue(for: .milligramsPerDeciliter) }) } func testManualEntryClearsEnteredBolus() throws { bolusEntryViewModel.enteredBolus = Self.exampleBolusQuantity bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity XCTAssertEqual(HKQuantity(unit: .internationalUnit(), doubleValue: 0), bolusEntryViewModel.enteredBolus) } func testUpdatePredictedGlucoseValues() async throws { let prediction = [PredictedGlucoseValue(startDate: Self.exampleStartDate, quantity: Self.exampleCGMGlucoseQuantity)] delegate.loopState.predictGlucoseValueResult = prediction await bolusEntryViewModel.update() XCTAssertEqual(prediction, bolusEntryViewModel.predictedGlucoseValues.map { PredictedGlucoseValue(startDate: $0.startDate, quantity: $0.quantity) }) } func testUpdatePredictedGlucoseValuesWithManual() async throws { let prediction = [PredictedGlucoseValue(startDate: Self.exampleStartDate, quantity: Self.exampleCGMGlucoseQuantity)] delegate.loopState.predictGlucoseValueResult = prediction await bolusEntryViewModel.update() bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity XCTAssertEqual(prediction, bolusEntryViewModel.predictedGlucoseValues.map { PredictedGlucoseValue(startDate: $0.startDate, quantity: $0.quantity) }) } func testUpdateSettings() async throws { XCTAssertNil(bolusEntryViewModel.preMealOverride) XCTAssertNil(bolusEntryViewModel.scheduleOverride) XCTAssertEqual(bolusEntryViewModel.targetGlucoseSchedule, BolusEntryViewModelTests.exampleGlucoseRangeSchedule) let newGlucoseTargetRangeSchedule = GlucoseRangeSchedule(unit: .milligramsPerDeciliter, dailyItems: [ RepeatingScheduleValue(startTime: TimeInterval(0), value: DoubleRange(minValue: 100, maxValue: 110)), RepeatingScheduleValue(startTime: TimeInterval(28800), value: DoubleRange(minValue: 90, maxValue: 100)), RepeatingScheduleValue(startTime: TimeInterval(75600), value: DoubleRange(minValue: 100, maxValue: 110)) ], timeZone: .utcTimeZone)! var newSettings = LoopSettings(dosingEnabled: true, glucoseTargetRangeSchedule: newGlucoseTargetRangeSchedule, maximumBasalRatePerHour: 1.0, maximumBolus: 10.0, suspendThreshold: GlucoseThreshold(unit: .milligramsPerDeciliter, value: 100.0)) let settings = TemporaryScheduleOverrideSettings(unit: .millimolesPerLiter, targetRange: nil, insulinNeedsScaleFactor: nil) newSettings.preMealOverride = TemporaryScheduleOverride(context: .preMeal, settings: settings, startDate: Self.exampleStartDate, duration: .indefinite, enactTrigger: .local, syncIdentifier: UUID()) newSettings.scheduleOverride = TemporaryScheduleOverride(context: .custom, settings: settings, startDate: Self.exampleStartDate, duration: .indefinite, enactTrigger: .local, syncIdentifier: UUID()) delegate.settings = newSettings bolusEntryViewModel.updateSettings() await bolusEntryViewModel.update() XCTAssertEqual(newSettings.preMealOverride, bolusEntryViewModel.preMealOverride) XCTAssertEqual(newSettings.scheduleOverride, bolusEntryViewModel.scheduleOverride) XCTAssertEqual(newGlucoseTargetRangeSchedule, bolusEntryViewModel.targetGlucoseSchedule) } func testUpdateSettingsWithCarbs() async throws { await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: mockPotentialCarbEntry) XCTAssertNil(bolusEntryViewModel.preMealOverride) XCTAssertNil(bolusEntryViewModel.scheduleOverride) XCTAssertEqual(bolusEntryViewModel.targetGlucoseSchedule, BolusEntryViewModelTests.exampleGlucoseRangeSchedule) let newGlucoseTargetRangeSchedule = GlucoseRangeSchedule(unit: .milligramsPerDeciliter, dailyItems: [ RepeatingScheduleValue(startTime: TimeInterval(0), value: DoubleRange(minValue: 100, maxValue: 110)), RepeatingScheduleValue(startTime: TimeInterval(28800), value: DoubleRange(minValue: 90, maxValue: 100)), RepeatingScheduleValue(startTime: TimeInterval(75600), value: DoubleRange(minValue: 100, maxValue: 110)) ], timeZone: .utcTimeZone)! var newSettings = LoopSettings(dosingEnabled: true, glucoseTargetRangeSchedule: newGlucoseTargetRangeSchedule, maximumBasalRatePerHour: 1.0, maximumBolus: 10.0, suspendThreshold: GlucoseThreshold(unit: .milligramsPerDeciliter, value: 100.0)) newSettings.preMealOverride = Self.examplePreMealOverride newSettings.scheduleOverride = Self.exampleCustomScheduleOverride delegate.settings = newSettings bolusEntryViewModel.updateSettings() // Pre-meal override should be ignored if we have carbs (LOOP-1964), and cleared in settings XCTAssertEqual(newSettings.scheduleOverride, bolusEntryViewModel.scheduleOverride) XCTAssertEqual(newGlucoseTargetRangeSchedule, bolusEntryViewModel.targetGlucoseSchedule) // ... but restored if we cancel without bolusing bolusEntryViewModel = nil } func testManualGlucoseChangesPredictedGlucoseValues() async throws { bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity let prediction = [PredictedGlucoseValue(startDate: Self.exampleStartDate, quantity: Self.exampleCGMGlucoseQuantity)] delegate.loopState.predictGlucoseValueResult = prediction await bolusEntryViewModel.update() XCTAssertEqual(prediction, bolusEntryViewModel.predictedGlucoseValues.map { PredictedGlucoseValue(startDate: $0.startDate, quantity: $0.quantity) }) } func testUpdateInsulinOnBoard() async throws { delegate.insulinOnBoardResult = .success(InsulinValue(startDate: Self.exampleStartDate, value: 1.5)) XCTAssertNil(bolusEntryViewModel.activeInsulin) await bolusEntryViewModel.update() XCTAssertEqual(HKQuantity(unit: .internationalUnit(), doubleValue: 1.5), bolusEntryViewModel.activeInsulin) } func testUpdateCarbsOnBoard() async throws { delegate.carbsOnBoardResult = .success(CarbValue(startDate: Self.exampleStartDate, endDate: Self.exampleEndDate, value: Self.exampleCarbQuantity.doubleValue(for: .gram()))) XCTAssertNil(bolusEntryViewModel.activeCarbs) await bolusEntryViewModel.update() XCTAssertEqual(Self.exampleCarbQuantity, bolusEntryViewModel.activeCarbs) } func testUpdateCarbsOnBoardFailure() async throws { delegate.carbsOnBoardResult = .failure(CarbStore.CarbStoreError.notConfigured) await bolusEntryViewModel.update() XCTAssertNil(bolusEntryViewModel.activeCarbs) } func testUpdateRecommendedBolusNoNotice() async throws { await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: mockPotentialCarbEntry) XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) let recommendation = ManualBolusRecommendation(amount: 1.25, pendingInsulin: 4.321) delegate.loopState.bolusRecommendationResult = recommendation await bolusEntryViewModel.update() XCTAssertTrue(bolusEntryViewModel.isBolusRecommended) let recommendedBolus = bolusEntryViewModel.recommendedBolus XCTAssertNotNil(recommendedBolus) XCTAssertEqual(recommendation.amount, recommendedBolus?.doubleValue(for: .internationalUnit())) let consideringPotentialCarbEntryPassed = try XCTUnwrap(delegate.loopState.consideringPotentialCarbEntryPassed) XCTAssertEqual(mockPotentialCarbEntry, consideringPotentialCarbEntryPassed) let replacingCarbEntryPassed = try XCTUnwrap(delegate.loopState.replacingCarbEntryPassed) XCTAssertEqual(mockOriginalCarbEntry, replacingCarbEntryPassed) XCTAssertNil(bolusEntryViewModel.activeNotice) } func testUpdateRecommendedBolusWithNotice() async throws { delegate.settings.suspendThreshold = GlucoseThreshold(unit: .milligramsPerDeciliter, value: Self.exampleCGMGlucoseQuantity.doubleValue(for: .milligramsPerDeciliter)) XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) let recommendation = ManualBolusRecommendation(amount: 1.25, pendingInsulin: 4.321, notice: BolusRecommendationNotice.glucoseBelowSuspendThreshold(minGlucose: Self.exampleGlucoseValue)) delegate.loopState.bolusRecommendationResult = recommendation await bolusEntryViewModel.update() XCTAssertTrue(bolusEntryViewModel.isBolusRecommended) let recommendedBolus = bolusEntryViewModel.recommendedBolus XCTAssertNotNil(recommendedBolus) XCTAssertEqual(recommendation.amount, recommendedBolus?.doubleValue(for: .internationalUnit())) XCTAssertEqual(BolusEntryViewModel.Notice.predictedGlucoseBelowSuspendThreshold(suspendThreshold: Self.exampleCGMGlucoseQuantity), bolusEntryViewModel.activeNotice) } func testUpdateRecommendedBolusWithNoticeMissingSuspendThreshold() async throws { XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) delegate.settings.suspendThreshold = nil let recommendation = ManualBolusRecommendation(amount: 1.25, pendingInsulin: 4.321, notice: BolusRecommendationNotice.glucoseBelowSuspendThreshold(minGlucose: Self.exampleGlucoseValue)) delegate.loopState.bolusRecommendationResult = recommendation await bolusEntryViewModel.update() XCTAssertTrue(bolusEntryViewModel.isBolusRecommended) let recommendedBolus = bolusEntryViewModel.recommendedBolus XCTAssertNotNil(recommendedBolus) XCTAssertEqual(recommendation.amount, recommendedBolus?.doubleValue(for: .internationalUnit())) XCTAssertNil(bolusEntryViewModel.activeNotice) } func testUpdateRecommendedBolusWithOtherNotice() async throws { XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) let recommendation = ManualBolusRecommendation(amount: 1.25, pendingInsulin: 4.321, notice: BolusRecommendationNotice.currentGlucoseBelowTarget(glucose: Self.exampleGlucoseValue)) delegate.loopState.bolusRecommendationResult = recommendation await bolusEntryViewModel.update() XCTAssertTrue(bolusEntryViewModel.isBolusRecommended) let recommendedBolus = bolusEntryViewModel.recommendedBolus XCTAssertNotNil(recommendedBolus) XCTAssertEqual(recommendation.amount, recommendedBolus?.doubleValue(for: .internationalUnit())) XCTAssertNil(bolusEntryViewModel.activeNotice) } func testUpdateRecommendedBolusThrowsMissingDataError() async throws { XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) delegate.loopState.bolusRecommendationError = LoopError.missingDataError(.glucose) await bolusEntryViewModel.update() XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) let recommendedBolus = bolusEntryViewModel.recommendedBolus XCTAssertNil(recommendedBolus) XCTAssertEqual(.staleGlucoseData, bolusEntryViewModel.activeNotice) } func testUpdateRecommendedBolusThrowsPumpDataTooOld() async throws { XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) delegate.loopState.bolusRecommendationError = LoopError.pumpDataTooOld(date: now) await bolusEntryViewModel.update() XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) let recommendedBolus = bolusEntryViewModel.recommendedBolus XCTAssertNil(recommendedBolus) XCTAssertEqual(.stalePumpData, bolusEntryViewModel.activeNotice) } func testUpdateRecommendedBolusThrowsGlucoseTooOld() async throws { XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) delegate.loopState.bolusRecommendationError = LoopError.glucoseTooOld(date: now) await bolusEntryViewModel.update() XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) let recommendedBolus = bolusEntryViewModel.recommendedBolus XCTAssertNil(recommendedBolus) XCTAssertEqual(.staleGlucoseData, bolusEntryViewModel.activeNotice) } func testUpdateRecommendedBolusThrowsInvalidFutureGlucose() async throws { XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) delegate.loopState.bolusRecommendationError = LoopError.invalidFutureGlucose(date: now) await bolusEntryViewModel.update() XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) let recommendedBolus = bolusEntryViewModel.recommendedBolus XCTAssertNil(recommendedBolus) XCTAssertEqual(.futureGlucoseData, bolusEntryViewModel.activeNotice) } func testUpdateRecommendedBolusThrowsOtherError() async throws { XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) delegate.loopState.bolusRecommendationError = LoopError.pumpSuspended await bolusEntryViewModel.update() XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) let recommendedBolus = bolusEntryViewModel.recommendedBolus XCTAssertNil(recommendedBolus) XCTAssertNil(bolusEntryViewModel.activeNotice) } func testUpdateRecommendedBolusWithManual() async throws { await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: mockPotentialCarbEntry) bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity XCTAssertFalse(bolusEntryViewModel.isBolusRecommended) let recommendation = ManualBolusRecommendation(amount: 1.25, pendingInsulin: 4.321) delegate.loopState.bolusRecommendationResult = recommendation await bolusEntryViewModel.update() XCTAssertTrue(bolusEntryViewModel.isBolusRecommended) let recommendedBolus = bolusEntryViewModel.recommendedBolus XCTAssertNotNil(recommendedBolus) XCTAssertEqual(recommendation.amount, recommendedBolus?.doubleValue(for: .internationalUnit())) let consideringPotentialCarbEntryPassed = try XCTUnwrap(delegate.loopState.consideringPotentialCarbEntryPassed) XCTAssertEqual(mockPotentialCarbEntry, consideringPotentialCarbEntryPassed) let replacingCarbEntryPassed = try XCTUnwrap(delegate.loopState.replacingCarbEntryPassed) XCTAssertEqual(mockOriginalCarbEntry, replacingCarbEntryPassed) XCTAssertNil(bolusEntryViewModel.activeNotice) } // MARK: save data and bolus delivery func testDeliverBolusOnlyRecommendationChanged() async throws { bolusEntryViewModel.enteredBolus = Self.exampleBolusQuantity let success = await bolusEntryViewModel.saveAndDeliver() XCTAssertEqual(1.0, delegate.enactedBolusUnits) XCTAssertEqual(.manualRecommendationChanged, delegate.enactedBolusActivationType) XCTAssertTrue(success) XCTAssertTrue(delegate.glucoseSamplesAdded.isEmpty) XCTAssertTrue(delegate.carbEntriesAdded.isEmpty) XCTAssertEqual(1, delegate.bolusDosingDecisionsAdded.count) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.reason, .normalBolus) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.manualBolusRequested, 1.0) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.1, now) } func testBolusTooSmall() async throws { bolusEntryViewModel.enteredBolus = HKQuantity(unit: .internationalUnit(), doubleValue: 0.01) let success = await bolusEntryViewModel.saveAndDeliver() XCTAssertEqual(.bolusTooSmall, bolusEntryViewModel.activeAlert) XCTAssertNil(delegate.enactedBolusUnits) XCTAssertFalse(success) XCTAssertEqual(0, delegate.bolusDosingDecisionsAdded.count) } func testDeliverBolusOnlyRecommendationAccepted() async throws { bolusEntryViewModel.recommendedBolus = Self.exampleBolusQuantity bolusEntryViewModel.enteredBolus = Self.exampleBolusQuantity let success = await bolusEntryViewModel.saveAndDeliver() XCTAssertEqual(1.0, delegate.enactedBolusUnits) XCTAssertEqual(.manualRecommendationAccepted, delegate.enactedBolusActivationType) XCTAssertTrue(success) XCTAssertTrue(delegate.glucoseSamplesAdded.isEmpty) XCTAssertTrue(delegate.carbEntriesAdded.isEmpty) XCTAssertEqual(1, delegate.bolusDosingDecisionsAdded.count) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.reason, .normalBolus) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.manualBolusRequested, 1.0) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.1, now) } func testDeliverBolusOnlyNoRecommendation() async throws { bolusEntryViewModel.recommendedBolus = nil bolusEntryViewModel.enteredBolus = Self.exampleBolusQuantity let success = await bolusEntryViewModel.saveAndDeliver() XCTAssertEqual(1.0, delegate.enactedBolusUnits) XCTAssertEqual(.manualNoRecommendation, delegate.enactedBolusActivationType) XCTAssertTrue(success) XCTAssertTrue(delegate.glucoseSamplesAdded.isEmpty) XCTAssertTrue(delegate.carbEntriesAdded.isEmpty) XCTAssertEqual(1, delegate.bolusDosingDecisionsAdded.count) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.reason, .normalBolus) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.manualBolusRequested, 1.0) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.1, now) } struct MockError: Error {} func testDeliverBolusAuthFail() async throws { bolusEntryViewModel.enteredBolus = Self.exampleBolusQuantity // Mock failed authentication bolusEntryViewModel.authenticationHandler = { _ in return false } let success = await bolusEntryViewModel.saveAndDeliver() XCTAssertNil(delegate.enactedBolusUnits) XCTAssertNil(delegate.enactedBolusActivationType) XCTAssertFalse(success) XCTAssertTrue(delegate.glucoseSamplesAdded.isEmpty) XCTAssertTrue(delegate.carbEntriesAdded.isEmpty) XCTAssertTrue(delegate.bolusDosingDecisionsAdded.isEmpty) } private func saveAndDeliver(_ bolus: HKQuantity, file: StaticString = #file, line: UInt = #line) async throws { bolusEntryViewModel.enteredBolus = bolus self.saveAndDeliverSuccess = await bolusEntryViewModel.saveAndDeliver() } func testSaveManualGlucoseNoBolus() async throws { bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity bolusEntryViewModel.enteredBolus = BolusEntryViewModelTests.noBolus delegate.addGlucoseSamplesResult = .success([Self.exampleManualStoredGlucoseSample]) let saveAndDeliverSuccess = await bolusEntryViewModel.saveAndDeliver() let expectedGlucoseSample = NewGlucoseSample(date: now, quantity: Self.exampleManualGlucoseQuantity, condition: nil, trend: nil, trendRate: nil, isDisplayOnly: false, wasUserEntered: true, syncIdentifier: mockUUID) XCTAssertEqual([expectedGlucoseSample], delegate.glucoseSamplesAdded) XCTAssertTrue(delegate.carbEntriesAdded.isEmpty) XCTAssertEqual(1, delegate.bolusDosingDecisionsAdded.count) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.reason, .normalBolus) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.manualBolusRequested, 0.0) let addedGlucose = delegate.bolusDosingDecisionsAdded.first!.0.manualGlucoseSample XCTAssertEqual(addedGlucose?.quantity, Self.exampleManualGlucoseQuantity) XCTAssertEqual(addedGlucose?.startDate, now) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.1, now) XCTAssertNil(delegate.enactedBolusUnits) XCTAssertNil(delegate.enactedBolusActivationType) XCTAssertTrue(saveAndDeliverSuccess) } func testSaveCarbGlucoseNoBolus() async throws { await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: mockPotentialCarbEntry) delegate.addGlucoseSamplesResult = .success([Self.exampleManualStoredGlucoseSample]) delegate.addCarbEntryResult = .success(mockFinalCarbEntry) try await saveAndDeliver(BolusEntryViewModelTests.noBolus) XCTAssertTrue(delegate.glucoseSamplesAdded.isEmpty) XCTAssertEqual(1, delegate.carbEntriesAdded.count) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.reason, .normalBolus) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.originalCarbEntry, mockOriginalCarbEntry) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.carbEntry, mockFinalCarbEntry) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.manualBolusRequested, 0.0) XCTAssertEqual(mockOriginalCarbEntry, delegate.carbEntriesAdded.first?.1) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.1, now) XCTAssertNil(delegate.enactedBolusUnits) XCTAssertNil(delegate.enactedBolusActivationType) XCTAssertTrue(saveAndDeliverSuccess) } func testSaveManualGlucoseAndBolus() async throws { bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity delegate.addGlucoseSamplesResult = .success([Self.exampleManualStoredGlucoseSample]) try await saveAndDeliver(BolusEntryViewModelTests.exampleBolusQuantity) let expectedGlucoseSample = NewGlucoseSample(date: now, quantity: Self.exampleManualGlucoseQuantity, condition: nil, trend: nil, trendRate: nil, isDisplayOnly: false, wasUserEntered: true, syncIdentifier: mockUUID) XCTAssertEqual([expectedGlucoseSample], delegate.glucoseSamplesAdded) XCTAssertTrue(delegate.carbEntriesAdded.isEmpty) XCTAssertEqual(1, delegate.bolusDosingDecisionsAdded.count) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.reason, .normalBolus) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.manualBolusRequested, 1.0) let addedGlucose = delegate.bolusDosingDecisionsAdded.first!.0.manualGlucoseSample XCTAssertEqual(addedGlucose?.quantity, Self.exampleManualGlucoseQuantity) XCTAssertEqual(addedGlucose?.startDate, now) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.1, now) XCTAssertEqual(1.0, delegate.enactedBolusUnits) XCTAssertEqual(.manualRecommendationChanged, delegate.enactedBolusActivationType) XCTAssertTrue(saveAndDeliverSuccess) } func testSaveCarbAndBolus() async throws { await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: mockPotentialCarbEntry) delegate.addCarbEntryResult = .success(mockFinalCarbEntry) try await saveAndDeliver(BolusEntryViewModelTests.exampleBolusQuantity) XCTAssertTrue(delegate.glucoseSamplesAdded.isEmpty) XCTAssertEqual(1, delegate.carbEntriesAdded.count) XCTAssertEqual(mockPotentialCarbEntry, delegate.carbEntriesAdded.first?.0) XCTAssertEqual(mockOriginalCarbEntry, delegate.carbEntriesAdded.first?.1) XCTAssertEqual(1, delegate.bolusDosingDecisionsAdded.count) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.reason, .normalBolus) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.originalCarbEntry, mockOriginalCarbEntry) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.carbEntry, mockFinalCarbEntry) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.manualBolusRequested, 1.0) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.1, now) XCTAssertEqual(1.0, delegate.enactedBolusUnits) XCTAssertEqual(.manualRecommendationChanged, delegate.enactedBolusActivationType) XCTAssertTrue(saveAndDeliverSuccess) } func testSaveCarbAndBolusClearsSavedPreMealOverride() async throws { await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: mockPotentialCarbEntry) // set up user specified pre-meal override let newGlucoseTargetRangeSchedule = GlucoseRangeSchedule(unit: .millimolesPerLiter, dailyItems: [ RepeatingScheduleValue(startTime: TimeInterval(0), value: DoubleRange(minValue: 100, maxValue: 110)), RepeatingScheduleValue(startTime: TimeInterval(28800), value: DoubleRange(minValue: 90, maxValue: 100)), RepeatingScheduleValue(startTime: TimeInterval(75600), value: DoubleRange(minValue: 100, maxValue: 110)) ], timeZone: .utcTimeZone)! var newSettings = LoopSettings(dosingEnabled: true, glucoseTargetRangeSchedule: newGlucoseTargetRangeSchedule, maximumBasalRatePerHour: 1.0, maximumBolus: 10.0, suspendThreshold: GlucoseThreshold(unit: .milligramsPerDeciliter, value: 100.0)) newSettings.preMealOverride = Self.examplePreMealOverride newSettings.scheduleOverride = Self.exampleCustomScheduleOverride delegate.settings = newSettings bolusEntryViewModel.updateSettings() delegate.addCarbEntryResult = .success(mockFinalCarbEntry) try await saveAndDeliver(BolusEntryViewModelTests.exampleBolusQuantity) XCTAssertTrue(saveAndDeliverSuccess) // ... make sure the "restoring" of the saved pre-meal override does not happen bolusEntryViewModel = nil } func testSaveManualGlucoseAndCarbAndBolus() async throws { await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: mockPotentialCarbEntry) bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity delegate.addGlucoseSamplesResult = .success([Self.exampleManualStoredGlucoseSample]) delegate.addCarbEntryResult = .success(mockFinalCarbEntry) try await saveAndDeliver(BolusEntryViewModelTests.exampleBolusQuantity) let expectedGlucoseSample = NewGlucoseSample(date: now, quantity: Self.exampleManualGlucoseQuantity, condition: nil, trend: nil, trendRate: nil, isDisplayOnly: false, wasUserEntered: true, syncIdentifier: mockUUID) XCTAssertEqual([expectedGlucoseSample], delegate.glucoseSamplesAdded) XCTAssertEqual(1, delegate.carbEntriesAdded.count) XCTAssertEqual(mockPotentialCarbEntry, delegate.carbEntriesAdded.first?.0) XCTAssertEqual(mockOriginalCarbEntry, delegate.carbEntriesAdded.first?.1) XCTAssertEqual(1, delegate.bolusDosingDecisionsAdded.count) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.reason, .normalBolus) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.manualBolusRequested, 1.0) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.originalCarbEntry, mockOriginalCarbEntry) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.0.carbEntry, mockFinalCarbEntry) let addedGlucose = delegate.bolusDosingDecisionsAdded.first!.0.manualGlucoseSample XCTAssertEqual(addedGlucose?.quantity, Self.exampleManualGlucoseQuantity) XCTAssertEqual(addedGlucose?.startDate, now) XCTAssertEqual(delegate.bolusDosingDecisionsAdded.first?.1, now) XCTAssertEqual(1.0, delegate.enactedBolusUnits) XCTAssertEqual(.manualRecommendationChanged, delegate.enactedBolusActivationType) XCTAssertTrue(saveAndDeliverSuccess) } // MARK: Display strings func testEnteredBolusAmountString() throws { XCTAssertEqual("0", bolusEntryViewModel.enteredBolusAmountString) } func testMaximumBolusAmountString() throws { XCTAssertEqual("10", bolusEntryViewModel.maximumBolusAmountString) } func testCarbEntryAmountAndEmojiStringNil() throws { XCTAssertNil(bolusEntryViewModel.carbEntryAmountAndEmojiString) } func testCarbEntryAmountAndEmojiString() async throws { await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: mockPotentialCarbEntry) XCTAssertEqual("234 g foodType", bolusEntryViewModel.carbEntryAmountAndEmojiString) } func testCarbEntryAmountAndEmojiStringNoFoodType() async throws { let potentialCarbEntry = NewCarbEntry(quantity: BolusEntryViewModelTests.exampleCarbQuantity, startDate: Self.exampleStartDate, foodType: nil, absorptionTime: 1) await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: potentialCarbEntry) XCTAssertEqual("234 g", bolusEntryViewModel.carbEntryAmountAndEmojiString) } func testCarbEntryAmountAndEmojiStringWithEmoji() async throws { let potentialCarbEntry = NewCarbEntry(quantity: BolusEntryViewModelTests.exampleCarbQuantity, startDate: Self.exampleStartDate, foodType: nil, absorptionTime: 1) await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: potentialCarbEntry, selectedCarbAbsorptionTimeEmoji: "") XCTAssertEqual("234 g ", bolusEntryViewModel.carbEntryAmountAndEmojiString) } func testCarbEntryDateAndAbsorptionTimeStringNil() throws { XCTAssertNil(bolusEntryViewModel.carbEntryDateAndAbsorptionTimeString) } func testCarbEntryDateAndAbsorptionTimeString() async throws { await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: mockPotentialCarbEntry) XCTAssertEqual("12:00PM + 0m", bolusEntryViewModel.carbEntryDateAndAbsorptionTimeString) } func testCarbEntryDateAndAbsorptionTimeString2() async throws { let potentialCarbEntry = NewCarbEntry(quantity: BolusEntryViewModelTests.exampleCarbQuantity, startDate: Self.exampleStartDate, foodType: nil, absorptionTime: nil) await setUpViewModel(originalCarbEntry: mockOriginalCarbEntry, potentialCarbEntry: potentialCarbEntry) XCTAssertEqual("12:00PM", bolusEntryViewModel.carbEntryDateAndAbsorptionTimeString) } func testIsManualGlucosePromptVisible() throws { XCTAssertFalse(bolusEntryViewModel.isManualGlucosePromptVisible) bolusEntryViewModel.activeNotice = .staleGlucoseData bolusEntryViewModel.isManualGlucoseEntryEnabled = true XCTAssertFalse(bolusEntryViewModel.isManualGlucosePromptVisible) bolusEntryViewModel.activeNotice = .staleGlucoseData bolusEntryViewModel.isManualGlucoseEntryEnabled = false XCTAssertTrue(bolusEntryViewModel.isManualGlucosePromptVisible) } func testIsNoticeVisible() throws { XCTAssertFalse(bolusEntryViewModel.isNoticeVisible) bolusEntryViewModel.activeNotice = .stalePumpData XCTAssertTrue(bolusEntryViewModel.isNoticeVisible) bolusEntryViewModel.activeNotice = .staleGlucoseData bolusEntryViewModel.isManualGlucoseEntryEnabled = false XCTAssertTrue(bolusEntryViewModel.isNoticeVisible) bolusEntryViewModel.isManualGlucoseEntryEnabled = true XCTAssertFalse(bolusEntryViewModel.isNoticeVisible) } // MARK: action button tests func testPrimaryButtonDefault() { XCTAssertEqual(.actionButton, bolusEntryViewModel.primaryButton) } func testPrimaryButtonBolusEntry() { bolusEntryViewModel.enteredBolus = Self.exampleBolusQuantity XCTAssertEqual(.actionButton, bolusEntryViewModel.primaryButton) } func testPrimaryButtonManual() { bolusEntryViewModel.activeNotice = .staleGlucoseData bolusEntryViewModel.isManualGlucoseEntryEnabled = false XCTAssertEqual(.manualGlucoseEntry, bolusEntryViewModel.primaryButton) } func testPrimaryButtonManualPrompt() { bolusEntryViewModel.isManualGlucoseEntryEnabled = true XCTAssertEqual(.actionButton, bolusEntryViewModel.primaryButton) } func testActionButtonDefault() { XCTAssertEqual(.enterBolus, bolusEntryViewModel.actionButtonAction) } func testActionButtonManualGlucose() { bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity XCTAssertEqual(.saveWithoutBolusing, bolusEntryViewModel.actionButtonAction) } func testActionButtonPotentialCarbEntry() async { await setUpViewModel(potentialCarbEntry: mockPotentialCarbEntry) XCTAssertEqual(.saveWithoutBolusing, bolusEntryViewModel.actionButtonAction) } func testActionButtonManualGlucoseAndPotentialCarbEntry() async { await setUpViewModel(potentialCarbEntry: mockPotentialCarbEntry) bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity XCTAssertEqual(.saveWithoutBolusing, bolusEntryViewModel.actionButtonAction) } func testActionButtonDeliverOnly() { bolusEntryViewModel.enteredBolus = Self.exampleBolusQuantity XCTAssertEqual(.deliver, bolusEntryViewModel.actionButtonAction) } func testActionButtonSaveAndDeliverManualGlucose() { bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity bolusEntryViewModel.enteredBolus = Self.exampleBolusQuantity XCTAssertEqual(.saveAndDeliver, bolusEntryViewModel.actionButtonAction) } func testActionButtonSaveAndDeliverPotentialCarbEntry() async { await setUpViewModel(potentialCarbEntry: mockPotentialCarbEntry) bolusEntryViewModel.enteredBolus = Self.exampleBolusQuantity XCTAssertEqual(.saveAndDeliver, bolusEntryViewModel.actionButtonAction) } func your_sha256_hashntry() async { await setUpViewModel(potentialCarbEntry: mockPotentialCarbEntry) bolusEntryViewModel.manualGlucoseQuantity = Self.exampleManualGlucoseQuantity bolusEntryViewModel.enteredBolus = Self.exampleBolusQuantity XCTAssertEqual(.saveAndDeliver, bolusEntryViewModel.actionButtonAction) } } // MARK: utilities fileprivate class MockLoopState: LoopState { var carbsOnBoard: CarbValue? var insulinOnBoard: InsulinValue? var error: LoopError? var insulinCounteractionEffects: [GlucoseEffectVelocity] = [] var predictedGlucose: [PredictedGlucoseValue]? var predictedGlucoseIncludingPendingInsulin: [PredictedGlucoseValue]? var recommendedAutomaticDose: (recommendation: AutomaticDoseRecommendation, date: Date)? var retrospectiveGlucoseDiscrepancies: [GlucoseChange]? var totalRetrospectiveCorrection: HKQuantity? var predictGlucoseValueResult: [PredictedGlucoseValue] = [] func predictGlucose(using inputs: PredictionInputEffect, potentialBolus: DoseEntry?, potentialCarbEntry: NewCarbEntry?, replacingCarbEntry replacedCarbEntry: StoredCarbEntry?, includingPendingInsulin: Bool, considerPositiveVelocityAndRC: Bool) throws -> [PredictedGlucoseValue] { return predictGlucoseValueResult } func predictGlucoseFromManualGlucose(_ glucose: NewGlucoseSample, potentialBolus: DoseEntry?, potentialCarbEntry: NewCarbEntry?, replacingCarbEntry replacedCarbEntry: StoredCarbEntry?, includingPendingInsulin: Bool, considerPositiveVelocityAndRC: Bool) throws -> [PredictedGlucoseValue] { return predictGlucoseValueResult } var bolusRecommendationResult: ManualBolusRecommendation? var bolusRecommendationError: Error? var consideringPotentialCarbEntryPassed: NewCarbEntry?? var replacingCarbEntryPassed: StoredCarbEntry?? func recommendBolus(consideringPotentialCarbEntry potentialCarbEntry: NewCarbEntry?, replacingCarbEntry replacedCarbEntry: StoredCarbEntry?, considerPositiveVelocityAndRC: Bool) throws -> ManualBolusRecommendation? { consideringPotentialCarbEntryPassed = potentialCarbEntry replacingCarbEntryPassed = replacedCarbEntry if let error = bolusRecommendationError { throw error } return bolusRecommendationResult } func recommendBolusForManualGlucose(_ glucose: NewGlucoseSample, consideringPotentialCarbEntry potentialCarbEntry: NewCarbEntry?, replacingCarbEntry replacedCarbEntry: StoredCarbEntry?, considerPositiveVelocityAndRC: Bool) throws -> ManualBolusRecommendation? { consideringPotentialCarbEntryPassed = potentialCarbEntry replacingCarbEntryPassed = replacedCarbEntry if let error = bolusRecommendationError { throw error } return bolusRecommendationResult } } public enum BolusEntryViewTestError: Error { case responseUndefined } fileprivate class MockBolusEntryViewModelDelegate: BolusEntryViewModelDelegate { fileprivate var loopState = MockLoopState() private let dataAccessQueue = DispatchQueue(label: "com.loopKit.tests.dataAccessQueue", qos: .utility) func updateRemoteRecommendation() { } func roundBolusVolume(units: Double) -> Double { // 0.05 units for rates between 0.05-30U/hr // 0 is not a supported bolus volume let supportedBolusVolumes = (1...600).map { Double($0) / 20.0 } return ([0.0] + supportedBolusVolumes).enumerated().min( by: { abs($0.1 - units) < abs($1.1 - units) } )!.1 } func insulinActivityDuration(for type: InsulinType?) -> TimeInterval { return .hours(6) + .minutes(10) } var pumpInsulinType: InsulinType? var displayGlucosePreference: DisplayGlucosePreference = DisplayGlucosePreference(displayGlucoseUnit: .milligramsPerDeciliter) func withLoopState(do block: @escaping (LoopState) -> Void) { dataAccessQueue.async { block(self.loopState) } } func saveGlucose(sample: LoopKit.NewGlucoseSample) async -> LoopKit.StoredGlucoseSample? { glucoseSamplesAdded.append(sample) return StoredGlucoseSample(sample: sample.quantitySample) } var glucoseSamplesAdded = [NewGlucoseSample]() var addGlucoseSamplesResult: Swift.Result<[StoredGlucoseSample], Error> = .failure(BolusEntryViewTestError.responseUndefined) func addGlucoseSamples(_ samples: [NewGlucoseSample], completion: ((Swift.Result<[StoredGlucoseSample], Error>) -> Void)?) { glucoseSamplesAdded.append(contentsOf: samples) completion?(addGlucoseSamplesResult) } var carbEntriesAdded = [(NewCarbEntry, StoredCarbEntry?)]() var addCarbEntryResult: Result<StoredCarbEntry> = .failure(BolusEntryViewTestError.responseUndefined) func addCarbEntry(_ carbEntry: NewCarbEntry, replacing replacingEntry: StoredCarbEntry?, completion: @escaping (Result<StoredCarbEntry>) -> Void) { carbEntriesAdded.append((carbEntry, replacingEntry)) completion(addCarbEntryResult) } var bolusDosingDecisionsAdded = [(BolusDosingDecision, Date)]() func storeManualBolusDosingDecision(_ bolusDosingDecision: BolusDosingDecision, withDate date: Date) { bolusDosingDecisionsAdded.append((bolusDosingDecision, date)) } var enactedBolusUnits: Double? var enactedBolusActivationType: BolusActivationType? func enactBolus(units: Double, activationType: BolusActivationType, completion: @escaping (Error?) -> Void) { enactedBolusUnits = units enactedBolusActivationType = activationType } var getGlucoseSamplesResponse: [StoredGlucoseSample] = [] func getGlucoseSamples(start: Date?, end: Date?, completion: @escaping (Swift.Result<[StoredGlucoseSample], Error>) -> Void) { completion(.success(getGlucoseSamplesResponse)) } var insulinOnBoardResult: DoseStoreResult<InsulinValue>? func insulinOnBoard(at date: Date, completion: @escaping (DoseStoreResult<InsulinValue>) -> Void) { if let insulinOnBoardResult = insulinOnBoardResult { completion(insulinOnBoardResult) } else { completion(.failure(.configurationError)) } } var carbsOnBoardResult: CarbStoreResult<CarbValue>? func carbsOnBoard(at date: Date, effectVelocities: [GlucoseEffectVelocity]?, completion: @escaping (CarbStoreResult<CarbValue>) -> Void) { if let carbsOnBoardResult = carbsOnBoardResult { completion(carbsOnBoardResult) } } var ensureCurrentPumpDataCompletion: ((Date?) -> Void)? func ensureCurrentPumpData(completion: @escaping (Date?) -> Void) { ensureCurrentPumpDataCompletion = completion } var mostRecentGlucoseDataDate: Date? var mostRecentPumpDataDate: Date? var isPumpConfigured: Bool = true var preferredGlucoseUnit: HKUnit = .milligramsPerDeciliter var insulinModel: InsulinModel? = MockInsulinModel() var settings: LoopSettings = LoopSettings( dosingEnabled: true, glucoseTargetRangeSchedule: BolusEntryViewModelTests.exampleGlucoseRangeSchedule, maximumBasalRatePerHour: 3.0, maximumBolus: 10.0, suspendThreshold: GlucoseThreshold(unit: .internationalUnit(), value: 75)) { didSet { NotificationCenter.default.post(name: .LoopDataUpdated, object: nil, userInfo: [ LoopDataManager.LoopUpdateContextKey: LoopDataManager.LoopUpdateContext.preferences.rawValue ]) } } } fileprivate struct MockInsulinModel: InsulinModel { func percentEffectRemaining(at time: TimeInterval) -> Double { 0 } var effectDuration: TimeInterval = 0 var delay: TimeInterval = 0 var debugDescription: String = "" } fileprivate struct MockGlucoseValue: GlucoseValue { var quantity: HKQuantity var startDate: Date } fileprivate extension TimeInterval { static func milliseconds(_ milliseconds: Double) -> TimeInterval { return milliseconds / 1000 } } extension BolusDosingDecision: Equatable { init(for reason: Reason, originalCarbEntry: StoredCarbEntry? = nil, carbEntry: StoredCarbEntry? = nil, manualGlucoseSample: StoredGlucoseSample? = nil, manualBolusRequested: Double? = nil) { self.init(for: reason) self.originalCarbEntry = originalCarbEntry self.carbEntry = carbEntry self.manualGlucoseSample = manualGlucoseSample self.manualBolusRequested = manualBolusRequested } public static func ==(lhs: BolusDosingDecision, rhs: BolusDosingDecision) -> Bool { return lhs.originalCarbEntry == rhs.originalCarbEntry && lhs.carbEntry == rhs.carbEntry && lhs.manualGlucoseSample == rhs.manualGlucoseSample && lhs.insulinOnBoard == rhs.insulinOnBoard && lhs.carbsOnBoard == rhs.carbsOnBoard && lhs.glucoseTargetRangeSchedule == rhs.glucoseTargetRangeSchedule && lhs.predictedGlucose == rhs.predictedGlucose && lhs.manualBolusRecommendation == rhs.manualBolusRecommendation && lhs.manualBolusRequested == rhs.manualBolusRequested } } extension ManualBolusRecommendationWithDate: Equatable { public static func == (lhs: ManualBolusRecommendationWithDate, rhs: ManualBolusRecommendationWithDate) -> Bool { return lhs.recommendation == rhs.recommendation && lhs.date == rhs.date } } ```
Pâslaru, meaning "felt shoemaker", is a Romanian surname. Notable people with the surname include: Eugen Pâslaru, Moldovan politician Margareta Pâslaru, Romanian-American singer and actress Tereza Pîslaru, Romanian handball player Romanian-language surnames Occupational surnames
Taps is a 1981 American thriller drama film starring George C. Scott and Timothy Hutton, with Ronny Cox, Tom Cruise, Sean Penn, and Evan Handler in supporting roles. Hutton was nominated for a Golden Globe award in 1982. The film was directed by Harold Becker from a screenplay by Robert Mark Kamen, James Lineberger, and Darryl Ponicsan, based on Devery Freeman's 1979 novel Father Sky. The original music score was composed by Maurice Jarre. It was filmed at Valley Forge Military Academy and College. The film follows a group of military school students who decide to take over their school to save it from closing. It was Penn's first film role, and Cruise's second and his first major role following a brief appearance in Endless Love a few months earlier. Plot Cadet Brian Moreland meets privately with Bunker Hill Military Academy commander General Harlan Bache, who promotes him to Cadet Major, the highest cadet rank. The next day Bache announces that the school's board of trustees will sell the school to real estate developers but that they will remain open for one more year to allow the seniors to graduate and the underclassmen to find other schools. Bache and the cadets hope this will be a chance to save the school. A dance is held at the academy after commencement. Local teenagers outside the gates harass some cadets and a brawl breaks out. When Bache attempts to end the fight, his service pistol is seized by one of the local boys and the weapon discharges, killing one of the local boys. Although the magazine was removed, a round was still in the chamber. Bache is held responsible and after he is arrested has a heart attack which leaves him in critical condition at the hospital. The board decides to close the school immediately. Moreland meets with his officers and they unanimously decide to take control of the campus. When the dean of students arrives with the local sheriff to empty the armory they find that the weapons are already gone. They are confronted by an armed cadre of cadets led by Major Moreland, who demand to meet with Bache and negotiate with the board of trustees to keep the school open. The dean and sheriff are escorted off the academy and armed cadets secure the perimeter. Meanwhile another group of cadets have been sent to a local food supply warehouse to restock their provisions but one of their trucks breaks down on the way back. As Cadet Captain Dwyer attempts to fix the engine a group of local boys threaten them and surround the truck until hotheaded Cadet Captain David Shawn opens fire with his M16, shooting several bursts into the air. The locals scatter and the cadets abandon the stalled truck, fleeing the scene in the other truck and ramming a sheriff's car in the escape. The police surround the campus and a delegation of parents led by Moreland's father arrives but does not change the cadets' minds. To demonstrate to the police and parents that none of the boys are being held against their will, Moreland assembles the cadets and offers them a chance to walk out. All of them choose to stay. The siege grows more tense when the National Guard arrives, bringing numerous infantry, armored personnel carriers, and tanks. Colonel Kerby, their commander, is more respectful and sympathetic toward the cadets, but negotiations still fail to go anywhere. At the next morning muster the officers report that some cadets have fled the campus. Moreland assembles the entire battalion and again offers cadets the opportunity to leave. Led by Moreland’s friend, Lieutenant Edward West, at least half of the remaining cadets drop their weapons and leave. After the electricity and water are turned off, one of the cadets is severely burned as they attempt to restart the school's old gasoline powered generator. They permit an ambulance to enter and take the injured boy to a hospital and, afterwards, Moreland offers to stand down if the order comes from General Bache. Kerby replies that Bache had died the previous night. The cadets, deeply hurt by Bache's death, hold a military memorial service in his honor, of which even the Guardsmen salute. The next night an M48 Patton tank rolls up to the main gate. One of the younger cadets, on sentry duty, panics and runs out to surrender. He drops his weapon which fires upon hitting the ground. The National Guard return fire and kill another cadet. The boy's death weakens Moreland’s resolve considerably and he decides to end the occupation. He calls all the cadets to muster and orders them to surrender. But the rebellious David Shawn starts shooting and the campus is overrun by the authorities as a firefight ensues. Moreland runs to Shawn's room to stop him, but both young men are killed by suppressing fire and the siege ends abruptly. A montage of scenes from the Academy's proud past flash across the screen in the aftermath. Cast George C. Scott as Brigadier General Harlan Bache Timothy Hutton as Cadet Major Brian Moreland Ronny Cox as Colonel Kerby Sean Penn as Cadet Captain Alex Dwyer (in his debut film role) Tom Cruise as Cadet Captain David Shawn Brendan Ward as Cadet Plebe Charlie Auden Evan Handler as Cadet First Lieutenant Edward West John P. Navin, Jr. as Cadet Plebe Derek Mellot Billy Van Zandt as Cadet Bug Giancarlo Esposito as Cadet Captain J.C. Pierce James Handy as Sheriff Earl Hindman as Lieutenant Hanson Jeff Rochlin as Cadet Shovel Jess Osuna as Dean Ferris Wayne Tippet as Master Sergeant Kevin Moreland Reception Film review aggregator Rotten Tomatoes reported that 68% of the 25 sampled critics gave the film a positive review and that it got an average score of 6.2/10. Film critic Roger Ebert gave the film 3 stars (out of four), comparing the film to the classic novel Lord of the Flies (1954). The film earned North American rentals of $20.5 million. Home media The film was released on DVD on March 5, 2002 and also was released on Blu-ray on May 3, 2011. See also List of American films of 1981 References External links 1981 films 1981 drama films American drama films 1980s English-language films Films based on American novels Films directed by Harold Becker 20th Century Fox films Films shot in Pennsylvania Films scored by Maurice Jarre Films with screenplays by Robert Mark Kamen 1980s American films
```objective-c // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CSSPropertyNames_h #define CSSPropertyNames_h #include "core/css/parser/CSSParserMode.h" #include "wtf/HashFunctions.h" #include "wtf/HashTraits.h" #include <string.h> namespace WTF { class AtomicString; class String; } namespace blink { enum CSSPropertyID { CSSPropertyInvalid = 0, // This isn't a property, but we need to know the position of @apply rules in style rules CSSPropertyApplyAtRule = 1, CSSPropertyVariable = 2, CSSPropertyColor = 3, CSSPropertyDirection = 4, CSSPropertyFontFamily = 5, CSSPropertyFontKerning = 6, CSSPropertyFontSize = 7, CSSPropertyFontSizeAdjust = 8, CSSPropertyFontStretch = 9, CSSPropertyFontStyle = 10, CSSPropertyFontVariant = 11, CSSPropertyFontVariantLigatures = 12, CSSPropertyFontWeight = 13, CSSPropertyFontFeatureSettings = 14, CSSPropertyWebkitFontFeatureSettings = 15, CSSPropertyWebkitFontSmoothing = 16, CSSPropertyWebkitLocale = 17, CSSPropertyWebkitTextOrientation = 18, CSSPropertyWebkitWritingMode = 19, CSSPropertyTextRendering = 20, CSSPropertyZoom = 21, CSSPropertyAlignContent = 22, CSSPropertyAlignItems = 23, CSSPropertyAlignmentBaseline = 24, CSSPropertyAlignSelf = 25, CSSPropertyAnimationDelay = 26, CSSPropertyAnimationDirection = 27, CSSPropertyAnimationDuration = 28, CSSPropertyAnimationFillMode = 29, CSSPropertyAnimationIterationCount = 30, CSSPropertyAnimationName = 31, CSSPropertyAnimationPlayState = 32, CSSPropertyAnimationTimingFunction = 33, CSSPropertyBackdropFilter = 34, CSSPropertyBackfaceVisibility = 35, CSSPropertyBackgroundAttachment = 36, CSSPropertyBackgroundBlendMode = 37, CSSPropertyBackgroundClip = 38, CSSPropertyBackgroundColor = 39, CSSPropertyBackgroundImage = 40, CSSPropertyBackgroundOrigin = 41, CSSPropertyBackgroundPositionX = 42, CSSPropertyBackgroundPositionY = 43, CSSPropertyBackgroundRepeatX = 44, CSSPropertyBackgroundRepeatY = 45, CSSPropertyBackgroundSize = 46, CSSPropertyBaselineShift = 47, CSSPropertyBorderBottomColor = 48, CSSPropertyBorderBottomLeftRadius = 49, CSSPropertyBorderBottomRightRadius = 50, CSSPropertyBorderBottomStyle = 51, CSSPropertyBorderBottomWidth = 52, CSSPropertyBorderCollapse = 53, CSSPropertyBorderImageOutset = 54, CSSPropertyBorderImageRepeat = 55, CSSPropertyBorderImageSlice = 56, CSSPropertyBorderImageSource = 57, CSSPropertyBorderImageWidth = 58, CSSPropertyBorderLeftColor = 59, CSSPropertyBorderLeftStyle = 60, CSSPropertyBorderLeftWidth = 61, CSSPropertyBorderRightColor = 62, CSSPropertyBorderRightStyle = 63, CSSPropertyBorderRightWidth = 64, CSSPropertyBorderTopColor = 65, CSSPropertyBorderTopLeftRadius = 66, CSSPropertyBorderTopRightRadius = 67, CSSPropertyBorderTopStyle = 68, CSSPropertyBorderTopWidth = 69, CSSPropertyBottom = 70, CSSPropertyBoxShadow = 71, CSSPropertyBoxSizing = 72, CSSPropertyBufferedRendering = 73, CSSPropertyCaptionSide = 74, CSSPropertyClear = 75, CSSPropertyClip = 76, CSSPropertyClipPath = 77, CSSPropertyClipRule = 78, CSSPropertyColorInterpolation = 79, CSSPropertyColorInterpolationFilters = 80, CSSPropertyColorRendering = 81, CSSPropertyColumnFill = 82, CSSPropertyContent = 83, CSSPropertyCounterIncrement = 84, CSSPropertyCounterReset = 85, CSSPropertyCursor = 86, CSSPropertyCx = 87, CSSPropertyCy = 88, CSSPropertyDisplay = 89, CSSPropertyDominantBaseline = 90, CSSPropertyEmptyCells = 91, CSSPropertyFill = 92, CSSPropertyFillOpacity = 93, CSSPropertyFillRule = 94, CSSPropertyFilter = 95, CSSPropertyFlexBasis = 96, CSSPropertyFlexDirection = 97, CSSPropertyFlexGrow = 98, CSSPropertyFlexShrink = 99, CSSPropertyFlexWrap = 100, CSSPropertyFloat = 101, CSSPropertyFloodColor = 102, CSSPropertyFloodOpacity = 103, CSSPropertyImeMode = 104, CSSPropertyGlyphOrientationHorizontal = 105, CSSPropertyGlyphOrientationVertical = 106, CSSPropertyGridAutoColumns = 107, CSSPropertyGridAutoFlow = 108, CSSPropertyGridAutoRows = 109, CSSPropertyGridColumnEnd = 110, CSSPropertyGridColumnStart = 111, CSSPropertyGridColumnGap = 112, CSSPropertyGridRowEnd = 113, CSSPropertyGridRowStart = 114, CSSPropertyGridRowGap = 115, CSSPropertyGridTemplateAreas = 116, CSSPropertyGridTemplateColumns = 117, CSSPropertyGridTemplateRows = 118, CSSPropertyHeight = 119, CSSPropertyImageRendering = 120, CSSPropertyImageOrientation = 121, CSSPropertyIsolation = 122, CSSPropertyJustifyContent = 123, CSSPropertyJustifyItems = 124, CSSPropertyJustifySelf = 125, CSSPropertyLeft = 126, CSSPropertyLetterSpacing = 127, CSSPropertyLightingColor = 128, CSSPropertyLineHeight = 129, CSSPropertyListStyleImage = 130, CSSPropertyListStylePosition = 131, CSSPropertyListStyleType = 132, CSSPropertyMarginBottom = 133, CSSPropertyMarginLeft = 134, CSSPropertyMarginRight = 135, CSSPropertyMarginTop = 136, CSSPropertyMarkerEnd = 137, CSSPropertyMarkerMid = 138, CSSPropertyMarkerStart = 139, CSSPropertyMask = 140, CSSPropertyMaskSourceType = 141, CSSPropertyMaskType = 142, CSSPropertyMaxHeight = 143, CSSPropertyMaxWidth = 144, CSSPropertyMinHeight = 145, CSSPropertyMinWidth = 146, CSSPropertyMixBlendMode = 147, CSSPropertyMotionOffset = 148, CSSPropertyMotionPath = 149, CSSPropertyMotionRotation = 150, CSSPropertyObjectFit = 151, CSSPropertyObjectPosition = 152, CSSPropertyOpacity = 153, CSSPropertyOrder = 154, CSSPropertyOrphans = 155, CSSPropertyOutlineColor = 156, CSSPropertyOutlineOffset = 157, CSSPropertyOutlineStyle = 158, CSSPropertyOutlineWidth = 159, CSSPropertyOverflowWrap = 160, CSSPropertyOverflowX = 161, CSSPropertyOverflowY = 162, CSSPropertyPaddingBottom = 163, CSSPropertyPaddingLeft = 164, CSSPropertyPaddingRight = 165, CSSPropertyPaddingTop = 166, CSSPropertyPageBreakAfter = 167, CSSPropertyPageBreakBefore = 168, CSSPropertyPageBreakInside = 169, CSSPropertyPaintOrder = 170, CSSPropertyPerspective = 171, CSSPropertyPerspectiveOrigin = 172, CSSPropertyPointerEvents = 173, CSSPropertyPosition = 174, CSSPropertyQuotes = 175, CSSPropertyResize = 176, CSSPropertyRight = 177, CSSPropertyR = 178, CSSPropertyRx = 179, CSSPropertyRy = 180, CSSPropertyScrollBehavior = 181, CSSPropertyScrollBlocksOn = 182, CSSPropertyScrollSnapType = 183, CSSPropertyScrollSnapPointsX = 184, CSSPropertyScrollSnapPointsY = 185, CSSPropertyScrollSnapDestination = 186, CSSPropertyScrollSnapCoordinate = 187, CSSPropertyShapeImageThreshold = 188, CSSPropertyShapeMargin = 189, CSSPropertyShapeOutside = 190, CSSPropertyShapeRendering = 191, CSSPropertySize = 192, CSSPropertySpeak = 193, CSSPropertyStopColor = 194, CSSPropertyStopOpacity = 195, CSSPropertyStroke = 196, CSSPropertyStrokeDasharray = 197, CSSPropertyStrokeDashoffset = 198, CSSPropertyStrokeLinecap = 199, CSSPropertyStrokeLinejoin = 200, CSSPropertyStrokeMiterlimit = 201, CSSPropertyStrokeOpacity = 202, CSSPropertyStrokeWidth = 203, CSSPropertyTableLayout = 204, CSSPropertyTabSize = 205, CSSPropertyTextAlign = 206, CSSPropertyTextAlignLast = 207, CSSPropertyTextAnchor = 208, CSSPropertyTextDecoration = 209, CSSPropertyTextDecorationColor = 210, CSSPropertyTextDecorationLine = 211, CSSPropertyTextDecorationStyle = 212, CSSPropertyTextIndent = 213, CSSPropertyTextJustify = 214, CSSPropertyTextOverflow = 215, CSSPropertyTextShadow = 216, CSSPropertyTextTransform = 217, CSSPropertyTextUnderlinePosition = 218, CSSPropertyTop = 219, CSSPropertyTouchAction = 220, CSSPropertyTransform = 221, CSSPropertyTransformOrigin = 222, CSSPropertyTransformStyle = 223, CSSPropertyTranslate = 224, CSSPropertyRotate = 225, CSSPropertyScale = 226, CSSPropertyTransitionDelay = 227, CSSPropertyTransitionDuration = 228, CSSPropertyTransitionProperty = 229, CSSPropertyTransitionTimingFunction = 230, CSSPropertyUnicodeBidi = 231, CSSPropertyVectorEffect = 232, CSSPropertyVerticalAlign = 233, CSSPropertyVisibility = 234, CSSPropertyX = 235, CSSPropertyY = 236, CSSPropertyWebkitAppearance = 237, CSSPropertyWebkitAppRegion = 238, CSSPropertyWebkitBackgroundClip = 239, CSSPropertyWebkitBackgroundComposite = 240, CSSPropertyWebkitBackgroundOrigin = 241, CSSPropertyWebkitBorderHorizontalSpacing = 242, CSSPropertyWebkitBorderImage = 243, CSSPropertyWebkitBorderVerticalSpacing = 244, CSSPropertyWebkitBoxAlign = 245, CSSPropertyWebkitBoxDecorationBreak = 246, CSSPropertyWebkitBoxDirection = 247, CSSPropertyWebkitBoxFlex = 248, CSSPropertyWebkitBoxFlexGroup = 249, CSSPropertyWebkitBoxLines = 250, CSSPropertyWebkitBoxOrdinalGroup = 251, CSSPropertyWebkitBoxOrient = 252, CSSPropertyWebkitBoxPack = 253, CSSPropertyWebkitBoxReflect = 254, CSSPropertyWebkitClipPath = 255, CSSPropertyWebkitColumnBreakAfter = 256, CSSPropertyWebkitColumnBreakBefore = 257, CSSPropertyWebkitColumnBreakInside = 258, CSSPropertyWebkitColumnCount = 259, CSSPropertyWebkitColumnGap = 260, CSSPropertyWebkitColumnRuleColor = 261, CSSPropertyWebkitColumnRuleStyle = 262, CSSPropertyWebkitColumnRuleWidth = 263, CSSPropertyWebkitColumnSpan = 264, CSSPropertyWebkitColumnWidth = 265, CSSPropertyWebkitFilter = 266, CSSPropertyWebkitHighlight = 267, CSSPropertyWebkitHyphenateCharacter = 268, CSSPropertyWebkitLineBoxContain = 269, CSSPropertyWebkitLineBreak = 270, CSSPropertyWebkitLineClamp = 271, CSSPropertyWebkitMarginAfterCollapse = 272, CSSPropertyWebkitMarginBeforeCollapse = 273, CSSPropertyWebkitMarginBottomCollapse = 274, CSSPropertyWebkitMarginTopCollapse = 275, CSSPropertyWebkitMaskBoxImageOutset = 276, CSSPropertyWebkitMaskBoxImageRepeat = 277, CSSPropertyWebkitMaskBoxImageSlice = 278, CSSPropertyWebkitMaskBoxImageSource = 279, CSSPropertyWebkitMaskBoxImageWidth = 280, CSSPropertyWebkitMaskClip = 281, CSSPropertyWebkitMaskComposite = 282, CSSPropertyWebkitMaskImage = 283, CSSPropertyWebkitMaskOrigin = 284, CSSPropertyWebkitMaskPositionX = 285, CSSPropertyWebkitMaskPositionY = 286, CSSPropertyWebkitMaskRepeatX = 287, CSSPropertyWebkitMaskRepeatY = 288, CSSPropertyWebkitMaskSize = 289, CSSPropertyWebkitPerspectiveOriginX = 290, CSSPropertyWebkitPerspectiveOriginY = 291, CSSPropertyWebkitPrintColorAdjust = 292, CSSPropertyWebkitRtlOrdering = 293, CSSPropertyWebkitRubyPosition = 294, CSSPropertyWebkitTapHighlightColor = 295, CSSPropertyWebkitTextCombine = 296, CSSPropertyWebkitTextEmphasisColor = 297, CSSPropertyWebkitTextEmphasisPosition = 298, CSSPropertyWebkitTextEmphasisStyle = 299, CSSPropertyWebkitTextFillColor = 300, CSSPropertyWebkitTextSecurity = 301, CSSPropertyWebkitTextStrokeColor = 302, CSSPropertyWebkitTextStrokeWidth = 303, CSSPropertyWebkitTransformOriginX = 304, CSSPropertyWebkitTransformOriginY = 305, CSSPropertyWebkitTransformOriginZ = 306, CSSPropertyWebkitUserDrag = 307, CSSPropertyWebkitUserModify = 308, CSSPropertyWebkitUserSelect = 309, CSSPropertyWhiteSpace = 310, CSSPropertyWidows = 311, CSSPropertyWidth = 312, CSSPropertyWillChange = 313, CSSPropertyWordBreak = 314, CSSPropertyWordSpacing = 315, CSSPropertyWordWrap = 316, CSSPropertyWritingMode = 317, CSSPropertyZIndex = 318, CSSPropertyWebkitBorderEndColor = 319, CSSPropertyWebkitBorderEndStyle = 320, CSSPropertyWebkitBorderEndWidth = 321, CSSPropertyWebkitBorderStartColor = 322, CSSPropertyWebkitBorderStartStyle = 323, CSSPropertyWebkitBorderStartWidth = 324, CSSPropertyWebkitBorderBeforeColor = 325, CSSPropertyWebkitBorderBeforeStyle = 326, CSSPropertyWebkitBorderBeforeWidth = 327, CSSPropertyWebkitBorderAfterColor = 328, CSSPropertyWebkitBorderAfterStyle = 329, CSSPropertyWebkitBorderAfterWidth = 330, CSSPropertyWebkitMarginEnd = 331, CSSPropertyWebkitMarginStart = 332, CSSPropertyWebkitMarginBefore = 333, CSSPropertyWebkitMarginAfter = 334, CSSPropertyWebkitPaddingEnd = 335, CSSPropertyWebkitPaddingStart = 336, CSSPropertyWebkitPaddingBefore = 337, CSSPropertyWebkitPaddingAfter = 338, CSSPropertyWebkitLogicalWidth = 339, CSSPropertyWebkitLogicalHeight = 340, CSSPropertyWebkitMinLogicalWidth = 341, CSSPropertyWebkitMinLogicalHeight = 342, CSSPropertyWebkitMaxLogicalWidth = 343, CSSPropertyWebkitMaxLogicalHeight = 344, CSSPropertyAll = 345, CSSPropertyEnableBackground = 346, CSSPropertyMaxZoom = 347, CSSPropertyMinZoom = 348, CSSPropertyOrientation = 349, CSSPropertyPage = 350, CSSPropertySrc = 351, CSSPropertyUnicodeRange = 352, CSSPropertyUserZoom = 353, CSSPropertyWebkitFontSizeDelta = 354, CSSPropertyWebkitTextDecorationsInEffect = 355, CSSPropertyAnimation = 356, CSSPropertyBackground = 357, CSSPropertyBackgroundPosition = 358, CSSPropertyBackgroundRepeat = 359, CSSPropertyBorder = 360, CSSPropertyBorderBottom = 361, CSSPropertyBorderColor = 362, CSSPropertyBorderImage = 363, CSSPropertyBorderLeft = 364, CSSPropertyBorderRadius = 365, CSSPropertyBorderRight = 366, CSSPropertyBorderSpacing = 367, CSSPropertyBorderStyle = 368, CSSPropertyBorderTop = 369, CSSPropertyBorderWidth = 370, CSSPropertyFlex = 371, CSSPropertyFlexFlow = 372, CSSPropertyFont = 373, CSSPropertyGrid = 374, CSSPropertyGridArea = 375, CSSPropertyGridColumn = 376, CSSPropertyGridRow = 377, CSSPropertyGridTemplate = 378, CSSPropertyListStyle = 379, CSSPropertyMargin = 380, CSSPropertyMarker = 381, CSSPropertyMotion = 382, CSSPropertyOutline = 383, CSSPropertyOverflow = 384, CSSPropertyPadding = 385, CSSPropertyTransition = 386, CSSPropertyWebkitBorderAfter = 387, CSSPropertyWebkitBorderBefore = 388, CSSPropertyWebkitBorderEnd = 389, CSSPropertyWebkitBorderStart = 390, CSSPropertyWebkitColumnRule = 391, CSSPropertyWebkitColumns = 392, CSSPropertyWebkitMarginCollapse = 393, CSSPropertyWebkitMask = 394, CSSPropertyWebkitMaskBoxImage = 395, CSSPropertyWebkitMaskPosition = 396, CSSPropertyWebkitMaskRepeat = 397, CSSPropertyWebkitTextEmphasis = 398, CSSPropertyWebkitTextStroke = 399, CSSPropertyAliasEpubCaptionSide = 586, CSSPropertyAliasEpubTextCombine = 808, CSSPropertyAliasEpubTextEmphasis = 910, CSSPropertyAliasEpubTextEmphasisColor = 809, CSSPropertyAliasEpubTextEmphasisStyle = 811, CSSPropertyAliasEpubTextOrientation = 530, CSSPropertyAliasEpubTextTransform = 729, CSSPropertyAliasEpubWordBreak = 826, CSSPropertyAliasEpubWritingMode = 531, CSSPropertyAliasWebkitAlignContent = 534, CSSPropertyAliasWebkitAlignItems = 535, CSSPropertyAliasWebkitAlignSelf = 537, CSSPropertyAliasWebkitAnimation = 868, CSSPropertyAliasWebkitAnimationDelay = 538, CSSPropertyAliasWebkitAnimationDirection = 539, CSSPropertyAliasWebkitAnimationDuration = 540, CSSPropertyAliasWebkitAnimationFillMode = 541, CSSPropertyAliasWebkitAnimationIterationCount = 542, CSSPropertyAliasWebkitAnimationName = 543, CSSPropertyAliasWebkitAnimationPlayState = 544, CSSPropertyAliasWebkitAnimationTimingFunction = 545, CSSPropertyAliasWebkitBackfaceVisibility = 547, CSSPropertyAliasWebkitBackgroundSize = 558, CSSPropertyAliasWebkitBorderBottomLeftRadius = 561, CSSPropertyAliasWebkitBorderBottomRightRadius = 562, CSSPropertyAliasWebkitBorderRadius = 877, CSSPropertyAliasWebkitBorderTopLeftRadius = 578, CSSPropertyAliasWebkitBorderTopRightRadius = 579, CSSPropertyAliasWebkitBoxShadow = 583, CSSPropertyAliasWebkitBoxSizing = 584, CSSPropertyAliasWebkitFlex = 883, CSSPropertyAliasWebkitFlexBasis = 608, CSSPropertyAliasWebkitFlexDirection = 609, CSSPropertyAliasWebkitFlexFlow = 884, CSSPropertyAliasWebkitFlexGrow = 610, CSSPropertyAliasWebkitFlexShrink = 611, CSSPropertyAliasWebkitFlexWrap = 612, CSSPropertyAliasWebkitJustifyContent = 635, CSSPropertyAliasWebkitOpacity = 665, CSSPropertyAliasWebkitOrder = 666, CSSPropertyAliasWebkitPerspective = 683, CSSPropertyAliasWebkitPerspectiveOrigin = 684, CSSPropertyAliasWebkitShapeImageThreshold = 700, CSSPropertyAliasWebkitShapeMargin = 701, CSSPropertyAliasWebkitShapeOutside = 702, CSSPropertyAliasWebkitTransform = 733, CSSPropertyAliasWebkitTransformOrigin = 734, CSSPropertyAliasWebkitTransformStyle = 735, CSSPropertyAliasWebkitTransition = 898, CSSPropertyAliasWebkitTransitionDelay = 739, CSSPropertyAliasWebkitTransitionDuration = 740, CSSPropertyAliasWebkitTransitionProperty = 741, CSSPropertyAliasWebkitTransitionTimingFunction = 742, }; const int firstCSSProperty = 3; const int numCSSProperties = 397; const int lastCSSProperty = 399; const int lastUnresolvedCSSProperty = 910; const size_t maxCSSPropertyNameLength = 40; const char* getPropertyName(CSSPropertyID); const WTF::AtomicString& getPropertyNameAtomicString(CSSPropertyID); WTF::String getPropertyNameString(CSSPropertyID); WTF::String getJSPropertyName(CSSPropertyID); inline CSSPropertyID convertToCSSPropertyID(int value) { ASSERT((value >= firstCSSProperty && value <= lastCSSProperty) || value == CSSPropertyInvalid); return static_cast<CSSPropertyID>(value); } inline CSSPropertyID resolveCSSPropertyID(CSSPropertyID id) { return convertToCSSPropertyID(id & ~512); } inline bool isPropertyAlias(CSSPropertyID id) { return id & 512; } CSSPropertyID unresolvedCSSPropertyID(const WTF::String&); CSSPropertyID cssPropertyID(const WTF::String&); } // namespace blink namespace WTF { template<> struct DefaultHash<blink::CSSPropertyID> { typedef IntHash<unsigned> Hash; }; template<> struct HashTraits<blink::CSSPropertyID> : GenericHashTraits<blink::CSSPropertyID> { static const bool emptyValueIsZero = true; static void constructDeletedValue(blink::CSSPropertyID& slot, bool) { slot = static_cast<blink::CSSPropertyID>(blink::lastUnresolvedCSSProperty + 1); } static bool isDeletedValue(blink::CSSPropertyID value) { return value == (blink::lastUnresolvedCSSProperty + 1); } }; } #endif // CSSPropertyNames_h ```
The EMLL 31st Anniversary Show () was a professional wrestling major show event produced by Empresa Mexicana de Lucha Libre (EMLL) that took place on September 25, 1964, in Arena México, Mexico City, Mexico. The event commemorated the 31st anniversary of EMLL, which would become the oldest professional wrestling promotion in the world. The Anniversary show is EMLL's biggest show of the year, their Super Bowl event. The EMLL Anniversary Show series is the longest-running annual professional wrestling show, starting in 1934. Production Background The 1964 Anniversary show commemorated the 31st anniversary of the Mexican professional wrestling company Empresa Mexicana de Lucha Libre (Spanish for "Mexican Wrestling Promotion"; EMLL) holding their first show on September 22, 1933 by promoter and founder Salvador Lutteroth. EMLL was rebranded early in 1992 to become Consejo Mundial de Lucha Libre ("World Wrestling Council"; CMLL) signal their departure from the National Wrestling Alliance. With the sales of the Jim Crockett Promotions to Ted Turner in 1988 EMLL became the oldest, still-operating wrestling promotion in the world. Over the years EMLL/CMLL has on occasion held multiple shows to celebrate their anniversary but since 1977 the company has only held one annual show, which is considered the biggest show of the year, CMLL's equivalent of WWE's WrestleMania or their Super Bowl event. CMLL has held their Anniversary show at Arena México in Mexico City, Mexico since 1956, the year the building was completed, over time Arena México earned the nickname "The Cathedral of Lucha Libre" due to it hosting most of EMLL/CMLL's major events since the building was completed. Traditionally EMLL/CMLL holds their major events on Friday Nights, replacing their regularly scheduled Super Viernes show. Storylines The event featured an undetermined number of professional wrestling matches with different wrestlers involved in pre-existing scripted feuds, plots and storylines. Wrestlers were portrayed as either heels (referred to as rudos in Mexico, those that portray the "bad guys") or faces (técnicos in Mexico, the "good guy" characters) as they followed a series of tension-building events, which culminated in a wrestling match or series of matches. Due to the nature of keeping mainly paper records of wrestling at the time no documentation has been found for some of the matches of the show. Event Of the five matches on the show, documentation of participants and results exist for only two of them. In the first of the matches Karloff Lagarde sought to win the NWA World Welterweight Championship for the second time as he fought against the popular moviestar and champion Huracán Ramírez in a two out of three falls match. Lagarde defeated Huracán Ramírez in a high paced match to regain the championship he had lost to Ramirez only months earlier. The other confirmed match saw Rayo de Jalisco defeat NWA World Middleweight Champion Benny Galant to win the title for a second time. Aftermath Rayo de Jalisco held the title until April 4, 1963 where he was defeated by René Guajardo, he would hold the title for a third time later in his career. Results References 1964 in professional wrestling 31 September 1964 events in Mexico
```xml /* * one or more contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright ownership. */ import {action, makeObservable, observable, override} from 'mobx'; import { fetchIncidentsByError, IncidentByErrorDto, } from 'modules/api/incidents/fetchIncidentsByError'; import {NetworkReconnectionHandler} from './networkReconnectionHandler'; import isEqual from 'lodash/isEqual'; type State = { incidents: IncidentByErrorDto[]; status: 'initial' | 'first-fetch' | 'fetching' | 'fetched' | 'error'; }; const DEFAULT_STATE: State = { incidents: [], status: 'initial', }; class IncidentsByError extends NetworkReconnectionHandler { state: State = {...DEFAULT_STATE}; isPollRequestRunning: boolean = false; intervalId: null | ReturnType<typeof setInterval> = null; constructor() { super(); makeObservable(this, { state: observable, startFetching: action, setError: action, setIncidents: action, reset: override, }); } init() { if (this.intervalId === null) { this.startPolling(); } } getIncidentsByError = this.retryOnConnectionLost(async () => { this.startFetching(); try { const response = await fetchIncidentsByError(); if (response.isSuccess) { this.setIncidents(response.data); } else { this.setError(); } } catch { this.setError(); } }); startFetching = () => { if (this.state.status === 'initial') { this.state.status = 'first-fetch'; } else { this.state.status = 'fetching'; } }; setError = () => { this.state.status = 'error'; }; handlePolling = async () => { this.isPollRequestRunning = true; const response = await fetchIncidentsByError({isPolling: true}); if (this.intervalId !== null) { if (response.isSuccess) { const incidents = response.data; if (!isEqual(incidents, this.state.incidents)) { this.setIncidents(incidents); } } else { this.setError(); } } this.isPollRequestRunning = false; }; startPolling = async () => { this.intervalId = setInterval(() => { if (!this.isPollRequestRunning) { this.handlePolling(); } }, 5000); }; stopPolling = () => { const {intervalId} = this; if (intervalId !== null) { clearInterval(intervalId); this.intervalId = null; } }; setIncidents(incidents: IncidentByErrorDto[]) { this.state.incidents = incidents; this.state.status = 'fetched'; } reset() { super.reset(); this.state = {...DEFAULT_STATE}; this.stopPolling(); } } export const incidentsByErrorStore = new IncidentsByError(); ```
```java /* * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.apache.rocketmq.common.action; import org.apache.rocketmq.common.resource.ResourceType; import org.junit.Test; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; public class RocketMQActionTest { @Test public void your_sha256_hashrray() { RocketMQAction annotation = DemoClass.class.getAnnotation(RocketMQAction.class); assertEquals(0, annotation.value()); assertEquals(ResourceType.UNKNOWN, annotation.resource()); assertArrayEquals(new Action[] {}, annotation.action()); } @Test public void testRocketMQAction_CustomisedValueAndResourceTypeAndActionArray() { RocketMQAction annotation = CustomisedDemoClass.class.getAnnotation(RocketMQAction.class); assertEquals(1, annotation.value()); assertEquals(ResourceType.TOPIC, annotation.resource()); assertArrayEquals(new Action[] {Action.CREATE, Action.DELETE}, annotation.action()); } @RocketMQAction(value = 0, resource = ResourceType.UNKNOWN, action = {}) private static class DemoClass { } @RocketMQAction(value = 1, resource = ResourceType.TOPIC, action = {Action.CREATE, Action.DELETE}) private static class CustomisedDemoClass { } } ```
Saunth (or sooth), is a sweet chutney used in Indian chaats. It is made from dried ginger (sooth) and tamarind (or imli) paste, hence the name. The chutney is brownish-red in colour. Modern sooth is often made with dates. However, sooth made with dried ginger adds a special flavour to the chaat and is preferred in most parts of North India. See also List of chutneys References External links Recipe North Indian cuisine Uttar Pradeshi cuisine Indian fast food Indian condiments Chutney
```xml import { mat4 } from "gl-matrix"; import { HIEnt } from "./HIEnt.js"; import { HIModelInstance } from "./HIModel.js"; import { HIScene } from "./HIScene.js"; import { RwEngine, RwStream } from "./rw/rwcore.js"; export interface HIAssetPickup { pickupHash: number; pickupType: number; pickupIndex: number; pickupFlags: number; quantity: number; modelID: number; animID: number; } export class HIAssetPickupTable { public entries: HIAssetPickup[] = []; constructor(stream: RwStream) { const magic = stream.readUint32(); const count = stream.readUint32(); for (let i = 0; i < count; i++) { const pickupHash = stream.readUint32(); const pickupType = stream.readUint8(); const pickupIndex = stream.readUint8(); const pickupFlags = stream.readUint16(); const quantity = stream.readUint32(); const modelID = stream.readUint32(); const animID = stream.readUint32(); this.entries.push({ pickupHash, pickupType, pickupIndex, pickupFlags, quantity, modelID, animID }); } } } export class HIEntPickupAsset { public pickupHash: number; public pickupFlags: number; public pickupValue: number; constructor(stream: RwStream) { this.pickupHash = stream.readUint32(); this.pickupFlags = stream.readUint16(); this.pickupValue = stream.readUint16(); } } export class HIEntPickup extends HIEnt { public pickupAsset: HIEntPickupAsset; constructor(stream: RwStream, scene: HIScene) { super(stream, scene); this.pickupAsset = new HIEntPickupAsset(stream); this.readLinks(stream); let pickupEntry = scene.pickupTable.entries[0]; for (const pick of scene.pickupTable.entries) { if (this.pickupAsset.pickupHash === pick.pickupHash) { pickupEntry = pick; break; } } const clump = scene.models.get(pickupEntry.modelID); if (clump) { this.model = new HIModelInstance(clump.atomics[0], scene); } } public override render() {} } export class HIEntPickupManager { private pickups: HIEntPickup[] = []; private pickupOrientation = mat4.create(); public add(pkup: HIEntPickup) { this.pickups.push(pkup); } public update(scene: HIScene, dt: number) { mat4.rotateY(this.pickupOrientation, this.pickupOrientation, Math.PI * dt); } public render(scene: HIScene, rw: RwEngine) { scene.lightKitManager.enable(null, scene); const src = this.pickupOrientation; for (const pkup of this.pickups) { if (!pkup.isVisible()) continue; if (!pkup.model) continue; if (scene.camera.cullModel(pkup.model.data, pkup.model.mat, rw)) continue; const dst = pkup.model.mat; mat4.set(dst, src[0], src[1], src[2], src[3], src[4], src[5], src[6], src[7], src[8], src[9], src[10], src[11], dst[12], dst[13], dst[14], dst[15]); pkup.model.renderSingle(scene, rw); } } } ```
```smalltalk using System; using System.Collections.ObjectModel; using Xamarin.Forms.CustomAttributes; using Xamarin.Forms.Internals; #if UITEST using Xamarin.UITest; using NUnit.Framework; #endif namespace Xamarin.Forms.Controls.Issues { #if UITEST [NUnit.Framework.Category(Core.UITests.UITestCategories.Bugzilla)] #endif [Preserve(AllMembers = true)] [Issue(IssueTracker.Bugzilla, 56710, "ContextActionsCell.OnMenuItemPropertyChanged throws NullReferenceException", PlatformAffected.iOS)] public class Bugzilla56710 : TestNavigationPage { protected override void Init() { var root = new ContentPage { Content = new Button { Text = "Go to Test Page", Command = new Command(() => PushAsync(new TestPage())) } }; PushAsync(root); } #if UITEST [Test] public void Bugzilla56710Test() { RunningApp.WaitForElement(q => q.Marked("Go to Test Page")); RunningApp.Tap(q => q.Marked("Go to Test Page")); RunningApp.WaitForElement(q => q.Marked("Item 3")); RunningApp.Back(); } #endif } [Preserve(AllMembers = true)] public class TestPage : ContentPage { ObservableCollection<TestItem> Items; public TestPage() { Items = new ObservableCollection<TestItem>(); Items.Add(new TestItem { Text = "Item 1", ItemText = "Action 1" }); Items.Add(new TestItem { Text = "Item 2", ItemText = "Action 2" }); Items.Add(new TestItem { Text = "Item 3", ItemText = "Action 3" }); var testListView = new ListView { ItemsSource = Items, ItemTemplate = new DataTemplate(typeof(TestCell)) }; Content = testListView; } protected override void OnDisappearing() { base.OnDisappearing(); Items.Clear(); } } [Preserve(AllMembers = true)] public class TestItem { public string Text { get; set; } public string ItemText { get; set; } } [Preserve(AllMembers = true)] public class TestCell : ViewCell { public TestCell() { var menuItem = new MenuItem(); menuItem.SetBinding(MenuItem.TextProperty, "ItemText"); ContextActions.Add(menuItem); var textLabel = new Label(); textLabel.SetBinding(Label.TextProperty, "Text"); View = textLabel; } } } ```
New Court may refer to: New Court (also known as The Rothschild Headquarters) is a collection of proximate buildings in London having served as the global headquarters of the Rothschild investment bank since 1809. Corpus Christi College, Cambridge#New Court New Court, Emmanuel College, Cambridge St John's College, Cambridge#New Court's Clock Tower Trinity College, Cambridge#New Court Old Court – New Court controversy 19th-century political controversy in the U.S. state of Kentucky See also Newcourt (disambiguation)