text
stringlengths
1
22.8M
```html <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>ip::network_v6::make_network_v6 (1 of 6 overloads)</title> <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="../../../../boost_asio.html" title="Boost.Asio"> <link rel="up" href="../make_network_v6.html" title="ip::network_v6::make_network_v6"> <link rel="prev" href="../make_network_v6.html" title="ip::network_v6::make_network_v6"> <link rel="next" href="overload2.html" title="ip::network_v6::make_network_v6 (2 of 6 overloads)"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td align="center"><a href="../../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="path_to_url">People</a></td> <td align="center"><a href="path_to_url">FAQ</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="../make_network_v6.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../make_network_v6.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../boost_asio.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h5 class="title"> <a name="boost_asio.reference.ip__network_v6.make_network_v6.overload1"></a><a class="link" href="overload1.html" title="ip::network_v6::make_network_v6 (1 of 6 overloads)">ip::network_v6::make_network_v6 (1 of 6 overloads)</a> </h5></div></div></div> <p> Create an IPv6 network from a string containing IP address and prefix length. </p> <pre class="programlisting">network_v6 make_network_v6( const char * str); </pre> </div> <table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> file LICENSE_1_0.txt or copy at <a href="path_to_url" target="_top">path_to_url </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="../make_network_v6.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../make_network_v6.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../boost_asio.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html> ```
```java // 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 package org.apache.impala.calcite.rel.phys; import org.apache.impala.analysis.Analyzer; import org.apache.impala.analysis.Expr; import org.apache.impala.analysis.MultiAggregateInfo; import org.apache.impala.analysis.TableRef; import org.apache.impala.analysis.TupleDescriptor; import org.apache.impala.catalog.FeFsPartition; import org.apache.impala.planner.HdfsScanNode; import org.apache.impala.planner.PlanNodeId; import java.util.List; /** * ImpalaHdfsScanNode. Extends the HdfsScanNode to bypass processing of the * assignedConjuncts. */ public class ImpalaHdfsScanNode extends HdfsScanNode { private final List<Expr> assignedConjuncts_; public ImpalaHdfsScanNode(PlanNodeId id, TupleDescriptor tupleDesc, List<? extends FeFsPartition> partitions, TableRef hdfsTblRef, MultiAggregateInfo aggInfo, List<Expr> partConjuncts, List<Expr> assignedConjuncts) { super(id, tupleDesc, assignedConjuncts, partitions, hdfsTblRef, aggInfo, partConjuncts, false); this.assignedConjuncts_ = assignedConjuncts; } @Override public void assignConjuncts(Analyzer analyzer) { // ignore analyzer and retrieve the processed Calcite conjuncts this.conjuncts_ = assignedConjuncts_; } } ```
```java package com.yahoo.vespa.hosted.provision.autoscale; import com.yahoo.config.provision.NodeResources; import java.util.function.DoubleBinaryOperator; import java.util.function.DoubleUnaryOperator; import java.util.function.Predicate; /** * The load of a node or system, measured as fractions of max (1.0) in three dimensions. * * @author bratseth */ public record Load(double cpu, double memory, double disk, double gpu, double gpuMemory) { public enum Dimension { cpu, memory, disk, gpu, gpuMemory } public Load(double cpu, double memory, double disk, double gpu, double gpuMemory) { this.cpu = requireNormalized(cpu, "cpu"); this.memory = requireNormalized(memory, "memory"); this.disk = requireNormalized(disk, "disk"); this.gpu = requireNormalized(gpu, "gpu"); this.gpuMemory = requireNormalized(gpuMemory, "gpuMemory"); } public double cpu() { return cpu; } public double memory() { return memory; } public double disk() { return disk; } public double gpu() { return gpu; } public double gpuMemory() { return gpuMemory; } public Load withCpu(double cpu) { return new Load(cpu, memory, disk, gpu, gpuMemory); } public Load withMemory(double memory) { return new Load(cpu, memory, disk, gpu, gpuMemory); } public Load withDisk(double disk) { return new Load(cpu, memory, disk, gpu, gpuMemory); } public Load withGpu(double gpu) { return new Load(cpu, memory, disk, gpu, gpuMemory); } public Load withGpuMemory(double gpuMemory) { return new Load(cpu, memory, disk, gpu, gpuMemory); } public Load add(Load other) { return join(other, (a, b) -> a + b); } public Load multiply(NodeResources resources) { return new Load(cpu * resources.vcpu(), memory * resources.memoryGiB(), disk * resources.diskGb(), gpu * resources.gpuResources().count(), gpu * resources.gpuResources().memoryGiB()); } public Load multiply(double factor) { return map(v -> v * factor); } public Load multiply(Load other) { return join(other, (a, b) -> a * b); } public Load divide(Load divisor) { return join(divisor, (a, b) -> divide(a, b)); } public Load divide(double divisor) { return map(v -> divide(v, divisor)); } public Load divide(NodeResources resources) { return new Load(divide(cpu, resources.vcpu()), divide(memory, resources.memoryGiB()), divide(disk, resources.diskGb()), divide(gpu, resources.gpuResources().count()), divide(gpuMemory, resources.gpuResources().memoryGiB())); } /** Returns the load where the given function is applied to each dimension of this. */ public Load map(DoubleUnaryOperator f) { return new Load(f.applyAsDouble(cpu), f.applyAsDouble(memory), f.applyAsDouble(disk), f.applyAsDouble(gpu), f.applyAsDouble(gpuMemory)); } /** Returns the load where the given function is applied to each dimension of this and the given load. */ public Load join(Load other, DoubleBinaryOperator f) { return new Load(f.applyAsDouble(this.cpu(), other.cpu()), f.applyAsDouble(this.memory(), other.memory()), f.applyAsDouble(this.disk(), other.disk()), f.applyAsDouble(this.gpu(), other.gpu()), f.applyAsDouble(this.gpuMemory(), other.gpuMemory())); } /** Returns true if any dimension matches the predicate. */ public boolean any(Predicate<Double> test) { return test.test(cpu) || test.test(memory) || test.test(disk); } public NodeResources scaled(NodeResources resources) { return resources.withVcpu(cpu * resources.vcpu()) .withMemoryGiB(memory * resources.memoryGiB()) .withDiskGb(disk * resources.diskGb()); } public double get(Dimension dimension) { return switch (dimension) { case cpu -> cpu(); case memory -> memory(); case disk -> disk(); case gpu -> gpu(); case gpuMemory -> gpuMemory(); }; } private double requireNormalized(double value, String name) { if (Double.isNaN(value)) throw new IllegalArgumentException(name + " must be a number but is NaN"); if (value < 0) throw new IllegalArgumentException(name + " must be zero or larger, but is " + value); return value; } private static double divide(double a, double b) { if (a == 0 && b == 0) return 0; return a / b; } @Override public String toString() { return "load: " + cpu + " cpu, " + memory + " memory, " + disk + " disk, " + gpu + " gpu, " + gpuMemory + " gpuMemory"; } public static Load zero() { return new Load(0, 0, 0, 0, 0); } public static Load one() { return new Load(1, 1, 1, 1, 1); } public static Load byDividing(NodeResources a, NodeResources b) { return new Load(divide(a.vcpu(), b.vcpu()), divide(a.memoryGiB(), b.memoryGiB()), divide(a.diskGb(), b.diskGb()), divide(a.gpuResources().count(), b.gpuResources().count()), divide(a.gpuResources().memoryGiB(), b.gpuResources().memoryGiB())); } } ```
Sarah Konrad (born August 26, 1967) is an American former biathlete. She competed in two events at the 2006 Winter Olympics. She also competed in the cross-country skiing at the same Olympics. Konrad was the first woman to represent the United States in two different sports at the same Winter Olympic Games. Since retiring, Konrad has served as a representative for the Athletes Advisory Council of the United States Olympic Committee and the United States Biathlon Association for the International Competition Committee. Biography Konrad was born in Los Angeles, California, and attended The Thacher School in Ojai. In 1988, she enrolled on ski program whilst at Dartmouth College. In 1998, Konrad won two golds and a silver at the Masters World Cup event in Lake Placid, New York. The following year, she was ranked as the ninth-best female cross-country skier in the United States. Konrad competed in all the Biathlon World Championships events from 2005 to 2007. She competed in the Olympic trials in Fort Kent, Maine to qualify for the 2006 Winter Olympics. After she retired, she moved back to Laramie, Wyoming to complete a PhD in geology at the University of Wyoming. She was also the oldest female Olympian to represent the United States at the 2006 Winter Games. In 2014, Konrad, as a glaciologist, was part of an educational video, titled "Science of Snow" for NBC. Konrad undertook an experiment on freezing water and explained how snow relates to Nordic skiing. In 2016, Konrad also worked with the World Anti-Doping Agency, following doping amongst Russian athletes. Konrad then became the United States representative at the 2014 Winter Olympics, to ensure that none of the US team break any Olympic rules. In 2022, Konrad became a director of US Biathlon. Cross-country skiing results All results are sourced from the International Ski Federation (FIS). Olympic Games World Championships World Cup Season standings References External links 1967 births Living people Biathletes at the 2006 Winter Olympics Cross-country skiers at the 2006 Winter Olympics American female biathletes American female cross-country skiers Olympic biathletes for the United States Olympic cross-country skiers for the United States Sportspeople from Los Angeles 21st-century American women
is a 2005 Japanese television drama series. References External links Official website 2005 Japanese television series debuts 2005 Japanese television series endings Japanese drama television series TBS Television (Japan) dramas
```python def test_concat(get_contract): test_concat = """ @external def foo2(input1: Bytes[50], input2: Bytes[50]) -> Bytes[1000]: return concat(input1, input2) @external def foo3(input1: Bytes[50], input2: Bytes[50], input3: Bytes[50]) -> Bytes[1000]: return concat(input1, input2, input3) """ c = get_contract(test_concat) assert c.foo2(b"h", b"orse") == b"horse" assert c.foo2(b"h", b"") == b"h" assert c.foo2(b"", b"") == b"" assert c.foo2(b"", b"orse") == b"orse" assert c.foo3(b"Buffalo", b" ", b"buffalo") == b"Buffalo buffalo" assert c.foo2(b"\x36", b"\x35" * 32) == b"\x36" + b"\x35" * 32 assert c.foo2(b"\x36" * 48, b"\x35" * 32) == b"\x36" * 48 + b"\x35" * 32 assert ( c.foo3(b"horses" * 4, b"mice" * 7, b"crows" * 10) == b"horses" * 4 + b"mice" * 7 + b"crows" * 10 ) # noqa: E501 print("Passed simple concat test") def test_concat2(get_contract): test_concat2 = """ @external def foo(inp: Bytes[50]) -> Bytes[1000]: x: Bytes[50] = inp return concat(x, inp, x, inp, x, inp, x, inp, x, inp) """ c = get_contract(test_concat2) assert c.foo(b"horse" * 9 + b"vyper") == (b"horse" * 9 + b"vyper") * 10 print("Passed second concat test") def test_crazy_concat_code(get_contract): crazy_concat_code = """ y: Bytes[10] @external def krazykonkat(z: Bytes[10]) -> Bytes[25]: x: Bytes[3] = b"cow" self.y = b"horse" return concat(x, b" ", self.y, b" ", z) """ c = get_contract(crazy_concat_code) assert c.krazykonkat(b"moose") == b"cow horse moose" print("Passed third concat test") def test_concat_buffer(get_contract): # GHSA-2q8v-3gqq-4f8p code = """ @internal def bar() -> uint256: sss: String[2] = concat("a", "b") return 1 @external def foo() -> int256: a: int256 = -1 b: uint256 = self.bar() return a """ c = get_contract(code) assert c.foo() == -1 def test_concat_buffer2(get_contract): # GHSA-2q8v-3gqq-4f8p code = """ i: immutable(int256) @deploy def __init__(): i = -1 s: String[2] = concat("a", "b") @external def foo() -> int256: return i """ c = get_contract(code) assert c.foo() == -1 def test_concat_buffer3(get_contract): # GHSA-2q8v-3gqq-4f8p code = """ s: String[1] s2: String[33] s3: String[34] @deploy def __init__(): self.s = "a" self.s2 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" # 33*'a' @internal def bar() -> uint256: self.s3 = concat(self.s, self.s2) return 1 @external def foo() -> int256: i: int256 = -1 b: uint256 = self.bar() return i """ c = get_contract(code) assert c.foo() == -1 def test_concat_bytes32(get_contract): test_concat_bytes32 = """ @external def sandwich(inp: Bytes[100], inp2: bytes32) -> Bytes[164]: return concat(inp2, inp, inp2) @external def fivetimes(inp: bytes32) -> Bytes[160]: return concat(inp, inp, inp, inp, inp) """ c = get_contract(test_concat_bytes32) assert c.sandwich(b"cow", b"\x35" * 32) == b"\x35" * 32 + b"cow" + b"\x35" * 32, c.sandwich( b"cow", b"\x35" * 32 ) # noqa: E501 assert c.sandwich(b"", b"\x46" * 32) == b"\x46" * 64 assert c.sandwich(b"\x57" * 95, b"\x57" * 32) == b"\x57" * 159 assert c.sandwich(b"\x57" * 96, b"\x57" * 32) == b"\x57" * 160 assert c.sandwich(b"\x57" * 97, b"\x57" * 32) == b"\x57" * 161 assert c.fivetimes(b"mongoose" * 4) == b"mongoose" * 20 print("Passed concat bytes32 test") def test_konkat_code(get_contract): konkat_code = """ ecks: bytes32 @external def foo(x: bytes32, y: bytes32) -> Bytes[64]: self.ecks = x return concat(self.ecks, y) @external def goo(x: bytes32, y: bytes32) -> Bytes[64]: self.ecks = x return concat(self.ecks, y) @external def hoo(x: bytes32, y: bytes32) -> Bytes[64]: return concat(x, y) """ c = get_contract(konkat_code) assert c.foo(b"\x35" * 32, b"\x00" * 32) == b"\x35" * 32 + b"\x00" * 32 assert c.goo(b"\x35" * 32, b"\x00" * 32) == b"\x35" * 32 + b"\x00" * 32 assert c.hoo(b"\x35" * 32, b"\x00" * 32) == b"\x35" * 32 + b"\x00" * 32 print("Passed second concat tests") def test_small_output(get_contract): code = """ @external def small_output(a: String[5], b: String[4]) -> String[9]: c: String[9] = concat(a, b) return c """ c = get_contract(code) assert c.small_output("abcde", "fghi") == "abcdefghi" assert c.small_output("", "") == "" def test_small_bytes(get_contract): # TODO maybe use parametrization or hypothesis for the examples code = """ @external def small_bytes1(a: bytes1, b: Bytes[2]) -> Bytes[3]: return concat(a, b) @external def small_bytes2(a: Bytes[1], b: bytes2) -> Bytes[3]: return concat(a, b) @external def small_bytes3(a: bytes4, b: bytes32) -> Bytes[36]: return concat(a, b) @external def small_bytes4(a: bytes8, b: Bytes[32], c: bytes8) -> Bytes[48]: return concat(a, b, c) """ contract = get_contract(code) i = 0 def bytes_for_len(n): nonlocal i # bytes constructor with state # (so we don't keep generating the same string) xs = [] for _ in range(n): i += 1 i %= 256 xs.append(i) return bytes(xs) a, b = bytes_for_len(1), bytes_for_len(2) assert contract.small_bytes1(a, b) == a + b a, b = bytes_for_len(1), bytes_for_len(1) assert contract.small_bytes1(a, b) == a + b a, b = bytes_for_len(1), bytes_for_len(2) assert contract.small_bytes2(a, b) == a + b a, b = b"", bytes_for_len(2) assert contract.small_bytes2(a, b) == a + b a, b = bytes_for_len(4), bytes_for_len(32) assert contract.small_bytes3(a, b) == a + b a, b, c = bytes_for_len(8), bytes_for_len(32), bytes_for_len(8) assert contract.small_bytes4(a, b, c) == a + b + c a, b, c = bytes_for_len(8), bytes_for_len(1), bytes_for_len(8) assert contract.small_bytes4(a, b, c) == a + b + c a, b, c = bytes_for_len(8), bytes_for_len(0), bytes_for_len(8) assert contract.small_bytes4(a, b, c) == a + b + c ```
```shell Clear the terminal instantly Adding directories to your `$PATH` Conditional command execution (`&&` operator) `else` statements using the `||` operator Sequential execution using the `;` statement separator ```
Thliptoceras umoremsugente is a moth in the family Crambidae. It was described by Hans Bänziger in 1987. It is found in Thailand. The wingspan is 22–24 mm. The forewings are light yellow to greyish yellow, with greyish shadows. Adult males have been observed sucking perspiration from the skin of humans and lachrymation (tears) at the eye of an elephant. It has also been observed sucking on blood droplets exuded by mosquitoes on elephants. Etymology The species name refers to one of its feeding habits, i.e. the sucking of body fluids. References Moths described in 1987 Pyraustinae
The California Hotel is a historic Oakland, California, hotel which opened in the early days of the Great Depression and became an important cultural center for the African-American community of San Francisco's East Bay during the 1940s, 50s and 60s. On June 30, 1988 the hotel was placed on the National Register of Historic Places. History The California Hotel opened its doors on May 18, 1930. A 5-story structure with mezzanine and penthouse, it was the tallest building in the area. It cost $265,000 to build the 150-room hotel with commercial space on the ground floor. Though situated 1 miles from Oakland's city center, the new hotel was within walking distance of the passenger stations for both the Santa Fe Railroad and the regional Key System streetcars. The hotel was located at 3501 San Pablo Avenue, near major highways, and passing traffic was increased in 1937 by the opening of the San Francisco–Oakland Bay Bridge. In 1962 construction of the elevated MacArthur Freeway blocked the street view of the hotel but made it visible to hundreds of thousands of bridge commuters. The hotel opened in difficult economic times. The hotel's first manager, Axel Bern, an experienced hotelier, was also an investor. Just four months after the grand opening, Bern was arrested and charged with disturbing the peace after a quarrel in the hotel's lobby. According to a story in the Oakland Tribune, Bern had reneged on his commitment to invest $35,000 into the hotel and had been relieved of his duties as general manager. However, Bern returned to work at the front desk on the day of his arrest. To attract the car driving public, the hotel's owners added a "motorists patio" in 1933, with a separate entrance from the parking area directly to the lobby. Next to the patio was a garage building, a service station and a repair shop. An advertisement in the 1943 Oakland City Directory described the hotel amenities as "commodious airy rooms, all with shower and tub baths, dining, banquet and meeting rooms, coffee shop and cocktail lounges, garage adjoining". During World War II, the hotel was known for the blues, jazz and similar 'race music' being played in its ground floor bars and ballrooms. African American patrons were denied rooms due to segregation, but they came in large numbers to hear the music. On January 16, 1953, new ownership took control, and the hotel ended its discrimination policies. A grand "reopening" was held with invited guests that included Oakland-born comedian Eddie "Rochester" Anderson, boxing champion Joe Louis and acclaimed singer Lena Horne. The hotel attracted many high profile black visitors to Oakland. At that time, it was the only full-service hotel that welcomed black people in the East Bay. The 1956 edition of The Negro Motorist Green Book also lists five smaller, less sophisticated Oakland hotels. African American entertainers who lodged and performed at the hotel included Big Mama Thornton, BB King, Lou Rawls, James Brown, Sam Cooke, Ray Charles and Richard Pryor. After the 1960s, the hotel, as with many dedicated African American institutions and businesses in the area, declined; black entertainers could now stay in any hotel, and patrons followed them to white-owned clubs and other venues. By the 1970s, the hotel was in bad condition and was boarded up. In the 1980s, it was repaired and rented out as subsidized housing. In 2012, a start was made on restoring the building and in 2014, after a renovation costing $43 million, it was once more opened as low-rental housing. References Historic hotels in the United States Hotels in the San Francisco Bay Area Buildings and structures in Oakland, California Music venues in the San Francisco Bay Area Residential buildings in Alameda County, California 1930 establishments in California Hotels established in 1930 Hotel buildings completed in 1930 African-American history in Oakland, California African-American segregation in the United States
```objective-c #pragma once #if defined(OS_LINUX) #include <linux/capability.h> namespace DB { /// Check that the current process has Linux capability. Examples: CAP_IPC_LOCK, CAP_NET_ADMIN. bool hasLinuxCapability(int cap); } #endif ```
```c /* * */ #define DT_DRV_COMPAT nuvoton_nct38xx_gpio_port #include "gpio_nct38xx.h" #include <zephyr/drivers/gpio/gpio_utils.h> #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/mfd/nct38xx.h> #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(gpio_ntc38xx, CONFIG_GPIO_LOG_LEVEL); /* Driver config */ struct gpio_nct38xx_port_config { /* gpio_driver_config needs to be first */ struct gpio_driver_config common; /* NCT38XX controller dev */ const struct device *mfd; /* GPIO port index */ uint8_t gpio_port; /* GPIO port 0 pinmux mask */ uint8_t pinmux_mask; }; /* Driver data */ struct gpio_nct38xx_port_data { /* gpio_driver_data needs to be first */ struct gpio_driver_data common; /* GPIO callback list */ sys_slist_t cb_list_gpio; /* lock NCT38xx register access */ struct k_sem *lock; /* I2C device for the MFD parent */ const struct i2c_dt_spec *i2c_dev; }; /* GPIO api functions */ static int gpio_nct38xx_pin_config(const struct device *dev, gpio_pin_t pin, gpio_flags_t flags) { const struct gpio_nct38xx_port_config *const config = dev->config; struct gpio_nct38xx_port_data *const data = dev->data; uint32_t mask; uint8_t new_reg; int ret; /* Don't support simultaneous in/out mode */ if (((flags & GPIO_INPUT) != 0) && ((flags & GPIO_OUTPUT) != 0)) { return -ENOTSUP; } /* Don't support "open source" mode */ if (((flags & GPIO_SINGLE_ENDED) != 0) && ((flags & GPIO_LINE_OPEN_DRAIN) == 0)) { return -ENOTSUP; } /* Don't support pull-up/pull-down */ if (((flags & GPIO_PULL_UP) != 0) || ((flags & GPIO_PULL_DOWN) != 0)) { return -ENOTSUP; } k_sem_take(data->lock, K_FOREVER); /* Pin multiplexing */ if (config->gpio_port == 0) { /* Set the mux control bit, but ensure the reserved fields * are cleared. Note that pinmux_mask contains the set * of non-reserved bits. */ new_reg = BIT(pin) & config->pinmux_mask; mask = BIT(pin) | ~config->pinmux_mask; ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_MUX_CONTROL, mask, new_reg); if (ret < 0) { goto done; } } /* Configure pin as input. */ if (flags & GPIO_INPUT) { /* Clear the direction bit to set as an input */ new_reg = 0; mask = BIT(pin); ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DIR(config->gpio_port), mask, new_reg); goto done; } /* Select open drain 0:push-pull 1:open-drain */ mask = BIT(pin); if (flags & GPIO_OPEN_DRAIN) { new_reg = mask; } else { new_reg = 0; } ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_OD_SEL(config->gpio_port), mask, new_reg); if (ret < 0) { goto done; } /* Set level 0:low 1:high */ if (flags & GPIO_OUTPUT_INIT_HIGH) { new_reg = mask; } else if (flags & GPIO_OUTPUT_INIT_LOW) { new_reg = 0; } ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DATA_OUT(config->gpio_port), mask, new_reg); if (ret < 0) { goto done; } /* Configure pin as output, if requested 0:input 1:output */ if (flags & GPIO_OUTPUT) { new_reg = BIT(pin); ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DIR(config->gpio_port), mask, new_reg); } done: k_sem_give(data->lock); return ret; } #ifdef CONFIG_GPIO_GET_CONFIG int gpio_nct38xx_pin_get_config(const struct device *dev, gpio_pin_t pin, gpio_flags_t *flags) { const struct gpio_nct38xx_port_config *const config = dev->config; struct gpio_nct38xx_port_data *const data = dev->data; uint32_t mask = BIT(pin); uint8_t reg; int ret; k_sem_take(data->lock, K_FOREVER); if (config->gpio_port == 0) { if (mask & (~config->common.port_pin_mask)) { ret = -ENOTSUP; goto done; } ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_MUX_CONTROL, &reg); if (ret < 0) { goto done; } if ((mask & config->pinmux_mask) && (mask & (~reg))) { *flags = GPIO_DISCONNECTED; goto done; } } ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DIR(config->gpio_port), &reg); if (ret < 0) { goto done; } if (reg & mask) { /* Output */ *flags = GPIO_OUTPUT; /* 0 - push-pull, 1 - open-drain */ ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_OD_SEL(config->gpio_port), &reg); if (ret < 0) { goto done; } if (mask & reg) { *flags |= GPIO_OPEN_DRAIN; } /* Output value */ ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DATA_OUT(config->gpio_port), &reg); if (ret < 0) { goto done; } if (mask & reg) { *flags |= GPIO_OUTPUT_HIGH; } else { *flags |= GPIO_OUTPUT_LOW; } } else { /* Input */ *flags = GPIO_INPUT; } done: k_sem_give(data->lock); return ret; } #endif /* CONFIG_GPIO_GET_CONFIG */ static int gpio_nct38xx_port_get_raw(const struct device *dev, gpio_port_value_t *value) { int ret; const struct gpio_nct38xx_port_config *const config = dev->config; struct gpio_nct38xx_port_data *const data = dev->data; k_sem_take(data->lock, K_FOREVER); ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DATA_IN(config->gpio_port), (uint8_t *)value); k_sem_give(data->lock); return ret; } static int gpio_nct38xx_port_set_masked_raw(const struct device *dev, gpio_port_pins_t mask, gpio_port_value_t value) { const struct gpio_nct38xx_port_config *const config = dev->config; struct gpio_nct38xx_port_data *const data = dev->data; int ret; k_sem_take(data->lock, K_FOREVER); ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DATA_OUT(config->gpio_port), mask, value); k_sem_give(data->lock); return ret; } static int gpio_nct38xx_port_set_bits_raw(const struct device *dev, gpio_port_pins_t mask) { const struct gpio_nct38xx_port_config *const config = dev->config; struct gpio_nct38xx_port_data *const data = dev->data; int ret; k_sem_take(data->lock, K_FOREVER); ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DATA_OUT(config->gpio_port), mask, mask); k_sem_give(data->lock); return ret; } static int gpio_nct38xx_port_clear_bits_raw(const struct device *dev, gpio_port_pins_t mask) { const struct gpio_nct38xx_port_config *const config = dev->config; struct gpio_nct38xx_port_data *const data = dev->data; int ret; k_sem_take(data->lock, K_FOREVER); ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DATA_OUT(config->gpio_port), mask, 0); k_sem_give(data->lock); return ret; } static int gpio_nct38xx_port_toggle_bits(const struct device *dev, gpio_port_pins_t mask) { const struct gpio_nct38xx_port_config *const config = dev->config; struct gpio_nct38xx_port_data *const data = dev->data; uint8_t reg, new_reg; int ret; k_sem_take(data->lock, K_FOREVER); ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DATA_OUT(config->gpio_port), &reg); if (ret < 0) { goto done; } new_reg = reg ^ mask; if (new_reg != reg) { ret = i2c_reg_write_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DATA_OUT(config->gpio_port), new_reg); } done: k_sem_give(data->lock); return ret; } static int gpio_nct38xx_pin_interrupt_configure(const struct device *dev, gpio_pin_t pin, enum gpio_int_mode mode, enum gpio_int_trig trig) { const struct gpio_nct38xx_port_config *const config = dev->config; struct gpio_nct38xx_port_data *const data = dev->data; uint8_t new_reg, new_rise, new_fall; int ret; uint32_t mask = BIT(pin); k_sem_take(data->lock, K_FOREVER); /* Disable irq before configuring them */ new_reg = 0; ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_ALERT_MASK(config->gpio_port), mask, new_reg); /* Configure and enable interrupt? */ if (mode == GPIO_INT_MODE_DISABLED) { goto done; } /* set edge register */ if (mode == GPIO_INT_MODE_EDGE) { if (trig == GPIO_INT_TRIG_LOW) { new_rise = 0; new_fall = mask; } else if (trig == GPIO_INT_TRIG_HIGH) { new_rise = mask; new_fall = 0; } else if (trig == GPIO_INT_TRIG_BOTH) { new_rise = mask; new_fall = mask; } else { LOG_ERR("Invalid interrupt trigger type %d", trig); return -EINVAL; } } else { /* level mode */ new_rise = 0; new_fall = 0; } ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_ALERT_RISE(config->gpio_port), mask, new_rise); if (ret < 0) { goto done; } ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_ALERT_FALL(config->gpio_port), mask, new_fall); if (ret < 0) { goto done; } if (mode == GPIO_INT_MODE_LEVEL) { /* set active high/low */ if (trig == GPIO_INT_TRIG_LOW) { new_reg = 0; } else if (trig == GPIO_INT_TRIG_HIGH) { new_reg = mask; } else { LOG_ERR("Invalid interrupt trigger type %d", trig); ret = -EINVAL; goto done; } ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_ALERT_LEVEL(config->gpio_port), mask, new_reg); if (ret < 0) { goto done; } } /* Clear pending bit */ ret = i2c_reg_write_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_ALERT_STAT(config->gpio_port), mask); if (ret < 0) { goto done; } /* Enable it after configuration is completed */ new_reg = mask; ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_ALERT_MASK(config->gpio_port), mask, new_reg); done: k_sem_give(data->lock); return ret; } static int gpio_nct38xx_manage_callback(const struct device *dev, struct gpio_callback *callback, bool set) { struct gpio_nct38xx_port_data *const data = dev->data; return gpio_manage_callback(&data->cb_list_gpio, callback, set); } #ifdef CONFIG_GPIO_GET_DIRECTION static int gpio_nct38xx_port_get_direction(const struct device *dev, gpio_port_pins_t mask, gpio_port_pins_t *inputs, gpio_port_pins_t *outputs) { const struct gpio_nct38xx_port_config *const config = dev->config; struct gpio_nct38xx_port_data *const data = dev->data; uint8_t dir_reg; int ret; k_sem_take(data->lock, K_FOREVER); if (config->gpio_port == 0) { uint8_t enabled_gpios; /* Remove the disabled GPIOs from the mask */ ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_MUX_CONTROL, &enabled_gpios); mask &= (enabled_gpios & config->common.port_pin_mask); if (ret < 0) { goto done; } } /* Read direction register, 0 - input, 1 - output */ ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DIR(config->gpio_port), &dir_reg); if (ret < 0) { goto done; } if (inputs) { *inputs = mask & (~dir_reg); } if (outputs) { *outputs = mask & dir_reg; } done: k_sem_give(data->lock); return ret; } #endif /* CONFIG_GPIO_GET_DIRECTION */ int gpio_nct38xx_dispatch_port_isr(const struct device *dev) { const struct gpio_nct38xx_port_config *const config = dev->config; struct gpio_nct38xx_port_data *const data = dev->data; uint8_t alert_pins, mask; int ret; do { k_sem_take(data->lock, K_FOREVER); ret = i2c_reg_read_byte_dt( data->i2c_dev, NCT38XX_REG_GPIO_ALERT_STAT(config->gpio_port), &alert_pins); if (ret < 0) { k_sem_give(data->lock); return ret; } ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_ALERT_MASK(config->gpio_port), &mask); if (ret < 0) { k_sem_give(data->lock); return ret; } alert_pins &= mask; if (alert_pins) { ret = i2c_reg_write_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_ALERT_STAT(config->gpio_port), alert_pins); if (ret < 0) { k_sem_give(data->lock); return ret; } } k_sem_give(data->lock); gpio_fire_callbacks(&data->cb_list_gpio, dev, alert_pins); /* * Vendor defined alert is generated if at least one STATn bit * changes from 0 to 1. We should guarantee the STATn bit is * clear to 0 before leaving isr. */ } while (alert_pins); return 0; } static const struct gpio_driver_api gpio_nct38xx_driver = { .pin_configure = gpio_nct38xx_pin_config, #ifdef CONFIG_GPIO_GET_CONFIG .pin_get_config = gpio_nct38xx_pin_get_config, #endif /* CONFIG_GPIO_GET_CONFIG */ .port_get_raw = gpio_nct38xx_port_get_raw, .port_set_masked_raw = gpio_nct38xx_port_set_masked_raw, .port_set_bits_raw = gpio_nct38xx_port_set_bits_raw, .port_clear_bits_raw = gpio_nct38xx_port_clear_bits_raw, .port_toggle_bits = gpio_nct38xx_port_toggle_bits, .pin_interrupt_configure = gpio_nct38xx_pin_interrupt_configure, .manage_callback = gpio_nct38xx_manage_callback, #ifdef CONFIG_GPIO_GET_DIRECTION .port_get_direction = gpio_nct38xx_port_get_direction, #endif /* CONFIG_GPIO_GET_DIRECTION */ }; static int gpio_nct38xx_port_init(const struct device *dev) { const struct gpio_nct38xx_port_config *const config = dev->config; struct gpio_nct38xx_port_data *const data = dev->data; if (!device_is_ready(config->mfd)) { LOG_ERR("%s is not ready", config->mfd->name); return -ENODEV; } data->lock = mfd_nct38xx_get_lock_reference(config->mfd); data->i2c_dev = mfd_nct38xx_get_i2c_dt_spec(config->mfd); return 0; } /* NCT38XX GPIO port driver must be initialized after NCT38XX GPIO driver */ BUILD_ASSERT(CONFIG_GPIO_NCT38XX_PORT_INIT_PRIORITY > CONFIG_GPIO_NCT38XX_INIT_PRIORITY); #define GPIO_NCT38XX_PORT_DEVICE_INSTANCE(inst) \ static const struct gpio_nct38xx_port_config gpio_nct38xx_port_cfg_##inst = { \ .common = {.port_pin_mask = GPIO_PORT_PIN_MASK_FROM_DT_INST(inst) & \ DT_INST_PROP(inst, pin_mask)}, \ .mfd = DEVICE_DT_GET(DT_INST_GPARENT(inst)), \ .gpio_port = DT_INST_REG_ADDR(inst), \ .pinmux_mask = COND_CODE_1(DT_INST_NODE_HAS_PROP(inst, pinmux_mask), \ (DT_INST_PROP(inst, pinmux_mask)), (0)), \ }; \ BUILD_ASSERT( \ !(DT_INST_REG_ADDR(inst) == 0 && !(DT_INST_NODE_HAS_PROP(inst, pinmux_mask))), \ "Port 0 should assign pinmux_mask property."); \ static struct gpio_nct38xx_port_data gpio_nct38xx_port_data_##inst; \ DEVICE_DT_INST_DEFINE(inst, gpio_nct38xx_port_init, NULL, &gpio_nct38xx_port_data_##inst, \ &gpio_nct38xx_port_cfg_##inst, POST_KERNEL, \ CONFIG_GPIO_NCT38XX_PORT_INIT_PRIORITY, &gpio_nct38xx_driver); DT_INST_FOREACH_STATUS_OKAY(GPIO_NCT38XX_PORT_DEVICE_INSTANCE) ```
```c /* $OpenBSD: etc.c,v 1.8 2019/12/17 17:16:32 guenther Exp $ */ /* Public Domain */ #include <sys/types.h> #include <err.h> #include <stdlib.h> #include <string.h> #include "ld.h" #define OOM_MSG "Out of memory" __dead void _dl_oom(void) { err(1, OOM_MSG); } char * xstrdup(const char *s) { char *ptr; if ((ptr = strdup(s)) == NULL) err(1, OOM_MSG); return (ptr); } void * xmalloc(size_t size) { void *ptr; if ((ptr = malloc(size)) == NULL) err(1, OOM_MSG); return (ptr); } void * xrealloc(void *ptr, size_t size) { void *nptr; if ((nptr = realloc(ptr, size)) == NULL) err(1, OOM_MSG); return (nptr); } void * xcalloc(size_t nmemb, size_t size) { void *ptr; ptr = calloc(nmemb, size); if (ptr == NULL) err(1, OOM_MSG); return ptr; } char * concat(const char *s1, const char *s2, const char *s3) { char *str; size_t len; len = strlen(s1) + strlen(s2) + strlen(s3) + 1; str = xmalloc(len); strlcpy(str, s1, len); strlcat(str, s2, len); strlcat(str, s3, len); return (str); } ```
3-pounder gun, 3-pounder, 3-pdr or QF 3-pdr is an abbreviation typically referring to a gun which fired a projectile weighing approximately 3 pounds. It may refer to: The Grasshopper cannon – of the 18th century QF 3-pounder Hotchkiss – Hotchkiss 47 mm naval gun used by many countries from 1885 QF 3-pounder Nordenfelt – Nordenfelt 47 mm naval gun used by many countries from 1885 QF 3-pounder Vickers – British Vickers 47 mm naval gun of World War I and World War II OQF 3-pounder gun – used to arm interwar Vickers Medium Tanks See also :Category:47 mm artillery
```c #include <stdio.h> #include "genlib.h" #include "simpio.h" int even(int n); int main(void) { int n, sum; int ri, looptimes; looptimes = GetInteger(); for (ri = 1; ri <= looptimes; ++ri) { sum = 0; while ((n = GetInteger()) > 0) { if (!even(n)) { sum += n; } } printf("The sum of the odd numbers is %d.\n", sum); } } int even(int n) { return n - n / 2 * 2 == 0; } ```
The Milton Historic District is a national historic district that is located in Milton, Northumberland County, Pennsylvania. It was added to the National Register of Historic Places in 1986. History and architectural features This historic district encompasses 719 contributing buildings that are located in the central business district and surrounding residential areas of Milton. The buildings mostly date from the 1880s to the early twentieth century; older buildings were largely lost due to a fire in 1880 and floods in 1972 and 1977. Residential buildings were designed in a variety of architectural styles including Colonial Revival, Bungalow / American Craftsman, Queen Anne, and Richardsonian Romanesque. Notable buildings include two surviving Federal style stone houses at 355 S. Front and 37 W. 4th, the Methodist Episcopal Church (1882), the First Presbyterian Church (1882), the Hotel Milton, a former Elk's Home, the Sears Roebuck Building, a former Dreifuss Brothers Store, the Stetler Hotel, the Milton Water Company Building (1890), the Milton National Bank/Public Library, the Masonic Temple (1930), the U.S. Post Office, a former Shimer Corporation works, the Pennsylvania and Reading Freight Station, the YMCA building, and the Reid Tobacco Company building. It was added to the National Register of Historic Places in 1986. Gallery References Historic districts on the National Register of Historic Places in Pennsylvania Buildings and structures in Northumberland County, Pennsylvania National Register of Historic Places in Northumberland County, Pennsylvania
The 2021 Rhythmic Gymnastics European Championships was the 37th edition of the Rhythmic Gymnastics European Championships, which took place on 9–13 June 2021 at the Palace of Culture and Sports in Varna, Bulgaria. Participating countries Updated on June 8th 2021. Competition schedule Wednesday June 9 10:00–11:40 Junior groups qualification & AA ranking (5 Balls, 5 Ribbons – SET A 1-12) 11:55–13:35 Junior groups qualification & AA ranking (5 Balls, 5 Ribbons – SET B 13-24) 18:30–19:00 Opening Ceremony 19:00–19:40 Junior groups 5 Balls Final 19:55–20:35 Junior groups 5 Ribbons Final 20:35–20:50 Award ceremony Junior groups All-Around 20:50–21:05 Award ceremony Junior groups Apparatus Final Thursday June 10 10:00–12:00 Set A Senior Individuals qualifications (hoop & ball) 12:15–14:15 Set B Senior Individuals qualifications (hoop & ball) 15:15–17:15 Set C Senior Individuals qualifications (hoop & ball) 17:30–19:30 Set D Senior Individuals qualifications (hoop & ball) Friday June 11 10:00–12:00 Set C Senior Individuals qualifications (clubs & ribbon) 12:15–14:15 Set D Senior Individuals qualifications (clubs & ribbon) 15:15-17:15 Set A Senior Individuals qualifications (clubs & ribbon) 17:30–19:30 Set B Senior Individuals qualifications (clubs & ribbon) Saturday June 12 10:00–12:25 Senior Individuals AA Final (hoop, ball, clubs, ribbon – SET A) 12:40–15:05 Senior Individuals AA Final (hoop, ball, clubs, ribbon –SET B) 15:05–15:20 Award Ceremony AA Seniors Individuals 16:30-18:00 Senior Groups (5 balls and 3 hoops & 2 pairs of clubs – SET A) 18:15–19:40 Senior Groups (5 balls and 3 hoops & 2 pairs of clubs – SET B) 19:40–19:55 Award Ceremony AA Senior Groups 19:55–20:10 Award Ceremony Team (Senior Individuals and Senior Groups) Sunday June 13 10:00–11:05 Senior Individuals Hoop & Ball Finals 11:10–12:15 Senior Individuals Clubs & Ribbon Finals 12:15-12:30 Award Ceremony Senior Individual Apparatus finals 13:00–13:40 Senior Groups 5 Balls Final 13:45–14:25 Senior Groups 3 Hoops + 4 Clubs Final 14:25–15:00 Award Ceremony Senior Groups Apparatus finals Source: Medal winners Results Team Senior Individual All-Around Hoop Ball Clubs Ribbon Junior Group All-Around 5 Balls 5 Ribbons Senior Group All-Around 5 Balls 3 Hoops + 4 Clubs Medal count References Rhythmic Gymnastics European Championships European Rhythmic Gymnastics Championships International gymnastics competitions hosted by Bulgaria Rhythmic Gymnastics European Championships Sport in Varna, Bulgaria Rhythmic
Tony Fletcher (born 27 April 1964) is a British music journalist best known for his biographies of drummer Keith Moon and the band R.E.M., and also as a show director for the Rock Academy in Woodstock. Jamming! Born in Yorkshire, England, Fletcher was inspired by the London punk rock movement and started a fanzine as a thirteen-year-old schoolboy which he named Jamming!. Founded in 1977, the magazine began as a school-printed fanzine and in 1978, with the fifth issue featuring interviews with Paul Weller, Adam Ant and John Peel, adopted professional printing and wider distribution. From 1979-84, it was printed and partly distributed by Better Badges. Between 1978-83, Jamming! featured interviews with a range of artists that included Pete Townshend, Aztec Camera, Dexys Midnight Runners, the Damned, Delta 5, the Jam, Bill Nelson, Scritti Politti, the Selecter, the Beat, Dead Kennedys and more. In September 1983, Jamming! went bi-monthly, and later monthly. Artists featured in this later phase included the Smiths, U2, Billy Bragg, Julian Cope, Lloyd Cole, the Cocteau Twins, Echo and the Bunnymen, R.E.M., the Specials, Everything But the Girl, Madness, and more. In January 1986, after 36 issues, the magazine shut down. Media career His success with Jamming! led Fletcher to more opportunities, starting with a major published interview with Paul McCartney in 1982. He presented TV programmes, including The Tube, where he interviewed Wham! in 1983, and networked with post-punk figures including Paul Weller and Echo & the Bunnymen, the latter being the subject of his first book, published in 1987. Fletcher also juggled band and record label management, before moving to New York City in the late 1980s. Fletcher produced and co-hosted 2019's It's a Pixies Podcast, which broke new ground by unveiling the recording process of Pixies' then upcoming album Beneath the Eyrie before it had been released. In 2020, Fletcher also launched the fitness and travel podcast One Step Beyond, inspired by spending most of 2016 traveling around the world with his then-wife and 11 year old son. New York In New York, Fletcher established himself as a DJ, club promoter and music industry consultant, all the while settling down as a serious scholar of contemporary music history, authoring a guide to the music of the Clash, plus major biographies of R.E.M. and Keith Moon. With the advent of the Internet in the 1990s, Fletcher returned to topical writing, with his ijamming.net website, adding wine to his musical interests. In 2010, he published a study on the musical history of New York City in the 20th century. His biography of the Smiths, A Light That Never Goes Out: The Enduring Saga of the Smiths, was published in September 2012. On 4 July 2013, William Heinemann published Fletcher's memoir, Boy About Town about his youth in London. He is currently a show director at the Rock Academy in Woodstock. Personal life Fletcher has two children and was married to Posie Strenz. He lives in upstate New York. He became a vegetarian and later a vegan inspired by the 1985 album Meat Is Murder. Books Never Stop: The Echo and the Bunnymen Story Remarks Remade - The Story of R.E.M. Dear Boy: The Life of Keith Moon (published in the United Kingdom; American title is Moon (The Life and Death of a Rock Legend)) Hedonism - A Novel The Clash: An Essential Guide to Their Music All Hopped Up and Ready to Go: Music from the Streets of New York 1927-77 A Light That Never Goes Out: The Enduring Saga of the Smiths (2012) Boy About Town (2013) In the Midnight Hour: The Life and Soul of Wilson Pickett (2017) Knock! Knock! Knock! on Wood: My Life in Soul (2020) The Best of Jamming! Selections and Stories from the Fanzine That Grew Up, 1977–86 (2021) References External links Tony Fletcher's iJamming! website Author biography at amazon.com 1964 births Living people English biographers English music journalists 20th-century English novelists 21st-century English novelists Journalists from Yorkshire English male novelists 20th-century English male writers 21st-century English male writers English male non-fiction writers Male biographers
Juf () is a village in the municipality of Avers in the canton of Grisons, Switzerland. At above sea level, it is historically the highest village with permanent residents in Western Europe, as well as one of its coldest localities. The Russians view the Dagestani aul of Kurush (ca. 2500 m. above sea level) as the highest inhabited village in Eastern Europe. As of 2016, Juf had a population of 31 inhabitants divided between six families in a concentrated settlement. They were 20 in 1991 and 30 in 2001. The first inhabitants were immigrant Walser who arrived in 1292. Geography and climate Juf is located just above the right banks of the river Jufer Rhein, before its confluence with the Bergalgabach, both forming the Avers Rhine. The small Jufer Rhein valley is enclosed by several summits over 3,000 metre-high, the highest being Mazzaspitz, Piz Piot and Piz Turba. The valley is almost entirely above 2,000 metres. Juf differs from settlements in lower valleys in being well above the tree line, the nearest forest being about 5 kilometres away from the village. As a result, the area experiences a cold and wet climate, classified as an alpine tundra climate (ET), with average temperatures far lower than those of La Brévine, traditionally considered the coldest inhabited place in Switzerland. Snowfalls are possible even during summer. Wood was transported for building houses and stables, but historically, dry dung fuel from the inhabitants’ animals was burned for fuel. Old structures for drying manure can still be seen on the southern ends of some Juf stables. Juf is composed of two distinct sections: the highest (2,126 m), at the village entry, and the lowest (2,117 m), at the end of the paved road and near the river. Transport Despite its remote location, Juf can be reached by public transport eight times a day all year round, as all post buses running to the high valley of Avers go on to the very end of the road at Juf. It is nevertheless a very remote valley, its infrastructure designed primarily to encourage tourism (two platter lifts for skiing in winter at nearby Juppa), and has been spared the technical installations, such as power lines or tourist resorts, which might otherwise ruin its "pristine beauty". Note Another source gives the title of Europe's highest village to Li Baita, a part of Trepalle, Italy, however without mentioning the number of residents. Just above Juf is an old farmhouse, the Platten-hof, birthplace of writer Johann Rudolf Stoffel. This is considered the highest farmhouse in Europe. See also Extreme points of Switzerland References External links Village visit is elevating experience swissworld.org Avers Villages in Graubünden
The 1856 United States presidential election in Vermont took place on November 4, 1856, as part of the 1856 United States presidential election. Voters chose five representatives, or electors to the Electoral College, who voted for president and vice president. Vermont voted for the Republican candidate, John C. Frémont, over the Democratic candidate, James Buchanan, and the Know Nothing candidate, Millard Fillmore. Frémont won the state by a margin of 57.12%. With 77.96% of the popular vote, Vermont would be his strongest victory in the Union in terms of percentage in the popular vote. Frémont's victory also started the 104 year long streak of Republican presidential candidate victories within the Green Mountain State, which would last for 27 consecutive presidential elections from 1856 through 1960—as of 2020, still tied with Georgia from 1852 to 1960 for the most of any state. A Democratic presidential candidate would not win Vermont until Lyndon B. Johnson won the state against Barry Goldwater 108 years later in 1964. Results See also United States presidential elections in Vermont References Vermont 1856 1856 Vermont elections
```sourcepawn .. list-table:: :header-rows: 1 :widths: 20 10 20 20 20 * - CPU - DTIM - (mA) - (mA) - (mA) * - 160 MHz - 1 - 0.919 - 103.149 - 0.053 * - 160 MHz - 3 - 0.368 - 102.428 - 0.052 * - 160 MHz - 10 - 0.172 - 102.087 - 0.052 ```
The Infanteriegewehr Modell 1842 () was one of the first standardised service rifles used by the Swiss armed forces. It was introduced in 1842 as a result of a decision by the authorities of the Old Swiss Confederacy to standardise the weapons of the then still separate armies of the Swiss Cantons. The weapon was refitted in 1859 (T.59) and again in 1867 (T.67) with a Milbank-Amsler receiver system to convert it to a breech loader. Some weapons were also retrofitted with rifled barrels in the 1860s. References External links Data and pictures regarding the 1867 breechloader conversion on militaryrifles.com Rifles of Switzerland Early rifles Muzzleloaders Hinged breechblock rifles
```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. # The bookshelf service provides a load-balancing proxy over the bookshelf # frontend pods. By specifying the type as a 'LoadBalancer', Kubernetes Engine # will create an external HTTP load balancer. # For more information about Services see: # path_to_url # For more information about external HTTP load balancing see: # path_to_url apiVersion: v1 kind: Service metadata: name: bookshelf-frontend labels: app: bookshelf tier: frontend spec: type: LoadBalancer ports: - port: 80 targetPort: http-server selector: app: bookshelf tier: frontend ```
```objective-c #ifndef _GUISLICE_CONFIG_LINUX_H_ #define _GUISLICE_CONFIG_LINUX_H_ // ============================================================================= // GUIslice library (example user configuration) for: // - CPU: LINUX Raspberry Pi (RPi) // - Display: PiTFT // - Touch: SDL // - Wiring: None // // DIRECTIONS: // - To use this example configuration, include in "GUIslice_config.h" // // WIRING: // - None // // ============================================================================= // - Calvin Hass // - path_to_url // ============================================================================= // // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // // ============================================================================= // \file GUIslice_config_linux.h // ============================================================================= // User Configuration // - This file can be modified by the user to match the // intended target configuration // ============================================================================= #ifdef __cplusplus extern "C" { #endif // __cplusplus // ============================================================================= // USER DEFINED CONFIGURATION // ============================================================================= // your_sha256_hash------------- // SECTION 1: Device Mode Selection // - The following defines the display and touch drivers // and should not require modifications for this example config // your_sha256_hash------------- #define DRV_DISP_SDL2 // LINUX SDL 2.0 #define DRV_TOUCH_SDL // LINUX: Use SDL touch driver // your_sha256_hash------------- // SECTION 2: Pinout // your_sha256_hash------------- // your_sha256_hash------------- // SECTION 3: Orientation // your_sha256_hash------------- // Set Default rotation of the display // - Values 0,1,2,3. Rotation is clockwise // NOTE: The GSLC_ROTATE feature is not yet supported in SDL mode // however, the following settings are provided for future use. #define GSLC_ROTATE 1 // your_sha256_hash------------- // SECTION 4: Touch Handling // - Documentation for configuring touch support can be found at: // path_to_url // your_sha256_hash------------- // your_sha256_hash------------- // SECTION 5: Diagnostics // your_sha256_hash------------- // Error reporting // - Set DEBUG_ERR to >0 to enable error reporting via the Serial connection // - Enabling DEBUG_ERR increases FLASH memory consumption which may be // limited on the baseline Arduino (ATmega328P) devices. // - DEBUG_ERR 0 = Disable all error messaging // - DEBUG_ERR 1 = Enable critical error messaging (eg. init) // - DEBUG_ERR 2 = Enable verbose error messaging (eg. bad parameters, etc.) // - For baseline Arduino UNO, recommended to disable this after one has // confirmed basic operation of the library is successful. #define DEBUG_ERR 1 // 1,2 to enable, 0 to disable // Debug initialization message // - By default, GUIslice outputs a message in DEBUG_ERR mode // to indicate the initialization status, even during success. // - To disable the messages during successful initialization, // uncomment the following line. //#define INIT_MSG_DISABLE // your_sha256_hash------------- // SECTION 6: Optional Features // your_sha256_hash------------- // Enable of optional features // - For memory constrained devices such as Arduino, it is best to // set the following features to 0 (to disable) unless they are // required. #define GSLC_FEATURE_COMPOUND 1 // Compound elements (eg. XSelNum) #define GSLC_FEATURE_XTEXTBOX_EMBED 0 // XTextbox control with embedded color #define GSLC_FEATURE_INPUT 1 // Keyboard / GPIO input control // Enable support for SD card // - Set to 1 to enable, 0 to disable // - Note that the inclusion of the SD library consumes considerable // RAM and flash memory which could be problematic for Arduino models // with limited resources. // - NOTE: Mode not supported in LINUX #define GSLC_SD_EN 0 // ============================================================================= // SECTION 10: INTERNAL CONFIGURATION // - The following settings should not require modification by users // ============================================================================= // your_sha256_hash------------- // Touch Handling // your_sha256_hash------------- // Touch Driver-specific additional configuration #define DRV_TOUCH_IN_DISP // Use the display driver (SDL) for touch events // Define the maximum number of touch events that are handled // per gslc_Update() call. Normally this can be set to 1 but certain // displays may require a greater value (eg. 30) in order to increase // responsiveness of the touch functionality. #define GSLC_TOUCH_MAX_EVT 1 // your_sha256_hash------------- // Misc // your_sha256_hash------------- // Enable support for graphics clipping (DrvSetClipRect) // - Note that this will impact performance of drawing graphics primitives //#define GSLC_CLIP_EN 1 // Enable for bitmap transparency and definition of color to use #define GSLC_BMP_TRANS_EN 1 // 1 = enabled, 0 = disabled #define GSLC_BMP_TRANS_RGB 0xFF,0x00,0xFF // RGB color (default: MAGENTA) #define GSLC_USE_FLOAT 1 // 1=Use floating pt library, 0=Fixed-point lookup tables // Define default device paths for framebuffer & touchscreen // - The following assumes display driver (eg. fbtft) reads from fb1 // - Raspberry Pi can support hardware acceleration onto fb0 // - To use SDL2.0 with hardware acceleration with such displays, // use fb0 as the target and then run fbcp to mirror fb0 to fb1 #define GSLC_DEV_FB "/dev/fb0" #define GSLC_DEV_TOUCH "" #define GSLC_DEV_VID_DRV "x11" // Enable SDL startup workaround? (1 to enable, 0 to disable) #define DRV_SDL_FIX_START 0 // Show SDL mouse (1 to show, 0 to hide) #define DRV_SDL_MOUSE_SHOW 0 // Enable hardware acceleration #define DRV_SDL_RENDER_ACCEL 1 #define GSLC_USE_PROGMEM 0 #define GSLC_LOCAL_STR 1 // 1=Use local strings (in element array), 0=External #define GSLC_LOCAL_STR_LEN 30 // Max string length of text elements // your_sha256_hash------------- // Debug diagnostic modes // your_sha256_hash------------- // - Uncomment any of the following to enable specific debug modes //#define DBG_LOG // Enable debugging log output //#define DBG_TOUCH // Enable debugging of touch-presses //#define DBG_FRAME_RATE // Enable diagnostic frame rate reporting //#define DBG_DRAW_IMM // Enable immediate rendering of drawing primitives //#define DBG_DRIVER // Enable graphics driver debug reporting // ============================================================================= #ifdef __cplusplus } #endif // __cplusplus #endif // _GUISLICE_CONFIG_LINUX_H_ ```
Keita Sunama (砂間敬太, Sunama Keita, born 8 May 1995) is a Japanese swimmer. He won the bronze medal in the men's 200 metre backstroke at the 2018 Asian Games held in Jakarta, Indonesia. In 2019, he represented Japan at the World Aquatics Championships held in Gwangju, South Korea. He competed in the men's 200 metre backstroke event. He represented Japan at the 2020 Summer Olympics in Tokyo, Japan. He competed in the men's 200 metre backstroke event. References External links Living people 1995 births Place of birth missing (living people) Japanese male backstroke swimmers Swimmers at the 2018 Asian Games Medalists at the 2018 Asian Games Asian Games bronze medalists for Japan Asian Games medalists in swimming Swimmers at the 2020 Summer Olympics Olympic swimmers for Japan Universiade medalists in swimming Medalists at the 2015 Summer Universiade Universiade silver medalists for Japan Universiade bronze medalists for Japan 21st-century Japanese people
```java /* * one or more contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright ownership. */ package io.camunda.optimize.dto.optimize.query.variable; import static io.camunda.optimize.dto.optimize.ReportConstants.DEFAULT_TENANT_IDS; import com.fasterxml.jackson.annotation.JsonIgnore; import com.google.common.collect.Lists; import io.camunda.optimize.service.util.TenantListHandlingUtil; import jakarta.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class ProcessToQueryDto { @NotNull private String processDefinitionKey; private List<String> processDefinitionVersions = new ArrayList<>(); private List<String> tenantIds = new ArrayList<>(DEFAULT_TENANT_IDS); @JsonIgnore public void setProcessDefinitionVersion(final String processDefinitionVersion) { processDefinitionVersions = Lists.newArrayList(processDefinitionVersion); } public List<String> getTenantIds() { return TenantListHandlingUtil.sortAndReturnTenantIdList(tenantIds); } } ```
```python # 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 """Integration tests for Leaky ReLU""" import pytest import numpy as np import tvm from tvm import relay from tvm.testing import requires_ethosn from . import infrastructure as tei def _get_model(shape, input_zp, input_sc, output_zp, output_sc, dtype, alpha): x = relay.var("x", shape=shape, dtype=dtype) x = relay.qnn.op.dequantize( x, input_scale=relay.const(input_sc, "float32"), input_zero_point=relay.const(input_zp, "int32"), ) x = relay.nn.leaky_relu(x, alpha=alpha) return relay.qnn.op.quantize( x, output_scale=relay.const(output_sc, "float32"), output_zero_point=relay.const(output_zp, "int32"), out_dtype=dtype, ) @requires_ethosn @pytest.mark.parametrize("dtype", ["uint8", "int8"]) @pytest.mark.parametrize("shape", [(1, 52, 52, 3), (1, 3, 8, 2)]) @pytest.mark.parametrize("alpha", [0.001, 0.5678]) def test_leaky_relu(dtype, shape, alpha): """Compare Leaky ReLU output with TVM.""" np.random.seed(0) iinfo = np.iinfo(dtype) zp_min = iinfo.min zp_max = iinfo.max input_zp = zp_min + 128 input_sc = 0.0068132 output_zp = zp_min + 126 # values offset more than 126 can cause saturation output_sc = 0.0078125 inputs = {"x": tvm.nd.array(np.random.randint(zp_min, high=zp_max, size=shape, dtype=dtype))} outputs = [] for npu in [False, True]: model = _get_model(shape, input_zp, input_sc, output_zp, output_sc, dtype, alpha) mod = tei.make_module(model, []) outputs.append( tei.build_and_run( mod, inputs, 1, {}, npu=npu, additional_config_args={"inline_non_compute_intensive_partitions": False}, ) ) tei.verify(outputs, dtype, 1) @requires_ethosn @pytest.mark.parametrize("dtype", ["int8"]) @pytest.mark.parametrize("shape", [(1, 14, 14, 2)]) @pytest.mark.parametrize("alpha", [-1.34, 2.32, 1, 0]) def test_leaky_relu_unsupported_alpha(dtype, shape, alpha): """Test unsupported values of alpha (<= 0, >= 1) in Leaky ReLU.""" iinfo = np.iinfo(dtype) zp_min = iinfo.min err_msg = f"leaky relu alpha must be less than 1 and greater than 0, but was {alpha}" model = _get_model(shape, zp_min + 120, 0.0068132, zp_min + 128, 0.0078125, dtype, alpha) model = tei.make_ethosn_composite(model, "ethos-n.qnn_leaky_relu") mod = tei.make_ethosn_partition(model) tei.test_error(mod, {}, err_msg) ```
Capture the flag (CTF) is a traditional outdoor sport where two or more teams each have a flag (or other markers) and the objective is to capture the other team's flag, located at the team's "base" (or hidden or even buried somewhere in the territory), and bring it safely back to their own base. Enemy players can be "tagged" by players when out of their home territory and, depending on the rules, they may be out of the game, become members of the opposite team, be sent back to their own territory, be frozen in place, or be sent to "jail" until freed by a member of their own team. Overview Capture the Flag requires a playing field. In both indoor and outdoor versions, the field is divided into two clearly designated halves, known as territories. Players form two teams, one for each territory. Each side has a "flag", which is most often a piece of fabric, but can be any object small enough to be easily carried by a person (night time games might use flashlights, glowsticks or lanterns as the "flags"). Sometimes teams wear dark colors at night to make it more difficult for their opponents to see them. The objective of the game is for players to venture into the opposing team's territory, grab the flag, and return with it to their territory without being tagged. The flag is defended mainly by tagging opposing players who attempt to take it. Within their territory players are "safe", meaning that they cannot be tagged by opposing players. Once they cross into the opposing team's territory they are vulnerable to tagging. Rules for Capture the Flag appear in 1860 in the German gymnastic manual Lehr- und Handbuch der deutschen Turnkunst by Wilhelm Lübeck under the name Fahnenbarlauf. In the 19th century, Capture the Flag was not considered a distinct game, but a variation of the European game "Barlaufen" (Barlauf mit Fahnenraub), played in France and Germany. Descriptions of Capture the Flag in English appeared in the early 20th century, e. g. in "Scouting for Boys" written in 1908 by Robert Baden-Powell, the founder of the Scouting Movement, under the title "Flag Raiding". They also appeared in the 1920 Edition of "The Official Handbook for Boys" published by the Boy Scouts of America. The flag is usually placed in a visibly obvious location at the rear of a team's territory. In a more difficult version, the flag is hidden in a place where it can only be seen from certain angles. Capturing the flag also might require completing some challenge. For example, the flag could be hidden in the leaves up in a tall tree, and the players have to see the flag, then knock it out and bring it to their base. Jail The rules for jail vary from game to game and deal with what happens if a player is tagged in the other team's territory. Either each team can decide a designated area for the other team's players to go to when tagged, or a single jail can be used for both teams. When tagged, a player should be trusted to go to jail on their own, or should need to be escorted, depending on the game. Players can leave the jail after a certain time, for example three minutes, or can leave early if tagged by a teammate. Depending on the game, players can be released on the way to jail, or may have to be in jail before being released. Capturing the flag The rules for the handling of the flag also vary from game to game and deal mostly with the disposition of the flag after a failed attempt at capturing it. In one variant, after a player is tagged while carrying the flag, it is returned to its original place. In another variant, the flag is left in the location where the player was tagged. This latter variant makes offensive play easier, as the flag will tend, over the course of the game, to be moved closer to the dividing line between territories. In some games, it is possible for the players to throw the flag to teammates. As long as the flag stays in play without hitting the ground, the players are allowed to pass it. When the flag is captured by one player, they're not safe from being tagged, unless they trip. Sometimes, the flag holder may not be safe at all, even in their home territory, until they obtain both flags, thus ending the game. Their goal is to return to their own side or hand it off to a teammate who will then carry it to the other side. In most versions the flag may be handed off while running. The game is won when a player returns to their own territory with the enemy flag or both teams' flags. Also, rarely the flag carrier may not attempt to free any of their teammates from jail. Variants Alterations may include "one flag" Capture the Flag in which there is a defensive team and an offensive team, or games with three or more flags. In the case of the latter, one can only win when all flags are captured. Another variation is when the players put bandannas in their pockets with about six inches sticking out. Instead of tagging opponents, players must pull their opponent's bandanna out of their pocket. No matter where a player is when their bandanna is pulled, they're captured and must either go to jail or return to their base before returning to play. In this version there is no team territory, only a small base where the team's flag is kept. To win, one team must have both of the flags in their base. In some urban settings, the game is played indoors in an enclosed area with walls. There is also an area in the opposing ends for the flag to be placed in. In this urban variation legal checking as in hockey, including against the sideboards, is allowed. A player who commits a foul or illegal check is placed in a penalty box for a specified amount of time, depending on the severity of the foul. A player who deliberately injures an opponent is expelled from the rest of the game. Throwing the flag is allowed in this variation, as long as the flag is caught before it hits the ground. If the flag is thrown to a teammate but hits the ground before it can be caught, the flag is placed from the spot of the throw. If a player throws the flag, but is blocked or intercepted by a player from the opposing team, the flag is placed back at the base. New technologies have also led to a glow-in-the-dark version of Capture the Flag called Capture the Flag REDUX that includes two glowing orbs as the “flags,” color-coded LED bracelets to differentiate team members, and glowing jail markers. It is not uncommon for people to play airsoft, paintball, or Nerf variations of Capture the Flag. Typically there are no territories in these versions. Players who are "hit" must sit out a predetermined amount of time before returning to play (respawning). Stealing sticks "Stealing sticks" is a similar game played in the British Isles, the United States, and Australia. However, instead of a flag, a number of sticks or other items such as coats or hats are placed in a "goal" on the far end of each side of the playing field or area. As in Capture the Flag, players are sent to a "prison" if tagged on the opponents' side, and may be freed by teammates. Each player may only take one of their opponents' sticks at a time. The first team to take all of the opponents' sticks to their own side wins. Software and games In 1984, Scholastic published Bannercatch for the Apple II and Commodore 64 computers. An edutainment game with recognizable capture-the-flag mechanics, Bannercatch allows up to two humans (each alternating between two characters in the game world) to play capture the flag against an increasingly difficult team of four AI bots. Bannercatchs game world is divided into quadrants: home, enemy, and two "no-mans land" areas which hold the jails. A successful capture requires bringing the enemy flag into one team's "home" quadrant. Players can be captured when in an enemy territory, or in "no-mans land" while holding a flag. Captured players must be "rescued" from their designated jail by one of the other members of the team. Fallen flags remain where they dropped until a time-out period elapses, after which the flag returns to one of several starting locations in home territory. The 2D map also features walls, trees and a moving river, enabling a wide variety of strategies. Special locations in the play area allow humans to query the game state (such as flag status) using binary messages. In 1992, Richard Carr released an MS-DOS based game called Capture the Flag. It is a turn-based strategy game with real time network / modem play (or play-by-mail) based around the traditional outdoor game. The game required players to merely move one of their characters onto the same square as their opponent's flag, as opposed to bringing it back to friendly territory, because of difficulties implementing the artificial intelligence that the computer player would have needed to bring the enemy flag home and intercept opposing characters carrying the flag. Computer security In computer security Capture the Flag (CTF), "flags" are secrets hidden in purposefully-vulnerable programs or websites. Competitors steal flags either from other competitors (attack/defense-style CTFs) or from the organizers (jeopardy-style challenges). Several variations exist, including hiding flags in hardware devices. Urban gaming Capture the Flag is among the games that made a comeback among adults in the early 21st century as part of the urban gaming trend (which includes games like Pac-Manhattan, Fugitive, Unreal Tournament and Manhunt). The game is played on city streets and players use cellphones to communicate. News about the games spreads virally through the use of blogs and mailing lists. Urban Capture the Flag has been played in cities throughout North America. One long-running example occurs on the Northrop Mall at the University of Minnesota on Fridays with typical attendance ranging from 50 to several hundred. See also Darebase Fugitive (game) Steal the bacon Zarnitsa game References Children's games Computer network security Tag variants Team sports Flag practices Outdoor games Video game gameplay
Lisa Bremseth (born 25 June 1979) is a Norwegian alpine skier. Competing at the 1997, 1998 and 1999 Junior World Championships, her best finish being a 13th place from 1999. In the 2003 and 2005 Alpine World Ski Championships her best placement was 28th in giant slalom in 2005. She made her FIS Alpine Ski World Cup debut in December 2000 in Sestriere. After DNF'ing ro DNQ'ing in her first eleven races, she collected her first World Cup points with a 21st-place finish in December 2002 in Lenzerheide. The week after she recorded her first and only top 10-placement, a 10th place in slalom in Semmering. Her last World Cup outing came in March 2006 with a 28th place in the Hafjell giant slalom. She is a Trondheim native and represented the sports club SK Freidig. References 1979 births Living people Skiers from Trondheim Norwegian female alpine skiers
Tod Williams Billie Tsien Architects (also known as Tod Williams Billie Tsien Architects | Partners) are a husband-and-wife architectural firm founded in 1986, based in New York. Williams and Tsien began working together in 1977. Their studio focuses on work for institutions including museums, schools, and nonprofit organizations. Tod Williams Tod Williams (born 1943, Detroit, Michigan) received his undergraduate, MFA, and Master of Architecture degrees from Princeton University, New Jersey after graduating from the Cranbrook School in Bloomfield Hills. He is the father of model Rachel Williams and filmmaker Tod "Kip" Williams, both by his first wife, dancer Patricia Agnes Jones, whom he met while studying at Princeton. Williams is a Fellow of the American Academy in Rome and serves as a trustee of the Cranbrook Educational Community. He has been inducted into the American Academy of Arts and Letters, National Academy, American Philosophical Society (2017), and American Academy of Arts and Sciences. Billie Tsien Billie Tsien (born 1949, Ithaca, New York) received her undergraduate degree in Fine Arts from Yale University and her M. Arch. from UCLA. She has worked with Williams since 1977 and they have been in partnership since 1986. Tsien is currently President of the Architectural League of New York and Director of the Public Art Fund. She has been inducted into the American Academy of Arts and Letters, National Academy, the American Philosophical Society, and American Academy of Arts and Sciences. Tsien was one of the recipients of the Visionary Woman Awards presented by Moore College of Art and Design in 2009. Teaching Williams and Tsien have taught at the Cooper Union, Harvard University, Cornell University, University of Texas, City College of New York, Yale University, and University of Chicago. Recognition Williams and Tsien are the recipients of more than two dozen awards from the American Institute of Architects. They received a 2014 International Fellowship from the Royal Institute of British Architects and the 2013 Firm of the Year Award from the American Institute of Architects. In 2013, each was awarded a National Medal of Arts from President Obama. They have received the American Academy of Arts and Letters’ Brunner Award, the New York City AIA Medal of Honor, the Cooper-Hewitt National Design Award, the Thomas Jefferson Medal in Architecture, the Municipal Art Society’s Brendan Gill Prize, and the Chrysler Award for Innovation in Design. A selection of works David Geffen Hall, New York, NY, (2024) Obama Presidential Center, Chicago, IL (2021) Andlinger Center for Energy and the Environment, Princeton University, Princeton, NJ (2015) Tata Consultancy Services, Banyan Park, Mumbai, India (2014) LeFrak Center at Lakeside, Prospect Park, NY (2013) Savidge Library Addition, The MacDowell Colony, Peterborough, NH (2013) Asia Society Hong Kong Centre, Admiralty, Hong Kong (2012) Barnes Foundation, Philadelphia, PA (2012) Reva and David Logan Center for the Arts, University of Chicago (2012) Kim & Tritton Residence Halls, Haverford College, Haverford, PA (2012) Center for the Advancement of Public Action, Bennington College, Bennington, VT (2011) David Rubinstein Atrium at Lincoln Center, New York, NY (2009) C.V. Starr East Asian Library, University of California, Berkeley, CA (2008) Skirkanich Hall for bioengineering, University of Pennsylvania, Philadelphia (2006) Phoenix Art Museum, Phoenix, AZ (2006, 1996) The Robin Hood Foundation Library Initiative, various locations, New York, NY (2004-5) First Congregational United Church of Christ, Washington, DC (2001) American Folk Art Museum, 45 and 47 West 53rd Street, New York, NY (2001, demolished in 2014) Mattin Center (a student arts and activities center), Johns Hopkins University, Baltimore, MD (2001) Cranbrook Natatorium, Cranbrook Schools, Bloomfield Hills, MI (1999) Helen S. Cheels Aquatic Center, Emma Willard School, Troy, NY (1998) Hunter Science Center, Emma Willard School, Troy, NY (1996) The Neurosciences Institute on the campus of The Scripps Research Institute, San Diego, CA (1995) Hereford College, University of Virginia, Charlottesville, VA (1992) Whitney Museum of American Art Downtown Branch, New York, NY (1988) Feinberg Hall, Princeton University, Princeton, NJ (1986) Selected publications Art and Use. School of Architecture and Planning, University of Buffalo, The State University of New York, 2007 Work/Life. Monacelli Press, 2000. “The Physical Space of Science: The Neurosciences Institute and Skirkanich Hall.” Cell Cycle (Georgetown, Tex.), vol. 9, no. 1, Taylor & Francis, 2010, pp. 28–31. “Domestic Arrangements: A Lab Report. Tod Williams and Billie Tsien.” Design Quarterly (Minneapolis, Minn.), no. 152, The MIT Press, 1991, pp. 21–28. “Peas and Carrots.” Oz, vol. 18, no. 1, 1996. “Talking Houses.” Oz, vol. 25, no. 1, 2003. “Roxy Paine.” Bomb (New York, N.Y.), no. 107, New Art Publications, 2009, pp. 38–45. “Liberty.” Heresies, no. 11, Heresies Collective, Inc, 1981, p. 38. References Sources Tod Williams, "Ascension", in Archipelago: Essays on Architecture, edited by P. MacKeith, Helsinki, Rakennustieto, 2006 Billie Tsien, "The cuts through the heart", in Archipelago: Essays on Architecture. Tod Williams and Billie Tsien, The 1998 Charles and Ray Eames Lecture, Michigan Architecture Papers, University of Michigan Press, 1999. Douglas Heller, Tod Williams Billie Tsien and Associates: An Annotated Bibliography, Council of Planning Librarians, 1993. Tod Williams and Billie Tsien, Work/Life, New York, Monacelli Press, 2000. Kester Rattenbury, Robert Bevan, and Kieran Long, Architects Today, New York, Laurence King Publishing, 2006. External links Tod Williams Billie Tsien Architects Homepage “Meadow Lane Residence, Southampton, New York, USA : Tod Williams Billie Tsien.” 2019. GA Houses, no. 165 (July): 44–59. Stephens, Suzanne. 2020. “Back in the Hood: Record Returns to Tod Williams Billie Tsien Architects’ Redo of a Charles Moore Museum.” Architectural Record 208 (2): 62–65 Williams, Tod, Billie Tsien, and Josephine Minutillo. “Tod Williams and Billie Tsien: The Husband-and-Wife Team behind the New Barnes Foundation Building Discusses the Creative Process and Why Smart Architects Work in Pairs.” Architectural Digest 69, no. 6 (June 1, 2012): 62. American women architects Architecture firms based in New York City Tod Williams Billie Tsien Architects Williams, Tod Harvard University faculty Yale School of Architecture faculty United States National Medal of Arts recipients University of Michigan faculty Members of the American Philosophical Society American architects of Chinese descent University of California, Los Angeles alumni American women academics
Designer is the third studio album by the New Zealand indie folk singer-songwriter Aldous Harding, released on 26 April 2019 by 4AD. The song "The Barrel" won the 2019 APRA Silver Scroll award. Accolades Track listing Personnel Aldous Harding – vocals, acoustic and classical guitar John Parish – acoustic and electric guitar, piano, organ, mellotron, drums, congas, percussion, mixing H. Hawkline – bass guitar, electric guitar, synthesizer, vocal percussion, design, layout Gwion Llewelyn – drums, vocals Stephen Black – tenor, baritone and alto saxophone, clarinet, bass clarinet Clare Mactaggart – violin Jared Samuel – celesta on "Damn" Charts References External links Aldous Harding performs live with six album songs and interview, Morning Becomes Eclectic, 9 May 2019, KCRW 2019 albums Aldous Harding albums 4AD albums Albums produced by John Parish Albums recorded at Rockfield Studios
```go package wkhtmltopdf import ( "fmt" "reflect" ) //A list of options that can be set from code to make it easier to see which options are available type globalOptions struct { CookieJar stringOption //Read and write cookies from and to the supplied cookie jar file Copies uintOption //Number of copies to print into the pdf file (default 1) Dpi uintOption //Change the dpi explicitly (this has no effect on X11 based systems) ExtendedHelp boolOption //Display more extensive help, detailing less common command switches Grayscale boolOption //PDF will be generated in grayscale Help boolOption //Display help HTMLDoc boolOption //Output program html help ImageDpi uintOption //When embedding images scale them down to this dpi (default 600) ImageQuality uintOption //When jpeg compressing images use this quality (default 94) Lowquality boolOption //Generates lower quality pdf/ps. Useful to shrink the result document space ManPage boolOption //Output program man page MarginBottom uintOption //Set the page bottom margin MarginLeft uintOption //Set the page left margin (default 10mm) MarginRight uintOption //Set the page right margin (default 10mm) MarginTop uintOption //Set the page top margin Orientation stringOption // Set orientation to Landscape or Portrait (default Portrait) NoCollate boolOption //Do not collate when printing multiple copies (default collate) PageHeight uintOption //Page height PageSize stringOption //Set paper size to: A4, Letter, etc. (default A4) PageWidth uintOption //Page width NoPdfCompression boolOption //Do not use lossless compression on pdf objects Quiet boolOption //Be less verbose ReadArgsFromStdin boolOption //Read command line arguments from stdin Readme boolOption //Output program readme Title stringOption //The title of the generated pdf file (The title of the first document is used if not specified) Version boolOption //Output version information and exit } func (gopt *globalOptions) Args() []string { return optsToArgs(gopt) } type outlineOptions struct { DumpDefaultTocXsl boolOption //Dump the default TOC xsl style sheet to stdout DumpOutline stringOption //Dump the outline to a file NoOutline boolOption //Do not put an outline into the pdf OutlineDepth uintOption //Set the depth of the outline (default 4) } func (oopt *outlineOptions) Args() []string { return optsToArgs(oopt) } type pageOptions struct { Allow sliceOption //Allow the file or files from the specified folder to be loaded (repeatable) NoBackground boolOption //Do not print background CacheDir stringOption //Web cache directory CheckboxCheckedSvg stringOption //Use this SVG file when rendering checked checkboxes CheckboxSvg stringOption //Use this SVG file when rendering unchecked checkboxes Cookie mapOption //Set an additional cookie (repeatable), value should be url encoded CustomHeader mapOption //Set an additional HTTP header (repeatable) CustomHeaderPropagation boolOption //Add HTTP headers specified by --custom-header for each resource request NoCustomHeaderPropagation boolOption //Do not add HTTP headers specified by --custom-header for each resource request DebugJavascript boolOption //Show javascript debugging output DefaultHeader boolOption //Add a default header, with the name of the page to the left, and the page number to the right, this is short for: --header-left='[webpage]' --header-right='[page]/[toPage]' --top 2cm --header-line Encoding stringOption //Set the default text encoding, for input DisableExternalLinks boolOption //Do not make links to remote web pages EnableForms boolOption //Turn HTML form fields into pdf form fields NoImages boolOption //Do not load or print images DisableInternalLinks boolOption //Do not make local links DisableJavascript boolOption //Do not allow web pages to run javascript JavascriptDelay uintOption //Wait some milliseconds for javascript finish (default 200) LoadErrorHandling stringOption //Specify how to handle pages that fail to load: abort, ignore or skip (default abort) LoadMediaErrorHandling stringOption //Specify how to handle media files that fail to load: abort, ignore or skip (default ignore) DisableLocalFileAccess boolOption //Do not allowed conversion of a local file to read in other local files, unless explicitly allowed with --allow MinimumFontSize uintOption //Minimum font size ExcludeFromOutline boolOption //Do not include the page in the table of contents and outlines PageOffset uintOption //Set the starting page number (default 0) Password stringOption //HTTP Authentication password EnablePlugins boolOption //Enable installed plugins (plugins will likely not work) Post mapOption //Add an additional post field (repeatable) PostFile mapOption //Post an additional file (repeatable) PrintMediaType boolOption //Use print media-type instead of screen Proxy stringOption //Use a proxy RadiobuttonCheckedSvg stringOption //Use this SVG file when rendering checked radiobuttons RadiobuttonSvg stringOption //Use this SVG file when rendering unchecked radiobuttons RunScript sliceOption //Run this additional javascript after the page is done loading (repeatable) DisableSmartShrinking boolOption //Disable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio none constant NoStopSlowScripts boolOption //Do not Stop slow running javascripts EnableTocBackLinks boolOption //Link from section header to toc UserStyleSheet stringOption //Specify a user style sheet, to load with every page Username stringOption //HTTP Authentication username ViewportSize stringOption //Set viewport size if you have custom scrollbars or css attribute overflow to emulate window size WindowStatus stringOption //Wait until window.status is equal to this string before rendering page Zoom floatOption //Use this zoom factor (default 1) } func (popt *pageOptions) Args() []string { return optsToArgs(popt) } type headerAndFooterOptions struct { FooterCenter stringOption //Centered footer text FooterFontName stringOption //Set footer font name (default Arial) FooterFontSize uintOption //Set footer font size (default 12) FooterHTML stringOption //Adds a html footer FooterLeft stringOption //Left aligned footer text FooterLine boolOption //Display line above the footer FooterRight stringOption //Right aligned footer text FooterSpacing floatOption //Spacing between footer and content in mm (default 0) HeaderCenter stringOption //Centered header text HeaderFontName stringOption //Set header font name (default Arial) HeaderFontSize uintOption //Set header font size (default 12) HeaderHTML stringOption //Adds a html header HeaderLeft stringOption //Left aligned header text HeaderLine boolOption //Display line below the header HeaderRight stringOption //Right aligned header text HeaderSpacing floatOption //Spacing between header and content in mm (default 0) Replace mapOption //Replace [name] with value in header and footer (repeatable) } func (hopt *headerAndFooterOptions) Args() []string { return optsToArgs(hopt) } type tocOptions struct { DisableDottedLines boolOption //Do not use dotted lines in the toc TocHeaderText stringOption //The header text of the toc (default Table of Contents) TocLevelIndentation uintOption //For each level of headings in the toc indent by this length (default 1em) DisableTocLinks boolOption //Do not link from toc to sections TocTextSizeShrink floatOption //For each level of headings in the toc the font is scaled by this factor XslStyleSheet stringOption //Use the supplied xsl style sheet for printing the table of content } func (topt *tocOptions) Args() []string { return optsToArgs(topt) } type argParser interface { Parse() []string //Used in the cmd call } type stringOption struct { option string value string } func (so stringOption) Parse() []string { args := []string{} if so.value == "" { return args } args = append(args, "--"+so.option) args = append(args, so.value) return args } func (so *stringOption) Set(value string) { so.value = value } type sliceOption struct { option string value []string } func (so sliceOption) Parse() []string { args := []string{} if len(so.value) == 0 { return args } for _, v := range so.value { args = append(args, "--"+so.option) args = append(args, v) } return args } func (so *sliceOption) Set(value string) { so.value = append(so.value, value) } type mapOption struct { option string value map[string]string } func (mo mapOption) Parse() []string { args := []string{} if mo.value == nil || len(mo.value) == 0 { return args } for k, v := range mo.value { args = append(args, "--"+mo.option) args = append(args, k) args = append(args, v) } return args } func (mo *mapOption) Set(key, value string) { if mo.value == nil { mo.value = make(map[string]string) } mo.value[key] = value } type uintOption struct { option string value uint isSet bool } func (io uintOption) Parse() []string { args := []string{} if io.isSet == false { return args } args = append(args, "--"+io.option) args = append(args, fmt.Sprintf("%d", io.value)) return args } func (io *uintOption) Set(value uint) { io.isSet = true io.value = value } type floatOption struct { option string value float64 isSet bool } func (fo floatOption) Parse() []string { args := []string{} if fo.isSet == false { return args } args = append(args, "--"+fo.option) args = append(args, fmt.Sprintf("%.3f", fo.value)) return args } func (fo *floatOption) Set(value float64) { fo.isSet = true fo.value = value } type boolOption struct { option string value bool } func (bo boolOption) Parse() []string { if bo.value { return []string{"--" + bo.option} } return []string{} } func (bo *boolOption) Set(value bool) { bo.value = value } func newGlobalOptions() globalOptions { return globalOptions{ CookieJar: stringOption{option: "cookie-jar"}, Copies: uintOption{option: "copies"}, Dpi: uintOption{option: "dpi"}, ExtendedHelp: boolOption{option: "extended-help"}, Grayscale: boolOption{option: "grayscale"}, Help: boolOption{option: "true"}, HTMLDoc: boolOption{option: "htmldoc"}, ImageDpi: uintOption{option: "image-dpi"}, ImageQuality: uintOption{option: "image-quality"}, Lowquality: boolOption{option: "lowquality"}, ManPage: boolOption{option: "manpage"}, MarginBottom: uintOption{option: "margin-bottom"}, MarginLeft: uintOption{option: "margin-left"}, MarginRight: uintOption{option: "margin-right"}, MarginTop: uintOption{option: "margin-top"}, Orientation: stringOption{option: "orientation"}, NoCollate: boolOption{option: "nocollate"}, PageHeight: uintOption{option: "page-height"}, PageSize: stringOption{option: "page-size"}, PageWidth: uintOption{option: "page-width"}, NoPdfCompression: boolOption{option: "no-pdf-compression"}, Quiet: boolOption{option: "quiet"}, ReadArgsFromStdin: boolOption{option: "read-args-from-stdin"}, Readme: boolOption{option: "readme"}, Title: stringOption{option: "title"}, Version: boolOption{option: "version"}, } } func newOutlineOptions() outlineOptions { return outlineOptions{ DumpDefaultTocXsl: boolOption{option: "dump-default-toc-xsl"}, DumpOutline: stringOption{option: "dump-outline"}, NoOutline: boolOption{option: "no-outline"}, OutlineDepth: uintOption{option: "outline-depth"}, } } func newPageOptions() pageOptions { return pageOptions{ Allow: sliceOption{option: "allow"}, NoBackground: boolOption{option: "no-background"}, CacheDir: stringOption{option: "cache-dir"}, CheckboxCheckedSvg: stringOption{option: "checkbox-checked-svg"}, CheckboxSvg: stringOption{option: "checkbox-svg"}, Cookie: mapOption{option: "cookie"}, CustomHeader: mapOption{option: "custom-header"}, CustomHeaderPropagation: boolOption{option: "custom-header-propagation"}, NoCustomHeaderPropagation: boolOption{option: "no-custom-header-propagation"}, DebugJavascript: boolOption{option: "debug-javascript"}, DefaultHeader: boolOption{option: "default-header"}, Encoding: stringOption{option: "encoding"}, DisableExternalLinks: boolOption{option: "disable-external-links"}, EnableForms: boolOption{option: "enable-forms"}, NoImages: boolOption{option: "no-images"}, DisableInternalLinks: boolOption{option: "disable-internal-links"}, DisableJavascript: boolOption{option: "disable-javascript "}, JavascriptDelay: uintOption{option: "javascript-delay"}, LoadErrorHandling: stringOption{option: "load-error-handling"}, LoadMediaErrorHandling: stringOption{option: "load-media-error-handling"}, DisableLocalFileAccess: boolOption{option: "disable-local-file-access"}, MinimumFontSize: uintOption{option: "minimum-font-size"}, ExcludeFromOutline: boolOption{option: "exclude-from-outline"}, PageOffset: uintOption{option: "page-offset"}, Password: stringOption{option: "password"}, EnablePlugins: boolOption{option: "enable-plugins"}, Post: mapOption{option: "post"}, PostFile: mapOption{option: "post-file"}, PrintMediaType: boolOption{option: "print-media-type"}, Proxy: stringOption{option: "proxy"}, RadiobuttonCheckedSvg: stringOption{option: "radiobutton-checked-svg"}, RadiobuttonSvg: stringOption{option: "radiobutton-svg"}, RunScript: sliceOption{option: "run-script"}, DisableSmartShrinking: boolOption{option: "disable-smart-shrinking"}, NoStopSlowScripts: boolOption{option: "no-stop-slow-scripts"}, EnableTocBackLinks: boolOption{option: "enable-toc-back-links"}, UserStyleSheet: stringOption{option: "user-style-sheet"}, Username: stringOption{option: "username"}, ViewportSize: stringOption{option: "viewport-size"}, WindowStatus: stringOption{option: "window-status"}, Zoom: floatOption{option: "zoom"}, } } func newHeaderAndFooterOptions() headerAndFooterOptions { return headerAndFooterOptions{ FooterCenter: stringOption{option: "footer-center"}, FooterFontName: stringOption{option: "footer-font-name"}, FooterFontSize: uintOption{option: "footer-font-size"}, FooterHTML: stringOption{option: "footer-html"}, FooterLeft: stringOption{option: "footer-left"}, FooterLine: boolOption{option: "footer-line"}, FooterRight: stringOption{option: "footer-right"}, FooterSpacing: floatOption{option: "footer-spacing"}, HeaderCenter: stringOption{option: "header-center"}, HeaderFontName: stringOption{option: "header-font-name"}, HeaderFontSize: uintOption{option: "header-font-size"}, HeaderHTML: stringOption{option: "header-html"}, HeaderLeft: stringOption{option: "header-left"}, HeaderLine: boolOption{option: "header-line"}, HeaderRight: stringOption{option: "header-right"}, HeaderSpacing: floatOption{option: "header-spacing"}, Replace: mapOption{option: "replace"}, } } func newTocOptions() tocOptions { return tocOptions{ DisableDottedLines: boolOption{option: "disable-dotted-lines"}, TocHeaderText: stringOption{option: "toc-header-text"}, TocLevelIndentation: uintOption{option: "toc-level-indentation"}, DisableTocLinks: boolOption{option: "disable-toc-links"}, TocTextSizeShrink: floatOption{option: "toc-text-size-shrink"}, XslStyleSheet: stringOption{option: "xsl-style-sheet"}, } } func optsToArgs(opts interface{}) []string { args := []string{} rv := reflect.Indirect(reflect.ValueOf(opts)) if rv.Kind() != reflect.Struct { return args } for i := 0; i < rv.NumField(); i++ { prsr, ok := rv.Field(i).Interface().(argParser) if ok { s := prsr.Parse() if len(s) > 0 { args = append(args, s...) } } } return args } // Constants for orientation modes const ( OrientationLandscape = "Landscape" // Landscape mode OrientationPortrait = "Portrait" // Portrait mode ) // Constants for page sizes const ( PageSizeA0 = "A0" // 841 x 1189 mm PageSizeA1 = "A1" // 594 x 841 mm PageSizeA2 = "A2" // 420 x 594 mm PageSizeA3 = "A3" // 297 x 420 mm PageSizeA4 = "A4" // 210 x 297 mm, 8.26 PageSizeA5 = "A5" // 148 x 210 mm PageSizeA6 = "A6" // 105 x 148 mm PageSizeA7 = "A7" // 74 x 105 mm PageSizeA8 = "A8" // 52 x 74 mm PageSizeA9 = "A9" // 37 x 52 mm PageSizeB0 = "B0" // 1000 x 1414 mm PageSizeB1 = "B1" // 707 x 1000 mm PageSizeB2 = "B2" // 500 x 707 mm PageSizeB3 = "B3" // 353 x 500 mm PageSizeB4 = "B4" // 250 x 353 mm PageSizeB5 = "B5" // 176 x 250 mm, 6.93 PageSizeB6 = "B6" // 125 x 176 mm PageSizeB7 = "B7" // 88 x 125 mm PageSizeB8 = "B8" // 62 x 88 mm PageSizeB9 = "B9" // 33 x 62 mm PageSizeB10 = "B10" // 31 x 44 mm PageSizeC5E = "C5E" // 163 x 229 mm PageSizeComm10E = "Comm10E" // 105 x 241 mm, U.S. Common 10 Envelope PageSizeDLE = "DLE" // 110 x 220 mm PageSizeExecutive = "Executive" // 7.5 x 10 inches, 190.5 x 254 mm PageSizeFolio = "Folio" // 210 x 330 mm PageSizeLedger = "Ledger" // 431.8 x 279.4 mm PageSizeLegal = "Legal" // 8.5 x 14 inches, 215.9 x 355.6 mm PageSizeLetter = "Letter" // 8.5 x 11 inches, 215.9 x 279.4 mm PageSizeTabloid = "Tabloid" // 279.4 x 431.8 mm PageSizeCustom = "Custom" // Unknown, or a user defined size. ) ```
Graham Hobson was an American college football coach. He served as the head football coach at Richmond College—now known as the University of Richmond—in Richmond, Virginia, for one season, in 1902, compiling a record of 3–3. Head coaching record References Year of birth missing Year of death missing Richmond Spiders football coaches University of Virginia alumni
```c++ /****************************************************************************** * Qwt Widget Library * * This library is free software; you can redistribute it and/or *****************************************************************************/ #include "qwt_plot.h" #include "qwt_scale_widget.h" #include "qwt_scale_map.h" #include "qwt_scale_div.h" #include "qwt_scale_engine.h" #include "qwt_interval.h" namespace { class AxisData { public: AxisData() : isVisible( true ) , doAutoScale( true ) , minValue( 0.0 ) , maxValue( 1000.0 ) , stepSize( 0.0 ) , maxMajor( 8 ) , maxMinor( 5 ) , isValid( false ) , scaleEngine( new QwtLinearScaleEngine() ) , scaleWidget( NULL ) { } ~AxisData() { delete scaleEngine; } void initWidget( QwtScaleDraw::Alignment align, const QString& name, QwtPlot* plot ) { scaleWidget = new QwtScaleWidget( align, plot ); scaleWidget->setObjectName( name ); #if 1 // better find the font sizes from the application font const QFont fscl( plot->fontInfo().family(), 10 ); const QFont fttl( plot->fontInfo().family(), 12, QFont::Bold ); #endif scaleWidget->setTransformation( scaleEngine->transformation() ); scaleWidget->setFont( fscl ); scaleWidget->setMargin( 2 ); QwtText text = scaleWidget->title(); text.setFont( fttl ); scaleWidget->setTitle( text ); } bool isVisible; bool doAutoScale; double minValue; double maxValue; double stepSize; int maxMajor; int maxMinor; bool isValid; QwtScaleDiv scaleDiv; QwtScaleEngine* scaleEngine; QwtScaleWidget* scaleWidget; }; } class QwtPlot::ScaleData { public: ScaleData( QwtPlot* plot ) { using namespace QwtAxis; m_axisData[YLeft].initWidget( QwtScaleDraw::LeftScale, "QwtPlotAxisYLeft", plot ); m_axisData[YRight].initWidget( QwtScaleDraw::RightScale, "QwtPlotAxisYRight", plot ); m_axisData[XTop].initWidget( QwtScaleDraw::TopScale, "QwtPlotAxisXTop", plot ); m_axisData[XBottom].initWidget( QwtScaleDraw::BottomScale, "QwtPlotAxisXBottom", plot ); } inline AxisData& axisData( QwtAxisId axisId ) { return m_axisData[ axisId ]; } inline const AxisData& axisData( QwtAxisId axisId ) const { return m_axisData[ axisId ]; } private: AxisData m_axisData[ QwtAxis::AxisPositions ]; }; void QwtPlot::initAxesData() { m_scaleData = new ScaleData( this ); m_scaleData->axisData( QwtAxis::YRight ).isVisible = false; m_scaleData->axisData( QwtAxis::XTop ).isVisible = false; } void QwtPlot::deleteAxesData() { delete m_scaleData; m_scaleData = NULL; } /*! Checks if an axis is valid \param axisId axis \return \c true if the specified axis exists, otherwise \c false \note This method is equivalent to QwtAxis::isValid( axisId ) and simply checks if axisId is one of the values of QwtAxis::Position. It is a placeholder for future releases, where it will be possible to have a customizable number of axes ( multiaxes branch ) at each side. */ bool QwtPlot::isAxisValid( QwtAxisId axisId ) const { return QwtAxis::isValid( axisId ); } /*! \return Scale widget of the specified axis, or NULL if axisId is invalid. \param axisId Axis */ const QwtScaleWidget* QwtPlot::axisWidget( QwtAxisId axisId ) const { if ( isAxisValid( axisId ) ) return m_scaleData->axisData( axisId ).scaleWidget; return NULL; } /*! \return Scale widget of the specified axis, or NULL if axisId is invalid. \param axisId Axis */ QwtScaleWidget* QwtPlot::axisWidget( QwtAxisId axisId ) { if ( isAxisValid( axisId ) ) return m_scaleData->axisData( axisId ).scaleWidget; return NULL; } /*! Change the scale engine for an axis \param axisId Axis \param scaleEngine Scale engine \sa axisScaleEngine() */ void QwtPlot::setAxisScaleEngine( QwtAxisId axisId, QwtScaleEngine* scaleEngine ) { if ( isAxisValid( axisId ) && scaleEngine != NULL ) { AxisData& d = m_scaleData->axisData( axisId ); delete d.scaleEngine; d.scaleEngine = scaleEngine; d.scaleWidget->setTransformation( scaleEngine->transformation() ); d.isValid = false; autoRefresh(); } } /*! \param axisId Axis \return Scale engine for a specific axis */ QwtScaleEngine* QwtPlot::axisScaleEngine( QwtAxisId axisId ) { if ( isAxisValid( axisId ) ) return m_scaleData->axisData( axisId ).scaleEngine; else return NULL; } /*! \param axisId Axis \return Scale engine for a specific axis */ const QwtScaleEngine* QwtPlot::axisScaleEngine( QwtAxisId axisId ) const { if ( isAxisValid( axisId ) ) return m_scaleData->axisData( axisId ).scaleEngine; else return NULL; } /*! \return \c True, if autoscaling is enabled \param axisId Axis */ bool QwtPlot::axisAutoScale( QwtAxisId axisId ) const { if ( isAxisValid( axisId ) ) return m_scaleData->axisData( axisId ).doAutoScale; else return false; } /*! \return \c True, if a specified axis is visible \param axisId Axis */ bool QwtPlot::isAxisVisible( QwtAxisId axisId ) const { if ( isAxisValid( axisId ) ) return m_scaleData->axisData( axisId ).isVisible; else return false; } /*! \return The font of the scale labels for a specified axis \param axisId Axis */ QFont QwtPlot::axisFont( QwtAxisId axisId ) const { if ( isAxisValid( axisId ) ) return axisWidget( axisId )->font(); else return QFont(); } /*! \return The maximum number of major ticks for a specified axis \param axisId Axis \sa setAxisMaxMajor(), QwtScaleEngine::divideScale() */ int QwtPlot::axisMaxMajor( QwtAxisId axisId ) const { if ( isAxisValid( axisId ) ) return m_scaleData->axisData( axisId ).maxMajor; else return 0; } /*! \return the maximum number of minor ticks for a specified axis \param axisId Axis \sa setAxisMaxMinor(), QwtScaleEngine::divideScale() */ int QwtPlot::axisMaxMinor( QwtAxisId axisId ) const { if ( isAxisValid( axisId ) ) return m_scaleData->axisData( axisId ).maxMinor; else return 0; } /*! \brief Return the scale division of a specified axis axisScaleDiv(axisId).lowerBound(), axisScaleDiv(axisId).upperBound() are the current limits of the axis scale. \param axisId Axis \return Scale division \sa QwtScaleDiv, setAxisScaleDiv(), QwtScaleEngine::divideScale() */ const QwtScaleDiv& QwtPlot::axisScaleDiv( QwtAxisId axisId ) const { if ( isAxisValid( axisId ) ) return m_scaleData->axisData( axisId ).scaleDiv; static QwtScaleDiv dummyScaleDiv; return dummyScaleDiv; } /*! \brief Return the scale draw of a specified axis \param axisId Axis \return Specified scaleDraw for axis, or NULL if axis is invalid. */ const QwtScaleDraw* QwtPlot::axisScaleDraw( QwtAxisId axisId ) const { if ( !isAxisValid( axisId ) ) return NULL; return axisWidget( axisId )->scaleDraw(); } /*! \brief Return the scale draw of a specified axis \param axisId Axis \return Specified scaleDraw for axis, or NULL if axis is invalid. */ QwtScaleDraw* QwtPlot::axisScaleDraw( QwtAxisId axisId ) { if ( !isAxisValid( axisId ) ) return NULL; return axisWidget( axisId )->scaleDraw(); } /*! \brief Return the step size parameter that has been set in setAxisScale. This doesn't need to be the step size of the current scale. \param axisId Axis \return step size parameter value \sa setAxisScale(), QwtScaleEngine::divideScale() */ double QwtPlot::axisStepSize( QwtAxisId axisId ) const { if ( !isAxisValid( axisId ) ) return 0; return m_scaleData->axisData( axisId ).stepSize; } /*! \brief Return the current interval of the specified axis This is only a convenience function for axisScaleDiv( axisId )->interval(); \param axisId Axis \return Scale interval \sa QwtScaleDiv, axisScaleDiv() */ QwtInterval QwtPlot::axisInterval( QwtAxisId axisId ) const { if ( !isAxisValid( axisId ) ) return QwtInterval(); return m_scaleData->axisData( axisId ).scaleDiv.interval(); } /*! \return Title of a specified axis \param axisId Axis */ QwtText QwtPlot::axisTitle( QwtAxisId axisId ) const { if ( isAxisValid( axisId ) ) return axisWidget( axisId )->title(); else return QwtText(); } /*! \brief Hide or show a specified axis Curves, markers and other items can be attached to hidden axes, and transformation of screen coordinates into values works as normal. Only QwtAxis::XBottom and QwtAxis::YLeft are enabled by default. \param axisId Axis \param on \c true (visible) or \c false (hidden) */ void QwtPlot::setAxisVisible( QwtAxisId axisId, bool on ) { if ( isAxisValid( axisId ) && on != m_scaleData->axisData( axisId ).isVisible ) { m_scaleData->axisData( axisId ).isVisible = on; updateLayout(); } } /*! Transform the x or y coordinate of a position in the drawing region into a value. \param axisId Axis \param pos position \return Position as axis coordinate \warning The position can be an x or a y coordinate, depending on the specified axis. */ double QwtPlot::invTransform( QwtAxisId axisId, double pos ) const { if ( isAxisValid( axisId ) ) return( canvasMap( axisId ).invTransform( pos ) ); else return 0.0; } /*! \brief Transform a value into a coordinate in the plotting region \param axisId Axis \param value value \return X or Y coordinate in the plotting region corresponding to the value. */ double QwtPlot::transform( QwtAxisId axisId, double value ) const { if ( isAxisValid( axisId ) ) return( canvasMap( axisId ).transform( value ) ); else return 0.0; } /*! \brief Change the font of an axis \param axisId Axis \param font Font \warning This function changes the font of the tick labels, not of the axis title. */ void QwtPlot::setAxisFont( QwtAxisId axisId, const QFont& font ) { if ( isAxisValid( axisId ) ) axisWidget( axisId )->setFont( font ); } /*! \brief Enable autoscaling for a specified axis This member function is used to switch back to autoscaling mode after a fixed scale has been set. Autoscaling is enabled by default. \param axisId Axis \param on On/Off \sa setAxisScale(), setAxisScaleDiv(), updateAxes() \note The autoscaling flag has no effect until updateAxes() is executed ( called by replot() ). */ void QwtPlot::setAxisAutoScale( QwtAxisId axisId, bool on ) { if ( isAxisValid( axisId ) && ( m_scaleData->axisData( axisId ).doAutoScale != on ) ) { m_scaleData->axisData( axisId ).doAutoScale = on; autoRefresh(); } } /*! \brief Disable autoscaling and specify a fixed scale for a selected axis. In updateAxes() the scale engine calculates a scale division from the specified parameters, that will be assigned to the scale widget. So updates of the scale widget usually happen delayed with the next replot. \param axisId Axis \param min Minimum of the scale \param max Maximum of the scale \param stepSize Major step size. If <code>step == 0</code>, the step size is calculated automatically using the maxMajor setting. \sa setAxisMaxMajor(), setAxisAutoScale(), axisStepSize(), QwtScaleEngine::divideScale() */ void QwtPlot::setAxisScale( QwtAxisId axisId, double min, double max, double stepSize ) { if ( isAxisValid( axisId ) ) { AxisData& d = m_scaleData->axisData( axisId ); d.doAutoScale = false; d.isValid = false; d.minValue = min; d.maxValue = max; d.stepSize = stepSize; autoRefresh(); } } /*! \brief Disable autoscaling and specify a fixed scale for a selected axis. The scale division will be stored locally only until the next call of updateAxes(). So updates of the scale widget usually happen delayed with the next replot. \param axisId Axis \param scaleDiv Scale division \sa setAxisScale(), setAxisAutoScale() */ void QwtPlot::setAxisScaleDiv( QwtAxisId axisId, const QwtScaleDiv& scaleDiv ) { if ( isAxisValid( axisId ) ) { AxisData& d = m_scaleData->axisData( axisId ); d.doAutoScale = false; d.scaleDiv = scaleDiv; d.isValid = true; autoRefresh(); } } /*! \brief Set a scale draw \param axisId Axis \param scaleDraw Object responsible for drawing scales. By passing scaleDraw it is possible to extend QwtScaleDraw functionality and let it take place in QwtPlot. Please note that scaleDraw has to be created with new and will be deleted by the corresponding QwtScale member ( like a child object ). \sa QwtScaleDraw, QwtScaleWidget \warning The attributes of scaleDraw will be overwritten by those of the previous QwtScaleDraw. */ void QwtPlot::setAxisScaleDraw( QwtAxisId axisId, QwtScaleDraw* scaleDraw ) { if ( isAxisValid( axisId ) ) { axisWidget( axisId )->setScaleDraw( scaleDraw ); autoRefresh(); } } /*! Change the alignment of the tick labels \param axisId Axis \param alignment Or'd Qt::AlignmentFlags see <qnamespace.h> \sa QwtScaleDraw::setLabelAlignment() */ void QwtPlot::setAxisLabelAlignment( QwtAxisId axisId, Qt::Alignment alignment ) { if ( isAxisValid( axisId ) ) axisWidget( axisId )->setLabelAlignment( alignment ); } /*! Rotate all tick labels \param axisId Axis \param rotation Angle in degrees. When changing the label rotation, the label alignment might be adjusted too. \sa QwtScaleDraw::setLabelRotation(), setAxisLabelAlignment() */ void QwtPlot::setAxisLabelRotation( QwtAxisId axisId, double rotation ) { if ( isAxisValid( axisId ) ) axisWidget( axisId )->setLabelRotation( rotation ); } /*! Set the maximum number of minor scale intervals for a specified axis \param axisId Axis \param maxMinor Maximum number of minor steps \sa axisMaxMinor() */ void QwtPlot::setAxisMaxMinor( QwtAxisId axisId, int maxMinor ) { if ( isAxisValid( axisId ) ) { maxMinor = qBound( 0, maxMinor, 100 ); AxisData& d = m_scaleData->axisData( axisId ); if ( maxMinor != d.maxMinor ) { d.maxMinor = maxMinor; d.isValid = false; autoRefresh(); } } } /*! Set the maximum number of major scale intervals for a specified axis \param axisId Axis \param maxMajor Maximum number of major steps \sa axisMaxMajor() */ void QwtPlot::setAxisMaxMajor( QwtAxisId axisId, int maxMajor ) { if ( isAxisValid( axisId ) ) { maxMajor = qBound( 1, maxMajor, 10000 ); AxisData& d = m_scaleData->axisData( axisId ); if ( maxMajor != d.maxMajor ) { d.maxMajor = maxMajor; d.isValid = false; autoRefresh(); } } } /*! \brief Change the title of a specified axis \param axisId Axis \param title axis title */ void QwtPlot::setAxisTitle( QwtAxisId axisId, const QString& title ) { if ( isAxisValid( axisId ) ) axisWidget( axisId )->setTitle( title ); } /*! \brief Change the title of a specified axis \param axisId Axis \param title Axis title */ void QwtPlot::setAxisTitle( QwtAxisId axisId, const QwtText& title ) { if ( isAxisValid( axisId ) ) axisWidget( axisId )->setTitle( title ); } /*! \brief Rebuild the axes scales In case of autoscaling the boundaries of a scale are calculated from the bounding rectangles of all plot items, having the QwtPlotItem::AutoScale flag enabled ( QwtScaleEngine::autoScale() ). Then a scale division is calculated ( QwtScaleEngine::didvideScale() ) and assigned to scale widget. When the scale boundaries have been assigned with setAxisScale() a scale division is calculated ( QwtScaleEngine::didvideScale() ) for this interval and assigned to the scale widget. When the scale has been set explicitly by setAxisScaleDiv() the locally stored scale division gets assigned to the scale widget. The scale widget indicates modifications by emitting a QwtScaleWidget::scaleDivChanged() signal. updateAxes() is usually called by replot(). \sa setAxisAutoScale(), setAxisScale(), setAxisScaleDiv(), replot() QwtPlotItem::boundingRect() */ void QwtPlot::updateAxes() { // Find bounding interval of the item data // for all axes, where autoscaling is enabled QwtInterval boundingIntervals[QwtAxis::AxisPositions]; const QwtPlotItemList& itmList = itemList(); QwtPlotItemIterator it; for ( it = itmList.begin(); it != itmList.end(); ++it ) { const QwtPlotItem* item = *it; if ( !item->testItemAttribute( QwtPlotItem::AutoScale ) ) continue; if ( !item->isVisible() ) continue; const QwtAxisId xAxis = item->xAxis(); const QwtAxisId yAxis = item->yAxis(); if ( axisAutoScale( xAxis ) || axisAutoScale( yAxis ) ) { const QRectF rect = item->boundingRect(); if ( axisAutoScale( xAxis ) && rect.width() >= 0.0 ) boundingIntervals[xAxis] |= QwtInterval( rect.left(), rect.right() ); if ( axisAutoScale( yAxis ) && rect.height() >= 0.0 ) boundingIntervals[yAxis] |= QwtInterval( rect.top(), rect.bottom() ); } } // Adjust scales for ( int axisPos = 0; axisPos < QwtAxis::AxisPositions; axisPos++ ) { { const QwtAxisId axisId( axisPos ); AxisData& d = m_scaleData->axisData( axisId ); double minValue = d.minValue; double maxValue = d.maxValue; double stepSize = d.stepSize; const QwtInterval& interval = boundingIntervals[axisId]; if ( d.doAutoScale && interval.isValid() ) { d.isValid = false; minValue = interval.minValue(); maxValue = interval.maxValue(); d.scaleEngine->autoScale( d.maxMajor, minValue, maxValue, stepSize ); } if ( !d.isValid ) { d.scaleDiv = d.scaleEngine->divideScale( minValue, maxValue, d.maxMajor, d.maxMinor, stepSize ); d.isValid = true; } QwtScaleWidget* scaleWidget = axisWidget( axisId ); scaleWidget->setScaleDiv( d.scaleDiv ); int startDist, endDist; scaleWidget->getBorderDistHint( startDist, endDist ); scaleWidget->setBorderDist( startDist, endDist ); } } for ( it = itmList.begin(); it != itmList.end(); ++it ) { QwtPlotItem* item = *it; if ( item->testItemInterest( QwtPlotItem::ScaleInterest ) ) { item->updateScaleDiv( axisScaleDiv( item->xAxis() ), axisScaleDiv( item->yAxis() ) ); } } } ```
The 1926 San Diego State Aztecs football team represented San Diego State Teachers College during the 1926 NCAA football season. San Diego State competed as a member of the Southern California Intercollegiate Athletic Conference (SCIAC) in 1926. They had played as an Independent the previous year. The 1926 San Diego State team was led by head coach Charles E. Peterson in his sixth season as football coach of the Aztecs. They played home games at Navy "Sports" Field. The Aztecs finished the season with three wins, four losses and one tie (3–4–1, 1–3–1 SCIAC). Overall, the team was outscored by its opponents 78–150 points for the season. Schedule Notes References San Diego State San Diego State Aztecs football seasons San Diego State Aztecs football
Roger Tchouassi (born 21 September 1986 in Côte d'Ivoire) is a Rwandan footballer. Career He played for the Police Kibungo and Djibouti Télécom. He made his international debut for Rwanda in 2010. References External links 1986 births Living people Men's association football forwards Rwandan men's footballers Rwanda men's international footballers Rwandan expatriate men's footballers Police F.C. (Rwanda) players Expatriate men's footballers in Djibouti AS Ali Sabieh/Djibouti Télécom players Djibouti Premier League players Rwandan expatriate sportspeople in Oman Rwandan expatriate sportspeople in Djibouti Expatriate men's footballers in Oman Al-Shabab SC (Seeb) players
```c++ /*============================================================================= file LICENSE_1_0.txt or copy at path_to_url ==============================================================================*/ #include <boost/phoenix/core/value.hpp> int main() {} ```
```c /* * File : pthread_spin.c * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2006 - 2010, RT-Thread Development Team * * This program is free software; you can redistribute it and/or modify * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Change Logs: * Date Author Notes * 2010-10-26 Bernard the first version */ #include <pthread.h> int pthread_spin_init (pthread_spinlock_t *lock, int pshared) { if (!lock) return EINVAL; lock->lock = 0; return 0; } int pthread_spin_destroy (pthread_spinlock_t *lock) { if (!lock) return EINVAL; return 0; } int pthread_spin_lock (pthread_spinlock_t *lock) { if (!lock) return EINVAL; while (!(lock->lock)) { lock->lock = 1; } return 0; } int pthread_spin_trylock (pthread_spinlock_t *lock) { if (!lock) return EINVAL; if (!(lock->lock)) { lock->lock = 1; return 0; } return EBUSY; } int pthread_spin_unlock (pthread_spinlock_t *lock) { if (!lock) return EINVAL; if (!(lock->lock)) return EPERM; lock->lock = 0; return 0; } ```
Anopina metlec is a species of moth of the family Tortricidae. It is found in Veracruz, Mexico. References Moths described in 2000 metlec Moths of Central America
Lenoir Community College (LCC) is a public community college in Lenoir County, North Carolina. LCC's main campus is located in the city of Kinston in Lenoir County and it has satellite institutions in Greene and Jones counties. It is part of the North Carolina Community College System. LCC serves approximately 3,500 curriculum students and 12,500 extension students annually. References External links Official website Two-year colleges in the United States North Carolina Community College System colleges Universities and colleges accredited by the Southern Association of Colleges and Schools Education in Lenoir County, North Carolina Education in Greene County, North Carolina Education in Jones County, North Carolina Buildings and structures in Lenoir County, North Carolina NJCAA athletics
```c /* * */ #include "esp_types.h" #include "sdkconfig.h" #include "esp_err.h" #include "esp_check.h" #include "esp_log.h" #include "esp_check.h" #include "esp_image_format.h" #include "esp_app_format.h" #include "esp_flash_partitions.h" #include "hal/cache_hal.h" #include "hal/cache_ll.h" #include "hal/mmu_hal.h" #include "hal/mmu_ll.h" #include "soc/soc.h" #include "soc/soc_caps.h" #include "soc/ext_mem_defs.h" #include "esp_private/image_process.h" #include "esp_private/esp_cache_esp32_private.h" /** * ESP32 bootloader size is not enough, not enable this feature for now */ #define IMAGE_PROCESS_SUPPORTED_TARGETS (!CONFIG_IDF_TARGET_ESP32) #if CONFIG_IDF_TARGET_ESP32 #define MMAP_MMU_SIZE 0x320000 #elif CONFIG_IDF_TARGET_ESP32S2 #define MMAP_MMU_SIZE (SOC_DRAM0_CACHE_ADDRESS_HIGH - SOC_DRAM0_CACHE_ADDRESS_LOW) #else #define MMAP_MMU_SIZE (SOC_DRAM_FLASH_ADDRESS_HIGH - SOC_DRAM_FLASH_ADDRESS_LOW) #endif #if CONFIG_IDF_TARGET_ESP32 #define FLASH_READ_VADDR (SOC_DROM_LOW + MMAP_MMU_SIZE) #else #define FLASH_READ_VADDR (SOC_DROM_LOW + MMAP_MMU_SIZE - CONFIG_MMU_PAGE_SIZE) #endif #define MMU_FLASH_MASK (~(CONFIG_MMU_PAGE_SIZE - 1)) /** * @brief Image process driver */ struct image_process_driver_s { /** * @brief Process segments * * @param[in] data image meta data * * @return * - ESP_OK * - ESP_ERR_INVALID_ARG: invalid argument * - ESP_ERR_INVALID_STATE: invalid state */ esp_err_t (*process_segments)(esp_image_metadata_t *data); }; const static char *TAG = "image_process"; static uint32_t s_current_read_mapping = UINT32_MAX; static uint32_t s_flash_drom_paddr_start = 0; static uint32_t s_flash_irom_paddr_start = 0; static esp_err_t process_segments(esp_image_metadata_t *data); static image_process_driver_t s_image_process_driver = { process_segments, }; static esp_err_t flash_read(size_t src_addr, void *dest, size_t size) { if (src_addr & 3) { ESP_EARLY_LOGE(TAG, "flash_read src_addr 0x%x not 4-byte aligned", src_addr); return ESP_ERR_INVALID_ARG; } if (size & 3) { ESP_EARLY_LOGE(TAG, "flash_read size 0x%x not 4-byte aligned", size); return ESP_ERR_INVALID_ARG; } if ((intptr_t)dest & 3) { ESP_EARLY_LOGE(TAG, "flash_read dest 0x%x not 4-byte aligned", (intptr_t)dest); return ESP_ERR_INVALID_ARG; } uint32_t *dest_words = (uint32_t *)dest; for (size_t word = 0; word < size / 4; word++) { uint32_t word_src = src_addr + word * 4; /* Read this offset from flash */ uint32_t map_at = word_src & MMU_FLASH_MASK; /* Map this 64KB block from flash */ uint32_t *map_ptr; /* Move the 64KB mmu mapping window to fit map_at */ if (map_at != s_current_read_mapping) { cache_hal_suspend(CACHE_LL_LEVEL_EXT_MEM, CACHE_TYPE_ALL); uint32_t actual_mapped_len = 0; mmu_hal_map_region(0, MMU_TARGET_FLASH0, FLASH_READ_VADDR, map_at, CONFIG_MMU_PAGE_SIZE - 1, &actual_mapped_len); s_current_read_mapping = map_at; ESP_EARLY_LOGD(TAG, "starting from paddr=0x%" PRIx32 " and vaddr=0x%" PRIx32 ", 0x%" PRIx32 " bytes are mapped", map_at, FLASH_READ_VADDR, actual_mapped_len); #if CONFIG_IDF_TARGET_ESP32 cache_sync(); #else cache_hal_invalidate_addr(FLASH_READ_VADDR, actual_mapped_len); #endif cache_hal_resume(CACHE_LL_LEVEL_EXT_MEM, CACHE_TYPE_ALL); } map_ptr = (uint32_t *)(FLASH_READ_VADDR + (word_src - map_at)); dest_words[word] = *map_ptr; } return ESP_OK; } #if IMAGE_PROCESS_SUPPORTED_TARGETS static esp_err_t process_image_header(esp_image_metadata_t *data, uint32_t part_offset) { bzero(data, sizeof(esp_image_metadata_t)); data->start_addr = part_offset; ESP_RETURN_ON_ERROR_ISR(flash_read(data->start_addr, &data->image, sizeof(esp_image_header_t)), TAG, "failed to read image"); data->image_len = sizeof(esp_image_header_t); ESP_EARLY_LOGD(TAG, "reading image header=0x%"PRIx32" image_len=0x%"PRIx32" image.segment_count=0x%x", data->start_addr, data->image_len, data->image.segment_count); return ESP_OK; } #endif static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segment_header_t *header, esp_image_metadata_t *metadata, int *cnt) { /* read segment header */ ESP_RETURN_ON_ERROR_ISR(flash_read(flash_addr, header, sizeof(esp_image_segment_header_t)), TAG, "failed to do flash read"); intptr_t load_addr = header->load_addr; uint32_t data_len = header->data_len; uint32_t data_addr = flash_addr + sizeof(esp_image_segment_header_t); #if SOC_MMU_DI_VADDR_SHARED #if CONFIG_SPIRAM_FLASH_LOAD_TO_PSRAM if (load_addr >= SOC_DRAM_PSRAM_ADDRESS_LOW && load_addr < SOC_DRAM_PSRAM_ADDRESS_HIGH) { if (*cnt == 0) { s_flash_drom_paddr_start = data_addr; } else if (*cnt == 1) { s_flash_irom_paddr_start = data_addr; } (*cnt)++; } #else if (load_addr >= SOC_DRAM_FLASH_ADDRESS_LOW && load_addr < SOC_DRAM_FLASH_ADDRESS_HIGH) { if (*cnt == 0) { s_flash_drom_paddr_start = data_addr; } else if (*cnt == 1) { s_flash_irom_paddr_start = data_addr; } (*cnt)++; } #endif #else if (load_addr >= SOC_IRAM_FLASH_ADDRESS_LOW && load_addr < SOC_IRAM_FLASH_ADDRESS_HIGH) { s_flash_drom_paddr_start = data_addr; (*cnt)++; } if (load_addr >= SOC_DRAM_FLASH_ADDRESS_LOW && load_addr < SOC_DRAM_FLASH_ADDRESS_HIGH) { s_flash_irom_paddr_start = data_addr; (*cnt)++; } #endif ESP_EARLY_LOGD(TAG, "load_addr: %x, data_len: %x, flash_addr: 0x%x, data_addr: %x", load_addr, data_len, flash_addr, data_addr); if (data_len % 4 != 0) { ESP_RETURN_ON_FALSE_ISR(false, ESP_ERR_INVALID_STATE, TAG, "unaligned segment length 0x%"PRIx32, data_len); } return ESP_OK; } static esp_err_t process_segments(esp_image_metadata_t *data) { uint32_t start_segments = data->start_addr + data->image_len; uint32_t next_addr = start_segments; int cnt = 0; for (int i = 0; i < data->image.segment_count; i++) { esp_image_segment_header_t *header = &data->segments[i]; ESP_EARLY_LOGD(TAG, "loading segment header %d at offset 0x%"PRIx32, i, next_addr); ESP_RETURN_ON_ERROR_ISR(process_segment(i, next_addr, header, data, &cnt), TAG, "failed to process segment"); next_addr += sizeof(esp_image_segment_header_t); data->segment_data[i] = next_addr; next_addr += header->data_len; } assert(cnt == 2); uint32_t end_addr = next_addr; if (end_addr < data->start_addr) { return ESP_FAIL; } data->image_len += end_addr - start_segments; return ESP_OK; } void image_process_get_flash_segments_info(uint32_t *out_drom_paddr_start, uint32_t *out_irom_paddr_start) { assert(out_drom_paddr_start && out_irom_paddr_start); *out_drom_paddr_start = s_flash_drom_paddr_start; *out_irom_paddr_start = s_flash_irom_paddr_start; } esp_err_t image_process(void) { #if IMAGE_PROCESS_SUPPORTED_TARGETS esp_err_t ret = ESP_FAIL; /** * We use the MMU_LL_END_DROM_ENTRY_ID mmu entry as a map page for app to find the boot partition * This depends on 2nd bootloader to set the entry */ uint32_t paddr_base = mmu_ll_entry_id_to_paddr_base(0, MMU_LL_END_DROM_ENTRY_ID); uint32_t part_offset = paddr_base; esp_image_metadata_t image_data = {0}; ret = process_image_header(&image_data, part_offset); if (ret != ESP_OK) { ESP_EARLY_LOGE(TAG, "failed to process image header"); abort(); } ret = s_image_process_driver.process_segments(&image_data); if (ret != ESP_OK) { ESP_EARLY_LOGE(TAG, "failed to process segments"); return ESP_FAIL; } mmu_ll_set_entry_invalid(0, MMU_LL_END_DROM_ENTRY_ID); #else (void)s_image_process_driver; #endif return ESP_OK; } ```
Lithophane subtilis is a species of cutworm or dart moth in the family Noctuidae. It is found in North America. The MONA or Hodges number for Lithophane subtilis is 9900. References Further reading subtilis Articles created by Qbugbot Moths described in 1969
Damascus Community School is an unlicensed American school founded by the former US secretary of state John Foster Dulles in 1957 in Damascus, Syria. The school was built to promote American ideals and culture and to help steer Syria away from becoming a Soviet satellite. Since 2012, due to the situation in Syria, the school has been effectively shut down. Mission The Damascus Community School laid its foundation with the help of Syria's former foreign minister Salah al-Bitar, who was one of the co-founders of the Baath party. After much controversy between the school and the Syrian government, Damascus Community School, was finally able to obtain full license from the government. However, throughout the decades the school has seen itself become part of a political tug-of-war between the Syrian and American government whenever the relations of the two countries become sour. The school is credited with introducing Valentine’s Day to Syria, as well as many other Universal holidays. Annual tuition reaches to about US$17,000. Current enrollment is about 400 students. After an American raid into Syrian territory on October 26, 2008, the Syrian government decided to shut down the Damascus Community School in light of the violation of Syrian international borders and the absence of any official American explanation for the helicopter raid that killed 8 Syrian civilians. However, DCS Board of Directors voted to reopen Damascus Community School for 2010–2011 school year, grades PreK–8. Dr. James Leibzeit returned as a director. Following the 2011 unrest in Syria the school was shut down on January 22, 2012, and until further notice. In accordance with the Damascus Community School’s August 31, 2008, license and with previous enrollment procedures, Damascus Community School will enroll foreign students, Syrian students and students with dual Syrian-other nationality who have previously attended the school. Other Syrian students or Syrian students holding dual nationality who wish to enroll at the school will need to contact the Ministry of Education for approval before they are capable to register, as was the previous practice prior to the school’s closure in November 2008. References External links Damascus Community School Official site (Archive) Schools in Damascus International schools in Syria 1957 establishments in Syria Educational institutions established in 1957
```java /* * Janino - An embedded Java[TM] compiler * * * 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. */ /** * A set of (rudimentary) proxies for Java-8+ classes that also compile for Java 6 and 7. */ @NotNullByDefault package org.codehaus.commons.compiler.java8.java.util.function; import org.codehaus.commons.nullanalysis.NotNullByDefault; ```
```swift // // Tag.swift // Yams // // Created by Norio Nomura on 12/15/16. // /// Tags describe the the _type_ of a Node. public final class Tag { /// Tag name. public struct Name: RawRepresentable, Hashable { /// This `Tag.Name`'s raw string value. public let rawValue: String /// Create a `Tag.Name` with a raw string value. public init(rawValue: String) { self.rawValue = rawValue } } /// Shorthand accessor for `Tag(.implicit)`. public static var implicit: Tag { return Tag(.implicit) } /// Create a `Tag` with the specified name, resolver and constructor. /// /// - parameter name: Tag name. /// - parameter resolver: `Resolver` this tag should use, `.default` if omitted. /// - parameter constructor: `Constructor` this tag should use, `.default` if omitted. public init(_ name: Name, _ resolver: Resolver = .default, _ constructor: Constructor = .default) { self.resolver = resolver self.constructor = constructor self.name = name } /// Lens returning a copy of the current `Tag` with the specified overridden changes. /// /// - note: Omitting or passing nil for a parameter will preserve the current `Tag`'s value in the copy. /// /// - parameter name: Overridden tag name. /// - parameter resolver: Overridden resolver. /// - parameter constructor: Overridden constructor. /// /// - returns: A copy of the current `Tag` with the specified overridden changes. public func copy(with name: Name? = nil, resolver: Resolver? = nil, constructor: Constructor? = nil) -> Tag { return .init(name ?? self.name, resolver ?? self.resolver, constructor ?? self.constructor) } // internal let constructor: Constructor var name: Name fileprivate func resolved<T>(with value: T) -> Tag where T: TagResolvable { if name == .implicit { name = resolver.resolveTag(of: value) } else if name == .nonSpecific { name = T.defaultTagName } return self } // private private let resolver: Resolver } extension Tag: CustomStringConvertible { /// A textual representation of this tag. public var description: String { return name.rawValue } } extension Tag: Hashable { /// :nodoc: public func hash(into hasher: inout Hasher) { hasher.combine(name) } /// :nodoc: public static func == (lhs: Tag, rhs: Tag) -> Bool { return lhs.name == rhs.name } } extension Tag.Name: ExpressibleByStringLiteral { /// :nodoc: public init(stringLiteral value: String) { self.rawValue = value } } // path_to_url#Schema extension Tag.Name { // Special /// Tag should be resolved by value. public static let implicit: Tag.Name = "" /// Tag should not be resolved by value, and be resolved as .str, .seq or .map. public static let nonSpecific: Tag.Name = "!" // Failsafe Schema /// "tag:yaml.org,2002:str" <path_to_url public static let str: Tag.Name = "tag:yaml.org,2002:str" /// "tag:yaml.org,2002:seq" <path_to_url public static let seq: Tag.Name = "tag:yaml.org,2002:seq" /// "tag:yaml.org,2002:map" <path_to_url public static let map: Tag.Name = "tag:yaml.org,2002:map" // JSON Schema /// "tag:yaml.org,2002:bool" <path_to_url public static let bool: Tag.Name = "tag:yaml.org,2002:bool" /// "tag:yaml.org,2002:float" <path_to_url public static let float: Tag.Name = "tag:yaml.org,2002:float" /// "tag:yaml.org,2002:null" <path_to_url public static let null: Tag.Name = "tag:yaml.org,2002:null" /// "tag:yaml.org,2002:int" <path_to_url public static let int: Tag.Name = "tag:yaml.org,2002:int" // path_to_url /// "tag:yaml.org,2002:binary" <path_to_url public static let binary: Tag.Name = "tag:yaml.org,2002:binary" /// "tag:yaml.org,2002:merge" <path_to_url public static let merge: Tag.Name = "tag:yaml.org,2002:merge" /// "tag:yaml.org,2002:omap" <path_to_url public static let omap: Tag.Name = "tag:yaml.org,2002:omap" /// "tag:yaml.org,2002:pairs" <path_to_url public static let pairs: Tag.Name = "tag:yaml.org,2002:pairs" /// "tag:yaml.org,2002:set". <path_to_url public static let set: Tag.Name = "tag:yaml.org,2002:set" /// "tag:yaml.org,2002:timestamp" <path_to_url public static let timestamp: Tag.Name = "tag:yaml.org,2002:timestamp" /// "tag:yaml.org,2002:value" <path_to_url public static let value: Tag.Name = "tag:yaml.org,2002:value" /// "tag:yaml.org,2002:yaml" <path_to_url We don't support this. public static let yaml: Tag.Name = "tag:yaml.org,2002:yaml" } protocol TagResolvable { var tag: Tag { get } static var defaultTagName: Tag.Name { get } func resolveTag(using resolver: Resolver) -> Tag.Name } extension TagResolvable { var resolvedTag: Tag { return tag.resolved(with: self) } func resolveTag(using resolver: Resolver) -> Tag.Name { return tag.name == .implicit ? Self.defaultTagName : tag.name } } ```
```lua require 'torch' require 'nn' require 'VanillaRNN' require 'LSTM' local utils = require 'util.utils' local LM, parent = torch.class('nn.LanguageModel', 'nn.Module') function LM:__init(kwargs) self.idx_to_token = utils.get_kwarg(kwargs, 'idx_to_token') self.token_to_idx = {} self.vocab_size = 0 for idx, token in pairs(self.idx_to_token) do self.token_to_idx[token] = idx self.vocab_size = self.vocab_size + 1 end self.model_type = utils.get_kwarg(kwargs, 'model_type') self.wordvec_dim = utils.get_kwarg(kwargs, 'wordvec_size') self.rnn_size = utils.get_kwarg(kwargs, 'rnn_size') self.num_layers = utils.get_kwarg(kwargs, 'num_layers') self.dropout = utils.get_kwarg(kwargs, 'dropout') self.batchnorm = utils.get_kwarg(kwargs, 'batchnorm') local V, D, H = self.vocab_size, self.wordvec_dim, self.rnn_size self.net = nn.Sequential() self.rnns = {} self.bn_view_in = {} self.bn_view_out = {} self.net:add(nn.LookupTable(V, D)) for i = 1, self.num_layers do local prev_dim = H if i == 1 then prev_dim = D end local rnn if self.model_type == 'rnn' then rnn = nn.VanillaRNN(prev_dim, H) elseif self.model_type == 'lstm' then rnn = nn.LSTM(prev_dim, H) end rnn.remember_states = true table.insert(self.rnns, rnn) self.net:add(rnn) if self.batchnorm == 1 then local view_in = nn.View(1, 1, -1):setNumInputDims(3) table.insert(self.bn_view_in, view_in) self.net:add(view_in) self.net:add(nn.BatchNormalization(H)) local view_out = nn.View(1, -1):setNumInputDims(2) table.insert(self.bn_view_out, view_out) self.net:add(view_out) end if self.dropout > 0 then self.net:add(nn.Dropout(self.dropout)) end end -- After all the RNNs run, we will have a tensor of shape (N, T, H); -- we want to apply a 1D temporal convolution to predict scores for each -- vocab element, giving a tensor of shape (N, T, V). Unfortunately -- nn.TemporalConvolution is SUPER slow, so instead we will use a pair of -- views (N, T, H) -> (NT, H) and (NT, V) -> (N, T, V) with a nn.Linear in -- between. Unfortunately N and T can change on every minibatch, so we need -- to set them in the forward pass. self.view1 = nn.View(1, 1, -1):setNumInputDims(3) self.view2 = nn.View(1, -1):setNumInputDims(2) self.net:add(self.view1) self.net:add(nn.Linear(H, V)) self.net:add(self.view2) end function LM:updateOutput(input) local N, T = input:size(1), input:size(2) self.view1:resetSize(N * T, -1) self.view2:resetSize(N, T, -1) for _, view_in in ipairs(self.bn_view_in) do view_in:resetSize(N * T, -1) end for _, view_out in ipairs(self.bn_view_out) do view_out:resetSize(N, T, -1) end return self.net:forward(input) end function LM:backward(input, gradOutput, scale) return self.net:backward(input, gradOutput, scale) end function LM:parameters() return self.net:parameters() end function LM:training() self.net:training() parent.training(self) end function LM:evaluate() self.net:evaluate() parent.evaluate(self) end function LM:resetStates() for i, rnn in ipairs(self.rnns) do rnn:resetStates() end end function LM:encode_string(s) local encoded = torch.LongTensor(#s) for i = 1, #s do local token = s:sub(i, i) local idx = self.token_to_idx[token] assert(idx ~= nil, 'Got invalid idx') encoded[i] = idx end return encoded end function LM:decode_string(encoded) assert(torch.isTensor(encoded) and encoded:dim() == 1) local s = '' for i = 1, encoded:size(1) do local idx = encoded[i] local token = self.idx_to_token[idx] s = s .. token end return s end --[[ Sample from the language model. Note that this will reset the states of the underlying RNNs. Inputs: - init: String of length T0 - max_length: Number of characters to sample Returns: - sampled: (1, max_length) array of integers, where the first part is init. --]] function LM:sample(kwargs) local T = utils.get_kwarg(kwargs, 'length', 100) local start_text = utils.get_kwarg(kwargs, 'start_text', '') local verbose = utils.get_kwarg(kwargs, 'verbose', 0) local sample = utils.get_kwarg(kwargs, 'sample', 1) local temperature = utils.get_kwarg(kwargs, 'temperature', 1) local sampled = torch.LongTensor(1, T) self:resetStates() local scores, first_t if #start_text > 0 then if verbose > 0 then print('Seeding with: "' .. start_text .. '"') end local x = self:encode_string(start_text):view(1, -1) local T0 = x:size(2) sampled[{{}, {1, T0}}]:copy(x) scores = self:forward(x)[{{}, {T0, T0}}] first_t = T0 + 1 else if verbose > 0 then print('Seeding with uniform probabilities') end local w = self.net:get(1).weight scores = w.new(1, 1, self.vocab_size):fill(1) first_t = 1 end local _, next_char = nil, nil for t = first_t, T do if sample == 0 then _, next_char = scores:max(3) next_char = next_char[{{}, {}, 1}] else local probs = torch.div(scores, temperature):double():exp():squeeze() probs:div(torch.sum(probs)) next_char = torch.multinomial(probs, 1):view(1, 1) end sampled[{{}, {t, t}}]:copy(next_char) scores = self:forward(next_char) end self:resetStates() return self:decode_string(sampled[1]) end function LM:clearState() self.net:clearState() end ```
Kingdom of Tibet might refer to: Tibetan Empire Tibet (1912–1951)
```xml import { inject, injectable } from 'inversify'; import * as ESTree from 'estree'; import { IOptions } from '../../../interfaces/options/IOptions'; import { IRandomGenerator } from '../../../interfaces/utils/IRandomGenerator'; import { ServiceIdentifiers } from '../../../container/ServiceIdentifiers'; import { AbstractStringArrayIndexNode } from './AbstractStringArrayIndexNode'; import { NodeFactory } from '../../../node/NodeFactory'; import { NumberUtils } from '../../../utils/NumberUtils'; @injectable() export class StringArrayHexadecimalNumericStringIndexNode extends AbstractStringArrayIndexNode { /** * @param {IRandomGenerator} randomGenerator * @param {IOptions} options */ public constructor ( @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator, @inject(ServiceIdentifiers.IOptions) options: IOptions ) { super(randomGenerator, options); } /** * @param {number} index * @returns {Expression} */ public getNode (index: number): ESTree.Expression { const hexadecimalIndex: string = NumberUtils.toHex(index); return NodeFactory.literalNode(hexadecimalIndex); } } ```
†Partula variabilis was a species of air-breathing tropical land snail, a terrestrial pulmonate gastropod mollusk in the family Partulidae. This species was endemic to French Polynesia. It is now extinct. References Mollusc Specialist Group 1996. Partula variabilis. 2006 IUCN Red List of Threatened Species. Downloaded on 7 August 2007. Partula (gastropod) Extinct gastropods Taxa named by William Harper Pease Taxonomy articles created by Polbot
```c++ #include <Analyzer/WindowNode.h> #include <IO/Operators.h> #include <IO/WriteBufferFromString.h> #include <Parsers/ASTWindowDefinition.h> #include <Common/SipHash.h> #include <Common/assert_cast.h> namespace DB { WindowNode::WindowNode(WindowFrame window_frame_) : IQueryTreeNode(children_size) , window_frame(std::move(window_frame_)) { children[partition_by_child_index] = std::make_shared<ListNode>(); children[order_by_child_index] = std::make_shared<ListNode>(); } void WindowNode::dumpTreeImpl(WriteBuffer & buffer, FormatState & format_state, size_t indent) const { buffer << std::string(indent, ' ') << "WINDOW id: " << format_state.getNodeId(this); if (hasAlias()) buffer << ", alias: " << getAlias(); if (!parent_window_name.empty()) buffer << ", parent_window_name: " << parent_window_name; buffer << ", frame_type: " << window_frame.type; auto window_frame_bound_type_to_string = [](WindowFrame::BoundaryType boundary_type, bool boundary_preceding) { std::string value; if (boundary_type == WindowFrame::BoundaryType::Unbounded) value = "unbounded"; else if (boundary_type == WindowFrame::BoundaryType::Current) value = "current"; else if (boundary_type == WindowFrame::BoundaryType::Offset) value = "offset"; if (boundary_type != WindowFrame::BoundaryType::Current) { if (boundary_preceding) value += " preceding"; else value += " following"; } return value; }; buffer << ", frame_begin_type: " << window_frame_bound_type_to_string(window_frame.begin_type, window_frame.begin_preceding); buffer << ", frame_end_type: " << window_frame_bound_type_to_string(window_frame.end_type, window_frame.end_preceding); if (hasPartitionBy()) { buffer << '\n' << std::string(indent + 2, ' ') << "PARTITION BY\n"; getPartitionBy().dumpTreeImpl(buffer, format_state, indent + 4); } if (hasOrderBy()) { buffer << '\n' << std::string(indent + 2, ' ') << "ORDER BY\n"; getOrderBy().dumpTreeImpl(buffer, format_state, indent + 4); } if (hasFrameBeginOffset()) { buffer << '\n' << std::string(indent + 2, ' ') << "FRAME BEGIN OFFSET\n"; getFrameBeginOffsetNode()->dumpTreeImpl(buffer, format_state, indent + 4); } if (hasFrameEndOffset()) { buffer << '\n' << std::string(indent + 2, ' ') << "FRAME END OFFSET\n"; getFrameEndOffsetNode()->dumpTreeImpl(buffer, format_state, indent + 4); } } bool WindowNode::isEqualImpl(const IQueryTreeNode & rhs, CompareOptions) const { const auto & rhs_typed = assert_cast<const WindowNode &>(rhs); return window_frame == rhs_typed.window_frame && parent_window_name == rhs_typed.parent_window_name; } void WindowNode::updateTreeHashImpl(HashState & hash_state, CompareOptions) const { hash_state.update(window_frame.is_default); hash_state.update(window_frame.type); hash_state.update(window_frame.begin_type); hash_state.update(window_frame.begin_preceding); hash_state.update(window_frame.end_type); hash_state.update(window_frame.end_preceding); hash_state.update(parent_window_name); } QueryTreeNodePtr WindowNode::cloneImpl() const { auto window_node = std::make_shared<WindowNode>(window_frame); window_node->parent_window_name = parent_window_name; return window_node; } ASTPtr WindowNode::toASTImpl(const ConvertToASTOptions & options) const { auto window_definition = std::make_shared<ASTWindowDefinition>(); window_definition->parent_window_name = parent_window_name; if (hasPartitionBy()) { window_definition->children.push_back(getPartitionByNode()->toAST(options)); window_definition->partition_by = window_definition->children.back(); } if (hasOrderBy()) { window_definition->children.push_back(getOrderByNode()->toAST(options)); window_definition->order_by = window_definition->children.back(); } window_definition->frame_is_default = window_frame.is_default; window_definition->frame_type = window_frame.type; window_definition->frame_begin_type = window_frame.begin_type; window_definition->frame_begin_preceding = window_frame.begin_preceding; if (hasFrameBeginOffset()) { window_definition->children.push_back(getFrameBeginOffsetNode()->toAST(options)); window_definition->frame_begin_offset = window_definition->children.back(); } window_definition->frame_end_type = window_frame.end_type; window_definition->frame_end_preceding = window_frame.end_preceding; if (hasFrameEndOffset()) { window_definition->children.push_back(getFrameEndOffsetNode()->toAST(options)); window_definition->frame_end_offset = window_definition->children.back(); } return window_definition; } } ```
```java /* * * * 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 */ package io.ballerina.compiler.internal.parser.tree; import io.ballerina.compiler.syntax.tree.DistinctTypeDescriptorNode; import io.ballerina.compiler.syntax.tree.Node; import io.ballerina.compiler.syntax.tree.NonTerminalNode; import io.ballerina.compiler.syntax.tree.SyntaxKind; import java.util.Collection; import java.util.Collections; /** * This is a generated internal syntax tree node. * * @since 2.0.0 */ public class STDistinctTypeDescriptorNode extends STTypeDescriptorNode { public final STNode distinctKeyword; public final STNode typeDescriptor; STDistinctTypeDescriptorNode( STNode distinctKeyword, STNode typeDescriptor) { this( distinctKeyword, typeDescriptor, Collections.emptyList()); } STDistinctTypeDescriptorNode( STNode distinctKeyword, STNode typeDescriptor, Collection<STNodeDiagnostic> diagnostics) { super(SyntaxKind.DISTINCT_TYPE_DESC, diagnostics); this.distinctKeyword = distinctKeyword; this.typeDescriptor = typeDescriptor; addChildren( distinctKeyword, typeDescriptor); } @Override public STNode modifyWith(Collection<STNodeDiagnostic> diagnostics) { return new STDistinctTypeDescriptorNode( this.distinctKeyword, this.typeDescriptor, diagnostics); } public STDistinctTypeDescriptorNode modify( STNode distinctKeyword, STNode typeDescriptor) { if (checkForReferenceEquality( distinctKeyword, typeDescriptor)) { return this; } return new STDistinctTypeDescriptorNode( distinctKeyword, typeDescriptor, diagnostics); } @Override public Node createFacade(int position, NonTerminalNode parent) { return new DistinctTypeDescriptorNode(this, position, parent); } @Override public void accept(STNodeVisitor visitor) { visitor.visit(this); } @Override public <T> T apply(STNodeTransformer<T> transformer) { return transformer.transform(this); } } ```
```c++ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #if V8_TARGET_ARCH_IA32 #include "src/full-codegen/full-codegen.h" #include "src/ast/compile-time-value.h" #include "src/ast/scopes.h" #include "src/code-factory.h" #include "src/code-stubs.h" #include "src/codegen.h" #include "src/compilation-info.h" #include "src/compiler.h" #include "src/debug/debug.h" #include "src/ia32/frames-ia32.h" #include "src/ic/ic.h" namespace v8 { namespace internal { #define __ ACCESS_MASM(masm()) class JumpPatchSite BASE_EMBEDDED { public: explicit JumpPatchSite(MacroAssembler* masm) : masm_(masm) { #ifdef DEBUG info_emitted_ = false; #endif } ~JumpPatchSite() { DCHECK(patch_site_.is_bound() == info_emitted_); } void EmitJumpIfNotSmi(Register reg, Label* target, Label::Distance distance = Label::kFar) { __ test(reg, Immediate(kSmiTagMask)); EmitJump(not_carry, target, distance); // Always taken before patched. } void EmitJumpIfSmi(Register reg, Label* target, Label::Distance distance = Label::kFar) { __ test(reg, Immediate(kSmiTagMask)); EmitJump(carry, target, distance); // Never taken before patched. } void EmitPatchInfo() { if (patch_site_.is_bound()) { int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(&patch_site_); DCHECK(is_uint8(delta_to_patch_site)); __ test(eax, Immediate(delta_to_patch_site)); #ifdef DEBUG info_emitted_ = true; #endif } else { __ nop(); // Signals no inlined code. } } private: // jc will be patched with jz, jnc will become jnz. void EmitJump(Condition cc, Label* target, Label::Distance distance) { DCHECK(!patch_site_.is_bound() && !info_emitted_); DCHECK(cc == carry || cc == not_carry); __ bind(&patch_site_); __ j(cc, target, distance); } MacroAssembler* masm() { return masm_; } MacroAssembler* masm_; Label patch_site_; #ifdef DEBUG bool info_emitted_; #endif }; // Generate code for a JS function. On entry to the function the receiver // and arguments have been pushed on the stack left to right, with the // return address on top of them. The actual argument count matches the // formal parameter count expected by the function. // // The live registers are: // o edi: the JS function object being called (i.e. ourselves) // o edx: the new target value // o esi: our context // o ebp: our caller's frame pointer // o esp: stack pointer (pointing to return address) // // The function builds a JS frame. Please see JavaScriptFrameConstants in // frames-ia32.h for its layout. void FullCodeGenerator::Generate() { CompilationInfo* info = info_; profiling_counter_ = isolate()->factory()->NewCell( Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate())); SetFunctionPosition(literal()); Comment cmnt(masm_, "[ function compiled by full code generator"); ProfileEntryHookStub::MaybeCallEntryHook(masm_); if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) { int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; __ mov(ecx, Operand(esp, receiver_offset)); __ AssertNotSmi(ecx); __ CmpObjectType(ecx, FIRST_JS_RECEIVER_TYPE, ecx); __ Assert(above_equal, kSloppyFunctionExpectsJSReceiverReceiver); } // Open a frame scope to indicate that there is a frame on the stack. The // MANUAL indicates that the scope shouldn't actually generate code to set up // the frame (that is done below). FrameScope frame_scope(masm_, StackFrame::MANUAL); info->set_prologue_offset(masm_->pc_offset()); __ Prologue(info->GeneratePreagedPrologue()); // Increment invocation count for the function. { Comment cmnt(masm_, "[ Increment invocation count"); __ mov(ecx, FieldOperand(edi, JSFunction::kLiteralsOffset)); __ mov(ecx, FieldOperand(ecx, LiteralsArray::kFeedbackVectorOffset)); __ add(FieldOperand( ecx, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + TypeFeedbackVector::kHeaderSize), Immediate(Smi::FromInt(1))); } { Comment cmnt(masm_, "[ Allocate locals"); int locals_count = info->scope()->num_stack_slots(); OperandStackDepthIncrement(locals_count); if (locals_count == 1) { __ push(Immediate(isolate()->factory()->undefined_value())); } else if (locals_count > 1) { if (locals_count >= 128) { Label ok; __ mov(ecx, esp); __ sub(ecx, Immediate(locals_count * kPointerSize)); ExternalReference stack_limit = ExternalReference::address_of_real_stack_limit(isolate()); __ cmp(ecx, Operand::StaticVariable(stack_limit)); __ j(above_equal, &ok, Label::kNear); __ CallRuntime(Runtime::kThrowStackOverflow); __ bind(&ok); } __ mov(eax, Immediate(isolate()->factory()->undefined_value())); const int kMaxPushes = 32; if (locals_count >= kMaxPushes) { int loop_iterations = locals_count / kMaxPushes; __ mov(ecx, loop_iterations); Label loop_header; __ bind(&loop_header); // Do pushes. for (int i = 0; i < kMaxPushes; i++) { __ push(eax); } __ dec(ecx); __ j(not_zero, &loop_header, Label::kNear); } int remaining = locals_count % kMaxPushes; // Emit the remaining pushes. for (int i = 0; i < remaining; i++) { __ push(eax); } } } bool function_in_register = true; // Possibly allocate a local context. if (info->scope()->NeedsContext()) { Comment cmnt(masm_, "[ Allocate context"); bool need_write_barrier = true; int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; // Argument to NewContext is the function, which is still in edi. if (info->scope()->is_script_scope()) { __ push(edi); __ Push(info->scope()->scope_info()); __ CallRuntime(Runtime::kNewScriptContext); PrepareForBailoutForId(BailoutId::ScriptContext(), BailoutState::TOS_REGISTER); // The new target value is not used, clobbering is safe. DCHECK_NULL(info->scope()->new_target_var()); } else { if (info->scope()->new_target_var() != nullptr) { __ push(edx); // Preserve new target. } if (slots <= FastNewFunctionContextStub::kMaximumSlots) { FastNewFunctionContextStub stub(isolate()); __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Immediate(slots)); __ CallStub(&stub); // Result of FastNewFunctionContextStub is always in new space. need_write_barrier = false; } else { __ push(edi); __ CallRuntime(Runtime::kNewFunctionContext); } if (info->scope()->new_target_var() != nullptr) { __ pop(edx); // Restore new target. } } function_in_register = false; // Context is returned in eax. It replaces the context passed to us. // It's saved in the stack and kept live in esi. __ mov(esi, eax); __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); // Copy parameters into context if necessary. int num_parameters = info->scope()->num_parameters(); int first_parameter = info->scope()->has_this_declaration() ? -1 : 0; for (int i = first_parameter; i < num_parameters; i++) { Variable* var = (i == -1) ? info->scope()->receiver() : info->scope()->parameter(i); if (var->IsContextSlot()) { int parameter_offset = StandardFrameConstants::kCallerSPOffset + (num_parameters - 1 - i) * kPointerSize; // Load parameter from stack. __ mov(eax, Operand(ebp, parameter_offset)); // Store it in the context. int context_offset = Context::SlotOffset(var->index()); __ mov(Operand(esi, context_offset), eax); // Update the write barrier. This clobbers eax and ebx. if (need_write_barrier) { __ RecordWriteContextSlot(esi, context_offset, eax, ebx, kDontSaveFPRegs); } else if (FLAG_debug_code) { Label done; __ JumpIfInNewSpace(esi, eax, &done, Label::kNear); __ Abort(kExpectedNewSpaceObject); __ bind(&done); } } } } // Register holding this function and new target are both trashed in case we // bailout here. But since that can happen only when new target is not used // and we allocate a context, the value of |function_in_register| is correct. PrepareForBailoutForId(BailoutId::FunctionContext(), BailoutState::NO_REGISTERS); // We don't support new.target and rest parameters here. DCHECK_NULL(info->scope()->new_target_var()); DCHECK_NULL(info->scope()->rest_parameter()); DCHECK_NULL(info->scope()->this_function_var()); Variable* arguments = info->scope()->arguments(); if (arguments != NULL) { // Arguments object must be allocated after the context object, in // case the "arguments" or ".arguments" variables are in the context. Comment cmnt(masm_, "[ Allocate arguments object"); if (!function_in_register) { __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); } if (is_strict(language_mode()) || !has_simple_parameters()) { FastNewStrictArgumentsStub stub(isolate()); __ CallStub(&stub); } else if (literal()->has_duplicate_parameters()) { __ Push(edi); __ CallRuntime(Runtime::kNewSloppyArguments_Generic); } else { FastNewSloppyArgumentsStub stub(isolate()); __ CallStub(&stub); } SetVar(arguments, eax, ebx, edx); } if (FLAG_trace) { __ CallRuntime(Runtime::kTraceEnter); } // Visit the declarations and body. PrepareForBailoutForId(BailoutId::FunctionEntry(), BailoutState::NO_REGISTERS); { Comment cmnt(masm_, "[ Declarations"); VisitDeclarations(info->scope()->declarations()); } // Assert that the declarations do not use ICs. Otherwise the debugger // won't be able to redirect a PC at an IC to the correct IC in newly // recompiled code. DCHECK_EQ(0, ic_total_count_); { Comment cmnt(masm_, "[ Stack check"); PrepareForBailoutForId(BailoutId::Declarations(), BailoutState::NO_REGISTERS); Label ok; ExternalReference stack_limit = ExternalReference::address_of_stack_limit(isolate()); __ cmp(esp, Operand::StaticVariable(stack_limit)); __ j(above_equal, &ok, Label::kNear); __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); __ bind(&ok); } { Comment cmnt(masm_, "[ Body"); DCHECK(loop_depth() == 0); VisitStatements(literal()->body()); DCHECK(loop_depth() == 0); } // Always emit a 'return undefined' in case control fell off the end of // the body. { Comment cmnt(masm_, "[ return <undefined>;"); __ mov(eax, isolate()->factory()->undefined_value()); EmitReturnSequence(); } } void FullCodeGenerator::ClearAccumulator() { __ Move(eax, Immediate(Smi::kZero)); } void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) { __ mov(ebx, Immediate(profiling_counter_)); __ sub(FieldOperand(ebx, Cell::kValueOffset), Immediate(Smi::FromInt(delta))); } void FullCodeGenerator::EmitProfilingCounterReset() { int reset_value = FLAG_interrupt_budget; __ mov(ebx, Immediate(profiling_counter_)); __ mov(FieldOperand(ebx, Cell::kValueOffset), Immediate(Smi::FromInt(reset_value))); } void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, Label* back_edge_target) { Comment cmnt(masm_, "[ Back edge bookkeeping"); Label ok; DCHECK(back_edge_target->is_bound()); int distance = masm_->SizeOfCodeGeneratedSince(back_edge_target); int weight = Min(kMaxBackEdgeWeight, Max(1, distance / kCodeSizeMultiplier)); EmitProfilingCounterDecrement(weight); __ j(positive, &ok, Label::kNear); __ call(isolate()->builtins()->InterruptCheck(), RelocInfo::CODE_TARGET); // Record a mapping of this PC offset to the OSR id. This is used to find // the AST id from the unoptimized code in order to use it as a key into // the deoptimization input data found in the optimized code. RecordBackEdge(stmt->OsrEntryId()); EmitProfilingCounterReset(); __ bind(&ok); PrepareForBailoutForId(stmt->EntryId(), BailoutState::NO_REGISTERS); // Record a mapping of the OSR id to this PC. This is used if the OSR // entry becomes the target of a bailout. We don't expect it to be, but // we want it to work if it is. PrepareForBailoutForId(stmt->OsrEntryId(), BailoutState::NO_REGISTERS); } void FullCodeGenerator::EmitProfilingCounterHandlingForReturnSequence( bool is_tail_call) { // Pretend that the exit is a backwards jump to the entry. int weight = 1; if (info_->ShouldSelfOptimize()) { weight = FLAG_interrupt_budget / FLAG_self_opt_count; } else { int distance = masm_->pc_offset(); weight = Min(kMaxBackEdgeWeight, Max(1, distance / kCodeSizeMultiplier)); } EmitProfilingCounterDecrement(weight); Label ok; __ j(positive, &ok, Label::kNear); // Don't need to save result register if we are going to do a tail call. if (!is_tail_call) { __ push(eax); } __ call(isolate()->builtins()->InterruptCheck(), RelocInfo::CODE_TARGET); if (!is_tail_call) { __ pop(eax); } EmitProfilingCounterReset(); __ bind(&ok); } void FullCodeGenerator::EmitReturnSequence() { Comment cmnt(masm_, "[ Return sequence"); if (return_label_.is_bound()) { __ jmp(&return_label_); } else { // Common return label __ bind(&return_label_); if (FLAG_trace) { __ push(eax); __ CallRuntime(Runtime::kTraceExit); } EmitProfilingCounterHandlingForReturnSequence(false); SetReturnPosition(literal()); __ leave(); int arg_count = info_->scope()->num_parameters() + 1; int arguments_bytes = arg_count * kPointerSize; __ Ret(arguments_bytes, ecx); } } void FullCodeGenerator::RestoreContext() { __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); } void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { DCHECK(var->IsStackAllocated() || var->IsContextSlot()); MemOperand operand = codegen()->VarOperand(var, result_register()); // Memory operands can be pushed directly. codegen()->PushOperand(operand); } void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { UNREACHABLE(); // Not used on IA32. } void FullCodeGenerator::AccumulatorValueContext::Plug( Heap::RootListIndex index) const { UNREACHABLE(); // Not used on IA32. } void FullCodeGenerator::StackValueContext::Plug( Heap::RootListIndex index) const { UNREACHABLE(); // Not used on IA32. } void FullCodeGenerator::TestContext::Plug(Heap::RootListIndex index) const { UNREACHABLE(); // Not used on IA32. } void FullCodeGenerator::EffectContext::Plug(Handle<Object> lit) const { } void FullCodeGenerator::AccumulatorValueContext::Plug( Handle<Object> lit) const { if (lit->IsSmi()) { __ SafeMove(result_register(), Immediate(lit)); } else { __ Move(result_register(), Immediate(lit)); } } void FullCodeGenerator::StackValueContext::Plug(Handle<Object> lit) const { codegen()->OperandStackDepthIncrement(1); if (lit->IsSmi()) { __ SafePush(Immediate(lit)); } else { __ push(Immediate(lit)); } } void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { codegen()->PrepareForBailoutBeforeSplit(condition(), true, true_label_, false_label_); DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || !lit->IsUndetectable()); if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) || lit->IsFalse(isolate())) { if (false_label_ != fall_through_) __ jmp(false_label_); } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { if (true_label_ != fall_through_) __ jmp(true_label_); } else if (lit->IsString()) { if (String::cast(*lit)->length() == 0) { if (false_label_ != fall_through_) __ jmp(false_label_); } else { if (true_label_ != fall_through_) __ jmp(true_label_); } } else if (lit->IsSmi()) { if (Smi::cast(*lit)->value() == 0) { if (false_label_ != fall_through_) __ jmp(false_label_); } else { if (true_label_ != fall_through_) __ jmp(true_label_); } } else { // For simplicity we always test the accumulator register. __ mov(result_register(), lit); codegen()->DoTest(this); } } void FullCodeGenerator::StackValueContext::DropAndPlug(int count, Register reg) const { DCHECK(count > 0); if (count > 1) codegen()->DropOperands(count - 1); __ mov(Operand(esp, 0), reg); } void FullCodeGenerator::EffectContext::Plug(Label* materialize_true, Label* materialize_false) const { DCHECK(materialize_true == materialize_false); __ bind(materialize_true); } void FullCodeGenerator::AccumulatorValueContext::Plug( Label* materialize_true, Label* materialize_false) const { Label done; __ bind(materialize_true); __ mov(result_register(), isolate()->factory()->true_value()); __ jmp(&done, Label::kNear); __ bind(materialize_false); __ mov(result_register(), isolate()->factory()->false_value()); __ bind(&done); } void FullCodeGenerator::StackValueContext::Plug( Label* materialize_true, Label* materialize_false) const { codegen()->OperandStackDepthIncrement(1); Label done; __ bind(materialize_true); __ push(Immediate(isolate()->factory()->true_value())); __ jmp(&done, Label::kNear); __ bind(materialize_false); __ push(Immediate(isolate()->factory()->false_value())); __ bind(&done); } void FullCodeGenerator::TestContext::Plug(Label* materialize_true, Label* materialize_false) const { DCHECK(materialize_true == true_label_); DCHECK(materialize_false == false_label_); } void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { Handle<Object> value = flag ? isolate()->factory()->true_value() : isolate()->factory()->false_value(); __ mov(result_register(), value); } void FullCodeGenerator::StackValueContext::Plug(bool flag) const { codegen()->OperandStackDepthIncrement(1); Handle<Object> value = flag ? isolate()->factory()->true_value() : isolate()->factory()->false_value(); __ push(Immediate(value)); } void FullCodeGenerator::TestContext::Plug(bool flag) const { codegen()->PrepareForBailoutBeforeSplit(condition(), true, true_label_, false_label_); if (flag) { if (true_label_ != fall_through_) __ jmp(true_label_); } else { if (false_label_ != fall_through_) __ jmp(false_label_); } } void FullCodeGenerator::DoTest(Expression* condition, Label* if_true, Label* if_false, Label* fall_through) { Handle<Code> ic = ToBooleanICStub::GetUninitialized(isolate()); CallIC(ic, condition->test_id()); __ CompareRoot(result_register(), Heap::kTrueValueRootIndex); Split(equal, if_true, if_false, fall_through); } void FullCodeGenerator::Split(Condition cc, Label* if_true, Label* if_false, Label* fall_through) { if (if_false == fall_through) { __ j(cc, if_true); } else if (if_true == fall_through) { __ j(NegateCondition(cc), if_false); } else { __ j(cc, if_true); __ jmp(if_false); } } MemOperand FullCodeGenerator::StackOperand(Variable* var) { DCHECK(var->IsStackAllocated()); // Offset is negative because higher indexes are at lower addresses. int offset = -var->index() * kPointerSize; // Adjust by a (parameter or local) base offset. if (var->IsParameter()) { offset += (info_->scope()->num_parameters() + 1) * kPointerSize; } else { offset += JavaScriptFrameConstants::kLocal0Offset; } return Operand(ebp, offset); } MemOperand FullCodeGenerator::VarOperand(Variable* var, Register scratch) { DCHECK(var->IsContextSlot() || var->IsStackAllocated()); if (var->IsContextSlot()) { int context_chain_length = scope()->ContextChainLength(var->scope()); __ LoadContext(scratch, context_chain_length); return ContextOperand(scratch, var->index()); } else { return StackOperand(var); } } void FullCodeGenerator::GetVar(Register dest, Variable* var) { DCHECK(var->IsContextSlot() || var->IsStackAllocated()); MemOperand location = VarOperand(var, dest); __ mov(dest, location); } void FullCodeGenerator::SetVar(Variable* var, Register src, Register scratch0, Register scratch1) { DCHECK(var->IsContextSlot() || var->IsStackAllocated()); DCHECK(!scratch0.is(src)); DCHECK(!scratch0.is(scratch1)); DCHECK(!scratch1.is(src)); MemOperand location = VarOperand(var, scratch0); __ mov(location, src); // Emit the write barrier code if the location is in the heap. if (var->IsContextSlot()) { int offset = Context::SlotOffset(var->index()); DCHECK(!scratch0.is(esi) && !src.is(esi) && !scratch1.is(esi)); __ RecordWriteContextSlot(scratch0, offset, src, scratch1, kDontSaveFPRegs); } } void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, bool should_normalize, Label* if_true, Label* if_false) { // Only prepare for bailouts before splits if we're in a test // context. Otherwise, we let the Visit function deal with the // preparation to avoid preparing with the same AST id twice. if (!context()->IsTest()) return; Label skip; if (should_normalize) __ jmp(&skip, Label::kNear); PrepareForBailout(expr, BailoutState::TOS_REGISTER); if (should_normalize) { __ cmp(eax, isolate()->factory()->true_value()); Split(equal, if_true, if_false, NULL); __ bind(&skip); } } void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) { // The variable in the declaration always resides in the current context. DCHECK_EQ(0, scope()->ContextChainLength(variable->scope())); if (FLAG_debug_code) { // Check that we're not inside a with or catch context. __ mov(ebx, FieldOperand(esi, HeapObject::kMapOffset)); __ cmp(ebx, isolate()->factory()->with_context_map()); __ Check(not_equal, kDeclarationInWithContext); __ cmp(ebx, isolate()->factory()->catch_context_map()); __ Check(not_equal, kDeclarationInCatchContext); } } void FullCodeGenerator::VisitVariableDeclaration( VariableDeclaration* declaration) { VariableProxy* proxy = declaration->proxy(); Variable* variable = proxy->var(); switch (variable->location()) { case VariableLocation::UNALLOCATED: { DCHECK(!variable->binding_needs_init()); globals_->Add(variable->name(), zone()); FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); DCHECK(!slot.IsInvalid()); globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); globals_->Add(isolate()->factory()->undefined_value(), zone()); break; } case VariableLocation::PARAMETER: case VariableLocation::LOCAL: if (variable->binding_needs_init()) { Comment cmnt(masm_, "[ VariableDeclaration"); __ mov(StackOperand(variable), Immediate(isolate()->factory()->the_hole_value())); } break; case VariableLocation::CONTEXT: if (variable->binding_needs_init()) { Comment cmnt(masm_, "[ VariableDeclaration"); EmitDebugCheckDeclarationContext(variable); __ mov(ContextOperand(esi, variable->index()), Immediate(isolate()->factory()->the_hole_value())); // No write barrier since the hole value is in old space. PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); } break; case VariableLocation::LOOKUP: case VariableLocation::MODULE: UNREACHABLE(); } } void FullCodeGenerator::VisitFunctionDeclaration( FunctionDeclaration* declaration) { VariableProxy* proxy = declaration->proxy(); Variable* variable = proxy->var(); switch (variable->location()) { case VariableLocation::UNALLOCATED: { globals_->Add(variable->name(), zone()); FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); DCHECK(!slot.IsInvalid()); globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); Handle<SharedFunctionInfo> function = Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); // Check for stack-overflow exception. if (function.is_null()) return SetStackOverflow(); globals_->Add(function, zone()); break; } case VariableLocation::PARAMETER: case VariableLocation::LOCAL: { Comment cmnt(masm_, "[ FunctionDeclaration"); VisitForAccumulatorValue(declaration->fun()); __ mov(StackOperand(variable), result_register()); break; } case VariableLocation::CONTEXT: { Comment cmnt(masm_, "[ FunctionDeclaration"); EmitDebugCheckDeclarationContext(variable); VisitForAccumulatorValue(declaration->fun()); __ mov(ContextOperand(esi, variable->index()), result_register()); // We know that we have written a function, which is not a smi. __ RecordWriteContextSlot(esi, Context::SlotOffset(variable->index()), result_register(), ecx, kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); break; } case VariableLocation::LOOKUP: case VariableLocation::MODULE: UNREACHABLE(); } } void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { // Call the runtime to declare the globals. __ Push(pairs); __ Push(Smi::FromInt(DeclareGlobalsFlags())); __ EmitLoadTypeFeedbackVector(eax); __ Push(eax); __ CallRuntime(Runtime::kDeclareGlobals); // Return value is ignored. } void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { Comment cmnt(masm_, "[ SwitchStatement"); Breakable nested_statement(this, stmt); SetStatementPosition(stmt); // Keep the switch value on the stack until a case matches. VisitForStackValue(stmt->tag()); PrepareForBailoutForId(stmt->EntryId(), BailoutState::NO_REGISTERS); ZoneList<CaseClause*>* clauses = stmt->cases(); CaseClause* default_clause = NULL; // Can occur anywhere in the list. Label next_test; // Recycled for each test. // Compile all the tests with branches to their bodies. for (int i = 0; i < clauses->length(); i++) { CaseClause* clause = clauses->at(i); clause->body_target()->Unuse(); // The default is not a test, but remember it as final fall through. if (clause->is_default()) { default_clause = clause; continue; } Comment cmnt(masm_, "[ Case comparison"); __ bind(&next_test); next_test.Unuse(); // Compile the label expression. VisitForAccumulatorValue(clause->label()); // Perform the comparison as if via '==='. __ mov(edx, Operand(esp, 0)); // Switch value. bool inline_smi_code = ShouldInlineSmiCase(Token::EQ_STRICT); JumpPatchSite patch_site(masm_); if (inline_smi_code) { Label slow_case; __ mov(ecx, edx); __ or_(ecx, eax); patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); __ cmp(edx, eax); __ j(not_equal, &next_test); __ Drop(1); // Switch value is no longer needed. __ jmp(clause->body_target()); __ bind(&slow_case); } SetExpressionPosition(clause); Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); CallIC(ic, clause->CompareId()); patch_site.EmitPatchInfo(); Label skip; __ jmp(&skip, Label::kNear); PrepareForBailout(clause, BailoutState::TOS_REGISTER); __ cmp(eax, isolate()->factory()->true_value()); __ j(not_equal, &next_test); __ Drop(1); __ jmp(clause->body_target()); __ bind(&skip); __ test(eax, eax); __ j(not_equal, &next_test); __ Drop(1); // Switch value is no longer needed. __ jmp(clause->body_target()); } // Discard the test value and jump to the default if present, otherwise to // the end of the statement. __ bind(&next_test); DropOperands(1); // Switch value is no longer needed. if (default_clause == NULL) { __ jmp(nested_statement.break_label()); } else { __ jmp(default_clause->body_target()); } // Compile all the case bodies. for (int i = 0; i < clauses->length(); i++) { Comment cmnt(masm_, "[ Case body"); CaseClause* clause = clauses->at(i); __ bind(clause->body_target()); PrepareForBailoutForId(clause->EntryId(), BailoutState::NO_REGISTERS); VisitStatements(clause->statements()); } __ bind(nested_statement.break_label()); PrepareForBailoutForId(stmt->ExitId(), BailoutState::NO_REGISTERS); } void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { Comment cmnt(masm_, "[ ForInStatement"); SetStatementPosition(stmt, SKIP_BREAK); FeedbackVectorSlot slot = stmt->ForInFeedbackSlot(); // Get the object to enumerate over. SetExpressionAsStatementPosition(stmt->enumerable()); VisitForAccumulatorValue(stmt->enumerable()); OperandStackDepthIncrement(5); Label loop, exit; Iteration loop_statement(this, stmt); increment_loop_depth(); // If the object is null or undefined, skip over the loop, otherwise convert // it to a JS receiver. See ECMA-262 version 5, section 12.6.4. Label convert, done_convert; __ JumpIfSmi(eax, &convert, Label::kNear); __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); __ j(above_equal, &done_convert, Label::kNear); __ cmp(eax, isolate()->factory()->undefined_value()); __ j(equal, &exit); __ cmp(eax, isolate()->factory()->null_value()); __ j(equal, &exit); __ bind(&convert); __ Call(isolate()->builtins()->ToObject(), RelocInfo::CODE_TARGET); RestoreContext(); __ bind(&done_convert); PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); __ push(eax); // Check cache validity in generated code. If we cannot guarantee cache // validity, call the runtime system to check cache validity or get the // property names in a fixed array. Note: Proxies never have an enum cache, // so will always take the slow path. Label call_runtime, use_cache, fixed_array; __ CheckEnumCache(&call_runtime); __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); __ jmp(&use_cache, Label::kNear); // Get the set of properties to enumerate. __ bind(&call_runtime); __ push(eax); __ CallRuntime(Runtime::kForInEnumerate); PrepareForBailoutForId(stmt->EnumId(), BailoutState::TOS_REGISTER); __ cmp(FieldOperand(eax, HeapObject::kMapOffset), isolate()->factory()->meta_map()); __ j(not_equal, &fixed_array); // We got a map in register eax. Get the enumeration cache from it. Label no_descriptors; __ bind(&use_cache); __ EnumLength(edx, eax); __ cmp(edx, Immediate(Smi::kZero)); __ j(equal, &no_descriptors); __ LoadInstanceDescriptors(eax, ecx); __ mov(ecx, FieldOperand(ecx, DescriptorArray::kEnumCacheOffset)); __ mov(ecx, FieldOperand(ecx, DescriptorArray::kEnumCacheBridgeCacheOffset)); // Set up the four remaining stack slots. __ push(eax); // Map. __ push(ecx); // Enumeration cache. __ push(edx); // Number of valid entries for the map in the enum cache. __ push(Immediate(Smi::kZero)); // Initial index. __ jmp(&loop); __ bind(&no_descriptors); __ add(esp, Immediate(kPointerSize)); __ jmp(&exit); // We got a fixed array in register eax. Iterate through that. __ bind(&fixed_array); __ push(Immediate(Smi::FromInt(1))); // Smi(1) indicates slow check __ push(eax); // Array __ mov(eax, FieldOperand(eax, FixedArray::kLengthOffset)); __ push(eax); // Fixed array length (as smi). PrepareForBailoutForId(stmt->PrepareId(), BailoutState::NO_REGISTERS); __ push(Immediate(Smi::kZero)); // Initial index. // Generate code for doing the condition check. __ bind(&loop); SetExpressionAsStatementPosition(stmt->each()); __ mov(eax, Operand(esp, 0 * kPointerSize)); // Get the current index. __ cmp(eax, Operand(esp, 1 * kPointerSize)); // Compare to the array length. __ j(above_equal, loop_statement.break_label()); // Get the current entry of the array into register eax. __ mov(ebx, Operand(esp, 2 * kPointerSize)); __ mov(eax, FieldOperand(ebx, eax, times_2, FixedArray::kHeaderSize)); // Get the expected map from the stack or a smi in the // permanent slow case into register edx. __ mov(edx, Operand(esp, 3 * kPointerSize)); // Check if the expected map still matches that of the enumerable. // If not, we may have to filter the key. Label update_each; __ mov(ebx, Operand(esp, 4 * kPointerSize)); __ cmp(edx, FieldOperand(ebx, HeapObject::kMapOffset)); __ j(equal, &update_each, Label::kNear); // We need to filter the key, record slow-path here. int const vector_index = SmiFromSlot(slot)->value(); __ EmitLoadTypeFeedbackVector(edx); __ mov(FieldOperand(edx, FixedArray::OffsetOfElementAt(vector_index)), Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate()))); // eax contains the key. The receiver in ebx is the second argument to the // ForInFilter. ForInFilter returns undefined if the receiver doesn't // have the key or returns the name-converted key. __ Call(isolate()->builtins()->ForInFilter(), RelocInfo::CODE_TARGET); RestoreContext(); PrepareForBailoutForId(stmt->FilterId(), BailoutState::TOS_REGISTER); __ JumpIfRoot(result_register(), Heap::kUndefinedValueRootIndex, loop_statement.continue_label()); // Update the 'each' property or variable from the possibly filtered // entry in register eax. __ bind(&update_each); // Perform the assignment as if via '='. { EffectContext context(this); EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); PrepareForBailoutForId(stmt->AssignmentId(), BailoutState::NO_REGISTERS); } // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); // Generate code for the body of the loop. Visit(stmt->body()); // Generate code for going to the next element by incrementing the // index (smi) stored on top of the stack. __ bind(loop_statement.continue_label()); PrepareForBailoutForId(stmt->IncrementId(), BailoutState::NO_REGISTERS); __ add(Operand(esp, 0 * kPointerSize), Immediate(Smi::FromInt(1))); EmitBackEdgeBookkeeping(stmt, &loop); __ jmp(&loop); // Remove the pointers stored on the stack. __ bind(loop_statement.break_label()); DropOperands(5); // Exit and decrement the loop depth. PrepareForBailoutForId(stmt->ExitId(), BailoutState::NO_REGISTERS); __ bind(&exit); decrement_loop_depth(); } void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, FeedbackVectorSlot slot) { DCHECK(NeedsHomeObject(initializer)); __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); __ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize)); CallStoreIC(slot, isolate()->factory()->home_object_symbol()); } void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer, int offset, FeedbackVectorSlot slot) { DCHECK(NeedsHomeObject(initializer)); __ mov(StoreDescriptor::ReceiverRegister(), eax); __ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize)); CallStoreIC(slot, isolate()->factory()->home_object_symbol()); } void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, TypeofMode typeof_mode) { SetExpressionPosition(proxy); PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); Variable* var = proxy->var(); // Two cases: global variables and all other types of variables. switch (var->location()) { case VariableLocation::UNALLOCATED: { Comment cmnt(masm_, "[ Global variable"); EmitGlobalVariableLoad(proxy, typeof_mode); context()->Plug(eax); break; } case VariableLocation::PARAMETER: case VariableLocation::LOCAL: case VariableLocation::CONTEXT: { DCHECK_EQ(NOT_INSIDE_TYPEOF, typeof_mode); Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable" : "[ Stack variable"); if (proxy->hole_check_mode() == HoleCheckMode::kRequired) { // Throw a reference error when using an uninitialized let/const // binding in harmony mode. Label done; GetVar(eax, var); __ cmp(eax, isolate()->factory()->the_hole_value()); __ j(not_equal, &done, Label::kNear); __ push(Immediate(var->name())); __ CallRuntime(Runtime::kThrowReferenceError); __ bind(&done); context()->Plug(eax); break; } context()->Plug(var); break; } case VariableLocation::LOOKUP: case VariableLocation::MODULE: UNREACHABLE(); } } void FullCodeGenerator::EmitAccessor(ObjectLiteralProperty* property) { Expression* expression = (property == NULL) ? NULL : property->value(); if (expression == NULL) { PushOperand(isolate()->factory()->null_value()); } else { VisitForStackValue(expression); if (NeedsHomeObject(expression)) { DCHECK(property->kind() == ObjectLiteral::Property::GETTER || property->kind() == ObjectLiteral::Property::SETTER); int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3; EmitSetHomeObject(expression, offset, property->GetSlot()); } } } void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { Comment cmnt(masm_, "[ ObjectLiteral"); Handle<FixedArray> constant_properties = expr->constant_properties(); int flags = expr->ComputeFlags(); // If any of the keys would store to the elements array, then we shouldn't // allow it. if (MustCreateObjectLiteralWithRuntime(expr)) { __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ push(Immediate(Smi::FromInt(expr->literal_index()))); __ push(Immediate(constant_properties)); __ push(Immediate(Smi::FromInt(flags))); __ CallRuntime(Runtime::kCreateObjectLiteral); } else { __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); __ mov(ecx, Immediate(constant_properties)); __ mov(edx, Immediate(Smi::FromInt(flags))); FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); RestoreContext(); } PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); // If result_saved is true the result is on top of the stack. If // result_saved is false the result is in eax. bool result_saved = false; AccessorTable accessor_table(zone()); for (int i = 0; i < expr->properties()->length(); i++) { ObjectLiteral::Property* property = expr->properties()->at(i); DCHECK(!property->is_computed_name()); if (property->IsCompileTimeValue()) continue; Literal* key = property->key()->AsLiteral(); Expression* value = property->value(); if (!result_saved) { PushOperand(eax); // Save result on the stack result_saved = true; } switch (property->kind()) { case ObjectLiteral::Property::CONSTANT: UNREACHABLE(); case ObjectLiteral::Property::MATERIALIZED_LITERAL: DCHECK(!CompileTimeValue::IsCompileTimeValue(value)); // Fall through. case ObjectLiteral::Property::COMPUTED: // It is safe to use [[Put]] here because the boilerplate already // contains computed properties with an uninitialized value. if (key->IsStringLiteral()) { DCHECK(key->IsPropertyName()); if (property->emit_store()) { VisitForAccumulatorValue(value); DCHECK(StoreDescriptor::ValueRegister().is(eax)); __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); CallStoreIC(property->GetSlot(0), key->value()); PrepareForBailoutForId(key->id(), BailoutState::NO_REGISTERS); if (NeedsHomeObject(value)) { EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); } } else { VisitForEffect(value); } break; } PushOperand(Operand(esp, 0)); // Duplicate receiver. VisitForStackValue(key); VisitForStackValue(value); if (property->emit_store()) { if (NeedsHomeObject(value)) { EmitSetHomeObject(value, 2, property->GetSlot()); } PushOperand(Smi::FromInt(SLOPPY)); // Language mode CallRuntimeWithOperands(Runtime::kSetProperty); } else { DropOperands(3); } break; case ObjectLiteral::Property::PROTOTYPE: PushOperand(Operand(esp, 0)); // Duplicate receiver. VisitForStackValue(value); DCHECK(property->emit_store()); CallRuntimeWithOperands(Runtime::kInternalSetPrototype); PrepareForBailoutForId(expr->GetIdForPropertySet(i), BailoutState::NO_REGISTERS); break; case ObjectLiteral::Property::GETTER: if (property->emit_store()) { AccessorTable::Iterator it = accessor_table.lookup(key); it->second->bailout_id = expr->GetIdForPropertySet(i); it->second->getter = property; } break; case ObjectLiteral::Property::SETTER: if (property->emit_store()) { AccessorTable::Iterator it = accessor_table.lookup(key); it->second->bailout_id = expr->GetIdForPropertySet(i); it->second->setter = property; } break; } } // Emit code to define accessors, using only a single call to the runtime for // each pair of corresponding getters and setters. for (AccessorTable::Iterator it = accessor_table.begin(); it != accessor_table.end(); ++it) { PushOperand(Operand(esp, 0)); // Duplicate receiver. VisitForStackValue(it->first); EmitAccessor(it->second->getter); EmitAccessor(it->second->setter); PushOperand(Smi::FromInt(NONE)); CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked); PrepareForBailoutForId(it->second->bailout_id, BailoutState::NO_REGISTERS); } if (result_saved) { context()->PlugTOS(); } else { context()->Plug(eax); } } void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { Comment cmnt(masm_, "[ ArrayLiteral"); Handle<FixedArray> constant_elements = expr->constant_elements(); bool has_constant_fast_elements = IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { // If the only customer of allocation sites is transitioning, then // we can turn it off if we don't have anywhere else to transition to. allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; } if (MustCreateArrayLiteralWithRuntime(expr)) { __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ push(Immediate(Smi::FromInt(expr->literal_index()))); __ push(Immediate(constant_elements)); __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); __ CallRuntime(Runtime::kCreateArrayLiteral); } else { __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); __ mov(ecx, Immediate(constant_elements)); FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); __ CallStub(&stub); RestoreContext(); } PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); bool result_saved = false; // Is the result saved to the stack? ZoneList<Expression*>* subexprs = expr->values(); int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. for (int array_index = 0; array_index < length; array_index++) { Expression* subexpr = subexprs->at(array_index); DCHECK(!subexpr->IsSpread()); // If the subexpression is a literal or a simple materialized literal it // is already set in the cloned array. if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; if (!result_saved) { PushOperand(eax); // array literal. result_saved = true; } VisitForAccumulatorValue(subexpr); __ mov(StoreDescriptor::NameRegister(), Immediate(Smi::FromInt(array_index))); __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); CallKeyedStoreIC(expr->LiteralFeedbackSlot()); PrepareForBailoutForId(expr->GetIdForElement(array_index), BailoutState::NO_REGISTERS); } if (result_saved) { context()->PlugTOS(); } else { context()->Plug(eax); } } void FullCodeGenerator::VisitAssignment(Assignment* expr) { DCHECK(expr->target()->IsValidReferenceExpressionOrThis()); Comment cmnt(masm_, "[ Assignment"); Property* property = expr->target()->AsProperty(); LhsKind assign_type = Property::GetAssignType(property); // Evaluate LHS expression. switch (assign_type) { case VARIABLE: // Nothing to do here. break; case NAMED_PROPERTY: if (expr->is_compound()) { // We need the receiver both on the stack and in the register. VisitForStackValue(property->obj()); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); } else { VisitForStackValue(property->obj()); } break; case KEYED_PROPERTY: { if (expr->is_compound()) { VisitForStackValue(property->obj()); VisitForStackValue(property->key()); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, kPointerSize)); __ mov(LoadDescriptor::NameRegister(), Operand(esp, 0)); } else { VisitForStackValue(property->obj()); VisitForStackValue(property->key()); } break; } case NAMED_SUPER_PROPERTY: case KEYED_SUPER_PROPERTY: UNREACHABLE(); break; } // For compound assignments we need another deoptimization point after the // variable/property load. if (expr->is_compound()) { AccumulatorValueContext result_context(this); { AccumulatorValueContext left_operand_context(this); switch (assign_type) { case VARIABLE: EmitVariableLoad(expr->target()->AsVariableProxy()); PrepareForBailout(expr->target(), BailoutState::TOS_REGISTER); break; case NAMED_PROPERTY: EmitNamedPropertyLoad(property); PrepareForBailoutForId(property->LoadId(), BailoutState::TOS_REGISTER); break; case KEYED_PROPERTY: EmitKeyedPropertyLoad(property); PrepareForBailoutForId(property->LoadId(), BailoutState::TOS_REGISTER); break; case NAMED_SUPER_PROPERTY: case KEYED_SUPER_PROPERTY: UNREACHABLE(); break; } } Token::Value op = expr->binary_op(); PushOperand(eax); // Left operand goes on the stack. VisitForAccumulatorValue(expr->value()); if (ShouldInlineSmiCase(op)) { EmitInlineSmiBinaryOp(expr->binary_operation(), op, expr->target(), expr->value()); } else { EmitBinaryOp(expr->binary_operation(), op); } // Deoptimization point in case the binary operation may have side effects. PrepareForBailout(expr->binary_operation(), BailoutState::TOS_REGISTER); } else { VisitForAccumulatorValue(expr->value()); } SetExpressionPosition(expr); // Store the value. switch (assign_type) { case VARIABLE: { VariableProxy* proxy = expr->target()->AsVariableProxy(); EmitVariableAssignment(proxy->var(), expr->op(), expr->AssignmentSlot(), proxy->hole_check_mode()); PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); context()->Plug(eax); break; } case NAMED_PROPERTY: EmitNamedPropertyAssignment(expr); break; case KEYED_PROPERTY: EmitKeyedPropertyAssignment(expr); break; case NAMED_SUPER_PROPERTY: case KEYED_SUPER_PROPERTY: UNREACHABLE(); break; } } void FullCodeGenerator::VisitYield(Yield* expr) { // Resumable functions are not supported. UNREACHABLE(); } void FullCodeGenerator::PushOperand(MemOperand operand) { OperandStackDepthIncrement(1); __ Push(operand); } void FullCodeGenerator::EmitOperandStackDepthCheck() { if (FLAG_debug_code) { int expected_diff = StandardFrameConstants::kFixedFrameSizeFromFp + operand_stack_depth_ * kPointerSize; __ mov(eax, ebp); __ sub(eax, esp); __ cmp(eax, Immediate(expected_diff)); __ Assert(equal, kUnexpectedStackDepth); } } void FullCodeGenerator::EmitCreateIteratorResult(bool done) { Label allocate, done_allocate; __ Allocate(JSIteratorResult::kSize, eax, ecx, edx, &allocate, NO_ALLOCATION_FLAGS); __ jmp(&done_allocate, Label::kNear); __ bind(&allocate); __ Push(Smi::FromInt(JSIteratorResult::kSize)); __ CallRuntime(Runtime::kAllocateInNewSpace); __ bind(&done_allocate); __ mov(ebx, NativeContextOperand()); __ mov(ebx, ContextOperand(ebx, Context::ITERATOR_RESULT_MAP_INDEX)); __ mov(FieldOperand(eax, HeapObject::kMapOffset), ebx); __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), isolate()->factory()->empty_fixed_array()); __ mov(FieldOperand(eax, JSObject::kElementsOffset), isolate()->factory()->empty_fixed_array()); __ pop(FieldOperand(eax, JSIteratorResult::kValueOffset)); __ mov(FieldOperand(eax, JSIteratorResult::kDoneOffset), isolate()->factory()->ToBoolean(done)); STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); OperandStackDepthDecrement(1); } void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, Token::Value op, Expression* left, Expression* right) { // Do combined smi check of the operands. Left operand is on the // stack. Right operand is in eax. Label smi_case, done, stub_call; PopOperand(edx); __ mov(ecx, eax); __ or_(eax, edx); JumpPatchSite patch_site(masm_); patch_site.EmitJumpIfSmi(eax, &smi_case, Label::kNear); __ bind(&stub_call); __ mov(eax, ecx); Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code(); CallIC(code, expr->BinaryOperationFeedbackId()); patch_site.EmitPatchInfo(); __ jmp(&done, Label::kNear); // Smi case. __ bind(&smi_case); __ mov(eax, edx); // Copy left operand in case of a stub call. switch (op) { case Token::SAR: __ SmiUntag(ecx); __ sar_cl(eax); // No checks of result necessary __ and_(eax, Immediate(~kSmiTagMask)); break; case Token::SHL: { Label result_ok; __ SmiUntag(eax); __ SmiUntag(ecx); __ shl_cl(eax); // Check that the *signed* result fits in a smi. __ cmp(eax, 0xc0000000); __ j(positive, &result_ok); __ SmiTag(ecx); __ jmp(&stub_call); __ bind(&result_ok); __ SmiTag(eax); break; } case Token::SHR: { Label result_ok; __ SmiUntag(eax); __ SmiUntag(ecx); __ shr_cl(eax); __ test(eax, Immediate(0xc0000000)); __ j(zero, &result_ok); __ SmiTag(ecx); __ jmp(&stub_call); __ bind(&result_ok); __ SmiTag(eax); break; } case Token::ADD: __ add(eax, ecx); __ j(overflow, &stub_call); break; case Token::SUB: __ sub(eax, ecx); __ j(overflow, &stub_call); break; case Token::MUL: { __ SmiUntag(eax); __ imul(eax, ecx); __ j(overflow, &stub_call); __ test(eax, eax); __ j(not_zero, &done, Label::kNear); __ mov(ebx, edx); __ or_(ebx, ecx); __ j(negative, &stub_call); break; } case Token::BIT_OR: __ or_(eax, ecx); break; case Token::BIT_AND: __ and_(eax, ecx); break; case Token::BIT_XOR: __ xor_(eax, ecx); break; default: UNREACHABLE(); } __ bind(&done); context()->Plug(eax); } void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { PopOperand(edx); Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code(); JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. CallIC(code, expr->BinaryOperationFeedbackId()); patch_site.EmitPatchInfo(); context()->Plug(eax); } void FullCodeGenerator::EmitAssignment(Expression* expr, FeedbackVectorSlot slot) { DCHECK(expr->IsValidReferenceExpressionOrThis()); Property* prop = expr->AsProperty(); LhsKind assign_type = Property::GetAssignType(prop); switch (assign_type) { case VARIABLE: { VariableProxy* proxy = expr->AsVariableProxy(); EffectContext context(this); EmitVariableAssignment(proxy->var(), Token::ASSIGN, slot, proxy->hole_check_mode()); break; } case NAMED_PROPERTY: { PushOperand(eax); // Preserve value. VisitForAccumulatorValue(prop->obj()); __ Move(StoreDescriptor::ReceiverRegister(), eax); PopOperand(StoreDescriptor::ValueRegister()); // Restore value. CallStoreIC(slot, prop->key()->AsLiteral()->value()); break; } case KEYED_PROPERTY: { PushOperand(eax); // Preserve value. VisitForStackValue(prop->obj()); VisitForAccumulatorValue(prop->key()); __ Move(StoreDescriptor::NameRegister(), eax); PopOperand(StoreDescriptor::ReceiverRegister()); // Receiver. PopOperand(StoreDescriptor::ValueRegister()); // Restore value. CallKeyedStoreIC(slot); break; } case NAMED_SUPER_PROPERTY: case KEYED_SUPER_PROPERTY: UNREACHABLE(); break; } context()->Plug(eax); } void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( Variable* var, MemOperand location) { __ mov(location, eax); if (var->IsContextSlot()) { __ mov(edx, eax); int offset = Context::SlotOffset(var->index()); __ RecordWriteContextSlot(ecx, offset, edx, ebx, kDontSaveFPRegs); } } void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, FeedbackVectorSlot slot, HoleCheckMode hole_check_mode) { if (var->IsUnallocated()) { // Global var, const, or let. __ mov(StoreDescriptor::ReceiverRegister(), NativeContextOperand()); __ mov(StoreDescriptor::ReceiverRegister(), ContextOperand(StoreDescriptor::ReceiverRegister(), Context::EXTENSION_INDEX)); CallStoreIC(slot, var->name()); } else if (IsLexicalVariableMode(var->mode()) && op != Token::INIT) { DCHECK(!var->IsLookupSlot()); DCHECK(var->IsStackAllocated() || var->IsContextSlot()); MemOperand location = VarOperand(var, ecx); // Perform an initialization check for lexically declared variables. if (hole_check_mode == HoleCheckMode::kRequired) { Label assign; __ mov(edx, location); __ cmp(edx, isolate()->factory()->the_hole_value()); __ j(not_equal, &assign, Label::kNear); __ push(Immediate(var->name())); __ CallRuntime(Runtime::kThrowReferenceError); __ bind(&assign); } if (var->mode() != CONST) { EmitStoreToStackLocalOrContextSlot(var, location); } else if (var->throw_on_const_assignment(language_mode())) { __ CallRuntime(Runtime::kThrowConstAssignError); } } else if (var->is_this() && var->mode() == CONST && op == Token::INIT) { // Initializing assignment to const {this} needs a write barrier. DCHECK(var->IsStackAllocated() || var->IsContextSlot()); Label uninitialized_this; MemOperand location = VarOperand(var, ecx); __ mov(edx, location); __ cmp(edx, isolate()->factory()->the_hole_value()); __ j(equal, &uninitialized_this); __ push(Immediate(var->name())); __ CallRuntime(Runtime::kThrowReferenceError); __ bind(&uninitialized_this); EmitStoreToStackLocalOrContextSlot(var, location); } else { DCHECK(var->mode() != CONST || op == Token::INIT); DCHECK(var->IsStackAllocated() || var->IsContextSlot()); DCHECK(!var->IsLookupSlot()); // Assignment to var or initializing assignment to let/const in harmony // mode. MemOperand location = VarOperand(var, ecx); if (FLAG_debug_code && var->mode() == LET && op == Token::INIT) { // Check for an uninitialized let binding. __ mov(edx, location); __ cmp(edx, isolate()->factory()->the_hole_value()); __ Check(equal, kLetBindingReInitialization); } EmitStoreToStackLocalOrContextSlot(var, location); } } void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { // Assignment to a property, using a named store IC. // eax : value // esp[0] : receiver Property* prop = expr->target()->AsProperty(); DCHECK(prop != NULL); DCHECK(prop->key()->IsLiteral()); PopOperand(StoreDescriptor::ReceiverRegister()); CallStoreIC(expr->AssignmentSlot(), prop->key()->AsLiteral()->value()); PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); context()->Plug(eax); } void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { // Assignment to a property, using a keyed store IC. // eax : value // esp[0] : key // esp[kPointerSize] : receiver PopOperand(StoreDescriptor::NameRegister()); // Key. PopOperand(StoreDescriptor::ReceiverRegister()); DCHECK(StoreDescriptor::ValueRegister().is(eax)); CallKeyedStoreIC(expr->AssignmentSlot()); PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); context()->Plug(eax); } // Code common for calls using the IC. void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { Expression* callee = expr->expression(); // Get the target function. ConvertReceiverMode convert_mode; if (callee->IsVariableProxy()) { { StackValueContext context(this); EmitVariableLoad(callee->AsVariableProxy()); PrepareForBailout(callee, BailoutState::NO_REGISTERS); } // Push undefined as receiver. This is patched in the method prologue if it // is a sloppy mode method. PushOperand(isolate()->factory()->undefined_value()); convert_mode = ConvertReceiverMode::kNullOrUndefined; } else { // Load the function from the receiver. DCHECK(callee->IsProperty()); DCHECK(!callee->AsProperty()->IsSuperAccess()); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); EmitNamedPropertyLoad(callee->AsProperty()); PrepareForBailoutForId(callee->AsProperty()->LoadId(), BailoutState::TOS_REGISTER); // Push the target function under the receiver. PushOperand(Operand(esp, 0)); __ mov(Operand(esp, kPointerSize), eax); convert_mode = ConvertReceiverMode::kNotNullOrUndefined; } EmitCall(expr, convert_mode); } // Code common for calls using the IC. void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, Expression* key) { // Load the key. VisitForAccumulatorValue(key); Expression* callee = expr->expression(); // Load the function from the receiver. DCHECK(callee->IsProperty()); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); __ mov(LoadDescriptor::NameRegister(), eax); EmitKeyedPropertyLoad(callee->AsProperty()); PrepareForBailoutForId(callee->AsProperty()->LoadId(), BailoutState::TOS_REGISTER); // Push the target function under the receiver. PushOperand(Operand(esp, 0)); __ mov(Operand(esp, kPointerSize), eax); EmitCall(expr, ConvertReceiverMode::kNotNullOrUndefined); } void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { // Load the arguments. ZoneList<Expression*>* args = expr->arguments(); int arg_count = args->length(); for (int i = 0; i < arg_count; i++) { VisitForStackValue(args->at(i)); } PrepareForBailoutForId(expr->CallId(), BailoutState::NO_REGISTERS); SetCallPosition(expr, expr->tail_call_mode()); if (expr->tail_call_mode() == TailCallMode::kAllow) { if (FLAG_trace) { __ CallRuntime(Runtime::kTraceTailCall); } // Update profiling counters before the tail call since we will // not return to this function. EmitProfilingCounterHandlingForReturnSequence(true); } Handle<Code> code = CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); __ Move(eax, Immediate(arg_count)); CallIC(code); OperandStackDepthDecrement(arg_count + 1); RecordJSReturnSite(expr); RestoreContext(); context()->DropAndPlug(1, eax); } void FullCodeGenerator::VisitCallNew(CallNew* expr) { Comment cmnt(masm_, "[ CallNew"); // According to ECMA-262, section 11.2.2, page 44, the function // expression in new calls must be evaluated before the // arguments. // Push constructor on the stack. If it's not a function it's used as // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is // ignored. DCHECK(!expr->expression()->IsSuperPropertyReference()); VisitForStackValue(expr->expression()); // Push the arguments ("left-to-right") on the stack. ZoneList<Expression*>* args = expr->arguments(); int arg_count = args->length(); for (int i = 0; i < arg_count; i++) { VisitForStackValue(args->at(i)); } // Call the construct call builtin that handles allocation and // constructor invocation. SetConstructCallPosition(expr); // Load function and argument count into edi and eax. __ Move(eax, Immediate(arg_count)); __ mov(edi, Operand(esp, arg_count * kPointerSize)); // Record call targets in unoptimized code. __ EmitLoadTypeFeedbackVector(ebx); __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); CallConstructStub stub(isolate()); CallIC(stub.GetCode()); OperandStackDepthDecrement(arg_count + 1); PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER); RestoreContext(); context()->Plug(eax); } void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK(args->length() == 1); VisitForAccumulatorValue(args->at(0)); Label materialize_true, materialize_false; Label* if_true = NULL; Label* if_false = NULL; Label* fall_through = NULL; context()->PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false, &fall_through); PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); __ test(eax, Immediate(kSmiTagMask)); Split(zero, if_true, if_false, fall_through); context()->Plug(if_true, if_false); } void FullCodeGenerator::EmitIsJSReceiver(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK(args->length() == 1); VisitForAccumulatorValue(args->at(0)); Label materialize_true, materialize_false; Label* if_true = NULL; Label* if_false = NULL; Label* fall_through = NULL; context()->PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false, &fall_through); __ JumpIfSmi(eax, if_false); __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ebx); PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); Split(above_equal, if_true, if_false, fall_through); context()->Plug(if_true, if_false); } void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK(args->length() == 1); VisitForAccumulatorValue(args->at(0)); Label materialize_true, materialize_false; Label* if_true = NULL; Label* if_false = NULL; Label* fall_through = NULL; context()->PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false, &fall_through); __ JumpIfSmi(eax, if_false); __ CmpObjectType(eax, JS_ARRAY_TYPE, ebx); PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); Split(equal, if_true, if_false, fall_through); context()->Plug(if_true, if_false); } void FullCodeGenerator::EmitIsTypedArray(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK(args->length() == 1); VisitForAccumulatorValue(args->at(0)); Label materialize_true, materialize_false; Label* if_true = NULL; Label* if_false = NULL; Label* fall_through = NULL; context()->PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false, &fall_through); __ JumpIfSmi(eax, if_false); __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx); PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); Split(equal, if_true, if_false, fall_through); context()->Plug(if_true, if_false); } void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK(args->length() == 1); VisitForAccumulatorValue(args->at(0)); Label materialize_true, materialize_false; Label* if_true = NULL; Label* if_false = NULL; Label* fall_through = NULL; context()->PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false, &fall_through); __ JumpIfSmi(eax, if_false); __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx); PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); Split(equal, if_true, if_false, fall_through); context()->Plug(if_true, if_false); } void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK(args->length() == 1); VisitForAccumulatorValue(args->at(0)); Label materialize_true, materialize_false; Label* if_true = NULL; Label* if_false = NULL; Label* fall_through = NULL; context()->PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false, &fall_through); __ JumpIfSmi(eax, if_false); __ CmpObjectType(eax, JS_PROXY_TYPE, ebx); PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); Split(equal, if_true, if_false, fall_through); context()->Plug(if_true, if_false); } void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK(args->length() == 1); Label done, null, function, non_function_constructor; VisitForAccumulatorValue(args->at(0)); // If the object is not a JSReceiver, we return null. __ JumpIfSmi(eax, &null, Label::kNear); STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, eax); __ j(below, &null, Label::kNear); // Return 'Function' for JSFunction and JSBoundFunction objects. __ CmpInstanceType(eax, FIRST_FUNCTION_TYPE); STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); __ j(above_equal, &function, Label::kNear); // Check if the constructor in the map is a JS function. __ GetMapConstructor(eax, eax, ebx); __ CmpInstanceType(ebx, JS_FUNCTION_TYPE); __ j(not_equal, &non_function_constructor, Label::kNear); // eax now contains the constructor function. Grab the // instance class name from there. __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kInstanceClassNameOffset)); __ jmp(&done, Label::kNear); // Non-JS objects have class null. __ bind(&null); __ mov(eax, isolate()->factory()->null_value()); __ jmp(&done, Label::kNear); // Functions have class 'Function'. __ bind(&function); __ mov(eax, isolate()->factory()->Function_string()); __ jmp(&done, Label::kNear); // Objects with a non-function constructor have class 'Object'. __ bind(&non_function_constructor); __ mov(eax, isolate()->factory()->Object_string()); // All done. __ bind(&done); context()->Plug(eax); } void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK(args->length() == 2); VisitForStackValue(args->at(0)); VisitForAccumulatorValue(args->at(1)); Register object = ebx; Register index = eax; Register result = edx; PopOperand(object); Label need_conversion; Label index_out_of_range; Label done; StringCharCodeAtGenerator generator(object, index, result, &need_conversion, &need_conversion, &index_out_of_range); generator.GenerateFast(masm_); __ jmp(&done); __ bind(&index_out_of_range); // When the index is out of range, the spec requires us to return // NaN. __ Move(result, Immediate(isolate()->factory()->nan_value())); __ jmp(&done); __ bind(&need_conversion); // Move the undefined value into the result register, which will // trigger conversion. __ Move(result, Immediate(isolate()->factory()->undefined_value())); __ jmp(&done); NopRuntimeCallHelper call_helper; generator.GenerateSlow(masm_, NOT_PART_OF_IC_HANDLER, call_helper); __ bind(&done); context()->Plug(result); } void FullCodeGenerator::EmitCall(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK_LE(2, args->length()); // Push target, receiver and arguments onto the stack. for (Expression* const arg : *args) { VisitForStackValue(arg); } PrepareForBailoutForId(expr->CallId(), BailoutState::NO_REGISTERS); // Move target to edi. int const argc = args->length() - 2; __ mov(edi, Operand(esp, (argc + 1) * kPointerSize)); // Call the target. __ mov(eax, Immediate(argc)); __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); OperandStackDepthDecrement(argc + 1); RestoreContext(); // Discard the function left on TOS. context()->DropAndPlug(1, eax); } void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK_EQ(1, args->length()); VisitForAccumulatorValue(args->at(0)); __ AssertFunction(eax); __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); __ mov(eax, FieldOperand(eax, Map::kPrototypeOffset)); context()->Plug(eax); } void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) { DCHECK(expr->arguments()->length() == 0); ExternalReference debug_is_active = ExternalReference::debug_is_active_address(isolate()); __ movzx_b(eax, Operand::StaticVariable(debug_is_active)); __ SmiTag(eax); context()->Plug(eax); } void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); DCHECK_EQ(2, args->length()); VisitForStackValue(args->at(0)); VisitForStackValue(args->at(1)); Label runtime, done; __ Allocate(JSIteratorResult::kSize, eax, ecx, edx, &runtime, NO_ALLOCATION_FLAGS); __ mov(ebx, NativeContextOperand()); __ mov(ebx, ContextOperand(ebx, Context::ITERATOR_RESULT_MAP_INDEX)); __ mov(FieldOperand(eax, HeapObject::kMapOffset), ebx); __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), isolate()->factory()->empty_fixed_array()); __ mov(FieldOperand(eax, JSObject::kElementsOffset), isolate()->factory()->empty_fixed_array()); __ pop(FieldOperand(eax, JSIteratorResult::kDoneOffset)); __ pop(FieldOperand(eax, JSIteratorResult::kValueOffset)); STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); __ jmp(&done, Label::kNear); __ bind(&runtime); CallRuntimeWithOperands(Runtime::kCreateIterResultObject); __ bind(&done); context()->Plug(eax); } void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { // Push function. __ LoadGlobalFunction(expr->context_index(), eax); PushOperand(eax); // Push undefined as receiver. PushOperand(isolate()->factory()->undefined_value()); } void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { ZoneList<Expression*>* args = expr->arguments(); int arg_count = args->length(); SetCallPosition(expr); __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); __ Set(eax, arg_count); __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined), RelocInfo::CODE_TARGET); OperandStackDepthDecrement(arg_count + 1); RestoreContext(); } void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { switch (expr->op()) { case Token::DELETE: { Comment cmnt(masm_, "[ UnaryOperation (DELETE)"); Property* property = expr->expression()->AsProperty(); VariableProxy* proxy = expr->expression()->AsVariableProxy(); if (property != NULL) { VisitForStackValue(property->obj()); VisitForStackValue(property->key()); CallRuntimeWithOperands(is_strict(language_mode()) ? Runtime::kDeleteProperty_Strict : Runtime::kDeleteProperty_Sloppy); context()->Plug(eax); } else if (proxy != NULL) { Variable* var = proxy->var(); // Delete of an unqualified identifier is disallowed in strict mode but // "delete this" is allowed. bool is_this = var->is_this(); DCHECK(is_sloppy(language_mode()) || is_this); if (var->IsUnallocated()) { __ mov(eax, NativeContextOperand()); __ push(ContextOperand(eax, Context::EXTENSION_INDEX)); __ push(Immediate(var->name())); __ CallRuntime(Runtime::kDeleteProperty_Sloppy); context()->Plug(eax); } else { DCHECK(!var->IsLookupSlot()); DCHECK(var->IsStackAllocated() || var->IsContextSlot()); // Result of deleting non-global variables is false. 'this' is // not really a variable, though we implement it as one. The // subexpression does not have side effects. context()->Plug(is_this); } } else { // Result of deleting non-property, non-variable reference is true. // The subexpression may have side effects. VisitForEffect(expr->expression()); context()->Plug(true); } break; } case Token::VOID: { Comment cmnt(masm_, "[ UnaryOperation (VOID)"); VisitForEffect(expr->expression()); context()->Plug(isolate()->factory()->undefined_value()); break; } case Token::NOT: { Comment cmnt(masm_, "[ UnaryOperation (NOT)"); if (context()->IsEffect()) { // Unary NOT has no side effects so it's only necessary to visit the // subexpression. Match the optimizing compiler by not branching. VisitForEffect(expr->expression()); } else if (context()->IsTest()) { const TestContext* test = TestContext::cast(context()); // The labels are swapped for the recursive call. VisitForControl(expr->expression(), test->false_label(), test->true_label(), test->fall_through()); context()->Plug(test->true_label(), test->false_label()); } else { // We handle value contexts explicitly rather than simply visiting // for control and plugging the control flow into the context, // because we need to prepare a pair of extra administrative AST ids // for the optimizing compiler. DCHECK(context()->IsAccumulatorValue() || context()->IsStackValue()); Label materialize_true, materialize_false, done; VisitForControl(expr->expression(), &materialize_false, &materialize_true, &materialize_true); if (!context()->IsAccumulatorValue()) OperandStackDepthIncrement(1); __ bind(&materialize_true); PrepareForBailoutForId(expr->MaterializeTrueId(), BailoutState::NO_REGISTERS); if (context()->IsAccumulatorValue()) { __ mov(eax, isolate()->factory()->true_value()); } else { __ Push(isolate()->factory()->true_value()); } __ jmp(&done, Label::kNear); __ bind(&materialize_false); PrepareForBailoutForId(expr->MaterializeFalseId(), BailoutState::NO_REGISTERS); if (context()->IsAccumulatorValue()) { __ mov(eax, isolate()->factory()->false_value()); } else { __ Push(isolate()->factory()->false_value()); } __ bind(&done); } break; } case Token::TYPEOF: { Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); { AccumulatorValueContext context(this); VisitForTypeofValue(expr->expression()); } __ mov(ebx, eax); __ Call(isolate()->builtins()->Typeof(), RelocInfo::CODE_TARGET); context()->Plug(eax); break; } default: UNREACHABLE(); } } void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { DCHECK(expr->expression()->IsValidReferenceExpressionOrThis()); Comment cmnt(masm_, "[ CountOperation"); Property* prop = expr->expression()->AsProperty(); LhsKind assign_type = Property::GetAssignType(prop); // Evaluate expression and get value. if (assign_type == VARIABLE) { DCHECK(expr->expression()->AsVariableProxy()->var() != NULL); AccumulatorValueContext context(this); EmitVariableLoad(expr->expression()->AsVariableProxy()); } else { // Reserve space for result of postfix operation. if (expr->is_postfix() && !context()->IsEffect()) { PushOperand(Smi::kZero); } switch (assign_type) { case NAMED_PROPERTY: { // Put the object both on the stack and in the register. VisitForStackValue(prop->obj()); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); EmitNamedPropertyLoad(prop); break; } case KEYED_PROPERTY: { VisitForStackValue(prop->obj()); VisitForStackValue(prop->key()); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, kPointerSize)); // Object. __ mov(LoadDescriptor::NameRegister(), Operand(esp, 0)); // Key. EmitKeyedPropertyLoad(prop); break; } case NAMED_SUPER_PROPERTY: case KEYED_SUPER_PROPERTY: case VARIABLE: UNREACHABLE(); } } // We need a second deoptimization point after loading the value // in case evaluating the property load my have a side effect. if (assign_type == VARIABLE) { PrepareForBailout(expr->expression(), BailoutState::TOS_REGISTER); } else { PrepareForBailoutForId(prop->LoadId(), BailoutState::TOS_REGISTER); } // Inline smi case if we are in a loop. Label done, stub_call; JumpPatchSite patch_site(masm_); if (ShouldInlineSmiCase(expr->op())) { Label slow; patch_site.EmitJumpIfNotSmi(eax, &slow, Label::kNear); // Save result for postfix expressions. if (expr->is_postfix()) { if (!context()->IsEffect()) { // Save the result on the stack. If we have a named or keyed property // we store the result under the receiver that is currently on top // of the stack. switch (assign_type) { case VARIABLE: __ push(eax); break; case NAMED_PROPERTY: __ mov(Operand(esp, kPointerSize), eax); break; case KEYED_PROPERTY: __ mov(Operand(esp, 2 * kPointerSize), eax); break; case NAMED_SUPER_PROPERTY: case KEYED_SUPER_PROPERTY: UNREACHABLE(); break; } } } if (expr->op() == Token::INC) { __ add(eax, Immediate(Smi::FromInt(1))); } else { __ sub(eax, Immediate(Smi::FromInt(1))); } __ j(no_overflow, &done, Label::kNear); // Call stub. Undo operation first. if (expr->op() == Token::INC) { __ sub(eax, Immediate(Smi::FromInt(1))); } else { __ add(eax, Immediate(Smi::FromInt(1))); } __ jmp(&stub_call, Label::kNear); __ bind(&slow); } // Convert old value into a number. __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); RestoreContext(); PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); // Save result for postfix expressions. if (expr->is_postfix()) { if (!context()->IsEffect()) { // Save the result on the stack. If we have a named or keyed property // we store the result under the receiver that is currently on top // of the stack. switch (assign_type) { case VARIABLE: PushOperand(eax); break; case NAMED_PROPERTY: __ mov(Operand(esp, kPointerSize), eax); break; case KEYED_PROPERTY: __ mov(Operand(esp, 2 * kPointerSize), eax); break; case NAMED_SUPER_PROPERTY: case KEYED_SUPER_PROPERTY: UNREACHABLE(); break; } } } SetExpressionPosition(expr); // Call stub for +1/-1. __ bind(&stub_call); __ mov(edx, eax); __ mov(eax, Immediate(Smi::FromInt(1))); Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), expr->binary_op()).code(); CallIC(code, expr->CountBinOpFeedbackId()); patch_site.EmitPatchInfo(); __ bind(&done); // Store the value returned in eax. switch (assign_type) { case VARIABLE: { VariableProxy* proxy = expr->expression()->AsVariableProxy(); if (expr->is_postfix()) { // Perform the assignment as if via '='. { EffectContext context(this); EmitVariableAssignment(proxy->var(), Token::ASSIGN, expr->CountSlot(), proxy->hole_check_mode()); PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); context.Plug(eax); } // For all contexts except EffectContext We have the result on // top of the stack. if (!context()->IsEffect()) { context()->PlugTOS(); } } else { // Perform the assignment as if via '='. EmitVariableAssignment(proxy->var(), Token::ASSIGN, expr->CountSlot(), proxy->hole_check_mode()); PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); context()->Plug(eax); } break; } case NAMED_PROPERTY: { PopOperand(StoreDescriptor::ReceiverRegister()); CallStoreIC(expr->CountSlot(), prop->key()->AsLiteral()->value()); PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); if (expr->is_postfix()) { if (!context()->IsEffect()) { context()->PlugTOS(); } } else { context()->Plug(eax); } break; } case KEYED_PROPERTY: { PopOperand(StoreDescriptor::NameRegister()); PopOperand(StoreDescriptor::ReceiverRegister()); CallKeyedStoreIC(expr->CountSlot()); PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); if (expr->is_postfix()) { // Result is on the stack if (!context()->IsEffect()) { context()->PlugTOS(); } } else { context()->Plug(eax); } break; } case NAMED_SUPER_PROPERTY: case KEYED_SUPER_PROPERTY: UNREACHABLE(); break; } } void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, Expression* sub_expr, Handle<String> check) { Label materialize_true, materialize_false; Label* if_true = NULL; Label* if_false = NULL; Label* fall_through = NULL; context()->PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false, &fall_through); { AccumulatorValueContext context(this); VisitForTypeofValue(sub_expr); } PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); Factory* factory = isolate()->factory(); if (String::Equals(check, factory->number_string())) { __ JumpIfSmi(eax, if_true); __ cmp(FieldOperand(eax, HeapObject::kMapOffset), isolate()->factory()->heap_number_map()); Split(equal, if_true, if_false, fall_through); } else if (String::Equals(check, factory->string_string())) { __ JumpIfSmi(eax, if_false); __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, edx); Split(below, if_true, if_false, fall_through); } else if (String::Equals(check, factory->symbol_string())) { __ JumpIfSmi(eax, if_false); __ CmpObjectType(eax, SYMBOL_TYPE, edx); Split(equal, if_true, if_false, fall_through); } else if (String::Equals(check, factory->boolean_string())) { __ cmp(eax, isolate()->factory()->true_value()); __ j(equal, if_true); __ cmp(eax, isolate()->factory()->false_value()); Split(equal, if_true, if_false, fall_through); } else if (String::Equals(check, factory->undefined_string())) { __ cmp(eax, isolate()->factory()->null_value()); __ j(equal, if_false); __ JumpIfSmi(eax, if_false); // Check for undetectable objects => true. __ mov(edx, FieldOperand(eax, HeapObject::kMapOffset)); __ test_b(FieldOperand(edx, Map::kBitFieldOffset), Immediate(1 << Map::kIsUndetectable)); Split(not_zero, if_true, if_false, fall_through); } else if (String::Equals(check, factory->function_string())) { __ JumpIfSmi(eax, if_false); // Check for callable and not undetectable objects => true. __ mov(edx, FieldOperand(eax, HeapObject::kMapOffset)); __ movzx_b(ecx, FieldOperand(edx, Map::kBitFieldOffset)); __ and_(ecx, (1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)); __ cmp(ecx, 1 << Map::kIsCallable); Split(equal, if_true, if_false, fall_through); } else if (String::Equals(check, factory->object_string())) { __ JumpIfSmi(eax, if_false); __ cmp(eax, isolate()->factory()->null_value()); __ j(equal, if_true); STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, edx); __ j(below, if_false); // Check for callable or undetectable objects => false. __ test_b(FieldOperand(edx, Map::kBitFieldOffset), Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); Split(zero, if_true, if_false, fall_through); // clang-format off #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ } else if (String::Equals(check, factory->type##_string())) { \ __ JumpIfSmi(eax, if_false); \ __ cmp(FieldOperand(eax, HeapObject::kMapOffset), \ isolate()->factory()->type##_map()); \ Split(equal, if_true, if_false, fall_through); SIMD128_TYPES(SIMD128_TYPE) #undef SIMD128_TYPE // clang-format on } else { if (if_false != fall_through) __ jmp(if_false); } context()->Plug(if_true, if_false); } void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { Comment cmnt(masm_, "[ CompareOperation"); // First we try a fast inlined version of the compare when one of // the operands is a literal. if (TryLiteralCompare(expr)) return; // Always perform the comparison for its control flow. Pack the result // into the expression's context after the comparison is performed. Label materialize_true, materialize_false; Label* if_true = NULL; Label* if_false = NULL; Label* fall_through = NULL; context()->PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false, &fall_through); Token::Value op = expr->op(); VisitForStackValue(expr->left()); switch (op) { case Token::IN: VisitForStackValue(expr->right()); SetExpressionPosition(expr); EmitHasProperty(); PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); __ cmp(eax, isolate()->factory()->true_value()); Split(equal, if_true, if_false, fall_through); break; case Token::INSTANCEOF: { VisitForAccumulatorValue(expr->right()); SetExpressionPosition(expr); PopOperand(edx); __ Call(isolate()->builtins()->InstanceOf(), RelocInfo::CODE_TARGET); PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); __ cmp(eax, isolate()->factory()->true_value()); Split(equal, if_true, if_false, fall_through); break; } default: { VisitForAccumulatorValue(expr->right()); SetExpressionPosition(expr); Condition cc = CompareIC::ComputeCondition(op); PopOperand(edx); bool inline_smi_code = ShouldInlineSmiCase(op); JumpPatchSite patch_site(masm_); if (inline_smi_code) { Label slow_case; __ mov(ecx, edx); __ or_(ecx, eax); patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); __ cmp(edx, eax); Split(cc, if_true, if_false, NULL); __ bind(&slow_case); } Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); CallIC(ic, expr->CompareOperationFeedbackId()); patch_site.EmitPatchInfo(); PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); __ test(eax, eax); Split(cc, if_true, if_false, fall_through); } } // Convert the result of the comparison into one expected for this // expression's context. context()->Plug(if_true, if_false); } void FullCodeGenerator::EmitLiteralCompareNil(CompareOperation* expr, Expression* sub_expr, NilValue nil) { Label materialize_true, materialize_false; Label* if_true = NULL; Label* if_false = NULL; Label* fall_through = NULL; context()->PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false, &fall_through); VisitForAccumulatorValue(sub_expr); PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); Handle<Object> nil_value = nil == kNullValue ? isolate()->factory()->null_value() : isolate()->factory()->undefined_value(); if (expr->op() == Token::EQ_STRICT) { __ cmp(eax, nil_value); Split(equal, if_true, if_false, fall_through); } else { __ JumpIfSmi(eax, if_false); __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); __ test_b(FieldOperand(eax, Map::kBitFieldOffset), Immediate(1 << Map::kIsUndetectable)); Split(not_zero, if_true, if_false, fall_through); } context()->Plug(if_true, if_false); } Register FullCodeGenerator::result_register() { return eax; } Register FullCodeGenerator::context_register() { return esi; } void FullCodeGenerator::LoadFromFrameField(int frame_offset, Register value) { DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); __ mov(value, Operand(ebp, frame_offset)); } void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); __ mov(Operand(ebp, frame_offset), value); } void FullCodeGenerator::LoadContextField(Register dst, int context_index) { __ mov(dst, ContextOperand(esi, context_index)); } void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { DeclarationScope* closure_scope = scope()->GetClosureScope(); if (closure_scope->is_script_scope() || closure_scope->is_module_scope()) { // Contexts nested in the native context have a canonical empty function // as their closure, not the anonymous closure containing the global // code. __ mov(eax, NativeContextOperand()); PushOperand(ContextOperand(eax, Context::CLOSURE_INDEX)); } else if (closure_scope->is_eval_scope()) { // Contexts nested inside eval code have the same closure as the context // calling eval, not the anonymous closure containing the eval code. // Fetch it from the context. PushOperand(ContextOperand(esi, Context::CLOSURE_INDEX)); } else { DCHECK(closure_scope->is_function_scope()); PushOperand(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); } } #undef __ static const byte kJnsInstruction = 0x79; static const byte kJnsOffset = 0x11; static const byte kNopByteOne = 0x66; static const byte kNopByteTwo = 0x90; #ifdef DEBUG static const byte kCallInstruction = 0xe8; #endif void BackEdgeTable::PatchAt(Code* unoptimized_code, Address pc, BackEdgeState target_state, Code* replacement_code) { Address call_target_address = pc - kIntSize; Address jns_instr_address = call_target_address - 3; Address jns_offset_address = call_target_address - 2; switch (target_state) { case INTERRUPT: // sub <profiling_counter>, <delta> ;; Not changed // jns ok // call <interrupt stub> // ok: *jns_instr_address = kJnsInstruction; *jns_offset_address = kJnsOffset; break; case ON_STACK_REPLACEMENT: // sub <profiling_counter>, <delta> ;; Not changed // nop // nop // call <on-stack replacment> // ok: *jns_instr_address = kNopByteOne; *jns_offset_address = kNopByteTwo; break; } Assembler::set_target_address_at(unoptimized_code->GetIsolate(), call_target_address, unoptimized_code, replacement_code->entry()); unoptimized_code->GetHeap()->incremental_marking()->RecordCodeTargetPatch( unoptimized_code, call_target_address, replacement_code); } BackEdgeTable::BackEdgeState BackEdgeTable::GetBackEdgeState( Isolate* isolate, Code* unoptimized_code, Address pc) { Address call_target_address = pc - kIntSize; Address jns_instr_address = call_target_address - 3; DCHECK_EQ(kCallInstruction, *(call_target_address - 1)); if (*jns_instr_address == kJnsInstruction) { DCHECK_EQ(kJnsOffset, *(call_target_address - 2)); DCHECK_EQ(isolate->builtins()->InterruptCheck()->entry(), Assembler::target_address_at(call_target_address, unoptimized_code)); return INTERRUPT; } DCHECK_EQ(kNopByteOne, *jns_instr_address); DCHECK_EQ(kNopByteTwo, *(call_target_address - 2)); DCHECK_EQ( isolate->builtins()->OnStackReplacement()->entry(), Assembler::target_address_at(call_target_address, unoptimized_code)); return ON_STACK_REPLACEMENT; } } // namespace internal } // namespace v8 #endif // V8_TARGET_ARCH_IA32 ```
Miss Earth Puerto Rico 2023 is the 19th edition of Miss Earth Puerto Rico that was held on January 29, 2023. Paulina Avilés-Feshold of Carolina crowned Victoria Arocho of Caguas as her successor at the end of the event. She will represent Puerto Rico at Miss Earth 2023 in Vietnam. Results Contestants 28 contestants will compete for the title: References Beauty pageants in Puerto Rico 2023 beauty pageants
is a comedy horror manga written and illustrated by Mitsukazu Mihara. Known for her short stories and characters dressed in the Gothic Lolita fashion, Mihara continued her use of death-themed material in Haunted House, a volume of one-shot chapters focusing on the teenage protagonist's attempts to find and keep a girlfriend despite his gothic family. Shodensha published Haunted House in Japan on October 8, 2002. Tokyopop licensed it for an English-language release in North America, along with four of her other works, and released it on October 10, 2006. English-language critics were divided on whether it was enjoyable or repetitive, with several comparing it to the Addams Family. Plot Haunted House consists of one-shot chapters connected by the teenage protagonist, Sabato Obiga—his first name refers to Sabbath. In each, he attempts to find and keep a girlfriend, whom his gothic family inevitably frightens away. His family is made up of his father, who works at a bank; his mother, a reader of poetry; twin sisters Lisa and Misa, both of whom create voodoo dolls; and their black cat. In Haunted House, Mitsukazu Mihara continued her use of death-themed material—also seen in her other manga The Embalmer and R.I.P.: Requiem in Phonybrian. Release Written and illustrated by Mitsukazu Mihara, Haunted House was published in Japan by Shodensha on October 8, 2002 (). Tokyopop licensed it for an English-language release in North America—along with four of her other works: The Embalmer, Beautiful People, IC in a Sunflower and R.I.P.: Requiem in Phonybrian—and released it on October 10, 2006 (). Reception Critical reaction to Haunted House was mixed. Critics drew comparisons between the manga and the Addams Family. The Comic Book Bin's Leroy Douresseaux felt that her elaborate art partially helped to counterbalance the morbid material, and rated the manga 5/10. While enjoying the occasional "cute and mildly amusing moments", Ryan Huston of MangaLife felt that the gothic stock elements, repetitive plot and "lackluster" art hurt the volume. Conversely, Katherine Dacey praised the "elegant, stylized character designs" and enjoyable story, though she commented that the "moral is delivered a little too neatly". Another reviewer greatly enjoyed the comedy aspect of Haunted House, though wrote that "it was an acquired taste". References External links Haunted House at Tokyopop's website 2002 manga Comedy anime and manga Horror anime and manga Josei manga Mitsukazu Mihara Shodensha manga Tokyopop titles
```rust #[cfg(feature = "guid")] pub mod Guid_ { use crate::NativeArray_::{new_array, Array}; use crate::Native_::{compare, MutCell}; use crate::String_::{string, toString}; use uuid::Uuid; #[derive(Clone, Copy, Debug, Default, PartialEq, PartialOrd)] pub struct Guid(Uuid); pub const empty: Guid = Guid(Uuid::nil()); impl core::fmt::Display for Guid { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", toString(&self.0)) } } pub fn compareTo(x: Guid, y: Guid) -> i32 { compare(&x, &y) } pub fn equals(x: Guid, y: Guid) -> bool { x == y } pub fn new_guid() -> Guid { Guid(Uuid::new_v4()) } pub fn new_from_array(a: Array<u8>) -> Guid { Guid(Uuid::from_slice_le(a.as_slice()).unwrap()) } pub fn tryParse(s: string, res: &MutCell<Guid>) -> bool { match Uuid::parse_str(s.trim()) { Ok(uuid) => { res.set(Guid(uuid)); true } Err(e) => false, } } pub fn parse(s: string) -> Guid { match Uuid::parse_str(s.trim()) { Ok(uuid) => Guid(uuid), Err(e) => panic!("{}", e), } } pub fn toByteArray(x: Guid) -> Array<u8> { new_array(&x.0.to_bytes_le()) } } ```
```turing #require no-eden $ eagerepo $ newext buggylocking <<EOF > """A small extension that tests our developer warnings > """ > > from sapling import error, registrar, repair, util > > cmdtable = {} > command = registrar.command(cmdtable) > > @command('buggylocking', [], '') > def buggylocking(ui, repo): > lo = repo.lock() > wl = repo.wlock() > wl.release() > lo.release() > > @command('buggytransaction', [], '') > def buggylocking(ui, repo): > tr = repo.transaction('buggy') > # make sure we rollback the transaction as we don't want to rely on the__del__ > tr.release() > > @command('properlocking', [], '') > def properlocking(ui, repo): > """check that reentrance is fine""" > wl = repo.wlock() > lo = repo.lock() > tr = repo.transaction('proper') > tr2 = repo.transaction('proper') > lo2 = repo.lock() > wl2 = repo.wlock() > wl2.release() > lo2.release() > tr2.close() > tr.close() > lo.release() > wl.release() > > @command('nowaitlocking', [], '') > def nowaitlocking(ui, repo): > lo = repo.lock() > wl = repo.wlock(wait=False) > wl.release() > lo.release() > > @command('no-wlock-write', [], '') > def nowlockwrite(ui, repo): > with repo.vfs('branch', 'a'): > pass > > @command('no-lock-write', [], '') > def nolockwrite(ui, repo): > with repo.svfs('fncache', 'a'): > pass > > @command('stripintr', [], '') > def stripintr(ui, repo): > lo = repo.lock() > tr = repo.transaction('foobar') > try: > repair.strip(repo.ui, repo, [repo['.'].node()]) > finally: > lo.release() > @command('oldanddeprecated', [], '') > def oldanddeprecated(ui, repo): > """test deprecation warning API""" > def foobar(ui): > ui.deprecwarn('foorbar is deprecated, go shopping', '42.1337') > foobar(ui) > @command('nouiwarning', [], '') > def nouiwarning(ui, repo): > util.nouideprecwarn('this is a test', '13.37') > @command('programmingerror', [], '') > def programmingerror(ui, repo): > raise error.ProgrammingError('something went wrong', hint='try again') > EOF $ setconfig devel.all-warnings=1 $ hg init lock-checker $ cd lock-checker #if no-fsmonitor $ hg buggylocking devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob) $ cat << EOF >> $HGRCPATH > [devel] > all=0 > check-locks=1 > EOF $ hg buggylocking devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob) $ hg buggylocking --traceback 2>&1 | egrep '(devel-warn|buggylocking)' devel-warn: "wlock" acquired after "lock" at: * (glob) (?) * (glob) (?) * (glob) (?) #endif $ hg properlocking $ hg nowaitlocking Writing without lock (also uses bare repo.vfs) $ hg no-wlock-write devel-warn: use of bare vfs instead of localvfs or sharedvfs at: $TESTTMP/buggylocking.py:* (nowlockwrite) (glob) devel-warn: write with no wlock: "branch" at: $TESTTMP/buggylocking.py:* (nowlockwrite) (glob) $ hg no-lock-write devel-warn: write with no lock: "fncache" at: * (glob) Stripping from a transaction $ echo a > a $ hg add a $ hg commit -m a $ hg stripintr 2>&1 | egrep -v '^(\*\*| )' Traceback (most recent call last): *ProgrammingError: cannot strip from inside a transaction (glob) $ hg oldanddeprecated devel-warn: foorbar is deprecated, go shopping (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob) $ hg oldanddeprecated --traceback 2>&1 | egrep '(buggylocking|devel-warn)' devel-warn: foorbar is deprecated, go shopping * (glob) * (glob) (?) * (glob) (?) #if no-chg normal-layout no-fsmonitor $ hg blackbox --no-timestamp --no-sid --pattern '{"legacy_log":{"service":"develwarn"}}' | grep develwarn [legacy][develwarn] devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:12 (buggylocking) [legacy][develwarn] devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:12 (buggylocking) [legacy][develwarn] devel-warn: "wlock" acquired after "lock" at: [legacy][develwarn] devel-warn: use of bare vfs instead of localvfs or sharedvfs at: $TESTTMP/buggylocking.py:47 (nowlockwrite) [legacy][develwarn] devel-warn: write with no wlock: "branch" at: $TESTTMP/buggylocking.py:47 (nowlockwrite) [legacy][develwarn] devel-warn: write with no lock: "fncache" at: * (glob) [legacy][develwarn] devel-warn: foorbar is deprecated, go shopping [legacy][develwarn] devel-warn: foorbar is deprecated, go shopping #endif Test programming error failure: $ hg buggytransaction 2>&1 | egrep -v '^ ' ** * has crashed: (glob) ** ProgrammingError: transaction requires locking Traceback (most recent call last): *ProgrammingError: transaction requires locking (glob) $ hg programmingerror 2>&1 | egrep -v '^ ' ** * has crashed: (glob) ** ProgrammingError: something went wrong ** (try again) Traceback (most recent call last): *ProgrammingError: something went wrong (glob) #if bash no-chg Old style deprecation warning $ hg nouiwarning $TESTTMP/buggylocking.py:*: DeprecationWarning: this is a test (glob) (compatibility will be dropped after Mercurial-13.37, update your code.) util.nouideprecwarn('this is a test', '13.37') (disabled outside of test run) $ HGEMITWARNINGS= hg nouiwarning #endif Test warning on config option access and registration $ cat << EOF > ${TESTTMP}/buggyconfig.py > """A small extension that tests our developer warnings for config""" > > from sapling import registrar, configitems > > cmdtable = {} > command = registrar.command(cmdtable) > > configtable = {} > configitem = registrar.configitem(configtable) > > configitem('test', 'some', default='foo') > configitem('test', 'dynamic', default=configitems.dynamicdefault) > configitem('test', 'callable', default=list) > # overwrite a core config > configitem('ui', 'quiet', default=False) > configitem('ui', 'interactive', default=None) > > @command('buggyconfig') > def cmdbuggyconfig(ui, repo): > repo.ui.config('ui', 'quiet', True) > repo.ui.config('ui', 'interactive', False) > repo.ui.config('test', 'some', 'bar') > repo.ui.config('test', 'some', 'foo') > repo.ui.config('test', 'dynamic', 'some-required-default') > repo.ui.config('test', 'dynamic') > repo.ui.config('test', 'callable', []) > repo.ui.config('test', 'callable', 'foo') > repo.ui.config('test', 'unregistered') > repo.ui.config('unregistered', 'unregistered') > EOF $ hg --config "extensions.buggyconfig=${TESTTMP}/buggyconfig.py" buggyconfig devel-warn: extension 'buggyconfig' overwrite config item 'ui.interactive' at:* (_loadextra) (glob) devel-warn: extension 'buggyconfig' overwrite config item 'ui.quiet' at:* (_loadextra) (glob) $ cd .. ```
Rekha Palli (born 9 March 1963) is a sitting judge of the Delhi High Court in India. She has been the judge in a number of politically significant cases, including those relating to the disqualification of Aam Aadmi Party MLAs, the qualifications for enrolment in the Central Industrial Security Force, and the disappearance of Delhi University student Najeeb Ahmad. As a counsel, Palli also represented Indian Air Force officers in a significant case that resulted in ending of a discriminatory practice that denied the grant of permanent commissions to female officers. Life Palli was educated at the Lady Irwin School in New Delhi, and studied science at Hindu College before obtaining a degree in law in 1986, from the Faculty of Law at Delhi University. Career Litigation Palli practiced law in Delhi, as well as at the Punjab and Haryana High Court, and the Supreme Court of India, after enrolling at the bar in 1986. In 2015, she was designated as a senior counsel by the Delhi High Court. In 2010, Palli represented nine women officers of the Indian Air Force, in a case by which they challenged the force's practice of denying permanent commissions to women officers. The case was filed after a Supreme Court order directed the Indian Army to grant permanent commissions to women officers in the same manner that such commissions were granted to male officers. The Delhi High Court ruled in favor of granting permanent commissions to qualified women officers, following which the Indian Air Force commenced granting short service commissions to them. Judicial career Palli was appointed a judge to the Delhi High Court on 15 May 2017. In 2017, Palli ordered a case concerning the disappearance and suspected murder of Delhi University student Najeeb Ahmad, after an alleged altercation with members of the Akhil Bharatiya Vidyarthi Parishad, to be transferred to the Central Bureau of Investigation. The case gained significant public attention following protests from Delhi University students about the lack of results while the case was being investigated by the Delhi Police. In 2018, Palli heard a politically significant case concerning the disqualification of twenty-three members of the Delhi Legislative Assembly, belonging to the Aam Aadmi Party. The case gained a great deal of public attention, before Palli allowed it to be withdrawn with the consent of the parties involved. In 2018, Palli and another judge, Hima Kohli, held that it was legal for the Union Government to terminate the employment of members of the Central Industrial Security Force who tested as color-blind. References 1963 births Living people Judges of the Delhi High Court 20th-century Indian lawyers 20th-century Indian women lawyers 21st-century Indian judges 21st-century Indian women judges
```c++ #include <cstdio> #include <cstring> #define NIL 0 using namespace std; struct node { int info; node *next[26]; }; node root; void insert(char *s) { int l = strlen(s); node *cur = &root; for (int i = 0; i < l; i++) { if (cur->next[s[i] - 'a'] == NIL) { node *o = new node; o->info = 0; cur->next[s[i] - 'a'] = o; } cur = cur->next[s[i] - 'a']; } cur->info++; } int find(char *s) { int l = strlen(s); node *cur = &root; for (int i = 0; i < l; i++) { if (cur->next[s[i] - 'a'] == NIL) { return -1; } else { cur = cur->next[s[i] - 'a']; } } return cur->info; } int main() { int in; char str[100]; while (true) { scanf("%d", &in); if (in == 1) { scanf("%s", str); insert(str); } else if (in == 2) { scanf("%s", str); printf("%d\n", find(str)); } else if (in == 0) { return 0; } else { printf("No such command!\n"); } } return 0; } ```
```html <html lang="en"> <head> <title>M32C-Dependent - Using as</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Using as"> <meta name="generator" content="makeinfo 4.8"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Machine-Dependencies.html#Machine-Dependencies" title="Machine Dependencies"> <link rel="prev" href="LM32_002dDependent.html#LM32_002dDependent" title="LM32-Dependent"> <link rel="next" href="M32R_002dDependent.html#M32R_002dDependent" title="M32R-Dependent"> <link href="path_to_url" rel="generator-home" title="Texinfo Homepage"> <!-- This file documents the GNU Assembler "as". Permission is granted to copy, distribute and/or modify this document or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <p> <a name="M32C-Dependent"></a> <a name="M32C_002dDependent"></a> Next:&nbsp;<a rel="next" accesskey="n" href="M32R_002dDependent.html#M32R_002dDependent">M32R-Dependent</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="LM32_002dDependent.html#LM32_002dDependent">LM32-Dependent</a>, Up:&nbsp;<a rel="up" accesskey="u" href="Machine-Dependencies.html#Machine-Dependencies">Machine Dependencies</a> <hr> </div> <h3 class="section">9.21 M32C Dependent Features</h3> <p><a name="index-M32C-support-1268"></a> <code>as</code> can assemble code for several different members of the Renesas M32C family. Normally the default is to assemble code for the M16C microprocessor. The <code>-m32c</code> option may be used to change the default to the M32C microprocessor. <ul class="menu"> <li><a accesskey="1" href="M32C_002dOpts.html#M32C_002dOpts">M32C-Opts</a>: M32C Options <li><a accesskey="2" href="M32C_002dSyntax.html#M32C_002dSyntax">M32C-Syntax</a>: M32C Syntax </ul> </body></html> ```
```javascript import { getCompletionText, getEditText } from '../api'; import usePrompt from './use-prompt'; const getTextResult = async ( payload ) => { if ( payload?.instruction ) { return getEditText( payload ); } return getCompletionText( payload ); }; const useTextPrompt = ( initialValue ) => { const promptData = usePrompt( getTextResult, initialValue ); return promptData; }; export default useTextPrompt; ```
```forth *> \brief \b CCHKHB * * =========== DOCUMENTATION =========== * * Online html documentation available at * path_to_url * * Definition: * =========== * * SUBROUTINE CCHKHB( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE, ISEED, * THRESH, NOUNIT, A, LDA, SD, SE, U, LDU, WORK, * LWORK, RWORK, RESULT, INFO ) * * .. Scalar Arguments .. * INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES, * $ NWDTHS * REAL THRESH * .. * .. Array Arguments .. * LOGICAL DOTYPE( * ) * INTEGER ISEED( 4 ), KK( * ), NN( * ) * REAL RESULT( * ), RWORK( * ), SD( * ), SE( * ) * COMPLEX A( LDA, * ), U( LDU, * ), WORK( * ) * .. * * *> \par Purpose: * ============= *> *> \verbatim *> *> CCHKHB tests the reduction of a Hermitian band matrix to tridiagonal *> from, used with the Hermitian eigenvalue problem. *> *> CHBTRD factors a Hermitian band matrix A as U S U* , where * means *> conjugate transpose, S is symmetric tridiagonal, and U is unitary. *> CHBTRD can use either just the lower or just the upper triangle *> of A; CCHKHB checks both cases. *> *> When CCHKHB is called, a number of matrix "sizes" ("n's"), a number *> of bandwidths ("k's"), and a number of matrix "types" are *> specified. For each size ("n"), each bandwidth ("k") less than or *> equal to "n", and each type of matrix, one matrix will be generated *> and used to test the hermitian banded reduction routine. For each *> matrix, a number of tests will be performed: *> *> (1) | A - V S V* | / ( |A| n ulp ) computed by CHBTRD with *> UPLO='U' *> *> (2) | I - UU* | / ( n ulp ) *> *> (3) | A - V S V* | / ( |A| n ulp ) computed by CHBTRD with *> UPLO='L' *> *> (4) | I - UU* | / ( n ulp ) *> *> The "sizes" are specified by an array NN(1:NSIZES); the value of *> each element NN(j) specifies one size. *> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); *> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated. *> Currently, the list of possible types is: *> *> (1) The zero matrix. *> (2) The identity matrix. *> *> (3) A diagonal matrix with evenly spaced entries *> 1, ..., ULP and random signs. *> (ULP = (first number larger than 1) - 1 ) *> (4) A diagonal matrix with geometrically spaced entries *> 1, ..., ULP and random signs. *> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP *> and random signs. *> *> (6) Same as (4), but multiplied by SQRT( overflow threshold ) *> (7) Same as (4), but multiplied by SQRT( underflow threshold ) *> *> (8) A matrix of the form U* D U, where U is unitary and *> D has evenly spaced entries 1, ..., ULP with random signs *> on the diagonal. *> *> (9) A matrix of the form U* D U, where U is unitary and *> D has geometrically spaced entries 1, ..., ULP with random *> signs on the diagonal. *> *> (10) A matrix of the form U* D U, where U is unitary and *> D has "clustered" entries 1, ULP,..., ULP with random *> signs on the diagonal. *> *> (11) Same as (8), but multiplied by SQRT( overflow threshold ) *> (12) Same as (8), but multiplied by SQRT( underflow threshold ) *> *> (13) Hermitian matrix with random entries chosen from (-1,1). *> (14) Same as (13), but multiplied by SQRT( overflow threshold ) *> (15) Same as (13), but multiplied by SQRT( underflow threshold ) *> \endverbatim * * Arguments: * ========== * *> \param[in] NSIZES *> \verbatim *> NSIZES is INTEGER *> The number of sizes of matrices to use. If it is zero, *> CCHKHB does nothing. It must be at least zero. *> \endverbatim *> *> \param[in] NN *> \verbatim *> NN is INTEGER array, dimension (NSIZES) *> An array containing the sizes to be used for the matrices. *> Zero values will be skipped. The values must be at least *> zero. *> \endverbatim *> *> \param[in] NWDTHS *> \verbatim *> NWDTHS is INTEGER *> The number of bandwidths to use. If it is zero, *> CCHKHB does nothing. It must be at least zero. *> \endverbatim *> *> \param[in] KK *> \verbatim *> KK is INTEGER array, dimension (NWDTHS) *> An array containing the bandwidths to be used for the band *> matrices. The values must be at least zero. *> \endverbatim *> *> \param[in] NTYPES *> \verbatim *> NTYPES is INTEGER *> The number of elements in DOTYPE. If it is zero, CCHKHB *> does nothing. It must be at least zero. If it is MAXTYP+1 *> and NSIZES is 1, then an additional type, MAXTYP+1 is *> defined, which is to use whatever matrix is in A. This *> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and *> DOTYPE(MAXTYP+1) is .TRUE. . *> \endverbatim *> *> \param[in] DOTYPE *> \verbatim *> DOTYPE is LOGICAL array, dimension (NTYPES) *> If DOTYPE(j) is .TRUE., then for each size in NN a *> matrix of that size and of type j will be generated. *> If NTYPES is smaller than the maximum number of types *> defined (PARAMETER MAXTYP), then types NTYPES+1 through *> MAXTYP will not be generated. If NTYPES is larger *> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES) *> will be ignored. *> \endverbatim *> *> \param[in,out] ISEED *> \verbatim *> ISEED is INTEGER array, dimension (4) *> On entry ISEED specifies the seed of the random number *> generator. The array elements should be between 0 and 4095; *> if not they will be reduced mod 4096. Also, ISEED(4) must *> be odd. The random number generator uses a linear *> congruential sequence limited to small integers, and so *> should produce machine independent random numbers. The *> values of ISEED are changed on exit, and can be used in the *> next call to CCHKHB to continue the same random number *> sequence. *> \endverbatim *> *> \param[in] THRESH *> \verbatim *> THRESH is REAL *> A test will count as "failed" if the "error", computed as *> described above, exceeds THRESH. Note that the error *> is scaled to be O(1), so THRESH should be a reasonably *> small multiple of 1, e.g., 10 or 100. In particular, *> it should not depend on the precision (single vs. double) *> or the size of the matrix. It must be at least zero. *> \endverbatim *> *> \param[in] NOUNIT *> \verbatim *> NOUNIT is INTEGER *> The FORTRAN unit number for printing out error messages *> (e.g., if a routine returns IINFO not equal to 0.) *> \endverbatim *> *> \param[in,out] A *> \verbatim *> A is COMPLEX array, dimension *> (LDA, max(NN)) *> Used to hold the matrix whose eigenvalues are to be *> computed. *> \endverbatim *> *> \param[in] LDA *> \verbatim *> LDA is INTEGER *> The leading dimension of A. It must be at least 2 (not 1!) *> and at least max( KK )+1. *> \endverbatim *> *> \param[out] SD *> \verbatim *> SD is REAL array, dimension (max(NN)) *> Used to hold the diagonal of the tridiagonal matrix computed *> by CHBTRD. *> \endverbatim *> *> \param[out] SE *> \verbatim *> SE is REAL array, dimension (max(NN)) *> Used to hold the off-diagonal of the tridiagonal matrix *> computed by CHBTRD. *> \endverbatim *> *> \param[out] U *> \verbatim *> U is COMPLEX array, dimension (LDU, max(NN)) *> Used to hold the unitary matrix computed by CHBTRD. *> \endverbatim *> *> \param[in] LDU *> \verbatim *> LDU is INTEGER *> The leading dimension of U. It must be at least 1 *> and at least max( NN ). *> \endverbatim *> *> \param[out] WORK *> \verbatim *> WORK is COMPLEX array, dimension (LWORK) *> \endverbatim *> *> \param[in] LWORK *> \verbatim *> LWORK is INTEGER *> The number of entries in WORK. This must be at least *> max( LDA+1, max(NN)+1 )*max(NN). *> \endverbatim *> *> \param[out] RWORK *> \verbatim *> RWORK is REAL array *> \endverbatim *> *> \param[out] RESULT *> \verbatim *> RESULT is REAL array, dimension (4) *> The values computed by the tests described above. *> The values are currently limited to 1/ulp, to avoid *> overflow. *> \endverbatim *> *> \param[out] INFO *> \verbatim *> INFO is INTEGER *> If 0, then everything ran OK. *> *>your_sha256_hash------- *> *> Some Local Variables and Parameters: *> ---- ----- --------- --- ---------- *> ZERO, ONE Real 0 and 1. *> MAXTYP The number of types defined. *> NTEST The number of tests performed, or which can *> be performed so far, for the current matrix. *> NTESTT The total number of tests performed so far. *> NMAX Largest value in NN. *> NMATS The number of matrices generated so far. *> NERRS The number of tests which have exceeded THRESH *> so far. *> COND, IMODE Values to be passed to the matrix generators. *> ANORM Norm of A; passed to matrix generators. *> *> OVFL, UNFL Overflow and underflow thresholds. *> ULP, ULPINV Finest relative precision and its inverse. *> RTOVFL, RTUNFL Square roots of the previous 2 values. *> The following four arrays decode JTYPE: *> KTYPE(j) The general type (1-10) for type "j". *> KMODE(j) The MODE value to be passed to the matrix *> generator for type "j". *> KMAGN(j) The order of magnitude ( O(1), *> O(overflow^(1/2) ), O(underflow^(1/2) ) *> \endverbatim * * Authors: * ======== * *> \author Univ. of Tennessee *> \author Univ. of California Berkeley *> \author Univ. of Colorado Denver *> \author NAG Ltd. * *> \ingroup complex_eig * * ===================================================================== SUBROUTINE CCHKHB( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE, ISEED, $ THRESH, NOUNIT, A, LDA, SD, SE, U, LDU, WORK, $ LWORK, RWORK, RESULT, INFO ) * * -- LAPACK test routine -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * * .. Scalar Arguments .. INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES, $ NWDTHS REAL THRESH * .. * .. Array Arguments .. LOGICAL DOTYPE( * ) INTEGER ISEED( 4 ), KK( * ), NN( * ) REAL RESULT( * ), RWORK( * ), SD( * ), SE( * ) COMPLEX A( LDA, * ), U( LDU, * ), WORK( * ) * .. * * ===================================================================== * * .. Parameters .. COMPLEX CZERO, CONE PARAMETER ( CZERO = ( 0.0E+0, 0.0E+0 ), $ CONE = ( 1.0E+0, 0.0E+0 ) ) REAL ZERO, ONE, TWO, TEN PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0, TWO = 2.0E+0, $ TEN = 10.0E+0 ) REAL HALF PARAMETER ( HALF = ONE / TWO ) INTEGER MAXTYP PARAMETER ( MAXTYP = 15 ) * .. * .. Local Scalars .. LOGICAL BADNN, BADNNB INTEGER I, IINFO, IMODE, ITYPE, J, JC, JCOL, JR, JSIZE, $ JTYPE, JWIDTH, K, KMAX, MTYPES, N, NERRS, $ NMATS, NMAX, NTEST, NTESTT REAL ANINV, ANORM, COND, OVFL, RTOVFL, RTUNFL, $ TEMP1, ULP, ULPINV, UNFL * .. * .. Local Arrays .. INTEGER IDUMMA( 1 ), IOLDSD( 4 ), KMAGN( MAXTYP ), $ KMODE( MAXTYP ), KTYPE( MAXTYP ) * .. * .. External Functions .. REAL SLAMCH EXTERNAL SLAMCH * .. * .. External Subroutines .. EXTERNAL CHBT21, CHBTRD, CLACPY, CLATMR, CLATMS, CLASET, $ SLASUM, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC ABS, CONJG, MAX, MIN, REAL, SQRT * .. * .. Data statements .. DATA KTYPE / 1, 2, 5*4, 5*5, 3*8 / DATA KMAGN / 2*1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 3, 1, $ 2, 3 / DATA KMODE / 2*0, 4, 3, 1, 4, 4, 4, 3, 1, 4, 4, 0, $ 0, 0 / * .. * .. Executable Statements .. * * Check for errors * NTESTT = 0 INFO = 0 * * Important constants * BADNN = .FALSE. NMAX = 1 DO 10 J = 1, NSIZES NMAX = MAX( NMAX, NN( J ) ) IF( NN( J ).LT.0 ) $ BADNN = .TRUE. 10 CONTINUE * BADNNB = .FALSE. KMAX = 0 DO 20 J = 1, NSIZES KMAX = MAX( KMAX, KK( J ) ) IF( KK( J ).LT.0 ) $ BADNNB = .TRUE. 20 CONTINUE KMAX = MIN( NMAX-1, KMAX ) * * Check for errors * IF( NSIZES.LT.0 ) THEN INFO = -1 ELSE IF( BADNN ) THEN INFO = -2 ELSE IF( NWDTHS.LT.0 ) THEN INFO = -3 ELSE IF( BADNNB ) THEN INFO = -4 ELSE IF( NTYPES.LT.0 ) THEN INFO = -5 ELSE IF( LDA.LT.KMAX+1 ) THEN INFO = -11 ELSE IF( LDU.LT.NMAX ) THEN INFO = -15 ELSE IF( ( MAX( LDA, NMAX )+1 )*NMAX.GT.LWORK ) THEN INFO = -17 END IF * IF( INFO.NE.0 ) THEN CALL XERBLA( 'CCHKHB', -INFO ) RETURN END IF * * Quick return if possible * IF( NSIZES.EQ.0 .OR. NTYPES.EQ.0 .OR. NWDTHS.EQ.0 ) $ RETURN * * More Important constants * UNFL = SLAMCH( 'Safe minimum' ) OVFL = ONE / UNFL ULP = SLAMCH( 'Epsilon' )*SLAMCH( 'Base' ) ULPINV = ONE / ULP RTUNFL = SQRT( UNFL ) RTOVFL = SQRT( OVFL ) * * Loop over sizes, types * NERRS = 0 NMATS = 0 * DO 190 JSIZE = 1, NSIZES N = NN( JSIZE ) ANINV = ONE / REAL( MAX( 1, N ) ) * DO 180 JWIDTH = 1, NWDTHS K = KK( JWIDTH ) IF( K.GT.N ) $ GO TO 180 K = MAX( 0, MIN( N-1, K ) ) * IF( NSIZES.NE.1 ) THEN MTYPES = MIN( MAXTYP, NTYPES ) ELSE MTYPES = MIN( MAXTYP+1, NTYPES ) END IF * DO 170 JTYPE = 1, MTYPES IF( .NOT.DOTYPE( JTYPE ) ) $ GO TO 170 NMATS = NMATS + 1 NTEST = 0 * DO 30 J = 1, 4 IOLDSD( J ) = ISEED( J ) 30 CONTINUE * * Compute "A". * Store as "Upper"; later, we will copy to other format. * * Control parameters: * * KMAGN KMODE KTYPE * =1 O(1) clustered 1 zero * =2 large clustered 2 identity * =3 small exponential (none) * =4 arithmetic diagonal, (w/ eigenvalues) * =5 random log hermitian, w/ eigenvalues * =6 random (none) * =7 random diagonal * =8 random hermitian * =9 positive definite * =10 diagonally dominant tridiagonal * IF( MTYPES.GT.MAXTYP ) $ GO TO 100 * ITYPE = KTYPE( JTYPE ) IMODE = KMODE( JTYPE ) * * Compute norm * GO TO ( 40, 50, 60 )KMAGN( JTYPE ) * 40 CONTINUE ANORM = ONE GO TO 70 * 50 CONTINUE ANORM = ( RTOVFL*ULP )*ANINV GO TO 70 * 60 CONTINUE ANORM = RTUNFL*N*ULPINV GO TO 70 * 70 CONTINUE * CALL CLASET( 'Full', LDA, N, CZERO, CZERO, A, LDA ) IINFO = 0 IF( JTYPE.LE.15 ) THEN COND = ULPINV ELSE COND = ULPINV*ANINV / TEN END IF * * Special Matrices -- Identity & Jordan block * * Zero * IF( ITYPE.EQ.1 ) THEN IINFO = 0 * ELSE IF( ITYPE.EQ.2 ) THEN * * Identity * DO 80 JCOL = 1, N A( K+1, JCOL ) = ANORM 80 CONTINUE * ELSE IF( ITYPE.EQ.4 ) THEN * * Diagonal Matrix, [Eigen]values Specified * CALL CLATMS( N, N, 'S', ISEED, 'H', RWORK, IMODE, $ COND, ANORM, 0, 0, 'Q', A( K+1, 1 ), LDA, $ WORK, IINFO ) * ELSE IF( ITYPE.EQ.5 ) THEN * * Hermitian, eigenvalues specified * CALL CLATMS( N, N, 'S', ISEED, 'H', RWORK, IMODE, $ COND, ANORM, K, K, 'Q', A, LDA, WORK, $ IINFO ) * ELSE IF( ITYPE.EQ.7 ) THEN * * Diagonal, random eigenvalues * CALL CLATMR( N, N, 'S', ISEED, 'H', WORK, 6, ONE, $ CONE, 'T', 'N', WORK( N+1 ), 1, ONE, $ WORK( 2*N+1 ), 1, ONE, 'N', IDUMMA, 0, 0, $ ZERO, ANORM, 'Q', A( K+1, 1 ), LDA, $ IDUMMA, IINFO ) * ELSE IF( ITYPE.EQ.8 ) THEN * * Hermitian, random eigenvalues * CALL CLATMR( N, N, 'S', ISEED, 'H', WORK, 6, ONE, $ CONE, 'T', 'N', WORK( N+1 ), 1, ONE, $ WORK( 2*N+1 ), 1, ONE, 'N', IDUMMA, K, K, $ ZERO, ANORM, 'Q', A, LDA, IDUMMA, IINFO ) * ELSE IF( ITYPE.EQ.9 ) THEN * * Positive definite, eigenvalues specified. * CALL CLATMS( N, N, 'S', ISEED, 'P', RWORK, IMODE, $ COND, ANORM, K, K, 'Q', A, LDA, $ WORK( N+1 ), IINFO ) * ELSE IF( ITYPE.EQ.10 ) THEN * * Positive definite tridiagonal, eigenvalues specified. * IF( N.GT.1 ) $ K = MAX( 1, K ) CALL CLATMS( N, N, 'S', ISEED, 'P', RWORK, IMODE, $ COND, ANORM, 1, 1, 'Q', A( K, 1 ), LDA, $ WORK, IINFO ) DO 90 I = 2, N TEMP1 = ABS( A( K, I ) ) / $ SQRT( ABS( A( K+1, I-1 )*A( K+1, I ) ) ) IF( TEMP1.GT.HALF ) THEN A( K, I ) = HALF*SQRT( ABS( A( K+1, $ I-1 )*A( K+1, I ) ) ) END IF 90 CONTINUE * ELSE * IINFO = 1 END IF * IF( IINFO.NE.0 ) THEN WRITE( NOUNIT, FMT = 9999 )'Generator', IINFO, N, $ JTYPE, IOLDSD INFO = ABS( IINFO ) RETURN END IF * 100 CONTINUE * * Call CHBTRD to compute S and U from upper triangle. * CALL CLACPY( ' ', K+1, N, A, LDA, WORK, LDA ) * NTEST = 1 CALL CHBTRD( 'V', 'U', N, K, WORK, LDA, SD, SE, U, LDU, $ WORK( LDA*N+1 ), IINFO ) * IF( IINFO.NE.0 ) THEN WRITE( NOUNIT, FMT = 9999 )'CHBTRD(U)', IINFO, N, $ JTYPE, IOLDSD INFO = ABS( IINFO ) IF( IINFO.LT.0 ) THEN RETURN ELSE RESULT( 1 ) = ULPINV GO TO 150 END IF END IF * * Do tests 1 and 2 * CALL CHBT21( 'Upper', N, K, 1, A, LDA, SD, SE, U, LDU, $ WORK, RWORK, RESULT( 1 ) ) * * Convert A from Upper-Triangle-Only storage to * Lower-Triangle-Only storage. * DO 120 JC = 1, N DO 110 JR = 0, MIN( K, N-JC ) A( JR+1, JC ) = CONJG( A( K+1-JR, JC+JR ) ) 110 CONTINUE 120 CONTINUE DO 140 JC = N + 1 - K, N DO 130 JR = MIN( K, N-JC ) + 1, K A( JR+1, JC ) = ZERO 130 CONTINUE 140 CONTINUE * * Call CHBTRD to compute S and U from lower triangle * CALL CLACPY( ' ', K+1, N, A, LDA, WORK, LDA ) * NTEST = 3 CALL CHBTRD( 'V', 'L', N, K, WORK, LDA, SD, SE, U, LDU, $ WORK( LDA*N+1 ), IINFO ) * IF( IINFO.NE.0 ) THEN WRITE( NOUNIT, FMT = 9999 )'CHBTRD(L)', IINFO, N, $ JTYPE, IOLDSD INFO = ABS( IINFO ) IF( IINFO.LT.0 ) THEN RETURN ELSE RESULT( 3 ) = ULPINV GO TO 150 END IF END IF NTEST = 4 * * Do tests 3 and 4 * CALL CHBT21( 'Lower', N, K, 1, A, LDA, SD, SE, U, LDU, $ WORK, RWORK, RESULT( 3 ) ) * * End of Loop -- Check for RESULT(j) > THRESH * 150 CONTINUE NTESTT = NTESTT + NTEST * * Print out tests which fail. * DO 160 JR = 1, NTEST IF( RESULT( JR ).GE.THRESH ) THEN * * If this is the first test to fail, * print a header to the data file. * IF( NERRS.EQ.0 ) THEN WRITE( NOUNIT, FMT = 9998 )'CHB' WRITE( NOUNIT, FMT = 9997 ) WRITE( NOUNIT, FMT = 9996 ) WRITE( NOUNIT, FMT = 9995 )'Hermitian' WRITE( NOUNIT, FMT = 9994 )'unitary', '*', $ 'conjugate transpose', ( '*', J = 1, 4 ) END IF NERRS = NERRS + 1 WRITE( NOUNIT, FMT = 9993 )N, K, IOLDSD, JTYPE, $ JR, RESULT( JR ) END IF 160 CONTINUE * 170 CONTINUE 180 CONTINUE 190 CONTINUE * * Summary * CALL SLASUM( 'CHB', NOUNIT, NERRS, NTESTT ) RETURN * 9999 FORMAT( ' CCHKHB: ', A, ' returned INFO=', I6, '.', / 9X, 'N=', $ I6, ', JTYPE=', I6, ', ISEED=(', 3( I5, ',' ), I5, ')' ) 9998 FORMAT( / 1X, A3, $ ' -- Complex Hermitian Banded Tridiagonal Reduction Routines' $ ) 9997 FORMAT( ' Matrix types (see SCHK23 for details): ' ) * 9996 FORMAT( / ' Special Matrices:', $ / ' 1=Zero matrix. ', $ ' 5=Diagonal: clustered entries.', $ / ' 2=Identity matrix. ', $ ' 6=Diagonal: large, evenly spaced.', $ / ' 3=Diagonal: evenly spaced entries. ', $ ' 7=Diagonal: small, evenly spaced.', $ / ' 4=Diagonal: geometr. spaced entries.' ) 9995 FORMAT( ' Dense ', A, ' Banded Matrices:', $ / ' 8=Evenly spaced eigenvals. ', $ ' 12=Small, evenly spaced eigenvals.', $ / ' 9=Geometrically spaced eigenvals. ', $ ' 13=Matrix with random O(1) entries.', $ / ' 10=Clustered eigenvalues. ', $ ' 14=Matrix with large random entries.', $ / ' 11=Large, evenly spaced eigenvals. ', $ ' 15=Matrix with small random entries.' ) * 9994 FORMAT( / ' Tests performed: (S is Tridiag, U is ', A, ',', $ / 20X, A, ' means ', A, '.', / ' UPLO=''U'':', $ / ' 1= | A - U S U', A1, ' | / ( |A| n ulp ) ', $ ' 2= | I - U U', A1, ' | / ( n ulp )', / ' UPLO=''L'':', $ / ' 3= | A - U S U', A1, ' | / ( |A| n ulp ) ', $ ' 4= | I - U U', A1, ' | / ( n ulp )' ) 9993 FORMAT( ' N=', I5, ', K=', I4, ', seed=', 4( I4, ',' ), ' type ', $ I2, ', test(', I2, ')=', G10.3 ) * * End of CCHKHB * END ```
```c /************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel your_sha256_hash------------- 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. * Neither the name of the University of Cambridge 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 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. your_sha256_hash------------- */ /* This module contains the function for checking a script run. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "pcre2_internal.h" /************************************************* * Check script run * *************************************************/ /* A script run is conceptually a sequence of characters all in the same Unicode script. However, it isn't quite that simple. There are special rules for scripts that are commonly used together, and also special rules for digits. This function implements the appropriate checks, which is possible only when PCRE2 is compiled with Unicode support. The function returns TRUE if there is no Unicode support; however, it should never be called in that circumstance because an error is given by pcre2_compile() if a script run is called for in a version of PCRE2 compiled without Unicode support. Arguments: pgr point to the first character endptr point after the last character utf TRUE if in UTF mode Returns: TRUE if this is a valid script run */ /* These are states in the checking process. */ enum { SCRIPT_UNSET, /* Requirement as yet unknown */ SCRIPT_MAP, /* Bitmap contains acceptable scripts */ SCRIPT_HANPENDING, /* Have had only Han characters */ SCRIPT_HANHIRAKATA, /* Expect Han or Hirikata */ SCRIPT_HANBOPOMOFO, /* Expect Han or Bopomofo */ SCRIPT_HANHANGUL /* Expect Han or Hangul */ }; #define UCD_MAPSIZE (ucp_Unknown/32 + 1) #define FULL_MAPSIZE (ucp_Script_Count/32 + 1) BOOL PRIV(script_run)(PCRE2_SPTR ptr, PCRE2_SPTR endptr, BOOL utf) { #ifdef SUPPORT_UNICODE uint32_t require_state = SCRIPT_UNSET; uint32_t require_map[FULL_MAPSIZE]; uint32_t map[FULL_MAPSIZE]; uint32_t require_digitset = 0; uint32_t c; #if PCRE2_CODE_UNIT_WIDTH == 32 (void)utf; /* Avoid compiler warning */ #endif /* Any string containing fewer than 2 characters is a valid script run. */ if (ptr >= endptr) return TRUE; GETCHARINCTEST(c, ptr); if (ptr >= endptr) return TRUE; /* Initialize the require map. This is a full-size bitmap that has a bit for every script, as opposed to the maps in ucd_script_sets, which only have bits for scripts less than ucp_Unknown - those that appear in script extension lists. */ for (int i = 0; i < FULL_MAPSIZE; i++) require_map[i] = 0; /* Scan strings of two or more characters, checking the Unicode characteristics of each code point. There is special code for scripts that can be combined with characters from the Han Chinese script. This may be used in conjunction with four other scripts in these combinations: . Han with Hiragana and Katakana is allowed (for Japanese). . Han with Bopomofo is allowed (for Taiwanese Mandarin). . Han with Hangul is allowed (for Korean). If the first significant character's script is one of the four, the required script type is immediately known. However, if the first significant character's script is Han, we have to keep checking for a non-Han character. Hence the SCRIPT_HANPENDING state. */ for (;;) { const ucd_record *ucd = GET_UCD(c); uint32_t script = ucd->script; /* If the script is Unknown, the string is not a valid script run. Such characters can only form script runs of length one (see test above). */ if (script == ucp_Unknown) return FALSE; /* A character without any script extensions whose script is Inherited or Common is always accepted with any script. If there are extensions, the following processing happens for all scripts. */ if (UCD_SCRIPTX_PROP(ucd) != 0 || (script != ucp_Inherited && script != ucp_Common)) { BOOL OK; /* Set up a full-sized map for this character that can include bits for all scripts. Copy the scriptx map for this character (which covers those scripts that appear in script extension lists), set the remaining values to zero, and then, except for Common or Inherited, add this script's bit to the map. */ memcpy(map, PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(ucd), UCD_MAPSIZE * sizeof(uint32_t)); memset(map + UCD_MAPSIZE, 0, (FULL_MAPSIZE - UCD_MAPSIZE) * sizeof(uint32_t)); if (script != ucp_Common && script != ucp_Inherited) MAPSET(map, script); /* Handle the different checking states */ switch(require_state) { /* First significant character - it might follow Common or Inherited characters that do not have any script extensions. */ case SCRIPT_UNSET: switch(script) { case ucp_Han: require_state = SCRIPT_HANPENDING; break; case ucp_Hiragana: case ucp_Katakana: require_state = SCRIPT_HANHIRAKATA; break; case ucp_Bopomofo: require_state = SCRIPT_HANBOPOMOFO; break; case ucp_Hangul: require_state = SCRIPT_HANHANGUL; break; default: memcpy(require_map, map, FULL_MAPSIZE * sizeof(uint32_t)); require_state = SCRIPT_MAP; break; } break; /* The first significant character was Han. An inspection of the Unicode 11.0.0 files shows that there are the following types of Script Extension list that involve the Han, Bopomofo, Hiragana, Katakana, and Hangul scripts: . Bopomofo + Han . Han + Hiragana + Katakana . Hiragana + Katakana . Bopopmofo + Hangul + Han + Hiragana + Katakana The following code tries to make sense of this. */ #define FOUND_BOPOMOFO 1 #define FOUND_HIRAGANA 2 #define FOUND_KATAKANA 4 #define FOUND_HANGUL 8 case SCRIPT_HANPENDING: if (script != ucp_Han) /* Another Han does nothing */ { uint32_t chspecial = 0; if (MAPBIT(map, ucp_Bopomofo) != 0) chspecial |= FOUND_BOPOMOFO; if (MAPBIT(map, ucp_Hiragana) != 0) chspecial |= FOUND_HIRAGANA; if (MAPBIT(map, ucp_Katakana) != 0) chspecial |= FOUND_KATAKANA; if (MAPBIT(map, ucp_Hangul) != 0) chspecial |= FOUND_HANGUL; if (chspecial == 0) return FALSE; /* Not allowed with Han */ if (chspecial == FOUND_BOPOMOFO) require_state = SCRIPT_HANBOPOMOFO; else if (chspecial == (FOUND_HIRAGANA|FOUND_KATAKANA)) require_state = SCRIPT_HANHIRAKATA; /* Otherwise this character must be allowed with all of them, so remain in the pending state. */ } break; /* Previously encountered one of the "with Han" scripts. Check that this character is appropriate. */ case SCRIPT_HANHIRAKATA: if (MAPBIT(map, ucp_Han) + MAPBIT(map, ucp_Hiragana) + MAPBIT(map, ucp_Katakana) == 0) return FALSE; break; case SCRIPT_HANBOPOMOFO: if (MAPBIT(map, ucp_Han) + MAPBIT(map, ucp_Bopomofo) == 0) return FALSE; break; case SCRIPT_HANHANGUL: if (MAPBIT(map, ucp_Han) + MAPBIT(map, ucp_Hangul) == 0) return FALSE; break; /* Previously encountered one or more characters that are allowed with a list of scripts. */ case SCRIPT_MAP: OK = FALSE; for (int i = 0; i < FULL_MAPSIZE; i++) { if ((require_map[i] & map[i]) != 0) { OK = TRUE; break; } } if (!OK) return FALSE; /* The rest of the string must be in this script, but we have to allow for the Han complications. */ switch(script) { case ucp_Han: require_state = SCRIPT_HANPENDING; break; case ucp_Hiragana: case ucp_Katakana: require_state = SCRIPT_HANHIRAKATA; break; case ucp_Bopomofo: require_state = SCRIPT_HANBOPOMOFO; break; case ucp_Hangul: require_state = SCRIPT_HANHANGUL; break; /* Compute the intersection of the required list of scripts and the allowed scripts for this character. */ default: for (int i = 0; i < FULL_MAPSIZE; i++) require_map[i] &= map[i]; break; } break; } } /* End checking character's script and extensions. */ /* The character is in an acceptable script. We must now ensure that all decimal digits in the string come from the same set. Some scripts (e.g. Common, Arabic) have more than one set of decimal digits. This code does not allow mixing sets, even within the same script. The vector called PRIV(ucd_digit_sets)[] contains, in its first element, the number of following elements, and then, in ascending order, the code points of the '9' characters in every set of 10 digits. Each set is identified by the offset in the vector of its '9' character. An initial check of the first value picks up ASCII digits quickly. Otherwise, a binary chop is used. */ if (ucd->chartype == ucp_Nd) { uint32_t digitset; if (c <= PRIV(ucd_digit_sets)[1]) digitset = 1; else { int mid; int bot = 1; int top = PRIV(ucd_digit_sets)[0]; for (;;) { if (top <= bot + 1) /* <= rather than == is paranoia */ { digitset = top; break; } mid = (top + bot) / 2; if (c <= PRIV(ucd_digit_sets)[mid]) top = mid; else bot = mid; } } /* A required value of 0 means "unset". */ if (require_digitset == 0) require_digitset = digitset; else if (digitset != require_digitset) return FALSE; } /* End digit handling */ /* If we haven't yet got to the end, pick up the next character. */ if (ptr >= endptr) return TRUE; GETCHARINCTEST(c, ptr); } /* End checking loop */ #else /* NOT SUPPORT_UNICODE */ (void)ptr; (void)endptr; (void)utf; return TRUE; #endif /* SUPPORT_UNICODE */ } /* End of pcre2_script_run.c */ ```
Newport Pagnell railway station was a railway station that served Newport Pagnell, Buckinghamshire, on the Wolverton–Newport Pagnell line. Opened in 1867 the station consisted of a brick built station building, and extensive goods facilities. The last passenger train ran on 5 September 1964 and the last goods train on 22 May 1967. The station site is now under Sheppard's Close, a modern residential development. The trackbed is now a rail trail, part of the Milton Keynes redway system. There is commemorative column on the site of the final signal post just short of the station site. Motive Power Depot The London and North Western Railway opened a small motive power depot at the south side of the line near the station in 1886. This was closed 15 June 1955 and demolished. See also References External links The station and goods yard (marked 'Wharf') on 1952 six-inch-scale O. S. map (National Library of Scotland) Plan of the station's layout Disused railway stations in Buckinghamshire Former London and North Western Railway stations Railway stations in Great Britain opened in 1867 Railway stations in Great Britain closed in 1964 Beeching closures in England Railway stations in Milton Keynes
Denny-Renton Clay and Coal Company, founded in 1892 as Denny Clay Company, was the largest producer of brick pavers in the world by 1905. An industry journal said in 1909 "The clay products of this company have long been a standard for general excellence in Seattle and the entire northwest" and described its products: The factory in Taylor, Washington, was near heavy glacial clay deposits in an high bank used to make the brick, and could produce 100,000 bricks a day in 1907. Hydraulic mining was used to extract clay from the hill. The factory produced 58 million bricks in 1917. It was closed when Taylor was condemned to become part of Seattle's Cedar River watershed in 1947. History The company was founded by Seattle founder Arthur A. Denny in 1892 when he bought out predecessor company Puget Sound Fire Clay Company and named it Denny Clay Company. His son Orion O. Denny, who was the first baby boy born to the settlers of Seattle, became a vice-president of the company and president in 1899 when Arthur died. It merged with Renton Brick Works and was renamed Denny-Renton Clay and Coal Company. The company was bought by Gladding, McBean in 1927 and ceased to exist as a separate operation. Legacy in Seattle architecture Ornamental terra cotta from the Renton factory and other local factories is found in unusual abundance in buildings in Downtown Seattle, exemplified by the 1916 Arctic Building, and the University of Washington buildings designed by Bebb and Gould. The Indian head decoration on the Cobb Building and the Henry-White-Stuart buildings (now demolished) may have used Denny-Renton terra cotta. Pike Place Market, built in 1907, is paved with Denny Renton bricks. Renton brickworks today The location of the former Renton brickworks () is now a dog park in Renton on the Cedar River Trail, near its crossing with I-405. References Bibliography External links Museums 101: Renton History Museum (Photo Diary) By Ojibwa Sunday Aug 24, 2014 Daily Kos Paving the way: King County bricks built roads around the world, Black Diamond Historical Society, December 7, 2014 Defunct companies based in Seattle Non-renewable resource companies disestablished in 1927 American companies established in 1892 Non-renewable resource companies established in 1892 1892 establishments in Washington (state) 1927 disestablishments in Washington (state)
Juan Carlos "Mandrake" Trebucq (born 6 August 1945 in Ensenada) is an Argentine former football striker. Career Trebucq started his career in 1965 with Gimnasia y Esgrima La Plata. In 1969, he joined Argentine club River Plate, and he helped the club reach the final of the 1969 Metropolitano championship. After three seasons with River Plate, Trebucq moved to France where he played for Troyes and Toulouse. References 1945 births Living people Footballers from Buenos Aires Province Argentine men's footballers Argentine expatriate men's footballers Men's association football forwards Club de Gimnasia y Esgrima La Plata footballers Club Atlético River Plate footballers ES Troyes AC players Toulouse FC players Expatriate men's footballers in France Argentine expatriate sportspeople in France Argentine Primera División players Ligue 1 players Ligue 2 players
```c++ /* * */ #include "esp_uart_spinel_interface.hpp" #include <errno.h> #include <fcntl.h> #include <sys/select.h> #include <sys/unistd.h> #include "esp_check.h" #include "esp_err.h" #include "esp_log.h" #include "esp_openthread_common_macro.h" #include "esp_openthread_types.h" #include "esp_openthread_uart.h" #include "driver/uart_vfs.h" #include "core/common/code_utils.hpp" #include "core/common/logging.hpp" #include "driver/uart.h" #include "lib/platform/exit_code.h" #include "openthread/platform/time.h" namespace esp { namespace openthread { UartSpinelInterface::UartSpinelInterface(void) : m_receiver_frame_callback(nullptr) , m_receiver_frame_context(nullptr) , m_receive_frame_buffer(nullptr) , m_uart_fd(-1) , mRcpFailureHandler(nullptr) { } UartSpinelInterface::~UartSpinelInterface(void) { Deinit(); } otError UartSpinelInterface::Init(ReceiveFrameCallback aCallback, void *aCallbackContext, RxFrameBuffer &aFrameBuffer) { otError error = OT_ERROR_NONE; m_receiver_frame_callback = aCallback; m_receiver_frame_context = aCallbackContext; m_receive_frame_buffer = &aFrameBuffer; m_hdlc_decoder.Init(aFrameBuffer, HandleHdlcFrame, this); return error; } void UartSpinelInterface::Deinit(void) { m_receiver_frame_callback = nullptr; m_receiver_frame_context = nullptr; m_receive_frame_buffer = nullptr; } esp_err_t UartSpinelInterface::Enable(const esp_openthread_uart_config_t &radio_uart_config) { esp_err_t error = ESP_OK; m_uart_rx_buffer = static_cast<uint8_t *>(heap_caps_malloc(kMaxFrameSize, MALLOC_CAP_8BIT)); if (m_uart_rx_buffer == NULL) { return ESP_ERR_NO_MEM; } error = InitUart(radio_uart_config); ESP_LOGI(OT_PLAT_LOG_TAG, "spinel UART interface initialization completed"); return error; } esp_err_t UartSpinelInterface::Disable(void) { if (m_uart_rx_buffer) { heap_caps_free(m_uart_rx_buffer); } m_uart_rx_buffer = NULL; return DeinitUart(); } otError UartSpinelInterface::SendFrame(const uint8_t *frame, uint16_t length) { otError error = OT_ERROR_NONE; encoder_buffer.Clear(); ot::Hdlc::Encoder hdlc_encoder(encoder_buffer); SuccessOrExit(error = hdlc_encoder.BeginFrame()); SuccessOrExit(error = hdlc_encoder.Encode(frame, length)); SuccessOrExit(error = hdlc_encoder.EndFrame()); SuccessOrExit(error = Write(encoder_buffer.GetFrame(), encoder_buffer.GetLength())); exit: if (error != OT_ERROR_NONE) { ESP_LOGE(OT_PLAT_LOG_TAG, "send radio frame failed"); } else { ESP_LOGD(OT_PLAT_LOG_TAG, "sent radio frame"); } return error; } void UartSpinelInterface::Process(const void *aMainloopContext) { if (FD_ISSET(m_uart_fd, &((esp_openthread_mainloop_context_t *)aMainloopContext)->read_fds)) { ESP_LOGD(OT_PLAT_LOG_TAG, "radio uart read event"); TryReadAndDecode(); } } int UartSpinelInterface::TryReadAndDecode(void) { uint8_t buffer[UART_HW_FIFO_LEN(m_uart_config.port)]; ssize_t rval; do { rval = read(m_uart_fd, buffer, sizeof(buffer)); if (rval > 0) { m_hdlc_decoder.Decode(buffer, static_cast<uint16_t>(rval)); } } while (rval > 0); if ((rval < 0) && (errno != EAGAIN) && (errno != EWOULDBLOCK)) { ESP_ERROR_CHECK(TryRecoverUart()); } return rval; } otError UartSpinelInterface::WaitForWritable(void) { otError error = OT_ERROR_NONE; struct timeval timeout = {kMaxWaitTime / MS_PER_S, (kMaxWaitTime % MS_PER_S) * US_PER_MS}; uint64_t now = otPlatTimeGet(); uint64_t end = now + kMaxWaitTime * US_PER_MS; fd_set write_fds; fd_set error_fds; int rval; while (true) { FD_ZERO(&write_fds); FD_ZERO(&error_fds); FD_SET(m_uart_fd, &write_fds); FD_SET(m_uart_fd, &error_fds); rval = select(m_uart_fd + 1, NULL, &write_fds, &error_fds, &timeout); if (rval > 0) { if (FD_ISSET(m_uart_fd, &write_fds)) { ExitNow(); } else if (FD_ISSET(m_uart_fd, &error_fds)) { ExitNow(error = OT_ERROR_FAILED); } } else if ((rval < 0) && (errno != EINTR)) { ESP_ERROR_CHECK(TryRecoverUart()); ExitNow(error = OT_ERROR_FAILED); } now = otPlatTimeGet(); if (end > now) { uint64_t remain = end - now; timeout.tv_sec = static_cast<time_t>(remain / 1000000); timeout.tv_usec = static_cast<suseconds_t>(remain % 1000000); } else { break; } } error = OT_ERROR_FAILED; exit: return error; } otError UartSpinelInterface::Write(const uint8_t *aFrame, uint16_t length) { otError error = OT_ERROR_NONE; while (length) { ssize_t rval; rval = write(m_uart_fd, aFrame, length); if (rval > 0) { assert(rval <= length); length -= static_cast<uint16_t>(rval); aFrame += static_cast<uint16_t>(rval); continue; } else if (rval < 0) { ESP_ERROR_CHECK(TryRecoverUart()); ExitNow(error = OT_ERROR_FAILED); } SuccessOrExit(error = WaitForWritable()); } exit: return error; } otError UartSpinelInterface::WaitForFrame(uint64_t timeout_us) { otError error = OT_ERROR_NONE; struct timeval timeout; fd_set read_fds; fd_set error_fds; int rval; FD_ZERO(&read_fds); FD_ZERO(&error_fds); FD_SET(m_uart_fd, &read_fds); FD_SET(m_uart_fd, &error_fds); timeout.tv_sec = static_cast<time_t>(timeout_us / US_PER_S); timeout.tv_usec = static_cast<suseconds_t>(timeout_us % US_PER_S); rval = select(m_uart_fd + 1, &read_fds, NULL, &error_fds, &timeout); if (rval > 0) { if (FD_ISSET(m_uart_fd, &read_fds)) { TryReadAndDecode(); } else if (FD_ISSET(m_uart_fd, &error_fds)) { ESP_ERROR_CHECK(TryRecoverUart()); ExitNow(error = OT_ERROR_FAILED); } } else if (rval == 0) { ExitNow(error = OT_ERROR_RESPONSE_TIMEOUT); } else { ESP_ERROR_CHECK(TryRecoverUart()); ExitNow(error = OT_ERROR_FAILED); } exit: return error; } void UartSpinelInterface::HandleHdlcFrame(void *context, otError error) { static_cast<UartSpinelInterface *>(context)->HandleHdlcFrame(error); } void UartSpinelInterface::HandleHdlcFrame(otError error) { if (error == OT_ERROR_NONE) { ESP_LOGD(OT_PLAT_LOG_TAG, "received hdlc radio frame"); m_receiver_frame_callback(m_receiver_frame_context); } else { ESP_LOGE(OT_PLAT_LOG_TAG, "dropping radio frame: %s", otThreadErrorToString(error)); m_receive_frame_buffer->DiscardFrame(); } } esp_err_t UartSpinelInterface::InitUart(const esp_openthread_uart_config_t &radio_uart_config) { char uart_path[16]; m_uart_config = radio_uart_config; ESP_RETURN_ON_ERROR(esp_openthread_uart_init_port(&radio_uart_config), OT_PLAT_LOG_TAG, "esp_openthread_uart_init_port failed"); // We have a driver now installed so set up the read/write functions to use driver also. uart_vfs_dev_port_set_tx_line_endings(m_uart_config.port, ESP_LINE_ENDINGS_LF); uart_vfs_dev_port_set_rx_line_endings(m_uart_config.port, ESP_LINE_ENDINGS_LF); snprintf(uart_path, sizeof(uart_path), "/dev/uart/%d", radio_uart_config.port); m_uart_fd = open(uart_path, O_RDWR | O_NONBLOCK); return m_uart_fd >= 0 ? ESP_OK : ESP_FAIL; } esp_err_t UartSpinelInterface::DeinitUart(void) { if (m_uart_fd != -1) { close(m_uart_fd); m_uart_fd = -1; return uart_driver_delete(m_uart_config.port); } else { return ESP_ERR_INVALID_STATE; } } esp_err_t UartSpinelInterface::TryRecoverUart(void) { ESP_RETURN_ON_ERROR(DeinitUart(), OT_PLAT_LOG_TAG, "DeInitUart failed"); ESP_RETURN_ON_ERROR(InitUart(m_uart_config), OT_PLAT_LOG_TAG, "InitUart failed"); return ESP_OK; } otError UartSpinelInterface::HardwareReset(void) { if (mRcpFailureHandler) { TryRecoverUart(); mRcpFailureHandler(); } return OT_ERROR_NONE; } void UartSpinelInterface::UpdateFdSet(void *aMainloopContext) { // Register only READ events for radio UART and always wait // for a radio WRITE to complete. FD_SET(m_uart_fd, &((esp_openthread_mainloop_context_t *)aMainloopContext)->read_fds); if (m_uart_fd > ((esp_openthread_mainloop_context_t *)aMainloopContext)->max_fd) { ((esp_openthread_mainloop_context_t *)aMainloopContext)->max_fd = m_uart_fd; } } uint32_t UartSpinelInterface::GetBusSpeed(void) const { return m_uart_config.uart_config.baud_rate; } } // namespace openthread } // namespace esp ```
```prolog #!/usr/bin/perl # # FILE: sha2test.pl # AUTHOR: Aaron D. Gifford - path_to_url # # 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 contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``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 AUTHOR OR CONTRIBUTOR(S) 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. # # $Id: sha2test.pl,v 1.1 2001/11/08 00:02:37 adg Exp adg $ # sub usage { my ($err) = shift(@_); print <<EOM; Error: $err Usage: $0 [<options>] [<test-vector-info-file> [<test-vector-info-file> ...]] Options: -256 Use SHA-256 hashes during testing -384 Use SHA-384 hashes during testing -512 Use SHA-512 hashes during testing -ALL Use all three hashes during testing -c256 <command-spec> Specify a command to execute to generate a SHA-256 hash. Be sure to include a '%' character which will be replaced by the test vector data filename containing the data to be hashed. This command implies the -256 option. -c384 <command-spec> Specify a command to execute to generate a SHA-384 hash. See above. Implies -384. -c512 <command-spec> Specify a command to execute to generate a SHA-512 hash. See above. Implies -512. -cALL <command-spec> Specify a command to execute that will generate all three hashes at once and output the data in hexadecimal. See above for information about the <command-spec>. This option implies the -ALL option, and also overrides any other command options if present. By default, this program expects to execute the command ./sha2 within the current working directory to generate all hashes. If no test vector information files are specified, this program expects to read a series of files ending in ".info" within a subdirectory of the current working directory called "testvectors". EOM exit(-1); } $c256 = $c384 = $c512 = $cALL = ""; $hashes = 0; @FILES = (); # Read all command-line options and files: while ($opt = shift(@ARGV)) { if ($opt =~ s/^\-//) { if ($opt eq "256") { $hashes |= 1; } elsif ($opt eq "384") { $hashes |= 2; } elsif ($opt eq "512") { $hashes |= 4; } elsif ($opt =~ /^ALL$/i) { $hashes = 7; } elsif ($opt =~ /^c256$/i) { $hashes |= 1; $opt = $c256 = shift(@ARGV); $opt =~ s/\s+.*$//; if (!$c256 || $c256 !~ /\%/ || !-x $opt) { usage("Missing or invalid command specification for option -c256: $opt\n"); } } elsif ($opt =~ /^c384$/i) { $hashes |= 2; $opt = $c384 = shift(@ARGV); $opt =~ s/\s+.*$//; if (!$c384 || $c384 !~ /\%/ || !-x $opt) { usage("Missing or invalid command specification for option -c384: $opt\n"); } } elsif ($opt =~ /^c512$/i) { $hashes |= 4; $opt = $c512 = shift(@ARGV); $opt =~ s/\s+.*$//; if (!$c512 || $c512 !~ /\%/ || !-x $opt) { usage("Missing or invalid command specification for option -c512: $opt\n"); } } elsif ($opt =~ /^cALL$/i) { $hashes = 7; $opt = $cALL = shift(@ARGV); $opt =~ s/\s+.*$//; if (!$cALL || $cALL !~ /\%/ || !-x $opt) { usage("Missing or invalid command specification for option -cALL: $opt\n"); } } else { usage("Unknown/invalid option '$opt'\n"); } } else { usage("Invalid, nonexistent, or unreadable file '$opt': $!\n") if (!-f $opt); push(@FILES, $opt); } } # Set up defaults: if (!$cALL && !$c256 && !$c384 && !$c512) { $cALL = "./sha2 -ALL %"; usage("Required ./sha2 binary executable not found.\n") if (!-x "./sha2"); } $hashes = 7 if (!$hashes); # Do some sanity checks: usage("No command was supplied to generate SHA-256 hashes.\n") if ($hashes & 1 == 1 && !$cALL && !$c256); usage("No command was supplied to generate SHA-384 hashes.\n") if ($hashes & 2 == 2 && !$cALL && !$c384); usage("No command was supplied to generate SHA-512 hashes.\n") if ($hashes & 4 == 4 && !$cALL && !$c512); # Default .info files: if (scalar(@FILES) < 1) { opendir(DIR, "testvectors") || usage("Unable to scan directory 'testvectors' for vector information files: $!\n"); @FILES = grep(/\.info$/, readdir(DIR)); closedir(DIR); @FILES = map { s/^/testvectors\//; $_; } @FILES; @FILES = sort(@FILES); } # Now read in each test vector information file: foreach $file (@FILES) { $dir = $file; if ($file !~ /\//) { $dir = "./"; } else { $dir =~ s/\/[^\/]+$//; $dir .= "/"; } open(FILE, "<" . $file) || usage("Unable to open test vector information file '$file' for reading: $!\n"); $vec = { desc => "", file => "", sha256 => "", sha384 => "", sha512 => "" }; $data = $field = ""; $line = 0; while(<FILE>) { $line++; s/\s*[\r\n]+$//; next if ($field && $field ne "DESCRIPTION" && !$_); if (/^(DESCRIPTION|FILE|SHA256|SHA384|SHA512):$/) { if ($field eq "DESCRIPTION") { $vec->{desc} = $data; } elsif ($field eq "FILE") { $data = $dir . $data if ($data !~ /^\//); $vec->{file} = $data; } elsif ($field eq "SHA256") { $vec->{sha256} = $data; } elsif ($field eq "SHA384") { $vec->{sha384} = $data; } elsif ($field eq "SHA512") { $vec->{sha512} = $data; } $data = ""; $field = $1; } elsif ($field eq "DESCRIPTION") { s/^ //; $data .= $_ . "\n"; } elsif ($field =~ /^SHA\d\d\d$/) { s/^\s+//; if (!/^([a-f0-9]{32}|[a-f0-9]{64})$/) { usage("Invalid SHA-256/384/512 test vector information " . "file format at line $line of file '$file'\n"); } $data .= $_; } elsif ($field eq "FILE") { s/^ //; $data .= $_; } else { usage("Invalid SHA-256/384/512 test vector information file " . "format at line $line of file '$file'\n"); } } if ($field eq "DESCRIPTION") { $data = $dir . $data if ($data !~ /^\//); $vec->{desc} = $data; } elsif ($field eq "FILE") { $vec->{file} = $data; } elsif ($field eq "SHA256") { $vec->{sha256} = $data; } elsif ($field eq "SHA384") { $vec->{sha384} = $data; } elsif ($field eq "SHA512") { $vec->{sha512} = $data; } else { usage("Invalid SHA-256/384/512 test vector information file " . "format. Missing required fields in file '$file'\n"); } # Sanity check all entries: if (!$vec->{desc}) { usage("Invalid SHA-256/384/512 test vector information file " . "format. Missing required DESCRIPTION field in file '$file'\n"); } if (!$vec->{file}) { usage("Invalid SHA-256/384/512 test vector information file " . "format. Missing required FILE field in file '$file'\n"); } if (! -f $vec->{file}) { usage("The test vector data file (field FILE) name " . "'$vec->{file}' is not a readable file. Check the FILE filed in " . "file '$file'.\n"); } if (!($vec->{sha256} || $vec->{sha384} || $vec->{sha512})) { usage("Invalid SHA-256/384/512 test vector information file " . "format. There must be at least one SHA256, SHA384, or SHA512 " . "field specified in file '$file'.\n"); } if ($vec->{sha256} !~ /^(|[a-f0-9]{64})$/) { usage("Invalid SHA-256/384/512 test vector information file " . "format. The SHA256 field is invalid in file '$file'.\n"); } if ($vec->{sha384} !~ /^(|[a-f0-9]{96})$/) { usage("Invalid SHA-256/384/512 test vector information file " . "format. The SHA384 field is invalid in file '$file'.\n"); } if ($vec->{sha512} !~ /^(|[a-f0-9]{128})$/) { usage("Invalid SHA-256/384/512 test vector information file " . "format. The SHA512 field is invalid in file '$file'.\n"); } close(FILE); if ($hashes & (($vec->{sha256} ? 1 : 0) | ($vec->{sha384} ? 2 : 0) | ($vec->{sha512} ? 4 : 0))) { push(@VECTORS, $vec); } } usage("There were no test vectors for the specified hash(es) in any of the test vector information files you specified.\n") if (scalar(@VECTORS) < 1); $num = $errors = $error256 = $error384 = $error512 = $tests = $test256 = $test384 = $test512 = 0; foreach $vec (@VECTORS) { $num++; print "TEST VECTOR #$num:\n"; print "\t" . join("\n\t", split(/\n/, $vec->{desc})) . "\n"; print "VECTOR DATA FILE:\n\t$vec->{file}\n"; $sha256 = $sha384 = $sha512 = ""; if ($cALL) { $prog = $cALL; $prog =~ s/\%/'$vec->{file}'/g; @SHA = grep(/[a-fA-f0-9]{64,128}/, split(/\n/, `$prog`)); ($sha256) = grep(/(^[a-fA-F0-9]{64}$|^[a-fA-F0-9]{64}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{64}$|[^a-fA-F0-9][a-fA-F0-9]{64}[^a-fA-F0-9])/, @SHA); ($sha384) = grep(/(^[a-fA-F0-9]{96}$|^[a-fA-F0-9]{96}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{96}$|[^a-fA-F0-9][a-fA-F0-9]{96}[^a-fA-F0-9])/, @SHA); ($sha512) = grep(/(^[a-fA-F0-9]{128}$|^[a-fA-F0-9]{128}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{128}$|[^a-fA-F0-9][a-fA-F0-9]{128}[^a-fA-F0-9])/, @SHA); } else { if ($c256) { $prog = $c256; $prog =~ s/\%/'$vec->{file}'/g; @SHA = grep(/[a-fA-f0-9]{64,128}/, split(/\n/, `$prog`)); ($sha256) = grep(/(^[a-fA-F0-9]{64}$|^[a-fA-F0-9]{64}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{64}$|[^a-fA-F0-9][a-fA-F0-9]{64}[^a-fA-F0-9])/, @SHA); } if ($c384) { $prog = $c384; $prog =~ s/\%/'$vec->{file}'/g; @SHA = grep(/[a-fA-f0-9]{64,128}/, split(/\n/, `$prog`)); ($sha384) = grep(/(^[a-fA-F0-9]{96}$|^[a-fA-F0-9]{96}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{96}$|[^a-fA-F0-9][a-fA-F0-9]{96}[^a-fA-F0-9])/, @SHA); } if ($c512) { $prog = $c512; $prog =~ s/\%/'$vec->{file}'/g; @SHA = grep(/[a-fA-f0-9]{64,128}/, split(/\n/, `$prog`)); ($sha512) = grep(/(^[a-fA-F0-9]{128}$|^[a-fA-F0-9]{128}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{128}$|[^a-fA-F0-9][a-fA-F0-9]{128}[^a-fA-F0-9])/, @SHA); } } usage("Unable to generate any hashes for file '$vec->{file}'!\n") if (!$sha256 && !$sha384 && $sha512); $sha256 =~ tr/A-F/a-f/; $sha384 =~ tr/A-F/a-f/; $sha512 =~ tr/A-F/a-f/; $sha256 =~ s/^.*([a-f0-9]{64}).*$/$1/; $sha384 =~ s/^.*([a-f0-9]{96}).*$/$1/; $sha512 =~ s/^.*([a-f0-9]{128}).*$/$1/; if ($sha256 && $hashes & 1 == 1) { if ($vec->{sha256} eq $sha256) { print "SHA256 MATCHES:\n\t$sha256\n" } else { print "SHA256 DOES NOT MATCH:\n\tEXPECTED:\n\t\t$vec->{sha256}\n" . "\tGOT:\n\t\t$sha256\n\n"; $error256++; } $test256++; } if ($sha384 && $hashes & 2 == 2) { if ($vec->{sha384} eq $sha384) { print "SHA384 MATCHES:\n\t" . substr($sha384, 0, 64) . "\n\t" . substr($sha384, -32) . "\n"; } else { print "SHA384 DOES NOT MATCH:\n\tEXPECTED:\n\t\t" . substr($vec->{sha384}, 0, 64) . "\n\t\t" . substr($vec->{sha384}, -32) . "\n\tGOT:\n\t\t" . substr($sha384, 0, 64) . "\n\t\t" . substr($sha384, -32) . "\n\n"; $error384++; } $test384++; } if ($sha512 && $hashes & 4 == 4) { if ($vec->{sha512} eq $sha512) { print "SHA512 MATCHES:\n\t" . substr($sha512, 0, 64) . "\n\t" . substr($sha512, -64) . "\n"; } else { print "SHA512 DOES NOT MATCH:\n\tEXPECTED:\n\t\t" . substr($vec->{sha512}, 0, 64) . "\n\t\t" . substr($vec->{sha512}, -32) . "\n\tGOT:\n\t\t" . substr($sha512, 0, 64) . "\n\t\t" . substr($sha512, -64) . "\n\n"; $error512++; } $test512++; } } $errors = $error256 + $error384 + $error512; $tests = $test256 + $test384 + $test512; print "\n\n===== RESULTS ($num VECTOR DATA FILES HASHED) =====\n\n"; print "HASH TYPE\tNO. OF TESTS\tPASSED\tFAILED\n"; print "---------\t------------\t------\t------\n"; if ($test256) { $pass = $test256 - $error256; print "SHA-256\t\t".substr(" $test256", -12)."\t".substr(" $pass", -6)."\t".substr(" $error256", -6)."\n"; } if ($test384) { $pass = $test384 - $error384; print "SHA-384\t\t".substr(" $test384", -12)."\t".substr(" $pass", -6)."\t".substr(" $error384", -6)."\n"; } if ($test512) { $pass = $test512 - $error512; print "SHA-512\t\t".substr(" $test512", -12)."\t".substr(" $pass", -6)."\t".substr(" $error512", -6)."\n"; } print "----------------------------------------------\n"; $pass = $tests - $errors; print "TOTAL: ".substr(" $tests", -12)."\t".substr(" $pass", -6)."\t".substr(" $errors", -6)."\n\n"; print "NO ERRORS! ALL TESTS WERE SUCCESSFUL!\n\n" if (!$errors); ```
Women's rights in Djibouti are a source of concern for various human rights organizations, both within Djibouti and without. While minority groups are represented at all levels of the government, they effectively have no power to alter legislation, due to the repressive nature of the regime. Despite a legal quota that ensures that women hold at least 25 percent of the seats in the National Assembly, they remain underrepresented in leadership positions. Over 60% of women are illiterate. They face barriers to employment and appropriate health care. Rates of female genital mutilation remain high despite campaigns dating back to the 1980s. Economy 60.5 percent of women are illiterate and only 19 percent of women are employed as compared to 81 percent of men. In Djibouti, according to the National Gender Policy in 2011-2021, women are more affected by extreme and relative poverty and more affected by inactivity than men; women are more numerous than men in the informal sector. The creation of the Ministry of Women and the Family aims to make significant progress in Djibouti in regards to women's rights. From research conducted when women were given microcredit loans, a significantly positive association between microcredit and women’s empowerment was observed. Households with access to loans from MFIs are respectively 35.4%, 30.9% and 10.1% more likely to be economically, socially and interpersonally empowered. Women have faced limited access to financing (from banks and microfinance institutions), mainly due to the lack of bankable projects, the inexistence of financial accounts and the difficulty of providing sufficient guarantees. In response to these challenges, Djibouti’s government adopted a ten-year policy to consolidate its commitment to gender equity and equality in all economic and social areas. Healthcare Maternal obesity and cesarean delivery Maternal obesity is highly prevalent in Djibouti, a condition which increases the risk of cesarean delivery. A high rate of cesarean delivery among obese women has been observed in Sub-Saharan Africa, with rates over 50% in some studies. Prevalence of maternal obesity is high in Djibouti City and is related to an excess risk of cesarean delivery, even after controlling for a range of medical and socioeconomic variables. The present study has shown that maternal obesity is very prevalent in Djibouti City, with rates between 24.8% before 14 weeks of pregnancy and 43.2% at delivery. Rates of cesarean were increased among obese women, especially among primiparae. International guidelines recommend that obese women should be referred for delivery in a facility with available skilled medical staff, but a recent study showed that the availability of such emergency obstetric care was poor in African hospitals and clinics. However, at the Affi Hospital maternity clinic, midwives, pediatricians, anesthesiologists, and obstetricians are available 24 hours a day. Female genital mutilation Djibouti is the location with the highest rate of female genital mutilation in the world. 93% of women in Djibouti undergo the procedure. In Djibouti, female genital mutilation is often done in traditional styles, without using sterile and sanitary tools. It involves cutting a part of girls' genitals using cutting utensils such as knives, scissors, rulers, blades or even pieces of glass and then stitching it up with thread; thereafter, things like oil, honey, yogurt and tree leaves are applied to stop the bleeding. Type IV (infibulation) circumcision includes pricking, piercing, incising, scraping and cauterization. Infibulation is mostly practiced in the Horn of Africa including Djibouti. Since 1988, concerned authorities in Djibouti have been trying to abolish FGM. This practice was made illegal in 1990 and was specially mentioned as a violation of the rights of women and children. The procedure is usually performed at home in the absence of sterile conditions or anesthesia and by traditional practitioners or trained midwives. For urban populations, infibulation is frequently carried out by health professionals (nurse, midwife, doctor) acting clandestinely. Laws regarding FGM In Djibouti in 1995 and 2009, the government recognized FGM as an act of crime and those who are encouraging or operating female genital mutilation are considered as criminals. The First Lady launched a campaign in 2008 with the presence of the President of the National Assembly and several Ministers and with the support from the United States Ambassador. Since 1988, the Djibouti Women's Association has run a huge campaign to ban this tradition. In 1995, the National Assembly declared illegal and punishable the practice of FGM/C but the article of the National Penal Code related to this issue has never been applied up to present. In 1997 the Ministry of Health assisted with the United Nation Fund for Population (UNFP) promoted the “Project to Fight Female Circumcision” within a larger frame of "restoring the dignity and respect of women" and "to raise the condition of women within society." Consequences of FGM The consequences of this practice are evidenced by the high maternal death rate suffered in Djibouti and Somalia (> 700 per 100 000 live births) where FGM/ C is almost universal when compared to other nearby countries with a similar health and midwifery care but where FGM/C is much less common (Kenya and Tanzania: < 500 per 100 000 live births). Effects of FGM on pregnancy A tight infibulation can be a high risk for the mother and fetus if not handled by a skilled operator. It can lead to an unnecessary cesarean section as a result of the fear of handling infibulated women. A study was conducted regarding FGM and pregnancy in Djibouti. Overall, 29 of 643 women did not have any form of mutilation (4.5%), as opposed to 238 of 643 women with infibulation (37.0%), 369 with type 2 (57.4%), and 7 with type 1 mutilation (1.1%). Women with a severe type of mutilation were more likely to have socio-economic and medical risk factors. Conclusions: Infibulation was not related with excess perinatal morbidity in this setting with a very high prevalence of female genital mutilation, but future research should concentrate on the relation between infibulation and meconium. At Peltier General Hospital in Djibouti, both the obstetricians and the midwives have developed a high level of expertise in caring for infibulated women. Women with tight infibulation may be advised to have defibulation. Physicians at the hospital have to demonstrate cultural and ethnic sensitivity while explaining the short- and long-term health risks posed by infibulation. This treatment is regarded as a priority gynecologic procedure. References Djibouti Women
```c /** * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ /* * The following is auto-generated. Do not manually edit. See scripts/loops.js. */ #include "stdlib/ndarray/base/nullary/i.h" #include "stdlib/ndarray/base/nullary/typedefs.h" #include "stdlib/ndarray/base/nullary/macros.h" #include "stdlib/ndarray/base/nullary/dispatch_object.h" #include "stdlib/ndarray/base/nullary/dispatch.h" #include "stdlib/ndarray/ctor.h" #include <stdint.h> /** * Applies a nullary callback and assigns results to elements in a zero-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 0; * * // Define the array shape: * int64_t shape[] = {}; * * // Define the strides: * int64_t sx[] = { 0 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_0d( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_0d( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; int8_t status = stdlib_ndarray_iset_int32( arrays[ 0 ], 0, f() ); if ( status != 0 ) { return -1; } return 0; } /** * Applies a nullary callback and assigns results to elements in a one-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 1; * * // Define the array shape: * int64_t shape[] = { 3 }; * * // Define the strides: * int64_t sx[] = { 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_1d( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_1d( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_1D_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a two-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 2; * * // Define the array shape: * int64_t shape[] = { 2, 2 }; * * // Define the strides: * int64_t sx[] = { 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_2d( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_2d( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_2D_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a two-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 2; * * // Define the array shape: * int64_t shape[] = { 2, 2 }; * * // Define the strides: * int64_t sx[] = { 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_2d_blocked( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_2d_blocked( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_2D_BLOCKED_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a three-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 3; * * // Define the array shape: * int64_t shape[] = { 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_3d( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_3d( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_3D_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a three-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 3; * * // Define the array shape: * int64_t shape[] = { 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_3d_blocked( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_3d_blocked( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_3D_BLOCKED_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a four-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 4; * * // Define the array shape: * int64_t shape[] = { 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_4d( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_4d( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_4D_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a four-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 4; * * // Define the array shape: * int64_t shape[] = { 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_4d_blocked( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_4d_blocked( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_4D_BLOCKED_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a five-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 5; * * // Define the array shape: * int64_t shape[] = { 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_5d( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_5d( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_5D_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a five-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 5; * * // Define the array shape: * int64_t shape[] = { 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_5d_blocked( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_5d_blocked( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_5D_BLOCKED_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a six-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 6; * * // Define the array shape: * int64_t shape[] = { 1, 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_6d( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_6d( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_6D_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a six-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 6; * * // Define the array shape: * int64_t shape[] = { 1, 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_6d_blocked( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_6d_blocked( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_6D_BLOCKED_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a seven-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 7; * * // Define the array shape: * int64_t shape[] = { 1, 1, 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_7d( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_7d( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_7D_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a seven-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 7; * * // Define the array shape: * int64_t shape[] = { 1, 1, 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_7d_blocked( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_7d_blocked( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_7D_BLOCKED_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in an eight-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 8; * * // Define the array shape: * int64_t shape[] = { 1, 1, 1, 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 32, 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_8d( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_8d( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_8D_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in an eight-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 8; * * // Define the array shape: * int64_t shape[] = { 1, 1, 1, 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 32, 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_8d_blocked( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_8d_blocked( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_8D_BLOCKED_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a nine-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 9; * * // Define the array shape: * int64_t shape[] = { 1, 1, 1, 1, 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 32, 32, 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_9d( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_9d( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_9D_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a nine-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 9; * * // Define the array shape: * int64_t shape[] = { 1, 1, 1, 1, 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 32, 32, 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_9d_blocked( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_9d_blocked( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_9D_BLOCKED_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a ten-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 10; * * // Define the array shape: * int64_t shape[] = { 1, 1, 1, 1, 1, 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 32, 32, 32, 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_10d( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_10d( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_10D_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in a ten-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 10; * * // Define the array shape: * int64_t shape[] = { 1, 1, 1, 1, 1, 1, 1, 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 32, 32, 32, 32, 32, 32, 32, 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_10d_blocked( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_10d_blocked( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_10D_BLOCKED_LOOP_CLBK( int32_t ) return 0; } /** * Applies a nullary callback and assigns results to elements in an n-dimensional output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 3; * * // Define the array shape: * int64_t shape[] = { 2, 2, 2 }; * * // Define the strides: * int64_t sx[] = { 16, 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i_nd( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i_nd( struct ndarray *arrays[], void *fcn ) { typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_NDARRAY_NULLARY_ND_LOOP_CLBK( int32_t ) return 0; } // Define a list of nullary ndarray functions: static ndarrayNullaryFcn functions[] = { stdlib_ndarray_i_0d, stdlib_ndarray_i_1d, stdlib_ndarray_i_2d, stdlib_ndarray_i_3d, stdlib_ndarray_i_4d, stdlib_ndarray_i_5d, stdlib_ndarray_i_6d, stdlib_ndarray_i_7d, stdlib_ndarray_i_8d, stdlib_ndarray_i_9d, stdlib_ndarray_i_10d, stdlib_ndarray_i_nd }; // Define a list of nullary ndarray functions implementing loop blocking... static ndarrayNullaryFcn blocked_functions[] = { stdlib_ndarray_i_2d_blocked, stdlib_ndarray_i_3d_blocked, stdlib_ndarray_i_4d_blocked, stdlib_ndarray_i_5d_blocked, stdlib_ndarray_i_6d_blocked, stdlib_ndarray_i_7d_blocked, stdlib_ndarray_i_8d_blocked, stdlib_ndarray_i_9d_blocked, stdlib_ndarray_i_10d_blocked }; // Create a nullary function dispatch object: static const struct ndarrayNullaryDispatchObject obj = { // Array containing nullary ndarray functions: functions, // Number of nullary ndarray functions: 12, // Array containing nullary ndarray functions using loop blocking: blocked_functions, // Number of nullary ndarray functions using loop blocking: 9 }; /** * Applies a nullary callback and assigns results to elements in an output ndarray. * * ## Notes * * - If successful, the functions returns `0`; otherwise, the function returns an error code. * * @param arrays array whose only element is a pointer to an output array * @param fcn callback * @return status code * * @example * #include "stdlib/ndarray/base/nullary/i.h" * #include "stdlib/ndarray/dtypes.h" * #include "stdlib/ndarray/index_modes.h" * #include "stdlib/ndarray/orders.h" * #include "stdlib/ndarray/ctor.h" * #include <stdint.h> * #include <stdlib.h> * #include <stdio.h> * * // Define the ndarray data type: * enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_INT32; * * // Create an underlying byte array: * uint8_t xbuf[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; * * // Define the number of dimensions: * int64_t ndims = 2; * * // Define the array shape: * int64_t shape[] = { 2, 2 }; * * // Define the strides: * int64_t sx[] = { 8, 4 }; * * // Define the index offset: * int64_t ox = 0; * * // Define the array order: * enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; * * // Specify the index mode: * enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; * * // Specify the subscript index modes: * int8_t submodes[] = { imode }; * int64_t nsubmodes = 1; * * // Create an output ndarray: * struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes ); * if ( x == NULL ) { * fprintf( stderr, "Error allocating memory.\n" ); * exit( EXIT_FAILURE ); * } * * // Create an array containing a pointer to the ndarray: * struct ndarray *arrays[] = { x }; * * // Define a callback: * static int32_t fcn( void ) { * return 10; * } * * // Apply the callback: * int8_t status = stdlib_ndarray_i( arrays, (void *)fcn ); * if ( status != 0 ) { * fprintf( stderr, "Error during computation.\n" ); * exit( EXIT_FAILURE ); * } * * // ... * * // Free allocated memory: * stdlib_ndarray_free( x ); */ int8_t stdlib_ndarray_i( struct ndarray *arrays[], void *fcn ) { return stdlib_ndarray_nullary_dispatch( &obj, arrays, fcn ); } ```
```kotlin package io.gitlab.arturbosch.detekt.generator.printer interface DocumentationPrinter<in T> { fun print(item: T): String } ```
```python #!/usr/bin/env 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. """Generic utilities for C++ parsing.""" __author__ = 'nnorwitz@google.com (Neal Norwitz)' import sys # Set to True to see the start/end token indices. DEBUG = True def ReadFile(filename, print_error=True): """Returns the contents of a file.""" try: fp = open(filename) try: return fp.read() finally: fp.close() except IOError: if print_error: print('Error reading %s: %s' % (filename, sys.exc_info()[1])) return None ```
United National Federal Party (UNFP) was a political party in Zimbabwe, formed in November 1978 by Chief Kayisa Ndiweni, who had been a leading figure in the Zimbabwe United People's Organisation. UNFP contested the 1979 election and won 9 seats, mostly in the Matabeleland provinces. It failed to win any seats in the 1980 election. References Political parties in Rhodesia Defunct political parties in Zimbabwe Political parties established in 1978 1978 establishments in Rhodesia
Edward Montagu Butler (3 December 1866 – 11 February 1948) was an English first-class cricketer and schoolmaster. Life Butler was born in Harrow-on-the-Hill, Middlesex. He was educated at Harrow School (of which his father was then headmaster) and at Trinity College, Cambridge (of which his father became Master in 1886), matriculating in 1885, gaining an exhibition, graduating B.A. 1891 (M.A. 1900). He played two matches for Middlesex in 1885, and earned Cambridge cricket blues in 1888 and 1889. He also represented Cambridge in singles and doubles racquets, and singles tennis, and in the Amateur Championships in racquets he was singles champion in 1889, and doubles champion with Manley Kemp in 1892. Butler was an assistant master at Harrow from 1891 to 1919. He died in Rogate, Sussex, aged 81. Family Butler was born to a prominent family of academics and athletes, the son of Henry Montagu Butler who, along with his own father, George Butler, was headmaster of Harrow School. His mother, Georgina Isabella Elliot, was the granddaughter of diplomat Hugh Elliot. His younger brother Arthur Hugh Montagu Butler (1873–1943) was House of Lords Librarian. His father remarried Agnata Frances Ramsay (1867–1931) in 1888, who was mother to his younger half-brothers, Sir James Ramsay Montagu Butler (1889–1975) and Sir Nevile Butler. He was the father of Olympic champion sprinter Guy Montagu Butler. References English cricketers Middlesex cricketers Cambridge University cricketers 1866 births 1948 deaths Cambridgeshire cricketers People educated at Harrow School Alumni of Trinity College, Cambridge Edward Teachers at Harrow School
```html <html> <head> <title>libogg - datatype - ogg_stream_state</title> <link rel=stylesheet href="style.css" type="text/css"> </head> <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> <table border=0 width=100%> <tr> <td><p class=tiny>libogg documentation</p></td> <td align=right><p class=tiny>libogg release 1.3.1 - 20130512</p></td> </tr> </table> <h1>ogg_stream_state</h1> <p><i>declared in "ogg/ogg.h"</i></p> <p> The ogg_stream_state struct tracks the current encode/decode state of the current logical bitstream. <p> <table border=0 width=100% color=black cellspacing=0 cellpadding=7> <tr bgcolor=#cccccc> <td> <pre><b> typedef struct { unsigned char *body_data; /* bytes from packet bodies */ long body_storage; /* storage elements allocated */ long body_fill; /* elements stored; fill mark */ long body_returned; /* elements of fill returned */ int *lacing_vals; /* The values that will go to the segment table */ ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact this way, but it is simple coupled to the lacing fifo */ long lacing_storage; long lacing_fill; long lacing_packet; long lacing_returned; unsigned char header[282]; /* working space for header encode */ int header_fill; int e_o_s; /* set when we have buffered the last packet in the logical bitstream */ int b_o_s; /* set after we've written the initial page of a logical bitstream */ long serialno; int pageno; ogg_int64_t packetno; /* sequence number for decode; the framing knows where there's a hole in the data, but we need coupling so that the codec (which is in a seperate abstraction layer) also knows about the gap */ ogg_int64_t granulepos; } ogg_stream_state; </b></pre> </td> </tr> </table> <h3>Relevant Struct Members</h3> <dl> <dt><i>body_data</i></dt> <dd>Pointer to data from packet bodies.</dd> <dt><i>body_storage</i></dt> <dd>Storage allocated for bodies in bytes (filled or unfilled).</dd> <dt><i>body_fill</i></dt> <dd>Amount of storage filled with stored packet bodies.</dd> <dt><i>body_returned</i></dt> <dd>Number of elements returned from storage.</dd> <dt><i>lacing_vals</i></dt> <dd>String of lacing values for the packet segments within the current page. Each value is a byte, indicating packet segment length.</dd> <dt><i>granule_vals</i></dt> <dd>Pointer to the lacing values for the packet segments within the current page.</dd> <dt><i>lacing_storage</i></dt> <dd>Total amount of storage (in bytes) allocated for storing lacing values.</dd> <dt><i>lacing_fill</i></dt> <dd>Fill marker for the current vs. total allocated storage of lacing values for the page.</dd> <dt><i>lacing_packet</i></dt> <dd>Lacing value for current packet segment.</dd> <dt><i>lacing_returned</i></dt> <dd>Number of lacing values returned from lacing_storage.</dd> <dt><i>header</i></dt> <dd>Temporary storage for page header during encode process, while the header is being created.</dd> <dt><i>header_fill</i></dt> <dd>Fill marker for header storage allocation. Used during the header creation process.</dd> <dt><i>e_o_s</i></dt> <dd>Marker set when the last packet of the logical bitstream has been buffered.</dd> <dt><i>b_o_s</i></dt> <dd>Marker set after we have written the first page in the logical bitstream.</dd> <dt><i>serialno</i></dt> <dd>Serial number of this logical bitstream.</dd> <dt><i>pageno</i></dt> <dd>Number of the current page within the stream.</dd> <dt><i>packetno</i></dt> <dd>Number of the current packet.</dd> <dt><i>granulepos</i></dt> <dd>Exact position of decoding/encoding process.</dd> </dl> <br><br> <hr noshade> <table border=0 width=100%> <tr valign=top> <td><p class=tiny>copyright &copy; 2000-2013 Xiph.Org</p></td> <td align=right><p class=tiny><a href="path_to_url">Ogg Container Format</a></p></td> </tr><tr> <td><p class=tiny>libogg documentation</p></td> <td align=right><p class=tiny>libogg release 1.3.1 - 20130512</p></td> </tr> </table> </body> </html> ```
Neighborhood is a role-playing game published by Wheaton Publications in 1982. Description Neighborhood is a childhood system (i.e., a game about being a kid). It consists of the every day struggles of children in suburban neighbourhoods. Publication history Neighborhood was published by Wheaton Publications in 1982. Reception References Comedy role-playing games Role-playing games introduced in 1982
Anthodites (Greek ἄνθος ánthos, "flower", -ode, adjectival combining form, -ite adjectival suffix) are speleothems (cave formations) composed of long needle-like crystals situated in clusters which radiate outward from a common base. The "needles" may be quill-like or feathery. Most anthodites are made of the mineral aragonite (a variety of calcium carbonate, CaCO3), although some are composed of gypsum (CaSO4·2H2O). The term anthodite is first cited in the scientific literature in 1965 by Japanese researcher N. Kashima, who described "flower-like dripstone" composed of "an alternation of calcite and aragonite". Structure, composition and appearance The individual crystals of anthodites develop in a form described as "acicular" (needle-like) and often branch out as they grow. They usually grow downward from a cave's ceiling. Aragonite crystals are contrasted with those made of calcite (another variety of calcium carbonate) in that the latter tend to be stubby or dog-tooth-like ("rhombohedral", rather than acicular). Anthodites often have a solid core of aragonite and may have huntite or hydromagnesite deposited near the ends of the branches. Anthodite crystals vary in size from less than a millimeter to about a meter, but are commonly between 1 and 20 millimeters in length. Occurrence Anthodites may occur sporadically throughout some limestone caves, but may be spectacularly abundant in others, with clean white crystals growing all over the calcite or other rock surfaces. Examples of sites with abundant anthodite displays include Carlsbad Caverns, Craighead Caverns, Skyline Caverns in the United States and the Grotte de Moulis in France. Anthodites can also be found in the National Monument of Timpanogos Cave, American Fork, Utah. Types Among the "quill-like" varieties of anthodite is sometimes included the "sea urchin-like" formation known as flos ferri, although others have considered them a slender variety of helictite. Among the "feathery" varieties of anthodite is "frostwork", a type of speleothem consisting of "bushes" of fine acicular aragonite crystals in radiating clusters. Their appearance is often compared to that of a cactus or thistle plant. In its composite stalagmite form, frostwork may possess spiny limbs like a miniature fir tree. The term was first used by cave guides at Wind Cave in South Dakota, USA, during the 1890s to describe speleothems which looked like ice "frostwork". Anthodite-like formations Helictites are curved or angular twig-like lateral projections of calcium carbonate, which appear to defy gravity. Rather than radial clusters, helictites often occur in tangled masses. The "twigs" have a tiny central canal. Cave flowers (also known as "gypsum flowers" or "oulopholites") consist of gypsum or epsomite. In contrast to anthodites, the needles or "petals" of cave flowers grow from the attached end. Cave cotton (also called "gypsum cotton") is very thin, flexible filaments of gypsum or epsomite projecting from a cave wall. References Speleothems
```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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 import ( v1beta1 "k8s.io/api/extensions/v1beta1" ) // HTTPIngressPathApplyConfiguration represents a declarative configuration of the HTTPIngressPath type for use // with apply. type HTTPIngressPathApplyConfiguration struct { Path *string `json:"path,omitempty"` PathType *v1beta1.PathType `json:"pathType,omitempty"` Backend *IngressBackendApplyConfiguration `json:"backend,omitempty"` } // HTTPIngressPathApplyConfiguration constructs a declarative configuration of the HTTPIngressPath type for use with // apply. func HTTPIngressPath() *HTTPIngressPathApplyConfiguration { return &HTTPIngressPathApplyConfiguration{} } // WithPath sets the Path field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Path field is set to the value of the last call. func (b *HTTPIngressPathApplyConfiguration) WithPath(value string) *HTTPIngressPathApplyConfiguration { b.Path = &value return b } // WithPathType sets the PathType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PathType field is set to the value of the last call. func (b *HTTPIngressPathApplyConfiguration) WithPathType(value v1beta1.PathType) *HTTPIngressPathApplyConfiguration { b.PathType = &value return b } // WithBackend sets the Backend field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Backend field is set to the value of the last call. func (b *HTTPIngressPathApplyConfiguration) WithBackend(value *IngressBackendApplyConfiguration) *HTTPIngressPathApplyConfiguration { b.Backend = value return b } ```
Teabo is a town and the municipal seat of the Teabo Municipality, Yucatán in Mexico. References Populated places in Yucatán
Karl Erik Rimfeldt (born 16 February 1980) is a retired Norwegian football defender. He started his career in Kongsvinger IL, and played for Norwegian youth national teams. He joined the senior squad in 1999, and played three Norwegian Premier League games in 1999. He played one more season before leaving. He has later played on lower levels for Sander IL and Vinger FK. References 1980 births Living people Norwegian men's footballers Kongsvinger IL Toppfotball players Men's association football defenders
Sharpless 2-88 or Sh 2-88 is a region including the diffuse nebula Sh 2-88A and the two compact knots Sh 2-88B1 and Sh 2-88B2, all of which are associated with Vulpecula OB1. Sh 2-88A is an HII-type diffuse nebula excited by the type O8 star BD+25°3952. Both neutral and ionized gases in Sh 2-88 are between 150 and 410 solar masses and the dust mass is about 2 to 9 solar masses. The structure been interacting with a HI interstellar bubble shaped by the stellar winds of BD+25°3952 and the blue O8.5II(f) star BD +25°3866. Overall, its actual structure is located 2.4 kiloparsecs away, at 23 × 15 parsecs in radius. It has a dynamical age of 1.5 million years, and a mass of 1,300 solar masses. It has an rms electron density of 9 cm−3. All separate star forming regions are 1 arcminute in diameter. Nearby objects Sharpless 2-88 is the first part of this nebula to have created a star-forming region. It had star formation first start in this large diffuse nebula, which then spread to the other star-forming regions in the nebula. It spread to the compact Sharpless 2-88B1, then to the ultracompact Sharpless 2-88B2. Sharpless 2-88B1 is a HII region ionized by an O8.5-9.5 V star, and is compact. It is also associated with a nearby star cluster that contains several massive stars. Sharpless 2-88B2 is a HII region ionized by a star that is dimmer than B0.5 V, and is ultracompact. References Vulpecula Nebulae Star-forming regions Sharpless objects
Bernard Brodie (May 20, 1910 – November 24, 1978) was an American military strategist well known for establishing the basics of nuclear strategy. Known as "the American Clausewitz," and "the original nuclear strategist," he was an initial architect of nuclear deterrence strategy and tried to ascertain the role and value of nuclear weapons after their creation. Brodie was initially a strong supporter of the concept of escalating responses; he promoted the view that a war in Europe would be started with conventional forces and escalate to nuclear only if and when necessary. After a meeting with French counterparts in 1960, he came to espouse a very different policy, one based purely on nuclear deterrence with the stated position that the US would use nuclear arms at the first instance of hostilities of any sort. Brodie felt that anything short of this seriously eroded the concept of deterrence and might lead to situations where one side might enter hostilities believing it could remain non-nuclear. This change in policy made Brodie increasingly at odds with his contemporaries. Life and career Born in Chicago, Bernard Brodie was the third of four sons of Max and Esther (Bloch) Brodie, immigrants from the Russian Empire. He graduated from the University of Chicago with a Ph.B in 1932, and received a Ph.D in 1940 under Jacob Viner. His dissertation was titled "Sea power in the machine age : major naval inventions and their consequences on international politics ; 1814-1940" . Brodie was an instructor at Dartmouth College from 1941 to '43. During World War II, he served in the U.S. Naval Reserve Bureau of Ordnance and at the Office of the Chief of Naval Operations. He then taught at Yale University from 1945 to 1951, where he was a member of the Yale Institute of International Studies, and worked at the RAND Corporation as a senior staff member between 1951 and 1966. Brodie was a full professor and taught Political Science and International Relations at UCLA from 1966 until his death in 1978. He married Fawn McKay Brodie – who became a well-known biographer of Richard Nixon, Joseph Smith, Thomas Jefferson and others – on August 28, 1936. They were the parents of three children. Theories Initially a theorist about naval power, Brodie shifted his focus to nuclear strategy after the creation of the nuclear bomb. His most important work, written in 1946, was entitled The Absolute Weapon: Atomic Power and World Order, which laid down the fundamentals of nuclear deterrence strategy. He saw the usefulness of the atomic bomb was not in its deployment but in the threat of its deployment. The book had a now-famous passage "Thus far the chief purpose of our military establishment has been to win wars. From now on its chief purpose must be to avert them. It can have almost no other useful purpose." In the early 1950s, he shifted from academia and began work at the RAND Corporation. There, a stable of important strategists, Herman Kahn and others, developed the rudiments of nuclear strategy and warfighting theory. Working at the RAND Corporation, Brodie wrote Strategy in the Missile Age (1959), which outlined the framework of deterrence. By arguing that preventative nuclear strikes would lead to escalation from limited to total war, Brodie concluded that deterrence by second-strike capability would lead to a more secure outcome for both sides. The virtual abandonment of first strike as a strategy made Brodie suggest investment in civil defense, which included the "hardening" of land based missile locations to ensure the strength of second-strike capability. The building of protected missile silos around the United States is a testament to that belief. It was important for the second-strike force to have first-strike capabilities to provide the stasis necessary for deterrence. Brodie believed that the second-strike force should be targeted towards not cities but military installations. That was meant to give the Soviets an opportunity to limit escalation and to allow the United States to win the war. Brodie also advocated the funding of conventional military personnel to ensure the containment of communism by fighting limited wars or, if deterrence failed, a total war. Brodie, Kenneth Waltz, and Robert Jervis accepted that deterrence was not ironclad, but that a "stable balance of nuclear terror" would prevent the use of nuclear weapons. This view has been called the "easy deterrence narrative". Brodie, who had a fascination with Freud and psychoanalysis, sometimes used it to refer to his work in nuclear strategy. In an internally-circulated memorandum at the RAND Corporation, he compared his no-cities/withhold plan to coitus interruptus, and the SAC plan was like "going all the way." Following those comments, a fellow RAND scholar, Herman Kahn, told an assembled group of SAC officers, "Gentlemen, you don't have a war plan, you have a war orgasm!" Similar sexual imagery was liberally used in Stanley Kubrick's film Dr. Strangelove, a satire of Cold War nuclear strategy. Brodie was also responsible, along with Michael Howard and Peter Paret, for making the writings of the Prussian strategist Carl von Clausewitz more accessible to the English-speaking world. Brodie's incisive "A guide to the reading of On War" in the Princeton translation of 1976 corrected most of the misinterpretations of the theory and provided students with an accurate synopsis of the vital work. Books Sea Power in the Machine Age. Princeton University Press,1941 and 1943. A Layman’s Guide to Naval Strategy. Princeton University Press, 1942. The Absolute Weapon: Atomic Power and World Order. (editor and contributor), Harcourt, 1946. Strategy in the Missile Age. Princeton University Press, 1959. From Cross-Bow to H-Bomb. Dell, 1962; Indiana University Press (rev. ed.), 1973. Escalation and the Nuclear Option. Princeton University Press, 1966. Bureaucracy, Politics, and Strategy. University of California, 1968 (with Henry Kissinger). The Future of Deterrence in U.S. Strategy. Security Studies Project, University of California, 1968. War and Politics. Macmillan, 1973. A Guide to the Reading of "On War". Princeton University Press, 1976. Awards Carnegie Fellow, Institute for Advanced Study, 1941 Carnegie Corporation reflective year fellowship in France, 1960–61 References Notes Bibliography "Bernard Brodie, at 68; A Political Strategist and Military Author" The New York Times, November 27, 1978 page D12. Contemporary Authors Online, 2003. External links Annotated bibliography for Bernard Brodie from the Alsos Digital Library for Nuclear Issues 1910 births 1978 deaths American people of Russian-Jewish descent Military personnel from Illinois Military theorists Nuclear strategists RAND Corporation people University of Chicago alumni Writers from Chicago Yale University faculty
```css .flexslider .slides img{height:500px}#carousel img{width:120px;height:120px}.product-detail .product-name{margin-bottom:12px;border-bottom:1px solid #dedede}.product-ratings li .rating{color:#8bdccd;font-size:14px}.product-ratings li .rating-selected{color:#18ba9b;font-size:14px}.product-detail .product-short-desc{margin:30px 0}.product-price{margin:20px 0;padding:5px 10px;background-color:#FFF;text-align:left;border:2px dashed #E0E0E0}.product-price h3{font-size:30px;font-weight:400;color:red;margin:0}.product-attrs input{left:-9999px;position:absolute}.product-attrs label{width:80px;height:40px;float:right;display:block;color:#dedede;font-size:24px;text-align:center;background:#f8f8f8;border:2px solid #dedede;font-weight:400;-ms-transition:color .3s;-moz-transition:color .3s;-webkit-transition:color .3s}.product-detail .quantity-button,.product-detail .quantity-field{width:55px;height:45px;outline:0;font-size:20px;text-align:center}.product-attrs label:hover{cursor:pointer;border:2px solid #18ba9b}.product-attrs input:checked~label{color:#18ba9b;border-color:#18ba9b}.product-detail .add-to-cart{margin-top:10px}.product-detail .product-quantity{float:left;margin-right:30px}.product-detail .quantity-button{color:#555;padding:5px;border:none;cursor:pointer;background:#eee;font-weight:400;white-space:nowrap;display:inline-block}.product-detail .quantity-field{margin:0 -4px;border:1px solid #eee}.product-detail .btn-add-cart{background:#18ba9b;font-size:18px;padding:10px 25px;border:0;color:#fff;border-radius:0}.product-detail .add-to-wishlist{padding-bottom:10px;border-bottom:1px solid #dedede;margin-top:40px}.product-detail .add-to-wishlist li{padding-left:20px;margin-right:10px;border-left:1px solid #dedede}.product-detail .add-to-wishlist li:first-child{padding-left:0;border-left:none}.add-to-wishlist i{color:#8bdccd;font-size:16px;margin-right:7px}.sp-wrap{background:0 0;border:none}input,select,textarea{max-width:280px}.input-validation-error{border-color:red}.inline{display:inline}.main-nav .navbar-header .navbar-brand{padding:7px 15px}.navbar-brand img{width:260px}.main-menu{display:table;float:none;margin:0 auto}.navbar-default .navbar-nav>li>a{font-size:15px;text-transform:uppercase}li.nav-item-group,li.nav-item-group a{font-weight:700}.cart-badge{position:relative;top:8px;right:5px;margin-left:20px;padding-top:8px;padding-right:18px}.cart-badge i{color:#18ba9b;font-size:24px;min-width:25px}.cart-badge span.badge{top:0;right:5px;position:absolute;background:red}@media (max-width:991px){.main-nav .navbar-header{margin-bottom:7px;margin-right:50px}.main-nav .navbar-header .navbar-brand{padding:6px 10px}.navbar-nav{float:left;margin:0}.cart-badge{position:absolute;top:8px;right:5px;padding:14px 10px 18px 0}}.breadcrumb{background-color:#FFF;padding:0}.footer-content{margin-top:30px;background-color:#eee}.footer-content hr{border-color:#ddd}.carousel-caption{z-index:10!important}.carousel-caption p{font-size:20px;line-height:1.4}@media (min-width:768px){.carousel-caption{z-index:10!important}}.product-list a:hover{text-decoration:none}.product-list .product-price{color:red}.product-list .thumbnail:hover{border-color:#337ab7}.product-list .buttons{padding:9px}.product-list-filters h3{margin-top:27px}.product-list .btn{background:#ddd;font-size:18px;padding:5px 10px;border:0;color:#18ba9b;border-radius:0;margin:-1px}.product-list .btn:hover{background:#eee}.product-list .btn-add-cart-style{background:#18ba9b;padding:8px 43px;font-size:14px;color:#fff}.product-list .btn-add-cart-style:hover{background:#2cd5b6}#accordion-brand ul{padding-left:30px}#priceSlider{margin:17px}#minPrice{width:110px;float:left}#maxPrice{width:110px;float:right;text-align:right}.price-actions{float:right;margin-top:15px}.category-result h2{float:left;font-size:30px;margin-right:20px}.category-result .badge-results{top:26px;color:#fff;font-size:12px;padding:3px 8px;position:relative;background:#c9253c}.product-list-display-options{margin-top:14px}.product-list-display-options label{font-weight:400}.product-list-display-options .show-option{float:right;padding-right:0}.product-list-display-options .show-option i{color:#fff;width:30px;height:30px;padding:6px;font-size:18px;line-height:20px;text-align:center;background:#18ba9b;display:inline-block}.product-list-display-options .pagination-option,.product-list-display-options .sort-by{float:right}.cart-list .product-image,.cart-list .product-image img{width:120px}.cart-list .quantity-button,.cart-list .quantity-field{width:35px;height:30px;outline:0;font-size:14px;text-align:center}.cart-list .quantity-button{color:#555;padding:3px;border:none;cursor:pointer;background:#eee;font-weight:400;white-space:nowrap;display:inline-block}.cart-list .quantity-field{margin:0 -4px;border:1px solid #eee}.cart-list .table>thead>tr>th{border-bottom:none;text-transform:uppercase;color:#687074}.cart-list .table>tbody>tr>td{border-top:none}.cart-list .order-summary h4{text-transform:uppercase;color:#687074;padding-bottom:20px}.btn-order,.cart-list .order-summary .btn{background:#18ba9b;padding:8px 43px;font-size:14px;text-transform:uppercase;color:#fff}.cart-list .order-summary dt{text-align:left;width:100px}.cart-list .order-summary dd{text-align:right;margin-left:100px}.cart-list .order-summary .btn{width:100%;border:0;border-radius:0}.btn-order{border:0;border-radius:0;width:200px}.btn-order:hover{color:#fff;background:#2cd5b6} ```
{{Infobox cricket team | name = Saint Vincent and the Grenadines | image = | captain = | founded = First recorded match: 2000 | dissolved = 2016 | ground = Arnos Vale Playing Field, Arnos Vale | title1 = S50 | title1wins = 1 | title2 = T20 Blaze | title2wins = 0 }} The Saint Vincent and the Grenadines women's cricket team is the women's representative cricket team of the country of Saint Vincent and the Grenadines. They competed in the West Indies women's domestic cricket structure between 2000 and 2014, after which they were replaced by the Windward Islands. History Saint Vincent and the Grenadines joined the West Indies domestic structure in 2000, playing in the Federation Championships. The results of this season are not recorded. In 2002 they reached the semi-finals of the knockout section of the Championships before winning their first title in 2004, topping the league section of the tournament with 5 wins from 6 games. The following season, 2005, St Vincent were runners-up in both sections of the competition, losing out to Trinidad and Tobago both times. St Vincent continued competing in the tournament until 2014, and finished runners-up again in 2010, again losing in the final to Trinidad and Tobago. The side also competed in the first two seasons of the Twenty20 Blaze in 2012 and 2013, both times finishing 5th in the tournament. After 2014 St Vincent no longer competed in the domestic structure, with North Windward Islands and South Windward Islands competing in 2015 and a unified Windward Islands team, including Saint Vincent and the Grenadines, competing from 2016 onwards. The side did compete in three friendlies against Grenada in 2016, but the results are unrecorded. Players Notable players Players who played for Saint Vincent and the Grenadines and played internationally are listed below, in order of first international appearance (given in brackets): Juliana Nero (2003) Genielle Greaves (2003) Clea Hoyte (2003) Cordel Jack (2005) Honours Women's Super50 Cup: Winners (1): 2004 (League) Twenty20 Blaze: Winners (0): Best finish:'' 5th (2012 & 2013) See also Windward Islands women's cricket team Saint Vincent and the Grenadines national cricket team References Women's national cricket teams Women's cricket in Saint Vincent and the Grenadines Women's cricket teams in the West Indies
Jeevana Jyothi is a 1987 Indian Kannada-language drama film, directed by P. Vasu and produced by Vijaya Shankar Bhat. The film stars Vishnuvardhan and Ambika in the lead roles. Srinivasa Murthy, Sridhar and Nalini appear in supporting roles. The film has musical score by Vijay Anand. The film was dubbed into Malayalam, with the title Samarppanam. Plot Ravi and Radha are co-passengers in a bus. Ravi fights off Radha's molester and wins her trust. He helps find her brother's house in the city they have travelled to. However, her brother Venkatesh Murthy has vacated the house two months prior, leaving Radha nowhere to go. Ravi takes her to his residence where he is residing as a paying guest. He is very close towards the family, consisting of a couple and their son, living there, and has brotherly affection towards the lady of the house. Ravi and Radha fall in love with each other as time passes. Ravi, however, is unemployed and is constantly looking for a job. He is hired as driver of a commercial vehicle, but is fired on the first day after he expels the customers for illegally carrying marijuana in the vehicle's trunk. A turn of events lead him to being hired by Murthy, who is a wealthy businessman. Murthy employs Ravi to run a truck for him on rental basis. Ravi comes good at this job, expand the business, and founds a company that rents out more trucks, and appoints his friend Arun as the manager. Sometime later, Ravi has to visit Mumbai to attend a business meeting. A turn of events lead him to find out he is suffering from blood cancer. Upon his return to the city, Ravi's demeanor towards Radha has changed and is seen getting closer to Meena, his new personal secretary, apparently to distance himself from a confused and jealous Radha. He reveals only to Meena of the disease and asks her to keep it a secret. However, Murthy learns of this and inadvertently tells Radha about it. Radha runs to Ravi, whose health has deteriorated further, in a wedding dress and requests him to tie the sacred thread around her neck. Ravi does so resulting in their marriage, before she dies in his arms. Cast Soundtrack The music was composed by Vijay Anand. References External links 1987 films 1980s Kannada-language films Films directed by P. Vasu
Ninja Kamui is an upcoming Japanese anime television series that is set to premiere in the United States on Adult Swim's Toonami programming block in 2024. Plot After escaping his clan and going into hiding in rural America, former ninja Joe Higan is ambushed by assassins who exact bloody retribution on him and his family for their betrayal. After the attack, Joe returns to being known as Ninja Kamui to avenge his family and friends and sets his sights on taking down the very clan that made him. Characters Joe Higan A former ninja who goes on a journey to avenge his family. Production and release The series was announced by Adult Swim on May 18, 2022, and will be directed by Sunghoo Park. Takashi Okazaki is designing the characters. The series will be produced by E&H Production and Sola Entertainment. On July 22, 2023, at San Diego Comic-Con, Adult Swim unveiled a teaser trailer for the series and announced that it would premiere sometime in 2024. References External links 2024 anime television series debuts Adult Swim original programming Anime and manga about revenge Anime with original screenplays Ninja in anime and manga Toonami Upcoming anime television series
Kingdom Rush: Origins is a 2014 tower defense game developed by Ironhide Game Studio. The third entry in the Kingdom Rush series, it was released for iOS and Android on November 20, 2014, and for Nintendo Switch on September 17, 2020. In the game, players take control of a nation of elves as they attempt to defend themselves from their evil enemies. Monsters can be defeated using four types of defensive towers, which can all be upgraded in order to better fight against increasing waves of enemies. Gameplay Kingdom Rush: Origins is a tower defense game in a high-fantasy setting. The player takes control of a nation of elves as they defend themselves from their ancient enemies. At the start of a level, players possess a limited amount of gold, which they can use to build defensive towers on fixed locations around a path. Enemies advance across the path from a number of pre-set entrances, and the player must stop them from reaching the end. The player possesses four types of towers, including archers which are more effective at fighting weaker enemies, and boulder-throwing towers that have attacks suited for slaying powerful foes. Infantry towers fight on the path itself and can prevent enemies from advancing, allowing towers to deal damage while the enemies are slowed. As enemies are slain, they give the player gold, which can be spent to build more towers and upgrade existing ones with better damage and new attacks. If an enemy reaches the exit, they drain lives from the player, and the depletion of all the lives causes a game over. In addition to towers, the player is also given control of a powerful "hero" character that can be instructed to move to any part of the path, and can be used to fight powerful enemies. Heroes include ranged attackers that fight from a distance, to warriors better suited to fighting enemies in melee combat. Each hero has five different capabilities that can be upgraded using a currency gained from completing levels, and the player can choose which hero they want to use or upgrade. Reception Nintendo Life praised the graphics and the accessibility of gameplay, but said that the pacing of levels was too slow, and hurt the experience. Game Informer liked the graphics, controls, and structure of gameplay, which he found familiar to earlier entries in the Kingdom Rush series. CNET agreed that the gameplay was similar to earlier games in a favorable way, but also liked the new heroes and upgrades. However, both he and TouchArcade were disappointed that many of the heroes could only be unlocked by spending money on microtransactions. Gamezebo praised the levels as the best designed in the entire series, but noted that the gameplay formula was similar to the previous titles, and did not make significant changes. References 2014 video games Android (operating system) games IOS games Nintendo Switch games Single-player video games Tower defense video games High fantasy video games Ironhide Game Studio games
```batchfile cls setlocal enableextensions enabledelayedexpansion call ../../language/build/locatevc.bat x64 cl /c /DEBUG ring_pgsql.c -I"..\..\extensions\libdepwin\pgsql_x64\include" -I"..\..\language\include" link /DEBUG ring_pgsql.obj ..\..\lib\ring.lib ..\..\extensions\libdepwin\pgsql_x64\lib\libpq.lib /DLL /OUT:..\..\bin\ring_pgsql.dll del ring_pgsql.obj endlocal ```
```xml import { createMotionComponent, Field, makeStyles, mergeClasses, type MotionImperativeRef, motionTokens, Slider, Text, tokens, useId, Button, } from '@fluentui/react-components'; import { ReplayFilled } from '@fluentui/react-icons'; import * as React from 'react'; import description from './MotionLifecycleCallbacks.stories.md'; const useClasses = makeStyles({ container: { display: 'grid', gridTemplate: `"card logs" "controls ." / 1fr 1fr`, gap: '20px 10px', }, card: { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', gridArea: 'card', border: `${tokens.strokeWidthThicker} solid ${tokens.colorNeutralForeground3}`, borderRadius: tokens.borderRadiusMedium, boxShadow: tokens.shadow16, padding: '10px', }, controls: { display: 'flex', flexDirection: 'column', gridArea: 'controls', border: `${tokens.strokeWidthThicker} solid ${tokens.colorNeutralForeground3}`, borderRadius: tokens.borderRadiusMedium, boxShadow: tokens.shadow16, padding: '10px', }, field: { flex: 1, }, sliderField: { gridTemplateColumns: 'min-content 1fr', }, sliderLabel: { textWrap: 'nowrap', }, item: { backgroundColor: tokens.colorBrandBackground, border: `${tokens.strokeWidthThicker} solid ${tokens.colorTransparentStroke}`, borderRadius: '50%', width: '100px', height: '100px', }, logContainer: { display: 'flex', flexDirection: 'column', gridArea: 'logs', }, logLabel: { color: tokens.colorNeutralForegroundOnBrand, backgroundColor: tokens.colorNeutralForeground3, width: 'fit-content', alignSelf: 'end', fontWeight: tokens.fontWeightBold, padding: '2px 12px', borderRadius: `${tokens.borderRadiusMedium} ${tokens.borderRadiusMedium} 0 0`, }, log: { overflowY: 'auto', position: 'relative', height: '200px', border: `${tokens.strokeWidthThicker} solid ${tokens.colorNeutralForeground3}`, borderRadius: tokens.borderRadiusMedium, borderTopRightRadius: 0, padding: '10px', }, }); const FadeEnter = createMotionComponent({ keyframes: [{ opacity: 0 }, { opacity: 1 }], duration: motionTokens.durationSlow, }); export const MotionLifecycleCallbacks = () => { const classes = useClasses(); const logLabelId = useId(); const motionRef = React.useRef<MotionImperativeRef>(); const [statusLog, setStatusLog] = React.useState<[number, string][]>([]); const [playbackRate, setPlaybackRate] = React.useState<number>(30); const [count, setCount] = React.useState(0); // Heads up! // This is optional and is intended solely to slow down the animations, making motions more visible in the examples. React.useEffect(() => { motionRef.current?.setPlaybackRate(playbackRate / 100); }, [playbackRate, count]); return ( <div className={classes.container}> <div className={classes.card}> <FadeEnter key={count} imperativeRef={motionRef} onMotionStart={() => { setStatusLog(entries => [[Date.now(), 'onMotionStart'], ...entries]); }} onMotionFinish={() => { setStatusLog(entries => [[Date.now(), 'onMotionFinish'], ...entries]); }} onMotionCancel={() => { setStatusLog(entries => [[Date.now(), 'onMotionCancel'], ...entries]); }} > <div className={classes.item} /> </FadeEnter> </div> <div className={classes.logContainer}> <div className={classes.logLabel} id={logLabelId}> Status log </div> <div role="log" aria-labelledby={logLabelId} className={classes.log}> {statusLog.map(([time, callbackName], i) => ( <div key={i}> {new Date(time).toLocaleTimeString()} <Text weight="bold">{callbackName}</Text> </div> ))} </div> </div> <div className={classes.controls}> <div> <Button appearance="subtle" icon={<ReplayFilled />} onClick={() => setCount(s => s + 1)}> Restart </Button> </div> <Field className={mergeClasses(classes.field, classes.sliderField)} label={{ children: ( <> <code>playbackRate</code>: {playbackRate}% </> ), className: classes.sliderLabel, }} orientation="horizontal" > <Slider aria-valuetext={`Value is ${playbackRate}%`} value={playbackRate} onChange={(ev, data) => setPlaybackRate(data.value)} min={0} max={100} step={5} /> </Field> </div> </div> ); }; MotionLifecycleCallbacks.parameters = { docs: { description: { story: description, }, }, }; ```
```c++ // (See accompanying file LICENSE.md or copy at path_to_url #include <boost/hana/less.hpp> #include <boost/hana/pair.hpp> namespace hana = boost::hana; static_assert(hana::make_pair(1, 'x') < hana::make_pair(1, 'y'), ""); static_assert(hana::make_pair(1, 'x') < hana::make_pair(10, 'x'), ""); static_assert(hana::make_pair(1, 'y') < hana::make_pair(10, 'x'), ""); int main() { } ```
Joel Solomon Goldsmith (March 10, 1892 – June 17, 1964) was an American spiritual author, teacher, spiritual healer, and modern-day mystic. He founded The Infinite Way movement. Early years and career Joel S. Goldsmith was born in New York City on March 10, 1892. His parents were non-practicing Jews, who were married in New York City in 1891. Joel was their first child. They had another son two years later, followed by a daughter two years thereafter. In 1915, Joel's father became critically ill while in England and word was sent to the Goldsmith family to come for the body. However, according to Joel, his father was healed by a Christian Science practitioner in London. From his early adulthood, Joel Goldsmith had many spiritual experiences. He was a healer who spent many years in spiritual studies, reading original scriptures of Aramaic, Greek and Sanskrit origins. His first book, The Infinite Way, was published in 1948. After serving in the Marines during World War I, Goldsmith returned to work in the garment district of New York City, where he owned his own business. While on a return trip from Europe, he developed pneumonia. As was his father before him, Goldsmith was healed by a Christian Science practitioner who happened to be on board his ship at the time. In 1928, strangers began approaching Goldsmith on the street, asking for prayer and healing. He had no religious training whatsoever, but these people allegedly were healed. To seek answers about this phenomenon, Goldsmith first entered the Christian Science Church and worked at Rikers Island prison as a First Reader. After 16 years, he left the Church and moved to Boston, where he set up his own office. He moved to California before World War II and maintained a successful healing practice there. In 1948 Goldsmith wrote the book The Infinite Way, which came to the attention of Willing Publishers. The book's title also became the name associated with his spiritual message and work. Spiritual Awakening Goldsmith’s stated that the “original unfoldment [] was given to me some time after 1909.":3 "[W]hen I was nineteen, whether it was the Voice or an impression, Something within me said, 'Find the man Jesus, and you will have the secret of life.' That was a strange thing to say to me because I knew nothing of Jesus Christ beyond the name and that Christmas was a holiday celebrating his birth.":9 Goldsmith recounted, “Thus the search began: Where is God? What is God? How do we bring God into our experience? Eventually, late in 1928, the Experience took place, that first God-experience. [...] an experience that could not be described. Whereas in one moment I was like every other human being, in the next moment my body was well, and many undesirable human habits were gone. I found that a healing power was present and that I was on the threshold of a whole new life. The old life was dead; a new one had begun [...].:4 Goldsmith described the Experience in greater detail elsewhere. “I was taken sick in the city of Detroit, went to a building that was filled with Christian Science practitioners, found the name of a practitioner on the board, went up to the man’s office, and asked him to help me. He told me that it was Saturday and that he didn’t take patients on Saturdays. That day he always spent in meditation and prayer.":16 Goldsmith convinced the practitioner to allow him to sit with him. “He talked to me about the Bible; he talked to me of truth. Long before the two hours were up, I was healed of that cold, and when I went out on the street I found I couldn’t smoke any more. When eating my dinner I found I couldn’t drink any more. The following week I found I couldn’t play cards any more, and I also found that I couldn’t go to the horse races any more. And the businessman had died.”:16 He noted that soon after, people began approaching him for healing. The Infinite Way Goldsmith self-published his most famous work, The Infinite Way, in 1947, which was based on letters to patients and students. He also published The Spiritual Interpretation of Scripture. The writings which followed were transcriptions of his lectures which had been recorded on the first wire recorders in the late 1940s. These were distributed by Goldsmith Publishing. They were: The Master Speaks, The First, Second, Third San Francisco Lecture Series, Consciousness Unfolding, God the Substance of All Form, and Metaphysical Notes. These original books were later republished during Goldsmith's lifetime by publishers in various countries, making over fifty books. As Goldsmith was approached by large publishing houses around the world to produce books of his talks, he enlisted the help of Lorraine Sinkler and her sister Valborg to edit his books, which were generally compiled from various lecture transcripts. Goldsmith's insistence on "no organization" insured that his message remained a personal journey with leaders naturally evolving from new generations. There is no service, ritual, dogma, or ceremony in the practice of the Infinite Way. Goldsmith students can be found in all walks of life, in all religions. His message is one that can be read and heard for a lifetime, always allowing new understandings to unfold in each individual. Goldsmith stressed "contemplative meditation" practice in his teaching. The method he generally taught involved short frequent meditation periods throughout the day. He told his student of 18 years, Walter Starcke, that the main reason to meditate was that through reaching the inner silence one could hear the still small voice and receive its intuitive guidance. His teaching also stressed spiritual healing through conscious contact with God. After writing the work, Goldsmith expected to retire to a life of contemplation. However, the work prompted people to seek him out as a spiritual teacher, leading to the extension of his career, teaching and writing. Death Joel Solomon Goldsmith died on June 17, 1964, at the Piccadilly Hotel, Westminster, London, UK. His body was cremated at Golders Green in London on June 18, 1964, and his ashes and effects were released to his widow, Emma Goldsmith, who took them back to their home in Hawaii. Both were interred in Sun City, Arizona. Bibliography Beyond Words and Thoughts Collected Essays of Joel S. Goldsmith Conscious Union With God Consciousness in Transition Consciousness is What I AM Consciousness Transformed Contemplative Life Gift of Love God, The Substance of All Form (1949 edition) Invisible Supply Leave your Nets (original) Living Between Two Worlds Living Now Living the Infinite Way Man Was Not Born to Cry Metaphysical Healing Our Spiritual Resources Parenthesis in Eternity Practicing the Presence Realization of Oneness The 1954 Letters The 1955 Letters The 1956 Letters The 1957 Letters The 1958 Letters The 1959 Letters The Art of Meditation The Art of Spiritual Healing The Infinite Way (1948) The Master Speaks (original) The Mystical "I" The Spiritual Interpretation of Scripture The Thunder of Silence The World is New References External links , maintained by Sue Ropac, grand-daughter of Goldsmith's wife. Guide to the Joel S. Goldsmith Papers 1949-1964 at the University of Chicago Special Collections Research Center 1892 births 1964 deaths 20th-century mystics Jewish American military personnel American spiritual writers American spiritual teachers Christian Science writers New Thought mystics New Thought writers
Ziad Rahbani (, born 1956) is a Lebanese composer, pianist, playwright, and political commentator. He is the son of Fairouz, one of Lebanon and the Arab world's most famous singers, and Assi Rahbani, one of the founders of modern Arab music. His compositions are well known throughout the Arab world. He became by far the most influential Lebanese artist during the civil war. Many of his musicals satirize Lebanese politics both during and after the Lebanese Civil War, and are often strongly critical of the traditional political establishment. Personal life Ziad Rahbani is the son of the Lebanese composer Assi Rahbani and Nouhad Haddad, the Lebanese female singer known as Fairuz. Rahbani was married to Dalal Karam, with whom he has a boy named "Assi" but he was later found out not to be his biological son. Their relationship later ended in divorce, prompting Karam to write a series of articles for the gossip magazine Ashabaka about their marriage. Rahbani composed a number of songs about their relationship, including "Marba el Dalal" and "Bisaraha". Rahbani has a long-standing relationship with Lebanese leftist movements, and is a self-declared communist. Furthermore, in an interview with the journalist Ghassan Bin-Jiddu, Rahbani stated that the bloodbath massacres in the Palestinian camp Tall a-Za’tar by extreme-rightist Christian militias in 1976 was the main reason that drove him to leave to West Beirut. Notwithstanding, he also expressed his support to the Lebanese resistance and its project in the face of "the Israeli occupation and its Zionist Apartheid regime". Coming from a Christian family, his politics and viewpoints have meant that he has been at odds with some of his right-wing teenage surroundings. During the Lebanese civil war, Rahbani resided in the religiously mixed, West Beirut suburbs. Career Rahbani's first known artistic work was "Sadiqi Allah" (My Friend God), a collection of writings between the years 1967 and 1968 when he was in his teens. In 1973, at age 17, Rahbani composed his first music for Fairuz, his mother. Assi Rahbani, his father, was hospitalized and his mother Fairuz was to play the leading role in Al Mahatta by the Rahbani brothers. Mansour Rahbani, his uncle, who had written the lyrics of a song about Assi Rahbani's forced absence, gave Ziad Rahbani the task of composing its music. The song "Saalouni El Nass" (People Asked Me) gained Rahbani recognition in the music world. Rahbani appeared for the first time on stage in Al Mahatta where he played the role of the detective. He also appeared later on in the Rahbani Brothers' Mays el Rim in the role of one of the policemen. Rahbani's first step into theatre was with the Bkennaya Theater in Sahriyyeh. He followed that with highly politicized string of plays. "In 'The Harvest of Thorns: Political Comedy Theater in Syria and Lebanon,' Aksam Al-Youssef wrote,"Under these circumstances, as a young adult, Ziad imposed himself on the artistic scene as a playwright, director, composer, pianist, and actor. In a short time, his original theatre would become the center of attention for young people who found in it the voice of a lost generation caught in the throws of war and violence. As an actor, besides appearing in his own plays, Rahbani starred in Randa Chahal Sabbagh's 2003 film The Kite. Collaborations Before, during and after the war, Rahbani released and co-released several albums like: Bi hal shakel, Abou Ali, Halleluja, Shareet Ghayr Houdoudi, Houdou Nesbi, Ana Mouch Kafer, Hakaya al Atfal, Bema Enno, Monodose (with singer Salma Mosfi) and Maaloumat Mush Akidi (with singer Latifa). He has also written the music for singles performed by others such as "Rafi2i Sobhi El Gizz", "Kifak Inta", "Iza baddik" and "Abban 3an Jidd". He has done some orchestrations for songs like "Madih el Zoll el Ali", "Ahmad el Zaatar" and "Moussakafoun noun". Rahbani has also mixed several albums such as Al ra2i el 3aam and Moussakafoun noun. He has held concerts like the Oriental Jazz Concert in the BUC Irwin Hall, the Las Salinas Concert, the Forum de Beirut Concert, the Picadilly Concert, and "Mniha Concert" in Mont La Salle Ain Saadeh, the latter with his cousin Ghassan Rahbani. He also performs live occasionally in pubs like "Medusa", "Mon Général" and the "Téatro". Discography Studio releases Albums for Fairuz Stage and radio Notes References External links A compilation of press articles and interviews with Ziad Rahbani, in arabic Criticism on Ziad Rahbani, Fairouz, and Assi Rahbani's Art FairuzFan - contains information of Ziad's works with Fairuz his mother 1956 births Living people Lebanese actors Lebanese left-wing activists 20th-century Lebanese male singers Lebanese songwriters Lebanese composers Lebanese jazz musicians Male jazz musicians 21st-century Lebanese male singers
The Ursuline Convent was founded in 1894 by nuns of the order of St. Ursula. The Convent Schools, as they are collectively known, offer Primary education for boys and girls aged 3 to 11, and Secondary education for girls aged 11 to 17. St. Angela's is the Infant and Junior School, and St. Ursula's is the Senior School. The School is located in a commercial area in the Bridgetown suburb of Collymore Rock, where fine examples of early colonial-style architecture can be seen today. As a result of various challenges, such as dwindling enrollment and the COVID-19 pandemic, the school will close in August 2023. References External links Schools in Barbados Saint Michael, Barbados Educational institutions established in 1894 Religious organizations established in 1894 1894 establishments in the British Empire
Saint-Léger-près-Troyes (, literally 'Saint-Léger near Troyes') is a commune in the Aube department in north-central France. Population See also Communes of the Aube department References Communes of Aube Aube communes articles needing translation from French Wikipedia
```xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="path_to_url" package="com.ldoublem.loadingView"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <activity android:name=".MacActivity"> </activity> </application> </manifest> ```
{| |+USS West Carnifax (ID-3812) {{Infobox ship career |Hide header= |Ship country=United States |Ship flag= |Ship name=*1919–1929: West Carnifax1928–1933: Exford1933–1943: Pan Royal|Ship owner=*1919–c. 1928: US Shipping Board 1928–1933: Export Steamship Corp. 1933–1943: Pan Atlantic Steamship Co. |Ship operator=*1925–1927: American Republics Line 1928–1933: American Export Lines 1933: Shepard Line 1934–1943: Pan Atlantic Steamship Co. |Ship builder=*Southwestern Shipbuilding San Pedro, California |Ship yard number=1 |Ship laid down= |Ship launched=19 October 1918 |Ship sponsor=Miss Marcoreta Hellman |Ship completed=January 1919 |Ship acquired=January 1919 |Ship commissioned=31 December 1918 |Ship identification=Official Number: 217373 |Ship fate=Sunk in collision, 9 February 1943 }} |} USS West Carnifax (ID-3812) was a cargo ship in the United States Navy shortly after World War I. After she was decommissioned from the Navy, the ship was known as SS West Carnifax, SS Exford, and SS Pan Royal (or sometimes Pan-Royal) in civilian service under American registry.West Carnifax was one of the West boats, a series of steel-hulled cargo ships built for the United States Shipping Board (USSB) on the West Coast of the United States. The ship was the first ship built at Southwestern Shipbuilding in San Pedro, California, and was launched in October 1918 and delivered to the US Navy upon completion in late December. After commissioning, West Carnifax sailed from California with a load of wheat flour for the East Coast of the United States and, from there, to Europe. When she docked at Hamburg, Germany, in March 1919, she became the first American ship to dock at Hamburg since before the start of World War I. At the conclusion of her trip to Germany she was decommissioned and returned to the USSB.West Carnifax sailed to European ports for a time and in South American service for the American Republics Line while under USSB ownership. After her sale for operation by the American Export Lines in 1928, she began sailing in Mediterranean service. After a rename to SS Exford later in 1928, she was used on a cargo service to Soviet Black Sea ports, and became the first American ship to dock in the Soviet Union since World War I. After a brief stint in intercoastal service, the ship was renamed Pan Royal in 1933 for service with a subsidiary of the Waterman Steamship Company. In convoy sailing during World War II, Pan Royal made two roundtrips between the United States and the United Kingdom, and one roundtrip to North Africa. At the beginning of her second voyage to Africa in February 1943, Pan Royal was accidentally rammed by two other convoy ships and sunk. Eight crewmen died in the accident. Design and construction The West ships were cargo ships of similar size and design built by several shipyards on the West Coast of the United States for the USSB for emergency use during World War I. All were given names that began with the word West, like West Carnifax, the first of some 18 West ships built by Southwestern Shipbuilding.West Carnifax (Southwestern Shipbuilding No. 1) was laid down on 17 July as the first ship of the new Southwestern Shipbuilding shipyard. She was launched at 09:30 on 19 October 1918 by sponsor Marcoreta Hellman, the six-year-old daughter of yard superintendent Marco Hellman.West Carnifaxs launching ceremony had been delayed by seven days by the Emergency Fleet Corporation for public health considerations: public gatherings had been banned in order to combat the spread of Spanish flu. When the ceremony did take place, it was before a private crowd; the invitations of guests had all been withdrawn. When West Carnifax was delivered to the United States Navy upon completion in late December, the Los Angeles Times heralded the 134-workday completion time as a "world record" for the completion of a new ship in a new shipyard.West Carnifax was , and was long (between perpendiculars) and abeam. West Carnifax had a steel hull, a mean draft of , and a displacement of 12,211 t. The ship had a single triple-expansion steam engine that drove a single screw propeller, and moved the ship at up to . Military career USS West Carnifax (ID-3812) was commissioned into the Naval Overseas Transportation Service (NOTS) at San Pedro, California, on 31 December 1918. West Carnifax sailed from San Pedro on 4 January 1919 for San Francisco, where she took on an initial load of flour. She sailed for Norfolk, Virginia, on 31 January, and arrived at Hampton Roads on 15 March. Setting out four days later, West Carnifax was slated to sail to Danzig via Falmouth and the Hook of Holland, but was diverted en route. When she arrived at her new destination of Hamburg on 25 March, she became the first American ship to dock in that city since before World War I had begun over years before. When she had completed unloading her cargo of flour, noted as the "choicest California flour" by onlookers, she sailed for New Orleans by way of Plymouth on 2 April. On 9 May, four days after her arrival at New Orleans, West Carnifax was decommissioned and returned to the USSB. Interwar years Incomplete information is available regarding West Carnifaxs activities after her return to the USSB in 1919. One incident of note was reported in The New York Times in February 1922. The news item reported that West Carnifax, while heading from Rotterdam to Galveston, Texas, ran short of provisions and fuel and had to be towed into New York by United States Coast Guard cutter . By late 1923, West Carnifax had been laid up at Norfolk, Virginia, but was reactivated and reconditioned in February 1924. In early 1925, West Carnifax had begun sailing for American Republics Lines, a USSB-owned line that sailed in South American service.American Republics Lines later became a subsidiary of Moore-McCormack Lines, Inc. West Carnifax sailed in this service into 1927 and called at ports like Buenos Aires and Santos. In early 1928, West Carnifax was sold to the Export Steamship Corporation for operation under their American Export Lines brand. In the first half of that year, West Carnifax was sailing in New York – Mediterranean service. While near the Azores sailing from Alexandria, Egypt, to Boston in October, West Carnifax responded to an SOS from the American tanker which reported being in trouble during a storm. According to a report in the Los Angeles Times, when the cargo ship arrived at the specified location after steaming overnight, no trace of the crew was found; only oil slicks and a floating vegetable box were found on the surface. In October the following year, under her new name of SS Exford, the ship docked at the Soviet Black Sea port of Novorossiysk to deliver a cargo of machinery and became the first American ship to dock at a Soviet port since the end of World War I. Exford remained in Black Sea service into 1931. In August 1933, the Los Angeles Times reported that the Shepard Line had secured a year-long charter of Exford for their expanded intercoastal service between North Atlantic ports and the Pacific ports of Los Angeles; San Francisco; Portland, Oregon; and Seattle. Later in 1933, the ship was renamed Pan Royal to reflect the naming style of her new owners, the Pan-Atlantic Steamship Company, a subsidiary of Waterman Steamship Company. The Pan-Atlantic Line sailed in coastal service along the Atlantic and Gulf coasts, and it is likely that Pan Royal called at typical Pan-Atlantic ports such as Baltimore, Miami, Tampa, New Orleans, Philadelphia, New York, and Boston from this time. At 03:50 on 24 September 1934, Cunard-White Star ocean liner collided with Pan Royal in a thick fog off the tip of Cape Cod. Pan Royal developed a leak and had to return to Boston, from which she had left for Galveston, Texas, the previous day. Laconia, leaving Boston after debarking 225 passengers, also had damage but proceeded to her destination of New York under her own power. No one was injured on either ship. Elvar R. Callaway, master of Pan Royal, claimed that Laconia could have avoided the collision by proper steering; Laconias master, B. B. Orum, contended that the collision was unavoidable because of the "impenetrable haze". In November 1939, Pan Royal was one of 21 ships that had been idled because of a strike by 5,000 longshoremen in New York. In June the following year, The Christian Science Monitor reported that Pan Royal had been engaged to return "Big Joe" to the Soviet Union. "Big Joe" was a nickname given to the Soviet worker holding a red star in his up-stretched hand. The statue had graced the column in front of the Soviet Socialist Republics Building at the New York World's Fair during the 1939 fair season. The Soviet pavilion was dismantled prior to the 1940 fair season after popular American opinion turned against the Soviet Union because of its November 1939 invasion of Finland. As part of the dismantling, "Big Joe" had been warehoused in Hoboken, New Jersey, but prevented from export by a United States Maritime Commission ruling enforcing a "moral embargo" that prohibited the charter of American ships on behalf of the Soviet Union. World War II In June 1942, seven months after the United States had entered World War II, Pan Royal made two roundtrips in transatlantic convoys between Boston and the United Kingdom via Halifax. While in the UK during her second visit, the ship had called at Belfast Lough, Barry, and Milford Haven before returning to New York in October. In mid November, Pan Royal sailed from Hampton Roads, Virginia, to Casablanca, and returned in mid-January 1943. On 7 February 1943, Pan Royal departed Hampton Roads in Convoy UGS-5 for North Africa. Two days out, Pan Royal was accidentally rammed by both the Norwegian cargo ship Evita and the American Liberty ship . Pan Royal'' sank at position with the loss of eight men. Her 54 survivors were rescued by US Navy destroyer . Notes References Bibliography External links Design 1019 ships Design 1019 ships of the United States Navy Ships built in Los Angeles 1918 ships World War I merchant ships of the United States World War I auxiliary ships of the United States World War II merchant ships of the United States World War II shipwrecks in the Atlantic Ocean Maritime incidents in February 1943
[James] Clifton Williams, Jr. (26 March 1923 Traskwood, Arkansas — 12 February 1976 Miami, Florida) was an American composer, pianist, French hornist, mellophonist, music theorist, conductor, and teacher. Williams was known by symphony patrons as a virtuoso French hornist with the symphony orchestras of Baton Rouge, New Orleans, Houston, Oklahoma City, Austin, and San Antonio. The young composer was honored with performances of Peace, A Tone Poem and A Southwestern Overture by the Houston and Oklahoma City symphony orchestras, respectively. He remains widely known as one of America's accomplished composers for the wind ensemble and band repertory. Education Williams began playing French horn, piano, and mellophone in his childhood and played in the band at Little Rock High School. His senior class of 600 voted him as most outstanding in artistry, talent, and versatility. Williams was graduated from Louisiana State University (B.M., 1947), where he was a pupil of Helen L. Gunderson (1893–1988). He then attended the Eastman School of Music (M.M., 1949), where he studied with Bernard Rogers and Howard Hanson. It was Hanson who counseled Williams to write for wind band rather than the orchestra, advising him that he would get larger audiences, and a larger range of organizations to perform his music, by doing so. During his post-war studies at Louisiana State University, Williams joined the fraternity Phi Mu Alpha Sinfonia, the largest and oldest musical fraternity in America. Later he would honor the fraternity with a symphonic concert march, The Sinfonians, that remains a staple of the concert band repertory today. Life and career highlights Following the Japanese attack on Pearl Harbor in 1941, Williams left school after completing his first year at Louisiana Tech University to enlist in the United States Army Air Corps for the duration of World War II. He attended the Army Music School and then served in the 679th Army Air Corps (AAC) band at Louisiana's Selman Field and the 619th AAC band at Houston's Ellington AFB, even while composing in his spare time. A sympathetic officer recognized and encouraged Williams's diverse musical talents, including arranging and composing, and the onetime private ultimately left the service with the rank of staff sergeant. In 1947, having returned to civilian life and his musical studies, he married Maxine Holmes Friar of Beaumont, Texas. On completing his studies in 1949, Clifton Williams joined the composition department of the School of Music at the University of Texas at Austin. He taught there until, in 1966, he was appointed Chair of the Theory and Composition Department at University of Miami School of Music. Williams retained this position until his death from cancer in 1976. His composition students included W. Francis McBeth, Lawrence Weiner, Robert Sheldon, Kenneth Fuchs, Ron Miller, Robert X. Rodriguez, E. Anne Schwerdtfeger, Thomas Wells, Gordon Richard Goodwin, and John Barnes Chance. He was a close colleague of fellow composer Alfred Reed while the two worked at the University of Miami, their offices being only steps apart in the music building at UM. Prizes, commissions, and publications Williams' early compositions were for orchestra, but he would later achieve his greatest success writing for concert band. One of his earliest works, Fanfare and Allegro, was completed in 1954 but was considered, at the time, exceptionally difficult by the bands (including some military bands) that attempted to perform it. In particular, a military band struggled mightily with the work at a performance at the 1954 Brownsville, Texas Music Festival. Thus, Williams laid the work aside for some time. The American Bandmasters Association then announced its first Ostwald Composition Prize in the winter of 1955. Williams slightly revised Fanfare and Allegro and entered it into this contest. Fanfare and Allegro won the inaugural American Bandmasters Association's Ostwald Award for original band literature in 1956. The first performance of the revised work, at the 1956 ABA convention, won rave reviews and the work moved rapidly to the forefront of serious wind literature. Williams won the award again in 1957 for his Symphonic Suite. Williams entered the competition for a third time in 1958 with an earlier work, his Symphonic Essays of 1953, but withdrew from the competition the day before the winner was to be announced, feeling that winning a new competition a third consecutive time would discourage other equally worthy composers. It was not revealed until several years later that Symphonic Essays was, in fact, set to be the winner of the 1958 ABA prize. The Minnie Stevens Piper Foundation commissioned Williams to compose a work celebrating the 25th anniversary of the San Antonio Symphony Orchestra (circa its 1964–1965 season). He composed a set of five symphonic dances, of which he would later transcribe two for concert band: Nr. 2, "The Maskers", and Nr. 3, "Fiesta". His protégé W. Francis McBeth, in 2000, recast the first dance ("Comanche Ritual") for band; the parts for it remain in manuscript in the possession of Williams' daughter, Michelle Williams Hanzlik. Dances 4 and 5 ("Square Dance" and "New Generation") also have been adapted for band, so that since 2007 a few performances of the entire set of five dances have been given. The primary publishers of Williams's wind music have included Southern Music, Summy Birchard, Piedmont, C. L. Barnhouse, and University of Miami Music Publications. As of 2011, ten more of his band compositions have been published by Maestro & Fox Music by arrangement with the composer's estate. These previously unknown works include Dramatic Variations, Sonata Allegro, Show Tune, Caprice Americana, Postwar Prelude, Louisiana Tech Band's March, Roll of Honor March, "Symphonic Essays", Hall of Fame March, Ballade, "Pandean Fable", and The Hero March. More first-time publications were slated for the 2010s, some four decades after the composer's death. The New Jersey City University's Symphony of Winds and Percussion revived Williams's unpublished Symphonic Essays in the spring of 2013. Clifton Williams considered The Ramparts his favorite work. Commissioned by the United States Air Force Academy, the work contains an a cappella hymn, "What Greater Thing", that has become the unofficial alma mater song and has been performed at every USAFA commencement ceremony since 1965. Williams's wife, Maxine, wore a charm bracelet adorned with six charms, each one representing a significant band work by her husband; the charm for The Ramparts made up the central piece. Compositions The following is a partial list of Clifton Williams's band compositions. Works marked with an asterisk are unpublished. Academic Processional (1960) Air Force Band of the West (1964) Arioso (1958) Ballade (1944) Band of the Hour (1968)* Border Festival (1966) Caccia and Chorale (1976) Cadets on Parade (1965) Caprice Americana (1944) Castle Gap (1964) Concertino for Percussion and Band (1958) Dedicatory Overture (1964) Dramatic Essay (1958) Dramatic Variations (1975) Fanfare and Allegro (1954, rev 1956) Festival (1961) Future Music Leaders of America March (1974) Hall of Fame March (1940) Henderson Festival (1967) Hermitage (1975) Hero March, The (1938) Hill Country Ballad (1956) Killian (1968) Laredo (1963) Louisiana Tech Band March, The (1940) Lyric Psalm (1957)* March Lamar (1964) Pandean Fable (1965) Pastorale (1958) Patriots (1970) Postwar Prelude (1943) Ramparts (1965) Regal Procession (1957) Roll of Honor March (1939) Show Tune (1944) The Sinfonians (1960) Solemn Fugue (1960) Sonata Allegro (1949) Songs of Heritage (1975, completed by W. Francis McBeth in 1978 at the request of the composer's widow) Strategic Air Command March (1965) Symphonic Dances (1963–1965; Nrs. 2 and 3 published) Nr. 1: "Comanche Ritual" Nr. 2: "Military Ball: The Maskers" Nr. 3: "Fiesta" Nr. 4: "Square Dance" Nr. 5: "New Generation" Symphonic Essays (1953) Symphonic Suite (1957) I: Intrada II: Chorale III: March IV: Antique Dance V: Jubilee Texas Bands (1969)* Toccata (1953)* Trail Scenes (1968) I: Round Up II: Nighthawk III. Railhead Tribute to Barney Chance (ms, 1973)* Trilogy for Band (1964) I: Declamation II: Elegy III: Quickstep March Variation Overture (1962) References American male composers 1923 births 1976 deaths Little Rock Central High School alumni People from Saline County, Arkansas United States Army Air Forces personnel of World War II University of Miami faculty 20th-century American composers 20th-century American male musicians United States Army Air Forces non-commissioned officers
```javascript if ($.fn.pagination){ $.fn.pagination.defaults.beforePageText = ''; $.fn.pagination.defaults.afterPageText = ' {pages}'; $.fn.pagination.defaults.displayMsg = ' {from}- {to}- {total} '; } if ($.fn.datagrid){ $.fn.datagrid.defaults.loadMsg = ' , ...'; } if ($.fn.treegrid && $.fn.datagrid){ $.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg; } if ($.messager){ $.messager.defaults.ok = ''; $.messager.defaults.cancel = ''; } $.map(['validatebox','textbox','filebox','searchbox', 'combo','combobox','combogrid','combotree', 'datebox','datetimebox','numberbox', 'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){ if ($.fn[plugin]){ $.fn[plugin].defaults.missingMessage = ' .'; } }); if ($.fn.validatebox){ $.fn.validatebox.defaults.rules.email.message = ' e-mail .'; $.fn.validatebox.defaults.rules.url.message = ' URL.'; $.fn.validatebox.defaults.rules.length.message = ' {0} {1}.'; $.fn.validatebox.defaults.rules.remote.message = ' .'; } if ($.fn.calendar){ $.fn.calendar.defaults.firstDay = 1; $.fn.calendar.defaults.weeks = ['.','.','.','.','.','.','.']; $.fn.calendar.defaults.months = ['', '', '', '', '', '', '', '', '', '', '', '']; } if ($.fn.datebox){ $.fn.datebox.defaults.currentText = ''; $.fn.datebox.defaults.closeText = ''; $.fn.datebox.defaults.okText = ''; } if ($.fn.datetimebox && $.fn.datebox){ $.extend($.fn.datetimebox.defaults,{ currentText: $.fn.datebox.defaults.currentText, closeText: $.fn.datebox.defaults.closeText, okText: $.fn.datebox.defaults.okText }); } ```
Vanaraja is a dual-purpose chicken variety developed by the ICAR-Directorate of Poultry Research (formerly Project Directorate on Poultry) in Hyderabad, India. Vanaraja is aimed a rural communities where it can be reared in backyard on natural, scavenged food with minimal supplementation. It produces eggs and meat based on rearing and feeding practices. Important features of this breed are multi-color feather pattern, immunity to disease, perform with less nutrition, grow faster and produce more eggs, produce brown eggs like local hens. Vanaraja give their best performance when reared free range. They each produce up to 110 eggs per year, and weigh at age 6 to months. Vaccination of native birds along with Vanaraja is recommended. Excess body weight may reduce egg production. Vanaraja are mainly found in Telangana and Andhra Pradesh and being supplied to 26 states of India from ICAR-DPR, Hyderabad. External links Backyard Poultry Farming of Vanaraja Breed: A Less Capital Enterprise, Indian Council of Agricultural Research, Access: 25 February 2015. References Chicken breeds originating in India Chicken breeds
Uropeltis arcticeps, commonly known as the Madurai earth snake or the Tinevelly uropeltis, is a species of snake in the family Uropeltidae. The species is endemic to India. Geographic distribution U. arcticeps is found in South India (Western Ghats south of Palghat; from sea level (Alleppey) to about 5,000 feet in the Travancore Hills; Tinnevelly Hills). The type locality of Silybura arcticeps is "Tinevelly, S India", and the type locality of Silybura nilgherriensis var. picta is "North Travancore near Peermede, on coffee estate at an elevation between 3000 and 4000 feet, S India". References Further reading Günther A (1875). "Second Report on Collections of Indian Reptiles obtained by the British Museum". Proceedings of the Zoological Society of London 1875: 224-234. (Silybura arcticeps, new species, p. 229, Figure 1). Beddome RH (1878). "Description of six new Species of Snakes of the Genus Silybura, Family Uropeltidæ, from the Peninsula of India". Proc. Zool. Soc. London 1878: 800-802. Beddome RH (1886). "An Account of the Earth-Snakes of the Peninsula of India and Ceylon". Annals and Magazine of Natural History, Fifth Series 17: 3-33. (Silybura nilgherriensis Var. picta, new variety, p. 16). Mason GE (1888). "Description of a new Earth-Snake of the Genus Silybura from the Bombay Presidency, with Remarks on other little-known Uropeltidae". Ann. Mag. Nat. Hist., Sixth Series 1: 184-186. Uropeltidae Reptiles of India Endemic fauna of the Western Ghats Reptiles described in 1875 Taxa named by Albert Günther
Licensed to Kill? The Nuclear Regulatory Commission and the Shoreham Power Plant, a 1998 book by Joan Aron, presents the first detailed case study of how an activist public and elected officials of New York state opposed the Shoreham Nuclear Power Plant on Long Island. The book explains that nuclear power faltered when "public concerns about health, safety, and the environment superseded other interests about national security or energy supplies". Aron argues that the Shoreham closure resulted from the collapse of public trust for the Nuclear Regulatory Commission and the entire nuclear industry. For Aron, the unwillingness of the Long Island Lighting Company (LILCO) management to consider true public interest in the debate resulted in "the loss of the goodwill of its customers". Also, the willingness of LILCO to press on with plans for Shoreham despite changes in the economics of nuclear power and market demand "reflected a basic failure of foresight". See also Anti-nuclear movement in the United States List of anti-nuclear protests in the United States List of books about nuclear issues Richard Kessel References Nuclear power in the United States Nuclear Regulatory Commission 1998 non-fiction books Energy development Books about politics of the United States Books about nuclear issues
```sqlpl create table if not exists `test_table_59`( `i` int not null primary key ); insert into `test_table_59`(`i`) values (999); ```