text
stringlengths 1
22.8M
|
|---|
The 1923 Giro d'Italia was the 11th edition of the Giro d'Italia, a Grand Tour organized and sponsored by the newspaper La Gazzetta dello Sport. The race began on 23 May in Milan with a stage that stretched to Turin, finishing back in Milan on 10 June after a stage and a total distance covered of . The race was won by the Italian rider Costante Girardengo of the Maino team. Second and third respectively were the Italian riders Giovanni Brunero and Bartolomeo Aymo.
This year saw the debutant Ottavio Bottecchia finish in 5th place overall, and the leading 'isolate' (rider without a team). Bottecchia caught the attention of French rider Henri Pélissier, who instigated his glorious Tour de France career.
Participants
Of the 96 or 97 riders that began the Giro d'Italia on 23 May, 38 of them made it to the finish in Milan on 10 June. Riders were allowed to ride on their own or as a member of a team. There were three teams that competed in the race: Atala, Legnano, and Maino.
The peloton was completely composed of Italians. The field featured two former Giro d'Italia champions in the 1919 Giro d'Italia winner Costante Girardengo and returning champion Giovanni Brunero. Other notable Italian riders that started the race included Bartolomeo Aymo, Ottavio Bottecchia, Angelo Gremo, and Giovanni Rossignoli.
Final standings
Stage results
General classification
There were 38 cyclists who had completed all ten stages. For these cyclists, the times they had needed in each stage was added up for the general classification. The cyclist with the least accumulated time was the winner. Ottavio Bottecchia won the prize for best ranked independent rider in the general classification.
Notes
References
1923
Giro d'Italia
Giro d'Italia
Giro d'Italia
Giro d'Italia
|
```c++
CAge* pcage = new CAge(21); // CAge is derived from CObject.
ASSERT(AfxIsMemoryBlock(pcage, sizeof(CAge)));
```
|
Severian is the narrator and main character of Gene Wolfe's novels The Book of the New Sun and The Urth of the New Sun.
Severian, Severians or Severianus may also refer to:
Severian Baranyk (1889–1941), Ukrainian Greek Catholic priest and martyr in Ukraine
Severian Encratites, a sect of gnostic Encratites
Severian of Gabala (fl. c. 400), a popular preacher in Constantinople
Severian Yakymyshyn (1930–2021), Ukrainian Greek Catholic priest in Canada
Severians, a tribe or tribal union of early East Slavs
Severia, historical region in Eastern Europe
Severianus, son of the emperor Valerius Severus (died 313)
Severianus, Bishop of Scythopolis (died 453), bishop of Scythopolis in Palestine and martyr
Severianus of Damascus (fl. c. 450–480), Roman governor
Severian, Christian martyr torn apart by stones around 300
Severian, one of the Forty Martyrs of Sebaste (died 320)
Severians, the followers of Severus of Antioch
See also
Severin (disambiguation)
|
Plumas Eureka is a census-designated place (CDP) in Plumas County, California, United States. The population was 320 at the 2000 census.
Geography
Plumas Eureka is located at (39.789608, -120.651553).
According to the United States Census Bureau, the CDP has a total area of 4.0 square miles (10.3 km), all of it land.
Demographics
2010
At the 2010 census, Plumas Eureka had a population of 339. The population density was . The racial makeup of Plumas Eureka was 326 (96.2%) White, 0 (0.0%) African American, 1 (0.3%) Native American, 3 (0.9%) Asian, 0 (0.0%) Pacific Islander, 3 (0.9%) from other races, and 6 (1.8%) from two or more races. Hispanic or Latino of any race were 17 people (5.0%).
The whole population lived in households; no one lived in non-institutionalized group quarters and no one was institutionalized.
There were 167 households, of which 19 (11.4%) had children under the age of 18 living in them, 105 (62.9%) were opposite-sex married couples living together, 7 (4.2%) had a female householder with no husband present, and 1 (0.6%) had a male householder with no wife present. There were 11 (6.6%) unmarried opposite-sex partnerships, and 0 (0%) same-sex married couples or partnerships. 42 households (25.1%) were one person and 26 (15.6%) had someone living alone who was 65 or older. The average household size was 2.03. There were 113 families (67.7% of households); the average family size was 2.38.
The age distribution was 34 people (10.0%) under the age of 18, 13 people (3.8%) aged 18 to 24, 43 people (12.7%) aged 25 to 44, 140 people (41.3%) aged 45 to 64, and 109 people (32.2%) who were 65 or older. The median age was 59.0 years. For every 100 females, there were 94.8 males. For every 100 females age 18 and over, there were 100.7 males.
There were 523 housing units at an average density of 131.4 per square mile, of the occupied units 136 (81.4%) were owner-occupied and 31 (18.6%) were rented. The homeowner vacancy rate was 13.8%; the rental vacancy rate was 50.0%. 267 people (78.8% of the population) lived in owner-occupied housing units and 72 people (21.2%) lived in rental housing units.
2000
At the 2000 census, there were 320 people, 167 households, and 110 families in the CDP. The population density was . There were 445 housing units at an average density of . The racial makeup of the CDP was 99.06% White, 0.31% Asian, and 0.62% from two or more races. Hispanic or Latino of any race were 1.25%.
Of the 167 households, 9.6% had children under the age of 18 living with them, 64.1% were married couples living together, 1.2% had a female householder with no husband present, and 34.1% were non-families. 29.3% of households were one person and 13.2% were one person aged 65 or older. The average household size was 1.92 and the average family size was 2.31.
The age distribution was 10.0% under the age of 18, 0.6% from 18 to 24, 13.1% from 25 to 44, 45.6% from 45 to 64, and 30.6% 65 or older. The median age was 56 years. For every 100 females, there were 82.9 males. For every 100 females age 18 and over, there were 84.6 males.
The median household income was $58,571 and the median family income was $59,643. Males had a median income of $54,286 versus $46,250 for females. The per capita income for the CDP was $30,706. None of the families and 4.9% of the population were living below the poverty line, including no under eighteens and 5.4% of those over 64.
Politics
In the state legislature, Plumas Eureka is in , and .
Federally, Plumas Eureka is in .
References
External links
Plumas Eureka Villa Home Owners Association
Census-designated places in Plumas County, California
Census-designated places in California
|
```objective-c
/**
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <XCTest/XCTest.h>
#import "FBImageIOScaler.h"
#import "FBIntegrationTestCase.h"
@interface FBImageIOScalerTests : FBIntegrationTestCase
@property (nonatomic) NSData *originalImage;
@property (nonatomic) CGSize originalSize;
@end
@implementation FBImageIOScalerTests
- (void)setUp {
XCUIApplication *app = [[XCUIApplication alloc] init];
[app launch];
XCUIScreenshot *screenshot = app.screenshot;
self.originalImage = UIImageJPEGRepresentation(screenshot.image, 1.0);
self.originalSize = [FBImageIOScalerTests scaledSizeFromImage:screenshot.image];
}
- (void)testScaling {
CGFloat halfScale = 0.5;
CGSize expectedHalfScaleSize = [FBImageIOScalerTests sizeFromSize:self.originalSize scalingFactor:0.5];
[self scaleImageWithFactor:halfScale
expectedSize:expectedHalfScaleSize];
// 1 is the smalles scaling factor we accept
CGFloat minScale = 0.0;
CGSize expectedMinScaleSize = [FBImageIOScalerTests sizeFromSize:self.originalSize scalingFactor:0.01];
[self scaleImageWithFactor:minScale
expectedSize:expectedMinScaleSize];
// For scaling factors above 100 we don't perform any scaling and just return the unmodified image
CGFloat unscaled = 2.0;
[self scaleImageWithFactor:unscaled
expectedSize:self.originalSize];
}
- (void)scaleImageWithFactor:(CGFloat)scalingFactor expectedSize:(CGSize)excpectedSize {
FBImageIOScaler *scaler = [[FBImageIOScaler alloc] init];
id expScaled = [self expectationWithDescription:@"Receive scaled image"];
[scaler submitImage:self.originalImage
scalingFactor:scalingFactor
compressionQuality:1.0
completionHandler:^(NSData *scaled) {
UIImage *scaledImage = [UIImage imageWithData:scaled];
CGSize scaledSize = [FBImageIOScalerTests scaledSizeFromImage:scaledImage];
XCTAssertEqualWithAccuracy(scaledSize.width, excpectedSize.width, 1.0);
XCTAssertEqualWithAccuracy(scaledSize.height, excpectedSize.height, 1.0);
[expScaled fulfill];
}];
[self waitForExpectations:@[expScaled]
timeout:0.5];
}
+ (CGSize)scaledSizeFromImage:(UIImage *)image {
return CGSizeMake(image.size.width * image.scale, image.size.height * image.scale);
}
+ (CGSize)sizeFromSize:(CGSize)size scalingFactor:(CGFloat)scalingFactor {
return CGSizeMake(round(size.width * scalingFactor), round(size.height * scalingFactor));
}
@end
```
|
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "path_to_url">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct template multiply_typeof_helper<boost::units::absolute< boost::units::unit< Dim, System > >, boost::lambda::lambda_functor< Arg >></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="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../boost_units/Reference.html#header.boost.units.lambda_hpp" title="Header <boost/units/lambda.hpp>">
<link rel="prev" href="multi_1_3_44_10_2_30_3_2_5.html" title="Struct template multiply_typeof_helper<boost::lambda::lambda_functor< Arg >, boost::units::absolute< boost::units::unit< Dim, System > >>">
<link rel="next" href="opera_1_3_44_10_2_30_3_2_7.html" title="Function template operator*">
</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="multi_1_3_44_10_2_30_3_2_5.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_units/Reference.html#header.boost.units.lambda_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="opera_1_3_44_10_2_30_3_2_7.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.units.multi_1_3_44_10_2_30_3_2_6"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template multiply_typeof_helper<boost::units::absolute< boost::units::unit< Dim, System > >, boost::lambda::lambda_functor< Arg >></span></h2>
<p>boost::units::multiply_typeof_helper<boost::units::absolute< boost::units::unit< Dim, System > >, boost::lambda::lambda_functor< Arg >></p>
</div>
<h2 xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../boost_units/Reference.html#header.boost.units.lambda_hpp" title="Header <boost/units/lambda.hpp>">boost/units/lambda.hpp</a>>
</span><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> System<span class="special">,</span> <span class="keyword">typename</span> Dim<span class="special">,</span> <span class="keyword">typename</span> Arg<span class="special">></span>
<span class="keyword">struct</span> <a class="link" href="multi_1_3_44_10_2_30_3_2_6.html" title="Struct template multiply_typeof_helper<boost::units::absolute< boost::units::unit< Dim, System > >, boost::lambda::lambda_functor< Arg >>">multiply_typeof_helper</a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">units</span><span class="special">::</span><span class="identifier">absolute</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">units</span><span class="special">::</span><span class="identifier">unit</span><span class="special"><</span> <span class="identifier">Dim</span><span class="special">,</span> <span class="identifier">System</span> <span class="special">></span> <span class="special">></span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">::</span><span class="identifier">lambda_functor</span><span class="special"><</span> <span class="identifier">Arg</span> <span class="special">></span><span class="special">></span> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">::</span><span class="identifier">lambda_functor</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">::</span><span class="identifier">lambda_functor_base</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">::</span><span class="identifier">arithmetic_action</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">::</span><span class="identifier">multiply_action</span> <span class="special">></span><span class="special">,</span> <span class="identifier">tuple</span><span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">::</span><span class="identifier">const_copy_argument</span><span class="special"><</span> <span class="keyword">const</span> <a class="link" href="absolute.html" title="Class template absolute">boost::units::absolute</a><span class="special"><</span> <a class="link" href="unit.html" title="Class template unit">boost::units::unit</a><span class="special"><</span> <span class="identifier">Dim</span><span class="special">,</span> <span class="identifier">System</span> <span class="special">></span> <span class="special">></span> <span class="special">></span><span class="special">::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">::</span><span class="identifier">lambda_functor</span><span class="special"><</span> <span class="identifier">Arg</span> <span class="special">></span> <span class="special">></span> <span class="special">></span> <span class="special">></span> <a name="boost.units.multi_1_3_44_10_2_30_3_2_6.type"></a><span class="identifier">type</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
</div>
<table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
Watanabe<p>
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="multi_1_3_44_10_2_30_3_2_5.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_units/Reference.html#header.boost.units.lambda_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="opera_1_3_44_10_2_30_3_2_7.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
```
|
Arzuni (, also Romanized as Ārzūnī) is a village in Nazil Rural District, Nukabad District, Khash County, Sistan and Baluchestan Province, Iran. At the 2006 census, its population was 48, in 14 families.
References
Populated places in Khash County
|
Paraguay is one of the few countries in Latin America that has maintained an integrated public monopoly on electricity. Hydropower comprises nearly 100 percent of electricity in Paraguay; 90 percent of generated energy is exported, with neighboring Argentina and Brazil receiving the majority. Paraguay is one of the world's largest electricity net exporters.
Because of the dominance of hydroelectricity, tariffs (mostly residential) are remarkably below the averages for the region. However, despite the abundance of resources, the Paraguayan electricity system faces difficulty due to the lack of investment in transmission and distribution networks. In addition, distribution losses are among the highest in the region.
Electricity supply and demand
Installed capacity and generation
Paraguay is the only country in Latin America with almost 100 percent hydroelectric generation capacity (8,116 MW) in 2005.
Paraguay operates two binational hydroelectric dams. Itaipu dam, by far the largest power station in the country, is operated with
Brazil and has an installed capacity of 7000 MW (86 percent of Paraguay's generation capacity). Yacyretá, the second largest hydroelectric facility, has an installed capacity of 900 MW (11 percent), and is operated with Argentina. A third plant, Acaray has an installed capacity of 210 MW (3 percent). Thermal plants contribute less than 0.1 percent.
All of Paraguay's electricity for domestic consumption comes from a single facility, the binational 14 GW Itaipu hydroelectric dam.
Source: ESMAP, 2006. Installed capacity shown for Itaipu and Yacyretá refers only to the Parguayan share in these plants.
While total generation amounted to 51.17 TWh in 2005, consumption was only 5.01 TWh, with exports as high as 43.8 TWh.
Demand
In 2005, total electricity consumed in Paraguay was 5.01 TWh, which corresponds to 849 kWh per capita. Electricity generated by Itaipu and Acaray, located in the East of the country, is transported to the West (to the Asunción area), where over 60% of the total national consumption is located.
Electricity consumption by consumer group is divided as follows:
Residential: 41%
Commercial: 18.3%
Industrial: 26%
Others: 14.2%
In 2004, the country consumed only 16% of its 50% share of Itaipu's production, exporting the rest to Brazil. As for Yacyreta, Paraguay consumes less than 1% of its share, exporting the rest to Argentina.
The electricity interconnections that allow power exchanges with Brazil and Argentina are:
Source: ESMAP, 2006
Access to electricity
In 2005, almost 90% of the population in Paraguay had access to electricity, which is just slightly below than the 94.6% average for LAC
The 2002 Census revealed that 87% of the households without electricity were located in rural areas, where access was about 77%. Rural coverage varies considerably among the different regions of the country. It is lowest in the remote and sparsely populated Chaco, or Western region. The table below shows rural coverage by Department for 2002:
See also:Departments of Paraguay (including a map)
Source: Pulfer, 2005 (from 2002 Census)
Since 2004, the National Electricity Administration (ANDE) has been carrying out a Program to Recover Distribution Works under the Self-Help System (Sistema de Autoayuda), which aims at the regularization of all the low and medium voltage distribution networks. This program, with a 10-year time-horizon, is implemented according to priorities defined by the conservation status of the networks involved. Under this program, installations that do not comply with current ANDE's rules are replaced.
Service quality
Interruption frequency and duration
In 2005, the average number of interruptions per subscriber was 16.4, while duration of interruptions per subscriber was 7.58 hours. While the number of interruptions is just slightly above than the weighted average for LAC, 13 interruptions, the duration is well below the weighted average of 14 hours.
Blackouts
Despite consuming less than 6 TWh per year and exporting close to 45 TWh per year, Paraguay faces blackouts as well as a serious risk of suffering an energy crisis. This is the result of the limitations of both the transmission and distribution systems. The ceiling of the system is placed by ANDE's at 1,700 MW, with demand above 1,500 MW in 2008. Transmission capacity is urgently needed to avoid a supply crisis in a system in which quality and an adequate technical service is practically nonexistent.
Different authors believe that the price received for the electricity sold to Brazil (from Paraguay's share in Itaipu) and also to Argentina to some extent (from its share in Yacyreta) is currently too low. The “fair price” established by the Itaipu Treaty was conceived on the basis of a “compensation for concession of energy” and not on the basis of a commercial exchange. This price has remained very low (about US$2.81 per MWh). It is argued that, if this price was more in line with actual electricity prices in the Brazilian market, Paraguay would have enough resources to strengthen its electricity transmission capacity.
Distribution and transmission losses
In 2005, distribution losses in Paraguay were has high as 31%, well above the 13.5% weighted average for LAC and up from about 22% in 2001
System losses have become a serious problem in the last few years, having followed a continuous upward trend. The highest percentage of losses occurs in the National Interconnected System (SIN), while the remaining corresponds to the bi-national enterprises. In the SIN, distribution losses represented 23% of the total in 2003, while transmission losses, according to ANDE, were 7.3%. ANDE has established a 23% target for electricity losses for the year 2010.
Responsibilities in the electricity sector
Responsibilities in the Paraguayan electricity sector are concentrated in a single, vertically integrated public monopoly, the National Electricity Administration (Administración Nacional de Electricidad, ANDE).
Policy and regulation
Law 167/93 indicates that the Vice ministry of Mines and Energy (under the Ministry of Public Works and Communication) is responsible for establishing and guiding energy policy, as well as for the study of the technical, economic, financial and legal aspects that promote energy use. However, the Vice ministry does not have the adequate resources to effectively perform its functions.
In practice, all the energy responsibilities are concentrated in ANDE, which is the de facto electricity regulator and provider. ANDE also elaborates the tariff structure, which is then analyzed and approved by the Economic Council of the Executive Power. The Council usually sets lower tariffs to the ones proposed by ANDE, which leads to a lack of resources for the necessary investment for adequate performance of the electricity system.
Generation, transmission and distribution
ANDE controls the country's entire electricity market, including generation, transmission and distribution. ANDE operates only one hydroelectric dam, Acaray, and six thermal power plants, with total installed capacity of 220 MW. It is also responsible for Paraguay's share of Itaipú and Yacyretá, the two bi-national hydroelectric facilities (See bi-national facilities above).
ANDE operates of transmission lines in the Interconnected National System, divided in 6 subsystems, and of distribution lines. It is also responsible for all of the distribution, with two exceptions: CLYFSA (Compañía de Luz y Fuerza, S.A.), which has a concession to distribute and commercialize electricity in Villarrica, and the Empresas Distribuidoras Menonitas del Chaco Central.
History of the electricity sector
Hydroelectric plants
Itaipu dam
In April 1973, the governments of Paraguay and Brazil signed the Itaipu Treaty, by which it was decided to create a binational entity to hydroelectric use of the Paraná River. This entity was constituted by ANDE (Paraguay) and ELECTROBRAS (Brazil). US$100 million were contributed in equal parts by both companies.
Yacyretá Dam
In December 1973, the governments of Argentina and Paraguay signed the Yacyreta Treaty, by which ANDE and Agua y Energía constituted the Binational Entity, whose aim is the hydroelectric use of the Paraná river. US$100 million was contributed in equal parts by each company.
Corpus Christi
In 1971, Paraguay and Argentina created the River Parana Joint Commission (Comisión Mixta del Río Paraná, COMIP), which started to carry out different studies (pre-feasibility, environmental, etc.) for the Corpus project, to be located upstream of the Paraná river, close to the towns of Corpus (in the Argentina Misiones Province and Puerto Bella Vista in Paraguay. In the mid-1980s, Argentina, Paraguay and Brazil signed a tripartite agreement that established the operating height of the project, which would allow to bring into line the operation of Corpus with those of Yacyreta and Itaipu.
The different alternatives for this project are still under study. As a large hydroelectric project, with installed capacity of about 3,000 MW and annual generation of about 19,000 GWh, Corpus is a controversial project that is opposed both at the regional and social levels. In April 1996, in a plebiscite in the Misiones Province, the construction of the dam was opposed by almost 89% of the voters.
Tariffs and subsidies
Tariffs
In 2006, the average national tariff in Paraguay was US$0.080 per kWh Tariffs for the different consumer groups were:
Residential: US$0.091/kWh (weighted average for LAC in 2005: 0.105
Commercial: US$0.090/kWh
Industrial: US$0.056/kWh (weighted average for LAC in 2005: 0.1075)
General: US$0.075/kWh
Others: US$0.094/kWh
Subsidies
In November 2004, the Paraguayan Government approved Law 2,501, which broadened the electricity social tariff applied by ANDE. The social tariff is applied to residential users below 150kWh of monthly consumption. Currently, about 37% of total customers benefit from this tariff. ANDE estimates that this share will gradually increase to 56% of the total.
Investment and financing
Investments for maintenance and expansion of the necessary assets to provide electricity service have been executed with the support of multilateral credit institutions.
Summary of private participation in the electricity sector
The National Electricity Administration (Administración Nacional de Electricidad, ANDE), Paraguay's state-owned utility, controls the country's entire electricity market, including generation, transmission and distribution.
Two small companies buy electricity from ANDE and have concessions to distribute and sell it: CLYFSA (Compañía de Luz y Fuerza, S.A.) in Villarrica, and the Empresas Distribuidoras Menonitas del Chaco Central.
Electricity and the environment
Responsibility for the environment
The Environmental Directorate (Secretaría del Ambiente, SEAM) is the institution in charge of environmental issues in Paraguay, focusing on natural resources management and preservation.
Greenhouse gas emissions
Paraguay emitted 3.85 million tons of in 2005, which corresponds to just 0.61 t per capita annually, the lowest rate in the LAC region after Haiti's.
CDM projects in electricity
Currently (August 2008), there are no registered CDM projects in any sector in Paraguay. The low emission factor of a fully hydroelectric system is most likely the reason for the absence of this type of projects in the electricity sector.
External assistance
Inter-American Development Bank
Currently, the Inter-American Development Bank (IDB) is contributing funds and assistance to one project in the electricity sector in Paraguay:
Phase I of a Multi-Phase Power Transmission Program supported through a US$69.5 million credit. The objective of this project, which was approved in December 2006 but has not disbursed any funds as of August 2008, is to strengthen transmission networks in already served areas as well as to extend them to areas still not being served.
The IDB is also providing technical assistance under two activities:
Support for Paraguay's Electrical Sector Modernization. The objective of this support is to "execute studies that will formulate the fundamental and integrated actions, to increase the total loss management capacity of the ANDE in these categories: i) management of loss, ii) prospection of losses, iii) regularization of systems and facilities, iv) collection of the recovered revenue, and v) loss prevention."
Development of a National Rural Electrification Program that will explore grid extension, renewable energy and natural gas solutions.
See also
Paraguay
Economy of Paraguay
Water supply and sanitation in Paraguay
History of Paraguay
Politics of Paraguay
Notes
Sources
Casco Carreras, 2008. Presente y Futuro del Sector Energético Nacional. Centro de Análisis y Difusión de la Economía Paraguaya
ESMAP, 2006. Estrategia para el desarrollo del sector eléctrico del Paraguay.
Suarez Montorfano, 2007. El Proyecto hidroeléctrico Corpus Christi
External links
National Electricity Administration (ANDE)
Environmental Directorate (SEAM
Ministry of Public Works and Communications
Viceministry of Mines and Energy
Paraguay
|
```java
package org.dromara.maxkey.authn;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import java.io.Serial;
import java.io.Serializable;
/**
* @description:
* @author: orangeBabu
* @time: 16/8/2024 AM10:54
*/
public class QrCodeCredentialDto {
@NotEmpty(message = "jwtToken")
@Schema(name = "jwtToken", description = "token")
String jwtToken;
@NotEmpty(message = "")
@Schema(name = "code", description = "")
String code;
public @NotEmpty(message = "jwtToken") String getJwtToken() {
return jwtToken;
}
public void setJwtToken(@NotEmpty(message = "jwtToken") String jwtToken) {
this.jwtToken = jwtToken;
}
public @NotEmpty(message = "") String getCode() {
return code;
}
public void setCode(@NotEmpty(message = "") String code) {
this.code = code;
}
}
```
|
```go
package pixelgl
import (
"fmt"
"image"
"image/color"
"runtime"
"github.com/faiface/glhf"
"github.com/faiface/mainthread"
"github.com/faiface/pixel"
"github.com/go-gl/gl/v3.3-core/gl"
"github.com/go-gl/glfw/v3.3/glfw"
"github.com/pkg/errors"
)
// WindowConfig is a structure for specifying all possible properties of a Window. Properties are
// chosen in such a way, that you usually only need to set a few of them - defaults (zeros) should
// usually be sensible.
//
// Note that you always need to set the Bounds of a Window.
type WindowConfig struct {
// Title at the top of the Window.
Title string
// Icon specifies the icon images available to be used by the window. This is usually
// displayed in the top bar of the window or in the task bar of the desktop environment.
//
// If passed one image, it will use that image, if passed an array of images those of or
// closest to the sizes desired by the system are selected. The desired image sizes varies
// depending on platform and system settings. The selected images will be rescaled as
// needed. Good sizes include 16x16, 32x32 and 48x48.
//
// Note: Setting this value doesn't have an effect on OSX. You'll need to set the icon when
// bundling your application for release.
Icon []pixel.Picture
// Bounds specify the bounds of the Window in pixels.
Bounds pixel.Rect
// Initial window position
Position pixel.Vec
// If set to nil, the Window will be windowed. Otherwise it will be fullscreen on the
// specified Monitor.
Monitor *Monitor
// Resizable specifies whether the window will be resizable by the user.
Resizable bool
// Undecorated Window omits the borders and decorations (close button, etc.).
Undecorated bool
// NoIconify specifies whether fullscreen windows should not automatically
// iconify (and restore the previous video mode) on focus loss.
NoIconify bool
// AlwaysOnTop specifies whether the windowed mode window will be floating
// above other regular windows, also called topmost or always-on-top.
// This is intended primarily for debugging purposes and cannot be used to
// implement proper full screen windows.
AlwaysOnTop bool
// TransparentFramebuffer specifies whether the window framebuffer will be
// transparent. If enabled and supported by the system, the window
// framebuffer alpha channel will be used to combine the framebuffer with
// the background. This does not affect window decorations.
TransparentFramebuffer bool
// VSync (vertical synchronization) synchronizes Window's framerate with the framerate of
// the monitor.
VSync bool
// Maximized specifies whether the window is maximized.
Maximized bool
// Invisible specifies whether the window will be initially hidden.
// You can make the window visible later using Window.Show().
Invisible bool
//SamplesMSAA specifies the level of MSAA to be used. Must be one of 0, 2, 4, 8, 16. 0 to disable.
SamplesMSAA int
}
// Window is a window handler. Use this type to manipulate a window (input, drawing, etc.).
type Window struct {
window *glfw.Window
bounds pixel.Rect
canvas *Canvas
vsync bool
cursorVisible bool
cursorInsideWindow bool
// need to save these to correctly restore a fullscreen window
restore struct {
xpos, ypos, width, height int
}
prevInp, currInp, tempInp struct {
mouse pixel.Vec
buttons [KeyLast + 1]bool
repeat [KeyLast + 1]bool
scroll pixel.Vec
typed string
}
pressEvents, tempPressEvents [KeyLast + 1]bool
releaseEvents, tempReleaseEvents [KeyLast + 1]bool
prevJoy, currJoy, tempJoy joystickState
}
var currWin *Window
// NewWindow creates a new Window with it's properties specified in the provided config.
//
// If Window creation fails, an error is returned (e.g. due to unavailable graphics device).
func NewWindow(cfg WindowConfig) (*Window, error) {
bool2int := map[bool]int{
true: glfw.True,
false: glfw.False,
}
w := &Window{bounds: cfg.Bounds, cursorVisible: true}
flag := false
for _, v := range []int{0, 2, 4, 8, 16} {
if cfg.SamplesMSAA == v {
flag = true
break
}
}
if !flag {
return nil, fmt.Errorf("invalid value '%v' for msaaSamples", cfg.SamplesMSAA)
}
err := mainthread.CallErr(func() error {
var err error
glfw.WindowHint(glfw.ContextVersionMajor, 3)
glfw.WindowHint(glfw.ContextVersionMinor, 3)
glfw.WindowHint(glfw.OpenGLProfile, glfw.OpenGLCoreProfile)
glfw.WindowHint(glfw.OpenGLForwardCompatible, glfw.True)
glfw.WindowHint(glfw.Resizable, bool2int[cfg.Resizable])
glfw.WindowHint(glfw.Decorated, bool2int[!cfg.Undecorated])
glfw.WindowHint(glfw.Floating, bool2int[cfg.AlwaysOnTop])
glfw.WindowHint(glfw.AutoIconify, bool2int[!cfg.NoIconify])
glfw.WindowHint(glfw.TransparentFramebuffer, bool2int[cfg.TransparentFramebuffer])
glfw.WindowHint(glfw.Maximized, bool2int[cfg.Maximized])
glfw.WindowHint(glfw.Visible, bool2int[!cfg.Invisible])
glfw.WindowHint(glfw.Samples, cfg.SamplesMSAA)
if cfg.Position.X != 0 || cfg.Position.Y != 0 {
glfw.WindowHint(glfw.Visible, glfw.False)
}
var share *glfw.Window
if currWin != nil {
share = currWin.window
}
_, _, width, height := intBounds(cfg.Bounds)
w.window, err = glfw.CreateWindow(
width,
height,
cfg.Title,
nil,
share,
)
if err != nil {
return err
}
if cfg.Position.X != 0 || cfg.Position.Y != 0 {
w.window.SetPos(int(cfg.Position.X), int(cfg.Position.Y))
w.window.Show()
}
// enter the OpenGL context
w.begin()
glhf.Init()
gl.Enable(gl.MULTISAMPLE)
w.end()
return nil
})
if err != nil {
return nil, errors.Wrap(err, "creating window failed")
}
if len(cfg.Icon) > 0 {
imgs := make([]image.Image, len(cfg.Icon))
for i, icon := range cfg.Icon {
pic := pixel.PictureDataFromPicture(icon)
imgs[i] = pic.Image()
}
mainthread.Call(func() {
w.window.SetIcon(imgs)
})
}
w.SetVSync(cfg.VSync)
w.initInput()
w.SetMonitor(cfg.Monitor)
w.canvas = NewCanvas(cfg.Bounds)
w.Update()
runtime.SetFinalizer(w, (*Window).Destroy)
return w, nil
}
// Destroy destroys the Window. The Window can't be used any further.
func (w *Window) Destroy() {
mainthread.Call(func() {
w.window.Destroy()
})
}
// Update swaps buffers and polls events. Call this method at the end of each frame.
func (w *Window) Update() {
w.SwapBuffers()
w.UpdateInput()
}
// ClipboardText returns the current value of the systems clipboard.
func (w *Window) ClipboardText() string {
return w.window.GetClipboardString()
}
// SetClipboardText passes the given string to the underlying glfw window to set the
// systems clipboard.
func (w *Window) SetClipboardText(text string) {
w.window.SetClipboardString(text)
}
// SwapBuffers swaps buffers. Call this to swap buffers without polling window events.
// Note that Update invokes SwapBuffers.
func (w *Window) SwapBuffers() {
mainthread.Call(func() {
_, _, oldW, oldH := intBounds(w.bounds)
newW, newH := w.window.GetSize()
w.bounds = w.bounds.ResizedMin(w.bounds.Size().Add(pixel.V(
float64(newW-oldW),
float64(newH-oldH),
)))
})
w.canvas.SetBounds(w.bounds)
mainthread.Call(func() {
w.begin()
framebufferWidth, framebufferHeight := w.window.GetFramebufferSize()
glhf.Bounds(0, 0, framebufferWidth, framebufferHeight)
glhf.Clear(0, 0, 0, 0)
w.canvas.gf.Frame().Begin()
w.canvas.gf.Frame().Blit(
nil,
0, 0, w.canvas.Texture().Width(), w.canvas.Texture().Height(),
0, 0, framebufferWidth, framebufferHeight,
)
w.canvas.gf.Frame().End()
if w.vsync {
glfw.SwapInterval(1)
} else {
glfw.SwapInterval(0)
}
w.window.SwapBuffers()
w.end()
})
}
// SetClosed sets the closed flag of the Window.
//
// This is useful when overriding the user's attempt to close the Window, or just to close the
// Window from within the program.
func (w *Window) SetClosed(closed bool) {
mainthread.Call(func() {
w.window.SetShouldClose(closed)
})
}
// Closed returns the closed flag of the Window, which reports whether the Window should be closed.
//
// The closed flag is automatically set when a user attempts to close the Window.
func (w *Window) Closed() bool {
var closed bool
mainthread.Call(func() {
closed = w.window.ShouldClose()
})
return closed
}
// SetTitle changes the title of the Window.
func (w *Window) SetTitle(title string) {
mainthread.Call(func() {
w.window.SetTitle(title)
})
}
// SetBounds sets the bounds of the Window in pixels. Bounds can be fractional, but the actual size
// of the window will be rounded to integers.
func (w *Window) SetBounds(bounds pixel.Rect) {
w.bounds = bounds
mainthread.Call(func() {
_, _, width, height := intBounds(bounds)
w.window.SetSize(width, height)
})
}
// SetPos sets the position, in screen coordinates, of the upper-left corner
// of the client area of the window. Position can be fractional, but the actual position
// of the window will be rounded to integers.
//
// If it is a full screen window, this function does nothing.
func (w *Window) SetPos(pos pixel.Vec) {
mainthread.Call(func() {
left, top := int(pos.X), int(pos.Y)
w.window.SetPos(left, top)
})
}
// GetPos gets the position, in screen coordinates, of the upper-left corner
// of the client area of the window. The position is rounded to integers.
func (w *Window) GetPos() pixel.Vec {
var v pixel.Vec
mainthread.Call(func() {
x, y := w.window.GetPos()
v = pixel.V(float64(x), float64(y))
})
return v
}
// Bounds returns the current bounds of the Window.
func (w *Window) Bounds() pixel.Rect {
return w.bounds
}
func (w *Window) setFullscreen(monitor *Monitor) {
mainthread.Call(func() {
w.restore.xpos, w.restore.ypos = w.window.GetPos()
w.restore.width, w.restore.height = w.window.GetSize()
mode := monitor.monitor.GetVideoMode()
w.window.SetMonitor(
monitor.monitor,
0,
0,
mode.Width,
mode.Height,
mode.RefreshRate,
)
})
}
func (w *Window) setWindowed() {
mainthread.Call(func() {
w.window.SetMonitor(
nil,
w.restore.xpos,
w.restore.ypos,
w.restore.width,
w.restore.height,
0,
)
})
}
// SetMonitor sets the Window fullscreen on the given Monitor. If the Monitor is nil, the Window
// will be restored to windowed state instead.
//
// The Window will be automatically set to the Monitor's resolution. If you want a different
// resolution, you will need to set it manually with SetBounds method.
func (w *Window) SetMonitor(monitor *Monitor) {
if w.Monitor() != monitor {
if monitor != nil {
w.setFullscreen(monitor)
} else {
w.setWindowed()
}
}
}
// Monitor returns a monitor the Window is fullscreen on. If the Window is not fullscreen, this
// function returns nil.
func (w *Window) Monitor() *Monitor {
var monitor *glfw.Monitor
mainthread.Call(func() {
monitor = w.window.GetMonitor()
})
if monitor == nil {
return nil
}
return &Monitor{
monitor: monitor,
}
}
// Focused returns true if the Window has input focus.
func (w *Window) Focused() bool {
var focused bool
mainthread.Call(func() {
focused = w.window.GetAttrib(glfw.Focused) == glfw.True
})
return focused
}
// SetVSync sets whether the Window's Update should synchronize with the monitor refresh rate.
func (w *Window) SetVSync(vsync bool) {
w.vsync = vsync
}
// VSync returns whether the Window is set to synchronize with the monitor refresh rate.
func (w *Window) VSync() bool {
return w.vsync
}
// SetCursorVisible sets the visibility of the mouse cursor inside the Window client area.
func (w *Window) SetCursorVisible(visible bool) {
w.cursorVisible = visible
mainthread.Call(func() {
if visible {
w.window.SetInputMode(glfw.CursorMode, glfw.CursorNormal)
} else {
w.window.SetInputMode(glfw.CursorMode, glfw.CursorHidden)
}
})
}
// SetCursorDisabled hides the cursor and provides unlimited virtual cursor movement
// make cursor visible using SetCursorVisible
func (w *Window) SetCursorDisabled() {
w.cursorVisible = false
mainthread.Call(func() {
w.window.SetInputMode(glfw.CursorMode, glfw.CursorDisabled)
})
}
// CursorVisible returns the visibility status of the mouse cursor.
func (w *Window) CursorVisible() bool {
return w.cursorVisible
}
// Note: must be called inside the main thread.
func (w *Window) begin() {
if currWin != w {
w.window.MakeContextCurrent()
currWin = w
}
}
// Note: must be called inside the main thread.
func (w *Window) end() {
// nothing, really
}
// MakeTriangles generates a specialized copy of the supplied Triangles that will draw onto this
// Window.
//
// Window supports TrianglesPosition, TrianglesColor and TrianglesPicture.
func (w *Window) MakeTriangles(t pixel.Triangles) pixel.TargetTriangles {
return w.canvas.MakeTriangles(t)
}
// MakePicture generates a specialized copy of the supplied Picture that will draw onto this Window.
//
// Window supports PictureColor.
func (w *Window) MakePicture(p pixel.Picture) pixel.TargetPicture {
return w.canvas.MakePicture(p)
}
// SetMatrix sets a Matrix that every point will be projected by.
func (w *Window) SetMatrix(m pixel.Matrix) {
w.canvas.SetMatrix(m)
}
// SetColorMask sets a global color mask for the Window.
func (w *Window) SetColorMask(c color.Color) {
w.canvas.SetColorMask(c)
}
// SetComposeMethod sets a Porter-Duff composition method to be used in the following draws onto
// this Window.
func (w *Window) SetComposeMethod(cmp pixel.ComposeMethod) {
w.canvas.SetComposeMethod(cmp)
}
// SetSmooth sets whether the stretched Pictures drawn onto this Window should be drawn smooth or
// pixely.
func (w *Window) SetSmooth(smooth bool) {
w.canvas.SetSmooth(smooth)
}
// Smooth returns whether the stretched Pictures drawn onto this Window are set to be drawn smooth
// or pixely.
func (w *Window) Smooth() bool {
return w.canvas.Smooth()
}
// Clear clears the Window with a single color.
func (w *Window) Clear(c color.Color) {
w.canvas.Clear(c)
}
// Color returns the color of the pixel over the given position inside the Window.
func (w *Window) Color(at pixel.Vec) pixel.RGBA {
return w.canvas.Color(at)
}
// Canvas returns the window's underlying Canvas
func (w *Window) Canvas() *Canvas {
return w.canvas
}
// Show makes the window visible, if it was previously hidden. If the window is
// already visible or is in full screen mode, this function does nothing.
func (w *Window) Show() {
mainthread.Call(func() {
w.window.Show()
})
}
// Clipboard returns the contents of the system clipboard.
func (w *Window) Clipboard() string {
var clipboard string
mainthread.Call(func() {
clipboard = w.window.GetClipboardString()
})
return clipboard
}
// SetClipboardString sets the system clipboard to the specified UTF-8 encoded string.
func (w *Window) SetClipboard(str string) {
mainthread.Call(func() {
w.window.SetClipboardString(str)
})
}
```
|
```shell
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
${CLICKHOUSE_CLIENT} --query "SELECT arrayMap((x,y) -> x + y, [1,2,3], [1,2])" 2>&1 | grep -o -F --max-count 1 'Argument 3 has size 2 which differs with the size of another argument, 3'
```
|
Thomas Elsa Jones (March 22, 1888 – August 5, 1973) was the fifth president of Fisk University, serving - and especially fundraising - from 1926 to 1946. He was later president of Earlham College, 1946 to 1958. A Quaker, Jones served as a missionary with his wife in Japan, and sponsored the first 'Friends' meetings in Nashville on Fisk campus.
Born Elsa Mazzentine Jones, he grew up in Fairmount, Indiana and attended Fairmount Academy. Upon enrolling in Earlham College in 1909, he was assigned to a women's dormitory, so he asked his mother permission to adopt her maiden name, Thomas, as his own first name, and was thus known as Thomas Elsa for the remainder of his life. He received his bachelor's degree from Earlham in 1912, and subsequently studied at Hartford Theological Seminary, graduating with a B.D. in 1915. Jones earned an M.A. in 1917 and a Ph.D. in sociology in 1926 from Columbia University.
Jones died on August 5, 1973, in Richmond, Indiana, home of Earlham College.
References
Sources
Tennessee virtual archive
Haverford College archival report on items relating to Fisk University
Edward Thomas. Quaker Adventures: Experiences of Twenty Three Adventures of International Understanding. Chicago: Ravel Company, 1928.
Time, Mar. 1, 1926
External links
Thomas Elsa Jones papers from the Haverford College Quaker & Special Collections
1888 births
1973 deaths
American Quakers
Columbia Graduate School of Arts and Sciences alumni
Earlham College alumni
Hartford Seminary alumni
Presidents of Fisk University
Presidents of Earlham College
20th-century American academics
|
```jsx
import { h, Fragment } from 'preact';
import PropTypes from 'prop-types';
import { useRef, useState, useEffect } from 'preact/hooks';
import { DefaultSelectionTemplate } from '../../shared/components/defaultSelectionTemplate';
const KEYS = {
ENTER: 'Enter',
COMMA: ',',
SPACE: ' ',
DELETE: 'Backspace',
};
/**
* Component allowing users to add multiple entries for a given input field that get displayed as destructive pills
*
* @param {Object} props
* @param {string} props.labelText The text for the input's label
* @param {boolean} props.showLabel Whether the label text should be visible or hidden (for assistive tech users only)
* @param {string} props.placeholder Input placeholder text
* @param {string} props.inputRegex Optional regular expression used to restrict the input
* @param {string} props.validationRegex Optional regular expression used to validate the value of the input
* @param {Function} props.SelectionTemplate Optional Preact component to render selected items
*/
export const MultiInput = ({
placeholder,
inputRegex,
validationRegex,
showLabel = true,
labelText,
SelectionTemplate = DefaultSelectionTemplate,
}) => {
const inputRef = useRef(null);
const inputSizerRef = useRef(null);
const selectedItemsRef = useRef(null);
const [items, setItems] = useState([]);
const [editValue, setEditValue] = useState(null);
const [inputPosition, setInputPosition] = useState(null);
useEffect(() => {
// editValue defaults to null when component is first rendered.
// This ensures we do not autofocus the input before the user has started interacting with the component.
if (editValue === null) {
return;
}
const { current: input } = inputRef;
if (input && inputPosition !== null) {
// Entering 'edit' mode
resizeInputToContentSize();
input.value = editValue;
const { length: cursorPosition } = editValue;
input.focus();
// This will set the cursor position at the end of the text.
input.setSelectionRange(cursorPosition, cursorPosition);
}
}, [inputPosition, editValue]);
const handleInputBlur = ({ target: { value } }) => {
addItemToList(value);
clearInput();
};
const handleInputChange = async ({ target: { value } }) => {
// When the input appears inline in "edit" mode, we need to dynamically calculate the width to ensure it occupies the right space
// (an input cannot resize based on its text content). We use a hidden <span> to track the size.
inputSizerRef.current.innerText = value;
if (inputPosition !== null) {
resizeInputToContentSize();
}
};
const handleKeyDown = (e) => {
const { value: currentValue } = inputRef.current;
switch (e.key) {
case KEYS.SPACE:
case KEYS.ENTER:
case KEYS.COMMA:
e.preventDefault();
addItemToList(e.target.value);
clearInput();
break;
case KEYS.DELETE:
if (currentValue === '') {
e.preventDefault();
editPreviousSelectionIfExists();
}
break;
default:
if (inputRegex && !inputRegex.test(e.key)) {
e.preventDefault();
}
}
};
const addItemToList = (value) => {
if (value.trim().length > 0) {
// If an item was edited, we want to keep it in the same position in the list
const insertIndex = inputPosition !== null ? inputPosition : items.length;
// if we do not pass in a validationRegex we can assume that anything is valid
const valid = validationRegex ? checkValidity(value) : true;
const newSelections = [
...items.slice(0, insertIndex),
{ value, valid },
...items.slice(insertIndex),
];
// We update the hidden selected items list, so additions are announced to screen reader users
const listItem = document.createElement('li');
listItem.innerText = value;
selectedItemsRef.current.appendChild(listItem);
setItems([...newSelections]);
exitEditState({});
}
};
const checkValidity = (value) => {
return validationRegex.test(value);
};
const clearInput = () => {
inputRef.current.value = '';
};
const resizeInputToContentSize = () => {
const { current: input } = inputRef;
if (input) {
input.style.width = `${inputSizerRef.current.clientWidth}px`;
}
};
const deselectItem = (clickedItem) => {
const newArr = items.filter((item) => item.value !== clickedItem);
setItems(newArr);
// We also update the hidden selected items list, so removals are announced to screen reader users
selectedItemsRef.current.querySelectorAll('li').forEach((selectionNode) => {
if (selectionNode.innerText === clickedItem) {
selectionNode.remove();
}
});
};
// If there is a previous selection, then pop it into edit mode
const editPreviousSelectionIfExists = () => {
if (items.length > 0 && inputPosition !== 0) {
const nextEditIndex =
inputPosition !== null ? inputPosition - 1 : items.length - 1;
const item = items[nextEditIndex];
enterEditState(item.value, nextEditIndex);
}
};
const enterEditState = (editItem, editItemIndex) => {
inputSizerRef.current.innerText = editItem;
deselectItem(editItem);
setEditValue(editItem);
setInputPosition(editItemIndex);
};
const exitEditState = ({ nextInputValue = '' }) => {
// Reset 'edit mode' input resizing
inputRef.current?.style?.removeProperty('width');
inputSizerRef.current.innerText = nextInputValue;
setEditValue(nextInputValue);
setInputPosition(nextInputValue === '' ? null : inputPosition + 1);
// Blurring away while clearing the input
if (nextInputValue === '') {
inputRef.current.value = '';
}
};
const allSelectedItemElements = items.map((item, index) => {
// When we are in "edit mode" we visually display the input between the other selections
// If the item being edited appears before the item being rendered then we set its position to
// the index + 1 which matches the order, however, any items that appear after the item that is
// being edited will need to increment their position by one to make place for the item being edited.
// at this point the position is already set
const defaultPosition = index + 1;
const appearsBeforeInput = inputPosition === null || index < inputPosition;
const position = appearsBeforeInput ? defaultPosition : defaultPosition + 1;
return (
<li
key={index}
className="c-input--multi__selection-list-item w-max"
style={{ order: position }}
>
<SelectionTemplate
name={item.value}
className={`c-input--multi__selected ${
!item.valid ? 'c-input--multi__selected-invalid' : ''
}`}
enableValidation={true}
valid={item.valid}
onEdit={() => enterEditState(item.value, index)}
onDeselect={() => deselectItem(item.value)}
/>
</li>
);
});
return (
<Fragment>
<span
ref={inputSizerRef}
aria-hidden="true"
className="absolute pointer-events-none opacity-0 p-2"
/>
<label
id="multi-select-label"
className={showLabel ? '' : 'screen-reader-only'}
>
{labelText}
</label>
{/* A visually hidden list provides confirmation messages to screen reader users as an item is selected or removed */}
<div className="screen-reader-only">
<p>Selected items:</p>
<ul
ref={selectedItemsRef}
className="screen-reader-only list-none"
aria-live="assertive"
aria-atomic="false"
aria-relevant="additions removals"
/>
</div>
<div class="c-input--multi relative">
<div class="c-input--multi__wrapper-border crayons-textfield flex items-center cursor-text pb-9">
<ul class="list-none flex flex-wrap w-100">
{allSelectedItemElements}
<li
class="self-center"
style={{
order:
inputPosition === null ? items.length + 1 : inputPosition + 1,
}}
>
<input
autocomplete="off"
class="c-input--multi__input"
type="text"
aria-labelledby="multi-select-label"
onBlur={handleInputBlur}
onKeyDown={handleKeyDown}
placeholder={inputPosition === null ? placeholder : null}
onChange={handleInputChange}
ref={inputRef}
/>
</li>
</ul>
</div>
</div>
</Fragment>
);
};
MultiInput.propTypes = {
labelText: PropTypes.string.isRequired,
showLabel: PropTypes.bool,
placeholder: PropTypes.string,
inputRegex: PropTypes.string,
validationRegex: PropTypes.string,
SelectionTemplate: PropTypes.func,
};
```
|
The Borradaile Triptych is an ivory Byzantine triptych carved in Constantinople between 900 and 1000 AD. It was bequeathed by Charles Borradaile to the British Museum, in London, in 1923, and is one of the "Romanos Group" of ivories that are closely connected with the Imperial Court, along with the Harbaville Triptych and Wernher Triptych.
Description
The central panel of the triptych is carved with the Crucifixion, with the Virgin Mary and St. John to each side and half-length figures of the archangels Michael and Gabriel above. The Greek inscription above their heads reads "Behold thy Son; Behold thy Mother" (John 19.26-7). On the left leaf, from top to bottom are carved St. Cyrus; St. George and Theodore Stratelates, with St. Menas and St. Procopius below; on the right leaf are carved the figures of St. John, St. Eustathius, Clement of Ancyra with St. Stephen and St. Kyrion above. On the reverse are two crosses and roundels containing the busts of St. Joachim and St. Anna in the centre, with St. Basil and St. Barbara, and John the Persian and St. Thecla in the terminals. Traces of a painted lozenge can be seen in the right-hand leaf.
Original Owner
The choice of saints must reflect the interests of the patron who originally ordered the triptych to be made. It has been speculated that it was made for Anna Porphyrogenita, daughter of the Emperor Romanos II, but this cannot be substantiated.
References
Further reading
Evans, Helen C. & Wixom, William D., The glory of Byzantium: art and culture of the Middle Byzantine era, A.D. 843-1261, no. 80, 1997, The Metropolitan Museum of Art, New York, ; full text available online from The Metropolitan Museum of Art Libraries
Goldschmidt and Weizmann 1934, No 38
Triptychs
Byzantine ivory
10th-century sculptures
Medieval European objects in the British Museum
|
```objective-c
/*
* TestbedUtils.cpp
*
*/
#ifndef LLGL_TESTBED_UTILS_H
#define LLGL_TESTBED_UTILS_H
#include <string>
// Returns true if the specified string ends with the specified ending.
bool StringEndsWith(const char* str, const char* end);
bool StringEndsWith(const std::string& str, const std::string& end);
#endif
// ================================================================================
```
|
Sydenham is a suburb of Johannesburg, South Africa. It is located in Region E of the City of Johannesburg Metropolitan Municipality. The suburb is surrounded by the area of Orchards, Orange Grove and other smaller suburbs.
History
The suburb was surveyed for housing in 1905. The suburb's name comes from the name of the farm which originated sometime before the mid-1890s. In 1910, Sydenham was still quite rural and on 26 February of that year, the land was used by Frenchman Albert Kimmerling to fly a Voisin biplane a few hundred yards and proved that aircraft could be flown at a high altitude of .
References
Johannesburg Region E
|
Gwbert (), also known as Gwbert-on-Sea, is a cliff-top coastal village in Y Ferwig community, Ceredigion, Wales. It lies at the most southerly coastal point of Ceredigion, on the eastern shore of the Teifi estuary, from where there are views westwards over Cardigan Bay, and south-westwards to Poppit Sands and the headland of Cemaes Head, in neighbouring Pembrokeshire. It is reached by the B4548 road from the town of Cardigan (Welsh: Aberteifi), away.
History
Gwbert as seen today essentially dates back only as far as the early 20th century, the most prominent buildings being the extensive Cliff Hotel and the smaller Gwbert Hotel. The settlement has an interesting history as a failed would-be resort, but despite its lack of facilities it is a popular holiday venue, being within easy reach of the Ceredigion and Pembrokeshire coastlines, both rich in scenery and wildlife.
The Ceredigion Coast Path, a long-distance footpath, and part of the Wales Coast Path, passes through Gwbert, making a marked detour inland north of the Cliff Hotel to avoid a dangerous cliff path.
Etymology
Before the area was populated at the end of the 19th century, it was often called The Gwbert.
The name Gwbert is thought to derive from a Celtic dedication (i.e. St Cubert), suggesting that a chapel may have existed here at one time. Gwbert, a wandering saint, is said to have landed here and sheltered in a cave. In fact Gwbert is among a group of five Saints (the others being Pedrog, Briog, Carannog and Meugana) honoured in church dedications near the mouth of the river Teifi, and also in churches lying in close proximity to each other in mid-Cornwall, and then again in neighbouring churches in Brittany.
Although Gwbert is not recorded, by name, as a settlement in medieval documentation, Towyn Farm—on the northern edge of the adjoining dunes—was recorded as a late medieval gentry house/settlement, owned by Gwilym ap Einon, constable of Cardigan Castle, in 1326.
The name "Pant-y-Gilbert" appears on maps of 1697, and both this and "Gwbert" had been used by 1748. The spelling "Goobert" appears on an 1838 map.
Population
In 1833 the population of the whole Ferwig parish was 439.
The 1851 census recorded 378 inhabitants.
In 2001 the rural community of Y Ferwig (which extends south-east of the A487, and of which Gwbert comprises only some 15 per cent in area) had a population of 1,177. Of these:
63.1 per cent spoke, read and/or wrote Welsh.
31.4 per cent were aged 45–64, and 22.17 per cent aged 65 or over.
The mean age of the whole population was 44.3, the median age being 47.0.
40 per cent were economically active.
22.4 per cent reported having a limiting long-term illness.
Although Gwbert and Ferwig are only one mile apart (and share a common Community Council) their demographics and environments are very different. Ferwig is a long-established agricultural area, characterised by little change to the indigenous population, or to their lifestyles. Gwbert has only existed for little more than 120 years, and is considerably more diverse. Since inception it has been predominantly a community of well-funded incomers from many areas of Wales and beyond, permanent and temporary. The vibrant tourist and sporting facilities encourage out-of-town visitors; the residents of the caravan park and hotels more than double the population for much of the year, and additional diversity is created by international staff within the hospitality sector. The dominant language is English.
The main settlement of Gwbert today comprises some 60 residential properties, mostly located on Coronation Drive, Towyn Farm, and Evelyn Terrace, a number of which are not owner-occupied, but are leased out for holiday use. There are approximately 70 residential caravans on the Patch Caravan Park, usable from March to October. There are close to 100 bedrooms within the two main hotels.
Employment in Gwbert is provided by the Cliff Hotel, the Gwbert Hotel, Cardigan Golf Club, and Cardigan Island Farm Park. Many of these workers travel in from nearby areas, notably from Cardigan, which also provides an additional source of employment for Gwbert's small working population.
Facilities
Gwbert has no shop, church or school. The nearest churches are at Y Ferwig, some away, both being built before any development at Gwbert. The nearest shops and schools are in Cardigan.
Gwbert incorporates the adjacent Towyn Burrows (also called Towyn Warren), much of which is now home to Cardigan Golf Club.
There is a very limited bus service which runs primarily to/from Cardigan. The nearest railway station (Cardigan's station closed in 1963) is at Fishguard, some away.
Despite the presence of hotels, and the nearby caravan park and boatyard at Patch, the impact of the tourist industry on the landscape is not great.
Promotion of the "watering hole"
In the 1880s the small inn at Gwbert was known as the "Gwbert Watering Hole". The proposal that Gwbert should be a major seaside resort "to challenge Brighton and Scarborough" was first made in 1886, following the opening of the Whitland and Cardigan Railway to nearby Cardigan, a line which was taken over that same year by the Great Western Railway. In 1888 the local Corporation met regarding the leases of the new proposed Villa residences, and in 1889 The Cardigan & Tivyside Advertiser was reporting on "Cardigan's 'New Brighton'", with Mr C.E.D. Morgan-Richardson, a Cardigan solicitor and businessman, named to head a company to develop the old Gwbert Inn property through the purchase of 96 acres of land, and with capital of £20,000. In addition to the considerable development of the Gwbert Inn, a row of villa boarding houses were to be built along what became Evelyn's Terrace. (Morgan-Richardson was later to become mayor of Cardigan.)
In July 1889 the local paper wrote of Gwbert: "Surrounded on two sides by the sea, its rocky boundaries are fringed by golden sands, conveniently approached, abounding with charming nooks for the privacy of bathing without machines, while the magnificent scenery of the opposite, or Pembrokeshire coast, including its bold rocky headlands, glistening sands, snug homesteads &c., form a picture not easily rivalled." There was even talk of the construction of a landing jetty.
Journalist Ebenezer Rees, writing in 1894, referred to Gwbert as "Cardigan's famous and favourite watering place".
In 1897 a new road to Gwbert was built to open up the area; this road initially ran from the Cliff Hotel to Patch (where Cardigan Boating Club is located) but it was many years before it reached its original intended destination, namely Nant-y-Ferwig Bridge. In construction of the new road, parts of the old road ceased to be used, though it can still be traced. Some eleven of the Carn Meini (Preseli Hills) stones have now been utilised as gateposts on the eastern side of the old road, three south of the Gwbert road, and eight to the north. Seven others can be seen straddling a lane leading to Stepside Farm.
Kelly's Directory of South Wales (1895) stated: "Gwbert, a small place on the coast in this parish, on the east side of the estuary of the Teifi, is now rising into favour as a watering place." The adjacent Cardigan & Tivyside Golf Club opened in this year.
In The Rivers of Great Britain (1897), Charles Edwardes wrote: "If you wish to see Teifi, or Tivy, quite to its end, it is worth while to go north another three miles, to Gwbert-on-the-Sea, a distinctly primitive and pleasing watering-place, facing Kemmaes Head, with the mile and a half of Teifi's mouth (at its widest) intervening."
In Walks and Wanderings in County Cardigan (1902), E.R.H. Turner described Gwbert as "a spot on the coast marked by a hotel and a few villas, but sufficiently near to Cardigan to be a favourite pleasure resort." The article continued: "It stands at the mouth of the Teivi estuary on the top of the most romantic cliffs and coves. There are many nooks for bathing, but the possibilities of the place are by no means developed. A new road has been formed across the dunes and along the Teivi shore back to Cardigan town, and possesses the advantage of charming views of the Pembrokeshire hills and cliffs."
The following year the local newspaper reported on the progress of Gwbert as a residential centre, reporting again in 1906 on the "bright look to the development of the resort". In 1910 it carried an article entitled "Gwbert on Sea, where is it and what is it?"
The Encyclopædia Britannica of 1911 also acknowledged the growth: "In modern times several small watering-places have sprung up on the coast, notably at Borth, New Quay, Tresaith, Aberporth and Gwbert."
Growth, whilst clearly recognised, was limited, and The English Illustrated Magazine (vol 39, 1908) wrote "Amongst these [places worthy of attention] may be mentioned Gwbert-on-Sea—where satisfactory bathing is to be obtained. Perched on the brown cliffs which domionate the dancing waves, the little village has, up till now, almost remained undiscovered."
Despite, however, the developers' ambitious plans for growth, along with much publicity and promotion in journals and books of the period, a lack of appropriate accommodation and a derth of facilities meant that relatively little came about, and Gwbert never grew to be anything larger than a very minor resort.
In 1911 Gwbert held grand pre-Coronation festivities for King George V.
The Cliff Hotel
Central to the Gwbert development plan was the extension to the old Gwbert Inn, opened in July 1890 by Mrs Evelyn Morgan-Richardson, wife of the developer. As a present for performing this ceremony she was presented with a "massive silver key" supplied by a Cardigan jeweller. The status of the inn was raised to that of a hotel, at this time being known as the Gwbert Hotel. A promotional book, published by the Great Western Railway in 1907, declared "The Gwbert Hotel, the only one, is situate in its own grounds of 101 acres on the lofty cliffs by the mouth of the river Teifi, facing the Atlantic. An ideal spot for those who seek complete rest, bracing air, and country life with all its glorious advantages." However, in May 1906 the hotel was totally destroyed by fire.
After rebuilding and considerable extension it re-opened in April 1909 as the new Cliff Hotel (the name "Gwbert Hotel" being later used by another hotel), and the golf links was set out to additionally attract visitors. (The Cardigan and Tivyside Golf Club on the adjacent burrows had "died a natural death" by this time, through lack of patronage.) Early publicity postcards from the hotel proclaimed: "The Bishop of Bangor writes of Gwbert—'This is one of the most charming spots I ever visited.'"
The Cliff Hotel was sold to new owners in April 1913, and more recently it has again been extended and refurbished with the addition of more rooms and a new spa and leisure complex.
The coastline
The coastline around Gwbert is part of Ceredigion Heritage Coast, a protected area running from Gwbert northwards to Aberystwyth. It has been designated a Special Area of Conservation.
The Ceredigion Coast Path at this point runs northwards through Patch and Gwbert, on towards and beyond Mwnt, but it does not follow the coastline itself. The official route currently runs eastwards to Y Ferwig, thence northwards to the coastline at Mwnt. An alternative route, heading north from Cardigan Island Farm Park to reach the coastline much sooner, is currently under dispute, with alleged dangerous cliff sections. South of Gwbert, at St Dogmaels, the Coast Path links to the Pembrokeshire Coast Path.
The sandy area of Towyn Burrows, which comprises much of Gwbert, was caused by strong onshore winds following the last ice age, which left deposits of Irish Sea glacial till, now overshadowed by the extensive dunes.
Gwbert beach (at Patch, south of the hamlet) is the nearest beach to Cardigan, is south-west facing, and is sandy. Despite early 20th-century promotion, the tide here can drastically change the shape of the beach, and swimming can be dangerous. Rather than a family beach, it has a reputation for sailing, sea-fishing and extreme sports.
Although Gwbert hamlet has a cliff-top location, it is possible to get down to the sea by Craig-y-Gwbert, below the Cliff Hotel. Steps cut into the rock allow access to Cowley beach and a neighbouring enclosed small bay.
There are also accessible beaches below the Cliff Hotel with steps leading down one beach, known to locals as Evelyn's Beach, presumably after Mrs Morgan Richards. There is also a sandy cove, again known locally as Morgan's Beach, and below the hotel are Flat Rock and The Point.
In 1977 concerns were expressed about erosion along the coastline between Cardigan and Gwbert, notably at Patch, where the road was only from the top of the eroding boulder clay cliffs. In the early 1990s, following further erosion at Pen-Yr-Ergyd, remedial work was undertaken, whereby six groynes consisting of rock mounds were constructed. The scheme cost Ceredigion County Council some £151,000, half of this coming from the European Regional Development Fund.
The coastline around Gwbert is rugged—particularly from Patch headland northward—and in 1922 the trawler Princess Mary was lost on the coast here. A decade later, in 1934, the 7,000-ton liner Herefordshire ran aground on Cardigan Island while being towed to the breaker's yard; the four men aboard were rescued through the use of rocket life-saving equipment that was kept at Gwbert.
Today on the cliff edge there is a Coastguard lookout post, part of the Maritime and Coastguard Agency Emergency Response. The original station was formed in 1878 (there was another on the other side of the estuary, at Penrhyn Castle) and comprised a building 20 ft long, 12 ft wide and 9 ft high. The rescue teams were under the control of coastguards, and were made up of local volunteers. Known as Board of Trade Rocket Life Saving Apparatus Stations (and marked on maps as "Rocket Stations"), each was equipped with ropes, lifebelts, rockets and buoys, and the equipment was carried in a horse-drawn waggon.
Today an RNLI lifeboat operates from nearby Poppit Sands, the centre being visible across the estuary from Gwbert.
Teifi Boating Club (Clwb Cychod Teifi) is based at The Patch, Gwbert, on the estuary road towards Cardigan.
Wildlife
The coastal landscape at Gwbert is home to a great variety of sea-life, birds, butterflies and wild flowers.
Bottlenose dolphins and porpoises can often be seen swimming in the bay, as can grey seals from the neighbouring Cardigan Island colony. Cardigan Bay has a resident population of over 100 bottlenose dolphins (some estimates exceed 200), which are most frequently seen off southern Ceredigion between Gwbert and Aberaeron. (This is Europe's largest resident population of bottlenose dolphins, the UK's only other one being in the Moray Firth, Scotland.)
Seals also live in the network of caves below Gwbert's Cardigan Island Coastal Farm Park, where they can often be seen basking on the rocks, notably on Carreg Lydan (Wide Rock).
In recent years visiting basking sharks, sun fish, and even orcas, minke and humpback whales have been spotted. In September 1979 a 24-foot whale was found washed up dead at the foot of the rocks by Clunyrynys Farm, Gwbert. On inspection of the carcass, a scientific officer found a rare 15-spined sea stickleback feeding on it.
Choughs live in holes in the cliffs, and the coast at Gwbert is also home to gannet, razorbill, guillemot, Manx shearwater, black-headed gull and fulmar. On the land other frequently spotted birds are birds of prey such as red kite, buzzard, peregrine falcon, kestrels and sparrowhawks. Skylarks are also a regular sight.
At low tide a variety of wading birds can be seen in the estuary.
During the summer months of June to September many hundreds of Canada geese can daily be seen heading northwards over Gwbert towards the Dyfi estuary marshes, returning each evening. These feral geese reside in the Teifi estuary and valley up as far as Newcastle Emlyn. They also graze on Cardigan Island, and the pond at Gwbert's Cardigan Island Farm Park also attracts geese (the farm has three tame geese) where, on some days, there will be a flock of over 100 Canada geese. Wild shelducks, teal and mallard also nest at the farm.
Boat trips to see the wildlife off the Gwbert coast run from the Teifi Boating Club jetty at Gwbert, as well as from Poppit Sands, and Cardigan.
Climate
As with the rest of the British Isles, Gwbert experiences a maritime climate with cool summers and mild winters. The nearest official Met Office weather station for which online records are available is at Aberporth, which is ENE of Gwbert, and has a similar coastal aspect.
Typically, less than three days of the year will reach or above, the warmest of which should rise to The highest temperature recorded was in July 2006. On average 18.3 nights will report air frost and the coldest night of the year should fall to . The lowest-recorded temperature was , during January 1963.
Rainfall averages around 870 mm a year, with at least 1 mm falling on 143.5 days.
A detailed daily weather forecast for Gwbert, including sea temperature, can be found here .
Historical remains
Craig y Gwbert, on the cliff edge near the Cliff Hotel, comprises the remains of a well-defended coastal promontory Iron Age fort, but no associated field systems have been found. It is only accessible via a narrow neck of land, and defended by a substantial earthen bank, measuring 2.5 m in height and 40 m in length. The entrance is a small gap through this bank. Today there are remains of lime pits within this area, together with a Grade 2 listed lime kiln, and the Cliff Hotel's nine-hole golf course makes use of the promontory.
In the mid-1970s a sand-covered medieval rubbish pit (3 m diameter and 1.5 m deep) was excavated in the eroding cliff-section in Coronation Drive, south-west of the present village of Gwbert. Some medieval leather shoes were recovered, as were 75 items of pottery, which has given its name to "Gwbert Ware", a variation of Dyfed Gravel-Tempered Ware, this being very gravelly without much glaze. Examples of these 13th-century pieces can be seen in Cardigan Heritage Centre. Images are available online. Other finds in the pit included animal bones including an ox scapula and a stone axe found in the loose. Excavation also revealed earlier plough soil and cattle hoof prints under the sand.
Notable residents
The Rev. Caleb Morris (1800–1865), a native of Pembrokeshire who was educated at Cardigan, then moved to London in 1838 as an ordained minister, where he acquired a reputation as an eloquent and powerful speaker, and one of the leading lights of the London pulpit. During periods of physical weakness he would return to Wales to recover, but continued ill health forced him to retire early. He lived the last year of his life at Gwbert, where he died at The Lodge on 26 July 1865.
Gallery
See also
Cubert, a village in Cornwall also associated with the saint
Notes
References
External links
www.geograph.co.uk : photos of Gwbert and surrounding area
Gallery of old Gwbert photos from Ceredigion County Council
Cardigan Island Coastal Farm Park
Towyn Burrows and Gwbert
Panoramic view from the cliff path at Gwbert
Forces of Nature – Gwbert beach guide
Teifi Marshes Nature Reserve
Old Francis Frith photos of Gwbert
Beaches of Ceredigion
Coast of Ceredigion
Communities in Ceredigion
Villages in Ceredigion
|
Andrei Chubsa (; born 29 November 1982) is a Belarusian high jumper.
He won the bronze medal at the 1999 World Youth Championships, finished sixth at the 2000 World Junior Championships and tenth at the 2001 IAAF World Indoor Championships, and won the gold medal at the 2001 European Junior Championships.
His personal best jump is 2.32 metres, achieved in July 2002 in Stockholm.
References
1982 births
Living people
Belarusian male high jumpers
|
```java
/*
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package org.apache.arrow.flight.auth2;
import com.google.common.base.Strings;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import io.grpc.Metadata;
import java.nio.ByteBuffer;
import java.util.Base64;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import org.apache.arrow.flight.CallHeaders;
import org.apache.arrow.flight.CallStatus;
import org.apache.arrow.flight.grpc.MetadataAdapter;
/** Generates and caches bearer tokens from user credentials. */
public class GeneratedBearerTokenAuthenticator extends BearerTokenAuthenticator {
private final Cache<String, String> bearerToIdentityCache;
/**
* Generate bearer tokens for the given basic call authenticator.
*
* @param authenticator The authenticator to initial validate inputs with.
*/
public GeneratedBearerTokenAuthenticator(CallHeaderAuthenticator authenticator) {
this(authenticator, CacheBuilder.newBuilder().expireAfterAccess(2, TimeUnit.HOURS));
}
/**
* Generate bearer tokens for the given basic call authenticator.
*
* @param authenticator The authenticator to initial validate inputs with.
* @param timeoutMinutes The time before tokens expire after being accessed.
*/
public GeneratedBearerTokenAuthenticator(
CallHeaderAuthenticator authenticator, int timeoutMinutes) {
this(
authenticator,
CacheBuilder.newBuilder().expireAfterAccess(timeoutMinutes, TimeUnit.MINUTES));
}
/**
* Generate bearer tokens for the given basic call authenticator.
*
* @param authenticator The authenticator to initial validate inputs with.
* @param cacheBuilder The configuration of the cache of bearer tokens.
*/
public GeneratedBearerTokenAuthenticator(
CallHeaderAuthenticator authenticator, CacheBuilder<Object, Object> cacheBuilder) {
super(authenticator);
bearerToIdentityCache = cacheBuilder.build();
}
@Override
protected AuthResult validateBearer(String bearerToken) {
final String peerIdentity = bearerToIdentityCache.getIfPresent(bearerToken);
if (peerIdentity == null) {
throw CallStatus.UNAUTHENTICATED.toRuntimeException();
}
return new AuthResult() {
@Override
public String getPeerIdentity() {
return peerIdentity;
}
@Override
public void appendToOutgoingHeaders(CallHeaders outgoingHeaders) {
if (null
== AuthUtilities.getValueFromAuthHeader(
outgoingHeaders, Auth2Constants.BEARER_PREFIX)) {
outgoingHeaders.insert(
Auth2Constants.AUTHORIZATION_HEADER, Auth2Constants.BEARER_PREFIX + bearerToken);
}
}
};
}
@Override
protected AuthResult getAuthResultWithBearerToken(AuthResult authResult) {
// We generate a dummy header and call appendToOutgoingHeaders with it.
// We then inspect the dummy header and parse the bearer token if present in the header
// and generate a new bearer token if a bearer token is not present in the header.
final CallHeaders dummyHeaders = new MetadataAdapter(new Metadata());
authResult.appendToOutgoingHeaders(dummyHeaders);
String bearerToken =
AuthUtilities.getValueFromAuthHeader(dummyHeaders, Auth2Constants.BEARER_PREFIX);
final AuthResult authResultWithBearerToken;
if (Strings.isNullOrEmpty(bearerToken)) {
// Generate a new bearer token and return an AuthResult that can write it.
final UUID uuid = UUID.randomUUID();
final ByteBuffer byteBuffer = ByteBuffer.wrap(new byte[16]);
byteBuffer.putLong(uuid.getMostSignificantBits());
byteBuffer.putLong(uuid.getLeastSignificantBits());
final String newToken = Base64.getEncoder().encodeToString(byteBuffer.array());
bearerToken = newToken;
authResultWithBearerToken =
new AuthResult() {
@Override
public String getPeerIdentity() {
return authResult.getPeerIdentity();
}
@Override
public void appendToOutgoingHeaders(CallHeaders outgoingHeaders) {
authResult.appendToOutgoingHeaders(outgoingHeaders);
outgoingHeaders.insert(
Auth2Constants.AUTHORIZATION_HEADER, Auth2Constants.BEARER_PREFIX + newToken);
}
};
} else {
// Use the bearer token supplied by the original auth result.
authResultWithBearerToken = authResult;
}
bearerToIdentityCache.put(bearerToken, authResult.getPeerIdentity());
return authResultWithBearerToken;
}
}
```
|
Luke Stricklin (born December 21, 1982) is an American country music singer and songwriter. He is from Arkadelphia, Arkansas. He has a single "American by God's Amazing Grace," which he originally wrote and recorded in Baghdad, Iraq with J.R. Schultz. It tells of their experiences fighting in the Iraq War. Stricklin signed with Pacific-Time Records. Luke is a 2001 graduate from Van Buren High School, and attended Arkadelphia Public Schools until his senior year, when his mother, Sheila Harrington and step-father, Patrick Harrington, moved to Van Buren. Luke currently resides in Rudy, Arkansas with his wife, Tommie Sue Stricklin (born March 10, 1990) and daughter.
Discography
Albums
Singles
Music videos
References
1982 births
Living people
People from Van Buren, Arkansas
United States Army soldiers
United States Army personnel of the Iraq War
American country singer-songwriters
People from Arkadelphia, Arkansas
Singer-songwriters from Arkansas
21st-century American singer-songwriters
Country musicians from Arkansas
|
Fernanda Cristina Ferreira (born January 10, 1980), known as Fernandinha, is a retired Brazilian professional volleyball player. She played for the Brazilian national team as a setter. She won a gold medal with the national team at the 2012 Summer Olympics in London, United Kingdom.
Clubs
Pinheiros (1998–2000)
São Caetano (2000–2002)
Paraná Vôlei (2002–2003)
Pinheiros (2003–2005)
Brasil Esporte Club (2005–2006)
Finasa Osasco (2006–2007)
Santeramo Sport (2007–2008)
Busto Arsizio (2008–2010)
Universal Modena (2010–2012)
Igtisadchi Baku (2012)
Vôlei Amil Campinas (2012–2013)
Hinode Barueri (2013–2014)
Pavia Volley (2014–2015)
Nantes Volley-Ball (2015–2017)
Clube Curitibano (2017–2018)
Awards
Clubs
2006–07 Brazilian Superliga – Runner-up, with Finasa Osasco
2006-07 - Brazilian Superliga
2007 - Brazilian Cup
2006 - Paulista championship
2005 - Open Games of the Interior of São Paulo
2005 - Sao Paulo Regional Games
2009–10 CEV Cup – Champion, with Yamamay Busto Arsizio
Individual
Best setter and best server salompa’s cup 2003
MVP Bruna Forte Tournament 2007
References
External links
1980 births
Brazilian women's volleyball players
Living people
Olympic volleyball players for Brazil
Volleyball players at the 2012 Summer Olympics
Olympic gold medalists for Brazil
Olympic medalists in volleyball
Medalists at the 2012 Summer Olympics
Setters (volleyball)
Volleyball players from Rio de Janeiro (city)
Brazilian expatriate sportspeople in Italy
Brazilian expatriate sportspeople in France
Brazilian expatriate sportspeople in Azerbaijan
Brazilian expatriate volleyball players
Expatriate volleyball players in Azerbaijan
Expatriate volleyball players in France
Expatriate volleyball players in Italy
|
```shell
#!/bin/bash
set -e
myDir="$(dirname "$0")"
source "$myDir/buildUtils.sh"
build_packages "${allPackages[@]}"
```
|
```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.
*/
package org.codehaus.commons.compiler.tests;
import java.util.Collection;
import org.codehaus.commons.compiler.ICompilerFactory;
import org.codehaus.commons.compiler.IExpressionEvaluator;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import util.CommonsCompilerTestSuite;
import util.TestUtil;
@RunWith(Parameterized.class) public
class BaseClassTest extends CommonsCompilerTestSuite {
public
BaseClassTest(ICompilerFactory compilerFactory) { super(compilerFactory); }
@Parameters(name = "CompilerFactory={0}") public static Collection<Object[]>
compilerFactories() throws Exception { return TestUtil.getCompilerFactoriesForParameters(); }
public static
class BaseClass {
public int a, b;
}
@Test public void
testNewInstance() throws Exception {
IExpressionEvaluator ee = this.compilerFactory.newExpressionEvaluator();
ee.setExtendedClass(BaseClass.class);
ee.setStaticMethod(false);
ee.cook("a + b");
BaseClass instance = (BaseClass) ee.getMethod().getDeclaringClass().newInstance();
instance.a = 7;
instance.b = 8;
Object result = ee.getMethod().invoke(instance);
Assert.assertEquals(15, result);
}
}
```
|
```rust
use crate::qapubsub::market_mq::{MarketMQ, Start, Subscribe};
use crate::qaruntime::base::{MQAddr, MarketSubscribe, ShowAllMQ};
use actix::prelude::*;
use actix::{Actor, Addr, Context, Handler, Recipient};
use log::{error, info, warn};
use std::collections::HashMap;
// mq
pub struct MQManager {
pub mq_pool: HashMap<String, Addr<MarketMQ>>,
pub connect_num: usize,
}
impl MQManager {
pub fn new(connect_num: usize) -> Self {
Self {
mq_pool: HashMap::new(),
connect_num,
}
}
}
impl Actor for MQManager {
type Context = Context<Self>;
fn started(&mut self, ctx: &mut Self::Context) {
ctx.set_mailbox_capacity(1000); //
info!("[MarketMQ Manager] started.");
}
}
// mqaddrMQM
impl Handler<MQAddr> for MQManager {
type Result = ();
fn handle(&mut self, msg: MQAddr, ctx: &mut Self::Context) -> Self::Result {
self.mq_pool.insert(msg.key, msg.addr);
}
}
impl Handler<ShowAllMQ> for MQManager {
type Result = ();
fn handle(&mut self, msg: ShowAllMQ, ctx: &mut Self::Context) -> Self::Result {
info!("MarketMQ routing_key: {:#?}", self.mq_pool.keys());
}
}
//
impl Handler<MarketSubscribe> for MQManager {
type Result = ();
fn handle(&mut self, msg: MarketSubscribe, ctx: &mut Self::Context) -> Self::Result {
match self.mq_pool.get(msg.key.as_str()) {
Some(mq) => match mq.try_send(Subscribe(msg.rec)) {
Ok(_) => {
self.connect_num -= 1;
info!(
"[{}] add new Subscriber; {} not yet",
msg.key, self.connect_num
);
if self.connect_num == 0 {
info!("MarketMQ routing_key: {:#?}", self.mq_pool.keys());
for (k, mq) in self.mq_pool.iter() {
match mq.try_send(Start) {
Err(e) => error!("[{}] start fail {:?}", k, e.to_string()),
_ => {}
}
}
}
}
Err(e) => error!("[{}] subscribe fail {}", msg.key, e.to_string()),
},
None => {}
}
}
}
```
|
Hope Cove Life Boat (based in Hope Cove, Devon) was formed in 1878 and is a voluntary search and rescue service that operates an inshore rescue boat in the Bigbury Bay area.
History
In 1878 The Royal National Lifeboat Institution established a lifeboat station at Hope Cove provided by The Freemasons of England. The land for the boat house was donated by the Earl of Devon. Replacement boats were supplied in 1887, 1900 and 1903 and all four lifeboats were named Alexandra. The station was closed in April 1930 by which time the neighbouring station at had been equipped with a motor lifeboat which could cover Bigbury Bay.
From 1992 a rescue boat was based in Inner Hope and manned by volunteers under the management of the Maritime and Coastguard Agency (MCA) as part of the Cliff Rescue Team (CRT). The decision was made in 2010 that the MCA would no longer maintain any rescue boats in the UK.
Current operation
The Under Secretary for Transport recognised the ongoing need for this sea rescue facility in Bigbury Bay and gave the village the opportunity to run an independent lifeboat. A public meeting was held in the village and unanimous support given to form a limited company and registered charity to achieve this. The Hope Cove Life Boat became the 63rd Independent lifeboat service in the UK and has since worked with the MCA and the RNLI to continue to meet their goal of protecting and preserving life in Bigbury Bay.
It is a company limited by guarantee, number 07456004, and registered charity number 1140126.
The 6.4m Rigid-hulled inflatable boat (RIB) "Alexandra" built by Ribcraft of Yeovil was blessed by the Bishop of Plymouth on 31 March 2013 and entered service 1 April 2013.
Neighbouring Station Locations
See also
Independent lifeboats in Britain and Ireland
References
Lifeboat stations in Devon
Organisations based in Devon
Independent Lifeboat stations
South Huish
|
```xml
<project xmlns="path_to_url" xmlns:xsi="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<parent>
<groupId>com.ctrip.framework</groupId>
<artifactId>framework-parent</artifactId>
<version>1.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ctrip.framework.xpipe</groupId>
<artifactId>xpipe-parent</artifactId>
<version>1.2.15</version>
<packaging>pom</packaging>
<!-- trigger cache-->
<properties>
<commons-io.version>2.4</commons-io.version>
<curator.version>5.7.0</curator.version>
<zookeeper.version>3.8.2</zookeeper.version>
<maven-jar-plugin.version>2.6</maven-jar-plugin.version>
<maven-assembly-plugin.version>2.6</maven-assembly-plugin.version>
<maven-source-plugin.version>3.0.0</maven-source-plugin.version>
<coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
<jersey.version>2.19</jersey.version>
<commons-exec.version>1.3</commons-exec.version>
<unidal.test.version>3.1.4</unidal.test.version>
<unidal.foundation.version>3.1.4</unidal.foundation.version>
<unidal.jdbc.version>3.1.4</unidal.jdbc.version>
<unidal.codegen.version>2.5.8</unidal.codegen.version>
<unidal.plexus.version>2.5.8</unidal.plexus.version>
<commons-pool.version>2.3</commons-pool.version>
<commons-lang3.version>3.4</commons-lang3.version>
<commons-httpclient.version>4.5.2</commons-httpclient.version>
<spring-boot.version>2.3.12.RELEASE</spring-boot.version>
<spring-boot-test.version>2.3.12.RELEASE</spring-boot-test.version>
<spring.version>5.2.20.RELEASE</spring.version>
<spring-core.version>5.2.20.RELEASE</spring-core.version>
<spring-boot-maven-plugin.version>2.3.12.RELEASE</spring-boot-maven-plugin.version>
<spring.velocity.version>1.4.3.RELEASE</spring.velocity.version>
<netty3.version>3.10.5.Final</netty3.version>
<ctrip-framework-foundation.version>1.8.18</ctrip-framework-foundation.version>
<ctrip-apollo.version>0.6.7</ctrip-apollo.version>
<cat.version>3.3.32</cat.version>
<pyrolite.version>4.9</pyrolite.version>
<plexus-utils.version>3.1.0</plexus-utils.version>
<git-commit-id-plugin.version>2.2.3</git-commit-id-plugin.version>
<log4j2.version>2.17.1</log4j2.version>
<disruptor.version>3.3.6</disruptor.version>
<dnsjava.version>2.1.6</dnsjava.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tomcat.version>8.0.33</tomcat.version>
<okhttp3.version>3.12.0</okhttp3.version>
<influxdb.version>2.7</influxdb.version>
<hickwall.client.version>1.10-SNAPSHOT</hickwall.client.version>
<clogging.version>4.9.0</clogging.version>
<credis.version>4.4.1-unstable-SNAPSHOT</credis.version>
<qconfig.sso.version>1.0.7-SNAPSHOT</qconfig.sso.version>
<qunaer.common.version>9.2.37</qunaer.common.version>
<qconfig.client.version>1.100.59-ctrip</qconfig.client.version>
<qtracer.version>1.2.4</qtracer.version>
<netty.boringssl.version>2.0.61.Final</netty.boringssl.version>
<netty4.version>4.1.28.Final</netty4.version>
<zstd.version>1.3.6-1</zstd.version>
<jackson.version>2.10.3</jackson.version>
<jedis.version>2.8.1.4-ctrip</jedis.version>
<soa.version>2.21.17</soa.version>
<sso.version>0.1.3</sso.version>
<vi.version>0.11.49</vi.version>
<dal.version>2.4.50</dal.version>
<ucs.version>0.7.0</ucs.version>
<artemis.version>1.9.6</artemis.version>
<caravan.version>1.17.13</caravan.version>
<velocity.version>1.7</velocity.version>
<lettuce.version>3.2.Final</lettuce.version>
<commons-collections.version>3.2.2</commons-collections.version>
<commons-digester.version>2.1</commons-digester.version>
<h2.version>1.4.191</h2.version>
<asm.version>5.2</asm.version>
<mockwebserver.version>3.12.0</mockwebserver.version>
<mysql-connector.version>5.1.48</mysql-connector.version>
<javassist.version>3.20.0-GA</javassist.version>
<joda-time.version>2.9</joda-time.version>
</properties>
<modules>
<module>core</module>
<module>redis</module>
<module>services</module>
</modules>
<dependencyManagement>
<dependencies>
<!-- jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-protobuf</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.infosec</groupId>
<artifactId>sso-client-new</artifactId>
<version>${sso.version}</version>
</dependency>
<dependency>
<groupId>qunar.common</groupId>
<artifactId>common-core</artifactId>
<version>${qunaer.common.version}</version>
</dependency>
<dependency>
<groupId>qunar.common</groupId>
<artifactId>common-api</artifactId>
<version>${qunaer.common.version}</version>
</dependency>
<dependency>
<groupId>qunar.common</groupId>
<artifactId>common-concurrent</artifactId>
<version>${qunaer.common.version}</version>
</dependency>
<dependency>
<groupId>qunar.common</groupId>
<artifactId>common-core</artifactId>
<version>${qunaer.common.version}</version>
</dependency>
<dependency>
<groupId>qunar.tc.qconfig</groupId>
<artifactId>qconfig-client</artifactId>
<version>${qconfig.client.version}</version>
<exclusions>
<exclusion>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>qunar.tc.qtracer</groupId>
<artifactId>qtracer-client</artifactId>
<version>${qtracer.version}</version>
</dependency>
<dependency>
<groupId>qunar.tc.qtracer</groupId>
<artifactId>qtracer-common</artifactId>
<version>${qtracer.version}</version>
</dependency>
<dependency>
<groupId>qunar.tc.qtracer</groupId>
<artifactId>qtracer-instrument-agent</artifactId>
<version>${qtracer.version}</version>
</dependency>
<dependency>
<groupId>qunar.tc.qtracer</groupId>
<artifactId>qtracer-instrument-http</artifactId>
<version>${qtracer.version}</version>
</dependency>
<dependency>
<groupId>qunar.tc.qtracer</groupId>
<artifactId>qtracer-instrument-annotation</artifactId>
<version>${qtracer.version}</version>
</dependency>
<dependency>
<groupId>qunar.tc.qtracer</groupId>
<artifactId>qtracer-instrument-lib</artifactId>
<version>${qtracer.version}</version>
</dependency>
<dependency>
<groupId>qunar.tc.qtracer</groupId>
<artifactId>qtracer-instrument-asm</artifactId>
<version>${qtracer.version}</version>
</dependency>
<dependency>
<groupId>org.unidal.framework</groupId>
<artifactId>foundation-service</artifactId>
<version>${unidal.foundation.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-client</artifactId>
<version>${ctrip-apollo.version}</version>
</dependency>
<!-- xpipe related -->
<dependency>
<groupId>com.ctrip.framework.xpipe</groupId>
<artifactId>core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework.xpipe.redis</groupId>
<artifactId>redis-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework.xpipe.redis</groupId>
<artifactId>redis-keeper</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework.xpipe.redis</groupId>
<artifactId>redis-meta</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework.xpipe.redis</groupId>
<artifactId>redis-proxy</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework.xpipe.redis</groupId>
<artifactId>redis-console</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework.xpipe</groupId>
<artifactId>core</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ctrip.framework.xpipe.redis</groupId>
<artifactId>redis-core</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ctrip.framework.xpipe.redis</groupId>
<artifactId>redis-meta</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ctrip.framework.xpipe</groupId>
<artifactId>ctrip-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework.xpipe</groupId>
<artifactId>local-service</artifactId>
<version>${project.version}</version>
</dependency>
<!-- xpipe related -->
<!-- ctrip related -->
<dependency>
<groupId>com.ctrip.framework</groupId>
<artifactId>framework-foundation</artifactId>
<version>${ctrip-framework-foundation.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework.clogging</groupId>
<artifactId>clogging-agent</artifactId>
<version>${clogging.version}</version>
<exclusions>
<exclusion>
<groupId>com.ctrip.framework</groupId>
<artifactId>vi</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.ctrip.hickwall</groupId>
<artifactId>client</artifactId>
<version>${hickwall.client.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
<exclusion>
<groupId>com.ctrip.framework</groupId>
<artifactId>vi</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.ctrip.credis</groupId>
<artifactId>credis</artifactId>
<version>${credis.version}</version>
<exclusions>
<exclusion>
<groupId>qunar.tc.qconfig</groupId>
<artifactId>qconfig-client</artifactId>
</exclusion>
<exclusion>
<groupId>qunar.tc.qconfig</groupId>
<artifactId>qconfig-common</artifactId>
</exclusion>
<exclusion>
<groupId>com.ctrip.ops</groupId>
<artifactId>hickwall-sdk</artifactId>
</exclusion>
<exclusion>
<groupId>qunar.common</groupId>
<artifactId>common-core</artifactId>
</exclusion>
<exclusion>
<groupId>qunar.common</groupId>
<artifactId>common-lang</artifactId>
</exclusion>
<exclusion>
<groupId>qunar.tc</groupId>
<artifactId>common-zookeeper</artifactId>
</exclusion>
<exclusion>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>dnsjava</groupId>
<artifactId>dnsjava</artifactId>
<version>${dnsjava.version}</version>
</dependency>
<dependency>
<groupId>net.razorvine</groupId>
<artifactId>pyrolite</artifactId>
<version>${pyrolite.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${commons-httpclient.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>${curator.version}</version>
<exclusions>
<exclusion>
<artifactId>org.slf4j</artifactId>
<groupId>slf4j-api</groupId>
</exclusion>
<exclusion>
<artifactId>log4j</artifactId>
<groupId>log4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>${zookeeper.version}</version>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-exec</artifactId>
<version>${commons-exec.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>${commons-pool.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<version>${spring-boot.version}</version>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-codec-socks</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-unix-common</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-handler-proxy</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http2</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-velocity</artifactId>
<version>${spring.velocity.version}</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>${velocity.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<version>${spring-boot.version}</version>
<exclusions>
<exclusion>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring-boot.version}</version>
<exclusions>
<exclusion>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring-boot.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</exclusion>
<!-- conflict with spring webflux -->
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jcl</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring-boot.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-logging-juli</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
<version>${disruptor.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-web</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.influxdb</groupId>
<artifactId>influxdb-java</artifactId>
<version>${influxdb.version}</version>
<exclusions>
<exclusion>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
</exclusion>
<exclusion>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
</exclusion>
<exclusion>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>retrofit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>${okhttp3.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>${netty3.version}</version>
</dependency>
<!--netty ssl handler!-->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>${netty4.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>${netty.boringssl.version}</version>
</dependency>
<dependency>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
<version>${zstd.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector.version}</version>
</dependency>
<!-- ctrip related -->
<dependency>
<groupId>org.unidal.framework</groupId>
<artifactId>dal-jdbc</artifactId>
<version>${unidal.jdbc.version}</version>
</dependency>
<dependency>
<groupId>com.dianping.cat</groupId>
<artifactId>cat-client</artifactId>
<version>${cat.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<!-- unit test -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>${okhttp3.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.unidal.framework</groupId>
<artifactId>test-framework</artifactId>
<version>${unidal.test.version}</version>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>${curator.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>org.slf4j</artifactId>
<groupId>slf4j-api</groupId>
</exclusion>
<exclusion>
<artifactId>log4j</artifactId>
<groupId>log4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.ctriposs.baiji</groupId>
<artifactId>baiji-core</artifactId>
<version>${soa.version}</version>
</dependency>
<dependency>
<groupId>com.ctriposs.baiji</groupId>
<artifactId>baiji-rpc-common</artifactId>
<version>${soa.version}</version>
</dependency>
<dependency>
<groupId>com.ctriposs.baiji</groupId>
<artifactId>baiji-rpc-client</artifactId>
<version>${soa.version}</version>
</dependency>
<dependency>
<groupId>com.ctriposs.baiji</groupId>
<artifactId>baiji-rpc-server</artifactId>
<version>${soa.version}</version>
<exclusions>
<exclusion>
<groupId>com.ctrip.framework</groupId>
<artifactId>vi</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.ctriposs.baiji</groupId>
<artifactId>baiji-rpc-mobile-request-filter</artifactId>
<version>${soa.version}</version>
</dependency>
<dependency>
<groupId>com.ctriposs.baiji</groupId>
<artifactId>baiji-rpc-formatter-protobuf</artifactId>
<version>${soa.version}</version>
</dependency>
<dependency>
<groupId>com.ctriposs.baiji</groupId>
<artifactId>baiji-rpc-extensions</artifactId>
<version>${soa.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework</groupId>
<artifactId>vi</artifactId>
<version>${vi.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework</groupId>
<artifactId>vi-core</artifactId>
<version>${vi.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.platform</groupId>
<artifactId>ctrip-datasource</artifactId>
<version>${dal.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.platform</groupId>
<artifactId>ctrip-dal-client</artifactId>
<version>${dal.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework.fx</groupId>
<artifactId>ucs-client</artifactId>
<version>${ucs.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.soa.artemis</groupId>
<artifactId>artemis-client</artifactId>
<version>${artemis.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.soa.artemis</groupId>
<artifactId>artemis-client-ctrip</artifactId>
<version>${artemis.version}</version>
<exclusions>
<exclusion>
<groupId>com.ctrip.framework</groupId>
<artifactId>vi-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.ctrip.soa.caravan</groupId>
<artifactId>caravan-protobuf</artifactId>
<version>${caravan.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.soa.caravan</groupId>
<artifactId>caravan-ctrip</artifactId>
<version>${caravan.version}</version>
<exclusions>
<exclusion>
<groupId>com.ctrip.framework</groupId>
<artifactId>vi-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.ctrip.soa.caravan</groupId>
<artifactId>caravan-util</artifactId>
<version>${caravan.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.soa.caravan</groupId>
<artifactId>caravan-configuration</artifactId>
<version>${caravan.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.soa.caravan</groupId>
<artifactId>caravan-ribbon</artifactId>
<version>${caravan.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.soa.caravan</groupId>
<artifactId>caravan-common</artifactId>
<version>${caravan.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.soa.caravan</groupId>
<artifactId>caravan-hystrix</artifactId>
<version>${caravan.version}</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<exclusions>
<exclusion>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>${velocity.version}</version>
</dependency>
<dependency>
<groupId>biz.paluch.redis</groupId>
<artifactId>lettuce</artifactId>
<version>${lettuce.version}</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>${commons-collections.version}</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>${commons-digester.version}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>${mockwebserver.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>${javassist.version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${joda-time.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<!--For ctrip CI/CD-->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/assembly/assembly-descriptor.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<executions>
<execution>
<configuration>
<skipIfEmpty>true</skipIfEmpty>
</configuration>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.unidal.maven.plugins</groupId>
<artifactId>codegen-maven-plugin</artifactId>
<version>${unidal.codegen.version}</version>
</plugin>
<plugin>
<groupId>org.unidal.maven.plugins</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<version>${unidal.plexus.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<destFile>target/jacoco.exec</destFile>
<dataFile>target/jacoco.exec</dataFile>
<outputDirectory>target/jacoco</outputDirectory>
</configuration>
<executions>
<!-- Prepares the property pointing to the JaCoCo runtime agent
which is passed as VM argument when Maven the Surefire plugin is executed. -->
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<!-- Ensures that the code coverage report is created after
all tests have been run. -->
<execution>
<id>generate-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>${git-commit-id-plugin.version}</version>
<configuration>
<verbose>false</verbose>
<dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
</dependency>
<dependency>
<groupId>com.dianping.cat</groupId>
<artifactId>cat-client</artifactId>
</dependency>
<dependency>
<groupId>com.ctrip.framework</groupId>
<artifactId>framework-foundation</artifactId>
</dependency>
<!-- test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-web</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>travis</id>
<activation>
<property>
<name>env.TRAVIS</name>
<value>true</value>
</property>
</activation>
<properties>
<cobertura.version>2.1.1</cobertura.version>
</properties>
<dependencies>
<dependency>
<groupId>net.sourceforge.cobertura</groupId>
<artifactId>cobertura</artifactId>
<version>${cobertura.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>${cobertura-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>net.sourceforge.cobertura</groupId>
<artifactId>cobertura</artifactId>
<version>${cobertura.version}</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<configuration>
<format>xml</format>
<maxmem>256m</maxmem>
<aggregate>true</aggregate>
</configuration>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>${coveralls-maven-plugin.version}</version>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>central</id>
<url>path_to_url
</repository>
<repository>
<id>unidal</id>
<url>path_to_url
<releases>
<checksumPolicy>ignore</checksumPolicy>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>path_to_url
</pluginRepository>
<pluginRepository>
<id>unidal</id>
<url>path_to_url
<releases>
<checksumPolicy>ignore</checksumPolicy>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<distributionManagement>
<repository>
<id>releases</id>
<url>
path_to_url
</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>
path_to_url
</url>
</snapshotRepository>
</distributionManagement>
</project>
```
|
```go
// Code generated by test DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package example
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"replace-on-change/example/internal"
)
type NoRecursive struct {
pulumi.CustomResourceState
Rec RecPtrOutput `pulumi:"rec"`
ReplaceMe pulumi.StringPtrOutput `pulumi:"replaceMe"`
}
// NewNoRecursive registers a new resource with the given unique name, arguments, and options.
func NewNoRecursive(ctx *pulumi.Context,
name string, args *NoRecursiveArgs, opts ...pulumi.ResourceOption) (*NoRecursive, error) {
if args == nil {
args = &NoRecursiveArgs{}
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"replaceMe",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource NoRecursive
err := ctx.RegisterResource("example::NoRecursive", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNoRecursive gets an existing NoRecursive resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetNoRecursive(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NoRecursiveState, opts ...pulumi.ResourceOption) (*NoRecursive, error) {
var resource NoRecursive
err := ctx.ReadResource("example::NoRecursive", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NoRecursive resources.
type noRecursiveState struct {
}
type NoRecursiveState struct {
}
func (NoRecursiveState) ElementType() reflect.Type {
return reflect.TypeOf((*noRecursiveState)(nil)).Elem()
}
type noRecursiveArgs struct {
}
// The set of arguments for constructing a NoRecursive resource.
type NoRecursiveArgs struct {
}
func (NoRecursiveArgs) ElementType() reflect.Type {
return reflect.TypeOf((*noRecursiveArgs)(nil)).Elem()
}
type NoRecursiveInput interface {
pulumi.Input
ToNoRecursiveOutput() NoRecursiveOutput
ToNoRecursiveOutputWithContext(ctx context.Context) NoRecursiveOutput
}
func (*NoRecursive) ElementType() reflect.Type {
return reflect.TypeOf((**NoRecursive)(nil)).Elem()
}
func (i *NoRecursive) ToNoRecursiveOutput() NoRecursiveOutput {
return i.ToNoRecursiveOutputWithContext(context.Background())
}
func (i *NoRecursive) ToNoRecursiveOutputWithContext(ctx context.Context) NoRecursiveOutput {
return pulumi.ToOutputWithContext(ctx, i).(NoRecursiveOutput)
}
// NoRecursiveArrayInput is an input type that accepts NoRecursiveArray and NoRecursiveArrayOutput values.
// You can construct a concrete instance of `NoRecursiveArrayInput` via:
//
// NoRecursiveArray{ NoRecursiveArgs{...} }
type NoRecursiveArrayInput interface {
pulumi.Input
ToNoRecursiveArrayOutput() NoRecursiveArrayOutput
ToNoRecursiveArrayOutputWithContext(context.Context) NoRecursiveArrayOutput
}
type NoRecursiveArray []NoRecursiveInput
func (NoRecursiveArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NoRecursive)(nil)).Elem()
}
func (i NoRecursiveArray) ToNoRecursiveArrayOutput() NoRecursiveArrayOutput {
return i.ToNoRecursiveArrayOutputWithContext(context.Background())
}
func (i NoRecursiveArray) ToNoRecursiveArrayOutputWithContext(ctx context.Context) NoRecursiveArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NoRecursiveArrayOutput)
}
// NoRecursiveMapInput is an input type that accepts NoRecursiveMap and NoRecursiveMapOutput values.
// You can construct a concrete instance of `NoRecursiveMapInput` via:
//
// NoRecursiveMap{ "key": NoRecursiveArgs{...} }
type NoRecursiveMapInput interface {
pulumi.Input
ToNoRecursiveMapOutput() NoRecursiveMapOutput
ToNoRecursiveMapOutputWithContext(context.Context) NoRecursiveMapOutput
}
type NoRecursiveMap map[string]NoRecursiveInput
func (NoRecursiveMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NoRecursive)(nil)).Elem()
}
func (i NoRecursiveMap) ToNoRecursiveMapOutput() NoRecursiveMapOutput {
return i.ToNoRecursiveMapOutputWithContext(context.Background())
}
func (i NoRecursiveMap) ToNoRecursiveMapOutputWithContext(ctx context.Context) NoRecursiveMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NoRecursiveMapOutput)
}
type NoRecursiveOutput struct{ *pulumi.OutputState }
func (NoRecursiveOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NoRecursive)(nil)).Elem()
}
func (o NoRecursiveOutput) ToNoRecursiveOutput() NoRecursiveOutput {
return o
}
func (o NoRecursiveOutput) ToNoRecursiveOutputWithContext(ctx context.Context) NoRecursiveOutput {
return o
}
func (o NoRecursiveOutput) Rec() RecPtrOutput {
return o.ApplyT(func(v *NoRecursive) RecPtrOutput { return v.Rec }).(RecPtrOutput)
}
func (o NoRecursiveOutput) ReplaceMe() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NoRecursive) pulumi.StringPtrOutput { return v.ReplaceMe }).(pulumi.StringPtrOutput)
}
type NoRecursiveArrayOutput struct{ *pulumi.OutputState }
func (NoRecursiveArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NoRecursive)(nil)).Elem()
}
func (o NoRecursiveArrayOutput) ToNoRecursiveArrayOutput() NoRecursiveArrayOutput {
return o
}
func (o NoRecursiveArrayOutput) ToNoRecursiveArrayOutputWithContext(ctx context.Context) NoRecursiveArrayOutput {
return o
}
func (o NoRecursiveArrayOutput) Index(i pulumi.IntInput) NoRecursiveOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NoRecursive {
return vs[0].([]*NoRecursive)[vs[1].(int)]
}).(NoRecursiveOutput)
}
type NoRecursiveMapOutput struct{ *pulumi.OutputState }
func (NoRecursiveMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NoRecursive)(nil)).Elem()
}
func (o NoRecursiveMapOutput) ToNoRecursiveMapOutput() NoRecursiveMapOutput {
return o
}
func (o NoRecursiveMapOutput) ToNoRecursiveMapOutputWithContext(ctx context.Context) NoRecursiveMapOutput {
return o
}
func (o NoRecursiveMapOutput) MapIndex(k pulumi.StringInput) NoRecursiveOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NoRecursive {
return vs[0].(map[string]*NoRecursive)[vs[1].(string)]
}).(NoRecursiveOutput)
}
func init() {
pulumi.RegisterOutputType(NoRecursiveOutput{})
pulumi.RegisterOutputType(NoRecursiveArrayOutput{})
pulumi.RegisterOutputType(NoRecursiveMapOutput{})
}
```
|
Lê Quan Ninh (born Paris, 1961) is a French percussionist active in contemporary music and free improvisation.
He began studying piano at the age of 7, but turned towards percussion as a teenager. When he was 16, he entered the National Conservatory in Versailles. During this time he discovered free jazz. After graduating, he taught percussion for 3 years at a conservatory in Bondy, France while performing with contemporary music, dance, and theater groups often using self-taught techniques and found objects in his improvisation.
In the 1980s Ninh collaborated with Daunik Lazro, Michel Doneda, Serge Pey, Peter Kowald, Butch Morris, and Nicolas Peskine's Compagnie du Hasard.
In 1992 Ninh founded the Association La Flibuste which organized and presented improvisational artistic events across genres.
He was a member of the multi-media percussion ensemble Quatuor Helios and, along with cellist Martine Altenburger, a founder of the .
External links
Homepage
Biography and list of releases
FMP releases
Le Ventre Négatif album review
1961 births
Living people
French jazz musicians
Free improvisation
French percussionists
|
Obrium glabrum is a species of beetle in the family Cerambycidae. It was described by Knull in 1937.
References
Obriini
Beetles described in 1937
|
Robert O'Shea (born 20 July 1993) is an Irish hurler who plays as a midfielder for the Cork senior team.
Born in Carrigaline, County Cork, O'Shea first played competitive hurling and Gaelic football whilst a pupil at Carrigaline Community School. He arrived on the inter-county scene at the age of sixteen when he first linked up with the Cork minor team, before later lining out with the under-21 and intermediate sides. He made his senior debut in the 2013 Waterford Crystal Cup. O'Shea was later included on Cork's championship team as a substitute.
At club level O'Shea plays with Carrigaline.
Career statistics
Club
Inter-county
Honours
Carrigaline Community School
Munster Colleges' Senior "C" Hurling Championship (1): 2011
Cork Colleges' Senior Hurling Championship (2): 2011, 2012
University College Cork
All-Ireland Freshers' Hurling Championship (1): 2013
References
1993 births
Living people
UCC hurlers
Carrigaline hurlers
Carrigdhoun hurlers
Cork inter-county hurlers
|
```objective-c
/**************************************************************************//**
* @file cmsis_armcc.h
* @brief CMSIS Cortex-M Core Function/Instruction Header File
* @version V4.30
* @date 20. October 2015
******************************************************************************/
All rights reserved.
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 ARM 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 COPYRIGHT HOLDERS AND 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-----------*/
#ifndef __CMSIS_ARMCC_H
#define __CMSIS_ARMCC_H
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 400677)
#error "Please use ARM Compiler Toolchain V4.0.677 or later!"
#endif
/* ########################### Core Function Access ########################### */
/** \ingroup CMSIS_Core_FunctionInterface
\defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
@{
*/
/* intrinsic void __enable_irq(); */
/* intrinsic void __disable_irq(); */
/**
\brief Get Control Register
\details Returns the content of the Control Register.
\return Control Register value
*/
__STATIC_INLINE uint32_t __get_CONTROL(void)
{
register uint32_t __regControl __ASM("control");
return(__regControl);
}
/**
\brief Set Control Register
\details Writes the given value to the Control Register.
\param [in] control Control Register value to set
*/
__STATIC_INLINE void __set_CONTROL(uint32_t control)
{
register uint32_t __regControl __ASM("control");
__regControl = control;
}
/**
\brief Get IPSR Register
\details Returns the content of the IPSR Register.
\return IPSR Register value
*/
__STATIC_INLINE uint32_t __get_IPSR(void)
{
register uint32_t __regIPSR __ASM("ipsr");
return(__regIPSR);
}
/**
\brief Get APSR Register
\details Returns the content of the APSR Register.
\return APSR Register value
*/
__STATIC_INLINE uint32_t __get_APSR(void)
{
register uint32_t __regAPSR __ASM("apsr");
return(__regAPSR);
}
/**
\brief Get xPSR Register
\details Returns the content of the xPSR Register.
\return xPSR Register value
*/
__STATIC_INLINE uint32_t __get_xPSR(void)
{
register uint32_t __regXPSR __ASM("xpsr");
return(__regXPSR);
}
/**
\brief Get Process Stack Pointer
\details Returns the current value of the Process Stack Pointer (PSP).
\return PSP Register value
*/
__STATIC_INLINE uint32_t __get_PSP(void)
{
register uint32_t __regProcessStackPointer __ASM("psp");
return(__regProcessStackPointer);
}
/**
\brief Set Process Stack Pointer
\details Assigns the given value to the Process Stack Pointer (PSP).
\param [in] topOfProcStack Process Stack Pointer value to set
*/
__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
{
register uint32_t __regProcessStackPointer __ASM("psp");
__regProcessStackPointer = topOfProcStack;
}
/**
\brief Get Main Stack Pointer
\details Returns the current value of the Main Stack Pointer (MSP).
\return MSP Register value
*/
__STATIC_INLINE uint32_t __get_MSP(void)
{
register uint32_t __regMainStackPointer __ASM("msp");
return(__regMainStackPointer);
}
/**
\brief Set Main Stack Pointer
\details Assigns the given value to the Main Stack Pointer (MSP).
\param [in] topOfMainStack Main Stack Pointer value to set
*/
__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
{
register uint32_t __regMainStackPointer __ASM("msp");
__regMainStackPointer = topOfMainStack;
}
/**
\brief Get Priority Mask
\details Returns the current state of the priority mask bit from the Priority Mask Register.
\return Priority Mask value
*/
__STATIC_INLINE uint32_t __get_PRIMASK(void)
{
register uint32_t __regPriMask __ASM("primask");
return(__regPriMask);
}
/**
\brief Set Priority Mask
\details Assigns the given value to the Priority Mask Register.
\param [in] priMask Priority Mask
*/
__STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
{
register uint32_t __regPriMask __ASM("primask");
__regPriMask = (priMask);
}
#if (__CORTEX_M >= 0x03U) || (__CORTEX_SC >= 300U)
/**
\brief Enable FIQ
\details Enables FIQ interrupts by clearing the F-bit in the CPSR.
Can only be executed in Privileged modes.
*/
#define __enable_fault_irq __enable_fiq
/**
\brief Disable FIQ
\details Disables FIQ interrupts by setting the F-bit in the CPSR.
Can only be executed in Privileged modes.
*/
#define __disable_fault_irq __disable_fiq
/**
\brief Get Base Priority
\details Returns the current value of the Base Priority register.
\return Base Priority register value
*/
__STATIC_INLINE uint32_t __get_BASEPRI(void)
{
register uint32_t __regBasePri __ASM("basepri");
return(__regBasePri);
}
/**
\brief Set Base Priority
\details Assigns the given value to the Base Priority register.
\param [in] basePri Base Priority value to set
*/
__STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
{
register uint32_t __regBasePri __ASM("basepri");
__regBasePri = (basePri & 0xFFU);
}
/**
\brief Set Base Priority with condition
\details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled,
or the new value increases the BASEPRI priority level.
\param [in] basePri Base Priority value to set
*/
__STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri)
{
register uint32_t __regBasePriMax __ASM("basepri_max");
__regBasePriMax = (basePri & 0xFFU);
}
/**
\brief Get Fault Mask
\details Returns the current value of the Fault Mask register.
\return Fault Mask register value
*/
__STATIC_INLINE uint32_t __get_FAULTMASK(void)
{
register uint32_t __regFaultMask __ASM("faultmask");
return(__regFaultMask);
}
/**
\brief Set Fault Mask
\details Assigns the given value to the Fault Mask register.
\param [in] faultMask Fault Mask value to set
*/
__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
{
register uint32_t __regFaultMask __ASM("faultmask");
__regFaultMask = (faultMask & (uint32_t)1);
}
#endif /* (__CORTEX_M >= 0x03U) || (__CORTEX_SC >= 300U) */
#if (__CORTEX_M == 0x04U) || (__CORTEX_M == 0x07U)
/**
\brief Get FPSCR
\details Returns the current value of the Floating Point Status/Control register.
\return Floating Point Status/Control register value
*/
__STATIC_INLINE uint32_t __get_FPSCR(void)
{
#if (__FPU_PRESENT == 1U) && (__FPU_USED == 1U)
register uint32_t __regfpscr __ASM("fpscr");
return(__regfpscr);
#else
return(0U);
#endif
}
/**
\brief Set FPSCR
\details Assigns the given value to the Floating Point Status/Control register.
\param [in] fpscr Floating Point Status/Control value to set
*/
__STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
{
#if (__FPU_PRESENT == 1U) && (__FPU_USED == 1U)
register uint32_t __regfpscr __ASM("fpscr");
__regfpscr = (fpscr);
#endif
}
#endif /* (__CORTEX_M == 0x04U) || (__CORTEX_M == 0x07U) */
/*@} end of CMSIS_Core_RegAccFunctions */
/* ########################## Core Instruction Access ######################### */
/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
Access to dedicated instructions
@{
*/
/**
\brief No Operation
\details No Operation does nothing. This instruction can be used for code alignment purposes.
*/
#define __NOP __nop
/**
\brief Wait For Interrupt
\details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs.
*/
#define __WFI __wfi
/**
\brief Wait For Event
\details Wait For Event is a hint instruction that permits the processor to enter
a low-power state until one of a number of events occurs.
*/
#define __WFE __wfe
/**
\brief Send Event
\details Send Event is a hint instruction. It causes an event to be signaled to the CPU.
*/
#define __SEV __sev
/**
\brief Instruction Synchronization Barrier
\details Instruction Synchronization Barrier flushes the pipeline in the processor,
so that all instructions following the ISB are fetched from cache or memory,
after the instruction has been completed.
*/
#define __ISB() do {\
__schedule_barrier();\
__isb(0xF);\
__schedule_barrier();\
} while (0U)
/**
\brief Data Synchronization Barrier
\details Acts as a special kind of Data Memory Barrier.
It completes when all explicit memory accesses before this instruction complete.
*/
#define __DSB() do {\
__schedule_barrier();\
__dsb(0xF);\
__schedule_barrier();\
} while (0U)
/**
\brief Data Memory Barrier
\details Ensures the apparent order of the explicit memory operations before
and after the instruction, without ensuring their completion.
*/
#define __DMB() do {\
__schedule_barrier();\
__dmb(0xF);\
__schedule_barrier();\
} while (0U)
/**
\brief Reverse byte order (32 bit)
\details Reverses the byte order in integer value.
\param [in] value Value to reverse
\return Reversed value
*/
#define __REV __rev
/**
\brief Reverse byte order (16 bit)
\details Reverses the byte order in two unsigned short values.
\param [in] value Value to reverse
\return Reversed value
*/
#ifndef __NO_EMBEDDED_ASM
__attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value)
{
rev16 r0, r0
bx lr
}
#endif
/**
\brief Reverse byte order in signed short value
\details Reverses the byte order in a signed short value with sign extension to integer.
\param [in] value Value to reverse
\return Reversed value
*/
#ifndef __NO_EMBEDDED_ASM
__attribute__((section(".revsh_text"))) __STATIC_INLINE __ASM int32_t __REVSH(int32_t value)
{
revsh r0, r0
bx lr
}
#endif
/**
\brief Rotate Right in unsigned value (32 bit)
\details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
\param [in] value Value to rotate
\param [in] value Number of Bits to rotate
\return Rotated value
*/
#define __ROR __ror
/**
\brief Breakpoint
\details Causes the processor to enter Debug state.
Debug tools can use this to investigate system state when the instruction at a particular address is reached.
\param [in] value is ignored by the processor.
If required, a debugger can use it to store additional information about the breakpoint.
*/
#define __BKPT(value) __breakpoint(value)
/**
\brief Reverse bit order of value
\details Reverses the bit order of the given value.
\param [in] value Value to reverse
\return Reversed value
*/
#if (__CORTEX_M >= 0x03U) || (__CORTEX_SC >= 300U)
#define __RBIT __rbit
#else
__attribute__((always_inline)) __STATIC_INLINE uint32_t __RBIT(uint32_t value)
{
uint32_t result;
int32_t s = 4 /*sizeof(v)*/ * 8 - 1; /* extra shift needed at end */
result = value; /* r will be reversed bits of v; first get LSB of v */
for (value >>= 1U; value; value >>= 1U)
{
result <<= 1U;
result |= value & 1U;
s--;
}
result <<= s; /* shift when v's highest bits are zero */
return(result);
}
#endif
/**
\brief Count leading zeros
\details Counts the number of leading zeros of a data value.
\param [in] value Value to count the leading zeros
\return number of leading zeros in value
*/
#define __CLZ __clz
#if (__CORTEX_M >= 0x03U) || (__CORTEX_SC >= 300U)
/**
\brief LDR Exclusive (8 bit)
\details Executes a exclusive LDR instruction for 8 bit value.
\param [in] ptr Pointer to data
\return value of type uint8_t at (*ptr)
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __LDREXB(ptr) ((uint8_t ) __ldrex(ptr))
#else
#define __LDREXB(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint8_t ) __ldrex(ptr)) _Pragma("pop")
#endif
/**
\brief LDR Exclusive (16 bit)
\details Executes a exclusive LDR instruction for 16 bit values.
\param [in] ptr Pointer to data
\return value of type uint16_t at (*ptr)
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __LDREXH(ptr) ((uint16_t) __ldrex(ptr))
#else
#define __LDREXH(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint16_t) __ldrex(ptr)) _Pragma("pop")
#endif
/**
\brief LDR Exclusive (32 bit)
\details Executes a exclusive LDR instruction for 32 bit values.
\param [in] ptr Pointer to data
\return value of type uint32_t at (*ptr)
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __LDREXW(ptr) ((uint32_t ) __ldrex(ptr))
#else
#define __LDREXW(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint32_t ) __ldrex(ptr)) _Pragma("pop")
#endif
/**
\brief STR Exclusive (8 bit)
\details Executes a exclusive STR instruction for 8 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
\return 0 Function succeeded
\return 1 Function failed
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __STREXB(value, ptr) __strex(value, ptr)
#else
#define __STREXB(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop")
#endif
/**
\brief STR Exclusive (16 bit)
\details Executes a exclusive STR instruction for 16 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
\return 0 Function succeeded
\return 1 Function failed
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __STREXH(value, ptr) __strex(value, ptr)
#else
#define __STREXH(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop")
#endif
/**
\brief STR Exclusive (32 bit)
\details Executes a exclusive STR instruction for 32 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
\return 0 Function succeeded
\return 1 Function failed
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __STREXW(value, ptr) __strex(value, ptr)
#else
#define __STREXW(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop")
#endif
/**
\brief Remove the exclusive lock
\details Removes the exclusive lock which is created by LDREX.
*/
#define __CLREX __clrex
/**
\brief Signed Saturate
\details Saturates a signed value.
\param [in] value Value to be saturated
\param [in] sat Bit position to saturate to (1..32)
\return Saturated value
*/
#define __SSAT __ssat
/**
\brief Unsigned Saturate
\details Saturates an unsigned value.
\param [in] value Value to be saturated
\param [in] sat Bit position to saturate to (0..31)
\return Saturated value
*/
#define __USAT __usat
/**
\brief Rotate Right with Extend (32 bit)
\details Moves each bit of a bitstring right by one bit.
The carry input is shifted in at the left end of the bitstring.
\param [in] value Value to rotate
\return Rotated value
*/
#ifndef __NO_EMBEDDED_ASM
__attribute__((section(".rrx_text"))) __STATIC_INLINE __ASM uint32_t __RRX(uint32_t value)
{
rrx r0, r0
bx lr
}
#endif
/**
\brief LDRT Unprivileged (8 bit)
\details Executes a Unprivileged LDRT instruction for 8 bit value.
\param [in] ptr Pointer to data
\return value of type uint8_t at (*ptr)
*/
#define __LDRBT(ptr) ((uint8_t ) __ldrt(ptr))
/**
\brief LDRT Unprivileged (16 bit)
\details Executes a Unprivileged LDRT instruction for 16 bit values.
\param [in] ptr Pointer to data
\return value of type uint16_t at (*ptr)
*/
#define __LDRHT(ptr) ((uint16_t) __ldrt(ptr))
/**
\brief LDRT Unprivileged (32 bit)
\details Executes a Unprivileged LDRT instruction for 32 bit values.
\param [in] ptr Pointer to data
\return value of type uint32_t at (*ptr)
*/
#define __LDRT(ptr) ((uint32_t ) __ldrt(ptr))
/**
\brief STRT Unprivileged (8 bit)
\details Executes a Unprivileged STRT instruction for 8 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
*/
#define __STRBT(value, ptr) __strt(value, ptr)
/**
\brief STRT Unprivileged (16 bit)
\details Executes a Unprivileged STRT instruction for 16 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
*/
#define __STRHT(value, ptr) __strt(value, ptr)
/**
\brief STRT Unprivileged (32 bit)
\details Executes a Unprivileged STRT instruction for 32 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
*/
#define __STRT(value, ptr) __strt(value, ptr)
#endif /* (__CORTEX_M >= 0x03U) || (__CORTEX_SC >= 300U) */
/*@}*/ /* end of group CMSIS_Core_InstructionInterface */
/* ################### Compiler specific Intrinsics ########################### */
/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
Access to dedicated SIMD instructions
@{
*/
#if (__CORTEX_M >= 0x04U) /* only for Cortex-M4 and above */
#define __SADD8 __sadd8
#define __QADD8 __qadd8
#define __SHADD8 __shadd8
#define __UADD8 __uadd8
#define __UQADD8 __uqadd8
#define __UHADD8 __uhadd8
#define __SSUB8 __ssub8
#define __QSUB8 __qsub8
#define __SHSUB8 __shsub8
#define __USUB8 __usub8
#define __UQSUB8 __uqsub8
#define __UHSUB8 __uhsub8
#define __SADD16 __sadd16
#define __QADD16 __qadd16
#define __SHADD16 __shadd16
#define __UADD16 __uadd16
#define __UQADD16 __uqadd16
#define __UHADD16 __uhadd16
#define __SSUB16 __ssub16
#define __QSUB16 __qsub16
#define __SHSUB16 __shsub16
#define __USUB16 __usub16
#define __UQSUB16 __uqsub16
#define __UHSUB16 __uhsub16
#define __SASX __sasx
#define __QASX __qasx
#define __SHASX __shasx
#define __UASX __uasx
#define __UQASX __uqasx
#define __UHASX __uhasx
#define __SSAX __ssax
#define __QSAX __qsax
#define __SHSAX __shsax
#define __USAX __usax
#define __UQSAX __uqsax
#define __UHSAX __uhsax
#define __USAD8 __usad8
#define __USADA8 __usada8
#define __SSAT16 __ssat16
#define __USAT16 __usat16
#define __UXTB16 __uxtb16
#define __UXTAB16 __uxtab16
#define __SXTB16 __sxtb16
#define __SXTAB16 __sxtab16
#define __SMUAD __smuad
#define __SMUADX __smuadx
#define __SMLAD __smlad
#define __SMLADX __smladx
#define __SMLALD __smlald
#define __SMLALDX __smlaldx
#define __SMUSD __smusd
#define __SMUSDX __smusdx
#define __SMLSD __smlsd
#define __SMLSDX __smlsdx
#define __SMLSLD __smlsld
#define __SMLSLDX __smlsldx
#define __SEL __sel
#define __QADD __qadd
#define __QSUB __qsub
#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \
((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) )
#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \
((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) )
#define __SMMLA(ARG1,ARG2,ARG3) ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \
((int64_t)(ARG3) << 32U) ) >> 32U))
#endif /* (__CORTEX_M >= 0x04) */
/*@} end of group CMSIS_SIMD_intrinsics */
#endif /* __CMSIS_ARMCC_H */
```
|
Lyss () is a municipality in the Seeland administrative district in the canton of Bern in Switzerland. On 1 January 2011, the former municipality of Busswil bei Büren was merged with Lyss.
History
Lyss is first mentioned in 1009 as Lissa.
The oldest traces of humans in Lyss include neolithic, Bronze Age and Hallstatt culture items scattered around the municipality. One of the best preserved items is a 6th-century BC Etruscan bronze statue. Roman era bricks have been found in Kirchhübeli along with early medieval and medieval tombs and the remains of a Carolingian church. A number of graves dating from the 7th Century were discovered at Sonnhalde-Kreuzhöhe.
The Ministerialis (unfree knights in the service of a feudal overlord) family of Lyss is first mentioned in 1185-87 under the Counts of Neuchâtel-Aarberg. In 1367, Lyss, along with the rest of the land around Aarberg, was transferred to the Counts of Neuchâtel-Nidau. About ten years later, around 1377-79 it was transferred again to the City of Bern and became part of the Bernese bailiwick of Aarberg. While Bern owned the village of Lyss, a number of nobles and monasteries owned property, farms or rights in the village and surroundings.
Until the Reformation, Lyss had two parish churches. The church of St. John the Evangelist was built in the 7th or 8th century. Around 1246 it was replaced with a new church, which was partially renovated in the 15th century. It became the center of an important deanery in the second half of the 14th century. After the Reformation it was the only church in Lyss until the current Reformed church was built in 1934–35. The other church St. Mary's Church at Kirchhübeli which was built on the foundations of a Carolingian church. In the 15th century the church began to fall into disrepair, and during the Reformation it was abandoned and demolished in 1533.
For centuries, the meandering Aare and Lyssbach rivers flooded Lyss repeatedly. Over the centuries several dams and levees were built to protect the village. Starting in the 17th century a number of water powered mills, including an oil mill, sawmills, fulling mills and dyeing factories, were built along the river. The first Jura water correction (1868–91) diverted the Aare river into Lake Biel. This, together with the Lyssbach correction (1911–16) opened up extensive farm land along the old river.
The population of Lyss was always greater than in the nearby political and administrative center of Aarberg. However, because of Aarberg's central location and convenient roads Lyss remained a quiet, isolated town. The arrival of the railroad from Bern to Biel in 1864 and the Jura water correction led to extensive population growth. In 1876, another railway line from Lausanne to Solothurn was built through Lyss. This made the town a rail hub. Built in 1983-86 the Bern-Biel/Bienne highway passed through Lyss and brought increased traffic.
In 1866 the Käserei- und Kreditgesellschaft Lyss (Dairy and Credit Society of Lyss) was founded as a bank to help farmers. By 1880 it had grown into a savings and loan bank which helped fund the expansion of Lyss. With the new rail links, factories began to settle in the town. By 1900 there were factories manufacturing watches, cement products, biscuits, watch crystals, fittings, bricks, cloth and steel. Heavy machinery factories moved in by 1940. The town expanded in 1956 and again in 1979 as businesses and residents moved into Lyss. In 2005 there were 6,035 jobs in a town of about 10,000 people.
Geography
Lyss has an area of . Of this area, or 30.2% is used for agricultural purposes, while or 33.8% is forested. Of the rest of the land, or 35.6% is settled (buildings or roads), or 0.4% is either rivers or lakes.
Of the built up area, industrial buildings made up 6.4% of the total area while housing and buildings made up 14.0% and transportation infrastructure made up 9.6%. Power and water infrastructure as well as other special developed areas made up 2.5% of the area while parks, green belts and sports fields made up 3.1%. Out of the forested land, all of the forested land area is covered with heavy forests. Of the agricultural land, 21.5% is used for growing crops and 7.2% is pastures, while 1.5% is used for orchards or vine crops. All the water in the municipality is flowing water.
The municipality is an administrative and economic center for the surrounding region. Lyss is located at the mouth of the Lyssbach valley on the former right bank of the Aare river. It consists of the village of Lyss and village sections of Hardern and Eigenacker. Until 1876 it included the settlement of Werdthof, which is now part of Kappelen.
Lyss lies on the eastern edge of a wide valley that extends southwest to Lake Murten. West of this valley lie Lake Neuchâtel and Lake Biel, and beyond that the Jura mountains.
The valley is flat and was subject to flooding until 1878, when a major hydraulic engineering project changed the courses of the Aare and the Zihl and lowered the level of the three lakes by . In addition, water from the Aare, the Broye, the Zihl, and the Schüss was diverted into the Nidau-Büren Canal and the Hagneck Canal.
Coat of arms
The blazon of the municipal coat of arms is Azure a Fleur-de-lys Argent ringed Or on a Mount of 3 Coupeaux Vert.
Demographics
Lyss has a population () of . , 16.0% of the population are resident foreign nationals. Over the last 10 years (2000–2010) the population has changed at a rate of 9.4%. Migration accounted for 7.9%, while births and deaths accounted for 1.7%.
Most of the population () speaks German (9,072 or 85.1%) as their first language, Italian is the second most common (356 or 3.3%) and Spanish is the third (271 or 2.5%). There are 196 people who speak French and 6 people who speak Romansh.
, the population was 49.0% male and 51.0% female. The population was made up of 4,803 Swiss men (40.6% of the population) and 992 (8.4%) non-Swiss men. There were 5,131 Swiss women (43.4%) and 89 (0.8%) non-Swiss women. Of the population in the municipality, 2,676 or about 25.1% were born in Lyss and lived there in 2000. There were 4,146 or 38.9% who were born in the same canton, while 1,642 or 15.4% were born somewhere else in Switzerland, and 1,865 or 17.5% were born outside of Switzerland.
, children and teenagers (0–19 years old) make up 24.3% of the population, while adults (20–64 years old) make up 63.7% and seniors (over 64 years old) make up 12%.
, there were 4,434 people who were single and never married in the municipality. There were 5,101 married individuals, 510 widows or widowers and 614 individuals who are divorced.
, there were 5,367 private households in the municipality, and an average of 2.3 persons per household. There were 1,511 households that consist of only one person and 220 households with five or more people. , a total of 4,533 apartments (93.3% of the total) were permanently occupied, while 205 apartments (4.2%) were seasonally occupied and 123 apartments (2.5%) were empty. , the construction rate of new housing units was 13.6 new units per 1000 residents.
the average price to rent an average apartment in Lyss was 973.41 Swiss francs (CHF) per month (US$780, £440, €620 approx. exchange rate from 2003). The average rate for a one-room apartment was 559.24 CHF (US$450, £250, €360), a two-room apartment was about 723.26 CHF (US$580, £330, €460), a three-room apartment was about 838.08 CHF (US$670, £380, €540) and a six or more room apartment cost an average of 1596.12 CHF (US$1280, £720, €1020).
The average apartment price in Lyss was 87.2% of the national average of 1116 CHF. The vacancy rate for the municipality, , was 1.44%.
The historical population is given in the following chart:
Twin Town
Lyss is twinned with:
Monopoli, Italy.
Politics
In the 2007 federal election the most popular party was the SVP which received 28.51% of the vote. The next three most popular parties were the SPS (23.05%), the FDP (20.5%) and the EVP Party (9.24%). In the federal election, a total of 3,135 votes were cast, and the voter turnout was 40.5%.
Lyss is governed by the Gemeinderat, an executive branch with 5 members, one of them elected mayor (Gemeindepräsident). The parliament has 47 members and is called Grosser Gemeinderat. The last elections were held in 2009 with the next elections scheduled to be in 2013.
The 47 members of the legislative municipal council belong to 8 different political parties, the strongest being the FDP with 11 seats followed by the SVP with 10 and the SPS with 9 seats.
The executive municipal council is made up of five members of three different political parties. The FDP and the SPS hold two seats each, the SVP holds one seat. The mayor Andreas Hegg is a member of the FDP.
Economy
, Lyss had an unemployment rate of 2.5%. , there were 54 people employed in the primary economic sector and about 20 businesses involved in this sector. 3,194 people were employed in the secondary sector and there were 153 businesses in this sector. 3,761 people were employed in the tertiary sector, with 505 businesses in this sector.
the total number of full-time equivalent jobs was 5,762. The number of jobs in the primary sector was 28, of which 22 were in agriculture and 6 were in forestry or lumber production. The number of jobs in the secondary sector was 2,905 of which 2,228 or (76.7%) were in manufacturing, 30 or (1.0%) were in mining and 567 (19.5%) were in construction. The number of jobs in the tertiary sector was 2,829. In the tertiary sector; 948 or 33.5% were in wholesale or retail sales or the repair of motor vehicles, 145 or 5.1% were in the movement and storage of goods, 181 or 6.4% were in a hotel or restaurant, 108 or 3.8% were in the information industry, 159 or 5.6% were the insurance or financial industry, 531 or 18.8% were technical professionals or scientists, 177 or 6.3% were in education and 207 or 7.3% were in health care.
, there were 4,242 workers who commuted into the municipality and 3,312 workers who commuted away. The municipality is a net importer of workers, with about 1.3 workers entering the municipality for every one leaving. Of the working population, 21.1% used public transportation to get to work, and 48.7% used a private car.
Religion
From the , 2,082 or 19.5% were Roman Catholic, while 6,580 or 61.7% belonged to the Swiss Reformed Church. Of the rest of the population, there were 116 members of an Orthodox church (or about 1.09% of the population), there were 12 individuals (or about 0.11% of the population) who belonged to the Christian Catholic Church, and there were 476 individuals (or about 4.47% of the population) who belonged to another Christian church. There was 1 individual who was Jewish, and 404 (or about 3.79% of the population) who were Islamic. There were 35 individuals who were Buddhist, 147 individuals who were Hindu and 7 individuals who belonged to another church. 751 (or about 7.05% of the population) belonged to no church, are agnostic or atheist, and 281 individuals (or about 2.64% of the population) did not answer the question.
Education
In Lyss about 4,289 or (40.2%) of the population have completed non-mandatory upper secondary education, and 1,196 or (11.2%) have completed additional higher education (either university or a Fachhochschule). Of the 1,196 who completed tertiary schooling, 72.1% were Swiss men, 18.9% were Swiss women, 5.4% were non-Swiss men and 3.6% were non-Swiss women.
The Canton of Bern school system provides two years of obligatory Kindergarten, followed by six years of Primary school. This is followed by three years of obligatory lower Secondary school where the students are separated according to ability and aptitude. Following the lower Secondary students may attend additional schooling or they may enter an apprenticeship.
During the 2018–19 school year, there were a total of 1,640 students attending classes in Lyss. There were 269 kindergarten students in the municipality. Of the kindergarten students, 21.2% were permanent or temporary residents of Switzerland (not citizens) and 28.6% have a different mother language than the classroom language. The municipality had 857 primary students of which, 23.1% were not citizens and 28.8% have a different mother language. During the same year, there were 419lower secondary students of which 21.0% were not citizens and 19.1% have a different mother language than the classroom language. The remaining 95 attended special classes.
, there were 166 students in Lyss who came from another municipality, while 251 residents attended schools outside the municipality.
Lyss is home to the Gemeindebibliothek Lyss (municipal library of Lyss). The library has () 22,002 books or other media. It was open a total of 224 days with average of 20 hours per week during that year.
Transportation
The municipality has three railway stations: , , and . Between them there is regular service to , , , , and .
Notable people
Ernst Albert Gäumann (1893 in Lyss – 1963) a Swiss botanist and mycologist
Werner Zimmermann (born 1915) a retired Swiss slalom and sprint canoeist, competed in the 1936 Summer Olympics
Margrit von Dach (born 1946 in Lyss) is a Swiss author and translator
Paolo Collaviti (born 1978 in Lyss) a Swiss football player, currently plays for BSC Young Boys
Junior Strous (born 1986) a Dutch racing driver and racing team owner, lives in Lyss
References
External links
Chamber of economy Biel-Seeland
Cities in Switzerland
Municipalities of the canton of Bern
|
The men's team archery event was one of five archery events held at the 2020 Summer Olympics. It was held at Yumenoshima Park, with the ranking round taking place on 23 July and match play on 26 July.
Background
This was the 9th consecutive appearance of the event, which has been held every Games since 1988.
Of the 12 teams that competed in 2016, 8 qualified to return, including all four semifinalists (winner South Korea, silver medalist the United States, bronze medalist Australia, and fourth-place finisher China). The other teams from 2016 that have qualified to return are the Netherlands, France, Indonesia, and Chinese Taipei. Kazakhstan has qualified to return for the first time since 2000; Japan, Great Britain, and India competed in 2012.
South Korea has a 6-Games medal streak in the event, and has won gold in 5 of the 8 times the event has been held. China is the reigning world champion, having defeated South Korea in the semifinals at the 2019 World Archery Championships.
Qualification
12 teams qualify for the men's team archery event. The top 8 National Olympic Committees (NOCs) at the 2019 World Archery Championships qualified. One place was reserved for the host, Japan; the 2021 Archery Final Olympic Qualification Tournament would award either three or four places depending on whether Japan qualified through the World Championships. Because Japan did not, there were three places available at the Final OQT.
Teams that qualified for the team event also received 3 automatic qualification places for the team members in the individual event as well.
Competition format
As with the other archery events, the men's team was a recurve archery event, held under the World Archery-approved 70-meter distance and rules. 12 teams of 3 archers each participate. Competition begins with a ranking round, in which each archer shoots 72 arrows (this is the same ranking round used for the individual event). The combined scores from the ranking round are used to seed the teams into a single-elimination bracket, with the top 4 teams receiving a bye into the second round (quarterfinals). Each match consists of four sets of 6 arrows, two per archer. The team with the highest score in the set – the total of the six arrows – receives two set points; if the teams are tied, each receives one set point. The first team to five set points wins the match. If the match is tied at 4–4 after 4 sets, a tie-breaker set is used with each archer on the team shooting one arrow; if the score of the tie-breaker set remains tied, the closest arrow to the center wins.
Records
Prior to this competition, the existing world and Olympic records were as follows.
216 arrow ranking round
Schedule
All times are Japan Standard Time (UTC+9)
The schedule for the men's team event covers two separate days of competition.
Results
Ranking round
Competition bracket
The figure in italics signifies the set scores.
References
Archery at the 2020 Summer Olympics
Men's events at the 2020 Summer Olympics
|
Göçkün is a village in the İnebolu District of Kastamonu Province in Turkey. Its population is 398 (2021).
References
Villages in İnebolu District
|
The Capitan O'Brien class were three submarines built for the Chilean Navy in the late 1920s. They were similar to the contemporary British s, but mounted a larger /45 deck gun and were slightly smaller.
Ships
All boats were built by Vickers in Barrow-in-Furness and commissioned in 1929. The builder's photograph of the Simpson gives the dimensions as overall × × , surface speed surfaced and submerged.
The two s purchased by Chile in the 1970s were also known locally as the O'Brien class.
References
Cited works
Conway's All the World's Fighting Ships 1922-1946
Submarine classes
|
```c++
CMapStringToOb map;
map.SetAt(_T("Bart"), new CAge(13));
map.SetAt(_T("Homer"), new CAge(36));
ASSERT(map.GetCount() == 2);
```
|
```c++
#include "test/extensions/filters/http/ext_proc/ext_proc_grpc_fuzz_helper.h"
#include "envoy/config/core/v3/base.pb.h"
#include "envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.h"
#include "envoy/service/ext_proc/v3/external_processor.pb.h"
#include "envoy/type/v3/http_status.pb.h"
#include "source/common/common/thread.h"
#include "test/common/http/common.h"
#include "test/fuzz/fuzz_runner.h"
#include "test/test_common/utility.h"
namespace Envoy {
namespace Extensions {
namespace HttpFilters {
namespace ExternalProcessing {
using envoy::extensions::filters::http::ext_proc::v3::ProcessingMode;
using envoy::service::ext_proc::v3::CommonResponse;
using envoy::service::ext_proc::v3::HeaderMutation;
using envoy::service::ext_proc::v3::ImmediateResponse;
using envoy::service::ext_proc::v3::ProcessingRequest;
using envoy::service::ext_proc::v3::ProcessingResponse;
using envoy::type::v3::StatusCode;
const StatusCode HttpStatusCodes[] = {
StatusCode::Continue,
StatusCode::OK,
StatusCode::Created,
StatusCode::Accepted,
StatusCode::NonAuthoritativeInformation,
StatusCode::NoContent,
StatusCode::ResetContent,
StatusCode::PartialContent,
StatusCode::MultiStatus,
StatusCode::AlreadyReported,
StatusCode::IMUsed,
StatusCode::MultipleChoices,
StatusCode::MovedPermanently,
StatusCode::Found,
StatusCode::SeeOther,
StatusCode::NotModified,
StatusCode::UseProxy,
StatusCode::TemporaryRedirect,
StatusCode::PermanentRedirect,
StatusCode::BadRequest,
StatusCode::Unauthorized,
StatusCode::PaymentRequired,
StatusCode::Forbidden,
StatusCode::NotFound,
StatusCode::MethodNotAllowed,
StatusCode::NotAcceptable,
StatusCode::ProxyAuthenticationRequired,
StatusCode::RequestTimeout,
StatusCode::Conflict,
StatusCode::Gone,
StatusCode::LengthRequired,
StatusCode::PreconditionFailed,
StatusCode::PayloadTooLarge,
StatusCode::URITooLong,
StatusCode::UnsupportedMediaType,
StatusCode::RangeNotSatisfiable,
StatusCode::ExpectationFailed,
StatusCode::MisdirectedRequest,
StatusCode::UnprocessableEntity,
StatusCode::Locked,
StatusCode::FailedDependency,
StatusCode::UpgradeRequired,
StatusCode::PreconditionRequired,
StatusCode::TooManyRequests,
StatusCode::RequestHeaderFieldsTooLarge,
StatusCode::InternalServerError,
StatusCode::NotImplemented,
StatusCode::BadGateway,
StatusCode::ServiceUnavailable,
StatusCode::GatewayTimeout,
StatusCode::HTTPVersionNotSupported,
StatusCode::VariantAlsoNegotiates,
StatusCode::InsufficientStorage,
StatusCode::LoopDetected,
StatusCode::NotExtended,
StatusCode::NetworkAuthenticationRequired,
};
const grpc::StatusCode GrpcStatusCodes[] = {
grpc::StatusCode::OK,
grpc::StatusCode::CANCELLED,
grpc::StatusCode::UNKNOWN,
grpc::StatusCode::INVALID_ARGUMENT,
grpc::StatusCode::DEADLINE_EXCEEDED,
grpc::StatusCode::NOT_FOUND,
grpc::StatusCode::ALREADY_EXISTS,
grpc::StatusCode::PERMISSION_DENIED,
grpc::StatusCode::RESOURCE_EXHAUSTED,
grpc::StatusCode::FAILED_PRECONDITION,
grpc::StatusCode::ABORTED,
grpc::StatusCode::OUT_OF_RANGE,
grpc::StatusCode::UNIMPLEMENTED,
grpc::StatusCode::INTERNAL,
grpc::StatusCode::UNAVAILABLE,
grpc::StatusCode::DATA_LOSS,
grpc::StatusCode::UNAUTHENTICATED,
};
ExtProcFuzzHelper::ExtProcFuzzHelper(FuzzedDataProvider* provider) { provider_ = provider; }
std::string ExtProcFuzzHelper::consumeRepeatedString() {
const uint32_t str_len = provider_->ConsumeIntegralInRange<uint32_t>(0, ExtProcFuzzMaxDataSize);
return {static_cast<char>(str_len), 'b'};
}
// Since FuzzedDataProvider requires enums to define a kMaxValue, we cannot
// use the envoy::type::v3::StatusCode enum directly.
StatusCode ExtProcFuzzHelper::randomHttpStatus() {
const StatusCode rv = provider_->PickValueInArray(HttpStatusCodes);
ENVOY_LOG_MISC(trace, "Selected HTTP StatusCode {}", rv);
return rv;
}
// Since FuzzedDataProvider requires enums to define a kMaxValue, we cannot
// use the grpc::StatusCode enum directly.
grpc::StatusCode ExtProcFuzzHelper::randomGrpcStatusCode() {
const grpc::StatusCode rv = provider_->PickValueInArray(GrpcStatusCodes);
ENVOY_LOG_MISC(trace, "Selected gRPC StatusCode {}", rv);
return rv;
}
void ExtProcFuzzHelper::logRequest(const ProcessingRequest* req) {
if (req->has_request_headers()) {
ENVOY_LOG_MISC(trace, "Received ProcessingRequest request_headers");
} else if (req->has_response_headers()) {
ENVOY_LOG_MISC(trace, "Received ProcessingRequest response_headers");
} else if (req->has_request_body()) {
ENVOY_LOG_MISC(trace, "Received ProcessingRequest request_body");
} else if (req->has_response_body()) {
ENVOY_LOG_MISC(trace, "Received ProcessingRequest response_body");
} else if (req->has_request_trailers()) {
ENVOY_LOG_MISC(trace, "Received ProcessingRequest request_trailers");
} else if (req->has_response_trailers()) {
ENVOY_LOG_MISC(trace, "Received ProcessingRequest response_trailers");
} else {
ENVOY_LOG_MISC(trace, "Received unexpected ProcessingRequest");
}
}
grpc::Status ExtProcFuzzHelper::randomGrpcStatusWithMessage() {
const grpc::StatusCode code = randomGrpcStatusCode();
ENVOY_LOG_MISC(trace, "Closing stream with StatusCode {}", code);
return {code, consumeRepeatedString()};
}
// TODO(ikepolinsky): implement this function
// Randomizes a HeaderMutation taken as input. Header/Trailer values of the
// request are available in req which allows for more guided manipulation of the
// headers. The bool value should be false to manipulate headers and
// true to manipulate trailers (which are also a header map)
void ExtProcFuzzHelper::randomizeHeaderMutation(HeaderMutation*, const ProcessingRequest*,
const bool) {
// Each of the following blocks generates random data for the 2 fields
// of a HeaderMutation gRPC message
// 1. Randomize set_headers
// TODO(ikepolinsky): randomly add headers
// 2. Randomize remove headers
// TODO(ikepolinsky): Randomly remove headers
}
void ExtProcFuzzHelper::randomizeCommonResponse(CommonResponse* msg, const ProcessingRequest* req) {
// Each of the following blocks generates random data for the 5 fields
// of CommonResponse gRPC message
// 1. Randomize status
if (provider_->ConsumeBool()) {
switch (provider_->ConsumeEnum<CommonResponseStatus>()) {
case CommonResponseStatus::Continue:
ENVOY_LOG_MISC(trace, "CommonResponse status CONTINUE");
msg->set_status(CommonResponse::CONTINUE);
break;
case CommonResponseStatus::ContinueAndReplace:
ENVOY_LOG_MISC(trace, "CommonResponse status CONTINUE_AND_REPLACE");
msg->set_status(CommonResponse::CONTINUE_AND_REPLACE);
break;
default:
RELEASE_ASSERT(false, "Unhandled case in random CommonResponse Status");
}
}
// 2. Randomize header_mutation
if (provider_->ConsumeBool()) {
ENVOY_LOG_MISC(trace, "CommonResponse setting header_mutation");
randomizeHeaderMutation(msg->mutable_header_mutation(), req, false);
}
// 3. Randomize body_mutation
if (provider_->ConsumeBool()) {
auto* body_mutation = msg->mutable_body_mutation();
if (provider_->ConsumeBool()) {
ENVOY_LOG_MISC(trace, "CommonResponse setting body_mutation, replacing body with bytes");
body_mutation->set_body(consumeRepeatedString());
} else {
ENVOY_LOG_MISC(trace, "CommonResponse setting body_mutation, clearing body");
body_mutation->set_clear_body(provider_->ConsumeBool());
}
}
// 4. Randomize trailers
// TODO(ikepolinsky) ext_proc currently does not support this field
// 5. Randomize clear_route_cache
if (provider_->ConsumeBool()) {
ENVOY_LOG_MISC(trace, "CommonResponse clearing route cache");
msg->set_clear_route_cache(true);
}
}
void ExtProcFuzzHelper::randomizeImmediateResponse(ImmediateResponse* msg,
const ProcessingRequest* req) {
// Each of the following blocks generates random data for the 5 fields
// of an ImmediateResponse gRPC message
// 1. Randomize HTTP status (required)
ENVOY_LOG_MISC(trace, "ImmediateResponse setting status");
msg->mutable_status()->set_code(randomHttpStatus());
// 2. Randomize headers
if (provider_->ConsumeBool()) {
ENVOY_LOG_MISC(trace, "ImmediateResponse setting headers");
randomizeHeaderMutation(msg->mutable_headers(), req, false);
}
// 3. Randomize body
if (provider_->ConsumeBool()) {
ENVOY_LOG_MISC(trace, "ImmediateResponse setting body");
msg->set_body(consumeRepeatedString());
}
// 4. Randomize grpc_status
if (provider_->ConsumeBool()) {
ENVOY_LOG_MISC(trace, "ImmediateResponse setting grpc_status");
msg->mutable_grpc_status()->set_status(randomGrpcStatusCode());
}
// 5. Randomize details
if (provider_->ConsumeBool()) {
ENVOY_LOG_MISC(trace, "ImmediateResponse setting details");
msg->set_details(consumeRepeatedString());
}
}
void ExtProcFuzzHelper::randomizeOverrideResponse(ProcessingMode* msg) {
// Each of the following blocks generates random data for the 6 fields
// of a ProcessingMode gRPC message
// 1. Randomize request_header_mode
if (provider_->ConsumeBool()) {
switch (provider_->ConsumeEnum<HeaderSendSetting>()) {
case HeaderSendSetting::Default:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting request_header_mode DEFAULT");
msg->set_request_header_mode(ProcessingMode::DEFAULT);
break;
case HeaderSendSetting::Send:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting request_header_mode SEND");
msg->set_request_header_mode(ProcessingMode::SEND);
break;
case HeaderSendSetting::Skip:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting request_header_mode SKIP");
msg->set_request_header_mode(ProcessingMode::SKIP);
break;
default:
RELEASE_ASSERT(false, "HeaderSendSetting not handled");
}
}
// 2. Randomize response_header_mode
if (provider_->ConsumeBool()) {
switch (provider_->ConsumeEnum<HeaderSendSetting>()) {
case HeaderSendSetting::Default:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting response_header_mode DEFAULT");
msg->set_response_header_mode(ProcessingMode::DEFAULT);
break;
case HeaderSendSetting::Send:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting response_header_mode SEND");
msg->set_response_header_mode(ProcessingMode::SEND);
break;
case HeaderSendSetting::Skip:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting response_header_mode SKIP");
msg->set_response_header_mode(ProcessingMode::SKIP);
break;
default:
RELEASE_ASSERT(false, "HeaderSendSetting not handled");
}
}
// 3. Randomize request_body_mode
if (provider_->ConsumeBool()) {
switch (provider_->ConsumeEnum<BodySendSetting>()) {
case BodySendSetting::None:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting request_body_mode NONE");
msg->set_request_body_mode(ProcessingMode::NONE);
break;
case BodySendSetting::Streamed:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting request_body_mode STREAMED");
msg->set_request_body_mode(ProcessingMode::STREAMED);
break;
case BodySendSetting::Buffered:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting request_body_mode BUFFERED");
msg->set_request_body_mode(ProcessingMode::BUFFERED);
break;
case BodySendSetting::BufferedPartial:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting request_body_mode "
"BUFFERED_PARTIAL");
msg->set_request_body_mode(ProcessingMode::BUFFERED_PARTIAL);
break;
default:
RELEASE_ASSERT(false, "BodySendSetting not handled");
}
}
// 4. Randomize response_body_mode
if (provider_->ConsumeBool()) {
switch (provider_->ConsumeEnum<BodySendSetting>()) {
case BodySendSetting::None:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting response_body_mode NONE");
msg->set_response_body_mode(ProcessingMode::NONE);
break;
case BodySendSetting::Streamed:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting response_body_mode STREAMED");
msg->set_response_body_mode(ProcessingMode::STREAMED);
break;
case BodySendSetting::Buffered:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting response_body_mode BUFFERED");
msg->set_response_body_mode(ProcessingMode::BUFFERED);
break;
case BodySendSetting::BufferedPartial:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting response_body_mode "
"BUFFERED_PARTIAL");
msg->set_response_body_mode(ProcessingMode::BUFFERED_PARTIAL);
break;
default:
RELEASE_ASSERT(false, "BodySendSetting not handled");
}
}
// 5. Randomize request_trailer_mode
if (provider_->ConsumeBool()) {
switch (provider_->ConsumeEnum<HeaderSendSetting>()) {
case HeaderSendSetting::Default:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting request_trailer_mode DEFAULT");
msg->set_request_trailer_mode(ProcessingMode::DEFAULT);
break;
case HeaderSendSetting::Send:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting request_trailer_mode SEND");
msg->set_request_trailer_mode(ProcessingMode::SEND);
break;
case HeaderSendSetting::Skip:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting request_trailer_mode SKIP");
msg->set_request_trailer_mode(ProcessingMode::SKIP);
break;
default:
RELEASE_ASSERT(false, "HeaderSendSetting not handled");
}
}
// 6. Randomize response_trailer_mode
if (provider_->ConsumeBool()) {
switch (provider_->ConsumeEnum<HeaderSendSetting>()) {
case HeaderSendSetting::Default:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting response_trailer_mode DEFAULT");
msg->set_response_trailer_mode(ProcessingMode::DEFAULT);
break;
case HeaderSendSetting::Send:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting response_trailer_mode SEND");
msg->set_response_trailer_mode(ProcessingMode::SEND);
break;
case HeaderSendSetting::Skip:
ENVOY_LOG_MISC(trace, "Override ProcessingMode: setting response_trailer_mode SKIP");
msg->set_response_trailer_mode(ProcessingMode::SKIP);
break;
default:
RELEASE_ASSERT(false, "HeaderSendSetting not handled");
}
}
}
void ExtProcFuzzHelper::randomizeResponse(ProcessingResponse* resp, const ProcessingRequest* req) {
// Each of the following switch cases generate random data for 1 of the 7
// ProcessingResponse.response fields
switch (provider_->ConsumeEnum<ResponseType>()) {
// 1. Randomize request_headers message
case ResponseType::RequestHeaders: {
ENVOY_LOG_MISC(trace, "ProcessingResponse setting request_headers response");
CommonResponse* msg = resp->mutable_request_headers()->mutable_response();
randomizeCommonResponse(msg, req);
break;
}
// 2. Randomize response_headers message
case ResponseType::ResponseHeaders: {
ENVOY_LOG_MISC(trace, "ProcessingResponse setting response_headers response");
CommonResponse* msg = resp->mutable_response_headers()->mutable_response();
randomizeCommonResponse(msg, req);
break;
}
// 3. Randomize request_body message
case ResponseType::RequestBody: {
ENVOY_LOG_MISC(trace, "ProcessingResponse setting request_body response");
CommonResponse* msg = resp->mutable_request_body()->mutable_response();
randomizeCommonResponse(msg, req);
break;
}
// 4. Randomize response_body message
case ResponseType::ResponseBody: {
ENVOY_LOG_MISC(trace, "ProcessingResponse setting response_body response");
CommonResponse* msg = resp->mutable_response_body()->mutable_response();
randomizeCommonResponse(msg, req);
break;
}
// 5. Randomize request_trailers message
case ResponseType::RequestTrailers: {
ENVOY_LOG_MISC(trace, "ProcessingResponse setting request_trailers response");
HeaderMutation* header_mutation = resp->mutable_request_trailers()->mutable_header_mutation();
randomizeHeaderMutation(header_mutation, req, true);
break;
}
// 6. Randomize response_trailers message
case ResponseType::ResponseTrailers: {
ENVOY_LOG_MISC(trace, "ProcessingResponse setting response_trailers response");
HeaderMutation* header_mutation = resp->mutable_response_trailers()->mutable_header_mutation();
randomizeHeaderMutation(header_mutation, req, true);
break;
}
// 7. Randomize immediate_response message
case ResponseType::ImmediateResponse: {
ENVOY_LOG_MISC(trace, "ProcessingResponse setting immediate_response response");
ImmediateResponse* msg = resp->mutable_immediate_response();
randomizeImmediateResponse(msg, req);
break;
}
default:
RELEASE_ASSERT(false, "ProcessingResponse Action not handled");
}
}
grpc::Status ExtProcFuzzHelper::generateResponse(ProcessingRequest& req, ProcessingResponse& resp,
bool& immediate_close_grpc) {
logRequest(&req);
// The following blocks generate random data for the 9 fields of the
// ProcessingResponse gRPC message
// 1 - 7. Randomize response
// If true, immediately close the connection with a random Grpc Status.
// Otherwise randomize the response
if (provider_->ConsumeBool()) {
immediate_close_grpc = true;
ENVOY_LOG_MISC(trace, "Immediately Closing gRPC connection");
return randomGrpcStatusWithMessage();
} else {
ENVOY_LOG_MISC(trace, "Generating Random ProcessingResponse");
randomizeResponse(&resp, &req);
}
// 8. Randomize dynamic_metadata
// TODO(ikepolinsky): ext_proc does not support dynamic_metadata
// 9. Randomize mode_override
if (provider_->ConsumeBool()) {
ENVOY_LOG_MISC(trace, "Generating Random ProcessingMode Override");
ProcessingMode* msg = resp.mutable_mode_override();
randomizeOverrideResponse(msg);
}
ENVOY_LOG_MISC(trace, "Response generated, writing to stream.");
return grpc::Status::OK;
}
} // namespace ExternalProcessing
} // namespace HttpFilters
} // namespace Extensions
} // namespace Envoy
```
|
```c
/*
* Utilities about process handling - signal and subprocess (ex. pager)
*
*
* This software may be used and distributed according to the terms of the
*/
#include <assert.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>
#include "procutil.h"
#include "util.h"
static pid_t pagerpid = 0;
static pid_t peerpgid = 0;
static pid_t peerpid = 0;
static void forwardsignal(int sig) {
assert(peerpid > 0);
if (kill(peerpid, sig) < 0)
abortmsgerrno("cannot kill %d", peerpid);
debugmsg("forward signal %d", sig);
}
static void forwardsignaltogroup(int sig) {
/* prefer kill(-pgid, sig), fallback to pid if pgid is invalid */
pid_t killpid = peerpgid > 1 ? -peerpgid : peerpid;
if (kill(killpid, sig) < 0)
abortmsgerrno("cannot kill %d", killpid);
debugmsg("forward signal %d to %d", sig, killpid);
}
// On Mac, sigemptyset and friends can't return -1. Disable warnings.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunreachable-code"
static void handlestopsignal(int sig) {
sigset_t unblockset, oldset;
struct sigaction sa, oldsa;
if (sigemptyset(&unblockset) < 0)
goto error;
if (sigaddset(&unblockset, sig) < 0)
goto error;
memset(&sa, 0, sizeof(sa));
sa.sa_handler = SIG_DFL;
sa.sa_flags = SA_RESTART;
if (sigemptyset(&sa.sa_mask) < 0)
goto error;
forwardsignal(sig);
if (raise(sig) < 0) /* resend to self */
goto error;
if (sigaction(sig, &sa, &oldsa) < 0)
goto error;
if (sigprocmask(SIG_UNBLOCK, &unblockset, &oldset) < 0)
goto error;
/* resent signal will be handled before sigprocmask() returns */
if (sigprocmask(SIG_SETMASK, &oldset, NULL) < 0)
goto error;
if (sigaction(sig, &oldsa, NULL) < 0)
goto error;
return;
error:
abortmsgerrno("failed to handle stop signal");
}
static void handlechildsignal(int sig UNUSED_) {
if (peerpid == 0 || pagerpid == 0)
return;
/* if pager exits, notify the server with SIGPIPE immediately.
* otherwise the server won't get SIGPIPE if it does not write
* anything. (issue5278) */
if (waitpid(pagerpid, NULL, WNOHANG) == pagerpid)
kill(peerpid, SIGPIPE);
}
void setupsignalhandler(pid_t pid, pid_t pgid) {
if (pid <= 0)
return;
peerpid = pid;
peerpgid = (pgid <= 1 ? 0 : pgid);
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
/* deadly signals meant to be sent to a process group:
* - SIGHUP: usually generated by the kernel, when termination of a
* process causes that process group to become orphaned
* - SIGINT: usually generated by the terminal */
sa.sa_handler = forwardsignaltogroup;
sa.sa_flags = SA_RESTART;
if (sigemptyset(&sa.sa_mask) < 0)
goto error;
if (sigaction(SIGHUP, &sa, NULL) < 0)
goto error;
if (sigaction(SIGINT, &sa, NULL) < 0)
goto error;
/* terminate frontend by double SIGTERM in case of server freeze */
sa.sa_handler = forwardsignal;
sa.sa_flags |= SA_RESETHAND;
if (sigaction(SIGTERM, &sa, NULL) < 0)
goto error;
/* notify the worker about window resize events */
sa.sa_flags = SA_RESTART;
if (sigaction(SIGWINCH, &sa, NULL) < 0)
goto error;
/* forward user-defined signals */
if (sigaction(SIGUSR1, &sa, NULL) < 0)
goto error;
if (sigaction(SIGUSR2, &sa, NULL) < 0)
goto error;
/* propagate job control requests to worker */
sa.sa_handler = forwardsignal;
sa.sa_flags = SA_RESTART;
if (sigaction(SIGCONT, &sa, NULL) < 0)
goto error;
sa.sa_handler = handlestopsignal;
sa.sa_flags = SA_RESTART;
if (sigaction(SIGTSTP, &sa, NULL) < 0)
goto error;
/* get notified when pager exits */
sa.sa_handler = handlechildsignal;
sa.sa_flags = SA_RESTART;
if (sigaction(SIGCHLD, &sa, NULL) < 0)
goto error;
return;
error:
abortmsgerrno("failed to set up signal handlers");
}
void restoresignalhandler(void) {
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
sa.sa_handler = SIG_DFL;
sa.sa_flags = SA_RESTART;
if (sigemptyset(&sa.sa_mask) < 0)
goto error;
if (sigaction(SIGHUP, &sa, NULL) < 0)
goto error;
if (sigaction(SIGTERM, &sa, NULL) < 0)
goto error;
if (sigaction(SIGWINCH, &sa, NULL) < 0)
goto error;
if (sigaction(SIGCONT, &sa, NULL) < 0)
goto error;
if (sigaction(SIGTSTP, &sa, NULL) < 0)
goto error;
if (sigaction(SIGCHLD, &sa, NULL) < 0)
goto error;
/* ignore Ctrl+C while shutting down to make pager exits cleanly */
sa.sa_handler = SIG_IGN;
if (sigaction(SIGINT, &sa, NULL) < 0)
goto error;
peerpid = 0;
return;
error:
abortmsgerrno("failed to restore signal handlers");
}
#pragma GCC diagnostic pop
/* This implementation is based on ext/pager.py (post 369741ef7253)
* Return 0 if pager is not started, or pid of the pager */
pid_t setuppager(
const char* pagercmd,
const char* envp[],
int redirect_stderr) {
assert(pagerpid == 0);
if (!pagercmd)
return 0;
int pipefds[2];
if (pipe(pipefds) < 0)
return 0;
pid_t pid = fork();
if (pid < 0)
goto error;
if (pid > 0) {
close(pipefds[0]);
if (dup2(pipefds[1], fileno(stdout)) < 0)
goto error;
if (redirect_stderr && isatty(fileno(stderr))) {
if (dup2(pipefds[1], fileno(stderr)) < 0)
goto error;
}
close(pipefds[1]);
pagerpid = pid;
return pid;
} else {
dup2(pipefds[0], fileno(stdin));
close(pipefds[0]);
close(pipefds[1]);
int r = execle("/bin/sh", "/bin/sh", "-c", pagercmd, NULL, envp);
if (r < 0) {
abortmsgerrno("cannot start pager '%s'", pagercmd);
}
return 0;
}
error:
close(pipefds[0]);
close(pipefds[1]);
abortmsgerrno("failed to prepare pager");
return 0;
}
void waitpager(void) {
if (pagerpid == 0)
return;
/* close output streams to notify the pager its input ends */
fclose(stdout);
fclose(stderr);
while (1) {
pid_t ret = waitpid(pagerpid, NULL, 0);
if (ret == -1 && errno == EINTR)
continue;
break;
}
}
```
|
```yaml
# This YAML configuration file holds the default values used for configuring 3D sensors.
# The name of this file shouldn't be changed, or else the Setup Assistant won't detect it.
# Values may not be ideal defaults, original source unclear.
sensors:
- sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater
point_cloud_topic: /head_mount_kinect/depth_registered/points
max_range: 5.0
point_subsample: 1
padding_offset: 0.1
padding_scale: 1.0
max_update_rate: 1.0
filtered_cloud_topic: filtered_cloud
- sensor_plugin: occupancy_map_monitor/DepthImageOctomapUpdater
image_topic: /head_mount_kinect/depth_registered/image_raw
queue_size: 5
near_clipping_plane_distance: 0.3
far_clipping_plane_distance: 5.0
shadow_threshold: 0.2
padding_scale: 4.0
padding_offset: 0.03
max_update_rate: 1.0
filtered_cloud_topic: filtered_cloud
```
|
Doctor Omega (French: Le Docteur Oméga) is a 1906 science fiction novel by French writer Arnould Galopin. Inspired by H. G. Wells's novels The War of the Worlds and The First Men in the Moon, it follows the adventures of the eponymous scientist Doctor Omega and his companions in the spacecraft Cosmos.
Overview
The novel takes place in or around 1906, in an unidentified village in Normandy, then later takes the reader to Mars. The main protagonist, Doctor Omega, is the mysterious inventor of a projectile-shaped spacecraft dubbed Cosmos which can also function on land and under water. Cosmos is 13 meters long and 3 meters in diameter. It is made from a substance called or (depending on the edition) which repels space and time and enables it to travel in the aether. Its interior is divided into four sections, each lit by electric lights powered by a generator run by an eight-cylinder motor. The floors are all suspended upon universal joints in order to maintain a normal level. The portholes are made of transparent stellite. In addition to the bridge, the other sections of the ship include a storeroom, an armory, and the crew's sleeping quarters.
Doctor Omega's companions in his travels are two Frenchmen: his neighbour Denis Borel (the narrator), and his worker, the hulkish Fred (no last name given). Doctor Omega and his two companions travel to Mars, where they first land in one of the Martian seas, where they perform some underwater exploration during which they encounter phosphorescent fish and aggressive reptilian mermen. Back on the surface they are attacked by savage dwarf-like beings with long, tentacled arms. Later, they explore the Red Valley in which bat-men have developed artificial wings to cohabit with deadly snakes. They meet another race of civilized macrocephalic gnomes, and are taken before their King, in the city of Fire. They learn to communicate with these Macrocephales, and help them in their war against their Southern enemies, the Cacocytes. The Macrocephales wish to keep Doctor Omega and his companions prisoners on Mars. Doctor Omega and his companions manage to broadcast an SOS however, and are then rescued by the equally mysterious Professor Helvetius. They eventually return to Earth, with the Martian Tiziraou.
Editions
The first edition was published by Librairie Mondiale in Paris, 1906, with illustrations by E. Bouard. The book was later reprinted under the title Les Chercheurs d'Inconnu: Aventures Fantastiques d'un Jeune Parisien (Seekers of the Unknown: The Fantastic Adventures of a Young Parisian) as a 12-issue pulp magazine by Tallandier, Paris, Nos. 1–9, 1908; Nos. 10–12, 1909. For that edition, Galopin changed the name of the ship to "Excelsior" and the substance to "stellite". He also rewrote and expanded several chapters and tried to appeal to a more juvenile audience. A reprint of the first edition was published by Albin Michel in 1949, with illustrations by Rapeno.
In 2003, Los Angeles's Black Coat Press published an edition "adapted and retold" by Jean-Marc Lofficier and Randy Lofficier, with a cover by Gil Formosa. does not contain any illustrations; (Collector's Edition) contains a selection of illustrations by Bouard from the first edition. This edition is a free translation, or adaptation, of the first French edition. The credit adapted and retold was first coined by Philip José Farmer for his 1976 adaptation of the J.-H. Rosny novel Ironcastle. In this instance, some plot inconsistencies were removed or fixed; some scientific notions were updated or corrected; some racist or inappropriate language was deleted. Further, homages and references to the fictional characters Arsène Lupin, Dr. Caresco, and Madeline were inserted. Additionally, references were added to imply that Doctor Omega was the Doctor from Doctor Who, mainly because of the coincidental - but real - similarities between the two characters (especially the First Doctor, played by William Hartnell from 1963 to 1966). Frequent Doctor Who writer Terrance Dicks provided a foreword, and the cover illustration was changed to one similar to the 1973 Target Books novelization of The Daleks.
In 2009, French publisher Riviere Blanche reprinted the first edition, with selected illustrations from Bouard and Rapeno, a new foreword by Jean-Marc Lofficier, French translations of Terrance Dicks's foreword, and stories by Chris Roberson, Matthew Baugh, Travis Hiltz and Serge Lehman featuring Dr. Omega; cover by Gil Formosa. In 2011, the American publisher Black Cat Press printed an unabridged English translation with the original illustrations by E. Bouard. In 2014, Explore Multimedia released an unabridged four-disc English audiobook billed as "the possible origins of Doctor Who". Narrated by John Guilor, who supplied the voice of Hartnell's Doctor in episode "The Day of the Doctor").
In 2018, The student's publishers Méli-Mélo republished the book too.
Other appearances
Doctor Omega is mentioned and Tiziraou appears in a panel of The New Traveler's Almanac of The League of Extraordinary Gentlemen, Volume II.
Doctor Omega appears in several stories in the ongoing anthology Tales of the Shadowmen.
A sequel volume, Doctor Omega and the Shadowmen collect the stories from the above collections, along with new ones.
References
External links
The French Wold Newton Universe - Doctor Omega
Black Coat Press, American publisher of Doctor Omega
Black Cat Press, Doctor Omega included in its Conquest of Space reprint series.
1906 science fiction novels
1906 French novels
Characters in French novels of the 20th century
Omega, Doctor
First Doctor novels
French science fiction novels
Novels set on Mars
Novels set in Normandy
Space exploration novels
|
Budysko () is a village in Ukraine. Founded in 1882, it is located in Zviahel Raion, Zhytomyr Oblast. Its territorial location code (KOATUUI) is 1820656301. Its population is 15 people as of 2001. Its postal index is 12742. Its telephone calling code is 4144
Village council
The village council is located at 12734, Ukraine, Zhytomyr Oblast, Baranivka Raion, township (urban-type settlement) Polyanka
External links
Budysko on website High Rada of Ukraine
Populated places established in 1882
Villages in Zviahel Raion
|
Mary Jeannette Wilson (January 2, 1937 – May 25, 2020) was the first African-American senior zookeeper at the Maryland Zoo in Baltimore.
Early life
Mary J. Wilson was born in West Baltimore, Maryland. She had two siblings, one older and one younger. Her parents were Willie Wilson and Mary Henry. Her mother Mary died of diphtheria when Wilson was only five years old. She graduated from Paul Laurence Dunbar High School.
Career
Wilson began working at the then Baltimore Zoo in 1961. She was hired by Arthur R. Watson, who was head of the zoo from 1948 until 1980. While most women zookeepers at the time were assigned to work with smaller animals, Wilson worked with mammals from the beginning of her career, specializing in gorillas, cats and elephants. She was known for bringing home baby animals to care for them. She retired in 1999 after working 38 years at the zoo. The zoo still has two otters named after her: Mary and Wilson.
Health and death
In July 2019, Wilson began to show signs of Alzheimer's disease.
On April 1, 2020, she moved to Genesis Healthcare Patapsco Valley Center in Randallstown, Maryland. On May 4, 2020, she was diagnosed with COVID-19 during the COVID-19 pandemic in Maryland, and was admitted to Northwest Hospital on May 8. She died on May 25 after being unresponsive for 14 days. She was survived by her daughter, Sharron Wilson Jackson, who was the first African-American female senior zookeeper at the Henry Doorly Zoo and Aquarium, in Omaha, Nebraska, and by a grandson, Felipe Herrara.
References
Zoo directors
1937 births
2020 deaths
People from Baltimore
20th-century African-American women
People with Alzheimer's disease
21st-century African-American women
21st-century African-American people
Deaths from the COVID-19 pandemic in Maryland
|
Eve Gil (born 1968) is a Mexican writer and journalist from Hermosillo, Sonora. She is one of the major "NAFTA generation" authors. Her work has won a number of awards such as Premio La Gran Novela Sonorense in 1993, the Premio Nacional de Periodismo Fernando Benítez in 1994, the Concurso de Libro Sonorense in 1994, 1996 and 2006, and the Premio Nacional de Cuento Efraín Huerta in 2006.
Novels
Hombres necios, Instituto Sonorense de Cultura, 1996.
El suplicio de Adán, Instituto Sonorense de Cultura, 1998.
Réquiem por una muñeca rota (Cuento para asustar al lobo), Fondo Editorial Tierra Adentro, 2000.
Cenotafio de Beatriz, RD Editores, Seville, Spain, 2005.
Sho-shan y la Dama Oscura, Santillana Ediciones Generales, 2009.
Tinta Violeta Santillana Ediciones Generales, 2011
Réquiem para una muñeca rota, Santillana Ediciones Generales, 2013
Doncella Roja Santillana Ediciones Generales, 2013
Short fiction
Sueños de Lot, Editorial Porrúa, 2007
La reina baila hasta morir, Ediciones Fósforo, 2009.
El perrito de Lady Chatterlay (Collection of the short stories published previously in "Sueños de Lot" and "La reina baila hasta morir"), 2010.
Poetry
Raíz y canto, Instituto Sonorense de Cultura, 1995.
Selected anthologies
Jóvenes Creadores del FONCA 1995-96, Conaculta, 1996
Novísimos cuentos de la república mexicana, Ed. Mayra Inzunza, Fondo Editorial Tierra Adentro, 2004.
Con un vuelco en el corazón, Editorial Garabatos, 2006
Requiem for a Broken Doll
Requiem for a Broken Doll tells the story of Moramay, a thirteen-year-old girl growing up in the early 80's in Mexico City. An English translation is underway. Excerpts from the novel have appeared in BorderSenses, Fairy Tale Review, and Words without Borders. http://wordswithoutborders.org/article/damned-spring/
References
External links
Eve Gil's blog
Moramay's website
Damned Spring
1968 births
Living people
Mexican women novelists
Mexican bloggers
People from Hermosillo
Mexican women bloggers
Writers from Sonora
|
Galatians 6 is the sixth (and the last) chapter of the Epistle to the Galatians in the New Testament of the Christian Bible. It is authored by Paul the Apostle for the churches in Galatia, written between 49–58 CE. This chapter contains Paul's exhortations and also a summary of the key points in the epistle.
Text
The original text was written in Koine Greek. This chapter is divided into 18 verses.
Textual witnesses
Some early manuscripts containing the text of this chapter are:
Papyrus 46 (~AD 200)
Codex Vaticanus (325-350)
Codex Sinaiticus (330-360)
Papyrus 99 (~400; extant verses 1-15)
Codex Alexandrinus (400-440)
Codex Ephraemi Rescriptus (~450; complete)
Codex Claromontanus (~550)
Work for the Good of All (6:1–10)
This section, in every verse, includes exhortations, which are related to the particular needs of the churches in Galatia.
Verse 2
Bear one another’s burdens, and so fulfill the law of Christ.
"Bear one another's burdens": can be done by gentle reprove, by comforting those stressed with guilt, by sympathizing in others' sorrow, by praying to God to manifest his pardoning grace, by forgiving other people, when they committed faults, or by accommodating their weakness, by administering help and relief, whether temporal or spiritual, and bear a part with them in their griefs.
"Fulfil the law of Christ": To "fulfill" here to "do" or to "act" in obedience. "The Law of Christ" is "to love one another" () in contrast to "the law of Moses". In Judaism, as "Christ" means "Messiah", the so-called "law of the Messiah" is considered preferable to any other.
Verse 7
Do not be deceived: God is not mocked, for whatever one sows, that will he also reap.
Verse 8
For he who sows to his flesh will of the flesh reap corruption, but he who sows to the Spirit will of the Spirit reap everlasting life.
Verse 9
And let us not grow weary while doing good, for in due season we shall reap if we do not lose heart.
Conclusion (6:11–18)
Unlike his other epistles, Paul does not include personal greetings in the end of the epistle. Nonetheless, this part holds the summary and "the hermeneutical key to the whole letter", consisting some key points already discussed previously, but here are emphasized again, such as the topic of 'the new creation' with abolished distinction between the circumcised and uncircumcised.
See also
Related Bible parts: Job 4, Proverbs 11, 2 Corinthians 9, Galatians 1.
References
Bibliography
External links
King James Bible - Wikisource
English Translation with Parallel Latin Vulgate
Online Bible at GospelHall.org (ESV, KJV, Darby, American Standard Version, Bible in Basic English)
Multiple bible versions at Bible Gateway (NKJV, NIV, NRSV etc.)
06
|
Kungshamns IF is a Swedish football club located in Kungshamn.
Background
Kungshamns IF currently plays in Division 4 Bohuslän/Dalsland which is the sixth tier of Swedish football. They play their home matches at the Kungshamnsvallen in Kungshamn.
The club is affiliated to Bohusläns Fotbollförbund. The second team, Sotenäs FC, play in Division 6. Kungshamns IF have competed in the Svenska Cupen on 19 occasions and have played 25 matches in the competition.
Season to season
Footnotes
External links
Kungshamns IF - Official website
Kungshamns IF on Facebook
Football clubs in Västra Götaland County
Association football clubs established in 1919
1919 establishments in Sweden
|
HitRadio Veronica is a Dutch radio station that broadcasts over the internet. On December 27, 2006 at 12:00pm TMF Radio was officially launched. TMF Radio until October 1, 2008 had a partnership between Sky Radio Group (Sienna Holding BV) and MTV Networks Benelux (TMF) and transmitted mostly hits from the cable frequency of Hitradio BV, which was acquired permanently in the spring of 2007 by Sky Radio Group and MTV Networks BV. MTV Networks has split on October 1, 2008 from TMF Radio and since then Sky Radio Group is the sole owner of the station, which now bears the name HitRadio Veronica. On January 3, 2011 the station ceased to listen to the broadcasts via cable and since the station is only through Internet.
The launch of the radio station gave quite a stir in the media. Ali B. (Ali Bouali) held on behalf of TMF, a fireworks launch with Yesser Roshdi ('Yes-R') and MTV VJs Miljouschka Witzenhausen and Valerio Zeno in accordance with TMF's 'most boring town in the Netherlands'; Staphorst. For this fireworks show MTV Networks BV had no license and was later claimed by the municipality for holding the event near a burial site of a 19-year-old. Staphorst wanted to sue Yes-R and Ali B for illegally using fireworks. It was found later on that the funeral of the 19-year-old boy was long before the fireworks show, so the charges were dropped.
History of branding
On 1 April 2009 it was announced that the name TMF Radio is renamed on April 3, 2009 to TMF HitRadio. After MTV Networks had retired on October 1, 2008 from the radio station, the Telegraaf Media Group decided to change the name to TMF HitRadio. No later than October 1, 2009 TMF Radio was scheduled to be renamed to HitRadio. The deadline for this was extended to November 2009.
On September 18, Sky Radio Group announced to change the name of TMF HitRadio per October 1, 2009 to HitRadio TMS, where TMS stood for "The Music Station".
At the end of September, Sky Radio Group announced that the scheduled name change was canceled. Ultimately, Sky Radio Group decided to change the name HitRadio. This name change is per 1 November 2009 implemented. Between July and December 1992, Sky Radio Group has been active with a short cable station called HitRadio. This radio station was on December 11, 1992 Radio 538. From that period, Sky Radio Group trademark of the departed to start again on 1 November 2009 'HitRadio' left over.
On September 1, 2010 the name was changed again, this time to HitRadio Veronica. Since January 3, 2011, the radio station only to hear over the internet rather than via cable. The name HitRadio Veronica has existed before, in 1995 when Veronica was also the commercial station HitRadio Veronica. HitRadio Veronica was the successor of HitRadio 1224. The station went on September 1, 1995 start on the medium wave frequency 828 kHz's (362 m) and 1224 kHz (245 m).
Logos
See also
List of radio stations in the Netherlands
References
External links
Official website
Radio stations in the Netherlands
Mass media in Naarden
Radio stations established in 2006
|
Takht Singh, GCSI (6 June 1819 – 13 February 1873) was first the regent (1839–1841) and the final Maharaja of Ahmednagar (Himmatnagar) 1841–1843 as a result of an agreement with the British. Once he ceded Ahmednagar (Himmatnagar) to Idar, he was recognized as Maharaja of Jodhpur (1843–1873).
He was born in Ahmednagar (Himmatnagar), the second son of Karan Singh and grandson of Sagram Singh, the Maharaja of Ahmednagar (Himmatnagar) from 1798 to 1835. He had little prospect of ascending the throne, yet after the death of his brother, Prithi Singh in 1839, he became the regent over the whole state and served as such until the birth of his brother's son, Balwant Singh, who was proclaimed ruler at his birth. Takht Singh then became the new ruler's regent and served as such until the death of his nephew on 23 September 1841, when he became the Maharaja of Ahmednagar (Himmatnagar).
However, two years into his reign in 1843, Man Singh, the Maharaja of Jodhpur died. He was persuaded by his widows to take the succession as he was a member of the Rathore Dynasty through his grandfather, Sagram Singh, the Maharaja of Idar, who himself was the son of Anand Singh, the first Maharaja of Idar and a younger son of Maharaja Ajit Singh, Maharaja of Jodhpur, however, he had to cede Ahmednagar (Himmatnagar) back to the state of Idar to be recognized in Jodhpur by the British.
So, on 29 October 1843, he ascended the gadi at the Sringar Chowki in Mehrangarh. Later in his life, he served loyal service to British at the time of Indian Mutiny of 1857 and in 1862 he received a sanad of adoption. During his life he was a chronic womanizer.;He married 30 wives. He died in Jodhpur on 13 February 1873 and was cremated at Mandore. He was succeeded by his eldest son Jaswant Singh II in Jodhpur, while his third son, Pratap Singh would go on to become the Maharaja of Idar. His first-born daughter, Kumari Chand Kanwar Bai Lal, would be married to Maharaja Sawai Ram Singh II, the Maharaja of Jaipur.
References
1819 births
1873 deaths
Knights Grand Commander of the Order of the Star of India
Takht
Indian knights
19th-century regents
|
```css
body {
overflow-x: hidden;
}
.navbar-custom {
padding: 15px;
background-color: #F1F1F1;
margin-bottom: 0px;
}
.loklak-brand {
font-family: "Courier New";
font-size: 35px;
height: 50px;
padding: 15px 0;
text-decoration: none;
color: rgb(51,51,51);
line-height: 20px;
}
.loklak-header {
color: #C8254D;
}
.loklak-brand:hover {
text-decoration: none;
color: rgb(51,51,51);
}
.menu-drawer {
display: none;
position: fixed;
padding: 12px;
color: white;
background-color: #C8254D ;
border-radius: 10%;
margin-top: 80px;
margin-left: 5px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
cursor: pointer;
transition: all 0.5s;
}
.menu-drawer:hover {
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}
.sidebar {
position: fixed;
width: 17%;
background-color: #F1F1F1;
height: 100%;
overflow-y: auto;
margin-top: 81px;
transition: all 0.3s;
}
.sidebar-header-close {
color: white;
cursor: pointer;
margin-left: 80px;
display: none;
}
.sidebar-header {
background-color: #8BC34A;
color: white;
display: flex;
flex-direction: row;
align-items: center;
justify-content: start;
padding-left: 16px;
padding-top: 5px;
padding-bottom: 5px;
}
.sidebar-header-image {
margin-right: 20px;
}
.menu-list {
margin-left: 0px;
padding-left: 0px;
}
.menu-list-item {
list-style: none;
margin-top: 0px;
padding-top: 0px;
}
.menu-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: start;
text-decoration: none;
color:rgb(119,119,119);
background-color: #e6e6e6;
}
.menu-item:hover {
background-color: grey;
color:white;
text-decoration: none;
}
.selected {
background-color: grey;
color: white;
}
.category-image {
margin-right: 20px;
padding-top: 10px;
padding-bottom: 6px;
padding-left: 20px;
padding-right: 10px;
}
.menu-list {
margin-bottom: 0px;
}
.category-footer {
background-color: #F1F1F1;
margin-top: 10px;
margin-left: 10px;
}
.similar-apps-header {
color: rgb(119,119,119);
}
.similar-apps-list {
display: flex;
flex-direction: column;
}
.card a{
color: rgb(119,119,119);
text-decoration: none;
transition: all 0.5s;
}
.card {
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: all 0.3s;
margin-top: 16px;
width: 60%;
}
.card:hover {
box-shadow: 0 16px 32px 0 rgba(0,0,0,0.2);
color: #212121;
}
.card a:hover {
color: #212121;
}
.card-container {
padding: 2px 16px;
}
.similar-app-image {
width: 100%;
}
.similar-apps {
margin-top: 120px;
margin-bottom: 20px;
margin-right: -100px;
margin-left: 50px;
}
.app-data {
box-shadow: 0 4px 8px 2px rgba(0,0,0,0.2);
margin-top: 120px;
margin-left: -70px;
padding-bottom: 50px;
border-radius: 4px;
}
.app-image-and-info {
display: flex;
flex-direction: row;
justify-content: space-between;
padding-left:26px;
padding-bottom: 50px;
padding-top: 26px;
flex-wrap: wrap;
}
.app-info {
margin-right: 26px;
}
.app-name {
color: #212121;
}
.app-headline {
color: #616161;
}
.author-link {
color: #757575;
transition: all 0.5s;
text-decoration: none;
}
.author-link:hover {
color: #424242;
text-decoration: none;
}
.short-desc {
margin-top: 26px;
color: #616161;
}
.try-now {
display: block;
float: right;
margin-top: 40px;
background-color: #C8254D;
color: white;
text-decoration: none;
border-radius: 4px;
padding: 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: all 0.5s;
}
.try-now:hover {
color: white;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
text-decoration: none;
}
.app-carousel {
padding-left: 26px;
padding-right: 26px;
}
.get-started {
padding-left: 26px;
padding-right: 26px;
margin-top: 40px;
}
.started-header {
color: #616161;
}
.get-started-body {
color: #424242;
}
.info-header {
color: #212121;
}
.add-info {
margin-bottom: 20px;
}
.dropdown {
cursor: pointer;
transition: all 0.5s;
}
.dropdown:hover {
color: #bdbdbd;
}
.tech-item {
cursor: text;
color: #424242;
padding-left: 8px;
}
.mail {
font-size: 15px;
margin: 2px;
}
.not-found {
position: absolute;
top: 12%;
left: 30%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
font-family: "Courier New";
text-decoration: none;
color: rgb(51,51,51);
min-height: 400px;
text-align: center;
margin: 20px;
}
.brand-and-image {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
min-height: 240px;
}
.error-404 {
font-size: 28px;
}
.contribute {
color: black;
margin: 20px;
text-decoration: none;
}
.contribute a {
color: rgb(119, 119, 119);
text-decoration: none;
}
.contribute a:hover {
color: black;
}
@media (max-width: 960px) {
.sidebar {
width: 0px;
z-index: 1;
}
.similar-apps {
margin-right: -100px;
margin-left: 50px;
}
.app-data {
margin-left: 16px;
margin-right: 16px;
margin-bottom: 0px;
}
.try-now {
float: left;
}
.menu-drawer {
display: block;
z-index: 1;
}
.sidebar-header-close {
display: block;
}
}
@media (max-width: 500px) {
.similar-apps {
margin-right: -100px;
margin-left: 50px;
}
.app-info {
margin-left: 0px;
}
}
@media (max-width: 350px) {
.loklak-brand {
font-size: 24px;
}
.app-image {
margin-right: 26px;
}
}
```
|
The Wing Luke Museum is a museum in Seattle, Washington, United States, which focuses on the culture, art and history of Asian Pacific Americans. It is located in the city's Chinatown-International District. Established in 1967, the museum is a Smithsonian Institution affiliate and the only pan-Asian Pacific American community-based museum in the country. It has relocated twice since its founding, most recently to the East Kong Yick Building in 2008. In February 2013 it was recognized as one of two dozen affiliated areas of the U.S. National Park Service.
Collections
The Wing Luke Museum's collections have over 18,000 items, including artifacts, photographs, documents, books, and oral histories. Parts of the museum's collections are viewable through its online database. There is an oral history lab inside the museum for staff and public use.
Exhibits
The Wing houses temporary and permanent exhibitions related to Asian American history, art, and cultures. The museum represents over 26 ethnic groups.
The museum uses a community-based exhibition model to create exhibits. As part of the community-based process, the museum conducts outreach into communities to find individuals and organizations to partner with. The museum then forms a Community Advisory Committee (CAC) to determine the exhibit's direction. Staff at the museum conduct research, gather materials, and record relevant oral histories under the guidance of the CAC. The CAC also determines the exhibit's overall design and content. This process can take 12 to 18 months.
In 1995, the Wing Luke Museum received the Institute for Museum and Library Services National Award for Museum Service for its exhibit process. Award-winning exhibits by the museum include Do You Know Bruce?, a 2014 exhibit on Bruce Lee. The Association of King County Historical Organizations awarded Do You Know Bruce? the 2015 Exhibit Award.
History
The museum is named for Seattle City Council member Wing Luke, the first Asian American elected to public office in the Pacific Northwest. Luke suggested the need for a museum in the Chinatown-International District in the early 1960s to preserve the history of the rapidly changing neighborhood. After Luke died in a small plane crash in 1965, friends and supporters donated money to start the museum he envisioned. The Wing Luke Memorial Museum, as it was first named, opened in 1967 in a small storefront on 8th Avenue.
Initially, the museum focused on Asian folk art, but soon expanded its programming to reflect the diversity of the local community. The museum exhibited the work of emerging local artists, and by the 1980s pan-Asian exhibits made by community volunteers became central to the museum.
In 1987 the Wing Luke Museum moved to a larger home on 7th Avenue and updated its name to Wing Luke Asian Museum. It achieved national recognition in the 1990s under the direction of local journalist Ron Chew, a pioneer of the community-based model of exhibit development that placed personal experiences at the center of exhibit narratives. Today the museum continues to present exhibits and programs that promote social justice, multicultural understanding, and tolerance.
In 2008 the museum moved to a larger building at 719 South King Street, in the renovated 1910 East Kong Yick Building. The Museum continued addressing civil rights and social justice issues, while preserving historic spaces within the building including the former Gee How Oak Tin Association room, the Freeman SRO Hotel, a Canton Alley family apartment, and the Yick Fung Mercantile.
In 2010 the museum changed its name to the Wing Luke Museum of the Asian Pacific American Experience, informally "The Wing".
Nine of the museum's windows were destroyed on September 14, 2023, in a crime that was described as "racially motivated".
Location
Building
The East Kong Yick Building, where the Museum is located, along with the West Kong Yick Building, were funded by 170 Chinese immigrants in 1910. In addition to storefronts, the East Kong Yick Building contained the Freeman Hotel, which was used by Chinese, Japanese, and Filipino immigrants until the 1940s. The museum's galleries now share the building with re-creations of the Gee How Oak Tin Association's meeting room, kitchens, and apartments that were inside the hotel. The museum also preserves the contents of a general store, Yick Fung Co., which the owner donated in its entirety.
Neighborhood
The museum is in Seattle's Chinatown-International District next to Canton Alley, historically a residential, commercial, and communal area. The Wing runs Chinatown Discovery Tours, a tour service founded in 1985 that takes visitors to significant sites within the neighborhood.
References
External links
Art museums and galleries in Washington (state)
Asian art museums in the United States
Asian-American art
Asian-American culture in Seattle
Asian-American issues
Asian-American organizations
Chinese-American museums
Ethnic museums in Washington (state)
Museums established in 1967
Museums in Seattle
National Park Service
Chinatown–International District, Seattle
1967 establishments in Washington (state)
|
Aerodynamics ( aero (air) + (dynamics)) is the study of the motion of air, particularly when affected by a solid object, such as an airplane wing. It involves topics covered in the field of fluid dynamics and its subfield of gas dynamics, and is an important domain of study in aeronautics. The term aerodynamics is often used synonymously with gas dynamics, the difference being that "gas dynamics" applies to the study of the motion of all gases, and is not limited to air. The formal study of aerodynamics began in the modern sense in the eighteenth century, although observations of fundamental concepts such as aerodynamic drag were recorded much earlier. Most of the early efforts in aerodynamics were directed toward achieving heavier-than-air flight, which was first demonstrated by Otto Lilienthal in 1891. Since then, the use of aerodynamics through mathematical analysis, empirical approximations, wind tunnel experimentation, and computer simulations has formed a rational basis for the development of heavier-than-air flight and a number of other technologies. Recent work in aerodynamics has focused on issues related to compressible flow, turbulence, and boundary layers and has become increasingly computational in nature.
History
Modern aerodynamics only dates back to the seventeenth century, but aerodynamic forces have been harnessed by humans for thousands of years in sailboats and windmills, and images and stories of flight appear throughout recorded history, such as the Ancient Greek legend of Icarus and Daedalus. Fundamental concepts of continuum, drag, and pressure gradients appear in the work of Aristotle and Archimedes.
In 1726, Sir Isaac Newton became the first person to develop a theory of air resistance, making him one of the first aerodynamicists. Dutch-Swiss mathematician Daniel Bernoulli followed in 1738 with Hydrodynamica in which he described a fundamental relationship between pressure, density, and flow velocity for incompressible flow known today as Bernoulli's principle, which provides one method for calculating aerodynamic lift. In 1757, Leonhard Euler published the more general Euler equations which could be applied to both compressible and incompressible flows. The Euler equations were extended to incorporate the effects of viscosity in the first half of the 1800s, resulting in the Navier–Stokes equations. The Navier–Stokes equations are the most general governing equations of fluid flow but are difficult to solve for the flow around all but the simplest of shapes.
In 1799, Sir George Cayley became the first person to identify the four aerodynamic forces of flight (weight, lift, drag, and thrust), as well as the relationships between them, and in doing so outlined the path toward achieving heavier-than-air flight for the next century. In 1871, Francis Herbert Wenham constructed the first wind tunnel, allowing precise measurements of aerodynamic forces. Drag theories were developed by Jean le Rond d'Alembert, Gustav Kirchhoff, and Lord Rayleigh. In 1889, Charles Renard, a French aeronautical engineer, became the first person to reasonably predict the power needed for sustained flight. Otto Lilienthal, the first person to become highly successful with glider flights, was also the first to propose thin, curved airfoils that would produce high lift and low drag. Building on these developments as well as research carried out in their own wind tunnel, the Wright brothers flew the first powered airplane on December 17, 1903.
During the time of the first flights, Frederick W. Lanchester, Martin Kutta, and Nikolai Zhukovsky independently created theories that connected circulation of a fluid flow to lift. Kutta and Zhukovsky went on to develop a two-dimensional wing theory. Expanding upon the work of Lanchester, Ludwig Prandtl is credited with developing the mathematics behind thin-airfoil and lifting-line theories as well as work with boundary layers.
As aircraft speed increased designers began to encounter challenges associated with air compressibility at speeds near the speed of sound. The differences in airflow under such conditions lead to problems in aircraft control, increased drag due to shock waves, and the threat of structural failure due to aeroelastic flutter. The ratio of the flow speed to the speed of sound was named the Mach number after Ernst Mach who was one of the first to investigate the properties of the supersonic flow. Macquorn Rankine and Pierre Henri Hugoniot independently developed the theory for flow properties before and after a shock wave, while Jakob Ackeret led the initial work of calculating the lift and drag of supersonic airfoils. Theodore von Kármán and Hugh Latimer Dryden introduced the term transonic to describe flow speeds between the critical Mach number and Mach 1 where drag increases rapidly. This rapid increase in drag led aerodynamicists and aviators to disagree on whether supersonic flight was achievable until the sound barrier was broken in 1947 using the Bell X-1 aircraft.
By the time the sound barrier was broken, aerodynamicists' understanding of the subsonic and low supersonic flow had matured. The Cold War prompted the design of an ever-evolving line of high-performance aircraft. Computational fluid dynamics began as an effort to solve for flow properties around complex objects and has rapidly grown to the point where entire aircraft can be designed using computer software, with wind-tunnel tests followed by flight tests to confirm the computer predictions. Understanding of supersonic and hypersonic aerodynamics has matured since the 1960s, and the goals of aerodynamicists have shifted from the behaviour of fluid flow to the engineering of a vehicle such that it interacts predictably with the fluid flow. Designing aircraft for supersonic and hypersonic conditions, as well as the desire to improve the aerodynamic efficiency of current aircraft and propulsion systems, continues to motivate new research in aerodynamics, while work continues to be done on important problems in basic aerodynamic theory related to flow turbulence and the existence and uniqueness of analytical solutions to the Navier–Stokes equations.
Fundamental concepts
Understanding the motion of air around an object (often called a flow field) enables the calculation of forces and moments acting on the object. In many aerodynamics problems, the forces of interest are the fundamental forces of flight: lift, drag, thrust, and weight. Of these, lift and drag are aerodynamic forces, i.e. forces due to air flow over a solid body. Calculation of these quantities is often founded upon the assumption that the flow field behaves as a continuum. Continuum flow fields are characterized by properties such as flow velocity, pressure, density, and temperature, which may be functions of position and time. These properties may be directly or indirectly measured in aerodynamics experiments or calculated starting with the equations for conservation of mass, momentum, and energy in air flows. Density, flow velocity, and an additional property, viscosity, are used to classify flow fields.
Flow classification
Flow velocity is used to classify flows according to speed regime. Subsonic flows are flow fields in which the air speed field is always below the local speed of sound. Transonic flows include both regions of subsonic flow and regions in which the local flow speed is greater than the local speed of sound. Supersonic flows are defined to be flows in which the flow speed is greater than the speed of sound everywhere. A fourth classification, hypersonic flow, refers to flows where the flow speed is much greater than the speed of sound. Aerodynamicists disagree on the precise definition of hypersonic flow.
Compressible flow accounts for varying density within the flow. Subsonic flows are often idealized as incompressible, i.e. the density is assumed to be constant. Transonic and supersonic flows are compressible, and calculations that neglect the changes of density in these flow fields will yield inaccurate results.
Viscosity is associated with the frictional forces in a flow. In some flow fields, viscous effects are very small, and approximate solutions may safely neglect viscous effects. These approximations are called inviscid flows. Flows for which viscosity is not neglected are called viscous flows. Finally, aerodynamic problems may also be classified by the flow environment. External aerodynamics is the study of flow around solid objects of various shapes (e.g. around an airplane wing), while internal aerodynamics is the study of flow through passages inside solid objects (e.g. through a jet engine).
Continuum assumption
Unlike liquids and solids, gases are composed of discrete molecules which occupy only a small fraction of the volume filled by the gas. On a molecular level, flow fields are made up of the collisions of many individual of gas molecules between themselves and with solid surfaces. However, in most aerodynamics applications, the discrete molecular nature of gases is ignored, and the flow field is assumed to behave as a continuum. This assumption allows fluid properties such as density and flow velocity to be defined everywhere within the flow.
The validity of the continuum assumption is dependent on the density of the gas and the application in question. For the continuum assumption to be valid, the mean free path length must be much smaller than the length scale of the application in question. For example, many aerodynamics applications deal with aircraft flying in atmospheric conditions, where the mean free path length is on the order of micrometers and where the body is orders of magnitude larger. In these cases, the length scale of the aircraft ranges from a few meters to a few tens of meters, which is much larger than the mean free path length. For such applications, the continuum assumption is reasonable. The continuum assumption is less valid for extremely low-density flows, such as those encountered by vehicles at very high altitudes (e.g. 300,000 ft/90 km) or satellites in Low Earth orbit. In those cases, statistical mechanics is a more accurate method of solving the problem than is continuum aerodynamics. The Knudsen number can be used to guide the choice between statistical mechanics and the continuous formulation of aerodynamics.
Conservation laws
The assumption of a fluid continuum allows problems in aerodynamics to be solved using fluid dynamics conservation laws. Three conservation principles are used:
Conservation of mass Conservation of mass requires that mass is neither created nor destroyed within a flow; the mathematical formulation of this principle is known as the mass continuity equation.
Conservation of momentum The mathematical formulation of this principle can be considered an application of Newton's Second Law. Momentum within a flow is only changed by external forces, which may include both surface forces, such as viscous (frictional) forces, and body forces, such as weight. The momentum conservation principle may be expressed as either a vector equation or separated into a set of three scalar equations (x,y,z components).
Conservation of energy The energy conservation equation states that energy is neither created nor destroyed within a flow, and that any addition or subtraction of energy to a volume in the flow is caused by heat transfer, or by work into and out of the region of interest.
Together, these equations are known as the Navier–Stokes equations, although some authors define the term to only include the momentum equation(s). The Navier–Stokes equations have no known analytical solution and are solved in modern aerodynamics using computational techniques. Because computational methods using high speed computers were not historically available and the high computational cost of solving these complex equations now that they are available, simplifications of the Navier–Stokes equations have been and continue to be employed. The Euler equations are a set of similar conservation equations which neglect viscosity and may be used in cases where the effect of viscosity is expected to be small. Further simplifications lead to Laplace's equation and potential flow theory. Additionally, Bernoulli's equation is a solution in one dimension to both the momentum and energy conservation equations.
The ideal gas law or another such equation of state is often used in conjunction with these equations to form a determined system that allows the solution for the unknown variables.
Branches of aerodynamics
Aerodynamic problems are classified by the flow environment or properties of the flow, including flow speed, compressibility, and viscosity. External aerodynamics is the study of flow around solid objects of various shapes. Evaluating the lift and drag on an airplane or the shock waves that form in front of the nose of a rocket are examples of external aerodynamics. Internal aerodynamics is the study of flow through passages in solid objects. For instance, internal aerodynamics encompasses the study of the airflow through a jet engine or through an air conditioning pipe.
Aerodynamic problems can also be classified according to whether the flow speed is below, near or above the speed of sound. A problem is called subsonic if all the speeds in the problem are less than the speed of sound, transonic if speeds both below and above the speed of sound are present (normally when the characteristic speed is approximately the speed of sound), supersonic when the characteristic flow speed is greater than the speed of sound, and hypersonic when the flow speed is much greater than the speed of sound. Aerodynamicists disagree over the precise definition of hypersonic flow; a rough definition considers flows with Mach numbers above 5 to be hypersonic.
The influence of viscosity on the flow dictates a third classification. Some problems may encounter only very small viscous effects, in which case viscosity can be considered to be negligible. The approximations to these problems are called inviscid flows. Flows for which viscosity cannot be neglected are called viscous flows.
Incompressible aerodynamics
An incompressible flow is a flow in which density is constant in both time and space. Although all real fluids are compressible, a flow is often approximated as incompressible if the effect of the density changes cause only small changes to the calculated results. This is more likely to be true when the flow speeds are significantly lower than the speed of sound. Effects of compressibility are more significant at speeds close to or above the speed of sound. The Mach number is used to evaluate whether the incompressibility can be assumed, otherwise the effects of compressibility must be included.
Subsonic flow
Subsonic (or low-speed) aerodynamics describes fluid motion in flows which are much lower than the speed of sound everywhere in the flow. There are several branches of subsonic flow but one special case arises when the flow is inviscid, incompressible and irrotational. This case is called potential flow and allows the differential equations that describe the flow to be a simplified version of the equations of fluid dynamics, thus making available to the aerodynamicist a range of quick and easy solutions.
In solving a subsonic problem, one decision to be made by the aerodynamicist is whether to incorporate the effects of compressibility. Compressibility is a description of the amount of change of density in the flow. When the effects of compressibility on the solution are small, the assumption that density is constant may be made. The problem is then an incompressible low-speed aerodynamics problem. When the density is allowed to vary, the flow is called compressible. In air, compressibility effects are usually ignored when the Mach number in the flow does not exceed 0.3 (about 335 feet (102 m) per second or 228 miles (366 km) per hour at 60 °F (16 °C)). Above Mach 0.3, the problem flow should be described using compressible aerodynamics.
Compressible aerodynamics
According to the theory of aerodynamics, a flow is considered to be compressible if the density changes along a streamline. This means that – unlike incompressible flow – changes in density are considered. In general, this is the case where the Mach number in part or all of the flow exceeds 0.3. The Mach 0.3 value is rather arbitrary, but it is used because gas flows with a Mach number below that value demonstrate changes in density of less than 5%. Furthermore, that maximum 5% density change occurs at the stagnation point (the point on the object where flow speed is zero), while the density changes around the rest of the object will be significantly lower. Transonic, supersonic, and hypersonic flows are all compressible flows.
Transonic flow
The term Transonic refers to a range of flow velocities just below and above the local speed of sound (generally taken as Mach 0.8–1.2). It is defined as the range of speeds between the critical Mach number, when some parts of the airflow over an aircraft become supersonic, and a higher speed, typically near Mach 1.2, when all of the airflow is supersonic. Between these speeds, some of the airflow is supersonic, while some of the airflow is not supersonic.
Supersonic flow
Supersonic aerodynamic problems are those involving flow speeds greater than the speed of sound. Calculating the lift on the Concorde during cruise can be an example of a supersonic aerodynamic problem.
Supersonic flow behaves very differently from subsonic flow. Fluids react to differences in pressure; pressure changes are how a fluid is "told" to respond to its environment. Therefore, since sound is, in fact, an infinitesimal pressure difference propagating through a fluid, the speed of sound in that fluid can be considered the fastest speed that "information" can travel in the flow. This difference most obviously manifests itself in the case of a fluid striking an object. In front of that object, the fluid builds up a stagnation pressure as impact with the object brings the moving fluid to rest. In fluid traveling at subsonic speed, this pressure disturbance can propagate upstream, changing the flow pattern ahead of the object and giving the impression that the fluid "knows" the object is there by seemingly adjusting its movement and is flowing around it. In a supersonic flow, however, the pressure disturbance cannot propagate upstream. Thus, when the fluid finally reaches the object it strikes it and the fluid is forced to change its properties – temperature, density, pressure, and Mach number—in an extremely violent and irreversible fashion called a shock wave. The presence of shock waves, along with the compressibility effects of high-flow velocity (see Reynolds number) fluids, is the central difference between the supersonic and subsonic aerodynamics regimes.
Hypersonic flow
In aerodynamics, hypersonic speeds are speeds that are highly supersonic. In the 1970s, the term generally came to refer to speeds of Mach 5 (5 times the speed of sound) and above. The hypersonic regime is a subset of the supersonic regime. Hypersonic flow is characterized by high temperature flow behind a shock wave, viscous interaction, and chemical dissociation of gas.
Associated terminology
The incompressible and compressible flow regimes produce many associated phenomena, such as boundary layers and turbulence.
Boundary layers
The concept of a boundary layer is important in many problems in aerodynamics. The viscosity and fluid friction in the air is approximated as being significant only in this thin layer. This assumption makes the description of such aerodynamics much more tractable mathematically.
Turbulence
In aerodynamics, turbulence is characterized by chaotic property changes in the flow. These include low momentum diffusion, high momentum convection, and rapid variation of pressure and flow velocity in space and time. Flow that is not turbulent is called laminar flow.
Aerodynamics in other fields
Engineering design
Aerodynamics is a significant element of vehicle design, including road cars and trucks where the main goal is to reduce the vehicle drag coefficient, and racing cars, where in addition to reducing drag the goal is also to increase the overall level of downforce. Aerodynamics is also important in the prediction of forces and moments acting on sailing vessels. It is used in the design of mechanical components such as hard drive heads. Structural engineers resort to aerodynamics, and particularly aeroelasticity, when calculating wind loads in the design of large buildings, bridges, and wind turbines.
The aerodynamics of internal passages is important in heating/ventilation, gas piping, and in automotive engines where detailed flow patterns strongly affect the performance of the engine.
Environmental design
Urban aerodynamics are studied by town planners and designers seeking to improve amenity in outdoor spaces, or in creating urban microclimates to reduce the effects of urban pollution. The field of environmental aerodynamics describes ways in which atmospheric circulation and flight mechanics affect ecosystems.
Aerodynamic equations are used in numerical weather prediction.
Ball-control in sports
Sports in which aerodynamics are of crucial importance include soccer, table tennis, cricket, baseball, and golf, in which most players can control the trajectory of the ball using the "Magnus effect".
See also
Aeronautics
Aerostatics
Aviation
Insect flight – how bugs fly
List of aerospace engineering topics
List of engineering topics
Nose cone design
Fluid dynamics
Computational fluid dynamics
References
Further reading
General aerodynamics
Subsonic aerodynamics
Obert, Ed (2009). . Delft; About practical aerodynamics in industry and the effects on design of aircraft. .
Transonic aerodynamics
Supersonic aerodynamics
Hypersonic aerodynamics
History of aerodynamics
Aerodynamics related to engineering
Ground vehicles
Fixed-wing aircraft
Helicopters
Missiles
Model aircraft
Related branches of aerodynamics
Aerothermodynamics
Aeroelasticity
Boundary layers
Turbulence
External links
NASA Beginner's Guide to Aerodynamics
Aerodynamics for Students
Aerodynamics for Pilots
Aerodynamics and Race Car Tuning
Aerodynamic Related Projects
eFluids Bicycle Aerodynamics
Application of Aerodynamics in Formula One (F1)
Aerodynamics in Car Racing
Aerodynamics of Birds
NASA Aerodynamics Index
Dynamics
Energy in transport
|
The VfB Helmbrechts is a German association football club from the city of Helmbrechts, Bavaria.
The club's most notable era was when it was playing in the 2nd Oberliga Süd, then the second tier of the German football league system, from 1955 to 1963.
History
1921 to 1945
The club was formed on 3 March 1921, and played its first game of football one month later. VfB did not have a proper ground until 1924 and competitive matches were rare in the early years. It won the local C-Klasse championship that year and earned promotion to the B-Klasse. The following season, the B-Klasse championship could be won and the VfB moved up to the A-Klasse.
After a number of attempts, Helmbrechts won the A-Klasse championship in 1931 and earned promotion to the tier-two Kreisliga, where it played against well-known local sides like SpVgg Weiden and FC Bayern Hof.
With the rise of the Nazis to power, league football in Germany was restructured in 1933. In Bavaria, the Gauliga Bayern was introduced with the Bezirksligas as the leagues below. Helmbrechts earned promotion to this league in 1934. In this league, the club performed well, earning upper table finishes until 1939. With the outbreak of the Second World War, VfB ceased to compete in league football.
1945 to 1998
The club restarted its football life in the local third division in 1946, earning a championship there and promotion to the tier-two Landesliga Bayern. After one season there, it had to step down once more. The club failed in promotion round in 1951, to return to what had now become the Amateurliga Bayern but, in 1953, the expansion of the league to two regional divisions allowed the club to return.
As a new club in the Amateurliga Nordbayern, VfB took out the championship straight away in 1954–55, also winning the Bavarian championship when beating southern champions FC Penzberg, and earned the right to compete for promotion to the 2nd Oberliga Süd. In a group with Borussia Fulda and Amicitia Viernheim, it won promotion finishing first, moving up alongside FC Penzberg, SpVgg Neu-Isenburg and VfR Heilbronn.
Its first four seasons in the second division proved a tough time for the VfB, living under permanent relegation threat. In 1956, only one point saved the club; the other years were not as desperate. In 1959, 12,000 spectators turn up to see the local derby against Bayern Hof, a 3–2 victory for Helmbrechts. The 1959–60 season saw the best performance by the club in its eight 2nd Oberliga years. At the winter break, it led the league, but in the end it fell two points short of Jahn Regensburg in second place and finished fourth. This season remained a unique experience for the club, the following one saw only a mid-table finish. In 1961–62, it escaped relegation by two points once more.
Changes to the German league system in 1963, the introduction of the Fußball-Bundesliga and the Regionalligas below meant, VfB would have had to finish ninth or better to retain its second division status. This mark was missed by two points in eleventh place and the club had to return to the now single-division again Amateurliga Bayern.
Upon return to the Amateurliga, Helmbrechts had a good first year, finishing fourth. The second season wasn't quite as good with only a seventh place and from then on the club resided in the lower half of the table. By 1971, after six difficult years, VfB suffered relegation to the tier-four Landesliga Bayern-Nord.
In the Landesliga, Helmbrechts slowly worked its way up, finishing fourth in 1972, third in 1973 and second in 1971, but only the league champion was eligible for promotion at that time. After this, results dropped off but the club remained an upper table side in this league, finally winning a championship and promotion back to what was now the Oberliga Bayern in 1979.
Back in Bavarias highest league, 6,300 spectators saw the derby against Bayern Hof, a 1–1 draw. VfB experienced a couple of good Oberliga years with a sixth place in 1982 the highlight but in 1983, the club was relegated back to the Landesliga once more. After a third place in 1984, four second places followed in a row from 1985 to 1988 but the team failed each of those four years in the promotion round. The club terminated this unique achievement by winning the league in 1988–89 and earning direct promotion.
VfB lasted for only two seasons in the Bayernliga before having to return to the Landesliga in 1991. After a disappointing eight place in 1992, 1993 saw another Landesliga title and promotion. The club remained in the Oberliga Bayern for the next four seasons without being able to break through to the upper half of the table. The 1996–97 season became the club's last in the upper reaches of Bavarian amateur football. Financially troubled, the club finished last in the league, 23 points clear of a non-relegation rank. VfB decided at the end of the season, not to take up its spot in the Landesliga for the next season but instead to play in the A-Klasse (VIII) where its reserve side played in 1996–97.
Insolvency
In 1998, the VfB had to declare insolvency but a new VfB Helmbrechts club was immediately formed, adopting the 98 to its name in reference to its rebirth.
The club made a quick on-the-field recovery, earning promotion to the Bezirksliga Oberfranken Ost (VII) in 2000. After a number of average seasons in this league, it took out the championship in 2004 and earned promotion to the Bezirksoberliga Oberfranken. From this league, after initially achieving good results, the club was relegated again in 2008.
In 2008–09, the club played in the tier-eight Bezirksliga Oberfranken Ost, suffering another relegation, now to the Kreisliga. At this level, in 2009–10, the club was yet again relegated, now to the tier-ten Kreisklasse Frankenwald. After two seasons the club started to make a recovery, winning a league championship in 2012 and being promoted back to the Kreisliga from where it dropped back to the Kreisklasse in 2014. After a Kreisklasse championship in 2015–16 the club returned to the Kreisliga.
Honours
League
Amateurliga Nordbayern (III)
Champions: 1955
Kreisklasse Oberfranken (III)
Champions: 1934
Landesliga Bayern-Nord (IV)
Champions: (3) 1979, 1989, 1993
Runners-up: (5) 1974, 1985, 1986, 1987, 1988
2nd Amateurliga Oberfranken Ost (IV)
Champions: (2) 1951, 1953
A-Klasse (III)
Champions: 1931
B-Klasse (IV)
Champions: 1925
C-Klasse (V)
Champions: 1924
Bezirksliga Oberfranken Ost (VII)
Champions: 2004
Kreisklasse Frankenwald
Champions: 2012
Kreisklasse Hof-West
Champions: 2016
Recent seasons
The recent season-by-season performance of the club:
With the introduction of the Bezirksoberligas in 1988 as the new fifth tier, below the Landesligas, all leagues below dropped one tier. With the introduction of the Regionalligas in 1994 and the 3. Liga in 2008 as the new third tier, below the 2. Bundesliga, all leagues below dropped one tier. With the establishment of the Regionalliga Bayern as the new fourth tier in Bavaria in 2012 the Bayernliga was split into a northern and a southern division, the number of Landesligas expanded from three to five and the Bezirksoberligas abolished. All leagues from the Bezirksligas onwards were elevated one tier.
References
Sources
Süddeutschlands Fussballgeschichte in Tabellenform 1897–1988 History of Southern German football in tables, author: Ludolf Hyll
External links
Official team site
VfB Helmbrechts profile at Weltfussball.de
Das deutsche Fußball-Archiv historical German domestic league tables
Football clubs in Germany
Football clubs in Bavaria
Association football clubs established in 1921
Football in Upper Franconia
1921 establishments in Germany
|
```objective-c
/*
*
* 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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.
*
* Authors: AMD
*
*/
#ifndef __DAL_BIOS_PARSER_HELPER_H__
#define __DAL_BIOS_PARSER_HELPER_H__
struct bios_parser;
uint8_t *bios_get_image(struct dc_bios *bp, uint32_t offset,
uint32_t size);
bool bios_is_accelerated_mode(struct dc_bios *bios);
void bios_set_scratch_acc_mode_change(struct dc_bios *bios, uint32_t state);
void bios_set_scratch_critical_state(struct dc_bios *bios, bool state);
uint32_t bios_get_vga_enabled_displays(struct dc_bios *bios);
#define GET_IMAGE(type, offset) ((type *) bios_get_image(&bp->base, offset, sizeof(type)))
#endif
```
|
```scss
@import '../config/import';
.profile-header {
--padding: var(--su-3);
@media (min-width: $breakpoint-s) {
--padding: var(--su-4);
}
@media (min-width: $breakpoint-m) {
text-align: center;
}
@media (min-width: $breakpoint-l) {
--padding: var(--su-6);
}
&__top {
margin-top: calc(-1 * var(--su-7));
margin-bottom: var(--su-4);
position: relative;
padding: 0 var(--padding);
@media (min-width: $breakpoint-m) {
margin-top: calc(-1 * var(--su-9));
margin-bottom: var(--su-3);
}
}
&__actions {
display: flex;
right: 0;
top: var(--su-7);
position: absolute;
left: 0;
justify-content: flex-end;
padding: var(--padding) var(--padding) 0 0;
@media (min-width: $breakpoint-m) {
top: var(--su-9);
}
}
&__details {
padding: var(--padding);
}
&__bio {
white-space: pre-wrap;
}
&__meta {
font-size: var(--fs-s);
color: var(--base-60);
margin-bottom: var(--su-2);
display: flex;
flex-wrap: wrap;
align-items: center;
margin-left: calc(-1 * var(--su-1));
@media (min-width: $breakpoint-m) {
justify-content: center;
margin-left: 0;
}
a {
color: var(--link-color-secondary);
&:hover {
color: var(--link-color-hover);
}
}
&__item {
display: flex;
align-items: center;
flex-wrap: nowrap;
white-space: nowrap;
padding: var(--su-2) var(--su-2);
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
& > span {
overflow: hidden;
text-overflow: ellipsis;
}
@media (min-width: $breakpoint-m) {
padding: var(--su-1) var(--su-3);
}
}
}
&__bottom {
border-top: 1px solid var(--base-10);
padding: calc(var(--padding) / 2);
display: flex;
flex-flow: column;
justify-content: space-evenly;
@media (min-width: $breakpoint-s) {
flex-flow: row;
}
.crayons-definition {
padding: calc(var(--padding) / 2);
}
}
.crayons-avatar,
.crayons-logo {
width: var(--su-9);
height: var(--su-9);
background-color: var(--profile-brand-color);
padding: var(--su-1);
&::after {
content: none;
}
@media (min-width: $breakpoint-m) {
padding: var(--su-2);
width: var(--su-10);
height: var(--su-10);
}
}
}
.crayons-definition {
font-size: inherit;
&__title {
font-size: 85%;
font-weight: var(--fw-medium);
color: var(--base-60);
display: block;
}
}
.brand-bg {
background: linear-gradient(
180deg,
var(--profile-brand-color) var(--su-9),
transparent var(--su-9)
);
@media (min-width: $breakpoint-m) {
background: linear-gradient(
180deg,
var(--profile-brand-color) var(--su-10),
transparent var(--su-10)
);
}
}
.profile-comment-card {
border-radius: 0;
@media screen and (min-width: $breakpoint-s) {
border-radius: var(--radius);
}
}
.profile-comment-row {
color: var(--base-90);
display: flex;
flex-direction: column;
border-bottom: 1px solid var(--card-border);
padding: var(--su-3) var(--su-4);
&:hover,
&:focus,
&:active {
background-color: var(--card-secondary-border);
}
&:last-child {
border-bottom: unset;
}
}
.badge-indicator {
font-size: var(--fs-s);
color: var(--base-0);
width: var(--su-6);
height: var(--su-6);
line-height: var(--su-6);
position: absolute;
background-color: var(--accent-brand);
right: var(--su-1);
bottom: -5px;
border-radius: 100%;
}
```
|
Kehelwatta is a village in Sri Lanka. It is located within Central Province.
See also
List of towns in Central Province, Sri Lanka
External links
Populated places in Central Province, Sri Lanka
|
```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, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package org.apache.beam.sdk.transforms;
import static org.apache.beam.sdk.transforms.Contextful.fn;
import static org.apache.beam.sdk.transforms.Requirements.requiresSideInputs;
import static org.apache.beam.sdk.transforms.display.DisplayDataMatchers.hasDisplayItem;
import static org.apache.beam.sdk.values.TypeDescriptors.integers;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.hasKey;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertEquals;
import java.io.Serializable;
import java.util.Map;
import java.util.Set;
import org.apache.beam.sdk.testing.NeedsRunner;
import org.apache.beam.sdk.testing.PAssert;
import org.apache.beam.sdk.testing.TestPipeline;
import org.apache.beam.sdk.testing.ValidatesRunner;
import org.apache.beam.sdk.transforms.Contextful.Fn;
import org.apache.beam.sdk.transforms.MapElements.MapWithFailures;
import org.apache.beam.sdk.transforms.WithFailures.ExceptionElement;
import org.apache.beam.sdk.transforms.WithFailures.Result;
import org.apache.beam.sdk.transforms.display.DisplayData;
import org.apache.beam.sdk.transforms.display.DisplayDataEvaluator;
import org.apache.beam.sdk.values.KV;
import org.apache.beam.sdk.values.PCollection;
import org.apache.beam.sdk.values.PCollectionView;
import org.apache.beam.sdk.values.TypeDescriptor;
import org.apache.beam.sdk.values.TypeDescriptors;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.ExpectedException;
import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Tests for {@link MapElements}. */
@RunWith(JUnit4.class)
public class MapElementsTest implements Serializable {
@Rule public final transient TestPipeline pipeline = TestPipeline.create();
@Rule public transient ExpectedException thrown = ExpectedException.none();
@Rule public transient Timeout globalTimeout = Timeout.seconds(1200);
/**
* A {@link SimpleFunction} to test that the coder registry can propagate coders that are bound to
* type variables.
*/
private static class PolymorphicSimpleFunction<T> extends SimpleFunction<T, T> {
@Override
public T apply(T input) {
return input;
}
}
/**
* A {@link SimpleFunction} to test that the coder registry can propagate coders that are bound to
* type variables, when the variable appears nested in the output.
*/
private static class NestedPolymorphicSimpleFunction<T> extends SimpleFunction<T, KV<T, String>> {
@Override
public KV<T, String> apply(T input) {
return KV.of(input, "hello");
}
}
/**
* An {@link InferableFunction} to test that the coder registry can propagate coders that are
* bound to type variables.
*/
private static class PolymorphicInferableFunction<T> extends InferableFunction<T, T> {
@Override
public T apply(T input) throws Exception {
return input;
}
}
/**
* An {@link InferableFunction} to test that the coder registry can propagate coders that are
* bound to type variables, when the variable appears nested in the output.
*/
private static class NestedPolymorphicInferableFunction<T>
extends InferableFunction<T, KV<T, String>> {
@Override
public KV<T, String> apply(T input) throws Exception {
return KV.of(input, "hello");
}
}
/** Basic test of {@link MapElements} with a {@link SimpleFunction}. */
@Test
@Category(NeedsRunner.class)
public void testMapSimpleFunction() throws Exception {
PCollection<Integer> output =
pipeline
.apply(Create.of(1, 2, 3))
.apply(
MapElements.via(
new SimpleFunction<Integer, Integer>() {
@Override
public Integer apply(Integer input) {
return -input;
}
}));
PAssert.that(output).containsInAnyOrder(-2, -1, -3);
pipeline.run();
}
/** Basic test of {@link MapElements} with an {@link InferableFunction}. */
@Test
@Category(NeedsRunner.class)
public void testMapInferableFunction() throws Exception {
PCollection<Integer> output =
pipeline
.apply(Create.of(1, 2, 3))
.apply(
MapElements.via(
new InferableFunction<Integer, Integer>() {
@Override
public Integer apply(Integer input) throws Exception {
return -input;
}
}));
PAssert.that(output).containsInAnyOrder(-2, -1, -3);
pipeline.run();
}
/** Basic test of {@link MapElements} with a {@link Fn} and a side input. */
@Test
@Category(NeedsRunner.class)
public void testMapBasicWithSideInput() throws Exception {
final PCollectionView<Integer> view =
pipeline.apply("Create base", Create.of(40)).apply(View.asSingleton());
PCollection<Integer> output =
pipeline
.apply(Create.of(0, 1, 2))
.apply(
MapElements.into(integers())
.via(
fn((element, c) -> element + c.sideInput(view), requiresSideInputs(view))));
PAssert.that(output).containsInAnyOrder(40, 41, 42);
pipeline.run();
}
/**
* Basic test of {@link MapElements} coder propagation with a parametric {@link SimpleFunction}.
*/
@Test
public void testPolymorphicSimpleFunction() throws Exception {
pipeline.enableAbandonedNodeEnforcement(false);
pipeline
.apply(Create.of(1, 2, 3))
// This is the function that needs to propagate the input T to output T
.apply("Polymorphic Identity", MapElements.via(new PolymorphicSimpleFunction<>()))
// This is a consumer to ensure that all coder inference logic is executed.
.apply(
"Test Consumer",
MapElements.via(
new SimpleFunction<Integer, Integer>() {
@Override
public Integer apply(Integer input) {
return input;
}
}));
}
/**
* Basic test of {@link MapElements} coder propagation with a parametric {@link
* InferableFunction}.
*/
@Test
public void testPolymorphicInferableFunction() throws Exception {
pipeline.enableAbandonedNodeEnforcement(false);
pipeline
.apply(Create.of(1, 2, 3))
.apply("Polymorphic Identity", MapElements.via(new PolymorphicInferableFunction<>()))
.apply(
"Test Consumer",
MapElements.via(
new InferableFunction<Integer, Integer>() {
@Override
public Integer apply(Integer input) throws Exception {
return input;
}
}));
}
/**
* Test of {@link MapElements} coder propagation with a parametric {@link SimpleFunction} where
* the type variable occurs nested within other concrete type constructors.
*/
@Test
public void testNestedPolymorphicSimpleFunction() throws Exception {
pipeline.enableAbandonedNodeEnforcement(false);
pipeline
.apply(Create.of(1, 2, 3))
// This is the function that needs to propagate the input T to output T
.apply("Polymorphic Identity", MapElements.via(new NestedPolymorphicSimpleFunction<>()))
// This is a consumer to ensure that all coder inference logic is executed.
.apply(
"Test Consumer",
MapElements.via(
new SimpleFunction<KV<Integer, String>, Integer>() {
@Override
public Integer apply(KV<Integer, String> input) {
return 42;
}
}));
}
/**
* Test of {@link MapElements} coder propagation with a parametric {@link InferableFunction} where
* the type variable occurs nested within other concrete type constructors.
*/
@Test
public void testNestedPolymorphicInferableFunction() throws Exception {
pipeline.enableAbandonedNodeEnforcement(false);
pipeline
.apply(Create.of(1, 2, 3))
.apply("Polymorphic Identity", MapElements.via(new NestedPolymorphicInferableFunction<>()))
.apply(
"Test Consumer",
MapElements.via(
new InferableFunction<KV<Integer, String>, Integer>() {
@Override
public Integer apply(KV<Integer, String> input) throws Exception {
return 42;
}
}));
}
/** Basic test of {@link MapElements} with a {@link ProcessFunction}. */
@Test
@Category(NeedsRunner.class)
public void testMapBasicProcessFunction() throws Exception {
PCollection<Integer> output =
pipeline.apply(Create.of(1, 2, 3)).apply(MapElements.into(integers()).via(input -> -input));
PAssert.that(output).containsInAnyOrder(-2, -1, -3);
pipeline.run();
}
/**
* Tests that when built with a concrete subclass of {@link SimpleFunction}, the type descriptor
* of the output reflects its static type.
*/
@Test
@Category(NeedsRunner.class)
public void testSimpleFunctionOutputTypeDescriptor() throws Exception {
PCollection<String> output =
pipeline
.apply(Create.of("hello"))
.apply(
MapElements.via(
new SimpleFunction<String, String>() {
@Override
public String apply(String input) {
return input;
}
}));
assertThat(
output.getTypeDescriptor(),
equalTo((TypeDescriptor<String>) new TypeDescriptor<String>() {}));
assertThat(
pipeline.getCoderRegistry().getCoder(output.getTypeDescriptor()),
equalTo(pipeline.getCoderRegistry().getCoder(new TypeDescriptor<String>() {})));
// Make sure the pipeline runs too
pipeline.run();
}
/**
* Tests that when built with a concrete subclass of {@link InferableFunction}, the type
* descriptor of the output reflects its static type.
*/
@Test
@Category(NeedsRunner.class)
public void testInferableFunctionOutputTypeDescriptor() throws Exception {
PCollection<String> output =
pipeline
.apply(Create.of("hello"))
.apply(
MapElements.via(
new InferableFunction<String, String>() {
@Override
public String apply(String input) throws Exception {
return input;
}
}));
assertThat(
output.getTypeDescriptor(),
equalTo((TypeDescriptor<String>) new TypeDescriptor<String>() {}));
assertThat(
pipeline.getCoderRegistry().getCoder(output.getTypeDescriptor()),
equalTo(pipeline.getCoderRegistry().getCoder(new TypeDescriptor<String>() {})));
// Make sure the pipeline runs too
pipeline.run();
}
@Test
@Category(NeedsRunner.class)
public void testVoidValues() throws Exception {
pipeline
.apply(Create.of("hello"))
.apply(WithKeys.of("k"))
.apply(new VoidValues<String, String>() {});
// Make sure the pipeline runs
pipeline.run();
}
@Test
public void testSerializableFunctionDisplayData() {
SerializableFunction<Integer, Integer> serializableFn = input -> input;
MapElements<?, ?> serializableMap = MapElements.into(integers()).via(serializableFn);
assertThat(
DisplayData.from(serializableMap), hasDisplayItem("class", serializableFn.getClass()));
}
@Test
public void testProcessFunctionDisplayData() {
ProcessFunction<Integer, Integer> processFn = input -> input;
MapElements<?, ?> processMap = MapElements.into(integers()).via(processFn);
assertThat(DisplayData.from(processMap), hasDisplayItem("class", processFn.getClass()));
}
@Test
public void testSimpleFunctionClassDisplayData() {
SimpleFunction<?, ?> simpleFn =
new SimpleFunction<Integer, Integer>() {
@Override
public Integer apply(Integer input) {
return input;
}
};
MapElements<?, ?> simpleMap = MapElements.via(simpleFn);
assertThat(DisplayData.from(simpleMap), hasDisplayItem("class", simpleFn.getClass()));
}
@Test
public void testInferableFunctionClassDisplayData() {
InferableFunction<?, ?> inferableFn =
new InferableFunction<Integer, Integer>() {
@Override
public Integer apply(Integer input) throws Exception {
return input;
}
};
MapElements<?, ?> inferableMap = MapElements.via(inferableFn);
assertThat(DisplayData.from(inferableMap), hasDisplayItem("class", inferableFn.getClass()));
}
@Test
public void testSimpleFunctionDisplayData() {
SimpleFunction<Integer, ?> simpleFn =
new SimpleFunction<Integer, Integer>() {
@Override
public Integer apply(Integer input) {
return input;
}
@Override
public void populateDisplayData(DisplayData.Builder builder) {
builder.add(DisplayData.item("foo", "baz"));
}
};
MapElements<?, ?> simpleMap = MapElements.via(simpleFn);
assertThat(DisplayData.from(simpleMap), hasDisplayItem("class", simpleFn.getClass()));
assertThat(DisplayData.from(simpleMap), hasDisplayItem("foo", "baz"));
}
@Test
public void testInferableFunctionDisplayData() {
InferableFunction<Integer, ?> inferableFn =
new InferableFunction<Integer, Integer>() {
@Override
public Integer apply(Integer input) {
return input;
}
@Override
public void populateDisplayData(DisplayData.Builder builder) {
builder.add(DisplayData.item("foo", "baz"));
}
};
MapElements<?, ?> inferableMap = MapElements.via(inferableFn);
assertThat(DisplayData.from(inferableMap), hasDisplayItem("class", inferableFn.getClass()));
assertThat(DisplayData.from(inferableMap), hasDisplayItem("foo", "baz"));
}
@Test
@Category(ValidatesRunner.class)
public void testPrimitiveDisplayData() {
SimpleFunction<Integer, ?> mapFn =
new SimpleFunction<Integer, Integer>() {
@Override
public Integer apply(Integer input) {
return input;
}
};
MapElements<Integer, ?> map = MapElements.via(mapFn);
DisplayDataEvaluator evaluator = DisplayDataEvaluator.create();
Set<DisplayData> displayData = evaluator.displayDataForPrimitiveTransforms(map);
assertThat(
"MapElements should include the mapFn in its primitive display data",
displayData,
hasItem(hasDisplayItem("class", mapFn.getClass())));
}
static class VoidValues<K, V>
extends PTransform<PCollection<KV<K, V>>, PCollection<KV<K, Void>>> {
@Override
public PCollection<KV<K, Void>> expand(PCollection<KV<K, V>> input) {
return input.apply(
MapElements.via(
new SimpleFunction<KV<K, V>, KV<K, Void>>() {
@Override
public KV<K, Void> apply(KV<K, V> input) {
return KV.of(input.getKey(), null);
}
}));
}
}
/**
* Basic test of {@link MapElements} with a lambda (which is instantiated as a {@link
* SerializableFunction}).
*/
@Test
@Category(NeedsRunner.class)
public void testMapLambda() throws Exception {
PCollection<Integer> output =
pipeline
.apply(Create.of(1, 2, 3))
.apply(
MapElements
// Note that the type annotation is required.
.into(TypeDescriptors.integers())
.via((Integer i) -> i * 2));
PAssert.that(output).containsInAnyOrder(6, 2, 4);
pipeline.run();
}
/**
* Basic test of {@link MapElements} with a lambda wrapped into a {@link SimpleFunction} to
* remember its type.
*/
@Test
@Category(NeedsRunner.class)
public void testMapWrappedLambda() throws Exception {
PCollection<Integer> output =
pipeline
.apply(Create.of(1, 2, 3))
.apply(MapElements.via(new SimpleFunction<Integer, Integer>((Integer i) -> i * 2) {}));
PAssert.that(output).containsInAnyOrder(6, 2, 4);
pipeline.run();
}
/** Basic test of {@link MapElements} with a method reference. */
@Test
@Category(NeedsRunner.class)
public void testMapMethodReference() throws Exception {
PCollection<Integer> output =
pipeline
.apply(Create.of(1, 2, 3))
.apply(
MapElements
// Note that the type annotation is required.
.into(TypeDescriptors.integers())
.via(new Doubler()::doubleIt));
PAssert.that(output).containsInAnyOrder(6, 2, 4);
pipeline.run();
}
private static class Doubler implements Serializable {
public int doubleIt(int val) {
return val * 2;
}
}
/** Test of {@link MapWithFailures()} using a pre-built exception handler. */
@Test
@Category(NeedsRunner.class)
public void testExceptionAsMap() {
Result<PCollection<Integer>, KV<Integer, Map<String, String>>> result =
pipeline
.apply(Create.of(0, 1))
.apply(
MapElements.into(TypeDescriptors.integers())
.via((Integer i) -> 1 / i)
.exceptionsVia(new WithFailures.ExceptionAsMapHandler<Integer>() {}));
PAssert.that(result.output()).containsInAnyOrder(1);
PAssert.thatSingleton(result.failures())
.satisfies(
kv -> {
assertEquals(Integer.valueOf(0), kv.getKey());
assertThat(kv.getValue().entrySet(), hasSize(3));
assertThat(kv.getValue(), hasKey("stackTrace"));
assertEquals("java.lang.ArithmeticException", kv.getValue().get("className"));
assertEquals("/ by zero", kv.getValue().get("message"));
return null;
});
pipeline.run();
}
/** Test of {@link MapWithFailures()} with handling defined via lambda expression. */
@Test
@Category(NeedsRunner.class)
public void testMapWithFailuresLambda() {
Result<PCollection<Integer>, KV<Integer, String>> result =
pipeline
.apply(Create.of(0, 1))
.apply(
MapElements.into(TypeDescriptors.integers())
.via((Integer i) -> 1 / i)
.exceptionsInto(
TypeDescriptors.kvs(TypeDescriptors.integers(), TypeDescriptors.strings()))
.exceptionsVia(f -> KV.of(f.element(), f.exception().getMessage())));
PAssert.that(result.output()).containsInAnyOrder(1);
PAssert.that(result.failures()).containsInAnyOrder(KV.of(0, "/ by zero"));
pipeline.run();
}
/** Test of {@link MapWithFailures()} with a {@link SimpleFunction} and no {@code into} call. */
@Test
@Category(NeedsRunner.class)
public void testMapWithFailuresSimpleFunction() {
Result<PCollection<Integer>, KV<Integer, String>> result =
pipeline
.apply(Create.of(0, 1))
.apply(
MapElements.into(TypeDescriptors.integers())
.via((Integer i) -> 1 / i)
.exceptionsVia(
new SimpleFunction<ExceptionElement<Integer>, KV<Integer, String>>() {
@Override
public KV<Integer, String> apply(ExceptionElement<Integer> failure) {
return KV.of(failure.element(), failure.exception().getMessage());
}
}));
PAssert.that(result.output()).containsInAnyOrder(1);
PAssert.that(result.failures()).containsInAnyOrder(KV.of(0, "/ by zero"));
pipeline.run();
}
@Test
public void testMapWithFailuresDisplayData() {
InferableFunction<Integer, Integer> inferableFn =
new InferableFunction<Integer, Integer>() {
@Override
public Integer apply(Integer input) {
return input;
}
@Override
public void populateDisplayData(DisplayData.Builder builder) {
builder.add(DisplayData.item("foo", "baz"));
}
};
InferableFunction<ExceptionElement<Integer>, String> exceptionHandler =
new InferableFunction<ExceptionElement<Integer>, String>() {
@Override
public String apply(ExceptionElement<Integer> input) throws Exception {
return "";
}
@Override
public void populateDisplayData(DisplayData.Builder builder) {
builder.add(DisplayData.item("bar", "buz"));
}
};
MapWithFailures<?, ?, ?> mapWithFailures =
MapElements.via(inferableFn).exceptionsVia(exceptionHandler);
assertThat(DisplayData.from(mapWithFailures), hasDisplayItem("class", inferableFn.getClass()));
assertThat(
DisplayData.from(mapWithFailures),
hasDisplayItem("exceptionHandler.class", exceptionHandler.getClass()));
assertThat(DisplayData.from(mapWithFailures), hasDisplayItem("foo", "baz"));
assertThat(DisplayData.from(mapWithFailures), hasDisplayItem("bar", "buz"));
}
}
```
|
Jack Hayes may refer to:
Jack Hayes (composer) (1919–2011), American composer and orchestrator
Jack Hayes (politician) (1887–1941), British police officer, trade unionist and politician
Jack Hayes (footballer, born 1907) (1907–1971), Australian rules footballer for Footscray
Jack Hayes (footballer, born 1996), Australian rules footballer for St Kilda
Jack Hayes (field hockey) (born 1994), Australian field hockey player
|
Sheikh Mukhtar Robow (, born 10 October 1969), also known as Abu Mansur, is a former deputy leader and former spokesman of the Somali militant group Al-Shabaab. In 2015, he defected from Al-Shabaab due to ideology issues after years of hiding in his hometown. In 2022, Robow was appointed as the Minister of Religious Affairs in the Somali government.
Early life
Robow was born on 10 October 1969 in Huddur, in the Bakool region of southern Somalia. He studied at a local Qur'anic school, and later continued his religious education in the mosques of Mogadishu as well as those of his home region. A member of the Rahaweyn and more specifically of the Leysan clan which is particularly well represented in the South West State of Somalia. Robow also studied Islamic law in the 1990s at the University of Khartoum in Sudan.
Al-Shabaab
Robow and other leading Al-Shabaab members challenged the leadership of Ahmed Abdi Godane (Moktar Ali Zubeyr) at Barawe in June 2013. Godane killed two of the leading members, and Robow fled to his home district. Godane's forces launched an offensive against Robow's supporters, it was reported in August 2013.
On 23 June 2017, United States Treasury Department's Office of Foreign Assets Control (OFAC) removed him from its Reward for Justice (RFJ) list following discussions with the Somali government after a US$5 million bounty had been placed for information leading to his capture on 7 June 2012.
Defection
On 13 August 2017, he surrendered to the Somali Government authorities. In a press conference held in Mogadishu shortly after, he denounced Al-Shabaab and called on its members to quit the group.
Candidacy for Regional Presidency
A year later, Robow was pushing the envelope again. The charismatic former Shabaab leader officially declared he was running for regional elections originally set for 17 November and later postponed to 19 December. Mukhtar Robow, also known as Abu Mansour, made the announcement to hundreds of his supporters in a welcoming rally in the South Western town of Baidoa.
The enthusiasm, however, was not shared by the internationally backed Somali federal government in Mogadishu. In a sharp rebuke, Somalia's internal security ministry released a statement saying that Mukhtar Robow was not eligible to run for the regional elections. The problem, though, is that Somalia does not have a formal constitution and, legally, the powers of the federal and state government have not been adequately detailed. It was unclear whether the federal authorities have the ability to enforce a ban on a regional presidential candidate. Al Shabaab too has denounced the political ambitions of the group's highest profile defector. Ironically, the federal authorities and al Shabaab find themselves on the same side of the Robow candidacy controversy.
Worried about Robow's popularity, the federal government has sent at least one high-level official to try to persuade him to step aside.
The electoral commission, dismissing Mogadishu's demands, has awarded a certificate of eligibility to Mukhtar Robow Abu Mansur.
Mukhtar Robow was officially cleared by the South West State Electoral Commission to contest in the December elections despite early protest by the Federal government seeking to have him barred. The Coalition for Change, which has thrown its weight behind Mukhtar Robow, issued a statement after the polls were postponed. The group said it fears the government was planning to rig the election since the new date is not favourable for international observers as most of them will then have left Somalia for the end of the year festivities.
Some 150 elite Somali forces, armed with DShK rifles, were deployed to Baidoa to physically block Robow from accessing the election venue.
On 7 Nov 2018 The United Nations Mission in Somalia (UNSOM) warned that the presidential election in Somalia's South West State had the potential to lead to violence and called on all parties to ensure that the electoral process proceeds in accordance with the established rules and avoids any behaviour which may lead to conflict or undermine the integrity of the electoral process.
Arrest
On 13 December 2018, Mukhtar Robow was arrested by African Union peacekeepers from Ethiopia and flown to Mogadishu under tight security. At least 12 people were killed in Baidoa in violence that erupted following Robow's arrest. Among those killed was a member of the regional parliament. The victims were shot by AMISOM Ethiopian forces and Somali Special Forces flown from Mogadishu.
Somali lawmakers have written a protest letter to the AU Commission in Addis Ababa, the Ethiopian government and the UN complaining about the conduct of AMISOM.
Robow's arrest also prompted the resignation of Somalia's Public Works Minister Abdifatah Mohamed Gesey, who hails from Baidoa and is from the same Leysan sub-clan as Robow, in protest.
The Special Representative of the UN Secretary-General for Somalia, Nicholas Haysom wrote to the Somali government on 30 December 2018, requesting details of the legal basis for the arrest of Robow, as well as calling for investigations into the deaths of protesters following his detention. Somalia's security forces used lethal force to put down three days of demonstrations in the south-western town of Baidoa on 13–15 December, killing at least 15 people and arresting 300, according to the UN.
On 1 January 2019, three people were wounded including two UN staff members when a barrage of mortars were fired into the main UN base in Mogadishu.
Somalia's government has ordered the UN top envoy to leave the country, accusing him of "deliberately interfering with the country's sovereignty." The order comes days after the official, Nicholas Haysom, raised concerns about the action of Somalia's UN-backed security services in the recent violent episodes that left several people dead. The U.N. Security Council is expressing regret at Somalia's decision to expel a U.N. envoy who questioned the arrest of an extremist group defector-turned-political candidate.
In December 2021, Somalia's Interior Minister Abdullahi Nor, asked the country's National Intelligence Security Agency to hand over a report on the arrest and subsequent detention of Robow,
Ministry of Religious Affairs
In Aug 2022, Robow was appointed to become Minister Of Religious Affairs in the cabinet of President Hassan Sheikh Mohamud.
References
External links
Somali Islamist leader vows holy war against 'Christian invaders'. Agence France-Presse, 9 October 2007
1969 births
Living people
Ethnic Somali people
Al-Shabaab (militant group) members
Place of birth missing (living people)
People from Bay, Somalia
People of the Somali Civil War
|
```haskell
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
module Cardano.Wallet.API.Request.Filter where
import qualified Prelude
import Universum
import qualified Data.List as List
import qualified Data.Text as T
import Data.Typeable
import Formatting (bprint, build, formatToString, sformat, (%))
import qualified Formatting.Buildable
import qualified Generics.SOP as SOP
import GHC.TypeLits (KnownSymbol, Symbol, symbolVal)
import Pos.Infra.Util.LogSafe (BuildableSafe, BuildableSafeGen (..),
SecureLog (..), buildSafe, secure, unsecure)
import Pos.Util.Servant (ApiCanLogArg (..), ApiHasArgClass (..))
import Network.HTTP.Types (parseQueryText)
import Network.Wai (rawQueryString)
import Servant
import Servant.Client
import Servant.Client.Core (appendToQueryString)
import Servant.Server.Internal
import Cardano.Wallet.API.Indices
import qualified Cardano.Wallet.API.Request.Parameters as Param
import Cardano.Wallet.API.V1.Types
--
-- Filtering data
--
-- | A list of filter operations
--
-- The @ixs@ type parameter is a type-level list of types, indicating which
-- fields we are filtering on; the @a@ type parameter indicates what what we are
-- filtering.
data FilterOperations ixs a where
-- | Empty list
NoFilters :: FilterOperations ixs a
-- | Skip a filter
--
-- When we are expecting, say
--
-- > FilterOperations '[WalletId, Coin] Wallet
--
-- but the user only provided a filter on 'Coin' the 'FilterNop'
-- constructor can be used to inform the type checker that this filter
-- is not present. (We can't simply skip the field altogether, because
-- that would have type @FilterOperations '[Coin]@ instead).
FilterNop :: FilterOperations ixs a -> FilterOperations (ix ': ixs) a
-- | Insert a filter into the list
FilterOp :: ( IsIndexOf ix a
, Typeable ix
, BuildableSafe ix
, FromHttpApiData ix
, ToHttpApiData ix
, Eq ix
)
=> FilterOperation ix a
-> FilterOperations ixs a
-> FilterOperations (ix ': ixs) a
infixr 6 `FilterOp`
instance SOP.All (KnownQueryParam a) ixs => Show (FilterOperations ixs a) where
show = formatToString build
instance Eq (FilterOperations ixs a) where
NoFilters == NoFilters =
True
FilterOp (f0 :: FilterOperation ix0 a) rest0 == FilterOp (f1 :: FilterOperation ix1 a) rest1 =
case eqT @ix0 @ix1 of
Nothing ->
False
Just Refl ->
f0 == f1 && rest0 == rest1
FilterNop rest0 == FilterNop rest1 =
rest0 == rest1
_ == _ =
False
instance SOP.All (KnownQueryParam a) ixs => BuildableSafeGen (FilterOperations ixs a) where
buildSafeGen _ NoFilters =
"-"
buildSafeGen sl (FilterNop rest) =
buildSafeGen sl rest
buildSafeGen sl (FilterOp op NoFilters) =
bprint (buildSafe sl) op
buildSafeGen sl (FilterOp op rest) =
bprint (buildSafe sl) op <> ", " <> bprint (buildSafe sl) rest
instance SOP.All (KnownQueryParam a) ixs => Buildable (FilterOperations ixs a) where
build = buildSafeGen unsecure
instance SOP.All (KnownQueryParam a) ixs => Buildable (SecureLog (FilterOperations ixs a)) where
build = buildSafeGen secure . getSecureLog
-- A custom ordering for a 'FilterOperation'. Conceptually theh same as 'Ordering' but with the ">=" and "<="
-- variants.
data FilterOrdering =
Equal
| GreaterThan
| GreaterThanEqual
| LesserThan
| LesserThanEqual
deriving (Show, Eq, Enum, Bounded)
renderFilterOrdering :: FilterOrdering -> Text
renderFilterOrdering = sformat build
instance Buildable FilterOrdering where
build = \case
Equal -> "EQ"
GreaterThan -> "GT"
GreaterThanEqual -> "GTE"
LesserThan -> "LT"
LesserThanEqual -> "LTE"
-- A filter operation on the data model
data FilterOperation ix a =
FilterByIndex ix
-- ^ Filter by index (e.g. equal to)
| FilterByPredicate FilterOrdering ix
-- ^ Filter by predicate (e.g. lesser than, greater than, etc.)
| FilterByRange ix ix
-- ^ Filter by range, in the form [from,to]
| FilterIn [ix]
deriving Eq
instance (BuildableSafe ix, KnownQueryParam a ix) => Show (FilterOperation ix a) where
show = formatToString build
instance ToHttpApiData ix => ToHttpApiData (FilterOperation ix a) where
toQueryParam = renderFilterOperation
instance (BuildableSafe ix, KnownQueryParam a ix) => BuildableSafeGen (FilterOperation ix a) where
buildSafeGen sl (FilterByIndex ix) =
bprint (build%"="%buildSafe sl) (symbolVal (Proxy @(IndexToQueryParam a ix))) ix
buildSafeGen sl (FilterByPredicate o ix) =
bprint (build%"="%build%"["%buildSafe sl%"]") (symbolVal (Proxy @(IndexToQueryParam a ix))) o ix
buildSafeGen sl (FilterByRange lo hi) =
bprint (build%"=RANGE["%buildSafe sl%","%buildSafe sl%"]") (symbolVal (Proxy @(IndexToQueryParam a ix))) lo hi
buildSafeGen sl (FilterIn ixs) =
bprint (build % "=IN[" % build % "]")
(symbolVal (Proxy @(IndexToQueryParam a ix)))
bps
where
bps = mconcat
. List.intersperse ","
$ map (bprint (buildSafe sl)) ixs
instance (BuildableSafeGen (FilterOperation ix a)) => Buildable (FilterOperation ix a) where
build = buildSafeGen unsecure
renderFilterOperation :: ToHttpApiData ix => FilterOperation ix a -> Text
renderFilterOperation = \case
FilterByIndex ix ->
toQueryParam ix
FilterByPredicate p ix ->
mconcat [renderFilterOrdering p, "[", toQueryParam ix, "]"]
FilterByRange lo hi ->
mconcat ["RANGE", "[", toQueryParam lo, ",", toQueryParam hi, "]"]
FilterIn ixs ->
"IN[" <> T.intercalate "," (map toQueryParam ixs) <> "]"
instance (BuildableSafeGen (FilterOperation ix a)) => Buildable (SecureLog (FilterOperation ix a)) where
build = buildSafeGen secure . getSecureLog
findMatchingFilterOp
:: forall needle a ixs.
Typeable needle
=> FilterOperations ixs a
-> Maybe (FilterOperation needle a)
findMatchingFilterOp filters =
case filters of
NoFilters ->
Nothing
FilterNop rest ->
findMatchingFilterOp rest
FilterOp (fop :: FilterOperation ix a) rest ->
case eqT @ix @needle of
Just Refl ->
pure fop
Nothing ->
findMatchingFilterOp rest
-- | Maps a function on the first argument of a FilterOperation.
mapIx :: (ixa -> ixb) -> FilterOperation ixa a -> FilterOperation ixb a
mapIx f fop = case fop of
FilterByIndex x -> FilterByIndex (f x)
FilterByPredicate ford x -> FilterByPredicate ford (f x)
FilterByRange from to -> FilterByRange (f from) (f to)
FilterIn ls -> FilterIn (f <$> ls)
-- | Represents a filter operation on the data model.
--
-- The first type parameter is a type level list that describes the
-- available types for Filtering on. The name of the index is given by the
-- 'IndexToQueryParam' type family for the resource and type.
--
-- @
-- 'FilterBy' '[ WalletId, Coin ] Wallet
-- @
--
-- The above combinator would permit query parameters that look like these
-- examples:
--
-- * @id=DEADBEEF@.
-- * @balance=GT[10]@
-- * @balance=RANGE[0,10]@
--
-- In order for this to work, you need to ensure that the type family
-- 'IndexToQueryParam' has an entry for each type for the resource.
--
-- The instances that enable the above lines are:
--
-- @
-- 'IndexToQueryParam' 'Wallet' 'WalletId' = "id"
-- 'IndexToQueryParam' 'Wallet' 'Coin' = "balance"
-- @
data FilterBy (params :: [*]) (resource :: *)
deriving Typeable
-- | This is a slighly boilerplat-y type family which maps symbols to
-- indices, so that we can later on reify them into a list of valid indices.
type family FilterParams (syms :: [Symbol]) (r :: *) :: [*] where
FilterParams '[Param.WalletId, Param.Balance] Wallet = IndicesOf Wallet
FilterParams '[Param.Id, Param.CreatedAt] Transaction = IndicesOf Transaction
class ToFilterOperations (ixs :: [*]) a where
toFilterOperations :: [(Text, Maybe Text)] -> proxy ixs -> FilterOperations ixs a
instance ToFilterOperations ('[]) a where
toFilterOperations _ _ = NoFilters
instance ( IsIndexOf ix a
, ToIndex a ix
, Typeable ix
, ToHttpApiData ix
, FromHttpApiData ix
, BuildableSafe ix
, ToFilterOperations ixs a
, sym ~ IndexToQueryParam a ix
, KnownSymbol sym
)
=> ToFilterOperations (ix ': ixs) a where
toFilterOperations params _ =
fromMaybe (FilterNop rest) $ do
v <- join $ List.lookup x params
op <- rightToMaybe $ parseFilterOperation (Proxy @a) (Proxy @ix) v
pure (FilterOp op rest)
where
rest :: FilterOperations ixs a
rest = toFilterOperations params (Proxy @ ixs)
x = toText $ symbolVal (Proxy @sym)
instance ( HasServer subApi ctx
, ToFilterOperations params res
, SOP.All (ToIndex res) params
) => HasServer (FilterBy params res :> subApi) ctx where
type ServerT (FilterBy params res :> subApi) m = FilterOperations params res -> ServerT subApi m
hoistServerWithContext _ ct hoist' s = hoistServerWithContext (Proxy @subApi) ct hoist' . s
route Proxy context subserver =
let delayed = addParameterCheck subserver . withRequest $ \req ->
return $ toFilterOperations (parseQueryText $ rawQueryString req) (Proxy @params)
in route (Proxy :: Proxy subApi) context delayed
-- | Defines name of @FilterBy syms res@
instance ApiHasArgClass (FilterBy params res) where
type ApiArg (FilterBy params res) = FilterOperations params res
apiArgName _ = "filter_by"
-- | Defines how 'FilterBy' is logged by just refering to instance Buildable FilterOperations.
instance ApiCanLogArg (FilterBy params res) where
toLogParamInfo _ param = \sl -> sformat (buildSafe sl) param
-- | Parse the filter operations, failing silently if the query is malformed.
-- TODO(adinapoli): we need to improve error handling (and the parsers, for
-- what is worth).
parseFilterOperation
:: forall a ix
. ToIndex a ix
=> Proxy a
-> Proxy ix
-> Text
-> Either Text (FilterOperation ix a)
parseFilterOperation p Proxy txt = case parsePredicateQuery <|> parseIndexQuery of
Nothing -> Left "Not a valid filter."
Just f -> Right f
where
parsePredicateQuery :: Maybe (FilterOperation ix a)
parsePredicateQuery =
let (predicate, rest1) = T.breakOn "[" txt
(ixTxt, closing) = T.breakOn "]" (T.drop 1 rest1)
in case (predicate, closing) of
("EQ", "]") -> FilterByPredicate Equal <$> toIndex p ixTxt
("LT", "]") -> FilterByPredicate LesserThan <$> toIndex p ixTxt
("LTE", "]") -> FilterByPredicate LesserThanEqual <$> toIndex p ixTxt
("GT", "]") -> FilterByPredicate GreaterThan <$> toIndex p ixTxt
("GTE", "]") -> FilterByPredicate GreaterThanEqual <$> toIndex p ixTxt
("RANGE", "]") -> parseRangeQuery ixTxt
("IN", "]") -> parseInQuery ixTxt
_ -> Nothing
-- Tries to parse a query by index.
parseIndexQuery :: Maybe (FilterOperation ix a)
parseIndexQuery = FilterByIndex <$> toIndex p txt
-- Tries to parse a range query of the form RANGE[from,to].
parseRangeQuery :: Text -> Maybe (FilterOperation ix a)
parseRangeQuery fromTo =
case bimap identity (T.drop 1) (T.breakOn "," fromTo) of
(_, "") -> Nothing
(from, to) -> FilterByRange <$> toIndex p from <*> toIndex p to
parseInQuery :: Text -> Maybe (FilterOperation ix a)
parseInQuery =
fmap FilterIn . traverse (toIndex p) . T.splitOn ","
instance
( HasClient m next
, SOP.All (ToIndex res) params
, SOP.All (KnownQueryParam res) params
)
=> HasClient m (FilterBy params res :> next) where
type Client m (FilterBy params res :> next) =
FilterOperations params res -> Client m next
clientWithRoute pm _ req fs =
clientWithRoute pm (Proxy @next) (incorporate fs)
where
incorporate =
foldr (uncurry appendToQueryString) req . toQueryString
hoistClientMonad pm _ f cl =
hoistClientMonad pm (Proxy @(FilterBy params res :> next)) f cl
toQueryString :: SOP.All (KnownQueryParam a) ixs => FilterOperations ixs a -> [(Text, Maybe Text)]
toQueryString NoFilters = []
toQueryString (FilterNop rest) = toQueryString rest
toQueryString (FilterOp (fop :: FilterOperation ix a) rest) =
( toText (symbolVal (Proxy @(IndexToQueryParam a ix)))
, Just (toQueryParam fop)
) : toQueryString rest
```
|
```xml
<project xmlns="path_to_url" xmlns:xsi="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.zheng</groupId>
<artifactId>zheng-ucenter</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>zheng-ucenter-rpc-service</artifactId>
<packaging>jar</packaging>
<name>zheng-ucenter-rpc-service</name>
<url>path_to_url
<dependencies>
<dependency>
<groupId>com.zheng</groupId>
<artifactId>zheng-ucenter-rpc-api</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>dev</id>
<properties>
<env>dev</env>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>test</id>
<properties>
<env>test</env>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<env>prod</env>
</properties>
</profile>
</profiles>
<build>
<finalName>zheng-ucenter-rpc-service</finalName>
<filters>
<filter>src/main/resources/profiles/${env}.properties</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.4</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
<configuration>
<skip>true</skip>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
</project>
```
|
```objective-c
//
//
// 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.
#pragma once
// See Note [ Why still include the fluid headers? ]
#include "paddle/phi/kernels/funcs/broadcast_function.h"
#include "paddle/phi/kernels/funcs/complex_functors.h"
#include "paddle/phi/kernels/funcs/elementwise_base.h"
#include "paddle/phi/kernels/funcs/for_range.h"
namespace phi {
template <typename T, typename Context>
void ConjKernel(const Context& dev_ctx,
const DenseTensor& x,
DenseTensor* out) {
auto numel = x.numel();
auto* x_data = x.data<T>();
auto* out_data = dev_ctx.template Alloc<T>(out);
phi::funcs::ForRange<Context> for_range(dev_ctx, numel);
phi::funcs::ConjFunctor<T> functor(x_data, numel, out_data);
for_range(functor);
}
template <typename T, typename Context>
void RealKernel(const Context& dev_ctx,
const DenseTensor& x,
DenseTensor* out) {
auto numel = x.numel();
auto* x_data = x.data<T>();
auto* out_data = dev_ctx.template Alloc<phi::dtype::Real<T>>(
out, static_cast<size_t>(numel * sizeof(phi::dtype::Real<T>)));
phi::funcs::ForRange<Context> for_range(dev_ctx, numel);
phi::funcs::RealFunctor<T> functor(x_data, out_data, numel);
for_range(functor);
}
template <typename T, typename Context>
void ImagKernel(const Context& dev_ctx,
const DenseTensor& x,
DenseTensor* out) {
auto numel = x.numel();
auto* x_data = x.data<T>();
auto* out_data = dev_ctx.template Alloc<phi::dtype::Real<T>>(
out, static_cast<size_t>(numel * sizeof(phi::dtype::Real<T>)));
phi::funcs::ForRange<Context> for_range(dev_ctx, numel);
phi::funcs::ImagFunctor<T> functor(x_data, out_data, numel);
for_range(functor);
}
// functors to use with ElementwiseComputeEx
template <typename T>
struct RealAndImagToComplexFunctor {
inline HOSTDEVICE phi::dtype::complex<T> operator()(const T x, const T y) {
return phi::dtype::complex<T>(x, y);
}
};
template <typename T>
struct ImagAndRealToComplexFunctor {
inline HOSTDEVICE phi::dtype::complex<T> operator()(const T y, const T x) {
return phi::dtype::complex<T>(x, y);
}
};
template <typename T, typename Context>
void ComplexKernel(const Context& dev_ctx,
const DenseTensor& x,
const DenseTensor& y,
DenseTensor* out) {
using C = phi::dtype::complex<T>;
dev_ctx.template Alloc<C>(out);
// NOTE(chenfeiyu): be careful of the caveats of calling elementwise-related
// facility functions
#if defined(__NVCC__) || defined(__HIPCC__)
phi::funcs::ElementwiseCompute<RealAndImagToComplexFunctor<T>, T, C>(
dev_ctx, x, y, RealAndImagToComplexFunctor<T>(), out);
#else
auto x_dims = x.dims();
auto y_dims = y.dims();
if (x_dims.size() >= y_dims.size()) {
phi::funcs::ElementwiseCompute<RealAndImagToComplexFunctor<T>, T, C>(
dev_ctx, x, y, RealAndImagToComplexFunctor<T>(), out);
} else {
phi::funcs::ElementwiseCompute<ImagAndRealToComplexFunctor<T>, T, C>(
dev_ctx, x, y, ImagAndRealToComplexFunctor<T>(), out);
}
#endif
}
} // namespace phi
```
|
Nayvadius DeMun Cash (né Wilburn; born November 20, 1983), known professionally as Future, is an American rapper and singer. Known for his mumble-styled vocals and prolific output, Future is considered a pioneer of the use of melody and auto-tune in modern trap music. Due to the sustained contemporary popularity of his musical style, he is commonly regarded as one of the most influential rappers of his generation.
Born and raised in Atlanta, Georgia, Future signed a recording contract with A1 Recordings and Epic Records in 2011, and released the albums Pluto (2012) and Honest (2014), which contained the platinum-certified singles "Turn On the Lights", "Honest", "Move That Dope" (featuring Pharrell Williams and Pusha T), and "I Won" (featuring Kanye West). His subsequent albums would each peak the US Billboard 200 and receive wider critical and commercial success upon release, beginning with his third album DS2 (2015) and its follow-up Evol (2016), which were supported by the lead singles "Where Ya At" (featuring Drake) and "Low Life" (featuring The Weeknd) respectively. Future's eponymous fifth album and its successor Hndrxx (both 2017) made him the first artist in history to debut two albums in consecutive weeks atop the US Billboard 200; the former contained the international hits "Used to This" (featuring Drake) and "Mask Off".
After departing A1, Future released the albums The Wizrd (2019) and High Off Life (2020), the latter spawned the diamond-certified single "Life Is Good" (featuring Drake). In 2021, Future achieved his first number-one single on the Hot 100 after a record-breaking 125 entries from his guest appearance on Drake's single "Way 2 Sexy" alongside Young Thug. His ninth studio album, I Never Liked You (2022), spawned his second single to peak the Hot 100 and first to do so as a lead artist, "Wait for U" (featuring Drake and Tems). The song won a Grammy Award for Best Melodic Rap Performance, while its parent album received a nomination for Best Rap Album.
Future released the mixtapes Beast Mode (with Zaytoven), 56 Nights (with Southside), and What a Time to Be Alive (with Drake) in 2015; the latter included the hit song "Jumpman". He released the full-length collaborative projects Super Slimey (2017) with Young Thug, Wrld on Drugs (2018) with Juice Wrld, and Pluto x Baby Pluto (2020) with Lil Uzi Vert. Among the best-selling hip hop musicians, Future's accolades include two Grammy Awards from ten total nominations.
Early life and career beginnings
Nayvadius DeMun Wilburn was born on November 20, 1983, in Atlanta, Georgia. He attended Columbia High School in Decatur. At age sixteen ( 1999/2000), Future described getting shot in the hand and robbed, an event he regards as a major turning point in his life.
Future began his career under the name "Meathead" as a member of the Georgia-based musical collective Dungeon Family. He performed in a smaller hip hop group within the collective who went by the name "Da Connect", where he would later be nicknamed "The Future" by group member G-Rock. The group recorded one album, Rico Wade Presents: Da Connect which was slated for commercial release in 2003, but was ultimately shelved. Future had one solo record on the project titled "Belly of da Beast", which is considered to be his first song.
His first cousin, record producer and Dungeon Family member Rico Wade, encouraged him to sharpen his writing skills and pursue a career as a rapper, as recording would create temporary respite from street life. During this time, Future appeared in numerous Dungeon Family music videos, and received his first songwriting credit on the Organized Noize-produced single, "Blueberry Yum Yum" for rapper Ludacris in 2004. Future voices his praise of Wade's musical influence and instruction, calling him the "mastermind" behind his sound. He was thereafter discovered by fellow Atlanta rapper Rocko, who took Future under his wing as a solo artist on his A1 Recordings record label.
From 2010 to early 2011, Future released a series of mixtapes including 1000, Dirty Sprite and True Story. The latter included the single "Tony Montana", in reference to the Scarface film. He gained regional popularity after his songs were played by DJ Esco at Magic City, a strip club in Atlanta deemed "largely responsible for launching the careers of artists." In April 2011, he co-performed with Atlanta rapper YC on his single "Racks", which would become his first hit song and Billboard Hot 100 entry—peaking at number 42. In July of that year, Future and rapper Gucci Mane would release a collaborative mixtape titled Free Bricks.
Career
2011–2014: Pluto and Honest
Future signed a major label recording contract with Epic Records in September 2011, days before the release of his next mixtape, Streetz Calling. The mixtape was described by XXL magazine as ranging from "simple and soundly executed boasts" to "futuristic drinking and drugging jams" to "tales of the grind". A Pitchfork review remarked that on the mixtape Future comes "as close as anyone to perfecting this thread of ringtone pop, where singing and rapping are practically the same thing, and conversing 100% through Auto-Tune doesn't mean you still can't talk about how you used to sell drugs. It would almost feel antiquated if Future weren't amassing hits, or if he weren't bringing some subtle new dimensions to the micro-genre."
Though Future had told MTV that Streetz Calling would be his final mixtape prior to the release of his debut studio album, another mixtape, Astronaut Status, was released in January 2012. In December 2011, Future was featured on the cover of Issue #77 of The FADER. XXL'''s Troy Mathews wrote, "While Astronaut Status is up and down and never really hits the highs like 'Racks', 'Tony Montana', and 'Magic' that fans have come to expect from Future, it's apparent that he's poised to continue the buzz of 2011 humming right along into 2012." Future was selected to the annual XXL Freshmen list in early 2012.
His debut album Pluto, originally planned for January 2012, was eventually released on April 17. Its first three singles were mastered re-recordings of pre-existing songs, "Tony Montana", "Go Harder", and "Magic", the latter contained a guest feature from high-profile hometown native, rapper T.I. According to Future, "'Magic' was the first record T.I. jumped on when he came outta jail. Like, he was out of jail a day and he jumped straight on the 'Magic' record without me even knowing about it." The track became Future's first single as a lead artist to enter the Billboard Hot 100 chart, peaking at number 69 in April 2012. In addition, the albums next singles, "Same Damn Time" and "Turn on the Lights" peaked at number 92 and 50 on the Hot 100 respectively, further ushering Future into the mainstream spotlight. The latter was eventually certified platinum by the RIAA and spawned a remix featuring Lil Wayne. Other collaborators on the album include Trae tha Truth, R. Kelly and Snoop Dogg. On October 8, 2012, Future would perform the hook for Pusha T's single "Pain", which preceded his 2013 debut studio album My Name Is My Name.
It was announced that Future would be repackaging his debut album Pluto on November 27, 2012, under the name Pluto 3D, featuring 3 new songs and 2 remix songs, including the remix for "Same Damn Time" featuring Diddy and Ludacris, as well as his single "Neva End (Remix)" featuring Kelly Rowland. In November 2012, Future wrote, produced, and co-performed with Barbadian singer Rihanna on "Loveeeeeee Song", from the singers seventh studio album, Unapologetic.
On January 15, 2013, Future released the compilation mixtape F.B.G.: The Movie which features the artists signed to his Freebandz label: Young Scooter, Slice9, Casino, Mexico Rann and Maceo. It was certified platinum for having over 250,000 downloads on popular mixtape site DatPiff. Future said of his second studio album Future Hendrix it will be a more substantive musical affair than his debut album and features R&B music along with his usual "street bangers". The album was to be released in 2013. The album featured his then-fianceé Ciara, as well as other high profile artists including Kanye West, Drake, Kelly Rowland, Wiz Khalifa, and André 3000, among others.
The album's lead single, "Karate Chop" featuring Casino, premiered on January 25, 2013, and was sent to urban radio on January 29, 2013. The song, produced by Atlanta based producer Metro Boomin, spawned an official remix featuring Lil Wayne, was sent radio and was released on iTunes on February 19, 2013. On August 7, 2013, Future changed the title of his second album from Future Hendrix to Honest and announced that it would be released on November 26, 2013. It was later revealed that the album would be pushed back to April 22, 2014, as it was said that Future has tour dates with Drake on Would You Like A Tour?. Along with "Karate Chop", the album was preceded by the singles "Honest", "Shit", "Move That Dope", featuring Pharrell and Pusha T and "I Won" featuring Kanye West; "Honest" peaked at number 55 on the Hot 100. Upon release, the album was received generally positively and peaked at number 2 on the Billboard 200. During this time, Future also made a slew of guest appearances on hit songs including Lil Wayne's 2013 hit single "Love Me", Rocko's single "U.O.E.N.O." the same year, and DJ Khaled's 2014 single "Hold You Down".
2015–2017: DS2, Evol, Future and Hndrxx
Future released DS2 on July 16, 2015. On September 20, 2015, Future released a collaborative mixtape with Canadian rapper Drake, titled What a Time to Be Alive. The album debuted at number one on the Billboard 200, Billboard R&B Charts, and Billboard Hot Rap Songs, marking the first time a rapper was able to score two number one albums in a year, in 11 years, since Jay Z back in 2004. The mixtape has sold over 334,000 copies in the U.S. On January 17, 2016, Future released another mixtape, titled Purple Reign, with executive production from Metro Boomin and DJ Esco, as well as beat credits from Southside, Zaytoven and more. On February 5, 2016, Future premiered his fourth studio album, EVOL, on DJ Khaled's debut episode of the Beats 1 radio show We The Best. In 2016, Future became the fastest artist to chart three number-one albums on the Billboard 200 since Glee soundtrack albums in 2010.
On June 29, 2016, he appeared in an issue of Rolling Stone. On Valentine's Day 2017, Future announced via Instagram that his self-titled fifth studio album would be released on February 17, 2017. Exactly one week later, he would release his sixth studio album titled Hndrxx. Both albums went number one consecutively, which made Future the first artist to debut two albums at number one at the same time on the Billboard 200 and Canadian Albums Chart. On October 20, 2017 he alongside Young Thug would drop their collaboration mixtape Called Super Slimey. He, along with Ed Sheeran, collaborated with singer-songwriter Taylor Swift on the song "End Game" from her album Reputation. The song peaked at number 18 on the Billboard Hot 100 and was Future's eighth top 20 hit.
2018–2019: Soundtrack work and The Wizrd
On January 11, 2018, Future collaborated alongside Kendrick Lamar, James Blake and Jay Rock for the song, "King's Dead", from the soundtrack album of the Marvel Studios superhero film Black Panther and Jay Rock's third studio album Redemption. At the 61st Annual Grammy Awards, the song earned two Grammy nominations, for Best Rap Performance and Best Rap Song, marking Future's first career Grammy nominations. Future curated the soundtrack for the movie Superfly, which was released in June 2018. On October 19, 2018, Future released Wrld On Drugs, a collaborative mixtape with fellow American rapper Juice Wrld. Wrld on Drugs debuted at number two on the US Billboard 200 behind A Star Is Born by Lady Gaga and Bradley Cooper, with 98,000 album-equivalent units, which included 8,000 pure album sales. It became Future's tenth top-ten album in the United States, and Juice Wrld's second.
On January 18, 2019, Future released his seventh studio album, Future Hndrxx Presents: The Wizrd. The album consists of 20 songs and was promoted by a film titled The Wizrd, released on January 11 on Apple Music. The Wizrd received generally positive reviews from critics and became Future's sixth US number-one album, debuting at number one on the US Billboard 200 with 125,000 album-equivalent units (including 15,000 pure album sales). With the release of The Wizrd, several songs from the album charted on the Billboard Hot 100, leading to Future becoming the artist with the 10th most entries in Hot 100 history. At the 61st Annual Grammy Awards held on February 10, 2019, Future won his first Grammy Award for Best Rap Performance for his collaboration alongside Jay Rock, Kendrick Lamar and James Blake for the song, "King's Dead", from the soundtrack album of the Marvel Studios superhero film Black Panther.On June 7, 2019, Future released his second project of the year, his debut solo EP titled Save Me. Save Me received mixed reviews from music critics and debuted at number 5 on the US Billboard 200.
2020–present: High Off Life, Pluto x Baby Pluto and I Never Liked You
In January 2020, Future released the songs "Life Is Good" and "Desires", both collaborations with Drake. In April, Future announced his eighth studio album, Life Is Good. The title was later changed to High Off Life and was released on May 15, 2020. The album debuted at number one on the US Billboard 200 chart, with 153,000 units in its first week, becoming Future's seventh consecutive album to debut at number one. In August 2020, Future teased a song, "Gucci Bucket Hat". It was released as a single with Pap Chanel, featuring Herion Young, on October 20, 2020. On November 13, 2020, Future released Pluto x Baby Pluto, a collaborative studio album with Lil Uzi Vert, which was his second project of that year. It debuted and peaked at number two on the US Billboard 200. Future broke the record for most Billboard Hot 100 entries (125) until a number one single after featuring on Drake's 2021 single "Way 2 Sexy".
In April 2022, Future was named one of the "best rappers alive" by GQ. On April 29, 2022, Future released his ninth studio album I Never Liked You, after it was previously announced earlier that month.
Musical style
Future's music has been characterized as trap music. Future makes prevalent use of Auto-Tune in his songs, both rapping and singing with the effect. In 2013, Pitchfork wrote that Future "miraculously shows that it's still possible for Auto-Tune to be an interesting artistic tool", stating that he "finds a multitude of ways for the software to accentuate and color emotion". The LA Times wrote in 2016 that "Future's highly processed vocals suggest a man driven to bleary desperation by drugs or love or technology", stating that his music "comes closest to conjuring the numbing overstimulation of our time". GQ stated in 2014 that he "has managed to reboot the tired auto-tune sound and mash it into something entirely new", writing that he "combines it with a bizarro croon to synthesize how he feels, then [...] stretches and deteriorates his words until they're less like words, more like raw energy and reactive emotions". Critic Simon Reynolds wrote in 2018 that "he's reinvented blues for the 21st century."
American rapper T-Pain, who also uses that audio processor, criticized Future's unconventional use of it in 2014. In response, Future stated in an interview that "when I first used Auto-Tune, I never used it to sing. I wasn't using it the way T-Pain was. I used it to rap because it makes my voice sound grittier. Now everybody wants to rap in Auto-Tune. Future's not everybody."
Due to the sustained contemporary popularity of his musical style, he is commonly regarded as one of the most influential rappers of his generation.
Personal life
Future is the father of at least seven children by his account, each with different women, although another child's paternity has been litigated. He has also adopted the son of one of the mothers of his daughter.
In October 2013, Future was engaged to Ciara, who is the mother of one of his sons, but she ended the engagement in August 2014 due to his infidelity.
In 2016, Future was sued by both Jessica Smith and Ciara. Smith sued him for failing to pay child support, stating their son "suffers from emotional and behavioral issues stemming from Future's neglect as a father". Ciara sued him for defamation, slander, and libel. In October 2016, a judge said that Future's string of tweets bashing Ciara did not relate to the $15 million she was asking for. In 2019, two women from Florida and Texas respectively filed paternity suits claiming that Future was the father of their respective daughter and son. In 2020, the Texas woman dropped her paternity suit.
Discography
Studio albums
Pluto (2012)
Honest (2014)
DS2 (2015)
Evol (2016)
Future (2017)
Hndrxx (2017)
The Wizrd (2019)
High Off Life (2020)
I Never Liked You (2022)
Collaborative albums
Pluto x Baby Pluto'' (2020)
Tours
Headlining
Nobody Safe Tour (2017)
Future Hndrxx Tour (2017)
Future and Friends: One Big Party Tour (2023)
Co–headlining
Summer Sixteen Tour (with Drake) (2016)
Legendary Nights Tour (2019)
Awards and nominations
References
External links
1983 births
Living people
21st-century American rappers
African-American male rappers
African-American record producers
African-American male singer-songwriters
American contemporary R&B singers
American hip hop record producers
American hip hop singers
Dungeon Family members
Epic Records artists
Grammy Award winners for rap music
People from DeKalb County, Georgia
Rappers from Atlanta
Record producers from Georgia (U.S. state)
Singer-songwriters from Georgia (U.S. state)
Southern hip hop musicians
Trap musicians
|
Michael Painter (1935 - 2018) was an American landscape architect and urban designer based in San Francisco, California. He was a fellow of the American Society of Landscape Architects. His most notable project is the Presidio Parkway, a roadway through the Presidio National Park from the Golden Gate Bridge. Other notable projects include the John F. Kennedy Grave Site at Arlington National Cemetery, the Great Highway/Ocean Beach Re-Construction in San Francisco, Children's Playground in Golden Gate Park, the College of San Mateo, Twin Peaks overlook in San Francisco, Hunter's Point Hilltop Park in San Francisco, AT&T Administrative Center in San Ramon, Lafayette Park and the Blair House in Washington D.C., Aquatic Park in Berkeley, Hennepin Center in Minneapolis, State Compensation Insurance Fund in San Francisco, Genentech Campus in South San Francisco, the HP Corporate Headquarters in Palo Alto, and the Asilomar Conference Center in Monterey.
Early and Personal Life
Michael Painter was born in Pasadena, California, son of Lillias Armour Painter and John Guy Painter. As a child during World War II, he tended the home “Victory garden,” which included vegetables and ornamental plants. At twelve years old he began working in the summer as the assistant of a Mr. Poland, a landscape maintenance person working in Pasadena and Altadena residential gardens. Mr. Poland introduced the idea of becoming a landscape architect. Painter's first design project was a new garden for his parents' home. Jacques Hahn and Chuck Hoffman of the firm Hahn and Hoffman, Painter's summer employers between 1950 and 1955, suggested the Landscape Architecture program at the University of California, Berkeley.
Michael Painter married Margaret Susan Collins in 1959. They had met in 1955 at Laguna Beach, California. After finishing college, the two married and moved to San Francisco. Their first home was in Lucas Valley, Marin County, north of San Francisco. In 1964 they moved to a home they had bought in Mill Valley, California, where Painter lived the rest of his life. Daughter Melissa Painter was born in 1968 and son Joshua Painter was born in 1971. Designing new landscape plans for his home and doing the construction at the Mill Valley residence was a lifelong hobby.
Career
While attending the University of California, Berkeley’s College of Environmental Design, his instructor Mai Arbegast recommended Painter to the Lawrence Halprin office as a student intern, where he worked for two years starting in 1956. At the Halprin firm, Painter was involved with projects such as the Stanford Shopping Center, the consulate in Fukuoka Japan, enhancements to UC Berkeley and Davis campuses, and the Baptist Seminary in Mill Valley, California. On the Baptist Seminary project he served as project manager, interacting with the project architects, John Carl Warnecke and Associates.
In 1958, Painter jointed the Warnecke firm to start a landscape architecture section. There he worked on projects such as the Del Monte Shopping Center, Asilomar, the Hawaiian State Capitol, and the UC Santa Cruz master plan. In 1961 he was made an associate of the firm, and in 1964, a partner. He left briefly to work with landscape architect Peter Walker, then returned to the Warnecke firm.
In 1961 Painter began working with the Warnecke Washington, D. C. office on projects such as the Kennedy gravesite in Arlington National Cemetery, Lafayette Park, the Georgetown Library, the Blair House garden, and the master plan for the Naval Academy campus at Annapolis. Painter created the design direction of the Kennedy gravesite project.
In 1965, Warnecke proposed that Painter attend Harvard University to study urban design. Painter continued to manage the landscape team during the year long Masters program at Harvard. Following graduation, Painter spent the summer in Washington D.C. to refine the Kennedy Grave design and supervise construction. Bunny Mellon, a close friend of Jacqueline Kennedy, helped with the design and consulted on plant materials.
After returning to San Francisco, Painter worked on projects such as the Kaiser Center for Technology, the Hilton Hotel in Tahiti, and the Monterey Custom House redevelopment. In 1969 he left the Warnecke firm to establish Michael Painter & Associates. He continued to work with the Warnecke firm on projects such as the Pasadena Center as well as with other architects. In 1984 the firm name was changed to MPA Design.
Painter's interest in large, complex projects, his exposure to city planning with Vernon DeMars at Berkeley, as well as his graduate studies at Harvard, set the direction for his firm’s work on civic and educational projects, corporate campuses, parks, and playgrounds. Painter learned from elementary school teachers about the possibility of designing play structures that could address children's learning differences. He worked closely with the San Francisco Recreation and Parks Department on a number of projects. Another civic project, the redesign of San Francisco’s Great Highway/Ocean Beach, was begun in 1977 and was completed in 1988.
Painter served on the San Francisco Architectural Heritage Board, the San Francisco Planning and Urban Research Advisory Committee (SPUR), San Francisco's Friends of Recreation and Parks, the San Francisco Landscape Garden Show, the Exploratorium science museum board, and the Presidio Historical Association. He was named a Fellow of the American Society of Landscape Architects in 1987. In 2010 was given the Distinguished Alumnus Award from the College of Environmental Design, UC Berkeley. Painter completed over 850 projects and received more than 60 awards over the course of his career.
Presidio Parkway Project
In 1988, at the Exploratorium science museum, then at the Palace of Fine Arts located at the eastern end of Doyle Drive, Painter climbed the rooftop to assess possibilities for additional museum parking. While looking at the view of the way the Marina district was connected to the Presidio in a semi-circular arc, he imagined his design for the drive where the view would be visible by eliminating the elevated viaduct, lowering the roadway, and creating a series of tunnels that would run up the north spine of the Presidio. The tunnel-top solution would enable pedestrian or bicycle access from the Presidio Main Post to Cavalry Hill, the National Cemetery, and Crissy Field. It would be less costly than replacing the existing viaduct.
Painter presented the plan in a 1992 meeting of the Doyle Drive Task Force. Painter proposed rejecting existing designs for the bridge-and-tunnel scheme. The plan provided a solution to the existing issues with the Doyle Drive approaches to the Golden Gate Bridge and provides space for the new Tunnel Top Park.
Painter created the initial design in the early 1990s without pay. Later he became a leader of the project team and was listed as the architect on its environmental impact report. Construction started in 2008 and the Presidio Parkway was opened in 2015. A film "A Parkway for the People" commemorates the project.
Notable Awards
Presidio Parkway
Community Service Award, AIA
San Francisco Merit Award, ASLA, Northern California
Certificate of Recognition, California State Assembly
Grave Site of President John F. Kennedy, Arlington, Virginia
Honor Award, ASLA, National
Great Highway/Ocean Beach Reconstruction, San Francisco
Honor Award, ASLA, National
Hennepin County Government Center, Minneapolis
Merit Award, ASLA, National
Twin Peaks: Vista Point Overlook, San Francisco
Merit Award, ASLA, Northern California Chapter
Pacific Bell Administrative Center, San Ramon
Award of Excellence, Urban Land Institute
Honor Award, ASLA, Northern California Chapter
Merit Award, ASLA, National
General Electric A.P.E.D. Headquarters Building, San Jose
Honor Award, ASLA, National
Hewlett Packard, Cupertino
Merit Award, ASLA, National
Asilomar Conference Center, Pacific Grove
Honor Award, ASLA, National
Blair House Garden, Washington, D.C.
Merit Award, ASLA, National
Lafayette Park, Washington D.C.
Merit Award, American Society of Landscape Architects
Mary B. Connolly Children’s Playground, Golden Gate Park, San Francisco
Honor Award, ASLA, National
References
1935 births
2018 deaths
20th-century American architects
American urban planners
Architects from Pasadena, California
University of California, Berkeley alumni
Harvard Graduate School of Design alumni
|
Dwight T. Parker Public Library is a public library in Fennimore, Wisconsin. The building was constructed in 1923 to house the city's library, which had previously been based in a Methodist church and the Old Fennimore House. Dwight T. Parker, a local banker, funded the library. The architectural firm Claude & Starck designed the structure in a mixture of the Mediterranean Revival and neoclassical styles; the brick building features terra cotta ornamentation and a tile roof.
The library was added to the National Register of Historic Places on March 10, 1983.
References
Library buildings completed in 1923
Libraries on the National Register of Historic Places in Wisconsin
Buildings and structures in Grant County, Wisconsin
Mediterranean Revival architecture in Wisconsin
Neoclassical architecture in Wisconsin
National Register of Historic Places in Grant County, Wisconsin
1923 establishments in Wisconsin
|
```html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>io_context::strand::dispatch (2 of 2 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="../dispatch.html" title="io_context::strand::dispatch">
<link rel="prev" href="overload1.html" title="io_context::strand::dispatch (1 of 2 overloads)">
<link rel="next" href="../get_io_context.html" title="io_context::strand::get_io_context">
</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="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dispatch.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="../get_io_context.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.io_context__strand.dispatch.overload2"></a><a class="link" href="overload2.html" title="io_context::strand::dispatch (2 of 2 overloads)">io_context::strand::dispatch
(2 of 2 overloads)</a>
</h5></div></div></div>
<p>
(Deprecated: Use <a class="link" href="../../dispatch.html" title="dispatch"><code class="computeroutput">dispatch</code></a>.)
Request the strand to invoke the given handler.
</p>
<pre class="programlisting">template<
typename <a class="link" href="../../CompletionHandler.html" title="Completion handler requirements">CompletionHandler</a>>
<a class="link" href="../../asynchronous_operations/automatic_deduction_of_initiating_function_return_type.html" title="Automatic deduction of initiating function return type"><span class="emphasis"><em>DEDUCED</em></span></a> dispatch(
CompletionHandler && handler);
</pre>
<p>
This function is used to ask the strand to execute the given handler.
</p>
<p>
The strand object guarantees that handlers posted or dispatched through
the strand will not be executed concurrently. The handler may be executed
inside this function if the guarantee can be met. If this function is
called from within a handler that was posted or dispatched through the
same strand, then the new handler will be executed immediately.
</p>
<p>
The strand's guarantee is in addition to the guarantee provided by the
underlying <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>.
The <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
guarantees that the handler will only be called in a thread in which
the io_context's run member function is currently being invoked.
</p>
<h6>
<a name="boost_asio.reference.io_context__strand.dispatch.overload2.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context__strand.dispatch.overload2.parameters"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context__strand.dispatch.overload2.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">handler</span></dt>
<dd>
<p>
The handler to be called. The strand will make a copy of the handler
object as required. The function signature of the handler must
be:
</p>
<pre class="programlisting">void handler();
</pre>
<p>
</p>
</dd>
</dl>
</div>
</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="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dispatch.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="../get_io_context.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
```
|
Irene Zisblatt (née Zegelstein; born 28 December 1929) is a Carpathian Mountains-born American Holocaust survivor. She was an inmate in the Auschwitz-Birkenau concentration camp. She appeared in the 1998 documentary The Last Days and published her autobiography The Fifth Diamond in 2008.
Biography
Irene Zegelstein was born on 28 December 1929, in the resort town of Polyana, in what is now Zakarpattia Oblast in Ukraine, in a house with no electricity. Her father was a co-owner of a spa, and her mother was a housewife. Around 1939, at the age of nine, she was expelled from school, since Jewish people were forbidden to leave their houses after six in the evening or before eight in the morning.
On the second night of Passover, 8 April 1944, she and her family were sent to the ghetto of Munkács, which, according to Zisblatt, consisted of a former brick factory surrounded by a fence. All houses were already full, so her family built a small tent from the tablecloths they had in their suitcases, and that's where they slept.
Some time later, she and her family were deceived into believing that they were being transferred to work in the vineyards in Tokaj, Hungary. Instead, they were sent on a train to the Auschwitz concentration camp. She was immediately separated from her family and she was the only one of her 40 family members to survive the gas chambers. Everyone older than 45 or younger than 15 was sent immediately to the gas chambers. Her entire family was gassed up in Gas Chamber No. 2, including her parents. Before leaving, her mother gave her four diamonds to purchase bread. However, not wanting to accept the soldiers' request to put valuables inside bags, Zisblatt swallowed the diamonds, which her mother had sewn into her dress. She later stated that she then recovered the diamonds from her feces. After cleaning the diamonds, she repeated the process on many occasions when she was selected for testing by Josef Mengele.
With the help of another prisoner, she was able to escape Auschwitz by getting on a train traveling across tracks running near the No. 3 gas chamber. The train took her to the Neuengamme concentration camp in Germany where shortly after she was forced to go on a "death march" as the war wound down. After marching for days upon days Zisblatt states that she and her friend escaped during a dark night as they stood between two forests. The next day, they were found by American soldiers. Her friend later died from disease the following day. She was adopted to an American family two years later.
Zisblatt was one of five Hungarian Holocaust survivors whose story was featured in the 1998 Academy Award-winning documentary movie, The Last Days, directed by James Moll and produced by Steven Spielberg. The documentary follows Zisblatt as she and her daughter travel back to sites of memory, including Zisblatt's childhood town, which she had not seen since her deportation in 1944. Zisblatt also visited the ghetto she was formerly placed in, before she was deported to Auschwitz. Experimental psychologist George Mastroianni, in his Times of Israel Blogs piece discussing The Last Days and a 2010 blog piece by independent scholar Joachim Neander, stated "Neander analyzed Zisblatt's testimony and raised concerns about the factual accuracy of some of the elements of her story."
Personal life
Zisblatt now lives in Broward County, Florida. She has a son Mark (b. 1957), a daughter, Robin (b. 1963), and five grandchildren. She frequently makes visits to American schools to talk about her personal Holocaust experiences.
References
Auschwitz concentration camp survivors
Hungarian Jews
1929 births
Living people
Women autobiographers
Hungarian women writers
|
Body and Soul is a studio album by jazz singer Billie Holiday, released in 1957.
Critical reception
In its 1957 review of the album, Saturday Review wrote: "With changes in her voice which bring Miss Holiday's singing closer to recitative has come an occasional timidity about altering a melody where before there was boldness. But she remains one of the best jazz singers, not only for her unique sound and attack, but for her straightforward, honest, musical communication."
Track listing
A side
"Body and Soul" (Johnny Green, Edward Heyman, Robert Sour, and Frank Eyton) – 6:18
"They Can't Take That Away From Me" (George and Ira Gershwin) – 4:08
"Darn That Dream" (Jimmy Van Heusen and Eddie DeLange) – 6:15
"Let's Call The Whole Thing Off" (George and Ira Gershwin) – 3:22
B side
"Comes Love" (Sam H. Stept, Lew Brown and Charles Tobias) – 3:58
"Gee Baby, Ain't I Good to You" (Andy Razaf and Don Redman) – 5:34
"Embraceable You" (George and Ira Gershwin) – 6:45
"Moonlight in Vermont" (Karl Suessdorf and John Blackburn)- 3:47
bonus tracks on 2002 Verve Master Edition CD
"Comes Love" (false start take 2) - 0:32
"Comes Love" (false start take 3) - 0:20
"Comes Love" (alternate take 1) - 3:56
Personnel
Billie Holiday – vocals
Ben Webster – Tenor Sax
Barney Kessel – Guitar
Harry "Sweets" Edison – Trumpet
Jimmy Rowles – Piano
Red Mitchell – Bass
Alvin Stoller – Drums on 1, 3, 5 and 8
Larry Bunker – Drums on 2, 4, 6 and 7
References
1956 albums
Billie Holiday albums
Clef Records albums
Verve Records albums
Albums produced by Norman Granz
|
```python
#!/usr/bin/env python
"""Create training data from OpenStreetMap labels and NAIP images."""
import argparse
from src.training_data import download_and_serialize
def create_parser():
"""Create the argparse parser."""
parser = argparse.ArgumentParser()
parser.add_argument("--tile-size",
default=64,
type=int,
help="tile the NAIP and training data into NxN tiles with this dimension")
parser.add_argument("--tile-overlap",
default=1,
type=int,
help="divide the tile-size by this arg for how many pixels to move over "
"when tiling data. this is set to 1 by default, so tiles don't "
"overlap. setting it to 2 would make tiles overlap by half, and "
"setting it to 3 would make the tiles overlap by 2/3rds")
parser.add_argument("--pixels-to-fatten-roads",
default=3,
type=int,
help="the number of px to fatten a road centerline (e.g. the default 3 "
"makes roads 7px wide)")
parser.add_argument("--percent-for-training-data",
default=.90,
type=float,
help="how much data to allocate for training. the remainder is left for "
"test")
parser.add_argument("--bands",
default=[1, 1, 1, 1],
nargs=4,
type=int,
help="specify which bands to activate (R G B IR)"
"--bands 1 1 1 1 (which activates only all bands)")
parser.add_argument(
"--label-data-files",
nargs='+',
default=[
'path_to_url
],
type=str,
help="PBF files to extract road/feature label info from")
parser.add_argument("--naip-path",
default=['de', '2013'],
nargs=2,
type=str,
help="specify the state and year for the NAIPs to analyze"
"--naip-path de 2013 (defaults to some Delaware data)")
parser.add_argument("--randomize-naips",
default=False,
action='store_false',
help="turn on this arg if you don't want to get NAIPs in order from the "
"bucket path")
parser.add_argument("--number-of-naips",
default=6,
type=int,
help="the number of naip images to analyze, 30+ sq. km each")
parser.add_argument("--extract-type",
default='highway',
choices=['highway', 'tennis', 'footway', 'cycleway'],
help="the type of feature to identify")
parser.add_argument("--save-clippings",
action='store_true',
help="save the training data tiles to /data/naip")
return parser
def main():
"""Download and serialize training data."""
args = create_parser().parse_args()
naip_state, naip_year = args.naip_path
download_and_serialize(args.number_of_naips,
args.randomize_naips,
naip_state,
naip_year,
args.extract_type,
args.bands,
args.tile_size,
args.pixels_to_fatten_roads,
args.label_data_files,
args.tile_overlap)
if __name__ == "__main__":
main()
```
|
Vyoska () is a rural locality (a village) in Simskoye Rural Settlement, Yuryev-Polsky District, Vladimir Oblast, Russia. The population was 188 as of 2010.
Geography
Vyoska is located 18 km north of Yuryev-Polsky (the district's administrative centre) by road. Aleksino is the nearest rural locality.
References
Rural localities in Yuryev-Polsky District
|
```javascript
import * as ReactDOMServerBrowser from 'react-dom/server.browser'
// Fine to drop once React is on ESM
import ReactDOMServerBrowserDefault from 'react-dom/server.browser'
export default function Page() {
return (
<pre>
{JSON.stringify(
{
default: Object.keys(ReactDOMServerBrowserDefault).sort(),
named: Object.keys(ReactDOMServerBrowser).sort(),
},
null,
2
)}
</pre>
)
}
```
|
Vishnu Springs is a ruined resort town located in a river valley in west-central McDonough County, Illinois. Not much of the town remains today; however, a few buildings still exist. The townsite is located in Tennessee Township.
History
Throughout the 1880s, groups as large as 2,000 people gathered in a western Illinois river valley in what is now Vishnu Springs. According to legend, the natural spring water was said to have had medicinal properties capable of solving a variety of physical and psychological ailments. Some time in the 1880s, the land was named after the Hindu god Vishnu because of the supposed healing power of the water.
Near the start of the 20th century, a man named Darius Hicks took steps to start a town and health resort on the land around Vishnu Springs. He divided the land owned by his family into plots, and sold them for $30 each. The centerpiece of the town was a three-story hotel named the Capitol Hotel, which was built to attract people seeking the health and spiritual effects of the spring. The town featured two stores: a blacksmith shop and a restaurant. Transportation was provided by horse and buggy from the nearby town of Colchester, Illinois. Later, Hicks added parks, a fishing pond, a racetrack, and a schoolhouse.
In the summer of 1903, a supervisor was inspecting the horse that turned the gears of the resort's carousel. The supervisor was to ensure that the horse was walking at a steady pace while children were riding the carousel. Somehow, that supervisor's shirtsleeve was caught in the gears of the carousel, pulling him into them. Screams of terror interrupted the sound of the joyful children riding the carousel as the supervisor was crushed to his death. The carousel was stopped, and was never again ran.
Despite Hicks’ efforts, the town never prospered. Transportation was difficult due to the lack of rail lines or an easily navigable river. Hicks left the resort town in 1903, and indifferent management let the town decay. By the 1920s, most of the businesses had closed, large numbers of guests stopped visiting, and the town could be considered abandoned.
A man named Ira Post attempted to revive the resort in 1935. Post marketed the area as a vacation and picnic area that had limited success until the 1950s, when Post died. In 1968, a woman named Alfred White and two men named Albert Simmons and Irvin Minor tried to reopen the restaurant and country music attraction. In the 1970s, a group of students from Western Illinois University started a commune on the land. The commune sustained itself with farming, livestock, and occasional music festivals. The hotel was once again abandoned by 1982.
Most of the town is gone today, however the hotel still stands.Much of the hotel has been ruined by vandals and structural decay. The land was donated to Western Illinois University in 2003 as a wildlife refuge and a place for conservation and research.
Ira & Reatha T. Post Wildlife Sanctuary
The property is now known as the Ira & Reatha T. Post Wildlife Sanctuary, and is operated by the Western Illinois University Foundation as a wildlife sanctuary and study area for the university's students.
References
External links
Ira & Reatha T. Post Wildlife Sanctuary - official site at Western Illinois University
Friends of Vishnu Springs - History
Ghost towns in Illinois
Protected areas of McDonough County, Illinois
Nature reserves in Illinois
Populated places established in the 1880s
1880s establishments in Illinois
|
Pavao Muhić (1 January 1811 - 17 October 1897) was a Croatian lawyer and politician.
He was born in Požega. He taught as a professor of political science and cameralism at the School of the Royal Academy of Science (1835-1850) and at the Law Academy (1850-1871), where he also served as a director. He was a member of the Croatian Parliament in 1861–1866, and the Head of the Department for Education and Religious Affairs of the Provincial Government of Croatia, Slavonia and Dalmatia in 1872–1881. He was a regular member of the Yugoslav Academy of Sciences and Arts since 1866, and its president in 1888.
He died in Zagreb.
References
Croatian lawyers
Croatian politicians
1811 births
1897 deaths
Members of the Croatian Academy of Sciences and Arts
People from Požega, Croatia
|
```c++
/*
*
* Silicon Graphics Computer Systems, Inc.
*
* Moscow Center for SPARC Technology
*
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
#include "stlport_prefix.h"
#include <memory>
#if defined (__GNUC__) && (defined (__CYGWIN__) || defined (__MINGW32__))
# include <malloc.h>
#endif
#if defined (_STLP_PTHREADS) && !defined (_STLP_NO_THREADS)
# include <pthread_alloc>
# include <cerrno>
#endif
#include <stl/_threads.h>
#include "lock_free_slist.h"
#if defined (__WATCOMC__)
# pragma warning 13 9
# pragma warning 367 9
# pragma warning 368 9
#endif
#if defined (_STLP_SGI_THREADS)
// We test whether threads are in use before locking.
// Perhaps this should be moved into stl_threads.h, but that
// probably makes it harder to avoid the procedure call when
// it isn't needed.
extern "C" {
extern int __us_rsthread_malloc;
}
#endif
// Specialised debug form of new operator which does not provide "false"
// memory leaks when run with debug CRT libraries.
#if defined (_STLP_MSVC) && (_STLP_MSVC >= 1020 && defined (_STLP_DEBUG_ALLOC)) && !defined (_STLP_WCE)
# include <crtdbg.h>
inline char* __stlp_new_chunk(size_t __bytes) {
void *__chunk = _STLP_CHECK_NULL_ALLOC(::operator new(__bytes, __FILE__, __LINE__));
return __STATIC_CAST(char*, __chunk);
}
inline void __stlp_delete_chunck(void* __p) { ::operator delete(__p, __FILE__, __LINE__); }
#else
# ifdef _STLP_NODE_ALLOC_USE_MALLOC
# include <cstdlib>
inline char* __stlp_new_chunk(size_t __bytes) {
// do not use _STLP_CHECK_NULL_ALLOC, this macro is dedicated to new operator.
void *__chunk = _STLP_VENDOR_CSTD::malloc(__bytes);
if (__chunk == 0) {
_STLP_THROW_BAD_ALLOC;
}
return __STATIC_CAST(char*, __chunk);
}
inline void __stlp_delete_chunck(void* __p) { _STLP_VENDOR_CSTD::free(__p); }
# else
inline char* __stlp_new_chunk(size_t __bytes)
{ return __STATIC_CAST(char*, _STLP_STD::__stl_new(__bytes)); }
inline void __stlp_delete_chunck(void* __p) { _STLP_STD::__stl_delete(__p); }
# endif
#endif
/* This is an additional atomic operations to the ones already defined in
* stl/_threads.h, platform should try to support it to improve performance.
* __add_atomic_t _STLP_ATOMIC_ADD(volatile __add_atomic_t* __target, __add_atomic_t __val) :
* does *__target = *__target + __val and returns the old *__target value */
typedef long __add_atomic_t;
typedef unsigned long __uadd_atomic_t;
#if defined (__GNUC__) && defined (__i386__)
inline long _STLP_atomic_add_gcc_x86(long volatile* p, long addend) {
long result;
__asm__ __volatile__
("lock; xaddl %1, %0;"
:"=m" (*p), "=r" (result)
:"m" (*p), "1" (addend)
:"cc");
return result + addend;
}
# define _STLP_ATOMIC_ADD(__dst, __val) _STLP_atomic_add_gcc_x86(__dst, __val)
#elif defined (_STLP_WIN32THREADS)
// The Win32 API function InterlockedExchangeAdd is not available on Windows 95.
# if !defined (_STLP_WIN95_LIKE)
# if defined (_STLP_NEW_PLATFORM_SDK)
# define _STLP_ATOMIC_ADD(__dst, __val) InterlockedExchangeAdd(__dst, __val)
# else
# define _STLP_ATOMIC_ADD(__dst, __val) InterlockedExchangeAdd(__CONST_CAST(__add_atomic_t*, __dst), __val)
# endif
# endif
#endif
#if defined (__OS400__)
// dums 02/05/2007: is it really necessary ?
enum { _ALIGN = 16, _ALIGN_SHIFT = 4 };
#else
enum { _ALIGN = 2 * sizeof(void*), _ALIGN_SHIFT = 2 + sizeof(void*) / 4 };
#endif
#define _S_FREELIST_INDEX(__bytes) ((__bytes - size_t(1)) >> (int)_ALIGN_SHIFT)
_STLP_BEGIN_NAMESPACE
// malloc_alloc out-of-memory handling
static __oom_handler_type __oom_handler = __STATIC_CAST(__oom_handler_type, 0);
#ifdef _STLP_THREADS
_STLP_mutex __oom_handler_lock;
#endif
void* _STLP_CALL __malloc_alloc::allocate(size_t __n)
{
void *__result = malloc(__n);
if ( 0 == __result ) {
__oom_handler_type __my_malloc_handler;
for (;;) {
{
#ifdef _STLP_THREADS
_STLP_auto_lock _l( __oom_handler_lock );
#endif
__my_malloc_handler = __oom_handler;
}
if ( 0 == __my_malloc_handler) {
_STLP_THROW_BAD_ALLOC;
}
(*__my_malloc_handler)();
__result = malloc(__n);
if ( __result )
return __result;
}
}
return __result;
}
__oom_handler_type _STLP_CALL __malloc_alloc::set_malloc_handler(__oom_handler_type __f)
{
#ifdef _STLP_THREADS
_STLP_auto_lock _l( __oom_handler_lock );
#endif
__oom_handler_type __old = __oom_handler;
__oom_handler = __f;
return __old;
}
// *******************************************************
// Default node allocator.
// With a reasonable compiler, this should be roughly as fast as the
// original STL class-specific allocators, but with less fragmentation.
//
// Important implementation properties:
// 1. If the client request an object of size > _MAX_BYTES, the resulting
// object will be obtained directly from malloc.
// 2. In all other cases, we allocate an object of size exactly
// _S_round_up(requested_size). Thus the client has enough size
// information that we can return the object to the proper free list
// without permanently losing part of the object.
//
#define _STLP_NFREELISTS 16
#if defined (_STLP_LEAKS_PEDANTIC) && defined (_STLP_USE_DYNAMIC_LIB)
/*
* We can only do cleanup of the node allocator memory pool if we are
* sure that the STLport library is used as a shared one as it guaranties
* the unicity of the node allocator instance. Without that guaranty node
* allocator instances might exchange memory blocks making the implementation
* of a cleaning process much more complicated.
*/
# define _STLP_DO_CLEAN_NODE_ALLOC
#endif
/* When STLport is used without multi threaded safety we use the node allocator
* implementation with locks as locks becomes no-op. The lock free implementation
* always use system specific atomic operations which are slower than 'normal'
* ones.
*/
#if defined (_STLP_THREADS) && \
defined (_STLP_HAS_ATOMIC_FREELIST) && defined (_STLP_ATOMIC_ADD)
/*
* We have an implementation of the atomic freelist (_STLP_atomic_freelist)
* for this architecture and compiler. That means we can use the non-blocking
* implementation of the node-allocation engine.*/
# define _STLP_USE_LOCK_FREE_IMPLEMENTATION
#endif
#if !defined (_STLP_USE_LOCK_FREE_IMPLEMENTATION)
# if defined (_STLP_THREADS)
class _Node_Alloc_Lock {
static _STLP_STATIC_MUTEX& _S_Mutex() {
static _STLP_STATIC_MUTEX mutex _STLP_MUTEX_INITIALIZER;
return mutex;
}
public:
_Node_Alloc_Lock() {
# if defined (_STLP_SGI_THREADS)
if (__us_rsthread_malloc)
# endif
_S_Mutex()._M_acquire_lock();
}
~_Node_Alloc_Lock() {
# if defined (_STLP_SGI_THREADS)
if (__us_rsthread_malloc)
# endif
_S_Mutex()._M_release_lock();
}
};
# else
class _Node_Alloc_Lock {
public:
_Node_Alloc_Lock() { }
~_Node_Alloc_Lock() { }
};
# endif
struct _Node_alloc_obj {
_Node_alloc_obj * _M_next;
};
#endif
class __node_alloc_impl {
static inline size_t _STLP_CALL _S_round_up(size_t __bytes)
{ return (((__bytes) + (size_t)_ALIGN-1) & ~((size_t)_ALIGN - 1)); }
#if defined (_STLP_USE_LOCK_FREE_IMPLEMENTATION)
typedef _STLP_atomic_freelist::item _Obj;
typedef _STLP_atomic_freelist _Freelist;
typedef _STLP_atomic_freelist _ChunkList;
// Header of blocks of memory that have been allocated as part of
// a larger chunk but have not yet been chopped up into nodes.
struct _FreeBlockHeader : public _STLP_atomic_freelist::item {
char* _M_end; // pointer to end of free memory
};
#else
typedef _Node_alloc_obj _Obj;
typedef _Obj* _STLP_VOLATILE _Freelist;
typedef _Obj* _ChunkList;
#endif
private:
// Returns an object of size __n, and optionally adds to size __n free list.
static _Obj* _S_refill(size_t __n);
// Allocates a chunk for nobjs of size __p_size. nobjs may be reduced
// if it is inconvenient to allocate the requested number.
static char* _S_chunk_alloc(size_t __p_size, int& __nobjs);
// Chunk allocation state.
static _Freelist _S_free_list[_STLP_NFREELISTS];
// Amount of total allocated memory
#if defined (_STLP_USE_LOCK_FREE_IMPLEMENTATION)
static _STLP_VOLATILE __add_atomic_t _S_heap_size;
#else
static size_t _S_heap_size;
#endif
#if defined (_STLP_USE_LOCK_FREE_IMPLEMENTATION)
// List of blocks of free memory
static _STLP_atomic_freelist _S_free_mem_blocks;
#else
// Start of the current free memory buffer
static char* _S_start_free;
// End of the current free memory buffer
static char* _S_end_free;
#endif
#if defined (_STLP_DO_CLEAN_NODE_ALLOC)
public:
// Methods to report alloc/dealloc calls to the counter system.
# if defined (_STLP_USE_LOCK_FREE_IMPLEMENTATION)
typedef _STLP_VOLATILE __stl_atomic_t _AllocCounter;
# else
typedef __stl_atomic_t _AllocCounter;
# endif
static _AllocCounter& _STLP_CALL _S_alloc_counter();
static void _S_alloc_call();
static void _S_dealloc_call();
private:
// Free all the allocated chuncks of memory
static void _S_chunk_dealloc();
// Beginning of the linked list of allocated chunks of memory
static _ChunkList _S_chunks;
#endif /* _STLP_DO_CLEAN_NODE_ALLOC */
public:
/* __n must be > 0 */
static void* _M_allocate(size_t& __n);
/* __p may not be 0 */
static void _M_deallocate(void *__p, size_t __n);
};
#if !defined (_STLP_USE_LOCK_FREE_IMPLEMENTATION)
void* __node_alloc_impl::_M_allocate(size_t& __n) {
__n = _S_round_up(__n);
_Obj * _STLP_VOLATILE * __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n);
_Obj *__r;
// Acquire the lock here with a constructor call.
// This ensures that it is released in exit or during stack
// unwinding.
_Node_Alloc_Lock __lock_instance;
if ( (__r = *__my_free_list) != 0 ) {
*__my_free_list = __r->_M_next;
} else {
__r = _S_refill(__n);
}
# if defined (_STLP_DO_CLEAN_NODE_ALLOC)
_S_alloc_call();
# endif
// lock is released here
return __r;
}
void __node_alloc_impl::_M_deallocate(void *__p, size_t __n) {
_Obj * _STLP_VOLATILE * __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n);
_Obj * __pobj = __STATIC_CAST(_Obj*, __p);
// acquire lock
_Node_Alloc_Lock __lock_instance;
__pobj->_M_next = *__my_free_list;
*__my_free_list = __pobj;
# if defined (_STLP_DO_CLEAN_NODE_ALLOC)
_S_dealloc_call();
# endif
// lock is released here
}
# if defined (_STLP_DO_CLEAN_NODE_ALLOC)
# define _STLP_OFFSET sizeof(_Obj)
# else
# define _STLP_OFFSET 0
# endif
/* We allocate memory in large chunks in order to avoid fragmenting */
/* the malloc heap too much. */
/* We assume that size is properly aligned. */
/* We hold the allocation lock. */
char* __node_alloc_impl::_S_chunk_alloc(size_t _p_size, int& __nobjs) {
char* __result;
size_t __total_bytes = _p_size * __nobjs;
size_t __bytes_left = _S_end_free - _S_start_free;
if (__bytes_left > 0) {
if (__bytes_left >= __total_bytes) {
__result = _S_start_free;
_S_start_free += __total_bytes;
return __result;
}
if (__bytes_left >= _p_size) {
__nobjs = (int)(__bytes_left / _p_size);
__total_bytes = _p_size * __nobjs;
__result = _S_start_free;
_S_start_free += __total_bytes;
return __result;
}
// Try to make use of the left-over piece.
_Obj* _STLP_VOLATILE* __my_free_list = _S_free_list + _S_FREELIST_INDEX(__bytes_left);
__REINTERPRET_CAST(_Obj*, _S_start_free)->_M_next = *__my_free_list;
*__my_free_list = __REINTERPRET_CAST(_Obj*, _S_start_free);
_S_start_free = _S_end_free = 0;
}
size_t __bytes_to_get = 2 * __total_bytes + _S_round_up(_S_heap_size) + _STLP_OFFSET;
_STLP_TRY {
_S_start_free = __stlp_new_chunk(__bytes_to_get);
}
#if defined (_STLP_USE_EXCEPTIONS)
catch (const _STLP_STD::bad_alloc&) {
_Obj* _STLP_VOLATILE* __my_free_list;
_Obj* __p;
// Try to do with what we have. That can't hurt.
// We do not try smaller requests, since that tends
// to result in disaster on multi-process machines.
for (size_t __i = _p_size; __i <= (size_t)_MAX_BYTES; __i += (size_t)_ALIGN) {
__my_free_list = _S_free_list + _S_FREELIST_INDEX(__i);
__p = *__my_free_list;
if (0 != __p) {
*__my_free_list = __p -> _M_next;
_S_start_free = __REINTERPRET_CAST(char*, __p);
_S_end_free = _S_start_free + __i;
return _S_chunk_alloc(_p_size, __nobjs);
// Any leftover piece will eventually make it to the
// right free list.
}
}
__bytes_to_get = __total_bytes + _STLP_OFFSET;
_S_start_free = __stlp_new_chunk(__bytes_to_get);
}
#endif
_S_heap_size += __bytes_to_get >> 4;
# if defined (_STLP_DO_CLEAN_NODE_ALLOC)
__REINTERPRET_CAST(_Obj*, _S_start_free)->_M_next = _S_chunks;
_S_chunks = __REINTERPRET_CAST(_Obj*, _S_start_free);
# endif
_S_end_free = _S_start_free + __bytes_to_get;
_S_start_free += _STLP_OFFSET;
return _S_chunk_alloc(_p_size, __nobjs);
}
/* Returns an object of size __n, and optionally adds to size __n free list.*/
/* We assume that __n is properly aligned. */
/* We hold the allocation lock. */
_Node_alloc_obj* __node_alloc_impl::_S_refill(size_t __n) {
int __nobjs = 20;
char* __chunk = _S_chunk_alloc(__n, __nobjs);
if (1 == __nobjs) return __REINTERPRET_CAST(_Obj*, __chunk);
_Obj* _STLP_VOLATILE* __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n);
_Obj* __result;
_Obj* __current_obj;
_Obj* __next_obj;
/* Build free list in chunk */
__result = __REINTERPRET_CAST(_Obj*, __chunk);
*__my_free_list = __next_obj = __REINTERPRET_CAST(_Obj*, __chunk + __n);
for (--__nobjs; --__nobjs; ) {
__current_obj = __next_obj;
__next_obj = __REINTERPRET_CAST(_Obj*, __REINTERPRET_CAST(char*, __next_obj) + __n);
__current_obj->_M_next = __next_obj;
}
__next_obj->_M_next = 0;
return __result;
}
# if defined (_STLP_DO_CLEAN_NODE_ALLOC)
void __node_alloc_impl::_S_alloc_call()
{ ++_S_alloc_counter(); }
void __node_alloc_impl::_S_dealloc_call() {
__stl_atomic_t &counter = _S_alloc_counter();
if (--counter == 0)
{ _S_chunk_dealloc(); }
}
/* We deallocate all the memory chunks */
void __node_alloc_impl::_S_chunk_dealloc() {
_Obj *__pcur = _S_chunks, *__pnext;
while (__pcur != 0) {
__pnext = __pcur->_M_next;
__stlp_delete_chunck(__pcur);
__pcur = __pnext;
}
_S_chunks = 0;
_S_start_free = _S_end_free = 0;
_S_heap_size = 0;
memset(__REINTERPRET_CAST(char*, __CONST_CAST(_Obj**, &_S_free_list[0])), 0, _STLP_NFREELISTS * sizeof(_Obj*));
}
# endif
#else
void* __node_alloc_impl::_M_allocate(size_t& __n) {
__n = _S_round_up(__n);
_Obj* __r = _S_free_list[_S_FREELIST_INDEX(__n)].pop();
if (__r == 0)
{ __r = _S_refill(__n); }
# if defined (_STLP_DO_CLEAN_NODE_ALLOC)
_S_alloc_call();
# endif
return __r;
}
void __node_alloc_impl::_M_deallocate(void *__p, size_t __n) {
_S_free_list[_S_FREELIST_INDEX(__n)].push(__STATIC_CAST(_Obj*, __p));
# if defined (_STLP_DO_CLEAN_NODE_ALLOC)
_S_dealloc_call();
# endif
}
/* Returns an object of size __n, and optionally adds additional ones to */
/* freelist of objects of size __n. */
/* We assume that __n is properly aligned. */
__node_alloc_impl::_Obj* __node_alloc_impl::_S_refill(size_t __n) {
int __nobjs = 20;
char* __chunk = _S_chunk_alloc(__n, __nobjs);
if (__nobjs <= 1)
return __REINTERPRET_CAST(_Obj*, __chunk);
// Push all new nodes (minus first one) onto freelist
_Obj* __result = __REINTERPRET_CAST(_Obj*, __chunk);
_Obj* __cur_item = __result;
_Freelist* __my_freelist = _S_free_list + _S_FREELIST_INDEX(__n);
for (--__nobjs; __nobjs != 0; --__nobjs) {
__cur_item = __REINTERPRET_CAST(_Obj*, __REINTERPRET_CAST(char*, __cur_item) + __n);
__my_freelist->push(__cur_item);
}
return __result;
}
# if defined (_STLP_DO_CLEAN_NODE_ALLOC)
# define _STLP_OFFSET _ALIGN
# else
# define _STLP_OFFSET 0
# endif
/* We allocate memory in large chunks in order to avoid fragmenting */
/* the malloc heap too much. */
/* We assume that size is properly aligned. */
char* __node_alloc_impl::_S_chunk_alloc(size_t _p_size, int& __nobjs) {
# if defined (_STLP_DO_CLEAN_NODE_ALLOC)
//We are going to add a small memory block to keep all the allocated blocks
//address, we need to do so respecting the memory alignment. The following
//static assert checks that the reserved block is big enough to store a pointer.
_STLP_STATIC_ASSERT(sizeof(_Obj) <= _ALIGN)
# endif
char* __result = 0;
__add_atomic_t __total_bytes = __STATIC_CAST(__add_atomic_t, _p_size) * __nobjs;
_FreeBlockHeader* __block = __STATIC_CAST(_FreeBlockHeader*, _S_free_mem_blocks.pop());
if (__block != 0) {
// We checked a block out and can now mess with it with impugnity.
// We'll put the remainder back into the list if we're done with it below.
char* __buf_start = __REINTERPRET_CAST(char*, __block);
__add_atomic_t __bytes_left = __block->_M_end - __buf_start;
if ((__bytes_left < __total_bytes) && (__bytes_left >= __STATIC_CAST(__add_atomic_t, _p_size))) {
// There's enough left for at least one object, but not as much as we wanted
__result = __buf_start;
__nobjs = (int)(__bytes_left/_p_size);
__total_bytes = __STATIC_CAST(__add_atomic_t, _p_size) * __nobjs;
__bytes_left -= __total_bytes;
__buf_start += __total_bytes;
}
else if (__bytes_left >= __total_bytes) {
// The block has enough left to satisfy all that was asked for
__result = __buf_start;
__bytes_left -= __total_bytes;
__buf_start += __total_bytes;
}
if (__bytes_left != 0) {
// There is still some memory left over in block after we satisfied our request.
if ((__result != 0) && (__bytes_left >= (__add_atomic_t)sizeof(_FreeBlockHeader))) {
// We were able to allocate at least one object and there is still enough
// left to put remainder back into list.
_FreeBlockHeader* __newblock = __REINTERPRET_CAST(_FreeBlockHeader*, __buf_start);
__newblock->_M_end = __block->_M_end;
_S_free_mem_blocks.push(__newblock);
}
else {
// We were not able to allocate enough for at least one object.
// Shove into freelist of nearest (rounded-down!) size.
size_t __rounded_down = _S_round_up(__bytes_left + 1) - (size_t)_ALIGN;
if (__rounded_down > 0)
_S_free_list[_S_FREELIST_INDEX(__rounded_down)].push((_Obj*)__buf_start);
}
}
if (__result != 0)
return __result;
}
// We couldn't satisfy it from the list of free blocks, get new memory.
__add_atomic_t __bytes_to_get = 2 * __total_bytes +
__STATIC_CAST(__add_atomic_t,
_S_round_up(__STATIC_CAST(__uadd_atomic_t, _STLP_ATOMIC_ADD(&_S_heap_size, 0)))) +
_STLP_OFFSET;
_STLP_TRY {
__result = __stlp_new_chunk(__bytes_to_get);
}
#if defined (_STLP_USE_EXCEPTIONS)
catch (const bad_alloc&) {
// Allocation failed; try to canibalize from freelist of a larger object size.
for (size_t __i = _p_size; __i <= (size_t)_MAX_BYTES; __i += (size_t)_ALIGN) {
_Obj* __p = _S_free_list[_S_FREELIST_INDEX(__i)].pop();
if (0 != __p) {
if (__i < sizeof(_FreeBlockHeader)) {
// Not enough to put into list of free blocks, divvy it up here.
// Use as much as possible for this request and shove remainder into freelist.
__nobjs = (int)(__i/_p_size);
__total_bytes = __nobjs * __STATIC_CAST(__add_atomic_t, _p_size);
size_t __bytes_left = __i - __total_bytes;
size_t __rounded_down = _S_round_up(__bytes_left+1) - (size_t)_ALIGN;
if (__rounded_down > 0) {
_S_free_list[_S_FREELIST_INDEX(__rounded_down)].push(__REINTERPRET_CAST(_Obj*, __REINTERPRET_CAST(char*, __p) + __total_bytes));
}
return __REINTERPRET_CAST(char*, __p);
}
else {
// Add node to list of available blocks and recursively allocate from it.
_FreeBlockHeader* __newblock = (_FreeBlockHeader*)__p;
__newblock->_M_end = __REINTERPRET_CAST(char*, __p) + __i;
_S_free_mem_blocks.push(__newblock);
return _S_chunk_alloc(_p_size, __nobjs);
}
}
}
// We were not able to find something in a freelist, try to allocate a smaller amount.
__bytes_to_get = __total_bytes + _STLP_OFFSET;
__result = __stlp_new_chunk(__bytes_to_get);
// This should either throw an exception or remedy the situation.
// Thus we assume it succeeded.
}
#endif
// Alignment check
_STLP_VERBOSE_ASSERT(((__REINTERPRET_CAST(size_t, __result) & __STATIC_CAST(size_t, _ALIGN - 1)) == 0),
_StlMsg_DBA_DELETED_TWICE)
_STLP_ATOMIC_ADD(&_S_heap_size, __bytes_to_get >> 4);
# if defined (_STLP_DO_CLEAN_NODE_ALLOC)
// We have to track the allocated memory chunks for release on exit.
_S_chunks.push(__REINTERPRET_CAST(_Obj*, __result));
__result += _ALIGN;
__bytes_to_get -= _ALIGN;
# endif
if (__bytes_to_get > __total_bytes) {
// Push excess memory allocated in this chunk into list of free memory blocks
_FreeBlockHeader* __freeblock = __REINTERPRET_CAST(_FreeBlockHeader*, __result + __total_bytes);
__freeblock->_M_end = __result + __bytes_to_get;
_S_free_mem_blocks.push(__freeblock);
}
return __result;
}
# if defined (_STLP_DO_CLEAN_NODE_ALLOC)
void __node_alloc_impl::_S_alloc_call()
{ _STLP_ATOMIC_INCREMENT(&_S_alloc_counter()); }
void __node_alloc_impl::_S_dealloc_call() {
_STLP_VOLATILE __stl_atomic_t *pcounter = &_S_alloc_counter();
if (_STLP_ATOMIC_DECREMENT(pcounter) == 0)
_S_chunk_dealloc();
}
/* We deallocate all the memory chunks */
void __node_alloc_impl::_S_chunk_dealloc() {
// Note: The _Node_alloc_helper class ensures that this function
// will only be called when the (shared) library is unloaded or the
// process is shutdown. It's thus not possible that another thread
// is currently trying to allocate a node (we're not thread-safe here).
//
// Clear the free blocks and all freelistst. This makes sure that if
// for some reason more memory is allocated again during shutdown
// (it'd also be really nasty to leave references to deallocated memory).
_S_free_mem_blocks.clear();
_S_heap_size = 0;
for (size_t __i = 0; __i < _STLP_NFREELISTS; ++__i) {
_S_free_list[__i].clear();
}
// Detach list of chunks and free them all
_Obj* __chunk = _S_chunks.clear();
while (__chunk != 0) {
_Obj* __next = __chunk->_M_next;
__stlp_delete_chunck(__chunk);
__chunk = __next;
}
}
# endif
#endif
#if defined (_STLP_DO_CLEAN_NODE_ALLOC)
struct __node_alloc_cleaner {
~__node_alloc_cleaner()
{ __node_alloc_impl::_S_dealloc_call(); }
};
# if defined (_STLP_USE_LOCK_FREE_IMPLEMENTATION)
_STLP_VOLATILE __stl_atomic_t& _STLP_CALL
# else
__stl_atomic_t& _STLP_CALL
# endif
__node_alloc_impl::_S_alloc_counter() {
static _AllocCounter _S_counter = 1;
static __node_alloc_cleaner _S_node_alloc_cleaner;
return _S_counter;
}
#endif
#if !defined (_STLP_USE_LOCK_FREE_IMPLEMENTATION)
_Node_alloc_obj * _STLP_VOLATILE
__node_alloc_impl::_S_free_list[_STLP_NFREELISTS]
= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
// The 16 zeros are necessary to make version 4.1 of the SunPro
// compiler happy. Otherwise it appears to allocate too little
// space for the array.
#else
_STLP_atomic_freelist __node_alloc_impl::_S_free_list[_STLP_NFREELISTS];
_STLP_atomic_freelist __node_alloc_impl::_S_free_mem_blocks;
#endif
#if !defined (_STLP_USE_LOCK_FREE_IMPLEMENTATION)
char *__node_alloc_impl::_S_start_free = 0;
char *__node_alloc_impl::_S_end_free = 0;
#endif
#if defined (_STLP_USE_LOCK_FREE_IMPLEMENTATION)
_STLP_VOLATILE __add_atomic_t
#else
size_t
#endif
__node_alloc_impl::_S_heap_size = 0;
#if defined (_STLP_DO_CLEAN_NODE_ALLOC)
# if defined (_STLP_USE_LOCK_FREE_IMPLEMENTATION)
_STLP_atomic_freelist __node_alloc_impl::_S_chunks;
# else
_Node_alloc_obj* __node_alloc_impl::_S_chunks = 0;
# endif
#endif
void * _STLP_CALL __node_alloc::_M_allocate(size_t& __n)
{ return __node_alloc_impl::_M_allocate(__n); }
void _STLP_CALL __node_alloc::_M_deallocate(void *__p, size_t __n)
{ __node_alloc_impl::_M_deallocate(__p, __n); }
#if defined (_STLP_PTHREADS) && !defined (_STLP_NO_THREADS)
# define _STLP_DATA_ALIGNMENT 8
_STLP_MOVE_TO_PRIV_NAMESPACE
// *******************************************************
// __perthread_alloc implementation
union _Pthread_alloc_obj {
union _Pthread_alloc_obj * __free_list_link;
char __client_data[_STLP_DATA_ALIGNMENT]; /* The client sees this. */
};
// Pthread allocators don't appear to the client to have meaningful
// instances. We do in fact need to associate some state with each
// thread. That state is represented by _Pthread_alloc_per_thread_state.
struct _Pthread_alloc_per_thread_state {
typedef _Pthread_alloc_obj __obj;
enum { _S_NFREELISTS = _MAX_BYTES / _STLP_DATA_ALIGNMENT };
// Free list link for list of available per thread structures.
// When one of these becomes available for reuse due to thread
// termination, any objects in its free list remain associated
// with it. The whole structure may then be used by a newly
// created thread.
_Pthread_alloc_per_thread_state() : __next(0)
{ memset((void *)__CONST_CAST(_Pthread_alloc_obj**, __free_list), 0, (size_t)_S_NFREELISTS * sizeof(__obj *)); }
// Returns an object of size __n, and possibly adds to size n free list.
void *_M_refill(size_t __n);
_Pthread_alloc_obj* volatile __free_list[_S_NFREELISTS];
_Pthread_alloc_per_thread_state *__next;
// this data member is only to be used by per_thread_allocator, which returns memory to the originating thread.
_STLP_mutex _M_lock;
};
// Pthread-specific allocator.
class _Pthread_alloc_impl {
public: // but only for internal use:
typedef _Pthread_alloc_per_thread_state __state_type;
typedef char value_type;
// Allocates a chunk for nobjs of size size. nobjs may be reduced
// if it is inconvenient to allocate the requested number.
static char *_S_chunk_alloc(size_t __size, size_t &__nobjs, __state_type*);
enum {_S_ALIGN = _STLP_DATA_ALIGNMENT};
static size_t _S_round_up(size_t __bytes)
{ return (((__bytes) + (int)_S_ALIGN - 1) & ~((int)_S_ALIGN - 1)); }
static size_t _S_freelist_index(size_t __bytes)
{ return (((__bytes) + (int)_S_ALIGN - 1) / (int)_S_ALIGN - 1); }
private:
// Chunk allocation state. And other shared state.
// Protected by _S_chunk_allocator_lock.
static _STLP_STATIC_MUTEX _S_chunk_allocator_lock;
static char *_S_start_free;
static char *_S_end_free;
static size_t _S_heap_size;
static __state_type *_S_free_per_thread_states;
static pthread_key_t _S_key;
static bool _S_key_initialized;
// Pthread key under which per thread state is stored.
// Allocator instances that are currently unclaimed by any thread.
static void _S_destructor(void *instance);
// Function to be called on thread exit to reclaim per thread
// state.
static __state_type *_S_new_per_thread_state();
public:
// Return a recycled or new per thread state.
static __state_type *_S_get_per_thread_state();
private:
// ensure that the current thread has an associated
// per thread state.
class _M_lock;
friend class _M_lock;
class _M_lock {
public:
_M_lock () { _S_chunk_allocator_lock._M_acquire_lock(); }
~_M_lock () { _S_chunk_allocator_lock._M_release_lock(); }
};
public:
/* n must be > 0 */
static void * allocate(size_t& __n);
/* p may not be 0 */
static void deallocate(void *__p, size_t __n);
// boris : versions for per_thread_allocator
/* n must be > 0 */
static void * allocate(size_t& __n, __state_type* __a);
/* p may not be 0 */
static void deallocate(void *__p, size_t __n, __state_type* __a);
static void * reallocate(void *__p, size_t __old_sz, size_t& __new_sz);
};
/* Returns an object of size n, and optionally adds to size n free list.*/
/* We assume that n is properly aligned. */
/* We hold the allocation lock. */
void *_Pthread_alloc_per_thread_state::_M_refill(size_t __n) {
typedef _Pthread_alloc_obj __obj;
size_t __nobjs = 128;
char * __chunk = _Pthread_alloc_impl::_S_chunk_alloc(__n, __nobjs, this);
__obj * volatile * __my_free_list;
__obj * __result;
__obj * __current_obj, * __next_obj;
size_t __i;
if (1 == __nobjs) {
return __chunk;
}
__my_free_list = __free_list + _Pthread_alloc_impl::_S_freelist_index(__n);
/* Build free list in chunk */
__result = (__obj *)__chunk;
*__my_free_list = __next_obj = (__obj *)(__chunk + __n);
for (__i = 1; ; ++__i) {
__current_obj = __next_obj;
__next_obj = (__obj *)((char *)__next_obj + __n);
if (__nobjs - 1 == __i) {
__current_obj -> __free_list_link = 0;
break;
} else {
__current_obj -> __free_list_link = __next_obj;
}
}
return __result;
}
void _Pthread_alloc_impl::_S_destructor(void *__instance) {
_M_lock __lock_instance; // Need to acquire lock here.
_Pthread_alloc_per_thread_state* __s = (_Pthread_alloc_per_thread_state*)__instance;
__s -> __next = _S_free_per_thread_states;
_S_free_per_thread_states = __s;
}
_Pthread_alloc_per_thread_state* _Pthread_alloc_impl::_S_new_per_thread_state() {
/* lock already held here. */
if (0 != _S_free_per_thread_states) {
_Pthread_alloc_per_thread_state *__result = _S_free_per_thread_states;
_S_free_per_thread_states = _S_free_per_thread_states -> __next;
return __result;
}
else {
return new _Pthread_alloc_per_thread_state;
}
}
_Pthread_alloc_per_thread_state* _Pthread_alloc_impl::_S_get_per_thread_state() {
int __ret_code;
__state_type* __result;
if (_S_key_initialized && (__result = (__state_type*) pthread_getspecific(_S_key)))
return __result;
/*REFERENCED*/
_M_lock __lock_instance; // Need to acquire lock here.
if (!_S_key_initialized) {
if (pthread_key_create(&_S_key, _S_destructor)) {
_STLP_THROW_BAD_ALLOC; // failed
}
_S_key_initialized = true;
}
__result = _S_new_per_thread_state();
__ret_code = pthread_setspecific(_S_key, __result);
if (__ret_code) {
if (__ret_code == ENOMEM) {
_STLP_THROW_BAD_ALLOC;
} else {
// EINVAL
_STLP_ABORT();
}
}
return __result;
}
/* We allocate memory in large chunks in order to avoid fragmenting */
/* the malloc heap too much. */
/* We assume that size is properly aligned. */
char *_Pthread_alloc_impl::_S_chunk_alloc(size_t __p_size, size_t &__nobjs, _Pthread_alloc_per_thread_state *__a) {
typedef _Pthread_alloc_obj __obj;
{
char * __result;
size_t __total_bytes;
size_t __bytes_left;
/*REFERENCED*/
_M_lock __lock_instance; // Acquire lock for this routine
__total_bytes = __p_size * __nobjs;
__bytes_left = _S_end_free - _S_start_free;
if (__bytes_left >= __total_bytes) {
__result = _S_start_free;
_S_start_free += __total_bytes;
return __result;
} else if (__bytes_left >= __p_size) {
__nobjs = __bytes_left/__p_size;
__total_bytes = __p_size * __nobjs;
__result = _S_start_free;
_S_start_free += __total_bytes;
return __result;
} else {
size_t __bytes_to_get = 2 * __total_bytes + _S_round_up(_S_heap_size);
// Try to make use of the left-over piece.
if (__bytes_left > 0) {
__obj * volatile * __my_free_list = __a->__free_list + _S_freelist_index(__bytes_left);
((__obj *)_S_start_free) -> __free_list_link = *__my_free_list;
*__my_free_list = (__obj *)_S_start_free;
}
# ifdef _SGI_SOURCE
// Try to get memory that's aligned on something like a
// cache line boundary, so as to avoid parceling out
// parts of the same line to different threads and thus
// possibly different processors.
{
const int __cache_line_size = 128; // probable upper bound
__bytes_to_get &= ~(__cache_line_size-1);
_S_start_free = (char *)memalign(__cache_line_size, __bytes_to_get);
if (0 == _S_start_free) {
_S_start_free = (char *)__malloc_alloc::allocate(__bytes_to_get);
}
}
# else /* !SGI_SOURCE */
_S_start_free = (char *)__malloc_alloc::allocate(__bytes_to_get);
# endif
_S_heap_size += __bytes_to_get >> 4;
_S_end_free = _S_start_free + __bytes_to_get;
}
}
// lock is released here
return _S_chunk_alloc(__p_size, __nobjs, __a);
}
/* n must be > 0 */
void *_Pthread_alloc_impl::allocate(size_t& __n) {
typedef _Pthread_alloc_obj __obj;
__obj * volatile * __my_free_list;
__obj * __result;
__state_type* __a;
if (__n > _MAX_BYTES) {
return __malloc_alloc::allocate(__n);
}
__n = _S_round_up(__n);
__a = _S_get_per_thread_state();
__my_free_list = __a->__free_list + _S_freelist_index(__n);
__result = *__my_free_list;
if (__result == 0) {
void *__r = __a->_M_refill(__n);
return __r;
}
*__my_free_list = __result->__free_list_link;
return __result;
};
/* p may not be 0 */
void _Pthread_alloc_impl::deallocate(void *__p, size_t __n) {
typedef _Pthread_alloc_obj __obj;
__obj *__q = (__obj *)__p;
__obj * volatile * __my_free_list;
__state_type* __a;
if (__n > _MAX_BYTES) {
__malloc_alloc::deallocate(__p, __n);
return;
}
__a = _S_get_per_thread_state();
__my_free_list = __a->__free_list + _S_freelist_index(__n);
__q -> __free_list_link = *__my_free_list;
*__my_free_list = __q;
}
// boris : versions for per_thread_allocator
/* n must be > 0 */
void *_Pthread_alloc_impl::allocate(size_t& __n, __state_type* __a) {
typedef _Pthread_alloc_obj __obj;
__obj * volatile * __my_free_list;
__obj * __result;
if (__n > _MAX_BYTES) {
return __malloc_alloc::allocate(__n);
}
__n = _S_round_up(__n);
// boris : here, we have to lock per thread state, as we may be getting memory from
// different thread pool.
_STLP_auto_lock __lock(__a->_M_lock);
__my_free_list = __a->__free_list + _S_freelist_index(__n);
__result = *__my_free_list;
if (__result == 0) {
void *__r = __a->_M_refill(__n);
return __r;
}
*__my_free_list = __result->__free_list_link;
return __result;
};
/* p may not be 0 */
void _Pthread_alloc_impl::deallocate(void *__p, size_t __n, __state_type* __a) {
typedef _Pthread_alloc_obj __obj;
__obj *__q = (__obj *)__p;
__obj * volatile * __my_free_list;
if (__n > _MAX_BYTES) {
__malloc_alloc::deallocate(__p, __n);
return;
}
// boris : here, we have to lock per thread state, as we may be returning memory from
// different thread.
_STLP_auto_lock __lock(__a->_M_lock);
__my_free_list = __a->__free_list + _S_freelist_index(__n);
__q -> __free_list_link = *__my_free_list;
*__my_free_list = __q;
}
void *_Pthread_alloc_impl::reallocate(void *__p, size_t __old_sz, size_t& __new_sz) {
void * __result;
size_t __copy_sz;
if (__old_sz > _MAX_BYTES && __new_sz > _MAX_BYTES) {
return realloc(__p, __new_sz);
}
if (_S_round_up(__old_sz) == _S_round_up(__new_sz)) return __p;
__result = allocate(__new_sz);
__copy_sz = __new_sz > __old_sz? __old_sz : __new_sz;
memcpy(__result, __p, __copy_sz);
deallocate(__p, __old_sz);
return __result;
}
_Pthread_alloc_per_thread_state* _Pthread_alloc_impl::_S_free_per_thread_states = 0;
pthread_key_t _Pthread_alloc_impl::_S_key = 0;
_STLP_STATIC_MUTEX _Pthread_alloc_impl::_S_chunk_allocator_lock _STLP_MUTEX_INITIALIZER;
bool _Pthread_alloc_impl::_S_key_initialized = false;
char *_Pthread_alloc_impl::_S_start_free = 0;
char *_Pthread_alloc_impl::_S_end_free = 0;
size_t _Pthread_alloc_impl::_S_heap_size = 0;
void * _STLP_CALL _Pthread_alloc::allocate(size_t& __n)
{ return _Pthread_alloc_impl::allocate(__n); }
void _STLP_CALL _Pthread_alloc::deallocate(void *__p, size_t __n)
{ _Pthread_alloc_impl::deallocate(__p, __n); }
void * _STLP_CALL _Pthread_alloc::allocate(size_t& __n, __state_type* __a)
{ return _Pthread_alloc_impl::allocate(__n, __a); }
void _STLP_CALL _Pthread_alloc::deallocate(void *__p, size_t __n, __state_type* __a)
{ _Pthread_alloc_impl::deallocate(__p, __n, __a); }
void * _STLP_CALL _Pthread_alloc::reallocate(void *__p, size_t __old_sz, size_t& __new_sz)
{ return _Pthread_alloc_impl::reallocate(__p, __old_sz, __new_sz); }
_Pthread_alloc_per_thread_state* _STLP_CALL _Pthread_alloc::_S_get_per_thread_state()
{ return _Pthread_alloc_impl::_S_get_per_thread_state(); }
_STLP_MOVE_TO_STD_NAMESPACE
#endif
_STLP_END_NAMESPACE
#undef _S_FREELIST_INDEX
```
|
```c
/*your_sha256_hash---------
*
* split_shards.c
*
* This file contains functions to split a shard according to a given
* distribution column value.
*
*
*your_sha256_hash---------
*/
#include "postgres.h"
#include "c.h"
#include "fmgr.h"
#include "libpq-fe.h"
#include "catalog/pg_class.h"
#include "nodes/pg_list.h"
#include "storage/lock.h"
#include "utils/builtins.h"
#include "utils/elog.h"
#include "utils/errcodes.h"
#include "utils/lsyscache.h"
#include "utils/typcache.h"
#include "distributed/colocation_utils.h"
#include "distributed/coordinator_protocol.h"
#include "distributed/metadata_cache.h"
#include "distributed/metadata_sync.h"
#include "distributed/multi_join_order.h"
#include "distributed/multi_partitioning_utils.h"
#include "distributed/multi_router_planner.h"
#include "distributed/pg_dist_partition.h"
#include "distributed/pg_dist_shard.h"
#include "distributed/reference_table_utils.h"
#include "distributed/remote_commands.h"
#include "distributed/resource_lock.h"
#include "distributed/shard_split.h"
#include "distributed/utils/distribution_column_map.h"
#include "distributed/version_compat.h"
#include "distributed/worker_manager.h"
#include "distributed/worker_protocol.h"
#include "distributed/worker_transaction.h"
/* declarations for dynamic loading */
PG_FUNCTION_INFO_V1(isolate_tenant_to_new_shard);
PG_FUNCTION_INFO_V1(worker_hash);
/*
* isolate_tenant_to_new_shard isolates a tenant to its own shard by spliting
* the current matching shard.
*/
Datum
isolate_tenant_to_new_shard(PG_FUNCTION_ARGS)
{
CheckCitusVersion(ERROR);
EnsureCoordinator();
Oid relationId = PG_GETARG_OID(0);
Datum inputDatum = PG_GETARG_DATUM(1);
text *cascadeOptionText = PG_GETARG_TEXT_P(2);
Oid shardTransferModeOid = PG_GETARG_OID(3);
EnsureTableOwner(relationId);
CitusTableCacheEntry *cacheEntry = GetCitusTableCacheEntry(relationId);
char partitionMethod = cacheEntry->partitionMethod;
if (partitionMethod != DISTRIBUTE_BY_HASH)
{
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot isolate tenant because tenant isolation "
"is only support for hash distributed tables")));
}
List *colocatedTableList = ColocatedTableList(relationId);
int colocatedTableCount = list_length(colocatedTableList);
Oid inputDataType = get_fn_expr_argtype(fcinfo->flinfo, 1);
char *tenantIdString = DatumToString(inputDatum, inputDataType);
char *cascadeOptionString = text_to_cstring(cascadeOptionText);
if (pg_strncasecmp(cascadeOptionString, "CASCADE", NAMEDATALEN) != 0 &&
colocatedTableCount > 1)
{
char *relationName = get_rel_name(relationId);
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot isolate tenant because \"%s\" has colocated "
"tables", relationName),
errhint("Use CASCADE option to isolate tenants for the "
"colocated tables too. Example usage: "
"isolate_tenant_to_new_shard('%s', '%s', 'CASCADE')",
relationName, tenantIdString)));
}
EnsureReferenceTablesExistOnAllNodes();
Var *distributionColumn = DistPartitionKey(relationId);
/* earlier we checked that the table was hash partitioned, so there should be a distribution column */
Assert(distributionColumn != NULL);
Oid distributionColumnType = distributionColumn->vartype;
Datum tenantIdDatum = StringToDatum(tenantIdString, distributionColumnType);
ShardInterval *sourceShard = FindShardInterval(tenantIdDatum, cacheEntry);
if (sourceShard == NULL)
{
ereport(ERROR, (errmsg("tenant does not have a shard")));
}
int shardMinValue = DatumGetInt32(sourceShard->minValue);
int shardMaxValue = DatumGetInt32(sourceShard->maxValue);
if (shardMinValue == shardMaxValue)
{
char *tableName = get_rel_name(relationId);
ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
(errmsg("table %s has already been isolated for the given value",
quote_identifier(tableName)))));
}
List *sourcePlacementList = ActiveShardPlacementList(sourceShard->shardId);
if (list_length(sourcePlacementList) > 1)
{
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot isolate tenants when using shard replication")));
}
ShardPlacement *sourceShardPlacement = linitial(sourcePlacementList);
/* get hash function name */
FmgrInfo *hashFunction = cacheEntry->hashFunction;
/* get hashed value of the distribution value */
Datum hashedValueDatum = FunctionCall1Coll(hashFunction,
cacheEntry->partitionColumn->varcollid,
tenantIdDatum);
int hashedValue = DatumGetInt32(hashedValueDatum);
List *shardSplitPointsList = NIL;
/*
* If the hash value lies at one of the boundaries, we only have a single
* split point.
*/
if (hashedValue == shardMinValue)
{
shardSplitPointsList = list_make1_int(hashedValue);
}
else if (hashedValue == shardMaxValue)
{
shardSplitPointsList = list_make1_int(hashedValue - 1);
}
else
{
shardSplitPointsList = list_make2_int(hashedValue - 1, hashedValue);
}
/* we currently place the isolated hash value into the same node */
int sourceNodeId = sourceShardPlacement->nodeId;
List *nodeIdsForPlacementList = list_make2_int(sourceNodeId, sourceNodeId);
if (list_length(shardSplitPointsList) > 1)
{
nodeIdsForPlacementList = lappend_int(nodeIdsForPlacementList, sourceNodeId);
}
DistributionColumnMap *distributionColumnOverrides = NULL;
List *sourceColocatedShardIntervalList = NIL;
SplitMode splitMode = LookupSplitMode(shardTransferModeOid);
SplitShard(splitMode,
ISOLATE_TENANT_TO_NEW_SHARD,
sourceShard->shardId,
shardSplitPointsList,
nodeIdsForPlacementList,
distributionColumnOverrides,
sourceColocatedShardIntervalList,
INVALID_COLOCATION_ID);
cacheEntry = GetCitusTableCacheEntry(relationId);
ShardInterval *newShard = FindShardInterval(tenantIdDatum, cacheEntry);
PG_RETURN_INT64(newShard->shardId);
}
/*
* worker_hash returns the hashed value of the given value.
*/
Datum
worker_hash(PG_FUNCTION_ARGS)
{
CheckCitusVersion(ERROR);
Datum valueDatum = PG_GETARG_DATUM(0);
/* figure out hash function from the data type */
Oid valueDataType = get_fn_expr_argtype(fcinfo->flinfo, 0);
TypeCacheEntry *typeEntry = lookup_type_cache(valueDataType,
TYPECACHE_HASH_PROC_FINFO);
if (typeEntry->hash_proc_finfo.fn_oid == InvalidOid)
{
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot find a hash function for the input type"),
errhint("Cast input to a data type with a hash function.")));
}
FmgrInfo *hashFunction = palloc0(sizeof(FmgrInfo));
fmgr_info_copy(hashFunction, &(typeEntry->hash_proc_finfo), CurrentMemoryContext);
/* calculate hash value */
Datum hashedValueDatum =
FunctionCall1Coll(hashFunction, PG_GET_COLLATION(), valueDatum);
PG_RETURN_INT32(hashedValueDatum);
}
```
|
The Hindsville Limestone is a geologic formation in Oklahoma. It preserves fossils dating back to the Carboniferous period.
See also
List of fossiliferous stratigraphic units in Oklahoma
Paleontology in Oklahoma
References
Carboniferous geology of Oklahoma
Carboniferous southern paleotropical deposits
|
```html
<div class="row">
<div class="col-lg-6">
<nb-card>
<nb-card-header>Pie</nb-card-header>
<nb-card-body>
<ngx-d3-pie></ngx-d3-pie>
</nb-card-body>
</nb-card>
</div>
<div class="col-lg-6">
<nb-card>
<nb-card-header>Bar</nb-card-header>
<nb-card-body>
<ngx-d3-bar></ngx-d3-bar>
</nb-card-body>
</nb-card>
</div>
<div class="col-lg-6">
<nb-card>
<nb-card-header>Line</nb-card-header>
<nb-card-body>
<ngx-d3-line></ngx-d3-line>
</nb-card-body>
</nb-card>
</div>
<div class="col-lg-6">
<nb-card>
<nb-card-header>Advanced Pie</nb-card-header>
<nb-card-body>
<ngx-d3-advanced-pie></ngx-d3-advanced-pie>
</nb-card-body>
</nb-card>
</div>
<div class="col-lg-6">
<nb-card>
<nb-card-header>Area Chart</nb-card-header>
<nb-card-body>
<ngx-d3-area-stack></ngx-d3-area-stack>
</nb-card-body>
</nb-card>
</div>
</div>
```
|
```c
/***************************************************************************
* *
* ########### ########### ########## ########## *
* ############ ############ ############ ############ *
* ## ## ## ## ## ## ## *
* ## ## ## ## ## ## ## *
* ########### #### ###### ## ## ## ## ###### *
* ########### #### # ## ## ## ## # # *
* ## ## ###### ## ## ## ## # # *
* ## ## # ## ## ## ## # # *
* ############ ##### ###### ## ## ## ##### ###### *
* ########### ########### ## ## ## ########## *
* *
* S E C U R E M O B I L E N E T W O R K I N G *
* *
* This file is part of NexMon. *
* *
* *
* NexMon is free software: you can redistribute it and/or modify *
* (at your option) any later version. *
* *
* NexMon is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* *
* along with NexMon. If not, see <path_to_url *
* *
**************************************************************************/
#pragma NEXMON targetregion "patch"
#include <firmware_version.h>
#include <patcher.h>
#include <capabilities.h> // capabilities included in a nexmon patch
int capabilities = 0;
// Hook the call to wlc_ucode_write in wlc_ucode_download
__attribute__((at(WLC_UCODE_WRITE_BL_HOOK_ADDR, "", CHIP_VER_BCM43439a0, FW_VER_7_95_49_2271bb6)))
BLPatch(wlc_ucode_write_compressed, wlc_ucode_write_compressed);
__attribute__((at(HNDRTE_RECLAIM_0_END_PTR, "", CHIP_VER_BCM43439a0, FW_VER_7_95_49_2271bb6)))
GenericPatch4(hndrte_reclaim_0_end, PATCHSTART);
extern unsigned char templateram_bin[];
// Moving template ram to another place in the ucode region
__attribute__((at(TEMPLATERAMSTART_PTR, "", CHIP_VER_BCM43439a0, FW_VER_7_95_49_2271bb6)))
GenericPatch4(templateram_bin, templateram_bin);
```
|
```objective-c
/**
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.
*/
#ifndef ION_BASE_STRINGUTILS_H_
#define ION_BASE_STRINGUTILS_H_
// This file contains generic utility functions that operate on strings.
#include <istream> // NOLINT
#include <string>
#include <vector>
#include "base/integral_types.h"
#include "ion/base/stlalloc/allocvector.h"
namespace ion {
namespace base {
// Returns an escaped version of the passed string. For example:
// EscapeString("\aBell\bNew "Line\n") returns "\\aBell\\bNew \"Line\\n";
ION_API std::string EscapeString(const std::string& str);
// Returns a string with all newlines replaced by "\\n".
ION_API std::string EscapeNewlines(const std::string& str);
// Returns a mime base-64 encoded version of the passed string.
// Output is padded with ='s (see path_to_url
ION_API std::string MimeBase64EncodeString(const std::string& str);
// Splits a string into a vector of substrings, given a set of delimiter
// characters (expressed as a string). Empty strings are skipped, as are
// consecutive delimiters.
//
// For example: SplitString(" Hello\t there \t \n", " \t\n");
// will return a vector containing two strings, "Hello" and "there".
ION_API std::vector<std::string> SplitString(
const std::string& str, const std::string& delimiters);
// A version of SplitString taking an Ion Allocator.
ION_API AllocVector<std::string> SplitString(
const std::string& str, const std::string& delimiters,
const AllocatorPtr& alloc);
// Splits a string into a vector of substrings, given a set of delimiter
// characters (expressed as a string). Empty strings are skipped, but
// consecutive delimiters are not.
//
// For example: SplitStringWithoutSkipping("Hello\n\nthere\n", "\n");
// will return a vector containing three strings, "Hello", "", and "there".
ION_API std::vector<std::string> SplitStringWithoutSkipping(
const std::string& str, const std::string& delimiters);
// Returns a quoted and escaped version of the passed string. For example:
// QuoteString("Hello") returns "\"Hello\"".
inline std::string QuoteString(const std::string& val) {
std::ostringstream out;
out << '"' << EscapeString(val) << '"';
return out.str();
}
// Returns whether target begins with start.
inline bool StartsWith(const std::string& target, const std::string& start) {
return start.length() && start.compare(target.substr(0, start.size())) == 0;
}
// Returns whether target ends with end.
inline bool EndsWith(const std::string& target, const std::string& end) {
return end.length() && end.length() <= target.length() &&
target.compare(target.length() - end.length(), end.length(), end) == 0;
}
// Joins the strings in the passed vector together with the passed glue. The
// glue may be empty, in which case the strings are simply concatenated. If
// strings contains no strings then an empty string is returned.
inline std::string JoinStrings(const std::vector<std::string>& strings,
const std::string& glue) {
std::string joined;
if (const size_t count = strings.size()) {
joined = strings[0];
for (size_t i = 1; i < count; ++i)
joined += glue + strings[i];
}
return joined;
}
// Removes prefix from the beginning of target if target starts with it. Returns
// whether prefix was removed.
inline bool RemovePrefix(const std::string& prefix, std::string* target) {
if (StartsWith(*target, prefix)) {
*target = target->substr(prefix.length(),
target->length() - prefix.length());
return true;
}
return false;
}
// Removes suffix from the end of target if target ends with it. Returns whether
// suffix was removed.
inline bool RemoveSuffix(const std::string& suffix, std::string* target) {
if (EndsWith(*target, suffix)) {
*target = target->substr(0, target->length() - suffix.length());
return true;
}
return false;
}
// Returns a string with all instances of from replaced with to.
inline std::string ReplaceString(const std::string& search,
const std::string& from,
const std::string& to) {
if (search.empty() || from.empty())
return search;
std::string replaced = search;
const size_t to_size = to.size();
for (size_t start_pos = replaced.find(from); start_pos != std::string::npos;
start_pos = replaced.find(from, start_pos + to_size))
replaced.replace(start_pos, from.length(), to);
return replaced;
}
// Removes any whitespace characters at the beginning of the string.
inline std::string TrimStartWhitespace(const std::string& target) {
const size_t pos = target.find_first_not_of(" \f\n\r\t\v");
std::string trimmed;
if (pos != std::string::npos)
trimmed = target.substr(pos, std::string::npos);
return trimmed;
}
// Removes any whitespace characters at the end of the string.
inline std::string TrimEndWhitespace(const std::string& target) {
const size_t pos = target.find_last_not_of(" \f\n\r\t\v");
std::string trimmed;
if (pos != std::string::npos)
trimmed = target.substr(0, pos + 1U);
return trimmed;
}
// Removes any whitespace characters at the beginning and end of the string.
inline std::string TrimStartAndEndWhitespace(const std::string& target) {
return TrimEndWhitespace(TrimStartWhitespace(target));
}
// Returns a decoded version of a URL-encoded string.
ION_API std::string UrlDecodeString(const std::string& str);
// Returns a URL-encoded version of a string.
ION_API std::string UrlEncodeString(const std::string& str);
// This function can be useful for comparing multi-line strings in tests. If
// the two multi-line strings are equal, it just returns true. Otherwise, it
// splits the strings by newlines and determines the first line that
// differs. It sets first_different_index to the index (starting a 0) of that
// line, sets line0 and line1 to the contents of those lines in the two
// strings, sets context0 and context1 to be the lines near where the difference
// was found, and returns false. Any of the out-parameters may be NULL.
ION_API bool AreMultiLineStringsEqual(
const std::string& s0, const std::string& s1,
size_t* first_different_index, std::string* line0, std::string* line1,
std::string* context0, std::string* context1);
// Case-insensitive comparison of str1 and str2.
ION_API int CompareCaseInsensitive(const std::string& str1,
const std::string& str2);
// Returns whether target begins with start (case-insensitive).
ION_API bool StartsWithCaseInsensitive(const std::string& target,
const std::string& start);
// Returns whether target ends with end (case-insensitive).
ION_API bool EndsWithCaseInsensitive(const std::string& target,
const std::string& end);
// Case-insensitive version of std::string find.
ION_API int FindCaseInsensitive(const std::string& target,
const std::string& substr);
// Decodes a Base64 encoded string. Follows the RFC 4648 standard,
// accepting either base64 or base64url encoding:
// * base64: 62 is '+', 63 is '/', and = is for padding.
// * base64url: 62 is '-', 63 is '_', and no padding is used.
//
// In this implementation, base64 is transformed to base64url before
// decoding the string.
//
// A zero-length array is returned if the decode fails.
ION_API std::string WebSafeBase64Decode(const std::string& str);
// Encodes a byte array using RFC 4648 base64url ('-' and '_' for 62
// and 63, respectively, and no padding). The returned string will be
// safe for use in URLs.
ION_API std::string WebSafeBase64Encode(const std::string& input);
// Reads a single character from the stream and returns the stream. If the read
// character does not match the expected char, then this ungets the character
// and sets the stream's failure bit. This function can be used in various ways,
// such as in a boolean test (istream automatically casts to bool), or inline
// with the >> operator.
template <char expected>
inline std::istream& GetExpectedChar(std::istream& in) { // NOLINT
char c = expected + 1;
if (in >> c && c != expected) {
// Restore the stream.
in.unget();
in.setstate(std::ios_base::failbit);
}
return in;
}
// Attempts to read a string from the stream and returns the stream. If the
// stream does not start with the expected string, then this ungets the read
// portion of the string and sets the stream's failure bit.
inline std::istream& GetExpectedString(std::istream& in, // NOLINT
const std::string& expected) {
if (!in.fail()) {
const size_t length = expected.length();
for (size_t i = 0; i < length; ++i) {
char c;
in >> c;
if (!in.good() || c != expected[i]) {
// Restore the stream.
for (size_t j = 0; j <= i; ++j)
in.unget();
in.setstate(std::ios_base::failbit);
break;
}
}
}
return in;
}
// Extracts and returns an integral value from str. If str does not start with
// an integer then returns 0.
ION_API int32 StringToInt32(const std::string& str);
} // namespace base
} // namespace ion
#endif // ION_BASE_STRINGUTILS_H_
```
|
```c++
/*
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkCanvas.h"
#include "SkEdgeClipper.h"
#include "SkLineClipper.h"
#include "SkPath.h"
#include "Test.h"
static void test_hairclipping(skiatest::Reporter* reporter) {
SkBitmap bm;
bm.allocN32Pixels(4, 4);
bm.eraseColor(SK_ColorWHITE);
SkPaint paint;
paint.setAntiAlias(true);
SkCanvas canvas(bm);
canvas.clipRect(SkRect::MakeWH(SkIntToScalar(4), SkIntToScalar(2)));
canvas.drawLine(1.5f, 1.5f,
3.5f, 3.5f, paint);
/**
* We had a bug where we misinterpreted the bottom of the clip, and
* would draw another pixel (to the right in this case) on the same
* last scanline. i.e. we would draw to [2,1], even though this hairline
* should just draw to [1,1], [2,2], [3,3] modulo the clip.
*
* The result of this entire draw should be that we only draw to [1,1]
*
* Fixed in rev. 3366
*/
for (int y = 0; y < 4; ++y) {
for (int x = 0; x < 4; ++x) {
bool nonWhite = (1 == y) && (1 == x);
SkPMColor c = *bm.getAddr32(x, y);
if (nonWhite) {
REPORTER_ASSERT(reporter, 0xFFFFFFFF != c);
} else {
REPORTER_ASSERT(reporter, 0xFFFFFFFF == c);
}
}
}
}
static void test_edgeclipper() {
SkEdgeClipper clipper(false);
const SkPoint pts[] = {
{ 3.0995476e+010f, 42.929779f },
{ -3.0995163e+010f, 51.050385f },
{ -3.0995157e+010f, 51.050392f },
{ -3.0995134e+010f, 51.050400f },
};
const SkRect clip = { 0, 0, SkIntToScalar(300), SkIntToScalar(200) };
// this should not assert, even though our choppers do a poor numerical
// job when computing their t values.
// path_to_url
clipper.clipCubic(pts, clip);
}
static void test_intersectline(skiatest::Reporter* reporter) {
static const SkScalar L = 0;
static const SkScalar T = 0;
static const SkScalar R = SkIntToScalar(100);
static const SkScalar B = SkIntToScalar(100);
static const SkScalar CX = SkScalarHalf(L + R);
static const SkScalar CY = SkScalarHalf(T + B);
static const SkRect gR = { L, T, R, B };
size_t i;
SkPoint dst[2];
static const SkPoint gEmpty[] = {
// sides
{ L, CY }, { L - 10, CY },
{ R, CY }, { R + 10, CY },
{ CX, T }, { CX, T - 10 },
{ CX, B }, { CX, B + 10 },
// corners
{ L, T }, { L - 10, T - 10 },
{ L, B }, { L - 10, B + 10 },
{ R, T }, { R + 10, T - 10 },
{ R, B }, { R + 10, B + 10 },
};
for (i = 0; i < SK_ARRAY_COUNT(gEmpty); i += 2) {
bool valid = SkLineClipper::IntersectLine(&gEmpty[i], gR, dst);
if (valid) {
SkDebugf("----- [%d] %g %g -> %g %g\n", i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
}
REPORTER_ASSERT(reporter, !valid);
}
static const SkPoint gFull[] = {
// diagonals, chords
{ L, T }, { R, B },
{ L, B }, { R, T },
{ CX, T }, { CX, B },
{ L, CY }, { R, CY },
{ CX, T }, { R, CY },
{ CX, T }, { L, CY },
{ L, CY }, { CX, B },
{ R, CY }, { CX, B },
// edges
{ L, T }, { L, B },
{ R, T }, { R, B },
{ L, T }, { R, T },
{ L, B }, { R, B },
};
for (i = 0; i < SK_ARRAY_COUNT(gFull); i += 2) {
bool valid = SkLineClipper::IntersectLine(&gFull[i], gR, dst);
if (!valid || memcmp(&gFull[i], dst, sizeof(dst))) {
SkDebugf("++++ [%d] %g %g -> %g %g\n", i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
}
REPORTER_ASSERT(reporter, valid && !memcmp(&gFull[i], dst, sizeof(dst)));
}
static const SkPoint gPartial[] = {
{ L - 10, CY }, { CX, CY }, { L, CY }, { CX, CY },
{ CX, T - 10 }, { CX, CY }, { CX, T }, { CX, CY },
{ R + 10, CY }, { CX, CY }, { R, CY }, { CX, CY },
{ CX, B + 10 }, { CX, CY }, { CX, B }, { CX, CY },
// extended edges
{ L, T - 10 }, { L, B + 10 }, { L, T }, { L, B },
{ R, T - 10 }, { R, B + 10 }, { R, T }, { R, B },
{ L - 10, T }, { R + 10, T }, { L, T }, { R, T },
{ L - 10, B }, { R + 10, B }, { L, B }, { R, B },
};
for (i = 0; i < SK_ARRAY_COUNT(gPartial); i += 4) {
bool valid = SkLineClipper::IntersectLine(&gPartial[i], gR, dst);
if (!valid || memcmp(&gPartial[i+2], dst, sizeof(dst))) {
SkDebugf("++++ [%d] %g %g -> %g %g\n", i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
}
REPORTER_ASSERT(reporter, valid &&
!memcmp(&gPartial[i+2], dst, sizeof(dst)));
}
}
DEF_TEST(Clipper, reporter) {
test_intersectline(reporter);
test_edgeclipper();
test_hairclipping(reporter);
}
```
|
```go
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
// +build !gccgo
package unix
import "syscall"
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
```
|
```c++
#include "iconfetcher.h"
#include "shared/util.h"
#include "thread_utils.h"
void IconFetcher::Waiter::wait()
{
std::unique_lock lock(m_wakeUpMutex);
m_wakeUp.wait(lock, [&] {
return m_queueAvailable;
});
m_queueAvailable = false;
}
void IconFetcher::Waiter::wakeUp()
{
{
std::scoped_lock lock(m_wakeUpMutex);
m_queueAvailable = true;
}
m_wakeUp.notify_one();
}
IconFetcher::IconFetcher() : m_iconSize(GetSystemMetrics(SM_CXSMICON)), m_stop(false)
{
m_quickCache.file = getPixmapIcon(QFileIconProvider::File);
m_quickCache.directory = getPixmapIcon(QFileIconProvider::Folder);
m_thread = MOShared::startSafeThread([&] {
threadFun();
});
}
IconFetcher::~IconFetcher()
{
stop();
m_thread.join();
}
void IconFetcher::stop()
{
m_stop = true;
m_waiter.wakeUp();
}
QVariant IconFetcher::icon(const QString& path) const
{
if (hasOwnIcon(path)) {
return fileIcon(path);
} else {
const auto dot = path.lastIndexOf(".");
if (dot == -1) {
// no extension
return m_quickCache.file;
}
return extensionIcon(QStringView{path}.mid(dot));
}
}
QPixmap IconFetcher::genericFileIcon() const
{
return m_quickCache.file;
}
QPixmap IconFetcher::genericDirectoryIcon() const
{
return m_quickCache.directory;
}
bool IconFetcher::hasOwnIcon(const QString& path) const
{
static const QString exe = ".exe";
static const QString lnk = ".lnk";
static const QString ico = ".ico";
return path.endsWith(exe, Qt::CaseInsensitive) ||
path.endsWith(lnk, Qt::CaseInsensitive) ||
path.endsWith(ico, Qt::CaseInsensitive);
}
void IconFetcher::threadFun()
{
MOShared::SetThisThreadName("IconFetcher");
while (!m_stop) {
m_waiter.wait();
if (m_stop) {
break;
}
checkCache(m_extensionCache);
checkCache(m_fileCache);
}
}
void IconFetcher::checkCache(Cache& cache)
{
std::set<QString> queue;
{
std::scoped_lock lock(cache.queueMutex);
queue = std::move(cache.queue);
cache.queue.clear();
}
if (queue.empty()) {
return;
}
std::map<QString, QPixmap> map;
for (auto&& ext : queue) {
map.emplace(std::move(ext), getPixmapIcon(QFileInfo(ext)));
}
{
std::scoped_lock lock(cache.mapMutex);
for (auto&& p : map) {
cache.map.insert(std::move(p));
}
}
}
void IconFetcher::queue(Cache& cache, QString path) const
{
{
std::scoped_lock lock(cache.queueMutex);
cache.queue.insert(std::move(path));
}
m_waiter.wakeUp();
}
QVariant IconFetcher::fileIcon(const QString& path) const
{
{
std::scoped_lock lock(m_fileCache.mapMutex);
auto itor = m_fileCache.map.find(path);
if (itor != m_fileCache.map.end()) {
return itor->second;
}
}
queue(m_fileCache, path);
return {};
}
QVariant IconFetcher::extensionIcon(const QStringView& ext) const
{
{
std::scoped_lock lock(m_extensionCache.mapMutex);
auto itor = m_extensionCache.map.find(ext);
if (itor != m_extensionCache.map.end()) {
return itor->second;
}
}
queue(m_extensionCache, ext.toString());
return {};
}
```
|
```go
/*
path_to_url
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package mockimage
import (
"net/http/httptest"
"sync"
"github.com/gophercloud/gophercloud/openstack/imageservice/v2/images"
"k8s.io/kops/cloudmock/openstack"
)
// MockClient represents a mocked networks (nebula) client
type MockClient struct {
openstack.MockOpenstackServer
mutex sync.Mutex
images map[string]images.Image
}
// CreateClient will create a new mock networking client
func CreateClient() *MockClient {
m := &MockClient{}
m.SetupMux()
m.Reset()
m.mockImages()
m.Server = httptest.NewServer(m.Mux)
return m
}
// Reset will empty the state of the mock data
func (m *MockClient) Reset() {
m.images = make(map[string]images.Image)
}
// All returns a map of all resource IDs to their resources
func (m *MockClient) All() map[string]interface{} {
all := make(map[string]interface{})
for id, i := range m.images {
all[id] = i
}
return all
}
```
|
The Americus movement was a civil rights protest that began in Americus (located in Sumter County), Georgia, United States, in 1963 and lasted until 1965. It was organized by the Student Nonviolent Coordinating Committee along with the NAACP. Its main goals were voter registration and a citizenship education plan.
First protests
The first march began in 1963, in an effort to desegregate the Martin Theater. Less than a dozen activists participated in the first march. Soon, some 250 people were involved. Law enforcement, led by police chief Ross Chambliss, and County Sheriff Fred Chappell began arresting many. Martin Luther King Jr. once called Chappell "the meanest man in the world."
Leesburg Stockade
In July 1963, another march was held, in which a group of young women joined the line to attempt to purchase tickets at the movie theater, and were arrested for doing so. After being held briefly in Dawson, Georgia, the protesters were moved to the Leesburg Stockade Public Works Building in Leesburg, where they were held for 45 days in poor conditions. Estimates of the number of young women who were held there range from 15 to about 30
or as many as 33. Some of the prisoners were as young as 12.
Conditions in the stockade were poor: the prisoners had only concrete floors to sleep on, water only in drips from a shower, a single non-functional toilet, and poor food. The prison authorities did not inform the parents of the prisoners of their arrest or location, and they only found out through the help of a janitor.
The young women were threatened with murder, and at one point a rattlesnake was thrown into their cell.
After the SNCC and Senator Harrison A. Williams used a set of photos by Danny Lyon to publicize the situation, the young women were released. They did not face any criminal charges, but were nevertheless charged a fee for their use of the facilities. They later became known as the "Stolen Girls".
Two of the Leesburg Stockade women, Carol Barner Seay and Sandra Russel Mansfield, were added to the Hall of Fame of the National Voting Rights Museum in 2007. The National Museum of African American History and Culture of the Smithsonian Institution publicized the story of the stolen girls in 2016, and they were recognized by a resolution of the Georgia state legislature.
Girls of the stockade
Carol Barner Seay
Lorena Barnum
Gloria Breedlove
Pearl Brown
Bobbie Jean Butts
Agnes Carter
Pattie Jean Colier
Mattie Crittenden
Barbara Jean Daniels
Gloria Dean
Carolyn Deloatch
Diane Dorsey
Juanita Freeman
Robertiena Freeman
Henrietta Fuller
Shirley Ann Green
Verna Hollis
Evette Hose
Mary Frances Jackson
Vyrtis Jackson
Dorothy Jones
Emma Jean Jones
Melinda Jones-Williams
Emmarene Kaigler
Barbara Ann Peterson
Annie Lue Ragans
Judith Reid
Laura Ruff
Sandra Russell
Willie Mae Smith
Eliza Thomas
Billie Jo Thornton
Lulu M. Westbrook
Ozeliar Whitehead
Carrie Mae Williams
Results
The Americus movement resulted in a higher level of political participation by African Americans in Sumter County and the desegregation of many public places. It also contributed to the passing of the Voting Rights Act of 1965.
In 2007 veterans of the movement returned to Americus as part of a newly established organization, the Americus–Sumter County Movement Remembered, which is dedicated to commemorating and preserving the history and legacy of the Americus movement.
In popular culture
Episode 6 of the 15th season of Mysteries at the Museum covered the Leesburg Stockade.
References
Further reading
External links
- Author Jim Auchmutey discusses his book, The Class of '65: A Student, a Divided Town, and the Long Road to Forgiveness.
Civil rights protests in the United States
|
```xml
import { IUser, IUserDetails } from "../types";
import { Avatars } from "../knowledgeBase/components/styles";
import Icon from "./Icon";
import React from "react";
import dayjs from "dayjs";
import { readFile } from "./utils";
type Props = {
user: IUser;
date: Date;
viewCount: number;
};
export default function Avatar({ user = {} as IUser, date, viewCount }: Props) {
if (!user || !user.details) {
return null;
}
const { details = {} as IUserDetails } = user;
const { fullName, avatar } = details;
return (
<Avatars>
<img
className="round-img"
alt={fullName}
src={avatar ? readFile(avatar) : "/static/avatar-colored.svg"}
/>
<div className="detail avatar-info d-flex flex-wrap">
<div>
Written by
<span>{fullName}</span>
</div>
<div>
Modified at
<span>{dayjs(date).format("MMM D YYYY")}</span>
</div>
<div className="d-flex align-items-center">
<Icon icon="eye" size={14} />
<span>{viewCount}</span>
</div>
</div>
</Avatars>
);
}
```
|
Sesham is a 2002 Indian Malayalam-language drama film written and directed by T. K. Rajeev Kumar, starring Jayaram, Geethu Mohandas, Biju Menon and P. Balachandran. The film zooms into a lunatic asylum and probes the tenuous realms that separate the sane from the insane. Jayaram's portrayal of the character Lonappan is regarded as the best in his career.
The film received critical acclaim, it won four Kerala State Film Awards, including Best Film, Best Story, Best Editor, and Best Sound Recordist.
Plot
Lonappan, the protagonist, is a complacent inmate of a lunatic asylum, whose life becomes the subject of the graduation film of a movie-school student. As the social activist in her dominates the film-maker, she, with the help of her sub-collector fiancé, gets Lonappan released from the asylum and tries to find him a normal life. The story takes a serious turn as Lonappan becomes an integral part of Meera's life and she finds whole things upside down because of his presence at home. She gives him a job in a school. But Lonappan turns out to be a misfit in society. In the meantime, Lonappan gets closer to a child in the school. But he finally decides to go back to the mental asylum and live the rest of life with the inmates. He discards all the facilities offered by Meera. The film ends when her movie titled Timepiece bags award for the best film at the Cannes Film Festival.
Cast
Jayaram as Lonappan
Geethu Mohandas as Meera
Biju Menon
P. Balachandran
Mithun Ramesh as Nithin
P. Sreekumar
Awards
Kerala State Film Awards
Best Film – Latha Kurien Rajeev, K. Madhavan, T. K. Rajeev Kumar
Best Story - T. K. Rajeev Kumar
Best Editor – A. Sreekar Prasad
Best Sound Recordist – Simon Selvaraj
References
External links
Film Review at The Hindu
2000s Malayalam-language films
Films scored by Sharreth
2002 drama films
2002 films
Films about mental health
Indian drama films
Films directed by T. K. Rajeev Kumar
|
Tanzplagen was a rock band formed in Athens, Georgia, in 1980 by Michael Stipe (vocals farfisa organ), David Pierce (drums), Neil McArthur (Bass) and William Lee Self (Guitar).
History
The band's name (meaning "dancing manias" in German) came about by randomly pointing to words in a German dictionary, the same technique Stipe had employed to find the R.E.M. moniker (except with an English dictionary). The band toured the U.S. southeast and recorded a single for David Healy's Dasht Hopes label. In his book "It crawled from the South", Marcus Grey writes: "Determined to pursue his art-noise interests parallel to his more conventional activities with R.E.M., Michael hooked up with William Lee Self, Neil McArthur and David Pierce in Tanzplagen. The connection was strengthened when Oh-OK Lynda Stipe and Linda Hopper contributed backing vocals at a 40 Watt Club appearance that was taped to provide a rough-and ready three track demo. It includes the Self compositions 'Living By the Neck' and 'Peter Pan', and the Stipe-Self song 'meeting'. In addition to further occasional appearances in town and one short local tour Tanzplagen even got as far as recording tracks for a single, intended for release on David Healys ill-fated Dasht Hopes label. The studio chosen was Bombay in Smyrna where back in February R.E.M. had made its first recordings. Neil McArthur had left by the time of the session, and so William Lee Self, the groups real leader, doubled on bass while Lynda Stipe supplied vocals. However it is Michaels contribution to the two songs recorded ('meeting' and Self's 'treason') that Producer Joe Perry remembers: 'Micheal would sing and bang on a Farfisa organ creating a large explosion. It was a different time. Experimental stuff'". Soon later, R.E.M. were signed to IRS and released the Chronic Town EP (which had been recorded for Healy's label's debut release), but the Tanzplagen single went unreleased until 1991 when Strangeways Records brought it out as their inaugural release. The CD includes a duet with Stipe and his sister Lynda and some improvised live recordings that include Linda Hopper, her bandmate at the time in the band Oh-OK. Self describes the contents of "The Lost Single and Live at the 40 Watt club, Athens Georgia 1981": "thus I wrote the song 'Living By The Neck' but had no title for it, Stipe came up with the title only meaning 'living by the guitar neck'. We also intentionally booked all our in town shows on full moon nights - this truly made a drastic but wonderful difference in the atmosphere and audiences behaviour." Tanzplagen dissolved in late 1982 when Self relocated to Germany. David Pierce went on to form Buzz Of Delight with Mathew Sweet. Neil McArthur continued his studies at the University of Georgia.
In May 2013, the German label Space Bee Records released a digital version of the "Dasht Hopes Single" along with live recordings from a 40 Watt Club appearance.
Discography
The Lost Single & Live 40 Watt Club 1981 (Strangeways, 1993)
The Dasht Hopes Single // Live 40 Watt Club 1981 (Space Bee Records, 2013) (digital re-issue)
References
External links
R.E.M. Timeline - 1980/81 Concert Chronology
Rock music groups from Georgia (U.S. state)
Musical groups from Athens, Georgia
|
```python
# -*- coding: utf-8 -*-
"""
.. module:: test_arithmetic
:platform: Unix
:synopsis: tests for the arithmetic submodule.
.. moduleauthor:: Mehmet Mert Yldran <mert.yildiran@bil.omu.edu.tr>
"""
from dragonfire.arithmetic import arithmetic_parse, text2int
import pytest
def test_text2int():
assert text2int("seven billion one hundred million thirty one thousand three hundred thirty seven") == 7100031337
@pytest.mark.parametrize("command, response", [
("How much is 12 + 14?", "12 + 14 = 26"),
("How much is twelve thousand three hundred four plus two hundred fifty six?", "12304 + 256 = 12560"),
("What is five hundred eighty nine times six?", "589 * 6 = 3534"),
("What is five hundred eighty nine divided by 89?", "589 / 89 = 6.617977528089888"),
("What is seven billion five million and four thousand three hundred and four plus five million and four thousand three hundred and four?", "7005004304 + 5004304 = 7010008608"),
("How much is 16 - 23?", "16 - 23 = -7"),
("How much is 144 * 12?", "144 * 12 = 1728"),
("How much is 23 / 0?", "Sorry, but that does not make sense as the divisor cannot be zero."),
("How much is 12 + ( 14 * 3 )?", "12 + ( 14 * 3 ) = 54"),
("How much is 12 + ( 14 * )?", False)
])
def test_arithmetic_parse(command, response):
assert arithmetic_parse(command) == response
```
|
Wilhelm Zahn (29 July 1910 – 14 November 1976) was a German Kriegsmarine officer during the Second World War. He was U-boat First Watch Officer, then became U-boat commander and was finally promoted to Korvettenkapitän on 1 April 1943. As commander of U-56 he was able to avoid detection by the destroyers surrounding and came in close proximity to the British flagship, launching three torpedoes against her whilst she was carrying Winston Churchill and the high military command of the British Navy. Following that incident he became widely known as the "Man who almost killed Churchill" amongst the U-boat submariner corps. He was one of the commanding officers during the sinking of which has been described as "Adolf Hitler Titanic".
U-boat action
U-56
At 10 a.m. on 30 October 1939, Zahn was commander of when he managed to avoid detection by the 10 destroyers and battle cruiser , protecting the Home Fleet west of the Orkney Islands and came within striking distance of and .
Unbeknown to Zahn, aboard the flagship HMS Nelson were First Lord of the Admiralty Winston Churchill, Admiral of the Fleet Sir Charles Forbes, and admiral Sir Dudley Pound who was the First Sea Lord at the time. The reason for the gathering was Winston Churchill's decision to convene a conference with the leadership of the British Navy because of the disastrous sinking of by a U-boat, which killed 833 servicemen.
In Zahn's own account of the events, three cruisers were heading straight toward his U-boat's position, making any attack by him almost impossible, when suddenly they veered by twenty to thirty degrees from their previous course opening the field of attack and bringing him into a direct line of fire with HMS Nelson and HMS Rodney. Rodney was the lead ship of the convoy and Zahn decided to wait until it passed and concentrated his sights on Nelson. The U-boat came within the point-blank range of 800 metres of the ship and Zahn's chances of striking and sinking it were high.
He fired three torpedoes from U-56s three torpedo tubes toward the flagship. No detonations occurred but two torpedoes allegedly struck the hull of the Nelson: one of the sonar operators of U-56 claimed to have heard sound of impact with Nelsons hull. The third torpedo subsequently exploded at sea without causing damage. The incident has been described as the "most important non-sinking" of the conflict. After the attack Zahn became widely known as the "Man who almost killed Churchill" amongst the U-boat submariner corps.
After the attack Zahn ordered the U-boat to descend to a deeper level to avoid depth charges, since the destroyers had by now detected its presence. In the evening Zahn ordered U-56 to surface and subsequently sent a radio report to Berlin listing the targets in the group including HMS Rodney. The delay in the transmission of the information was caused by Zahn's depression caused by missing his target. Had this delay in Zahn's report not happened, the German command could have sent , which was in the area at the time, to renew the attack on the British targets.
Because of his failure to destroy the Nelson, Zahn became depressed and Karl Dönitz felt obliged to relieve him of his U-56 command and sent him back to Germany to become an instructor. Later, in his memoirs, Dönitz called the failed attack by U-56 "an exceptionally serious failure" but did not blame Zahn whose daring, in the presence of the destroyers, he praised, saying "The commander who had delivered the attack with great daring when surrounded by twelve escorting destroyers, was so depressed by this failure, in which he was in no way to blame, that I felt compelled to withdraw him for the time being from active operations and employ him as an instructor at home". In addition Dönitz had received reports from his men concerning problems with the defective G7e torpedoes that they were using and knew that the failures were caused by the faulty torpedoes. Zahn eventually recovered and later that year was given command of .
Urban Legend
The Home Fleet was at sea from 23-31 October, escorting British iron ore ships from Narvik to England. The Home Fleet returned to Loch Ewe on 31st Oct 1939. The attack occurs on the 30th, and it is highly unlikely that both Pound and Churchill were aboard during an active operation taking eight days. They lead operations from their headquarters, they do not go to sea. Churchill and Pound were on the 31st October in Loch Ewe to discuss with Forbes the possible return of the Home Fleet to the Scapa Flow anchorage, which was evacuated after the U-47 attack, which sank the Royal Oak.
After this patrol, Zahn was not relieved of his command: Zahn in fact executed three more patrols with the same U-56 between 23 October 1939 and 11 January 1940. Only after these patrols Zahn left the boat to commission the U-69.
So the story about Churchill and Pound being on board, and Zahn being depressed is likely an urban legend, mentioned in a lot of literature.
U-69
On 30 October 1941 Zahn took command of U-69 for the first time. It was the U-boat's sixth patrol, the previous five patrols being under Lieutenant commander Jost Metzler when from February to July 1941 sank approximately eleven British ships of about . Once at sea Zahn opened the sealed mission orders from Dönitz instructing him to go to the Störtebeker patrol zone named after a German pirate, lying to the east of the Azores. He was to search for supply ships originating from Cape Town and going to England through Gibraltar under code name OS11. On 3 November 1941 Zahn reached the area and wrote in his log "Now begins the tedious business of searching".
On 23 November U-69 was ordered by Naval Command to sail to sector AK in the Atlantic southeast of Greenland and southwest of Iceland. Through adverse weather U-69 set to the new course. At 8 p.m. on 26 November 1941 Zahn under inclement weather decided to track a lone freighter moving slowly in heavy seas under snow and hail. After two hours of sailing on the surface Zahn decided on a surface attack against the freighter and released four torpedoes all of which failed to hit the target. Zahn ordered the submarine to submerge to load the four tubes with new torpedoes and upon resurfacing the target could not be located again. Although Dönitz sent messages concerning more targets after that U-69 was not able to locate them and on 3 December it was ordered back to St. Nazaire. Upon arrival, after 39 days of patrol in the Atlantic, captain Eberhard Godt, the U-boat chief of operations, reprimanded Zahn for his failure to sink any targets and although he acknowledged the impact of the severe weather he told Zahn in future not to submerge for such a long time to reload all torpedo tubes but to only perform a partial reloading to save time.
In the early morning of 18 January 1942 U-69 with Zahn in command left St. Nazaire setting for a course toward the mid-Atlantic. U-69 came within 500 miles of Long Island, New York and since it was running low on fuel and could not positively identify a potential target as an enemy vessel, Zahn decided not to attack. U-69 was then ordered closer to the American coast but after increased anti-submarine activity Zahn decided on sailing for Grand Banks near Newfoundland. On 17 March 1942, after some more unsuccessful encounters at sea, Zahn brought U-69 to St. Nazaire after a mission in the Atlantic lasting thirty eight days without sinking any ship. Dönitz, in his post-mission appraisal report of Zahn's actions, wrote "Although opportunities presented themselves the commander once again has had no success. This cannot be attributed solely to lack of luck. The commander lacks skill both in general operations and in attacking." Dönitz did not approve of Zahn's tactics of just following a convoy of ships instead of launching an attack against it during the day and also blamed him for not following the convoy closely enough and for losing contact with it eventually, saying "Proper tactics would have been to head for the convoy at full speed and to decide on a daylight attack-or at the very least to have kept so close to the enemy as not to lose him, as was the case here". He then relieved Zahn of his command of U-69 and appointed him to a different post.
Wilhelm Gustloff
Korvettenkapitän Wilhelm Zahn and merchant marine Captain Friedrich Petersen were the two senior officers aboard Wilhelm Gustloff when on 30 January 1945 it was assigned the task of transporting an assortment of passengers from the East to the West of Germany. The passengers included 8,000–9,000 German war refugees, 1,000 members of the Second Submarine Training Division (2. Unterseeboots-Lehrdivision), about 400 women members of the Auxiliary Navy Corps, Nazi Party officials and injured servicemen.
Although Zahn had the highest rank on the ship, Petersen, as a merchant marine captain, had formal command of the vessel, a fact that ran counter to the sensibilities of Zahn, who was unwilling to accept Petersen's authority. At the same time, Zahn had military priorities which differed from those of civilian captain Petersen but since he did not have the legal authority to impose his decisions on the civilian captain, eventually the two men ran into conflict concerning the details of how to plot the path that Wilhelm Gustloff would take. Problems also arose between the two officers regarding the ship's speed and the taking of safety precautions related to avoiding attacks by submarines which could be present in the area at the time.
Zahn as the commander and Military Transport Leader of the Second Submarine Training Division wanted to effect standard navy war procedure during the transport of the naval trainees which included cruising at high speed and submarine avoidance precautions such as travelling near the coast with the ship in total darkness. Zahn's plans were met with resolute opposition from captain Petersen.
Zahn was drawing from his U-boat experience and was aware of British anti-submarine tactics in the Atlantic which included a minimum cruising speed limit of 15 knots for British commercial vessels, necessary to safely outrun the U-boats, and proposed this to Petersen. Petersen however was mindful of the damage the ship had sustained in an aerial bombardment the year before and did not believe that subsequent repairs to the hull were completely effective and had doubts that the ship's hull had the structural integrity to withstand the stresses imposed by the speed proposed by Zahn. He therefore insisted that the ship's speed not exceed 12 knots.
However, Zahn knew that Wilhelm Gustloff was rated at 16 knots top speed and was annoyed at Petersen's insistence for keeping at the lower speed limit of 12 knots, which made the ship an easier target for submarines. Another point of disagreement between the two captains was the shape of the route. Zahn supported a zigzag submarine avoidance path while Petersen proposed a linear path to minimise travel time. Petersen also proposed cruising in deep waters and with the lights on to avoid collision with minesweeping ships which were reported as being present in the area at the time.
Eventually the two captains agreed on a zigzag course. This did not prevent the sinking of the ship by a Soviet submarine.
Inquiry
Following the sinking of Wilhelm Gustloff, a naval board of inquiry was convened; Zahn appeared in front of it, having been called by the board to justify his actions. During his testimony, Zahn blamed the Croatian crew's lack of understanding of orders, given in German, for the high number of casualties during the sinking. Zahn also mentioned that he had not received any orders regarding the performance or avoidance of zigzag manoeuvres, saying that he "just got three phone calls and told to leave". He also said that he had concluded that there were no submarines in the area after discussions with fellow officers. This conclusion, he said, was further reinforced by his belief that if the presence of submarines had been detected in the area the naval command would have informed him.
Subsequently, Zahn's testimony described the events as they unfolded after the torpedoes hit the ship. Zahn testified that immediately after impact Wilhelm Gustloff started listing about 5 degrees at the port side. For about twenty minutes the list remained small but then started increasing causing panic. Zahn testified that he told the refugees that the ship had run aground so as to minimise panic. When the ship kept turning more and the tilt angle increased to 25–30 degrees, Zahn abandoned any attempts at coordinating the evacuation efforts and went to the stern to board a lifeboat and leave the ship.
Zahn also testified that ice had accumulated in the lifeboat launchers and made the lowering of the lifeboats difficult. In addition he blamed the Croatian crew for leaving, saying: "The davits were iced and the Croats were absent". He further testified that "only four to six lifeboats were lowered with the help of soldiers under difficult circumstances".
Zahn told the inquiry that at first he and the other officers had gathered at the bridge and then instructed the refugees "to go to the upper deck and not to panic". But as the stern began tilting upwards and the bow started penetrating the surface of the water, Zahn realised the ship was not going to remain afloat for much longer and hurriedly left from the bridge.
Literature
The conflict between Zahn and Petersen is depicted in the novel Polar Shift.
The paper The Good Captain and the Bad Captain: Joseph Vilsmaier's Die Gustloff and the Erosion of Complexity published in the journal German Politics and Society analyses Joseph Vilsmaier two-part television series in the light of the conflict between the two captains and its symbolism regarding the politics of conflict and social responsibility between the civilian and military sides of German society at the time. Zahn is depicted by Karl Markovics and in the two-part series he is called captain Wilhelm Petri. Petri is depicted as obsessed with military directives and efficiency in contrast to the civilian captain who is portrayed as caring for the refugees and their plight. The paper finds such portrayal of the main characters simplistic and counter to current scholarship on the subject.
References
Bibliography
1910 births
1976 deaths
U-boat commanders (Kriegsmarine)
People from Bad Staffelstein
Military personnel from Bavaria
|
Jerusalem International YMCA is a YMCA branch in Jerusalem established in the early twentieth century.
History
In 1924, Archibald Clinton Harte, General Secretary of the International YMCA, raised the sum of one million dollars towards the construction of the building.
Harte developed a vision for a permanent Y building and worked tirelessly planning every detail. For years, he cultivated donors who shared his vision of a “Sermon in Stone.”
After seven years of construction, the new Jerusalem YMCA was dedicated in 1933 with the words “Here is a place whose atmosphere is peace, where political and religious jealousies can be forgotten and international unity be fostered and developed.” Harte retired to his home on the shores of Galilee, which he bequeathed to the Jerusalem International YMCA as an international conference facility. The cornerstone was laid in 1928 by Lord Plumer, the British High Commissioner for Palestine, on a plot of land in the West Nikephoria section of Jerusalem, purchased from the Greek Orthodox Patriarchate of Jerusalem.
When the building opened on April 18, 1933, the event was attended by YMCA leaders from around the world. Details of the building, with its elegant arches, domes and tower, were described in the world press, which hailed it as a wellspring of cultural, athletic, social and intellectual life. Until 1991, the YMCA stadium was the only soccer stadium in Jerusalem.
The building was designed by the American architect Arthur Loomis Harmon of Shreve, Lamb and Harmon, who designed the Empire State Building. The Jerusalem YMCA housed the city's first heated swimming pool and first gymnasium with a wooden floor. The first concert broadcasts of the Voice of Israel radio station were transmitted from the YMCA auditorium.
In 1947, the YMCA was the venue of the UNSCOP talks leading up to the UN Partition Plan. At the end of April 1948 the building was taken over by the International Red Cross, sheltering around 80 refugees. Two months later it was used by the UN Mediation Committee headed by Count Bernadotte and in September it was taken over by the US Consulate with US guards and naval telecommunications equipment. The building was restored to the YMCA in April 1949.
For two months after the 1967 war the UN had a temporary headquarters in the building.
In 2003 62.5% of the membership were Jewish, 19.5% Muslim and 18% Christian.
The stadium
YMCA Stadium (Hebrew: אצטדיון ימק"א, Itztadion Yimka) was the city's only sports stadium until 1991. It was the home of Beitar Jerusalem Football Club until the construction of Teddy Stadium in Malha in the 1990s. It was razed by developers to make way for a luxury housing project, King David's Court.
Youth Chorus
The YMCA Jerusalem Youth Chorus is an interfaith (Christian, Muslim and Jewish) group of young singers. The Chorus encourages the youth from East and West Jerusalem to come together to become leaders for peace in their communities by providing a space where they can engage one another in musical and verbal dialogue.
The Youth Chorus and the Choir of St. Jean Baptiste performed a rendition of the Three Dog Night song "Joy to the World" on the 24 September 2015 episode of The Late Show with Stephen Colbert to celebrate Pope Francis's trip to the US.
References
Defunct football venues in Israel
YMCA buildings
Buildings and structures in Jerusalem
Buildings and structures completed in 1933
1933 establishments in Mandatory Palestine
Christianity in Jerusalem
|
```javascript
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
'use strict';
// MODULES //
var addon = require( './../src/addon.node' );
// MAIN //
/**
* Computes the multiplicative inverse for each element in a single-precision floating-point strided array `x` according to a strided mask array and assigns the results to elements in a single-precision floating-point strided array `y`.
*
* @param {NonNegativeInteger} N - number of indexed elements
* @param {Float32Array} x - input array
* @param {integer} sx - `x` stride length
* @param {Uint8Array} m - mask array
* @param {integer} sm - `m` stride length
* @param {Float32Array} y - destination array
* @param {integer} sy - `y` stride length
* @returns {Float32Array} `y`
*
* @example
* var Float32Array = require( '@stdlib/array/float32' );
* var Uint8Array = require( '@stdlib/array/uint8' );
*
* var x = new Float32Array( [ -20.0, -1.0, 2.0, 4.0, 10.0 ] );
* var m = new Uint8Array( [ 0, 0, 1, 0, 1 ] );
* var y = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );
*
* smskinv( x.length, x, 1, m, 1, y, 1 );
* // y => <Float32Array>[ ~-0.05, -1.0, 0.0, 0.25, 0.0 ]
*/
function smskinv( N, x, sx, m, sm, y, sy ) {
addon( N, x, sx, m, sm, y, sy );
return y;
}
// EXPORTS //
module.exports = smskinv;
```
|
```javascript
import { fileURLToPath } from "url";
import { IAMClient } from "@aws-sdk/client-iam";
import { LambdaClient } from "@aws-sdk/client-lambda";
import { SageMakerClient } from "@aws-sdk/client-sagemaker";
import { SQSClient } from "@aws-sdk/client-sqs";
import { S3Client } from "@aws-sdk/client-s3";
import { Prompter } from "@aws-doc-sdk-examples/lib/prompter.js";
import { SlowLogger } from "@aws-doc-sdk-examples/lib/slow-logger.js";
import { SageMakerPipelinesWkflw } from "./SageMakerPipelinesWkflw.js";
const prompter = new Prompter();
const logger = new SlowLogger(25);
export async function main() {
const pipelineWkfw = new SageMakerPipelinesWkflw(prompter, logger, {
IAM: new IAMClient({ region: "us-west-2" }),
Lambda: new LambdaClient({ region: "us-west-2" }),
SageMaker: new SageMakerClient({ region: "us-west-2" }),
S3: new S3Client({ region: "us-west-2" }),
SQS: new SQSClient({ region: "us-west-2" }),
});
await pipelineWkfw.run();
}
// Invoke main function if this file was run directly.
if (process.argv[1] === fileURLToPath(import.meta.url)) {
main();
}
```
|
Daytona Motorsport Ltd is a motorsports company that owns and runs karting circuits in Milton Keynes, Manchester, Sandown Park and Tamworth. (with a location previously in Lydd). It caters for drivers aged 6–80 years old and holds monthly "Inkart" championships. Graduates from the individual circuits include Formula First champion Alex Kapadia, Ginetta Junior driver William Tregurtha, Formula Renault race winner Ivan Taranov, as well as Robert Huff and Howard Fuller. British GT driver Jordan Albert also originated from this track, as well as several established Super One drivers (mostly in the Cadet classes).
It holds other events, including Daytona's exclusive DMAX national championships and the Open Endurance Karting Championship, as well as corporate karting events. Famous drivers to complete Daytona's race school include current Formula E racer, Sam Bird.
Daytona Motorsport was founded in 1990 by Charles Graham, the CEO of the Daytona Group. The Daytona Group began with indoor karting circuits across London in the 1990s, with limited staff.
The organisation was purchased by Brands Hatch Leisure Group in 1998, which was in turn purchased by Octagon in 1999. In June 2003 the founders of Daytona bought back the organisation.
Notable people that have utilised the Daytona circuits include Sam Bird, Viktor Jensen and Duncan Tappy, as well as Formula 1 racers Lewis Hamilton, Martin Brundle, David Coulthard and Damon Hill.
Venues
Daytona's first venue was an indoor circuit at Wood Lane, London, which opened in 1990. It was followed by a second indoor circuit in London in 1992. The two circuits were joined together to form a "GP Circuit" in 1994, which was visited by Tom Cruise, Brad Pitt and Sandra Bullock.
As of 2023, Daytona operates three venues in Milton Keynes, Surrey and Tamworth.
Daytona's Manchester venue is located near to Old Trafford. The indoor course is located in a purpose-built, heated venue that opened in October 2000. This venue is no longer owned by Daytona.
The Milton Keynes venue opened in 1996 as "Daytona International". The venue has three outdoor circuits: an "international circuit" with a length of with 11 corners; a "national circuit" with a length of ; and the "north circuit" with a length of .
The venue at Sandown Park, Surrey, has two outdoor circuits. Its "GP Circuit" is long with eight corners and several straights, while its "Indy Circuit" is long with five corners and some short straights. The venue has both single and twin-engine karts.
The Priory Park track in Tamworth was previously owned by Tamworth Karting, but closed in January 2014 due to a dispute between the company and the owner of the property. It was purchased by Daytona, and was subsequently extended, with opposition by local residents. Daytona also wanted to increase the number of karts on the track from 12 to 30.
At the Milton Keynes and Sandown Park venues, Daytona have a large fleet of Cadet (Honda Single 160cc), Junior (Honda Single 200cc), Senior (Sodi Single 390cc), and DMAX (Birel 2-stroke 125cc) karts to cater for any driver. At the indoor Manchester venue, Daytona run similar karts but with slightly less power due to the nature of the circuit.
In October 2018, Daytona sold Daytona Manchester, their only indoor facility, to rivals TeamSport Go Karting, to focus on providing racing at their three outdoor tracks. For 2019, Daytona also decided to drop the travelling DMAX Championship to focus on providing racing at their own venues as opposed to travelling to other circuits, much akin to the Club100 brand.
References
Kart racing
Sports organizations established in 1990
Motorsport in England
|
The BKM algorithm is a shift-and-add algorithm for computing elementary functions, first published in 1994 by Jean-Claude Bajard, Sylvanus Kla, and Jean-Michel Muller. BKM is based on computing complex logarithms (L-mode) and exponentials (E-mode) using a method similar to the algorithm Henry Briggs used to compute logarithms. By using a precomputed table of logarithms of negative powers of two, the BKM algorithm computes elementary functions using only integer add, shift, and compare operations.
BKM is similar to CORDIC, but uses a table of logarithms rather than a table of arctangents. On each iteration, a choice of coefficient is made from a set of nine complex numbers, 1, 0, −1, i, −i, 1+i, 1−i, −1+i, −1−i, rather than only −1 or +1 as used by CORDIC. BKM provides a simpler method of computing some elementary functions, and unlike CORDIC, BKM needs no result scaling factor. The convergence rate of BKM is approximately one bit per iteration, like CORDIC, but BKM requires more precomputed table elements for the same precision because the table stores logarithms of complex operands.
As with other algorithms in the shift-and-add class, BKM is particularly well-suited to hardware implementation. The relative performance of software BKM implementation in comparison to other methods such as polynomial or rational approximations will depend on the availability of fast multi-bit shifts (i.e. a barrel shifter) or hardware floating point arithmetic.
Overview
In order to solve the equation
the BKM algorithm takes advantage of a basic property of logarithms
Using Pi notation, this identity generalizes to
Because any number can be represented by a product, this allows us to choose any set of values which multiply to give the value we started with. In computer systems, it's much faster to multiply and divide by multiples of 2, but because not every number is a multiple of 2, using is a better option than a more simple choice of . Since we want to start with large changes and get more accurate as increases, we can more specifically use , allowing the product to approach any value between 1 and ~4.768, depending on which subset of we use in the final product. At this point, the above equation looks like this:
This choice of reduces the computational complexity of the product from repeated multiplication to simple addition and bit-shifting depending on the implementation. Finally, by storing the values in a table, calculating the solution is also a simple matter of addition. Iteratively, this gives us two separate sequences. One sequence approaches the input value while the other approaches the output value :
Given this recursive definition and because is strictly increasing, it can be shown by induction and convergence that
for any . For calculating the output, we first create the reference table
Then the output is computed iteratively by the definition
The conditions in this iteration are the same as the conditions for the input. Similar to the input, this sequence is also strictly increasing, so it can be shown that
for any .
Because the algorithm above calculates both the input and output simultaneously, it's possible to modify it slightly so that is the known value and is the value we want to calculate, thereby calculating the exponential instead of the logarithm. Since x becomes an unknown in this case, the conditional changes from
to
Logarithm function
To calculate the logarithm function (L-mode), the algorithm in each iteration tests if . If so, it calculates and . After iterations the value of the function is known with an error of .
Example program for natural logarithm in C++ (see A_e for table):
double log_e (const double Argument, const int Bits = 53) // 1 <= Argument <= 4.768462058
{
double x = 1.0, y = 0.0, s = 1.0;
for (int k = 0; k < Bits; k++) {
double const z = x + x*s;
if (z <= Argument) {
x = z;
y += A_e[k];
}
s *= 0.5;
}
return y;
}
Logarithms for bases other than e can be calculated with similar effort.
Example program for binary logarithm in C++ (see A_2 for table):
double log_2 (const double Argument, const int Bits = 53) // 1 <= Argument <= 4.768462058
{
double x = 1.0, y = 0.0, s = 1.0;
for (int k = 0; k < Bits; k++) {
double const z = x + x*s;
if (z <= Argument) {
x = z;
y += A_2[k];
}
s *= 0.5;
}
return y;
}
The allowed argument range is the same for both examples (1 ≤ Argument ≤ 4.768462058…). In the case of the base-2 logarithm the exponent can be split off in advance (to get the integer part) so that the algorithm can be applied to the remainder (between 1 and 2). Since the argument is smaller than 2.384231…, the iteration of k can start with 1. Working in either base, the multiplication by s can be replaced with direct modification of the floating point exponent, subtracting 1 from it during each iteration. This results in the algorithm using only addition and no multiplication.
Exponential function
To calculate the exponential function (E-mode), the algorithm in each iteration tests if . If so, it calculates and . After iterations the value of the function is known with an error of .
Example program in C++ (see A_e for table):
double exp (const double Argument, const int Bits = 54) // 0 <= Argument <= 1.5620238332
{
double x = 1.0, y = 0.0, s = 1.0;
for (int k = 0; k < Bits; k++) {
double const z = y + A_e[k];
if (z <= Argument) {
y = z;
x = x + x*s;
}
s *= 0.5;
}
return x;
}
Tables for examples
static const double A_e [] = // A_e[k] = ln (1 + 0.5^k)
{
0.693147180559945297099404706000, 0.405465108108164392935428259000,
0.223143551314209769962616701000, 0.117783035656383447138088388000,
0.060624621816434840186291518000, 0.030771658666753686222134530000,
0.015504186535965253358272343000, 0.007782140442054949100825041000,
0.003898640415657322636221046000, 0.001951220131261749216850870000,
0.000976085973055458892686544000, 0.000488162079501351186957460000,
0.000244110827527362687853374000, 0.000122062862525677363338881000,
0.000061033293680638525913091000, 0.000030517112473186377476993000,
0.000015258672648362398138404000, 0.000007629365427567572417821000,
0.000003814689989685889381171000, 0.000001907346813825409407938000,
0.000000953673861659188260005000, 0.000000476837044516323000000000,
0.000000238418550679858000000000, 0.000000119209282445354000000000,
0.000000059604642999033900000000, 0.000000029802321943606100000000,
0.000000014901161082825400000000, 0.000000007450580569168250000000,
0.000000003725290291523020000000, 0.000000001862645147496230000000,
0.000000000931322574181798000000, 0.000000000465661287199319000000,
0.000000000232830643626765000000, 0.000000000116415321820159000000,
0.000000000058207660911773300000, 0.000000000029103830456310200000,
0.000000000014551915228261000000, 0.000000000007275957614156960000,
0.000000000003637978807085100000, 0.000000000001818989403544200000,
0.000000000000909494701772515000, 0.000000000000454747350886361000,
0.000000000000227373675443206000, 0.000000000000113686837721610000,
0.000000000000056843418860806400, 0.000000000000028421709430403600,
0.000000000000014210854715201900, 0.000000000000007105427357600980,
0.000000000000003552713678800490, 0.000000000000001776356839400250,
0.000000000000000888178419700125, 0.000000000000000444089209850063,
0.000000000000000222044604925031, 0.000000000000000111022302462516,
0.000000000000000055511151231258, 0.000000000000000027755575615629,
0.000000000000000013877787807815, 0.000000000000000006938893903907,
0.000000000000000003469446951954, 0.000000000000000001734723475977,
0.000000000000000000867361737988, 0.000000000000000000433680868994,
0.000000000000000000216840434497, 0.000000000000000000108420217249,
0.000000000000000000054210108624, 0.000000000000000000027105054312
};
static const double A_2 [] = // A_2[k] = log_2 (1 + 0.5^k)
{
1.0000000000000000000000000000000000000000000000000000000000000000000000000000,
0.5849625007211561814537389439478165087598144076924810604557526545410982276485,
0.3219280948873623478703194294893901758648313930245806120547563958159347765589,
0.1699250014423123629074778878956330175196288153849621209115053090821964552970,
0.0874628412503394082540660108104043540112672823448206881266090643866965081686,
0.0443941193584534376531019906736094674630459333742491317685543002674288465967,
0.0223678130284545082671320837460849094932677948156179815932199216587899627785,
0.0112272554232541203378805844158839407281095943600297940811823651462712311786,
0.0056245491938781069198591026740666017211096815383520359072957784732489771013,
0.0028150156070540381547362547502839489729507927389771959487826944878598909400,
0.0014081943928083889066101665016890524233311715793462235597709051792834906001,
0.0007042690112466432585379340422201964456668872087249334581924550139514213168,
0.0003521774803010272377989609925281744988670304302127133979341729842842377649,
0.0001760994864425060348637509459678580940163670081839283659942864068257522373,
0.0000880524301221769086378699983597183301490534085738474534831071719854721939,
0.0000440268868273167176441087067175806394819146645511899503059774914593663365,
0.0000220136113603404964890728830697555571275493801909791504158295359319433723,
0.0000110068476674814423006223021573490183469930819844945565597452748333526464,
0.0000055034343306486037230640321058826431606183125807276574241540303833251704,
0.0000027517197895612831123023958331509538486493412831626219340570294203116559,
0.0000013758605508411382010566802834037147561973553922354232704569052932922954,
0.0000006879304394358496786728937442939160483304056131990916985043387874690617,
0.0000003439652607217645360118314743718005315334062644619363447395987584138324,
0.0000001719826406118446361936972479533123619972434705828085978955697643547921,
0.0000000859913228686632156462565208266682841603921494181830811515318381744650,
0.0000000429956620750168703982940244684787907148132725669106053076409624949917,
0.0000000214978311976797556164155504126645192380395989504741781512309853438587,
0.0000000107489156388827085092095702361647949603617203979413516082280717515504,
0.0000000053744578294520620044408178949217773318785601260677517784797554422804,
0.0000000026872289172287079490026152352638891824761667284401180026908031182361,
0.0000000013436144592400232123622589569799954658536700992739887706412976115422,
0.0000000006718072297764289157920422846078078155859484240808550018085324187007,
0.0000000003359036149273187853169587152657145221968468364663464125722491530858,
0.0000000001679518074734354745159899223037458278711244127245990591908996412262,
0.0000000000839759037391617577226571237484864917411614198675604731728132152582,
0.0000000000419879518701918839775296677020135040214077417929807824842667285938,
0.0000000000209939759352486932678195559552767641474249812845414125580747434389,
0.0000000000104969879676625344536740142096218372850561859495065136990936290929,
0.0000000000052484939838408141817781356260462777942148580518406975851213868092,
0.0000000000026242469919227938296243586262369156865545638305682553644113887909,
0.0000000000013121234959619935994960031017850191710121890821178731821983105443,
0.0000000000006560617479811459709189576337295395590603644549624717910616347038,
0.0000000000003280308739906102782522178545328259781415615142931952662153623493,
0.0000000000001640154369953144623242936888032768768777422997704541618141646683,
0.0000000000000820077184976595619616930350508356401599552034612281802599177300,
0.0000000000000410038592488303636807330652208397742314215159774270270147020117,
0.0000000000000205019296244153275153381695384157073687186580546938331088730952,
0.0000000000000102509648122077001764119940017243502120046885379813510430378661,
0.0000000000000051254824061038591928917243090559919209628584150482483994782302,
0.0000000000000025627412030519318726172939815845367496027046030028595094737777,
0.0000000000000012813706015259665053515049475574143952543145124550608158430592,
0.0000000000000006406853007629833949364669629701200556369782295210193569318434,
0.0000000000000003203426503814917330334121037829290364330169106716787999052925,
0.0000000000000001601713251907458754080007074659337446341494733882570243497196,
0.0000000000000000800856625953729399268240176265844257044861248416330071223615,
0.0000000000000000400428312976864705191179247866966320469710511619971334577509,
0.0000000000000000200214156488432353984854413866994246781519154793320684126179,
0.0000000000000000100107078244216177339743404416874899847406043033792202127070,
0.0000000000000000050053539122108088756700751579281894640362199287591340285355,
0.0000000000000000025026769561054044400057638132352058574658089256646014899499,
0.0000000000000000012513384780527022205455634651853807110362316427807660551208,
0.0000000000000000006256692390263511104084521222346348012116229213309001913762,
0.0000000000000000003128346195131755552381436585278035120438976487697544916191,
0.0000000000000000001564173097565877776275512286165232838833090480508502328437,
0.0000000000000000000782086548782938888158954641464170239072244145219054734086,
0.0000000000000000000391043274391469444084776945327473574450334092075712154016,
0.0000000000000000000195521637195734722043713378812583900953755962557525252782,
0.0000000000000000000097760818597867361022187915943503728909029699365320287407,
0.0000000000000000000048880409298933680511176764606054809062553340323879609794,
0.0000000000000000000024440204649466840255609083961603140683286362962192177597,
0.0000000000000000000012220102324733420127809717395445504379645613448652614939,
0.0000000000000000000006110051162366710063906152551383735699323415812152114058,
0.0000000000000000000003055025581183355031953399739107113727036860315024588989,
0.0000000000000000000001527512790591677515976780735407368332862218276873443537,
0.0000000000000000000000763756395295838757988410584167137033767056170417508383,
0.0000000000000000000000381878197647919378994210346199431733717514843471513618,
0.0000000000000000000000190939098823959689497106436628681671067254111334889005,
0.0000000000000000000000095469549411979844748553534196582286585751228071408728,
0.0000000000000000000000047734774705989922374276846068851506055906657137209047,
0.0000000000000000000000023867387352994961187138442777065843718711089344045782,
0.0000000000000000000000011933693676497480593569226324192944532044984865894525,
0.0000000000000000000000005966846838248740296784614396011477934194852481410926,
0.0000000000000000000000002983423419124370148392307506484490384140516252814304,
0.0000000000000000000000001491711709562185074196153830361933046331030629430117,
0.0000000000000000000000000745855854781092537098076934460888486730708440475045,
0.0000000000000000000000000372927927390546268549038472050424734256652501673274,
0.0000000000000000000000000186463963695273134274519237230207489851150821191330,
0.0000000000000000000000000093231981847636567137259618916352525606281553180093,
0.0000000000000000000000000046615990923818283568629809533488457973317312233323,
0.0000000000000000000000000023307995461909141784314904785572277779202790023236,
0.0000000000000000000000000011653997730954570892157452397493151087737428485431,
0.0000000000000000000000000005826998865477285446078726199923328593402722606924,
0.0000000000000000000000000002913499432738642723039363100255852559084863397344,
0.0000000000000000000000000001456749716369321361519681550201473345138307215067,
0.0000000000000000000000000000728374858184660680759840775119123438968122488047,
0.0000000000000000000000000000364187429092330340379920387564158411083803465567,
0.0000000000000000000000000000182093714546165170189960193783228378441837282509,
0.0000000000000000000000000000091046857273082585094980096891901482445902524441,
0.0000000000000000000000000000045523428636541292547490048446022564529197237262,
0.0000000000000000000000000000022761714318270646273745024223029238091160103901
};
Notes
References
(5 pages)
(8 pages)
(1+15 pages)
(1+11 pages)
Further reading
(14 pages)
Computer arithmetic
Shift-and-add algorithms
Digit-by-digit algorithms
1994 introductions
1994 in science
|
```kotlin
/*
* that can be found in the LICENSE file.
*/
package zzz
open class B {
val z by lazy { "qzz" }
val x = 117
val zzz = "zzz"
}
```
|
Epsilon Mensae, Latinized to ε Mensae, is a single star in the southern circumpolar constellation Mensa. It has an apparent magnitude of 5.52, making it faintly visible to the naked eye under ideal conditions. The object has a heliocentric radial velocity of , meaning it is receding from the Solar System, and is estimated to be 454 light years away.
Epsilon Mensae has a stellar classification of K2/3 III — intermediate between a K2 and K3 giant star. It has 115% the mass of the Sun and an enlarged radius of . It shines at 170 times the luminosity of the Sun from its photosphere at an effective temperature of , giving it an orange glow. Epsilon Mensae has a metallicity 49% that of the Sun and is believed to be a member of the young disk population. It spins leisurely with a projected rotational velocity of about .
References
Mensa (constellation)
Mensae, Epsilon
036039
2919
060816
K-type giants
Mensae, 43
PD-78 265
|
```vue
<template>
<v-card>
<v-tabs
v-model="tab"
bg-color="primary"
>
<v-tab value="one">Item One</v-tab>
<v-tab value="two">Item Two</v-tab>
<v-tab value="three">Item Three</v-tab>
</v-tabs>
<v-card-text>
<v-tabs-window v-model="tab">
<v-tabs-window-item value="one">
One
</v-tabs-window-item>
<v-tabs-window-item value="two">
Two
</v-tabs-window-item>
<v-tabs-window-item value="three">
Three
</v-tabs-window-item>
</v-tabs-window>
</v-card-text>
</v-card>
</template>
<script>
export default {
data: () => ({
tab: null,
}),
}
</script>
```
|
```jsx
import React from 'react';
import { mount } from 'enzyme';
import Checkbox from '../';
test('isChecked should work', () => {
const wrapper = mount(
<Checkbox checked></Checkbox>
)
expect(wrapper.find('input').props().checked).toBe(true)
})
test('Turning an unchecked item to checked', () => {
const wrapper = mount(
<Checkbox></Checkbox>
)
// change
const Input = document.createElement('input');
Input.checked = true;
wrapper.find('input[type="checkbox"]').simulate('change', { target: Input });
expect(wrapper.find('input[type="checkbox"]').prop('checked')).toBe(true)
})
test('isDisabled should work', () => {
const wrapper = mount(
<Checkbox disabled></Checkbox>
)
expect(wrapper.find('input').props().disabled).toBe(true)
})
test('should render checked checkbox if checkboxGroup value contains the same label', () => {
let checkList = [' A', '']
const wrapper = mount(
<Checkbox.Group value={checkList}>
<Checkbox label=" A"></Checkbox>
<Checkbox label=" B"></Checkbox>
<Checkbox label=" C"></Checkbox>
<Checkbox label="" disabled></Checkbox>
<Checkbox label="" disabled></Checkbox>
</Checkbox.Group>
)
wrapper.find('.el-checkbox').forEach(e => {
if (checkList.includes(e.find('.el-checkbox__label').props().children)) {
expect(e.find('.el-checkbox__input').hasClass('is-checked')).toEqual(true)
}
})
})
test('should display indeterminate mark when checkbox is an indeterminate state', () => {
const wrapper = mount(
<Checkbox
indeterminate={true} />
)
expect(wrapper.find('.el-checkbox__input').hasClass('is-indeterminate')).toEqual(true)
})
test('should limited to max and min value', () => {
let cities = ['', '', '', '']
let checkedCity = ['', '']
const wrapper = mount(
<Checkbox.Group
min="1"
max="2"
value={checkedCity}>
{
cities.map((city, index) => {
return (
<Checkbox key={index} label={city}></Checkbox>
)
})
}
</Checkbox.Group>
)
//test checked length
expect(wrapper.find('.el-checkbox .el-checkbox__input.is-checked').length).toBe(2)
const Input = document.createElement('input');
//test max
Input.checked= true;
wrapper.find('input[type="checkbox"]').forEach(e => {
if (!e.prop('checked')) {
e.simulate('change', { target: Input });
expect(wrapper.find('.el-checkbox__input.is-checked').length).toBe(2)
}
})
//test min
Input.checked = false;
wrapper.find('input[type="checkbox"]').forEach(e => {
if (e.prop('checked')) {
e.simulate('change', { target: Input })
expect(wrapper.find('.el-checkbox__input.is-checked').length).toBe(1)
}
})
})
```
|
```javascript
module.exports = {
root: true,
extends: ['../../common.eslintrc.js'],
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
ignorePatterns: ['**/*.spec.ts', '__mocks__'],
plugins: ['@typescript-eslint', 'prettier'],
env: {
browser: true,
},
globals: {
__WEB_VERSION__: true,
},
}
```
|
Kathleen Dibolelo Mahlatsi (born 12 June 1984) is a South African politician who has been a Member of the Free State Executive Council for Public Works and Infrastructure and a Member of the Free State Provincial Legislature since March 2023. She is a former Member of the National Assembly of South Africa from the Free State. Mahlatsi is a member of the African National Congress.
Early life and background
Mahlatsi was born on 12 June 1984 in Bloemfontein. She attended Brebner High School before going on to study at the Central University of Technology and the University of the Free State. Before she was elected to parliament in 2019, Mahlatsi worked for the Free State Department of Public Works, Roads and Transport and the Free State Department of Social Development.
Political career
In December 2018, she was elected as the second deputy national secretary of the Young Communist League of South Africa. She was elected as deputy provincial secretary of the ANC in the Free State at the party's conference in January 2023.
Parliament
In 2019, Mahlatsi stood for election to the South African National Assembly as 5th on the ANC's list of National Assembly candidates from the Free State. The ANC dominated in the Free State, winning 8 out of the 11 list seats. Mahlatsi was elected in the election and was sworn into office at the first sitting of the new National Assembly on 22 May 2019.
On 27 June 2019, she was named to the Portfolio Committee on Agriculture, Land Reform and Rural Development. On 21 August 2019, she became a non-voting member of the Ad Hoc Committee to Amend Section 25 of the Constitution. Mahlatsi became a voting member on 10 February 2020.
Mahlatsi supports land expropriation without compensation. During the debate on the 2020 State of the Nation Address on 18 February 2020, Mahlatsi said: "As the ANC, we are looking at land, not property ... Hon. Speaker, the poor must be given means of production in order to defeat poverty. Land must be used as economic asset." In June 2020, she voted to re-establish the Ad Hoc Committee to Amend Section 25 of the Constitution after its term had expired. She said that the "land was stolen and must be returned" and that the ANC had considered the legal, economic and political implications of expropriation without compensation.
In April 2021, Mahlatsi criticised the United Democratic Movement leader, Bantu Holomisa's call for the dissolution of the national government and the appointment of an interim one until the next general elections in 2024, calling it misinformed, misguided and opportunistic.
Mahlatsi resigned from parliament on 1 March 2023.
Free State government
Mahlatsi was sworn in as a Member of the Free State Provincial Legislature on 13 March 2023. The following day, Mahlatsi was appointed as Member of the Executive Council (MEC) for Public Works and Infrastructure by premier Mxolisi Dukwana.
References
External links
Ms Kathleen Dibolelo Mahlatsi at Parliament of South Africa
Living people
1984 births
Sotho people
People from Bloemfontein
Members of the National Assembly of South Africa
Women members of the National Assembly of South Africa
African National Congress politicians
University of the Free State alumni
|
```xml
namespace pxt.packetio {
export interface TalkArgs {
cmd: number;
data?: Uint8Array;
}
export interface PacketIOWrapper {
readonly io: PacketIO;
icon: string;
familyID: number;
onSerial: (buf: Uint8Array, isStderr: boolean) => void;
reconnectAsync(): Promise<void>;
disconnectAsync(): Promise<void>;
isConnected(): boolean
isConnecting(): boolean
// flash the device, does **not** reconnect
reflashAsync(resp: pxtc.CompileResult, progressCallback?: (percentageComplete: number) => void): Promise<void>;
onCustomEvent: (type: string, payload: Uint8Array) => void;
sendCustomEventAsync(type: string, payload: Uint8Array): Promise<void>;
// returns a list of part ids that are not supported by the connected hardware. currently
// only used by pxt-microbit to warn users about v2 blocks on v1 hardware
unsupportedParts?(): string[];
// the variant id for the currently connected device
devVariant?: string;
}
export interface PacketIO {
sendPacketAsync(pkt: Uint8Array): Promise<void>;
recvPacketAsync?: () => Promise<Uint8Array>;
onDeviceConnectionChanged: (connect: boolean) => void;
onConnectionChanged: () => void;
onData: (v: Uint8Array) => void;
onError: (e: Error) => void;
onEvent: (v: Uint8Array) => void;
error(msg: string): any;
reconnectAsync(): Promise<void>;
disconnectAsync(): Promise<void>;
isConnecting(): boolean;
isConnected(): boolean;
isSwitchingToBootloader?: () => void;
// release any native resource before being released
disposeAsync(): Promise<void>;
// these are implemneted by HID-bridge
talksAsync?(cmds: TalkArgs[]): Promise<Uint8Array[]>;
sendSerialAsync?(buf: Uint8Array, useStdErr: boolean): Promise<void>;
onSerial?: (v: Uint8Array, isErr: boolean) => void;
}
export let mkPacketIOAsync: () => Promise<PacketIO>;
export let mkPacketIOWrapper: (io: PacketIO) => PacketIOWrapper;
let wrapper: PacketIOWrapper;
let initPromise: Promise<PacketIOWrapper>;
let onConnectionChangedHandler: () => void = () => { };
let onSerialHandler: (buf: Uint8Array, isStderr: boolean) => void;
let onCustomEventHandler: (type: string, buf: Uint8Array) => void;
/**
* A DAP wrapper is active
*/
export function isActive() {
return !!wrapper;
}
/**
* The DAP wrapper is active and the device is connected
*/
export function isConnected() {
return !!wrapper?.isConnected();
}
export function isConnecting() {
return !!wrapper?.isConnecting();
}
export function icon() {
return !!wrapper && (wrapper.icon || pxt.appTarget.appTheme.downloadDialogTheme?.deviceIcon || "usb");
}
export function unsupportedParts() {
return wrapper?.unsupportedParts ? wrapper.unsupportedParts() : [];
}
export function deviceVariant() {
return wrapper?.devVariant;
}
let disconnectPromise: Promise<void>
export function disconnectAsync(): Promise<void> {
if (disconnectPromise)
return disconnectPromise;
let p = Promise.resolve();
if (wrapper) {
debug('packetio: disconnect')
const w = wrapper;
p = p.then(() => w.disconnectAsync())
.then(() => w.io.disposeAsync())
.catch(e => {
// swallow execeptions
pxt.reportException(e);
})
.finally(() => {
initPromise = undefined; // dubious
wrapper = undefined;
disconnectPromise = undefined;
});
if (onConnectionChangedHandler)
p = p.then(() => onConnectionChangedHandler());
disconnectPromise = p;
}
return p;
}
export function configureEvents(
onConnectionChanged: () => void,
onSerial: (buf: Uint8Array, isStderr: boolean) => void,
onCustomEvent: (type: string, buf: Uint8Array) => void
): void {
onConnectionChangedHandler = onConnectionChanged;
onSerialHandler = onSerial;
onCustomEventHandler = onCustomEvent;
if (wrapper) {
wrapper.io.onConnectionChanged = onConnectionChangedHandler;
wrapper.onSerial = onSerialHandler;
wrapper.onCustomEvent = onCustomEvent;
}
}
export function sendCustomEventAsync(type: string, payload: Uint8Array) {
if (wrapper)
return wrapper.sendCustomEventAsync(type, payload)
else
return Promise.resolve()
}
function wrapperAsync(): Promise<PacketIOWrapper> {
if (wrapper)
return Promise.resolve(wrapper);
if (!mkPacketIOAsync) {
pxt.debug(`packetio: not defined, skipping`)
return Promise.resolve(undefined);
}
pxt.debug(`packetio: new wrapper`)
return mkPacketIOAsync()
.then(io => {
io.onConnectionChanged = onConnectionChangedHandler;
wrapper = mkPacketIOWrapper(io);
if (onSerialHandler)
wrapper.onSerial = onSerialHandler;
if (onCustomEventHandler)
wrapper.onCustomEvent = onCustomEventHandler;
// trigger ui update
if (onConnectionChangedHandler)
onConnectionChangedHandler();
return wrapper;
})
}
export function initAsync(force = false): Promise<PacketIOWrapper> {
pxt.debug(`packetio: init ${force ? "(force)" : ""}`)
if (!initPromise) {
let p = Promise.resolve();
if (force)
p = p.then(() => disconnectAsync());
initPromise = p.then(() => wrapperAsync())
.finally(() => { initPromise = undefined })
}
return initPromise;
}
}
```
|
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="big5"> <!-- test breaks if the server overrides this -->
<title>Big5 encoding (form)</title>
<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-3000">
<meta name="variant" content="?3001-4000">
<meta name="variant" content="?4001-5000">
<meta name="variant" content="?5001-6000">
<meta name="variant" content="?6001-7000">
<meta name="variant" content="?7001-8000">
<meta name="variant" content="?8001-9000">
<meta name="variant" content="?9001-10000">
<meta name="variant" content="?10001-11000">
<meta name="variant" content="?11001-12000">
<meta name="variant" content="?12001-13000">
<meta name="variant" content="?13001-14000">
<meta name="variant" content="?14001-last">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/subset-tests.js"></script>
<script src="big5_index.js"></script>
<script src="big5-encoder.js"></script>
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="path_to_url#big5">
<meta name="assert" content="The browser produces the expected byte sequences for all characters in the big5 encoding after 0x9F when encoding bytes for a URL produced by a form, using the encoder steps in the specification.">
<style>
iframe { display:none }
form { display:none }
</style>
</head>
<body>
<div id="log"></div>
<script src="../../resources/ranges.js"></script>
<script>
var errors = false;
var encoder = big5Encoder;
var ranges = rangesAll;
var separator = ",";
function expect(result, codepoint) {
return "%" + result.replace(/ /g, "%");
}
</script>
<script src="../../resources/encode-form-common.js"></script>
</body>
</html>
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.