text
stringlengths 1
22.8M
|
|---|
```less
.page {
background-color: var(--weui-BG-2);
}
```
|
```smalltalk
//
// Unit tests for ARReferenceObject
//
// Authors:
// Vincent Dondain <vidondai@microsoft.com>
//
//
#if HAS_ARKIT
using System;
using ARKit;
using Foundation;
using ObjCRuntime;
using NUnit.Framework;
using Xamarin.Utils;
#if NET
using VectorFloat3 = global::CoreGraphics.NVector3;
using MatrixFloat4x4 = global::CoreGraphics.NMatrix4;
#else
using VectorFloat3 = global::OpenTK.NVector3;
using MatrixFloat4x4 = global::OpenTK.NMatrix4;
#endif
namespace MonoTouchFixtures.ARKit {
[TestFixture]
[Preserve (AllMembers = true)]
public class ARReferenceObjectTest {
[SetUp]
public void Setup ()
{
TestRuntime.AssertXcodeVersion (10, 0);
// The API here was introduced to Mac Catalyst later than for the other frameworks, so we have this additional check
TestRuntime.AssertSystemVersion (ApplePlatform.MacCatalyst, 14, 0, throwIfOtherPlatform: false);
}
[Test]
public void MarshallingTest ()
{
TestRuntime.AssertNotSimulator (); // The Objective-C constructor is just stubbed out to return NULL in the simulator, so this test only works on device.
var model3 = new ARReferenceObject (NSUrl.FromFilename ("Model3.arobject"), out NSError error);
Assert.IsNull (error, "Error");
Assert.AreEqual ("Model3", model3.Name, "Name");
Assert.NotNull (model3.Center, "Center");
Assert.NotNull (model3.Extent, "Extent");
Assert.NotNull (model3.Scale, "Scale");
Assert.NotNull (model3.ApplyTransform (MatrixFloat4x4.Identity), "ApplyTransform");
}
}
}
#endif // HAS_ARKIT
```
|
```java
/**
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package io.pravega.common.security;
import io.pravega.test.common.JwtBody;
import org.junit.Test;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
public class JwtUtilsTest {
@Test
public void testExtractExpirationTimeReturnsNullIfExpInBodyIsNotSet() {
// See decoded parts at path_to_url
//
// The body decodes to:
// {
// "sub": "1234567890",
// "aud": "segmentstore",
// "iat": 1516239022
// }
JwtBody jwtBody = JwtBody.builder().subject("1234567890").audience("segmentstore").issuedAtTime(1516239022L).build();
String token = String.format("%s.%s.%s", "base64-encoded-header",
Base64.getEncoder().encodeToString(jwtBody.toString().getBytes(StandardCharsets.US_ASCII)),
"base64-encoded-signature");
assertNull(JwtUtils.extractExpirationTime(token));
}
@Test
public void testExtractExpirationTimeReturnsNullIfTokenIsNotInJwtFormat() {
assertNull(JwtUtils.extractExpirationTime("abc"));
assertNull(JwtUtils.extractExpirationTime("abc.def"));
assertNull(JwtUtils.extractExpirationTime("abc.def.ghi.jkl"));
}
// Refresh behavior when expiration time is not set
// public void testExpirationTimeIsNullIfExpInBodyIsNotSet
@Test
public void testExpirationTimeIsNotNullIfExpInBodyIsSet() {
// See decoded parts at path_to_url
//
// The body decodes to:
// {
// "sub": "jdoe",
// "aud": "segmentstore",
// "iat": 1569324678,
// "exp": 1569324683
// }
String token = String.format("%s.%s.%s",
"eyJhbGciOiJIUzUxMiJ9", // header
your_sha256_hashNjc4LCJleHAiOjE1NjkzMjQ2ODN9", // body
your_sha256_hashrPnX45l8QAG4DoShSMdw"); // signature
assertNotNull(JwtUtils.extractExpirationTime(token));
}
@Test
public void testExpirationTimeIsNullIfJwtDoesNotHaveThreeParts() {
assertNull(JwtUtils.extractExpirationTime("A.B"));
assertNull(JwtUtils.extractExpirationTime("A"));
assertNull(JwtUtils.extractExpirationTime("A.B.C.D"));
}
@Test
public void testReturnsNullExpirationTimeForNullToken() {
assertNull(JwtUtils.extractExpirationTime(null));
}
@Test
public void testParseExpirationTimeExtractsExpiryTime() {
// Contains a space before each field value
String json1 = "{\"sub\": \"subject\",\"aud\": \"segmentstore\",\"iat\": 1569837384,\"exp\": 1569837434}";
assertEquals(1569837434, JwtUtils.parseExpirationTime(json1).longValue());
// Does not contain space before field values
String json2 = "{\"sub\":\"subject\",\"aud\":\"segmentstore\",\"iat\":1569837384,\"exp\":1569837434}";
assertEquals(1569837434, JwtUtils.parseExpirationTime(json2).longValue());
}
@Test
public void testParseExpirationTimeReturnsNullWhenExpiryIsNotSet() {
// Does not contain expiry time
String json = "{\"sub\":\"subject\",\"aud\":\"segmentstore\",\"iat\":1569837384}";
assertNull(JwtUtils.parseExpirationTime(json));
}
@Test
public void testParseExpirationTimeReturnsNullWhenExpiryIsIllegal() {
String json = "{\"sub\": \"subject\",\"aud\": \"segmentstore\",\"iat\": 1569837384,\"exp\": \"non-numeric\"}";
assertNull(JwtUtils.parseExpirationTime(json));
}
@Test
public void testParseExpirationTimeReturnsNullWhenTokenIsNullOrEmpty() {
assertNull(JwtUtils.parseExpirationTime(null));
assertNull(JwtUtils.parseExpirationTime(""));
}
@Test
public void testParseExpirationTimeReturnsNullWhenTokenIsNotInteger() {
// Notice that the exp field value contains non-digits/alphabets
String jwtBody = "{\"sub\":\"subject\",\"aud\":\"segmentstore\",\"iat\":1569837384,\"exp\":\"abc\"}";
assertNull(JwtUtils.parseExpirationTime(jwtBody));
}
}
```
|
Javadabad (, also Romanized as Javādābād; also known as Jām Qolī and Z̧afarābād) is a village in Itivand-e Jonubi Rural District, Kakavand District, Delfan County, Lorestan Province, Iran. At the 2006 census, its population was 83, in 17 families.
References
Populated places in Delfan County
|
"The Boxer" is a song recorded by English electronic music duo the Chemical Brothers for their fifth studio album Push the Button (2005). It served as the album's third single in the United Kingdom and Europe, released by Virgin Records and Freestyle Dust, and as the second single in the United States via Astralwerks. The song is a psychedelic pop track which features The Charlatans' lead singer Tim Burgess on vocals and as a co-writer. This is the second collaboration between Burgess and the duo, following "Life is Sweet", which was released 10 years earlier.
However, it received mixed reviews from music critics who, while praising its production, criticised Burgess' vocals. "The Boxer" was the first single by the Chemical Brothers not to reach the top 40 on the UK Singles Chart, reaching only number 41. Elsewhere, it charted in Spain, Ireland and on the US Dance Singles Sales chart. Burgess and the duo later performed the track at the BBC Radio 2 Electric Proms in 2007.
The song's music video was directed by director duo Ne-o and shot in Budapest, Hungary. The visual, which features a basketball bouncing around the streets with its owner running to catch it, drew comparisons with the 1956 short film The Red Balloon. A video for an alternate version of the song was directed by Adam Smith and donated to the charity group Good for Nothing's 50/50 Make or Break campaign in 2011. It was also remixed by DFA, whose version received much acclaim from critics.
Background and production
When the Chemical Brothers started to write music again after finishing the album Come with Us (2002), "The Boxer" was one of the earliest tracks they composed for their next album, Push the Button (2005). The Charlatans lead singer Tim Burgess, who had collaborated on the duo's debut album track "Life Is Sweet" 10 years earlier, contributed the song's vocals. According to the group, of all their collaborators, Burgess remained a close friend. They shared that, "If he's in London, we would probably have a drink together, three of us, or, you know, when we're in Los Angeles, he will come to our gig."
Originally, the song's chorus was "set in stone," but the Chemical Brothers asked Burgess to sing it and write some additional lyrics. They also wanted him to sing the vocals at the end of the track—lyrics like "I'm a hustler, I'm a tiger"—in the same vocal style he used earlier in his career, which Burgess himself described as "weedy and soft". The duo said that the resulting vocal sounds very different from the one on their previous collaboration. The Guardians Alexis Petridis described it as having a "standard-issue mid-Atlannick accent".
Astralwerks released a statement describing the song as a combination of the duo's signature psychedelic pop sound and "modern stabs". Its production was built on a "ramshackle", slightly off-tempo piano sample set above a looping mid-tempo rhythm. PopMatters Tim O'Neil described it as "syncopated" and "slightly light-headed". He also noted the duo's different style on the track compared with their previous records. Scott Plagenhoef of Pitchfork Media commented that the song along with "Galvanize" reminded him of the duo's "early B-Boy/techno days".
Release
On 11 July 2005, the song was released as two CD singles and a 12-inch single in the United Kingdom as Push the Buttons third single. The British and European CD1 features an edited version of the track and a previously unreleased song "Swiper". A Europe-only maxi single contained the original "The Boxer", the DFA version, and a live rendition of "Believe" at the Mediolanum Forum. The second UK CD single contains the same tracklist and an additional music video for its title track while the 12-inch single containing the original, the DFA version and "Swiper".
A day later, the CD and the 12-inch single were released in the United States as the album's second single; both were expanded to EPs featuring an extended version of the song, two previous Europe and UK only-released B-sides "Giant" and "Spring", with remixes from DFA, Mathew Jonson, Erol Alkan and Abe Duque. This EP, with the inclusion of the track "Swiper", was also available for digital download exclusively in the US. Outside the US, a radio edit of "The Boxer" and its edited DFA version were released digitally as individual singles. On 25 October 2007, Burgess and the duo performed the song live at the BBC Radio 2 Electric Proms at The Roundhouse in Camden, London.
DFA version
The DFA version, mixed by British DJ Tim Goldsworthy and LCD Soundsystems member, American musician James Murphy, was later added to their remix album The DFA Remixes: Chapter One (2006). This remix received much praise from critics, with Billboards Kerri Mason singling it out as "the soundtrack to a 20-something hipster walking the downtown streets, iPod in pocket" that also "sounds like a Paradise Garage-era Peter Brown record". Tim Finney from Pitchfork highly praised the "Pearsonesque remix" as the "synth-laden Balearic house number that shimmers with unabashed gorgeousness". Along with another lengthy song on the album, the remix for Hot Chips "(Just Like We) Breakdown", both were said in a review by Zeth Lundy of PopMatters to "unfold with a delicate subtext manufactured by the slow-building minimalism—they're patient dedications to the mutability of the groove, never boring and always fascinating to experience". musicOMHs Tom Woods said that "a wealth of percussive techniques" keeps things "fresh and interesting", but criticised its length which made the song become a "stretch". He added that, "vocal use is less dominant here, which gives Murphy a chance to demonstrate a clear talent for sculpting dynamic synth-led beats".
Reception
Critical reception
In a review for PopMatters, music critic Tim O'Neil called the song "an odd track" that sounded like nothing he'd heard before. He continued: "I wouldn't be surprised if it was the next single [after "Galvanize"], because its [sic] not the kind of track you forget." John Bush of AllMusic listed the track as one of his albums track picks, while Michaelangelo Matos of Spin called it one of the album's best moments—one that was "less about the successive climaxes than steady-state flow". Jack Smith of BBC Music described the song as "cutting edge" and "hook-laden", also highlighted it as "a welcome return" for Burgess.
However, The Guardians review by Alexis Petridis was very negative. He criticised Burgess' vocal styling as "the Awful Falsetto", saying that "not even a mass of special effects can stop Burgess' shortcomings shining through", and calling the track one of the album's new ideas that "flop[ped]". Similarly, Matt D'Cruz of Drowned in Sound also criticised Burgess' "strained" vocal, calling it "a poor fit for the Chems' stuttering rave pianos and ponderous beats". Scott Plagenhoef of Pitchfork Media remarked on the "unremarkable verses and nasally vocals", although the song, along with "Galvanize", reminded him of the duo's "early B-Boy/techno days". He felt both songs were missing the ferocity and sub-bass rattlings of their "earlier cousins". The latter song was also said by Plagenhoef to be "far better". Another negative review came from Slant Magazine, where journalist Eric Henderson called the track one of the album's "unsuccessful interpolations of UK grime".
Chart performance
In the United Kingdom, the duo's home country, the song entered the UK Singles Chart at its peak, number 41, in the week ending 23 July 2005. It was their first single not to chart in the top 40. It dropped to number 65 in its second week and moved to number 90 for a week before disappearing from the chart. "The Boxer" made its debut at number 36 on the Irish Singles Chart in the week ending of 14 July before dropping to number 44 in its final week. It had a one-week stay on the Spanish Albums Chart at number 17 in the week of 31 July, and at number 15 on Billboards US Hot Dance Singles Sales chart in the 30 July issue.
Music video
London-based director duo Ne-o, Jake Knight and Ryoko Tanaka, directed the music video for "The Boxer". They were on holiday in Hong Kong and were sent a track with DRM which Knight said made it frustrating to play through dial-up connection. Tanaka eventually came up with the idea of a ball that "connected through things". Knight did not quite understand the idea at first, but through a process of miscommunication, they wrote the video's treatment about "a crazy basketball" which was the quickest treatment they had ever written at the time.
The video was then filmed in Budapest, Hungary, over several days. Knight said: "The reason for the location stems from the music in the actual video. The ball needs to bounce synchronized with the 16th or 8th beat in the track. To do that, we needed a space with equidistant or closed surfaces to bounce around. A roof low to the floor but with uprights. Obviously parking lots are ideal. But it was a technical reason that made us go with it." Ne-o used an Arri Super 16mm film camera to shoot the film, then edited it in Adobe Premiere Pro, with 3D animation using Autodesk Softimage.
Writing in his book Reinventing Music Video: Next-generation Directors, Their Inspiration, and Work, British author-director Matt Hanson claimed some might call the video the duo's first action sequence and stated it could be considered "a high-octane version" of Albert Lamorisses short film The Red Balloon. He wrote: "While [the short] was a poetic 1956 study of a boy befriended by a balloon, here the action is reversed and revved up, with the basketball defiantly trying to bounce away from the city street kid."
The video opens with a boy with a basketball in his bag walking out of a car park. The basketball then begins to bounce out of the bag, jumps out of the city streets and gets into a Lada taxi. After that, it continues to bounce and causes troubles in an office. Its owner struggles to chase the ball but then manages to catch it for a second. Unfortunately, the ball escapes and is run over by a truck driven by the Chemical Brothers. The basketball re-inflates after the accident, jumps into and eventually gets trapped inside an old phone booth near Baross Street, swells to an enormous size, and explodes.
Later in 2011, the Chemical Brothers and director Adam Smith (credited as Flat Nose George) donated the visual of an alternate version of the song entitled "50/50 Mix", in support of the 50/50 Make or Break campaign. 50/50 Make or Break was a fundraising project aimed at raising money for East Africa, created by UK-based charity group Good for Nothing.
Formats and track listings
European and UK CD single No. 1
"The Boxer" – 3:43
"Swiper" – 6:12
European maxi CD single No. 2
"The Boxer" – 4:22
"The Boxer" – 9:38
"Believe" – 4:21
UK maxi-enhanced CD single No. 2
"The Boxer" – 4:22
"The Boxer" – 9:38
"Believe" – 4:21
"The Boxer" – 3:23
US CD and digital download EP
"The Boxer" – 4:21
"The Boxer" – 9:44
"Giant" – 4:33
"Spring" – 5:29
"Believe" – 9:27
"Believe" – 6:27
"Galvanize" – 7:36
"Swiper" – 6:21
UK 12-inch single
"The Boxer" – 4:21
"Swiper" – 6:21
"The Boxer" – 9:44
US double 12-inch
"The Boxer" – 9:44
"Giant" – 4:33
"Believe" – 6:27
"Spring" – 5:29
"Believe" – 9:27
"Galvanize" – 7:36
"The Boxer" – 4:21
Non-US radio edit digital download
"The Boxer" – 3:42
Non-US remix digital download
"The Boxer" – 6:50
Credits and personnel
Credits adapted from the CD single liner notes.
The Chemical Brothers – music producer, songwriter
Steve Dub – engineer
Mike Marsh – master
Tim Burgess – vocals, songwriter
Tappin Gofton – designer, art director
Kam Tang – illustrator
Charts
References
External links
2005 singles
The Chemical Brothers songs
2004 songs
Astralwerks singles
Virgin Records singles
Songs written by Tom Rowlands
Songs written by Ed Simons
Psychedelic pop songs
|
Adrián Guillermo Sánchez (born 14 May 1999) is an Argentine footballer playing as a midfielder for Curicó Unido, on loan from Boca Juniors.
Career statistics
Club
Notes
References
1999 births
Living people
Argentine men's footballers
Men's association football midfielders
Uruguayan Primera División players
Boca Juniors footballers
Cerro Largo F.C. players
Footballers from Buenos Aires Province
|
```c++
#include <Databases/DDLDependencyVisitor.h>
#include <Dictionaries/getDictionaryConfigurationFromAST.h>
#include <Databases/removeWhereConditionPlaceholder.h>
#include <Interpreters/Cluster.h>
#include <Interpreters/Context.h>
#include <Interpreters/misc.h>
#include <Interpreters/InDepthNodeVisitor.h>
#include <Interpreters/evaluateConstantExpression.h>
#include <Interpreters/getClusterName.h>
#include <Parsers/ASTCreateQuery.h>
#include <Parsers/ASTFunction.h>
#include <Parsers/ASTIdentifier.h>
#include <Parsers/ASTLiteral.h>
#include <Parsers/ASTSelectWithUnionQuery.h>
#include <Parsers/ASTTablesInSelectQuery.h>
#include <Parsers/ParserSelectWithUnionQuery.h>
#include <Parsers/parseQuery.h>
#include <Common/KnownObjectNames.h>
#include <Core/Settings.h>
#include <Poco/String.h>
namespace DB
{
namespace
{
/// Data for DDLDependencyVisitor.
/// Used to visits ASTCreateQuery and extracts the names of all tables explicitly referenced in the create query.
class DDLDependencyVisitorData
{
friend void tryVisitNestedSelect(const String & query, DDLDependencyVisitorData & data);
public:
DDLDependencyVisitorData(const ContextPtr & global_context_, const QualifiedTableName & table_name_, const ASTPtr & ast_, const String & current_database_)
: create_query(ast_), table_name(table_name_), default_database(global_context_->getCurrentDatabase()), current_database(current_database_), global_context(global_context_)
{
}
/// Acquire the result of visiting the create query.
TableNamesSet getDependencies() &&
{
dependencies.erase(table_name);
return std::move(dependencies);
}
bool needChildVisit(const ASTPtr & child) const { return !skip_asts.contains(child.get()); }
void visit(const ASTPtr & ast)
{
if (auto * create = ast->as<ASTCreateQuery>())
{
visitCreateQuery(*create);
}
else if (auto * dictionary = ast->as<ASTDictionary>())
{
visitDictionaryDef(*dictionary);
}
else if (auto * expr = ast->as<ASTTableExpression>())
{
visitTableExpression(*expr);
}
else if (const auto * function = ast->as<ASTFunction>())
{
if (function->kind == ASTFunction::Kind::TABLE_ENGINE)
visitTableEngine(*function);
else
visitFunction(*function);
}
}
private:
ASTPtr create_query;
std::unordered_set<const IAST *> skip_asts;
QualifiedTableName table_name;
String default_database;
String current_database;
ContextPtr global_context;
TableNamesSet dependencies;
/// CREATE TABLE or CREATE DICTIONARY or CREATE VIEW or CREATE TEMPORARY TABLE or CREATE DATABASE query.
void visitCreateQuery(const ASTCreateQuery & create)
{
if (create.targets)
{
for (const auto & target : create.targets->targets)
{
const auto & table_id = target.table_id;
if (!table_id.table_name.empty())
{
/// TO target_table (for materialized views)
QualifiedTableName target_name{table_id.database_name, table_id.table_name};
if (target_name.database.empty())
target_name.database = current_database;
dependencies.emplace(target_name);
}
}
}
QualifiedTableName as_table{create.as_database, create.as_table};
if (!as_table.table.empty())
{
/// AS table_name
if (as_table.database.empty())
as_table.database = current_database;
dependencies.emplace(as_table);
}
/// Visit nested select query only for views, for other cases it's not
/// an actual dependency as it will be executed only once to fill the table.
if (create.select && !create.isView())
skip_asts.insert(create.select);
}
/// The definition of a dictionary: SOURCE(CLICKHOUSE(...)) LAYOUT(...) LIFETIME(...)
void visitDictionaryDef(const ASTDictionary & dictionary)
{
if (!dictionary.source || dictionary.source->name != "clickhouse" || !dictionary.source->elements)
return;
auto config = getDictionaryConfigurationFromAST(create_query->as<ASTCreateQuery &>(), global_context);
auto info = getInfoIfClickHouseDictionarySource(config, global_context);
/// We consider only dependencies on local tables.
if (!info || !info->is_local)
return;
if (!info->table_name.table.empty())
{
/// If database is not specified in dictionary source, use database of the dictionary itself, not the current/default database.
if (info->table_name.database.empty())
info->table_name.database = table_name.database;
dependencies.emplace(std::move(info->table_name));
}
else
{
/// We don't have a table name, we have a select query instead.
/// All tables from select query in dictionary definition won't
/// use current database, as this query is executed with global context.
/// Use default database from global context while visiting select query.
String current_database_ = current_database;
current_database = default_database;
tryVisitNestedSelect(info->query, *this);
current_database = current_database_;
}
}
/// ASTTableExpression represents a reference to a table in SELECT query.
/// DDLDependencyVisitor should handle ASTTableExpression because some CREATE queries can contain SELECT queries after AS
/// (for example, CREATE VIEW).
void visitTableExpression(const ASTTableExpression & expr)
{
if (!expr.database_and_table_name)
return;
const ASTIdentifier * identifier = dynamic_cast<const ASTIdentifier *>(expr.database_and_table_name.get());
if (!identifier)
return;
auto table_identifier = identifier->createTable();
if (!table_identifier)
return;
QualifiedTableName qualified_name{table_identifier->getDatabaseName(), table_identifier->shortName()};
if (qualified_name.table.empty())
return;
if (qualified_name.database.empty())
{
/// It can be table/dictionary from default database or XML dictionary, but we cannot distinguish it here.
qualified_name.database = current_database;
}
dependencies.emplace(qualified_name);
}
/// Finds dependencies of a table engine.
void visitTableEngine(const ASTFunction & table_engine)
{
/// Dictionary(db_name.dictionary_name)
if (table_engine.name == "Dictionary")
addQualifiedNameFromArgument(table_engine, 0);
/// Buffer('db_name', 'dest_table_name')
if (table_engine.name == "Buffer")
addDatabaseAndTableNameFromArguments(table_engine, 0, 1);
/// Distributed(cluster_name, db_name, table_name, ...)
if (table_engine.name == "Distributed")
visitDistributedTableEngine(table_engine);
}
/// Distributed(cluster_name, database_name, table_name, ...)
void visitDistributedTableEngine(const ASTFunction & table_engine)
{
/// We consider only dependencies on local tables.
bool has_local_replicas = false;
if (auto cluster_name = tryGetClusterNameFromArgument(table_engine, 0))
{
auto cluster = global_context->tryGetCluster(*cluster_name);
if (cluster && cluster->getLocalShardCount())
has_local_replicas = true;
}
if (has_local_replicas)
addDatabaseAndTableNameFromArguments(table_engine, 1, 2);
}
/// Finds dependencies of a function.
void visitFunction(const ASTFunction & function)
{
if (functionIsJoinGet(function.name) || functionIsDictGet(function.name))
{
/// dictGet('dict_name', attr_names, id_expr)
/// dictHas('dict_name', id_expr)
/// joinGet(join_storage_table_name, `value_column`, join_keys)
addQualifiedNameFromArgument(function, 0);
}
else if (functionIsInOrGlobalInOperator(function.name))
{
/// x IN table_name.
/// We set evaluate=false here because we don't want to evaluate a subquery in "x IN subquery".
addQualifiedNameFromArgument(function, 1, /* evaluate= */ false);
}
else if (function.name == "dictionary")
{
/// dictionary(dict_name)
addQualifiedNameFromArgument(function, 0);
}
else if (function.name == "remote" || function.name == "remoteSecure")
{
visitRemoteFunction(function, /* is_cluster_function= */ false);
}
else if (function.name == "cluster" || function.name == "clusterAllReplicas")
{
visitRemoteFunction(function, /* is_cluster_function= */ true);
}
}
/// remote('addresses_expr', db_name.table_name, ...)
/// remote('addresses_expr', 'db_name', 'table_name', ...)
/// remote('addresses_expr', table_function(), ...)
/// cluster('cluster_name', db_name.table_name, ...)
/// cluster('cluster_name', 'db_name', 'table_name', ...)
/// cluster('cluster_name', table_function(), ...)
void visitRemoteFunction(const ASTFunction & function, bool is_cluster_function)
{
/// We consider dependencies on local tables only.
bool has_local_replicas = false;
if (is_cluster_function)
{
if (auto cluster_name = tryGetClusterNameFromArgument(function, 0))
{
if (auto cluster = global_context->tryGetCluster(*cluster_name))
{
if (cluster->getLocalShardCount())
has_local_replicas = true;
}
}
}
else
{
/// remote() and remoteSecure() are not fully supported. To properly support them we would need to check the first
/// argument to decide whether the host & port pattern specified in the first argument contains the local host or not
/// which is not trivial. For now we just always assume that the host & port pattern doesn't contain the local host.
}
if (!function.arguments)
return;
ASTs & args = function.arguments->children;
if (args.size() < 2)
return;
const ASTFunction * table_function = nullptr;
if (const auto * second_arg_as_function = args[1]->as<ASTFunction>();
second_arg_as_function && KnownTableFunctionNames::instance().exists(second_arg_as_function->name))
{
table_function = second_arg_as_function;
}
if (has_local_replicas && !table_function)
{
/// We set `apply_current_database=false` here because if this argument is an identifier without dot,
/// then it's not the name of a table within the current database, it's the name of a database, and
/// the name of a table will be in the following argument.
auto maybe_qualified_name = tryGetQualifiedNameFromArgument(function, 1, /* evaluate= */ true, /* apply_current_database= */ false);
if (!maybe_qualified_name)
return;
auto & qualified_name = *maybe_qualified_name;
if (qualified_name.database.empty())
{
auto table = tryGetStringFromArgument(function, 2);
if (!table)
return;
qualified_name.database = std::move(qualified_name.table);
qualified_name.table = std::move(table).value();
}
dependencies.insert(qualified_name);
}
if (!has_local_replicas && table_function)
{
/// `table function` will be executed remotely, so we won't check it or its arguments for dependencies.
skip_asts.emplace(table_function);
}
}
/// Gets an argument as a string, evaluates constants if necessary.
std::optional<String> tryGetStringFromArgument(const ASTFunction & function, size_t arg_idx, bool evaluate = true) const
{
if (!function.arguments)
return {};
const ASTs & args = function.arguments->children;
if (arg_idx >= args.size())
return {};
const auto & arg = args[arg_idx];
if (evaluate)
{
try
{
/// We're just searching for dependencies here, it's not safe to execute subqueries now.
/// Use copy of the global_context and set current database, because expressions can contain currentDatabase() function.
ContextMutablePtr global_context_copy = Context::createCopy(global_context);
global_context_copy->setCurrentDatabase(current_database);
auto evaluated = evaluateConstantExpressionOrIdentifierAsLiteral(arg, global_context_copy);
const auto * literal = evaluated->as<ASTLiteral>();
if (!literal || (literal->value.getType() != Field::Types::String))
return {};
return literal->value.safeGet<String>();
}
catch (...)
{
return {};
}
}
else
{
if (const auto * id = arg->as<ASTIdentifier>())
return id->name();
if (const auto * literal = arg->as<ASTLiteral>())
{
if (literal->value.getType() == Field::Types::String)
return literal->value.safeGet<String>();
}
return {};
}
}
/// Gets an argument as a qualified table name.
/// Accepts forms db_name.table_name (as an identifier) and 'db_name.table_name' (as a string).
/// The function doesn't replace an empty database name with the current_database (the caller must do that).
std::optional<QualifiedTableName> tryGetQualifiedNameFromArgument(
const ASTFunction & function, size_t arg_idx, bool evaluate = true, bool apply_current_database = true) const
{
if (!function.arguments)
return {};
const ASTs & args = function.arguments->children;
if (arg_idx >= args.size())
return {};
const auto & arg = args[arg_idx];
QualifiedTableName qualified_name;
if (const auto * identifier = dynamic_cast<const ASTIdentifier *>(arg.get()))
{
/// ASTIdentifier or ASTTableIdentifier
auto table_identifier = identifier->createTable();
if (!table_identifier)
return {};
qualified_name.database = table_identifier->getDatabaseName();
qualified_name.table = table_identifier->shortName();
}
else
{
auto qualified_name_as_string = tryGetStringFromArgument(function, arg_idx, evaluate);
if (!qualified_name_as_string)
return {};
auto maybe_qualified_name = QualifiedTableName::tryParseFromString(*qualified_name_as_string);
if (!maybe_qualified_name)
return {};
qualified_name = std::move(maybe_qualified_name).value();
}
if (qualified_name.database.empty() && apply_current_database)
qualified_name.database = current_database;
return qualified_name;
}
/// Adds a qualified table name from an argument to the collection of dependencies.
/// Accepts forms db_name.table_name (as an identifier) and 'db_name.table_name' (as a string).
void addQualifiedNameFromArgument(const ASTFunction & function, size_t arg_idx, bool evaluate = true)
{
if (auto qualified_name = tryGetQualifiedNameFromArgument(function, arg_idx, evaluate))
dependencies.emplace(std::move(qualified_name).value());
}
/// Returns a database name and a table name extracted from two separate arguments.
std::optional<QualifiedTableName> tryGetDatabaseAndTableNameFromArguments(
const ASTFunction & function, size_t database_arg_idx, size_t table_arg_idx, bool apply_current_database = true) const
{
auto database = tryGetStringFromArgument(function, database_arg_idx);
if (!database)
return {};
auto table = tryGetStringFromArgument(function, table_arg_idx);
if (!table || table->empty())
return {};
QualifiedTableName qualified_name;
qualified_name.database = std::move(database).value();
qualified_name.table = std::move(table).value();
if (qualified_name.database.empty() && apply_current_database)
qualified_name.database = current_database;
return qualified_name;
}
/// Adds a database name and a table name from two separate arguments to the collection of dependencies.
void addDatabaseAndTableNameFromArguments(const ASTFunction & function, size_t database_arg_idx, size_t table_arg_idx)
{
if (auto qualified_name = tryGetDatabaseAndTableNameFromArguments(function, database_arg_idx, table_arg_idx))
dependencies.emplace(std::move(qualified_name).value());
}
std::optional<String> tryGetClusterNameFromArgument(const ASTFunction & function, size_t arg_idx) const
{
if (!function.arguments)
return {};
ASTs & args = function.arguments->children;
if (arg_idx >= args.size())
return {};
auto cluster_name = ::DB::tryGetClusterName(*args[arg_idx]);
if (cluster_name)
return cluster_name;
return tryGetStringFromArgument(function, arg_idx);
}
};
/// Visits ASTCreateQuery and extracts the names of all tables explicitly referenced in the create query.
class DDLDependencyVisitor
{
public:
using Data = DDLDependencyVisitorData;
using Visitor = ConstInDepthNodeVisitor<DDLDependencyVisitor, /* top_to_bottom= */ true, /* need_child_accept_data= */ true>;
static bool needChildVisit(const ASTPtr &, const ASTPtr & child, const Data & data) { return data.needChildVisit(child); }
static void visit(const ASTPtr & ast, Data & data) { data.visit(ast); }
};
void tryVisitNestedSelect(const String & query, DDLDependencyVisitorData & data)
{
try
{
ParserSelectWithUnionQuery parser;
String description = fmt::format("Query for ClickHouse dictionary {}", data.table_name);
String fixed_query = removeWhereConditionPlaceholder(query);
const Settings & settings = data.global_context->getSettingsRef();
ASTPtr select = parseQuery(parser, fixed_query, description,
settings.max_query_size, settings.max_parser_depth, settings.max_parser_backtracks);
DDLDependencyVisitor::Visitor visitor{data};
visitor.visit(select);
}
catch (...)
{
tryLogCurrentException("DDLDependencyVisitor");
}
}
}
TableNamesSet getDependenciesFromCreateQuery(const ContextPtr & global_global_context, const QualifiedTableName & table_name, const ASTPtr & ast, const String & current_database)
{
DDLDependencyVisitor::Data data{global_global_context, table_name, ast, current_database};
DDLDependencyVisitor::Visitor visitor{data};
visitor.visit(ast);
return std::move(data).getDependencies();
}
TableNamesSet getDependenciesFromDictionaryNestedSelectQuery(const ContextPtr & global_context, const QualifiedTableName & table_name, const ASTPtr & ast, const String & select_query, const String & current_database)
{
DDLDependencyVisitor::Data data{global_context, table_name, ast, current_database};
tryVisitNestedSelect(select_query, data);
return std::move(data).getDependencies();
}
}
```
|
```go
package netlink
// TCP States
const (
TCP_ESTABLISHED = iota + 0x01
TCP_SYN_SENT
TCP_SYN_RECV
TCP_FIN_WAIT1
TCP_FIN_WAIT2
TCP_TIME_WAIT
TCP_CLOSE
TCP_CLOSE_WAIT
TCP_LAST_ACK
TCP_LISTEN
TCP_CLOSING
TCP_NEW_SYN_REC
TCP_MAX_STATES
)
type TCPInfo struct {
State uint8
Ca_state uint8
Retransmits uint8
Probes uint8
Backoff uint8
Options uint8
Snd_wscale uint8 // no uint4
Rcv_wscale uint8
Delivery_rate_app_limited uint8
Fastopen_client_fail uint8
Rto uint32
Ato uint32
Snd_mss uint32
Rcv_mss uint32
Unacked uint32
Sacked uint32
Lost uint32
Retrans uint32
Fackets uint32
Last_data_sent uint32
Last_ack_sent uint32
Last_data_recv uint32
Last_ack_recv uint32
Pmtu uint32
Rcv_ssthresh uint32
Rtt uint32
Rttvar uint32
Snd_ssthresh uint32
Snd_cwnd uint32
Advmss uint32
Reordering uint32
Rcv_rtt uint32
Rcv_space uint32
Total_retrans uint32
Pacing_rate uint64
Max_pacing_rate uint64
Bytes_acked uint64 /* RFC4898 tcpEStatsAppHCThruOctetsAcked */
Bytes_received uint64 /* RFC4898 tcpEStatsAppHCThruOctetsReceived */
Segs_out uint32 /* RFC4898 tcpEStatsPerfSegsOut */
Segs_in uint32 /* RFC4898 tcpEStatsPerfSegsIn */
Notsent_bytes uint32
Min_rtt uint32
Data_segs_in uint32 /* RFC4898 tcpEStatsDataSegsIn */
Data_segs_out uint32 /* RFC4898 tcpEStatsDataSegsOut */
Delivery_rate uint64
Busy_time uint64 /* Time (usec) busy sending data */
Rwnd_limited uint64 /* Time (usec) limited by receive window */
Sndbuf_limited uint64 /* Time (usec) limited by send buffer */
Delivered uint32
Delivered_ce uint32
Bytes_sent uint64 /* RFC4898 tcpEStatsPerfHCDataOctetsOut */
Bytes_retrans uint64 /* RFC4898 tcpEStatsPerfOctetsRetrans */
Dsack_dups uint32 /* RFC4898 tcpEStatsStackDSACKDups */
Reord_seen uint32 /* reordering events seen */
Rcv_ooopack uint32 /* Out-of-order packets received */
Snd_wnd uint32 /* peer's advertised receive window after * scaling (bytes) */
}
type TCPBBRInfo struct {
BBRBW uint64
BBRMinRTT uint32
BBRPacingGain uint32
BBRCwndGain uint32
}
```
|
The Dr. B. R. Ambedkar Smriti Vanam or the Dr. B. R. Ambedkar Memorial Park is a monument under-construction dedicated to B. R. Ambedkar, the 20th century Indian polymath, champion of human rights and the father of the Indian Constitution. The memorial will be located Vijayawada in the Indian state of Andhra Pradesh. The height of the statue of Ambedkar will be . This Ambedkar statue will be installed on an 80 feet high base, which will make the total height of the statue 205 feet. Chief Minister YS Jagan Mohan Reddy will inaugurate the statue on the Constitution Day on 26 November 2023.
History
The Government of Andhra Pradesh decided that on the occasion of 125th birth anniversary of Ambedkar i.e. 14 April 2016, an Ambedkar Memorial would be set up which would be 125 feet high. In April 2016, Telangana's Chief Minister, K. Chandrasekhar Rao, has also decided to install a 125-feet tall statue of Ambedkar in Hyderabad city. The foundation stone of the memorial was laid by N. Chandrababu Naidu, the Chief Minister of Andhra Pradesh on the 126th birth anniversary of Ambedkar in 2017. The project was to be implemented in Inavolu village of Amaravati, the new capital of Andhra Pradesh. In this project, there was a plan to build a grand memorial of Dr. Babasaheb Ambedkar and his 125 feet tall statue. But even after four years of coming to power, he could not complete this work.
Later the government of Y. S. Jagan Mohan Reddy abandoned the "Dr. BR Ambedkar Smruti Vanam" project, and decided to build a new project in Vijayawada city. On July 9, 2020 Andhra Pradesh Chief Minister Y. S. Jagan Mohan Reddy laid the foundation stone of the 125 feet tall statue of Dr. Babasaheb Ambedkar at Swaraj Maidan in the heart of Vijayawada, Andhra Pradesh. The total cost on this project is Rs 268 crore.
Chief Minister Jagan Mohan Reddy renamed the ground known as 'PWD Maidan' as 'Dr. BR Ambedkar Swarajya Maidan. The statue was completed in August 2023, and will be unveiled on the Constitution Day on 26 November 2023.
Specifications
The project area is planned to be spread over a site. The memorial will cost ₹97.64 crores. This includes ₹25 crore for the 125-ft bronze statue of Ambedkar. The Memorial park will have a multi-purpose Convention Hall with a seating capacity of 3,000 persons. Dr. B. R. Ambedkar Memorial Library with his collected works and thoughts, a Buddhist Meditation Hall, Memorial Park with aesthetic and landscaped gardens and an open-air theatre with a seating capacity of 2,000 people with facilities for conducting multi-media shows are some of the other features of the memorial park. A reading room or library will be set up with 10,000 books in this memorial, which will be useful for those wishing to study and research on Ambedkar's ideas and principles. There will also be a theater, where the exhibits on Ambedkar will be displayed.
See also
List of things named after B. R. Ambedkar
List of tallest statues
Ambedkar Memorial Park
Dr. Ambedkar National Memorial
Statue of Equality
References
Proposed statues in India
Memorials to B. R. Ambedkar
Statues of B. R. Ambedkar
Monuments and memorials in Andhra Pradesh
Buildings and structures in Andhra Pradesh
Colossal statues in India
Museums in Andhra Pradesh
Buddhist sites in Andhra Pradesh
Buddhist buildings in India
Vijayawada
Dalit culture
Dalit monuments
Tourism in Andhra Pradesh
|
James Secord may refer to:
James A. Secord, American-born historian
James B. Secord, American-born merchant, soldier, and public servant
|
Sir Gerald Wills, (3 October 1905 – 31 October 1969) was a British barrister and politician who was Member of Parliament (MP) for Bridgwater from 1950 until his death.
Wills was born in Long Ashton, Somerset to a working family, and at 21 was adopted into a wealthy family living in Wiltshire who educated him privately. He went to Trinity College, Cambridge to study law and was called to the Bar by the Middle Temple in 1932. He was a member of the Territorial branch of the Royal Artillery and during the Second World War he was a Staff member at the Corps' headquarters. He was appointed MBE for his war service in the King's Birthday honours in June 1945.
At the end of the war Wills fought Bridgwater as a Conservative candidate, but could not gain the seat from Vernon Bartlett who had won it as an 'Independent Progressive' in a 1938 byelection. He returned to the Bar, but at the 1950 general election, Wills was successful.
He was appointed an Assistant Government Whip in 1952, and was promoted to be Lord Commissioner of the Treasury in October 1954. He retained this position under Anthony Eden. When Harold Macmillan became Prime Minister, he appointed Wills as Comptroller of Her Majesty's Household (third highest in the Whip's Office). Wills left office in October 1958, was Knighted to mark his service in the 1958 Birthday Honours List and
his death in 1969 caused a by-election.
References
External links
M. Stenton and S. Lees, "Who's Who of British MPs", Vol. IV (Harvester Press, 1981)
1905 births
1969 deaths
Alumni of Trinity College, Cambridge
Conservative Party (UK) MPs for English constituencies
Knights Bachelor
Members of the Order of the British Empire
Ministers in the Eden government, 1955–1957
Ministers in the Macmillan and Douglas-Home governments, 1957–1964
Ministers in the third Churchill government, 1951–1955
Royal Artillery officers
UK MPs 1950–1951
UK MPs 1951–1955
UK MPs 1955–1959
UK MPs 1959–1964
UK MPs 1964–1966
UK MPs 1966–1970
20th-century English lawyers
|
```c++
//
// immer: immutable data structures for C++
//
// See accompanying file LICENSE or copy at path_to_url
//
#include <immer/vector.hpp>
#include <immer/vector_transient.hpp>
template <typename T>
using test_vector_t = immer::vector<T, immer::default_memory_policy, 3u, 0u>;
template <typename T>
using test_vector_transient_t = typename test_vector_t<T>::transient_type;
#define VECTOR_T test_vector_t
#define VECTOR_TRANSIENT_T test_vector_transient_t
#include "generic.ipp"
```
|
Hang Tau Tsuen () is a village in the Ping Shan area of Yuen Long District, in Hong Kong. It is part of the Ping Shan Heritage Trail.
Administration
Hang Tau Tsuen is a recognized village under the New Territories Small House Policy.
History
Hang Tau Tsuen is one of the three wais (walled villages) and six tsuens (villages) established by the Tang Clan of Ping Shan, namely: Sheung Cheung Wai, Kiu Tau Wai, Fui Sha Wai, Hang Tau Tsuen, Hang Mei Tsuen, Tong Fong Tsuen, San Tsuen, Hung Uk Tsuen and San Hei Tsuen.
At the time of the 1911 census, the population of Hang Tau was 394. The number of males was 171.
References
External links
Delineation of area of existing village Hang Tau Tsuen (Ping Shan) for election of resident representative (2019 to 2022)
Antiquities and Monuments Office. Hong Kong Traditional Chinese Architectural Information System. Hang Tau Tsuen
Antiquities Advisory Board. Historic Building Appraisal. Yeung Hau Temple, Sheung Cheung Wai, Ping Shan Pictures
Antiquities and Monuments Office. Yan Tun Kong Study Hall
Antiquities Advisory Board. Historic Building Appraisal. Nos. 89 and 124 Hang Tau Tsuen, Ping Shan Pictures
Antiquities Advisory Board. Historic Building Appraisal. No. 99 Hang Tau Tsuen, Ping Shan Pictures
Antiquities Advisory Board. Historic Building Appraisal. No. 55 Hang Tau Tsuen, Ping Shan Pictures
Antiquities Advisory Board. Historic Building Appraisal. Ng Kwai Tong, No. 1 Hang Tau Tsuen, Ping Shan Pictures
Villages in Yuen Long District, Hong Kong
Ping Shan
|
```yaml
description: This playbook tracks the user responses and resends the emails to recipients who have not responded
id: xsoar-data-collection-response-tracking
inputs:
- description: 'Data collection Job uuid '
key: Jobuuid
playbookInputQuery:
required: false
value: {}
- description: The file id of the attachment to send to the recipient
key: FileAttachments
playbookInputQuery:
required: false
value: {}
- description: Mail Subject
key: EmailSubject
playbookInputQuery:
required: false
value: {}
- description: The amount of time between two scheduled commands that poll the response
key: PollingTimebetweenRuns
playbookInputQuery:
required: false
value: {}
name: xsoar-data-collection-response-tracking
outputs:
- contextPath: WSActionStatus(val.job_uuid==obj.job_uuid)
description: "Merges the output to the main playbook"
starttaskid: "0"
tasks:
"0":
id: "0"
ignoreworker: false
isautoswitchedtoquietmode: false
isoversize: false
nexttasks:
'#none#':
- "7"
note: false
quietmode: 0
separatecontext: false
skipunavailable: false
task:
brand: ""
id: 78f010aa-291b-4af4-8db9-46ba1c20e744
iscommand: false
name: ""
version: -1
description: ''
taskid: 78f010aa-291b-4af4-8db9-46ba1c20e744
timertriggers: []
type: start
view: |-
{
"position": {
"x": 50,
"y": 60
}
}
"3":
id: "3"
ignoreworker: false
isautoswitchedtoquietmode: false
isoversize: false
note: false
quietmode: 0
separatecontext: false
skipunavailable: false
task:
brand: ""
id: 2b7d1e64-264a-4e0b-8338-7544f6d22b1f
iscommand: false
name: End
type: title
version: -1
description: ''
taskid: 2b7d1e64-264a-4e0b-8338-7544f6d22b1f
timertriggers: []
type: title
view: |-
{
"position": {
"x": 50,
"y": 915
}
}
"6":
id: "6"
ignoreworker: false
isautoswitchedtoquietmode: false
isoversize: false
nexttasks:
'#none#':
- "3"
note: false
quietmode: 0
scriptarguments:
emailsendcounter:
complex:
accessor: emailsendcounter
root: incident
transformers:
- args:
by:
value:
simple: "1"
operator: addition
separatecontext: false
skipunavailable: false
task:
brand: Builtin
description: commands.local.cmd.set.incident
id: d67d1cc1-9bca-4022-8717-a7a7626565b2
iscommand: true
name: IncrementCounter
script: Builtin|||setIncident
type: regular
version: -1
taskid: d67d1cc1-9bca-4022-8717-a7a7626565b2
timertriggers: []
type: regular
view: |-
{
"position": {
"x": 50,
"y": 720
}
}
"7":
id: "7"
ignoreworker: false
isautoswitchedtoquietmode: false
isoversize: false
nexttasks:
'#none#':
- "10"
note: false
quietmode: 0
scriptarguments:
uuid:
simple: ${inputs.Jobuuid}
separatecontext: false
skipunavailable: false
task:
brand: ""
description: Gets the current status of an action that was setup; Used to track if the user responded to the action.
id: 26053a5f-0441-4305-822a-4b1237a5293c
iscommand: true
name: Get the status of the job
script: '|||xsoar-ws-get-action-status'
type: regular
version: -1
taskid: 26053a5f-0441-4305-822a-4b1237a5293c
timertriggers: []
type: regular
view: |-
{
"position": {
"x": 50,
"y": 190
}
}
"10":
id: "10"
ignoreworker: false
isautoswitchedtoquietmode: false
isoversize: false
nexttasks:
'#none#':
- "11"
note: false
quietmode: 0
scriptarguments:
attachIDs:
simple: ${inputs.FileAttachments}
emailsubject:
simple: test subject
uuid:
simple: ${inputs.Jobuuid}
separatecontext: false
skipunavailable: false
task:
brand: ""
description: To parse the context data after running xsoar-ws-get-action-status and resend emails to recipients who have not responded
id: a50d5167-5931-446a-8e24-8417a967d278
iscommand: false
name: Response Status parsing
scriptName: xsoar-ws-parse-context
type: regular
version: -1
taskid: a50d5167-5931-446a-8e24-8417a967d278
timertriggers: []
type: regular
view: |-
{
"position": {
"x": 50,
"y": 350
}
}
"11":
continueonerror: true
id: "11"
ignoreworker: false
isautoswitchedtoquietmode: false
isoversize: false
nexttasks:
'#none#':
- "6"
note: false
quietmode: 0
scriptarguments:
timebetweenruns:
simple: ${inputs.PollingTimebetweenRuns}
timeout:
simple: ${inputs.PollingTimeout}
uuid:
simple: ${inputs.Jobuuid}
separatecontext: false
skipunavailable: false
task:
brand: ""
description: |-
Companion automation to XSOAR-Web-Server that polls a certain UUID for user response.
The automation returns a scheduledcommand if the user has not responded to the action url
id: 84e2bf73-3b56-483a-88c3-0fc2a777ad5d
iscommand: false
name: Schedule Polling
scriptName: xsoar-ws-poll-status
tags:
- EmailTimeout
type: regular
version: -1
taskid: 84e2bf73-3b56-483a-88c3-0fc2a777ad5d
timertriggers:
- action: start
fieldname: emailusersla
type: regular
view: |-
{
"position": {
"x": 50,
"y": 530
}
}
version: -1
view: |-
{
"linkLabelsPosition": {},
"paper": {
"dimensions": {
"height": 920,
"width": 380,
"x": 50,
"y": 60
}
}
}
tests:
- No tests (auto formatted)
fromversion: 6.5.0
```
|
```php
<?php
declare(strict_types=1);
/**
*/
namespace OCP\WorkflowEngine;
/**
* Interface IFileCheck
*
* @since 18.0.0
*/
interface IEntityCheck {
/**
* Equips the check with a subject fitting the Entity. For instance, an
* entity of File will receive an instance of OCP\Files\Node, or a comment
* entity might get an IComment.
*
* The implementing check must be aware of the incoming type.
*
* If an unsupported subject is passed the implementation MAY throw an
* \UnexpectedValueException.
*
* @param IEntity $entity
* @param mixed $subject
* @throws \UnexpectedValueException
* @since 18.0.0
*/
public function setEntitySubject(IEntity $entity, $subject): void;
}
```
|
The United Vehicle Workers was a trade union representing drivers in the United Kingdom.
The union was founded in 1919 when the London and Provincial Union of Licensed Vehicle Workers merged with the Amalgamated Association of Tramway and Vehicle Workers. These were known as the "red" and "blue" unions, based on the colour of the unions' respective badges, and the supposed political inclinations of their members. It represented drivers of a wide range of vehicles, from buses and trams to cabs and horse-drawn carts. It also recruited related workers, such as conductors, cleaners and farriers. By 1921, the union had 115,897 members.
Within the union, members of its predecessors were reluctant to merge their branches, with the tram and bus drivers coming into particular conflict. Two branches of the union, dominated by bus drivers, broke away in 1921 to form the Trams, Omnibus, and Tube Workers union. Still, Ernest Bevin persuaded them to rejoin later in the year, shortly before the entire union became part of the new Transport and General Workers' Union.
General Secretaries
1919: Stanley Hirst
References
Trade unions established in 1919
Trade unions disestablished in 1922
Transport and General Workers' Union amalgamations
Trade unions based in London
|
```smalltalk
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Controls
{
internal sealed class ListViewSelectionColor : ContentPage
{
[Preserve(AllMembers = true)]
internal sealed class GroupHeaderTemplate : ViewCell
{
public GroupHeaderTemplate()
{
var label = new Label { BackgroundColor = Color.Red };
label.SetBinding(Label.TextProperty, "Key");
View = label;
}
}
[Preserve(AllMembers = true)]
internal sealed class GroupItemTemplate : ViewCell
{
public GroupItemTemplate()
{
var label = new Label { BackgroundColor = Color.Green };
label.SetBinding(Label.TextProperty, "Name");
View = label;
}
}
[Preserve(AllMembers = true)]
internal sealed class ItemTemplate : ViewCell
{
public ItemTemplate()
{
var label = new Label { BackgroundColor = Color.Green, HorizontalOptions = LayoutOptions.CenterAndExpand };
label.SetBinding(Label.TextProperty, "Name");
View = label;
}
}
[Preserve(AllMembers = true)]
internal sealed class ItemTemplate2 : ViewCell
{
public ItemTemplate2()
{
var label = new Label { BackgroundColor = Color.Green };
label.SetBinding(Label.TextProperty, "Name");
var container = new StackLayout() { HorizontalOptions = LayoutOptions.FillAndExpand };
container.Children.Add(label);
View = container;
}
}
[Preserve(AllMembers = true)]
internal sealed class Artist
{
public string Name { get; private set; }
public Artist(string name)
{
Name = name;
}
}
[Preserve(AllMembers = true)]
internal sealed class Grouping<K, T> : ObservableCollection<T>
{
public K Key { get; private set; }
public Grouping(K key, IEnumerable<T> values)
{
Key = key;
foreach (T value in values)
{
Items.Add(value);
}
}
}
Button _swapListButton;
Button _changeItemTemplateButton;
Button _clearButton;
[Preserve(AllMembers = true)]
public ListViewSelectionColor()
{
Title = "ListView ScrollTo";
var itemSource = new[] {
new { Name = "John Hassel" },
new { Name = "Brian Eno" },
new { Name = "Rober Fripp" },
new { Name = "Edgar Froese" }
};
var groupedItemSource = new List<Grouping<string, Artist>> {
new Grouping<string, Artist> ("Prog", new List<Artist> { new Artist ("King Crimson"), new Artist ("Yes"), new Artist ("Rush") }),
new Grouping<string, Artist> ("Techno", new List<Artist> { new Artist ("Juan Atkins"), new Artist ("Jeff Mills"), new Artist ("Gerald Donald") } ),
new Grouping<string, Artist> ("Pop", new List<Artist> { new Artist ("Japan"), new Artist ("Roxy Music"), new Artist ("Talking Heads") }),
};
var itemTemplate1 = new DataTemplate(typeof(ItemTemplate));
var itemTemplate2 = new DataTemplate(typeof(ItemTemplate2));
var normalList = new ListView
{
ItemTemplate = itemTemplate1,
ItemsSource = itemSource
};
var groupedList = new ListView
{
IsGroupingEnabled = true,
GroupHeaderTemplate = new DataTemplate(typeof(GroupHeaderTemplate)),
ItemTemplate = new DataTemplate(typeof(GroupItemTemplate)),
ItemsSource = groupedItemSource
};
var currentList = normalList;
_swapListButton = new Button
{
Text = "Swap List Type",
Command = new Command(() =>
{
if (currentList == normalList)
{
SetContent(groupedList);
currentList = groupedList;
}
else
{
SetContent(normalList);
currentList = normalList;
}
})
};
var currentTemplate = normalList.ItemTemplate;
_changeItemTemplateButton = new Button
{
Text = "Change Item template",
Command = new Command(() =>
{
if (currentTemplate == itemTemplate1)
{
normalList.ItemTemplate = itemTemplate2;
currentTemplate = itemTemplate2;
}
else
{
normalList.ItemTemplate = itemTemplate1;
currentTemplate = itemTemplate1;
}
})
};
_clearButton = new Button
{
Text = "Clear",
Command = new Command(() =>
{
currentList.SelectedItem = null;
})
};
Content = new StackLayout
{
Children = {
new StackLayout {
Orientation = StackOrientation.Horizontal,
Children = {
_swapListButton,
_changeItemTemplateButton,
_clearButton
}
},
normalList
}
};
}
void SetContent(ListView list)
{
Content = new StackLayout
{
Children = {
_swapListButton,
_changeItemTemplateButton,
_clearButton,
list
}
};
}
}
}
```
|
```go
// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build s390x,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
package unix
import "syscall"
const (
AAFS_MAGIC = 0x5a3c69f0
ADFS_SUPER_MAGIC = 0xadf5
AFFS_SUPER_MAGIC = 0xadff
AFS_FS_MAGIC = 0x6b414653
AFS_SUPER_MAGIC = 0x5346414f
AF_ALG = 0x26
AF_APPLETALK = 0x5
AF_ASH = 0x12
AF_ATMPVC = 0x8
AF_ATMSVC = 0x14
AF_AX25 = 0x3
AF_BLUETOOTH = 0x1f
AF_BRIDGE = 0x7
AF_CAIF = 0x25
AF_CAN = 0x1d
AF_DECnet = 0xc
AF_ECONET = 0x13
AF_FILE = 0x1
AF_IB = 0x1b
AF_IEEE802154 = 0x24
AF_INET = 0x2
AF_INET6 = 0xa
AF_IPX = 0x4
AF_IRDA = 0x17
AF_ISDN = 0x22
AF_IUCV = 0x20
AF_KCM = 0x29
AF_KEY = 0xf
AF_LLC = 0x1a
AF_LOCAL = 0x1
AF_MAX = 0x2c
AF_MPLS = 0x1c
AF_NETBEUI = 0xd
AF_NETLINK = 0x10
AF_NETROM = 0x6
AF_NFC = 0x27
AF_PACKET = 0x11
AF_PHONET = 0x23
AF_PPPOX = 0x18
AF_QIPCRTR = 0x2a
AF_RDS = 0x15
AF_ROSE = 0xb
AF_ROUTE = 0x10
AF_RXRPC = 0x21
AF_SECURITY = 0xe
AF_SMC = 0x2b
AF_SNA = 0x16
AF_TIPC = 0x1e
AF_UNIX = 0x1
AF_UNSPEC = 0x0
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
ALG_SET_AEAD_AUTHSIZE = 0x5
ALG_SET_IV = 0x2
ALG_SET_KEY = 0x1
ALG_SET_OP = 0x3
ANON_INODE_FS_MAGIC = 0x9041934
ARPHRD_6LOWPAN = 0x339
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
ARPHRD_ARCNET = 0x7
ARPHRD_ASH = 0x30d
ARPHRD_ATM = 0x13
ARPHRD_AX25 = 0x3
ARPHRD_BIF = 0x307
ARPHRD_CAIF = 0x336
ARPHRD_CAN = 0x118
ARPHRD_CHAOS = 0x5
ARPHRD_CISCO = 0x201
ARPHRD_CSLIP = 0x101
ARPHRD_CSLIP6 = 0x103
ARPHRD_DDCMP = 0x205
ARPHRD_DLCI = 0xf
ARPHRD_ECONET = 0x30e
ARPHRD_EETHER = 0x2
ARPHRD_ETHER = 0x1
ARPHRD_EUI64 = 0x1b
ARPHRD_FCAL = 0x311
ARPHRD_FCFABRIC = 0x313
ARPHRD_FCPL = 0x312
ARPHRD_FCPP = 0x310
ARPHRD_FDDI = 0x306
ARPHRD_FRAD = 0x302
ARPHRD_HDLC = 0x201
ARPHRD_HIPPI = 0x30c
ARPHRD_HWX25 = 0x110
ARPHRD_IEEE1394 = 0x18
ARPHRD_IEEE802 = 0x6
ARPHRD_IEEE80211 = 0x321
ARPHRD_IEEE80211_PRISM = 0x322
ARPHRD_IEEE80211_RADIOTAP = 0x323
ARPHRD_IEEE802154 = 0x324
ARPHRD_IEEE802154_MONITOR = 0x325
ARPHRD_IEEE802_TR = 0x320
ARPHRD_INFINIBAND = 0x20
ARPHRD_IP6GRE = 0x337
ARPHRD_IPDDP = 0x309
ARPHRD_IPGRE = 0x30a
ARPHRD_IRDA = 0x30f
ARPHRD_LAPB = 0x204
ARPHRD_LOCALTLK = 0x305
ARPHRD_LOOPBACK = 0x304
ARPHRD_METRICOM = 0x17
ARPHRD_NETLINK = 0x338
ARPHRD_NETROM = 0x0
ARPHRD_NONE = 0xfffe
ARPHRD_PHONET = 0x334
ARPHRD_PHONET_PIPE = 0x335
ARPHRD_PIMREG = 0x30b
ARPHRD_PPP = 0x200
ARPHRD_PRONET = 0x4
ARPHRD_RAWHDLC = 0x206
ARPHRD_RAWIP = 0x207
ARPHRD_ROSE = 0x10e
ARPHRD_RSRVD = 0x104
ARPHRD_SIT = 0x308
ARPHRD_SKIP = 0x303
ARPHRD_SLIP = 0x100
ARPHRD_SLIP6 = 0x102
ARPHRD_TUNNEL = 0x300
ARPHRD_TUNNEL6 = 0x301
ARPHRD_VOID = 0xffff
ARPHRD_VSOCKMON = 0x33a
ARPHRD_X25 = 0x10f
AUTOFS_SUPER_MAGIC = 0x187
B0 = 0x0
B1000000 = 0x1008
B110 = 0x3
B115200 = 0x1002
B1152000 = 0x1009
B1200 = 0x9
B134 = 0x4
B150 = 0x5
B1500000 = 0x100a
B1800 = 0xa
B19200 = 0xe
B200 = 0x6
B2000000 = 0x100b
B230400 = 0x1003
B2400 = 0xb
B2500000 = 0x100c
B300 = 0x7
B3000000 = 0x100d
B3500000 = 0x100e
B38400 = 0xf
B4000000 = 0x100f
B460800 = 0x1004
B4800 = 0xc
B50 = 0x1
B500000 = 0x1005
B57600 = 0x1001
B576000 = 0x1006
B600 = 0x8
B75 = 0x2
B921600 = 0x1007
B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576
BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271
BLKFLSBUF = 0x1261
BLKFRAGET = 0x1265
BLKFRASET = 0x1264
BLKGETSIZE = 0x1260
BLKGETSIZE64 = 0x80081272
BLKPBSZGET = 0x127b
BLKRAGET = 0x1263
BLKRASET = 0x1262
BLKROGET = 0x125e
BLKROSET = 0x125d
BLKRRPART = 0x125f
BLKSECTGET = 0x1267
BLKSECTSET = 0x1266
BLKSSZGET = 0x1268
BOTHER = 0x1000
BPF_A = 0x10
BPF_ABS = 0x20
BPF_ADD = 0x0
BPF_ALU = 0x4
BPF_AND = 0x50
BPF_B = 0x10
BPF_DIV = 0x30
BPF_FS_MAGIC = 0xcafe4a11
BPF_H = 0x8
BPF_IMM = 0x0
BPF_IND = 0x40
BPF_JA = 0x0
BPF_JEQ = 0x10
BPF_JGE = 0x30
BPF_JGT = 0x20
BPF_JMP = 0x5
BPF_JSET = 0x40
BPF_K = 0x0
BPF_LD = 0x0
BPF_LDX = 0x1
BPF_LEN = 0x80
BPF_LL_OFF = -0x200000
BPF_LSH = 0x60
BPF_MAJOR_VERSION = 0x1
BPF_MAXINSNS = 0x1000
BPF_MEM = 0x60
BPF_MEMWORDS = 0x10
BPF_MINOR_VERSION = 0x1
BPF_MISC = 0x7
BPF_MOD = 0x90
BPF_MSH = 0xa0
BPF_MUL = 0x20
BPF_NEG = 0x80
BPF_NET_OFF = -0x100000
BPF_OR = 0x40
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_ST = 0x2
BPF_STX = 0x3
BPF_SUB = 0x10
BPF_TAX = 0x0
BPF_TXA = 0x80
BPF_W = 0x0
BPF_X = 0x8
BPF_XOR = 0xa0
BRKINT = 0x2
BS0 = 0x0
BS1 = 0x2000
BSDLY = 0x2000
BTRFS_SUPER_MAGIC = 0x9123683e
BTRFS_TEST_MAGIC = 0x73727279
CAN_BCM = 0x2
CAN_EFF_FLAG = 0x80000000
CAN_EFF_ID_BITS = 0x1d
CAN_EFF_MASK = 0x1fffffff
CAN_ERR_FLAG = 0x20000000
CAN_ERR_MASK = 0x1fffffff
CAN_INV_FILTER = 0x20000000
CAN_ISOTP = 0x6
CAN_MAX_DLC = 0x8
CAN_MAX_DLEN = 0x8
CAN_MCNET = 0x5
CAN_MTU = 0x10
CAN_NPROTO = 0x7
CAN_RAW = 0x1
CAN_RAW_FILTER_MAX = 0x200
CAN_RTR_FLAG = 0x40000000
CAN_SFF_ID_BITS = 0xb
CAN_SFF_MASK = 0x7ff
CAN_TP16 = 0x3
CAN_TP20 = 0x4
CBAUD = 0x100f
CBAUDEX = 0x1000
CFLUSH = 0xf
CGROUP2_SUPER_MAGIC = 0x63677270
CGROUP_SUPER_MAGIC = 0x27e0eb
CIBAUD = 0x100f0000
CLOCAL = 0x800
CLOCK_BOOTTIME = 0x7
CLOCK_BOOTTIME_ALARM = 0x9
CLOCK_DEFAULT = 0x0
CLOCK_EXT = 0x1
CLOCK_INT = 0x2
CLOCK_MONOTONIC = 0x1
CLOCK_MONOTONIC_COARSE = 0x6
CLOCK_MONOTONIC_RAW = 0x4
CLOCK_PROCESS_CPUTIME_ID = 0x2
CLOCK_REALTIME = 0x0
CLOCK_REALTIME_ALARM = 0x8
CLOCK_REALTIME_COARSE = 0x5
CLOCK_TAI = 0xb
CLOCK_THREAD_CPUTIME_ID = 0x3
CLOCK_TXFROMRX = 0x4
CLOCK_TXINT = 0x3
CLONE_CHILD_CLEARTID = 0x200000
CLONE_CHILD_SETTID = 0x1000000
CLONE_DETACHED = 0x400000
CLONE_FILES = 0x400
CLONE_FS = 0x200
CLONE_IO = 0x80000000
CLONE_NEWCGROUP = 0x2000000
CLONE_NEWIPC = 0x8000000
CLONE_NEWNET = 0x40000000
CLONE_NEWNS = 0x20000
CLONE_NEWPID = 0x20000000
CLONE_NEWUSER = 0x10000000
CLONE_NEWUTS = 0x4000000
CLONE_PARENT = 0x8000
CLONE_PARENT_SETTID = 0x100000
CLONE_PTRACE = 0x2000
CLONE_SETTLS = 0x80000
CLONE_SIGHAND = 0x800
CLONE_SYSVSEM = 0x40000
CLONE_THREAD = 0x10000
CLONE_UNTRACED = 0x800000
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
CMSPAR = 0x40000000
CODA_SUPER_MAGIC = 0x73757245
CR0 = 0x0
CR1 = 0x200
CR2 = 0x400
CR3 = 0x600
CRAMFS_MAGIC = 0x28cd3d45
CRDLY = 0x600
CREAD = 0x80
CRTSCTS = 0x80000000
CS5 = 0x0
CS6 = 0x10
CS7 = 0x20
CS8 = 0x30
CSIGNAL = 0xff
CSIZE = 0x30
CSTART = 0x11
CSTATUS = 0x0
CSTOP = 0x13
CSTOPB = 0x40
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
DEVPTS_SUPER_MAGIC = 0x1cd1
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
DT_FIFO = 0x1
DT_LNK = 0xa
DT_REG = 0x8
DT_SOCK = 0xc
DT_UNKNOWN = 0x0
DT_WHT = 0xe
ECHO = 0x8
ECHOCTL = 0x200
ECHOE = 0x10
ECHOK = 0x20
ECHOKE = 0x800
ECHONL = 0x40
ECHOPRT = 0x400
ECRYPTFS_SUPER_MAGIC = 0xf15f
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
EFD_SEMAPHORE = 0x1
EFIVARFS_MAGIC = 0xde5e81e4
EFS_SUPER_MAGIC = 0x414a53
ENCODING_DEFAULT = 0x0
ENCODING_FM_MARK = 0x3
ENCODING_FM_SPACE = 0x4
ENCODING_MANCHESTER = 0x5
ENCODING_NRZ = 0x1
ENCODING_NRZI = 0x2
EPOLLERR = 0x8
EPOLLET = 0x80000000
EPOLLEXCLUSIVE = 0x10000000
EPOLLHUP = 0x10
EPOLLIN = 0x1
EPOLLMSG = 0x400
EPOLLONESHOT = 0x40000000
EPOLLOUT = 0x4
EPOLLPRI = 0x2
EPOLLRDBAND = 0x80
EPOLLRDHUP = 0x2000
EPOLLRDNORM = 0x40
EPOLLWAKEUP = 0x20000000
EPOLLWRBAND = 0x200
EPOLLWRNORM = 0x100
EPOLL_CLOEXEC = 0x80000
EPOLL_CTL_ADD = 0x1
EPOLL_CTL_DEL = 0x2
EPOLL_CTL_MOD = 0x3
ETH_P_1588 = 0x88f7
ETH_P_8021AD = 0x88a8
ETH_P_8021AH = 0x88e7
ETH_P_8021Q = 0x8100
ETH_P_80221 = 0x8917
ETH_P_802_2 = 0x4
ETH_P_802_3 = 0x1
ETH_P_802_3_MIN = 0x600
ETH_P_802_EX1 = 0x88b5
ETH_P_AARP = 0x80f3
ETH_P_AF_IUCV = 0xfbfb
ETH_P_ALL = 0x3
ETH_P_AOE = 0x88a2
ETH_P_ARCNET = 0x1a
ETH_P_ARP = 0x806
ETH_P_ATALK = 0x809b
ETH_P_ATMFATE = 0x8884
ETH_P_ATMMPOA = 0x884c
ETH_P_AX25 = 0x2
ETH_P_BATMAN = 0x4305
ETH_P_BPQ = 0x8ff
ETH_P_CAIF = 0xf7
ETH_P_CAN = 0xc
ETH_P_CANFD = 0xd
ETH_P_CONTROL = 0x16
ETH_P_CUST = 0x6006
ETH_P_DDCMP = 0x6
ETH_P_DEC = 0x6000
ETH_P_DIAG = 0x6005
ETH_P_DNA_DL = 0x6001
ETH_P_DNA_RC = 0x6002
ETH_P_DNA_RT = 0x6003
ETH_P_DSA = 0x1b
ETH_P_ECONET = 0x18
ETH_P_EDSA = 0xdada
ETH_P_ERSPAN = 0x88be
ETH_P_ERSPAN2 = 0x22eb
ETH_P_FCOE = 0x8906
ETH_P_FIP = 0x8914
ETH_P_HDLC = 0x19
ETH_P_HSR = 0x892f
ETH_P_IBOE = 0x8915
ETH_P_IEEE802154 = 0xf6
ETH_P_IEEEPUP = 0xa00
ETH_P_IEEEPUPAT = 0xa01
ETH_P_IFE = 0xed3e
ETH_P_IP = 0x800
ETH_P_IPV6 = 0x86dd
ETH_P_IPX = 0x8137
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
ETH_P_MACSEC = 0x88e5
ETH_P_MAP = 0xf9
ETH_P_MOBITEX = 0x15
ETH_P_MPLS_MC = 0x8848
ETH_P_MPLS_UC = 0x8847
ETH_P_MVRP = 0x88f5
ETH_P_NCSI = 0x88f8
ETH_P_NSH = 0x894f
ETH_P_PAE = 0x888e
ETH_P_PAUSE = 0x8808
ETH_P_PHONET = 0xf5
ETH_P_PPPTALK = 0x10
ETH_P_PPP_DISC = 0x8863
ETH_P_PPP_MP = 0x8
ETH_P_PPP_SES = 0x8864
ETH_P_PREAUTH = 0x88c7
ETH_P_PRP = 0x88fb
ETH_P_PUP = 0x200
ETH_P_PUPAT = 0x201
ETH_P_QINQ1 = 0x9100
ETH_P_QINQ2 = 0x9200
ETH_P_QINQ3 = 0x9300
ETH_P_RARP = 0x8035
ETH_P_SCA = 0x6007
ETH_P_SLOW = 0x8809
ETH_P_SNAP = 0x5
ETH_P_TDLS = 0x890d
ETH_P_TEB = 0x6558
ETH_P_TIPC = 0x88ca
ETH_P_TRAILER = 0x1c
ETH_P_TR_802_2 = 0x11
ETH_P_TSN = 0x22f0
ETH_P_WAN_PPP = 0x7
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXT2_SUPER_MAGIC = 0xef53
EXT3_SUPER_MAGIC = 0xef53
EXT4_SUPER_MAGIC = 0xef53
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
F2FS_SUPER_MAGIC = 0xf2f52010
FALLOC_FL_COLLAPSE_RANGE = 0x8
FALLOC_FL_INSERT_RANGE = 0x20
FALLOC_FL_KEEP_SIZE = 0x1
FALLOC_FL_NO_HIDE_STALE = 0x4
FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x8000
FFDLY = 0x8000
FLUSHO = 0x1000
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
FS_ENCRYPTION_MODE_INVALID = 0x0
FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
FS_KEY_DESCRIPTOR_SIZE = 0x8
FS_KEY_DESC_PREFIX = "fscrypt:"
FS_KEY_DESC_PREFIX_SIZE = 0x8
FS_MAX_KEY_SIZE = 0x40
FS_POLICY_FLAGS_PAD_16 = 0x2
FS_POLICY_FLAGS_PAD_32 = 0x3
FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3
FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x406
F_EXLCK = 0x4
F_GETFD = 0x1
F_GETFL = 0x3
F_GETLEASE = 0x401
F_GETLK = 0x5
F_GETLK64 = 0x5
F_GETOWN = 0x9
F_GETOWN_EX = 0x10
F_GETPIPE_SZ = 0x408
F_GETSIG = 0xb
F_GET_FILE_RW_HINT = 0x40d
F_GET_RW_HINT = 0x40b
F_GET_SEALS = 0x40a
F_LOCK = 0x1
F_NOTIFY = 0x402
F_OFD_GETLK = 0x24
F_OFD_SETLK = 0x25
F_OFD_SETLKW = 0x26
F_OK = 0x0
F_RDLCK = 0x0
F_SEAL_GROW = 0x4
F_SEAL_SEAL = 0x1
F_SEAL_SHRINK = 0x2
F_SEAL_WRITE = 0x8
F_SETFD = 0x2
F_SETFL = 0x4
F_SETLEASE = 0x400
F_SETLK = 0x6
F_SETLK64 = 0x6
F_SETLKW = 0x7
F_SETLKW64 = 0x7
F_SETOWN = 0x8
F_SETOWN_EX = 0xf
F_SETPIPE_SZ = 0x407
F_SETSIG = 0xa
F_SET_FILE_RW_HINT = 0x40e
F_SET_RW_HINT = 0x40c
F_SHLCK = 0x8
F_TEST = 0x3
F_TLOCK = 0x2
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HOSTFS_SUPER_MAGIC = 0xc0ffee
HPFS_SUPER_MAGIC = 0xf995e849
HUGETLBFS_MAGIC = 0x958458f6
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
ICMPV6_FILTER = 0x1
ICRNL = 0x100
IEXTEN = 0x8000
IFA_F_DADFAILED = 0x8
IFA_F_DEPRECATED = 0x20
IFA_F_HOMEADDRESS = 0x10
IFA_F_MANAGETEMPADDR = 0x100
IFA_F_MCAUTOJOIN = 0x400
IFA_F_NODAD = 0x2
IFA_F_NOPREFIXROUTE = 0x200
IFA_F_OPTIMISTIC = 0x4
IFA_F_PERMANENT = 0x80
IFA_F_SECONDARY = 0x1
IFA_F_STABLE_PRIVACY = 0x800
IFA_F_TEMPORARY = 0x1
IFA_F_TENTATIVE = 0x40
IFA_MAX = 0x9
IFF_ALLMULTI = 0x200
IFF_ATTACH_QUEUE = 0x200
IFF_AUTOMEDIA = 0x4000
IFF_BROADCAST = 0x2
IFF_DEBUG = 0x4
IFF_DETACH_QUEUE = 0x400
IFF_DORMANT = 0x20000
IFF_DYNAMIC = 0x8000
IFF_ECHO = 0x40000
IFF_LOOPBACK = 0x8
IFF_LOWER_UP = 0x10000
IFF_MASTER = 0x400
IFF_MULTICAST = 0x1000
IFF_MULTI_QUEUE = 0x100
IFF_NAPI = 0x10
IFF_NAPI_FRAGS = 0x20
IFF_NOARP = 0x80
IFF_NOFILTER = 0x1000
IFF_NOTRAILERS = 0x20
IFF_NO_PI = 0x1000
IFF_ONE_QUEUE = 0x2000
IFF_PERSIST = 0x800
IFF_POINTOPOINT = 0x10
IFF_PORTSEL = 0x2000
IFF_PROMISC = 0x100
IFF_RUNNING = 0x40
IFF_SLAVE = 0x800
IFF_TAP = 0x2
IFF_TUN = 0x1
IFF_TUN_EXCL = 0x8000
IFF_UP = 0x1
IFF_VNET_HDR = 0x4000
IFF_VOLATILE = 0x70c5a
IFNAMSIZ = 0x10
IGNBRK = 0x1
IGNCR = 0x80
IGNPAR = 0x4
IMAXBEL = 0x2000
INLCR = 0x40
INPCK = 0x10
IN_ACCESS = 0x1
IN_ALL_EVENTS = 0xfff
IN_ATTRIB = 0x4
IN_CLASSA_HOST = 0xffffff
IN_CLASSA_MAX = 0x80
IN_CLASSA_NET = 0xff000000
IN_CLASSA_NSHIFT = 0x18
IN_CLASSB_HOST = 0xffff
IN_CLASSB_MAX = 0x10000
IN_CLASSB_NET = 0xffff0000
IN_CLASSB_NSHIFT = 0x10
IN_CLASSC_HOST = 0xff
IN_CLASSC_NET = 0xffffff00
IN_CLASSC_NSHIFT = 0x8
IN_CLOEXEC = 0x80000
IN_CLOSE = 0x18
IN_CLOSE_NOWRITE = 0x10
IN_CLOSE_WRITE = 0x8
IN_CREATE = 0x100
IN_DELETE = 0x200
IN_DELETE_SELF = 0x400
IN_DONT_FOLLOW = 0x2000000
IN_EXCL_UNLINK = 0x4000000
IN_IGNORED = 0x8000
IN_ISDIR = 0x40000000
IN_LOOPBACKNET = 0x7f
IN_MASK_ADD = 0x20000000
IN_MODIFY = 0x2
IN_MOVE = 0xc0
IN_MOVED_FROM = 0x40
IN_MOVED_TO = 0x80
IN_MOVE_SELF = 0x800
IN_NONBLOCK = 0x800
IN_ONESHOT = 0x80000000
IN_ONLYDIR = 0x1000000
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
IPPROTO_DCCP = 0x21
IPPROTO_DSTOPTS = 0x3c
IPPROTO_EGP = 0x8
IPPROTO_ENCAP = 0x62
IPPROTO_ESP = 0x32
IPPROTO_FRAGMENT = 0x2c
IPPROTO_GRE = 0x2f
IPPROTO_HOPOPTS = 0x0
IPPROTO_ICMP = 0x1
IPPROTO_ICMPV6 = 0x3a
IPPROTO_IDP = 0x16
IPPROTO_IGMP = 0x2
IPPROTO_IP = 0x0
IPPROTO_IPIP = 0x4
IPPROTO_IPV6 = 0x29
IPPROTO_MH = 0x87
IPPROTO_MPLS = 0x89
IPPROTO_MTP = 0x5c
IPPROTO_NONE = 0x3b
IPPROTO_PIM = 0x67
IPPROTO_PUP = 0xc
IPPROTO_RAW = 0xff
IPPROTO_ROUTING = 0x2b
IPPROTO_RSVP = 0x2e
IPPROTO_SCTP = 0x84
IPPROTO_TCP = 0x6
IPPROTO_TP = 0x1d
IPPROTO_UDP = 0x11
IPPROTO_UDPLITE = 0x88
IPV6_2292DSTOPTS = 0x4
IPV6_2292HOPLIMIT = 0x8
IPV6_2292HOPOPTS = 0x3
IPV6_2292PKTINFO = 0x2
IPV6_2292PKTOPTIONS = 0x6
IPV6_2292RTHDR = 0x5
IPV6_ADDRFORM = 0x1
IPV6_ADDR_PREFERENCES = 0x48
IPV6_ADD_MEMBERSHIP = 0x14
IPV6_AUTHHDR = 0xa
IPV6_AUTOFLOWLABEL = 0x46
IPV6_CHECKSUM = 0x7
IPV6_DONTFRAG = 0x3e
IPV6_DROP_MEMBERSHIP = 0x15
IPV6_DSTOPTS = 0x3b
IPV6_FREEBIND = 0x4e
IPV6_HDRINCL = 0x24
IPV6_HOPLIMIT = 0x34
IPV6_HOPOPTS = 0x36
IPV6_IPSEC_POLICY = 0x22
IPV6_JOIN_ANYCAST = 0x1b
IPV6_JOIN_GROUP = 0x14
IPV6_LEAVE_ANYCAST = 0x1c
IPV6_LEAVE_GROUP = 0x15
IPV6_MINHOPCOUNT = 0x49
IPV6_MTU = 0x18
IPV6_MTU_DISCOVER = 0x17
IPV6_MULTICAST_HOPS = 0x12
IPV6_MULTICAST_IF = 0x11
IPV6_MULTICAST_LOOP = 0x13
IPV6_NEXTHOP = 0x9
IPV6_ORIGDSTADDR = 0x4a
IPV6_PATHMTU = 0x3d
IPV6_PKTINFO = 0x32
IPV6_PMTUDISC_DO = 0x2
IPV6_PMTUDISC_DONT = 0x0
IPV6_PMTUDISC_INTERFACE = 0x4
IPV6_PMTUDISC_OMIT = 0x5
IPV6_PMTUDISC_PROBE = 0x3
IPV6_PMTUDISC_WANT = 0x1
IPV6_RECVDSTOPTS = 0x3a
IPV6_RECVERR = 0x19
IPV6_RECVFRAGSIZE = 0x4d
IPV6_RECVHOPLIMIT = 0x33
IPV6_RECVHOPOPTS = 0x35
IPV6_RECVORIGDSTADDR = 0x4a
IPV6_RECVPATHMTU = 0x3c
IPV6_RECVPKTINFO = 0x31
IPV6_RECVRTHDR = 0x38
IPV6_RECVTCLASS = 0x42
IPV6_ROUTER_ALERT = 0x16
IPV6_RTHDR = 0x39
IPV6_RTHDRDSTOPTS = 0x37
IPV6_RTHDR_LOOSE = 0x0
IPV6_RTHDR_STRICT = 0x1
IPV6_RTHDR_TYPE_0 = 0x0
IPV6_RXDSTOPTS = 0x3b
IPV6_RXHOPOPTS = 0x36
IPV6_TCLASS = 0x43
IPV6_TRANSPARENT = 0x4b
IPV6_UNICAST_HOPS = 0x10
IPV6_UNICAST_IF = 0x4c
IPV6_V6ONLY = 0x1a
IPV6_XFRM_POLICY = 0x23
IP_ADD_MEMBERSHIP = 0x23
IP_ADD_SOURCE_MEMBERSHIP = 0x27
IP_BIND_ADDRESS_NO_PORT = 0x18
IP_BLOCK_SOURCE = 0x26
IP_CHECKSUM = 0x17
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000
IP_DROP_MEMBERSHIP = 0x24
IP_DROP_SOURCE_MEMBERSHIP = 0x28
IP_FREEBIND = 0xf
IP_HDRINCL = 0x3
IP_IPSEC_POLICY = 0x10
IP_MAXPACKET = 0xffff
IP_MAX_MEMBERSHIPS = 0x14
IP_MF = 0x2000
IP_MINTTL = 0x15
IP_MSFILTER = 0x29
IP_MSS = 0x240
IP_MTU = 0xe
IP_MTU_DISCOVER = 0xa
IP_MULTICAST_ALL = 0x31
IP_MULTICAST_IF = 0x20
IP_MULTICAST_LOOP = 0x22
IP_MULTICAST_TTL = 0x21
IP_NODEFRAG = 0x16
IP_OFFMASK = 0x1fff
IP_OPTIONS = 0x4
IP_ORIGDSTADDR = 0x14
IP_PASSSEC = 0x12
IP_PKTINFO = 0x8
IP_PKTOPTIONS = 0x9
IP_PMTUDISC = 0xa
IP_PMTUDISC_DO = 0x2
IP_PMTUDISC_DONT = 0x0
IP_PMTUDISC_INTERFACE = 0x4
IP_PMTUDISC_OMIT = 0x5
IP_PMTUDISC_PROBE = 0x3
IP_PMTUDISC_WANT = 0x1
IP_RECVERR = 0xb
IP_RECVFRAGSIZE = 0x19
IP_RECVOPTS = 0x6
IP_RECVORIGDSTADDR = 0x14
IP_RECVRETOPTS = 0x7
IP_RECVTOS = 0xd
IP_RECVTTL = 0xc
IP_RETOPTS = 0x7
IP_RF = 0x8000
IP_ROUTER_ALERT = 0x5
IP_TOS = 0x1
IP_TRANSPARENT = 0x13
IP_TTL = 0x2
IP_UNBLOCK_SOURCE = 0x25
IP_UNICAST_IF = 0x32
IP_XFRM_POLICY = 0x11
ISIG = 0x1
ISOFS_SUPER_MAGIC = 0x9660
ISTRIP = 0x20
IUCLC = 0x200
IUTF8 = 0x4000
IXANY = 0x800
IXOFF = 0x1000
IXON = 0x400
JFFS2_SUPER_MAGIC = 0x72b6
KEXEC_ARCH_386 = 0x30000
KEXEC_ARCH_68K = 0x40000
KEXEC_ARCH_AARCH64 = 0xb70000
KEXEC_ARCH_ARM = 0x280000
KEXEC_ARCH_DEFAULT = 0x0
KEXEC_ARCH_IA_64 = 0x320000
KEXEC_ARCH_MASK = 0xffff0000
KEXEC_ARCH_MIPS = 0x80000
KEXEC_ARCH_MIPS_LE = 0xa0000
KEXEC_ARCH_PPC = 0x140000
KEXEC_ARCH_PPC64 = 0x150000
KEXEC_ARCH_S390 = 0x160000
KEXEC_ARCH_SH = 0x2a0000
KEXEC_ARCH_X86_64 = 0x3e0000
KEXEC_FILE_NO_INITRAMFS = 0x4
KEXEC_FILE_ON_CRASH = 0x2
KEXEC_FILE_UNLOAD = 0x1
KEXEC_ON_CRASH = 0x1
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
KEYCTL_DH_COMPUTE = 0x17
KEYCTL_GET_KEYRING_ID = 0x0
KEYCTL_GET_PERSISTENT = 0x16
KEYCTL_GET_SECURITY = 0x11
KEYCTL_INSTANTIATE = 0xc
KEYCTL_INSTANTIATE_IOV = 0x14
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
KEYCTL_NEGATE = 0xd
KEYCTL_READ = 0xb
KEYCTL_REJECT = 0x13
KEYCTL_RESTRICT_KEYRING = 0x1d
KEYCTL_REVOKE = 0x3
KEYCTL_SEARCH = 0xa
KEYCTL_SESSION_TO_PARENT = 0x12
KEYCTL_SETPERM = 0x5
KEYCTL_SET_REQKEY_KEYRING = 0xe
KEYCTL_SET_TIMEOUT = 0xf
KEYCTL_UNLINK = 0x9
KEYCTL_UPDATE = 0x2
KEY_REQKEY_DEFL_DEFAULT = 0x0
KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
KEY_REQKEY_DEFL_NO_CHANGE = -0x1
KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
KEY_REQKEY_DEFL_USER_KEYRING = 0x4
KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
KEY_SPEC_GROUP_KEYRING = -0x6
KEY_SPEC_PROCESS_KEYRING = -0x2
KEY_SPEC_REQKEY_AUTH_KEY = -0x7
KEY_SPEC_REQUESTOR_KEYRING = -0x8
KEY_SPEC_SESSION_KEYRING = -0x3
KEY_SPEC_THREAD_KEYRING = -0x1
KEY_SPEC_USER_KEYRING = -0x4
KEY_SPEC_USER_SESSION_KEYRING = -0x5
LINUX_REBOOT_CMD_CAD_OFF = 0x0
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
LINUX_REBOOT_CMD_HALT = 0xcdef0123
LINUX_REBOOT_CMD_KEXEC = 0x45584543
LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
LINUX_REBOOT_CMD_RESTART = 0x1234567
LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
LINUX_REBOOT_MAGIC1 = 0xfee1dead
LINUX_REBOOT_MAGIC2 = 0x28121969
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
LOCK_UN = 0x8
MADV_DODUMP = 0x11
MADV_DOFORK = 0xb
MADV_DONTDUMP = 0x10
MADV_DONTFORK = 0xa
MADV_DONTNEED = 0x4
MADV_FREE = 0x8
MADV_HUGEPAGE = 0xe
MADV_HWPOISON = 0x64
MADV_KEEPONFORK = 0x13
MADV_MERGEABLE = 0xc
MADV_NOHUGEPAGE = 0xf
MADV_NORMAL = 0x0
MADV_RANDOM = 0x1
MADV_REMOVE = 0x9
MADV_SEQUENTIAL = 0x2
MADV_UNMERGEABLE = 0xd
MADV_WILLNEED = 0x3
MADV_WIPEONFORK = 0x12
MAP_ANON = 0x20
MAP_ANONYMOUS = 0x20
MAP_DENYWRITE = 0x800
MAP_EXECUTABLE = 0x1000
MAP_FILE = 0x0
MAP_FIXED = 0x10
MAP_FIXED_NOREPLACE = 0x100000
MAP_GROWSDOWN = 0x100
MAP_HUGETLB = 0x40000
MAP_HUGE_MASK = 0x3f
MAP_HUGE_SHIFT = 0x1a
MAP_LOCKED = 0x2000
MAP_NONBLOCK = 0x10000
MAP_NORESERVE = 0x4000
MAP_POPULATE = 0x8000
MAP_PRIVATE = 0x2
MAP_SHARED = 0x1
MAP_SHARED_VALIDATE = 0x3
MAP_STACK = 0x20000
MAP_SYNC = 0x80000
MAP_TYPE = 0xf
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
MFD_ALLOW_SEALING = 0x2
MFD_CLOEXEC = 0x1
MFD_HUGETLB = 0x4
MFD_HUGE_16GB = -0x78000000
MFD_HUGE_16MB = 0x60000000
MFD_HUGE_1GB = 0x78000000
MFD_HUGE_1MB = 0x50000000
MFD_HUGE_256MB = 0x70000000
MFD_HUGE_2GB = 0x7c000000
MFD_HUGE_2MB = 0x54000000
MFD_HUGE_32MB = 0x64000000
MFD_HUGE_512KB = 0x4c000000
MFD_HUGE_512MB = 0x74000000
MFD_HUGE_64KB = 0x40000000
MFD_HUGE_8MB = 0x5c000000
MFD_HUGE_MASK = 0x3f
MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
MINIX_SUPER_MAGIC = 0x137f
MINIX_SUPER_MAGIC2 = 0x138f
MNT_DETACH = 0x2
MNT_EXPIRE = 0x4
MNT_FORCE = 0x1
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
MODULE_INIT_IGNORE_VERMAGIC = 0x2
MSDOS_SUPER_MAGIC = 0x4d44
MSG_BATCH = 0x40000
MSG_CMSG_CLOEXEC = 0x40000000
MSG_CONFIRM = 0x800
MSG_CTRUNC = 0x8
MSG_DONTROUTE = 0x4
MSG_DONTWAIT = 0x40
MSG_EOR = 0x80
MSG_ERRQUEUE = 0x2000
MSG_FASTOPEN = 0x20000000
MSG_FIN = 0x200
MSG_MORE = 0x8000
MSG_NOSIGNAL = 0x4000
MSG_OOB = 0x1
MSG_PEEK = 0x2
MSG_PROXY = 0x10
MSG_RST = 0x1000
MSG_SYN = 0x400
MSG_TRUNC = 0x20
MSG_TRYHARD = 0x4
MSG_WAITALL = 0x100
MSG_WAITFORONE = 0x10000
MSG_ZEROCOPY = 0x4000000
MS_ACTIVE = 0x40000000
MS_ASYNC = 0x1
MS_BIND = 0x1000
MS_BORN = 0x20000000
MS_DIRSYNC = 0x80
MS_INVALIDATE = 0x2
MS_I_VERSION = 0x800000
MS_KERNMOUNT = 0x400000
MS_LAZYTIME = 0x2000000
MS_MANDLOCK = 0x40
MS_MGC_MSK = 0xffff0000
MS_MGC_VAL = 0xc0ed0000
MS_MOVE = 0x2000
MS_NOATIME = 0x400
MS_NODEV = 0x4
MS_NODIRATIME = 0x800
MS_NOEXEC = 0x8
MS_NOREMOTELOCK = 0x8000000
MS_NOSEC = 0x10000000
MS_NOSUID = 0x2
MS_NOUSER = -0x80000000
MS_POSIXACL = 0x10000
MS_PRIVATE = 0x40000
MS_RDONLY = 0x1
MS_REC = 0x4000
MS_RELATIME = 0x200000
MS_REMOUNT = 0x20
MS_RMT_MASK = 0x2800051
MS_SHARED = 0x100000
MS_SILENT = 0x8000
MS_SLAVE = 0x80000
MS_STRICTATIME = 0x1000000
MS_SUBMOUNT = 0x4000000
MS_SYNC = 0x4
MS_SYNCHRONOUS = 0x10
MS_UNBINDABLE = 0x20000
MS_VERBOSE = 0x8000
MTD_INODE_FS_MAGIC = 0x11307854
NAME_MAX = 0xff
NCP_SUPER_MAGIC = 0x564c
NETLINK_ADD_MEMBERSHIP = 0x1
NETLINK_AUDIT = 0x9
NETLINK_BROADCAST_ERROR = 0x4
NETLINK_CAP_ACK = 0xa
NETLINK_CONNECTOR = 0xb
NETLINK_CRYPTO = 0x15
NETLINK_DNRTMSG = 0xe
NETLINK_DROP_MEMBERSHIP = 0x2
NETLINK_ECRYPTFS = 0x13
NETLINK_EXT_ACK = 0xb
NETLINK_FIB_LOOKUP = 0xa
NETLINK_FIREWALL = 0x3
NETLINK_GENERIC = 0x10
NETLINK_INET_DIAG = 0x4
NETLINK_IP6_FW = 0xd
NETLINK_ISCSI = 0x8
NETLINK_KOBJECT_UEVENT = 0xf
NETLINK_LISTEN_ALL_NSID = 0x8
NETLINK_LIST_MEMBERSHIPS = 0x9
NETLINK_NETFILTER = 0xc
NETLINK_NFLOG = 0x5
NETLINK_NO_ENOBUFS = 0x5
NETLINK_PKTINFO = 0x3
NETLINK_RDMA = 0x14
NETLINK_ROUTE = 0x0
NETLINK_RX_RING = 0x6
NETLINK_SCSITRANSPORT = 0x12
NETLINK_SELINUX = 0x7
NETLINK_SMC = 0x16
NETLINK_SOCK_DIAG = 0x4
NETLINK_TX_RING = 0x7
NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3
NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
NFNLGRP_CONNTRACK_EXP_NEW = 0x4
NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
NFNLGRP_CONNTRACK_NEW = 0x1
NFNLGRP_CONNTRACK_UPDATE = 0x2
NFNLGRP_MAX = 0x9
NFNLGRP_NFTABLES = 0x7
NFNLGRP_NFTRACE = 0x9
NFNLGRP_NONE = 0x0
NFNL_BATCH_MAX = 0x1
NFNL_MSG_BATCH_BEGIN = 0x10
NFNL_MSG_BATCH_END = 0x11
NFNL_NFA_NEST = 0x8000
NFNL_SUBSYS_ACCT = 0x7
NFNL_SUBSYS_COUNT = 0xc
NFNL_SUBSYS_CTHELPER = 0x9
NFNL_SUBSYS_CTNETLINK = 0x1
NFNL_SUBSYS_CTNETLINK_EXP = 0x2
NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
NFNL_SUBSYS_IPSET = 0x6
NFNL_SUBSYS_NFTABLES = 0xa
NFNL_SUBSYS_NFT_COMPAT = 0xb
NFNL_SUBSYS_NONE = 0x0
NFNL_SUBSYS_OSF = 0x5
NFNL_SUBSYS_QUEUE = 0x3
NFNL_SUBSYS_ULOG = 0x4
NFS_SUPER_MAGIC = 0x6969
NILFS_SUPER_MAGIC = 0x3434
NL0 = 0x0
NL1 = 0x100
NLA_ALIGNTO = 0x4
NLA_F_NESTED = 0x8000
NLA_F_NET_BYTEORDER = 0x4000
NLA_HDRLEN = 0x4
NLDLY = 0x100
NLMSG_ALIGNTO = 0x4
NLMSG_DONE = 0x3
NLMSG_ERROR = 0x2
NLMSG_HDRLEN = 0x10
NLMSG_MIN_TYPE = 0x10
NLMSG_NOOP = 0x1
NLMSG_OVERRUN = 0x4
NLM_F_ACK = 0x4
NLM_F_ACK_TLVS = 0x200
NLM_F_APPEND = 0x800
NLM_F_ATOMIC = 0x400
NLM_F_CAPPED = 0x100
NLM_F_CREATE = 0x400
NLM_F_DUMP = 0x300
NLM_F_DUMP_FILTERED = 0x20
NLM_F_DUMP_INTR = 0x10
NLM_F_ECHO = 0x8
NLM_F_EXCL = 0x200
NLM_F_MATCH = 0x200
NLM_F_MULTI = 0x2
NLM_F_NONREC = 0x100
NLM_F_REPLACE = 0x100
NLM_F_REQUEST = 0x1
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
OFILL = 0x40
OLCUC = 0x2
ONLCR = 0x4
ONLRET = 0x20
ONOCR = 0x10
OPENPROM_SUPER_MAGIC = 0x9fa1
OPOST = 0x1
OVERLAYFS_SUPER_MAGIC = 0x794c7630
O_ACCMODE = 0x3
O_APPEND = 0x400
O_ASYNC = 0x2000
O_CLOEXEC = 0x80000
O_CREAT = 0x40
O_DIRECT = 0x4000
O_DIRECTORY = 0x10000
O_DSYNC = 0x1000
O_EXCL = 0x80
O_FSYNC = 0x101000
O_LARGEFILE = 0x0
O_NDELAY = 0x800
O_NOATIME = 0x40000
O_NOCTTY = 0x100
O_NOFOLLOW = 0x20000
O_NONBLOCK = 0x800
O_PATH = 0x200000
O_RDONLY = 0x0
O_RDWR = 0x2
O_RSYNC = 0x101000
O_SYNC = 0x101000
O_TMPFILE = 0x410000
O_TRUNC = 0x200
O_WRONLY = 0x1
PACKET_ADD_MEMBERSHIP = 0x1
PACKET_AUXDATA = 0x8
PACKET_BROADCAST = 0x1
PACKET_COPY_THRESH = 0x7
PACKET_DROP_MEMBERSHIP = 0x2
PACKET_FANOUT = 0x12
PACKET_FANOUT_CBPF = 0x6
PACKET_FANOUT_CPU = 0x2
PACKET_FANOUT_DATA = 0x16
PACKET_FANOUT_EBPF = 0x7
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
PACKET_FANOUT_HASH = 0x0
PACKET_FANOUT_LB = 0x1
PACKET_FANOUT_QM = 0x5
PACKET_FANOUT_RND = 0x4
PACKET_FANOUT_ROLLOVER = 0x3
PACKET_FASTROUTE = 0x6
PACKET_HDRLEN = 0xb
PACKET_HOST = 0x0
PACKET_KERNEL = 0x7
PACKET_LOOPBACK = 0x5
PACKET_LOSS = 0xe
PACKET_MR_ALLMULTI = 0x2
PACKET_MR_MULTICAST = 0x0
PACKET_MR_PROMISC = 0x1
PACKET_MR_UNICAST = 0x3
PACKET_MULTICAST = 0x2
PACKET_ORIGDEV = 0x9
PACKET_OTHERHOST = 0x3
PACKET_OUTGOING = 0x4
PACKET_QDISC_BYPASS = 0x14
PACKET_RECV_OUTPUT = 0x3
PACKET_RESERVE = 0xc
PACKET_ROLLOVER_STATS = 0x15
PACKET_RX_RING = 0x5
PACKET_STATISTICS = 0x6
PACKET_TIMESTAMP = 0x11
PACKET_TX_HAS_OFF = 0x13
PACKET_TX_RING = 0xd
PACKET_TX_TIMESTAMP = 0x10
PACKET_USER = 0x6
PACKET_VERSION = 0xa
PACKET_VNET_HDR = 0xf
PARENB = 0x100
PARITY_CRC16_PR0 = 0x2
PARITY_CRC16_PR0_CCITT = 0x4
PARITY_CRC16_PR1 = 0x3
PARITY_CRC16_PR1_CCITT = 0x5
PARITY_CRC32_PR0_CCITT = 0x6
PARITY_CRC32_PR1_CCITT = 0x7
PARITY_DEFAULT = 0x0
PARITY_NONE = 0x1
PARMRK = 0x8
PARODD = 0x200
PENDIN = 0x4000
PERF_EVENT_IOC_DISABLE = 0x2401
PERF_EVENT_IOC_ENABLE = 0x2400
PERF_EVENT_IOC_ID = 0x80082407
PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
PERF_EVENT_IOC_PERIOD = 0x40082404
PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
PERF_EVENT_IOC_REFRESH = 0x2402
PERF_EVENT_IOC_RESET = 0x2403
PERF_EVENT_IOC_SET_BPF = 0x40042408
PERF_EVENT_IOC_SET_FILTER = 0x40082406
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
PIPEFS_MAGIC = 0x50495045
PPPIOCATTACH = 0x4004743d
PPPIOCATTCHAN = 0x40047438
PPPIOCCONNECT = 0x4004743a
PPPIOCDETACH = 0x4004743c
PPPIOCDISCONN = 0x7439
PPPIOCGASYNCMAP = 0x80047458
PPPIOCGCHAN = 0x80047437
PPPIOCGDEBUG = 0x80047441
PPPIOCGFLAGS = 0x8004745a
PPPIOCGIDLE = 0x8010743f
PPPIOCGL2TPSTATS = 0x80487436
PPPIOCGMRU = 0x80047453
PPPIOCGNPMODE = 0xc008744c
PPPIOCGRASYNCMAP = 0x80047455
PPPIOCGUNIT = 0x80047456
PPPIOCGXASYNCMAP = 0x80207450
PPPIOCNEWUNIT = 0xc004743e
PPPIOCSACTIVE = 0x40107446
PPPIOCSASYNCMAP = 0x40047457
PPPIOCSCOMPRESS = 0x4010744d
PPPIOCSDEBUG = 0x40047440
PPPIOCSFLAGS = 0x40047459
PPPIOCSMAXCID = 0x40047451
PPPIOCSMRRU = 0x4004743b
PPPIOCSMRU = 0x40047452
PPPIOCSNPMODE = 0x4008744b
PPPIOCSPASS = 0x40107447
PPPIOCSRASYNCMAP = 0x40047454
PPPIOCSXASYNCMAP = 0x4020744f
PPPIOCXFERUNIT = 0x744e
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
PRIO_USER = 0x2
PROC_SUPER_MAGIC = 0x9fa0
PROT_EXEC = 0x4
PROT_GROWSDOWN = 0x1000000
PROT_GROWSUP = 0x2000000
PROT_NONE = 0x0
PROT_READ = 0x1
PROT_WRITE = 0x2
PR_CAPBSET_DROP = 0x18
PR_CAPBSET_READ = 0x17
PR_CAP_AMBIENT = 0x2f
PR_CAP_AMBIENT_CLEAR_ALL = 0x4
PR_CAP_AMBIENT_IS_SET = 0x1
PR_CAP_AMBIENT_LOWER = 0x3
PR_CAP_AMBIENT_RAISE = 0x2
PR_ENDIAN_BIG = 0x0
PR_ENDIAN_LITTLE = 0x1
PR_ENDIAN_PPC_LITTLE = 0x2
PR_FPEMU_NOPRINT = 0x1
PR_FPEMU_SIGFPE = 0x2
PR_FP_EXC_ASYNC = 0x2
PR_FP_EXC_DISABLED = 0x0
PR_FP_EXC_DIV = 0x10000
PR_FP_EXC_INV = 0x100000
PR_FP_EXC_NONRECOV = 0x1
PR_FP_EXC_OVF = 0x20000
PR_FP_EXC_PRECISE = 0x3
PR_FP_EXC_RES = 0x80000
PR_FP_EXC_SW_ENABLE = 0x80
PR_FP_EXC_UND = 0x40000
PR_FP_MODE_FR = 0x1
PR_FP_MODE_FRE = 0x2
PR_GET_CHILD_SUBREAPER = 0x25
PR_GET_DUMPABLE = 0x3
PR_GET_ENDIAN = 0x13
PR_GET_FPEMU = 0x9
PR_GET_FPEXC = 0xb
PR_GET_FP_MODE = 0x2e
PR_GET_KEEPCAPS = 0x7
PR_GET_NAME = 0x10
PR_GET_NO_NEW_PRIVS = 0x27
PR_GET_PDEATHSIG = 0x2
PR_GET_SECCOMP = 0x15
PR_GET_SECUREBITS = 0x1b
PR_GET_SPECULATION_CTRL = 0x34
PR_GET_THP_DISABLE = 0x2a
PR_GET_TID_ADDRESS = 0x28
PR_GET_TIMERSLACK = 0x1e
PR_GET_TIMING = 0xd
PR_GET_TSC = 0x19
PR_GET_UNALIGN = 0x5
PR_MCE_KILL = 0x21
PR_MCE_KILL_CLEAR = 0x0
PR_MCE_KILL_DEFAULT = 0x2
PR_MCE_KILL_EARLY = 0x1
PR_MCE_KILL_GET = 0x22
PR_MCE_KILL_LATE = 0x0
PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14
PR_SET_FPEMU = 0xa
PR_SET_FPEXC = 0xc
PR_SET_FP_MODE = 0x2d
PR_SET_KEEPCAPS = 0x8
PR_SET_MM = 0x23
PR_SET_MM_ARG_END = 0x9
PR_SET_MM_ARG_START = 0x8
PR_SET_MM_AUXV = 0xc
PR_SET_MM_BRK = 0x7
PR_SET_MM_END_CODE = 0x2
PR_SET_MM_END_DATA = 0x4
PR_SET_MM_ENV_END = 0xb
PR_SET_MM_ENV_START = 0xa
PR_SET_MM_EXE_FILE = 0xd
PR_SET_MM_MAP = 0xe
PR_SET_MM_MAP_SIZE = 0xf
PR_SET_MM_START_BRK = 0x6
PR_SET_MM_START_CODE = 0x1
PR_SET_MM_START_DATA = 0x3
PR_SET_MM_START_STACK = 0x5
PR_SET_NAME = 0xf
PR_SET_NO_NEW_PRIVS = 0x26
PR_SET_PDEATHSIG = 0x1
PR_SET_PTRACER = 0x59616d61
PR_SET_PTRACER_ANY = 0xffffffffffffffff
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
PR_SET_SPECULATION_CTRL = 0x35
PR_SET_THP_DISABLE = 0x29
PR_SET_TIMERSLACK = 0x1d
PR_SET_TIMING = 0xe
PR_SET_TSC = 0x1a
PR_SET_UNALIGN = 0x6
PR_SPEC_DISABLE = 0x4
PR_SPEC_ENABLE = 0x2
PR_SPEC_FORCE_DISABLE = 0x8
PR_SPEC_NOT_AFFECTED = 0x0
PR_SPEC_PRCTL = 0x1
PR_SPEC_STORE_BYPASS = 0x0
PR_SVE_GET_VL = 0x33
PR_SVE_SET_VL = 0x32
PR_SVE_SET_VL_ONEXEC = 0x40000
PR_SVE_VL_INHERIT = 0x20000
PR_SVE_VL_LEN_MASK = 0xffff
PR_TASK_PERF_EVENTS_DISABLE = 0x1f
PR_TASK_PERF_EVENTS_ENABLE = 0x20
PR_TIMING_STATISTICAL = 0x0
PR_TIMING_TIMESTAMP = 0x1
PR_TSC_ENABLE = 0x1
PR_TSC_SIGSEGV = 0x2
PR_UNALIGN_NOPRINT = 0x1
PR_UNALIGN_SIGBUS = 0x2
PSTOREFS_MAGIC = 0x6165676c
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
PTRACE_DISABLE_TE = 0x5010
PTRACE_ENABLE_TE = 0x5009
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
PTRACE_EVENT_FORK = 0x1
PTRACE_EVENT_SECCOMP = 0x7
PTRACE_EVENT_STOP = 0x80
PTRACE_EVENT_VFORK = 0x2
PTRACE_EVENT_VFORK_DONE = 0x5
PTRACE_GETEVENTMSG = 0x4201
PTRACE_GETREGS = 0xc
PTRACE_GETREGSET = 0x4204
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
PTRACE_GET_LAST_BREAK = 0x5006
PTRACE_INTERRUPT = 0x4207
PTRACE_KILL = 0x8
PTRACE_LISTEN = 0x4208
PTRACE_OLDSETOPTIONS = 0x15
PTRACE_O_EXITKILL = 0x100000
PTRACE_O_MASK = 0x3000ff
PTRACE_O_SUSPEND_SECCOMP = 0x200000
PTRACE_O_TRACECLONE = 0x8
PTRACE_O_TRACEEXEC = 0x10
PTRACE_O_TRACEEXIT = 0x40
PTRACE_O_TRACEFORK = 0x2
PTRACE_O_TRACESECCOMP = 0x80
PTRACE_O_TRACESYSGOOD = 0x1
PTRACE_O_TRACEVFORK = 0x4
PTRACE_O_TRACEVFORKDONE = 0x20
PTRACE_PEEKDATA = 0x2
PTRACE_PEEKDATA_AREA = 0x5003
PTRACE_PEEKSIGINFO = 0x4209
PTRACE_PEEKSIGINFO_SHARED = 0x1
PTRACE_PEEKTEXT = 0x1
PTRACE_PEEKTEXT_AREA = 0x5002
PTRACE_PEEKUSR = 0x3
PTRACE_PEEKUSR_AREA = 0x5000
PTRACE_PEEK_SYSTEM_CALL = 0x5007
PTRACE_POKEDATA = 0x5
PTRACE_POKEDATA_AREA = 0x5005
PTRACE_POKETEXT = 0x4
PTRACE_POKETEXT_AREA = 0x5004
PTRACE_POKEUSR = 0x6
PTRACE_POKEUSR_AREA = 0x5001
PTRACE_POKE_SYSTEM_CALL = 0x5008
PTRACE_PROT = 0x15
PTRACE_SECCOMP_GET_FILTER = 0x420c
PTRACE_SECCOMP_GET_METADATA = 0x420d
PTRACE_SEIZE = 0x4206
PTRACE_SETOPTIONS = 0x4200
PTRACE_SETREGS = 0xd
PTRACE_SETREGSET = 0x4205
PTRACE_SETSIGINFO = 0x4203
PTRACE_SETSIGMASK = 0x420b
PTRACE_SINGLEBLOCK = 0xc
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
PTRACE_TE_ABORT_RAND = 0x5011
PTRACE_TRACEME = 0x0
PT_ACR0 = 0x90
PT_ACR1 = 0x94
PT_ACR10 = 0xb8
PT_ACR11 = 0xbc
PT_ACR12 = 0xc0
PT_ACR13 = 0xc4
PT_ACR14 = 0xc8
PT_ACR15 = 0xcc
PT_ACR2 = 0x98
PT_ACR3 = 0x9c
PT_ACR4 = 0xa0
PT_ACR5 = 0xa4
PT_ACR6 = 0xa8
PT_ACR7 = 0xac
PT_ACR8 = 0xb0
PT_ACR9 = 0xb4
PT_CR_10 = 0x168
PT_CR_11 = 0x170
PT_CR_9 = 0x160
PT_ENDREGS = 0x1af
PT_FPC = 0xd8
PT_FPR0 = 0xe0
PT_FPR1 = 0xe8
PT_FPR10 = 0x130
PT_FPR11 = 0x138
PT_FPR12 = 0x140
PT_FPR13 = 0x148
PT_FPR14 = 0x150
PT_FPR15 = 0x158
PT_FPR2 = 0xf0
PT_FPR3 = 0xf8
PT_FPR4 = 0x100
PT_FPR5 = 0x108
PT_FPR6 = 0x110
PT_FPR7 = 0x118
PT_FPR8 = 0x120
PT_FPR9 = 0x128
PT_GPR0 = 0x10
PT_GPR1 = 0x18
PT_GPR10 = 0x60
PT_GPR11 = 0x68
PT_GPR12 = 0x70
PT_GPR13 = 0x78
PT_GPR14 = 0x80
PT_GPR15 = 0x88
PT_GPR2 = 0x20
PT_GPR3 = 0x28
PT_GPR4 = 0x30
PT_GPR5 = 0x38
PT_GPR6 = 0x40
PT_GPR7 = 0x48
PT_GPR8 = 0x50
PT_GPR9 = 0x58
PT_IEEE_IP = 0x1a8
PT_LASTOFF = 0x1a8
PT_ORIGGPR2 = 0xd0
PT_PSWADDR = 0x8
PT_PSWMASK = 0x0
QNX4_SUPER_MAGIC = 0x2f
QNX6_SUPER_MAGIC = 0x68191122
RAMFS_MAGIC = 0x858458f6
RDTGROUP_SUPER_MAGIC = 0x7655821
REISERFS_SUPER_MAGIC = 0x52654973
RENAME_EXCHANGE = 0x2
RENAME_NOREPLACE = 0x1
RENAME_WHITEOUT = 0x4
RLIMIT_AS = 0x9
RLIMIT_CORE = 0x4
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_LOCKS = 0xa
RLIMIT_MEMLOCK = 0x8
RLIMIT_MSGQUEUE = 0xc
RLIMIT_NICE = 0xd
RLIMIT_NOFILE = 0x7
RLIMIT_NPROC = 0x6
RLIMIT_RSS = 0x5
RLIMIT_RTPRIO = 0xe
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7
RTAX_FASTOPEN_NO_COOKIE = 0x11
RTAX_FEATURES = 0xc
RTAX_FEATURE_ALLFRAG = 0x8
RTAX_FEATURE_ECN = 0x1
RTAX_FEATURE_MASK = 0xf
RTAX_FEATURE_SACK = 0x2
RTAX_FEATURE_TIMESTAMP = 0x4
RTAX_HOPLIMIT = 0xa
RTAX_INITCWND = 0xb
RTAX_INITRWND = 0xe
RTAX_LOCK = 0x1
RTAX_MAX = 0x11
RTAX_MTU = 0x2
RTAX_QUICKACK = 0xf
RTAX_REORDERING = 0x9
RTAX_RTO_MIN = 0xd
RTAX_RTT = 0x4
RTAX_RTTVAR = 0x5
RTAX_SSTHRESH = 0x6
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
RTA_MAX = 0x1d
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
RTCF_MASQ = 0x400000
RTCF_NAT = 0x800000
RTCF_VALVE = 0x200000
RTC_AF = 0x20
RTC_AIE_OFF = 0x7002
RTC_AIE_ON = 0x7001
RTC_ALM_READ = 0x80247008
RTC_ALM_SET = 0x40247007
RTC_EPOCH_READ = 0x8008700d
RTC_EPOCH_SET = 0x4008700e
RTC_IRQF = 0x80
RTC_IRQP_READ = 0x8008700b
RTC_IRQP_SET = 0x4008700c
RTC_MAX_FREQ = 0x2000
RTC_PF = 0x40
RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x80207011
RTC_PLL_SET = 0x40207012
RTC_RD_TIME = 0x80247009
RTC_SET_TIME = 0x4024700a
RTC_UF = 0x10
RTC_UIE_OFF = 0x7004
RTC_UIE_ON = 0x7003
RTC_VL_CLR = 0x7014
RTC_VL_READ = 0x80047013
RTC_WIE_OFF = 0x7010
RTC_WIE_ON = 0x700f
RTC_WKALM_RD = 0x80287010
RTC_WKALM_SET = 0x4028700f
RTF_ADDRCLASSMASK = 0xf8000000
RTF_ADDRCONF = 0x40000
RTF_ALLONLINK = 0x20000
RTF_BROADCAST = 0x10000000
RTF_CACHE = 0x1000000
RTF_DEFAULT = 0x10000
RTF_DYNAMIC = 0x10
RTF_FLOW = 0x2000000
RTF_GATEWAY = 0x2
RTF_HOST = 0x4
RTF_INTERFACE = 0x40000000
RTF_IRTT = 0x100
RTF_LINKRT = 0x100000
RTF_LOCAL = 0x80000000
RTF_MODIFIED = 0x20
RTF_MSS = 0x40
RTF_MTU = 0x40
RTF_MULTICAST = 0x20000000
RTF_NAT = 0x8000000
RTF_NOFORWARD = 0x1000
RTF_NONEXTHOP = 0x200000
RTF_NOPMTUDISC = 0x4000
RTF_POLICY = 0x4000000
RTF_REINSTATE = 0x8
RTF_REJECT = 0x200
RTF_STATIC = 0x400
RTF_THROW = 0x2000
RTF_UP = 0x1
RTF_WINDOW = 0x80
RTF_XRESOLVE = 0x800
RTM_BASE = 0x10
RTM_DELACTION = 0x31
RTM_DELADDR = 0x15
RTM_DELADDRLABEL = 0x49
RTM_DELCHAIN = 0x65
RTM_DELLINK = 0x11
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
RTM_DELRULE = 0x21
RTM_DELTCLASS = 0x29
RTM_DELTFILTER = 0x2d
RTM_F_CLONED = 0x200
RTM_F_EQUALIZE = 0x400
RTM_F_FIB_MATCH = 0x2000
RTM_F_LOOKUP_TABLE = 0x1000
RTM_F_NOTIFY = 0x100
RTM_F_PREFIX = 0x800
RTM_GETACTION = 0x32
RTM_GETADDR = 0x16
RTM_GETADDRLABEL = 0x4a
RTM_GETANYCAST = 0x3e
RTM_GETCHAIN = 0x66
RTM_GETDCB = 0x4e
RTM_GETLINK = 0x12
RTM_GETMDB = 0x56
RTM_GETMULTICAST = 0x3a
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
RTM_GETRULE = 0x22
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
RTM_MAX = 0x67
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
RTM_NEWCACHEREPORT = 0x60
RTM_NEWCHAIN = 0x64
RTM_NEWLINK = 0x10
RTM_NEWMDB = 0x54
RTM_NEWNDUSEROPT = 0x44
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
RTM_NEWROUTE = 0x18
RTM_NEWRULE = 0x20
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
RTM_NR_FAMILIES = 0x16
RTM_NR_MSGTYPES = 0x58
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
RTNH_ALIGNTO = 0x4
RTNH_COMPARE_MASK = 0x19
RTNH_F_DEAD = 0x1
RTNH_F_LINKDOWN = 0x10
RTNH_F_OFFLOAD = 0x8
RTNH_F_ONLINK = 0x4
RTNH_F_PERVASIVE = 0x2
RTNH_F_UNRESOLVED = 0x20
RTN_MAX = 0xb
RTPROT_BABEL = 0x2a
RTPROT_BGP = 0xba
RTPROT_BIRD = 0xc
RTPROT_BOOT = 0x3
RTPROT_DHCP = 0x10
RTPROT_DNROUTED = 0xd
RTPROT_EIGRP = 0xc0
RTPROT_GATED = 0x8
RTPROT_ISIS = 0xbb
RTPROT_KERNEL = 0x2
RTPROT_MROUTED = 0x11
RTPROT_MRT = 0xa
RTPROT_NTK = 0xf
RTPROT_OSPF = 0xbc
RTPROT_RA = 0x9
RTPROT_REDIRECT = 0x1
RTPROT_RIP = 0xbd
RTPROT_STATIC = 0x4
RTPROT_UNSPEC = 0x0
RTPROT_XORP = 0xe
RTPROT_ZEBRA = 0xb
RT_CLASS_DEFAULT = 0xfd
RT_CLASS_LOCAL = 0xff
RT_CLASS_MAIN = 0xfe
RT_CLASS_MAX = 0xff
RT_CLASS_UNSPEC = 0x0
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1
SCM_CREDENTIALS = 0x2
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x1d
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SC_LOG_FLUSH = 0x100000
SECCOMP_MODE_DISABLED = 0x0
SECCOMP_MODE_FILTER = 0x2
SECCOMP_MODE_STRICT = 0x1
SECURITYFS_MAGIC = 0x73636673
SELINUX_MAGIC = 0xf97cff8c
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
SIOCADDDLCI = 0x8980
SIOCADDMULTI = 0x8931
SIOCADDRT = 0x890b
SIOCATMARK = 0x8905
SIOCBONDCHANGEACTIVE = 0x8995
SIOCBONDENSLAVE = 0x8990
SIOCBONDINFOQUERY = 0x8994
SIOCBONDRELEASE = 0x8991
SIOCBONDSETHWADDR = 0x8992
SIOCBONDSLAVEINFOQUERY = 0x8993
SIOCBRADDBR = 0x89a0
SIOCBRADDIF = 0x89a2
SIOCBRDELBR = 0x89a1
SIOCBRDELIF = 0x89a3
SIOCDARP = 0x8953
SIOCDELDLCI = 0x8981
SIOCDELMULTI = 0x8932
SIOCDELRT = 0x890c
SIOCDEVPRIVATE = 0x89f0
SIOCDIFADDR = 0x8936
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
SIOCGIFBRDADDR = 0x8919
SIOCGIFCONF = 0x8912
SIOCGIFCOUNT = 0x8938
SIOCGIFDSTADDR = 0x8917
SIOCGIFENCAP = 0x8925
SIOCGIFFLAGS = 0x8913
SIOCGIFHWADDR = 0x8927
SIOCGIFINDEX = 0x8933
SIOCGIFMAP = 0x8970
SIOCGIFMEM = 0x891f
SIOCGIFMETRIC = 0x891d
SIOCGIFMTU = 0x8921
SIOCGIFNAME = 0x8910
SIOCGIFNETMASK = 0x891b
SIOCGIFPFLAGS = 0x8935
SIOCGIFSLAVE = 0x8929
SIOCGIFTXQLEN = 0x8942
SIOCGIFVLAN = 0x8982
SIOCGMIIPHY = 0x8947
SIOCGMIIREG = 0x8948
SIOCGPGRP = 0x8904
SIOCGPPPCSTATS = 0x89f2
SIOCGPPPSTATS = 0x89f0
SIOCGPPPVER = 0x89f1
SIOCGRARP = 0x8961
SIOCGSKNS = 0x894c
SIOCGSTAMP = 0x8906
SIOCGSTAMPNS = 0x8907
SIOCINQ = 0x541b
SIOCOUTQ = 0x5411
SIOCOUTQNSD = 0x894b
SIOCPROTOPRIVATE = 0x89e0
SIOCRTMSG = 0x890d
SIOCSARP = 0x8955
SIOCSHWTSTAMP = 0x89b0
SIOCSIFADDR = 0x8916
SIOCSIFBR = 0x8941
SIOCSIFBRDADDR = 0x891a
SIOCSIFDSTADDR = 0x8918
SIOCSIFENCAP = 0x8926
SIOCSIFFLAGS = 0x8914
SIOCSIFHWADDR = 0x8924
SIOCSIFHWBROADCAST = 0x8937
SIOCSIFLINK = 0x8911
SIOCSIFMAP = 0x8971
SIOCSIFMEM = 0x8920
SIOCSIFMETRIC = 0x891e
SIOCSIFMTU = 0x8922
SIOCSIFNAME = 0x8923
SIOCSIFNETMASK = 0x891c
SIOCSIFPFLAGS = 0x8934
SIOCSIFSLAVE = 0x8930
SIOCSIFTXQLEN = 0x8943
SIOCSIFVLAN = 0x8983
SIOCSMIIREG = 0x8949
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMACK_MAGIC = 0x43415d53
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SMB_SUPER_MAGIC = 0x517b
SOCKFS_MAGIC = 0x534f434b
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
SOCK_IOC_TYPE = 0x89
SOCK_NONBLOCK = 0x800
SOCK_PACKET = 0xa
SOCK_RAW = 0x3
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
SOL_AAL = 0x109
SOL_ALG = 0x117
SOL_ATM = 0x108
SOL_CAIF = 0x116
SOL_CAN_BASE = 0x64
SOL_DCCP = 0x10d
SOL_DECNET = 0x105
SOL_ICMPV6 = 0x3a
SOL_IP = 0x0
SOL_IPV6 = 0x29
SOL_IRDA = 0x10a
SOL_IUCV = 0x115
SOL_KCM = 0x119
SOL_LLC = 0x10c
SOL_NETBEUI = 0x10b
SOL_NETLINK = 0x10e
SOL_NFC = 0x118
SOL_PACKET = 0x107
SOL_PNPIPE = 0x113
SOL_PPPOL2TP = 0x111
SOL_RAW = 0xff
SOL_RDS = 0x114
SOL_RXRPC = 0x110
SOL_SOCKET = 0x1
SOL_TCP = 0x6
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
SO_ATTACH_FILTER = 0x1a
SO_ATTACH_REUSEPORT_CBPF = 0x33
SO_ATTACH_REUSEPORT_EBPF = 0x34
SO_BINDTODEVICE = 0x19
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
SO_BUSY_POLL = 0x2e
SO_CNX_ADVICE = 0x35
SO_COOKIE = 0x39
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_ERROR = 0x4
SO_GET_FILTER = 0x1a
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37
SO_NOFCS = 0x2b
SO_NO_CHECK = 0xb
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
SO_PEERGROUPS = 0x3b
SO_PEERNAME = 0x1c
SO_PEERSEC = 0x1f
SO_PRIORITY = 0xc
SO_PROTOCOL = 0x26
SO_RCVBUF = 0x8
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x12
SO_RCVTIMEO = 0x14
SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28
SO_SECURITY_AUTHENTICATION = 0x16
SO_SECURITY_ENCRYPTION_NETWORK = 0x18
SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
SO_SELECT_ERR_QUEUE = 0x2d
SO_SNDBUF = 0x7
SO_SNDBUFFORCE = 0x20
SO_SNDLOWAT = 0x13
SO_SNDTIMEO = 0x15
SO_TIMESTAMP = 0x1d
SO_TIMESTAMPING = 0x25
SO_TIMESTAMPNS = 0x23
SO_TXTIME = 0x3d
SO_TYPE = 0x3
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
SO_VM_SOCKETS_TRUSTED = 0x5
SO_WIFI_STATUS = 0x29
SO_ZEROCOPY = 0x3c
SPLICE_F_GIFT = 0x8
SPLICE_F_MORE = 0x4
SPLICE_F_MOVE = 0x1
SPLICE_F_NONBLOCK = 0x2
SQUASHFS_MAGIC = 0x73717368
STACK_END_MAGIC = 0x57ac6e9d
STATX_ALL = 0xfff
STATX_ATIME = 0x20
STATX_ATTR_APPEND = 0x20
STATX_ATTR_AUTOMOUNT = 0x1000
STATX_ATTR_COMPRESSED = 0x4
STATX_ATTR_ENCRYPTED = 0x800
STATX_ATTR_IMMUTABLE = 0x10
STATX_ATTR_NODUMP = 0x40
STATX_BASIC_STATS = 0x7ff
STATX_BLOCKS = 0x400
STATX_BTIME = 0x800
STATX_CTIME = 0x80
STATX_GID = 0x10
STATX_INO = 0x100
STATX_MODE = 0x2
STATX_MTIME = 0x40
STATX_NLINK = 0x4
STATX_SIZE = 0x200
STATX_TYPE = 0x1
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
S_IFCHR = 0x2000
S_IFDIR = 0x4000
S_IFIFO = 0x1000
S_IFLNK = 0xa000
S_IFMT = 0xf000
S_IFREG = 0x8000
S_IFSOCK = 0xc000
S_IREAD = 0x100
S_IRGRP = 0x20
S_IROTH = 0x4
S_IRUSR = 0x100
S_IRWXG = 0x38
S_IRWXO = 0x7
S_IRWXU = 0x1c0
S_ISGID = 0x400
S_ISUID = 0x800
S_ISVTX = 0x200
S_IWGRP = 0x10
S_IWOTH = 0x2
S_IWRITE = 0x80
S_IWUSR = 0x80
S_IXGRP = 0x8
S_IXOTH = 0x1
S_IXUSR = 0x40
TAB0 = 0x0
TAB1 = 0x800
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x540b
TCGETA = 0x5405
TCGETS = 0x5401
TCGETS2 = 0x802c542a
TCGETX = 0x5432
TCIFLUSH = 0x0
TCIOFF = 0x2
TCIOFLUSH = 0x2
TCION = 0x3
TCOFLUSH = 0x1
TCOOFF = 0x0
TCOON = 0x1
TCP_CC_INFO = 0x1a
TCP_CONGESTION = 0xd
TCP_COOKIE_IN_ALWAYS = 0x1
TCP_COOKIE_MAX = 0x10
TCP_COOKIE_MIN = 0x8
TCP_COOKIE_OUT_NEVER = 0x2
TCP_COOKIE_PAIR_SIZE = 0x20
TCP_COOKIE_TRANSACTIONS = 0xf
TCP_CORK = 0x3
TCP_DEFER_ACCEPT = 0x9
TCP_FASTOPEN = 0x17
TCP_FASTOPEN_CONNECT = 0x1e
TCP_FASTOPEN_KEY = 0x21
TCP_FASTOPEN_NO_COOKIE = 0x22
TCP_INFO = 0xb
TCP_KEEPCNT = 0x6
TCP_KEEPIDLE = 0x4
TCP_KEEPINTVL = 0x5
TCP_LINGER2 = 0x8
TCP_MAXSEG = 0x2
TCP_MAXWIN = 0xffff
TCP_MAX_WINSHIFT = 0xe
TCP_MD5SIG = 0xe
TCP_MD5SIG_EXT = 0x20
TCP_MD5SIG_FLAG_PREFIX = 0x1
TCP_MD5SIG_MAXKEYLEN = 0x50
TCP_MSS = 0x200
TCP_MSS_DEFAULT = 0x218
TCP_MSS_DESIRED = 0x4c4
TCP_NODELAY = 0x1
TCP_NOTSENT_LOWAT = 0x19
TCP_QUEUE_SEQ = 0x15
TCP_QUICKACK = 0xc
TCP_REPAIR = 0x13
TCP_REPAIR_OPTIONS = 0x16
TCP_REPAIR_QUEUE = 0x14
TCP_REPAIR_WINDOW = 0x1d
TCP_SAVED_SYN = 0x1c
TCP_SAVE_SYN = 0x1b
TCP_SYNCNT = 0x7
TCP_S_DATA_IN = 0x4
TCP_S_DATA_OUT = 0x8
TCP_THIN_DUPACK = 0x11
TCP_THIN_LINEAR_TIMEOUTS = 0x10
TCP_TIMESTAMP = 0x18
TCP_ULP = 0x1f
TCP_USER_TIMEOUT = 0x12
TCP_WINDOW_CLAMP = 0xa
TCSAFLUSH = 0x2
TCSBRK = 0x5409
TCSBRKP = 0x5425
TCSETA = 0x5406
TCSETAF = 0x5408
TCSETAW = 0x5407
TCSETS = 0x5402
TCSETS2 = 0x402c542b
TCSETSF = 0x5404
TCSETSF2 = 0x402c542d
TCSETSW = 0x5403
TCSETSW2 = 0x402c542c
TCSETX = 0x5433
TCSETXF = 0x5434
TCSETXW = 0x5435
TCXONC = 0x540a
TIOCCBRK = 0x5428
TIOCCONS = 0x541d
TIOCEXCL = 0x540c
TIOCGDEV = 0x80045432
TIOCGETD = 0x5424
TIOCGEXCL = 0x80045440
TIOCGICOUNT = 0x545d
TIOCGLCKTRMIOS = 0x5456
TIOCGPGRP = 0x540f
TIOCGPKT = 0x80045438
TIOCGPTLCK = 0x80045439
TIOCGPTN = 0x80045430
TIOCGPTPEER = 0x5441
TIOCGRS485 = 0x542e
TIOCGSERIAL = 0x541e
TIOCGSID = 0x5429
TIOCGSOFTCAR = 0x5419
TIOCGWINSZ = 0x5413
TIOCINQ = 0x541b
TIOCLINUX = 0x541c
TIOCMBIC = 0x5417
TIOCMBIS = 0x5416
TIOCMGET = 0x5415
TIOCMIWAIT = 0x545c
TIOCMSET = 0x5418
TIOCM_CAR = 0x40
TIOCM_CD = 0x40
TIOCM_CTS = 0x20
TIOCM_DSR = 0x100
TIOCM_DTR = 0x2
TIOCM_LE = 0x1
TIOCM_RI = 0x80
TIOCM_RNG = 0x80
TIOCM_RTS = 0x4
TIOCM_SR = 0x10
TIOCM_ST = 0x8
TIOCNOTTY = 0x5422
TIOCNXCL = 0x540d
TIOCOUTQ = 0x5411
TIOCPKT = 0x5420
TIOCPKT_DATA = 0x0
TIOCPKT_DOSTOP = 0x20
TIOCPKT_FLUSHREAD = 0x1
TIOCPKT_FLUSHWRITE = 0x2
TIOCPKT_IOCTL = 0x40
TIOCPKT_NOSTOP = 0x10
TIOCPKT_START = 0x8
TIOCPKT_STOP = 0x4
TIOCSBRK = 0x5427
TIOCSCTTY = 0x540e
TIOCSERCONFIG = 0x5453
TIOCSERGETLSR = 0x5459
TIOCSERGETMULTI = 0x545a
TIOCSERGSTRUCT = 0x5458
TIOCSERGWILD = 0x5454
TIOCSERSETMULTI = 0x545b
TIOCSERSWILD = 0x5455
TIOCSER_TEMT = 0x1
TIOCSETD = 0x5423
TIOCSIG = 0x40045436
TIOCSLCKTRMIOS = 0x5457
TIOCSPGRP = 0x5410
TIOCSPTLCK = 0x40045431
TIOCSRS485 = 0x542f
TIOCSSERIAL = 0x541f
TIOCSSOFTCAR = 0x541a
TIOCSTI = 0x5412
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x100
TPACKET_ALIGNMENT = 0x10
TPACKET_HDRLEN = 0x34
TP_STATUS_AVAILABLE = 0x0
TP_STATUS_BLK_TMO = 0x20
TP_STATUS_COPY = 0x2
TP_STATUS_CSUMNOTREADY = 0x8
TP_STATUS_CSUM_VALID = 0x80
TP_STATUS_KERNEL = 0x0
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
TP_STATUS_TS_RAW_HARDWARE = -0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
TP_STATUS_VLAN_TPID_VALID = 0x40
TP_STATUS_VLAN_VALID = 0x10
TP_STATUS_WRONG_FORMAT = 0x4
TRACEFS_MAGIC = 0x74726163
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x401054d5
TUNDETACHFILTER = 0x401054d6
TUNGETFEATURES = 0x800454cf
TUNGETFILTER = 0x801054db
TUNGETIFF = 0x800454d2
TUNGETSNDBUF = 0x800454d3
TUNGETVNETBE = 0x800454df
TUNGETVNETHDRSZ = 0x800454d7
TUNGETVNETLE = 0x800454dd
TUNSETDEBUG = 0x400454c9
TUNSETFILTEREBPF = 0x800454e1
TUNSETGROUP = 0x400454ce
TUNSETIFF = 0x400454ca
TUNSETIFINDEX = 0x400454da
TUNSETLINK = 0x400454cd
TUNSETNOCSUM = 0x400454c8
TUNSETOFFLOAD = 0x400454d0
TUNSETOWNER = 0x400454cc
TUNSETPERSIST = 0x400454cb
TUNSETQUEUE = 0x400454d9
TUNSETSNDBUF = 0x400454d4
TUNSETSTEERINGEBPF = 0x800454e0
TUNSETTXFILTER = 0x400454d1
TUNSETVNETBE = 0x400454de
TUNSETVNETHDRSZ = 0x400454d8
TUNSETVNETLE = 0x400454dc
UBI_IOCATT = 0x40186f40
UBI_IOCDET = 0x40046f41
UBI_IOCEBCH = 0x40044f02
UBI_IOCEBER = 0x40044f01
UBI_IOCEBISMAP = 0x80044f05
UBI_IOCEBMAP = 0x40084f03
UBI_IOCEBUNMAP = 0x40044f04
UBI_IOCMKVOL = 0x40986f00
UBI_IOCRMVOL = 0x40046f01
UBI_IOCRNVOL = 0x51106f03
UBI_IOCRSVOL = 0x400c6f02
UBI_IOCSETVOLPROP = 0x40104f06
UBI_IOCVOLCRBLK = 0x40804f07
UBI_IOCVOLRMBLK = 0x4f08
UBI_IOCVOLUP = 0x40084f00
UDF_SUPER_MAGIC = 0x15013346
UMOUNT_NOFOLLOW = 0x8
USBDEVICE_SUPER_MAGIC = 0x9fa2
UTIME_NOW = 0x3fffffff
UTIME_OMIT = 0x3ffffffe
V9FS_MAGIC = 0x1021997
VDISCARD = 0xd
VEOF = 0x4
VEOL = 0xb
VEOL2 = 0x10
VERASE = 0x2
VINTR = 0x0
VKILL = 0x3
VLNEXT = 0xf
VMADDR_CID_ANY = 0xffffffff
VMADDR_CID_HOST = 0x2
VMADDR_CID_HYPERVISOR = 0x0
VMADDR_CID_RESERVED = 0x1
VMADDR_PORT_ANY = 0xffffffff
VMIN = 0x6
VM_SOCKETS_INVALID_VERSION = 0xffffffff
VQUIT = 0x1
VREPRINT = 0xc
VSTART = 0x8
VSTOP = 0x9
VSUSP = 0xa
VSWTC = 0x7
VT0 = 0x0
VT1 = 0x4000
VTDLY = 0x4000
VTIME = 0x5
VWERASE = 0xe
WALL = 0x40000000
WCLONE = 0x80000000
WCONTINUED = 0x8
WDIOC_GETBOOTSTATUS = 0x80045702
WDIOC_GETPRETIMEOUT = 0x80045709
WDIOC_GETSTATUS = 0x80045701
WDIOC_GETSUPPORT = 0x80285700
WDIOC_GETTEMP = 0x80045703
WDIOC_GETTIMELEFT = 0x8004570a
WDIOC_GETTIMEOUT = 0x80045707
WDIOC_KEEPALIVE = 0x80045705
WDIOC_SETOPTIONS = 0x80045704
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000
WORDSIZE = 0x40
WSTOPPED = 0x2
WUNTRACED = 0x2
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
XDP_COPY = 0x2
XDP_FLAGS_DRV_MODE = 0x4
XDP_FLAGS_HW_MODE = 0x8
XDP_FLAGS_MASK = 0xf
XDP_FLAGS_MODES = 0xe
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
XDP_RX_RING = 0x2
XDP_SHARED_UMEM = 0x1
XDP_STATISTICS = 0x7
XDP_TX_RING = 0x3
XDP_UMEM_COMPLETION_RING = 0x6
XDP_UMEM_FILL_RING = 0x5
XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
XDP_UMEM_PGOFF_FILL_RING = 0x100000000
XDP_UMEM_REG = 0x4
XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0x1800
ZSMALLOC_MAGIC = 0x58295829
)
// Errors
const (
E2BIG = syscall.Errno(0x7)
EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
ECONNREFUSED = syscall.Errno(0x6f)
ECONNRESET = syscall.Errno(0x68)
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
EEXIST = syscall.Errno(0x11)
EFAULT = syscall.Errno(0xe)
EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
EINTR = syscall.Errno(0x4)
EINVAL = syscall.Errno(0x16)
EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
EKEYREVOKED = syscall.Errno(0x80)
EL2HLT = syscall.Errno(0x33)
EL2NSYNC = syscall.Errno(0x2d)
EL3HLT = syscall.Errno(0x2e)
EL3RST = syscall.Errno(0x2f)
ELIBACC = syscall.Errno(0x4f)
ELIBBAD = syscall.Errno(0x50)
ELIBEXEC = syscall.Errno(0x53)
ELIBMAX = syscall.Errno(0x52)
ELIBSCN = syscall.Errno(0x51)
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
EMFILE = syscall.Errno(0x18)
EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
ENAVAIL = syscall.Errno(0x77)
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
ENODEV = syscall.Errno(0x13)
ENOENT = syscall.Errno(0x2)
ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
ESPIPE = syscall.Errno(0x1d)
ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
EWOULDBLOCK = syscall.Errno(0xb)
EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
SIGABRT = syscall.Signal(0x6)
SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
SIGFPE = syscall.Signal(0x8)
SIGHUP = syscall.Signal(0x1)
SIGILL = syscall.Signal(0x4)
SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
SIGIOT = syscall.Signal(0x6)
SIGKILL = syscall.Signal(0x9)
SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
SIGQUIT = syscall.Signal(0x3)
SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
SIGTERM = syscall.Signal(0xf)
SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
SIGURG = syscall.Signal(0x17)
SIGUSR1 = syscall.Signal(0xa)
SIGUSR2 = syscall.Signal(0xc)
SIGVTALRM = syscall.Signal(0x1a)
SIGWINCH = syscall.Signal(0x1c)
SIGXCPU = syscall.Signal(0x18)
SIGXFSZ = syscall.Signal(0x19)
)
// Error table
var errorList = [...]struct {
num syscall.Errno
name string
desc string
}{
{1, "EPERM", "operation not permitted"},
{2, "ENOENT", "no such file or directory"},
{3, "ESRCH", "no such process"},
{4, "EINTR", "interrupted system call"},
{5, "EIO", "input/output error"},
{6, "ENXIO", "no such device or address"},
{7, "E2BIG", "argument list too long"},
{8, "ENOEXEC", "exec format error"},
{9, "EBADF", "bad file descriptor"},
{10, "ECHILD", "no child processes"},
{11, "EAGAIN", "resource temporarily unavailable"},
{12, "ENOMEM", "cannot allocate memory"},
{13, "EACCES", "permission denied"},
{14, "EFAULT", "bad address"},
{15, "ENOTBLK", "block device required"},
{16, "EBUSY", "device or resource busy"},
{17, "EEXIST", "file exists"},
{18, "EXDEV", "invalid cross-device link"},
{19, "ENODEV", "no such device"},
{20, "ENOTDIR", "not a directory"},
{21, "EISDIR", "is a directory"},
{22, "EINVAL", "invalid argument"},
{23, "ENFILE", "too many open files in system"},
{24, "EMFILE", "too many open files"},
{25, "ENOTTY", "inappropriate ioctl for device"},
{26, "ETXTBSY", "text file busy"},
{27, "EFBIG", "file too large"},
{28, "ENOSPC", "no space left on device"},
{29, "ESPIPE", "illegal seek"},
{30, "EROFS", "read-only file system"},
{31, "EMLINK", "too many links"},
{32, "EPIPE", "broken pipe"},
{33, "EDOM", "numerical argument out of domain"},
{34, "ERANGE", "numerical result out of range"},
{35, "EDEADLK", "resource deadlock avoided"},
{36, "ENAMETOOLONG", "file name too long"},
{37, "ENOLCK", "no locks available"},
{38, "ENOSYS", "function not implemented"},
{39, "ENOTEMPTY", "directory not empty"},
{40, "ELOOP", "too many levels of symbolic links"},
{42, "ENOMSG", "no message of desired type"},
{43, "EIDRM", "identifier removed"},
{44, "ECHRNG", "channel number out of range"},
{45, "EL2NSYNC", "level 2 not synchronized"},
{46, "EL3HLT", "level 3 halted"},
{47, "EL3RST", "level 3 reset"},
{48, "ELNRNG", "link number out of range"},
{49, "EUNATCH", "protocol driver not attached"},
{50, "ENOCSI", "no CSI structure available"},
{51, "EL2HLT", "level 2 halted"},
{52, "EBADE", "invalid exchange"},
{53, "EBADR", "invalid request descriptor"},
{54, "EXFULL", "exchange full"},
{55, "ENOANO", "no anode"},
{56, "EBADRQC", "invalid request code"},
{57, "EBADSLT", "invalid slot"},
{59, "EBFONT", "bad font file format"},
{60, "ENOSTR", "device not a stream"},
{61, "ENODATA", "no data available"},
{62, "ETIME", "timer expired"},
{63, "ENOSR", "out of streams resources"},
{64, "ENONET", "machine is not on the network"},
{65, "ENOPKG", "package not installed"},
{66, "EREMOTE", "object is remote"},
{67, "ENOLINK", "link has been severed"},
{68, "EADV", "advertise error"},
{69, "ESRMNT", "srmount error"},
{70, "ECOMM", "communication error on send"},
{71, "EPROTO", "protocol error"},
{72, "EMULTIHOP", "multihop attempted"},
{73, "EDOTDOT", "RFS specific error"},
{74, "EBADMSG", "bad message"},
{75, "EOVERFLOW", "value too large for defined data type"},
{76, "ENOTUNIQ", "name not unique on network"},
{77, "EBADFD", "file descriptor in bad state"},
{78, "EREMCHG", "remote address changed"},
{79, "ELIBACC", "can not access a needed shared library"},
{80, "ELIBBAD", "accessing a corrupted shared library"},
{81, "ELIBSCN", ".lib section in a.out corrupted"},
{82, "ELIBMAX", "attempting to link in too many shared libraries"},
{83, "ELIBEXEC", "cannot exec a shared library directly"},
{84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
{85, "ERESTART", "interrupted system call should be restarted"},
{86, "ESTRPIPE", "streams pipe error"},
{87, "EUSERS", "too many users"},
{88, "ENOTSOCK", "socket operation on non-socket"},
{89, "EDESTADDRREQ", "destination address required"},
{90, "EMSGSIZE", "message too long"},
{91, "EPROTOTYPE", "protocol wrong type for socket"},
{92, "ENOPROTOOPT", "protocol not available"},
{93, "EPROTONOSUPPORT", "protocol not supported"},
{94, "ESOCKTNOSUPPORT", "socket type not supported"},
{95, "ENOTSUP", "operation not supported"},
{96, "EPFNOSUPPORT", "protocol family not supported"},
{97, "EAFNOSUPPORT", "address family not supported by protocol"},
{98, "EADDRINUSE", "address already in use"},
{99, "EADDRNOTAVAIL", "cannot assign requested address"},
{100, "ENETDOWN", "network is down"},
{101, "ENETUNREACH", "network is unreachable"},
{102, "ENETRESET", "network dropped connection on reset"},
{103, "ECONNABORTED", "software caused connection abort"},
{104, "ECONNRESET", "connection reset by peer"},
{105, "ENOBUFS", "no buffer space available"},
{106, "EISCONN", "transport endpoint is already connected"},
{107, "ENOTCONN", "transport endpoint is not connected"},
{108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
{109, "ETOOMANYREFS", "too many references: cannot splice"},
{110, "ETIMEDOUT", "connection timed out"},
{111, "ECONNREFUSED", "connection refused"},
{112, "EHOSTDOWN", "host is down"},
{113, "EHOSTUNREACH", "no route to host"},
{114, "EALREADY", "operation already in progress"},
{115, "EINPROGRESS", "operation now in progress"},
{116, "ESTALE", "stale file handle"},
{117, "EUCLEAN", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
{121, "EREMOTEIO", "remote I/O error"},
{122, "EDQUOT", "disk quota exceeded"},
{123, "ENOMEDIUM", "no medium found"},
{124, "EMEDIUMTYPE", "wrong medium type"},
{125, "ECANCELED", "operation canceled"},
{126, "ENOKEY", "required key not available"},
{127, "EKEYEXPIRED", "key has expired"},
{128, "EKEYREVOKED", "key has been revoked"},
{129, "EKEYREJECTED", "key was rejected by service"},
{130, "EOWNERDEAD", "owner died"},
{131, "ENOTRECOVERABLE", "state not recoverable"},
{132, "ERFKILL", "operation not possible due to RF-kill"},
{133, "EHWPOISON", "memory page has hardware error"},
}
// Signal table
var signalList = [...]struct {
num syscall.Signal
name string
desc string
}{
{1, "SIGHUP", "hangup"},
{2, "SIGINT", "interrupt"},
{3, "SIGQUIT", "quit"},
{4, "SIGILL", "illegal instruction"},
{5, "SIGTRAP", "trace/breakpoint trap"},
{6, "SIGABRT", "aborted"},
{7, "SIGBUS", "bus error"},
{8, "SIGFPE", "floating point exception"},
{9, "SIGKILL", "killed"},
{10, "SIGUSR1", "user defined signal 1"},
{11, "SIGSEGV", "segmentation fault"},
{12, "SIGUSR2", "user defined signal 2"},
{13, "SIGPIPE", "broken pipe"},
{14, "SIGALRM", "alarm clock"},
{15, "SIGTERM", "terminated"},
{16, "SIGSTKFLT", "stack fault"},
{17, "SIGCHLD", "child exited"},
{18, "SIGCONT", "continued"},
{19, "SIGSTOP", "stopped (signal)"},
{20, "SIGTSTP", "stopped"},
{21, "SIGTTIN", "stopped (tty input)"},
{22, "SIGTTOU", "stopped (tty output)"},
{23, "SIGURG", "urgent I/O condition"},
{24, "SIGXCPU", "CPU time limit exceeded"},
{25, "SIGXFSZ", "file size limit exceeded"},
{26, "SIGVTALRM", "virtual timer expired"},
{27, "SIGPROF", "profiling timer expired"},
{28, "SIGWINCH", "window changed"},
{29, "SIGIO", "I/O possible"},
{30, "SIGPWR", "power failure"},
{31, "SIGSYS", "bad system call"},
}
```
|
```html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>basic_yield_context::callee_type</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="../basic_yield_context.html" title="basic_yield_context">
<link rel="prev" href="basic_yield_context/overload2.html" title="basic_yield_context::basic_yield_context (2 of 2 overloads)">
<link rel="next" href="caller_type.html" title="basic_yield_context::caller_type">
</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="basic_yield_context/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../basic_yield_context.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="caller_type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.basic_yield_context.callee_type"></a><a class="link" href="callee_type.html" title="basic_yield_context::callee_type">basic_yield_context::callee_type</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.basic_yield_context.callee_type"></a>
The
coroutine callee type, used by the implementation.
</p>
<pre class="programlisting">typedef implementation_defined callee_type;
</pre>
<p>
When using Boost.Coroutine v1, this type is:
</p>
<pre class="programlisting">typename coroutine<void()>
</pre>
<p>
When using Boost.Coroutine v2 (unidirectional coroutines), this type is:
</p>
<pre class="programlisting">push_coroutine<void>
</pre>
<h6>
<a name="boost_asio.reference.basic_yield_context.callee_type.h0"></a>
<span class="phrase"><a name="boost_asio.reference.basic_yield_context.callee_type.requirements"></a></span><a class="link" href="callee_type.html#boost_asio.reference.basic_yield_context.callee_type.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/spawn.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span>None
</p>
</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="basic_yield_context/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../basic_yield_context.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="caller_type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
```
|
Jon Inge Kjørum (born 23 May 1965) is a Norwegian former ski jumper.
Career
His best-known success was at the 1988 Winter Olympics, where he earned a bronze medal in the team large hill event. Kjørum also won a silver medal in the team large hill at the 1989 FIS Nordic World Ski Championships in Lahti.
World Cup
Standings
Wins
External links
1965 births
Living people
Norwegian male ski jumpers
Olympic ski jumpers for Norway
Olympic bronze medalists for Norway
Ski jumpers at the 1988 Winter Olympics
Olympic medalists in ski jumping
FIS Nordic World Ski Championships medalists in ski jumping
Medalists at the 1988 Winter Olympics
Sportspeople from Hamar
Skiers from Innlandet
|
```php
<?php
namespace ProtoneMedia\LaravelFFMpeg\Support;
use FFMpeg\FFProbe\DataMapping\Stream;
use Illuminate\Support\Str;
class StreamParser
{
private Stream $stream;
public function __construct(Stream $stream)
{
$this->stream = $stream;
}
public static function new(Stream $stream): StreamParser
{
return new static($stream);
}
public function getFrameRate(): ?string
{
$frameRate = trim(optional($this->stream)->get('avg_frame_rate'));
if (!$frameRate || Str::endsWith($frameRate, '/0')) {
return null;
}
if (Str::contains($frameRate, '/')) {
[$numerator, $denominator] = explode('/', $frameRate);
$frameRate = $numerator / $denominator;
}
return $frameRate ? number_format($frameRate, 3, '.', '') : null;
}
}
```
|
```pod
=encoding utf8
=head1 NAME
ffmpeg-resampler - FFmpeg Resampler
=head1 DESCRIPTION
The FFmpeg resampler provides a high-level interface to the
libswresample library audio resampling utilities. In particular it
allows one to perform audio resampling, audio channel layout rematrixing,
and convert audio format and packing layout.
=head1 RESAMPLER OPTIONS
The audio resampler supports the following named options.
Options may be set by specifying -I<option> I<value> in the
FFmpeg tools, I<option>=I<value> for the aresample filter,
by setting the value explicitly in the
C<SwrContext> options or using the F<libavutil/opt.h> API for
programmatic use.
=over 4
=item B<ich, in_channel_count>
Set the number of input channels. Default value is 0. Setting this
value is not mandatory if the corresponding channel layout
B<in_channel_layout> is set.
=item B<och, out_channel_count>
Set the number of output channels. Default value is 0. Setting this
value is not mandatory if the corresponding channel layout
B<out_channel_layout> is set.
=item B<uch, used_channel_count>
Set the number of used input channels. Default value is 0. This option is
only used for special remapping.
=item B<isr, in_sample_rate>
Set the input sample rate. Default value is 0.
=item B<osr, out_sample_rate>
Set the output sample rate. Default value is 0.
=item B<isf, in_sample_fmt>
Specify the input sample format. It is set by default to C<none>.
=item B<osf, out_sample_fmt>
Specify the output sample format. It is set by default to C<none>.
=item B<tsf, internal_sample_fmt>
Set the internal sample format. Default value is C<none>.
This will automatically be chosen when it is not explicitly set.
=item B<icl, in_channel_layout>
=item B<ocl, out_channel_layout>
Set the input/output channel layout.
See B<the Channel Layout section in the ffmpeg-utils(1) manual>
for the required syntax.
=item B<clev, center_mix_level>
Set the center mix level. It is a value expressed in deciBel, and must be
in the interval [-32,32].
=item B<slev, surround_mix_level>
Set the surround mix level. It is a value expressed in deciBel, and must
be in the interval [-32,32].
=item B<lfe_mix_level>
Set LFE mix into non LFE level. It is used when there is a LFE input but no
LFE output. It is a value expressed in deciBel, and must
be in the interval [-32,32].
=item B<rmvol, rematrix_volume>
Set rematrix volume. Default value is 1.0.
=item B<rematrix_maxval>
Set maximum output value for rematrixing.
This can be used to prevent clipping vs. preventing volume reduction.
A value of 1.0 prevents clipping.
=item B<flags, swr_flags>
Set flags used by the converter. Default value is 0.
It supports the following individual flags:
=over 4
=item B<res>
force resampling, this flag forces resampling to be used even when the
input and output sample rates match.
=back
=item B<dither_scale>
Set the dither scale. Default value is 1.
=item B<dither_method>
Set dither method. Default value is 0.
Supported values:
=over 4
=item B<rectangular>
select rectangular dither
=item B<triangular>
select triangular dither
=item B<triangular_hp>
select triangular dither with high pass
=item B<lipshitz>
select Lipshitz noise shaping dither.
=item B<shibata>
select Shibata noise shaping dither.
=item B<low_shibata>
select low Shibata noise shaping dither.
=item B<high_shibata>
select high Shibata noise shaping dither.
=item B<f_weighted>
select f-weighted noise shaping dither
=item B<modified_e_weighted>
select modified-e-weighted noise shaping dither
=item B<improved_e_weighted>
select improved-e-weighted noise shaping dither
=back
=item B<resampler>
Set resampling engine. Default value is swr.
Supported values:
=over 4
=item B<swr>
select the native SW Resampler; filter options precision and cheby are not
applicable in this case.
=item B<soxr>
select the SoX Resampler (where available); compensation, and filter options
filter_size, phase_shift, exact_rational, filter_type & kaiser_beta, are not
applicable in this case.
=back
=item B<filter_size>
For swr only, set resampling filter size, default value is 32.
=item B<phase_shift>
For swr only, set resampling phase shift, default value is 10, and must be in
the interval [0,30].
=item B<linear_interp>
Use linear interpolation if set to 1, default value is 0.
=item B<exact_rational>
For swr only, when enabled, try to use exact phase_count based on input and
output sample rate. However, if it is larger than C<1 E<lt>E<lt> phase_shift>,
the phase_count will be C<1 E<lt>E<lt> phase_shift> as fallback. Default is disabled.
=item B<cutoff>
Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr
(which, with a sample-rate of 44100, preserves the entire audio band to 20kHz).
=item B<precision>
For soxr only, the precision in bits to which the resampled signal will be
calculated. The default value of 20 (which, with suitable dithering, is
appropriate for a destination bit-depth of 16) gives SoX's 'High Quality'; a
value of 28 gives SoX's 'Very High Quality'.
=item B<cheby>
For soxr only, selects passband rolloff none (Chebyshev) & higher-precision
approximation for 'irrational' ratios. Default value is 0.
=item B<async>
For swr only, simple 1 parameter audio sync to timestamps using stretching,
squeezing, filling and trimming. Setting this to 1 will enable filling and
trimming, larger values represent the maximum amount in samples that the data
may be stretched or squeezed for each second.
Default value is 0, thus no compensation is applied to make the samples match
the audio timestamps.
=item B<first_pts>
For swr only, assume the first pts should be this value. The time unit is 1 / sample rate.
This allows for padding/trimming at the start of stream. By default, no
assumption is made about the first frame's expected pts, so no padding or
trimming is done. For example, this could be set to 0 to pad the beginning with
silence if an audio stream starts after the video stream or to trim any samples
with a negative pts due to encoder delay.
=item B<min_comp>
For swr only, set the minimum difference between timestamps and audio data (in
seconds) to trigger stretching/squeezing/filling or trimming of the
data to make it match the timestamps. The default is that
stretching/squeezing/filling and trimming is disabled
(B<min_comp> = C<FLT_MAX>).
=item B<min_hard_comp>
For swr only, set the minimum difference between timestamps and audio data (in
seconds) to trigger adding/dropping samples to make it match the
timestamps. This option effectively is a threshold to select between
hard (trim/fill) and soft (squeeze/stretch) compensation. Note that
all compensation is by default disabled through B<min_comp>.
The default is 0.1.
=item B<comp_duration>
For swr only, set duration (in seconds) over which data is stretched/squeezed
to make it match the timestamps. Must be a non-negative double float value,
default value is 1.0.
=item B<max_soft_comp>
For swr only, set maximum factor by which data is stretched/squeezed to make it
match the timestamps. Must be a non-negative double float value, default value
is 0.
=item B<matrix_encoding>
Select matrixed stereo encoding.
It accepts the following values:
=over 4
=item B<none>
select none
=item B<dolby>
select Dolby
=item B<dplii>
select Dolby Pro Logic II
=back
Default value is C<none>.
=item B<filter_type>
For swr only, select resampling filter type. This only affects resampling
operations.
It accepts the following values:
=over 4
=item B<cubic>
select cubic
=item B<blackman_nuttall>
select Blackman Nuttall windowed sinc
=item B<kaiser>
select Kaiser windowed sinc
=back
=item B<kaiser_beta>
For swr only, set Kaiser window beta value. Must be a double float value in the
interval [2,16], default value is 9.
=item B<output_sample_bits>
For swr only, set number of used output sample bits for dithering. Must be an integer in the
interval [0,64], default value is 0, which means it's not used.
=back
=head1 SEE ALSO
ffmpeg(1), ffplay(1), ffprobe(1), ffserver(1), libswresample(3)
=head1 AUTHORS
The FFmpeg developers.
For details about the authorship, see the Git history of the project
(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
B<git log> in the FFmpeg source directory, or browsing the
online repository at E<lt>B<path_to_url
Maintainers for the specific components are listed in the file
F<MAINTAINERS> in the source code tree.
```
|
Robert (Bob) J. Kabel is an American lawyer. He is a Republican attorney, lobbyist, and former National Committeeman of the District of Columbia Republican Committee. In this capacity, he was a member of the Republican National Committee. Previously, he was Chairman of the D.C. Republican Committee from December 2004 through January 2013.
Kabel served on the Presidential Advisory Council on HIV/AIDS and its International Committee during the George W. Bush Administration He has also been involved with the Whitman-Walker Clinic, where he was a fundraiser.
He has been involved in Republican politics throughout his career; during the Presidency of Ronald Reagan, Kabel served for three years as Special Assistant to President Reagan for Legislative Affairs. He is a former Legislative Director for Senator Richard Lugar (R-IN)and former Legislative Assistant to Senator Paul Fannin (R-AZ). He also served as a part-time member of the Foreign Claims Settlement Commission.
Kabel was the chairman of the Log Cabin Republicans from 1993 to 1999 and 2014-2016. He also served as chairman of the Liberty Education Forum, which is the think-tank arm of the Log Cabin Republicans. From 2000 to 2004, Kabel was vice chairman of the District of Columbia Republican Committee. He led the party to write its first platform, which explicitly opposed a federal constitutional amendment to ban same-sex marriage, the only state-level Republican Party to do so. In December 2004 he was voted the chairman, becoming the first openly gay chair of a state-level Republican Committee.
In 2016, Kabel published a memoir, Inside and Out: the Odyssey of a Gay Conservative.
Notes
Living people
Year of birth missing (living people)
American lawyers
Washington, D.C., Republicans
Republican National Committee members
|
Jeanne Victorine Margaine-Lacroix (3 December 1868–15 August 1930) was a French couturier of the early 20th-century. The House Margaine-Lacroix is mainly known today for having revolutionized the world of fashion by creating the so-called Sylphide or Tanagréenne dress, cut to be worn without a corset.
Born in Paris in 1868, she was the daughter of couturier Armandine Fresnais-Margaine (1835-1899) and watchmaker François Arsène Margaine. In 1889 she married Philippe Léonard Lacroix (1862-1924), a tailor. Their daughter, Yvonne Lacroix (1892-1944), became in 1909 the first woman crowned champion of France in figure skating.
Maison Margaine was founded in Paris in 1889 by Mme. Armandine Fresnais-Margaine.
At the Exposition Universelle in Paris in 1889, the Margaine house obtained a gold medal for its creations and the press already was commenting on the contribution of Jeanne Margaine-Lacroix, the designer's daughter, in particular for her flower designs.
The house was renamed Maison Margaine-Lacroix when Jeanne Margaine-Lacroix assumed ownership on the death of her mother in 1899. Margaine-Lacroix was a member of the Collectivité de la Couture which exhibited models in the Salon des Lumières at the 1900 Exposition Universelle in Paris.
The Margaine-Lacroix fashion house was largely forgotten by historians of fashion for many years, but recently scholars have rediscovered the impact the house had on couture in the early 20th-century. Its innovations included the then popular robe styles "Tanagra" in 1889 which was worn with a modified corset. This was followed in 1904 by "Sylphide", which caused a stir among fashionistas of the time as its design replaced stays with an "ingenious" built-in stretchy lining. Jeanne Margaine-Lacroix "worked closely with manufacturers to develop modernized soft knit and front-lacing undergarments that enabled greater freedom of motion". Wanting women to look more natural, she removed traditional corsets from her designs in favour of soft knit and front-lacing underwear, which caused a sensation at the time as her designs revealed the shape of the wearer's body under the outfit instead of the shape of the corset. She said, "suppleness is demanded by women, because that alone gives 'line'. Stiff, hard bands cannot meet their wishes."
On 10 May 1908 three of her models caused a sensation during The Prix du Prince de Galles at Longchamp Racecourse by presenting a new slim and free line which press called "the directoire gown". The three models were called "Les Nouvelles Merveilleuses" by the press, referring to the semi-naked beauties of the French Revolutionary period. It seemed to the crowd that gathered around them that the three young women were virtually naked beneath their figure-hugging gowns. The most beautiful of the three young women, "la belle Möina" (left in the photograph) was at once offered a contract by the director of the Moulin Rouge. The New York Times reported that, "Pictures of the young women who displayed their charming persons in so-called directoire gowns, are printed in both capitals [London and Paris] and artists and moralists, men of the world, police officers and dressmakers have been interviewed in bewildering numbers." The new style was quickly adopted by famous personalities such as the actress Lillie Langtry when she attended the races at Chester Racecourse.
Jeanne Margaine-Lacroix presented wide-legged trousers for women in 1910, some months before Paul Poiret, who took credit for being the first to introduce the style.
The 1919 silent film La Cigarette, directed by Germaine Dulac, a female French film-maker, starred Andrée Brabant dressed by Jeanne Margaine-Lacroix.
Jeanne Margaine-Lacroix died in 1930 in Chatou and was buried with her mother and husband in the Lacroix family grave in Père Lachaise Cemetery in Paris.
Margaine-Lacroix is now experiencing a resurgence of interest in the history of fashion, after having been forgotten over time in favour of the more famous Paul Poiret. Historian Caroline Evans recalls, however, that in 1910 Margaine-Lacroix produced corsets created for the Tanagra and Sylphide dresses and that its advertisements claimed that the Sylphide-fourreau corset was essential under clinging dresses thus invalidating the assertion that the dresses were worn without corset.
Collections
Dress, circa 1908-1910, Metropolitan Museum of Art, New York
Evening dress, circa 1913, Metropolitan Museum of Art
Dress, circa 1922, Palais Galliera, Paris
Dress, circa 1925, Galliera Palace, Paris
Coat, circa 1925, Palais Galliera, Paris
Evening dress, 1927-1928, Centraal Museum, Utrecht
Series of photographs by Jacques Bulloz, taken during the Grands Couturiers parisiens, 1910-1939 exhibition in 1965 and the Fashions of the Roaring Twenties 1919-1929 exhibition in 1970, Palais Galliera , Paris
References
External links
House of Margaine-Lacroix, Alexandre Vassiliev Foundation
1868 births
1930 deaths
People from Paris
French fashion designers
French women fashion designers
1900s fashion
1910s fashion
History of clothing (Western fashion)
Burials at Père Lachaise Cemetery
|
```javascript
export default {
'/msg': {
//
title: '',
icon: 'fa fa-commenting-o',
showInNavbar: true,
showInSidebar: true,
component (resolve) {
require(['@/views/msg'], resolve)
},
//
subRoutes: {
'/list': {
title: '',
icon: 'fa fa-list',
component (resolve) {
require(['@/views/msg/list'], resolve)
}
},
'/detail/:msgId': {
title: '',
icon: 'fa fa-search-plus',
component (resolve) {
require(['@/views/msg/detail'], resolve)
}
},
'/add': {
title: '',
icon: 'fa fa-plus',
component (resolve) {
require(['@/views/msg/add'], resolve)
},
needAuth: true //
},
'/update/:msgId': {
title: '',
icon: 'fa fa-eraser',
component (resolve) {
require(['@/views/msg/update'], resolve)
},
needAuth: true
}
}
}
}
```
|
The Basic People's Congress, or Fundamental Popular Council (), was the smallest unit of government in Muammar Gaddafi's Libya. It governed the equivalent of a municipality, and that geographic district was also called a Basic People's Congress.
The congress consisted of every man and woman who had attained the age of majority. The actual congress met at three scheduled meetings per year or as called upon by necessity. The first meeting was usually devoted to a detailed agenda for the next two meetings. At the second meeting the Basic People's Congress discussed issues relating to the local business, while at the third meeting seats on committees were filled, representatives elected and policy at the national and international level were discussed. Day-to-day management and oversight was provided by the people's committee appointed by the congress. The next political level up was the district congresses and then above that was the General People's Congress at the top.
Notes
See also
Folkmoot
Libyan Arab Jamahiriya
Government of Libya
History of Libya under Muammar Gaddafi
Political history of Libya
|
```yaml
apiVersion: release-notes/v2
kind: bug-fix
area: traffic-management
releaseNotes:
- |
**Fixed** an issue where removing inline Network and HTTP filters was not working properly.
```
|
Richard Dacres may refer to:
Richard Dacres (Royal Navy officer) (1761–1837), Royal Navy vice-admiral
Richard Dacres (British Army officer), (1799–1886), British Army field marshal
|
Laurent Saint-Martin (born 22 June 1985) is a French politician who has been serving as head of Business France since 2022.
Saint-Martin previously represented the 3rd constituency of the Val-de-Marne department in the National Assembly from 2017 to 2022. A member of La République En Marche! (LREM), he has served as a regional councillor of Île-de-France since 2021. Since January 2023, he has been Managing Director of Business France.
Political career
From 2009 until 2012, Saint-Martin was a member of the Socialist Party. However, he was not actively involved in politics before he joined La République En Marche! in 2016.
In the 2017 legislative election, Saint-Martin was elected to the National Assembly, where he represented the 3rd constituency of Val-de-Marne. He succeeded Roger-Gérard Schwartzenberg of the Radical Party of the Left. In Parliament, Saint-Martin served as a member of the Finance Committee. In addition to his committee assignments, he was part of the French-Peruvian Parliamentary Friendship Group.
In late 2018, Saint-Martin was offered to join the government of Prime Minister Édouard Philippe but declined a post as Secretary of State at the Ministry of the Economy and Finance under the leadership of Bruno Le Maire. In June 2019, Philippe entrusted him with a mission to reform the national system for the identification, seizure and confiscation of criminal assets. From 2020, Saint-Martin served as the Parliament's lead rapporteur on the annual budget of France; he succeeded Joël Giraud.
Within his party, Saint-Martin became a member of the executive board in 2019. In that capacity, he was entrusted alongside Guillaume Chiche for the party's policy planning.
In early 2021, Saint-Martin emerged as the frontrunner in the race to lead the La République En Marche! campaign in Île-de-France during that year's regional elections and to potentially succeed Valérie Pécresse as President of the Regional Council of Île-de-France. With only 9.62 percent of the vote, he ultimately lost against Pécresse but was elected as a regional councillor.
In the 2022 legislative election, Saint-Martin ran for reelection to the National Assembly but lost his seat to Louis Boyard of La France Insoumise.
Life after politics
In 2022, Saint-Martin was appointed to head Business France.
Political positions
In 2018, Saint-Martin was one of Stanislas Guerini's first supporters when the latter ran for the post of LREM leader.
See also
2017 French legislative election
References
1985 births
Living people
Deputies of the 15th National Assembly of the French Fifth Republic
Socialist Party (France) politicians
Renaissance (French political party) politicians
Politicians from Toulouse
Members of the Regional Council of Île-de-France
|
"Revolución" ("Revolution") is the title of the fourth single released by Spanish singer-songwriter Enrique Iglesias from his second studio album, Vivir (1997), It was released on 18 August 1997 (see 1997 in music).
Song information
The track was written by Chein García-Alonso, who also wrote the No. 1 hit "Experiencia Religiosa" for Iglesias. This single became the first song released in United States not to peak at number 1 on the Billboard Hot Latin Tracks chart, breaking the string of eight consecutive number ones ("Si Tú Te Vas", "Experiencia Religiosa", "Por Amarte", "No Llores Por Mí", "Trapecista", "Enamorado Por Primera Vez", "Sólo En Tí" and "Miente").
Chart performance
The track debuted on the United States Billboard Hot Latin Tracks chart at number 12 on 11 October 1997 and peaked at number 6 two weeks later on 25 October 1997.
References
1997 singles
1997 songs
Enrique Iglesias songs
Spanish-language songs
Fonovisa Records singles
Songs written by Chein García-Alonso
|
```c++
//your_sha256_hash---------------------------------------
//your_sha256_hash---------------------------------------
#include "stdafx.h"
#pragma warning(disable:26434) // Function definition hides non-virtual function in base class
#pragma warning(disable:26439) // Implicit noexcept
#pragma warning(disable:26451) // Arithmetic overflow
#pragma warning(disable:26495) // Uninitialized member variable
#include "catch.hpp"
#pragma warning(disable:6387) // suppressing preFAST which raises warning for passing null to the JsRT APIs
namespace ThreadServiceTests
{
struct ThreadPoolCallbackContext
{
JsBackgroundWorkItemCallback callback;
void * callbackData;
};
static bool sawCallback = false;
void CALLBACK ThreadPoolCallback(PTP_CALLBACK_INSTANCE /* Instance */, void * Context)
{
ThreadPoolCallbackContext * c = (ThreadPoolCallbackContext *)Context;
c->callback(c->callbackData);
delete c;
}
bool CALLBACK SubmitBackgroundWorkToThreadPool(JsBackgroundWorkItemCallback callback, void * callbackData)
{
REQUIRE(callback != nullptr);
REQUIRE(callbackData != nullptr);
sawCallback = true;
ThreadPoolCallbackContext * c = new ThreadPoolCallbackContext();
c->callback = callback;
c->callbackData = callbackData;
BOOL success = TrySubmitThreadpoolCallback(ThreadPoolCallback, c, nullptr);
REQUIRE(!!success);
return true;
}
bool CALLBACK FailBackgroundWorkRequest(JsBackgroundWorkItemCallback callback, void * callbackData)
{
REQUIRE(callback != nullptr);
REQUIRE(callbackData != nullptr);
sawCallback = true;
// Always fail the request and force work in-thread
return false;
}
void Test(JsThreadServiceCallback threadService)
{
sawCallback = false;
JsRuntimeHandle runtime = JS_INVALID_RUNTIME_HANDLE;
JsContextRef context = JS_INVALID_REFERENCE;
REQUIRE(JsCreateRuntime(JsRuntimeAttributeAllowScriptInterrupt, threadService, &runtime) == JsNoError);
REQUIRE(JsCreateContext(runtime, &context) == JsNoError);
REQUIRE(JsSetCurrentContext(context) == JsNoError);
LPCWSTR script = nullptr;
REQUIRE(FileLoadHelpers::LoadScriptFromFile("Splay.js", script) == S_OK);
REQUIRE(script != nullptr);
REQUIRE(JsRunScript(script, JS_SOURCE_CONTEXT_NONE, _u(""), nullptr) == JsNoError);
REQUIRE(JsSetCurrentContext(JS_INVALID_REFERENCE) == JsNoError);
REQUIRE(JsDisposeRuntime(runtime) == JsNoError);
// Ensure that at least one callback happened
CHECK(sawCallback);
}
TEST_CASE("ThreadServiceTest_ThreadPoolTest", "[ThreadServiceTest]")
{
Test(SubmitBackgroundWorkToThreadPool);
}
TEST_CASE("ThreadServiceTest_AlwaysDenyRequestTest", "[ThreadServiceTest]")
{
Test(FailBackgroundWorkRequest);
}
}
```
|
```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.
#include "paddle/phi/kernels/transpose_grad_kernel.h"
#include "paddle/phi/backends/onednn/onednn_reuse.h"
#include "paddle/phi/core/kernel_registry.h"
namespace phi {
template <typename T, typename Context>
void TransposeGradKernel(const Context& dev_ctx,
const DenseTensor& out_grad,
const std::vector<int>& axis,
DenseTensor* x_grad) {
PADDLE_ENFORCE_EQ(dev_ctx.GetPlace().GetType() == AllocationType::CPU,
true,
errors::PreconditionNotMet(
"oneDNN TransposeGrad kernel must use CPUPlace"));
if (!x_grad) return;
const auto& onednn_engine = dev_ctx.GetEngine();
if (axis.size() == 1 || axis.empty()) {
Copy<Context>(dev_ctx, out_grad, out_grad.place(), false, x_grad);
x_grad->set_mem_desc(out_grad.mem_desc());
return;
}
std::vector<int64_t> out_grad_tz = common::vectorize(out_grad.dims());
funcs::ReorderOneDNNHandler reorder_handler(
out_grad_tz,
out_grad.dtype(),
funcs::ToOneDNNDataType(out_grad.dtype()),
onednn_engine);
auto reorder_src_memory_p = reorder_handler.AcquireSrcMemory(
out_grad.mem_desc(), funcs::to_void_cast(out_grad.data<T>()));
auto reorder_dst_memory_p = reorder_handler.AcquireDstMemory(
x_grad, out_grad.mem_desc(), dev_ctx.GetPlace());
auto reorder_p = reorder_handler.AcquireReorder(reorder_dst_memory_p,
reorder_src_memory_p);
auto& astream = OneDNNContext::tls().get_stream();
reorder_p->execute(astream, *reorder_src_memory_p, *reorder_dst_memory_p);
astream.wait();
x_grad->set_mem_desc(reorder_dst_memory_p->get_desc().permute_axes(axis));
}
} // namespace phi
PD_REGISTER_KERNEL(
transpose_grad, OneDNN, ONEDNN, phi::TransposeGradKernel, float) {}
```
|
```javascript
console.log("getTransactionCount (confirmed)");
console.log(web3.eth.getTransactionCount("0x9e713963a92c02317a681b9bb3065a8249de124f"));
console.log("getTransactionCount (pending)");
console.log(web3.eth.getTransactionCount("0x9e713963a92c02317a681b9bb3065a8249de124f", "pending"));
console.log("sendTransaction");
console.log(web3.eth.sendTransaction({from: web3.eth.accounts[0], to: "0xB0920c523d582040f2BCB1bD7FB1c7C1ECEbdB34", value: web3.utils.toWei(0.01, "ether")}));
console.log("getTransactionCount (confirmed)");
console.log(web3.eth.getTransactionCount("0x9e713963a92c02317a681b9bb3065a8249de124f"));
console.log("getTransactionCount (pending)");
console.log(web3.eth.getTransactionCount("0x9e713963a92c02317a681b9bb3065a8249de124f", "pending"));
console.log("sendTransaction");
console.log(web3.eth.sendTransaction({from: web3.eth.accounts[0], to: "0xB0920c523d582040f2BCB1bD7FB1c7C1ECEbdB34", value: web3.utils.toWei(0.01, "ether")}));
console.log("getTransactionCount (confirmed)");
console.log(web3.eth.getTransactionCount("0x9e713963a92c02317a681b9bb3065a8249de124f"));
console.log("getTransactionCount (pending)");
console.log(web3.eth.getTransactionCount("0x9e713963a92c02317a681b9bb3065a8249de124f", "pending"));
console.log("sendTransaction");
console.log(web3.eth.sendTransaction({from: web3.eth.accounts[0], to: "0xB0920c523d582040f2BCB1bD7FB1c7C1ECEbdB34", value: web3.utils.toWei(0.01, "ether")}));
console.log("getTransactionCount (confirmed)");
console.log(web3.eth.getTransactionCount("0x9e713963a92c02317a681b9bb3065a8249de124f"));
console.log("getTransactionCount (pending)");
console.log(web3.eth.getTransactionCount("0x9e713963a92c02317a681b9bb3065a8249de124f", "pending"));
console.log("sendTransaction");
console.log(web3.eth.sendTransaction({from: web3.eth.accounts[0], to: "0xB0920c523d582040f2BCB1bD7FB1c7C1ECEbdB34", value: web3.utils.toWei(0.01, "ether")}));
```
|
During the 1996–97 English football season, Blackburn Rovers F.C. competed in the FA Premier League (known as the FA Carling Premiership for sponsorship reasons).
Season summary
An early exit from the League Cup at the hands of Division Two side Stockport County was the final straw for manager Ray Harford, who stepped down on 25 October with Rovers also bottom of the Premiership with no wins from their opening 11 games. 18 months earlier, they had been league champions. Long-serving coach Tony Parkes was appointed caretaker, remaining in the post until the end of the season, when he handed over the reins to Roy Hodgson after Sampdoria's Sven-Göran Eriksson lied about accepting the manager's job and joined Lazio instead. Parkes steered Blackburn to safety as they finished 13th.
The world record £15 million sale of striker Alan Shearer to Newcastle United was seen as the biggest factor in Blackburn's lowest top flight finish since they returned to the elite in 1992. However, his strike-partner Chris Sutton helped keep the club alive after recovering from a drastic loss of form triggered by a spate of injuries the previous season. The acquisition of Swedish striker Martin Dahlin at the end of the season enhanced Blackburn's attack and gave fans hope for a higher finish next time round.
Final league table
Results summary
Results by round
Results
Blackburn Rovers' score comes first
Legend
FA Premier League
FA Cup
League Cup
Squad
Squad at end of season
Reserve squad
Transfers
In
July 1996: George Donis - Panathinaikos, free
February 1997: Per Pedersen - Odense, £2,500,000
Out
Alan Shearer - Newcastle United, £15,000,000
References
Blackburn Rovers F.C. seasons
Blackburn Rovers
|
The Willamette Valley flood of 1996 was part of a larger series of floods in the Pacific Northwest of the United States which took place between late January and mid-February 1996. It was Oregon's largest flood event in terms of fatalities and monetary damage during the 1990s. The floods spread beyond Oregon's Willamette Valley, extending west to the Oregon Coast and east toward the Cascade Mountains. Significant flood damage also impacted the American states of Washington, Idaho (particularly the north of the state) and California. The floods were directly responsible for eight deaths in Oregon, as well as over US$500 million in property damage throughout the Pacific Northwest. Three thousand residents were displaced from their homes.
Causes
An unusual confluence of weather events made the floods particularly severe. The winter preceding the floods had produced abnormally high rainfall and relatively low snowfall. The heavy rains saturated ground soil and raised river levels throughout January 1996. In late January, a heavy snowstorm padded snow packs throughout the region. This was followed by a deep freeze that lasted for six to ten days. The new layer of snow was quickly melted by a warm subtropical jetstream which arrived on February 6. The jetstream brought along further rains. The combination of the additional rain, the saturated ground, and the melting snow packs engorged dozens of streams and tributaries, which in turn flooded into the region's major rivers.
Impacts
The Willamette River, which flows through downtown Portland, crested at , some above flood stage. The river came within inches of flowing over its seawall and flooding a large portion of Portland's downtown Tom McCall Waterfront Park. A major sandbagging effort involving civilians as well as the Oregon National Guard was launched throughout downtown Portland and was maintained until the floodwaters began to recede on February 9. At least five rivers in Oregon crested at all-time highs during the floods.
The downtown areas of Oregon City and Tillamook suffered particularly heavy damage from the floods, and both were submerged for several days. Several houses in SW Portland were also damaged by the heavy rainfall and a landslide caused one stretch of SW Fairmount Boulevard to be closed for several weeks.
References
External links
1996 meteorology
1990s floods in the United States
1996 floods
1996 natural disasters in the United States
Floods in the United States
Willamette River
Natural disasters in Oregon
Pacific Northwest storms
1996 in Oregon
|
Austre Memurutinden is a mountain in Lom Municipality in Innlandet county, Norway. The tall mountain is located in the Jotunheimen mountains within Jotunheimen National Park. It is the 21st tallest peak in Norway.
The mountain sits about southeast of the village of Fossbergom and about southwest of the village of Vågåmo. The mountain is surrounded by several other notable mountains including Veotinden and Styggehøbretindan to the northeast; Blåbreahøe and Surtningssue to the southeast; Reinstinden to the south; Hinnotefjellet, Søre Hellstugutinden, Nestsøre Hellstugutinden, and Store Hellstugutinden to the southwest; Midtre Hellstugutinden, Nørdre Hellstugutinden, and Store Memurutinden to the west; and Veobretinden, Veobreahesten, and Leirhøi to the northeast.
See also
List of mountains of Norway by height
References
Jotunheimen
Lom, Norway
Mountains of Innlandet
|
Kraków Peninsula () is the peninsula between Admiralty Bay and King George Bay, King George Island, in the South Shetland Islands. The name "Kraków Icefield," after Kraków, the former capital of Poland, was applied in 1980 by the Polish Antarctic Expedition to the ice that nearly covers this peninsula. The original name was amended soon after so as to apply to the peninsula.
References
Poland and the Antarctic
Peninsulas of King George Island (South Shetland Islands)
|
```java
package pers.kerry.seata.demo.storageservice.tcc;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* @description:
* @date: 2021/2/14 11:18
* @author: kerry
*/
public class ResultHolder {
private static Map<Class<?>, Map<String, String>> map = new ConcurrentHashMap<>();
public static void setResult(Class<?> actionClass, String xid, String v) {
Map<String, String> results = map.get(actionClass);
if (results == null) {
synchronized (map) {
if (results == null) {
results = new ConcurrentHashMap<>();
map.put(actionClass, results);
}
}
}
results.put(xid, v);
}
public static String getResult(Class<?> actionClass, String xid) {
Map<String, String> results = map.get(actionClass);
if (results != null) {
return results.get(xid);
}
return null;
}
public static void removeResult(Class<?> actionClass, String xid) {
Map<String, String> results = map.get(actionClass);
if (results != null) {
results.remove(xid);
}
}
}
```
|
Orava Castle (, , ) is a castle situated on a high rock above Orava river in the village of Oravský Podzámok, Slovakia. It is considered to be one of the most beautiful castles in Slovakia. The castle was built in the Kingdom of Hungary in the thirteenth century. Many scenes of the 1922 film Nosferatu were filmed here, the castle representing Count Orlok's Transylvanian castle.
Orava Castle stands on the site of an old wooden fortification, built after the Mongol invasion of Hungary of 1241. Its history follows a familiar pattern of construction, destruction, reconstruction, fire, various ownerships and territorial squabbles. The original design was in Romanesque and Gothic style; it was later reconstructed as a Renaissance and Neo-Gothic structure, hugging the shape of the 520-metre spur on which it perches.
The mining magnate Thurzo family, who took charge in the mid-16th century, were responsible for a great deal of rebuilding work, although its present form was not finalised until 1611. It burned down again in 1800, after which it was no longer used as a residence. After a period of dilapidation dating until World War II, the castle became a national monument.
Origins
The natural rock formation known as "castle cliff" – a limy spur 112 meters (367 ft) high, surrounded by the river Orava and its right tributary stream – has been inhabited since primeval times. During its history a wooden rampart became a strong walled castle of which the first written record dates back to 1267. At that time only the ground floor was built of stone, while the upper floors were made of wood.
In 1370 as part of the Hungarian Kingdom the castle became the center of Árva county. A tetrahedral multi-story towerntury was built here in the 14th century, probably on older foundations, as a donjon – the place of "last defense" within the castle. After 1474, King Matthias Corvinus gave orders to build a square and a residence-wing in the Middle Castle. The buildings were situated in front of the castle. In 1534 John of Dubovec obtained the castle and became head of the county. He started to rebuild the castle and to make new fortifications. He ordered the building of a half-round tower in the Upper Castle that in 1539 was followed by two large round fortifications for cannons in the Middle Castle. The middle platform was also configured for cannon firing. In the years 1539 to 1543 John of Dubovec built a five-story palace in the empty space between the tower and the stone wall of the Upper Castle. The threat of Ottoman invasion was the reason for building these new fortifications. A new gate with a ditch and drawbridge in the Lower Castle was completed in 1543. The Tower of the Archives was built against the castle walls.
16th–18th centuries
After the death of John of Dubovec, his heirs quarreled over the inheritance and the situation became so bad that the castle even became a store-house. It was paid for by the mine owner Ferenc Thurzó. A lot of building activity took place at the castle following this time period. The wooden stairs in the Upper Castle were replaced by stone stairs. The same was done to the stairs between the Middle and the Upper Castle with the drawbridge. A cellar was also dug out of the stone of the castle court and a single-story residence-wing was built in the lower castle near the west wall.
György Thurzó also carried out some important repairs. One of the first was the building of a tunnel between both castle gates, above which was formed a large terrace. After this was all done he moved the living-quarters and the building of the chapel started using parts of some old architecture. The interior furnishing of the chapel was later arranged in a taste which suited the new owners of the castle. One of the most well-known features is the Renaissance grave tomb of György Thurzó from the beginning of the 17th century and the Baroque altar from 1751–1752.
Disuse, fire and the museum
After the death of Erzsébet Czobor, the widow of György Thurzó, the castle became the property of Thurzó's daughters, who entrusted its administration to an elected administrator. Because of changes in politics, society and the economy, the castle gradually lost its important functions. Only a few clerks stayed on and the uninhabited and disused parts of the castle gradually deteriorated. The greatest catastrophe affected the castle in 1800, when a gigantic fire destroyed all the wooden parts of the castle. Some objects from the Lower Castle were recovered after the fire because they had been covered by the roof shingles. However, the objects from the Middle and Upper Castle were not reconstructed until 1861.
To find a use for the historical object, Ödön Zichy, the administrator of the property (as administrator of Veszprém County), organized a foundation which had the aim of founding a regional museum of Orava. The first exhibition took place at the Thurzo Palace in 1868. Nowadays, the Orava Museum is one of the oldest in Slovakia. Its most attractive expositions are those of the Castle Chapel, the Knights' Room, and several rooms with period-style furnishing. Further highlights include the Painting Gallery, the Weapon room, and the scientific, ethnographic and archaeological collections.
Cultural references
Many scenes of the 1922 film Nosferatu were filmed here, the castle representing Count Orlok's Transylvanian castle; In their 2020 TV adaptation of Bram Stoker's novel Dracula, Mark Gatiss and Steven Moffat also used Orava as their Castle Dracula. Orava Castle served as the filming location for the 2000 film, Dragonheart: A New Beginning. It was also used by the Polish video game company CD Projekt as inspiration for the fictional Kaer Morhen, fortress for the witchers of the Wolf School in Andrzej Sapkowski's The Witcher book series. Van Helsing's season 5 was filmed on location.
References
External links
Orava Castle from Slovak Heritage
Orava Castle Tour Information from Muzeum.sk
Photographs of Orava Castle from Muzeum.sk
Christmas at Orava Castle
http://www.oravskyhrad.sk/
Paper model of Orava Castle
Drone video of Orava Castle
Slovak Spectator - Orava Castle: Dracula's Slovak residence
Castles in Slovakia
Museums in Žilina Region
Tourist attractions in Žilina Region
13th-century architecture in Slovakia
Romanesque architecture in Slovakia
Gothic architecture in Slovakia
Renaissance architecture in Slovakia
Gothic Revival architecture in Slovakia
Buildings and structures in Žilina Region
Dracula
Buildings and structures completed in the 13th century
|
```objective-c
//
//
#import <XCTest/XCTestDefines.h>
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#else
#import <AppKit/AppKit.h>
#endif
NS_ASSUME_NONNULL_BEGIN
#if XCT_UI_TESTING_AVAILABLE && !TARGET_OS_TV
@class XCUIElement;
NS_CLASS_AVAILABLE(10_11, 9_0)
/*! A coordinate represents a location on screen, relative to some element. Coordinates are dynamic, just like the elements to which they refer, and may compute different screen locations at different times, or be invalid if the referenced element does not exist. */
@interface XCUICoordinate : NSObject <NSCopying>
/*! Coordinates are never instantiated directly. Instead, they are created by elements or by other coordinates. */
- (instancetype)init NS_UNAVAILABLE;
/*! The element that the coordinate is based on, either directly or via the coordinate from which it was derived. */
@property (readonly) XCUIElement *referencedElement;
/*! The dynamically computed value of the coordinate's location on screen. Note that this value is dependent on the current frame of the referenced element; if the element's frame changes, so will the value returned by this property. If the referenced element does exist when this is called, it will fail the test; check the referenced element's exists property if the element may not be present. */
@property (readonly) CGPoint screenPoint;
/*! Creates a new coordinate with an absolute offset in points from the original coordinate. */
- (XCUICoordinate *)coordinateWithOffset:(CGVector)offsetVector;
#if TARGET_OS_IPHONE
- (void)tap;
- (void)doubleTap;
- (void)pressForDuration:(NSTimeInterval)duration;
- (void)pressForDuration:(NSTimeInterval)duration thenDragToCoordinate:(XCUICoordinate *)otherCoordinate;
#else
- (void)hover;
- (void)click;
- (void)doubleClick;
- (void)rightClick;
- (void)clickForDuration:(NSTimeInterval)duration thenDragToCoordinate:(XCUICoordinate *)otherCoordinate;
- (void)scrollByDeltaX:(CGFloat)deltaX deltaY:(CGFloat)deltaY;
#endif
@end
#endif
NS_ASSUME_NONNULL_END
```
|
```java
/*
*
* This program and the accompanying materials are made
* which is available at path_to_url
*
*/
package org.eclipse.milo.opcua.sdk.server.model.nodes.variables;
import java.util.Optional;
import org.eclipse.milo.opcua.sdk.core.nodes.VariableNode;
import org.eclipse.milo.opcua.sdk.server.model.types.variables.MultiStateValueDiscreteType;
import org.eclipse.milo.opcua.sdk.server.nodes.UaNodeContext;
import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue;
import org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.structured.EnumValueType;
public class MultiStateValueDiscreteTypeNode extends DiscreteItemTypeNode implements MultiStateValueDiscreteType {
public MultiStateValueDiscreteTypeNode(UaNodeContext context, NodeId nodeId,
QualifiedName browseName, LocalizedText displayName, LocalizedText description,
UInteger writeMask, UInteger userWriteMask) {
super(context, nodeId, browseName, displayName, description, writeMask, userWriteMask);
}
public MultiStateValueDiscreteTypeNode(UaNodeContext context, NodeId nodeId,
QualifiedName browseName, LocalizedText displayName, LocalizedText description,
UInteger writeMask, UInteger userWriteMask, DataValue value, NodeId dataType,
Integer valueRank, UInteger[] arrayDimensions, UByte accessLevel, UByte userAccessLevel,
double minimumSamplingInterval, boolean historizing) {
super(context, nodeId, browseName, displayName, description, writeMask, userWriteMask, value, dataType, valueRank, arrayDimensions, accessLevel, userAccessLevel, minimumSamplingInterval, historizing);
}
@Override
public PropertyTypeNode getEnumValuesNode() {
Optional<VariableNode> propertyNode = getPropertyNode(MultiStateValueDiscreteType.ENUM_VALUES);
return (PropertyTypeNode) propertyNode.orElse(null);
}
@Override
public EnumValueType[] getEnumValues() {
Optional<EnumValueType[]> propertyValue = getProperty(MultiStateValueDiscreteType.ENUM_VALUES);
return propertyValue.orElse(null);
}
@Override
public void setEnumValues(EnumValueType[] value) {
setProperty(MultiStateValueDiscreteType.ENUM_VALUES, value);
}
@Override
public PropertyTypeNode getValueAsTextNode() {
Optional<VariableNode> propertyNode = getPropertyNode(MultiStateValueDiscreteType.VALUE_AS_TEXT);
return (PropertyTypeNode) propertyNode.orElse(null);
}
@Override
public LocalizedText getValueAsText() {
Optional<LocalizedText> propertyValue = getProperty(MultiStateValueDiscreteType.VALUE_AS_TEXT);
return propertyValue.orElse(null);
}
@Override
public void setValueAsText(LocalizedText value) {
setProperty(MultiStateValueDiscreteType.VALUE_AS_TEXT, value);
}
}
```
|
```objective-c
/*your_sha256_hash------------
* Description: At API HeadFile
* Author: Huawei LiteOS Team
* Create: 2013-01-01
* 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.
* your_sha256_hash----------- */
#ifndef _AT_API_H
#define _AT_API_H
#include <stdint.h>
#include <stdio.h>
typedef struct {
int32_t (*init)(void);
int8_t (*get_localmac)(int8_t *mac);
int8_t (*get_localip)(int8_t *ip, int8_t *gw, int8_t *mask);
int32_t (*bind)(const int8_t *host, const int8_t *port, int32_t proto);
int32_t (*connect)(const int8_t *host, const int8_t *port, int32_t proto);
int32_t (*send)(int32_t id, const uint8_t *buf, uint32_t len);
int32_t (*sendto)(int32_t id, const uint8_t *buf, uint32_t len, char *ipaddr, int port);
int32_t (*recv_timeout)(int32_t id, uint8_t *buf, uint32_t len, char *ipaddr, int *port, int32_t timeout);
int32_t (*recv)(int32_t id, uint8_t *buf, uint32_t len);
int32_t (*recvfrom)(int32_t id, uint8_t *buf, uint32_t len, char *ipaddr, int *port);
int32_t (*close)(int32_t id);
int32_t (*recv_cb)(int32_t id);
int32_t (*deinit)(void);
} at_adaptor_api;
int32_t at_api_register(at_adaptor_api *api);
int32_t at_api_bind(const char *host, const char *port, int proto);
int32_t at_api_connect(const char *host, const char *port, int proto);
int32_t at_api_send(int32_t id, const unsigned char *buf, uint32_t len);
int32_t at_api_sendto(int32_t id, uint8_t *buf, uint32_t len, char *ipaddr, int port);
int32_t at_api_recv(int32_t id, unsigned char *buf, size_t len);
int32_t at_api_recv_timeout(int32_t id, uint8_t *buf, uint32_t len, char *ipaddr, int *port, int32_t timeout);
int32_t at_api_close(int32_t fd);
#endif /* _AT_API_H */
```
|
```objective-c
//
// RACSequence.m
// ReactiveObjC
//
// Created by Justin Spahr-Summers on 2012-10-29.
//
#import "RACSequence.h"
#import "RACArraySequence.h"
#import "RACDynamicSequence.h"
#import "RACEagerSequence.h"
#import "RACEmptySequence.h"
#import "RACScheduler.h"
#import "RACSignal.h"
#import "RACSubscriber.h"
#import "RACTuple.h"
#import "RACUnarySequence.h"
// An enumerator over sequences.
@interface RACSequenceEnumerator : NSEnumerator
// The sequence the enumerator is enumerating.
//
// This will change as the enumerator is exhausted. This property should only be
// accessed while synchronized on self.
@property (nonatomic, strong) RACSequence *sequence;
@end
@interface RACSequence ()
// Performs one iteration of lazy binding, passing through values from `current`
// until the sequence is exhausted, then recursively binding the remaining
// values in the receiver.
//
// Returns a new sequence which contains `current`, followed by the combined
// result of all applications of `block` to the remaining values in the receiver.
- (RACSequence *)bind:(RACSequenceBindBlock)block passingThroughValuesFromSequence:(RACSequence *)current;
@end
@implementation RACSequenceEnumerator
- (id)nextObject {
id object = nil;
@synchronized (self) {
object = self.sequence.head;
self.sequence = self.sequence.tail;
}
return object;
}
@end
@implementation RACSequence
#pragma mark Lifecycle
+ (RACSequence *)sequenceWithHeadBlock:(id (^)(void))headBlock tailBlock:(RACSequence<id> *(^)(void))tailBlock {
return [[RACDynamicSequence sequenceWithHeadBlock:headBlock tailBlock:tailBlock] setNameWithFormat:@"+sequenceWithHeadBlock:tailBlock:"];
}
#pragma mark Class cluster primitives
- (id)head {
NSCAssert(NO, @"%s must be overridden by subclasses", __func__);
return nil;
}
- (RACSequence *)tail {
NSCAssert(NO, @"%s must be overridden by subclasses", __func__);
return nil;
}
#pragma mark RACStream
+ (RACSequence *)empty {
return RACEmptySequence.empty;
}
+ (RACSequence *)return:(id)value {
return [RACUnarySequence return:value];
}
- (RACSequence *)bind:(RACSequenceBindBlock (^)(void))block {
RACSequenceBindBlock bindBlock = block();
return [[self bind:bindBlock passingThroughValuesFromSequence:nil] setNameWithFormat:@"[%@] -bind:", self.name];
}
- (RACSequence *)bind:(RACSequenceBindBlock)bindBlock passingThroughValuesFromSequence:(RACSequence *)passthroughSequence {
// Store values calculated in the dependency here instead, avoiding any kind
// of temporary collection and boxing.
//
// This relies on the implementation of RACDynamicSequence synchronizing
// access to its head, tail, and dependency, and we're only doing it because
// we really need the performance.
__block RACSequence *valuesSeq = self;
__block RACSequence *current = passthroughSequence;
__block BOOL stop = NO;
RACSequence *sequence = [RACDynamicSequence sequenceWithLazyDependency:^ id {
while (current.head == nil) {
if (stop) return nil;
// We've exhausted the current sequence, create a sequence from the
// next value.
id value = valuesSeq.head;
if (value == nil) {
// We've exhausted all the sequences.
stop = YES;
return nil;
}
current = (id)bindBlock(value, &stop);
if (current == nil) {
stop = YES;
return nil;
}
valuesSeq = valuesSeq.tail;
}
NSCAssert([current isKindOfClass:RACSequence.class], @"-bind: block returned an object that is not a sequence: %@", current);
return nil;
} headBlock:^(id _) {
return current.head;
} tailBlock:^ id (id _) {
if (stop) return nil;
return [valuesSeq bind:bindBlock passingThroughValuesFromSequence:current.tail];
}];
sequence.name = self.name;
return sequence;
}
- (RACSequence *)concat:(RACSequence *)sequence {
NSCParameterAssert(sequence != nil);
return [[[RACArraySequence sequenceWithArray:@[ self, sequence ] offset:0]
flatten]
setNameWithFormat:@"[%@] -concat: %@", self.name, sequence];
}
- (RACSequence *)zipWith:(RACSequence *)sequence {
NSCParameterAssert(sequence != nil);
return [[RACSequence
sequenceWithHeadBlock:^ id {
if (self.head == nil || sequence.head == nil) return nil;
return RACTuplePack(self.head, sequence.head);
} tailBlock:^ id {
if (self.tail == nil || [[RACSequence empty] isEqual:self.tail]) return nil;
if (sequence.tail == nil || [[RACSequence empty] isEqual:sequence.tail]) return nil;
return [self.tail zipWith:sequence.tail];
}]
setNameWithFormat:@"[%@] -zipWith: %@", self.name, sequence];
}
#pragma mark Extended methods
- (NSArray *)array {
NSMutableArray *array = [NSMutableArray array];
for (id obj in self) {
[array addObject:obj];
}
return [array copy];
}
- (NSEnumerator *)objectEnumerator {
RACSequenceEnumerator *enumerator = [[RACSequenceEnumerator alloc] init];
enumerator.sequence = self;
return enumerator;
}
- (RACSignal *)signal {
return [[self signalWithScheduler:[RACScheduler scheduler]] setNameWithFormat:@"[%@] -signal", self.name];
}
- (RACSignal *)signalWithScheduler:(RACScheduler *)scheduler {
return [[RACSignal createSignal:^(id<RACSubscriber> subscriber) {
__block RACSequence *sequence = self;
return [scheduler scheduleRecursiveBlock:^(void (^reschedule)(void)) {
if (sequence.head == nil) {
[subscriber sendCompleted];
return;
}
[subscriber sendNext:sequence.head];
sequence = sequence.tail;
reschedule();
}];
}] setNameWithFormat:@"[%@] -signalWithScheduler: %@", self.name, scheduler];
}
- (id)foldLeftWithStart:(id)start reduce:(id (^)(id, id))reduce {
NSCParameterAssert(reduce != NULL);
if (self.head == nil) return start;
for (id value in self) {
start = reduce(start, value);
}
return start;
}
- (id)foldRightWithStart:(id)start reduce:(id (^)(id, RACSequence *))reduce {
NSCParameterAssert(reduce != NULL);
if (self.head == nil) return start;
RACSequence *rest = [RACSequence sequenceWithHeadBlock:^{
if (self.tail) {
return [self.tail foldRightWithStart:start reduce:reduce];
} else {
return start;
}
} tailBlock:nil];
return reduce(self.head, rest);
}
- (BOOL)any:(BOOL (^)(id))block {
NSCParameterAssert(block != NULL);
return [self objectPassingTest:block] != nil;
}
- (BOOL)all:(BOOL (^)(id))block {
NSCParameterAssert(block != NULL);
NSNumber *result = [self foldLeftWithStart:@YES reduce:^(NSNumber *accumulator, id value) {
return @(accumulator.boolValue && block(value));
}];
return result.boolValue;
}
- (id)objectPassingTest:(BOOL (^)(id))block {
NSCParameterAssert(block != NULL);
return [self filter:block].head;
}
- (RACSequence *)eagerSequence {
return [RACEagerSequence sequenceWithArray:self.array offset:0];
}
- (RACSequence *)lazySequence {
return self;
}
#pragma mark NSCopying
- (id)copyWithZone:(NSZone *)zone {
return self;
}
#pragma mark NSCoding
- (Class)classForCoder {
// Most sequences should be archived as RACArraySequences.
return RACArraySequence.class;
}
- (id)initWithCoder:(NSCoder *)coder {
if (![self isKindOfClass:RACArraySequence.class]) return [[RACArraySequence alloc] initWithCoder:coder];
// Decoding is handled in RACArraySequence.
return [super init];
}
- (void)encodeWithCoder:(NSCoder *)coder {
[coder encodeObject:self.array forKey:@"array"];
}
#pragma mark NSFastEnumeration
- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(__unsafe_unretained id *)stackbuf count:(NSUInteger)len {
if (state->state == ULONG_MAX) {
// Enumeration has completed.
return 0;
}
// We need to traverse the sequence itself on repeated calls to this
// method, so use the 'state' field to track the current head.
RACSequence *(^getSequence)(void) = ^{
return (__bridge RACSequence *)(void *)state->state;
};
void (^setSequence)(RACSequence *) = ^(RACSequence *sequence) {
// Release the old sequence and retain the new one.
CFBridgingRelease((void *)state->state);
state->state = (unsigned long)CFBridgingRetain(sequence);
};
void (^complete)(void) = ^{
// Release any stored sequence.
setSequence(nil);
state->state = ULONG_MAX;
};
if (state->state == 0) {
// Since a sequence doesn't mutate, this just needs to be set to
// something non-NULL.
state->mutationsPtr = state->extra;
setSequence(self);
}
state->itemsPtr = stackbuf;
NSUInteger enumeratedCount = 0;
while (enumeratedCount < len) {
RACSequence *seq = getSequence();
// Because the objects in a sequence may be generated lazily, we want to
// prevent them from being released until the enumerator's used them.
__autoreleasing id obj = seq.head;
if (obj == nil) {
complete();
break;
}
stackbuf[enumeratedCount++] = obj;
if (seq.tail == nil) {
complete();
break;
}
setSequence(seq.tail);
}
return enumeratedCount;
}
#pragma mark NSObject
- (NSUInteger)hash {
return [self.head hash];
}
- (BOOL)isEqual:(RACSequence *)seq {
if (self == seq) return YES;
if (![seq isKindOfClass:RACSequence.class]) return NO;
for (id<NSObject> selfObj in self) {
id<NSObject> seqObj = seq.head;
// Handles the nil case too.
if (![seqObj isEqual:selfObj]) return NO;
seq = seq.tail;
}
// self is now depleted -- the argument should be too.
return (seq.head == nil);
}
@end
```
|
Luke Mitrani (born July 20, 1990 in New York City) is a former professional snowboarder and a musician.
He has 3 albums and has a love for live performances. Luke placed 1st in the halfpipe at the 2011 Winter Dew Tour with the highest score in Dew Tour history, 97.00.
He has also placed 1st at many U.S Snowboarding Grand Prix competitions.
Luke was the youngest person to ever make the US Snowboarding Team at the age of 12.
Early life
Luke was born in New York City on July 20, 1990. He was raised in Stratton, Vermont. Luke previously lived in Truckee, California with fellow snowboarder and friend, Danny Davis. Luke is a part of the Frends Crew made up of snowboarders Mason Aguirre, Kevin Pearce, Jack Mitrani, Keir Dillon, Danny Davis, Scotty Lago and Mikkel Bang.
Sponsors
Luke is sponsored by Volcom, Vestal Watches, Frends, Mammoth Mountain, Amp, Dragon, and the U.S. Snowboard Team.
Other interests
Luke is an avid skateboarder, guitar player and music lover. Some of his favorite artists are The Grateful Dead, Neil Young, Jimi Hendrix, Santana and Led Zeppelin. Luke's music can be found on music streaming platforms such as Apple Music and Spotify.
References
External links
. Luke Mitrani's website
The Frends' Crew Youtube Page
Frends Crew Official Website
1990 births
Living people
American male snowboarders
Sportspeople from New York City
|
British history provides several opportunities for alternative claimants to the English and later British Crown to arise, and historical scholars have on occasion traced to present times the heirs of those alternative claims.
Throughout this article, the names of "would-have-been" monarchs are in italics.
Abdication of Richard II
Richard II abdicated in favour of Henry Bolingbroke on 29 September 1399. However, Henry was not next in the line to the throne; the heir presumptive was Edmund Mortimer, Earl of March, who descended from Edward III's second surviving son, Lionel of Antwerp, whereas Henry's father, John of Gaunt, was Edward's third surviving son.
Had Edmund inherited instead, the alternative succession would have been short-lived, for it re-united with the historical crown when Edward IV was declared king in 1461.
Edward III of England
Edward, the Black Prince, first son of Edward III
Richard II of England, second son of Edward, the Black Prince
Lionel of Antwerp, 1st Duke of Clarence, third son (second son to survive infancy) of Edward III
Philippa Plantagenet, 5th Countess of Ulster, only child of Lionel
Roger Mortimer, 4th Earl of March, first son of Philippa
Edmund Mortimer, 5th Earl of March, first son of Roger, died without issue
Anne de Mortimer, first daughter of Roger, succeeded her childless brother Edmund
Richard Plantagenet, 3rd Duke of York, only son of Anne
Edward IV of England, first son of Richard
Descendants of George Plantagenet, Duke of Clarence
This line's claim to the Crown is based upon the argument that Edward IV was not the son of Richard Plantagenet, 3rd Duke of York, and thus had no legitimate claim to the Crown. Therefore, when Richard was killed at the Battle of Wakefield, his claim passed first to his eldest legitimate son, Edmund, Earl of Rutland, who was executed shortly after the battle, and then to George, Duke of Clarence. Another point is that Henry VI passed a law in 1470 that should both he and his son Edward of Westminster die without further legitimate male issue, the crown was to pass to Clarence, as Henry had placed an attainder upon Edward IV. When Henry VI and Edward both died in 1471, Clarence became the legal heir of the House of Lancaster.
The current descendant of this line is Simon Abney-Hastings, 15th Earl of Loudoun. The line of succession is as follows:
George Plantagenet, 1st Duke of Clarence, third son (second "legitimate" son) of Richard, 3rd Duke of York
Edward Plantagenet, 17th Earl of Warwick, first son of George
Margaret Pole, 8th Countess of Salisbury, daughter of George, succeeded her childless brother Edward
Henry Pole, 1st Baron Montagu, first son of Margaret
Henry Pole, second son of Henry, his elder brother Thomas died in childhood
Catherine Hastings, first daughter, succeeded her childless brother Henry
Henry Hastings, 3rd Earl of Huntingdon, first son of Catherine
George Hastings, 4th Earl of Huntingdon, second son of Catherine, succeeded his childless brother Henry
Francis Hastings, first son of George
Henry Hastings, 5th Earl of Huntingdon, only son of Francis
Ferdinando Hastings, 6th Earl of Huntingdon, first son of Henry
Theophilus Hastings, 7th Earl of Huntingdon, only son of Ferdinando
George Hastings, 8th Earl of Huntingdon, second son of Theophilus, his elder brother died in childhood
Theophilus Hastings, 9th Earl of Huntingdon, third son of Theophilus, his elder brother George had no legitimate children
Francis Hastings, 10th Earl of Huntingdon, first son of Theophilus, 9th Earl
Elizabeth Rawdon, 16th Baroness Botreaux, daughter of Theophilus, her brother Francis had no legitimate children
Francis Rawdon-Hastings, 1st Marquess of Hastings, first son of Elizabeth
George Rawdon-Hastings, 2nd Marquess of Hastings, eldest legitimate son of Francis
Paulyn Rawdon-Hastings, 3rd Marquess of Hastings, first son of George
Henry Rawdon-Hastings, 4th Marquess of Hastings, second son of George, his brother Paulyn died in childhood
Edith Rawdon-Hastings, 10th Countess of Loudoun, first daughter of George, succeeded her childless brother Henry
Charles Rawdon-Hastings, 11th Earl of Loudoun, first son of Edith, died without issue
Paulyn Abney-Hastings, second son of Edith, succeeded his childless brother Charles
Edith Maud Abney-Hastings, 12th Countess of Loudoun, first daughter of Paulyn
Ian Huddleston Abney-Hastings, Lord Mauchline, only son of Edith, died in World War II without issue
Barbara Abney-Hastings, 13th Countess of Loudoun, first daughter of Edith, succeeded her childless brother Ian
Michael Abney-Hastings, 14th Earl of Loudoun, eldest son of Barbara
Simon Abney-Hastings, 15th Earl of Loudoun, eldest son of Michael
Descendants of Mary Tudor, Queen of France
Parliament's Third Succession Act granted Henry VIII the right to bequeath the crown in his Will. His Will specified that, in default of heirs to his children, the throne was to pass to the children of the daughters of his younger sister Mary Tudor, Queen of France, bypassing the line of his elder sister Margaret Tudor, represented by the Catholic Mary, Queen of Scots. Edward VI confirmed this by letters patent. The legitimate and legal heir of Elizabeth I was therefore Anne Stanley, Countess of Castlehaven (the marriage of Lady Katherine Grey having been annulled, and her children declared illegitimate, by Elizabeth I).
Her succession, under this theory, follows:
Henry VIII of England
Edward VI of England, only son of Henry VIII
Mary I of England, eldest daughter of Henry VIII
Elizabeth I of England, second daughter of Henry VIII
Mary Tudor, Queen of France, second daughter of Henry VII
Lady Eleanor Brandon, second daughter, third line of Mary
Lady Margaret Clifford, only daughter, third line of Eleanor
Ferdinando Stanley, 5th Earl of Derby, first son of Margaret
Anne Stanley, Countess of Castlehaven, first daughter of Ferdinando
George Brydges, 6th Baron Chandos, first son of Anne
Margaret Brydges, first daughter of George
George Brydges Skipwith, first son of Margaret
Elizabeth Brownlow, first daughter of Margaret, succeeded their childless brother George
George Brownlow Doughty, first son of Elizabeth
Henry Doughty, only child of George
Henry Doughty, only son of Henry
Elizabeth Doughty, only daughter of Henry Doughty Sr
Since Lady Anne Stanley'''s line is thought to have become extinct with the death of Elizabeth Doughty, the line then passes to the descendants of Lady Anne's sister, Lady Frances Stanley:
Lady Frances Stanley, second daughter of Ferdinando
John Egerton, 2nd Earl of Bridgewater, first son of Frances
John Egerton, 3rd Earl of Bridgewater, first son of John
Scroop Egerton, 1st Duke of Bridgewater, third son of John
Lady Anne Egerton, first daughter of Scroop
George Villiers, 4th Earl of Jersey, only child of Anne
George Child Villiers, 5th Earl of Jersey, first son of George, 4th Earl of Jersey
George Child Villiers, 6th Earl of Jersey, first son of George, 5th Earl of Jersey
Victor Child Villiers, 7th Earl of Jersey, only son of George, 6th Earl of Jersey
George Child Villiers, 8th Earl of Jersey, first son of Victor, 7th Earl of Jersey
George Child Villiers, 9th Earl of Jersey, first son of George, 8th Earl of Jersey
Lady Caroline Child Villiers, only child of George's first marriage
Lady Caroline's heir-apparent is her son Timothy Elliot-Murray-Kynynmound, 7th Earl of Minto.
Although the 9th Earl of Jersey had sons from a third marriage, he had been divorced from his first wife, who was still alive when he married his third. Under a strict adherence to the succession laws and customs as they existed in 1603 (for it is argued that no laws passed by Parliament since 1603 are legitimate, as the heirs did not summon those Parliaments, nor did those laws receive the royal assent to become law), the 9th Earl of Jersey's divorce was not valid, and therefore both his remarriage during his ex-wife's lifetime was null and void, and the children of his third marriage illegitimate. Consequently, the current holder of the Stanley claim to the throne of England is the only child of the 9th Earl's first marriage, Lady Caroline Ogilvy (née Child Villiers).
Descendants of Edward Seymour, Viscount Beauchamp
Although the marriage of Lady Katherine Grey and Edward Seymour, 1st Earl of Hertford, was annulled as illegal in 1562, and her children consequently rendered illegitimate, James I regarded the Seymour line as eligible heirs. This unofficial rehabilitation of the Seymours placed them ahead of the Stanleys in James's opinion. In 2012, Mary Freeman-Grenville, 12th Lady Kinloss was listed as the heir to the Mary Tudor claim rather than Frances Stanley's descendants.
Her succession follows:
Henry VIII of England
Edward VI of England, only son of Henry
Mary I of England, eldest daughter of Henry
Elizabeth I of England, second daughter of Henry
Mary Tudor, Queen of France, third daughter of Henry VII of England, younger sister of Henry VIII of England
Lady Frances Brandon, first daughter of Mary
Lady Katherine Grey, second daughter of Frances
Edward Seymour, Viscount Beauchamp, first son of Katherine
William Seymour, 2nd Duke of Somerset, second son of Edward, succeeded their childless brother Edward
Henry Seymour, Lord Beauchamp, third son of William, his elder brothers William and Robert died in childhood
Lady Elizabeth Seymour, only daughter of Henry
Charles Bruce, 3rd Earl of Ailesbury, second son of Elizabeth, his elder brother Robert died in childhood
Lady Mary Bruce, first daughter, succeeded their childless brothers Robert and George
James Brydges, 3rd Duke of Chandos, only son of Mary
Lady Anne Elizabeth Brydges, only child of James
Richard Temple-Nugent-Brydges-Chandos-Grenville, 2nd Duke of Buckingham and Chandos, first son of Anne
Richard Temple-Nugent-Brydges-Chandos-Grenville, 3rd Duke of Buckingham and Chandos, only son of Richard
Mary Morgan-Grenville, 11th Lady Kinloss, first daughter of Richard
Luis Chandos Francis Temple Morgan-Grenville, second son of Mary, succeeded their childless brother Richard
Mary Freeman-Grenville, 12th Lady Kinloss, first daughter of Luis
Teresa Freeman-Grenville, 13th Lady Kinloss, first daughter of Mary
Lady Kinloss's heir-presumptive is her sister Hester Josephine Anne Freeman-Grenville, who is married to Peter Haworth and has three sons.
Continuation of the House of Stuart
The Catholic heirs of the deposed James II of England were passed over by the Act of Settlement 1701.
Charles I of England
James II of England, second son of Charles I
James Francis Edward Stuart, only son of James II; called "James III" by Jacobites.
Charles Edward Stuart, elder son of James Francis. He had no legitimate issue by his wife. He had an illegitimate daughter who has descendants, but they have no succession rights. Also known as "Charles III" by Jacobites or as "Bonnie Prince Charlie" more widely.
Henry Benedict Stuart, younger son of James Francis. He was a Cardinal of the Catholic Church and had no issue. Called "Henry IX" by Jacobites.
At Henry's death the claim passed to his second cousin twice removed, Charles Emmanuel IV of Sardinia, and then to his brother Victor Emmanuel I of Sardinia. Charles Emmanuel and Victor Emmanuel were great-great-great-grandsons of King Charles I.
Charles I of England
Henrietta Anne Stuart, youngest daughter of Charles
Anne Marie d'Orléans, second daughter of Henrietta Anne
Charles Emmanuel III of Sardinia, second son of Anne Marie
Victor Amadeus III of Sardinia, second son of Charles Emmanuel
Charles Emmanuel IV of Sardinia, eldest son of Victor Amadeus
Victor Emmanuel I of Sardinia, second son of Victor Amadeus
Maria Beatrice of Savoy, eldest daughter of Victor EmmanuelFrancis V, Duke of Modena, elder son of Maria Beatrice
Archduke Ferdinand Karl Viktor of Austria-Este, younger son of Maria Beatrice, succeeded their elder brother Francis who had no surviving adult children
Maria Theresa of Austria-Este, only child of Ferdinand
Rupprecht, Crown Prince of Bavaria, eldest son of Maria Theresia
Albrecht, Duke of Bavaria, second son of Rupprecht, his elder brother Luitpold died in childhood
Franz, Duke of Bavaria'', elder son of Albrecht
When Franz dies, his claim on the English and Scottish crowns will pass to his younger brother Prince Max. And after Max's death, this theoretical claim most likely will be inherited by Sophie, Hereditary Princess of Liechtenstein, daughter of Prince Max.
References
British monarchs
Alternative
Succession to the British crown
Rival successions
|
```java
/**
* <p>
* <p>
* path_to_url
* <p>
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package com.newlandframework.rpc.core;
import com.newlandframework.rpc.model.MessageRequest;
/**
* @author tangjie<path_to_url
* @filename:ModuleInvoker.java
* @description:ModuleInvoker
* @blogs path_to_url
* @since 2018/1/31
*/
public interface ModuleInvoker<T> {
Class<T> getInterface();
Object invoke(MessageRequest request) throws Throwable;
void destroy();
}
```
|
```python
"""
If we are presented with the first k terms of a sequence it is impossible to say with
certainty the value of the next term, as there are infinitely many polynomial functions
that can model the sequence.
As an example, let us consider the sequence of cube
numbers. This is defined by the generating function,
u(n) = n3: 1, 8, 27, 64, 125, 216, ...
Suppose we were only given the first two terms of this sequence. Working on the
principle that "simple is best" we should assume a linear relationship and predict the
next term to be 15 (common difference 7). Even if we were presented with the first three
terms, by the same principle of simplicity, a quadratic relationship should be
assumed.
We shall define OP(k, n) to be the nth term of the optimum polynomial
generating function for the first k terms of a sequence. It should be clear that
OP(k, n) will accurately generate the terms of the sequence for n k, and potentially
the first incorrect term (FIT) will be OP(k, k+1); in which case we shall call it a
bad OP (BOP).
As a basis, if we were only given the first term of sequence, it would be most
sensible to assume constancy; that is, for n 2, OP(1, n) = u(1).
Hence we obtain the
following OPs for the cubic sequence:
OP(1, n) = 1 1, 1, 1, 1, ...
OP(2, n) = 7n-6 1, 8, 15, ...
OP(3, n) = 6n^2-11n+6 1, 8, 27, 58, ...
OP(4, n) = n^3 1, 8, 27, 64, 125, ...
Clearly no BOPs exist for k 4.
By considering the sum of FITs generated by the BOPs (indicated in red above), we
obtain 1 + 15 + 58 = 74.
Consider the following tenth degree polynomial generating function:
1 - n + n^2 - n^3 + n^4 - n^5 + n^6 - n^7 + n^8 - n^9 + n^10
Find the sum of FITs for the BOPs.
"""
from __future__ import annotations
from collections.abc import Callable
Matrix = list[list[float | int]]
def solve(matrix: Matrix, vector: Matrix) -> Matrix:
"""
Solve the linear system of equations Ax = b (A = "matrix", b = "vector")
for x using Gaussian elimination and back substitution. We assume that A
is an invertible square matrix and that b is a column vector of the
same height.
>>> solve([[1, 0], [0, 1]], [[1],[2]])
[[1.0], [2.0]]
>>> solve([[2, 1, -1],[-3, -1, 2],[-2, 1, 2]],[[8], [-11],[-3]])
[[2.0], [3.0], [-1.0]]
"""
size: int = len(matrix)
augmented: Matrix = [[0 for _ in range(size + 1)] for _ in range(size)]
row: int
row2: int
col: int
col2: int
pivot_row: int
ratio: float
for row in range(size):
for col in range(size):
augmented[row][col] = matrix[row][col]
augmented[row][size] = vector[row][0]
row = 0
col = 0
while row < size and col < size:
# pivoting
pivot_row = max((abs(augmented[row2][col]), row2) for row2 in range(col, size))[
1
]
if augmented[pivot_row][col] == 0:
col += 1
continue
else:
augmented[row], augmented[pivot_row] = augmented[pivot_row], augmented[row]
for row2 in range(row + 1, size):
ratio = augmented[row2][col] / augmented[row][col]
augmented[row2][col] = 0
for col2 in range(col + 1, size + 1):
augmented[row2][col2] -= augmented[row][col2] * ratio
row += 1
col += 1
# back substitution
for col in range(1, size):
for row in range(col):
ratio = augmented[row][col] / augmented[col][col]
for col2 in range(col, size + 1):
augmented[row][col2] -= augmented[col][col2] * ratio
# round to get rid of numbers like 2.000000000000004
return [
[round(augmented[row][size] / augmented[row][row], 10)] for row in range(size)
]
def interpolate(y_list: list[int]) -> Callable[[int], int]:
"""
Given a list of data points (1,y0),(2,y1), ..., return a function that
interpolates the data points. We find the coefficients of the interpolating
polynomial by solving a system of linear equations corresponding to
x = 1, 2, 3...
>>> interpolate([1])(3)
1
>>> interpolate([1, 8])(3)
15
>>> interpolate([1, 8, 27])(4)
58
>>> interpolate([1, 8, 27, 64])(6)
216
"""
size: int = len(y_list)
matrix: Matrix = [[0 for _ in range(size)] for _ in range(size)]
vector: Matrix = [[0] for _ in range(size)]
coeffs: Matrix
x_val: int
y_val: int
col: int
for x_val, y_val in enumerate(y_list):
for col in range(size):
matrix[x_val][col] = (x_val + 1) ** (size - col - 1)
vector[x_val][0] = y_val
coeffs = solve(matrix, vector)
def interpolated_func(var: int) -> int:
"""
>>> interpolate([1])(3)
1
>>> interpolate([1, 8])(3)
15
>>> interpolate([1, 8, 27])(4)
58
>>> interpolate([1, 8, 27, 64])(6)
216
"""
return sum(
round(coeffs[x_val][0]) * (var ** (size - x_val - 1))
for x_val in range(size)
)
return interpolated_func
def question_function(variable: int) -> int:
"""
The generating function u as specified in the question.
>>> question_function(0)
1
>>> question_function(1)
1
>>> question_function(5)
8138021
>>> question_function(10)
9090909091
"""
return (
1
- variable
+ variable**2
- variable**3
+ variable**4
- variable**5
+ variable**6
- variable**7
+ variable**8
- variable**9
+ variable**10
)
def solution(func: Callable[[int], int] = question_function, order: int = 10) -> int:
"""
Find the sum of the FITs of the BOPS. For each interpolating polynomial of order
1, 2, ... , 10, find the first x such that the value of the polynomial at x does
not equal u(x).
>>> solution(lambda n: n ** 3, 3)
74
"""
data_points: list[int] = [func(x_val) for x_val in range(1, order + 1)]
polynomials: list[Callable[[int], int]] = [
interpolate(data_points[:max_coeff]) for max_coeff in range(1, order + 1)
]
ret: int = 0
poly: Callable[[int], int]
x_val: int
for poly in polynomials:
x_val = 1
while func(x_val) == poly(x_val):
x_val += 1
ret += poly(x_val)
return ret
if __name__ == "__main__":
print(f"{solution() = }")
```
|
The Belgian football league system is a series of interconnected leagues for club football in Belgium.
Men's system
The league system underwent restructuring which was approved by the Royal Belgian Football Association. One important step was the introduction of a national fifth level for the first time. Its implementation took effect as of the 2016–17 season. Due to the COVID-19 pandemic, the Belgian First Division A has expanded temporarily from 16 to 18 teams, with the intention to return to 16 from 2023 to 2024.
Pre-2016 structure
Until the end of the 2015–16 season, the structure was as follows. For each division, its official name, sponsorship name (which often differs radically from its official name) and number of clubs is given. The winner(s) of each division promoted to the division(s) directly above them and relegated to the division(s) that lie directly below them.
Men's league historical timeline
The timeline below lists the evolution of the men's tiers and leagues related to the Belgian FA since 1895. The provincial leagues often span multiple tiers.
Women's system
From 2012/13 to 2014/15 the top teams played in the BeNe League, a joint league with clubs from the Netherlands. The Super League was created in 2015.
References
External links
League321.com - Belgian Football League Tables, Records & Statistics Database.
Belgian Football League summary(flashscore)
Belgium
|
```smalltalk
using System;
using System.Collections.Generic;
using NuGet.Versioning;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Xml;
using Volo.Abp.Cli.Version;
using Volo.Abp.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System.Text;
namespace Volo.Abp.Cli.ProjectModification;
public class VoloNugetPackagesVersionUpdater : ITransientDependency
{
private readonly PackageVersionCheckerService _packageVersionCheckerService;
private readonly MyGetPackageListFinder _myGetPackageListFinder;
public ILogger<VoloNugetPackagesVersionUpdater> Logger { get; set; }
public static Encoding DefaultEncoding = Encoding.UTF8;
public VoloNugetPackagesVersionUpdater(PackageVersionCheckerService packageVersionCheckerService, MyGetPackageListFinder myGetPackageListFinder)
{
_packageVersionCheckerService = packageVersionCheckerService;
_myGetPackageListFinder = myGetPackageListFinder;
Logger = NullLogger<VoloNugetPackagesVersionUpdater>.Instance;
}
public async Task UpdateSolutionAsync(string solutionPath, bool includePreviews = false, bool includeReleaseCandidates = false, bool switchToStable = false, bool checkAll = false, string version = null)
{
var projectPaths = ProjectFinder.GetProjectFiles(solutionPath);
if (checkAll && version.IsNullOrWhiteSpace())
{
Task.WaitAll(projectPaths.Select(projectPath => UpdateInternalAsync(projectPath, includePreviews, includeReleaseCandidates, switchToStable)).ToArray());
}
else
{
var latestVersionInfo = await _packageVersionCheckerService.GetLatestVersionOrNullAsync("Volo.Abp.Core", includeReleaseCandidates: includeReleaseCandidates);
var latestReleaseCandidateVersionInfo = await _packageVersionCheckerService.GetLatestVersionOrNullAsync("Volo.Abp.Core", includeReleaseCandidates: true);
var latestVersionFromMyGet = await GetLatestVersionFromMyGet("Volo.Abp.Core");
async Task UpdateAsync(string filePath)
{
using (var fs = File.Open(filePath, FileMode.Open, FileAccess.ReadWrite, FileShare.None))
{
using (var sr = new StreamReader(fs, Encoding.Default, true))
{
var fileContent = await sr.ReadToEndAsync();
var updatedContent = await UpdateVoloPackagesAsync(fileContent,
includePreviews,
includeReleaseCandidates,
switchToStable,
latestVersionInfo.Version,
latestReleaseCandidateVersionInfo.Version,
latestVersionFromMyGet,
version);
fs.Seek(0, SeekOrigin.Begin);
fs.SetLength(0);
using (var sw = new StreamWriter(fs, DefaultEncoding))
{
await sw.WriteAsync(updatedContent);
await sw.FlushAsync();
}
}
}
}
Task.WaitAll(projectPaths.Select(UpdateAsync).ToArray());
}
}
public async Task UpdateProjectAsync(string projectPath, bool includeNightlyPreviews = false, bool includeReleaseCandidates = false, bool switchToStable = false, bool checkAll = false, string version = null)
{
if (checkAll && version.IsNullOrWhiteSpace())
{
await UpdateInternalAsync(projectPath, includeNightlyPreviews, includeReleaseCandidates, switchToStable);
}
else
{
var latestVersionInfo = await _packageVersionCheckerService.GetLatestVersionOrNullAsync("Volo.Abp.Core");
var latestReleaseCandidateVersionInfo = await _packageVersionCheckerService.GetLatestVersionOrNullAsync("Volo.Abp.Core", includeReleaseCandidates: true);
var latestVersionFromMyGet = await GetLatestVersionFromMyGet("Volo.Abp.Core");
using (var fs = File.Open(projectPath, FileMode.Open, FileAccess.ReadWrite, FileShare.None))
{
using (var sr = new StreamReader(fs, Encoding.Default, true))
{
var fileContent = await sr.ReadToEndAsync();
var updatedContent = await UpdateVoloPackagesAsync(fileContent,
includeNightlyPreviews,
includeReleaseCandidates,
switchToStable,
latestVersionInfo.Version,
latestReleaseCandidateVersionInfo.Version,
latestVersionFromMyGet,
version);
fs.Seek(0, SeekOrigin.Begin);
fs.SetLength(0);
using (var sw = new StreamWriter(fs, sr.CurrentEncoding))
{
await sw.WriteAsync(updatedContent);
await sw.FlushAsync();
}
}
}
}
}
protected virtual async Task UpdateInternalAsync(string projectPath, bool includeNightlyPreviews = false, bool includeReleaseCandidates = false, bool switchToStable = false)
{
using (var fs = File.Open(projectPath, FileMode.Open, FileAccess.ReadWrite, FileShare.None))
{
using (var sr = new StreamReader(fs, Encoding.Default, true))
{
var fileContent = await sr.ReadToEndAsync();
var updatedContent = await UpdateVoloPackagesAsync(fileContent, includeNightlyPreviews, includeReleaseCandidates, switchToStable);
fs.Seek(0, SeekOrigin.Begin);
fs.SetLength(0);
using (var sw = new StreamWriter(fs, sr.CurrentEncoding))
{
await sw.WriteAsync(updatedContent);
await sw.FlushAsync();
}
}
}
}
protected virtual async Task<bool> SpecifiedVersionExists(string version, string packageId)
{
var versionList = await _packageVersionCheckerService.GetPackageVersionListAsync(packageId);
if (versionList.All(v => !v.Equals(version, StringComparison.OrdinalIgnoreCase)))
{
versionList = await _packageVersionCheckerService.GetPackageVersionListAsync(packageId, true);
}
return versionList.Any(v => v.Equals(version, StringComparison.OrdinalIgnoreCase));
}
private async Task<string> UpdateVoloPackagesAsync(string content,
bool includeNightlyPreviews = false,
bool includeReleaseCandidates = false,
bool switchToStable = false,
SemanticVersion latestNugetVersion = null,
SemanticVersion latestNugetReleaseCandidateVersion = null,
string latestMyGetVersion = null,
string specifiedVersion = null)
{
string packageId = null;
try
{
var doc = new XmlDocument()
{
PreserveWhitespace = true
};
doc.LoadXml(content);
var packageNodeList = doc.SelectNodes("/Project/ItemGroup/PackageReference[starts-with(@Include, 'Volo.')]");
if (packageNodeList != null)
{
foreach (XmlNode package in packageNodeList)
{
if (package.Attributes == null)
{
continue;
}
packageId = package.Attributes["Include"].Value;
var versionAttribute = package.Attributes["Version"];
if (versionAttribute == null)
{
Logger.LogWarning("Package: {PackageId} uses central package management. Skipped!", packageId);
continue;
}
var currentVersion = versionAttribute.Value;
var isLeptonXPackage = packageId.Contains("LeptonX");
var isStudioPackage = packageId.StartsWith("Volo.Abp.Studio.");
if(isLeptonXPackage)
{
//'SemanticVersion.TryParse' can not parse the version if the version contains floating version resolution, such as '*-*'
currentVersion = currentVersion.Replace("*-*", "0").Replace("*", "0");
}
var isVersionParsed = SemanticVersion.TryParse(currentVersion, out var currentSemanticVersion);
if (!isVersionParsed)
{
Logger.LogWarning("Could not parse package \"{PackageId}\" version v{CurrentVersion}. Skipped!", packageId, currentVersion);
continue;
}
Logger.LogDebug("Checking package: \"{PackageId}\" - Current version: {CurrentSemanticVersion}", packageId, currentSemanticVersion);
if (!specifiedVersion.IsNullOrWhiteSpace())
{
if (isLeptonXPackage || isStudioPackage)
{
Logger.LogWarning("Package: {PackageId} could not be updated. Please manually update the package version yourself to prevent version mismatches!", packageId);
continue;
}
if (await SpecifiedVersionExists(specifiedVersion, packageId))
{
var specifiedSemanticVersion = SemanticVersion.Parse(specifiedVersion);
if (specifiedSemanticVersion > currentSemanticVersion)
{
Logger.LogInformation("Updating package \"{PackageId}\" from v{CurrentVersion} to v{SpecifiedVersion}", packageId, currentVersion, specifiedVersion);
versionAttribute.Value = specifiedVersion;
}
else
{
Logger.LogWarning("Unable to update package \"{PackageId}\" version v{CurrentVersion} to v{SpecifiedVersion}", packageId, currentVersion, specifiedVersion);
}
}
else
{
Logger.LogWarning("Package \"{PackageId}\" specified version v{SpecifiedVersion} does not exist!", packageId, specifiedVersion);
}
}
else
{
if ((includeNightlyPreviews || (currentVersion.Contains("-preview") && !switchToStable)) && !includeReleaseCandidates)
{
string latestVersion;
if(isLeptonXPackage)
{
var leptonXPackageName = packageId;
if(includeNightlyPreviews)
{
//use LeptonX Lite package as the package name to be able to get the package version from the 'abp-nightly' feed.
leptonXPackageName = "Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite";
}
latestVersion = (await _packageVersionCheckerService.GetLatestVersionOrNullAsync(leptonXPackageName, includeNightlyPreviews, includeReleaseCandidates))?.Version?.ToString();
}
else if(isStudioPackage)
{
latestVersion = (await _packageVersionCheckerService.GetLatestVersionOrNullAsync(packageId, includeNightlyPreviews, includeReleaseCandidates))?.Version?.ToString();
}
else
{
latestVersion = latestMyGetVersion == null ? await GetLatestVersionFromMyGet(packageId) : latestMyGetVersion;
}
if(latestVersion == null)
{
Logger.LogWarning("Package: {PackageId} could not be updated. Please manually update the package version yourself to prevent version mismatches!", packageId);
continue;
}
if (currentVersion != latestVersion)
{
Logger.LogInformation("Updating package \"{PackageId}\" from v{CurrentVersion} to v{LatestVersion}", packageId, currentVersion, latestVersion);
versionAttribute.Value = latestVersion;
}
else
{
Logger.LogDebug("Package: \"{PackageId}-v{CurrentVersion}\" is up to date", packageId, currentVersion);
}
}
else
{
SemanticVersion latestVersion;
if (currentSemanticVersion.IsPrerelease && !switchToStable)
{
latestVersion = latestNugetReleaseCandidateVersion == null || isLeptonXPackage || isStudioPackage
? (await _packageVersionCheckerService.GetLatestVersionOrNullAsync(packageId, includeReleaseCandidates: true))?.Version
: latestNugetReleaseCandidateVersion;
}
else
{
latestVersion = latestNugetVersion == null || isLeptonXPackage || isStudioPackage
? (await _packageVersionCheckerService.GetLatestVersionOrNullAsync(packageId, includeReleaseCandidates: includeReleaseCandidates))?.Version
: latestNugetVersion;
}
if (latestVersion != null && (currentSemanticVersion < latestVersion || (currentSemanticVersion.IsPrerelease && switchToStable)))
{
Logger.LogInformation("Updating package \"{PackageId}\" from v{CurrentSemanticVersion} to v{LatestVersion}", packageId, currentSemanticVersion.ToString(), latestVersion.ToString());
versionAttribute.Value = latestVersion.ToString();
}
else
{
Logger.LogInformation("Package: \"{PackageId}-v{CurrentSemanticVersion}\" is up to date", packageId, currentSemanticVersion);
}
}
}
}
return doc.OuterXml;
}
}
catch (Exception ex)
{
Logger.LogError("Cannot update Volo.* packages! An error occurred while updating the package \"{PackageId}\". Error: {ErrorMessage}", packageId, ex.Message);
Logger.LogException(ex);
}
return await Task.FromResult(content);
}
private async Task<string> GetLatestVersionFromMyGet(string packageId)
{
var myGetPack = await _myGetPackageListFinder.GetPackagesAsync();
return myGetPack.Packages.FirstOrDefault(p => p.Id == packageId)?.Versions.LastOrDefault();
}
}
```
|
James Delbourgo (1972) is a writer and historian of science, collecting and museums. He is the James Westfall Thompson Chair and Distinguished Professor of History at Rutgers University.
Delbourgo was born in Britain to Italian parents and educated at Reigate Grammar School, the University of East Anglia, Cambridge (Christ's College), Penn and Columbia. He previously taught at McGill University in Montreal, where he directed the program in History and Philosophy of Science; and was Visiting Professor of History of Science at Harvard in 2016.
His most recent book, Collecting the World (2017), explores the life and career of Hans Sloane, which culminated in the foundation of the British Museum in 1753. It is based on 15 years of research in Sloane's surviving London collections in collaboration with the British Museum, Natural History Museum and British Library. Published by Penguin in the UK and Belknap in the US, the book won four prizes, made four shortlists, and was named Book of the Week in the Guardian, London Times, Daily Mail and The Week Magazine, and one of Apollo Magazine's Books of the Year; featured in BBC Radio's Today Programme and NPR's Leonard Lopate Show, the British Museum and BBC History Magazine podcasts, Science Magazine and Smithsonian Magazine; and reviewed in the New York Times, New York Review of Books, New Republic, Financial Times, the Spectator, the Economist, the Lancet, Daily Telegraph, Irish Times, Nature Magazine and Art Quarterly. Delbourgo has lectured on Sloane & the British Museum in the UK, Germany, Italy, France, Jamaica and the US.
Recent magazine essays range in subject from Arab world space programs to Russo-Asian de-extinction projects; and collecting from early modern Korea to Gilded Age America. He writes regularly for the Literary Review in London.
Current projects include a history of collectors forthcoming from W. W. Norton & Company (NY) and Quercus/ riverrun (London); a global approach to the history of science; and Divers Things, on the cultural history of underwater exploration.
Selected publications
Collecting the World: Hans Sloane and the Origins of the British Museum (Penguin and Harvard, 2017): Leo Gershoy Award (AHA), Louis Gottschalk and Annibel Jenkins Prizes (ASECS), Hughes Prize (BSHS).
The Brokered World: Go-Betweens and Global Intelligence, 1770-1820, co-editor with Simon Schaffer, Lissa Roberts and Kapil Raj (Science History Publications, 2009).
Science and Empire in the Atlantic World, co-editor with Nicholas Dew (Routledge, 2007).
A Most Amazing Scene of Wonders: Electricity and Enlightenment in Early America (Harvard, 2006): Thomas J Wilson Prize (HUP).
References
https://www.hup.harvard.edu/catalog.php?isbn=9780674237483&content=bios
https://histsci.fas.harvard.edu/people/james-delbourgo
https://www.penguin.co.uk/authors/73569/james-delbourgo.html?tab=penguin-books
https://journals.sagepub.com/doi/abs/10.1177/0073275319831582
British historians
Living people
1972 births
Rutgers University faculty
|
Thomas Acton Nash, Sr. (November 21, 1905 – August 24, 1972) was an American football end for the Green Bay Packers and Brooklyn Dodgers of the National Football League (NFL) from 1928 to 1934.
Early years
Tom Nash, Sr. was born in Lincoln County, Georgia and grew up in Washington, Georgia.
College career
Nash played college football on the 1925, 1926, and 1927 University of Georgia football teams, including the 1927 "Dream and Wonder" team. He was a consensus All-American in 1927.
Professional football
He then played professional football in the National Football League (NFL), first for the Green Bay Packers, including the World Championship teams of 1929, 1930, and 1931. He was named All-Pro while at Green Bay in 1932. He finished his professional career with the Brooklyn Dodgers.
Baseball
He also played Double A and Triple A baseball.
Later life
After completing his professional career, he returned to his hometown of Washington, Georgia, where he was an automobile dealer and later elementary school principal and coach, mentoring many young men in that community. From 1943 to 1945, he was an assistant football coach at the University of Georgia under Coach Wally Butts. He was named to the 1934 University of Georgia All-Time team. He was also inducted into the state of Georgia Sports Hall of Fame in 1972 and the Washington-Wilkes Sports Hall of Fame in its inaugural induction in 1987. His son, Thomas Nash Jr. followed in his father's footsteps and played football as an offensive tackle for the University of Georgia from 1968-1971. "Little Tom" was an Academic All-American and named to the All-SEC Team during his time at Georgia.
References
External links
1905 births
1972 deaths
American football ends
Brooklyn Dodgers (NFL) players
Georgia Bulldogs football players
Green Bay Packers players
All-American college football players
All-Southern college football players
People from Lincoln County, Georgia
People from Washington, Georgia
Players of American football from Georgia (U.S. state)
|
```objective-c
/*
* This file is part of the JPVideoPlayer package.
* (c) NewPan <13246884282@163.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Click path_to_url
* or path_to_url to contact me.
*/
#import <Foundation/Foundation.h>
#import "JPVideoPlayerCompat.h"
NS_ASSUME_NONNULL_BEGIN
@interface JPVideoPlayerCacheConfiguration : NSObject
/**
* The maximum length of time to keep an video in the cache, in seconds
*/
@property (assign, nonatomic) NSInteger maxCacheAge;
/**
* The maximum size of the cache, in bytes.
* If the cache Beyond this value, it will delete the video file by the cache time automatic.
*/
@property (assign, nonatomic) NSUInteger maxCacheSize;
/**
* disable iCloud backup [defaults to YES]
*/
@property (assign, nonatomic) BOOL shouldDisableiCloud;
@end
typedef NS_ENUM(NSInteger, JPVideoPlayerCacheType) {
/**
* The video wasn't available the JPVideoPlayer caches.
*/
JPVideoPlayerCacheTypeNone,
/**
* The video was obtained on the disk cache.
*/
JPVideoPlayerCacheTypeExisted,
/**
* A location source.
*/
JPVideoPlayerCacheTypeLocation
};
typedef void(^JPVideoPlayerCacheQueryCompletion)(NSString * _Nullable videoPath, JPVideoPlayerCacheType cacheType);
typedef void(^JPVideoPlayerCheckCacheCompletion)(BOOL isInDiskCache);
typedef void(^JPVideoPlayerCalculateSizeCompletion)(NSUInteger fileCount, NSUInteger totalSize);
/**
* JPVideoPlayerCache maintains a disk cache. Disk cache write operations are performed
* asynchronous so it doesnt add unnecessary latency to the UI.
*/
@interface JPVideoPlayerCache : NSObject
#pragma mark - Singleton and initialization
/**
* Cache Config object - storing all kind of settings.
*/
@property (nonatomic, readonly) JPVideoPlayerCacheConfiguration *cacheConfiguration;
/**
* Init with given cacheConfig.
*
* @see `JPVideoPlayerCacheConfig`.
*/
- (instancetype)initWithCacheConfiguration:(JPVideoPlayerCacheConfiguration * _Nullable)cacheConfiguration NS_DESIGNATED_INITIALIZER;
/**
* Returns global shared cache instance.
*
* @return JPVideoPlayerCache global instance.
*/
+ (instancetype)sharedCache;
# pragma mark - Query and Retrieve Options
/**
* Async check if video exists in disk cache already (does not load the video).
*
* @param key The key describing the url.
* @param completion The block to be executed when the check is done.
* @note the completion block will be always executed on the main queue.
*/
- (void)diskVideoExistsWithKey:(NSString *)key
completion:(JPVideoPlayerCheckCacheCompletion _Nullable)completion;
/**
* Operation that queries the cache asynchronously and call the completion when done.
*
* @param key The unique key used to store the wanted video.
* @param completion The completion block. Will not get called if the operation is cancelled.
*/
- (void)queryCacheOperationForKey:(NSString *)key
completion:(JPVideoPlayerCacheQueryCompletion _Nullable)completion;
/**
* Async check if video exists in disk cache already (does not load the video).
*
* @param path The path need to check in disk.
*
* @return If the file is existed for given video path, return YES, return NO, otherwise.
*/
- (BOOL)diskVideoExistsOnPath:(NSString *)path;
# pragma mark - Clear Cache Events
/**
* Remove the video data from disk cache asynchronously
*
* @param key The unique video cache key.
* @param completion A block that should be executed after the video has been removed (optional).
*/
- (void)removeVideoCacheForKey:(NSString *)key
completion:(dispatch_block_t _Nullable)completion;
/**
* Async remove all expired cached video from disk. Non-blocking method - returns immediately.
*
* @param completion A block that should be executed after cache expiration completes (optional)
*/
- (void)deleteOldFilesOnCompletion:(dispatch_block_t _Nullable)completion;
/**
* Async clear all disk cached videos. Non-blocking method - returns immediately.
*
* @param completion A block that should be executed after cache expiration completes (optional).
*/
- (void)clearDiskOnCompletion:(dispatch_block_t _Nullable)completion;
/**
* Async clear videos cache in disk on version 2.x.
*
* @param completion A block that should be executed after cache expiration completes (optional).
*/
- (void)clearVideoCacheOnVersion2OnCompletion:(dispatch_block_t _Nullable)completion;
# pragma mark - Cache Info
/**
* To check is have enough free size in disk to cache file with given size.
*
* @param fileSize the need to cache size of file.
*
* @return if the disk have enough size to cache the given size file, return YES, return NO otherwise.
*/
- (BOOL)haveFreeSizeToCacheFileWithSize:(NSUInteger)fileSize;
/**
* Get the free size of device.
*
* @return the free size of device.
*/
- (unsigned long long)getDiskFreeSize;
/**
* Get the size used by the disk cache, synchronously.
*/
- (unsigned long long)getSize;
/**
* Get the number of images in the disk cache, synchronously.
*/
- (NSUInteger)getDiskCount;
/**
* Calculate the disk cache's size, asynchronously .
*/
- (void)calculateSizeOnCompletion:(JPVideoPlayerCalculateSizeCompletion _Nullable)completion;
# pragma mark - File Name
/**
* Generate the video file's name for given key.
*
* @return the file's name.
*/
- (NSString *)cacheFileNameForKey:(NSString *)key;
@end
@interface JPVideoPlayerCache(Deprecated)
/**
* Remove the video data from disk cache asynchronously
*
* @param key The unique video cache key.
* @param completion A block that should be executed after the video has been removed (optional).
*/
- (void)removeFullCacheForKey:(NSString *)key
completion:(dispatch_block_t _Nullable)completion JPDEPRECATED_ATTRIBUTE("`removeFullCacheForKey:completion:` is deprecated on 3.0.")
/**
* Clear the temporary cache video for given key.
*
* @param key The unique flag for the given url in this framework.
* @param completion A block that should be executed after the video has been removed (optional).
*/
- (void)removeTempCacheForKey:(NSString *)key
completion:(nullable dispatch_block_t)completion JPDEPRECATED_ATTRIBUTE("`removeTempCacheForKey:completion:` is deprecated on 3.0.")
/**
* Async delete all temporary cached videos. Non-blocking method - returns immediately.
* @param completion A block that should be executed after cache expiration completes (optional).
*/
- (void)deleteAllTempCacheOnCompletion:(dispatch_block_t _Nullable)completion JPDEPRECATED_ATTRIBUTE("`deleteAllTempCacheOnCompletion:` is deprecated on 3.0.");
@end
NS_ASSUME_NONNULL_END
```
|
Aaron's Way is an American family television drama series that aired on NBC from March 9 to May 25, 1988. It stars Merlin Olsen as Aaron Miller, the husband and father of an Amish family that moves to California and follows the family's attempts to adapt to Californian culture while retaining their personal values. Also appearing on it were Samantha Mathis and Belinda Montgomery.
Synopsis
Aaron Miller's eldest son Noah has left the Amish community for the world, but Aaron keeps in touch with him using a post office box. When Aaron learns that Noah died in a surfing accident, he goes to California for his funeral, where he learns that Noah had been living with a woman named Susanna Lo Verde, who owns a vineyard and is pregnant by Noah.
Aaron returns to Pennsylvania to consider what to do. Soon a relative of Susanna's arrives by motorcycle and relates her difficulties, and Aaron tells his wife, who had been surprised that Aaron had kept in touch with Noah, that they need to go help her.
To Susanna's surprise, the family arrives and begins helping out while trying to cope with the unfamiliar society and technology. The three Miller children are enrolled in the public school system.
Subsequent episodes of this short-lived series deal with the continuing clash (and sometimes complementary meeting) between the Millers and their worldly hosts and neighbors. Aaron's dedication to the values of integrity and justice bend a few dishonest people their way.
Cast
Merlin Olsen as Aaron Miller
Belinda Montgomery as Sarah Miller
Samantha Mathis as Roseanne Miller
Erin Chase as Martha Miller
Scott Curtis as Frank Miller
Kathleen York as Susannah Lo Verde
Jessica Walter as Connie Lo Verde
Christopher Gartin as Mickey Lo Verde
Pierrino Mascarino as Mr. Benvenuto
Episodes
References
External links
1980s American drama television series
1988 American television series debuts
1988 American television series endings
Television shows set in California
Amish in popular culture
NBC original programming
Television series by Lorimar-Telepictures
|
```shell
Intro to `iptables`
SSH tunneling made easy
Check `iptables` firewall status
Useful ssh client optimizations
Make use of `netstat`
```
|
Nerulum was an ancient town in the interior of Lucania, mentioned by Livy during the wars of the Romans in that country, when it was taken by assault by the consul Lucius Aemilius Barbula, 317 BCE (Liv. ix. 20). The only other notice of it is found in the Itineraries, from which we learn that it was situated on the high-road from Capua to Rhegium (modern Reggio di Calabria), at the point of junction with another line of road which led from Venusia by Potentia (modern Potenza) and Grumentum towards the frontiers of Bruttium (Itin. Ant. pp. 105, 110; Tab. Peut.). The names and distances in this part of the Tabula are too corrupt and confused to be of any service: the Itinerary of Antoninus places it 14 miles (or according to another passage 16 miles) north of Muranum, the site of which is clearly ascertained at Morano Calabro. If the former distance be adopted as correct, it must have been situated at, or in the neighbourhood of, Rotonda, near the sources of the river Lao (Holsten. Not. ad Cluv. p. 293; Romanelli, vol. i. p. 389). The editors of the Barrington Atlas of the Greek and Roman World place Nerulum at Rotonda (in the Province of Potenza, Basilicata, Italy).
References
Pre-Roman cities in Italy
Lucania
Former populated places in Italy
|
The Tschugguel family (also written as Tschuggül) is an Austrian noble family from South Tyrol. The family was granted the right to bear a coat of arms in 1530 and was elevated to the rank of Baron in 1705, becoming von Tschugguel zu Tramin.
History
The Tschugguel family originated near the Ulten Valley on Tschueggsee in South Tyrol. The name, meaning "oak at Tschueggsee", comes from an Austrian legend about a thousand-year-old oak tree. Members of the family settled in Kaltern an der Weinstraße and Tramin an der Weinstraße in the 13th century.
In 1530 the mayor of Tramin an der Weinstraße, Leonhard von Tschugguel, was awarded a coat of arms by Archduke Ferdinand.
On 23 May 1705 Leonhard Ritter von Tschugguel Edler von Tschuegg von Pichelheimb, Graunburg und Mayenfeldt was elevated from knightly rank to baronial rank in the Austrian nobility.
Notable family members
Baron Albert von Tschugguel, Austrian Court Councilor and deputy imperial postmaster
Peter von Tramin (Peter Tschugguel), Austrian writer
Alexander Tschugguel, Austrian Catholic activist
References
Austrian noble families
German-language surnames
Noble families of the Holy Roman Empire
|
This is a list of Boundary Peaks of the Alaska–British Columbia border, including those on the Alaska–Yukon border, being those peaks named as border-points of the Canada–United States border as a result of the Alaska Boundary Settlement of 1903 and associated later surveys.
Brass or concrete survey markers were placed on the summits of the accessible peaks designated in the treaty, positioned such that from any one marker a surveyor could see both the previous and the next markers along the boundary line. This was done so that if ever a question arose about jurisdiction anywhere along the border, a determination could be made by sighting between two markers.
Other peaks named in the treaty but not in the numbered-peak series include T Mountain, in the Stikine Icecap area (). Other peaks on the boundary but not named in the treaty include an unnumbered Boundary Peak in the Icefield Ranges immediately north of the Alsek River () and Mount Vern Ritchie, to the north of there. Mountain passes on the boundary are few, the most important being Grand Pacific, Chilkat, Chilkoot and White Passes.
List of peaks by number
Much of Alaska is included in one of the state's boroughs, and the remainder of the state is divided into census areas. In the third column, boroughs are marked with daggers† and census areas are marked with asterisks*.
See also
Alaska boundary dispute
Boundary Ranges
List of peaks on the Alberta–British Columbia border
References
Borders of British Columbia
Boundary Ranges
Canada–United States border
International mountains of North America
Saint Elias Mountains
Alaska geography-related lists
|
```xml
import gql from 'graphql-tag';
export default ({
rootQueryName,
extendTypeDefs = true,
}: {
rootQueryName?: string;
extendTypeDefs?: boolean;
}) => gql`
${extendTypeDefs ? 'extend' : ''} type ${rootQueryName || 'Query'} {
twoFactorSecret: TwoFactorSecretKey
}
`;
```
|
```c++
//
// Aspia Project
//
// This program is free software: you can redistribute it and/or modify
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//
// along with this program. If not, see <path_to_url
//
#include "base/version.h"
#include "base/strings/unicode.h"
#include <gtest/gtest.h>
#include <cstddef>
#include <cstdint>
#include <utility>
namespace {
TEST(VersionTest, DefaultConstructor)
{
base::Version v;
EXPECT_FALSE(v.isValid());
}
TEST(VersionTest, ValueSemantics)
{
base::Version v1(u"1.2.3.4");
EXPECT_TRUE(v1.isValid());
base::Version v3;
EXPECT_FALSE(v3.isValid());
{
base::Version v2(v1);
v3 = v2;
EXPECT_TRUE(v2.isValid());
EXPECT_EQ(v1, v2);
}
EXPECT_EQ(v3, v1);
}
TEST(VersionTest, MoveSemantics)
{
const std::vector<uint32_t> components = { 1, 2, 3, 4 };
base::Version v1(components);
EXPECT_TRUE(v1.isValid());
base::Version v2(u"1.2.3.4");
EXPECT_EQ(v1, v2);
}
TEST(VersionTest, GetVersionFromString)
{
static const struct version_string
{
const char16_t* input;
size_t parts;
uint32_t firstpart;
bool success;
} cases[] =
{
{ u"", 0, 0, false },
{ u" ", 0, 0, false },
{ u"\t", 0, 0, false },
{ u"\n", 0, 0, false },
{ u" ", 0, 0, false },
{ u".", 0, 0, false },
{ u" . ", 0, 0, false },
{ u"0", 1, 0, true },
{ u"0.", 0, 0, false },
{ u"0.0", 2, 0, true },
{ u"4294967295.0", 2, 4294967295, true },
{ u"4294967296.0", 0, 0, false },
{ u"-1.0", 0, 0, false },
{ u"1.-1.0", 0, 0, false },
{ u"1,--1.0", 0, 0, false },
{ u"+1.0", 0, 0, false },
{ u"1.+1.0", 0, 0, false },
{ u"1+1.0", 0, 0, false },
{ u"++1.0", 0, 0, false },
{ u"1.0a", 0, 0, false },
{ u"1.2.3.4.5.6.7.8.9.0", 10, 1, true },
{ u"02.1", 0, 0, false },
{ u"0.01", 2, 0, true },
{ u"f.1", 0, 0, false },
{ u"15.007.20011", 3, 15, true },
{ u"15.5.28.130162", 4, 15, true },
};
int index = 0;
for (const auto& i : cases)
{
base::Version version(i.input);
EXPECT_EQ(i.success, version.isValid());
if (i.success)
{
EXPECT_EQ(i.parts, version.components().size());
EXPECT_EQ(i.firstpart, version.components()[0]);
}
++index;
}
}
TEST(VersionTest, Compare)
{
static const struct version_compare
{
const char16_t* lhs;
const char16_t* rhs;
int expected;
} cases[] =
{
{ u"1.0", u"1.0", 0 },
{ u"1.0", u"0.0", 1 },
{ u"1.0", u"2.0", -1 },
{ u"1.0", u"1.1", -1 },
{ u"1.1", u"1.0", 1 },
{ u"1.0", u"1.0.1", -1 },
{ u"1.1", u"1.0.1", 1 },
{ u"1.1", u"1.0.1", 1 },
{ u"1.0.0", u"1.0", 0 },
{ u"1.0.3", u"1.0.20", -1 },
{ u"11.0.10", u"15.007.20011", -1 },
{ u"11.0.10", u"15.5.28.130162", -1 },
{ u"15.5.28.130162", u"15.5.28.130162", 0 },
};
for (const auto& i : cases)
{
base::Version lhs(i.lhs);
base::Version rhs(i.rhs);
EXPECT_EQ(lhs.compareTo(rhs), i.expected)
<< base::asciiFromUtf16(i.lhs) << " ? " << base::asciiFromUtf16(i.rhs);
// CompareToWildcardString() should have same behavior as CompareTo() when
// no wildcards are present.
EXPECT_EQ(lhs.compareToWildcardString(i.rhs), i.expected)
<< base::asciiFromUtf16(i.lhs) << " ? " << base::asciiFromUtf16(i.rhs);
EXPECT_EQ(rhs.compareToWildcardString(i.lhs), -i.expected)
<< base::asciiFromUtf16(i.lhs) << " ? " << base::asciiFromUtf16(i.rhs);
// Test comparison operators
switch (i.expected)
{
case -1:
EXPECT_LT(lhs, rhs);
EXPECT_LE(lhs, rhs);
EXPECT_NE(lhs, rhs);
EXPECT_FALSE(lhs == rhs);
EXPECT_FALSE(lhs >= rhs);
EXPECT_FALSE(lhs > rhs);
break;
case 0:
EXPECT_FALSE(lhs < rhs);
EXPECT_LE(lhs, rhs);
EXPECT_FALSE(lhs != rhs);
EXPECT_EQ(lhs, rhs);
EXPECT_GE(lhs, rhs);
EXPECT_FALSE(lhs > rhs);
break;
case 1:
EXPECT_FALSE(lhs < rhs);
EXPECT_FALSE(lhs <= rhs);
EXPECT_NE(lhs, rhs);
EXPECT_FALSE(lhs == rhs);
EXPECT_GE(lhs, rhs);
EXPECT_GT(lhs, rhs);
break;
}
}
}
TEST(VersionTest, CompareToWildcardString)
{
static const struct version_compare
{
const char16_t* lhs;
const char16_t* rhs;
int expected;
} cases[] =
{
{ u"1.0", u"1.*", 0 },
{ u"1.0", u"0.*", 1 },
{ u"1.0", u"2.*", -1 },
{ u"1.2.3", u"1.2.3.*", 0 },
{ u"10.0", u"1.0.*", 1 },
{ u"1.0", u"3.0.*", -1 },
{ u"1.4", u"1.3.0.*", 1 },
{ u"1.3.9", u"1.3.*", 0 },
{ u"1.4.1", u"1.3.*", 1 },
{ u"1.3", u"1.4.5.*", -1 },
{ u"1.5", u"1.4.5.*", 1 },
{ u"1.3.9", u"1.3.*", 0 },
{ u"1.2.0.0.0.0", u"1.2.*", 0 },
};
for (const auto& i : cases)
{
const base::Version version(i.lhs);
const int result = version.compareToWildcardString(i.rhs);
EXPECT_EQ(result, i.expected)
<< base::asciiFromUtf16(i.lhs) << "?" << base::asciiFromUtf16(i.rhs);
}
}
TEST(VersionTest, IsValidWildcardString)
{
static const struct version_compare
{
const char16_t* version;
bool expected;
} cases[] =
{
{ u"1.0", true },
{ u"", false },
{ u"1.2.3.4.5.6", true },
{ u"1.2.3.*", true },
{ u"1.2.3.5*", false },
{ u"1.2.3.56*", false },
{ u"1.*.3", false },
{ u"20.*", true },
{ u"+2.*", false },
{ u"*", false },
{ u"*.2", false },
};
for (const auto& i : cases)
{
EXPECT_EQ(base::Version::isValidWildcardString(i.version), i.expected)
<< base::asciiFromUtf16(i.version) << "?" << i.expected;
}
}
} // namespace
```
|
```c
/*
* native.c --- returns the ext2_flag for a native byte order
*
*
* %Begin-Header%
* This file may be redistributed under the terms of the GNU Library
* %End-Header%
*/
#include "../config.h"
#include <stdio.h>
#include "ext2_fs.h"
#include "ext2fs.h"
int ext2fs_native_flag(void)
{
#ifdef WORDS_BIGENDIAN
return EXT2_FLAG_SWAP_BYTES;
#else
return 0;
#endif
}
```
|
```c
/*! @file ilu_ddrop_row.c
* \brief Drop small rows from L
*
* <pre>
* -- SuperLU routine (version 4.1) --
* Lawrence Berkeley National Laboratory.
* June 30, 2009
* </pre>
*/
#include <math.h>
#include <stdlib.h>
#include "slu_ddefs.h"
extern void dswap_(int *, double [], int *, double [], int *);
extern void daxpy_(int *, double *, double [], int *, double [], int *);
extern void dcopy_(int *, double [], int *, double [], int *);
extern double dasum_(int *, double *, int *);
extern double dnrm2_(int *, double *, int *);
extern double dnrm2_(int *, double [], int *);
extern int idamax_(int *, double [], int *);
static double *A; /* used in _compare_ only */
static int _compare_(const void *a, const void *b)
{
register int *x = (int *)a, *y = (int *)b;
if (A[*x] - A[*y] > 0.0) return -1;
else if (A[*x] - A[*y] < 0.0) return 1;
else return 0;
}
/*! \brief
* <pre>
* Purpose
* =======
* ilu_ddrop_row() - Drop some small rows from the previous
* supernode (L-part only).
* </pre>
*/
int ilu_ddrop_row(
superlu_options_t *options, /* options */
int first, /* index of the first column in the supernode */
int last, /* index of the last column in the supernode */
double drop_tol, /* dropping parameter */
int quota, /* maximum nonzero entries allowed */
int *nnzLj, /* in/out number of nonzeros in L(:, 1:last) */
double *fill_tol, /* in/out - on exit, fill_tol=-num_zero_pivots,
* does not change if options->ILU_MILU != SMILU1 */
GlobalLU_t *Glu, /* modified */
double dwork[], /* working space
* the length of dwork[] should be no less than
* the number of rows in the supernode */
double dwork2[], /* working space with the same size as dwork[],
* used only by the second dropping rule */
int lastc /* if lastc == 0, there is nothing after the
* working supernode [first:last];
* if lastc == 1, there is one more column after
* the working supernode. */ )
{
register int i, j, k, m1;
register int nzlc; /* number of nonzeros in column last+1 */
register int xlusup_first, xlsub_first;
int m, n; /* m x n is the size of the supernode */
int r = 0; /* number of dropped rows */
register double *temp;
register double *lusup = Glu->lusup;
register int *lsub = Glu->lsub;
register int *xlsub = Glu->xlsub;
register int *xlusup = Glu->xlusup;
register double d_max = 0.0, d_min = 1.0;
int drop_rule = options->ILU_DropRule;
milu_t milu = options->ILU_MILU;
norm_t nrm = options->ILU_Norm;
double zero = 0.0;
double one = 1.0;
double none = -1.0;
int i_1 = 1;
int inc_diag; /* inc_diag = m + 1 */
int nzp = 0; /* number of zero pivots */
double alpha = pow((double)(Glu->n), -1.0 / options->ILU_MILU_Dim);
xlusup_first = xlusup[first];
xlsub_first = xlsub[first];
m = xlusup[first + 1] - xlusup_first;
n = last - first + 1;
m1 = m - 1;
inc_diag = m + 1;
nzlc = lastc ? (xlusup[last + 2] - xlusup[last + 1]) : 0;
temp = dwork - n;
/* Quick return if nothing to do. */
if (m == 0 || m == n || drop_rule == NODROP)
{
*nnzLj += m * n;
return 0;
}
/* basic dropping: ILU(tau) */
for (i = n; i <= m1; )
{
/* the average abs value of ith row */
switch (nrm)
{
case ONE_NORM:
temp[i] = dasum_(&n, &lusup[xlusup_first + i], &m) / (double)n;
break;
case TWO_NORM:
temp[i] = dnrm2_(&n, &lusup[xlusup_first + i], &m)
/ sqrt((double)n);
break;
case INF_NORM:
default:
k = idamax_(&n, &lusup[xlusup_first + i], &m) - 1;
temp[i] = fabs(lusup[xlusup_first + i + m * k]);
break;
}
/* drop small entries due to drop_tol */
if (drop_rule & DROP_BASIC && temp[i] < drop_tol)
{
r++;
/* drop the current row and move the last undropped row here */
if (r > 1) /* add to last row */
{
/* accumulate the sum (for MILU) */
switch (milu)
{
case SMILU_1:
case SMILU_2:
daxpy_(&n, &one, &lusup[xlusup_first + i], &m,
&lusup[xlusup_first + m - 1], &m);
break;
case SMILU_3:
for (j = 0; j < n; j++)
lusup[xlusup_first + (m - 1) + j * m] +=
fabs(lusup[xlusup_first + i + j * m]);
break;
case SILU:
default:
break;
}
dcopy_(&n, &lusup[xlusup_first + m1], &m,
&lusup[xlusup_first + i], &m);
} /* if (r > 1) */
else /* move to last row */
{
dswap_(&n, &lusup[xlusup_first + m1], &m,
&lusup[xlusup_first + i], &m);
if (milu == SMILU_3)
for (j = 0; j < n; j++) {
lusup[xlusup_first + m1 + j * m] =
fabs(lusup[xlusup_first + m1 + j * m]);
}
}
lsub[xlsub_first + i] = lsub[xlsub_first + m1];
m1--;
continue;
} /* if dropping */
else
{
if (temp[i] > d_max) d_max = temp[i];
if (temp[i] < d_min) d_min = temp[i];
}
i++;
} /* for */
/* Secondary dropping: drop more rows according to the quota. */
quota = ceil((double)quota / (double)n);
if (drop_rule & DROP_SECONDARY && m - r > quota)
{
register double tol = d_max;
/* Calculate the second dropping tolerance */
if (quota > n)
{
if (drop_rule & DROP_INTERP) /* by interpolation */
{
d_max = 1.0 / d_max; d_min = 1.0 / d_min;
tol = 1.0 / (d_max + (d_min - d_max) * quota / (m - n - r));
}
else /* by quick select */
{
int len = m1 - n + 1;
dcopy_(&len, dwork, &i_1, dwork2, &i_1);
tol = dqselect(len, dwork2, quota - n);
#if 0
register int *itemp = iwork - n;
A = temp;
for (i = n; i <= m1; i++) itemp[i] = i;
qsort(iwork, m1 - n + 1, sizeof(int), _compare_);
tol = temp[itemp[quota]];
#endif
}
}
for (i = n; i <= m1; )
{
if (temp[i] <= tol)
{
register int j;
r++;
/* drop the current row and move the last undropped row here */
if (r > 1) /* add to last row */
{
/* accumulate the sum (for MILU) */
switch (milu)
{
case SMILU_1:
case SMILU_2:
daxpy_(&n, &one, &lusup[xlusup_first + i], &m,
&lusup[xlusup_first + m - 1], &m);
break;
case SMILU_3:
for (j = 0; j < n; j++)
lusup[xlusup_first + (m - 1) + j * m] +=
fabs(lusup[xlusup_first + i + j * m]);
break;
case SILU:
default:
break;
}
dcopy_(&n, &lusup[xlusup_first + m1], &m,
&lusup[xlusup_first + i], &m);
} /* if (r > 1) */
else /* move to last row */
{
dswap_(&n, &lusup[xlusup_first + m1], &m,
&lusup[xlusup_first + i], &m);
if (milu == SMILU_3)
for (j = 0; j < n; j++) {
lusup[xlusup_first + m1 + j * m] =
fabs(lusup[xlusup_first + m1 + j * m]);
}
}
lsub[xlsub_first + i] = lsub[xlsub_first + m1];
m1--;
temp[i] = temp[m1];
continue;
}
i++;
} /* for */
} /* if secondary dropping */
for (i = n; i < m; i++) temp[i] = 0.0;
if (r == 0)
{
*nnzLj += m * n;
return 0;
}
/* add dropped entries to the diagnal */
if (milu != SILU)
{
register int j;
double t;
double omega;
for (j = 0; j < n; j++)
{
t = lusup[xlusup_first + (m - 1) + j * m];
if (t == zero) continue;
if (t > zero)
omega = SUPERLU_MIN(2.0 * (1.0 - alpha) / t, 1.0);
else
omega = SUPERLU_MAX(2.0 * (1.0 - alpha) / t, -1.0);
t *= omega;
switch (milu)
{
case SMILU_1:
if (t != none) {
lusup[xlusup_first + j * inc_diag] *= (one + t);
}
else
{
lusup[xlusup_first + j * inc_diag] *= *fill_tol;
#ifdef DEBUG
printf("[1] ZERO PIVOT: FILL col %d.\n", first + j);
fflush(stdout);
#endif
nzp++;
}
break;
case SMILU_2:
lusup[xlusup_first + j * inc_diag] *= (1.0 + fabs(t));
break;
case SMILU_3:
lusup[xlusup_first + j * inc_diag] *= (one + t);
break;
case SILU:
default:
break;
}
}
if (nzp > 0) *fill_tol = -nzp;
}
/* Remove dropped entries from the memory and fix the pointers. */
m1 = m - r;
for (j = 1; j < n; j++)
{
register int tmp1, tmp2;
tmp1 = xlusup_first + j * m1;
tmp2 = xlusup_first + j * m;
for (i = 0; i < m1; i++)
lusup[i + tmp1] = lusup[i + tmp2];
}
for (i = 0; i < nzlc; i++)
lusup[xlusup_first + i + n * m1] = lusup[xlusup_first + i + n * m];
for (i = 0; i < nzlc; i++)
lsub[xlsub[last + 1] - r + i] = lsub[xlsub[last + 1] + i];
for (i = first + 1; i <= last + 1; i++)
{
xlusup[i] -= r * (i - first);
xlsub[i] -= r;
}
if (lastc)
{
xlusup[last + 2] -= r * n;
xlsub[last + 2] -= r;
}
*nnzLj += (m - r) * n;
return r;
}
```
|
```java
/* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
*
* Project Info: path_to_url
*
* This library is free software; you can redistribute it and/or modify it
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
*
* You should have received a copy of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.]
*
* ------------------------------
* CategoryPointerAnnotation.java
* ------------------------------
*
* Original Author: David Gilbert;
* Contributor(s): Peter Kolb (patch 2809117);
*
*/
package org.jfree.chart.annotations;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.GeneralPath;
import java.awt.geom.Line2D;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Objects;
import org.jfree.chart.internal.HashUtils;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.event.AnnotationChangeEvent;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.Plot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.text.TextUtils;
import org.jfree.chart.api.RectangleEdge;
import org.jfree.chart.internal.Args;
import org.jfree.chart.api.PublicCloneable;
import org.jfree.chart.internal.SerialUtils;
import org.jfree.data.category.CategoryDataset;
/**
* An arrow and label that can be placed on a {@link CategoryPlot}. The arrow
* is drawn at a user-definable angle so that it points towards the (category,
* value) location for the annotation.
* <p>
* The arrow length (and its offset from the (category, value) location) is
* controlled by the tip radius and the base radius attributes. Imagine two
* circles around the (category, value) coordinate: the inner circle defined by
* the tip radius, and the outer circle defined by the base radius. Now, draw
* the arrow starting at some point on the outer circle (the point is
* determined by the angle), with the arrow tip being drawn at a corresponding
* point on the inner circle.
*/
public class CategoryPointerAnnotation extends CategoryTextAnnotation
implements Cloneable, PublicCloneable, Serializable {
/** For serialization. */
private static final long serialVersionUID = -4031161445009858551L;
/** The default tip radius (in Java2D units). */
public static final double DEFAULT_TIP_RADIUS = 10.0;
/** The default base radius (in Java2D units). */
public static final double DEFAULT_BASE_RADIUS = 30.0;
/** The default label offset (in Java2D units). */
public static final double DEFAULT_LABEL_OFFSET = 3.0;
/** The default arrow length (in Java2D units). */
public static final double DEFAULT_ARROW_LENGTH = 5.0;
/** The default arrow width (in Java2D units). */
public static final double DEFAULT_ARROW_WIDTH = 3.0;
/** The angle of the arrow's line (in radians). */
private double angle;
/**
* The radius from the (x, y) point to the tip of the arrow (in Java2D
* units).
*/
private double tipRadius;
/**
* The radius from the (x, y) point to the start of the arrow line (in
* Java2D units).
*/
private double baseRadius;
/** The length of the arrow head (in Java2D units). */
private double arrowLength;
/** The arrow width (in Java2D units, per side). */
private double arrowWidth;
/** The arrow stroke. */
private transient Stroke arrowStroke;
/** The arrow paint. */
private transient Paint arrowPaint;
/** The radius from the base point to the anchor point for the label. */
private double labelOffset;
/**
* Creates a new label and arrow annotation.
*
* @param label the label ({@code null} permitted).
* @param key the category key.
* @param value the y-value (measured against the chart's range axis).
* @param angle the angle of the arrow's line (in radians).
*/
public CategoryPointerAnnotation(String label, Comparable key, double value,
double angle) {
super(label, key, value);
this.angle = angle;
this.tipRadius = DEFAULT_TIP_RADIUS;
this.baseRadius = DEFAULT_BASE_RADIUS;
this.arrowLength = DEFAULT_ARROW_LENGTH;
this.arrowWidth = DEFAULT_ARROW_WIDTH;
this.labelOffset = DEFAULT_LABEL_OFFSET;
this.arrowStroke = new BasicStroke(1.0f);
this.arrowPaint = Color.BLACK;
}
/**
* Returns the angle of the arrow.
*
* @return The angle (in radians).
*
* @see #setAngle(double)
*/
public double getAngle() {
return this.angle;
}
/**
* Sets the angle of the arrow and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
*
* @param angle the angle (in radians).
*
* @see #getAngle()
*/
public void setAngle(double angle) {
this.angle = angle;
fireAnnotationChanged();
}
/**
* Returns the tip radius.
*
* @return The tip radius (in Java2D units).
*
* @see #setTipRadius(double)
*/
public double getTipRadius() {
return this.tipRadius;
}
/**
* Sets the tip radius and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
*
* @param radius the radius (in Java2D units).
*
* @see #getTipRadius()
*/
public void setTipRadius(double radius) {
this.tipRadius = radius;
fireAnnotationChanged();
}
/**
* Returns the base radius.
*
* @return The base radius (in Java2D units).
*
* @see #setBaseRadius(double)
*/
public double getBaseRadius() {
return this.baseRadius;
}
/**
* Sets the base radius and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
*
* @param radius the radius (in Java2D units).
*
* @see #getBaseRadius()
*/
public void setBaseRadius(double radius) {
this.baseRadius = radius;
fireAnnotationChanged();
}
/**
* Returns the label offset.
*
* @return The label offset (in Java2D units).
*
* @see #setLabelOffset(double)
*/
public double getLabelOffset() {
return this.labelOffset;
}
/**
* Sets the label offset (from the arrow base, continuing in a straight
* line, in Java2D units) and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
*
* @param offset the offset (in Java2D units).
*
* @see #getLabelOffset()
*/
public void setLabelOffset(double offset) {
this.labelOffset = offset;
fireAnnotationChanged();
}
/**
* Returns the arrow length.
*
* @return The arrow length.
*
* @see #setArrowLength(double)
*/
public double getArrowLength() {
return this.arrowLength;
}
/**
* Sets the arrow length and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
*
* @param length the length.
*
* @see #getArrowLength()
*/
public void setArrowLength(double length) {
this.arrowLength = length;
fireAnnotationChanged();
}
/**
* Returns the arrow width.
*
* @return The arrow width (in Java2D units).
*
* @see #setArrowWidth(double)
*/
public double getArrowWidth() {
return this.arrowWidth;
}
/**
* Sets the arrow width and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
*
* @param width the width (in Java2D units).
*
* @see #getArrowWidth()
*/
public void setArrowWidth(double width) {
this.arrowWidth = width;
fireAnnotationChanged();
}
/**
* Returns the stroke used to draw the arrow line.
*
* @return The arrow stroke (never {@code null}).
*
* @see #setArrowStroke(Stroke)
*/
public Stroke getArrowStroke() {
return this.arrowStroke;
}
/**
* Sets the stroke used to draw the arrow line and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
*
* @param stroke the stroke ({@code null} not permitted).
*
* @see #getArrowStroke()
*/
public void setArrowStroke(Stroke stroke) {
Args.nullNotPermitted(stroke, "stroke");
this.arrowStroke = stroke;
fireAnnotationChanged();
}
/**
* Returns the paint used for the arrow.
*
* @return The arrow paint (never {@code null}).
*
* @see #setArrowPaint(Paint)
*/
public Paint getArrowPaint() {
return this.arrowPaint;
}
/**
* Sets the paint used for the arrow and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
*
* @param paint the arrow paint ({@code null} not permitted).
*
* @see #getArrowPaint()
*/
public void setArrowPaint(Paint paint) {
Args.nullNotPermitted(paint, "paint");
this.arrowPaint = paint;
fireAnnotationChanged();
}
/**
* Draws the annotation.
*
* @param g2 the graphics device.
* @param plot the plot.
* @param dataArea the data area.
* @param domainAxis the domain axis.
* @param rangeAxis the range axis.
*/
@Override
public void draw(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea,
CategoryAxis domainAxis, ValueAxis rangeAxis) {
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(
plot.getRangeAxisLocation(), orientation);
CategoryDataset dataset = plot.getDataset();
int catIndex = dataset.getColumnIndex(getCategory());
int catCount = dataset.getColumnCount();
double j2DX = domainAxis.getCategoryMiddle(catIndex, catCount,
dataArea, domainEdge);
double j2DY = rangeAxis.valueToJava2D(getValue(), dataArea, rangeEdge);
if (orientation == PlotOrientation.HORIZONTAL) {
double temp = j2DX;
j2DX = j2DY;
j2DY = temp;
}
double startX = j2DX + Math.cos(this.angle) * this.baseRadius;
double startY = j2DY + Math.sin(this.angle) * this.baseRadius;
double endX = j2DX + Math.cos(this.angle) * this.tipRadius;
double endY = j2DY + Math.sin(this.angle) * this.tipRadius;
double arrowBaseX = endX + Math.cos(this.angle) * this.arrowLength;
double arrowBaseY = endY + Math.sin(this.angle) * this.arrowLength;
double arrowLeftX = arrowBaseX
+ Math.cos(this.angle + Math.PI / 2.0) * this.arrowWidth;
double arrowLeftY = arrowBaseY
+ Math.sin(this.angle + Math.PI / 2.0) * this.arrowWidth;
double arrowRightX = arrowBaseX
- Math.cos(this.angle + Math.PI / 2.0) * this.arrowWidth;
double arrowRightY = arrowBaseY
- Math.sin(this.angle + Math.PI / 2.0) * this.arrowWidth;
GeneralPath arrow = new GeneralPath();
arrow.moveTo((float) endX, (float) endY);
arrow.lineTo((float) arrowLeftX, (float) arrowLeftY);
arrow.lineTo((float) arrowRightX, (float) arrowRightY);
arrow.closePath();
g2.setStroke(this.arrowStroke);
g2.setPaint(this.arrowPaint);
Line2D line = new Line2D.Double(startX, startY, arrowBaseX, arrowBaseY);
g2.draw(line);
g2.fill(arrow);
// draw the label
g2.setFont(getFont());
g2.setPaint(getPaint());
double labelX = j2DX
+ Math.cos(this.angle) * (this.baseRadius + this.labelOffset);
double labelY = j2DY
+ Math.sin(this.angle) * (this.baseRadius + this.labelOffset);
/* Rectangle2D hotspot = */ TextUtils.drawAlignedString(getText(),
g2, (float) labelX, (float) labelY, getTextAnchor());
// TODO: implement the entity for the annotation
}
/**
* Tests this annotation for equality with an arbitrary object.
*
* @param obj the object ({@code null} permitted).
*
* @return {@code true} or {@code false}.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof CategoryPointerAnnotation)) {
return false;
}
if (!super.equals(obj)) {
return false;
}
CategoryPointerAnnotation that = (CategoryPointerAnnotation) obj;
if (this.angle != that.angle) {
return false;
}
if (this.tipRadius != that.tipRadius) {
return false;
}
if (this.baseRadius != that.baseRadius) {
return false;
}
if (this.arrowLength != that.arrowLength) {
return false;
}
if (this.arrowWidth != that.arrowWidth) {
return false;
}
if (!this.arrowPaint.equals(that.arrowPaint)) {
return false;
}
if (!Objects.equals(this.arrowStroke, that.arrowStroke)) {
return false;
}
if (this.labelOffset != that.labelOffset) {
return false;
}
return true;
}
/**
* Returns a hash code for this instance.
*
* @return A hash code.
*/
@Override
public int hashCode() {
int result = 193;
long temp = Double.doubleToLongBits(this.angle);
result = 37 * result + (int) (temp ^ (temp >>> 32));
temp = Double.doubleToLongBits(this.tipRadius);
result = 37 * result + (int) (temp ^ (temp >>> 32));
temp = Double.doubleToLongBits(this.baseRadius);
result = 37 * result + (int) (temp ^ (temp >>> 32));
temp = Double.doubleToLongBits(this.arrowLength);
result = 37 * result + (int) (temp ^ (temp >>> 32));
temp = Double.doubleToLongBits(this.arrowWidth);
result = 37 * result + (int) (temp ^ (temp >>> 32));
result = 37 * result + HashUtils.hashCodeForPaint(this.arrowPaint);
result = 37 * result + this.arrowStroke.hashCode();
temp = Double.doubleToLongBits(this.labelOffset);
result = 37 * result + (int) (temp ^ (temp >>> 32));
return result;
}
/**
* Returns a clone of the annotation.
*
* @return A clone.
*
* @throws CloneNotSupportedException if the annotation can't be cloned.
*/
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
/**
* Provides serialization support.
*
* @param stream the output stream.
*
* @throws IOException if there is an I/O error.
*/
private void writeObject(ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
SerialUtils.writePaint(this.arrowPaint, stream);
SerialUtils.writeStroke(this.arrowStroke, stream);
}
/**
* Provides serialization support.
*
* @param stream the input stream.
*
* @throws IOException if there is an I/O error.
* @throws ClassNotFoundException if there is a classpath problem.
*/
private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();
this.arrowPaint = SerialUtils.readPaint(stream);
this.arrowStroke = SerialUtils.readStroke(stream);
}
}
```
|
Neverlia is a small farm area in Elverum Municipality in Innlandet county, Norway. The village area is located about northeast of the village of Nordskogbygda and about northeast of the town of Elverum. The principal industries of Neverlia are farming and forestry.
References
Elverum
Villages in Innlandet
|
```javascript
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
'use strict';
// MODULES //
var tape = require( 'tape' );
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
var isFunction = require( '@stdlib/assert/is-function' );
var reinterpret128 = require( '@stdlib/strided/base/reinterpret-complex128' );
var instanceOf = require( '@stdlib/assert/instance-of' );
var Float64Array = require( '@stdlib/array/float64' );
var Complex128Array = require( './../lib' );
// TESTS //
tape( 'main export is a function', function test( t ) {
t.ok( true, __filename );
t.strictEqual( typeof Complex128Array, 'function', 'main export is a function' );
t.end();
});
tape( 'attached to the prototype of the main export is a `toReversed` method', function test( t ) {
t.strictEqual( hasOwnProp( Complex128Array.prototype, 'toReversed' ), true, 'has property' );
t.strictEqual( isFunction( Complex128Array.prototype.toReversed ), true, 'has method' );
t.end();
});
tape( 'the method throws an error if invoked with a `this` context which is not a complex number array instance', function test( t ) {
var values;
var arr;
var i;
arr = new Complex128Array( 5 );
values = [
'5',
5,
NaN,
true,
false,
null,
void 0,
{},
[],
function noop() {}
];
for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] );
}
t.end();
function badValue( value ) {
return function badValue() {
return arr.toReversed.call( value );
};
}
});
tape( 'the method returns an empty array if operating on an empty complex number array', function test( t ) {
var arr;
var out;
arr = new Complex128Array();
out = arr.toReversed();
t.strictEqual( out.length, 0, 'returns expected value' );
t.end();
});
tape( 'the method returns a new typed array containing elements in reverse order', function test( t ) {
var expected;
var arr;
var out;
arr = new Complex128Array( [ 1.0, -1.0, 2.0, -2.0, 3.0, -3.0 ] );
expected = new Float64Array( [ 3.0, -3.0, 2.0, -2.0, 1.0, -1.0 ] );
out = arr.toReversed();
t.strictEqual( instanceOf( out, Complex128Array ), true, 'returns expected value' );
t.notEqual( out, arr, 'returns a new instance' );
t.strictEqual( out.length, expected.length/2, 'returns expected value' );
t.deepEqual( reinterpret128( out, 0 ), expected, 'returns expected value' );
t.end();
});
tape( 'the method does not change the array length', function test( t ) {
var arr;
var out;
arr = new Complex128Array( 10 );
out = arr.toReversed();
t.strictEqual( out.length, 10, 'returns expected value' );
t.end();
});
```
|
Ralph de Lutterworth was a Priest in the Roman Catholic Church.
Career
Was presented the post of Vicar at St. Mary the Virgin, Padbury on 3 Dec 1298. He was then presented the post of Vicar at St. Mary the Virgin, Aylesbury in 1315 possibly by Richard de Havering, Prebendary of Aylesbury. He exchanged the post with William de Gruttleworth in 1324 for the Parish of Ashby Magna, Leicester.
References
Year of birth unknown
Year of death unknown
13th-century English Roman Catholic priests
14th-century English Roman Catholic priests
People from Aylesbury Vale
|
USS Manatee has been the name of two United States Navy vessels and may refer to either one of the following:
, a speedboat that served as a patrol boat during World War I.
, a replenishment oiler in commission from 1944 to 1973.
United States Navy ship names
|
```asciidoc
// This assembly is included in:
//
// deploying/deploying.adoc
[id="assembly-cluster-recovery-volume-{context}"]
= Cluster recovery from persistent volumes
[role="_abstract"]
You can recover a Kafka cluster from persistent volumes (PVs) if they are still present.
//scenarios to recover from
include::../../modules/managing/con-cluster-recovery-scenarios.adoc[leveloffset=+1]
//procedure to recover a cluster from a PV
include::../../modules/managing/proc-cluster-recovery-volume.adoc[leveloffset=+1]
```
|
```python
#
#
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# coding=utf-8
#
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
# and OPT implementations in this library. It has been modified from its
# original forms to accommodate minor architectural differences compared
# to GPT-NeoX and OPT used by the Meta AI team that trained the model.
#
#
# 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.
""" PyTorch Yuan model."""
import math
from typing import List, Optional, Tuple, Union
import torch.nn.functional as F
import torch
import torch.utils.checkpoint
from torch import nn
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
from transformers.models.llama.modeling_llama import LlamaRMSNorm,LlamaRotaryEmbedding
from transformers.activations import ACT2FN
from transformers.modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPast, SequenceClassifierOutputWithPast
from transformers.modeling_utils import PreTrainedModel
from transformers.utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
from .configuration_yuan import YuanConfig
from einops import rearrange
# from flash_attn import flash_attn_varlen_func as flash_attn_unpadded_func
# from flash_attn import flash_attn_func
import copy
logger = logging.get_logger(__name__)
_CONFIG_FOR_DOC = "YuanConfig"
class LocalizedFiltering(torch.nn.Module):
"""
Mega's Exponential Moving Average layer, largely left unmodified from the original repo with the exception of
variable names and moving away from the stateful representation of incremental decoding state. See
"path_to_url" for more details.
"""
def __init__(self, hidden_size):
super().__init__()
self.embed_dim = hidden_size
self.lf_conv2d_group = 1
self.lf_conv2d_num_pad = 1
self.conv1 = torch.nn.Conv2d(self.embed_dim, self.embed_dim // 2, (2, 1), stride=(1, 1), padding=(self.lf_conv2d_num_pad, 0), groups=self.lf_conv2d_group)
self.conv2 = torch.nn.Conv2d(self.embed_dim // 2, self.embed_dim, (2, 1), stride=(1, 1), padding=(self.lf_conv2d_num_pad, 0), groups=self.lf_conv2d_group)
#Use the same RMSNorm as llama
self.output_layernorm = LlamaRMSNorm(self.embed_dim)
def _train_forward(self, inputs):
inputs = inputs.transpose(0,1)
seq_len, bsz, embed_dim = inputs.size()
if embed_dim != self.embed_dim:
raise ValueError(
f"Unexpected embedding dimension received: input is {embed_dim}, model expects {self.embed_dim}"
)
residual = inputs
inputs = inputs.view(seq_len, 1, bsz, embed_dim).permute(2, 3, 0, 1)
output1 = self.conv1(inputs)
output1 = output1[:, :, :seq_len, :]
output2 = self.conv2(output1)
output2 = output2[:, :, :seq_len, :].permute(2, 3, 0, 1).contiguous()
output2 = output2.view(seq_len, bsz, embed_dim)
assert output2.shape == residual.shape
lf_output = self.output_layernorm(output2 + residual)
lf_output = lf_output.transpose(0,1)
return lf_output
def _inference_forward(self, inputs, before_hidden_states):
if before_hidden_states is None:
inputs = inputs.transpose(0,1)
seq_len, bsz, embed_dim = inputs.size()
if embed_dim != self.embed_dim:
raise ValueError(
f"Unexpected embedding dimension received: input is {embed_dim}, model expects {self.embed_dim}"
)
residual = inputs
inputs = inputs.view(seq_len, 1, bsz, embed_dim).permute(2, 3, 0, 1)
output1 = self.conv1(inputs)
output1 = output1[:, :, :seq_len, :]
output2 = self.conv2(output1)
output2 = output2[:, :, :seq_len, :].permute(2, 3, 0, 1).contiguous()
output2 = output2.view(seq_len, bsz, embed_dim)
assert output2.shape == residual.shape
lf_output = self.output_layernorm(output2 + residual)
lf_output = lf_output.transpose(0,1)
return lf_output
else:
inputs = inputs.transpose(0,1)
before_hidden_states = before_hidden_states.transpose(0,1)
residual = inputs
seq_len, bsz, embed_dim = inputs.size()
seq_len_before, _, _ = before_hidden_states.size()
assert seq_len == 1 and seq_len_before == 2
inputs = torch.cat((before_hidden_states, inputs), dim=0)
inputs = inputs.view(3, 1, bsz, embed_dim).permute(2, 3, 0, 1)
output1 = self.conv1(inputs)
output2 = self.conv2(output1[:,:,1:-1,:])
output2 = output2[:,:,1:-1,:]
output2 = output2.view(1, bsz, embed_dim)
assert output2.shape == residual.shape
lf_output = self.output_layernorm(output2 + residual)
lf_output = lf_output.transpose(0,1)
return lf_output
def forward(
self,
inputs,
before_hidden_states
) -> torch.Tensor:
assert self.lf_conv2d_num_pad == 1
if self.training:
lf_output = self._train_forward(inputs)
else:
lf_output = self._inference_forward(inputs, before_hidden_states)
return lf_output
# Copied from transformers.models.bart.modeling_bart._make_causal_mask
def _make_causal_mask(
input_ids_shape: torch.Size, dtype: torch.dtype, device: torch.device, past_key_values_length: int = 0
):
"""
Make causal mask used for bi-directional self-attention.
"""
bsz, tgt_len = input_ids_shape
mask = torch.full((tgt_len, tgt_len), torch.tensor(torch.finfo(dtype).min, device=device), device=device)
mask_cond = torch.arange(mask.size(-1), device=device)
mask.masked_fill_(mask_cond < (mask_cond + 1).view(mask.size(-1), 1), 0)
mask = mask.to(dtype)
if past_key_values_length > 0:
mask = torch.cat([torch.zeros(tgt_len, past_key_values_length, dtype=dtype, device=device), mask], dim=-1)
return mask[None, None, :, :].expand(bsz, 1, tgt_len, tgt_len + past_key_values_length)
# Copied from transformers.models.bart.modeling_bart._expand_mask
def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Optional[int] = None):
"""
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
"""
bsz, src_len = mask.size()
tgt_len = tgt_len if tgt_len is not None else src_len
expanded_mask = mask[:, None, None, :].expand(bsz, 1, tgt_len, src_len).to(dtype)
inverted_mask = 1.0 - expanded_mask
return inverted_mask.masked_fill(inverted_mask.to(torch.bool), torch.finfo(dtype).min)
def rotate_half(x):
"""Rotates half the hidden dims of the input."""
x1 = x[..., : x.shape[-1] // 2]
x2 = x[..., x.shape[-1] // 2 :]
return torch.cat((-x2, x1), dim=-1)
def apply_rotary_pos_emb(q, k, cos, sin, position_ids):
# The first two dimensions of cos and sin are always 1, so we can `squeeze` them.
cos = cos.squeeze(1).squeeze(0) # [seq_len, dim]
sin = sin.squeeze(1).squeeze(0) # [seq_len, dim]
cos = cos[position_ids].unsqueeze(1) # [bs, 1, seq_len, dim]
sin = sin[position_ids].unsqueeze(1) # [bs, 1, seq_len, dim]
q_embed = (q * cos) + (rotate_half(q) * sin)
k_embed = (k * cos) + (rotate_half(k) * sin)
return q_embed, k_embed
class YuanMLP(nn.Module):
def __init__(
self,
hidden_size: int,
intermediate_size: int,
hidden_act: str,
):
super().__init__()
self.up_proj = nn.Linear(hidden_size, intermediate_size, bias=False)
self.gate_proj = nn.Linear(hidden_size, intermediate_size, bias=False)
self.down_proj = nn.Linear(intermediate_size, hidden_size, bias=False)
self.act_fn = ACT2FN[hidden_act]
def forward(self, x):
return self.down_proj(self.gate_proj(x) * self.act_fn(self.up_proj(x)))
class YuanAttention(nn.Module):
"""Localized Filtering-based Attention 'YUAN 2.0: A Large Language Model with Localized Filtering-based Attention' paper"""
def __init__(self, config: YuanConfig):
super().__init__()
self.config = config
self.hidden_size = config.hidden_size
self.num_heads = config.num_attention_heads
self.head_dim = self.hidden_size // self.num_heads
self.max_position_embeddings = config.max_position_embeddings
self.causal_mask = config.causal_mask
self.softmax_scale = 1.0 / math.sqrt(self.head_dim)
self.use_flash_attention = config.use_flash_attention
try:
self.use_shareqk = config.use_shareqk
except Exception as e:
self.use_shareqk=False
self.dropout = 0.0
if (self.head_dim * self.num_heads) != self.hidden_size:
raise ValueError(
f"hidden_size must be divisible by num_heads (got `hidden_size`: {self.hidden_size}"
f" and `num_heads`: {self.num_heads})."
)
self.v_proj = nn.Linear(self.hidden_size, self.num_heads * self.head_dim, bias=False)
self.o_proj = nn.Linear(self.num_heads * self.head_dim, self.hidden_size, bias=False)
#Use the same RoataryEmbedding as llama
self.rotary_emb = LlamaRotaryEmbedding(self.head_dim, max_position_embeddings=self.max_position_embeddings)
if self.use_shareqk:
self.qk_proj = nn.Linear(self.hidden_size, self.num_heads * self.head_dim, bias=False)
self.qk_weight = nn.Parameter(torch.Tensor(2, self.hidden_size))
self.qk_bias = nn.Parameter(torch.Tensor(2, self.hidden_size))
else:
self.lf_gate = LocalizedFiltering(self.hidden_size)
self.q_proj = nn.Linear(self.hidden_size, self.num_heads * self.head_dim, bias=False)
self.k_proj = nn.Linear(self.hidden_size, self.num_heads * self.head_dim, bias=False)
def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int):
return tensor.view(bsz, seq_len, self.num_heads, self.head_dim).transpose(1, 2).contiguous()
def forward(
self,
hidden_states: torch.Tensor,
attention_mask: Optional[torch.Tensor] = None,
position_ids: Optional[torch.LongTensor] = None,
past_key_value: Optional[Tuple[torch.Tensor]] = None,
output_attentions: bool = False,
use_cache: bool = False,
) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
bsz, q_len, _ = hidden_states.size()
before_hidden_states = None
is_first_step = False
if use_cache:
if past_key_value is None:
inference_hidden_states_memory = torch.empty(bsz, 2, hidden_states.shape[2], dtype=hidden_states.dtype)
is_first_step = True
else:
before_hidden_states = past_key_value[2]
if use_cache:
if is_first_step:
if q_len >= 2:
inference_hidden_states_memory = hidden_states[ :, -2:, :]
else:
inference_hidden_states_memory[:, :, :] = 0
inference_hidden_states_memory[:, -1:, :] = hidden_states[:, -1:, :]
else:
hidden_states_tmp = before_hidden_states[:, -1:, :]
inference_hidden_states_memory = copy.deepcopy(torch.cat((hidden_states_tmp, hidden_states), dim=1))
value_states = self.v_proj(hidden_states).view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2)
if self.use_shareqk:
qk_states = self.qk_proj(hidden_states).view(bsz, q_len, self.num_heads*self.head_dim)
query_key = qk_states.unsqueeze(2) * self.qk_weight + self.qk_bias
query_states, key_states = torch.unbind(query_key, dim=2)
query_states = query_states.view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2)
key_states = key_states.view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2)
else:
hidden_states = self.lf_gate(hidden_states,before_hidden_states)
query_states = self.q_proj(hidden_states)
key_states = self.k_proj(hidden_states)
qk_states = torch.cat([query_states, key_states], dim=-1)
qk_states = qk_states.view(bsz,q_len,self.num_heads,int(qk_states.shape[-1]//self.num_heads))
(query_states,key_states) = torch.chunk(qk_states, 2, dim=-1)
query_states = query_states.transpose(1, 2)
key_states = key_states.transpose(1, 2)
kv_seq_len = key_states.shape[-2]
if past_key_value is not None:
kv_seq_len += past_key_value[0].shape[-2]
cos, sin = self.rotary_emb(value_states, seq_len=kv_seq_len)
query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin, position_ids)
if past_key_value is not None:
# reuse k, v, self_attention
key_states = torch.cat([past_key_value[0], key_states], dim=2)
value_states = torch.cat([past_key_value[1], value_states], dim=2)
past_key_value = (key_states, value_states,inference_hidden_states_memory) if use_cache else None
if self.use_flash_attention:
attn_weights = None
query_states = query_states.transpose(1, 2)
key_states = key_states.transpose(1, 2)
value_states = value_states.transpose(1, 2)
batch_size, seqlen_q = query_states.shape[0], query_states.shape[1]
seqlen_k = key_states.shape[1]
q, k, v = [rearrange(x, 'b s ... -> (b s) ...') for x in [query_states, key_states, value_states]]
cu_seqlens_q = torch.arange(0, (batch_size + 1) * seqlen_q, step=seqlen_q, dtype=torch.int,
device=q.device)
if self.training:
assert seqlen_k == seqlen_q
cu_seqlens_k = cu_seqlens_q
is_causal = self.causal_mask
else:
is_causal = seqlen_q == seqlen_k
cu_seqlens_k = torch.arange(0, (batch_size + 1) * seqlen_k, step=seqlen_k, dtype=torch.int,
device=q.device)
self.dropout=0
output = flash_attn_unpadded_func(
q, k, v, cu_seqlens_q, cu_seqlens_k, seqlen_q, seqlen_k, self.dropout, causal=is_causal
)
attn_output = rearrange(output, '(b s) ... -> b s ...', b=batch_size)
else:
attn_weights = torch.matmul(query_states, key_states.transpose(2, 3)) / math.sqrt(self.head_dim)
if attn_weights.size() != (bsz, self.num_heads, q_len, kv_seq_len):
raise ValueError(
f"Attention weights should be of size {(bsz, self.num_heads, q_len, kv_seq_len)}, but is"
f" {attn_weights.size()}"
)
if attention_mask is not None:
if attention_mask.size() != (bsz, 1, q_len, kv_seq_len):
raise ValueError(
f"Attention mask should be of size {(bsz, 1, q_len, kv_seq_len)}, but is {attention_mask.size()}"
)
attn_weights = attn_weights + attention_mask
attn_weights = torch.max(attn_weights, torch.tensor(torch.finfo(attn_weights.dtype).min))
# upcast attention to fp32
attn_weights = nn.functional.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query_states.dtype)
attn_output = torch.matmul(attn_weights, value_states)
if attn_output.size() != (bsz, self.num_heads, q_len, self.head_dim):
raise ValueError(
f"`attn_output` should be of size {(bsz, self.num_heads, q_len, self.head_dim)}, but is"
f" {attn_output.size()}"
)
attn_output = attn_output.transpose(1, 2)
attn_output = attn_output.reshape(bsz, q_len, self.hidden_size)
attn_output = self.o_proj(attn_output)
if not output_attentions:
attn_weights = None
return attn_output, attn_weights, past_key_value
class YuanDecoderLayer(nn.Module):
def __init__(self, config: YuanConfig):
super().__init__()
self.hidden_size = config.hidden_size
self.self_attn = YuanAttention(config=config)
self.mlp = YuanMLP(
hidden_size=self.hidden_size,
intermediate_size=config.intermediate_size,
hidden_act=config.hidden_act,
)
#Use the same RMSNorm as llama
self.input_layernorm = LlamaRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
self.post_attention_layernorm = LlamaRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
def forward(
self,
hidden_states: torch.Tensor,
attention_mask: Optional[torch.Tensor] = None,
position_ids: Optional[torch.LongTensor] = None,
past_key_value: Optional[Tuple[torch.Tensor]] = None,
output_attentions: Optional[bool] = False,
use_cache: Optional[bool] = False,
) -> Tuple[torch.FloatTensor, Optional[Tuple[torch.FloatTensor, torch.FloatTensor]]]:
"""
Args:
hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)`
attention_mask (`torch.FloatTensor`, *optional*): attention mask of size
`(batch, 1, tgt_len, src_len)` where padding elements are indicated by very large negative values.
output_attentions (`bool`, *optional*):
Whether or not to return the attentions tensors of all attention layers. See `attentions` under
returned tensors for more detail.
use_cache (`bool`, *optional*):
If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding
(see `past_key_values`).
past_key_value (`Tuple(torch.FloatTensor)`, *optional*): cached past key and value projection states
"""
residual = hidden_states
hidden_states = self.input_layernorm(hidden_states)
# Self Attention
hidden_states, self_attn_weights, present_key_value = self.self_attn(
hidden_states=hidden_states,
attention_mask=attention_mask,
position_ids=position_ids,
past_key_value=past_key_value,
output_attentions=output_attentions,
use_cache=use_cache,
)
hidden_states = residual + hidden_states
# Fully Connected
residual = hidden_states
hidden_states = self.post_attention_layernorm(hidden_states)
hidden_states = self.mlp(hidden_states)
hidden_states = residual + hidden_states
outputs = (hidden_states,)
if output_attentions:
outputs += (self_attn_weights,)
if use_cache:
outputs += (present_key_value,)
return outputs
YUAN_START_DOCSTRING = r"""
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)
This model is also a PyTorch [torch.nn.Module](path_to_url#torch.nn.Module) subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.
Parameters:
config ([`YuanConfig`]):
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
[`~PreTrainedModel.from_pretrained`] method to load the model weights.
"""
@add_start_docstrings(
"The bare Yuan Model outputting raw hidden-states without any specific head on top.",
YUAN_START_DOCSTRING,
)
class YuanPreTrainedModel(PreTrainedModel):
config_class = YuanConfig
base_model_prefix = "model"
supports_gradient_checkpointing = True
_no_split_modules = ["YuanDecoderLayer"]
_skip_keys_device_placement = "past_key_values"
_keys_to_ignore_on_load_unexpected = [r"decoder\.version"]
def _init_weights(self, module):
std = self.config.initializer_range
if isinstance(module, nn.Linear):
module.weight.data.normal_(mean=0.0, std=std)
if module.bias is not None:
module.bias.data.zero_()
elif isinstance(module, nn.Embedding):
module.weight.data.normal_(mean=0.0, std=std)
if module.padding_idx is not None:
module.weight.data[module.padding_idx].zero_()
def _set_gradient_checkpointing(self, module, value=False):
if isinstance(module, YuanModel):
module.gradient_checkpointing = value
YUAN_INPUTS_DOCSTRING = r"""
Args:
input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.
Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
[`PreTrainedTokenizer.__call__`] for details.
[What are input IDs?](../glossary#input-ids)
attention_mask (`torch.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
Mask to avoid performing attention on padding token indices. Mask values selected in `[0, 1]`:
- 1 for tokens that are **not masked**,
- 0 for tokens that are **masked**.
[What are attention masks?](../glossary#attention-mask)
Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
[`PreTrainedTokenizer.__call__`] for details.
If `past_key_values` is used, optionally only the last `decoder_input_ids` have to be input (see
`past_key_values`).
If you want to change padding behavior, you should read [`modeling_opt._prepare_decoder_attention_mask`]
and modify to your needs. See diagram 1 in [the paper](path_to_url for more
information on the default strategy.
- 1 indicates the head is **not masked**,
- 0 indicates the head is **masked**.
position_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range `[0,
config.n_positions - 1]`.
[What are position IDs?](../glossary#position-ids)
past_key_values (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of shape
`(batch_size, num_heads, sequence_length, embed_size_per_head)`) and 2 additional tensors of shape
`(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)`.
Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see `past_key_values` input) to speed up sequential decoding.
If `past_key_values` are used, the user can optionally input only the last `decoder_input_ids` (those that
don't have their past key value states given to this model) of shape `(batch_size, 1)` instead of all
`decoder_input_ids` of shape `(batch_size, sequence_length)`.
inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
Optionally, instead of passing `input_ids` you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert `input_ids` indices into associated vectors than the
model's internal embedding lookup matrix.
use_cache (`bool`, *optional*):
If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding (see
`past_key_values`).
output_attentions (`bool`, *optional*):
Whether or not to return the attentions tensors of all attention layers. See `attentions` under returned
tensors for more detail.
output_hidden_states (`bool`, *optional*):
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
return_dict (`bool`, *optional*):
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
@add_start_docstrings(
"The bare Yuan Model outputting raw hidden-states without any specific head on top.",
YUAN_START_DOCSTRING,
)
class YuanModel(YuanPreTrainedModel):
"""
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`YuanDecoderLayer`]
Args:
config: YuanConfig
"""
def __init__(self, config: YuanConfig):
super().__init__(config)
self.padding_idx = config.pad_token_id
self.vocab_size = config.vocab_size
#TODO: control it by config
self.eod_token = config.eod_token
self.reset_attention_mask = config.reset_attention_mask
self.reset_position_ids = config.reset_position_ids
self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size, self.padding_idx)
self.layers = nn.ModuleList([YuanDecoderLayer(config) for _ in range(config.num_hidden_layers)])
#Use the same RMSNorm as llama
self.norm = LlamaRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
self.gradient_checkpointing = False
# Initialize weights and apply final processing
self.post_init()
def get_input_embeddings(self):
return self.embed_tokens
def set_input_embeddings(self, value):
self.embed_tokens = value
# Copied from transformers.models.bart.modeling_bart.BartDecoder._prepare_decoder_attention_mask
def _prepare_decoder_attention_mask(self, attention_mask, input_shape, inputs_embeds, past_key_values_length):
# create causal mask
# [bsz, seq_len] -> [bsz, 1, tgt_seq_len, src_seq_len]
combined_attention_mask = None
if input_shape[-1] > 1:
combined_attention_mask = _make_causal_mask(
input_shape,
inputs_embeds.dtype,
device=inputs_embeds.device,
past_key_values_length=past_key_values_length,
)
if attention_mask is not None:
# [bsz, seq_len] -> [bsz, 1, tgt_seq_len, src_seq_len]
expanded_attn_mask = _expand_mask(attention_mask, inputs_embeds.dtype, tgt_len=input_shape[-1]).to(
inputs_embeds.device
)
combined_attention_mask = (
expanded_attn_mask if combined_attention_mask is None else expanded_attn_mask + combined_attention_mask
)
return combined_attention_mask
def _prepare_decoder_attention_mask_training(self, input_id, inputs_embeds, eod_token, reset_mask_flag ,reset_attention_mask=True, reset_position_ids=True):
micro_batch_size, seq_length = input_id.size()
attention_mask = torch.tril(torch.ones(
(micro_batch_size, seq_length, seq_length), device=inputs_embeds.device)).view(
micro_batch_size, 1, seq_length, seq_length)
position_ids = torch.arange(seq_length, dtype=torch.long,
device=inputs_embeds.device)
position_ids = position_ids.unsqueeze(0).expand_as(input_id)
if reset_position_ids:
position_ids = position_ids.clone()
if reset_position_ids or reset_attention_mask:
# Loop through the batches:
for b in range(micro_batch_size):
# Find indecies where EOD token is.
eod_index = position_ids[b, input_id[b] == eod_token]
# Detach indecies from positions if going to modify positions.
if reset_position_ids:
eod_index = eod_index.clone()
# Loop through EOD indecies:
prev_index = 0
for j in range(eod_index.size()[0]):
i = eod_index[j]
# Mask attention loss.
if reset_attention_mask:
attention_mask[b, 0, (i + 1):, :(i + 1)] = 0
# Reset positions.
if reset_position_ids:
position_ids[b, (i + 1):] -= (i + 1 - prev_index)
prev_index = i + 1
inverted_mask = 1 - attention_mask
output_attn_mask = inverted_mask.masked_fill(inverted_mask.to(torch.bool), torch.finfo(inputs_embeds.dtype).min)
if reset_mask_flag:
output_attn_mask = output_attn_mask[:,:,-1:,:]
return output_attn_mask, position_ids
@add_start_docstrings_to_model_forward(YUAN_INPUTS_DOCSTRING)
def forward(
self,
input_ids: torch.LongTensor = None,
attention_mask: Optional[torch.Tensor] = None,
position_ids: Optional[torch.LongTensor] = None,
past_key_values: Optional[List[torch.FloatTensor]] = None,
inputs_embeds: Optional[torch.FloatTensor] = None,
use_cache: Optional[bool] = None,
output_attentions: Optional[bool] = None,
output_hidden_states: Optional[bool] = None,
return_dict: Optional[bool] = None,
) -> Union[Tuple, BaseModelOutputWithPast]:
output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
output_hidden_states = (
output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
)
use_cache = use_cache if use_cache is not None else self.config.use_cache
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
input_ids1 = copy.deepcopy(input_ids)
reset_mask_flag = False
if past_key_values:
input_ids = input_ids[:, -1:]
if use_cache:
reset_mask_flag = True
# retrieve input_ids and inputs_embeds
if input_ids is not None and inputs_embeds is not None:
raise ValueError("You cannot specify both decoder_input_ids and decoder_inputs_embeds at the same time")
elif input_ids is not None:
batch_size, seq_length = input_ids.shape
elif inputs_embeds is not None:
batch_size, seq_length, _ = inputs_embeds.shape
else:
raise ValueError("You have to specify either decoder_input_ids or decoder_inputs_embeds")
seq_length_with_past = seq_length
past_key_values_length = 0
if past_key_values is not None:
past_key_values_length = past_key_values[0][0].shape[2]
seq_length_with_past = seq_length_with_past + past_key_values_length
if position_ids is None:
device = input_ids.device if input_ids is not None else inputs_embeds.device
position_ids = torch.arange(
past_key_values_length, seq_length + past_key_values_length, dtype=torch.long, device=device
)
position_ids = position_ids.unsqueeze(0).view(-1, seq_length)
else:
position_ids = position_ids.view(-1, seq_length).long()
if inputs_embeds is None:
inputs_embeds = self.embed_tokens(input_ids)
if self.training or self.reset_position_ids:
attention_mask, _ = self._prepare_decoder_attention_mask_training(input_ids1, inputs_embeds, self.eod_token, reset_mask_flag, self.reset_attention_mask, self.reset_position_ids)
else:
if attention_mask is None:
attention_mask = torch.ones(
(batch_size, seq_length_with_past), dtype=torch.bool, device=inputs_embeds.device
)
attention_mask = self._prepare_decoder_attention_mask(
attention_mask, (batch_size, seq_length), inputs_embeds, past_key_values_length
)
hidden_states = inputs_embeds
if self.gradient_checkpointing and self.training:
if use_cache:
logger.warning_once(
"`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`..."
)
use_cache = False
# decoder layers
all_hidden_states = () if output_hidden_states else None
all_self_attns = () if output_attentions else None
next_decoder_cache = () if use_cache else None
for idx, decoder_layer in enumerate(self.layers):
if output_hidden_states:
all_hidden_states += (hidden_states,)
past_key_value = past_key_values[idx] if past_key_values is not None else None
if self.gradient_checkpointing and self.training:
def create_custom_forward(module):
def custom_forward(*inputs):
# None for past_key_value
return module(*inputs, output_attentions, None)
return custom_forward
layer_outputs = torch.utils.checkpoint.checkpoint(
create_custom_forward(decoder_layer),
hidden_states,
attention_mask,
position_ids,
None,
)
else:
layer_outputs = decoder_layer(
hidden_states,
attention_mask=attention_mask,
position_ids=position_ids,
past_key_value=past_key_value,
output_attentions=output_attentions,
use_cache=use_cache,
)
hidden_states = layer_outputs[0]
if use_cache:
next_decoder_cache += (layer_outputs[2 if output_attentions else 1],)
if output_attentions:
all_self_attns += (layer_outputs[1],)
hidden_states = self.norm(hidden_states)
# add hidden states from the last decoder layer
if output_hidden_states:
all_hidden_states += (hidden_states,)
next_cache = next_decoder_cache if use_cache else None
if not return_dict:
return tuple(v for v in [hidden_states, next_cache, all_hidden_states, all_self_attns] if v is not None)
return BaseModelOutputWithPast(
last_hidden_state=hidden_states,
past_key_values=next_cache,
hidden_states=all_hidden_states,
attentions=all_self_attns,
)
class YuanForCausalLM(YuanPreTrainedModel):
def __init__(self, config):
super().__init__(config)
self.eod_token = config.eod_token
self.sep_token = config.sep_token
self.use_loss_mask = config.use_loss_mask
self.model = YuanModel(config)
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
# Initialize weights and apply final processing
self.post_init()
def get_input_embeddings(self):
return self.model.embed_tokens
def set_input_embeddings(self, value):
self.model.embed_tokens = value
def get_output_embeddings(self):
return self.lm_head
def set_output_embeddings(self, new_embeddings):
self.lm_head = new_embeddings
def set_decoder(self, decoder):
self.model = decoder
def get_decoder(self):
return self.model
def get_loss_mask(self, input_ids, labels, eod_token, sep_token):
micro_batch_size, seq_length = input_ids.size()
loss_mask = torch.ones(input_ids.size(), dtype=torch.float, device=input_ids.device)
position_ids = torch.arange(seq_length, dtype=torch.long,
device=input_ids.device)
position_ids = position_ids.unsqueeze(0).expand_as(input_ids)
"""modify loss_mask to only calculate the loss of the answer (separated with [SEP])"""
for b in range(micro_batch_size):
eod_indexs = position_ids[b, input_ids[b] == eod_token]
sep_indexs = position_ids[b, input_ids[b] == sep_token]
if len(eod_indexs) == 0 or len(sep_indexs) == 0:
loss_mask[b] = 1.0
else:
if eod_indexs[0] > sep_indexs[0]:
loss_mask[b, 0:sep_indexs[0]] = 0
if len(eod_indexs) == len(sep_indexs):
for ii, eod_index in enumerate(eod_indexs):
start_index = eod_index
if ii == (len(sep_indexs) - 1):
stop_index = seq_length
else:
stop_index = sep_indexs[ii + 1]
loss_mask[b, start_index:stop_index] = 0.0
else:
if len(eod_indexs) > len(sep_indexs):
loss_mask[b,:] = 1.0
else:
for ii, eod_index in enumerate(eod_indexs):
start_index = eod_index
stop_index = sep_indexs[ii + 1]
loss_mask[b, start_index:stop_index] = 0.0
elif eod_indexs[0] < sep_indexs[0]:
if len(eod_indexs) == len(sep_indexs):
for ii, eod_index in enumerate(eod_indexs):
start_index = eod_index
stop_index = sep_indexs[ii]
loss_mask[b, start_index:stop_index] = 0.0
else:
if len(eod_indexs) < len(sep_indexs):
loss_mask[b,:] = 1.0
else:
for ii, eod_index in enumerate(eod_indexs):
start_index = eod_index
if ii >= len(sep_indexs):
stop_index = seq_length
else:
stop_index = sep_indexs[ii]
loss_mask[b, start_index:stop_index] = 0.0
loss_mask[input_ids == eod_token] = 1.0
return loss_mask
@add_start_docstrings_to_model_forward(YUAN_INPUTS_DOCSTRING)
@replace_return_docstrings(output_type=CausalLMOutputWithPast, config_class=_CONFIG_FOR_DOC)
def forward(
self,
input_ids: torch.LongTensor = None,
attention_mask: Optional[torch.Tensor] = None,
position_ids: Optional[torch.LongTensor] = None,
past_key_values: Optional[List[torch.FloatTensor]] = None,
inputs_embeds: Optional[torch.FloatTensor] = None,
labels: Optional[torch.LongTensor] = None,
use_cache: Optional[bool] = None,
output_attentions: Optional[bool] = None,
output_hidden_states: Optional[bool] = None,
return_dict: Optional[bool] = None,
) -> Union[Tuple, CausalLMOutputWithPast]:
r"""
Args:
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
Labels for computing the masked language modeling loss. Indices should either be in `[0, ...,
config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored
(masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`.
Returns:
Example:
```python
>>> from transformers import AutoTokenizer, YuanForCausalLM
>>> model = YuanForCausalLM.from_pretrained(PATH_TO_CONVERTED_WEIGHTS)
>>> tokenizer = AutoTokenizer.from_pretrained(PATH_TO_CONVERTED_TOKENIZER)
>>> prompt = "Hey, are you consciours? Can you talk to me?"
>>> inputs = tokenizer(prompt, return_tensors="pt")
>>> # Generate
>>> generate_ids = model.generate(inputs.input_ids, max_length=30)
>>> tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
"Hey, are you consciours? Can you talk to me?\nI'm not consciours, but I can talk to you."
```"""
output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
output_hidden_states = (
output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
)
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
outputs = self.model(
input_ids=input_ids,
attention_mask=attention_mask,
position_ids=position_ids,
past_key_values=past_key_values,
inputs_embeds=inputs_embeds,
use_cache=use_cache,
output_attentions=output_attentions,
output_hidden_states=output_hidden_states,
return_dict=return_dict,
)
hidden_states = outputs[0]
logits = self.lm_head(hidden_states)
loss = None
if labels is not None:
if self.use_loss_mask:
loss_mask = self.get_loss_mask(input_ids, labels, self.eod_token, self.sep_token)
# Shift so that tokens < n predict n
shift_logits = logits[..., :-1, :].contiguous()
shift_labels = labels[..., 1:].contiguous()
# Flatten the tokens
if self.use_loss_mask:
loss_fct = CrossEntropyLoss(reduction='none')
shift_logits = shift_logits.view(-1, self.config.vocab_size)
shift_labels = shift_labels.view(-1)
# Enable model parallelism
shift_labels = shift_labels.to(shift_logits.device)
loss = loss_fct(shift_logits, shift_labels)
loss = torch.sum(loss * loss_mask) / loss_mask.sum()
else:
loss_fct = CrossEntropyLoss()
shift_logits = shift_logits.view(-1, self.config.vocab_size)
shift_labels = shift_labels.view(-1)
# Enable model parallelism
shift_labels = shift_labels.to(shift_logits.device)
loss = loss_fct(shift_logits, shift_labels)
if not return_dict:
output = (logits,) + outputs[1:]
return (loss,) + output if loss is not None else output
return CausalLMOutputWithPast(
loss=loss,
logits=logits,
past_key_values=outputs.past_key_values,
hidden_states=hidden_states,
attentions=outputs.attentions,
)
def prepare_inputs_for_generation(
self, input_ids, past_key_values=None, attention_mask=None, inputs_embeds=None, **kwargs
):
position_ids = kwargs.get("position_ids", None)
if attention_mask is not None and position_ids is None:
# create position_ids on the fly for batch generation
position_ids = attention_mask.long().cumsum(-1) - 1
position_ids.masked_fill_(attention_mask == 0, 1)
if past_key_values:
position_ids = position_ids[:, -1].unsqueeze(-1)
# if `inputs_embeds` are passed, we only want to use them in the 1st generation step
if inputs_embeds is not None and past_key_values is None:
model_inputs = {"inputs_embeds": inputs_embeds}
else:
model_inputs = {"input_ids": input_ids}
model_inputs.update(
{
"position_ids": position_ids,
"past_key_values": past_key_values,
"use_cache": kwargs.get("use_cache"),
"attention_mask": attention_mask,
}
)
return model_inputs
@staticmethod
def _reorder_cache(past_key_values, beam_idx):
reordered_past = ()
for layer_past in past_key_values:
reordered_past += (tuple(past_state.index_select(0, beam_idx) for past_state in layer_past),)
return reordered_past
@add_start_docstrings(
"""
The Yuan Model transformer with a sequence classification head on top (linear layer).
[`YuanForSequenceClassification`] uses the last token in order to do the classification, as other causal models
(e.g. GPT-2) do.
Since it does classification on the last token, it requires to know the position of the last token. If a
`pad_token_id` is defined in the configuration, it finds the last token that is not a padding token in each row. If
no `pad_token_id` is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when `inputs_embeds` are passed instead of `input_ids`, it does the same (take the last value in
each row of the batch).
""",
YUAN_START_DOCSTRING,
)
class YuanForSequenceClassification(YuanPreTrainedModel):
_keys_to_ignore_on_load_missing = [r"lm_head.weight"]
def __init__(self, config):
super().__init__(config)
self.num_labels = config.num_labels
self.model = YuanModel(config)
self.score = nn.Linear(config.hidden_size, self.num_labels, bias=False)
# Initialize weights and apply final processing
self.post_init()
def get_input_embeddings(self):
return self.model.embed_tokens
def set_input_embeddings(self, value):
self.model.embed_tokens = value
@add_start_docstrings_to_model_forward(YUAN_INPUTS_DOCSTRING)
def forward(
self,
input_ids: torch.LongTensor = None,
attention_mask: Optional[torch.Tensor] = None,
position_ids: Optional[torch.LongTensor] = None,
past_key_values: Optional[List[torch.FloatTensor]] = None,
inputs_embeds: Optional[torch.FloatTensor] = None,
labels: Optional[torch.LongTensor] = None,
use_cache: Optional[bool] = None,
output_attentions: Optional[bool] = None,
output_hidden_states: Optional[bool] = None,
return_dict: Optional[bool] = None,
) -> Union[Tuple, SequenceClassifierOutputWithPast]:
r"""
labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,
config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
`config.num_labels > 1` a classification loss is computed (Cross-Entropy).
"""
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
transformer_outputs = self.model(
input_ids,
attention_mask=attention_mask,
position_ids=position_ids,
past_key_values=past_key_values,
inputs_embeds=inputs_embeds,
use_cache=use_cache,
output_attentions=output_attentions,
output_hidden_states=output_hidden_states,
return_dict=return_dict,
)
hidden_states = transformer_outputs[0]
logits = self.score(hidden_states)
if input_ids is not None:
batch_size = input_ids.shape[0]
else:
batch_size = inputs_embeds.shape[0]
if self.config.pad_token_id is None and batch_size != 1:
raise ValueError("Cannot handle batch sizes > 1 if no padding token is defined.")
if self.config.pad_token_id is None:
sequence_lengths = -1
else:
if input_ids is not None:
sequence_lengths = (torch.ne(input_ids, self.config.pad_token_id).sum(-1) - 1).to(logits.device)
else:
sequence_lengths = -1
pooled_logits = logits[torch.arange(batch_size, device=logits.device), sequence_lengths]
loss = None
if labels is not None:
labels = labels.to(logits.device)
if self.config.problem_type is None:
if self.num_labels == 1:
self.config.problem_type = "regression"
elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
self.config.problem_type = "single_label_classification"
else:
self.config.problem_type = "multi_label_classification"
if self.config.problem_type == "regression":
loss_fct = MSELoss()
if self.num_labels == 1:
loss = loss_fct(pooled_logits.squeeze(), labels.squeeze())
else:
loss = loss_fct(pooled_logits, labels)
elif self.config.problem_type == "single_label_classification":
loss_fct = CrossEntropyLoss()
loss = loss_fct(pooled_logits.view(-1, self.num_labels), labels.view(-1))
elif self.config.problem_type == "multi_label_classification":
loss_fct = BCEWithLogitsLoss()
loss = loss_fct(pooled_logits, labels)
if not return_dict:
output = (pooled_logits,) + transformer_outputs[1:]
return ((loss,) + output) if loss is not None else output
return SequenceClassifierOutputWithPast(
loss=loss,
logits=pooled_logits,
past_key_values=transformer_outputs.past_key_values,
hidden_states=transformer_outputs.hidden_states,
attentions=transformer_outputs.attentions,
)
```
|
Beverley Town Football Club is a football club based in Beverley, East Riding of Yorkshire, England. They are currently members of the and play their home games at Norwood Recreation Ground.
History
The club was a founder member of the Humber Premier League in 2000. They won the league championship for the first time in 2013, and added two further titles before being promoted to the Northern Counties East League in 2022.
On 22 July 2022, Beverley announced the signing of former Sampdoria and Napoli winger, Daniele Mannini. The move came about after a chance encounter in which Mannini had met chairman Mark Smith whilst the two were walking dogs with Smith inviting him to pre-season training.
Honours
Humber Premier League Premier Division
Champions 2012–13, 2013–14, 2020–21
Runners-up 2021–22
References
Football clubs in England
Football clubs in the East Riding of Yorkshire
Northern Counties East Football League
Humber Premier League
|
Trnaniḱ (, ) is a village in the municipality of Debar, North Macedonia.
Demographics
The 1971 Yugoslav census was the last to record any people as residing in the village which contained 45 inhabitants, all Albanians. According to the 2002 census, the village had 0 inhabitants.
References
External links
Villages in Debar Municipality
Albanian communities in North Macedonia
|
```c++
/*==============================================================================
file LICENSE_1_0.txt or copy at path_to_url
==============================================================================*/
#if !BOOST_PHOENIX_IS_ITERATING
#define BOOST_PHOENIX_typename_A(N) \
BOOST_PP_ENUM_PARAMS(N, typename A) \
/**/
#define BOOST_PHOENIX_typename_A_void(N) \
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(N, typename A, void) \
/**/
#define BOOST_PHOENIX_A(N) \
BOOST_PP_ENUM_PARAMS(N, A) \
/**/
#define BOOST_PHOENIX_A_ref(N) \
BOOST_PP_ENUM_BINARY_PARAMS(N, A, & BOOST_PP_INTERCEPT) \
/**/
#define BOOST_PHOENIX_A_const_ref(N) \
BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& BOOST_PP_INTERCEPT) \
/**/
#define BOOST_PHOENIX_A_a(N) \
BOOST_PP_ENUM_BINARY_PARAMS(N, A, a) \
/**/
#define BOOST_PHOENIX_A_ref_a(N) \
BOOST_PP_ENUM_BINARY_PARAMS(N, A, & a) \
/**/
#define BOOST_PHOENIX_A_const_ref_a(N) \
BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& a) \
/**/
#define BOOST_PHOENIX_a(N) \
BOOST_PP_ENUM_PARAMS(N, a) \
/**/
#else
#include <boost/preprocessor/repetition/repeat.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/seq/elem.hpp>
#include <boost/preprocessor/seq/enum.hpp>
#include <boost/preprocessor/seq/for_each_i.hpp>
#include <boost/preprocessor/seq/for_each_product.hpp>
#include <boost/preprocessor/seq/size.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#define BOOST_PHOENIX_ITERATION \
BOOST_PP_ITERATION() \
/**/
#define BOOST_PHOENIX_typename_A \
BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, typename A) \
/**/
#define BOOST_PHOENIX_typename_A_void \
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PHOENIX_ITERATION, typename A, void)
/**/
#define BOOST_PHOENIX_A \
BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, A) \
/**/
#define BOOST_PHOENIX_A_ref \
BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PHOENIX_ITERATION, A, & BOOST_PP_INTERCEPT)\
/**/
#define BOOST_PHOENIX_A_const_ref \
BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PHOENIX_ITERATION, A, const& BOOST_PP_INTERCEPT)\
/**/
#define BOOST_PHOENIX_A_a \
BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PHOENIX_ITERATION, A, a) \
/**/
#define BOOST_PHOENIX_A_ref_a \
BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PHOENIX_ITERATION, A, & a) \
/**/
#define BOOST_PHOENIX_A_const_ref_a \
BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PHOENIX_ITERATION, A, const& a) \
/**/
#define BOOST_PHOENIX_a \
BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, a) \
/**/
/////////////////////////////////////////////////////////////////////////////
// Begin Perfect Forward argument permutation calculation
/////////////////////////////////////////////////////////////////////////////
#define BOOST_PHOENIX_M0_R(_, N, __) \
(((A ## N)(&))((A ## N)(const&))) \
/**/
#define BOOST_PHOENIX_M0 \
BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_M0_R, _) \
/**/
#define BOOST_PHOENIX_M1_R_R(_, N, SEQ) \
BOOST_PP_SEQ_ELEM(N, SEQ) \
/**/
#define BOOST_PHOENIX_M1_R(R, __, ___, ELEM) \
(BOOST_PP_REPEAT(BOOST_PP_SEQ_SIZE(ELEM), BOOST_PHOENIX_M1_R_R, ELEM)) \
/**/
#define BOOST_PHOENIX_M1(R, PRODUCT) \
((BOOST_PP_SEQ_ENUM \
(BOOST_PP_SEQ_FOR_EACH_I_R \
(R, BOOST_PHOENIX_M1_R, _, PRODUCT)))) \
/**/
#define BOOST_PHOENIX_PERM_SEQ \
BOOST_PP_SEQ_FOR_EACH_PRODUCT(BOOST_PHOENIX_M1, BOOST_PHOENIX_M0) \
/**/
////////////////////////////////////////////////////////////////////////////
// End
////////////////////////////////////////////////////////////////////////////
#define BOOST_PHOENIX_PERM_SIZE \
BOOST_PP_SEQ_SIZE(BOOST_PHOENIX_PERM_SEQ) \
/**/
#define BOOST_PHOENIX_M2(_, N, TUPLE) \
BOOST_PP_COMMA_IF(N) BOOST_PP_TUPLE_ELEM(BOOST_PHOENIX_ITERATION, N, TUPLE) \
/**/
#define BOOST_PHOENIX_M3(_, N, TUPLE) \
BOOST_PP_COMMA_IF(N) BOOST_PP_TUPLE_ELEM(BOOST_PHOENIX_ITERATION, N, TUPLE) a ## N\
/**/
#define BOOST_PHOENIX_PERM_ELEM(N) \
BOOST_PP_SEQ_ELEM(N, BOOST_PHOENIX_PERM_SEQ) \
/**/
#define BOOST_PHOENIX_PERM_A(N) \
BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_M2, BOOST_PHOENIX_PERM_ELEM(N))\
/**/
#define BOOST_PHOENIX_PERM_A_a(N) \
BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_M3, BOOST_PHOENIX_PERM_ELEM(N))\
/**/
#endif
```
|
```ruby
# code is released under a tri EPL/GPL/LGPL license. You can use it,
# redistribute it and/or modify it under the terms of the:
#
benchmark('sleep') { sleep 3 }
```
|
```objective-c
#import "NSInvocation+OCMockWrapper.h"
#import <OCMock/OCMFunctions.h>
BOOL OCMEqualTypesAllowingOpaqueStructs(const char *type1, const char *type2);
@interface NSValue(OCMAdditions)
- (BOOL)getBytes:(void *)outputBuf objCType:(const char *)targetType;
@end
@implementation NSInvocation (OCMockWrapper)
- (NSArray*)arguments {
NSMutableArray* arguments = [[NSMutableArray alloc] init];
NSUInteger argumentCount = [[self methodSignature] numberOfArguments];
for (int i = 2; i < argumentCount; i++) {
const char * _Nonnull argType = [self.methodSignature getArgumentTypeAtIndex: i];
NSUInteger size = 0;
NSGetSizeAndAlignment(argType, &size, NULL);
void* arg = calloc(1, size);
[self getArgument:&arg atIndex: i];
NSValue* _Nonnull n = [NSValue value:&arg withObjCType: argType];
if (OCMIsObjectType(argType)) {
[arguments addObject:(__bridge id _Nonnull)(arg)];
} else if (n) {
[arguments addObject:n];
} else {
[arguments addObject:[NSNull new]];
}
}
return arguments;
}
- (void)setReturnNSValue:(NSValue*)returnValue {
const char *returnType = [[self methodSignature] methodReturnType];
NSUInteger returnTypeSize = [[self methodSignature] methodReturnLength];
char valueBuffer[returnTypeSize];
if([self isMethodReturnType:returnType compatibleWithValueType:[returnValue objCType]]) {
[returnValue getValue:valueBuffer];
[self setReturnValue:valueBuffer];
} else if([returnValue getBytes:valueBuffer objCType:returnType]) {
[self setReturnValue:valueBuffer];
} else {
[NSException raise:NSInvalidArgumentException
format:@"Return value cannot be used for method; method signature declares '%s' but value is '%s'.", returnType, [returnValue objCType]];
}
}
- (BOOL)isMethodReturnType:(const char *)returnType compatibleWithValueType:(const char *)valueType {
/* Same types are obviously compatible */
if(strcmp(returnType, valueType) == 0)
return YES;
/* Allow void* for methods that return id, mainly to be able to handle nil */
if(strcmp(returnType, @encode(id)) == 0 && strcmp(valueType, @encode(void *)) == 0)
return YES;
return OCMEqualTypesAllowingOpaqueStructs(returnType, valueType);
}
@end
```
|
```smalltalk
// THIS FILE IS PART OF WinFormium PROJECT
// COPYRIGHTS (C) Xuanchen Lin. ALL RIGHTS RESERVED.
// GITHUB: path_to_url
namespace WinFormium.Browser;
public interface IFocusHandler
{
void OnTakeFocus(CefBrowser browser, bool next);
bool OnSetFocus(CefBrowser browser, CefFocusSource source);
void OnGotFocus(CefBrowser browser);
}
```
|
The origins of slavery in France can be traced back to the Merovingian dynasty in the 4th century. At least five Frankish queens during that period were former slaves: Ingund, Fredegund, Bilichild, Nanthild, and Balthild. Slavery continued under the Carolingian Empire.
Background
In 1198, the Trinitarians were founded, with the purpose of redeeming war captives. This was one of the earliest steps towards eliminating slavery in France.
In 1315, Louis X published a decree abolishing slavery and proclaiming that "France signifies freedom", with the effect that any slave setting foot on French soil should be freed. However, limited cases of slavery continued until the 17th century in some of France's Mediterranean harbours in Provence, as well as until the 18th century in some of France's overseas territories. Most aspects of serfdom were also de facto abolished between 1315 and 1318. Louis X died two years after this event. In 1318, King Philip V abolished serfdom on his domain.
Society of the Friends of the Blacks
The Society of the Friends of the Blacks was founded in Paris in 1788, and remained active until 1793, during the midst of the French Revolution. It was led by Jacques Pierre Brissot, who frequently received advice from British abolitionist Thomas Clarkson, who led the abolitionist movement in Great Britain. At the beginning of 1789, the Society had 141 members.
Period from 1794 to 1845
A series of events took place from 1791 which led to the abolition of institutionalized slavery in France, including the establishment of the national convention and the election of the first Assembly of the First Republic (1792–1804), on 4 February 1794, under the leadership of Maximilien Robespierre, culminating in the passing of the Law of 4 February 1794, which abolished slavery in all French colonies.
The Abbé Grégoire and the Society of the Friends of the Blacks were part of the abolitionist movement, which had laid important groundwork in building anti-slavery sentiment in Metropolitan France. The first article of the law stated that "slavery was abolished" in the French colonies, while the second article stated that "slave-owners would be indemnified" with financial compensation for the value of their slaves. The French constitution promulgated in 1795 declared in its Declaration of the Rights of Man that slavery was abolished.
In 1802, Napoleon re-introduced slavery in sugarcane-growing colonies. In 1815, Napoleon abolished the slave trade.
In 1815, the Congress of Vienna declared its opposition to the slave trade.
In 1818, three years after the fall of Napoleon, Louis XVIII abolished the slave trade once again.
On 18 and 19 July 1845, a set of laws known as the Mackau Law was passed, which paved the way towards the abolition of slavery in France.
Proclamation of the Abolition of Slavery in the French Colonies
The effective abolition of slavery in France was enacted with the .
In particular Martinique was the first French overseas territory in which the decree for the abolition of slavery actually came into force, on 23 May 1848.
Gabon was founded as a settlement for emancipated slaves.
Slavery in France in the 21st century
Since the abolition of slavery in 1848, additional efforts were made to eliminate other forms of slavery. In 1890, the Brussels Conference Act (a collection of anti-slavery measures aimed at ending the slave trade on land and sea, especially in the Congo Basin, the Ottoman Empire, and the East African coast) was signed, followed in 1904 by the International Agreement for the suppression of the White Slave Traffic. Only France, the Netherlands and Russia applied the treaty to the entirety of their colonial empires with immediate effect. In 1926, the Slavery Convention was ratified by France and other nations.
Although slavery has been outlawed for over a century, many criminal organizations still practice human trafficking. For this reason, on July 25, 2013, France recognized modern-day slavery as a crime punishable by up to 30 years in jail.
See also
Slavery in France
Slavery in the British and French Caribbean
Slavery in medieval Europe
Slavery in the United States
Slavery in Haiti
Affranchi
Race in France
Slavery museum (France)
References
1848 in France
1848 in law
|
```xml
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="path_to_url"
xmlns:tools="path_to_url"
xmlns:app="path_to_url">
<data>
<variable
name="viewModel"
type="org.proninyaroslav.libretorrent.ui.log.LogViewModel" />
</data>
<RelativeLayout
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.log.LogActivity">
<include
layout="@layout/toolbar" />
<RelativeLayout
android:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar">
<org.proninyaroslav.libretorrent.ui.customviews.SwitchBar
android:id="@+id/enableLog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:checked="@={viewModel.mutableParams.logging}" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/enableLog">
<org.proninyaroslav.libretorrent.ui.customviews.EmptyRecyclerView
android:id="@+id/log_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:scrollbars="vertical" />
<TextView
android:id="@+id/empty_view_log"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/journal_list_empty"
style="@style/EmptyView" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|end"
android:layout_marginTop="24dp"
app:srcCompat="@drawable/ic_arrow_up_grey600_24dp"
app:fabSize="mini"
android:focusable="true"
android:layout_marginEnd="16dp"
tools:ignore="ContentDescription" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="16dp"
app:srcCompat="@drawable/ic_arrow_down_grey600_24dp"
app:fabSize="mini"
android:focusable="true"
android:layout_marginEnd="16dp"
tools:ignore="ContentDescription" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</RelativeLayout>
</RelativeLayout>
</layout>
```
|
Rio School District is a school district in Ventura County, California. The district serves students in the northeast portion of the city of Oxnard and the unincorporated communities of El Rio and Nyeland Acres. Rio feeds into the Oxnard Union High School District, specifically Rio Mesa and Pacifica high schools.
History
The Rio School District was founded in 1885 with the opening of a one-room schoolhouse on a ranch in what is now El Rio. The first class had at most 13 students.
In 2018, the district purchased a new headquarters building on Solar Drive in northeast Oxnard. The office space is shared with the Oxnard Union High School District, who relocated from their previous facilities on K Street in the flight path of Oxnard Airport.
Schools
Elementary schools
Rio del Mar Elementary School
Rio del Norte Elementary School
Rio Lindo Elementary School
Rio Plaza Elementary School
Rio Rosales Elementary School
Middle schools
Rio del Valle Middle School
Rio Vista Middle School
K—8 schools
Rio del Sol Elementary
Rio Real Elementary
References
External links
Education in Oxnard, California
School districts in Ventura County, California
1885 establishments in California
School districts established in 1886
|
```robotframework
#
#
# 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.
*** Settings ***
Documentation This resource contains keywords related to creating and using certificates. Requires scripts in infra/integration-image/scripts be available in PATH
*** Keywords ***
Generate Certificate Authority For Chrome
# add the ca to chrome trust list to enable https testing.
[Arguments] ${password}=%{HARBOR_PASSWORD} ${cert}=harbor_ca.crt
${rand}= Evaluate random.randint(0, 100000) modules=random
Log To Console Generate Certificate Authority For Chrome
${rc} ${out}= Run And Return Rc And Output echo ${password} > password${rand}.ca
Log ALL ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output certutil -d sql:$HOME/.pki/nssdb -A -t TC -f password${rand}.ca -n "Harbor${rand}" -i ./harbor_ca.crt
Log ALL ${out}
Should Be Equal As Integers ${rc} 0
Generate Certificate Authority
# Generates CA (private/ca.key.pem, certs/ca.cert.pem, certs/STARK_ENTERPRISES_ROOT_CA.crt) in OUT_DIR
[Arguments] ${CA_NAME}=STARK_ENTERPRISES_ROOT_CA ${OUT_DIR}=/root/ca
Log To Console Generating Certificate Authority
${rc} ${out}= Run And Return Rc And Output generate-ca.sh -c ${CA_NAME} -d ${OUT_DIR}
Log ${out}
Should Be Equal As Integers ${rc} 0
Generate Wildcard Server Certificate
# Generates key and signs with CA for *.DOMAIN (csr/*.DOMAIN.csr.pem,
# private/*.DOMAIN.key.pem, certs/*.DOMAIN.cert.pem) in OUT_DIR
[Arguments] ${DOMAIN}=%{DOMAIN} ${OUT_DIR}=/root/ca ${CA_NAME}=STARK_ENTERPRISES_ROOT_CA
Log To Console Generating Wildcard Server Certificate
Run Keyword Generate Server Key And CSR *.${DOMAIN} ${OUT_DIR}
Run Keyword Sign Server CSR ${CA_NAME} *.${DOMAIN} ${OUT_DIR}
Run Keyword Create Certificate Bundle CA_NAME=${CA_NAME} SRC_DIR=${OUT_DIR} CN=*.${DOMAIN}
${out}= Run ls -al ${OUT_DIR}/csr
Log ${out}
${out}= Run ls -al ${OUT_DIR}/private
Log ${out}
${out}= Run ls -al ${OUT_DIR}/certs
Log ${out}
Generate Server Key And CSR
# Generates key and CSR (private/DOMAIN.key.pem, csr/DOMAIN.csr.pem) in OUT_DIR
[Arguments] ${CN}=%{DOMAIN} ${OUT_DIR}=/root/ca
Log To Console Generating Server Key And CSR
${out}= Run generate-server-key-csr.sh -d ${OUT_DIR} -n ${CN}
Log ${out}
Sign Server CSR
# Generates certificate signed by CA (certs/DOMAIN.cert.pem) in OUT_DIR
[Arguments] ${CA_NAME}=STARK_ENTERPRISES_ROOT_CA ${CN}=%{DOMAIN} ${OUT_DIR}=/root/ca
Log To Console Signing Server CSR
${out}= Run sign-csr.sh -c ${CA_NAME} -d ${OUT_DIR} -n ${CN}
Log ${out}
Trust Certificate Authority
# Installs root certificate into trust store on Debian based distro
[Arguments] ${CRT_FILE}=/root/ca/certs/STARK_ENTERPRISES_ROOT_CA.crt
Log To Console Installing CA
${rc} ${out}= Run And Return Rc And Output ubuntu-install-ca.sh -f ${CRT_FILE}
Should Be Equal As Integers ${rc} 0
Log ${out}
Reload Default Certificate Authorities
# Reloads default certificates into trust store on Debian based distro
# Removes all user provided CAs
Log To Console Reloading Default CAs
${rc} ${out}= Run And Return Rc And Output ubuntu-reload-cas.sh
Should Be Equal As Integers ${rc} 0
Log ${out}
Create Certificate Bundle
[Arguments] ${CA_NAME}=STARK_ENTERPRISES_ROOT_CA ${SRC_DIR}=/root/ca ${OUT_FILE}=/root/ca/cert-bundle.tgz ${CN}=%{DOMAIN} ${TMP_DIR}=/root/ca/bundle
${rc} ${out}= Run And Return Rc And Output bundle-certs.sh -c ${CA_NAME} -d ${SRC_DIR} -f ${OUT_FILE} -n ${CN} -o ${TMP_DIR}
Should Be Equal As Integers ${rc} 0
Log ${out}
Get Certificate Authority CRT
# Return ascii armored certificate from file e.g. `-----BEGIN CERTIFICATE-----`
[Arguments] ${CA_CRT}=STARK_ENTERPRISES_ROOT_CA.crt ${DIR}=/root/ca/certs
${out}= Run cat ${DIR}/${CA_CRT}
[Return] ${out}
Get Server Certificate
# Return ascii armored certificate from file e.g. `-----BEGIN CERTIFICATE-----`
# PEM must be provided if using a wildcard cert not specified by DOMAIN
[Arguments] ${PEM}=%{DOMAIN}.cert.pem ${DIR}=/root/ca/certs
${out}= Run cat ${DIR}/${PEM}
[Return] ${out}
Get Server Key
# Return ascii armored key from file e.g. `-----BEGIN RSA PRIVATE KEY-----`
# PEM must be provided if using a wildcard cert not specified by DOMAIN
[Arguments] ${PEM}=%{DOMAIN}.key.pem ${DIR}=/root/ca/private
${out}= Run cat ${DIR}/${PEM}
[Return] ${out}
```
|
```smalltalk
using System;
using MyBox.Internal;
using UnityEngine;
namespace MyBox
{
[Serializable]
public class PlayerPrefsVector2Int : PlayerPrefsType
{
public Vector2Int Value
{
get => new Vector2Int(
PlayerPrefs.GetInt(Key + "x", DefaultValue.x),
PlayerPrefs.GetInt(Key + "y", DefaultValue.y));
set
{
PlayerPrefs.SetInt(Key + "x", value.x);
PlayerPrefs.SetInt(Key + "y", value.y);
}
}
public Vector2Int DefaultValue;
public static PlayerPrefsVector2Int WithKey(string key, Vector2Int defaultValue = new Vector2Int()) =>
new PlayerPrefsVector2Int(key, defaultValue);
public PlayerPrefsVector2Int(string key, Vector2Int defaultValue = new Vector2Int())
{
Key = key;
DefaultValue = defaultValue;
}
}
}
```
|
```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.
#include "VkDeviceMemoryExternalAndroid.hpp"
#include "VkDestroy.hpp"
#include "VkFormat.hpp"
#include "VkObject.hpp"
#include "VkPhysicalDevice.hpp"
#include "VkStringify.hpp"
#include "System/Debug.hpp"
namespace {
uint32_t GetAHBFormatFromVkFormat(VkFormat format)
{
switch(format)
{
case VK_FORMAT_D16_UNORM:
return AHARDWAREBUFFER_FORMAT_D16_UNORM;
case VK_FORMAT_X8_D24_UNORM_PACK32:
UNSUPPORTED("AHardwareBufferExternalMemory::VkFormat VK_FORMAT_X8_D24_UNORM_PACK32");
return AHARDWAREBUFFER_FORMAT_D24_UNORM;
case VK_FORMAT_D24_UNORM_S8_UINT:
UNSUPPORTED("AHardwareBufferExternalMemory::VkFormat VK_FORMAT_D24_UNORM_S8_UINT");
return AHARDWAREBUFFER_FORMAT_D24_UNORM_S8_UINT;
case VK_FORMAT_D32_SFLOAT:
return AHARDWAREBUFFER_FORMAT_D32_FLOAT;
case VK_FORMAT_D32_SFLOAT_S8_UINT:
return AHARDWAREBUFFER_FORMAT_D32_FLOAT_S8_UINT;
case VK_FORMAT_A2B10G10R10_UNORM_PACK32:
return AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM;
case VK_FORMAT_R16G16B16A16_SFLOAT:
return AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT;
case VK_FORMAT_R5G6B5_UNORM_PACK16:
return AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM;
case VK_FORMAT_R8_UNORM:
return AHARDWAREBUFFER_FORMAT_R8_UNORM;
case VK_FORMAT_R8G8B8A8_UNORM:
return AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM;
case VK_FORMAT_R8G8B8_UNORM:
return AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM;
case VK_FORMAT_S8_UINT:
return AHARDWAREBUFFER_FORMAT_S8_UINT;
case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:
return AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420;
case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:
return AHARDWAREBUFFER_FORMAT_YCbCr_P010;
default:
UNSUPPORTED("AHardwareBufferExternalMemory::VkFormat %d", int(format));
return 0;
}
}
uint64_t GetAHBLockUsageFromVkImageUsageFlags(VkImageUsageFlags flags)
{
uint64_t usage = 0;
if(flags & VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT ||
flags & VK_IMAGE_USAGE_SAMPLED_BIT ||
flags & VK_IMAGE_USAGE_TRANSFER_SRC_BIT)
{
usage |= AHARDWAREBUFFER_USAGE_CPU_READ_MASK;
}
if(flags & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT ||
flags & VK_IMAGE_USAGE_TRANSFER_DST_BIT)
{
usage |= AHARDWAREBUFFER_USAGE_CPU_WRITE_MASK;
}
return usage;
}
uint64_t GetAHBLockUsageFromVkBufferUsageFlags(VkBufferUsageFlags flags)
{
uint64_t usage = 0;
if(flags & VK_BUFFER_USAGE_TRANSFER_SRC_BIT)
{
usage |= AHARDWAREBUFFER_USAGE_CPU_READ_MASK;
}
if(flags & VK_BUFFER_USAGE_TRANSFER_DST_BIT)
{
usage |= AHARDWAREBUFFER_USAGE_CPU_WRITE_MASK;
}
return usage;
}
uint64_t GetAHBUsageFromVkImageFlags(VkImageCreateFlags createFlags, VkImageUsageFlags usageFlags)
{
uint64_t ahbUsage = 0;
if(usageFlags & VK_IMAGE_USAGE_SAMPLED_BIT)
{
ahbUsage |= AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE | AHARDWAREBUFFER_USAGE_CPU_READ_OFTEN;
}
if(usageFlags & VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT)
{
ahbUsage |= AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE | AHARDWAREBUFFER_USAGE_CPU_READ_OFTEN;
}
if(usageFlags & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT)
{
ahbUsage |= AHARDWAREBUFFER_USAGE_GPU_COLOR_OUTPUT | AHARDWAREBUFFER_USAGE_CPU_WRITE_OFTEN;
}
if(createFlags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT)
{
ahbUsage |= AHARDWAREBUFFER_USAGE_GPU_CUBE_MAP;
}
if(createFlags & VK_IMAGE_CREATE_PROTECTED_BIT)
{
ahbUsage |= AHARDWAREBUFFER_USAGE_PROTECTED_CONTENT;
}
// No usage bits set - set at least one GPU usage
if(ahbUsage == 0)
{
ahbUsage = AHARDWAREBUFFER_USAGE_CPU_READ_OFTEN |
AHARDWAREBUFFER_USAGE_CPU_WRITE_OFTEN;
}
return ahbUsage;
}
uint64_t GetAHBUsageFromVkBufferFlags(VkBufferCreateFlags /*createFlags*/, VkBufferUsageFlags /*usageFlags*/)
{
uint64_t ahbUsage = 0;
// TODO(b/141698760): needs fleshing out.
ahbUsage = AHARDWAREBUFFER_USAGE_CPU_READ_OFTEN | AHARDWAREBUFFER_USAGE_CPU_WRITE_OFTEN;
return ahbUsage;
}
VkFormatFeatureFlags GetVkFormatFeaturesFromAHBFormat(uint32_t ahbFormat)
{
VkFormatFeatureFlags features = 0;
VkFormat format = AHardwareBufferExternalMemory::GetVkFormatFromAHBFormat(ahbFormat);
VkFormatProperties formatProperties;
vk::PhysicalDevice::GetFormatProperties(vk::Format(format), &formatProperties);
formatProperties.optimalTilingFeatures |= VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT;
// TODO: b/167896057
// The correct formatFeatureFlags depends on consumer and format
// So this solution is incomplete without more information
features |= formatProperties.linearTilingFeatures |
formatProperties.optimalTilingFeatures |
formatProperties.bufferFeatures;
return features;
}
} // namespace
AHardwareBufferExternalMemory::AllocateInfo::AllocateInfo(const vk::DeviceMemory::ExtendedAllocationInfo &extendedAllocationInfo)
{
if(extendedAllocationInfo.importAndroidHardwareBufferInfo)
{
importAhb = true;
ahb = extendedAllocationInfo.importAndroidHardwareBufferInfo->buffer;
}
if(extendedAllocationInfo.exportMemoryAllocateInfo)
{
if(extendedAllocationInfo.exportMemoryAllocateInfo->handleTypes == your_sha256_hashID)
{
exportAhb = true;
}
else
{
UNSUPPORTED("VkExportMemoryAllocateInfo::handleTypes %d", int(extendedAllocationInfo.exportMemoryAllocateInfo->handleTypes));
}
}
if(extendedAllocationInfo.dedicatedAllocateInfo)
{
dedicatedImageHandle = vk::Cast(extendedAllocationInfo.dedicatedAllocateInfo->image);
dedicatedBufferHandle = vk::Cast(extendedAllocationInfo.dedicatedAllocateInfo->buffer);
}
}
AHardwareBufferExternalMemory::AHardwareBufferExternalMemory(const VkMemoryAllocateInfo *pCreateInfo, void *mem, const DeviceMemory::ExtendedAllocationInfo &extendedAllocationInfo, vk::Device *pDevice)
: vk::DeviceMemory(pCreateInfo, extendedAllocationInfo, pDevice)
, allocateInfo(extendedAllocationInfo)
{
}
AHardwareBufferExternalMemory::~AHardwareBufferExternalMemory()
{
freeBuffer();
}
// vkAllocateMemory
VkResult AHardwareBufferExternalMemory::allocateBuffer()
{
if(allocateInfo.importAhb)
{
return importAndroidHardwareBuffer(allocateInfo.ahb, &buffer);
}
else
{
ASSERT(allocateInfo.exportAhb);
return allocateAndroidHardwareBuffer(allocationSize, &buffer);
}
}
void AHardwareBufferExternalMemory::freeBuffer()
{
if(ahb != nullptr)
{
unlockAndroidHardwareBuffer();
AHardwareBuffer_release(ahb);
ahb = nullptr;
}
}
VkResult AHardwareBufferExternalMemory::importAndroidHardwareBuffer(AHardwareBuffer *buffer, void **pBuffer)
{
ahb = buffer;
AHardwareBuffer_acquire(ahb);
AHardwareBuffer_describe(ahb, &ahbDesc);
return lockAndroidHardwareBuffer(pBuffer);
}
VkResult AHardwareBufferExternalMemory::allocateAndroidHardwareBuffer(size_t size, void **pBuffer)
{
if(allocateInfo.dedicatedImageHandle)
{
vk::Image *image = allocateInfo.dedicatedImageHandle;
ASSERT(image->getArrayLayers() == 1);
VkExtent3D extent = image->getExtent();
ahbDesc.width = extent.width;
ahbDesc.height = extent.height;
ahbDesc.layers = image->getArrayLayers();
ahbDesc.format = GetAHBFormatFromVkFormat(image->getFormat());
ahbDesc.usage = GetAHBUsageFromVkImageFlags(image->getFlags(), image->getUsage());
}
else if(allocateInfo.dedicatedBufferHandle)
{
vk::Buffer *buffer = allocateInfo.dedicatedBufferHandle;
ahbDesc.width = static_cast<uint32_t>(buffer->getSize());
ahbDesc.height = 1;
ahbDesc.layers = 1;
ahbDesc.format = AHARDWAREBUFFER_FORMAT_BLOB;
ahbDesc.usage = GetAHBUsageFromVkBufferFlags(buffer->getFlags(), buffer->getUsage());
}
else
{
// Android Hardware Buffer Buffer Resources: "Android hardware buffers with a format of
// AHARDWAREBUFFER_FORMAT_BLOB and usage that includes AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER can
// be used as the backing store for VkBuffer objects. Such Android hardware buffers have a size
// in bytes specified by their width; height and layers are both 1."
ahbDesc.width = static_cast<uint32_t>(size);
ahbDesc.height = 1;
ahbDesc.layers = 1;
ahbDesc.format = AHARDWAREBUFFER_FORMAT_BLOB;
ahbDesc.usage = AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER | AHARDWAREBUFFER_USAGE_CPU_READ_OFTEN | AHARDWAREBUFFER_USAGE_CPU_WRITE_OFTEN;
}
int ret = AHardwareBuffer_allocate(&ahbDesc, &ahb);
if(ret != 0)
{
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
AHardwareBuffer_describe(ahb, &ahbDesc);
return lockAndroidHardwareBuffer(pBuffer);
}
VkResult AHardwareBufferExternalMemory::lockAndroidHardwareBuffer(void **pBuffer)
{
uint64_t usage = 0;
if(allocateInfo.dedicatedImageHandle)
{
usage = GetAHBLockUsageFromVkImageUsageFlags(allocateInfo.dedicatedImageHandle->getUsage());
}
else if(allocateInfo.dedicatedBufferHandle)
{
usage = GetAHBLockUsageFromVkBufferUsageFlags(allocateInfo.dedicatedBufferHandle->getUsage());
}
else
{
usage = AHARDWAREBUFFER_USAGE_CPU_READ_OFTEN | AHARDWAREBUFFER_USAGE_CPU_WRITE_OFTEN;
}
// Empty fence, lock immedietly.
int32_t fence = -1;
// Empty rect, lock entire buffer.
ARect *rect = nullptr;
int ret = AHardwareBuffer_lockPlanes(ahb, usage, fence, rect, &ahbPlanes);
if(ret != 0)
{
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
*pBuffer = ahbPlanes.planes[0].data;
return VK_SUCCESS;
}
VkResult AHardwareBufferExternalMemory::unlockAndroidHardwareBuffer()
{
int ret = AHardwareBuffer_unlock(ahb, /*fence=*/nullptr);
if(ret != 0)
{
return VK_ERROR_UNKNOWN;
}
return VK_SUCCESS;
}
VkResult AHardwareBufferExternalMemory::exportAndroidHardwareBuffer(AHardwareBuffer **pAhb) const
{
if(getFlagBit() != your_sha256_hashID)
{
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
// Each call to vkGetMemoryAndroidHardwareBufferANDROID *must* return an Android hardware buffer with a new reference
// acquired in addition to the reference held by the VkDeviceMemory. To avoid leaking resources, the application *must*
// release the reference by calling AHardwareBuffer_release when it is no longer needed.
AHardwareBuffer_acquire(ahb);
*pAhb = ahb;
return VK_SUCCESS;
}
VkFormat AHardwareBufferExternalMemory::GetVkFormatFromAHBFormat(uint32_t ahbFormat)
{
switch(ahbFormat)
{
case AHARDWAREBUFFER_FORMAT_BLOB:
return VK_FORMAT_UNDEFINED;
case AHARDWAREBUFFER_FORMAT_D16_UNORM:
return VK_FORMAT_D16_UNORM;
case AHARDWAREBUFFER_FORMAT_D24_UNORM:
UNSUPPORTED("AHardwareBufferExternalMemory::AndroidHardwareBuffer_Format AHARDWAREBUFFER_FORMAT_D24_UNORM");
return VK_FORMAT_X8_D24_UNORM_PACK32;
case AHARDWAREBUFFER_FORMAT_D24_UNORM_S8_UINT:
UNSUPPORTED("AHardwareBufferExternalMemory::AndroidHardwareBuffer_Format AHARDWAREBUFFER_FORMAT_D24_UNORM_S8_UINT");
return VK_FORMAT_X8_D24_UNORM_PACK32;
case AHARDWAREBUFFER_FORMAT_D32_FLOAT:
return VK_FORMAT_D32_SFLOAT;
case AHARDWAREBUFFER_FORMAT_D32_FLOAT_S8_UINT:
return VK_FORMAT_D32_SFLOAT_S8_UINT;
case AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM:
return VK_FORMAT_A2B10G10R10_UNORM_PACK32;
case AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT:
return VK_FORMAT_R16G16B16A16_SFLOAT;
case AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM:
return VK_FORMAT_R5G6B5_UNORM_PACK16;
case AHARDWAREBUFFER_FORMAT_R8_UNORM:
return VK_FORMAT_R8_UNORM;
case AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM:
return VK_FORMAT_R8G8B8A8_UNORM;
case AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM:
return VK_FORMAT_R8G8B8A8_UNORM;
case AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM:
return VK_FORMAT_R8G8B8_UNORM;
case AHARDWAREBUFFER_FORMAT_S8_UINT:
return VK_FORMAT_S8_UINT;
case AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420:
case AHARDWAREBUFFER_FORMAT_YV12:
return VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM;
case AHARDWAREBUFFER_FORMAT_YCbCr_P010:
return VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16;
default:
UNSUPPORTED("AHardwareBufferExternalMemory::AHardwareBuffer_Format %d", int(ahbFormat));
return VK_FORMAT_UNDEFINED;
}
}
VkResult AHardwareBufferExternalMemory::GetAndroidHardwareBufferFormatProperties(const AHardwareBuffer_Desc &ahbDesc, VkAndroidHardwareBufferFormatPropertiesANDROID *pFormat)
{
pFormat->sType = your_sha256_hashOID;
pFormat->pNext = nullptr;
pFormat->format = GetVkFormatFromAHBFormat(ahbDesc.format);
pFormat->externalFormat = ahbDesc.format;
pFormat->formatFeatures = GetVkFormatFeaturesFromAHBFormat(ahbDesc.format);
pFormat->samplerYcbcrConversionComponents = { VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY };
pFormat->suggestedYcbcrModel = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601;
pFormat->suggestedYcbcrRange = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW;
pFormat->suggestedXChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN;
pFormat->suggestedYChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN;
// YUV formats are not listed in the AHardwareBuffer Format Equivalence table in the Vulkan spec.
// Clients must use VkExternalFormatANDROID.
if(pFormat->format == VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM ||
pFormat->format == VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16)
{
pFormat->format = VK_FORMAT_UNDEFINED;
}
return VK_SUCCESS;
}
VkResult AHardwareBufferExternalMemory::GetAndroidHardwareBufferProperties(VkDevice &device, const AHardwareBuffer *buffer, VkAndroidHardwareBufferPropertiesANDROID *pProperties)
{
VkResult result = VK_SUCCESS;
AHardwareBuffer_Desc ahbDesc;
AHardwareBuffer_describe(buffer, &ahbDesc);
if(pProperties->pNext != nullptr)
{
result = GetAndroidHardwareBufferFormatProperties(ahbDesc, (VkAndroidHardwareBufferFormatPropertiesANDROID *)pProperties->pNext);
if(result != VK_SUCCESS)
{
return result;
}
}
const VkPhysicalDeviceMemoryProperties phyDeviceMemProps = vk::PhysicalDevice::GetMemoryProperties();
pProperties->memoryTypeBits = phyDeviceMemProps.memoryTypes[0].propertyFlags;
if(ahbDesc.format == AHARDWAREBUFFER_FORMAT_BLOB)
{
pProperties->allocationSize = ahbDesc.width;
}
else
{
VkImageCreateInfo info = {};
info.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO;
info.pNext = nullptr;
info.flags = 0;
info.imageType = VK_IMAGE_TYPE_2D;
info.format = GetVkFormatFromAHBFormat(ahbDesc.format);
info.extent.width = ahbDesc.width;
info.extent.height = ahbDesc.height;
info.extent.depth = 1;
info.mipLevels = 1;
info.arrayLayers = 1;
info.samples = VK_SAMPLE_COUNT_1_BIT;
info.tiling = VK_IMAGE_TILING_OPTIMAL;
info.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
VkImage Image;
result = vk::Image::Create(vk::NULL_ALLOCATION_CALLBACKS, &info, &Image, vk::Cast(device));
if(result != VK_SUCCESS)
{
return result;
}
pProperties->allocationSize = vk::Cast(Image)->getMemoryRequirements().size;
vk::destroy(Image, vk::NULL_ALLOCATION_CALLBACKS);
}
return result;
}
int AHardwareBufferExternalMemory::externalImageRowPitchBytes(VkImageAspectFlagBits aspect) const
{
ASSERT(allocateInfo.dedicatedImageHandle != nullptr);
switch(ahbDesc.format)
{
case AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420:
case AHARDWAREBUFFER_FORMAT_YV12:
case AHARDWAREBUFFER_FORMAT_YCbCr_P010:
switch(aspect)
{
case VK_IMAGE_ASPECT_PLANE_0_BIT:
return static_cast<int>(ahbPlanes.planes[0].rowStride);
case VK_IMAGE_ASPECT_PLANE_1_BIT:
return static_cast<int>(ahbPlanes.planes[1].rowStride);
case VK_IMAGE_ASPECT_PLANE_2_BIT:
return static_cast<int>(ahbPlanes.planes[2].rowStride);
default:
UNSUPPORTED("Unsupported aspect %d for AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420", int(aspect));
return 0;
}
break;
default:
break;
}
return static_cast<int>(ahbPlanes.planes[0].rowStride);
}
// TODO(b/208505033): Treat each image plane data pointer as a separate address instead of an offset.
VkDeviceSize AHardwareBufferExternalMemory::externalImageMemoryOffset(VkImageAspectFlagBits aspect) const
{
ASSERT(allocateInfo.dedicatedImageHandle != nullptr);
switch(ahbDesc.format)
{
case AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420:
case AHARDWAREBUFFER_FORMAT_YV12:
case AHARDWAREBUFFER_FORMAT_YCbCr_P010:
switch(aspect)
{
case VK_IMAGE_ASPECT_PLANE_0_BIT:
return 0;
case VK_IMAGE_ASPECT_PLANE_1_BIT:
return reinterpret_cast<const char *>(ahbPlanes.planes[1].data) -
reinterpret_cast<const char *>(ahbPlanes.planes[0].data);
case VK_IMAGE_ASPECT_PLANE_2_BIT:
return reinterpret_cast<const char *>(ahbPlanes.planes[2].data) -
reinterpret_cast<const char *>(ahbPlanes.planes[0].data);
default:
UNSUPPORTED("Unsupported aspect %d for AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420", int(aspect));
return 0;
}
break;
default:
break;
}
return 0;
}
#ifdef SWIFTSHADER_DEVICE_MEMORY_REPORT
uint64_t AHardwareBufferExternalMemory::getMemoryObjectId() const
{
uint64_t id = 0;
int ret = AHardwareBuffer_getId(ahb, &id);
ASSERT(ret == 0);
return id;
}
#endif // SWIFTSHADER_DEVICE_MEMORY_REPORT
```
|
Grouville is one of the twelve parishes of Jersey in the Channel Islands. The parish is around east of St Helier. The parish covers a surface area of 4,354 vergées (7.8 km²). The parish includes the south-east portion of the main island of the Bailiwick of Jersey, as well as the Minquiers islets several miles to the south, and is dominated by the broad sweep of the Royal Bay of Grouville. It borders St. Clement, St. Saviour and St. Martin.
History
The parish of Grouville shares, with the neighbouring parish of St. Martin, a dedication to St. Martin of Tours. The ecclesiastical parish and parish church are dedicated to "St. Martin de Grouville" to distinguish them from the parish of St. Martin (historically 'St. Martin le Vieux'). The Church of St Peter la Rocque was built in the 19th century.
The name 'Grouville' may derive from:
the small community established in what is now the parish by St Gerou (also known as Gervold or Geraldius), an ecclesiastical troubleshooter in the employ of Charlemagne in the 9th century AD;
Gros Villa (great farm)
Geirr, the Viking leader after whom the Island may be named.
the name Groult or Gueroult is often found today in Normandy and is believed to derive from the ancient probably Norman name Gueroalt (Geirroalt)
The Royal Bay of Grouville gained its royal epithet when it impressed Queen Victoria during her visit in 1846. The bay is popular with tourists for its broad sandy beach and shallow, warm water. It is also the main oyster producing area of Jersey, and was also formerly noted for the production of vraic (seaweed fertiliser). The cottage industry formerly practised by Grouvillais of burning vraic gave rise to the traditional nickname of les Enfuntchis (the smoky ones, or the dim ones, in Jèrriais) shared by the Grouvillais and their neighbours in St. Clement.
Inland, the parish is also home to Jersey's most noted archaeological site at La Hougue Bie, now a museum run by the Jersey Heritage Trust. A prehistoric artificial mound covers a passage grave aligned for the equinox. A mediaeval chapel, Notre Dame de la Clarté, built on the Neolithic mound was converted in the 18th century to a folly-like Gothic Revival residence, the Prince's Tower (demolished in the 1920s). During the German occupation of the Channel Islands in the Second World War, the German forces and imported labourers constructed bunkers in and alongside the ancient mound, now also transformed for museum interpretation.
La Rocque was the site of the landing of the French forces on 6 January 1781. The skirmish at La Platte Rocque was ancillary to the Battle of Jersey.
Governance
The parish is a first-level administrative division of the Bailiwick of Jersey, a British Crown dependency. The highest official in the parish is the of Grouville. The incumbent office holder is John Le Maistre, who has held the office since 2013. The parish administration is headquartered at the Parish Hall next to the parish church.
At present, the parish forms one electoral district for States Assembly elections and elects one Deputy, as well as eight Senators in an islandwide constituency. The current Deputy for Grouville is Carolyn Labey. Under the proposed electoral reform, it will form part of the North East electoral district consisting of St. Martin and Grouville, which will collectively elect three representatives (the least of any constituency) alongside the parishes' .
Grouville is divided for administrative purposes into vingtaines as follows:
La Vingtaine des Marais
La Vingtaine de la Rue
La Vingtaine de Longueville
La Vingtaine de la Rocque
Geography
The main part of the parish is in the south-east of the island of Jersey, part of the Channel Islands archipelago. It borders St. Clement, St. Saviour and St. Martin. The parish hall is located around east of the Royal Square in St Helier. The parish is dominated by the sweeping Royal Bay of Grouville (part of which is often called Gorey Bay), stretching from Mont Orgeuil Castle in St. Martin, which dominates the skyline to the north, out to the sea in the south at La Rocque. It is the third smallest parish, only measuring 8 square kilometres (4560 vergées). The Minquiers are also part of the parish of Grouville.
The parish is quite urbanised, with 22% of the parish built-up, but is also quite an agricultural parish. Its mix of land uses can be compared closely to that of St. Lawrence. The parish population is mostly located along the coastal part to the east of La Grande Route des Sablons along the coast, with the 'village centre' of the parish located at Ville-ès-Renauds, which has a number of shops and the parish school. Further inland, the parish rises up to the Mont de Grouville. The parish church and hall are located further inland at the foot of the hill along the main road to St. Helier. The parish also includes the more residential 'village' part of Gorey, with the more touristic 'pier' part in St. Martin.
Demography
Culture and community
The parish is makes up the majority of the catchment area for its namesake primary school, however which also takes students from a small part of St. Martin. Grouville Primary School is a feeder school for Le Rocquier.
The parish features a large golf course, known as the Royal Jersey Golf Course, however lacks any other significant sporting facilities.
Economy
In modern times, Grouville has been a popular holiday destination, and features a number of hotels. These include the Beausite Hotel, which is a later 20th century structure but incorporates a small structure dating back to 1636 which now serves as the hotel's bar.
Landmarks
The Royal Jersey Golf Club is located on Grouville Common. It was founded in 1878 and granted its royal charter by Queen Victoria. The Pembroke Hotel, near the 16th tee, was a former clubhouse, once called the 'Golf Inn'. During the Occupation, the course was turned into a mine field. There are two German gun emplacements along the opening hole. The club's most famous player is Harry Vardon; he won the Open Championship a record six times.
Within the Royal Bay, there are a number of Martello towers, built during the Napoleonic Wars, including the offshore Seymour and Icho towers.
Queen's Valley () is located in the north of the parish, very partly shared with St Saviour. In 1987, it was described as "left unspoiled, with just one very minor road traversing it". There were once three water mills along its length, recorded as early 1274. Both Victor Hugo and George Eliot have written about the valley.
In 1976, the Jersey water company proposed to flood the valley to increase water storage capacity. This was met with protests; three campaign groups - Concern, Friends of Queen's Valley and Save our Valley - were supported by thousands of islanders opposing the flooding, with alternative suggestions such as capping the population at 80,000, installing water meters and desalination. TV presenter David Bellamy led a protest walk attended by 2,000 islanders. However in 1986, in the tenth States debate on the matter, the States agreed to flood the valley in the face of possible water shortages, were new capacity not provided. The reservoir opened in November 1991 and has a capacity of 1,193 megalitres (enough to supply the whole island for 48 days). It is two reservoirs and there is a public footpath encircling both reservoirs, with natural flora and fauna.
Twin towns
Grouville is twinned with:
Port-Bail, Normandy
Notable people
John George Bourinot (elder) (1814-1884), politician
Lucy Nettie Fletcher (1886-1918), nurse
Ruby Ray (1881–after 1973), stage actress
Harry Vardon (1870-1937), golfer
References
External links
|
```objective-c
// Archive/IsoHeader.h
#ifndef __ARCHIVE_ISO_HEADER_H
#define __ARCHIVE_ISO_HEADER_H
#include "../../../Common/MyTypes.h"
namespace NArchive {
namespace NIso {
namespace NVolDescType
{
const Byte kBootRecord = 0;
const Byte kPrimaryVol = 1;
const Byte kSupplementaryVol = 2;
const Byte kVolParttition = 3;
const Byte kTerminator = 255;
}
const Byte kVersion = 1;
namespace NFileFlags
{
const Byte kDirectory = 1 << 1;
const Byte kNonFinalExtent = 1 << 7;
}
extern const char * const kElToritoSpec;
const UInt32 kStartPos = 0x8000;
namespace NBootEntryId
{
const Byte kValidationEntry = 1;
const Byte kInitialEntryNotBootable = 0;
const Byte kInitialEntryBootable = 0x88;
const Byte kMoreHeaders = 0x90;
const Byte kFinalHeader = 0x91;
const Byte kExtensionIndicator = 0x44;
}
namespace NBootPlatformId
{
const Byte kX86 = 0;
const Byte kPowerPC = 1;
const Byte kMac = 2;
}
const Byte kBootMediaTypeMask = 0xF;
namespace NBootMediaType
{
const Byte kNoEmulation = 0;
const Byte k1d2Floppy = 1;
const Byte k1d44Floppy = 2;
const Byte k2d88Floppy = 3;
const Byte kHardDisk = 4;
}
}}
#endif
```
|
Noise is unwanted sound considered unpleasant, loud, or disruptive to hearing. From a physics standpoint, there is no distinction between noise and desired sound, as both are vibrations through a medium, such as air or water. The difference arises when the brain receives and perceives a sound.
Acoustic noise is any sound in the acoustic domain, either deliberate (e.g., music or speech) or unintended. In contrast, noise in electronics may not be audible to the human ear and may require instruments for detection.
In audio engineering, noise can refer to the unwanted residual electronic noise signal that gives rise to acoustic noise heard as a hiss. This signal noise is commonly measured using A-weighting or ITU-R 468 weighting.
In experimental sciences, noise can refer to any random fluctuations of data that hinders perception of a signal.
Measurement
Sound is measured based on the amplitude and frequency of a sound wave. Amplitude measures how forceful the wave is. The energy in a sound wave is measured in decibels (dB), the measure of loudness, or intensity of a sound; this measurement describes the amplitude of a sound wave. Decibels are expressed in a logarithmic scale. On the other hand, pitch describes the frequency of a sound and is measured in hertz (Hz).
The main instrument to measure sounds in the air is the Sound Level Meter. There are many different varieties of instruments that are used to measure noise - Noise Dosimeters are often used in occupational environments, noise monitors are used to measure environmental noise and noise pollution, and recently smartphone-based sound level meter applications (apps) are being used to crowdsource and map recreational and community noise.
A-weighting is applied to a sound spectrum to represent the sound that humans are capable of hearing at each frequency. Sound pressure is thus expressed in terms of dBA. 0 dBA is the softest level that a person can hear. Normal speaking voices are around 65 dBA. A rock concert can be about 120 dBA.
Recording and reproduction
In audio, recording, and broadcast systems, audio noise refers to the residual low-level sound (four major types: hiss, rumble, crackle, and hum) that is heard in quiet periods of program. This variation from the expected pure sound or silence can be caused by the audio recording equipment, the instrument, or ambient noise in the recording room.
In audio engineering it can refer either to the acoustic noise from loudspeakers or to the unwanted residual electronic noise signal that gives rise to acoustic noise heard as hiss. This signal noise is commonly measured using A-weighting or ITU-R 468 weighting
Noise is often generated deliberately and used as a test signal for audio recording and reproduction equipment.
Environmental noise
Environmental noise is the accumulation of all noise present in a specified environment. The principal sources of environmental noise are surface motor vehicles, aircraft, trains and industrial sources. These noise sources expose millions of people to noise pollution that creates not only annoyance, but also significant health consequences such as elevated incidence of hearing loss, cardiovascular disease, and many others. Urban noise is generally not of an intensity that causes hearing loss but it interrupts sleep, disturbs communication and interferes with other human activities. There are a variety of mitigation strategies and controls available to reduce sound levels including source intensity reduction, land-use planning strategies, noise barriers and sound baffles, time of day use regimens, vehicle operational controls and architectural acoustics design measures.
Regulation
Certain geographic areas or specific occupations may be at a higher risk of being exposed to constantly high levels of noise; regulation may prevent negative health outcomes. Noise regulation includes statutes or guidelines relating to sound transmission established by national, state or provincial and municipal levels of government. Environmental noise is governed by laws and standards which set maximum recommended levels of noise for specific land uses, such as residential areas, areas of outstanding natural beauty, or schools. These standards usually specify measurement using a weighting filter, most often A-weighting.
United States
In 1972, the Noise Control Act was passed to promote a healthy living environment for all Americans, where noise does not pose a threat to human health. This policy's main objectives were: (1) establish coordination of research in the area of noise control, (2) establish federal standards on noise emission for commercial products, and (3) promote public awareness about noise emission and reduction.
The Quiet Communities Act of 1978 promotes noise control programs at the state and local level and developed a research program on noise control. Both laws authorized the Environmental Protection Agency to study the effects of noise and evaluate regulations regarding noise control.
The National Institute for Occupational Safety and Health (NIOSH) provides recommendation on noise exposure in the workplace. In 1972 (revised in 1998), NIOSH published a document outlining recommended standards relating to the occupational exposure to noise, with the purpose of reducing the risk of developing permanent hearing loss related to exposure at work. This publication set the recommended exposure limit (REL) of noise in an occupation setting to 85 dBA for 8 hours using a 3-dB exchange rate (every 3-dB increase in level, duration of exposure should be cut in half, i.e., 88 dBA for 4 hours, 91 dBA for 2 hours, 94 dBA for 1 hour, etc.). However, in 1973 the Occupational Safety and Health Administration (OSHA) maintained the requirement of an 8-hour average of 90 dBA. The following year, OSHA required employers to provide a hearing conservation program to workers exposed to 85 dBA average 8-hour workdays.
Europe
The European Environment Agency regulates noise control and surveillance within the European Union. The Environmental Noise Directive was set to determine levels of noise exposure, increase public access to information regarding environmental noise, and reduce environmental noise. Additionally, in the European Union, underwater noise is a pollutant according to the Marine Strategy Framework Directive (MSFD). The MSFD requires EU Member States to achieve or maintain Good Environmental Status, meaning that the "introduction of energy, including underwater noise, is at levels that do not adversely affect the marine environment".
Health effects
Exposure to noise is associated with several negative health outcomes. Depending on duration and level of exposure, noise may cause or increase the likelihood of hearing loss, high blood pressure, ischemic heart disease, sleep disturbances, injuries, and even decreased school performance. When noise is prolonged, the body's stress responses can be triggered; which can include increased heartbeat, and rapid breathing. There are also causal relationships between noise and psychological effects such as annoyance, psychiatric disorders, and effects on psychosocial well-being.
Noise exposure has increasingly been identified as a public health issue, especially in an occupational setting, as demonstrated with the creation of NIOSH's Noise and Hearing Loss Prevention program. Noise has also proven to be an occupational hazard, as it is the most common work-related pollutant. Noise-induced hearing loss, when associated with noise exposure at the workplace is also called occupational hearing loss. For example, some occupational studies have shown a relation between those who are regularly exposed to noise above 85 decibels to have higher blood pressure than those who are not exposed.
Hearing loss prevention
While noise-induced hearing loss is permanent, it is also preventable. Particularly in the workplace, regulations may exist limiting permissible exposure limit to noise. This can be especially important for professionals working in settings with consistent exposure to loud sounds, such as musicians, music teachers and audio engineers. Examples of measures taken to prevent noise-induced hearing loss in the workplace include engineering noise control, the Buy-Quiet initiative, creation of the Safe-In-Sound award, and noise surveillance.
OSHA requires the use of hearing protection. But the HPD (without individual selection, training and fit testing) does not significantly reduce the risk of hearing loss. For example, one study covered more than 19 thousand workers, some of whom usually used hearing protective devices, and some did not use them at all. There was no statistically significant difference in the risk of noise-induced hearing loss.
Literary views
Roland Barthes distinguishes between physiological noise, which is merely heard, and psychological noise, which is actively listened to. Physiological noise is felt subconsciously as the vibrations of the noise (sound) waves physically interact with the body while psychological noise is perceived as our conscious awareness shifts its attention to that noise.
Luigi Russolo, one of the first composers of noise music, wrote the essay The Art of Noises. He argued that any kind of noise could be used as music, as audiences become more familiar with noises caused by technological advancements; noise has become so prominent that pure sound no longer exists.
Avant-garde composer Henry Cowell claimed that technological advancements have reduced unwanted noises from machines, but have not managed so far to eliminate them.
Felix Urban sees noise as a result of cultural circumstances. In his comparative study on sound and noise in cities, he points out that noise regulations are only one indicator of what is considered as harmful. It is the way in which people live and behave (acoustically) that determines the way how sounds are perceived.
See also
Association of Noise Consultants
Background noise
Colors of noise
Impulse noise (acoustics)
International Noise Awareness Day
Intonarumori
Loud music
Noise and vibration on maritime vessels
Noise calculation
Noise control
Noise in music
Noise music
Noise pollution
Noise reduction
Silence
Sound level meter
Soundscape
The Hum
White noise
References
Further reading
Urban, Felix (2016). Investigating sonic empowerment in urban cultures. Baden-Baden, Tectum.
External links
Guidelines for Community Noise, World Health Organization, 1999
Audio Measuring Articles – Electronics
Mohr on Receiver Noise: Characterization, Insights & Surprises
Noise voltage – Calculation and Measuring of Thermal Noise
Noise at work European Agency for Safety and Health at Work (EU-OSHA)
Mountain & Plains ERC: A NIOSH Education and Research Center for Occupational & Environmental Health & Safety
US National Institute for Occupational Safety and Health, – Noise
European noise laws
Noise Pollution Clearing House
Introduction to the fundamentals of acoustic engineering
|
```ruby
# frozen_string_literal: true
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'cocoapods-playgrounds/gem_version.rb'
Gem::Specification.new do |spec|
spec.name = 'cocoapods-playgrounds'
spec.version = CocoapodsPlaygrounds::VERSION
spec.authors = ['Boris Bgling', 'Ellen Teapot']
spec.email = ['boris@icculus.org', 'hi@asmallteapot.com']
spec.summary = 'Generates a Swift Playground for any Pod.'
spec.homepage = 'path_to_url
spec.license = 'MIT'
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']
spec.add_dependency 'cocoapods', '>= 1.0.0', '< 2.0'
spec.add_development_dependency 'bundler', '~> 1.3'
spec.add_development_dependency 'rake'
end
```
|
```python
from . import win32
# from wincon.h
class WinColor(object):
BLACK = 0
BLUE = 1
GREEN = 2
CYAN = 3
RED = 4
MAGENTA = 5
YELLOW = 6
GREY = 7
# from wincon.h
class WinStyle(object):
NORMAL = 0x00 # dim text, dim background
BRIGHT = 0x08 # bright text, dim background
BRIGHT_BACKGROUND = 0x80 # dim text, bright background
class WinTerm(object):
def __init__(self):
self._default = win32.GetConsoleScreenBufferInfo(win32.STDOUT).wAttributes
self.set_attrs(self._default)
self._default_fore = self._fore
self._default_back = self._back
self._default_style = self._style
# In order to emulate LIGHT_EX in windows, we borrow the BRIGHT style.
# So that LIGHT_EX colors and BRIGHT style do not clobber each other,
# we track them separately, since LIGHT_EX is overwritten by Fore/Back
# and BRIGHT is overwritten by Style codes.
self._light = 0
def get_attrs(self):
return self._fore + self._back * 16 + (self._style | self._light)
def set_attrs(self, value):
self._fore = value & 7
self._back = (value >> 4) & 7
self._style = value & (WinStyle.BRIGHT | WinStyle.BRIGHT_BACKGROUND)
def reset_all(self, on_stderr=None):
self.set_attrs(self._default)
self.set_console(attrs=self._default)
def fore(self, fore=None, light=False, on_stderr=False):
if fore is None:
fore = self._default_fore
self._fore = fore
# Emulate LIGHT_EX with BRIGHT Style
if light:
self._light |= WinStyle.BRIGHT
else:
self._light &= ~WinStyle.BRIGHT
self.set_console(on_stderr=on_stderr)
def back(self, back=None, light=False, on_stderr=False):
if back is None:
back = self._default_back
self._back = back
# Emulate LIGHT_EX with BRIGHT_BACKGROUND Style
if light:
self._light |= WinStyle.BRIGHT_BACKGROUND
else:
self._light &= ~WinStyle.BRIGHT_BACKGROUND
self.set_console(on_stderr=on_stderr)
def style(self, style=None, on_stderr=False):
if style is None:
style = self._default_style
self._style = style
self.set_console(on_stderr=on_stderr)
def set_console(self, attrs=None, on_stderr=False):
if attrs is None:
attrs = self.get_attrs()
handle = win32.STDOUT
if on_stderr:
handle = win32.STDERR
win32.SetConsoleTextAttribute(handle, attrs)
def get_position(self, handle):
position = win32.GetConsoleScreenBufferInfo(handle).dwCursorPosition
# Because Windows coordinates are 0-based,
# and win32.SetConsoleCursorPosition expects 1-based.
position.X += 1
position.Y += 1
return position
def set_cursor_position(self, position=None, on_stderr=False):
if position is None:
# I'm not currently tracking the position, so there is no default.
# position = self.get_position()
return
handle = win32.STDOUT
if on_stderr:
handle = win32.STDERR
win32.SetConsoleCursorPosition(handle, position)
def cursor_adjust(self, x, y, on_stderr=False):
handle = win32.STDOUT
if on_stderr:
handle = win32.STDERR
position = self.get_position(handle)
adjusted_position = (position.Y + y, position.X + x)
win32.SetConsoleCursorPosition(handle, adjusted_position, adjust=False)
def erase_screen(self, mode=0, on_stderr=False):
# 0 should clear from the cursor to the end of the screen.
# 1 should clear from the cursor to the beginning of the screen.
# 2 should clear the entire screen, and move cursor to (1,1)
handle = win32.STDOUT
if on_stderr:
handle = win32.STDERR
csbi = win32.GetConsoleScreenBufferInfo(handle)
# get the number of character cells in the current buffer
cells_in_screen = csbi.dwSize.X * csbi.dwSize.Y
# get number of character cells before current cursor position
cells_before_cursor = csbi.dwSize.X * csbi.dwCursorPosition.Y + csbi.dwCursorPosition.X
if mode == 0:
from_coord = csbi.dwCursorPosition
cells_to_erase = cells_in_screen - cells_before_cursor
if mode == 1:
from_coord = win32.COORD(0, 0)
cells_to_erase = cells_before_cursor
elif mode == 2:
from_coord = win32.COORD(0, 0)
cells_to_erase = cells_in_screen
# fill the entire screen with blanks
win32.FillConsoleOutputCharacter(handle, ' ', cells_to_erase, from_coord)
# now set the buffer's attributes accordingly
win32.FillConsoleOutputAttribute(handle, self.get_attrs(), cells_to_erase, from_coord)
if mode == 2:
# put the cursor where needed
win32.SetConsoleCursorPosition(handle, (1, 1))
def erase_line(self, mode=0, on_stderr=False):
# 0 should clear from the cursor to the end of the line.
# 1 should clear from the cursor to the beginning of the line.
# 2 should clear the entire line.
handle = win32.STDOUT
if on_stderr:
handle = win32.STDERR
csbi = win32.GetConsoleScreenBufferInfo(handle)
if mode == 0:
from_coord = csbi.dwCursorPosition
cells_to_erase = csbi.dwSize.X - csbi.dwCursorPosition.X
if mode == 1:
from_coord = win32.COORD(0, csbi.dwCursorPosition.Y)
cells_to_erase = csbi.dwCursorPosition.X
elif mode == 2:
from_coord = win32.COORD(0, csbi.dwCursorPosition.Y)
cells_to_erase = csbi.dwSize.X
# fill the entire screen with blanks
win32.FillConsoleOutputCharacter(handle, ' ', cells_to_erase, from_coord)
# now set the buffer's attributes accordingly
win32.FillConsoleOutputAttribute(handle, self.get_attrs(), cells_to_erase, from_coord)
def set_title(self, title):
win32.SetConsoleTitle(title)
```
|
Charonia tritonis, common name the Triton's trumpet, the giant triton or is a species of very large sea snail, a marine gastropod mollusc in the family Charoniidae, the tritons. Reaching up to two feet (or 60 cm) in shell length this is one of the biggest mollusks in the coral reef.
Distribution
This species is found throughout the Indo-Pacific Oceans, Red Sea included.
Description
Feeding habits
C. tritonis is one of the few animals to feed on the crown-of-thorns starfish, Acanthaster planci. Occasional plagues of this large and destructive starfish have killed extensive areas of coral on the Great Barrier Reef of Australia and the western Pacific reefs. The triton has been described as tearing the starfish to pieces with its file-like radula.
Human use
The shell is well known as a decorative object, and is sometimes modified for use as a trumpet (such as the Japanese horagai, the Maldivian sangu, the Hawaiian pū (hoʻokani) or the Māori pūtātara).
Much debate has occurred on whether plagues of crown-of-thorns starfish are natural or are caused by overfishing of the few organisms that can eat this starfish, including C. tritonis. In 1994, Australia proposed that C. tritonis should be put on the CITES list, thereby attempting to protect the species. Because of a lack of trade data concerning this seashell, the Berne Criteria from CITES were not met, and the proposal was consequently withdrawn. While this species may be protected in Australia and other countries (such as India), it can be legally traded and is found for sale in many shell shops around the world and on the internet.
References
Bibliography
External links
doriss.ffessm.fr
na.oceana.org
cites.org (PDF)
Charoniidae
Gastropods described in 1758
Taxa named by Carl Linnaeus
|
Marguerite Bieber Hicks (October 19, 1891 – May 9, 1978) was a queer and disabled Detroit socialite, notable for acquiring a large collection of seventeenth- and eighteenth-century books by women in the 1930s and 1940s.
Biography
Marguerite Bieber was born October 19, 1891 in Dearborn, MI.
She began her undergraduate studies at the University of Michigan, where she was an undergraduate from 1910 to 1911, leaving school at her mother's death. She married Roy Carl Hicks, an accountant, in 1915. They had two children.
When she was in her 40s, Hicks returned to university, now at Wayne State University, to complete a B.A. in English in 1935. She continued her research with an M.A. from Wayne State in 1938. Her M.A. thesis was titled A Survey of the English Women Writers 1652-1700. This research prompted her to begin collecting books by and about women from the period, an unusual choice since this was before many scholars considered Early Modern women writers worthy of study. Hicks was unable to complete a Ph.D. due to her failing eyesight.
Roy Carl Hicks died in 1942. Some time in the late 1930s or early 1940s, Marguerite began a relationship with Thelma James, a folklorist from Wayne State University, who would be her long-term partner. Hicks and James collected rare books together throughout the 1940s and 1950s. In 1971, Hicks sold her collection of rare books to Oakland University’s Kresge Library. James' collection of folklore materials is also now held at Kresge library. Hicks died on May 9, 1978.
Thelma James
Thelma Gray James (1898-1988) was a professor in the English Department at the Wayne State University from the 1920s until 1963. She had a B.A. and an M.A. from the University of Michigan and specialized in folklore. She helped found the WSU Folklore Archive in 1939, which is now the largest and oldest collection of urban folklore in the U.S.
James and Hicks had certainly met by 1937, indicated by one of the books in Hicks' collection bearing the inscription "To Marguerite with much love, Thelma. M. A. Wayne University, June 17th, 1937." Due to Hicks' increasing blindness, James handled most of Hicks' correspondence, beginning as early as 1938. The society pages of the Detroit News called James and Hicks “great good friends” and “inseparable off-the-campus companions.” James never married, and shared a household with Hicks for 40 years, from when Hicks was widowed up until Hicks's death.
Rare book collection
The Oakland University Library says that Hicks began collecting rare books "in 1923, in preparation for her doctoral research." Megan Peiser and Emily Spunaugle identify her collecting activities as beginning "around the time of her husband's death," and "in the late 1930s to support a master’s thesis in English literature." Her obituary in the Detroit Free Press states that she built her collection "during the 1930s and 1940s, with the help of her longtime partner Thelma James."
Some of the books feature Hicks' own custom bookplate. The bookplate includes an illustration of her sitting at her desk with her dachshund and her cat, and a coat of arms featuring her motto "Virtus Mille Scuta" or "virtue as good as a thousand shields."
The collection contains 913 volumes, of which 363 exist in 20 or fewer known copies in the world, and many are not held anywhere else. Emily Spunagle calls the collection "likely one of the earliest intentional collections of women authors by an American collector." Megan Peiser draws particular attention to the large number of texts "related to the queer relationship of Queen Anne and the Duchess of Marlborough—possibly the earliest interest in collecting materials related to lesbian relationships in Early Modern England." Peiser finds it particularly notable that "Hicks was a disabled queer woman seeking out literature by and about women—and specifically about queer women—before the feminist recovery movement of the 1970s."
References
1891 births
1978 deaths
20th-century American LGBT people
American blind people
American book and manuscript collectors
LGBT people from Michigan
|
```shell
#!/bin/bash
# This script must be run with sudo.
set -e
MAKE="make --jobs=$NUM_THREADS"
# Install apt packages where the Ubuntu 12.04 default and ppa works for Caffe
# This ppa is for gflags and glog
add-apt-repository -y ppa:tuleu/precise-backports
apt-get -y update
apt-get install \
wget git curl \
python-dev python-numpy python3-dev\
libleveldb-dev libsnappy-dev libopencv-dev \
libprotobuf-dev protobuf-compiler \
libatlas-dev libatlas-base-dev \
libhdf5-serial-dev libgflags-dev libgoogle-glog-dev \
bc
# Add a special apt-repository to install CMake 2.8.9 for CMake Caffe build,
# if needed. By default, Aptitude in Ubuntu 12.04 installs CMake 2.8.7, but
# Caffe requires a minimum CMake version of 2.8.8.
if $WITH_CMAKE; then
# cmake 3 will make sure that the python interpreter and libraries match
wget path_to_url -O cmake3.sh
chmod +x cmake3.sh
./cmake3.sh --prefix=/usr/ --skip-license --exclude-subdir
fi
# Install CUDA, if needed
if $WITH_CUDA; then
CUDA_URL=path_to_url
CUDA_FILE=/tmp/cuda_install.deb
curl $CUDA_URL -o $CUDA_FILE
dpkg -i $CUDA_FILE
rm -f $CUDA_FILE
apt-get -y update
# Install the minimal CUDA subpackages required to test Caffe build.
# For a full CUDA installation, add 'cuda' to the list of packages.
apt-get -y install cuda-core-6-5 cuda-cublas-6-5 cuda-cublas-dev-6-5 cuda-cudart-6-5 cuda-cudart-dev-6-5 cuda-curand-6-5 cuda-curand-dev-6-5
# Create CUDA symlink at /usr/local/cuda
# (This would normally be created by the CUDA installer, but we create it
# manually since we did a partial installation.)
ln -s /usr/local/cuda-6.5 /usr/local/cuda
fi
# Install LMDB
LMDB_URL=path_to_url
LMDB_FILE=/tmp/lmdb.tar.gz
pushd .
wget $LMDB_URL -O $LMDB_FILE
tar -C /tmp -xzvf $LMDB_FILE
cd /tmp/lmdb*/libraries/liblmdb/
$MAKE
$MAKE install
popd
rm -f $LMDB_FILE
# Install the Python runtime dependencies via miniconda (this is much faster
# than using pip for everything).
export PATH=$CONDA_DIR/bin:$PATH
if [ ! -d $CONDA_DIR ]; then
if [ "$PYTHON_VERSION" -eq "3" ]; then
wget path_to_url -O miniconda.sh
else
wget path_to_url -O miniconda.sh
fi
chmod +x miniconda.sh
./miniconda.sh -b -p $CONDA_DIR
conda update --yes conda
conda install --yes numpy scipy matplotlib scikit-image pip
# Let conda install boost (so that boost_python matches)
conda install --yes -c path_to_url boost=1.56.0
fi
# install protobuf 3 (just use the miniconda3 directory to avoid having to setup the path again)
if [ "$PYTHON_VERSION" -eq "3" ] && [ ! -e "$CONDA_DIR/bin/protoc" ]; then
pushd .
wget path_to_url -O protobuf-3.tar.gz
tar -C /tmp -xzvf protobuf-3.tar.gz
cd /tmp/protobuf-3*/
./autogen.sh
./configure --prefix=$CONDA_DIR
$MAKE
$MAKE install
popd
fi
if [ "$PYTHON_VERSION" -eq "3" ]; then
pip install --pre protobuf
else
pip install protobuf
fi
```
|
Predatory advertising, or predatory marketing, can be largely understood as the practice of manipulating vulnerable persons or populations into unfavorable market transactions through the undisclosed exploitation of these vulnerabilities. The vulnerabilities of persons/populations can be hard to determine, especially as they are contextually dependent and may not exist across all circumstances. Commonly exploited vulnerabilities include physical, emotional, social, cognitive, and financial characteristics. Predatory marketing campaigns may also rely on false or misleading messaging to coerce individuals into asymmetrical transactions. The history of the practice has existed as long as general advertising, but particularly egregious forms have accompanied the explosive rise of information technology. Massive data analytics industries have allowed marketers to access previously sparse and inaccessible personal information, leveraging and optimizing it through the use of savvy algorithms. Some common examples today include for-profit college industries, "fringe" financial institutions, political micro-targeting, and elder/child exploitation. Many legal actions have been taken at different levels of government to mitigate the practice, with various levels of success.
Vulnerable populations
Predatory advertising depends, in large part, on the deliberate exploitation of individuals based on specific traits, life circumstances, or membership within certain groups. It is important to understand that the "vulnerabilities" created by these characteristics are context-dependent, meaning they vary between markets and transactions. In other words, an individual with some or any of these traits is not rendered universally vulnerable within the marketplace. Furthermore, not all marketing or advertisements targeting these traits are necessarily "predatory," as the condition for the practice relies primarily on the intent of the advertiser. This distinction can be especially opaque given marketing's natural tendency—even within ethical bounds—to identify the "pain points" of potential consumers. Nonetheless, it can be helpful to delineate the most common forms of vulnerability. Some of the most common avenues of exploitation are:
Physical Vulnerability, wherein certain biological or physiological traits render an individual less likely to engage in market transactions from a fair position. Examples of this may include the targeting of overweight individuals with ineffective weight loss supplements, or the advertisement of unregulated "medical" devices to those suffering from degenerative or other painful diseases.
Cognitive Vulnerability, wherein cognitive deficiencies render an individual unable to fully comprehend and process advertising information that may be deceptive or manipulative. Examples of this are not limited to the cognitively disabled, and may include advertising that targets minors or the elderly.
Motivational Vulnerability, wherein certain individual traits or extraordinary personal circumstances may inhibit a person's ability to resist or properly negotiate certain market advances. Examples of this may include the advertisement of price-inflated funeral services to freshly grieving individuals (a practice which has been addressed by the FTC's "Funeral Rule")
Social Vulnerability, wherein the social circumstances of an individual greatly increases their propensity to engage in unfavorable transaction. Examples of this include the marketing of for-profit colleges to combat veterans struggling to find gainful employment.
Emotional Vulnerability, wherein the emotional states of individuals—temporary or persisting—are leveraged by advertisers to sell products that purportedly address these emotional ills. This avenue of exploitation has become especially pertinent as marketer access to data on individual users has become increasingly comprehensive, and algorithms have been able to return relevant advertisements in almost real-time.
Economic Vulnerability, wherein an individual's economic circumstances either limits their ability to engage in alternative market transactions, or increases the chances they will be susceptible to other predatory marketing schemes. Examples of this include the marketing of high-interest payday loans to financially unstable individuals, who may have no other options.
Deception tactics
Many predatory advertisers rely on the use of demonstrably false or otherwise deceitful claims to coerce consumers into market transactions. These can be incredibly hard to classify and regulate as some claims may be true at face-value, but rely on either tactical omissions of information or the contextual circumstances of the individual to draw inferences that may be false. While many of these tactics may be somewhat natural (and accepted) within the advertising industry at-large, they can be predatory if used in certain contexts. Researchers have compiled a general classification of these tactics to better understand how they are used in the marketing landscape.
False statements
These include claims or presentations that are demonstrably false, often statistics or other empirical claims. For example, a for-profit college claims "98% of our graduates find employment within one month of graduation!" when in fact this is untrue.
Omission
Statements made about a product or service which fail to include material information that is relevant to the claim being made. For example, a commercial suggests that "clinical trials have proven the effectiveness of a product" when in fact the clinical trial measured the effectiveness of the product in a different context or metric that the one being advertised.
Implication
Statements that are made which may be true, but which are intended to lead the consumer to reach erroneous inferences. These may capitalize on a lack of information about the product or service, or the contextual environment of the consumer. They can be further classified as:
Ambiguous statements or claims, which utilize unclear language or narratives to suggest product superiority. For example, a claim is made that the product is a much "better" alternative to a similar product, but there is no metric for "better."
Atypical statements or claims, which cite results of product utilization that fall well outside of the normal outcome. For example, a diet pill company claims you can lose up to 30 pounds in one month, when the result is both unusual and/or achieved by other methods.
Conjectural statements or claims, which lack substantive evidence or cannot be made with certainty. For example, a commercial promises a "100% satisfaction guarantee" despite its being impossible to ensure.
Manipulative statements or claims, which cite characteristics of the product or service that may not differentiate it from market standards, but create an illusion of product superiority. For instance, a sugar soda may highlight that it is fat-free, when in fact all sodas contain no fat content.
Accessing personal information
Data collection
The explosive growth of information technologies throughout the 21st century has brought with it entirely new privacy concerns, especially surrounding the collection and usage of personal data. As reliance on digital platforms has become almost necessary for participation in modern life, individuals have been asked to relinquish large amounts of personal information, either through direct submission or by inference from user engagement. Although access to personal information is generally agreed upon by participants, as outlined in end-user permissions agreements, questions of informed consent have brought forth numerous legislative efforts, including propositions to increase clarity in consent forms, as well as efforts to establish clear bounds of data usage.
The commodification of this data, which is highly valued across a number of sectors, has driven the exponential rise of a "data brokering" industry. Barring established industry norms and regulations (some of which can be hard to apply in the digital age), such as those in healthcare, finance, or other similarly protected sectors, data collected by individual entities like
or Facebook, as well as that collected by third party brokerage agencies such as Acxiom, can have a wide range of applications. Though many of these are relatively benign or even positive, often being utilized to tailor personalized user-experiences, the availability of such data to unethical marketers has inflamed problems of predatory advertising.
Data extraction and aggregation occurs over a vast network of platforms and businesses. Much of the information originates from discrete sources, including social media engagement, loyalty programs and purchasing history from online retailers, web browser queries, government records, and mobile application usage and preferences. Information gathered consists of many personal data points, ranging from available payment methods to health conditions. In the case of large technology platforms, especially for whom a large part of the revenue stream is composed of ad sales, this information may often be sold—either directly to advertisers or to third party brokerage firms. These firms specialize in the aggregation and categorization of data from a number of sources, which is then sold on the market to advertisers and other interested parties.
The process of categorization is especially important to understanding the avenues of exploitation made possible by comprehensive data aggregates. A 2013 report by the Federal Trade Commission found that data brokerage companies compiled individuals into groups with labels such as: "Zero Mobility," "Credit Crunched: City Families," "Rural and Barely Making It," "Enduring Hardships," and "Tough Start: Young Single Parents."
Algorithmic targeting
Whereas information pertaining to consumer vulnerabilities has been inferred through proxies for some time, such as the targeting of certain demographics based on specific television viewership, the drastic increase of direct access to information around the individual—especially coupled with methods of direct-to-consumer personalized advertisements—has intensified the accuracy and potency of predatory advertisement campaigns.
This information then allows advertisers to engage in online behavioral targeting, wherein advertisements are delivered to individuals based on personal information previously extracted from various sources. Complex algorithms, coupled with the aggregation of previously discrete data, have allowed advertisers to not only target increasingly precise individual characteristics, but also to draw inferences about individuals based on statistical corollaries requiring massive data sets. One consequence of this is that traditionally protected information, such as health outcomes, race, or private financial histories, can be inferred with greater certainty without ever collecting data on the specific item in question.
Once data has been collected, aggregated, and categorized, the connection between advertiser and consumer can be made. These are often fostered by intermediaries such as DoubleClick, a Google-owned company that offers marketers a wide range of websites to display their advertisements. The use of these intermediaries relieves websites of having to sell individual ad space, allowing algorithms to instead display personalized ads to users based on a complex mix of desirable metrics. This practice has sometimes been called "micro-targeting." While this process optimizes the ability to provide users with an individualized experience, it alleviates much of the culpability traditionally placed on ad-revenue dependent platforms to monitor their ad placements. Furthermore, when the algorithms are built using grouping labels such as those listed in the previous section (i.e. "Burdened by Debt: Singles"), advertisers looking to target and exploit specific characteristics can easily reach the most vulnerable populations.
It's important to note that the use of algorithms may result in such targeted advertisement despite being built without any malicious intent. Those utilizing Machine Learning will "train" themselves to display advertisements that result in user-engagement based on prior interactions, which may reinforce and increase the rate at which vulnerable populations receive advertisements that "speak" to those vulnerabilities.
Common examples
For-profit colleges
The for-profit college industry has faced a number of lawsuits over the last decade, many of which surrounded their engagement in deceptive marketing campaigns. A study by the United States Government Accountability Office found that, of fifteen institutions selected, four engaged in outright fraudulent practices, while all fifteen were found to have made deceptive statements about enrollment, employment prospects, or tuition. While the advertisements were found to generally target low-income individuals, the large majority of marketing efforts were focused on veterans due to their access to G.I. Bill benefits. An executive order released during the Obama Administration found that following the post September 11 reinstatement of the Bill, which re-allocated funds towards higher education for veterans, for-profit institutions began aggressively targeting veterans and their families, with some institutions recruiting individuals with traumatic brain injuries as well as other deep emotional vulnerabilities. Much of the lead generation for these institutions is conducted using the data-driven instruments outlined above. Other studies have shown that for-profit institutions attract a disproportionate number of low-income minorities through advertisement practices that capitalize on dampened social mobility through the promise of career placement. Research found that a large portion of students who enrolled were not awarded degrees, despite having taken on debt to pursue them.
Predatory lending
Predatory lending is the process of granting high-interest loans with unfavorable terms to financially-distressed individuals. The data landscape has made these individuals much easier to find. As mentioned above, this information can be ascertained through a number of correlated online behaviors. For instance, those who regularly search for coupons, "fringe" financial institutions, or low-paying jobs in their search browser may be disproportionately targeted with advertisement for these loans. Research has shown that "fringe" financial institutions such as check cashing outlets (CCO's), payday lenders, and pawnbrokers have a disproportionate presence in low-income neighborhoods, especially when compared to the relative under-representation of mainstream financial institutions in the same localities. Some researchers have called this phenomenon "predatory inclusion," whereby the necessity for fringe institutions providing "alternative" services is only made possible through larger, structural socioeconomic dynamics. The mixture of lacking alternative resources and savvy targeting methods have resulted in major increases in the prevalence of such loans, especially following the Great Recession.
Political messaging
The use of data-driven micro-targeting has allowed politicians to tailor messages to specific individuals, speaking directly to the preferences, concerns, interests, and fears that they may have displayed through their online activity. While these practices may be largely benign, by allowing politicians to increase engagement by using individual names or campaigning on individually-relevant issues, critics have noted some disastrous effects on democratic processes. One of the most notable examples is the Cambridge Analytica scandal, wherein the consulting firm was found to have utilized large amounts of personal data to create highly-inflammatory targeted material, having purported impact on numerous international elections.
Grieving individuals
There have been many reports over the years of funeral homes capitalizing on the emotional vulnerability of individuals who had recently lost a loved one by selling them unnecessary services or marking-up the price on traditional funeral packages. The practice was so prevalent that the Federal Trade Commission passed a mandate, commonly known as the "Funeral Rule", which set forth multiple stipulations for funeral homes, such as the requirement of a "general price list" that consumers can access, so as to easily compare universal prices without having to inquire further.
Children/teens
Studies have shown that children are especially susceptible to advertising messaging, as most cannot recognize the persuasive nature of content as commercially motivated. While regulations have been put in place to dictate the manner in which children can be marketed to on television, child-targeted ad initiative in the internet have been harder to classify and regulate. A common example is the "adver-game," or, online games that utilize branded content to subliminally foster brand preference. These have been commonly used by large food industry conglomerates and have raised many concerns. Often, these games will use the company "spokescharacter" (i.e. Tony the Tiger) as the primary character in the game to build brand recognition. Another common tactic is the structuring of advergames so that the attainment of the product is the desired goal (as in, acquiring the candy bar or equivalent awards the player with a point value or prize). Researchers have shown that the reward mechanism associated with the acquisition of the virtual product often carries into the marketplace, ultimately influencing children's consumption patterns. Studies have shown a direct correlation between exposure to such advertisements and poor health outcomes due to the consumption of low-nutrient foods.
Legality
Legislative measures
In the United States, many of the regulatory efforts put forth in response to predatory advertising practices, especially those involving the usage of personal data, have been spearheaded by the Federal Trade Commission. Congress too, has brought forth numerous legislative measures to address the informational asymmetry and privacy concerns of modern data-collection and advertising. Proponents of regulatory action have explained that data regulation can be exceptionally hard to craft for a number of reasons. Though many have called for greater transparency in data-collection efforts, critics claims that transparency alone falls short, as data is often repackaged and sold through many brokerage firms, leading to many uses that may not have been clearly outlined as the original purpose or intent. These critics suggest that direct parameters would be better placed on the operational uses of data in general. Opponents of regulatory reform say this would, perhaps unintentionally, drastically inhibit businesses ability to utilize the data for positive measures. Furthermore, because singular data points may be used across a large array of industries, sector-specific legislation may prove fruitless. To date, congress has introduced a few noteworthy bills, most of which were never passed:
Consumer Privacy Protection Act of 2011 (Not Passed): Required data-collection entities, especially those involved in the sale and disclosure of personally identifiable information, to provide consumers notice upon any intent to use personal data for reasons unrelated to the original transaction. Also required outlined entities to provide consumers an option to request that their personal information not be used for any purposes outside of the transaction for up to five years. A similar version of the bill was introduced in 2015, but also died before making it to the vote.
Commercial Privacy Bill of Rights Act of 2011 (Not Passed): Established parameters on the purposes for which data could be collected and placed further limitations on the length of time that data could be retained. Also established and FTC protocol that would require covered entities (those collection data on 5000+ U.S. citizens in the span of any year) to: 1) Give individuals notice about the use and storage of their personal information; 2) Provide individuals opportunities to "opt-out" of data collection, especially as used in behavioral advertising; 3) Provide avenues to fix inaccurate information; 4) Allow data points with personally identifiable characteristics to be rendered.
Data Broker Accountability and Transparency Act of 2019 (Not Passed): Established requirements for entities that engage in the collections of personal data for the purposes of re-sale to third party entities. Also required that individuals be granted access to the information that is collected about themselves.
See also
Microtargeting
Predatory Lending
Targeted Advertising
False Advertising
For-Profit Higher Education in the United States
References
Advertising
Psychological manipulation
Abuse
Disinformation
Deception
Ethically disputed business practices
|
```html
<!--
(See accompanying file LICENSE.md or copy at path_to_url
-->
<!-- boost-no-inspect -->
<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Boost.Hana: Data types</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
// (See accompanying file LICENSE.md or copy at path_to_url
MathJax.Hub.Config({
"HTML-CSS": {
linebreaks: {
automatic: true,
width: "75% container"
}
}
});
</script><script type="text/javascript" src="path_to_url"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<!-- Additional javascript for drawing charts. -->
<script type="text/javascript" src="highcharts.js"></script>
<script type="text/javascript" src="highcharts-data.js"></script>
<script type="text/javascript" src="highcharts-exporting.js"></script>
<script type="text/javascript" src="chart.js"></script>
<script type="text/javascript" src="hana.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="Boost.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Boost.Hana
 <span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Your standard library for metaprogramming</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group-datatypes.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<div class="title">Data types</div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>General purpose data types provided by the library. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1integral__constant.html">boost::hana::integral_constant< T, v ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Compile-time value of an integral type. <a href="structboost_1_1hana_1_1integral__constant.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1basic__tuple.html">boost::hana::basic_tuple< Xs ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Stripped down version of <code><a class="el" href="structboost_1_1hana_1_1tuple.html" title="General purpose index-based heterogeneous sequence with a fixed length. ">hana::tuple</a></code>. <a href="structboost_1_1hana_1_1basic__tuple.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1lazy.html">boost::hana::lazy< implementation_defined ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight"><code><a class="el" href="structboost_1_1hana_1_1lazy.html" title="hana::lazy implements superficial laziness via a monadic interface. ">hana::lazy</a></code> implements superficial laziness via a monadic interface. <a href="structboost_1_1hana_1_1lazy.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1map.html">boost::hana::map< Pairs ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Basic associative container requiring unique, <code>Comparable</code> and <code>Hashable</code> keys. <a href="structboost_1_1hana_1_1map.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1optional.html">boost::hana::optional< T ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Optional value whose optional-ness is known at compile-time. <a href="structboost_1_1hana_1_1optional.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html">boost::hana::pair< First, Second ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Generic container for two elements. <a href="structboost_1_1hana_1_1pair.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1range.html">boost::hana::range< T, from, to ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Compile-time half-open interval of <code><a class="el" href="structboost_1_1hana_1_1integral__constant.html" title="Compile-time value of an integral type. ">hana::integral_constant</a></code>s. <a href="structboost_1_1hana_1_1range.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1set.html">boost::hana::set< implementation_defined ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Basic unordered container requiring unique, <code>Comparable</code> and <code>Hashable</code> keys. <a href="structboost_1_1hana_1_1set.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1string.html">boost::hana::string< implementation_defined ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Compile-time string. <a href="structboost_1_1hana_1_1string.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1tuple.html">boost::hana::tuple< Xn ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">General purpose index-based heterogeneous sequence with a fixed length. <a href="structboost_1_1hana_1_1tuple.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1type.html">boost::hana::type< T ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">C++ type in value-level representation. <a href="structboost_1_1hana_1_1type.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<!--
(See accompanying file LICENSE.md or copy at path_to_url
-->
<!-- boost-no-inspect -->
<!-- HTML footer for doxygen 1.8.9.1-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
</ul>
</div>
</body>
</html>
```
|
Rudolph Palumbo (27 March 1901 – 16 July 1987) was a British property developer who made his fortune redeveloping Second World War bombsites in London.
Early life
Rudolph (originally Rodolfo) Palumbo was the son of Pasquale and Gaetana Palumbo from Amalfi, who ran a cafe in Lower Thames Street.
Career
Palumbo's development company was called City Acre; he built its headquarters building in 1952, at 37A Walbrook, as the family office. Following an extensive conversion by Mark Birley, the Walbrook Club opened in 2000.
His portrait was painted by Oskar Kokoschka in 1960; this still hangs in its original position above the fireplace in what was his office and is now the dining room at 37A Walbrook.
Personal life
Palumbo married Elsie Annie Gregory, a classical musician from Lancashire; their only child is Peter Palumbo, who like his father is a property developer.
Rudolph Palumbo is buried in the churchyard of St Stephen Walbrook, London.
References
1901 births
1987 deaths
English people of Italian descent
Rudolph
Burials at St Stephen Walbrook
People from Amalfi
|
Onocolus is a genus of South American crab spiders first described by Eugène Simon in 1895. It is considered a senior synonym of Paronocolus.
Species
, it contains seventeen species:
Onocolus comprises the following species:
Onocolus ankeri (Teixeira & Machado, 2019) — Colombia, Brazil
Onocolus biocellatus Mello-Leitão, 1948 — Guyana
Onocolus compactilis Simon, 1895 — Peru, Brazil
Onocolus echinatus (Taczanowski, 1872) — Venezuela to Brazil
Onocolus echinicaudus Mello-Leitão, 1929 — Brazil, Paraguay
Onocolus echinurus Mello-Leitão, 1929 — Brazil
Onocolus eloaeus Lise, 1980 — Brazil
Onocolus garruchus Lise, 1979 — Brazil
Onocolus granulosus Mello-Leitão, 1929 — Peru, Brazil
Onocolus infelix Mello-Leitão, 1941 — Brazil
Onocolus intermedius (Mello-Leitão, 1929) — Brazil, Paraguay
Onocolus latiductus Lise, 1980 — South America
Onocolus mitralis Lise, 1979 — Venezuela, Brazil
Onocolus pentagonus (Keyserling, 1880) — Panama to Brazil
Onocolus perditus Mello-Leitão, 1929 — Brazil
Onocolus simoni Mello-Leitão, 1915 — Brazil, Peru
Onocolus trifolius Mello-Leitão, 1929 — Brazil
References
Thomisidae
Araneomorphae genera
Spiders of South America
|
```python
import json
import argparse
import logging
import os
import sys
import time
from types import FrameType
from typing import Any, Dict, List, Optional, TYPE_CHECKING, Text, Union, overload
import randomname
import rasa.shared.utils.cli
import rasa.shared.utils.io
from rasa.shared.importers.importer import TrainingDataImporter
from rasa.shared.constants import (
ASSISTANT_ID_DEFAULT_VALUE,
ASSISTANT_ID_KEY,
DEFAULT_CONFIG_PATH,
)
from rasa.shared.utils.cli import print_error
from rasa import telemetry
if TYPE_CHECKING:
from pathlib import Path
from questionary import Question
from typing_extensions import Literal
from rasa.validator import Validator
logger = logging.getLogger(__name__)
FREE_TEXT_INPUT_PROMPT = "Type out your own message..."
@overload
def get_validated_path(
current: Optional[Union["Path", Text]],
parameter: Text,
default: Optional[Union["Path", Text]] = ...,
none_is_valid: "Literal[False]" = ...,
) -> Union["Path", Text]:
...
@overload
def get_validated_path(
current: Optional[Union["Path", Text]],
parameter: Text,
default: Optional[Union["Path", Text]] = ...,
none_is_valid: "Literal[True]" = ...,
) -> Optional[Union["Path", Text]]:
...
def get_validated_path(
current: Optional[Union["Path", Text]],
parameter: Text,
default: Optional[Union["Path", Text]] = None,
none_is_valid: bool = False,
) -> Optional[Union["Path", Text]]:
"""Checks whether a file path or its default value is valid and returns it.
Args:
current: The parsed value.
parameter: The name of the parameter.
default: The default value of the parameter.
none_is_valid: `True` if `None` is valid value for the path,
else `False``
Returns:
The current value if it was valid, else the default value of the
argument if it is valid, else `None`.
"""
if current is None or current is not None and not os.path.exists(current):
if default is not None and os.path.exists(default):
reason_str = f"'{current}' not found."
if current is None:
reason_str = f"Parameter '{parameter}' not set."
else:
rasa.shared.utils.io.raise_warning(
f"The path '{current}' does not seem to exist. Using the "
f"default value '{default}' instead."
)
logger.debug(f"{reason_str} Using default location '{default}' instead.")
current = default
elif none_is_valid:
current = None
else:
cancel_cause_not_found(current, parameter, default)
return current
def missing_config_keys(
path: Union["Path", Text], mandatory_keys: List[Text]
) -> List[Text]:
"""Checks whether the config file at `path` contains the `mandatory_keys`.
Args:
path: The path to the config file.
mandatory_keys: A list of mandatory config keys.
Returns:
The list of missing config keys.
"""
import rasa.utils.io
if not os.path.exists(path):
return mandatory_keys
config_data = rasa.shared.utils.io.read_config_file(path)
return [k for k in mandatory_keys if k not in config_data or config_data[k] is None]
def validate_assistant_id_in_config(config_file: Union["Path", Text]) -> None:
"""Verifies that the assistant_id key exists and has a unique value in config.
Issues a warning if the key does not exist or has the default value and replaces it
with a pseudo-random string value.
"""
config_data = rasa.shared.utils.io.read_config_file(
config_file, reader_type=["safe", "rt"]
)
assistant_id = config_data.get(ASSISTANT_ID_KEY)
if assistant_id is None or assistant_id == ASSISTANT_ID_DEFAULT_VALUE:
rasa.shared.utils.io.raise_warning(
f"The config file '{config_file!s}' is missing a unique value for the "
f"'{ASSISTANT_ID_KEY}' mandatory key. Proceeding with generating a random "
f"value and overwriting the '{ASSISTANT_ID_KEY}' in the config file."
)
# add random value for assistant id, overwrite config file
time_format = "%Y%m%d-%H%M%S"
config_data[
ASSISTANT_ID_KEY
] = f"{time.strftime(time_format)}-{randomname.get_name()}"
rasa.shared.utils.io.write_yaml(
data=config_data, target=config_file, should_preserve_key_order=True
)
return
def validate_config_path(
config: Optional[Union[Text, "Path"]],
default_config: Text = DEFAULT_CONFIG_PATH,
) -> Text:
"""Verifies that the config path exists.
Exit if the config file does not exist.
Args:
config: Path to the config file.
default_config: default config to use if the file at `config` doesn't exist.
Returns: The path to the config file.
"""
config = rasa.cli.utils.get_validated_path(config, "config", default_config)
if not config or not os.path.exists(config):
print_error(
"The config file '{}' does not exist. Use '--config' to specify a "
"valid config file."
"".format(config)
)
sys.exit(1)
return str(config)
def validate_mandatory_config_keys(
config: Union[Text, "Path"],
mandatory_keys: List[Text],
) -> Text:
"""Get a config from a config file and check if it is valid.
Exit if the config isn't valid.
Args:
config: Path to the config file.
mandatory_keys: The keys that have to be specified in the config file.
Returns: The path to the config file if the config is valid.
"""
missing_keys = set(rasa.cli.utils.missing_config_keys(config, mandatory_keys))
if missing_keys:
print_error(
"The config file '{}' is missing mandatory parameters: "
"'{}'. Add missing parameters to config file and try again."
"".format(config, "', '".join(missing_keys))
)
sys.exit(1)
return str(config)
def get_validated_config(
config: Optional[Union[Text, "Path"]],
mandatory_keys: List[Text],
default_config: Text = DEFAULT_CONFIG_PATH,
) -> Text:
"""Validates config and returns path to validated config file."""
config = validate_config_path(config, default_config)
validate_assistant_id_in_config(config)
config = validate_mandatory_config_keys(config, mandatory_keys)
return config
def validate_files(
fail_on_warnings: bool,
max_history: Optional[int],
importer: TrainingDataImporter,
stories_only: bool = False,
) -> None:
"""Validates either the story structure or the entire project.
Args:
fail_on_warnings: `True` if the process should exit with a non-zero status
max_history: The max history to use when validating the story structure.
importer: The `TrainingDataImporter` to use to load the training data.
stories_only: If `True`, only the story structure is validated.
"""
from rasa.validator import Validator
validator = Validator.from_importer(importer)
if stories_only:
all_good = _validate_story_structure(validator, max_history, fail_on_warnings)
else:
if importer.get_domain().is_empty():
rasa.shared.utils.cli.print_error_and_exit(
"Encountered empty domain during validation."
)
valid_domain = _validate_domain(validator)
valid_nlu = _validate_nlu(validator, fail_on_warnings)
valid_stories = _validate_story_structure(
validator, max_history, fail_on_warnings
)
all_good = valid_domain and valid_nlu and valid_stories
validator.warn_if_config_mandatory_keys_are_not_set()
telemetry.track_validate_files(all_good)
if not all_good:
rasa.shared.utils.cli.print_error_and_exit(
"Project validation completed with errors."
)
def _validate_domain(validator: "Validator") -> bool:
valid_domain_validity = validator.verify_domain_validity()
valid_actions_in_stories_rules = validator.verify_actions_in_stories_rules()
valid_forms_in_stories_rules = validator.verify_forms_in_stories_rules()
valid_form_slots = validator.verify_form_slots()
valid_slot_mappings = validator.verify_slot_mappings()
return (
valid_domain_validity
and valid_actions_in_stories_rules
and valid_forms_in_stories_rules
and valid_form_slots
and valid_slot_mappings
)
def _validate_nlu(validator: "Validator", fail_on_warnings: bool) -> bool:
return validator.verify_nlu(not fail_on_warnings)
def _validate_story_structure(
validator: "Validator", max_history: Optional[int], fail_on_warnings: bool
) -> bool:
# Check if a valid setting for `max_history` was given
if isinstance(max_history, int) and max_history < 1:
raise argparse.ArgumentTypeError(
f"The value of `--max-history {max_history}` " f"is not a positive integer."
)
return validator.verify_story_structure(
not fail_on_warnings, max_history=max_history
)
def cancel_cause_not_found(
current: Optional[Union["Path", Text]],
parameter: Text,
default: Optional[Union["Path", Text]],
) -> None:
"""Exits with an error because the given path was not valid.
Args:
current: The path given by the user.
parameter: The name of the parameter.
default: The default value of the parameter.
"""
default_clause = ""
if default:
default_clause = f"use the default location ('{default}') or "
rasa.shared.utils.cli.print_error(
"The path '{}' does not exist. Please make sure to {}specify it"
" with '--{}'.".format(current, default_clause, parameter)
)
sys.exit(1)
def parse_last_positional_argument_as_model_path() -> None:
"""Fixes the parsing of a potential positional model path argument."""
if (
len(sys.argv) >= 2
# support relevant commands ...
and sys.argv[1] in ["run", "shell", "interactive"]
# but avoid interpreting subparser commands as model paths
and sys.argv[1:] != ["run", "actions"]
and not sys.argv[-2].startswith("-")
and os.path.exists(sys.argv[-1])
):
sys.argv.append(sys.argv[-1])
sys.argv[-2] = "--model"
def button_to_string(button: Dict[Text, Any], idx: int = 0) -> Text:
"""Create a string representation of a button."""
title = button.pop("title", "")
if "payload" in button:
payload = " ({})".format(button.pop("payload"))
else:
payload = ""
# if there are any additional attributes, we append them to the output
if button:
details = " - {}".format(json.dumps(button, sort_keys=True))
else:
details = ""
button_string = "{idx}: {title}{payload}{details}".format(
idx=idx + 1, title=title, payload=payload, details=details
)
return button_string
def element_to_string(element: Dict[Text, Any], idx: int = 0) -> Text:
"""Create a string representation of an element."""
title = element.pop("title", "")
element_string = "{idx}: {title} - {element}".format(
idx=idx + 1, title=title, element=json.dumps(element, sort_keys=True)
)
return element_string
def button_choices_from_message_data(
message: Dict[Text, Any], allow_free_text_input: bool = True
) -> List[Text]:
"""Return list of choices to present to the user.
If allow_free_text_input is True, an additional option is added
at the end along with the response buttons that allows the user
to type in free text.
"""
choices = [
button_to_string(button, idx)
for idx, button in enumerate(message.get("buttons"))
]
if allow_free_text_input:
choices.append(FREE_TEXT_INPUT_PROMPT)
return choices
async def payload_from_button_question(button_question: "Question") -> Text:
"""Prompt user with a button question and returns the nlu payload."""
response = await button_question.ask_async()
if response != FREE_TEXT_INPUT_PROMPT:
# Extract intent slash command if it's a button
response = response[response.rfind("(") + 1 : response.rfind(")")]
return response
def signal_handler(_: int, __: FrameType) -> None:
"""Kills Rasa when OS signal is received."""
print("Goodbye ")
sys.exit(0)
```
|
Zack Spencer is an American former Negro league pitcher who played in the 1930s.
Spencer made his Negro leagues debut in 1931 with the Chicago Columbia Giants. He went on to play for the Columbus Blue Birds in 1933.
References
External links
and Seamheads
Year of birth missing
Place of birth missing
Columbia Giants players
Columbus Blue Birds players
Baseball pitchers
|
Iolaus laon, the fine sapphire, is a butterfly in the family Lycaenidae. It is found in eastern Ivory Coast, Ghana, Togo and western Nigeria. The habitat consists of forests and disturbed areas such as cocoa plantations.
The larvae feed on the flowers of Loranthus incanus. They are mole coloured.
References
External links
Die Gross-Schmetterlinge der Erde 13: Die Afrikanischen Tagfalter. Plate XIII 67 g
Die Gross-Schmetterlinge der Erde 13: Die Afrikanischen Tagfalter. Plate XIII 68 d as (synonym) adamsi Lathy, 1903
Butterflies described in 1878
Iolaus (butterfly)
Butterflies of Africa
Taxa named by William Chapman Hewitson
|
Glen Hansen (born 1962 or 1963) is a Canadian curler from Hinton, Alberta. He currently skips a team on the World Curling Tour.
Hansen with teammates Tiffany Steuber, Les Steuber and Sherry French won the 2015 Alberta mixed championship and represented Alberta at the 2015 Canadian Mixed Curling Championship (played in the Fall of 2014). There the team went 3–3 in their first six games, but were relegated to the seeing pool, where they won their remaining three games, finishing 9th overall.
The next season, Hansen with teammates Doug McLennan, George Parsons and former Olympic silver medallist Don Bartlett won the Alberta men's senior championships. The team represented Alberta at the 2015 Canadian Senior Curling Championships, finishing in first place after the round robin. However, the team would lose in both the semi-final and the bronze medal final.
After 41 years of curling, Hansen and his senior men's team played in his first ever provincial men's championship, the 2016 Boston Pizza Cup. Hansen and his team managed to win two games before being eliminated in the triple knock-out event.
On the World Curling Tour, Hansen won his first tour event win when he won the 2016 Avonair Cash Spiel.
References
External links
Living people
1960s births
Curlers from Alberta
People from Yellowhead County
Canadian male curlers
|
```java
package io.jenkins.blueocean.blueocean_bitbucket_pipeline;
import com.mashape.unirest.http.exceptions.UnirestException;
import hudson.model.Item;
import hudson.model.User;
import hudson.security.GlobalMatrixAuthorizationStrategy;
import hudson.security.HudsonPrivateSecurityRealm;
import io.jenkins.blueocean.blueocean_bitbucket_pipeline.server.BbServerWireMock;
import io.jenkins.blueocean.blueocean_bitbucket_pipeline.server.BitbucketServerScm;
import io.jenkins.blueocean.commons.MapsHelper;
import jenkins.model.Jenkins;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class AbstractBitbucketScmSecurityTest extends BbServerWireMock {
private static final String ORGANIZATIONS_URL = "/organizations/jenkins/scm/" + BitbucketServerScm.ID + "/organizations/";
private static final String VALIDATE_URL = "/organizations/jenkins/scm/" + BitbucketServerScm.ID + "/validate/";
public static final String READONLY_USER_NAME = "readOnly";
public static final String READONLY_USER_PASSWORD = "pacific_ale";
public static final String ITEM_CREATE_USER_NAME = "itemCreateUser";
public static final String ITEM_CREATE_USER_PASSWORD = "pale_ale";
@Before
public void setupSecurity() throws Exception {
HudsonPrivateSecurityRealm realm = new HudsonPrivateSecurityRealm(true, false, null);
User readOnly = realm.createAccount(READONLY_USER_NAME, READONLY_USER_PASSWORD);
User itemCreateUser = realm.createAccount(ITEM_CREATE_USER_NAME, ITEM_CREATE_USER_PASSWORD);
j.jenkins.setSecurityRealm(realm);
GlobalMatrixAuthorizationStrategy as = new GlobalMatrixAuthorizationStrategy();
j.jenkins.setAuthorizationStrategy(as);
as.add(Jenkins.READ, (String) Jenkins.ANONYMOUS2.getPrincipal());
as.add(Jenkins.READ, readOnly.getId());
as.add(Item.CREATE, itemCreateUser.getId());
this.crumb = getCrumb(j.jenkins);
}
@Test
public void getOrganizationsWithoutCrumbToken() throws UnirestException {
String jwt = getJwtToken(j.jenkins, ITEM_CREATE_USER_NAME, ITEM_CREATE_USER_PASSWORD);
String res = request()
.jwtToken(jwt)
.post(ORGANIZATIONS_URL)
.status(403)
.build(String.class);
assertTrue(res.contains("No valid crumb was included in the request"));
}
@Test
public void getOrganizationsWithGetRequest() throws UnirestException {
String jwt = getJwtToken(j.jenkins, ITEM_CREATE_USER_NAME, ITEM_CREATE_USER_PASSWORD);
JSONObject res = request()
.jwtToken(jwt)
.get(ORGANIZATIONS_URL)
.status(405)
.build(JSONObject.class);
assertEquals("Request method GET is not allowed", res.getString("message"));
}
@Test
public void getOrganizationsForUserWithItemCreatePermission() throws UnirestException {
String jwt = getJwtToken(j.jenkins, ITEM_CREATE_USER_NAME, ITEM_CREATE_USER_PASSWORD);
String credentialId = "totally-unique-credentialID";
createCredentialWithId(jwt, credentialId);
JSONArray res = request()
.jwtToken(jwt)
.crumb(crumb)
.post(ORGANIZATIONS_URL + "?apiUrl=" + apiUrl + "&credentialId=" + credentialId)
.status(200)
.build(JSONArray.class);
assertEquals(3, res.size());
}
@Test
public void getOrganizationsForUserWithoutItemCreatePermission() throws UnirestException {
String jwt = getJwtToken(j.jenkins, READONLY_USER_NAME, READONLY_USER_PASSWORD);
String credentialId = "readonly-permissions";
createCredentialWithId(jwt, credentialId);
JSONObject res = request()
.jwtToken(jwt)
.crumb(crumb)
.header(BitbucketServerScm.X_CREDENTIAL_ID, credentialId)
.post(ORGANIZATIONS_URL + "?apiUrl=" + apiUrl)
.status(403)
.build(JSONObject.class);
assertEquals("You do not have Job/Create permission", res.getString("message"));
}
@Test
public void validateAndCreateForUserWithReadonlyPermissions() throws UnirestException {
String jwt = getJwtToken(j.jenkins, READONLY_USER_NAME, READONLY_USER_PASSWORD);
JSONObject res = request()
.jwtToken(jwt)
.crumb(crumb)
.data(MapsHelper.of("apiUrl", apiUrl,
"userName", ITEM_CREATE_USER_NAME,
"password", ITEM_CREATE_USER_PASSWORD))
.post(VALIDATE_URL + "?apiUrl=" + apiUrl)
.status(403)
.build(JSONObject.class);
String errorMessage = res.getString("message");
assertEquals("You do not have Job/Create permission", errorMessage);
}
}
```
|
West Kerry was a parliamentary constituency in Ireland, represented in the Parliament of the United Kingdom. From 1885 to 1922 it returned one Member of Parliament (MP) to the House of Commons of the United Kingdom of Great Britain and Ireland.
Prior to the 1885 general election the area was part of the Kerry constituency. Representation in this constituency ceased at the 1922 United Kingdom general election, which took place on 15 November, shortly before the establishment of the Irish Free State on 6 December 1922. The successor constituency in the new Dáil Éireann was Kerry–Limerick West, first established under the Government of Ireland Act 1920 to elect members to the House of Commons of Southern Ireland in 1921.
Boundaries
This constituency comprised the western part of County Kerry.
1885–1922: The barony of Corkaguiny and that part of the barony of Trughanacmy contained within the parishes of Annagh, Ardfert, Ballynahaglish, Ballyseedy, Clogherbrien, Fenit, Kilcolman, Kilgarrylander, Kiltallagh, Ratass and Tralee.
Members of Parliament
Elections
Elections in the 1880s
Elections in the 1890s
Elections in the 1900s
Elections in the 1910s
References
Westminster constituencies in County Kerry (historic)
Dáil constituencies in the Republic of Ireland (historic)
Constituencies of the Parliament of the United Kingdom established in 1885
Constituencies of the Parliament of the United Kingdom disestablished in 1922
1885 establishments in Ireland
1922 disestablishments in Ireland
|
```go
// _ _
// __ _____ __ ___ ___ __ _| |_ ___
// \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
// \ V V / __/ (_| |\ V /| | (_| | || __/
// \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
//
//
// CONTACT: hello@weaviate.io
//
package clients
import (
"bytes"
"context"
"crypto/sha256"
"encoding/json"
"fmt"
"io"
"net/http"
"time"
"github.com/weaviate/weaviate/entities/moduletools"
"github.com/weaviate/weaviate/usecases/modulecomponents"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/weaviate/weaviate/modules/text2vec-huggingface/ent"
)
const (
DefaultOrigin = "path_to_url"
DefaultPath = "pipeline/feature-extraction"
)
// there are no explicit rate limits: path_to_url#rate-limits
// so we set values that work and leave it up to the users to increase these values
const (
DefaultRPM = 100 //
DefaultTPM = 10000000 // no token limit
)
type embeddingsRequest struct {
Inputs []string `json:"inputs"`
Options *options `json:"options,omitempty"`
}
type options struct {
WaitForModel bool `json:"wait_for_model,omitempty"`
UseGPU bool `json:"use_gpu,omitempty"`
UseCache bool `json:"use_cache,omitempty"`
}
type embedding [][]float32
type embeddingBert [][][][]float32
type embeddingObject struct {
Embeddings embedding `json:"embeddings"`
}
type huggingFaceApiError struct {
Error string `json:"error"`
EstimatedTime *float32 `json:"estimated_time,omitempty"`
Warnings []string `json:"warnings"`
}
type vectorizer struct {
apiKey string
httpClient *http.Client
bertEmbeddingsDecoder *bertEmbeddingsDecoder
logger logrus.FieldLogger
}
func New(apiKey string, timeout time.Duration, logger logrus.FieldLogger) *vectorizer {
return &vectorizer{
apiKey: apiKey,
httpClient: &http.Client{
Timeout: timeout,
},
bertEmbeddingsDecoder: newBertEmbeddingsDecoder(),
logger: logger,
}
}
func (v *vectorizer) Vectorize(ctx context.Context, input []string,
cfg moduletools.ClassConfig,
) (*modulecomponents.VectorizationResult, *modulecomponents.RateLimits, error) {
config := v.getVectorizationConfig(cfg)
res, err := v.vectorize(ctx, v.getURL(config), input, v.getOptions(config))
return res, nil, err
}
func (v *vectorizer) VectorizeQuery(ctx context.Context, input []string,
cfg moduletools.ClassConfig,
) (*modulecomponents.VectorizationResult, error) {
config := v.getVectorizationConfig(cfg)
return v.vectorize(ctx, v.getURL(config), input, v.getOptions(config))
}
func (v *vectorizer) getVectorizationConfig(cfg moduletools.ClassConfig) ent.VectorizationConfig {
icheck := ent.NewClassSettings(cfg)
return ent.VectorizationConfig{
EndpointURL: icheck.EndpointURL(),
Model: icheck.PassageModel(),
WaitForModel: icheck.OptionWaitForModel(),
UseGPU: icheck.OptionUseGPU(),
UseCache: icheck.OptionUseCache(),
}
}
func (v *vectorizer) vectorize(ctx context.Context, url string,
input []string, options options,
) (*modulecomponents.VectorizationResult, error) {
body, err := json.Marshal(embeddingsRequest{
Inputs: input,
Options: &options,
})
if err != nil {
return nil, errors.Wrapf(err, "marshal body")
}
req, err := http.NewRequestWithContext(ctx, "POST", url,
bytes.NewReader(body))
if err != nil {
return nil, errors.Wrap(err, "create POST request")
}
if apiKey, err := v.getApiKey(ctx); apiKey != "" && err == nil {
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", apiKey))
}
req.Header.Add("Content-Type", "application/json")
res, err := v.httpClient.Do(req)
if err != nil {
return nil, errors.Wrap(err, "send POST request")
}
defer res.Body.Close()
bodyBytes, err := io.ReadAll(res.Body)
if err != nil {
return nil, errors.Wrap(err, "read response body")
}
if err := checkResponse(res, bodyBytes); err != nil {
return nil, err
}
vector, errs, err := v.decodeVector(bodyBytes)
if err != nil {
return nil, errors.Wrap(err, "cannot decode vector")
}
return &modulecomponents.VectorizationResult{
Text: input,
Dimensions: len(vector[0]),
Vector: vector,
Errors: errs,
}, nil
}
func checkResponse(res *http.Response, bodyBytes []byte) error {
if res.StatusCode < 400 {
return nil
}
var resBody huggingFaceApiError
if err := json.Unmarshal(bodyBytes, &resBody); err != nil {
return fmt.Errorf("unmarshal error response body: %v", string(bodyBytes))
}
message := fmt.Sprintf("failed with status: %d", res.StatusCode)
if resBody.Error != "" {
message = fmt.Sprintf("%s error: %v", message, resBody.Error)
if resBody.EstimatedTime != nil {
message = fmt.Sprintf("%s estimated time: %v", message, *resBody.EstimatedTime)
}
if len(resBody.Warnings) > 0 {
message = fmt.Sprintf("%s warnings: %v", message, resBody.Warnings)
}
}
if res.StatusCode == http.StatusInternalServerError {
message = fmt.Sprintf("connection to HuggingFace %v", message)
}
return errors.New(message)
}
func (v *vectorizer) decodeVector(bodyBytes []byte) ([][]float32, []error, error) {
var emb embedding
if err := json.Unmarshal(bodyBytes, &emb); err != nil {
var embObject embeddingObject
if err := json.Unmarshal(bodyBytes, &embObject); err != nil {
var embBert embeddingBert
if err := json.Unmarshal(bodyBytes, &embBert); err != nil {
return nil, nil, errors.Wrap(err, "unmarshal response body")
}
if len(embBert) == 1 && len(embBert[0]) > 0 {
vectors := make([][]float32, len(embBert[0]))
errs := make([]error, len(embBert[0]))
for i, embBer := range embBert[0] {
vectors[i], errs[i] = v.bertEmbeddingsDecoder.calculateVector(embBer)
}
return vectors, errs, nil
}
return nil, nil, errors.New("unprocessable response body")
}
if len(embObject.Embeddings) > 0 {
return embObject.Embeddings, nil, nil
}
return nil, nil, errors.New("unprocessable response body")
}
if len(emb) > 0 {
return emb, nil, nil
}
return nil, nil, errors.New("unprocessable response body")
}
func (v *vectorizer) GetApiKeyHash(ctx context.Context, config moduletools.ClassConfig) [32]byte {
key, err := v.getApiKey(ctx)
if err != nil {
return [32]byte{}
}
return sha256.Sum256([]byte(key))
}
func (v *vectorizer) GetVectorizerRateLimit(ctx context.Context, cfg moduletools.ClassConfig) *modulecomponents.RateLimits {
rpm, _ := modulecomponents.GetRateLimitFromContext(ctx, "Cohere", DefaultRPM, 0)
execAfterRequestFunction := func(limits *modulecomponents.RateLimits, tokensUsed int, deductRequest bool) {
// refresh is after 60 seconds but leave a bit of room for errors. Otherwise, we only deduct the request that just happened
if limits.LastOverwrite.Add(61 * time.Second).After(time.Now()) {
if deductRequest {
limits.RemainingRequests -= 1
}
return
}
limits.RemainingRequests = rpm
limits.ResetRequests = time.Now().Add(time.Duration(61) * time.Second)
limits.LimitRequests = rpm
limits.LastOverwrite = time.Now()
// high dummy values
limits.RemainingTokens = DefaultTPM
limits.LimitTokens = DefaultTPM
limits.ResetTokens = time.Now().Add(time.Duration(1) * time.Second)
}
initialRL := &modulecomponents.RateLimits{AfterRequestFunction: execAfterRequestFunction, LastOverwrite: time.Now().Add(-61 * time.Minute)}
initialRL.ResetAfterRequestFunction(0) // set initial values
return initialRL
}
func (v *vectorizer) getApiKey(ctx context.Context) (string, error) {
if apiKey := modulecomponents.GetValueFromContext(ctx, "X-Huggingface-Api-Key"); apiKey != "" {
return apiKey, nil
}
if v.apiKey != "" {
return v.apiKey, nil
}
return "", errors.New("no api key found " +
"neither in request header: X-Huggingface-Api-Key " +
"nor in environment variable under HUGGINGFACE_APIKEY")
}
func (v *vectorizer) getOptions(config ent.VectorizationConfig) options {
return options{
WaitForModel: config.WaitForModel,
UseGPU: config.UseGPU,
UseCache: config.UseCache,
}
}
func (v *vectorizer) getURL(config ent.VectorizationConfig) string {
if config.EndpointURL != "" {
return config.EndpointURL
}
return fmt.Sprintf("%s/%s/%s", DefaultOrigin, DefaultPath, config.Model)
}
```
|
```python
#
# 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.
#
"""Performance tests for file based io connectors."""
import logging
import sys
import uuid
from typing import Tuple
import apache_beam as beam
from apache_beam import typehints
from apache_beam.io.filesystems import FileSystems
from apache_beam.io.iobase import Read
from apache_beam.io.textio import ReadFromText
from apache_beam.io.textio import WriteToText
from apache_beam.testing.load_tests.load_test import LoadTest
from apache_beam.testing.load_tests.load_test import LoadTestOptions
from apache_beam.testing.load_tests.load_test_metrics_utils import CountMessages
from apache_beam.testing.load_tests.load_test_metrics_utils import MeasureTime
from apache_beam.testing.synthetic_pipeline import SyntheticSource
from apache_beam.testing.test_pipeline import TestPipeline
from apache_beam.testing.util import assert_that
from apache_beam.testing.util import equal_to
from apache_beam.transforms.util import Reshuffle
WRITE_NAMESPACE = 'write'
READ_NAMESPACE = 'read'
_LOGGER = logging.getLogger(__name__)
class FileBasedIOTestOptions(LoadTestOptions):
@classmethod
def _add_argparse_args(cls, parser):
parser.add_argument(
'--test_class', required=True, help='Test class to run.')
parser.add_argument(
'--filename_prefix',
required=True,
help='Destination prefix for files generated by the test.')
parser.add_argument(
'--compression_type',
default='auto',
help='File compression type for writing and reading test files.')
parser.add_argument(
'--number_of_shards',
type=int,
default=0,
help='Number of files this test will create during the write phase.')
parser.add_argument(
'--dataset_size',
type=int,
help='Size of data saved on the target filesystem (bytes).')
@typehints.with_output_types(bytes)
@typehints.with_input_types(Tuple[bytes, bytes])
class SyntheticRecordToStrFn(beam.DoFn):
"""
A DoFn that convert key-value bytes from synthetic source to string record.
It uses base64 to convert random bytes emitted from the synthetic source.
Therefore, every 3 bytes give 4 bytes long ascii characters.
Output length = 4(ceil[len(key)/3] + ceil[len(value)/3]) + 1
"""
def process(self, element):
import base64
yield base64.b64encode(element[0]) + b' ' + base64.b64encode(element[1])
class CreateFolderFn(beam.DoFn):
"""Create folder at pipeline runtime."""
def __init__(self, folder):
self.folder = folder
def process(self, element):
from apache_beam.io.filesystems import FileSystems # pylint: disable=reimported
filesystem = FileSystems.get_filesystem(self.folder)
if filesystem.has_dirs() and not filesystem.exists(self.folder):
filesystem.mkdirs(self.folder)
class TextIOPerfTest:
def run(self):
write_test = _TextIOWritePerfTest(need_cleanup=False)
read_test = _TextIOReadPerfTest(input_folder=write_test.output_folder)
write_test.run()
read_test.run()
class _TextIOWritePerfTest(LoadTest):
def __init__(self, need_cleanup=True):
super().__init__(WRITE_NAMESPACE)
self.need_cleanup = need_cleanup
self.test_options = self.pipeline.get_pipeline_options().view_as(
FileBasedIOTestOptions)
self.output_folder = FileSystems.join(
self.test_options.filename_prefix, str(uuid.uuid4()))
def test(self):
# first makedir if needed
_ = (
self.pipeline
| beam.Impulse()
| beam.ParDo(CreateFolderFn(self.output_folder)))
# write to text
_ = (
self.pipeline
| 'Produce rows' >> Read(
SyntheticSource(self.parse_synthetic_source_options()))
| 'Count records' >> beam.ParDo(CountMessages(self.metrics_namespace))
| 'Format' >> beam.ParDo(SyntheticRecordToStrFn())
| 'Avoid Fusion' >> Reshuffle()
| 'Measure time' >> beam.ParDo(MeasureTime(self.metrics_namespace))
| 'Write Text' >> WriteToText(
file_path_prefix=FileSystems.join(self.output_folder, 'test'),
compression_type=self.test_options.compression_type,
num_shards=self.test_options.number_of_shards))
def cleanup(self):
if not self.need_cleanup:
return
try:
FileSystems.delete([self.output_folder])
except IOError:
# may not have delete permission, just raise a warning
_LOGGER.warning(
'Unable to delete file %s during cleanup.', self.output_folder)
class _TextIOReadPerfTest(LoadTest):
def __init__(self, input_folder):
super().__init__(READ_NAMESPACE)
self.test_options = self.pipeline.get_pipeline_options().view_as(
FileBasedIOTestOptions)
self.input_folder = input_folder
def test(self):
output = (
self.pipeline
| 'Read from text' >>
ReadFromText(file_pattern=FileSystems.join(self.input_folder, '*'))
| 'Count records' >> beam.ParDo(CountMessages(self.metrics_namespace))
| 'Measure time' >> beam.ParDo(MeasureTime(self.metrics_namespace))
| 'Count' >> beam.combiners.Count.Globally())
assert_that(output, equal_to([self.input_options['num_records']]))
def cleanup(self):
try:
#FileSystems.delete([self.input_folder])
pass
except IOError:
# may not have delete permission, just raise a warning
_LOGGER.warning(
'Unable to delete file %s during cleanup.', self.input_folder)
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
test_options = TestPipeline().get_pipeline_options().view_as(
FileBasedIOTestOptions)
supported_test_classes = list(
filter(
lambda s: s.endswith('PerfTest') and not s.startswith('_'),
dir(sys.modules[__name__])))
if test_options.test_class not in supported_test_classes:
raise RuntimeError(
f'Test {test_options.test_class} not found. '
'Supported tests are {supported_test_classes}')
getattr(sys.modules[__name__], test_options.test_class)().run()
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.