text
stringlengths 1
22.8M
|
|---|
Deerfield Township may refer to the following places in the U.S. state of Minnesota:
Deerfield Township, Cass County, Minnesota
Deerfield Township, Steele County, Minnesota
See also
Deerfield Township (disambiguation)
Minnesota township disambiguation pages
|
```java
// 2019 and later: Unicode, Inc. and others.
package org.unicode.icu.tool.cldrtoicu.testing;
import org.unicode.icu.tool.cldrtoicu.PathValueTransformer.Result;
import com.google.common.truth.FailureMetadata;
import com.google.common.truth.Subject;
import com.google.common.truth.Truth;
/** Truth subject for asserting about transformation results (makes tests much more readable). */
public class ResultSubjectFactory implements Subject.Factory<ResultSubject, Result> {
public static ResultSubject assertThat(Result result) {
return Truth.assertAbout(new ResultSubjectFactory()).that(result);
}
@Override
public ResultSubject createSubject(FailureMetadata failureMetadata, Result that) {
return new ResultSubject(failureMetadata, that);
}
private ResultSubjectFactory() {}
}
```
|
```c++
#include "async_file_writer.hpp"
#include "run_loop_thread_utility.hpp"
#include <boost/ut.hpp>
int main(void) {
using namespace boost::ut;
using namespace boost::ut::literals;
auto scoped_dispatcher_manager = krbn::dispatcher_utility::initialize_dispatchers();
auto scoped_run_loop_thread_manager = krbn::run_loop_thread_utility::initialize_shared_run_loop_thread();
"async_file_writer"_test = [] {
krbn::async_file_writer::enqueue("tmp/example", "example1", 0755, 0600);
krbn::async_file_writer::enqueue("tmp/example", "example2", 0755, 0600);
krbn::async_file_writer::enqueue("tmp/example", "example3", 0755, 0600);
krbn::async_file_writer::enqueue("tmp/mode666", "mode666", 0755, 0666);
krbn::async_file_writer::enqueue("tmp/mode644", "mode644", 0755, 0644);
krbn::async_file_writer::enqueue("tmp/not_found/example", "example", 0755, 0600);
krbn::async_file_writer::wait();
};
return 0;
}
```
|
The 2014–15 FA Cup qualifying rounds opened the 134th season of competition in England for 'The Football Association Challenge Cup' (FA Cup), the world's oldest association football single knockout competition. A total of 736 clubs were accepted for the competition, down 1 from the previous season's 737.
The large number of clubs entering the tournament from lower down (Levels 5 through 10) in the English football pyramid meant that the competition started with six rounds of preliminary (2) and qualifying (4) knockouts for these non-League teams. The 32 winning teams from fourth qualifying round progressed to the First round proper, where League teams tiered at Levels 3 and 4 entered the competition.
Calendar and prizes
The calendar for the 2014–15 FA Cup qualifying rounds, as announced by The Football Association.
Extra preliminary round
Extra preliminary round fixtures were due to be played on 16 August 2014, with replays taking place no later than 21 August 2014. A total of 368 teams, from Level 9 and Level 10 of English football, entered at this stage of the competition.
Preliminary round
Preliminary round fixtures were due to be played on 30 August 2014, with replays no later than 5 September. A total of 320 teams took part in this stage of the competition, including the 184 winners from the Extra preliminary round and 136 entering at this stage from the six leagues at Level 8 of English football. The round included 34 teams from Level 10 still in the competition, being the lowest ranked teams in this round.
First qualifying round
First qualifying round fixtures were due to be played on 13 September 2014, with replays no later than 18 September. A total of 232 teams took part in this stage of the competition, including the 160 winners from the Preliminary round and 72 entering at this stage from the three leagues at Level 7 of English football. There were 10 teams from Level 10 still in the competition, being the lowest ranked teams in this round.
Second qualifying round
Second qualifying round fixtures were due to be played on 27 September 2014, with replays no later than 2 October. A total of 160 teams took part in this stage of the competition, including the 116 winners from the first qualifying round and 44 entering at this stage from the two divisions at Level 6 of English football. Ellistown & Ibstock United and Blaby & Whetstone Athletic from Level 10 were still in the competition, being the lowest ranked teams in this round.
Third qualifying round
Third qualifying round fixtures were due to be played on 11 October 2014, with replays taking place no later than 16 October 2014. A total of 80 teams took part in this stage of the competition, all winners from the second qualifying round. The round featured six teams from Level 9 still in the competition, being the lowest ranked teams in this round.
Fourth qualifying round
Fourth qualifying round fixtures were due to be played on 25 October 2014, with replays taking place no later than 30 October 2014. A total of 64 teams took part in this stage of the competition, including the 40 winners from the third qualifying round and 24 entering at this stage from the Conference Premier at Level 5 of English football. The round featured Willand Rovers, Greenwich Borough and Shildon from Level 9 still in the competition, being the lowest ranked teams in this round.
Competition proper
Winners from fourth qualifying round advance to First round proper, where teams from League One (Level 3) and League Two (Level 4) of English football, operating in The Football League, first enter the competition. See 2014–15 FA Cup for a report of first round proper onwards.
Notes
References
External links
The FA Cup Archive
2014–15 FA Cup
FA Cup qualifying rounds
|
```go
// Unless explicitly stated otherwise all files in this repository are licensed
// This product includes software developed at Datadog (path_to_url
//go:build windows || linux_bpf
package dns
import (
"fmt"
"syscall"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
"github.com/DataDog/datadog-agent/pkg/process/util"
)
const (
DNSTimeoutSecs = 10
)
func getSampleDNSKey() Key {
return Key{
ServerIP: util.AddressFromString("8.8.8.8"),
ClientIP: util.AddressFromString("1.1.1.1"),
ClientPort: 1000,
Protocol: syscall.IPPROTO_UDP,
}
}
func testLatency(
t *testing.T,
respType packetType,
delta time.Duration,
expectedSuccessLatency uint64,
expectedFailureLatency uint64,
expectedTimeouts uint32,
) {
var d = ToHostname("abc.com")
sk := newDNSStatkeeper(DNSTimeoutSecs*time.Second, 10000)
key := getSampleDNSKey()
qPkt := dnsPacketInfo{transactionID: 1, pktType: query, key: key, question: d, queryType: TypeA}
then := time.Now()
sk.ProcessPacketInfo(qPkt, then)
stats := sk.GetAndResetAllStats()
assert.NotContains(t, stats, key)
now := then.Add(delta)
rPkt := dnsPacketInfo{transactionID: 1, key: key, pktType: respType, queryType: TypeA}
sk.ProcessPacketInfo(rPkt, now)
stats = sk.GetAndResetAllStats()
require.Contains(t, stats, key)
require.Contains(t, stats[key], d)
assert.Equal(t, expectedSuccessLatency, stats[key][d][TypeA].SuccessLatencySum)
assert.Equal(t, expectedFailureLatency, stats[key][d][TypeA].FailureLatencySum)
assert.Equal(t, expectedTimeouts, stats[key][d][TypeA].Timeouts)
}
func TestSuccessLatency(t *testing.T) {
delta := 10 * time.Microsecond
testLatency(t, successfulResponse, delta, uint64(delta.Microseconds()), 0, 0)
}
func TestFailureLatency(t *testing.T) {
delta := 10 * time.Microsecond
testLatency(t, failedResponse, delta, 0, uint64(delta.Microseconds()), 0)
}
func TestTimeout(t *testing.T) {
delta := DNSTimeoutSecs*time.Second + 10*time.Microsecond
testLatency(t, successfulResponse, delta, 0, 0, 1)
}
func TestExpiredStateRemoval(t *testing.T) {
sk := newDNSStatkeeper(DNSTimeoutSecs*time.Second, 10000)
key := getSampleDNSKey()
var d = ToHostname("abc.com")
qPkt1 := dnsPacketInfo{transactionID: 1, pktType: query, key: key, question: d, queryType: TypeA}
rPkt1 := dnsPacketInfo{transactionID: 1, key: key, pktType: successfulResponse, queryType: TypeA}
qPkt2 := dnsPacketInfo{transactionID: 2, pktType: query, key: key, question: d, queryType: TypeA}
qPkt3 := dnsPacketInfo{transactionID: 3, pktType: query, key: key, question: d, queryType: TypeA}
rPkt3 := dnsPacketInfo{transactionID: 3, key: key, pktType: successfulResponse, queryType: TypeA}
sk.ProcessPacketInfo(qPkt1, time.Now())
sk.ProcessPacketInfo(rPkt1, time.Now())
sk.ProcessPacketInfo(qPkt2, time.Now())
sk.removeExpiredStates(time.Now().Add(DNSTimeoutSecs * time.Second))
sk.ProcessPacketInfo(qPkt3, time.Now())
sk.ProcessPacketInfo(rPkt3, time.Now())
stats := sk.GetAndResetAllStats()
require.Contains(t, stats, key)
require.Contains(t, stats[key], d)
require.Contains(t, stats[key][d][TypeA].CountByRcode, uint32(0))
assert.Equal(t, uint32(2), stats[key][d][TypeA].CountByRcode[0])
assert.Equal(t, uint32(1), stats[key][d][TypeA].Timeouts)
}
func BenchmarkStats(b *testing.B) {
key := getSampleDNSKey()
var packets []dnsPacketInfo
for j := 0; j < maxStateMapSize*2; j++ {
qPkt := dnsPacketInfo{pktType: query, key: key}
qPkt.transactionID = uint16(j)
packets = append(packets, qPkt)
}
ts := time.Now()
// Benchmark map size with different number of packets
for _, numPackets := range []int{maxStateMapSize / 10, maxStateMapSize / 2, maxStateMapSize, maxStateMapSize * 2} {
b.Run(fmt.Sprintf("Packets#-%d", numPackets), func(b *testing.B) {
b.ResetTimer()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
sk := newDNSStatkeeper(1000*time.Second, 10000)
for j := 0; j < numPackets; j++ {
sk.ProcessPacketInfo(packets[j], ts)
}
}
})
}
}
```
|
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "path_to_url">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter 15. Boost.Functional/Hash</title>
<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries (BoostBook Subset)">
<link rel="prev" href="function/testsuite.html" title="Testsuite">
<link rel="next" href="hash/tutorial.html" title="Tutorial">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
<td align="center"><a href="../../index.html">Home</a></td>
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="path_to_url">People</a></td>
<td align="center"><a href="path_to_url">FAQ</a></td>
<td align="center"><a href="../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="function/testsuite.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="hash/tutorial.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="hash"></a>Chapter 15. Boost.Functional/Hash</h2></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Daniel</span> <span class="surname">James</span>
</h3></div></div>
James</p></div>
<div><div class="legalnotice">
<a name="hash.legal"></a><p>
file LICENSE_1_0.txt or copy at <a href="path_to_url" target="_top">path_to_url
</p>
</div></div>
</div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="section"><a href="hash.html#hash.intro">Introduction</a></span></dt>
<dt><span class="section"><a href="hash/tutorial.html">Tutorial</a></span></dt>
<dt><span class="section"><a href="hash/custom.html">Extending boost::hash for a custom data type</a></span></dt>
<dt><span class="section"><a href="hash/combine.html">Combining hash values</a></span></dt>
<dt><span class="section"><a href="hash/portability.html">Portability</a></span></dt>
<dt><span class="section"><a href="hash/disable.html">Disabling The Extensions</a></span></dt>
<dt><span class="section"><a href="hash/changes.html">Change Log</a></span></dt>
<dt><span class="section"><a href="hash/rationale.html">Rationale</a></span></dt>
<dt><span class="section"><a href="hash/reference.html">Reference</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="hash/reference.html#hash.reference.specification"></a></span></dt>
<dt><span class="section"><a href="hash/reference.html#header.boost.functional.hash_hpp">Header <boost/functional/hash.hpp></a></span></dt>
</dl></dd>
<dt><span class="section"><a href="hash/links.html">Links</a></span></dt>
<dt><span class="section"><a href="hash/acknowledgements.html">Acknowledgements</a></span></dt>
</dl>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="hash.intro"></a><a class="link" href="hash.html#hash.intro" title="Introduction">Introduction</a>
</h2></div></div></div>
<p>
<code class="computeroutput"><a class="link" href="boost/hash.html" title="Struct template hash">boost::hash</a></code> is an implementation of
the <a href="path_to_url" target="_top">hash function</a>
object specified by the <a href="path_to_url" target="_top">Draft
Technical Report on C++ Library Extensions</a> (TR1). It is the default
hash function for <a class="link" href="unordered.html" title="Chapter 44. Boost.Unordered">Boost.Unordered</a>, <a class="link" href="intrusive/unordered_set_unordered_multiset.html" title="Semi-Intrusive unordered associative containers: unordered_set, unordered_multiset">Boost.Intrusive</a>'s
unordered associative containers, and <a href="../../libs/multi_index/doc/index.html" target="_top">Boost.MultiIndex</a>'s
hash indicies and <a href="../../libs/bimap/index.html" target="_top">Boost.Bimap</a>'s
<code class="computeroutput"><span class="identifier">unordered_set_of</span></code>.
</p>
<p>
As it is compliant with <a href="path_to_url" target="_top">TR1</a>,
it will work with:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
integers
</li>
<li class="listitem">
floats
</li>
<li class="listitem">
pointers
</li>
<li class="listitem">
strings
</li>
</ul></div>
<p>
It also implements the extension proposed by Peter Dimov in issue 6.18 of the
<a href="path_to_url" target="_top">Library
Extension Technical Report Issues List</a> (page 63), this adds support
for:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
arrays
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>
</li>
<li class="listitem">
the standard containers.
</li>
<li class="listitem">
extending <code class="computeroutput"><a class="link" href="boost/hash.html" title="Struct template hash">boost::hash</a></code> for custom
types.
</li>
</ul></div>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
This hash function is designed to be used in containers based on the STL
and is not suitable as a general purpose hash function. For more details
see the <a class="link" href="hash/rationale.html" title="Rationale">rationale</a>.
</p></td></tr>
</table></div>
</div>
</div>
<table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: December 14, 2017 at 00:08:10 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="function/testsuite.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="hash/tutorial.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
```
|
```smalltalk
"
I am a command to find class and show it in the browser.
By default I am executed by cmd+f shortcut
"
Class {
#name : 'ClyFindClassCommand',
#superclass : 'ClyBrowserCommand',
#category : 'Calypso-SystemTools-Core-Commands-Classes',
#package : 'Calypso-SystemTools-Core',
#tag : 'Commands-Classes'
}
{ #category : 'accessing' }
ClyFindClassCommand >> defaultMenuIconName [
^#smallFind
]
{ #category : 'accessing' }
ClyFindClassCommand >> defaultMenuItemName [
^'Find class'
]
{ #category : 'execution' }
ClyFindClassCommand >> execute [
| class |
class := browser searchDialog
requestSingleObject: 'Choose class' from: ClyAllClassesQuery sorted.
browser selectClass: class
]
```
|
Otto Jolle Matthijs Jolles (1911–1968) performed a major service to strategic studies in the United States by providing the first American translation of Carl von Clausewitz's magnum opus, On War. Jolles himself is a bit obscure to students of military affairs, largely because his translation of On War was his only published effort in that field. Even his nationality has been misidentified—he has been variously identified as Hungarian, Czech, and Dutch. Military historian Jay Luvaas once quoted an unidentified Israeli professor as saying "whereas the first English translation was by an Englishman who did not know German, the 1943 American translation was by a Hungarian who did not know English." There is little in the Jolles translation to warrant such a comment. In the field of German literature, Jolles is quite well known, especially for his work on Friedrich Schiller. Most of his published work, however, is in German.
Life
Born in Berlin of a Dutch father, André Jolles, and German mother, Jolles was brought up as a German and educated at the Universities of Leipzig, Hamburg, and Heidelberg. He received his doctorate in the philosophy of literature from Heidelberg in 1933. He then served one year as a volunteer in the horse artillery. Although he was not Jewish, his anti-Nazi politics got him into trouble. In 1934 he emigrated to France, where he studied at the Sorbonne. The following year he emigrated to Wales, where he taught German. Offered a teaching position at the University of Chicago, he entered the United States with his new British wife in 1938. He became a professor of German language and literature, obtaining American citizenship in 1945. Leaving Chicago in 1962, he spent the remainder of his life at Cornell.
University of Chicago
Even before the United States entered the war, the University of Chicago had begun casting about for ways to assist the war effort. These efforts grew out of both patriotism and self-interest: the university's leaders were concerned that unless they established Chicago as a center of military learning and research, the university's considerable assets (particularly in cartography and linguistics) might be hauled off in army trucks, "to be returned torn and soiled, if at all." (31) Courses in preinduction military training began as early as September 1940. A formal Institute of Military Studies was created in April 1941. Since Jolles taught military German and German military organization, and On War was considered to be a key to German military behavior, he seemed to be the natural man for the job even though he was not familiar with Clausewitz when he set out. His British father-in-law (a retired professor of classics) provided assistance with the English, although he too had little military background and was new to Clausewitz.
Translation
Jolles quickly developed a good appreciation of On War'''s significance. His purpose in translating it was to argue that what Clausewitz had to say was much more relevant to the Western Allies than to Germany, and that the Germans' one-sidedly offensive interpretation of On War would prove to be, for them, a fatal error. Jolles's short but penetrating introduction stressed Clausewitz's fundamentally conservative, balance-of-power view of international affairs, finding its most important expression in Clausewitz's argument concerning the power of the defense: Clausewitz's aim was not merely to prove the strategic superiority of Napoleon's lightning attacks as so many writers and strategists--British and American, unfortunately, as well as German--seem to believe. This is but one part of his theory and far from the most important one, for he goes on to show why Napoleon, greatest of all aggressors up to that time, was necessarily in the end completely defeated. More than one third of his work On War is devoted to Book VI, on "Defense."
Reception
Jolles's translation of Clausewitz is generally considered to convey more of Clausewitz's subtleties than the older Graham translation did and is certainly clearer on some points than the overrated Howard/Paret translation (1976/84). Oddly, Jolles's translation did not catch on, and the Graham translation continued to serve as the basis for most subsequent condensations. This development was most likely a result of financial considerations rather than of the qualities of the respective versions, since the Jolles translation remains under copyright (Random House) whereas the Graham copyright had lapsed.
References
Bassford, Christopher (January 1994), Clausewitz in English: The Reception of Clausewitz in Britain and America, 1815-1945''. New York: Oxford University Press. .
1911 births
1968 deaths
German–English translators
Leipzig University alumni
Heidelberg University alumni
University of Paris alumni
Emigrants from Nazi Germany
Immigrants to the United States
University of Chicago faculty
Cornell University faculty
20th-century German translators
|
```go
package v3
/*
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.
*/
import (
"net/http"
"testing"
"time"
"github.com/apache/trafficcontrol/v8/lib/go-rfc"
"github.com/apache/trafficcontrol/v8/lib/go-tc"
"github.com/apache/trafficcontrol/v8/lib/go-util"
"github.com/apache/trafficcontrol/v8/lib/go-util/assert"
"github.com/apache/trafficcontrol/v8/traffic_ops/testing/api/utils"
)
func TestFederationUsers(t *testing.T) {
WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, ServiceCategories, DeliveryServices, CDNFederations, FederationUsers}, func() {
currentTime := time.Now().UTC().Add(-15 * time.Second)
currentTimeRFC := currentTime.Format(time.RFC1123)
tomorrow := currentTime.AddDate(0, 0, 1).Format(time.RFC1123)
methodTests := utils.V3TestCaseT[tc.FederationUserPost]{
"GET": {
"NOT MODIFIED when NO CHANGES made": {
EndpointID: GetFederationID(t, "the.cname.com."),
ClientSession: TOSession,
RequestHeaders: http.Header{rfc.IfModifiedSince: {tomorrow}},
Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusNotModified)),
},
"BAD REQUEST when INVALID FEDERATION ID": {
EndpointID: func() int { return -1 },
ClientSession: TOSession,
Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusNotFound)),
},
},
"POST": {
"OK when VALID request": {
EndpointID: GetFederationID(t, "google.com."),
ClientSession: TOSession,
RequestBody: tc.FederationUserPost{
IDs: []int{GetUserID(t, "readonlyuser")(), GetUserID(t, "disalloweduser")()},
Replace: util.Ptr(false),
},
Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)),
},
"OK when REPLACING USERS": {
EndpointID: GetFederationID(t, "the.cname.com."),
ClientSession: TOSession,
RequestBody: tc.FederationUserPost{
IDs: []int{GetUserID(t, "readonlyuser")()},
Replace: util.Ptr(true),
},
Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)),
},
"OK when ADDING USER": {
EndpointID: GetFederationID(t, "booya.com."),
ClientSession: TOSession,
RequestBody: tc.FederationUserPost{
IDs: []int{GetUserID(t, "disalloweduser")()},
Replace: util.Ptr(false),
},
Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)),
},
"BAD REQUEST when INVALID FEDERATION ID": {
EndpointID: func() int { return -1 },
ClientSession: TOSession,
RequestBody: tc.FederationUserPost{
IDs: []int{},
Replace: util.Ptr(false),
},
Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusNotFound)),
},
"BAD REQUEST when INVALID USER ID": {
EndpointID: GetFederationID(t, "the.cname.com."),
ClientSession: TOSession,
RequestBody: tc.FederationUserPost{
IDs: []int{-1},
Replace: util.Ptr(false),
},
Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusNotFound)),
},
},
"GET AFTER CHANGES": {
"OK when CHANGES made": {
EndpointID: GetFederationID(t, "the.cname.com."),
ClientSession: TOSession,
RequestHeaders: http.Header{rfc.IfModifiedSince: {currentTimeRFC}},
Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)),
},
},
}
for method, testCases := range methodTests {
t.Run(method, func(t *testing.T) {
for name, testCase := range testCases {
switch method {
case "GET":
t.Run(name, func(t *testing.T) {
resp, reqInf, err := testCase.ClientSession.GetFederationUsersWithHdr(testCase.EndpointID(), testCase.RequestHeaders)
for _, check := range testCase.Expectations {
check(t, reqInf, resp, tc.Alerts{}, err)
}
})
case "POST":
t.Run(name, func(t *testing.T) {
alerts, reqInf, err := testCase.ClientSession.CreateFederationUsers(testCase.EndpointID(), testCase.RequestBody.IDs, *testCase.RequestBody.Replace)
for _, check := range testCase.Expectations {
check(t, reqInf, nil, alerts, err)
}
})
}
}
})
}
})
}
func CreateTestFederationUsers(t *testing.T) {
// Prerequisite Federation Users
federationUsers := map[string]tc.FederationUserPost{
"the.cname.com.": {
IDs: []int{GetUserID(t, "admin")(), GetUserID(t, "adminuser")(), GetUserID(t, "disalloweduser")(), GetUserID(t, "readonlyuser")()},
Replace: util.BoolPtr(false),
},
"booya.com.": {
IDs: []int{GetUserID(t, "adminuser")()},
Replace: util.BoolPtr(false),
},
}
for cname, federationUser := range federationUsers {
fedID := GetFederationID(t, cname)()
resp, _, err := TOSession.CreateFederationUsers(fedID, federationUser.IDs, *federationUser.Replace)
assert.RequireNoError(t, err, "Assigning users %v to federation %d: %v - alerts: %+v", federationUser.IDs, fedID, err, resp.Alerts)
}
}
func DeleteTestFederationUsers(t *testing.T) {
for _, fedID := range fedIDs {
fedUsers, _, err := TOSession.GetFederationUsersWithHdr(fedID, nil)
assert.RequireNoError(t, err, "Error getting users for federation %d: %v", fedID, err)
for _, fedUser := range fedUsers {
if fedUser.ID == nil {
t.Error("Traffic Ops returned a representation of a relationship between a user and a Federation that had null or undefined ID")
continue
}
alerts, _, err := TOSession.DeleteFederationUser(fedID, *fedUser.ID)
assert.NoError(t, err, "Error deleting user #%d from federation #%d: %v - alerts: %+v", *fedUser.ID, fedID, err, alerts.Alerts)
}
}
for _, fedID := range fedIDs {
fedUsers, _, err := TOSession.GetFederationUsersWithHdr(fedID, nil)
assert.NoError(t, err, "Error getting users for federation %d: %v", fedID, err)
assert.Equal(t, 0, len(fedUsers), "Federation users expected 0, actual: %+v", len(fedUsers))
}
}
```
|
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>Introduction_to_Algorithms: IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex< KType > Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Introduction_to_Algorithms
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree(your_sha256_hashlow_vertex.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-attribs">Public Attributes</a> |
<a href=your_sha256_hashlow_vertex-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex< KType > Struct Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>FrontFlowVertexrelabel_to_front2626.4
<a href=your_sha256_hashlow_vertex.html#details">More...</a></p>
<p><code>#include <<a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex< KType >:</div>
<div class="dyncontent">
<div class="center">
<img src=your_sha256_hashlow_vertex.png" usemap="#IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex< KType >_map" alt=""/>
<map id="IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex< KType >_map" name="IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex< KType >_map">
<area href=your_sha256_hashrtex.html" title="FlowVertex-2626.4 " alt="IntroductionToAlgorithm::GraphAlgorithm::FlowVertex< KType >" shape="rect" coords="0,56,399,80"/>
<area href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html" title="Vertex2222.1 " alt="IntroductionToAlgorithm::GraphAlgorithm::Vertex< KType >" shape="rect" coords="0,0,399,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a76ed9e9d0c0da5c60c4a004eeda192ad"><td class="memItemLeft" align="right" valign="top">typedef KType </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashlow_vertex.html#a76ed9e9d0c0da5c60c4a004eeda192ad">KeyType</a></td></tr>
<tr class="separator:a76ed9e9d0c0da5c60c4a004eeda192ad"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab1973e8ed99c2e213532fabbee1a66b8"><td class="memItemLeft" align="right" valign="top">typedef int </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashlow_vertex.html#ab1973e8ed99c2e213532fabbee1a66b8">VIDType</a></td></tr>
<tr class="separator:ab1973e8ed99c2e213532fabbee1a66b8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header your_sha256_hash_1_flow_vertex"><td colspan="2" onclick="javascript:toggleInherit(your_sha256_hash_1_flow_vertex')"><img src="closed.png" alt="-"/> Public Types inherited from <a class="el" href=your_sha256_hashrtex.html">IntroductionToAlgorithm::GraphAlgorithm::FlowVertex< KType ></a></td></tr>
<tr class="memitem:a014b25c20124a24525ef7db0588466b9 inherit your_sha256_hash_1_flow_vertex"><td class="memItemLeft" align="right" valign="top">typedef KType </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashrtex.html#a014b25c20124a24525ef7db0588466b9">KeyType</a></td></tr>
<tr class="separator:a014b25c20124a24525ef7db0588466b9 inherit your_sha256_hash_1_flow_vertex"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae48ab0918590bd6a6763d007694ff161 inherit your_sha256_hash_1_flow_vertex"><td class="memItemLeft" align="right" valign="top">typedef int </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashrtex.html#ae48ab0918590bd6a6763d007694ff161">VIDType</a></td></tr>
<tr class="separator:ae48ab0918590bd6a6763d007694ff161 inherit your_sha256_hash_1_flow_vertex"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header your_sha256_hash_1_vertex"><td colspan="2" onclick="javascript:toggleInherit(your_sha256_hash_1_vertex')"><img src="closed.png" alt="-"/> Public Types inherited from <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html">IntroductionToAlgorithm::GraphAlgorithm::Vertex< KType ></a></td></tr>
<tr class="memitem:a14e958c58a404474853491eb811954cc inherit your_sha256_hash_1_vertex"><td class="memItemLeft" align="right" valign="top">typedef KType </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a14e958c58a404474853491eb811954cc">KeyType</a></td></tr>
<tr class="separator:a14e958c58a404474853491eb811954cc inherit your_sha256_hash_1_vertex"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a290c84c0dcf159f833c72c47a2d4d44a inherit your_sha256_hash_1_vertex"><td class="memItemLeft" align="right" valign="top">typedef int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a290c84c0dcf159f833c72c47a2d4d44a">VIDType</a></td></tr>
<tr class="separator:a290c84c0dcf159f833c72c47a2d4d44a inherit your_sha256_hash_1_vertex"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9890efaa1818c914f138ac063b679fe2"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashlow_vertex.html#a9890efaa1818c914f138ac063b679fe2">FrontFlowVertex</a> ()</td></tr>
<tr class="memdesc:a9890efaa1818c914f138ac063b679fe2"><td class="mdescLeft"> </td><td class="mdescRight"> <a href="#a9890efaa1818c914f138ac063b679fe2">More...</a><br /></td></tr>
<tr class="separator:a9890efaa1818c914f138ac063b679fe2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af6c0dd18f309fdc4f6cd475a3f629f70"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashlow_vertex.html#af6c0dd18f309fdc4f6cd475a3f629f70">FrontFlowVertex</a> (const <a class="el" href=your_sha256_hashrtex.html#a014b25c20124a24525ef7db0588466b9">KeyType</a> &k)</td></tr>
<tr class="memdesc:af6c0dd18f309fdc4f6cd475a3f629f70"><td class="mdescLeft"> </td><td class="mdescRight"><code>key</code> <a href="#af6c0dd18f309fdc4f6cd475a3f629f70">More...</a><br /></td></tr>
<tr class="separator:af6c0dd18f309fdc4f6cd475a3f629f70"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae9af6850fbdfa4c8a192ea66778e6b59"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashlow_vertex.html#ae9af6850fbdfa4c8a192ea66778e6b59">FrontFlowVertex</a> (const <a class="el" href=your_sha256_hashrtex.html#a014b25c20124a24525ef7db0588466b9">KeyType</a> &k, <a class="el" href=your_sha256_hashrtex.html#ae48ab0918590bd6a6763d007694ff161">VIDType</a> d)</td></tr>
<tr class="memdesc:ae9af6850fbdfa4c8a192ea66778e6b59"><td class="mdescLeft"> </td><td class="mdescRight"><code>key</code> <a href="#ae9af6850fbdfa4c8a192ea66778e6b59">More...</a><br /></td></tr>
<tr class="separator:ae9af6850fbdfa4c8a192ea66778e6b59"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3edfb3a6f29475f338340291ad71eab9"><td class="memItemLeft" align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashlow_vertex.html#a3edfb3a6f29475f338340291ad71eab9">to_string</a> () const </td></tr>
<tr class="memdesc:a3edfb3a6f29475f338340291ad71eab9"><td class="mdescLeft"> </td><td class="mdescRight">to_string <a href="#a3edfb3a6f29475f338340291ad71eab9">More...</a><br /></td></tr>
<tr class="separator:a3edfb3a6f29475f338340291ad71eab9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header your_sha256_hash_1_1_flow_vertex"><td colspan="2" onclick="javascript:toggleInherit(your_sha256_hash_1_1_flow_vertex')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href=your_sha256_hashrtex.html">IntroductionToAlgorithm::GraphAlgorithm::FlowVertex< KType ></a></td></tr>
<tr class="memitem:a19355adc725984f1ae28f254b6ba9bd7 inherit your_sha256_hash_1_1_flow_vertex"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashrtex.html#a19355adc725984f1ae28f254b6ba9bd7">FlowVertex</a> ()</td></tr>
<tr class="memdesc:a19355adc725984f1ae28f254b6ba9bd7 inherit your_sha256_hash_1_1_flow_vertex"><td class="mdescLeft"> </td><td class="mdescRight"> <a href="#a19355adc725984f1ae28f254b6ba9bd7">More...</a><br /></td></tr>
<tr class="separator:a19355adc725984f1ae28f254b6ba9bd7 inherit your_sha256_hash_1_1_flow_vertex"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4593a33cdfec0ecf40f9908d4fee5e00 inherit your_sha256_hash_1_1_flow_vertex"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashrtex.html#a4593a33cdfec0ecf40f9908d4fee5e00">FlowVertex</a> (const <a class="el" href=your_sha256_hashrtex.html#a014b25c20124a24525ef7db0588466b9">KeyType</a> &k)</td></tr>
<tr class="memdesc:a4593a33cdfec0ecf40f9908d4fee5e00 inherit your_sha256_hash_1_1_flow_vertex"><td class="mdescLeft"> </td><td class="mdescRight"><code>key</code> <a href="#a4593a33cdfec0ecf40f9908d4fee5e00">More...</a><br /></td></tr>
<tr class="separator:a4593a33cdfec0ecf40f9908d4fee5e00 inherit your_sha256_hash_1_1_flow_vertex"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a49bbf9ed3ed8769337403d455c383a4f inherit your_sha256_hash_1_1_flow_vertex"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashrtex.html#a49bbf9ed3ed8769337403d455c383a4f">FlowVertex</a> (const <a class="el" href=your_sha256_hashrtex.html#a014b25c20124a24525ef7db0588466b9">KeyType</a> &k, <a class="el" href=your_sha256_hashrtex.html#ae48ab0918590bd6a6763d007694ff161">VIDType</a> d)</td></tr>
<tr class="memdesc:a49bbf9ed3ed8769337403d455c383a4f inherit your_sha256_hash_1_1_flow_vertex"><td class="mdescLeft"> </td><td class="mdescRight"><code>key</code> <a href="#a49bbf9ed3ed8769337403d455c383a4f">More...</a><br /></td></tr>
<tr class="separator:a49bbf9ed3ed8769337403d455c383a4f inherit your_sha256_hash_1_1_flow_vertex"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header your_sha256_hash_1_1_vertex"><td colspan="2" onclick="javascript:toggleInherit(your_sha256_hash_1_1_vertex')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html">IntroductionToAlgorithm::GraphAlgorithm::Vertex< KType ></a></td></tr>
<tr class="memitem:a6a0b0403db78f786443e8827e6bb6af9 inherit your_sha256_hash_1_1_vertex"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a6a0b0403db78f786443e8827e6bb6af9">Vertex</a> ()</td></tr>
<tr class="memdesc:a6a0b0403db78f786443e8827e6bb6af9 inherit your_sha256_hash_1_1_vertex"><td class="mdescLeft"> </td><td class="mdescRight"><code>key</code><code>KType()</code>-1 <a href="#a6a0b0403db78f786443e8827e6bb6af9">More...</a><br /></td></tr>
<tr class="separator:a6a0b0403db78f786443e8827e6bb6af9 inherit your_sha256_hash_1_1_vertex"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a047edb0a5351588129aad113a93eba54 inherit your_sha256_hash_1_1_vertex"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a047edb0a5351588129aad113a93eba54">Vertex</a> (const <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a14e958c58a404474853491eb811954cc">KeyType</a> &k)</td></tr>
<tr class="memdesc:a047edb0a5351588129aad113a93eba54 inherit your_sha256_hash_1_1_vertex"><td class="mdescLeft"> </td><td class="mdescRight"><code>key</code> <a href="#a047edb0a5351588129aad113a93eba54">More...</a><br /></td></tr>
<tr class="separator:a047edb0a5351588129aad113a93eba54 inherit your_sha256_hash_1_1_vertex"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9ed1eda4a4b48a8329acc8bd4b58150f inherit your_sha256_hash_1_1_vertex"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a9ed1eda4a4b48a8329acc8bd4b58150f">Vertex</a> (const <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a14e958c58a404474853491eb811954cc">KeyType</a> &k, <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a290c84c0dcf159f833c72c47a2d4d44a">VIDType</a> d)</td></tr>
<tr class="memdesc:a9ed1eda4a4b48a8329acc8bd4b58150f inherit your_sha256_hash_1_1_vertex"><td class="mdescLeft"> </td><td class="mdescRight"><code>key</code> <a href="#a9ed1eda4a4b48a8329acc8bd4b58150f">More...</a><br /></td></tr>
<tr class="separator:a9ed1eda4a4b48a8329acc8bd4b58150f inherit your_sha256_hash_1_1_vertex"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ad66fead451e2af4756f0fd7a644e1319"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html">List</a>< <a class="el" href=your_sha256_hashde.html">ListNode</a>< <a class="el" href=your_sha256_hashlow_vertex.html">FrontFlowVertex</a> > > </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashlow_vertex.html#ad66fead451e2af4756f0fd7a644e1319">N_List</a></td></tr>
<tr class="separator:ad66fead451e2af4756f0fd7a644e1319"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header your_sha256_hash_1_1_flow_vertex"><td colspan="2" onclick="javascript:toggleInherit(your_sha256_hash_1_1_flow_vertex')"><img src="closed.png" alt="-"/> Public Attributes inherited from <a class="el" href=your_sha256_hashrtex.html">IntroductionToAlgorithm::GraphAlgorithm::FlowVertex< KType ></a></td></tr>
<tr class="memitem:a05f50003725449bbc9f4ee929c9ea87a inherit your_sha256_hash_1_1_flow_vertex"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href=your_sha256_hashrtex.html#a05f50003725449bbc9f4ee929c9ea87a">h</a></td></tr>
<tr class="separator:a05f50003725449bbc9f4ee929c9ea87a inherit your_sha256_hash_1_1_flow_vertex"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header your_sha256_hash_1_1_vertex"><td colspan="2" onclick="javascript:toggleInherit(your_sha256_hash_1_1_vertex')"><img src="closed.png" alt="-"/> Public Attributes inherited from <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html">IntroductionToAlgorithm::GraphAlgorithm::Vertex< KType ></a></td></tr>
<tr class="memitem:a5bcfb4e0ba9450b8ebb2543069772d1f inherit your_sha256_hash_1_1_vertex"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a14e958c58a404474853491eb811954cc">KeyType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a5bcfb4e0ba9450b8ebb2543069772d1f">key</a></td></tr>
<tr class="separator:a5bcfb4e0ba9450b8ebb2543069772d1f inherit your_sha256_hash_1_1_vertex"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a76668b285452856d184a245b7b35b7c1 inherit your_sha256_hash_1_1_vertex"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a290c84c0dcf159f833c72c47a2d4d44a">VIDType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex.html#a76668b285452856d184a245b7b35b7c1">id</a></td></tr>
<tr class="separator:a76668b285452856d184a245b7b35b7c1 inherit your_sha256_hash_1_1_vertex"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template<typename KType><br />
struct IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex< KType ></h3>
<p>FrontFlowVertexrelabel_to_front2626.4 </p>
<p><a class="el" href=your_sha256_hashlow_vertex.html" title="FrontFlowVertexrelabel_to_front2626.4 ">FrontFlowVertex</a> FlowVertexFlowVertex<code>N_List</code></p>
<p>relabel_to_front FrontFlowVertex</p>
<ul>
<li>L L</li>
<li>u.N u </li>
</ul>
<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00175">175</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="a76ed9e9d0c0da5c60c4a004eeda192ad"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename KType > </div>
<table class="memname">
<tr>
<td class="memname">typedef KType <a class="el" href=your_sha256_hashlow_vertex.html">IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex</a>< KType >::<a class="el" href=your_sha256_hashrtex.html#a014b25c20124a24525ef7db0588466b9">KeyType</a></td>
</tr>
</table>
</div><div class="memdoc">
<p> </p>
<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00177">177</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>
</div>
</div>
<a class="anchor" id="ab1973e8ed99c2e213532fabbee1a66b8"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename KType > </div>
<table class="memname">
<tr>
<td class="memname">typedef int <a class="el" href=your_sha256_hashlow_vertex.html">IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex</a>< KType >::<a class="el" href=your_sha256_hashrtex.html#ae48ab0918590bd6a6763d007694ff161">VIDType</a></td>
</tr>
</table>
</div><div class="memdoc">
<p> </p>
<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00178">178</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="a9890efaa1818c914f138ac063b679fe2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename KType > </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href=your_sha256_hashlow_vertex.html">IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex</a>< KType >::<a class="el" href=your_sha256_hashlow_vertex.html">FrontFlowVertex</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p> </p>
<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00183">183</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>
</div>
</div>
<a class="anchor" id="af6c0dd18f309fdc4f6cd475a3f629f70"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename KType > </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href=your_sha256_hashlow_vertex.html">IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex</a>< KType >::<a class="el" href=your_sha256_hashlow_vertex.html">FrontFlowVertex</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href=your_sha256_hashrtex.html#a014b25c20124a24525ef7db0588466b9">KeyType</a> & </td>
<td class="paramname"><em>k</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><code>key</code> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">k:</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00188">188</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>
</div>
</div>
<a class="anchor" id="ae9af6850fbdfa4c8a192ea66778e6b59"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename KType > </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href=your_sha256_hashlow_vertex.html">IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex</a>< KType >::<a class="el" href=your_sha256_hashlow_vertex.html">FrontFlowVertex</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href=your_sha256_hashrtex.html#a014b25c20124a24525ef7db0588466b9">KeyType</a> & </td>
<td class="paramname"><em>k</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href=your_sha256_hashrtex.html#ae48ab0918590bd6a6763d007694ff161">VIDType</a> </td>
<td class="paramname"><em>d</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><code>key</code> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">k:</td><td></td></tr>
<tr><td class="paramname">d:</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00194">194</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a3edfb3a6f29475f338340291ad71eab9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename KType > </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual std::string <a class="el" href=your_sha256_hashlow_vertex.html">IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex</a>< KType >::to_string </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>to_string </p>
<dl class="section return"><dt>Returns</dt><dd>:</dd></dl>
<p><code><a class="el" href=your_sha256_hashrtex.html" title="FlowVertex-2626.4 ">FlowVertex</a></code><code>N_List</code> </p>
<p>Reimplemented from <a class="el" href=your_sha256_hashrtex.html#aa373a13a1fdee1fdcdbd0b55eaa1d1fb">IntroductionToAlgorithm::GraphAlgorithm::FlowVertex< KType ></a>.</p>
<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00202">202</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ad66fead451e2af4756f0fd7a644e1319"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename KType > </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html">List</a><<a class="el" href=your_sha256_hashde.html">ListNode</a><<a class="el" href=your_sha256_hashlow_vertex.html">FrontFlowVertex</a>> > <a class="el" href=your_sha256_hashlow_vertex.html">IntroductionToAlgorithm::GraphAlgorithm::FrontFlowVertex</a>< KType >::N_List</td>
</tr>
</table>
</div><div class="memdoc">
<p> </p>
<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00180">180</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>src/graph_algorithms/basic_graph/graph_representation/graph_vertex/<a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespace_introduction_to_algorithm.html">IntroductionToAlgorithm</a></li><li class="navelem"><a class="el" href="namespace_introduction_to_algorithm_1_1_graph_algorithm.html">GraphAlgorithm</a></li><li class="navelem"><a class="el" href=your_sha256_hashlow_vertex.html">FrontFlowVertex</a></li>
<li class="footer">Generated by
<a href="path_to_url">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.10 </li>
</ul>
</div>
</body>
</html>
```
|
The 1957 VFL season was the 61st season of the Victorian Football League (VFL), the highest level senior Australian rules football competition in Victoria. The season featured twelve clubs, ran from 20 April until 21 September, and comprised an 18-game home-and-away season followed by a finals series featuring the top four clubs.
The premiership was won by the Melbourne Football Club for the ninth time and third time consecutively, after it defeated by 61 points in the 1957 VFL Grand Final.
Background
In 1957, the VFL competition consisted of twelve teams of 18 on-the-field players each, plus two substitute players, known as the 19th man and the 20th man. A player could be substituted for any reason; however, once substituted, a player could not return to the field of play under any circumstances.
Teams played each other in a home-and-away season of 18 rounds; matches 12 to 18 were the "home-and-way reverse" of matches 1 to 7.
Once the 18 round home-and-away season had finished, the 1957 VFL Premiers were determined by the specific format and conventions of the Page–McIntyre system.
Home-and-away season
Round 1
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 12.16 (88)
|
| 7.17 (59)
| Junction Oval
| 37,000
| 20 April 1957
|- bgcolor="#FFFFFF"
|
| 8.10 (58)
|
| 13.15 (93)
| Victoria Park
| 30,000
| 20 April 1957
|- bgcolor="#FFFFFF"
|
| 10.6 (66)
|
| 15.12 (102)
| Princes Park
| 24,321
| 20 April 1957
|- bgcolor="#FFFFFF"
|
| 7.11 (53)
|
| 6.14 (50)
| Brunswick Street Oval
| 24,000
| 22 April 1957
|- bgcolor="#FFFFFF"
|
| 19.14 (128)
|
| 15.15 (105)
| Punt Road Oval
| 23,000
| 22 April 1957
|- bgcolor="#FFFFFF"
|
| 11.11 (77)
|
| 10.17 (77)
| Kardinia Park
| 34,844
| 22 April 1957
Round 2
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 9.22 (76)
|
| 8.9 (57)
| Glenferrie Oval
| 21,000
| 27 April 1957
|- bgcolor="#FFFFFF"
|
| 12.13 (85)
|
| 7.11 (53)
| Western Oval
| 29,497
| 27 April 1957
|- bgcolor="#FFFFFF"
|
| 11.8 (74)
|
| 8.15 (63)
| Windy Hill
| 21,500
| 27 April 1957
|- bgcolor="#FFFFFF"
|
| 9.13 (67)
|
| 10.13 (73)
| Arden Street Oval
| 12,000
| 27 April 1957
|- bgcolor="#FFFFFF"
|
| 10.20 (80)
|
| 10.12 (72)
| MCG
| 45,571
| 27 April 1957
|- bgcolor="#FFFFFF"
|
| 6.16 (52)
|
| 10.16 (76)
| Lake Oval
| 22,385
| 27 April 1957
Round 3
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 12.16 (88)
|
| 9.11 (65)
| Brunswick Street Oval
| 17,000
| 4 May 1957
|- bgcolor="#FFFFFF"
|
| 19.16 (130)
|
| 13.9 (87)
| Lake Oval
| 19,275
| 4 May 1957
|- bgcolor="#FFFFFF"
|
| 13.9 (87)
|
| 11.12 (78)
| Arden Street Oval
| 11,000
| 4 May 1957
|- bgcolor="#FFFFFF"
|
| 11.20 (86)
|
| 5.11 (41)
| MCG
| 42,920
| 4 May 1957
|- bgcolor="#FFFFFF"
|
| 12.5 (77)
|
| 12.15 (87)
| Kardinia Park
| 24,292
| 4 May 1957
|- bgcolor="#FFFFFF"
|
| 9.10 (64)
|
| 7.9 (51)
| Western Oval
| 34,878
| 4 May 1957
Round 4
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 6.15 (51)
|
| 4.9 (33)
| Glenferrie Oval
| 20,000
| 11 May 1957
|- bgcolor="#FFFFFF"
|
| 11.14 (80)
|
| 4.14 (38)
| Windy Hill
| 30,000
| 11 May 1957
|- bgcolor="#FFFFFF"
|
| 14.9 (93)
|
| 11.17 (83)
| Victoria Park
| 32,500
| 11 May 1957
|- bgcolor="#FFFFFF"
|
| 15.12 (102)
|
| 13.11 (89)
| Princes Park
| 28,888
| 11 May 1957
|- bgcolor="#FFFFFF"
|
| 16.5 (101)
|
| 12.12 (84)
| Junction Oval
| 20,000
| 11 May 1957
|- bgcolor="#FFFFFF"
|
| 16.10 (106)
|
| 10.31 (91)
| Punt Road Oval
| 16,500
| 11 May 1957
Round 5
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 17.17 (119)
|
| 13.12 (90)
| MCG
| 35,682
| 18 May 1957
|- bgcolor="#FFFFFF"
|
| 9.10 (64)
|
| 3.19 (37)
| Kardinia Park
| 18,000
| 18 May 1957
|- bgcolor="#FFFFFF"
|
| 12.12 (84)
|
| 13.4 (82)
| Victoria Park
| 29,783
| 18 May 1957
|- bgcolor="#FFFFFF"
|
| 16.22 (118)
|
| 13.16 (94)
| Princes Park
| 28,936
| 18 May 1957
|- bgcolor="#FFFFFF"
|
| 9.16 (70)
|
| 9.14 (68)
| Arden Street Oval
| 19,000
| 18 May 1957
|- bgcolor="#FFFFFF"
|
| 7.16 (58)
|
| 14.16 (100)
| Lake Oval
| 27,500
| 18 May 1957
Round 6
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 17.12 (114)
|
| 6.15 (51)
| MCG
| 28,250
| 25 May 1957
|- bgcolor="#FFFFFF"
|
| 14.14 (98)
|
| 10.19 (79)
| Western Oval
| 24,902
| 25 May 1957
|- bgcolor="#FFFFFF"
|
| 9.12 (66)
|
| 11.8 (74)
| Windy Hill
| 22,000
| 25 May 1957
|- bgcolor="#FFFFFF"
|
| 10.13 (73)
|
| 13.5 (83)
| Junction Oval
| 24,000
| 25 May 1957
|- bgcolor="#FFFFFF"
|
| 13.13 (91)
|
| 10.16 (76)
| Arden Street Oval
| 20,000
| 25 May 1957
|- bgcolor="#FFFFFF"
|
| 12.10 (82)
|
| 14.12 (96)
| Brunswick Street Oval
| 24,500
| 25 May 1957
Round 7
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 12.16 (88)
|
| 8.9 (57)
| Victoria Park
| 23,458
| 1 June 1957
|- bgcolor="#FFFFFF"
|
| 13.9 (87)
|
| 7.20 (62)
| Princes Park
| 34,740
| 1 June 1957
|- bgcolor="#FFFFFF"
|
| 11.9 (75)
|
| 11.13 (79)
| Lake Oval
| 15,000
| 1 June 1957
|- bgcolor="#FFFFFF"
|
| 7.10 (52)
|
| 6.14 (50)
| Punt Road Oval
| 16,000
| 1 June 1957
|- bgcolor="#FFFFFF"
|
| 11.11 (77)
|
| 7.8 (50)
| Glenferrie Oval
| 26,000
| 1 June 1957
|- bgcolor="#FFFFFF"
|
| 14.15 (99)
|
| 17.11 (113)
| Kardinia Park
| 17,240
| 1 June 1957
Round 8
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 11.15 (81)
|
| 10.19 (79)
| Punt Road Oval
| 21,000
| 8 June 1957
|- bgcolor="#FFFFFF"
|
| 10.11 (71)
|
| 10.17 (77)
| Brunswick Street Oval
| 15,000
| 8 June 1957
|- bgcolor="#FFFFFF"
|
| 21.12 (138)
|
| 15.12 (102)
| Windy Hill
| 22,000
| 8 June 1957
|- bgcolor="#FFFFFF"
|
| 10.11 (71)
|
| 14.15 (99)
| Princes Park
| 31,096
| 8 June 1957
|- bgcolor="#FFFFFF"
|
| 9.14 (68)
|
| 13.11 (89)
| Lake Oval
| 18,200
| 8 June 1957
|- bgcolor="#FFFFFF"
|
| 12.17 (89)
|
| 6.4 (40)
| Western Oval
| 34,742
| 8 June 1957
Round 9
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 12.13 (85)
|
| 13.14 (92)
| Victoria Park
| 32,280
| 15 June 1957
|- bgcolor="#FFFFFF"
|
| 3.12 (30)
|
| 9.21 (75)
| Junction Oval
| 33,500
| 15 June 1957
|- bgcolor="#FFFFFF"
|
| 7.14 (56)
|
| 8.15 (63)
| Arden Street Oval
| 28,000
| 15 June 1957
|- bgcolor="#FFFFFF"
|
| 12.15 (87)
|
| 8.12 (60)
| Western Oval
| 28,450
| 17 June 1957
|- bgcolor="#FFFFFF"
|
| 23.16 (154)
|
| 14.10 (94)
| MCG
| 48,001
| 17 June 1957
|- bgcolor="#FFFFFF"
|
| 15.14 (104)
|
| 7.14 (56)
| Glenferrie Oval
| 23,000
| 17 June 1957
Round 10
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 10.8 (68)
|
| 10.10 (70)
| Kardinia Park
| 12,456
| 22 June 1957
|- bgcolor="#FFFFFF"
|
| 9.14 (68)
|
| 14.14 (98)
| Brunswick Street Oval
| 17,500
| 22 June 1957
|- bgcolor="#FFFFFF"
|
| 11.12 (78)
|
| 16.13 (109)
| Arden Street Oval
| 14,000
| 22 June 1957
|- bgcolor="#FFFFFF"
|
| 10.15 (75)
|
| 8.11 (59)
| Junction Oval
| 21,000
| 22 June 1957
|- bgcolor="#FFFFFF"
|
| 13.10 (88)
|
| 7.19 (61)
| Punt Road Oval
| 25,000
| 22 June 1957
|- bgcolor="#FFFFFF"
|
| 14.16 (100)
|
| 9.9 (63)
| Victoria Park
| 33,345
| 22 June 1957
Round 11
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 10.9 (69)
|
| 14.8 (92)
| Kardinia Park
| 18,177
| 29 June 1957
|- bgcolor="#FFFFFF"
|
| 11.14 (80)
|
| 13.11 (89)
| Windy Hill
| 18,500
| 29 June 1957
|- bgcolor="#FFFFFF"
|
| 13.14 (92)
|
| 7.13 (55)
| Princes Park
| 21,454
| 29 June 1957
|- bgcolor="#FFFFFF"
|
| 12.15 (87)
|
| 7.9 (51)
| MCG
| 49,512
| 29 June 1957
|- bgcolor="#FFFFFF"
|
| 15.19 (109)
|
| 14.12 (96)
| Lake Oval
| 16,200
| 29 June 1957
|- bgcolor="#FFFFFF"
|
| 10.14 (74)
|
| 13.15 (93)
| Glenferrie Oval
| 27,000
| 29 June 1957
Round 12
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 17.15 (117)
|
| 10.13 (73)
| Arden Street Oval
| 21,000
| 6 July 1957
|- bgcolor="#FFFFFF"
|
| 9.11 (65)
|
| 9.10 (64)
| Western Oval
| 23,578
| 6 July 1957
|- bgcolor="#FFFFFF"
|
| 11.15 (81)
|
| 9.17 (71)
| Lake Oval
| 18,000
| 6 July 1957
|- bgcolor="#FFFFFF"
|
| 24.14 (158)
|
| 10.14 (74)
| MCG
| 21,370
| 6 July 1957
|- bgcolor="#FFFFFF"
|
| 12.16 (88)
|
| 10.13 (73)
| Windy Hill
| 26,500
| 6 July 1957
|- bgcolor="#FFFFFF"
|
| 7.10 (52)
|
| 8.13 (61)
| Glenferrie Oval
| 26,000
| 6 July 1957
Round 13
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 12.15 (87)
|
| 8.13 (61)
| Kardinia Park
| 14,806
| 13 July 1957
|- bgcolor="#FFFFFF"
|
| 7.7 (49)
|
| 6.13 (49)
| Victoria Park
| 24,216
| 13 July 1957
|- bgcolor="#FFFFFF"
|
| 11.15 (81)
|
| 10.5 (65)
| Princes Park
| 20,572
| 13 July 1957
|- bgcolor="#FFFFFF"
|
| 11.12 (78)
|
| 10.15 (75)
| Punt Road Oval
| 22,000
| 13 July 1957
|- bgcolor="#FFFFFF"
|
| 14.16 (100)
|
| 14.8 (92)
| Junction Oval
| 24,400
| 13 July 1957
|- bgcolor="#FFFFFF"
|
| 7.10 (52)
|
| 9.18 (72)
| Brunswick Street Oval
| 12,500
| 13 July 1957
Round 14
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 10.13 (73)
|
| 11.12 (78)
| Punt Road Oval
| 21,000
| 27 July 1957
|- bgcolor="#FFFFFF"
|
| 7.13 (55)
|
| 5.4 (34)
| Glenferrie Oval
| 10,000
| 27 July 1957
|- bgcolor="#FFFFFF"
|
| 9.18 (72)
|
| 11.7 (73)
| Windy Hill
| 22,500
| 27 July 1957
|- bgcolor="#FFFFFF"
|
| 13.14 (92)
|
| 6.8 (44)
| Victoria Park
| 21,316
| 27 July 1957
|- bgcolor="#FFFFFF"
|
| 11.13 (79)
|
| 7.10 (52)
| Princes Park
| 31,810
| 27 July 1957
|- bgcolor="#FFFFFF"
|
| 15.18 (108)
|
| 8.8 (56)
| Junction Oval
| 14,500
| 27 July 1957
Round 15
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 13.11 (89)
|
| 14.9 (93)
| Arden Street Oval
| 10,000
| 3 August 1957
|- bgcolor="#FFFFFF"
|
| 15.13 (103)
|
| 13.13 (91)
| Brunswick Street Oval
| 12,000
| 3 August 1957
|- bgcolor="#FFFFFF"
|
| 8.18 (66)
|
| 10.13 (73)
| MCG
| 32,163
| 3 August 1957
|- bgcolor="#FFFFFF"
|
| 7.8 (50)
|
| 12.11 (83)
| Western Oval
| 24,942
| 3 August 1957
|- bgcolor="#FFFFFF"
|
| 9.13 (67)
|
| 12.19 (91)
| Lake Oval
| 25,300
| 3 August 1957
|- bgcolor="#FFFFFF"
|
| 11.19 (85)
|
| 6.7 (43)
| Kardinia Park
| 16,808
| 3 August 1957
Round 16
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 6.6 (42)
|
| 8.13 (61)
| Western Oval
| 13,325
| 10 August 1957
|- bgcolor="#FFFFFF"
|
| 10.15 (75)
|
| 7.13 (55)
| Windy Hill
| 16,000
| 10 August 1957
|- bgcolor="#FFFFFF"
|
| 1.5 (11)
|
| 6.13 (49)
| Junction Oval
| 17,100
| 10 August 1957
|- bgcolor="#FFFFFF"
|
| 14.19 (103)
|
| 8.7 (55)
| Glenferrie Oval
| 12,000
| 10 August 1957
|- bgcolor="#FFFFFF"
|
| 8.14 (62)
|
| 8.13 (61)
| Brunswick Street Oval
| 22,000
| 10 August 1957
|- bgcolor="#FFFFFF"
|
| 11.9 (75)
|
| 7.9 (51)
| Punt Road Oval
| 22,000
| 10 August 1957
Round 17
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 8.10 (58)
|
| 10.13 (73)
| Kardinia Park
| 12,759
| 17 August 1957
|- bgcolor="#FFFFFF"
|
| 13.14 (92)
|
| 11.13 (79)
| Victoria Park
| 20,310
| 17 August 1957
|- bgcolor="#FFFFFF"
|
| 11.13 (79)
|
| 5.11 (41)
| Princes Park
| 25,945
| 17 August 1957
|- bgcolor="#FFFFFF"
|
| 11.9 (75)
|
| 9.17 (71)
| Lake Oval
| 18,100
| 17 August 1957
|- bgcolor="#FFFFFF"
|
| 13.11 (89)
|
| 14.14 (98)
| Punt Road Oval
| 19,000
| 17 August 1957
|- bgcolor="#FFFFFF"
|
| 13.7 (85)
|
| 9.10 (64)
| Glenferrie Oval
| 31,000
| 17 August 1957
Round 18
|- bgcolor="#CCCCFF"
| Home team
| Home team score
| Away team
| Away team score
| Venue
| Crowd
| Date
|- bgcolor="#FFFFFF"
|
| 10.20 (80)
|
| 17.11 (113)
| Arden Street Oval
| 10,000
| 24 August 1957
|- bgcolor="#FFFFFF"
|
| 18.12 (120)
|
| 10.11 (71)
| MCG
| 35,751
| 24 August 1957
|- bgcolor="#FFFFFF"
|
| 8.11 (59)
|
| 7.15 (57)
| Western Oval
| 25,436
| 24 August 1957
|- bgcolor="#FFFFFF"
|
| 15.14 (104)
|
| 10.20 (80)
| Brunswick Street Oval
| 10,000
| 24 August 1957
|- bgcolor="#FFFFFF"
|
| 14.12 (96)
|
| 7.14 (56)
| Junction Oval
| 29,300
| 24 August 1957
|- bgcolor="#FFFFFF"
|
| 17.21 (123)
|
| 9.8 (62)
| Windy Hill
| 35,000
| 24 August 1957
Ladder
|- style=background:#FFFFBB
| 1 || align=left | (P) || 18 || 12 || 5 || 1 || 1567 || 1129 || 138.8 || 50
|- style=background:#FFFFBB
| 2 || align=left | || 18 || 11 || 7 || 0 || 1447 || 1223 || 118.3 || 44
|- style=background:#FFFFBB
| 3 || align=left | || 18 || 11 || 7 || 0 || 1321 || 1132 || 116.7 || 44
|- style=background:#FFFFBB
| 4 || align=left | || 18 || 11 || 7 || 0 || 1341 || 1348 || 99.5 || 44
|-
| 5 || align=left | || 18 || 9 || 8 || 1 || 1390 || 1366 || 101.8 || 38
|-
| 6 || align=left | || 18 || 9 || 8 || 1 || 1263 || 1275 || 99.1 || 38
|-
| 7 || align=left | || 18 || 9 || 9 || 0 || 1506 || 1604 || 93.9 || 36
|-
| 8 || align=left | || 18 || 8 || 10 || 0 || 1404 || 1477 || 95.1 || 32
|-
| 9 || align=left | || 18 || 8 || 10 || 0 || 1318 || 1394 || 94.5 || 32
|-
| 10 || align=left | || 18 || 7 || 11 || 0 || 1349 || 1519 || 88.8 || 28
|-
| 11 || align=left | || 18 || 6 || 12 || 0 || 1355 || 1611 || 84.1 || 24
|-
| 12 || align=left | || 18 || 5 || 12 || 1 || 1368 || 1551 || 88.2 || 22
|}
Rules for classification: 1. premiership points; 2. percentage; 3. points forAverage score: 77.0Source: AFL Tables
Finals series
Semi-finals
Preliminary final
Grand final
Night Series Competition
The night series were held under the floodlights at Lake Oval, South Melbourne.
In all other years of the night competition (i.e., 1956–1971), only teams that had finished 5th to 12th on ladder at the end of the home-and-away season competed; i.e., teams which were not playing in any of the end of season finals matches.
In 1957, due to the perceived popularity of the competition's initial year (1956), all twelve VFL clubs played in the 1957 Night Series. The series was marred by bad weather, with two matches having to be abandoned. Only an average of 16,000 spectators attending each of the 11 matches that were played. In 1958, the competition reverted to the 1956 structure, where only teams finishing 5th to 12th on the ladder competed.
Final: South Melbourne 15.13 (103) defeated Geelong 8.4 (52)
Season notes
Following the successful introduction of televised sport in 1956, the VFL decides to allow the live broadcast of the last quarter of three VFL matches each Saturday afternoon. Experiments conducted in 1956 involving three "closed circuit" telecasts of three of the finals matches, and the live broadcast of the Olympic Games' demonstration match had shown that it was possible to from "wide-shots" to "close-ups" quickly enough to provide effective viewing. Each station's telecast had a principal commentator: Tony Charlton (HSV-7), Ken Dakin (ABV-2), and Ian Johnson (GTV-9).
In Round 4, Richmond defeated Fitzroy by 15 points despite having fifteen fewer scoring shots. This remains the greatest deficit in scoring shots by a winning side, though equalled by Geelong against Collingwood in 1977.
In August, learning from the success of the Olympic Games, and in an attempt to counter the problems of overnight queues outside the Melbourne Cricket Ground prior to each final, the VFL sold reserved tickets through the mail for the finals series. It was also anticipated that this would greatly assist country people, who could now book seats and accommodation well in advance.
Hawthorn made the final four for the first time since their VFL debut in 1925, ending the longest finals drought in VFL/AFL history (thirty-two years and 595 matches).
Allan Nash becomes the last umpire to officiate in all games of a finals series.
Awards
The 1957 VFL Premiership team was Melbourne.
The VFL's leading goalkicker was Jack Collins of Footscray who kicked 74 goals.
The winner of the 1957 Brownlow Medal was Brian Gleeson of St Kilda with 24 votes.
The McClelland Trophy was won by , with 173 points. Minor premiers finished second with 164.
Geelong took the "wooden spoon" in 1957.
The seconds premiership was won by . North Melbourne 14.13 (97) defeated 13.15 (93) in the Grand Final, held as a curtain raiser to the firsts Grand Final on 21 September.
References
Rogers, S. & Brown, A., Every Game Ever Played: VFL/AFL Results 1897–1997 (Sixth Edition), Viking Books, (Ringwood), 1998.
Ross, J. (ed), 100 Years of Australian Football 1897–1996: The Complete Story of the AFL, All the Big Stories, All the Great Pictures, All the Champions, Every AFL Season Reported, Viking, (Ringwood), 1996.
Sources
1957 VFL season at AFL Tables
1957 VFL season at Australian Football
Australian Football League seasons
VFL season
|
```smalltalk
"
I represent the root element in a TraitComposition.
I wrap a metaclass or classTrait to be used as a trait in a trait composition.
"
Class {
#name : 'TaClassCompositionElement',
#superclass : 'TaCompositionElement',
#category : 'Traits-Compositions',
#package : 'Traits',
#tag : 'Compositions'
}
{ #category : 'accessing' }
TaClassCompositionElement >> methods [
"As I am representing a ClassTrait I have to filter the methods that are in all the class traits"
| innerClassLocalMethods traitedClassSelectors |
innerClassLocalMethods := innerClass localMethods collect: [ :each | each selector ].
traitedClassSelectors := TraitedClass selectors.
^ super methods reject: [ :method |
| methodSelector |
methodSelector := method selector.
(innerClassLocalMethods includes: methodSelector) not and: [ traitedClassSelectors anySatisfy: [ :x | x = methodSelector ] ] ]
]
{ #category : 'accessing' }
TaClassCompositionElement >> selectors [
"As I am representing a ClassTrait I have to filter the methods that are in all the class traits"
| innerClassLocalMethods traitedClassSelectors |
innerClassLocalMethods := innerClass localMethods collect: [ :each | each selector ].
traitedClassSelectors := TraitedClass selectors.
^ super selectors reject: [ :selector |
| methodSelector |
methodSelector := selector.
(innerClassLocalMethods includes: methodSelector) not and: [ traitedClassSelectors anySatisfy: [ :x | x = methodSelector ] ] ]
]
{ #category : 'accessing' }
TaClassCompositionElement >> slots [
^ innerClass allSlots
reject: [ :e |
(Trait slots ,
TraitedClass allSlots) anySatisfy: [ :x | x name = e name ] ]
]
{ #category : 'printing' }
TaClassCompositionElement >> traitCompositionExpression [
^ innerClass instanceSide name , ' classTrait'
]
```
|
```protocol buffer
syntax = "proto3";
package clusterpb;
import "gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
message Part {
string key = 1;
bytes data = 2;
}
message FullState {
repeated Part parts = 1 [(gogoproto.nullable) = false];
}
message MemberlistMessage {
string version = 1;
enum Kind {
STREAM = 0;
PACKET = 1;
}
Kind kind = 2;
string from_addr = 3;
bytes msg = 4;
}
```
|
Heumann is a German surname. Notable people with the surname include:
Andreas Heumann (born 1946), photographer
Carl Heumann (1886–1945), German art collector
Josef Heumann (born 1964), German ski jumper
Judith Heumann (1947–2023), American disability rights activist
Milton Heumann, American political science professor
See also
Ute Lotz-Heumann (born 1966), German-American historian
Margot Heuman (born 1928), Holocaust survivor
Humann, surname
German-language surnames
|
Benjamin E. Hermalin is an American economist and university administrator. He holds professorships in the department of economics at the University of California, Berkeley and in Berkeley's Haas School of Business, where he is the Thomas & Alison Schneider Distinguished Professor of Finance. Since 2022, he has also been Berkeley's executive vice chancellor and provost.
Early life and education
Hermalin grew up in Ann Arbor, Michigan, where his father was a professor of sociology and demography and his mother was a fundraiser, both at the University of Michigan. He attended public schools in Ann Arbor before matriculating at Princeton University, where he majored in economics and was a member of Phi Beta Kappa, graduating summa cum laude with an AB in 1984. He continued his studies in economics as a doctoral candidate at the Massachusetts Institute of Technology, first as a NSF Graduate Research Fellow and then as a Sloan Foundation Fellow, receiving a PhD in 1988.
Career
Hermalin is a well-cited researcher, an expert in corporate governance and the study of organizations, especially as concerns leadership, industrial organization, and law and economics. In 1988, Hermalin joined the faculty of the department of economics and the Haas School of Business at Berkeley. During his tenure at Berkeley he has been a visiting scholar, professor, and research fellow at a number of other institutions, including the Federal Reserve Bank of San Francisco, Yale University, the Massachusetts Institute of Technology, Cornell University, and the University of Oxford (Nuffield College). Since 1998, he has been Professor of Economics at Berkeley and, since 2006, he has been the Thomas & Alison Schneider Distinguished Professor of Finance at Berkeley Haas. His research and scholarship have been sponsored by the National Science Foundation and the Gordon and Betty Moore Foundation.
Hermalin has served on the editorial boards of the American Economic Review and the Journal of Economic Literature, and, from 2010 through 2015, he was co-editor of the RAND Journal. He has been a director of the National Bureau of Economic Research since 2014.
Berkeley Administration
Hermalin's role as an administrator at Berkeley began in the mid-1990s, and, in 1999, he was appointed Associate Dean of Academic Affairs & Chair of the Faculty at the Haas School, serving for three years. In 2002, he was interim dean at Haas, and, from 2005 through 2008, he chaired Berkeley's department of economics.
From 2009 to 2012, Hermalin served on the university's budget committee and, from 2014 through 2016, on the academic senate. He was Berkeley's Vice Provost for the Faculty from 2016 until 2022, when we was appointed Executive Vice Chancellor and Provost.
References
Living people
University of California, Berkeley administrators
University of California, Berkeley College of Letters and Science faculty
21st-century American economists
Princeton University alumni
Massachusetts Institute of Technology alumni
Year of birth missing (living people)
|
```python
"""
Wavelet tree is a data-structure designed to efficiently answer various range queries
for arrays. Wavelets trees are different from other binary trees in the sense that
the nodes are split based on the actual values of the elements and not on indices,
such as the with segment trees or fenwick trees. You can read more about them here:
1. path_to_url~jperez/papers/ioiconf16.pdf
2. path_to_url
3. path_to_url
"""
from __future__ import annotations
test_array = [2, 1, 4, 5, 6, 0, 8, 9, 1, 2, 0, 6, 4, 2, 0, 6, 5, 3, 2, 7]
class Node:
def __init__(self, length: int) -> None:
self.minn: int = -1
self.maxx: int = -1
self.map_left: list[int] = [-1] * length
self.left: Node | None = None
self.right: Node | None = None
def __repr__(self) -> str:
"""
>>> node = Node(length=27)
>>> repr(node)
'Node(min_value=-1 max_value=-1)'
>>> repr(node) == str(node)
True
"""
return f"Node(min_value={self.minn} max_value={self.maxx})"
def build_tree(arr: list[int]) -> Node | None:
"""
Builds the tree for arr and returns the root
of the constructed tree
>>> build_tree(test_array)
Node(min_value=0 max_value=9)
"""
root = Node(len(arr))
root.minn, root.maxx = min(arr), max(arr)
# Leaf node case where the node contains only one unique value
if root.minn == root.maxx:
return root
"""
Take the mean of min and max element of arr as the pivot and
partition arr into left_arr and right_arr with all elements <= pivot in the
left_arr and the rest in right_arr, maintaining the order of the elements,
then recursively build trees for left_arr and right_arr
"""
pivot = (root.minn + root.maxx) // 2
left_arr: list[int] = []
right_arr: list[int] = []
for index, num in enumerate(arr):
if num <= pivot:
left_arr.append(num)
else:
right_arr.append(num)
root.map_left[index] = len(left_arr)
root.left = build_tree(left_arr)
root.right = build_tree(right_arr)
return root
def rank_till_index(node: Node | None, num: int, index: int) -> int:
"""
Returns the number of occurrences of num in interval [0, index] in the list
>>> root = build_tree(test_array)
>>> rank_till_index(root, 6, 6)
1
>>> rank_till_index(root, 2, 0)
1
>>> rank_till_index(root, 1, 10)
2
>>> rank_till_index(root, 17, 7)
0
>>> rank_till_index(root, 0, 9)
1
"""
if index < 0 or node is None:
return 0
# Leaf node cases
if node.minn == node.maxx:
return index + 1 if node.minn == num else 0
pivot = (node.minn + node.maxx) // 2
if num <= pivot:
# go the left subtree and map index to the left subtree
return rank_till_index(node.left, num, node.map_left[index] - 1)
else:
# go to the right subtree and map index to the right subtree
return rank_till_index(node.right, num, index - node.map_left[index])
def rank(node: Node | None, num: int, start: int, end: int) -> int:
"""
Returns the number of occurrences of num in interval [start, end] in the list
>>> root = build_tree(test_array)
>>> rank(root, 6, 3, 13)
2
>>> rank(root, 2, 0, 19)
4
>>> rank(root, 9, 2 ,2)
0
>>> rank(root, 0, 5, 10)
2
"""
if start > end:
return 0
rank_till_end = rank_till_index(node, num, end)
rank_before_start = rank_till_index(node, num, start - 1)
return rank_till_end - rank_before_start
def quantile(node: Node | None, index: int, start: int, end: int) -> int:
"""
Returns the index'th smallest element in interval [start, end] in the list
index is 0-indexed
>>> root = build_tree(test_array)
>>> quantile(root, 2, 2, 5)
5
>>> quantile(root, 5, 2, 13)
4
>>> quantile(root, 0, 6, 6)
8
>>> quantile(root, 4, 2, 5)
-1
"""
if index > (end - start) or start > end or node is None:
return -1
# Leaf node case
if node.minn == node.maxx:
return node.minn
# Number of elements in the left subtree in interval [start, end]
num_elements_in_left_tree = node.map_left[end] - (
node.map_left[start - 1] if start else 0
)
if num_elements_in_left_tree > index:
return quantile(
node.left,
index,
(node.map_left[start - 1] if start else 0),
node.map_left[end] - 1,
)
else:
return quantile(
node.right,
index - num_elements_in_left_tree,
start - (node.map_left[start - 1] if start else 0),
end - node.map_left[end],
)
def range_counting(
node: Node | None, start: int, end: int, start_num: int, end_num: int
) -> int:
"""
Returns the number of elements in range [start_num, end_num]
in interval [start, end] in the list
>>> root = build_tree(test_array)
>>> range_counting(root, 1, 10, 3, 7)
3
>>> range_counting(root, 2, 2, 1, 4)
1
>>> range_counting(root, 0, 19, 0, 100)
20
>>> range_counting(root, 1, 0, 1, 100)
0
>>> range_counting(root, 0, 17, 100, 1)
0
"""
if (
start > end
or node is None
or start_num > end_num
or node.minn > end_num
or node.maxx < start_num
):
return 0
if start_num <= node.minn and node.maxx <= end_num:
return end - start + 1
left = range_counting(
node.left,
(node.map_left[start - 1] if start else 0),
node.map_left[end] - 1,
start_num,
end_num,
)
right = range_counting(
node.right,
start - (node.map_left[start - 1] if start else 0),
end - node.map_left[end],
start_num,
end_num,
)
return left + right
if __name__ == "__main__":
import doctest
doctest.testmod()
```
|
Vicars Island is a small ice-covered island about off the coast of Enderby Land. It was discovered on 12 January 1930 by the British Australian New Zealand Antarctic Research Expedition (BANZARE) under Mawson. He named it after an Australian textile company which presented the expedition with cloth for uniforms.
See also
List of antarctic and sub-antarctic islands
Islands of Enderby Land
|
```c
char dispstr[];
f()
{
strcpy(dispstr,"xxxxxxxxxxx");
}
```
|
Other often refers to:
Other (philosophy), a concept in psychology and philosophy
Other or The Other may also refer to:
Film and television
The Other (1913 film), a German silent film directed by Max Mack
The Other (1930 film), a German film directed by Robert Wiene
The Other (1972 film), an American film directed by Robert Mulligan
The Other (1999 film), a French-Egyptian film directed by Youssef Chahine
The Other (2007 film), an Argentine-French-German film by Ariel Rotter
The Other (Doctor Who), a fictional character in Doctor Who
The Other (Marvel Cinematic Universe), a fictional character in the Marvel Cinematic Universe
Literature
Other: British and Irish Poetry since 1970, a 1999 poetry anthology
The Other (Applegate novel), a 2000 Animorphs novel by K.A. Applegate
The Other (Tryon novel), a 1971 horror novel by Tom Tryon
"The Other" (short story), a 1972 short story by Jorge Luis Borges
The Other, a 2008 novel by David Guterson
Spider-Man: "The Other", a 2005–2006 Marvel Comics crossover story arc
Music
The Other (band), a German horror punk band
Other (Alison Moyet album) or the title song, 2017
Other (Lustmord album), 2008
The Other (The Other album), 1997
The Other (King Tuff album), or the title song, 2018
"The Other", a song by Lauv from I Met You When I Was 18 (The Playlist), 2018
"The Other", a song by Tonight Alive from Underworld, 2018
Human name
Othoere, or Other, a contemporary of Alfred the Great
Other, father of Walter Fitz Other, castellan of Windsor in the time of William the Conqueror
Other Windsor (disambiguation), several people
Other Robert Ivor Windsor-Clive, 3rd Earl of Plymouth (1923–2018)
Other C. Wamsley, a builder in Hamilton, Montana
The Other (Doctor Who), a fictional character
Other uses
Other Music, a defunct music store in New York City
OtherOS, a feature available in early versions of the PlayStation 3 console
See also
Another (disambiguation)
Others (disambiguation)
Otherness (disambiguation)
|
José Luis Pérez (born 18 June 1943) is a Mexican equestrian. He was born in Tonalá, Jalisco. He won a bronze medal in team eventing at the 1980 Summer Olympics in Moscow. He also competed at the 1976 Summer Olympics.
References
1943 births
Living people
Sportspeople from Jalisco
Mexican male equestrians
Olympic equestrians for Mexico
Olympic bronze medalists for Mexico
Equestrians at the 1976 Summer Olympics
Equestrians at the 1980 Summer Olympics
Olympic medalists in equestrian
Medalists at the 1980 Summer Olympics
20th-century Mexican people
21st-century Mexican people
|
```go
package fivehundredpx
import (
"fmt"
"net/url"
"github.com/zquestz/s/providers"
)
func init() {
providers.AddProvider("500px", &Provider{})
}
// Provider merely implements the Provider interface.
type Provider struct{}
// BuildURI generates a search URL for 8tracks.
func (p *Provider) BuildURI(q string) string {
return fmt.Sprintf("path_to_url", url.QueryEscape(q))
}
// Tags returns the tags relevant to this provider.
func (p *Provider) Tags() []string {
return []string{"photos"}
}
```
|
Thiongori is a village in the Coalla Department of Gnagna Province in eastern Burkina Faso. The village has a population of 442.
References
Populated places in the Est Region (Burkina Faso)
Gnagna Province
|
```c++
// 2000-01-01 bkoz
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// 17.4.1.2 Headers, cstring
#include <cstring>
int main(void)
{
// Make sure size_t is in namespace std
std::size_t i = std::strlen("tibet shop/san francisco (415) 982-0326");
return 0;
}
```
|
James "Bruiser" Flint (born July 23, 1965) is an American men's college basketball coach, currently an assistant coach at Kentucky. He was most recently the head coach at Drexel University in west Philadelphia, where he was born and raised.
Collegiate playing career
Flint is a 1987 graduate of Saint Joseph's University. While attending St. Joe's, Flint was a member of the school's varsity basketball team. Flint was named to the all-Atlantic 10 team as a senior, and was inducted into the St. Joe's athletic hall of fame in 1988.
Early coaching career
In 1987, Flint became an assistant coach at Coppin State University. Two years later, Flint became an assistant coach under John Calipari at the University of Massachusetts Amherst (or UMass). After Calipari left UMass for the NBA in 1996, Flint was named his successor, becoming the school's 17th head coach. While coach of the Minutemen, Flint compiled an overall record of 86–72. He won an NABC District Coach of the Year award in 1998. Facing pressure after being unable to maintain the Minutemen's level of success that they enjoyed under Calipari, Flint resigned from UMass after the 2000–01 season.
Later coaching career
Flint became the head coach at Drexel on April 5, 2001, succeeding Steve Seymour, who had been fired that March after failing to make the NCAA Tournament in either of his two seasons as head coach. Flint's hiring at Drexel coincided with Drexel's move from the America East Conference, where the school had enjoyed a sustained level of success under former head coach Bill Herrion, to the Colonial Athletic Association (or CAA).
During his tenure at Drexel, Flint was named CAA coach of the year four times (2002, 2004, 2009, 2012). He also won an NABC District Coach of the Year award three times (2007, 2009, 2012). Under Flint, Drexel made five NIT appearances. In 2012, the school won its first CAA Regular Season Championship in 2012, but lost to VCU in the finals of the Conference Tournament. On Selection Sunday, Drexel narrowly missed an at-large berth in the NCAA Tournament. On March 7, 2016, following the end of Drexel's season, Flint was fired as head basketball coach after 15 seasons with the team. At the time of his firing, he was the all–time winningest coach in Drexel basketball history.
Head coaching record
References
External links
1965 births
Living people
African-American basketball coaches
African-American basketball players
American men's basketball coaches
American men's basketball players
Basketball coaches from Pennsylvania
Basketball players from Philadelphia
College men's basketball head coaches in the United States
Coppin State Eagles men's basketball coaches
Drexel Dragons men's basketball coaches
Episcopal Academy alumni
Indiana Hoosiers men's basketball coaches
Kentucky Wildcats men's basketball coaches
Saint Joseph's Hawks men's basketball players
UMass Minutemen basketball coaches
21st-century African-American people
20th-century African-American sportspeople
|
Tales from Space: About a Blob is a side-scrolling puzzle-platform game about a race of alien Blobs developed and published by DrinkBox Studios for the PlayStation 3 video game console. The game has a retro-inspired monster-movie art style and local co-op gameplay.
The title was originally released on the PlayStation Network for PlayStation Plus users on February 1, 2011, and subsequently released for general download for the North American PSN on February 8, 2011, and Europe on February 9, 2011. A free downloadable content costume editor was released in an update on March 8, 2011 where players can dress their Blobs in various outfits.
The sequel, Tales from Space: Mutant Blobs Attack, was released in February 2012 as a launch title for the PlayStation Vita.
Gameplay
The player controls a gelatinous Blob character who has a range of abilities that are unlocked over the course of the game. The controls include those of a typical platformer with the addition of digestion (absorb/shoot objects), magnetism (repulse/attract) and electricity (gain/deplete). The game itself is split into 4 Tiers comprising 17 levels. Over the course of a level a player received target sizes that must be reached by locating and absorbing surrounding objects. Larger objects can be absorbed when the Blob increases in size. Target sizes are treated as sections within a level where a player must traverse platforms, solve puzzles, and fight enemies in order to proceed.
Story
The game involves a species of interstellar gelatinous blobs that travel the universe looking for their next meal. These blobs end up on a distant Earthlike planet that has fallen prey to mass industrialization. Upon landing on this planet the main Blob, which is controlled by the player, is captured by an evil scientist and must then begin the task of escaping, saving fellow Blob friends, and cleaning the planet.
Reception
Tales from Space: About a Blob was generally well received from critics, earning a Metacritic score of 76/100. Major review such as sites IGN and Eurogamer both gave the game an 8/10 due to its "eye-catching art style" and "fresh ideas and powers that evolve the gameplay at the right time". Most noted was the game's unique art style and magnetic power. There were critics who felt the gameplay was too short - a total of 17 levels, along with bouts of frustration when precise platforming was required.
References
External links
2011 video games
Cooperative video games
DrinkBox Studios games
Multiplayer and single-player video games
PlayStation 3 games
PlayStation 3-only games
PlayStation Network games
Puzzle-platform games
Science fiction video games
Side-scrolling video games
Video games about extraterrestrial life
Video games developed in Canada
Video games set on fictional planets
|
```smalltalk
/* ====================================================================
contributor license agreements. See the NOTICE file distributed with
this work for Additional information regarding copyright ownership.
path_to_url
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
==================================================================== */
/* ================================================================
* About NPOI
* Author: Tony Qu
* Author's email: tonyqus (at) gmail.com
* Author's Blog: tonyqus.wordpress.com.cn (wp.tonyqus.cn)
* HomePage: path_to_url
* Contributors:
*
* ==============================================================*/
using System.IO;
namespace NPOI.Util
{
internal class CloseIgnoringInputStream : Stream
{
private Stream _is;
public CloseIgnoringInputStream(Stream stream)
{
_is = stream;
}
public int Read()
{
return (int)_is.ReadByte();
}
public override int Read(byte[] b, int off, int len)
{
return _is.Read(b, off, len);
}
public override void Close()
{
// do nothing
}
public override void Flush()
{
}
public override long Seek(long offset, SeekOrigin origin)
{
return 0L;
}
public override void SetLength(long value)
{
}
// Properties
public override bool CanRead
{
get
{
return true;
}
}
public override bool CanSeek
{
get
{
return true;
}
}
public override bool CanWrite
{
get
{
return false;
}
}
public override long Length
{
get
{
return this._is.Length;
}
}
public override long Position
{
get
{
return this._is.Position;
}
set
{
this._is.Position = value;
}
}
public override void Write(byte[] buffer, int offset, int count)
{
}
}
}
```
|
Vista High School is a public high school in Vista, California, United States. Vista is located in North San Diego County. The Vista Unified School District encompasses a large geographic area. As such, it serves the needs of students from the cities of Vista, Bonsall, San Marcos, Oceanside, and Carlsbad. Vista High School is one of the largest schools in California, holding over 3,000 students, though its current campus was originally built in 1972 to educate 1,200 students. It was first established in 1936.
Academics
In 1982, VHS was the first high school in San Diego County to adopt the International Baccalaureate Program.
Athletics
The school's football stadium is named after former coach Dick Haines, a successful Vista High coach who led the 1974 and 1985 Vista High School football teams to state championships. The Panthers have won the CIF championship nine times. To date, the school has produced five NFL players.
Notable alumni
Russell Allen, Jacksonville Jaguars linebacker
Sal Aunese, University of Colorado Quarterback
Trevor Cahill, San Francisco Giants pitcher
Michael Damian, singer, songwriter & actor.
Travis Goethel, Oakland Raiders linebacker
Lorena Gonzalez, State Assemblywoman for California's 80th State Assembly district
Micheal Guy, In Fear and Faith keyboardist
Leon Hall, Cincinnati Bengals, cornerback
Korey Lee, Houston Astros, catcher
Karenssa LeGear, actress
Wes Littleton, Seattle Mariners pitcher
Michael Lumpkin, Assistant Secretary of Defense, Special Operation and Low Intensity Conflict
Clive Matson, Poet and Creative Writing Teacher
Stefan McClure, Washington Redskins safety
Carrie Prejean, Miss California USA 2009
Cove Reber, Saosin lead singer
Alan S. Thompson, retired U.S. Navy Vice Admiral and former Director of the U.S. Defense Logistics Agency
Pisa Tinoisamoa, Chicago Bears linebacker
Dave Roberts, Los Angeles Dodgers manager
Joey Bradford, The Used Lead Guitarist
Nik Ewing, Local Natives Vocals, Bass, Keyboard
References
http://www.vistausd.org/history
External links
School website
International Baccalaureate schools in California
High schools in San Diego County, California
1936 establishments in California
Educational institutions established in 1936
Public high schools in California
Vista, California
|
Maria Elizabeth Ender, better known as Mariska Veres () (1 October 1947 – 2 December 2006), was a Dutch singer who was best known as the lead singer of the rock group Shocking Blue. Described as being similar to a young Cher, she was known for her sultry voice, eccentric performances, and her striking appearance which featured kohl-rimmed eyes, high cheekbones, and long jet black hair, which was actually a wig.
Biography
Family
Veres was born in The Hague, in the Netherlands. Her father was the Hungarian Romani violinist Lajos Veres (1912–1981), and her mother Maria Ender (1912–1986) was of French and Russian heritage.
Singing career
Veres began her career as a singer in 1963 with the guitar band Les Mysteres. In 1964 the band recorded an EP (GTB-label, 10 copies only) with Veres singing on side 1: "Summertime" (solo) and "Someone" (a duet). In 2010 the EP was re-released by record club Platenclub Utrecht (PLUT 009). In 1965, she sang with the Bumble Bees, and then with the Blue Fighters, Danny and his Favourites and General Four. Later in 1966 she sang with the Motowns with whom she also played organ.
In 1968, she was invited to join Shocking Blue to replace lead singer Fred de Wilde, who had to join the army. In 1969/1970 Shocking Blue gained worldwide fame with the hit single "Venus". The month of their arrival in the United States gossip columnist Earl Wilson referred to Veres as a 'beautiful busty girl'.
When Shocking Blue split up on 1 June 1974, Veres continued in a solo career. Her singles "Take Me High" (1975) and "Lovin' You" (1976) were popular mainly in the Netherlands, Belgium, and Germany. She also released the singles "Tell It Like It Is" (1975), a cover version of Dusty Springfield's "Little By Little" (1976), and "Too Young" (1978).
Shocking Blue reunited in 1984. This comeback turned out to be successful, but one of the other original members, Robbie van Leeuwen, stepped back from the group, partly because he had moved to Luxembourg but also due to the success of Bananarama's cover of "Venus".
Veres started the jazz group The Shocking Jazz Quintet in 1993, and recorded an album (Shocking You) with pop songs from the 1960s and 1970s, now in a jazz version. From 1993 to 2006 she performed in yet another reincarnation of Shocking Blue (recorded the songs Body and Soul and Angel, both produced by former member Robbie van Leeuwen), and also recorded an album with Andrei Serban in 2003, named Gipsy Heart, going back to her Romani roots.
A version of "Venus" was posthumously released in 2007, a few months after her death, recorded with pianist/bandleader Dolf de Vries (on the album Another Touch). Veres recorded "Venus" four times: with "Shocking Blue" (1969), with the "Mariska Veres Shocking Jazz Quintet" (1993), with "Formula Diablo" (in English/Spanish, 1997), and with "Dolf de Vries" (a lounge version of "Venus", 2005–2006).
Personal life and death
Veres had a long-term relationship with guitarist , but never married or had children. Reminiscing to the Belgian magazine Flair, she remarked about her early fame: "I was just a painted doll (back in those days), nobody could ever reach me. Nowadays, I am more open to people".
Veres died of gallbladder cancer on 2 December 2006 at age 59, just three weeks after the disease had been detected.
Discography
Solo singles
1975 "Take Me High/I Am Loving You" (Pink Elephant, Polydor, Decca)
1976 "Tell It Like It Is/Wait Till' I Get Back to You" (Pink Elephant, Polydor)
1976 "Loving You/You Showed Me How" (Pink Elephant)
1977 "Little by Little/Help the Country" (Pink Elephant)
1978 "Too Young/You Don't Have to Know" (Seramble)
1978 "Bye Bye to Romance/It's a Long Hard Road" (CNR)
1980 "Looking Out for Number One/So Sad Without You" (CNR)
1982 "Wake Up City/In the Name of Love" (EMI Records)
Albums
1993 Shocking You (Red Bullet), album by Mariska Veres Shocking Jazz Quintet
2003 Gipsy Heart (Red Bullet), album by Mariska Veres & Ensemble Andrei Serban
References
External links
1947 births
2006 deaths
Deaths from cancer in the Netherlands
Dutch contraltos
Dutch people of French descent
Dutch people of Hungarian descent
Dutch people of Russian descent
Dutch Romani people
English-language singers from the Netherlands
Women rock singers
Musicians from The Hague
People of Hungarian-Romani descent
Romani singers
20th-century Dutch women singers
21st-century Dutch women singers
21st-century Dutch singers
Deaths from gallbladder cancer
|
"Personal Jesus" is the tenth episode of the fourteenth season of the American medical drama television series Grey's Anatomy and the 303rd episode overall. It aired on ABC on January 25, 2018. The episode was written by former E.R. physician and writer Zoanne Clack and directed by Kevin Rodney Sullivan. "Are You With Me" by Nilu was featured in this episode.
Plot
With Paul recovering from his injuries from a hit and run, Meredith questions the alibi that Alex and Jo provide her. Believing that it’s his fiancé, Jenny, who ran him over, Jo consults her. She offers Jenny support and prompts her to formally press domestic abuse charges against Paul. Meredith is later informed by the police that the perpetrator was a drunk driver and has been arrested. While Jo and Jenny go to Paul’s room to announce they are taking him to court, in a bout of rage he ends up falling out of his bed and knocking himself out, becoming brain dead. Still legally his wife, Jo decides to take him off life support and have his organs donated.
April’s patient turns out to be the pregnant wife of her ex-fiance, Matthew, proving to be more than an awkward situation as she helps deliver their baby. She offers Matthew an apology for her past actions but realizes that he has moved on from her and is happy with his life. Matthew's wife suffers from an internal bleed and is rushed into surgery. April later watches him deal with her unexpected death and is informed about the death of her other patients. She ends up in the shower with Roy, an intern, after she finds herself questioning her faith.
Jackson and Bailey treat a 12-year-old patient who had been shot by police on the grounds of racial profiling. Meanwhile, Maggie organizes a science camp for Bailey's son, Tucker and his friends. The eventual death of the patient prompts Bailey and Ben to have "the talk" about racial profiling and police brutality with Tucker.
Production
The episode was written by Zoanne Clack and directed by Kevin Rodney Sullivan.
Reception
Ratings
The episode aired on American Broadcasting Company on January 25, 2018. Upon initial release, it was viewed by 8.62 million people, an increase of 0.35 million from the previous installment and the mid-season premiere "1-800-799-7233"; it also garnered a season-best 2.3/9 Nielsen rating. "Personal Jesus" was also the week's second most watched drama and ranked seventh on the list of most watched television programmes overall. The 8.62 million audience was also the largest for Grey's Anatomy in over a year.
Reviews
"Personal Jesus" opened to positive reviews from television critics; commentators highlighted Drew and Luddignton for their respective performances and the treatment of such socially relevant stories as domestic abuse and police brutality in the United States. Lacey Vorrasi-Banis of Entertainment Weekly positively reviewed April's character development, and noted that she "is in the darkest place we’ve ever seen her". She was also appreciative of the episode titlewhich she thought was appropriate and the biblical inspiration of the April's story. TVFanatics Jasmine Blu thought of "Personal Jesus" as one of the series' best episodes in a long time; she lauded Drew for her performance writing that the storyline gave her "the room to show off her range and excel". The view was echoed by Maggie Fremont of Vulture, who was hopeful that the episode, Drew's performance in particular, would change the perception towards her character for the good. She also praised the return of Bruening's character and the closure offered to him. Also appreciating the April's development over the course of the episode, she noted that the character's "dark" side is new territory for Grey’s Anatomy.
References
Grey's Anatomy (season 14) episodes
2018 American television episodes
|
George W. Breslauer (born March 4, 1946, in New York City, NY) is an academic in the field of social sciences and the former executive vice chancellor and provost of UC Berkeley.
Introduction
Breslauer is a specialist on Soviet and Russian politics and foreign relations, within the field of political science. He is the author or editor of twelve books on these topics. He joined the faculty of the department of political science at The University of California, Berkeley in 1971, rising to full professor (1990–2014) and retiring to the honorific position of professor of the graduate school in 2014.
He is the older brother of chemist Kenneth Breslauer and the brother-in-law, through his sister, of Bob Frankford.
Education
Breslauer has BA (1966), MA (1968), and PhD (1973) in political science from the University of Michigan. He also holds a certificate in Russian studies (1968).
Awards and recognition
In 1997, he was awarded the Distinguished Teaching Award of the Social Sciences Division of UC Berkeley. In 1998, he was appointed chancellor's professor at UC Berkeley for “combining distinguished achievement at the highest level in research, teaching, and service.” In 2014 he was elected Fellow of the American Academy of Arts and Sciences. In 2015, he received from the UC Berkeley Academic Senate the Clark Kerr Award for distinguished leadership in higher education.
Noteworthy positions
Breslauer has held positions with the following organizations:
At UC Berkeley:
Chair of the Center for Slavic and East European Studies (1984–1994)
Chair of the department of political science (1993–1996)
Dean of the Division of Social Sciences (1999–2006)
Executive dean of the College of Letters and Sciences (2005–2006)
Executive vice chancellor and provost (2006–2014)
Faculty director, The Magnes Collection of Jewish Art and Life (2015–present)
Within the profession:
Editor, Post-Soviet Affairs (1992–2015)
Board of trustees of the National Council for Soviet and East European Research (1985–1991; vice chairman, 1988–1991)
Committee on the Contributions of the Social and Behavioral Sciences to the Prevention of Nuclear War, the National Research Council
Board of directors of the American Association for the Advancement of Slavic Studies (1990–1993; executive committee, 1991–1993)
Professional memberships
American Political Science Association
American Association for the Advancement of Slavic Studies
Association for Slavic, East European, and Eurasian Studies
World Affairs Council of Northern California
Pacific Council on International Policy
Council on Foreign Relations (New York)
American Academy of Arts and Sciences
Grants and fellowships
Breslauer has been the recipient of the following grants and fellowships since earning his Ph.D.:
The Hoover Institution
The American Association for the Advancement of Slavic Studies
The National Council for Soviet and East European Research
Ford Foundation
The Rockefeller Foundation
The Carnegie Corporation
National Academy of Sciences
National Research Council
References
About
Бреслауэр Джордж Уильям // Иванян Э. А. Энциклопедия российско-американских отношений. XVIII-XX века. — Москва: Международные отношения, 2001. — 696 с. — .
External links
Heilberg Breslauer Addenda at the Leo Baeck Institute New York
University of California, Berkeley College of Letters and Science faculty
University of California, Berkeley administrators
Living people
University of Michigan College of Literature, Science, and the Arts alumni
1946 births
|
Hydroporus mannerheimi is a species of predaceous diving beetle in the family Dytiscidae. It is found in North America.
References
Further reading
Dytiscidae
Articles created by Qbugbot
Beetles described in 1944
|
The 1968–69 season was the 45th season in the existence of AEK Athens F.C. and the tenth consecutive season in the top flight of Greek football. They competed in the Alpha Ethniki, the Greek Cup and the European Cup. The season began on 18 September 1968 and finished on 15 June 1969.
Overview
The season found AEK in a transitional period with the changing of the coach, as the way of training the football players changed radically. The championship win in 1968 was accompanied by the departure of Jenő Csaknády and the arrival of an equally capable coach was deemed imperative. Thus, the great Yugoslav Branko Stanković was hired, who had already presented great achievements as a technician, with Vojvodina and as a member of the coaching staff at Yugoslavia. The management of the team, due to a lack of sufficient money, did not proceed with big transfer moves. They acquired a couple of young footballers from smaller clubs, while also counted on players such Lavaridis, Stathopoulos, Simigdalas, Sevastopoulos, Ventouris, who were previously decommissioned. The preparation of the team under Stanković was based on the modern football of the period, which was characterized by tactics, technique and physical strength, while the discipline of the footballers was a prerequisite for their progress, as well as that of the team. However, due to the players had not yet adapted to the new way of working to fully respond, the several injuries that limited the options and the advanced age of some of them, AEK started very badly in the championship. Afterwards, they continued with five consecutive victories. One of these was an emphatic 2–3 away win against Olympiacos with Papaioannou playing as goalkeeper from the 85th minute, due to the suspension of Serafidis and even making two great saves and securing the great victory.
For the first round of the European Cup AEK were lucky to be drawn against Jeunesse Esch from Luxembourg. At Nea Filadelfeia, the club prevailded harder than the final 3–0 implied. The qualification was at safety and the rematch became purely procedural. At Luxembourg, the suspense of qualification lasted for 16 minutes when AEK equalized the quick goal of Jeunesse Eschs. AEK also managed to take the lead with a second goal by Ventouris, but the players of Legrand showing character evenatully turned the match again taking the victory. In the second round AEK were facing the Danish Akademisk Boldklub. At AEK Stadium, despite their offensive style of play, AEK played defensively for the whole match and managed to take the draw by 0–0. At the rematch in the frozen Copenhagen, AEK started the match very offensively and managed to take the lead early on with Stamatiadis. The Danes started to press unbearably to equalize, but thanks to Konstantinidis and Vasiliou, AEK went for the half time break with their lead intact. In the second half the "yellow blacks" took advantage of the open spaces left by the Danes and played to extend their lead. Αt the 81st minute, after a cross by Sevastopoulos and Papaioannou with his unnatural jump, beat everyone in the air and made the final 0–2. AEK achieved the very first display of a Greek team in Europe, as they became the first team to achieve an away victory in a European match and the first Greek team to reach the quarter-finals of the European Cup, or in any European competition at all. In the quarter-finals AEK avoided all the giants of the draw as they faced the Czechoslovakian Spartak Trnava. At the first match at Spartak Stadium AEK played to maintain a favourable score for the rematch and after they withstood the pressure of the Czechoslovaks and despite the two goals, they managed to reduce their lead with Sevastopoulos and achieve their target. The rematch in Athens, AEK seemed ready to respond to their challenge and take the qualification. Unfortunately, after a quick goal by the Czechoslovaks, the "yellow-blacks" were forced to chase the score, as Spartak closed all spaces behind. AEK attacked with everything they got by the Czechoslovak defense seemed impenetrable. Nonetheless, at the 77th minute AEK managed to equalize with Papaioannou and had only 13 minute to take the match to the extra time. Even though the team pressed intensively for another goal the ball would not go in the net and AEK left the tournament with pride, as they made one of their greatest ever achievements reality.
In the Cup AEK easily eliminated Lamia, at the round of 32 with 5–0 at home. At the round of 16 they faced Panachaiki and were eliminated with a 4–2 away defeat. AEK were consistently close in claiming the title, until they were defeated at home 0–1 by Olympiacos at the 22nd matchday. The end of the championship found AEK in the 6th place with 74 points and a long distance from the champion Panathinaikos with 90 points. As a result, they didn't qualify in any European competition for the next season. At the end of the season, Stanković planned a big renewal of the team's roster in order to improve their weaknesses and make their comeback in claiming titles. The principles of this renewal were based in finding players that would increase the team's height, reduce the team's age average and discipline to the coach's plan during matches.
Players
Squad information
NOTE: The players are the ones that have been announced by the AEK Athens' press release. No edits should be made unless a player arrival or exit is announced. Updated 15 June 1969, 23:59 UTC+2.
Transfers
In
Out
Loan out
Overall transfer activity
Expenditure: ₯120,000
Income: ₯0
Net Total: ₯120,000
Pre-season and friendlies
Competitions
Alpha Ethniki
League table
Results summary
Results by Matchday
Fixtures
Greek Cup
Matches
European Cup
First Round
Second Round
Quarter-finals
Statistics
Squad statistics
! colspan="11" style="background:#FFDE00; text-align:center" | Goalkeepers
|-
! colspan="11" style="background:#FFDE00; color:black; text-align:center;"| Defenders
|-
! colspan="11" style="background:#FFDE00; color:black; text-align:center;"| Midfielders
|-
! colspan="11" style="background:#FFDE00; color:black; text-align:center;"| Forwards
|-
! colspan="11" style="background:#FFDE00; color:black; text-align:center;"| Left during season
|-
|}
Hat-tricks
Numbers in superscript represent the goals that the player scored.
Disciplinary record
|-
! colspan="17" style="background:#FFDE00; text-align:center" | Goalkeepers
|-
! colspan="17" style="background:#FFDE00; color:black; text-align:center;"| Defenders
|-
! colspan="17" style="background:#FFDE00; color:black; text-align:center;"| Midfielders
|-
! colspan="17" style="background:#FFDE00; color:black; text-align:center;"| Forwards
|-
! colspan="17" style="background:#FFDE00; color:black; text-align:center;"| Left during season
|}
References
External links
AEK Athens F.C. Official Website
AEK Athens F.C. seasons
AEK Athens
|
```yaml
build:
template_file: test-win-cuda-opt-base.tyml
dependencies:
- "node-package-gpu"
- "test-training_16k-linux-amd64-py36m-opt"
test_model_task: "test-training_16k-linux-amd64-py36m-opt"
system_setup:
>
${system.sox_win} && ${nodejs.win.prep_12}
args:
tests_cmdline: "${system.homedir.win}/DeepSpeech/ds/taskcluster/tc-electron-tests.sh 12.x 9.2.0 16k cuda"
metadata:
name: "DeepSpeech Windows AMD64 CUDA ElectronJS MultiArch Package v9.2 tests"
description: "Testing DeepSpeech for Windows/AMD64 on ElectronJS MultiArch Package v9.2, CUDA, optimized version"
```
|
```html
<div id="main" class="appsMain">
<div class="d-flex align-items-center">
<nav aria-label="breadcrumb">
<ol id="playbookBreadcrumbs" class="breadcrumb">
<li *ngIf="filesLoaded" class="breadcrumb-item">
Manage Application - <span class="">{{ currentApp.name }}</span>
<button type="button" class="btn btn-sm btn-primary ml-3" (click)="buildImage()">Rebuild Image</button>
</li>
</ol>
</nav>
</div>
<div class="row">
<div class="col-md-3">
<div id="tree" class="h-100 pr-4"></div>
</div>
<div *ngIf="filesLoaded" class="col-md-9 appEditorContainer">
<!-- Graph editor toolbar -->
<div id="playbookToolbar" class="btn-toolbar d-flex align-items-center" role=toolbar>
<div class="btn-group" role="group">
<button id="save-button" type="button" class="btn btn-default" placement="bottom-left"
ngbTooltip="Save" [disabled]="!fileChanged" (click)="saveFile()">
<i class="fa fa-save"></i>
</button>
</div>
<div class="btn-group" role="group">
<button id="undo-button" type="button" class="btn btn-default" placement="bottom-left"
ngbTooltip="Undo" [disabled]="!currentFile"
(click)="undo()">
<i class="fa fa-undo"></i>
</button>
</div>
<div class="btn-group" role="group">
<button id="redo-button" type="button" class="btn btn-default" placement="bottom-left"
ngbTooltip="Redo" [disabled]="!currentFile"
(click)="redo()">
<i class="fa fa-repeat"></i>
</button>
</div>
<!-- <div class="btn-group" role="group">
<button id="copy-button" type="button" class="btn btn-default" placement="bottom-left"
ngbTooltip="Copy" [disabled]="!loadedWorkflow" (click)="copy()">
<i class="fa fa-copy"></i>
</button>
</div>
<div class="btn-group" role="group">
<button id="paste-button" type="button" class="btn btn-default" placement="bottom-left"
ngbTooltip="Paste" [disabled]="!loadedWorkflow" (click)="paste()">
<i class="fa fa-paste"></i>
</button>
</div> -->
<nav class="ml-auto" aria-label="breadcrumb">
<ol id="playbookBreadcrumbs" class="breadcrumb py-0 px-3 d-flex align-items-center">
<li class="breadcrumb-item text-secondary">{{ currentFile }}<span *ngIf="fileChanged">*</span></li>
</ol>
</nav>
</div>
<ngx-codemirror #editorArea [(ngModel)]="content" [options]="options"></ngx-codemirror>
</div>
</div>
</div>
```
|
Teodora Duhovnikova (; née Ivanova; born 14 December 1977) is a Bulgarian actress. She is best known for her roles in the BNT series Undercover (2011–2013). She is also known for her roles in Boyka: Undisputed (2016) and Omnipresent (2017).
Early life and education
Duhovnikova was born on 14 December 1977 in Sofia, Bulgaria. She graduated from the National School for Ancient Languages and Cultures, and later from the National Academy for Theatre and Film Arts.
Selected filmography
Film
Television
Voice
References
External links
1977 births
Living people
Actresses from Sofia
21st-century Bulgarian actresses
Bulgarian film actresses
Bulgarian stage actresses
Bulgarian voice actresses
National Academy for Theatre and Film Arts alumni
|
```python
A simple way to select a random item from a `list/tuple` data stucture
Built-in `list` methods
Using a `list` as a `stack`
Best way to implement a simple `queue`
There is more to copying
```
|
```javascript
module.exports = (req, res) => res.end('42');
```
|
Robert Francis Green (November 14, 1861 – October 5, 1946) was a Canadian businessman and Conservative politician, born in Peterborough, Canada West. From 1893 to 1897, Green served three terms as mayor of Kaslo, British Columbia. He was a member of the Legislative Assembly of British Columbia from 1898 to 1907, representing the ridings of first West Kootenay-Slocan then Kaslo. After the 1903 BC elections, Green was part of the government of Richard McBride, and was appointed Minister of Mines, Education, and Lands and Works, and Provincial Secretary.
He was elected MP for Kootenay in 1912 and re-elected in the successor riding Kootenay West in 1917. At the end of that term in 1921, he was appointed to the Senate, where he served until his death at the age of 86.
References
External links
Conservative Party of Canada (1867–1942) MPs
Members of the House of Commons of Canada from British Columbia
British Columbia Conservative Party MLAs
1861 births
1946 deaths
Canadian senators from British Columbia
Conservative Party of Canada (1867–1942) senators
Mayors of places in British Columbia
|
```javascript
class SentinlLog {
constructor($log) {
this.$log = $log;
}
initLocation(locationName) {
this.locationName = locationName;
}
warn(...args) {
this.$log.warn([this.locationName], ...args);
}
error(...args) {
this.$log.error([this.locationName], ...args);
}
debug(...args) {
this.$log.debug([this.locationName], ...args);
}
info(...args) {
this.$log.info([this.locationName], ...args);
}
}
export default SentinlLog;
```
|
```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 com.haulmont.cuba.web.widgets.client.passwordfield;
import com.vaadin.shared.ui.passwordfield.PasswordFieldState;
import com.vaadin.shared.Connector;
import com.vaadin.shared.annotations.NoLayout;
import com.vaadin.shared.ui.textfield.AbstractTextFieldState;
public class CubaPasswordFieldState extends PasswordFieldState {
public boolean autocomplete = false;
@NoLayout
public Connector capsLockIndicator;
@NoLayout
public String htmlName = null;
}
```
|
"Count the Ways" (2019) is a song by Canadian country artist Jade Eagleson.
Count the Ways may also refer to:
Count the Ways (novel), by Joyce Maynard (2021)
"Count the Ways", a song by Close to Home from their 2011 album Never Back Down
Count the Ways from Funtime Freddy
See also
Let Me Count the Ways (disambiguation)
|
```java
//your_sha256_hash--------------------------------//
// //
// K e y C o l u m n //
// //
//your_sha256_hash--------------------------------//
// <editor-fold defaultstate="collapsed" desc="hdr">
//
//
// This program is free software: you can redistribute it and/or modify it under the terms of the
//
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// program. If not, see <path_to_url
//your_sha256_hash--------------------------------//
// </editor-fold>
package org.audiveris.omr.sheet.key;
import org.audiveris.omr.constant.ConstantSet;
import org.audiveris.omr.math.Clustering;
import org.audiveris.omr.math.Population;
import org.audiveris.omr.sheet.Part;
import org.audiveris.omr.sheet.Scale;
import org.audiveris.omr.sheet.Staff;
import org.audiveris.omr.sheet.SystemInfo;
import org.audiveris.omr.sheet.key.KeyBuilder.ShapeBuilder;
import org.audiveris.omr.sig.inter.KeyInter;
import org.audiveris.omr.util.ChartPlotter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
/**
* Class <code>KeyColumn</code> manages the system consistency for a column of staff-based
* KeyBuilder instances.
* <p>
* First, each staff header in the system is independently searched for peaks, then slices.
* For each staff slice, a connected component is first looked up (phase #1) and, if
* unsuccessful, then a hard slice-based glyph is searched (phase #2).
* <p>
* Second, it is assumed that, within the same containing system:
* <ol>
* <li>All staff key signatures start at similar abscissa offset since measure start,
* <li>All staff key slices have similar widths across staves, even between small and standard
* staves, and regardless of key alter shape (SHARP, FLAT or NATURAL),
* <li>Slices are allocated based on detected ink peaks within header projection.
* Hence, an allocated slice indicates the presence of ink (i.e. a slice is never empty).
* <li>Sharp-based and flat-based keys can be mixed in a system, but not within the same part.
* <li>The number of key items may vary across staves, but not within the same part.
* <li>The longest key signature defines an abscissa range which, whatever the system staff, can
* contain either a key signature or nothing (no ink).
* <li>If a slice content in a key area cannot be recognized as key item although it contains ink,
* this slice is marked as "stuffed".
* The corresponding slice within the other staves cannot contain any key item either and are thus
* also marked as "stuffed".
* <li>In a staff, any slice following a stuffed slice is also a stuffed slice.
* </ol>
* At system level, we make sure that all staves in any multi-staff part have the same key
* signature, by "replicating" the best signature to the other staff (or staves) in the part.
* <p>
* Example of key shapes mixed in the same system:<br>
* <img src="doc-files/IMSLP00693-1-MixedKeyShapesInSystem.png"
* alt="Key shapes mixed in the same system">
*
* @author Herv Bitteur
*/
public class KeyColumn
{
//~ Static fields/initializers your_sha256_hash-
private static final Constants constants = new Constants();
private static final Logger logger = LoggerFactory.getLogger(KeyColumn.class);
//~ Instance fields your_sha256_hash------------
/** Related system. */
private final SystemInfo system;
/** Scale-dependent parameters. */
private final Parameters params;
/** Map of key builders. (one per staff) */
private final Map<Staff, KeyBuilder> builders = new TreeMap<>(Staff.byId);
/** Theoretical abscissa offset for each slice. */
private List<Integer> globalOffsets;
//~ Constructors your_sha256_hash---------------
/**
* Creates a new <code>KeyColumn</code> object.
*
* @param system underlying system
*/
public KeyColumn (SystemInfo system)
{
this.system = system;
params = new Parameters(system.getSheet().getScale());
}
//~ Methods your_sha256_hash--------------------
//---------//
// addPlot //
//---------//
/**
* Draw key signature portion for a given staff within header projection.
*
* @param plotter plotter for header
* @param staff desired staff
* @param projWidth projection width
* @return a string that describes staff key signature, if any
*/
public String addPlot (ChartPlotter plotter,
Staff staff,
int projWidth)
{
int measStart = staff.getHeaderStart();
int browseStart = (staff.getClefStop() != null) ? staff.getClefStop() : measStart;
KeyBuilder builder = new KeyBuilder(this, staff, projWidth, measStart, browseStart, true);
builder.addPlot(plotter);
KeyInter key = staff.getHeader().key;
return (key != null) ? ("key:" + key.getFifths()) : null;
}
//-------------------//
// checkSystemSlices //
//-------------------//
/**
* Use rule of vertical alignment of keys items within the same system.
*
* @return true if OK
*/
private boolean checkSystemSlices ()
{
// Get theoretical abscissa offset for each slice in the system
final int meanSliceWidth = getGlobalOffsets();
if (globalOffsets.isEmpty()) {
return false; // No key sig for the system
}
if (logger.isDebugEnabled()) {
printSliceTable();
}
// All staves within the same part should have identical key signatures
// Strategy: pick up the "best" KeyInter and try to replicate it in the other stave(s)
PartLoop: for (Part part : system.getParts()) {
List<Staff> staves = part.getStaves();
if (staves.size() > 1) {
KeyInter best = getBestIn(staves);
if (best != null) {
final int fifths = best.getFifths();
final Staff bestStaff = best.getStaff();
final KeyBuilder bestKeyBuilder = builders.get(bestStaff);
final ShapeBuilder bestBuilder = bestKeyBuilder.getShapeBuilder(fifths);
boolean modified;
do {
modified = false;
StaffLoop: for (Staff staff : staves) {
if (staff == bestStaff) {
bestKeyBuilder.getShapeBuilder(-fifths).destroy();
} else {
KeyBuilder builder = builders.get(staff);
switch (builder.checkReplicate(bestBuilder)) {
case OK:
case NO_CLEF:
case NO_REPLICATE:
break;
case SHRINK:
globalOffsets.remove(globalOffsets.size() - 1);
bestBuilder.shrink();
modified = true;
break StaffLoop;
case DESTROY:
return false;
}
}
}
} while (modified);
}
}
}
if (logger.isDebugEnabled()) {
printSliceTable();
}
return true;
}
//-----------//
// getBestIn //
//-----------//
/**
* Report the best KeyInter instance found in the provided staves.
*
* @param staves the (part) staves
* @return the best keyInter found, perhaps null
*/
private KeyInter getBestIn (List<Staff> staves)
{
KeyInter best = null;
double bestGrade = -1;
for (Staff staff : staves) {
KeyBuilder builder = builders.get(staff);
KeyInter keyInter = builder.getBestKeyInter();
if (keyInter != null) {
double ctxGrade = keyInter.getBestGrade();
if ((best == null) || (ctxGrade > bestGrade)) {
best = keyInter;
bestGrade = ctxGrade;
}
}
}
return best;
}
//----------------//
// getGlobalIndex //
//----------------//
/**
* Determine the corresponding global index for the provided abscissa offset.
*
* @param offset slice offset
* @return the global index, or null
*/
Integer getGlobalIndex (int offset)
{
Integer bestIndex = null;
double bestDist = Double.MAX_VALUE;
for (int i = 0; i < globalOffsets.size(); i++) {
int gOffset = globalOffsets.get(i);
double dist = Math.abs(gOffset - offset);
if (bestDist > dist) {
bestDist = dist;
bestIndex = i;
}
}
if (bestDist <= getMaxSliceDist()) {
return bestIndex;
} else {
return null;
}
}
//-----------------//
// getGlobalOffset //
//-----------------//
int getGlobalOffset (int index)
{
return globalOffsets.get(index);
}
//------------------//
// getGlobalOffsets //
//------------------//
/**
* Retrieve the theoretical abscissa offset for all slices in the system.
* This populates the 'globalOffsets' list.
*
* @return the mean slice width, computed on all populated slices in all headers in the system.
*/
private int getGlobalOffsets ()
{
int sliceCount = 0;
int meanSliceWidth = 0;
// Check that key-sig slices appear rather vertically aligned across system staves
List<Population> pops = new ArrayList<>(); // 1 population per slice index
List<Double> vals = new ArrayList<>(); // All offset values
for (KeyBuilder builder : builders.values()) {
KeyInter bestInter = builder.getBestKeyInter();
if (bestInter != null) {
final ShapeBuilder shapeBuilder = builder.getShapeBuilder(bestInter.getFifths());
final KeyRoi roi = shapeBuilder.getRoi();
for (int i = 0; i < roi.size(); i++) {
KeySlice slice = roi.get(i);
///if (slice.getAlter() != null) {
int x = slice.getRect().x;
int offset = x - builder.getMeasureStart();
meanSliceWidth += slice.getRect().width;
sliceCount++;
while (i >= pops.size()) {
pops.add(new Population());
}
pops.get(i).includeValue(offset);
vals.add((double) offset);
///}
}
}
}
int G = pops.size();
Clustering.Gaussian[] laws = new Clustering.Gaussian[G];
for (int i = 0; i < G; i++) {
Population pop = pops.get(i);
laws[i] = new Clustering.Gaussian(pop.getMeanValue(), 1.0); //pop.getStandardDeviation());
}
// Copy vals list into a table of double's
double[] table = new double[vals.size()];
for (int i = 0; i < vals.size(); i++) {
table[i] = vals.get(i);
}
Clustering.EM(table, laws);
List<Integer> theoreticals = new ArrayList<>();
for (int k = 0; k < G; k++) {
Clustering.Gaussian law = laws[k];
theoreticals.add((int) Math.rint(law.getMean()));
}
globalOffsets = theoreticals;
if (sliceCount > 0) {
meanSliceWidth = (int) Math.rint(meanSliceWidth / (double) sliceCount);
}
logger.debug(
"System#{} offsets:{} meanWidth:{}",
system.getId(),
globalOffsets,
meanSliceWidth);
return meanSliceWidth;
}
//-----------------//
// getMaxSliceDist //
//-----------------//
final int getMaxSliceDist ()
{
return params.maxSliceDist;
}
//-----------------//
// printSliceTable //
//-----------------//
/**
* Based on retrieved global offsets, draw a system table of key slices, annotated
* with data from each staff.
*/
private void printSliceTable ()
{
StringBuilder title = new StringBuilder();
title.append(String.format("System#%-2d ", system.getId()));
for (int i = 1; i <= globalOffsets.size(); i++) {
title.append(String.format("---%d--- ", i));
}
logger.info("{}", title);
for (KeyBuilder builder : builders.values()) {
builder.printSliceTable();
}
}
//--------------//
// retrieveKeys //
//--------------//
/**
* Retrieve the column of staves keys in this system.
*
* @param projectionWidth desired width for projection
* @return the ending abscissa offset of keys column WRT measure start, or 0 if none
*/
public int retrieveKeys (int projectionWidth)
{
// Define each staff key-signature area
for (Staff staff : system.getStaves()) {
if (staff.isTablature()) {
continue;
}
int measStart = staff.getHeaderStart();
Integer clefStop = staff.getClefStop(); // Not very reliable...
int browseStart = (clefStop != null) ? (clefStop + 1) : (staff.getHeaderStop() + 1);
builders.put(
staff,
new KeyBuilder(this, staff, projectionWidth, measStart, browseStart, true));
}
// Process each staff to get peaks, slices, alters, trailing space, clef compatibility
for (KeyBuilder builder : builders.values()) {
builder.process();
}
if (system.isMultiStaff()) {
// Check keys alignment across staves at system level
if (!checkSystemSlices()) {
for (KeyBuilder builder : builders.values()) {
builder.destroyAll();
}
return 0; // No key in system
}
}
// Adjust each individual alter pitch, according to best matching key-sig
// A staff may have no key-sig while the others have some in the same system
for (KeyBuilder builder : builders.values()) {
builder.finalizeKey();
}
// Push header key stop
int maxKeyOffset = 0;
for (Staff staff : system.getStaves()) {
if (!staff.isTablature()) {
int measureStart = staff.getHeaderStart();
Integer keyStop = staff.getKeyStop();
if (keyStop != null) {
maxKeyOffset = Math.max(maxKeyOffset, keyStop - measureStart);
}
}
}
return maxKeyOffset;
}
//~ Inner Classes your_sha256_hash--------------
//-----------//
// Constants //
//-----------//
private static class Constants
extends ConstantSet
{
private final Scale.Fraction maxSliceDist = new Scale.Fraction(
0.5,
"Maximum abscissa distance to theoretical slice");
}
//------------//
// Parameters //
//------------//
private static class Parameters
{
final int maxSliceDist;
Parameters (Scale scale)
{
maxSliceDist = scale.toPixels(constants.maxSliceDist);
}
}
//~ Enumerations your_sha256_hash---------------
/** Status of key replication within part. */
public enum PartStatus
{
/** Success. */
OK,
/** Slice count to be reduced. */
SHRINK,
/** No clef in staff. */
NO_CLEF,
/** Replication failed. */
NO_REPLICATE,
/** No key in part. */
DESTROY;
}
}
```
|
```scala
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing,
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// specific language governing permissions and limitations
package org.apache.kudu.spark.tools
import java.io.File
import java.nio.file.Files
import java.nio.file.Paths
import com.google.common.collect.ImmutableList
import org.apache.kudu.ColumnSchema.ColumnSchemaBuilder
import org.apache.kudu.Schema
import org.apache.kudu.Type
import org.apache.kudu.client.CreateTableOptions
import org.apache.kudu.client.KuduTable
import org.apache.kudu.spark.kudu._
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test
import scala.collection.JavaConverters._
class TestImportExportFiles extends KuduTestSuite {
private val TableDataPath = "/TestImportExportFiles.csv"
private val TableName = "TestImportExportFiles"
private val TableSchema = {
val columns = ImmutableList.of(
new ColumnSchemaBuilder("key", Type.STRING).key(true).build(),
new ColumnSchemaBuilder("column1_i", Type.STRING).build(),
new ColumnSchemaBuilder("column2_d", Type.STRING)
.nullable(true)
.build(),
new ColumnSchemaBuilder("column3_s", Type.STRING).build(),
new ColumnSchemaBuilder("column4_b", Type.STRING).build()
)
new Schema(columns)
}
private val options = new CreateTableOptions()
.setRangePartitionColumns(List("key").asJava)
.setNumReplicas(1)
@Before
def setUp(): Unit = {
kuduClient.createTable(TableName, TableSchema, options)
}
@Test
def testCSVImport() {
// Get the absolute path of the resource file.
val schemaResource =
classOf[TestImportExportFiles].getResource(TableDataPath)
val dataPath = Paths.get(schemaResource.toURI).toAbsolutePath
ImportExportFiles.testMain(
Array(
"--operation=import",
"--format=csv",
s"--master-addrs=${harness.getMasterAddressesAsString}",
s"--path=$dataPath",
s"--table-name=$TableName",
"--delimiter=,",
"--header=true",
"--inferschema=true"
),
ss
)
val rdd = kuduContext.kuduRDD(ss.sparkContext, TableName, List("key"))
assert(rdd.collect.length == 4)
assertEquals(rdd.collect().mkString(","), "[1],[2],[3],[4]")
}
@Test
def testRoundTrips(): Unit = {
val table = kuduClient.openTable(TableName)
loadSampleData(table, 50)
runRoundTripTest(TableName, s"$TableName-avro", "avro")
runRoundTripTest(TableName, s"$TableName-csv", "csv")
runRoundTripTest(TableName, s"$TableName-parquet", "parquet")
}
// TODO(KUDU-2454): Use random schemas and random data to ensure all type/values round-trip.
private def loadSampleData(table: KuduTable, numRows: Int): Unit = {
val session = kuduClient.newSession()
Range(0, numRows).map { i =>
val insert = table.newInsert
val row = insert.getRow
row.addString(0, i.toString)
row.addString(1, i.toString)
row.addString(3, i.toString)
row.addString(4, i.toString)
session.apply(insert)
}
session.close
}
private def runRoundTripTest(fromTable: String, toTable: String, format: String): Unit = {
val dir = Files.createTempDirectory("round-trip")
val path = new File(dir.toFile, s"$fromTable-$format").getAbsolutePath
// Export the data.
ImportExportFiles.testMain(
Array(
"--operation=export",
s"--format=$format",
s"--master-addrs=${harness.getMasterAddressesAsString}",
s"--path=$path",
s"--table-name=$fromTable",
s"--header=true"
),
ss
)
// Create the target table.
kuduClient.createTable(toTable, TableSchema, options)
// Import the data.
ImportExportFiles.testMain(
Array(
"--operation=import",
s"--format=$format",
s"--master-addrs=${harness.getMasterAddressesAsString}",
s"--path=$path",
s"--table-name=$toTable",
s"--header=true"
),
ss
)
// Verify the tables match.
// TODO(KUDU-2454): Verify every value to ensure all values round trip.
val rdd1 = kuduContext.kuduRDD(ss.sparkContext, fromTable, List("key"))
val rdd2 = kuduContext.kuduRDD(ss.sparkContext, toTable, List("key"))
assertEquals(rdd1.count(), rdd2.count())
}
}
```
|
Ghasem Rezaei (, born 18 August 1985) is an Iranian former Greco-Roman wrestler. He was an Olympic gold and bronze medalist and two-time Asian Champion. His nickname is Tiger of Amol.
Career
Rezaei first success at the international level was 2007 when he won bronze in the 2007 World Wrestling Championships. However, his run at the top of the wrestling world was be short-lived. Though he represented Iran in the 2008 Olympics, he suffered early defeat in the first round. Rezaei two success won the gold medal at the 2007 Asian Wrestling Championships and 2008 Asian Wrestling Championships. In 2009, Rezaei found himself unable to compete due to injury.
At the 2011 Greco-Roman World Championship, Rezaei was scheduled to face Israeli Robert Avanesyan in the first round. Rather than face the Israeli, Rezaei failed to appear and thus lost the match by forfeit to the Israeli, was eliminated from the tournament, and gave the Israeli free passage into the Round of 16.
In the years leading up to the 2012 games, Rezaei was unable to recapture his status as Iran's top Greco-Roman wrestler at 96 kilograms. In 2012 Rezaei won the Olympic berth for his country. Rezaei in final defeated Rustam Totrov 2–0, 1–0 in the final at the Excel Center in London on Tuesday.
Rezaei beat Turkey Cenk Ildem in his first match, before he beat Artur Aleksanyan 2–0, 1–0 in the quarter-finals. Rezaei defeated Yunior Estrada also 2–0, 1–0 in the semi-finals. He won the gold medal in the men's 96 kg Greco-Roman at the 2012 London Olympics in London.
Ghasem Rezaei captured gold medal at 2015 International Greco-Roman wrestling tournament, Pytlasinski in Poland. Rezaei in 2015 World Championship won a silver medal at the Greco-Roman 2015. He with Elis Guri 3–0 in the semi-finals, and qualified for the final bout, where he conceded a 3–0 defeat to Artur Aleksanyan and won the silver. Rezaei ended up in Bronze in Greco-Roman wrestling competitions in the men's 96 kg Greco-Roman at the 2016 Summer Olympics in Rio. Rezaei in his last Olympic game stood in front of Carl Fredrik Schön. Schön went up 4–0 after a takedown and gut wrench in the first period. The Iranian in the second period scored with back-to-back gut wrenches to make the score 4–4 and ultimately give him the victory on criteria.
See also
Boycotts of Israel in individual sports
References
External links
1985 births
Living people
People from Amol
Iranian male sport wrestlers
Olympic wrestlers for Iran
Wrestlers at the 2008 Summer Olympics
Wrestlers at the 2012 Summer Olympics
Wrestlers at the 2016 Summer Olympics
Olympic gold medalists for Iran
Olympic bronze medalists for Iran
Olympic medalists in wrestling
Medalists at the 2012 Summer Olympics
Medalists at the 2016 Summer Olympics
World Wrestling Championships medalists
Asian Wrestling Championships medalists
Sportspeople from Mazandaran province
20th-century Iranian people
21st-century Iranian people
|
```objective-c
/*
*
*/
#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef volatile struct i2s_dev_s {
uint32_t reserved_0;
uint32_t reserved_4;
uint32_t reserved_8;
union {
struct {
uint32_t rx_done: 1; /*The raw interrupt status bit for the i2s_rx_done_int interrupt*/
uint32_t tx_done: 1; /*The raw interrupt status bit for the i2s_tx_done_int interrupt*/
uint32_t rx_hung: 1; /*The raw interrupt status bit for the i2s_rx_hung_int interrupt*/
uint32_t tx_hung: 1; /*The raw interrupt status bit for the i2s_tx_hung_int interrupt*/
uint32_t reserved4: 28; /*Reserve*/
};
uint32_t val;
} int_raw;
union {
struct {
uint32_t rx_done: 1; /*The masked interrupt status bit for the i2s_rx_done_int interrupt*/
uint32_t tx_done: 1; /*The masked interrupt status bit for the i2s_tx_done_int interrupt*/
uint32_t rx_hung: 1; /*The masked interrupt status bit for the i2s_rx_hung_int interrupt*/
uint32_t tx_hung: 1; /*The masked interrupt status bit for the i2s_tx_hung_int interrupt*/
uint32_t reserved4: 28; /*Reserve*/
};
uint32_t val;
} int_st;
union {
struct {
uint32_t rx_done: 1; /*The interrupt enable bit for the i2s_rx_done_int interrupt*/
uint32_t tx_done: 1; /*The interrupt enable bit for the i2s_tx_done_int interrupt*/
uint32_t rx_hung: 1; /*The interrupt enable bit for the i2s_rx_hung_int interrupt*/
uint32_t tx_hung: 1; /*The interrupt enable bit for the i2s_tx_hung_int interrupt*/
uint32_t reserved4: 28; /*Reserve*/
};
uint32_t val;
} int_ena;
union {
struct {
uint32_t rx_done: 1; /*Set this bit to clear the i2s_rx_done_int interrupt*/
uint32_t tx_done: 1; /*Set this bit to clear the i2s_tx_done_int interrupt*/
uint32_t rx_hung: 1; /*Set this bit to clear the i2s_rx_hung_int interrupt*/
uint32_t tx_hung: 1; /*Set this bit to clear the i2s_tx_hung_int interrupt*/
uint32_t reserved4: 28; /*Reserve*/
};
uint32_t val;
} int_clr;
uint32_t reserved_1c;
union {
struct {
uint32_t rx_reset: 1; /*Set this bit to reset receiver*/
uint32_t rx_fifo_reset: 1; /*Set this bit to reset Rx AFIFO*/
uint32_t rx_start: 1; /*Set this bit to start receiving data*/
uint32_t rx_slave_mod: 1; /*Set this bit to enable slave receiver mode*/
uint32_t reserved4: 1; /*Reserved*/
uint32_t rx_mono: 1; /*Set this bit to enable receiver in mono mode*/
uint32_t reserved6: 1;
uint32_t rx_big_endian: 1; /*I2S Rx byte endian 1: low addr value to high addr. 0: low addr with low addr value.*/
uint32_t rx_update: 1; /*Set 1 to update I2S RX registers from APB clock domain to I2S RX clock domain. This bit will be cleared by hardware after update register done.*/
uint32_t rx_mono_fst_vld: 1; /*1: The first channel data value is valid in I2S RX mono mode. 0: The second channel data value is valid in I2S RX mono mode.*/
uint32_t rx_pcm_conf: 2; /*I2S RX compress/decompress configuration bit. & 0 (atol): A-Law decompress 1 (ltoa) : A-Law compress 2 (utol) : u-Law decompress 3 (ltou) : u-Law compress. &*/
uint32_t rx_pcm_bypass: 1; /*Set this bit to bypass Compress/Decompress module for received data.*/
uint32_t rx_stop_mode: 2; /*0 : I2S Rx only stop when reg_rx_start is cleared. 1: Stop when reg_rx_start is 0 or in_suc_eof is 1. 2: Stop I2S RX when reg_rx_start is 0 or RX FIFO is full.*/
uint32_t rx_left_align: 1; /*1: I2S RX left alignment mode. 0: I2S RX right alignment mode.*/
uint32_t rx_24_fill_en: 1; /*1: store 24 channel bits to 32 bits. 0:store 24 channel bits to 24 bits.*/
uint32_t rx_ws_idle_pol: 1; /*0: WS should be 0 when receiving left channel data and WS is 1in right channel. 1: WS should be 1 when receiving left channel data and WS is 0in right channel.*/
uint32_t rx_bit_order: 1; /*I2S Rx bit endian. 1:small endian the LSB is received first. 0:big endian the MSB is received first.*/
uint32_t rx_tdm_en: 1; /*1: Enable I2S TDM Rx mode . 0: Disable.*/
uint32_t rx_pdm_en: 1; /*1: Enable I2S PDM Rx mode . 0: Disable.*/
uint32_t reserved23: 11; /*Reserve*/
};
uint32_t val;
} rx_conf;
union {
struct {
uint32_t tx_reset: 1; /*Set this bit to reset transmitter*/
uint32_t tx_fifo_reset: 1; /*Set this bit to reset Tx AFIFO*/
uint32_t tx_start: 1; /*Set this bit to start transmitting data*/
uint32_t tx_slave_mod: 1; /*Set this bit to enable slave transmitter mode*/
uint32_t reserved4: 1; /*Reserved*/
uint32_t tx_mono: 1; /*Set this bit to enable transmitter in mono mode*/
uint32_t tx_chan_equal: 1; /*1: The value of Left channel data is equal to the value of right channel data in I2S TX mono mode or TDM channel select mode. 0: The invalid channel data is reg_i2s_single_data in I2S TX mono mode or TDM channel select mode.*/
uint32_t tx_big_endian: 1; /*I2S Tx byte endian 1: low addr value to high addr. 0: low addr with low addr value.*/
uint32_t tx_update: 1; /*Set 1 to update I2S TX registers from APB clock domain to I2S TX clock domain. This bit will be cleared by hardware after update register done.*/
uint32_t tx_mono_fst_vld: 1; /*1: The first channel data value is valid in I2S TX mono mode. 0: The second channel data value is valid in I2S TX mono mode.*/
uint32_t tx_pcm_conf: 2; /*I2S TX compress/decompress configuration bit. & 0 (atol): A-Law decompress 1 (ltoa) : A-Law compress 2 (utol) : u-Law decompress 3 (ltou) : u-Law compress. &*/
uint32_t tx_pcm_bypass: 1; /*Set this bit to bypass Compress/Decompress module for transmitted data.*/
uint32_t tx_stop_en: 1; /*Set this bit to stop disable output BCK signal and WS signal when tx FIFO is emtpy*/
uint32_t reserved14: 1;
uint32_t tx_left_align: 1; /*1: I2S TX left alignment mode. 0: I2S TX right alignment mode.*/
uint32_t tx_24_fill_en: 1; /*1: Sent 32 bits in 24 channel bits mode. 0: Sent 24 bits in 24 channel bits mode*/
uint32_t tx_ws_idle_pol: 1; /*0: WS should be 0 when sending left channel data and WS is 1in right channel. 1: WS should be 1 when sending left channel data and WS is 0in right channel.*/
uint32_t tx_bit_order: 1; /*I2S Tx bit endian. 1:small endian the LSB is sent first. 0:big endian the MSB is sent first.*/
uint32_t tx_tdm_en: 1; /*1: Enable I2S TDM Tx mode . 0: Disable.*/
uint32_t tx_pdm_en: 1; /*1: Enable I2S PDM Tx mode . 0: Disable.*/
uint32_t reserved21: 3; /*Reserved*/
uint32_t tx_chan_mod: 3; /*I2S transmitter channel mode configuration bits.*/
uint32_t sig_loopback: 1; /*Enable signal loop back mode with transmitter module and receiver module sharing the same WS and BCK signals.*/
uint32_t reserved28: 4; /*Reserved*/
};
uint32_t val;
} tx_conf;
union {
struct {
uint32_t rx_tdm_ws_width: 7; /*The width of rx_ws_out in TDM mode is (reg_rx_tdm_ws_width[6:0] +1) * T_bck*/
uint32_t rx_bck_div_num: 6; /*Bit clock configuration bits in receiver mode.*/
uint32_t rx_bits_mod: 5; /*Set the bits to configure bit length of I2S receiver channel.*/
uint32_t rx_half_sample_bits: 6; /*I2S Rx half sample bits -1.*/
uint32_t rx_tdm_chan_bits: 5; /*The Rx bit number for each channel minus 1in TDM mode.*/
uint32_t rx_msb_shift: 1; /*Set this bit to enable receiver in Phillips standard mode*/
uint32_t reserved30: 2; /*Reserved*/
};
uint32_t val;
} rx_conf1;
union {
struct {
uint32_t tx_tdm_ws_width: 7; /*The width of tx_ws_out in TDM mode is (reg_tx_tdm_ws_width[6:0] +1) * T_bck*/
uint32_t tx_bck_div_num: 6; /*Bit clock configuration bits in transmitter mode.*/
uint32_t tx_bits_mod: 5; /*Set the bits to configure bit length of I2S transmitter channel.*/
uint32_t tx_half_sample_bits: 6; /*I2S Tx half sample bits -1.*/
uint32_t tx_tdm_chan_bits: 5; /*The Tx bit number for each channel minus 1in TDM mode.*/
uint32_t tx_msb_shift: 1; /*Set this bit to enable transmitter in Phillips standard mode*/
uint32_t tx_bck_no_dly: 1; /*1: BCK is not delayed to generate pos/neg edge in master mode. 0: BCK is delayed to generate pos/neg edge in master mode.*/
uint32_t reserved31: 1; /* Reserved*/
};
uint32_t val;
} tx_conf1;
union {
struct {
uint32_t rx_clkm_div_num: 8; /*Integral I2S clock divider value*/
uint32_t reserved8: 18; /*Reserved*/
uint32_t rx_clk_active: 1; /*I2S Rx module clock enable signal.*/
uint32_t rx_clk_sel: 2; /*Select I2S Rx module source clock. 0: XTAL clock. 1: PLL240M. 2: PLL160M. 3: I2S_MCLK_in.*/
uint32_t mclk_sel: 1; /*0: UseI2S Tx module clock as I2S_MCLK_OUT. 1: UseI2S Rx module clock as I2S_MCLK_OUT.*/
uint32_t reserved30: 2; /*Reserved*/
};
uint32_t val;
} rx_clkm_conf;
union {
struct {
uint32_t tx_clkm_div_num: 8; /*Integral I2S TX clock divider value. f_I2S_CLK = f_I2S_CLK_S/(N+b/a). There will be (a-b) * n-div and b * (n+1)-div. So the average combination will be: for b <= a/2 z * [x * n-div + (n+1)-div] + y * n-div. For b > a/2 z * [n-div + x * (n+1)-div] + y * (n+1)-div.*/
uint32_t reserved8: 18; /*Reserved*/
uint32_t tx_clk_active: 1; /*I2S Tx module clock enable signal.*/
uint32_t tx_clk_sel: 2; /*Select I2S Tx module source clock. 0: XTAL clock. 1: PLL240M. 2: PLL160M. 3: I2S_MCLK_in.*/
uint32_t clk_en: 1; /*Set this bit to enable clk gate*/
uint32_t reserved30: 2; /*Reserved*/
};
uint32_t val;
} tx_clkm_conf;
union {
struct {
uint32_t rx_clkm_div_z: 9; /*For b <= a/2 the value of I2S_RX_CLKM_DIV_Z is b. For b > a/2 the value of I2S_RX_CLKM_DIV_Z is (a-b).*/
uint32_t rx_clkm_div_y: 9; /*For b <= a/2 the value of I2S_RX_CLKM_DIV_Y is (a%b) . For b > a/2 the value of I2S_RX_CLKM_DIV_Y is (a%(a-b)).*/
uint32_t rx_clkm_div_x: 9; /*For b <= a/2 the value of I2S_RX_CLKM_DIV_X is (a/b) - 1. For b > a/2 the value of I2S_RX_CLKM_DIV_X is (a/(a-b)) - 1.*/
uint32_t rx_clkm_div_yn1: 1; /*For b <= a/2 the value of I2S_RX_CLKM_DIV_YN1 is 0 . For b > a/2 the value of I2S_RX_CLKM_DIV_YN1 is 1.*/
uint32_t reserved28: 4; /*Reserved*/
};
uint32_t val;
} rx_clkm_div_conf;
union {
struct {
uint32_t tx_clkm_div_z: 9; /*For b <= a/2 the value of I2S_TX_CLKM_DIV_Z is b. For b > a/2 the value of I2S_TX_CLKM_DIV_Z is (a-b).*/
uint32_t tx_clkm_div_y: 9; /*For b <= a/2 the value of I2S_TX_CLKM_DIV_Y is (a%b) . For b > a/2 the value of I2S_TX_CLKM_DIV_Y is (a%(a-b)).*/
uint32_t tx_clkm_div_x: 9; /*For b <= a/2 the value of I2S_TX_CLKM_DIV_X is (a/b) - 1. For b > a/2 the value of I2S_TX_CLKM_DIV_X is (a/(a-b)) - 1.*/
uint32_t tx_clkm_div_yn1: 1; /*For b <= a/2 the value of I2S_TX_CLKM_DIV_YN1 is 0 . For b > a/2 the value of I2S_TX_CLKM_DIV_YN1 is 1.*/
uint32_t reserved28: 4; /*Reserved*/
};
uint32_t val;
} tx_clkm_div_conf;
union {
struct {
uint32_t tx_pdm_hp_bypass : 1; /*I2S TX PDM bypass hp filter or not. The option has been removed.*/
uint32_t tx_pdm_sinc_osr2 : 4; /*I2S TX PDM OSR2 value*/
uint32_t tx_pdm_prescale : 8; /*I2S TX PDM prescale for sigmadelta*/
uint32_t tx_pdm_hp_in_shift : 2; /*I2S TX PDM sigmadelta scale shift number: 0:/2 , 1:x1 , 2:x2 , 3: x4*/
uint32_t tx_pdm_lp_in_shift : 2; /*I2S TX PDM sigmadelta scale shift number: 0:/2 , 1:x1 , 2:x2 , 3: x4*/
uint32_t tx_pdm_sinc_in_shift : 2; /*I2S TX PDM sigmadelta scale shift number: 0:/2 , 1:x1 , 2:x2 , 3: x4*/
uint32_t tx_pdm_sigmadelta_in_shift : 2; /*I2S TX PDM sigmadelta scale shift number: 0:/2 , 1:x1 , 2:x2 , 3: x4*/
uint32_t tx_pdm_sigmadelta_dither2 : 1; /*I2S TX PDM sigmadelta dither2 value*/
uint32_t tx_pdm_sigmadelta_dither : 1; /*I2S TX PDM sigmadelta dither value*/
uint32_t tx_pdm_dac_2out_en : 1; /*I2S TX PDM dac mode enable*/
uint32_t tx_pdm_dac_mode_en : 1; /*I2S TX PDM dac 2channel enable*/
uint32_t pcm2pdm_conv_en : 1; /*I2S TX PDM Converter enable*/
uint32_t reserved26 : 6; /*Reserved*/
};
uint32_t val;
} tx_pcm2pdm_conf;
union {
struct {
uint32_t tx_pdm_fp : 10; /*I2S TX PDM Fp*/
uint32_t tx_pdm_fs : 10; /*I2S TX PDM Fs*/
uint32_t tx_iir_hp_mult12_5 : 3; /*The fourth parameter of PDM TX IIR_HP filter stage 2 is (504 + I2S_TX_IIR_HP_MULT12_5[2:0])*/
uint32_t tx_iir_hp_mult12_0 : 3; /*The fourth parameter of PDM TX IIR_HP filter stage 1 is (504 + I2S_TX_IIR_HP_MULT12_0[2:0])*/
uint32_t reserved26 : 6; /*Reserved*/
};
uint32_t val;
} tx_pcm2pdm_conf1;
uint32_t reserved_48;
uint32_t reserved_4c;
union {
struct {
uint32_t rx_tdm_pdm_chan0_en : 1; /*1: Enable the valid data input of I2S RX TDM or PDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_pdm_chan1_en : 1; /*1: Enable the valid data input of I2S RX TDM or PDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_pdm_chan2_en : 1; /*1: Enable the valid data input of I2S RX TDM or PDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_pdm_chan3_en : 1; /*1: Enable the valid data input of I2S RX TDM or PDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_pdm_chan4_en : 1; /*1: Enable the valid data input of I2S RX TDM or PDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_pdm_chan5_en : 1; /*1: Enable the valid data input of I2S RX TDM or PDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_pdm_chan6_en : 1; /*1: Enable the valid data input of I2S RX TDM or PDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_pdm_chan7_en : 1; /*1: Enable the valid data input of I2S RX TDM or PDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_chan8_en : 1; /*1: Enable the valid data input of I2S RX TDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_chan9_en : 1; /*1: Enable the valid data input of I2S RX TDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_chan10_en : 1; /*1: Enable the valid data input of I2S RX TDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_chan11_en : 1; /*1: Enable the valid data input of I2S RX TDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_chan12_en : 1; /*1: Enable the valid data input of I2S RX TDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_chan13_en : 1; /*1: Enable the valid data input of I2S RX TDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_chan14_en : 1; /*1: Enable the valid data input of I2S RX TDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_chan15_en : 1; /*1: Enable the valid data input of I2S RX TDM channel $n. 0: Disable, just input 0 in this channel.*/
uint32_t rx_tdm_tot_chan_num: 4; /*The total channel number of I2S TX TDM mode.*/
uint32_t reserved20: 12; /*Reserved*/
};
uint32_t val;
} rx_tdm_ctrl;
union {
struct {
uint32_t tx_tdm_chan0_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan1_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan2_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan3_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan4_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan5_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan6_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan7_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan8_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan9_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan10_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan11_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan12_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan13_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan14_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_chan15_en: 1; /*1: Enable the valid data output of I2S TX TDM channel $n. 0: Disable just output 0 in this channel.*/
uint32_t tx_tdm_tot_chan_num: 4; /*The total channel number minus 1 of I2S TX TDM mode.*/
uint32_t tx_tdm_skip_msk_en: 1; /*When DMA TX buffer stores the data of (REG_TX_TDM_TOT_CHAN_NUM + 1) channels and only the data of the enabled channels is sent then this bit should be set. Clear it when all the data stored in DMA TX buffer is for enabled channels.*/
uint32_t reserved21: 11; /*Reserved*/
};
uint32_t val;
} tx_tdm_ctrl;
union {
struct {
uint32_t rx_sd_in_dm: 2; /*The delay mode of I2S Rx SD input signal. 0: bypass. 1: delay by pos edge. 2: delay by neg edge. 3: not used.*/
uint32_t reserved2 : 14; /* Reserved*/
uint32_t rx_ws_out_dm: 2; /*The delay mode of I2S Rx WS output signal. 0: bypass. 1: delay by pos edge. 2: delay by neg edge. 3: not used.*/
uint32_t reserved18: 2;
uint32_t rx_bck_out_dm: 2; /*The delay mode of I2S Rx BCK output signal. 0: bypass. 1: delay by pos edge. 2: delay by neg edge. 3: not used.*/
uint32_t reserved22: 2;
uint32_t rx_ws_in_dm: 2; /*The delay mode of I2S Rx WS input signal. 0: bypass. 1: delay by pos edge. 2: delay by neg edge. 3: not used.*/
uint32_t reserved26: 2;
uint32_t rx_bck_in_dm: 2; /*The delay mode of I2S Rx BCK input signal. 0: bypass. 1: delay by pos edge. 2: delay by neg edge. 3: not used.*/
uint32_t reserved30: 2;
};
uint32_t val;
} rx_timing;
union {
struct {
uint32_t tx_sd_out_dm : 2; /*The delay mode of I2S TX SD output signal. 0: bypass. 1: delay by pos edge. 2: delay by neg edge. 3: not used.*/
uint32_t reserved2 : 2; /* Reserved*/
uint32_t tx_sd1_out_dm : 2; /*The delay mode of I2S TX SD1 output signal. 0: bypass. 1: delay by pos edge. 2: delay by neg edge. 3: not used.*/
uint32_t reserved6 : 10; /* Reserved*/
uint32_t tx_ws_out_dm : 2; /*The delay mode of I2S TX WS output signal. 0: bypass. 1: delay by pos edge. 2: delay by neg edge. 3: not used.*/
uint32_t reserved18 : 2; /* Reserved*/
uint32_t tx_bck_out_dm : 2; /*The delay mode of I2S TX BCK output signal. 0: bypass. 1: delay by pos edge. 2: delay by neg edge. 3: not used.*/
uint32_t reserved22 : 2; /* Reserved*/
uint32_t tx_ws_in_dm : 2; /*The delay mode of I2S TX WS input signal. 0: bypass. 1: delay by pos edge. 2: delay by neg edge. 3: not used.*/
uint32_t reserved26 : 2; /* Reserved*/
uint32_t tx_bck_in_dm : 2; /*The delay mode of I2S TX BCK input signal. 0: bypass. 1: delay by pos edge. 2: delay by neg edge. 3: not used.*/
uint32_t reserved30 : 2; /* Reserved*/
};
uint32_t val;
} tx_timing;
union {
struct {
uint32_t fifo_timeout: 8; /*the i2s_tx_hung_int interrupt or the i2s_rx_hung_int interrupt will be triggered when fifo hung counter is equal to this value*/
uint32_t fifo_timeout_shift: 3; /*The bits are used to scale tick counter threshold. The tick counter is reset when counter value >= 88000/2^i2s_lc_fifo_timeout_shift*/
uint32_t fifo_timeout_ena: 1; /*The enable bit for FIFO timeout*/
uint32_t reserved12: 20; /*Reserved*/
};
uint32_t val;
} lc_hung_conf;
union {
struct {
uint32_t rx_eof_num:12; /*the length of data to be received. It will trigger i2s_in_suc_eof_int.*/
uint32_t reserved12:20; /*Reserved*/
};
uint32_t val;
} rx_eof_num;
uint32_t conf_single_data; /*the right channel or left channel put out constant value stored in this register according to tx_chan_mod and reg_tx_msb_right*/
union {
struct {
uint32_t tx_idle: 1; /*1: i2s_tx is idle state. 0: i2s_tx is working.*/
uint32_t reserved1: 31; /*Reserved*/
};
uint32_t val;
} state;
uint32_t reserved_70;
uint32_t reserved_74;
uint32_t reserved_78;
uint32_t reserved_7c;
union {
struct {
uint32_t date: 28; /*Version control register*/
uint32_t reserved28: 4; /*Reserved*/
};
uint32_t val;
} date;
} i2s_dev_t;
extern i2s_dev_t I2S0;
#ifdef __cplusplus
}
#endif
```
|
```smalltalk
/*
This file is part of the iText (R) project.
Authors: Apryse Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at path_to_url For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program. If not, see <path_to_url
*/
using System;
using System.Collections.Generic;
using iText.StyledXmlParser.Css.Parse;
using iText.StyledXmlParser.Css.Selector;
using iText.Test;
namespace iText.StyledXmlParser.Css {
[NUnit.Framework.Category("UnitTest")]
public class CssRuleSetTest : ExtendedITextTest {
[NUnit.Framework.Test]
public virtual void AddCssRuleSetWithNormalImportantDeclarationsTest() {
String src = "float:right; clear:right !important;width:22.0em!important; margin:0 0 1.0em 1.0em; " + "background:#f9f9f9; "
+ "border:1px solid #aaa;padding:0.2em ! important;border-spacing:0.4em 0; text-align:center " + "!important; "
+ "line-height:1.4em; font-size:88%! important;";
String[] expectedNormal = new String[] { "float: right", "margin: 0 0 1.0em 1.0em", "background: #f9f9f9",
"border: 1px solid #aaa", "border-spacing: 0.4em 0", "line-height: 1.4em" };
String[] expectedImportant = new String[] { "clear: right", "width: 22.0em", "padding: 0.2em", "text-align: center"
, "font-size: 88%" };
IList<CssDeclaration> declarations = CssRuleSetParser.ParsePropertyDeclarations(src);
CssSelector selector = new CssSelector("h1");
CssRuleSet cssRuleSet = new CssRuleSet(selector, declarations);
IList<CssDeclaration> normalDeclarations = cssRuleSet.GetNormalDeclarations();
for (int i = 0; i < expectedNormal.Length; i++) {
NUnit.Framework.Assert.AreEqual(expectedNormal[i], normalDeclarations[i].ToString());
}
IList<CssDeclaration> importantDeclarations = cssRuleSet.GetImportantDeclarations();
for (int i = 0; i < expectedImportant.Length; i++) {
NUnit.Framework.Assert.AreEqual(expectedImportant[i], importantDeclarations[i].ToString());
}
}
}
}
```
|
```objective-c
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
/*
* The following is auto-generated. Do not manually edit. See scripts/loops.js.
*/
#ifndef STDLIB_STRIDED_BASE_NULLARY_D_AS_S_H
#define STDLIB_STRIDED_BASE_NULLARY_D_AS_S_H
#include <stdint.h>
/*
* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* Applies a nullary callback and assigns results to elements in a strided output array.
*/
void stdlib_strided_d_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn );
#ifdef __cplusplus
}
#endif
#endif // !STDLIB_STRIDED_BASE_NULLARY_D_AS_S_H
```
|
Arthrospira platensis is a filamentous, gram-negative cyanobacterium. This bacterium is non-nitrogen-fixing photoautotroph. It has been isolated in Chenghai Lake, China, soda lakes of East Africa, and subtropical, alkaline lakes.
Morphology
Arthrospira platensis is filamentous, motile bacterium. Motility has been described as a vigorous gliding without a visible flagella.
Metabolism
As a photoautotroph the major carbon source is carbon dioxide and water is a source of electrons to perform CO2 reduction.
Genetics
Arthrospira platensis has a single circular chromosome containing 6.8 Mb and 6,631 genes. The G+C content has been determined to be 44.3%.
Growth conditions
Arthrospira platensis has been found in environments with high concentrations of carbonate and bicarbonate. It can also be found in high salt concentrations because of its alkali and salt tolerance. The temperature optimum for this organism is around 35 °C. Based on environmental conditions, culture medium often has a pH between 9-10, inorganic salts, and a high bicarbonate concentration.
Uses
There are various present and past uses of A. platensis as food or food supplement, which is better known as 'Spirulina' in this context. Spirulina is sold as a health supplement in the form of powder or tablets due to its high levels of essential and unsaturated fatty acids, vitamins, dietary minerals, and antioxidants. After the Chernobyl disaster, Spirulina was given to victims due to its antioxidant properties to avoid adverse effects of reactive oxygen species. Proteins extracted from A. platensis can be used in food as thickening agents or stabilizers for emulsions or foams. A direct comparison indicates that A. platensis protein isolates are more effective at reducing surface tension compared to commonly used animal proteins. The light-harvesting complex of A. platensis, phycocyanin, can be extracted as a blue pigment powder and used as blue colorant in food. As A. platensis cells contain hydrogenases and can produce hydrogen, they are a candidate for the production of renewable energy.
References
Oscillatoriales
|
All The Love is the seventh album by the American vocalist, pianist and songwriter Oleta Adams and was released in 2001.
Track listing
Personnel
Oleta Adams – vocals, acoustic piano (9, 12)
Peter Wolf – keyboards (1, 11), programming (1, 4, 11)
Ricky Peterson – keyboards (2, 3, 5-8, 10), programming (2, 3, 5-8, 10), arrangements (2, 3, 5-8, 10), backing vocals (3, 5)
Paul Peterson – programming (3, 5-10), bass (6, 10), guitars (7)
Paul Jackson Jr. – guitars (1, 11)
Michael Landau – guitars (2, 3, 5, 6, 8, 10)
Stevan Pasero – guitars (2)
Geoff Bouchier – acoustic guitar (6)
Larry Kimpel – bass (1, 4)
John Cushon – drums (1, 11), percussion (1, 11)
Gerald Albright – saxophone (1)
Kenny Holeman – flute (6)
Bridgette Bryant – backing vocals (1, 11)
Sue Ann Carwell – backing vocals (1)
Michelle Wolf – backing vocals (1, 11)
Fred White – backing vocals (1)
Patty Peterson – backing vocals (3, 5, 10)
Joey Diggs – backing vocals (4)
Jeff Pescetto – backing vocals (4)
Debbie Duncan – backing vocals (5)
Production
Don Boyer – executive producer
Stevan Pasero – executive producer
Paul Erickson – engineer (1, 4, 11)
Don Miller – engineer
Barry Rudolph – engineer
Tom Tucker – engineer
Jeff Whitworth – engineer
Larry Gann – assistant engineer
James Harley – assistant engineer
Joe Lepinski – assistant engineer, digital editing
John Paturno – assistant engineer
Tommy Tucker Jr. – assistant engineer
Bernie Grundman – mastering at Bernie Grundman Mastering (Hollywood, California)
Todd Culberhouse – A&R
Tina Carson – project coordinator
Michael Lord – production coordinator
Howard Arthur – music copyist
Sue Tucker – music copyist
Digeann Cabrell – creative director
Ian Kawata – art direction
Gloria Ma – graphic design
Randee St. Nicholas – photography
Terri Apanasewicz – hair stylist, make-up
Kelle Kutsugeras – stylist
Jim Morey and Chevy Nash at Morey Management Group – management
2001 albums
Oleta Adams albums
|
Ebenezer Presbyterian Church is located near Keene, Kentucky in Jessamine County, Kentucky, United States. The first Ebenezer Church on the site was organized by Presbyterian minister Adam Rankin around 1790. The first church building, a log structure, was replaced by a stone building in 1803.
The property was added to the United States National Register of Historic Places on June 23, 1983.
History
Adam Rankin founded Ebenezer Church around 1790. A log building was constructed on property owned by Ephraim January. Robert Hamilton Bishop became the second minister of the church in 1803 when Rankin left. Neal McDougal Gordon, the longest-serving pastor of the church, was installed as minister of Ebenezer Church on May 13, 1843, and served as pastor of the church until 1870.
Ebenezer Cemetery Association
The Ebenezer Cemetery Association was founded in 1922 by descendants of the church founders. The group meets annually on the church grounds for its picnic.
References
See also
Ebenezer Church site
National Register of Historic Places listings in Kentucky
National Register of Historic Places in Jessamine County, Kentucky
Federal architecture in Kentucky
Churches completed in 1803
19th-century Presbyterian church buildings in the United States
Churches on the National Register of Historic Places in Kentucky
Presbyterian churches in Kentucky
Churches in Jessamine County, Kentucky
1803 establishments in Kentucky
|
Pakpak, or Batak Dairi, is an Austronesian language of Sumatra. It is spoken in Dairi Regency, Pakpak Bharat Regency, Parlilitan district of Humbang Hasundutan Regency, Manduamas district of Central Tapanuli Regency, and Subulussalam and Aceh Singkil Regency.
Phonology
Consonants
A word-final /k/ can also be heard as a glottal stop .
Vowels
Vowels /i, u, e, o/ can have shortened allophones of [, , , ].
References
Further reading
Batak languages
Languages of Indonesia
Languages of Aceh
|
The Oculus Rift S is a virtual reality headset co-developed by Lenovo Technologies and Facebook Technologies—a division of Meta Platforms.
Announced in March 2019 and released that May, it is a successor to the original Oculus Rift CV1 model, with noted changes including a new "inside-out" positional tracking system with cameras embedded inside the headset unit (similarly to its sister device, the Oculus Quest), a higher-resolution display, and a new "halo" head strap.
The Rift S received mixed reviews, with critics praising improvements in comfort and ease of setup due to the halo strap and new tracking system, but characterizing the Rift S as being only an incremental upgrade over the CV1, and noting regressions such as a lower refresh rate, and the lack of hardware adjustment for inter pupillary distance (IPD).
Development
In June 2015, Oculus VR co-founder Palmer Luckey revealed that Oculus was already working on a successor to the original Rift and planned to release it in around 2–3 years from the original Rift release. The headset would feature higher resolution screen and inside-out tracking and would enable room scale experiences.
In October 2018, Oculus VR co-founder and former CEO until 2016 Brendan Iribe left Oculus VR, allegedly due to both parts having "fundamentally different views on the future of Oculus that grew deeper over time." Iribe wanted to deliver comfortable VR experience competitive on the high-end market while Oculus leadership aimed to lower the VR gaming entry barrier. Mark Zuckerberg, CEO of Oculus parent company Facebook, Inc., repeatedly stated that Oculus' goal is to bring a billion users into VR. Iribe was said to be overseeing the development of the second generation Oculus Rift, which was canceled the week prior to his departure.
Hardware
Display
Rift S used a single fast-switch LCD panel with a resolution of 2560×1440 and an 80 Hz refresh rate, down from the CV1's 90 Hz.
Also, compared to the original Rift, the Rift S used "next generation" lens technology, introduced in the Oculus Go, which almost entirely eliminated god rays. The field of view was 115º, compared to 110º on the Rift CV1. The headset featured software-only inter pupillary distance (IPD) adjustment, because it used a single screen instead of dual displays.
Audio
As opposed to earphones attached to the strap as on the CV1, built-in audio on the Rift S used speakers embedded in the headset itself, positioned slightly above the user's ears.
Oculus Insight
The Rift S used the same "Oculus Insight" inside-out tracking system used by the Oculus Quest, whereby five cameras built into the headset (two on the front, one on either side, and one looking directly upwards) that tracked infrared diodes in the controllers, as well as input from the accelerometers in the headset and controllers, and a prediction engine, were used to spatially track the headset and controller (removing the need for external sensors mounted in the play area). The Rift S contained an additional fifth camera over the Quest's four to improve compatibility with existing Oculus Rift software.
Passthrough+ was provided as a safety feature, which displays output from the cameras in monoscopic black and white when the player exits their designated boundaries. Passthrough+ also makes use of "Asynchronous SpaceWarp" to produce a comfortable experience with minimal depth disparity or performance impact.
Halo headband
Rift S featured a halo headband which, according to Oculus, had a better weight distribution, better light blocking, and was supposed to be more comfortable overall. The headset was co-developed with Lenovo, incorporating their experience in the VR and AR space and feedback from the Lenovo Legion gaming community. The device had a knob at the rear of the band which brought the device forward and backward. The top strap was there to make it snug on the wearer's head, while a button underneath the right side of the headset was used to release the headset from its support, allowing it to be adjusted to be closer or farther from the user's eyes. The device lacked physical adjustment for inter-pupillary distance (IPD), but this setting was supported in software.
Controllers
Oculus Rift S used the same second generation Oculus Touch controllers used in the Oculus Quest. The controllers are similar to the ones used by the original Oculus Rift, except with the tracking ring on the top (to be seen by the headset's built-in cameras) instead of being on the bottom (to be seen by the external Constellation cameras).
On April 12, 2019, Nate Mitchell, co-founder of Oculus VR and head of VR product at Facebook, explained via Twitter that "some 'easter egg' labels meant for prototypes accidentally made it onto the internal hardware for tens of thousands of [Oculus Quest and Rift S] Touch controllers." The messages on final production hardware say 'This Space For Rent' and 'The Masons Were Here,' while a few development kits contained 'Big Brother is Watching' and 'Hi iFixit! We See You!'
Software
All existing and future Oculus Rift-compatible software was supported by the Rift S. The Oculus storefront also supports cross-buys between Oculus Quest and PC for games released on both platforms
Release
Oculus Rift S was announced during GDC 2019 on March 20, with shipments starting on May 21 the same year. At launch, it shared the same US$399 price point as the CV1.
On September 16, 2020, Facebook announced the upcoming discontinuation of the Rift S in favor of the Oculus Quest 2, with sales ending in spring 2021. In December 2020, Facebook discounted the Rift S to US$300.
In April 2021, production of the Rift S was discontinued. In an email sent to UploadVR, a Facebook representative stated that "stock of the headset would no longer be replenished moving forward." That June, the Rift S section in the Oculus website was updated and was no longer being sold.
Reception
The Rift S received mixed reviews. The Verge felt that the Insight system was "easily a match for the old Rift tracking cameras" and helped make setup less complicated, and that its halo strap was more comfortable than that of the Oculus Quest, but felt that some of its other changes were downgrades over the previous model and Quest — including replacing its headphones with directional speakers, the lack of hardware IPD adjustment, and a screen whose resolution only slightly higher than the Rift CV1, but lower than the Oculus Quest.
TechRadar characterized the Rift S as being an incremental upgrade over the CV1, similarly praising its "elegantly simple" tracking system, but noting only marginal hardware updates, and regressions such as its directional speakers, a tighter fit and no hardware IPD, and its lower refresh rate. Coming from a CV1, the reviewer also noted that the Rift S was also the first headset to make them feel nauseous, although citing possible factors such as the lower refresh rate or Fallout 4 VR being a SteamVR game that was not fully optimized for the Oculus platform. It was argued that the Rift S "does very little to appeal to those that have already invested in the Oculus ecosystem", and that "the future of Oculus VR, if it is ever to have mainstream appeal from a consumer perspective, looks to sit then with the Oculus Quest, whose freedom of movement does stand the chance of being truly transformational, given the right software."
Oculus co-founder Palmer Luckey criticized the lack of hardware IPD, stating that the software-only adjustment was not comparable in any way to an actual physical IPD adjustment mechanism. He estimated that about 30% of the population — including himself — would not be able to use the Rift S comfortably. In comparison, the original Rift CV1 was designed to support any IPD between the 5th and 95th percentile (58mm and 72mm, respectively), making the device comfortable for 90% of the population.
References
External links
Products introduced in 2019
Products and services discontinued in 2021
Virtual reality headsets
Oculus Rift
American inventions
Wearable devices
|
David Bronner (b. 1973) is an American corporate executive and activist. As the top executive at Dr. Bronner's Magic Soaps, he has become known for his activism around a range of issues, especially fair trade, sustainable agriculture, animal rights, and drug policy reform.
Family and education
David Bronner was born in Los Angeles, California, the son of Jim Bronner and Trudy Bronner. He graduated from Harvard University in 1995 with a degree in biology. He is the grandson of Emanuel Bronner, founder of Dr. Bronner's Magic Soaps, an American producer of organic soap and personal care products. His father worked for the company in the 1980s and 1990s, and his mother is the company's chief financial officer.
Business career
In 1997 David Bronner began working for the family business, which was then under the leadership of his father. Following his father's death in 1998, David became the company's president and, working with his brother Michael, grew the company from $4 million in annual revenue in 1998 to $120 million in 2017. In 1999, he joined the small handful of top U.S. executives who voluntarily capped their salaries out of commitment to fair labor principles; Dr. Bronner's Magic Soaps still has its top salary capped at five times that of the company's lowest-paid workers. In 2015, David moved into the newly created position of Cosmic Engagement Officer (CEO), while Michael took over as president.
In 2019 Bronner founded the company Brother David's to produce organic sun-grown cannabis in partnership with the supply chain company Flow Kana and independent small farmers.
The company states that all profits will go to support regenerative agriculture and reform of drug-prohibition laws.
Activism and philanthropy
Dr. Bronner's Magic Soaps has supported causes related to drug policy reform, animal rights, organic labeling, sustainable agriculture, and fair trade practices. Roughly 10 percent of the company's revenue goes to charitable giving and activist causes annually. Organizations that have been supported under Bronner's leadership include the Multidisciplinary Association for Psychedelic Studies (for which Bronner serves on the board of directors), and Sea Shepherd Conservation Society.
A particular target of Bronner's activism has been efforts to protect the hemp industry in the United States. Under his leadership in 2001, the company funded and coordinated with the Hemp Industry Association on its lawsuit against the U.S. Drug Enforcement Administration (DEA), seeking to prevent a ban of hemp food sales in the United States. The Ninth Circuit Court of Appeals granted a stay in the case in 2002 and ruled in favor of the hemp industry in 2004.
Bronner has been arrested twice for civil disobedience while protesting limitations on the domestic production of hemp. In 2009, he was arrested for planting hemp seeds on the lawn at DEA headquarters.
In 2012, he was arrested after harvesting hemp and milling hemp oil while locked in a metal cage in front of the White House. In 2015 he was named Cannabis Activist of the Year by the Seattle Hempfest.
In 2014 Bronner wrote an advertorial drawing attention to the ways that GMO crops have led to increased pesticide use in the United States. It was initially published as a short article in the Huffington Post and subsequently as an ad in various wide-circulation magazines, ranging from The New Yorker to Scientific American. Two leading journals, Science and Nature, refused to carry the ad, in at least one case due to concern over backlash from the GMO industry.
In 2019, David Bronner pledged his company’s matching contribution of $150,000 to Oregon’s statewide ballot initiative to legalize psilocybin assisted therapy.
Personal life
In honor of National Coming Out Day in 2022, Bronner announced in an essay on his website that he uses he/him and they/them pronouns, describing himself as "about 25% girl" and not being "‘straight,’ ‘gay,’ or ‘man’ or ‘woman’". The essay also mentioned Bronner's wife Mia, who is bisexual and genderfluid, and their 25-year-old non-binary child Maya as having inspired him in his gender exploration.
Notes
References
American chief executives of manufacturing companies
Harvard College alumni
People from Los Angeles
1973 births
Living people
Businesspeople from Los Angeles
Non-binary activists
American LGBT businesspeople
|
```java
Be as specific as possible when catching exceptions
The distinction between checked and unchecked exceptions
Using exceptions in Java
Handling Null Pointer Exceptions
Careful Numeric Data Conversions
```
|
The European qualification for the 2013 World Men's Handball Championship, in Spain, was played over two rounds. The 2013 hosts Spain, the 2011 holders France and the 3 best teams from the 2012 European Men's Handball Championship, Denmark, Serbia and Croatia were qualified automatically for the World Championship. In the first round of qualification, 21 teams who were not participating at the European Championship were split into seven groups. The group winners and the remaining 11 teams from the European Championship played a playoff afterwards to determine the other nine qualifiers.
Group stage
The draw was held on July 3, 2011 at 12:00 at Brno, Czech Republic.
Group 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Playoff round
Seedings
Following the main round of the 2012 European Men's Handball Championship was concluded, five of the sixteen participants earned an automatic spot for the World Championship, namely Spain (hosts), France (title holders), Croatia, Denmark and Serbia. The remaining eleven teams were split into two pots, with the 7 best ranked national teams in the first one, and the remaining four in the second one.
The drawing procedure was carried out on 29 January 2012 at the Belgrade Arena during the final day of the European Championship. Games are scheduled to be played on 9–10 June and 16–17 June 2012.
Matches
All times are local.
First leg
Second leg
References
External links
Eurohandball.com
2011 in handball
2012 in handball
World Handball Championship tournaments
Qualification for handball competitions
|
```smalltalk
//your_sha256_hash--------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//your_sha256_hash--------------
namespace SimplePjsua2CS.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
```
|
KXZS was an American radio station licensed by the Federal Communications Commission (FCC) to broadcast at 107.5 MHz from Wall, South Dakota, covering the Rapid City and Black Hills area from the east. Owned by JER Licenses, it was to become a simulcast with KXZT, which would broadcast on 107.9 from Newell, South Dakota when that station signed on.
The station's license was cancelled by the FCC on August 24, 2016, due to KXZS having been silent for more than twelve months (since March 17, 2015).
External links
XZS
Radio stations established in 2011
2011 establishments in South Dakota
Defunct radio stations in the United States
Radio stations disestablished in 2016
2016 disestablishments in South Dakota
XZS
|
```xml
<!--
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.
-->
<vector android:height="24dp"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="path_to_url">
<path android:fillColor="@android:color/darker_gray" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
</vector>
```
|
```c
/*
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
*/
/// Zstandard educational decoder implementation
/// See path_to_url
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zstd_decompress.h"
/******* UTILITY MACROS AND TYPES *********************************************/
// Max block size decompressed size is 128 KB and literal blocks can't be
// larger than their block
#define MAX_LITERALS_SIZE ((size_t)128 * 1024)
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
/// This decoder calls exit(1) when it encounters an error, however a production
/// library should propagate error codes
#define ERROR(s) \
do { \
fprintf(stderr, "Error: %s\n", s); \
exit(1); \
} while (0)
#define INP_SIZE() \
ERROR("Input buffer smaller than it should be or input is " \
"corrupted")
#define OUT_SIZE() ERROR("Output buffer too small for output")
#define CORRUPTION() ERROR("Corruption detected while decompressing")
#define BAD_ALLOC() ERROR("Memory allocation error")
#define IMPOSSIBLE() ERROR("An impossibility has occurred")
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef int8_t i8;
typedef int16_t i16;
typedef int32_t i32;
typedef int64_t i64;
/******* END UTILITY MACROS AND TYPES *****************************************/
/******* IMPLEMENTATION PRIMITIVE PROTOTYPES **********************************/
/// The implementations for these functions can be found at the bottom of this
/// file. They implement low-level functionality needed for the higher level
/// decompression functions.
/*** IO STREAM OPERATIONS *************/
/// ostream_t/istream_t are used to wrap the pointers/length data passed into
/// ZSTD_decompress, so that all IO operations are safely bounds checked
/// They are written/read forward, and reads are treated as little-endian
/// They should be used opaquely to ensure safety
typedef struct {
u8 *ptr;
size_t len;
} ostream_t;
typedef struct {
const u8 *ptr;
size_t len;
// Input often reads a few bits at a time, so maintain an internal offset
int bit_offset;
} istream_t;
/// The following two functions are the only ones that allow the istream to be
/// non-byte aligned
/// Reads `num` bits from a bitstream, and updates the internal offset
static inline u64 IO_read_bits(istream_t *const in, const int num_bits);
/// Backs-up the stream by `num` bits so they can be read again
static inline void IO_rewind_bits(istream_t *const in, const int num_bits);
/// If the remaining bits in a byte will be unused, advance to the end of the
/// byte
static inline void IO_align_stream(istream_t *const in);
/// Write the given byte into the output stream
static inline void IO_write_byte(ostream_t *const out, u8 symb);
/// Returns the number of bytes left to be read in this stream. The stream must
/// be byte aligned.
static inline size_t IO_istream_len(const istream_t *const in);
/// Advances the stream by `len` bytes, and returns a pointer to the chunk that
/// was skipped. The stream must be byte aligned.
static inline const u8 *IO_get_read_ptr(istream_t *const in, size_t len);
/// Advances the stream by `len` bytes, and returns a pointer to the chunk that
/// was skipped so it can be written to.
static inline u8 *IO_get_write_ptr(ostream_t *const out, size_t len);
/// Advance the inner state by `len` bytes. The stream must be byte aligned.
static inline void IO_advance_input(istream_t *const in, size_t len);
/// Returns an `ostream_t` constructed from the given pointer and length.
static inline ostream_t IO_make_ostream(u8 *out, size_t len);
/// Returns an `istream_t` constructed from the given pointer and length.
static inline istream_t IO_make_istream(const u8 *in, size_t len);
/// Returns an `istream_t` with the same base as `in`, and length `len`.
/// Then, advance `in` to account for the consumed bytes.
/// `in` must be byte aligned.
static inline istream_t IO_make_sub_istream(istream_t *const in, size_t len);
/*** END IO STREAM OPERATIONS *********/
/*** BITSTREAM OPERATIONS *************/
/// Read `num` bits (up to 64) from `src + offset`, where `offset` is in bits,
/// and return them interpreted as a little-endian unsigned integer.
static inline u64 read_bits_LE(const u8 *src, const int num_bits,
const size_t offset);
/// Read bits from the end of a HUF or FSE bitstream. `offset` is in bits, so
/// it updates `offset` to `offset - bits`, and then reads `bits` bits from
/// `src + offset`. If the offset becomes negative, the extra bits at the
/// bottom are filled in with `0` bits instead of reading from before `src`.
static inline u64 STREAM_read_bits(const u8 *src, const int bits,
i64 *const offset);
/*** END BITSTREAM OPERATIONS *********/
/*** BIT COUNTING OPERATIONS **********/
/// Returns the index of the highest set bit in `num`, or `-1` if `num == 0`
static inline int highest_set_bit(const u64 num);
/*** END BIT COUNTING OPERATIONS ******/
/*** HUFFMAN PRIMITIVES ***************/
// Table decode method uses exponential memory, so we need to limit depth
#define HUF_MAX_BITS (16)
// Limit the maximum number of symbols to 256 so we can store a symbol in a byte
#define HUF_MAX_SYMBS (256)
/// Structure containing all tables necessary for efficient Huffman decoding
typedef struct {
u8 *symbols;
u8 *num_bits;
int max_bits;
} HUF_dtable;
/// Decode a single symbol and read in enough bits to refresh the state
static inline u8 HUF_decode_symbol(const HUF_dtable *const dtable,
u16 *const state, const u8 *const src,
i64 *const offset);
/// Read in a full state's worth of bits to initialize it
static inline void HUF_init_state(const HUF_dtable *const dtable,
u16 *const state, const u8 *const src,
i64 *const offset);
/// Decompresses a single Huffman stream, returns the number of bytes decoded.
/// `src_len` must be the exact length of the Huffman-coded block.
static size_t HUF_decompress_1stream(const HUF_dtable *const dtable,
ostream_t *const out, istream_t *const in);
/// Same as previous but decodes 4 streams, formatted as in the Zstandard
/// specification.
/// `src_len` must be the exact length of the Huffman-coded block.
static size_t HUF_decompress_4stream(const HUF_dtable *const dtable,
ostream_t *const out, istream_t *const in);
/// Initialize a Huffman decoding table using the table of bit counts provided
static void HUF_init_dtable(HUF_dtable *const table, const u8 *const bits,
const int num_symbs);
/// Initialize a Huffman decoding table using the table of weights provided
/// Weights follow the definition provided in the Zstandard specification
static void HUF_init_dtable_usingweights(HUF_dtable *const table,
const u8 *const weights,
const int num_symbs);
/// Free the malloc'ed parts of a decoding table
static void HUF_free_dtable(HUF_dtable *const dtable);
/// Deep copy a decoding table, so that it can be used and free'd without
/// impacting the source table.
static void HUF_copy_dtable(HUF_dtable *const dst, const HUF_dtable *const src);
/*** END HUFFMAN PRIMITIVES ***********/
/*** FSE PRIMITIVES *******************/
/// For more description of FSE see
/// path_to_url
// FSE table decoding uses exponential memory, so limit the maximum accuracy
#define FSE_MAX_ACCURACY_LOG (15)
// Limit the maximum number of symbols so they can be stored in a single byte
#define FSE_MAX_SYMBS (256)
/// The tables needed to decode FSE encoded streams
typedef struct {
u8 *symbols;
u8 *num_bits;
u16 *new_state_base;
int accuracy_log;
} FSE_dtable;
/// Return the symbol for the current state
static inline u8 FSE_peek_symbol(const FSE_dtable *const dtable,
const u16 state);
/// Read the number of bits necessary to update state, update, and shift offset
/// back to reflect the bits read
static inline void FSE_update_state(const FSE_dtable *const dtable,
u16 *const state, const u8 *const src,
i64 *const offset);
/// Combine peek and update: decode a symbol and update the state
static inline u8 FSE_decode_symbol(const FSE_dtable *const dtable,
u16 *const state, const u8 *const src,
i64 *const offset);
/// Read bits from the stream to initialize the state and shift offset back
static inline void FSE_init_state(const FSE_dtable *const dtable,
u16 *const state, const u8 *const src,
i64 *const offset);
/// Decompress two interleaved bitstreams (e.g. compressed Huffman weights)
/// using an FSE decoding table. `src_len` must be the exact length of the
/// block.
static size_t FSE_decompress_interleaved2(const FSE_dtable *const dtable,
ostream_t *const out,
istream_t *const in);
/// Initialize a decoding table using normalized frequencies.
static void FSE_init_dtable(FSE_dtable *const dtable,
const i16 *const norm_freqs, const int num_symbs,
const int accuracy_log);
/// Decode an FSE header as defined in the Zstandard format specification and
/// use the decoded frequencies to initialize a decoding table.
static void FSE_decode_header(FSE_dtable *const dtable, istream_t *const in,
const int max_accuracy_log);
/// Initialize an FSE table that will always return the same symbol and consume
/// 0 bits per symbol, to be used for RLE mode in sequence commands
static void FSE_init_dtable_rle(FSE_dtable *const dtable, const u8 symb);
/// Free the malloc'ed parts of a decoding table
static void FSE_free_dtable(FSE_dtable *const dtable);
/// Deep copy a decoding table, so that it can be used and free'd without
/// impacting the source table.
static void FSE_copy_dtable(FSE_dtable *const dst, const FSE_dtable *const src);
/*** END FSE PRIMITIVES ***************/
/******* END IMPLEMENTATION PRIMITIVE PROTOTYPES ******************************/
/******* ZSTD HELPER STRUCTS AND PROTOTYPES ***********************************/
/// A small structure that can be reused in various places that need to access
/// frame header information
typedef struct {
// The size of window that we need to be able to contiguously store for
// references
size_t window_size;
// The total output size of this compressed frame
size_t frame_content_size;
// The dictionary id if this frame uses one
u32 dictionary_id;
// Whether or not the content of this frame has a checksum
int content_checksum_flag;
// Whether or not the output for this frame is in a single segment
int single_segment_flag;
} frame_header_t;
/// The context needed to decode blocks in a frame
typedef struct {
frame_header_t header;
// The total amount of data available for backreferences, to determine if an
// offset too large to be correct
size_t current_total_output;
const u8 *dict_content;
size_t dict_content_len;
// Entropy encoding tables so they can be repeated by future blocks instead
// of retransmitting
HUF_dtable literals_dtable;
FSE_dtable ll_dtable;
FSE_dtable ml_dtable;
FSE_dtable of_dtable;
// The last 3 offsets for the special "repeat offsets".
u64 previous_offsets[3];
} frame_context_t;
/// The decoded contents of a dictionary so that it doesn't have to be repeated
/// for each frame that uses it
struct dictionary_s {
// Entropy tables
HUF_dtable literals_dtable;
FSE_dtable ll_dtable;
FSE_dtable ml_dtable;
FSE_dtable of_dtable;
// Raw content for backreferences
u8 *content;
size_t content_size;
// Offset history to prepopulate the frame's history
u64 previous_offsets[3];
u32 dictionary_id;
};
/// A tuple containing the parts necessary to decode and execute a ZSTD sequence
/// command
typedef struct {
u32 literal_length;
u32 match_length;
u32 offset;
} sequence_command_t;
/// The decoder works top-down, starting at the high level like Zstd frames, and
/// working down to lower more technical levels such as blocks, literals, and
/// sequences. The high-level functions roughly follow the outline of the
/// format specification:
/// path_to_url
/// Before the implementation of each high-level function declared here, the
/// prototypes for their helper functions are defined and explained
/// Decode a single Zstd frame, or error if the input is not a valid frame.
/// Accepts a dict argument, which may be NULL indicating no dictionary.
/// See
/// path_to_url#frame-concatenation
static void decode_frame(ostream_t *const out, istream_t *const in,
const dictionary_t *const dict);
// Decode data in a compressed block
static void decompress_block(frame_context_t *const ctx, ostream_t *const out,
istream_t *const in);
// Decode the literals section of a block
static size_t decode_literals(frame_context_t *const ctx, istream_t *const in,
u8 **const literals);
// Decode the sequences part of a block
static size_t decode_sequences(frame_context_t *const ctx, istream_t *const in,
sequence_command_t **const sequences);
// Execute the decoded sequences on the literals block
static void execute_sequences(frame_context_t *const ctx, ostream_t *const out,
const u8 *const literals,
const size_t literals_len,
const sequence_command_t *const sequences,
const size_t num_sequences);
// Copies literals and returns the total literal length that was copied
static u32 copy_literals(const size_t seq, istream_t *litstream,
ostream_t *const out);
// Given an offset code from a sequence command (either an actual offset value
// or an index for previous offset), computes the correct offset and udpates
// the offset history
static size_t compute_offset(sequence_command_t seq, u64 *const offset_hist);
// Given an offset, match length, and total output, as well as the frame
// context for the dictionary, determines if the dictionary is used and
// executes the copy operation
static void execute_match_copy(frame_context_t *const ctx, size_t offset,
size_t match_length, size_t total_output,
ostream_t *const out);
/******* END ZSTD HELPER STRUCTS AND PROTOTYPES *******************************/
size_t ZSTD_decompress(void *const dst, const size_t dst_len,
const void *const src, const size_t src_len) {
dictionary_t* uninit_dict = create_dictionary();
size_t const decomp_size = ZSTD_decompress_with_dict(dst, dst_len, src,
src_len, uninit_dict);
free_dictionary(uninit_dict);
return decomp_size;
}
size_t ZSTD_decompress_with_dict(void *const dst, const size_t dst_len,
const void *const src, const size_t src_len,
dictionary_t* parsed_dict) {
istream_t in = IO_make_istream(src, src_len);
ostream_t out = IO_make_ostream(dst, dst_len);
// "A content compressed by Zstandard is transformed into a Zstandard frame.
// Multiple frames can be appended into a single file or stream. A frame is
// totally independent, has a defined beginning and end, and a set of
// parameters which tells the decoder how to decompress it."
/* this decoder assumes decompression of a single frame */
decode_frame(&out, &in, parsed_dict);
return out.ptr - (u8 *)dst;
}
/******* FRAME DECODING ******************************************************/
static void decode_data_frame(ostream_t *const out, istream_t *const in,
const dictionary_t *const dict);
static void init_frame_context(frame_context_t *const context,
istream_t *const in,
const dictionary_t *const dict);
static void free_frame_context(frame_context_t *const context);
static void parse_frame_header(frame_header_t *const header,
istream_t *const in);
static void frame_context_apply_dict(frame_context_t *const ctx,
const dictionary_t *const dict);
static void decompress_data(frame_context_t *const ctx, ostream_t *const out,
istream_t *const in);
static void decode_frame(ostream_t *const out, istream_t *const in,
const dictionary_t *const dict) {
const u32 magic_number = IO_read_bits(in, 32);
// Zstandard frame
//
// "Magic_Number
//
// 4 Bytes, little-endian format. Value : 0xFD2FB528"
if (magic_number == 0xFD2FB528U) {
// ZSTD frame
decode_data_frame(out, in, dict);
return;
}
// not a real frame or a skippable frame
ERROR("Tried to decode non-ZSTD frame");
}
/// Decode a frame that contains compressed data. Not all frames do as there
/// are skippable frames.
/// See
/// path_to_url#general-structure-of-zstandard-frame-format
static void decode_data_frame(ostream_t *const out, istream_t *const in,
const dictionary_t *const dict) {
frame_context_t ctx;
// Initialize the context that needs to be carried from block to block
init_frame_context(&ctx, in, dict);
if (ctx.header.frame_content_size != 0 &&
ctx.header.frame_content_size > out->len) {
OUT_SIZE();
}
decompress_data(&ctx, out, in);
free_frame_context(&ctx);
}
/// Takes the information provided in the header and dictionary, and initializes
/// the context for this frame
static void init_frame_context(frame_context_t *const context,
istream_t *const in,
const dictionary_t *const dict) {
// Most fields in context are correct when initialized to 0
memset(context, 0, sizeof(frame_context_t));
// Parse data from the frame header
parse_frame_header(&context->header, in);
// Set up the offset history for the repeat offset commands
context->previous_offsets[0] = 1;
context->previous_offsets[1] = 4;
context->previous_offsets[2] = 8;
// Apply details from the dict if it exists
frame_context_apply_dict(context, dict);
}
static void free_frame_context(frame_context_t *const context) {
HUF_free_dtable(&context->literals_dtable);
FSE_free_dtable(&context->ll_dtable);
FSE_free_dtable(&context->ml_dtable);
FSE_free_dtable(&context->of_dtable);
memset(context, 0, sizeof(frame_context_t));
}
static void parse_frame_header(frame_header_t *const header,
istream_t *const in) {
// "The first header's byte is called the Frame_Header_Descriptor. It tells
// which other fields are present. Decoding this byte is enough to tell the
// size of Frame_Header.
//
// Bit number Field name
// 7-6 Frame_Content_Size_flag
// 5 Single_Segment_flag
// 4 Unused_bit
// 3 Reserved_bit
// 2 Content_Checksum_flag
// 1-0 Dictionary_ID_flag"
const u8 descriptor = IO_read_bits(in, 8);
// decode frame header descriptor into flags
const u8 frame_content_size_flag = descriptor >> 6;
const u8 single_segment_flag = (descriptor >> 5) & 1;
const u8 reserved_bit = (descriptor >> 3) & 1;
const u8 content_checksum_flag = (descriptor >> 2) & 1;
const u8 dictionary_id_flag = descriptor & 3;
if (reserved_bit != 0) {
CORRUPTION();
}
header->single_segment_flag = single_segment_flag;
header->content_checksum_flag = content_checksum_flag;
// decode window size
if (!single_segment_flag) {
// "Provides guarantees on maximum back-reference distance that will be
// used within compressed data. This information is important for
// decoders to allocate enough memory.
//
// Bit numbers 7-3 2-0
// Field name Exponent Mantissa"
u8 window_descriptor = IO_read_bits(in, 8);
u8 exponent = window_descriptor >> 3;
u8 mantissa = window_descriptor & 7;
// Use the algorithm from the specification to compute window size
// path_to_url#window_descriptor
size_t window_base = (size_t)1 << (10 + exponent);
size_t window_add = (window_base / 8) * mantissa;
header->window_size = window_base + window_add;
}
// decode dictionary id if it exists
if (dictionary_id_flag) {
// "This is a variable size field, which contains the ID of the
// dictionary required to properly decode the frame. Note that this
// field is optional. When it's not present, it's up to the caller to
// make sure it uses the correct dictionary. Format is little-endian."
const int bytes_array[] = {0, 1, 2, 4};
const int bytes = bytes_array[dictionary_id_flag];
header->dictionary_id = IO_read_bits(in, bytes * 8);
} else {
header->dictionary_id = 0;
}
// decode frame content size if it exists
if (single_segment_flag || frame_content_size_flag) {
// "This is the original (uncompressed) size. This information is
// optional. The Field_Size is provided according to value of
// Frame_Content_Size_flag. The Field_Size can be equal to 0 (not
// present), 1, 2, 4 or 8 bytes. Format is little-endian."
//
// if frame_content_size_flag == 0 but single_segment_flag is set, we
// still have a 1 byte field
const int bytes_array[] = {1, 2, 4, 8};
const int bytes = bytes_array[frame_content_size_flag];
header->frame_content_size = IO_read_bits(in, bytes * 8);
if (bytes == 2) {
// "When Field_Size is 2, the offset of 256 is added."
header->frame_content_size += 256;
}
} else {
header->frame_content_size = 0;
}
if (single_segment_flag) {
// "The Window_Descriptor byte is optional. It is absent when
// Single_Segment_flag is set. In this case, the maximum back-reference
// distance is the content size itself, which can be any value from 1 to
// 2^64-1 bytes (16 EB)."
header->window_size = header->frame_content_size;
}
}
/// A dictionary acts as initializing values for the frame context before
/// decompression, so we implement it by applying it's predetermined
/// tables and content to the context before beginning decompression
static void frame_context_apply_dict(frame_context_t *const ctx,
const dictionary_t *const dict) {
// If the content pointer is NULL then it must be an empty dict
if (!dict || !dict->content)
return;
// If the requested dictionary_id is non-zero, the correct dictionary must
// be present
if (ctx->header.dictionary_id != 0 &&
ctx->header.dictionary_id != dict->dictionary_id) {
ERROR("Wrong dictionary provided");
}
// Copy the dict content to the context for references during sequence
// execution
ctx->dict_content = dict->content;
ctx->dict_content_len = dict->content_size;
// If it's a formatted dict copy the precomputed tables in so they can
// be used in the table repeat modes
if (dict->dictionary_id != 0) {
// Deep copy the entropy tables so they can be freed independently of
// the dictionary struct
HUF_copy_dtable(&ctx->literals_dtable, &dict->literals_dtable);
FSE_copy_dtable(&ctx->ll_dtable, &dict->ll_dtable);
FSE_copy_dtable(&ctx->of_dtable, &dict->of_dtable);
FSE_copy_dtable(&ctx->ml_dtable, &dict->ml_dtable);
// Copy the repeated offsets
memcpy(ctx->previous_offsets, dict->previous_offsets,
sizeof(ctx->previous_offsets));
}
}
/// Decompress the data from a frame block by block
static void decompress_data(frame_context_t *const ctx, ostream_t *const out,
istream_t *const in) {
// "A frame encapsulates one or multiple blocks. Each block can be
// compressed or not, and has a guaranteed maximum content size, which
// depends on frame parameters. Unlike frames, each block depends on
// previous blocks for proper decoding. However, each block can be
// decompressed without waiting for its successor, allowing streaming
// operations."
int last_block = 0;
do {
// "Last_Block
//
// The lowest bit signals if this block is the last one. Frame ends
// right after this block.
//
// Block_Type and Block_Size
//
// The next 2 bits represent the Block_Type, while the remaining 21 bits
// represent the Block_Size. Format is little-endian."
last_block = IO_read_bits(in, 1);
const int block_type = IO_read_bits(in, 2);
const size_t block_len = IO_read_bits(in, 21);
switch (block_type) {
case 0: {
// "Raw_Block - this is an uncompressed block. Block_Size is the
// number of bytes to read and copy."
const u8 *const read_ptr = IO_get_read_ptr(in, block_len);
u8 *const write_ptr = IO_get_write_ptr(out, block_len);
// Copy the raw data into the output
memcpy(write_ptr, read_ptr, block_len);
ctx->current_total_output += block_len;
break;
}
case 1: {
// "RLE_Block - this is a single byte, repeated N times. In which
// case, Block_Size is the size to regenerate, while the
// "compressed" block is just 1 byte (the byte to repeat)."
const u8 *const read_ptr = IO_get_read_ptr(in, 1);
u8 *const write_ptr = IO_get_write_ptr(out, block_len);
// Copy `block_len` copies of `read_ptr[0]` to the output
memset(write_ptr, read_ptr[0], block_len);
ctx->current_total_output += block_len;
break;
}
case 2: {
// "Compressed_Block - this is a Zstandard compressed block,
// detailed in another section of this specification. Block_Size is
// the compressed size.
// Create a sub-stream for the block
istream_t block_stream = IO_make_sub_istream(in, block_len);
decompress_block(ctx, out, &block_stream);
break;
}
case 3:
// "Reserved - this is not a block. This value cannot be used with
// current version of this specification."
CORRUPTION();
break;
default:
IMPOSSIBLE();
}
} while (!last_block);
if (ctx->header.content_checksum_flag) {
// This program does not support checking the checksum, so skip over it
// if it's present
IO_advance_input(in, 4);
}
}
/******* END FRAME DECODING ***************************************************/
/******* BLOCK DECOMPRESSION **************************************************/
static void decompress_block(frame_context_t *const ctx, ostream_t *const out,
istream_t *const in) {
// "A compressed block consists of 2 sections :
//
// Literals_Section
// Sequences_Section"
// Part 1: decode the literals block
u8 *literals = NULL;
const size_t literals_size = decode_literals(ctx, in, &literals);
// Part 2: decode the sequences block
sequence_command_t *sequences = NULL;
const size_t num_sequences =
decode_sequences(ctx, in, &sequences);
// Part 3: combine literals and sequence commands to generate output
execute_sequences(ctx, out, literals, literals_size, sequences,
num_sequences);
free(literals);
free(sequences);
}
/******* END BLOCK DECOMPRESSION **********************************************/
/******* LITERALS DECODING ****************************************************/
static size_t decode_literals_simple(istream_t *const in, u8 **const literals,
const int block_type,
const int size_format);
static size_t decode_literals_compressed(frame_context_t *const ctx,
istream_t *const in,
u8 **const literals,
const int block_type,
const int size_format);
static void decode_huf_table(HUF_dtable *const dtable, istream_t *const in);
static void fse_decode_hufweights(ostream_t *weights, istream_t *const in,
int *const num_symbs);
static size_t decode_literals(frame_context_t *const ctx, istream_t *const in,
u8 **const literals) {
// "Literals can be stored uncompressed or compressed using Huffman prefix
// codes. When compressed, an optional tree description can be present,
// followed by 1 or 4 streams."
//
// "Literals_Section_Header
//
// Header is in charge of describing how literals are packed. It's a
// byte-aligned variable-size bitfield, ranging from 1 to 5 bytes, using
// little-endian convention."
//
// "Literals_Block_Type
//
// This field uses 2 lowest bits of first byte, describing 4 different block
// types"
//
// size_format takes between 1 and 2 bits
int block_type = IO_read_bits(in, 2);
int size_format = IO_read_bits(in, 2);
if (block_type <= 1) {
// Raw or RLE literals block
return decode_literals_simple(in, literals, block_type,
size_format);
} else {
// Huffman compressed literals
return decode_literals_compressed(ctx, in, literals, block_type,
size_format);
}
}
/// Decodes literals blocks in raw or RLE form
static size_t decode_literals_simple(istream_t *const in, u8 **const literals,
const int block_type,
const int size_format) {
size_t size;
switch (size_format) {
// These cases are in the form ?0
// In this case, the ? bit is actually part of the size field
case 0:
case 2:
// "Size_Format uses 1 bit. Regenerated_Size uses 5 bits (0-31)."
IO_rewind_bits(in, 1);
size = IO_read_bits(in, 5);
break;
case 1:
// "Size_Format uses 2 bits. Regenerated_Size uses 12 bits (0-4095)."
size = IO_read_bits(in, 12);
break;
case 3:
// "Size_Format uses 2 bits. Regenerated_Size uses 20 bits (0-1048575)."
size = IO_read_bits(in, 20);
break;
default:
// Size format is in range 0-3
IMPOSSIBLE();
}
if (size > MAX_LITERALS_SIZE) {
CORRUPTION();
}
*literals = malloc(size);
if (!*literals) {
BAD_ALLOC();
}
switch (block_type) {
case 0: {
// "Raw_Literals_Block - Literals are stored uncompressed."
const u8 *const read_ptr = IO_get_read_ptr(in, size);
memcpy(*literals, read_ptr, size);
break;
}
case 1: {
// "RLE_Literals_Block - Literals consist of a single byte value repeated N times."
const u8 *const read_ptr = IO_get_read_ptr(in, 1);
memset(*literals, read_ptr[0], size);
break;
}
default:
IMPOSSIBLE();
}
return size;
}
/// Decodes Huffman compressed literals
static size_t decode_literals_compressed(frame_context_t *const ctx,
istream_t *const in,
u8 **const literals,
const int block_type,
const int size_format) {
size_t regenerated_size, compressed_size;
// Only size_format=0 has 1 stream, so default to 4
int num_streams = 4;
switch (size_format) {
case 0:
// "A single stream. Both Compressed_Size and Regenerated_Size use 10
// bits (0-1023)."
num_streams = 1;
// Fall through as it has the same size format
case 1:
// "4 streams. Both Compressed_Size and Regenerated_Size use 10 bits
// (0-1023)."
regenerated_size = IO_read_bits(in, 10);
compressed_size = IO_read_bits(in, 10);
break;
case 2:
// "4 streams. Both Compressed_Size and Regenerated_Size use 14 bits
// (0-16383)."
regenerated_size = IO_read_bits(in, 14);
compressed_size = IO_read_bits(in, 14);
break;
case 3:
// "4 streams. Both Compressed_Size and Regenerated_Size use 18 bits
// (0-262143)."
regenerated_size = IO_read_bits(in, 18);
compressed_size = IO_read_bits(in, 18);
break;
default:
// Impossible
IMPOSSIBLE();
}
if (regenerated_size > MAX_LITERALS_SIZE ||
compressed_size >= regenerated_size) {
CORRUPTION();
}
*literals = malloc(regenerated_size);
if (!*literals) {
BAD_ALLOC();
}
ostream_t lit_stream = IO_make_ostream(*literals, regenerated_size);
istream_t huf_stream = IO_make_sub_istream(in, compressed_size);
if (block_type == 2) {
// Decode the provided Huffman table
// "This section is only present when Literals_Block_Type type is
// Compressed_Literals_Block (2)."
HUF_free_dtable(&ctx->literals_dtable);
decode_huf_table(&ctx->literals_dtable, &huf_stream);
} else {
// If the previous Huffman table is being repeated, ensure it exists
if (!ctx->literals_dtable.symbols) {
CORRUPTION();
}
}
size_t symbols_decoded;
if (num_streams == 1) {
symbols_decoded = HUF_decompress_1stream(&ctx->literals_dtable, &lit_stream, &huf_stream);
} else {
symbols_decoded = HUF_decompress_4stream(&ctx->literals_dtable, &lit_stream, &huf_stream);
}
if (symbols_decoded != regenerated_size) {
CORRUPTION();
}
return regenerated_size;
}
// Decode the Huffman table description
static void decode_huf_table(HUF_dtable *const dtable, istream_t *const in) {
// "All literal values from zero (included) to last present one (excluded)
// are represented by Weight with values from 0 to Max_Number_of_Bits."
// "This is a single byte value (0-255), which describes how to decode the list of weights."
const u8 header = IO_read_bits(in, 8);
u8 weights[HUF_MAX_SYMBS];
memset(weights, 0, sizeof(weights));
int num_symbs;
if (header >= 128) {
// "This is a direct representation, where each Weight is written
// directly as a 4 bits field (0-15). The full representation occupies
// ((Number_of_Symbols+1)/2) bytes, meaning it uses a last full byte
// even if Number_of_Symbols is odd. Number_of_Symbols = headerByte -
// 127"
num_symbs = header - 127;
const size_t bytes = (num_symbs + 1) / 2;
const u8 *const weight_src = IO_get_read_ptr(in, bytes);
for (int i = 0; i < num_symbs; i++) {
// "They are encoded forward, 2
// weights to a byte with the first weight taking the top four bits
// and the second taking the bottom four (e.g. the following
// operations could be used to read the weights: Weight[0] =
// (Byte[0] >> 4), Weight[1] = (Byte[0] & 0xf), etc.)."
if (i % 2 == 0) {
weights[i] = weight_src[i / 2] >> 4;
} else {
weights[i] = weight_src[i / 2] & 0xf;
}
}
} else {
// The weights are FSE encoded, decode them before we can construct the
// table
istream_t fse_stream = IO_make_sub_istream(in, header);
ostream_t weight_stream = IO_make_ostream(weights, HUF_MAX_SYMBS);
fse_decode_hufweights(&weight_stream, &fse_stream, &num_symbs);
}
// Construct the table using the decoded weights
HUF_init_dtable_usingweights(dtable, weights, num_symbs);
}
static void fse_decode_hufweights(ostream_t *weights, istream_t *const in,
int *const num_symbs) {
const int MAX_ACCURACY_LOG = 7;
FSE_dtable dtable;
// "An FSE bitstream starts by a header, describing probabilities
// distribution. It will create a Decoding Table. For a list of Huffman
// weights, maximum accuracy is 7 bits."
FSE_decode_header(&dtable, in, MAX_ACCURACY_LOG);
// Decode the weights
*num_symbs = FSE_decompress_interleaved2(&dtable, weights, in);
FSE_free_dtable(&dtable);
}
/******* END LITERALS DECODING ************************************************/
/******* SEQUENCE DECODING ****************************************************/
/// The combination of FSE states needed to decode sequences
typedef struct {
FSE_dtable ll_table;
FSE_dtable of_table;
FSE_dtable ml_table;
u16 ll_state;
u16 of_state;
u16 ml_state;
} sequence_states_t;
/// Different modes to signal to decode_seq_tables what to do
typedef enum {
seq_literal_length = 0,
seq_offset = 1,
seq_match_length = 2,
} seq_part_t;
typedef enum {
seq_predefined = 0,
seq_rle = 1,
seq_fse = 2,
seq_repeat = 3,
} seq_mode_t;
/// The predefined FSE distribution tables for `seq_predefined` mode
static const i16 SEQ_LITERAL_LENGTH_DEFAULT_DIST[36] = {
4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2,
2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1, 1, 1, -1, -1, -1, -1};
static const i16 SEQ_OFFSET_DEFAULT_DIST[29] = {
1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1};
static const i16 SEQ_MATCH_LENGTH_DEFAULT_DIST[53] = {
1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1};
/// The sequence decoding baseline and number of additional bits to read/add
/// path_to_url#the-codes-for-literals-lengths-match-lengths-and-offsets
static const u32 SEQ_LITERAL_LENGTH_BASELINES[36] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 18, 20, 22, 24, 28, 32, 40,
48, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65538};
static const u8 SEQ_LITERAL_LENGTH_EXTRA_BITS[36] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
1, 1, 2, 2, 3, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
static const u32 SEQ_MATCH_LENGTH_BASELINES[53] = {
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 37, 39, 41, 43, 47, 51, 59, 67, 83,
99, 131, 259, 515, 1027, 2051, 4099, 8195, 16387, 32771, 65539};
static const u8 SEQ_MATCH_LENGTH_EXTRA_BITS[53] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
2, 2, 3, 3, 4, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
/// Offset decoding is simpler so we just need a maximum code value
static const u8 SEQ_MAX_CODES[3] = {35, -1, 52};
static void decompress_sequences(frame_context_t *const ctx,
istream_t *const in,
sequence_command_t *const sequences,
const size_t num_sequences);
static sequence_command_t decode_sequence(sequence_states_t *const state,
const u8 *const src,
i64 *const offset);
static void decode_seq_table(FSE_dtable *const table, istream_t *const in,
const seq_part_t type, const seq_mode_t mode);
static size_t decode_sequences(frame_context_t *const ctx, istream_t *in,
sequence_command_t **const sequences) {
// "A compressed block is a succession of sequences . A sequence is a
// literal copy command, followed by a match copy command. A literal copy
// command specifies a length. It is the number of bytes to be copied (or
// extracted) from the literal section. A match copy command specifies an
// offset and a length. The offset gives the position to copy from, which
// can be within a previous block."
size_t num_sequences;
// "Number_of_Sequences
//
// This is a variable size field using between 1 and 3 bytes. Let's call its
// first byte byte0."
u8 header = IO_read_bits(in, 8);
if (header == 0) {
// "There are no sequences. The sequence section stops there.
// Regenerated content is defined entirely by literals section."
*sequences = NULL;
return 0;
} else if (header < 128) {
// "Number_of_Sequences = byte0 . Uses 1 byte."
num_sequences = header;
} else if (header < 255) {
// "Number_of_Sequences = ((byte0-128) << 8) + byte1 . Uses 2 bytes."
num_sequences = ((header - 128) << 8) + IO_read_bits(in, 8);
} else {
// "Number_of_Sequences = byte1 + (byte2<<8) + 0x7F00 . Uses 3 bytes."
num_sequences = IO_read_bits(in, 16) + 0x7F00;
}
*sequences = malloc(num_sequences * sizeof(sequence_command_t));
if (!*sequences) {
BAD_ALLOC();
}
decompress_sequences(ctx, in, *sequences, num_sequences);
return num_sequences;
}
/// Decompress the FSE encoded sequence commands
static void decompress_sequences(frame_context_t *const ctx, istream_t *in,
sequence_command_t *const sequences,
const size_t num_sequences) {
// "The Sequences_Section regroup all symbols required to decode commands.
// There are 3 symbol types : literals lengths, offsets and match lengths.
// They are encoded together, interleaved, in a single bitstream."
// "Symbol compression modes
//
// This is a single byte, defining the compression mode of each symbol
// type."
//
// Bit number : Field name
// 7-6 : Literals_Lengths_Mode
// 5-4 : Offsets_Mode
// 3-2 : Match_Lengths_Mode
// 1-0 : Reserved
u8 compression_modes = IO_read_bits(in, 8);
if ((compression_modes & 3) != 0) {
// Reserved bits set
CORRUPTION();
}
// "Following the header, up to 3 distribution tables can be described. When
// present, they are in this order :
//
// Literals lengths
// Offsets
// Match Lengths"
// Update the tables we have stored in the context
decode_seq_table(&ctx->ll_dtable, in, seq_literal_length,
(compression_modes >> 6) & 3);
decode_seq_table(&ctx->of_dtable, in, seq_offset,
(compression_modes >> 4) & 3);
decode_seq_table(&ctx->ml_dtable, in, seq_match_length,
(compression_modes >> 2) & 3);
sequence_states_t states;
// Initialize the decoding tables
{
states.ll_table = ctx->ll_dtable;
states.of_table = ctx->of_dtable;
states.ml_table = ctx->ml_dtable;
}
const size_t len = IO_istream_len(in);
const u8 *const src = IO_get_read_ptr(in, len);
// "After writing the last bit containing information, the compressor writes
// a single 1-bit and then fills the byte with 0-7 0 bits of padding."
const int padding = 8 - highest_set_bit(src[len - 1]);
// The offset starts at the end because FSE streams are read backwards
i64 bit_offset = len * 8 - padding;
// "The bitstream starts with initial state values, each using the required
// number of bits in their respective accuracy, decoded previously from
// their normalized distribution.
//
// It starts by Literals_Length_State, followed by Offset_State, and finally
// Match_Length_State."
FSE_init_state(&states.ll_table, &states.ll_state, src, &bit_offset);
FSE_init_state(&states.of_table, &states.of_state, src, &bit_offset);
FSE_init_state(&states.ml_table, &states.ml_state, src, &bit_offset);
for (size_t i = 0; i < num_sequences; i++) {
// Decode sequences one by one
sequences[i] = decode_sequence(&states, src, &bit_offset);
}
if (bit_offset != 0) {
CORRUPTION();
}
}
// Decode a single sequence and update the state
static sequence_command_t decode_sequence(sequence_states_t *const states,
const u8 *const src,
i64 *const offset) {
// "Each symbol is a code in its own context, which specifies Baseline and
// Number_of_Bits to add. Codes are FSE compressed, and interleaved with raw
// additional bits in the same bitstream."
// Decode symbols, but don't update states
const u8 of_code = FSE_peek_symbol(&states->of_table, states->of_state);
const u8 ll_code = FSE_peek_symbol(&states->ll_table, states->ll_state);
const u8 ml_code = FSE_peek_symbol(&states->ml_table, states->ml_state);
// Offset doesn't need a max value as it's not decoded using a table
if (ll_code > SEQ_MAX_CODES[seq_literal_length] ||
ml_code > SEQ_MAX_CODES[seq_match_length]) {
CORRUPTION();
}
// Read the interleaved bits
sequence_command_t seq;
// "Decoding starts by reading the Number_of_Bits required to decode Offset.
// It then does the same for Match_Length, and then for Literals_Length."
seq.offset = ((u32)1 << of_code) + STREAM_read_bits(src, of_code, offset);
seq.match_length =
SEQ_MATCH_LENGTH_BASELINES[ml_code] +
STREAM_read_bits(src, SEQ_MATCH_LENGTH_EXTRA_BITS[ml_code], offset);
seq.literal_length =
SEQ_LITERAL_LENGTH_BASELINES[ll_code] +
STREAM_read_bits(src, SEQ_LITERAL_LENGTH_EXTRA_BITS[ll_code], offset);
// "If it is not the last sequence in the block, the next operation is to
// update states. Using the rules pre-calculated in the decoding tables,
// Literals_Length_State is updated, followed by Match_Length_State, and
// then Offset_State."
// If the stream is complete don't read bits to update state
if (*offset != 0) {
FSE_update_state(&states->ll_table, &states->ll_state, src, offset);
FSE_update_state(&states->ml_table, &states->ml_state, src, offset);
FSE_update_state(&states->of_table, &states->of_state, src, offset);
}
return seq;
}
/// Given a sequence part and table mode, decode the FSE distribution
/// Errors if the mode is `seq_repeat` without a pre-existing table in `table`
static void decode_seq_table(FSE_dtable *const table, istream_t *const in,
const seq_part_t type, const seq_mode_t mode) {
// Constant arrays indexed by seq_part_t
const i16 *const default_distributions[] = {SEQ_LITERAL_LENGTH_DEFAULT_DIST,
SEQ_OFFSET_DEFAULT_DIST,
SEQ_MATCH_LENGTH_DEFAULT_DIST};
const size_t default_distribution_lengths[] = {36, 29, 53};
const size_t default_distribution_accuracies[] = {6, 5, 6};
const size_t max_accuracies[] = {9, 8, 9};
if (mode != seq_repeat) {
// Free old one before overwriting
FSE_free_dtable(table);
}
switch (mode) {
case seq_predefined: {
// "Predefined_Mode : uses a predefined distribution table."
const i16 *distribution = default_distributions[type];
const size_t symbs = default_distribution_lengths[type];
const size_t accuracy_log = default_distribution_accuracies[type];
FSE_init_dtable(table, distribution, symbs, accuracy_log);
break;
}
case seq_rle: {
// "RLE_Mode : it's a single code, repeated Number_of_Sequences times."
const u8 symb = IO_get_read_ptr(in, 1)[0];
FSE_init_dtable_rle(table, symb);
break;
}
case seq_fse: {
// "FSE_Compressed_Mode : standard FSE compression. A distribution table
// will be present "
FSE_decode_header(table, in, max_accuracies[type]);
break;
}
case seq_repeat:
// "Repeat_Mode : re-use distribution table from previous compressed
// block."
// Nothing to do here, table will be unchanged
if (!table->symbols) {
// This mode is invalid if we don't already have a table
CORRUPTION();
}
break;
default:
// Impossible, as mode is from 0-3
IMPOSSIBLE();
break;
}
}
/******* END SEQUENCE DECODING ************************************************/
/******* SEQUENCE EXECUTION ***************************************************/
static void execute_sequences(frame_context_t *const ctx, ostream_t *const out,
const u8 *const literals,
const size_t literals_len,
const sequence_command_t *const sequences,
const size_t num_sequences) {
istream_t litstream = IO_make_istream(literals, literals_len);
u64 *const offset_hist = ctx->previous_offsets;
size_t total_output = ctx->current_total_output;
for (size_t i = 0; i < num_sequences; i++) {
const sequence_command_t seq = sequences[i];
{
const u32 literals_size = copy_literals(seq.literal_length, &litstream, out);
total_output += literals_size;
}
size_t const offset = compute_offset(seq, offset_hist);
size_t const match_length = seq.match_length;
execute_match_copy(ctx, offset, match_length, total_output, out);
total_output += match_length;
}
// Copy any leftover literals
{
size_t len = IO_istream_len(&litstream);
copy_literals(len, &litstream, out);
total_output += len;
}
ctx->current_total_output = total_output;
}
static u32 copy_literals(const size_t literal_length, istream_t *litstream,
ostream_t *const out) {
// If the sequence asks for more literals than are left, the
// sequence must be corrupted
if (literal_length > IO_istream_len(litstream)) {
CORRUPTION();
}
u8 *const write_ptr = IO_get_write_ptr(out, literal_length);
const u8 *const read_ptr =
IO_get_read_ptr(litstream, literal_length);
// Copy literals to output
memcpy(write_ptr, read_ptr, literal_length);
return literal_length;
}
static size_t compute_offset(sequence_command_t seq, u64 *const offset_hist) {
size_t offset;
// Offsets are special, we need to handle the repeat offsets
if (seq.offset <= 3) {
// "The first 3 values define a repeated offset and we will call
// them Repeated_Offset1, Repeated_Offset2, and Repeated_Offset3.
// They are sorted in recency order, with Repeated_Offset1 meaning
// 'most recent one'".
// Use 0 indexing for the array
u32 idx = seq.offset - 1;
if (seq.literal_length == 0) {
// "There is an exception though, when current sequence's
// literals length is 0. In this case, repeated offsets are
// shifted by one, so Repeated_Offset1 becomes Repeated_Offset2,
// Repeated_Offset2 becomes Repeated_Offset3, and
// Repeated_Offset3 becomes Repeated_Offset1 - 1_byte."
idx++;
}
if (idx == 0) {
offset = offset_hist[0];
} else {
// If idx == 3 then literal length was 0 and the offset was 3,
// as per the exception listed above
offset = idx < 3 ? offset_hist[idx] : offset_hist[0] - 1;
// If idx == 1 we don't need to modify offset_hist[2], since
// we're using the second-most recent code
if (idx > 1) {
offset_hist[2] = offset_hist[1];
}
offset_hist[1] = offset_hist[0];
offset_hist[0] = offset;
}
} else {
// When it's not a repeat offset:
// "if (Offset_Value > 3) offset = Offset_Value - 3;"
offset = seq.offset - 3;
// Shift back history
offset_hist[2] = offset_hist[1];
offset_hist[1] = offset_hist[0];
offset_hist[0] = offset;
}
return offset;
}
static void execute_match_copy(frame_context_t *const ctx, size_t offset,
size_t match_length, size_t total_output,
ostream_t *const out) {
u8 *write_ptr = IO_get_write_ptr(out, match_length);
if (total_output <= ctx->header.window_size) {
// In this case offset might go back into the dictionary
if (offset > total_output + ctx->dict_content_len) {
// The offset goes beyond even the dictionary
CORRUPTION();
}
if (offset > total_output) {
// "The rest of the dictionary is its content. The content act
// as a "past" in front of data to compress or decompress, so it
// can be referenced in sequence commands."
const size_t dict_copy =
MIN(offset - total_output, match_length);
const size_t dict_offset =
ctx->dict_content_len - (offset - total_output);
memcpy(write_ptr, ctx->dict_content + dict_offset, dict_copy);
write_ptr += dict_copy;
match_length -= dict_copy;
}
} else if (offset > ctx->header.window_size) {
CORRUPTION();
}
// We must copy byte by byte because the match length might be larger
// than the offset
// ex: if the output so far was "abc", a command with offset=3 and
// match_length=6 would produce "abcabcabc" as the new output
for (size_t j = 0; j < match_length; j++) {
*write_ptr = *(write_ptr - offset);
write_ptr++;
}
}
/******* END SEQUENCE EXECUTION ***********************************************/
/******* OUTPUT SIZE COUNTING *************************************************/
/// Get the decompressed size of an input stream so memory can be allocated in
/// advance.
/// This implementation assumes `src` points to a single ZSTD-compressed frame
size_t ZSTD_get_decompressed_size(const void *src, const size_t src_len) {
istream_t in = IO_make_istream(src, src_len);
// get decompressed size from ZSTD frame header
{
const u32 magic_number = IO_read_bits(&in, 32);
if (magic_number == 0xFD2FB528U) {
// ZSTD frame
frame_header_t header;
parse_frame_header(&header, &in);
if (header.frame_content_size == 0 && !header.single_segment_flag) {
// Content size not provided, we can't tell
return -1;
}
return header.frame_content_size;
} else {
// not a real frame or skippable frame
ERROR("ZSTD frame magic number did not match");
}
}
}
/******* END OUTPUT SIZE COUNTING *********************************************/
/******* DICTIONARY PARSING ***************************************************/
#define DICT_SIZE_ERROR() ERROR("Dictionary size cannot be less than 8 bytes")
#define NULL_SRC() ERROR("Tried to create dictionary with pointer to null src");
dictionary_t* create_dictionary() {
dictionary_t* dict = calloc(1, sizeof(dictionary_t));
if (!dict) {
BAD_ALLOC();
}
return dict;
}
static void init_dictionary_content(dictionary_t *const dict,
istream_t *const in);
void parse_dictionary(dictionary_t *const dict, const void *src,
size_t src_len) {
const u8 *byte_src = (const u8 *)src;
memset(dict, 0, sizeof(dictionary_t));
if (src == NULL) { /* cannot initialize dictionary with null src */
NULL_SRC();
}
if (src_len < 8) {
DICT_SIZE_ERROR();
}
istream_t in = IO_make_istream(byte_src, src_len);
const u32 magic_number = IO_read_bits(&in, 32);
if (magic_number != 0xEC30A437) {
// raw content dict
IO_rewind_bits(&in, 32);
init_dictionary_content(dict, &in);
return;
}
dict->dictionary_id = IO_read_bits(&in, 32);
// "Entropy_Tables : following the same format as the tables in compressed
// blocks. They are stored in following order : Huffman tables for literals,
// FSE table for offsets, FSE table for match lengths, and FSE table for
// literals lengths. It's finally followed by 3 offset values, populating
// recent offsets (instead of using {1,4,8}), stored in order, 4-bytes
// little-endian each, for a total of 12 bytes. Each recent offset must have
// a value < dictionary size."
decode_huf_table(&dict->literals_dtable, &in);
decode_seq_table(&dict->of_dtable, &in, seq_offset, seq_fse);
decode_seq_table(&dict->ml_dtable, &in, seq_match_length, seq_fse);
decode_seq_table(&dict->ll_dtable, &in, seq_literal_length, seq_fse);
// Read in the previous offset history
dict->previous_offsets[0] = IO_read_bits(&in, 32);
dict->previous_offsets[1] = IO_read_bits(&in, 32);
dict->previous_offsets[2] = IO_read_bits(&in, 32);
// Ensure the provided offsets aren't too large
// "Each recent offset must have a value < dictionary size."
for (int i = 0; i < 3; i++) {
if (dict->previous_offsets[i] > src_len) {
ERROR("Dictionary corrupted");
}
}
// "Content : The rest of the dictionary is its content. The content act as
// a "past" in front of data to compress or decompress, so it can be
// referenced in sequence commands."
init_dictionary_content(dict, &in);
}
static void init_dictionary_content(dictionary_t *const dict,
istream_t *const in) {
// Copy in the content
dict->content_size = IO_istream_len(in);
dict->content = malloc(dict->content_size);
if (!dict->content) {
BAD_ALLOC();
}
const u8 *const content = IO_get_read_ptr(in, dict->content_size);
memcpy(dict->content, content, dict->content_size);
}
/// Free an allocated dictionary
void free_dictionary(dictionary_t *const dict) {
HUF_free_dtable(&dict->literals_dtable);
FSE_free_dtable(&dict->ll_dtable);
FSE_free_dtable(&dict->of_dtable);
FSE_free_dtable(&dict->ml_dtable);
free(dict->content);
memset(dict, 0, sizeof(dictionary_t));
free(dict);
}
/******* END DICTIONARY PARSING ***********************************************/
/******* IO STREAM OPERATIONS *************************************************/
#define UNALIGNED() ERROR("Attempting to operate on a non-byte aligned stream")
/// Reads `num` bits from a bitstream, and updates the internal offset
static inline u64 IO_read_bits(istream_t *const in, const int num_bits) {
if (num_bits > 64 || num_bits <= 0) {
ERROR("Attempt to read an invalid number of bits");
}
const size_t bytes = (num_bits + in->bit_offset + 7) / 8;
const size_t full_bytes = (num_bits + in->bit_offset) / 8;
if (bytes > in->len) {
INP_SIZE();
}
const u64 result = read_bits_LE(in->ptr, num_bits, in->bit_offset);
in->bit_offset = (num_bits + in->bit_offset) % 8;
in->ptr += full_bytes;
in->len -= full_bytes;
return result;
}
/// If a non-zero number of bits have been read from the current byte, advance
/// the offset to the next byte
static inline void IO_rewind_bits(istream_t *const in, int num_bits) {
if (num_bits < 0) {
ERROR("Attempting to rewind stream by a negative number of bits");
}
// move the offset back by `num_bits` bits
const int new_offset = in->bit_offset - num_bits;
// determine the number of whole bytes we have to rewind, rounding up to an
// integer number (e.g. if `new_offset == -5`, `bytes == 1`)
const i64 bytes = -(new_offset - 7) / 8;
in->ptr -= bytes;
in->len += bytes;
// make sure the resulting `bit_offset` is positive, as mod in C does not
// convert numbers from negative to positive (e.g. -22 % 8 == -6)
in->bit_offset = ((new_offset % 8) + 8) % 8;
}
/// If the remaining bits in a byte will be unused, advance to the end of the
/// byte
static inline void IO_align_stream(istream_t *const in) {
if (in->bit_offset != 0) {
if (in->len == 0) {
INP_SIZE();
}
in->ptr++;
in->len--;
in->bit_offset = 0;
}
}
/// Write the given byte into the output stream
static inline void IO_write_byte(ostream_t *const out, u8 symb) {
if (out->len == 0) {
OUT_SIZE();
}
out->ptr[0] = symb;
out->ptr++;
out->len--;
}
/// Returns the number of bytes left to be read in this stream. The stream must
/// be byte aligned.
static inline size_t IO_istream_len(const istream_t *const in) {
return in->len;
}
/// Returns a pointer where `len` bytes can be read, and advances the internal
/// state. The stream must be byte aligned.
static inline const u8 *IO_get_read_ptr(istream_t *const in, size_t len) {
if (len > in->len) {
INP_SIZE();
}
if (in->bit_offset != 0) {
UNALIGNED();
}
const u8 *const ptr = in->ptr;
in->ptr += len;
in->len -= len;
return ptr;
}
/// Returns a pointer to write `len` bytes to, and advances the internal state
static inline u8 *IO_get_write_ptr(ostream_t *const out, size_t len) {
if (len > out->len) {
OUT_SIZE();
}
u8 *const ptr = out->ptr;
out->ptr += len;
out->len -= len;
return ptr;
}
/// Advance the inner state by `len` bytes
static inline void IO_advance_input(istream_t *const in, size_t len) {
if (len > in->len) {
INP_SIZE();
}
if (in->bit_offset != 0) {
UNALIGNED();
}
in->ptr += len;
in->len -= len;
}
/// Returns an `ostream_t` constructed from the given pointer and length
static inline ostream_t IO_make_ostream(u8 *out, size_t len) {
return (ostream_t) { out, len };
}
/// Returns an `istream_t` constructed from the given pointer and length
static inline istream_t IO_make_istream(const u8 *in, size_t len) {
return (istream_t) { in, len, 0 };
}
/// Returns an `istream_t` with the same base as `in`, and length `len`
/// Then, advance `in` to account for the consumed bytes
/// `in` must be byte aligned
static inline istream_t IO_make_sub_istream(istream_t *const in, size_t len) {
// Consume `len` bytes of the parent stream
const u8 *const ptr = IO_get_read_ptr(in, len);
// Make a substream using the pointer to those `len` bytes
return IO_make_istream(ptr, len);
}
/******* END IO STREAM OPERATIONS *********************************************/
/******* BITSTREAM OPERATIONS *************************************************/
/// Read `num` bits (up to 64) from `src + offset`, where `offset` is in bits
static inline u64 read_bits_LE(const u8 *src, const int num_bits,
const size_t offset) {
if (num_bits > 64) {
ERROR("Attempt to read an invalid number of bits");
}
// Skip over bytes that aren't in range
src += offset / 8;
size_t bit_offset = offset % 8;
u64 res = 0;
int shift = 0;
int left = num_bits;
while (left > 0) {
u64 mask = left >= 8 ? 0xff : (((u64)1 << left) - 1);
// Read the next byte, shift it to account for the offset, and then mask
// out the top part if we don't need all the bits
res += (((u64)*src++ >> bit_offset) & mask) << shift;
shift += 8 - bit_offset;
left -= 8 - bit_offset;
bit_offset = 0;
}
return res;
}
/// Read bits from the end of a HUF or FSE bitstream. `offset` is in bits, so
/// it updates `offset` to `offset - bits`, and then reads `bits` bits from
/// `src + offset`. If the offset becomes negative, the extra bits at the
/// bottom are filled in with `0` bits instead of reading from before `src`.
static inline u64 STREAM_read_bits(const u8 *const src, const int bits,
i64 *const offset) {
*offset = *offset - bits;
size_t actual_off = *offset;
size_t actual_bits = bits;
// Don't actually read bits from before the start of src, so if `*offset <
// 0` fix actual_off and actual_bits to reflect the quantity to read
if (*offset < 0) {
actual_bits += *offset;
actual_off = 0;
}
u64 res = read_bits_LE(src, actual_bits, actual_off);
if (*offset < 0) {
// Fill in the bottom "overflowed" bits with 0's
res = -*offset >= 64 ? 0 : (res << -*offset);
}
return res;
}
/******* END BITSTREAM OPERATIONS *********************************************/
/******* BIT COUNTING OPERATIONS **********************************************/
/// Returns `x`, where `2^x` is the largest power of 2 less than or equal to
/// `num`, or `-1` if `num == 0`.
static inline int highest_set_bit(const u64 num) {
for (int i = 63; i >= 0; i--) {
if (((u64)1 << i) <= num) {
return i;
}
}
return -1;
}
/******* END BIT COUNTING OPERATIONS ******************************************/
/******* HUFFMAN PRIMITIVES ***************************************************/
static inline u8 HUF_decode_symbol(const HUF_dtable *const dtable,
u16 *const state, const u8 *const src,
i64 *const offset) {
// Look up the symbol and number of bits to read
const u8 symb = dtable->symbols[*state];
const u8 bits = dtable->num_bits[*state];
const u16 rest = STREAM_read_bits(src, bits, offset);
// Shift `bits` bits out of the state, keeping the low order bits that
// weren't necessary to determine this symbol. Then add in the new bits
// read from the stream.
*state = ((*state << bits) + rest) & (((u16)1 << dtable->max_bits) - 1);
return symb;
}
static inline void HUF_init_state(const HUF_dtable *const dtable,
u16 *const state, const u8 *const src,
i64 *const offset) {
// Read in a full `dtable->max_bits` bits to initialize the state
const u8 bits = dtable->max_bits;
*state = STREAM_read_bits(src, bits, offset);
}
static size_t HUF_decompress_1stream(const HUF_dtable *const dtable,
ostream_t *const out,
istream_t *const in) {
const size_t len = IO_istream_len(in);
if (len == 0) {
INP_SIZE();
}
const u8 *const src = IO_get_read_ptr(in, len);
// "Each bitstream must be read backward, that is starting from the end down
// to the beginning. Therefore it's necessary to know the size of each
// bitstream.
//
// It's also necessary to know exactly which bit is the latest. This is
// detected by a final bit flag : the highest bit of latest byte is a
// final-bit-flag. Consequently, a last byte of 0 is not possible. And the
// final-bit-flag itself is not part of the useful bitstream. Hence, the
// last byte contains between 0 and 7 useful bits."
const int padding = 8 - highest_set_bit(src[len - 1]);
// Offset starts at the end because HUF streams are read backwards
i64 bit_offset = len * 8 - padding;
u16 state;
HUF_init_state(dtable, &state, src, &bit_offset);
size_t symbols_written = 0;
while (bit_offset > -dtable->max_bits) {
// Iterate over the stream, decoding one symbol at a time
IO_write_byte(out, HUF_decode_symbol(dtable, &state, src, &bit_offset));
symbols_written++;
}
// "The process continues up to reading the required number of symbols per
// stream. If a bitstream is not entirely and exactly consumed, hence
// reaching exactly its beginning position with all bits consumed, the
// decoding process is considered faulty."
// When all symbols have been decoded, the final state value shouldn't have
// any data from the stream, so it should have "read" dtable->max_bits from
// before the start of `src`
// Therefore `offset`, the edge to start reading new bits at, should be
// dtable->max_bits before the start of the stream
if (bit_offset != -dtable->max_bits) {
CORRUPTION();
}
return symbols_written;
}
static size_t HUF_decompress_4stream(const HUF_dtable *const dtable,
ostream_t *const out, istream_t *const in) {
// "Compressed size is provided explicitly : in the 4-streams variant,
// bitstreams are preceded by 3 unsigned little-endian 16-bits values. Each
// value represents the compressed size of one stream, in order. The last
// stream size is deducted from total compressed size and from previously
// decoded stream sizes"
const size_t csize1 = IO_read_bits(in, 16);
const size_t csize2 = IO_read_bits(in, 16);
const size_t csize3 = IO_read_bits(in, 16);
istream_t in1 = IO_make_sub_istream(in, csize1);
istream_t in2 = IO_make_sub_istream(in, csize2);
istream_t in3 = IO_make_sub_istream(in, csize3);
istream_t in4 = IO_make_sub_istream(in, IO_istream_len(in));
size_t total_output = 0;
// Decode each stream independently for simplicity
// If we wanted to we could decode all 4 at the same time for speed,
// utilizing more execution units
total_output += HUF_decompress_1stream(dtable, out, &in1);
total_output += HUF_decompress_1stream(dtable, out, &in2);
total_output += HUF_decompress_1stream(dtable, out, &in3);
total_output += HUF_decompress_1stream(dtable, out, &in4);
return total_output;
}
/// Initializes a Huffman table using canonical Huffman codes
/// For more explanation on canonical Huffman codes see
/// path_to_url~mccloske/courses/cmps340/huff_canonical_dec2015.html
/// Codes within a level are allocated in symbol order (i.e. smaller symbols get
/// earlier codes)
static void HUF_init_dtable(HUF_dtable *const table, const u8 *const bits,
const int num_symbs) {
memset(table, 0, sizeof(HUF_dtable));
if (num_symbs > HUF_MAX_SYMBS) {
ERROR("Too many symbols for Huffman");
}
u8 max_bits = 0;
u16 rank_count[HUF_MAX_BITS + 1];
memset(rank_count, 0, sizeof(rank_count));
// Count the number of symbols for each number of bits, and determine the
// depth of the tree
for (int i = 0; i < num_symbs; i++) {
if (bits[i] > HUF_MAX_BITS) {
ERROR("Huffman table depth too large");
}
max_bits = MAX(max_bits, bits[i]);
rank_count[bits[i]]++;
}
const size_t table_size = 1 << max_bits;
table->max_bits = max_bits;
table->symbols = malloc(table_size);
table->num_bits = malloc(table_size);
if (!table->symbols || !table->num_bits) {
free(table->symbols);
free(table->num_bits);
BAD_ALLOC();
}
// "Symbols are sorted by Weight. Within same Weight, symbols keep natural
// order. Symbols with a Weight of zero are removed. Then, starting from
// lowest weight, prefix codes are distributed in order."
u32 rank_idx[HUF_MAX_BITS + 1];
// Initialize the starting codes for each rank (number of bits)
rank_idx[max_bits] = 0;
for (int i = max_bits; i >= 1; i--) {
rank_idx[i - 1] = rank_idx[i] + rank_count[i] * (1 << (max_bits - i));
// The entire range takes the same number of bits so we can memset it
memset(&table->num_bits[rank_idx[i]], i, rank_idx[i - 1] - rank_idx[i]);
}
if (rank_idx[0] != table_size) {
CORRUPTION();
}
// Allocate codes and fill in the table
for (int i = 0; i < num_symbs; i++) {
if (bits[i] != 0) {
// Allocate a code for this symbol and set its range in the table
const u16 code = rank_idx[bits[i]];
// Since the code doesn't care about the bottom `max_bits - bits[i]`
// bits of state, it gets a range that spans all possible values of
// the lower bits
const u16 len = 1 << (max_bits - bits[i]);
memset(&table->symbols[code], i, len);
rank_idx[bits[i]] += len;
}
}
}
static void HUF_init_dtable_usingweights(HUF_dtable *const table,
const u8 *const weights,
const int num_symbs) {
// +1 because the last weight is not transmitted in the header
if (num_symbs + 1 > HUF_MAX_SYMBS) {
ERROR("Too many symbols for Huffman");
}
u8 bits[HUF_MAX_SYMBS];
u64 weight_sum = 0;
for (int i = 0; i < num_symbs; i++) {
// Weights are in the same range as bit count
if (weights[i] > HUF_MAX_BITS) {
CORRUPTION();
}
weight_sum += weights[i] > 0 ? (u64)1 << (weights[i] - 1) : 0;
}
// Find the first power of 2 larger than the sum
const int max_bits = highest_set_bit(weight_sum) + 1;
const u64 left_over = ((u64)1 << max_bits) - weight_sum;
// If the left over isn't a power of 2, the weights are invalid
if (left_over & (left_over - 1)) {
CORRUPTION();
}
// left_over is used to find the last weight as it's not transmitted
// by inverting 2^(weight - 1) we can determine the value of last_weight
const int last_weight = highest_set_bit(left_over) + 1;
for (int i = 0; i < num_symbs; i++) {
// "Number_of_Bits = Number_of_Bits ? Max_Number_of_Bits + 1 - Weight : 0"
bits[i] = weights[i] > 0 ? (max_bits + 1 - weights[i]) : 0;
}
bits[num_symbs] =
max_bits + 1 - last_weight; // Last weight is always non-zero
HUF_init_dtable(table, bits, num_symbs + 1);
}
static void HUF_free_dtable(HUF_dtable *const dtable) {
free(dtable->symbols);
free(dtable->num_bits);
memset(dtable, 0, sizeof(HUF_dtable));
}
static void HUF_copy_dtable(HUF_dtable *const dst,
const HUF_dtable *const src) {
if (src->max_bits == 0) {
memset(dst, 0, sizeof(HUF_dtable));
return;
}
const size_t size = (size_t)1 << src->max_bits;
dst->max_bits = src->max_bits;
dst->symbols = malloc(size);
dst->num_bits = malloc(size);
if (!dst->symbols || !dst->num_bits) {
BAD_ALLOC();
}
memcpy(dst->symbols, src->symbols, size);
memcpy(dst->num_bits, src->num_bits, size);
}
/******* END HUFFMAN PRIMITIVES ***********************************************/
/******* FSE PRIMITIVES *******************************************************/
/// For more description of FSE see
/// path_to_url
/// Allow a symbol to be decoded without updating state
static inline u8 FSE_peek_symbol(const FSE_dtable *const dtable,
const u16 state) {
return dtable->symbols[state];
}
/// Consumes bits from the input and uses the current state to determine the
/// next state
static inline void FSE_update_state(const FSE_dtable *const dtable,
u16 *const state, const u8 *const src,
i64 *const offset) {
const u8 bits = dtable->num_bits[*state];
const u16 rest = STREAM_read_bits(src, bits, offset);
*state = dtable->new_state_base[*state] + rest;
}
/// Decodes a single FSE symbol and updates the offset
static inline u8 FSE_decode_symbol(const FSE_dtable *const dtable,
u16 *const state, const u8 *const src,
i64 *const offset) {
const u8 symb = FSE_peek_symbol(dtable, *state);
FSE_update_state(dtable, state, src, offset);
return symb;
}
static inline void FSE_init_state(const FSE_dtable *const dtable,
u16 *const state, const u8 *const src,
i64 *const offset) {
// Read in a full `accuracy_log` bits to initialize the state
const u8 bits = dtable->accuracy_log;
*state = STREAM_read_bits(src, bits, offset);
}
static size_t FSE_decompress_interleaved2(const FSE_dtable *const dtable,
ostream_t *const out,
istream_t *const in) {
const size_t len = IO_istream_len(in);
if (len == 0) {
INP_SIZE();
}
const u8 *const src = IO_get_read_ptr(in, len);
// "Each bitstream must be read backward, that is starting from the end down
// to the beginning. Therefore it's necessary to know the size of each
// bitstream.
//
// It's also necessary to know exactly which bit is the latest. This is
// detected by a final bit flag : the highest bit of latest byte is a
// final-bit-flag. Consequently, a last byte of 0 is not possible. And the
// final-bit-flag itself is not part of the useful bitstream. Hence, the
// last byte contains between 0 and 7 useful bits."
const int padding = 8 - highest_set_bit(src[len - 1]);
i64 offset = len * 8 - padding;
u16 state1, state2;
// "The first state (State1) encodes the even indexed symbols, and the
// second (State2) encodes the odd indexes. State1 is initialized first, and
// then State2, and they take turns decoding a single symbol and updating
// their state."
FSE_init_state(dtable, &state1, src, &offset);
FSE_init_state(dtable, &state2, src, &offset);
// Decode until we overflow the stream
// Since we decode in reverse order, overflowing the stream is offset going
// negative
size_t symbols_written = 0;
while (1) {
// "The number of symbols to decode is determined by tracking bitStream
// overflow condition: If updating state after decoding a symbol would
// require more bits than remain in the stream, it is assumed the extra
// bits are 0. Then, the symbols for each of the final states are
// decoded and the process is complete."
IO_write_byte(out, FSE_decode_symbol(dtable, &state1, src, &offset));
symbols_written++;
if (offset < 0) {
// There's still a symbol to decode in state2
IO_write_byte(out, FSE_peek_symbol(dtable, state2));
symbols_written++;
break;
}
IO_write_byte(out, FSE_decode_symbol(dtable, &state2, src, &offset));
symbols_written++;
if (offset < 0) {
// There's still a symbol to decode in state1
IO_write_byte(out, FSE_peek_symbol(dtable, state1));
symbols_written++;
break;
}
}
return symbols_written;
}
static void FSE_init_dtable(FSE_dtable *const dtable,
const i16 *const norm_freqs, const int num_symbs,
const int accuracy_log) {
if (accuracy_log > FSE_MAX_ACCURACY_LOG) {
ERROR("FSE accuracy too large");
}
if (num_symbs > FSE_MAX_SYMBS) {
ERROR("Too many symbols for FSE");
}
dtable->accuracy_log = accuracy_log;
const size_t size = (size_t)1 << accuracy_log;
dtable->symbols = malloc(size * sizeof(u8));
dtable->num_bits = malloc(size * sizeof(u8));
dtable->new_state_base = malloc(size * sizeof(u16));
if (!dtable->symbols || !dtable->num_bits || !dtable->new_state_base) {
BAD_ALLOC();
}
// Used to determine how many bits need to be read for each state,
// and where the destination range should start
// Needs to be u16 because max value is 2 * max number of symbols,
// which can be larger than a byte can store
u16 state_desc[FSE_MAX_SYMBS];
// "Symbols are scanned in their natural order for "less than 1"
// probabilities. Symbols with this probability are being attributed a
// single cell, starting from the end of the table. These symbols define a
// full state reset, reading Accuracy_Log bits."
int high_threshold = size;
for (int s = 0; s < num_symbs; s++) {
// Scan for low probability symbols to put at the top
if (norm_freqs[s] == -1) {
dtable->symbols[--high_threshold] = s;
state_desc[s] = 1;
}
}
// "All remaining symbols are sorted in their natural order. Starting from
// symbol 0 and table position 0, each symbol gets attributed as many cells
// as its probability. Cell allocation is spreaded, not linear."
// Place the rest in the table
const u16 step = (size >> 1) + (size >> 3) + 3;
const u16 mask = size - 1;
u16 pos = 0;
for (int s = 0; s < num_symbs; s++) {
if (norm_freqs[s] <= 0) {
continue;
}
state_desc[s] = norm_freqs[s];
for (int i = 0; i < norm_freqs[s]; i++) {
// Give `norm_freqs[s]` states to symbol s
dtable->symbols[pos] = s;
// "A position is skipped if already occupied, typically by a "less
// than 1" probability symbol."
do {
pos = (pos + step) & mask;
} while (pos >=
high_threshold);
// Note: no other collision checking is necessary as `step` is
// coprime to `size`, so the cycle will visit each position exactly
// once
}
}
if (pos != 0) {
CORRUPTION();
}
// Now we can fill baseline and num bits
for (size_t i = 0; i < size; i++) {
u8 symbol = dtable->symbols[i];
u16 next_state_desc = state_desc[symbol]++;
// Fills in the table appropriately, next_state_desc increases by symbol
// over time, decreasing number of bits
dtable->num_bits[i] = (u8)(accuracy_log - highest_set_bit(next_state_desc));
// Baseline increases until the bit threshold is passed, at which point
// it resets to 0
dtable->new_state_base[i] =
((u16)next_state_desc << dtable->num_bits[i]) - size;
}
}
/// Decode an FSE header as defined in the Zstandard format specification and
/// use the decoded frequencies to initialize a decoding table.
static void FSE_decode_header(FSE_dtable *const dtable, istream_t *const in,
const int max_accuracy_log) {
// "An FSE distribution table describes the probabilities of all symbols
// from 0 to the last present one (included) on a normalized scale of 1 <<
// Accuracy_Log .
//
// It's a bitstream which is read forward, in little-endian fashion. It's
// not necessary to know its exact size, since it will be discovered and
// reported by the decoding process.
if (max_accuracy_log > FSE_MAX_ACCURACY_LOG) {
ERROR("FSE accuracy too large");
}
// The bitstream starts by reporting on which scale it operates.
// Accuracy_Log = low4bits + 5. Note that maximum Accuracy_Log for literal
// and match lengths is 9, and for offsets is 8. Higher values are
// considered errors."
const int accuracy_log = 5 + IO_read_bits(in, 4);
if (accuracy_log > max_accuracy_log) {
ERROR("FSE accuracy too large");
}
// "Then follows each symbol value, from 0 to last present one. The number
// of bits used by each field is variable. It depends on :
//
// Remaining probabilities + 1 : example : Presuming an Accuracy_Log of 8,
// and presuming 100 probabilities points have already been distributed, the
// decoder may read any value from 0 to 255 - 100 + 1 == 156 (inclusive).
// Therefore, it must read log2sup(156) == 8 bits.
//
// Value decoded : small values use 1 less bit : example : Presuming values
// from 0 to 156 (inclusive) are possible, 255-156 = 99 values are remaining
// in an 8-bits field. They are used this way : first 99 values (hence from
// 0 to 98) use only 7 bits, values from 99 to 156 use 8 bits. "
i32 remaining = 1 << accuracy_log;
i16 frequencies[FSE_MAX_SYMBS];
int symb = 0;
while (remaining > 0 && symb < FSE_MAX_SYMBS) {
// Log of the number of possible values we could read
int bits = highest_set_bit(remaining + 1) + 1;
u16 val = IO_read_bits(in, bits);
// Try to mask out the lower bits to see if it qualifies for the "small
// value" threshold
const u16 lower_mask = ((u16)1 << (bits - 1)) - 1;
const u16 threshold = ((u16)1 << bits) - 1 - (remaining + 1);
if ((val & lower_mask) < threshold) {
IO_rewind_bits(in, 1);
val = val & lower_mask;
} else if (val > lower_mask) {
val = val - threshold;
}
// "Probability is obtained from Value decoded by following formula :
// Proba = value - 1"
const i16 proba = (i16)val - 1;
// "It means value 0 becomes negative probability -1. -1 is a special
// probability, which means "less than 1". Its effect on distribution
// table is described in next paragraph. For the purpose of calculating
// cumulated distribution, it counts as one."
remaining -= proba < 0 ? -proba : proba;
frequencies[symb] = proba;
symb++;
// "When a symbol has a probability of zero, it is followed by a 2-bits
// repeat flag. This repeat flag tells how many probabilities of zeroes
// follow the current one. It provides a number ranging from 0 to 3. If
// it is a 3, another 2-bits repeat flag follows, and so on."
if (proba == 0) {
// Read the next two bits to see how many more 0s
int repeat = IO_read_bits(in, 2);
while (1) {
for (int i = 0; i < repeat && symb < FSE_MAX_SYMBS; i++) {
frequencies[symb++] = 0;
}
if (repeat == 3) {
repeat = IO_read_bits(in, 2);
} else {
break;
}
}
}
}
IO_align_stream(in);
// "When last symbol reaches cumulated total of 1 << Accuracy_Log, decoding
// is complete. If the last symbol makes cumulated total go above 1 <<
// Accuracy_Log, distribution is considered corrupted."
if (remaining != 0 || symb >= FSE_MAX_SYMBS) {
CORRUPTION();
}
// Initialize the decoding table using the determined weights
FSE_init_dtable(dtable, frequencies, symb, accuracy_log);
}
static void FSE_init_dtable_rle(FSE_dtable *const dtable, const u8 symb) {
dtable->symbols = malloc(sizeof(u8));
dtable->num_bits = malloc(sizeof(u8));
dtable->new_state_base = malloc(sizeof(u16));
if (!dtable->symbols || !dtable->num_bits || !dtable->new_state_base) {
BAD_ALLOC();
}
// This setup will always have a state of 0, always return symbol `symb`,
// and never consume any bits
dtable->symbols[0] = symb;
dtable->num_bits[0] = 0;
dtable->new_state_base[0] = 0;
dtable->accuracy_log = 0;
}
static void FSE_free_dtable(FSE_dtable *const dtable) {
free(dtable->symbols);
free(dtable->num_bits);
free(dtable->new_state_base);
memset(dtable, 0, sizeof(FSE_dtable));
}
static void FSE_copy_dtable(FSE_dtable *const dst, const FSE_dtable *const src) {
if (src->accuracy_log == 0) {
memset(dst, 0, sizeof(FSE_dtable));
return;
}
size_t size = (size_t)1 << src->accuracy_log;
dst->accuracy_log = src->accuracy_log;
dst->symbols = malloc(size);
dst->num_bits = malloc(size);
dst->new_state_base = malloc(size * sizeof(u16));
if (!dst->symbols || !dst->num_bits || !dst->new_state_base) {
BAD_ALLOC();
}
memcpy(dst->symbols, src->symbols, size);
memcpy(dst->num_bits, src->num_bits, size);
memcpy(dst->new_state_base, src->new_state_base, size * sizeof(u16));
}
/******* END FSE PRIMITIVES ***************************************************/
```
|
Puigverd de Lleida is a village in the province of Lleida and autonomous community of Catalonia, Spain.
References
External links
Government data pages
Municipalities in Segrià
|
William Daniel Neely Jr. (June 22, 1887 – May 16, 1965) was a college football player.
Early years
William, Jr. was born on June 22, 1887, in Smyrna, Tennessee, to William Daniel Neely, Sr. and Mary Elizabeth Gooch. His father William died of sunstroke in 1900. His brother Jess Neely was a College Football Hall of Fame coach and captain of the undefeated 1922 Vanderbilt Commodores football team.
Vanderbilt University
He was a prominent end and halfback for Dan McGugin's Vanderbilt Commodores football teams. Bill also lettered for the Vanderbilt basketball team.
Football
1910
He was captain of the undefeated and SIAA champion 1910 team, led as well by the likes of W. E. Metzger and Ray Morrison. That team managed a scoreless tie with defending national champion Yale. Neely recalled the event: "The score tells the story a good deal better than I can. All I want to say is that I never saw a football team fight any harder at every point than Vanderbilt fought today – line, ends, and backfield. We went in to give Yale the best we had and I think we about did it." Neely was selected for the College Football All-Southern team.
Later years
He was a schoolteacher, a member of the board of directors of the Rutherford County Creamery and manager of the Production Credit Association of Springfield.
See also
1910 Vanderbilt vs. Yale football game
References
1887 births
1965 deaths
All-Southern college football players
People from Smyrna, Tennessee
Sportspeople from the Nashville metropolitan area
American football ends
Vanderbilt Commodores football players
Players of American football from Tennessee
Vanderbilt Commodores men's basketball players
American men's basketball players
|
```objective-c
// Prior to React Native 0.61, it contained `RCTAssetsLibraryRequestHandler` that handles loading data from URLs
// with `assets-library://` or `ph://` schemes. Due to lean core project, it's been moved to `@react-native-community/cameraroll`
// and that made it impossible to render assets using URLs returned by MediaLibrary without installing CameraRoll.
// Because it's still a unimodule and we need to export bare React Native module, we should make sure React Native is installed.
#if __has_include(<React/RCTImageURLLoader.h>)
#import <Photos/Photos.h>
#import <React/RCTDefines.h>
#import <React/RCTUtils.h>
#import <React/RCTBridgeModule.h>
#import <ExpoMediaLibrary/MediaLibraryImageLoader.h>
@implementation MediaLibraryImageLoader
RCT_EXPORT_MODULE()
#pragma mark - RCTImageURLLoader
- (BOOL)canLoadImageURL:(NSURL *)requestURL
{
if (![PHAsset class]) {
return NO;
}
return [requestURL.scheme caseInsensitiveCompare:@"assets-library"] == NSOrderedSame ||
[requestURL.scheme caseInsensitiveCompare:@"ph"] == NSOrderedSame;
}
- (RCTImageLoaderCancellationBlock)loadImageForURL:(NSURL *)imageURL
size:(CGSize)size
scale:(CGFloat)scale
resizeMode:(RCTResizeMode)resizeMode
progressHandler:(RCTImageLoaderProgressBlock)progressHandler
partialLoadHandler:(RCTImageLoaderPartialLoadBlock)partialLoadHandler
completionHandler:(RCTImageLoaderCompletionBlock)completionHandler
{
// Using PhotoKit for iOS 8+
// The 'ph://' prefix is used by FBMediaKit to differentiate between
// assets-library. It is prepended to the local ID so that it is in the
// form of an NSURL which is what assets-library uses.
NSString *assetID = @"";
PHFetchResult *results;
if (!imageURL) {
completionHandler(RCTErrorWithMessage(@"Cannot load a photo library asset with no URL"), nil);
return ^{};
} else if ([imageURL.scheme caseInsensitiveCompare:@"assets-library"] == NSOrderedSame) {
assetID = [imageURL absoluteString];
results = [PHAsset fetchAssetsWithALAssetURLs:@[imageURL] options:nil];
} else {
assetID = [imageURL.absoluteString substringFromIndex:@"ph://".length];
results = [PHAsset fetchAssetsWithLocalIdentifiers:@[assetID] options:nil];
}
if (results.count == 0) {
NSString *errorText = [NSString stringWithFormat:@"Failed to fetch PHAsset with local identifier %@ with no error message.", assetID];
completionHandler(RCTErrorWithMessage(errorText), nil);
return ^{};
}
PHAsset *asset = [results firstObject];
PHImageRequestOptions *imageOptions = [PHImageRequestOptions new];
// Allow PhotoKit to fetch images from iCloud
imageOptions.networkAccessAllowed = YES;
if (progressHandler) {
imageOptions.progressHandler = ^(double progress, NSError *error, BOOL *stop, NSDictionary<NSString *, id> *info) {
static const double multiplier = 1e6;
progressHandler(progress * multiplier, multiplier);
};
}
// Note: PhotoKit defaults to a deliveryMode of PHImageRequestOptionsDeliveryModeOpportunistic
// which means it may call back multiple times - we probably don't want that
imageOptions.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
BOOL useMaximumSize = CGSizeEqualToSize(size, CGSizeZero);
CGSize targetSize;
if (useMaximumSize) {
targetSize = PHImageManagerMaximumSize;
imageOptions.resizeMode = PHImageRequestOptionsResizeModeNone;
} else {
targetSize = CGSizeApplyAffineTransform(size, CGAffineTransformMakeScale(scale, scale));
imageOptions.resizeMode = PHImageRequestOptionsResizeModeFast;
}
PHImageContentMode contentMode = PHImageContentModeAspectFill;
if (resizeMode == RCTResizeModeContain) {
contentMode = PHImageContentModeAspectFit;
}
PHImageRequestID requestID =
[[PHImageManager defaultManager] requestImageForAsset:asset
targetSize:targetSize
contentMode:contentMode
options:imageOptions
resultHandler:^(UIImage *result, NSDictionary<NSString *, id> *info) {
if (result) {
completionHandler(nil, result);
} else {
completionHandler(info[PHImageErrorKey], nil);
}
}];
return ^{
[[PHImageManager defaultManager] cancelImageRequest:requestID];
};
}
@end
#endif
```
|
```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="path_to_url"
xmlns:tools="path_to_url"
package="com.lody.virtual">
<uses-permission android:name="com.huawei.authentication.HW_ACCESS_AUTH_SERVICE" />
<uses-permission android:name="com.samsung.svoice.sync.READ_DATABASE" />
<uses-permission android:name="com.samsung.svoice.sync.ACCESS_SERVICE" />
<uses-permission android:name="com.samsung.svoice.sync.WRITE_DATABASE" />
<uses-permission android:name="com.sec.android.app.voicenote.Controller" />
<uses-permission android:name="com.sec.android.permission.VOIP_INTERFACE" />
<uses-permission android:name="com.sec.android.permission.LAUNCH_PERSONAL_PAGE_SERVICE" />
<uses-permission android:name="com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY" />
<uses-permission android:name="com.samsung.android.providers.context.permission.READ_RECORD_AUDIO" />
<uses-permission android:name="com.samsung.android.providers.context.permission.WRITE_RECORD_AUDIO" />
<uses-permission android:name="com.sec.android.settings.permission.SOFT_RESET" />
<uses-permission android:name="sec.android.permission.READ_MSG_PREF" />
<uses-permission android:name="com.samsung.android.scloud.backup.lib.read" />
<uses-permission android:name="com.samsung.android.scloud.backup.lib.write" />
<uses-permission android:name="android.permission.BIND_DIRECTORY_SEARCH" />
<uses-permission android:name="android.permission.UPDATE_APP_OPS_STATS" />
<uses-permission android:name="com.android.voicemail.permission.READ_WRITE_ALL_VOICEMAIL" />
<uses-permission
android:name="android.permission.ACCOUNT_MANAGER"
tools:ignore="ProtectedPermissions" />
<uses-permission
android:name="android.permission.PACKAGE_USAGE_STATS"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission
android:name="android.permission.ACCESS_MOCK_LOCATION"
tools:ignore="MockLocation" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIMAX_STATE" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission
android:name="android.permission.BIND_APPWIDGET"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BODY_SENSORS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIMAX_STATE" />
<uses-permission android:name="android.permission.CLEAR_APP_CACHE" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_CLIPS" />
<uses-permission android:name="android.permission.GET_PACKAGE_SIZE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.PERSISTENT_ACTIVITY" />
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.READ_CELL_BROADCASTS" />
<uses-permission android:name="android.permission.READ_CLIPS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_INSTALL_SESSIONS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.READ_SOCIAL_STREAM" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.READ_SYNC_STATS" />
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.RECEIVE_MMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECEIVE_WAP_PUSH" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.REORDER_TASKS" />
<uses-permission android:name="android.permission.RESTART_PACKAGES" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.SET_TIME_ZONE" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
<uses-permission android:name="android.permission.SUBSCRIBED_FEEDS_READ" />
<uses-permission android:name="android.permission.SUBSCRIBED_FEEDS_WRITE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.TRANSMIT_IR" />
<uses-permission android:name="android.permission.USE_SIP" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALL_LOG" />
<uses-permission android:name="android.permission.WRITE_CLIPS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_PROFILE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.WRITE_SOCIAL_STREAM" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
<uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
<uses-permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID_NOTIFICATION" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.OTHER_SERVICES" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.YouTubeUser" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.adsense" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.adwords" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.ah" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.android" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.androidsecure" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.blogger" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.cl" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.cp" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.dodgeball" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.finance" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.gbase" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.grandcentral" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.groups2" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.health" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.ig" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.jotspot" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.knol" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.lh2" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.local" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.mail" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.mobile" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.news" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.notebook" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.orkut" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.print" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.sierra" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.sierraqa" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.sierrasandbox" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.sitemaps" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.speech" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.speechpersonalization" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.talk" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.wifi" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.wise" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.writely" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.youtube" />
<uses-permission android:name="com.google.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="com.google.android.providers.talk.permission.READ_ONLY" />
<uses-permission android:name="com.google.android.providers.talk.permission.WRITE_ONLY" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission
android:name="android.permission.INSTALL_PACKAGES"
tools:ignore="ProtectedPermissions" />
<uses-permission
android:name="android.permission.DELETE_PACKAGES"
tools:ignore="ProtectedPermissions" />
<uses-permission
android:name="android.permission.CLEAR_APP_USER_DATA"
tools:ignore="ProtectedPermissions" />
<uses-permission
android:name="android.permission.WRITE_MEDIA_STORAGE"
tools:ignore="ProtectedPermissions" />
<uses-permission
android:name="android.permission.ACCESS_CACHE_FILESYSTEM"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.READ_OWNER_DATA" />
<uses-permission android:name="android.permission.WRITE_OWNER_DATA" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission
android:name="android.permission.DEVICE_POWER"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.ACCESS_DOWNLOAD_MANAGER" />
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS" />
<uses-permission android:name="com.android.launcher3.permission.READ_SETTINGS" />
<uses-permission android:name="com.android.launcher2.permission.READ_SETTINGS" />
<uses-permission android:name="com.teslacoilsw.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.actionlauncher.playstore.permission.READ_SETTINGS" />
<uses-permission android:name="com.mx.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.anddoes.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.apusapps.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.tsf.shell.permission.READ_SETTINGS" />
<uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.lenovo.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.oppo.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.bbk.launcher2.permission.READ_SETTINGS" />
<uses-permission android:name="com.s.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="cn.nubia.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE" />
<uses-permission android:name="android.permission.GET_INTENT_SENDER_INTENT" />
<uses-permission
android:name="android.permission.WRITE_APN_SETTINGS"
tools:ignore="ProtectedPermissions" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<application>
<service
android:name="com.lody.virtual.client.stub.DaemonService"
android:process="@string/engine_process_name" />
<service
android:name="com.lody.virtual.client.stub.DaemonService$InnerService"
android:process="@string/engine_process_name" />
<activity
android:name="com.lody.virtual.client.stub.ShortcutHandleActivity"
android:exported="true"
android:process="@string/engine_process_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity
android:name=".client.stub.StubPendingActivity"
android:process="@string/engine_process_name" />
<service
android:name=".client.stub.StubPendingService"
android:process="@string/engine_process_name" />
<receiver
android:name=".client.stub.StubPendingReceiver"
android:process="@string/engine_process_name" />
<service
android:name=".client.stub.StubJob"
android:permission="android.permission.BIND_JOB_SERVICE"
android:process="@string/engine_process_name" />
<activity
android:name=".client.stub.ChooseAccountTypeActivity"
android:configChanges="keyboard|keyboardHidden|orientation"
android:excludeFromRecents="true"
android:exported="false"
android:process="@string/engine_process_name"
android:screenOrientation="portrait" />
<activity
android:name=".client.stub.ChooseTypeAndAccountActivity"
android:configChanges="keyboard|keyboardHidden|orientation"
android:excludeFromRecents="true"
android:exported="false"
android:process="@string/engine_process_name"
android:screenOrientation="portrait" />
<activity
android:name=".client.stub.ChooserActivity"
android:configChanges="keyboard|keyboardHidden|orientation"
android:excludeFromRecents="true"
android:exported="true"
android:finishOnCloseSystemDialogs="true"
android:process="@string/engine_process_name"
android:screenOrientation="portrait"
android:theme="@style/VAAlertTheme" />
<activity
android:name=".client.stub.ResolverActivity"
android:configChanges="keyboard|keyboardHidden|orientation"
android:excludeFromRecents="true"
android:exported="true"
android:finishOnCloseSystemDialogs="true"
android:process="@string/engine_process_name"
android:screenOrientation="portrait"
android:theme="@style/VAAlertTheme" />
<provider
android:name="com.lody.virtual.server.BinderProvider"
android:authorities="${applicationId}.virtual.service.BinderProvider"
android:exported="false"
android:process="@string/engine_process_name" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C0"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p0"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C1"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p1"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C2"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p2"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C3"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p3"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C4"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p4"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C5"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p5"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C6"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p6"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C7"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p7"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C8"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p8"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C9"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p9"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C10"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p10"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C11"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p11"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C12"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p12"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C13"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p13"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C14"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p14"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C15"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p15"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C16"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p16"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C17"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p17"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C18"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p18"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C19"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p19"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C20"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p20"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C21"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p21"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C22"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p22"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C23"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p23"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C24"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p24"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C25"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p25"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C26"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p26"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C27"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p27"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C28"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p28"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C29"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p29"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C30"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p30"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C31"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p31"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C32"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p32"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C33"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p33"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C34"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p34"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C35"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p35"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C36"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p36"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C37"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p37"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C38"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p38"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C39"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p39"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C40"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p40"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C41"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p41"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C42"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p42"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C43"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p43"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C44"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p44"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C45"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p45"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C46"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p46"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C47"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p47"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C48"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p48"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubActivity$C49"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p49"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@style/VATheme" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C0"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p0"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C1"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p1"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C2"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p2"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C3"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p3"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C4"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p4"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C5"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p5"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C6"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p6"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C7"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p7"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C8"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p8"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C9"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p9"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C10"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p10"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C11"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p11"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C12"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p12"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C13"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p13"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C14"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p14"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C15"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p15"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C16"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p16"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C17"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p17"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C18"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p18"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C19"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p19"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C20"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p20"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C21"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p21"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C22"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p22"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C23"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p23"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C24"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p24"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C25"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p25"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C26"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p26"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C27"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p27"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C28"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p28"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C29"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p29"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C30"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p30"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C31"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p31"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C32"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p32"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C33"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p33"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C34"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p34"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C35"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p35"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C36"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p36"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C37"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p37"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C38"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p38"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C39"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p39"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C40"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p40"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C41"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p41"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C42"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p42"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C43"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p43"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C44"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p44"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C45"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p45"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C46"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p46"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C47"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p47"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C48"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p48"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="com.lody.virtual.client.stub.StubDialog$C49"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:process=":p49"
android:taskAffinity="com.lody.virtual.vt"
android:theme="@android:style/Theme.Dialog" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C0"
android:authorities="${applicationId}.virtual_stub_0"
android:exported="false"
android:process=":p0" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C1"
android:authorities="${applicationId}.virtual_stub_1"
android:exported="false"
android:process=":p1" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C2"
android:authorities="${applicationId}.virtual_stub_2"
android:exported="false"
android:process=":p2" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C3"
android:authorities="${applicationId}.virtual_stub_3"
android:exported="false"
android:process=":p3" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C4"
android:authorities="${applicationId}.virtual_stub_4"
android:exported="false"
android:process=":p4" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C5"
android:authorities="${applicationId}.virtual_stub_5"
android:exported="false"
android:process=":p5" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C6"
android:authorities="${applicationId}.virtual_stub_6"
android:exported="false"
android:process=":p6" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C7"
android:authorities="${applicationId}.virtual_stub_7"
android:exported="false"
android:process=":p7" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C8"
android:authorities="${applicationId}.virtual_stub_8"
android:exported="false"
android:process=":p8" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C9"
android:authorities="${applicationId}.virtual_stub_9"
android:exported="false"
android:process=":p9" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C10"
android:authorities="${applicationId}.virtual_stub_10"
android:exported="false"
android:process=":p10" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C11"
android:authorities="${applicationId}.virtual_stub_11"
android:exported="false"
android:process=":p11" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C12"
android:authorities="${applicationId}.virtual_stub_12"
android:exported="false"
android:process=":p12" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C13"
android:authorities="${applicationId}.virtual_stub_13"
android:exported="false"
android:process=":p13" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C14"
android:authorities="${applicationId}.virtual_stub_14"
android:exported="false"
android:process=":p14" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C15"
android:authorities="${applicationId}.virtual_stub_15"
android:exported="false"
android:process=":p15" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C16"
android:authorities="${applicationId}.virtual_stub_16"
android:exported="false"
android:process=":p16" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C17"
android:authorities="${applicationId}.virtual_stub_17"
android:exported="false"
android:process=":p17" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C18"
android:authorities="${applicationId}.virtual_stub_18"
android:exported="false"
android:process=":p18" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C19"
android:authorities="${applicationId}.virtual_stub_19"
android:exported="false"
android:process=":p19" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C20"
android:authorities="${applicationId}.virtual_stub_20"
android:exported="false"
android:process=":p20" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C21"
android:authorities="${applicationId}.virtual_stub_21"
android:exported="false"
android:process=":p21" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C22"
android:authorities="${applicationId}.virtual_stub_22"
android:exported="false"
android:process=":p22" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C23"
android:authorities="${applicationId}.virtual_stub_23"
android:exported="false"
android:process=":p23" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C24"
android:authorities="${applicationId}.virtual_stub_24"
android:exported="false"
android:process=":p24" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C25"
android:authorities="${applicationId}.virtual_stub_25"
android:exported="false"
android:process=":p25" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C26"
android:authorities="${applicationId}.virtual_stub_26"
android:exported="false"
android:process=":p26" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C27"
android:authorities="${applicationId}.virtual_stub_27"
android:exported="false"
android:process=":p27" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C28"
android:authorities="${applicationId}.virtual_stub_28"
android:exported="false"
android:process=":p28" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C29"
android:authorities="${applicationId}.virtual_stub_29"
android:exported="false"
android:process=":p29" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C30"
android:authorities="${applicationId}.virtual_stub_30"
android:exported="false"
android:process=":p30" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C31"
android:authorities="${applicationId}.virtual_stub_31"
android:exported="false"
android:process=":p31" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C32"
android:authorities="${applicationId}.virtual_stub_32"
android:exported="false"
android:process=":p32" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C33"
android:authorities="${applicationId}.virtual_stub_33"
android:exported="false"
android:process=":p33" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C34"
android:authorities="${applicationId}.virtual_stub_34"
android:exported="false"
android:process=":p34" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C35"
android:authorities="${applicationId}.virtual_stub_35"
android:exported="false"
android:process=":p35" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C36"
android:authorities="${applicationId}.virtual_stub_36"
android:exported="false"
android:process=":p36" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C37"
android:authorities="${applicationId}.virtual_stub_37"
android:exported="false"
android:process=":p37" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C38"
android:authorities="${applicationId}.virtual_stub_38"
android:exported="false"
android:process=":p38" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C39"
android:authorities="${applicationId}.virtual_stub_39"
android:exported="false"
android:process=":p39" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C40"
android:authorities="${applicationId}.virtual_stub_40"
android:exported="false"
android:process=":p40" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C41"
android:authorities="${applicationId}.virtual_stub_41"
android:exported="false"
android:process=":p41" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C42"
android:authorities="${applicationId}.virtual_stub_42"
android:exported="false"
android:process=":p42" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C43"
android:authorities="${applicationId}.virtual_stub_43"
android:exported="false"
android:process=":p43" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C44"
android:authorities="${applicationId}.virtual_stub_44"
android:exported="false"
android:process=":p44" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C45"
android:authorities="${applicationId}.virtual_stub_45"
android:exported="false"
android:process=":p45" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C46"
android:authorities="${applicationId}.virtual_stub_46"
android:exported="false"
android:process=":p46" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C47"
android:authorities="${applicationId}.virtual_stub_47"
android:exported="false"
android:process=":p47" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C48"
android:authorities="${applicationId}.virtual_stub_48"
android:exported="false"
android:process=":p48" />
<provider
android:name="com.lody.virtual.client.stub.StubContentProvider$C49"
android:authorities="${applicationId}.virtual_stub_49"
android:exported="false"
android:process=":p49" />
</application>
</manifest>
```
|
The P-15 Termit (; ) is an anti-ship missile developed by the Soviet Union's Raduga design bureau in the 1950s. Its GRAU designation was 4K40, its NATO reporting name was Styx or SS-N-2. China acquired the design in 1958 and created at least four versions: the CSS-N-1 Scrubbrush and CSS-N-2 versions were developed for ship-launched operation, while the CSS-C-2 Silkworm and CSS-C-3 Seersucker were used for coastal defence. Other names for this basic type of missile include: HY-1, SY-1, and FL-1 Flying Dragon (Chinese designations typically differ for export and domestic use, even for otherwise identical equipment), North Korean local produced KN-1 or KN-01, derived from both Silkworm variants and Russian & USSR P-15, Rubezh, P-20 P-22 .
Despite its large size, thousands of P-15s were built and installed on many classes of ships from torpedo boats to destroyers, and coastal batteries and bomber aircraft (Chinese versions).
Origins
The P-15 was not the first anti-ship missile in Soviet service; that distinction goes to the SS-N-1 Scrubber, and to the aircraft-launched AS-1 Kennel. The SS-N-1 was a powerful but rather raw system, and it was soon superseded by the SS-N-3 Shaddock. This weapon was fitted to 4,000-ton Kynda class cruisers and replaced an initial plan for 30,000-ton battlecruisers armed with 305mm and 45mm guns. Rather than rely on a few heavy and costly ships, a new weapons system was designed to fit smaller, more numerous vessels, while maintaining sufficient striking power. The P-15 was developed by the Soviet designer Beresyniak, who helped in the development of the BI rocket interceptor.
Design
The first variant was the P-15, with fixed wings. The basic design of the missile, retained for all subsequent versions, featured a cylindrical body, a rounded nose, two delta wings in the center and three control surfaces in the tail. It was also fitted with a solid-fueled booster under the belly. This design was based on the Yak-1000 experimental fighter built in 1951.
The weapon was meant to be cheap, yet still give an ordinary missile boat the same 'punch' as a battleship salvo. The onboard electronics were based on a simple analog design, with a homing conical scanning radar sensor. It used a more reliable rocket engine with acid fuel in preference to a turbojet.
Some shortcomings were never totally solved, due to the liquid propellant of the rocket engine: the acid fuel gradually corroded the missile fuselage. Launches were not possible outside a temperature range of .
The missile weighed around , had a top speed of Mach 0.9 and a range of . The explosive warhead was behind the fuel tank, and as the missile retained a large amount of unburned fuel at the time of impact, even at maximum range, it acted as an incendiary device.
The warhead was a shaped charge, an enlarged version of a high-explosive anti-tank (HEAT) warhead, larger than the semi-armour piercing (SAP) warhead typical of anti-ship missiles. The launch was usually made with the help of electronic warfare support measures (ESM) gear and Garpun radar at a range of between due to the limits of the targeting system. The Garpun's range against a destroyer was about .
The onboard sensor was activated at from impact, the missile would begin to descend at 1-2° to the target, because the flight pattern was about above sea level. In minimum range engagements there was the possibility of using active sensors at shorter distances, as little as .
The P-15U was introduced in 1965, with improved avionics and folding wings, enabling the use of smaller containers. It was replaced by the P-15M in 1972, which was a further development of the P-15U, with enhanced abilities (its export simplified variants were designated P-21 and P-22, depending on the sensor installed, and a whole export system was designated the P-20M).
Versions
Russia
In total, the P-15 family had the following models:
P-15: A basic (SS-N-2A) with I-band, a conical search sensor and 40 km range.
P-15M: (SS-N-2C), heavier and longer than the P-15, it had a range of 80 km and several minor improvements.
P-15MC: Essentially a P-15M, coupled with a Bulgarian-made electronic countermeasure package for that country's navy.
P-20: A P-15 updated with the new guidance system but with the original shorter range. They were perhaps known as SS-N-2B and used by Komar and Osa class boats.
P-20K: A P-15M with a new guidance system.
P-20M: A surface version of the P-20L with folding wings. This was the definitive version of the P-15M with radar guidance.
P-22 other development of or along P-20 ; other variants P-21, P-27
4K51 Rubezh and 4K40, SS-N-2C SSC-3 Styx, using P-20 and P-22, Self-propelled missile
People's Republic of China
The Chinese used this missile as a basis for their Silkworm series, with infrared (IR), radar, and turbojets or rocket engines depending on the model. The fuselage width is . The mass is over 2 tonnes. This is comparable to the and of Western missiles. With improved electronics, the warhead reduced to and the original rocket engine replaced with a turbojet, this weapon was much improved with a range of over . Chinese Silkworm missiles were used in hundreds of ships and shore batteries. The Chinese Navy built more than two hundred modified versions of the 183R (Komar-class), the Hegu-class, (complete with a longer hull and an added 25mm mount aft) and the Osa-class. Frigates and destroyers were also equipped with the missile. Some were exported and they were used in shore batteries built for North Korea, Iraq and Iran. The Soviet Union developed an equivalent, the P-120 Malakhit.
(C.201) (SY is the abbreviation of pinyin: Shàng Yóu, literal meaning is upper river): The original Chinese copy of P-15 as ship-to-ship missile, called as Project 544, designed and assembled by Nanchang Aerocraft Factory from 1960, first inland test flight in December 1964 and ship-mounted test-fired in August 1965, finished the research tests in June 1966, began definitizing test from Nov 1966, permitted definitize in August 1967. It entered service during 1968 in missile boats and destroyers and later coastal batteries. Dimensions were: (length), 0.76m (diameter), 2.4m (wingspan). It weighed of which was the HEAT warhead. Its range was at Mach 0.8, with a flight altitude of , it used inertial and active radar guidance systems. This unit employed conical scanning and was vulnerable to electronic counter measures (ECM), due to its slow onboard computer. The SY-1A entered service after 1984, with a monopulse surface-search radar comparable to the evolution of the AIM-7, F to M model.
SY-2: An improved version developed from 1976. Used the solid rocket engine and supersonics flight, smaller and lighter than SY-1, extended range to 50 km. The exported version is FL-2.
(C.201) (HY is the abbreviation of pinyin:Hǎi Yīng, literal meaning is Sea Eagle): It was the equivalent of the P-15M, and was known as the C-SS-3 Saccade. Designed for coastal batteries, with a larger airframe, its dimensions were: 7.48m × 0.76m × 2.4m, weight . extended range from the SY-1's . Trials were carried out from 1967 to 1970 with 10 missiles out of 11 hitting the target. It entered service in China and was also exported. There were several versions:
HY-2: Basic, inertial and conical radar search (improved to SY-1), 1970.
HY-2A: IR-guidance variant. Developed during the 1970s and in 1980, it did not enter service despite certification in 1982. It was the equivalent of the P-22.
HY-2A-II: An improved variant of the HY-2A with an improved IR sensor, it entered service in 1988. It was also available for export.
: Fitted with monopulse-search radar to improve accuracy and reliability, it was test-fired, scoring five hits out of six and entered service two years later in 1984. The YB-2B-II had another radar search system, entering service in 1989. These two missiles could fly at an altitude of 20–50m, so the overall abilities (altitude, range, reliability, electronic counter counter measures (ECCM)) were greatly superior.
: Fitted with a turbojet engine instead of a liquid rocket version. It was only used for export, it had a 150 km range. It is arguably also called HY-4 or C-SS-N-7 Sadpack, its dimensions are similar to the HY-1 and HY-2, but its weight is only , demonstrating the differences between turbojet and rocket propulsion systems. It can fly at and attack at , with a charge. The XW-41 land attack missile was extrapolated from this design, it had a range of about , which was enough to attack Taiwan. It is not known if this model entered service.
Substitutes of these missiles are the FL-2 and FL-7, which were solid-rocket fuelled and the C-701 and C-801, which were similar to the Exocet and other missile systems, among them the SS-N-22 Sunburn, it was bought for Sovremenny class destroyers.
North Korea
KN-1 or KN-01 locally produced Geum Seong-1 Korean 금성-1호, derived from both Silkworm and Russian P-15 Termit, Rubezh, P-20 P-22 .
Launch platforms
This missile, despite its mass, was used in small and medium ships, from 60 to 4,000 tons, shore batteries and (only for derived models) aircraft and submarines. The main users were:
Komar-class missile boats
Osa-class missile boats
Tarantul-class corvettes
Nanuchka-class corvettes
Koni-class frigates
Kotor-class frigates
The frigate Mărășești
Kildin-class destroyers
Kashin-class destroyers
Operational usage
Cuban Missile Crisis
The first use of these weapons was in 1962, during the Cuban Missile Crisis. Komar-class missile boats were deployed in Operation "Anadyr" ("Анадырь"), organized by the Soviet Union to help the Castro government. At least eight were sent in cargo ships, due partly to their small dimensions and were presumably left to the Cuban Navy after the crisis, together with many other weapons of Soviet origin.
War of Attrition
During the War of Attrition, after the Six-Day War in 1967, the Israeli destroyer Eilat was sailing at low speed outside Port Said on 21 October. At a range of , she was attacked by two Egyptian Komars, acting as a coastal missile battery both fired their missiles from inside the harbour. Eilat was hit, despite defensive anti-aircraft fire. The first two missiles almost blew the Eilat in two; another hit soon after, and the last exploded near the wreck in the sea. Eilat sank two hours after the first attack. 47 crew were killed. After this engagement, interest in this type of weapon was raised in both offensive weapons and defensive weapons such as close-in weapon systems (CIWS) and electronic countermeasures (ECM).
Indo-Pakistani War
During the Indo-Pakistani War of 1971, Indian Osa-class boats raided the port of Karachi in two highly successful operations causing severe damage and sinking several ships with their P-15s, among them the destroyer, Khaibar. She was a former Battle-class destroyer, originally designed as an anti-aircraft ship. Her armament might be effective against conventional air threats, (mounting 5 × 114mm guns and several 40mm Bofors), but had little chance against anti-ship missiles.
These raids were meant to strike Karachi and destroy the Pakistani Navy in Western Pakistan. The first action, Operation Trident, was carried out by three Osa class missile boats on the night of 5 December. 'Operation Trident' involved:
INS Nipat (Lt.-Cdr B.N Kavina, Vir Chakra (VrC))
INS Nirghat (Lt.-Cdr I.J Sharma, Ati Vishisht Seva Medal (AVSM), VrC)
INS Veer (Lt.-Cdr O.P Mehta, VrC, NM)
Around 20:30, a target was acquired by radar, at a distance of over , and Nirghat fired two missiles. This target was the destroyer Khaibar, sailing at . The crew of the ship saw a "bright light" in the sky, low on the water. Believing it to be the afterburner of a fighter aircraft, Khaibar opened fire with her Bofors guns, but these were not effective against such a small, fast target. The missile struck the starboard side at 22:45, destroying the electrical system. One of the boilers, possibly struck by the HEAT charge, also exploded. Despite thick smoke and a fire, Khaibar was still able to engage the second missile, again mistaking it for an enemy fighter. This missile struck the ship four minutes after the first, destroying and quickly sinking her.
During this action, Nipat attacked another two ships; the cargo vessel Venus Challenger, which was carrying ammunition from Saigon, was destroyed. Her escort, the destroyer PNS Shahjahan was severely damaged and later scrapped.
Veer then attacked Muhafiz at 23:05, (she was a minesweeper that had witnessed the attacks against Khaibar); she was hit and disintegrated, throwing most of the crew into the water before she sank.
Nipat fired two missiles at the port of Karachi. This is the first known use of an anti-ship missile against land targets. Large oil tanks, identified by radar, were hit by the first missile, destroying it, while the second weapon failed. Over the following nights there were other ship actions. Karachi was again attacked with missiles, while Petya-class frigates provided anti-submarine protection to the Osa-class boats.
On the night of 8 December, in the second operation, Operation Python, the Osa-class boat Vinash, escorted by two frigates, fired missiles at Karachi in a six-minute action. One missile hit an oil tank, destroying it. The British ship Harmattan was sunk, the Panamanian ship Gulfstar was set on fire. The Pakistan Navy fleet tanker, PNS Dacca, was badly damaged and only survived because the commanding officer, Captain. S.Q. Raza S.J. P.N., ordered the release of steam in the pipes that prevented the fire reaching the tanks. Though anti-aircraft guns opened fire in response, they only managed to hit a Greek ship, Zoë, that was moored in the port and consequently sank.
In all these actions against large ships, the P-15 proved to be an effective weapon, with a devastating warhead. Out of eleven missiles fired, only one malfunctioned, giving a 91% success rate. This gave every Osa FAC the possibility of striking several targets. Big ships, without any specialized defence, were targets for P-15s.
United States
CIA inspected and analyzed data on Styx missiles from the guidance systems of missiles delivered to Indonesia. The US Navy had underestimated the threat of Soviet missiles, but after 1967 this changed. The US Navy thought that North Vietnam missile boats and coastal defenses using P-15 missiles could be met by US vessels off the coast and that ECM and air defense missiles would be effective countermeasures. The Soviet Union in fact decided not to supply P-15 missiles to North Vietnam, even though a promise to do so had been made in 1965.
In April 1972 the US Navy claimed to have been attacked by P-15 missiles and they were shot down by Terrier missiles.
Yom Kippur War
Despite these early successes, the 1973 Yom Kippur War saw P-15 missiles used by the Egyptian and Syrian navies prove ineffective against Israeli ships. The Israeli Navy had phased out their old ships, building a fleet of Sa'ar-class FACs: faster, smaller, more maneuverable and equipped with new missiles and countermeasures.
Although the range of the P-15 was twice that of the Israeli Gabriel, allowing Arab ships to fire first, radar jamming and chaff degraded their accuracy. In the Battle of Latakia and Battle of Baltim, several dozen P-15s were fired and all missed. Arab ships did not possess heavy firepower required for surface combat against enemy vessels, usually only 25 and 30mm guns, and Osa and Komar boats were not always able to outrun their Israeli pursuers.
Iran–Iraq War
P-15 variants, including the Chinese duplication "Silkworm", were employed by Iran against Iraq in the 1980–1988 Iran–Iraq War, with some success. As the Iranian coastline is longer than Iraq's, control of the Persian Gulf was relatively easy. Shore batteries with missiles can control a large part of this area, especially around the Hormuz Strait.
Iraq also acquired Silkworms, some with an IR homing ability. Iraqi OSA-class missile boats equipped with SS-N-2 used them against the IRIN navy, managed to hit and sink an Iranian Kaman-class fast attack craft, but sustained heavy losses, especially from Iranian Harpoons and Mavericks. Iraqi forces combined SS-N-2 (P-15 Termit) launched from Tu-22, Exocet missiles launched from Mirage F1 and Super Etendard, as well as Silkworm missiles and C-601 missiles launched from Tu-16 and H-6 bombers, bought from the Soviet Union and China to engage the Iranian Navy and tankers carrying Iranian oil.
Gulf War (1990–1991)
During the First Gulf War an Iraqi missile crew attacked US battleship with a Silkworm, while it was escorting a fleet of minesweepers engaged in coastal anti-mine operations. HMS Gloucester engaged the missile with a salvo shot of Sea Dart missiles which destroyed it after it had flown over its initial target.
Operators
The P-15 missile family and their clones were widely deployed from the 1960s.
The German Navy, after reunification, gave its stock of almost 200 P-15s to the United States Navy in 1991, these weapons being mainly the P-15M/P-22. They were used for missile defence tests.
Current operators
– P-20U and 4K51 Rubezh.
– P-22, P-20U, and 4K51 Rubezh.
– P-20.
– P-27 Termit-R mounted on destroyers and corvettes.
– HY-2.
– P-22.
– P-15, P-20, HY-1 and Kumsong-3.
– HY-1, HY-2, and HY-4.
– P-22.
– P-22 Mounted on Tarantul-class corvettes and 4K51 Rubezh on coastal batteries.
– P-15M and P-22.
– P-15, P-20, and 4K51 Rubezh.
Former operators
– retired from service.
– retired from service.
– HY-1 and HY-2 used on Type 021-class missile boats and Type 024 missile boats, retired from service.
– P-22, used until 2021.
– retired from service.
– passed on to Germany.
– acquired from East Germany after the German reunification and withdrawn from service shortly thereafter.
– P-15M missiles transferred from Ukraine in 1999 for the Matka-class missile boat, Tbilisi.
– passed on to Eritrea.
– acquired from Ethiopia. Out of service in 2004.
– used on Komar-class missile boats.
– retired from service after the 2003 Invasion of Iraq.
– retired from service.
– P-21/22 used until 2014.
– out of service after the Somali Civil War.
– passed on to the unified Yemeni state.
– passed on to successor states.
– operated some prior to the 2022 Invasion of Ukraine.
– acquired after the Yemeni unification. Non-operational after the civil war.
– passed on to successor states.
Captured-only operators
, for experimental activities.
, acquired from Egyptian Navy for experimental activities only, no deployment.
References
Notes
Bibliography
Slade, Stuart, The true history of Soviet anti-ship missiles, Rivista Italiana Difesa magazine May 1994.
Shikavthecenko, V, 'Lightings in the sea: the Russian FACs developments' RID September 1995.
SY-1 missile
C.201 missile
External links
P-015
Surface-to-surface missiles
MKB Raduga products
|
```yaml
subject: "For operator"
description: "multi-assignment / with splat operator and following variables (for *a, b, c in [])"
notes: >
Focus on RubyTopLevelRootNode (default behaviour) to dump local variable declarations in outer scope
ruby: |
for *a, b, c in [42, 100500]
array = [a, b, c]
end
ast: |
RubyTopLevelRootNode
attributes:
arityForCheck = Arity{preRequired = 0, optional = 0, hasRest = true, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}
callTarget = <top (required)>
checkArityProfile = false
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:a, #3:b, #4:c, #5:array, #6:%frame_on_stack_marker_1}
instrumentationBits = 0
keywordArguments = false
localReturnProfile = false
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
matchingReturnProfile = false
nextProfile = false
nonMatchingReturnProfile = false
polyglotRef = org.truffleruby.RubyLanguage@...
retryProfile = false
returnID = org.truffleruby.language.control.ReturnID@...
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <top (required)>, blockDepth = 0, parseName = <top (required)>, notes = null, argumentDescriptors = null)
sourceSection = SourceSection(source=<parse_ast> [1:1 - 3:3], index=0, length=52, characters=for *a, b, c in [42, 100500]\n array = [a, b, c]\nend)
split = HEURISTIC
children:
body =
SequenceNode
attributes:
flags = 12
sourceCharIndex = 0
sourceLength = 52
children:
body = [
EmitWarningsNode
attributes:
flags = 0
sourceCharIndex = -1
sourceLength = 0
warnings = RubyDeferredWarnings(WarningMessage(message = 'assigned but unused variable - array', verbosity = VERBOSE, fileName = '<parse_ast>', lineNumber = 2))
WriteLocalVariableNode
attributes:
flags = 0
frameSlot = 0 # (self)
sourceCharIndex = -1
sourceLength = 0
children:
valueNode =
ProfileArgumentNodeGen
attributes:
flags = 0
sourceCharIndex = -1
sourceLength = 0
children:
childNode_ =
ReadSelfNode
attributes:
flags = 0
sourceCharIndex = -1
sourceLength = 0
CatchBreakNode
attributes:
breakID = org.truffleruby.language.control.BreakID@...
flags = 1
isWhile = false
sourceCharIndex = 0
sourceLength = 52
children:
body =
FrameOnStackNode
attributes:
flags = 0
frameOnStackMarkerSlot = 6
sourceCharIndex = -1
sourceLength = 0
children:
child =
RubyCallNode
attributes:
descriptor = NoKeywordArgumentsDescriptor
dispatchConfig = PROTECTED
emptyKeywordsProfile = false
flags = 0
isAttrAssign = false
isSafeNavigation = false
isSplatted = false
isVCall = false
lastArgIsNotHashProfile = false
methodName = "each"
notEmptyKeywordsProfile = false
notRuby2KeywordsHashProfile = false
sourceCharIndex = -1
sourceLength = 0
children:
block =
BlockDefinitionNodeGen
attributes:
breakID = org.truffleruby.language.control.BreakID@...
callTargets = ProcCallTargets(callTargetForProc = block in <top (required)>, callTargetForLambda = null, altCallTargetCompiler = ...$$Lambda$.../0x...@...)
flags = 0
frameOnStackMarkerSlot = 6
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 1, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = block in <top (required)>, blockDepth = 1, parseName = block in <top (required)>, notes = <top (required)>, argumentDescriptors = [ArgumentDescriptor(name = %for_0, type = req)])
sourceCharIndex = 28
sourceLength = 24
type = PROC
call targets:
RubyProcRootNode
attributes:
callTarget = block in <top (required)>
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%for_0}
instrumentationBits = 0
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
nextProfile = false
polyglotRef = org.truffleruby.RubyLanguage@...
redoProfile = false
retryProfile = false
returnID = org.truffleruby.language.control.ReturnID@...
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 1, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = block in <top (required)>, blockDepth = 1, parseName = block in <top (required)>, notes = <top (required)>, argumentDescriptors = [ArgumentDescriptor(name = %for_0, type = req)])
sourceSection = SourceSection(source=<parse_ast> [1:29 - 3:3], index=28, length=24, characters=\n array = [a, b, c]\nend)
split = HEURISTIC
children:
body =
SequenceNode
attributes:
flags = 12
sourceCharIndex = 28
sourceLength = 24
children:
body = [
WriteLocalVariableNode
attributes:
flags = 0
frameSlot = 0 # (self)
sourceCharIndex = -1
sourceLength = 0
children:
valueNode =
ProfileArgumentNodeGen
attributes:
flags = 0
sourceCharIndex = -1
sourceLength = 0
children:
childNode_ =
ReadSelfNode
attributes:
flags = 0
sourceCharIndex = -1
sourceLength = 0
WriteLocalVariableNode
attributes:
flags = 0
frameSlot = 1 # %for_0
sourceCharIndex = -1
sourceLength = 0
children:
valueNode =
ProfileArgumentNodeGen
attributes:
flags = 0
sourceCharIndex = -1
sourceLength = 0
children:
childNode_ =
ReadPreArgumentNode
attributes:
flags = 0
index = 0
keywordArguments = false
missingArgumentBehavior = NIL
sourceCharIndex = -1
sourceLength = 0
MultipleAssignmentNode
attributes:
flags = 0
sourceCharIndex = -1
sourceLength = 0
children:
postNodes = [
WriteDeclarationVariableNode
attributes:
flags = 0
frameDepth = 1
frameSlot = 3 # b
sourceCharIndex = 8
sourceLength = 1
WriteDeclarationVariableNode
attributes:
flags = 0
frameDepth = 1
frameSlot = 4 # c
sourceCharIndex = 11
sourceLength = 1
]
restNode =
WriteDeclarationVariableNode
attributes:
flags = 0
frameDepth = 1
frameSlot = 2 # a
sourceCharIndex = 5
sourceLength = 1
rhsNode =
ReadLocalVariableNode
attributes:
flags = 0
frameSlot = 1 # %for_0
sourceCharIndex = -1
sourceLength = 0
type = FRAME_LOCAL
splatCastNode =
SplatCastNodeGen
attributes:
conversionMethod = :to_ary
copy = true
flags = 0
nilBehavior = ARRAY_WITH_NIL
sourceCharIndex = -1
sourceLength = 0
WriteDeclarationVariableNode
attributes:
flags = 1
frameDepth = 1
frameSlot = 5 # array
sourceCharIndex = 31
sourceLength = 17
children:
valueNode =
ArrayLiteralNode$UninitialisedArrayLiteralNode
attributes:
flags = 0
language = org.truffleruby.RubyLanguage@...
sourceCharIndex = 39
sourceLength = 9
children:
values = [
ReadDeclarationVariableNode
attributes:
flags = 0
frameDepth = 1
frameSlot = 2 # a
sourceCharIndex = 40
sourceLength = 1
type = FRAME_LOCAL
ReadDeclarationVariableNode
attributes:
flags = 0
frameDepth = 1
frameSlot = 3 # b
sourceCharIndex = 43
sourceLength = 1
type = FRAME_LOCAL
ReadDeclarationVariableNode
attributes:
flags = 0
frameDepth = 1
frameSlot = 4 # c
sourceCharIndex = 46
sourceLength = 1
type = FRAME_LOCAL
]
]
receiver =
ArrayLiteralNode$UninitialisedArrayLiteralNode
attributes:
flags = 0
language = org.truffleruby.RubyLanguage@...
sourceCharIndex = 16
sourceLength = 12
children:
values = [
IntegerFixnumLiteralNode
attributes:
flags = 0
sourceCharIndex = 17
sourceLength = 2
value = 42
IntegerFixnumLiteralNode
attributes:
flags = 0
sourceCharIndex = 21
sourceLength = 6
value = 100500
]
]
```
|
The or TSO, was established in 1946 as the Toho Symphony Orchestra (東宝交響楽団). It assumed its present name in 1951.
Based in Kawasaki, the TSO performs in numerous concert halls and serves as pit orchestra for some productions at New National Theatre Tokyo, the city's leading opera house. It offers subscription concert series at its home, the Muza Kawasaki Symphony Hall and at Suntory Hall, the Concert Hall of Tokyo Metropolitan Theatre, and Tokyo Opera City.
The orchestra recorded the musical score for the 1984 movie The Return of Godzilla.
Permanent Conductors and Music Directors
Jonathan Nott (September 2014 – present)
Hubert Soudant (2004 – August 2014)
Kazuyoshi Akiyama (1964 – 2004)
Masashi Ueda (1945 – 1964)
Hidemaro Konoe
Note
The Tokyo Symphony Orchestra (東響, Tōkyō) is not to be confused with the Tokyo Metropolitan Symphony Orchestra (都響, Tokyō).
External links
Musical groups established in 1946
Japanese orchestras
Culture in Tokyo
Musical groups from Kanagawa Prefecture
|
Carhaix-Plouguer (; ), commonly known as just Carhaix (), is a commune in the French department of Finistère, region of Brittany, France. The commune was created in 1957 by the merger of the former communes Carhaix and Plouguer.
Geography
Carhaix is located in the Poher, an important territory of Brittany, sandwiched between the Arrée Mountains to the north and the Black Mountains to the south. The agglomeration developed mainly on a plateau located at 140 meters above sea level, gently sloping towards the west, the highest elevations being eastwards beyond the agglomeration towards 155–169 meters above sea level. This plateau is limited to the north by the valley of the Hyères (60 meters elevation that imposed the construction of an aqueduct in Roman times to cross it), which flows to 80 meters above sea level, and south by the stream of the Madeleine whose route was taken again by the channel of Nantes in Brest. The Hyères sometimes causes serious floods: in March 1903, the Sainte-Catherine chapel located in Plounevézel but at the limit of Carhaix, had water up to the roof and in 1910 to the stained glass windows.
Geologically, Carhaix is located in the center of the Châteaulin basin, which consists mainly of slate and sandstone schists and forms a topographic depression between the Arrée Mountains and the Black Mountains.
Having become communes at the French Revolution, Carhaix and Plouguer merged in 1957 and took the name of Carhaix-Plouguer. As early as 1862, the municipal council of Carhaix had expressed a wish in this direction. Carhaix station has rail connections to Guingamp.
Climate
Carhaix-Plouguer has a oceanic climate (Köppen climate classification Cfb). The average annual temperature in Carhaix-Plouguer is . The average annual rainfall is with December as the wettest month. The temperatures are highest on average in August, at around , and lowest in January, at around . The highest temperature ever recorded in Carhaix-Plouguer was on 9 August 2003; the coldest temperature ever recorded was on 14 January 1985.
Name
The name in Breton of the commune is Karaez-Plougêr.
In a charter signed by the Count of Cornouaille, Hoel, to "donate a villa near Caer Ahes, in which is the church of sanctus Kigavus (saint Quijeau), we find the oldest form of name of Carhaix, close and contemporary to those mentioned in medieval novels. The charter is necessarily prior to the death of Hoel (1084). Saint-Quijeau is an ancient trève attached to that of Plouguer in the thirteenth century.
The Breton name is Karaez (spelled Carahes in the eleventh century in a charter of Count Hoel, based on the prefix "Kaer" which means "fortified place"). Carhaix is certainly the city behind the Carahes of medieval texts.
At the time of the Tour d'Auvergne and the nineteenth century, it was believed in Kaer Ahès, the name, Ahès, of the legendary daughter of Gradlon that would have led Ys in his loss.
The main roads leading to Carhaix were therefore often called "paths of Ohès" or "roads d'Ahès" (Bernard Tanguy). Ohès as Ahès are close to the name Hoël. The identification of the place Corophesium, mentioned only in the Annals of Lausanne, is debated (Carhaix or Coray?) For a place of war led by Louis the Pious against the Breton king Morman. It may be that Corophesium represents neither one nor the other, but corresponds, as Léon Fleuriot indicates in his book The Origins of Brittany (1987), to an error of the scribe.
Bernard Tanguy brings Karaes closer to Carofes, attested in Low-Latin for the name of the city of Diablintes and for Charroux (Vienna). It would then be an old * Carofum / * Carofensis (evolution of quadruvium in carruvium), registering Carhaix in its function of road junction. For him, the Corophesium where Louis the Pious surrenders in 818 is a cacography of Carophesium. Moreover, could the association of Charlemagne with Carhaix in the novel of Aiquin be based on the expedition of his son, Louis the Pious, about which is named Corophesium?
The permanence of the Carhaix crossroads function, together with its decline in the Lower Empire, may explain that, although the city was the capital of Osism, they did not leave their name as it was the case. more often in Gaul.
History
The city was called Vorgium at the time of the Roman Empire. It was the chief town of the Osismii.
Culture
The Vieilles Charrues Festival (Literally: Old Ploughs Festival) is held every year in mid-July.
This festival is one of the largest music events in Europe, attracting more than 200,000 people every year. It is held in the fields once held by the famille de Saisy de Kerampuil and the festival venue is next to the Chateau Kerampuil.
In continental histories Carhaix is thought to be Carohaise of King Leodegrance and the Roman city of Vorgium. It is at Carohaise that the legendary King Arthur defends Leodegrance by defeating Rience, and meets Guinevere, Leodegrance's daughter. Modern archaeological digs have uncovered evidence of the ancient Roman city including its aqueduct system.
Population
Inhabitants of Carhaix-Plouguer are called Carhaisiens. The population data given in the table and graph below for 1954 and earlier refer to the former commune of Carhaix.
Festivals
The Vieilles Charrues (Old Ploughs) Festival (in July since 1992 in Landeleau and since 1995 in Carhaix)
The Book Festival in Brittany (organized by the Breton cultural center Egin, takes place on the last weekend of October since 1989)
The prize for the City of Carhaix novel, created in 1999 at the initiative of the city of Carhaix, is awarded during the Book Festival. Laureates: Yvon Inizan (1999), Bernard Garel (2000), Jacques Josse (2001), Soazig Aaron (2002), Marie Le Drian (2003), Cédric Morgan (2004), Arnaud Le Gouëfflec (2005), Marie-Hélène Bahain (2006), Sylvain Coher (2007), Francoise Moreau (2008), Tanguy Viel (2009), Herve Jaouen (2010), Gael Brunet (2011), Claire Fourier (2012)
In 1948, Polig Montjarret was at the origin of the creation of the second bagad recruited among the railway staff, said bagad of the railway workers of Carhaix, the second after that of Saint-Marc, in Brest.
Review Kreiz Breizh, published by the association The Memoirs of Kreiz Breizh. 1st release in 2000.
Review Spered Gouez / The Wild Spirit, founded in 1991 by Marie-Josée Christien, published by the Brittany Cultural Center Egin on the occasion of the Book Festival in Brittany.
"Regard d'Espérance" magazine, journal of information and reflection, free monthly published since December 1985 by the Missionary Center of Carhaix, published 8,500 copies including interview, chronic history, economic, society, doctor's advice .. .Director of publication: Y. Charles.
Education
There are about 2680 students in Carhaix, of which 234 attended a Diwan school as of school year 2003-04. Carhaix has one Diwan preschool, one primary school and a Diwan lycée (which is also the only lycée of Diwan). The lycée was from 1994 to 1999 first located in Brest. In 1999 it moved to Carhaix.
Breton language
The municipality launched a linguistic plan through Ya d'ar brezhoneg on 9 April 2004.
In 2008, 21.49% of primary-school children attended bilingual schools.
International relations
The following places are twinned with Carhaix-Plouguer:
Carrickmacross, County Monaghan, Ulster, Ireland
Dawlish, Devon, England, United Kingdom
Oiartzun, Gipuzkoa, Basque Country, Spain
Sport
Carhaix was a start of the 5th stage of the 2011 Tour de France.
Every year about 1,000 athletes participate in Huelgoat-Carhaix half-marathon and 10k.
See also
Communes of the Finistère department
Gare de Carhaix
Listing of the works of the atelier of the Maître de Tronoën
References
External links
Official website
Mayors of Finistère Association
Communes of Finistère
Osismii
Gallia Lugdunensis
|
```go
/*
path_to_url
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package cert_test
import (
cryptorand "crypto/rand"
"crypto/rsa"
"testing"
"k8s.io/client-go/util/cert"
)
const COMMON_NAME = "foo.example.com"
// TestSelfSignedCertHasSAN verifies the existing of
// a SAN on the generated self-signed certificate.
// a SAN ensures that the certificate is considered
// valid by default in go 1.15 and above, which
// turns off fallback to Common Name by default.
func TestSelfSignedCertHasSAN(t *testing.T) {
key, err := rsa.GenerateKey(cryptorand.Reader, 2048)
if err != nil {
t.Fatalf("rsa key failed to generate: %v", err)
}
selfSignedCert, err := cert.NewSelfSignedCACert(cert.Config{CommonName: COMMON_NAME}, key)
if err != nil {
t.Fatalf("self signed certificate failed to generate: %v", err)
}
if len(selfSignedCert.DNSNames) == 0 {
t.Fatalf("self signed certificate has zero DNS names.")
}
}
```
|
```go
package main
import "fmt"
func quicksort(list []int) []int {
if len(list) < 2 {
return list
} else {
pivot := list[0]
var less = []int{}
var greater = []int{}
for _, num := range list[1:] {
if pivot > num {
less = append(less, num)
} else {
greater = append(greater, num)
}
}
less = append(quicksort(less), pivot)
greater = quicksort(greater)
return append(less, greater...)
}
}
func main() {
fmt.Println(quicksort([]int{10, 5, 2, 3}))
}
```
|
```elixir
# Original code by Michal Muskala
# path_to_url
# Lives here because it literally broke memory measurements so it's always
# an interesting case to have around :)
defmodule BenchKeyword do
@compile :inline_list_funcs
def delete_v0(keywords, key) when is_list(keywords) and is_atom(key) do
:lists.filter(fn {k, _} -> k != key end, keywords)
end
def delete_v1(keywords, key) when is_list(keywords) and is_atom(key) do
do_delete(keywords, key, _deleted? = false)
catch
:not_deleted -> keywords
end
defp do_delete([{key, _} | rest], key, _deleted?),
do: do_delete(rest, key, true)
defp do_delete([{_, _} = pair | rest], key, deleted?),
do: [pair | do_delete(rest, key, deleted?)]
defp do_delete([], _key, _deleted? = true),
do: []
defp do_delete([], _key, _deleted? = false),
do: throw(:not_deleted)
def delete_v2(keywords, key) when is_list(keywords) and is_atom(key) do
delete_v2_key(keywords, key, [])
end
defp delete_v2_key([{key, _} | tail], key, heads) do
delete_v2_key(tail, key, heads)
end
defp delete_v2_key([{_, _} = pair | tail], key, heads) do
delete_v2_key(tail, key, [pair | heads])
end
defp delete_v2_key([], _key, heads) do
:lists.reverse(heads)
end
def delete_v3(keywords, key) when is_list(keywords) and is_atom(key) do
case :lists.keymember(key, 1, keywords) do
true -> delete_v3_key(keywords, key, [])
_ -> keywords
end
end
defp delete_v3_key([{key, _} | tail], key, heads) do
delete_v3_key(tail, key, heads)
end
defp delete_v3_key([{_, _} = pair | tail], key, heads) do
delete_v3_key(tail, key, [pair | heads])
end
defp delete_v3_key([], _key, heads) do
:lists.reverse(heads)
end
def delete_v4(keywords, key) when is_list(keywords) and is_atom(key) do
case :lists.keymember(key, 1, keywords) do
true -> delete_v4_key(keywords, key)
_ -> keywords
end
end
defp delete_v4_key([{key, _} | tail], key) do
delete_v4_key(tail, key)
end
defp delete_v4_key([{_, _} = pair | tail], key) do
[pair | delete_v4_key(tail, key)]
end
defp delete_v4_key([], _key) do
[]
end
end
benches = %{
"delete old" => fn {kv, key} -> BenchKeyword.delete_v0(kv, key) end,
"delete throw" => fn {kv, key} -> BenchKeyword.delete_v1(kv, key) end,
"delete reverse" => fn {kv, key} -> BenchKeyword.delete_v2(kv, key) end,
"delete keymember reverse" => fn {kv, key} -> BenchKeyword.delete_v3(kv, key) end,
"delete keymember body" => fn {kv, key} -> BenchKeyword.delete_v4(kv, key) end
}
inputs = %{
"small miss" => {Enum.map(1..10, &{:"k#{&1}", &1}), :k11},
"small hit" => {Enum.map(1..10, &{:"k#{&1}", &1}), :k10},
"large miss" => {Enum.map(1..100, &{:"k#{&1}", &1}), :k101},
"large hit" => {Enum.map(1..100, &{:"k#{&1}", &1}), :k100},
"huge miss" => {Enum.map(1..10000, &{:"k#{&1}", &1}), :k10001},
"huge hit" => {Enum.map(1..10000, &{:"k#{&1}", &1}), :k10000}
}
Benchee.run(
benches,
inputs: inputs,
print: [fast_warning: false],
memory_time: 0.001,
warmup: 1,
time: 2
)
# Operating System: Linux
# CPU Information: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
# Number of Available Cores: 8
# Available memory: 15.61 GB
# Elixir 1.8.1
# Erlang 21.3.2
# Benchmark suite executing with the following configuration:
# warmup: 1 s
# time: 2 s
# memory time: 1 ms
# parallel: 1
# inputs: huge hit, huge miss, large hit, large miss, small hit, small miss
# Estimated total run time: 1.50 min
# Benchmarking delete keymember body with input huge hit...
# Benchmarking delete keymember body with input huge miss...
# Benchmarking delete keymember body with input large hit...
# Benchmarking delete keymember body with input large miss...
# Benchmarking delete keymember body with input small hit...
# Benchmarking delete keymember body with input small miss...
# Benchmarking delete keymember reverse with input huge hit...
# Benchmarking delete keymember reverse with input huge miss...
# Benchmarking delete keymember reverse with input large hit...
# Benchmarking delete keymember reverse with input large miss...
# Benchmarking delete keymember reverse with input small hit...
# Benchmarking delete keymember reverse with input small miss...
# Benchmarking delete old with input huge hit...
# Benchmarking delete old with input huge miss...
# Benchmarking delete old with input large hit...
# Benchmarking delete old with input large miss...
# Benchmarking delete old with input small hit...
# Benchmarking delete old with input small miss...
# Benchmarking delete reverse with input huge hit...
# Benchmarking delete reverse with input huge miss...
# Benchmarking delete reverse with input large hit...
# Benchmarking delete reverse with input large miss...
# Benchmarking delete reverse with input small hit...
# Benchmarking delete reverse with input small miss...
# Benchmarking delete throw with input huge hit...
# Benchmarking delete throw with input huge miss...
# Benchmarking delete throw with input large hit...
# Benchmarking delete throw with input large miss...
# Benchmarking delete throw with input small hit...
# Benchmarking delete throw with input small miss...
# ##### With input huge hit #####
# Name ips average deviation median 99th %
# delete throw 9.89 K 101.09 s 16.14% 101.95 s 184.00 s
# delete reverse 9.84 K 101.58 s 9.47% 102.35 s 152.15 s
# delete keymember body 7.30 K 137.07 s 7.20% 139.78 s 168.69 s
# delete keymember reverse 7.07 K 141.36 s 10.96% 139.84 s 206.47 s
# delete old 3.63 K 275.31 s 13.72% 286.14 s 448.82 s
# Comparison:
# delete throw 9.89 K
# delete reverse 9.84 K - 1.00x slower +0.49 s
# delete keymember body 7.30 K - 1.36x slower +35.98 s
# delete keymember reverse 7.07 K - 1.40x slower +40.27 s
# delete old 3.63 K - 2.72x slower +174.22 s
# Memory usage statistics:
# Name Memory usage
# delete throw 156.23 KB
# delete reverse 195.94 KB - 1.25x memory usage +39.70 KB
# delete keymember body 156.23 KB - 1.00x memory usage +0 KB
# delete keymember reverse 195.94 KB - 1.25x memory usage +39.70 KB
# delete old 156.29 KB - 1.00x memory usage +0.0547 KB
# **All measurements for memory usage were the same**
# ##### With input huge miss #####
# Name ips average deviation median 99th %
# delete keymember body 28.07 K 35.62 s 2.46% 35.52 s 39.29 s
# delete keymember reverse 27.49 K 36.38 s 10.10% 35.50 s 44.30 s
# delete reverse 9.66 K 103.49 s 15.65% 102.55 s 169.22 s
# delete throw 9.21 K 108.62 s 9.04% 107.38 s 129.44 s
# delete old 3.69 K 270.99 s 11.01% 285.97 s 354.03 s
# Comparison:
# delete keymember body 28.07 K
# delete keymember reverse 27.49 K - 1.02x slower +0.76 s
# delete reverse 9.66 K - 2.91x slower +67.87 s
# delete throw 9.21 K - 3.05x slower +73.00 s
# delete old 3.69 K - 7.61x slower +235.37 s
# Memory usage statistics:
# Name Memory usage
# delete keymember body 0 B
# delete keymember reverse 0 B - 1.00x memory usage +0 B
# delete reverse 200640 B - x memory usage +200640 B
# delete throw 0 B - 1.00x memory usage +0 B
# delete old 160056 B - x memory usage +160056 B
# **All measurements for memory usage were the same**
# ##### With input large hit #####
# Name ips average deviation median 99th %
# delete reverse 1003.02 K 1.00 s 1747.60% 0.85 s 1.64 s
# delete throw 977.16 K 1.02 s 1359.29% 0.94 s 1.51 s
# delete keymember reverse 890.66 K 1.12 s 971.77% 1.01 s 1.80 s
# delete keymember body 788.15 K 1.27 s 1251.23% 1.12 s 2.29 s
# delete old 373.54 K 2.68 s 314.76% 2.48 s 4.72 s
# Comparison:
# delete reverse 1003.02 K
# delete throw 977.16 K - 1.03x slower +0.0264 s
# delete keymember reverse 890.66 K - 1.13x slower +0.126 s
# delete keymember body 788.15 K - 1.27x slower +0.27 s
# delete old 373.54 K - 2.69x slower +1.68 s
# Memory usage statistics:
# Name Memory usage
# delete reverse 3.09 KB
# delete throw 1.55 KB - 0.50x memory usage -1.54688 KB
# delete keymember reverse 3.09 KB - 1.00x memory usage +0 KB
# delete keymember body 1.55 KB - 0.50x memory usage -1.54688 KB
# delete old 1.60 KB - 0.52x memory usage -1.49219 KB
# **All measurements for memory usage were the same**
# ##### With input large miss #####
# Name ips average deviation median 99th %
# delete keymember reverse 4.50 M 222.31 ns 3901.16% 206 ns 363 ns
# delete keymember body 4.29 M 232.88 ns 3459.43% 206 ns 407 ns
# delete reverse 1.01 M 989.61 ns 1552.26% 853 ns 1615 ns
# delete throw 0.77 M 1299.03 ns 1347.05% 1175 ns 1834 ns
# delete old 0.38 M 2631.93 ns 374.40% 2483 ns 4142 ns
# Comparison:
# delete keymember reverse 4.50 M
# delete keymember body 4.29 M - 1.05x slower +10.57 ns
# delete reverse 1.01 M - 4.45x slower +767.31 ns
# delete throw 0.77 M - 5.84x slower +1076.72 ns
# delete old 0.38 M - 11.84x slower +2409.62 ns
# Memory usage statistics:
# Name Memory usage
# delete keymember reverse 0 B
# delete keymember body 0 B - 1.00x memory usage +0 B
# delete reverse 3200 B - x memory usage +3200 B
# delete throw 0 B - 1.00x memory usage +0 B
# delete old 1656 B - x memory usage +1656 B
# **All measurements for memory usage were the same**
# ##### With input small hit #####
# Name ips average deviation median 99th %
# delete reverse 5.80 M 172.42 ns 9750.41% 111 ns 274 ns
# delete throw 5.06 M 197.49 ns 11517.56% 111 ns 294 ns
# delete keymember reverse 4.73 M 211.61 ns 9126.78% 142 ns 333 ns
# delete keymember body 4.39 M 227.67 ns 10271.09% 137 ns 340 ns
# delete old 2.44 M 410.04 ns 4592.82% 313 ns 575 ns
# Comparison:
# delete reverse 5.80 M
# delete throw 5.06 M - 1.15x slower +25.07 ns
# delete keymember reverse 4.73 M - 1.23x slower +39.19 ns
# delete keymember body 4.39 M - 1.32x slower +55.26 ns
# delete old 2.44 M - 2.38x slower +237.63 ns
# Memory usage statistics:
# Name Memory usage
# delete reverse 288 B
# delete throw 144 B - 0.50x memory usage -144 B
# delete keymember reverse 288 B - 1.00x memory usage +0 B
# delete keymember body 144 B - 0.50x memory usage -144 B
# delete old 200 B - 0.69x memory usage -88 B
# **All measurements for memory usage were the same**
# ##### With input small miss #####
# Name ips average deviation median 99th %
# delete keymember body 15.60 M 64.10 ns 20187.61% 45 ns 126 ns
# delete keymember reverse 14.74 M 67.85 ns 20395.85% 46 ns 140 ns
# delete reverse 5.55 M 180.02 ns 11840.78% 114 ns 356 ns
# delete throw 3.37 M 297.09 ns 7734.98% 202 ns 463 ns
# delete old 2.49 M 400.87 ns 4818.94% 308 ns 624 ns
# Comparison:
# delete keymember body 15.60 M
# delete keymember reverse 14.74 M - 1.06x slower +3.74 ns
# delete reverse 5.55 M - 2.81x slower +115.92 ns
# delete throw 3.37 M - 4.63x slower +232.99 ns
# delete old 2.49 M - 6.25x slower +336.77 ns
# Memory usage statistics:
# Name Memory usage
# delete keymember body 0 B
# delete keymember reverse 0 B - 1.00x memory usage +0 B
# delete reverse 320 B - x memory usage +320 B
# delete throw 0 B - 1.00x memory usage +0 B
# delete old 216 B - x memory usage +216 B
# **All measurements for memory usage were the same**
```
|
Wowowin is a Philippine television variety show broadcast by GMA Network and All TV. Hosted by Willie Revillame, it premiered on May 10, 2015 on GMA Network. The show aired its final broadcast on GMA Network on February 11, 2022. The show premiered on All TV on September 13, 2022. The show concluded on April 5, 2023.
Overview
Originally produced by Willie Revillame's WBR Entertainment Productions Inc., it served as a blocktimer on GMA Network. Randy Santiago originally served as the show's director. The show's theme song was composed by Lito Camo and arranged by Albert Tamayo. In late 2015, the show became a co-production between GMA Entertainment Group and WBR Entertainment Productions Inc. On February 1, 2016, the show joined the network's Telebabad line up.
In June 2017, co-host Super Tekla was fired from the show. On September 30, 2019, Sugar Mercado and comedian Donita Nose returned to the show.
The show's Saturday edition, Wowowin Primetime premiered on February 15, 2020, on the network's Sabado Star Power sa Gabi line up replacing Daddy's Gurl. Gab Valenciano, who was hired in January 2020 served as the director. In March 2020, the admission of a live audience in the studio and production were suspended due to the enhanced community quarantine in Luzon caused by the COVID-19 pandemic. The show resumed its programming on April 13, 2020.
The show ended on GMA Network on February 11, 2022, as Revillame's contract with the network expired in the same month.
The show resumed through livestreaming on YouTube and Facebook on March 15, 2022. On July 15, 2022, it was announced that the show would return to television, this time on All TV, on September 13, after Revillame signed a contract with AMBS. After its broadcast in All TV received low ratings, online livestreaming was ceased on September 26, 2022, to encourage the viewers to watch it on All TV.
The show aired its final live broadcast on February 10, 2023 and concluded on All TV on April 5, 2023.
Cast
Willie Revillame
Former hosts
Yvette Corral
Janelle "Kim Chi" Tee
Donita Nose
Jennifer "DJ JL" Lee
Super Tekla
Amal Rosaroso
Ashley Ortega
Ariella Arida
Sugar Mercado
Camille Canlas
Jannie Alipo-on
Patricia Tumulak
Nelda Ibe
Kim Idol
Petite
Le Chazz
Halimatu Yushawu
Elaine Timbol
Almira Teng
Valerie Concepcion
Boobsie Wonderland
Herlene Budol
Dancers
Karen Ortua
April "Congratulations" Gustillo
Joyce Burgos
Samantha Flores
Yvette Corral
Monique "Pak" Natada
Chiastine Faye Perez
Bea Marie Holmes
Samantha Page
Lalaine Haddad
Karen Vicente
Ley Lopez
Honey Nicerio
Sharlyn Dizon
Zandra Faye Gonzalez
Patricia Reyes
Jho Ann Sotelo
Kristine Joy Paras
Kay Shivaun
Mabelle Rico
Princess "Upnek" Lerio
Clarisse Mae Chua
Ynna Marie Bayot
Tezza Santos
Burn Sanchez
Jules Cruz
Janine “Shin” Pasciolco
Geneva "Baby Gene" Reyes
Glory Mae Camu
Ann Duque
Kathleen "Cookie" Bueno
Lyca Makino
Grace Buenconsejo
Nikkie Millares
Jovie "Baby Girl" Bautista
Mabelle Portez
Angel Gavilan
Jannah Dazo
Fey Dela Peña
Princess Gregorio
Yannah Hernandez
Yam Masangkay
Sandy "Liwayway" Tolentino
Joy Basa
Mae Bejar
Lana Palting (2019)
Kayeann Picache
Melanie Grace Umali
Yhanna Whiwit
Jaye Anne Balangue
Alex Manla
Chinkee "Chinkeenini" Brice
Lhia "Ligaya" De Guzman
Aika Hernandez
Jhovielyn "Jovy" Bernal
Ayrra Averilla
Sheryl "Love Yah" Moñeno
Precious Quirino
Jonalyn Flores
Jeraldine "Lawin" Faustino
Erica "The Mabalaquena" Macapagal
Controversies
In January 2019, one person from the audience died on the set of Wowowin, and one person was injured due to an accident. On July 24, 2019, host Willie Revillame disqualified a group of contestants for modus operandi.
Ratings
According to AGB Nielsen Philippines' Mega Manila household television ratings, the pilot episode of Wowowin earned a 22.1% rating. While the premiere episode of Wowowin Primetime scored an 11.5% rating, according to AGB Nielsen Philippines' Nationwide Urban Television Audience Measurement People in television homes.
Based on Nielsen Philippines' National Urban TV Audience Measurement people data, the premiere of Wowowin on All TV scored a 0% rating.
Accolades
References
External links
2015 Philippine television series debuts
2023 Philippine television series endings
Filipino-language television shows
All TV (Philippines) original programming
GMA Network original programming
Philippine variety television shows
Television productions suspended due to the COVID-19 pandemic
Willie Revillame
Television controversies in the Philippines
|
```go
package hcsshim
import "github.com/sirupsen/logrus"
// DestroyLayer will remove the on-disk files representing the layer with the given
// id, including that layer's containing folder, if any.
func DestroyLayer(info DriverInfo, id string) error {
title := "hcsshim::DestroyLayer "
logrus.Debugf(title+"Flavour %d ID %s", info.Flavour, id)
// Convert info to API calling convention
infop, err := convertDriverInfo(info)
if err != nil {
logrus.Error(err)
return err
}
err = destroyLayer(&infop, id)
if err != nil {
err = makeErrorf(err, title, "id=%s flavour=%d", id, info.Flavour)
logrus.Error(err)
return err
}
logrus.Debugf(title+"succeeded flavour=%d id=%s", info.Flavour, id)
return nil
}
```
|
The 3rd Continental Light Dragoons, also known as Baylor's Horse or Lady Washington's Horse, was a mounted regiment of the Continental Army raised on January 1, 1777, at Morristown, New Jersey. The regiment saw action at the Battle of Brandywine, Battle of Germantown and the Battle of Guilford Court House.
The regiment was surprised on the night of September 27, 1778, while sleeping in barns near Old Tappan, New Jersey, in close proximity to British positions. Referred to by the Continentals as the "Baylor Massacre", at least 67 men were made casualties and 70 horses killed. Among the captured was the regimental commander, Lt. Col. George Baylor, who was replaced on November 20, 1778, by Lt. Col. William Washington, transferred from the 4th Continental Light Dragoons. In 1779, while recruiting and remounting, the regiment rescued James Wilson during the "Fort Wilson Riot". The 3rd CLD was posted to the Southern department on November 1, 1779.
Losses of 15 killed, 17 wounded, and 100 men captured along with 83 horses in a night attack by British Lt. Col. Banastre Tarleton on April 14, 1780, led to the unofficial amalgamation of the regiment with the 1st Continental Light Dragoons, commonly known as the "1st and 3rd Light Dragoons" as Washington deferred to his friend and senior, Lt. Col. Anthony White, whom he had served under in the 4th CLD. Washington resumed command of the unit on May 6, 1780, when it was attacked on the Santee River and White captured.
In the 1781 campaign, Washington and his men distinguished themselves in mounted charges at the Battle of Cowpens in January, the Battle of Guilford Court House in March, and the Battle of Eutaw Springs in September. At Eutaw Springs Washington was pinned under his fallen mount, bayoneted, and captured. Captain William Parsons, the senior surviving officer, commanded the corps until Lt-Col. Baylor was exchanged in June 1782 and resumed command. When the companies of the 4th CLD were parceled out during the siege of Yorktown, the 1st and 3rd accepted its few remaining mounted troopers.
The regiment was officially merged into the 1st Legionary Corps on November 2, 1782, with the consolidated unit of five troops designated the 1st Legionary Corps.
A member of the 3rd Continental Dragoons was Maryland Congressman Philip Stuart.
References
2. "Dragoon Diary: The History of the Third Continental Light Dragoons" C.F.William Maurer, Authorhouse, 2005.
3. "Commander in Chief's Guard: Revolutionary War" Carlos E. Godfrey, M.D., Genealogical Publishing Co., Inc. 1972
4. "The Patriots at the Cowpens" Bobby Gilmer Moss, Scotia Press, 1985
External links
3rd Continental Light Dragoon Reenactment Group
3rd CLD Veteran {reference only}
Bibliography of Continental Army Dragoons compiled by the United States Army Center of Military History
Military units and formations of the Continental Army
Dragoons
Light Dragoons
|
```javascript
import { isObject, isUndefined } from '../utils/is-type'
import { defaultOptions } from './constants'
export function setOptions (options) {
// combine options
options = isObject(options) ? options : {}
// The options are set like this so they can
// be minified by terser while keeping the
// user api intact
// terser --mangle-properties keep_quoted=strict
/* eslint-disable dot-notation */
return {
keyName: options['keyName'] || defaultOptions.keyName,
attribute: options['attribute'] || defaultOptions.attribute,
ssrAttribute: options['ssrAttribute'] || defaultOptions.ssrAttribute,
tagIDKeyName: options['tagIDKeyName'] || defaultOptions.tagIDKeyName,
contentKeyName: options['contentKeyName'] || defaultOptions.contentKeyName,
metaTemplateKeyName: options['metaTemplateKeyName'] || defaultOptions.metaTemplateKeyName,
debounceWait: isUndefined(options['debounceWait']) ? defaultOptions.debounceWait : options['debounceWait'],
waitOnDestroyed: isUndefined(options['waitOnDestroyed']) ? defaultOptions.waitOnDestroyed : options['waitOnDestroyed'],
ssrAppId: options['ssrAppId'] || defaultOptions.ssrAppId,
refreshOnceOnNavigation: !!options['refreshOnceOnNavigation']
}
/* eslint-enable dot-notation */
}
export function getOptions (options) {
const optionsCopy = {}
for (const key in options) {
optionsCopy[key] = options[key]
}
return optionsCopy
}
```
|
Phu Thap Boek () is a 1,768 m high mountain in Phetchabun Province, Thailand near the border with Loei Province. It is in the Lom Kao District.
Description
Rising in the western range of the massif this mountain is the highest point of the Phetchabun Mountains. The peak rises 12 km west of Highway 203, between the towns of Loei and Phetchabun.
Phu Hin Rong Kla National Park surrounds the mountain. The park overlaps the borders of two provinces, Phitsanulok and Phetchabun. Most of the mountain is covered in mixed evergreen forest. There are farms on its slopes where the climate favors cabbage cultivation. The area around the mountain is part of the Luang Prabang montane rain forest ecoregion.
The villagers of Phu Thap Boek are predominantly Hmong hill tribespeople who immigrated from northern Thailand. They established the Phetchabun Hilltribe Development and Relief Center in 1982. The mountain has since been overrun by allegedly illegal resorts and restaurants.
Geography
The summit of Phu Thap Boek is at 1,768 meters elevation. Geological uplifts changed the area of Phetchabun Province from a flat plate to sandstone mountains. The east and south are Lom Sak District and Khao Kho District. The north and west are adjacent to Loei Province.
Climate
December and January are the coldest months, April the hottest. Summer temperatures average about 20 degrees Celsius. May through September are the wettest months, peaking in September.
See also
List of mountains in Thailand
References
External links
Phu Thap Boek paragliding
Phu Thap Boek photos
Geography of Phetchabun province
Mountains of Thailand
Phetchabun Mountains
|
```c
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "stdlib/math/base/special/clampf.h"
#include "stdlib/math/base/napi/ternary.h"
STDLIB_MATH_BASE_NAPI_MODULE_FFF_F( stdlib_base_clampf )
```
|
Old Goucher College Buildings is a national historic district in Baltimore, Maryland, United States. It is an approximate 18-block area in the middle of Baltimore which developed in the late 19th and 20th centuries.
The neighborhood is characterized generally by two- and three-story brick row houses constructed mostly in the 19th century and several large-scale institutional and commercial buildings dating from both centuries. Stylistically, the area is characterized primarily by Italianate, Romanesque, Colonial Revival, and Art Deco influences.
The area once served as a campus for the Women's College of Baltimore, now Goucher College, until the school relocated to Towson. The school was named for clergyman John Goucher, who once served as a pastor at Lovely Lane Church.The district includes a series of large scale, multiple story brick and stone structures built for college. Three buildings designed by the nationally famous architect Stanford White are found here.
It was added to the National Register of Historic Places in 1978. The former main campus building has been converted into the Baltimore Lab School, and many of the other structures have been re-purposed for commercial and residential use. The site has been the focus of a number of preservation efforts by local advocacy groups.
External links
, including undated photo, at Maryland Historical Trust
Boundary Map of the Old Goucher College Historic District, Baltimore City, at Maryland Historical Trust
References
Historic districts in Baltimore
School buildings on the National Register of Historic Places in Baltimore
University and college buildings on the National Register of Historic Places in Maryland
|
Mary Butler may refer to:
Lady Mary Butler (1689–1713), second daughter of the 2nd Duke of Ormonde
Mary E.L. Butler (1874–1920), Irish writer and Irish-language activist
Mary Joseph Butler (1641–1723), Irish abbess
Mary Butler (politician) (born 1963), Irish politician
Mary Anne Butler, Australian playwright
Mary Hawkins Butler (born 1953), mayor of Madison, Mississippi
Mary Butler, Duchess of Ormonde (1664–1733)
Mary Butler Lewis, (1903–1970), American anthropologist and archeologist
|
```ruby
class IkeScan < Formula
desc "Discover and fingerprint IKE hosts"
homepage "path_to_url"
url "path_to_url"
sha256 your_sha256_hash
license "GPL-3.0-or-later" => { with: "openvpn-openssl-exception" }
head "path_to_url", branch: "master"
bottle do
rebuild 1
sha256 arm64_sonoma: your_sha256_hash
sha256 arm64_ventura: your_sha256_hash
sha256 arm64_monterey: your_sha256_hash
sha256 arm64_big_sur: your_sha256_hash
sha256 sonoma: your_sha256_hash
sha256 ventura: your_sha256_hash
sha256 monterey: your_sha256_hash
sha256 big_sur: your_sha256_hash
sha256 catalina: your_sha256_hash
sha256 x86_64_linux: your_sha256_hash
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "openssl@3"
def install
system "autoreconf", "--force", "--install", "--verbose"
system "./configure", *std_configure_args,
"--mandir=#{man}",
"--with-openssl=#{Formula["openssl@3"].opt_prefix}"
system "make", "install"
end
test do
# We probably shouldn't probe any host for VPN servers, so let's keep this simple.
system bin/"ike-scan", "--version"
end
end
```
|
Harby is a village and civil parish in the Newark and Sherwood district of Nottinghamshire, England. It is close to the Lincolnshire border with Doddington. According to the 2011 census, it had a population of 336, up from 289 at the 2001 census.
Heritage
Eleanor of Castile
The parish church of All Saints' was built in 1875–1876 in Early English style. In the east wall of the tower is a statue in memory of Eleanor of Castile, Queen Consort of King Edward I of England. She died at the nearby house of Richard de Weston on 28 November 1290. The moated site of Weston's house is to the west of the church. The Queen's body was transported to London for burial. The King ordered Eleanor crosses to be built at each place where her body had rested overnight on the journey.
Windmills
The capless stump of a five-storey tower windmill, built about 1877, stands at the end of Mill Field Close (). A post mill was also recorded for Harby.
Parish change
Harby was a township in the parish of North Clifton. It became a separate parish in 1866.
Education and amenities
The village is served by Queen Eleanor Primary School. There is a term-time school bus from Harby to Tuxford Academy.
A pre-booking bus service No. 67 of about three services a day serves Newark, Collingham and Saxilby on Mondays to Saturdays. The nearest railway station is at Saxilby on the Doncaster–Lincoln line.
The village has a playing field with a bowls club and a children's play park. The village hall has two rooms for hire to groups, courses and circles. There is another room for hire at the local pub, the Bottle and Glass, which also serves food. Residents can rent allotments from the parish council. There are no permanent retail shopping facilities in the village.
See also
Listed buildings in Harby, Nottinghamshire
References
Villages in Nottinghamshire
Civil parishes in Nottinghamshire
Newark and Sherwood
|
```xml
import {Component, inject} from '@angular/core';
import {MatSnackBar} from '@angular/material/snack-bar';
import {MatButtonModule} from '@angular/material/button';
import {MatInputModule} from '@angular/material/input';
import {MatFormFieldModule} from '@angular/material/form-field';
/**
* @title Basic snack-bar
*/
@Component({
selector: 'snack-bar-overview-example',
templateUrl: 'snack-bar-overview-example.html',
styleUrl: 'snack-bar-overview-example.css',
standalone: true,
imports: [MatFormFieldModule, MatInputModule, MatButtonModule],
})
export class SnackBarOverviewExample {
private _snackBar = inject(MatSnackBar);
openSnackBar(message: string, action: string) {
this._snackBar.open(message, action);
}
}
```
|
```smalltalk
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Foundation;
using UIKit;
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
using PageUIStatusBarAnimation = Xamarin.Forms.PlatformConfiguration.iOSSpecific.UIStatusBarAnimation;
using PageSpecific = Xamarin.Forms.PlatformConfiguration.iOSSpecific.Page;
namespace Xamarin.Forms.Platform.iOS
{
public class PageRenderer : UIViewController, IVisualElementRenderer, IEffectControlProvider, IAccessibilityElementsController, IShellContentInsetObserver, IDisconnectable
{
bool _appeared;
bool _disposed;
EventTracker _events;
VisualElementPackager _packager;
VisualElementTracker _tracker;
// storing this into a local variable causes it to not get collected. Do not delete this please
PageContainer _pageContainer;
internal PageContainer Container => NativeView as PageContainer;
Page Page => Element as Page;
IAccessibilityElementsController AccessibilityElementsController => this;
Thickness SafeAreaInsets => Page.On<PlatformConfiguration.iOS>().SafeAreaInsets();
bool IsPartOfShell => (Element?.Parent is BaseShellItem || (
Element?.Parent is TabbedPage && Element?.Parent?.Parent is BaseShellItem));
ShellSection _shellSection;
bool _safeAreasSet = false;
Thickness _userPadding = default(Thickness);
bool _userOverriddenSafeArea = false;
[Preserve(Conditional = true)]
public PageRenderer()
{
}
void IEffectControlProvider.RegisterEffect(Effect effect)
{
VisualElementRenderer<VisualElement>.RegisterEffect(effect, NativeView);
}
public VisualElement Element { get; private set; }
public event EventHandler<VisualElementChangedEventArgs> ElementChanged;
public List<NSObject> GetAccessibilityElements()
{
if (Container == null || Element == null)
return null;
SortedDictionary<int, List<ITabStopElement>> tabIndexes = null;
foreach (var child in Element.LogicalChildren)
{
if (!(child is VisualElement ve))
continue;
tabIndexes = ve.GetSortedTabIndexesOnParentPage();
break;
}
if (tabIndexes == null)
return null;
// Just return all elements on the page in order.
if (tabIndexes.Count <= 1)
return null;
var views = new List<NSObject>();
foreach (var idx in tabIndexes?.Keys)
{
var tabGroup = tabIndexes[idx];
foreach (var child in tabGroup)
{
if (!(child is VisualElement ve && ve.GetRenderer()?.NativeView is UIView view))
continue;
UIView thisControl = null;
if (view is ITabStop tabStop)
thisControl = tabStop.TabStop;
if (thisControl == null)
continue;
if (views.Contains(thisControl))
break; // we've looped to the beginning
views.Add(thisControl);
}
}
return views;
}
public SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint)
{
return NativeView.GetSizeRequest(widthConstraint, heightConstraint);
}
public UIView NativeView
{
get { return _disposed ? null : View; }
}
public void SetElement(VisualElement element)
{
VisualElement oldElement = Element;
Element = element;
UpdateTitle();
OnElementChanged(new VisualElementChangedEventArgs(oldElement, element));
if (element != null)
{
if (!string.IsNullOrEmpty(element.AutomationId))
SetAutomationId(element.AutomationId);
element.SendViewInitialized(NativeView);
var parent = Element.Parent;
while (!Application.IsApplicationOrNull(parent))
{
if (parent is ShellContent)
_isInItems = true;
if (parent is ShellSection shellSection)
{
_shellSection = shellSection;
((IShellSectionController)_shellSection).AddContentInsetObserver(this);
break;
}
parent = parent.Parent;
}
}
EffectUtilities.RegisterEffectControlProvider(this, oldElement, element);
}
public void SetElementSize(Size size)
{
// In Split Mode the Frame will occasionally get set to the wrong value
var rect = new CoreGraphics.CGRect(Element.X, Element.Y, size.Width, size.Height);
if (rect != _pageContainer.Frame)
_pageContainer.Frame = rect;
Element.Layout(new Rectangle(Element.X, Element.Y, size.Width, size.Height));
}
public override void LoadView()
{
//by default use the MainScreen Bounds so Effects can access the Container size
if (_pageContainer == null)
{
var bounds = UIApplication.SharedApplication?.GetKeyWindow()?.Bounds ??
UIScreen.MainScreen.Bounds;
_pageContainer = new PageContainer(this) { Frame = bounds };
}
View = _pageContainer;
}
public override void ViewWillLayoutSubviews()
{
base.ViewWillLayoutSubviews();
Container?.ClearAccessibilityElements();
}
public override void ViewDidLayoutSubviews()
{
base.ViewDidLayoutSubviews();
if (_disposed || Element == null)
return;
if (Element.Parent is BaseShellItem)
Element.Layout(View.Bounds.ToRectangle());
if (_safeAreasSet || !Forms.IsiOS11OrNewer)
UpdateUseSafeArea();
if (Element.Background != null && !Element.Background.IsEmpty)
NativeView?.UpdateBackgroundLayer();
}
public override void ViewSafeAreaInsetsDidChange()
{
_safeAreasSet = true;
UpdateUseSafeArea();
base.ViewSafeAreaInsetsDidChange();
}
public UIViewController ViewController => _disposed ? null : this;
public override void ViewDidAppear(bool animated)
{
base.ViewDidAppear(animated);
if (_appeared || _disposed || Element == null)
return;
_appeared = true;
UpdateStatusBarPrefersHidden();
if (Forms.RespondsToSetNeedsUpdateOfHomeIndicatorAutoHidden)
SetNeedsUpdateOfHomeIndicatorAutoHidden();
if (Element.Parent is CarouselPage)
return;
Page.SendAppearing();
}
public override void ViewDidDisappear(bool animated)
{
base.ViewDidDisappear(animated);
if (!_appeared || _disposed || Element == null)
return;
_appeared = false;
if (Element.Parent is CarouselPage)
return;
Page.SendDisappearing();
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
if (NativeView == null)
return;
var uiTapGestureRecognizer = new UITapGestureRecognizer(a => NativeView?.EndEditing(true));
uiTapGestureRecognizer.ShouldRecognizeSimultaneously = (recognizer, gestureRecognizer) => true;
uiTapGestureRecognizer.ShouldReceiveTouch = OnShouldReceiveTouch;
uiTapGestureRecognizer.DelaysTouchesBegan =
uiTapGestureRecognizer.DelaysTouchesEnded = uiTapGestureRecognizer.CancelsTouchesInView = false;
NativeView.AddGestureRecognizer(uiTapGestureRecognizer);
UpdateBackground();
_packager = new VisualElementPackager(this);
_packager.Load();
Element.PropertyChanged += OnHandlePropertyChanged;
_tracker = new VisualElementTracker(this, !(Element.Parent is BaseShellItem));
_events = new EventTracker(this);
_events.LoadEvents(NativeView);
Element.SendViewInitialized(NativeView);
}
public override void ViewWillDisappear(bool animated)
{
base.ViewWillDisappear(animated);
NativeView?.Window?.EndEditing(true);
}
void IDisconnectable.Disconnect()
{
if (_shellSection != null)
{
((IShellSectionController)_shellSection).RemoveContentInsetObserver(this);
_shellSection = null;
}
if (Element != null)
{
Element.PropertyChanged -= OnHandlePropertyChanged;
Platform.SetRenderer(Element, null);
if (_appeared)
Page.SendDisappearing();
Element = null;
}
_events?.Disconnect();
_packager?.Disconnect();
_tracker?.Disconnect();
}
protected override void Dispose(bool disposing)
{
if (_disposed)
return;
if (disposing)
{
(this as IDisconnectable).Disconnect();
_events?.Dispose();
_packager?.Dispose();
_tracker?.Dispose();
_events = null;
_packager = null;
_tracker = null;
Element = null;
Container?.Dispose();
_pageContainer = null;
}
_disposed = true;
base.Dispose(disposing);
}
protected virtual void OnElementChanged(VisualElementChangedEventArgs e)
{
ElementChanged?.Invoke(this, e);
}
protected virtual void SetAutomationId(string id)
{
if (NativeView != null)
NativeView.AccessibilityIdentifier = id;
}
void OnHandlePropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || e.PropertyName == VisualElement.BackgroundProperty.PropertyName)
UpdateBackground();
else if (e.PropertyName == Page.BackgroundImageSourceProperty.PropertyName)
UpdateBackground();
else if (e.PropertyName == Page.TitleProperty.PropertyName)
UpdateTitle();
else if (e.PropertyName == PlatformConfiguration.iOSSpecific.Page.PrefersStatusBarHiddenProperty.PropertyName)
UpdateStatusBarPrefersHidden();
else if (Forms.IsiOS11OrNewer && e.PropertyName == PlatformConfiguration.iOSSpecific.Page.UseSafeAreaProperty.PropertyName)
{
_userOverriddenSafeArea = false;
UpdateUseSafeArea();
}
else if (Forms.IsiOS11OrNewer && e.PropertyName == PlatformConfiguration.iOSSpecific.Page.SafeAreaInsetsProperty.PropertyName)
UpdateUseSafeArea();
else if (e.PropertyName == PlatformConfiguration.iOSSpecific.Page.PrefersHomeIndicatorAutoHiddenProperty.PropertyName)
UpdateHomeIndicatorAutoHidden();
else if (e.PropertyName == Page.PaddingProperty.PropertyName)
{
if (ShouldUseSafeArea() && Page.Padding != SafeAreaInsets)
_userOverriddenSafeArea = true;
}
}
public override UIKit.UIStatusBarAnimation PreferredStatusBarUpdateAnimation
{
get
{
var animation = Page.OnThisPlatform().PreferredStatusBarUpdateAnimation();
switch (animation)
{
case (PageUIStatusBarAnimation.Fade):
return UIKit.UIStatusBarAnimation.Fade;
case (PageUIStatusBarAnimation.Slide):
return UIKit.UIStatusBarAnimation.Slide;
case (PageUIStatusBarAnimation.None):
default:
return UIKit.UIStatusBarAnimation.None;
}
}
}
public override void TraitCollectionDidChange(UITraitCollection previousTraitCollection)
{
base.TraitCollectionDidChange(previousTraitCollection);
if (Forms.IsiOS13OrNewer &&
previousTraitCollection.UserInterfaceStyle != TraitCollection.UserInterfaceStyle &&
UIApplication.SharedApplication.ApplicationState != UIApplicationState.Background)
Application.Current?.TriggerThemeChanged(new AppThemeChangedEventArgs(Application.Current.RequestedTheme));
}
bool ShouldUseSafeArea()
{
bool usingSafeArea = Page.On<PlatformConfiguration.iOS>().UsingSafeArea();
bool isSafeAreaSet = Element.IsSet(PageSpecific.UseSafeAreaProperty);
if (IsPartOfShell && !isSafeAreaSet)
usingSafeArea = true;
return usingSafeArea;
}
void UpdateUseSafeArea()
{
if (Element == null)
return;
if (_userOverriddenSafeArea)
return;
if (!IsPartOfShell && !Forms.IsiOS11OrNewer)
return;
var tabThickness = _tabThickness;
if (!_isInItems)
tabThickness = 0;
Thickness safeareaPadding = default(Thickness);
if (Page.Padding != SafeAreaInsets)
_userPadding = Page.Padding;
if (Forms.IsiOS11OrNewer)
{
var insets = NativeView.SafeAreaInsets;
if (Page.Parent is TabbedPage)
{
insets.Bottom = 0;
}
safeareaPadding = new Thickness(insets.Left, insets.Top + tabThickness, insets.Right, insets.Bottom);
Page.On<PlatformConfiguration.iOS>().SetSafeAreaInsets(safeareaPadding);
}
else if (IsPartOfShell)
{
safeareaPadding = new Thickness(0, TopLayoutGuide.Length + tabThickness, 0, BottomLayoutGuide.Length);
Page.On<PlatformConfiguration.iOS>().SetSafeAreaInsets(safeareaPadding);
}
bool usingSafeArea = Page.On<PlatformConfiguration.iOS>().UsingSafeArea();
bool isSafeAreaSet = Element.IsSet(PageSpecific.UseSafeAreaProperty);
if (IsPartOfShell && !isSafeAreaSet)
{
if (Shell.GetNavBarIsVisible(Element) || _tabThickness != default(Thickness))
usingSafeArea = true;
}
if (!usingSafeArea && isSafeAreaSet && Page.Padding == safeareaPadding)
{
Page.SetValueFromRenderer(Page.PaddingProperty, _userPadding);
}
if (!usingSafeArea)
return;
if (SafeAreaInsets == Page.Padding)
return;
// this is determining if there is a UIScrollView control occupying the whole screen
if (IsPartOfShell && !isSafeAreaSet)
{
var subViewSearch = View;
for (int i = 0; i < 2 && subViewSearch != null; i++)
{
if (subViewSearch?.Subviews.Length > 0)
{
if (subViewSearch.Subviews[0] is UIScrollView)
return;
subViewSearch = subViewSearch.Subviews[0];
}
else
{
subViewSearch = null;
}
}
}
Page.SetValueFromRenderer(Page.PaddingProperty, SafeAreaInsets);
}
void UpdateStatusBarPrefersHidden()
{
if (Element == null)
return;
var animation = Page.OnThisPlatform().PreferredStatusBarUpdateAnimation();
if (animation == PageUIStatusBarAnimation.Fade || animation == PageUIStatusBarAnimation.Slide)
UIView.Animate(0.25, () => SetNeedsStatusBarAppearanceUpdate());
else
SetNeedsStatusBarAppearanceUpdate();
NativeView?.SetNeedsLayout();
}
bool OnShouldReceiveTouch(UIGestureRecognizer recognizer, UITouch touch)
{
foreach (UIView v in ViewAndSuperviewsOfView(touch.View))
{
if (v != null && (v is UITableView || v is UITableViewCell || v.CanBecomeFirstResponder))
return false;
}
return true;
}
public override bool PrefersStatusBarHidden()
{
var mode = Page.OnThisPlatform().PrefersStatusBarHidden();
switch (mode)
{
case (StatusBarHiddenMode.True):
return true;
case (StatusBarHiddenMode.False):
return false;
case (StatusBarHiddenMode.Default):
default:
return base.PrefersStatusBarHidden();
}
}
void UpdateBackground()
{
if (NativeView == null)
return;
_ = this.ApplyNativeImageAsync(Page.BackgroundImageSourceProperty, bgImage =>
{
if (NativeView == null)
return;
if (bgImage != null)
NativeView.BackgroundColor = UIColor.FromPatternImage(bgImage);
else
{
Brush background = Element.Background;
if (!Brush.IsNullOrEmpty(background))
NativeView.UpdateBackground(Element.Background);
else
{
Color backgroundColor = Element.BackgroundColor;
if (backgroundColor.IsDefault)
NativeView.BackgroundColor = ColorExtensions.BackgroundColor;
else
NativeView.BackgroundColor = Element.BackgroundColor.ToUIColor();
}
}
});
}
void UpdateTitle()
{
if (!string.IsNullOrWhiteSpace(Page.Title))
NavigationItem.Title = Page.Title;
}
IEnumerable<UIView> ViewAndSuperviewsOfView(UIView view)
{
while (view != null)
{
yield return view;
view = view.Superview;
}
}
void UpdateHomeIndicatorAutoHidden()
{
if (Element == null || !Forms.RespondsToSetNeedsUpdateOfHomeIndicatorAutoHidden)
return;
SetNeedsUpdateOfHomeIndicatorAutoHidden();
}
double _tabThickness;
bool _isInItems;
void IShellContentInsetObserver.OnInsetChanged(Thickness inset, double tabThickness)
{
if (_tabThickness != tabThickness)
{
_safeAreasSet = true;
_tabThickness = tabThickness;
UpdateUseSafeArea();
}
}
public override bool PrefersHomeIndicatorAutoHidden => Page.OnThisPlatform().PrefersHomeIndicatorAutoHidden();
}
}
```
|
```c++
//
// 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 NVIDIA CORPORATION nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
//
#include "DyThreadContext.h"
#include "PsBitUtils.h"
namespace physx
{
namespace Dy
{
ThreadContext::ThreadContext(PxcNpMemBlockPool* memBlockPool):
mFrictionPatchStreamPair(*memBlockPool),
mConstraintBlockManager (*memBlockPool),
mConstraintBlockStream (*memBlockPool),
mNumDifferentBodyConstraints(0),
mNumSelfConstraints(0),
mNumSelfConstraintBlocks(0),
mConstraintsPerPartition(PX_DEBUG_EXP("ThreadContext::mConstraintsPerPartition")),
mFrictionConstraintsPerPartition(PX_DEBUG_EXP("ThreadContext::frictionsConstraintsPerPartition")),
mPartitionNormalizationBitmap(PX_DEBUG_EXP("ThreadContext::mPartitionNormalizationBitmap")),
frictionConstraintDescArray(PX_DEBUG_EXP("ThreadContext::solverFrictionConstraintArray")),
frictionConstraintBatchHeaders(PX_DEBUG_EXP("ThreadContext::frictionConstraintBatchHeaders")),
compoundConstraints(PX_DEBUG_EXP("ThreadContext::compoundConstraints")),
orderedContactList(PX_DEBUG_EXP("ThreadContext::orderedContactList")),
tempContactList(PX_DEBUG_EXP("ThreadContext::tempContactList")),
sortIndexArray(PX_DEBUG_EXP("ThreadContext::sortIndexArray")),
mConstraintSize (0),
mAxisConstraintCount(0),
mSelfConstraintBlocks(NULL),
mMaxPartitions(0),
mMaxSolverPositionIterations(0),
mMaxSolverVelocityIterations(0),
mMaxArticulationLength(0),
mContactDescPtr(NULL),
mFrictionDescPtr(NULL),
mArticulations(PX_DEBUG_EXP("ThreadContext::articulations"))
{
#if PX_ENABLE_SIM_STATS
mThreadSimStats.clear();
#endif
//Defaulted to have space for 16384 bodies
mPartitionNormalizationBitmap.reserve(512);
//Defaulted to have space for 128 partitions (should be more-than-enough)
mConstraintsPerPartition.reserve(128);
}
void ThreadContext::resizeArrays(PxU32 frictionConstraintDescCount, PxU32 articulationCount)
{
// resize resizes smaller arrays to the exact target size, which can generate a lot of churn
frictionConstraintDescArray.forceSize_Unsafe(0);
frictionConstraintDescArray.reserve((frictionConstraintDescCount+63)&~63);
mArticulations.forceSize_Unsafe(0);
mArticulations.reserve(PxMax<PxU32>(Ps::nextPowerOfTwo(articulationCount), 16));
mArticulations.forceSize_Unsafe(articulationCount);
mContactDescPtr = contactConstraintDescArray;
mFrictionDescPtr = frictionConstraintDescArray.begin();
}
void ThreadContext::reset()
{
// TODO: move these to the PxcNpThreadContext
mFrictionPatchStreamPair.reset();
mConstraintBlockStream.reset();
mContactDescPtr = contactConstraintDescArray;
mFrictionDescPtr = frictionConstraintDescArray.begin();
mAxisConstraintCount = 0;
mMaxSolverPositionIterations = 0;
mMaxSolverVelocityIterations = 0;
mNumDifferentBodyConstraints = 0;
mNumSelfConstraints = 0;
mSelfConstraintBlocks = NULL;
mNumSelfConstraintBlocks = 0;
mConstraintSize = 0;
}
}
}
```
|
```objective-c
/*++
version 3. Alternative licensing terms are available. Contact
info@minocacorp.com for details. See the LICENSE file at the root of this
project for complete licensing information.
Module Name:
diskio.h
Abstract:
This header contains definitions for the UEFI Disk I/O Protocol.
Author:
Evan Green 19-Mar-2014
--*/
//
// your_sha256_hash--- Includes
//
//
// your_sha256_hash Definitions
//
#define EFI_DISK_IO_PROTOCOL_GUID \
{ \
0xCE345171, 0xBA0B, 0x11D2, \
{0x8E, 0x4F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} \
}
//
// Protocol GUID name defined in EFI1.1.
//
#define DISK_IO_PROTOCOL EFI_DISK_IO_PROTOCOL_GUID
#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000
//
// Revision defined in EFI1.1
//
#define EFI_DISK_IO_INTERFACE_REVISION EFI_DISK_IO_PROTOCOL_REVISION
//
// ------------------------------------------------------ Data Type Definitions
//
typedef struct _EFI_DISK_IO_PROTOCOL EFI_DISK_IO_PROTOCOL;
//
// Protocol defined in EFI1.1.
//
typedef EFI_DISK_IO_PROTOCOL EFI_DISK_IO;
typedef
EFI_STATUS
(EFIAPI *EFI_DISK_READ) (
EFI_DISK_IO_PROTOCOL *This,
UINT32 MediaId,
UINT64 Offset,
UINTN BufferSize,
VOID *Buffer
);
/*++
Routine Description:
This routine reads bytes from the disk.
Arguments:
This - Supplies the protocol instance.
MediaId - Supplies the ID of the media, which changes every time the media
is replaced.
Offset - Supplies the starting byte offset to read from.
BufferSize - Supplies the size of the given buffer.
Buffer - Supplies a pointer where the read data will be returned.
Return Value:
EFI_SUCCESS if all data was successfully read.
EFI_DEVICE_ERROR if a hardware error occurred while performing the
operation.
EFI_NO_MEDIA if there is no media in the device.
EFI_MEDIA_CHANGED if the current media ID doesn't match the one passed in.
EFI_INVALID_PARAMETER if the offset is invalid.
--*/
typedef
EFI_STATUS
(EFIAPI *EFI_DISK_WRITE) (
EFI_DISK_IO_PROTOCOL *This,
UINT32 MediaId,
UINT64 Offset,
UINTN BufferSize,
VOID *Buffer
);
/*++
Routine Description:
This routine writes bytes to the disk.
Arguments:
This - Supplies the protocol instance.
MediaId - Supplies the ID of the media, which changes every time the media
is replaced.
Offset - Supplies the starting byte offset to write to.
BufferSize - Supplies the size of the given buffer.
Buffer - Supplies a pointer containing the data to write.
Return Value:
EFI_SUCCESS if all data was successfully written.
EFI_WRITE_PROTECTED if the device cannot be written to.
EFI_DEVICE_ERROR if a hardware error occurred while performing the
operation.
EFI_NO_MEDIA if there is no media in the device.
EFI_MEDIA_CHANGED if the current media ID doesn't match the one passed in.
EFI_INVALID_PARAMETER if the offset is invalid.
--*/
/*++
Structure Description:
This structure defines the disk I/O protocol, used to abstract Block I/O
interfaces.
Members:
Revision - Stores the revision number. All future revisions are backwards
compatible.
ReadDisk - Stores a pointer to a function used to read from the disk.
WriteDisk - Stores a pointer to a function used to write to the disk.
--*/
struct _EFI_DISK_IO_PROTOCOL {
UINT64 Revision;
EFI_DISK_READ ReadDisk;
EFI_DISK_WRITE WriteDisk;
};
//
// your_sha256_hash---- Globals
//
//
// -------------------------------------------------------- Function Prototypes
//
```
|
A peace movement is a social movement which seeks to achieve ideals such as the ending of a particular war (or wars) or minimizing inter-human violence in a particular place or situation. They are often linked to the goal of achieving world peace. Some of the methods used to achieve these goals include advocacy of pacifism, nonviolent resistance, diplomacy, boycotts, peace camps, ethical consumerism, supporting anti-war political candidates, supporting legislation to remove profits from government contracts to the military–industrial complex, banning guns, creating tools for open government and transparency, direct democracy, supporting whistleblowers who expose war crimes or conspiracies to create wars, demonstrations, and political lobbying. The political cooperative is an example of an organization which seeks to merge all peace-movement and green organizations; they may have diverse goals, but have the common ideal of peace and humane sustainability. A concern of some peace activists is the challenge of attaining peace when those against peace often use violence as their means of communication and empowerment.
A global affiliation of activists and political interests viewed as having a shared purpose and constituting a single movement has been called "the peace movement," or an all-encompassing "anti-war movement". Seen from this perspective, they are often indistinguishable and constitute a loose, responsive, event-driven collaboration between groups motivated by humanism, environmentalism, veganism, anti-racism, feminism, decentralization, hospitality, ideology, theology, and faith.
The ideal of peace
Ideas differ about what "peace" is (or should be), which results in a number of movements seeking different ideals of peace. Although "anti-war" movements often have short-term goals, peace movements advocate an ongoing lifestyle and a proactive government policy.
It is often unclear whether a movement, or a particular protest, is against war in general or against one's government's participation in a war. This lack of clarity (or long-term continuity) has been part of the strategy of those seeking to end a war, such as the Vietnam War.
Global protests against the U.S. invasion of Iraq in early 2003 are an example of a specific, short-term, loosely affiliated single-issue "movement" consisting of relatively-scattered ideological priorities ranging from pacifism to Islamism and Anti-Americanism. Those involved in multiple, similar short-term movements develop trust relationships with other participants, and tend to join more-global, long-term movements.
Elements of the global peace movement seek to guarantee health security by ending war and ensure what they view as basic human rights, including the right of all people to have access to clean air, water, food, shelter and health care. Activists seek social justice in the form of equal protection and equal opportunity under the law for groups which had been disenfranchised.
The peace movement is characterized by the belief that humans should not wage war or engage in ethnic cleansing about language, race, or natural resources, or engage in ethical conflict over religion or ideology. Long-term opponents of war are characterized by the belief that military power does not equal justice.
The peace movement opposes the proliferation of dangerous technology and weapons of mass destruction, particularly nuclear weapons and biological warfare. Many adherents object to the export of weapons (including hand-held machine guns and grenades) by leading economic nations to developing countries. The Stockholm International Peace Research Institute has voiced a concern that artificial intelligence, molecular engineering, genetics and proteomics have destructive potential. The peace movement intersects with Neo-Luddism and primitivism, and with mainstream critics such as Green parties, Greenpeace and the environmental movement.
These movements led to the formation of Green parties in a number of democratic countries in the late 20th century. The peace movement has influenced these parties in countries such as Germany.
History
Peace and Truce of God
The first mass peace movements were the Peace of God (, proclaimed in AD 989 at the Council of Charroux) and the Truce of God, which was proclaimed in 1027. The Peace of God was spearheaded by bishops as a response to increasing violence against monasteries after the fall of the Carolingian dynasty. The movement was promoted at a number of subsequent church councils, including Charroux (989 and c. 1028), Narbonne (990), Limoges (994 and 1031), Poitiers (c. 1000), and Bourges (1038). The Truce of God sought to restrain violence by limiting the number of days of the week and times of the year when the nobility was able to employ violence. These peace movements "set the foundations for modern European peace movements."
Peace churches
The Reformation gave rise to a number of Protestant sects beginning in the 16th century, including the peace churches. Foremost among these churches were the Religious Society of Friends (Quakers), Amish, Mennonites, and the Church of the Brethren. The Quakers were prominent advocates of pacifism, who had repudiated all forms of violence and adopted a pacifist interpretation of Christianity as early as 1660. Throughout the 18th-century wars in which Britain participated, the Quakers maintained a principled commitment not to serve in an army or militia and not pay the alternative £10 fine.
18th century
The major 18th-century peace movements were products of two schools of thought which coalesced at the end of the century. One, rooted in the secular Age of Enlightenment, promoted peace as the rational antidote to the world's ills; the other was part of the evangelical religious revival which had played an important role in the campaign for the abolition of slavery. Representatives of the former included Jean-Jacques Rousseau, in Extrait du Projet de Paix Perpetuelle de Monsieur l'Abbe Saint-Pierre (1756); Immanuel Kant in Thoughts on Perpetual Peace, and Jeremy Bentham, who proposed the formation of a peace association in 1789. One representative of the latter was William Wilberforce; Wilberforce thought that by following the Christian ideals of peace and brotherhood, strict limits should be imposed on British involvement in the French Revolutionary Wars.
19th century
During the Napoleonic Wars (1793-1814), no formal peace movement was established in Britain until hostilities ended. A significant grassroots peace movement, animated by universalist ideals, emerged from the perception that Britain fought in a reactionary role and the increasingly visible impact of the war on the nation's welfare in the form of higher taxes and casualties. Sixteen peace petitions to Parliament were signed by members of the public; anti-war and anti-Pitt demonstrations were held, and peace literature was widely disseminated.
The first formal peace movements appeared in 1815 and 1816. The first movement in the United States was the New York Peace Society, founded in 1815 by theologian David Low Dodge, followed by the Massachusetts Peace Society. The groups merged into the American Peace Society, which held weekly meetings and produced literature that was spread as far as Gibraltar and Malta describing the horrors of war and advocating pacifism on Christian grounds. The London Peace Society, also known as the Society for the Promotion of Permanent and Universal Peace, was formed by philanthropist William Allen in 1816 to promote permanent, universal peace. During the 1840s, British women formed 15-to-20 person "Olive Leaf Circles" to discuss and promote pacifist ideas.
The London Peace Society's influence began to grow during the mid-nineteenth century. Under Elihu Burritt and Henry Richard, the society convened the first International Peace Congress in London in 1843. The congress decided on two goals: to achieve the ideal of peaceable arbitration of the affairs of nations, and to create an international institution to achieve it. Richard became the society's full-time secretary in 1850; he held the position for the next 40 years, and became known as the "Apostle of Peace". He helped secure one of the peace movement's earliest victories by securing a commitment for arbitration from the Great Powers in the Treaty of Paris (1856) at the end of the Crimean War. Wracked by social upheaval, the first peace congress on the European continent was held in Brussels in 1848; a second was held in Paris a year later.
By the 1850s, these movements were becoming well organized in the major countries of Europe and North America, reaching middle-class activists beyond the range of the earlier religious connections.
Support decreased during the resurgence of militarism during the American Civil War and the Crimean War, the movement began to spread across Europe and infiltrate fledgling working-class socialist movements. In 1870, Randal Cremer formed the Workman's Peace Association in London. Cremer and the French economist Frédéric Passy were the founding fathers of the Inter-Parliamentary Union, the first international organization for the arbitration of conflicts, in 1889. The National Peace Council was founded after the 17th Universal Peace Congress in London in July and August 1908.
In the Austro-Hungarian Empire, the novelist Baroness Bertha von Suttner (1843–1914) after 1889 became a leading figure in the peace movement with the publication of her pacifist novel, Die Waffen nieder! (Lay Down Your Arms!). The book was published in 37 editions and translated into 12 languages. She helped organize the German Peace Society and became known internationally as the editor of the international pacifist journal Die Waffen nieder! In 1905 she became the first woman to win a Nobel Peace Prize.
Mahatma Gandhi and nonviolent resistance
Mahatma Gandhi (1869–1948) was one of the 20th century's most influential spokesmen for peace and non-violence, and Gandhism is his body of ideas and principles Gandhi promoted. One of its most important concepts is nonviolent resistance. According to M. M. Sankhdher, Gandhism is not a systematic position in metaphysics or political philosophy but a political creed, an economic doctrine, a religious outlook, a moral precept, and a humanitarian worldview. An effort not to systematize wisdom but to transform society, it is based on faith in the goodness of human nature.
Gandhi was strongly influenced by the pacifism of Leo Tolstoy. Tolstoy wrote A Letter to a Hindu in 1908, which said that the Indian people could overthrow colonial rule only through passive resistance. In 1909, Gandhi and Tolstoy began a correspondence about the practical and theological applications of nonviolence. Gandhi saw himself as a disciple of Tolstoy because they agreed on the issues of opposition to state authority and colonialism, loathed violence, and preached non-resistance. However, they differed on political strategy. Gandhi called for political involvement; a nationalist, he was prepared to use nonviolent force but was also willing to compromise.
Gandhi was the first person to apply the principle of nonviolence on a large scale. The concepts of nonviolence (ahimsa) and nonresistance have a long history in Indian religious and philosophical thought, and have had a number of revivals in Hindu, Buddhist, Jain, Jewish and Christian contexts. Gandhi explained his philosophy and way of life in his autobiography, The Story of My Experiments with Truth. Some of his remarks were widely quoted, such as "There are many causes that I am prepared to die for, but no causes that I am prepared to kill for."
Gandhi later realized that a high level of nonviolence required great faith and courage, which not everyone possessed. He advised that everyone need not strictly adhere to nonviolence, especially if it was a cover for cowardice: "Where there is only a choice between cowardice and violence, I would advise violence."
Gandhi came under political fire for his criticism of those who attempted to achieve independence through violence. He responded, "There was a time when people listened to me because I showed them how to give fight to the British without arms when they had no arms ... but today I am told that my non-violence can be of no avail against the Hindu–Moslem riots; therefore, people should arm themselves for self-defense."
Gandhi's views were criticized in Britain during the Battle of Britain. He told the British people in 1940, "I would like you to lay down the arms you have as being useless for saving you or humanity. You will invite Herr Hitler and Signor Mussolini to take what they want of the countries you call your possessions ... If these gentlemen choose to occupy your homes, you will vacate them. If they do not give you free passage out, you will allow yourselves man, woman, and child to be slaughtered, but you will refuse to owe allegiance to them."
World War I
Although the onset of the First World War was generally greeted with enthusiastic patriotism across Europe, peace groups were active in condemning the war. Many socialist groups and movements were antimilitarist. They argued that by its nature, war was a type of governmental coercion of the working class for the benefit of capitalist elites.
In 1915, the League of Nations Society was formed by British liberal leaders to promote a strong international organization which could enforce peaceful conflict resolution. Later that year, the League to Enforce Peace was established in the United States to promote similar goals. Hamilton Holt published "The Way to Disarm: A Practical Proposal", an editorial in the Independent (his New York City weekly magazine) on September 28, 1914. The editorial called for an international organization to agree on the arbitration of disputes and guarantee the territorial integrity of its members by maintaining military forces sufficient to defeat those of any non-member. The ensuing debate among prominent internationalists modified Holt's plan to align it more closely with proposals in Great Britain put forth by Viscount James Bryce, a former ambassador from the U.K. to the U.S. These and other initiatives were pivotal to the attitude changes which gave rise to the League of Nations after the war. In addition to the peace churches, groups which protested against the war included the Woman's Peace Party (organized in 1915 and led by Jane Addams), the International Committee of Women for Permanent Peace (ICWPP) (also organized in 1915), the American Union Against Militarism, the Fellowship of Reconciliation, and the American Friends Service Committee. Jeannette Rankin (the first woman elected to Congress) was another advocate of pacifism, and the only person to vote "no" on the U.S. entrance into both world wars.
Henry Ford
Peace promotion was a major activity of American automaker and philanthropist Henry Ford (1863-1947). He set up a $1 million fund to promote peace, and published numerous antiwar articles and ads in hundreds of newspapers.
According to biographer Steven Watts, Ford's status as a leading industrialist gave him a worldview that warfare was wasteful folly that retarded long-term economic growth. The losing side in the war typically suffered heavy damage. Small business were especially hurt, for it takes years to recuperate. He argued in many newspaper articles that capitalism would discourage warfare because, “If every man who manufactures an article would make the very best he can in the very best way at the very lowest possible price the world would be kept out of war, for commercialists would not have to search for outside markets which the other fellow covets.” Ford admitted that munitions makers enjoyed wars, but he argued the typical capitalist wanted to avoid wars to concentrate on manufacturing and selling what people wanted, hiring good workers, and generating steady long-term profits.
In late 1915, Ford sponsored and funded a Peace Ship to Europe, to help end the raging World War. He brought 170 peace activists; Jane Addams was a key supporter who became too ill to join him. Ford talked to President Woodrow Wilson about the mission but had no government support. His group met with peace activists in neutral Sweden and the Netherlands. A target of much ridicule, Ford left the ship as soon as it reached Sweden.
Interwar period
Organizations
A popular slogan was "merchants of death" alleging the promotion of war by armaments makers, based on a widely read nonfiction exposé Merchants of Death (1934), by H. C. Engelbrecht and F. C. Hanighen.
The immense loss of life during the First World War for what became known as futile reasons caused a sea-change in public attitudes to militarism. Organizations formed at this time included War Resisters' International, the Women's International League for Peace and Freedom, the No More War Movement, and the Peace Pledge Union (PPU). The League of Nations convened several disarmament conferences, such as the Geneva Conference. They achieved very little. However the Washington conference of 1921-1922 did successfully limit naval armaments of the major powers during the 1920s.
The Women's International League for Peace and Freedom helped convince the U.S. Senate to launch an influential investigation by the Nye Committee to the effect that the munitions industry and Wall Street financiers had promoted American entry into World War I to cover their financial investments. The immediate result was a series of laws imposing neutrality on American business if other countries went to war.
Novels and films
Pacifism and revulsion to war were popular sentiments in 1920s Britain. A number of novels and poems about the futility of war and the slaughter of youth by old fools were published, including Death of a Hero by Richard Aldington, Erich Maria Remarque's All Quiet on the Western Front and Beverley Nichols' Cry Havoc! A 1933 University of Oxford debate on the proposed motion that "one must fight for King and country" reflected the changed mood when the motion was defeated. Dick Sheppard established the Peace Pledge Union in 1934, renouncing war and aggression. The idea of collective security was also popular; instead of outright pacifism, the public generally exhibited a determination to stand up to aggression with economic sanctions and multilateral negotiations.
Spanish Civil War
The Spanish Civil War (1936–1939) was a major test of international pacifism, pacifist organizations (such as War Resisters' International and the Fellowship of Reconciliation), and individuals such as José Brocca and Amparo Poch. Activists on the left often put their pacifism on pause in order to help the war effort of the Spanish government. Shortly after the war ended, Simone Weil (despite volunteering for service on the Republican side) published The Iliad or the Poem of Force, which has been described as a pacifist manifesto. In response to the threat of fascism, pacifist thinkers such as Richard B. Gregg devised plans for a campaign of nonviolent resistance in the event of a fascist invasion or takeover.
World War II
At the beginning of World War II, pacifist and anti-war sentiment declined in nations affected by the war. The communist-controlled American Peace Mobilization reversed its anti-war activism, however, when Germany invaded the Soviet Union in 1941. Although mainstream isolationist groups such as the America First Committee declined after the Japanese attack on Pearl Harbor, a number of small religious and socialist groups continued their opposition to the war. Bertrand Russell said that the necessity of defeating Adolf Hitler and the Nazis was a unique circumstance in which war was not the worst possible evil, and called his position "relative pacifism". Albert Einstein wrote, "I loathe all armies and any kind of violence, yet I'm firmly convinced that at present these hateful weapons offer the only effective protection." French pacifists André and Magda Trocmé helped to conceal hundreds of Jews fleeing the Nazis in the village of Le Chambon-sur-Lignon. After the war, the Trocmés were declared Righteous Among the Nations.
Pacifists in Nazi Germany were treated harshly. German pacifist Carl von Ossietzky and Norwegian pacifist Olaf Kullmann (who remained active during the German occupation) died in concentration camps. Austrian farmer Franz Jägerstätter was executed in 1943 for refusing to serve in the Wehrmacht.
Conscientious objectors and war tax resisters existed in both world wars, and the United States government allowed sincere objectors to serve in non-combat military roles. However, draft resisters who refused any cooperation with the war effort often spent much of each war in federal prisons. During World War II, pacifist leaders such as Dorothy Day and Ammon Hennacy of the Catholic Worker Movement urged young Americans not to enlist in the military. Peace movements have become widespread throughout the world since World War II, and their previously-radical beliefs are now a part of mainstream political discourse.
Anti-nuclear movement
Peace movements emerged in Japan, combining in 1954 to form the Japanese Council Against Atomic and Hydrogen Bombs. Japanese opposition to the Pacific nuclear-weapons tests was widespread, and an "estimated 35 million signatures were collected on petitions calling for bans on nuclear weapons".
In the United Kingdom, the Campaign for Nuclear Disarmament (CND) held an inaugural public meeting at Central Hall Westminster on 17 February 1958 which was attended by five thousand people. After the meeting, several hundred demonstrated at Downing Street.
The CND advocated the unconditional renunciation of the use, production, or dependence upon nuclear weapons by Britain, and the creation of a general disarmament convention. Although the country was progressing towards de-nuclearization, the CND declared that Britain should halt the flight of nuclear-armed planes, end nuclear testing, stop using missile bases, and not provide nuclear weapons to any other country.
The first Aldermaston March, organized by the CND, was held on Easter 1958. Several thousand people marched for four days from Trafalgar Square in London to the Atomic Weapons Research Establishment, near Aldermaston in Berkshire, to demonstrate their opposition to nuclear weapons. The Aldermaston marches continued into the late 1960s, when tens of thousands of people participated in the four-day marches. The CND tapped into the widespread popular fear of, and opposition to, nuclear weapons after the development of the first hydrogen bomb. During the late 1950s and early 1960s, anti-nuclear marches attracted large numbers of people.
Popular opposition to nuclear weapons produced a Labour Party resolution for unilateral nuclear disarmament at the 1960 party conference, but the resolution was overturned the following year and did not appear on later agendas. The experience disillusioned many anti-nuclear protesters who had previously put their hopes in the Labour Party.
Two years after the CND's formation, president Bertrand Russell resigned to form the Committee of 100; the committee planned to conduct sit-down demonstrations in central London and at nuclear bases around the UK. Russell said that the demonstrations were necessary because the press had become indifferent to the CND and large-scale, direct action could force the government to change its policy. One hundred prominent people, many in the arts, attached their names to the organization. Large numbers of demonstrators were essential to their strategy but police violence, the arrest and imprisonment of demonstrators, and preemptive arrests for conspiracy diminished support. Although several prominent people took part in sit-down demonstrations (including Russell, whose imprisonment at age 89 was widely reported), many of the 100 signatories were inactive.
Since the Committee of 100 had a non-hierarchical structure and no formal membership, many local groups assumed the name. Although this helped civil disobedience to spread, it produced policy confusion; as the 1960s progressed, a number of Committee of 100 groups protested against social issues not directly related to war and peace.
In 1961, at the height of the Cold War, about 50,000 women brought together by Women Strike for Peace marched in 60 cities in the United States to demonstrate against nuclear weapons. It was the century's largest national women's peace protest.
In 1958, Linus Pauling and his wife presented the United Nations with a petition signed by more than 11,000 scientists calling for an end to nuclear weapons testing. The 1961 Baby Tooth Survey, co-founded by Dr. Louise Reiss, indicated that above-ground nuclear testing posed significant public health risks in the form of radioactive fallout spread primarily via milk from cows which ate contaminated grass. Public pressure and the research results then led to a moratorium on above ground nuclear weapons testing, followed by the Partial Nuclear Test Ban Treaty signed in 1963 by John F. Kennedy, Nikita Khrushchev, and Harold Macmillan. On the day that the treaty went into force, the Nobel Prize Committee awarded Pauling the Nobel Peace Prize: "Linus Carl Pauling, who ever since 1946 has campaigned ceaselessly, not only against nuclear weapons tests, not only against the spread of these armaments, not only against their very use but against all warfare as a means of solving international conflicts." Pauling founded the International League of Humanists in 1974; he was president of the scientific advisory board of the World Union for Protection of Life, and a signatory of the Dubrovnik-Philadelphia Statement.
On June 12, 1982, one million people demonstrated in New York City's Central Park against nuclear weapons and for an end to the Cold War arms race. It was the largest anti-nuclear protest and the largest political demonstration in American history. International Day of Nuclear-disarmament protests were held on June 20, 1983, at 50 locations across the United States. In 1986, hundreds of people walked from Los Angeles to Washington, D.C. in the Great Peace March for Global Nuclear Disarmament. Many Nevada Desert Experience protests and peace camps were held at the Nevada Test Site during the 1980s and 1990s.
Forty thousand anti-nuclear and anti-war protesters marched past the United Nations in New York on May 1, 2005, 60 years after the atomic bombings of Hiroshima and Nagasaki. The protest was the largest anti-nuclear rally in the U.S. for several decades. In Britain, there were many protests against the government's proposal to replace the aging Trident weapons system with newer missiles. The largest of the protests had 100,000 participants and, according to polls, 59 percent of the public opposed the move.
The International Conference on Nuclear Disarmament, held in Oslo in February 2008, was organized by the government of Norway, the Nuclear Threat Initiative, and the Hoover Institute. The conference, entitled "Achieving the Vision of a World Free of Nuclear Weapons", was intended to build consensus between states with and without nuclear weapons in the context of the Treaty on the Non-Proliferation of Nuclear Weapons. In May 2010, 25,000 people (including members of peace organizations and 1945 atomic-bomb survivors) marched for about two kilometers from lower Manhattan to United Nations headquarters calling for the elimination of nuclear weapons.
Vietnam War protests
The anti-Vietnam War peace movement began during the 1960s in the United States, opposing U.S. involvement in the Vietnam War. Some within the movement advocated a unilateral withdrawal of American forces from South Vietnam.
Opposition to the Vietnam War aimed to unite groups opposed to U.S. anti-communism, imperialism, capitalism and colonialism, such as New Left groups and the Catholic Worker Movement. Others, such as Stephen Spiro, opposed the war based on the just war theory.
In 1965, the movement began to gain national prominence. Provocative actions by police and protesters turned anti-war demonstrations in Chicago at the 1968 Democratic National Convention into a riot. News reports of American military abuses such as the 1968 My Lai massacre brought attention (and support) to the anti-war movement, which continued to expand for the duration of the conflict.
High-profile opposition to the Vietnam war turned to street protests in an effort to turn U.S. political opinion against the war. The protests gained momentum from the civil rights movement, which had organized to oppose segregation laws. They were fueled by a growing network of underground newspapers and large rock festivals, such as Woodstock. Opposition to the war moved from college campuses to middle-class suburbs, government institutions, and labor unions.
Europe in 1980s
A very large peace movement emerged in East and West Europe in the 1980s, primarily in opposition to American plans to fight the Cold War by stationing nuclear missiles in Europe. Moscow supported the movement behind the scenes, but did not control it. However, communist-sponsored peace movements in Eastern Europe metamorphosed into genuine peace movements calling not only for détente, but for democracy. According to Hania Fedorowicz, they played an important role in East Germany and other countries in resurrecting civil society, and helped instigate the successful 1989 peaceful revolutions in Eastern Europe.
Peace movements by country
Canada
Canadian pacifist Agnes Macphail was the first woman elected to the House of Commons. Macphail objected to the Royal Military College of Canada in 1931 on pacifist grounds. Macphail was also the first female Canadian delegate to the League of Nations, where she worked with the World Disarmament Committee. Despite her pacifism, she voted for Canada to enter World War II. The Canadian Peace Congress (1949–1990) was a leading organizer of the Canadian peace movement, particularly under the leadership of James Gareth Endicott (its president until 1971).
For over a century Canada has had a diverse peace movement, with coalitions and networks in many cities, towns, and regions. The largest national umbrella organization is the Canadian Peace Alliance, whose 140 member groups include large city-based coalitions, small grassroots groups, national and local unions and faith, environmental and student groups for a combined membership of over four million. The alliance and its member groups have led opposition to the war on terror. The CPA opposed Canada's participation in the war in Afghanistan and Canadian complicity in what it views as misguided and destructive United States foreign policy. Canada has also been home to a growing movement of Palestinian solidarity, marked by an increasing number of grassroots Jewish groups opposed to Israeli policies.
Germany
Germany developed a strong pacifist movement in the late 19th century; it was suppressed during the Nazi era. After 1945 in East Germany it was controlled by the communist government.
During the Cold War (1947–1989), the West German peace movement concentrated on the abolition of nuclear technology (particularly nuclear weapons) from West Germany and Europe. Most activists criticized both the United States and the Soviet Union. According to conservative critics, the movement had been infiltrated by Stasi agents.
After 1989, the ideal of peace was espoused by Green parties across Europe. Peace sometimes played a significant role in policy-making; in 2002, the German Greens convinced Chancellor Gerhard Schröder to oppose German involvement in Iraq. The Greens controlled the German Foreign Ministry under Joschka Fischer (a Green, and Germany's most popular politician at the time), who sought to limit German involvement in the war on terror. He joined French President Jacques Chirac, whose opposition was decisive in the UN Security Council resolution to limit support for the 2003 invasion of Iraq.
Israel
Israeli–Palestinian and Arab–Israeli conflicts have existed since the dawn of Zionism, particularly since the 1948 formation of the state of Israel and the 1967 Six-Day War. The mainstream peace movement in Israel is Peace Now (Shalom Akhshav), which tends to support the Labour Party or Meretz.
Peace Now was founded in the aftermath of Egyptian President Anwar Sadat's visit to Jerusalem, when it was felt that an opportunity for peace could be missed. Prime Minister Menachem Begin acknowledged that on the eve of his departure for the Camp David summit with Sadat and US President Jimmy Carter, Peace Now rallies in Tel Aviv (which drew a crowd of 100,000, the largest peace rally in Israel to date) played a major role in his decision to withdraw from the Sinai Peninsula and dismantle Israeli settlements there. Peace Now supported Begin for a time and hailed him as a peacemaker, but turned against him when the Sinai withdrawal was accompanied by an accelerated campaign of land confiscation and settlement-building on the West Bank.
Peace Now advocates a negotiated peace with the Palestinians. This was originally worded vaguely, with no definition of "the Palestinians" and who represents them. Peace Now was slow to join the dialogue with the PLO begun by groups such as the Israeli Council for Israeli-Palestinian Peace and the Hadash coalition; only in 1988 did the group accept that the PLO is the body regarded by the Palestinians as their representative.
During the First Intifada, Peace Now held a number of rallies to protest the Israeli army and call for a negotiated withdrawal from the Palestinian territories; the group attacked Defence Minister Yitzhak Rabin for his hard-line stance. After Rabin became prime minister, signed the Oslo Agreement and shook Yasser Arafat's hand on the White House lawn, however, Peace Now mobilized strong public support for him. Since Rabin's November 1995 assassination, rallies on the anniversary of his death (organized by the Rabin Family Foundation) have become the Israeli peace movement's main event. Peace Now is currently known for its struggle against the expansion of settlement outposts on the West Bank.
Gush Shalom (the Peace Bloc) is a left-wing group which developed from the Jewish-Arab Committee Against Deportations, which protested the deportation without trial of 415 Palestinian activists to Lebanon in December 1992 and put up a protest tent in front of the prime minister's office in Jerusalem for two months until the government allowed the deportees to return. The committee then decided to continue as a general peace movement opposing the occupation and advocating the creation of an independent Palestine side-by-side with Israel in its pre-1967 borders, with an undivided Jerusalem the capital of both states. Gush Shalom is also descended from the Israeli Council for Israeli-Palestinian Peace (ICIPP), founded in 1975. Its founders included a group of dissidents which included Major-General Mattityahu Peled, a member of the IDF General Staff during the 1967 Six-Day War; economist Ya'akov Arnon, who headed the Zionist Federation in the Netherlands before coming to Israel in 1948 and the former director-general of the Israeli Ministry of Finance and board chair of the Israeli Electricity Company; and Aryeh Eliav, Labour Party secretary-general until he broke with the Prime Minister Golda Meir over Palestinian issues. The ICIPP's founders joined a group of young, grassroots peace activists who had been active against Israeli occupation since 1967. The bridge between them was journalist and former Knesset member Uri Avnery. Its main achievement was the opening of dialogue with the Palestine Liberation Organization (PLO). Gush Shalom activists are currently involved in the daily struggle in Palestinian villages which have had their land confiscated by the West Bank barrier. They and members of other Israeli movements such as Ta'ayush and Anarchists Against the Wall joining Palestinian villagers in Bil'in in weekly marches to protest the village's land confiscation.
After the 2014 Gaza War, a group of Israeli women founded Women Wage Peace with the goal of reaching a "bilaterally acceptable" peace agreement between Israel and Palestine. The movement has worked to build connections with Palestinians, reaching out to women and men from a variety of religions and political backgrounds. Its activities have included a collective hunger strike outside Israeli Prime Minister Benjamin Netanyahu's residence and a protest march from Northern Israel to Jerusalem. In May 2017, Women Wage Peace had over 20,000 members and supporters.
United Kingdom
From 1934 the Peace Pledge Union gained many adherents to its pledge "I renounce war and will never support or sanction another." Its support diminished considerably with the outbreak of war in 1939, but it remained the focus of pacifism in the post-war years.
After World War II, peace efforts in the United Kingdom were initially focused on the dissolution of the British Empire and the rejection of imperialism by the United States and the Soviet Union. The anti-nuclear movement sought to opt out of the Cold War, rejecting "Britain's Little Independent Nuclear Deterrent" (BLIND) on the grounds that it contradicted mutual assured destruction.
Although the Vietnam Solidarity Campaign, (VSC, led by Tariq Ali) led several large demonstrations against the Vietnam War in 1967 and 1968, the first anti-Vietnam demonstration was at the American Embassy in London in 1965. In 1976, the Lucas Plan (led by Mike Cooley) sought to transform production at Lucas Aerospace from arms to socially-useful production.
The peace movement was later associated with peace camps, as the Labour Party moved to the center under Prime Minister Tony Blair. By early 2003, the peace and anti-war movements (grouped as the Stop the War Coalition) were powerful enough to cause several of Blair's cabinet to resign and hundreds of Labour MPs to vote against their government. Blair's motion to support the U.S. plan to invade Iraq continued due to support from the Conservative Party. Protests against the Iraq War were particularly vocal in Britain. Polls suggested that without UN Security Council approval, the UK public was opposed to involvement. Over two million people protested in Hyde Park; the previous largest demonstration in the UK had about 600,000 participants.
The peace movement has seen pop-up newspapers, pirate radio stations, and plays.
The primary function of the National Peace Congress was to provide opportunities for consultation and joint activities by its affiliated members, to help inform public opinion on the issues of the day, and to convey to the government the views of its members. The NPC disbanded in 2000 and was replaced the following year by the Network for Peace, set up to continue the NPC's networking role.
United States
Near the end of the Cold War, U.S. peace activists focused on slowing the nuclear arms race in the hope of reducing the possibility of nuclear war between the U.S. and the USSR. As the Reagan administration accelerated military spending and adopted a tough stance toward Russia, the Nuclear Freeze campaign and Beyond War movement sought to educate the public on the inherent risk and cost of Reagan's policy. Outreach to individual citizens in the Soviet Union and mass meetings using satellite-link technology were major parts of peacemaking activity during the 1980s. In 1981, the activist Thomas began the longest uninterrupted peace vigil in U.S. history. He was later joined at Lafayette Square in Washington, D.C. by anti-nuclear activists Concepción Picciotto and Ellen Thomas.
In response to Iraq's invasion of Kuwait in 1990, President George H. W. Bush began preparing for war in the region. Peace activists were starting to gain traction with popular rallies, especially on the West Coast, just before the Gulf War began in February 1991. The ground war ended in less than a week with a lopsided Allied victory, and a media-incited wave of patriotic sentiment washed over the nascent protest movement.
During the 1990s, peacemaker priorities included seeking a solution to the Israeli–Palestinian impasse, belated efforts at humanitarian assistance to war-torn regions such as Bosnia and Rwanda, and aid to post-war Iraq. American peace activists brought medicine into Iraq in defiance of U.S. law, resulting in heavy fines and imprisonment for some. The principal groups involved included Voices in the Wilderness and the Fellowship of Reconciliation.
Before and after the Iraq War began in 2003, a concerted protest effort was formed in the United States. A series of protests across the globe was held on February 15, 2003, with events in about 800 cities. The following month, just before the American- and British-led invasion of Iraq, "The World Says No to War" protest attracted as many as 500,000 protestors to cities across the U.S. After the war ended, many protest organizations persisted because of the American military and corporate presence in Iraq.
American activist groups, including United for Peace and Justice, Code Pink (Women Say No To War), Iraq Veterans Against the War, Military Families Speak Out (MFSO), Not in Our Name, A.N.S.W.E.R., Veterans for Peace, and The World Can't Wait continued to protest against the Iraq War. Protest methods included rallies and marches, impeachment petitions, the staging of a war-crimes tribunal in New York to investigate crimes and alleged abuses of power by the Bush administration, bringing Iraqi women to the U.S. to tell their side of the story, independent filmmaking, high-profile appearances by anti-war activists such as Scott Ritter, Janis Karpinski, and Dahr Jamail, resisting military recruiting on college campuses, withholding taxes, mass letter-writing to legislators and newspapers, blogging, music, and guerrilla theatre. Independent media producers continued to broadcast, podcast, and web-host programs about the anti-war movement.
The Campaign Against Sanctions and Military Intervention in Iran was founded in late 2005. By August 2007, fears of an imminent United States or Israeli attack on Iran had increased to such a level that Nobel Prize winners Shirin Ebadi (2003 Peace Prize), Mairead Corrigan-Maguire and Betty Williams (joint 1976 Peace Prize), Harold Pinter (Literature 2005), Jody Williams (1997 Peace Prize) and anti-war groups including the Israeli Committee for a Middle East Free from Atomic, Biological and Chemical Weapons, the Campaign for Nuclear Disarmament, CASMII and Code Pink warned about what they considered the threat of a "war of an unprecedented scale, this time against Iran", Expressing concern that an attack on Iran with nuclear weapons had "not been ruled out", they called for "the dispute about Iran's nuclear program, to be resolved through peaceful means" and for Israel, "as the only Middle Eastern state suspected of possession of nuclear weapons", to join the Nuclear Non-Proliferation Treaty.
Although President Barack Obama continued the wars in Afghanistan and Iraq, attendance at peace marches "declined precipitously". Social scientists Michael T. Heaney and Fabio Rojas noted that from 2007 to 2009, "the largest antiwar rallies shrank from hundreds of thousands of people to thousands, and then to only hundreds."
See also
American Friends Service Committee
Carnegie Endowment for International Peace
Imagine Piano Peace Project
International Fellowship of Reconciliation
Service Civil International
International Campaign to Abolish Nuclear Weapons
List of anti-war organizations
Make love, not war
Opposition to World War I
Pacifism
Pacifism in the United States
Pacifism in Germany
Peace Organisation of Australia
Peace Pledge Union, in UK
Peace symbols
Peace flag
Peace Ship 1915-1916
Peaceworker
List of peace activists
Soviet influence on the peace movement
Women's International League for Peace and Freedom
World peace
Capitalist peace
References
Further reading
Bajaj, Monisha, ed. Encyclopedia of peace education (IAP, 2008).
Bussey, Gertrude, and Margaret Tims. Pioneers for Peace: Women's International League for Peace and Freedom 1915-1965 (Oxford: Alden Press, 1980).
Carter, April. Peace movements: International protest and world politics since 1945 (Routledge, 2014).
Cortright, David. Peace: A history of movements and ideas (Cambridge University Press, 2008).
Costin, Lela B. "Feminism, pacifism, internationalism and the 1915 International Congress of Women." Women's Studies International Forum 5#3-4 (1982).
Durand, André. "Gustave Moynier and the peace societies". In: International Review of the Red Cross (1996), no. 314, p. 532–550
Giugni, Marco. Social protest and policy change: Ecology, antinuclear, and peace movements in comparative perspective (Rowman & Littlefield, 2004).
Hinsley, F. H. Power and the Pursuit of Peace: Theory and Practice in the History of Relations between States (Cambridge UP, 1967) online.
Howard, Michael. The Invention of Peace: Reflections on War and International Order (2001) excerpt
Jakopovich, Daniel. Revolutionary Peacemaking: Writings for a Culture of Peace and Nonviolence (Democratic Thought, 2019).
Kulnazarova, Aigul, and Vesselin Popovski, eds. The Palgrave handbook of global approaches to peace (Palgrave Macmillan, 2019).
Kurtz, Lester R., and Jennifer Turpin, eds. Encyclopedia of violence, peace, and conflict (Academic Press, 1999).
Marullo, Sam, and John Lofland, editors, Peace Action in the Eighties: Social Science Perspectives (New Brunswick: Rutgers University Press, 1990).
Moorehead, Caroline. Troublesome People: The Warriors of Pacifism (Bethesda, MD: Adler & Adler, 1987).
Schlabach, Gerald W. "Christian Peace Theology and Nonviolence toward the Truth: Internal Critique amid Interfaith Dialogue." Journal of Ecumenical Studies 53.4 (2018): 541-568. online
Vellacott, Jo. "A place for pacifism and transnationalism in feminist theory: the early work of the Women's International League for Peace and Freedom." Women History Review 2.1 (1993): 23-56. online
Weitz, Eric. A World Divided: The Global Struggle for Human Rights in the Age of Nation States (Princeton University Press, 2019). online reviews
National studies
Bennett, Scott H. Radical Pacifism: The War Resisters League and Gandhian Nonviolence in America, 1915–45 (Syracuse UP, 2003).
Brown, Heloise. 'The truest form of patriotism': Pacifist feminism in Britain, 1870-1902 (Manchester University Press, 2003).
Ceadel, Martin. The origins of war prevention: the British peace movement and international relations, 1730-1854 (Oxford University Press, 1996).
Ceadel, Martin. Semi-detached idealists: the British peace movement and international relations, 1854-1945 (Oxford University Press, 2000) online.
Ceadel, Martin. "The First British Referendum: The Peace Ballot, 1934-5." English Historical Review 95.377 (1980): 810-839. online
Chatfield, Charles, ed. Peace Movements in America (New York: Schocken Books, 1973).
Chatfield, Charles. with Robert Kleidman. The American Peace Movement: Ideals and Activism (New York: Twayne Publishers, 1992).
Chickering, Roger. Imperial Germany and a World Without War: The Peace Movement and German Society, 1892-1914 (Princeton University Press, 2015).
Clinton, Michael. "Coming to Terms with 'Pacifism': The French Case, 1901–1918." Peace & Change 26.1 (2001): 1-30.
Cooper, Sandi E. "Pacifism in France, 1889-1914: international peace as a human right." French historical studies (1991): 359-386. online
Davis, Richard. "The British Peace Movement in the Interwar Years." Revue Française de Civilisation Britannique. French Journal of British Studies 22.XXII-3 (2017). online
Davy, Jennifer Anne. "Pacifist thought and gender ideology in the political biographies of women peace activists in Germany, 1899-1970: introduction." Journal of Women's History 13.3 (2001): 34-45.
Eastman, Carolyn, "Fight Like a Man: Gender and Rhetoric in the Early Nineteenth-Century American Peace Movement", American Nineteenth Century History 10 (Sept. 2009), 247–71.
Fontanel, Jacques. "An underdeveloped peace movement: The case of France." Journal of Peace Research 23.2 (1986): 175-182.
Hall, Mitchell K., ed. Opposition to War: An Encyclopedia of US Peace and Antiwar Movements (2 vol. ABC-CLIO, 2018).
Howlett, Charles F., and Glen Zeitzer. The American Peace Movement: History and Historiography (American Historical Association, 1985).
Kimball, Jeffrey. "The Influence of Ideology on Interpretive Disagreement: A Report on a Survey of Diplomatic, Military and Peace Historians on the Causes of 20th Century U. S. Wars," History Teacher 17#3 (1984) pp. 355-384 DOI: 10.2307/493146 online
Laity, Paul. The British Peace Movement 1870-1914 (Clarendon Press, 2002).
Locke, Elsie. Peace People: A History of Peace Activities in New Zealand (Christchurch, NZ: Hazard Press, 1992).
Lukowitz, David C. "British pacifists and appeasement: the Peace Pledge Union." Journal of Contemporary History 9.1 (1974): 115-127.
Oppenheimer, Andrew. "West German Pacifism and the Ambivalence of Human Solidarity, 1945–1968." Peace & Change 29.3‐4 (2004): 353-389. online
Peace III, Roger C. A Just and Lasting Peace: The U.S. Peace Movement from the Cold War to Desert Storm (Chicago: The Noble Press, 1991).
Pugh, Michael. "Pacifism and politics in Britain, 1931–1935." Historical Journal 23.3 (1980): 641-656. online
Puri, Rashmi-Sudha. Gandhi on War & Peace (1986); focus on India.
Ritchie, J. M. "Germany–a peace-loving nation? A Pacifist Tradition in German Literature." Oxford German Studies 11.1 (1980): 76-102.
Saunders, Malcolm. "The origins and early years of the Melbourne Peace Society 1899/1914." Journal of the Royal Australian Historical Society 79.1-2 (1993): 96-114.
Socknat, Thomas P. "Canada's Liberal Pacifists and the Great War." Journal of Canadian Studies 18.4 (1984): 30-44.
Steger, Manfred B. Gandhi's dilemma: Nonviolent principles and nationalist power (St. Martin's Press, 2000) online review.
Strong-Boag, Veronica. "Peace-making women: Canada 1919–1939." in Women and Peace (Routledge, 2019) pp. 170-191.
Talini, Giulio. "Saint-Pierre, British pacifism and the quest for perpetual peace (1693–1748)." History of European Ideas 46.8 (2020): 1165-1182.
Vaïsse, Maurice. "A certain idea of peace in France from 1945 to the present day." French History 18.3 (2004): 331-337.
Wittner, Lawrence S. Rebels Against War: The American Peace Movement, 1933–1983 (Philadelphia: Temple University Press, 1984).
Ziemann, Benjamin. "German Pacifism in the Nineteenth and Twentieth Centuries." Neue Politische Literatur 2015.3 (2015): 415-437 online.
Primary sources
Lynd, Staughton, and Alice Lynd, eds. Nonviolence in America: A documentary history (3rd ed. Orbis Books, 2018).
Stellato, Jesse, ed. Not in Our Name: American Antiwar Speeches, 1846 to the Present (Pennsylvania State University Press, 2012). 287 pp
External links
Nonviolent Action Network – Nonviolent Action Network Database of 300 nonviolent methods
Anti-war movement
Counterculture of the 1960s
History of social movements
Peace
|
```objective-c
// your_sha256_hash------------
// - Open3D: www.open3d.org -
// your_sha256_hash------------
// your_sha256_hash------------
//***************************************************************************************/
//
// path_to_url
//
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
//***************************************************************************************/
#pragma once
namespace open3d {
namespace ml {
namespace contrib {
#ifdef BUILD_CUDA_MODULE
void roipool3dLauncher(int batch_size,
int pts_num,
int boxes_num,
int feature_in_len,
int sampled_pts_num,
const float *xyz,
const float *boxes3d,
const float *pts_feature,
float *pooled_features,
int *pooled_empty_flag);
#endif
} // namespace contrib
} // namespace ml
} // namespace open3d
```
|
The Akron Cemetery is a historic cemetery in rural southeastern Independence County, Arkansas. The cemetery is located on the west side of Arkansas Highway 122, about south of Newark, on top of a Native American mound. With its oldest recorded burial dating to 1829, it is possibly the oldest cemetery in the county, and is known to be the burial site of some of the Newark area's earliest settlers. It is all that survives of the community of Big Bottom, and early settlement that was renamed Akron in 1880, and was abandoned around 1940.
The cemetery was listed on the National Register of Historic Places in 2002.
See also
Walnut Grove Cemetery
National Register of Historic Places listings in Independence County, Arkansas
References
External links
Cemeteries on the National Register of Historic Places in Arkansas
Cultural infrastructure completed in 1829
National Register of Historic Places in Independence County, Arkansas
1829 establishments in Arkansas Territory
Mounds in Arkansas
Cemeteries established in the 1820s
|
The United Federation of Christian Trade Unions in Germany (, GcG) was a national trade union federation in Germany.
The federation was established in 1901 by 23 independent unions. It initially had a membership of 77,000, but grew to 350,000 in 1912, and then peaked at 1,100,000 in 1919. It gradually lost members over the following decade, and by 1931 was down to 580,000. While it was open to all Christians, 80% of its membership was Catholic. The federation worked closely with the Centre Party, until in 1933 it was dissolved by the Nazi government.
Affiliates
As of 1919, the following unions were affiliated:
Central Association of Christian Construction Workers
Union of Christian Miners
Gutenberg Association
Union of German Railway Workers and State Employees
Central Association of Christian Factory and Transport Workers
National Association of German Inn Employees
Central Association of Community Workers and Tram Workers
Central Graphical Association
Reich Association of Female Domestic Workers
Union of Homeworkers
Central Association of Christian Woodworkers
Association of Nurses
Central Association of Agricultural Workers
Central Association of Christian Painters
Christian Metalworkers' Association
German Gardeners' Association
Association of the Food and Beverage Industry Workers
Association of Christian Tailors
Association of Christian Tobacco and Cigar Workers
Central Association of Christian Textile Workers
Leadership
Presidents
1901: August Brust
1904: Karl Matthias Schiffer
1919: Adam Stegerwald
1929: Bernhard Otte
General Secretaries
1903: Adam Stegerwald
1921: Bernhard Otte
1929: Post vacant
References
Christian trade unions
National trade union centers of Germany
Trade unions established in 1901
Trade unions disestablished in 1933
|
```xml
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
xmlns="path_to_url"
xmlns:activiti="path_to_url"
targetNamespace="Examples">
<message id="panicMessage" name="panic" />
<process id="catchPanicMessage">
<startEvent id="start" />
<sequenceFlow sourceRef="start" targetRef="messageEvent" />
<intermediateCatchEvent id="messageEvent" name="Alert">
<messageEventDefinition messageRef="panicMessage" />
</intermediateCatchEvent>
<sequenceFlow sourceRef="messageEvent" targetRef="end" />
<endEvent id="end" />
</process>
</definitions>
```
|
```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.
import collections
import logging
import math
import warnings
from functools import reduce
import paddle
from paddle.framework import core
from paddle.incubate.distributed.fleet.parameter_server.ir import vars_metatools
from paddle.incubate.distributed.fleet.parameter_server.ir.ps_dispatcher import (
RoundRobin,
)
from paddle.incubate.distributed.fleet.parameter_server.mode import (
DistributedMode,
)
OP_NAME_SCOPE = "op_namescope"
CLIP_OP_NAME_SCOPE = "gradient_clip"
STEP_COUNTER = "@PS_STEP_COUNTER@"
LEARNING_RATE_DECAY_COUNTER = "@LR_DECAY_COUNTER@"
OP_ROLE_VAR_ATTR_NAME = core.op_proto_and_checker_maker.kOpRoleVarAttrName()
RPC_OP_ROLE_ATTR_NAME = core.op_proto_and_checker_maker.kOpRoleAttrName()
RPC_OP_ROLE_ATTR_VALUE = core.op_proto_and_checker_maker.OpRole.RPC
op_role_attr_name = core.op_proto_and_checker_maker.kOpRoleAttrName()
LR_SCHED_OP_ROLE_ATTR_VALUE = core.op_proto_and_checker_maker.OpRole.LRSched
OPT_OP_ROLE_ATTR_VALUE = core.op_proto_and_checker_maker.OpRole.Optimize
SPARSE_OP_LIST = ["lookup_table", "lookup_table_v2"]
SPARSE_OP_TYPE_DICT = {"lookup_table": "W", "lookup_table_v2": "W"}
def _get_lr_ops(program):
lr_ops = []
for index, op in enumerate(program.global_block().ops):
role_id = int(op.attr(RPC_OP_ROLE_ATTR_NAME))
if role_id == int(LR_SCHED_OP_ROLE_ATTR_VALUE) or role_id == int(
LR_SCHED_OP_ROLE_ATTR_VALUE
) | int(OPT_OP_ROLE_ATTR_VALUE):
lr_ops.append(op)
return lr_ops
def _has_global_step(lr_ops):
if len(lr_ops) > 0:
for idx, op in enumerate(lr_ops):
if op.type != 'increment':
continue
counter = op.input("X")[0]
if counter == LEARNING_RATE_DECAY_COUNTER:
return True
return False
def is_sparse_op(op):
if (
op.type in SPARSE_OP_LIST
and op.attr('is_sparse') is True
and op.attr('is_distributed') is False
):
return True
if (
op.type == "distributed_lookup_table"
and op.attr('is_distributed') is False
):
return True
return False
def is_distributed_sparse_op(op):
if op.type in SPARSE_OP_LIST and op.attr('is_distributed') is True:
return True
if (
op.type == "distributed_lookup_table"
and op.attr('is_distributed') is True
):
return True
return False
def get_sparse_tablename(op):
return op.input("W")[0]
def get_sparse_tablenames(program, is_distributed):
tablenames = set()
if is_distributed:
for op in program.global_block().ops:
if is_distributed_sparse_op(op):
tablenames.add(get_sparse_tablename(op))
else:
for op in program.global_block().ops:
if is_sparse_op(op):
tablenames.add(get_sparse_tablename(op))
return list(tablenames)
class MergedVariable:
def __init__(self, merged, ordered, offsets):
self.merged_var = merged
self.ordered_vars = ordered
self.offsets = offsets
def Singleton(cls):
_instance = {}
def _singleton(*args, **kargs):
if cls not in _instance:
_instance[cls] = cls(*args, **kargs)
return _instance[cls]
return _singleton
@Singleton
class CompileTimeStrategy:
def __init__(self, main_program, startup_program, strategy, role_maker):
self.min_block_size = 81920
self.origin_main_program = main_program
self.origin_startup_program = startup_program
self.origin_ps_main_program = main_program
self.origin_ps_startup_program = startup_program
self.strategy = strategy
self.role_maker = role_maker
self.use_ps_gpu = False
try:
self.is_heter_ps_mode = role_maker._is_heter_parameter_server_mode
except:
warnings.warn(
"Using paddle.distributed.fleet instead of paddle.base.incubate.fleet"
)
self.is_heter_ps_mode = False
self.origin_sparse_pairs = []
self.origin_dense_pairs = []
self.merged_variables_pairs = []
self.merged_dense_pairs = []
self.merged_sparse_pairs = []
self.merged_variable_map = {}
self.param_name_to_grad_name = {}
self.grad_name_to_param_name = {}
self.param_grad_ep_mapping = collections.OrderedDict()
self.grad_param_mapping = collections.OrderedDict()
self._build_var_distributed()
self.tensor_table_dict = {}
# for heter-ps save variables
self.origin_merged_variables_pairs = list(self.merged_variables_pairs)
self.origin_merged_dense_pairs = list(self.merged_dense_pairs)
self.origin_merged_sparse_pairs = list(self.merged_sparse_pairs)
def get_distributed_mode(self):
trainer = self.strategy.get_trainer_runtime_config()
return trainer.mode
def is_sync_mode(self):
trainer = self.strategy.get_trainer_runtime_config()
return trainer.mode == DistributedMode.SYNC
def is_geo_mode(self):
trainer = self.strategy.get_trainer_runtime_config()
return trainer.mode == DistributedMode.GEO
def is_async_mode(self):
trainer = self.strategy.get_trainer_runtime_config()
return trainer.mode == DistributedMode.ASYNC
def get_role_id(self):
try:
return self.role_maker._role_id()
except Exception:
return self.role_maker.role_id()
def get_trainers(self):
try:
return self.role_maker._worker_num()
except Exception:
return self.role_maker.worker_num()
def get_ps_endpoint(self):
try:
return self.role_maker._get_pserver_endpoints()[self.get_role_id()]
except Exception:
return self.role_maker.get_pserver_endpoints()[self.get_role_id()]
def get_ps_endpoints(self):
try:
return self.role_maker._get_pserver_endpoints()
except Exception:
return self.role_maker.get_pserver_endpoints()
def get_heter_worker_endpoints(self):
try:
return self.role_maker._get_heter_worker_endpoints()
except Exception:
return self.role_maker.get_heter_worker_endpoints()
def get_next_stage_trainers(self):
try:
return self.role_maker._get_next_trainers()
except Exception:
return self.role_maker.get_next_trainers()
def get_heter_worker_endpoint(self):
try:
return self.role_maker._get_heter_worker_endpoint()
except Exception:
return self.role_maker.get_heter_worker_endpoint()
def get_trainer_endpoints(self):
try:
return self.role_maker._get_trainer_endpoints()
except Exception:
return self.role_maker.get_trainer_endpoints()
def get_trainer_endpoint(self):
try:
return self.role_maker._get_trainer_endpoint()
except Exception:
return self.role_maker.get_trainer_endpoint()
def get_previous_stage_trainers(self):
try:
return self.role_maker._get_previous_trainers()
except Exception:
return self.role_maker.get_previous_trainers()
def get_origin_programs(self):
return self.origin_main_program, self.origin_startup_program
def get_origin_main_program(self):
return self.origin_main_program
def get_origin_startup_program(self):
return self.origin_startup_program
def set_origin_ps_main_program(self, program):
self.origin_ps_main_program = program
def set_origin_ps_startup_program(self, program):
self.origin_ps_startup_program = program
def get_origin_ps_main_program(self):
return self.origin_ps_main_program
def get_origin_ps_startup_program(self):
return self.origin_ps_startup_program
def add_tensor_table(
self,
feed_var_name,
fetch_var_name="",
startup_program=None,
main_program=None,
tensor_table_class="",
):
self.tensor_table_dict[feed_var_name] = {}
self.tensor_table_dict[feed_var_name]["feed_var_name"] = feed_var_name
self.tensor_table_dict[feed_var_name]["fetch_var_name"] = fetch_var_name
self.tensor_table_dict[feed_var_name][
"startup_program"
] = startup_program
self.tensor_table_dict[feed_var_name]["main_program"] = main_program
self.tensor_table_dict[feed_var_name][
"tensor_table_class"
] = tensor_table_class
def get_tensor_table_dict(self):
return self.tensor_table_dict
def get_sparse_varname_on_ps(self, is_distributed, endpoint=None):
if not endpoint:
endpoint = self.get_ps_endpoint()
varnames = get_sparse_tablenames(
self.get_origin_main_program(), is_distributed
)
ps_sparse_varnames = []
for varname in varnames:
tables = self.get_var_distributed(varname, True)
for i in range(len(tables)):
table, ep, _ = tables[i]
if ep == endpoint:
ps_sparse_varnames.append(table)
return ps_sparse_varnames
def get_optimize_varname_on_ps(self, param_name):
origin_param_name, _, _ = _get_varname_parts(param_name)
optimize_var_names = []
for op in self.get_origin_main_program().global_block().ops:
# check all optimizer op
if int(op.all_attrs()["op_role"]) == 2:
# check param name
if op.input("Param")[0] != origin_param_name:
continue
# check all input
for key in op.input_names:
if key in [
"Param",
"Grad",
"LearningRate",
"Beta1Tensor",
"Beta2Tensor",
]:
continue
# check variable shape related param, e.g: Moment1
optimize_var_names += (
self._get_optimizer_param_related_var_name(
op, op.type, key
)
)
return optimize_var_names
def _get_optimizer_param_related_var_name(self, op, op_type, varkey):
"""
Returns the names for optimizer inputs that need to be load
"""
related_var_names = []
if op_type == "adam":
if varkey in ["Moment1", "Moment2"]:
related_var_names.append(op.input(varkey)[0])
elif op_type == "adagrad":
if varkey == "Moment":
related_var_names.append(op.input(varkey)[0])
elif op_type in ["momentum", "lars_momentum"]:
if varkey == "Velocity":
related_var_names.append(op.input(varkey)[0])
elif op_type == "rmsprop":
if varkey in ["Moment", "MeanSquare"]:
related_var_names.append(op.input(varkey)[0])
elif op_type == "ftrl":
if varkey in ["SquaredAccumulator", "LinearAccumulator"]:
related_var_names.append(op.input(varkey)[0])
elif op_type == "sgd":
pass
else:
raise ValueError(
f"Not supported optimizer for distributed training: {op_type}"
)
return related_var_names
def build_ctx(
self, vars, mapping, is_grad, is_sparse, is_send, is_distributed=False
):
def get_grad_var_ep(slices):
names = []
eps = []
sections = []
for slice in slices:
if self.is_geo_mode():
if is_send:
names.append(f"{slice.name}.delta")
else:
names.append(slice.name)
elif (
is_grad and self.is_sync_mode() and self.get_trainers() > 1
):
names.append(f"{slice.name}.trainer_{self.get_role_id()}")
else:
names.append(slice.name)
sections.append(slice.shape[0])
for ep, pairs in self.param_grad_ep_mapping.items():
params, grads = pairs["params"], pairs["grads"]
for var in params + grads:
if slice.name == var.name:
eps.append(ep)
break
return names, eps, sections
if isinstance(vars, MergedVariable):
name = vars.merged_var.name
slices = mapping[name]
names, eps, sections = get_grad_var_ep(slices)
origin_varnames = [var.name for var in vars.ordered_vars]
else:
name = vars.name
slices = mapping[name]
names, eps, sections = get_grad_var_ep(slices)
origin_varnames = [vars.name]
trainer_id = self.get_role_id()
aggregate = True
ctx = core.CommContext(
name,
names,
eps,
sections,
origin_varnames,
trainer_id,
aggregate,
is_sparse,
is_distributed,
[],
)
return ctx
def get_trainer_send_context(self):
send_ctx = {}
distributed_varnames = get_sparse_tablenames(
self.origin_main_program, True
)
idx = 0
if not self.is_geo_mode():
for merged in self.merged_dense_pairs:
grad = merged[1]
ctx = self.build_ctx(
grad, self.grad_var_mapping, True, False, True
)
send_ctx[ctx.var_name()] = ctx
for merged in self.merged_sparse_pairs:
param = merged[0]
grad = merged[1]
param_name = param.merged_var.name
is_distributed = (
True if param_name in distributed_varnames else False
)
ctx = self.build_ctx(
grad,
self.grad_var_mapping,
True,
True,
True,
is_distributed,
)
send_ctx[ctx.var_name()] = ctx
idx += 1
if self.is_async_mode():
name, ctx = self._step_ctx(idx)
send_ctx[name] = ctx
else:
for pairs in self.origin_sparse_pairs:
param, grad = pairs
param_name = param.name
is_distributed = (
True if param_name in distributed_varnames else False
)
param_ctx = self.build_ctx(
param,
self.param_var_mapping,
False,
True,
True,
is_distributed,
)
grad_ctx = self.build_ctx(
grad,
self.grad_var_mapping,
True,
True,
True,
is_distributed,
)
ctx = core.CommContext(
param_ctx.var_name(),
param_ctx.split_varnames(),
param_ctx.split_endpoints(),
param_ctx.sections(),
grad_ctx.origin_varnames(),
param_ctx.trainer_id(),
param_ctx.aggregate(),
param_ctx.is_sparse(),
param_ctx.is_distributed(),
[],
)
send_ctx[ctx.var_name()] = ctx
idx += 1
name, ctx = self._step_ctx(idx)
send_ctx[name] = ctx
return send_ctx
def get_communicator_send_context(self):
send_ctx = {}
distributed_varnames = get_sparse_tablenames(
self.origin_main_program, True
)
idx = 0
if self.is_geo_mode():
for pairs in self.merged_dense_pairs:
param = pairs[0]
ctx = self.build_ctx(
param, self.param_var_mapping, False, False, True
)
send_ctx[ctx.var_name()] = ctx
for pairs in self.merged_sparse_pairs:
param = pairs[0]
param_name = param.merged_var.name
is_distributed = (
True if param_name in distributed_varnames else False
)
ctx = self.build_ctx(
param,
self.param_var_mapping,
False,
True,
True,
is_distributed,
)
send_ctx[ctx.var_name()] = ctx
idx += 1
name, ctx = self._step_ctx(idx)
send_ctx[name] = ctx
else:
for merged in self.merged_dense_pairs:
grad = merged[1]
ctx = self.build_ctx(
grad, self.grad_var_mapping, True, False, True
)
send_ctx[ctx.var_name()] = ctx
for merged in self.merged_sparse_pairs:
param, grad = merged
param_name = param.merged_var.name
is_distributed = (
True if param_name in distributed_varnames else False
)
ctx = self.build_ctx(
grad,
self.grad_var_mapping,
True,
True,
True,
is_distributed,
)
send_ctx[ctx.var_name()] = ctx
idx += 1
name, ctx = self._step_ctx(idx)
send_ctx[name] = ctx
return send_ctx
def get_communicator_recv_context(
self, recv_type=1, use_origin_program=False
):
# recv_type
# 1 : DENSE 2. SPARSE 3. DISTRIBUTED 4. ALL
distributed_varnames = get_sparse_tablenames(
self.origin_main_program, True
)
sparse_varnames = []
for pairs in self.origin_sparse_pairs:
param, grad = pairs
sparse_varnames.append(param.name)
dense_recv_ctx = {}
sparse_recv_ctx = {}
distributed_recv_ctx = {}
variables_pairs = (
self.merged_variables_pairs
if not use_origin_program
else self.origin_merged_variables_pairs
)
for merged in variables_pairs:
params = merged[0]
if params.merged_var.name in sparse_varnames:
continue
ctx = self.build_ctx(
params, self.param_var_mapping, False, False, False, False
)
dense_recv_ctx[ctx.var_name()] = ctx
for pairs in self.origin_sparse_pairs:
param, grad = pairs
if param.name in distributed_varnames:
ctx = self.build_ctx(
param, self.param_var_mapping, False, True, False, True
)
distributed_recv_ctx[ctx.var_name()] = ctx
else:
ctx = self.build_ctx(
param, self.param_var_mapping, False, True, False, False
)
sparse_recv_ctx[ctx.var_name()] = ctx
if recv_type == 1:
return dense_recv_ctx
if recv_type == 2:
return sparse_recv_ctx
if recv_type == 3:
return distributed_recv_ctx
if recv_type == 4:
dense_recv_ctx.update(sparse_recv_ctx)
dense_recv_ctx.update(distributed_recv_ctx)
return dense_recv_ctx
assert ValueError(
"recv_type can only be 1/2/3/4, 1 : DENSE 2. SPARSE 3. DISTRIBUTED 4. ALL"
)
def get_the_one_trainer_send_context(self, split_dense_table):
if self.is_geo_mode():
send_ctx = {}
trainer_id = self.get_role_id()
idx = 0
distributed_varnames = get_sparse_tablenames(
self.origin_main_program, True
)
for merged in self.merged_sparse_pairs:
param, grad = merged
grad_name = grad.merged_var.name
param_name = param.merged_var.name
is_distributed = (
True if param_name in distributed_varnames else False
)
var = self.origin_main_program.global_block().vars[
grad.merged_var.name
]
var_numel = reduce(lambda x, y: x * y, var.shape[1:], 1)
sparse_ctx = core.CommContext(
grad_name,
[grad_name],
["127.0.0.1:6071"],
[var_numel],
[grad_name],
trainer_id,
True,
True,
is_distributed,
idx,
False,
False,
-1,
[],
)
idx += 1
send_ctx[sparse_ctx.var_name()] = sparse_ctx
if len(send_ctx) == 0:
raise ValueError(
"GeoSGD require sparse parameters in your net."
)
if len(self.tensor_table_dict) > 0 and self.role_maker._is_worker():
name, ctx = self._step_ctx(idx)
send_ctx[name] = ctx
return send_ctx
else:
return self.get_the_one_send_context(split_dense_table)
def get_dense_send_context(
self,
send_ctx,
idx,
merged_dense_pairs,
trainer_id,
split_dense_table=False,
):
if len(merged_dense_pairs) < 1:
return idx
if not split_dense_table:
origin_varnames = []
var_numel = 0
for merged in merged_dense_pairs:
grad = merged[1]
origin_varnames.append(grad.merged_var.name)
var = self.origin_main_program.global_block().vars[
grad.merged_var.name
]
var_numel += reduce(lambda x, y: x * y, var.shape, 1)
grad_name = "Dense@Grad"
trainer_id = self.get_role_id()
aggregate = True
dense_ctx = core.CommContext(
grad_name,
[grad_name],
["127.0.0.1:6071"],
[var_numel],
origin_varnames,
trainer_id,
aggregate,
False,
False,
idx,
False,
False,
-1,
[],
)
send_ctx[grad_name] = dense_ctx
idx += 1
else:
for merged in merged_dense_pairs:
grad = merged[1]
origin_varname = grad.merged_var.name
var = self.origin_main_program.global_block().vars[
origin_varname
]
var_numel = reduce(lambda x, y: x * y, var.shape, 1)
grad_name = origin_varname
aggregate = True
dense_ctx = core.CommContext(
grad_name,
[grad_name],
["127.0.0.1:6071"],
[var_numel],
[origin_varname],
trainer_id,
aggregate,
False,
False,
idx,
False,
False,
-1,
[],
)
send_ctx[grad_name] = dense_ctx
idx += 1
return idx
def get_the_one_send_context(
self, split_dense_table=False, use_origin_program=False, ep_list=None
):
if ep_list is None:
ep_list = ["127.0.0.1:6071"]
send_ctx = {}
trainer_id = self.get_role_id()
idx = 0
merged_dense_pairs = (
self.origin_merged_dense_pairs
if use_origin_program
else self.merged_dense_pairs
)
merged_sparse_pairs = (
self.origin_merged_sparse_pairs
if use_origin_program
else self.merged_sparse_pairs
)
idx += self.get_dense_send_context(
send_ctx, idx, merged_dense_pairs, trainer_id, split_dense_table
)
distributed_varnames = get_sparse_tablenames(
self.origin_main_program, True
)
for merged in merged_sparse_pairs:
param, grad = merged
grad_name = grad.merged_var.name
param_name = param.merged_var.name
splited_varname = []
for i in range(len(ep_list)):
splited_varname.append(f"{param_name}.block{i}")
is_distributed = (
True if param_name in distributed_varnames else False
)
var = self.origin_main_program.global_block().vars[
grad.merged_var.name
]
shape = list(var.shape)
shape[0] = 0 if is_distributed else shape[0]
sparse_ctx = core.CommContext(
grad_name,
splited_varname,
ep_list,
shape,
[grad_name],
trainer_id,
True,
True,
is_distributed,
idx,
False,
False,
-1,
[],
)
idx += 1
send_ctx[sparse_ctx.var_name()] = sparse_ctx
if len(self.tensor_table_dict) > 0 and self.role_maker._is_worker():
name, ctx = self._step_ctx(idx)
send_ctx[name] = ctx
return send_ctx
def get_the_one_recv_context(
self, is_dense=True, split_dense_table=False, use_origin_program=False
):
recv_id_maps = {}
if is_dense:
send_ctx = self.get_the_one_send_context(
split_dense_table=split_dense_table,
use_origin_program=use_origin_program,
)
for idx, (name, ctx) in enumerate(send_ctx.items()):
if ctx.is_sparse():
continue
if ctx.is_tensor_table():
continue
origin_grad_varnames = ctx.origin_varnames()
param_names = []
for grad_varname in origin_grad_varnames:
param_name = self.grad_name_to_param_name[grad_varname]
param_names.append(param_name)
recv_id_maps[ctx.table_id()] = param_names
else:
send_ctx = self.get_the_one_send_context()
for idx, (name, ctx) in enumerate(send_ctx.items()):
if not ctx.is_sparse():
continue
origin_grad_varnames = ctx.origin_varnames()
param_names = []
for grad_varname in origin_grad_varnames:
param_name = self.grad_name_to_param_name[grad_varname]
param_names.append(param_name)
recv_id_maps[ctx.table_id()] = param_names
return recv_id_maps
def get_server_runtime_config(self):
return self.strategy.get_server_runtime_config()
def get_var_distributed(self, varname, is_param):
var_distributed = []
offset = 0
if is_param:
params = self.param_var_mapping[varname]
param_varnames = [var.name for var in params]
for ep, pairs in self.param_grad_ep_mapping.items():
for p in pairs["params"]:
if p.name in param_varnames:
offset += p.shape[0]
var_distributed.append((p.name, ep, p.shape[0]))
else:
grads = self.grad_var_mapping[varname]
grad_varnames = [var.name for var in grads]
for ep, pairs in self.param_grad_ep_mapping.items():
for g in pairs["grads"]:
if g.name in grad_varnames:
var_distributed.append((g.name, ep, g.shape[0]))
return var_distributed
def _step_ctx(self, idx):
name = STEP_COUNTER
trainer_id = self.get_role_id()
endpoints = self.get_ps_endpoints()
sections = [1] * len(endpoints)
names = [name] * len(endpoints)
ctx = core.CommContext(
name,
names,
endpoints,
sections,
[name],
trainer_id,
True,
False,
False,
idx,
True,
False,
-1,
[],
)
return name, ctx
def _create_vars_from_blocklist(self, block_list):
"""
Create vars for each split.
NOTE: only grads need to be named for different trainers, use
add_trainer_suffix to rename the grad vars.
Args:
block_list (list[(varname, block_id, block_size)]): List of gradient blocks.
add_trainer_suffix (Bool): Add trainer suffix to new variable's name if set True.
Returns:
var_mapping (collections.OrderedDict(varname->[new_varname_variable])):A dict mapping
from original var name to each var split.
"""
# varname->[(block_id, current_block_size)]
block_map = collections.OrderedDict()
var_mapping = collections.OrderedDict()
for block_str in block_list:
varname, offset, size = block_str.split(":")
if varname not in block_map:
block_map[varname] = []
block_map[varname].append((int(offset), int(size)))
for varname, split in block_map.items():
orig_var = self.merged_variable_map[varname]
if len(split) == 1:
var_mapping[varname] = [orig_var]
self.var_distributed.add_distributed_var(
origin_var=orig_var,
slice_var=orig_var,
block_id=0,
offset=0,
is_slice=False,
vtype="Param",
)
else:
var_mapping[varname] = []
orig_shape = orig_var.shape
orig_dim1_flatten = 1
if len(orig_shape) >= 2:
orig_dim1_flatten = reduce(
lambda x, y: x * y, orig_shape[1:]
)
for i, block in enumerate(split):
size = block[1]
rows = size // orig_dim1_flatten
splited_shape = [rows]
if len(orig_shape) >= 2:
splited_shape.extend(orig_shape[1:])
new_var_name = "%s.block%d" % (varname, i)
slice_var = vars_metatools.VarStruct(
name=new_var_name,
shape=splited_shape,
dtype=orig_var.dtype,
type=orig_var.type,
lod_level=orig_var.lod_level,
persistable=False,
)
var_mapping[varname].append(slice_var)
self.var_distributed.add_distributed_var(
origin_var=orig_var,
slice_var=slice_var,
block_id=i,
offset=-1,
is_slice=False,
vtype="Param",
)
return var_mapping
def _dispatcher(self):
ps_dispatcher = RoundRobin(self.get_ps_endpoints())
ps_dispatcher.reset()
grad_var_mapping_items = list(self.grad_var_mapping.items())
sparse_gradnames = [grad.name for _, grad in self.origin_sparse_pairs]
for grad_varname, splited_vars in grad_var_mapping_items:
if grad_varname in sparse_gradnames:
continue
send_vars = []
for _, var in enumerate(splited_vars):
send_vars.append(var)
recv_vars = []
for _, var in enumerate(send_vars):
recv_vars.append(self.grad_param_mapping[var])
eps = ps_dispatcher.dispatch(recv_vars)
for i, ep in enumerate(eps):
self.param_grad_ep_mapping[ep]["params"].append(recv_vars[i])
self.param_grad_ep_mapping[ep]["grads"].append(send_vars[i])
for grad_varname, splited_vars in grad_var_mapping_items:
if grad_varname not in sparse_gradnames:
continue
ps_dispatcher.reset()
send_vars = []
for _, var in enumerate(splited_vars):
send_vars.append(var)
recv_vars = []
for _, var in enumerate(send_vars):
recv_vars.append(self.grad_param_mapping[var])
eps = ps_dispatcher.dispatch(recv_vars)
for i, ep in enumerate(eps):
self.param_grad_ep_mapping[ep]["params"].append(recv_vars[i])
self.param_grad_ep_mapping[ep]["grads"].append(send_vars[i])
def _slice_variable(
self, var_list, slice_count, min_block_size, uniform=False
):
"""
We may need to split dense tensor to one or more blocks and put
them equally onto parameter server. One block is a sub-tensor
aligned by dim[0] of the tensor.
We need to have a minimal block size so that the calculations in
the parameter server side can gain better performance. By default
minimum block size 8K elements (maybe 16bit or 32bit or 64bit).
Args:
var_list (list): List of variables.
slice_count (int): Numel of count that variables will be sliced, which
could be the pserver services' count.
min_block_size (int): Minimum split block size.
Returns:
blocks (list[(varname, block_id, current_block_size)]): A list
of VarBlocks. Each VarBlock specifies a shard of the var.
"""
blocks = []
for var in var_list:
if not uniform:
var_numel = reduce(lambda x, y: x * y, var.shape, 1)
split_count = 1
if min_block_size == -1:
split_count = 1
else:
split_count = slice_count
max_pserver_count = int(
math.floor(var_numel / float(min_block_size))
)
if max_pserver_count == 0:
max_pserver_count = 1
if max_pserver_count < slice_count:
split_count = max_pserver_count
block_size = int(math.ceil(var_numel / float(split_count)))
if len(var.shape) >= 2:
# align by dim1(width)
dim1 = reduce(lambda x, y: x * y, var.shape[1:], 1)
remains = block_size % dim1
if remains != 0:
block_size += dim1 - remains
# update split_count after aligning
split_count = int(math.ceil(var_numel / float(block_size)))
for block_id in range(split_count):
curr_block_size = min(
block_size, var_numel - ((block_id) * block_size)
)
block = vars_metatools.VarBlock(
var.name, block_id, curr_block_size
)
blocks.append(str(block))
else:
block_size = var.shape[0] / slice_count
remainder = var.shape[0] % slice_count
if block_size == 0:
dim0s = [block_size] * remainder
else:
dim0s = [block_size] * slice_count
for i in range(remainder):
dim0s[i] = dim0s[i] + 1
dim1 = reduce(lambda x, y: x * y, var.shape[1:], 1)
for block_id in range(len(dim0s)):
numel = dim0s[block_id] * dim1
block = vars_metatools.VarBlock(var.name, block_id, numel)
blocks.append(str(block))
return blocks
def _get_param_grad_blocks(self, pairs, min_block_size, uniform=False):
param_list = []
grad_list = []
param_grad_set = set()
for p, g in pairs:
# todo(tangwei12) skip parameter marked not trainable
# if type(p) == Parameter and p.trainable == False:
# continue
p = p.merged_var
g = g.merged_var
if p.name not in param_grad_set:
param_list.append(p)
param_grad_set.add(p.name)
if g.name not in param_grad_set:
grad_list.append(g)
param_grad_set.add(g.name)
# when we slice var up into blocks, we will slice the var according to
# pserver services' count. A pserver may have two or more listening ports.
grad_blocks = self._slice_variable(
grad_list, len(self.get_ps_endpoints()), min_block_size, uniform
)
param_blocks = self._slice_variable(
param_list, len(self.get_ps_endpoints()), min_block_size, uniform
)
return param_blocks, grad_blocks
def _var_slice_and_distribute(self):
# update these mappings for further transpile:
# 1. param_var_mapping : param var name->[split params vars]
# 2. grad_var_mapping : grad var name->[split grads vars]
# 3. grad_param_mapping : grad.blockx->param.blockx
# 4. param_grad_ep_mapping : ep->{"params" : [], "grads" : [] }
dps, dgs = self._get_param_grad_blocks(
self.merged_dense_pairs, self.min_block_size, False
)
sps, sgs = self._get_param_grad_blocks(
self.merged_sparse_pairs, self.min_block_size, True
)
param_blocks = dps + sps
grad_blocks = dgs + sgs
assert len(grad_blocks) == len(param_blocks)
# origin_param_name->[splited_param_vars]
self.param_var_mapping = self._create_vars_from_blocklist(param_blocks)
self.grad_var_mapping = self._create_vars_from_blocklist(grad_blocks)
# dict(grad_splited_var->param_splited_var)
self.grad_param_mapping = collections.OrderedDict()
for g, p in zip(grad_blocks, param_blocks):
g_name, g_bid, _ = g.split(":")
p_name, p_bid, _ = p.split(":")
self.grad_param_mapping[
self.grad_var_mapping[g_name][int(g_bid)]
] = self.param_var_mapping[p_name][int(p_bid)]
print_maps = {}
for k, v in self.grad_param_mapping.items():
print_maps[str(k)] = str(v)
# create mapping of endpoint->split var to create pserver side program
self.param_grad_ep_mapping = collections.OrderedDict()
[
self.param_grad_ep_mapping.update({ep: {"params": [], "grads": []}})
for ep in self.get_ps_endpoints()
]
def _build_var_distributed(self):
self.var_distributed = vars_metatools.VarsDistributed()
sparse_pairs, dense_pairs = self.get_param_grads()
origin_for_sparse = []
origin_for_dense = []
param_name_grad_name = {}
grad_name_to_param_name = {}
for param, grad in sparse_pairs:
param = vars_metatools.create_var_struct(param)
grad = vars_metatools.create_var_struct(grad)
origin_for_sparse.append((param, grad))
for param, grad in dense_pairs:
param = vars_metatools.create_var_struct(param)
grad = vars_metatools.create_var_struct(grad)
origin_for_dense.append((param, grad))
for dense_pair in origin_for_dense:
param, grad = dense_pair
m_param = MergedVariable(param, [param], [0])
m_grad = MergedVariable(grad, [grad], [0])
self.merged_variables_pairs.append((m_param, m_grad))
self.merged_dense_pairs.append((m_param, m_grad))
for sparse_pair in origin_for_sparse:
param, grad = sparse_pair
m_param = MergedVariable(param, [param], [0])
m_grad = MergedVariable(grad, [grad], [0])
self.merged_variables_pairs.append((m_param, m_grad))
self.merged_sparse_pairs.append((m_param, m_grad))
for merged in self.merged_variables_pairs:
m_param, m_grad = merged
self.merged_variable_map[m_param.merged_var.name] = (
m_param.merged_var
)
self.merged_variable_map[m_grad.merged_var.name] = m_grad.merged_var
param_merges = []
param_merges.extend(origin_for_sparse)
param_merges.extend(origin_for_dense)
for param, grad in param_merges:
param_name_grad_name[param.name] = grad.name
grad_name_to_param_name[grad.name] = param.name
self.origin_sparse_pairs = origin_for_sparse
self.origin_dense_pairs = origin_for_dense
self.param_name_to_grad_name = param_name_grad_name
self.grad_name_to_param_name = grad_name_to_param_name
sparse_pair_map = collections.OrderedDict()
for pair in self.origin_sparse_pairs + self.origin_dense_pairs:
param, grad = pair
sparse_pair_map[param.name] = str(param)
sparse_pair_map[grad.name] = str(grad)
self._var_slice_and_distribute()
self._dispatcher()
def get_param_grads(self):
origin_program = self.origin_main_program
def _get_params_grads(sparse_varnames):
block = origin_program.global_block()
dense_param_grads = []
sparse_param_grads = []
optimize_params = set()
origin_var_dict = origin_program.global_block().vars
role_id = int(core.op_proto_and_checker_maker.OpRole.Backward)
for op in block.ops:
if _is_opt_role_op(op):
# delete clip op from opt_ops when run in Parameter Server mode
if (
OP_NAME_SCOPE in op.all_attrs()
and CLIP_OP_NAME_SCOPE in op.attr(OP_NAME_SCOPE)
):
op._set_attr("op_role", role_id)
continue
if op.attr(OP_ROLE_VAR_ATTR_NAME):
param_name = op.attr(OP_ROLE_VAR_ATTR_NAME)[0]
grad_name = op.attr(OP_ROLE_VAR_ATTR_NAME)[1]
if param_name not in optimize_params:
optimize_params.add(param_name)
param_grad = (
origin_var_dict[param_name],
origin_var_dict[grad_name],
)
if param_name in sparse_varnames:
sparse_param_grads.append(param_grad)
else:
dense_param_grads.append(param_grad)
return sparse_param_grads, dense_param_grads
def _get_sparse_varnames():
varnames = []
for op in origin_program.global_block().ops:
if (
op.type in SPARSE_OP_TYPE_DICT.keys()
and op.attr('remote_prefetch') is True
):
param_name = op.input(SPARSE_OP_TYPE_DICT[op.type])[0]
varnames.append(param_name)
return list(set(varnames))
sparse_varnames = _get_sparse_varnames()
sparse_param_grads, dense_param_grads = _get_params_grads(
sparse_varnames
)
return sparse_param_grads, dense_param_grads
def remove_var_pair_by_grad(self, var_name):
for index, pair in enumerate(self.merged_variables_pairs):
var = pair[0]
var_grad = pair[1]
if var_grad.merged_var.name == var_name:
del self.merged_variables_pairs[index]
for index, pair in enumerate(self.merged_dense_pairs):
var = pair[0]
var_grad = pair[1]
if var_grad.merged_var.name == var_name:
del self.merged_dense_pairs[index]
return
for index, pair in enumerate(self.merged_sparse_pairs):
var = pair[0]
var_grad = pair[1]
if var_grad.merged_var.name == var_name:
del self.merged_sparse_pairs[index]
return
print(f"Not find {var_name} in self.merge_pairs")
def _is_opt_role_op(op):
# NOTE : depend on oprole to find out whether this op is for
# optimize
op_maker = core.op_proto_and_checker_maker
optimize_role = core.op_proto_and_checker_maker.OpRole.Optimize
if op_maker.kOpRoleAttrName() in op.attr_names and int(
op.all_attrs()[op_maker.kOpRoleAttrName()]
) == int(optimize_role):
return True
return False
def _get_optimize_ops(_program):
block = _program.global_block()
opt_ops = []
for op in block.ops:
if _is_opt_role_op(op):
# delete clip op from opt_ops when run in Parameter Server mode
if (
OP_NAME_SCOPE in op.all_attrs()
and CLIP_OP_NAME_SCOPE in op.attr(OP_NAME_SCOPE)
):
op._set_attr(
"op_role",
int(core.op_proto_and_checker_maker.OpRole.Backward),
)
continue
opt_ops.append(op)
return opt_ops
def _add_lr_decay_table_pass(main_program, compiled_config, lr_decay_steps):
if hasattr(compiled_config.origin_main_program, 'lr_scheduler'):
from paddle.optimizer.lr import LRScheduler
assert isinstance(
compiled_config.origin_main_program.lr_scheduler, LRScheduler
), "must be LRScheduler"
ops = _get_optimize_ops(compiled_config.origin_main_program)
lr_param_dict = _get_lr_param_dict(ops)
(
lr_decay_main_program,
lr_decay_startup_program,
lr_name,
) = _get_lr_scheduler_program(
compiled_config.origin_main_program.lr_scheduler,
lr_param_dict,
lr_decay_steps,
)
compiled_config.add_tensor_table(
"@LR_DECAY_COUNTER@",
lr_name,
lr_decay_startup_program,
lr_decay_main_program,
"GlobalStepTable",
)
def _get_lr_param_dict(opt_ops):
lr_param_dict = {}
for op in opt_ops:
lr_name = op.input("LearningRate")[0]
param_name = op.input("Param")[0]
if lr_name not in lr_param_dict:
lr_param_dict[lr_name] = []
lr_param_dict[lr_name].append(param_name)
return lr_param_dict
def _get_lr_scheduler_program(lr_scheduler, lr_param_dict, lr_decay_steps):
scheduler_decay = [
'NoamDecay',
'NaturalExpDecay',
'InverseTimeDecay',
'ExponentialDecay',
]
from paddle.optimizer.lr import (
ExponentialDecay,
InverseTimeDecay,
NaturalExpDecay,
NoamDecay,
exponential_decay,
inverse_time_decay,
natural_exp_decay,
noam_decay,
)
decay_main_program = paddle.static.Program()
decay_startup_program = paddle.static.Program()
lr_name = ""
if isinstance(lr_scheduler, ExponentialDecay):
with paddle.static.program_guard(
decay_main_program, decay_startup_program
):
lr = exponential_decay(
1.0, lr_decay_steps, lr_scheduler.gamma, True
)
lr_name = lr.name
logging.warn(
"ExponentialDecay is set, staircase = True, global learning rate decay step is [ %d ], Change decay steps as follow: \n"
"\t strategy = paddle.distributed.fleet.DistributedStrategy() \n "
"\t strategy.a_sync = True \n"
"\t strategy.a_sync_configs= { 'lr_decay_steps' : YOUR_DECAY_STEP } \n"
% lr_decay_steps
)
elif isinstance(lr_scheduler, NoamDecay):
with paddle.static.program_guard(
decay_main_program, decay_startup_program
):
lr = noam_decay(
lr_scheduler.d_model, lr_scheduler.warmup_steps, 1.0
)
lr_name = lr.name
logging.warn(
"NoamDecay is set, warmup steps is [ %d ]"
% lr_scheduler.warmup_steps
)
elif isinstance(lr_scheduler, NaturalExpDecay):
with paddle.static.program_guard(
decay_main_program, decay_startup_program
):
lr = natural_exp_decay(
1.0, lr_decay_steps, lr_scheduler.gamma, True
)
lr_name = lr.name
logging.warn(
"NaturalExpDecay is set, staircase = True, global learning rate decay step is [ %d ], Change decay steps as follow: \n"
"\t strategy = paddle.distributed.fleet.DistributedStrategy() \n "
"\t strategy.a_sync = True \n"
"\t strategy.a_sync_configs= { 'lr_decay_steps' : YOUR_DECAY_STEP } \n"
% lr_decay_steps
)
elif isinstance(lr_scheduler, InverseTimeDecay):
with paddle.static.program_guard(
decay_main_program, decay_startup_program
):
lr = inverse_time_decay(
1.0, lr_decay_steps, lr_scheduler.gamma, True
)
lr_name = lr.name
logging.warn(
"InverseTimeDecay is set, staircase = True, global learning rate decay step is [ %d ], Change decay steps as follow: \n"
"\t strategy = paddle.distributed.fleet.DistributedStrategy() \n "
"\t strategy.a_sync = True \n"
"\t strategy.a_sync_configs= { 'lr_decay_steps' : YOUR_DECAY_STEP } \n"
% lr_decay_steps
)
else:
raise ValueError(
f"Not supported current LearningRate strategy, please use follow decay strategy: {scheduler_decay}"
)
return decay_main_program, decay_startup_program, lr_name
def _get_varname_parts(varname):
# returns origin, blockid, trainerid
orig_var_name = ""
trainer_part = ""
block_part = ""
trainer_idx = varname.find(".trainer_")
if trainer_idx >= 0:
trainer_part = varname[trainer_idx + 1 :]
else:
trainer_idx = len(varname)
block_index = varname.find(".block")
if block_index >= 0:
block_part = varname[block_index + 1 : trainer_idx]
else:
block_index = len(varname)
orig_var_name = varname[0 : min(block_index, trainer_idx)]
return orig_var_name, block_part, trainer_part
def _orig_varname(varname):
orig, _, _ = _get_varname_parts(varname)
return orig
```
|
```go
package test
func init() {
testCases = append(testCases,
(*[][4]bool)(nil),
(*[][4]byte)(nil),
(*[][4]float64)(nil),
(*[][4]int32)(nil),
(*[][4]*string)(nil),
(*[][4]string)(nil),
(*[][4]uint8)(nil),
(*[]bool)(nil),
(*[]byte)(nil),
(*[]float64)(nil),
(*[]int32)(nil),
(*[]int64)(nil),
(*[]map[int32]string)(nil),
(*[]map[string]string)(nil),
(*[4]*[4]bool)(nil),
(*[4]*[4]byte)(nil),
(*[4]*[4]float64)(nil),
(*[4]*[4]int32)(nil),
(*[4]*[4]*string)(nil),
(*[4]*[4]string)(nil),
(*[4]*[4]uint8)(nil),
(*[]*bool)(nil),
(*[]*float64)(nil),
(*[]*int32)(nil),
(*[]*map[int32]string)(nil),
(*[]*map[string]string)(nil),
(*[]*[]bool)(nil),
(*[]*[]byte)(nil),
(*[]*[]float64)(nil),
(*[]*[]int32)(nil),
(*[]*[]*string)(nil),
(*[]*[]string)(nil),
(*[]*[]uint8)(nil),
(*[]*string)(nil),
(*[]*struct {
String string
Int int32
Float float64
Struct struct {
X string
}
Slice []string
Map map[string]string
})(nil),
(*[]*uint8)(nil),
(*[][]bool)(nil),
(*[][]byte)(nil),
(*[][]float64)(nil),
(*[][]int32)(nil),
(*[][]*string)(nil),
(*[][]string)(nil),
(*[][]uint8)(nil),
(*[]string)(nil),
(*[]struct{})(nil),
(*[]structEmpty)(nil),
(*[]struct {
F *string
})(nil),
(*[]struct {
String string
Int int32
Float float64
Struct struct {
X string
}
Slice []string
Map map[string]string
})(nil),
(*[]uint8)(nil),
(*[]jsonMarshaler)(nil),
(*[]jsonMarshalerMap)(nil),
(*[]textMarshaler)(nil),
(*[]textMarshalerMap)(nil),
)
}
type jsonMarshaler struct {
Id string `json:"id,omitempty" db:"id"`
}
func (p *jsonMarshaler) MarshalJSON() ([]byte, error) {
return []byte(`{}`), nil
}
func (p *jsonMarshaler) UnmarshalJSON(input []byte) error {
p.Id = "hello"
return nil
}
type jsonMarshalerMap map[int]int
func (p *jsonMarshalerMap) MarshalJSON() ([]byte, error) {
return []byte(`{}`), nil
}
func (p *jsonMarshalerMap) UnmarshalJSON(input []byte) error {
return nil
}
type textMarshaler struct {
Id string `json:"id,omitempty" db:"id"`
}
func (p *textMarshaler) MarshalText() ([]byte, error) {
return []byte(`{}`), nil
}
func (p *textMarshaler) UnmarshalText(input []byte) error {
p.Id = "hello"
return nil
}
type textMarshalerMap map[int]int
func (p *textMarshalerMap) MarshalText() ([]byte, error) {
return []byte(`{}`), nil
}
func (p *textMarshalerMap) UnmarshalText(input []byte) error {
return nil
}
```
|
```kotlin
package de.westnordost.streetcomplete.quests.barrier_type
import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression
import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry
import de.westnordost.streetcomplete.data.osm.mapdata.Element
import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry
import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType
import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.OUTDOORS
import de.westnordost.streetcomplete.osm.Tags
import de.westnordost.streetcomplete.osm.hasCheckDate
import de.westnordost.streetcomplete.osm.updateCheckDate
class AddStileType : OsmElementQuestType<StileTypeAnswer> {
private val stileNodeFilter by lazy { """
nodes with
barrier = stile
and (!stile or older today -8 years)
""".toElementFilterExpression() }
private val excludedWaysFilter by lazy { """
ways with
access ~ private|no
and foot !~ permissive|yes|designated
""".toElementFilterExpression() }
override fun getApplicableElements(mapData: MapDataWithGeometry): Iterable<Element> {
val excludedWayNodeIds = mapData.ways
.filter { excludedWaysFilter.matches(it) }
.flatMapTo(HashSet()) { it.nodeIds }
return mapData.nodes
.filter { stileNodeFilter.matches(it) && it.id !in excludedWayNodeIds }
}
override fun isApplicableTo(element: Element): Boolean? =
if (!stileNodeFilter.matches(element)) false else null
override val changesetComment = "Specify stile types"
override val wikiLink = "Key:stile"
override val icon = R.drawable.ic_quest_no_cow
override val isDeleteElementEnabled = true
override val achievements = listOf(OUTDOORS)
override fun getTitle(tags: Map<String, String>) = R.string.quest_stile_type_title
override fun createForm() = AddStileTypeForm()
override fun applyAnswerTo(answer: StileTypeAnswer, tags: Tags, geometry: ElementGeometry, timestampEdited: Long) {
when (answer) {
is StileType -> {
val newType = answer.osmValue
val newMaterial = answer.osmMaterialValue
val oldType = tags["stile"]
val oldMaterial = tags["material"]
val stileWasRebuilt =
oldType != null && oldType != newType
|| newMaterial != null && oldMaterial != null && oldMaterial != newMaterial
// => properties that refer to the old replaced stile should be removed
if (stileWasRebuilt) {
STILE_PROPERTIES.forEach { tags.remove(it) }
}
if (newMaterial != null) {
tags["material"] = newMaterial
}
tags["stile"] = newType
}
is ConvertedStile -> {
STILE_PROPERTIES.forEach { tags.remove(it) }
tags.remove("stile")
tags["barrier"] = answer.newBarrier
}
}
// policy is to not remove a check date if one is already there but update it instead
if (!tags.hasChanges || tags.hasCheckDate()) {
tags.updateCheckDate()
}
}
companion object {
private val STILE_PROPERTIES = listOf(
"step_count", "wheelchair", "bicycle",
"dog_gate", "material", "height", "width", "stroller", "steps"
)
}
}
```
|
```go
//
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing, software
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
package integration
import (
"context"
"crypto/tls"
"fmt"
"math/rand"
"net/http"
"os"
"testing"
"time"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/wait"
genericoptions "k8s.io/apiserver/pkg/server/options"
restclient "k8s.io/client-go/rest"
"k8s.io/klog/v2"
v3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
calicoclient "github.com/projectcalico/api/pkg/client/clientset_generated/clientset"
"github.com/projectcalico/calico/apiserver/cmd/apiserver/server"
"github.com/projectcalico/calico/apiserver/pkg/apiserver"
)
const defaultEtcdPathPrefix = ""
type TestServerConfig struct {
etcdServerList []string
emptyObjFunc func() runtime.Object
}
// NewTestServerConfig is a default constructor for the standard test-apiserver setup
func NewTestServerConfig() *TestServerConfig {
return &TestServerConfig{
etcdServerList: []string{"path_to_url"},
}
}
func withConfigGetFreshApiserverServerAndClient(
t *testing.T,
serverConfig *TestServerConfig,
) (*apiserver.ProjectCalicoServer,
calicoclient.Interface,
*restclient.Config,
func(),
) {
securePort := rand.Intn(31743) + 1024
secureAddr := fmt.Sprintf("path_to_url", securePort)
stopCh := make(chan struct{})
serverFailed := make(chan struct{})
shutdownServer := func() {
t.Logf("Shutting down server on port: %d", securePort)
close(stopCh)
}
t.Logf("Starting server on port: %d", securePort)
ro := genericoptions.NewRecommendedOptions(defaultEtcdPathPrefix, apiserver.Codecs.LegacyCodec(v3.SchemeGroupVersion))
ro.Etcd.StorageConfig.Transport.ServerList = serverConfig.etcdServerList
ro.Features.EnablePriorityAndFairness = false
options := &server.CalicoServerOptions{
RecommendedOptions: ro,
DisableAuth: true,
StopCh: stopCh,
}
options.RecommendedOptions.SecureServing.BindPort = securePort
options.RecommendedOptions.CoreAPI.CoreAPIKubeconfigPath = os.Getenv("KUBECONFIG")
var err error
pcs, err := server.PrepareServer(options)
if err != nil {
close(serverFailed)
t.Fatalf("Error preparing the server: %v", err)
}
// Run the server in the background
go func() {
err := server.RunServer(options, pcs)
if err != nil {
close(serverFailed)
}
}()
if err := waitForApiserverUp(secureAddr, serverFailed); err != nil {
t.Fatalf("%v", err)
}
if pcs == nil {
t.Fatal("Calico server is nil")
}
cfg := &restclient.Config{}
cfg.Host = secureAddr
cfg.Insecure = true
clientset, err := calicoclient.NewForConfig(cfg)
if nil != err {
t.Fatal("can't make the client from the config", err)
}
return pcs, clientset, cfg, shutdownServer
}
func getFreshApiserverAndClient(
t *testing.T,
newEmptyObj func() runtime.Object,
) (calicoclient.Interface, func()) {
serverConfig := &TestServerConfig{
etcdServerList: []string{"path_to_url"},
emptyObjFunc: newEmptyObj,
}
_, client, _, shutdownFunc := withConfigGetFreshApiserverServerAndClient(t, serverConfig)
return client, shutdownFunc
}
func waitForApiserverUp(serverURL string, stopCh <-chan struct{}) error {
interval := 1 * time.Second
timeout := 30 * time.Second
startWaiting := time.Now()
tries := 0
return wait.PollUntilContextTimeout(context.Background(), interval, timeout, true,
func(ctx context.Context) (bool, error) {
select {
// we've been told to stop, so no reason to keep going
case <-stopCh:
return true, fmt.Errorf("apiserver failed")
default:
klog.Infof("Waiting for : %#v", serverURL)
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
c := &http.Client{Transport: tr}
_, err := c.Get(serverURL)
if err == nil {
klog.Infof("Found server after %v tries and duration %v",
tries, time.Since(startWaiting))
return true, nil
}
tries++
return false, nil
}
},
)
}
```
|
The Porvenir Formation is a geologic formation exposed in the southeastern Sangre de Cristo Mountains of New Mexico. It preserves fossils dating back to the middle Pennsylvanian period.
Description
The formation is mostly marine and can be divided into three intergrading facies. The first, located primarily to the south, is mostly limestone with some interbedded shale and sandstone. The second facies, located to the north and northwest, is mostly gray shale with some thick limestone and thin sandstone beds. The third facies, found to the northeast, is mostly shale, limestone (including sandy and oolitic limestone) and arkosic sandstone. Thickness is .
The formation rests conformably on the Sandia Formation and is disconformably overlain by the Alamitos Formation.
Fossils
The formation contains fusulinids of Desmoinesian (Moscovian) age.
History of investigation
The formation was first named by Baltz and Myers in 1984, who considered it correlative with the lower part of the Madera Formation. However, in 2004, Kues and Giles recommended restricting the Madera Group to shelf and marginal basin beds of Desmoinean (upper Moscovian) to early Virgilian age, which excluded the Porvenir Formation. Spencer G. Lucas and coinvestigators also exclude the Porvenir Formation from the Madera Group.
See also
List of fossiliferous stratigraphic units in New Mexico
Paleontology in New Mexico
References
Carboniferous formations of New Mexico
Carboniferous southern paleotropical deposits
|
The 1991 State of the Union Address was given by the 41st president of the United States, George H. W. Bush, on January 29, 1991, at 9:00 p.m. EST, in the chamber of the United States House of Representatives to the 102nd United States Congress. It was Bush's second State of the Union Address and his third speech to a joint session of the United States Congress. Presiding over this joint session was the House speaker, Tom Foley, accompanied by Dan Quayle, the vice president, in his capacity as the president of the Senate.
The speech lasted approximately 48 minutes. and contained 3823 words.
The Democratic Party response was delivered by Senator George Mitchell (ME).
Manuel Lujan, the Secretary of the Interior, served as the designated survivor.
References
External links
(full transcript), The American Presidency Project, UC Santa Barbara.
1991 State of the Union Address (video) at C-SPAN
1991 State of the Union Response (transcript)
1991 State of the Union Response (video) at C-SPAN
Full video and audio, Miller Center of Public Affairs, University of Virginia.
State of the Union addresses
State Union 1991
102nd United States Congress
State of the Union Address
State of the Union Address
State of the Union Address
State of the Union Address
January 1991 events in the United States
|
```java
package com.fishercoder.solutions.firstthousand;
import java.util.HashMap;
import java.util.Stack;
public class _631 {
public static class Solution1 {
/**
* Credit: path_to_url#approach-1-using-topological-sortaccepted
*/
public static class Excel {
Formula[][] formulas;
class Formula {
Formula(HashMap<String, Integer> c, int v) {
val = v;
cells = c;
}
HashMap<String, Integer> cells;
int val;
}
Stack<int[]> stack = new Stack<>();
public Excel(int H, char W) {
formulas = new Formula[H][(W - 'A') + 1];
}
public int get(int r, char c) {
if (formulas[r - 1][c - 'A'] == null) {
return 0;
}
return formulas[r - 1][c - 'A'].val;
}
public void set(int r, char c, int v) {
formulas[r - 1][c - 'A'] = new Formula(new HashMap<String, Integer>(), v);
topologicalSort(r - 1, c - 'A');
execute_stack();
}
public int sum(int r, char c, String[] strs) {
HashMap<String, Integer> cells = convert(strs);
int summ = calculate_sum(r - 1, c - 'A', cells);
set(r, c, summ);
formulas[r - 1][c - 'A'] = new Formula(cells, summ);
return summ;
}
public void topologicalSort(int r, int c) {
for (int i = 0; i < formulas.length; i++) {
for (int j = 0; j < formulas[0].length; j++) {
if (formulas[i][j] != null && formulas[i][j].cells.containsKey("" + (char) ('A' + c) + (r + 1))) {
topologicalSort(i, j);
}
}
}
stack.push(new int[]{r, c});
}
public void execute_stack() {
while (!stack.isEmpty()) {
int[] top = stack.pop();
if (formulas[top[0]][top[1]].cells.size() > 0) {
calculate_sum(top[0], top[1], formulas[top[0]][top[1]].cells);
}
}
}
public HashMap<String, Integer> convert(String[] strs) {
HashMap<String, Integer> res = new HashMap<>();
for (String st : strs) {
if (st.indexOf(":") < 0) {
res.put(st, res.getOrDefault(st, 0) + 1);
} else {
String[] cells = st.split(":");
int si = Integer.parseInt(cells[0].substring(1));
int ei = Integer.parseInt(cells[1].substring(1));
char sj = cells[0].charAt(0);
char ej = cells[1].charAt(0);
for (int i = si; i <= ei; i++) {
for (char j = sj; j <= ej; j++) {
res.put("" + j + i, res.getOrDefault("" + j + i, 0) + 1);
}
}
}
}
return res;
}
public int calculate_sum(int r, int c, HashMap<String, Integer> cells) {
int sum = 0;
for (String s : cells.keySet()) {
int x = Integer.parseInt(s.substring(1)) - 1;
int y = s.charAt(0) - 'A';
sum += (formulas[x][y] != null ? formulas[x][y].val : 0) * cells.get(s);
}
formulas[r][c] = new Formula(cells, sum);
return sum;
}
}
}
/**
* Your Excel object will be instantiated and called as such:
* Excel obj = new Excel(H, W);
* obj.set(r,c,v);
* int param_2 = obj.get(r,c);
* int param_3 = obj.sum(r,c,strs);
*/
}
```
|
Collier and McKeel is a brand of Tennessee whiskey produced in Nashville. The whiskey was originally distilled by Tennessee Distilling Company, a corporation founded in 2009 in Franklin, Tennessee, by former Tennessee state representative Mike Williams. The brand was sold to North Coast Spirits, a California business group, in 2014, but distillation and other operations remained in Nashville.
History
After President Washington stopped the Whiskey Rebellion in Pennsylvania in 1794, two whiskey makers from Virginia and North Carolina – William Collier and James McKeel – feared similar events could happen in their own states, so they moved to Tennessee, where they used their knowledge of Scottish and Irish whiskey making to make their own sour mash whiskey. Centuries later, Collier and McKeel's whiskey history began again when Mike Williams, who is a descendant of the original whiskey makers, helped pass new legislation that revised Tennessee state laws related to distilling in 2009. Prior to the passing of the bill, alcohol could only be distilled in three Tennessee counties: Coffee, Moore and Lincoln (origin of the Lincoln County Process used to make Tennessee whiskey).
Williams opened the first Collier and McKeel distillery in the old Marathon Auto Works building (next to Corsair Artisan Distillery), located near the state capitol building in Nashville in 2009. The first distilled whiskeys – aged in 5-gallon and 15-gallon barrels – were available for sale in 2011. The original product line consisted of Tennessee whiskey, a cinnamon whiskey, a vodka, and a white dog unaged whiskey – also known as moonshine.
In 2012, Collier and McKeel moved its distillery operations to the Speakeasy Spirits (now Pennington Distilling Co.) complex in West Nashville. Speakeasy used Collier and McKeel Tennessee whiskey in combination with other flavors to create Whisper Creek Tennessee Sipping Cream at a milder 40 proof. Nashville chef Deb Paquette helped create the recipe.
In May 2013, Collier and McKeel signed an agreement with The Vintner Group to expand distribution to parts of the East Coast. The deal made the distillery's whiskey available to liquor stores and restaurants in Maryland, Delaware, Florida and Washington D.C. and designated Rhode Island, New York, Connecticut, New Jersey and Massachusetts in the Northeast and Indiana and Illinois in the Midwest as distribution targets. Mike Williams called the deal a "major move" for the company. In May 2014, he announced the sale of Collier and McKeel to North Coast Spirits.
Whiskey
Collier and McKeel Tennessee Whiskey uses a mash of 70% corn, 15% rye, and 15% malted barley with ingredients obtained from local farms. That includes using limestone-filtered water from Big Richland Creek on Collier Farm (which belongs to the Williams family) in Humphreys County. The whiskey is filtered using the Lincoln County Process — a requirement for all Tennessee whiskeys (except Prichard's) — but Collier and McKeel alters the method slightly by pumping the whiskey slowly through the charcoal instead of using gravity to drip the liquid through the charcoal.
The company originally used small casks for aging but added traditional 53-gallon barrel sizes for aging in 2013. According to master distiller Mike Williams, "Nothing can take the place of time, but the 15-gallon [-liter] barrels allowed us to age the whiskey a little more quickly to start." After 2013, the company focused on larger barrels with only limited production of smaller barrel whiskeys. The brand also started using a new label that featured "Pappy," the distillery's copper still, Big Richland Creek and a rustic barn. Each bottle included a real thumbprint added by Mike Williams.
Collier and McKeel's unaged white dog whiskey received a silver medal from the American Distilling Institute in 2012 in the Artisan American Spirits category. Wine Enthusiast gave the Collier and McKeel Tennessee Whiskey a score of 92 and rated it Best of Year in 2016.
References
2009 establishments in Tennessee
Cuisine of the Southern United States
Distilleries in Tennessee
Tourist attractions in Tennessee
Tennessee whiskey
|
```go
package brotli
import "encoding/binary"
Distributed under MIT license.
See file LICENSE for detail or copy at path_to_url
*/
/* Write bits into a byte array. */
/* This function writes bits into bytes in increasing addresses, and within
a byte least-significant-bit first.
The function can write up to 56 bits in one go with WriteBits
Example: let's assume that 3 bits (Rs below) have been written already:
BYTE-0 BYTE+1 BYTE+2
0000 0RRR 0000 0000 0000 0000
Now, we could write 5 or less bits in MSB by just sifting by 3
and OR'ing to BYTE-0.
For n bits, we take the last 5 bits, OR that with high bits in BYTE-0,
and locate the rest in BYTE+1, BYTE+2, etc. */
func writeBits(n_bits uint, bits uint64, pos *uint, array []byte) {
/* This branch of the code can write up to 56 bits at a time,
7 bits are lost by being perhaps already in *p and at least
1 bit is needed to initialize the bit-stream ahead (i.e. if 7
bits are in *p and we write 57 bits, then the next write will
access a byte that was never initialized). */
p := array[*pos>>3:]
v := uint64(p[0])
v |= bits << (*pos & 7)
binary.LittleEndian.PutUint64(p, v)
*pos += n_bits
}
func writeSingleBit(bit bool, pos *uint, array []byte) {
if bit {
writeBits(1, 1, pos, array)
} else {
writeBits(1, 0, pos, array)
}
}
func writeBitsPrepareStorage(pos uint, array []byte) {
assert(pos&7 == 0)
array[pos>>3] = 0
}
```
|
```javascript
Symbols in ES6
Internationalization & Localization
ES6 Arrow Functions
Generators as iterators in ES6
ES6 Generator Transpiler
```
|
```c
/* $OpenBSD: db_memrw.c,v 1.2 2024/02/23 18:19:03 cheloha Exp $ */
/* $NetBSD: db_memrw.c,v 1.8 2006/02/24 00:57:19 uwe Exp $ */
/*
* Mach Operating System
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* db_interface.c,v 2.4 1991/02/05 17:11:13 mrt (CMU)
*/
/*
* Routines to read and write memory on behalf of the debugger, used
* by DDB.
*/
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/stdint.h>
#include <uvm/uvm_extern.h>
#include <machine/db_machdep.h>
#include <ddb/db_access.h>
/*
* Read bytes from kernel address space for debugger.
*/
void
db_read_bytes(vaddr_t addr, size_t size, void *datap)
{
char *data = datap, *src = (char *)addr;
/* properly aligned 4-byte */
if (size == 4 && ((addr & 3) == 0) && (((uintptr_t)data & 3) == 0)) {
*(uint32_t *)data = *(uint32_t *)src;
return;
}
/* properly aligned 2-byte */
if (size == 2 && ((addr & 1) == 0) && (((uintptr_t)data & 1) == 0)) {
*(uint16_t *)data = *(uint16_t *)src;
return;
}
while (size-- > 0)
*data++ = *src++;
}
/*
* Write bytes to kernel address space for debugger.
*/
void
db_write_bytes(vaddr_t addr, size_t size, void *datap)
{
char *data = datap, *dst = (char *)addr;
/* properly aligned 4-byte */
if (size == 4 && ((addr & 3) == 0) && (((uintptr_t)data & 3) == 0)) {
*(uint32_t *)dst = *(const uint32_t *)data;
return;
}
/* properly aligned 2-byte */
if (size == 2 && ((addr & 1) == 0) && (((uintptr_t)data & 1) == 0)) {
*(uint16_t *)dst = *(const uint16_t *)data;
return;
}
while (size-- > 0)
*dst++ = *data++;
}
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.