text
stringlengths 1
22.8M
|
|---|
Wingfield Township is a township in Geary County, Kansas, USA. As of the 2000 census, its population was 139.
Geography
Wingfield Township covers an area of and contains no incorporated settlements. According to the USGS, it contains two cemeteries: Humboldt and Saint Joseph's.
The streams of East McDowell Creek, MacArthur Branch, Pressee Branch, Swede Creek, Thierer Branch and West McDowell Creek run through this township.
References
USGS Geographic Names Information System (GNIS)
Further reading
External links
City-Data.com
Townships in Geary County, Kansas
Townships in Kansas
|
```java
Altering format string output by changing a format specifier's `argument_index`
Metadata: creating a user-defined file attribute
Do not perform bitwise and arithmetic operations on the same data
Limit Accessibility of `Fields`
Increase `PermGen` space as to avoid `OutOfMemory` errors
```
|
```pod
=pod
=head1 NAME
SSL_CTX_set_default_ctlog_list_file, SSL_CTX_set_ctlog_list_file -
load a Certificate Transparency log list from a file
=head1 SYNOPSIS
#include <openssl/ssl.h>
int SSL_CTX_set_default_ctlog_list_file(SSL_CTX *ctx);
int SSL_CTX_set_ctlog_list_file(SSL_CTX *ctx, const char *path);
=head1 DESCRIPTION
SSL_CTX_set_default_ctlog_list_file() loads a list of Certificate Transparency
(CT) logs from the default file location, "ct_log_list.cnf", found in the
directory where OpenSSL is installed.
SSL_CTX_set_ctlog_list_file() loads a list of CT logs from a specific path.
See L<CTLOG_STORE_new(3)> for the file format.
=head1 NOTES
These functions will not clear the existing CT log list - it will be appended
to. To replace the existing list, use L<SSL_CTX_set0_ctlog_store> first.
If an error occurs whilst parsing a particular log entry in the file, that log
entry will be skipped.
=head1 RETURN VALUES
SSL_CTX_set_default_ctlog_list_file() and SSL_CTX_set_ctlog_list_file()
return 1 if the log list is successfully loaded, and 0 if an error occurs. In
the case of an error, the log list may have been partially loaded.
=head1 SEE ALSO
L<ssl(3)>,
L<SSL_CTX_set_ct_validation_callback(3)>,
L<CTLOG_STORE_new(3)>
=head1 COPYRIGHT
in the file LICENSE in the source distribution or at
L<path_to_url
=cut
```
|
```go
// Free for personal use and commercial trial
// Commercial use requires per-user licenses available from path_to_url
package duplicacy
import (
"encoding/json"
"io/ioutil"
"syscall"
"unsafe"
)
var keyringFile string
var (
dllcrypt32 = syscall.NewLazyDLL("Crypt32.dll")
dllkernel32 = syscall.NewLazyDLL("Kernel32.dll")
procEncryptData = dllcrypt32.NewProc("CryptProtectData")
procDecryptData = dllcrypt32.NewProc("CryptUnprotectData")
procLocalFree = dllkernel32.NewProc("LocalFree")
)
type DATA_BLOB struct {
cbData uint32
pbData *byte
}
func SetKeyringFile(path string) {
keyringFile = path
}
func keyringEncrypt(value []byte) ([]byte, error) {
dataIn := DATA_BLOB{
pbData: &value[0],
cbData: uint32(len(value)),
}
dataOut := DATA_BLOB{}
r, _, err := procEncryptData.Call(uintptr(unsafe.Pointer(&dataIn)),
0, 0, 0, 0, 0, uintptr(unsafe.Pointer(&dataOut)))
if r == 0 {
return nil, err
}
address := uintptr(unsafe.Pointer(dataOut.pbData))
defer procLocalFree.Call(address)
encryptedData := make([]byte, dataOut.cbData)
for i := 0; i < len(encryptedData); i++ {
encryptedData[i] = *(*byte)(unsafe.Pointer(uintptr(int(address) + i)))
}
return encryptedData, nil
}
func keyringDecrypt(value []byte) ([]byte, error) {
dataIn := DATA_BLOB{
pbData: &value[0],
cbData: uint32(len(value)),
}
dataOut := DATA_BLOB{}
r, _, err := procDecryptData.Call(uintptr(unsafe.Pointer(&dataIn)),
0, 0, 0, 0, 0, uintptr(unsafe.Pointer(&dataOut)))
if r == 0 {
return nil, err
}
address := uintptr(unsafe.Pointer(dataOut.pbData))
defer procLocalFree.Call(address)
decryptedData := make([]byte, dataOut.cbData)
for i := 0; i < len(decryptedData); i++ {
address := int(uintptr(unsafe.Pointer(dataOut.pbData)))
decryptedData[i] = *(*byte)(unsafe.Pointer(uintptr(int(address) + i)))
}
return decryptedData, nil
}
func keyringGet(key string) (value string) {
if keyringFile == "" {
LOG_DEBUG("KEYRING_NOT_INITIALIZED", "Keyring file not set")
return ""
}
description, err := ioutil.ReadFile(keyringFile)
if err != nil {
LOG_DEBUG("KEYRING_READ", "Keyring file not read: %v", err)
return ""
}
var keyring map[string][]byte
err = json.Unmarshal(description, &keyring)
if err != nil {
LOG_DEBUG("KEYRING_PARSE", "Failed to parse the keyring storage file %s: %v", keyringFile, err)
return ""
}
encryptedValue := keyring[key]
if len(encryptedValue) == 0 {
return ""
}
valueInBytes, err := keyringDecrypt(encryptedValue)
if err != nil {
LOG_DEBUG("KEYRING_DECRYPT", "Failed to decrypt the value: %v", err)
return ""
}
return string(valueInBytes)
}
func keyringSet(key string, value string) bool {
if value == "" {
return false
}
if keyringFile == "" {
LOG_DEBUG("KEYRING_NOT_INITIALIZED", "Keyring file not set")
return false
}
keyring := make(map[string][]byte)
description, err := ioutil.ReadFile(keyringFile)
if err == nil {
err = json.Unmarshal(description, &keyring)
if err != nil {
LOG_DEBUG("KEYRING_PARSE", "Failed to parse the keyring storage file %s: %v", keyringFile, err)
}
}
if value == "" {
keyring[key] = nil
} else {
// Check if the value to be set is the same as the existing one
existingEncryptedValue := keyring[key]
if len(existingEncryptedValue) > 0 {
existingValue, err := keyringDecrypt(existingEncryptedValue)
if err == nil && string(existingValue) == value {
return true
}
}
encryptedValue, err := keyringEncrypt([]byte(value))
if err != nil {
LOG_DEBUG("KEYRING_ENCRYPT", "Failed to encrypt the value: %v", err)
return false
}
keyring[key] = encryptedValue
}
description, err = json.MarshalIndent(keyring, "", " ")
if err != nil {
LOG_DEBUG("KEYRING_MARSHAL", "Failed to marshal the keyring storage: %v", err)
return false
}
err = ioutil.WriteFile(keyringFile, description, 0600)
if err != nil {
LOG_DEBUG("KEYRING_WRITE", "Failed to save the keyring storage to file %s: %v", keyringFile, err)
return false
}
return true
}
```
|
Cadenet () is a commune in the Vaucluse department in the Provence-Alpes-Côte d'Azur region in southeastern France.
Its inhabitants are called Cadenétiens in French.
Geography
Cadenet is a village located on the southern slopes of the Luberon Massif, overlooking the valley of the Durance. It is 57 km southeast of Avignon, 59 km north of Marseille and 616 km as the crow flies from Paris.
Access
It is accessed from Lourmarin to the north by county (départemental) main road 943. Secondary county road 973 crosses the south of the village on an east–west axis and allows it to connect to Lauris to the west, and runs east to Villelaure and Pertuis. County roads 43, 59, 118 and 139 also pass through the town.
A railway runs through the town on an east–west axis across the plains at the south end of the village. This is the line of the Cheval-Blanc in Pertuis.
Relief and Geology
The village is situated on a hill overlooking the valley of the Durance, on the southern Luberon Massif, in mountainous terrain formed during the Early Cretaceous period. Several other hills lie to the east, including Castellar. The alluvial plains of the Durance lie to the south. The town lies on the perimeter of the Luberon Geological Nature Reserve because of the proximity to exceptional fossil sites.
History
Jewish community
Like all places situated along the river Durance, Cadenet had a Jewish community in the Middle Ages. A document of the year 1283 states that this community, together with those of Aix-en-Provence, Saint-Maximin, Lambesc, Pertuis, Istres, Trets, and Lanson, was permitted to have a synagogue and a cemetery on paying an annual tax of two pounds of pepper to the archbishop of Aix.
In 1385 a remarkable lawsuit arose in Arles, relating to an alleged marriage. The plaintiff was Maestro Duran of Cadenet. In order to be revenged on Meirona, daughter of En Salves Cassin of Arles, who had refused him, Duran declared that he had married her in the presence of two witnesses, Vidal Abraham of Bourrin and Bonfilh or Bonfils Crégud. These witnesses were later convicted of perjury.
The case was taken in turn before the rabbinical colleges of Arles, Nîmes, Montpellier, and Perpignan, and in the last instance, upon the demand of Don Salemias Nasi of Valence, was submitted to R. Isaac ben Sheshet, who pronounced severe judgment against Duran and his fellow-conspirators, and bitterly reproached the community of Arles that it had not done its utmost to prevent such a scandal from becoming public.
A Jew, Mosson of Cadenet by name, lived at Carpentras in 1404; and two others, Salvet of Cadenet and Vidalon of Cadenet, were sheriffs of that community in 1460.
Twin towns
Cadenet is twinned with:
Arcole, Italy
Varvari-Myrtia, Greece
See also
Côtes du Luberon AOC
Communes of the Vaucluse department
Luberon
Natives
Natives include the Orientalist composer Félicien-César David, the carpenter and Jacobin Joseph Sec, and Saint Elzéar of Sabran, Baron of Ansouis and Count of Ariano.
References
Communes of Vaucluse
|
Cairns Customs House is a heritage-listed former customs house and now restaurant at 6A-8A Abbott Street, Cairns City, Cairns, Cairns Region, Queensland, Australia. It was designed by Robert Henry Bowen and built from 1936 to 1937 by Watkins & Deal. It was added to the Queensland Heritage Register on 21 October 1992.
History
The former Cairns Customs House was erected in 1936-37 by the Australian Government through the Public Works branch of the Department of the Interior, largely as an employment-generating initiative during the Great Depression. It was the third customs house on the site.
The customs reserve at Cairns was the first land surveyed after proclamation of the port of Cairns on 1 November 1876. The reserve of just over included the whole of the land bounded by Abbott, Spence and Wharf Streets and the Esplanade.
By July 1877 the first customs buildings were completed at what was then known as Trinity Bay, but the site was not proclaimed a customs reserve (temporary) until 1886. The buildings faced the Esplanade, and included a customs house, bond store and the sub-collector of customs' residence.
In 1889 a new, single-storeyed timber building with a frontage to Abbott Street replaced the first customs house, which was converted to a bond store. In the same year the site was proclaimed a permanent reserve for customs purposes.
As part of the Federation of Australia, the customs reserve became the property of the Australian Government, and was occupied by the Department of Trade & Customs. In 1905 it was subdivided into three allotments, two being revested with the state government. Allotment 2, with frontages to the Esplanade and Abbott Street, became customs reserve R.293. This site contained the 1889 customs house and a bond store (1876 customs house). The latter was extended in the early part of the twentieth century.
The present Customs House was constructed on the site during the large-scale interwar redevelopment of Cairns, in which the city centre was virtually rebuilt. This building boom was in part a consequence of severe cyclone damage suffered by the city in 1920 and 1927. Also it was a reflection of a developing economy sustained by the introduction of a post-1918 Soldier Settlement Scheme to the Atherton Tableland, and the opening of the North Coast rail link between Cairns and Brisbane in 1924. Cairns became the northern terminus of the coastal railway, and functioned as a service town for sugar, mining, maize, dairying, timber and fruit growing.
By the late 1930s, Cairns had become the third largest port in Queensland.
Plans for a two-storeyed masonry customs building were prepared by architect Robert Henry Bowen of Commonwealth Public Works, Queensland, in 1936. The ground floor contained offices, and the upper floor provided residential accommodation for the sub-collector of customs. It was constructed in 1936-37 by local building contractors Watkins & Deal, at a cost of .
The building was erected on the same Abbott Street site as the preceding customs house, which was relocated to the backyard to provide temporary office accommodation while the new building was being constructed. The 1889 building was removed/demolished at a later date.
Plans for a new bond store on the site were prepared in mid-1939. The first customs house/bond store appears to have been removed to accommodate the new building, which was erected by 1941.
In 1970 the first floor residence in the customs house was vacated to accommodate increased office staff, and in 1989 the customs department removed to a new building in Aplin Street.
Between 1986 and 1991 the bond store was occupied by the Queensland Government's National Parks and Wildlife Service. The site was purchased by Suncorp in 1987.
In 1992, the Queensland Government called for submissions to build and operate a casino in Cairns on the site. The Cairns Customs House became part of the development of The Reef Hotel Casino where it now operates as a Cafe China Noodle Bar, a Chinese restaurant.
Description
The former customs reserve occupies a 2,656 square metre site at the southern end of the city centre, with frontages to Abbott Street (the principal commercial axis) and the Esplanade. The main building of The Reef Hotel Casino is built around it.
Former Customs House (1936-37)
An inter-war two-storeyed rendered cavity brick building, with hipped terracotta tiled roof. The building is square in plan with a projecting entrance portico and balcony. The entrance facade to Abbott Street is decorated with moulded details that are classically derived including double height pilasters, which rise to a stepped parapet. On the upper level of the Abbott Street elevation all the openings have timber shutters. All the windows and French doors in the building are multi-paned.
Internally the ground floor contains the Long Room and four offices, with the upper floor being residential accommodation of seven principal rooms. All the rooms on both levels open out onto verandahs and balconies. The building contains most of its original finishes and fittings. The Long Room has a decorative moulded plaster cornice and pilasters. All the joinery throughout the building is silky oak.
Former Bond Store ()
Designed to complement the former Customs House, the former Bond Store is a single-storeyed rendered cavity brick building, with a suspended concrete slab floor and a terracotta tiled roof. The interior has been renovated.
The grounds contain a number of mature shade trees and the site also includes garages and sheds.
Heritage listing
The former Cairns Customs House was listed on the Queensland Heritage Register on 21 October 1992 having satisfied the following criteria.
The place is important in demonstrating the evolution or pattern of Queensland's history.
The former Cairns Customs House is important in demonstrating the evolution and pattern of Cairns' history, the site being associated with the earliest European settlement of the Trinity Bay area and with the development of Cairns as the principal port in far northern Queensland. The present buildings were associated with the administration of customs operations at Cairns for over 50 years.
The place is important in demonstrating the principal characteristics of a particular class of cultural places.
The former Cairns Customs House is important in demonstrating the principal characteristics of an interwar custom house employing classical motifs.
The place has a strong or special association with a particular community or cultural group for social, cultural or spiritual reasons.
The site and buildings are valued for social and historic reasons by the Cairns community, as part of an historic government precinct which includes the adjacent Anzac Memorial Park and reserve R.886.
References
Attribution
External links
Queensland Heritage Register
Buildings and structures in Cairns
Government buildings in Queensland
Articles incorporating text from the Queensland Heritage Register
Cairns City, Queensland
|
```c++
// Class1.cpp
#include "pch.h"
#include "Class1.h"
```
|
In computer science, the Cocke–Younger–Kasami algorithm (alternatively called CYK, or CKY) is a parsing algorithm for context-free grammars published by Itiroo Sakai in 1961. The algorithm is named after some of its rediscoverers: John Cocke, Daniel Younger, Tadao Kasami, and Jacob T. Schwartz. It employs bottom-up parsing and dynamic programming.
The standard version of CYK operates only on context-free grammars given in Chomsky normal form (CNF). However any context-free grammar may be algorithmically transformed into a CNF grammar expressing the same language .
The importance of the CYK algorithm stems from its high efficiency in certain situations. Using big O notation, the worst case running time of CYK is , where is the length of the parsed string and is the size of the CNF grammar . This makes it one of the most efficient parsing algorithms in terms of worst-case asymptotic complexity, although other algorithms exist with better average running time in many practical scenarios.
Standard form
The dynamic programming algorithm requires the context-free grammar to be rendered into Chomsky normal form (CNF), because it tests for possibilities to split the current sequence into two smaller sequences. Any context-free grammar that does not generate the empty string can be represented in CNF using only production rules of the forms , , and where is the start symbol.
Algorithm
As pseudocode
The algorithm in pseudocode is as follows:
let the input be a string I consisting of n characters: a1 ... an.
let the grammar contain r nonterminal symbols R1 ... Rr, with start symbol R1.
let P[n,n,r] be an array of booleans. Initialize all elements of P to false.
let back[n,n,r] be an array of lists of backpointing triples. Initialize all elements of back to the empty list.
for each s = 1 to n
for each unit production Rv → as
set P[1,s,v] = true
for each l = 2 to n -- Length of span
for each s = 1 to n-l+1 -- Start of span
for each p = 1 to l-1 -- Partition of span
for each production Ra → Rb Rc
if P[p,s,b] and P[l-p,s+p,c] then
set P[l,s,a] = true,
append <p,b,c> to back[l,s,a]
if P[n,1,1] is true then
I is member of language
return back -- by retracing the steps through back, one can easily construct all possible parse trees of the string.
else
return "not a member of language"
Probabilistic CYK (for finding the most probable parse)
Allows to recover the most probable parse given the probabilities of all productions.
let the input be a string I consisting of n characters: a1 ... an.
let the grammar contain r nonterminal symbols R1 ... Rr, with start symbol R1.
let P[n,n,r] be an array of real numbers. Initialize all elements of P to zero.
let back[n,n,r] be an array of backpointing triples.
for each s = 1 to n
for each unit production Rv →as
set P[1,s,v] = Pr(Rv →as)
for each l = 2 to n -- Length of span
for each s = 1 to n-l+1 -- Start of span
for each p = 1 to l-1 -- Partition of span
for each production Ra → Rb Rc
prob_splitting = Pr(Ra →Rb Rc) * P[p,s,b] * P[l-p,s+p,c]
if prob_splitting > P[l,s,a] then
set P[l,s,a] = prob_splitting
set back[l,s,a] = <p,b,c>
if P[n,1,1] > 0 then
find the parse tree by retracing through back
return the parse tree
else
return "not a member of language"
As prose
In informal terms, this algorithm considers every possible substring of the input string and sets to be true if the substring of length starting from can be generated from the nonterminal . Once it has considered substrings of length 1, it goes on to substrings of length 2, and so on. For substrings of length 2 and greater, it considers every possible partition of the substring into two parts, and checks to see if there is some production such that matches the first part and matches the second part. If so, it records as matching the whole substring. Once this process is completed, the input string is generated by the grammar if the substring containing the entire input string is matched by the start symbol.
Example
This is an example grammar:
Now the sentence she eats a fish with a fork is analyzed using the CYK algorithm. In the following table, in , is the number of the row (starting at the bottom at 1), and is the number of the column (starting at the left at 1).
For readability, the CYK table for P is represented here as a 2-dimensional matrix M containing a set of non-terminal symbols, such that is in if, and only if, .
In the above example, since a start symbol S is in , the sentence can be generated by the grammar.
Extensions
Generating a parse tree
The above algorithm is a recognizer that will only determine if a sentence is in the language. It is simple to extend it into a parser that also constructs a parse tree, by storing parse tree nodes as elements of the array, instead of the boolean 1. The node is linked to the array elements that were used to produce it, so as to build the tree structure. Only one such node in each array element is needed if only one parse tree is to be produced. However, if all parse trees of an ambiguous sentence are to be kept, it is necessary to store in the array element a list of all the ways the corresponding node can be obtained in the parsing process. This is sometimes done with a second table B[n,n,r] of so-called backpointers.
The end result is then a shared-forest of possible parse trees, where common trees parts are factored between the various parses. This shared forest can conveniently be read as an ambiguous grammar generating only the sentence parsed, but with the same ambiguity as the original grammar, and the same parse trees up to a very simple renaming of non-terminals, as shown by .
Parsing non-CNF context-free grammars
As pointed out by , the drawback of all known transformations into Chomsky normal form is that they can lead to an undesirable bloat in grammar size. The size of a grammar is the sum of the sizes of its production rules, where the size of a rule is one plus the length of its right-hand side. Using to denote the size of the original grammar, the size blow-up in the worst case may range from to , depending on the transformation algorithm used. For the use in teaching, Lange and Leiß propose a slight generalization of the CYK algorithm, "without compromising efficiency of the algorithm, clarity of its presentation, or simplicity of proofs" .
Parsing weighted context-free grammars
It is also possible to extend the CYK algorithm to parse strings using weighted and stochastic context-free grammars. Weights (probabilities) are then stored in the table P instead of booleans, so P[i,j,A] will contain the minimum weight (maximum probability) that the substring from i to j can be derived from A. Further extensions of the algorithm allow all parses of a string to be enumerated from lowest to highest weight (highest to lowest probability).
Numerical stability
When the probabilistic CYK algorithm is applied to a long string, the splitting probability can become very small due to multiplying many probabilities together. This can be dealt with by summing log-probability instead of multiplying probabilities.
Valiant's algorithm
The worst case running time of CYK is , where n is the length of the parsed string and |G| is the size of the CNF grammar G. This makes it one of the most efficient algorithms for recognizing general context-free languages in practice. gave an extension of the CYK algorithm. His algorithm computes the same parsing table
as the CYK algorithm; yet he showed that algorithms for efficient multiplication of matrices with 0-1-entries can be utilized for performing this computation.
Using the Coppersmith–Winograd algorithm for multiplying these matrices, this gives an asymptotic worst-case running time of . However, the constant term hidden by the Big O Notation is so large that the Coppersmith–Winograd algorithm is only worthwhile for matrices that are too large to handle on present-day computers , and this approach requires subtraction and so is only suitable for recognition. The dependence on efficient matrix multiplication cannot be avoided altogether: has proved that any parser for context-free grammars working in time can be effectively converted into an algorithm computing the product of -matrices with 0-1-entries in time , and this was extended by Abboud et al. to apply to a constant-size grammar.
See also
GLR parser
Earley parser
Packrat parser
Inside–outside algorithm
References
Sources
External links
CYK parsing demo in JavaScript
Exorciser is a Java application to generate exercises in the CYK algorithm as well as Finite State Machines, Markov algorithms etc
Parsing algorithms
|
The 1996 United States presidential election in Minnesota took place on November 5, 1996, as part of the 1996 United States presidential election. Voters chose ten representatives, or electors to the Electoral College, who voted for president and vice president.
A Democratic-leaning state, Minnesota was comfortably won by incumbent Democratic President Bill Clinton. Clinton took 51.10% of the popular vote over Republican challenger Bob Dole, who took 34.96%, a victory margin of 16.14%. Reform Party candidate Ross Perot finished in third, with 11.75% of the popular vote.
, and despite the state’s long Democratic streak – having not voted Republican since 1972 – this is the most recent election that the Republican candidate received less than forty percent of the vote in a presidential election, the most recent in which a Democrat would win the state by more than 15% of the vote, the most recent in which the Democratic candidate won more counties than the Republican, and the most recent when Anoka, Becker, Benton, Cass, Chisago, Clearwater, Cottonwood, Crow Wing, Dodge, Faribault, Goodhue, Hubbard, Isanti, Jackson, Kanabec, Kandiyohi, Lake of the Woods, Le Sueur, Lyon, Martin, McLeod, Meeker, Mille Lacs, Morrison, Nobles, Renville, Scott, Sherburne, Sibley, Stearns, Steele, Todd, Wabasha, Waseca, and Wright Counties voted for a Democratic presidential candidate. This is the only time since 1952 that Martin County voted for a Democratic presidential candidate. This is the last election in which Minnesota voted to the left of California, Delaware, Maryland, and Washington, all of which have become soundly Democratic leaning states, while Minnesota is a marginally competitive Democratic leaning state.
Results
Results by county
Counties that flipped from Republican to Democratic
Becker
Cottonwood
Crow Wing
Dodge
Faribault
Houston
Lyon
Martin
McLeod
Stearns
Steele
See also
United States presidential elections in Minnesota
References
Minnesota
1996
1996 Minnesota elections
|
```python
#
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# ==============================================================================
"""Tests for object_detection.predictors.heads.mask_head."""
import unittest
import tensorflow.compat.v1 as tf
from google.protobuf import text_format
from object_detection.builders import hyperparams_builder
from object_detection.predictors.heads import keras_mask_head
from object_detection.protos import hyperparams_pb2
from object_detection.utils import test_case
from object_detection.utils import tf_version
@unittest.skipIf(tf_version.is_tf1(), 'Skipping TF2.X only test.')
class ConvolutionalMaskPredictorTest(test_case.TestCase):
def _build_conv_hyperparams(self):
conv_hyperparams = hyperparams_pb2.Hyperparams()
conv_hyperparams_text_proto = """
activation: NONE
regularizer {
l2_regularizer {
}
}
initializer {
truncated_normal_initializer {
}
}
"""
text_format.Merge(conv_hyperparams_text_proto, conv_hyperparams)
return hyperparams_builder.KerasLayerHyperparams(conv_hyperparams)
def test_prediction_size_use_depthwise_false(self):
conv_hyperparams = self._build_conv_hyperparams()
mask_prediction_head = keras_mask_head.ConvolutionalMaskHead(
is_training=True,
num_classes=20,
use_dropout=True,
dropout_keep_prob=0.5,
kernel_size=3,
conv_hyperparams=conv_hyperparams,
freeze_batchnorm=False,
num_predictions_per_location=1,
use_depthwise=False,
mask_height=7,
mask_width=7)
def graph_fn():
image_feature = tf.random_uniform(
[64, 17, 19, 1024], minval=-10.0, maxval=10.0, dtype=tf.float32)
mask_predictions = mask_prediction_head(image_feature)
return mask_predictions
mask_predictions = self.execute(graph_fn, [])
self.assertAllEqual([64, 323, 20, 7, 7], mask_predictions.shape)
def test_prediction_size_use_depthwise_true(self):
conv_hyperparams = self._build_conv_hyperparams()
mask_prediction_head = keras_mask_head.ConvolutionalMaskHead(
is_training=True,
num_classes=20,
use_dropout=True,
dropout_keep_prob=0.5,
kernel_size=3,
conv_hyperparams=conv_hyperparams,
freeze_batchnorm=False,
num_predictions_per_location=1,
use_depthwise=True,
mask_height=7,
mask_width=7)
def graph_fn():
image_feature = tf.random_uniform(
[64, 17, 19, 1024], minval=-10.0, maxval=10.0, dtype=tf.float32)
mask_predictions = mask_prediction_head(image_feature)
return mask_predictions
mask_predictions = self.execute(graph_fn, [])
self.assertAllEqual([64, 323, 20, 7, 7], mask_predictions.shape)
def test_class_agnostic_prediction_size_use_depthwise_false(self):
conv_hyperparams = self._build_conv_hyperparams()
mask_prediction_head = keras_mask_head.ConvolutionalMaskHead(
is_training=True,
num_classes=20,
use_dropout=True,
dropout_keep_prob=0.5,
kernel_size=3,
conv_hyperparams=conv_hyperparams,
freeze_batchnorm=False,
num_predictions_per_location=1,
use_depthwise=False,
mask_height=7,
mask_width=7,
masks_are_class_agnostic=True)
def graph_fn():
image_feature = tf.random_uniform(
[64, 17, 19, 1024], minval=-10.0, maxval=10.0, dtype=tf.float32)
mask_predictions = mask_prediction_head(image_feature)
return mask_predictions
mask_predictions = self.execute(graph_fn, [])
self.assertAllEqual([64, 323, 1, 7, 7], mask_predictions.shape)
def test_class_agnostic_prediction_size_use_depthwise_true(self):
conv_hyperparams = self._build_conv_hyperparams()
mask_prediction_head = keras_mask_head.ConvolutionalMaskHead(
is_training=True,
num_classes=20,
use_dropout=True,
dropout_keep_prob=0.5,
kernel_size=3,
conv_hyperparams=conv_hyperparams,
freeze_batchnorm=False,
num_predictions_per_location=1,
use_depthwise=True,
mask_height=7,
mask_width=7,
masks_are_class_agnostic=True)
def graph_fn():
image_feature = tf.random_uniform(
[64, 17, 19, 1024], minval=-10.0, maxval=10.0, dtype=tf.float32)
mask_predictions = mask_prediction_head(image_feature)
return mask_predictions
mask_predictions = self.execute(graph_fn, [])
self.assertAllEqual([64, 323, 1, 7, 7], mask_predictions.shape)
@unittest.skipIf(tf_version.is_tf1(), 'Skipping TF2.X only test.')
class MaskRCNNMaskHeadTest(test_case.TestCase):
def _build_conv_hyperparams(self,
op_type=hyperparams_pb2.Hyperparams.CONV):
hyperparams = hyperparams_pb2.Hyperparams()
hyperparams_text_proto = """
activation: NONE
regularizer {
l2_regularizer {
}
}
initializer {
truncated_normal_initializer {
}
}
"""
text_format.Merge(hyperparams_text_proto, hyperparams)
hyperparams.op = op_type
return hyperparams_builder.KerasLayerHyperparams(hyperparams)
def test_prediction_size(self):
mask_prediction_head = keras_mask_head.MaskRCNNMaskHead(
is_training=True,
num_classes=20,
conv_hyperparams=self._build_conv_hyperparams(),
freeze_batchnorm=False,
mask_height=14,
mask_width=14,
mask_prediction_num_conv_layers=2,
mask_prediction_conv_depth=256,
masks_are_class_agnostic=False)
def graph_fn():
roi_pooled_features = tf.random_uniform(
[64, 7, 7, 1024], minval=-10.0, maxval=10.0, dtype=tf.float32)
prediction = mask_prediction_head(roi_pooled_features)
return prediction
prediction = self.execute(graph_fn, [])
self.assertAllEqual([64, 1, 20, 14, 14], prediction.shape)
def test_prediction_size_with_convolve_then_upsample(self):
mask_prediction_head = keras_mask_head.MaskRCNNMaskHead(
is_training=True,
num_classes=20,
conv_hyperparams=self._build_conv_hyperparams(),
freeze_batchnorm=False,
mask_height=28,
mask_width=28,
mask_prediction_num_conv_layers=2,
mask_prediction_conv_depth=256,
masks_are_class_agnostic=True,
convolve_then_upsample=True)
def graph_fn():
roi_pooled_features = tf.random_uniform(
[64, 14, 14, 1024], minval=-10.0, maxval=10.0, dtype=tf.float32)
prediction = mask_prediction_head(roi_pooled_features)
return prediction
prediction = self.execute(graph_fn, [])
self.assertAllEqual([64, 1, 1, 28, 28], prediction.shape)
@unittest.skipIf(tf_version.is_tf1(), 'Skipping TF2.X only test.')
class WeightSharedConvolutionalMaskPredictorTest(test_case.TestCase):
def _build_conv_hyperparams(self):
conv_hyperparams = hyperparams_pb2.Hyperparams()
conv_hyperparams_text_proto = """
activation: NONE
regularizer {
l2_regularizer {
}
}
initializer {
truncated_normal_initializer {
}
}
"""
text_format.Merge(conv_hyperparams_text_proto, conv_hyperparams)
return hyperparams_builder.KerasLayerHyperparams(conv_hyperparams)
def test_prediction_size(self):
mask_prediction_head = (
keras_mask_head.WeightSharedConvolutionalMaskHead(
num_classes=20,
num_predictions_per_location=1,
conv_hyperparams=self._build_conv_hyperparams(),
mask_height=7,
mask_width=7))
def graph_fn():
image_feature = tf.random_uniform(
[64, 17, 19, 1024], minval=-10.0, maxval=10.0, dtype=tf.float32)
mask_predictions = mask_prediction_head(image_feature)
return mask_predictions
mask_predictions = self.execute(graph_fn, [])
self.assertAllEqual([64, 323, 20, 7, 7], mask_predictions.shape)
def test_class_agnostic_prediction_size(self):
mask_prediction_head = (
keras_mask_head.WeightSharedConvolutionalMaskHead(
num_classes=20,
num_predictions_per_location=1,
conv_hyperparams=self._build_conv_hyperparams(),
mask_height=7,
mask_width=7,
masks_are_class_agnostic=True))
def graph_fn():
image_feature = tf.random_uniform(
[64, 17, 19, 1024], minval=-10.0, maxval=10.0, dtype=tf.float32)
mask_predictions = mask_prediction_head(image_feature)
return mask_predictions
mask_predictions = self.execute(graph_fn, [])
self.assertAllEqual([64, 323, 1, 7, 7], mask_predictions.shape)
if __name__ == '__main__':
tf.test.main()
```
|
Carlos Montes is a nationally respected leader in the Chicano, immigrant rights, and anti-war movements. He was a co-founder of the Brown Berets, a Chicano working class youth organization in the United States in the late 1960s and 1970s. The Brown Berets were inspired by and often compared to the Black Panther Party. Montes was one of the leaders of the Chicano Blowouts, a series of walkouts of East Los Angeles high schools to protest against racism and inequality in Los Angeles-area high schools. He is portrayed by Fidel Gomez in the 2006 HBO movie Walkout.
He has been facing charges since 2011 on a firearms violation that he and supporters insist is unsubstantiated and politically motivated, intended to stifle dissent.
Early political work
The agenda of the Brown Berets was to fight police harassment, inadequate public schools inadequate health care, inadequate job opportunities, minority education issues, the lack of political representation, and the Vietnam War. It had a 13-point program that included self-determination for Chicanos. It set up branches in Texas, New Mexico, New York, Florida, Chicago, St. Louis and other metropolitan areas with Chicano populations.
Montes was indicted twice for the ELA Blowout (he was one of the East LA 13) and later with ten others for conspiracy to commit arson by the Los Angeles Police Department at a demonstration against then Governor Ronald Reagan in 1969. After threats against his life and beatings by the police and many arrests on false charges, he went underground and lived in Ciudad Juárez, Mexico, and later in El Paso, Texas, where he did organized labor. He was rearrested in Monterey Park, California in May 1977 and tried. However, with a competent legal defense (provided by attorneys Miguel Garcia and Steve Sanora), community support and a defense committee he was found not guilty of all charges. The Walkout indictment was dismissed as unconstitutional.
Recent political work
Montes remains an activist and is a leader of Latinos Against War, a Latino anti-war organization based in Los Angeles and a member of the immigrant advocacy group the Southern California Immigration Coalition.
With the 2003 Bush administration war and occupation of Iraq, Montes helped form and lead L.A. Latinos Against War. He helped to organize protests against the September 2008 Republican National Convention in St. Paul, Minnesota.
In December 2008, Montes was a founding member of the Southern California Immigration Coalition, to fight against Immigration and Customs Enforcement (ICE) and police repression; and to organize the yearly May 1 marches and rallies to demand full legalization. He continues to fight to defend public education and helped to lead the fight to keep Garfield High School public, his alma mater in ELA. He is also currently active in the Committee to Stop FBI Repression.
On May 7, Montes along with other members of the Legalization for All Network announced their support for the Dump Trump protest. This continues Montes work to support the anti-war movement as well as to continue his fight towards equality and justice for all. His announcement came along with a powerful statement, "Dump Trump and his racist attacks must be our call to action! His rhetoric of hate is blaming immigrants, especially Latinos, for the suffering of the working people. This suffering is in fact caused by the billionaire class that Trump represents. We say 'Dump Trump' and march on the RNC", that reassures the fight against oppression and inequality.
Current political activity
Montes has been organizing against unnecessary FBI raids which tend to focus on dismantling and preventing activist group activity through intimidation.
Arrest
On 17 May 2011, Montes was arrested following an FBI raid in his Los Angeles home. According to reports, his home was ransacked and his computer, cell phones and hundreds of documents such as photographs, diskettes and mementos of his current political activity were removed by FBI. He was arrested on one charge of dealing with a firearm code, and released the following morning.
A court appearance was scheduled for June 16, 2011.
See also
Chicano Moratorium
Community Service Organization
References
External links
Interview with Carlos Montes About the Brown Berets (Winter 2003)
American people of Mexican descent
Activists from Los Angeles
Living people
Year of birth missing (living people)
|
Morrison High School may refer to:
Morrison Glace Bay High School, Nova Scotia, Canada
Morrison High School (Illinois), Morrison, Illinois
Morrison High School (Oklahoma), Morrison, Oklahoma
|
Eulima gibba is a species of sea snail, a marine gastropod mollusk in the family Eulimidae. The species is one of a number within the genus Eulima.
References
External links
To World Register of Marine Species
gibba
Gastropods described in 1867
|
```javascript
;(function($){
/**
* jqGrid Serbian latin Translation
* Bild Studio info@bild-studio.net
* path_to_url
* Dual licensed under the MIT and GPL licenses:
* path_to_url
* path_to_url
**/
$.jgrid = $.jgrid || {};
$.extend($.jgrid,{
defaults : {
recordtext: "Pregled {0} - {1} od {2}",
emptyrecords: "Ne postoji nijedan zapis",
loadtext: "Uitavanje",
pgtext : "Strana {0} od {1}"
},
search : {
caption: "Traenje...",
Find: "Trai",
Reset: "Resetuj",
odata: [{ oper:'eq', text:"jednako"},{ oper:'ne', text:"nije jednako"},{ oper:'lt', text:"manje"},{ oper:'le', text:"manje ili jednako"},{ oper:'gt', text:"vee"},{ oper:'ge', text:"vee ili jednako"},{ oper:'bw', text:"poinje sa"},{ oper:'bn', text:"ne poinje sa"},{ oper:'in', text:"je u"},{ oper:'ni', text:"nije u"},{ oper:'ew', text:"zavrava sa"},{ oper:'en', text:"ne zavrava sa"},{ oper:'cn', text:"sadri"},{ oper:'nc', text:"ne sadri"},{ oper:'nu', text:'is null'},{ oper:'nn', text:'is not null'}],
groupOps: [ { op: "AND", text: "sva" }, { op: "OR", text: "bilo koje" } ],
operandTitle : "Click to select search operation.",
resetTitle : "Reset Search Value"
},
edit : {
addCaption: "Dodaj zapis",
editCaption: "Izmeni zapis",
bSubmit: "Poalji",
bCancel: "Odustani",
bClose: "Zatvori",
saveData: "Podatak je izmenjen! Sauvaj izmene?",
bYes : "Da",
bNo : "Ne",
bExit : "Odustani",
msg: {
required: "Polje je obavezno",
number: "Unesite ispravan broj",
minValue: "vrednost mora biti vea od ili jednaka sa ",
maxValue: "vrednost mora biti manja ili jednaka sa",
email: "nije ispravna email adresa, nije valjda da ne ume ukucati mail!?",
integer: "Unesi celobrojnu vrednost ",
date: "Unesite ispravan datum",
url: "nije ispravan URL. Potreban je prefiks ('path_to_url or 'path_to_url",
nodefined : " nije definisan!",
novalue : " zahtevana je povratna vrednost!",
customarray : "Prilagoena funkcija treba da vrati niz!",
customfcheck : "Prilagoena funkcija treba da bude prisutana u sluaju prilagoene provere!"
}
},
view : {
caption: "Pogledaj zapis",
bClose: "Zatvori"
},
del : {
caption: "Izbrisi",
msg: "Izbrisi izabran(e) zapise(e)?",
bSubmit: "Izbrii",
bCancel: "Odbaci"
},
nav : {
edittext: "",
edittitle: "Izmeni izabrani red",
addtext:"",
addtitle: "Dodaj novi red",
deltext: "",
deltitle: "Izbrii izabran red",
searchtext: "",
searchtitle: "Nai zapise",
refreshtext: "",
refreshtitle: "Ponovo uitaj podatke",
alertcap: "Upozorenje",
alerttext: "Izaberite red",
viewtext: "",
viewtitle: "Pogledaj izabrani red"
},
col : {
caption: "Izaberi kolone",
bSubmit: "OK",
bCancel: "Odbaci"
},
errors : {
errcap : "Greka",
nourl : "Nije postavljen URL",
norecords: "Nema zapisa za obradu",
model : "Duina modela colNames <> colModel!"
},
formatter : {
integer : {thousandsSeparator: " ", defaultValue: '0'},
number : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.00'},
currency : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0.00'},
date : {
dayNames: [
"Ned", "Pon", "Uto", "Sre", "et", "Pet", "Sub",
"Nedelja", "Ponedeljak", "Utorak", "Srijeda", "etvrtak", "Petak", "Subota"
],
monthNames: [
"Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec",
"Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
],
AmPm : ["am","pm","AM","PM"],
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
parseRe : /[#%\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
ShortDate: "n/j/Y",
LongDate: "l, F d, Y",
FullDateTime: "l, F d, Y g:i:s A",
MonthDay: "F d",
ShortTime: "g:i A",
LongTime: "g:i:s A",
SortableDateTime: "Y-m-d\\TH:i:s",
UniversalSortableDateTime: "Y-m-d H:i:sO",
YearMonth: "F, Y"
},
reformatAfterEdit : false
},
baseLinkUrl: '',
showAction: '',
target: '',
checkbox : {disabled:true},
idName : 'id'
}
});
})(jQuery);
```
|
```javascript
//@flow
import { request } from '../../utils';
import db from 'shared/testing/db';
import data from 'shared/testing/data';
// various permissions for Spectrum community
const member = data.users.find(({ username }) => username === 'mxstbr');
const noPermissionUser = data.users.find(
({ username }) => username === 'bad-boy'
);
afterEach(() => {
return db
.table('threads')
.filter({ content: { title: 'test thread' } })
.delete()
.run();
});
const variables = {
thread: {
channelId: 'ce2b4488-4c75-47e0-8ebc-2539c1e6a192',
communityId: 'ce2b4488-4c75-47e0-8ebc-2539c1e6a191',
type: 'DRAFTJS',
content: {
title: 'test thread',
body: '',
},
},
};
it('should create a thread if user has permissions', async () => {
const query = /* GraphQL */ `
mutation publishThread($thread: ThreadInput!) {
publishThread (thread: $thread) {
isPublished
isLocked
type
content {
title
}
}
},
`;
const context = {
user: member,
};
expect.assertions(1);
const result = await request(query, { context, variables });
expect(result).toMatchSnapshot();
});
it('should prevent thread publish if user has no permissions', async () => {
const query = /* GraphQL */ `
mutation publishThread($thread: ThreadInput!) {
publishThread (thread: $thread) {
isPublished
isLocked
type
content {
title
}
}
},
`;
const context = {
user: noPermissionUser,
};
expect.assertions(1);
const result = await request(query, { context, variables });
expect(result).toMatchSnapshot();
});
it('should prevent signed out users from publishing a thread', async () => {
const query = /* GraphQL */ `
mutation publishThread($thread: ThreadInput!) {
publishThread (thread: $thread) {
isPublished
isLocked
type
content {
title
}
}
},
`;
expect.assertions(1);
const result = await request(query, { variables });
expect(result).toMatchSnapshot();
});
```
|
```c++
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/wasm/baseline/liftoff-assembler.h"
#include "src/assembler-inl.h"
#include "src/base/optional.h"
#include "src/compiler/linkage.h"
#include "src/compiler/wasm-compiler.h"
#include "src/counters.h"
#include "src/macro-assembler-inl.h"
#include "src/wasm/function-body-decoder-impl.h"
#include "src/wasm/memory-tracing.h"
#include "src/wasm/wasm-objects.h"
#include "src/wasm/wasm-opcodes.h"
namespace v8 {
namespace internal {
namespace wasm {
using WasmCompilationData = compiler::WasmCompilationData;
constexpr auto kRegister = LiftoffAssembler::VarState::kRegister;
constexpr auto KIntConst = LiftoffAssembler::VarState::KIntConst;
constexpr auto kStack = LiftoffAssembler::VarState::kStack;
namespace {
#define __ asm_->
#define TRACE(...) \
do { \
if (FLAG_trace_liftoff) PrintF("[liftoff] " __VA_ARGS__); \
} while (false)
#define WASM_INSTANCE_OBJECT_OFFSET(name) \
(WasmInstanceObject::k##name##Offset - kHeapObjectTag)
#define LOAD_INSTANCE_FIELD(dst, name, type) \
__ LoadFromInstance(dst.gp(), WASM_INSTANCE_OBJECT_OFFSET(name), \
LoadType(type).size());
constexpr LoadType::LoadTypeValue kPointerLoadType =
kPointerSize == 8 ? LoadType::kI64Load : LoadType::kI32Load;
#if V8_TARGET_ARCH_ARM64
// On ARM64, the Assembler keeps track of pointers to Labels to resolve
// branches to distant targets. Moving labels would confuse the Assembler,
// thus store the label on the heap and keep a unique_ptr.
class MovableLabel {
public:
Label* get() { return label_.get(); }
MovableLabel() : MovableLabel(new Label()) {}
operator bool() const { return label_ != nullptr; }
static MovableLabel None() { return MovableLabel(nullptr); }
private:
std::unique_ptr<Label> label_;
explicit MovableLabel(Label* label) : label_(label) {}
};
#else
// On all other platforms, just store the Label directly.
class MovableLabel {
public:
Label* get() { return &label_; }
operator bool() const { return true; }
static MovableLabel None() { return MovableLabel(); }
private:
Label label_;
};
#endif
compiler::CallDescriptor* GetLoweredCallDescriptor(
Zone* zone, compiler::CallDescriptor* call_desc) {
return kPointerSize == 4 ? compiler::GetI32WasmCallDescriptor(zone, call_desc)
: call_desc;
}
constexpr ValueType kTypesArr_ilfd[] = {kWasmI32, kWasmI64, kWasmF32, kWasmF64};
constexpr Vector<const ValueType> kTypes_ilfd = ArrayVector(kTypesArr_ilfd);
class LiftoffCompiler {
public:
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(LiftoffCompiler);
// TODO(clemensh): Make this a template parameter.
static constexpr wasm::Decoder::ValidateFlag validate =
wasm::Decoder::kValidate;
using Value = ValueBase;
struct ElseState {
MovableLabel label;
LiftoffAssembler::CacheState state;
};
struct Control : public ControlWithNamedConstructors<Control, Value> {
MOVE_ONLY_WITH_DEFAULT_CONSTRUCTORS(Control);
std::unique_ptr<ElseState> else_state;
LiftoffAssembler::CacheState label_state;
MovableLabel label;
};
using Decoder = WasmFullDecoder<validate, LiftoffCompiler>;
struct OutOfLineCode {
MovableLabel label;
MovableLabel continuation;
Builtins::Name builtin;
wasm::WasmCodePosition position;
LiftoffRegList regs_to_save;
uint32_t pc; // for trap handler.
// Named constructors:
static OutOfLineCode Trap(Builtins::Name b, wasm::WasmCodePosition pos,
uint32_t pc) {
return {{}, {}, b, pos, {}, pc};
}
static OutOfLineCode StackCheck(wasm::WasmCodePosition pos,
LiftoffRegList regs) {
return {{}, MovableLabel::None(), Builtins::kWasmStackGuard, pos, regs,
0};
}
};
LiftoffCompiler(LiftoffAssembler* liftoff_asm,
compiler::CallDescriptor* call_descriptor,
compiler::ModuleEnv* env,
SourcePositionTableBuilder* source_position_table_builder,
WasmCompilationData* wasm_compilation_data,
Zone* compilation_zone, std::unique_ptr<Zone>* codegen_zone,
WasmCode* const* code_table_entry)
: asm_(liftoff_asm),
descriptor_(
GetLoweredCallDescriptor(compilation_zone, call_descriptor)),
env_(env),
min_size_(uint64_t{env_->module->initial_pages} * wasm::kWasmPageSize),
max_size_(uint64_t{env_->module->has_maximum_pages
? env_->module->maximum_pages
: wasm::kV8MaxWasmMemoryPages} *
wasm::kWasmPageSize),
source_position_table_builder_(source_position_table_builder),
wasm_compilation_data_(wasm_compilation_data),
compilation_zone_(compilation_zone),
codegen_zone_(codegen_zone),
safepoint_table_builder_(compilation_zone_),
code_table_entry_(code_table_entry) {}
~LiftoffCompiler() { BindUnboundLabels(nullptr); }
bool ok() const { return ok_; }
void unsupported(Decoder* decoder, const char* reason) {
ok_ = false;
TRACE("unsupported: %s\n", reason);
decoder->errorf(decoder->pc(), "unsupported liftoff operation: %s", reason);
BindUnboundLabels(decoder);
}
bool DidAssemblerBailout(Decoder* decoder) {
if (decoder->failed() || !asm_->did_bailout()) return false;
unsupported(decoder, asm_->bailout_reason());
return true;
}
bool CheckSupportedType(Decoder* decoder,
Vector<const ValueType> supported_types,
ValueType type, const char* context) {
char buffer[128];
// Check supported types.
for (ValueType supported : supported_types) {
if (type == supported) return true;
}
SNPrintF(ArrayVector(buffer), "%s %s", WasmOpcodes::TypeName(type),
context);
unsupported(decoder, buffer);
return false;
}
int GetSafepointTableOffset() const {
return safepoint_table_builder_.GetCodeOffset();
}
void BindUnboundLabels(Decoder* decoder) {
#ifdef DEBUG
// Bind all labels now, otherwise their destructor will fire a DCHECK error
// if they where referenced before.
uint32_t control_depth = decoder ? decoder->control_depth() : 0;
for (uint32_t i = 0; i < control_depth; ++i) {
Control* c = decoder->control_at(i);
Label* label = c->label.get();
if (!label->is_bound()) __ bind(label);
if (c->else_state) {
Label* else_label = c->else_state->label.get();
if (!else_label->is_bound()) __ bind(else_label);
}
}
for (auto& ool : out_of_line_code_) {
if (!ool.label.get()->is_bound()) __ bind(ool.label.get());
}
#endif
}
void StartFunction(Decoder* decoder) {
int num_locals = decoder->NumLocals();
__ set_num_locals(num_locals);
for (int i = 0; i < num_locals; ++i) {
__ set_local_type(i, decoder->GetLocalType(i));
}
}
// Returns the number of inputs processed (1 or 2).
uint32_t ProcessParameter(ValueType type, uint32_t input_idx) {
const int num_lowered_params = 1 + needs_reg_pair(type);
// Initialize to anything, will be set in the loop and used afterwards.
LiftoffRegister reg = LiftoffRegister::from_code(kGpReg, 0);
RegClass rc = num_lowered_params == 1 ? reg_class_for(type) : kGpReg;
LiftoffRegList pinned;
for (int pair_idx = 0; pair_idx < num_lowered_params; ++pair_idx) {
compiler::LinkageLocation param_loc =
descriptor_->GetInputLocation(input_idx + pair_idx);
// Initialize to anything, will be set in both arms of the if.
LiftoffRegister in_reg = LiftoffRegister::from_code(kGpReg, 0);
if (param_loc.IsRegister()) {
DCHECK(!param_loc.IsAnyRegister());
int reg_code = param_loc.AsRegister();
RegList cache_regs = rc == kGpReg ? kLiftoffAssemblerGpCacheRegs
: kLiftoffAssemblerFpCacheRegs;
if (cache_regs & (1 << reg_code)) {
// This is a cache register, just use it.
in_reg = LiftoffRegister::from_code(rc, reg_code);
} else {
// Move to a cache register (spill one if necessary).
// Note that we cannot create a {LiftoffRegister} for reg_code, since
// {LiftoffRegister} can only store cache regs.
LiftoffRegister in_reg = __ GetUnusedRegister(rc, pinned);
if (rc == kGpReg) {
__ Move(in_reg.gp(), Register::from_code(reg_code), type);
} else {
__ Move(in_reg.fp(), DoubleRegister::from_code(reg_code), type);
}
}
} else if (param_loc.IsCallerFrameSlot()) {
in_reg = __ GetUnusedRegister(rc, pinned);
ValueType lowered_type = num_lowered_params == 1 ? type : kWasmI32;
__ LoadCallerFrameSlot(in_reg, -param_loc.AsCallerFrameSlot(),
lowered_type);
}
reg = pair_idx == 0 ? in_reg
: LiftoffRegister::ForPair(reg.gp(), in_reg.gp());
pinned.set(reg);
}
__ PushRegister(type, reg);
return num_lowered_params;
}
void StackCheck(wasm::WasmCodePosition position) {
if (FLAG_wasm_no_stack_checks ||
!wasm_compilation_data_->runtime_exception_support()) {
return;
}
out_of_line_code_.push_back(
OutOfLineCode::StackCheck(position, __ cache_state()->used_registers));
OutOfLineCode& ool = out_of_line_code_.back();
__ StackCheck(ool.label.get());
if (ool.continuation) __ bind(ool.continuation.get());
}
// Inserts a check whether the optimized version of this code already exists.
// If so, it redirects execution to the optimized code.
void JumpToOptimizedCodeIfExisting() {
// Check whether we have an optimized function before
// continuing to execute the Liftoff-compiled code.
// TODO(clemensh): Reduce number of temporary registers.
LiftoffRegList pinned;
LiftoffRegister wasm_code_addr =
pinned.set(__ GetUnusedRegister(kGpReg, pinned));
LiftoffRegister target_code_addr =
pinned.set(__ GetUnusedRegister(kGpReg, pinned));
LiftoffRegister code_start_address =
pinned.set(__ GetUnusedRegister(kGpReg, pinned));
// Get the current code's target address ({instructions_.start()}).
__ ComputeCodeStartAddress(code_start_address.gp());
static LoadType kPointerLoadType =
LoadType::ForValueType(LiftoffAssembler::kWasmIntPtr);
using int_t = std::conditional<kPointerSize == 8, uint64_t, uint32_t>::type;
static_assert(sizeof(int_t) == sizeof(uintptr_t), "weird uintptr_t");
// Get the address of the WasmCode* currently stored in the code table.
__ LoadConstant(target_code_addr,
WasmValue(reinterpret_cast<int_t>(code_table_entry_)),
RelocInfo::WASM_CODE_TABLE_ENTRY);
// Load the corresponding WasmCode*.
__ Load(wasm_code_addr, target_code_addr.gp(), Register::no_reg(), 0,
kPointerLoadType, pinned);
// Load its target address ({instuctions_.start()}).
__ Load(target_code_addr, wasm_code_addr.gp(), Register::no_reg(),
WasmCode::kInstructionStartOffset, kPointerLoadType, pinned);
// If the current code's target address is the same as the
// target address of the stored WasmCode, then continue executing, otherwise
// jump to the updated WasmCode.
Label cont;
__ emit_cond_jump(kEqual, &cont, LiftoffAssembler::kWasmIntPtr,
target_code_addr.gp(), code_start_address.gp());
__ LeaveFrame(StackFrame::WASM_COMPILED);
__ emit_jump(target_code_addr.gp());
__ bind(&cont);
}
void StartFunctionBody(Decoder* decoder, Control* block) {
__ EnterFrame(StackFrame::WASM_COMPILED);
__ set_has_frame(true);
pc_offset_stack_frame_construction_ = __ PrepareStackFrame();
// {PrepareStackFrame} is the first platform-specific assembler method.
// If this failed, we can bail out immediately, avoiding runtime overhead
// and potential failures because of other unimplemented methods.
// A platform implementing {PrepareStackFrame} must ensure that we can
// finish compilation without errors even if we hit unimplemented
// LiftoffAssembler methods.
if (DidAssemblerBailout(decoder)) return;
// Parameter 0 is the instance parameter.
uint32_t num_params =
static_cast<uint32_t>(decoder->sig_->parameter_count());
for (uint32_t i = 0; i < __ num_locals(); ++i) {
if (!CheckSupportedType(decoder, kTypes_ilfd, __ local_type(i), "param"))
return;
}
// Input 0 is the call target, the instance is at 1.
constexpr int kInstanceParameterIndex = 1;
// Store the instance parameter to a special stack slot.
compiler::LinkageLocation instance_loc =
descriptor_->GetInputLocation(kInstanceParameterIndex);
DCHECK(instance_loc.IsRegister());
DCHECK(!instance_loc.IsAnyRegister());
Register instance_reg = Register::from_code(instance_loc.AsRegister());
__ SpillInstance(instance_reg);
// Input 0 is the code target, 1 is the instance. First parameter at 2.
uint32_t input_idx = kInstanceParameterIndex + 1;
for (uint32_t param_idx = 0; param_idx < num_params; ++param_idx) {
input_idx += ProcessParameter(__ local_type(param_idx), input_idx);
}
DCHECK_EQ(input_idx, descriptor_->InputCount());
// Set to a gp register, to mark this uninitialized.
LiftoffRegister zero_double_reg(Register::from_code<0>());
DCHECK(zero_double_reg.is_gp());
for (uint32_t param_idx = num_params; param_idx < __ num_locals();
++param_idx) {
ValueType type = decoder->GetLocalType(param_idx);
switch (type) {
case kWasmI32:
__ cache_state()->stack_state.emplace_back(kWasmI32, uint32_t{0});
break;
case kWasmI64:
__ cache_state()->stack_state.emplace_back(kWasmI64, uint32_t{0});
break;
case kWasmF32:
case kWasmF64:
if (zero_double_reg.is_gp()) {
// Note: This might spill one of the registers used to hold
// parameters.
zero_double_reg = __ GetUnusedRegister(kFpReg);
// Zero is represented by the bit pattern 0 for both f32 and f64.
__ LoadConstant(zero_double_reg, WasmValue(0.));
}
__ PushRegister(type, zero_double_reg);
break;
default:
UNIMPLEMENTED();
}
}
block->label_state.stack_base = __ num_locals();
// The function-prologue stack check is associated with position 0, which
// is never a position of any instruction in the function.
StackCheck(0);
DCHECK_EQ(__ num_locals(), __ cache_state()->stack_height());
// TODO(kimanh): if possible, we want to move this check further up,
// in order to avoid unnecessary overhead each time we enter
// a Liftoff-compiled function that will jump to a Turbofan-compiled
// function.
if (FLAG_wasm_tier_up) {
JumpToOptimizedCodeIfExisting();
}
}
void GenerateOutOfLineCode(OutOfLineCode& ool) {
__ bind(ool.label.get());
const bool is_stack_check = ool.builtin == Builtins::kWasmStackGuard;
const bool is_mem_out_of_bounds =
ool.builtin == Builtins::kThrowWasmTrapMemOutOfBounds;
if (is_mem_out_of_bounds && env_->use_trap_handler) {
uint32_t pc = static_cast<uint32_t>(__ pc_offset());
DCHECK_EQ(pc, __ pc_offset());
wasm_compilation_data_->AddProtectedInstruction(ool.pc, pc);
}
if (!wasm_compilation_data_->runtime_exception_support()) {
// We cannot test calls to the runtime in cctest/test-run-wasm.
// Therefore we emit a call to C here instead of a call to the runtime.
// In this mode, we never generate stack checks.
DCHECK(!is_stack_check);
__ CallTrapCallbackForTesting();
__ LeaveFrame(StackFrame::WASM_COMPILED);
__ Ret();
return;
}
if (!ool.regs_to_save.is_empty()) __ PushRegisters(ool.regs_to_save);
source_position_table_builder_->AddPosition(
__ pc_offset(), SourcePosition(ool.position), false);
__ Call(__ isolate()->builtins()->builtin_handle(ool.builtin),
RelocInfo::CODE_TARGET);
safepoint_table_builder_.DefineSafepoint(asm_, Safepoint::kSimple, 0,
Safepoint::kNoLazyDeopt);
DCHECK_EQ(ool.continuation.get()->is_bound(), is_stack_check);
if (!ool.regs_to_save.is_empty()) __ PopRegisters(ool.regs_to_save);
if (is_stack_check) {
__ emit_jump(ool.continuation.get());
} else {
__ AssertUnreachable(AbortReason::kUnexpectedReturnFromWasmTrap);
}
}
void FinishFunction(Decoder* decoder) {
if (DidAssemblerBailout(decoder)) return;
for (OutOfLineCode& ool : out_of_line_code_) {
GenerateOutOfLineCode(ool);
}
safepoint_table_builder_.Emit(asm_, __ GetTotalFrameSlotCount());
__ PatchPrepareStackFrame(pc_offset_stack_frame_construction_,
__ GetTotalFrameSlotCount());
}
void OnFirstError(Decoder* decoder) {
ok_ = false;
BindUnboundLabels(decoder);
}
void NextInstruction(Decoder* decoder, WasmOpcode) {
TraceCacheState(decoder);
}
void Block(Decoder* decoder, Control* block) {
block->label_state.stack_base = __ cache_state()->stack_height();
}
void Loop(Decoder* decoder, Control* loop) {
loop->label_state.stack_base = __ cache_state()->stack_height();
// Before entering a loop, spill all locals to the stack, in order to free
// the cache registers, and to avoid unnecessarily reloading stack values
// into registers at branches.
// TODO(clemensh): Come up with a better strategy here, involving
// pre-analysis of the function.
__ SpillLocals();
// Loop labels bind at the beginning of the block.
__ bind(loop->label.get());
// Save the current cache state for the merge when jumping to this loop.
loop->label_state.Split(*__ cache_state());
// Execute a stack check in the loop header.
StackCheck(decoder->position());
}
void Try(Decoder* decoder, Control* block) { unsupported(decoder, "try"); }
void If(Decoder* decoder, const Value& cond, Control* if_block) {
DCHECK_EQ(if_block, decoder->control_at(0));
DCHECK(if_block->is_if());
if (if_block->start_merge.arity > 0 || if_block->end_merge.arity > 1)
return unsupported(decoder, "multi-value if");
// Allocate the else state.
if_block->else_state = base::make_unique<ElseState>();
// Test the condition, jump to else if zero.
Register value = __ PopToRegister().gp();
__ emit_cond_jump(kEqual, if_block->else_state->label.get(), kWasmI32,
value);
if_block->label_state.stack_base = __ cache_state()->stack_height();
// Store the state (after popping the value) for executing the else branch.
if_block->else_state->state.Split(*__ cache_state());
}
void FallThruTo(Decoder* decoder, Control* c) {
if (c->end_merge.reached) {
__ MergeFullStackWith(c->label_state);
} else if (c->is_onearmed_if()) {
c->label_state.InitMerge(*__ cache_state(), __ num_locals(),
c->br_merge()->arity);
__ MergeFullStackWith(c->label_state);
} else {
c->label_state.Split(*__ cache_state());
}
TraceCacheState(decoder);
}
void PopControl(Decoder* decoder, Control* c) {
if (!c->is_loop() && c->end_merge.reached) {
__ cache_state()->Steal(c->label_state);
}
if (!c->label.get()->is_bound()) {
__ bind(c->label.get());
}
}
void EndControl(Decoder* decoder, Control* c) {}
enum CCallReturn : bool { kHasReturn = true, kNoReturn = false };
void GenerateCCall(const LiftoffRegister* result_regs, FunctionSig* sig,
ValueType out_argument_type,
const LiftoffRegister* arg_regs,
ExternalReference ext_ref) {
static constexpr int kMaxReturns = 1;
static constexpr int kMaxArgs = 2;
static constexpr MachineType kReps[]{
MachineType::Uint32(), MachineType::Pointer(), MachineType::Pointer()};
static_assert(arraysize(kReps) == kMaxReturns + kMaxArgs, "mismatch");
const bool has_out_argument = out_argument_type != kWasmStmt;
const uint32_t num_returns = static_cast<uint32_t>(sig->return_count());
// {total_num_args} is {num_args + 1} if the return value is stored in an
// out parameter, or {num_args} otherwise.
const uint32_t num_args = static_cast<uint32_t>(sig->parameter_count());
const uint32_t total_num_args = num_args + has_out_argument;
DCHECK_LE(num_args, kMaxArgs);
DCHECK_LE(num_returns, kMaxReturns);
MachineSignature machine_sig(num_returns, total_num_args,
kReps + (kMaxReturns - num_returns));
auto* call_descriptor = compiler::Linkage::GetSimplifiedCDescriptor(
compilation_zone_, &machine_sig);
// Before making a call, spill all cache registers.
__ SpillAllRegisters();
// Store arguments on our stack, then align the stack for calling to C.
__ PrepareCCall(sig, arg_regs, out_argument_type);
// The arguments to the c function are pointers to the stack slots we just
// pushed.
int num_stack_params = 0; // Number of stack parameters.
int input_idx = 1; // Input 0 is the call target.
int param_byte_offset = 0; // Byte offset into the pushed arguments.
auto add_argument = [&](ValueType arg_type) {
compiler::LinkageLocation loc =
call_descriptor->GetInputLocation(input_idx);
param_byte_offset +=
RoundUp<kPointerSize>(WasmOpcodes::MemSize(arg_type));
++input_idx;
if (loc.IsRegister()) {
Register reg = Register::from_code(loc.AsRegister());
// Load address of that parameter to the register.
__ SetCCallRegParamAddr(reg, param_byte_offset, arg_type);
} else {
DCHECK(loc.IsCallerFrameSlot());
__ SetCCallStackParamAddr(num_stack_params, param_byte_offset,
arg_type);
++num_stack_params;
}
};
for (ValueType arg_type : sig->parameters()) {
add_argument(arg_type);
}
if (has_out_argument) {
add_argument(out_argument_type);
}
DCHECK_EQ(input_idx, call_descriptor->InputCount());
// Now execute the call.
uint32_t c_call_arg_count =
static_cast<uint32_t>(sig->parameter_count()) + has_out_argument;
__ CallC(ext_ref, c_call_arg_count);
// Reset the stack pointer.
__ FinishCCall();
// Load return value.
const LiftoffRegister* next_result_reg = result_regs;
if (sig->return_count() > 0) {
DCHECK_EQ(1, sig->return_count());
compiler::LinkageLocation return_loc =
call_descriptor->GetReturnLocation(0);
DCHECK(return_loc.IsRegister());
Register return_reg = Register::from_code(return_loc.AsRegister());
if (return_reg != next_result_reg->gp()) {
__ Move(*next_result_reg, LiftoffRegister(return_reg),
sig->GetReturn(0));
}
++next_result_reg;
}
// Load potential return value from output argument.
if (has_out_argument) {
__ LoadCCallOutArgument(*next_result_reg, out_argument_type,
param_byte_offset);
}
}
template <ValueType src_type, ValueType result_type, class EmitFn>
void EmitUnOp(EmitFn fn) {
static RegClass src_rc = reg_class_for(src_type);
static RegClass result_rc = reg_class_for(result_type);
LiftoffRegList pinned;
LiftoffRegister src = pinned.set(__ PopToRegister(pinned));
LiftoffRegister dst = src_rc == result_rc
? __ GetUnusedRegister(result_rc, {src}, pinned)
: __ GetUnusedRegister(result_rc, pinned);
fn(dst, src);
__ PushRegister(result_type, dst);
}
void EmitI32UnOpWithCFallback(bool (LiftoffAssembler::*emit_fn)(Register,
Register),
ExternalReference (*fallback_fn)(Isolate*)) {
auto emit_with_c_fallback = [=](LiftoffRegister dst, LiftoffRegister src) {
if (emit_fn && (asm_->*emit_fn)(dst.gp(), src.gp())) return;
ExternalReference ext_ref = fallback_fn(asm_->isolate());
ValueType sig_i_i_reps[] = {kWasmI32, kWasmI32};
FunctionSig sig_i_i(1, 1, sig_i_i_reps);
GenerateCCall(&dst, &sig_i_i, kWasmStmt, &src, ext_ref);
};
EmitUnOp<kWasmI32, kWasmI32>(emit_with_c_fallback);
}
void EmitTypeConversion(WasmOpcode opcode, ValueType dst_type,
ValueType src_type,
ExternalReference (*fallback_fn)(Isolate*)) {
RegClass src_rc = reg_class_for(src_type);
RegClass dst_rc = reg_class_for(dst_type);
LiftoffRegList pinned;
LiftoffRegister src = pinned.set(__ PopToRegister());
LiftoffRegister dst = src_rc == dst_rc
? __ GetUnusedRegister(dst_rc, {src}, pinned)
: __ GetUnusedRegister(dst_rc, pinned);
if (!__ emit_type_conversion(opcode, dst, src)) {
DCHECK_NOT_NULL(fallback_fn);
ExternalReference ext_ref = fallback_fn(asm_->isolate());
ValueType sig_reps[] = {src_type};
FunctionSig sig(0, 1, sig_reps);
GenerateCCall(&dst, &sig, dst_type, &src, ext_ref);
}
__ PushRegister(dst_type, dst);
}
void UnOp(Decoder* decoder, WasmOpcode opcode, FunctionSig*,
const Value& value, Value* result) {
#define CASE_I32_UNOP(opcode, fn) \
case WasmOpcode::kExpr##opcode: \
EmitUnOp<kWasmI32, kWasmI32>( \
[=](LiftoffRegister dst, LiftoffRegister src) { \
__ emit_##fn(dst.gp(), src.gp()); \
}); \
break;
#define CASE_FLOAT_UNOP(opcode, type, fn) \
case WasmOpcode::kExpr##opcode: \
EmitUnOp<kWasm##type, kWasm##type>( \
[=](LiftoffRegister dst, LiftoffRegister src) { \
__ emit_##fn(dst.fp(), src.fp()); \
}); \
break;
#define CASE_TYPE_CONVERSION(opcode, dst_type, src_type, ext_ref) \
case WasmOpcode::kExpr##opcode: \
EmitTypeConversion(kExpr##opcode, kWasm##dst_type, kWasm##src_type, \
ext_ref); \
break;
switch (opcode) {
CASE_I32_UNOP(I32Eqz, i32_eqz)
CASE_I32_UNOP(I32Clz, i32_clz)
CASE_I32_UNOP(I32Ctz, i32_ctz)
CASE_FLOAT_UNOP(F32Abs, F32, f32_abs)
CASE_FLOAT_UNOP(F32Neg, F32, f32_neg)
CASE_FLOAT_UNOP(F32Ceil, F32, f32_ceil)
CASE_FLOAT_UNOP(F32Floor, F32, f32_floor)
CASE_FLOAT_UNOP(F32Trunc, F32, f32_trunc)
CASE_FLOAT_UNOP(F32NearestInt, F32, f32_nearest_int)
CASE_FLOAT_UNOP(F32Sqrt, F32, f32_sqrt)
CASE_FLOAT_UNOP(F64Abs, F64, f64_abs)
CASE_FLOAT_UNOP(F64Neg, F64, f64_neg)
CASE_FLOAT_UNOP(F64Ceil, F64, f64_ceil)
CASE_FLOAT_UNOP(F64Floor, F64, f64_floor)
CASE_FLOAT_UNOP(F64Trunc, F64, f64_trunc)
CASE_FLOAT_UNOP(F64NearestInt, F64, f64_nearest_int)
CASE_FLOAT_UNOP(F64Sqrt, F64, f64_sqrt)
CASE_TYPE_CONVERSION(I32ConvertI64, I32, I64, nullptr)
CASE_TYPE_CONVERSION(I32ReinterpretF32, I32, F32, nullptr)
CASE_TYPE_CONVERSION(I64SConvertI32, I64, I32, nullptr)
CASE_TYPE_CONVERSION(I64UConvertI32, I64, I32, nullptr)
CASE_TYPE_CONVERSION(I64ReinterpretF64, I64, F64, nullptr)
CASE_TYPE_CONVERSION(F32SConvertI32, F32, I32, nullptr)
CASE_TYPE_CONVERSION(F32UConvertI32, F32, I32, nullptr)
CASE_TYPE_CONVERSION(F32SConvertI64, F32, I64,
&ExternalReference::wasm_int64_to_float32)
CASE_TYPE_CONVERSION(F32UConvertI64, F32, I64,
&ExternalReference::wasm_uint64_to_float32)
CASE_TYPE_CONVERSION(F32ConvertF64, F32, F64, nullptr)
CASE_TYPE_CONVERSION(F32ReinterpretI32, F32, I32, nullptr)
CASE_TYPE_CONVERSION(F64SConvertI32, F64, I32, nullptr)
CASE_TYPE_CONVERSION(F64UConvertI32, F64, I32, nullptr)
CASE_TYPE_CONVERSION(F64SConvertI64, F64, I64,
&ExternalReference::wasm_int64_to_float64)
CASE_TYPE_CONVERSION(F64UConvertI64, F64, I64,
&ExternalReference::wasm_uint64_to_float64)
CASE_TYPE_CONVERSION(F64ConvertF32, F64, F32, nullptr)
CASE_TYPE_CONVERSION(F64ReinterpretI64, F64, I64, nullptr)
case kExprI32Popcnt:
EmitI32UnOpWithCFallback(&LiftoffAssembler::emit_i32_popcnt,
&ExternalReference::wasm_word32_popcnt);
break;
case WasmOpcode::kExprI64Eqz:
EmitUnOp<kWasmI64, kWasmI32>(
[=](LiftoffRegister dst, LiftoffRegister src) {
__ emit_i64_eqz(dst.gp(), src);
});
break;
default:
return unsupported(decoder, WasmOpcodes::OpcodeName(opcode));
}
#undef CASE_I32_UNOP
#undef CASE_FLOAT_UNOP
#undef CASE_TYPE_CONVERSION
}
template <ValueType src_type, ValueType result_type, typename EmitFn>
void EmitBinOp(EmitFn fn) {
static constexpr RegClass src_rc = reg_class_for(src_type);
static constexpr RegClass result_rc = reg_class_for(result_type);
LiftoffRegList pinned;
LiftoffRegister rhs = pinned.set(__ PopToRegister(pinned));
LiftoffRegister lhs = pinned.set(__ PopToRegister(pinned));
LiftoffRegister dst =
src_rc == result_rc
? __ GetUnusedRegister(result_rc, {lhs, rhs}, pinned)
: __ GetUnusedRegister(result_rc);
fn(dst, lhs, rhs);
__ PushRegister(result_type, dst);
}
void BinOp(Decoder* decoder, WasmOpcode opcode, FunctionSig*,
const Value& lhs, const Value& rhs, Value* result) {
#define CASE_I32_BINOP(opcode, fn) \
case WasmOpcode::kExpr##opcode: \
return EmitBinOp<kWasmI32, kWasmI32>( \
[=](LiftoffRegister dst, LiftoffRegister lhs, LiftoffRegister rhs) { \
__ emit_##fn(dst.gp(), lhs.gp(), rhs.gp()); \
});
#define CASE_I64_BINOP(opcode, fn) \
case WasmOpcode::kExpr##opcode: \
return EmitBinOp<kWasmI64, kWasmI64>( \
[=](LiftoffRegister dst, LiftoffRegister lhs, LiftoffRegister rhs) { \
__ emit_##fn(dst, lhs, rhs); \
});
#define CASE_FLOAT_BINOP(opcode, type, fn) \
case WasmOpcode::kExpr##opcode: \
return EmitBinOp<kWasm##type, kWasm##type>( \
[=](LiftoffRegister dst, LiftoffRegister lhs, LiftoffRegister rhs) { \
__ emit_##fn(dst.fp(), lhs.fp(), rhs.fp()); \
});
#define CASE_I32_CMPOP(opcode, cond) \
case WasmOpcode::kExpr##opcode: \
return EmitBinOp<kWasmI32, kWasmI32>( \
[=](LiftoffRegister dst, LiftoffRegister lhs, LiftoffRegister rhs) { \
__ emit_i32_set_cond(cond, dst.gp(), lhs.gp(), rhs.gp()); \
});
#define CASE_I64_CMPOP(opcode, cond) \
case WasmOpcode::kExpr##opcode: \
return EmitBinOp<kWasmI64, kWasmI32>( \
[=](LiftoffRegister dst, LiftoffRegister lhs, LiftoffRegister rhs) { \
__ emit_i64_set_cond(cond, dst.gp(), lhs, rhs); \
});
#define CASE_F32_CMPOP(opcode, cond) \
case WasmOpcode::kExpr##opcode: \
return EmitBinOp<kWasmF32, kWasmI32>( \
[=](LiftoffRegister dst, LiftoffRegister lhs, LiftoffRegister rhs) { \
__ emit_f32_set_cond(cond, dst.gp(), lhs.fp(), rhs.fp()); \
});
#define CASE_F64_CMPOP(opcode, cond) \
case WasmOpcode::kExpr##opcode: \
return EmitBinOp<kWasmF64, kWasmI32>( \
[=](LiftoffRegister dst, LiftoffRegister lhs, LiftoffRegister rhs) { \
__ emit_f64_set_cond(cond, dst.gp(), lhs.fp(), rhs.fp()); \
});
#define CASE_I32_SHIFTOP(opcode, fn) \
case WasmOpcode::kExpr##opcode: \
return EmitBinOp<kWasmI32, kWasmI32>( \
[=](LiftoffRegister dst, LiftoffRegister lhs, LiftoffRegister rhs) { \
__ emit_##fn(dst.gp(), lhs.gp(), rhs.gp(), {}); \
});
#define CASE_I64_SHIFTOP(opcode, fn) \
case WasmOpcode::kExpr##opcode: \
return EmitBinOp<kWasmI64, kWasmI64>([=](LiftoffRegister dst, \
LiftoffRegister src, \
LiftoffRegister amount) { \
__ emit_##fn(dst, src, amount.is_pair() ? amount.low_gp() : amount.gp(), \
{}); \
});
#define CASE_CCALL_BINOP(opcode, type, ext_ref_fn) \
case WasmOpcode::kExpr##opcode: \
return EmitBinOp<kWasmI32, kWasmI32>( \
[=](LiftoffRegister dst, LiftoffRegister lhs, LiftoffRegister rhs) { \
LiftoffRegister args[] = {lhs, rhs}; \
auto ext_ref = ExternalReference::ext_ref_fn(__ isolate()); \
ValueType sig_i_ii_reps[] = {kWasmI32, kWasmI32, kWasmI32}; \
FunctionSig sig_i_ii(1, 2, sig_i_ii_reps); \
GenerateCCall(&dst, &sig_i_ii, kWasmStmt, args, ext_ref); \
});
switch (opcode) {
CASE_I32_BINOP(I32Add, i32_add)
CASE_I32_BINOP(I32Sub, i32_sub)
CASE_I32_BINOP(I32Mul, i32_mul)
CASE_I32_BINOP(I32And, i32_and)
CASE_I32_BINOP(I32Ior, i32_or)
CASE_I32_BINOP(I32Xor, i32_xor)
CASE_I64_BINOP(I64And, i64_and)
CASE_I64_BINOP(I64Ior, i64_or)
CASE_I64_BINOP(I64Xor, i64_xor)
CASE_I32_CMPOP(I32Eq, kEqual)
CASE_I32_CMPOP(I32Ne, kUnequal)
CASE_I32_CMPOP(I32LtS, kSignedLessThan)
CASE_I32_CMPOP(I32LtU, kUnsignedLessThan)
CASE_I32_CMPOP(I32GtS, kSignedGreaterThan)
CASE_I32_CMPOP(I32GtU, kUnsignedGreaterThan)
CASE_I32_CMPOP(I32LeS, kSignedLessEqual)
CASE_I32_CMPOP(I32LeU, kUnsignedLessEqual)
CASE_I32_CMPOP(I32GeS, kSignedGreaterEqual)
CASE_I32_CMPOP(I32GeU, kUnsignedGreaterEqual)
CASE_I64_BINOP(I64Add, i64_add)
CASE_I64_BINOP(I64Sub, i64_sub)
CASE_I64_CMPOP(I64Eq, kEqual)
CASE_I64_CMPOP(I64Ne, kUnequal)
CASE_I64_CMPOP(I64LtS, kSignedLessThan)
CASE_I64_CMPOP(I64LtU, kUnsignedLessThan)
CASE_I64_CMPOP(I64GtS, kSignedGreaterThan)
CASE_I64_CMPOP(I64GtU, kUnsignedGreaterThan)
CASE_I64_CMPOP(I64LeS, kSignedLessEqual)
CASE_I64_CMPOP(I64LeU, kUnsignedLessEqual)
CASE_I64_CMPOP(I64GeS, kSignedGreaterEqual)
CASE_I64_CMPOP(I64GeU, kUnsignedGreaterEqual)
CASE_F32_CMPOP(F32Eq, kEqual)
CASE_F32_CMPOP(F32Ne, kUnequal)
CASE_F32_CMPOP(F32Lt, kUnsignedLessThan)
CASE_F32_CMPOP(F32Gt, kUnsignedGreaterThan)
CASE_F32_CMPOP(F32Le, kUnsignedLessEqual)
CASE_F32_CMPOP(F32Ge, kUnsignedGreaterEqual)
CASE_F64_CMPOP(F64Eq, kEqual)
CASE_F64_CMPOP(F64Ne, kUnequal)
CASE_F64_CMPOP(F64Lt, kUnsignedLessThan)
CASE_F64_CMPOP(F64Gt, kUnsignedGreaterThan)
CASE_F64_CMPOP(F64Le, kUnsignedLessEqual)
CASE_F64_CMPOP(F64Ge, kUnsignedGreaterEqual)
CASE_I32_SHIFTOP(I32Shl, i32_shl)
CASE_I32_SHIFTOP(I32ShrS, i32_sar)
CASE_I32_SHIFTOP(I32ShrU, i32_shr)
CASE_I64_SHIFTOP(I64Shl, i64_shl)
CASE_I64_SHIFTOP(I64ShrS, i64_sar)
CASE_I64_SHIFTOP(I64ShrU, i64_shr)
CASE_CCALL_BINOP(I32Rol, I32, wasm_word32_rol)
CASE_CCALL_BINOP(I32Ror, I32, wasm_word32_ror)
CASE_FLOAT_BINOP(F32Add, F32, f32_add)
CASE_FLOAT_BINOP(F32Sub, F32, f32_sub)
CASE_FLOAT_BINOP(F32Mul, F32, f32_mul)
CASE_FLOAT_BINOP(F32Div, F32, f32_div)
CASE_FLOAT_BINOP(F64Add, F64, f64_add)
CASE_FLOAT_BINOP(F64Sub, F64, f64_sub)
CASE_FLOAT_BINOP(F64Mul, F64, f64_mul)
CASE_FLOAT_BINOP(F64Div, F64, f64_div)
default:
return unsupported(decoder, WasmOpcodes::OpcodeName(opcode));
}
#undef CASE_I32_BINOP
#undef CASE_I64_BINOP
#undef CASE_FLOAT_BINOP
#undef CASE_I32_CMPOP
#undef CASE_I64_CMPOP
#undef CASE_F32_CMPOP
#undef CASE_F64_CMPOP
#undef CASE_I32_SHIFTOP
#undef CASE_I64_SHIFTOP
#undef CASE_CCALL_BINOP
}
void I32Const(Decoder* decoder, Value* result, int32_t value) {
__ cache_state()->stack_state.emplace_back(kWasmI32, value);
}
void I64Const(Decoder* decoder, Value* result, int64_t value) {
// The {VarState} stores constant values as int32_t, thus we only store
// 64-bit constants in this field if it fits in an int32_t. Larger values
// cannot be used as immediate value anyway, so we can also just put them in
// a register immediately.
int32_t value_i32 = static_cast<int32_t>(value);
if (value_i32 == value) {
__ cache_state()->stack_state.emplace_back(kWasmI64, value_i32);
} else {
LiftoffRegister reg = __ GetUnusedRegister(reg_class_for(kWasmI64));
__ LoadConstant(reg, WasmValue(value));
__ PushRegister(kWasmI64, reg);
}
}
void F32Const(Decoder* decoder, Value* result, float value) {
LiftoffRegister reg = __ GetUnusedRegister(kFpReg);
__ LoadConstant(reg, WasmValue(value));
__ PushRegister(kWasmF32, reg);
}
void F64Const(Decoder* decoder, Value* result, double value) {
LiftoffRegister reg = __ GetUnusedRegister(kFpReg);
__ LoadConstant(reg, WasmValue(value));
__ PushRegister(kWasmF64, reg);
}
void RefNull(Decoder* decoder, Value* result) {
unsupported(decoder, "ref_null");
}
void Drop(Decoder* decoder, const Value& value) {
__ DropStackSlot(&__ cache_state()->stack_state.back());
__ cache_state()->stack_state.pop_back();
}
void DoReturn(Decoder* decoder, Vector<Value> values, bool implicit) {
if (implicit) {
DCHECK_EQ(1, decoder->control_depth());
Control* func_block = decoder->control_at(0);
__ bind(func_block->label.get());
__ cache_state()->Steal(func_block->label_state);
}
if (!values.is_empty()) {
if (values.size() > 1) return unsupported(decoder, "multi-return");
LiftoffRegister reg = __ PopToRegister();
__ MoveToReturnRegister(reg, values[0].type);
}
__ LeaveFrame(StackFrame::WASM_COMPILED);
__ DropStackSlotsAndRet(
static_cast<uint32_t>(descriptor_->StackParameterCount()));
}
void GetLocal(Decoder* decoder, Value* result,
const LocalIndexOperand<validate>& operand) {
auto& slot = __ cache_state()->stack_state[operand.index];
DCHECK_EQ(slot.type(), operand.type);
switch (slot.loc()) {
case kRegister:
__ PushRegister(slot.type(), slot.reg());
break;
case KIntConst:
__ cache_state()->stack_state.emplace_back(operand.type,
slot.i32_const());
break;
case kStack: {
auto rc = reg_class_for(operand.type);
LiftoffRegister reg = __ GetUnusedRegister(rc);
__ Fill(reg, operand.index, operand.type);
__ PushRegister(slot.type(), reg);
break;
}
}
}
void SetLocalFromStackSlot(LiftoffAssembler::VarState& dst_slot,
uint32_t local_index) {
auto& state = *__ cache_state();
ValueType type = dst_slot.type();
if (dst_slot.is_reg()) {
LiftoffRegister slot_reg = dst_slot.reg();
if (state.get_use_count(slot_reg) == 1) {
__ Fill(dst_slot.reg(), state.stack_height() - 1, type);
return;
}
state.dec_used(slot_reg);
}
DCHECK_EQ(type, __ local_type(local_index));
RegClass rc = reg_class_for(type);
LiftoffRegister dst_reg = __ GetUnusedRegister(rc);
__ Fill(dst_reg, __ cache_state()->stack_height() - 1, type);
dst_slot = LiftoffAssembler::VarState(type, dst_reg);
__ cache_state()->inc_used(dst_reg);
}
void SetLocal(uint32_t local_index, bool is_tee) {
auto& state = *__ cache_state();
auto& source_slot = state.stack_state.back();
auto& target_slot = state.stack_state[local_index];
switch (source_slot.loc()) {
case kRegister:
__ DropStackSlot(&target_slot);
target_slot = source_slot;
if (is_tee) state.inc_used(target_slot.reg());
break;
case KIntConst:
__ DropStackSlot(&target_slot);
target_slot = source_slot;
break;
case kStack:
SetLocalFromStackSlot(target_slot, local_index);
break;
}
if (!is_tee) __ cache_state()->stack_state.pop_back();
}
void SetLocal(Decoder* decoder, const Value& value,
const LocalIndexOperand<validate>& operand) {
SetLocal(operand.index, false);
}
void TeeLocal(Decoder* decoder, const Value& value, Value* result,
const LocalIndexOperand<validate>& operand) {
SetLocal(operand.index, true);
}
void GetGlobal(Decoder* decoder, Value* result,
const GlobalIndexOperand<validate>& operand) {
const auto* global = &env_->module->globals[operand.index];
if (!CheckSupportedType(decoder, kTypes_ilfd, global->type, "global"))
return;
LiftoffRegList pinned;
LiftoffRegister addr = pinned.set(__ GetUnusedRegister(kGpReg));
LOAD_INSTANCE_FIELD(addr, GlobalsStart, kPointerLoadType);
LiftoffRegister value =
pinned.set(__ GetUnusedRegister(reg_class_for(global->type), pinned));
LoadType type = LoadType::ForValueType(global->type);
__ Load(value, addr.gp(), no_reg, global->offset, type, pinned);
__ PushRegister(global->type, value);
}
void SetGlobal(Decoder* decoder, const Value& value,
const GlobalIndexOperand<validate>& operand) {
auto* global = &env_->module->globals[operand.index];
if (!CheckSupportedType(decoder, kTypes_ilfd, global->type, "global"))
return;
LiftoffRegList pinned;
LiftoffRegister addr = pinned.set(__ GetUnusedRegister(kGpReg));
LOAD_INSTANCE_FIELD(addr, GlobalsStart, kPointerLoadType);
LiftoffRegister reg = pinned.set(__ PopToRegister(pinned));
StoreType type = StoreType::ForValueType(global->type);
__ Store(addr.gp(), no_reg, global->offset, reg, type, pinned);
}
void Unreachable(Decoder* decoder) { unsupported(decoder, "unreachable"); }
void Select(Decoder* decoder, const Value& cond, const Value& fval,
const Value& tval, Value* result) {
unsupported(decoder, "select");
}
void Br(Control* target) {
if (!target->br_merge()->reached) {
target->label_state.InitMerge(*__ cache_state(), __ num_locals(),
target->br_merge()->arity);
}
__ MergeStackWith(target->label_state, target->br_merge()->arity);
__ jmp(target->label.get());
}
void Br(Decoder* decoder, Control* target) {
Br(target);
}
void BrIf(Decoder* decoder, const Value& cond, Control* target) {
Label cont_false;
Register value = __ PopToRegister().gp();
__ emit_cond_jump(kEqual, &cont_false, kWasmI32, value);
Br(target);
__ bind(&cont_false);
}
// Generate a branch table case, potentially reusing previously generated
// stack transfer code.
void GenerateBrCase(Decoder* decoder, uint32_t br_depth,
std::map<uint32_t, MovableLabel>& br_targets) {
MovableLabel& label = br_targets[br_depth];
if (label.get()->is_bound()) {
__ jmp(label.get());
} else {
__ bind(label.get());
Br(decoder->control_at(br_depth));
}
}
// Generate a branch table for input in [min, max).
// TODO(wasm): Generate a real branch table (like TF TableSwitch).
void GenerateBrTable(Decoder* decoder, LiftoffRegister tmp,
LiftoffRegister value, uint32_t min, uint32_t max,
BranchTableIterator<validate>& table_iterator,
std::map<uint32_t, MovableLabel>& br_targets) {
DCHECK_LT(min, max);
// Check base case.
if (max == min + 1) {
DCHECK_EQ(min, table_iterator.cur_index());
GenerateBrCase(decoder, table_iterator.next(), br_targets);
return;
}
uint32_t split = min + (max - min) / 2;
Label upper_half;
__ LoadConstant(tmp, WasmValue(split));
__ emit_cond_jump(kUnsignedGreaterEqual, &upper_half, kWasmI32, value.gp(),
tmp.gp());
// Emit br table for lower half:
GenerateBrTable(decoder, tmp, value, min, split, table_iterator,
br_targets);
__ bind(&upper_half);
// Emit br table for upper half:
GenerateBrTable(decoder, tmp, value, split, max, table_iterator,
br_targets);
}
void BrTable(Decoder* decoder, const BranchTableOperand<validate>& operand,
const Value& key) {
LiftoffRegList pinned;
LiftoffRegister value = pinned.set(__ PopToRegister());
BranchTableIterator<validate> table_iterator(decoder, operand);
std::map<uint32_t, MovableLabel> br_targets;
if (operand.table_count > 0) {
LiftoffRegister tmp = __ GetUnusedRegister(kGpReg, pinned);
__ LoadConstant(tmp, WasmValue(uint32_t{operand.table_count}));
Label case_default;
__ emit_cond_jump(kUnsignedGreaterEqual, &case_default, kWasmI32,
value.gp(), tmp.gp());
GenerateBrTable(decoder, tmp, value, 0, operand.table_count,
table_iterator, br_targets);
__ bind(&case_default);
}
// Generate the default case.
GenerateBrCase(decoder, table_iterator.next(), br_targets);
DCHECK(!table_iterator.has_next());
}
void Else(Decoder* decoder, Control* if_block) {
if (if_block->reachable()) __ emit_jump(if_block->label.get());
__ bind(if_block->else_state->label.get());
__ cache_state()->Steal(if_block->else_state->state);
}
Label* AddOutOfLineTrap(wasm::WasmCodePosition position,
Builtins::Name builtin, uint32_t pc = 0) {
DCHECK(!FLAG_wasm_no_bounds_checks);
// The pc is needed for memory OOB trap with trap handler enabled. Other
// callers should not even compute it.
DCHECK_EQ(pc != 0, builtin == Builtins::kThrowWasmTrapMemOutOfBounds &&
env_->use_trap_handler);
out_of_line_code_.push_back(OutOfLineCode::Trap(builtin, position, pc));
return out_of_line_code_.back().label.get();
}
// Returns true if the memory access is statically known to be out of bounds
// (a jump to the trap was generated then); return false otherwise.
bool BoundsCheckMem(Decoder* decoder, uint32_t access_size, uint32_t offset,
Register index, LiftoffRegList pinned) {
const bool statically_oob =
access_size > max_size_ || offset > max_size_ - access_size;
if (!statically_oob &&
(FLAG_wasm_no_bounds_checks || env_->use_trap_handler)) {
return false;
}
// TODO(eholk): This adds protected instruction information for the jump
// instruction we are about to generate. It would be better to just not add
// protected instruction info when the pc is 0.
Label* trap_label = AddOutOfLineTrap(
decoder->position(), Builtins::kThrowWasmTrapMemOutOfBounds,
env_->use_trap_handler ? __ pc_offset() : 0);
if (statically_oob) {
__ emit_jump(trap_label);
Control* current_block = decoder->control_at(0);
if (current_block->reachable()) {
current_block->reachability = kSpecOnlyReachable;
}
return true;
}
DCHECK(!env_->use_trap_handler);
DCHECK(!FLAG_wasm_no_bounds_checks);
uint32_t end_offset = offset + access_size - 1;
// If the end offset is larger than the smallest memory, dynamically check
// the end offset against the actual memory size, which is not known at
// compile time. Otherwise, only one check is required (see below).
LiftoffRegister end_offset_reg =
pinned.set(__ GetUnusedRegister(kGpReg, pinned));
LiftoffRegister mem_size = __ GetUnusedRegister(kGpReg, pinned);
LOAD_INSTANCE_FIELD(mem_size, MemorySize, LoadType::kI32Load);
__ LoadConstant(end_offset_reg, WasmValue(end_offset));
if (end_offset >= min_size_) {
__ emit_cond_jump(kUnsignedGreaterEqual, trap_label, kWasmI32,
end_offset_reg.gp(), mem_size.gp());
}
// Just reuse the end_offset register for computing the effective size.
LiftoffRegister effective_size_reg = end_offset_reg;
__ emit_i32_sub(effective_size_reg.gp(), mem_size.gp(),
end_offset_reg.gp());
__ emit_cond_jump(kUnsignedGreaterEqual, trap_label, kWasmI32, index,
effective_size_reg.gp());
return false;
}
void TraceMemoryOperation(bool is_store, MachineRepresentation rep,
Register index, uint32_t offset,
WasmCodePosition position) {
// Before making the runtime call, spill all cache registers.
__ SpillAllRegisters();
LiftoffRegList pinned = LiftoffRegList::ForRegs(index);
// Get one register for computing the address (offset + index).
LiftoffRegister address = pinned.set(__ GetUnusedRegister(kGpReg, pinned));
// Compute offset+index in address.
__ LoadConstant(address, WasmValue(offset));
__ emit_i32_add(address.gp(), address.gp(), index);
// Get a register to hold the stack slot for wasm::MemoryTracingInfo.
LiftoffRegister info = pinned.set(__ GetUnusedRegister(kGpReg, pinned));
// Allocate stack slot for wasm::MemoryTracingInfo.
__ AllocateStackSlot(info.gp(), sizeof(wasm::MemoryTracingInfo));
// Now store all information into the wasm::MemoryTracingInfo struct.
__ Store(info.gp(), no_reg, offsetof(wasm::MemoryTracingInfo, address),
address, StoreType::kI32Store, pinned);
__ LoadConstant(address, WasmValue(is_store ? 1 : 0));
__ Store(info.gp(), no_reg, offsetof(wasm::MemoryTracingInfo, is_store),
address, StoreType::kI32Store8, pinned);
__ LoadConstant(address, WasmValue(static_cast<int>(rep)));
__ Store(info.gp(), no_reg, offsetof(wasm::MemoryTracingInfo, mem_rep),
address, StoreType::kI32Store8, pinned);
source_position_table_builder_->AddPosition(
__ pc_offset(), SourcePosition(position), false);
Register args[] = {info.gp()};
GenerateRuntimeCall(arraysize(args), args);
}
void GenerateRuntimeCall(int num_args, Register* args) {
auto call_descriptor = compiler::Linkage::GetRuntimeCallDescriptor(
compilation_zone_, Runtime::kWasmTraceMemory, num_args,
compiler::Operator::kNoProperties, compiler::CallDescriptor::kNoFlags);
// Currently, only one argument is supported. More arguments require some
// caution for the parallel register moves (reuse StackTransferRecipe).
DCHECK_EQ(1, num_args);
constexpr size_t kInputShift = 1; // Input 0 is the call target.
compiler::LinkageLocation param_loc =
call_descriptor->GetInputLocation(kInputShift);
if (param_loc.IsRegister()) {
Register reg = Register::from_code(param_loc.AsRegister());
__ Move(LiftoffRegister(reg), LiftoffRegister(args[0]),
LiftoffAssembler::kWasmIntPtr);
} else {
DCHECK(param_loc.IsCallerFrameSlot());
__ PushCallerFrameSlot(LiftoffRegister(args[0]),
LiftoffAssembler::kWasmIntPtr);
}
// Allocate the codegen zone if not done before.
if (!*codegen_zone_) {
codegen_zone_->reset(
new Zone(__ isolate()->allocator(), "LiftoffCodegenZone"));
}
__ CallRuntime(codegen_zone_->get(), Runtime::kWasmTraceMemory);
__ DeallocateStackSlot(sizeof(wasm::MemoryTracingInfo));
}
void LoadMem(Decoder* decoder, LoadType type,
const MemoryAccessOperand<validate>& operand,
const Value& index_val, Value* result) {
ValueType value_type = type.value_type();
if (!CheckSupportedType(decoder, kTypes_ilfd, value_type, "load")) return;
LiftoffRegList pinned;
Register index = pinned.set(__ PopToRegister()).gp();
if (BoundsCheckMem(decoder, type.size(), operand.offset, index, pinned)) {
return;
}
LiftoffRegister addr = pinned.set(__ GetUnusedRegister(kGpReg, pinned));
LOAD_INSTANCE_FIELD(addr, MemoryStart, kPointerLoadType);
RegClass rc = reg_class_for(value_type);
LiftoffRegister value = pinned.set(__ GetUnusedRegister(rc, pinned));
uint32_t protected_load_pc = 0;
__ Load(value, addr.gp(), index, operand.offset, type, pinned,
&protected_load_pc);
if (env_->use_trap_handler) {
AddOutOfLineTrap(decoder->position(),
Builtins::kThrowWasmTrapMemOutOfBounds,
protected_load_pc);
}
__ PushRegister(value_type, value);
if (FLAG_wasm_trace_memory) {
TraceMemoryOperation(false, type.mem_type().representation(), index,
operand.offset, decoder->position());
}
}
void StoreMem(Decoder* decoder, StoreType type,
const MemoryAccessOperand<validate>& operand,
const Value& index_val, const Value& value_val) {
ValueType value_type = type.value_type();
if (!CheckSupportedType(decoder, kTypes_ilfd, value_type, "store")) return;
LiftoffRegList pinned;
LiftoffRegister value = pinned.set(__ PopToRegister());
Register index = pinned.set(__ PopToRegister(pinned)).gp();
if (BoundsCheckMem(decoder, type.size(), operand.offset, index, pinned)) {
return;
}
LiftoffRegister addr = pinned.set(__ GetUnusedRegister(kGpReg, pinned));
LOAD_INSTANCE_FIELD(addr, MemoryStart, kPointerLoadType);
uint32_t protected_store_pc = 0;
__ Store(addr.gp(), index, operand.offset, value, type, pinned,
&protected_store_pc);
if (env_->use_trap_handler) {
AddOutOfLineTrap(decoder->position(),
Builtins::kThrowWasmTrapMemOutOfBounds,
protected_store_pc);
}
if (FLAG_wasm_trace_memory) {
TraceMemoryOperation(true, type.mem_rep(), index, operand.offset,
decoder->position());
}
}
void CurrentMemoryPages(Decoder* decoder, Value* result) {
unsupported(decoder, "current_memory");
}
void GrowMemory(Decoder* decoder, const Value& value, Value* result) {
unsupported(decoder, "grow_memory");
}
void CallDirect(Decoder* decoder,
const CallFunctionOperand<validate>& operand,
const Value args[], Value returns[]) {
if (operand.sig->return_count() > 1)
return unsupported(decoder, "multi-return");
if (operand.sig->return_count() == 1 &&
!CheckSupportedType(decoder, kTypes_ilfd, operand.sig->GetReturn(0),
"return"))
return;
auto call_descriptor =
compiler::GetWasmCallDescriptor(compilation_zone_, operand.sig);
call_descriptor =
GetLoweredCallDescriptor(compilation_zone_, call_descriptor);
if (operand.index < env_->module->num_imported_functions) {
// A direct call to an imported function.
LiftoffRegList pinned;
LiftoffRegister tmp = pinned.set(__ GetUnusedRegister(kGpReg, pinned));
LiftoffRegister target = pinned.set(__ GetUnusedRegister(kGpReg, pinned));
LiftoffRegister imported_targets = tmp;
LOAD_INSTANCE_FIELD(imported_targets, ImportedFunctionTargets,
kPointerLoadType);
__ Load(target, imported_targets.gp(), no_reg,
operand.index * sizeof(Address), kPointerLoadType, pinned);
LiftoffRegister imported_instances = tmp;
LOAD_INSTANCE_FIELD(imported_instances, ImportedFunctionInstances,
kPointerLoadType);
LiftoffRegister target_instance = tmp;
__ Load(target_instance, imported_instances.gp(), no_reg,
compiler::FixedArrayOffsetMinusTag(operand.index),
kPointerLoadType, pinned);
LiftoffRegister* explicit_instance = &target_instance;
Register target_reg = target.gp();
__ PrepareCall(operand.sig, call_descriptor, &target_reg,
explicit_instance);
source_position_table_builder_->AddPosition(
__ pc_offset(), SourcePosition(decoder->position()), false);
__ CallIndirect(operand.sig, call_descriptor, target_reg);
safepoint_table_builder_.DefineSafepoint(asm_, Safepoint::kSimple, 0,
Safepoint::kNoLazyDeopt);
__ FinishCall(operand.sig, call_descriptor);
} else {
// A direct call within this module just gets the current instance.
__ PrepareCall(operand.sig, call_descriptor);
source_position_table_builder_->AddPosition(
__ pc_offset(), SourcePosition(decoder->position()), false);
// Just encode the function index. This will be patched at instantiation.
Address addr = reinterpret_cast<Address>(operand.index);
__ CallNativeWasmCode(addr);
safepoint_table_builder_.DefineSafepoint(asm_, Safepoint::kSimple, 0,
Safepoint::kNoLazyDeopt);
__ FinishCall(operand.sig, call_descriptor);
}
}
void CallIndirect(Decoder* decoder, const Value& index_val,
const CallIndirectOperand<validate>& operand,
const Value args[], Value returns[]) {
if (operand.sig->return_count() > 1) {
return unsupported(decoder, "multi-return");
}
if (operand.sig->return_count() == 1 &&
!CheckSupportedType(decoder, kTypes_ilfd, operand.sig->GetReturn(0),
"return")) {
return;
}
// Pop the index.
LiftoffRegister index = __ PopToRegister();
// If that register is still being used after popping, we move it to another
// register, because we want to modify that register.
if (__ cache_state()->is_used(index)) {
LiftoffRegister new_index =
__ GetUnusedRegister(kGpReg, LiftoffRegList::ForRegs(index));
__ Move(new_index, index, kWasmI32);
index = new_index;
}
LiftoffRegList pinned = LiftoffRegList::ForRegs(index);
// Get three temporary registers.
LiftoffRegister table = pinned.set(__ GetUnusedRegister(kGpReg, pinned));
LiftoffRegister tmp_const =
pinned.set(__ GetUnusedRegister(kGpReg, pinned));
LiftoffRegister scratch = pinned.set(__ GetUnusedRegister(kGpReg, pinned));
// Bounds check against the table size.
Label* invalid_func_label = AddOutOfLineTrap(
decoder->position(), Builtins::kThrowWasmTrapFuncInvalid);
uint32_t canonical_sig_num = env_->module->signature_ids[operand.sig_index];
DCHECK_GE(canonical_sig_num, 0);
DCHECK_GE(kMaxInt, canonical_sig_num);
// Compare against table size stored in
// {instance->indirect_function_table_size}.
LOAD_INSTANCE_FIELD(tmp_const, IndirectFunctionTableSize,
LoadType::kI32Load);
__ emit_cond_jump(kUnsignedGreaterEqual, invalid_func_label, kWasmI32,
index.gp(), tmp_const.gp());
// Load the signature from {instance->ift_sig_ids[key]}
LOAD_INSTANCE_FIELD(table, IndirectFunctionTableSigIds, kPointerLoadType);
__ LoadConstant(tmp_const,
WasmValue(static_cast<uint32_t>(sizeof(uint32_t))));
// TODO(wasm): use a emit_i32_shli() instead of a multiply.
// (currently cannot use shl on ia32/x64 because it clobbers %rcx).
__ emit_i32_mul(index.gp(), index.gp(), tmp_const.gp());
__ Load(scratch, table.gp(), index.gp(), 0, LoadType::kI32Load, pinned);
// Compare against expected signature.
__ LoadConstant(tmp_const, WasmValue(canonical_sig_num));
Label* sig_mismatch_label = AddOutOfLineTrap(
decoder->position(), Builtins::kThrowWasmTrapFuncSigMismatch);
__ emit_cond_jump(kUnequal, sig_mismatch_label,
LiftoffAssembler::kWasmIntPtr, scratch.gp(),
tmp_const.gp());
if (kPointerSize == 8) {
// {index} has already been multiplied by 4. Multiply by another 2.
__ LoadConstant(tmp_const, WasmValue(2));
__ emit_i32_mul(index.gp(), index.gp(), tmp_const.gp());
}
// Load the target from {instance->ift_targets[key]}
LOAD_INSTANCE_FIELD(table, IndirectFunctionTableTargets, kPointerLoadType);
__ Load(scratch, table.gp(), index.gp(), 0, kPointerLoadType, pinned);
// Load the instance from {instance->ift_instances[key]}
LOAD_INSTANCE_FIELD(table, IndirectFunctionTableInstances,
kPointerLoadType);
__ Load(tmp_const, table.gp(), index.gp(),
(FixedArray::kHeaderSize - kHeapObjectTag), kPointerLoadType,
pinned);
LiftoffRegister* explicit_instance = &tmp_const;
source_position_table_builder_->AddPosition(
__ pc_offset(), SourcePosition(decoder->position()), false);
auto call_descriptor =
compiler::GetWasmCallDescriptor(compilation_zone_, operand.sig);
call_descriptor =
GetLoweredCallDescriptor(compilation_zone_, call_descriptor);
Register target = scratch.gp();
__ PrepareCall(operand.sig, call_descriptor, &target, explicit_instance);
__ CallIndirect(operand.sig, call_descriptor, target);
safepoint_table_builder_.DefineSafepoint(asm_, Safepoint::kSimple, 0,
Safepoint::kNoLazyDeopt);
__ FinishCall(operand.sig, call_descriptor);
}
void SimdOp(Decoder* decoder, WasmOpcode opcode, Vector<Value> args,
Value* result) {
unsupported(decoder, "simd");
}
void SimdLaneOp(Decoder* decoder, WasmOpcode opcode,
const SimdLaneOperand<validate>& operand,
const Vector<Value> inputs, Value* result) {
unsupported(decoder, "simd");
}
void SimdShiftOp(Decoder* decoder, WasmOpcode opcode,
const SimdShiftOperand<validate>& operand,
const Value& input, Value* result) {
unsupported(decoder, "simd");
}
void Simd8x16ShuffleOp(Decoder* decoder,
const Simd8x16ShuffleOperand<validate>& operand,
const Value& input0, const Value& input1,
Value* result) {
unsupported(decoder, "simd");
}
void Throw(Decoder* decoder, const ExceptionIndexOperand<validate>&,
Control* block, const Vector<Value>& args) {
unsupported(decoder, "throw");
}
void CatchException(Decoder* decoder,
const ExceptionIndexOperand<validate>& operand,
Control* block, Vector<Value> caught_values) {
unsupported(decoder, "catch");
}
void AtomicOp(Decoder* decoder, WasmOpcode opcode, Vector<Value> args,
const MemoryAccessOperand<validate>& operand, Value* result) {
unsupported(decoder, "atomicop");
}
private:
LiftoffAssembler* const asm_;
compiler::CallDescriptor* const descriptor_;
compiler::ModuleEnv* const env_;
// {min_size_} and {max_size_} are cached values computed from the ModuleEnv.
const uint64_t min_size_;
const uint64_t max_size_;
bool ok_ = true;
std::vector<OutOfLineCode> out_of_line_code_;
SourcePositionTableBuilder* const source_position_table_builder_;
WasmCompilationData* wasm_compilation_data_;
// Zone used to store information during compilation. The result will be
// stored independently, such that this zone can die together with the
// LiftoffCompiler after compilation.
Zone* compilation_zone_;
// This zone is allocated when needed, held externally, and survives until
// code generation (in FinishCompilation).
std::unique_ptr<Zone>* codegen_zone_;
SafepointTableBuilder safepoint_table_builder_;
// The pc offset of the instructions to reserve the stack frame. Needed to
// patch the actually needed stack size in the end.
uint32_t pc_offset_stack_frame_construction_ = 0;
// Points to the cell within the {code_table_} of the NativeModule,
// which corresponds to the currently compiled function
WasmCode* const* code_table_entry_ = nullptr;
void TraceCacheState(Decoder* decoder) const {
#ifdef DEBUG
if (!FLAG_trace_liftoff || !FLAG_trace_wasm_decoder) return;
OFStream os(stdout);
for (int control_depth = decoder->control_depth() - 1; control_depth >= -1;
--control_depth) {
LiftoffAssembler::CacheState* cache_state =
control_depth == -1
? asm_->cache_state()
: &decoder->control_at(control_depth)->label_state;
bool first = true;
for (LiftoffAssembler::VarState& slot : cache_state->stack_state) {
os << (first ? "" : "-") << slot;
first = false;
}
if (control_depth != -1) PrintF("; ");
}
os << "\n";
#endif
}
};
} // namespace
} // namespace wasm
bool compiler::WasmCompilationUnit::ExecuteLiftoffCompilation() {
base::ElapsedTimer compile_timer;
if (FLAG_trace_wasm_decode_time) {
compile_timer.Start();
}
Zone zone(isolate_->allocator(), "LiftoffCompilationZone");
const wasm::WasmModule* module = env_ ? env_->module : nullptr;
auto call_descriptor = compiler::GetWasmCallDescriptor(&zone, func_body_.sig);
base::Optional<TimedHistogramScope> liftoff_compile_time_scope(
base::in_place, counters()->liftoff_compile_time());
wasm::WasmCode* const* code_table_entry =
native_module_->code_table().data() + func_index_;
wasm::WasmFullDecoder<wasm::Decoder::kValidate, wasm::LiftoffCompiler>
decoder(&zone, module, func_body_, &liftoff_.asm_, call_descriptor, env_,
&liftoff_.source_position_table_builder_, &wasm_compilation_data_,
&zone, &liftoff_.codegen_zone_, code_table_entry);
decoder.Decode();
liftoff_compile_time_scope.reset();
if (!decoder.interface().ok()) {
// Liftoff compilation failed.
isolate_->counters()->liftoff_unsupported_functions()->Increment();
return false;
}
if (decoder.failed()) return false; // Validation error
if (FLAG_trace_wasm_decode_time) {
double compile_ms = compile_timer.Elapsed().InMillisecondsF();
PrintF(
"wasm-compilation liftoff phase 1 ok: %u bytes, %0.3f ms decode and "
"compile\n",
static_cast<unsigned>(func_body_.end - func_body_.start), compile_ms);
}
// Record the memory cost this unit places on the system until
// it is finalized.
memory_cost_ = liftoff_.asm_.pc_offset();
liftoff_.safepoint_table_offset_ =
decoder.interface().GetSafepointTableOffset();
isolate_->counters()->liftoff_compiled_functions()->Increment();
return true;
}
#undef __
#undef TRACE
#undef WASM_INSTANCE_OBJECT_OFFSET
#undef LOAD_INSTANCE_FIELD
} // namespace internal
} // namespace v8
```
|
Metcalf Ross ( – 2 January 1858) was an English master printer and sometime poet/songwriter in Tyneside. He was born in Sunderland, Tyne and Wear.
There are two noted works by Ross.
The first, a song, is given different titles in the different chapbooks. It is entitled "A New Year's Carol (A) (For the Fishwives of Newcastle)" - by Fordyce on page 138 of The Tyne Songster of 1840, and "The Fishwives Carol" – by France on page 180 of Songs of the Bards of the Tyne of 1850.
The second work, a poem, entitled "Address to Robert Emery" – allegedly written as a tribute on the death of Emery in 1870 – and given on page 290 of Allan's Illustrated Edition of Tyneside Songs and Readings of 1891.
See also
Geordie dialect words
W & T Fordyce
P. France & Co.
France's Songs of the Bards of the Tyne - 1850
References
External links
TheTyne Songster
Songs of the Bards of the Tyne
Allan’s Illustrated Edition of Tyneside songs and readings
English male poets
English male songwriters
Writers from Sunderland
Musicians from Sunderland
People from Newcastle upon Tyne (district)
Geordie songwriters
1750s births
1858 deaths
19th-century English musicians
|
```c++
//
//
// path_to_url
//
#include "pxr/usd/usdPhysics/collisionAPI.h"
#include "pxr/usd/usd/schemaRegistry.h"
#include "pxr/usd/usd/typed.h"
#include "pxr/usd/sdf/types.h"
#include "pxr/usd/sdf/assetPath.h"
PXR_NAMESPACE_OPEN_SCOPE
// Register the schema with the TfType system.
TF_REGISTRY_FUNCTION(TfType)
{
TfType::Define<UsdPhysicsCollisionAPI,
TfType::Bases< UsdAPISchemaBase > >();
}
/* virtual */
UsdPhysicsCollisionAPI::~UsdPhysicsCollisionAPI()
{
}
/* static */
UsdPhysicsCollisionAPI
UsdPhysicsCollisionAPI::Get(const UsdStagePtr &stage, const SdfPath &path)
{
if (!stage) {
TF_CODING_ERROR("Invalid stage");
return UsdPhysicsCollisionAPI();
}
return UsdPhysicsCollisionAPI(stage->GetPrimAtPath(path));
}
/* virtual */
UsdSchemaKind UsdPhysicsCollisionAPI::_GetSchemaKind() const
{
return UsdPhysicsCollisionAPI::schemaKind;
}
/* static */
bool
UsdPhysicsCollisionAPI::CanApply(
const UsdPrim &prim, std::string *whyNot)
{
return prim.CanApplyAPI<UsdPhysicsCollisionAPI>(whyNot);
}
/* static */
UsdPhysicsCollisionAPI
UsdPhysicsCollisionAPI::Apply(const UsdPrim &prim)
{
if (prim.ApplyAPI<UsdPhysicsCollisionAPI>()) {
return UsdPhysicsCollisionAPI(prim);
}
return UsdPhysicsCollisionAPI();
}
/* static */
const TfType &
UsdPhysicsCollisionAPI::_GetStaticTfType()
{
static TfType tfType = TfType::Find<UsdPhysicsCollisionAPI>();
return tfType;
}
/* static */
bool
UsdPhysicsCollisionAPI::_IsTypedSchema()
{
static bool isTyped = _GetStaticTfType().IsA<UsdTyped>();
return isTyped;
}
/* virtual */
const TfType &
UsdPhysicsCollisionAPI::_GetTfType() const
{
return _GetStaticTfType();
}
UsdAttribute
UsdPhysicsCollisionAPI::GetCollisionEnabledAttr() const
{
return GetPrim().GetAttribute(UsdPhysicsTokens->physicsCollisionEnabled);
}
UsdAttribute
UsdPhysicsCollisionAPI::CreateCollisionEnabledAttr(VtValue const &defaultValue, bool writeSparsely) const
{
return UsdSchemaBase::_CreateAttr(UsdPhysicsTokens->physicsCollisionEnabled,
SdfValueTypeNames->Bool,
/* custom = */ false,
SdfVariabilityVarying,
defaultValue,
writeSparsely);
}
UsdRelationship
UsdPhysicsCollisionAPI::GetSimulationOwnerRel() const
{
return GetPrim().GetRelationship(UsdPhysicsTokens->physicsSimulationOwner);
}
UsdRelationship
UsdPhysicsCollisionAPI::CreateSimulationOwnerRel() const
{
return GetPrim().CreateRelationship(UsdPhysicsTokens->physicsSimulationOwner,
/* custom = */ false);
}
namespace {
static inline TfTokenVector
_ConcatenateAttributeNames(const TfTokenVector& left,const TfTokenVector& right)
{
TfTokenVector result;
result.reserve(left.size() + right.size());
result.insert(result.end(), left.begin(), left.end());
result.insert(result.end(), right.begin(), right.end());
return result;
}
}
/*static*/
const TfTokenVector&
UsdPhysicsCollisionAPI::GetSchemaAttributeNames(bool includeInherited)
{
static TfTokenVector localNames = {
UsdPhysicsTokens->physicsCollisionEnabled,
};
static TfTokenVector allNames =
_ConcatenateAttributeNames(
UsdAPISchemaBase::GetSchemaAttributeNames(true),
localNames);
if (includeInherited)
return allNames;
else
return localNames;
}
PXR_NAMESPACE_CLOSE_SCOPE
// ===================================================================== //
// Feel free to add custom code below this line. It will be preserved by
// the code generator.
//
// Just remember to wrap code in the appropriate delimiters:
// 'PXR_NAMESPACE_OPEN_SCOPE', 'PXR_NAMESPACE_CLOSE_SCOPE'.
// ===================================================================== //
// --(BEGIN CUSTOM CODE)--
```
|
Baharlar can refer to:
Baharlar, Ayvacık
Baharlar, Lice
Baharlar, Tavas
|
The Salem Prize, in memory of Raphael Salem, is awarded each year to young researchers for outstanding contributions to the field of analysis. It is awarded by the School of Mathematics at the Institute for Advanced Study in Princeton and was founded by the widow of Raphael Salem in his memory. The prize is considered highly prestigious and many Fields Medalists previously received it. The prize was 5000 French Francs in 1990.
Past winners
(Note: a F symbol denotes mathematicians who later earned a Fields Medal).
See also
List of mathematics awards
References
Mathematics awards
|
Jamshed R. Tata, FRS (13 April 1930 to 8 October 2020) was an Indian-born endocrinologist who spent most of his career at the National Institute for Medical Research researching thyroid hormones. His key discovery was that thyroid hormones control metamorphosis in frogs by regulation the action of genes.
Biography
Jamshed Rustom Tata is most commonly known as Jamshed R. Tata. He was born 13 April 1930 in Bombay.
He lived in Mill Hill, London NW7 for the last 60 years of his life and died in London on 8 October 2020. His French wife Renée predeceased him. They had two sons and a daughter.
Education
He was awarded his BSc from Bombay University in 1949, then MSc from the Indian Institute of Science in 1951. He then went to University of Paris and was awarded his PhD in 1954.
Scientific career
He started his scientific career as a postdoctoral fellowship at Sloan-Kettering Institute between 1954–56 and then moved to NIMR (National Institute for Medical Research, London) in 1956. He spent most of his career at NIMR, except for a two-year spell as visiting scientist at the University of Stockholm (1960-1962). He was a staff scientist (1962-1973). In 1973 he became Head of the Division of Developmental Biochemistry and continued in this post till his retirement in 1996. After retirement he continued as a visiting scientist at NIMR till the site closed in 2016. While at NIMR he worked closely with Rosalind Pitt-Rivers and co-authored a number of books with her.
He was recognised for his work on thyroid hormones, discovering that the hormones act by regulating the activity of genes, rather than controlling metabolism, authoring over 200 papers, including a history of developmental biology at NIMR
He was awarded the Colworth Medal by the Biochemical Society in 1964. He was elected as FRS in 1973
References
1930 births
Living people
Indian endocrinologists
Fellows of the Royal Society
Foreign Fellows of the Indian National Science Academy
National Institute for Medical Research faculty
|
Java and C++ are two prominent object-oriented programming languages. By many language popularity metrics, the two languages have dominated object-oriented and high-performance software development for much of the 21st century, and are often directly compared and contrasted. Java's syntax was based on C/C++.
Design aims
The differences between the programming languages C++ and Java can be traced to their heritage, as they have different design goals.
C++ was designed for systems and applications programming (i.e. infrastructure programming), extending the procedural programming language C, which was designed for efficient execution. To C, C++ added support for object-oriented programming, exception handling, lifetime-based resource management (RAII), generic programming, template metaprogramming, and the C++ Standard Library which includes generic containers and algorithms (the Standard Template Library or STL), and many other general purpose facilities.
Java is a general-purpose, concurrent, class-based, object-oriented programming language that is designed to minimize implementation dependencies. It relies on a Java virtual machine to be secure and highly portable. It is bundled with an extensive library designed to provide abstraction of the underlying platform. Java is a statically typed object-oriented language that uses a syntax similar to (but incompatible with) C++. It includes a documentation system called Javadoc.
The different goals in the development of C++ and Java resulted in different principles and design trade-offs between the languages. The differences are as follows:
Language features
Syntax
Java syntax has a context-free grammar that can be parsed by a simple LALR parser. Parsing C++ is more complicated. For example, Foo<1>(3); is a sequence of comparisons if Foo is a variable, but creates an object if Foo is the name of a class template.
C++ allows namespace-level constants, variables, and functions. In Java, such entities must belong to some given type, and therefore must be defined inside a type definition, either a class or an interface.
In C++, objects are values, while in Java they are not. C++ uses value semantics by default, while Java always uses reference semantics. To opt for reference semantics in C++, either a pointer or a reference can be used.
In C++, it is possible to declare a pointer or reference to a const object in order to prevent client code from modifying it. Functions and methods can also guarantee that they will not modify the object pointed to by a pointer by using the "const" keyword. This enforces const-correctness.
In Java, the final keyword is similar to the const keyword in C++, but its usage is more limited. For the most part, const-correctness must rely on the semantics of the class' interface, i.e., it is not strongly enforced, except for public data members that are labeled final.
C++ supports goto statements, which may lead to spaghetti code programming. With the exception of the goto statement (which is very rarely seen in real code and highly discouraged), both Java and C++ have basically the same control flow structures, designed to enforce structured control flow, and relies on break and continue statements to provide some goto-like functions. Some commenters point out that these labelled flow control statements break the single point-of-exit property of structured programming.
C++ provides low-level features which Java mostly lacks (one notable exception being the sun.misc.Unsafe API for direct memory access and manipulation). In C++, pointers can be used to manipulate specific memory locations, a task necessary for writing low-level operating system components. Similarly, many C++ compilers support an inline assembler. Assembly language code can be imported to a C program and vice versa. This makes C language even faster. In Java, such code must reside in external libraries, and can only be accessed via the Java Native Interface, with a significant overhead for each call.
Semantics
C++ allows default values for arguments of a function/method. Java does not. However, method overloading can be used to obtain similar results in Java but generate redundant stub code.
The minimum of code needed to compile for C++ is a function, for Java is a class.
C++ allows a range of implicit conversions between native types (including some narrowing conversions), and also allows defining implicit conversions involving user-defined types. In Java, only widening conversions between native types are implicit; other conversions require explicit cast syntax.
A result of this is that although loop conditions (if, while and the exit condition in for) in Java and C++ both expect a boolean expression, code such as if(a = 5) will cause a compile error in Java because there is no implicit narrowing conversion from int to boolean, but will compile in C++. This is handy if the code was a typo and if(a == 5) was intended. However, current C++ compilers will usually generate a warning when such an assignment is performed within a conditional expression. Similarly, standalone comparison statements, e.g. a==5;, without a side effect usually lead to a warning.
For passing parameters to functions, C++ supports both pass-by-reference and pass-by-value. In Java, primitive parameters are always passed by value. Class types, interface types, and array types are collectively called reference types in Java and are also always passed by value.
Java built-in types are of a specified size and range defined by the language specification. In C++, a minimal range of values is defined for built-in types, but the exact representation (number of bits) can be mapped to whatever native types are preferred on a given platform.
For instance, Java characters are 16-bit Unicode characters, and strings are composed of a sequence of such characters. C++ offers both narrow and wide characters, but the actual size of each is platform dependent, as is the character set used. Strings can be formed from either type.
This also implies that C++ compilers can automatically select the most efficient representation for the target platform (i.e., 64-bit integers for a 64-bit platform), while the representation is fixed in Java, meaning the values can either be stored in the less-efficient size, or must pad the remaining bits and add code to emulate the reduced-width behavior.
The rounding and precision of floating point values and operations in C++ is implementation-defined (although only very exotic or old platforms depart from the IEEE 754 standard). Java provides an optional strict floating-point model (strictfp) that guarantees more consistent results across platforms, though at the cost of possibly slower run-time performance. However, Java does not comply strictly with the IEEE 754 standard. Most C++ compilers will, by default, comply partly with IEEE 754 (usually excluding strict rounding rules and raise exceptions on NaN results), but provide compliance options of varied strictness, to allow for some optimizing. If we label those options from least compliant to most compliant as fast, consistent (Java's strictfp), near-IEEE, and strict-IEEE, we can say that most C++ implementations default to near-IEEE, with options to switch to fast or strict-IEEE, while Java defaults to fast with an option to switch to consistent.
In C++, pointers can be manipulated directly as memory address values. Java references are pointers to objects. Java references do not allow direct access to memory addresses or allow memory addresses to be manipulated with pointer arithmetic. In C++ one can construct pointers to pointers, pointers to ints and doubles, and pointers to arbitrary memory locations. Java references only access objects, never primitives, other references, or arbitrary memory locations. In Java, memory can be read and written by arbitrary values using the sun.misc.Unsafe API, however it is deprecated and not recommended.
In C++, pointers can point to functions or member functions (function pointers). The equivalent mechanism in Java uses object or interface references.
Via stack-allocated objects, C++ supports scoped resource management, a technique used to automatically manage memory and other system resources that supports deterministic object destruction. While scoped resource management in C++ cannot be guaranteed (even objects with proper destructors can be allocated using new and left undeleted) it provides an effective means of resource management. Shared resources can be managed using shared_ptr, along with weak_ptr to break cyclic references. Java supports automatic memory management using garbage collection which can free unreachable objects even in the presence of cyclic references, but other system resources (files, streams, windows, communication ports, threads, etc.) must be explicitly released because garbage collection is not guaranteed to occur immediately after the last object reference is abandoned.
C++ features user-defined operator overloading. Operator overloading allows for user-defined types to support operators (arithmetic, comparisons, etc.) like primitive types via user-defined implementations for these operators. It is generally recommended to preserve the semantics of the operators. Java supports no form of operator overloading (although its library uses the addition operator for string concatenation).
Java features standard application programming interface (API) support for reflection and dynamic loading of arbitrary new code.
C++ supports static and dynamic linking of binaries.
Java has generics, whose main purpose is to provide type-safe containers. C++ has compile-time templates, which provide more extensive support for generic programming and metaprogramming. Java has annotations, which allow adding arbitrary custom metadata to classes and metaprogramming via an annotation processing tool.
Both Java and C++ distinguish between native types (also termed fundamental or built-in types) and user-defined types (also termed compound types). In Java, native types have value semantics only, and compound types have reference semantics only. In C++ all types have value semantics, but a reference can be created to any type, which will allow the object to be manipulated via reference semantics.
C++ supports multiple inheritance of arbitrary classes. In Java a class can derive from only one class, but a class can implement multiple interfaces (in other words, it supports multiple inheritance of types, but only single inheritance of implementation).
Java explicitly distinguishes between interfaces and classes. In C++, multiple inheritance and pure virtual functions make it possible to define classes that function almost like Java interfaces do, with a few small differences.
Java has both language and standard library support for multi-threading. The synchronized keyword in Java provides mutex locks to support multi-threaded applications. Java also provides libraries for more advanced multi-threading synchronizing. C++11 has a defined memory model for multi-threading in C++, and library support for creating threads and for many synchronizing primitives. There are also many third-party libraries for this.
C++ member functions can be declared as virtual functions, which means the method to be called is determined by the run-time type of the object (a.k.a. dynamic dispatching). By default, methods in C++ are not virtual (i.e., opt-in virtual). In Java, methods are virtual by default, but can be made non-virtual by using the final keyword (i.e., opt-out virtual).
C++ enumerations are primitive types and support implicit conversion to integer types (but not from integer types). Java enumerations can be public static enum{enumName1,enumName2} and are used like classes. Another way is to make another class that extends java.lang.Enum<E>) and may therefore define constructors, fields, and methods as any other class. As of C++11, C++ supports strongly-typed enumerations which provide more type-safety and explicit specification of the storage type.
Unary operators '++' and '--': in C++ "The operand shall be a modifiable lvalue. [skipped] The result is the updated operand; it is an lvalue...", but in Java "the binary numeric promotion mentioned above may include unboxing conversion and value set conversion. If necessary, value set conversion {and/or [...] boxing conversion} is applied to the sum prior to its being stored in the variable.", i.e. in Java, after the initialization "Integer i=2;", "++i;" changes the reference i by assigning new object, while in C++ the object is still the same.
Resource management
Java offers automatic garbage collection, which may be bypassed in specific circumstances via the Real time Java specification. Memory management in C++ is usually done via constructors, destructors, and smart pointers. The C++ standard permits garbage collection, but does not require it. Garbage collection is rarely used in practice.
C++ can allocate arbitrary blocks of memory. Java only allocates memory via object instantiation. Arbitrary memory blocks may be allocated in Java as an array of bytes.
Java and C++ use different idioms for resource management. Java relies mainly on garbage collection, which can reclaim memory, while C++ relies mainly on the Resource Acquisition Is Initialization (RAII) idiom. This is reflected in several differences between the two languages:
In C++ it is common to allocate objects of compound types as local stack-bound variables which are destroyed when they go out of scope. In Java compound types are always allocated on the heap and collected by the garbage collector (except in virtual machines that use escape analysis to convert heap allocations to stack allocations).
C++ has destructors, while Java has finalizers. Both are invoked before an object's deallocation, but they differ significantly. A C++ object's destructor must be invoked implicitly (in the case of stack-bound variables) or explicitly to deallocate an object. The destructor executes synchronously just before the point in a program at which an object is deallocated. Synchronous, coordinated uninitializing and deallocating in C++ thus satisfy the RAII idiom. Destructors in C++ is the normal way of getting back the resources associated with an object, and is a needed counterpart to constructors. In Java, object deallocation is implicitly handled by the garbage collector. A Java object's finalizer is invoked asynchronously some time after it has been accessed for the last time and before it is deallocated. Very few objects need finalizers. A finalizer is needed by only objects that must guarantee some cleanup of the object state before deallocating, typically releasing resources external to the JVM. Direct usages of finalizers are usually not advised, as they are unpredictable, usually dangerous, and most of the time unneeded. One has to be cautious not to think of finalizers as C++ destructors. Rather, the try-with-resources or try-finally block achieves a more similar purpose as the destructor. One problem with finalizers or cleaners is that it is not guaranteed that they will run immediately. Hence, a finalizer should never be used for tasks that are time-critical. Additionally, finalizers come with severe performance penalties and significantly increase the time it takes for objects to be deallocated, so their use is discouraged and deprecated in Java 9.
With RAII in C++, one type of resource is typically wrapped inside a small class that allocates the resource upon construction and releases the resource upon destruction, and provide access to the resource in between those points. Any class that contain only such RAII objects do not need to define a destructor since the destructors of the RAII objects are called automatically as an object of this class is destroyed. In Java, safe synchronous deallocation of resources can be performed deterministically using the try/catch/finally construct. Alternatively, the try-with-resources construct, which was introduced in Java 7, should be used in preference to try-finally construct. The try-with-resources construct is more concise and readable. It also provide more helpful diagnostic information, since suppressed exception are not discarded, and will be printed in the stack trace with information saying that they were suppressed.
In C++, it is possible to have a dangling pointer, a stale reference to an object that has already been deallocated. Attempting to use a dangling pointer typically results in program failure. In Java, the garbage collector will not destroy a referenced object.
In C++, it is possible to have uninitialized primitive objects. Java enforces default initialization.
In C++, it is possible to have an allocated object to which there is no valid reference. Such an unreachable object cannot be destroyed (deallocated), and results in a memory leak. In contrast, in Java an object will not be deallocated by the garbage collector until it becomes unreachable (by the user program). (Weak references are supported, which work with the Java garbage collector to allow for different strengths of reachability.) Garbage collection in Java prevents many memory leaks, but leaks are still possible under some circumstances. The automatic garbage collector may give the false impression that in Java one does not need to think about memory management. However this is not quite true. Loosely speaking, this is because a program can have "memory leaks", more formally known as "unintentional object retentions". An example of a memory leak that may occur is for a program that has been written without any logical errors, except that it did not eliminate obsolete references. This results in higher use of garbage collector activity, higher memory footprint. In extreme circumstances, this problem can lead to an OutOfMemoryError, but this rarely happens.
The solution to this is to null out object references. A second common reason for memory leak is the use of cache that has become no longer relevant. The solution to memory leaks due to using old cache is to represent the cache using a WeakHashMap.
Libraries
C++ provides cross-platform access to many features typically available in platform-specific libraries. Direct access from Java to native operating system and hardware functions requires the use of the Java Native Interface.
Runtime
Due to its unconstrained expressiveness, low level C++ language features (e.g. unchecked array access, raw pointers, type punning) cannot be reliably checked at compile-time or without overhead at run-time. Related programming errors can lead to low-level buffer overflows and segmentation faults. The Standard Template Library provides higher-level RAII abstractions (like vector, list and map) to help avoid such errors. In Java, low level errors either cannot occur or are detected by the Java virtual machine (JVM) and reported to the application in the form of an exception.
The Java language requires specific behavior in the case of an out-of-bounds array access, which generally requires bounds checking of array accesses. This eliminates a possible source of instability but usually at the cost of slowing execution. In some cases, especially since Java 7, compiler analysis can prove a bounds check unneeded and eliminate it. C++ has no required behavior for out-of-bounds access of native arrays, thus requiring no bounds checking for native arrays. C++ standard library collections like std::vector, however, offer optional bounds checking. In summary, Java arrays are "usually safe; slightly constrained; often have overhead" while C++ native arrays "have optional overhead; are slightly unconstrained; are possibly unsafe."
Templates vs. generics
Both C++ and Java provide facilities for generic programming, templates and generics, respectively. Although they were created to solve similar kinds of problems, and have similar syntax, they are quite different.
{| class="wikitable"
! C++ Templates
! Java Generics
|-
| Classes, functions, aliases and variables can be templated.
| Classes and methods can be genericized.
|-
| Parameters can be variadic, of any type, integral value, character literal, or a class template.
| Parameters can be any reference type, including boxed primitive types (i.e. Integer, Boolean...).
|-
| Separate instantiations of the class or function will be generated for each parameter-set when compiled. For class templates, only the member functions that are used will be instantiated.
| One version of the class or function is compiled, works for all type parameters (via type-erasure).
|-
| Objects of a class template instantiated with different parameters will have different types at run time (i.e., distinct template instantiations are distinct classes).
| Type parameters are erased when compiled; objects of a class with different type parameters are the same type at run time. It causes a different constructor. Because of this type erasure, it is not possible to overload methods using different instantiations of the generic class.
|-
| Implementation of the class or function template must be visible within a translation unit in order to use it. This usually implies having the definitions in the header files or included in the header file. As of C++11, it is possible to use extern templates to separate compiling of some instantiations.
| Signature of the class or function from a compiled class file is sufficient to use it.
|-
| Templates can be specialized—a separate implementation could be provided for a particular template parameter.
| Generics cannot be specialized.
|-
| Template parameters can have default arguments. Pre-C++11, this was allowed only for template classes, not functions.
| Generic type parameters cannot have default arguments.
|-
| Wildcards unsupported. Instead, return types are often available as nested typedefs. (Also, C++11 added keyword auto, which acts as a wildcard for any type that can be determined at compile time.)
| Wildcards supported as type parameter.
|-
| No direct support for bounding of type parameters, but metaprogramming provides this
| Supports bounding of type parameters with "extends" and "super" for upper and lower bounds, respectively; allows enforcement of relationships between type parameters.
|-
| Allows instantiation of an object with the type of the parameter type.
| Precludes instantiation of an object with the type of the parameter type (except via reflection).
|-
| Type parameter of class template can be used for static methods and variables.
| Type parameter of generic class cannot be used for static methods and variables.
|-
| Static variables unshared between classes and functions of different type parameters.
| Static variables shared between instances of classes of different type parameters.
|-
| Class and function templates do not enforce type relations for type parameters in their declaration. Use of an incorrect type parameter results in compiling failure, often generating an error message within the template code rather than in the user's code that invokes it. Proper use of templated classes and functions is dependent on proper documentation. Metaprogramming provides these features at the cost of added effort. There was a proposition to solve this problem in C++11, so-called Concepts, it is planned for the next standard.
| Generic classes and functions can enforce type relationships for type parameters in their declaration. Use of an incorrect type parameter results in a type error within the code that uses it. Operations on parametrized types in generic code are only allowed in ways that can be guaranteed to be safe by the declaration. This results in greater type safety at the cost of flexibility.
|-
| Templates are Turing-complete (see template metaprogramming).
| Generics are also Turing-complete
|}
Miscellaneous
Java and C++ use different means to divide code into multiple source files. Java uses a package system that dictates the file name and path for all program definitions. Its compiler imports the executable class files. C++ uses a header file source code inclusion system to share declarations between source files.
Compiled Java code files are generally smaller than code files in C++ as Java bytecode is usually more compact than native machine code and Java programs are never statically linked.
C++ compiling features an added textual preprocessing phase, while Java does not. Thus some users add a preprocessing phase to their build process for better support of conditional compiling.
Java's division and modulus operators are well defined to truncate to zero. C++ (pre-C++11) does not specify whether or not these operators truncate to zero or "truncate to -infinity". -3/2 will always be -1 in Java and C++11, but a C++03 compiler may return either -1 or -2, depending on the platform. C99 defines division in the same fashion as Java and C++11. Both languages guarantee (where a and b are integer types) that (a/b)*b + (a%b) == a for all a and b (b != 0). The C++03 version will sometimes be faster, as it is allowed to pick whichever truncation mode is native to the processor.
The sizes of integer types are defined in Java (int is 32-bit, long is 64-bit), while in C++ the size of integers and pointers is compiler and application binary interface (ABI) dependent within given constraints. Thus a Java program will have consistent behavior across platforms, whereas a C++ program may require adapting for some platforms, but may run faster with more natural integer sizes for the local platform.
An example comparing C++ and Java exists in Wikibooks.
Performance
In addition to running a compiled Java program, computers running Java applications generally must also run the Java virtual machine (JVM), while compiled C++ programs can be run without external applications. Early versions of Java were significantly outperformed by statically compiled languages such as C++. This is because the program statements of these two closely related languages may compile to a few machine instructions with C++, while compiling into several byte codes involving several machine instructions each when interpreted by a JVM. For example:
Since performance optimization is a very complex issue, it is very difficult to quantify the performance difference between C++ and Java in general terms, and most benchmarks are unreliable and biased. Given the very different natures of the languages, definitive qualitative differences are also difficult to draw. In a nutshell, there are inherent inefficiencies and hard limits on optimizing in Java, given that it heavily relies on flexible high-level abstractions, however, the use of a powerful JIT compiler (as in modern JVM implementations) can mitigate some issues. In any case, if the inefficiencies of Java are too great, compiled C or C++ code can be called from Java via the JNI.
Some inefficiencies that are inherent to the Java language include, mainly:
All objects are allocated on the heap. Though allocation is extremely fast in modern JVMs using 'bump allocation', which performs similarly to stack allocation, performance can still be negatively impacted due to the invocation of the garbage collector. Modern JIT compilers mitigate this problem to some extent with escape analysis or escape detection to allocate some objects on the stack, since Oracle JDK 6.
Performance-critical projects like efficient database systems and messaging libraries have had to use internal unofficial APIs like sun.misc.Unsafe to gain access to manual resource management and be able to do stack allocation; effectively manipulating pseudo-pointers.
A lot of run-time casting required even using standard containers induces a performance penalty. However, most of these casts are statically eliminated by the JIT compiler.
Safety guarantees come at a run-time cost. For example, the compiler is required to put appropriate range checks in the code. Guarding each array access with a range check is not efficient, so most JIT compilers will try to eliminate them statically or by moving them out of inner loops (although most native compilers for C++ will do the same when range-checks are optionally used).
Lack of access to low-level details prevents the developer from improving the program where the compiler is unable to do so.
The mandatory use of reference-semantics for all user-defined types in Java can introduce large amounts of superfluous memory indirections (or jumps) (unless elided by the JIT compiler) which can lead to frequent cache misses (a.k.a. cache thrashing). Furthermore, cache-optimization, usually via cache-aware or cache-oblivious data structures and algorithms, can often lead to orders of magnitude improvements in performance as well as avoiding time-complexity degeneracy that is characteristic of many cache-pessimizing algorithms, and is therefore one of the most important forms of optimization; reference-semantics, as mandated in Java, makes such optimizations impossible to realize in practice (by neither the programmer nor the JIT compiler).
Garbage collection, as this form of automatic memory management introduces memory overhead.
However, there are a number of benefits to Java's design, some realized, some only theorized:
Java garbage collection may have better cache coherence than the usual use of malloc/new for memory allocation. Nevertheless, arguments exist that both allocators equally fragment the heap and neither exhibits better cache locality. However, in C++, allocation of single objects on the heap is rare, and large quantities of single objects are usually allocated in blocks via an STL container and/or with a small object allocator.
Run-time compiling can potentially use information about the platform on which the code is being executed to improve code more effectively. However, most state-of-the-art native (C, C++, etc.) compilers generate multiple code paths to employ the full computational abilities of the given system. Also, the inverse argument can be made that native compilers can better exploit architecture-specific optimizing and instruction sets than multi-platform JVM distributions.
Run-time compiling allows for more aggressive virtual function inlining than is possible for a static compiler, because the JIT compiler has more information about all possible targets of virtual calls, even if they are in different dynamically loaded modules. Currently available JVM implementations have no problem in inlining most of the monomorphic, mostly monomorphic and dimorphic calls, and research is in progress to inline also megamorphic calls, thanks to the recent invoke dynamic enhancements added in Java 7. Inlining can allow for further optimisations like loop vectorisation or loop unrolling, resulting in a huge overall performance increase.
In Java, thread synchronizing is built into the language, so the JIT compiler can potentially, via escape analysis, elide locks, significantly improve the performance of naive multi-threaded code.
Also, some performance problems occur in C++:
Allowing pointers to point to any address can make optimizing difficult due to the possibility of pointer aliasing.
Since the code generated from various instantiations of the same class template in C++ is not shared (as with type-erased generics in Java), excessive use of templates may lead to significant increase of the executable code size (code bloat). However, because function templates are aggressively inlined, they can sometimes reduce code size, but more importantly allow for more aggressive static analysis and code optimizing by the compiler, more often making them more efficient than non-templated code. In contrast, Java generics are necessarily less efficient than non-genericized code.
Because in a traditional C++ compiler, dynamic linking is performed after code generating and optimizing in C++, function calls spanning different dynamic modules cannot be inlined. However modern C++ compilers like MSVC and Clang+LLVM offer link-time-code-generation options that allow modules to be compiled to intermediate formats which allows inlining at the final link stage.
Official standard and reference of the language
Language specification
The C++ language is defined by ISO/IEC 14882, an ISO standard, which is published by the ISO/IEC JTC1/SC22/WG21 committee. The latest, post-standardization draft of C++17 is available as well.
The C++ language evolves via an open steering committee called the C++ Standards Committee. The committee is composed of the creator of C++ Bjarne Stroustrup, the convener Herb Sutter, and other prominent figures, including many representatives of industries and user-groups (i.e., the stake-holders). Being an open committee, anyone is free to join, participate, and contribute proposals for upcoming releases of the standard and technical specifications. The committee now aims to release a new standard every few years, although in the past strict review processes and discussions have meant longer delays between publication of new standards (1998, 2003, and 2011).
The Java language is defined by the Java Language Specification, a book which is published by Oracle.
The Java language continuously evolves via a process called the Java Community Process, and the world's programming community is represented by a group of people and organizations - the Java Community members—which is actively engaged into the enhancement of the language, by sending public requests - the Java Specification Requests - which must pass formal and public reviews before they get integrated into the language.
The lack of a firm standard for Java and the somewhat more volatile nature of its specifications have been a constant source of criticism by stake-holders wanting more stability and conservatism in the addition of new language and library features. In contrast, the C++ committee also receives constant criticism, for the opposite reason, i.e., being too strict and conservative, and taking too long to release new versions.
Trademarks
"C++" is not a trademark of any company or organization and is not owned by any individual.
"Java" is a trademark of Oracle Corporation.
Citations
References
External links
Difference Between C++ and Java
Object Oriented Memory Management: Java vs. C++
Chapter 2:How Java Differs from C, chapter from Java in a Nutshell by David Flanagan
Java vs. C++ resource management comparison - Comprehensive paper with examples
Java vs C performance... again... - In-depth discussion of performance differences between Java and C/C++
Hyperpoly - Java and C++ Comparison
Java and C++
Java (programming language)
C++
|
Alan Hochberg is an American lawyer and politician from New York.
Life
Hochberg was born in New Jersey. He graduated A.A.S. from New York City Community College and a BBA from the University of Miami. Then he worked as an investigator for the U.S. Department of Justice. He graduated LL.B. from New York Law School, and was admitted to the bar. He was an Assistant D.A. of Bronx County, and entered politics as a Democrat. He married Faye Kronstadt, and they had two sons.
On February 17, 1970, he was elected to the New York State Assembly, to fill the vacancy caused by the election of Robert Abrams as Bronx Borough President. Hochberg was re-elected several times and remained in the Assembly until 1976, sitting in the 178th, 179th, 180th and 181st New York State Legislatures. In June 1973, he ran in the Democratic primary for Borough President of the Bronx but was defeated by the incumbent Abrams.
In February, 1976 Hochberg was indicted for official misconduct. It was alleged that Hochberg offered a $20,000-a-year job in the State Legislature to Charles Rosen, the leader of the Co-op City rent strike, in exchange for Rosen's withdrawal from the Democratic primary election for Hochberg's Assembly seat, scheduled to happen later that year. On February 25, 1976 he was arraigned in the New York Supreme Court. On April 30, Hochberg moved for a dismissal of the charges, but four of the five counts of the indictment were upheld by Justice William Crangle on July 7. On November 2, Hochberg was re-elected to the Assembly. On December 15, he was convicted of the attempt to fraudulently and wrongfully affecting the results of a primary election (under the Penal and the Election Law), of corrupt use of position or authority (under the Election Law), and of unlawful fees and payments (under the Public Officers Law), the latter two crimes being felonies. He did not take his seat in the 182nd New York State Legislature. On January 26, 1977, he was sentenced to one year in prison and thus lost his Assembly seat. On April 5, 1977, he was disbarred by the Appellate Division. On April 13, 1978, Hochberg's appeal was rejected by the Appellate Division.
Later he moved to Westchester County, and became active in the Scarsdale Jewish congregation.
References
[
1941 births
Jewish American attorneys
Living people
Politicians from the Bronx
Democratic Party members of the New York State Assembly
Politicians from Jersey City, New Jersey
University of Miami Business School alumni
New York Law School alumni
Disbarred New York (state) lawyers
21st-century American Jews
|
Lauren Williams may refer to:
Lauren Williams (footballer) (born 1994), American-born professional footballer for Saint Kitts and Nevis
Lauren Williams (ice hockey) (born 1996), Canadian ice hockey player
Lauren Williams (journalist), American journalist and former editor-in-chief of Vox
Lauren Williams (mathematician), American mathematician at Harvard University
Lauren Williams (taekwondo) (born 1999), British taekwondo athlete
Lauryn Williams (born 1983), American sprinter and bobsledder
|
```prolog
#!/usr/bin/perl -w
#
#
# 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 Apple Computer, Inc. ("Apple") 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.
# Unit tests of parseSvnProperty().
use strict;
use warnings;
use Test::More;
use VCSUtils;
my @testCaseHashRefs = (
####
# Simple test cases
##
{
# New test
diffName => "simple: add svn:executable",
inputText => <<'END',
Added: svn:executable
+ *
END
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => 1,
value => "*",
},
undef],
expectedNextLine => undef,
},
{
# New test
diffName => "simple: delete svn:executable",
inputText => <<'END',
Deleted: svn:executable
- *
END
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => -1,
value => "*",
},
undef],
expectedNextLine => undef,
},
{
# New test
diffName => "simple: add svn:mergeinfo",
inputText => <<'END',
Added: svn:mergeinfo
Merged /trunk/Makefile:r33020
END
expectedReturn => [
{
name => "svn:mergeinfo",
propertyChangeDelta => 1,
value => "/trunk/Makefile:r33020",
},
undef],
expectedNextLine => undef,
},
{
# New test
diffName => "simple: delete svn:mergeinfo",
inputText => <<'END',
Deleted: svn:mergeinfo
Reverse-merged /trunk/Makefile:r33020
END
expectedReturn => [
{
name => "svn:mergeinfo",
propertyChangeDelta => -1,
value => "/trunk/Makefile:r33020",
},
undef],
expectedNextLine => undef,
},
{
# New test
diffName => "simple: modified svn:mergeinfo",
inputText => <<'END',
Modified: svn:mergeinfo
Reverse-merged /trunk/Makefile:r33020
Merged /trunk/Makefile:r41697
END
expectedReturn => [
{
name => "svn:mergeinfo",
propertyChangeDelta => 1,
value => "/trunk/Makefile:r41697",
},
undef],
expectedNextLine => undef,
},
####
# Using SVN 1.4 syntax
##
{
# New test
diffName => "simple: modified svn:mergeinfo using SVN 1.4 syntax",
inputText => <<'END',
Name: svn:mergeinfo
Reverse-merged /trunk/Makefile:r33020
Merged /trunk/Makefile:r41697
END
expectedReturn => [
{
name => "svn:mergeinfo",
propertyChangeDelta => 1,
value => "/trunk/Makefile:r41697",
},
undef],
expectedNextLine => undef,
},
{
# New test
diffName => "simple: delete svn:executable using SVN 1.4 syntax",
inputText => <<'END',
Name: svn:executable
- *
END
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => -1,
value => "*",
},
undef],
expectedNextLine => undef,
},
{
# New test
diffName => "simple: add svn:executable using SVN 1.4 syntax",
inputText => <<'END',
Name: svn:executable
+ *
END
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => 1,
value => "*",
},
undef],
expectedNextLine => undef,
},
####
# Using SVN 1.7 syntax
##
{
# New test
diffName => "simple: add svn:executable using SVN 1.7 syntax",
inputText => <<'END',
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
END
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => 1,
value => "*",
},
undef],
expectedNextLine => undef,
},
{
# New test
diffName => "simple: delete svn:executable using SVN 1.7 syntax",
inputText => <<'END',
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
END
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => -1,
value => "*",
},
undef],
expectedNextLine => undef,
},
{
# New test
diffName => "add svn:mime-type and add svn:executable using SVN 1.7 syntax",
inputText => <<'END',
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
END
expectedReturn => [
{
name => "svn:mime-type",
propertyChangeDelta => 1,
value => "image/png",
},
"Added: svn:executable\n"],
expectedNextLine => "## -0,0 +1 ##\n",
},
####
# Property value followed by empty line and start of next diff
##
{
# New test
diffName => "add svn:executable, followed by empty line and start of next diff",
inputText => <<'END',
Added: svn:executable
+ *
Index: Makefile.shared
END
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => 1,
value => "*",
},
"\n"],
expectedNextLine => "Index: Makefile.shared\n",
},
{
# New test
diffName => "add svn:executable, followed by empty line and start of next diff using Windows line endings",
inputText => toWindowsLineEndings(<<'END',
Added: svn:executable
+ *
Index: Makefile.shared
END
),
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => 1,
value => "*",
},
"\r\n"],
expectedNextLine => "Index: Makefile.shared\r\n",
},
{
# New test
diffName => "add svn:executable, followed by empty line and start of next property diff",
inputText => <<'END',
Added: svn:executable
+ *
Property changes on: Makefile.shared
END
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => 1,
value => "*",
},
"\n"],
expectedNextLine => "Property changes on: Makefile.shared\n",
},
{
# New test
diffName => "add svn:executable, followed by empty line and start of next property diff using Windows line endings",
inputText => toWindowsLineEndings(<<'END',
Added: svn:executable
+ *
Property changes on: Makefile.shared
END
),
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => 1,
value => "*",
},
"\r\n"],
expectedNextLine => "Property changes on: Makefile.shared\r\n",
},
{
# New test
diffName => "multi-line '+' change, followed by empty line and start of next diff",
inputText => <<'END',
Name: documentation
+ A
long sentence that spans
multiple lines.
Index: Makefile.shared
END
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "A\nlong sentence that spans\nmultiple lines.",
},
"\n"],
expectedNextLine => "Index: Makefile.shared\n",
},
{
# New test
diffName => "multi-line '+' change, followed by empty line and start of next diff using Windows line endings",
inputText => toWindowsLineEndings(<<'END',
Name: documentation
+ A
long sentence that spans
multiple lines.
Index: Makefile.shared
END
),
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "A\r\nlong sentence that spans\r\nmultiple lines.",
},
"\r\n"],
expectedNextLine => "Index: Makefile.shared\r\n",
},
{
# New test
diffName => "multi-line '+' change, followed by empty line and start of next property diff",
inputText => <<'END',
Name: documentation
+ A
long sentence that spans
multiple lines.
Property changes on: Makefile.shared
END
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "A\nlong sentence that spans\nmultiple lines.",
},
"\n"],
expectedNextLine => "Property changes on: Makefile.shared\n",
},
{
# New test
diffName => "multi-line '+' change, followed by empty line and start of next property diff using Windows line endings",
inputText => toWindowsLineEndings(<<'END',
Name: documentation
+ A
long sentence that spans
multiple lines.
Property changes on: Makefile.shared
END
),
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "A\r\nlong sentence that spans\r\nmultiple lines.",
},
"\r\n"],
expectedNextLine => "Property changes on: Makefile.shared\r\n",
},
####
# Property value followed by empty line and start of binary patch
##
{
# New test
diffName => "add svn:executable, followed by empty line and start of binary patch",
inputText => <<'END',
Added: svn:executable
+ *
Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
END
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => 1,
value => "*",
},
"\n"],
expectedNextLine => "Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==\n",
},
{
# New test
diffName => "add svn:executable, followed by empty line and start of binary patch using Windows line endings",
inputText => toWindowsLineEndings(<<'END',
Added: svn:executable
+ *
Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
END
),
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => 1,
value => "*",
},
"\r\n"],
expectedNextLine => "Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==\r\n",
},
{
# New test
diffName => "multi-line '+' change, followed by empty line and start of binary patch",
inputText => <<'END',
Name: documentation
+ A
long sentence that spans
multiple lines.
Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
END
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "A\nlong sentence that spans\nmultiple lines.",
},
"\n"],
expectedNextLine => "Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==\n",
},
{
# New test
diffName => "multi-line '+' change, followed by empty line and start of binary patch using Windows line endings",
inputText => toWindowsLineEndings(<<'END',
Name: documentation
+ A
long sentence that spans
multiple lines.
Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
END
),
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "A\r\nlong sentence that spans\r\nmultiple lines.",
},
"\r\n"],
expectedNextLine => "Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==\r\n",
},
{
# New test
diffName => "multi-line '-' change, followed by multi-line '+' change, empty line, and start of binary patch",
inputText => <<'END',
Modified: documentation
- A
long sentence that spans
multiple lines.
+ Another
long sentence that spans
multiple lines.
Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
END
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "Another\nlong sentence that spans\nmultiple lines.",
},
"\n"],
expectedNextLine => "Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==\n",
},
{
# New test
diffName => "multi-line '-' change, followed by multi-line '+' change, empty line, and start of binary patch using Windows line endings",
inputText => toWindowsLineEndings(<<'END',
Modified: documentation
- A
long sentence that spans
multiple lines.
+ Another
long sentence that spans
multiple lines.
Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
END
),
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "Another\r\nlong sentence that spans\r\nmultiple lines.",
},
"\r\n"],
expectedNextLine => "Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==\r\n",
},
####
# Successive properties
##
{
# New test
diffName => "single-line '+' change followed by custom property with single-line '+' change",
inputText => <<'END',
Added: svn:executable
+ *
Added: documentation
+ A sentence.
END
expectedReturn => [
{
name => "svn:executable",
propertyChangeDelta => 1,
value => "*",
},
"Added: documentation\n"],
expectedNextLine => " + A sentence.\n",
},
{
# New test
diffName => "multi-line '+' change, followed by svn:executable",
inputText => <<'END',
Name: documentation
+ A
long sentence that spans
multiple lines.
Name: svn:executable
+ *
END
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "A\nlong sentence that spans\nmultiple lines.",
},
"Name: svn:executable\n"],
expectedNextLine => " + *\n",
},
{
# New test
diffName => "multi-line '-' change, followed by multi-line '+' change and add svn:executable",
inputText => <<'END',
Modified: documentation
- A
long sentence that spans
multiple lines.
+ Another
long sentence that spans
multiple lines.
Added: svn:executable
+ *
END
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "Another\nlong sentence that spans\nmultiple lines.",
},
"Added: svn:executable\n"],
expectedNextLine => " + *\n",
},
{
# New test
diffName => "'Merged' change followed by 'Merged' change",
inputText => <<'END',
Added: svn:mergeinfo
Merged /trunk/Makefile:r33020
Merged /trunk/Makefile.shared:r58350
END
expectedReturn => [
{
name => "svn:mergeinfo",
propertyChangeDelta => 1,
value => "/trunk/Makefile.shared:r58350",
},
undef],
expectedNextLine => undef,
},
{
# New test
diffName => "'Reverse-merged' change followed by 'Reverse-merged' change",
inputText => <<'END',
Deleted: svn:mergeinfo
Reverse-merged /trunk/Makefile:r33020
Reverse-merged /trunk/Makefile.shared:r58350
END
expectedReturn => [
{
name => "svn:mergeinfo",
propertyChangeDelta => -1,
value => "/trunk/Makefile.shared:r58350",
},
undef],
expectedNextLine => undef,
},
####
# Property values with trailing new lines.
##
# FIXME: We do not support property values with trailing new lines, since it is difficult to
# disambiguate them from the empty line that preceeds the contents of a binary patch as
# in the test case (above): "multi-line '+' change, followed by empty line and start of binary patch".
{
# New test
diffName => "single-line '+' with trailing new line",
inputText => <<'END',
Added: documentation
+ A sentence.
END
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "A sentence.",
},
"\n"],
expectedNextLine => undef,
},
{
# New test
diffName => "single-line '+' with trailing new line using Windows line endings",
inputText => toWindowsLineEndings(<<'END',
Added: documentation
+ A sentence.
END
),
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "A sentence.",
},
"\r\n"],
expectedNextLine => undef,
},
{
# New test
diffName => "single-line '+' with trailing new line, followed by empty line and start of binary patch",
inputText => <<'END',
Added: documentation
+ A sentence.
Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
END
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "A sentence.",
},
"\n"],
expectedNextLine => "\n",
},
{
# New test
diffName => "single-line '+' with trailing new line, followed by empty line and start of binary patch using Windows line endings",
inputText => toWindowsLineEndings(<<'END',
Added: documentation
+ A sentence.
Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
END
),
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => 1,
value => "A sentence.",
},
"\r\n"],
expectedNextLine => "\r\n",
},
{
# New test
diffName => "single-line '-' change with trailing new line, and single-line '+' change",
inputText => <<'END',
Modified: documentation
- A long sentence.
+ A sentence.
END
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => -1, # Since we only interpret the '-' property.
value => "A long sentence.",
},
"\n"],
expectedNextLine => " + A sentence.\n",
},
{
# New test
diffName => "single-line '-' change with trailing new line, and single-line '+' change using Windows line endings",
inputText => toWindowsLineEndings(<<'END',
Modified: documentation
- A long sentence.
+ A sentence.
END
),
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => -1, # Since we only interpret the '-' property.
value => "A long sentence.",
},
"\r\n"],
expectedNextLine => " + A sentence.\r\n",
},
{
# New test
diffName => "multi-line '-' change with trailing new line, and multi-line '+' change",
inputText => <<'END',
Modified: documentation
- A
long sentence that spans
multiple lines.
+ Another
long sentence that spans
multiple lines.
END
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => -1, # Since we only interpret the '-' property.
value => "A\nlong sentence that spans\nmultiple lines.",
},
"\n"],
expectedNextLine => " + Another\n",
},
{
# New test
diffName => "multi-line '-' change with trailing new line, and multi-line '+' change using Windows line endings",
inputText => toWindowsLineEndings(<<'END',
Modified: documentation
- A
long sentence that spans
multiple lines.
+ Another
long sentence that spans
multiple lines.
END
),
expectedReturn => [
{
name => "documentation",
propertyChangeDelta => -1, # Since we only interpret the '-' property.
value => "A\r\nlong sentence that spans\r\nmultiple lines.",
},
"\r\n"],
expectedNextLine => " + Another\r\n",
},
);
my $testCasesCount = @testCaseHashRefs;
plan(tests => 2 * $testCasesCount); # Total number of assertions.
foreach my $testCase (@testCaseHashRefs) {
my $testNameStart = "parseSvnProperty(): $testCase->{diffName}: comparing";
my $fileHandle;
open($fileHandle, "<", \$testCase->{inputText});
my $line = <$fileHandle>;
my @got = VCSUtils::parseSvnProperty($fileHandle, $line);
my $expectedReturn = $testCase->{expectedReturn};
is_deeply(\@got, $expectedReturn, "$testNameStart return value.");
my $gotNextLine = <$fileHandle>;
is($gotNextLine, $testCase->{expectedNextLine}, "$testNameStart next read line.");
}
```
|
```go
/*
* MinIO Go Library for Amazon S3 Compatible Cloud Storage
*
* 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 minio
import (
"context"
"encoding/xml"
"errors"
"net/http"
"net/url"
"strconv"
"time"
"github.com/minio/minio-go/v7/pkg/encrypt"
"github.com/minio/minio-go/v7/pkg/s3utils"
)
// ObjectAttributesOptions are options used for the GetObjectAttributes API
//
// - MaxParts
// How many parts the caller wants to be returned (default: 1000)
//
// - VersionID
// The object version you want to attributes for
//
// - PartNumberMarker
// the listing will start AFTER the part matching PartNumberMarker
//
// - ServerSideEncryption
// The server-side encryption algorithm used when storing this object in Minio
type ObjectAttributesOptions struct {
MaxParts int
VersionID string
PartNumberMarker int
ServerSideEncryption encrypt.ServerSide
}
// ObjectAttributes is the response object returned by the GetObjectAttributes API
//
// - VersionID
// The object version
//
// - LastModified
// The last time the object was modified
//
// - ObjectAttributesResponse
// Contains more information about the object
type ObjectAttributes struct {
VersionID string
LastModified time.Time
ObjectAttributesResponse
}
// ObjectAttributesResponse contains details returned by the GetObjectAttributes API
//
// Noteworthy fields:
//
// - ObjectParts.PartsCount
// Contains the total part count for the object (not the current response)
//
// - ObjectParts.PartNumberMarker
// Pagination of parts will begin at (but not include) PartNumberMarker
//
// - ObjectParts.NextPartNumberMarket
// The next PartNumberMarker to be used in order to continue pagination
//
// - ObjectParts.IsTruncated
// Indicates if the last part is included in the request (does not check if parts are missing from the start of the list, ONLY the end)
//
// - ObjectParts.MaxParts
// Reflects the MaxParts used by the caller or the default MaxParts value of the API
type ObjectAttributesResponse struct {
ETag string `xml:",omitempty"`
StorageClass string
ObjectSize int
Checksum struct {
ChecksumCRC32 string `xml:",omitempty"`
ChecksumCRC32C string `xml:",omitempty"`
ChecksumSHA1 string `xml:",omitempty"`
ChecksumSHA256 string `xml:",omitempty"`
}
ObjectParts struct {
PartsCount int
PartNumberMarker int
NextPartNumberMarker int
MaxParts int
IsTruncated bool
Parts []*ObjectAttributePart `xml:"Part"`
}
}
// ObjectAttributePart is used by ObjectAttributesResponse to describe an object part
type ObjectAttributePart struct {
ChecksumCRC32 string `xml:",omitempty"`
ChecksumCRC32C string `xml:",omitempty"`
ChecksumSHA1 string `xml:",omitempty"`
ChecksumSHA256 string `xml:",omitempty"`
PartNumber int
Size int
}
func (o *ObjectAttributes) parseResponse(resp *http.Response) (err error) {
mod, err := parseRFC7231Time(resp.Header.Get("Last-Modified"))
if err != nil {
return err
}
o.LastModified = mod
o.VersionID = resp.Header.Get(amzVersionID)
response := new(ObjectAttributesResponse)
if err := xml.NewDecoder(resp.Body).Decode(response); err != nil {
return err
}
o.ObjectAttributesResponse = *response
return
}
// GetObjectAttributes API combines HeadObject and ListParts.
// More details on usage can be found in the documentation for ObjectAttributesOptions{}
func (c *Client) GetObjectAttributes(ctx context.Context, bucketName, objectName string, opts ObjectAttributesOptions) (*ObjectAttributes, error) {
if err := s3utils.CheckValidBucketName(bucketName); err != nil {
return nil, err
}
if err := s3utils.CheckValidObjectName(objectName); err != nil {
return nil, err
}
urlValues := make(url.Values)
urlValues.Add("attributes", "")
if opts.VersionID != "" {
urlValues.Add("versionId", opts.VersionID)
}
headers := make(http.Header)
headers.Set(amzObjectAttributes, GetObjectAttributesTags)
if opts.PartNumberMarker > 0 {
headers.Set(amzPartNumberMarker, strconv.Itoa(opts.PartNumberMarker))
}
if opts.MaxParts > 0 {
headers.Set(amzMaxParts, strconv.Itoa(opts.MaxParts))
} else {
headers.Set(amzMaxParts, strconv.Itoa(GetObjectAttributesMaxParts))
}
if opts.ServerSideEncryption != nil {
opts.ServerSideEncryption.Marshal(headers)
}
resp, err := c.executeMethod(ctx, http.MethodGet, requestMetadata{
bucketName: bucketName,
objectName: objectName,
queryValues: urlValues,
contentSHA256Hex: emptySHA256Hex,
customHeader: headers,
})
if err != nil {
return nil, err
}
defer closeResponse(resp)
hasEtag := resp.Header.Get(ETag)
if hasEtag != "" {
return nil, errors.New("getObjectAttributes is not supported by the current endpoint version")
}
if resp.StatusCode != http.StatusOK {
ER := new(ErrorResponse)
if err := xml.NewDecoder(resp.Body).Decode(ER); err != nil {
return nil, err
}
return nil, *ER
}
OA := new(ObjectAttributes)
err = OA.parseResponse(resp)
if err != nil {
return nil, err
}
return OA, nil
}
```
|
```go
package atscfg
/*
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing,
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* specific language governing permissions and limitations
*/
import (
"strings"
"testing"
)
func TestMakeSetDSCPDotConfig(t *testing.T) {
server := makeGenericServer()
server.CDN = "mycdn"
hdr := "myHeaderComment"
fileName := "set_dscp_42.config"
cfg, err := MakeSetDSCPDotConfig(fileName, server, &SetDSCPDotConfigOpts{HdrComment: hdr})
if err != nil {
t.Fatal(err)
}
txt := cfg.Text
if !strings.Contains(txt, hdr) {
t.Errorf("expected: header comment text '" + hdr + "', actual: missing")
}
if !strings.HasPrefix(strings.TrimSpace(txt), "#") {
t.Errorf("expected: header comment, actual: missing")
}
if !strings.Contains(txt, "42") {
t.Errorf("expected: dscp number '42' in config, actual '%v'", txt)
}
}
func TestMakeSetDSCPDotConfigNonNumber(t *testing.T) {
server := makeGenericServer()
server.CDN = "mycdn"
hdr := "myHeaderComment"
fileName := "set_dscp_42a.config"
cfg, err := MakeSetDSCPDotConfig(fileName, server, &SetDSCPDotConfigOpts{HdrComment: hdr})
if err != nil {
t.Fatal(err)
}
txt := cfg.Text
if !strings.Contains(strings.ToLower(txt), "error") {
t.Errorf("expected: error from non-number dscp, actual '%v'", txt)
}
}
```
|
```c++
// PanelSplitFile.cpp
#include "StdAfx.h"
#include "../../../Common/IntToString.h"
#include "../../../Windows/ErrorMsg.h"
#include "../../../Windows/FileName.h"
#include "../GUI/ExtractRes.h"
#include "resource.h"
#include "App.h"
#include "CopyDialog.h"
#include "FormatUtils.h"
#include "LangUtils.h"
#include "SplitDialog.h"
#include "SplitUtils.h"
#include "PropertyNameRes.h"
using namespace NWindows;
using namespace NFile;
using namespace NDir;
static const char * const g_Message_FileWriteError = "File write error";
struct CVolSeqName
{
UString UnchangedPart;
UString ChangedPart;
CVolSeqName(): ChangedPart("000") {};
void SetNumDigits(UInt64 numVolumes)
{
ChangedPart = "000";
while (numVolumes > 999)
{
numVolumes /= 10;
ChangedPart += '0';
}
}
bool ParseName(const UString &name)
{
if (name.Len() < 2)
return false;
if (name.Back() != L'1' || name[name.Len() - 2] != L'0')
return false;
unsigned pos = name.Len() - 2;
for (; pos > 0 && name[pos - 1] == '0'; pos--);
UnchangedPart.SetFrom(name, pos);
ChangedPart = name.Ptr(pos);
return true;
}
UString GetNextName();
};
UString CVolSeqName::GetNextName()
{
for (int i = (int)ChangedPart.Len() - 1; i >= 0; i--)
{
wchar_t c = ChangedPart[i];
if (c != L'9')
{
ChangedPart.ReplaceOneCharAtPos(i, (wchar_t)(c + 1));
break;
}
ChangedPart.ReplaceOneCharAtPos(i, L'0');
if (i == 0)
ChangedPart.InsertAtFront(L'1');
}
return UnchangedPart + ChangedPart;
}
class CThreadSplit: public CProgressThreadVirt
{
HRESULT ProcessVirt();
public:
FString FilePath;
FString VolBasePath;
UInt64 NumVolumes;
CRecordVector<UInt64> VolumeSizes;
};
class CPreAllocOutFile
{
UInt64 _preAllocSize;
public:
NIO::COutFile File;
UInt64 Written;
CPreAllocOutFile(): _preAllocSize(0), Written(0) {}
~CPreAllocOutFile()
{
SetCorrectFileLength();
}
void PreAlloc(UInt64 preAllocSize)
{
_preAllocSize = 0;
if (File.SetLength(preAllocSize))
_preAllocSize = preAllocSize;
File.SeekToBegin();
}
bool Write(const void *data, UInt32 size, UInt32 &processedSize) throw()
{
bool res = File.Write(data, size, processedSize);
Written += processedSize;
return res;
}
void Close()
{
SetCorrectFileLength();
Written = 0;
_preAllocSize = 0;
File.Close();
}
void SetCorrectFileLength()
{
if (Written < _preAllocSize)
{
File.SetLength(Written);
_preAllocSize = 0;
}
}
};
static const UInt32 kBufSize = (1 << 20);
HRESULT CThreadSplit::ProcessVirt()
{
NIO::CInFile inFile;
if (!inFile.Open(FilePath))
return GetLastError();
CPreAllocOutFile outFile;
CMyBuffer buffer;
if (!buffer.Allocate(kBufSize))
return E_OUTOFMEMORY;
CVolSeqName seqName;
seqName.SetNumDigits(NumVolumes);
UInt64 length;
if (!inFile.GetLength(length))
return GetLastError();
CProgressSync &sync = Sync;
sync.Set_NumBytesTotal(length);
UInt64 pos = 0;
UInt64 prev = 0;
UInt64 numFiles = 0;
unsigned volIndex = 0;
for (;;)
{
UInt64 volSize;
if (volIndex < VolumeSizes.Size())
volSize = VolumeSizes[volIndex];
else
volSize = VolumeSizes.Back();
UInt32 needSize = kBufSize;
{
const UInt64 rem = volSize - outFile.Written;
if (needSize > rem)
needSize = (UInt32)rem;
}
UInt32 processedSize;
if (!inFile.Read(buffer, needSize, processedSize))
return GetLastError();
if (processedSize == 0)
return S_OK;
needSize = processedSize;
if (outFile.Written == 0)
{
FString name = VolBasePath;
name += '.';
name += us2fs(seqName.GetNextName());
sync.Set_FilePath(fs2us(name));
if (!outFile.File.Create(name, false))
{
HRESULT res = GetLastError();
AddErrorPath(name);
return res;
}
UInt64 expectSize = volSize;
if (pos < length)
{
const UInt64 rem = length - pos;
if (expectSize > rem)
expectSize = rem;
}
outFile.PreAlloc(expectSize);
}
if (!outFile.Write(buffer, needSize, processedSize))
return GetLastError();
if (needSize != processedSize)
throw g_Message_FileWriteError;
pos += processedSize;
if (outFile.Written == volSize)
{
outFile.Close();
sync.Set_NumFilesCur(++numFiles);
if (volIndex < VolumeSizes.Size())
volIndex++;
}
if (pos - prev >= ((UInt32)1 << 22) || outFile.Written == 0)
{
RINOK(sync.Set_NumBytesCur(pos));
prev = pos;
}
}
}
void CApp::Split()
{
int srcPanelIndex = GetFocusedPanelIndex();
CPanel &srcPanel = Panels[srcPanelIndex];
if (!srcPanel.Is_IO_FS_Folder())
{
srcPanel.MessageBox_Error_UnsupportOperation();
return;
}
CRecordVector<UInt32> indices;
srcPanel.GetOperatedItemIndices(indices);
if (indices.IsEmpty())
return;
if (indices.Size() != 1)
{
srcPanel.MessageBox_Error_LangID(IDS_SELECT_ONE_FILE);
return;
}
int index = indices[0];
if (srcPanel.IsItem_Folder(index))
{
srcPanel.MessageBox_Error_LangID(IDS_SELECT_ONE_FILE);
return;
}
const UString itemName = srcPanel.GetItemName(index);
UString srcPath = srcPanel.GetFsPath() + srcPanel.GetItemPrefix(index);
UString path = srcPath;
unsigned destPanelIndex = (NumPanels <= 1) ? srcPanelIndex : (1 - srcPanelIndex);
CPanel &destPanel = Panels[destPanelIndex];
if (NumPanels > 1)
if (destPanel.IsFSFolder())
path = destPanel.GetFsPath();
CSplitDialog splitDialog;
splitDialog.FilePath = srcPanel.GetItemRelPath(index);
splitDialog.Path = path;
if (splitDialog.Create(srcPanel.GetParent()) != IDOK)
return;
NFind::CFileInfo fileInfo;
if (!fileInfo.Find(us2fs(srcPath + itemName)))
{
srcPanel.MessageBox_Error(L"Cannot find file");
return;
}
if (fileInfo.Size <= splitDialog.VolumeSizes.Front())
{
srcPanel.MessageBox_Error_LangID(IDS_SPLIT_VOL_MUST_BE_SMALLER);
return;
}
const UInt64 numVolumes = GetNumberOfVolumes(fileInfo.Size, splitDialog.VolumeSizes);
if (numVolumes >= 100)
{
wchar_t s[32];
ConvertUInt64ToString(numVolumes, s);
if (::MessageBoxW(srcPanel, MyFormatNew(IDS_SPLIT_CONFIRM_MESSAGE, s),
LangString(IDS_SPLIT_CONFIRM_TITLE),
MB_YESNOCANCEL | MB_ICONQUESTION) != IDYES)
return;
}
path = splitDialog.Path;
NName::NormalizeDirPathPrefix(path);
if (!CreateComplexDir(us2fs(path)))
{
DWORD lastError = ::GetLastError();
srcPanel.MessageBox_Error_2Lines_Message_HRESULT(MyFormatNew(IDS_CANNOT_CREATE_FOLDER, path), lastError);
return;
}
{
CThreadSplit spliter;
spliter.NumVolumes = numVolumes;
CProgressDialog &progressDialog = spliter;
UString progressWindowTitle ("7-Zip"); // LangString(IDS_APP_TITLE, 0x03000000);
UString title = LangString(IDS_SPLITTING);
progressDialog.ShowCompressionInfo = false;
progressDialog.MainWindow = _window;
progressDialog.MainTitle = progressWindowTitle;
progressDialog.MainAddTitle = title;
progressDialog.MainAddTitle.Add_Space();
progressDialog.Sync.Set_TitleFileName(itemName);
spliter.FilePath = us2fs(srcPath + itemName);
spliter.VolBasePath = us2fs(path + srcPanel.GetItemName_for_Copy(index));
spliter.VolumeSizes = splitDialog.VolumeSizes;
// if (splitDialog.VolumeSizes.Size() == 0) return;
// CPanel::CDisableTimerProcessing disableTimerProcessing1(srcPanel);
// CPanel::CDisableTimerProcessing disableTimerProcessing2(destPanel);
if (spliter.Create(title, _window) != 0)
return;
}
RefreshTitleAlways();
// disableNotify.Restore();
// disableNotify.Restore();
// srcPanel.SetFocusToList();
// srcPanel.RefreshListCtrlSaveFocused();
}
class CThreadCombine: public CProgressThreadVirt
{
HRESULT ProcessVirt();
public:
FString InputDirPrefix;
FStringVector Names;
FString OutputPath;
UInt64 TotalSize;
};
HRESULT CThreadCombine::ProcessVirt()
{
NIO::COutFile outFile;
if (!outFile.Create(OutputPath, false))
{
HRESULT res = GetLastError();
AddErrorPath(OutputPath);
return res;
}
CProgressSync &sync = Sync;
sync.Set_NumBytesTotal(TotalSize);
CMyBuffer bufferObject;
if (!bufferObject.Allocate(kBufSize))
return E_OUTOFMEMORY;
Byte *buffer = (Byte *)(void *)bufferObject;
UInt64 pos = 0;
FOR_VECTOR (i, Names)
{
NIO::CInFile inFile;
const FString nextName = InputDirPrefix + Names[i];
if (!inFile.Open(nextName))
{
HRESULT res = GetLastError();
AddErrorPath(nextName);
return res;
}
sync.Set_FilePath(fs2us(nextName));
for (;;)
{
UInt32 processedSize;
if (!inFile.Read(buffer, kBufSize, processedSize))
{
HRESULT res = GetLastError();
AddErrorPath(nextName);
return res;
}
if (processedSize == 0)
break;
UInt32 needSize = processedSize;
if (!outFile.Write(buffer, needSize, processedSize))
{
HRESULT res = GetLastError();
AddErrorPath(OutputPath);
return res;
}
if (needSize != processedSize)
throw g_Message_FileWriteError;
pos += processedSize;
RINOK(sync.Set_NumBytesCur(pos));
}
}
return S_OK;
}
extern void AddValuePair2(UString &s, UINT resourceID, UInt64 num, UInt64 size);
static void AddInfoFileName(UString &dest, const UString &name)
{
dest += "\n ";
dest += name;
}
void CApp::Combine()
{
int srcPanelIndex = GetFocusedPanelIndex();
CPanel &srcPanel = Panels[srcPanelIndex];
if (!srcPanel.IsFSFolder())
{
srcPanel.MessageBox_Error_LangID(IDS_OPERATION_IS_NOT_SUPPORTED);
return;
}
CRecordVector<UInt32> indices;
srcPanel.GetOperatedItemIndices(indices);
if (indices.IsEmpty())
return;
int index = indices[0];
if (indices.Size() != 1 || srcPanel.IsItem_Folder(index))
{
srcPanel.MessageBox_Error_LangID(IDS_COMBINE_SELECT_ONE_FILE);
return;
}
const UString itemName = srcPanel.GetItemName(index);
UString srcPath = srcPanel.GetFsPath() + srcPanel.GetItemPrefix(index);
UString path = srcPath;
unsigned destPanelIndex = (NumPanels <= 1) ? srcPanelIndex : (1 - srcPanelIndex);
CPanel &destPanel = Panels[destPanelIndex];
if (NumPanels > 1)
if (destPanel.IsFSFolder())
path = destPanel.GetFsPath();
CVolSeqName volSeqName;
if (!volSeqName.ParseName(itemName))
{
srcPanel.MessageBox_Error_LangID(IDS_COMBINE_CANT_DETECT_SPLIT_FILE);
return;
}
{
CThreadCombine combiner;
UString nextName = itemName;
combiner.TotalSize = 0;
for (;;)
{
NFind::CFileInfo fileInfo;
if (!fileInfo.Find(us2fs(srcPath + nextName)) || fileInfo.IsDir())
break;
combiner.Names.Add(us2fs(nextName));
combiner.TotalSize += fileInfo.Size;
nextName = volSeqName.GetNextName();
}
if (combiner.Names.Size() == 1)
{
srcPanel.MessageBox_Error_LangID(IDS_COMBINE_CANT_FIND_MORE_THAN_ONE_PART);
return;
}
if (combiner.TotalSize == 0)
{
srcPanel.MessageBox_Error(L"No data");
return;
}
UString info;
AddValuePair2(info, IDS_PROP_FILES, combiner.Names.Size(), combiner.TotalSize);
info.Add_LF();
info += srcPath;
unsigned i;
for (i = 0; i < combiner.Names.Size() && i < 2; i++)
AddInfoFileName(info, fs2us(combiner.Names[i]));
if (i != combiner.Names.Size())
{
if (i + 1 != combiner.Names.Size())
AddInfoFileName(info, L"...");
AddInfoFileName(info, fs2us(combiner.Names.Back()));
}
{
CCopyDialog copyDialog;
copyDialog.Value = path;
LangString(IDS_COMBINE, copyDialog.Title);
copyDialog.Title.Add_Space();
copyDialog.Title += srcPanel.GetItemRelPath(index);
LangString(IDS_COMBINE_TO, copyDialog.Static);
copyDialog.Info = info;
if (copyDialog.Create(srcPanel.GetParent()) != IDOK)
return;
path = copyDialog.Value;
}
NName::NormalizeDirPathPrefix(path);
if (!CreateComplexDir(us2fs(path)))
{
DWORD lastError = ::GetLastError();
srcPanel.MessageBox_Error_2Lines_Message_HRESULT(MyFormatNew(IDS_CANNOT_CREATE_FOLDER, path), lastError);
return;
}
UString outName = volSeqName.UnchangedPart;
while (!outName.IsEmpty())
{
if (outName.Back() != L'.')
break;
outName.DeleteBack();
}
if (outName.IsEmpty())
outName = "file";
NFind::CFileInfo fileInfo;
UString destFilePath = path + outName;
combiner.OutputPath = us2fs(destFilePath);
if (fileInfo.Find(combiner.OutputPath))
{
srcPanel.MessageBox_Error(MyFormatNew(IDS_FILE_EXIST, destFilePath));
return;
}
CProgressDialog &progressDialog = combiner;
progressDialog.ShowCompressionInfo = false;
UString progressWindowTitle ("7-Zip"); // LangString(IDS_APP_TITLE, 0x03000000);
UString title = LangString(IDS_COMBINING);
progressDialog.MainWindow = _window;
progressDialog.MainTitle = progressWindowTitle;
progressDialog.MainAddTitle = title;
progressDialog.MainAddTitle.Add_Space();
combiner.InputDirPrefix = us2fs(srcPath);
// CPanel::CDisableTimerProcessing disableTimerProcessing1(srcPanel);
// CPanel::CDisableTimerProcessing disableTimerProcessing2(destPanel);
if (combiner.Create(title, _window) != 0)
return;
}
RefreshTitleAlways();
// disableNotify.Restore();
// disableNotify.Restore();
// srcPanel.SetFocusToList();
// srcPanel.RefreshListCtrlSaveFocused();
}
```
|
Kirsten Moore-Towers (born July 1, 1992) is a Canadian retired competitive pair skater who competed internationally at the senior level for thirteen seasons from 2009 to 2022. She first achieved distinction partnered with Dylan Moscovitch, winning the 2011 Canadian national title. The two won silver at the 2013 Four Continents Championships, as well as seven medals on the ISU Grand Prix, qualifying to three Grand Prix Finals and finishing fourth at two consecutive World Championships. As part of the Canadian team at the 2014 Winter Olympics, Moore-Towers/Moscovitch won an Olympic silver medal in the figure skating team event.
After the end of her partnership with Moscovitch, Moore-Towers formed a new partnership with Michael Marinaro. Together they were three-time Canadian national champions (2019–20, 2022). Competing internationally, they were two-time Four Continents medalists (silver in 2019, bronze in 2020), and won medals on both the Grand Prix and Challenger series, including gold at the 2019 Nebelhorn Trophy and 2017 U.S. International Classic. The two represented Canada at the 2018 and 2022 Winter Olympics.
Personal life
Kirsten Moore-Towers was born on July 1, 1992, in St. Catharines, Ontario, Canada. She is the daughter of a steel company employee and a Finance Manager and has a sister, Katie, who is eight years younger. Moore-Towers is an advocate for eating disorders prevention and recovery in sport and has spoken publicly about her experiences in this area.
Moore-Towers began dating fellow Canadian figure skater Liam Firus in 2015. On August 22, 2023, they became engaged.
Early years in skating
Moore-Towers was introduced to skating at age two and a half by her mother. She began pair skating around April 2008, teaming up with Andrew Evans. They appeared at one ISU Junior Grand Prix event and placed fourth on the junior level at the Canadian Championships. The pair split after ten months together.
Partnership with Moscovitch
2009–10 season
In February 2009, Moore-Towers teamed up with Dylan Moscovitch, who had trained at the same rink for several years. Kris Wirtz and Kristy Sargeant-Wirtz coached the pair at the Kitchener-Waterloo Skating Club in Waterloo, Ontario.
Moore-Towers/Moscovitch debuted on the Grand Prix series at the 2009 Skate Canada International, placing sixth. They came fifth at the 2010 Canadian Championships and thus did not qualify for the Canadian teams for the 2010 Winter Olympics and 2010 World Championships. They were instead sent to the 2010 Four Continents Championships in Jeonju, South Korea, where they placed ninth.
2010–11 season: National champions
The pair initially received one Grand Prix assignment, the 2010 Skate America, but received a second, the 2010 Skate Canada International, after Jessica Dube / Bryce Davison withdrew. They won silver at both events and qualified for the Grand Prix Final, where they finished sixth.
At the 2011 Canadian Championships, Moore-Towers/Moscovitch placed first in both programs to win the Canadian national title, 16.29 points ahead of silver medallists Meagan Duhamel / Eric Radford. At the 2011 Four Continents Championships they placed fifth overall, after coming fifth in the short program and winning a small bronze medal for coming third in the free skate. They placed eighth in their debut at the 2011 World Championships.
2011–12 season
Assigned to two Grand Prix events, Moore-Towers/Moscovitch won bronze at both the 2011 Skate America and the 2011 Cup of China. At the 2012 Canadian Championships, they placed third in the short program and fourth in the free skate, finishing off the podium in fourth despite being the defending champions. Moore-Towers fell on their three-jump combination, and both fell while exiting a lift, resulting in three fall deductions accrued during the free skate. She commented afterwards: "I still love figure skating."
2012–13 season: Silver at Four Continents
Moore-Towers/Moscovitch began the season at the 2012 U.S. Classic, where they won the gold medal. They came fourth at their first Grand Prix assignment, the 2012 Cup of China, but went on to win silver at the 2012 NHK Trophy. These results qualified them for the Grand Prix Final for the second time, where they finished fifth.
At the 2013 Canadian Championships, they placed second in both programs to win the silver medal, behind Duhamel/Radford. At the 2013 Four Continents Championships in Osaka, Japan, they placed second in the first program and first in the free skate, again winning the silver medal behind Duhamel/Radford. Moore-Towers' fall on a throw triple loop prevented them from winning the title outright, which she called "a bit unfortunate." This was the team's first (and only, as it would turn out) medal at a major international competition.
Moore-Towers/Moscovitch ended the season at the 2013 World Championships in London, Ontario, where they placed fourth after coming fifth in both segments.
2013–14 season: Sochi Olympics
Moore-Towers/Moscovitch repeated as gold medallists at the 2013 U.S. Classic before turning to the Grand Prix series. They won a silver medal at the 2013 Skate America and bronze at the 2013 Rostelecom Cup, which qualified them for their third Grand Prix Final, where they again came sixth.
They won another silver medal at the 2014 Canadian Championships and were named to the Canadian team for the 2014 Winter Olympics. Moore-Towers/Moscovitch were part of the Canadian team for the team event in Sochi, performing the pairs free skate portion, where they came second. Canada won the silver medal overall. In the pairs event, they came sixth in the short program and fifth in the free skate to finish fifth overall.
In their final event together, the 2014 World Championships in Saitama, Japan, they finished fourth for the second straight year. They came third in the free skate, winning a bronze small medal. Moore-Towers and Moscovitch announced the end of their partnership on April 30, 2014, stating that they had different goals.
Partnership with Marinaro
Moore-Towers tried out with Michael Marinaro and Mervin Tran. On June 3, 2014, Skate Canada announced that she and Marinaro had formed a partnership, coached by Kris Wirtz and Kristy Wirtz at the Kitchener Waterloo Skating Club in southern Ontario. Moore-Towers said they were adjusting their technique on lifts, stating: "Mike's former partner is much taller than I am, so the technique is a bit different; he has to work in a different way."
2014–15 season
Having received two 2014–15 Grand Prix assignments, Moore-Towers/Marinaro placed sixth at the 2014 Skate Canada International and seventh at the 2014 Trophée Éric Bompard. They were fourth at the 2015 Canadian Championships and ninth at the 2015 Four Continents.
In March 2015, the pair relocated to Montreal, Quebec, to train under coaches Richard Gauthier and Bruno Marcotte.
2015–16 season
Moore-Towers/Marinaro began the 2015–16 season with a bronze medal at the 2015 U.S. International Classic – their first Challenger Series event. Competing in the Grand Prix series, they won bronze at the 2015 Skate Canada International and placed seventh at the 2015 Rostelecom Cup. During the short program at the Canadian Nationals, the two clipped blades as they began the twist lift, resulting in a hard fall. They finished fourth for the second year in a row. On March 11, Moore-Towers/Marinaro were added to Canada's team for the 2016 World Championships after Julianne Séguin / Charlie Bilodeau withdrew due to injury. They placed eighth at the event in Boston.
2016–17 season: National bronze medal
Moore-Towers sustained a concussion during training in Montreal on August 3, 2016; as the pair practiced a jump combination, she fell in Marinaro's path, and he collided with her head. The pair withdrew from their Grand Prix assignments, the 2016 Rostelecom Cup and 2016 NHK Trophy. They returned to competition at the 2017 Canadian Championships, where they placed third. They placed seventh at the 2017 Four Continents Championships. They finished the season at the 2017 World Team Trophy event, where both they and the Canadian team placed fourth.
2017–18 season: Pyeongchang Olympics
Moore-Towers and Marinaro began the season at the US International Classic, where they won the gold medal. On the Grand Prix circuit, they placed sixth at the 2017 Skate America event and won bronze at the 2017 Cup of China. They again placed third at the 2018 Canadian Championships, qualifying them for a spot on the Canadian team for the 2018 Winter Olympics in Pyeongchang, South Korea. They placed eleventh at the Winter Olympics pairs competition.
Their season ended dramatically at the 2018 World Championships, where a disastrous short program from Séguin and Bilodeau resulted in Moore-Towers and Marinaro being the only Canadian pairs team to qualify for the free skate, having placed tenth in the short program despite Moore-Towers having an ankle injury that had impeded training for the World Championships. They needed to place no lower than tenth to qualify Canada for two pairs spots at the next year's world championships, placing additional pressure. The pair skated a new personal best, resulting in a fourth-place finish in the free skate and a sixth-place overall finish that also represented a personal best-combined score. Moore-Towers commented: "We had a tough couple of weeks leading into this competition with not much training to rely on. We didn't have that same confidence, so this is a testament to how hard we worked all season."
2018–19 season: National title and Four Continents silver
Following the retirements of Duhamel/Radford and Moscovitch and his new partner Liubov Ilyushechkina, and the breakup of the team of Séguin/Bilodeau, Moore-Towers and Marinaro became the most prominent remaining Canadian pairs team. Moore-Towers admitted in interviews that this additional pressure was a challenge during the summer months of preparation and that in addition they could not train jumps or throws for much of that time due to her ankle recuperation. They competed in two Challenger events, winning silver at both the Autumn Classic and Finlandia Trophy.
Competing on the Grand Prix, Moore-Towers/Marinaro won the bronze medal at the 2018 Skate Canada International, only 0.15 points behind silver medallists Peng Cheng / Jin Yang of China. Moore Towers remarked, "it's hard to lose the silver medal on a fraction of a point." At their second event, the 2018 NHK Trophy, they placed third after the short program, but a rougher free skate dropped them to fourth place, 0.83 points behind bronze medallists Alexa Scimeca Knierim / Chris Knierim of the United States. Marinaro said they were "disappointed with how this turned out."
The two were heavy favourites going into the 2019 Canadian Championships and prevailed, winning both the short and free programs decisively. Moore-Towers' eight-year gap between title victories was the widest in the history of the Canadian championships.
Moore-Towers/Marinaro won the short program at Four Continents, earning a gold small medal, by skating a clean program while rival teams, China's Peng/Jin and Sui Wenjing / Han Cong, both fell. They placed second in the free skate and won the silver overall, only 0.06 points behind gold medallists Sui/Han. They received a negative Grade of Execution on their second lift, which accounted for the points difference. Moore-Towers described it as "a little bit bittersweet" but that they were happy at the progress they had made.
Competing at the 2019 World Championships, Moore-Towers/Marinaro placed fifth in the short program, despite Marinaro putting a hand down on their side-by-side jump. They placed eighth in the free skate and dropped to seventh place overall as a consequence of errors on both side-by-side jumps by Marinaro and Moore-Towers putting a hand down on a throw jump. She remarked: "Unfortunately, today was not our day." The two concluded the season as part of Team Canada at the 2019 World Team Trophy, where they placed fourth among the six pairs teams, and Team Canada finished fifth overall.
2019–20 season: Four Continents bronze
Following the decision by coach Bruno Marcotte to relocate to Oakville, Moore-Towers and Marinaro opted to follow Marcotte, partly because it allowed them to be closer to their hometowns in Ontario. They dedicated much of the summer training period to reworking their technique on the triple twist, hoping to achieve greater amplitude. In their first event of the season, the Nebelhorn Trophy, they won the gold medal with first-place finishes in both segments.
For their first Grand Prix, Moore-Towers/Marinaro were assigned to the 2019 Skate Canada International, placing second in the short program with a new personal best. In the free skate, Marinaro made errors on both side-by-side jumps, but the team remained in second place, winning their first Grand Prix silver. At the 2019 NHK Trophy, Moore-Towers/Marinaro placed second in the short program despite a side-by-side spin error from Marinaro. They were second in the free skate as well, taking their second silver medal of the season and qualifying to the Grand Prix Final for the first time in their partnership. Competing at the Grand Prix Final in Torino, they were sixth of the six teams in the short program after Moore-Towers fell on their throw and Marinaro stepped out of his side-by-side jump. They skated cleanly in the free skate other than Marinaro having an unusual fall after performing their throw Salchow, placing fourth in that segment and rising to fifth place overall.
Entering the 2020 Canadian Championships as the favourites to defend their title, they placed first in the short program despite Moore-Towers stepping out of her triple toe loop jump. She singled the beginning of her planned three-jump combination in the free skate as well, but the two skated cleanly otherwise and won the free skate and their second national title.
Skating a clean program, Moore-Towers/Marinaro won the short program at the Four Continents Championships for the second consecutive year, placing ahead of a similarly clean Peng/Jin and reigning World champions Sui/Han, who erred by performing only a double throw. They struggled in the free skate, with Moore-Towers doubling their intended triple Salchow for the second straight competition and Marinaro falling in a transition. Fourth in the free skate behind Sui/Han, Peng/Jin and Calalang/Johnson, they won the bronze medal overall. Moore-Towers said afterward, "we've been practicing really well, and it’s become apparent that we need to translate what we do in training into how we perform at competitions." They were assigned to compete at the World Championships in Montreal, but these were cancelled as a result of the coronavirus pandemic.
2020–21 season
Following the initial lockdown, Moore-Towers and Marinaro were placed on a list of skaters allowed to continue training through future lockdowns. Moore-Towers/Marinaro were assigned to the 2020 Skate Canada International, but this event was also cancelled as a result of the pandemic. In September, Moore-Towers suffered a rib injury in training that kept her off the ice for several weeks.
Moore-Towers/Marinaro competed for the first time that season at the Skate Canada Challenge, the main qualifying competition for the national championships, which was held virtually across several hub locations to minimize gatherings of athletes and officials. They easily won the competition despite a few errors.
On February 25, Moore-Towers and Marinaro were announced as part of the Canadian team to the 2021 World Championships in Stockholm. They placed tenth in the short program with several minor errors. They were fifth in the free skate, rising to sixth place overall, despite a minor error by Moore-Towers touched down on a throw.
2021–22 season: Beijing Olympics
During the summer of 2021, Moore-Towers began to suffer from panic attacks in training, relating to attempting the triple twist lift. As she later said, the twist had "never been my favourite element; it's just never been my friend." At points, she contemplated whether Marinaro should seek a different partner. They opted to proceed with the season. Moore-Towers/Marinaro began the season at the 2021 CS Finlandia Trophy, competing against new domestic rivals James/Radford. They placed eighth, three ordinals and five points behind James/Radford. Moore-Towers called it "nowhere where we wanted in either program."
Competing on the Grand Prix at the 2021 Skate Canada International, Moore-Towers/Marinaro were fourth in the short program. In the free skate, they had one of their lifts invalidated due to a failed initial entry and had to abort a second lift; as a result, they were sixth in that segment and dropped to sixth overall. Moore-Towers said afterward, "here is no rhyme nor reason for the lifts. We had a tricky practice this morning, so we had more focus on the jumps and throws." They were fifth at the 2021 Rostelecom Cup, continuing to struggle on their elements, which Moore-Towers called "more of a mental thing" as it was not consistent with their training. Following the Grand Prix they competed at the 2021 CS Golden Spin of Zagreb, where they finished in eighth place.
After a disappointing fall season, Moore-Towers/Marinaro sought to defend their national title at the 2022 Canadian Championships, held without an audience in Ottawa due to restrictions prompted by the Omicron variant. They won the short program by 6.14 points over training partners Walsh/Michaud, while James/Radford placed fourth and withdrew before the free skate. Moore-Towers/Marinaro easily won the free skate, with only their twist receiving a negative Grade of Execution. Moore-Towers said she was "ecstatic," and "it wasn't perfect, but it is obviously leaps and bounds ahead of what we've done this season." On January 9 they were named to the Canadian Olympic team.
Moore-Towers/Marinaro began the Games as the Canadian entries in the pairs' short program of the Olympic team event. They received a negative grade of execution on their triple twist, and Moore-Towers stepped out of her triple toe loop but secured a season's best score of 67.34 to place fifth, earning Team Canada six points. They did not skate in the free segment, which James/Radford handled, and Team Canada ultimately finished in fourth overall. In the pairs event, Moore-Towers/Marinaro had a disastrous short program when both fell attempting their throw jump, and they finished thirteenth in the segment. They rose to tenth place after the free skate.
The team was supposed to conclude the season, and their competitive careers, at the 2022 World Championships in Montpellier. However, Moore-Towers' season-long struggle with panic attacks came to a head, and she opted to withdraw from the event, citing American gymnast Simone Biles as inspiration. On the subject of attending the World Championships with Marinaro, Moore-Towers said, "I love him so much, cherish his opinion and value his voice and like to think I would give him anything in the world that he asked for. I think it says a lot that I could not give him this."
On June 7, the pair announced their retirement from competitive skating. Moore-Towers remarked that her "career was filled with extreme highs and some tumultuous lows, and it certainly wasn’t perfect; nor was I. I hope to be remembered as a good teammate, as somebody who won with class and lost with dignity."
Programs
With Marinaro
With Moscovitch
Competitive highlights
GP: Grand Prix; CS: Challenger Series; JGP: Junior Grand Prix
With Marinaro
With Moscovitch
With Evans
Detailed results
Small medals for short and free programs awarded only at ISU Championships. At team events, medals awarded for team results only. Current ISU personal bests highlighted in bold. Historical ISU personal bests highlighted in italics.
With Marinaro
See also
List of Canadian sports personalities
References
External links
1992 births
Living people
Canadian female pair skaters
Skating people from Ontario
Sportspeople from St. Catharines
Figure skaters at the 2014 Winter Olympics
Figure skaters at the 2018 Winter Olympics
Figure skaters at the 2022 Winter Olympics
Olympic figure skaters for Canada
Medalists at the 2014 Winter Olympics
Olympic medalists in figure skating
Olympic silver medalists for Canada
Four Continents Figure Skating Championships medalists
|
```javascript
var t = require('tap')
if (/0\.(10|8)/.test(process.version)) {
t.pass('just a dummy test, no beforeExit in this node version')
} else {
process.on('beforeExit', function (code) {
t.equal(code, 0, 'did not throw')
})
}
var lf = require('lockfile')
lf.unlock('no-file-no-cb')
```
|
```c++
//
// file licence_1_0.txt or copy at path_to_url
// Auto-generated by boost::lexer, do not edit
#if !defined(BOOST_SPIRIT_LEXER_NEXT_TOKEN_WCL_NOV_10_2009_17_20_29)
#define BOOST_SPIRIT_LEXER_NEXT_TOKEN_WCL_NOV_10_2009_17_20_29
#include <boost/detail/iterator.hpp>
#include <boost/spirit/home/support/detail/lexer/char_traits.hpp>
////////////////////////////////////////////////////////////////////////////////
// the generated table of state names and the tokenizer have to be
// defined in the boost::spirit::lex::lexertl::static_ namespace
namespace boost { namespace spirit { namespace lex { namespace lexertl { namespace static_ {
////////////////////////////////////////////////////////////////////////////////
// this table defines the names of the lexer states
char const* const lexer_state_names_wcl[1] =
{
"INITIAL"
};
////////////////////////////////////////////////////////////////////////////////
// this variable defines the number of lexer states
std::size_t const lexer_state_count_wcl = 1;
////////////////////////////////////////////////////////////////////////////////
// this function returns the next matched token
template<typename Iterator>
std::size_t next_token_wcl (std::size_t& /*start_state_*/, bool& /*bol_*/,
Iterator &start_token_, Iterator const& end_, std::size_t& unique_id_)
{
enum {end_state_index, id_index, unique_id_index, state_index, bol_index,
eol_index, dead_state_index, dfa_offset};
static const std::size_t npos = static_cast<std::size_t>(~0);
static const std::size_t lookup_[256] = {
9, 9, 9, 9, 9, 9, 9, 9,
9, 8, 7, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
8, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9 };
static const std::size_t dfa_alphabet_ = 10;
static const std::size_t dfa_[50] = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 3, 4, 2, 1, 65536, 0, 0,
0, 0, 0, 0, 0, 2, 1, 65537,
1, 0, 0, 0, 0, 0, 0, 0,
1, 65538, 2, 0, 0, 0, 0, 0,
0, 0 };
if (start_token_ == end_)
{
unique_id_ = npos;
return 0;
}
std::size_t const* ptr_ = dfa_ + dfa_alphabet_;
Iterator curr_ = start_token_;
bool end_state_ = *ptr_ != 0;
std::size_t id_ = *(ptr_ + id_index);
std::size_t uid_ = *(ptr_ + unique_id_index);
Iterator end_token_ = start_token_;
while (curr_ != end_)
{
std::size_t const state_ =
ptr_[lookup_[static_cast<unsigned char>(*curr_++)]];
if (state_ == 0) break;
ptr_ = &dfa_[state_ * dfa_alphabet_];
if (*ptr_)
{
end_state_ = true;
id_ = *(ptr_ + id_index);
uid_ = *(ptr_ + unique_id_index);
end_token_ = curr_;
}
}
if (end_state_)
{
// return longest match
start_token_ = end_token_;
}
else
{
id_ = npos;
uid_ = npos;
}
unique_id_ = uid_;
return id_;
}
////////////////////////////////////////////////////////////////////////////////
// this defines a generic accessors for the information above
struct lexer_wcl
{
// version number and feature-set of compatible static lexer engine
enum
{
static_version = 65536,
supports_bol = false,
supports_eol = false
};
// return the number of lexer states
static std::size_t state_count()
{
return lexer_state_count_wcl;
}
// return the name of the lexer state as given by 'idx'
static char const* state_name(std::size_t idx)
{
return lexer_state_names_wcl[idx];
}
// return the next matched token
template<typename Iterator>
static std::size_t next(std::size_t &start_state_, bool& bol_
, Iterator &start_token_, Iterator const& end_, std::size_t& unique_id_)
{
return next_token_wcl(start_state_, bol_, start_token_, end_, unique_id_);
}
};
}}}}} // namespace boost::spirit::lex::lexertl::static_
#endif
```
|
```xml
import React from 'react';
import { fireEvent, render, screen } from '@testing-library/react';
import sinon from 'sinon';
import { testStandardProps } from '@test/utils';
import MultiCascadeTree from '../MultiCascadeTree';
import { mockTreeData } from '@test/mocks/data-mock';
const items = mockTreeData(['1', '2', ['3', '3-1', '3-2']]);
describe('MultiCascadeTree', () => {
testStandardProps(<MultiCascadeTree data={[]} />);
it('Should be active by value', () => {
const value = ['2'];
render(<MultiCascadeTree data={items} value={value} />);
expect(screen.getByRole('checkbox', { name: '2' })).to.be.checked;
});
it('Should be active by defaultValue', () => {
const value = ['2'];
render(<MultiCascadeTree data={items} defaultValue={value} />);
expect(screen.getByRole('checkbox', { name: '2' })).to.be.checked;
});
it('Should call `onSelect` callback ', () => {
const onSelect = sinon.spy();
render(<MultiCascadeTree data={items} onSelect={onSelect} />);
fireEvent.click(screen.getByRole('checkbox', { name: '2' }));
expect(onSelect).to.have.been.calledOnce;
});
it('Should call `onChange` callback', () => {
const onChange = sinon.spy();
render(<MultiCascadeTree data={items} onChange={onChange} />);
fireEvent.click(screen.getByRole('checkbox', { name: '1' }));
expect(onChange).to.have.been.calledWith(['1']);
});
it('Should call onSelect callback with 3 params', () => {
const onSelect = sinon.spy();
render(<MultiCascadeTree data={items} onSelect={onSelect} />);
const checkbox = screen.getByText((_content, element) => element?.textContent === '2', {
selector: '.rs-checkbox'
});
fireEvent.click(checkbox);
expect(onSelect).to.have.been.calledWith(
{ label: '2', value: '2' },
[{ label: '2', value: '2' }],
sinon.match({ target: checkbox })
);
});
it('Should item able to stringfy', () => {
const onSelect = sinon.spy();
const renderTreeNode = sinon.spy();
render(<MultiCascadeTree data={items} onSelect={onSelect} renderTreeNode={renderTreeNode} />);
fireEvent.click(screen.getByRole('treeitem', { name: '3' }).firstChild as HTMLElement);
expect(onSelect).to.called;
expect(renderTreeNode).to.called;
expect(() => JSON.stringify(items[2])).to.not.throw();
expect(() => JSON.stringify(onSelect.firstCall.args[1])).to.not.throw();
expect(() => JSON.stringify(renderTreeNode.lastCall.args[1])).to.not.throw();
});
it('Should call onCheck callback ', () => {
const onCheck = sinon.spy();
render(<MultiCascadeTree data={items} onCheck={onCheck} />);
fireEvent.click(screen.getByRole('checkbox', { name: '1' }));
expect(onCheck).to.have.been.calledWith(['1'], { label: '1', value: '1' }, true);
});
it('Should update columns', () => {
const { rerender } = render(<MultiCascadeTree data={[]} />);
expect(screen.queryAllByRole('treeitem')).to.have.length(0);
rerender(<MultiCascadeTree data={[{ label: 'test', value: 1 }]} />);
expect(screen.getAllByRole('treeitem')).to.have.length(1);
expect(screen.getAllByRole('treeitem')[0]).to.have.text('test');
});
it('Should children be loaded lazily', () => {
render(
<MultiCascadeTree
data={[{ label: '1', value: '1', children: [] }]}
getChildren={() => {
return [{ label: '2', value: '2' }];
}}
/>
);
fireEvent.click(screen.getByRole('treeitem', { name: '1' }).firstChild as HTMLElement);
expect(screen.getByRole('treeitem', { name: '2' })).to.exist;
});
it('Should present an asyn loading state', () => {
function fetchNodes() {
return new Promise<{ label: string; value: string }[]>(resolve => {
setTimeout(() => {
resolve([{ label: '2', value: '2' }]);
}, 500);
});
}
render(
<MultiCascadeTree
data={[{ label: '1', value: '1', children: [] }]}
getChildren={fetchNodes}
/>
);
fireEvent.click(screen.getByRole('treeitem', { name: '1' }).firstChild as HTMLElement);
// eslint-disable-next-line testing-library/no-node-access
expect(screen.getByRole('treeitem', { name: '1' }).querySelector('.rs-icon.rs-icon-spin')).to
.exist;
});
it('Should call `onSearch` callback ', () => {
const onSearchSpy = sinon.spy();
render(<MultiCascadeTree data={items} onSearch={onSearchSpy} searchable />);
const searchbox = screen.getByRole('searchbox');
fireEvent.change(searchbox, { target: { value: '3' } });
expect(screen.getAllByRole('treeitem')).to.have.length(3);
expect(onSearchSpy).to.have.been.calledOnce;
});
it('Should update the subcolumn when the leaf node is clicked', () => {
render(<MultiCascadeTree data={items} />);
expect(screen.queryByRole('tree')).to.be.exist;
// Click on a node that has child nodes
fireEvent.click(screen.getByRole('treeitem', { name: '3' }).firstChild as HTMLElement);
expect(screen.queryAllByRole('group')).to.have.length(2);
// Click on the leaf node
fireEvent.click(screen.getByRole('treeitem', { name: '1' }).firstChild as HTMLElement);
expect(screen.queryAllByRole('group')).to.have.length(1);
});
});
```
|
Levina () is a rural locality (a village) in Yorgvinskoye Rural Settlement, Kudymkarsky District, Perm Krai, Russia. The population was 107 as of 2010.
Geography
It is located 10 km north from Kudymkar.
References
Rural localities in Kudymkarsky District
|
Pasquinelli Homes was a Chicago, Illinois based home building company, founded in 1956 by brothers Bruno and Tony Pasquinelli. Other family members helped establish the company's growth including their brothers Jim and Mike, and cousin Jerry Spezia. In 2007, it was the fifth largest privately owned home building company in the United States (per number of units sold) according to Builder Magazine's 2007 Builder 100 report.
The company initially built only in the Chicago area, but expanded to Colorado and Florida in the early 1970s. Poor market conditions i forced it to stop construction in Florida in 1976, and Colorado in 1986. In 1988, the company began building in Charlotte, North Carolina under the name Portrait Homes. Subsequently, Pasquinelli has expanded that brand to markets in South Carolina, Indiana, Texas, Ohio, Georgia, West Virginia and Pennsylvania.
The company closed its operations in February 2009 and was liquidated in 2011.
PCM Mortgage
In October 2003, the company partnered with Wells Fargo Home Mortgage to form Pasquinelli Company Mortgage (PCM), which is currently a preferred lender of the company's' Midwest divisions. oro and Charlotte, North Carolina markets.
Bankruptcy
In 2010, Harris Bank said Bruno Pasquinelli (80) and his brother Anthony (76) took $87 million from their residential development business, turning their holding company into an "insolvent, empty box". In April 2011 Pasquinelli Homebuilding LLC filed for Chapter 7 bankruptcy liquidation. The company had apparently succumbed to the previous housing market crash. In U.S. Bankruptcy Court the company testified to having about $10 million to $50 million in liabilities and a bit more than $500,000 to $1 million in assets. In early 2021, the bankruptcy proceeding was settled.
References
External links
Official Site
http://www.builderonline.com/economic-conditions/chicago-based-pasquinelli-halts-home-building.aspx
Portrait homes
Defunct companies based in Chicago
Construction and civil engineering companies established in 1956
Home builders
1956 establishments in Illinois
Companies that filed for Chapter 11 bankruptcy in 2011
Companies disestablished in 2011
2011 disestablishments in Illinois
|
```java
package im.status.ethereum.pushnotifications;
import androidx.annotation.Nullable;
import com.facebook.common.executors.CallerThreadExecutor;
import com.facebook.common.references.CloseableReference;
import com.facebook.datasource.DataSource;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.imagepipeline.common.Priority;
import com.facebook.imagepipeline.core.ImagePipeline;
import com.facebook.imagepipeline.datasource.BaseBitmapDataSubscriber;
import com.facebook.imagepipeline.image.CloseableImage;
import com.facebook.imagepipeline.request.ImageRequest;
import com.facebook.imagepipeline.request.ImageRequestBuilder;
import android.util.Log;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri;
import java.util.concurrent.atomic.AtomicInteger;
import static im.status.ethereum.pushnotifications.PushNotification.LOG_TAG;
public class PushNotificationPicturesAggregator {
interface Callback {
public void call(Bitmap largeIconImage, Bitmap bigPictureImage);
}
private AtomicInteger count = new AtomicInteger(0);
private Bitmap largeIconImage;
private Bitmap bigPictureImage;
private Callback callback;
public PushNotificationPicturesAggregator(Callback callback) {
this.callback = callback;
}
public void setBigPicture(Bitmap bitmap) {
this.bigPictureImage = bitmap;
this.finished();
}
public void setBigPictureUrl(Context context, String url) {
if(null == url) {
this.setBigPicture(null);
return;
}
Uri uri = null;
try {
uri = Uri.parse(url);
} catch(Exception ex) {
Log.e(LOG_TAG, "Failed to parse bigPictureUrl", ex);
this.setBigPicture(null);
return;
}
final PushNotificationPicturesAggregator aggregator = this;
this.downloadRequest(context, uri, new BaseBitmapDataSubscriber() {
@Override
public void onNewResultImpl(@Nullable Bitmap bitmap) {
aggregator.setBigPicture(bitmap);
}
@Override
public void onFailureImpl(DataSource dataSource) {
aggregator.setBigPicture(null);
}
});
}
public void setLargeIcon(Bitmap bitmap) {
this.largeIconImage = bitmap;
this.finished();
}
public void setLargeIconUrl(Context context, String url) {
if(null == url) {
this.setLargeIcon(null);
return;
}
Uri uri = null;
try {
uri = Uri.parse(url);
} catch(Exception ex) {
Log.e(LOG_TAG, "Failed to parse largeIconUrl", ex);
this.setLargeIcon(null);
return;
}
final PushNotificationPicturesAggregator aggregator = this;
this.downloadRequest(context, uri, new BaseBitmapDataSubscriber() {
@Override
public void onNewResultImpl(@Nullable Bitmap bitmap) {
aggregator.setLargeIcon(bitmap);
}
@Override
public void onFailureImpl(DataSource dataSource) {
aggregator.setLargeIcon(null);
}
});
}
private void downloadRequest(Context context, Uri uri, BaseBitmapDataSubscriber subscriber) {
ImageRequest imageRequest = ImageRequestBuilder
.newBuilderWithSource(uri)
.setRequestPriority(Priority.HIGH)
.setLowestPermittedRequestLevel(ImageRequest.RequestLevel.FULL_FETCH)
.build();
if(!Fresco.hasBeenInitialized()) {
Fresco.initialize(context);
}
DataSource<CloseableReference<CloseableImage>> dataSource = Fresco.getImagePipeline().fetchDecodedImage(imageRequest, context);
dataSource.subscribe(subscriber, CallerThreadExecutor.getInstance());
}
private void finished() {
synchronized(this.count) {
int val = this.count.incrementAndGet();
if(val >= 2 && this.callback != null) {
this.callback.call(this.largeIconImage, this.bigPictureImage);
}
}
}
}
```
|
```php
<?php
/**
* @group taxonomy
* @group category
*
* @covers ::_make_cat_compat
*/
class Tests_Category_MakeCatCompat extends WP_UnitTestCase {
/**
* Validate _make_cat_compat function
*/
public function test__make_cat_compat() {
// Create test categories and array representations.
$testcat_array = array(
'slug' => 'testmcc',
'name' => 'Test MCC',
'description' => 'Category Test',
);
$testcat = self::factory()->category->create_and_get( $testcat_array );
$testcat_array['term_id'] = $testcat->term_id;
$testcat2_array = array(
'slug' => 'testmcc',
'name' => 'Test MCC',
'description' => 'Category Test',
'parent' => $testcat->term_id,
);
$testcat2 = self::factory()->category->create_and_get( $testcat2_array );
$testcat2_array['term_id'] = $testcat2->term_id;
// Unset properties to enable validation of object.
unset( $testcat->cat_ID );
unset( $testcat->category_count );
unset( $testcat->category_description );
unset( $testcat->cat_name );
unset( $testcat->category_nicename );
unset( $testcat->category_parent );
unset( $testcat2->cat_ID );
unset( $testcat2->category_count );
unset( $testcat2->category_description );
unset( $testcat2->cat_name );
unset( $testcat2->category_nicename );
unset( $testcat2->category_parent );
// Make compatible.
_make_cat_compat( $testcat );
_make_cat_compat( $testcat2 );
_make_cat_compat( $testcat_array );
_make_cat_compat( $testcat2_array );
// Validate compatibility object.
$this->assertSame( $testcat->cat_ID, $testcat->term_id );
$this->assertSame( $testcat->category_count, $testcat->count );
$this->assertSame( $testcat->category_description, $testcat->description );
$this->assertSame( $testcat->cat_name, $testcat->name );
$this->assertSame( $testcat->category_nicename, $testcat->slug );
$this->assertSame( $testcat->category_parent, $testcat->parent );
// Validate compatibility object with parent.
$this->assertSame( $testcat->cat_ID, $testcat->term_id );
$this->assertSame( $testcat->category_count, $testcat->count );
$this->assertSame( $testcat->category_description, $testcat->description );
$this->assertSame( $testcat->cat_name, $testcat->name );
$this->assertSame( $testcat->category_nicename, $testcat->slug );
$this->assertSame( $testcat->category_parent, $testcat->parent );
// Validate compatibility array.
$this->assertSame( $testcat_array['cat_ID'], $testcat_array['term_id'] );
$this->assertSame( $testcat_array['category_count'], $testcat_array['count'] );
$this->assertSame( $testcat_array['category_description'], $testcat_array['description'] );
$this->assertSame( $testcat_array['cat_name'], $testcat_array['name'] );
$this->assertSame( $testcat_array['category_nicename'], $testcat_array['slug'] );
$this->assertSame( $testcat_array['category_parent'], $testcat_array['parent'] );
// Validate compatibility array with parent.
$this->assertSame( $testcat_array['cat_ID'], $testcat_array['term_id'] );
$this->assertSame( $testcat_array['category_count'], $testcat_array['count'] );
$this->assertSame( $testcat_array['category_description'], $testcat_array['description'] );
$this->assertSame( $testcat_array['cat_name'], $testcat_array['name'] );
$this->assertSame( $testcat_array['category_nicename'], $testcat_array['slug'] );
$this->assertSame( $testcat_array['category_parent'], $testcat_array['parent'] );
}
}
```
|
```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\DataFusion;
class DataResidencyAugmentedView extends \Google\Collection
{
protected $collection_key = 'tpIds';
/**
* @var string[]
*/
public $crGopoGuris;
/**
* @var string[]
*/
public $crGopoPrefixes;
protected $serviceDataType = ServiceData::class;
protected $serviceDataDataType = '';
/**
* @var string[]
*/
public $tpIds;
/**
* @param string[]
*/
public function setCrGopoGuris($crGopoGuris)
{
$this->crGopoGuris = $crGopoGuris;
}
/**
* @return string[]
*/
public function getCrGopoGuris()
{
return $this->crGopoGuris;
}
/**
* @param string[]
*/
public function setCrGopoPrefixes($crGopoPrefixes)
{
$this->crGopoPrefixes = $crGopoPrefixes;
}
/**
* @return string[]
*/
public function getCrGopoPrefixes()
{
return $this->crGopoPrefixes;
}
/**
* @param ServiceData
*/
public function setServiceData(ServiceData $serviceData)
{
$this->serviceData = $serviceData;
}
/**
* @return ServiceData
*/
public function getServiceData()
{
return $this->serviceData;
}
/**
* @param string[]
*/
public function setTpIds($tpIds)
{
$this->tpIds = $tpIds;
}
/**
* @return string[]
*/
public function getTpIds()
{
return $this->tpIds;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DataResidencyAugmentedView::class, 'Google_Service_DataFusion_DataResidencyAugmentedView');
```
|
```javascript
`PureRenderMixin` in **React**
`ReactDOM.render` ref
Validate for required props
Custom validations for props
Default values for props
```
|
```smalltalk
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Build.Framework;
using Xamarin.Localization.MSBuild;
using Xamarin.Messaging.Build.Client;
using Xamarin.Utils;
namespace Xamarin.MacDev.Tasks {
public class ReadAppManifest : XamarinTask, ITaskCallback {
public ITaskItem? AppManifest { get; set; }
[Output]
public string? CLKComplicationGroup { get; set; }
[Output]
public string? CFBundleExecutable { get; set; }
[Output]
public string? CFBundleDisplayName { get; set; }
[Output]
public string? CFBundleIdentifier { get; set; }
[Output]
public string? CFBundleVersion { get; set; }
[Output]
public string? MinimumOSVersion { get; set; }
[Output]
public string? NSExtensionPointIdentifier { get; set; }
[Output]
public string? UIDeviceFamily { get; set; }
[Output]
public bool WKWatchKitApp { get; set; }
[Output]
public string? XSAppIconAssets { get; set; }
[Output]
public string? XSLaunchImageAssets { get; set; }
public override bool Execute ()
{
if (ShouldExecuteRemotely ())
return new TaskRunner (SessionId, BuildEngine4).RunAsync (this).Result;
PDictionary? plist = null;
if (!string.IsNullOrEmpty (AppManifest?.ItemSpec)) {
try {
plist = PDictionary.FromFile (AppManifest!.ItemSpec);
} catch (Exception ex) {
Log.LogError (null, null, null, AppManifest!.ItemSpec, 0, 0, 0, 0, MSBStrings.E0010, AppManifest.ItemSpec, ex.Message);
return false;
}
}
CFBundleExecutable = plist.GetCFBundleExecutable ();
CFBundleDisplayName = plist?.GetCFBundleDisplayName ();
CFBundleIdentifier = plist?.GetCFBundleIdentifier ();
CFBundleVersion = plist?.GetCFBundleVersion ();
CLKComplicationGroup = plist?.Get<PString> (ManifestKeys.CLKComplicationGroup)?.Value;
MinimumOSVersion = plist?.Get<PString> (PlatformFrameworkHelper.GetMinimumOSVersionKey (Platform))?.Value;
if (Platform == ApplePlatform.MacCatalyst) {
// The minimum version in the Info.plist is the macOS version. However, the rest of our tooling
// expects the iOS version, so expose that.
if (!MacCatalystSupport.TryGetiOSVersion (Sdks.GetAppleSdk (Platform).GetSdkPath (), MinimumOSVersion!, out var convertedVersion, out var knownMacOSVersions))
Log.LogError (MSBStrings.E0187, MinimumOSVersion, string.Join (", ", knownMacOSVersions.OrderBy (v => v)));
MinimumOSVersion = convertedVersion;
}
NSExtensionPointIdentifier = plist?.GetNSExtensionPointIdentifier ();
UIDeviceFamily = plist?.GetUIDeviceFamily ().ToString ();
WKWatchKitApp = plist?.GetWKWatchKitApp () == true;
XSAppIconAssets = plist?.Get<PString> (ManifestKeys.XSAppIconAssets)?.Value;
XSLaunchImageAssets = plist?.Get<PString> (ManifestKeys.XSLaunchImageAssets)?.Value;
return !Log.HasLoggedErrors;
}
public bool ShouldCopyToBuildServer (ITaskItem item) => false;
public bool ShouldCreateOutputFile (ITaskItem item) => false;
public IEnumerable<ITaskItem> GetAdditionalItemsToBeCopied () => Enumerable.Empty<ITaskItem> ();
}
}
```
|
```objective-c
/****************************************************************************
*
* ftsizes.h
*
* FreeType size objects management (specification).
*
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
* license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
*/
/**************************************************************************
*
* Typical application would normally not need to use these functions.
* However, they have been placed in a public API for the rare cases where
* they are needed.
*
*/
#ifndef FTSIZES_H_
#define FTSIZES_H_
#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
#error "Please fix the directory search order for header files"
#error "so that freetype.h of FreeType 2 is found first."
#endif
FT_BEGIN_HEADER
/**************************************************************************
*
* @section:
* sizes_management
*
* @title:
* Size Management
*
* @abstract:
* Managing multiple sizes per face.
*
* @description:
* When creating a new face object (e.g., with @FT_New_Face), an @FT_Size
* object is automatically created and used to store all pixel-size
* dependent information, available in the `face->size` field.
*
* It is however possible to create more sizes for a given face, mostly
* in order to manage several character pixel sizes of the same font
* family and style. See @FT_New_Size and @FT_Done_Size.
*
* Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only modify the
* contents of the current 'active' size; you thus need to use
* @FT_Activate_Size to change it.
*
* 99% of applications won't need the functions provided here, especially
* if they use the caching sub-system, so be cautious when using these.
*
*/
/**************************************************************************
*
* @function:
* FT_New_Size
*
* @description:
* Create a new size object from a given face object.
*
* @input:
* face ::
* A handle to a parent face object.
*
* @output:
* asize ::
* A handle to a new size object.
*
* @return:
* FreeType error code. 0~means success.
*
* @note:
* You need to call @FT_Activate_Size in order to select the new size for
* upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size,
* @FT_Load_Glyph, @FT_Load_Char, etc.
*/
FT_EXPORT( FT_Error )
FT_New_Size( FT_Face face,
FT_Size* size );
/**************************************************************************
*
* @function:
* FT_Done_Size
*
* @description:
* Discard a given size object. Note that @FT_Done_Face automatically
* discards all size objects allocated with @FT_New_Size.
*
* @input:
* size ::
* A handle to a target size object.
*
* @return:
* FreeType error code. 0~means success.
*/
FT_EXPORT( FT_Error )
FT_Done_Size( FT_Size size );
/**************************************************************************
*
* @function:
* FT_Activate_Size
*
* @description:
* Even though it is possible to create several size objects for a given
* face (see @FT_New_Size for details), functions like @FT_Load_Glyph or
* @FT_Load_Char only use the one that has been activated last to
* determine the 'current character pixel size'.
*
* This function can be used to 'activate' a previously created size
* object.
*
* @input:
* size ::
* A handle to a target size object.
*
* @return:
* FreeType error code. 0~means success.
*
* @note:
* If `face` is the size's parent face object, this function changes the
* value of `face->size` to the input size handle.
*/
FT_EXPORT( FT_Error )
FT_Activate_Size( FT_Size size );
/* */
FT_END_HEADER
#endif /* FTSIZES_H_ */
/* END */
```
|
Hrehory Chodkiewicz (, ; – 9 November 1572) was a Ruthenian noble and military officer of the Grand Duchy of Lithuania. He was a son of Aleksander, brother of Hieronim and Yurii, and uncle of Jan Hieronimowicz Chodkiewicz. He commanded the Grand Ducal Lithuanian Army during the latter part of the Livonian War after he had become the Grand Hetman of Lithuania in 1566.
Early career
Chodkiewicz was long held to have been born around 1505. However, Lithuania historian Genutė Kirkienė noted that in such a case Chodkiewicz began his political career in his mid-forties, when most nobles started in late twenties or early thirties. Kirkienė suggested that his father's marriage and birth of children should be moved from 1500s to mid-1510s. As a young boy Chodkiewicz was sent to the court of Albert, Duke of Prussia. He returned in 1532 with personal recommendation letters from Albert to King Sigismund I the Old, Prince Sigismund II Augustus and Queen Bona Sforza. The relationship and correspondence with Albert continued for decades; Chodkiewicz sent both of his sons to be educated at Albert's court.
He received his first position at the court in October 1544 when incoming Grand Duke Sigismund Augustus made a series of new appointments and elevated Chodkiewicz to court chamberlain (podkomorzy). Soon, however, the Chodkiewicz family fell from royal grace when they opposed the marriage between Sigismund Augustus and Barbara Radziwiłł. It seems that Hrehory Chodkiewicz remained close with Sigismund Augustus and often accompanied the Grand Duke to hunting. After his father's death in 1549, he inherited Supraśl and surrounding territories, including Zabłudów and Choroszcz. Chodkiewicz family slowly regained royal favor after Barbara's death in 1551 and when other Radziwiłłs opposed the proposed Union of Lublin in 1562.
Military achievements
As voivode of Kiev, Chodkiewicz defended the region from Tatar invasion. In 1558, he achieved a victory in Podolia against the Crimean Khanate. This victory raised prestige of Chodkiewicz as a military commander. On the onset of the Livonian War, he was promoted to castellan of Trakai with intention to use his skill in the war. In 1561, Grand Hetman Mikołaj "the Black" Radziwiłł, Chodkiewicz, and his brother Hieronim led the Lithuanian army into Livonia where they achieved victory against the Tsardom of Russia. After this campaign, Chodkiewicz was promoted to Field Hetman of Lithuania. On 20 January 1564 the Lithuanians under his command killed Russian commander Shuisky and defeated the Russian army in the Battle of Ula, which significantly improved Lithuania's standing in the war. He was hailed as war hero and promoted to castellan of Vilnius. Royal favor continued: Hrehory's nephew Jan Hieronimowicz received his late father's position as Elder of Samogitia in 1564, brother Yurii, who traveled to Moscow for diplomatic negotiations, became castellan of Trakai and Hrehory was appointed Grand Hetman of Lithuania in 1566. Thus, Hrehory Chodkiewicz became the second man after Mikołaj "the Red" Radziwiłł and the Chodkiewiczs controlled three out of five top seats in the Lithuanian Council of Lords. In 1567, Chodkiewicz achieved another victory in Livonia, this time against the Kingdom of Sweden.
Cultural activities
Chodkiewicz devoted much attention to military matters. In 1562 and 1566, he wrote military regulations, which dealt with defense of fortresses and other matters. He also built and strengthened a number of border posts and conducted the military census of 1568 to determine how many troops each noble had to provide for the army. In 1563 Chodkiewicz founded an Eastern Orthodox church and a hospital for the poor in Zabłudów. Kirkienė found hints that Chodkiewicz was not strictly Orthodox and supported church union—eastern liturgy under the Pope in Rome. In 1566, Chodkiewicz sponsored Pyotr Mstislavets and Ivan Fyodorov, book printers who defected from Russia, and opened a printing press in Zabłudów. They published religious texts until Chodkiewicz's death.
Titles and positions
Chodkiewicz held the following positions:
Court chamberlain (podkomorzy, 1544–1559)
Starost of Kaunas (1546–1551), Rumšiškės (1551–1555), Karmėlava (1551–1563), Hrodna (1563–1569), Mogilev (1564–1569)
Voivode of Vitebsk (1554) and Voivode of Kiev (1555–1558)
Castellan of Trakai (1559–1564) and Vilnius (1564–1572)
Elder of Samogitia (1562–1563)
Field Hetman of Lithuania (1561–1566) and Grand Hetman of Lithuania (1566–1572)
Family
Around 1537, Chodkiewicz married Katarzyna from the Wiśniowiecki family who brought many new lands into the Chodkiewicz family. Chodkiewicz sued Konstanty Ostrogski and his son Ilia for various territories belonging to his wife. They had two sons and three daughters. The sons had no heirs and the Supraśl line of the family became extinct. The possessions passed to Yurii Chodkiewicz, brother of Hrehory. All daughters married members of the Lithuanian Council of Lords. The children were:
Andrzej (born 1549) was starost of Mogilev (1574–1575). His father wanted him to marry a daughter of Mikołaj "the Red" Radziwiłł, but he died in 1575.
Aleksander (born 1550) married Aleksandra, daughter of Wasyl Tyszkiewicz. Died in 1578 with no heirs.
Anna married Pawel Sapieha, castellan of Kiev, and Pawel Pac, castellan of Vilnius
Zofia married Duke Janusz Zasławski (died 1562) and Filon Kmita Czernobylski, voivode of Smolensk
Aleksandra married famous military leader , voivode of Bratslav and Lithuanian Field Hetman, in 1559
References
Notes
Bibliography
External links
Closest family of Grzegorz Chodkiewicz
1510s births
1572 deaths
Year of birth uncertain
Military personnel from Vilnius
People from Vilnius Voivodeship
Grzegor Chodkiewicz
Field Hetmans of the Grand Duchy of Lithuania
Great Hetmans of the Grand Duchy of Lithuania
Voivodes of Kiev
|
```c
/*
** $Id: ltm.c,v 2.38 2016/12/22 13:08:50 roberto Exp $
** Tag methods
*/
#define ltm_c
#define LUA_CORE
#include "lprefix.h"
#include <string.h>
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lobject.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"
#include "lvm.h"
static const char udatatypename[] = "userdata";
LUAI_DDEF const char *const luaT_typenames_[LUA_TOTALTAGS] = {
"no value",
"nil", "boolean", udatatypename, "number",
"string", "table", "function", udatatypename, "thread",
"proto" /* this last case is used for tests only */
};
void luaT_init (lua_State *L) {
static const char *const luaT_eventname[] = { /* ORDER TM */
"__index", "__newindex",
"__gc", "__mode", "__len", "__eq",
"__add", "__sub", "__mul", "__mod", "__pow",
"__div", "__idiv",
"__band", "__bor", "__bxor", "__shl", "__shr",
"__unm", "__bnot", "__lt", "__le",
"__concat", "__call"
};
int i;
for (i=0; i<TM_N; i++) {
G(L)->tmname[i] = luaS_new(L, luaT_eventname[i]);
luaC_fix(L, obj2gco(G(L)->tmname[i])); /* never collect these names */
}
}
/*
** function to be used with macro "fasttm": optimized for absence of
** tag methods
*/
const TValue *luaT_gettm (Table *events, TMS event, TString *ename) {
const TValue *tm = luaH_getshortstr(events, ename);
lua_assert(event <= TM_EQ);
if (ttisnil(tm)) { /* no tag method? */
events->flags |= cast_byte(1u<<event); /* cache this fact */
return NULL;
}
else return tm;
}
const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
Table *mt;
switch (ttnov(o)) {
case LUA_TTABLE:
mt = hvalue(o)->metatable;
break;
case LUA_TUSERDATA:
mt = uvalue(o)->metatable;
break;
default:
mt = G(L)->mt[ttnov(o)];
}
return (mt ? luaH_getshortstr(mt, G(L)->tmname[event]) : luaO_nilobject);
}
/*
** Return the name of the type of an object. For tables and userdata
** with metatable, use their '__name' metafield, if present.
*/
const char *luaT_objtypename (lua_State *L, const TValue *o) {
Table *mt;
if ((ttistable(o) && (mt = hvalue(o)->metatable) != NULL) ||
(ttisfulluserdata(o) && (mt = uvalue(o)->metatable) != NULL)) {
const TValue *name = luaH_getshortstr(mt, luaS_new(L, "__name"));
if (ttisstring(name)) /* is '__name' a string? */
return getstr(tsvalue(name)); /* use it as type name */
}
return ttypename(ttnov(o)); /* else use standard type name */
}
void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1,
const TValue *p2, TValue *p3, int hasres) {
ptrdiff_t result = savestack(L, p3);
StkId func = L->top;
setobj2s(L, func, f); /* push function (assume EXTRA_STACK) */
setobj2s(L, func + 1, p1); /* 1st argument */
setobj2s(L, func + 2, p2); /* 2nd argument */
L->top += 3;
if (!hasres) /* no result? 'p3' is third argument */
setobj2s(L, L->top++, p3); /* 3rd argument */
/* metamethod may yield only when called from Lua code */
if (isLua(L->ci))
luaD_call(L, func, hasres);
else
luaD_callnoyield(L, func, hasres);
if (hasres) { /* if has result, move it to its place */
p3 = restorestack(L, result);
setobjs2s(L, p3, --L->top);
}
}
int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2,
StkId res, TMS event) {
const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */
if (ttisnil(tm))
tm = luaT_gettmbyobj(L, p2, event); /* try second operand */
if (ttisnil(tm)) return 0;
luaT_callTM(L, tm, p1, p2, res, 1);
return 1;
}
void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
StkId res, TMS event) {
if (!luaT_callbinTM(L, p1, p2, res, event)) {
switch (event) {
case TM_CONCAT:
luaG_concaterror(L, p1, p2);
/* call never returns, but to avoid warnings: *//* FALLTHROUGH */
case TM_BAND: case TM_BOR: case TM_BXOR:
case TM_SHL: case TM_SHR: case TM_BNOT: {
lua_Number dummy;
if (tonumber(p1, &dummy) && tonumber(p2, &dummy))
luaG_tointerror(L, p1, p2);
else
luaG_opinterror(L, p1, p2, "perform bitwise operation on");
}
/* calls never return, but to avoid warnings: *//* FALLTHROUGH */
default:
luaG_opinterror(L, p1, p2, "perform arithmetic on");
}
}
}
int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2,
TMS event) {
if (!luaT_callbinTM(L, p1, p2, L->top, event))
return -1; /* no metamethod */
else
return !l_isfalse(L->top);
}
```
|
```java
/*
* $Id: MetaBrush.java 3373 2008-05-12 16:21:24Z xlv $
*
*
*
*
* The Original Code is 'iText, a free JAVA-PDF library'.
*
* The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
* All Rights Reserved.
* Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
*
* Contributor(s): all the names of the contributors are added in the source code
* where applicable.
*
* Alternatively, the contents of this file may be used under the terms of the
* LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
* provisions of LGPL are applicable instead of those above. If you wish to
* allow use of your version of this file only under the terms of the LGPL
* the MPL, indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by the LGPL.
* If you do not delete the provisions above, a recipient may use your version
* of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the MPL as stated above or under the terms of the GNU
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* details.
*
* If you didn't download this code from the following link, you should check if
* you aren't using an obsolete version:
* path_to_url
*/
package com.lowagie.text.pdf.codec.wmf;
import java.awt.Color;
import java.io.IOException;
public class MetaBrush extends MetaObject {
public static final int BS_SOLID = 0;
public static final int BS_NULL = 1;
public static final int BS_HATCHED = 2;
public static final int BS_PATTERN = 3;
public static final int BS_DIBPATTERN = 5;
public static final int HS_HORIZONTAL = 0;
public static final int HS_VERTICAL = 1;
public static final int HS_FDIAGONAL = 2;
public static final int HS_BDIAGONAL = 3;
public static final int HS_CROSS = 4;
public static final int HS_DIAGCROSS = 5;
int style = BS_SOLID;
int hatch;
Color color = Color.white;
public MetaBrush() {
type = META_BRUSH;
}
public void init(InputMeta in) throws IOException {
style = in.readWord();
color = in.readColor();
hatch = in.readWord();
}
public int getStyle() {
return style;
}
public int getHatch() {
return hatch;
}
public Color getColor() {
return color;
}
}
```
|
George William Rudkin (22 June 1912 – 2003) was an English professional footballer who played in the Football League for Carlisle United and Mansfield Town.
References
1912 births
2003 deaths
English men's footballers
Men's association football inside forwards
English Football League players
Grantham Town F.C. players
Mansfield Town F.C. players
Carlisle United F.C. players
Boston United F.C. players
Chesterfield F.C. players
People from Spalding, Lincolnshire
Footballers from Lincolnshire
|
Cerise Castle is an American journalist. She received the IWMF Courage in Journalism Award and the American Mosaic Journalism Prize for her investigative series on deputy gangs in the Los Angeles County Sheriff's Department.
Career
Castle previously worked as an associate producer for Vice News Tonight. In 2020 she was hired as a producer at KCRW. While reporting a Los Angeles George Floyd protest in May 2020, Castle was shot with a rubber bullet by LAPD. During her rehabilitation, she spent six months investigating the history of deputy gangs in the Los Angeles County Sheriff's Department (LACSD).
Castle accepted a buyout to leave her position at KCRW in February 2021. In a statement posted to Twitter and an interview on LA Podcast, she stated she had experienced racist microaggressions during her time as an employee.
In March 2021, she published her LACSD gangs series, "A Tradition of Violence: The History of Deputy Gangs in the Los Angeles County Sheriff’s Department" in Knock LA. Her reporting stated that multiple gangs are active in the department and alleged that gang members have killed 19 men of color around Los Angeles. One month after the series was published, Castle was detained at an LACSD press conference while reporting the event. A year after publication, the city's civilian oversight board launched an investigation into the deputy gangs. In 2022 she received the American Journalism Online Award for Best Use of Public Records and the IWMF Courage in Journalism Award for the series.
Castle has freelanced for the Daily Beast, the Los Angeles Times, LA Magazine, and multiple podcasts. Her freelance reporting broke the story of the Citizen app's misidentification of an arson suspect. Her reporting has been cited by Newsweek, LA Weekly, and The Ringer. In late February, 2023, it was announced Castle had signed with CAA.
Personal life
Castle was raised in southern California. In 2014 she moved to Los Angeles after completing her bachelor's degree at Emerson College to become a freelance reporter.
She is a lesbian.
Accolades
2022
International Women's Media Foundation, Courage in Journalism Award
American Journalism Online Award for Best Use of Public Records
2023
American Mosaic Journalism Prize
References
External links
Official website
"A Tradition of Violence: The History of Deputy Gangs in the Los Angeles County Sheriff’s Department" at Knock LA
Year of birth missing (living people)
Living people
African-American women journalists
21st-century American journalists
Writers from California
21st-century American women writers
American lesbian writers
African-American LGBT people
|
```javascript
import React from 'react';
import { storiesOf } from '@storybook/react';
import Hero from './Hero';
const chapter = storiesOf('Webapp screens/Marketing/LandingScreen/Hero', module).add(
'default',
() => <Hero />
);
chapter.add('loading', () => <Hero loading />);
```
|
Commandant Rivière (F 733) was a Commandant Rivière-class frigate of French Navy.
Development and design
The main gun armament of the Commandant Rivière class consisted of three of the new French guns, with a single turret located forward and two turrets aft. These water-cooled automatic dual-purpose guns could fire a shell at an effective range of against surface targets and against aircraft at a rate of 60 rounds per minute. A quadruple 305 mm anti-submarine mortar was fitted in 'B' position, aft of the forward gun and in front of the ship's superstructure, capable of firing a depth charge to or in the shore bombardment role, a projectile to . Two triple torpedo tubes were fitted for anti-submarine torpedoes, while the ship's armament was completed by two 30 mm Hotchkiss HS-30 cannon. The ships had accommodation for an 80-man commando detachment with two fast landing boats, each capable of landing 25 men.
Construction and career
Commandant Rivière was laid down in April 1957 and launched on 11 October 1958 at Arsenal de Lorient in Lorient. The vessel was commissioned on 4 December 1962.
In 1984–1985, Commandant Rivière was converted to a sonar-trials ship. The ship's armament was replaced by a single 40 mm Bofors gun and two 12.7 mm machine guns, while the ship's stern was rebuilt to accommodate a hoist for a variable depth sonar, which was used to test various active and passive towed array sonars.
She served as a breakwater in Saint-Mandrier from 1993 to 2009 after decommissioning in 1992. She awaited dismantling in Toulon from 2009 to 2014 and dismantled in Ghent in 2015.
References
1958 ships
Commandant Rivière-class frigates
|
The World Boxing Federation (WBF), is an organization which sanctions professional boxing bouts. It was created in 1988.
Information
The World Boxing Federation was originally established in 1988 in Northeastern Tennessee by Larry Carrier, who was part owner of Bristol Motor Speedway. It was an expanded version of the American Pro Boxing Association.The original concept for the WBF was written on the back of a napkin as an alternative for boxing as Carrier felt there was a lack of vision in boxing. The WBF wanted to give overlooked fighters a chance and wanted to be a more affordable sanctioning body for aspiring promoters by only charging a $5,000 sanctioning fee. The WBF also sought to promote itself in an honest manner and help the sport. The promotion signed their first title fight in November 1990, when they organized a cruiserweight bout between Rickey Patkey and Joe Louis for December 7, 1990. The WBF's titles were not initially recognized by the British Boxing Board of Control and had to wait until 1995 to achieve recognition. The company had 17 field offices outside of the US by 1995 and the company moved its headquarters to Las Vegas prior to 1998. Larry Carrier sold the WBF to Ron Scalf in June 1998. The organization closed in 2004 after losing a lawsuit and was revived in 2009. In 2022, the promotion announced that they would no longer sanction title fights with boxers with negative records in an effort to raise standards.
The organization has sanctioned matches on 6 of the 7 continents. The organization has three levels of champions including World champions, Intercontinental champions and International champions. The organization also sanctions women's boxing matches. The promotion also monitors its judges closely and feels integrity is its greatest asset.
The promotion also had their own magazine called, "Inside Boxing with the WBF".
Current WBF World Champions
As of (men):
Notable Past WBF champions
Evander Holyfield, former Heavyweight champion
Francois Botha, former Heavyweight champion
Jimmy Thunder, former Heavyweight champion
Johnny Nelson, former Heavyweight champion
Adílson Rodrigues, former Heavyweight champion
Bert Cooper, former Heavyweight champion
Mike Bernardo, former Heavyweight champion
Roy Jones Jr., former Light Heavyweight champion
Robin Reid, former Super Middleweight champion
Carl Daniels, former Middlweight champion
Juan Lazcano, former Lightweight champion
Rickey Parkey, former Cruiserweight champion
See also
List of boxing organisations
References
External links
Professional boxing governing bodies
International sports organizations
Sports organizations established in 1988
|
```smalltalk
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// ==========================================================================
using GraphQL.Resolvers;
using GraphQL.Types;
using Squidex.Domain.Apps.Core;
using Squidex.Domain.Apps.Entities.Assets;
using Squidex.Infrastructure;
namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Assets;
internal sealed class AssetsResultGraphType : SharedObjectGraphType<IResultList<EnrichedAsset>>
{
public AssetsResultGraphType(IGraphType assetsList)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = "AssetResultDto";
AddField(new FieldType
{
Name = "total",
ResolvedType = Scalars.NonNullInt,
Resolver = ResolveList(x => x.Total),
Description = FieldDescriptions.AssetsTotal
});
AddField(new FieldType
{
Name = "items",
ResolvedType = new NonNullGraphType(assetsList),
Resolver = ResolveList(x => x),
Description = FieldDescriptions.AssetsItems
});
Description = "List of assets and total count of assets.";
}
private static IFieldResolver ResolveList<T>(Func<IResultList<EnrichedAsset>, T> resolver)
{
return Resolvers.Sync(resolver);
}
}
```
|
```objective-c
/* ripemd.h
*
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* (at your option) any later version.
*
* wolfSSL 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 Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/*!
\file wolfssl/wolfcrypt/ripemd.h
*/
#ifndef WOLF_CRYPT_RIPEMD_H
#define WOLF_CRYPT_RIPEMD_H
#include <wolfssl/wolfcrypt/types.h>
#ifdef WOLFSSL_RIPEMD
#ifdef __cplusplus
extern "C" {
#endif
/* in bytes */
enum {
RIPEMD = 3, /* hash type unique */
RIPEMD_BLOCK_SIZE = 64,
RIPEMD_DIGEST_SIZE = 20,
RIPEMD_PAD_SIZE = 56
};
/* RipeMd 160 digest */
typedef struct RipeMd {
word32 buffLen; /* in bytes */
word32 loLen; /* length in bytes */
word32 hiLen; /* length in bytes */
word32 digest[RIPEMD_DIGEST_SIZE / sizeof(word32)];
word32 buffer[RIPEMD_BLOCK_SIZE / sizeof(word32)];
} RipeMd;
WOLFSSL_API int wc_InitRipeMd(RipeMd*);
WOLFSSL_API int wc_RipeMdUpdate(RipeMd*, const byte*, word32);
WOLFSSL_API int wc_RipeMdFinal(RipeMd*, byte*);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* WOLFSSL_RIPEMD */
#endif /* WOLF_CRYPT_RIPEMD_H */
```
|
```javascript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bs={})}(this,(function(e){"use strict";var t="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},n={firstDayOfWeek:1,weekdays:{shorthand:["Ned","Pon","Uto","Sri","et","Pet","Sub"],longhand:["Nedjelja","Ponedjeljak","Utorak","Srijeda","etvrtak","Petak","Subota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],longhand:["Januar","Februar","Mart","April","Maj","Juni","Juli","Avgust","Septembar","Oktobar","Novembar","Decembar"]},time_24hr:!0};t.l10ns.bs=n;var a=t.l10ns;e.Bosnian=n,e.default=a,Object.defineProperty(e,"__esModule",{value:!0})}));
```
|
```javascript
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
(function() {
const p = Promise.resolve(1);
function foo(p) { return p.finally(); }
foo(p);
foo(p);
%OptimizeFunctionOnNextCall(foo);
foo(p);
})();
(function() {
const p = Promise.resolve(1);
function foo(p) { return p.finally(x => x); }
foo(p);
foo(p);
%OptimizeFunctionOnNextCall(foo);
foo(p);
})();
(function() {
const p = Promise.resolve(1);
function foo(p, f) { return p.finally(f); }
foo(p, x => x);
foo(p, x => x);
%OptimizeFunctionOnNextCall(foo);
foo(p, x => x);
})();
(function() {
const p = Promise.resolve(1);
function foo(p, f) { return p.finally(f).finally(f); }
foo(p, x => x);
foo(p, x => x);
%OptimizeFunctionOnNextCall(foo);
foo(p, x => x);
})();
```
|
Panopea glycimeris is a species of large marine bivalve mollusc in the family Hiatellidae.
The fossil record of this species dates back to the Miocene of Italy (age range: 23.03 to 7.246 million years ago).
Description
Shells of Panopea glycimeris can reach a size of . The two valves are similars and have a rusty appearance. The diameter of the siphonal apertures ranges between 5 and 7 cm.
Distribution
This species can be found in the Mediterranean Sea and in the Northwestern coast of Africa, on sand bottom at depths of 10 to 100 m. It is actually rare in the Mediterranean Sea.
References
Gofas, S.; Le Renard, J.; Bouchet, P. (2001). Mollusca. in: Costello, M.J. et al. (Ed.) (2001). European register of marine species: a check-list of the marine species in Europe and a bibliography of guides to their identification. Collection Patrimoines Naturels. 50: pp. 180–213.
Repetto G., Orlando F. & Arduino G. (2005): Conchiglie del Mediterraneo, Amici del Museo "Federico Eusebio", Alba, Italy
Hiatellidae
Bivalves described in 1778
|
The Henry Melchior Muhlenberg House, also known as the John J. Schrack House, is an historic home which is located in Trappe, Montgomery County, Pennsylvania.
A Pennsylvania historical marker which documents this structure's significance was dedicated on April 28, 1960. The house was subsequently added to the National Register of Historic Places in 2000.
History and architectural features
Built circa 1755, this historic house is a -story, five-bay, stone dwelling with a gable roof. It measures approximately thirty-nine feet by thirty-one feet. Between 1994 and 1998, the house was restored to its 1776-1787 appearance, which was the period of residency by Rev. Henry Melchior Muhlenberg (1711-1787), patriarch of the Lutheran Church in the United States, and father of Peter Muhlenberg (1746-1807) and Frederick Muhlenberg (1750-1801).
Also located on the property are the remains of a pottery kiln which dates to roughly 1720. It is the oldest intact pottery kiln known in the Commonwealth of Pennsylvania.
The house is owned by the Trappe Historical Society and open as a historic house museum.
A Pennsylvania historical marker was dedicated on April 28, 1960. It was added to the National Register of Historic Places in 2000.
References
External links
The Henry Muhlenberg House, Trappe Historical Society
Historic house museums in Pennsylvania
Houses on the National Register of Historic Places in Pennsylvania
Houses completed in 1755
Houses in Montgomery County, Pennsylvania
National Register of Historic Places in Montgomery County, Pennsylvania
Historic House Museums of the Pennsylvania Germans
|
```smalltalk
/****************************************************************************
*
* path_to_url
* path_to_url
* path_to_url
****************************************************************************/
#if UNITY_EDITOR
using System.Linq;
using MoonSharp.Interpreter;
using MoonSharp.Interpreter.Loaders;
using UnityEditor;
using UnityEngine;
namespace QFramework
{
public class UnityEditorScriptLoader : ScriptLoaderBase
{
public UnityEditorScriptLoader()
{
IgnoreLuaPathGlobal = true;
}
public override string ResolveModuleName(string modname, Table globalContext)
{
return modname;
}
public override bool ScriptFileExists(string name)
{
Debug.Log(name);
if (name.EndsWith(".lua"))
{
return AssetDatabase.FindAssets($@"{name.RemoveString(".lua")} t:TextAsset")
.Select(AssetDatabase.GUIDToAssetPath).Any(p => p.EndsWith(name));
}
return AssetDatabase.FindAssets($@"{name} t:TextAsset")
.Select(AssetDatabase.GUIDToAssetPath).Any(p => p.EndsWith(name + ".lua"));
}
public override object LoadFile(string file, Table globalContext)
{
if (file.EndsWith(".lua"))
{
return AssetDatabase.FindAssets($@"{file.RemoveString(".lua")} t:TextAsset")
.Select(AssetDatabase.GUIDToAssetPath)
.Where(p => p.EndsWith(file))
.Select(AssetDatabase.LoadAssetAtPath<TextAsset>).First().text;
}
return AssetDatabase.FindAssets($@"{file} t:TextAsset")
.Select(AssetDatabase.GUIDToAssetPath)
.Where(p => p.EndsWith(file + ".lua"))
.Select(AssetDatabase.LoadAssetAtPath<TextAsset>)
.First().text;
}
}
}
#endif
```
|
Us Rah Par (Urdu: اس راہ پر) is Pakistani pop singer Junaid Jamshed Khan's second solo effort, after Junaid and the rest of the band members took a break from the Vital Signs. It was critically and commercially successful. Like many other Vital Signs albums, Us Rah Par continued Junaid's collaboration with Shoaib Mansoor. The title track Us Rah Par is a slow blues number which featured a video directed by Bilal Maqsood (of the band Strings). However it was the techno flavored Na Tu Ayegi which actually gave the album the much needed commercial push. Three songs in the album are composed by Biddu
Track listing
Notes
See also
Music of Pakistan
Junaid Jamshed
Vital Signs
Junaid Jamshed albums
1999 albums
|
AIR National was an Indian radio station. It was run by All India Radio. Programming is mainly in Hindi and English languages. These programmes emphasize entertainment, music and news. The channel is designed to represent India's cultural mosaic and ethos.
The programmes of National Channel are broadcast by a one megawatt transmitter from Nagpur,Kolkata, Delhi, Bangalore, and Aligarh.
References
All India Radio
|
ABP Sanjha is the Punjabi language news channel, launched in 2014, by Media Content and Communication Services (MCCS), a news broadcasting company, owned by the ABP Group.
See also
Lists of television channels in India
References
External links
24-hour television news channels in India
Punjabi-language television channels in India
Television channels and stations established in 2014
ABP Group
2014 establishments in Chandigarh
24-hour television news channels
|
```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of satpy.
#
# satpy is free software: you can redistribute it and/or modify it under the
# version.
#
# satpy is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
#
# satpy. If not, see <path_to_url
"""Demo data download helper functions for AHI HSD data."""
import os
from satpy import config
def download_typhoon_surigae_ahi(base_dir=None,
channels=(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16),
segments=(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)):
"""Download Himawari 8 data.
This scene shows the Typhoon Surigae.
"""
import s3fs
base_dir = base_dir or config.get("demo_data_dir", ".")
channel_resolution = {1: 10,
2: 10,
3: 5,
4: 10}
data_files = []
for channel in channels:
resolution = channel_resolution.get(channel, 20)
for segment in segments:
data_files.append(f"HS_H08_20210417_0500_B{channel:02d}_FLDK_R{resolution:02d}_S{segment:02d}10.DAT.bz2")
subdir = os.path.join(base_dir, "ahi_hsd", "20210417_0500_typhoon_surigae")
os.makedirs(subdir, exist_ok=True)
fs = s3fs.S3FileSystem(anon=True)
result = []
for filename in data_files:
destination_filename = os.path.join(subdir, filename)
result.append(destination_filename)
if os.path.exists(destination_filename):
continue
to_get = "noaa-himawari8/AHI-L1b-FLDK/2021/04/17/0500/" + filename
fs.get_file(to_get, destination_filename)
return result
```
|
```javascript
// flow-typed signature: 94435a161a1be5e19af4afd06cd5b220
// flow-typed version: <<STUB>>/@babel/core_v^7.0.0/flow_v0.83.0
/**
* This is an autogenerated libdef stub for:
*
* '@babel/core'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* path_to_url
*/
declare module '@babel/core' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module '@babel/core/lib/config/caching' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/config-chain' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/config-descriptors' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/files/configuration' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/files/index-browser' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/files/index' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/files/package' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/files/plugins' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/files/types' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/files/utils' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/full' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/helpers/config-api' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/helpers/environment' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/index' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/item' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/partial' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/pattern-to-regex' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/plugin' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/util' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/validation/option-assertions' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/validation/options' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/validation/plugins' {
declare module.exports: any;
}
declare module '@babel/core/lib/config/validation/removed' {
declare module.exports: any;
}
declare module '@babel/core/lib/index' {
declare module.exports: any;
}
declare module '@babel/core/lib/parse' {
declare module.exports: any;
}
declare module '@babel/core/lib/tools/build-external-helpers' {
declare module.exports: any;
}
declare module '@babel/core/lib/transform-ast' {
declare module.exports: any;
}
declare module '@babel/core/lib/transform-file-browser' {
declare module.exports: any;
}
declare module '@babel/core/lib/transform-file-sync-browser' {
declare module.exports: any;
}
declare module '@babel/core/lib/transform-file' {
declare module.exports: any;
}
declare module '@babel/core/lib/transform' {
declare module.exports: any;
}
declare module '@babel/core/lib/transformation/block-hoist-plugin' {
declare module.exports: any;
}
declare module '@babel/core/lib/transformation/file/file' {
declare module.exports: any;
}
declare module '@babel/core/lib/transformation/file/generate' {
declare module.exports: any;
}
declare module '@babel/core/lib/transformation/file/merge-map' {
declare module.exports: any;
}
declare module '@babel/core/lib/transformation/index' {
declare module.exports: any;
}
declare module '@babel/core/lib/transformation/normalize-file' {
declare module.exports: any;
}
declare module '@babel/core/lib/transformation/normalize-opts' {
declare module.exports: any;
}
declare module '@babel/core/lib/transformation/plugin-pass' {
declare module.exports: any;
}
declare module '@babel/core/lib/transformation/util/missing-plugin-helper' {
declare module.exports: any;
}
// Filename aliases
declare module '@babel/core/lib/config/caching.js' {
declare module.exports: $Exports<'@babel/core/lib/config/caching'>;
}
declare module '@babel/core/lib/config/config-chain.js' {
declare module.exports: $Exports<'@babel/core/lib/config/config-chain'>;
}
declare module '@babel/core/lib/config/config-descriptors.js' {
declare module.exports: $Exports<'@babel/core/lib/config/config-descriptors'>;
}
declare module '@babel/core/lib/config/files/configuration.js' {
declare module.exports: $Exports<'@babel/core/lib/config/files/configuration'>;
}
declare module '@babel/core/lib/config/files/index-browser.js' {
declare module.exports: $Exports<'@babel/core/lib/config/files/index-browser'>;
}
declare module '@babel/core/lib/config/files/index.js' {
declare module.exports: $Exports<'@babel/core/lib/config/files/index'>;
}
declare module '@babel/core/lib/config/files/package.js' {
declare module.exports: $Exports<'@babel/core/lib/config/files/package'>;
}
declare module '@babel/core/lib/config/files/plugins.js' {
declare module.exports: $Exports<'@babel/core/lib/config/files/plugins'>;
}
declare module '@babel/core/lib/config/files/types.js' {
declare module.exports: $Exports<'@babel/core/lib/config/files/types'>;
}
declare module '@babel/core/lib/config/files/utils.js' {
declare module.exports: $Exports<'@babel/core/lib/config/files/utils'>;
}
declare module '@babel/core/lib/config/full.js' {
declare module.exports: $Exports<'@babel/core/lib/config/full'>;
}
declare module '@babel/core/lib/config/helpers/config-api.js' {
declare module.exports: $Exports<'@babel/core/lib/config/helpers/config-api'>;
}
declare module '@babel/core/lib/config/helpers/environment.js' {
declare module.exports: $Exports<'@babel/core/lib/config/helpers/environment'>;
}
declare module '@babel/core/lib/config/index.js' {
declare module.exports: $Exports<'@babel/core/lib/config/index'>;
}
declare module '@babel/core/lib/config/item.js' {
declare module.exports: $Exports<'@babel/core/lib/config/item'>;
}
declare module '@babel/core/lib/config/partial.js' {
declare module.exports: $Exports<'@babel/core/lib/config/partial'>;
}
declare module '@babel/core/lib/config/pattern-to-regex.js' {
declare module.exports: $Exports<'@babel/core/lib/config/pattern-to-regex'>;
}
declare module '@babel/core/lib/config/plugin.js' {
declare module.exports: $Exports<'@babel/core/lib/config/plugin'>;
}
declare module '@babel/core/lib/config/util.js' {
declare module.exports: $Exports<'@babel/core/lib/config/util'>;
}
declare module '@babel/core/lib/config/validation/option-assertions.js' {
declare module.exports: $Exports<'@babel/core/lib/config/validation/option-assertions'>;
}
declare module '@babel/core/lib/config/validation/options.js' {
declare module.exports: $Exports<'@babel/core/lib/config/validation/options'>;
}
declare module '@babel/core/lib/config/validation/plugins.js' {
declare module.exports: $Exports<'@babel/core/lib/config/validation/plugins'>;
}
declare module '@babel/core/lib/config/validation/removed.js' {
declare module.exports: $Exports<'@babel/core/lib/config/validation/removed'>;
}
declare module '@babel/core/lib/index.js' {
declare module.exports: $Exports<'@babel/core/lib/index'>;
}
declare module '@babel/core/lib/parse.js' {
declare module.exports: $Exports<'@babel/core/lib/parse'>;
}
declare module '@babel/core/lib/tools/build-external-helpers.js' {
declare module.exports: $Exports<'@babel/core/lib/tools/build-external-helpers'>;
}
declare module '@babel/core/lib/transform-ast.js' {
declare module.exports: $Exports<'@babel/core/lib/transform-ast'>;
}
declare module '@babel/core/lib/transform-file-browser.js' {
declare module.exports: $Exports<'@babel/core/lib/transform-file-browser'>;
}
declare module '@babel/core/lib/transform-file-sync-browser.js' {
declare module.exports: $Exports<'@babel/core/lib/transform-file-sync-browser'>;
}
declare module '@babel/core/lib/transform-file.js' {
declare module.exports: $Exports<'@babel/core/lib/transform-file'>;
}
declare module '@babel/core/lib/transform.js' {
declare module.exports: $Exports<'@babel/core/lib/transform'>;
}
declare module '@babel/core/lib/transformation/block-hoist-plugin.js' {
declare module.exports: $Exports<'@babel/core/lib/transformation/block-hoist-plugin'>;
}
declare module '@babel/core/lib/transformation/file/file.js' {
declare module.exports: $Exports<'@babel/core/lib/transformation/file/file'>;
}
declare module '@babel/core/lib/transformation/file/generate.js' {
declare module.exports: $Exports<'@babel/core/lib/transformation/file/generate'>;
}
declare module '@babel/core/lib/transformation/file/merge-map.js' {
declare module.exports: $Exports<'@babel/core/lib/transformation/file/merge-map'>;
}
declare module '@babel/core/lib/transformation/index.js' {
declare module.exports: $Exports<'@babel/core/lib/transformation/index'>;
}
declare module '@babel/core/lib/transformation/normalize-file.js' {
declare module.exports: $Exports<'@babel/core/lib/transformation/normalize-file'>;
}
declare module '@babel/core/lib/transformation/normalize-opts.js' {
declare module.exports: $Exports<'@babel/core/lib/transformation/normalize-opts'>;
}
declare module '@babel/core/lib/transformation/plugin-pass.js' {
declare module.exports: $Exports<'@babel/core/lib/transformation/plugin-pass'>;
}
declare module '@babel/core/lib/transformation/util/missing-plugin-helper.js' {
declare module.exports: $Exports<'@babel/core/lib/transformation/util/missing-plugin-helper'>;
}
```
|
Hazm al-ʿUdayn District () is a district of the Ibb Governorate, Yemen. As of 2003, the district had a population of 79,483 inhabitants.
References
Districts of Ibb Governorate
Hazm al-'Udayn District
|
Fredrik Lindström (born 27 June 1963 in Eskilstuna, Södermanland County) is a Swedish comedian, film director and presenter.
He played drums for the heavy metal band CRYSTAL PRIDE in the early 1980s.
In the 2000s, Lindström became a household name in Sweden through his documentary series Värsta språket about the Swedish language at Sveriges Television. Lindström has written several books that served as a basis for the series as well as historic linguistics in the Swedish language. They have the same kind of approach, mixing informality with information derived from the author's linguistics background.
Lindström's first encounter with the Swedish audience was on the radio show Hassan, on which he made prank calls to random people pretending to be different imaginary people, often with some kind of subtle disturbance that made the conversation farcical. The show aired on P3 for several seasons in the 1990s.
Since 2010, he has taken Björn Hellberg's role as the referee, in one of the most popular Television-Quizzes in Sweden ever, På spåret, which largely is a contest in geography, but also includes history, linguistics, sports and various subjects.
A few years later, after various smaller appearances as a stand-up comedian, he directed two Swedish featured films in the comedy/drama genre; these featured well-known Swedish actors such as Mikael Persbrandt and Magnus Härenstam.
Discography
Films
Vuxna människor, 1999 (Adult Behaviour, lit. Adult People.)
Känd från TV, 2001 (Recognized from TV)
Documentaries
Harry Victor, 2001
Värsta språket (The worst language)
Svenska dialektmysterier (Swedish dialect mysteries)
Världens modernaste land (The world's most modern country)
Radio shows
Hassan, early to mid 1990s
På Minuten, (the Swedish version of the BBC radio game show Just a Minute)
TV shows
Tommy på Skitiga duken on ZTV (Tommy at Skitiga duken)
Ingesson
Pangbulle (Bang bun)
Pentagon
c/o Segemyhr
Detta har hänt (This has happened)
Music
Crystal Pride
CDs
www.matapa.nu, at Mosebacke in Stockholm during the spring of 1999 ( www.foodmonkey.nu)
Books
Världens dåligaste språk ("The World's Language"), 2000
Vad gör alla superokända människor hela dagarna? ("What Do All the Super-unknown People Do All day?"), 2001
Jordens smartaste ord ("The smartest words on earth"), 2002
Vem är Björn och vem är Benny? ("Which one is Björn [Ulvaeus] and which one is Benny [Andersson]?"), 2004
Jag är en sån som bara vill ligga med dig ("I'm the Kind Who Only Wants to Sleep With You"), 2005
Svitjods undergång och Sveriges födelse ("The Fall of Svitjod and the Birth of Sweden") with Henrik Lindström, 2006
Evolutionen och jag kommer inte överens ("Evolution and I don't get along"), 2010
När börjar det riktiga livet? ("When does the real life start?"), 2011
Prizes and awards
1999 – Kvällspostens Edvardspris (Edvard prize awarded by the evening edition of the daily newspaper Expressen)
2001 – Karamelodiktstipendiat[6] (scholarship awarded yearly from a fund managed by the Royal Swedish Music Academy)
2002 – Tage Danielsson-priset (Tage Danielsson prize, awarded in memory of Swedish poet, writer, film director, actor and comedian Tage Danielsson)
2002 – Mensapriset (Mensa award, awarded by Mensa Sweden, the Swedish chapter of the international Mensa organization)
2002 – Månadens stockholmare i maj (Stockholm personality of the month, awarded by The City of Stockholm)
2003 – Aftonbladets TV-pris för bästa manliga TV-personlighet (Best TV male personality prize, awarded by the daily newspaper Aftonbladet)
2003 – Uppsala universitets och Studentbokhandeln AB:s Disapris (Disa prize, awarded by Uppsala University and the Student Bookstore in recognition of notable contributions to popular writing)
2003 – Nationalencyklopedins Kunskapspriset (The Knowledge Prize, awarded by the National Encyclopedia of Sweden)
2006 – Årets bok om svensk historia för "Svitjods undergång och Sveriges födelse" (Historic Book of the Year, awarded by the online newspaper "Svesnk Historia", Swedish History)
2006 – Aftonbladets TV-pris för bästa manliga TV-personlighet (Best TV male personality prize, awarded by the daily newspaper Aftonbladet)
2009 – Natur & Kulturs Kulturpris (Culture Prize, awarded by the Natur & Kultur foundation)
References
External links
Crystal Pride
Fredrik Lindström i Svensk mediedatabas
Författarpresentation från Albert Bonniers Förlag
Living people
1963 births
Sommar (radio program) hosts
Swedish comedians
Swedish male writers
Linguists from Sweden
Uppsala University alumni
People from Eskilstuna
|
Marianne () has been the national personification of the French Republic since the French Revolution, as a personification of liberty, equality, fraternity and reason, as well as a portrayal of the Goddess of Liberty.
Marianne is displayed in many places in France and holds a place of honour in town halls and law courts. She is depicted in the Triumph of the Republic, a bronze sculpture overlooking the Place de la Nation in Paris, as well as represented with another Parisian statue on the Place de la République. Her profile stands out on the official government logo of the country, and appears on French euro coins and on French postage stamps. She was also featured on the former franc currency and is officially used on most government documents.
Marianne is a significant republican symbol; her French monarchist equivalent is often Joan of Arc. As a national icon Marianne represents opposition to monarchy and the championship of freedom and democracy against all forms of oppression. Other national symbols of Republican France include the tricolor flag, the national motto , the national anthem "La Marseillaise", the coat of arms, and the official Great Seal of France. Marianne also wore a Cockade and a red Phrygian cap symbolising Liberty.
History
Since classical times it was common to represent ideas and abstract entities by gods, goddesses, and allegorical personifications. During the French Revolution of 1789, many allegorical personifications of 'Liberty' and 'Reason' appeared. These two figures finally merged into one: a female figure, shown either sitting or standing and accompanied by various attributes, including the cockade of France and the Phrygian cap. This woman typically symbolised Liberty, Reason, the Nation, the Homeland and the civic virtues of the Republic. In September 1792, the National Convention decided by decree that the new seal of the state would represent a standing woman holding a spear with a Phrygian cap held aloft on top of it.
Historian Maurice Agulhon, who in several works set out on a detailed investigation to discover the origins of Marianne, suggests that it is the traditions and mentality of the French that led to the use of a woman to represent the Republic. A feminine allegory was also a manner to symbolise the breaking with the old monarchy headed by kings and promote modern republican ideology. Even before the French Revolution, the Kingdom of France was embodied in masculine figures, as depicted in certain ceilings of Palace of Versailles. Furthermore, France and the Republic themselves are, in French, feminine nouns (la France, la République), as are the French nouns for liberty (Liberté) and reason (Raison).
The use of this emblem was initially unofficial and very diverse. A female allegory of Liberty and of the Republic makes an appearance in Eugène Delacroix's painting Liberty Leading the People, painted in July 1830 in honour of the Three Glorious Days (or July Revolution of 1830).
The First Republic
Although the image of Marianne did not garner significant attention until 1792, the origins of this "goddess of Liberty" date back to 1775, when Jean-Michel Moreau painted her as a young woman dressed in Roman style clothing with a Phrygian cap atop a pike held in one hand that years later would become a national symbol across France. Marianne made her first major appearance in the French spotlight on a medal in July 1789, celebrating the storming of the Bastille and other early events of the Revolution. From this time until September 1792, the image of Marianne was overshadowed by other figures such as Mercury and Minerva. It was not until September 1792 when the new Republic sought a new image to represent the State that her popularity began to expand. Marianne, the female allegory of Liberty, was chosen to represent the new regime of the French Republic, while remaining to symbolise liberty at the same time.
The imagery of Marianne chosen as the seal of the First French Republic depicted her standing, young and determined. It was symbolic of the First Republic itself, a newly created state that had much to prove. Marianne is clad in a classical gown. In her right hand, she wields the pike of revolution with the Phrygian cap resting on it, which represents the liberation of France. Marianne is shown leaning on a fasces, a symbol of authority. Although she is standing and holding a pike, this depiction of Marianne is "not exactly aggressive", representing the ideology of the moderate-liberal Girondins in the National Convention as they tried to move away from the "frantic violence of the revolutionary days".
Although the initial figure of Marianne from 1792 stood in a relatively conservative pose, the revolutionaries were quick to abandon that figure when it no longer suited them. By 1793, the conservative figure of Marianne had been replaced by a more violent image; that of a woman, bare-breasted and fierce of visage, often leading men into battle. The reason behind this switch stems from the shifting priorities of the Republic. Although the Marianne symbol was initially neutral in tone, the shift to radical action was in response to the beginning of the Terror, which called for militant revolutionary action against foreigners and counter-revolutionaries. As part of the tactics the administration employed, the more radical Marianne was intended to rouse the French people to action. Even this change, however, was seen to be insufficiently radical by the republicans. After the arrest of the Girondin deputies in October 1793, the Convention sought to "recast the Republic in a more radical mold", eventually using the symbol of Hercules to represent the Republic. The use of increasingly radical images to symbolise the Republic was in direct parallel to the beginning of the violence that came to be known as the Reign of Terror.
After the Reign of Terror, there was a need for another change in the imagery, to showcase the more civil and non-violent nature of the Directory. In the Official Vignette of the Executive Directory, 1798, Marianne made a return, still depicted wearing the Phrygian cap, but now surrounded by different symbols. In contrast to the Marianne of 1792, this Marianne "holds no pike or lance", and leans "languorously" on the tablet of the Constitution of Year III. Instead of looking straight at the observer, she casts her gaze towards the side, thus appearing less confrontational. Similar imagery was used in the poster of the Republic's new calendar.
The symbol of Marianne continued to evolve in response to the needs of the State long after the Directory was dissolved in 1799 following the coup spearheaded by Emmanuel-Joseph Sieyès and Napoleon Bonaparte. Whereas Mercury and Minerva and other symbolic figures diminished in prominence over the course of French history, Marianne endured because of her abstraction and impersonality. The "malleability" of what she symbolised allowed French political figures to continually manipulate her image to their specific purposes at any given time.
The Second Republic
On 17 March 1848, the Ministry of the Interior of the newly founded Second Republic launched a contest to symbolise the Republic on paintings, sculptures, medals, money and seals, as no official representations of it existed. After the fall of the monarchy, the Provisional Government had declared: "The image of liberty should replace everywhere the images of corruption and shame, which have been broken in three days by the magnanimous French people." For the first time, the allegory of Marianne condensed into itself Liberty, the Republic and the Revolution.
Two "Mariannes" were authorised. One is fighting and victorious, recalling the Greek goddess Athena: she has a bare breast, the Phrygian cap and a red corsage, and has an arm lifted in a gesture of rebellion. The other is more conservative: she is rather quiet, wearing clothes in a style of Antiquity, with sun rays around her head—a transfer of the royal symbol to the Republic—and is accompanied by many symbols (wheat, a plough and the fasces of the Roman lictors). These two, rival Mariannes represent two ideas of the Republic, a bourgeois representation and a democratic and social representation – the June Days Uprising hadn't yet occurred.
Town halls voluntarily chose to have representations of Marianne, often turning her back to the church. Marianne made her first appearance on a French postage stamp in 1849.
The Second Empire
During the Second Empire (1852–1870), this depiction became clandestine and served as a symbol of protest against the regime. The common use of the name "Marianne" for the depiction of "Liberty" started around 1848/1851, becoming generalised throughout France around 1875.
The Third Republic
The usage began to be more official during the Third Republic (1870–1940). Much of the popularity of Marianne was due to the fact that she symbolized French republicanism while at the same time being neutral enough to make her into a symbol that appealed to most people. The legacy of the French Revolution tended to divide people in France as different people in France had different revolutionary heroes and villains, and unlike the United States, the French had no cult of "the Founding Fathers" whose memory was venerated by all. For this reason, the French state tended to promote abstract symbols like Marianne as an unifying national symbol instead of using personalities from history as a national symbol in the manner which the United States used George Washington and Venezuela used Simon Bolivar as national symbols in the 19th century. As a symbol of the Revolution and of the republic, Marianne was sufficiently inoffensive enough to appeal to most people without causing any controversy. Marianne's femininity made her appear less threatening as a symbol of the republic than a male figure would have been.
After a turbulent first decade in the 1870s, by the 1880s the republic was accepted by most people in France and as such, the French state did not need history to justify itself, using Marianne as the unifying symbol of the republic. The only historical event that was regularly honored in France was Bastille Day, as the storming of the Bastille in 1789 was the revolutionary occurrence that appealed to most of the French, and the rest of the events of the revolution were not officially honored in order to keep the memory of the revolution as harmonious as possible. It was the strategy of the republican leaders to use symbols and the memory of history in such a way to create as wide a national consensus as possible in favor of the republic, which was why Marianne became such a prominent symbol of the republic. By contrast, the newly unified German Reich had too many historical traditions to draw upon, reflecting the histories of the various German states, none of which could appeal to everybody, leading to a situation where the British historian Eric Hobsbawm noted: "Like many another liberated 'people', 'Germany' was more easily defined by what it was against than in any other way." Hobsbawm argued for this reason, that unlike Marianne who was a symbol of the republic and freedom in general, her German counterpart, Deutscher Michel "...seems to have been essentially an anti-foreign image".
The Hôtel de Ville in Paris (city hall) displayed a statue of "Marianne" wearing a Phrygian cap in 1880, and was quickly followed by the other French cities. In Paris, where the Radicals had a strong presence, a contest was launched for the statue of Place de la République. It was won by the Morice brothers (with Léopold Morice producing the sculpture and the architect François-Charles Morice designing the pedestal), in 1879, with an academical Marianne, with an arm lifted towards the sky and a Phrygian cap, but with her breasts covered. Aimé-Jules Dalou lost the contest against the Morice brothers, but the City of Paris decided to build his monument on the Place de la Nation, inaugurated for the centenary of the French Revolution, in 1889, with a plaster version covered in bronze. Dalou's Marianne had the lictor's fasces, the Phrygian cap, a bare breast, and was accompanied by a Blacksmith representing Work, and allegories of Freedom, Justice, Education and Peace: all that the Republic was supposed to bring to its citizens. The final bronze monument was inaugurated in 1899, in the turmoil of the Dreyfus Affair, with Waldeck-Rousseau, a Radical, in power. The ceremony was accompanied by a huge demonstration of workers, with red flags. The government's officials, wearing black redingotes, quit the ceremony. Marianne had been reappropriated by the workers, but as the representative of the Social and Democratic Republic (la République démocratique et sociale, or simply La Sociale).
From the signing of the Entente Cordiale between France and Britain in April 1904, Marianne and John Bull personalised the agreement in a number of paintings and cartoons, most famously the Punch cartoon by John Bernard Partridge. In the struggles between ideological parties around the turn of the twentieth century, Marianne was often denigrated by right-wing presses as a prostitute. In Imperial Germany, Marianne was usually portrayed in a manner that was very vulgar, usually suggesting that she was a prostitute or at any rate widely promiscuous while at the same time being a hysterically jealous and insane woman who however always cowered in fear at the sight of a German soldier. The German state in the Imperial period promoted a very xenophobic militarism, which portrayed the Reich as forever in danger from foreigners and in need of an authoritarian government. The core of Prussian-German militarism was a cult of machismo that equated militarism with masculinity, and Marianne was used in Germany to portray France as a "weak" and "feminine" nation in contrast to "strong" and "masculine" Germany. The purpose of Marianne in German propaganda was always to promote contempt for France and with it, a warning about what Germans should not be.
The American historian Michael Nolan wrote in the "hyper-masculine world of Wilhelmine Germany" with its exaltation of militarism and masculine power, the very fact that Marianne was the symbol of the republic was used to argue that French men were effeminate and weak. In this regard, it is significant in German cartoons and posters, Marianne usually faced off against a male figure representing Germany, who was either a typical German soldier or Kaiser Wilhelm II himself and Marianne only very rarely took on Germania. In French cartoons and posters, it was Marianne who took on Wilhelm II, whose bombastic pomposity lent itself well for ridicule, and she almost never took on Deutscher Michel, leading Nolan to comment that French cartoonists missed a great chance for satire since even in Germany itself, Deutscher Michel is portrayed as rather "dim-witted". On occasion, Marianne was portrayed slightly more favorably in Germany as in a cartoon from May 1914 in the magazine Kladderadatsch where Deutscher Michel is working in his garden with a seductive and voluptuous Marianne on one side and a brutish muzhik (Russian peasant) on the other; the message of the cartoon was that France should not be allied to Russia, and would be better off allied to Germany, since Deutscher Michel with his well tended garden is clearly a better potential husband than the vodka drinking muzhik whose garden is a disorderly disaster.
Marianne differed from Uncle Sam, John Bull, and Deutscher Michel in that Marianne was not just a symbol of France, but of the republic as well. For those on the French right, who still hankered for the House of Bourbon like Action Française, Marianne was always rejected for her republican associations, and the preferred symbol of France was Joan of Arc. As Joan of Arc was devoutly Catholic, committed to serving King Charles VII, and fought for France against England, she perfectly symbolized the values of Catholicism, royalism, militarism and nationalism that were so dear for French monarchists. Joan was apparently asexual, and her chaste and virginal image stood in marked contrast to Marianne, whom Action Française depicted as a prostitute or as a "slut" to symbolize the "degeneracy" of the republic. The contrast between the asexual Joan vs. the unabashedly sexualized Marianne who was often depicted bare-breasted could not have been greater. Finally, because of Joan's status as one of France' best loved heroines, it was difficult for republicans to attack Joan without seeming unpatriotic. However, the royalist attempt to have Joan of Arc replace Marianne as the symbol of France failed, in large part because most of the French people accepted the republic, and Marianne unlike Joan was the symbol of the republic. In the middle of the 19th century, Marianne was usually portrayed in France as a young woman, but by late 19th century, Marianne was more commonly presented as a middle aged, maternal woman, reflecting the fact that the republic was dominated by a centre-right coalition of older male politicians, who disliked the image of a militant young female revolutionary. After British and German newspapers began to mock the middle-aged Marianne as a symbol of supposed French decline, around 1900 the younger Marianne came back into vogue to symbolize that the republic was not in decline.
In World War I, in German propaganda, Marianne was always depicted as dominating Russia, represented variously as a bear, a thuggish-looking Cossack or by the Emperor Nicholas II, with Marianne being drawn as an angry and emasculating wife. By contrast, John Bull was always depicted in German cartoons as dominating both Marianne and Russia, reflecting the German perception that Britain was the most dangerous of all of Germany's enemies. When John Bull was depicted in the company of Marianne in German cartoons, she was always the submissive one.
Few Mariannes were depicted in the First World War memorials, but some living models of Marianne appeared in 1936, during the government of the Popular Front as they had during the Second Republic (then stigmatized by the right-wing press as "unashamed prostitutes"). During World War II, Marianne represented Liberty against the Nazi invaders, and the Republic against the Vichy regime (see Paul Collin's representation). During Vichy, 120 of the 427 monuments of Marianne were melted, while the Milice took out its statues in town halls in 1943. Under Vichy, Marianne was banned and Joan of Arc became the official symbol of France. In French schools and government offices, the busts of Marianne were replaced with busts of Marshal Pétain. As Marianne was the symbol of the republic and everything it stood for, under Vichy Marianne was demonized as the most "offensive" symbol of the republic. There was a strong misogyny to Vichy's attacks on Marianne under Vichy's ideology there were two sorts of women; the "virgin and the whore" with Joan being cast as the former and Marianne as the latter.
Fifth Republic
Marianne's presence became less important in French imagery after World War II, although under the presidency of Charles de Gaulle she was often used, in particular on stamps or for referendums. The most recent subversive and revolutionary appearance of Marianne was during the May 68 protests. The liberal and conservative president Valéry Giscard d'Estaing replaced Marianne by La Poste on stamps, changed the rhythm of the Marseillaise and suppressed the commemoration of 8 May 1945.
During the bicentenary of the Revolution, in 1989, Marianne hardly made any public appearance. The Socialist President François Mitterrand aimed to make the celebrations a consensual event, gathering all citizens, recalling more the Republic than the Revolution. The American opera singer Jessye Norman took Marianne's place, singing La Marseillaise as part of an elaborate pageant orchestrated by avant-garde designer Jean-Paul Goude. The Republic, after harsh internal fighting throughout the 19th century and even the 20th century (6 February 1934 crisis, Vichy, etc.), had become consensual; the vast majority of French citizens were now republicans, leading to a lesser importance of a cult of Marianne.
Origin of the name
At the time of the French Revolution, as the most common of people were fighting for their rights, it seemed fitting to name the Republic after the most common of French women's names: Marie (Mary) and Anne. The account made of their exploits by the Revolutionaries often contained a reference to a certain Marianne (or Marie-Anne) wearing a Phrygian cap. This pretty girl of legend inspired the revolutionaries, and looked after those wounded in the many battles across the country.
A recent discovery establishes that the first written mention of the name of Marianne to designate the Republic appeared in October 1792 in Puylaurens in the Tarn département near Toulouse. At that time people used to sing a song in the Provençal dialect of Occitan by the poet Guillaume Lavabre: "La garisou de Marianno" (French: "La guérison de Marianne"; "Marianne's recovery (from illness)"). At the time Marie-Anne was a very popular first name; according to Agulhon, it "was chosen to designate a régime that also saw itself as popular."
Some believe that the name came from the name of the Spanish Jesuit Juan de Mariana, the 16th century Monarchomach, a theoretician of tyrannicide. Others think it was the image of the wife of the politician Jean Reubell: according to an old 1797 story, Barras, one of the members of the Directoire, during an evening spent at Reubell's, asked his hostess for her name—"Marie-Anne," she replied—"Perfect," Barras exclaimed, "It is a short and simple name, which befits the Republic just as much as it does yourself, Madame."
The description by artist Honoré Daumier in 1848, as a mother nursing two children, Romulus and Remus, or by sculptor François Rude, during the July Monarchy, as a warrior voicing the Marseillaise on the Arc de Triomphe, are uncertain.
The name of Marianne also appears to be connected with several republican secret societies. During the Second Empire, one of them, whose members had sworn to overthrow the monarchy, had taken her name.
In any case, she has become a symbol in France: considered as a personification of the Republic, she was often used on republican iconography – and sometimes caricatured and reviled by those against the republic, especially royalists and monarchists.
Models
The official busts of Marianne initially had anonymous features, appearing as women of the people. From 1969, however, they began to take on the features of famous women, starting with the actress Brigitte Bardot. She was followed by Mireille Mathieu (1978), Catherine Deneuve (1985), Inès de La Fressange (1989), Laetitia Casta (2000) and Évelyne Thomas (2003).
Laetitia Casta was named the symbolic representation of France's Republic in October 1999 in a vote open for the first time to the country's more than 36,000 mayors. She won from a shortlist of five candidates, scoring 36% among the 15,000 that voted. The other candidates were Estelle Hallyday, Patricia Kaas, Daniela Lumbroso, Lætitia Milot and Nathalie Simon.
In July 2013, a new stamp featuring the Marianne was debuted by President François Hollande, allegedly designed by the team of Olivier Ciappa and David Kawena. Ciappa claimed that Inna Shevchenko, a high-profile member of the Ukrainian protest group FEMEN who had recently been granted political asylum in France, was a main inspiration for the new Marianne. However, Kawena and his attorney later claimed that Ciappa was falsely representing himself as having had any level of creative input on the artwork. Kawena further stated that Shevchenko, or any other figure that Ciappa claimed to be an inspiration, was in no way the model for the work, and has sued Ciappa for violation of copyright on the Marianne artwork. Ciappa later refuted the claims that Kawena was ignored, and also revealed his legal name ("David Kawena" being a pseudonym taken from the Lilo & Stitch films) in a retaliatory press release; Xavier Héraud, a writer for Yagg (a French LGBT news site), noted that in a 2013 Huffington Post piece by Ciappa he never refers to Kawena and claims authorship of the images within the post. Yagg later reported on a response to their posting from Ciappa where he said that he was not in editorial control of the Huffington Post piece and did not intend to have the phrasing be "My Marianne" as accused by Kawena in his suit; Yagg later contacted Huffington Post who informed them that they sent a draft for Ciappa to look at prior to publishing, which is the current version of the article.
Government logo
Blue-white-red, Marianne, Liberté-Égalité-Fraternité, the Republic: these national symbols represent France, as a state and its values. Since September 1999, they have been combined in a new "identifier" created by the Plural Left government of Lionel Jospin under the aegis of the French Government Information Service (SIG) and the public relations officials in the principal ministries. As a federating identifier of the government departments, it appears on a wide range of material—brochures, internal and external publications, publicity campaigns, letter headings, business cards, etc.—emanating from the government, starting with the various ministries (which are able to continue using their own logo in combination with this) and the préfectures and départements.
Debate about Islamic dress
Marianne has featured prominently in the Islamic scarf controversy in France as a symbol of a certain idea of Frenchness and femininity. The American historian Joan Wallach Scott wrote in 2016 that it is no accident that Marianne is often depicted as bare-breasted regardless of where she is or what she is doing, as this reflects the French ideal of a woman, which has been used as an argument for why Islamic dress for women is not French. Scott wrote the topless Marianne has become "...the embodiment of emancipated French women in contrast to the veiled woman said to be subordinated by Islam".
Later in 2016, the French Premier Manuel Valls stated in a speech that the burkini swimsuit was an "enslavement" of women and that Marianne was usually topless which The Economist noted: "The implication seemed to be that women in burkinis are un-French, while true French women go topless." In a speech on 29 August 2016, Valls said: "Marianne has a naked breast because she is feeding the people! She is not veiled, because she is free! That is the republic!". Angelique Chisafis of The Guardian newspaper reported: "The inference that bare breasts were a symbol of France while the Muslim headscarf was problematic sparked scorn from politicians and derision from historians and feminists". The French president François Hollande sparked much debate in France with his controversial statement "The veiled woman will be the Marianne of tomorrow".
Paris 2024 Olympic and Paralympic logo
Marianne is one of the elements of the official emblem of the 2024 Summer Olympics and the 2024 Summer Paralympics in Paris, combined with the gold medal and the Olympic and Paralympic flame, which is the first time in history with the same emblem.
See also
Columbia, an equivalent symbol for the United States of America.
Government of France
National personification, contains the list of personifications for various nations and territories.
Statue of Liberty (Liberty Enlightening the World), a gift from the French people to the American people to commemorate the American Declaration of Independence.
Notes
References
Further reading
External links
Marianne - Official French website (in English)
Marianne (French embassy in the USA)
Marianne (French Prime Minister's office)
Marianne (personification)
Culture of France
Liberty symbols
Fictional goddesses
|
```smalltalk
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Uow;
namespace Volo.Abp.EntityFrameworkCore.DistributedEvents;
public class DbContextEventOutbox<TDbContext> : IDbContextEventOutbox<TDbContext>
where TDbContext : IHasEventOutbox
{
protected IDbContextProvider<TDbContext> DbContextProvider { get; }
public DbContextEventOutbox(
IDbContextProvider<TDbContext> dbContextProvider)
{
DbContextProvider = dbContextProvider;
}
[UnitOfWork]
public virtual async Task EnqueueAsync(OutgoingEventInfo outgoingEvent)
{
var dbContext = (IHasEventOutbox)await DbContextProvider.GetDbContextAsync();
dbContext.OutgoingEvents.Add(new OutgoingEventRecord(outgoingEvent));
}
[UnitOfWork]
public virtual async Task<List<OutgoingEventInfo>> GetWaitingEventsAsync(int maxCount, CancellationToken cancellationToken = default)
{
var dbContext = (IHasEventOutbox)await DbContextProvider.GetDbContextAsync();
var outgoingEventRecords = await dbContext
.OutgoingEvents
.AsNoTracking()
.OrderBy(x => x.CreationTime)
.Take(maxCount)
.ToListAsync(cancellationToken: cancellationToken);
return outgoingEventRecords
.Select(x => x.ToOutgoingEventInfo())
.ToList();
}
[UnitOfWork]
public virtual async Task DeleteAsync(Guid id)
{
var dbContext = (IHasEventOutbox)await DbContextProvider.GetDbContextAsync();
await dbContext.OutgoingEvents.Where(x => x.Id == id).ExecuteDeleteAsync();
}
[UnitOfWork]
public virtual async Task DeleteManyAsync(IEnumerable<Guid> ids)
{
var dbContext = (IHasEventOutbox)await DbContextProvider.GetDbContextAsync();
await dbContext.OutgoingEvents.Where(x => ids.Contains(x.Id)).ExecuteDeleteAsync();
}
}
```
|
```smalltalk
Extension { #name : 'BitBlt' }
{ #category : '*FreeType-Graphics' }
BitBlt >> combinationRule [
"Answer the receiver's combinationRule"
^ combinationRule
]
{ #category : '*FreeType-Graphics' }
BitBlt >> copyBitsColor: argbColorSmallInteger alpha: argbAlphaSmallInteger gammaTable: gammaByteArray ungammaTable: ungammaByteArray [
"This entry point to BitBlt supplies an extra argument to specify the fore color
argb value for operation 41. This is split into an alpha value and an rgb value,
so that both can be passed as smallIntegers to the primitive.
rgbColorInteger must be a smallInteger between 0 and 16rFFFFFF.
alpha must be a smallInteger between 0 and 16rFF."
<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>
"Check for compressed source, destination or halftone forms"
((sourceForm isForm) and: [sourceForm unhibernate])
ifTrue: [^ self copyBitsColor: argbColorSmallInteger alpha: argbAlphaSmallInteger gammaTable: gammaByteArray ungammaTable: ungammaByteArray].
((destForm isForm) and: [destForm unhibernate ])
ifTrue: [^ self copyBitsColor: argbColorSmallInteger alpha: argbAlphaSmallInteger gammaTable: gammaByteArray ungammaTable: ungammaByteArray].
((halftoneForm isForm) and: [halftoneForm unhibernate])
ifTrue: [^ self copyBitsColor: argbColorSmallInteger alpha: argbAlphaSmallInteger gammaTable: gammaByteArray ungammaTable: ungammaByteArray].
self primitiveFailed "Later do nicer error recovery -- share copyBits recovery"
]
{ #category : '*FreeType-Graphics' }
BitBlt >> installFreeTypeFont: aFreeTypeFont foregroundColor: foregroundColor backgroundColor: backgroundColor scale: scale [
"Set up the parameters. Since the glyphs in a TTCFont is 32bit depth form, it tries to use rule=34 to get better AA result if possible."
(FreeTypeSettings current useSubPixelAntiAliasing and: [destForm depth >= 8])
ifTrue:[
self combinationRule: 41.
destForm depth = 8
ifTrue:[self colorMap: (self cachedFontColormapFrom: 32 to: destForm depth)]
ifFalse:[self colorMap: nil]]
ifFalse:[
"use combination rule 34 when rule 41 is not available in the BitBlt plugin,
or the destination form depth <= 8"
destForm depth <= 8
ifTrue: [
self colorMap: (self cachedFontColormapFrom: 32 to: destForm depth).
self combinationRule: Form paint.]
ifFalse: [
self colorMap: nil.
self combinationRule: 34]].
halftoneForm := nil.
sourceX := sourceY := 0.
height := aFreeTypeFont height * scale
]
{ #category : '*FreeType-Graphics' }
BitBlt >> lastFontForegroundColor [
^ nil
]
```
|
```yaml
description: |-
Password must:
- Be between 8 ~ 15 characters long.
- Exceeding 15 will result in an account lockout instead of
erroring on submit. Otherwise, the max character
length should be 20.
- Contains at least 1 number character
- Contains at least 1 lowercase character
- Contains at least 1 uppercase character
- NOT contain any special character
- This rule is not listed on the official page; however,
attempting to use a special character will result in an exception.
images:
- nptu.png
name: Taiwan Pingtung University
url: path_to_url
```
|
```shell
Prevent updating a specific package in Debian systems
Get `apt` to use a mirror / faster mirror
Using `Tasksel` for software installation
Using `PPAs`
Keeping repos updated with `cron`
```
|
The Little Animals is a 2019 historical fantasy novel by Sarah Tolmie, about Antonie van Leeuwenhoek.
Synopsis
Antonie van Leeuwenhoek's scientific explorations are set on a new path by his encounters with a homeless, nameless goose-herding girl who is apparently able to hear — and communicate with — all kinds of animals, including the microscopic ones.
Reception
The Little Animals was a finalist for the 2020 Philip K. Dick Award, and received a special citation from the award's judges.
Publishers Weekly considered it "delightful" and "a delicate tale of science and miracles", lauding Tolmie's "careful characterization" and "rich historical detail, subtle humor, and energetic prose".
James Nicoll found it "entrancing" and "gentle", and noted that although the novel "at first appears to be a straight historical", the world it portrays is "not quite ours".
In Locus, Gary K. Wolfe described it as "at once (...) a charming mannerist fairy tale and a provocative account of the birth of our own modern worldview", praising Tolmie's depiction of Leeuwenhoek's scientific activities; as well, he drew parallels between the goose girl and the eponymous fairy tale, and stated that she was "a marvel of liminality and nuance, at times reticent and affectless, at times a vulnerable and lonely girl with an astonishing sensory connection to the natural world".
Strange Horizons called it "simply, subtly, terrific"(despite the sometimes "over-convenient deployment [of the Goose Girl] as a plot device"), and emphasized the book's nature as an "intertexual work, substantially shaped and driven by intimate dialogue with" the work of Ursula K. Le Guin, to whom the book is dedicated.
References
2019 Canadian novels
Antonie van Leeuwenhoek
Historical fantasy novels
|
```javascript
import lisp from "highlight.js/lib/languages/lisp";
export default lisp;
```
|
Davide De Luca, better known as Gemitaiz (born 4 November 1988), is an Italian rapper. Besides his solo work, he has collaborated with many artists, most notably the Italian rapper MadMan. He was born in Rome. From 2007 to 2011 he was a member of the "Xtreme Team", a collective of rappers from Rome. His debut solo album came out in May 2013, with the title "L'unico compromesso" ("The Only Compromise"). It ended up peaking at the #3 spot on the Italian charts.
Discography
Albums
EPs
Compilation albums
Collaborative mixtapes (with Xtreme Team)
2006: Affare romano vol. 1 (with Xtreme Team)
2007: Affare romano vol. 2 (with Xtreme Team)
2008: No(mix)tape (with Xtreme Team)
2009: Affare romano zero (with Xtreme Team)
2010: Xtreme Time (with Xtreme Team)
2011: Xtreme Quality (with Xtreme Team)
Singles
Featured in
Other songs
External links
References
Italian rappers
1988 births
Living people
Musicians from Rome
Universal Music Group artists
|
Andrew Whittaker may refer to:
Jack Whittaker (lottery winner) (Andrew Jackson Whittaker, Jr., born 1947), won a 2002 lottery jackpot
Andrew Whittaker (engineer) (born 1956), American structural engineer
|
Elbe was a cargo ship that was built in 1921 by Nobiskrug Werft, Rendsburg for German owners. She was seized by the Allies at Copenhagen, Denmark in May 1945, passed to the Ministry of War Transport (MoWT) and renamed Empire Confederation. In 1946, she was transferred to the Soviet Union and renamed José Dias (Хозе Диас). She served until she was scrapped in 1966.
Description
The ship was built in 1912 by Nobiskrug Werft GmbH, Rendsburg.
The ship was long, with a beam of a depth of . She had a GRT of 1,197 and a NRT of 641.
The ship was propelled by a triple expansion steam engine, which had cylinders of , and diameter by . The engine was built by Ottensener Maschinenfabrik GmbH, Altona.
History
Elbe was built for Bugsier Reederei & Bergungs AG, Hamburg. Her port of registry was Hamburg and the Code Letters RBVM were allocated. In 1934, her Code Letters were changed to DHGB.
In May 1945, Elbe was seized by the Allies at Copenhagen, Denmark. She was passed to the MoWT and renamed Empire Confederation. Her port of registry was changed to London The Code Letters GKRD and United Kingdom Official Number 180614 were allocated. She was operated under the management of Buchan & Hogg Ltd. Empire Confederation was assessed as , . In 1946, she was allocated to the Soviet Union and renamed José Dias. She was scrapped in 1966.
References
1921 ships
Ships built in Rendsburg
Steamships of Germany
Merchant ships of Germany
World War II merchant ships of Germany
Ministry of War Transport ships
Empire ships
Steamships of the United Kingdom
Steamships of the Soviet Union
Merchant ships of the Soviet Union
|
```shell
#!/bin/sh
# Distributed under terms of the GPLv3 license.
{ \unalias command; \unset -f command; } >/dev/null 2>&1
tdir=""
shell_integration_dir=""
echo_on="ECHO_ON"
cleanup_on_bootstrap_exit() {
[ "$echo_on" = "1" ] && command stty "echo" 2> /dev/null < /dev/tty
echo_on="0"
[ -n "$tdir" ] && command rm -rf "$tdir"
tdir=""
}
die() {
if [ -e /dev/stderr ]; then
printf "\033[31m%s\033[m\n\r" "$*" > /dev/stderr;
elif [ -e /dev/fd/2 ]; then
printf "\033[31m%s\033[m\n\r" "$*" > /dev/fd/2;
else
printf "\033[31m%s\033[m\n\r" "$*";
fi
cleanup_on_bootstrap_exit;
exit 1;
}
python_detected="0"
detect_python() {
if [ python_detected = "1" ]; then
[ -n "$python" ] && return 0
return 1
fi
python_detected="1"
python=$(command -v python3)
[ -z "$python" ] && python=$(command -v python2)
[ -z "$python" ] && python=$(command -v python)
if [ -z "$python" -o ! -x "$python" ]; then python=""; return 1; fi
return 0
}
perl_detected="0"
detect_perl() {
if [ perl_detected = "1" ]; then
[ -n "$perl" ] && return 0
return 1
fi
perl_detected="1"
perl=$(command -v perl)
if [ -z "$perl" -o ! -x "$perl" ]; then perl=""; return 1; fi
return 0
}
if command -v base64 > /dev/null 2> /dev/null; then
base64_encode() { command base64 | command tr -d \\n\\r; }
base64_decode() { command base64 -d; }
elif command -v openssl > /dev/null 2> /dev/null; then
base64_encode() { command openssl enc -A -base64; }
base64_decode() { command openssl enc -A -d -base64; }
elif command -v b64encode > /dev/null 2> /dev/null; then
base64_encode() { command b64encode - | command sed '1d;$d' | command tr -d \\n\\r; }
base64_decode() { command fold -w 76 | command b64decode -r; }
elif detect_python; then
pybase64() { command "$python" -c "import sys, base64; getattr(sys.stdout, 'buffer', sys.stdout).write(base64.standard_b64$1(getattr(sys.stdin, 'buffer', sys.stdin).read()))"; }
base64_encode() { pybase64 "encode"; }
base64_decode() { pybase64 "decode"; }
elif detect_perl; then
base64_encode() { command "$perl" -MMIME::Base64 -0777 -ne 'print encode_base64($_)'; }
base64_decode() { command "$perl" -MMIME::Base64 -ne 'print decode_base64($_)'; }
else
die "base64 executable not present on remote host, ssh kitten cannot function."
fi
dcs_to_kitty() { printf "\033P@kitty-$1|%s\033\134" "$(printf "%s" "$2" | base64_encode)" > /dev/tty; }
debug() { dcs_to_kitty "print" "debug: $1"; }
# If $HOME is configured set it here
EXPORT_HOME_CMD
# ensure $HOME is set
[ -z "$HOME" ] && HOME=~
# ensure $USER is set
[ -z "$USER" ] && USER="$LOGNAME"
[ -z "$USER" ] && USER="$(command whoami 2> /dev/null)"
leading_data=""
login_shell=""
login_cwd=""
request_data="REQUEST_DATA"
trap "cleanup_on_bootstrap_exit" EXIT
[ "$request_data" = "1" ] && {
command stty "-echo" < /dev/tty
dcs_to_kitty "ssh" "id="REQUEST_ID":pwfile="PASSWORD_FILENAME":pw="DATA_PASSWORD""
}
read_base64_from_tty() {
while IFS= read -r line; do
[ "$line" = "KITTY_DATA_END" ] && return 0
printf "%s" "$line"
done
}
untar_and_read_env() {
# extract the tar file atomically, in the sense that any file from the
# tarfile is only put into place after it has been fully written to disk
command -v tar > /dev/null 2> /dev/null || die "tar is not available on this server. The ssh kitten requires tar."
tdir=$(command mktemp -d "$HOME/.kitty-ssh-kitten-untar-XXXXXXXXXXXX")
[ $? = 0 ] || die "Creating temp directory failed"
# suppress STDERR for tar as tar prints various warnings if for instance, timestamps are in the future
old_umask=$(umask)
umask 000
read_base64_from_tty | base64_decode | command tar "xpzf" "-" "-C" "$tdir" 2> /dev/null
umask "$old_umask"
. "$tdir/bootstrap-utils.sh"
. "$tdir/data.sh"
[ -z "$KITTY_SSH_KITTEN_DATA_DIR" ] && die "Failed to read SSH data from tty"
case "$KITTY_SSH_KITTEN_DATA_DIR" in
/*) data_dir="$KITTY_SSH_KITTEN_DATA_DIR" ;;
*) data_dir="$HOME/$KITTY_SSH_KITTEN_DATA_DIR"
esac
shell_integration_dir="$data_dir/shell-integration"
unset KITTY_SSH_KITTEN_DATA_DIR
login_shell="$KITTY_LOGIN_SHELL"
unset KITTY_LOGIN_SHELL
login_cwd="$KITTY_LOGIN_CWD"
unset KITTY_LOGIN_CWD
kitty_remote="$KITTY_REMOTE"
unset KITTY_REMOTE
compile_terminfo "$tdir/home"
mv_files_and_dirs "$tdir/home" "$HOME"
[ -e "$tdir/root" ] && mv_files_and_dirs "$tdir/root" ""
command rm -rf "$tdir"
tdir=""
}
get_data() {
started="n"
while IFS= read -r line; do
if [ "$started" = "y" ]; then
[ "$line" = "OK" ] && break
die "$line"
else
if [ "$line" = "KITTY_DATA_START" ]; then
started="y"
else
leading_data="$leading_data$line"
fi
fi
done
untar_and_read_env
}
# ask for the SSH data
get_data
cleanup_on_bootstrap_exit
prepare_for_exec
# If a command was passed to SSH execute it here
EXEC_CMD
# Used in the tests
TEST_SCRIPT
exec_login_shell
```
|
Arthur Raymond (Ray) Halbritter (born 1951) is an American businessman who is the current Nation Representative and CEO of Oneida Nation Enterprises, a major casino and tobacco conglomerate in Upstate New York. He is a member of the Oneida Indian Nation's Wolf Clan.
Biography
Ray Halbritter, Nation Representative of the Oneida Indian Nation Inc. since 1975 and Chief Executive Officer (CEO) of its enterprises since 1990, has led the Oneida people to an economic and cultural renaissance during the past 30 years. His accomplishments include achieving federal government recognition of the Nation’s traditional form of government, creating numerous health and social programs for Nation Members, constructing new housing, and establishing education and culture programs. Halbritter earned his Bachelor of Science in business administration from Syracuse University and his Juris Doctor from Harvard Law School.
An avid golfer, Halbritter passed the Players Ability Test, making him a golf pro apprentice, the first stage to become a member of the Professional Golfers Association.
Halbritter is the grandson of Mary Cornelius Winder.
Oneida Indian Nation
Under Halbritter’s leadership, the Oneida Indian Nation endowed a professorship at Harvard Law School for teaching American Indian law, sponsored the “True Spirit of Thanksgiving,” the first-ever American Indian-sponsored float in the annual Macy's Thanksgiving Day Parade, and earned the 2007 Condé Nast Johansens “Most Excellent Resort” award for all resorts in the U.S. and Canada. As one of the donors to the Smithsonian Institution’s National Museum of the American Indian, the Oneida Indian Nation of New York had the fourth floor named in its honor. The Oneida Nation also hosts the PGA TOUR Turning Stone Resort Championship, the first regularly scheduled green PGA TOUR event to be held on tribal lands, which was honored for Best Branding and Signage in 2009.
The Oneida Nation’s businesses include Turning Stone Resort Casino in Verona, New York, Yellow Brick Road Casino in Chittenango, New York, Point Place Casino in Bridgeport, New York, the SavOn chain of convenience stores, a media operation that encompasses Indian Country Today Media Network, the largest native national weekly newspaper in the U.S., and a media production company.
Halbritter is executive producer of a Grammy-nominated record album, Raccoon & Crawfish, and a 3-D animated exert short film, the animation of which won a Silver Davey Award, given to the best work by small firms worldwide. It was screened at Cannes Film Festival, as well as winning numerous awards in the U.S. and abroad, including top animation honors at Moondance Film Festival and Big Bear International Film Festival. Halbritter produced the World of American Indian Dance, which aired on NBC, in addition to interactive animated material on Oneida history that is used at the Utica Children’s Museum. He assisted Disney with native music background for the Walt Disney World July 4 Celebration.
Through its enterprises, the Nation has earned national and international recognition and honors, including Four Diamond ratings from AAA for the resort’s luxury hotels and one of its restaurants. It was named as the Academy of Country Music’s Casino of the Year. All three of Turning Stone’s championship-caliber golf courses were listed in Golfweek magazine’s list of Top 100 courses in the country, in addition to receiving multiple other golf awards. (A full list of golf awards is attached.) The Nation’s Atunyote Golf Course hosts both the Turning Stone Resort Championship and the annual Notah Begay III Foundation Challenge charity event, which Tiger Woods won in 2009.
Service
Halbritter is chairman of the Turning Stone Resort Championship and the Upstate New York Empowerment Fund, the charitable arm of the tournament, which has raised hundreds of thousands of dollars for dozens of Central New York charities and civic groups. He serves on the boards of directors of the Environmental Media Association and the Harvard Native American Law Board. He is a member of the Recording Academy; the National Advisory Council for the American Indian Program at Cornell University; the National Congress of American Indians; and United South and Eastern Tribes. Halbritter is a board member of the Academy Museum of Motion Pictures.
Recognition
Halbritter was named one of Temple Adath Yeshurun’s Citizens of the Year in 2008. He also won the “Person of Achievement” Award from The Post-Standard (Syracuse), the Paul Harris Fellow Award from the Rotary Foundation, an award from the Rome Area Chamber of Commerce for “Outstanding Contribution to the Economic Vitality of the Community,” and the Central New York Sales & Marketing Executives Crystal Ball award, presented for business vision, commitment to improving the lives of his people, and the Nation’s economic contributions to Central New York. Syracuse University gave him its Distinguished Entrepreneur Award, and SU Basketball Coach Jim Boeheim presented Halbritter with the Coaches Vs. Cancer Basketball Award and honored him as Fan of the Year in 2009.
Washington Redskins Protest
Halbritter has been leading a vocal protest against the name of the NFL Washington Redskins team, calling it racially insensitive. On January 31, 2014 he met with the Assistant Secretary-General for Human Rights at U.N. headquarters in Manhattan While his protests fell on deaf ears, the Washington Redskins finally gave up the name after Nike pulled all of its team merchandise and Fedex threatened to pull its financial backing of Fedex Stadium. On July 13, 2020, the Washington Redskins team announced its decision to retire the team logo and change its name.
Criticism
Critics inside the tribe have accused Halbritter of being a dictator, a heavy-handed leader who "answers to no one," according to Doug George-Kanentiio, the co-founder of the Native American Journalists Association. Halbritter's initiatives have been criticized by some Oneida, who say he has violated the Great Law of the Haudenosaunee by embracing gambling. They also fault him for selecting his own clan mothers and for creating a "men's council," both unheard-of practices in Haudenosaunee tradition.
See also
Turning Stone Resort & Casino
References
External links
Oneida Indian Nation
American chief executives
Syracuse University alumni
Harvard Law School alumni
Native American leaders
1951 births
Living people
People from Oneida County, New York
|
The 18th Arkansas Infantry Regiment was the designation of several units of the Confederate Army during the American Civil War. They were :
18th Arkansas Infantry Regiment (Carroll's), formed April 1862, finished at Port Hudson July 1863
18th (Marmaduke's) Arkansas Infantry Regiment, formed January 1862, redesignated 3rd Confederate Infantry late Jan 62
Military units and formations disambiguation pages
|
```go
//go:build windows
// +build windows
package cancelreader
import (
"fmt"
"io"
"os"
"syscall"
"time"
"unicode/utf16"
"golang.org/x/sys/windows"
)
var fileShareValidFlags uint32 = 0x00000007
// NewReader returns a reader and a cancel function. If the input reader is a
// File with the same file descriptor as os.Stdin, the cancel function can
// be used to interrupt a blocking read call. In this case, the cancel function
// returns true if the call was canceled successfully. If the input reader is
// not a File with the same file descriptor as os.Stdin, the cancel
// function does nothing and always returns false. The Windows implementation
// is based on WaitForMultipleObject with overlapping reads from CONIN$.
func NewReader(reader io.Reader) (CancelReader, error) {
if f, ok := reader.(File); !ok || f.Fd() != os.Stdin.Fd() {
return newFallbackCancelReader(reader)
}
// it is necessary to open CONIN$ (NOT windows.STD_INPUT_HANDLE) in
// overlapped mode to be able to use it with WaitForMultipleObjects.
conin, err := windows.CreateFile(
&(utf16.Encode([]rune("CONIN$\x00"))[0]), windows.GENERIC_READ|windows.GENERIC_WRITE,
fileShareValidFlags, nil, windows.OPEN_EXISTING, windows.FILE_FLAG_OVERLAPPED, 0)
if err != nil {
return nil, fmt.Errorf("open CONIN$ in overlapping mode: %w", err)
}
resetConsole, err := prepareConsole(conin)
if err != nil {
return nil, fmt.Errorf("prepare console: %w", err)
}
// flush input, otherwise it can contain events which trigger
// WaitForMultipleObjects but which ReadFile cannot read, resulting in an
// un-cancelable read
err = flushConsoleInputBuffer(conin)
if err != nil {
return nil, fmt.Errorf("flush console input buffer: %w", err)
}
cancelEvent, err := windows.CreateEvent(nil, 0, 0, nil)
if err != nil {
return nil, fmt.Errorf("create stop event: %w", err)
}
return &winCancelReader{
conin: conin,
cancelEvent: cancelEvent,
resetConsole: resetConsole,
blockingReadSignal: make(chan struct{}, 1),
}, nil
}
type winCancelReader struct {
conin windows.Handle
cancelEvent windows.Handle
cancelMixin
resetConsole func() error
blockingReadSignal chan struct{}
}
func (r *winCancelReader) Read(data []byte) (int, error) {
if r.isCanceled() {
return 0, ErrCanceled
}
err := r.wait()
if err != nil {
return 0, err
}
if r.isCanceled() {
return 0, ErrCanceled
}
// windows.Read does not work on overlapping windows.Handles
return r.readAsync(data)
}
// Cancel cancels ongoing and future Read() calls and returns true if the
// cancelation of the ongoing Read() was successful. On Windows Terminal,
// WaitForMultipleObjects sometimes immediately returns without input being
// available. In this case, graceful cancelation is not possible and Cancel()
// returns false.
func (r *winCancelReader) Cancel() bool {
r.setCanceled()
select {
case r.blockingReadSignal <- struct{}{}:
err := windows.SetEvent(r.cancelEvent)
if err != nil {
return false
}
<-r.blockingReadSignal
case <-time.After(100 * time.Millisecond):
// Read() hangs in a GetOverlappedResult which is likely due to
// WaitForMultipleObjects returning without input being available
// so we cannot cancel this ongoing read.
return false
}
return true
}
func (r *winCancelReader) Close() error {
err := windows.CloseHandle(r.cancelEvent)
if err != nil {
return fmt.Errorf("closing cancel event handle: %w", err)
}
err = r.resetConsole()
if err != nil {
return err
}
err = windows.Close(r.conin)
if err != nil {
return fmt.Errorf("closing CONIN$")
}
return nil
}
func (r *winCancelReader) wait() error {
event, err := windows.WaitForMultipleObjects([]windows.Handle{r.conin, r.cancelEvent}, false, windows.INFINITE)
switch {
case windows.WAIT_OBJECT_0 <= event && event < windows.WAIT_OBJECT_0+2:
if event == windows.WAIT_OBJECT_0+1 {
return ErrCanceled
}
if event == windows.WAIT_OBJECT_0 {
return nil
}
return fmt.Errorf("unexpected wait object is ready: %d", event-windows.WAIT_OBJECT_0)
case windows.WAIT_ABANDONED <= event && event < windows.WAIT_ABANDONED+2:
return fmt.Errorf("abandoned")
case event == uint32(windows.WAIT_TIMEOUT):
return fmt.Errorf("timeout")
case event == windows.WAIT_FAILED:
return fmt.Errorf("failed")
default:
return fmt.Errorf("unexpected error: %w", error(err))
}
}
// readAsync is necessary to read from a windows.Handle in overlapping mode.
func (r *winCancelReader) readAsync(data []byte) (int, error) {
hevent, err := windows.CreateEvent(nil, 0, 0, nil)
if err != nil {
return 0, fmt.Errorf("create event: %w", err)
}
overlapped := windows.Overlapped{
HEvent: hevent,
}
var n uint32
err = windows.ReadFile(r.conin, data, &n, &overlapped)
if err != nil && err != windows.ERROR_IO_PENDING {
return int(n), err
}
r.blockingReadSignal <- struct{}{}
err = windows.GetOverlappedResult(r.conin, &overlapped, &n, true)
if err != nil {
return int(n), nil
}
<-r.blockingReadSignal
return int(n), nil
}
func prepareConsole(input windows.Handle) (reset func() error, err error) {
var originalMode uint32
err = windows.GetConsoleMode(input, &originalMode)
if err != nil {
return nil, fmt.Errorf("get console mode: %w", err)
}
var newMode uint32
newMode &^= windows.ENABLE_ECHO_INPUT
newMode &^= windows.ENABLE_LINE_INPUT
newMode &^= windows.ENABLE_MOUSE_INPUT
newMode &^= windows.ENABLE_WINDOW_INPUT
newMode &^= windows.ENABLE_PROCESSED_INPUT
newMode |= windows.ENABLE_EXTENDED_FLAGS
newMode |= windows.ENABLE_INSERT_MODE
newMode |= windows.ENABLE_QUICK_EDIT_MODE
// Enabling virtual terminal input is necessary for processing certain
// types of input like X10 mouse events and arrows keys with the current
// bytes-based input reader. It does, however, prevent cancelReader from
// being able to cancel input. The planned solution for this is to read
// Windows events in a more native fashion, rather than the current simple
// bytes-based input reader which works well on unix systems.
newMode |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT
err = windows.SetConsoleMode(input, newMode)
if err != nil {
return nil, fmt.Errorf("set console mode: %w", err)
}
return func() error {
err := windows.SetConsoleMode(input, originalMode)
if err != nil {
return fmt.Errorf("reset console mode: %w", err)
}
return nil
}, nil
}
var (
modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
procFlushConsoleInputBuffer = modkernel32.NewProc("FlushConsoleInputBuffer")
)
func flushConsoleInputBuffer(consoleInput windows.Handle) error {
r, _, e := syscall.Syscall(procFlushConsoleInputBuffer.Addr(), 1,
uintptr(consoleInput), 0, 0)
if r == 0 {
return error(e)
}
return nil
}
```
|
```python
#
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""Customized keras layers used in the EdgeTPU models."""
from collections.abc import MutableMapping
import inspect
from typing import Any, Optional, Union
import tensorflow as tf, tf_keras
from official.modeling import tf_utils
class GroupConv2D(tf_keras.layers.Conv2D):
"""2D group convolution as a Keras Layer."""
def __init__(self,
filters: int,
kernel_size: Union[int, tuple[int, int]],
groups: int,
strides: tuple[int, int] = (1, 1),
padding: str = 'valid',
data_format: str = 'channels_last',
dilation_rate: tuple[int, int] = (1, 1),
activation: Any = None,
use_bias: bool = True,
kernel_initializer: Any = 'glorot_uniform',
bias_initializer: Any = 'zeros',
kernel_regularizer: Any = None,
bias_regularizer: Any = None,
activity_regularizer: Any = None,
kernel_constraint: Any = None,
bias_constraint: Any = None,
batch_norm_layer: Optional[tf_keras.layers.Layer] = None,
bn_epsilon: float = 1e-3,
bn_momentum: float = 0.99,
**kwargs: Any) -> tf_keras.layers.Layer:
"""Creates a 2D group convolution keras layer.
Args:
filters: Integer, the dimensionality of the output space (i.e. the number
of output filters in the convolution).
kernel_size: An integer or tuple/list of 2 integers, specifying the height
and width of the 2D convolution window. Can be a single integer to
specify the same value for all spatial dimensions.
groups: The number of input/output channel groups.
strides: An integer or tuple/list of n integers, specifying the stride
length of the convolution. Specifying any stride value != 1 is
incompatible with specifying any `dilation_rate` value != 1.
padding: one of `"valid"` or `"same"` (case-insensitive).
data_format: The ordering of the dimensions in the inputs. `channels_last`
corresponds to inputs with shape `(batch_size, height, width, channels)`
dilation_rate: an integer or tuple/list of 2 integers, specifying the
dilation rate to use for dilated convolution. Can be a single integer to
specify the same value for all spatial dimensions. Currently, specifying
any `dilation_rate` value != 1 is incompatible with specifying any
stride value != 1.
activation: Activation function to use. If you don't specify anything, no
activation is applied ( see `keras.activations`).
use_bias: Boolean, whether the layer uses a bias vector.
kernel_initializer: Initializer for the `kernel` weights matrix ( see
`keras.initializers`).
bias_initializer: Initializer for the bias vector ( see
`keras.initializers`).
kernel_regularizer: Regularizer function applied to the `kernel` weights
matrix (see `keras.regularizers`).
bias_regularizer: Regularizer function applied to the bias vector ( see
`keras.regularizers`).
activity_regularizer: Regularizer function applied to the output of the
layer (its "activation") ( see `keras.regularizers`).
kernel_constraint: Constraint function applied to the kernel matrix ( see
`keras.constraints`).
bias_constraint: Constraint function applied to the bias vector ( see
`keras.constraints`).
batch_norm_layer: The batch normalization layer to use. This is typically
tf_keras.layer.BatchNormalization or a derived class.
bn_epsilon: Batch normalization epsilon.
bn_momentum: Momentum used for moving average in batch normalization.
**kwargs: Additional keyword arguments.
Input shape:
4D tensor with shape: `(batch_size, rows, cols, channels)`
Output shape:
4D tensor with shape: `(batch_size, new_rows, new_cols, filters)` `rows`
and `cols` values might have changed due to padding.
Returns:
A tensor of rank 4 representing
`activation(GroupConv2D(inputs, kernel) + bias)`.
Raises:
ValueError: if groups < 1 or groups > filters
ValueError: if data_format is not "channels_last".
ValueError: if `padding` is not `same` or `valid`.
ValueError: if `batch_norm_layer` is not a callable when provided.
ValueError: when both `strides` > 1 and `dilation_rate` > 1.
"""
if groups <= 1 or groups > filters:
raise ValueError(f'Number of groups {groups} should be greater than 1 and'
f' less or equal than the output filters {filters}.')
self._groups = groups
if data_format != 'channels_last':
raise ValueError(
'GroupConv2D expects input to be in channels_last format.')
if padding.lower() not in ('same', 'valid'):
raise ValueError('Valid padding options are : same, or valid.')
self.use_batch_norm = False
if batch_norm_layer is not None:
if not inspect.isclass(batch_norm_layer):
raise ValueError('batch_norm_layer is not a class.')
self.use_batch_norm = True
self.bn_epsilon = bn_epsilon
self.bn_momentum = bn_momentum
self.batch_norm_layer = []
if self.use_batch_norm:
self.batch_norm_layer = [
batch_norm_layer(
axis=-1, momentum=self.bn_momentum, epsilon=self.bn_epsilon)
for i in range(self._groups)
]
super().__init__(
filters=filters,
kernel_size=kernel_size,
strides=strides,
padding=padding,
data_format=data_format,
dilation_rate=dilation_rate,
activation=activation,
use_bias=use_bias,
kernel_initializer=kernel_initializer,
bias_initializer=bias_initializer,
kernel_regularizer=kernel_regularizer,
bias_regularizer=bias_regularizer,
activity_regularizer=activity_regularizer,
kernel_constraint=kernel_constraint,
bias_constraint=bias_constraint,
groups=1,
**kwargs) # pytype: disable=bad-return-type # typed-keras
def build(self, input_shape: tuple[int, ...]) -> None:
"""Builds GroupConv2D layer as a collection of smaller Conv2D layers."""
input_shape = tf.TensorShape(input_shape)
input_channel = self._get_input_channel(input_shape)
if input_channel % self._groups != 0:
raise ValueError(
f'Number of input channels: {input_channel} are not divisible '
f'by number of groups: {self._groups}.')
self.group_input_channel = int(input_channel / self._groups)
self.group_output_channel = int(self.filters / self._groups)
self.group_kernel_shape = self.kernel_size + (self.group_input_channel,
self.group_output_channel)
self.kernel = []
self.bias = []
for g in range(self._groups):
self.kernel.append(
self.add_weight(
name='kernel_{}'.format(g),
shape=self.group_kernel_shape,
initializer=tf_utils.clone_initializer(self.kernel_initializer),
regularizer=self.kernel_regularizer,
constraint=self.kernel_constraint,
trainable=True,
dtype=self.dtype))
if self.use_bias:
self.bias.append(
self.add_weight(
name='bias_{}'.format(g),
shape=(self.group_output_channel,),
initializer=tf_utils.clone_initializer(self.bias_initializer),
regularizer=self.bias_regularizer,
constraint=self.bias_constraint,
trainable=True,
dtype=self.dtype))
channel_axis = self._get_channel_axis()
self.input_spec = tf_keras.layers.InputSpec(
ndim=self.rank + 2, axes={channel_axis: input_channel})
self._build_conv_op_data_shape = input_shape[-(self.rank + 1):]
self._build_input_channel = input_channel
self._padding_op = self._get_padding_op()
# channels_last corresponds to 'NHWC' data format.
self._conv_op_data_format = 'NHWC'
self.bn_layers = []
if self.use_batch_norm:
for group_index in range(self._groups):
self.bn_layers.append(self.batch_norm_layer[group_index])
self.built = True
def call(self, inputs: Any, training: Optional[bool] = None) -> Any:
"""Performs the GroupConv2D operation on the inputs."""
input_slices = tf.split(inputs, num_or_size_splits=self._groups, axis=-1)
output_slices = []
for i in range(self._groups):
# Apply conv2d to each slice
output_slice = tf.nn.conv2d(
input_slices[i],
self.kernel[i],
strides=self.strides,
padding=self._padding_op,
data_format=self._conv_op_data_format,
dilations=self.dilation_rate)
if self.use_bias:
output_slice = tf.nn.bias_add(
output_slice, self.bias[i], data_format='NHWC')
# Apply batch norm after bias addition.
if self.use_batch_norm:
output_slice = self.bn_layers[i](output_slice, training=training)
if self.activation is not None:
output_slice = self.activation(output_slice)
output_slices.append(output_slice)
# Concat the outputs back along the channel dimension
outputs = tf.concat(output_slices, axis=-1)
return outputs
def get_config(self) -> MutableMapping[str, Any]:
"""Enables serialization for the group convolution layer."""
config = super().get_config()
config['groups'] = self._groups
config['batch_norm_layer'] = self.batch_norm_layer
config['bn_epsilon'] = self.bn_epsilon
config['bn_momentum'] = self.bn_momentum
return config
@classmethod
def from_config(cls, config):
"""Creates a layer from its config.
This method is the reverse of `get_config`, capable of instantiating the
same layer from the config dictionary. It does not handle layer connectivity
(handled by Network), nor weights (handled by `set_weights`).
Also, the get_config returns a config with a list type of `batch_norm_layer`
we need to convert it either to None or the batch_norm class.
Arguments:
config: A Python dictionary, typically the output of get_config.
Returns:
A layer instance.
"""
if not config['batch_norm_layer']:
config['batch_norm_layer'] = None
else:
config['batch_norm_layer'] = type(config['batch_norm_layer'][0])
return cls(**config)
class GroupConv2DKerasModel(tf_keras.Model):
"""2D group convolution as a keras model."""
def __init__(self,
filters: int,
kernel_size: tuple[int, int],
groups: int,
batch_norm_layer: Optional[tf_keras.layers.Layer] = None,
bn_epsilon: float = 1e-3,
bn_momentum: float = 0.99,
data_format: str = 'channels_last',
padding: str = 'valid',
**kwargs: Any) -> tf_keras.Model:
"""Creates a 2D group convolution layer as a keras model.
Args:
filters: Integer, the dimensionality of the output space (i.e. the number
of output filters in the convolution).
kernel_size: An integer or tuple/list of 2 integers, specifying the height
and width of the 2D convolution window. Can be a single integer to
specify the same value for all spatial dimensions.
groups: The number of input/output channel groups.
batch_norm_layer: The batch normalization layer to use. This is typically
tf_keras.layer.BatchNormalization or a derived class.
bn_epsilon: Batch normalization epsilon.
bn_momentum: Momentum used for moving average in batch normalization.
data_format: The ordering of the dimensions in the inputs. `channels_last`
corresponds to inputs with shape `(batch_size, height, width, channels)`
padding: one of `"valid"` or `"same"` (case-insensitive).
**kwargs: Additional keyword arguments passed to the underlying conv
layers.
Raises:
ValueError: if groups < 1 or groups > filters
ValueError: if `batch_norm_layer` is not a callable when provided.
ValueError: if `data_format` is not channels_last
ValueError: if `padding` is not `same` or `valid`.
"""
super().__init__()
self.conv_layers = []
self.bn_layers = []
per_conv_filter_size = filters / groups
if groups <= 1 or groups >= filters:
raise ValueError('Number of groups should be greater than 1 and less '
'than the output filters.')
self.batch_norm_layer = batch_norm_layer
self.use_batch_norm = False
if self.batch_norm_layer is not None:
if not inspect.isclass(self.batch_norm_layer): # pytype: disable=not-supported-yet
raise ValueError('batch_norm_layer is not a class.')
self.use_batch_norm = True
if 'activation' in kwargs.keys():
self.activation = tf_keras.activations.get(kwargs['activation'])
kwargs.pop('activation')
else:
self.activation = None
if data_format != 'channels_last':
raise ValueError(
'GroupConv2D expects input to be in channels_last format.')
if padding.lower() not in ('same', 'valid'):
raise ValueError('Valid padding options are : same, or valid.')
self._groups = groups
for _ in range(self._groups):
# Override the activation so that batchnorm can be applied after the conv.
self.conv_layers.append(
tf_keras.layers.Conv2D(per_conv_filter_size, kernel_size, **kwargs))
if self.use_batch_norm:
for _ in range(self._groups):
self.bn_layers.append(
self.batch_norm_layer(
axis=-1, momentum=bn_momentum, epsilon=bn_epsilon)) # pytype: disable=bad-return-type # typed-keras
def call(self, inputs: Any) -> Any: # pytype: disable=signature-mismatch # overriding-parameter-count-checks
"""Applies 2d group convolution on the inputs."""
input_shape = inputs.get_shape().as_list()
if input_shape[-1] % self._groups != 0:
raise ValueError(
f'Number of input channels: {input_shape[-1]} are not divisible '
f'by number of groups: {self._groups}.')
input_slices = tf.split(inputs, num_or_size_splits=self._groups, axis=-1)
output_slices = []
for g in range(self._groups):
output_slice = self.conv_layers[g](input_slices[g])
if self.use_batch_norm:
output_slice = self.bn_layers[g](output_slice)
output_slice = self.activation(output_slice)
output_slices.append(output_slice)
outputs = tf.concat(output_slices, axis=-1)
return outputs
def _nnapi_scalar(value, dtype):
# Resolves "Scalar operand should be constant" at cost of broadcasting
return tf.constant(value, dtype=dtype, shape=(1,))
def _fqop(x, min_val=-128, max_val=127):
"""Wraps an op x with fake quant op and given min/max."""
return tf.quantization.fake_quant_with_min_max_args(
x, min=min_val, max=max_val)
def argmax(input_tensor,
axis=-1,
output_type: tf.DType = tf.dtypes.float32,
name: Optional[str] = None,
keepdims: bool = False,
epsilon: Optional[float] = None):
"""Returns the index with the largest value across axes of a tensor.
Approximately tf.compat.v1.argmax, but not equivalent. If arithmetic allows
value to be anomalously close to the maximum, but not equal to it, the
behavior is undefined.
Args:
input_tensor: A Tensor.
axis: A Value. Must be in the range [-rank(input), rank(input)). Describes
which axis of the input Tensor to reduce across. For vectors, use axis =
0.
output_type: An optional tf.DType. Note that default is different from
tflite (int64) to make default behavior compatible with darwinn.
name: Optional name for operations.
keepdims: If true, retains reduced dimensions with length 1.
epsilon: Optional small number which is intended to be always below
quantization threshold, used to distinguish equal and not equal numbers.
Returns:
A Tensor of type output_type.
"""
fqop = _fqop if output_type.is_floating else tf.identity
safe_axis = axis
if safe_axis < 0:
safe_axis = len(input_tensor.shape) + safe_axis
reduction_size = input_tensor.shape[axis]
axis_max = tf.math.reduce_max(input_tensor, axis=axis, keepdims=True)
zero_if_max = tf.subtract(axis_max, input_tensor)
eps = epsilon if epsilon else 1e-6
if input_tensor.dtype.is_floating:
zero_if_max_else_eps = tf.math.minimum(
_nnapi_scalar(eps, input_tensor.dtype), zero_if_max)
zero_if_max_else_one = zero_if_max_else_eps * _nnapi_scalar(
1 / eps, input_tensor.dtype)
elif input_tensor.dtype.is_integer:
zero_if_max_else_one = tf.math.minimum(
_nnapi_scalar(1, input_tensor.dtype), zero_if_max)
else:
raise ValueError('Please specify epsilon for unknown input data type')
# Input type ends here, output type starts here
zero_if_max_else_one = tf.cast(zero_if_max_else_one, dtype=output_type)
zero_if_max_else_one = fqop(zero_if_max_else_one)
one_if_max_else_zero = fqop(
tf.math.subtract(
fqop(_nnapi_scalar(1, output_type)), zero_if_max_else_one))
rev_index = tf.range(reduction_size, 0, -1, dtype=output_type)
for index in range(safe_axis + 1, len(input_tensor.shape)):
rev_index = tf.expand_dims(rev_index, axis=index - safe_axis)
rev_index = fqop(rev_index)
rev_index_if_max_else_zero = fqop(
tf.math.multiply(one_if_max_else_zero, rev_index))
reverse_argmax = fqop(
tf.math.reduce_max(
rev_index_if_max_else_zero, axis=axis, keepdims=keepdims, name=name))
# Final operation obtains name if argmax layer if provided
return fqop(
tf.math.subtract(
fqop(_nnapi_scalar(reduction_size, output_type)),
reverse_argmax,
name=name))
class ArgmaxKerasLayer(tf_keras.layers.Layer):
"""Implements argmax as a keras model."""
def __init__(self,
axis=-1,
name=None,
output_type=tf.dtypes.int32,
**kwargs: Any) -> tf_keras.Model:
"""Implements argmax as a keras model.
Args:
axis: A Value. Must be in the range [-rank(input), rank(input)). Describes
which axis of the input Tensor to reduce across. For vectors, use axis =
0.
name: Optional name for operations.
output_type: An optional tf.DType.
**kwargs: Other arguments passed to model constructor.
Returns:
A Tensor of type output_type.
"""
super().__init__(name=name, **kwargs)
self.axis = axis
self.output_type = output_type # pytype: disable=bad-return-type # typed-keras
def call(self, inputs: Any) -> Any:
"""Applies argmax on the inputs."""
return argmax(
input_tensor=inputs,
axis=self.axis,
output_type=self.output_type,
name=self.name)
```
|
Elmhurst (also known as Elmtrees) is a semi-detached house at 5 High Street in Great Missenden, Buckinghamshire. It is divided into seven apartments. It predominantly dates from the 18th century and surrounds a 16th-century house.
The main wing has been listed Grade II* on the National Heritage List for England since August 1977. The north wing, known as Gable End, was separately listed Grade II in July 1984.
The house is 2 storeys in height, made from red and grey brick and has a distinctive 19th century covered entrance with a semi circular iron roof and a traceried fanlight over the door.
The present house was erected by the Dormer family and was inhabited for several years by the widow of William Cleaver, the Bishop of Chester. It was subsequently the residence of Frances, the wife of the 19th century radical MP Robert Knight. A September 1840 letter from farmer John Burgess was sent from Elmhurst to the Journal of the Royal Agricultural Society of England. An 1870 letter from Gilbert William Child was sent from Elmhurst to Charles Darwin.
References
Grade II* listed houses in Buckinghamshire
Houses completed in the 18th century
Great Missenden
|
The Courage to Heal: A Guide for Women Survivors of Child Sexual Abuse (first published in 1988, with three subsequent editions, the last being a 20th anniversary edition in 2008) is a self-help book by poet Ellen Bass and Laura Davis that focuses on recovery from child sexual abuse and has been called "controversial and polarizing".
The intent of the book is to provide a healing experience by means of explanations, practical suggestions, descriptions and first hand accounts from women who have experienced sexual abuse. The authors say that individuals (mainly women) with a general set of symptoms may have been abused, but the memories of which have been repressed. They propose a variety of techniques to overcome their symptoms, including confronting their alleged abusers, adopting an identity as a "survivor", overcoming the associated trauma and in cases where there is no memory of any abuse, recovering the memories. The book was a bestseller in North America and Europe. The 20th Anniversary Edition came out in 2008 and included an updated resource guide, additional stories and research.
The book has been criticized for being used primarily by incompetent therapists, for creating in children false memories of abuse, as well as for its authors' lack of qualifications, for creating an industry which has isolated and separated family members despite having no positive proof the abuse occurred, and for destructively replacing individual identities with that of a "survivor". Bass and Davis have also been criticized for leaping to unwarranted, implausible conclusions with significant consequences and for scientific errors found in the first edition that were not corrected in subsequent reprintings. Bass and Davis responded to the controversy surrounding the book by writing "Honoring the Truth: A Response to the Backlash", a new chapter included in the 1994 edition to respond to and rebut criticisms of the book, though this was removed from the 20th anniversary edition. Since its second edition, the book has contained a case study of an individual who was allegedly a victim of satanic ritual abuse, now considered a moral panic.
Authors
The Courage to Heal is written by Ellen Bass, a poet and creative writing teacher and her student Laura Davis, an author and incest survivor. Bass worked as a counselor and group facilitator with survivors of child sexual abuse. Bass is the wife of a survivor of child sexual abuse and Davis was sexually abused as a child and participated in one of Bass' creative writing workshops. Bass and Davis attributed efforts to confront incest and child sexual abuse to the women's liberation movement. While working with students, Bass and Davis came to believe that the stories of some students were trying to convey painful memories of incest. From this idea, the two developed methods to assist students in recovering memories of abuse in childhood.
Neither Bass nor Davis have any training in psychotherapy or science, and they state that nothing in the book is based on any psychological theories. They have defended their lack of training, saying that a PhD is not necessary "to listen carefully and compassionately to another human being". Bass and Davis still define themselves as healers and experts in the area of child sexual abuse, due to leading workshops with victims.
Summary
The 2008 edition is divided into six sections:
Taking Stock
The Healing Process
Changing Patterns
For Supporters of Survivors
Courageous Women
Resource Guide
The book includes in-depth interviews, writing exercises and a resource list.
The third edition featured an afterword called "Honoring the Truth: A Response to the Backlash", which was added to respond to and rebut negative reactions to the book. The section has been characterized as an effort to dismiss all research contradicting the book as being part of a backlash against victims of incest. The chapter was removed from the 20th anniversary edition.
The book was written as a response to the authors' frequent encounters with women who were the victims of sexual abuse during their childhood and adolescence, and is predicated on the belief that extreme childhood trauma, of which sexual abuse is one, is spontaneously repressed. The authors suggest that people experiencing dysfunction in their lives (including a wide-ranging set of problems such as depression, anxiety, alcoholism, drug addiction, dysfunctional relationships, dissociative identity disorder, self-injury and suicidal thoughts) or feel there was something traumatic in their childhood should investigate these feelings; Bass and Davis also present what they believe is a path to healing from the trauma of alleged childhood abuse. The latest edition features language more inclusive of male sexual abuse victims.
The original edition of the book contained an influential chapter discussing satanic ritual abuse (though satanic ritual abuse is now considered a moral panic, the case specifically discussed in The Courage to Heal is that of Judith Spencer, which has since been discredited) and the discredited autobiography Michelle Remembers - citing the latter approvingly along with other alleged survivor stories of satanic ritual abuse. Subsequent editions renamed the phenomenon "sadistic ritual abuse". The Courage to Heal was part of the vision that childhood sexual abuse could be discovered with no corroborating evidence beyond a vague set of symptoms.
Psychologists Carol Tavris and Elliot Aronson state that basic errors regarding the science of memory have never been corrected between editions; in the third edition, the book stated that for a small number of women their symptoms may have originated in emotional rather than sexual abuse.
Reception
Reception of the book was "polarizing".
The book was a bestseller in North America and Europe, and has been described as "the bible of the 'survivors' movement". Discussing the book in relation to narratives of incest, professors of English Janice Doane and Devon Hodges believe the book's popularity is due to it offering "an enormously enabling fantasy that by the same token refuses a complex analysis of the very means of recovery, writing, that it so confidently touts" and for promising to completely make sense of the reader's lives through the simple process of writing. A large number of therapists who used the book lacked training in research and awareness of the confirmation bias failed to appreciate the risks of seeing incest behind any symptom, or even a lack of symptoms and did not consider that other factors besides incest may have caused sexual problems in their clients.
A 1991 review states that "...reading and completing the exercises [does not] always results in all survivors overcoming all effects of child sexual abuse. Rather, survivors who have read the book have reported to me that it was helpful in dealing with the effects of the abuse." The book has been praised for being the first book for women to break open the taboo about sexual abuse. The book has also been praised for encouraging disclosure of abuse.
A 1995 review by psychologist and clinician Susan Contratto states that the book was perceived as dangerous by the antifeminist backlash since it legitimized stories of abuse as told by the survivors.
Bass and Davis have no formal training or qualifications in psychiatry, psychology or any form of treatment for mental illness. Psychologists Carol Tavris and Elliot Aronson state that despite the authors' lack of knowledge about the workings of memories, the scientific approach or information and lack of qualifications, neither author has ever acknowledged the errors they have made in their descriptions of memory and trauma. They accuse the authors of basic errors regarding the science of memory that they say have never been corrected between editions; in the third edition, the book stated that for a small number of women their symptoms may have originated in emotional rather than sexual abuse. This lack of qualifications resulted in Bass, Davis and others who adopted their approach leaping to conclusions that caused considerable harm, irrespective of their intentions. They have been accused of creating an industry which has isolated and separated family members despite having no positive proof the abuse occurred, and for replacing individual identities with that of a "survivor". Bass and Davis also never acknowledged criticisms that their description of how memory works was flawed or incorrect. Paul R. McHugh, professor of psychiatry at Johns Hopkins University and award-winning researcher in the field of memory describes the book as the "bible of incompetent therapists". A report for the Australian branch of the False Memory Syndrome Foundation (FMSF) found the book was linked to nearly 50% of the cases in which a false allegation of child sexual abuse was made based on recovered memories and a 2005 report by the Health Services Commissioner to the Minister for Health of Australia stated that some respondents from families where there were accusations of child sexual abuse called for the book to be banned, believing that it promotes the practice of recovered memory therapy. Frederick Crews has criticized the book for appealing not to women who have always remembered abuse, but rather being aimed at those who struggle to convince themselves they were abused as children in the absence of previously existing memories, and that the authors' claim to promote self-esteem are actually based "on a shattering of their readers' prior sense of identity and trust".
Elizabeth Loftus, an award-winning researcher on memory, stated that the book was certainly very comforting to individuals living with memories of abuse, but questioned the effect it would have on people who do not have such memories, and suggested The Courage to Heal may be one of many sources of false memories for some individuals. Loftus also stated that "All roads on the search for popular writings inevitably lead to [the book]". The Courage to Heal encourages the use of strategies such as guided imagery to access and attempting to elaborate details and emotions and discouraging individuals from questioning the memories recovered.
According to psychologist Bryan Tully, the authors believe that children frequently forget and repress memories of abuse, and claim that intuition and symptoms are sufficient to confirm abuse.
Professors of English Doane and Hodges note that the book was widely condemned for its use of checklists to determine if the reader was abused, describing the complaints made against the book as being as formulaic as the stories it engenders (in part due to things like the "notorious") and only criticizing parts of the book. Doane and Hodges also state that the use of "you" throughout the book blinds Davis and Bass to their shaping of the identity of the reader and their story.
Bass and Davis responded to the controversy surrounding the book by writing "Honoring the Truth: A Response to the Backlash", a new chapter included in the 1994 edition to respond to and rebut criticisms of the book, though this was removed from the 20th anniversary edition. Since its second edition, the book has contained a case study of an individual who was allegedly a victim of satanic ritual abuse, now considered a moral panic.
A 2009 newsletter from the American branch of the False Memory Syndrome Foundation (FMSF) criticizes the 20th anniversary edition, saying, "No book did more to spread false memory syndrome". The book was described as vicious, and filled with factual errors about the FMSF and the nature of memory, though the anniversary edition is described as better, without the outrageous features of earlier publications and that in the new edition, the FMSF is not mentioned in the book's index. The book is still dedicated to recovering memories, and does not warn the reader of the doubts scientists have about its premises. The book's final case study is still a depiction of satanic ritual abuse, without noting the FBI's report that concluded there was no evidence for the phenomenon.
The third edition of the book, published in 1994, included a chapter entitled "Honoring the Truth," in which the authors respond to the book's critics. The FMSF criticized the chapter about their organization as filled with factual errors and written by a man who had no known credentials and no scientific publications in the relevant fields; the discussion of the FMSF was removed from the 20th anniversary edition.
See also
Amnesia
Dissociation
The Freudian Coverup
Memory inhibition
References
1988 non-fiction books
Child sexual abuse
English-language books
Health and wellness books
Books about satanic ritual abuse
Self-help books
Bibliotherapy books
|
```forth
*> \brief \b ZUNBDB4
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* path_to_url
*
*> \htmlonly
*> Download ZUNBDB4 + dependencies
*> <a href="path_to_url">
*> [TGZ]</a>
*> <a href="path_to_url">
*> [ZIP]</a>
*> <a href="path_to_url">
*> [TXT]</a>
*> \endhtmlonly
*
* Definition:
* ===========
*
* SUBROUTINE ZUNBDB4( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
* TAUP1, TAUP2, TAUQ1, PHANTOM, WORK, LWORK,
* INFO )
*
* .. Scalar Arguments ..
* INTEGER INFO, LWORK, M, P, Q, LDX11, LDX21
* ..
* .. Array Arguments ..
* DOUBLE PRECISION PHI(*), THETA(*)
* COMPLEX*16 PHANTOM(*), TAUP1(*), TAUP2(*), TAUQ1(*),
* $ WORK(*), X11(LDX11,*), X21(LDX21,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*>\verbatim
*>
*> ZUNBDB4 simultaneously bidiagonalizes the blocks of a tall and skinny
*> matrix X with orthonormal columns:
*>
*> [ B11 ]
*> [ X11 ] [ P1 | ] [ 0 ]
*> [-----] = [---------] [-----] Q1**T .
*> [ X21 ] [ | P2 ] [ B21 ]
*> [ 0 ]
*>
*> X11 is P-by-Q, and X21 is (M-P)-by-Q. M-Q must be no larger than P,
*> M-P, or Q. Routines ZUNBDB1, ZUNBDB2, and ZUNBDB3 handle cases in
*> which M-Q is not the minimum dimension.
*>
*> The unitary matrices P1, P2, and Q1 are P-by-P, (M-P)-by-(M-P),
*> and (M-Q)-by-(M-Q), respectively. They are represented implicitly by
*> Householder vectors.
*>
*> B11 and B12 are (M-Q)-by-(M-Q) bidiagonal matrices represented
*> implicitly by angles THETA, PHI.
*>
*>\endverbatim
*
* Arguments:
* ==========
*
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> The number of rows X11 plus the number of rows in X21.
*> \endverbatim
*>
*> \param[in] P
*> \verbatim
*> P is INTEGER
*> The number of rows in X11. 0 <= P <= M.
*> \endverbatim
*>
*> \param[in] Q
*> \verbatim
*> Q is INTEGER
*> The number of columns in X11 and X21. 0 <= Q <= M and
*> M-Q <= min(P,M-P,Q).
*> \endverbatim
*>
*> \param[in,out] X11
*> \verbatim
*> X11 is COMPLEX*16 array, dimension (LDX11,Q)
*> On entry, the top block of the matrix X to be reduced. On
*> exit, the columns of tril(X11) specify reflectors for P1 and
*> the rows of triu(X11,1) specify reflectors for Q1.
*> \endverbatim
*>
*> \param[in] LDX11
*> \verbatim
*> LDX11 is INTEGER
*> The leading dimension of X11. LDX11 >= P.
*> \endverbatim
*>
*> \param[in,out] X21
*> \verbatim
*> X21 is COMPLEX*16 array, dimension (LDX21,Q)
*> On entry, the bottom block of the matrix X to be reduced. On
*> exit, the columns of tril(X21) specify reflectors for P2.
*> \endverbatim
*>
*> \param[in] LDX21
*> \verbatim
*> LDX21 is INTEGER
*> The leading dimension of X21. LDX21 >= M-P.
*> \endverbatim
*>
*> \param[out] THETA
*> \verbatim
*> THETA is DOUBLE PRECISION array, dimension (Q)
*> The entries of the bidiagonal blocks B11, B21 are defined by
*> THETA and PHI. See Further Details.
*> \endverbatim
*>
*> \param[out] PHI
*> \verbatim
*> PHI is DOUBLE PRECISION array, dimension (Q-1)
*> The entries of the bidiagonal blocks B11, B21 are defined by
*> THETA and PHI. See Further Details.
*> \endverbatim
*>
*> \param[out] TAUP1
*> \verbatim
*> TAUP1 is COMPLEX*16 array, dimension (M-Q)
*> The scalar factors of the elementary reflectors that define
*> P1.
*> \endverbatim
*>
*> \param[out] TAUP2
*> \verbatim
*> TAUP2 is COMPLEX*16 array, dimension (M-Q)
*> The scalar factors of the elementary reflectors that define
*> P2.
*> \endverbatim
*>
*> \param[out] TAUQ1
*> \verbatim
*> TAUQ1 is COMPLEX*16 array, dimension (Q)
*> The scalar factors of the elementary reflectors that define
*> Q1.
*> \endverbatim
*>
*> \param[out] PHANTOM
*> \verbatim
*> PHANTOM is COMPLEX*16 array, dimension (M)
*> The routine computes an M-by-1 column vector Y that is
*> orthogonal to the columns of [ X11; X21 ]. PHANTOM(1:P) and
*> PHANTOM(P+1:M) contain Householder vectors for Y(1:P) and
*> Y(P+1:M), respectively.
*> \endverbatim
*>
*> \param[out] WORK
*> \verbatim
*> WORK is COMPLEX*16 array, dimension (LWORK)
*> \endverbatim
*>
*> \param[in] LWORK
*> \verbatim
*> LWORK is INTEGER
*> The dimension of the array WORK. LWORK >= M-Q.
*>
*> If LWORK = -1, then a workspace query is assumed; the routine
*> only calculates the optimal size of the WORK array, returns
*> this value as the first entry of the WORK array, and no error
*> message related to LWORK is issued by XERBLA.
*> \endverbatim
*>
*> \param[out] INFO
*> \verbatim
*> INFO is INTEGER
*> = 0: successful exit.
*> < 0: if INFO = -i, the i-th argument had an illegal value.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup unbdb4
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> The upper-bidiagonal blocks B11, B21 are represented implicitly by
*> angles THETA(1), ..., THETA(Q) and PHI(1), ..., PHI(Q-1). Every entry
*> in each bidiagonal band is a product of a sine or cosine of a THETA
*> with a sine or cosine of a PHI. See [1] or ZUNCSD for details.
*>
*> P1, P2, and Q1 are represented as products of elementary reflectors.
*> See ZUNCSD2BY1 for details on generating P1, P2, and Q1 using ZUNGQR
*> and ZUNGLQ.
*> \endverbatim
*
*> \par References:
* ================
*>
*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
*> Algorithms, 50(1):33-65, 2009.
*>
* =====================================================================
SUBROUTINE ZUNBDB4( M, P, Q, X11, LDX11, X21, LDX21, THETA,
$ PHI,
$ TAUP1, TAUP2, TAUQ1, PHANTOM, WORK, LWORK,
$ INFO )
*
* -- LAPACK computational routine --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
*
* .. Scalar Arguments ..
INTEGER INFO, LWORK, M, P, Q, LDX11, LDX21
* ..
* .. Array Arguments ..
DOUBLE PRECISION PHI(*), THETA(*)
COMPLEX*16 PHANTOM(*), TAUP1(*), TAUP2(*), TAUQ1(*),
$ WORK(*), X11(LDX11,*), X21(LDX21,*)
* ..
*
* ====================================================================
*
* .. Parameters ..
COMPLEX*16 NEGONE, ONE, ZERO
PARAMETER ( NEGONE = (-1.0D0,0.0D0), ONE = (1.0D0,0.0D0),
$ ZERO = (0.0D0,0.0D0) )
* ..
* .. Local Scalars ..
DOUBLE PRECISION C, S
INTEGER CHILDINFO, I, ILARF, IORBDB5, J, LLARF,
$ LORBDB5, LWORKMIN, LWORKOPT
LOGICAL LQUERY
* ..
* .. External Subroutines ..
EXTERNAL ZLARF1F, ZLARFGP, ZUNBDB5, ZDROT, ZSCAL,
$ ZLACGV,
$ XERBLA
* ..
* .. External Functions ..
DOUBLE PRECISION DZNRM2
EXTERNAL DZNRM2
* ..
* .. Intrinsic Function ..
INTRINSIC ATAN2, COS, MAX, SIN, SQRT
* ..
* .. Executable Statements ..
*
* Test input arguments
*
INFO = 0
LQUERY = LWORK .EQ. -1
*
IF( M .LT. 0 ) THEN
INFO = -1
ELSE IF( P .LT. M-Q .OR. M-P .LT. M-Q ) THEN
INFO = -2
ELSE IF( Q .LT. M-Q .OR. Q .GT. M ) THEN
INFO = -3
ELSE IF( LDX11 .LT. MAX( 1, P ) ) THEN
INFO = -5
ELSE IF( LDX21 .LT. MAX( 1, M-P ) ) THEN
INFO = -7
END IF
*
* Compute workspace
*
IF( INFO .EQ. 0 ) THEN
ILARF = 2
LLARF = MAX( Q-1, P-1, M-P-1 )
IORBDB5 = 2
LORBDB5 = Q
LWORKOPT = ILARF + LLARF - 1
LWORKOPT = MAX( LWORKOPT, IORBDB5 + LORBDB5 - 1 )
LWORKMIN = LWORKOPT
WORK(1) = LWORKOPT
IF( LWORK .LT. LWORKMIN .AND. .NOT.LQUERY ) THEN
INFO = -14
END IF
END IF
IF( INFO .NE. 0 ) THEN
CALL XERBLA( 'ZUNBDB4', -INFO )
RETURN
ELSE IF( LQUERY ) THEN
RETURN
END IF
*
* Reduce columns 1, ..., M-Q of X11 and X21
*
DO I = 1, M-Q
*
IF( I .EQ. 1 ) THEN
DO J = 1, M
PHANTOM(J) = ZERO
END DO
CALL ZUNBDB5( P, M-P, Q, PHANTOM(1), 1, PHANTOM(P+1), 1,
$ X11, LDX11, X21, LDX21, WORK(IORBDB5),
$ LORBDB5, CHILDINFO )
CALL ZSCAL( P, NEGONE, PHANTOM(1), 1 )
CALL ZLARFGP( P, PHANTOM(1), PHANTOM(2), 1, TAUP1(1) )
CALL ZLARFGP( M-P, PHANTOM(P+1), PHANTOM(P+2), 1,
$ TAUP2(1) )
THETA(I) = ATAN2( DBLE( PHANTOM(1) ), DBLE( PHANTOM(P+1) ) )
C = COS( THETA(I) )
S = SIN( THETA(I) )
CALL ZLARF1F( 'L', P, Q, PHANTOM(1), 1, CONJG(TAUP1(1)),
$ X11,
$ LDX11, WORK(ILARF) )
CALL ZLARF1F( 'L', M-P, Q, PHANTOM(P+1), 1,
$ CONJG(TAUP2(1)),
$ X21, LDX21, WORK(ILARF) )
ELSE
CALL ZUNBDB5( P-I+1, M-P-I+1, Q-I+1, X11(I,I-1), 1,
$ X21(I,I-1), 1, X11(I,I), LDX11, X21(I,I),
$ LDX21, WORK(IORBDB5), LORBDB5, CHILDINFO )
CALL ZSCAL( P-I+1, NEGONE, X11(I,I-1), 1 )
CALL ZLARFGP( P-I+1, X11(I,I-1), X11(I+1,I-1), 1,
$ TAUP1(I) )
CALL ZLARFGP( M-P-I+1, X21(I,I-1), X21(I+1,I-1), 1,
$ TAUP2(I) )
THETA(I) = ATAN2( DBLE( X11(I,I-1) ), DBLE( X21(I,I-1) ) )
C = COS( THETA(I) )
S = SIN( THETA(I) )
CALL ZLARF1F( 'L', P-I+1, Q-I+1, X11(I,I-1), 1,
$ CONJG(TAUP1(I)), X11(I,I), LDX11,
$ WORK(ILARF) )
CALL ZLARF1F( 'L', M-P-I+1, Q-I+1, X21(I,I-1), 1,
$ CONJG(TAUP2(I)), X21(I,I), LDX21,
$ WORK(ILARF) )
END IF
*
CALL ZDROT( Q-I+1, X11(I,I), LDX11, X21(I,I), LDX21, S, -C )
CALL ZLACGV( Q-I+1, X21(I,I), LDX21 )
CALL ZLARFGP( Q-I+1, X21(I,I), X21(I,I+1), LDX21, TAUQ1(I) )
C = DBLE( X21(I,I) )
CALL ZLARF1F( 'R', P-I, Q-I+1, X21(I,I), LDX21, TAUQ1(I),
$ X11(I+1,I), LDX11, WORK(ILARF) )
CALL ZLARF1F( 'R', M-P-I, Q-I+1, X21(I,I), LDX21, TAUQ1(I),
$ X21(I+1,I), LDX21, WORK(ILARF) )
CALL ZLACGV( Q-I+1, X21(I,I), LDX21 )
IF( I .LT. M-Q ) THEN
S = SQRT( DZNRM2( P-I, X11(I+1,I), 1 )**2
$ + DZNRM2( M-P-I, X21(I+1,I), 1 )**2 )
PHI(I) = ATAN2( S, C )
END IF
*
END DO
*
* Reduce the bottom-right portion of X11 to [ I 0 ]
*
DO I = M - Q + 1, P
CALL ZLACGV( Q-I+1, X11(I,I), LDX11 )
CALL ZLARFGP( Q-I+1, X11(I,I), X11(I,I+1), LDX11, TAUQ1(I) )
CALL ZLARF1F( 'R', P-I, Q-I+1, X11(I,I), LDX11, TAUQ1(I),
$ X11(I+1,I), LDX11, WORK(ILARF) )
CALL ZLARF1F( 'R', Q-P, Q-I+1, X11(I,I), LDX11, TAUQ1(I),
$ X21(M-Q+1,I), LDX21, WORK(ILARF) )
CALL ZLACGV( Q-I+1, X11(I,I), LDX11 )
END DO
*
* Reduce the bottom-right portion of X21 to [ 0 I ]
*
DO I = P + 1, Q
CALL ZLACGV( Q-I+1, X21(M-Q+I-P,I), LDX21 )
CALL ZLARFGP( Q-I+1, X21(M-Q+I-P,I), X21(M-Q+I-P,I+1),
$ LDX21,
$ TAUQ1(I) )
CALL ZLARF1F( 'R', Q-I, Q-I+1, X21(M-Q+I-P,I), LDX21,
$ TAUQ1(I),
$ X21(M-Q+I-P+1,I), LDX21, WORK(ILARF) )
CALL ZLACGV( Q-I+1, X21(M-Q+I-P,I), LDX21 )
END DO
*
RETURN
*
* End of ZUNBDB4
*
END
```
|
```toml
[package]
org = "lstest"
name = "project"
version = "0.1.0"
[build-options]
observabilityIncluded = false
```
|
```objective-c
/*
* ezSAT -- A simple and easy to use CNF generator for SAT solvers
*
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
#ifndef EZMINISAT_H
#define EZMINISAT_H
#define EZMINISAT_SIMPSOLVER 1
#define EZMINISAT_VERBOSITY 0
#define EZMINISAT_INCREMENTAL 1
#include "ezsat.h"
#include <time.h>
// minisat is using limit macros and format macros in their headers that
// can be the source of some troubles when used from c++11. thefore we
// don't force ezSAT users to use minisat headers..
namespace Minisat {
class Solver;
class SimpSolver;
}
class ezMiniSAT : public ezSAT
{
private:
#if EZMINISAT_SIMPSOLVER
typedef Minisat::SimpSolver Solver;
#else
typedef Minisat::Solver Solver;
#endif
Solver *minisatSolver;
std::vector<int> minisatVars;
bool foundContradiction;
#if EZMINISAT_SIMPSOLVER && EZMINISAT_INCREMENTAL
std::set<int> cnfFrozenVars;
#endif
#ifndef _WIN32
static ezMiniSAT *alarmHandlerThis;
static clock_t alarmHandlerTimeout;
static void alarmHandler(int);
#endif
public:
ezMiniSAT();
virtual ~ezMiniSAT();
virtual void clear();
#if EZMINISAT_SIMPSOLVER && EZMINISAT_INCREMENTAL
virtual void freeze(int id);
virtual bool eliminated(int idx);
#endif
virtual bool solver(const std::vector<int> &modelExpressions, std::vector<bool> &modelValues, const std::vector<int> &assumptions);
};
#endif
```
|
```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.engine.impl.cmd;
import java.io.Serializable;
import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.api.FlowableIllegalArgumentException;
import org.flowable.common.engine.api.FlowableObjectNotFoundException;
import org.flowable.common.engine.impl.interceptor.Command;
import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.engine.impl.util.CommandContextUtil;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.flowable.task.service.impl.persistence.entity.HistoricTaskInstanceEntity;
/**
* @author Tom Baeyens
*/
public class DeleteHistoricTaskInstanceCmd implements Command<Object>, Serializable {
private static final long serialVersionUID = 1L;
protected String taskId;
public DeleteHistoricTaskInstanceCmd(String taskId) {
this.taskId = taskId;
}
@Override
public Object execute(CommandContext commandContext) {
if (taskId == null) {
throw new FlowableIllegalArgumentException("taskId is null");
}
// Check if task is completed
HistoricTaskInstanceEntity historicTaskInstance = CommandContextUtil.getHistoricTaskService().getHistoricTask(taskId);
if (historicTaskInstance == null) {
throw new FlowableObjectNotFoundException("No historic task instance found with id: " + taskId, HistoricTaskInstance.class);
}
if (historicTaskInstance.getEndTime() == null) {
throw new FlowableException("task does not have an endTime, cannot delete " + historicTaskInstance);
}
CommandContextUtil.getHistoryManager(commandContext).recordHistoricTaskDeleted(historicTaskInstance);
return null;
}
}
```
|
Luis Antonio Avilés Ferreiro (born 3 March 2002) is a Mexican sprinter specializing in the 400m.
Avilés won a silver medal at the 2021 World Athletics U20 Championships and a gold medal at the Athletics at the 2021 Junior Pan American Games.
Personal bests
References
External links
Sports.org Bio
2002 births
Living people
Mexican male sprinters
Youth Olympic gold medalists for Mexico
Youth Olympic gold medalists in athletics (track and field)
Athletes (track and field) at the 2018 Summer Youth Olympics
People from Cuautla
Sportspeople from Morelos
21st-century Mexican people
|
```kotlin
package net.corda.serialization.internal
import net.corda.core.contracts.ContractAttachment
import net.corda.core.identity.CordaX500Name
import net.corda.core.serialization.*
import net.corda.core.serialization.internal.CheckpointSerializationContext
import net.corda.core.serialization.internal.checkpointDeserialize
import net.corda.core.serialization.internal.checkpointSerialize
import net.corda.testing.contracts.DummyContract
import net.corda.testing.core.internal.CheckpointSerializationEnvironmentRule
import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.MockServices
import org.apache.commons.lang3.ArrayUtils.EMPTY_BYTE_ARRAY
import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.Assert.assertArrayEquals
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import kotlin.test.assertEquals
class ContractAttachmentSerializerTest {
@Rule
@JvmField
val testCheckpointSerialization = CheckpointSerializationEnvironmentRule()
private lateinit var contextWithToken: CheckpointSerializationContext
private val mockServices = MockServices(emptyList(), CordaX500Name("MegaCorp", "London", "GB"), rigorousMock())
@Before
fun setup() {
contextWithToken = testCheckpointSerialization.checkpointSerializationContext.withTokenContext(
CheckpointSerializeAsTokenContextImpl(
Any(),
testCheckpointSerialization.checkpointSerializer,
testCheckpointSerialization.checkpointSerializationContext,
mockServices))
}
@Test(timeout=300_000)
fun `write contract attachment and read it back`() {
val contractAttachment = ContractAttachment(GeneratedAttachment(EMPTY_BYTE_ARRAY, "test"), DummyContract.PROGRAM_ID)
// no token context so will serialize the whole attachment
val serialized = contractAttachment.checkpointSerialize()
val deserialized = serialized.checkpointDeserialize()
assertEquals(contractAttachment.id, deserialized.attachment.id)
assertEquals(contractAttachment.contract, deserialized.contract)
assertEquals(contractAttachment.additionalContracts, deserialized.additionalContracts)
assertArrayEquals(contractAttachment.open().readBytes(), deserialized.open().readBytes())
}
@Test(timeout=300_000)
fun `write contract attachment and read it back using token context`() {
val attachment = GeneratedAttachment("test".toByteArray(), "test")
mockServices.attachments.importAttachment(attachment.open(), "test", null)
val contractAttachment = ContractAttachment(attachment, DummyContract.PROGRAM_ID)
val serialized = contractAttachment.checkpointSerialize(contextWithToken)
val deserialized = serialized.checkpointDeserialize(contextWithToken)
assertEquals(contractAttachment.id, deserialized.attachment.id)
assertEquals(contractAttachment.contract, deserialized.contract)
assertEquals(contractAttachment.additionalContracts, deserialized.additionalContracts)
assertArrayEquals(contractAttachment.open().readBytes(), deserialized.open().readBytes())
}
@Test(timeout=300_000)
fun `check only serialize attachment id and contract class name when using token context`() {
val largeAttachmentSize = 1024 * 1024
val attachment = GeneratedAttachment(ByteArray(largeAttachmentSize), "test")
mockServices.attachments.importAttachment(attachment.open(), "test", null)
val contractAttachment = ContractAttachment(attachment, DummyContract.PROGRAM_ID)
val serialized = contractAttachment.checkpointSerialize(contextWithToken)
assertThat(serialized.size).isLessThan(largeAttachmentSize)
}
@Test(timeout=300_000)
fun `throws when missing attachment when using token context`() {
val attachment = GeneratedAttachment("test".toByteArray(), "test")
// don't importAttachment in mockService
val contractAttachment = ContractAttachment(attachment, DummyContract.PROGRAM_ID)
val serialized = contractAttachment.checkpointSerialize(contextWithToken)
val deserialized = serialized.checkpointDeserialize(contextWithToken)
assertThatThrownBy { deserialized.attachment.open() }.isInstanceOf(MissingAttachmentsException::class.java)
}
@Test(timeout=300_000)
fun `check attachment in deserialize is lazy loaded when using token context`() {
val attachment = GeneratedAttachment(EMPTY_BYTE_ARRAY, "test")
// don't importAttachment in mockService
val contractAttachment = ContractAttachment(attachment, DummyContract.PROGRAM_ID)
val serialized = contractAttachment.checkpointSerialize(contextWithToken)
serialized.checkpointDeserialize(contextWithToken)
// MissingAttachmentsException thrown if we try to open attachment
}
}
```
|
The Basilica of the Sacred Heart of Jesus is a Roman Catholic church located at 353 Peachtree Street NE in downtown Atlanta, Georgia, United States. The current building was completed in 1898. It was added to the National Register of Historic Places in 1976 and was designated a minor basilica in 2010.
The church traces its origins to 1880, when the parish of Saints Peter and Paul was established to cover the northern part of the city. In 1897, the Marist Fathers took over responsibility for the parish and began constructing the current church, which was designed by Walter T. Downing with elements of French Romanesque and Romanesque Revival architecture. It was dedicated the following year as the Church of the Sacred Heart of Jesus, leading to the new name of the parish. The church saw steady growth during its first few decades and by 1917 was one of the largest parishes operated by the Marists. This group returned operation of the church to the Archdiocese of Atlanta in the 1960s. In the following decades, the area around the church went through a period of decline, and there were concerns that the church would close. However, it continued to operate and saw a growth in its congregation. In 1995, Mother Teresa attended Mass at the church and the building celebrated its 100th anniversary three years later. By 2010, the church had a congregation of about 1,300 families, and it is one of the few buildings constructed around the turn of the 20th century that is still standing in Atlanta.
History
Parish of Saints Peter and Paul
In the late 1800s, the population of Atlanta increased as the city's development grew northward from its downtown. With this growth came an increased demand from Catholics for a church in the northern part of the city, which at the time was within the parish served by the Church of the Immaculate Conception. On February 28, 1880, Bishop William Hickley Gross of the Diocese of Savannah established a new parish for the area known as the parish of Saints Peter and Paul. This parish, which was carved out of territory that had previously been served by Immaculate Conception, covered all of the city north of Edgewood Avenue, the Georgia Railroad, and the Western and Atlantic Railroad. Soon after its formation, a wooden structure was quickly erected on Marietta Street to serve as the parish's church building. The year of its formation, this parish had about 250 members in its congregation. The parish saw its first baptism on April 6 1880, and later that year the Sisters of Mercy established a parish school that had about 125 students. However, the school closed in 1892 due to financial difficulties.
Establishment of Sacred Heart
In 1897, Bishop Thomas Albert Andrew Becker of Savannah asked the Marist Fathers to help in the diocese's efforts in Atlanta and its missions in north Georgia, a territory that covered approximately . The Marists accepted on May 12 and by the following month had appointed a new pastor for the parish. Upon taking over operations for Saints Peter and Paul, they determined that the current buildings were in poor condition and in an unsuitable location, and they began to plan the construction of a new church. On July 14, they spent $12,000 to purchase land at the corner of Peachtree Street and Ivy Street for this new building, which was to be designed by Walter T. Downing, an Atlanta-based architect. The Marists began a fundraising campaign for the new church and raised $10,851. Construction commenced in September, with Mass continuing to be held in the wooden building until the new building was completed. Work on the new building lasted until 1898, and the cost significantly exceeded the amount that had been raised by the Marists. On May 1 1898, the newly completed church building was dedicated by Becker to the Sacred Heart of Jesus, leading to the parish being renamed accordingly. Following this, the old wooden building was abandoned and eventually sold in 1905.
In 1898, the parish had a congregation of about 340 people. That same year, John Edward Gunn became the pastor of the Church of the Sacred Heart of Jesus. During its early years under Gunn, the new church grew at a rapid rate, and by 1910, the church had a congregation of about 1,250 people. The church catered to a primarily Irish Catholic population, which included Maybelle Stephens Mitchell, a noted suffragist who was a member of the church in the early 1900s. In 1905, the church established a Sunday school in its basement, and in 1909, members of the Sisters of St. Joseph opened a parochial school in the parish. Additionally, physical improvements continued to be made to the building, with stained glass windows installed in 1902 and the interior decorated and painted in 1907. In 1911, Gunn left his position as pastor to become the bishop of the Diocese of Natchez, with his ordination to the bishopric taking place at the church on August 29. The following year, Our Lady of Lourdes Catholic Church was established within Sacred Heart's parish territory as the first "non-territorial" Catholic church in the city, with a mission to serve the city's African American population.
In 1913, a new rectory was built for Sacred Heart at a cost of $40,000, and this building was blessed on March 19 of that year. At this time, the congregation stood at about 2,000 members, and the parochial school had an enrollment of 260. Additionally, the Marists had established missions throughout the northern part of the state, primarily in the towns along the several railroad lines that crossed the region. By 1917, Sacred Heart was one of the largest churches operated by the Marists, with ten priests serving a membership of about 2,500 to 3,000 divided between the main church in Atlanta and the several missions that they were operating in north Georgia. On June 9, 1920, the church was formally consecrated by Bishop Edward Patrick Allen of the Diocese of Mobile, becoming the first Catholic church in Atlanta to have such a distinction. In 1924, a dedicated building for the parochial school was built adjacent to the church by the Atlanta-based architectural firm of Pringle and Smith. In 1938, the church's interior underwent a significant renovation project, and following the completion of this project, the building was blessed by Bishop Gerald O'Hara of Savannah-Atlanta on September 11.
Late 20th century
In 1961, the exterior of the church was refaced. Several years later, on September 5 1965, the church returned to the administration of the Archdiocese of Atlanta as the Marist Fathers refocused their efforts in the city on operating the Our Lady of the Assumption parish. After about a year of negotiations between the Marists and the archdiocese, this transfer was finalized on September 5 1966. On May 13 1976, the church was added to the National Register of Historic Places, a federal list of historic sites in the United States. Through the 1970s and 1980s, the area surrounding the church went through a period of decline, and there were concerns that the church might close. However, the church continued to operate, and it saw several renovation and construction projects during this time, including the completion of a new rectory in 1977 and an extensive interior renovation that commenced in 1978. During this renovation, the church was the target of an arson attack that damaged its basement, but the rest of the church was relatively unharmed, and the damages were repaired shortly thereafter. On April 10, 1990, the government of Atlanta declared the church a Landmark Building, a designation to promote historic preservation in the city. On June 12, 1995, Mother Teresa visited the church during a trip to Atlanta and took Mass while there. Several years later, the church celebrated its 100th anniversary with a Mass on May 3 1998.
Elevation to a minor basilica
By 2010, the church had seen a large growth in its congregation over the past several years and had a membership of about 1,300 families. That same year, the church received the designation of minor basilica from the Dicastery for Divine Worship and the Discipline of the Sacraments, giving the church certain privileges not held by regular churches. The idea for petitioning the organization for this status had been floated about ten years prior by the church's pastor, but no work was carried out for this goal until about 2007. The pastor then made a request to the archbishop of Atlanta, who approved it and forwarded it to the United States Conference of Catholic Bishops, who further forwarded it to the Catholic Church's administration in the Holy See. The title was granted on February 22, making it the 67th basilica in the United States and the first in both the archdiocese and the state. Today, the building is one of the few remaining structures in the area that was built around the turn of the 20th century, and the parish is one of the oldest operating in the archdiocese.
Architecture and design
The church is located at 353 Peachtree Street NE, at the intersection of that road and Peachtree Center Avenue (formerly known as Ivy Street). The building's design has elements of both the French Romanesque and Romanesque Revival styles, with architect Robert Michael Craig calling it "one of the finest Romanesque Revival churches in the South". The main building consists of two stories and has a rectangular layout. Its exterior is primarily of brick and terracotta, with additional ornamentation in marble. The front of the building consists of an arcade featuring three doorways within rounded arch entryways. Above these entryways is a flat facade with a large rose window that includes a design of the Sacred Heart. While the front entrance initially had five granite steps, these were removed in 1912 after Ivy Street was regraded, making them unnecessary. On either side of the front arcade are two octagonal towers measuring tall, both of which are topped with louvered belfries and pavilion roofs.
The nave of the building consists of high arches leading to the sanctuary, which features a baldachin displaying a crucifix in life-size. The baldachin covers the church tabernacle. Above the tabernacle, in the apse, is a depiction of the Sacred Heart of Jesus. On the arch separating the nave from the sanctuary are five symbols. At the top of the arch is Jesus depicted as the Lamb of God, while other symbols represent the Four Evangelists: a lion (Mark the Evangelist), an eagle (John the Evangelist), a bull (Luke the Evangelist), and a man (Matthew the Apostle). Closer to ground-level, the arch depicts the seal of the Society of Mary and the seal for the Archdiocese. 28 stained glass windows line the nave, all designed by the Mayer Studios in Munich, and it is topped by a gable roof.
Marist College
In 1901, Pastor Gunn purchased land adjacent to the church to serve as the location for a boys' military academy operated by Sacred Heart. Construction on this institution, called Marist College, began in June of that year and it opened on October 2, offering a primarily high school curriculum with several college-level courses. These school's college courses were discontinued around 1905. The school building itself consisted of three stories plus a basement and there was a gymnasium on the school's campus. During the 1907–1908 school year, it had an enrollment of about 127 students. The school saw continued growth during its early years, and in 1914 it had an enrollment of 140. During World War I, 85 percent of the school's alumni who joined the United States Army became commissioned officers. According to a 1917 history book, the school was accredited by the Catholic University of America and the University of the South. That same year, the school established a Reserve Officers' Training Corps program. Between 1922 and 1933, the school operated a summer camp on Lake Rabun in Lakemont, Georgia. By the 1950s, the school had grown to about 225 students, and in 1957, property was purchased north of the city to create a new campus. In 1962, the school relocated to this new location and was renamed Marist School. The building near the church was eventually abandoned in 1976 and was later demolished.
Notes
References
Sources
Further reading
External links
1898 establishments in Georgia (U.S. state)
19th-century Roman Catholic church buildings in the United States
Basilica churches in the United States
Churches on the National Register of Historic Places in Georgia (U.S. state)
Minor basilicas in the United States
National Register of Historic Places in Atlanta
Roman Catholic Archdiocese of Atlanta
Roman Catholic churches completed in 1898
Roman Catholic churches in Atlanta
Romanesque Revival church buildings in Georgia (U.S. state)
|
```xml
import {
PrimaryGeneratedColumn,
CreateDateColumn,
UpdateDateColumn,
} from "../../../../src"
export class BaseEntity {
@PrimaryGeneratedColumn()
id: number
@CreateDateColumn()
createdAt: Date
@UpdateDateColumn()
updatedAt: Date
}
```
|
Year 405 BC was a year of the pre-Julian Roman calendar. At the time, it was known as the Year of the Tribunate of Barbatus, Capitolinus, Cincinnatus, Medullinus, Iullus and Mamercinus (or, less frequently, year 349 Ab urbe condita). The denomination 405 BC for this year has been used since the early medieval period, when the Anno Domini calendar era became the prevalent method in Europe for naming years.
Events
By place
Greece
After their victory in the Battle of Arginusae over the Spartans, the Athenian fleet follows the reappointed Spartan admiral, Lysander, to the Hellespont. The Athenian fleet under Admiral Conon is destroyed by the Spartans under Lysander in the Battle of Aegospotami in the Sea of Marmara and Conon flees to Cyprus.
The Spartan king Pausanias lays siege to Athens while Lysander's fleet blockades Piraeus. This action closes the grain route through the Hellespont, thereby starving Athens.
While the Peloponnesians besiege Athens, Theramenes tries to negotiate with Lysander. He is away for three months while Athens is being reduced to starvation. Then he heads the embassy that negotiates the terms of capitulation to the Spartans.
Sicily
Dionysius the Elder rises to power as the tyrant of Syracuse. He makes peace with the Carthaginian general, Himilco (whose army has been weakened by the plague), and fortifies Syracuse. This treaty leaves Carthage in control of most of Sicily.
Dionysius the Elder ruthlessly consolidates and expands his power. He builds a wall around Syracuse and fortifies Epipolae. The Greek citizens of Naxos, Catana, and Leontini are removed from their cities; many of them are enslaved and their homes are given to Sicilian and Italian mercenaries. Dionysius prepares his army to fight against Carthage, which now occupies western and southern Sicily.
By topic
Drama
January – Aristophanes' play The Frogs is performed.
March/April – Euripides' The Bacchae and Iphigeneia at Aulis are performed posthumously as part of a tetralogy at the City Dionysia festival and win first prize.
Art
The Erechtheum, which includes The Porch of Maidens (Caryatid Porch), is completed in the Ionian style on the Acropolis in Athens after 16 years of construction.
Births
Deaths
Philolaus, Greek mathematician and philosopher (approximate date) (b. c. 480 BC)
References
|
Cortin may refer to:
Cortin, a synonym for corticosteroid
Cortin, a trade name for the antifungal drug clioquinol
|
```javascript
/*
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated, or distributed except according to the terms contained in the
* LICENSE file.
*
* Removal or modification of this copyright notice is prohibited.
*/
const { Suite } = require('benchmark');
const { readString, writeString } = require('../dist-node/string');
const suite = new Suite();
const stringBuffer = Buffer.from('>!test@123test#', 'utf8');
suite
.add('readString', () => {
readString(stringBuffer, 0);
})
.add('writeString', () => {
writeString('>!test@123test#');
})
.on('cycle', function (event) {
console.log(String(event.target));
})
.run({ async: true });
/**
* String write benchmark results
* writeString x 1,808,985 ops/sec 1.03% (87 runs sampled)
*/
```
|
```python
import logging
import os
import pytest
import structlog
from raiden.exceptions import ConfigurationError
from raiden.log_config import LogFilter, configure_logging
def test_log_filter():
rules = {"": "INFO"}
filter_ = LogFilter(rules, default_level="INFO")
assert filter_.should_log("test", "DEBUG") is False
assert filter_.should_log("test", "INFO") is True
assert filter_.should_log("raiden", "DEBUG") is False
assert filter_.should_log("raiden", "INFO") is True
assert filter_.should_log("raiden.cli", "DEBUG") is False
assert filter_.should_log("raiden.cli", "INFO") is True
rules = {"": "WARN"}
filter_ = LogFilter(rules, default_level="INFO")
assert filter_.should_log("test", "INFO") is False
assert filter_.should_log("test", "WARN") is True
assert filter_.should_log("raiden", "INFO") is False
assert filter_.should_log("raiden", "WARN") is True
assert filter_.should_log("raiden.cli", "INFO") is False
assert filter_.should_log("raiden.cli", "WARN") is True
rules = {"test": "WARN"}
filter_ = LogFilter(rules, default_level="INFO")
assert filter_.should_log("test", "INFO") is False
assert filter_.should_log("test", "WARN") is True
assert filter_.should_log("raiden", "DEBUG") is False
assert filter_.should_log("raiden", "INFO") is True
assert filter_.should_log("raiden", "WARN") is True
assert filter_.should_log("raiden.cli", "DEBUG") is False
assert filter_.should_log("raiden.cli", "INFO") is True
assert filter_.should_log("raiden.cli", "WARN") is True
rules = {"raiden": "DEBUG"}
filter_ = LogFilter(rules, default_level="INFO")
assert filter_.should_log("test", "DEBUG") is False
assert filter_.should_log("test", "INFO") is True
assert filter_.should_log("raiden", "DEBUG") is True
assert filter_.should_log("raiden.cli", "DEBUG") is True
rules = {"raiden.network": "DEBUG"}
filter_ = LogFilter(rules, default_level="INFO")
assert filter_.should_log("test", "DEBUG") is False
assert filter_.should_log("test", "INFO") is True
assert filter_.should_log("raiden", "DEBUG") is False
assert filter_.should_log("raiden", "INFO") is True
assert filter_.should_log("raiden.network", "DEBUG") is True
rules = {
"": "WARN",
"raiden": "DEBUG",
"raiden.network": "INFO",
"raiden.network.transport": "DEBUG",
}
filter_ = LogFilter(rules, default_level="INFO")
assert filter_.should_log("raiden.network.transport.matrix", "DEBUG") is True
assert filter_.should_log("raiden.network.transport", "DEBUG") is True
assert filter_.should_log("raiden.network", "DEBUG") is False
assert filter_.should_log("raiden.network", "INFO") is True
assert filter_.should_log("raiden.network", "INFO") is True
assert filter_.should_log("raiden", "DEBUG") is True
assert filter_.should_log("", "DEBUG") is False
assert filter_.should_log("", "INFO") is False
assert filter_.should_log("", "WARN") is True
assert filter_.should_log("other", "DEBUG") is False
assert filter_.should_log("other", "WARN") is True
rules = {"raiden": "DEBUG", "raiden.network": "INFO", "raiden.network.transport": "DEBUG"}
filter_ = LogFilter(rules, default_level="INFO")
assert filter_.should_log("raiden.network.transport.matrix", "DEBUG") is True
assert filter_.should_log("raiden.network.transport", "DEBUG") is True
assert filter_.should_log("raiden.network", "DEBUG") is False
assert filter_.should_log("raiden.network", "INFO") is True
assert filter_.should_log("raiden.network", "INFO") is True
assert filter_.should_log("raiden", "DEBUG") is True
assert filter_.should_log("", "DEBUG") is False
assert filter_.should_log("", "INFO") is True
assert filter_.should_log("", "WARN") is True
assert filter_.should_log("other", "DEBUG") is False
assert filter_.should_log("other", "INFO") is True
assert filter_.should_log("other", "WARN") is True
@pytest.mark.parametrize("module", ["", "raiden", "raiden.network"])
@pytest.mark.parametrize("level", ["DEBUG", "WARNING"])
@pytest.mark.parametrize("logger", ["test", "raiden", "raiden.network"])
@pytest.mark.parametrize("disabled_debug", [True, False])
def test_basic_logging(capsys, module, level, logger, disabled_debug, tmpdir):
configure_logging(
{module: level},
disable_debug_logfile=disabled_debug,
debug_log_file_path=str(tmpdir / "raiden-debug.log"),
colorize=False,
)
log = structlog.get_logger(logger).bind(foo="bar")
log.debug("test event", key="value")
captured = capsys.readouterr()
no_log = level != "DEBUG" or module not in logger
if no_log:
assert captured.err == ""
else:
assert "test event" in captured.err
assert "key=value" in captured.err
assert "foo=bar" in captured.err
def test_debug_logfile_invalid_dir():
"""Test that providing an invalid directory for the debug logfile throws an error"""
with pytest.raises(ConfigurationError):
configure_logging(
{"": "DEBUG"}, debug_log_file_path=os.path.join("notarealdir", "raiden-debug.log")
)
def test_redacted_request(capsys, tmpdir):
configure_logging({"": "DEBUG"}, debug_log_file_path=str(tmpdir / "raiden-debug.log"))
token = "my_access_token123"
# use logging, as 'urllib3/requests'
log = logging.getLogger("urllib3.connectionpool")
log.debug("Starting new HTTPS connection (1): example.org:443")
log.debug(f'path_to_url "GET /endpoint?access_token={token} HTTP/1.1" 200 403')
captured = capsys.readouterr()
assert token not in captured.err
assert "access_token=<redacted>" in captured.err
def test_that_secret_is_redacted(capsys, tmpdir):
configure_logging({"": "DEBUG"}, debug_log_file_path=str(tmpdir / "raiden-debug.log"))
log = structlog.get_logger("raiden.network.transport.matrix.transport")
secret = your_sha256_hash4c"
data = f"""{{"secret": "{secret}", "signature": your_sha256_hashyour_sha256_hash081b", "message_identifier": "3887369794757038169", "type": "RevealSecret"}}""" # noqa
log.debug("Send raw", data=data.replace("\n", "\\n"))
captured = capsys.readouterr()
assert secret not in captured.err
assert '"secret": "<redacted>"' in captured.err
```
|
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Vue Auth 2.x Demo</title>
</head>
<body>
<noscript>
<strong>
We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
<div id="app"></div>
</body>
</html>
```
|
Bruce Warwick Smith (born 4 January 1959) is a former New Zealand rugby union player. A wing, Smith represented Waikato and Bay of Plenty at a provincial level, and was a member of the New Zealand national side, the All Blacks, in 1983 and 1984. He played 10 matches for the All Blacks including three internationals.
References
1959 births
Living people
People from Wairoa
New Zealand rugby union players
New Zealand international rugby union players
Waikato rugby union players
Bay of Plenty rugby union players
Rugby union wings
Male rugby sevens players
Rugby union players from the Hawke's Bay Region
|
```protocol buffer
syntax = "proto3";
package envoy.config.ratelimit.v2;
import "envoy/api/v2/core/grpc_service.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.ratelimit.v2";
option java_outer_classname = "RlsProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/ratelimit/v2;ratelimitv2";
option (udpa.annotations.file_status).package_version_status = FROZEN;
// [#protodoc-title: Rate limit service]
// Rate limit :ref:`configuration overview <config_rate_limit_service>`.
message RateLimitServiceConfig {
reserved 1, 3;
// Specifies the gRPC service that hosts the rate limit service. The client
// will connect to this cluster when it needs to make rate limit service
// requests.
api.v2.core.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}];
}
```
|
```javascript
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
'use strict';
/**
* Retrieve the JSDoc comment associated with a given AST node.
*
* @module @stdlib/_tools/eslint/utils/find-jsdoc
*
* @example
* var findJSDoc = require( '@stdlib/_tools/eslint/utils/find-jsdoc' );
*/
// MODULES //
var main = require( './main.js' );
// EXPORTS //
module.exports = main;
```
|
```javascript
function *foo() { yield* 3; }
```
|
```python
import pytest
from Zimperium import Client, events_search, users_search, user_get_by_id, devices_search, device_get_by_id, \
devices_get_last_updated, app_classification_get, file_reputation, fetch_incidents, report_get
from test_data.response_constants import RESPONSE_SEARCH_EVENTS, RESPONSE_SEARCH_USERS, RESPONSE_USER_GET_BY_ID, \
RESPONSE_SEARCH_DEVICES, RESPONSE_DEVICE_GET_BY_ID, RESPONSE_APP_CLASSIFICATION_GET, \
RESPONSE_MULTIPLE_APP_CLASSIFICATION_GET, RESPONSE_GET_LAST_UPDATED_DEVICES, RESPONSE_REPORT_GET_ITUNES_ID, \
RESPONSE_MULTIPLE_EVENTS_FETCH
from test_data.result_constants import EXPECTED_SEARCH_EVENTS, EXPECTED_SEARCH_USERS, EXPECTED_USER_GET_BY_ID, \
EXPECTED_SEARCH_DEVICES, EXPECTED_DEVICE_GET_BY_ID, EXPECTED_GET_LAST_UPDATED_DEVICES, \
EXPECTED_APP_CLASSIFICATION_GET, EXPECTED_MULTIPLE_APP_CLASSIFICATION_GET, EXPECTED_REPORT_GET_ITUNESID
@pytest.mark.parametrize('command, args, http_response, context', [
(events_search, {'query': 'eventId==*', 'size': '10', 'page': '0', 'verbose': 'true'}, RESPONSE_SEARCH_EVENTS,
EXPECTED_SEARCH_EVENTS),
(users_search, {'query': 'objectId==*', 'size': '10', 'page': '0'}, RESPONSE_SEARCH_USERS, EXPECTED_SEARCH_USERS),
(user_get_by_id, {'object_id': '1B9182C7-8C12-4499-ADF0-A338DEFDFC33'}, RESPONSE_USER_GET_BY_ID,
EXPECTED_USER_GET_BY_ID),
(devices_search, {'query': 'deviceId==*', 'size': '10', 'page': '0'}, RESPONSE_SEARCH_DEVICES,
EXPECTED_SEARCH_DEVICES),
(device_get_by_id, {'zdid': "87a587de-283f-48c9-9ff2-047c8b025b6d"}, RESPONSE_DEVICE_GET_BY_ID,
EXPECTED_DEVICE_GET_BY_ID),
(devices_get_last_updated, {'from_last_update': "5 days"}, RESPONSE_GET_LAST_UPDATED_DEVICES,
EXPECTED_GET_LAST_UPDATED_DEVICES),
(app_classification_get, {'app_hash': "aad9b2fd4606467f06931d72048ee1dff137cbc9b601860a88ad6a2c092"},
RESPONSE_APP_CLASSIFICATION_GET, EXPECTED_APP_CLASSIFICATION_GET),
(app_classification_get, {'app_name': "Duo"},
RESPONSE_MULTIPLE_APP_CLASSIFICATION_GET, EXPECTED_MULTIPLE_APP_CLASSIFICATION_GET),
(report_get, {'itunes_id': '331177714'}, RESPONSE_REPORT_GET_ITUNES_ID, EXPECTED_REPORT_GET_ITUNESID),
])
def test_zimperium_commands(command, args, http_response, context, mocker):
"""Unit test
Given
- demisto args
- raw response of the http request
When
- mock the http request result
Then
- convert the result to human readable table
- create the context
- validate the expected_result and the created context
"""
client = Client(base_url="path_to_url", api_key="api_key", verify=False)
mocker.patch.object(Client, '_http_request', return_value=http_response)
command_results = command(client, args)
assert command_results.outputs == context
def test_file_reputation(mocker):
"""Unit test
Given
- file reputation command
- command args
- command raw response
When
- mock the Client's http_request.
Then
- run the file reputation command using the Client
Validate The contents of the outputs and indicator of the results
"""
client = Client(base_url="path_to_url", api_key="api_key", verify=False)
mocker.patch.object(Client, '_http_request', return_value=RESPONSE_APP_CLASSIFICATION_GET)
command_results_list = file_reputation(client,
args={'file': "aad9b2fd4606467f06931d72048ee1dff137cbc9b601860a88ad6a2c092"})
assert command_results_list[0].indicator.dbot_score.score == 1
def test_file_reputation_404(mocker):
"""Unit test
Given
- file reputation command
- command args
- command raw response
When
- Sending HTTP request and getting 404 status code (not found)
Then
- run the file reputation command using the Client
- Ensure we set the file reputation as unknown
"""
client = Client(base_url="path_to_url", api_key="api_key", verify=False)
def error_404_mock(message, error):
raise Exception('Error in API call [404]')
mocker.patch('Zimperium.Client.app_classification_get_request', side_effect=error_404_mock)
command_results_list = file_reputation(client,
args={'file': "aad9b2fd4606467f06931d72048ee1dff137cbc9b601860a88ad6a2c092"})
assert command_results_list[0].indicator.dbot_score.score == 0
def test_fetch_incidents(mocker):
"""Unit test
Given
- fetch incidents command
- command args
- command raw response
When
- mock the Client's http_request.
Then
- run the fetch incidents command using the Client
Validate The length of the results and the incident name.
"""
client = Client(base_url="path_to_url", api_key="api_key", verify=False)
mocker.patch.object(Client, '_http_request', return_value=RESPONSE_MULTIPLE_EVENTS_FETCH)
_, incidents = fetch_incidents(client, last_run={}, fetch_query='', first_fetch_time='3 days', max_fetch='50')
assert len(incidents) == 14
assert incidents[0].get('name') == "Detected network scan after connecting to Free Wi-Fi. No active attacks were" \
" detected and this network will continue to be monitored. It is safe to" \
" continue to use this network."
def test_fetch_incidents_last_event_ids(mocker):
"""Unit test
Given
- fetch incidents command
- command args
- command raw response
When
- mock the last_event_ids and time.
- mock the Client's http_request.
Then
- run the fetch incidents command using the Client
Validate that no incidents will be returned.
"""
client = Client(base_url="path_to_url", api_key="api_key", verify=False)
mocker.patch.object(Client, '_http_request', return_value=RESPONSE_MULTIPLE_EVENTS_FETCH)
last_run = {
'time': "whatever",
'last_event_ids': [
'421931cc-13bf-422a-890b-9958011e4926',
'239be3f7-ead8-4157-b24c-35590811ca19',
'102065eb-7ffa-4a70-b35f-bc8ca655f9ee',
'431638cf-21fc-4fba-86b2-0e2a4850705b',
'bef068eb-5482-469c-990a-5ea363e029a0',
'c37d7379-589e-4976-8cf2-6f2876ba7e6a',
'4f1a77cf-fb76-4753-b09b-422fa8a9e102',
'4a688920-372d-45b6-934d-284d5ecacb29',
'22b960e7-554a-413a-bcbf-2da75bbb2731',
'5f9609a6-974c-4c0d-b007-7934ddf76cff',
'461d1b55-53f2-4b89-b337-c24367b525ef',
'55a43106-9c1c-47e2-9f9f-ce212304f4c0',
'7dc89a3d-6fd0-4090-ac4c-f19e33402576',
'e696ad05-32d5-43e8-95c3-5060b0ee468e',
]
}
_, incidents = fetch_incidents(client, last_run=last_run, fetch_query='', first_fetch_time='3 days', max_fetch='50')
assert len(incidents) == 0
```
|
Frederick Henry Derek Curtis-Bennett, QC (29 February 1904 – July 1956) was a British barrister who defended some of the most notorious characters in British legal history, but whose career was cut short by alcoholism. His father was Sir Henry Curtis-Bennett KC, whose biography he wrote with Roland Wild.
Early life and career
Curtis-Bennett was educated at Radley College and Trinity College, Cambridge. He was called to the bar in 1926 and specialised in criminal defence. He became Recorder of Guildford in 1942 and a King's Counsel the following year. Among those that Curtis-Bennett defended were William Joyce (Lord Haw Haw), serial killer John Christie (1953), Sergeant Frederick Emmett-Dunne, atom spy Klaus Fuchs, and Burmese politician U Saw. Curtis-Bennett pursued the truth in the Christie case as his client admitted more and more murders, despite it being injurious to his defence.
Family
Curtis-Bennett married Margaret Duncan in 1928, which marriage was dissolved in 1949. There were three children. He married Janet Farquhar in 1955, who killed herself in 1956.
Death
Curtis-Bennett died from asphyxiation after collapsing while highly intoxicated. He was discovered at his home in Courtfield Gardens, Earls Court, London, on 23 July 1956 Following medical evidence showing considerable liver damage, the coroner commented that the verdict "must be one of alcoholism". Curtis-Bennett died just two months after his wife, Janet Farquhar Curtis-Bennett (aged 26), killed herself with a drug overdose. It was stated at Janet's inquest that relations between her and her husband had been troubled.
Selected publications
"Curtis." The life of Sir Henry Curtis-Bennett, K.C. London, Cassell & Co., 1937. (With Roland Wild)
References
External links
1904 births
1956 deaths
20th-century British lawyers
Alumni of Trinity College, Cambridge
Members of the Middle Temple
People educated at Radley College
English King's Counsel
20th-century King's Counsel
|
Inside Information is a 1934 American film directed by Robert F. Hill.
Plot
Cast
Rex Lease as Lloyd Wilson
Marion Shilling as Anne Seton
Tarzan as Tarzan, the police dog
Philo McCullough as Durand
Henry Hall as Mr. Seton
Charles King as "Blackie" Black
Jean Porter as Gertie
Robert McKenzie as Mack, Fat Detective
Victor Potel as Rice, Thin Detective
Robert F. Hill as Police Chief Gallagher
Henry Roquemore as Police Commissioner
Vance Carroll as Traffic Cop
Charles Harper as Henchman
Jimmy Aubrey as Henry, Durand's Houseboy
Baby Woods as Georgie, Toddler
References
External links
1934 films
American black-and-white films
1934 adventure films
American adventure films
1930s English-language films
Films directed by Robert F. Hill
1930s American films
English-language adventure films
|
Lejla Njemčević (born 19 June 1994) is an Italian-born Bosnian and Herzegovian cross-country and mountain bike cyclist considered as one of the best cross country marathon riders in the World and she is the overall winner of the 2023 UCI Mountain Bike World Cup. Lejla is as well the first ever mountain bike rider from the Bosnia and Herzegovina to sign a contract for a professional cycling team. Lejla started racing at the age of 15 at local cycling club Klub brdskog biciklizma "Puls" for which team she is still riding. During her career she has won 35 races organised by the Union Cycliste Internationale. Lejla Njemčević is an nineteen time national champion in various disciplines and five time national league overall winner. On regional competitions she has won the Balkan Championships title five time in the row which makes her all time best Balkan rider.
Lejla is a graduated student of Faculty of Law in Sarajevo with a master's degree in criminal law.
Results
Lejla is Bosnia and Herzegovina national champion at: cross-country (XCO), cross-country marathon (XCM), and cross-country eliminator (XCE). During her career Lejla Njemčević has won total of 19 National Championships in all discipline. In the season 2022, she has won the Marathon World Series presented by the UCI, and claim the number 1 place on the UCI Marathon ranking list. In the following year she has won the overall title of the UCI XCM World Cup, and wrote her name in cycling history of the cross country marathon discipline. The result came after she won the opening round of the UCI XCM World Cup in Nove Mesto na Morave in Czech Republic and followed by two second places in Finale Ligure, Italy and Morzine, France. On the final and fourth round of the XCM World Cup in Snowshoe, USA she won 4th place and overall World Cup title with huge point margine over the second place.
Career
Lejla Njemčević grew up in Sarajevo, while very young she showed passion for sport and cycling. After intense searching for a mountain bike racing club she started training with Amar Njemčević, one of the best cycling and condition coaches in Bosnia and Herzegovina. After a few years of racing in national races, Tanović started her professional and international career in 2013. She signed a professional contract with Turkish cycling team Salcano Cappadocia in 2014. Lejla won three medals on Balkan championship races, in 2014 she was second in Macedonia and also winning second place in Greece in 2015. But in 2016 she won first gold medal in elite category for Bosnia and Herzegovina on Balkan championship in Montenegro. After that victory she became most successful mountain bike rider in history of Bosnia and Herzegovina. After season 2015 and 2016 where she was riding for Salcano team from Turkey she signed for SMF Team from Greece for season 2017. In season 2017 Tanović defended her Balkan champion title in Nafpaktos (Greece), this was her second straight time that she won Balkan title in elite category. In 2018, Tanović defended her Balkan championship title at competition held in Romania After her third successful Balkan championship defence, she won her fourth consecutive Balkan championship in 2019 in Serbia. She was #1 on UCI MTB Cross-country ranking.
References
External links
profile at Mtbcrosscountry.com
profile at Procyclingstats.com
Bosnia and Herzegovina female cyclists
Living people
Place of birth missing (living people)
1994 births
Cyclists at the 2015 European Games
European Games competitors for Bosnia and Herzegovina
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.