text
stringlengths 1
22.8M
|
|---|
```objective-c
//
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing, software
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#pragma once
#include <map>
#include <mutex>
#include <string>
#include <thread>
#include <vector>
#include "paddle/phi/backends/dynload/cudnn_frontend.h"
PD_DECLARE_int32(cudnn_cache_saturation_count);
namespace phi {
namespace autotune {
class CudnnFrontendPlanCache {
public:
CudnnFrontendPlanCache() : cache_mutex_(new std::mutex()) {
map_.clear();
tracker_.clear();
saturation_count_ = FLAGS_cudnn_cache_saturation_count;
}
int64_t Size() const {
int64_t total_size = 0;
for (auto it = map_.begin(); it != map_.end(); it++) {
total_size += (it->second).size();
}
return total_size;
}
int64_t CacheHits() const { return cache_hits_; }
int64_t CacheMisses() const { return cache_misses_; }
float CacheHitRate() const {
int64_t num_accesses = cache_hits_ + cache_misses_;
float cache_hit_rate = 0.;
if (num_accesses != 0) {
cache_hit_rate =
static_cast<float>(cache_hits_) / static_cast<float>(num_accesses);
}
return cache_hit_rate;
}
void Clean() {
std::lock_guard<std::mutex> lock(*cache_mutex_);
map_.clear();
tracker_.clear();
cache_hits_ = 0;
cache_misses_ = 0;
}
bool FindPlan(const cudnn_frontend::feature_vector_t &feature,
cudnnHandle_t handle) {
bool ret = false;
std::lock_guard<std::mutex> lock(*cache_mutex_);
auto &local_map = map_[hasher(std::this_thread::get_id())];
if (local_map.count(GetExtendedFeature(feature, handle)) > 0) {
cache_hits_++;
ret = true;
} else {
cache_misses_++;
}
return ret;
}
void GetPlanAndWorkspaceSize(const cudnn_frontend::feature_vector_t &feature,
const cudnn_frontend::ExecutionPlan **plan,
int64_t *workspace_size,
cudnnHandle_t handle) {
// Note(tizheng): CUDNNv8 execution plan is not thread-safe.
// A shared plan being executed by different threads is
// generally not safe (for now).
std::lock_guard<std::mutex> lock(*cache_mutex_);
auto &local_map = map_[hasher(std::this_thread::get_id())];
auto it = local_map.find(GetExtendedFeature(feature, handle));
PADDLE_ENFORCE_NE(it,
local_map.end(),
common::errors::InvalidArgument(
"[cudnn_frontend] Cached Plan Not Found."));
*plan = &(it->second);
*workspace_size = (*plan)->getWorkspaceSize();
VLOG(4) << "Cached execution plan found." << (*plan)->getTag()
<< "; Require workspace: " << *workspace_size;
}
void InsertPlan(const cudnn_frontend::feature_vector_t &feature,
const cudnn_frontend::ExecutionPlan &plan,
cudnnHandle_t handle) {
VLOG(4) << "[cudnn_frontend] cache: Insert plan: " << plan.getTag();
std::lock_guard<std::mutex> lock(*cache_mutex_);
auto &local_map = map_[hasher(std::this_thread::get_id())];
local_map.insert(std::make_pair(GetExtendedFeature(feature, handle), plan));
}
bool IsStable(const cudnn_frontend::feature_vector_t &feature,
const std::string &tag,
cudnnHandle_t handle) {
if (saturation_count_ == 1) {
return true;
}
std::lock_guard<std::mutex> lock(*cache_mutex_);
auto &local_map = map_[hasher(std::this_thread::get_id())];
auto &local_tracker = tracker_[hasher(std::this_thread::get_id())];
auto ext_feature = GetExtendedFeature(feature, handle);
if (local_map.count(ext_feature)) {
return false;
}
int cnt = local_tracker[std::make_pair(ext_feature, tag)] += 1;
VLOG(4) << "[cudnn_frontend] SaturationTracker: " << tag << " " << cnt;
return cnt >= saturation_count_;
}
bool FindPlan(const cudnn_frontend::OperationGraph &op_graph,
cudnnHandle_t handle) {
return FindPlan(op_graph.getFeatureVector(), handle);
}
void GetPlanAndWorkspaceSize(const cudnn_frontend::OperationGraph &op_graph,
const cudnn_frontend::ExecutionPlan **plan,
int64_t *workspace_size,
cudnnHandle_t handle) {
GetPlanAndWorkspaceSize(
op_graph.getFeatureVector(), plan, workspace_size, handle);
}
void InsertPlan(const cudnn_frontend::OperationGraph &op_graph,
const cudnn_frontend::ExecutionPlan &plan,
cudnnHandle_t handle) {
InsertPlan(op_graph.getFeatureVector(), plan, handle);
}
bool IsStable(const cudnn_frontend::OperationGraph &op_graph,
const std::string &tag,
cudnnHandle_t handle) {
return IsStable(op_graph.getFeatureVector(), tag, handle);
}
private:
cudnn_frontend::feature_vector_t GetExtendedFeature(
cudnn_frontend::feature_vector_t feat, cudnnHandle_t handle) {
int64_t val = 0;
memcpy(&val, &handle, sizeof(int64_t));
feat.push_back(val);
return feat;
}
using FeatureVectorToPlanMap =
std::map<cudnn_frontend::feature_vector_t, cudnn_frontend::ExecutionPlan>;
std::map<std::size_t, FeatureVectorToPlanMap> map_;
std::hash<std::thread::id> hasher;
std::shared_ptr<std::mutex> cache_mutex_;
int saturation_count_;
using SaturationTracker =
std::map<std::pair<cudnn_frontend::feature_vector_t, std::string>, int>;
std::map<std::size_t, SaturationTracker> tracker_;
int64_t cache_hits_{0};
int64_t cache_misses_{0};
}; // class CudnnFrontendPlanCache
template <typename T>
inline void BuildFeatureVectorSingle(cudnn_frontend::feature_vector_t *v,
const T &value) {
v->push_back(static_cast<int64_t>(value));
}
template <>
inline void BuildFeatureVectorSingle(cudnn_frontend::feature_vector_t *v,
const float &value) {
int64_t val = 0;
memcpy(&val, &value, sizeof(float));
v->push_back(val);
}
template <>
inline void BuildFeatureVectorSingle<std::vector<int64_t>>(
cudnn_frontend::feature_vector_t *v, const std::vector<int64_t> &value) {
v->insert(v->end(), value.begin(), value.end());
}
template <>
inline void BuildFeatureVectorSingle<std::vector<int>>(
cudnn_frontend::feature_vector_t *v, const std::vector<int> &value) {
for (auto &val : value) {
v->push_back(static_cast<int64_t>(val));
}
}
template <>
inline void BuildFeatureVectorSingle<std::string>(
cudnn_frontend::feature_vector_t *v, const std::string &value) {
v->push_back(std::hash<std::string>()(value));
}
inline void BuildFeatureVector(cudnn_frontend::feature_vector_t *v) { return; }
template <typename T, typename... Args>
inline void BuildFeatureVector(cudnn_frontend::feature_vector_t *v,
const T &value,
Args... args) {
BuildFeatureVectorSingle(v, value);
BuildFeatureVector(v, args...);
}
} // namespace autotune
} // namespace phi
```
|
This is a list of weapons used by Czechoslovakia during its interwar period (1918–1938). These include weapons that were designed and manufactured in Czechoslovakia and Czechoslovak modifications to existing weapons, like the Schwarzlose machine gun. After the dissolution of the Second Czechoslovak Republic, many of these weapons saw combat in World War II: with the Axis Slovak Republic and with Nazi Germany after it occupied Czechoslovakia. These weapons also saw widespread use abroad after being sold off to international buyers.
Small arms
Pistols
Pistole vz. 22
Pistole vz. 24
ČZ vz. 27
ČZ vz. 38
Rifles
Vz. 98/22
Vz. 24
Vz. 33
ZH-29
Submachine guns
ZK-383
KP vz. 38
Machine guns
ZB vz. 26 (main inspiration for Bren gun alongside the updated ZB vz 30)
ZB vz. 30
Schwarzlose machine gun (Schwarzlose-Janeček vz.07/24 variant)
ZB-53 (main inspiration for Besa gun)
ZB-50
ZB-60 (main inspiration for Besa 15 mm heavy machine gun)
Mortars
8 cm minomet vz. 36
Artillery
Tank and Anti-tank guns
3,7cm KPÚV vz. 34 (main armament of Czechoslovak tank LT vz 34 and LT vz 35 the latter AKA Panzer 35(t))
4cm kanón vz. 36
3,7cm KPÚV vz. 37
3,7cm ÚV vz. 38 (main armament of Czechoslovak LT vz 38 tank AKA Panzer 38(t))
4,7cm KPÚV vz. 38 (gun of Panzerjager I)
Field guns and Mountain guns
Skoda 75 mm Model 1928
Skoda 75 mm Model 1936
Skoda 75 mm Model 1939
8 cm kanon vz. 28
8 cm kanon vz. 30
Skoda houfnice vz 14
Skoda 100 mm Model 16/19
10 cm houfnice vz. 28
10 cm houfnice vz. 30 (howitzer)
10.5 cm hruby kanon vz. 35
Skoda 105 mm Model 1939
Heavy artillery
15 cm hrubá houfnice vz. 25
Skoda K series
Skoda Model 1928 Gun
21 cm Mörser M. 16/18
21 cm Kanone 39
210 mm gun M1939 (Br-17)
Skoda 220 mm howitzer
24 cm Haubitze 39
305 mm howitzer M1939 (Br-18)
Anti-Aircraft artillery
2cm VKPL vz 36(Oerlikon 20 mm cannon)
7.5 cm kanon PL vz. 37
8 cm PL kanon vz. 37
8.35 cm PL kanon vz. 22
9 cm kanon PL vz. 12/20
Naval artillery
Skoda 14 cm/56 naval gun
Armoured fighting vehicles
Tanks
Kolohousenka
LT vz. 34
LT vz 35 (Panzer 35(t))
LT vz 38(Panzer 38(t))
ST vz 39 (commercial designation V-8-H)
Tankettes
Tančík vz. 33
Škoda MU-4
AH-IV
Armoured cars
OA vz. 27
OA vz. 30
See also
Battle of Czajánek's barracks
References
Military history of Czechoslovakia
Inter-war
|
```asciidoc
//
[[extendingvulkan]]
= Extending Vulkan
New functionality may: be added to Vulkan via either new extensions or new
versions of the core, or new versions of an extension in some cases.
This chapter describes how Vulkan is versioned, how compatibility is
affected between different versions, and compatibility rules that are
followed by the Vulkan Working Group.
[[extendingvulkan-instanceanddevicefunctionality]]
== Instance and Device Functionality
Commands that enumerate instance properties, or that accept a
slink:VkInstance object as a parameter, are considered instance-level
functionality.
Commands that dispatch from a slink:VkDevice object or a child object of a
slink:VkDevice, or take any of them as a parameter, are considered
device-level functionality.
Types defined by a <<extendingvulkan-device-extensions,device extension>>
are also considered device-level functionality.
Commands that dispatch from slink:VkPhysicalDevice, or accept a
slink:VkPhysicalDevice object as a parameter, are considered either
instance-level or device-level functionality depending if the functionality
is specified by an <<extendingvulkan-instance-extensions,instance
extension>> or <<extendingvulkan-device-extensions,device extension>>
respectively.
ifdef::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
Additionally, commands that enumerate physical device properties are
considered device-level functionality.
endif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
ifdef::VK_VERSION_1_1[]
[NOTE]
====
Applications usually interface to Vulkan using a loader that implements only
instance-level functionality, passing device-level functionality to
implementations of the full Vulkan API on the system.
In some circumstances, as these may be implemented independently, it is
possible that the loader and device implementations on a given installation
will support different versions.
To allow for this and call out when it happens, the Vulkan specification
enumerates device and instance level functionality separately - they have
<<extendingvulkan-coreversions-queryingversionsupport,independent version
queries>>.
====
endif::VK_VERSION_1_1[]
ifdef::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
[NOTE]
====
Vulkan 1.0 initially specified new physical device enumeration functionality
as instance-level, requiring it to be included in an instance extension.
As the capabilities of device-level functionality require discovery via
physical device enumeration, this led to the situation where many device
extensions required an instance extension as well.
To alleviate this extra work,
`apiext:VK_KHR_get_physical_device_properties2` (and subsequently Vulkan
1.1) redefined device-level functionality to include physical device
enumeration.
====
endif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
[[extendingvulkan-coreversions]]
== Core Versions
The Vulkan Specification is regularly updated with bug fixes and
clarifications.
Occasionally new functionality is added to the core and at some point it is
expected that there will be a desire to perform a large, breaking change to
the API.
In order to indicate to developers how and when these changes are made to
the specification, and to provide a way to identify each set of changes, the
Vulkan API maintains a version number.
[[extendingvulkan-coreversions-versionnumbers]]
=== Version Numbers
The Vulkan version number comprises four parts indicating the variant,
major, minor and patch version of the Vulkan API Specification.
The _variant_ indicates the variant of the Vulkan API supported by the
implementation.
ifndef::VKSC_VERSION_1_0[]
This is always 0 for the Vulkan API.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
This is always 1 for the Vulkan SC API.
The Base Vulkan API is variant 0.
endif::VKSC_VERSION_1_0[]
[NOTE]
====
A non-zero variant indicates the API is a variant of the Vulkan API and
applications will typically need to be modified to run against it.
The variant field was a later addition to the version number, added in
version 1.2.175 of the
ifdef::VKSC_VERSION_1_0[Base Vulkan]
Specification.
ifndef::VKSC_VERSION_1_0[]
As Vulkan uses variant 0, this change is fully backwards compatible with the
previous version number format for Vulkan implementations.
New version number macros have been added for this change and the old macros
deprecated.
For existing applications using the older format and macros, an
implementation with non-zero variant will decode as a very high Vulkan
version.
The high version number should be detectable by applications performing
suitable version checking.
endif::VKSC_VERSION_1_0[]
====
The _major version_ indicates a significant change in the API, which will
encompass a wholly new version of the specification.
The _minor version_ indicates the incorporation of new functionality into
the core specification.
The _patch version_ indicates bug fixes, clarifications, and language
improvements have been incorporated into the specification.
Compatibility guarantees made about versions of the API sharing any of the
same version numbers are documented in
<<extendingvulkan-compatibility-coreversions>>
The version number is used in several places in the API.
In each such use, the version numbers are packed into a 32-bit integer as
follows:
* The variant is a 3-bit integer packed into bits 31-29.
* The major version is a 7-bit integer packed into bits 28-22.
* The minor version number is a 10-bit integer packed into bits 21-12.
* The patch version number is a 12-bit integer packed into bits 11-0.
[open,refpage='VK_API_VERSION_VARIANT',desc='Extract API variant number',type='defines']
--
dname:VK_API_VERSION_VARIANT extracts the API variant number from a packed
version number:
include::{generated}/api/defines/VK_API_VERSION_VARIANT.adoc[]
--
[open,refpage='VK_API_VERSION_MAJOR',desc='Extract API major version number',type='defines']
--
dname:VK_API_VERSION_MAJOR extracts the API major version number from a
packed version number:
include::{generated}/api/defines/VK_API_VERSION_MAJOR.adoc[]
--
ifndef::VKSC_VERSION_1_0[]
[open,refpage='VK_VERSION_MAJOR',desc='Extract API major version number',type='defines']
--
dname:VK_VERSION_MAJOR extracts the API major version number from a packed
version number:
include::{generated}/api/defines/VK_VERSION_MAJOR.adoc[]
--
endif::VKSC_VERSION_1_0[]
[open,refpage='VK_API_VERSION_MINOR',desc='Extract API minor version number',type='defines']
--
dname:VK_API_VERSION_MINOR extracts the API minor version number from a
packed version number:
include::{generated}/api/defines/VK_API_VERSION_MINOR.adoc[]
--
ifndef::VKSC_VERSION_1_0[]
[open,refpage='VK_VERSION_MINOR',desc='Extract API minor version number',type='defines']
--
dname:VK_VERSION_MINOR extracts the API minor version number from a packed
version number:
include::{generated}/api/defines/VK_VERSION_MINOR.adoc[]
--
endif::VKSC_VERSION_1_0[]
[open,refpage='VK_API_VERSION_PATCH',desc='Extract API patch version number',type='defines']
--
dname:VK_API_VERSION_PATCH extracts the API patch version number from a
packed version number:
include::{generated}/api/defines/VK_API_VERSION_PATCH.adoc[]
--
ifndef::VKSC_VERSION_1_0[]
[open,refpage='VK_VERSION_PATCH',desc='Extract API patch version number',type='defines']
--
dname:VK_VERSION_PATCH extracts the API patch version number from a packed
version number:
include::{generated}/api/defines/VK_VERSION_PATCH.adoc[]
--
endif::VKSC_VERSION_1_0[]
[open,refpage='VK_MAKE_API_VERSION',desc='Construct an API version number',type='defines',xrefs='VkApplicationInfo vkCreateInstance']
--
dname:VK_MAKE_API_VERSION constructs an API version number.
include::{generated}/api/defines/VK_MAKE_API_VERSION.adoc[]
* pname:variant is the variant number.
* pname:major is the major version number.
* pname:minor is the minor version number.
* pname:patch is the patch version number.
--
ifndef::VKSC_VERSION_1_0[]
[open,refpage='VK_MAKE_VERSION',desc='Construct an API version number',type='defines',xrefs='VkApplicationInfo vkCreateInstance']
--
dname:VK_MAKE_VERSION constructs an API version number.
include::{generated}/api/defines/VK_MAKE_VERSION.adoc[]
* pname:major is the major version number.
* pname:minor is the minor version number.
* pname:patch is the patch version number.
--
endif::VKSC_VERSION_1_0[]
[open,refpage='VK_API_VERSION_1_0',desc='Return API version number for Vulkan 1.0',type='defines',xrefs='vkCreateInstance vkGetPhysicalDeviceProperties']
--
dname:VK_API_VERSION_1_0 returns the API version number for Vulkan 1.0.0.
include::{generated}/api/defines/VK_API_VERSION_1_0.adoc[]
--
ifdef::VK_VERSION_1_1[]
[open,refpage='VK_API_VERSION_1_1',desc='Return API version number for Vulkan 1.1',type='defines',xrefs='vkCreateInstance vkGetPhysicalDeviceProperties']
--
dname:VK_API_VERSION_1_1 returns the API version number for Vulkan 1.1.0.
include::{generated}/api/defines/VK_API_VERSION_1_1.adoc[]
--
endif::VK_VERSION_1_1[]
ifdef::VK_VERSION_1_2[]
[open,refpage='VK_API_VERSION_1_2',desc='Return API version number for Vulkan 1.2',type='defines',xrefs='vkCreateInstance vkGetPhysicalDeviceProperties']
--
dname:VK_API_VERSION_1_2 returns the API version number for Vulkan 1.2.0.
include::{generated}/api/defines/VK_API_VERSION_1_2.adoc[]
--
endif::VK_VERSION_1_2[]
ifdef::VK_VERSION_1_3[]
[open,refpage='VK_API_VERSION_1_3',desc='Return API version number for Vulkan 1.3',type='defines',xrefs='vkCreateInstance vkGetPhysicalDeviceProperties']
--
dname:VK_API_VERSION_1_3 returns the API version number for Vulkan 1.3.0.
include::{generated}/api/defines/VK_API_VERSION_1_3.adoc[]
--
endif::VK_VERSION_1_3[]
ifdef::VKSC_VERSION_1_0[]
[open,refpage='VKSC_API_VARIANT',desc='Returns the API variant number for Vulkan SC',type='defines']
--
dname:VKSC_API_VARIANT returns the API variant number for Vulkan SC.
include::{generated}/api/defines/VKSC_API_VARIANT.adoc[]
--
[open,refpage='VKSC_API_VERSION_1_0',desc='Return API version number for Vulkan SC 1.0',type='defines',xrefs='vkCreateInstance vkGetPhysicalDeviceProperties']
--
dname:VKSC_API_VERSION_1_0 returns the API version number for Vulkan SC
1.0.0.
include::{generated}/api/defines/VKSC_API_VERSION_1_0.adoc[]
--
endif::VKSC_VERSION_1_0[]
[[extendingvulkan-coreversions-queryingversionsupport]]
=== Querying Version Support
ifndef::VK_VERSION_1_1[]
[NOTE]
====
In Vulkan 1.0, there is no mechanism to detect the separate versions of
<<extendingvulkan-instanceanddevicefunctionality,instance-level and
device-level functionality>> supported.
However, the fname:vkEnumerateInstanceVersion command was added in Vulkan
1.1 to determine the supported version of instance-level functionality -
querying for this function via flink:vkGetInstanceProcAddr will return
`NULL` on implementations that only support Vulkan 1.0 functionality.
For more information on this, please refer to the Vulkan 1.1 specification.
====
endif::VK_VERSION_1_1[]
ifdef::VK_VERSION_1_1[]
The version of instance-level functionality can be queried by calling
flink:vkEnumerateInstanceVersion.
endif::VK_VERSION_1_1[]
The version of device-level functionality can be queried by calling
flink:vkGetPhysicalDeviceProperties
ifdef::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
or flink:vkGetPhysicalDeviceProperties2,
endif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
and is returned in slink:VkPhysicalDeviceProperties::pname:apiVersion,
encoded as described in <<extendingvulkan-coreversions-versionnumbers>>.
[[extendingvulkan-layers]]
== Layers
When a layer is enabled, it inserts itself into the call chain for Vulkan
commands the layer is interested in.
Layers can: be used for a variety of tasks that extend the base behavior of
Vulkan beyond what is required by the specification - such as call logging,
tracing, validation, or providing additional extensions.
[NOTE]
====
For example, an implementation is not expected to check that the value of
enums used by the application fall within allowed ranges.
Instead, a validation layer would do those checks and flag issues.
This avoids a performance penalty during production use of the application
because those layers would not be enabled in production.
====
[NOTE]
====
Vulkan layers may: wrap object handles (i.e. return a different handle value
to the application than that generated by the implementation).
This is generally discouraged, as it increases the probability of
incompatibilities with new extensions.
The validation layers wrap handles in order to track the proper use and
destruction of each object.
See the <<LoaderInterfaceArchitecture, "`Architecture of the Vulkan Loader
Interfaces`">> document for additional information.
====
[open,refpage='vkEnumerateInstanceLayerProperties',desc='Returns up to requested number of global layer properties',type='protos']
--
To query the available layers, call:
include::{generated}/api/protos/vkEnumerateInstanceLayerProperties.adoc[]
* pname:pPropertyCount is a pointer to an integer related to the number of
layer properties available or queried, as described below.
* pname:pProperties is either `NULL` or a pointer to an array of
slink:VkLayerProperties structures.
If pname:pProperties is `NULL`, then the number of layer properties
available is returned in pname:pPropertyCount.
Otherwise, pname:pPropertyCount must: point to a variable set by the
application to the number of elements in the pname:pProperties array, and on
return the variable is overwritten with the number of structures actually
written to pname:pProperties.
If pname:pPropertyCount is less than the number of layer properties
available, at most pname:pPropertyCount structures will be written, and
ename:VK_INCOMPLETE will be returned instead of ename:VK_SUCCESS, to
indicate that not all the available properties were returned.
The list of available layers may change at any time due to actions outside
of the Vulkan implementation, so two calls to
fname:vkEnumerateInstanceLayerProperties with the same parameters may:
return different results, or retrieve different pname:pPropertyCount values
or pname:pProperties contents.
Once an instance has been created, the layers enabled for that instance will
continue to be enabled and valid for the lifetime of that instance, even if
some of them become unavailable for future instances.
include::{generated}/validity/protos/vkEnumerateInstanceLayerProperties.adoc[]
--
[open,refpage='VkLayerProperties',desc='Structure specifying layer properties',type='structs']
--
The sname:VkLayerProperties structure is defined as:
include::{generated}/api/structs/VkLayerProperties.adoc[]
* pname:layerName is an array of ename:VK_MAX_EXTENSION_NAME_SIZE
code:char containing a null-terminated UTF-8 string which is the name of
the layer.
Use this name in the pname:ppEnabledLayerNames array passed in the
slink:VkInstanceCreateInfo structure to enable this layer for an
instance.
* pname:specVersion is the Vulkan version the layer was written to,
encoded as described in <<extendingvulkan-coreversions-versionnumbers>>.
* pname:implementationVersion is the version of this layer.
It is an integer, increasing with backward compatible changes.
* pname:description is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char
containing a null-terminated UTF-8 string which provides additional
details that can: be used by the application to identify the layer.
include::{generated}/validity/structs/VkLayerProperties.adoc[]
--
[open,refpage='VK_MAX_EXTENSION_NAME_SIZE',desc='Maximum length of a layer of extension name string',type='consts']
--
ename:VK_MAX_EXTENSION_NAME_SIZE is the length in code:char values of an
array containing a layer or extension name string, as returned in
slink:VkLayerProperties::pname:layerName,
slink:VkExtensionProperties::pname:extensionName, and other queries.
include::{generated}/api/enums/VK_MAX_EXTENSION_NAME_SIZE.adoc[]
--
[open,refpage='VK_MAX_DESCRIPTION_SIZE',desc='Length of a driver name string',type='consts']
--
ename:VK_MAX_DESCRIPTION_SIZE is the length in code:char values of an array
containing a string with additional descriptive information about a query,
as returned in slink:VkLayerProperties::pname:description and other queries.
include::{generated}/api/enums/VK_MAX_DESCRIPTION_SIZE.adoc[]
--
To enable a layer, the name of the layer should: be added to the
pname:ppEnabledLayerNames member of slink:VkInstanceCreateInfo when creating
a sname:VkInstance.
Loader implementations may: provide mechanisms outside the Vulkan API for
enabling specific layers.
Layers enabled through such a mechanism are _implicitly enabled_, while
layers enabled by including the layer name in the pname:ppEnabledLayerNames
member of slink:VkInstanceCreateInfo are _explicitly enabled_.
Implicitly enabled layers are loaded before explicitly enabled layers, such
that implicitly enabled layers are closer to the application, and explicitly
enabled layers are closer to the driver.
Except where otherwise specified, implicitly enabled and explicitly enabled
layers differ only in the way they are enabled, and the order in which they
are loaded.
Explicitly enabling a layer that is implicitly enabled results in this layer
being loaded as an implicitly enabled layer; it has no additional effect.
[[extendingvulkan-layers-devicelayerdeprecation]]
=== Device Layer Deprecation
Previous versions of this specification distinguished between instance and
device layers.
Instance layers were only able to intercept commands that operate on
sname:VkInstance and sname:VkPhysicalDevice, except they were not able to
intercept flink:vkCreateDevice.
Device layers were enabled for individual devices when they were created,
and could only intercept commands operating on that device or its child
objects.
Device-only layers are now deprecated, and this specification no longer
distinguishes between instance and device layers.
Layers are enabled during instance creation, and are able to intercept all
commands operating on that instance or any of its child objects.
At the time of deprecation there were no known device-only layers and no
compelling reason to create one.
ifndef::VKSC_VERSION_1_0[]
In order to maintain compatibility with implementations released prior to
device-layer deprecation, applications should: still enumerate and enable
device layers.
The behavior of fname:vkEnumerateDeviceLayerProperties and valid usage of
the pname:ppEnabledLayerNames member of slink:VkDeviceCreateInfo maximizes
compatibility with applications written to work with the previous
requirements.
endif::VKSC_VERSION_1_0[]
[open,refpage='vkEnumerateDeviceLayerProperties',desc='Returns properties of available physical device layers',type='protos']
--
:refpage: vkEnumerateDeviceLayerProperties
To enumerate device layers, call:
include::{generated}/api/protos/vkEnumerateDeviceLayerProperties.adoc[]
* pname:physicalDevice is the physical device that will be queried.
* pname:pPropertyCount is a pointer to an integer related to the number of
layer properties available or queried.
* pname:pProperties is either `NULL` or a pointer to an array of
slink:VkLayerProperties structures.
ifndef::VKSC_VERSION_1_0[]
If pname:pProperties is `NULL`, then the number of layer properties
available is returned in pname:pPropertyCount.
Otherwise, pname:pPropertyCount must: point to a variable set by the
application to the number of elements in the pname:pProperties array, and on
return the variable is overwritten with the number of structures actually
written to pname:pProperties.
If pname:pPropertyCount is less than the number of layer properties
available, at most pname:pPropertyCount structures will be written, and
ename:VK_INCOMPLETE will be returned instead of ename:VK_SUCCESS, to
indicate that not all the available properties were returned.
The list of layers enumerated by fname:vkEnumerateDeviceLayerProperties
must: be exactly the sequence of layers enabled for the instance.
The members of sname:VkLayerProperties for each enumerated layer must: be
the same as the properties when the layer was enumerated by
fname:vkEnumerateInstanceLayerProperties.
[NOTE]
====
Due to platform details on Android, fname:vkEnumerateDeviceLayerProperties
may be called with pname:physicalDevice equal to `NULL` during layer
discovery.
This behavior will only be observed by layer implementations, and not the
underlying Vulkan driver.
====
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
Physical device layers are not supported.
pname:pPropertyCount is set to `0` and ename:VK_SUCCESS is returned.
endif::VKSC_VERSION_1_0[]
include::{generated}/validity/protos/vkEnumerateDeviceLayerProperties.adoc[]
--
The pname:ppEnabledLayerNames and pname:enabledLayerCount members of
slink:VkDeviceCreateInfo are deprecated and their values must: be ignored by
implementations.
ifndef::VKSC_VERSION_1_0[]
However, for compatibility, only an empty list of layers or a list that
exactly matches the sequence enabled at instance creation time are valid,
and validation layers should: issue diagnostics for other cases.
Regardless of the enabled layer list provided in slink:VkDeviceCreateInfo,
the
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[The]
sequence of layers active for a device will be exactly the sequence of
layers enabled when the parent instance was created.
[[extendingvulkan-extensions]]
== Extensions
Extensions may: define new Vulkan commands, structures, and enumerants.
For compilation purposes, the interfaces defined by registered extensions,
including new structures and enumerants as well as function pointer types
for new commands, are defined in the Khronos-supplied `{core_header}`
together with the core API.
However, commands defined by extensions may: not be available for static
linking - in which case function pointers to these commands should: be
queried at runtime as described in <<initialization-functionpointers>>.
Extensions may: be provided by layers as well as by a Vulkan implementation.
Because extensions may: extend or change the behavior of the Vulkan API,
extension authors should: add support for their extensions to the Khronos
validation layers.
This is especially important for new commands whose parameters have been
wrapped by the validation layers.
See the <<LoaderInterfaceArchitecture, "`Architecture of the Vulkan Loader
Interfaces`">> document for additional information.
[NOTE]
====
To enable an instance extension, the name of the extension can: be added to
the pname:ppEnabledExtensionNames member of slink:VkInstanceCreateInfo when
creating a sname:VkInstance.
To enable a device extension, the name of the extension can: be added to the
pname:ppEnabledExtensionNames member of slink:VkDeviceCreateInfo when
creating a sname:VkDevice.
ifdef::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
Physical-Device-Level functionality does not have any enabling mechanism and
can: be used as long as the slink:VkPhysicalDevice supports the device
extension as determined by flink:vkEnumerateDeviceExtensionProperties.
endif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
Enabling an extension (with no further use of that extension) does not
change the behavior of functionality exposed by the core Vulkan API or any
other extension, other than making valid the use of the commands, enums and
structures defined by that extension.
Valid Usage sections for individual commands and structures do not currently
contain which extensions have to be enabled in order to make their use
valid, although they might do so in the future.
It is defined only in the <<fundamentals-validusage-extensions>> section.
====
[[extendingvulkan-instance-extensions]]
=== Instance Extensions
Instance extensions add new
<<extendingvulkan-instanceanddevicefunctionality,instance-level
functionality>> to the API, outside of the core specification.
[open,refpage='vkEnumerateInstanceExtensionProperties',desc='Returns up to requested number of global extension properties',type='protos']
--
To query the available instance extensions, call:
include::{generated}/api/protos/vkEnumerateInstanceExtensionProperties.adoc[]
* pname:pLayerName is either `NULL` or a pointer to a null-terminated
UTF-8 string naming the layer to retrieve extensions from.
* pname:pPropertyCount is a pointer to an integer related to the number of
extension properties available or queried, as described below.
* pname:pProperties is either `NULL` or a pointer to an array of
slink:VkExtensionProperties structures.
When pname:pLayerName parameter is `NULL`, only extensions provided by the
Vulkan implementation or by implicitly enabled layers are returned.
When pname:pLayerName is the name of a layer, the instance extensions
provided by that layer are returned.
If pname:pProperties is `NULL`, then the number of extensions properties
available is returned in pname:pPropertyCount.
Otherwise, pname:pPropertyCount must: point to a variable set by the
application to the number of elements in the pname:pProperties array, and on
return the variable is overwritten with the number of structures actually
written to pname:pProperties.
If pname:pPropertyCount is less than the number of extension properties
available, at most pname:pPropertyCount structures will be written, and
ename:VK_INCOMPLETE will be returned instead of ename:VK_SUCCESS, to
indicate that not all the available properties were returned.
Because the list of available layers may change externally between calls to
flink:vkEnumerateInstanceExtensionProperties, two calls may retrieve
different results if a pname:pLayerName is available in one call but not in
another.
The extensions supported by a layer may also change between two calls, e.g.
if the layer implementation is replaced by a different version between those
calls.
Implementations must: not advertise any pair of extensions that cannot be
enabled together due to behavioral differences, or any extension that cannot
be enabled against the advertised version.
include::{generated}/validity/protos/vkEnumerateInstanceExtensionProperties.adoc[]
--
[[extendingvulkan-device-extensions]]
=== Device Extensions
Device extensions add new
<<extendingvulkan-instanceanddevicefunctionality,device-level
functionality>> to the API, outside of the core specification.
[open,refpage='vkEnumerateDeviceExtensionProperties',desc='Returns properties of available physical device extensions',type='protos']
--
:refpage: vkEnumerateDeviceExtensionProperties
To query the extensions available to a given physical device, call:
include::{generated}/api/protos/vkEnumerateDeviceExtensionProperties.adoc[]
* pname:physicalDevice is the physical device that will be queried.
* pname:pLayerName is either `NULL` or a pointer to a null-terminated
UTF-8 string naming the layer to retrieve extensions from.
* pname:pPropertyCount is a pointer to an integer related to the number of
extension properties available or queried, and is treated in the same
fashion as the
flink:vkEnumerateInstanceExtensionProperties::pname:pPropertyCount
parameter.
* pname:pProperties is either `NULL` or a pointer to an array of
slink:VkExtensionProperties structures.
When pname:pLayerName parameter is `NULL`, only extensions provided by the
Vulkan implementation or by implicitly enabled layers are returned.
When pname:pLayerName is the name of a layer, the device extensions provided
by that layer are returned.
Implementations must: not advertise any pair of extensions that cannot be
enabled together due to behavioral differences, or any extension that cannot
be enabled against the advertised version.
ifdef::VK_VERSION_1_3[]
Implementations claiming support for the <<roadmap-2022, Roadmap 2022>>
profile must: advertise the `apiext:VK_KHR_global_priority` extension in
pname:pProperties.
Implementations claiming support for the <<roadmap-2024, Roadmap 2024>>
profile must: advertise the following extensions in pname:pProperties:
* apiext:VK_KHR_dynamic_rendering_local_read
* apiext:VK_KHR_load_store_op_none
* apiext:VK_KHR_shader_quad_control
* apiext:VK_KHR_shader_maximal_reconvergence
* apiext:VK_KHR_shader_subgroup_uniform_control_flow
* apiext:VK_KHR_shader_subgroup_rotate
* apiext:VK_KHR_shader_float_controls2
* apiext:VK_KHR_shader_expect_assume
* apiext:VK_KHR_line_rasterization
* apiext:VK_KHR_vertex_attribute_divisor
* apiext:VK_KHR_index_type_uint8
* apiext:VK_KHR_map_memory2
* apiext:VK_KHR_maintenance5
* apiext:VK_KHR_push_descriptor
endif::VK_VERSION_1_3[]
[NOTE]
====
Due to platform details on Android,
fname:vkEnumerateDeviceExtensionProperties may be called with
pname:physicalDevice equal to `NULL` during layer discovery.
This behavior will only be observed by layer implementations, and not the
underlying Vulkan driver.
====
include::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
include::{generated}/validity/protos/vkEnumerateDeviceExtensionProperties.adoc[]
--
[open,refpage='VkExtensionProperties',desc='Structure specifying an extension properties',type='structs']
--
The sname:VkExtensionProperties structure is defined as:
include::{generated}/api/structs/VkExtensionProperties.adoc[]
* pname:extensionName is an array of ename:VK_MAX_EXTENSION_NAME_SIZE
code:char containing a null-terminated UTF-8 string which is the name of
the extension.
* pname:specVersion is the version of this extension.
It is an integer, incremented with backward compatible changes.
include::{generated}/validity/structs/VkExtensionProperties.adoc[]
--
[[extendingvulkan-accessing-device-physical-device]]
==== Accessing Device-Level Functionality From a slink:VkPhysicalDevice
Some device extensions also add support for physical-device-level
functionality.
Physical-device-level functionality can: be used, if the required extension
is supported as advertised by flink:vkEnumerateDeviceExtensionProperties for
a given slink:VkPhysicalDevice.
[[extendingvulkan-accessing-device-logical-device]]
==== Accessing Device-Level Functionality From a slink:VkDevice
For commands that are dispatched from a slink:VkDevice, or from a child
object of a slink:VkDevice, device extensions must: be enabled in
flink:vkCreateDevice.
[[extendingvulkan-extensions-extensiondependencies]]
== Extension Dependencies
Some extensions are dependent on other extensions, or on specific core API
versions, to function.
To enable extensions with dependencies, any _required extensions_ must: also
be enabled through the same API mechanisms when creating an instance with
flink:vkCreateInstance or a device with flink:vkCreateDevice.
Each extension which has such dependencies documents them in the
<<extensions, appendix summarizing that extension>>.
If an extension is supported (as queried by
flink:vkEnumerateInstanceExtensionProperties or
flink:vkEnumerateDeviceExtensionProperties), then _required extensions_ of
that extension must: also be supported for the same instance or physical
device.
Any device extension that has an instance extension dependency that is not
enabled by flink:vkCreateInstance is considered to be unsupported, hence it
must: not be returned by flink:vkEnumerateDeviceExtensionProperties for any
slink:VkPhysicalDevice child of the instance.
Instance extensions do not have dependencies on device extensions.
If a required extension has been <<extendingvulkan-compatibility-promotion,
promoted>> to another extension or to a core API version, then as a
_general_ rule, the dependency is also satisfied by the promoted extension
or core version.
This will be true so long as any features required by the original extension
are also required or enabled by the promoted extension or core version.
However, in some cases an extension is promoted while making some of its
features optional in the promoted extension or core version.
In this case, the dependency may: not be satisfied.
The only way to be certain is to look at the descriptions of the original
dependency and the promoted version in the <<extensions, Layers &
Extensions>> and <<versions, Core Revisions>> appendices.
[NOTE]
====
There is metadata in `vk.xml` describing some aspects of promotion,
especially `requires`, `promotedto` and `deprecatedby` attributes of
`<extension>` tags.
However, the metadata does not yet fully describe this scenario.
In the future, we may extend the XML schema to describe the full set of
extensions and versions satisfying a dependency.
As discussed in more detail for <<extendingvulkan-compatibility-promotion,
Promotion>> below, when an extension is promoted it does not mean that a
mechanical substitution of an extension API by the corresponding promoted
API will work in exactly the same fashion; be supported at runtime; or even
exist.
====
== Compatibility Guarantees (Informative)
This section is marked as informal as there is no binding responsibility on
implementations of the Vulkan API - these guarantees are however a contract
between the Vulkan Working Group and developers using this Specification.
[[extendingvulkan-compatibility-coreversions]]
=== Core Versions
Each of the <<extendingvulkan-coreversions,major, minor, and patch
versions>> of the Vulkan specification provide different compatibility
guarantees.
==== Patch Versions
A difference in the patch version indicates that a set of bug fixes or
clarifications have been made to the Specification.
Informative enums returned by Vulkan commands that will not affect the
runtime behavior of a valid application may be added in a patch version
(e.g. elink:VkVendorId).
The specification's patch version is strictly increasing for a given major
version of the specification; any change to a specification as described
above will result in the patch version being increased by 1.
Patch versions are applied to all minor versions, even if a given minor
version is not affected by the provoking change.
Specifications with different patch versions but the same major and minor
version are _fully compatible_ with each other - such that a valid
application written against one will work with an implementation of another.
[NOTE]
====
If a patch version includes a bug fix or clarification that could have a
significant impact on developer expectations, these will be highlighted in
the change log.
Generally the Vulkan Working Group tries to avoid these kinds of changes,
instead fixing them in either an extension or core version.
====
==== Minor Versions
Changes in the minor version of the specification indicate that new
functionality has been added to the core specification.
This will usually include new interfaces in the header, and may: also
include behavior changes and bug fixes.
Core functionality may: be deprecated in a minor version, but will not be
obsoleted or removed.
The specification's minor version is strictly increasing for a given major
version of the specification; any change to a specification as described
above will result in the minor version being increased by 1.
Changes that can be accommodated in a patch version will not increase the
minor version.
Specifications with a lower minor version are _backwards compatible_ with an
implementation of a specification with a higher minor version for core
functionality and extensions issued with the KHR vendor tag.
Vendor and multi-vendor extensions are not guaranteed to remain functional
across minor versions, though in general they are with few exceptions - see
<<extendingvulkan-compatibility-obsoletion>> for more information.
==== Major Versions
A difference in the major version of specifications indicates a large set of
changes which will likely include interface changes, behavioral changes,
removal of <<extendingvulkan-compatibility-deprecation,deprecated
functionality>>, and the modification, addition, or replacement of other
functionality.
The specification's major version is monotonically increasing; any change to
the specification as described above will result in the major version being
increased.
Changes that can be accommodated in a patch or minor version will not
increase the major version.
The Vulkan Working Group intends to only issue a new major version of the
Specification in order to realize significant improvements to the Vulkan API
that will necessarily require breaking compatibility.
A new major version will likely include a wholly new version of the
specification to be issued - which could include an overhaul of the
versioning semantics for the minor and patch versions.
The patch and minor versions of a specification are therefore not meaningful
across major versions.
If a major version of the specification includes similar versioning
semantics, it is expected that the patch and the minor version will be reset
to 0 for that major version.
[[extendingvulkan-compatibility-extensions]]
=== Extensions
A KHR extension must: be able to be enabled alongside any other KHR
extension, and for any minor or patch version of the core Specification
beyond the minimum version it requires.
A multi-vendor extension should: be able to be enabled alongside any KHR
extension or other multi-vendor extension, and for any minor or patch
version of the core Specification beyond the minimum version it requires.
A vendor extension should: be able to be enabled alongside any KHR
extension, multi-vendor extension, or other vendor extension from the same
vendor, and for any minor or patch version of the core Specification beyond
the minimum version it requires.
A vendor extension may: be able to be enabled alongside vendor extensions
from another vendor.
The one other exception to this is if a vendor or multi-vendor extension is
<<extendingvulkan-compatibility-obsoletion, made obsolete>> by either a core
version or another extension, which will be highlighted in the
<<extensions,extension appendix>>.
[[extendingvulkan-compatibility-promotion]]
==== Promotion
Extensions, or features of an extension, may: be promoted to a new
<<versions,core version of the API>>, or a newer extension which an equal or
greater number of implementors are in favor of.
When extension functionality is promoted, minor changes may: be introduced,
limited to the following:
* Naming
* Non-intrusive parameter changes
* <<features, Feature advertisement/enablement>>
* Combining structure parameters into larger structures
* Author ID suffixes changed or removed
[NOTE]
====
If extension functionality is promoted, there is no guarantee of direct
compatibility, however it should require little effort to port code from the
original feature to the promoted one.
The Vulkan Working Group endeavors to ensure that larger changes are marked
as either <<extendingvulkan-compatibility-deprecation, deprecated>> or
<<extendingvulkan-compatibility-obsoletion, obsoleted>> as appropriate, and
can do so retroactively if necessary.
====
Extensions that are promoted are listed as being promoted in their extension
appendices, with reference to where they were promoted to.
When an extension is promoted, any backwards compatibility aliases which
exist in the extension will *not* be promoted.
[NOTE]
====
As a hypothetical example, if the `apiext:VK_KHR_surface` extension were
promoted to part of a future core version, the
ename:VK_COLOR_SPACE_SRGB_NONLINEAR_KHR token defined by that extension
would be promoted to etext:VK_COLOR_SPACE_SRGB_NONLINEAR.
However, the etext:VK_COLORSPACE_SRGB_NONLINEAR_KHR token aliases
ename:VK_COLOR_SPACE_SRGB_NONLINEAR_KHR.
The etext:VK_COLORSPACE_SRGB_NONLINEAR_KHR would not be promoted, because it
is a backwards compatibility alias that exists only due to a naming mistake
when the extension was initially published.
====
[[extendingvulkan-compatibility-deprecation]]
==== Deprecation
Extensions may: be marked as deprecated when the intended use cases either
become irrelevant or can be solved in other ways.
Generally, a new feature will become available to solve the use case in
another extension or core version of the API, but it is not guaranteed.
[NOTE]
====
Features that are intended to replace deprecated functionality have no
guarantees of compatibility, and applications may require drastic
modification in order to make use of the new features.
====
Extensions that are deprecated are listed as being deprecated in their
extension appendices, with an explanation of the deprecation and any
features that are relevant.
[[extendingvulkan-compatibility-obsoletion]]
==== Obsoletion
Occasionally, an extension will be marked as obsolete if a new version of
the core API or a new extension is fundamentally incompatible with it.
An obsoleted extension must: not be used with the extension or core version
that obsoleted it.
Extensions that are obsoleted are listed as being obsoleted in their
extension appendices, with reference to what they were obsoleted by.
[[extendingvulkan-compatibility-aliases]]
==== Aliases
When an extension is promoted or deprecated by a newer feature, some or all
of its functionality may: be replicated into the newer feature.
Rather than duplication of all the documentation and definitions, the
specification instead identifies the identical commands and types as
_aliases_ of one another.
Each alias is mentioned together with the definition it aliases, with the
older aliases marked as "`equivalents`".
Each alias of the same command has identical behavior, and each alias of the
same type has identical meaning - they can be used interchangeably in an
application with no compatibility issues.
[NOTE]
====
For promoted types, the aliased extension type is semantically identical to
the new core type.
The C99 headers simply `typedef` the older aliases to the promoted types.
For promoted command aliases, however, there are two separate command
definitions, due to the fact that the C99 ABI has no way to alias command
definitions without resorting to macros.
Calling either command will produce identical behavior within the bounds of
the specification, and should still invoke the same path in the
implementation.
Debug tools may use separate commands with different debug behavior; to
write the appropriate command name to an output log, for instance.
====
[[extendingvulkan-compatibility-specialuse]]
==== Special Use Extensions
Some extensions exist only to support a specific purpose or specific class
of application.
These are referred to as "`special use extensions`".
Use of these extensions in applications not meeting the special use criteria
is not recommended.
Special use cases are restricted, and only those defined below are used to
describe extensions:
// The attributes in the "Special Use" column are defined in
// config/attribs.adoc, and used in reference pages as well as here.
// They define human-readable names for corresponding XML attribute values,
// so specialuse="cadsupport" -> "CAD Support". They are used in the table
// here and in the ExtensionMetaDocGenerator script that produces metadata
// includes for extension appendices. When introducing a new special use,
// the attribute and the table must both be extended.
[[extendingvulkan-specialuse-table]]
.Extension Special Use Cases
[width="100%",options="header",cols="25%,15%,60%"]
|====
| Special Use | XML Tag | Full Description
| {cadsupport} | cadsupport
| Extension is intended to support specialized functionality used by
CAD/CAM applications.
| {d3demulation} | d3demulation
| Extension is intended to support D3D emulation layers, and
applications ported from D3D, by adding functionality specific to D3D.
| {devtools} | devtools
| Extension is intended to support developer tools such as
capture-replay libraries.
| {debugging} | debugging
| Extension is intended for use by applications when debugging.
| {glemulation} | glemulation
| Extension is intended to support OpenGL and/or OpenGL ES emulation
layers, and applications ported from those APIs, by adding
functionality specific to those APIs.
|====
Special use extensions are identified in the metadata for each such
extension in the <<extensions, Layers & Extensions>> appendix, using the
name in the "`Special Use`" column above.
Special use extensions are also identified in `vk.xml` with the short name
in "`XML Tag`" column above, as described in the "`API Extensions
(`extension` tag)`" section of the <<vulkan-registry, registry schema
documentation>>.
```
|
```c++
//===--- HeaderMap.cpp - A file that acts like dir of symlinks ------------===//
//
// See path_to_url for license information.
//
//===your_sha256_hash------===//
//
// This file implements the HeaderMap interface.
//
//===your_sha256_hash------===//
#include "clang/Lex/HeaderMap.h"
#include "clang/Lex/HeaderMapTypes.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/FileManager.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/Support/Debug.h"
#include <cstring>
#include <memory>
#include <optional>
using namespace clang;
/// HashHMapKey - This is the 'well known' hash function required by the file
/// format, used to look up keys in the hash table. The hash table uses simple
/// linear probing based on this function.
static inline unsigned HashHMapKey(StringRef Str) {
unsigned Result = 0;
const char *S = Str.begin(), *End = Str.end();
for (; S != End; S++)
Result += toLowercase(*S) * 13;
return Result;
}
//===your_sha256_hash------===//
// Verification and Construction
//===your_sha256_hash------===//
/// HeaderMap::Create - This attempts to load the specified file as a header
/// map. If it doesn't look like a HeaderMap, it gives up and returns null.
/// If it looks like a HeaderMap but is obviously corrupted, it puts a reason
/// into the string error argument and returns null.
std::unique_ptr<HeaderMap> HeaderMap::Create(const FileEntry *FE,
FileManager &FM) {
// If the file is too small to be a header map, ignore it.
unsigned FileSize = FE->getSize();
if (FileSize <= sizeof(HMapHeader)) return nullptr;
auto FileBuffer = FM.getBufferForFile(FE);
if (!FileBuffer || !*FileBuffer)
return nullptr;
bool NeedsByteSwap;
if (!checkHeader(**FileBuffer, NeedsByteSwap))
return nullptr;
return std::unique_ptr<HeaderMap>(new HeaderMap(std::move(*FileBuffer), NeedsByteSwap));
}
bool HeaderMapImpl::checkHeader(const llvm::MemoryBuffer &File,
bool &NeedsByteSwap) {
if (File.getBufferSize() <= sizeof(HMapHeader))
return false;
const char *FileStart = File.getBufferStart();
// We know the file is at least as big as the header, check it now.
const HMapHeader *Header = reinterpret_cast<const HMapHeader*>(FileStart);
// Sniff it to see if it's a headermap by checking the magic number and
// version.
if (Header->Magic == HMAP_HeaderMagicNumber &&
Header->Version == HMAP_HeaderVersion)
NeedsByteSwap = false;
else if (Header->Magic == llvm::ByteSwap_32(HMAP_HeaderMagicNumber) &&
Header->Version == llvm::ByteSwap_16(HMAP_HeaderVersion))
NeedsByteSwap = true; // Mixed endianness headermap.
else
return false; // Not a header map.
if (Header->Reserved != 0)
return false;
// Check the number of buckets. It should be a power of two, and there
// should be enough space in the file for all of them.
uint32_t NumBuckets = NeedsByteSwap
? llvm::sys::getSwappedBytes(Header->NumBuckets)
: Header->NumBuckets;
if (!llvm::isPowerOf2_32(NumBuckets))
return false;
if (File.getBufferSize() <
sizeof(HMapHeader) + sizeof(HMapBucket) * NumBuckets)
return false;
// Okay, everything looks good.
return true;
}
//===your_sha256_hash------===//
// Utility Methods
//===your_sha256_hash------===//
/// getFileName - Return the filename of the headermap.
StringRef HeaderMapImpl::getFileName() const {
return FileBuffer->getBufferIdentifier();
}
unsigned HeaderMapImpl::getEndianAdjustedWord(unsigned X) const {
if (!NeedsBSwap) return X;
return llvm::ByteSwap_32(X);
}
/// getHeader - Return a reference to the file header, in unbyte-swapped form.
/// This method cannot fail.
const HMapHeader &HeaderMapImpl::getHeader() const {
// We know the file is at least as big as the header. Return it.
return *reinterpret_cast<const HMapHeader*>(FileBuffer->getBufferStart());
}
/// getBucket - Return the specified hash table bucket from the header map,
/// bswap'ing its fields as appropriate. If the bucket number is not valid,
/// this return a bucket with an empty key (0).
HMapBucket HeaderMapImpl::getBucket(unsigned BucketNo) const {
assert(FileBuffer->getBufferSize() >=
sizeof(HMapHeader) + sizeof(HMapBucket) * BucketNo &&
"Expected bucket to be in range");
HMapBucket Result;
Result.Key = HMAP_EmptyBucketKey;
const HMapBucket *BucketArray =
reinterpret_cast<const HMapBucket*>(FileBuffer->getBufferStart() +
sizeof(HMapHeader));
const HMapBucket *BucketPtr = BucketArray+BucketNo;
// Load the values, bswapping as needed.
Result.Key = getEndianAdjustedWord(BucketPtr->Key);
Result.Prefix = getEndianAdjustedWord(BucketPtr->Prefix);
Result.Suffix = getEndianAdjustedWord(BucketPtr->Suffix);
return Result;
}
std::optional<StringRef> HeaderMapImpl::getString(unsigned StrTabIdx) const {
// Add the start of the string table to the idx.
StrTabIdx += getEndianAdjustedWord(getHeader().StringsOffset);
// Check for invalid index.
if (StrTabIdx >= FileBuffer->getBufferSize())
return std::nullopt;
const char *Data = FileBuffer->getBufferStart() + StrTabIdx;
unsigned MaxLen = FileBuffer->getBufferSize() - StrTabIdx;
unsigned Len = strnlen(Data, MaxLen);
// Check whether the buffer is null-terminated.
if (Len == MaxLen && Data[Len - 1])
return std::nullopt;
return StringRef(Data, Len);
}
//===your_sha256_hash------===//
// The Main Drivers
//===your_sha256_hash------===//
/// dump - Print the contents of this headermap to stderr.
LLVM_DUMP_METHOD void HeaderMapImpl::dump() const {
const HMapHeader &Hdr = getHeader();
unsigned NumBuckets = getEndianAdjustedWord(Hdr.NumBuckets);
llvm::dbgs() << "Header Map " << getFileName() << ":\n " << NumBuckets
<< ", " << getEndianAdjustedWord(Hdr.NumEntries) << "\n";
auto getStringOrInvalid = [this](unsigned Id) -> StringRef {
if (std::optional<StringRef> S = getString(Id))
return *S;
return "<invalid>";
};
for (unsigned i = 0; i != NumBuckets; ++i) {
HMapBucket B = getBucket(i);
if (B.Key == HMAP_EmptyBucketKey) continue;
StringRef Key = getStringOrInvalid(B.Key);
StringRef Prefix = getStringOrInvalid(B.Prefix);
StringRef Suffix = getStringOrInvalid(B.Suffix);
llvm::dbgs() << " " << i << ". " << Key << " -> '" << Prefix << "' '"
<< Suffix << "'\n";
}
}
StringRef HeaderMapImpl::lookupFilename(StringRef Filename,
SmallVectorImpl<char> &DestPath) const {
const HMapHeader &Hdr = getHeader();
unsigned NumBuckets = getEndianAdjustedWord(Hdr.NumBuckets);
// Don't probe infinitely. This should be checked before constructing.
assert(llvm::isPowerOf2_32(NumBuckets) && "Expected power of 2");
// Linearly probe the hash table.
for (unsigned Bucket = HashHMapKey(Filename);; ++Bucket) {
HMapBucket B = getBucket(Bucket & (NumBuckets-1));
if (B.Key == HMAP_EmptyBucketKey) return StringRef(); // Hash miss.
// See if the key matches. If not, probe on.
std::optional<StringRef> Key = getString(B.Key);
if (LLVM_UNLIKELY(!Key))
continue;
if (!Filename.equals_insensitive(*Key))
continue;
// If so, we have a match in the hash table. Construct the destination
// path.
std::optional<StringRef> Prefix = getString(B.Prefix);
std::optional<StringRef> Suffix = getString(B.Suffix);
DestPath.clear();
if (LLVM_LIKELY(Prefix && Suffix)) {
DestPath.append(Prefix->begin(), Prefix->end());
DestPath.append(Suffix->begin(), Suffix->end());
}
return StringRef(DestPath.begin(), DestPath.size());
}
}
StringRef HeaderMapImpl::reverseLookupFilename(StringRef DestPath) const {
if (!ReverseMap.empty())
return ReverseMap.lookup(DestPath);
const HMapHeader &Hdr = getHeader();
unsigned NumBuckets = getEndianAdjustedWord(Hdr.NumBuckets);
StringRef RetKey;
for (unsigned i = 0; i != NumBuckets; ++i) {
HMapBucket B = getBucket(i);
if (B.Key == HMAP_EmptyBucketKey)
continue;
std::optional<StringRef> Key = getString(B.Key);
std::optional<StringRef> Prefix = getString(B.Prefix);
std::optional<StringRef> Suffix = getString(B.Suffix);
if (LLVM_LIKELY(Key && Prefix && Suffix)) {
SmallVector<char, 1024> Buf;
Buf.append(Prefix->begin(), Prefix->end());
Buf.append(Suffix->begin(), Suffix->end());
StringRef Value(Buf.begin(), Buf.size());
ReverseMap[Value] = *Key;
if (DestPath == Value)
RetKey = *Key;
}
}
return RetKey;
}
```
|
```c++
//===--- CGVTT.cpp - Emit LLVM Code for C++ VTTs --------------------------===//
//
// See path_to_url for license information.
//
//===your_sha256_hash------===//
//
// This contains code dealing with C++ code generation of VTTs (vtable tables).
//
//===your_sha256_hash------===//
#include "CodeGenModule.h"
#include "CGCXXABI.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/VTTBuilder.h"
using namespace clang;
using namespace CodeGen;
static llvm::GlobalVariable *
GetAddrOfVTTVTable(CodeGenVTables &CGVT, CodeGenModule &CGM,
const CXXRecordDecl *MostDerivedClass,
const VTTVTable &VTable,
llvm::GlobalVariable::LinkageTypes Linkage,
VTableLayout::AddressPointsMapTy &AddressPoints) {
if (VTable.getBase() == MostDerivedClass) {
assert(VTable.getBaseOffset().isZero() &&
"Most derived class vtable must have a zero offset!");
// This is a regular vtable.
return CGM.getCXXABI().getAddrOfVTable(MostDerivedClass, CharUnits());
}
return CGVT.GenerateConstructionVTable(MostDerivedClass,
VTable.getBaseSubobject(),
VTable.isVirtual(),
Linkage,
AddressPoints);
}
void
CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT,
llvm::GlobalVariable::LinkageTypes Linkage,
const CXXRecordDecl *RD) {
VTTBuilder Builder(CGM.getContext(), RD, /*GenerateDefinition=*/true);
llvm::ArrayType *ArrayType =
llvm::ArrayType::get(CGM.Int8PtrTy, Builder.getVTTComponents().size());
SmallVector<llvm::GlobalVariable *, 8> VTables;
SmallVector<VTableAddressPointsMapTy, 8> VTableAddressPoints;
for (const VTTVTable *i = Builder.getVTTVTables().begin(),
*e = Builder.getVTTVTables().end(); i != e; ++i) {
VTableAddressPoints.push_back(VTableAddressPointsMapTy());
VTables.push_back(GetAddrOfVTTVTable(*this, CGM, RD, *i, Linkage,
VTableAddressPoints.back()));
}
SmallVector<llvm::Constant *, 8> VTTComponents;
for (const VTTComponent *i = Builder.getVTTComponents().begin(),
*e = Builder.getVTTComponents().end(); i != e; ++i) {
const VTTVTable &VTTVT = Builder.getVTTVTables()[i->VTableIndex];
llvm::GlobalVariable *VTable = VTables[i->VTableIndex];
VTableLayout::AddressPointLocation AddressPoint;
if (VTTVT.getBase() == RD) {
// Just get the address point for the regular vtable.
AddressPoint =
getItaniumVTableContext().getVTableLayout(RD).getAddressPoint(
i->VTableBase);
} else {
AddressPoint = VTableAddressPoints[i->VTableIndex].lookup(i->VTableBase);
assert(AddressPoint.AddressPointIndex != 0 &&
"Did not find ctor vtable address point!");
}
llvm::Value *Idxs[] = {
llvm::ConstantInt::get(CGM.Int32Ty, 0),
llvm::ConstantInt::get(CGM.Int32Ty, AddressPoint.VTableIndex),
llvm::ConstantInt::get(CGM.Int32Ty, AddressPoint.AddressPointIndex),
};
llvm::Constant *Init = llvm::ConstantExpr::getGetElementPtr(
VTable->getValueType(), VTable, Idxs, /*InBounds=*/true,
/*InRangeIndex=*/1);
Init = llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(Init,
CGM.Int8PtrTy);
VTTComponents.push_back(Init);
}
llvm::Constant *Init = llvm::ConstantArray::get(ArrayType, VTTComponents);
VTT->setInitializer(Init);
// Set the correct linkage.
VTT->setLinkage(Linkage);
if (CGM.supportsCOMDAT() && VTT->isWeakForLinker())
VTT->setComdat(CGM.getModule().getOrInsertComdat(VTT->getName()));
}
llvm::GlobalVariable *CodeGenVTables::GetAddrOfVTT(const CXXRecordDecl *RD) {
assert(RD->getNumVBases() && "Only classes with virtual bases need a VTT");
SmallString<256> OutName;
llvm::raw_svector_ostream Out(OutName);
cast<ItaniumMangleContext>(CGM.getCXXABI().getMangleContext())
.mangleCXXVTT(RD, Out);
StringRef Name = OutName.str();
// This will also defer the definition of the VTT.
(void) CGM.getCXXABI().getAddrOfVTable(RD, CharUnits());
VTTBuilder Builder(CGM.getContext(), RD, /*GenerateDefinition=*/false);
llvm::ArrayType *ArrayType =
llvm::ArrayType::get(CGM.Int8PtrTy, Builder.getVTTComponents().size());
llvm::Align Align = CGM.getDataLayout().getABITypeAlign(CGM.Int8PtrTy);
llvm::GlobalVariable *GV = CGM.CreateOrReplaceCXXRuntimeVariable(
Name, ArrayType, llvm::GlobalValue::ExternalLinkage, Align);
GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
CGM.setGVProperties(GV, RD);
return GV;
}
uint64_t CodeGenVTables::getSubVTTIndex(const CXXRecordDecl *RD,
BaseSubobject Base) {
BaseSubobjectPairTy ClassSubobjectPair(RD, Base);
SubVTTIndiciesMapTy::iterator I = SubVTTIndicies.find(ClassSubobjectPair);
if (I != SubVTTIndicies.end())
return I->second;
VTTBuilder Builder(CGM.getContext(), RD, /*GenerateDefinition=*/false);
for (llvm::DenseMap<BaseSubobject, uint64_t>::const_iterator I =
Builder.getSubVTTIndicies().begin(),
E = Builder.getSubVTTIndicies().end(); I != E; ++I) {
// Insert all indices.
BaseSubobjectPairTy ClassSubobjectPair(RD, I->first);
SubVTTIndicies.insert(std::make_pair(ClassSubobjectPair, I->second));
}
I = SubVTTIndicies.find(ClassSubobjectPair);
assert(I != SubVTTIndicies.end() && "Did not find index!");
return I->second;
}
uint64_t
CodeGenVTables::getSecondaryVirtualPointerIndex(const CXXRecordDecl *RD,
BaseSubobject Base) {
SecondaryVirtualPointerIndicesMapTy::iterator I =
SecondaryVirtualPointerIndices.find(std::make_pair(RD, Base));
if (I != SecondaryVirtualPointerIndices.end())
return I->second;
VTTBuilder Builder(CGM.getContext(), RD, /*GenerateDefinition=*/false);
// Insert all secondary vpointer indices.
for (llvm::DenseMap<BaseSubobject, uint64_t>::const_iterator I =
Builder.getSecondaryVirtualPointerIndices().begin(),
E = Builder.getSecondaryVirtualPointerIndices().end(); I != E; ++I) {
std::pair<const CXXRecordDecl *, BaseSubobject> Pair =
std::make_pair(RD, I->first);
SecondaryVirtualPointerIndices.insert(std::make_pair(Pair, I->second));
}
I = SecondaryVirtualPointerIndices.find(std::make_pair(RD, Base));
assert(I != SecondaryVirtualPointerIndices.end() && "Did not find index!");
return I->second;
}
```
|
The Supreme Federal Court (, , abbreviated STF) is the supreme court (court of last resort) of Brazil, serving primarily as the Constitutional Court of the country. It is the highest court of law in Brazil for constitutional issues and its rulings cannot be appealed. On cases involving exclusively non-constitutional issues, regarding federal laws, the highest court is, by rule, the Superior Court of Justice.
History
The court was inaugurated during the colonial era in 1808, the year that the royal family of Portugal (the House of Braganza) arrived in Rio de Janeiro. It was originally called the House of Appeals of Brazil ().
The proclamation of the Brazilian Declaration of Independence and the adoption of the Imperial Constitution in 1824 preceded the establishment of the Supreme Court of Justice () in 1829. With the first Constitution of the Republic, the current court was established.
Although the constitutional norms that regulated the creation of the court allowed Deodoro da Fonseca, Brazil's first president, to nominate an entirely new court, the president chose to nominate as the first members of the Supreme Federal Court the ministers who were then serving as members of the predecessor imperial court.
Two hundred members have served on the court. The Constitution of 1891 decided that the court would have 15 members. When Getúlio Vargas came into power, the number of members was reduced to 11. The number was changed to 16 in 1965, but returned to 11 in 1969 and has not changed since. Of all Presidents of Brazil, only Café Filho and Carlos Luz (acting) never nominated a minister.
All judicial and administrative meetings of the Supreme Federal Court have been broadcast live on television since 2002. The court is open for the public to watch the meetings.
On 8 January 2023, the building was attacked by supporters of the former president, Jair Bolsonaro.
Functions
Alongside its appeal competence, mostly by the Extraordinary Appeal (), the Court has a small range of cases of original jurisdiction, including the power of judicial review, judging the constitutionality of laws passed by the National Congress, through a Direct Action of Unconstitutionality (, or ADI). There are also other mechanisms for reaching the Court directly, such as the Declaratory Action of Constitutionality (, or ADC) and the Direct Action of Unconstitutionality by Omission ( or ADO).
Case law
In May 2009 The Economist called the Supreme Federal Court "the most overburdened court in the world, thanks to a plethora of rights and privileges entrenched in the country's 1988 constitution (...) till recently the tribunal's decisions did not bind lower courts. The result was a court that is overstretched to the point of mutiny. The Supreme Court received 100,781 cases last year."
Overruling seems to be frequent in SFC jurisprudence: "three years ago when the STF adopted the understanding that defendants who have a conviction upheld by a single appellate court may be sent to jail to begin serving their sentences. (...) The 2016 decision happened largely due to a change in opinion from Minister Gilmar Mendes (...). He had voted against sending defendants to jail after a single failed appeal in 2009, but changed his mind in 2016. Jump to 2019, and the circumstances – both political and judicial – have changed".
President and Vice President
The President and Vice President of the Supreme Federal Court are elected by their peers for a two-year term by secret ballot. The incumbent president is Minister Luís Roberto Barroso.
Re-election for a consecutive term is not allowed. By tradition, the most senior minister who has not yet served in the presidential role is elected as the president by the court members, to avoid politicisation of the court.
If all currently sitting members have already served in the presidential role, the rotation starts all over again. However, due to vacancies caused by the compulsory retirement age and subsequent appointment of new ministers, it is very rare for the cycle to be ever completed. Some ministers are forced to retire before their turn for the presidency arrives, as was expected to happen with Teori Zavascki.
According to the same convention, the minister who is next in the line of succession for the presidency will serve as the vice-president for the time being. Also by tradition, the elections of the president and vice-president are never unanimous, there being always one isolated minority vote in each election, as the ministers who are to be elected never cast their votes for themselves; such votes are cast either for the dean of the courtits most senior memberor for some other elder minister that the one to be elected admires and wants to pay homage to.
The chief justice is also the 4th in the presidential line of succession, when the President of the Republic becomes prevented to be in charge, being preceded by the Vice President, the President of the Chamber of Deputies, and the President of the Federal Senate, as provided in Article 80 of the Brazilian Constitution.
Current members
The eleven judges of the court are called Ministers (), although having no similarity with the government body of ministers. They are appointed by the President and approved by the Federal Senate. There is no term length but a mandatory retirement age of 75.
Notes
M. Names in bold are the names used in social denomination.
In relation to other courts
Gallery
See also
Brazil federal courts
List of ministers of the Supreme Federal Court (Brazil)
Tribunal de Justiça
Notes
References
External links
Photo 360° of Supreme Federal Court – GUIABSB
Judiciary of Brazil
Brazil
Brazil
1808 establishments in Brazil
Courts and tribunals established in 1808
|
```java
package aws.example.kms;
import com.amazonaws.services.kms.AWSKMS;
import com.amazonaws.services.kms.AWSKMSClientBuilder;
import com.amazonaws.services.kms.model.UpdateAliasRequest;
public class UpdateAlias {
public static void main(String[] args) {
final String USAGE = "To run this example, supply a key id or ARN and an alias name\n" +
"Usage: UpdateAlias <target-key-id> <alias-name>\n" +
"Example: UpdateAlias 1234abcd-12ab-34cd-56ef-1234567890ab " +
"alias/projectKey1\n";
if (args.length != 2) {
System.out.println(USAGE);
System.exit(1);
}
String targetKeyId = args[0];
String aliasName = args[1];
AWSKMS kmsClient = AWSKMSClientBuilder.standard().build();
// Updating an alias
UpdateAliasRequest req = new UpdateAliasRequest()
.withAliasName(aliasName)
.withTargetKeyId(targetKeyId);
kmsClient.updateAlias(req);
}
}
```
|
```javascript
/*
For licensing, see LICENSE.md or path_to_url
*/
CKEDITOR.plugins.setLang("placeholder","pl",{title:"Waciwoci wypeniacza",toolbar:"Utwrz wypeniacz",name:"Nazwa wypeniacza",invalidName:"Wypeniacz nie moe by pusty ani nie moe zawiera adnego z nastpujcych znakw: [, ], \x3c oraz \x3e",pathName:"wypeniacz"});
```
|
2-Bromobutane is an isomer of 1-bromobutane. Both compounds share the molecular formula C4H9Br. 2-Bromobutane is also known as sec-butyl bromide or methylethylbromomethane. Because it contains bromine, a halogen, it is part of a larger class of compounds known as alkyl halides. It is a colorless liquid with a pleasant odor. Because the carbon atom connected to the bromine is connected to two other carbons the molecule is referred to as a secondary alkyl halide. 2-Bromobutane is chiral and thus can be obtained as either of two enantiomers designated as (R)-(−)-2-bromobutane and (S)-(+)-2-bromobutane.
2-Bromobutane is relatively stable, but is toxic and flammable. When treated with a strong base, it is prone to undergo an E2 reaction, which is a bimolecular elimination reaction, resulting in (predominantly) 2-butene, an alkene (double bond). 2-Bromobutane is an irritant, and harmful if ingested. It can irritate and burn skin and eyes.
References
Bromoalkanes
|
```shell
#!/usr/bin/env sh
cd `dirname $0`/../data
kill -9 `cat susi.pid` 2>/dev/null
rm -f susi.pid 2>/dev/null
```
|
```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.
// Precompiled header file
#include "stdafx.h"
//#define USE_NAIVE_CULLING
namespace Intrinsic
{
namespace Core
{
namespace Resources
{
struct CullingParallelTaskSet : enki::ITaskSet
{
virtual ~CullingParallelTaskSet() {}
void ExecuteRange(enki::TaskSetPartition p_Range,
uint32_t p_ThreadNum) override
{
_INTR_PROFILE_CPU("Culling", "Culling Job");
for (uint32_t frustIdx = 0u; frustIdx < _frustums.size(); ++frustIdx)
{
Resources::FrustumRef frustumRef = _frustums[frustIdx];
const uint32_t frustumMask = 1u << frustIdx;
const Math::FrustumPlanes& frustumPlanes =
Resources::FrustumManager::_frustumPlanesViewSpace(frustumRef);
#if !defined(USE_NAIVE_CULLING)
const __m128 simdFrustumPlanes[] = {
Simd::simdSet(-frustumPlanes.n[Math::FrustumPlane::kNear].x,
-frustumPlanes.n[Math::FrustumPlane::kFar].x,
-frustumPlanes.n[Math::FrustumPlane::kLeft].x,
-frustumPlanes.n[Math::FrustumPlane::kRight].x),
Simd::simdSet(-frustumPlanes.n[Math::FrustumPlane::kNear].y,
-frustumPlanes.n[Math::FrustumPlane::kFar].y,
-frustumPlanes.n[Math::FrustumPlane::kLeft].y,
-frustumPlanes.n[Math::FrustumPlane::kRight].y),
Simd::simdSet(-frustumPlanes.n[Math::FrustumPlane::kNear].z,
-frustumPlanes.n[Math::FrustumPlane::kFar].z,
-frustumPlanes.n[Math::FrustumPlane::kLeft].z,
-frustumPlanes.n[Math::FrustumPlane::kRight].z),
Simd::simdSet(-frustumPlanes.d[Math::FrustumPlane::kNear],
-frustumPlanes.d[Math::FrustumPlane::kFar],
-frustumPlanes.d[Math::FrustumPlane::kLeft],
-frustumPlanes.d[Math::FrustumPlane::kRight]),
Simd::simdSet(-frustumPlanes.n[Math::FrustumPlane::kTop].x,
-frustumPlanes.n[Math::FrustumPlane::kBottom].x,
-frustumPlanes.n[Math::FrustumPlane::kTop].x,
-frustumPlanes.n[Math::FrustumPlane::kBottom].x),
Simd::simdSet(-frustumPlanes.n[Math::FrustumPlane::kTop].y,
-frustumPlanes.n[Math::FrustumPlane::kBottom].y,
-frustumPlanes.n[Math::FrustumPlane::kTop].y,
-frustumPlanes.n[Math::FrustumPlane::kBottom].y),
Simd::simdSet(-frustumPlanes.n[Math::FrustumPlane::kTop].z,
-frustumPlanes.n[Math::FrustumPlane::kBottom].z,
-frustumPlanes.n[Math::FrustumPlane::kTop].z,
-frustumPlanes.n[Math::FrustumPlane::kBottom].z),
Simd::simdSet(-frustumPlanes.d[Math::FrustumPlane::kTop],
-frustumPlanes.d[Math::FrustumPlane::kBottom],
-frustumPlanes.d[Math::FrustumPlane::kTop],
-frustumPlanes.d[Math::FrustumPlane::kBottom])};
#endif // USE_NAIVE_CULLING
for (uint32_t nodeIdx = p_Range.start; nodeIdx < p_Range.end; ++nodeIdx)
{
Components::NodeRef nodeRef =
Components::NodeManager::getActiveResourceAtIndex(nodeIdx);
const Math::Sphere& cullingSphere =
Components::NodeManager::_worldBoundingSphere(nodeRef);
uint32_t& visibilityMask =
Components::NodeManager::_visibilityMask(nodeRef);
#if !defined(USE_NAIVE_CULLING)
const __m128 s = Simd::simdSet(cullingSphere.p.x, cullingSphere.p.y,
cullingSphere.p.z, cullingSphere.r);
const __m128 xxxx = Simd::simdSplatX(s);
const __m128 yyyy = Simd::simdSplatY(s);
const __m128 zzzz = Simd::simdSplatZ(s);
const __m128 rrrr = Simd::simdSplatW(s);
__m128 v, r;
v = Simd::simdMadd(xxxx, simdFrustumPlanes[0], simdFrustumPlanes[3]);
v = Simd::simdMadd(yyyy, simdFrustumPlanes[1], v);
v = Simd::simdMadd(zzzz, simdFrustumPlanes[2], v);
r = _mm_cmpgt_ps(v, rrrr);
v = Simd::simdMadd(xxxx, simdFrustumPlanes[4], simdFrustumPlanes[7]);
v = Simd::simdMadd(yyyy, simdFrustumPlanes[5], v);
v = Simd::simdMadd(zzzz, simdFrustumPlanes[6], v);
r = _mm_or_ps(r, _mm_cmpgt_ps(v, rrrr));
r = _mm_or_ps(r, _mm_movehl_ps(r, r));
r = _mm_or_ps(r, Simd::simdSplatY(r));
uint32_t result;
_mm_store_ss((float*)&result, r);
#else
uint32_t result = (uint32_t)-1;
for (int i = 0; i < Math::FrustumPlane::kCount; ++i)
{
if (glm::dot(frustumPlanes.n[i], cullingSphere.p) +
frustumPlanes.d[i] <
-cullingSphere.r)
{
result = 0x0;
break;
}
}
#endif // USE_NAIVE_CULLING
if ((result & 1u) > 0u)
{
visibilityMask &= ~frustumMask;
}
else
{
visibilityMask |= frustumMask;
}
}
}
}
FrustumRefArray _frustums;
} _cullingParallelTaskSet;
void FrustumManager::init()
{
_INTR_LOG_INFO("Inititializing Frustum Manager...");
Dod::Resources::ResourceManagerBase<
FrustumData, _INTR_MAX_FRUSTUM_COUNT>::_initResourceManager();
}
// <-
void FrustumManager::cullNodes(const FrustumRefArray& p_ActiveFrustums)
{
_INTR_PROFILE_CPU("Culling", "Culling");
_cullingParallelTaskSet._frustums = p_ActiveFrustums;
_cullingParallelTaskSet.m_SetSize =
Components::NodeManager::getActiveResourceCount();
Application::_scheduler.AddTaskSetToPipe(&_cullingParallelTaskSet);
Application::_scheduler.WaitforTaskSet(&_cullingParallelTaskSet);
}
}
}
}
```
|
Article spinning is a writing technique used in search engine optimization (SEO), and other applications, which creates what deceitfully appears to be new content from what already exists. Content spinning works by replacing specific words, phrases, sentences, or even entire paragraphs with any number of alternate versions, in order to provide a slightly different variation with each spin — also known as Rogeting. This process can be completely automated or written manually as many times as needed. Early content produced through automated methods often resulted in articles which were hard or even impossible to read. However, as article-spinning techniques were refined they became more sophisticated, and can now result in readable articles which, upon cursory review, can appear original.
The practice is sometimes considered to fall under the category of spamdexing, a black hat SEO practice, given that no genuinely new content is created. Website authors use article spinning to reduce the similarity ratio of rather redundant pages or pages with minimal or meaningless or uninformative content, and to avoid penalties in the search engine results pages (SERPs) for using duplicate content.
Article spinning is also used in other types of applications, such as message personalization and chatbots.
Regardless of the application, the end result is a proliferation of documents that are all similar but are superficially disguised as being different. The spin-generated documents can prove uninformative to the reader, thereby infuriating the end user.
Automatic spinning
Automatic rewriting can change the meaning of a sentence through the use of words with similar but subtly different meanings to the original. For example, the word "picture" could be replaced by the word "image" or "photo". Thousands of word-for-word combinations are stored in either a text file or database thesaurus to draw from. This ensures that a large percentage of words are different from the original article.
The problem with simple automatic writing is that it cannot recognize context or grammar in the use of words and phrases. Poorly-done article spinning can result in unidiomatic phrasing that no human writer would choose. Some spinning may substitute a synonym with the wrong part of speech when encountering a word that can be used as either a noun or a verb, use an obscure word that is only used within very specific contexts, or improperly substitute proper nouns. For example, "Great Britain" could be auto spun to "Good Britain". While "good" could be considered a synonym for "great", "Good Britain" does not have the same meaning as "Great Britain".
Article spinning can use a variety of methods; a straightforward one is "spintax". Spintax (or spin syntax) uses a marked-up version of text to indicate which parts of the text should be altered or rearranged. The different variants of one paragraph, one or several sentences, or groups of words or words are marked. This spintax can be extremely rich and complex, with many depth levels (nested spinning). It acts as a tree with large branches, then many smaller branches up to the leaves. To create readable articles out of spintax, a specific software application chooses any of the possible paths in the tree; this results in wide variations of the base article without significant alteration to its meaning.
As of 2017, there are a number of websites which will automatically spin content for an author, often with the end goal of attracting viewers to a website in order to display advertisements to them.
Manual spinning
Because of the problems with automated spinning, website owners may pay writers or specific companies to perform higher quality spinning manually. Writers may also spin their own articles, allowing them to sell the same articles with slight variations to a number of clients or to use the article for multiple purposes, for example as content and also for article marketing.
Plagiarism and duplicate content
Google representatives say that Google doesn't penalize websites that host duplicate content, but the advances in filtering techniques mean that duplicate content will rarely feature well in SERPs, which is a form of penalty. In 2010 and 2011, changes to Google's search algorithm targeting content farms aim to penalize sites containing significant duplicate content. In this context, article spinning might help, as it's not detected as duplicate content.
Criticisms
Article spinning is a way to create what looks like new content from existing content. As such, it can be seen as unethical, whether it is paraphrasing of copyrighted material (to try to evade copyright), deceiving readers into wasting their time for the benefit of the spinner (while not providing additional value to them), or both.
References
Search engine optimization
|
Kemer is a village in the Biga District of Çanakkale Province in Turkey. Its population is 661 (2021).
References
Villages in Biga District
|
An international mobile subscriber identity-catcher, or IMSI-catcher, is a telephone eavesdropping device used for intercepting mobile phone traffic and tracking location data of mobile phone users. Essentially a "fake" mobile tower acting between the target mobile phone and the service provider's real towers, it is considered a man-in-the-middle (MITM) attack. The 3G wireless standard offers some risk mitigation due to mutual authentication required from both the handset and the network. However, sophisticated attacks may be able to downgrade 3G and LTE to non-LTE network services which do not require mutual authentication.
IMSI-catchers are used in a number of countries by law enforcement and intelligence agencies, but their use has raised significant civil liberty and privacy concerns and is strictly regulated in some countries such as under the German Strafprozessordnung (StPO / Code of Criminal Procedure). Some countries do not have encrypted phone data traffic (or very weak encryption), thus rendering an IMSI-catcher unnecessary.
Overview
A virtual base transceiver station (VBTS) is a device for identifying the temporary mobile subscriber identity (TMSI), international mobile subscriber identity (IMSI) of a nearby GSM mobile phone and intercepting its calls, some are even advanced enough to detect the international mobile equipment identity (IMEI). It was patented and first commercialized by Rohde & Schwarz in 2003. The device can be viewed as simply a modified cell tower with a malicious operator, and on 4 January 2012, the Court of Appeal of England and Wales held that the patent is invalid for obviousness.
IMSI-catchers are often deployed by court order without a search warrant, the lower judicial standard of a pen register and trap-and-trace order being preferred by law enforcement. They can also be used in search and rescue operation for missing persons. Police departments have been reluctant to reveal use of these programs and contracts with vendors such as Harris Corporation, the maker of Stingray and Kingfish phone tracker devices.
In the UK, the first public body to admit using IMSI catchers was the Scottish Prison Service, though it is likely that the Metropolitan Police Service has been using IMSI catchers since 2011 or before.
Body-worn IMSI-catchers that target nearby mobile phones are being advertised to law enforcement agencies in the US.
The GSM specification requires the handset to authenticate to the network, but does not require the network to authenticate to the handset. This well-known security hole is exploited by an IMSI catcher. The IMSI catcher masquerades as a base station and logs the IMSI numbers of all the mobile stations in the area, as they attempt to attach to the IMSI-catcher. It allows forcing the mobile phone connected to it to use no call encryption (A5/0 mode) or to use easily breakable encryption (A5/1 or A5/2 mode), making the call data easy to intercept and convert to audio.
The 3G wireless standard mitigates risk and enhanced security of the protocol due to mutual authentication required from both the handset and the network and removes the false base station attack in GSM. Some sophisticated attacks against 3G and LTE may be able to downgrade to non-LTE network services which then does not require mutual authentication.
Functionalities
Identifying an IMSI
Every mobile phone has the requirement to optimize its reception. If there is more than one base station of the subscribed network operator accessible, it will always choose the one with the strongest signal. An IMSI-catcher masquerades as a base station and causes every mobile phone of the simulated network operator within a defined radius to log in. With the help of a special identity request, it is able to force the transmission of the IMSI.
Tapping a mobile phone
The IMSI-catcher subjects the phones in its vicinity to a man-in-the-middle attack, appearing to them as a preferred base station in terms of signal strength. With the help of a SIM, it simultaneously logs into the GSM network as a mobile station. Since the encryption mode is chosen by the base station, the IMSI-catcher can induce the mobile station to use no encryption at all. Hence it can encrypt the plain text traffic from the mobile station and pass it to the base station.
A targeted mobile phone is sent signals where the user will not be able to tell apart the device from authentic cell service provider infrastructure. This means that the device will be able to retrieve data that a normal cell tower receives from mobile phones if registered.
There is only an indirect connection from mobile station via IMSI-catcher to the GSM network. For this reason, incoming phone calls cannot generally be patched through to the mobile station by the GSM network, although more modern versions of these devices have their own mobile patch-through solutions in order to provide this functionality.
Passive IMSI detection
The difference between a passive IMSI-catcher and an active IMSI-catcher is that an active IMSI-catcher intercepts the data in transfer such as spoke, text, mail, and web traffic between the endpoint and cell tower.
Active IMSI-catchers generally also intercept all conversations and data traffic within a large range and are therefore also called rogue cell towers. It sends a signal with a plethora of commands to the endpoints, which respond by establishing a connection and routes all conversations and data traffic between the endpoints and the actual cell tower for as long as the attacker wishes.
A passive IMSI-catcher on the other hand only detects the IMSI, TMSI or IMEI of an endpoint. Once the IMSI, TMSI or IMEI address is detected, the endpoint is immediately released. The passive IMSI-catcher sends out a signal with only one specific command to the endpoints, which respond to it and share the identifiers of the endpoint with the passive IMSI-catcher. The vendors of passive IMSI-catchers take privacy more into account.
Universal Mobile Telecommunications System (UMTS)
False base station attacks are prevented by a combination of key freshness and integrity protection of signaling data, not by authenticating the serving network.
To provide a high network coverage, the UMTS standard allows for inter-operation with GSM. Therefore, not only UMTS but also GSM base stations are connected to the UMTS service network. This fallback is a security disadvantage and allows a new possibility of a man-in-the-middle attack.
Tell-tales and difficulties
The assignment of an IMSI catcher has a number of difficulties:
It must be ensured that the mobile phone of the observed person is in standby mode and the correct network operator is found out. Otherwise, for the mobile station, there is no need to log into the simulated base station.
Depending on the signal strength of the IMSI-catcher, numerous IMSIs can be located. The problem is to find out the right one.
All mobile phones in the area covered by the catcher have no access to the network. Incoming and outgoing calls cannot be patched through for these subscribers. Only the observed person has an indirect connection.
There are some disclosing factors. In most cases, the operation cannot be recognized immediately by the subscriber. But there are a few mobile phones that show a small symbol on the display, e.g. an exclamation point, if encryption is not used. This "Ciphering Indication Feature" can be suppressed by the network provider, however, by setting the OFM bit in EFAD on the SIM card. Since the network access is handled with the SIM/USIM of the IMSI-catcher, the receiver cannot see the number of the calling party. Of course, this also implies that the tapped calls are not listed in the itemized bill.
The assignment near the base station can be difficult, due to the high signal level of the original base station.
As most mobile phones prefer the faster modes of communication such as 4G or 3G, downgrading to 2G can require blocking frequency ranges for 4G and 3G.
Detection and counter-measures
Some preliminary research has been done in trying to detect and frustrate IMSI-catchers. One such project is through the Osmocom open source mobile station software. This is a special type of mobile phone firmware that can be used to detect and fingerprint certain network characteristics of IMSI-catchers, and warn the user that there is such a device operating in their area. But this firmware/software-based detection is strongly limited to a select few, outdated GSM mobile phones (i.e. Motorola) that are no longer available on the open market. The main problem is the closed-source nature of the major mobile phone producers.
The application Android IMSI-Catcher Detector (AIMSICD) is being developed to detect and circumvent IMSI-catchers by StingRay and silent SMS. Technology for a stationary network of IMSI-catcher detectors has also been developed. Several apps listed on the Google Play Store as IMSI catcher detector apps include SnoopSnitch, Cell Spy Catcher, and GSM Spy Finder and have between 100,000 and 500,000 app downloads each. However, these apps have limitations in that they do not have access to phone's underlying hardware and may offer only minimal protection.
See also
Telephone tapping
Stingray phone tracker
Mobile phone jammer
External links
Chris Paget's presentation Practical Cellphone Spying at DEF CON 18
Verrimus - Mobile Phone Intercept Detection
Footnotes
Further reading
External links
Mobile Phone Networks: a tale of tracking, spoofing and owning mobile phones
IMSI-catcher Seminar paper and presentation
Mini IMSI and IMEI catcher
The OsmocomBB project
MicroNet: Proximus LLC GSM IMSI and IMEI dual band catcher
MicroNet-U: Proximus LLC UMTS catcher
iParanoid: IMSI Catcher Intrusion Detection System presentation
Vulnerability by Design in Mobile Network Security
Surveillance
Mobile security
Telephone tapping
Telephony equipment
Law enforcement equipment
|
Listed below are the dates and results for the 1982 FIFA World Cup qualification rounds for the Asian and Oceanian zone (AFC and OFC). For an overview of the qualification rounds, see the article 1982 FIFA World Cup qualification.
A total of 21 AFC and OFC teams entered the competition. However, Iran withdrew before the draw was made. The Asian and Oceanian zone was allocated 2 places (out of 24) in the final tournament.
Format
There would be two rounds of play:
First Round: The remaining 20 teams would be divided into 4 groups. The groups had different rules, as follows:
Group 1 had 5 teams. The teams played against each other on a home-and-away basis. The group winner would qualify.
Group 2 had 5 teams. The teams played against each other once in Saudi Arabia. The group winner would qualify.
Group 3 had 4 teams. The teams played against each other once in Kuwait. The group winner would qualify.
Group 4 had 6 teams. All matches were played in Hong Kong. There would be four stages of play:
Classification matches: All teams would be paired up to play preliminary matches to determine group classification.
Group stage: Based on the results of the classification matches, the 6 teams were divided into 2 groups of 3 teams each. The teams played against each other once. The group winners and runners-up would advance to the semifinals.
Semifinals: The winner of Group A played against the runner-up of Group B in a single match, and the winner of Group B played against the runner-up of Group A in a single match. The winners would advance to the Final.
Final: The 2 teams played against each other in a single match. The winner would advance to the Final Round.
Final Round: The 4 teams played against each other on a home-and-away basis. The group winner and runner-up would qualify.
First round
Group 1
New Zealand advanced to the Final Round.
Group 2
Saudi Arabia advanced to the Final Round.
Group 3
Kuwait advanced to the Final Round.
To date, it is last time that South Korea failed to qualify.
Group 4
Classification matches
Based on the results, China PR, Japan and Macau were placed in Group A, while Hong Kong, Korea DPR and Singapore were placed in Group B.
Group 4A
China and Japan advanced to the Group 4 Semifinals.
Group 4B
Korea DPR and Hong Kong advanced to the Group 4 Semifinals.
Zonal semi-finals
Korea DPR advanced to the Group 4 Final.
China PR advanced to the Group 4 Final on penalties.
Zonal final
China PR advanced to the Final Round.
Final round
Notes
Play-off
At the time, goals scored and head-to-head results were not used to rank teams level on points and goal difference. As China PR and New Zealand finished level on points and goal difference, a play-off on neutral ground was played to determine who would qualify.
Kuwait and New Zealand qualified.
Qualified teams
The following two teams from AFC and OFC qualified for the final tournament.
1 Bold indicates champions for that year. Italic indicates hosts for that year.
Goalscorers
9 goals
Gary Cole
Steve Sumner
Brian Turner
8 goals
Grant Turner
Steve Wooddin
5 goals
Huang Xiangdong
Abdulaziz Al-Anberi
4 goals
Gu Guangming
Faisal Al-Dakhil
Wynton Rufer
3 goals
Dave Mitchell
Rong Zhixing
Deng Chyan
Ratu Jone
Jasem Yaqoub
Kim Yong-Nam
Li Yong-Sob
Mansour Muftah
Majed Abdullah
2 goals
John Kosmina
Eddie Krncevic
Chen Jingang
Zuo Shusheng
Meli Vuilabasa
Herry Risdianto
Kazushi Kimura
Nassir Al-Ghanem
Fathi Kameel
Ibrahim Din
Ricki Herbert
Li Chang-Ha
Saud Jassem
Choi Soon-Ho
Shait Ahmed Jehad
1 goal
Murray Barnes
Ken Boden
Gary Byrne
Alan Davidson
Tony Henderson
Peter Sharne
Fouad Bushegir
Cai Jinbiao
Chen Xirong
Shen Xiangfu
Chang Kuo Chi
Jyn Tson
John Morris Williams
Choi Jork Yee
Wan Chi Keung
Wu Kwok Hung
Hadi Ismanto
Budi Johannis
Nazar Ashraf
Hadi Ahmed
Adnan Dirjal
Adel Khudhair
Hussein Saeed
Haruhisa Hasegawa
Hideki Maeda
Sami Al-Hashash
Mahboub Juma'a
Mohammed Karam
James Wong Chye Fook
Duncan Cole
Adrian Elrick
Keith Mackay
Billy McClure
Li Yong-Man
Ibrahim Khalfan
Khalid Salman
Shaye Al Nafeesah
Ahmed Al Nifawi
Yousef Aboloya
Amin Dabo
Thasmbiayah Pathmanathan
Choi Jong-Deok
Hong Sung-Ho
Lee Kang-Jo
Lee Tae-Ho
Oh Seok-Jae
Piyapong Pue-On
Khan Thatat Songwuti
Sompit Suwannapluoh
1 own goal
Upendran Choy (playing against Indonesia)
See also
1982 FIFA World Cup qualification (UEFA)
1982 FIFA World Cup qualification (CONMEBOL)
1982 FIFA World Cup qualification (CONCACAF)
1982 FIFA World Cup qualification (CAF)
References
Qual
Qual
Qual
AFC and OFC
FIFA World Cup qualification (AFC)
FIFA World Cup qualification (OFC)
qual
qual
|
Danger in the Pacific is a 1942 espionage thriller set on a fictional island during World War II.
Plot
As a cover for his true government mission, British intelligence agent Leo Marzell (Leo Carrillo) sponsors a scientific expedition led by Dr. David Lynd (Don Terry) to find a source for a wonder drug in the jungles of the South Pacific. When Lynd agrees to the expedition over the objections of his aviator fiancée Jane Claymore (Louise Allbritton), she breaks the engagement but secretly follows him to the island. Claymore attempts to halt Lynd's expedition so they can be married, but makes the mistake of recruiting Axis espionage agent Zambesi (Edgar Barrier) to help her. Native islander Tagani (Turhan Bey) is sent by Zambesi to murder Lynd, and sets loose a tiger that injures Marzell. Most of Lynd's guides are attacked by crocodiles, but one survives to kill Tagani. Claymore ends up saving Marzall, Lynd and the remainder of the expedition by contacting the Royal Air Force which sends a rescue squad.
Cast
Leo Carrillo – Leo Marzell
Don Terry – Dr. David Lynd
Louise Allbritton – Jane Claymore
Andy Devine – Andy Parker
Turhan Bey – Tagani
Edgar Barrier – Zambesi
References
External links
1942 films
1940s English-language films
1940s thriller films
American black-and-white films
World War II films made in wartime
American thriller films
Films directed by Lewis D. Collins
Universal Pictures films
1942 drama films
|
Joseph M. Newman (August 17, 1909 – January 23, 2006) was an American film director most famous for his 1955 film This Island Earth. His credits include episodes of The Twilight Zone and The Alfred Hitchcock Hour.
He was nominated for two Academy Awards in the now defunct category of Assistant Director, for David Copperfield and San Francisco. He was also the last person nominated Assistant Director to die.
Career
Assistant director
Newman first established his reputation in the industry as an assistant director at MGM. He worked on Clear All Wires! (1933), Gabriel Over the White House (1933), The Nuisance (1933), Another Language (1933), Dinner at Eight (1933), Stage Mother (1933), Going Hollywood (1933), Riptide (1934), and The Merry Widow (1934), working with Ernst Lubitsch.
He was nominated for an Oscar for David Copperfield (1935), and worked on China Seas (1935), and I Live My Life (1935), Rose-Marie (1936). San Francisco (1936) earned him another Oscar nomination. He worked as assistant director on Lady of the Tropics (1937), Maytime (1937), The Firefly (1937), and Too Hot to Handle (1938).
Director of shorts
Newman began directing short films starting with Man's Greatest Friend (1938). He followed it with The Story of Alfred Nobel (1938), Money to Loan (1939), The Story That Couldn't Be Printed (1939) (the story of John Zenger), Maintain the Right (1940), Know Your Money (1940) (part of the Crime Does Not Pay series), Women in Hiding (1940), Cat College (1940), Buyer Beware (1940), Respect the Law (1941), Coffins on Wheels (1941), Triumph Without Drums (1941), Don't Talk (1942), and Vendetta (1942).
Newman returned to assistant directing with Tarzan's Secret Treasure (1941) and The Bugle Sounds (1942).
Feature director
Newman made his debut as a director of feature films with Northwest Rangers (1941), a B-movie about the Canadian Mounties starring James Craig.
Newman was a major in the Signal Corps during World War II. While there he directed the short film Diary of a Sergeant (1945) starring Harold Russell which led to Russell's appearance in The Best Years of Our Lives (1946).
After the war Newman returned to directing shorts at MGM: The Luckiest Guy in the World (1947) and The Amazing Mr. Nordill (1947).
He went back to features with the low budget Jungle Patrol (1948) at Fox. He went on to direct The Great Dan Patch (1949), the film noir crime dramas Abandoned (1949), with Gale Storm, and 711 Ocean Drive, which starred Edmond O'Brien.
Newman directed George Raft in Lucky Nick Cain (1951) aka I'll Get You For This in England, distributed by Fox.
20th Century Fox
Newman went to Fox where he directed The Guy Who Came Back (1951); Love Nest (1952), featuring an early supporting role for Marilyn Monroe. The studio were impressed and assigned him to larger budgeted films: Red Skies of Montana (1952) with Richard Widmark; and The Outcasts of Poker Flat (1952).
Fox picked up his option and he directed Pony Soldier (1952) with Tyrone Power; and Dangerous Crossing (1953) with Michael Rennie.
In 1952 it was announced he would form Joe Newman Productions to make Island in the Sky but the film ended up being made by others.
In 1953 Newman set up his own production company, Sabre Productions. Their first productions were to be This Island Earth and Tehran.
Newman directed The Human Jungle (1954) for Allied Artists.
Sabre Productions
Newman made This Island Earth for Universal. It starred Rex Reason as a scientist and jet pilot who is transported to another world by beings from a dying civilization who secretly intend to invade and take over his home planet. The film attracted a cult following that increased decades later when the television comedy series Mystery Science Theater 3000 spoofed it in 1996 in its first feature-film venture.
Also at Universal he directed Kiss of Fire (1955). He did Flight to Hong Kong (1956) for Sabre, then Death in Small Does (1957).
Two of actor Joel McCrea's final westerns followed for the director, Fort Massacre (1958) and The Gunfight at Dodge City (1959).
Newman directed The Big Circus (1959) for Irwin Allen at Allied Artists then went to MGM to do Tarzan, the Ape Man (1959).
Television
Newman went into television directing "Meeting at Appalachia" for Westinghouse Desilu Playhouse and "The High Cost of Fame" for Dan Raven, "The Lady and the Lawyer" for The Asphalt Jungle.
Newman did some films for Allied Artists, The Big Bankroll (1961), and The George Raft Story (1962). In between he made It Started in Tokyo (1961), The Lawbreakers (1961) and A Thunder of Drums (1961).
His final years as a director were for TV, doing episodes of The Great Adventure, The Alfred Hitchcock Hour and The Big Valley. He did several Twilight Zone episodes including "In Praise of Pip", "The Last Night of a Jockey", "Black Leather Jackets", and "The Bewitchin' Pool".
Partial filmography
References
External links
Joseph M Newman at BFI
The noir world of Newman
1909 births
2006 deaths
People from Logan, Utah
Film directors from Utah
|
R. ferruginea may refer to:
Rhagoletis ferruginea, a fruit fly species
Rollinia ferruginea, a plant species endemic to Brazil
Rusina ferruginea, the brown rustic, a moth species found in Europe
See also
Ferruginea (disambiguation)
|
Nicole Tomczak-Jaegermann FRSC (8 June 1945 – 17 June 2022) was a Polish-Canadian mathematician, a professor of mathematics at the University of Alberta, and the holder of the Canada Research Chair in Geometric Analysis.
Contributions
Her research is in geometric functional analysis, and is unusual in combining asymptotic analysis with the theory of Banach spaces and infinite-dimensional convex bodies. It formed a key component of Fields medalist Timothy Gowers' solution to Stefan Banach's homogeneous space problem, posed in 1932. Her 1989 monograph on Banach–Mazur distances is also highly cited.
Education and career
Tomczak-Jaegermann earned her M.S. in 1968 from the University of Warsaw, and her Ph.D. from the same university in 1974, under the supervision of Aleksander Pełczyński. She remained on the faculty at the University of Warsaw from 1975 until 1983, when she moved to Alberta.
Recognition
In 1996, Tomczak-Jaegermann was elected to the Royal Society of Canada, and in 1999 she won the Krieger–Nelson Prize for an outstanding female Canadian mathematician. In 1998 she was an Invited Speaker of the International Congress of Mathematicians in Berlin. She was the winner of the 2006 CRM-Fields-PIMS prize for exceptional research in mathematics.
Death
Tomczak-Jaegermann died on 17 June 2022 at the age 77 in Edmonton, Alberta, Canada.
References
External links
Home page at the University of Alberta
1945 births
2022 deaths
People from Paris
Functional analysts
Polish mathematicians
Polish women mathematicians
20th-century Polish mathematicians
21st-century Polish mathematicians
Canadian women mathematicians
Canadian mathematicians
Canadian people of Polish descent
Canada Research Chairs
University of Warsaw alumni
Texas A&M University faculty
Academic staff of the University of Alberta
Fellows of the Royal Society of Canada
|
```c
/*****************************************************************************
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function ssbevd_2stage
* Author: Intel Corporation
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int API_SUFFIX(LAPACKE_ssbevd_2stage_work)( int matrix_layout, char jobz, char uplo,
lapack_int n, lapack_int kd, float* ab,
lapack_int ldab, float* w, float* z,
lapack_int ldz, float* work, lapack_int lwork,
lapack_int* iwork, lapack_int liwork )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_ssbevd_2stage( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work,
&lwork, iwork, &liwork, &info );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int ldab_t = MAX(1,kd+1);
lapack_int ldz_t = MAX(1,n);
float* ab_t = NULL;
float* z_t = NULL;
/* Check leading dimension(s) */
if( ldab < n ) {
info = -7;
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_ssbevd_2stage_work", info );
return info;
}
if( ldz < n ) {
info = -10;
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_ssbevd_2stage_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
if( liwork == -1 || lwork == -1 ) {
LAPACK_ssbevd_2stage( &jobz, &uplo, &n, &kd, ab, &ldab_t, w, z, &ldz_t,
work, &lwork, iwork, &liwork, &info );
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
if( ab_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
if( API_SUFFIX(LAPACKE_lsame)( jobz, 'v' ) ) {
z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
if( z_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_1;
}
}
/* Transpose input matrices */
API_SUFFIX(LAPACKE_ssb_trans)( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
/* Call LAPACK function and adjust info */
LAPACK_ssbevd_2stage( &jobz, &uplo, &n, &kd, ab_t, &ldab_t, w, z_t, &ldz_t,
work, &lwork, iwork, &liwork, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
API_SUFFIX(LAPACKE_ssb_trans)( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
ldab );
if( API_SUFFIX(LAPACKE_lsame)( jobz, 'v' ) ) {
API_SUFFIX(LAPACKE_sge_trans)( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
}
/* Release memory and exit */
if( API_SUFFIX(LAPACKE_lsame)( jobz, 'v' ) ) {
LAPACKE_free( z_t );
}
exit_level_1:
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_ssbevd_2stage_work", info );
}
} else {
info = -1;
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_ssbevd_2stage_work", info );
}
return info;
}
```
|
```yaml
#
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
s3Exporter:
image:
repository: quay.io/kubermatic/s3-exporter
tag: v0.7.2
# list of image pull secret references, e.g.
# imagePullSecrets:
# - name: quay-io-pull-secret
imagePullSecrets: []
endpoint: path_to_url
bucket: kubermatic-etcd-backups
# uncomment this and create a ConfigMap with a "cabundle.pem" in it,
# then update the name here; this will configure the exporter to use
# your CA bundle when communicating with S3.
# caBundleConfigMap: name-of-the-configmap
resources:
requests:
cpu: 50m
memory: 24Mi
nodeSelector: {}
affinity: {}
tolerations: []
```
|
The Sappington Formation is a geologic formation in Montana. It preserves fossils dating back to the Carboniferous period.
See also
List of fossiliferous stratigraphic units in Montana
Paleontology in Montana
References
Carboniferous geology of Utah
Devonian southern paleotropical deposits
Carboniferous southern paleotropical deposits
|
```c++
//
// io_context_strand.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
//
// file LICENSE_1_0.txt or copy at path_to_url
//
#ifndef ASIO_IO_CONTEXT_STRAND_HPP
#define ASIO_IO_CONTEXT_STRAND_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
#if !defined(ASIO_NO_EXTENSIONS) \
&& !defined(ASIO_NO_TS_EXECUTORS)
#include "asio/async_result.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/strand_service.hpp"
#include "asio/detail/wrapped_handler.hpp"
#include "asio/io_context.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
/// Provides serialised handler execution.
/**
* The io_context::strand class provides the ability to post and dispatch
* handlers with the guarantee that none of those handlers will execute
* concurrently.
*
* @par Order of handler invocation
* Given:
*
* @li a strand object @c s
*
* @li an object @c a meeting completion handler requirements
*
* @li an object @c a1 which is an arbitrary copy of @c a made by the
* implementation
*
* @li an object @c b meeting completion handler requirements
*
* @li an object @c b1 which is an arbitrary copy of @c b made by the
* implementation
*
* if any of the following conditions are true:
*
* @li @c s.post(a) happens-before @c s.post(b)
*
* @li @c s.post(a) happens-before @c s.dispatch(b), where the latter is
* performed outside the strand
*
* @li @c s.dispatch(a) happens-before @c s.post(b), where the former is
* performed outside the strand
*
* @li @c s.dispatch(a) happens-before @c s.dispatch(b), where both are
* performed outside the strand
*
* then @c a() happens-before @c b()
*
* Note that in the following case:
* @code async_op_1(..., s.wrap(a));
* async_op_2(..., s.wrap(b)); @endcode
* the completion of the first async operation will perform @c s.dispatch(a),
* and the second will perform @c s.dispatch(b), but the order in which those
* are performed is unspecified. That is, you cannot state whether one
* happens-before the other. Therefore none of the above conditions are met and
* no ordering guarantee is made.
*
* @note The implementation makes no guarantee that handlers posted or
* dispatched through different @c strand objects will be invoked concurrently.
*
* @par Thread Safety
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Safe.
*
* @par Concepts:
* Dispatcher.
*/
class io_context::strand
{
private:
#if !defined(ASIO_NO_DEPRECATED)
struct initiate_dispatch;
struct initiate_post;
#endif // !defined(ASIO_NO_DEPRECATED)
public:
/// Constructor.
/**
* Constructs the strand.
*
* @param io_context The io_context object that the strand will use to
* dispatch handlers that are ready to be run.
*/
explicit strand(asio::io_context& io_context)
: service_(asio::use_service<
asio::detail::strand_service>(io_context))
{
service_.construct(impl_);
}
/// Copy constructor.
/**
* Creates a copy such that both strand objects share the same underlying
* state.
*/
strand(const strand& other) noexcept
: service_(other.service_),
impl_(other.impl_)
{
}
/// Destructor.
/**
* Destroys a strand.
*
* Handlers posted through the strand that have not yet been invoked will
* still be dispatched in a way that meets the guarantee of non-concurrency.
*/
~strand()
{
}
/// Obtain the underlying execution context.
asio::io_context& context() const noexcept
{
return service_.get_io_context();
}
/// Inform the strand that it has some outstanding work to do.
/**
* The strand delegates this call to its underlying io_context.
*/
void on_work_started() const noexcept
{
context().get_executor().on_work_started();
}
/// Inform the strand that some work is no longer outstanding.
/**
* The strand delegates this call to its underlying io_context.
*/
void on_work_finished() const noexcept
{
context().get_executor().on_work_finished();
}
/// Request the strand to invoke the given function object.
/**
* This function is used to ask the strand to execute the given function
* object on its underlying io_context. The function object will be executed
* inside this function if the strand is not otherwise busy and if the
* underlying io_context's executor's @c dispatch() function is also able to
* execute the function before returning.
*
* @param f The function object to be called. The executor will make
* a copy of the handler object as required. The function signature of the
* function object must be: @code void function(); @endcode
*
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
void dispatch(Function&& f, const Allocator& a) const
{
decay_t<Function> tmp(static_cast<Function&&>(f));
service_.dispatch(impl_, tmp);
(void)a;
}
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: Use asio::dispatch().) Request the strand to invoke
/// the given handler.
/**
* This function is used to ask the strand to execute the given handler.
*
* The strand object guarantees that handlers posted or dispatched through
* the strand will not be executed concurrently. The handler may be executed
* inside this function if the guarantee can be met. If this function is
* called from within a handler that was posted or dispatched through the same
* strand, then the new handler will be executed immediately.
*
* The strand's guarantee is in addition to the guarantee provided by the
* underlying io_context. The io_context guarantees that the handler will only
* be called in a thread in which the io_context's run member function is
* currently being invoked.
*
* @param handler The handler to be called. The strand will make a copy of the
* handler object as required. The function signature of the handler must be:
* @code void handler(); @endcode
*/
template <typename LegacyCompletionHandler>
auto dispatch(LegacyCompletionHandler&& handler)
-> decltype(
async_initiate<LegacyCompletionHandler, void ()>(
declval<initiate_dispatch>(), handler, this))
{
return async_initiate<LegacyCompletionHandler, void ()>(
initiate_dispatch(), handler, this);
}
#endif // !defined(ASIO_NO_DEPRECATED)
/// Request the strand to invoke the given function object.
/**
* This function is used to ask the executor to execute the given function
* object. The function object will never be executed inside this function.
* Instead, it will be scheduled to run by the underlying io_context.
*
* @param f The function object to be called. The executor will make
* a copy of the handler object as required. The function signature of the
* function object must be: @code void function(); @endcode
*
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
void post(Function&& f, const Allocator& a) const
{
decay_t<Function> tmp(static_cast<Function&&>(f));
service_.post(impl_, tmp);
(void)a;
}
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: Use asio::post().) Request the strand to invoke the
/// given handler and return immediately.
/**
* This function is used to ask the strand to execute the given handler, but
* without allowing the strand to call the handler from inside this function.
*
* The strand object guarantees that handlers posted or dispatched through
* the strand will not be executed concurrently. The strand's guarantee is in
* addition to the guarantee provided by the underlying io_context. The
* io_context guarantees that the handler will only be called in a thread in
* which the io_context's run member function is currently being invoked.
*
* @param handler The handler to be called. The strand will make a copy of the
* handler object as required. The function signature of the handler must be:
* @code void handler(); @endcode
*/
template <typename LegacyCompletionHandler>
auto post(LegacyCompletionHandler&& handler)
-> decltype(
async_initiate<LegacyCompletionHandler, void ()>(
declval<initiate_post>(), handler, this))
{
return async_initiate<LegacyCompletionHandler, void ()>(
initiate_post(), handler, this);
}
#endif // !defined(ASIO_NO_DEPRECATED)
/// Request the strand to invoke the given function object.
/**
* This function is used to ask the executor to execute the given function
* object. The function object will never be executed inside this function.
* Instead, it will be scheduled to run by the underlying io_context.
*
* @param f The function object to be called. The executor will make
* a copy of the handler object as required. The function signature of the
* function object must be: @code void function(); @endcode
*
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
void defer(Function&& f, const Allocator& a) const
{
decay_t<Function> tmp(static_cast<Function&&>(f));
service_.post(impl_, tmp);
(void)a;
}
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: Use asio::bind_executor().) Create a new handler that
/// automatically dispatches the wrapped handler on the strand.
/**
* This function is used to create a new handler function object that, when
* invoked, will automatically pass the wrapped handler to the strand's
* dispatch function.
*
* @param handler The handler to be wrapped. The strand will make a copy of
* the handler object as required. The function signature of the handler must
* be: @code void handler(A1 a1, ... An an); @endcode
*
* @return A function object that, when invoked, passes the wrapped handler to
* the strand's dispatch function. Given a function object with the signature:
* @code R f(A1 a1, ... An an); @endcode
* If this function object is passed to the wrap function like so:
* @code strand.wrap(f); @endcode
* then the return value is a function object with the signature
* @code void g(A1 a1, ... An an); @endcode
* that, when invoked, executes code equivalent to:
* @code strand.dispatch(boost::bind(f, a1, ... an)); @endcode
*/
template <typename Handler>
#if defined(GENERATING_DOCUMENTATION)
unspecified
#else
detail::wrapped_handler<strand, Handler, detail::is_continuation_if_running>
#endif
wrap(Handler handler)
{
return detail::wrapped_handler<io_context::strand, Handler,
detail::is_continuation_if_running>(*this, handler);
}
#endif // !defined(ASIO_NO_DEPRECATED)
/// Determine whether the strand is running in the current thread.
/**
* @return @c true if the current thread is executing a handler that was
* submitted to the strand using post(), dispatch() or wrap(). Otherwise
* returns @c false.
*/
bool running_in_this_thread() const noexcept
{
return service_.running_in_this_thread(impl_);
}
/// Compare two strands for equality.
/**
* Two strands are equal if they refer to the same ordered, non-concurrent
* state.
*/
friend bool operator==(const strand& a, const strand& b) noexcept
{
return a.impl_ == b.impl_;
}
/// Compare two strands for inequality.
/**
* Two strands are equal if they refer to the same ordered, non-concurrent
* state.
*/
friend bool operator!=(const strand& a, const strand& b) noexcept
{
return a.impl_ != b.impl_;
}
private:
#if !defined(ASIO_NO_DEPRECATED)
struct initiate_dispatch
{
template <typename LegacyCompletionHandler>
void operator()(LegacyCompletionHandler&& handler,
strand* self) const
{
// If you get an error on the following line it means that your
// handler does not meet the documented type requirements for a
// LegacyCompletionHandler.
ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
LegacyCompletionHandler, handler) type_check;
detail::non_const_lvalue<LegacyCompletionHandler> handler2(handler);
self->service_.dispatch(self->impl_, handler2.value);
}
};
struct initiate_post
{
template <typename LegacyCompletionHandler>
void operator()(LegacyCompletionHandler&& handler,
strand* self) const
{
// If you get an error on the following line it means that your
// handler does not meet the documented type requirements for a
// LegacyCompletionHandler.
ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
LegacyCompletionHandler, handler) type_check;
detail::non_const_lvalue<LegacyCompletionHandler> handler2(handler);
self->service_.post(self->impl_, handler2.value);
}
};
#endif // !defined(ASIO_NO_DEPRECATED)
asio::detail::strand_service& service_;
mutable asio::detail::strand_service::implementation_type impl_;
};
} // namespace asio
#include "asio/detail/pop_options.hpp"
#endif // !defined(ASIO_NO_EXTENSIONS)
// && !defined(ASIO_NO_TS_EXECUTORS)
#endif // ASIO_IO_CONTEXT_STRAND_HPP
```
|
Jasika () is a village in the municipality of Kruševac, Serbia. According to the 2002 census, the village has a population of 2040 people.
References
Populated places in Rasina District
|
```xml
export type TextAlign = 'left' | 'right' | 'center' | 'justify';
```
|
Maçambará is a small Brazilian municipality in the western part of the state of Rio Grande do Sul. The population is 4,562 (2020 est.) in an area of 1,682.82 km². Its elevation is 110 m. It is located west of the state capital of Porto Alegre and northeast of Alegrete.
The municipality contains part of the São Donato Biological Reserve, a strictly protected conservation unit created in 1975 that protects an area of wetlands on the Butuí River, a tributary of the Uruguay River.
Neighbouring municipalities
Itaqui
São Borja
Alegrete
Unistalda
São Francisco de Assis
References
External links
http://www.citybrazil.com.br/rs/macambara/
Municipalities in Rio Grande do Sul
|
```html
---
layout: single
property_name: animation-delay
---
<section id="animation-delay" class="property">
<header class="property-header">
<nav class="property-links">
<a class="property-collection" href="{{site.url}}/animations/">
In collection: <strong>animations</strong>
</a>
<a class="property-links-direct" href="{{site.url}}/property/animation-delay/" data-property-name="animation-delay" data-tooltip="Single page for this property">Permalink</a>
<a class="property-share" data-tooltip="Share on Twitter or Facebook" data-property-name="animation-delay">Share</a>
<a target="_blank" href="path_to_url#feat=css-animation" data-tooltip="See on Can I use..." rel="external">Can I use</a>
<a target="_blank" href="path_to_url" data-tooltip="See on Mozilla Developer Network" rel="external">MDN</a>
</nav>
<h2 class="property-name">
<a href="#animation-delay"><span>#</span>animation-delay</a>
</h2>
<div class="property-description">
<p>Defines how long the animation has to wait before <strong>starting</strong>. The animation will only be delayed on its <em>first</em> iteration.</p>
</div>
<div class="property-animation">
<a class="button property-animation-toggle" data-property-name="animation-delay"></a>
</div>
</header>
<style type="text/css">.animation-delay { animation-duration: 5s;animation-iteration-count: infinite; }</style>
<style type="text/css">.animation-delay.is-animated { animation-name: fadeAndMove; }</style>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-default" data-tooltip="This is the property's default value">default</code>
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="animation-delay: 0s;">animation-delay: 0s;</code>
</p>
<div class="example-description">
<p>The animation will wait <strong>zero seconds</strong>, and thus start right away.</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div animation-delay square square--plum" id="animation-delay-0s">Hello<br>World</div>
</div>
</aside>
<style type="text/css">#animation-delay-0s{ animation-delay:0s;}</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="animation-delay: 1.2s;">animation-delay: 1.2s;</code>
</p>
<div class="example-description">
<p>You can use <strong>decimal</strong> values in <strong>seconds</strong> with the keyword <code>s</code>.</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div animation-delay square square--plum" id="animation-delay-12s">Hello<br>World</div>
</div>
</aside>
<style type="text/css">#animation-delay-12s{ animation-delay:1.2s;}</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="animation-delay: 2400ms;">animation-delay: 2400ms;</code>
</p>
<div class="example-description">
<p>You can use <strong>milliseconds</strong> instead of seconds, with the keyword <code>ms</code>.</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div animation-delay square square--plum" id="animation-delay-2400ms">Hello<br>World</div>
</div>
</aside>
<style type="text/css">#animation-delay-2400ms{ animation-delay:2400ms;}</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="animation-delay: -500ms;">animation-delay: -500ms;</code>
</p>
<div class="example-description">
<p>You can use <strong>negative values</strong>: the animation will start as if it had <em>already been playing</em> for <code>500ms</code>.</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div animation-delay square square--plum" id="animation-delay--500ms">Hello<br>World</div>
</div>
</aside>
<style type="text/css">#animation-delay--500ms{ animation-delay:-500ms;}</style>
</section>
</section>
```
|
Interstate 71 (I-71) is a north–south Interstate Highway in the Midwestern and Southeastern regions of the United States. Its southern terminus is at an interchange with I-64 and I-65 (the Kennedy Interchange) in Louisville, Kentucky, and its northern terminus at an interchange with I-90 in Cleveland, Ohio. I-71 runs concurrently with I-75 from a point about south of Cincinnati, Ohio, into Downtown Cincinnati. While most odd numbered Interstates run north–south, I-71 takes more of a northeast–southwest course, with some east–west sections, and is mainly a regional route serving Kentucky and Ohio. It links I-80 and I-90 to I-70, and ultimately (via I-65) links to I-40. Major metropolitan areas served by I-71 include Louisville, Cincinnati, Columbus, and Cleveland.
Approximately three quarters of the route lie east of I-75, leaving I-71 out of place in the Interstate grid.
Route description
|-
|KY
|
|-
|OH
|
|-
|Total
|
|}
Kentucky
In Kentucky, I-71 begins east of Downtown Louisville at the Kennedy Interchange, where it meets I-64 and I-65. This interchange is sometimes called the "Spaghetti Junction". From Louisville, it roughly follows the Ohio River in a diagonal path toward Northern Kentucky. Between Louisville and Cincinnati, I-71 is largely a four-lane highway, except for the approach to Kentucky Speedway in Sparta in which it runs three lanes each way for about .
Near the town of Carrollton, there are signs marking the location of a tragic accident that occurred on May 14, 1988, when a drunk driver was driving north in the southbound lanes and struck a church bus full of children and teenagers, causing the bus's fuel tank to ignite into flames and killing 27 people on board. It is one of the worst bus accidents in state and national history.
After having run from Louisville, I-71 merges with I-75 near Walton after which it intersects I-275, the Cincinnati beltway. After passing through Covington, the freeway crosses the Ohio River via the lower level of the Brent Spence Bridge (while the southbound direction uses the upper level) and continues into Cincinnati.
Ohio
In Cincinnati, it splits immediately from I-75 and heads due east onto Fort Washington Way, where it continues through Downtown Cincinnati concurrently with U.S. Route 50 (US 50) for less than . Just east of downtown, US 50 splits from I-71 and continues east; I-71 bends north and receives I-471, a spur from southeast of the city. I-71 then heads in a general northeast direction through urban Cincinnati and into its surrounding suburbs. After another interchange with the I-275 beltway, the freeway leaves the metropolitan area and heads toward Columbus. It continues northeast until it reaches South Lebanon, where it begins cutting east across the flat plains of southwest Ohio. The freeway crosses the Little Miami River on the Jeremiah Morrow Bridge, which is a continuous truss bridge and the tallest bridge in Ohio, at above the river. I-71 heads toward Columbus then intersects with the bypass I-270 before heading north into urban Columbus, where it junctions I-70. About north of the I-70 junction, it intersects with I-670. After another interchange with the I-270 bypass, the highway exits Columbus and continues north until near Delaware, where it again turns northeast. Beginning its path to Cleveland, I-71 enters the rolling farm country on the edges of the Allegheny Plateau. It continues in this fashion to Lodi/Westfield Center and its junction with I-76, which provides access to Akron and points east. Heading north to Medina, it meets the terminus of I-271. The highway then continues north into urban Cuyahoga County and Cleveland's suburbs, intersecting the Ohio Turnpike/I-80. Passing Cleveland Hopkins International Airport, I-71 meets I-480 and enters Cleveland's west side, continuing on to downtown. It junctions with State Route 176 (SR 176) and terminates at I-90 on the Innerbelt.
History
Kentucky
The first section of I-71 in Louisville opened in December 1966 between its terminus at Spaghetti Junction and Zorn Avenue, its first exit. Its junction with I-264 opened in July 1968, and the complete Kentucky portion of the Interstate was opened to the public in July 1969. At that point, it replaced US 42 as the primary link between Cincinnati and Louisville.
Ohio
Much of I-71 in Ohio was intended to be SR 1. SR 1 was originally planned in the 1950s as a second Ohio Turnpike extending southwest to northeast across the state. It was planned to run from Cincinnati to Conneaut and connect with an extension built across the panhandle of Pennsylvania to the New York State Thruway. As the highway was being planned, the Federal Aid Highway Act of 1956 was enacted, and the project was converted from a toll road to a freeway. It was designated as SR 1, since the Interstate Highway numbering system had not yet been implemented. Portions of the freeway began to be completed and opened in 1959 with the new Interstate Highway funding, and they were marked as SR 1 as well as with their new Interstate Highway number. Since large gaps existed along the corridor where no freeway had yet been completed, existing two-lane or four-lane highways were also designated as SR 1 in order to complete the route. The SR 1 signage was removed in 1966 as the Interstate Highway numbers adequately marked the route by then and the state highway numbering was superfluous.
In Columbus, the portion of I-71 that bounds Worthington's eastern edge was originally called the North Freeway. Costing $13.8 million (equivalent to $ in ), it was constructed south from SR 161, arriving at 11th Avenue by August 1961. It took another year to construct the portion between 11th Avenue and 5th Avenue, mainly due to the need to construct a massive underpass under the Pennsylvania Railroad's Grogan Yard. Today, only two tracks cross the viaduct, and the rest of the structure supports a large, weedy field. By August 1962, the freeway had reached Fifth Avenue, and it reached downtown in November 1962.
I-71 was originally planned to follow the Innerbelt Freeway northward from its current northern terminus to the Cleveland Memorial Shoreway at Dead Man's Curve when I-90 was planned to continue westward from there along the Shoreway.
Upon its completion, I-71 replaced SR 3 as the primary highway link between Cincinnati, Columbus, and Cleveland.
Between 2004 and 2006, the interchange at milepost 121 in the far northern reaches of Columbus was reconstructed to allow access to the eastern extension of Gemini Place. Before that, it was a simple diamond interchange with SR 750 (Polaris Parkway).
Rebuilding and widening program
In 1999, the state of Ohio began a 10-year, $500-million (equivalent to $ in ) project to improve I-71 between Columbus and Cleveland. The plans did not include widening the stretch in Delaware and Morrow counties, calling for patching that section instead. At that time, state transportation officials said they did not plan to widen that section for two reasons: Traffic studies did not support the widening, and there was no money for the project. But Ohio Department of Transportation (ODOT) officials eventually gave in under pressure from elected officials and business owners to widen the remaining stretch of I-71 from just north of the US 36/SR 37 interchange in Delaware County to the Morrow–Richland county line. The reconstruction and widening on the last stretch of I-71 in Delaware and Morrow counties began in spring 2012, and the work was completed in mid-2015 at a cost of $144 million (equivalent to $ in ).
Exit list
Auxiliary routes
I-71 has two auxiliary routes in the Cleveland metropolitan area and in the Cincinnati metropolitan area. I-471 links downtown Cincinnati with I-275. I-271 provides access to Cleveland's eastern suburbs and enables travelers on I-71 to access I-90 east without going through Cleveland proper.
See also
Carrollton bus disaster, a drunk-driving tragedy involving a school bus that occurred on I-71
Roads in Louisville, Kentucky
Sports rivalries involving cities on I-71
Battle of Ohio: Cincinnati Bengals–Cleveland Browns ()
Crosstown Shootout: Cincinnati Bearcats–Xavier Musketeers (college basketball)
The Keg of Nails: Cincinnati Bearcats–Louisville Cardinals (college football)
Ohio Cup: Cincinnati Reds–Cleveland Guardians ()
Hell Is Real Derby: Columbus Crew SC–FC Cincinnati ()
References
External links
I-71 on Cincinnati-Transit.net
Interstate-guide.com: Interstate 71
Historic photos: 1963 aerial view of I-71 construction between 17th and 5th avenues in Columbus, Ohio Gasoline tanker crash and fire collapses Cleveland Avenue overpass in Columbus, Ohio 6/28/1966 Rebuilding the Cleveland Avenue overpass after it was destroyed by a gasoline tanker fire in 1966
Interstate 71
71
71
71
0071
Roads in Cincinnati
Transportation in Columbus, Ohio
Transportation in Cleveland
Transportation in Jefferson County, Kentucky
Transportation in Oldham County, Kentucky
Transportation in Henry County, Kentucky
Transportation in Trimble County, Kentucky
Transportation in Carroll County, Kentucky
Transportation in Gallatin County, Kentucky
Transportation in Boone County, Kentucky
Transportation in Kenton County, Kentucky
Transportation in Hamilton County, Ohio
Transportation in Warren County, Ohio
Transportation in Clinton County, Ohio
Transportation in Greene County, Ohio
Transportation in Fayette County, Ohio
Transportation in Madison County, Ohio
Transportation in Franklin County, Ohio
Transportation in Delaware County, Ohio
Transportation in Morrow County, Ohio
Transportation in Richland County, Ohio
Transportation in Ashland County, Ohio
Transportation in Wayne County, Ohio
Transportation in Medina County, Ohio
Transportation in Cuyahoga County, Ohio
|
```c
/* Disassemble MN10200 instructions.
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "sysdep.h"
#include "opcode/mn10200.h"
#include "dis-asm.h"
#include "opintl.h"
static void disassemble PARAMS ((bfd_vma, struct disassemble_info *,
unsigned long insn, unsigned long,
unsigned int));
int
print_insn_mn10200 (memaddr, info)
bfd_vma memaddr;
struct disassemble_info *info;
{
int status;
bfd_byte buffer[4];
unsigned long insn;
unsigned long extension = 0;
unsigned int consume;
/* First figure out how big the opcode is. */
status = (*info->read_memory_func) (memaddr, buffer, 1, info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
return -1;
}
insn = *(unsigned char *) buffer;
/* These are one byte insns. */
if ((insn & 0xf0) == 0x00
|| (insn & 0xf0) == 0x10
|| (insn & 0xf0) == 0x20
|| (insn & 0xf0) == 0x30
|| ((insn & 0xf0) == 0x80
&& (insn & 0x0c) >> 2 != (insn & 0x03))
|| (insn & 0xf0) == 0x90
|| (insn & 0xf0) == 0xa0
|| (insn & 0xf0) == 0xb0
|| (insn & 0xff) == 0xeb
|| (insn & 0xff) == 0xf6
|| (insn & 0xff) == 0xfe
|| (insn & 0xff) == 0xff)
{
extension = 0;
consume = 1;
}
/* These are two byte insns. */
else if ((insn & 0xf0) == 0x40
|| (insn & 0xf0) == 0x50
|| (insn & 0xf0) == 0x60
|| (insn & 0xf0) == 0x70
|| (insn & 0xf0) == 0x80
|| (insn & 0xfc) == 0xd0
|| (insn & 0xfc) == 0xd4
|| (insn & 0xfc) == 0xd8
|| (insn & 0xfc) == 0xe0
|| (insn & 0xfc) == 0xe4
|| (insn & 0xff) == 0xe8
|| (insn & 0xff) == 0xe9
|| (insn & 0xff) == 0xea
|| (insn & 0xff) == 0xf0
|| (insn & 0xff) == 0xf1
|| (insn & 0xff) == 0xf2
|| (insn & 0xff) == 0xf3)
{
status = (*info->read_memory_func) (memaddr, buffer, 2, info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
return -1;
}
insn = bfd_getb16 (buffer);
consume = 2;
}
/* These are three byte insns with a 16bit operand in little
endian form. */
else if ((insn & 0xf0) == 0xc0
|| (insn & 0xfc) == 0xdc
|| (insn & 0xfc) == 0xec
|| (insn & 0xff) == 0xf8
|| (insn & 0xff) == 0xf9
|| (insn & 0xff) == 0xfa
|| (insn & 0xff) == 0xfb
|| (insn & 0xff) == 0xfc
|| (insn & 0xff) == 0xfd)
{
status = (*info->read_memory_func) (memaddr + 1, buffer, 2, info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
return -1;
}
insn <<= 16;
insn |= bfd_getl16 (buffer);
extension = 0;
consume = 3;
}
/* These are three byte insns too, but we don't have to mess with
endianness stuff. */
else if ((insn & 0xff) == 0xf5)
{
status = (*info->read_memory_func) (memaddr + 1, buffer, 2, info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
return -1;
}
insn <<= 16;
insn |= bfd_getb16 (buffer);
extension = 0;
consume = 3;
}
/* These are four byte insns. */
else if ((insn & 0xff) == 0xf7)
{
status = (*info->read_memory_func) (memaddr, buffer, 2, info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
return -1;
}
insn = bfd_getb16 (buffer);
insn <<= 16;
status = (*info->read_memory_func) (memaddr + 2, buffer, 2, info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
return -1;
}
insn |= bfd_getl16 (buffer);
extension = 0;
consume = 4;
}
/* These are five byte insns. */
else if ((insn & 0xff) == 0xf4)
{
status = (*info->read_memory_func) (memaddr, buffer, 2, info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
return -1;
}
insn = bfd_getb16 (buffer);
insn <<= 16;
status = (*info->read_memory_func) (memaddr + 4, buffer, 1, info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
return -1;
}
insn |= (*(unsigned char *)buffer << 8) & 0xff00;
status = (*info->read_memory_func) (memaddr + 3, buffer, 1, info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
return -1;
}
insn |= (*(unsigned char *)buffer) & 0xff;
status = (*info->read_memory_func) (memaddr + 2, buffer, 1, info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
return -1;
}
extension = (*(unsigned char *)buffer) & 0xff;
consume = 5;
}
else
{
(*info->fprintf_func) (info->stream, _("unknown\t0x%02x"), insn);
return 1;
}
disassemble (memaddr, info, insn, extension, consume);
return consume;
}
static void
disassemble (memaddr, info, insn, extension, size)
bfd_vma memaddr;
struct disassemble_info *info;
unsigned long insn;
unsigned long extension;
unsigned int size;
{
struct mn10200_opcode *op = (struct mn10200_opcode *)mn10200_opcodes;
const struct mn10200_operand *operand;
int match = 0;
/* Find the opcode. */
while (op->name)
{
int mysize, extra_shift;
if (op->format == FMT_1)
mysize = 1;
else if (op->format == FMT_2
|| op->format == FMT_4)
mysize = 2;
else if (op->format == FMT_3
|| op->format == FMT_5)
mysize = 3;
else if (op->format == FMT_6)
mysize = 4;
else if (op->format == FMT_7)
mysize = 5;
else
abort ();
if (op->format == FMT_2 || op->format == FMT_5)
extra_shift = 8;
else if (op->format == FMT_3
|| op->format == FMT_6
|| op->format == FMT_7)
extra_shift = 16;
else
extra_shift = 0;
if ((op->mask & insn) == op->opcode
&& size == (unsigned int) mysize)
{
const unsigned char *opindex_ptr;
unsigned int nocomma;
int paren = 0;
match = 1;
(*info->fprintf_func) (info->stream, "%s\t", op->name);
/* Now print the operands. */
for (opindex_ptr = op->operands, nocomma = 1;
*opindex_ptr != 0;
opindex_ptr++)
{
unsigned long value;
operand = &mn10200_operands[*opindex_ptr];
if ((operand->flags & MN10200_OPERAND_EXTENDED) != 0)
{
value = (insn & 0xffff) << 8;
value |= extension;
}
else
{
value = ((insn >> (operand->shift))
& ((1L << operand->bits) - 1L));
}
if ((operand->flags & MN10200_OPERAND_SIGNED) != 0)
value = ((long)(value << (32 - operand->bits))
>> (32 - operand->bits));
if (!nocomma
&& (!paren
|| ((operand->flags & MN10200_OPERAND_PAREN) == 0)))
(*info->fprintf_func) (info->stream, ",");
nocomma = 0;
if ((operand->flags & MN10200_OPERAND_DREG) != 0)
{
value = ((insn >> (operand->shift + extra_shift))
& ((1 << operand->bits) - 1));
(*info->fprintf_func) (info->stream, "d%d", value);
}
else if ((operand->flags & MN10200_OPERAND_AREG) != 0)
{
value = ((insn >> (operand->shift + extra_shift))
& ((1 << operand->bits) - 1));
(*info->fprintf_func) (info->stream, "a%d", value);
}
else if ((operand->flags & MN10200_OPERAND_PSW) != 0)
(*info->fprintf_func) (info->stream, "psw");
else if ((operand->flags & MN10200_OPERAND_MDR) != 0)
(*info->fprintf_func) (info->stream, "mdr");
else if ((operand->flags & MN10200_OPERAND_PAREN) != 0)
{
if (paren)
(*info->fprintf_func) (info->stream, ")");
else
{
(*info->fprintf_func) (info->stream, "(");
nocomma = 1;
}
paren = !paren;
}
else if ((operand->flags & MN10200_OPERAND_PCREL) != 0)
(*info->print_address_func) ((value + memaddr + mysize) & 0xffffff, info);
else if ((operand->flags & MN10200_OPERAND_MEMADDR) != 0)
(*info->print_address_func) (value, info);
else
(*info->fprintf_func) (info->stream, "%ld", value);
}
/* All done. */
break;
}
op++;
}
if (!match)
{
(*info->fprintf_func) (info->stream, _("unknown\t0x%04lx"), insn);
}
}
```
|
```javascript
Registry user accounts for npm
Manage local node modules with `npm link`
`npm` as an alternative to Gulp
`config` object in `package.json`
Reduce package duplication
```
|
```objective-c
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_CODEGEN_MIPS_CONSTANTS_MIPS_H_
#define V8_CODEGEN_MIPS_CONSTANTS_MIPS_H_
#include "src/codegen/cpu-features.h"
// UNIMPLEMENTED_ macro for MIPS.
#ifdef DEBUG
#define UNIMPLEMENTED_MIPS() \
v8::internal::PrintF("%s, \tline %d: \tfunction %s not implemented. \n", \
__FILE__, __LINE__, __func__)
#else
#define UNIMPLEMENTED_MIPS()
#endif
#define UNSUPPORTED_MIPS() v8::internal::PrintF("Unsupported instruction.\n")
enum ArchVariants {
kMips32r1 = v8::internal::MIPSr1,
kMips32r2 = v8::internal::MIPSr2,
kMips32r6 = v8::internal::MIPSr6,
kLoongson
};
#ifdef _MIPS_ARCH_MIPS32R2
static const ArchVariants kArchVariant = kMips32r2;
#elif _MIPS_ARCH_MIPS32R6
static const ArchVariants kArchVariant = kMips32r6;
#elif _MIPS_ARCH_LOONGSON
// The loongson flag refers to the LOONGSON architectures based on MIPS-III,
// which predates (and is a subset of) the mips32r2 and r1 architectures.
static const ArchVariants kArchVariant = kLoongson;
#elif _MIPS_ARCH_MIPS32RX
// This flags referred to compatibility mode that creates universal code that
// can run on any MIPS32 architecture revision. The dynamically generated code
// by v8 is specialized for the MIPS host detected in runtime probing.
static const ArchVariants kArchVariant = kMips32r1;
#else
static const ArchVariants kArchVariant = kMips32r1;
#endif
enum Endianness { kLittle, kBig };
#if defined(V8_TARGET_LITTLE_ENDIAN)
static const Endianness kArchEndian = kLittle;
#elif defined(V8_TARGET_BIG_ENDIAN)
static const Endianness kArchEndian = kBig;
#else
#error Unknown endianness
#endif
enum FpuMode { kFP32, kFP64, kFPXX };
#if defined(FPU_MODE_FP32)
static const FpuMode kFpuMode = kFP32;
#elif defined(FPU_MODE_FP64)
static const FpuMode kFpuMode = kFP64;
#elif defined(FPU_MODE_FPXX)
#if defined(_MIPS_ARCH_MIPS32R2) || defined(_MIPS_ARCH_MIPS32R6)
static const FpuMode kFpuMode = kFPXX;
#else
#error "FPXX is supported only on Mips32R2 and Mips32R6"
#endif
#else
static const FpuMode kFpuMode = kFP32;
#endif
#if defined(__mips_hard_float) && __mips_hard_float != 0
// Use floating-point coprocessor instructions. This flag is raised when
// -mhard-float is passed to the compiler.
const bool IsMipsSoftFloatABI = false;
#elif defined(__mips_soft_float) && __mips_soft_float != 0
// This flag is raised when -msoft-float is passed to the compiler.
// Although FPU is a base requirement for v8, soft-float ABI is used
// on soft-float systems with FPU kernel emulation.
const bool IsMipsSoftFloatABI = true;
#else
const bool IsMipsSoftFloatABI = true;
#endif
#if defined(V8_TARGET_LITTLE_ENDIAN)
const uint32_t kHoleNanUpper32Offset = 4;
const uint32_t kHoleNanLower32Offset = 0;
#elif defined(V8_TARGET_BIG_ENDIAN)
const uint32_t kHoleNanUpper32Offset = 0;
const uint32_t kHoleNanLower32Offset = 4;
#else
#error Unknown endianness
#endif
constexpr bool IsFp64Mode() { return kFpuMode == kFP64; }
constexpr bool IsFp32Mode() { return kFpuMode == kFP32; }
constexpr bool IsFpxxMode() { return kFpuMode == kFPXX; }
#ifndef _MIPS_ARCH_MIPS32RX
constexpr bool IsMipsArchVariant(const ArchVariants check) {
return kArchVariant == check;
}
#else
bool IsMipsArchVariant(const ArchVariants check) {
return CpuFeatures::IsSupported(static_cast<CpuFeature>(check));
}
#endif
#if defined(V8_TARGET_LITTLE_ENDIAN)
const uint32_t kMipsLwrOffset = 0;
const uint32_t kMipsLwlOffset = 3;
const uint32_t kMipsSwrOffset = 0;
const uint32_t kMipsSwlOffset = 3;
#elif defined(V8_TARGET_BIG_ENDIAN)
const uint32_t kMipsLwrOffset = 3;
const uint32_t kMipsLwlOffset = 0;
const uint32_t kMipsSwrOffset = 3;
const uint32_t kMipsSwlOffset = 0;
#else
#error Unknown endianness
#endif
#if defined(V8_TARGET_LITTLE_ENDIAN)
const uint32_t kLeastSignificantByteInInt32Offset = 0;
#elif defined(V8_TARGET_BIG_ENDIAN)
const uint32_t kLeastSignificantByteInInt32Offset = 3;
#else
#error Unknown endianness
#endif
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h>
// Defines constants and accessor classes to assemble, disassemble and
// simulate MIPS32 instructions.
//
// See: MIPS32 Architecture For Programmers
// Volume II: The MIPS32 Instruction Set
// Try www.cs.cornell.edu/courses/cs3410/2008fa/MIPS_Vol2.pdf.
namespace v8 {
namespace internal {
constexpr size_t kMaxPCRelativeCodeRangeInMB = 4096;
// your_sha256_hash-------------
// Registers and FPURegisters.
// Number of general purpose registers.
const int kNumRegisters = 32;
const int kInvalidRegister = -1;
// Number of registers with HI, LO, and pc.
const int kNumSimuRegisters = 35;
// In the simulator, the PC register is simulated as the 34th register.
const int kPCRegister = 34;
// Number coprocessor registers.
const int kNumFPURegisters = 32;
const int kInvalidFPURegister = -1;
// Number of MSA registers
const int kNumMSARegisters = 32;
const int kInvalidMSARegister = -1;
const int kInvalidMSAControlRegister = -1;
const int kMSAIRRegister = 0;
const int kMSACSRRegister = 1;
const int kMSARegSize = 128;
const int kMSALanesByte = kMSARegSize / 8;
const int kMSALanesHalf = kMSARegSize / 16;
const int kMSALanesWord = kMSARegSize / 32;
const int kMSALanesDword = kMSARegSize / 64;
// FPU (coprocessor 1) control registers. Currently only FCSR is implemented.
const int kFCSRRegister = 31;
const int kInvalidFPUControlRegister = -1;
const uint32_t kFPUInvalidResult = static_cast<uint32_t>(1u << 31) - 1;
const int32_t kFPUInvalidResultNegative = static_cast<int32_t>(1u << 31);
const uint64_t kFPU64InvalidResult =
static_cast<uint64_t>(static_cast<uint64_t>(1) << 63) - 1;
const int64_t kFPU64InvalidResultNegative =
static_cast<int64_t>(static_cast<uint64_t>(1) << 63);
// FCSR constants.
const uint32_t kFCSRInexactFlagBit = 2;
const uint32_t kFCSRUnderflowFlagBit = 3;
const uint32_t kFCSROverflowFlagBit = 4;
const uint32_t kFCSRDivideByZeroFlagBit = 5;
const uint32_t kFCSRInvalidOpFlagBit = 6;
const uint32_t kFCSRNaN2008FlagBit = 18;
const uint32_t kFCSRInexactFlagMask = 1 << kFCSRInexactFlagBit;
const uint32_t kFCSRUnderflowFlagMask = 1 << kFCSRUnderflowFlagBit;
const uint32_t kFCSROverflowFlagMask = 1 << kFCSROverflowFlagBit;
const uint32_t kFCSRDivideByZeroFlagMask = 1 << kFCSRDivideByZeroFlagBit;
const uint32_t kFCSRInvalidOpFlagMask = 1 << kFCSRInvalidOpFlagBit;
const uint32_t kFCSRNaN2008FlagMask = 1 << kFCSRNaN2008FlagBit;
const uint32_t kFCSRFlagMask =
kFCSRInexactFlagMask | kFCSRUnderflowFlagMask | kFCSROverflowFlagMask |
kFCSRDivideByZeroFlagMask | kFCSRInvalidOpFlagMask;
const uint32_t kFCSRExceptionFlagMask = kFCSRFlagMask ^ kFCSRInexactFlagMask;
// 'pref' instruction hints
const int32_t kPrefHintLoad = 0;
const int32_t kPrefHintStore = 1;
const int32_t kPrefHintLoadStreamed = 4;
const int32_t kPrefHintStoreStreamed = 5;
const int32_t kPrefHintLoadRetained = 6;
const int32_t kPrefHintStoreRetained = 7;
const int32_t kPrefHintWritebackInvalidate = 25;
const int32_t kPrefHintPrepareForStore = 30;
// Actual value of root register is offset from the root array's start
// to take advantage of negative displacement values.
// TODO(sigurds): Choose best value.
constexpr int kRootRegisterBias = 256;
// Helper functions for converting between register numbers and names.
class Registers {
public:
// Return the name of the register.
static const char* Name(int reg);
// Lookup the register number for the name provided.
static int Number(const char* name);
struct RegisterAlias {
int reg;
const char* name;
};
static const int32_t kMaxValue = 0x7fffffff;
static const int32_t kMinValue = 0x80000000;
private:
static const char* names_[kNumSimuRegisters];
static const RegisterAlias aliases_[];
};
// Helper functions for converting between register numbers and names.
class FPURegisters {
public:
// Return the name of the register.
static const char* Name(int reg);
// Lookup the register number for the name provided.
static int Number(const char* name);
struct RegisterAlias {
int creg;
const char* name;
};
private:
static const char* names_[kNumFPURegisters];
static const RegisterAlias aliases_[];
};
// Helper functions for converting between register numbers and names.
class MSARegisters {
public:
// Return the name of the register.
static const char* Name(int reg);
// Lookup the register number for the name provided.
static int Number(const char* name);
struct RegisterAlias {
int creg;
const char* name;
};
private:
static const char* names_[kNumMSARegisters];
static const RegisterAlias aliases_[];
};
// your_sha256_hash-------------
// Instructions encoding constants.
// On MIPS all instructions are 32 bits.
using Instr = int32_t;
// Special Software Interrupt codes when used in the presence of the MIPS
// simulator.
enum SoftwareInterruptCodes {
// Transition to C code.
call_rt_redirected = 0xfffff
};
// On MIPS Simulator breakpoints can have different codes:
// - Breaks between 0 and kMaxWatchpointCode are treated as simple watchpoints,
// the simulator will run through them and print the registers.
// - Breaks between kMaxWatchpointCode and kMaxStopCode are treated as stop()
// instructions (see Assembler::stop()).
// - Breaks larger than kMaxStopCode are simple breaks, dropping you into the
// debugger.
const uint32_t kMaxWatchpointCode = 31;
const uint32_t kMaxStopCode = 127;
STATIC_ASSERT(kMaxWatchpointCode < kMaxStopCode);
// ----- Fields offset and length.
const int kOpcodeShift = 26;
const int kOpcodeBits = 6;
const int kRsShift = 21;
const int kRsBits = 5;
const int kRtShift = 16;
const int kRtBits = 5;
const int kRdShift = 11;
const int kRdBits = 5;
const int kSaShift = 6;
const int kSaBits = 5;
const int kLsaSaBits = 2;
const int kFunctionShift = 0;
const int kFunctionBits = 6;
const int kLuiShift = 16;
const int kBp2Shift = 6;
const int kBp2Bits = 2;
const int kBaseShift = 21;
const int kBaseBits = 5;
const int kBit6Shift = 6;
const int kBit6Bits = 1;
const int kImm9Shift = 7;
const int kImm9Bits = 9;
const int kImm16Shift = 0;
const int kImm16Bits = 16;
const int kImm18Shift = 0;
const int kImm18Bits = 18;
const int kImm19Shift = 0;
const int kImm19Bits = 19;
const int kImm21Shift = 0;
const int kImm21Bits = 21;
const int kImm26Shift = 0;
const int kImm26Bits = 26;
const int kImm28Shift = 0;
const int kImm28Bits = 28;
const int kImm32Shift = 0;
const int kImm32Bits = 32;
const int kMsaImm8Shift = 16;
const int kMsaImm8Bits = 8;
const int kMsaImm5Shift = 16;
const int kMsaImm5Bits = 5;
const int kMsaImm10Shift = 11;
const int kMsaImm10Bits = 10;
const int kMsaImmMI10Shift = 16;
const int kMsaImmMI10Bits = 10;
// In branches and jumps immediate fields point to words, not bytes,
// and are therefore shifted by 2.
const int kImmFieldShift = 2;
const int kFrBits = 5;
const int kFrShift = 21;
const int kFsShift = 11;
const int kFsBits = 5;
const int kFtShift = 16;
const int kFtBits = 5;
const int kFdShift = 6;
const int kFdBits = 5;
const int kFCccShift = 8;
const int kFCccBits = 3;
const int kFBccShift = 18;
const int kFBccBits = 3;
const int kFBtrueShift = 16;
const int kFBtrueBits = 1;
const int kWtBits = 5;
const int kWtShift = 16;
const int kWsBits = 5;
const int kWsShift = 11;
const int kWdBits = 5;
const int kWdShift = 6;
// ----- Miscellaneous useful masks.
// Instruction bit masks.
const int kOpcodeMask = ((1 << kOpcodeBits) - 1) << kOpcodeShift;
const int kImm9Mask = ((1 << kImm9Bits) - 1) << kImm9Shift;
const int kImm16Mask = ((1 << kImm16Bits) - 1) << kImm16Shift;
const int kImm18Mask = ((1 << kImm18Bits) - 1) << kImm18Shift;
const int kImm19Mask = ((1 << kImm19Bits) - 1) << kImm19Shift;
const int kImm21Mask = ((1 << kImm21Bits) - 1) << kImm21Shift;
const int kImm26Mask = ((1 << kImm26Bits) - 1) << kImm26Shift;
const int kImm28Mask = ((1 << kImm28Bits) - 1) << kImm28Shift;
const int kImm5Mask = ((1 << 5) - 1);
const int kImm8Mask = ((1 << 8) - 1);
const int kImm10Mask = ((1 << 10) - 1);
const int kMsaI5I10Mask = ((7U << 23) | ((1 << 6) - 1));
const int kMsaI8Mask = ((3U << 24) | ((1 << 6) - 1));
const int kMsaI5Mask = ((7U << 23) | ((1 << 6) - 1));
const int kMsaMI10Mask = (15U << 2);
const int kMsaBITMask = ((7U << 23) | ((1 << 6) - 1));
const int kMsaELMMask = (15U << 22);
const int kMsaLongerELMMask = kMsaELMMask | (63U << 16);
const int kMsa3RMask = ((7U << 23) | ((1 << 6) - 1));
const int kMsa3RFMask = ((15U << 22) | ((1 << 6) - 1));
const int kMsaVECMask = (23U << 21);
const int kMsa2RMask = (7U << 18);
const int kMsa2RFMask = (15U << 17);
const int kRsFieldMask = ((1 << kRsBits) - 1) << kRsShift;
const int kRtFieldMask = ((1 << kRtBits) - 1) << kRtShift;
const int kRdFieldMask = ((1 << kRdBits) - 1) << kRdShift;
const int kSaFieldMask = ((1 << kSaBits) - 1) << kSaShift;
const int kFunctionFieldMask = ((1 << kFunctionBits) - 1) << kFunctionShift;
// Misc masks.
const int kHiMask = 0xffff << 16;
const int kLoMask = 0xffff;
const int kSignMask = 0x80000000;
const int kJumpAddrMask = (1 << (kImm26Bits + kImmFieldShift)) - 1;
// ----- MIPS Opcodes and Function Fields.
// We use this presentation to stay close to the table representation in
// MIPS32 Architecture For Programmers, Volume II: The MIPS32 Instruction Set.
enum Opcode : uint32_t {
SPECIAL = 0U << kOpcodeShift,
REGIMM = 1U << kOpcodeShift,
J = ((0U << 3) + 2) << kOpcodeShift,
JAL = ((0U << 3) + 3) << kOpcodeShift,
BEQ = ((0U << 3) + 4) << kOpcodeShift,
BNE = ((0U << 3) + 5) << kOpcodeShift,
BLEZ = ((0U << 3) + 6) << kOpcodeShift,
BGTZ = ((0U << 3) + 7) << kOpcodeShift,
ADDI = ((1U << 3) + 0) << kOpcodeShift,
ADDIU = ((1U << 3) + 1) << kOpcodeShift,
SLTI = ((1U << 3) + 2) << kOpcodeShift,
SLTIU = ((1U << 3) + 3) << kOpcodeShift,
ANDI = ((1U << 3) + 4) << kOpcodeShift,
ORI = ((1U << 3) + 5) << kOpcodeShift,
XORI = ((1U << 3) + 6) << kOpcodeShift,
LUI = ((1U << 3) + 7) << kOpcodeShift, // LUI/AUI family.
BEQC = ((2U << 3) + 0) << kOpcodeShift,
COP1 = ((2U << 3) + 1) << kOpcodeShift, // Coprocessor 1 class.
BEQL = ((2U << 3) + 4) << kOpcodeShift,
BNEL = ((2U << 3) + 5) << kOpcodeShift,
BLEZL = ((2U << 3) + 6) << kOpcodeShift,
BGTZL = ((2U << 3) + 7) << kOpcodeShift,
DADDI = ((3U << 3) + 0) << kOpcodeShift, // This is also BNEC.
SPECIAL2 = ((3U << 3) + 4) << kOpcodeShift,
MSA = ((3U << 3) + 6) << kOpcodeShift,
SPECIAL3 = ((3U << 3) + 7) << kOpcodeShift,
LB = ((4U << 3) + 0) << kOpcodeShift,
LH = ((4U << 3) + 1) << kOpcodeShift,
LWL = ((4U << 3) + 2) << kOpcodeShift,
LW = ((4U << 3) + 3) << kOpcodeShift,
LBU = ((4U << 3) + 4) << kOpcodeShift,
LHU = ((4U << 3) + 5) << kOpcodeShift,
LWR = ((4U << 3) + 6) << kOpcodeShift,
SB = ((5U << 3) + 0) << kOpcodeShift,
SH = ((5U << 3) + 1) << kOpcodeShift,
SWL = ((5U << 3) + 2) << kOpcodeShift,
SW = ((5U << 3) + 3) << kOpcodeShift,
SWR = ((5U << 3) + 6) << kOpcodeShift,
LL = ((6U << 3) + 0) << kOpcodeShift,
LWC1 = ((6U << 3) + 1) << kOpcodeShift,
BC = ((6U << 3) + 2) << kOpcodeShift,
LDC1 = ((6U << 3) + 5) << kOpcodeShift,
POP66 = ((6U << 3) + 6) << kOpcodeShift, // beqzc, jic
PREF = ((6U << 3) + 3) << kOpcodeShift,
SC = ((7U << 3) + 0) << kOpcodeShift,
SWC1 = ((7U << 3) + 1) << kOpcodeShift,
BALC = ((7U << 3) + 2) << kOpcodeShift,
PCREL = ((7U << 3) + 3) << kOpcodeShift,
SDC1 = ((7U << 3) + 5) << kOpcodeShift,
POP76 = ((7U << 3) + 6) << kOpcodeShift, // bnezc, jialc
COP1X = ((1U << 4) + 3) << kOpcodeShift,
// New r6 instruction.
POP06 = BLEZ, // bgeuc/bleuc, blezalc, bgezalc
POP07 = BGTZ, // bltuc/bgtuc, bgtzalc, bltzalc
POP10 = ADDI, // beqzalc, bovc, beqc
POP26 = BLEZL, // bgezc, blezc, bgec/blec
POP27 = BGTZL, // bgtzc, bltzc, bltc/bgtc
POP30 = DADDI, // bnezalc, bnvc, bnec
};
enum SecondaryField : uint32_t {
// SPECIAL Encoding of Function Field.
SLL = ((0U << 3) + 0),
MOVCI = ((0U << 3) + 1),
SRL = ((0U << 3) + 2),
SRA = ((0U << 3) + 3),
SLLV = ((0U << 3) + 4),
LSA = ((0U << 3) + 5),
SRLV = ((0U << 3) + 6),
SRAV = ((0U << 3) + 7),
JR = ((1U << 3) + 0),
JALR = ((1U << 3) + 1),
MOVZ = ((1U << 3) + 2),
MOVN = ((1U << 3) + 3),
BREAK = ((1U << 3) + 5),
SYNC = ((1U << 3) + 7),
MFHI = ((2U << 3) + 0),
CLZ_R6 = ((2U << 3) + 0),
CLO_R6 = ((2U << 3) + 1),
MFLO = ((2U << 3) + 2),
MULT = ((3U << 3) + 0),
MULTU = ((3U << 3) + 1),
DIV = ((3U << 3) + 2),
DIVU = ((3U << 3) + 3),
ADD = ((4U << 3) + 0),
ADDU = ((4U << 3) + 1),
SUB = ((4U << 3) + 2),
SUBU = ((4U << 3) + 3),
AND = ((4U << 3) + 4),
OR = ((4U << 3) + 5),
XOR = ((4U << 3) + 6),
NOR = ((4U << 3) + 7),
SLT = ((5U << 3) + 2),
SLTU = ((5U << 3) + 3),
TGE = ((6U << 3) + 0),
TGEU = ((6U << 3) + 1),
TLT = ((6U << 3) + 2),
TLTU = ((6U << 3) + 3),
TEQ = ((6U << 3) + 4),
SELEQZ_S = ((6U << 3) + 5),
TNE = ((6U << 3) + 6),
SELNEZ_S = ((6U << 3) + 7),
// Multiply integers in r6.
MUL_MUH = ((3U << 3) + 0), // MUL, MUH.
MUL_MUH_U = ((3U << 3) + 1), // MUL_U, MUH_U.
RINT = ((3U << 3) + 2),
MUL_OP = ((0U << 3) + 2),
MUH_OP = ((0U << 3) + 3),
DIV_OP = ((0U << 3) + 2),
MOD_OP = ((0U << 3) + 3),
DIV_MOD = ((3U << 3) + 2),
DIV_MOD_U = ((3U << 3) + 3),
// SPECIAL2 Encoding of Function Field.
MUL = ((0U << 3) + 2),
CLZ = ((4U << 3) + 0),
CLO = ((4U << 3) + 1),
// SPECIAL3 Encoding of Function Field.
EXT = ((0U << 3) + 0),
INS = ((0U << 3) + 4),
BSHFL = ((4U << 3) + 0),
SC_R6 = ((4U << 3) + 6),
LL_R6 = ((6U << 3) + 6),
// SPECIAL3 Encoding of sa Field.
BITSWAP = ((0U << 3) + 0),
ALIGN = ((0U << 3) + 2),
WSBH = ((0U << 3) + 2),
SEB = ((2U << 3) + 0),
SEH = ((3U << 3) + 0),
// REGIMM encoding of rt Field.
BLTZ = ((0U << 3) + 0) << 16,
BGEZ = ((0U << 3) + 1) << 16,
BLTZAL = ((2U << 3) + 0) << 16,
BGEZAL = ((2U << 3) + 1) << 16,
BGEZALL = ((2U << 3) + 3) << 16,
// COP1 Encoding of rs Field.
MFC1 = ((0U << 3) + 0) << 21,
CFC1 = ((0U << 3) + 2) << 21,
MFHC1 = ((0U << 3) + 3) << 21,
MTC1 = ((0U << 3) + 4) << 21,
CTC1 = ((0U << 3) + 6) << 21,
MTHC1 = ((0U << 3) + 7) << 21,
BC1 = ((1U << 3) + 0) << 21,
S = ((2U << 3) + 0) << 21,
D = ((2U << 3) + 1) << 21,
W = ((2U << 3) + 4) << 21,
L = ((2U << 3) + 5) << 21,
PS = ((2U << 3) + 6) << 21,
// COP1 Encoding of Function Field When rs=S.
ADD_S = ((0U << 3) + 0),
SUB_S = ((0U << 3) + 1),
MUL_S = ((0U << 3) + 2),
DIV_S = ((0U << 3) + 3),
ABS_S = ((0U << 3) + 5),
SQRT_S = ((0U << 3) + 4),
MOV_S = ((0U << 3) + 6),
NEG_S = ((0U << 3) + 7),
ROUND_L_S = ((1U << 3) + 0),
TRUNC_L_S = ((1U << 3) + 1),
CEIL_L_S = ((1U << 3) + 2),
FLOOR_L_S = ((1U << 3) + 3),
ROUND_W_S = ((1U << 3) + 4),
TRUNC_W_S = ((1U << 3) + 5),
CEIL_W_S = ((1U << 3) + 6),
FLOOR_W_S = ((1U << 3) + 7),
RECIP_S = ((2U << 3) + 5),
RSQRT_S = ((2U << 3) + 6),
MADDF_S = ((3U << 3) + 0),
MSUBF_S = ((3U << 3) + 1),
CLASS_S = ((3U << 3) + 3),
CVT_D_S = ((4U << 3) + 1),
CVT_W_S = ((4U << 3) + 4),
CVT_L_S = ((4U << 3) + 5),
CVT_PS_S = ((4U << 3) + 6),
// COP1 Encoding of Function Field When rs=D.
ADD_D = ((0U << 3) + 0),
SUB_D = ((0U << 3) + 1),
MUL_D = ((0U << 3) + 2),
DIV_D = ((0U << 3) + 3),
SQRT_D = ((0U << 3) + 4),
ABS_D = ((0U << 3) + 5),
MOV_D = ((0U << 3) + 6),
NEG_D = ((0U << 3) + 7),
ROUND_L_D = ((1U << 3) + 0),
TRUNC_L_D = ((1U << 3) + 1),
CEIL_L_D = ((1U << 3) + 2),
FLOOR_L_D = ((1U << 3) + 3),
ROUND_W_D = ((1U << 3) + 4),
TRUNC_W_D = ((1U << 3) + 5),
CEIL_W_D = ((1U << 3) + 6),
FLOOR_W_D = ((1U << 3) + 7),
RECIP_D = ((2U << 3) + 5),
RSQRT_D = ((2U << 3) + 6),
MADDF_D = ((3U << 3) + 0),
MSUBF_D = ((3U << 3) + 1),
CLASS_D = ((3U << 3) + 3),
MIN = ((3U << 3) + 4),
MINA = ((3U << 3) + 5),
MAX = ((3U << 3) + 6),
MAXA = ((3U << 3) + 7),
CVT_S_D = ((4U << 3) + 0),
CVT_W_D = ((4U << 3) + 4),
CVT_L_D = ((4U << 3) + 5),
C_F_D = ((6U << 3) + 0),
C_UN_D = ((6U << 3) + 1),
C_EQ_D = ((6U << 3) + 2),
C_UEQ_D = ((6U << 3) + 3),
C_OLT_D = ((6U << 3) + 4),
C_ULT_D = ((6U << 3) + 5),
C_OLE_D = ((6U << 3) + 6),
C_ULE_D = ((6U << 3) + 7),
// COP1 Encoding of Function Field When rs=W or L.
CVT_S_W = ((4U << 3) + 0),
CVT_D_W = ((4U << 3) + 1),
CVT_S_L = ((4U << 3) + 0),
CVT_D_L = ((4U << 3) + 1),
BC1EQZ = ((2U << 2) + 1) << 21,
BC1NEZ = ((3U << 2) + 1) << 21,
// COP1 CMP positive predicates Bit 5..4 = 00.
CMP_AF = ((0U << 3) + 0),
CMP_UN = ((0U << 3) + 1),
CMP_EQ = ((0U << 3) + 2),
CMP_UEQ = ((0U << 3) + 3),
CMP_LT = ((0U << 3) + 4),
CMP_ULT = ((0U << 3) + 5),
CMP_LE = ((0U << 3) + 6),
CMP_ULE = ((0U << 3) + 7),
CMP_SAF = ((1U << 3) + 0),
CMP_SUN = ((1U << 3) + 1),
CMP_SEQ = ((1U << 3) + 2),
CMP_SUEQ = ((1U << 3) + 3),
CMP_SSLT = ((1U << 3) + 4),
CMP_SSULT = ((1U << 3) + 5),
CMP_SLE = ((1U << 3) + 6),
CMP_SULE = ((1U << 3) + 7),
// COP1 CMP negative predicates Bit 5..4 = 01.
CMP_AT = ((2U << 3) + 0), // Reserved, not implemented.
CMP_OR = ((2U << 3) + 1),
CMP_UNE = ((2U << 3) + 2),
CMP_NE = ((2U << 3) + 3),
CMP_UGE = ((2U << 3) + 4), // Reserved, not implemented.
CMP_OGE = ((2U << 3) + 5), // Reserved, not implemented.
CMP_UGT = ((2U << 3) + 6), // Reserved, not implemented.
CMP_OGT = ((2U << 3) + 7), // Reserved, not implemented.
CMP_SAT = ((3U << 3) + 0), // Reserved, not implemented.
CMP_SOR = ((3U << 3) + 1),
CMP_SUNE = ((3U << 3) + 2),
CMP_SNE = ((3U << 3) + 3),
CMP_SUGE = ((3U << 3) + 4), // Reserved, not implemented.
CMP_SOGE = ((3U << 3) + 5), // Reserved, not implemented.
CMP_SUGT = ((3U << 3) + 6), // Reserved, not implemented.
CMP_SOGT = ((3U << 3) + 7), // Reserved, not implemented.
SEL = ((2U << 3) + 0),
MOVZ_C = ((2U << 3) + 2),
MOVN_C = ((2U << 3) + 3),
SELEQZ_C = ((2U << 3) + 4), // COP1 on FPR registers.
MOVF = ((2U << 3) + 1), // Function field for MOVT.fmt and MOVF.fmt
SELNEZ_C = ((2U << 3) + 7), // COP1 on FPR registers.
// COP1 Encoding of Function Field When rs=PS.
// COP1X Encoding of Function Field.
MADD_S = ((4U << 3) + 0),
MADD_D = ((4U << 3) + 1),
MSUB_S = ((5U << 3) + 0),
MSUB_D = ((5U << 3) + 1),
// PCREL Encoding of rt Field.
ADDIUPC = ((0U << 2) + 0),
LWPC = ((0U << 2) + 1),
AUIPC = ((3U << 3) + 6),
ALUIPC = ((3U << 3) + 7),
// POP66 Encoding of rs Field.
JIC = ((0U << 5) + 0),
// POP76 Encoding of rs Field.
JIALC = ((0U << 5) + 0),
// COP1 Encoding of rs Field for MSA Branch Instructions
BZ_V = (((1U << 3) + 3) << kRsShift),
BNZ_V = (((1U << 3) + 7) << kRsShift),
BZ_B = (((3U << 3) + 0) << kRsShift),
BZ_H = (((3U << 3) + 1) << kRsShift),
BZ_W = (((3U << 3) + 2) << kRsShift),
BZ_D = (((3U << 3) + 3) << kRsShift),
BNZ_B = (((3U << 3) + 4) << kRsShift),
BNZ_H = (((3U << 3) + 5) << kRsShift),
BNZ_W = (((3U << 3) + 6) << kRsShift),
BNZ_D = (((3U << 3) + 7) << kRsShift),
// MSA: Operation Field for MI10 Instruction Formats
MSA_LD = (8U << 2),
MSA_ST = (9U << 2),
LD_B = ((8U << 2) + 0),
LD_H = ((8U << 2) + 1),
LD_W = ((8U << 2) + 2),
LD_D = ((8U << 2) + 3),
ST_B = ((9U << 2) + 0),
ST_H = ((9U << 2) + 1),
ST_W = ((9U << 2) + 2),
ST_D = ((9U << 2) + 3),
// MSA: Operation Field for I5 Instruction Format
ADDVI = ((0U << 23) + 6),
SUBVI = ((1U << 23) + 6),
MAXI_S = ((2U << 23) + 6),
MAXI_U = ((3U << 23) + 6),
MINI_S = ((4U << 23) + 6),
MINI_U = ((5U << 23) + 6),
CEQI = ((0U << 23) + 7),
CLTI_S = ((2U << 23) + 7),
CLTI_U = ((3U << 23) + 7),
CLEI_S = ((4U << 23) + 7),
CLEI_U = ((5U << 23) + 7),
LDI = ((6U << 23) + 7), // I10 instruction format
I5_DF_b = (0U << 21),
I5_DF_h = (1U << 21),
I5_DF_w = (2U << 21),
I5_DF_d = (3U << 21),
// MSA: Operation Field for I8 Instruction Format
ANDI_B = ((0U << 24) + 0),
ORI_B = ((1U << 24) + 0),
NORI_B = ((2U << 24) + 0),
XORI_B = ((3U << 24) + 0),
BMNZI_B = ((0U << 24) + 1),
BMZI_B = ((1U << 24) + 1),
BSELI_B = ((2U << 24) + 1),
SHF_B = ((0U << 24) + 2),
SHF_H = ((1U << 24) + 2),
SHF_W = ((2U << 24) + 2),
MSA_VEC_2R_2RF_MINOR = ((3U << 3) + 6),
// MSA: Operation Field for VEC Instruction Formats
AND_V = (((0U << 2) + 0) << 21),
OR_V = (((0U << 2) + 1) << 21),
NOR_V = (((0U << 2) + 2) << 21),
XOR_V = (((0U << 2) + 3) << 21),
BMNZ_V = (((1U << 2) + 0) << 21),
BMZ_V = (((1U << 2) + 1) << 21),
BSEL_V = (((1U << 2) + 2) << 21),
// MSA: Operation Field for 2R Instruction Formats
MSA_2R_FORMAT = (((6U << 2) + 0) << 21),
FILL = (0U << 18),
PCNT = (1U << 18),
NLOC = (2U << 18),
NLZC = (3U << 18),
MSA_2R_DF_b = (0U << 16),
MSA_2R_DF_h = (1U << 16),
MSA_2R_DF_w = (2U << 16),
MSA_2R_DF_d = (3U << 16),
// MSA: Operation Field for 2RF Instruction Formats
MSA_2RF_FORMAT = (((6U << 2) + 1) << 21),
FCLASS = (0U << 17),
FTRUNC_S = (1U << 17),
FTRUNC_U = (2U << 17),
FSQRT = (3U << 17),
FRSQRT = (4U << 17),
FRCP = (5U << 17),
FRINT = (6U << 17),
FLOG2 = (7U << 17),
FEXUPL = (8U << 17),
FEXUPR = (9U << 17),
FFQL = (10U << 17),
FFQR = (11U << 17),
FTINT_S = (12U << 17),
FTINT_U = (13U << 17),
FFINT_S = (14U << 17),
FFINT_U = (15U << 17),
MSA_2RF_DF_w = (0U << 16),
MSA_2RF_DF_d = (1U << 16),
// MSA: Operation Field for 3R Instruction Format
SLL_MSA = ((0U << 23) + 13),
SRA_MSA = ((1U << 23) + 13),
SRL_MSA = ((2U << 23) + 13),
BCLR = ((3U << 23) + 13),
BSET = ((4U << 23) + 13),
BNEG = ((5U << 23) + 13),
BINSL = ((6U << 23) + 13),
BINSR = ((7U << 23) + 13),
ADDV = ((0U << 23) + 14),
SUBV = ((1U << 23) + 14),
MAX_S = ((2U << 23) + 14),
MAX_U = ((3U << 23) + 14),
MIN_S = ((4U << 23) + 14),
MIN_U = ((5U << 23) + 14),
MAX_A = ((6U << 23) + 14),
MIN_A = ((7U << 23) + 14),
CEQ = ((0U << 23) + 15),
CLT_S = ((2U << 23) + 15),
CLT_U = ((3U << 23) + 15),
CLE_S = ((4U << 23) + 15),
CLE_U = ((5U << 23) + 15),
ADD_A = ((0U << 23) + 16),
ADDS_A = ((1U << 23) + 16),
ADDS_S = ((2U << 23) + 16),
ADDS_U = ((3U << 23) + 16),
AVE_S = ((4U << 23) + 16),
AVE_U = ((5U << 23) + 16),
AVER_S = ((6U << 23) + 16),
AVER_U = ((7U << 23) + 16),
SUBS_S = ((0U << 23) + 17),
SUBS_U = ((1U << 23) + 17),
SUBSUS_U = ((2U << 23) + 17),
SUBSUU_S = ((3U << 23) + 17),
ASUB_S = ((4U << 23) + 17),
ASUB_U = ((5U << 23) + 17),
MULV = ((0U << 23) + 18),
MADDV = ((1U << 23) + 18),
MSUBV = ((2U << 23) + 18),
DIV_S_MSA = ((4U << 23) + 18),
DIV_U = ((5U << 23) + 18),
MOD_S = ((6U << 23) + 18),
MOD_U = ((7U << 23) + 18),
DOTP_S = ((0U << 23) + 19),
DOTP_U = ((1U << 23) + 19),
DPADD_S = ((2U << 23) + 19),
DPADD_U = ((3U << 23) + 19),
DPSUB_S = ((4U << 23) + 19),
DPSUB_U = ((5U << 23) + 19),
SLD = ((0U << 23) + 20),
SPLAT = ((1U << 23) + 20),
PCKEV = ((2U << 23) + 20),
PCKOD = ((3U << 23) + 20),
ILVL = ((4U << 23) + 20),
ILVR = ((5U << 23) + 20),
ILVEV = ((6U << 23) + 20),
ILVOD = ((7U << 23) + 20),
VSHF = ((0U << 23) + 21),
SRAR = ((1U << 23) + 21),
SRLR = ((2U << 23) + 21),
HADD_S = ((4U << 23) + 21),
HADD_U = ((5U << 23) + 21),
HSUB_S = ((6U << 23) + 21),
HSUB_U = ((7U << 23) + 21),
MSA_3R_DF_b = (0U << 21),
MSA_3R_DF_h = (1U << 21),
MSA_3R_DF_w = (2U << 21),
MSA_3R_DF_d = (3U << 21),
// MSA: Operation Field for 3RF Instruction Format
FCAF = ((0U << 22) + 26),
FCUN = ((1U << 22) + 26),
FCEQ = ((2U << 22) + 26),
FCUEQ = ((3U << 22) + 26),
FCLT = ((4U << 22) + 26),
FCULT = ((5U << 22) + 26),
FCLE = ((6U << 22) + 26),
FCULE = ((7U << 22) + 26),
FSAF = ((8U << 22) + 26),
FSUN = ((9U << 22) + 26),
FSEQ = ((10U << 22) + 26),
FSUEQ = ((11U << 22) + 26),
FSLT = ((12U << 22) + 26),
FSULT = ((13U << 22) + 26),
FSLE = ((14U << 22) + 26),
FSULE = ((15U << 22) + 26),
FADD = ((0U << 22) + 27),
FSUB = ((1U << 22) + 27),
FMUL = ((2U << 22) + 27),
FDIV = ((3U << 22) + 27),
FMADD = ((4U << 22) + 27),
FMSUB = ((5U << 22) + 27),
FEXP2 = ((7U << 22) + 27),
FEXDO = ((8U << 22) + 27),
FTQ = ((10U << 22) + 27),
FMIN = ((12U << 22) + 27),
FMIN_A = ((13U << 22) + 27),
FMAX = ((14U << 22) + 27),
FMAX_A = ((15U << 22) + 27),
FCOR = ((1U << 22) + 28),
FCUNE = ((2U << 22) + 28),
FCNE = ((3U << 22) + 28),
MUL_Q = ((4U << 22) + 28),
MADD_Q = ((5U << 22) + 28),
MSUB_Q = ((6U << 22) + 28),
FSOR = ((9U << 22) + 28),
FSUNE = ((10U << 22) + 28),
FSNE = ((11U << 22) + 28),
MULR_Q = ((12U << 22) + 28),
MADDR_Q = ((13U << 22) + 28),
MSUBR_Q = ((14U << 22) + 28),
// MSA: Operation Field for ELM Instruction Format
MSA_ELM_MINOR = ((3U << 3) + 1),
SLDI = (0U << 22),
CTCMSA = ((0U << 22) | (62U << 16)),
SPLATI = (1U << 22),
CFCMSA = ((1U << 22) | (62U << 16)),
COPY_S = (2U << 22),
MOVE_V = ((2U << 22) | (62U << 16)),
COPY_U = (3U << 22),
INSERT = (4U << 22),
INSVE = (5U << 22),
ELM_DF_B = ((0U << 4) << 16),
ELM_DF_H = ((4U << 3) << 16),
ELM_DF_W = ((12U << 2) << 16),
ELM_DF_D = ((28U << 1) << 16),
// MSA: Operation Field for BIT Instruction Format
SLLI = ((0U << 23) + 9),
SRAI = ((1U << 23) + 9),
SRLI = ((2U << 23) + 9),
BCLRI = ((3U << 23) + 9),
BSETI = ((4U << 23) + 9),
BNEGI = ((5U << 23) + 9),
BINSLI = ((6U << 23) + 9),
BINSRI = ((7U << 23) + 9),
SAT_S = ((0U << 23) + 10),
SAT_U = ((1U << 23) + 10),
SRARI = ((2U << 23) + 10),
SRLRI = ((3U << 23) + 10),
BIT_DF_b = ((14U << 3) << 16),
BIT_DF_h = ((6U << 4) << 16),
BIT_DF_w = ((2U << 5) << 16),
BIT_DF_d = ((0U << 6) << 16),
nullptrSF = 0U
};
enum MSAMinorOpcode : uint32_t {
kMsaMinorUndefined = 0,
kMsaMinorI8,
kMsaMinorI5,
kMsaMinorI10,
kMsaMinorBIT,
kMsaMinor3R,
kMsaMinor3RF,
kMsaMinorELM,
kMsaMinorVEC,
kMsaMinor2R,
kMsaMinor2RF,
kMsaMinorMI10
};
// ----- Emulated conditions.
// On MIPS we use this enum to abstract from conditional branch instructions.
// The 'U' prefix is used to specify unsigned comparisons.
// Opposite conditions must be paired as odd/even numbers
// because 'NegateCondition' function flips LSB to negate condition.
enum Condition {
// Any value < 0 is considered no_condition.
kNoCondition = -1,
overflow = 0,
no_overflow = 1,
Uless = 2,
Ugreater_equal = 3,
Uless_equal = 4,
Ugreater = 5,
equal = 6,
not_equal = 7, // Unordered or Not Equal.
negative = 8,
positive = 9,
parity_even = 10,
parity_odd = 11,
less = 12,
greater_equal = 13,
less_equal = 14,
greater = 15,
ueq = 16, // Unordered or Equal.
ogl = 17, // Ordered and Not Equal.
cc_always = 18,
// Aliases.
carry = Uless,
not_carry = Ugreater_equal,
zero = equal,
eq = equal,
not_zero = not_equal,
ne = not_equal,
nz = not_equal,
sign = negative,
not_sign = positive,
mi = negative,
pl = positive,
hi = Ugreater,
ls = Uless_equal,
ge = greater_equal,
lt = less,
gt = greater,
le = less_equal,
hs = Ugreater_equal,
lo = Uless,
al = cc_always,
ult = Uless,
uge = Ugreater_equal,
ule = Uless_equal,
ugt = Ugreater,
cc_default = kNoCondition
};
// Returns the equivalent of !cc.
// Negation of the default kNoCondition (-1) results in a non-default
// no_condition value (-2). As long as tests for no_condition check
// for condition < 0, this will work as expected.
inline Condition NegateCondition(Condition cc) {
DCHECK(cc != cc_always);
return static_cast<Condition>(cc ^ 1);
}
inline Condition NegateFpuCondition(Condition cc) {
DCHECK(cc != cc_always);
switch (cc) {
case ult:
return ge;
case ugt:
return le;
case uge:
return lt;
case ule:
return gt;
case lt:
return uge;
case gt:
return ule;
case ge:
return ult;
case le:
return ugt;
case eq:
return ne;
case ne:
return eq;
case ueq:
return ogl;
case ogl:
return ueq;
default:
return cc;
}
}
enum MSABranchCondition {
all_not_zero = 0, // Branch If All Elements Are Not Zero
one_elem_not_zero, // Branch If At Least One Element of Any Format Is Not
// Zero
one_elem_zero, // Branch If At Least One Element Is Zero
all_zero // Branch If All Elements of Any Format Are Zero
};
inline MSABranchCondition NegateMSABranchCondition(MSABranchCondition cond) {
switch (cond) {
case all_not_zero:
return one_elem_zero;
case one_elem_not_zero:
return all_zero;
case one_elem_zero:
return all_not_zero;
case all_zero:
return one_elem_not_zero;
default:
return cond;
}
}
enum MSABranchDF {
MSA_BRANCH_B = 0,
MSA_BRANCH_H,
MSA_BRANCH_W,
MSA_BRANCH_D,
MSA_BRANCH_V
};
// ----- Coprocessor conditions.
enum FPUCondition {
kNoFPUCondition = -1,
F = 0x00, // False.
UN = 0x01, // Unordered.
EQ = 0x02, // Equal.
UEQ = 0x03, // Unordered or Equal.
OLT = 0x04, // Ordered or Less Than, on Mips release < 6.
LT = 0x04, // Ordered or Less Than, on Mips release >= 6.
ULT = 0x05, // Unordered or Less Than.
OLE = 0x06, // Ordered or Less Than or Equal, on Mips release < 6.
LE = 0x06, // Ordered or Less Than or Equal, on Mips release >= 6.
ULE = 0x07, // Unordered or Less Than or Equal.
// Following constants are available on Mips release >= 6 only.
ORD = 0x11, // Ordered, on Mips release >= 6.
UNE = 0x12, // Not equal, on Mips release >= 6.
NE = 0x13, // Ordered Greater Than or Less Than. on Mips >= 6 only.
};
// FPU rounding modes.
enum FPURoundingMode {
RN = 0 << 0, // Round to Nearest.
RZ = 1 << 0, // Round towards zero.
RP = 2 << 0, // Round towards Plus Infinity.
RM = 3 << 0, // Round towards Minus Infinity.
// Aliases.
kRoundToNearest = RN,
kRoundToZero = RZ,
kRoundToPlusInf = RP,
kRoundToMinusInf = RM,
mode_round = RN,
mode_ceil = RP,
mode_floor = RM,
mode_trunc = RZ
};
const uint32_t kFPURoundingModeMask = 3 << 0;
enum CheckForInexactConversion {
kCheckForInexactConversion,
kDontCheckForInexactConversion
};
enum class MaxMinKind : int { kMin = 0, kMax = 1 };
// your_sha256_hash-------------
// Hints.
// Branch hints are not used on the MIPS. They are defined so that they can
// appear in shared function signatures, but will be ignored in MIPS
// implementations.
enum Hint { no_hint = 0 };
inline Hint NegateHint(Hint hint) { return no_hint; }
// your_sha256_hash-------------
// Specific instructions, constants, and masks.
// These constants are declared in assembler-mips.cc, as they use named
// registers and other constants.
// addiu(sp, sp, 4) aka Pop() operation or part of Pop(r)
// operations as post-increment of sp.
extern const Instr kPopInstruction;
// addiu(sp, sp, -4) part of Push(r) operation as pre-decrement of sp.
extern const Instr kPushInstruction;
// sw(r, MemOperand(sp, 0))
extern const Instr kPushRegPattern;
// lw(r, MemOperand(sp, 0))
extern const Instr kPopRegPattern;
extern const Instr kLwRegFpOffsetPattern;
extern const Instr kSwRegFpOffsetPattern;
extern const Instr kLwRegFpNegOffsetPattern;
extern const Instr kSwRegFpNegOffsetPattern;
// A mask for the Rt register for push, pop, lw, sw instructions.
extern const Instr kRtMask;
extern const Instr kLwSwInstrTypeMask;
extern const Instr kLwSwInstrArgumentMask;
extern const Instr kLwSwOffsetMask;
// Break 0xfffff, reserved for redirected real time call.
const Instr rtCallRedirInstr = SPECIAL | BREAK | call_rt_redirected << 6;
// A nop instruction. (Encoding of sll 0 0 0).
const Instr nopInstr = 0;
static constexpr uint64_t OpcodeToBitNumber(Opcode opcode) {
return 1ULL << (static_cast<uint32_t>(opcode) >> kOpcodeShift);
}
constexpr uint8_t kInstrSize = 4;
constexpr uint8_t kInstrSizeLog2 = 2;
class InstructionBase {
public:
enum {
// On MIPS PC cannot actually be directly accessed. We behave as if PC was
// always the value of the current instruction being executed.
kPCReadOffset = 0
};
// Instruction type.
enum Type { kRegisterType, kImmediateType, kJumpType, kUnsupported = -1 };
// Get the raw instruction bits.
inline Instr InstructionBits() const {
return *reinterpret_cast<const Instr*>(this);
}
// Set the raw instruction bits to value.
inline void SetInstructionBits(Instr value) {
*reinterpret_cast<Instr*>(this) = value;
}
// Read one particular bit out of the instruction bits.
inline int Bit(int nr) const { return (InstructionBits() >> nr) & 1; }
// Read a bit field out of the instruction bits.
inline int Bits(int hi, int lo) const {
return (InstructionBits() >> lo) & ((2U << (hi - lo)) - 1);
}
static constexpr uint64_t kOpcodeImmediateTypeMask =
OpcodeToBitNumber(REGIMM) | OpcodeToBitNumber(BEQ) |
OpcodeToBitNumber(BNE) | OpcodeToBitNumber(BLEZ) |
OpcodeToBitNumber(BGTZ) | OpcodeToBitNumber(ADDI) |
OpcodeToBitNumber(DADDI) | OpcodeToBitNumber(ADDIU) |
OpcodeToBitNumber(SLTI) | OpcodeToBitNumber(SLTIU) |
OpcodeToBitNumber(ANDI) | OpcodeToBitNumber(ORI) |
OpcodeToBitNumber(XORI) | OpcodeToBitNumber(LUI) |
OpcodeToBitNumber(BEQL) | OpcodeToBitNumber(BNEL) |
OpcodeToBitNumber(BLEZL) | OpcodeToBitNumber(BGTZL) |
OpcodeToBitNumber(POP66) | OpcodeToBitNumber(POP76) |
OpcodeToBitNumber(LB) | OpcodeToBitNumber(LH) | OpcodeToBitNumber(LWL) |
OpcodeToBitNumber(LW) | OpcodeToBitNumber(LBU) | OpcodeToBitNumber(LHU) |
OpcodeToBitNumber(LWR) | OpcodeToBitNumber(SB) | OpcodeToBitNumber(SH) |
OpcodeToBitNumber(SWL) | OpcodeToBitNumber(SW) | OpcodeToBitNumber(SWR) |
OpcodeToBitNumber(LWC1) | OpcodeToBitNumber(LDC1) |
OpcodeToBitNumber(SWC1) | OpcodeToBitNumber(SDC1) |
OpcodeToBitNumber(PCREL) | OpcodeToBitNumber(BC) |
OpcodeToBitNumber(BALC);
#define FunctionFieldToBitNumber(function) (1ULL << function)
static const uint64_t kFunctionFieldRegisterTypeMask =
FunctionFieldToBitNumber(JR) | FunctionFieldToBitNumber(JALR) |
FunctionFieldToBitNumber(BREAK) | FunctionFieldToBitNumber(SLL) |
FunctionFieldToBitNumber(SRL) | FunctionFieldToBitNumber(SRA) |
FunctionFieldToBitNumber(SLLV) | FunctionFieldToBitNumber(SRLV) |
FunctionFieldToBitNumber(SRAV) | FunctionFieldToBitNumber(LSA) |
FunctionFieldToBitNumber(MFHI) | FunctionFieldToBitNumber(MFLO) |
FunctionFieldToBitNumber(MULT) | FunctionFieldToBitNumber(MULTU) |
FunctionFieldToBitNumber(DIV) | FunctionFieldToBitNumber(DIVU) |
FunctionFieldToBitNumber(ADD) | FunctionFieldToBitNumber(ADDU) |
FunctionFieldToBitNumber(SUB) | FunctionFieldToBitNumber(SUBU) |
FunctionFieldToBitNumber(AND) | FunctionFieldToBitNumber(OR) |
FunctionFieldToBitNumber(XOR) | FunctionFieldToBitNumber(NOR) |
FunctionFieldToBitNumber(SLT) | FunctionFieldToBitNumber(SLTU) |
FunctionFieldToBitNumber(TGE) | FunctionFieldToBitNumber(TGEU) |
FunctionFieldToBitNumber(TLT) | FunctionFieldToBitNumber(TLTU) |
FunctionFieldToBitNumber(TEQ) | FunctionFieldToBitNumber(TNE) |
FunctionFieldToBitNumber(MOVZ) | FunctionFieldToBitNumber(MOVN) |
FunctionFieldToBitNumber(MOVCI) | FunctionFieldToBitNumber(SELEQZ_S) |
FunctionFieldToBitNumber(SELNEZ_S) | FunctionFieldToBitNumber(SYNC);
// Accessors for the different named fields used in the MIPS encoding.
inline Opcode OpcodeValue() const {
return static_cast<Opcode>(
Bits(kOpcodeShift + kOpcodeBits - 1, kOpcodeShift));
}
inline int FunctionFieldRaw() const {
return InstructionBits() & kFunctionFieldMask;
}
// Return the fields at their original place in the instruction encoding.
inline Opcode OpcodeFieldRaw() const {
return static_cast<Opcode>(InstructionBits() & kOpcodeMask);
}
// Safe to call within InstructionType().
inline int RsFieldRawNoAssert() const {
return InstructionBits() & kRsFieldMask;
}
inline int SaFieldRaw() const { return InstructionBits() & kSaFieldMask; }
// Get the encoding type of the instruction.
inline Type InstructionType() const;
inline MSAMinorOpcode MSAMinorOpcodeField() const {
int op = this->FunctionFieldRaw();
switch (op) {
case 0:
case 1:
case 2:
return kMsaMinorI8;
case 6:
return kMsaMinorI5;
case 7:
return (((this->InstructionBits() & kMsaI5I10Mask) == LDI)
? kMsaMinorI10
: kMsaMinorI5);
case 9:
case 10:
return kMsaMinorBIT;
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
case 19:
case 20:
case 21:
return kMsaMinor3R;
case 25:
return kMsaMinorELM;
case 26:
case 27:
case 28:
return kMsaMinor3RF;
case 30:
switch (this->RsFieldRawNoAssert()) {
case MSA_2R_FORMAT:
return kMsaMinor2R;
case MSA_2RF_FORMAT:
return kMsaMinor2RF;
default:
return kMsaMinorVEC;
}
break;
case 32:
case 33:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
return kMsaMinorMI10;
default:
return kMsaMinorUndefined;
}
}
protected:
InstructionBase() {}
};
template <class T>
class InstructionGetters : public T {
public:
inline int RsValue() const {
DCHECK(this->InstructionType() == InstructionBase::kRegisterType ||
this->InstructionType() == InstructionBase::kImmediateType);
return InstructionBase::Bits(kRsShift + kRsBits - 1, kRsShift);
}
inline int RtValue() const {
DCHECK(this->InstructionType() == InstructionBase::kRegisterType ||
this->InstructionType() == InstructionBase::kImmediateType);
return this->Bits(kRtShift + kRtBits - 1, kRtShift);
}
inline int RdValue() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kRegisterType);
return this->Bits(kRdShift + kRdBits - 1, kRdShift);
}
inline int BaseValue() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(kBaseShift + kBaseBits - 1, kBaseShift);
}
inline int SaValue() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kRegisterType);
return this->Bits(kSaShift + kSaBits - 1, kSaShift);
}
inline int LsaSaValue() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kRegisterType);
return this->Bits(kSaShift + kLsaSaBits - 1, kSaShift);
}
inline int FunctionValue() const {
DCHECK(this->InstructionType() == InstructionBase::kRegisterType ||
this->InstructionType() == InstructionBase::kImmediateType);
return this->Bits(kFunctionShift + kFunctionBits - 1, kFunctionShift);
}
inline int FdValue() const {
return this->Bits(kFdShift + kFdBits - 1, kFdShift);
}
inline int FsValue() const {
return this->Bits(kFsShift + kFsBits - 1, kFsShift);
}
inline int FtValue() const {
return this->Bits(kFtShift + kFtBits - 1, kFtShift);
}
inline int FrValue() const {
return this->Bits(kFrShift + kFrBits - 1, kFrShift);
}
inline int WdValue() const {
return this->Bits(kWdShift + kWdBits - 1, kWdShift);
}
inline int WsValue() const {
return this->Bits(kWsShift + kWsBits - 1, kWsShift);
}
inline int WtValue() const {
return this->Bits(kWtShift + kWtBits - 1, kWtShift);
}
inline int Bp2Value() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kRegisterType);
return this->Bits(kBp2Shift + kBp2Bits - 1, kBp2Shift);
}
// Float Compare condition code instruction bits.
inline int FCccValue() const {
return this->Bits(kFCccShift + kFCccBits - 1, kFCccShift);
}
// Float Branch condition code instruction bits.
inline int FBccValue() const {
return this->Bits(kFBccShift + kFBccBits - 1, kFBccShift);
}
// Float Branch true/false instruction bit.
inline int FBtrueValue() const {
return this->Bits(kFBtrueShift + kFBtrueBits - 1, kFBtrueShift);
}
// Return the fields at their original place in the instruction encoding.
inline Opcode OpcodeFieldRaw() const {
return static_cast<Opcode>(this->InstructionBits() & kOpcodeMask);
}
inline int RsFieldRaw() const {
DCHECK(this->InstructionType() == InstructionBase::kRegisterType ||
this->InstructionType() == InstructionBase::kImmediateType);
return this->InstructionBits() & kRsFieldMask;
}
inline int RtFieldRaw() const {
DCHECK(this->InstructionType() == InstructionBase::kRegisterType ||
this->InstructionType() == InstructionBase::kImmediateType);
return this->InstructionBits() & kRtFieldMask;
}
inline int RdFieldRaw() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kRegisterType);
return this->InstructionBits() & kRdFieldMask;
}
inline int SaFieldRaw() const {
return this->InstructionBits() & kSaFieldMask;
}
inline int FunctionFieldRaw() const {
return this->InstructionBits() & kFunctionFieldMask;
}
// Get the secondary field according to the opcode.
inline int SecondaryValue() const {
Opcode op = this->OpcodeFieldRaw();
switch (op) {
case SPECIAL:
case SPECIAL2:
return FunctionValue();
case COP1:
return RsValue();
case REGIMM:
return RtValue();
default:
return nullptrSF;
}
}
inline int32_t ImmValue(int bits) const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(bits - 1, 0);
}
inline int32_t Imm9Value() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(kImm9Shift + kImm9Bits - 1, kImm9Shift);
}
inline int32_t Imm16Value() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(kImm16Shift + kImm16Bits - 1, kImm16Shift);
}
inline int32_t Imm18Value() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(kImm18Shift + kImm18Bits - 1, kImm18Shift);
}
inline int32_t Imm19Value() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(kImm19Shift + kImm19Bits - 1, kImm19Shift);
}
inline int32_t Imm21Value() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(kImm21Shift + kImm21Bits - 1, kImm21Shift);
}
inline int32_t Imm26Value() const {
DCHECK((this->InstructionType() == InstructionBase::kJumpType) ||
(this->InstructionType() == InstructionBase::kImmediateType));
return this->Bits(kImm26Shift + kImm26Bits - 1, kImm26Shift);
}
inline int32_t MsaImm8Value() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(kMsaImm8Shift + kMsaImm8Bits - 1, kMsaImm8Shift);
}
inline int32_t MsaImm5Value() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(kMsaImm5Shift + kMsaImm5Bits - 1, kMsaImm5Shift);
}
inline int32_t MsaImm10Value() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(kMsaImm10Shift + kMsaImm10Bits - 1, kMsaImm10Shift);
}
inline int32_t MsaImmMI10Value() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(kMsaImmMI10Shift + kMsaImmMI10Bits - 1, kMsaImmMI10Shift);
}
inline int32_t MsaBitDf() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
int32_t df_m = this->Bits(22, 16);
if (((df_m >> 6) & 1U) == 0) {
return 3;
} else if (((df_m >> 5) & 3U) == 2) {
return 2;
} else if (((df_m >> 4) & 7U) == 6) {
return 1;
} else if (((df_m >> 3) & 15U) == 14) {
return 0;
} else {
return -1;
}
}
inline int32_t MsaBitMValue() const {
DCHECK_EQ(this->InstructionType(), InstructionBase::kImmediateType);
return this->Bits(16 + this->MsaBitDf() + 3, 16);
}
inline int32_t MsaElmDf() const {
DCHECK(this->InstructionType() == InstructionBase::kRegisterType ||
this->InstructionType() == InstructionBase::kImmediateType);
int32_t df_n = this->Bits(21, 16);
if (((df_n >> 4) & 3U) == 0) {
return 0;
} else if (((df_n >> 3) & 7U) == 4) {
return 1;
} else if (((df_n >> 2) & 15U) == 12) {
return 2;
} else if (((df_n >> 1) & 31U) == 28) {
return 3;
} else {
return -1;
}
}
inline int32_t MsaElmNValue() const {
DCHECK(this->InstructionType() == InstructionBase::kRegisterType ||
this->InstructionType() == InstructionBase::kImmediateType);
return this->Bits(16 + 4 - this->MsaElmDf(), 16);
}
static bool IsForbiddenAfterBranchInstr(Instr instr);
// Say if the instruction should not be used in a branch delay slot or
// immediately after a compact branch.
inline bool IsForbiddenAfterBranch() const {
return IsForbiddenAfterBranchInstr(this->InstructionBits());
}
inline bool IsForbiddenInBranchDelay() const {
return IsForbiddenAfterBranch();
}
// Say if the instruction 'links'. e.g. jal, bal.
bool IsLinkingInstruction() const;
// Say if the instruction is a break or a trap.
bool IsTrap() const;
inline bool IsMSABranchInstr() const {
if (this->OpcodeFieldRaw() == COP1) {
switch (this->RsFieldRaw()) {
case BZ_V:
case BZ_B:
case BZ_H:
case BZ_W:
case BZ_D:
case BNZ_V:
case BNZ_B:
case BNZ_H:
case BNZ_W:
case BNZ_D:
return true;
default:
return false;
}
}
return false;
}
inline bool IsMSAInstr() const {
if (this->IsMSABranchInstr() || (this->OpcodeFieldRaw() == MSA))
return true;
return false;
}
};
class Instruction : public InstructionGetters<InstructionBase> {
public:
// Instructions are read of out a code stream. The only way to get a
// reference to an instruction is to convert a pointer. There is no way
// to allocate or create instances of class Instruction.
// Use the At(pc) function to create references to Instruction.
static Instruction* At(byte* pc) {
return reinterpret_cast<Instruction*>(pc);
}
private:
// We need to prevent the creation of instances of class Instruction.
DISALLOW_IMPLICIT_CONSTRUCTORS(Instruction);
};
// your_sha256_hash-------------
// MIPS assembly various constants.
// C/C++ argument slots size.
const int kCArgSlotCount = 4;
const int kCArgsSlotsSize = kCArgSlotCount * kInstrSize;
// JS argument slots size.
const int kJSArgsSlotsSize = 0 * kInstrSize;
// Assembly builtins argument slots size.
const int kBArgsSlotsSize = 0 * kInstrSize;
const int kBranchReturnOffset = 2 * kInstrSize;
InstructionBase::Type InstructionBase::InstructionType() const {
switch (OpcodeFieldRaw()) {
case SPECIAL:
if (FunctionFieldToBitNumber(FunctionFieldRaw()) &
kFunctionFieldRegisterTypeMask) {
return kRegisterType;
}
return kUnsupported;
case SPECIAL2:
switch (FunctionFieldRaw()) {
case MUL:
case CLZ:
return kRegisterType;
default:
return kUnsupported;
}
break;
case SPECIAL3:
switch (FunctionFieldRaw()) {
case INS:
case EXT:
return kRegisterType;
case BSHFL: {
int sa = SaFieldRaw() >> kSaShift;
switch (sa) {
case BITSWAP:
case WSBH:
case SEB:
case SEH:
return kRegisterType;
}
sa >>= kBp2Bits;
switch (sa) {
case ALIGN:
return kRegisterType;
default:
return kUnsupported;
}
}
case LL_R6:
case SC_R6: {
DCHECK(IsMipsArchVariant(kMips32r6));
return kImmediateType;
}
default:
return kUnsupported;
}
break;
case COP1: // Coprocessor instructions.
switch (RsFieldRawNoAssert()) {
case BC1: // Branch on coprocessor condition.
case BC1EQZ:
case BC1NEZ:
return kImmediateType;
// MSA Branch instructions
case BZ_V:
case BNZ_V:
case BZ_B:
case BZ_H:
case BZ_W:
case BZ_D:
case BNZ_B:
case BNZ_H:
case BNZ_W:
case BNZ_D:
return kImmediateType;
default:
return kRegisterType;
}
break;
case COP1X:
return kRegisterType;
// 26 bits immediate type instructions. e.g.: j imm26.
case J:
case JAL:
return kJumpType;
case MSA:
switch (MSAMinorOpcodeField()) {
case kMsaMinor3R:
case kMsaMinor3RF:
case kMsaMinorVEC:
case kMsaMinor2R:
case kMsaMinor2RF:
return kRegisterType;
case kMsaMinorELM:
switch (InstructionBits() & kMsaLongerELMMask) {
case CFCMSA:
case CTCMSA:
case MOVE_V:
return kRegisterType;
default:
return kImmediateType;
}
default:
return kImmediateType;
}
default:
return kImmediateType;
}
}
#undef OpcodeToBitNumber
#undef FunctionFieldToBitNumber
// your_sha256_hash-------------
// Instructions.
template <class P>
bool InstructionGetters<P>::IsLinkingInstruction() const {
uint32_t op = this->OpcodeFieldRaw();
switch (op) {
case JAL:
return true;
case POP76:
if (this->RsFieldRawNoAssert() == JIALC)
return true; // JIALC
else
return false; // BNEZC
case REGIMM:
switch (this->RtFieldRaw()) {
case BGEZAL:
case BLTZAL:
return true;
default:
return false;
}
case SPECIAL:
switch (this->FunctionFieldRaw()) {
case JALR:
return true;
default:
return false;
}
default:
return false;
}
}
template <class P>
bool InstructionGetters<P>::IsTrap() const {
if (this->OpcodeFieldRaw() != SPECIAL) {
return false;
} else {
switch (this->FunctionFieldRaw()) {
case BREAK:
case TGE:
case TGEU:
case TLT:
case TLTU:
case TEQ:
case TNE:
return true;
default:
return false;
}
}
}
// static
template <class T>
bool InstructionGetters<T>::IsForbiddenAfterBranchInstr(Instr instr) {
Opcode opcode = static_cast<Opcode>(instr & kOpcodeMask);
switch (opcode) {
case J:
case JAL:
case BEQ:
case BNE:
case BLEZ: // POP06 bgeuc/bleuc, blezalc, bgezalc
case BGTZ: // POP07 bltuc/bgtuc, bgtzalc, bltzalc
case BEQL:
case BNEL:
case BLEZL: // POP26 bgezc, blezc, bgec/blec
case BGTZL: // POP27 bgtzc, bltzc, bltc/bgtc
case BC:
case BALC:
case POP10: // beqzalc, bovc, beqc
case POP30: // bnezalc, bnvc, bnec
case POP66: // beqzc, jic
case POP76: // bnezc, jialc
return true;
case REGIMM:
switch (instr & kRtFieldMask) {
case BLTZ:
case BGEZ:
case BLTZAL:
case BGEZAL:
return true;
default:
return false;
}
break;
case SPECIAL:
switch (instr & kFunctionFieldMask) {
case JR:
case JALR:
return true;
default:
return false;
}
break;
case COP1:
switch (instr & kRsFieldMask) {
case BC1:
case BC1EQZ:
case BC1NEZ:
case BZ_V:
case BZ_B:
case BZ_H:
case BZ_W:
case BZ_D:
case BNZ_V:
case BNZ_B:
case BNZ_H:
case BNZ_W:
case BNZ_D:
return true;
break;
default:
return false;
}
break;
default:
return false;
}
}
} // namespace internal
} // namespace v8
#endif // V8_CODEGEN_MIPS_CONSTANTS_MIPS_H_
```
|
```javascript
import { NextResponse } from 'next/server'
export function middleware(request) {
if (request.nextUrl.pathname.startsWith('/_next/')) return
const res = NextResponse.rewrite(new URL('/', request.url))
res.headers.set('X-From-Middleware', 'true')
return res
}
```
|
Starodubsky (; masculine), Starodubskaya (; feminine), or Starodubskoye (; neuter) is the name of several rural localities in Russia:
Starodubskoye, Sakhalin Oblast, a selo in Dolinsky District of Sakhalin Oblast
Starodubskoye, Stavropol Krai, a selo in Starodubsky Selsoviet of Budyonnovsky District of Stavropol Krai
|
The Strickler Family Farmhouse, also known as the County Farm, is an historic, American home that is located in Springettsbury Township, York County, Pennsylvania.
The home was added to the National Register of Historic Places in 1991.
Description
The farmhouse consists of three sections: a -story, two-bay by one-bay, Germanic-influenced, limestone main house, a -story, brick Georgian-style wing that was built circa 1835, and a two-story brick ell that was built circa 1865.
Also located on the property is the Strickler family cemetery, with burials that date back to the 1700s.
History
Ulrich and Mary Strickler immigrated to Pennsylvania in 1737 and purchased two hundred acres of farmland west of the Susquehanna River from the Penn family. Samuel Strickler was born in the stone house in 1875.
The family sold the farm during the early twentieth century; it was the subsequently sold in 1943 to York County and used for a prison site. For a few years, the federal immigration service used the house for office space, before it went unused. Three generations of family members visited the house in July 2020 after learning of its ancestral link.
NRHP registration, demolition plans, and saving
The home was added to the National Register of Historic Places in 1991.
As of October 2019, the farmhouse faced demolition after York County cancelled its previously-announced plans to move its coroner's office there. Although nearly half a million dollars of repairs, including mold mitigation, were required for continued use of the structure, only $11,000 in donations were obtained for the repairs.
In autumn 2019, York County hired a consulting firm to document the history of the farmhouse. In October 2021, it was announced that the property had been saved from demolition, with county commissioners approving a ninety-nine-year, rent-free lease to Historic York, which will preserve and maintain the building.
Gallery
References
Georgian architecture in Pennsylvania
Houses completed in 1865
Houses in York County, Pennsylvania
Houses on the National Register of Historic Places in Pennsylvania
National Register of Historic Places in York County, Pennsylvania
Springettsbury Township, York County, Pennsylvania
Unused buildings in Pennsylvania
|
```php
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Form\API;
use App\Form\TeamEditForm;
use Symfony\Component\Form\FormBuilderInterface;
final class TeamApiEditForm extends TeamEditForm
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
parent::buildForm($builder, $options);
$builder->remove('users');
}
}
```
|
Saaristattus is a monotypic genus of Malaysian jumping spiders containing the single species, Saaristattus tropicus. It was first described by D. V. Logunov & G. N. Azarkina in 2008, and is found only in Malaysia. The name is a combination of Michael Saaristo and attus, a common suffix for salticid genera, meaning "jumper". The species name means "tropical".
References
Invertebrates of Malaysia
Monotypic Salticidae genera
Salticidae
Spiders of Asia
|
```javascript
Default function parameters
Reflect API in ES6
Strings in ES6
Maps and Sets in ES6
Tail call optimisation in ES6
```
|
```c++
/*
This program is free software; you can redistribute it and/or modify
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, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "consumer.hpp"
#ifdef USE_MYSQL
int
BackupConsumer::create_table_string(const TableS & table,
char * tableName,
char *buf){
int pos = 0;
int pos2 = 0;
char buf2[2048];
pos += sprintf(buf+pos, "%s%s", "CREATE TABLE ", tableName);
pos += sprintf(buf+pos, "%s", "(");
pos2 += sprintf(buf2+pos2, "%s", " primary key(");
for (int j = 0; j < table.getNoOfAttributes(); j++)
{
const AttributeDesc * desc = table[j];
// ndbout << desc->name << ": ";
pos += sprintf(buf+pos, "%s%s", desc->m_column->getName()," ");
switch(desc->m_column->getType()){
case NdbDictionary::Column::Int:
pos += sprintf(buf+pos, "%s", "int");
break;
case NdbDictionary::Column::Unsigned:
pos += sprintf(buf+pos, "%s", "int unsigned");
break;
case NdbDictionary::Column::Float:
pos += sprintf(buf+pos, "%s", "float");
break;
case NdbDictionary::Column::Olddecimal:
case NdbDictionary::Column::Decimal:
pos += sprintf(buf+pos, "%s", "decimal");
break;
case NdbDictionary::Column::Olddecimalunsigned:
case NdbDictionary::Column::Decimalunsigned:
pos += sprintf(buf+pos, "%s", "decimal unsigned");
break;
case NdbDictionary::Column::Char:
pos += sprintf(buf+pos, "%s", "char");
break;
case NdbDictionary::Column::Varchar:
pos += sprintf(buf+pos, "%s", "varchar");
break;
case NdbDictionary::Column::Binary:
pos += sprintf(buf+pos, "%s", "binary");
break;
case NdbDictionary::Column::Varbinary:
pos += sprintf(buf+pos, "%s", "varchar binary");
break;
case NdbDictionary::Column::Bigint:
pos += sprintf(buf+pos, "%s", "bigint");
break;
case NdbDictionary::Column::Bigunsigned:
pos += sprintf(buf+pos, "%s", "bigint unsigned");
break;
case NdbDictionary::Column::Double:
pos += sprintf(buf+pos, "%s", "double");
break;
case NdbDictionary::Column::Datetime:
pos += sprintf(buf+pos, "%s", "datetime");
break;
case NdbDictionary::Column::Date:
pos += sprintf(buf+pos, "%s", "date");
break;
case NdbDictionary::Column::Time:
pos += sprintf(buf+pos, "%s", "time");
break;
case NdbDictionary::Column::Undefined:
// pos += sprintf(buf+pos, "%s", "varchar binary");
return -1;
break;
default:
//pos += sprintf(buf+pos, "%s", "varchar binary");
return -1;
}
if (desc->arraySize > 1) {
int attrSize = desc->arraySize;
pos += sprintf(buf+pos, "%s%u%s",
"(",
attrSize,
")");
}
if (desc->m_column->getPrimaryKey()) {
pos += sprintf(buf+pos, "%s", " not null");
pos2 += sprintf(buf2+pos2, "%s%s", desc->m_column->getName(), ",");
}
pos += sprintf(buf+pos, "%s", ",");
} // for
pos2--; // remove trailing comma
pos2 += sprintf(buf2+pos2, "%s", ")");
// pos--; // remove trailing comma
pos += sprintf(buf+pos, "%s", buf2);
pos += sprintf(buf+pos, "%s", ") type=ndbcluster");
return 0;
}
#endif // USE_MYSQL
```
|
British NVC community OV1 (Viola arvensis - Aphanes microcarpa community) is one of the open habitat communities in the British National Vegetation Classification system. It is one of six arable weed and track-side communities of light, less-fertile acid soils.
It is a widely distributed community. There are no subcommunities.
Community composition
The following constant species are found in this community:
Slender parsley-piert (Aphanes australis)
Annual meadow-grass (Poa annua)
Sheep's sorrel (Rumex acetosella)
Field pansy (Viola arvensis)
Two rare species are associated with the community:
Annual vernal-grass (Anthoxanthum aristatum)
Lesser quaking-grass (Briza minor)
Distribution
This community is typically associated with arable crops on impoverished soils and is now very scarce, both because suitable soils have a localised distribution and because intensive cereal agriculture is not conducive to its development. It is found very locally, mostly in southern and eastern Britain, most often in fields of barley or fallow arable.
References
OV01
|
Songoro is an administrative ward in the Chemba District of the Dodoma Region of Tanzania. In 2016 the Tanzania National Bureau of Statistics report there were 11,685 people in the ward, from 10,751 in 2012.
References
Arumeru District
Wards of Arusha Region
|
```swift
/*
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(s) nor the names of any contributors
may be used to endorse or promote products derived from this software without
specific prior written permission. No license is granted to the trademarks of
the copyright holders even if such marks are included in this software.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import Foundation
import os.log
public struct OCKLog {
/// Controls the log level for all of CareKit. You may set this value from within your CareKit app.
/// To see messages that are helpful for app developers, use `.fault` or `.error`.
/// To see messages that are helpful for framework developers, use `.debug` or `.info`.
public static var level: OSLogType = .debug
}
/// Prints a message to the console that may be useful to app or framework developers.
/// Messages that are intended for app developers should typically be logged at level `.error`.
/// Messages for framework developers can use any appropriate log level.
///
/// Only log messages with a level at or above the value of the global `logLevel` variable will be displayed.
/// No log messages will be displayed when building for production.
///
/// - Parameter level: A level indicating the importance of this log message. Defaults to `.info`
/// - Parameter message: A message to the developer.
/// - Parameter error: An optional error to log.
internal func log(_ level: OSLogType = .info,
_ message: StaticString,
error: Error? = nil,
args: CVarArg...) {
#if DEBUG
guard level.rawValue >= OCKLog.level.rawValue else {
return
}
os_log(message, log: .carekit, type: level, args)
if let error = error {
os_log("Error: %{private}@", log: .carekit,
type: level, error.localizedDescription)
}
#endif
}
extension OSLog {
private static var subsystem = Bundle.main.bundleIdentifier!
static let carekit = OSLog(subsystem: subsystem, category: "CareKit")
}
```
|
```javascript
/**
* @author zhixin wen <wenzhixin2010@gmail.com>
* version: 1.12.1
* path_to_url
*/
(function ($) {
'use strict';
// TOOLS DEFINITION
// ======================
var bootstrapVersion = 3;
try {
bootstrapVersion = parseInt($.fn.dropdown.Constructor.VERSION, 10);
} catch (e) {}
var bs = {
3: {
buttonsClass: 'default',
iconsPrefix: 'glyphicon',
icons: {
paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down',
paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up',
refresh: 'glyphicon-refresh icon-refresh',
toggleOff: 'glyphicon-list-alt icon-list-alt',
toggleOn: 'glyphicon-list-alt icon-list-alt',
columns: 'glyphicon-th icon-th',
detailOpen: 'glyphicon-plus icon-plus',
detailClose: 'glyphicon-minus icon-minus',
fullscreen: 'glyphicon-fullscreen'
},
pullClass: 'pull',
toobarDropdowHtml: ['<ul class="dropdown-menu" role="menu">', '</ul>'],
toobarDropdowItemHtml: '<li role="menuitem"><label>%s</label></li>',
pageDropdownHtml: ['<ul class="dropdown-menu" role="menu">', '</ul>'],
pageDropdownItemHtml: '<li role="menuitem" class="%s"><a href="#">%s</a></li>'
},
4: {
buttonsClass: 'secondary',
iconsPrefix: 'fa',
icons: {
paginationSwitchDown: 'fa-toggle-down',
paginationSwitchUp: 'fa-toggle-up',
refresh: 'fa-refresh',
toggleOff: 'fa-toggle-off',
toggleOn: 'fa-toggle-on',
columns: 'fa-th-list',
detailOpen: 'fa-plus',
detailClose: 'fa-minus',
fullscreen: 'fa-arrows-alt'
},
pullClass: 'float',
toobarDropdowHtml: ['<div class="dropdown-menu dropdown-menu-right">', '</div>'],
toobarDropdowItemHtml: '<label class="dropdown-item">%s</label>',
pageDropdownHtml: ['<div class="dropdown-menu">', '</div>'],
pageDropdownItemHtml: '<a class="dropdown-item %s" href="#">%s</a>'
}
}[bootstrapVersion];
var cachedWidth = null;
// it only does '%s', and return '' when arguments are undefined
var sprintf = function (str) {
var args = arguments,
flag = true,
i = 1;
str = str.replace(/%s/g, function () {
var arg = args[i++];
if (typeof arg === 'undefined') {
flag = false;
return '';
}
return arg;
});
return flag ? str : '';
};
var getPropertyFromOther = function (list, from, to, value) {
var result = '';
$.each(list, function (i, item) {
if (item[from] === value) {
result = item[to];
return false;
}
return true;
});
return result;
};
// path_to_url
var setFieldIndex = function (columns) {
var i, j, k,
totalCol = 0,
flag = [];
for (i = 0; i < columns[0].length; i++) {
totalCol += columns[0][i].colspan || 1;
}
for (i = 0; i < columns.length; i++) {
flag[i] = [];
for (j = 0; j < totalCol; j++) {
flag[i][j] = false;
}
}
for (i = 0; i < columns.length; i++) {
for (j = 0; j < columns[i].length; j++) {
var r = columns[i][j],
rowspan = r.rowspan || 1,
colspan = r.colspan || 1,
index = $.inArray(false, flag[i]);
if (colspan === 1) {
r.fieldIndex = index;
// when field is undefined, use index instead
if (typeof r.field === 'undefined') {
r.field = index;
}
}
for (k = 0; k < rowspan; k++) {
flag[i + k][index] = true;
}
for (k = 0; k < colspan; k++) {
flag[i][index + k] = true;
}
}
}
};
var getScrollBarWidth = function () {
if (cachedWidth === null) {
var inner = $('<p/>').addClass('fixed-table-scroll-inner'),
outer = $('<div/>').addClass('fixed-table-scroll-outer'),
w1, w2;
outer.append(inner);
$('body').append(outer);
w1 = inner[0].offsetWidth;
outer.css('overflow', 'scroll');
w2 = inner[0].offsetWidth;
if (w1 === w2) {
w2 = outer[0].clientWidth;
}
outer.remove();
cachedWidth = w1 - w2;
}
return cachedWidth;
};
var calculateObjectValue = function (self, name, args, defaultValue) {
var func = name;
if (typeof name === 'string') {
// support obj.func1.func2
var names = name.split('.');
if (names.length > 1) {
func = window;
$.each(names, function (i, f) {
func = func[f];
});
} else {
func = window[name];
}
}
if (typeof func === 'object') {
return func;
}
if (typeof func === 'function') {
return func.apply(self, args || []);
}
if (!func && typeof name === 'string' && sprintf.apply(this, [name].concat(args))) {
return sprintf.apply(this, [name].concat(args));
}
return defaultValue;
};
var compareObjects = function (objectA, objectB, compareLength) {
// Create arrays of property names
var getOwnPropertyNames = Object.getOwnPropertyNames || function (obj) {
var arr = [];
for (var k in obj) {
if (obj.hasOwnProperty(k)) {
arr.push(k);
}
}
return arr;
};
var objectAProperties = getOwnPropertyNames(objectA),
objectBProperties = getOwnPropertyNames(objectB),
propName = '';
if (compareLength) {
// If number of properties is different, objects are not equivalent
if (objectAProperties.length !== objectBProperties.length) {
return false;
}
}
for (var i = 0; i < objectAProperties.length; i++) {
propName = objectAProperties[i];
// If the property is not in the object B properties, continue with the next property
if ($.inArray(propName, objectBProperties) > -1) {
// If values of same property are not equal, objects are not equivalent
if (objectA[propName] !== objectB[propName]) {
return false;
}
}
}
// If we made it this far, objects are considered equivalent
return true;
};
var escapeHTML = function (text) {
if (typeof text === 'string') {
return text
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"')
.replace(/'/g, ''')
.replace(/`/g, '`');
}
return text;
};
var getRealDataAttr = function (dataAttr) {
for (var attr in dataAttr) {
var auxAttr = attr.split(/(?=[A-Z])/).join('-').toLowerCase();
if (auxAttr !== attr) {
dataAttr[auxAttr] = dataAttr[attr];
delete dataAttr[attr];
}
}
return dataAttr;
};
var getItemField = function (item, field, escape) {
var value = item;
if (typeof field !== 'string' || item.hasOwnProperty(field)) {
return escape ? escapeHTML(item[field]) : item[field];
}
var props = field.split('.');
for (var p in props) {
if (props.hasOwnProperty(p)) {
value = value && value[props[p]];
}
}
return escape ? escapeHTML(value) : value;
};
var isIEBrowser = function () {
return !!(navigator.userAgent.indexOf("MSIE ") > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./));
};
var objectKeys = function () {
// From path_to_url
if (!Object.keys) {
Object.keys = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),
dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
],
dontEnumsLength = dontEnums.length;
return function(obj) {
if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {
throw new TypeError('Object.keys called on non-object');
}
var result = [], prop, i;
for (prop in obj) {
if (hasOwnProperty.call(obj, prop)) {
result.push(prop);
}
}
if (hasDontEnumBug) {
for (i = 0; i < dontEnumsLength; i++) {
if (hasOwnProperty.call(obj, dontEnums[i])) {
result.push(dontEnums[i]);
}
}
}
return result;
};
}());
}
};
// BOOTSTRAP TABLE CLASS DEFINITION
// ======================
var BootstrapTable = function (el, options) {
this.options = options;
this.$el = $(el);
this.$el_ = this.$el.clone();
this.timeoutId_ = 0;
this.timeoutFooter_ = 0;
this.init();
};
BootstrapTable.DEFAULTS = {
classes: 'table table-hover',
sortClass: undefined,
locale: undefined,
height: undefined,
undefinedText: '-',
sortName: undefined,
sortOrder: 'asc',
sortStable: false,
rememberOrder: false,
striped: false,
columns: [[]],
data: [],
totalField: 'total',
dataField: 'rows',
method: 'get',
url: undefined,
ajax: undefined,
cache: true,
contentType: 'application/json',
dataType: 'json',
ajaxOptions: {},
queryParams: function (params) {
return params;
},
queryParamsType: 'limit', // undefined
responseHandler: function (res) {
return res;
},
pagination: false,
onlyInfoPagination: false,
paginationLoop: true,
sidePagination: 'client', // client or server
totalRows: 0, // server side need to set
pageNumber: 1,
pageSize: 10,
pageList: [10, 25, 50, 100],
paginationHAlign: 'right', //right, left
paginationVAlign: 'bottom', //bottom, top, both
paginationDetailHAlign: 'left', //right, left
paginationPreText: '‹',
paginationNextText: '›',
search: false,
searchOnEnterKey: false,
strictSearch: false,
searchAlign: 'right',
selectItemName: 'btSelectItem',
showHeader: true,
showFooter: false,
showColumns: false,
showPaginationSwitch: false,
showRefresh: false,
showToggle: false,
showFullscreen: false,
smartDisplay: true,
escape: false,
minimumCountColumns: 1,
idField: undefined,
uniqueId: undefined,
cardView: false,
detailView: false,
detailFormatter: function (index, row) {
return '';
},
detailFilter: function (index, row) {
return true;
},
trimOnSearch: true,
clickToSelect: false,
singleSelect: false,
toolbar: undefined,
toolbarAlign: 'left',
buttonsToolbar: undefined,
buttonsAlign: 'right',
checkboxHeader: true,
sortable: true,
silentSort: true,
maintainSelected: false,
searchTimeOut: 500,
searchText: '',
iconSize: undefined,
buttonsClass: bs.buttonsClass,
iconsPrefix: bs.iconsPrefix, // glyphicon or fa (font awesome)
icons: bs.icons,
customSearch: $.noop,
customSort: $.noop,
ignoreClickToSelectOn: function (element) {
return $.inArray(element.tagName, ['A', 'BUTTON']);
},
rowStyle: function (row, index) {
return {};
},
rowAttributes: function (row, index) {
return {};
},
footerStyle: function (row, index) {
return {};
},
onAll: function (name, args) {
return false;
},
onClickCell: function (field, value, row, $element) {
return false;
},
onDblClickCell: function (field, value, row, $element) {
return false;
},
onClickRow: function (item, $element) {
return false;
},
onDblClickRow: function (item, $element) {
return false;
},
onSort: function (name, order) {
return false;
},
onCheck: function (row) {
return false;
},
onUncheck: function (row) {
return false;
},
onCheckAll: function (rows) {
return false;
},
onUncheckAll: function (rows) {
return false;
},
onCheckSome: function (rows) {
return false;
},
onUncheckSome: function (rows) {
return false;
},
onLoadSuccess: function (data) {
return false;
},
onLoadError: function (status) {
return false;
},
onColumnSwitch: function (field, checked) {
return false;
},
onPageChange: function (number, size) {
return false;
},
onSearch: function (text) {
return false;
},
onToggle: function (cardView) {
return false;
},
onPreBody: function (data) {
return false;
},
onPostBody: function () {
return false;
},
onPostHeader: function () {
return false;
},
onExpandRow: function (index, row, $detail) {
return false;
},
onCollapseRow: function (index, row) {
return false;
},
onRefreshOptions: function (options) {
return false;
},
onRefresh: function (params) {
return false;
},
onResetView: function () {
return false;
},
onScrollBody: function () {
return false;
}
};
BootstrapTable.LOCALES = {};
BootstrapTable.LOCALES['en-US'] = BootstrapTable.LOCALES.en = {
formatLoadingMessage: function () {
return 'Loading, please wait...';
},
formatRecordsPerPage: function (pageNumber) {
return sprintf('%s rows per page', pageNumber);
},
formatShowingRows: function (pageFrom, pageTo, totalRows) {
return sprintf('Showing %s to %s of %s rows', pageFrom, pageTo, totalRows);
},
formatDetailPagination: function (totalRows) {
return sprintf('Showing %s rows', totalRows);
},
formatSearch: function () {
return 'Search';
},
formatNoMatches: function () {
return 'No matching records found';
},
formatPaginationSwitch: function () {
return 'Hide/Show pagination';
},
formatRefresh: function () {
return 'Refresh';
},
formatToggle: function () {
return 'Toggle';
},
formatFullscreen: function () {
return 'Fullscreen';
},
formatColumns: function () {
return 'Columns';
},
formatAllRows: function () {
return 'All';
}
};
$.extend(BootstrapTable.DEFAULTS, BootstrapTable.LOCALES['en-US']);
BootstrapTable.COLUMN_DEFAULTS = {
radio: false,
checkbox: false,
checkboxEnabled: true,
field: undefined,
title: undefined,
titleTooltip: undefined,
'class': undefined,
align: undefined, // left, right, center
halign: undefined, // left, right, center
falign: undefined, // left, right, center
valign: undefined, // top, middle, bottom
width: undefined,
sortable: false,
order: 'asc', // asc, desc
visible: true,
switchable: true,
clickToSelect: true,
formatter: undefined,
footerFormatter: undefined,
events: undefined,
sorter: undefined,
sortName: undefined,
cellStyle: undefined,
searchable: true,
searchFormatter: true,
cardVisible: true,
escape: false,
showSelectTitle: false
};
BootstrapTable.EVENTS = {
'all.bs.table': 'onAll',
'click-cell.bs.table': 'onClickCell',
'dbl-click-cell.bs.table': 'onDblClickCell',
'click-row.bs.table': 'onClickRow',
'dbl-click-row.bs.table': 'onDblClickRow',
'sort.bs.table': 'onSort',
'check.bs.table': 'onCheck',
'uncheck.bs.table': 'onUncheck',
'check-all.bs.table': 'onCheckAll',
'uncheck-all.bs.table': 'onUncheckAll',
'check-some.bs.table': 'onCheckSome',
'uncheck-some.bs.table': 'onUncheckSome',
'load-success.bs.table': 'onLoadSuccess',
'load-error.bs.table': 'onLoadError',
'column-switch.bs.table': 'onColumnSwitch',
'page-change.bs.table': 'onPageChange',
'search.bs.table': 'onSearch',
'toggle.bs.table': 'onToggle',
'pre-body.bs.table': 'onPreBody',
'post-body.bs.table': 'onPostBody',
'post-header.bs.table': 'onPostHeader',
'expand-row.bs.table': 'onExpandRow',
'collapse-row.bs.table': 'onCollapseRow',
'refresh-options.bs.table': 'onRefreshOptions',
'reset-view.bs.table': 'onResetView',
'refresh.bs.table': 'onRefresh',
'scroll-body.bs.table': 'onScrollBody'
};
BootstrapTable.prototype.init = function () {
this.initLocale();
this.initContainer();
this.initTable();
this.initHeader();
this.initData();
this.initHiddenRows();
this.initFooter();
this.initToolbar();
this.initPagination();
this.initBody();
this.initSearchText();
this.initServer();
};
BootstrapTable.prototype.initLocale = function () {
if (this.options.locale) {
var parts = this.options.locale.split(/-|_/);
parts[0].toLowerCase();
if (parts[1]) {
parts[1].toUpperCase();
}
if ($.fn.bootstrapTable.locales[this.options.locale]) {
// locale as requested
$.extend(this.options, $.fn.bootstrapTable.locales[this.options.locale]);
} else if ($.fn.bootstrapTable.locales[parts.join('-')]) {
// locale with sep set to - (in case original was specified with _)
$.extend(this.options, $.fn.bootstrapTable.locales[parts.join('-')]);
} else if ($.fn.bootstrapTable.locales[parts[0]]) {
// short locale language code (i.e. 'en')
$.extend(this.options, $.fn.bootstrapTable.locales[parts[0]]);
}
}
};
BootstrapTable.prototype.initContainer = function () {
this.$container = $([
'<div class="bootstrap-table">',
'<div class="fixed-table-toolbar"></div>',
this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
'<div class="fixed-table-pagination" style="clear: both;"></div>' :
'',
'<div class="fixed-table-container">',
'<div class="fixed-table-header"><table></table></div>',
'<div class="fixed-table-body">',
'<div class="fixed-table-loading">',
this.options.formatLoadingMessage(),
'</div>',
'</div>',
'<div class="fixed-table-footer"><table><tr></tr></table></div>',
'</div>',
this.options.paginationVAlign === 'bottom' || this.options.paginationVAlign === 'both' ?
'<div class="fixed-table-pagination"></div>' :
'',
'</div>'
].join(''));
this.$container.insertAfter(this.$el);
this.$tableContainer = this.$container.find('.fixed-table-container');
this.$tableHeader = this.$container.find('.fixed-table-header');
this.$tableBody = this.$container.find('.fixed-table-body');
this.$tableLoading = this.$container.find('.fixed-table-loading');
this.$tableFooter = this.$container.find('.fixed-table-footer');
// checking if custom table-toolbar exists or not
if (this.options.buttonsToolbar) {
this.$toolbar = $('body').find(this.options.buttonsToolbar);
} else {
this.$toolbar = this.$container.find('.fixed-table-toolbar');
}
this.$pagination = this.$container.find('.fixed-table-pagination');
this.$tableBody.append(this.$el);
this.$container.after('<div class="clearfix"></div>');
this.$el.addClass(this.options.classes);
if (this.options.striped) {
this.$el.addClass('table-striped');
}
if ($.inArray('table-no-bordered', this.options.classes.split(' ')) !== -1) {
this.$tableContainer.addClass('table-no-bordered');
}
};
BootstrapTable.prototype.initTable = function () {
var that = this,
columns = [],
data = [];
this.$header = this.$el.find('>thead');
if (!this.$header.length) {
this.$header = $('<thead></thead>').appendTo(this.$el);
}
this.$header.find('tr').each(function () {
var column = [];
$(this).find('th').each(function () {
// Fix #2014 - getFieldIndex and elsewhere assume this is string, causes issues if not
if (typeof $(this).data('field') !== 'undefined') {
$(this).data('field', $(this).data('field') + '');
}
column.push($.extend({}, {
title: $(this).html(),
'class': $(this).attr('class'),
titleTooltip: $(this).attr('title'),
rowspan: $(this).attr('rowspan') ? +$(this).attr('rowspan') : undefined,
colspan: $(this).attr('colspan') ? +$(this).attr('colspan') : undefined
}, $(this).data()));
});
columns.push(column);
});
if (!$.isArray(this.options.columns[0])) {
this.options.columns = [this.options.columns];
}
this.options.columns = $.extend(true, [], columns, this.options.columns);
this.columns = [];
this.fieldsColumnsIndex = [];
setFieldIndex(this.options.columns);
$.each(this.options.columns, function (i, columns) {
$.each(columns, function (j, column) {
column = $.extend({}, BootstrapTable.COLUMN_DEFAULTS, column);
if (typeof column.fieldIndex !== 'undefined') {
that.columns[column.fieldIndex] = column;
that.fieldsColumnsIndex[column.field] = column.fieldIndex;
}
that.options.columns[i][j] = column;
});
});
// if options.data is setting, do not process tbody data
if (this.options.data.length) {
return;
}
var m = [];
this.$el.find('>tbody>tr').each(function (y) {
var row = {};
// save tr's id, class and data-* attributes
row._id = $(this).attr('id');
row._class = $(this).attr('class');
row._data = getRealDataAttr($(this).data());
$(this).find('>td').each(function (x) {
var $this = $(this),
cspan = +$this.attr('colspan') || 1,
rspan = +$this.attr('rowspan') || 1,
tx,
ty;
// skip already occupied cells in current row
for (; m[y] && m[y][x]; x++);
for (tx = x; tx < x + cspan; tx++) { //mark matrix elements occupied by current cell with true
for (ty = y; ty < y + rspan; ty++) {
if (!m[ty]) { //fill missing rows
m[ty] = [];
}
m[ty][tx] = true;
}
}
var field = that.columns[x].field;
row[field] = $(this).html();
// save td's id, class and data-* attributes
row['_' + field + '_id'] = $(this).attr('id');
row['_' + field + '_class'] = $(this).attr('class');
row['_' + field + '_rowspan'] = $(this).attr('rowspan');
row['_' + field + '_colspan'] = $(this).attr('colspan');
row['_' + field + '_title'] = $(this).attr('title');
row['_' + field + '_data'] = getRealDataAttr($(this).data());
});
data.push(row);
});
this.options.data = data;
if (data.length) this.fromHtml = true;
};
BootstrapTable.prototype.initHeader = function () {
var that = this,
visibleColumns = {},
html = [];
this.header = {
fields: [],
styles: [],
classes: [],
formatters: [],
events: [],
sorters: [],
sortNames: [],
cellStyles: [],
searchables: []
};
$.each(this.options.columns, function (i, columns) {
html.push('<tr>');
if (i === 0 && !that.options.cardView && that.options.detailView) {
html.push(sprintf('<th class="detail" rowspan="%s"><div class="fht-cell"></div></th>',
that.options.columns.length));
}
$.each(columns, function (j, column) {
var text = '',
halign = '', // header align style
align = '', // body align style
style = '',
class_ = sprintf(' class="%s"', column['class']),
order = that.options.sortOrder || column.order,
unitWidth = 'px',
width = column.width;
if (column.width !== undefined && (!that.options.cardView)) {
if (typeof column.width === 'string') {
if (column.width.indexOf('%') !== -1) {
unitWidth = '%';
}
}
}
if (column.width && typeof column.width === 'string') {
width = column.width.replace('%', '').replace('px', '');
}
halign = sprintf('text-align: %s; ', column.halign ? column.halign : column.align);
align = sprintf('text-align: %s; ', column.align);
style = sprintf('vertical-align: %s; ', column.valign);
style += sprintf('width: %s; ', (column.checkbox || column.radio) && !width ?
(!column.showSelectTitle ? '36px' : undefined) :
(width ? width + unitWidth : undefined));
if (typeof column.fieldIndex !== 'undefined') {
that.header.fields[column.fieldIndex] = column.field;
that.header.styles[column.fieldIndex] = align + style;
that.header.classes[column.fieldIndex] = class_;
that.header.formatters[column.fieldIndex] = column.formatter;
that.header.events[column.fieldIndex] = column.events;
that.header.sorters[column.fieldIndex] = column.sorter;
that.header.sortNames[column.fieldIndex] = column.sortName;
that.header.cellStyles[column.fieldIndex] = column.cellStyle;
that.header.searchables[column.fieldIndex] = column.searchable;
if (!column.visible) {
return;
}
if (that.options.cardView && (!column.cardVisible)) {
return;
}
visibleColumns[column.field] = column;
}
html.push('<th' + sprintf(' title="%s"', column.titleTooltip),
column.checkbox || column.radio ?
sprintf(' class="bs-checkbox %s"', column['class'] || '') :
class_,
sprintf(' style="%s"', halign + style),
sprintf(' rowspan="%s"', column.rowspan),
sprintf(' colspan="%s"', column.colspan),
sprintf(' data-field="%s"', column.field),
j === 0 && column.fieldIndex ? ' data-not-first-th' : '',
'>');
html.push(sprintf('<div class="th-inner %s">', that.options.sortable && column.sortable ?
'sortable both' : ''));
text = that.options.escape ? escapeHTML(column.title) : column.title;
var title = text;
if (column.checkbox) {
text = '';
if (!that.options.singleSelect && that.options.checkboxHeader) {
text = '<input name="btSelectAll" type="checkbox" />';
}
that.header.stateField = column.field;
}
if (column.radio) {
text = '';
that.header.stateField = column.field;
that.options.singleSelect = true;
}
if (!text && column.showSelectTitle) {
text += title;
}
html.push(text);
html.push('</div>');
html.push('<div class="fht-cell"></div>');
html.push('</div>');
html.push('</th>');
});
html.push('</tr>');
});
this.$header.html(html.join(''));
this.$header.find('th[data-field]').each(function (i) {
$(this).data(visibleColumns[$(this).data('field')]);
});
this.$container.off('click', '.th-inner').on('click', '.th-inner', function (event) {
var $this = $(this);
if (that.options.detailView && !$this.parent().hasClass('bs-checkbox')) {
if ($this.closest('.bootstrap-table')[0] !== that.$container[0]) {
return false;
}
}
if (that.options.sortable && $this.parent().data().sortable) {
that.onSort(event);
}
});
this.$header.children().children().off('keypress').on('keypress', function (event) {
if (that.options.sortable && $(this).data().sortable) {
var code = event.keyCode || event.which;
if (code == 13) { //Enter keycode
that.onSort(event);
}
}
});
$(window).off('resize.bootstrap-table');
if (!this.options.showHeader || this.options.cardView) {
this.$header.hide();
this.$tableHeader.hide();
this.$tableLoading.css('top', 0);
} else {
this.$header.show();
this.$tableHeader.show();
this.$tableLoading.css('top', this.$header.outerHeight() + 1);
// Assign the correct sortable arrow
this.getCaret();
$(window).on('resize.bootstrap-table', $.proxy(this.resetWidth, this));
}
this.$selectAll = this.$header.find('[name="btSelectAll"]');
this.$selectAll.off('click').on('click', function () {
var checked = $(this).prop('checked');
that[checked ? 'checkAll' : 'uncheckAll']();
that.updateSelected();
});
};
BootstrapTable.prototype.initFooter = function () {
if (!this.options.showFooter || this.options.cardView) {
this.$tableFooter.hide();
} else {
this.$tableFooter.show();
}
};
/**
* @param data
* @param type: append / prepend
*/
BootstrapTable.prototype.initData = function (data, type) {
if (type === 'append') {
this.options.data = this.options.data.concat(data);
} else if (type === 'prepend') {
this.options.data = [].concat(data).concat(this.options.data);
} else {
this.options.data = data || this.options.data;
}
this.data = this.options.data;
if (this.options.sidePagination === 'server') {
return;
}
this.initSort();
};
BootstrapTable.prototype.initSort = function () {
var that = this,
name = this.options.sortName,
order = this.options.sortOrder === 'desc' ? -1 : 1,
index = $.inArray(this.options.sortName, this.header.fields),
timeoutId = 0;
if (this.options.customSort !== $.noop) {
this.options.customSort.apply(this, [this.options.sortName, this.options.sortOrder]);
return;
}
if (index !== -1) {
if (this.options.sortStable) {
$.each(this.data, function (i, row) {
row._position = i;
});
}
this.data.sort(function (a, b) {
if (that.header.sortNames[index]) {
name = that.header.sortNames[index];
}
var aa = getItemField(a, name, that.options.escape),
bb = getItemField(b, name, that.options.escape),
value = calculateObjectValue(that.header, that.header.sorters[index], [aa, bb, a, b]);
if (value !== undefined) {
if (that.options.sortStable && value === 0) {
return a._position - b._position;
}
return order * value;
}
// Fix #161: undefined or null string sort bug.
if (aa === undefined || aa === null) {
aa = '';
}
if (bb === undefined || bb === null) {
bb = '';
}
if (that.options.sortStable && aa === bb) {
aa = a._position;
bb = b._position;
return a._position - b._position;
}
// IF both values are numeric, do a numeric comparison
if ($.isNumeric(aa) && $.isNumeric(bb)) {
// Convert numerical values form string to float.
aa = parseFloat(aa);
bb = parseFloat(bb);
if (aa < bb) {
return order * -1;
}
return order;
}
if (aa === bb) {
return 0;
}
// If value is not a string, convert to string
if (typeof aa !== 'string') {
aa = aa.toString();
}
if (aa.localeCompare(bb) === -1) {
return order * -1;
}
return order;
});
if (this.options.sortClass !== undefined) {
clearTimeout(timeoutId);
timeoutId = setTimeout(function () {
that.$el.removeClass(that.options.sortClass);
var index = that.$header.find(sprintf('[data-field="%s"]',
that.options.sortName).index() + 1);
that.$el.find(sprintf('tr td:nth-child(%s)', index))
.addClass(that.options.sortClass);
}, 250);
}
}
};
BootstrapTable.prototype.onSort = function (event) {
var $this = event.type === "keypress" ? $(event.currentTarget) : $(event.currentTarget).parent(),
$this_ = this.$header.find('th').eq($this.index());
this.$header.add(this.$header_).find('span.order').remove();
if (this.options.sortName === $this.data('field')) {
this.options.sortOrder = this.options.sortOrder === 'asc' ? 'desc' : 'asc';
} else {
this.options.sortName = $this.data('field');
if (this.options.rememberOrder) {
this.options.sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc';
} else {
this.options.sortOrder = this.columns[this.fieldsColumnsIndex[$this.data('field')]].order;
}
}
this.trigger('sort', this.options.sortName, this.options.sortOrder);
$this.add($this_).data('order', this.options.sortOrder);
// Assign the correct sortable arrow
this.getCaret();
if (this.options.sidePagination === 'server') {
this.initServer(this.options.silentSort);
return;
}
this.initSort();
this.initBody();
};
BootstrapTable.prototype.initToolbar = function () {
var that = this,
html = [],
timeoutId = 0,
$keepOpen,
$search,
switchableCount = 0;
if (this.$toolbar.find('.bs-bars').children().length) {
$('body').append($(this.options.toolbar));
}
this.$toolbar.html('');
if (typeof this.options.toolbar === 'string' || typeof this.options.toolbar === 'object') {
$(sprintf('<div class="bs-bars %s-%s"></div>', bs.pullClass, this.options.toolbarAlign))
.appendTo(this.$toolbar)
.append($(this.options.toolbar));
}
// showColumns, showToggle, showRefresh
html = [sprintf('<div class="columns columns-%s btn-group %s-%s">',
this.options.buttonsAlign, bs.pullClass, this.options.buttonsAlign)];
if (typeof this.options.icons === 'string') {
this.options.icons = calculateObjectValue(null, this.options.icons);
}
if (this.options.showPaginationSwitch) {
html.push(sprintf('<button class="btn' +
sprintf(' btn-%s', this.options.buttonsClass) +
sprintf(' btn-%s', this.options.iconSize) +
'" type="button" name="paginationSwitch" aria-label="pagination Switch" title="%s">',
this.options.formatPaginationSwitch()),
sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.paginationSwitchDown),
'</button>');
}
if (this.options.showFullscreen) {
this.$toolbar.find('button[name="fullscreen"]')
.off('click').on('click', $.proxy(this.toggleFullscreen, this));
}
if (this.options.showRefresh) {
html.push(sprintf('<button class="btn' +
sprintf(' btn-%s', this.options.buttonsClass) +
sprintf(' btn-%s', this.options.iconSize) +
'" type="button" name="refresh" aria-label="refresh" title="%s">',
this.options.formatRefresh()),
sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.refresh),
'</button>');
}
if (this.options.showToggle) {
html.push(sprintf('<button class="btn' +
sprintf(' btn-%s', this.options.buttonsClass) +
sprintf(' btn-%s', this.options.iconSize) +
'" type="button" name="toggle" aria-label="toggle" title="%s">',
this.options.formatToggle()),
sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.toggle),
'</button>');
}
if (this.options.showFullscreen) {
html.push(sprintf('<button class="btn' +
sprintf(' btn-%s', this.options.buttonsClass) +
sprintf(' btn-%s', this.options.iconSize) +
'" type="button" name="fullscreen" aria-label="fullscreen" title="%s">',
this.options.formatFullscreen()),
sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.fullscreen),
'</button>');
}
if (this.options.showColumns) {
html.push(sprintf('<div class="keep-open btn-group" title="%s">',
this.options.formatColumns()),
'<button type="button" aria-label="columns" class="btn' +
sprintf(' btn-%s', this.options.buttonsClass) +
sprintf(' btn-%s', this.options.iconSize) +
' dropdown-toggle" data-toggle="dropdown">',
sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.columns),
' <span class="caret"></span>',
'</button>',
bs.toobarDropdowHtml[0]);
$.each(this.columns, function (i, column) {
if (column.radio || column.checkbox) {
return;
}
if (that.options.cardView && !column.cardVisible) {
return;
}
var checked = column.visible ? ' checked="checked"' : '';
if (column.switchable) {
html.push(sprintf(bs.toobarDropdowItemHtml,
sprintf('<input type="checkbox" data-field="%s" value="%s"%s> %s',
column.field, i, checked, column.title)));
switchableCount++;
}
});
html.push(bs.toobarDropdowHtml[1], '</div>');
}
html.push('</div>');
// Fix #188: this.showToolbar is for extensions
if (this.showToolbar || html.length > 2) {
this.$toolbar.append(html.join(''));
}
if (this.options.showPaginationSwitch) {
this.$toolbar.find('button[name="paginationSwitch"]')
.off('click').on('click', $.proxy(this.togglePagination, this));
}
if (this.options.showRefresh) {
this.$toolbar.find('button[name="refresh"]')
.off('click').on('click', $.proxy(this.refresh, this));
}
if (this.options.showToggle) {
this.$toolbar.find('button[name="toggle"]')
.off('click').on('click', function () {
that.toggleView();
});
}
if (this.options.showColumns) {
$keepOpen = this.$toolbar.find('.keep-open');
if (switchableCount <= this.options.minimumCountColumns) {
$keepOpen.find('input').prop('disabled', true);
}
$keepOpen.find('li').off('click').on('click', function (event) {
event.stopImmediatePropagation();
});
$keepOpen.find('input').off('click').on('click', function () {
var $this = $(this);
that.toggleColumn($(this).val(), $this.prop('checked'), false);
that.trigger('column-switch', $(this).data('field'), $this.prop('checked'));
});
}
if (this.options.search) {
html = [];
html.push(
sprintf('<div class="%s-%s search">', bs.pullClass, this.options.searchAlign),
sprintf('<input class="form-control' +
sprintf(' input-%s', this.options.iconSize) +
'" type="text" placeholder="%s">',
this.options.formatSearch()),
'</div>');
this.$toolbar.append(html.join(''));
$search = this.$toolbar.find('.search input');
$search.off('keyup drop blur').on('keyup drop blur', function (event) {
if (that.options.searchOnEnterKey && event.keyCode !== 13) {
return;
}
if ($.inArray(event.keyCode, [37, 38, 39, 40]) > -1) {
return;
}
clearTimeout(timeoutId); // doesn't matter if it's 0
timeoutId = setTimeout(function () {
that.onSearch(event);
}, that.options.searchTimeOut);
});
if (isIEBrowser()) {
$search.off('mouseup').on('mouseup', function (event) {
clearTimeout(timeoutId); // doesn't matter if it's 0
timeoutId = setTimeout(function () {
that.onSearch(event);
}, that.options.searchTimeOut);
});
}
}
};
BootstrapTable.prototype.onSearch = function (event) {
var text = $.trim($(event.currentTarget).val());
// trim search input
if (this.options.trimOnSearch && $(event.currentTarget).val() !== text) {
$(event.currentTarget).val(text);
}
if (text === this.searchText) {
return;
}
this.searchText = text;
this.options.searchText = text;
this.options.pageNumber = 1;
this.initSearch();
if (event.firedByInitSearchText) {
if (this.options.sidePagination === 'client') {
this.updatePagination();
}
} else {
this.updatePagination();
}
this.trigger('search', text);
};
BootstrapTable.prototype.initSearch = function () {
var that = this;
if (this.options.sidePagination !== 'server') {
if (this.options.customSearch !== $.noop) {
window[this.options.customSearch].apply(this, [this.searchText]);
return;
}
var s = this.searchText && (this.options.escape ?
escapeHTML(this.searchText) : this.searchText).toLowerCase();
var f = $.isEmptyObject(this.filterColumns) ? null : this.filterColumns;
// Check filter
this.data = f ? $.grep(this.options.data, function (item, i) {
for (var key in f) {
if ($.isArray(f[key]) && $.inArray(item[key], f[key]) === -1 ||
!$.isArray(f[key]) && item[key] !== f[key]) {
return false;
}
}
return true;
}) : this.options.data;
this.data = s ? $.grep(this.data, function (item, i) {
for (var j = 0; j < that.header.fields.length; j++) {
if (!that.header.searchables[j]) {
continue;
}
var key = $.isNumeric(that.header.fields[j]) ? parseInt(that.header.fields[j], 10) : that.header.fields[j];
var column = that.columns[that.fieldsColumnsIndex[key]];
var value;
if (typeof key === 'string') {
value = item;
var props = key.split('.');
for (var prop_index = 0; prop_index < props.length; prop_index++) {
if (value[props[prop_index]] != null) {
value = value[props[prop_index]];
}
}
// Fix #142: respect searchForamtter boolean
if (column && column.searchFormatter) {
value = calculateObjectValue(column,
that.header.formatters[j], [value, item, i], value);
}
} else {
value = item[key];
}
if (typeof value === 'string' || typeof value === 'number') {
if (that.options.strictSearch) {
if ((value + '').toLowerCase() === s) {
return true;
}
} else {
if ((value + '').toLowerCase().indexOf(s) !== -1) {
return true;
}
}
}
}
return false;
}) : this.data;
}
};
BootstrapTable.prototype.initPagination = function () {
if (!this.options.pagination) {
this.$pagination.hide();
return;
} else {
this.$pagination.show();
}
var that = this,
html = [],
$allSelected = false,
i, from, to,
$pageList,
$pre,
$next,
$number,
data = this.getData(),
pageList = this.options.pageList;
if (this.options.sidePagination !== 'server') {
this.options.totalRows = data.length;
}
this.totalPages = 0;
if (this.options.totalRows) {
if (this.options.pageSize === this.options.formatAllRows()) {
this.options.pageSize = this.options.totalRows;
$allSelected = true;
} else if (this.options.pageSize === this.options.totalRows) {
// Fix #667 Table with pagination,
// multiple pages and a search that matches to one page throws exception
var pageLst = typeof this.options.pageList === 'string' ?
this.options.pageList.replace('[', '').replace(']', '')
.replace(/ /g, '').toLowerCase().split(',') : this.options.pageList;
if ($.inArray(this.options.formatAllRows().toLowerCase(), pageLst) > -1) {
$allSelected = true;
}
}
this.totalPages = ~~((this.options.totalRows - 1) / this.options.pageSize) + 1;
this.options.totalPages = this.totalPages;
}
if (this.totalPages > 0 && this.options.pageNumber > this.totalPages) {
this.options.pageNumber = this.totalPages;
}
this.pageFrom = (this.options.pageNumber - 1) * this.options.pageSize + 1;
this.pageTo = this.options.pageNumber * this.options.pageSize;
if (this.pageTo > this.options.totalRows) {
this.pageTo = this.options.totalRows;
}
html.push(
sprintf('<div class="%s-%s pagination-detail">', bs.pullClass, this.options.paginationDetailHAlign),
'<span class="pagination-info">',
this.options.onlyInfoPagination ? this.options.formatDetailPagination(this.options.totalRows) :
this.options.formatShowingRows(this.pageFrom, this.pageTo, this.options.totalRows),
'</span>');
if (!this.options.onlyInfoPagination) {
html.push('<span class="page-list">');
var pageNumber = [
sprintf('<span class="btn-group %s">',
this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
'dropdown' : 'dropup'),
'<button type="button" class="btn' +
sprintf(' btn-%s', this.options.buttonsClass) +
sprintf(' btn-%s', this.options.iconSize) +
' dropdown-toggle" data-toggle="dropdown">',
'<span class="page-size">',
$allSelected ? this.options.formatAllRows() : this.options.pageSize,
'</span>',
' <span class="caret"></span>',
'</button>',
bs.pageDropdownHtml[0]
];
if (typeof this.options.pageList === 'string') {
var list = this.options.pageList.replace('[', '').replace(']', '')
.replace(/ /g, '').split(',');
pageList = [];
$.each(list, function (i, value) {
pageList.push((value.toUpperCase() === that.options.formatAllRows().toUpperCase() || value.toUpperCase() === "UNLIMITED") ?
that.options.formatAllRows() : +value);
});
}
$.each(pageList, function (i, page) {
if (!that.options.smartDisplay || i === 0 || pageList[i - 1] < that.options.totalRows) {
var active;
if ($allSelected) {
active = page === that.options.formatAllRows() ? 'active' : '';
} else {
active = page === that.options.pageSize ? 'active' : '';
}
pageNumber.push(sprintf(bs.pageDropdownItemHtml, active, page));
}
});
pageNumber.push(bs.pageDropdownHtml[1] + '</span>');
html.push(this.options.formatRecordsPerPage(pageNumber.join('')));
html.push('</span>');
html.push('</div>',
sprintf('<div class="%s-%s pagination">', bs.pullClass, this.options.paginationHAlign),
'<ul class="pagination' + sprintf(' pagination-%s', this.options.iconSize) + '">',
sprintf('<li class="page-item page-pre"><a class="page-link" href="#">%s</a></li>',
this.options.paginationPreText));
if (this.totalPages < 5) {
from = 1;
to = this.totalPages;
} else {
from = this.options.pageNumber - 2;
to = from + 4;
if (from < 1) {
from = 1;
to = 5;
}
if (to > this.totalPages) {
to = this.totalPages;
from = to - 4;
}
}
if (this.totalPages >= 6) {
if (this.options.pageNumber >= 3) {
html.push(
sprintf('<li class="page-item page-first%s">',
1 === this.options.pageNumber ? ' active' : ''),
'<a class="page-link" href="#">', 1, '</a>',
'</li>');
from++;
}
if (this.options.pageNumber >= 4) {
if (this.options.pageNumber == 4 || this.totalPages == 6 || this.totalPages == 7) {
from--;
} else {
html.push('<li class="page-item page-first-separator disabled">',
'<a class="page-link" href="#">...</a>',
'</li>');
}
to--;
}
}
if (this.totalPages >= 7) {
if (this.options.pageNumber >= (this.totalPages - 2)) {
from--;
}
}
if (this.totalPages == 6) {
if (this.options.pageNumber >= (this.totalPages - 2)) {
to++;
}
} else if (this.totalPages >= 7) {
if (this.totalPages == 7 || this.options.pageNumber >= (this.totalPages - 3)) {
to++;
}
}
for (i = from; i <= to; i++) {
html.push(sprintf('<li class="page-item%s">',
i === this.options.pageNumber ? ' active' : ''),
'<a class="page-link" href="#">', i, '</a>',
'</li>');
}
if (this.totalPages >= 8) {
if (this.options.pageNumber <= (this.totalPages - 4)) {
html.push('<li class="page-item page-last-separator disabled">',
'<a class="page-link" href="#">...</a>',
'</li>');
}
}
if (this.totalPages >= 6) {
if (this.options.pageNumber <= (this.totalPages - 3)) {
html.push(sprintf('<li class="page-item page-last%s">',
this.totalPages === this.options.pageNumber ? ' active' : ''),
'<a class="page-link" href="#">', this.totalPages, '</a>',
'</li>');
}
}
html.push(
sprintf('<li class="page-item page-next"><a class="page-link" href="#">%s</a></li>',
this.options.paginationNextText),
'</ul>',
'</div>');
}
this.$pagination.html(html.join(''));
if (!this.options.onlyInfoPagination) {
$pageList = this.$pagination.find('.page-list a');
$pre = this.$pagination.find('.page-pre');
$next = this.$pagination.find('.page-next');
$number = this.$pagination.find('.page-item').not('.page-next, .page-pre');
if (this.options.smartDisplay) {
if (this.totalPages <= 1) {
this.$pagination.find('div.pagination').hide();
}
if (pageList.length < 2 || this.options.totalRows <= pageList[0]) {
this.$pagination.find('span.page-list').hide();
}
// when data is empty, hide the pagination
this.$pagination[this.getData().length ? 'show' : 'hide']();
}
if (!this.options.paginationLoop) {
if (this.options.pageNumber === 1) {
$pre.addClass('disabled');
}
if (this.options.pageNumber === this.totalPages) {
$next.addClass('disabled');
}
}
if ($allSelected) {
this.options.pageSize = this.options.formatAllRows();
}
// removed the events for last and first, onPageNumber executeds the same logic
$pageList.off('click').on('click', $.proxy(this.onPageListChange, this));
$pre.off('click').on('click', $.proxy(this.onPagePre, this));
$next.off('click').on('click', $.proxy(this.onPageNext, this));
$number.off('click').on('click', $.proxy(this.onPageNumber, this));
}
};
BootstrapTable.prototype.updatePagination = function (event) {
// Fix #171: IE disabled button can be clicked bug.
if (event && $(event.currentTarget).hasClass('disabled')) {
return;
}
if (!this.options.maintainSelected) {
this.resetRows();
}
this.initPagination();
if (this.options.sidePagination === 'server') {
this.initServer();
} else {
this.initBody();
}
this.trigger('page-change', this.options.pageNumber, this.options.pageSize);
};
BootstrapTable.prototype.onPageListChange = function (event) {
event.preventDefault();
var $this = $(event.currentTarget);
$this.parent().addClass('active').siblings().removeClass('active');
this.options.pageSize = $this.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ?
this.options.formatAllRows() : +$this.text();
this.$toolbar.find('.page-size').text(this.options.pageSize);
this.updatePagination(event);
return false;
};
BootstrapTable.prototype.onPagePre = function (event) {
event.preventDefault();
if ((this.options.pageNumber - 1) === 0) {
this.options.pageNumber = this.options.totalPages;
} else {
this.options.pageNumber--;
}
this.updatePagination(event);
return false;
};
BootstrapTable.prototype.onPageNext = function (event) {
event.preventDefault();
if ((this.options.pageNumber + 1) > this.options.totalPages) {
this.options.pageNumber = 1;
} else {
this.options.pageNumber++;
}
this.updatePagination(event);
return false;
};
BootstrapTable.prototype.onPageNumber = function (event) {
event.preventDefault();
if (this.options.pageNumber === +$(event.currentTarget).text()) {
return;
}
this.options.pageNumber = +$(event.currentTarget).text();
this.updatePagination(event);
return false;
};
BootstrapTable.prototype.initRow = function(item, i, data, parentDom) {
var that=this,
key,
html = [],
style = {},
csses = [],
data_ = '',
attributes = {},
htmlAttributes = [];
if ($.inArray(item, this.hiddenRows) > -1) {
return;
}
style = calculateObjectValue(this.options, this.options.rowStyle, [item, i], style);
if (style && style.css) {
for (key in style.css) {
csses.push(key + ': ' + style.css[key]);
}
}
attributes = calculateObjectValue(this.options,
this.options.rowAttributes, [item, i], attributes);
if (attributes) {
for (key in attributes) {
htmlAttributes.push(sprintf('%s="%s"', key, escapeHTML(attributes[key])));
}
}
if (item._data && !$.isEmptyObject(item._data)) {
$.each(item._data, function(k, v) {
// ignore data-index
if (k === 'index') {
return;
}
data_ += sprintf(' data-%s="%s"', k, v);
});
}
html.push('<tr',
sprintf(' %s', htmlAttributes.join(' ')),
sprintf(' id="%s"', $.isArray(item) ? undefined : item._id),
sprintf(' class="%s"', style.classes || ($.isArray(item) ? undefined : item._class)),
sprintf(' data-index="%s"', i),
sprintf(' data-uniqueid="%s"', item[this.options.uniqueId]),
sprintf('%s', data_),
'>'
);
if (this.options.cardView) {
html.push(sprintf('<td colspan="%s"><div class="card-views">', this.header.fields.length));
}
if (!this.options.cardView && this.options.detailView) {
html.push('<td>');
if (calculateObjectValue(null, this.options.detailFilter, [i, item])) {
html.push('<a class="detail-icon" href="#">',
sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.detailOpen),
'</a>');
}
html.push('</td>');
}
$.each(this.header.fields, function(j, field) {
var text = '',
value_ = getItemField(item, field, that.options.escape),
value = '',
type = '',
cellStyle = {},
id_ = '',
class_ = that.header.classes[j],
data_ = '',
rowspan_ = '',
colspan_ = '',
title_ = '',
column = that.columns[j];
if (that.fromHtml && typeof value_ === 'undefined') {
if((!column.checkbox) && (!column.radio)) {
return;
}
}
if (!column.visible) {
return;
}
if (that.options.cardView && (!column.cardVisible)) {
return;
}
if (column.escape) {
value_ = escapeHTML(value_);
}
style = sprintf('style="%s"', csses.concat(that.header.styles[j]).join('; '));
// handle td's id and class
if (item['_' + field + '_id']) {
id_ = sprintf(' id="%s"', item['_' + field + '_id']);
}
if (item['_' + field + '_class']) {
class_ = sprintf(' class="%s"', item['_' + field + '_class']);
}
if (item['_' + field + '_rowspan']) {
rowspan_ = sprintf(' rowspan="%s"', item['_' + field + '_rowspan']);
}
if (item['_' + field + '_colspan']) {
colspan_ = sprintf(' colspan="%s"', item['_' + field + '_colspan']);
}
if (item['_' + field + '_title']) {
title_ = sprintf(' title="%s"', item['_' + field + '_title']);
}
cellStyle = calculateObjectValue(that.header,
that.header.cellStyles[j], [value_, item, i, field], cellStyle);
if (cellStyle.classes) {
class_ = sprintf(' class="%s"', cellStyle.classes);
}
if (cellStyle.css) {
var csses_ = [];
for (var key in cellStyle.css) {
csses_.push(key + ': ' + cellStyle.css[key]);
}
style = sprintf('style="%s"', csses_.concat(that.header.styles[j]).join('; '));
}
value = calculateObjectValue(column,
that.header.formatters[j], [value_, item, i, field], value_);
if (item['_' + field + '_data'] && !$.isEmptyObject(item['_' + field + '_data'])) {
$.each(item['_' + field + '_data'], function(k, v) {
// ignore data-index
if (k === 'index') {
return;
}
data_ += sprintf(' data-%s="%s"', k, v);
});
}
if (column.checkbox || column.radio) {
type = column.checkbox ? 'checkbox' : type;
type = column.radio ? 'radio' : type;
text = [sprintf(that.options.cardView ?
'<div class="card-view %s">' : '<td class="bs-checkbox %s">', column['class'] || ''),
'<input' +
sprintf(' data-index="%s"', i) +
sprintf(' name="%s"', that.options.selectItemName) +
sprintf(' type="%s"', type) +
sprintf(' value="%s"', item[that.options.idField]) +
sprintf(' checked="%s"', value === true ||
(value_ || value && value.checked) ? 'checked' : undefined) +
sprintf(' disabled="%s"', !column.checkboxEnabled ||
(value && value.disabled) ? 'disabled' : undefined) +
' />',
that.header.formatters[j] && typeof value === 'string' ? value : '',
that.options.cardView ? '</div>' : '</td>'
].join('');
item[that.header.stateField] = value === true || (!!value_ || value && value.checked);
} else {
value = typeof value === 'undefined' || value === null ?
that.options.undefinedText : value;
text = that.options.cardView ? ['<div class="card-view">',
that.options.showHeader ? sprintf('<span class="title" %s>%s</span>', style,
getPropertyFromOther(that.columns, 'field', 'title', field)) : '',
sprintf('<span class="value">%s</span>', value),
'</div>'
].join('') : [sprintf('<td%s %s %s %s %s %s %s>',
id_, class_, style, data_, rowspan_, colspan_, title_),
value,
'</td>'
].join('');
// Hide empty data on Card view when smartDisplay is set to true.
if (that.options.cardView && that.options.smartDisplay && value === '') {
// Should set a placeholder for event binding correct fieldIndex
text = '<div class="card-view"></div>';
}
}
html.push(text);
});
if (this.options.cardView) {
html.push('</div></td>');
}
html.push('</tr>');
return html.join(' ');
};
BootstrapTable.prototype.initBody = function (fixedScroll) {
var that = this,
html = [],
data = this.getData();
this.trigger('pre-body', data);
this.$body = this.$el.find('>tbody');
if (!this.$body.length) {
this.$body = $('<tbody></tbody>').appendTo(this.$el);
}
//Fix #389 Bootstrap-table-flatJSON is not working
if (!this.options.pagination || this.options.sidePagination === 'server') {
this.pageFrom = 1;
this.pageTo = data.length;
}
var trFragments = $(document.createDocumentFragment());
var hasTr;
for (var i = this.pageFrom - 1; i < this.pageTo; i++) {
var item = data[i];
var tr = this.initRow(item, i, data, trFragments);
hasTr = hasTr || !!tr;
if (tr&&tr!==true) {
trFragments.append(tr);
}
}
// show no records
if (!hasTr) {
trFragments.append('<tr class="no-records-found">' +
sprintf('<td colspan="%s">%s</td>',
this.$header.find('th').length,
this.options.formatNoMatches()) +
'</tr>');
}
this.$body.html(trFragments);
if (!fixedScroll) {
this.scrollTo(0);
}
// click to select by column
this.$body.find('> tr[data-index] > td').off('click dblclick').on('click dblclick', function (e) {
var $td = $(this),
$tr = $td.parent(),
item = that.data[$tr.data('index')],
index = $td[0].cellIndex,
fields = that.getVisibleFields(),
field = fields[that.options.detailView && !that.options.cardView ? index - 1 : index],
column = that.columns[that.fieldsColumnsIndex[field]],
value = getItemField(item, field, that.options.escape);
if ($td.find('.detail-icon').length) {
return;
}
that.trigger(e.type === 'click' ? 'click-cell' : 'dbl-click-cell', field, value, item, $td);
that.trigger(e.type === 'click' ? 'click-row' : 'dbl-click-row', item, $tr, field);
// if click to select - then trigger the checkbox/radio click
if (e.type === 'click' && that.options.clickToSelect && column.clickToSelect && that.options.ignoreClickToSelectOn(e.target)) {
var $selectItem = $tr.find(sprintf('[name="%s"]', that.options.selectItemName));
if ($selectItem.length) {
$selectItem[0].click(); // #144: .trigger('click') bug
}
}
});
this.$body.find('> tr[data-index] > td > .detail-icon').off('click').on('click', function (e) {
e.preventDefault();
var $this = $(this),
$tr = $this.parent().parent(),
index = $tr.data('index'),
row = data[index]; // Fix #980 Detail view, when searching, returns wrong row
// remove and update
if ($tr.next().is('tr.detail-view')) {
$this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailOpen));
that.trigger('collapse-row', index, row, $tr.next());
$tr.next().remove();
} else {
$this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailClose));
$tr.after(sprintf('<tr class="detail-view"><td colspan="%s"></td></tr>', $tr.find('td').length));
var $element = $tr.next().find('td');
var content = calculateObjectValue(that.options, that.options.detailFormatter, [index, row, $element], '');
if ($element.length === 1) {
$element.append(content);
}
that.trigger('expand-row', index, row, $element);
}
that.resetView();
return false;
});
this.$selectItem = this.$body.find(sprintf('[name="%s"]', this.options.selectItemName));
this.$selectItem.off('click').on('click', function (event) {
event.stopImmediatePropagation();
var $this = $(this),
checked = $this.prop('checked'),
row = that.data[$this.data('index')];
if ($(this).is(':radio') || that.options.singleSelect) {
$.each(that.options.data, function (i, row) {
row[that.header.stateField] = false;
});
}
row[that.header.stateField] = checked;
if (that.options.singleSelect) {
that.$selectItem.not(this).each(function () {
that.data[$(this).data('index')][that.header.stateField] = false;
});
that.$selectItem.filter(':checked').not(this).prop('checked', false);
}
that.updateSelected();
that.trigger(checked ? 'check' : 'uncheck', row, $this);
});
$.each(this.header.events, function (i, events) {
if (!events) {
return;
}
// fix bug, if events is defined with namespace
if (typeof events === 'string') {
events = calculateObjectValue(null, events);
}
var field = that.header.fields[i],
fieldIndex = $.inArray(field, that.getVisibleFields());
if (fieldIndex === -1) {
return;
}
if (that.options.detailView && !that.options.cardView) {
fieldIndex += 1;
}
for (var key in events) {
that.$body.find('>tr:not(.no-records-found)').each(function () {
var $tr = $(this),
$td = $tr.find(that.options.cardView ? '.card-view' : 'td').eq(fieldIndex),
index = key.indexOf(' '),
name = key.substring(0, index),
el = key.substring(index + 1),
func = events[key];
$td.find(el).off(name).on(name, function (e) {
var index = $tr.data('index'),
row = that.data[index],
value = row[field];
func.apply(this, [e, value, row, index]);
});
});
}
});
this.updateSelected();
this.resetView();
this.trigger('post-body', data);
};
BootstrapTable.prototype.initServer = function (silent, query, url) {
var that = this,
data = {},
index = $.inArray(this.options.sortName, this.header.fields),
params = {
searchText: this.searchText,
sortName: this.options.sortName,
sortOrder: this.options.sortOrder
},
request;
if (this.header.sortNames[index]) {
params.sortName = this.header.sortNames[index];
}
if (this.options.pagination && this.options.sidePagination === 'server') {
params.pageSize = this.options.pageSize === this.options.formatAllRows() ?
this.options.totalRows : this.options.pageSize;
params.pageNumber = this.options.pageNumber;
}
if (!(url || this.options.url) && !this.options.ajax) {
return;
}
if (this.options.queryParamsType === 'limit') {
params = {
search: params.searchText,
sort: params.sortName,
order: params.sortOrder
};
if (this.options.pagination && this.options.sidePagination === 'server') {
params.offset = this.options.pageSize === this.options.formatAllRows() ?
0 : this.options.pageSize * (this.options.pageNumber - 1);
params.limit = this.options.pageSize === this.options.formatAllRows() ?
this.options.totalRows : this.options.pageSize;
if (params.limit === 0) {
delete params.limit;
}
}
}
if (!($.isEmptyObject(this.filterColumnsPartial))) {
params.filter = JSON.stringify(this.filterColumnsPartial, null);
}
data = calculateObjectValue(this.options, this.options.queryParams, [params], data);
$.extend(data, query || {});
// false to stop request
if (data === false) {
return;
}
if (!silent) {
this.$tableLoading.show();
}
request = $.extend({}, calculateObjectValue(null, this.options.ajaxOptions), {
type: this.options.method,
url: url || this.options.url,
data: this.options.contentType === 'application/json' && this.options.method === 'post' ?
JSON.stringify(data) : data,
cache: this.options.cache,
contentType: this.options.contentType,
dataType: this.options.dataType,
success: function (res) {
res = calculateObjectValue(that.options, that.options.responseHandler, [res], res);
that.load(res);
that.trigger('load-success', res);
if (!silent) that.$tableLoading.hide();
},
error: function (res) {
var data = [];
if (that.options.sidePagination === 'server') {
data = {};
data[that.options.totalField] = 0;
data[that.options.dataField] = [];
}
that.load(data);
that.trigger('load-error', res.status, res);
if (!silent) that.$tableLoading.hide();
}
});
if (this.options.ajax) {
calculateObjectValue(this, this.options.ajax, [request], null);
} else {
if (this._xhr && this._xhr.readyState !== 4) {
this._xhr.abort();
}
this._xhr = $.ajax(request);
}
};
BootstrapTable.prototype.initSearchText = function () {
if (this.options.search) {
this.searchText = '';
if (this.options.searchText !== '') {
var $search = this.$toolbar.find('.search input');
$search.val(this.options.searchText);
this.onSearch({currentTarget: $search, firedByInitSearchText: true});
}
}
};
BootstrapTable.prototype.getCaret = function () {
var that = this;
$.each(this.$header.find('th'), function (i, th) {
$(th).find('.sortable').removeClass('desc asc').addClass($(th).data('field') === that.options.sortName ? that.options.sortOrder : 'both');
});
};
BootstrapTable.prototype.updateSelected = function () {
var checkAll = this.$selectItem.filter(':enabled').length &&
this.$selectItem.filter(':enabled').length ===
this.$selectItem.filter(':enabled').filter(':checked').length;
this.$selectAll.add(this.$selectAll_).prop('checked', checkAll);
this.$selectItem.each(function () {
$(this).closest('tr')[$(this).prop('checked') ? 'addClass' : 'removeClass']('selected');
});
};
BootstrapTable.prototype.updateRows = function () {
var that = this;
this.$selectItem.each(function () {
that.data[$(this).data('index')][that.header.stateField] = $(this).prop('checked');
});
};
BootstrapTable.prototype.resetRows = function () {
var that = this;
$.each(this.data, function (i, row) {
that.$selectAll.prop('checked', false);
that.$selectItem.prop('checked', false);
if (that.header.stateField) {
row[that.header.stateField] = false;
}
});
this.initHiddenRows();
};
BootstrapTable.prototype.trigger = function (name) {
var args = Array.prototype.slice.call(arguments, 1);
name += '.bs.table';
this.options[BootstrapTable.EVENTS[name]].apply(this.options, args);
this.$el.trigger($.Event(name), args);
this.options.onAll(name, args);
this.$el.trigger($.Event('all.bs.table'), [name, args]);
};
BootstrapTable.prototype.resetHeader = function () {
// fix #61: the hidden table reset header bug.
// fix bug: get $el.css('width') error sometime (height = 500)
clearTimeout(this.timeoutId_);
this.timeoutId_ = setTimeout($.proxy(this.fitHeader, this), this.$el.is(':hidden') ? 100 : 0);
};
BootstrapTable.prototype.fitHeader = function () {
var that = this,
fixedBody,
scrollWidth,
focused,
focusedTemp;
if (that.$el.is(':hidden')) {
that.timeoutId_ = setTimeout($.proxy(that.fitHeader, that), 100);
return;
}
fixedBody = this.$tableBody.get(0);
scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth &&
fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ?
getScrollBarWidth() : 0;
this.$el.css('margin-top', -this.$header.outerHeight());
focused = $(':focus');
if (focused.length > 0) {
var $th = focused.parents('th');
if ($th.length > 0) {
var dataField = $th.attr('data-field');
if (dataField !== undefined) {
var $headerTh = this.$header.find("[data-field='" + dataField + "']");
if ($headerTh.length > 0) {
$headerTh.find(":input").addClass("focus-temp");
}
}
}
}
this.$header_ = this.$header.clone(true, true);
this.$selectAll_ = this.$header_.find('[name="btSelectAll"]');
this.$tableHeader.css({
'margin-right': scrollWidth
}).find('table').css('width', this.$el.outerWidth())
.html('').attr('class', this.$el.attr('class'))
.append(this.$header_);
focusedTemp = $('.focus-temp:visible:eq(0)');
if (focusedTemp.length > 0) {
focusedTemp.focus();
this.$header.find('.focus-temp').removeClass('focus-temp');
}
// fix bug: $.data() is not working as expected after $.append()
this.$header.find('th[data-field]').each(function (i) {
that.$header_.find(sprintf('th[data-field="%s"]', $(this).data('field'))).data($(this).data());
});
var visibleFields = this.getVisibleFields(),
$ths = this.$header_.find('th');
this.$body.find('>tr:first-child:not(.no-records-found) > *').each(function (i) {
var $this = $(this),
index = i;
if (that.options.detailView && !that.options.cardView) {
if (i === 0) {
that.$header_.find('th.detail').find('.fht-cell').width($this.innerWidth());
}
index = i - 1;
}
if (index === -1) {
return;
}
var $th = that.$header_.find(sprintf('th[data-field="%s"]', visibleFields[index]));
if ($th.length > 1) {
$th = $($ths[$this[0].cellIndex]);
}
var zoomWidth = $th.width() - $th.find('.fht-cell').width();
$th.find('.fht-cell').width($this.innerWidth() - zoomWidth);
});
this.horizontalScroll();
this.trigger('post-header');
};
BootstrapTable.prototype.resetFooter = function () {
var that = this,
data = that.getData(),
html = [];
if (!this.options.showFooter || this.options.cardView) { //do nothing
return;
}
if (!this.options.cardView && this.options.detailView) {
html.push('<td><div class="th-inner"> </div><div class="fht-cell"></div></td>');
}
$.each(this.columns, function (i, column) {
var key,
falign = '', // footer align style
valign = '',
csses = [],
style = {},
class_ = sprintf(' class="%s"', column['class']);
if (!column.visible) {
return;
}
if (that.options.cardView && (!column.cardVisible)) {
return;
}
falign = sprintf('text-align: %s; ', column.falign ? column.falign : column.align);
valign = sprintf('vertical-align: %s; ', column.valign);
style = calculateObjectValue(null, that.options.footerStyle);
if (style && style.css) {
for (key in style.css) {
csses.push(key + ': ' + style.css[key]);
}
}
html.push('<td', class_, sprintf(' style="%s"', falign + valign + csses.concat().join('; ')), '>');
html.push('<div class="th-inner">');
html.push(calculateObjectValue(column, column.footerFormatter, [data], ' ') || ' ');
html.push('</div>');
html.push('<div class="fht-cell"></div>');
html.push('</div>');
html.push('</td>');
});
this.$tableFooter.find('tr').html(html.join(''));
this.$tableFooter.show();
clearTimeout(this.timeoutFooter_);
this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this),
this.$el.is(':hidden') ? 100 : 0);
};
BootstrapTable.prototype.fitFooter = function () {
var that = this,
$footerTd,
elWidth,
scrollWidth;
clearTimeout(this.timeoutFooter_);
if (this.$el.is(':hidden')) {
this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this), 100);
return;
}
elWidth = this.$el.css('width');
scrollWidth = elWidth > this.$tableBody.width() ? getScrollBarWidth() : 0;
this.$tableFooter.css({
'margin-right': scrollWidth
}).find('table').css('width', elWidth)
.attr('class', this.$el.attr('class'));
$footerTd = this.$tableFooter.find('td');
this.$body.find('>tr:first-child:not(.no-records-found) > *').each(function (i) {
var $this = $(this);
$footerTd.eq(i).find('.fht-cell').width($this.innerWidth());
});
this.horizontalScroll();
};
BootstrapTable.prototype.horizontalScroll = function () {
var that = this;
// horizontal scroll event
// TODO: it's probably better improving the layout than binding to scroll event
that.trigger('scroll-body');
this.$tableBody.off('scroll').on('scroll', function () {
if (that.options.showHeader && that.options.height) {
that.$tableHeader.scrollLeft($(this).scrollLeft());
}
if (that.options.showFooter && !that.options.cardView) {
that.$tableFooter.scrollLeft($(this).scrollLeft());
}
});
};
BootstrapTable.prototype.toggleColumn = function (index, checked, needUpdate) {
if (index === -1) {
return;
}
this.columns[index].visible = checked;
this.initHeader();
this.initSearch();
this.initPagination();
this.initBody();
if (this.options.showColumns) {
var $items = this.$toolbar.find('.keep-open input').prop('disabled', false);
if (needUpdate) {
$items.filter(sprintf('[value="%s"]', index)).prop('checked', checked);
}
if ($items.filter(':checked').length <= this.options.minimumCountColumns) {
$items.filter(':checked').prop('disabled', true);
}
}
};
BootstrapTable.prototype.getVisibleFields = function () {
var that = this,
visibleFields = [];
$.each(this.header.fields, function (j, field) {
var column = that.columns[that.fieldsColumnsIndex[field]];
if (!column.visible) {
return;
}
visibleFields.push(field);
});
return visibleFields;
};
// PUBLIC FUNCTION DEFINITION
// =======================
BootstrapTable.prototype.resetView = function (params) {
var padding = 0;
if (params && params.height) {
this.options.height = params.height;
}
this.$selectAll.prop('checked', this.$selectItem.length > 0 &&
this.$selectItem.length === this.$selectItem.filter(':checked').length);
if (this.options.height) {
var toolbarHeight = this.$toolbar.outerHeight(true),
paginationHeight = this.$pagination.outerHeight(true),
height = this.options.height - toolbarHeight - paginationHeight;
this.$tableContainer.css('height', height + 'px');
}
if (this.options.cardView) {
// remove the element css
this.$el.css('margin-top', '0');
this.$tableContainer.css('padding-bottom', '0');
this.$tableFooter.hide();
return;
}
if (this.options.showHeader && this.options.height) {
this.$tableHeader.show();
this.resetHeader();
padding += this.$header.outerHeight();
} else {
this.$tableHeader.hide();
this.trigger('post-header');
}
if (this.options.showFooter) {
this.resetFooter();
if (this.options.height) {
padding += this.$tableFooter.outerHeight() + 1;
}
}
// Assign the correct sortable arrow
this.getCaret();
this.$tableContainer.css('padding-bottom', padding + 'px');
this.trigger('reset-view');
};
BootstrapTable.prototype.getData = function (useCurrentPage) {
var data = this.options.data;
if (this.searchText || this.options.sortName || !$.isEmptyObject(this.filterColumns) || !$.isEmptyObject(this.filterColumnsPartial)) {
data = this.data;
}
if (useCurrentPage) {
return data.slice(this.pageFrom - 1, this.pageTo);
}
return data;
};
BootstrapTable.prototype.load = function (data) {
var fixedScroll = false;
// #431: support pagination
if (this.options.pagination && this.options.sidePagination === 'server') {
this.options.totalRows = data[this.options.totalField];
fixedScroll = data.fixedScroll;
data = data[this.options.dataField];
} else if (!$.isArray(data)) { // support fixedScroll
fixedScroll = data.fixedScroll;
data = data.data;
}
this.initData(data);
this.initSearch();
this.initPagination();
this.initBody(fixedScroll);
};
BootstrapTable.prototype.append = function (data) {
this.initData(data, 'append');
this.initSearch();
this.initPagination();
this.initSort();
this.initBody(true);
};
BootstrapTable.prototype.prepend = function (data) {
this.initData(data, 'prepend');
this.initSearch();
this.initPagination();
this.initSort();
this.initBody(true);
};
BootstrapTable.prototype.remove = function (params) {
var len = this.options.data.length,
i, row;
if (!params.hasOwnProperty('field') || !params.hasOwnProperty('values')) {
return;
}
for (i = len - 1; i >= 0; i--) {
row = this.options.data[i];
if (!row.hasOwnProperty(params.field)) {
continue;
}
if ($.inArray(row[params.field], params.values) !== -1) {
this.options.data.splice(i, 1);
if (this.options.sidePagination === 'server') {
this.options.totalRows -= 1;
}
}
}
if (len === this.options.data.length) {
return;
}
this.initSearch();
this.initPagination();
this.initSort();
this.initBody(true);
};
BootstrapTable.prototype.removeAll = function () {
if (this.options.data.length > 0) {
this.options.data.splice(0, this.options.data.length);
this.initSearch();
this.initPagination();
this.initBody(true);
}
};
BootstrapTable.prototype.getRowByUniqueId = function (id) {
var uniqueId = this.options.uniqueId,
len = this.options.data.length,
dataRow = null,
i, row, rowUniqueId;
for (i = len - 1; i >= 0; i--) {
row = this.options.data[i];
if (row.hasOwnProperty(uniqueId)) { // uniqueId is a column
rowUniqueId = row[uniqueId];
} else if(row._data.hasOwnProperty(uniqueId)) { // uniqueId is a row data property
rowUniqueId = row._data[uniqueId];
} else {
continue;
}
if (typeof rowUniqueId === 'string') {
id = id.toString();
} else if (typeof rowUniqueId === 'number') {
if ((Number(rowUniqueId) === rowUniqueId) && (rowUniqueId % 1 === 0)) {
id = parseInt(id);
} else if ((rowUniqueId === Number(rowUniqueId)) && (rowUniqueId !== 0)) {
id = parseFloat(id);
}
}
if (rowUniqueId === id) {
dataRow = row;
break;
}
}
return dataRow;
};
BootstrapTable.prototype.removeByUniqueId = function (id) {
var len = this.options.data.length,
row = this.getRowByUniqueId(id);
if (row) {
this.options.data.splice(this.options.data.indexOf(row), 1);
}
if (len === this.options.data.length) {
return;
}
this.initSearch();
this.initPagination();
this.initBody(true);
};
BootstrapTable.prototype.updateByUniqueId = function (params) {
var that = this;
var allParams = $.isArray(params) ? params : [ params ];
$.each(allParams, function(i, params) {
var rowId;
if (!params.hasOwnProperty('id') || !params.hasOwnProperty('row')) {
return;
}
rowId = $.inArray(that.getRowByUniqueId(params.id), that.options.data);
if (rowId === -1) {
return;
}
$.extend(that.options.data[rowId], params.row);
});
this.initSearch();
this.initPagination();
this.initSort();
this.initBody(true);
};
BootstrapTable.prototype.refreshColumnTitle = function (params) {
if (!params.hasOwnProperty('field') || !params.hasOwnProperty('title')) {
return;
}
this.columns[this.fieldsColumnsIndex[params.field]].title =
this.options.escape ? escapeHTML(params.title) : params.title;
if (this.columns[this.fieldsColumnsIndex[params.field]].visible) {
var header = this.options.height !== undefined ? this.$tableHeader : this.$header;
header.find('th[data-field]').each(function (i) {
if ($(this).data('field') === params.field) {
$($(this).find(".th-inner")[0]).text(params.title);
return false;
}
});
}
};
BootstrapTable.prototype.insertRow = function (params) {
if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) {
return;
}
this.options.data.splice(params.index, 0, params.row);
this.initSearch();
this.initPagination();
this.initSort();
this.initBody(true);
};
BootstrapTable.prototype.updateRow = function (params) {
var that = this;
var allParams = $.isArray(params) ? params : [ params ];
$.each(allParams, function(i, params) {
if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) {
return;
}
$.extend(that.options.data[params.index], params.row);
});
this.initSearch();
this.initPagination();
this.initSort();
this.initBody(true);
};
BootstrapTable.prototype.initHiddenRows = function () {
this.hiddenRows = [];
};
BootstrapTable.prototype.showRow = function (params) {
this.toggleRow(params, true);
};
BootstrapTable.prototype.hideRow = function (params) {
this.toggleRow(params, false);
};
BootstrapTable.prototype.toggleRow = function (params, visible) {
var row, index;
if (params.hasOwnProperty('index')) {
row = this.getData()[params.index];
} else if (params.hasOwnProperty('uniqueId')) {
row = this.getRowByUniqueId(params.uniqueId);
}
if (!row) {
return;
}
index = $.inArray(row, this.hiddenRows);
if (!visible && index === -1) {
this.hiddenRows.push(row);
} else if (visible && index > -1) {
this.hiddenRows.splice(index, 1);
}
this.initBody(true);
};
BootstrapTable.prototype.getHiddenRows = function (show) {
var that = this,
data = this.getData(),
rows = [];
$.each(data, function (i, row) {
if ($.inArray(row, that.hiddenRows) > -1) {
rows.push(row);
}
});
this.hiddenRows = rows;
return rows;
};
BootstrapTable.prototype.mergeCells = function (options) {
var row = options.index,
col = $.inArray(options.field, this.getVisibleFields()),
rowspan = options.rowspan || 1,
colspan = options.colspan || 1,
i, j,
$tr = this.$body.find('>tr'),
$td;
if (this.options.detailView && !this.options.cardView) {
col += 1;
}
$td = $tr.eq(row).find('>td').eq(col);
if (row < 0 || col < 0 || row >= this.data.length) {
return;
}
for (i = row; i < row + rowspan; i++) {
for (j = col; j < col + colspan; j++) {
$tr.eq(i).find('>td').eq(j).hide();
}
}
$td.attr('rowspan', rowspan).attr('colspan', colspan).show();
};
BootstrapTable.prototype.updateCell = function (params) {
if (!params.hasOwnProperty('index') ||
!params.hasOwnProperty('field') ||
!params.hasOwnProperty('value')) {
return;
}
this.data[params.index][params.field] = params.value;
if (params.reinit === false) {
return;
}
this.initSort();
this.initBody(true);
};
BootstrapTable.prototype.updateCellById = function (params) {
var that = this;
if (!params.hasOwnProperty('id') ||
!params.hasOwnProperty('field') ||
!params.hasOwnProperty('value')) {
return;
}
var allParams = $.isArray(params) ? params : [ params ];
$.each(allParams, function(i, params) {
var rowId;
rowId = $.inArray(that.getRowByUniqueId(params.id), that.options.data);
if (rowId === -1) {
return;
}
that.data[rowId][params.field] = params.value;
});
if (params.reinit === false) {
return;
}
this.initSort();
this.initBody(true);
};
BootstrapTable.prototype.getOptions = function () {
//Deep copy
return $.extend(true, {}, this.options);
};
BootstrapTable.prototype.getSelections = function () {
var that = this;
return $.grep(this.options.data, function (row) {
// fix #2424: from html with checkbox
return row[that.header.stateField] === true;
});
};
BootstrapTable.prototype.getAllSelections = function () {
var that = this;
return $.grep(this.options.data, function (row) {
return row[that.header.stateField];
});
};
BootstrapTable.prototype.checkAll = function () {
this.checkAll_(true);
};
BootstrapTable.prototype.uncheckAll = function () {
this.checkAll_(false);
};
BootstrapTable.prototype.checkInvert = function () {
var that = this;
var rows = that.$selectItem.filter(':enabled');
var checked = rows.filter(':checked');
rows.each(function() {
$(this).prop('checked', !$(this).prop('checked'));
});
that.updateRows();
that.updateSelected();
that.trigger('uncheck-some', checked);
checked = that.getSelections();
that.trigger('check-some', checked);
};
BootstrapTable.prototype.checkAll_ = function (checked) {
var rows;
if (!checked) {
rows = this.getSelections();
}
this.$selectAll.add(this.$selectAll_).prop('checked', checked);
this.$selectItem.filter(':enabled').prop('checked', checked);
this.updateRows();
if (checked) {
rows = this.getSelections();
}
this.trigger(checked ? 'check-all' : 'uncheck-all', rows);
};
BootstrapTable.prototype.check = function (index) {
this.check_(true, index);
};
BootstrapTable.prototype.uncheck = function (index) {
this.check_(false, index);
};
BootstrapTable.prototype.check_ = function (checked, index) {
var $el = this.$selectItem.filter(sprintf('[data-index="%s"]', index)).prop('checked', checked);
this.data[index][this.header.stateField] = checked;
this.updateSelected();
this.trigger(checked ? 'check' : 'uncheck', this.data[index], $el);
};
BootstrapTable.prototype.checkBy = function (obj) {
this.checkBy_(true, obj);
};
BootstrapTable.prototype.uncheckBy = function (obj) {
this.checkBy_(false, obj);
};
BootstrapTable.prototype.checkBy_ = function (checked, obj) {
if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) {
return;
}
var that = this,
rows = [];
$.each(this.options.data, function (index, row) {
if (!row.hasOwnProperty(obj.field)) {
return false;
}
if ($.inArray(row[obj.field], obj.values) !== -1) {
var $el = that.$selectItem.filter(':enabled')
.filter(sprintf('[data-index="%s"]', index)).prop('checked', checked);
row[that.header.stateField] = checked;
rows.push(row);
that.trigger(checked ? 'check' : 'uncheck', row, $el);
}
});
this.updateSelected();
this.trigger(checked ? 'check-some' : 'uncheck-some', rows);
};
BootstrapTable.prototype.destroy = function () {
this.$el.insertBefore(this.$container);
$(this.options.toolbar).insertBefore(this.$el);
this.$container.next().remove();
this.$container.remove();
this.$el.html(this.$el_.html())
.css('margin-top', '0')
.attr('class', this.$el_.attr('class') || ''); // reset the class
};
BootstrapTable.prototype.showLoading = function () {
this.$tableLoading.show();
};
BootstrapTable.prototype.hideLoading = function () {
this.$tableLoading.hide();
};
BootstrapTable.prototype.togglePagination = function () {
this.options.pagination = !this.options.pagination;
var button = this.$toolbar.find('button[name="paginationSwitch"] i');
if (this.options.pagination) {
button.attr("class", this.options.iconsPrefix + " " + this.options.icons.paginationSwitchDown);
} else {
button.attr("class", this.options.iconsPrefix + " " + this.options.icons.paginationSwitchUp);
}
this.updatePagination();
};
BootstrapTable.prototype.toggleFullscreen = function () {
this.$el.closest('.bootstrap-table').toggleClass('fullscreen');
};
BootstrapTable.prototype.refresh = function (params) {
if (params && params.url) {
this.options.url = params.url;
}
if (params && params.pageNumber) {
this.options.pageNumber = params.pageNumber;
}
if (params && params.pageSize) {
this.options.pageSize = params.pageSize;
}
this.initServer(params && params.silent,
params && params.query, params && params.url);
this.trigger('refresh', params);
};
BootstrapTable.prototype.resetWidth = function () {
if (this.options.showHeader && this.options.height) {
this.fitHeader();
}
if (this.options.showFooter && !this.options.cardView) {
this.fitFooter();
}
};
BootstrapTable.prototype.showColumn = function (field) {
this.toggleColumn(this.fieldsColumnsIndex[field], true, true);
};
BootstrapTable.prototype.hideColumn = function (field) {
this.toggleColumn(this.fieldsColumnsIndex[field], false, true);
};
BootstrapTable.prototype.getHiddenColumns = function () {
return $.grep(this.columns, function (column) {
return !column.visible;
});
};
BootstrapTable.prototype.getVisibleColumns = function () {
return $.grep(this.columns, function (column) {
return column.visible;
});
};
BootstrapTable.prototype.toggleAllColumns = function (visible) {
var that = this;
$.each(this.columns, function (i, column) {
that.columns[i].visible = visible;
});
this.initHeader();
this.initSearch();
this.initPagination();
this.initBody();
if (this.options.showColumns) {
var $items = this.$toolbar.find('.keep-open input').prop('disabled', false);
if ($items.filter(':checked').length <= this.options.minimumCountColumns) {
$items.filter(':checked').prop('disabled', true);
}
}
};
BootstrapTable.prototype.showAllColumns = function () {
this.toggleAllColumns(true);
};
BootstrapTable.prototype.hideAllColumns = function () {
this.toggleAllColumns(false);
};
BootstrapTable.prototype.filterBy = function (columns) {
this.filterColumns = $.isEmptyObject(columns) ? {} : columns;
this.options.pageNumber = 1;
this.initSearch();
this.updatePagination();
};
BootstrapTable.prototype.scrollTo = function (value) {
if (typeof value === 'string') {
value = value === 'bottom' ? this.$tableBody[0].scrollHeight : 0;
}
if (typeof value === 'number') {
this.$tableBody.scrollTop(value);
}
if (typeof value === 'undefined') {
return this.$tableBody.scrollTop();
}
};
BootstrapTable.prototype.getScrollPosition = function () {
return this.scrollTo();
};
BootstrapTable.prototype.selectPage = function (page) {
if (page > 0 && page <= this.options.totalPages) {
this.options.pageNumber = page;
this.updatePagination();
}
};
BootstrapTable.prototype.prevPage = function () {
if (this.options.pageNumber > 1) {
this.options.pageNumber--;
this.updatePagination();
}
};
BootstrapTable.prototype.nextPage = function () {
if (this.options.pageNumber < this.options.totalPages) {
this.options.pageNumber++;
this.updatePagination();
}
};
BootstrapTable.prototype.toggleView = function () {
this.options.cardView = !this.options.cardView;
this.initHeader();
// Fixed remove toolbar when click cardView button.
//that.initToolbar();
var $icon = this.$toolbar.find('button[name="toggle"] i');
if (this.options.cardView) {
$icon.removeClass(this.options.icons.toggleOff);
$icon.addClass(this.options.icons.toggleOn);
} else {
$icon.removeClass(this.options.icons.toggleOn);
$icon.addClass(this.options.icons.toggleOff);
}
this.initBody();
this.trigger('toggle', this.options.cardView);
};
BootstrapTable.prototype.refreshOptions = function (options) {
//If the objects are equivalent then avoid the call of destroy / init methods
if (compareObjects(this.options, options, true)) {
return;
}
this.options = $.extend(this.options, options);
this.trigger('refresh-options', this.options);
this.destroy();
this.init();
};
BootstrapTable.prototype.resetSearch = function (text) {
var $search = this.$toolbar.find('.search input');
$search.val(text || '');
this.onSearch({currentTarget: $search});
};
BootstrapTable.prototype.expandRow_ = function (expand, index) {
var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', index));
if ($tr.next().is('tr.detail-view') === (expand ? false : true)) {
$tr.find('> td > .detail-icon').click();
}
};
BootstrapTable.prototype.expandRow = function (index) {
this.expandRow_(true, index);
};
BootstrapTable.prototype.collapseRow = function (index) {
this.expandRow_(false, index);
};
BootstrapTable.prototype.expandAllRows = function (isSubTable) {
if (isSubTable) {
var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', 0)),
that = this,
detailIcon = null,
executeInterval = false,
idInterval = -1;
if (!$tr.next().is('tr.detail-view')) {
$tr.find('> td > .detail-icon').click();
executeInterval = true;
} else if (!$tr.next().next().is('tr.detail-view')) {
$tr.next().find(".detail-icon").click();
executeInterval = true;
}
if (executeInterval) {
try {
idInterval = setInterval(function () {
detailIcon = that.$body.find("tr.detail-view").last().find(".detail-icon");
if (detailIcon.length > 0) {
detailIcon.click();
} else {
clearInterval(idInterval);
}
}, 1);
} catch (ex) {
clearInterval(idInterval);
}
}
} else {
var trs = this.$body.children();
for (var i = 0; i < trs.length; i++) {
this.expandRow_(true, $(trs[i]).data("index"));
}
}
};
BootstrapTable.prototype.collapseAllRows = function (isSubTable) {
if (isSubTable) {
this.expandRow_(false, 0);
} else {
var trs = this.$body.children();
for (var i = 0; i < trs.length; i++) {
this.expandRow_(false, $(trs[i]).data("index"));
}
}
};
BootstrapTable.prototype.updateFormatText = function (name, text) {
if (this.options[sprintf('format%s', name)]) {
if (typeof text === 'string') {
this.options[sprintf('format%s', name)] = function () {
return text;
};
} else if (typeof text === 'function') {
this.options[sprintf('format%s', name)] = text;
}
}
this.initToolbar();
this.initPagination();
this.initBody();
};
// BOOTSTRAP TABLE PLUGIN DEFINITION
// =======================
var allowedMethods = [
'getOptions',
'getSelections', 'getAllSelections', 'getData',
'load', 'append', 'prepend', 'remove', 'removeAll',
'insertRow', 'updateRow', 'updateCell', 'updateByUniqueId', 'removeByUniqueId',
'getRowByUniqueId', 'showRow', 'hideRow', 'getHiddenRows',
'mergeCells', 'refreshColumnTitle',
'checkAll', 'uncheckAll', 'checkInvert',
'check', 'uncheck',
'checkBy', 'uncheckBy',
'refresh',
'resetView',
'resetWidth',
'destroy',
'showLoading', 'hideLoading',
'showColumn', 'hideColumn', 'getHiddenColumns', 'getVisibleColumns',
'showAllColumns', 'hideAllColumns',
'filterBy',
'scrollTo',
'getScrollPosition',
'selectPage', 'prevPage', 'nextPage',
'togglePagination',
'toggleView',
'refreshOptions',
'resetSearch',
'expandRow', 'collapseRow', 'expandAllRows', 'collapseAllRows',
'updateFormatText', 'updateCellById'
];
$.fn.bootstrapTable = function (option) {
var value,
args = Array.prototype.slice.call(arguments, 1);
this.each(function () {
var $this = $(this),
data = $this.data('bootstrap.table'),
options = $.extend({}, BootstrapTable.DEFAULTS, $this.data(),
typeof option === 'object' && option);
if (typeof option === 'string') {
if ($.inArray(option, allowedMethods) < 0) {
throw new Error("Unknown method: " + option);
}
if (!data) {
return;
}
value = data[option].apply(data, args);
if (option === 'destroy') {
$this.removeData('bootstrap.table');
}
}
if (!data) {
$this.data('bootstrap.table', (data = new BootstrapTable(this, options)));
}
});
return typeof value === 'undefined' ? this : value;
};
$.fn.bootstrapTable.Constructor = BootstrapTable;
$.fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS;
$.fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS;
$.fn.bootstrapTable.locales = BootstrapTable.LOCALES;
$.fn.bootstrapTable.methods = allowedMethods;
$.fn.bootstrapTable.utils = {
bootstrapVersion: bootstrapVersion,
sprintf: sprintf,
compareObjects: compareObjects,
calculateObjectValue: calculateObjectValue,
getItemField: getItemField,
objectKeys: objectKeys,
isIEBrowser: isIEBrowser
};
// BOOTSTRAP TABLE INIT
// =======================
$(function () {
$('[data-toggle="table"]').bootstrapTable();
});
})(jQuery);
```
|
```java
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.graal.compiler.truffle.test.nodes;
public class TestNodeFactory {
public AbstractTestNode createConstant(int value) {
return new ConstantTestNode(value);
}
}
```
|
```python
# copyright (c) 2022 paddlepaddle authors. all rights reserved.
#
# licensed under the apache license, version 2.0 (the "license");
# you may not use this file except in compliance with the license.
# you may obtain a copy of the license at
#
# path_to_url
#
# unless required by applicable law or agreed to in writing, software
# distributed under the license is distributed on an "as is" basis,
# without warranties or conditions of any kind, either express or implied.
# see the license for the specific language governing permissions and
# limitations under the license.
import os
import sys
import unittest
import numpy as np
sys.path.append("../../quantization")
from imperative_test_utils import (
ImperativeLenetWithSkipQuant,
fix_model_dict,
train_lenet,
)
import paddle
from paddle.framework import core, set_flags
from paddle.optimizer import Adam
from paddle.quantization import ImperativeQuantAware
INFER_MODEL_SUFFIX = ".pdmodel"
INFER_PARAMS_SUFFIX = ".pdiparams"
os.environ["CPU_NUM"] = "1"
if core.is_compiled_with_cuda():
set_flags({"FLAGS_cudnn_deterministic": True})
class TestImperativeOutSclae(unittest.TestCase):
def test_out_scale_acc(self):
paddle.disable_static()
seed = 1000
lr = 0.1
qat = ImperativeQuantAware()
np.random.seed(seed)
reader = paddle.batch(
paddle.dataset.mnist.test(), batch_size=512, drop_last=True
)
lenet = ImperativeLenetWithSkipQuant()
lenet = fix_model_dict(lenet)
qat.quantize(lenet)
adam = Adam(learning_rate=lr, parameters=lenet.parameters())
dynamic_loss_rec = []
lenet.train()
loss_list = train_lenet(lenet, reader, adam)
lenet.eval()
path = "./save_dynamic_quant_infer_model/lenet"
save_dir = "./save_dynamic_quant_infer_model"
qat.save_quantized_model(
layer=lenet,
path=path,
input_spec=[
paddle.static.InputSpec(
shape=[None, 1, 28, 28], dtype='float32'
)
],
)
paddle.enable_static()
if core.is_compiled_with_cuda():
place = core.CUDAPlace(0)
else:
place = core.CPUPlace()
exe = paddle.static.Executor(place)
[
inference_program,
feed_target_names,
fetch_targets,
] = paddle.static.load_inference_model(
save_dir,
executor=exe,
model_filename="lenet" + INFER_MODEL_SUFFIX,
params_filename="lenet" + INFER_PARAMS_SUFFIX,
)
model_ops = inference_program.global_block().ops
conv2d_count, matmul_count = 0, 0
conv2d_skip_count, matmul_skip_count = 0, 0
find_conv2d = False
find_matmul = False
for i, op in enumerate(model_ops):
if op.type == 'conv2d':
find_conv2d = True
if op.has_attr("skip_quant"):
conv2d_skip_count += 1
if conv2d_count > 0:
self.assertTrue(
'fake_quantize_dequantize' in model_ops[i - 1].type
)
else:
self.assertTrue(
'fake_quantize_dequantize' not in model_ops[i - 1].type
)
conv2d_count += 1
if op.type == 'matmul':
find_matmul = True
if op.has_attr("skip_quant"):
matmul_skip_count += 1
if matmul_count > 0:
self.assertTrue(
'fake_quantize_dequantize' in model_ops[i - 1].type
)
else:
self.assertTrue(
'fake_quantize_dequantize' not in model_ops[i - 1].type
)
matmul_count += 1
if find_conv2d:
self.assertTrue(conv2d_skip_count == 1)
if find_matmul:
self.assertTrue(matmul_skip_count == 1)
if __name__ == '__main__':
unittest.main()
```
|
```sqlpl
--
-- vertex_labels()
--
-- prepare
DROP GRAPH IF EXISTS vertex_labels_simple CASCADE;
DROP GRAPH IF EXISTS vertex_labels_complex1 CASCADE;
DROP GRAPH IF EXISTS vertex_labels_complex2 CASCADE;
CREATE GRAPH vertex_labels_simple;
CREATE GRAPH vertex_labels_complex1;
CREATE GRAPH vertex_labels_complex2;
-- simple test
SET graph_path = vertex_labels_simple;
-- a
-- |
-- b c
-- | |
-- +-- d --+
CREATE VLABEL a;
CREATE VLABEL b;
CREATE VLABEL c INHERITS (a);
CREATE VLABEL d INHERITS (b, c);
CREATE (:a {name: 'a'});
CREATE (:b {name: 'b'});
CREATE (:c {name: 'c'});
CREATE (:d {name: 'd'});
MATCH (n) RETURN n.name, label(n);
MATCH (n) RETURN n.name, labels(n);
MATCH (n) RETURN n.name, labels(n)[0];
MATCH (n:c) RETURN n.name, labels(n)[1];
MATCH (n:d) RETURN n.name, labels(n)[2], labels(n)[3];
-- complex test 1
SET graph_path = vertex_labels_complex1;
-- a
-- |
-- b c
-- | |
-- +-- d --+ +-- e --+ f +-- g
-- | | | | | | |
-- h i j +------ k --+ |
-- | | | |
-- +---+------ l ------+-------+
CREATE VLABEL a;
CREATE VLABEL b INHERITS (a);
CREATE VLABEL c;
CREATE VLABEL d;
CREATE VLABEL e INHERITS (b, c);
CREATE VLABEL f;
CREATE VLABEL g;
CREATE VLABEL h INHERITS (d);
CREATE VLABEL i INHERITS (d);
CREATE VLABEL j INHERITS (d);
CREATE VLABEL k INHERITS (e, f, g);
CREATE VLABEL l INHERITS (i, j, k, g);
CREATE (:a {name: 'a'});
CREATE (:b {name: 'b'});
CREATE (:c {name: 'c'});
CREATE (:d {name: 'd'});
CREATE (:e {name: 'e'});
CREATE (:f {name: 'f'});
CREATE (:g {name: 'g'});
CREATE (:h {name: 'h'});
CREATE (:i {name: 'i'});
CREATE (:j {name: 'j'});
CREATE (:k {name: 'k'});
CREATE (:l {name: 'l'});
MATCH (n) RETURN n.name, label(n), labels(n);
-- complex test 2
SET graph_path = vertex_labels_complex2;
-- +-- a ----------+
-- | | b |
-- | | | |
-- | +-- d --+ |
-- | | |
-- | e --+-- f
-- | |
-- +-- c g
-- | |
-- +-- h --+-- i
-- | |
-- +-- j --+
CREATE VLABEL a;
CREATE VLABEL b;
CREATE VLABEL c INHERITS (a);
CREATE VLABEL d INHERITS (a, b);
CREATE VLABEL e INHERITS (d);
CREATE VLABEL f INHERITS (a);
CREATE VLABEL g INHERITS (e, f);
CREATE VLABEL h INHERITS (c, g);
CREATE VLABEL i INHERITS (g);
CREATE VLABEL j INHERITS (h, i);
CREATE (:a {name: 'a'});
CREATE (:b {name: 'b'});
CREATE (:c {name: 'c'});
CREATE (:d {name: 'd'});
CREATE (:e {name: 'e'});
CREATE (:f {name: 'f'});
CREATE (:g {name: 'g'});
CREATE (:h {name: 'h'});
CREATE (:i {name: 'i'});
CREATE (:j {name: 'j'});
MATCH (n) RETURN n.name, label(n), labels(n);
-- cleanup
DROP GRAPH vertex_labels_complex2 CASCADE;
DROP GRAPH vertex_labels_complex1 CASCADE;
DROP GRAPH vertex_labels_simple CASCADE;
-- Added test for AG249, use ln() for all log() calls
-- Create initial graph
CREATE GRAPH ag249_log_to_ln;
SET graph_path = ag249_log_to_ln;
CREATE VLABEL numbers;
CREATE (:numbers {string: '10', numeric: 10});
-- These should fail as there is no rule to cast from string to numeric
MATCH (u:numbers) RETURN log(u.string);
MATCH (u:numbers) RETURN ln(u.string);
MATCH (u:numbers) RETURN log10(u.string);
-- Check that log() == ln() != log10
MATCH (u:numbers) RETURN log(u.numeric), ln(u.numeric), log10(u.numeric);
-- Check with a string constant
RETURN log('10'), ln('10'), log10('10');
-- Check with a numeric constant;
RETURN log(10), ln(10), log10(10);
-- Check hybrid query
return log10(10), (select log(10));
-- cleanup
DROP GRAPH ag249_log_to_ln CASCADE;
-- Added tests for AG222. These tests test the new function
-- get_last_graph_write_stats(). Which is provided to allow
-- access to statistics on the last graph write operation.
CREATE GRAPH ag222;
SET graph_path = ag222;
CREATE VLABEL vertices;
CREATE ELABEL edges;
-- Should return only 2 inserted vertices and 1 inserted edge
create (:vertices {name: 'Boston'})-[:edges]->(:vertices {name: 'Miami'});
SELECT * FROM get_last_graph_write_stats();
-- Should return only 2 updated properties
MATCH (u:vertices) SET u.property = true;
SELECT * FROM get_last_graph_write_stats();
-- Should return only 1 deleted edge
match (u:vertices)-[e:edges]-() delete e;
SELECT * FROM get_last_graph_write_stats();
-- Should return only 2 deleted vertices
match (u) delete u;
SELECT * FROM get_last_graph_write_stats();
-- cleanup
DROP GRAPH ag222 CASCADE;
-- Added test for AG-283
CREATE GRAPH AG283;
CREATE ({name: 'arc 0', degree: 0});
MATCH (v) RETURN radians(v.degree);
-- cleanup
DROP GRAPH AG283 CASCADE;
```
|
```objective-c
/*
*
*/
/**
* @file
* @brief Display definitions for MIPI devices
*/
#ifndef ZEPHYR_INCLUDE_DISPLAY_MIPI_DISPLAY_H_
#define ZEPHYR_INCLUDE_DISPLAY_MIPI_DISPLAY_H_
/**
* @brief MIPI Display definitions
* @defgroup mipi_interface MIPI Display interface
* @ingroup io_interfaces
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name MIPI-DSI DCS (Display Command Set)
* @{
*/
#define MIPI_DCS_NOP 0x00U
#define MIPI_DCS_SOFT_RESET 0x01U
#define MIPI_DCS_GET_COMPRESSION_MODE 0x03U
#define MIPI_DCS_GET_DISPLAY_ID 0x04U
#define MIPI_DCS_GET_RED_CHANNEL 0x06U
#define MIPI_DCS_GET_GREEN_CHANNEL 0x07U
#define MIPI_DCS_GET_BLUE_CHANNEL 0x08U
#define MIPI_DCS_GET_DISPLAY_STATUS 0x09U
#define MIPI_DCS_GET_POWER_MODE 0x0AU
#define MIPI_DCS_GET_ADDRESS_MODE 0x0BU
#define MIPI_DCS_GET_PIXEL_FORMAT 0x0CU
#define MIPI_DCS_GET_DISPLAY_MODE 0x0DU
#define MIPI_DCS_GET_SIGNAL_MODE 0x0EU
#define MIPI_DCS_GET_DIAGNOSTIC_RESULT 0x0FU
#define MIPI_DCS_ENTER_SLEEP_MODE 0x10U
#define MIPI_DCS_EXIT_SLEEP_MODE 0x11U
#define MIPI_DCS_ENTER_PARTIAL_MODE 0x12U
#define MIPI_DCS_ENTER_NORMAL_MODE 0x13U
#define MIPI_DCS_EXIT_INVERT_MODE 0x20U
#define MIPI_DCS_ENTER_INVERT_MODE 0x21U
#define MIPI_DCS_SET_GAMMA_CURVE 0x26U
#define MIPI_DCS_SET_DISPLAY_OFF 0x28U
#define MIPI_DCS_SET_DISPLAY_ON 0x29U
#define MIPI_DCS_SET_COLUMN_ADDRESS 0x2AU
#define MIPI_DCS_SET_PAGE_ADDRESS 0x2BU
#define MIPI_DCS_WRITE_MEMORY_START 0x2CU
#define MIPI_DCS_WRITE_LUT 0x2DU
#define MIPI_DCS_READ_MEMORY_START 0x2EU
#define MIPI_DCS_SET_PARTIAL_ROWS 0x30U
#define MIPI_DCS_SET_PARTIAL_COLUMNS 0x31U
#define MIPI_DCS_SET_SCROLL_AREA 0x33U
#define MIPI_DCS_SET_TEAR_OFF 0x34U
#define MIPI_DCS_SET_TEAR_ON 0x35U
#define MIPI_DCS_SET_ADDRESS_MODE 0x36U
#define MIPI_DCS_SET_SCROLL_START 0x37U
#define MIPI_DCS_EXIT_IDLE_MODE 0x38U
#define MIPI_DCS_ENTER_IDLE_MODE 0x39U
#define MIPI_DCS_SET_PIXEL_FORMAT 0x3AU
#define MIPI_DCS_WRITE_MEMORY_CONTINUE 0x3CU
#define MIPI_DCS_SET_3D_CONTROL 0x3DU
#define MIPI_DCS_READ_MEMORY_CONTINUE 0x3EU
#define MIPI_DCS_GET_3D_CONTROL 0x3FU
#define MIPI_DCS_SET_VSYNC_TIMING 0x40U
#define MIPI_DCS_SET_TEAR_SCANLINE 0x44U
#define MIPI_DCS_GET_SCANLINE 0x45U
#define MIPI_DCS_SET_DISPLAY_BRIGHTNESS 0x51U
#define MIPI_DCS_GET_DISPLAY_BRIGHTNESS 0x52U
#define MIPI_DCS_WRITE_CONTROL_DISPLAY 0x53U
#define MIPI_DCS_GET_CONTROL_DISPLAY 0x54U
#define MIPI_DCS_WRITE_POWER_SAVE 0x55U
#define MIPI_DCS_GET_POWER_SAVE 0x56U
#define MIPI_DCS_SET_CABC_MIN_BRIGHTNESS 0x5EU
#define MIPI_DCS_GET_CABC_MIN_BRIGHTNESS 0x5FU
#define MIPI_DCS_READ_DDB_START 0xA1U
#define MIPI_DCS_READ_DDB_CONTINUE 0xA8U
#define MIPI_DCS_PIXEL_FORMAT_24BIT 0x77
#define MIPI_DCS_PIXEL_FORMAT_18BIT 0x66
#define MIPI_DCS_PIXEL_FORMAT_16BIT 0x55
#define MIPI_DCS_PIXEL_FORMAT_12BIT 0x33
#define MIPI_DCS_PIXEL_FORMAT_8BIT 0x22
#define MIPI_DCS_PIXEL_FORMAT_3BIT 0x11
/** @} */
/**
* @name MIPI-DSI Address mode register fields.
* @{
*/
#define MIPI_DCS_ADDRESS_MODE_MIRROR_Y BIT(7)
#define MIPI_DCS_ADDRESS_MODE_MIRROR_X BIT(6)
#define MIPI_DCS_ADDRESS_MODE_SWAP_XY BIT(5)
#define MIPI_DCS_ADDRESS_MODE_REFRESH_BT BIT(4)
#define MIPI_DCS_ADDRESS_MODE_BGR BIT(3)
#define MIPI_DCS_ADDRESS_MODE_LATCH_RL BIT(2)
#define MIPI_DCS_ADDRESS_MODE_FLIP_X BIT(1)
#define MIPI_DCS_ADDRESS_MODE_FLIP_Y BIT(0)
/** @} */
/**
* @name MIPI-DSI Processor-to-Peripheral transaction types.
* @{
*/
#define MIPI_DSI_V_SYNC_START 0x01U
#define MIPI_DSI_V_SYNC_END 0x11U
#define MIPI_DSI_H_SYNC_START 0x21U
#define MIPI_DSI_H_SYNC_END 0x31U
#define MIPI_DSI_COLOR_MODE_OFF 0x02U
#define MIPI_DSI_COLOR_MODE_ON 0x12U
#define MIPI_DSI_SHUTDOWN_PERIPHERAL 0x22U
#define MIPI_DSI_TURN_ON_PERIPHERAL 0x32U
#define MIPI_DSI_GENERIC_SHORT_WRITE_0_PARAM 0x03U
#define MIPI_DSI_GENERIC_SHORT_WRITE_1_PARAM 0x13U
#define MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM 0x23U
#define MIPI_DSI_GENERIC_READ_REQUEST_0_PARAM 0x04U
#define MIPI_DSI_GENERIC_READ_REQUEST_1_PARAM 0x14U
#define MIPI_DSI_GENERIC_READ_REQUEST_2_PARAM 0x24U
#define MIPI_DSI_DCS_SHORT_WRITE 0x05U
#define MIPI_DSI_DCS_SHORT_WRITE_PARAM 0x15U
#define MIPI_DSI_DCS_READ 0x06U
#define MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE 0x37U
#define MIPI_DSI_END_OF_TRANSMISSION 0x08U
#define MIPI_DSI_NULL_PACKET 0x09U
#define MIPI_DSI_BLANKING_PACKET 0x19U
#define MIPI_DSI_GENERIC_LONG_WRITE 0x29U
#define MIPI_DSI_DCS_LONG_WRITE 0x39U
#define MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20 0x0CU
#define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24 0x1CU
#define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16 0x2CU
#define MIPI_DSI_PACKED_PIXEL_STREAM_30 0x0DU
#define MIPI_DSI_PACKED_PIXEL_STREAM_36 0x1DU
#define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12 0x3DU
#define MIPI_DSI_PACKED_PIXEL_STREAM_16 0x0EU
#define MIPI_DSI_PACKED_PIXEL_STREAM_18 0x1EU
#define MIPI_DSI_PIXEL_STREAM_3BYTE_18 0x2EU
#define MIPI_DSI_PACKED_PIXEL_STREAM_24 0x3EU
/** @} */
#ifdef __cplusplus
}
#endif
/**
* @}
*/
#endif /* ZEPHYR_INCLUDE_DISPLAY_MIPI_DISPLAY_H_ */
```
|
```javascript
Notifications API
Blobs
ProgressEvent
Page Visibility API
MediaDevices.getUserMedia()
```
|
Henry Williams (11 February 1792 – 16 July 1867) was the leader of the Church Missionary Society (CMS) mission in New Zealand in the first half of the 19th century.
Williams entered the Royal Navy at the age of fourteen and served in the Napoleonic Wars. He went to New Zealand in 1823 as a missionary. The Bay of Islands Māori gave Williams the nickname Karu-whā ("Four-eyes" as he wore spectacles). He was known more widely as Te Wiremu. ('Wiremu' being the Māori form of 'William'). His younger brother, William Williams, was also a missionary in New Zealand and known as "the scholar-surgeon". Their grandfather, the Reverend Thomas Williams (1725–1770), was a Congregational minister at the Independent Chapel of Gosport.
Although Williams was not the first missionary in New Zealand – Thomas Kendall, John Gare Butler, John King and William Hall having come before him – he was "the first to make the mission a success, partly because the others had opened up the way, but largely because he was the only man brave enough, stubborn enough, and strong enough to keep going, no matter what the dangers, and no matter what enemies he made".
In 1840, Williams translated the Treaty of Waitangi into the Māori language, with some help from his son Edward.
On 21 September 1844, Williams was installed as Archdeacon of Te Waimate in the diocese centred on Te Waimate mission.
Parents, brothers and sisters
Williams was the son of Thomas Williams (Gosport, England, 27 May 1753 – Nottingham 6 January 1804) and Mary Marsh (10 April 1756 – 7 November 1831) who had married in Gosport on 17 April 1783. Thomas Williams was a supplier of uniforms to the Royal Navy in Gosport. In 1794, Thomas and Mary Williams and their six children moved to Nottingham, then the thriving centre of the East Midlands industrial revolution. Thomas Williams was listed in the Nottingham trade directories as a hosier. The industry was based on William Lee's stocking frame knitting machine. The business was successful. Thomas Williams received recognition as a Burgess of Nottingham in 1796 and as a Sheriff of Nottingham in 1803. However the prosperity which had been such a feature of the hosiery industry in the second half of the 18th century ended. In 1804, when Thomas Williams died of typhus at the age of 50, his wife was left with a heavily mortgaged business with five sons and three daughters to look after.
Williams's parents had nine children, of whom six (including himself) were born in Gosport and three (including William Williams) in Nottingham:
Mary (Gosport, England, 2 March 1784 – Gosport, England, 19 April 1786)
Thomas Sydney (Gosport, England, 11 February 1786 – Altona, Germany, 12 February 1869)
Lydia (Gosport, England, 17 January 1788 – 13 December 1859), married (7 July 1813) Edward Garrard Marsh (8 February 1783 – 20 September 1862)
John (Gosport, England, 22 March 1789 – New Zealand, 9 March 1855)
Henry (Gosport, England, 11 February 1792 – Pakaraka, Bay of Islands, New Zealand 16 July 1867)
Joseph William (Gosport, England, 27 October 1793 – Gosport, England, August 1799)
Mary Rebecca (Nottingham, England, 3 June 1795 – Bethlehem, Palestine 17 December 1858)
Catherine (Nottingham, England, 28 July 1797 – Southwell, Nottinghamshire, England, 11 July 1881)
William (Nottingham, England, 18 July 1800 – Napier, New Zealand, 9 February 1878)
Williams was aged 11 when his father died (his brother William Williams was three).
1806–1815: Navy years
In 1806, aged 14, Williams entered the Royal Navy, serving on . He became a midshipman in 1807. He then served on HMS Maida under Captain Samuel Hood Linzee during the Battle of Copenhagen when the Danish fleet was seized in 1807. He landed with the party of seamen who manned the breaching battery before the city. He participated in the engagement on 13 February 1810, when 8 boats under the command of Lieutenant Gardiner Henry Guion, attacked nine French gun boats in the Basque Roads.
On , under Captain Woodley Losack, he took part in the Battle of Tamatave (1811) between three English frigates, under the command of Captain Schomberg, and three French vessels of superior force. Williams was wounded and never entirely recovered. For this service he qualified for the Naval General Service Medal, which was awarded in 1847 with clasp "Off Tamatave 20 May 1811".
After the outbreak of the War of 1812 between Britain and the United States, he served on as part of the blockading squadron off New York City. He was transferred to and served under Captain Henry Hope in the action on 14 January 1815 against the American warship . When the latter was forced to surrender, Williams was a member of the small prize crew that sailed the badly damaged vessel to port, after riding out a storm and quelling a rebellion of the American prisoners. In 1848 the Admiralty authorized the issue of the Naval General Service Medal, with clasp "Endymion wh. President", to any still surviving crew from Endymion.
Before serving on HMS Saturn, Williams sat and passed his examinations for the rank of lieutenant, although he was not promoted to lieutenant until 28 February 1815, after the Treaty of Ghent was ratified by the United States. When peace came in 1815, he retired on half pay. At the age of 23 he had been "in the North Sea and the Baltic, around the French and Spanish coasts, southwards to the Cape, up to the eastern shores of Madagascar, across the Indian Ocean to Mauritius, and northward to the coast of India. After service at Madras and Calcutta, it was on into the cold American winter and that epic last naval engagement in which he took part, on the Endymion".
Williams' experiences during the Napoleonic Wars and the War of 1812 influenced his decision to become a Christian missionary and peacemaker in carrying out the work of the Church Missionary Society in what was then considered an isolated and dangerous mission in Aotearoa (New Zealand).
Marriage and children
After leaving the Royal Navy, Williams gained employment at Cheltenham, as a teacher of drawing. His artistic skills are apparent in the drawings he made in New Zealand. Williams married Marianne Coldham on 20 January 1818. They had eleven children:
Edward Marsh (2 November 1818 – 11 October 1909). Married Jane Davis, daughter of the Rev. Richard Davis, a CMS missionary.
Marianne (28 April 1820 – 25 November 1919). Married the Rev. Christopher Pearson Davies, a CMS missionary.
Samuel (17 January 1822 – 14 March 1907). Married Mary Williams, daughter of William and Jane Williams.
Henry (Harry) (10 November 1823 – 6 December 1907). Married Jane Elizabeth Williams (also a daughter of William and Jane).
Thomas Coldham (18 July 1825 – 19 May 1912). Married Annie Palmer Beetham, daughter of William Beetham.
John William (6 April 1827 – 27 April 1904). Married Sarah Busby, daughter of James Busby.
Sarah (26 February 1829 – 5 April 1866). Married Thomas Biddulph Hutton.
Catherine (Kate) (24 February 1831 – 8 January 1902). Married the Rev. Octavius Hadfield.
Caroline Elizabeth (13 November 1832 – 20 January 1916). Married Samuel Blomfield Ludbrook.
Lydia Jane (2 December 1834 – 28 November 1891) Married Hugh Carleton. Lydia died in Napier, New Zealand on 28 November 1891.
Joseph Marsden (5 March 1837 – 30 March 1892).
Missionary
Edward Garrard Marsh, the husband of their sister Lydia, would play an important role in the life of Henry and William. He was a member of the Church Missionary Society (CMS) and was described as "influential" in the decision of Henry and William to convert to Anglicanism in February 1818, and then to join the CMS. Williams received The Missionary Register from Marsh, which described the work of CMS missionaries. Williams took a special interest in New Zealand and its native Māori people. It was not until 1819 that he offered his services as a missionary to the CMS, being initially accepted as a lay settler, but was later ordained.
Williams studied surgery and medicine and learned about boat-building. He studied for holy orders for two years and was ordained a deacon of the (Anglican) Church of England on 2 June 1822 by the Bishop of London; and as a priest on 16 June 1822 by the Bishop of Lincoln.
On 11 September 1822, Williams with his wife Marianne and their three children embarked on the Lord Sidmouth, a convict ship carrying women convicts to Port Jackson, New South Wales, Australia. In February 1823, in Hobart, Williams met Samuel Marsden for the first time. In Sydney he met Marsden again and in July 1823 they set sail for New Zealand, accompanying Marsden on his fourth visit to New Zealand on board the Brampton. In 1823 he arrived in the Bay of Islands and settled at Paihia, across the bay from Kororāreka (nowadays Russell); then described as "the hell-hole of the South Pacific" because of the abuse of alcohol and prostitution that was the consequence of the sealing ships and whaling ships that visited Kororāreka.
Early days at Paihia
The members of the CMS were under the protection of Hongi Hika, the rangatira (chief) and war leader of the Ngāpuhi iwi (tribe). The immediate protector of the Paihia mission was the chief, Te Koki and his wife Ana Hamu, a woman of high rank, gave permission to the CMS to occupy the land at Paihia. Williams was appointed to be the leader of the missionary team. Williams adopted a different approach to missionary work as that applied by Marsden. Marsden's policy had been to teach useful skills rather than focus on religious instruction. This approach had little success in fulfilling the aspirations of the CMS as an evangelistic organisation. Also, in order to obtain essential food, the missionaries had yielded to the pressure to trade in muskets, the item of barter in which Māori showed the greatest interest in order to engage in intertribal warfare during what is known as the Musket Wars.
Williams concentrated on the salvation of souls. The first baptism occurred in 1825, although it was another 5 years before the second baptism. Schools were established, which addressed religious instruction, reading and writing and practical skills. Williams also stopped the trade in muskets, although this had the consequence of reducing trade for food as Māori withheld the supply of food so as to pressure the missionaries to resume the trade in muskets. Eventually the mission began to grow sufficient food for itself. Māori eventually came to see that the ban on muskets was the only way to bring an end to the tribal wars, but that took some time.
At first there were several conflicts and confrontations with the Ngāpuhi. One of the most severe was the confrontation with the chief Tohitapu on 12 January 1824, which was witnessed by other chiefs. The incident began when Tohitapu visited the mission. As the gate was shut, Tohitapu jumped over the fence. Williams demanded that Tohitapu enter the mission using the gate. Tohitapu was a chief and a tohunga, skilled in the magic known as makutu. Tohitapu was offended by William's demand and began a threatening haka flourishing his mere and taiaha. Williams faced down this challenge. Tohitapu then seized a pot, which he claimed as compensation for hurting his foot in jumping over the fence, whereupon Williams seized the pot from Tohitapu. The incidence continued through the night during which Tohitapu began a karakia or incantation of bewitchment. Williams had no fear of the karakia. The next morning Tohitapu and Williams reconciled their differences – Tohitapu remained a supporter of Williams and the mission at Paihia.
This incident and others in which Williams faced down belligerent chiefs, contributed to his growing mana among the Māori by established to the Māori that Williams had a forceful personality, "[a]lthough his capacity to comprehend the indigenous culture was severely constrained by his evangelical Christianity, his obduracy was in some ways an advantage in dealings with the Maori. From the time of his arrival he refused to be intimidated by the threats and boisterous actions of utu and muru plundering parties".
Kororāreka (Russell) was a provisioning station for whalers and sealers operating in the South Pacific. Apart from the CMS missionaries, the Europeans in the Bay of Islands were largely involved in servicing the trade at Kororāreka. On one occasion escaped convicts arrived in the Bay of Islands. On the morning of 5 January 1827 a brig had arrived, the Wellington, a convict ship from Sydney bound for Norfolk Island. The convicts had risen, making prisoners of the captain, crew, guard and passengers. Williams convinced the captains of two whalers in the harbour to fire into and retake the Wellington. Forty convicts escaped. Threats were made to shoot Williams, whom the convicts considered instrumental in their capture.
Building of the schooner Herald
Starting in 1824 the 55 ton schooner was constructed on the beach at Paihia. Williams was assisted by Gilbert Mair who became the captain of Herald with William Gilbert Puckey as the mate. They launched Herald in 1826. This ship enabled Williams better to provision the mission stations and to more easily visit the more remote areas of New Zealand. Heralds maiden voyage brought Williams to Port Jackson, Australia. Here he joined his younger brother William and his wife Jane. William, who had studied as a surgeon, had decided to become a missionary in New Zealand. They sailed to Paihia on board , the same ship that brought William and Jane from England.
Herald was wrecked in 1828 while trying to enter Hokianga Harbour.
Translation of the Bible and dictionary making
The first book published in the Māori language was A Korao no New Zealand! The New Zealanders First Book!, published by Thomas Kendall in 1815. In 1817 Tītore and Tui (also known as Tuhi or Tupaea (1797?–1824)) sailed to England. They visited Professor Samuel Lee at Cambridge University and assisted him in the preparation of a grammar and vocabulary of Māori. Kendall travelled to London in 1820 with Hongi Hika and Waikato (a lower ranking Ngāpuhi chief) during which time work was done with Professor Samuel Lee, which resulted in the First Grammar and Vocabulary of the New Zealand Language (1820). The CMS missionaries did not have a high regard for this book. Williams organised the CMS missionaries into a systematic study of the language and soon started translating the Bible into Māori. After 1826 William Williams became involved in the translation of the Bible and other Christian literature, with Henry Williams devoting more time to his efforts to establish CMS missions in the Waikato, Rotorua and Bay of Plenty.
In July 1827 William Colenso printed the first Māori Bible, comprising three chapters of Genesis, the 20th chapter of Exodus, the first chapter of the Gospel of St John, 30 verses of the fifth chapter of the Gospel of St Matthew, the Lord's Prayer and some hymns. It was the first book printed in New Zealand and his 1837 Māori New Testament was the first indigenous language translation of the Bible published in the southern hemisphere. By 1830 the CMS missionaries had revised the orthography for writing the Māori; for example, 'Kiddeekiddee' became, what is the modern spelling, 'Kerikeri'.
After 1844, Robert Maunsell worked with William Williams on the translation of the Bible. William Williams concentrated on the New Testament; Maunsell worked on the Old Testament, portions of which were published in 1827, 1833 and 1840 with the full translation completed in 1857. William Gilbert Puckey also collaborating with William Williams on the translation of the New Testament, which was published in 1837 and its revision in 1844. William Williams published the Dictionary of the New Zealand Language and a Concise Grammar in 1844.
Musket Wars
In the early years of the CMS mission there were incidents of intertribal warfare. In 1827, Hongi Hika, the paramount Ngāpuhi chief, instigated fighting with the tribes to the north of the Bay of Islands. In January 1827, Hongi Hika was accidentally shot in the chest by one of his own warriors. On 6 March 1828, Hongi Hika died at Whangaroa. Williams was active in promoting a peaceful solution in what threatened to be a bloody war. The death of Tiki, a son of Pōmare I (also called Whetoi) and the subsequent death of Te Whareumu in 1828 threw the Hokianga into a state of uncertainty as the Ngāpuhi chiefs debated whether revenge was necessary following the death of a chief. Williams, Richard Davis and Tohitapu mediated between the combatants. As the chiefs did not want to escalate the fighting, a peaceful resolution was achieved.
In 1830 there was a battle at Kororāreka, which is sometimes called the Girls' War, which led to the death of the Ngāpuhi leader Hengi. Williams and Ngāpuhi chiefs, including Tohitapu, attempted to bring an end to the conflict. When the highly respected Samuel Marsden arrived on a visit, he and Williams attempted to negotiate a settlement in which Kororāreka would be ceded by Pōmare II (nephew of Pōmare I, originally called Whiria, also called Whetoi) as compensation for Hengi's death, which was accepted by those engaged in the fighting. However the duty of seeking revenge had passed to Mango and Kakaha, the sons of Hengi, they took the view that the death of their father should be acknowledged through a muru, or war expedition against tribes to the south. It was accepted practice to conduct a muru against tribes who had no involvement in the events that caused the death of an important chief.
Tītore, the war leader of the Ngāpuhi, did not commence the muru until January 1832. Willams accompanied the first expedition, without necessarily believing that he could end the fighting, but with the intention of continuing to persuade the combatants as to the Christian message of peace and goodwill. The journal of Henry Williams provides an extensive account of this expedition, which can be described as an incident in the so-called Musket Wars. In this expedition the Ngāpuhi were successful in battles on the Mercury Islands and Tauranga, with the muru lasted until late July 1832. When Williams sailed back to Paihia from Tauranga the boat was caught in a raging sea. Williams took command out of the hands of the captain and saved the ship. By 1844 the conversion of Ngāpuhi chiefs to Christianity contributed to a significant reduction in the number of incidents of intertribal warfare in the north.
The first conversions of Māori chiefs to Christianity
Karaitiana Rangi was the first person baptised, which occurred in 1825. On 7 February 1830 Rawiri Taiwhanga, a Ngāpuhi chief, was baptised. He was the first high-ranking Māori to be converted to Christianity. This gave the missionary work of the CMS a great impetus, as it influenced many others to do the same. Hone Heke attended the CMS mission school at Kerikeri in 1824 and 1825. Heke and his wife Ono were baptised on 9 August 1835 and Heke later became a lay reader in the Anglican church. For a time Heke lived at Paihia during which time Williams became a close friend and adviser.
On 26 February 1840, Williams baptised Eruera Maihi Patuone and also Patuone's wife with the name of "Lydia". In January 1844 Williams baptised Waikato, the Ngāpuhi chief who had travelled to England with Hongi Hika in 1820. Te Ruki Kawiti was baptised by Williams in 1853.
Expansion of the activities of the CMS mission
Williams played a leading role in the expansion of the activities of the CMS. In 1833 a mission was established at Kaitaia in Northland as well as a mission at Puriri in the Thames area. In 1835 missions were established in the Bay of Plenty and Waikato regions at Tauranga, Matamata and Rotorua and in 1836 a mission was open in the Manakau area.
In April 1833, 7 Ngāti Porou men and 5 women arrived in the Bay of Islands on the whaler Elizabeth. They had been made prisoner when the Captain of the whaler left Waiapu after a confrontation with the people of that place. In the Bay of Islands they were delivered to Ngāpuhi chiefs to become slaves. Henry Williams, William Williams and Alfred Nesbit Brown persuaded the Ngāpuhi to give up the slaves. An attempt was made to return them on the schooner Active although a gale defeated that attempt. They returned to the Bay of Islands, where they received religious instruction, until the following summer. In January 1834 the schooner Fortitude carried William Williams and the Ngāti Porou to the East Cape.
In 1839 Williams travelled by ship to Port Nicholson, Wellington, then by foot to Ōtaki with the Rev. Octavius Hadfield, where Hadfield established a mission station. From December 1839 to January 1840 Williams returned over land through Whanganui, Taupo, Rotorua, and Tauranga, the first European who had undertaken that journey.
"From 1830 to 1840 Henry Williams ruled the mission with a kind but firm hand.(...) And when the first settlers of the New Zealand Company landed at Wellington in 1839, Williams did his best to repel them, because he felt they would overrun the country, taking the land and teaching the Māori godless customs".
Attempts to interfere with land purchasing by the New Zealand Company
In November 1839 Williams and Octavius Hadfield arrived in Port Nicholson, Wellington, days after the New Zealand Company purchased the land around Wellington harbour. Within months the company purported to purchase approximately 20 million acres (8 million hectares) in Nelson, Wellington, Whanganui and Taranaki. Williams attempted to interfere with the land purchasing practices of the company. Reihana, a Christian who had spent time in the Bay of Islands, had bought for himself 60 acres (24 hectares) of land in Te Aro, in what is now central Wellington. When Reihana and his wife decided to go and live in Taranaki, Williams persuaded Reihana to pass the land to him to hold in trust for Reihana. On his journey north, Williams records in a letter to his wife, "I have secured a piece of land, I trust, from the paws of the New Zealand Company, for the natives; another piece I hope I have upset." Upon arriving in Whanganui, Williams records, "After breakfast, held council with the chiefs respecting their land, as they were in considerable alarm lest the Europeans should take possession of the county. All approve of their land being purchased and held in trust for their benefit alone."
The Church Missionary Society in London rejected Williams' request for support for this practice of acquiring land on trust for the benefit of the Māori. The society were well aware that the New Zealand Company actively campaigned against those that opposed it plans. While the Church Missionary Society had connections with the Whig Government of Viscount Melbourne, in August 1841 a Tory government came to office. The Church Missionary Society did not want to be in direct conflict with the New Zealand Company as its leaders had influence within the Tory government led by Sir Robert Peel.
Treaty of Waitangi
Williams played an important role in the translation of the Treaty of Waitangi (1840). In August 1839 Captain William Hobson was given instructions by the Colonial Office to take the constitutional steps needed to establish a British colony in New Zealand. Hobson was sworn in as Lieutenant-Governor in Sydney on 14 January, finally arriving in the Bay of Islands on 29 January 1840. The Colonial Office did not provide Hobson with a draft treaty, so he was forced to write his own treaty with the help of his secretary, James Freeman, and British Resident James Busby. The entire treaty was prepared in four days. Realising that a treaty in English could be neither understood, debated or agreed to by Māori, Hobson instructed Williams, who worked with his son Edward, who was also proficient in the Māori language (Te Reo), to translate the document into Māori and this was done overnight on 4 February. At this time William Williams, who was also proficient in Te Reo, was in Poverty Bay.
Bishop Broughton wrote to Williams in January 1840 to recommend that "your influence should be exercised among the chiefs attached to you, to induce them to make the desired surrender of sovereignty to Her Majesty". On 5 February 1840 the original English version of the treaty and its translation into Māori were put before a gathering of northern chiefs inside a large marquee on the lawn in front of Busby's house at Waitangi. Hobson read the treaty aloud in English and Williams read his Māori version. In his translation he used a dialect known as "Missionary Māori", which was not traditional Māori, but had been made up by the missionaries. An example of this in the Treaty is kāwanatanga (governorship), a cognate word which Williams is believed to have transplanted from English. The word kāwanatanga was first used in the Declaration of Independence of New Zealand (1835). It reappeared in 1840 in the Treaty and hence, some argue, was an inappropriate choice. There is considerable debate about what would have been a more appropriate term. Some scholars argue that mana (prestige, authority) would have more accurately conveyed the transfer of sovereignty; although others argue that mana cannot be given away and is not the same thing as sovereignty.
Hone Heke signed the Treaty of Waitangi although there is uncertainty as to whether he signed it on 6 May 1840 or only signed at a later date after being persuaded to sign by other Māori. In any event he was later to cut down the flagstaff on Flagstaff Hill Kororāreka (nowadays Russell) to express his dissatisfaction with how the representatives of Crown subsequently treated the authority of the chiefs as being subservient to that of the Crown.
Williams was also involved in explaining the treaty to Māori leaders, firstly at the meetings with William Hobson at Waitangi, but later also when he travelled to Port Nicholson, Queen Charlotte's Sound, Kāpiti, Waikanae and Ōtaki to persuade Māori chiefs to sign the treaty. His involvement in these debates brought him "into the increasingly uncomfortable role of mediating between two races".
Controversy over land purchases
In the 1830s Williams purchased 11,000 acres (5,420 hectares) from Te Morenga of Pakaraka in the Tai-a-mai district, inland from the Bay of Islands, to provide employment and financial security for his six sons and five daughters as the Church Missionary Society had no arrangements for pensions or other maintenance of CMS missionaries and their families who lived in New Zealand. The Church Missionary Society implemented land purchase policies for its missionaries in Australia, which involved the society paying for the purchase of land for the children of missionaries, but discussions for such a policy for the New Zealand missions had not been settled.
The purchase of the land was reviewed by Land Commissioner FitzGerald under the Land Claims Ordinance 1841. FitzGerald, in the Land Office report of 14 July 1844, recommended that Governor FitzRoy confirm the award in favour of Williams of 9,000 of the 11,000 acres as Williams "appears to have paid on behalf of himself and children enough to entitle them to (22,131) twenty-two thousand one hundred and thirty-one acres". This did not end the controversy over the purchase of land by Williams as the New Zealand Company, and others with an interest in acquiring Māori land, continued to attack the character of Williams. These land purchases were used by the notorious John Dunmore Lang, of New South Wales, as a theme for a virulent attack on the CMS mission in New Zealand in the second of four "Letters To the Right Hon. Earl Durham" that were published in England. Lord Durham was a supporter of the New Zealand Company.
Hone Heke and the Flagstaff War
In 1845 George Grey arrived in New Zealand to take up his appointment as Governor. At this time Hone Heke challenged the authority of the British, beginning by cutting down the flagstaff on Flagstaff Hill at Kororāreka. On this flagstaff the flag of the United Tribes of New Zealand had previously flown, now the Union Jack was hoisted; hence the flagstaff symbolised the grievances of Heke and his allies as to changes that had followed the signing of the Treaty of Waitangi.
After the battle of Te Ahuahu Heke went to his pā at Kaikohe to recover from his wounds. He was visited by Williams and Robert Burrows, who hoped to persuade Heke to end the fighting. During the Flagstaff War Williams also wrote letters to Hone Heke in further attempts to persuade Heke and Kawiti to cease the conflict. In 1846, following the battles at Ōhaeawai pā and Ruapekapeka pā, Hone Heke and Te Ruki Kawiti sought to end the Flagstaff War; with Tāmati Wāka Nene acting as an intermediary, they agreed peace terms with Governor Grey.
Dismissed from service with the CMS
Governor Grey was 'shrewd and manipulative' and his main objective was to impose British sovereignty over New Zealand, which he did by force when he felt it necessary. But his first strategy to attain land was to attack the close relationship between missionaries and Māori, including Henry Williams who had relationships with chiefs.
In following years Governor Grey listened to the voices speaking against the CMS missionaries and Grey accused Williams and the other CMS missionaries of being responsible for the Flagstaff War; The newspaper New Zealander of 31 January 1846 inflamed the attack in an article referring to "Treasonable letters. Among the recent proclamations in the Government Gazette of the 24th instant, is one respecting some letters found in the pa at Ruapekapeka, and stating that his Excellency, although aware that they were of a treasonable nature, ordered them to be consigned to the flames, without either perusing or allowing a copy of them to be taken."
In a thinly disguised reference to Williams, with the reference to "their Rangatira pakeha [gentlemen] correspondents", the New Zealander went on to state: "We consider these English traitors far more guilty and deserving of severe punishment, than the brave natives whom they have advised and misled. Cowards and knaves in the full sense of the terms, they have pursued their traitorous schemes, afraid to risk their own persons, yet artfully sacrificing others for their own aggrandizement, while, probably at the same time, they were most hypocritically professing most zealous loyalty."
Official communications also blamed the missionaries for the Flagstaff War. In a letter of 25 June 1846 to William Ewart Gladstone, the Colonial Secretary in Sir Robert Peel's government, Governor Grey referred to the land acquired by the CMS missionaries and commented that "Her Majesty's Government may also rest satisfied that these individuals cannot be put in possession of these tracts of land without a large expenditure of British blood and money". However, Heke took no action against the CMS missionaries during the war and directed his protest at the representatives of the Crown, with Hone Heke and Te Ruki Kawiti fighting the British soldiers and the Ngāpuhi led by Tāmati Wāka Nene who remained loyal to the Crown.
In 1847 William Williams published a pamphlet that defended the role of the Church Missionary Society in the years leading up to the war in the north. The first Anglican bishop of New Zealand, George Selwyn, took the side of Grey in relation to the purchase of the land, and in 1849 the CMS decided to dismiss Williams from service when he refused to give up the land acquired for his family at Pakaraka.
Retirement at Pakaraka and reinstatement to the CMS
Williams and his wife moved to Pakaraka where his children were farming the land that was the source of his troubles. He continued to minister and preach in Holy Trinity Church in Pakaraka, which was built by his family. He lived by the church, in a house known as "The Retreat", which still stands.
Governor Grey's first term of office ended in 1853. In 1854 Williams was reinstated to CMS after Bishop Selwyn and George Grey addressed the committee of the CMS and requested his reinstatement. Sir George Grey returned to New Zealand in 1861 as Governor. Williams welcomed his return, meeting Grey at Te Waimate mission in November 1861.
Williams died on 16 July 1867 and was buried in the grounds of Holy Trinity Church in Pakaraka.
The Revd Matthew Taupaki lead the fundraising of £200 among the Ngāpuhi for a monumental stone in memory of Archdeacon Williams. He spoke at the unveiling of the monumental stone in the grounds of St. Paul's Anglican Church, Paihia, on 11 January 1876.
Gallery
Notes
Footnotes
Citations
Literature and sources
(1961) – The Early Journals of Henry Williams 1826 to 1840. Christchurch : Pegasus Press. online available at New Zealand Electronic Text Centre (NZETC) (2011-06-27)
(1874) – The life of Henry Williams, Archdeacon of Waimate, Volume I. Auckland NZ. Online available from Early New Zealand Books (ENZB)
(1877) – The life of Henry Williams, Archdeacon of Waimate, Volume II. Auckland NZ. Online available from Early New Zealand Books (ENZB)
(2004) – Gilbert Mair, Te Kooti's Nemesis. Reed Publ. Auckland NZ.
(1992) – Faith and farming Te huarahi ki te ora; The Legacy of Henry Williams and William Williams. Published by Evagean Publishing, 266 Shaw Road, Titirangi, Auckland NZ. (soft cover), (hard cover), (leather bound)
(2011) – Te Wiremu – Henry Williams: Early Years in the North, Huia Publishers, New Zealand
(2004) – Letters from the Bay of Islands, Sutton Publishing Limited, United Kingdom; (Hardcover). Penguin Books, New Zealand, (Paperback)
(1998) – East Coast Pioneers. A Williams Family Portrait; A Legacy of Land, Love and Partnership. Published by The Gisborne Herald Co. Ltd, Gladstone Road, Gisborne NZ.
(1963) – Nine New Zealanders. Christchurch : Whitcombe and Tombs. The chapter 'Angry peacemaker: Henry Williams – A missionary's courage wins Maori converts' (p. 32 – 36)
(2007) – Williams, Henry 1792 – 1867 in Dictionary of New Zealand Biography (DNZB), updated 22 June 2007
(1973) – Te Wiremu: A Biography of Henry Williams, Christchurch : Pegasus Press
(1867) – Christianity among the New Zealanders. London. Online available from Archive.org.
External links
Henry Williams copy of the Treaty of Waitangi on New Zealand History online.
from the Dictionary of New Zealand Biography
The Early Journals of Henry Williams; Senior Missionary in New Zealand of the Church Missionary Society (1826–40). Edited by Lawrence M. Rogers. Pegasus Press, Christchurch 1961, at NZETC
some sketches made by Henry Williams at NZETC
The Character of Henry Williams described by Hugh Carleton (1874) – The Life of Henry Williams
1792 births
1867 deaths
Royal Navy officers
Royal Navy personnel of the Napoleonic Wars
19th-century English Anglican priests
Church Mission Society missionaries
English Anglican missionaries
Anglican missionaries in New Zealand
Anglican archdeacons in New Zealand
People from the Bay of Islands
Musket Wars
Treaty of Waitangi
Flagstaff War
Translators of the Bible into Māori
|
PICMG 2.9 is a specification by PICMG that defines an implementation of a system management bus in a CompactPCI system. This system management bus uses an I2C hardware layer, and is based on the Intelligent Platform Management Interface (IPMI) and Intelligent Platform Management Bus (IPMB) specifications.
Status
Adopted : 2/2/2000
Current Revision : 1.0
ECN001 (Engineering Change Number) was adopted 5/20/2002
References
Open standards
PICMG standards
|
Nazim-e-Multan (Urdu: ) is the mayor who heads the Municipal Corporation Multan (MCM) which controls the Local Government system of Multan, Pakistan.
Multan local government system
There are 68 Union Councils in Municipal Corporation Multan (MCM), the body which controls local government of Multan.The Union Councils elect their Chairmen and Vice Chairmen who then elect their Mayor and Deputy Mayor respectively.
List of mayors
Following is the list of mayors of Multan in recent time
Local government elections 2015
Local government election held in Multan on December 5, 2015
The mayor and deputy mayors of Multan have been delayed.
See also
Mayor of Faisalabad
Mayor of Lahore
Mayor of Rawalpindi
References
Multan
|
Simone Marie Yvette Hudon-Beaulac (9 September 1905 – 5 August 1984) was a Canadian painter and printmaker.
Early life
Born Simone Marie Yvette Hudon in Quebec City, she studied at the École des Beaux-Arts in her native city, graduating in 1931 after study with Lucien Martial and H. Ivan Neilson.
Career
She succeeded Neilson in 1931, and taught engraving, perspective, interior design and illustration until 1945. She moved to Montreal in 1945 and worked there as a book illustrator. She won numerous awards during her career, and was exhibited widely, notably with Sylvia Daoust. She was a member of the Society of Canadian Painter-Etchers and Engravers. A member of the Canadian Society of Graphic Art, she illustrated the book Au fil des côtes de Québec published by the Government of Quebec in 1967 for the Canadian centennial in 1967. Hudon was selected to represent Quebec of the exhibition Contemporary Art of the Western Hemisphere, which travelled to the Cleveland Museum of Art in Cleveland, Ohio 8 December 1942 – 10 January 1943.
One of her students was Louise Carrier who also became widely known for her artistry.
Collections
Her work is included in the collection of the Musée national des beaux-arts du Québec.
References
1905 births
1984 deaths
20th-century Canadian printmakers
Women printmakers
20th-century Canadian artists
20th-century printmakers
Artists from Quebec City
20th-century Canadian women artists
Canadian women painters
|
Papaveretum (BAN) is a preparation containing a mixture of hydrochloride salts of opium alkaloids. Since 1993, papaveretum has been defined in the British Pharmacopoeia (BP) as a mixture of 253 parts morphine hydrochloride, 23 parts papaverine hydrochloride, and 20 parts codeine hydrochloride. It is commonly marketed to medical agencies under the trade name Omnopon.
Although the use of papaveretum is now relatively uncommon following the wide availability of single-component opiates and synthetic opioids (e.g. pethidine), it is still used to relieve moderate to severe pain and for pre-operative sedation. In clinical settings, papaveretum is usually administered to patients via subcutaneous, intramuscular, or intravenous routes. Additionally, the morphine syrettes found in combat medical kits issued to military personnel actually contain Omnopon.
Prior to 1993, papaveretum also contained noscapine, though this component was removed from the BP formulation due to the genotoxic potential of noscapine.
References
Opiates
|
```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/cumprod_kernel.h"
#include "paddle/phi/backends/xpu/enforce_xpu.h"
#include "paddle/phi/core/kernel_registry.h"
#include "paddle/phi/kernels/funcs/complex_functors.h"
#include "paddle/phi/kernels/funcs/cumprod.h"
namespace phi {
template <typename T, typename Context>
void CumprodKernel(const Context& dev_ctx,
const DenseTensor& input,
int dim,
bool exclusive,
bool reverse,
DenseTensor* out) {
using XPUType = typename XPUTypeTrait<T>::Type;
const DenseTensor* x = &input;
auto* x_data = x->data<T>();
auto* out_data = dev_ctx.template Alloc<T>(out);
DDim shape = x->dims();
std::vector<int64_t> xshape = common::vectorize<int64_t>(shape);
if (dim < 0) dim += xshape.size();
if (shape.size() == 0) {
int r =
xpu::copy<XPUType>(dev_ctx.x_context(),
reinterpret_cast<const XPUType*>(input.data<T>()),
reinterpret_cast<XPUType*>(out->data<T>()),
input.numel());
PADDLE_ENFORCE_XDNN_SUCCESS(r, "copy");
return;
}
int r = xpu::cumprod(dev_ctx.x_context(),
reinterpret_cast<const XPUType*>(x_data),
reinterpret_cast<XPUType*>(out_data),
xshape,
dim);
PADDLE_ENFORCE_XDNN_SUCCESS(r, "cumprod");
}
} // namespace phi
PD_REGISTER_KERNEL(
cumprod, XPU, ALL_LAYOUT, phi::CumprodKernel, float, int, int64_t) {}
```
|
```go
package client
var _ Client = (*MockClient)(nil)
```
|
```php
<?php
declare(strict_types=1);
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
class InterceptTest extends AllSetupTeardown
{
/**
* @dataProvider providerINTERCEPT
*/
public function testINTERCEPT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('INTERCEPT', $expectedResult, ...$args);
}
public static function providerINTERCEPT(): array
{
return require 'tests/data/Calculation/Statistical/INTERCEPT.php';
}
}
```
|
```yaml
apiVersion: v1
kind: Namespace
metadata:
name: example-hotrod
```
|
```javascript
OC.L10N.register(
"theming",
{
"The given name is too long" : " ",
"The given web address is too long" : " ",
"The given web address is not a valid URL" : " ",
"The given legal notice address is too long" : " ",
"The given legal notice address is not a valid URL" : " ",
"The given privacy policy address is too long" : " ",
"The given privacy policy address is not a valid URL" : " ",
"The given slogan is too long" : " ",
"The given color is invalid" : " ",
"Disable-user-theming should be true or false" : "-- true false",
"Saved" : "",
"Invalid app given" : " ",
"Invalid type for setting \"defaultApp\" given" : " defaultApp",
"Invalid setting key" : " ",
"The file was uploaded" : " ",
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : " upload_max_filesize php.ini",
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : " MAX_FILE_SIZE ",
"The file was only partially uploaded" : " ",
"No file was uploaded" : " ",
"Missing a temporary folder" : " ",
"Could not write file to disk" : " ",
"A PHP extension stopped the file upload" : " ",
"No file uploaded" : " ",
"You are already using a custom theme. Theming app settings might be overwritten by that." : " . .",
"Theming" : "",
"Appearance and accessibility" : " ",
"PHP Imagick module" : "PHP Imagick ",
"The PHP module \"imagick\" is not enabled although the theming app is. For favicon generation to work correctly, you need to install and enable this module." : "PHP imagick . favicon , .",
"The PHP module \"imagick\" in this instance has no SVG support. For better compatibility it is recommended to install it." : "PHP imagick SVG. , .",
"Dark theme with high contrast mode" : " ",
"Enable dark high contrast mode" : " ",
"Similar to the high contrast mode, but with dark colours." : " , .",
"Dark theme" : " ",
"Enable dark theme" : " ",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness." : " .",
"System default theme" : " ",
"Enable the system default" : " ",
"Using the default system appearance." : " .",
"Dyslexia font" : " ",
"Enable dyslexia font" : " ",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic .",
"High contrast mode" : " ",
"Enable high contrast mode" : " ",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : " . .",
"Light theme" : " ",
"Enable the default light theme" : " ",
"The default light appearance." : " .",
"Legal notice" : " ",
"Privacy policy" : " ",
"Adjust the Nextcloud theme" : " ",
"Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : " . .",
"Instead of a background image you can also configure a plain background color. If you use a background image changing this color will influence the color of the app menu icons." : " , . , .",
"Background color" : " ",
"Upload new logo" : " ",
"Logo" : "",
"Upload new background and login image" : " ",
"Background and login image" : " ",
"Advanced options" : " ",
"Install the ImageMagick PHP extension with support for SVG images to automatically generate favicons based on the uploaded logo and color." : " ImageMagick PHP SVG favicons .",
"Name" : "",
"Web link" : " ",
"a safe home for all your data" : " ",
"Slogan" : "",
"Primary color" : " ",
"The primary color is used for highlighting elements like important buttons. It might get slightly adjusted depending on the current color schema." : " . .",
"Legal notice link" : " ",
"Privacy policy link" : " ",
"Header logo" : " ",
"Upload new header logo" : " ",
"Favicon" : " ",
"Upload new favicon" : " ",
"User settings" : " ",
"Disable user theming" : " ",
"Although you can select and customize your instance, users can change their background and colors. If you want to enforce your customization, you can toggle this on." : " , . , .",
"Appearance and accessibility settings" : " ",
"Misc accessibility options" : " ",
"Enable blur background filter (may increase GPU load)" : " ( GPU)",
"Customization has been disabled by your administrator" : " ",
"Set a primary color to highlight important elements. The color used for elements such as primary buttons might differ a bit as it gets adjusted to fulfill accessibility requirements." : " . .",
"Background and color" : " ",
"The background can be set to an image from the default set, a custom uploaded image, or a plain color." : " , .",
"Keyboard shortcuts" : " ",
"In some cases keyboard shortcuts can interfere with accessibility tools. In order to allow focusing on your tool correctly you can disable all keyboard shortcuts here. This will also disable all available shortcuts in apps." : " . , . .",
"Disable all keyboard shortcuts" : " ",
"Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : " . . {guidelines} {linkend} 2.1 .",
"If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : " , {issuetracker} {linkend}. , {designteam} {linkend}!",
"Current selected app: {app}, position {position} of {total}" : " : {app}, {position} {total}",
"Move up" : " ",
"Move down" : " ",
"Custom background" : " ",
"Plain background" : " ",
"Default background" : " ",
"Select a background from your files" : " ",
"Select background" : " ",
"No background has been selected" : " ",
"Theme selection is enforced" : " ",
"Navigation bar settings" : " ",
"You can configure the app order used for the navigation bar. The first entry will be the default app, opened after login or when clicking on the logo." : " . .",
"The default app can not be changed because it was configured by the administrator." : " .",
"The app order was changed, to see it in action you have to reload the page." : " , , .",
"Reset default app order" : " .",
"Could not set the app order" : " ",
"Could not reset the app order" : " ",
"Reset primary color" : " ",
"Could not set primary color" : " ",
"Default app" : " ",
"The default app is the app that is e.g. opened after login or when the logo in the menu is clicked." : " . .",
"Use custom default app" : " ",
"Global default app" : " ",
"Global default apps" : " ",
"Default app priority" : " ",
"If an app is not enabled for a user, the next app with lower priority is used." : " , .",
"Could not set global default apps" : " ",
"Select a custom color" : " ",
"Reset to default" : " ",
"Upload" : "",
"Remove background image" : " ",
"Color" : "",
"Background" : "",
"Set a custom background" : " ",
"Change color" : " ",
"No background" : " "
},
"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
```
|
```objective-c
#pragma once
#include "atomic_utils.h"
#include "attributevector.h"
#include "multi_value_mapping.h"
#include <vespa/searchcommon/attribute/i_multi_value_attribute.h>
#include <vespa/searchcommon/attribute/multi_value_traits.h>
namespace search {
/*
* Implementation of multi value attribute using an underlying multi value mapping
*
* B: Base class
* M: MultiValueType
*/
template <typename B, typename M>
class MultiValueAttribute : public B,
public attribute::IMultiValueAttribute
{
protected:
using DocId = typename B::DocId;
using Change = typename B::Change;
using ChangeVector = typename B::ChangeVector;
using MultiValueType = M;
using MultiValueMapping = attribute::MultiValueMapping<MultiValueType>;
using ValueType = multivalue::ValueType_t<MultiValueType>;
using ValueVector = std::vector<MultiValueType>;
using MultiValueArrayRef = std::span<const MultiValueType>;
using DocumentValues = std::vector<std::pair<DocId, ValueVector> >;
using NonAtomicValueType = attribute::atomic_utils::NonAtomicValue_t<ValueType>;
MultiValueMapping _mvMapping;
MultiValueMapping & getMultiValueMapping() { return _mvMapping; }
const MultiValueMapping & getMultiValueMapping() const { return _mvMapping; }
/*
* Iterate through the change vector and calculate new values for documents with changes
*/
void applyAttributeChanges(DocumentValues & docValues);
virtual bool extractChangeData(const Change & c, NonAtomicValueType & data) = 0;
/**
* Called when a new document has been added.
* Can be overridden by subclasses that need to resize structures as a result of this.
* Should return true if underlying structures were resized.
**/
bool onAddDoc(DocId doc) override { (void) doc; return false; }
void populate_address_space_usage(AddressSpaceUsage& usage) const override;
public:
MultiValueAttribute(const std::string & baseFileName, const AttributeVector::Config & cfg);
~MultiValueAttribute() override;
bool addDoc(DocId & doc) override;
uint32_t getValueCount(DocId doc) const override;
const attribute::MultiValueMappingBase *getMultiValueBase() const override {
return &getMultiValueMapping();
}
private:
int32_t getWeight(DocId doc, uint32_t idx) const override;
uint64_t getTotalValueCount() const override;
void apply_attribute_changes_to_array(DocumentValues& docValues);
void apply_attribute_changes_to_wset(DocumentValues& docValues);
public:
void clearDocs(DocId lidLow, DocId lidLimit, bool in_shrink_lid_space) override;
void onShrinkLidSpace() override ;
void onAddDocs(DocId lidLimit) override;
const IMultiValueAttribute* as_multi_value_attribute() const override;
// Implements attribute::IMultiValueAttribute
const attribute::IArrayReadView<ValueType>* make_read_view(attribute::IMultiValueAttribute::ArrayTag<ValueType>, vespalib::Stash& stash) const override;
const attribute::IWeightedSetReadView<ValueType>* make_read_view(attribute::IMultiValueAttribute::WeightedSetTag<ValueType>, vespalib::Stash& stash) const override;
};
} // namespace search
```
|
```java
package com.oasisfeng.island.setup;
import android.app.Activity;
import android.os.Bundle;
import com.android.setupwizardlib.util.SystemBarHelper;
import com.oasisfeng.island.mobile.R;
/**
* Island setup wizard
*
* Created by Oasis on 2016/9/13.
*/
public class SetupActivity extends Activity {
@Override protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
SystemBarHelper.hideSystemBars(getWindow());
setContentView(R.layout.activity_main);
if (savedInstanceState == null)
getFragmentManager().beginTransaction().replace(R.id.container, new SetupWizardFragment()).commit();
}
}
```
|
```javascript
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var handler = {};
var target = {a:1};
var proxy = new Proxy(target, handler);
assertTrue(target.hasOwnProperty('a'));
assertTrue(proxy.hasOwnProperty('a'));
assertFalse(target.hasOwnProperty('b'));
assertFalse(proxy.hasOwnProperty('b'));
handler.has = function() { assertUnreachable() }
handler.getOwnPropertyDescriptor = function () {}
assertTrue(target.hasOwnProperty('a'));
assertFalse(proxy.hasOwnProperty('a'));
assertFalse(target.hasOwnProperty('b'));
assertFalse(proxy.hasOwnProperty('b'));
handler.getOwnPropertyDescriptor = function() { return {configurable: true} }
assertTrue(target.hasOwnProperty('a'));
assertTrue(proxy.hasOwnProperty('a'));
assertFalse(target.hasOwnProperty('b'));
assertTrue(proxy.hasOwnProperty('b'));
handler.getOwnPropertyDescriptor = function() { throw Error(); }
assertTrue(target.hasOwnProperty('a'));
assertThrows(function(){ proxy.hasOwnProperty('a') }, Error);
assertFalse(target.hasOwnProperty('b'));
assertThrows(function(){ proxy.hasOwnProperty('b') }, Error);
```
|
```php
<?php
/*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
*/
namespace Google\Service\OSConfig;
class OSPolicyResourcePackageResourceAPT extends \Google\Model
{
/**
* @var string
*/
public $name;
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OSPolicyResourcePackageResourceAPT::class, 'Google_Service_OSConfig_OSPolicyResourcePackageResourceAPT');
```
|
The Patrimony of Saint Peter () originally designated the landed possessions and revenues of various kinds that belonged to the apostolic Holy See (the Pope) i.e. the "Church of Saint Peter" in Rome, by virtue of the apostolic see status as founded by Saint Peter, according to Catholic tradition. Until the middle of the 8th century this consisted wholly of private property, later, its meaning corresponded to the territories under Papal sovereignty, more particularly to the Duchy of Rome, but from the early 13th century the term was applied to one of the four provinces of the States of the Church.
Patrimonial possessions of the Church of Rome
The Roman Emperor Constantine the Great in AD 321 declared the Christian Church qualified to hold and transmit property. This was the first legal basis for the possessions of the Church of Rome. Subsequently, they were augmented by donations. Constantine himself probably gave the Church the Lateran Palace in Rome. Constantine's gifts formed the historical nucleus for the network of myth that gave rise to the forged document known as the "Donation of Constantine".
Wealthy families of the Roman nobility followed Constantine's example. Their memory frequently survived, after the families themselves became extinct, in the names of the properties they once presented to the Roman See. During his reign, Pope Sylvester became the owner of properties in Italy, Sicily, Antiochia, Asia Minor, in the area of Hippo in North Africa, Armenia, and Mesopotamia. The donation of large estates ceased about 600 AD. The Byzantine emperors preferred the patriarchate of Constantinople, and were less liberal in their gifts. The wars with the Lombards likewise had an unfavourable effect, and few families were still in a position to bequeath large estates.
Apart from a number of scattered possessions in Dalmatia, and southern Gaul, the patrimonies were naturally for the most part situated in Italy and on the adjacent islands. Lands in Dalmatia and Illyricum were lost during the Avar and Slavic invasions. The most valuable and extensive possessions were those in Sicily, about Syracuse and Palermo. The revenues from these properties in Sicily and Lower Italy were estimated at three and one-half talents of gold in the eighth century, when Byzantine Emperor Leo the Isaurian confiscated them.
But the patrimonies in the vicinity of Rome (the successors to the classical latifundia in the Ager Romanus), which had begun to form in the 7th century, were the most numerous. Most of the remote patrimonies were lost in the eighth century, so the patrimonia around Rome began to be managed with especial care, headed up by deacons directly subordinate to the pope. Other Italian patrimonies included the Neapolitan with the Island of Capri, that of Gaeta, the Tuscan, the Patrimonium Tiburtinum in the vicinity of Tivoli, estates about Otranto, Osimo, Ancona, Umana, estates near Ravenna and Genoa and lastly properties in Istria, Sardinia and Corsica.
Revenues from the patrimonies were used for administration, to maintain and build churches, to equip convents, run the papal household and support the clergy, but also to a great extent to relieve public and private want. In administering the Patrimony of St. Peter, Pope Gregory (540-604) showed a considerable grasp of detail and administrative capacity. In anticipation of a threatened corn shortage, Gregory filled the granaries of Rome with the harvests of Egypt and Sicily. Numerous poorhouses, hospitals, orphanages and hospices for pilgrims were maintained out of the revenues of the patrimonies. Gregory also spent large sums ransoming captives from the Lombards, and commended one of the bishops for breaking up and selling church plate for that purpose.
Political role of the Papacy
The political aspect of the papacy became in time very prominent, as Rome, after the removal of the imperial residence to the East, was no longer the seat of any of the higher political officials. Since the partition of the empire, the Western emperors had preferred to make the better-protected Ravenna their residence. Here was the centre of Odoacer's power and of the Ostrogothic rule; here also, after the fall of the Ostrogoths, the 'viceroy' of the Byzantine emperor in Italy, the exarch, resided.
In Rome, the pope appeared with increasing frequency in political negotiations; Pope Leo I negotiated with Attila the Hun king and Geiserich the Vandal king, and Pope Gelasius I with Theodoric the Ostrogothic king. Cassiodorus, as praefectus praetorio under the Ostrogothic supremacy, entrusted the care of temporal affairs to Pope John II.
When Emperor Justinian issued the Pragmatic Sanction of 554, the pope and the Senate were entrusted with the control of weights and measures. Thenceforth for two centuries the popes were most loyal supporters of the Byzantine government against the encroachments of the Lombards, and were all the more indispensable, because after 603 the Senate disappeared. The popes were now the only court of judicature, a task more often entrusted to bishops as "Defensor populi".
When Emperor Justinian II in 692 attempted to have Pope Sergius I forcibly conveyed to Constantinople, (as had been Pope Martin I), to extract from him his assent to the canons of the Trullan Council, convoked by the emperor, the militia of Ravenna and of the Duchy of the Pentapolis lying immediately to the south assembled, marched into Rome, and compelled the departure of the emperor's plenipotentiary. In AD 715 the papal chair, which had last been occupied by seven eastern popes, was filled by a westerner, Pope Gregory II, who was destined to oppose Leo III the Isaurian in the Iconoclastic conflict.
Collapse of Byzantine power in central Italy
The strange shape which the States of the Church assumed from the beginning is explained by the fact that these were the districts in which the population of central Italy had defended itself to the very last against the Lombards.
In 751 Aistulf conquered Ravenna, and thereby decided the long delayed fate of the exarchate and the Pentapolis. And when Aistulf, who held Spoleto also under his immediate sway, directed all his might against the Duchy of Rome, it seemed that this too could no longer be held. Byzantium could send no troops, and Emperor Constantine V, in answer to the repeated requests for help of the new pope, Stephen II, could only offer him the advice to act in accordance with the ancient policy of Byzantium, to pit some other Germanic tribe against the Lombards. The Franks alone were powerful enough to compel the Lombards to maintain peace, and they alone stood in close relationship with the pope. Charles Martel had on a former occasion failed to respond to the entreaties of Gregory III, but meanwhile the relations between the Frankish rulers and the popes had become more intimate. Pope Zachary had only recently (751), at Pepin's accession to the Merovingian throne, spoken the word that removed all doubts in favour of the Carolingian mayor of the palace. It was not unreasonable, therefore, to expect an active show of gratitude in return, when Rome was most grievously pressed by Aistulf.
Accordingly, Stephen II secretly sent a letter to king Pepin by pilgrims, soliciting his aid against Aistulf and asking for a conference. Pepin in turn sent Abbot Droctegang of Jumièges to confer with the pope, and a little later dispatched Duke Autchar and Bishop Chrodegang of Metz to conduct the pope to the Frankish realm.
Never before had a pope crossed the Alps. While Pope Stephen was preparing for the journey, a messenger arrived from Constantinople, bringing to the pope the imperial mandate to treat once more with Aistulf for the purpose of persuading him to surrender his conquests. Stephen took with him the imperial messenger and several dignitaries of the Roman Church, as well, as members of the aristocracy belonging to the Roman militia, and proceeded first of all to Aistulf. In 753 the pope left Rome. Aistulf, when the pope met him at Pavia, refused to enter into negotiations or to hear of a restoration of his conquests. Only with difficulty did Stephen finally prevail upon the Lombard king not to hinder him in his journey to the Frankish kingdom.
Intervention of the Franks and Formation of the States of the Church
The pope thereupon crossed the Great St. Bernard Pass into the Frankish kingdom. Pepin received his guest at Ponthion, and promised to do all in his power to recover the Exarchate of Ravenna and the other districts seized by Aistulf. The pope then went to St-Denis, near Paris. He concluded a firm alliance of friendship with Pepin and made him the first Carolingian king, probably in January 754. He bound the Franks under the threat of excommunication, never thereafter to choose their kings from any other family than the Carolingian. At the same time he bestowed on Pepin and his sons the title of "Patrician of the Romans", the title the Exarchs, the highest Byzantine officials in Italy, had borne. In their stead now the King of the Franks was to be the protector of the Romans and their Bishop. However, to fulfill the wishes of the pope, Pepin had eventually to obtain the consent of his nobles to a campaign into Italy. This became imperative, when several embassies attempted by peaceful means to induce the Lombard king to give up his conquests but returned without accomplishing their mission.
At Quiercy on the Oise, the Frankish nobles finally gave their consent. Pepin promised in writing to give the Church certain territories, the first documentary record for the States of the Church. This document has not been preserved, but a number of citations during the decades immediately following indicate its contents, and it is likely that it was the source of the much interpolated Fragmentum Fantuzzianum, which probably dates from 778 to 80. In the original document of Quiercy Pepin promised to restore to the pope the lands of central Italy conquered by Aistulf, especially in the exarchate and the Roman Duchy, and of a number of patrimonies in the Lombard Kingdom and the Duchies of Spoleto and Benevento. These lands had yet to be conquered by Pepin, so his promise was on condition that he did.
In the summer of 754 Pepin and the pope began their march into Italy, and forced King Aistulf, who had shut himself up in his capital, to sue for peace. The Lombard promised to give up the cities of the exarchate and of the Pentapolis, which had been last conquered, to make no further attacks upon or to evacuate the Duchy of Rome and the northwest Italian districts of Venetia and Istria, and also acknowledged the sovereignty of the Franks. For the cities in the exarchate and in the Pentapolis, which Aistulf promised to return, Pepin executed a separate deed for the pope. This is the first "Donation of 754".
But Pepin had hardly recrossed the Alps on his way home, when Aistulf again advanced against Rome, and lay siege. The pope summoned Pepin to fulfill anew his pledge of loyalty. In 756 Pepin set out with an army against Aistulf and again hemmed him in at Pavia. Aistulf was again compelled to promise to the pope the cities granted him after the first war and, in addition, Commachio at the mouth of the Po. But this time a promise was not sufficient. Pepin's messengers visited the various cities of the exarchate and of the Pentapolis, demanded and received the keys to them, and brought the highest magistrates and most distinguished magnates of these cities to Rome. Pepin executed a new deed of gift for the cities thus surrendered to the pope, and laid it with the keys of the cities on the grave of St. Peter in the Second Donation of 756.
The Byzantine Government naturally did not approve of this result of Frankish intervention. It had hoped to regain possession of the districts that had been wrested from it by the Lombards. But Pepin took up arms, not for the Byzantine emperor, but for the sake of the pope. Kings at that time founded monasteries and endowed them with landed properties, so that prayers might be offered for them there; Pepin wished to provide the pope with temporal territories, so he might be certain of the prayers of the pope. Therefore, when the Byzantine ambassadors came to him before the second expedition of 756 and asked him to return to the emperor the cities taken from the Lombards, he said that to Rome alone would he restore the cities. Thus did Pepin found the States of the Church.
The States of the Church were in a certain sense the only remnant of the Roman Empire in the West which escaped foreign conquerors. Gratefully the Roman population acknowledged that they had escaped subjection to the Lombards. Also, temporal sovereignty guaranteed to the pope some level of independence. Under Pepin's son, Charlemagne, relations with the Lombards became strained again. Adrian I complained that the Lombard king Desiderius had invaded the territories of the States of the Church, and reminded Charlemagne of the promise made at Quiercy. As Desiderius also championed the claims of Charlemagne's nephews, he endangered the unity of the Frankish kingdom, and Charlemagne's own interests therefore bade him to oppose Desiderius. In the autumn of 773 Charlemagne entered Italy and besieged Desiderius at Pavia. While the siege was in progress, Charlemagne went to Rome at Easter, 774, and at the request of the pope renewed the promises made at Quiercy.
Soon after this Desiderius was forced to capitulate, and Charlemagne had himself proclaimed King of the Lombards in his place. Charlemagne's attitude toward the States of the Church now underwent a change. With the title of King of the Lombards he also assumed the title as "Patricius Romanorum", which his father had never used, and read into this title rights which under Pepin had never been associated with it. Moreover, differences of opinion arose between Adrian and Charlemagne concerning the obligations which had been assumed by Pepin and Charlemagne in the document of Quiercy. Adrian construed it to mean that Charlemagne should take an elastic concept of the "res publica Romana" to the extent of giving up not only the conquests of Aistulf in the exarchate and in the Pentapolis, but also earlier conquests of the Lombards in Central Italy, Spoleto and Benevento.
But Charles would not listen to any such interpretation of the document. As both parties were anxious to come to an understanding, an agreement was reached in 781. Charlemagne acknowledged the sovereignty of Adrian in the Duchy of Rome and in the States of the Church founded by Pepin's donations of 754–756. He now executed a new document in which were enumerated all the districts in which the pope was recognized as ruler. The Duchy of Rome (which had not been mentioned in the earlier documents) heads the list, followed by the exarchate and the Pentapolis, augmented by the cities which Desiderius had agreed to surrender at the beginning of his reign (Imola, Bologna, Faenza, Ferrara, Ancona, Osimo and Umana); next the patrimonies were specified in various groups: in the Sabine, in the Spoletan and Beneventan districts, in Calabria, in Tuscany and in Corsica. Charlemagne, however, in his quality of "Patricius", wanted to be considered as the highest court of appeal in criminal cases in the States of the Church. He promised on the other hand to protect freedom of choice in the election of the pope, and renewed the alliance of friendship that had been previously made between Pepin and Stephen II.
The agreement between Charlemagne and Adrian remained undisturbed. In 787 Charlemagne further enlarged the States of the Church by new donations: Capua and a few other frontier cities of the Duchy of Benevento, besides several cities in Lombardy, Tuscany, Populonia, Roselle, Sovana, Toscanella, Viterbo, Bagnorea, Orvieto, Ferento, Orchia, Marta and lastly Città di Castello appear to have been added at that time. This is based upon deductions, since no document survives either from the time of Charlemagne or from that of Pepin. Adrian proved himself no mean politician, and is ranked with Stephen II as the second founder of the States of the Church. His agreement with Charlemagne remained authoritative for the relations of the later popes with the Carolingians and the German emperors. These relations were given a brilliant outward expression by Charlemagne's coronation as emperor in 800.
In the later 9th century, such as during the papacy of Pope John VIII, the papal patrimony was severely threatened.
Pontifical province
From the early 13th century, the Patrimony of Saint Peter was one of the four provinces established by Pope Innocent III as a division of the Ecclesiastical States. It included the part of ancient Tuscia subject to the Apostolic See, i.e. the current province of Viterbo and the district of Civitavecchia.
It was governed by a papal appointed official, the Rector. Subsequently, the presence of a Rector General, coordinator of the activities of the provincial rectors and direct referent of the pontiff is also documented.
The province of Patrimonio was confirmed in the Constitutiones Aegidianae of 1357, issued by Cardinal Egidio Albornoz.
The seat cities of the rectors were Montefiascone and Viterbo.
List of papal patrimonia
Each patrimonium was not necessarily a single unit, but could consist of other lands not joined to the central nucleus ().
Patrimonium Tusciae (bounded by the Via Aurelia and the Via Flaminia, in the northern quadrant of the Agro Romano);
Patrimonium Tuscie Suburbanum (around Basilica di San Pietro in Vaticano);
Patrimonium Sabinense or Carseolanum (on the Via Salaria, ending at Farfa Abbey);
Patrimonium Tiburtinum (bounded by the Via Nomentana and the Via Tiburtina);
Patrimonium Labicanum (on the Via Labicana, ending at the valley of Aniene);
Patrimonium Appiae (on the Via Appia, ending at Albano);
Patrimonium Appiae Suburbanum (around the Basilica di San Giovanni in Laterano);
Patrimonium Caietanum (around Gaeta);
Patrimonium Traiectum (on the River Garigliano).
Notes
Sources
AA.VV., Atlante storico-politico del Lazio, Regione Lazio, Editori Laterza, Bari 1996
Economic history of the Holy See
Catholicism in the Middle Ages
History of Lazio
Papal States
Medieval economics
|
```java
Java Virtual Machine
Uses of the `final` keyword
Updating interfaces by using `default` methods
Use `DecimalFormat` class to format numbers
Avoid using `static` variables
```
|
Peltier is a French surname. Notable people with the surname include:
Autumn Peltier (born 2004), climate activist
Edo Peltier, birth name of Mexican drag queen Margaret Y Ya
Fanny Peltier (born 1997), French sprinter
Harvey Peltier, Jr. (1923–1980), American politician
Harvey Peltier, Sr. (1899–1977), American politician
Jean Charles Athanase Peltier (1785–1845), French physicist, documented the Peltier effect
Lee Peltier (born 1986), English football player
Leonard Peltier (born 1944), Native American activist who was convicted of the murder of two FBI Agents
Leslie Peltier (1900–1980), American astronomer
Thérèse Peltier (1873–1926), French sculptor and aviator
William Richard Peltier (born 1943), University of Toronto professor and physicist
See also
Peletier (disambiguation)
Pelletier, a surname
Peltier effect, in physics
Peltier device, in thermoelectric cooling
French-language surnames
|
```go
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build mips,linux
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
import "syscall"
const (
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
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
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_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
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
BLKBSZGET = 0x40041270
BLKBSZSET = 0x80041271
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40041272
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
BLKRRPART = 0x2000125f
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
BOTHER = 0x1000
BPF_A = 0x10
BPF_ABS = 0x20
BPF_ADD = 0x0
BPF_ALU = 0x4
BPF_AND = 0x50
BPF_B = 0x10
BPF_DIV = 0x30
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
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
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
CR0 = 0x0
CR1 = 0x200
CR2 = 0x400
CR3 = 0x600
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
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
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x80
EFD_SEMAPHORE = 0x1
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_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_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_MOBITEX = 0x15
ETH_P_MPLS_MC = 0x8848
ETH_P_MPLS_UC = 0x8847
ETH_P_MVRP = 0x88f5
ETH_P_NCSI = 0x88f8
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_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
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
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 = 0x2000
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_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
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
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x406
F_EXLCK = 0x4
F_GETFD = 0x1
F_GETFL = 0x3
F_GETLEASE = 0x401
F_GETLK = 0x21
F_GETLK64 = 0x21
F_GETOWN = 0x17
F_GETOWN_EX = 0x10
F_GETPIPE_SZ = 0x408
F_GETSIG = 0xb
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_SETFD = 0x2
F_SETFL = 0x4
F_SETLEASE = 0x400
F_SETLK = 0x22
F_SETLK64 = 0x22
F_SETLKW = 0x23
F_SETLKW64 = 0x23
F_SETOWN = 0x18
F_SETOWN_EX = 0xf
F_SETPIPE_SZ = 0x407
F_SETSIG = 0xa
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
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
ICMPV6_FILTER = 0x1
ICRNL = 0x100
IEXTEN = 0x100
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 = 0x8
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_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 = 0x80
IN_ONESHOT = 0x80000000
IN_ONLYDIR = 0x1000000
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
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_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
ISTRIP = 0x20
IUCLC = 0x200
IUTF8 = 0x4000
IXANY = 0x800
IXOFF = 0x1000
IXON = 0x400
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_MERGEABLE = 0xc
MADV_NOHUGEPAGE = 0xf
MADV_NORMAL = 0x0
MADV_RANDOM = 0x1
MADV_REMOVE = 0x9
MADV_SEQUENTIAL = 0x2
MADV_UNMERGEABLE = 0xd
MADV_WILLNEED = 0x3
MAP_ANON = 0x800
MAP_ANONYMOUS = 0x800
MAP_DENYWRITE = 0x2000
MAP_EXECUTABLE = 0x4000
MAP_FILE = 0x0
MAP_FIXED = 0x10
MAP_GROWSDOWN = 0x1000
MAP_HUGETLB = 0x80000
MAP_HUGE_MASK = 0x3f
MAP_HUGE_SHIFT = 0x1a
MAP_LOCKED = 0x8000
MAP_NONBLOCK = 0x20000
MAP_NORESERVE = 0x400
MAP_POPULATE = 0x10000
MAP_PRIVATE = 0x2
MAP_RENAME = 0x800
MAP_SHARED = 0x1
MAP_STACK = 0x40000
MAP_TYPE = 0xf
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
MNT_DETACH = 0x2
MNT_EXPIRE = 0x4
MNT_FORCE = 0x1
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
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
NAME_MAX = 0xff
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
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_REPLACE = 0x100
NLM_F_REQUEST = 0x1
NLM_F_ROOT = 0x100
NOFLSH = 0x80
OCRNL = 0x8
OFDEL = 0x80
OFILL = 0x40
OLCUC = 0x2
ONLCR = 0x4
ONLRET = 0x20
ONOCR = 0x10
OPOST = 0x1
O_ACCMODE = 0x3
O_APPEND = 0x8
O_ASYNC = 0x1000
O_CLOEXEC = 0x80000
O_CREAT = 0x100
O_DIRECT = 0x8000
O_DIRECTORY = 0x10000
O_DSYNC = 0x10
O_EXCL = 0x400
O_FSYNC = 0x4010
O_LARGEFILE = 0x2000
O_NDELAY = 0x80
O_NOATIME = 0x40000
O_NOCTTY = 0x800
O_NOFOLLOW = 0x20000
O_NONBLOCK = 0x80
O_PATH = 0x200000
O_RDONLY = 0x0
O_RDWR = 0x2
O_RSYNC = 0x4010
O_SYNC = 0x4010
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 = 0x20002401
PERF_EVENT_IOC_ENABLE = 0x20002400
PERF_EVENT_IOC_ID = 0x40042407
PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
PERF_EVENT_IOC_PERIOD = 0x80082404
PERF_EVENT_IOC_REFRESH = 0x20002402
PERF_EVENT_IOC_RESET = 0x20002403
PERF_EVENT_IOC_SET_BPF = 0x80042408
PERF_EVENT_IOC_SET_FILTER = 0x80042406
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
PRIO_USER = 0x2
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_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 = 0xffffffff
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
PR_SET_THP_DISABLE = 0x29
PR_SET_TIMERSLACK = 0x1d
PR_SET_TIMING = 0xe
PR_SET_TSC = 0x1a
PR_SET_UNALIGN = 0x6
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
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
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_GETFPREGS = 0xe
PTRACE_GETREGS = 0xc
PTRACE_GETREGSET = 0x4204
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
PTRACE_GET_THREAD_AREA = 0x19
PTRACE_GET_THREAD_AREA_3264 = 0xc4
PTRACE_GET_WATCH_REGS = 0xd0
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_3264 = 0xc1
PTRACE_PEEKSIGINFO = 0x4209
PTRACE_PEEKSIGINFO_SHARED = 0x1
PTRACE_PEEKTEXT = 0x1
PTRACE_PEEKTEXT_3264 = 0xc0
PTRACE_PEEKUSR = 0x3
PTRACE_POKEDATA = 0x5
PTRACE_POKEDATA_3264 = 0xc3
PTRACE_POKETEXT = 0x4
PTRACE_POKETEXT_3264 = 0xc2
PTRACE_POKEUSR = 0x6
PTRACE_SECCOMP_GET_FILTER = 0x420c
PTRACE_SEIZE = 0x4206
PTRACE_SETFPREGS = 0xf
PTRACE_SETOPTIONS = 0x4200
PTRACE_SETREGS = 0xd
PTRACE_SETREGSET = 0x4205
PTRACE_SETSIGINFO = 0x4203
PTRACE_SETSIGMASK = 0x420b
PTRACE_SET_THREAD_AREA = 0x1a
PTRACE_SET_WATCH_REGS = 0xd1
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
PTRACE_TRACEME = 0x0
RLIMIT_AS = 0x6
RLIMIT_CORE = 0x4
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_LOCKS = 0xa
RLIMIT_MEMLOCK = 0x9
RLIMIT_MSGQUEUE = 0xc
RLIMIT_NICE = 0xd
RLIMIT_NOFILE = 0x5
RLIMIT_NPROC = 0x8
RLIMIT_RSS = 0x7
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_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 = 0x10
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 = 0x1a
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
RTCF_MASQ = 0x400000
RTCF_NAT = 0x800000
RTCF_VALVE = 0x200000
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_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_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 = 0x63
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
RTM_NEWCACHEREPORT = 0x60
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 = 0x15
RTM_NR_MSGTYPES = 0x54
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_BIRD = 0xc
RTPROT_BOOT = 0x3
RTPROT_DHCP = 0x10
RTPROT_DNROUTED = 0xd
RTPROT_GATED = 0x8
RTPROT_KERNEL = 0x2
RTPROT_MROUTED = 0x11
RTPROT_MRT = 0xa
RTPROT_NTK = 0xf
RTPROT_RA = 0x9
RTPROT_REDIRECT = 0x1
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_WIFI_STATUS = 0x29
SECCOMP_MODE_DISABLED = 0x0
SECCOMP_MODE_FILTER = 0x2
SECCOMP_MODE_STRICT = 0x1
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
SIOCADDDLCI = 0x8980
SIOCADDMULTI = 0x8931
SIOCADDRT = 0x890b
SIOCATMARK = 0x40047307
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 = 0x40047309
SIOCGRARP = 0x8961
SIOCGSKNS = 0x894c
SIOCGSTAMP = 0x8906
SIOCGSTAMPNS = 0x8907
SIOCINQ = 0x467f
SIOCOUTQ = 0x7472
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 = 0x80047308
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x1
SOCK_IOC_TYPE = 0x89
SOCK_NONBLOCK = 0x80
SOCK_PACKET = 0xa
SOCK_RAW = 0x3
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x2
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 = 0xffff
SOL_TCP = 0x6
SOL_TIPC = 0x10f
SOL_X25 = 0x106
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1009
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 = 0x20
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 = 0x1029
SO_DONTROUTE = 0x10
SO_ERROR = 0x1007
SO_GET_FILTER = 0x1a
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
SO_KEEPALIVE = 0x8
SO_LINGER = 0x80
SO_LOCK_FILTER = 0x2c
SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37
SO_NOFCS = 0x2b
SO_NO_CHECK = 0xb
SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x12
SO_PEERGROUPS = 0x3b
SO_PEERNAME = 0x1c
SO_PEERSEC = 0x1e
SO_PRIORITY = 0xc
SO_PROTOCOL = 0x1028
SO_RCVBUF = 0x1002
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x1004
SO_RCVTIMEO = 0x1006
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
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 = 0x1001
SO_SNDBUFFORCE = 0x1f
SO_SNDLOWAT = 0x1003
SO_SNDTIMEO = 0x1005
SO_STYLE = 0x1008
SO_TIMESTAMP = 0x1d
SO_TIMESTAMPING = 0x25
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x1008
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
SPLICE_F_GIFT = 0x8
SPLICE_F_MORE = 0x4
SPLICE_F_MOVE = 0x1
SPLICE_F_NONBLOCK = 0x2
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
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 = 0x5407
TCGETA = 0x5401
TCGETS = 0x540d
TCGETS2 = 0x4030542a
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_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_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_USER_TIMEOUT = 0x12
TCP_WINDOW_CLAMP = 0xa
TCSAFLUSH = 0x5410
TCSBRK = 0x5405
TCSBRKP = 0x5486
TCSETA = 0x5402
TCSETAF = 0x5404
TCSETAW = 0x5403
TCSETS = 0x540e
TCSETS2 = 0x8030542b
TCSETSF = 0x5410
TCSETSF2 = 0x8030542d
TCSETSW = 0x540f
TCSETSW2 = 0x8030542c
TCXONC = 0x5406
TIOCCBRK = 0x5428
TIOCCONS = 0x80047478
TIOCEXCL = 0x740d
TIOCGDEV = 0x40045432
TIOCGETD = 0x7400
TIOCGETP = 0x7408
TIOCGEXCL = 0x40045440
TIOCGICOUNT = 0x5492
TIOCGLCKTRMIOS = 0x548b
TIOCGLTC = 0x7474
TIOCGPGRP = 0x40047477
TIOCGPKT = 0x40045438
TIOCGPTLCK = 0x40045439
TIOCGPTN = 0x40045430
TIOCGPTPEER = 0x20005441
TIOCGRS485 = 0x4020542e
TIOCGSERIAL = 0x5484
TIOCGSID = 0x7416
TIOCGSOFTCAR = 0x5481
TIOCGWINSZ = 0x40087468
TIOCINQ = 0x467f
TIOCLINUX = 0x5483
TIOCMBIC = 0x741c
TIOCMBIS = 0x741b
TIOCMGET = 0x741d
TIOCMIWAIT = 0x5491
TIOCMSET = 0x741a
TIOCM_CAR = 0x100
TIOCM_CD = 0x100
TIOCM_CTS = 0x40
TIOCM_DSR = 0x400
TIOCM_DTR = 0x2
TIOCM_LE = 0x1
TIOCM_RI = 0x200
TIOCM_RNG = 0x200
TIOCM_RTS = 0x4
TIOCM_SR = 0x20
TIOCM_ST = 0x10
TIOCNOTTY = 0x5471
TIOCNXCL = 0x740e
TIOCOUTQ = 0x7472
TIOCPKT = 0x5470
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 = 0x5480
TIOCSERCONFIG = 0x5488
TIOCSERGETLSR = 0x548e
TIOCSERGETMULTI = 0x548f
TIOCSERGSTRUCT = 0x548d
TIOCSERGWILD = 0x5489
TIOCSERSETMULTI = 0x5490
TIOCSERSWILD = 0x548a
TIOCSER_TEMT = 0x1
TIOCSETD = 0x7401
TIOCSETN = 0x740a
TIOCSETP = 0x7409
TIOCSIG = 0x80045436
TIOCSLCKTRMIOS = 0x548c
TIOCSLTC = 0x7475
TIOCSPGRP = 0x80047476
TIOCSPTLCK = 0x80045431
TIOCSRS485 = 0xc020542f
TIOCSSERIAL = 0x5485
TIOCSSOFTCAR = 0x5482
TIOCSTI = 0x5472
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
TOSTOP = 0x8000
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x800854d5
TUNDETACHFILTER = 0x800854d6
TUNGETFEATURES = 0x400454cf
TUNGETFILTER = 0x400854db
TUNGETIFF = 0x400454d2
TUNGETSNDBUF = 0x400454d3
TUNGETVNETBE = 0x400454df
TUNGETVNETHDRSZ = 0x400454d7
TUNGETVNETLE = 0x400454dd
TUNSETDEBUG = 0x800454c9
TUNSETGROUP = 0x800454ce
TUNSETIFF = 0x800454ca
TUNSETIFINDEX = 0x800454da
TUNSETLINK = 0x800454cd
TUNSETNOCSUM = 0x800454c8
TUNSETOFFLOAD = 0x800454d0
TUNSETOWNER = 0x800454cc
TUNSETPERSIST = 0x800454cb
TUNSETQUEUE = 0x800454d9
TUNSETSNDBUF = 0x800454d4
TUNSETTXFILTER = 0x800454d1
TUNSETVNETBE = 0x800454de
TUNSETVNETHDRSZ = 0x800454d8
TUNSETVNETLE = 0x800454dc
UMOUNT_NOFOLLOW = 0x8
UTIME_NOW = 0x3fffffff
UTIME_OMIT = 0x3ffffffe
VDISCARD = 0xd
VEOF = 0x10
VEOL = 0x11
VEOL2 = 0x6
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 = 0x4
VM_SOCKETS_INVALID_VERSION = 0xffffffff
VQUIT = 0x1
VREPRINT = 0xc
VSTART = 0x8
VSTOP = 0x9
VSUSP = 0xa
VSWTC = 0x7
VSWTCH = 0x7
VT0 = 0x0
VT1 = 0x4000
VTDLY = 0x4000
VTIME = 0x5
VWERASE = 0xe
WALL = 0x40000000
WCLONE = 0x80000000
WCONTINUED = 0x8
WDIOC_GETBOOTSTATUS = 0x40045702
WDIOC_GETPRETIMEOUT = 0x40045709
WDIOC_GETSTATUS = 0x40045701
WDIOC_GETSUPPORT = 0x40285700
WDIOC_GETTEMP = 0x40045703
WDIOC_GETTIMELEFT = 0x4004570a
WDIOC_GETTIMEOUT = 0x40045707
WDIOC_KEEPALIVE = 0x40045705
WDIOC_SETOPTIONS = 0x40045704
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000
WORDSIZE = 0x20
WSTOPPED = 0x2
WUNTRACED = 0x2
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
XTABS = 0x1800
)
// Errors
const (
E2BIG = syscall.Errno(0x7)
EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x7d)
EADDRNOTAVAIL = syscall.Errno(0x7e)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x7c)
EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x95)
EBADE = syscall.Errno(0x32)
EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x51)
EBADMSG = syscall.Errno(0x4d)
EBADR = syscall.Errno(0x33)
EBADRQC = syscall.Errno(0x36)
EBADSLT = syscall.Errno(0x37)
EBFONT = syscall.Errno(0x3b)
EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x9e)
ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x25)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x82)
ECONNREFUSED = syscall.Errno(0x92)
ECONNRESET = syscall.Errno(0x83)
EDEADLK = syscall.Errno(0x2d)
EDEADLOCK = syscall.Errno(0x38)
EDESTADDRREQ = syscall.Errno(0x60)
EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
EEXIST = syscall.Errno(0x11)
EFAULT = syscall.Errno(0xe)
EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
EIDRM = syscall.Errno(0x24)
EILSEQ = syscall.Errno(0x58)
EINIT = syscall.Errno(0x8d)
EINPROGRESS = syscall.Errno(0x96)
EINTR = syscall.Errno(0x4)
EINVAL = syscall.Errno(0x16)
EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x85)
EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x8b)
EKEYEXPIRED = syscall.Errno(0xa2)
EKEYREJECTED = syscall.Errno(0xa4)
EKEYREVOKED = syscall.Errno(0xa3)
EL2HLT = syscall.Errno(0x2c)
EL2NSYNC = syscall.Errno(0x26)
EL3HLT = syscall.Errno(0x27)
EL3RST = syscall.Errno(0x28)
ELIBACC = syscall.Errno(0x53)
ELIBBAD = syscall.Errno(0x54)
ELIBEXEC = syscall.Errno(0x57)
ELIBMAX = syscall.Errno(0x56)
ELIBSCN = syscall.Errno(0x55)
ELNRNG = syscall.Errno(0x29)
ELOOP = syscall.Errno(0x5a)
EMEDIUMTYPE = syscall.Errno(0xa0)
EMFILE = syscall.Errno(0x18)
EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x61)
EMULTIHOP = syscall.Errno(0x4a)
ENAMETOOLONG = syscall.Errno(0x4e)
ENAVAIL = syscall.Errno(0x8a)
ENETDOWN = syscall.Errno(0x7f)
ENETRESET = syscall.Errno(0x81)
ENETUNREACH = syscall.Errno(0x80)
ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x35)
ENOBUFS = syscall.Errno(0x84)
ENOCSI = syscall.Errno(0x2b)
ENODATA = syscall.Errno(0x3d)
ENODEV = syscall.Errno(0x13)
ENOENT = syscall.Errno(0x2)
ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0xa1)
ENOLCK = syscall.Errno(0x2e)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x9f)
ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x23)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x63)
ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x59)
ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x86)
ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x5d)
ENOTNAM = syscall.Errno(0x89)
ENOTRECOVERABLE = syscall.Errno(0xa6)
ENOTSOCK = syscall.Errno(0x5f)
ENOTSUP = syscall.Errno(0x7a)
ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x50)
ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x7a)
EOVERFLOW = syscall.Errno(0x4f)
EOWNERDEAD = syscall.Errno(0xa5)
EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x7b)
EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x78)
EPROTOTYPE = syscall.Errno(0x62)
ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x52)
EREMDEV = syscall.Errno(0x8e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x8c)
ERESTART = syscall.Errno(0x5b)
ERFKILL = syscall.Errno(0xa7)
EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x8f)
ESOCKTNOSUPPORT = syscall.Errno(0x79)
ESPIPE = syscall.Errno(0x1d)
ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x97)
ESTRPIPE = syscall.Errno(0x5c)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x91)
ETOOMANYREFS = syscall.Errno(0x90)
ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x87)
EUNATCH = syscall.Errno(0x2a)
EUSERS = syscall.Errno(0x5e)
EWOULDBLOCK = syscall.Errno(0xb)
EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x34)
)
// Signals
const (
SIGABRT = syscall.Signal(0x6)
SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0xa)
SIGCHLD = syscall.Signal(0x12)
SIGCLD = syscall.Signal(0x12)
SIGCONT = syscall.Signal(0x19)
SIGEMT = syscall.Signal(0x7)
SIGFPE = syscall.Signal(0x8)
SIGHUP = syscall.Signal(0x1)
SIGILL = syscall.Signal(0x4)
SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x16)
SIGIOT = syscall.Signal(0x6)
SIGKILL = syscall.Signal(0x9)
SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x16)
SIGPROF = syscall.Signal(0x1d)
SIGPWR = syscall.Signal(0x13)
SIGQUIT = syscall.Signal(0x3)
SIGSEGV = syscall.Signal(0xb)
SIGSTOP = syscall.Signal(0x17)
SIGSYS = syscall.Signal(0xc)
SIGTERM = syscall.Signal(0xf)
SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x18)
SIGTTIN = syscall.Signal(0x1a)
SIGTTOU = syscall.Signal(0x1b)
SIGURG = syscall.Signal(0x15)
SIGUSR1 = syscall.Signal(0x10)
SIGUSR2 = syscall.Signal(0x11)
SIGVTALRM = syscall.Signal(0x1c)
SIGWINCH = syscall.Signal(0x14)
SIGXCPU = syscall.Signal(0x1e)
SIGXFSZ = syscall.Signal(0x1f)
)
// Error table
var errors = [...]string{
1: "operation not permitted",
2: "no such file or directory",
3: "no such process",
4: "interrupted system call",
5: "input/output error",
6: "no such device or address",
7: "argument list too long",
8: "exec format error",
9: "bad file descriptor",
10: "no child processes",
11: "resource temporarily unavailable",
12: "cannot allocate memory",
13: "permission denied",
14: "bad address",
15: "block device required",
16: "device or resource busy",
17: "file exists",
18: "invalid cross-device link",
19: "no such device",
20: "not a directory",
21: "is a directory",
22: "invalid argument",
23: "too many open files in system",
24: "too many open files",
25: "inappropriate ioctl for device",
26: "text file busy",
27: "file too large",
28: "no space left on device",
29: "illegal seek",
30: "read-only file system",
31: "too many links",
32: "broken pipe",
33: "numerical argument out of domain",
34: "numerical result out of range",
35: "no message of desired type",
36: "identifier removed",
37: "channel number out of range",
38: "level 2 not synchronized",
39: "level 3 halted",
40: "level 3 reset",
41: "link number out of range",
42: "protocol driver not attached",
43: "no CSI structure available",
44: "level 2 halted",
45: "resource deadlock avoided",
46: "no locks available",
50: "invalid exchange",
51: "invalid request descriptor",
52: "exchange full",
53: "no anode",
54: "invalid request code",
55: "invalid slot",
56: "file locking deadlock error",
59: "bad font file format",
60: "device not a stream",
61: "no data available",
62: "timer expired",
63: "out of streams resources",
64: "machine is not on the network",
65: "package not installed",
66: "object is remote",
67: "link has been severed",
68: "advertise error",
69: "srmount error",
70: "communication error on send",
71: "protocol error",
73: "RFS specific error",
74: "multihop attempted",
77: "bad message",
78: "file name too long",
79: "value too large for defined data type",
80: "name not unique on network",
81: "file descriptor in bad state",
82: "remote address changed",
83: "can not access a needed shared library",
84: "accessing a corrupted shared library",
85: ".lib section in a.out corrupted",
86: "attempting to link in too many shared libraries",
87: "cannot exec a shared library directly",
88: "invalid or incomplete multibyte or wide character",
89: "function not implemented",
90: "too many levels of symbolic links",
91: "interrupted system call should be restarted",
92: "streams pipe error",
93: "directory not empty",
94: "too many users",
95: "socket operation on non-socket",
96: "destination address required",
97: "message too long",
98: "protocol wrong type for socket",
99: "protocol not available",
120: "protocol not supported",
121: "socket type not supported",
122: "operation not supported",
123: "protocol family not supported",
124: "address family not supported by protocol",
125: "address already in use",
126: "cannot assign requested address",
127: "network is down",
128: "network is unreachable",
129: "network dropped connection on reset",
130: "software caused connection abort",
131: "connection reset by peer",
132: "no buffer space available",
133: "transport endpoint is already connected",
134: "transport endpoint is not connected",
135: "structure needs cleaning",
137: "not a XENIX named type file",
138: "no XENIX semaphores available",
139: "is a named type file",
140: "remote I/O error",
141: "unknown error 141",
142: "unknown error 142",
143: "cannot send after transport endpoint shutdown",
144: "too many references: cannot splice",
145: "connection timed out",
146: "connection refused",
147: "host is down",
148: "no route to host",
149: "operation already in progress",
150: "operation now in progress",
151: "stale file handle",
158: "operation canceled",
159: "no medium found",
160: "wrong medium type",
161: "required key not available",
162: "key has expired",
163: "key has been revoked",
164: "key was rejected by service",
165: "owner died",
166: "state not recoverable",
167: "operation not possible due to RF-kill",
168: "memory page has hardware error",
1133: "disk quota exceeded",
}
// Signal table
var signals = [...]string{
1: "hangup",
2: "interrupt",
3: "quit",
4: "illegal instruction",
5: "trace/breakpoint trap",
6: "aborted",
7: "EMT trap",
8: "floating point exception",
9: "killed",
10: "bus error",
11: "segmentation fault",
12: "bad system call",
13: "broken pipe",
14: "alarm clock",
15: "terminated",
16: "user defined signal 1",
17: "user defined signal 2",
18: "child exited",
19: "power failure",
20: "window changed",
21: "urgent I/O condition",
22: "I/O possible",
23: "stopped (signal)",
24: "stopped",
25: "continued",
26: "stopped (tty input)",
27: "stopped (tty output)",
28: "virtual timer expired",
29: "profiling timer expired",
30: "CPU time limit exceeded",
31: "file size limit exceeded",
}
```
|
```xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="path_to_url"
xmlns:app="path_to_url"
xmlns:tools="path_to_url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="30dp">
<TextView
android:id="@+id/tv_freq"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="?attr/text_color_primary"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="100k"/>
<TextView
android:id="@+id/tv_min"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:gravity="right|center_vertical"
android:textColor="?attr/text_color_primary"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_freq"
tools:text="-15"/>
<androidx.appcompat.widget.AppCompatSeekBar
android:id="@+id/eq_seekbar"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintLeft_toRightOf="@id/tv_min"
app:layout_constraintRight_toLeftOf="@id/tv_max"
app:layout_constraintTop_toBottomOf="@id/tv_freq"/>
<TextView
android:id="@+id/tv_max"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:textColor="?attr/text_color_primary"
app:layout_constraintLeft_toRightOf="@id/eq_seekbar"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_freq"
tools:text="15"/>
</androidx.constraintlayout.widget.ConstraintLayout>
```
|
```java
package cn.finalteam.rxgalleryfinal.imageloader;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import cn.finalteam.rxgalleryfinal.ui.widget.FixImageView;
/**
* Desction:
* Author:pengjianbo Dujinyang
* Date:16/6/17 1:05
*/
public interface AbsImageLoader {
void displayImage(Context context,
String path,
FixImageView imageView,
Drawable defaultDrawable,
Bitmap.Config config,
boolean resize,
boolean isGif,
int width,
int height,
int rotate);
}
```
|
Ronald F. Chismar (October 23, 1934 – December 26, 1998) was an American football coach. He served as the head football coach at Wichita State University from 1984 to 1986, compiling a record of 8–25.
Chismar graduated from Kent State University in 1961 with a Bachelor of Science in education and earned a Master of Science degree from the University of Akron in 1969. During the 1960s, he coached high school football in Ohio. Chismar began his college football coaching career at Bowling Green State University in 1970 as an assistant on Don Nehlen's staff. He remained at Bowling Green through the 1973 season before moving to Michigan State University in 1974 to coach the offensive line under Denny Stolz and then Darryl Rogers. When Rogers's became the head coach at Arizona State University in 1980, Chismar moved with him to serve as offensive coordinator. Chismar helped lead the Arizona State Sun Devils to the 1983 Fiesta Bowl, where they defeated the Oklahoma and finished the season ranked No. 6 in both major polls.
Following Wichita State discontinuing its football program after the conclusion of the 1986 season, Chismar returned to assistant coaching at Rice University. He also coached at Temple University, then moved to Fort Scott Community College in Fort Scott, Kansas, to serve as head football coach and athletic director. Chismar died on December 26, 1998, in Phoenix, Arizona.
Head coaching record
College
References
1934 births
1998 deaths
Arizona State Sun Devils football coaches
Bowling Green Falcons football coaches
Fort Scott Greyhounds football coaches
Michigan State Spartans football coaches
Rice Owls football coaches
Temple Owls football coaches
Wichita State Shockers football coaches
High school football coaches in Ohio
Kent State University alumni
University of Akron alumni
|
```objective-c
// AFHTTPRequestOperationManager.h
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <Foundation/Foundation.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <Availability.h>
#if __IPHONE_OS_VERSION_MIN_REQUIRED
#import <MobileCoreServices/MobileCoreServices.h>
#else
#import <CoreServices/CoreServices.h>
#endif
#import "AFHTTPRequestOperation.h"
#import "AFURLResponseSerialization.h"
#import "AFURLRequestSerialization.h"
#import "AFSecurityPolicy.h"
#import "AFNetworkReachabilityManager.h"
#ifndef NS_DESIGNATED_INITIALIZER
#if __has_attribute(objc_designated_initializer)
#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
#else
#define NS_DESIGNATED_INITIALIZER
#endif
#endif
NS_ASSUME_NONNULL_BEGIN
/**
`AFHTTPRequestOperationManager` encapsulates the common patterns of communicating with a web application over HTTP, including request creation, response serialization, network reachability monitoring, and security, as well as request operation management.
## Subclassing Notes
Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application.
For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect.
## Methods to Override
To change the behavior of all request operation construction for an `AFHTTPRequestOperationManager` subclass, override `HTTPRequestOperationWithRequest:success:failure`.
## Serialization
Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to `<AFURLRequestSerialization>`.
Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `<AFURLResponseSerialization>`
## URL Construction Using Relative Paths
For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`.
Below are a few examples of how `baseURL` and relative paths interact:
NSURL *baseURL = [NSURL URLWithString:@"path_to_url"];
[NSURL URLWithString:@"foo" relativeToURL:baseURL]; // path_to_url
[NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // path_to_url
[NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // path_to_url
[NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // path_to_url
[NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // path_to_url
[NSURL URLWithString:@"path_to_url" relativeToURL:baseURL]; // path_to_url
Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash.
## Network Reachability Monitoring
Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details.
## NSSecureCoding & NSCopying Caveats
`AFHTTPRequestOperationManager` conforms to the `NSSecureCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. There are a few minor caveats to keep in mind, however:
- Archives and copies of HTTP clients will be initialized with an empty operation queue.
- NSSecureCoding cannot serialize / deserialize block properties, so an archive of an HTTP client will not include any reachability callback block that may be set.
*/
@interface AFHTTPRequestOperationManager : NSObject <NSSecureCoding, NSCopying>
/**
The URL used to monitor reachability, and construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods.
*/
@property (readonly, nonatomic, strong, nullable) NSURL *baseURL;
/**
Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies.
@warning `requestSerializer` must not be `nil`.
*/
@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * requestSerializer;
/**
Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to a JSON serializer, which serializes data from responses with a `application/json` MIME type, and falls back to the raw data object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed.
@warning `responseSerializer` must not be `nil`.
*/
@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
/**
The operation queue on which request operations are scheduled and run.
*/
@property (nonatomic, strong) NSOperationQueue *operationQueue;
///-------------------------------
/// @name Managing URL Credentials
///-------------------------------
/**
Whether request operations should consult the credential storage for authenticating the connection. `YES` by default.
@see AFURLConnectionOperation -shouldUseCredentialStorage
*/
@property (nonatomic, assign) BOOL shouldUseCredentialStorage;
/**
The credential used by request operations for authentication challenges.
@see AFURLConnectionOperation -credential
*/
@property (nonatomic, strong, nullable) NSURLCredential *credential;
///-------------------------------
/// @name Managing Security Policy
///-------------------------------
/**
The security policy used by created request operations to evaluate server trust for secure connections. `AFHTTPRequestOperationManager` uses the `defaultPolicy` unless otherwise specified.
*/
@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
///------------------------------------
/// @name Managing Network Reachability
///------------------------------------
/**
The network reachability manager. `AFHTTPRequestOperationManager` uses the `sharedManager` by default.
*/
@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager;
///-------------------------------
/// @name Managing Callback Queues
///-------------------------------
/**
The dispatch queue for the `completionBlock` of request operations. If `NULL` (default), the main queue is used.
*/
#if OS_OBJECT_USE_OBJC
@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue;
#else
@property (nonatomic, assign, nullable) dispatch_queue_t completionQueue;
#endif
/**
The dispatch group for the `completionBlock` of request operations. If `NULL` (default), a private dispatch group is used.
*/
#if OS_OBJECT_USE_OBJC
@property (nonatomic, strong, nullable) dispatch_group_t completionGroup;
#else
@property (nonatomic, assign, nullable) dispatch_group_t completionGroup;
#endif
///---------------------------------------------
/// @name Creating and Initializing HTTP Clients
///---------------------------------------------
/**
Creates and returns an `AFHTTPRequestOperationManager` object.
*/
+ (instancetype)manager;
/**
Initializes an `AFHTTPRequestOperationManager` object with the specified base URL.
This is the designated initializer.
@param url The base URL for the HTTP client.
@return The newly-initialized HTTP client
*/
- (instancetype)initWithBaseURL:(nullable NSURL *)url NS_DESIGNATED_INITIALIZER;
///---------------------------------------
/// @name Managing HTTP Request Operations
///---------------------------------------
/**
Creates an `AFHTTPRequestOperation`, and sets the response serializers to that of the HTTP client.
@param request The request object to be loaded asynchronously during execution of the operation.
@param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request.
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred.
*/
- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request
success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
///---------------------------
/// @name Making HTTP Requests
///---------------------------
/**
Creates and runs an `AFHTTPRequestOperation` with a `GET` request.
@param URLString The URL string used to create the request URL.
@param parameters The parameters to be encoded according to the client request serializer.
@param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
@see -HTTPRequestOperationWithRequest:success:failure:
*/
- (nullable AFHTTPRequestOperation *)GET:(NSString *)URLString
parameters:(nullable id)parameters
success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
/**
Creates and runs an `AFHTTPRequestOperation` with a `HEAD` request.
@param URLString The URL string used to create the request URL.
@param parameters The parameters to be encoded according to the client request serializer.
@param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes a single arguments: the request operation.
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
@see -HTTPRequestOperationWithRequest:success:failure:
*/
- (nullable AFHTTPRequestOperation *)HEAD:(NSString *)URLString
parameters:(nullable id)parameters
success:(nullable void (^)(AFHTTPRequestOperation *operation))success
failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
/**
Creates and runs an `AFHTTPRequestOperation` with a `POST` request.
@param URLString The URL string used to create the request URL.
@param parameters The parameters to be encoded according to the client request serializer.
@param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
@see -HTTPRequestOperationWithRequest:success:failure:
*/
- (nullable AFHTTPRequestOperation *)POST:(NSString *)URLString
parameters:(nullable id)parameters
success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
/**
Creates and runs an `AFHTTPRequestOperation` with a multipart `POST` request.
@param URLString The URL string used to create the request URL.
@param parameters The parameters to be encoded according to the client request serializer.
@param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
@param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
@see -HTTPRequestOperationWithRequest:success:failure:
*/
- (nullable AFHTTPRequestOperation *)POST:(NSString *)URLString
parameters:(nullable id)parameters
constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
/**
Creates and runs an `AFHTTPRequestOperation` with a `PUT` request.
@param URLString The URL string used to create the request URL.
@param parameters The parameters to be encoded according to the client request serializer.
@param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
@see -HTTPRequestOperationWithRequest:success:failure:
*/
- (nullable AFHTTPRequestOperation *)PUT:(NSString *)URLString
parameters:(nullable id)parameters
success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
/**
Creates and runs an `AFHTTPRequestOperation` with a `PATCH` request.
@param URLString The URL string used to create the request URL.
@param parameters The parameters to be encoded according to the client request serializer.
@param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
@see -HTTPRequestOperationWithRequest:success:failure:
*/
- (nullable AFHTTPRequestOperation *)PATCH:(NSString *)URLString
parameters:(nullable id)parameters
success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
/**
Creates and runs an `AFHTTPRequestOperation` with a `DELETE` request.
@param URLString The URL string used to create the request URL.
@param parameters The parameters to be encoded according to the client request serializer.
@param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
@see -HTTPRequestOperationWithRequest:success:failure:
*/
- (nullable AFHTTPRequestOperation *)DELETE:(NSString *)URLString
parameters:(nullable id)parameters
success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
@end
NS_ASSUME_NONNULL_END
```
|
Sergei Kopeikin (born April 10, 1956) is a USSR-born theoretical physicist and astronomer presently living and working in the United States, where he holds the position of Professor of Physics at the University of Missouri in Columbia, Missouri. He specializes in the theoretical and experimental study of gravity and general relativity. He is also an expert in the field of the astronomical reference frames and time metrology. His general relativistic theory of the Post-Newtonian reference frames which he had worked out along with Victor A. Brumberg, was adopted in 2000 by the resolutions of the International Astronomical Union as a standard for reduction of ground-based astronomical observation.
A computer program Tempo2 used to analyze radio observations of pulsars, includes several effects predicted by S. Kopeikin that are important for measuring parameters of the binary pulsars,
for testing general relativity, and for detection of gravitational waves of ultra-low frequency. Sergei Kopeikin has worked out a complete post-Newtonian theory of equations of motion of N extended bodies in scalar-tensor theory of gravity with all mass and spin multipole moments of arbitrary order and derived the Lagrangian of the relativistic N-body problem.
In September 2002, S. Kopeikin led a team which conducted a high-precision VLBI experiment to measure the fundamental speed of gravity, thus, confirming the Einstein's prediction on the relativistic nature of gravitational field and its finite speed of propagation.
He is also involved in studies concerning the capabilities of the Lunar Laser Ranging (LLR) technique to measure dynamical features of the General Theory of Relativity in the lunar motion. He has critically analyzed the claims of other scientists concerning the possibility of LLR to measure the gravitomagnetic interaction. Prof. Kopeikin organized and chaired three international workshops on the advanced theory and model of the Lunar Laser Ranging experiment. The LLR workshops were held in the International Space Science Institute (Bern, Switzerland) in 2010-2012.
Recently, S. Kopeikin has been actively involved in theoretical studies on relativistic geodesy and applications of atomic clocks for high-precision navigation and in geodetic datum. He has provided an exact relativistic definition of geoid, and worked out the post-Newtonian concepts of the Maclaurin spheroid and normal gravity formula.
S. Kopeikin's workshop on spacetime metrology, clocks and relativistic geodesy is held in the International Space Science Institute (Bern, Switzerland).
Kopeikin was born in Kashin, a small town near Moscow in what was then the USSR. He graduated with excellence from Department of Astrophysics of Moscow State University in 1983 where he studied general relativity under Leonid Grishchuk. In 1986, he obtained a Ph.D. in relativistic astrophysics from the Space Research Institute in Moscow. His Ph.D. thesis was advised by Yakov Borisovich Zel'dovich and presented a first general-relativistic derivation of the conservative and radiation reaction forces in the Post-Newtonian expansion of the gravitational field of a binary system of two extended, massive bodies.
In 1991, he obtained a Doctor of Science degree in Physics and Mathematics from Moscow State University and moved to Tokyo (Japan) in 1993 to teach astronomy in Hitotsubashi University. He was adjunct staff member in National Astronomical Observatory of Japan in 1993-1996 and a visiting professor in the same observatory in 1996-1997. Kopeikin moved to Germany in 1997 and worked in the Institute for Theoretical Physics of Friedrich Schiller University of Jena and in Max Planck Institute for Radio Astronomy until 1999. He had joined Department of Physics and Astronomy of the University of Missouri in February 2000 where he got tenure in 2004.
He has been married to Zoia Kopeikina (daughter of Solomon Borisovich Pikelner) since 1980, they have four daughters, four granddaughters and three grandsons. As of December 2019 the family lives in Columbia, Missouri and Texas.
Bibliometric information
Prof. Kopeikin has published 198 scientific papers and 2 books. He was an editor of two other books on advances in relativistic celestial mechanics. According to Google Scholar Citations program, the h-index of S.M. Kopeikin is 39, his i10-index is 89, while the total number of citations is 5302.
As of March 2023, NASA ADS returns for him an h-index of 31, while his tori and riq indices are 53.3 and 182, respectively.
References
External links
"The real reason why the Pioneer spacecrafts appear to be slowing down" - theoretical study of the Pioneer anomaly effect
"Test for Einstein's gravity speed theory" - a BBC News article about the preparations to the "speed-of-gravity" experiment
"Speed of Gravity Measured for First Time" - a NRAO press-release on VLBI experiment measured the ultimate speed of gravity
"Einstein Was Right on Gravity's Velocity" - The New York Times, January 8, 2003
"Physicist Disputes Speed of Gravity Claim" - American Physical Society News article, dated June 2003, describing criticism of the results
"Aberration and the Fundamental Speed of Gravity in the Jovian Deflection Experiment" - a rebuttal of the criticism
"Gravimagnetism, Causality, and Aberration of Gravity in the Gravitational Light-Ray Deflection Experiments" - Kopeikin's new proposals for further improvements of the experimental results on the fundamental speed of gravity
"Frontiers in Relativistic Celestial Mechanics. Vol. 1. Theory" - edited by S. Kopeikin
"Frontiers in Relativistic Celestial Mechanics. Vol. 2. Applications and Experiments" - edited by S. Kopeikin
"Relativistic Celestial Mechanics of the Solar System" - monograph by S. Kopeikin, M. Efroimsky and G. Kaplan
"Metric Theories of Gravity: perturbations and conservation laws" - monograph by A. Petrov, S. Kopeikin, B. Tekin and R. Lompay
1956 births
Living people
Russian physicists
American physicists
University of Missouri faculty
Physicists from Missouri
Scientists from Missouri
University of Missouri physicists
Moscow State University alumni
Kopeikin, Sergie
|
was an actress of Japanese exploitation cinema, erotic dancer and pin-up model who was active from the 1950s to 1970s.
Life and career
Mihara signed up with Shintoho in 1951 but appeared mostly in minor roles, pursuing the career of a pin-up model and stripper, until her role as the lead actress in Teruo Ishii's 1957 film Nude Actress Murder Case: Five Criminals. The following year, Shintoho made Mihara the star of their low-budget ama series in place of Michiko Maeda. She first appeared in Yoshiki Onoda's Cannibal Ama (1958) followed by the 1959 Girl Divers at Spook Mansion.
Following Shintoho's bankruptcy in 1961, Mihara worked almost exclusively for Toei, including four films in Ishii's Abashiri Prison yakuza film series in 1966 and 1967 and later in their onsen geisha sexploitation films, eventually becoming a staple actress of the studio's "pinky violence" subgenre by the early 1970s.
Selected filmography
Nude Actress Murder Case: Five Criminals (1957)
Cannibal Ama (1958)
Kenpei to yurei (1958)
Soldiers' Girls (女の防波堤 Onna no bōhatei) (1958)
Pier of Woman Body (女体棧橋 Nyotai sanbashi) (1958)
Girl Divers at Spook Mansion (海女の化物屋敷 Ama no bakemono yashiki) (1959)
The Catch (1961)
Sexy Line (セクシー地帯 Sekushii chitai) (1961)
Sword of the Beast (1965)
Rampaging Dragon of the North (1966)
Abashiri Prison: Duel in the Wilderness (網走番外地 荒野の対決 Abashiri Bangaichi: Koya no taiketsu) (1966)
Abashiri Prison: Duel in the South (網走番外地 南国の対決 Abashiri Bangaichi: Nangoku no taiketsu) (1966)
Abashiri Prison: Duel at 30 Degrees Below Zero (網走番外地 決斗零下30度 Abashiri Bangaichi: Ketto reika sanjū-do) (1967)
Abashiri Prison: Fight against Vice (網走番外地 悪への挑戦 Abashiri Bangaichi: Aku e no Chōsen) (1967)
Blackmail Is My Life (1968)
Hot Springs Geisha (温泉あんま芸者 Onsen anma geisha) (1968)
Hot Springs Kiss Geisha (温泉スッポン芸者 Onsen suppon geisha) (1972)
Sex & Fury (不良姐御伝 猪の鹿お蝶 Furyō anego den: Inoshika o-Chō) (1973)
School of the Holy Beast (聖獣学園 Seijū gakuen) (1974)
Zero Woman: Red Handcuffs'' (0課の女 赤い手錠 Zeroka no onna: Akai wappa) (1974)
References
External links
Yōko Mihara at the Japanese Movie Database
三原葉子と昭和の女神達の部屋 Fan site with comprehensive information on Yōko Mihara.
1933 births
Japanese film actresses
Japanese female adult models
Japanese female erotic dancers
Pink film actors
People from Morioka, Iwate
2013 deaths
|
George Huntley is an American singer, guitarist, and songwriter, best known as a member of The Connells from 1985 to 2001.
History
George Huntley was a childhood friend of brothers David and Mike Connell. Huntley performed solo acts for The Connells at many of their early shows. After the band began playing larger shows and had a song featured on the Dolphin Records' More Mondo compilation, Huntley expressed interest in joining the band. Shortly after he graduated from the University of North Carolina at Chapel Hill in 1984, he became a member of the band and made his debut on the 1985 Hats Off EP, produced by Don Dixon. Up until 1991 with the addition of keyboardist Steve Potak, Huntley played both lead guitar and keyboards in the band, often switching between both during the same song. He also wrote and sang lead vocals on numerous Connells songs such as "Sal", "Home Today", and "Doin' You". In 1996, he released his first and only solo album titled Brainjunk.
Current activities
After the release of The Connells' 8th album Old School Dropouts, Huntley left the band to spend time on family life and pursue other interests. As of July 2022, he owned and operated Huntley Realty LLC.
References
External links
Huntley Realty
The Connells' website
1962 births
Living people
Songwriters from North Carolina
American rock guitarists
American male guitarists
Musicians from Raleigh, North Carolina
Guitarists from North Carolina
20th-century American guitarists
20th-century American male musicians
|
```objective-c
#pragma once
#include <Python.h>
#ifdef __cplusplus
#include <torch/csrc/dynamo/utils.h>
#include <torch/csrc/utils/pybind.h>
#include <list>
extern "C" {
#endif
/*
Our cache resides on the extra scratch space of the code object. The structure
of the cache is as follows:
-> ExtraState
-> CacheEntry (list)
-> check_fn
-> code
-> FrameState
CacheEntry is a linked list node containing the check_fn for guards
and the optimized code.
The FrameState is a PyDict that enables sharing between different frames. This
is used to detect dynamism in automatic dynamic shapes.
These two are encapsulated into a ExtraState.
*/
typedef struct CacheEntry CacheEntry;
typedef struct ExtraState ExtraState;
#ifdef __cplusplus
typedef struct VISIBILITY_HIDDEN CacheEntry {
// check the guards: lambda: <locals of user function>: bool
py::object check_fn;
// modified user bytecode (protected by check_fn's guards)
py::object code;
// CompileId corresponding to this compilation
py::object compile_id;
// root guard manager if exists
void* root_mgr{nullptr};
// backend used to create this cache entry
PyObject* backend{nullptr};
// Reference to owning ExtraState
ExtraState* _owner{nullptr};
// Reference to this CacheEntry's location in owner's linked list
std::list<CacheEntry>::iterator _owner_loc;
CacheEntry(const py::handle& guarded_code, PyObject* backend);
~CacheEntry();
// Warning: returns a reference whose lifetime is controlled by C++
py::object next();
} CacheEntry;
#endif
// Returns borrowed reference
PyCodeObject* CacheEntry_get_code(CacheEntry* e);
// Returns a borrowed reference to CacheEntry as a PyObject
// Warning: lifetime is controlled by C++
PyObject* CacheEntry_to_obj(CacheEntry* e);
#ifdef __cplusplus
} // extern "C"
#endif
```
|
```xml
export enum ObjectExpressionKeysTransformerCustomNode {
ObjectExpressionVariableDeclarationHostNode =
'ObjectExpressionVariableDeclarationHostNode'
}
```
|
```c++
//===- DWARFAcceleratorTable.cpp ------------------------------------------===//
//
// See path_to_url for license information.
//
//===your_sha256_hash------===//
#include "llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/DebugInfo/DWARF/DWARFRelocMap.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DJB.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/ScopedPrinter.h"
#include "llvm/Support/raw_ostream.h"
#include <cstddef>
#include <cstdint>
#include <utility>
using namespace llvm;
namespace {
struct Atom {
unsigned Value;
};
static raw_ostream &operator<<(raw_ostream &OS, const Atom &A) {
StringRef Str = dwarf::AtomTypeString(A.Value);
if (!Str.empty())
return OS << Str;
return OS << "DW_ATOM_unknown_" << format("%x", A.Value);
}
} // namespace
static Atom formatAtom(unsigned Atom) { return {Atom}; }
DWARFAcceleratorTable::~DWARFAcceleratorTable() = default;
Error AppleAcceleratorTable::extract() {
uint64_t Offset = 0;
// Check that we can at least read the header.
if (!AccelSection.isValidOffset(offsetof(Header, HeaderDataLength) + 4))
return createStringError(errc::illegal_byte_sequence,
"Section too small: cannot read header.");
Hdr.Magic = AccelSection.getU32(&Offset);
Hdr.Version = AccelSection.getU16(&Offset);
Hdr.HashFunction = AccelSection.getU16(&Offset);
Hdr.BucketCount = AccelSection.getU32(&Offset);
Hdr.HashCount = AccelSection.getU32(&Offset);
Hdr.HeaderDataLength = AccelSection.getU32(&Offset);
// Check that we can read all the hashes and offsets from the
// section (see SourceLevelDebugging.rst for the structure of the index).
// We need to substract one because we're checking for an *offset* which is
// equal to the size for an empty table and hence pointer after the section.
if (!AccelSection.isValidOffset(sizeof(Hdr) + Hdr.HeaderDataLength +
Hdr.BucketCount * 4 + Hdr.HashCount * 8 - 1))
return createStringError(
errc::illegal_byte_sequence,
"Section too small: cannot read buckets and hashes.");
HdrData.DIEOffsetBase = AccelSection.getU32(&Offset);
uint32_t NumAtoms = AccelSection.getU32(&Offset);
for (unsigned i = 0; i < NumAtoms; ++i) {
uint16_t AtomType = AccelSection.getU16(&Offset);
auto AtomForm = static_cast<dwarf::Form>(AccelSection.getU16(&Offset));
HdrData.Atoms.push_back(std::make_pair(AtomType, AtomForm));
}
IsValid = true;
return Error::success();
}
uint32_t AppleAcceleratorTable::getNumBuckets() { return Hdr.BucketCount; }
uint32_t AppleAcceleratorTable::getNumHashes() { return Hdr.HashCount; }
uint32_t AppleAcceleratorTable::getSizeHdr() { return sizeof(Hdr); }
uint32_t AppleAcceleratorTable::getHeaderDataLength() {
return Hdr.HeaderDataLength;
}
ArrayRef<std::pair<AppleAcceleratorTable::HeaderData::AtomType,
AppleAcceleratorTable::HeaderData::Form>>
AppleAcceleratorTable::getAtomsDesc() {
return HdrData.Atoms;
}
bool AppleAcceleratorTable::validateForms() {
for (auto Atom : getAtomsDesc()) {
DWARFFormValue FormValue(Atom.second);
switch (Atom.first) {
case dwarf::DW_ATOM_die_offset:
case dwarf::DW_ATOM_die_tag:
case dwarf::DW_ATOM_type_flags:
if ((!FormValue.isFormClass(DWARFFormValue::FC_Constant) &&
!FormValue.isFormClass(DWARFFormValue::FC_Flag)) ||
FormValue.getForm() == dwarf::DW_FORM_sdata)
return false;
break;
default:
break;
}
}
return true;
}
std::pair<uint64_t, dwarf::Tag>
AppleAcceleratorTable::readAtoms(uint64_t *HashDataOffset) {
uint64_t DieOffset = dwarf::DW_INVALID_OFFSET;
dwarf::Tag DieTag = dwarf::DW_TAG_null;
dwarf::FormParams FormParams = {Hdr.Version, 0, dwarf::DwarfFormat::DWARF32};
for (auto Atom : getAtomsDesc()) {
DWARFFormValue FormValue(Atom.second);
FormValue.extractValue(AccelSection, HashDataOffset, FormParams);
switch (Atom.first) {
case dwarf::DW_ATOM_die_offset:
DieOffset = *FormValue.getAsUnsignedConstant();
break;
case dwarf::DW_ATOM_die_tag:
DieTag = (dwarf::Tag)*FormValue.getAsUnsignedConstant();
break;
default:
break;
}
}
return {DieOffset, DieTag};
}
void AppleAcceleratorTable::Header::dump(ScopedPrinter &W) const {
DictScope HeaderScope(W, "Header");
W.printHex("Magic", Magic);
W.printHex("Version", Version);
W.printHex("Hash function", HashFunction);
W.printNumber("Bucket count", BucketCount);
W.printNumber("Hashes count", HashCount);
W.printNumber("HeaderData length", HeaderDataLength);
}
Optional<uint64_t> AppleAcceleratorTable::HeaderData::extractOffset(
Optional<DWARFFormValue> Value) const {
if (!Value)
return None;
switch (Value->getForm()) {
case dwarf::DW_FORM_ref1:
case dwarf::DW_FORM_ref2:
case dwarf::DW_FORM_ref4:
case dwarf::DW_FORM_ref8:
case dwarf::DW_FORM_ref_udata:
return Value->getRawUValue() + DIEOffsetBase;
default:
return Value->getAsSectionOffset();
}
}
bool AppleAcceleratorTable::dumpName(ScopedPrinter &W,
SmallVectorImpl<DWARFFormValue> &AtomForms,
uint64_t *DataOffset) const {
dwarf::FormParams FormParams = {Hdr.Version, 0, dwarf::DwarfFormat::DWARF32};
uint64_t NameOffset = *DataOffset;
if (!AccelSection.isValidOffsetForDataOfSize(*DataOffset, 4)) {
W.printString("Incorrectly terminated list.");
return false;
}
uint64_t StringOffset = AccelSection.getRelocatedValue(4, DataOffset);
if (!StringOffset)
return false; // End of list
DictScope NameScope(W, ("Name@0x" + Twine::utohexstr(NameOffset)).str());
W.startLine() << format("String: 0x%08" PRIx64, StringOffset);
W.getOStream() << " \"" << StringSection.getCStr(&StringOffset) << "\"\n";
unsigned NumData = AccelSection.getU32(DataOffset);
for (unsigned Data = 0; Data < NumData; ++Data) {
ListScope DataScope(W, ("Data " + Twine(Data)).str());
unsigned i = 0;
for (auto &Atom : AtomForms) {
W.startLine() << format("Atom[%d]: ", i);
if (Atom.extractValue(AccelSection, DataOffset, FormParams)) {
Atom.dump(W.getOStream());
if (Optional<uint64_t> Val = Atom.getAsUnsignedConstant()) {
StringRef Str = dwarf::AtomValueString(HdrData.Atoms[i].first, *Val);
if (!Str.empty())
W.getOStream() << " (" << Str << ")";
}
} else
W.getOStream() << "Error extracting the value";
W.getOStream() << "\n";
i++;
}
}
return true; // more entries follow
}
LLVM_DUMP_METHOD void AppleAcceleratorTable::dump(raw_ostream &OS) const {
if (!IsValid)
return;
ScopedPrinter W(OS);
Hdr.dump(W);
W.printNumber("DIE offset base", HdrData.DIEOffsetBase);
W.printNumber("Number of atoms", uint64_t(HdrData.Atoms.size()));
SmallVector<DWARFFormValue, 3> AtomForms;
{
ListScope AtomsScope(W, "Atoms");
unsigned i = 0;
for (const auto &Atom : HdrData.Atoms) {
DictScope AtomScope(W, ("Atom " + Twine(i++)).str());
W.startLine() << "Type: " << formatAtom(Atom.first) << '\n';
W.startLine() << "Form: " << formatv("{0}", Atom.second) << '\n';
AtomForms.push_back(DWARFFormValue(Atom.second));
}
}
// Now go through the actual tables and dump them.
uint64_t Offset = sizeof(Hdr) + Hdr.HeaderDataLength;
uint64_t HashesBase = Offset + Hdr.BucketCount * 4;
uint64_t OffsetsBase = HashesBase + Hdr.HashCount * 4;
for (unsigned Bucket = 0; Bucket < Hdr.BucketCount; ++Bucket) {
unsigned Index = AccelSection.getU32(&Offset);
ListScope BucketScope(W, ("Bucket " + Twine(Bucket)).str());
if (Index == UINT32_MAX) {
W.printString("EMPTY");
continue;
}
for (unsigned HashIdx = Index; HashIdx < Hdr.HashCount; ++HashIdx) {
uint64_t HashOffset = HashesBase + HashIdx*4;
uint64_t OffsetsOffset = OffsetsBase + HashIdx*4;
uint32_t Hash = AccelSection.getU32(&HashOffset);
if (Hash % Hdr.BucketCount != Bucket)
break;
uint64_t DataOffset = AccelSection.getU32(&OffsetsOffset);
ListScope HashScope(W, ("Hash 0x" + Twine::utohexstr(Hash)).str());
if (!AccelSection.isValidOffset(DataOffset)) {
W.printString("Invalid section offset");
continue;
}
while (dumpName(W, AtomForms, &DataOffset))
/*empty*/;
}
}
}
AppleAcceleratorTable::Entry::Entry(
const AppleAcceleratorTable::HeaderData &HdrData)
: HdrData(&HdrData) {
Values.reserve(HdrData.Atoms.size());
for (const auto &Atom : HdrData.Atoms)
Values.push_back(DWARFFormValue(Atom.second));
}
void AppleAcceleratorTable::Entry::extract(
const AppleAcceleratorTable &AccelTable, uint64_t *Offset) {
dwarf::FormParams FormParams = {AccelTable.Hdr.Version, 0,
dwarf::DwarfFormat::DWARF32};
for (auto &Atom : Values)
Atom.extractValue(AccelTable.AccelSection, Offset, FormParams);
}
Optional<DWARFFormValue>
AppleAcceleratorTable::Entry::lookup(HeaderData::AtomType Atom) const {
assert(HdrData && "Dereferencing end iterator?");
assert(HdrData->Atoms.size() == Values.size());
for (auto Tuple : zip_first(HdrData->Atoms, Values)) {
if (std::get<0>(Tuple).first == Atom)
return std::get<1>(Tuple);
}
return None;
}
Optional<uint64_t> AppleAcceleratorTable::Entry::getDIESectionOffset() const {
return HdrData->extractOffset(lookup(dwarf::DW_ATOM_die_offset));
}
Optional<uint64_t> AppleAcceleratorTable::Entry::getCUOffset() const {
return HdrData->extractOffset(lookup(dwarf::DW_ATOM_cu_offset));
}
Optional<dwarf::Tag> AppleAcceleratorTable::Entry::getTag() const {
Optional<DWARFFormValue> Tag = lookup(dwarf::DW_ATOM_die_tag);
if (!Tag)
return None;
if (Optional<uint64_t> Value = Tag->getAsUnsignedConstant())
return dwarf::Tag(*Value);
return None;
}
AppleAcceleratorTable::ValueIterator::ValueIterator(
const AppleAcceleratorTable &AccelTable, uint64_t Offset)
: AccelTable(&AccelTable), Current(AccelTable.HdrData), DataOffset(Offset) {
if (!AccelTable.AccelSection.isValidOffsetForDataOfSize(DataOffset, 4))
return;
// Read the first entry.
NumData = AccelTable.AccelSection.getU32(&DataOffset);
Next();
}
void AppleAcceleratorTable::ValueIterator::Next() {
assert(NumData > 0 && "attempted to increment iterator past the end");
auto &AccelSection = AccelTable->AccelSection;
if (Data >= NumData ||
!AccelSection.isValidOffsetForDataOfSize(DataOffset, 4)) {
NumData = 0;
DataOffset = 0;
return;
}
Current.extract(*AccelTable, &DataOffset);
++Data;
}
iterator_range<AppleAcceleratorTable::ValueIterator>
AppleAcceleratorTable::equal_range(StringRef Key) const {
if (!IsValid)
return make_range(ValueIterator(), ValueIterator());
// Find the bucket.
unsigned HashValue = djbHash(Key);
unsigned Bucket = HashValue % Hdr.BucketCount;
uint64_t BucketBase = sizeof(Hdr) + Hdr.HeaderDataLength;
uint64_t HashesBase = BucketBase + Hdr.BucketCount * 4;
uint64_t OffsetsBase = HashesBase + Hdr.HashCount * 4;
uint64_t BucketOffset = BucketBase + Bucket * 4;
unsigned Index = AccelSection.getU32(&BucketOffset);
// Search through all hashes in the bucket.
for (unsigned HashIdx = Index; HashIdx < Hdr.HashCount; ++HashIdx) {
uint64_t HashOffset = HashesBase + HashIdx * 4;
uint64_t OffsetsOffset = OffsetsBase + HashIdx * 4;
uint32_t Hash = AccelSection.getU32(&HashOffset);
if (Hash % Hdr.BucketCount != Bucket)
// We are already in the next bucket.
break;
uint64_t DataOffset = AccelSection.getU32(&OffsetsOffset);
uint64_t StringOffset = AccelSection.getRelocatedValue(4, &DataOffset);
if (!StringOffset)
break;
// Finally, compare the key.
if (Key == StringSection.getCStr(&StringOffset))
return make_range({*this, DataOffset}, ValueIterator());
}
return make_range(ValueIterator(), ValueIterator());
}
void DWARFDebugNames::Header::dump(ScopedPrinter &W) const {
DictScope HeaderScope(W, "Header");
W.printHex("Length", UnitLength);
W.printNumber("Version", Version);
W.printHex("Padding", Padding);
W.printNumber("CU count", CompUnitCount);
W.printNumber("Local TU count", LocalTypeUnitCount);
W.printNumber("Foreign TU count", ForeignTypeUnitCount);
W.printNumber("Bucket count", BucketCount);
W.printNumber("Name count", NameCount);
W.printHex("Abbreviations table size", AbbrevTableSize);
W.startLine() << "Augmentation: '" << AugmentationString << "'\n";
}
Error DWARFDebugNames::Header::extract(const DWARFDataExtractor &AS,
uint64_t *Offset) {
// Check that we can read the fixed-size part.
if (!AS.isValidOffset(*Offset + sizeof(HeaderPOD) - 1))
return createStringError(errc::illegal_byte_sequence,
"Section too small: cannot read header.");
UnitLength = AS.getU32(Offset);
Version = AS.getU16(Offset);
Padding = AS.getU16(Offset);
CompUnitCount = AS.getU32(Offset);
LocalTypeUnitCount = AS.getU32(Offset);
ForeignTypeUnitCount = AS.getU32(Offset);
BucketCount = AS.getU32(Offset);
NameCount = AS.getU32(Offset);
AbbrevTableSize = AS.getU32(Offset);
AugmentationStringSize = alignTo(AS.getU32(Offset), 4);
if (!AS.isValidOffsetForDataOfSize(*Offset, AugmentationStringSize))
return createStringError(
errc::illegal_byte_sequence,
"Section too small: cannot read header augmentation.");
AugmentationString.resize(AugmentationStringSize);
AS.getU8(Offset, reinterpret_cast<uint8_t *>(AugmentationString.data()),
AugmentationStringSize);
return Error::success();
}
void DWARFDebugNames::Abbrev::dump(ScopedPrinter &W) const {
DictScope AbbrevScope(W, ("Abbreviation 0x" + Twine::utohexstr(Code)).str());
W.startLine() << formatv("Tag: {0}\n", Tag);
for (const auto &Attr : Attributes)
W.startLine() << formatv("{0}: {1}\n", Attr.Index, Attr.Form);
}
static constexpr DWARFDebugNames::AttributeEncoding sentinelAttrEnc() {
return {dwarf::Index(0), dwarf::Form(0)};
}
static bool isSentinel(const DWARFDebugNames::AttributeEncoding &AE) {
return AE == sentinelAttrEnc();
}
static DWARFDebugNames::Abbrev sentinelAbbrev() {
return DWARFDebugNames::Abbrev(0, dwarf::Tag(0), {});
}
static bool isSentinel(const DWARFDebugNames::Abbrev &Abbr) {
return Abbr.Code == 0;
}
DWARFDebugNames::Abbrev DWARFDebugNames::AbbrevMapInfo::getEmptyKey() {
return sentinelAbbrev();
}
DWARFDebugNames::Abbrev DWARFDebugNames::AbbrevMapInfo::getTombstoneKey() {
return DWARFDebugNames::Abbrev(~0, dwarf::Tag(0), {});
}
Expected<DWARFDebugNames::AttributeEncoding>
DWARFDebugNames::NameIndex::extractAttributeEncoding(uint64_t *Offset) {
if (*Offset >= EntriesBase) {
return createStringError(errc::illegal_byte_sequence,
"Incorrectly terminated abbreviation table.");
}
uint32_t Index = Section.AccelSection.getULEB128(Offset);
uint32_t Form = Section.AccelSection.getULEB128(Offset);
return AttributeEncoding(dwarf::Index(Index), dwarf::Form(Form));
}
Expected<std::vector<DWARFDebugNames::AttributeEncoding>>
DWARFDebugNames::NameIndex::extractAttributeEncodings(uint64_t *Offset) {
std::vector<AttributeEncoding> Result;
for (;;) {
auto AttrEncOr = extractAttributeEncoding(Offset);
if (!AttrEncOr)
return AttrEncOr.takeError();
if (isSentinel(*AttrEncOr))
return std::move(Result);
Result.emplace_back(*AttrEncOr);
}
}
Expected<DWARFDebugNames::Abbrev>
DWARFDebugNames::NameIndex::extractAbbrev(uint64_t *Offset) {
if (*Offset >= EntriesBase) {
return createStringError(errc::illegal_byte_sequence,
"Incorrectly terminated abbreviation table.");
}
uint32_t Code = Section.AccelSection.getULEB128(Offset);
if (Code == 0)
return sentinelAbbrev();
uint32_t Tag = Section.AccelSection.getULEB128(Offset);
auto AttrEncOr = extractAttributeEncodings(Offset);
if (!AttrEncOr)
return AttrEncOr.takeError();
return Abbrev(Code, dwarf::Tag(Tag), std::move(*AttrEncOr));
}
Error DWARFDebugNames::NameIndex::extract() {
const DWARFDataExtractor &AS = Section.AccelSection;
uint64_t Offset = Base;
if (Error E = Hdr.extract(AS, &Offset))
return E;
CUsBase = Offset;
Offset += Hdr.CompUnitCount * 4;
Offset += Hdr.LocalTypeUnitCount * 4;
Offset += Hdr.ForeignTypeUnitCount * 8;
BucketsBase = Offset;
Offset += Hdr.BucketCount * 4;
HashesBase = Offset;
if (Hdr.BucketCount > 0)
Offset += Hdr.NameCount * 4;
StringOffsetsBase = Offset;
Offset += Hdr.NameCount * 4;
EntryOffsetsBase = Offset;
Offset += Hdr.NameCount * 4;
if (!AS.isValidOffsetForDataOfSize(Offset, Hdr.AbbrevTableSize))
return createStringError(errc::illegal_byte_sequence,
"Section too small: cannot read abbreviations.");
EntriesBase = Offset + Hdr.AbbrevTableSize;
for (;;) {
auto AbbrevOr = extractAbbrev(&Offset);
if (!AbbrevOr)
return AbbrevOr.takeError();
if (isSentinel(*AbbrevOr))
return Error::success();
if (!Abbrevs.insert(std::move(*AbbrevOr)).second)
return createStringError(errc::invalid_argument,
"Duplicate abbreviation code.");
}
}
DWARFDebugNames::Entry::Entry(const NameIndex &NameIdx, const Abbrev &Abbr)
: NameIdx(&NameIdx), Abbr(&Abbr) {
// This merely creates form values. It is up to the caller
// (NameIndex::getEntry) to populate them.
Values.reserve(Abbr.Attributes.size());
for (const auto &Attr : Abbr.Attributes)
Values.emplace_back(Attr.Form);
}
Optional<DWARFFormValue>
DWARFDebugNames::Entry::lookup(dwarf::Index Index) const {
assert(Abbr->Attributes.size() == Values.size());
for (auto Tuple : zip_first(Abbr->Attributes, Values)) {
if (std::get<0>(Tuple).Index == Index)
return std::get<1>(Tuple);
}
return None;
}
Optional<uint64_t> DWARFDebugNames::Entry::getDIEUnitOffset() const {
if (Optional<DWARFFormValue> Off = lookup(dwarf::DW_IDX_die_offset))
return Off->getAsReferenceUVal();
return None;
}
Optional<uint64_t> DWARFDebugNames::Entry::getCUIndex() const {
if (Optional<DWARFFormValue> Off = lookup(dwarf::DW_IDX_compile_unit))
return Off->getAsUnsignedConstant();
// In a per-CU index, the entries without a DW_IDX_compile_unit attribute
// implicitly refer to the single CU.
if (NameIdx->getCUCount() == 1)
return 0;
return None;
}
Optional<uint64_t> DWARFDebugNames::Entry::getCUOffset() const {
Optional<uint64_t> Index = getCUIndex();
if (!Index || *Index >= NameIdx->getCUCount())
return None;
return NameIdx->getCUOffset(*Index);
}
void DWARFDebugNames::Entry::dump(ScopedPrinter &W) const {
W.printHex("Abbrev", Abbr->Code);
W.startLine() << formatv("Tag: {0}\n", Abbr->Tag);
assert(Abbr->Attributes.size() == Values.size());
for (auto Tuple : zip_first(Abbr->Attributes, Values)) {
W.startLine() << formatv("{0}: ", std::get<0>(Tuple).Index);
std::get<1>(Tuple).dump(W.getOStream());
W.getOStream() << '\n';
}
}
char DWARFDebugNames::SentinelError::ID;
std::error_code DWARFDebugNames::SentinelError::convertToErrorCode() const {
return inconvertibleErrorCode();
}
uint64_t DWARFDebugNames::NameIndex::getCUOffset(uint32_t CU) const {
assert(CU < Hdr.CompUnitCount);
uint64_t Offset = CUsBase + 4 * CU;
return Section.AccelSection.getRelocatedValue(4, &Offset);
}
uint64_t DWARFDebugNames::NameIndex::getLocalTUOffset(uint32_t TU) const {
assert(TU < Hdr.LocalTypeUnitCount);
uint64_t Offset = CUsBase + 4 * (Hdr.CompUnitCount + TU);
return Section.AccelSection.getRelocatedValue(4, &Offset);
}
uint64_t DWARFDebugNames::NameIndex::getForeignTUSignature(uint32_t TU) const {
assert(TU < Hdr.ForeignTypeUnitCount);
uint64_t Offset =
CUsBase + 4 * (Hdr.CompUnitCount + Hdr.LocalTypeUnitCount) + 8 * TU;
return Section.AccelSection.getU64(&Offset);
}
Expected<DWARFDebugNames::Entry>
DWARFDebugNames::NameIndex::getEntry(uint64_t *Offset) const {
const DWARFDataExtractor &AS = Section.AccelSection;
if (!AS.isValidOffset(*Offset))
return createStringError(errc::illegal_byte_sequence,
"Incorrectly terminated entry list.");
uint32_t AbbrevCode = AS.getULEB128(Offset);
if (AbbrevCode == 0)
return make_error<SentinelError>();
const auto AbbrevIt = Abbrevs.find_as(AbbrevCode);
if (AbbrevIt == Abbrevs.end())
return createStringError(errc::invalid_argument, "Invalid abbreviation.");
Entry E(*this, *AbbrevIt);
dwarf::FormParams FormParams = {Hdr.Version, 0, dwarf::DwarfFormat::DWARF32};
for (auto &Value : E.Values) {
if (!Value.extractValue(AS, Offset, FormParams))
return createStringError(errc::io_error,
"Error extracting index attribute values.");
}
return std::move(E);
}
DWARFDebugNames::NameTableEntry
DWARFDebugNames::NameIndex::getNameTableEntry(uint32_t Index) const {
assert(0 < Index && Index <= Hdr.NameCount);
uint64_t StringOffsetOffset = StringOffsetsBase + 4 * (Index - 1);
uint64_t EntryOffsetOffset = EntryOffsetsBase + 4 * (Index - 1);
const DWARFDataExtractor &AS = Section.AccelSection;
uint64_t StringOffset = AS.getRelocatedValue(4, &StringOffsetOffset);
uint64_t EntryOffset = AS.getU32(&EntryOffsetOffset);
EntryOffset += EntriesBase;
return {Section.StringSection, Index, StringOffset, EntryOffset};
}
uint32_t
DWARFDebugNames::NameIndex::getBucketArrayEntry(uint32_t Bucket) const {
assert(Bucket < Hdr.BucketCount);
uint64_t BucketOffset = BucketsBase + 4 * Bucket;
return Section.AccelSection.getU32(&BucketOffset);
}
uint32_t DWARFDebugNames::NameIndex::getHashArrayEntry(uint32_t Index) const {
assert(0 < Index && Index <= Hdr.NameCount);
uint64_t HashOffset = HashesBase + 4 * (Index - 1);
return Section.AccelSection.getU32(&HashOffset);
}
// Returns true if we should continue scanning for entries, false if this is the
// last (sentinel) entry). In case of a parsing error we also return false, as
// it's not possible to recover this entry list (but the other lists may still
// parse OK).
bool DWARFDebugNames::NameIndex::dumpEntry(ScopedPrinter &W,
uint64_t *Offset) const {
uint64_t EntryId = *Offset;
auto EntryOr = getEntry(Offset);
if (!EntryOr) {
handleAllErrors(EntryOr.takeError(), [](const SentinelError &) {},
[&W](const ErrorInfoBase &EI) { EI.log(W.startLine()); });
return false;
}
DictScope EntryScope(W, ("Entry @ 0x" + Twine::utohexstr(EntryId)).str());
EntryOr->dump(W);
return true;
}
void DWARFDebugNames::NameIndex::dumpName(ScopedPrinter &W,
const NameTableEntry &NTE,
Optional<uint32_t> Hash) const {
DictScope NameScope(W, ("Name " + Twine(NTE.getIndex())).str());
if (Hash)
W.printHex("Hash", *Hash);
W.startLine() << format("String: 0x%08" PRIx64, NTE.getStringOffset());
W.getOStream() << " \"" << NTE.getString() << "\"\n";
uint64_t EntryOffset = NTE.getEntryOffset();
while (dumpEntry(W, &EntryOffset))
/*empty*/;
}
void DWARFDebugNames::NameIndex::dumpCUs(ScopedPrinter &W) const {
ListScope CUScope(W, "Compilation Unit offsets");
for (uint32_t CU = 0; CU < Hdr.CompUnitCount; ++CU)
W.startLine() << format("CU[%u]: 0x%08" PRIx64 "\n", CU, getCUOffset(CU));
}
void DWARFDebugNames::NameIndex::dumpLocalTUs(ScopedPrinter &W) const {
if (Hdr.LocalTypeUnitCount == 0)
return;
ListScope TUScope(W, "Local Type Unit offsets");
for (uint32_t TU = 0; TU < Hdr.LocalTypeUnitCount; ++TU)
W.startLine() << format("LocalTU[%u]: 0x%08" PRIx64 "\n", TU,
getLocalTUOffset(TU));
}
void DWARFDebugNames::NameIndex::dumpForeignTUs(ScopedPrinter &W) const {
if (Hdr.ForeignTypeUnitCount == 0)
return;
ListScope TUScope(W, "Foreign Type Unit signatures");
for (uint32_t TU = 0; TU < Hdr.ForeignTypeUnitCount; ++TU) {
W.startLine() << format("ForeignTU[%u]: 0x%016" PRIx64 "\n", TU,
getForeignTUSignature(TU));
}
}
void DWARFDebugNames::NameIndex::dumpAbbreviations(ScopedPrinter &W) const {
ListScope AbbrevsScope(W, "Abbreviations");
for (const auto &Abbr : Abbrevs)
Abbr.dump(W);
}
void DWARFDebugNames::NameIndex::dumpBucket(ScopedPrinter &W,
uint32_t Bucket) const {
ListScope BucketScope(W, ("Bucket " + Twine(Bucket)).str());
uint32_t Index = getBucketArrayEntry(Bucket);
if (Index == 0) {
W.printString("EMPTY");
return;
}
if (Index > Hdr.NameCount) {
W.printString("Name index is invalid");
return;
}
for (; Index <= Hdr.NameCount; ++Index) {
uint32_t Hash = getHashArrayEntry(Index);
if (Hash % Hdr.BucketCount != Bucket)
break;
dumpName(W, getNameTableEntry(Index), Hash);
}
}
LLVM_DUMP_METHOD void DWARFDebugNames::NameIndex::dump(ScopedPrinter &W) const {
DictScope UnitScope(W, ("Name Index @ 0x" + Twine::utohexstr(Base)).str());
Hdr.dump(W);
dumpCUs(W);
dumpLocalTUs(W);
dumpForeignTUs(W);
dumpAbbreviations(W);
if (Hdr.BucketCount > 0) {
for (uint32_t Bucket = 0; Bucket < Hdr.BucketCount; ++Bucket)
dumpBucket(W, Bucket);
return;
}
W.startLine() << "Hash table not present\n";
for (NameTableEntry NTE : *this)
dumpName(W, NTE, None);
}
Error DWARFDebugNames::extract() {
uint64_t Offset = 0;
while (AccelSection.isValidOffset(Offset)) {
NameIndex Next(*this, Offset);
if (Error E = Next.extract())
return E;
Offset = Next.getNextUnitOffset();
NameIndices.push_back(std::move(Next));
}
return Error::success();
}
iterator_range<DWARFDebugNames::ValueIterator>
DWARFDebugNames::NameIndex::equal_range(StringRef Key) const {
return make_range(ValueIterator(*this, Key), ValueIterator());
}
LLVM_DUMP_METHOD void DWARFDebugNames::dump(raw_ostream &OS) const {
ScopedPrinter W(OS);
for (const NameIndex &NI : NameIndices)
NI.dump(W);
}
Optional<uint64_t>
DWARFDebugNames::ValueIterator::findEntryOffsetInCurrentIndex() {
const Header &Hdr = CurrentIndex->Hdr;
if (Hdr.BucketCount == 0) {
// No Hash Table, We need to search through all names in the Name Index.
for (NameTableEntry NTE : *CurrentIndex) {
if (NTE.getString() == Key)
return NTE.getEntryOffset();
}
return None;
}
// The Name Index has a Hash Table, so use that to speed up the search.
// Compute the Key Hash, if it has not been done already.
if (!Hash)
Hash = caseFoldingDjbHash(Key);
uint32_t Bucket = *Hash % Hdr.BucketCount;
uint32_t Index = CurrentIndex->getBucketArrayEntry(Bucket);
if (Index == 0)
return None; // Empty bucket
for (; Index <= Hdr.NameCount; ++Index) {
uint32_t Hash = CurrentIndex->getHashArrayEntry(Index);
if (Hash % Hdr.BucketCount != Bucket)
return None; // End of bucket
NameTableEntry NTE = CurrentIndex->getNameTableEntry(Index);
if (NTE.getString() == Key)
return NTE.getEntryOffset();
}
return None;
}
bool DWARFDebugNames::ValueIterator::getEntryAtCurrentOffset() {
auto EntryOr = CurrentIndex->getEntry(&DataOffset);
if (!EntryOr) {
consumeError(EntryOr.takeError());
return false;
}
CurrentEntry = std::move(*EntryOr);
return true;
}
bool DWARFDebugNames::ValueIterator::findInCurrentIndex() {
Optional<uint64_t> Offset = findEntryOffsetInCurrentIndex();
if (!Offset)
return false;
DataOffset = *Offset;
return getEntryAtCurrentOffset();
}
void DWARFDebugNames::ValueIterator::searchFromStartOfCurrentIndex() {
for (const NameIndex *End = CurrentIndex->Section.NameIndices.end();
CurrentIndex != End; ++CurrentIndex) {
if (findInCurrentIndex())
return;
}
setEnd();
}
void DWARFDebugNames::ValueIterator::next() {
assert(CurrentIndex && "Incrementing an end() iterator?");
// First try the next entry in the current Index.
if (getEntryAtCurrentOffset())
return;
// If we're a local iterator or we have reached the last Index, we're done.
if (IsLocal || CurrentIndex == &CurrentIndex->Section.NameIndices.back()) {
setEnd();
return;
}
// Otherwise, try the next index.
++CurrentIndex;
searchFromStartOfCurrentIndex();
}
DWARFDebugNames::ValueIterator::ValueIterator(const DWARFDebugNames &AccelTable,
StringRef Key)
: CurrentIndex(AccelTable.NameIndices.begin()), IsLocal(false), Key(Key) {
searchFromStartOfCurrentIndex();
}
DWARFDebugNames::ValueIterator::ValueIterator(
const DWARFDebugNames::NameIndex &NI, StringRef Key)
: CurrentIndex(&NI), IsLocal(true), Key(Key) {
if (!findInCurrentIndex())
setEnd();
}
iterator_range<DWARFDebugNames::ValueIterator>
DWARFDebugNames::equal_range(StringRef Key) const {
if (NameIndices.empty())
return make_range(ValueIterator(), ValueIterator());
return make_range(ValueIterator(*this, Key), ValueIterator());
}
const DWARFDebugNames::NameIndex *
DWARFDebugNames::getCUNameIndex(uint64_t CUOffset) {
if (CUToNameIndex.size() == 0 && NameIndices.size() > 0) {
for (const auto &NI : *this) {
for (uint32_t CU = 0; CU < NI.getCUCount(); ++CU)
CUToNameIndex.try_emplace(NI.getCUOffset(CU), &NI);
}
}
return CUToNameIndex.lookup(CUOffset);
}
```
|
Dalia Reyes Barrios (born 22 September 1957), also known as Dalia Cordero Casal, is a Venezuelan architect, art collector, philanthropist and socialite. Dalia is co-founder of two art institutions: the Acarigua Araure Art Museum (1987) and the Venezuelan American Endowment for the Arts (VAEA) in New York (1990). Between 1980 and 1994, she was also president of Fundación Juvenil Venezolana. Dalia has been photographed by Edward Mapplehtorpe, Andy Warhol, Arnold Newman, Margarita Scannone and Memo Vogeler, among others.
She was married to businessman Ali Cordero Casal; the couple had three daughters during their marriage. She and her ex-husband, Cordero Casal, have been included in Art & Auction magazine's most important art collectors.
References
1957 births
Living people
People from Maracaibo
Venezuelan art collectors
Venezuelan female models
Venezuelan women in business
Socialites
|
Sicuani District is one of eight districts of the province Canchis in Peru.
Geography
The most important river is the Willkanuta which crosses the district from southeast to northwest.
Some of the highest mountains of the district are listed below:
Climate
See also
Saqaqaniqucha
References
|
Markus Rackl (born 3 March 1969) is a former professional tennis player from Germany.
Biography
A left-handed player from Traunstein, Rackl played professionally in the late 1980s and early 1990s. His best performance on tour came when he made the semi-finals of the Madrid Tennis Grand Prix in 1988, with wins over Marcelo Ingaramo, Edoardo Mazza and Sergio Casal. In 1988 he was also a quarter-finalist at the Athens Open after beating top seed Tore Meinecke and won a Challenger title in Montabaur. He won one further Challenger event, in Salzburg in 1991. As a coach he has worked with Alexander Satschko.
Challenger titles
Singles: (2)
References
External links
1969 births
Living people
German male tennis players
West German male tennis players
People from Traunstein
Sportspeople from Upper Bavaria
Tennis people from Bavaria
|
```ruby
#
# We have a simple top-level route equivalent to `/slug`. Because of this,
# we want to verify that newly created records don't overlap with a previously-
# defined `slug` -- in other words, slug values should be unique across all
# relevant models. Except also, models might use "username" instead of "slug".
#
# "Slug-like" models are all included in a cross-model-uniqueness check. An
# impacted models are checked for the existence of a record matching a given
# value. Additionally, we have some special cases (eg, sitemap) that we want to
# apply across all registered models.
#
class CrossModelSlug
MODELS = {
"User" => :username,
"Page" => :slug,
"Podcast" => :slug,
"Organization" => :slug
}.freeze
class << self
def exists?(value)
# Presence check is likely redundant, but is **much** cheaper than the
# cross-model check
return false if value.blank?
value = value.downcase
return true if value.include?("sitemap-") # path_to_url
MODELS.detect do |class_name, attribute|
class_name.constantize.exists?({ attribute => value })
end
end
end
end
```
|
```smalltalk
// This file is part of Core WF which is licensed under the MIT license.
// See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using System.Linq;
namespace System.Activities.XamlIntegration;
public class TextExpressionCompilerResults
{
private readonly List<TextExpressionCompilerError> _messages = new();
public Type ResultType { get; set; }
public bool HasErrors => _messages.Any(m => !m.IsWarning);
public IReadOnlyCollection<TextExpressionCompilerError> CompilerMessages => _messages;
public void AddMessages(IEnumerable<TextExpressionCompilerError> messages)
{
_messages.AddRange(messages);
}
public override string ToString()
{
return string.Join("\n", _messages.OrderBy(m => m.IsWarning));
}
}
```
|
Richard Brook was Chief Executive of the UK deafblind charity Sense, The National Deafblind and Rubella Association. He was appointed in July 2008 and left in September 2010. Prior to this he was Chief Executive of the Public Guardianship Office and then first Public Guardian and Chief Executive of the Office of the Public Guardian when this was established on 1 October 2007, until July 2008. He was previously the Chief Executive of Mind, the mental health charity, and has many years experience in the public and not-for-profit sectors.
References
External links
http://www.sense.org.uk
http://www.publicguardian.gov.uk
English chief executives
Year of birth missing (living people)
Living people
Place of birth missing (living people)
|
Unnikrishnan Mukundan Nair (born 22 September 1987) is an Indian actor, producer, singer, lyricist and social issues responder who predominantly works in Malayalam cinema. He has also acted in a few Telugu and Tamil films. In 2021, he won his first national award as a producer for his production debut film, Meppadiyan, which won the national award for the best film of a debut director.
Unni Mukundan made his acting debut with the Tamil film Seedan (2011), a remake of Nandanam (2002). At the age of 23, after playing several small roles, Unni got his breakthrough with his lead role in Vysakh's action comedy Mallu Singh (2012). Later, he went on to star in several Malayalam films including commercially successful films like Vikramadithyan (2014), KL 10 Patthu (2015), Style (2016), Oru Murai Vanthu Parthaya (2016), Achayans (2017) and Malikappuram (2022). He made his Telugu film debut with the 2016 film Janatha Garage.
Unni Mukundan made his debut as a lyricist and singer with Achayans. He has also sponsored road safety measures by appearing in the motor vehicle department's advertisements.
Early life
Unni Mukundan was born on 22 September 1987 to Malayali parents Madathiparambil Mukundan Nair and Roji Mukundan. He completed his school from Pragati Higher Secondary School at Ahmedabad. He is graduated in English Literature and Journalism from Prajyoti Niketan College, Pudukad.(Thrissur). He was brought up in Ahmedabad, Gujarat. In his early days, he used to work with Motif, now known as TTEC. His ambition was to join the Indian Army before coming to the film industry.
Career
Debut and initial success (2011–2013)
In 2011, Unni made his film debut in Tamil film Seedan, a remake of the Malayalam film Nandanam. Unni entered the Malayalam film industry through Bombay March 12 alongside Mammootty, directed by Babu Janardhanan. For his performance in Bombay March 12, he was earned awards as best newcomer from SIIMA, Asianet Film Awards, Asiavision, Jaihind TV, Amrita TV and Vanitha Film Awards. He played a supporting role in Thalsamayam Oru Penkutty, directed by T. K. Rajeev Kumar.
Unni got his turning point from the movie Mallu Singh (2012) directed by Vyshakh. The movie became a huge hit and ran over 100 days. He did cameo appearances in movies Theevram and The Hitlist. In the same year, he appeared in Ezham Suryan and I love Me directed by B. Unnikrishnan. His action sequences where well acclaimed by the audience.
In 2013 he appeared in Ithu Pathiramanal and Orissa, both directed by M. Padmakumar. Also he was seen in D Company an anthology of three independently shot action films.
Breakthrough (2014–present)
In 2014, he appeared in The Last Supper directed by Vinil turned out to be a flop. But in the same year, he made a comeback by playing one of the titular role along with Dulquer Salmaan in hit movie Vikramadithyan directed by Lal Jose.
In 2015, he was seen in supporting role in the Mammootty starrer Fireman directed by Deepu Karunakaran. Same year, he played the lead role in the movie Samrajyam II: Son of Alexander as Jordan, the son of Alexander who was the protagonist in the prequel. He next release was KL 10 Patthu written and directed by debutant Muhsin Parari.
In 2016, he did action thriller movie Style which turned out to be a decent commercial entertainer. He was then seen in critically acclaimed movie Kaattum Mazhayum and fantasy romantic comedy film Oru Murai Vanthu Parthaya. He made his Tollywood debut with the film Janatha Garage in an antagonistic role as Raghava, son of Sathyam (Mohanlal). The film was both commercial success and critically acclaimed. It was the highest grossing Telugu films of the year.
In 2017 film Achayans, he made his debut as a lyricist and singer. He played one of the lead role along with Jayaram and Adil Ibrahim in the movie and it turned out to be a commercial success. In the same year, he was seen in another multi hero movie Avarude Raavukal along with Asif Ali which received mixed reviews. In August of the same year Clint with director Harikumar was released, in which he played the role of Joseph, father of Edmund Thomas Clint, a child prodigy known for having drawn over 25,000 paintings during his short life of seven years. He was seen in two different looks as a 35-year old and a 73-year-old man in the film. For this film he received Ramu Kariat Movie Award for the Best Actor. His release of 2017 was Mammootty starrer Masterpiece in which he played the villain role and Tharangam in which he played an extended cameo.
In 2018, he did Tamil-Telugu Bilingual film Bhaagamathie along with Anuskha Shetty which turned out to be both commercial success and critically acclaimed. His next releases were two thriller movies Ira and Chanakyathanthram. Both the films received positive reviews and was commercially successful.
His first release of 2019 was Haneef Adeni's Mikhael, in which he portrayed the role of antagonist Marco Jr. He was seen in the film Meppadiyan which had a theatrical release on January 14, 2022. Later, he was seen in the Telugu film Khiladi. His next appearance was in Malikappuram which earned him critical acclaim and praise.
Production
Unni Mukundan launched his film production company Unni Mukundan Films (UMF) on 17 August 2020.
Filmography
Malayalam
Other language films
Television
Discography
Awards
References
External links
Living people
Male actors from Kerala
Male actors in Telugu cinema
Male actors in Malayalam cinema
Indian male film actors
Male actors in Tamil cinema
1987 births
21st-century Indian male actors
South Indian International Movie Awards winners
Male actors from Thrissur
|
```javascript
export default {};
//# sourceMappingURL=ExpoSecureStore.web.js.map
```
|
Julien Stevens (born 25 February 1943) is a retired Belgian cyclist who raced from 1963 to 1977. Stevens spent most part of his career employed to help other riders, such as Rik Van Steenbergen, Rik Van Looy and Eddy Merckx. In 1969, at the road world championship in Zolder he got clear with Dutchman Harm Ottenbros but lost the sprint.
Stevens was also active in track cycling, where he was Belgian national champion in many competitions.
Major results
1966
1st Stage 5 Volta a Catalunya
1968
1st Road Race, Belgian National Road Race Championships
1st Individual Pursuit, Belgian National Track Cycling Championships
1st Grand Prix Pino Cerami
1969
1st Stage 8 Tour de Suisse
1st Stage 2 Tour de France
2nd Road race, UCI Road World Championships
1972
1st Six Days of Ghent (with Patrick Sercu)
1st Six days of Montréal
1973
1st Omnium, Belgian National Track Cycling Championships
1st Team Pursuit, Belgian National Track Cycling Championships
1974
1st Six Days of Ghent (with Graeme Gilmore)
1st Stage 5a Tour of Belgium
1975
1st stage 19 Vuelta a España
1976
1st Half Fond, Belgian National Track Cycling Championships
External links
Belgian male cyclists
Belgian track cyclists
Belgian Tour de France stage winners
Belgian Vuelta a España stage winners
1943 births
Living people
Sportspeople from Mechelen
Cyclists from Antwerp Province
Tour de Suisse stage winners
|
Hamilton High School is a public high school in Lisbon, Wisconsin that serves multiple southeastern Wisconsin communities. Hamilton High School is part of the Hamilton School District.
It serves all of and Butler, most of Lannon and Sussex, parts of Lisbon and Menomonee Falls, and a small part of Pewaukee.
History
The school was completed in 1962. It was named for Alexander Hamilton, a signer of the Constitution. It opened for freshman and sophomores assigned to the new high school from surrounding areas such as Pewaukee, Hartland, Merton, Germantown, Menomonee Falls, Brookfield, Wauwatosa, Butler, and Waukesha. A class was added each year until the first senior class graduated in 1965.
In 1970, new classrooms were added; in 1996, a science wing was added; in 2004, the 35,000-square-foot Hamilton Fine Arts Center was added. In 2006, a federal grant funded a fitness center with over 35 machines. In 2008, the gym was redone with new bleachers, and the floor was refurbished. In 2012, a video scoreboard was added. In 2014 an indoor training facility was finished, and in 2016, a wing was added to relocate the history classrooms and reorganize the rest of the classrooms.
Fine Arts Center
The Hamilton Fine Arts Center seats 750 people. It contains a full-fly stage, orchestra pit for live musical accompaniment, ticket booth, dressing rooms, new music rooms, costume-prop storage, control booth area, and art display area.
Curriculum
Hamilton High School offers honors classes and AP courses. Many departments also have connections with area businesses, providing students the opportunity to participate in co-operative learning experiences. For credit-deficient students, the P.A.S.S. and G.A.P. individualized course programs are offered. The school is accredited by AdvancED.
Graphic arts
Students can work with screen printing and offset printing. The graphics lab has two single-color offset presses, one digital two-color press, two darkrooms, a camera, a straight to film printer, and a guillotine paper cutter.
Extracurricular activities
FIRST Robotics
Hamilton's FIRST Robotics Competition team is known as "Charger Robotics" and "Team 537". Team 537 is composed of four component design teams. The mechanical team builds the mechanical pieces of the robot, such as the chassis and drive train, The electrical team wires the electrical parts together, and the code team programs the internal computer that interprets the signals from the controller. The marketing team raises funds and performs publicity activities. The course team builds the full-size course used at the annual mini-regional, and the animation team designs and creates the team animation, the topic of which is released at the same time as the robot task. Sponsors include Rockwell Automation and GE.
Team 537 won the St. Louis Regional in 2004 and 2017, the Motorola Regional in 2005, and the Milwaukee Regional in 2006. The team mentors four local middle school FIRST LEGO League teams. They have won the Regional Chairman's Award six times (in 2010, 2012, 2013, 2015, 2016, and 2017), and the Engineering Inspiration Award in 2011.
Instrumental music
The Hamilton High School band program consists of a wind symphony (primarily juniors/seniors), a symphonic band (primarily freshmen/sophomores), two jazz bands, a competitive marching band, and a pep band. The symphonic and concert bands rehearse daily and perform throughout the year. The marching band practices during the summer until the end of the marching season (typically mid to late October), and has taken third place in their division at state in 2014, 2015 and 2018, and second in 2019. They also participated in the 2019 London New Year’s Day parade. Jazz Band 1 performs publicly at local parties, meetings, and other events. There are also guitar classes and piano classes.
Choral music
The Hamilton High School choir program consists of a concert choir (juniors/seniors), a cantabile choir (freshmen/sophomores), an a cappella choir, and a competitive show choir, Synergy. The concert and cantabile choirs rehearse daily and perform throughout the year. The a cappella choir also practices daily, and performs at locations around Sussex and Milwaukee, especially over the holiday season. Synergy Show Choir holds auditions in May for the following school year, and has a choreography camp at the end of July. It competes throughout the state. The choir program has expanded from a single, 30-member all female ensemble to four mixed choirs, all performing music of varying degrees of difficulty and style. They participated with the band in the London New Year’s Day parade.
Athletics
In 2007, the basketball team lost in the sectional round of the state playoffs. They made the state finals in 2018 but lost to Oshkosh North. In 2008, the football team won three playoff games, losing in the state semifinal round. In 2011 the football team was the conference champion and made it into the third round of the state playoffs in Division One.
The boys' and girls' basketball programs were both GMC conference champions in the 2012-13 season. The girls' bowling team was the district VII conference champion and placed third at state. Cheerleaders won the state championship 2019 and were WACPC state runners-up 2018. In 2010 the girls' track and field team placed second in the 4x100 relay. In 2011 it won state in the 4x200 meter relay and the 4x400 meter relay. In 2012 it placed fourth in the 4x400 meter relay, and second in the 4x200 meter relay at the state meet.
Clubs
The academic decathlon is a team competition in which students match their intellects with students from other schools. Charger Television explores filmmaking, video and audio production, animation, and broadcast journalism. The Cultural Exchange Club promotes awareness and understanding of other people and cultures by supporting exchange students. DECA is a marketing and business organization for students. Foreign language clubs offered at Hamilton include Spanish, French, and German, and students learn about the different cultures and go on field trips to learn more about and participate in them. Other clubs are yearbook, art, book group, chess, drama, student council, forensics, graphic arts, photo, show choir, and project caring. Some physically active clubs include intramural basketball, weightlifting, trap shooting club, and ski and snowboard club.
References
External links
Robotics
Athletics
Cross Country Profile on Athletic.net
Public high schools in Wisconsin
Greater Metro Conference
Schools in Waukesha County, Wisconsin
Educational institutions established in 1962
|
Uthamapalayam is a town in Tamil Nadu, India.
Uthamapalayam may also refer to:
Uthamapalayam block
Uthamapalayam taluk
Uthamapalayam division
See also
Uthaman (disambiguation)
Palayam (disambiguation)
|
```php
<?php
namespace Stringy;
class StaticStringy
{
/**
* Returns an array consisting of the characters in the string.
*
* @param string $str String for which to return the chars
* @param string $encoding The character encoding
* @return array An array of string chars
*/
public static function chars($str, $encoding = null)
{
return Stringy::create($str, $encoding)->chars();
}
/**
* Converts the first character of the supplied string to upper case.
*
* @param string $str String to modify
* @param string $encoding The character encoding
* @return string String with the first character being upper case
*/
public static function upperCaseFirst($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->upperCaseFirst();
}
/**
* Converts the first character of the supplied string to lower case.
*
* @param string $str String to modify
* @param string $encoding The character encoding
* @return string String with the first character being lower case
*/
public static function lowerCaseFirst($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->lowerCaseFirst();
}
/**
* Returns a camelCase version of the string. Trims surrounding spaces,
* capitalizes letters following digits, spaces, dashes and underscores,
* and removes spaces, dashes, as well as underscores.
*
* @param string $str String to convert to camelCase
* @param string $encoding The character encoding
* @return string String in camelCase
*/
public static function camelize($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->camelize();
}
/**
* Returns an UpperCamelCase version of the supplied string. It trims
* surrounding spaces, capitalizes letters following digits, spaces, dashes
* and underscores, and removes spaces, dashes, underscores.
*
* @param string $str String to convert to UpperCamelCase
* @param string $encoding The character encoding
* @return string String in UpperCamelCase
*/
public static function upperCamelize($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->upperCamelize();
}
/**
* Returns a lowercase and trimmed string separated by dashes. Dashes are
* inserted before uppercase characters (with the exception of the first
* character of the string), and in place of spaces as well as underscores.
*
* @param string $str String to convert
* @param string $encoding The character encoding
* @return string Dasherized string
*/
public static function dasherize($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->dasherize();
}
/**
* Returns a lowercase and trimmed string separated by underscores.
* Underscores are inserted before uppercase characters (with the exception
* of the first character of the string), and in place of spaces as well as
* dashes.
*
* @param string $str String to convert
* @param string $encoding The character encoding
* @return string Underscored string
*/
public static function underscored($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->underscored();
}
/**
* Returns a lowercase and trimmed string separated by the given delimiter.
* Delimiters are inserted before uppercase characters (with the exception
* of the first character of the string), and in place of spaces, dashes,
* and underscores. Alpha delimiters are not converted to lowercase.
*
* @param string $str String to convert
* @param string $delimiter Sequence used to separate parts of the string
* @param string $encoding The character encoding
* @return string String with delimiter
*/
public static function delimit($str, $delimiter, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->delimit($delimiter);
}
/**
* Returns a case swapped version of the string.
*
* @param string $str String to swap case
* @param string $encoding The character encoding
* @return string String with each character's case swapped
*/
public static function swapCase($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->swapCase();
}
/**
* Returns a trimmed string with the first letter of each word capitalized.
* Ignores the case of other letters, preserving any acronyms. Also accepts
* an array, $ignore, allowing you to list words not to be capitalized.
*
* @param string $str String to titleize
* @param string $encoding The character encoding
* @param array $ignore An array of words not to capitalize
* @return string Titleized string
*/
public static function titleize($str, $ignore = null, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->titleize($ignore);
}
/**
* Capitalizes the first word of the string, replaces underscores with
* spaces, and strips '_id'.
*
* @param string $str String to humanize
* @param string $encoding The character encoding
* @return string A humanized string
*/
public static function humanize($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->humanize();
}
/**
* Returns a string with smart quotes, ellipsis characters, and dashes from
* Windows-1252 (commonly used in Word documents) replaced by their ASCII
* equivalents.
*
* @param string $str String to remove special chars
* @return string String with those characters removed
*/
public static function tidy($str)
{
return (string) Stringy::create($str)->tidy();
}
/**
* Trims the string and replaces consecutive whitespace characters with a
* single space. This includes tabs and newline characters, as well as
* multibyte whitespace such as the thin space and ideographic space.
*
* @param string $str The string to cleanup whitespace
* @param string $encoding The character encoding
* @return string The trimmed string with condensed whitespace
*/
public static function collapseWhitespace($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->collapseWhitespace();
}
/**
* Returns an ASCII version of the string. A set of non-ASCII characters are
* replaced with their closest ASCII counterparts, and the rest are removed
* unless instructed otherwise.
*
* @param string $str A string with non-ASCII characters
* @param bool $removeUnsupported Whether or not to remove the
* unsupported characters
* @return string A string containing only ASCII characters
*/
public static function toAscii($str, $removeUnsupported = true)
{
return (string) Stringy::create($str)->toAscii($removeUnsupported);
}
/**
* Pads the string to a given length with $padStr. If length is less than
* or equal to the length of the string, no padding takes places. The
* default string used for padding is a space, and the default type (one of
* 'left', 'right', 'both') is 'right'. Throws an InvalidArgumentException
* if $padType isn't one of those 3 values.
*
* @param string $str String to pad
* @param int $length Desired string length after padding
* @param string $padStr String used to pad, defaults to space
* @param string $padType One of 'left', 'right', 'both'
* @param string $encoding The character encoding
* @return string The padded string
* @throws \InvalidArgumentException If $padType isn't one of 'right',
* 'left' or 'both'
*/
public static function pad($str, $length, $padStr = ' ', $padType = 'right',
$encoding = null)
{
return (string) Stringy::create($str, $encoding)
->pad($length, $padStr, $padType);
}
/**
* Returns a new string of a given length such that the beginning of the
* string is padded. Alias for pad() with a $padType of 'left'.
*
* @param string $str String to pad
* @param int $length Desired string length after padding
* @param string $padStr String used to pad, defaults to space
* @param string $encoding The character encoding
* @return string The padded string
*/
public static function padLeft($str, $length, $padStr = ' ', $encoding = null)
{
return (string) Stringy::create($str, $encoding)
->padLeft($length, $padStr);
}
/**
* Returns a new string of a given length such that the end of the string
* is padded. Alias for pad() with a $padType of 'right'.
*
* @param string $str String to pad
* @param int $length Desired string length after padding
* @param string $padStr String used to pad, defaults to space
* @param string $encoding The character encoding
* @return string The padded string
*/
public static function padRight($str, $length, $padStr = ' ', $encoding = null)
{
return (string) Stringy::create($str, $encoding)
->padRight($length, $padStr);
}
/**
* Returns a new string of a given length such that both sides of the
* string are padded. Alias for pad() with a $padType of 'both'.
*
* @param string $str String to pad
* @param int $length Desired string length after padding
* @param string $padStr String used to pad, defaults to space
* @param string $encoding The character encoding
* @return string The padded string
*/
public static function padBoth($str, $length, $padStr = ' ', $encoding = null)
{
return (string) Stringy::create($str, $encoding)
->padBoth($length, $padStr);
}
/**
* Returns true if the string begins with $substring, false otherwise. By
* default, the comparison is case-sensitive, but can be made insensitive
* by setting $caseSensitive to false.
*
* @param string $str String to check the start of
* @param string $substring The substring to look for
* @param bool $caseSensitive Whether or not to enforce case-sensitivity
* @param string $encoding The character encoding
* @return bool Whether or not $str starts with $substring
*/
public static function startsWith($str, $substring, $caseSensitive = true,
$encoding = null)
{
return Stringy::create($str, $encoding)
->startsWith($substring, $caseSensitive);
}
/**
* Returns true if the string ends with $substring, false otherwise. By
* default, the comparison is case-sensitive, but can be made insensitive
* by setting $caseSensitive to false.
*
* @param string $str String to check the end of
* @param string $substring The substring to look for
* @param bool $caseSensitive Whether or not to enforce case-sensitivity
* @param string $encoding The character encoding
* @return bool Whether or not $str ends with $substring
*/
public static function endsWith($str, $substring, $caseSensitive = true,
$encoding = null)
{
return Stringy::create($str, $encoding)
->endsWith($substring, $caseSensitive);
}
/**
* Converts each tab in the string to some number of spaces, as defined by
* $tabLength. By default, each tab is converted to 4 consecutive spaces.
*
* @param string $str String to convert tabs to spaces
* @param int $tabLength Number of spaces to replace each tab with
* @return string String with tabs switched to spaces
*/
public static function toSpaces($str, $tabLength = 4)
{
return (string) Stringy::create($str)->toSpaces($tabLength);
}
/**
* Converts each occurrence of some consecutive number of spaces, as
* defined by $tabLength, to a tab. By default, each 4 consecutive spaces
* are converted to a tab.
*
* @param string $str String to convert spaces to tabs
* @param int $tabLength Number of spaces to replace with a tab
* @return string String with spaces switched to tabs
*/
public static function toTabs($str, $tabLength = 4)
{
return (string) Stringy::create($str)->toTabs($tabLength);
}
/**
* Converts all characters in the string to lowercase. An alias for PHP's
* mb_strtolower().
*
* @param string $str String to convert case
* @param string $encoding The character encoding
* @return string The lowercase string
*/
public static function toLowerCase($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->toLowerCase();
}
/**
* Converts the first character of each word in the string to uppercase.
*
* @param string $str String to convert case
* @param string $encoding The character encoding
* @return string The title-cased string
*/
public static function toTitleCase($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->toTitleCase();
}
/**
* Converts all characters in the string to uppercase. An alias for PHP's
* mb_strtoupper().
*
* @param string $str String to convert case
* @param string $encoding The character encoding
* @return string The uppercase string
*/
public static function toUpperCase($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->toUpperCase();
}
/**
* Converts the string into an URL slug. This includes replacing non-ASCII
* characters with their closest ASCII equivalents, removing remaining
* non-ASCII and non-alphanumeric characters, and replacing whitespace with
* $replacement. The replacement defaults to a single dash, and the string
* is also converted to lowercase.
*
* @param string $str Text to transform into an URL slug
* @param string $replacement The string used to replace whitespace
* @return string The corresponding URL slug
*/
public static function slugify($str, $replacement = '-')
{
return (string) Stringy::create($str)->slugify($replacement);
}
/**
* Returns true if the string contains $needle, false otherwise. By default,
* the comparison is case-sensitive, but can be made insensitive by setting
* $caseSensitive to false.
*
* @param string $haystack String being checked
* @param string $needle Substring to look for
* @param bool $caseSensitive Whether or not to enforce case-sensitivity
* @param string $encoding The character encoding
* @return bool Whether or not $haystack contains $needle
*/
public static function contains($haystack, $needle, $caseSensitive = true,
$encoding = null)
{
return Stringy::create($haystack, $encoding)
->contains($needle, $caseSensitive);
}
/**
* Returns true if the string contains any $needles, false otherwise. By
* default, the comparison is case-sensitive, but can be made insensitive
* by setting $caseSensitive to false.
*
* @param string $haystack String being checked
* @param array $needles Substrings to look for
* @param bool $caseSensitive Whether or not to enforce case-sensitivity
* @param string $encoding The character encoding
* @return bool Whether or not $haystack contains any $needles
*/
public static function containsAny($haystack, $needles,
$caseSensitive = true, $encoding = null)
{
return Stringy::create($haystack, $encoding)
->containsAny($needles, $caseSensitive);
}
/**
* Returns true if the string contains all $needles, false otherwise. By
* default, the comparison is case-sensitive, but can be made insensitive
* by setting $caseSensitive to false.
*
* @param string $haystack String being checked
* @param array $needles Substrings to look for
* @param bool $caseSensitive Whether or not to enforce case-sensitivity
* @param string $encoding The character encoding
* @return bool Whether or not $haystack contains all $needles
*/
public static function containsAll($haystack, $needles,
$caseSensitive = true, $encoding = null)
{
return Stringy::create($haystack, $encoding)
->containsAll($needles, $caseSensitive);
}
/**
* Returns the index of the first occurrence of $needle in the string,
* and false if not found. Accepts an optional offset from which to begin
* the search.
*
* @param string $haystack String to search
* @param string $needle Substring to look for
* @param int $offset Offset from which to search
* @return int|bool The occurrence's index if found, otherwise false
*/
public static function indexOf($haystack, $needle, $offset = 0,
$encoding = null)
{
return Stringy::create($haystack, $encoding)
->indexOf($needle, $offset);
}
/**
* Returns the index of the last occurrence of $needle in the string,
* and false if not found. Accepts an optional offset from which to begin
* the search.
*
* @param string $haystack String to search
* @param string $needle Substring to look for
* @param int $offset Offset from which to search
* @return int|bool The last occurrence's index if found, otherwise false
*/
public static function indexOfLast($haystack, $needle, $offset = 0,
$encoding = null)
{
return Stringy::create($haystack, $encoding)
->indexOfLast($needle, $offset);
}
/**
* Surrounds a string with the given substring.
*
* @param string $str The string to surround
* @param string $substring The substring to add to both sides
* @return string The string with the substring prepended and appended
*/
public static function surround($str, $substring)
{
return (string) Stringy::create($str)->surround($substring);
}
/**
* Inserts $substring into the string at the $index provided.
*
* @param string $str String to insert into
* @param string $substring String to be inserted
* @param int $index The index at which to insert the substring
* @param string $encoding The character encoding
* @return string The resulting string after the insertion
*/
public static function insert($str, $substring, $index, $encoding = null)
{
return (string) Stringy::create($str, $encoding)
->insert($substring, $index);
}
/**
* Truncates the string to a given length. If $substring is provided, and
* truncating occurs, the string is further truncated so that the substring
* may be appended without exceeding the desired length.
*
* @param string $str String to truncate
* @param int $length Desired length of the truncated string
* @param string $substring The substring to append if it can fit
* @param string $encoding The character encoding
* @return string The resulting string after truncating
*/
public static function truncate($str, $length, $substring = '',
$encoding = null)
{
return (string) Stringy::create($str, $encoding)
->truncate($length, $substring);
}
/**
* Truncates the string to a given length, while ensuring that it does not
* split words. If $substring is provided, and truncating occurs, the
* string is further truncated so that the substring may be appended without
* exceeding the desired length.
*
* @param string $str String to truncate
* @param int $length Desired length of the truncated string
* @param string $substring The substring to append if it can fit
* @param string $encoding The character encoding
* @return string The resulting string after truncating
*/
public static function safeTruncate($str, $length, $substring = '',
$encoding = null)
{
return (string) Stringy::create($str, $encoding)
->safeTruncate($length, $substring);
}
/**
* Returns a reversed string. A multibyte version of strrev().
*
* @param string $str String to reverse
* @param string $encoding The character encoding
* @return string The reversed string
*/
public static function reverse($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->reverse();
}
/**
* A multibyte str_shuffle() function. It returns a string with its
* characters in random order.
*
* @param string $str String to shuffle
* @param string $encoding The character encoding
* @return string The shuffled string
*/
public static function shuffle($str, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->shuffle();
}
/**
* Returns a string with whitespace removed from the start and end of the
* string. Supports the removal of unicode whitespace. Accepts an optional
* string of characters to strip instead of the defaults.
*
* @param string $str String to trim
* @param string $chars Optional string of characters to strip
* @param string $encoding The character encoding
* @return string Trimmed $str
*/
public static function trim($str, $chars = null, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->trim($chars);
}
/**
* Returns a string with whitespace removed from the start of the string.
* Supports the removal of unicode whitespace. Accepts an optional
* string of characters to strip instead of the defaults.
*
* @param string $str String to trim
* @param string $chars Optional string of characters to strip
* @param string $encoding The character encoding
* @return string Trimmed $str
*/
public static function trimLeft($str, $chars = null, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->trimLeft($chars);
}
/**
* Returns a string with whitespace removed from the end of the string.
* Supports the removal of unicode whitespace. Accepts an optional
* string of characters to strip instead of the defaults.
*
* @param string $str String to trim
* @param string $chars Optional string of characters to strip
* @param string $encoding The character encoding
* @return string Trimmed $str
*/
public static function trimRight($str, $chars = null, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->trimRight($chars);
}
/**
* Returns the longest common prefix between the string and $otherStr.
*
* @param string $str First string for comparison
* @param string $otherStr Second string for comparison
* @param string $encoding The character encoding
* @return string The longest common prefix
*/
public static function longestCommonPrefix($str, $otherStr, $encoding = null)
{
return (string) Stringy::create($str, $encoding)
->longestCommonPrefix($otherStr);
}
/**
* Returns the longest common suffix between the string and $otherStr.
*
* @param string $str First string for comparison
* @param string $otherStr Second string for comparison
* @param string $encoding The character encoding
* @return string The longest common suffix
*/
public static function longestCommonSuffix($str, $otherStr, $encoding = null)
{
return (string) Stringy::create($str, $encoding)
->longestCommonSuffix($otherStr);
}
/**
* Returns the longest common substring between the string and $otherStr.
* In the case of ties, it returns that which occurs first.
*
* @param string $str First string for comparison
* @param string $otherStr Second string for comparison
* @param string $encoding The character encoding
* @return string The longest common substring
*/
public static function longestCommonSubstring($str, $otherStr,
$encoding = null)
{
return (string) Stringy::create($str, $encoding)
->longestCommonSubstring($otherStr);
}
/**
* Returns the length of the string. An alias for PHP's mb_strlen() function.
*
* @param string $str The string to get the length of
* @param string $encoding The character encoding
* @return int The number of characters in $str given the encoding
*/
public static function length($str, $encoding = null)
{
return Stringy::create($str, $encoding)->length();
}
/**
* Returns the substring beginning at $start with the specified $length.
* It differs from the mb_substr() function in that providing a $length of
* null will return the rest of the string, rather than an empty string.
*
* @param string $str The string to get the length of
* @param int $start Position of the first character to use
* @param int $length Maximum number of characters used
* @param string $encoding The character encoding
* @return string The substring of $str
*/
public static function substr($str, $start, $length = null, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->substr($start, $length);
}
/**
* Returns the character at $index, with indexes starting at 0.
*
* @param string $str The string from which to get the char
* @param int $index Position of the character
* @param string $encoding The character encoding
* @return string The character at $index
*/
public static function at($str, $index, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->at($index);
}
/**
* Returns the first $n characters of the string.
*
* @param string $str The string from which to get the substring
* @param int $n Number of chars to retrieve from the start
* @param string $encoding The character encoding
* @return string The first $n characters
*/
public static function first($str, $n, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->first($n);
}
/**
* Returns the last $n characters of the string.
*
* @param string $str The string from which to get the substring
* @param int $n Number of chars to retrieve from the end
* @param string $encoding The character encoding
* @return string The last $n characters
*/
public static function last($str, $n, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->last($n);
}
/**
* Ensures that the string begins with $substring. If it doesn't, it's
* prepended.
*
* @param string $str The string to modify
* @param string $substring The substring to add if not present
* @param string $encoding The character encoding
* @return string The string prefixed by the $substring
*/
public static function ensureLeft($str, $substring, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->ensureLeft($substring);
}
/**
* Ensures that the string begins with $substring. If it doesn't, it's
* appended.
*
* @param string $str The string to modify
* @param string $substring The substring to add if not present
* @param string $encoding The character encoding
* @return string The string suffixed by the $substring
*/
public static function ensureRight($str, $substring, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->ensureRight($substring);
}
/**
* Returns a new string with the prefix $substring removed, if present.
*
* @param string $str String from which to remove the prefix
* @param string $substring The prefix to remove
* @param string $encoding The character encoding
* @return string The string without the prefix $substring
*/
public static function removeLeft($str, $substring, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->removeLeft($substring);
}
/**
* Returns a new string with the suffix $substring removed, if present.
*
* @param string $str String from which to remove the suffix
* @param string $substring The suffix to remove
* @param string $encoding The character encoding
* @return string The string without the suffix $substring
*/
public static function removeRight($str, $substring, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->removeRight($substring);
}
/**
* Returns true if the string contains a lower case char, false
* otherwise.
*
* @param string $str String to check
* @param string $encoding The character encoding
* @return bool Whether or not $str contains a lower case character.
*/
public static function hasLowerCase($str, $encoding = null)
{
return Stringy::create($str, $encoding)->hasLowerCase();
}
/**
* Returns true if the string contains an upper case char, false
* otherwise.
*
* @param string $str String to check
* @param string $encoding The character encoding
* @return bool Whether or not $str contains an upper case character.
*/
public static function hasUpperCase($str, $encoding = null)
{
return Stringy::create($str, $encoding)->hasUpperCase();
}
/**
* Returns true if the string contains only alphabetic chars, false
* otherwise.
*
* @param string $str String to check
* @param string $encoding The character encoding
* @return bool Whether or not $str contains only alphabetic chars
*/
public static function isAlpha($str, $encoding = null)
{
return Stringy::create($str, $encoding)->isAlpha();
}
/**
* Returns true if the string contains only alphabetic and numeric chars,
* false otherwise.
*
* @param string $str String to check
* @param string $encoding The character encoding
* @return bool Whether or not $str contains only alphanumeric chars
*/
public static function isAlphanumeric($str, $encoding = null)
{
return Stringy::create($str, $encoding)->isAlphanumeric();
}
/**
* Returns true if the string contains only whitespace chars, false
* otherwise.
*
* @param string $str String to check
* @param string $encoding The character encoding
* @return bool Whether or not $str contains only whitespace characters
*/
public static function isBlank($str, $encoding = null)
{
return Stringy::create($str, $encoding)->isBlank();
}
/**
* Returns true if the string is JSON, false otherwise.
*
* @param string $str String to check
* @param string $encoding The character encoding
* @return bool Whether or not $str is JSON
*/
public static function isJson($str, $encoding = null)
{
return Stringy::create($str, $encoding)->isJson();
}
/**
* Returns true if the string contains only lower case chars, false
* otherwise.
*
* @param string $str String to check
* @param string $encoding The character encoding
* @return bool Whether or not $str contains only lower case characters
*/
public static function isLowerCase($str, $encoding = null)
{
return Stringy::create($str, $encoding)->isLowerCase();
}
/**
* Returns true if the string is serialized, false otherwise.
*
* @param string $str String to check
* @param string $encoding The character encoding
* @return bool Whether or not $str is serialized
*/
public static function isSerialized($str, $encoding = null)
{
return Stringy::create($str, $encoding)->isSerialized();
}
/**
* Returns true if the string contains only upper case chars, false
* otherwise.
*
* @param string $str String to check
* @param string $encoding The character encoding
* @return bool Whether or not $str contains only upper case characters
*/
public static function isUpperCase($str, $encoding = null)
{
return Stringy::create($str, $encoding)->isUpperCase();
}
/**
* Returns true if the string contains only hexadecimal chars, false
* otherwise.
*
* @param string $str String to check
* @param string $encoding The character encoding
* @return bool Whether or not $str contains only hexadecimal characters
*/
public static function isHexadecimal($str, $encoding = null)
{
return Stringy::create($str, $encoding)->isHexadecimal();
}
/**
* Returns the number of occurrences of $substring in the given string.
* By default, the comparison is case-sensitive, but can be made insensitive
* by setting $caseSensitive to false.
*
* @param string $str The string to search through
* @param string $substring The substring to search for
* @param bool $caseSensitive Whether or not to enforce case-sensitivity
* @param string $encoding The character encoding
* @return int The number of $substring occurrences
*/
public static function countSubstr($str, $substring, $caseSensitive = true,
$encoding = null)
{
return Stringy::create($str, $encoding)
->countSubstr($substring, $caseSensitive);
}
/**
* Replaces all occurrences of $search in $str by $replacement.
*
* @param string $str The haystack to search through
* @param string $search The needle to search for
* @param string $replacement The string to replace with
* @param string $encoding The character encoding
* @return string The resulting string after the replacements
*/
public static function replace($str, $search, $replacement, $encoding = null)
{
return (string) Stringy::create($str, $encoding)
->replace($search, $replacement);
}
/**
* Replaces all occurrences of $pattern in $str by $replacement. An alias
* for mb_ereg_replace(). Note that the 'i' option with multibyte patterns
* in mb_ereg_replace() requires PHP 5.4+. This is due to a lack of support
* in the bundled version of Oniguruma in PHP 5.3.
*
* @param string $str The haystack to search through
* @param string $pattern The regular expression pattern
* @param string $replacement The string to replace with
* @param string $options Matching conditions to be used
* @param string $encoding The character encoding
* @return string The resulting string after the replacements
*/
public static function regexReplace($str, $pattern, $replacement,
$options = 'msr', $encoding = null)
{
return (string) Stringy::create($str, $encoding)
->regexReplace($pattern, $replacement, $options, $encoding);
}
/**
* Convert all applicable characters to HTML entities.
*
* @param string $str The string to encode.
* @param int|null $flags See path_to_url
* @param string $encoding The character encoding
* @return Stringy Object with the resulting $str after being html encoded.
*/
public static function htmlEncode($str, $flags = ENT_COMPAT, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->htmlEncode($flags);
}
/**
* Convert all HTML entities to their applicable characters.
*
* @param string $str The string to decode.
* @param int|null $flags See path_to_url
* @param string $encoding The character encoding
* @return Stringy Object with the resulting $str after being html decoded.
*/
public static function htmlDecode($str, $flags = ENT_COMPAT, $encoding = null)
{
return (string) Stringy::create($str, $encoding)->htmlDecode($flags);
}
}
```
|
Wiedemannia gorongoza is a species of dance flies, in the fly family Empididae.
References
Wiedemannia
Insects described in 1969
Diptera of Africa
|
Simón Lecue Andrade (11 February 1912 – 27 February 1984) was a Spanish footballer who played as an attacking midfielder.
Club career
Born in Arrigorriaga, Biscay, Lecue played his first two La Liga seasons with Deportivo Alavés, also in the Basque Country. He made his professional debut at the age of 18, after being signed from CD Basconia.
Lecue joined Real Betis in 1932, contributing with nine goals in 21 games as the Andalusians won their first and only top division championship in 1934–35, under the guidance of Irish manager Patrick O'Connell. After that final third campaign, he left the club.
Subsequently, Lecue moved to Real Madrid where he continued to feature regularly, scoring a career-best 12 goals in his second year – the competition was not held from 1936 to 1939 due to the Spanish Civil War – with the team finally coming empty in silverware. After four seasons at Valencia CF, where he won his second league in 1944, he finished his career in 1949 at the age of 37, after brief spells with amateurs AR Chamberí and Real Zaragoza; in 13 top division campaigns, he amassed totals of 250 matches and 59 goals.
Lecue died in Madrid at the age of 72, after suffering a stroke whilst in his home.
International career
Lecue earned seven caps for Spain during two years, scoring once. He was picked for the squad that appeared in the 1934 FIFA World Cup, with the national side exiting in the quarter-finals after losing against eventual champions (and hosts) Italy.
Lecue's debut was on 27 May 1934 precisely in that tournament, in a 3–1 first round win against Brazil in Genoa.
Honours
Betis
La Liga: 1934–35
Valencia
La Liga: 1943–44
Real Madrid
Copa del Rey: 1936
References
External links
1912 births
1984 deaths
People from Arrigorriaga
Spanish men's footballers
Men's association football midfielders
La Liga players
Tercera División players
CD Basconia footballers
Deportivo Alavés players
Real Betis players
Real Madrid CF players
Valencia CF players
Hércules CF players
Real Zaragoza players
Spain men's international footballers
1934 FIFA World Cup players
Catalonia men's international guest footballers
Footballers from Biscay
|
The Pompano Beach Cubs were a minor league baseball team located in Pompano Beach, Florida. The team played in the Florida State League and home stadium was Pompano Beach Municipal Park.
Notable alumni
Baseball Hall of Fame alumni
Lee Smith (1976-1977) Inducted, 2019
Notable alumni
Ron Davis (1976) MLB All-Star
Jim Tracy (1977-1978) 2009 NL Manager of the Year
External links
Baseball Reference
Defunct Florida State League teams
Pompano Beach, Florida
Chicago Cubs minor league affiliates
Defunct baseball teams in Florida
1976 establishments in Florida
1978 disestablishments in Florida
Baseball teams established in 1976
Sports clubs and teams disestablished in 1978
Baseball teams disestablished in 1978
Sports in Broward County, Florida
|
Aurantibacter crassamenti is a Gram-negative, strictly aerobic, chemoheterotrophic and rod-shaped bacterium from the genus of Aurantibacter which has been isolated from marine sediments from Japan.
References
Flavobacteria
Bacteria described in 2017
|
```java
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package org.flowable.idm.engine.impl.persistence.entity;
import java.util.List;
import java.util.Map;
import org.flowable.common.engine.impl.persistence.entity.EntityManager;
import org.flowable.idm.api.Privilege;
import org.flowable.idm.api.PrivilegeQuery;
import org.flowable.idm.engine.impl.PrivilegeQueryImpl;
/**
* @author Joram Barrez
*/
public interface PrivilegeEntityManager extends EntityManager<PrivilegeEntity> {
PrivilegeQuery createNewPrivilegeQuery();
List<Privilege> findPrivilegeByQueryCriteria(PrivilegeQueryImpl query);
long findPrivilegeCountByQueryCriteria(PrivilegeQueryImpl query);
List<Privilege> findPrivilegeByNativeQuery(Map<String, Object> parameterMap);
long findPrivilegeCountByNativeQuery(Map<String, Object> parameterMap);
}
```
|
La Cruz Blanca Neutral (The Neutral White Cross) was a volunteer infirmary and relief service established during the Mexican Revolution to care for those wounded in the conflict. The Red Cross refused to treat insurgents and the Neutral White Cross was developed to treat all combatants. After their initial success in Ciudad Juárez, the organization spread out through 25 states in Mexico for the duration of the war. It continued as a quasi-governmentally subsidized organization into the 1940s, when it was converted into an organization to assist children. The organization is still operating in Mexico City.
Formation
La Cruz Blanca Neutral was a volunteer infirmary and relief service founded by Elena Arizmendi Mejia in 1911. She was enrolled at the School of Nursing of the Santa Rosa Hospital (now the School of Nursing at the University of the Incarnate Word) in San Antonio, Texas when the war broke out. Her school was next door to the Texas residence of her family friend whom she supported, Francisco I. Madero, who challenged Porfirio Díaz for the presidency in 1910, was jailed by Díaz but escaped and fled to Texas. Reports of the war, casualties and the refusal of the Red Cross to treat insurgents, caused Arizmendi to return to Mexico City via train on 17 April 1911. Once there, she arranged a personal meeting with the head of the Red Cross organisation. When the director reiterated that they would not treat revolutionaries, Arizmendi decided to found an organisation that would treat her countrymen. She and her brother, Carlos, rallied medical students and nurses to the cause.
They formed an association under the guidelines of the Geneva Conventions and she acted as fundraiser, enlisting the help of celebrities like María Conesa, Virginia Fábregas, and Leopoldo Beristáin. After numerous fundraising events, they had collected sufficient funds for a field hospital and on 11 May 1911, set off for Ciudad Juárez. Arizmendi and Carlos, formed the first brigade with Dr. Ignacio Barrios and Dr. Antonio Márquez and nurses María Avon, Juana Flores Gallardo, Atilana García, Elena de Lange, and Tomasa Villareal. The second brigade, led by Dr. Francisco, left the following day and on the 14th a third brigade, headed by Dr. Lorenzo and ten nurses including Innocenta Díaz, Concepción Ibáñez, Jovita Muñiz, Concepción Sánchez, María Sánchez, Basilia Vélez, María Vélez and Antonia Zorilla, set off for Juárez. Arriving in the city, they found devastation and again Arizmendi had to rally for funds.
Ciudad de Juárez
Utilising buildings and supplies secured from the rebels at the Hospital de Jesús, Hospital Juárez, and the medical student dormitories and pharmacies, the brigades swiftly set to work. American medics from nearby El Paso, Texas formed the Hospital Insurrecto (Insurgent's Hospital) near the border. The devastation of the city and so many wounded strained the supplies and Arizmendi again rallied for funding.
A homeopathic doctor, Laglera, established Hospital Libertad (Liberty Hospital) to deal with wounded and typhus patients. He was assisted by nurses Rebeca Guillén, and the Vélez sisters and Zorilla who had come in the 3rd brigade. Nurses Rhoda Miller,
Francés M. Readi, Teodora J. Velarde and Tomasa Villareal from the first brigade formed the surgical nurse team. There were twenty nurses assigned to work in the City of Juarez: María Avon, Innocenta Díaz, Juana Flores Gallardo, Atilana García, Rebeca Guillén, Concepción Ibáñez, Elena de Lange, Rhoda Miller, Jovita Muñiz, Telésfora Pérez, Francés M. Readi, Amelia Rodríguez, Concepción
Sánchez, María Sánchez, Teodora J. Velarde, Basilia Vélez, María Vélez, Loreto Vélez, Tomasa Villarreal y Antonia Zorilla. In the 11th and 4th infirmary, at the Insurgent's Hospital were Tomasita F. de Aguirre, Esther Concha, Josefina Espalin, Guadalupe G. Vda. de Gameros, María Gaskey, Libradita Leyva, Bernardina S. de Leyva, Máxima de Martínez, Juanita Nápoles, Anita L. Robert and Adela Vásquez
Schiaffino, who was a journalist.
The brigade traveling with Madero included Manuel Realivásquez, Juan Anaya, Silvano N. Córdova, José María Delgado, and Dick Brown. Finally the nurses who made rounds for those who refused to go to hospitals included Guadalupe G. Vda. de Gameros, Señora Salazar de Harry, Laura Nájera de Morgan y Belem G. de Realivásquez.
Expansion through Mexico
On 7 June 1911 a massive earthquake struck Mexico and the members of the White Cross rushed to the epicenter in Iguala, Guerrero to offer assistance. By the end of 1911, the Neutral White Cross had established 25 brigades across Mexico. Arzimendi was elected as the first woman partner of the Sociedad Mexicana de Geografía y Estadística, but she rejected the honour. She did accept a gold medal presented to her for dedication with helping the wounded by the Gran Liga Obrera (Grand League of Obrera). Ironically, in 1912, the Swiss Confederation of the International Red Cross presented Silver Medals to the nurses who had served in Chihuahua, Guerrero and Morelos with the White Cross. In 1913, factionalism between male doctors who did not want to follow orders from a woman, split those supporting Arizmendi and those supporting Dr. Marquez into opposing camps. Arizmendi consulted a young attorney, José Vasconcelos, who would later become Mexico's Secretary of Education. Arizmendi withdrew and moved to New York City.
A later brigade was founded by Leonor Villegas de Magnón in 1913 that aided soldiers along both sides of the Texas-Mexican border near Laredo, Texas. A close-knit group of women and American doctors who helped the wounded during fighting, treated the wounded in Magnón's home, which had already been a makeshift kindergarten classroom. Magnón considered the preservation of Latino history important, and therefore had a "semi-official" photographer for Cruz Blanca, Esuebio Montoya. She made it understood that selling negatives or pictures was out of the question. In further strides to preserve the history of Cruz Blanca, Magnón wrote The Rebel, a third-person memoir and account of the activities of Cruz Blanca. Unfortunately her manuscript was not published in her lifetime for many reasons, one of them including unconventional gender roles. It was not until 1994 when Arte Publico Press would pick up the manuscript from her granddaughter.
Current organisation
In 1948, Arizmendi changed the direction of the White Cross, due to governmental indifference. Since 1942, the only funding had come from the benefactor, Rodulfo Brito Foucher. The White Cross, still exists in Coyoacán one of the neighborhoods of Mexico City. The institution is dedicated to the care and rehabilitation of children with severe malnutrition problems.
See also
Jovita Idar
Mexican Revolution
María Arias Bernal
References
Aftermath of war
Medical and health organizations based in Mexico
Mexican-American history
Mexican Revolution
Organizations established in 1911
|
```objective-c
//
// ZFCollectionViewController.h
// ZFPlayer_Example
//
// Created by on 2018/6/21.
//
#import <UIKit/UIKit.h>
@interface ZFCollectionViewController : UIViewController
@end
```
|
Greek influence was widespread throughout the Balkans during the Middle Ages, influencing the languages within it, including Serbo-Croatian. Many words of Greek origin were borrowed from other languages, while most others came via contact with the Greeks. Some words are present and common in the modern vernaculars of Serbo-Croatian: hiljada (хиљада), tiganj (тигањ), patos (патос). Almost every word of the Serbian Orthodox ceremonies are of Greek origin: parastos (парастос).
AG stands for Ancient Greek origin.
MG stands for Modern Greek origin.
C stands for Cyrillic (script).
L stands for Latin (script).
See also
Arabic-Persian-Greek-Serbian Conversation Textbook
References
Greek Origin
Greek Origin
Greek Origin
Greek Origin
Greek Origin
Linguistics lists
Lists of loanwords
|
NOAAS Ferdinand R. Hassler (S 250) is a coastal mapping vessel for the National Oceanic and Atmospheric Administration. Commissioned on 8 June 2012, Ferdinand R. Hassler is one of the newest additions to the NOAA hydrographic charting fleet. Operating from the Great Lakes to the Gulf of Mexico, the ship's primary mission is hydrographic survey in support of NOAA's nautical charting mission. The ship's home port is New Castle, New Hampshire.
On 8 May 2015, Ferdinand R. Hassler completed a US$1 million overhaul at the United States Coast Guard Yard at Curtis Bay outside Baltimore, Maryland.
References
External links
NOAA Ship Ferdinand R. Hassler website
Ships of the National Oceanic and Atmospheric Administration
Survey ships of the United States
Ships built in Moss Point, Mississippi
2009 ships
|
Tax evasion is an illegal attempt to defeat the imposition of taxes by individuals, corporations, trusts, and others. Tax evasion often entails the deliberate misrepresentation of the taxpayer's affairs to the tax authorities to reduce the taxpayer's tax liability, and it includes dishonest tax reporting, declaring less income, profits or gains than the amounts actually earned, overstating deductions, using bribes against authorities in countries with high corruption rates and hiding money in secret locations.
Tax evasion is an activity commonly associated with the informal economy. One measure of the extent of tax evasion (the "tax gap") is the amount of unreported income, which is the difference between the amount of income that should be reported to the tax authorities and the actual amount reported.
In contrast, tax avoidance is the legal use of tax laws to reduce one's tax burden. Both tax evasion and tax avoidance can be viewed as forms of tax noncompliance, as they describe a range of activities that intend to subvert a state's tax system, but such classification of tax avoidance is disputable since avoidance is lawful in self-creating systems. Both tax evasion and tax avoidance can be practiced by corporations, trusts, or individuals.
Economics
In 1968, Nobel laureate economist Gary Becker first theorized the economics of crime, on the basis of which authors M.G. Allingham and A. Sandmo produced, in 1972, an economic model of tax evasion. This model deals with the evasion of income tax, the main source of tax revenue in developed countries. According to the authors, the level of evasion of income tax depends on the detection probability and the level of punishment provided by law. Later studies, however, pointed limitations of the model, highlighting that individuals are also more likely to comply with taxes when they believe that tax money is appropriately used and when they can take part on public decisions.
The literature's theoretical models are elegant in their effort to identify the variables likely to affect non-compliance. Alternative specifications, however, yield conflicting results concerning both the signs and magnitudes of variables believed to affect tax evasion. Empirical work is required to resolve the theoretical ambiguities. Income tax evasion appears to be positively influenced by the tax rate, the unemployment rate, the level of income and dissatisfaction with government. The U.S. Tax Reform Act of 1986 appears to have reduced tax evasion in the United States.
In a 2017 study Alstadsæter et al. concluded based on random stratified audits and leaked data that occurrence of tax evasion rises sharply as amount of wealth rises and that the very richest are about 10 times more likely than average people to engage in tax evasion.
Tax gap
The tax gap describes how much tax should have been raised in relation to much tax is actually raised.
The tax gap is mainly growing due to two factors, the lack of enforcement on the one hand and the lack of compliance on the other hand. The former is mainly rooted in the costly enforcement of the taxation law. The latter is based on the foundation that tax compliance is costly for individuals as well as firms (tax filling, bureaucracy), hence not paying taxes would be more economical in their opinion.
Evasion of customs duty
Customs duties are an important source of revenue in developing countries. Importers attempt to evade customs duty by (a) under-invoicing and (b) misdeclaration of quantity and product-description. When there is ad valorem import duty, the tax base can be reduced through under-invoicing. Misdeclaration of quantity is more relevant for products with specific duty. Production description is changed to match a H. S. Code commensurate with a lower rate of duty.
Smuggling
Smuggling is import or export of products by illegal means. Smuggling is resorted to for total evasion of customs duties, as well as for the import and export of contraband. Smugglers do not pay duty since the transport is covert, so no customs declaration is made.
Evasion of value-added tax and sales taxes
During the second half of the 20th century, value-added tax (VAT) emerged as a modern form of consumption tax throughout the world, with the notable exception of the United States. Producers who collect VAT from consumers may evade tax by under-reporting the amount of sales. The US has no broad-based consumption tax at the federal level, and no state currently collects VAT; the overwhelming majority of states instead collect sales taxes. Canada uses both a VAT at the federal level (the Goods and Services Tax) and sales taxes at the provincial level; some provinces have a single tax combining both forms.
In addition, most jurisdictions which levy a VAT or sales tax also legally require their residents to report and pay the tax on items purchased in another jurisdiction. This means that consumers who purchase something in a lower-taxed or untaxed jurisdiction with the intention of avoiding VAT or sales tax in their home jurisdiction are technically breaking the law in most cases.
This is especially prevalent in federal countries like the United States and Canada where sub-national jurisdictions charge varying rates of VAT or sales tax.
In liberal democracies, a fundamental problem with inhibiting evasion of local sales taxes is that liberal democracies, by their very nature, have few (if any) border controls between their internal jurisdictions. Therefore, it is not generally cost-effective to enforce tax collection on low-value goods carried in private vehicles from one jurisdiction to another with a different tax rate. However, sub-national governments will normally seek to collect sales tax on high-value items such as cars.
Objectives to evade taxes
One reason for taxpayers to evade taxes is the personal benefits that come with it, thus the individual problems that lead to that decision Additionally, Wallschutzky's exchange relationship hypothesis presents as a sufficient motive for many. The exchange relationship hypothesis states that tax payers believe that the exchange between their taxes and the public good/social services as unbalanced. Furthermore, the little capability of the system to catch the tax evaders reduces associated risk. Most often, it is more economical to evade taxes, being caught and paying a fine as a consequence, than paying the accumulated tax burden over the years. Thus, evasion numbers should be even higher than they are, hence for many people there seem to be moral objective countering this practice.
Government response
The level of evasion depends on a number of factors, including the amount of money a person or a corporation possesses. Efforts to evade income tax decline when the amounts involved are lower. The level of evasion also depends on the efficiency of the tax administration. Corruption by tax officials makes it difficult to control evasion. Tax administrations use various means to reduce evasion and increase the level of enforcement: for example, privatization of tax enforcement or tax farming.
In 2011 HMRC, the UK tax collection agency stated that it would continue to crack down on tax evasion, with the goal of collecting £18 billion in revenue before 2015. In 2010, HMRC began a voluntary amnesty program that targeted middle-class professionals and raised £500 million.
Corruption by tax officials
Corrupt tax officials co-operate with the taxpayers who intend to evade taxes. When they detect an instance of evasion, they refrain from reporting it in return for bribes. Corruption by tax officials is a serious problem for the tax administration in many countries.
Level of evasion and punishment
Tax evasion is a crime in almost all developed countries, and the guilty party is liable to fines and/or imprisonment. In Switzerland, many acts that would amount to criminal tax evasion in other countries are treated as civil matters. Dishonestly misreporting income in a tax return is not necessarily considered a crime. Such matters are handled in the Swiss tax courts, not the criminal courts.
In Switzerland, however, some tax misconduct (such as the deliberate falsification of records) is criminal. Moreover, civil tax transgressions may give rise to penalties. It is often considered that the extent of evasion depends on the severity of punishment for evasion.
Privatization of tax enforcement
Professor Christopher Hood first suggested privatization of tax enforcement to control tax evasion more efficiently than a government department would, and some governments have adopted this approach. In Bangladesh, customs administration was partly privatized in 1991.
Abuse by private tax collectors (see tax farming below) has on occasion led to revolutionary overthrow of governments who have outsourced tax administration.
Tax farming
Tax farming is an historical means of collection of revenue. Governments received a lump sum in advance from a private entity, which then collects and retains the revenue and bears the risk of evasion by the taxpayers. It has been suggested that tax farming may reduce tax evasion in less developed countries.
This system may be liable to abuse by the "tax-farmers" seeking to make a profit, if they are not subject to political constraints. Abuses by tax farmers (together with a tax system that exempted the aristocracy) were a primary reason for the French Revolution that toppled Louis XVI.
PSI agencies
Pre-shipment inspection agencies like Société Générale De Surveillance S. A. and its subsidiary Cotecna are in business to prevent evasion of customs duty through under-invoicing and misdeclaration.
However, PSI agencies have cooperated with importers in evading customs duties. Bangladeshi authorities found Cotecna guilty of complicity with importers for evasion of customs duties on a huge scale. In August 2005, Bangladesh had hired four PSI companies – Cotecna Inspection SA, SGS (Bangladesh) Limited, Bureau Veritas BIVAC (Bangladesh) Limited and INtertek Testing Limited – for three years to certify price, quality and quantity of imported goods. In March 2008, the Bangladeshi National Board of Revenue cancelled Cotecna's certificate for serious irregularities, while importers' complaints about the other three PSI companies mounted. Bangladesh planned to have its customs department train its officials in "WTO valuation, trade policy, ASYCUDA system, risk management" to take over the inspections.
Cotecna was also found to have bribed Pakistan's prime minister Benazir Bhutto to secure a PSI contract by Pakistani importers. She and her husband were sentenced both in Pakistan and Switzerland.
By continent
Asia
India
United Arab Emirates
In early October 2021, 11.9 million leaked financial records in addition to 2.9 TB of data was released in the name of Pandora Papers by the International Consortium of Investigative Journalists (ICIJ), exposing the secret offshore accounts of around 35 world leaders in tax havens to evade taxes. One of the many leaders to be exposed was the ruler of Dubai and prime minister of the United Arab Emirates, Sheikh Mohammed bin Rashid al-Maktoum. Sheikh Mohammed was identified as the shareholder of three firms that were registered in the tax havens of Bahamas and British Virgin Islands through an Emirati company, partially owned by an investment conglomerate, Dubai Holding and Axiom Limited, major shares of which were owned by the ruler.
As per the leaked records, the Dubai ruler owned a massive number of upmarket and luxurious real estate across Europe via the cited offshore entities registered in tax havens.
Additionally, the Pandora Papers also cites that the former Managing Director of IMF and French finance minister, Dominique Strauss-Kahn was permitted to create a consulting firm in the United Arab Emirates in 2018 after the expiry of tax exemptions of his Moroccan company, which he used for receiving millions of dollars worth of tax free consulting fees.
Europe
Germany, France, Italy, Denmark, Belgium
A network of banks, stock traders and top lawyers has obtained billions from the European treasuries through suspected fraud and speculation with dividend tax. The five hardest hit countries have lost together at least $62.9 billion. Germany is the hardest hit country, with around €31 billion withdrawn from the German treasury. Estimated losses for other countries include at least €17 billion for France, €4.5 billion in Italy, €1.7 billion in Denmark and €201 million for Belgium.
Greece
Scandinavia
A paper by economists Annette Alstadsæter, Niels Johannesen and Gabriel Zucman, which used data from HSBC Switzerland ("Swiss leaks") and Mossack Fonseca ("Panama Papers"), found that "on average about 3% of personal taxes are evaded in Scandinavia, but this figure rises to about 30% in the top 0.01% of the wealth distribution... Taking tax evasion into account increases the rise in inequality seen in tax data since the 1970s markedly, highlighting the need to move beyond tax data to capture income and wealth at the top, even in countries where tax compliance is generally high. We also find that after reducing tax evasion—by using tax amnesties—tax evaders do not legally avoid taxes more. This result suggests that fighting tax evasion can be an effective way to collect more tax revenue from the ultra-wealthy."
United Kingdom
HMRC, the UK tax collection agency, estimated that in the tax year 2016–17, pure tax evasion (i.e. not including things like hidden economy or criminal activity) cost the government £5.3 billion. This compared to a wider tax gap (the difference between the amount of tax that should, in theory, be collected by HMRC, against what is actually collected) of £33 billion in the same year, an amount that represented 5.7% of liabilities. At the same time, tax avoidance was estimated at £1.7 billion (this does not include international tax arrangements that cannot be challenged under the UK law, including some forms of base erosion and profit shifting (BEPS)).
In 2013, the Coalition government announced a crackdown on economic crime. It created a new criminal offence for aiding tax evasion and removed the requirement for tax investigation authorities to prove "intent to evade tax" to prosecute offenders.
In 2015, Chancellor George Osborne promised to collect £5bn by "waging war" on tax evaders by announcing new powers for HMRC to target people with offshore bank accounts. The number of people prosecuted for tax evasion doubled in 2014/15 from the year before to 1,258.
United States
In the United States of America, Federal tax evasion is defined as the purposeful, illegal attempt to evade the assessment or the payment of a tax imposed by federal law. Conviction of tax evasion may result in fines and imprisonment.
The Internal Revenue Service (IRS) has identified small businesses and sole proprietors as the largest contributors to the tax gap between what Americans owe in federal taxes and what the federal government receives. Small businesses and sole proprietorships contribute to the tax gap because there are few ways for the government to know about skimming or non-reporting of income without mounting significant investigations.
the most common means of tax evasion was overstatement of charitable contributions, particularly church donations.
Estimates of lost government revenue
The IRS estimates that the 2001 tax gap was $345 billion and for 2006 it was $450 billion. A study of the 2008 tax gap found a range of $450–$500 billion, and unreported income to be about $2 trillion, concluding that 18 to 19 percent of total reportable income was not being properly reported to the IRS.
Tax evasion and inequality
Generally, individuals tend to evade taxes, while companies rather avoid taxes. There is a great heterogenic among people who evade people as it is a substantial issue in society, that is creating an excessive tax gap. Studies suggest that 8% of global financial wealth lies in offshore accounts. Often, offshore wealth that is stored in tax havens stays undetected in random audits. Even though there is high diversity among people who evade taxes, there is a higher probability among the highest wealth group. According to Alstadsæter, Johannesen and Zucman 2019 the extent of taxes evaded is substantially higher with higher income, and exceptionally higher among people of the top wealth group. In line with this, the probability to appear in the Panama Papers rises significantly among the top 0.01% of the wealth group, as does the probability to own an unreported account at HSBC. However, the upper wealth group is also more inclined to use tax amnesty.
See also
Further reading
Slemrod, Joel. 2019. "Tax Compliance and Enforcement." Journal of Economic Literature, 57 (4): 904–54.
Emmanuel Saez and Gabriel Zucman. 2019. The Triumph of Injustice: How the Rich Dodge Taxes and How to Make Them Pay. W.W. Norton.
References
External links
Tax Evasion and Fraud collected news and commentary at The Economist
Employment Tax Evasion Schemes common employment schemes at IRS
United States
US Justice Dept press release on Jeffrey Chernick, UBS tax evader
US Justice Tax Division and its enforcement efforts
Informal economy
|
"Long Away" is a song by the British rock band Queen; it is the third track on their 1976 album A Day at the Races. Brian May wrote the song and sings the lead vocals. It is the only Queen single released during Freddie Mercury's lifetime not to be sung by him, and was released as the third single from the album in North America and New Zealand only.
Recording
It is one of the few songs where May uses a guitar other than his Red Special. For the rhythm guitar parts he used an electric Burns twelve string guitar (although he used the Red Special for the second guitar solo in the middle section of the track). Originally May wanted to use a Rickenbacker guitar (as he admired John Lennon), but he didn't get along well with the Rickenbacker's thin neck.
Roger Taylor sings the highest parts of the song.
Meaning
The song has a sad tone, describing that "for every star in heaven / there's a sad soul here today," and an overall sense of melancholic nostalgia lies over the song. It is similar in feel to the song '39 from A Night at the Opera, although without the folk influence.
Live performances
The song was never performed live with Mercury, though it was rehearsed before the start of the A Day at the Races Tour in January 1977.
Reception
The Washington Post described it as "an affectionate recreation of the mid-'60s Beatles/Byrds sound," and one of the best songs on the album. Wesley Strick of Circus magazine, in a mixed review of the album, named the album's best song and also noted the influence of the Beatles and the Byrds. He observed that Long Away was "haunting" and "never smart-ass or strickly for laughs, "Long Away" - unlike most of Races - feels real." Cash Box said that "this gentle tune is built from endless layers of strummed guitars, showcasing the versatile Freddie Mercury's sweetest voice and the group's distinctive high register harmonies."
Other album appearances
The song also appears on two Queen compilation albums: Deep Cuts, Volume 1 (1973–1976) (2011) and Queen Forever (2014).
Band comments on the song
Personnel
Queen
Brian May – lead and backing vocals, electric guitar
Freddie Mercury – backing vocals
Roger Taylor – drums, backing vocals, percussion
John Deacon – bass guitar
References
External links
Lyrics at Queen official website
Queen (band) songs
1976 songs
1977 singles
Songs written by Brian May
EMI Records singles
Elektra Records singles
Hollywood Records singles
|
Finnøya is an island in Ålesund Municipality in Møre og Romsdal county, Norway. It is located northeast of Harøya island. The island of Finnøya is connected by a causeway to the neighboring island of Harøya, and it has ferry connections to Sandøya and Orta.
See also
List of islands of Norway
References
Ålesund
Islands of Møre og Romsdal
|
```c
/**
* @file shared/ku/uuid5.c
*
* @copyright 2015-2024 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.
*
* You can redistribute it and/or modify it under the terms of the GNU
* Foundation.
*
* in accordance with the commercial license agreement provided in
* conjunction with the software. The terms and conditions of any such
* commercial license agreement shall govern, supersede, and render
* ineffective any application of the GPLv3 license to this software,
* notwithstanding of any reference thereto in the software or
* associated repository.
*/
#include <shared/ku/library.h>
#include <bcrypt.h>
/*
* This module is used to create UUID v5 identifiers. UUID v5 identifiers
* are effectively SHA1 hashes that are modified to fit within the UUID
* format. The resulting identifiers use version 5 and variant 2. The hash
* is taken over the concatenation of a namespace ID and a name; the namespace
* ID is another UUID and the name can be any string of bytes ("octets").
*
* For details see RFC 4122: path_to_url
*/
NTSTATUS FspUuid5Make(const UUID *Namespace, const VOID *Buffer, ULONG Size, UUID *Uuid)
{
BCRYPT_ALG_HANDLE ProvHandle = 0;
BCRYPT_HASH_HANDLE HashHandle = 0;
UINT8 Temp[20];
NTSTATUS Result;
/*
* Windows UUID's are encoded in little-endian format. RFC 4122 specifies that for
* UUID v5 computation, UUID's must be converted to/from big-endian.
*
* Note that Windows is always little-endian:
* path_to_url#Comment_146810
*/
/* copy Namespace to local buffer in network byte order (big-endian) */
Temp[ 0] = ((PUINT8)Namespace)[ 3];
Temp[ 1] = ((PUINT8)Namespace)[ 2];
Temp[ 2] = ((PUINT8)Namespace)[ 1];
Temp[ 3] = ((PUINT8)Namespace)[ 0];
Temp[ 4] = ((PUINT8)Namespace)[ 5];
Temp[ 5] = ((PUINT8)Namespace)[ 4];
Temp[ 6] = ((PUINT8)Namespace)[ 7];
Temp[ 7] = ((PUINT8)Namespace)[ 6];
Temp[ 8] = ((PUINT8)Namespace)[ 8];
Temp[ 9] = ((PUINT8)Namespace)[ 9];
Temp[10] = ((PUINT8)Namespace)[10];
Temp[11] = ((PUINT8)Namespace)[11];
Temp[12] = ((PUINT8)Namespace)[12];
Temp[13] = ((PUINT8)Namespace)[13];
Temp[14] = ((PUINT8)Namespace)[14];
Temp[15] = ((PUINT8)Namespace)[15];
/*
* Unfortunately we cannot reuse the hashing object, because BCRYPT_HASH_REUSABLE_FLAG
* is available in Windows 8 and later. (WinFsp currently supports Windows 7 or later).
*/
Result = BCryptOpenAlgorithmProvider(&ProvHandle, BCRYPT_SHA1_ALGORITHM, 0, 0);
if (!NT_SUCCESS(Result))
goto exit;
Result = BCryptCreateHash(ProvHandle, &HashHandle, 0, 0, 0, 0, 0);
if (!NT_SUCCESS(Result))
goto exit;
Result = BCryptHashData(HashHandle, (PVOID)Temp, 16, 0);
if (!NT_SUCCESS(Result))
goto exit;
Result = BCryptHashData(HashHandle, (PVOID)Buffer, Size, 0);
if (!NT_SUCCESS(Result))
goto exit;
Result = BCryptFinishHash(HashHandle, Temp, 20, 0);
if (!NT_SUCCESS(Result))
goto exit;
/* copy local buffer to Uuid in host byte order (little-endian) */
((PUINT8)Uuid)[ 0] = Temp[ 3];
((PUINT8)Uuid)[ 1] = Temp[ 2];
((PUINT8)Uuid)[ 2] = Temp[ 1];
((PUINT8)Uuid)[ 3] = Temp[ 0];
((PUINT8)Uuid)[ 4] = Temp[ 5];
((PUINT8)Uuid)[ 5] = Temp[ 4];
((PUINT8)Uuid)[ 6] = Temp[ 7];
((PUINT8)Uuid)[ 7] = Temp[ 6];
((PUINT8)Uuid)[ 8] = Temp[ 8];
((PUINT8)Uuid)[ 9] = Temp[ 9];
((PUINT8)Uuid)[10] = Temp[10];
((PUINT8)Uuid)[11] = Temp[11];
((PUINT8)Uuid)[12] = Temp[12];
((PUINT8)Uuid)[13] = Temp[13];
((PUINT8)Uuid)[14] = Temp[14];
((PUINT8)Uuid)[15] = Temp[15];
/* [RFC 4122 Section 4.3]
* Set the four most significant bits (bits 12 through 15) of the
* time_hi_and_version field to the appropriate 4-bit version number
* from Section 4.1.3.
*/
Uuid->Data3 = (5 << 12) | (Uuid->Data3 & 0x0fff);
/* [RFC 4122 Section 4.3]
* Set the two most significant bits (bits 6 and 7) of the
* clock_seq_hi_and_reserved to zero and one, respectively.
*/
Uuid->Data4[0] = (2 << 6) | (Uuid->Data4[0] & 0x3f);
Result = STATUS_SUCCESS;
exit:
if (0 != HashHandle)
BCryptDestroyHash(HashHandle);
if (0 != ProvHandle)
BCryptCloseAlgorithmProvider(ProvHandle, 0);
return Result;
}
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.