text
stringlengths 1
22.8M
|
|---|
```smalltalk
//
//
// 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.
//
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Xml;
using NUnit.Framework;
using System.Windows.Markup;
#if PCL
using System.Xaml;
using System.Xaml.Schema;
#else
using System.ComponentModel;
using System.Xaml;
using System.Xaml.Schema;
#endif
namespace MonoTests.System.Xaml.Schema
{
[TestFixture]
public class XamlTypeInvokerTest
{
XamlSchemaContext sctx = new XamlSchemaContext (new XamlSchemaContextSettings ());
[Test]
public void ConstructorTypeNull ()
{
Assert.Throws<ArgumentNullException> (() => new XamlTypeInvoker (null));
}
[Test]
public void DefaultValues ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (object), sctx));
Assert.IsNull (i.SetMarkupExtensionHandler, "#1");
Assert.IsNull (i.SetTypeConverterHandler, "#2");
}
[XamlSetMarkupExtension ("HandleMarkupExtension")]
public class TestClassMarkupExtension1
{
}
// SetMarkupExtensionHandler
[Test]
public void SetHandleMarkupExtensionInvalid ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (TestClassMarkupExtension1), sctx));
Assert.Throws<ArgumentException> (() => { var t = i.SetMarkupExtensionHandler; }, "#1");
}
[XamlSetMarkupExtension ("HandleMarkupExtension")]
public class TestClassMarkupExtension2
{
// delegate type mismatch
void HandleMarkupExtension ()
{
}
}
[Test]
public void SetHandleMarkupExtensionInvalid2 ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (TestClassMarkupExtension2), sctx));
Assert.Throws<ArgumentException> (() => { var t = i.SetMarkupExtensionHandler; }, "#1");
}
[XamlSetMarkupExtension ("HandleMarkupExtension")]
public class TestClassMarkupExtension3
{
// must be static
public void HandleMarkupExtension (object o, XamlSetMarkupExtensionEventArgs a)
{
}
}
[Test]
public void SetHandleMarkupExtensionInvalid3 ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (TestClassMarkupExtension3), sctx));
Assert.Throws<ArgumentException> (() => { var t = i.SetMarkupExtensionHandler; }, "#1");
}
[XamlSetMarkupExtension ("HandleMarkupExtension")]
public class TestClassMarkupExtension4
{
// can be private.
static void HandleMarkupExtension (object o, XamlSetMarkupExtensionEventArgs a)
{
}
}
[Test]
public void SetHandleMarkupExtension ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (TestClassMarkupExtension4), sctx));
Assert.IsNotNull (i.SetMarkupExtensionHandler, "#1");
}
// SetTypeConverterHandler
[XamlSetTypeConverter ("HandleTypeConverter")]
public class TestClassTypeConverter1
{
}
[Test]
public void SetHandleTypeConverterInvalid ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (TestClassTypeConverter1), sctx));
Assert.Throws<ArgumentException> (() => { var t = i.SetTypeConverterHandler; }, "#1");
}
[XamlSetTypeConverter ("HandleTypeConverter")]
public class TestClassTypeConverter2
{
// delegate type mismatch
void HandleTypeConverter ()
{
}
}
[Test]
public void SetHandleTypeConverterInvalid2 ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (TestClassTypeConverter2), sctx));
Assert.Throws<ArgumentException> (() => { var t = i.SetTypeConverterHandler; }, "#1");
}
[XamlSetTypeConverter ("HandleTypeConverter")]
public class TestClassTypeConverter3
{
// must be static
public void HandleTypeConverter (object o, XamlSetTypeConverterEventArgs a)
{
}
}
[Test]
public void SetHandleTypeConverterInvalid3 ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (TestClassTypeConverter3), sctx));
Assert.Throws<ArgumentException> (() => { var t = i.SetTypeConverterHandler; }, "#1");
}
[XamlSetTypeConverter ("HandleTypeConverter")]
public class TestClassTypeConverter4
{
// can be private.
static void HandleTypeConverter (object o, XamlSetTypeConverterEventArgs a)
{
}
}
[Test]
public void SetHandleTypeConverter ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (TestClassTypeConverter4), sctx));
Assert.IsNotNull (i.SetTypeConverterHandler, "#1");
}
// AddToCollection
[Test]
public void AddToCollectionNoUnderlyingType ()
{
var i = new XamlTypeInvoker (new XamlType ("urn:foo", "FooType", null, sctx));
i.AddToCollection (new List<int> (), 5); // ... passes.
}
[Test]
public void AddToCollectionArrayExtension ()
{
var i = XamlLanguage.Array.Invoker;
var ax = new ArrayExtension ();
Assert.Throws<NotSupportedException> (() => i.AddToCollection (ax, 5));
}
[Test]
public void AddToCollectionArrayInstance ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (int []), sctx));
var ax = new ArrayExtension ();
Assert.Throws<NotSupportedException> (() => i.AddToCollection (ax, 5));
}
[Test]
public void AddToCollectionList_ObjectTypeMismatch ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (List<int>), sctx));
try {
i.AddToCollection (new ArrayExtension (), 5);
Assert.Fail ("not supported operation.");
} catch (NotSupportedException) {
#if !WINDOWS_UWP
} catch (TargetException) {
#endif
// .NET throws this, but the difference should not really matter.
}
}
[Test]
public void AddToCollectionList_ObjectTypeMismatch2 ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (List<int>), sctx));
i.AddToCollection (new List<object> (), 5); // it is allowed.
}
[Test]
public void AddToCollectionList_ObjectTypeMismatch3 ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (List<object>), sctx));
i.AddToCollection (new List<int> (), 5); // it is allowed too.
}
[Test]
public void AddToCollectionList_ObjectTypeMismatch4 ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (List<Uri>), sctx));
i.AddToCollection (new List<TimeSpan> (), TimeSpan.Zero); // it is allowed too.
}
[Test]
public void AddToCollectionList_NonCollectionType ()
{
// so, the source collection type is not checked at all.
var i = new XamlTypeInvoker (new XamlType (typeof (Uri), sctx));
i.AddToCollection (new List<TimeSpan> (), TimeSpan.Zero); // it is allowed too.
}
[Test]
public void AddToCollectionList ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (List<int>), sctx));
var l = new List<int> ();
i.AddToCollection (l, 5);
i.AddToCollection (l, 3);
i.AddToCollection (l, -12);
Assert.AreEqual (3, l.Count, "#1");
Assert.AreEqual (-12, l [2], "#2");
}
[Test]
public void AddToCollectionTypeMismatch ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (List<int>), sctx));
var l = new List<int> ();
Assert.Throws<ArgumentException> (() => i.AddToCollection (l, "5"));
}
// CreateInstance
[Test]
public void CreateInstanceNoUnderlyingType ()
{
var i = new XamlTypeInvoker (new XamlType ("urn:foo", "FooType", null, sctx));
Assert.Throws<NotSupportedException> (() => i.CreateInstance (new object [0])); // unkown type is not supported
}
[Test]
public void CreateInstanceArrayExtension ()
{
var i = XamlLanguage.Array.Invoker;
i.CreateInstance (new object [0]);
}
[Test]
public void CreateInstanceArray ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (int []), sctx));
Assert.Throws<MissingMethodException> (() => i.CreateInstance (new object [0])); // no default constructor.
}
[Test]
public void CreateInstanceList_ArgumentMismatch ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (List<int>), sctx));
Assert.Throws<MissingMethodException> (() => i.CreateInstance (new object [] {"foo"}));
}
[Test]
public void CreateInstanceList ()
{
var i = new XamlTypeInvoker (new XamlType (typeof (List<int>), sctx));
i.CreateInstance (new object [0]);
}
[Test]
public void GetItems ()
{
var i = new XamlType (typeof (List<int>), sctx).Invoker;
var list = new int [] {5, -3, 0}.ToList ();
var items = i.GetItems (list);
var arr = new List<object> ();
while (items.MoveNext ())
arr.Add (items.Current);
Assert.AreEqual (5, arr [0], "#1");
Assert.AreEqual (0, arr [2], "#2");
}
[Test]
public void GetItems2 ()
{
// GetItems() returns IEnumerable<KeyValuePair<,>>
var i = new XamlType (typeof (Dictionary<int,string>), sctx).Invoker;
var dic = new Dictionary<int,string> ();
dic [5] = "foo";
dic [-3] = "bar";
dic [0] = "baz";
var items = i.GetItems (dic);
var arr = new List<object> ();
while (items.MoveNext ())
arr.Add (items.Current);
Assert.AreEqual (new KeyValuePair<int,string> (5, "foo"), arr [0], "#1");
Assert.AreEqual (new KeyValuePair<int,string> (0, "baz"), arr [2], "#1");
}
[Test]
public void UnknownInvokerCreateInstance ()
{
Assert.Throws<NotSupportedException> (() => XamlTypeInvoker.UnknownInvoker.CreateInstance (new object [0]));
}
[Test]
public void UnknownInvokerGetItems ()
{
var items = XamlTypeInvoker.UnknownInvoker.GetItems (new object [] {1});
Assert.IsNotNull (items, "#1");
Assert.IsTrue (items.MoveNext (), "#2");
Assert.AreEqual (1, items.Current, "#3");
Assert.IsFalse (items.MoveNext (), "#4");
}
[Test]
public void UnknownInvokerAddToCollection ()
{
// this does not check Unknown-ness.
var c = new List<object> ();
XamlTypeInvoker.UnknownInvoker.AddToCollection (c, 1);
Assert.AreEqual (1, c.Count, "#1");
}
[Test]
public void UnknownInvokerAddToDictionary ()
{
var dic = new Dictionary<object,object> ();
// this does not check Unknown-ness.
XamlTypeInvoker.UnknownInvoker.AddToDictionary (dic, 1, 2);
Assert.AreEqual (1, dic.Count, "#1");
}
[Test]
public void UnknownInvokerGetEnumeratorMethod ()
{
try {
Assert.IsNull (XamlTypeInvoker.UnknownInvoker.GetEnumeratorMethod (), "#1");
} catch (Exception) {
// .NET is buggy, returns NRE.
}
}
[Test]
public void UnknownInvoker ()
{
Assert.IsNull (XamlTypeInvoker.UnknownInvoker.SetMarkupExtensionHandler, "#1");
Assert.IsNull (XamlTypeInvoker.UnknownInvoker.SetTypeConverterHandler, "#2");
Assert.IsNull (XamlTypeInvoker.UnknownInvoker.GetAddMethod (XamlLanguage.Object), "#3");
}
}
}
```
|
Maurice Newman was a painter, sculptor, model maker and photographer. He was the son of Abraham Newman and Tobi Schmukler, and was born in Lithuania in 1898. He was married to Edythe Brenda Tichell from 1930 to his death in 1977. He had one daughter, Rachel Newman.
In his teens, Newman left Lithuania to live in Switzerland, and acted as a messenger, delivering messages between clandestine lovers; he spoke Russian, Lithuanian, Polish, German and Yiddish. He then lived in England and South Africa, attending the National School of Arts in Johannesburg. In the early 1920s, Newman migrated to the U.S., lived in Boston, and worked in the Newton offices of the Bachrach Studios. After a brief stint as a retoucher at the White Studios in New York City, he returned to Boston to work as a commercial artist while attending the Vesper George School of Art, the School of the Museum of Fine Arts (now the School of the Museum of Fine Arts at Tufts), and the Woodbury School of Art.
In 1940, Newman was employed as a model maker by Federal Works of Art Passive Defense Project (Federal Art Project). In 1942 he relocated to Alexandria Virginia as a civilian Army employee to head the model shop in the United States Army Engineer Research and Development Laboratory at Fort Belvoir. During World War II, he constructed dioramas and topographical bombing maps. Following the war, projects shifted to the Cold War and civil defense.
In retirement, Newman was able to fully devote his time to portrait painting, as well as sculptures in wood and aluminum. His aluminum sculpture, one of the first U.S. memorials to the six million Jews martyred by Hitler, was unveiled in 1963 at the Kansas City, Missouri Jewish Community Center; the keynote speaker at the unveiling was former President Harry S. Truman. His dioramas and miniatures were exhibited at the Boston Children's Museum, 1939 New York World's Fair and the Peabody Essex Museum.
References
20th-century American painters
20th-century American sculptors
20th-century American male artists
1898 births
1977 deaths
Federal Art Project artists
American male painters
American male sculptors
Jewish American artists
Jewish painters
Scale modeling
Visual arts genres
American people of Lithuanian-Jewish descent
American artists
20th-century American Jews
Emigrants from the Russian Empire to the United States
|
```java
package org.bouncycastle.asn1.x9;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1OctetString;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.DEROctetString;
import org.bouncycastle.math.ec.ECCurve;
import org.bouncycastle.math.ec.ECPoint;
/**
* class for describing an ECPoint as a DER object.
*/
public class X9ECPoint
extends ASN1Object
{
ECPoint p;
public X9ECPoint(
ECPoint p)
{
this.p = p.normalize();
}
public X9ECPoint(
ECCurve c,
ASN1OctetString s)
{
this.p = c.decodePoint(s.getOctets());
}
public ECPoint getPoint()
{
return p;
}
/**
* Produce an object suitable for an ASN1OutputStream.
* <pre>
* ECPoint ::= OCTET STRING
* </pre>
* <p>
* Octet string produced using ECPoint.getEncoded().
*/
public ASN1Primitive toASN1Primitive()
{
return new DEROctetString(p.getEncoded());
}
}
```
|
```python
# THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class ModeldbAddExperimentRunTagsResponse(BaseType):
def __init__(self, experiment_run=None):
required = {
"experiment_run": False,
}
self.experiment_run = experiment_run
for k, v in required.items():
if self[k] is None and v:
raise ValueError('attribute {} is required'.format(k))
@staticmethod
def from_json(d):
from .ModeldbExperimentRun import ModeldbExperimentRun
tmp = d.get('experiment_run', None)
if tmp is not None:
d['experiment_run'] = ModeldbExperimentRun.from_json(tmp)
return ModeldbAddExperimentRunTagsResponse(**d)
```
|
John Gordon Hannigan (January 19, 1929 – November 16, 1966) was a Canadian professional ice hockey forward who played for the Toronto Maple Leafs in the National Hockey League between 1952 and 1956.
Playing career
Hannigan was a left winger and centre for the Toronto Maple Leafs (1952–1956) of the National Hockey League (NHL), Pittsburgh Hornets (1951–1952, 1954–1956) and Rochester Americans (1956–1957) of the American Hockey League (AHL) and the Edmonton Flyers (1957–1958) of the Western Hockey League (WHL).
He played for the St. Michael's College School Monarchs as a 155-pound, fast-skating left winger, in 1951. He worked out with Toronto for the first time in February 1949, along with Tim Horton. Because of an Ontario Hockey Association rule, the two college players were not allowed to play for the Toronto Marlborosa Maple Leafs affiliatein that junior ice hockey league. Leafs' President Conn Smythe did not like the ruling but granted the junior players a trial after four of his team's forwards were injured. In October 1953 Hannigan sustained a rib injury in practice and was out of the Maple Leafs lineup for three weeks.
Hannigan played the 1956–57 season for the Rochester Americans of the American Hockey League. Jack Perrin, President of the WHL Winnipeg Warriors (1955–1961), made overtures to buy Hannigan's rights from the Maple Leafs in September 1957. Hannigan told Perrin that, if he could not play for the NHL Leafs, he would only consider an offer from the WHL Edmonton Flyers. He was purchased by the Flyers from the Leafs in October 1957, and his first game for the Flyers was against the Saskatoon/St. Paul Regals, when he replaced injured rookie John Utendale.
His older brother, Ray Hannigan, played in the NHL, AHL and WHL (1948–1955). His younger brother, Pat Hannigan, played in the WHL and NHL (1956–1962). The three brothers played with, or against, each other in some of those seasons.
Personal life
Gord Hannigan was a partner, with his brothers, in a successful Edmonton ice cream business at the time of his acquisition by the Flyers. He also had other interests in the Alberta city.
Hannigan married Ann Mary Conboy of Pittsburgh, Pennsylvania in August 1953. Together they had nine children, before the then 37-year-old's sudden hospitalization and death in Edmonton on November 16, 1966.
Career statistics
Regular season and playoffs
See also
List of family relations in the National Hockey League
References
External links
1929 births
1966 deaths
Canadian emigrants to the United States
Canadian ice hockey centres
Edmonton Flyers (WHL) players
Ontario Hockey Association Senior A League (1890–1979) players
Pittsburgh Hornets players
Rochester Americans players
Ice hockey people from Timmins
Toronto Maple Leafs players
Toronto Marlboros players
Toronto St. Michael's Majors players
|
```xml
import { Content } from "@prismicio/client";
import { ImageField, RelationField, TitleField } from "@prismicio/types";
export type PostDocumentWithAuthor = Content.PostDocument & {
data: {
author: AuthorContentRelationshipField;
};
};
export type AuthorContentRelationshipField = RelationField<
"author",
string,
{
name: TitleField;
picture: ImageField;
}
>;
```
|
Treasury Department Federal Credit Union (TDFCU) is a credit union headquartered in Washington, D.C., chartered and regulated under the authority of the National Credit Union Administration (NCUA) of the U.S. federal government.
History
The Treasury Department Federal Credit Union (TDFCU) founded in 1935, is a full service financial institution with a voluntary Board of Directors that is elected by the members. Each member is an owner of the credit union with an equal vote.
Membership
Membership in the Treasury Department Federal Credit Union is available to employees of the US Treasury Department, Department of Homeland Security, U.S. Courts, United States Securities and Exchange Commission(SEC), CDC National Center for Health Statistics, as well as persons who live, work (or regularly conduct business), worship, or attend school in, and businesses and other legal entities located in, Washington, D.C.
In addition, once an eligible member joins, their family members are eligible. Family members include spouse / partner, parents, grandparents, siblings, children (includes adopted, foster, and stepchildren) and grandchildren.
Services
TDFCU offers the typical suite of account services offered by most financial institutions, including savings accounts, checking accounts, IRA accounts, and certificates of deposit. The savings product is named "Share Savings" to reflect the fact that a member's initial savings deposit ($10) literally represents their share of ownership in the credit union. TDFCU also offers members consumer loans, credit cards, vehicle loans, education loans, mortgages and home equity lines of credit.
Branch locations
The Treasury Department Federal Credit Union has six full service branches. Five of the branches are located in the District of Columbia, while the remaining branch is located in Prince George's County, MD.
Losses
TDFCU and several other credit unions were victimized when U.S. Mortgage Corporation sold mortgages that it managed on behalf of the credit union to Fannie Mae and kept the money.
TDFCU lost more than $500,000 in the first nine months of 2008, and some other District of Columbia credit unions also experienced losses.
References
External links
Official Website
TDFCU Mortgage Web Center
National Credit Union Administration
Credit unions based in Washington, D.C.
Banks established in 1935
1935 establishments in Washington, D.C.
|
South Saddle Mountain is the tallest mountain in Washington County, Oregon, United States.
Part of the Oregon Coast Range, the peak is located in the Tillamook State Forest in the northwest section of the state of Oregon. It is the eighth-highest peak of the Oregon Coast Range.
History
South Saddle Mountain is one of 17 peaks in Oregon with the name Saddle. South Saddle was originally known as simply Saddle Mountain but in 1983 officially became South Saddle Mountain to avoid confusion with Saddle Mountain to the north in Clatsop County.
Geology
Origins of the mountain begin in around 40 million years ago during the Eocene age when sandstone and siltstone formed in the region consisting of parts of the Northern Oregon Coast Range. Igneous rocks and basalt flows combined with basaltic sandstone to create much of the formations. Other sedimentary rock in the area formed more recently, around 20 million years ago. It is hypothesized that the region was an island during the Eocene era.
Area and access
The lower peak houses a microwave transmission tower, while the lower parts of the mountain are popular for bird watchers and off-road motorcycle enthusiasts.
This tower includes amateur radio repeaters
and an AT&T microwave transmitter.
Surrounding the mountain are forests of western hemlock and Douglas fir trees. Fauna in the area include a variety of birds such as hermit warbler, sooty grouse, chestnut-backed chickadee, golden-crowned kinglet, Steller's jay, and Pacific-slope flycatcher.
South Saddle Mountain is approximately due northwest of Henry Hagg Lake and due west of Forest Grove. From mile post 33 on Oregon Route 6 near Lees Camp, access is via Saddlemountain Road. Nine miles from Highway 6 is a gate, the summit is then 0.5 miles from that point. The lower peak containing the radio tower is in Tillamook County.
See also
Wilson River
References
External links
Mountains of the Oregon Coast Range
Landforms of Washington County, Oregon
|
Francesco Marino is an Italian ordinary of the Catholic Church and the current Bishop of Avellino.
Biography
Francesco Marino was born in Cesa, a comune in Campania, Italy. He studied at the Campano Interregional Pontifical Seminary of Naples (Posillipo) and was ordained a priest on 6 October 1979 in the Diocese of Aversa.
On 13 November 2004, Pope John Paul II appointed him the Bishop of Avellino, succeeding Antonio Forte, who retired due to age. He was consecrated in the Aversa Cathedral on 8 January 2005 by Crescenzio Cardinal Sepe. and co-consecrators Mario Milano and Antonio Forte. He took the Latin motto "nos multi in illo uno unum."
On 31 July 2015, he served as principal consecrator of Sergio Melillo.
In 2011, he was elected to the Episcopal Commission for the Campano Interregional Pontifical Seminary of Naples (Posillipo).
On 11 November 2016, Marino was appointed the Bishop of Nola, succeeding Bishop Beniamino Depalma.
References
External links
Diocese of Avellino website
Diocese of Nola website
Living people
21st-century Italian Roman Catholic bishops
People from the Province of Caserta
Bishops of Avellino
1955 births
|
The Navesink tribe were a group of Lenape who inhabited the Raritan Bayshore near Sandy Hook and Mount Mitchill in northern North Jersey in the United States.
Navesink may also refer to the following in the U.S. state of New Jersey:
Navesink, New Jersey, a census-designated place and unincorporated area in Middletown Township, Monmouth County
Navesink River, an estuary in Monmouth County
Navesink Twin Lights, a lighthouse and museum
Navesink Formation, a geological formation
Navesink Highlands, a range of low hills in Monmouth County
Monmouth Tract, also known as the Navesink Tract, an early colonial land grant
See also
|
```swift
//
// NCTrash+Menu.swift
// Nextcloud
//
// Created by Marino Faggiana on 03/03/2021.
//
// Author Marino Faggiana <marino.faggiana@nextcloud.com>
// Author Henrik Storch <henrik.storch@nextcloud.com>
//
// 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
//
import UIKit
import FloatingPanel
import NextcloudKit
extension NCTrash {
func toggleMenuMore(with objectId: String, image: UIImage?, isGridCell: Bool) {
guard let tableTrash = NCManageDatabase.shared.getTrashItem(fileId: objectId, account: appDelegate.account) else { return }
guard isGridCell else {
let alert = UIAlertController(title: NSLocalizedString("_want_delete_", comment: ""), message: tableTrash.trashbinFileName, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: NSLocalizedString("_delete_", comment: ""), style: .destructive, handler: { _ in
self.deleteItem(with: objectId)
}))
alert.addAction(UIAlertAction(title: NSLocalizedString("_cancel_", comment: ""), style: .cancel))
self.present(alert, animated: true, completion: nil)
return
}
var actions: [NCMenuAction] = []
var iconHeader: UIImage!
if let icon = UIImage(contentsOfFile: utilityFileSystem.getDirectoryProviderStorageIconOcId(tableTrash.fileId, etag: tableTrash.fileName)) {
iconHeader = icon
} else {
if tableTrash.directory {
iconHeader = NCImageCache.images.folder
} else {
iconHeader = NCImageCache.images.file
}
}
actions.append(
NCMenuAction(
title: tableTrash.trashbinFileName,
icon: iconHeader,
action: nil
)
)
actions.append(
NCMenuAction(
title: NSLocalizedString("_restore_", comment: ""),
icon: utility.loadImage(named: "arrow.circlepath", colors: [NCBrandColor.shared.iconImageColor]),
action: { _ in
self.restoreItem(with: objectId)
}
)
)
actions.append(
NCMenuAction(
title: NSLocalizedString("_delete_", comment: ""),
destructive: true,
icon: utility.loadImage(named: "trash", colors: [.red]),
action: { _ in
self.deleteItem(with: objectId)
}
)
)
presentMenu(with: actions)
}
}
```
|
```javascript
Typed Arrays
ES6 Arrow Functions
Unicode in ES6
Generators as iterators in ES6
`let` and `const` in ES6
```
|
Diketo, also known as Magave, Upuca, or Puca, is one of ten recognized indigenous games of South Africa and Lesotho. It is similar to the game Jacks.
Rules
Diketo is usually played by two players and can be played with pebbles or marbles. The player throws a stone called "mokinto" into the air and then tries to take out as many stones as possible from the circle before they catch it again with the same hand. Then they put the stones back into the hole one stone at a time, until all ten stones are back in the hole. The player can only move a stone while the "gho"/"mokinto" is in the air and before catching it again with the same hand. The player then takes out all the stones again and puts them back in the hole now two at a time and so on. If the player fails to catch the gho, it is the next player's turn. The player who has manages to do ten rounds of taking the stones out and systematically placing them back in first, wins the game.
References
Children's games
Games of physical skill
Physical activity and dexterity toys
Historical games
|
War Memorial Museum may refer to:
War Memorial Museum, formerly Confederate Memorial Museum, in Columbus, Texas, United States
War Memorial of Korea, in Yongsan-dong, Yongsan-gu, Seoul, South Korea
|
```python
class FetchError(Exception):
def __init__(self, url, out_filename, base_exception, rm_failed):
self.url = url
self.out_filename = out_filename
self.base_exception = base_exception
self.rm_failed = rm_failed
def __str__(self):
msg = "Problem fetching {} to {} because of {}.".format(self.url, self.out_filename, self.base_exception)
if self.rm_failed:
msg += " Unable to remove partial download. Future builds may have problems because of it.".format(
self.rm_failed)
return msg
class IncompleteDownloadError(Exception):
def __init__(self, url, total_bytes_read, content_length):
self.url = url
self.total_bytes_read = total_bytes_read
self.content_length = content_length
def __str__(self):
msg = "Problem fetching {} - bytes read {} does not match content-length {}".format(
self.url,
self.total_bytes_read,
self.content_length)
return msg
class InstallError(Exception):
pass
class PackageError(Exception):
pass
class PackageNotFound(PackageError):
pass
class ValidationError(Exception):
pass
class PackageConflict(ValidationError):
pass
```
|
The International Association of the Congo (), also known as the International Congo Society, was an association founded on 17 November 1879 by Leopold II of Belgium to further his interests in the Congo. It replaced the Belgian Committee for Studies of the Upper Congo () which was part of the International African Association front organisation created for the exploitation of the Congo. The goals of the International Congo Society was to establish control of the Congo Basin and to exploit its economic resources. The Berlin Conference recognised the society as sovereign over the territories it controlled and on August 1, 1885, i.e. four and half months after the closure of the Berlin Conference, King Leopold's Vice-Administrator General in the Congo, announced that the society and the territories it occupied were henceforth called "the Congo Free State".
Ownership and control
The official stockholders of the Committee for the Study of the Upper Congo were Dutch and British businessmen and a Belgian banker who was holding shares on behalf of Leopold. Colonel Maximilien Strauch, president of the committee, was an appointee of Leopold. It was not made clear to Henry Morton Stanley, who signed a five-year contract to establish bases in the Congo in 1878, whether he was working for the International African Association, the Committee for Studies of the Upper Congo, or Leopold himself. Stanley's European employee contracts forbade disclosure of the true nature of their work.
Berlin Conference
The Berlin Conference or Congo Conference of 1884–85 regulated European colonisation and trade in Africa. King Leopold II was able to convince the powers at the conference that common trade in Africa was in the best interests of all countries. The General Act of the conference divided Africa between the main powers of Europe and confirmed the territory controlled by the Congo Society as its private property, which essentially made it the property of Leopold II.
On 10 April 1884 the United States Senate authorised President Chester A. Arthur "to recognize the flag of the AIC as the equal of that of an allied government". On 8 November 1884 Germany recognised the sovereignty of the society over the Congo.
See also
Corporatocracy
Brussels Anti-Slavery Conference 1889–90
Brussels Conference Act of 1890
Royal Museum for Central Africa
External links
Timeline for Congo — History Commons
References
Former Belgian colonies
Former colonies in Africa
Political history of the Democratic Republic of the Congo
States and territories established in 1879
States and territories disestablished in 1885
1879 establishments in Africa
1885 disestablishments in Africa
Leopold II of Belgium
Belgium–Democratic Republic of the Congo relations
|
```html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>ssl::verify_context</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../reference.html" title="Reference">
<link rel="prev" href="ssl__verify_client_once.html" title="ssl::verify_client_once">
<link rel="next" href="ssl__verify_context/native_handle.html" title="ssl::verify_context::native_handle">
</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="ssl__verify_client_once.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="ssl__verify_context/native_handle.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_asio.reference.ssl__verify_context"></a><a class="link" href="ssl__verify_context.html" title="ssl::verify_context">ssl::verify_context</a>
</h3></div></div></div>
<p>
A simple wrapper around the X509_STORE_CTX type, used during verification
of a peer certificate.
</p>
<pre class="programlisting">class verify_context :
noncopyable
</pre>
<h5>
<a name="boost_asio.reference.ssl__verify_context.h0"></a>
<span class="phrase"><a name="boost_asio.reference.ssl__verify_context.types"></a></span><a class="link" href="ssl__verify_context.html#boost_asio.reference.ssl__verify_context.types">Types</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody><tr>
<td>
<p>
<a class="link" href="ssl__verify_context/native_handle_type.html" title="ssl::verify_context::native_handle_type"><span class="bold"><strong>native_handle_type</strong></span></a>
</p>
</td>
<td>
<p>
The native handle type of the verification context.
</p>
</td>
</tr></tbody>
</table></div>
<h5>
<a name="boost_asio.reference.ssl__verify_context.h1"></a>
<span class="phrase"><a name="boost_asio.reference.ssl__verify_context.member_functions"></a></span><a class="link" href="ssl__verify_context.html#boost_asio.reference.ssl__verify_context.member_functions">Member
Functions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<a class="link" href="ssl__verify_context/native_handle.html" title="ssl::verify_context::native_handle"><span class="bold"><strong>native_handle</strong></span></a>
</p>
</td>
<td>
<p>
Get the underlying implementation in the native type.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ssl__verify_context/verify_context.html" title="ssl::verify_context::verify_context"><span class="bold"><strong>verify_context</strong></span></a>
</p>
</td>
<td>
<p>
Constructor.
</p>
</td>
</tr>
</tbody>
</table></div>
<h5>
<a name="boost_asio.reference.ssl__verify_context.h2"></a>
<span class="phrase"><a name="boost_asio.reference.ssl__verify_context.remarks"></a></span><a class="link" href="ssl__verify_context.html#boost_asio.reference.ssl__verify_context.remarks">Remarks</a>
</h5>
<p>
The <a class="link" href="ssl__verify_context.html" title="ssl::verify_context"><code class="computeroutput">ssl::verify_context</code></a>
does not own the underlying X509_STORE_CTX object.
</p>
<h5>
<a name="boost_asio.reference.ssl__verify_context.h3"></a>
<span class="phrase"><a name="boost_asio.reference.ssl__verify_context.requirements"></a></span><a class="link" href="ssl__verify_context.html#boost_asio.reference.ssl__verify_context.requirements">Requirements</a>
</h5>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/ssl/verify_context.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio/ssl.hpp</code>
</p>
</div>
<table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
file LICENSE_1_0.txt or copy at <a href="path_to_url" target="_top">path_to_url
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="ssl__verify_client_once.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="ssl__verify_context/native_handle.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
```
|
Paulsgrove Football Club is a football club based in the Paulsgrove area of Portsmouth, Hampshire, England. The club is affiliated to the Hampshire Football Association. The club is an FA Charter Standard club. The club was formed in 1964. They joined the Hampshire League Division Two in 1987 and played in that league's Division One between 1993 and 1996. They are currently members of the .
History
In 1987–88, the club joined the Hampshire League in division Two, five seasons later they gained promotion to division one in the 1992–93 season. They stayed for a few seasons but were relegated back to division two in 1995–96. Three seasons later, the club were champions of Division two in the 1998–99 season. However, instead of being promoted the club remained in the second tier, now named Division one, of The Hampshire League after it was re-organised for the 1999–2000 season. In 2004–05! they then left the Hampshire league to join the newly formed Division three of the Wessex league, two seasons later this division was renamed division two.
At the end of the 2006–07 season, Paulsgrove left the Wessex league to become one of the founding members of the Hampshire Premier League. In October 2007. the club gained a bye in the Hampshire Cup under somewhat unusual circumstances: drawn at home to play Kingston Arrows (a side composed entirely of long-stay prisoners), their opponents were unable to fulfil the fixture. The club continue to play in the Hampshire Premier league and during their period in the league have won the senior league cup once in the 2008–09 season.
The 2017–18 seasons saw the club win the Hampshire Premier league senior division and the Hampshire intermediate cup.
Ground
Paulsgrove play their games at Paulsgrove Social Club, Marsden Road, Paulsgrove, Portsmouth PO6 4JB.
Honours
Wessex League Division Three
Winners: 2005–06
Hampshire League Division Two
Winners: 1998–99
Hampshire Premier League senior division
Winners 2017-2018
PEHPFL Senior Cup
Winners: 2008–09
Runners-up: 2009–10, 2011–12
Hampshire Combination and Development League East Division
Winners 2021-22
Records
Highest League Position
8th in Wessex league Division Two: 2006–07
References
External links
Hampshire league club information page
Sport in Portsmouth
Association football clubs established in 1987
Football clubs in Hampshire
1987 establishments in England
Football clubs in England
Hampshire League
Wessex Football League
Hampshire Premier League
|
```qml
import common 1.0
Button {
id: root
icons {
colorEnabled: colorStyle.iconSecondary
colorHovered: colorStyle.iconSecondary
colorPressed: colorStyle.iconSecondary
}
colors {
background: colorStyle.buttonSecondary
border: colors.background
text: colorStyle.textSecondary
textPressed: colorStyle.buttonSecondaryPressed
textHover: colorStyle.textSecondary
textDisabled: colorStyle.textDisabled
pressed: colorStyle.buttonSecondaryPressed
borderPressed: colors.pressed
hover: colorStyle.buttonSecondaryHover
borderHover: colors.hover
}
}
```
|
```javascript
!function(t,e){"function"==typeof define&&define.amd?define("zepto",[],function(){return e(t)}):e(t)}(this,function(t){var e=function(){function e(t){return null==t?String(t):W[Y.call(t)]||"object"}function n(t){return"function"==e(t)}function r(t){return null!=t&&t==t.window}function i(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function o(t){return"object"==e(t)}function a(t){return o(t)&&!r(t)&&Object.getPrototypeOf(t)==Object.prototype}function s(t){var e=!!t&&"length"in t&&t.length,n=S.type(t);return"function"!=n&&!r(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function u(t){return D.call(t,function(t){return null!=t})}function c(t){return t.length>0?S.fn.concat.apply([],t):t}function l(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function f(t){return t in k?k[t]:k[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function h(t,e){return"number"!=typeof e||M[l(t)]?e:e+"px"}function p(t){var e,n;return F[t]||(e=$.createElement(t),$.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),F[t]=n),F[t]}function d(t){return"children"in t?L.call(t.children):S.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function m(t,e){var n,r=t?t.length:0;for(n=0;r>n;n++)this[n]=t[n];this.length=r,this.selector=e||""}function v(t,e,n){for(w in e)n&&(a(e[w])||tt(e[w]))?(a(e[w])&&!a(t[w])&&(t[w]={}),tt(e[w])&&!tt(t[w])&&(t[w]=[]),v(t[w],e[w],n)):e[w]!==T&&(t[w]=e[w])}function g(t,e){return null==e?S(t):S(t).filter(e)}function y(t,e,r,i){return n(e)?e.call(t,r,i):e}function x(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function b(t,e){var n=t.className||"",r=n&&n.baseVal!==T;return e===T?r?n.baseVal:n:void(r?n.baseVal=e:t.className=e)}function E(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?S.parseJSON(t):t):t}catch(e){return t}}function j(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)j(t.childNodes[n],e)}var T,w,S,C,N,O,P=[],A=P.concat,D=P.filter,L=P.slice,$=t.document,F={},k={},M={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},z=/^\s*<(\w+|!)[^>]*>/,R=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,q=/^(?:body|html)$/i,H=/([A-Z])/g,I=["val","css","html","text","data","width","height","offset"],V=["after","prepend","before","append"],_=$.createElement("table"),B=$.createElement("tr"),U={tr:$.createElement("tbody"),tbody:_,thead:_,tfoot:_,td:B,th:B,"*":$.createElement("div")},X=/complete|loaded|interactive/,J=/^[\w-]*$/,W={},Y=W.toString,G={},K=$.createElement("div"),Q={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},tt=Array.isArray||function(t){return t instanceof Array};return G.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=K).appendChild(t),r=~G.qsa(i,e).indexOf(t),o&&K.removeChild(t),r},N=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},O=function(t){return D.call(t,function(e,n){return t.indexOf(e)==n})},G.fragment=function(t,e,n){var r,i,o;return R.test(t)&&(r=S($.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(Z,"<$1></$2>")),e===T&&(e=z.test(t)&&RegExp.$1),e in U||(e="*"),o=U[e],o.innerHTML=""+t,r=S.each(L.call(o.childNodes),function(){o.removeChild(this)})),a(n)&&(i=S(r),S.each(n,function(t,e){I.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},G.Z=function(t,e){return new m(t,e)},G.isZ=function(t){return t instanceof G.Z},G.init=function(t,e){var r;if(!t)return G.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&z.test(t))r=G.fragment(t,RegExp.$1,e),t=null;else{if(e!==T)return S(e).find(t);r=G.qsa($,t)}else{if(n(t))return S($).ready(t);if(G.isZ(t))return t;if(tt(t))r=u(t);else if(o(t))r=[t],t=null;else if(z.test(t))r=G.fragment(t.trim(),RegExp.$1,e),t=null;else{if(e!==T)return S(e).find(t);r=G.qsa($,t)}}return G.Z(r,t)},S=function(t,e){return G.init(t,e)},S.extend=function(t){var e,n=L.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){v(t,n,e)}),t},G.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,a=J.test(o);return t.getElementById&&a&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:L.call(a&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},S.contains=$.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},S.type=e,S.isFunction=n,S.isWindow=r,S.isArray=tt,S.isPlainObject=a,S.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},S.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},S.inArray=function(t,e,n){return P.indexOf.call(e,t,n)},S.camelCase=N,S.trim=function(t){return null==t?"":String.prototype.trim.call(t)},S.uuid=0,S.support={},S.expr={},S.noop=function(){},S.map=function(t,e){var n,r,i,o=[];if(s(t))for(r=0;r<t.length;r++)n=e(t[r],r),null!=n&&o.push(n);else for(i in t)n=e(t[i],i),null!=n&&o.push(n);return c(o)},S.each=function(t,e){var n,r;if(s(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(r in t)if(e.call(t[r],r,t[r])===!1)return t;return t},S.grep=function(t,e){return D.call(t,e)},t.JSON&&(S.parseJSON=JSON.parse),S.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){W["[object "+e+"]"]=e.toLowerCase()}),S.fn={constructor:G.Z,length:0,forEach:P.forEach,reduce:P.reduce,push:P.push,sort:P.sort,splice:P.splice,indexOf:P.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=G.isZ(e)?e.toArray():e;return A.apply(G.isZ(this)?this.toArray():this,n)},map:function(t){return S(S.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return S(L.apply(this,arguments))},ready:function(t){return X.test($.readyState)&&$.body?t(S):$.addEventListener("DOMContentLoaded",function(){t(S)},!1),this},get:function(t){return t===T?L.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return P.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return n(t)?this.not(this.not(t)):S(D.call(this,function(e){return G.matches(e,t)}))},add:function(t,e){return S(O(this.concat(S(t,e))))},is:function(t){return this.length>0&&G.matches(this[0],t)},not:function(t){var e=[];if(n(t)&&t.call!==T)this.each(function(n){t.call(this,n)||e.push(this)});else{var r="string"==typeof t?this.filter(t):s(t)&&n(t.item)?L.call(t):S(t);this.forEach(function(t){r.indexOf(t)<0&&e.push(t)})}return S(e)},has:function(t){return this.filter(function(){return o(t)?S.contains(this,t):S(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!o(t)?t:S(t)},last:function(){var t=this[this.length-1];return t&&!o(t)?t:S(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?S(t).filter(function(){var t=this;return P.some.call(n,function(e){return S.contains(e,t)})}):1==this.length?S(G.qsa(this[0],t)):this.map(function(){return G.qsa(this,t)}):S()},closest:function(t,e){var n=[],r="object"==typeof t&&S(t);return this.each(function(o,a){for(;a&&!(r?r.indexOf(a)>=0:G.matches(a,t));)a=a!==e&&!i(a)&&a.parentNode;a&&n.indexOf(a)<0&&n.push(a)}),S(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=S.map(n,function(t){return(t=t.parentNode)&&!i(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return g(e,t)},parent:function(t){return g(O(this.pluck("parentNode")),t)},children:function(t){return g(this.map(function(){return d(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||L.call(this.childNodes)})},siblings:function(t){return g(this.map(function(t,e){return D.call(d(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return S.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=p(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=n(t);if(this[0]&&!e)var r=S(t).get(0),i=r.parentNode||this.length>1;return this.each(function(n){S(this).wrapAll(e?t.call(this,n):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){S(this[0]).before(t=S(t));for(var e;(e=t.children()).length;)t=e.first();S(t).append(this)}return this},wrapInner:function(t){var e=n(t);return this.each(function(n){var r=S(this),i=r.contents(),o=e?t.call(this,n):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){S(this).replaceWith(S(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=S(this);(t===T?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return S(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return S(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;S(this).empty().append(y(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=y(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(o(t))for(w in t)x(this,w,t[w]);else x(this,t,y(this,e,n,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:T},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){x(this,t)},this)})},prop:function(t,e){return t=Q[t]||t,1 in arguments?this.each(function(n){this[t]=y(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=Q[t]||t,this.each(function(){delete this[t]})},data:function(t,e){var n="data-"+t.replace(H,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?E(r):T},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=y(this,t,e,this.value)})):this[0]&&(this[0].multiple?S(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var n=S(this),r=y(this,e,t,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if($.documentElement!==this[0]&&!S.contains($.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,n){if(arguments.length<2){var r=this[0];if("string"==typeof t){if(!r)return;return r.style[N(t)]||getComputedStyle(r,"").getPropertyValue(t)}if(tt(t)){if(!r)return;var i={},o=getComputedStyle(r,"");return S.each(t,function(t,e){i[e]=r.style[N(e)]||o.getPropertyValue(e)}),i}}var a="";if("string"==e(t))n||0===n?a=l(t)+":"+h(t,n):this.each(function(){this.style.removeProperty(l(t))});else for(w in t)t[w]||0===t[w]?a+=l(w)+":"+h(w,t[w])+";":this.each(function(){this.style.removeProperty(l(w))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(S(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&P.some.call(this,function(t){return this.test(b(t))},f(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){C=[];var n=b(this),r=y(this,t,e,n);r.split(/\s+/g).forEach(function(t){S(this).hasClass(t)||C.push(t)},this),C.length&&b(this,n+(n?" ":"")+C.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===T)return b(this,"");C=b(this),y(this,t,e,C).split(/\s+/g).forEach(function(t){C=C.replace(f(t)," ")}),b(this,C.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=S(this),i=y(this,t,n,b(this));i.split(/\s+/g).forEach(function(t){(e===T?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===T?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===T?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=q.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(S(t).css("margin-top"))||0,n.left-=parseFloat(S(t).css("margin-left"))||0,r.top+=parseFloat(S(e[0]).css("border-top-width"))||0,r.left+=parseFloat(S(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||$.body;t&&!q.test(t.nodeName)&&"static"==S(t).css("position");)t=t.offsetParent;return t})}},S.fn.detach=S.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});S.fn[t]=function(n){var o,a=this[0];return n===T?r(a)?a["inner"+e]:i(a)?a.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){a=S(this),a.css(t,y(this,n,e,a[t]()))})}}),V.forEach(function(n,r){var i=r%2;S.fn[n]=function(){var n,o,a=S.map(arguments,function(t){var r=[];return n=e(t),"array"==n?(t.forEach(function(t){return t.nodeType!==T?r.push(t):S.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(G.fragment(t)))}),r):"object"==n||null==t?t:G.fragment(t)}),s=this.length>1;return a.length<1?this:this.each(function(e,n){o=i?n:n.parentNode,n=0==r?n.nextSibling:1==r?n.firstChild:2==r?n:null;var u=S.contains($.documentElement,o);a.forEach(function(e){if(s)e=e.cloneNode(!0);else if(!o)return S(e).remove();o.insertBefore(e,n),u&&j(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}})})})},S.fn[i?n+"To":"insert"+(r?"Before":"After")]=function(t){return S(t)[n](this),this}}),G.Z.prototype=m.prototype=S.fn,G.uniq=O,G.deserializeValue=E,S.zepto=G,S}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){function n(t){return t._zid||(t._zid=p++)}function r(t,e,r,a){if(e=i(e),e.ns)var s=o(e.ns);return(g[n(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||s.test(t.ns))&&(!r||n(t.fn)===n(r))&&(!a||t.sel==a)})}function i(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function o(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function a(t,e){return t.del&&!x&&t.e in b||!!e}function s(t){return E[t]||x&&b[t]||t}function u(t,r,o,u,c,f,p){var d=n(t),m=g[d]||(g[d]=[]);r.split(/\s/).forEach(function(n){if("ready"==n)return e(document).ready(o);var r=i(n);r.fn=o,r.sel=c,r.e in E&&(o=function(t){var n=t.relatedTarget;return!n||n!==this&&!e.contains(this,n)?r.fn.apply(this,arguments):void 0}),r.del=f;var d=f||o;r.proxy=function(e){if(e=l(e),!e.isImmediatePropagationStopped()){e.data=u;var n=d.apply(t,e._args==h?[e]:[e].concat(e._args));return n===!1&&(e.preventDefault(),e.stopPropagation()),n}},r.i=m.length,m.push(r),"addEventListener"in t&&t.addEventListener(s(r.e),r.proxy,a(r,p))})}function c(t,e,i,o,u){var c=n(t);(e||"").split(/\s/).forEach(function(e){r(t,e,i,o).forEach(function(e){delete g[c][e.i],"removeEventListener"in t&&t.removeEventListener(s(e.e),e.proxy,a(e,u))})})}function l(t,n){return(n||!t.isDefaultPrevented)&&(n||(n=t),e.each(S,function(e,r){var i=n[e];t[e]=function(){return this[r]=j,i&&i.apply(n,arguments)},t[r]=T}),t.timeStamp||(t.timeStamp=Date.now()),(n.defaultPrevented!==h?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=j)),t}function f(t){var e,n={originalEvent:t};for(e in t)w.test(e)||t[e]===h||(n[e]=t[e]);return l(n,t)}var h,p=1,d=Array.prototype.slice,m=e.isFunction,v=function(t){return"string"==typeof t},g={},y={},x="onfocusin"in t,b={focus:"focusin",blur:"focusout"},E={mouseenter:"mouseover",mouseleave:"mouseout"};y.click=y.mousedown=y.mouseup=y.mousemove="MouseEvents",e.event={add:u,remove:c},e.proxy=function(t,r){var i=2 in arguments&&d.call(arguments,2);if(m(t)){var o=function(){return t.apply(r,i?i.concat(d.call(arguments)):arguments)};return o._zid=n(t),o}if(v(r))return i?(i.unshift(t[r],t),e.proxy.apply(null,i)):e.proxy(t[r],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var j=function(){return!0},T=function(){return!1},w=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,S={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,r,i,o){var a,s,l=this;return t&&!v(t)?(e.each(t,function(t,e){l.on(t,n,r,e,o)}),l):(v(n)||m(i)||i===!1||(i=r,r=n,n=h),(i===h||r===!1)&&(i=r,r=h),i===!1&&(i=T),l.each(function(l,h){o&&(a=function(t){return c(h,t.type,i),i.apply(this,arguments)}),n&&(s=function(t){var r,o=e(t.target).closest(n,h).get(0);return o&&o!==h?(r=e.extend(f(t),{currentTarget:o,liveFired:h}),(a||i).apply(o,[r].concat(d.call(arguments,1)))):void 0}),u(h,t,i,r,n,s||a)}))},e.fn.off=function(t,n,r){var i=this;return t&&!v(t)?(e.each(t,function(t,e){i.off(t,n,e)}),i):(v(n)||m(r)||r===!1||(r=n,n=h),r===!1&&(r=T),i.each(function(){c(this,t,r,n)}))},e.fn.trigger=function(t,n){return t=v(t)||e.isPlainObject(t)?e.Event(t):l(t),t._args=n,this.each(function(){t.type in b&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)})},e.fn.triggerHandler=function(t,n){var i,o;return this.each(function(a,s){i=f(v(t)?e.Event(t):t),i._args=n,i.target=s,e.each(r(s,t.type||t),function(t,e){return o=e.proxy(i),!i.isImmediatePropagationStopped()&&void 0})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(t,e){v(t)||(e=t,t=e.type);var n=document.createEvent(y[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),l(n)}}(e),function(e){function n(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}function r(t,e,r,i){return t.global?n(e||b,r,i):void 0}function i(t){t.global&&0===e.active++&&r(t,null,"ajaxStart")}function o(t){t.global&&!--e.active&&r(t,null,"ajaxStop")}function a(t,e){var n=e.context;return e.beforeSend.call(n,t,e)!==!1&&r(e,n,"ajaxBeforeSend",[t,e])!==!1&&void r(e,n,"ajaxSend",[t,e])}function s(t,e,n,i){var o=n.context,a="success";n.success.call(o,t,a,e),i&&i.resolveWith(o,[t,a,e]),r(n,o,"ajaxSuccess",[e,n,t]),c(a,e,n)}function u(t,e,n,i,o){var a=i.context;i.error.call(a,n,e,t),o&&o.rejectWith(a,[n,e,t]),r(i,a,"ajaxError",[n,i,t||e]),c(e,n,i)}function c(t,e,n){var i=n.context;n.complete.call(i,e,t),r(n,i,"ajaxComplete",[e,n]),o(n)}function l(t,e,n){if(n.dataFilter==f)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function f(){}function h(t){return t&&(t=t.split(";",2)[0]),t&&(t==S?"html":t==w?"json":j.test(t)?"script":T.test(t)&&"xml")||"text"}function p(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function d(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=p(t.url,t.data),t.data=void 0)}function m(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}function v(t,n,r,i){var o,a=e.isArray(n),s=e.isPlainObject(n);e.each(n,function(n,u){o=e.type(u),i&&(n=r?i:i+"["+(s||"object"==o||"array"==o?n:"")+"]"),!i&&a?t.add(u.name,u.value):"array"==o||!r&&"object"==o?v(t,u,r,n):t.add(n,u)})}var g,y,x=+new Date,b=t.document,E=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,j=/^(?:text|application)\/javascript/i,T=/^(?:text|application)\/xml/i,w="application/json",S="text/html",C=/^\s*$/,N=b.createElement("a");N.href=t.location.href,e.active=0,e.ajaxJSONP=function(n,r){if(!("type"in n))return e.ajax(n);var i,o,c=n.jsonpCallback,l=(e.isFunction(c)?c():c)||"Zepto"+x++,f=b.createElement("script"),h=t[l],p=function(t){e(f).triggerHandler("error",t||"abort")},d={abort:p};return r&&r.promise(d),e(f).on("load error",function(a,c){clearTimeout(o),e(f).off().remove(),"error"!=a.type&&i?s(i[0],d,n,r):u(null,c||"error",d,n,r),t[l]=h,i&&e.isFunction(h)&&h(i[0]),h=i=void 0}),a(d,n)===!1?(p("abort"),d):(t[l]=function(){i=arguments},f.src=n.url.replace(/\?(.+)=\?/,"?$1="+l),b.head.appendChild(f),n.timeout>0&&(o=setTimeout(function(){p("timeout")},n.timeout)),d)},e.ajaxSettings={type:"GET",beforeSend:f,success:f,error:f,complete:f,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:w,xml:"application/xml, text/xml",html:S,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:f},e.ajax=function(n){var r,o,c=e.extend({},n||{}),m=e.Deferred&&e.Deferred();for(g in e.ajaxSettings)void 0===c[g]&&(c[g]=e.ajaxSettings[g]);i(c),c.crossDomain||(r=b.createElement("a"),r.href=c.url,r.href=r.href,c.crossDomain=N.protocol+"//"+N.host!=r.protocol+"//"+r.host),c.url||(c.url=t.location.toString()),(o=c.url.indexOf("#"))>-1&&(c.url=c.url.slice(0,o)),d(c);var v=c.dataType,x=/\?.+=\?/.test(c.url);if(x&&(v="jsonp"),c.cache!==!1&&(n&&n.cache===!0||"script"!=v&&"jsonp"!=v)||(c.url=p(c.url,"_="+Date.now())),"jsonp"==v)return x||(c.url=p(c.url,c.jsonp?c.jsonp+"=?":c.jsonp===!1?"":"callback=?")),e.ajaxJSONP(c,m);var E,j=c.accepts[v],T={},w=function(t,e){T[t.toLowerCase()]=[t,e]},S=/^([\w-]+:)\/\//.test(c.url)?RegExp.$1:t.location.protocol,O=c.xhr(),P=O.setRequestHeader;if(m&&m.promise(O),c.crossDomain||w("X-Requested-With","XMLHttpRequest"),w("Accept",j||"*/*"),(j=c.mimeType||j)&&(j.indexOf(",")>-1&&(j=j.split(",",2)[0]),O.overrideMimeType&&O.overrideMimeType(j)),(c.contentType||c.contentType!==!1&&c.data&&"GET"!=c.type.toUpperCase())&&w("Content-Type",c.contentType||"application/x-www-form-urlencoded"),c.headers)for(y in c.headers)w(y,c.headers[y]);if(O.setRequestHeader=w,O.onreadystatechange=function(){if(4==O.readyState){O.onreadystatechange=f,clearTimeout(E);var t,n=!1;if(O.status>=200&&O.status<300||304==O.status||0==O.status&&"file:"==S){if(v=v||h(c.mimeType||O.getResponseHeader("content-type")),"arraybuffer"==O.responseType||"blob"==O.responseType)t=O.response;else{t=O.responseText;try{t=l(t,v,c),"script"==v?(0,eval)(t):"xml"==v?t=O.responseXML:"json"==v&&(t=C.test(t)?null:e.parseJSON(t))}catch(r){n=r}if(n)return u(n,"parsererror",O,c,m)}s(t,O,c,m)}else u(O.statusText||null,O.status?"error":"abort",O,c,m)}},a(O,c)===!1)return O.abort(),u(null,"abort",O,c,m),O;var A=!("async"in c)||c.async;if(O.open(c.type,c.url,A,c.username,c.password),c.xhrFields)for(y in c.xhrFields)O[y]=c.xhrFields[y];for(y in T)P.apply(O,T[y]);return c.timeout>0&&(E=setTimeout(function(){O.onreadystatechange=f,O.abort(),u(null,"timeout",O,c,m)},c.timeout)),O.send(c.data?c.data:null),O},e.get=function(){return e.ajax(m.apply(null,arguments))},e.post=function(){var t=m.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=m.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var i,o=this,a=t.split(/\s/),s=m(t,n,r),u=s.success;return a.length>1&&(s.url=a[0],i=a[1]),s.success=function(t){o.html(i?e("<div>").html(t.replace(E,"")).find(i):t),u&&u.apply(o,arguments)},e.ajax(s),this};var O=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(O(t)+"="+O(n))},v(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;t.getComputedStyle=function(t,e){try{return n(t,e)}catch(r){return null}}}}(),e}),require(["zepto"],function(t){}),define("/Users/xiongweilie/projects/github/iblog/static/js/home/index.js",function(){});
```
|
Sikhism in Bangladesh has an extensive heritage and history, although Sikhs had always been a minority community in Bengal. Their founder, Guru Nanak visited a number of places in Bengal in the early sixteenth century where he introduced Sikhism to locals and founded numerous establishments. In its early history, the Sikh gurus despatched their followers to propagate Sikh teachings in Bengal and issued hukamnamas to that region. Guru Tegh Bahadur lived in Bengal for two years, and his successor Guru Gobind Singh also visited the region. Sikhism in Bengal continued to exist during the colonial period as Sikhs found employment in the region, but it declined after the partition in 1947. Among the eighteen historical gurdwaras (Sikh places of worship) in Bangladesh, only five are extant. The Gurdwara Nanak Shahi of Dhaka is the principal and largest gurdwara in the country. The Sikh population in the country almost entirely consists of businessmen and government officials from the neighbouring Republic of India.
History
Sikhism first emerged in Bengal when its founder, Guru Nanak, visited the Bengal Sultanate in 1504 during the reign of Sultan Alauddin Husain Shah. He passed through Kantanagar and Sylhet. Kahn Singh Nabha credits the establishment of Gurdwara Sahib Sylhet to Nanak himself. Mughal courtier Abu'l-Fazl ibn Mubarak also records in his Akbarnama that Nanak had entered Sylhet from Kamrup with his followers. He further narrates a story in which a faqir (Sufi ascetic) called Nur Shah transmorphed Nanak's senior companion Bhai Mardana into a lamb although Nanak was able to undo the spell later on.
Nanak then sailed into Dhaka, where he stopped at the village of Shivpur and also visited Faridpur. He first preached to the potters of Rayer Bazaar, for whom he dug and consecrated a well in Jafarabad village for. Nanak was also said to have constructed a gurdwara in Jafarabad. The ruins of the well in Jafarabad is still visited by Sikhs, who believe that its waters have curative powers. Nanak then left Dhaka as he intended to travel to Calcutta and subsequently the Deccan. He passed through Chittagong, where he established a manji (religious headquarter) in Chawkbazar and made Bhai Jhanda its first masand. Raja Sudhir Sen of Chittagong converted to Sikhism as a result of his converted son, Indra Singh, and became a disciple of Guru Nanak. This manji later became the Chittagong Gurdwara (Joy Nagar Lane, Panchlaish) through the effort of Dewan Mohan Singh, the Bihari-Sikh dewan of the Nawab of Bengal Murshid Quli Khan. The Nawab had also allowed the entire property to be rent-free. The Dewan also established the Gurdwara of English Road in Dhaka which later collapsed.
Baba Gurditta later visited Bengal, where he established a manji in Shujatpur (presently the University of Dhaka campus) which Gurditta traced to be the location in which Nanak resided during his stay in Bengal. During the reign of Mughal emperor Jahangir, Guru Hargobind dispatched Bhai Nattha (Bhai Almast's successor) to Bengal, who dug another well and also laid the foundation stone for the Shujatpur Sikh Sangat, a religious congregation. The sangat commemorated the footsteps of Guru Nanak.
Guru Tegh Bahadur stayed in Dhaka between 1666 and 1668 after visiting Assam. During this time, Bulaki Das was the masand (Sikh minister) of Dhaka. He established the Gurdwara Sangat Tola (14 Sreesh Das Lane) in Bangla Bazar. His wooden sandals are preserved at the Gurdwara Nanak Shahi. He also visited the Gurdwara Sahib Sylhet twice. His successor, Guru Gobind Singh, issued many hukamnamas to the Sylhet temple and also visited Dhaka. The Gurdwara Sahib Sylhet provided war elephants for him too.
By the early 18th century, there were a few Sikhs living in the region of Bengal. One famous Sikh who lived during this time period was Omichand, a local Khatri Sikh banker and landlord who participate in the conspiracy against Nawab Siraj ud-Daulah with the East India Company. The Flemish artist Frans Baltazard Solvyns arrived in Calcutta in 1791 and observed many Sikhs, whom one could differentiate from the rest of the land's inhabitants by their garbs and traditions. He etched depictions of a Khalsa Sikh and a Nanakpanthi, which was published in 1799.
Overtime, the Shujatpur sangat developed into what is now the Gurdwara Nanak Shahi from 1830 onwards. Under the initiative of Mahant Prem Daas, Bhai Nattha's well was reformed in 1833. A large number of Sikhs found employment with the Assam Bengal Railway and a gurdwara was established for them in Pahartali, Chittagong. The Gurdwara Sahib Sylhet was destroyed as result of the 1897 earthquake. The Sangat Sutrashashi at Urdu Road was later destroyed by the Sutra Sadhus. There is also a gurdwara in Banigram, Banshkhali.
In 1945, Sikhs established the Gurdwara Guru Nanak Sahib in Mymensingh which continues to be used by ten local families today. A Bengali Sikh called Here Singh was appointed as its inaugural chief. From 1915 to 1947, Sri Chandrajyoti served as the granthi of Gurdwara Nanak Shahi in Dhaka. After the Independence of Pakistan, most of the Sikh community left for the Dominion of India and the Dhaka gurdwara was looked after by Bhai Swaran Singh. After the Indo-Pakistani War of 1971 and Bangladesh Liberation War, Indian Sikh soldiers helped renovate the extant gurdwaras of Bangladesh including the Gurdwara Nanak Shahi.
Demographics
The Sikh population almost entirely consists of Punjabi businessmen and government officials from the neighbouring Republic of India. There exists a small ancient Balmiki community who retain fluency in the Punjabi language from the time of Guru Nanak. Despite the direct propagation from four of the Sikh gurus, the religion was unable to profoundly influence the Bengali people due to its seemingly Punjabi-centric nature.
Government recognition
The Government of Pakistan requisitioned this part of Jafarabad under Sikh supervision until 1959. A handwritten copy of the Guru Granth Sahib from the time of Guru Arjan was kept at the Gurdwara Sangat Tola and later moved to the Gurdwara Nanak Shahi in 1985. After the independence of Bangladesh, Bhai Kartar Singh and the Bangladesh Gurdwara Management Board seized control of all the gurdwaras in the country including the central Gurdwara Nanak Shahi of Dhaka.
References
Religion in Bangladesh
Bangladesh
Bangladesh
|
```scala
package akka.http.fix
import akka.actor._
import akka.event.LoggingAdapter
import akka.http.scaladsl._
import akka.http.scaladsl.server._
import akka.http.scaladsl.settings.ServerSettings
import akka.http.scaladsl.model._
import akka.stream.Materializer
import akka.stream.scaladsl.{ Flow, Sink }
import scala.concurrent.Future
object MigrateToServerBuilderTest {
// Add code that needs fixing here.
implicit def actorSystem: ActorSystem = ???
def customMaterializer: Materializer = ???
def http: HttpExt = ???
implicit def log: LoggingAdapter = ???
def settings: ServerSettings = ???
def httpContext: HttpConnectionContext = ???
def context: HttpsConnectionContext = ???
def handler: HttpRequest => Future[HttpResponse] = ???
def syncHandler: HttpRequest => HttpResponse = ???
def flow: Flow[HttpRequest, HttpResponse, Any] = ???
def route: Route = ???
trait ServiceRoutes {
def route: Route = ???
}
def service: ServiceRoutes = ???
Http().newServerAt("127.0.0.1", 8080).logTo(log).bind(handler)
Http().newServerAt("127.0.0.1", 8080).logTo(log).bind(handler)
Http().newServerAt("127.0.0.1", 0).withSettings(settings).bind(handler)
Http().newServerAt(interface = "localhost", port = 8443).enableHttps(context).bind(handler)
Http().newServerAt(interface = "localhost", port = 8080).bind(handler)
Http().newServerAt(interface = "localhost", port = 8080).bind(handler)
Http().newServerAt("127.0.0.1", 8080).bindFlow(flow)
Http().newServerAt("127.0.0.1", 8080).bind(route)
Http().newServerAt("127.0.0.1", 8080).bind(service.route)
Http().newServerAt("127.0.0.1", 0).logTo(log).bindSync(syncHandler)
Http().newServerAt("127.0.0.1", 0).withSettings(settings).connectionSource().runWith(Sink.ignore)
// format: OFF
Http().newServerAt("127.0.0.1", 8080).withMaterializer(customMaterializer).bind(route)
Http().newServerAt("127.0.0.1", 8080).withMaterializer(customMaterializer).bind(handler)
Http().newServerAt("127.0.0.1", 8080).withMaterializer(customMaterializer).bindSync(syncHandler)
Http() // needed to appease formatter
// format: ON
http.newServerAt("127.0.0.1", 8080).bind(route)
http.newServerAt("127.0.0.1", 8080).bind(handler)
http.newServerAt("127.0.0.1", 8080).bindSync(syncHandler)
Http(actorSystem).newServerAt("127.0.0.1", 8080).bind(route)
Http(actorSystem).newServerAt("127.0.0.1", 8080).bind(handler)
Http(actorSystem).newServerAt("127.0.0.1", 8080).bindSync(syncHandler)
}
```
|
```c++
#ifndef BOOST_MPL_IDENTITY_HPP_INCLUDED
#define BOOST_MPL_IDENTITY_HPP_INCLUDED
//
// (See accompanying file LICENSE_1_0.txt or copy at
// path_to_url
//
// See path_to_url for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct identity
{
typedef T type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, identity, (T))
};
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct make_identity
{
typedef identity<T> type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, make_identity, (T))
};
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity)
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, make_identity)
}}
#endif // BOOST_MPL_IDENTITY_HPP_INCLUDED
```
|
Prionapteryx diaperatalis is a moth in the family Crambidae. It was described by George Hampson in 1919. It is found in Mexico.
References
Ancylolomiini
Moths described in 1919
|
```python
"""A PEP 517 interface to setuptools
Previously, when a user or a command line tool (let's call it a "frontend")
needed to make a request of setuptools to take a certain action, for
example, generating a list of installation requirements, the frontend would
would call "setup.py egg_info" or "setup.py bdist_wheel" on the command line.
PEP 517 defines a different method of interfacing with setuptools. Rather
than calling "setup.py" directly, the frontend should:
1. Set the current directory to the directory with a setup.py file
2. Import this module into a safe python interpreter (one in which
setuptools can potentially set global variables or crash hard).
3. Call one of the functions defined in PEP 517.
What each function does is defined in PEP 517. However, here is a "casual"
definition of the functions (this definition should not be relied on for
bug reports or API stability):
- `build_wheel`: build a wheel in the folder and return the basename
- `get_requires_for_build_wheel`: get the `setup_requires` to build
- `prepare_metadata_for_build_wheel`: get the `install_requires`
- `build_sdist`: build an sdist in the folder and return the basename
- `get_requires_for_build_sdist`: get the `setup_requires` to build
Again, this is not a formal definition! Just a "taste" of the module.
"""
import os
import sys
import tokenize
import shutil
import contextlib
import setuptools
import distutils
class SetupRequirementsError(BaseException):
def __init__(self, specifiers):
self.specifiers = specifiers
class Distribution(setuptools.dist.Distribution):
def fetch_build_eggs(self, specifiers):
raise SetupRequirementsError(specifiers)
@classmethod
@contextlib.contextmanager
def patch(cls):
"""
Replace
distutils.dist.Distribution with this class
for the duration of this context.
"""
orig = distutils.core.Distribution
distutils.core.Distribution = cls
try:
yield
finally:
distutils.core.Distribution = orig
def _to_str(s):
"""
Convert a filename to a string (on Python 2, explicitly
a byte string, not Unicode) as distutils checks for the
exact type str.
"""
if sys.version_info[0] == 2 and not isinstance(s, str):
# Assume it's Unicode, as that's what the PEP says
# should be provided.
return s.encode(sys.getfilesystemencoding())
return s
def _run_setup(setup_script='setup.py'):
# Note that we can reuse our build directory between calls
# Correctness comes first, then optimization later
__file__ = setup_script
__name__ = '__main__'
f = getattr(tokenize, 'open', open)(__file__)
code = f.read().replace('\\r\\n', '\\n')
f.close()
exec(compile(code, __file__, 'exec'), locals())
def _fix_config(config_settings):
config_settings = config_settings or {}
config_settings.setdefault('--global-option', [])
return config_settings
def _get_build_requires(config_settings, requirements):
config_settings = _fix_config(config_settings)
sys.argv = sys.argv[:1] + ['egg_info'] + \
config_settings["--global-option"]
try:
with Distribution.patch():
_run_setup()
except SetupRequirementsError as e:
requirements += e.specifiers
return requirements
def _get_immediate_subdirectories(a_dir):
return [name for name in os.listdir(a_dir)
if os.path.isdir(os.path.join(a_dir, name))]
def get_requires_for_build_wheel(config_settings=None):
config_settings = _fix_config(config_settings)
return _get_build_requires(config_settings, requirements=['wheel'])
def get_requires_for_build_sdist(config_settings=None):
config_settings = _fix_config(config_settings)
return _get_build_requires(config_settings, requirements=[])
def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None):
sys.argv = sys.argv[:1] + ['dist_info', '--egg-base', _to_str(metadata_directory)]
_run_setup()
dist_info_directory = metadata_directory
while True:
dist_infos = [f for f in os.listdir(dist_info_directory)
if f.endswith('.dist-info')]
if len(dist_infos) == 0 and \
len(_get_immediate_subdirectories(dist_info_directory)) == 1:
dist_info_directory = os.path.join(
dist_info_directory, os.listdir(dist_info_directory)[0])
continue
assert len(dist_infos) == 1
break
# PEP 517 requires that the .dist-info directory be placed in the
# metadata_directory. To comply, we MUST copy the directory to the root
if dist_info_directory != metadata_directory:
shutil.move(
os.path.join(dist_info_directory, dist_infos[0]),
metadata_directory)
shutil.rmtree(dist_info_directory, ignore_errors=True)
return dist_infos[0]
def build_wheel(wheel_directory, config_settings=None,
metadata_directory=None):
config_settings = _fix_config(config_settings)
wheel_directory = os.path.abspath(wheel_directory)
sys.argv = sys.argv[:1] + ['bdist_wheel'] + \
config_settings["--global-option"]
_run_setup()
if wheel_directory != 'dist':
shutil.rmtree(wheel_directory)
shutil.copytree('dist', wheel_directory)
wheels = [f for f in os.listdir(wheel_directory)
if f.endswith('.whl')]
assert len(wheels) == 1
return wheels[0]
def build_sdist(sdist_directory, config_settings=None):
config_settings = _fix_config(config_settings)
sdist_directory = os.path.abspath(sdist_directory)
sys.argv = sys.argv[:1] + ['sdist'] + \
config_settings["--global-option"] + \
["--dist-dir", sdist_directory]
_run_setup()
sdists = [f for f in os.listdir(sdist_directory)
if f.endswith('.tar.gz')]
assert len(sdists) == 1
return sdists[0]
```
|
This is a list of Chinese folk songs, categorized by region.
Hunan
La Meizi
Jiangsu
Mo Li Hua
The Good Scenery of Suzhou (苏州好风光)
Scenery of Wuxi (无锡景)
Beautiful Lake Tai (太湖美)
Lady Meng Jiang
Yangtze River Boatmen
Northeastern China
Northeastern Cradle Song(东北摇篮曲)
Sichuan
Kangding Love Song (康定情歌)
Shaanxi
Xin Tian You
Xinjiang
Lift Your Veil (掀起你的蓋頭來)
References
!
Lists of folk songs
|
```html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>websocket::async_teardown</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="Chapter 1. Boost.Beast">
<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
<link rel="prev" href="boost__beast__to_static_string.html" title="to_static_string">
<link rel="next" href="boost__beast__websocket__async_teardown/overload1.html" title="websocket::async_teardown (1 of 3 overloads)">
</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="boost__beast__to_static_string.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.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="boost__beast__websocket__async_teardown/overload1.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="beast.ref.boost__beast__websocket__async_teardown"></a><a class="link" href="boost__beast__websocket__async_teardown.html" title="websocket::async_teardown">websocket::async_teardown</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="idp119898896"></a>
Start tearing down a <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">ssl</span><span class="special">::</span><span class="identifier">stream</span></code>.
</p>
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span>
<span class="keyword">class</span> <a class="link" href="../concepts/streams.html#beast.concepts.streams.AsyncStream"><span class="bold"><strong>AsyncStream</strong></span></a><span class="special">,</span>
<span class="keyword">class</span> <span class="identifier">TeardownHandler</span><span class="special">></span>
<span class="keyword">void</span>
<a class="link" href="boost__beast__websocket__async_teardown/overload1.html" title="websocket::async_teardown (1 of 3 overloads)">async_teardown</a><span class="special">(</span>
<span class="identifier">role_type</span> <span class="identifier">role</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">ssl</span><span class="special">::</span><span class="identifier">stream</span><span class="special"><</span> <span class="identifier">AsyncStream</span> <span class="special">>&</span> <span class="identifier">stream</span><span class="special">,</span>
<span class="identifier">TeardownHandler</span><span class="special">&&</span> <span class="identifier">handler</span><span class="special">);</span>
<span class="emphasis"><em>» <a class="link" href="boost__beast__websocket__async_teardown/overload1.html" title="websocket::async_teardown (1 of 3 overloads)">more...</a></em></span>
</pre>
<p>
Start tearing down a connection.
</p>
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span>
<span class="keyword">class</span> <span class="identifier">Socket</span><span class="special">,</span>
<span class="keyword">class</span> <span class="identifier">TeardownHandler</span><span class="special">></span>
<span class="keyword">void</span>
<a class="link" href="boost__beast__websocket__async_teardown/overload2.html" title="websocket::async_teardown (2 of 3 overloads)">async_teardown</a><span class="special">(</span>
<span class="identifier">role_type</span> <span class="identifier">role</span><span class="special">,</span>
<span class="identifier">Socket</span><span class="special">&</span> <span class="identifier">socket</span><span class="special">,</span>
<span class="identifier">TeardownHandler</span><span class="special">&&</span> <span class="identifier">handler</span><span class="special">);</span>
<span class="emphasis"><em>» <a class="link" href="boost__beast__websocket__async_teardown/overload2.html" title="websocket::async_teardown (2 of 3 overloads)">more...</a></em></span>
</pre>
<p>
Start tearing down a <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span></code>.
</p>
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span>
<span class="keyword">class</span> <span class="identifier">TeardownHandler</span><span class="special">></span>
<span class="keyword">void</span>
<a class="link" href="boost__beast__websocket__async_teardown/overload3.html" title="websocket::async_teardown (3 of 3 overloads)">async_teardown</a><span class="special">(</span>
<span class="identifier">role_type</span> <span class="identifier">role</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span><span class="special">&</span> <span class="identifier">socket</span><span class="special">,</span>
<span class="identifier">TeardownHandler</span><span class="special">&&</span> <span class="identifier">handler</span><span class="special">);</span>
<span class="emphasis"><em>» <a class="link" href="boost__beast__websocket__async_teardown/overload3.html" title="websocket::async_teardown (3 of 3 overloads)">more...</a></em></span>
</pre>
</div>
<table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
file LICENSE_1_0.txt or copy at <a href="path_to_url" target="_top">path_to_url
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__to_static_string.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.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="boost__beast__websocket__async_teardown/overload1.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
```
|
```python
# your_sha256_hash-------------
# yacc_literal.py
#
# Grammar with bad literal characters
# your_sha256_hash-------------
import sys
if ".." not in sys.path: sys.path.insert(0,"..")
import ply.yacc as yacc
from calclex import tokens
# Parsing rules
precedence = (
('left','+','-'),
('left','*','/'),
('right','UMINUS'),
)
# dictionary of names
names = { }
def p_statement_assign(t):
'statement : NAME EQUALS expression'
names[t[1]] = t[3]
def p_statement_expr(t):
'statement : expression'
print(t[1])
def p_expression_binop(t):
'''expression : expression '+' expression
| expression '-' expression
| expression '*' expression
| expression '/' expression
| expression '**' expression '''
if t[2] == '+' : t[0] = t[1] + t[3]
elif t[2] == '-': t[0] = t[1] - t[3]
elif t[2] == '*': t[0] = t[1] * t[3]
elif t[2] == '/': t[0] = t[1] / t[3]
def p_expression_uminus(t):
'expression : MINUS expression %prec UMINUS'
t[0] = -t[2]
def p_expression_group(t):
'expression : LPAREN expression RPAREN'
t[0] = t[2]
def p_expression_number(t):
'expression : NUMBER'
t[0] = t[1]
def p_expression_name(t):
'expression : NAME'
try:
t[0] = names[t[1]]
except LookupError:
print("Undefined name '%s'" % t[1])
t[0] = 0
def p_error(t):
print("Syntax error at '%s'" % t.value)
yacc.yacc()
```
|
A sock puppet, sockpuppet, or sock poppet is a puppet made from a sock or a similar garment. The puppeteer wears the sock on a hand and lower arm as if it were a glove, with the puppet's mouth being formed by the region between the sock's heel and toe, and the puppeteer's thumb acting as the jaw. The arrangement of the fingers forms the shape of a mouth, which is sometimes padded with a hard piece of felt, often with a tongue glued inside.
The sock is stretched out fully so that it is long enough to cover the puppeteer's wrist and part of the arm. Often, the puppeteer hides behind a stand and raises the hand above it so that only the puppet is visible. Sock puppeteers may also stand in full view along with their puppets and hold conversations with them through using ventriloquism.
Composition
Sock puppets can be made from socks or stockings of any color. Any sock may be used to create a puppet, but socks that are too tattered may fall apart during a performance, so they are usually bought new. Additions can be glued on in order to give the sock a personality. Streamers and felt strings might be glued on for hair. Buttons or googly eyes (obtained from craft or fabric stores) are used for the puppet's eyes.
Uses
Sock puppets are often used for the education and entertainment of children. They can be used in elaborate puppet shows or children's plays, much as marionettes would be. The process of making sock puppets is popularly taught as a creative activity in elementary schools. Many schools teach children to make sock puppets, which the students use to stage a play or musical.
Sock puppets appear in children's television series where they can be used alone on the puppeteer's hand, without a complex stage or show. Two orange sock puppets named Fu and Fara are used in teaching German children how to read. In the United States, children's entertainer Shari Lewis was known for her television show Lamb Chop's Play-Along featuring the sock puppets Lamb Chop, Charlie Horse, and Hush Puppy. Sock puppets are often used because they are less intimidating and scary, and, therefore, very child-friendly. In Bo Burnham's Inside, one of his skits (How the World Works) is a parody of these shows where his sock puppet "Socko" tries to teach children about various injustices and conspiracy theories (such as the FBI killing Martin Luther King or the possibility of an elitist pedophile ring).
Sock puppets have also been used in television programming aimed at adults. The 1980s saw the introduction of the Ed the Sock character on local cable in Toronto, and the Sifl and Olly show aired on MTV in the 1990s. Both of these were aimed at teenagers and young adults. Sock puppets have also appeared in advertising geared towards adults. During the late 1990s, the e-commerce company Pets.com used a "spokespuppet" in its advertising to much critical acclaim.
Sock puppets have also been used as the main figures in comedy videos on the internet, mostly to parody other media phenomena such as films and television series. Additionally, sock puppets have been used in a variety of Human Resource videos to aid in the education of employees regarding effective business practices.
Professional wrestler Mick Foley has long used a sock puppet by the name of Mr. Socko as an aid in his finishing maneuver, a nerve hold called the Mandible Claw (or Socko Claw), which is usually preceded by Foley theatrically pulling the sock from somewhere on his person. On World Wrestling Entertainment's Raw program, this has traditionally been a cue for commentator Jerry Lawler to complain about "that stinking, sweaty sock!" Mr. Socko has often served as a sidekick for Foley's Mankind character, having been introduced to the world during a skit on WWE television as a means of "cheering up" WWE owner Vince McMahon, who had just been beaten by nemesis Stone Cold Steve Austin. The sock puppet unexpectedly became a hit with wrestling fans, garnering chants from a crowd of more than 10,000 at the following week's program.
See also
References
Puppets
Puppet, sock
Stuffed toys
Armwear
Handwear
|
Vibra São Paulo (formerly known as Credicard Hall) is a music theatre in the Santo Amaro neighbourhood, city of São Paulo, Brazil. It opened in September 1999, with capacity for 7,000 people. Considered to be one of the largest indoor entertainment venues in Brazil and one of the largest in Latin America. The 60th anniversary of Miss Universe 2011 pageant was held on September 12 that year at the hall. It used to be called Credicard Hall in most of its history, but its name changed in October 2019 due to a naming rights partner. The theatre closed on March 31, 2021. On 1 April 2022, the reopening of the venue was announced under its new name Vibra São Paulo following an agreement between the new house manager, Opus Entertenimento, and the biofuel company Vibra Energia. The venue officially reopened in May.
Naming history
Credicard Hall (January 2000 - 20 November 2013; April 2018 - October 2019)
Citibank Hall (21 November 2013 - April 2018)
UnimedHall (October 2019 - March 2021)
Vibra São Paulo (April 2022 - Present)
Performers
See also
KM de Vantagens Hall – a similar venue managed by Time for Fun
External links
Venue Information
References
Indoor arenas in Brazil
Concert halls in Brazil
Music venues completed in 1999
Buildings and structures in São Paulo
Tourist attractions in São Paulo
1999 establishments in Brazil
2021 disestablishments in Brazil
|
```cmake
add_compile_options(-Wall
-Wextra
-pedantic
-Werror
-Weffc++
-Wconversion
-Wsign-conversion
-Wctor-dtor-privacy
-Wreorder
-Wold-style-cast
-Wparentheses
)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
```
|
```python
from qrcode import constants, exceptions, util
from qrcode.image.base import BaseImage
import six
from bisect import bisect_left
def make(data=None, **kwargs):
qr = QRCode(**kwargs)
qr.add_data(data)
return qr.make_image()
def _check_version(version):
if version < 1 or version > 40:
raise ValueError(
"Invalid version (was %s, expected 1 to 40)" % version)
def _check_box_size(size):
if int(size) <= 0:
raise ValueError(
"Invalid box size (was %s, expected larger than 0)" % size)
def _check_mask_pattern(mask_pattern):
if mask_pattern is None:
return
if not isinstance(mask_pattern, int):
raise TypeError(
"Invalid mask pattern (was %s, expected int)" % type(mask_pattern))
if mask_pattern < 0 or mask_pattern > 7:
raise ValueError(
"Mask pattern should be in range(8) (got %s)" % mask_pattern)
class QRCode:
def __init__(self, version=None,
error_correction=constants.ERROR_CORRECT_M,
box_size=10, border=4,
image_factory=None,
mask_pattern=None):
_check_box_size(box_size)
self.version = version and int(version)
self.error_correction = int(error_correction)
self.box_size = int(box_size)
# Spec says border should be at least four boxes wide, but allow for
# any (e.g. for producing printable QR codes).
self.border = int(border)
_check_mask_pattern(mask_pattern)
self.mask_pattern = mask_pattern
self.image_factory = image_factory
if image_factory is not None:
assert issubclass(image_factory, BaseImage)
self.clear()
def clear(self):
"""
Reset the internal data.
"""
self.modules = None
self.modules_count = 0
self.data_cache = None
self.data_list = []
def add_data(self, data, optimize=20):
"""
Add data to this QR Code.
:param optimize: Data will be split into multiple chunks to optimize
the QR size by finding to more compressed modes of at least this
length. Set to ``0`` to avoid optimizing at all.
"""
if isinstance(data, util.QRData):
self.data_list.append(data)
else:
if optimize:
self.data_list.extend(
util.optimal_data_chunks(data, minimum=optimize))
else:
self.data_list.append(util.QRData(data))
self.data_cache = None
def make(self, fit=True):
"""
Compile the data into a QR Code array.
:param fit: If ``True`` (or if a size has not been provided), find the
best fit for the data to avoid data overflow errors.
"""
if fit or (self.version is None):
self.best_fit(start=self.version)
if self.mask_pattern is None:
self.makeImpl(False, self.best_mask_pattern())
else:
self.makeImpl(False, self.mask_pattern)
def makeImpl(self, test, mask_pattern):
_check_version(self.version)
self.modules_count = self.version * 4 + 17
self.modules = [None] * self.modules_count
for row in range(self.modules_count):
self.modules[row] = [None] * self.modules_count
for col in range(self.modules_count):
self.modules[row][col] = None # (col + row) % 3
self.setup_position_probe_pattern(0, 0)
self.setup_position_probe_pattern(self.modules_count - 7, 0)
self.setup_position_probe_pattern(0, self.modules_count - 7)
self.setup_position_adjust_pattern()
self.setup_timing_pattern()
self.setup_type_info(test, mask_pattern)
if self.version >= 7:
self.setup_type_number(test)
if self.data_cache is None:
self.data_cache = util.create_data(
self.version, self.error_correction, self.data_list)
self.map_data(self.data_cache, mask_pattern)
def setup_position_probe_pattern(self, row, col):
for r in range(-1, 8):
if row + r <= -1 or self.modules_count <= row + r:
continue
for c in range(-1, 8):
if col + c <= -1 or self.modules_count <= col + c:
continue
if (0 <= r and r <= 6 and (c == 0 or c == 6)
or (0 <= c and c <= 6 and (r == 0 or r == 6))
or (2 <= r and r <= 4 and 2 <= c and c <= 4)):
self.modules[row + r][col + c] = True
else:
self.modules[row + r][col + c] = False
def best_fit(self, start=None):
"""
Find the minimum size required to fit in the data.
"""
if start is None:
start = 1
_check_version(start)
# Corresponds to the code in util.create_data, except we don't yet know
# version, so optimistically assume start and check later
mode_sizes = util.mode_sizes_for_version(start)
buffer = util.BitBuffer()
for data in self.data_list:
buffer.put(data.mode, 4)
buffer.put(len(data), mode_sizes[data.mode])
data.write(buffer)
needed_bits = len(buffer)
self.version = bisect_left(util.BIT_LIMIT_TABLE[self.error_correction],
needed_bits, start)
if self.version == 41:
raise exceptions.DataOverflowError()
# Now check whether we need more bits for the mode sizes, recursing if
# our guess was too low
if mode_sizes is not util.mode_sizes_for_version(self.version):
self.best_fit(start=self.version)
return self.version
def best_mask_pattern(self):
"""
Find the most efficient mask pattern.
"""
min_lost_point = 0
pattern = 0
for i in range(8):
self.makeImpl(True, i)
lost_point = util.lost_point(self.modules)
if i == 0 or min_lost_point > lost_point:
min_lost_point = lost_point
pattern = i
return pattern
def print_tty(self, out=None):
"""
Output the QR Code only using TTY colors.
If the data has not been compiled yet, make it first.
"""
if out is None:
import sys
out = sys.stdout
if not out.isatty():
raise OSError("Not a tty")
if self.data_cache is None:
self.make()
modcount = self.modules_count
out.write("\x1b[1;47m" + (" " * (modcount * 2 + 4)) + "\x1b[0m\n")
for r in range(modcount):
out.write("\x1b[1;47m \x1b[40m")
for c in range(modcount):
if self.modules[r][c]:
out.write(" ")
else:
out.write("\x1b[1;47m \x1b[40m")
out.write("\x1b[1;47m \x1b[0m\n")
out.write("\x1b[1;47m" + (" " * (modcount * 2 + 4)) + "\x1b[0m\n")
out.flush()
def print_ascii(self, out=None, tty=False, invert=False):
"""
Output the QR Code using ASCII characters.
:param tty: use fixed TTY color codes (forces invert=True)
:param invert: invert the ASCII characters (solid <-> transparent)
"""
if out is None:
import sys
if sys.version_info < (2, 7):
# On Python versions 2.6 and earlier, stdout tries to encode
# strings using ASCII rather than stdout.encoding, so use this
# workaround.
import codecs
out = codecs.getwriter(sys.stdout.encoding)(sys.stdout)
else:
out = sys.stdout
if tty and not out.isatty():
raise OSError("Not a tty")
if self.data_cache is None:
self.make()
modcount = self.modules_count
codes = [six.int2byte(code).decode('cp437')
for code in (255, 223, 220, 219)]
if tty:
invert = True
if invert:
codes.reverse()
def get_module(x, y):
if (invert and self.border and
max(x, y) >= modcount+self.border):
return 1
if min(x, y) < 0 or max(x, y) >= modcount:
return 0
return self.modules[x][y]
for r in range(-self.border, modcount+self.border, 2):
if tty:
if not invert or r < modcount+self.border-1:
out.write('\x1b[48;5;232m') # Background black
out.write('\x1b[38;5;255m') # Foreground white
for c in range(-self.border, modcount+self.border):
pos = get_module(r, c) + (get_module(r+1, c) << 1)
out.write(codes[pos])
if tty:
out.write('\x1b[0m')
out.write('\n')
out.flush()
def make_image(self, image_factory=None, **kwargs):
"""
Make an image from the QR Code data.
If the data has not been compiled yet, make it first.
"""
_check_box_size(self.box_size)
if self.data_cache is None:
self.make()
if image_factory is not None:
assert issubclass(image_factory, BaseImage)
else:
image_factory = self.image_factory
if image_factory is None:
# Use PIL by default
from qrcode.image.pil import PilImage
image_factory = PilImage
im = image_factory(
self.border, self.modules_count, self.box_size, **kwargs)
for r in range(self.modules_count):
for c in range(self.modules_count):
if self.modules[r][c]:
im.drawrect(r, c)
return im
def setup_timing_pattern(self):
for r in range(8, self.modules_count - 8):
if self.modules[r][6] is not None:
continue
self.modules[r][6] = (r % 2 == 0)
for c in range(8, self.modules_count - 8):
if self.modules[6][c] is not None:
continue
self.modules[6][c] = (c % 2 == 0)
def setup_position_adjust_pattern(self):
pos = util.pattern_position(self.version)
for i in range(len(pos)):
for j in range(len(pos)):
row = pos[i]
col = pos[j]
if self.modules[row][col] is not None:
continue
for r in range(-2, 3):
for c in range(-2, 3):
if (r == -2 or r == 2 or c == -2 or c == 2 or
(r == 0 and c == 0)):
self.modules[row + r][col + c] = True
else:
self.modules[row + r][col + c] = False
def setup_type_number(self, test):
bits = util.BCH_type_number(self.version)
for i in range(18):
mod = (not test and ((bits >> i) & 1) == 1)
self.modules[i // 3][i % 3 + self.modules_count - 8 - 3] = mod
for i in range(18):
mod = (not test and ((bits >> i) & 1) == 1)
self.modules[i % 3 + self.modules_count - 8 - 3][i // 3] = mod
def setup_type_info(self, test, mask_pattern):
data = (self.error_correction << 3) | mask_pattern
bits = util.BCH_type_info(data)
# vertical
for i in range(15):
mod = (not test and ((bits >> i) & 1) == 1)
if i < 6:
self.modules[i][8] = mod
elif i < 8:
self.modules[i + 1][8] = mod
else:
self.modules[self.modules_count - 15 + i][8] = mod
# horizontal
for i in range(15):
mod = (not test and ((bits >> i) & 1) == 1)
if i < 8:
self.modules[8][self.modules_count - i - 1] = mod
elif i < 9:
self.modules[8][15 - i - 1 + 1] = mod
else:
self.modules[8][15 - i - 1] = mod
# fixed module
self.modules[self.modules_count - 8][8] = (not test)
def map_data(self, data, mask_pattern):
inc = -1
row = self.modules_count - 1
bitIndex = 7
byteIndex = 0
mask_func = util.mask_func(mask_pattern)
data_len = len(data)
for col in six.moves.xrange(self.modules_count - 1, 0, -2):
if col <= 6:
col -= 1
col_range = (col, col-1)
while True:
for c in col_range:
if self.modules[row][c] is None:
dark = False
if byteIndex < data_len:
dark = (((data[byteIndex] >> bitIndex) & 1) == 1)
if mask_func(row, c):
dark = not dark
self.modules[row][c] = dark
bitIndex -= 1
if bitIndex == -1:
byteIndex += 1
bitIndex = 7
row += inc
if row < 0 or self.modules_count <= row:
row -= inc
inc = -inc
break
def get_matrix(self):
"""
Return the QR Code as a multidimensonal array, including the border.
To return the array without a border, set ``self.border`` to 0 first.
"""
if self.data_cache is None:
self.make()
if not self.border:
return self.modules
width = len(self.modules) + self.border*2
code = [[False]*width] * self.border
x_border = [False]*self.border
for module in self.modules:
code.append(x_border + module + x_border)
code += [[False]*width] * self.border
return code
```
|
Colossus is the first EP by Australian progressive metal band Caligula's Horse. It was released independently in September 2011 to showcase their recently expanded lineup after the positive online response for their debut album Moments from Ephemeral City, which was originally intended to be a one-off project between vocalist Jim Grey and guitarist Sam Vallen.
Track listing
Lyrics and music by Vallen and Grey.
Personnel
Caligula's Horse
Jim Grey – vocals
Sam Vallen – guitar
Zac Greensill – guitar
Dave Couper – bass
Geoff Irish – drums
Production
Sam Vallen – producer, mixing, mastering, engineering
References
2011 EPs
Caligula's Horse (band) albums
Albums produced by Sam Vallen
Self-released EPs
|
```python
# -*- coding: utf-8 -*-
import urwid
import math
from .picmagic import read as picRead
from .testers.testers import Tester
from .tools import validate_uri, send_result, load_test, validate_email
from .widgets import TestRunner, Card, TextButton, ImageButton, \
DIV, FormCard, LineButton, DisplayTest
from functools import reduce
class Cards(object):
def __init__(self, app):
self.app = app
self.tests = load_test('tests.json')
def welcome(self):
pic = picRead('welcome.bmp', align='right')
text = urwid.Text([
('text bold', self.app.name),
('text', ' is a CLI tool for auditing MongoDB servers, detecting poor security '
'settings and performing automated penetration testing.\n\n'),
('text italic', "\"With great power comes great responsibility\". Unauthorized "
"access to strangers' computer systems is a crime "
"in many countries. Take care.")
])
button = urwid.AttrMap(
TextButton(
"Ok, I'll be careful!", on_press=self.choose_test), 'button')
card = Card(text, header=pic, footer=button)
self.app.render(card)
def choose_test(self, *_):
txt = urwid.Text(
[('text bold',
self.app.name),
' provides two distinct test suites covering security in different '
'depth. Please choose which one you want to run:'])
basic = ImageButton(
picRead('bars_min.bmp'),
[('text bold', 'Basic'),
('text', 'Analyze server perimeter security. (Does not require '
'valid authentication credentials, just the URI)')])
advanced = ImageButton(
picRead('bars_max.bmp'),
[('text bold', 'Advanced'),
('text', 'Authenticate to a MongoDB server and analyze security '
'from inside. (Requires valid credentials)')])
content = urwid.Pile([txt, DIV, basic, advanced])
basic_args = {
'title': 'Basic',
'label': 'This test suite will only check if your server implements all the '
'basic perimeter security measures advisable for production databases. '
'For a more thorough analysis, please run the advanced test suite.\n\n'
'Please enter the URI of your MongoDB server',
'uri_example': 'domain.tld:port',
'tests': self.tests['basic']}
urwid.connect_signal(
basic, 'click', lambda _: self.uri_prompt(**basic_args))
advanced_args = {
'title': 'Advanced',
'label': 'This test suite authenticates to your server using valid credentials '
'and analyzes the security of your deployment from inside.\n\n'
'We recommend to use the same credentials as you use for your app.\n'
'Please enter your MongoDB URI in this format:',
'uri_example': 'mongodb://user:password@domain.tld:port/database',
'tests': self.tests['basic'] + self.tests['advanced']}
urwid.connect_signal(
advanced, 'click', lambda _: self.uri_prompt(**advanced_args))
card = Card(content)
self.app.render(card)
def uri_prompt(self, title, label, uri_example, tests):
"""
Args:
title (str): Title for the test page
label (str): label for the input field
uri_example (str): example of a valid URI
tests (Test[]): test to pass as argument to run_test
"""
intro = urwid.Pile([
urwid.Text(('text bold', title + ' test suite')),
DIV,
urwid.Text([label + ' (', ('text italic', uri_example), ')'])
])
def _next(form, uri):
form.set_message("validating URI")
cred = validate_uri(uri)
if cred:
form.set_message("Checking MongoDB connection...")
tester = Tester(cred, tests)
if tester.info:
self.run_test(cred, title, tester, tests)
else:
form.set_message("Couldn't find a MongoDB server", True)
else:
form.set_message("Invalid domain", True)
form = FormCard(
{"content": intro, "app": self.app}, ['URI'],
'Run ' + title.lower() + ' test suite',
{'next': _next, 'back': self.choose_test})
self.app.render(form)
def run_test(self, cred, title, tester, tests):
"""
Args:
cred (dict(str: str)): credentials
title (str): title for the TestRunner
tests (Test[]): test to run
"""
test_runner = TestRunner(title, cred, tests,
{"tester":tester, "callback": self.display_overview})
# the name of the bmp is composed with the title
pic = picRead('check_' + title.lower() + '.bmp', align='right')
footer = self.get_footer('Cancel', self.choose_test)
card = Card(test_runner, header=pic, footer=footer)
self.app.render(card)
test_runner.run(self.app)
def display_overview(self, result, title, urn):
"""
Args:
result (dict()): the result returned by test_runner
"""
def reduce_result(res, values):
return reduce_result(res % values[-1], values[:-1]) + [res / values[-1]] \
if bool(values) else []
# range 4 because the possible values for result are [False, True,
# 'custom', 'omitted']
values = [(len(result) + 1) ** x for x in range(4)]
total = reduce(lambda x, y: x + values[y['result']], result, 0)
header = urwid.Text(('text bold', 'Results overview'))
subtitle = urwid.Text(
('text', 'Finished running ' + str(len(result)) + " tests:"))
overview = reduce_result(total, values)
overview = urwid.Text([
('passed', str(int(math.floor(overview[1])))), ('text', ' passed '),
('failed', str(int(math.floor(overview[0])))), ('text', ' failed '),
('warning', str(int(math.floor(overview[2])))), ('text', ' warning '),
('info', str(int(math.floor(overview[3])))), ('text', ' omitted')])
footer = urwid.AttrMap(
TextButton(
'< Back to main menu',
align='left',
on_press=self.choose_test),
'button')
results_button = LineButton([('text', '> View brief results summary')])
email_button = LineButton([('text', '> Email me the detailed results report')])
urwid.connect_signal(
results_button,
'click',
lambda _: self.display_test_result(result, title, urn))
urwid.connect_signal(
email_button, 'click', lambda _: self.email_prompt(result, title, urn))
card = Card(urwid.Pile([header, subtitle, overview, DIV,
results_button, email_button]), footer=footer)
self.app.render(card)
def display_test_result(self, result, title, urn):
display_test = DisplayTest(result)
footer = self.get_footer('< Back to results overview',
lambda _: self.display_overview(result, title, urn))
card = Card(display_test, footer=footer)
self.app.render(card)
def email_prompt(self, result, title, urn):
header = urwid.Text(('text bold', 'Send detailed results report via email'))
subtitle = urwid.Text([
('text', 'The email report contains detailed results of each of the runned tests, '
'as well as links to guides on how to fix the found issues.\n\n'),
('text italic', 'You will be included into a MongoDB critical security bugs '
'newsletter. We will never SPAM you, we promise!')
])
content = urwid.Pile([header, DIV, subtitle])
card = FormCard(
{"content": content, "app": self.app},
['Email'],
'Send report',
{
'next': lambda form, email: self.send_email(email.strip(), result, title, urn) \
if validate_email(email) else form.set_message("Invalid email address", True),
'back': lambda _: self.display_overview(result, title, urn)
})
self.app.render(card)
def send_email(self, email, result, title, urn):
email_result = [{"name": val["name"], "value": val["result"],
"data": val["extra_data"]} for val in result]
response = send_result(email, email_result, title, urn)
header = urwid.Text(('text bold', 'Send detailed results report via email'))
subtitle = urwid.Text(
('text', response))
content = urwid.Pile([header, DIV, subtitle])
footer = self.get_footer('< Back to results overview',
lambda _: self.display_overview(result, title, urn))
card = Card(content, footer=footer)
self.app.render(card)
@staticmethod
def get_footer(text, callback):
return urwid.AttrMap(
TextButton(
text,
align='left',
on_press=(callback)),
'button')
```
|
Landepéreuse () is a former commune in the Eure department, in Normandy in northern France. On 1 January 2016, it was merged into the new commune of Mesnil-en-Ouche.
Etymology
The name "Landepereuse" derives from the Norman pronunciation of lande pierreuse ("stony ground"). The word lande comes from the Gaulish language, and refers to dry ground where few plants grow. "Stony" refers to the local abundance and size of stones.
Geography
Landepéreuse is a small rural village in the Pays d'Ouche, located in the south-western Eure. Its surface is 892 hectares. Its maximum altitude change is 48 m but ranges between 187 m in the south-west and 139 m in the north-east; the town hall is at 170 m. This slightly undulating countryside is characteristic of the topography in the Pays d'Ouche, already hinted at in the hills of the Perche country to the south and the Pays d'Auge a few kilometres to the west. The landscape is made up of fields, pastures, orchards and woods. These are sometimes separated by hedges, mostly hawthorn or blackthorn (sloe).
The territory of the commune is crossed by two dry valleys:
The first, topographically largest, crosses a small area of the territory, between Landepéreuse and Hiette in the north, and Dupinière and Nobletière in the south. It is uneven here, its northern slope steep and reaching 20m.
The second, known in the past as the Valley of Theil-en-Ouche, the largest in surface, runs from the south-west to the north-eastern across most of the commune. It starts in Pontaurey at between 186 and 187m in altitude, passes below in the old territory of Theil-en-Ouche at about 175 m of altitude, then crosses the small northern pocket of the commune of Epinay near the place named Sbirée. It passes between Pasnière and Fortinière in the north and Hamel in the south, at about 168m. It passes north of the village, below the church, at about 165m. (A few years ago, a small bridge spanned it on the #13 road.) Last, it leaves the commune north of Boulaye at an altitude of 158m. Its topography is still not very pronounced here, but the total depth of the channel at this point is about 30m.
Since the middle of the 1980s, an underground drain has run down the middle of this valley.
Regularly, every year after thunder storms, water runs in these two dry river valleys for a few hours, up to a few days sometimes. During a very rainy episode at the beginning of 2001 (floods in the Somme), for several months rivers ran down the dry valleys to the east of town as well.
Geology
The geological underpinnings of the commune consist of the geological strata commonly encountered in the Paris Basin ("o.b..") from the latter primary to the Holocene. Only rare rocks and formations are, or have been, accessible to humans. The oldest are from the upper Cretaceous.
They are formed of marly chalk, formerly mined in underground quarries, which are long since abandoned. We can see in the landscape, the old collapsed wells and the cave-ins, locally known as (or ): (bétoires in French).
On the surface, some areas of the commune have abundant sandstone of Cenozoic age. They can grow to several metres in size. No fossils (macro or micro) have been observed, so their age cannot be precisely determined. To some authors they appear to be Paleocene sandstone, such as those visible at the top of the surrounding chalk cliffs of Dieppe, Le Tréport, and nearby Le Bosc-Renoult. To others, they appear to be Oligocene sandstone, like the well known examples in the Fontainebleau forest south of Paris or the Séran rock in the Vexin. A scientific study cut many thin blades from the rock to try to resolve this ambiguity. It found only one crystallised charophyte oogone (seaweed reproductive cell) which was not datable.
The valleys contain heterogeneous rocks (flint, pure sandstone, more or less strongly ferruginated sandstone...), heterometric (centimetric to pluridecimetric).
This geological set recalls alluvium, inheritance of the past valley's activity, with a relatively high current speed (such as the Charentonne today).
Other parts of the commune are covered in limestone, not very thick compared to that in the Lieuvin or in the . This layer is somewhat more fertile.
Because of the abundance of sandstone, gravel and cailloutis (coarse gravel), Landepéreuse would not have been a paradise for its first inhabitants: the land was probably difficult to clear and cultivate, at a time when tractors didn't exist and iron or even tools of any metal were rare and expensive.
By the fineness of the limestone, this commune was, before the advent of organic fertilizers, a land of extensive and subsistence farming.
Therefore, geology is the origin of the landscape of this typical bocaged village of the Pays d'Ouche.
clay and limestone, decalcified and here of brown color, concentrated by the paedogenesis (lehm), could however be used to make bricks in the village.
History
Landepéreuse was given to the abbey of Bernay in 1027 by Richard II, Duke of Normandy, grandfather of William the Bastard (in Norman; later William the Conqueror, in English and French).
The location was shown on the Cassini map of France in the 18th century. The map also shows that some of the hamlets currently nearby already existed: Le Breuil, La Silandière, La Hiette, La Chaise, Le Hamel, and La Pannière.
The Cassini map also provides information on the importance of the village of Landepereuse. No primary road seems to cross the village of the time. Two important roads on the map pass nearby, close to Tilleul-en-Ouche. The first runs from Les Jonquerets to Chambord. Today it has become a very minor local road. The other, from Broglie to La Barre-en-Ouche is still important today. The road from Bernay/La Barre-en-Ouche, relatively high-traffic today, if it existed at the time, was not large enough to note.
In the 18th century, a brick factory existed in the commune. The clergy house built at the end of the century, was built of bricks from this factory.
In 1845, Landepereuse grew with the addition of the little village of Tilleul-en-Ouche, located in the small pocket to the south-west of the current village. In the 1950s, the inhabitants, or their representatives, officially requested a name change for the village, from Landepereuse to Landepéreuse.
Population
See also
Communes of the Eure department
References
Former communes of Eure
|
The Church of St Stephen (Spanish: Iglesia de San Esteban) is one of a number of medieval churches in Segovia, Spain. It dates from the 12th century and is noted for its Romanesque bell tower.
Conservation
The tower is designated a Bien de Interés Cultural and has been protected since 1896, when it was declared a National Monument (published in
the Madrid Gazette on 13 December 1896).
Since 1985 the church has been part of a World Heritage Site: the Old Town of Segovia and its Aqueduct. In giving this designation to Segovia, UNESCO noted that the outstanding monuments of the city included "several Romanesque churches".
References
Buildings and structures in Segovia
St Stephen
Romanesque architecture in Castile and León
|
Prodyscherus is a genus of beetles in the family Carabidae, containing the following species:
Prodyscherus alluaudi (Bänninger, 1934)
Prodyscherus androyanus Jeannel, 1946, 1946
Prodyscherus anosyensis Basilewsky, 1972
Prodyscherus australis Jeannel, 1946
Prodyscherus basilewskyi Bulirsch, Janák & P. Moravec, 2005
Prodyscherus curtipennis (Fairmaire, 1901)
Prodyscherus decaryi Jeannel, 1946
Prodyscherus externus (Fairmaire, 1901)
Prodyscherus grandidieri Jeannel, 1946
Prodyscherus granulatus Jeannel, 1946
Prodyscherus mandibularis (Fairmaire, 1901)
Prodyscherus meridionalis Jeannel, 1955
Prodyscherus morondavae Basilewsky, 1976
Prodyscherus nigrita (Bänninger, 1934)
Prodyscherus ovatus (Bänninger, 1934)
Prodyscherus pluto (Künckel, 1887)
Prodyscherus praelongus (Fairmaire, 1898)
Prodyscherus pseudomandibularis (Bänninger, 1934)
Prodyscherus rapax (Fairmaire, 1883)
Prodyscherus rugatus (Bänninger, 1934)
Prodyscherus sexiessetosus Jeannel, 1946
References
Scaritinae
|
```objective-c
/*
*
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#ifndef AOM_AV1_DECODER_DECODETXB_H_
#define AOM_AV1_DECODER_DECODETXB_H_
#include "pxr/imaging/plugin/hioAvif/aom/av1/common/enums.h"
struct aom_reader;
struct AV1Common;
struct DecoderCodingBlock;
struct txb_ctx;
uint8_t av1_read_coeffs_txb(const struct AV1Common *const cm,
struct DecoderCodingBlock *dcb,
struct aom_reader *const r, const int blk_row,
const int blk_col, const int plane,
const struct txb_ctx *const txb_ctx,
const TX_SIZE tx_size);
void av1_read_coeffs_txb_facade(const struct AV1Common *const cm,
struct DecoderCodingBlock *dcb,
struct aom_reader *const r, const int plane,
const int row, const int col,
const TX_SIZE tx_size);
#endif // AOM_AV1_DECODER_DECODETXB_H_
```
|
Caroline Rigg (26 August 1852 – 16 December 1929) was a British headmistress. She was the founding head of the Mary Datchelor School.
Life
Rigg was born in Guernsey in 1852. She was the first child of Caroline and Dr James Harrison Rigg. Her father was a Wesleyan minister but in time he led Westminster Training College. Her father was keen for her to follow him into teaching.
Rigg was the founding head of the Mary Datchelor School in 1877 after spending four years leading a Hammersmith board school.
In 1883 she was invited to become a member of the Association of Head Mistresses (AHM) by its founder Frances Buss.
Dorothy Brock was appointed to succeed her as the head of the Mary Datchelor school in 1918.
Rigg died in Brixton in 1929 leaving a bequest to support girls who wanted to go to university.
References
1852 births
1929 deaths
Guernsey people
Founders of English schools and colleges
Women school principals and headteachers
English women educators
19th-century British educators
Heads of schools in England
20th-century British educators
20th-century British women educators
|
```xml
import * as React from 'react';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { createDrawerNavigator } from '@react-navigation/drawer';
import {
InitialState,
NavigationContainer,
DarkTheme as NavigationDarkTheme,
DefaultTheme as NavigationDefaultTheme,
} from '@react-navigation/native';
import { useFonts } from 'expo-font';
import { useKeepAwake } from 'expo-keep-awake';
import {
PaperProvider,
MD3DarkTheme,
MD3LightTheme,
MD2DarkTheme,
MD2LightTheme,
MD2Theme,
MD3Theme,
useTheme,
adaptNavigationTheme,
configureFonts,
} from 'react-native-paper';
import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
import DrawerItems from './DrawerItems';
import App from './RootNavigator';
const PERSISTENCE_KEY = 'NAVIGATION_STATE';
const PREFERENCES_KEY = 'APP_PREFERENCES';
export const PreferencesContext = React.createContext<{
toggleTheme: () => void;
toggleThemeVersion: () => void;
toggleCollapsed: () => void;
toggleCustomFont: () => void;
toggleRippleEffect: () => void;
customFontLoaded: boolean;
rippleEffectEnabled: boolean;
collapsed: boolean;
theme: MD2Theme | MD3Theme;
} | null>(null);
export const useExampleTheme = () => useTheme<MD2Theme | MD3Theme>();
const Drawer = createDrawerNavigator<{ Home: undefined }>();
export default function PaperExample() {
useKeepAwake();
const [fontsLoaded] = useFonts({
Abel: require('../assets/fonts/Abel-Regular.ttf'),
});
const [isReady, setIsReady] = React.useState(false);
const [initialState, setInitialState] = React.useState<
InitialState | undefined
>();
const [isDarkMode, setIsDarkMode] = React.useState(false);
const [themeVersion, setThemeVersion] = React.useState<2 | 3>(3);
const [collapsed, setCollapsed] = React.useState(false);
const [customFontLoaded, setCustomFont] = React.useState(false);
const [rippleEffectEnabled, setRippleEffectEnabled] = React.useState(true);
const theme = React.useMemo(() => {
if (themeVersion === 2) {
return isDarkMode ? MD2DarkTheme : MD2LightTheme;
}
return isDarkMode ? MD3DarkTheme : MD3LightTheme;
}, [isDarkMode, themeVersion]);
React.useEffect(() => {
const restoreState = async () => {
try {
const savedStateString = await AsyncStorage.getItem(PERSISTENCE_KEY);
const state = JSON.parse(savedStateString || '');
setInitialState(state);
} catch (e) {
// ignore error
} finally {
setIsReady(true);
}
};
if (!isReady) {
restoreState();
}
}, [isReady]);
React.useEffect(() => {
const restorePrefs = async () => {
try {
const prefString = await AsyncStorage.getItem(PREFERENCES_KEY);
const preferences = JSON.parse(prefString || '');
if (preferences) {
setIsDarkMode(preferences.theme === 'dark');
}
} catch (e) {
// ignore error
}
};
restorePrefs();
}, []);
React.useEffect(() => {
const savePrefs = async () => {
try {
await AsyncStorage.setItem(
PREFERENCES_KEY,
JSON.stringify({
theme: isDarkMode ? 'dark' : 'light',
})
);
} catch (e) {
// ignore error
}
};
savePrefs();
}, [isDarkMode]);
const preferences = React.useMemo(
() => ({
toggleTheme: () => setIsDarkMode((oldValue) => !oldValue),
toggleCollapsed: () => setCollapsed(!collapsed),
toggleCustomFont: () => setCustomFont(!customFontLoaded),
toggleRippleEffect: () => setRippleEffectEnabled(!rippleEffectEnabled),
toggleThemeVersion: () => {
setCustomFont(false);
setCollapsed(false);
setThemeVersion((oldThemeVersion) => (oldThemeVersion === 2 ? 3 : 2));
setRippleEffectEnabled(true);
},
customFontLoaded,
rippleEffectEnabled,
collapsed,
theme,
}),
[theme, collapsed, customFontLoaded, rippleEffectEnabled]
);
if (!isReady && !fontsLoaded) {
return null;
}
const { LightTheme, DarkTheme } = adaptNavigationTheme({
reactNavigationLight: NavigationDefaultTheme,
reactNavigationDark: NavigationDarkTheme,
});
const CombinedDefaultTheme = {
...MD3LightTheme,
...LightTheme,
colors: {
...MD3LightTheme.colors,
...LightTheme.colors,
},
};
const CombinedDarkTheme = {
...MD3DarkTheme,
...DarkTheme,
colors: {
...MD3DarkTheme.colors,
...DarkTheme.colors,
},
};
const combinedTheme = isDarkMode ? CombinedDarkTheme : CombinedDefaultTheme;
const configuredFontTheme = {
...combinedTheme,
fonts: configureFonts({
config: {
fontFamily: 'Abel',
},
}),
};
return (
<PaperProvider
settings={{ rippleEffectEnabled: preferences.rippleEffectEnabled }}
theme={customFontLoaded ? configuredFontTheme : theme}
>
<PreferencesContext.Provider value={preferences}>
<React.Fragment>
<NavigationContainer
theme={combinedTheme}
initialState={initialState}
onStateChange={(state) =>
AsyncStorage.setItem(PERSISTENCE_KEY, JSON.stringify(state))
}
>
<SafeAreaInsetsContext.Consumer>
{(insets) => {
const { left, right } = insets || { left: 0, right: 0 };
const collapsedDrawerWidth = 80 + Math.max(left, right);
return (
<Drawer.Navigator
screenOptions={{
drawerStyle: collapsed && {
width: collapsedDrawerWidth,
},
}}
drawerContent={() => <DrawerItems />}
>
<Drawer.Screen
name="Home"
component={App}
options={{ headerShown: false }}
/>
</Drawer.Navigator>
);
}}
</SafeAreaInsetsContext.Consumer>
</NavigationContainer>
</React.Fragment>
</PreferencesContext.Provider>
</PaperProvider>
);
}
```
|
```python
from yowsup.structs import ProtocolEntity, ProtocolTreeNode
class AckProtocolEntity(ProtocolEntity):
'''
<ack class="{{receipt | message | ?}}" id="{{message_id}}">
</ack>
'''
def __init__(self, _id, _class):
super(AckProtocolEntity, self).__init__("ack")
self._id = _id
self._class = _class
def getId(self):
return self._id
def getClass(self):
return self._class
def toProtocolTreeNode(self):
attribs = {
"id" : self._id,
"class" : self._class,
}
return self._createProtocolTreeNode(attribs, None, data = None)
def __str__(self):
out = "ACK:\n"
out += "ID: %s\n" % self._id
out += "Class: %s\n" % self._class
return out
@staticmethod
def fromProtocolTreeNode(node):
return AckProtocolEntity(
node.getAttributeValue("id"),
node.getAttributeValue("class")
)
```
|
Federico Frattini (born 1980) is an Italian strategy, innovation and technology management scholar.
He is currently Full Professor of Strategic Innovation at Politecnico di Milano (Italy) and Dean of POLIMI Graduate School of Management.
Education
Federico Frattini holds a BSc and an MSc in Management Engineering from LIUC – Università Carlo Cattaneo (Castellanza, Varese, Italy) and a PhD in Management Engineering from Politecnico di Milano. He was also Visiting Student at SPRU – Sussex University (UK), under the supervision of Prof. Joseph Tidd.
Research
Frattini signed more than 200 international publications in the field of innovation and technology management, among which scholarly articles in journals such as Strategic Management Journal, Academy of Management Perspectives, Journal of Product Innovation Management, Entrepreneurship Theory & Practice, California Management Review, Global Strategy Journal, and many others.
His research has been featured in various practitioners’ journals and magazines such Harvard Business Review, MIT Sloan Management Review, European Business Review, Il Sole 24 Ore.
In 2013, at the age of 33, he was included among the top 50 researchers worldwide in the area of technology and innovation management by the International Association of Management of Technology (IAMOT).
Frattini also served as Honorary Researcher at the University of Lancaster Management School and is currently Associate Editor of the CERN IdeaSquare Journal of Experimental Innovation and Member of the Editorial Board of the European Journal of Innovation Management and of the Journal of Product Innovation Management.
Service
At POLIMI Graduate School of Management (formerly MIP Politecnico di Milano), Frattini worked, from 2012 to 2019, first as Director of the Evening Executive MBA, then as Director of the MBA and Executive MBA Programs and as Associate Dean for Digital Transformation.
He worked for the development of digital learning programs in the School, such as the Flex Executive MBA, the International Flex Executive MBA, and the innovative personalized and continuous learning platform FLEXA, developed in partnership with Microsoft.
He is the Dean of the Business School since 2020.
Impact
Since 2007 Prof. Frattini focused on the energy business. During this years he also co-founded - together with Vittorio Chiesa and Davide Chiaroni - Energy & Strategy, a research group involved in research, advisory and education in fields such as renewable energies, energy efficiency, smart mobility, circular economy, digital energy, hydrogen. Today Frattini is Vice-Director of Energy & Strategy.
References
Italian academic administrators
1980 births
Living people
|
```php
<?php
use Illuminate\Support\Facades\Route;
Route::resource('/permissions', 'PermissionsController', ['as' => 'laratrust'])
->only(['index', 'create', 'store', 'edit', 'update']);
Route::resource('/roles', 'RolesController', ['as' => 'laratrust']);
Route::resource('/roles-assignment', 'RolesAssignmentController', ['as' => 'laratrust'])
->only(['index', 'edit', 'update']);
```
|
Duncan Alvin MacPherson (February 3, 1966 – August 9, 1989) was a Canadian professional ice hockey player who died under mysterious circumstances during a ski trip in Austria.
Early life and career
MacPherson was born in Saskatoon, Saskatchewan. A standout defensive defenceman for the Saskatoon Blades of the Western Hockey League, he was drafted in the first round, 20th overall, of the 1984 NHL Entry Draft by the New York Islanders. He played minor league hockey for the Springfield Indians of the American Hockey League and the Indianapolis Ice of the International Hockey League.
Disappearance
In the summer of 1989, MacPherson went to Europe. The New York Islanders had bought out and released the often injured MacPherson, who never made it to the NHL. MacPherson had intentions of taking a job as a player-coach for a semi-pro hockey team in Dundee, Scotland, commencing in August 1989. Despite having a bad feeling about the entrepreneur Ron Dixon who was backing the Scottish team, he travelled to central Europe alone in early August 1989. The plan was to visit old friends and see the sights before going on to Scotland.
He was scheduled to arrive in Dundee on August 12. When he did not show up, his family went to look for him. A car he had borrowed from a friend was discovered six weeks later in the parking lot of the Stubaital ski-region resort at the foot of the Stubai Glaciers in the Stubai Alps in Austria, where he had rented a snowboard. His last known contact was with an employee of the ski resort on August 9, who reported that he spoke with MacPherson, and last saw MacPherson departing alone to perhaps squeeze in some final snowboarding and hiking before nightfall.
Adding drama to the mystery was the fact that MacPherson claimed he had been contacted by the CIA, and that they were interested in recruiting him as a spy. The story was never confirmed.
In 2003, 14 years after MacPherson disappeared, an employee of the Stubai Glacier Resort discovered a glove sticking out of the ice of the melting Schaufelferner Glacier (one of the Stubai Glaciers' arms), in the middle of the ski run, where MacPherson's body had lain frozen.
Theories
According to John Leake, author of ‘Cold A Long Time: An Alpine Mystery’, MacPherson’s body was found to have suffered significant trauma, including amputation of arms, hands and legs. The damage is consistent with rotating machinery; his snowboard also had a uniform pattern of damage and was cut apart, which indicates that it too had gone through a machine. Leake’s conclusion was that MacPherson had a snowboard accident and injured his leg, and was laying on the slope waiting for rescue. During that very foggy day, a snowcat driver didn't see MacPherson and ran him over by accident, killing him. Instead of reporting it, that driver (or his supervisor) buried MacPherson in the shallow crevasse. His body stayed hidden there for fourteen years, until the glacier melted enough for it to be seen.
Career statistics
See also
List of ice hockey players who died during their playing career
References
Further reading
Website and Book by John Leake, published in 2012
An update to the 2006 CBC story above by the Canadian Broadcasting Corporation
Article from Esquire magazine, published in 2004
Story of his disappearance
Detailed chronology of events
In German language:
"Auf dünnem Eis" (On thin ice), story written by Florian Skrabal for Austrian magazine Datum – Seiten der Zeit, published 1 September 2009. Retrieved 7 October 2012
"Eisiges Schweigen" (Icy silentness), story by Malte Herwig for Bavarian newspaper Süddeutsche Zeitung, published 5 October 2012. Retrieved 7 October 2012
External links
1966 births
1989 deaths
Canadian people of Scottish descent
Indianapolis Ice players
National Hockey League first-round draft picks
New York Islanders draft picks
Saskatoon Blades players
Ice hockey people from Saskatoon
Springfield Indians players
Canadian ice hockey defencemen
Category:1989 missing person cases
Category:unsolved deaths in austria
|
Bowman is an unincorporated community in Chicot County, Arkansas, United States.
References
Unincorporated communities in Chicot County, Arkansas
Unincorporated communities in Arkansas
|
```xml
/*
* @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.
*/
// TypeScript Version: 4.1
/* eslint-disable @typescript-eslint/unified-signatures */
/**
* Interface describing function options.
*/
interface Options {
/**
* Specifies the type of characters to return (default: 'grapheme').
*
* ## Notes
*
* - The following option values are supported:
*
* - `'grapheme'`: grapheme clusters. Appropriate for strings containing visual characters which can span multiple Unicode code points (e.g., emoji).
* - `'code_point'`: Unicode code points. Appropriate for strings containing visual characters which are comprised of more than one Unicode code unit (e.g., ideographic symbols and punctuation and mathematical alphanumerics).
* - `'code_unit'`: UTF-16 code units. Appropriate for strings containing visual characters drawn from the basic multilingual plane (BMP) (e.g., common characters, such as those from the Latin, Greek, and Cyrillic alphabets).
*/
mode?: 'grapheme' | 'code_point' | 'code_unit';
}
/**
* Returns the last `n` characters of a string.
*
* @param str - input string
* @param n - number of characters to return
* @param options - options
* @returns updated string
*
* @example
* var out = last( 'last man standing', 2 );
* // returns 'ng'
*
* @example
* var out = last( '', 2, {
* 'mode': 'grapheme'
* });
* // returns ''
*/
declare function last( str: string, n: number, options?: Options ): string;
/**
* Returns the last character of a string.
*
* @param str - input string
* @param options - options
* @returns updated string
*
* @example
* var out = last( 'last man standing', {
* 'mode': 'code_unit'
* });
* // returns 'g'
*
* @example
* var out = last( '', {
* 'mode': 'grapheme'
* });
* // returns ''
*/
declare function last( str: string, options?: Options ): string;
/**
* Returns the last character(s) of a string.
*
* @param str - input string
* @param n - number of characters to return (default: 1)
* @returns updated string
*
* @example
* var out = last( 'last man standing' );
* // returns 'g'
*
* @example
* var out = last( 'presidential election' );
* // returns 'n'
*
* @example
* var out = last( 'javaScript' );
* // returns 't'
*
* @example
* var out = last( 'Hidden Treasures' );
* // returns 's'
*
* @example
* var out = last( '', 2 );
* // returns ''
*
* @example
* var out = last( 'foo bar', 3 );
* // returns 'bar'
*/
declare function last( str: string, n?: number ): string;
// EXPORTS //
export = last;
```
|
Dacianism is a Romanian term describing the tendency to ascribe, largely relying on questionable data and subjective interpretation, an idealized past to the country as a whole. While particularly prevalent during the regime of Nicolae Ceaușescu, its origin in Romanian scholarship dates back more than a century.
The term refers to perceived aggrandizing of Dacian and earlier roots of today's Romanians. This phenomenon is also pejoratively labelled "Dacomania" or "Dacopathy" or sometimes "Thracomania", while its proponents prefer "Dacology". The term protochronism (anglicized from the , from the Ancient Greek terms for "first in time"), originally coined to refer to the supposed pioneering character of the Romanian culture, is sometimes used as a synonym.
Overview
In this context, the term makes reference to the trend (noticed in several versions of Romanian nationalism) to ascribe a unique quality to the Dacians and their civilization. Dacianists attempt to prove either that Dacians had a major part to play in ancient history or even that they had the ascendancy over all cultures (with a particular accent on Ancient Rome, which, in a complete reversal of the founding myth, would have been created by Dacian migrants). Also noted are the exploitation of the Tărtăria tablets as certain proof that writing originated on proto-Dacian territory, and the belief that the Dacian language survived all the way to the Middle Ages.
An additional, but not universal, feature is the attempted connection between the supposed monotheism of the Zalmoxis cult and Christianity, in the belief that Dacians easily adopted and subsequently influenced the religion. Also, Christianity is argued to have been preached to the Daco-Romans by Saint Andrew, who is considered doubtfully as the clear origin of modern-day Romanian Orthodoxy. Despite the lack of supporting evidence, it is the official church stance, being found in history textbooks used in Romanian Orthodox seminaries and theology institutes.
History
The ideas have been explained as part of an inferiority complex present in Romanian nationalism, one which also manifested itself in works not connected with Dacianism, mainly as a rejection of the ideas that Romanian territories only served as a colony of Rome, voided of initiative, and subject to an influx of Latins which would have completely wiped out a Dacian presence.
Dacianism most likely came about with the views professed in the 1870s by Bogdan Petriceicu Hasdeu, one of the main points of the dispute between him and the conservative Junimea. For example, Hasdeu's Etymologicum magnum Romaniae not only claimed that Dacians gave Rome many of her Emperors (an idea supported in recent times by Iosif Constantin Drăgan), but also that the ruling dynasties of early medieval Wallachia and Moldavia were descendants of a caste of Dacians established with "King" (chieftain) Burebista. Other advocates of the idea before World War I included the amateur archaeologist Cezar Bolliac, as well as Teohari Antonescu and Nicolae Densușianu. The latter composed an intricate and unsupported theory on Dacia as the center of European prehistory, authoring a complete parallel to Romanian official history, which included among the Dacians such diverse figures as those of the Asen dynasty, and Horea. The main volume of his writings is Dacia Preistorică ("Prehistoric Dacia").
After World War I and throughout Greater Romania's existence, the ideology increased its appeal. The Iron Guard flirted with the concept, making considerable parallels between its projects and interpretations of what would have been Zalmoxis' message. Mircea Eliade was notably preoccupied with Zalmoxis' cult, arguing in favor of its structural links with Christianity; his theory on Dacian history, viewing Romanization as a limited phenomenon, is celebrated by contemporary partisans of Dacianism.
In a neutral context, the Romanian archaeology school led by Vasile Pârvan investigated scores of previously ignored Dacian sites, which indirectly contributed to the idea's appeal at the time.
In 1974 Edgar Papu published in the mainstream cultural monthly Secolul XX an essay titled "The Romanian Protochronism", arguing for Romanian chronological priority for some European achievements. The idea was promptly adopted by the nationalist Ceaușescu regime, which subsequently encouraged and amplified a cultural and historical discourse claiming the prevalence of autochthony over any foreign influence. Ceaușescu's ideologues developed a singular concept after the 1974 11th Congress of the Communist Party of Romania, when they attached Dacianism to official Marxism, arguing that the Dacians had produced a permanent and "unorganized State". The Dacians had been favored by several communist generations as autochthonous insurgents against an "Imperialist" Rome (with the Stalinist leadership of the 1950s proclaiming them to be closely linked with the Slavic peoples); however, Ceaușescu's was an interpretation with a distinct motivation, making a connection with the opinions of previous Dacianists.
The regime started a partnership with Italian resident, former Iron Guardist and millionaire Iosif Constantin Drăgan, who continued championing the Dacian cause even after the fall of Ceaușescu. Critics regard these excesses as the expression of an economic nationalist course, amalgamating provincial frustrations and persistent nationalist rhetoric, as autarky and cultural isolation of the late Ceaușescu's regime came along with an increase in Dacianist messages.
Vladimir Tismăneanu wrote:
"Protochronism" was the party-sponsored ideology that claimed Romanian precedence in major scientific and cultural discoveries. It was actually the underpinning of Ceaușescu's nationalist tyranny.
No longer backed by a totalitarian state structure after the 1989 Revolution, the interpretation still enjoys popularity in several circles. The main representative of current Protochronism was still Drăgan (now deceased), but the New York City-based physician Napoleon Săvescu took over after Drăgan's death. Together, they issued the magazine Noi, Dacii ("We Dacians") and organized a yearly "International Congress of Dacology". Săvescu still does those.
Săvescu's most famous theory says that the Romanians are not descendants of the Roman colonists and assimilated Dacians, as mainstream historians say, but that they are the descendants of only the Dacians, who spoke a language close to Latin.
Other controversial theories of his include the Dacians (or their ancestors) developing of the first alphabet in the world (see the Tărtăria tablets), the first set of laws or the Dacian conquest of Western Europe, India, Iraq, Japan and the Americas.
His theories are, however, disregarded by historical journals and most historians, e.g. Mircea Babeș, Lucian Boia and Alexandra Tomiță, who label these theories as pseudoscience and anachronistic and consider that there is not enough scientific evidence to support them. Dacia, journal of the Vasile Pârvan Institute of Archaeology, and the history journal Saeculum did not speak highly of him, either.
Dacian script
"Dacian alphabet" is a term used in Romanian protochronism and Dacianism for pseudohistorical claims of a supposed alphabet of the Dacians prior to the conquest of Dacia and its absorption into the Roman Empire.
Its existence was first proposed in the late 19th century by Romanian nationalists, but has been completely rejected by mainstream modern scholarship.
In the opinion of Sorin Olteanu, a modern expert at the Vasile Pârvan Institute of Archaeology, Bucharest, "[Dacian script] is pure fabrication [...] purely and simply Dacian writing does not exist", adding that many scholars believe that the use of writing may have been subject to a religious taboo among the Dacians. It is known that the ancient Dacians used the Greek and Latin alphabets, though possibly not as early as in neighbouring Thrace where the Ezerovo ring in Greek script has been dated to the 5th century BC. A vase fragment from the La Tène period (see illustration above), a probable illiterate imitation of Greek letters, indicates visual knowledge of the Greek alphabet during the La Tène period prior to the Roman invasion. Some Romanian writers writing at the end of the 19th century and later identified as protochronists, particularly the Romanian poet and journalist Cezar Bolliac, an enthusiast amateur archaeologist, claimed to have discovered a Dacian alphabet. They were immediately criticized for archaeological and linguistic reasons. Alexandru Odobescu, criticized some of Bolliac's conclusions. In 1871 Odobescu, along with Henric Trenk, inventoried the Fundul Peșterii cave, one of the Ialomiței caves (See the Romanian Wikipedia article) near Buzău. Odobescu was the first to be fascinated by its writings, which were later dated to the 3rd or 4th century. In 2002, the controversial Romanian historian, Viorica Enăchiuc, stated that the Codex Rohonczi is written in a Dacian alphabet.
The equally controversial linguist Aurora Petan (2005) claims that some Sinaia lead plates could contain unique Dacian scripts.
The linguist George Pruteanu called protochronism as "the barren and paranoid nationalism", because protochronism claims that the Dacian language was the origin of Latin and all other languages, including Hindi and Babylonian.
See also
Antiquization
Notes
References
Lucian Boia, Istorie și mit în conștiința românească, Bucharest, Humanitas, 1997
B. P. Hasdeu, Ethymologicum Magnum Romaniae. Dicționarul limbei istorice și poporane a românilor (Pagini alese), Bucharest, Minerva, 1970
Mircea Martin, "Cultura română între comunism și naționalism" (II), in Revista 22, 44 (660)/XIII, October–November 2002
Ovidiu Șimonca, "Mircea Eliade și 'căderea în lume'", review of Florin Țurcanu, Mircea Eliade. Le prisonnier de l'histoire, in Observatorul Cultural
Katherine Verdery, National Ideology under Socialism. Identity and Cultural Politics in Ceaușescu's Romania, University of California Press, 1991.
External links
www.dacii.ro: A site displaying prominent characteristics of Romanian Protochronism.
www.dacia.org: A site connected with Săvescu.
Monica Spiridon's essay on the intellectual origins of Romanian Protochronism.
Historical myths, legitimating discourses, and identity politics in Ceaușescu's Romania (Part 1), (Part 2)
Tracologie și Tracomanie (Thracology and Thracomania) at Sorin Olteanu's LTDM Project (SOLTDM.COM)
Teme tracomanice (Thracomaniacal Themes) at Sorin Olteanu's LTDM Project (SOLTDM.COM)
Historiography of Romania
National mysticism
National histories
Romanian Communist Party
Romanian nationalism
Socialist Republic of Romania
|
```java
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.graal.compiler.hotspot.amd64;
import static jdk.vm.ci.amd64.AMD64.k1;
import static jdk.vm.ci.amd64.AMD64.k2;
import static jdk.vm.ci.amd64.AMD64.k3;
import static jdk.vm.ci.amd64.AMD64.k4;
import static jdk.vm.ci.amd64.AMD64.k5;
import static jdk.vm.ci.amd64.AMD64.k6;
import static jdk.vm.ci.amd64.AMD64.k7;
import static jdk.vm.ci.amd64.AMD64.r10;
import static jdk.vm.ci.amd64.AMD64.r11;
import static jdk.vm.ci.amd64.AMD64.r12;
import static jdk.vm.ci.amd64.AMD64.r13;
import static jdk.vm.ci.amd64.AMD64.r14;
import static jdk.vm.ci.amd64.AMD64.r8;
import static jdk.vm.ci.amd64.AMD64.r9;
import static jdk.vm.ci.amd64.AMD64.rax;
import static jdk.vm.ci.amd64.AMD64.rbp;
import static jdk.vm.ci.amd64.AMD64.rbx;
import static jdk.vm.ci.amd64.AMD64.rcx;
import static jdk.vm.ci.amd64.AMD64.rdi;
import static jdk.vm.ci.amd64.AMD64.rdx;
import static jdk.vm.ci.amd64.AMD64.rsi;
import static jdk.vm.ci.amd64.AMD64.xmm0;
import static jdk.vm.ci.amd64.AMD64.xmm1;
import static jdk.vm.ci.amd64.AMD64.xmm10;
import static jdk.vm.ci.amd64.AMD64.xmm11;
import static jdk.vm.ci.amd64.AMD64.xmm12;
import static jdk.vm.ci.amd64.AMD64.xmm13;
import static jdk.vm.ci.amd64.AMD64.xmm14;
import static jdk.vm.ci.amd64.AMD64.xmm15;
import static jdk.vm.ci.amd64.AMD64.xmm2;
import static jdk.vm.ci.amd64.AMD64.xmm3;
import static jdk.vm.ci.amd64.AMD64.xmm4;
import static jdk.vm.ci.amd64.AMD64.xmm5;
import static jdk.vm.ci.amd64.AMD64.xmm6;
import static jdk.vm.ci.amd64.AMD64.xmm7;
import static jdk.vm.ci.amd64.AMD64.xmm8;
import static jdk.vm.ci.amd64.AMD64.xmm9;
import java.util.ArrayList;
import java.util.BitSet;
import jdk.graal.compiler.core.common.alloc.RegisterAllocationConfig;
import jdk.vm.ci.code.Register;
import jdk.vm.ci.code.RegisterArray;
import jdk.vm.ci.code.RegisterConfig;
class AMD64HotSpotRegisterAllocationConfig extends RegisterAllocationConfig {
/**
* Specify priority of register selection within phases of register allocation. Highest priority
* is first. A useful heuristic is to give registers a low priority when they are required by
* machine instructions, like EAX and EDX on I486, and choose no-save registers before
* save-on-call, & save-on-call before save-on-entry. Registers which participate in fixed
* calling sequences should come last. Registers which are used as pairs must fall on an even
* boundary.
*
* Adopted from x86_64.ad.
*/
// @formatter:off
static final Register[] registerAllocationOrder = {
r10, r11, r8, r9, r12, rcx, rbx, rdi, rdx, rsi, rax, rbp, r13, r14, /*r15,*/ /*rsp,*/
xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7,
xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15,
k1, k2, k3, k4, k5, k6, k7
};
// @formatter:on
private final boolean preserveFramePointer;
AMD64HotSpotRegisterAllocationConfig(RegisterConfig registerConfig, String[] allocationRestrictedTo, boolean preserveFramePointer) {
super(registerConfig, allocationRestrictedTo);
this.preserveFramePointer = preserveFramePointer;
}
@Override
protected RegisterArray initAllocatable(RegisterArray registers) {
BitSet regMap = new BitSet(registerConfig.getAllocatableRegisters().size());
for (Register reg : registers) {
regMap.set(reg.number);
}
if (preserveFramePointer) {
regMap.clear(rbp.number);
}
ArrayList<Register> allocatableRegisters = new ArrayList<>(registers.size());
for (Register reg : registerAllocationOrder) {
if (regMap.get(reg.number)) {
allocatableRegisters.add(reg);
}
}
return super.initAllocatable(new RegisterArray(allocatableRegisters));
}
}
```
|
```python
from collections.abc import Callable
from unittest.mock import MagicMock
import pytest
from pytest_mock import MockerFixture
from requests_mock import MockerCore
from pathlib import Path
import json
from CommonServerPython import CommandResults, DemistoException
import demistomock as demisto
from MicrosoftGraphFiles import remove_identity_key, url_validation, parse_key_to_context, delete_file_command, \
download_file_command, list_sharepoint_sites_command, list_drive_content_command, create_new_folder_command, \
list_drives_in_site_command, MsGraphClient, upload_new_file_command, list_site_permissions_command, \
create_site_permissions_command, update_site_permissions_command, delete_site_permission_command, get_site_id_from_site_name
def util_load_json(path: str) -> dict:
return json.loads(Path(path).read_text())
COMMANDS_RESPONSES = util_load_json("test_data/response.json")
ARGUMENTS = util_load_json("test_data/test_inputs.json")
COMMANDS_EXPECTED_RESULTS = util_load_json("test_data/expected_results.json")
EXCLUDE_LIST = ["eTag"]
RESPONSE_KEYS_DICTIONARY = {
"@odata.context": "OdataContext",
}
class File:
content = b"12345"
CLIENT_MOCKER = MsGraphClient(
tenant_id="tenant_id", auth_id="auth_id", enc_key='enc_key', app_name='app_name', ok_codes=(200, 204, 201),
base_url='path_to_url verify='use_ssl', proxy='proxy', self_deployed='self_deployed',
redirect_uri='', auth_code='')
CLIENT_MOCKER_AUTH_CODE = MsGraphClient(
tenant_id="tenant_id", auth_id="auth_id", enc_key='enc_key', app_name='app_name', ok_codes=(200, 204, 201),
base_url='path_to_url verify='use_ssl', proxy='proxy', self_deployed='self_deployed',
redirect_uri='redirect_uri', auth_code='auth_code')
def authorization_mock(requests_mock: MockerCore) -> None:
"""
Authorization API request mock.
"""
authorization_url = 'path_to_url
requests_mock.post(authorization_url, json={
'access_token': 'my-access-token',
'expires_in': 3595,
'refresh_token': 'my-refresh-token',
})
def test_remove_identity_key_with_valid_application_input() -> None:
"""
Given:
- Dictionary with three nested objects which the creator type is "application"
When
- When Parsing outputs to context
Then
- Dictionary to remove to first key and add it as an item in the dictionary
"""
res = remove_identity_key(
ARGUMENTS["remove_identifier_data_application_type"]["CreatedBy"]
)
assert len(res.keys()) > 1
assert res["Type"]
assert res["ID"] == "test"
def test_remove_identity_key_with_valid_user_input() -> None:
"""
Given:
- Dictionary with three nested objects which the creator type is "user" and system account
When
- When Parsing outputs to context
Then
- Dictionary to remove to first key and add it as an item in the dictionary
"""
res = remove_identity_key(
ARGUMENTS["remove_identifier_data_user_type"]["CreatedBy"]
)
assert len(res.keys()) > 1
assert res["Type"]
assert res.get("ID") is None
def test_remove_identity_key_with_valid_empty_input() -> None:
"""
Given:
- Dictionary with three nested objects
When
- When Parsing outputs to context
Then
- Dictionary to remove to first key and add it as an item in the dictionary
"""
assert remove_identity_key("") == ""
def test_remove_identity_key_with_invalid_object() -> None:
"""
Given:
- Dictionary with three nested objects
When
- When Parsing outputs to context
Then
- Dictionary to remove to first key and add it as an item in the dictionary
"""
source = 'not a dict'
res = remove_identity_key(source)
assert res == source
def test_url_validation_with_valid_link() -> None:
"""
Given:
- Link to more results for list commands
When
- There is too many results
Then
- Returns True if next link url is valid
"""
res = url_validation(ARGUMENTS["valid_next_link_url"])
assert res == ARGUMENTS["valid_next_link_url"]
def test_url_validation_with_empty_string() -> None:
"""
Given:
- Empty string as next link url
When
- Got a bad input from the user
Then
- Returns Demisto error
"""
with pytest.raises(DemistoException):
url_validation("")
def test_url_validation_with_invalid_url() -> None:
"""
Given:
- invalid string as next link url
When
- Got a bad input from the user
Then
- Returns Demisto error
"""
with pytest.raises(DemistoException):
url_validation(ARGUMENTS["invalid_next_link_url"])
def test_parse_key_to_context_exclude_keys_from_list() -> None:
"""
Given:
- Raw response from graph api
When
- Parsing data to context
Then
- Exclude from output unwanted keys
"""
parsed_response = parse_key_to_context(
COMMANDS_RESPONSES["list_drive_children"]["value"][0]
)
assert parsed_response.get("eTag", True) is True
assert parsed_response.get("ETag", True) is True
@pytest.mark.parametrize(
"command, args, response, filename_expected",
[
(
download_file_command,
{"object_type": "drives", "object_type_id": "123", "item_id": "232"},
File,
"232",
),
(
download_file_command,
{
"object_type": "drives",
"object_type_id": "123",
"item_id": "232",
"file_name": "test.xslx",
},
File,
"test.xslx",
),
],
) # noqa: E124
def test_download_file(
mocker: MockerFixture,
command: Callable,
args: dict,
response: File,
filename_expected: str,
) -> None:
"""
Given:
- Location to where to upload file to Graph Api
When
- Using download file command in Demisto
Then
- Ensure the `filename` is as sent in the command arguments when provided
otherwise, the `filename` is `item_id`
"""
mocker.patch.object(CLIENT_MOCKER.ms_client, "http_request", return_value=response)
mock_file_result = mocker.patch("MicrosoftGraphFiles.fileResult")
command(CLIENT_MOCKER, args)
mock_file_result.assert_called_with(filename_expected, response.content)
@pytest.mark.parametrize(
"command, args, response, expected_result",
[
(
delete_file_command,
{"object_type": "drives", "object_type_id": "123", "item_id": "232"},
COMMANDS_RESPONSES["download_file"],
COMMANDS_EXPECTED_RESULTS["download_file"],
)
],
)
def test_delete_file(mocker: MockerFixture, command: Callable, args: dict, response: str, expected_result: str) -> None:
"""
Given:
- Location to where to upload file to Graph Api
When
- Using download file command in Demisto
Then
- return FileResult object
"""
mocker.patch.object(CLIENT_MOCKER.ms_client, "http_request", return_value=response)
_, result = command(CLIENT_MOCKER, args)
assert expected_result == result
@pytest.mark.parametrize(
"command, args, response, expected_result",
[
(
list_sharepoint_sites_command,
{},
COMMANDS_RESPONSES["list_tenant_sites"],
COMMANDS_EXPECTED_RESULTS["list_tenant_sites"],
)
],
)
def test_list_tenant_sites(mocker: MockerFixture, command: Callable, args: dict, response: dict, expected_result: dict) -> None:
"""
Given:
- Location to where to upload file to Graph Api
When
- Using download file command in Demisto
Then
- return FileResult object
"""
mocker.patch.object(CLIENT_MOCKER.ms_client, "http_request", return_value=response)
result = command(CLIENT_MOCKER, args)
assert expected_result == result[1]
@pytest.mark.parametrize(
"command, args, response, expected_result",
[
(
list_drive_content_command,
{"object_type": "sites", "object_type_id": "12434", "item_id": "123"},
COMMANDS_RESPONSES["list_drive_children"],
COMMANDS_EXPECTED_RESULTS["list_drive_children"],
)
],
)
def test_list_drive_content(mocker: MockerFixture, command: Callable, args: dict, response: dict, expected_result: dict) -> None:
"""
Given:
- Location to where to upload file to Graph Api
When
- Using download file command in Demisto
Then
- return FileResult object
"""
mocker.patch.object(CLIENT_MOCKER.ms_client, "http_request", return_value=response)
result = command(CLIENT_MOCKER, args)
assert expected_result == result[1]
@pytest.mark.parametrize(
"command, args, response, expected_result",
[
(
create_new_folder_command,
{
"object_type": "groups",
"object_type_id": "1234",
"parent_id": "1234",
"folder_name": "name",
},
COMMANDS_RESPONSES["create_new_folder"],
COMMANDS_EXPECTED_RESULTS["create_new_folder"],
)
],
)
def test_create_name_folder(mocker: MockerFixture, command: Callable, args: dict, response: dict, expected_result: dict) -> None:
"""
Given:
- Location to where to upload file to Graph Api
When
- Using download file command in Demisto
Then
- return FileResult object
"""
mocker.patch.object(CLIENT_MOCKER.ms_client, "http_request", return_value=response)
result = command(CLIENT_MOCKER, args)
assert expected_result == result[1]
@pytest.mark.parametrize(
"command, args, response, expected_result",
[
(
list_drives_in_site_command,
{"site_id": "site_id"},
COMMANDS_RESPONSES["list_drives_in_a_site"],
COMMANDS_EXPECTED_RESULTS["list_drives_in_a_site"],
)
],
)
def test_list_drives_in_site(mocker: MockerFixture, command: Callable, args: dict, response: dict, expected_result: dict) -> None:
"""
Given:
- Location to where to upload file to Graph Api
When
- Using download file command in Demisto
Then
- return FileResult object
"""
mocker.patch.object(CLIENT_MOCKER.ms_client, "http_request", return_value=response)
result = command(CLIENT_MOCKER, args)
assert expected_result == result[1]
def expected_upload_headers() -> list:
return [
{'Content-Length': '327680', 'Content-Range': 'bytes 0-327679/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 327680-655359/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 655360-983039/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 983040-1310719/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 1310720-1638399/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 1638400-1966079/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 1966080-2293759/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 2293760-2621439/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 2621440-2949119/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 2949120-3276799/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 3276800-3604479/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 3604480-3932159/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 3932160-4259839/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 4259840-4587519/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 4587520-4915199/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 4915200-5242879/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 5242880-5570559/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 5570560-5898239/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 5898240-6225919/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 6225920-6553599/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 6553600-6881279/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '327680', 'Content-Range': 'bytes 6881280-7208959/7450762',
'Content-Type': 'application/octet-stream'},
{'Content-Length': '241802', 'Content-Range': 'bytes 7208960-7450761/7450762',
'Content-Type': 'application/octet-stream'},
]
def validate_upload_attachments_flow(create_upload_mock: MagicMock, upload_query_mock: MagicMock) -> bool:
"""
Validates that the upload flow is working as expected, each piece of headers is sent as expected.
"""
if not create_upload_mock.called:
return False
if create_upload_mock.call_count != 1:
return False
expected_headers = iter(expected_upload_headers())
for i in range(upload_query_mock.call_count):
current_headers = next(expected_headers)
mock_res = upload_query_mock.mock_calls[i].kwargs['headers']
if mock_res != current_headers:
return False
return True
def self_deployed_client() -> MsGraphClient:
return CLIENT_MOCKER
json_response = {'@odata.context': 'dummy_url',
'@content.downloadUrl': 'dummy_url',
'createdBy': {'application': {'id': 'some_id',
'displayName': 'MS Graph Files'},
'user': {'displayName': 'SharePoint App'}},
'createdDateTime': 'some_date',
'eTag': '"some_eTag"',
'id': 'some_id',
'lastModifiedBy': {'application': {'id': 'some_id',
'displayName': 'MS Graph Files'},
'user': {'displayName': 'SharePoint App'}},
'lastModifiedDateTime': 'some_date',
'name': 'yaya.jpg',
'parentReference': {'driveType': 'documentLibrary',
'driveId': 'some_id',
'id': 'some_id',
'path': 'some_path'},
'webUrl': 'path_to_url
'cTag': '"c:{000-000},0"',
'file': {'hashes': {'quickXorHash': '00000'},
'irmEffectivelyEnabled': False, 'irmEnabled': False,
'mimeType': 'image/jpeg'},
'fileSystemInfo': {'createdDateTime': 'some_date',
'lastModifiedDateTime': 'some_date'},
'image': {}, 'shared': {'effectiveRoles': ['write'],
'scope': 'users'}, 'size': 5906704}
class MockedResponse:
def __init__(self, status_code, json):
self.status_code = status_code
self.json_response = json
def json(self):
return self.json_response
def upload_response_side_effect(**kwargs):
headers = kwargs.get('headers')
if headers and int(headers['Content-Length']) < MsGraphClient.MAX_ATTACHMENT_UPLOAD:
return MockedResponse(status_code=201, json=json_response)
return MockedResponse(status_code=202, json='')
UPLOAD_LARGE_FILE_COMMAND_ARGS = [
(
self_deployed_client(),
{
'object_type': 'drives',
'object_type_id': 'some_object_type_id',
'parent_id': 'some_parent_id',
'entry_id': '3',
'file_name': 'some_file_name',
},
)]
return_value_upload_without_upload_session = {'@odata.context': "path_to_url#sites"
"(some_site)/drive/items/$entity",
'@microsoft.graph.downloadUrl': 'some_url',
'createdDateTime': '2022-12-15T12:56:27Z',
'eTag': '"{11111111-1111-1111-1111-111111111111},11"',
'id': 'some_id',
'lastModifiedDateTime': '2022-12-28T11:38:55Z',
'name': 'some_pdf.pdf',
'webUrl': 'path_to_url
'cTag': '"c:{11111111-1111-1111-1111-111111111111},11"', 'size': 3028,
'createdBy': {'application': {'id': 'some_id',
'displayName': 'MS Graph Files'},
'user': {'displayName': 'SharePoint App'}},
'lastModifiedBy': {'application': {'id': 'some_id',
'displayName': 'MS Graph Files'},
'user': {'displayName': 'SharePoint App'}},
'parentReference': {'driveType': 'documentLibrary',
'driveId': 'some_drive_id',
'id': 'some_id',
'path': '/drive/root:/test-folder'},
'file': {'mimeType': 'image/jpeg',
'hashes': {'quickXorHash': 'quickXorHash'}},
'fileSystemInfo': {'createdDateTime': '2022-12-15T12:56:27Z',
'lastModifiedDateTime': '2022-12-28T11:38:55Z'},
'image': {},
'shared': {'scope': 'users'}}
return_context = {
"MsGraphFiles.UploadedFiles(val.ID === obj.ID)": {
"OdataContext": "path_to_url#sites(some_site)/drive/items/$entity",
"DownloadUrl": "some_url",
"CreatedDateTime": "2022-12-15T12:56:27Z",
"LastModifiedDateTime": "2022-12-28T11:38:55Z",
"Name": "some_pdf.pdf",
"WebUrl": "path_to_url",
"Size": 3028,
"CreatedBy": {
"Application": {"DisplayName": "MS Graph Files", "ID": "some_id"},
"User": {"DisplayName": "SharePoint App"},
},
"LastModifiedBy": {
"Application": {"DisplayName": "MS Graph Files", "ID": "some_id"},
"User": {"DisplayName": "SharePoint App"},
},
"ParentReference": {
"DriveType": "documentLibrary",
"DriveId": "some_drive_id",
"Path": "/drive/root:/test-folder",
"ID": "some_id",
},
"File": {"MimeType": "image/jpeg", "Hashes": {"QuickXorHash": "quickXorHash"}},
"FileSystemInfo": {
"CreatedDateTime": "2022-12-15T12:56:27Z",
"LastModifiedDateTime": "2022-12-28T11:38:55Z",
},
"Image": {},
"Shared": {"Scope": "users"},
"ID": "some_id",
}
}
@pytest.mark.parametrize('client, args', UPLOAD_LARGE_FILE_COMMAND_ARGS)
def test_upload_command_with_upload_session(mocker: MockerFixture, client: MsGraphClient, args: dict) -> None:
"""
Given:
- An image to upload with a size bigger than 3.
When:
- running upload new file command.
Then:
- return an result with upload session.
"""
import requests
mocker.patch.object(demisto, 'getFilePath', return_value={'path': 'test_data/shark.jpg',
'name': 'shark.jpg'})
create_upload_mock = mocker.patch.object(MsGraphClient, 'create_an_upload_session',
return_value=({"response": "", "uploadUrl": "test.com"}, "test.com"))
upload_query_mock = mocker.patch.object(requests, 'put', side_effect=upload_response_side_effect)
upload_file_without_upload_session_mock = mocker.patch.object(MsGraphClient, 'upload_new_file',
return_value="")
upload_new_file_command(client, args)
assert upload_file_without_upload_session_mock.call_count == 0
assert validate_upload_attachments_flow(create_upload_mock, upload_query_mock)
@pytest.mark.parametrize('client, args', UPLOAD_LARGE_FILE_COMMAND_ARGS)
def test_upload_command_without_upload_session(mocker: MockerFixture, client: MsGraphClient, args: dict) -> None:
"""
Given:
- An image to upload (file size lower than 3).
When:
- running upload new file command.
Then:
- return an result without upload session.
"""
mocker.patch.object(demisto, 'getFilePath', return_value={'path': 'test_data/some_pdf.pdf',
'name': 'some_pdf.pdf'})
mocker_https = mocker.patch.object(client.ms_client, "http_request", return_value=return_value_upload_without_upload_session)
create_upload_mock = mocker.patch.object(MsGraphClient, 'create_an_upload_session',
return_value=({"response": "", "uploadUrl": "test.com"}, "test.com"))
upload_file_with_upload_session_mock = mocker.patch.object(MsGraphClient, 'upload_file_with_upload_session_flow',
return_value=({"response": "",
"uploadUrl": "test.com"}, "test.com"))
human_readable, context, result = upload_new_file_command(client, args)
assert mocker_https.call_count == 1
assert create_upload_mock.call_count == 0
assert upload_file_with_upload_session_mock.call_count == 0
assert human_readable == '### MsGraphFiles - File information:\n|CreatedDateTime|ID|Name|Size|WebUrl|\n|---|---|---|---|---|'\
'\n| 2022-12-15T12:56:27Z | some_id | some_pdf.pdf | 3028 | path_to_url |\n'
assert result == return_value_upload_without_upload_session
assert context == return_context
@pytest.mark.parametrize(argnames='client_id', argvalues=['test_client_id', None])
def test_test_module_command_with_managed_identities(mocker: MockerFixture, requests_mock: MockerCore, client_id: str | None):
"""
Given:
- Managed Identities client id for authentication.
When:
- Calling test_module.
Then:
- Ensure the output are as expected.
"""
from MicrosoftGraphFiles import main, MANAGED_IDENTITIES_TOKEN_URL, Resources
import re
mock_token = {'access_token': 'test_token', 'expires_in': '86400'}
get_mock = requests_mock.get(MANAGED_IDENTITIES_TOKEN_URL, json=mock_token)
requests_mock.get(re.compile(f'^{Resources.graph}.*'), json={})
params = {
'managed_identities_client_id': {'password': client_id},
'authentication_type': 'Azure Managed Identities',
'host': Resources.graph
}
mocker.patch.object(demisto, 'params', return_value=params)
mocker.patch.object(demisto, 'command', return_value='test-module')
mocker.patch.object(demisto, 'results', return_value=params)
mocker.patch('MicrosoftApiModule.get_integration_context', return_value={})
main()
assert 'ok' in demisto.results.call_args[0][0]
qs = get_mock.last_request.qs
assert qs['resource'] == [Resources.graph]
assert client_id and qs['client_id'] == [client_id] or 'client_id' not in qs
@pytest.mark.parametrize(
"func_to_test, args",
[
pytest.param(
list_site_permissions_command,
{},
id="test list_site_permissions_command"
),
pytest.param(
create_site_permissions_command,
{"app_id": "test", "role": "test", "display_name": "test"},
id="test create_site_permissions_command",
),
pytest.param(
update_site_permissions_command,
{
"app_id": "test",
"role": "test",
"display_name": "test",
"permission_id": "test",
},
id="test update_site_permissions_command",
),
pytest.param(
delete_site_permission_command,
{"permission_id": "test"},
id="test delete_site_permission_command",
),
],
)
def test_get_site_id_raise_error_site_name_or_site_id_required(
func_to_test: Callable[[MsGraphClient, dict], CommandResults], args: dict
) -> None:
"""
Given:
- Function to test and arguments to pass to the function
When:
- Calling the function without providing site_id or site_name parameter
Then:
- Ensure DemistoException is raised with expected error message
"""
with pytest.raises(
DemistoException, match="Please provide 'site_id' or 'site_name' parameter."
):
func_to_test(CLIENT_MOCKER, args)
@pytest.mark.parametrize(
"func_to_test, args",
[
pytest.param(
list_site_permissions_command,
{"site_name": "test"},
id="test list_site_permissions_command with site_name",
),
pytest.param(
create_site_permissions_command,
{
"site_name": "test",
"app_id": "test",
"role": "test",
"display_name": "test",
},
id="test create_site_permissions_command with site_name",
),
pytest.param(
update_site_permissions_command,
{
"site_name": "test",
"app_id": "test",
"role": "test",
"display_name": "test",
"permission_id": "test",
},
id="test update_site_permissions_command with site_name",
),
pytest.param(
delete_site_permission_command,
{"site_name": "test", "permission_id": "test"},
id="test delete_site_permissions_command with site_name",
),
],
)
def test_get_site_id_raise_error_invalid_site_name(
requests_mock: MockerCore,
func_to_test: Callable[[MsGraphClient, dict], CommandResults],
args: dict,
) -> None:
"""
Given:
- A function to test that requires a valid site name or ID
- Arguments to pass to the function that have an invalid site name
When:
- The function is called with the invalid site name
Then:
- Ensure a DemistoException is raised
- With error message that the site was not found and to provide valid site name/ID
"""
authorization_mock(requests_mock)
requests_mock.get(
"path_to_url", json={"value": []}, status_code=200
)
with pytest.raises(
DemistoException,
match="Site 'test' not found. Please provide a valid site name.",
):
func_to_test(CLIENT_MOCKER, args)
def test_get_site_id_from_site_name_404(requests_mock: MockerCore) -> None:
"""
Given:
- Mocked 404 response from the API when searching for the site
When:
- The get_site_id_from_site_name function is called with the site name
Then:
- Ensure a DemistoException is raised
- With error message that includes:
- The site name that was passed in
- Mention that the site was not found
- Instructions to provide a valid site name/ID
- And the error details matching the 404 response
"""
site_name = "test_site"
authorization_mock(requests_mock)
requests_mock.get(f"path_to_url{site_name}", status_code=404, text="Item not found")
with pytest.raises(DemistoException) as e:
get_site_id_from_site_name(CLIENT_MOCKER, site_name)
assert str(e.value) == (
'Error getting site ID for test_site. Ensure integration instance has permission for this site and site name is valid.'
' Error details: Error in API call [404] - None\nItem not found'
)
def test_list_site_permissions(requests_mock: MockerCore) -> None:
"""
Given:
- A requests mock object
- Mock responses set up for the list site permissions API call
When:
- The list_site_permissions_command function is called with the mock client
- And arguments for a site ID
Then:
- Ensure the readable output contains the expected permission data
- And matches the mock response
"""
authorization_mock(requests_mock)
requests_mock.get(
"path_to_url",
json=util_load_json("test_data/mock_list_permissions.json"),
)
result = list_site_permissions_command(CLIENT_MOCKER, {"site_id": "test"})
assert result.readable_output == (
"### Site Permission\n"
"|Application ID|Application Name|ID|Roles|\n"
"|---|---|---|---|\n"
"| new-app-id | Example1 App | 1 | read |\n"
"| new-app-id | Example2 App | 2 | write |\n"
)
def test_list_site_permissions_with_permission_id(requests_mock: MockerCore) -> None:
"""
Given:
- A requests mock object
- Arguments with a site ID and permission ID
When:
- The list_site_permissions_command is called with the arguments
Then:
- Ensure the readable output contains the expected permission data
- Ensure the api call is with permission id "/permissions/id"
"""
args = {"site_id": "test", "permission_id": "id"}
authorization_mock(requests_mock)
requests_mock.get(
"path_to_url",
json=util_load_json("test_data/mock_list_permissions.json")["value"][0],
)
result = list_site_permissions_command(CLIENT_MOCKER, args)
assert result.readable_output == (
"### Site Permission\n"
"|Application ID|Application Name|ID|Roles|\n"
"|---|---|---|---|\n"
"| new-app-id | Example1 App | 1 | read |\n"
)
def test_create_permissions_success(requests_mock: MockerCore) -> None:
"""
Given:
- Arguments with site ID, app ID, role and display name
When:
- The create_site_permissions_command is called with the arguments
Then:
- Ensure the readable output contains the expected permission data
"""
args = {
"site_id": "test",
"app_id": "app-id",
"role": "role",
"display_name": "name",
}
authorization_mock(requests_mock)
requests_mock.post(
"path_to_url",
json=util_load_json("test_data/mock_list_permissions.json")["value"][0],
)
result = create_site_permissions_command(CLIENT_MOCKER, args)
assert result.readable_output == (
"### Site Permission\n"
"|Application ID|Application Name|ID|Roles|\n"
"|---|---|---|---|\n"
"| new-app-id | Example1 App | 1 | read |\n"
)
def test_update_permissions_command(requests_mock: MockerCore) -> None:
"""
Given:
- Arguments with permission ID, new role, and site ID
When:
- The update_site_permissions_command is called with the arguments
Then:
- Ensure the readable output contains the expected updated permission data
- Ensure the API call is made to update the permission with the given ID
"""
args = {"permission_id": "id", "role": "role1", "site_id": "site"}
authorization_mock(requests_mock)
requests_mock.patch(
"path_to_url",
json=util_load_json("test_data/mock_list_permissions.json")["value"][0],
)
result = update_site_permissions_command(CLIENT_MOCKER, args)
assert (
result.readable_output
== "Permission id of site site was updated successfully with new role ['read']."
)
def test_delete_site_permission_command(requests_mock: MockerCore) -> None:
"""
Given:
- Arguments with permission ID and site ID
When:
- The delete_site_permission_command is called with the arguments
Then:
- Ensure the API call is made to delete the permission with the given ID
- Ensure the readable output indicates the permission was deleted
"""
args = {"permission_id": "id", "site_id": "site"}
authorization_mock(requests_mock)
requests_mock.delete(
"path_to_url", status_code=204
)
result = delete_site_permission_command(CLIENT_MOCKER, args)
assert result.readable_output == "Site permission was deleted."
def test_generate_login_url(mocker):
"""
Given:
- Self-deployed are true and auth code are the auth flow
When:
- Calling function msgraph-user-generate-login-url
- Ensure the generated url are as expected.
"""
# prepare
import demistomock as demisto
from MicrosoftGraphFiles import main, Scopes
redirect_uri = 'redirect_uri'
tenant_id = 'tenant_id'
client_id = 'client_id'
mocked_params = {
'redirect_uri': redirect_uri,
'auth_type': 'Authorization Code',
'self_deployed': 'True',
'credentials_tenant_id': {'password': tenant_id},
'credentials_auth_id': {'password': client_id},
'credentials_enc_key': {'password': 'client_secret'}
}
mocker.patch.object(demisto, 'params', return_value=mocked_params)
mocker.patch.object(demisto, 'command', return_value='msgraph-files-generate-login-url')
return_results = mocker.patch('MicrosoftGraphFiles.return_results')
main()
expected_url = f'[login URL](path_to_url{tenant_id}/oauth2/v2.0/authorize?' \
f'response_type=code&scope=offline_access%20{Scopes.graph}' \
f'&client_id={client_id}&redirect_uri={redirect_uri})'
res = return_results.call_args[0][0].readable_output
assert expected_url in res
@pytest.mark.parametrize('grant_type, self_deployed, demisto_command, expected_result, should_raise, client',
[
('', False, 'test-module', 'ok', False, CLIENT_MOCKER),
('authorization_code', True, 'test-module', 'ok', True, CLIENT_MOCKER_AUTH_CODE),
('client_credentials', True, 'test-module', 'ok', False, CLIENT_MOCKER),
('client_credentials', True, 'msgraph-files-auth-test', '``` Success!```', False, CLIENT_MOCKER),
('authorization_code', True, 'msgraph-files-auth-test',
'``` Success!```', False, CLIENT_MOCKER_AUTH_CODE)
])
def test_test_function(mocker, grant_type, self_deployed, demisto_command, expected_result, should_raise, client):
"""
Given:
- Authentication method, self_deployed information, and demisto command.
When:
- Calling test_function.
Then:
- Ensure the output is as expected.
"""
from MicrosoftGraphFiles import test_function
client = client
client.ms_client.self_deployed = self_deployed
client.ms_client.grant_type = grant_type
demisto_params = {'self_deployed': self_deployed,
'auth_code': client.ms_client.auth_code, 'redirect_uri': client.ms_client.redirect_uri}
mocker.patch('MicrosoftGraphFiles.demisto.params', return_value=demisto_params)
mocker.patch('MicrosoftGraphFiles.demisto.command', return_value=demisto_command)
mocker.patch.object(client.ms_client, 'http_request')
if should_raise:
with pytest.raises(DemistoException) as exc:
test_function(client)
assert 'self-deployed - Authorization Code Flow' in str(exc)
else:
result = test_function(client)
assert result == expected_result
client.ms_client.http_request.assert_called_once_with(url_suffix="sites", timeout=7, method="GET")
```
|
Evander (Greek: ) son of Evander from Beroea was a Roman-era Macedonian sculptor of the 1st century AD. A well-preserved relief of the Flavian period, was signed by him. Two other signatures of Evander are also found in Lete and Larissa.
References
Grabdenkmäler mit Porträts aus Makedonien (1998) 55, 51
List of sculptures in the Archaeological Museum of Thessaloniki 56
Cultural and Educational Technology Institute search
1st-century Greek sculptors
Ancient Beroeans
Roman-era Macedonians
Ancient Macedonian sculptors
|
```ruby
require 'pycall/pyobject_wrapper'
module PyCall
module PyTypeObjectWrapper
include PyObjectWrapper
def self.extend_object(cls)
unless cls.kind_of? Class
raise TypeError, "PyTypeObjectWrapper cannot extend non-class objects"
end
pyptr = cls.instance_variable_get(:@__pyptr__)
unless pyptr.kind_of? PyTypePtr
raise TypeError, "@__pyptr__ should have PyCall::PyTypePtr object"
end
super
cls.include PyObjectWrapper
end
def inherited(subclass)
subclass.instance_variable_set(:@__pyptr__, __pyptr__)
end
def new(*args)
wrap_pyptr(LibPython::Helpers.call_object(__pyptr__, *args))
end
def wrap_pyptr(pyptr)
return pyptr if pyptr.kind_of? self
pyptr = pyptr.__pyptr__ if pyptr.kind_of? PyObjectWrapper
unless pyptr.kind_of? PyPtr
raise TypeError, "unexpected argument type #{pyptr.class} (expected PyCall::PyPtr)"
end
unless pyptr.kind_of? __pyptr__
raise TypeError, "unexpected argument Python type #{pyptr.__ob_type__.__tp_name__} (expected #{__pyptr__.__tp_name__})"
end
allocate.tap do |obj|
obj.instance_variable_set(:@__pyptr__, pyptr)
end
end
def ===(other)
case other
when PyObjectWrapper
__pyptr__ === other.__pyptr__
when PyPtr
__pyptr__ === other
else
super
end
end
def <(other)
case other
when self
false
when PyTypeObjectWrapper
__pyptr__ < other.__pyptr__
when Class
false if other.ancestors.include?(self)
when Module
if ancestors.include?(other)
true
elsif other.ancestors.include?(self)
false
end
else
raise TypeError, "compared with non class/module"
end
end
private
def register_python_type_mapping
PyCall::Conversion.register_python_type_mapping(__pyptr__, self)
end
end
module_function
class WrapperClassCache < WrapperObjectCache
def initialize
types = [LibPython::API::PyType_Type]
types << LibPython::API::PyClass_Type if defined? LibPython::API::PyClass_Type
super(*types)
end
def check_wrapper_object(wrapper_object)
unless wrapper_object.kind_of?(Class) && wrapper_object.kind_of?(PyTypeObjectWrapper)
raise TypeError, "unexpected type #{wrapper_object.class} (expected Class extended by PyTypeObjectWrapper)"
end
end
def self.instance
@instance ||= self.new
end
end
private_constant :WrapperClassCache
def wrap_class(pytypeptr)
check_isclass(pytypeptr)
WrapperClassCache.instance.lookup(pytypeptr) do
Class.new do |cls|
cls.instance_variable_set(:@__pyptr__, pytypeptr)
cls.extend PyTypeObjectWrapper
end
end
end
end
```
|
Manie Maritz (26 July 1876 – 20 December 1940), also known as Gerrit Maritz, was a Boer officer during the Second Boer War and a leading rebel of the 1914 Maritz Rebellion. Maritz was also a participant in the Herero and Namaqua genocide. In the 1930s, he became an outspoken Nazi sympathizer and a supporter of Nazi Germany.
Early years
Maritz was born in Kimberley, Northern Cape then in the British colony of the Cape of Good Hope, and as such, was a British subject. He was christened Salomon Gerhardus Maritz. When he turned 19 he went to Johannesburg and was employed as a cab driver by his uncle. During the Jameson Raid he volunteered as a guard of the Johannesburg fort. This entitled him to become a citizen of the Zuid-Afrikaansche Republiek (ZAR). This, in turn, permitted him to join the Zuid-Afrikaansche Republiek Politie (ZARP), the police force in Johannesburg.
Second Boer War
Maritz joined the Boksburg Commando and proceeded to the Natal front. Later he joined Daniel Theron's reconnaissance corps and then participated in the invasion of the Cape Colony. He eventually landed up in the desert-like terrain of the North-western Cape. Maritz claims that Jan Smuts appointed him as a veggeneraal ('fighting-general'). At that time Deneys Reitz was on the staff of General Jan Smuts. Reitz writes that Maritz was only a "leader of various rebel bands". If Smuts had appointed Maritz as a fighting general, Reitz would have known about it.
Near the end of the war Maritz ordered the killing of 35 Coloured (Khoikhoi) in what became known as the Leliefontein massacre. Gideon Scheepers and Breaker Morant were court-martialled and shot for similar crimes. When peace was made, the burghers of the erstwhile republics were obliged to lay down their arms and sign an oath of allegiance to the British monarch. Instead Maritz slipped over the border to German South West Africa. In his autobiography Maritz does not say why he committed this massacre.
Inter war years
He went to Europe and then to Madagascar and back to Europe. He returned to South Africa, where he farmed horses in the Cape and also helped the Germans during the Herero and Namaqua genocide. When he returned he went to the Transvaal, but was arrested for entering the colony, not having signed the oath of allegiance. He departed for the Cape. When the Free State received responsible government, he went there and later joined the police in the Transvaal.
First World War
In 1913 Maritz was offered a commission in the Active Citizen Force of the Union Defence Force He accepted and, after attending a training course, he was appointed to command the military area abutting German South-West Africa. In August 1914 he was promoted to Lieutenant-Colonel. There is evidence that he started colluded with the Germans at a very early stage. As early as the (southern hemisphere) autumn of 1913 he had contact with the German governor in the neighbouring country.
On 23 September 1914 Maritz was ordered to advance in the direction of the German border, to support the Union's invasion in the vicinity of Sandfontein, where a portion of Lieutenant-Colonel Lukin's force was stranded. He refused to do so. Then he was ordered to relinquish command to another officer and return to Pretoria, but again refused to do so. On 9 October he eventually decided to rebel. The next day he occupied the town of Keimoes. Then on 22 October he was wounded in a skirmish with government troops and he was taken to German South-West Africa.
Some people have named the rebellion after him.
Later life
When he returned to South Africa in 1923 he was arrested and charged with high treason. He was convicted and sentenced to three years' imprisonment. When General Hertzog's National Party won the 1924 election, they released Maritz after he had served only three months. During the 1930s, Maritz became a Nazi sympathiser and was known as an outspoken proponent of the Third Reich. In 1939 he published his autobiography called My Lewe en Strewe (My life and aspiration). Britz points out that the book was written many years after the events, lacks objectivity and has a strong emotional flavour. The anti-Semitic statements in his book resulted in his prosecution for fomenting racial hatred. He was fined £75.
Death
He died in Pretoria on 19 December 1940 and is buried in the Pretoria West Cemetery.
In popular culture
The character General Manie Roosa, in James Rollins and Grant Blackwood's novel The Kill Switch (2014), is "very loosely based on the real-life Boer leader Manie Maritz.
Maritz is referred to many times in John Buchan's Greenmantle (1916) in which the heroes, who are British spies, masquerade as veterans of Maritz's rebellion in order to infiltrate among German strategists.
Notes
References
Jurgens Johannes Britz, Genl S G (Manie) Maritz se aandeel aan die rebellie van 1914 - 1915, unpublished M.A. dissertation University of Pretoria, 1979.
Manie Maritz, "My lewe en strewe", published by author in 1939
Further reading
1. Boer Rebels and the Kaiser,s Men, Die Boervolk van SA, 25 August 2009.
1876 births
1940 deaths
People from Kimberley, Northern Cape
Afrikaner nationalists
Second Boer War crimes
South African mass murderers
South African Nazis
South African police officers convicted of crimes
South African prisoners and detainees
South African Republic military personnel of the Second Boer War
Herero and Namaqua genocide perpetrators
Boer generals
People convicted of racial hatred offences
People convicted of treason against the United Kingdom
People convicted of treason against South Africa
|
Like It Should Be is the only album released by Hieroglyphics subgroup, Extra Prolific. The album was released on October 25, 1994 through Jive Records and was mainly produced by group member Duane "Snupe" Lee and Souls of Mischief member A-Plus, with additional production handled by the likes of Domino and Mike G among others.
After well-received efforts by other members of the Hieroglyphics crew (including Souls of Mischief's 93 'til Infinity and Casual's Fear Itself) Like It Should Be also gained positive reviews with Allmusic giving it 3 out of a possible 5 stars and calling it "quite strong and possesses a plethora of exceptional tracks". However like the other Hieroglyphics releases, the album failed to sell well and did not do well on the Billboard charts, peaking low on the R&B and Heatseekers charts. One charting single was released, "Brown Sugar", which peaked at 41 on the Rap Singles chart.
Track listing
"Intro"- :41
"Brown Sugar"- 3:21
"In Front of the Kids"- 2:40
"Is It Right?"- 3:21
"Sweet Potato Pie"- 3:54
"Cash Money"- 1:27
"One Motion"- 2:59
"Never Changing"- 3:06
"First Sermon"- 3:27
"Now What"- 3:32
"It's Alright"- 2:44
"In 20 Minutes"- 3:11
"Go Back to School"- 3:13
"The Fat Outro"- 2:58
"Brown Sugar (Domino Remix)"- 3:12
"Give It Up"- 2:51
Charts
References
1994 debut albums
Jive Records albums
Albums produced by A-Plus (rapper)
|
```objective-c
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_WASM_WASM_MODULE_SOURCEMAP_H_
#define V8_WASM_WASM_MODULE_SOURCEMAP_H_
#include <string>
#include <vector>
#include "include/v8.h"
#include "src/base/macros.h"
namespace v8 {
namespace internal {
namespace wasm {
// The class is for decoding and managing source map generated by a WebAssembly
// toolchain (e.g. Emscripten). This implementation mostly complies with the
// specification (path_to_url with the following
// accommodations:
// 1. "names" field is an empty array in current source maps of Wasm, hence it
// is not handled;
// 2. The semicolons divides "mappings" field into groups, each of which
// represents a line in the generated code. As *.wasm is in binary format, there
// is one "line" of generated code, and ";" is treated as illegal symbol in
// "mappings".
// 3. Though each comma-separated section may contains 1, 4 or 5 fields, we only
// consider "mappings" with 4 fields, i.e. start line of generated code, index
// into "sources" fields, start line of source code and start column of source
// code.
class V8_EXPORT_PRIVATE WasmModuleSourceMap {
public:
WasmModuleSourceMap(v8::Isolate* v8_isolate,
v8::Local<v8::String> src_map_str);
// Member valid_ is true only if the source map complies with specification
// and can be correctly decoded.
bool IsValid() const { return valid_; }
// Given a function located at [start, end) in Wasm Module, this function
// checks if this function has its corresponding source code.
bool HasSource(size_t start, size_t end) const;
// Given a function's base address start and an address addr within, this
// function checks if the address can be mapped to an offset in this function.
// For example, we have the following memory layout for Wasm functions, foo
// and bar, and O1, O2, O3 and O4 are the decoded offsets of source map:
//
// O1 --- O2 ----- O3 ----- O4
// --->|<-foo->|<--bar->|<-----
// --------------A-------------
//
// Address A of function bar should be mapped to its nearest lower offset, O2.
// However, O2 is an address of function foo, thus, this mapping is treated as
// invalid.
bool HasValidEntry(size_t start, size_t addr) const;
// This function is responsible for looking up an offset's corresponding line
// number in source file. It should only be called when current function is
// checked with IsValid, HasSource and HasValidEntry.
size_t GetSourceLine(size_t wasm_offset) const;
// This function is responsible for looking up an offset's corresponding
// source file name. It should only be called when current function is checked
// with IsValid, HasSource and HasValidEntry.
std::string GetFilename(size_t wasm_offset) const;
private:
std::vector<size_t> offsets;
std::vector<std::string> filenames;
std::vector<size_t> file_idxs;
std::vector<size_t> source_row;
// As column number in source file is always 0 in source map generated by
// WebAssembly toolchain, we will not store this value.
bool valid_ = false;
bool DecodeMapping(const std::string& s);
};
} // namespace wasm
} // namespace internal
} // namespace v8
#endif // V8_WASM_WASM_MODULE_SOURCEMAP_H_
```
|
```objective-c
/*
*
*/
#pragma once
/**
* @brief ESP-TLS Connection Handle
*/
#include <stdbool.h>
#include <sys/socket.h>
#include <fcntl.h>
#include "esp_err.h"
#include "esp_tls_errors.h"
#ifdef CONFIG_ESP_TLS_USING_MBEDTLS
#include "mbedtls/platform.h"
#include "mbedtls/net_sockets.h"
#include "mbedtls/esp_debug.h"
#include "mbedtls/ssl.h"
#include "mbedtls/entropy.h"
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/error.h"
#ifdef CONFIG_ESP_TLS_SERVER_SESSION_TICKETS
#include "mbedtls/ssl_ticket.h"
#endif
#ifdef CONFIG_MBEDTLS_SSL_PROTO_TLS1_3
#include "psa/crypto.h"
#endif
#elif CONFIG_ESP_TLS_USING_WOLFSSL
#include "wolfssl/wolfcrypt/settings.h"
#include "wolfssl/ssl.h"
#endif
struct esp_tls {
#ifdef CONFIG_ESP_TLS_USING_MBEDTLS
mbedtls_ssl_context ssl; /*!< TLS/SSL context */
mbedtls_entropy_context entropy; /*!< mbedTLS entropy context structure */
mbedtls_ctr_drbg_context ctr_drbg; /*!< mbedTLS ctr drbg context structure.
CTR_DRBG is deterministic random
bit generation based on AES-256 */
mbedtls_ssl_config conf; /*!< TLS/SSL configuration to be shared
between mbedtls_ssl_context
structures */
mbedtls_net_context server_fd; /*!< mbedTLS wrapper type for sockets */
mbedtls_x509_crt cacert; /*!< Container for the X.509 CA certificate */
mbedtls_x509_crt *cacert_ptr; /*!< Pointer to the cacert being used. */
union {
mbedtls_x509_crt clientcert; /*!< Container for the X.509 client certificate */
mbedtls_x509_crt servercert; /*!< Container for the X.509 server certificate */
};
union {
mbedtls_pk_context clientkey; /*!< Container for the private key of the client
certificate */
mbedtls_pk_context serverkey; /*!< Container for the private key of the server
certificate */
};
#ifdef CONFIG_MBEDTLS_HARDWARE_ECDSA_SIGN
bool use_ecdsa_peripheral; /*!< Use the ECDSA peripheral for the private key operations. */
uint8_t ecdsa_efuse_blk; /*!< The efuse block number where the ECDSA key is stored. */
#endif
#elif CONFIG_ESP_TLS_USING_WOLFSSL
void *priv_ctx;
void *priv_ssl;
#endif
int sockfd; /*!< Underlying socket file descriptor. */
ssize_t (*read)(esp_tls_t *tls, char *data, size_t datalen); /*!< Callback function for reading data from TLS/SSL
connection. */
ssize_t (*write)(esp_tls_t *tls, const char *data, size_t datalen); /*!< Callback function for writing data to TLS/SSL
connection. */
esp_tls_conn_state_t conn_state; /*!< ESP-TLS Connection state */
fd_set rset; /*!< read file descriptors */
fd_set wset; /*!< write file descriptors */
bool is_tls; /*!< indicates connection type (TLS or NON-TLS) */
esp_tls_role_t role; /*!< esp-tls role
- ESP_TLS_CLIENT
- ESP_TLS_SERVER */
esp_tls_error_handle_t error_handle; /*!< handle to error descriptor */
};
// Function pointer for the server configuration API
typedef esp_err_t (*set_server_config_func_ptr) (esp_tls_cfg_server_t *cfg, esp_tls_t *tls);
// This struct contains any data that is only specific to the server session and not required by the client.
typedef struct esp_tls_server_params {
set_server_config_func_ptr set_server_cfg;
} esp_tls_server_params_t;
```
|
James Burns (9 June 1789 – 6 September 1871), was a shipowner born in Glasgow
Family
Burns was the third son of the Revd Dr John Burns (1744–1839), minister of the Barony parish of Glasgow, and his wife, Elizabeth, née Stevenson. His eldest brother, Dr John Burns FRS, became the first professor of surgery in the University of Glasgow, and his second brother, Allan Burns, became physician to the empress of Russia at St Petersburg.
Burns was married twice: first, to Margaret Smith and, second, to Margaret Shortridge, who predeceased him. With Margaret Shortridge he had one son, John Burns, who inherited his estates and became chairman of the Cunard Line.
Shipping
Unlike his older brothers, James Burns turned to commerce, and was joined by his younger brother, Sir George Burns, 1st Baronet (1795–1890), in 1818, setting up as J. & G. Burns, general merchants in Glasgow. After six years, the two brothers moved into shipping, joining with Hugh Mathie of Liverpool to establish a small shipping line of six sailing vessels plying between the two ports. The Clyde was then the leading waterway for steam navigation; within a year James and George Burns had ordered their first steamer, and they quickly replaced all their sail ships by steamboats. While George was mainly interested in the technical aspects of the ships, it was James who was the chief commercial influence in the business, supervising the day-to-day transactions, the negotiation of cargoes and contracts.
The Mathie connection with Liverpool was replaced in 1830 by a new arrangement with two Liverpool-based Scots, David and Charles MacIver, to form the Glasgow Steam Packet Company. This arrangement allowed James and George Burns to extend their steamship business to Londonderry, Larne, and Belfast. As before, George concentrated on the shipping department, while James was mainly responsible for the mercantile side of the business.
While the Irish Sea trade was their first and main business, two other avenues opened up to James and George Burns. In 1839 the Liverpool connection was greatly strengthened when George Burns was introduced to Samuel Cunard and raised £270,000 in subscriptions to establish the British and North American Royal Mail Steam Packet Company. This company secured a seven-year contract from the Admiralty to carry the American mails by steamship. James and George, with the MacIvers, were founding partners and shareholders with Cunard in the new venture. While this took George's attention south to Liverpool, James concentrated on the Glasgow business, and in 1845 G. and J. Burns acquired an interest in the developing west highland steamer services by purchasing the Castle Line. This however was quickly re-sold to their nephew David Macbrayne, their shipping clerk David Hutcheson, and his brother Alexander.
Later life and death
He retired from active business and developed an interest in estate improvement, acquiring the estates of Kilmahew, Cumbernauld, and Bloomhall in Dunbartonshire. He spent much time on improvements and was a liberal supporter of religious and philanthropic enterprises. He died on 6 September 1871 at Kilmahew Castle, Cardross, Dumbarton, and was succeeded in his estates by his only son, John Burns.
References
The Old Country Houses of the Old Glasgow Gentry. John Guthrie Smith and John Oswald Mitchell, 1878. This title on Glasgow Digital Library
Memories and Portraits of 100 Glasgow Men, 1886. This title on Glasgow Digital Library
1789 births
1871 deaths
19th-century Scottish businesspeople
Businesspeople from Glasgow
|
```smalltalk
using System;
using System.Linq;
namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps;
public class ProjectRenameStep : ProjectBuildPipelineStep
{
private readonly string _oldName;
private readonly string _newName;
public ProjectRenameStep(string oldName, string newName)
{
_oldName = oldName;
_newName = newName;
}
public override void Execute(ProjectBuildContext context)
{
var csprojFiles = context.Files.Where(f => f.Name.EndsWith(".csproj"));
foreach (var file in csprojFiles)
{
if (file.Name.Contains(_oldName))
{
file.SetName(file.Name.Replace(_oldName, _newName));
}
}
var files = context.Files.Where(f => f.Name.EndsWith(".sln") || f.Name.EndsWith(".cs"));
foreach (var file in files)
{
file.NormalizeLineEndings();
var lines = file.GetLines();
for (var i = 0; i < lines.Length; i++)
{
if (lines[i].Contains(_oldName))
{
lines[i] = lines[i].Replace(_oldName, _newName);
}
}
file.SetLines(lines);
}
var directoryFiles = context.Files.Where(f => f.Name.Contains(_oldName));
foreach (var file in directoryFiles)
{
file.SetName(file.Name.Replace(_oldName, _newName));
}
}
}
```
|
```rust
/*
*
*
* 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.
* your_sha256_hash--------------
*/
use crypto::digest::Digest;
use crypto::sha2::Sha512;
pub struct IntKeyAddresser {
namespace: String,
pub family_name: String,
pub version: String,
}
impl IntKeyAddresser {
pub fn new() -> IntKeyAddresser {
let mut hasher = Sha512::new();
hasher.input_str("intkey");
IntKeyAddresser {
namespace: hasher.result_str()[..6].to_string(),
family_name: "intkey".to_string(),
version: "1.0".to_string(),
}
}
pub fn make_address(&self, name: &str) -> String {
let prefix = self.namespace.clone();
let mut hasher = Sha512::new();
hasher.input(name.as_bytes());
(prefix + &hasher.result_str()[64..]).to_string()
}
}
```
|
```xml
import React, { useMemo, MouseEventHandler, useState } from 'react'
import styled from '../../../lib/styled'
import cc from 'classcat'
import { AppComponent } from '../../../lib/types'
import Scroller from '../../atoms/Scroller'
import TableRow from './molecules/TableRow'
import TableCol from './atoms/TableCol'
import Icon from '../../atoms/Icon'
import { mdiPlus } from '@mdi/js'
import { TableColProps, TableRowProps } from './tableInterfaces'
import shortid from 'shortid'
import Checkbox from '../../molecules/Form/atoms/FormCheckbox'
interface TableProps {
cols?: TableColProps[]
rows?: TableRowProps[]
disabledAddColumn?: boolean
disabledAddRow?: boolean
allRowsAreSelected?: boolean
showCheckboxes?: boolean
onAddColButtonClick?: MouseEventHandler<HTMLButtonElement>
onAddRowButtonClick?: MouseEventHandler<HTMLButtonElement>
selectAllRows?: (val: boolean) => void
stickyFirstCol?: boolean
}
const Table: AppComponent<TableProps> = ({
className,
cols = [],
rows = [],
selectAllRows,
showCheckboxes,
allRowsAreSelected,
disabledAddColumn = false,
onAddColButtonClick,
disabledAddRow = false,
onAddRowButtonClick,
stickyFirstCol = true,
}) => {
const [tableId] = useState(shortid.generate())
const columnWidths = useMemo(() => {
return cols.map((col) => {
return col.width
})
}, [cols])
return (
<TableContainer
className={cc([
'table',
className,
stickyFirstCol && 'table--sticky-col',
showCheckboxes && 'table--with-checkbox',
])}
>
<Scroller className='table__wrapper'>
<div>
<div className='table__header'>
{showCheckboxes && selectAllRows != null && (
<div className='table-row__checkbox__wrapper'>
<Checkbox
className={cc([
'table-row__checkbox',
allRowsAreSelected && 'table-row__checkbox--checked',
])}
checked={allRowsAreSelected}
toggle={() => selectAllRows(!allRowsAreSelected)}
/>
</div>
)}
{cols.map((col, i) => (
<TableCol {...col} key={`${tableId}-head-${i}`} />
))}
{!disabledAddColumn && (
<button
className='table__header__addColButton'
onClick={onAddColButtonClick}
>
<Icon path={mdiPlus} size={16} />
</button>
)}
</div>
</div>
{rows.map((row, i) => (
<div
className='table-row__wrapper'
key={row.id != null ? row.id : `row-${i}`}
>
<TableRow
{...row}
widths={columnWidths}
disabledAddColumn={disabledAddColumn}
showCheckbox={showCheckboxes}
/>
</div>
))}
{!disabledAddRow && (
<button className='table__addRowButton' onClick={onAddRowButtonClick}>
<Icon path={mdiPlus} size={16} />
</button>
)}
</Scroller>
</TableContainer>
)
}
export default Table
const TableContainer = styled.div`
border-style: solid;
border-width: 1px 0;
overflow-x: auto;
border-color: ${({ theme }) => theme.colors.border.main};
.table__header {
display: inline-flex;
border-bottom: solid 1px ${({ theme }) => theme.colors.border.main};
}
.table-row,
.table__header {
min-width: 100%;
}
.table__header__addColButton {
background-color: transparent;
color: ${({ theme }) => theme.colors.text.primary};
min-width: 40px;
flex: 1;
text-align: left;
&:hover {
background-color: ${({ theme }) => theme.colors.background.secondary};
}
}
.table__addRowButton {
background-color: transparent;
color: ${({ theme }) => theme.colors.text.primary};
width: 100%;
text-align: left;
padding: ${({ theme }) => theme.sizes.spaces.xsm}px;
&:hover {
background-color: ${({ theme }) => theme.colors.background.secondary};
}
}
.table-row__checkbox__wrapper {
display: flex;
align-items: center;
}
.table-row:hover .table-row__checkbox,
.table__header:hover .table-row__checkbox {
opacity: 1;
}
.table-row__checkbox {
opacity: 0;
margin-left: ${({ theme }) => theme.sizes.spaces.df}px;
margin-right: ${({ theme }) => theme.sizes.spaces.df}px;
&.table-row__checkbox--checked {
opacity: 1;
}
}
&.table--sticky-col {
.table__header > div:first-child {
z-index: 10;
position: sticky;
left: 0;
background-color: ${({ theme }) => theme.colors.background.primary};
}
.table__header > div:nth-child(2) {
z-index: 10;
position: sticky;
left: 300px;
background-color: ${({ theme }) => theme.colors.background.primary};
}
.table-row > div:first-child {
z-index: 10;
position: sticky;
left: 0;
background-color: ${({ theme }) => theme.colors.background.primary};
}
.table-row > div:nth-child(2) {
z-index: 10;
position: sticky;
left: 300px;
background-color: ${({ theme }) => theme.colors.background.primary};
}
&.table--with-checkbox {
.table-row > div:nth-child(2) {
position: sticky;
left: 42px;
}
.table-row > div:nth-child(3) {
z-index: 9;
position: sticky;
background-color: ${({ theme }) => theme.colors.background.primary};
}
.table__header > div:nth-child(2) {
position: sticky;
left: 42px;
}
.table__header > div:nth-child(3) {
z-index: 9;
position: sticky;
background-color: ${({ theme }) => theme.colors.background.primary};
}
}
}
.table-row__wrapper:last-child > .table-row {
border-bottom: none;
}
`
```
|
Kipsigak is a village near Kapsabet in Nandi County, Kenya. Administratively, Kipsigak is a location in Kilibwoni division of Nandi County. Its local authority is Kapsabet municipality and constituency is Emgwen.
It is the birthplace of Kenyan runner Augustine Kiprono Choge.
References
Populated places in Nandi County
|
Keelhaul may refer to:
Keelhauling, a form of corporal punishment used against sailors
Operation Keelhaul, the repatriation of Russian prisoners of war after World War II
Keelhaul (band), American band from Ohio
Keel-Haul (G.I. Joe), a character in the fictional G.I. Joe universe
|
```smalltalk
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using StardewValley;
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits the player's current health.</summary>
[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "Loaded using reflection")]
internal class SetHealthCommand : ConsoleCommand
{
/*********
** Public methods
*********/
/// <summary>Construct an instance.</summary>
public SetHealthCommand()
: base("player_sethealth", "Sets the player's health.\n\nUsage: player_sethealth [value]\n- value: an integer amount.") { }
/// <summary>Handle the command.</summary>
/// <param name="monitor">Writes messages to the console and log file.</param>
/// <param name="command">The command name.</param>
/// <param name="args">The command arguments.</param>
public override void Handle(IMonitor monitor, string command, ArgumentParser args)
{
// no-argument mode
if (!args.Any())
{
monitor.Log($"You currently have {Game1.player.health} health. Specify a value to change it.", LogLevel.Info);
return;
}
// handle
string amountStr = args[0];
if (int.TryParse(amountStr, out int amount))
{
Game1.player.health = amount;
monitor.Log($"OK, you now have {Game1.player.health} health.", LogLevel.Info);
}
else
this.LogArgumentNotInt(monitor);
}
}
}
```
|
```smalltalk
using System;
using System.Threading;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Threading;
namespace Volo.Abp.BackgroundJobs.DemoApp.Shared.Jobs
{
public class LongRunningJob : BackgroundJob<LongRunningJobArgs>, ITransientDependency
{
private readonly ICancellationTokenProvider _cancellationTokenProvider;
public LongRunningJob(ICancellationTokenProvider cancellationTokenProvider)
{
_cancellationTokenProvider = cancellationTokenProvider;
}
public override void Execute(LongRunningJobArgs args)
{
lock (Console.Out)
{
var oldColor = Console.ForegroundColor;
try
{
Console.WriteLine($"Long running {args.Value} start: {DateTime.Now}");
for (var i = 1; i <= 10; i++)
{
_cancellationTokenProvider.Token.ThrowIfCancellationRequested();
Thread.Sleep(1000);
Console.WriteLine($"{args.Value} step-{i} done: {DateTime.Now}");
}
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine($"Long running {args.Value} completed: {DateTime.Now}");
}
catch (OperationCanceledException)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine($"Long running {args.Value} cancelled!!!");
}
finally
{
Console.ForegroundColor = oldColor;
}
}
}
}
}
```
|
```objective-c
// AR SDK
//
//
#ifndef __I_AR_SERVICE_H__
#define __I_AR_SERVICE_H__
#include "ArBase.h"
namespace ar {
namespace rtc {
class IRtcEngine;
}
namespace rtm {
class IRtmService;
}
namespace base {
struct ARServiceContext
{
};
class IARService
{
protected:
virtual ~IARService(){}
public:
virtual void release() = 0;
/** Initializes the engine.
@param context RtcEngine context.
@return
- 0: Success.
- < 0: Failure.
*/
virtual int initialize(const ARServiceContext& context) = 0;
/** Retrieves the SDK version number.
* @param build Build number.
* @return The current SDK version in the string format. For example, 2.4.0
*/
virtual const char* getVersion(int* build) = 0;
virtual rtm::IRtmService* createRtmService() = 0;
};
} //namespace base
} // namespace ar
/** Gets the SDK version number.
@param build Build number of the AR SDK.
@return
- 0: Success.
- < 0: Failure.
*/
AR_API const char* AR_CALL getARSdkVersion(int* build);
/**
* Creates the RtcEngine object and returns the pointer.
* @param err Error code
* @return returns Description of the error code
*/
AR_API const char* AR_CALL getARSdkErrorDescription(int err);
/**
* Creates the AR Service object and returns the pointer.
* @return returns Pointer of the AR Service object
*/
AR_API ar::base::IARService* AR_CALL createARService();
AR_API int AR_CALL setARSdkExternalSymbolLoader(void* (*func)(const char* symname));
#endif
```
|
```objective-c
//
// AnimationTimelineElement.h
// macSVG
//
// Created by Douglas Ward on 12/18/11.
//
#import <Foundation/Foundation.h>
#define timelineItemHeight 24
@interface AnimationTimelineElement : NSObject
{
}
@property(strong) NSString * tagName;
@property(strong) NSString * macsvgid;
@property(strong) NSString * elementID;
@property(strong) NSString * parentTagName;
@property(strong) NSString * parentMacsvgid;
@property(strong) NSString * parentID;
@property(strong) NSString * elementDescription;
@property(strong) NSMutableArray * animationTimespanArray;
@property(assign) int repeatCount;
-(void) addTimespanAtBegin:(float)beginSeconds dur:(float)durationSeconds colorIndex:(int)colorIndex
pixelPerSecond:(float)pixelsPerSecond frameRect:(NSRect)frameRect rowIndex:(NSUInteger)rowIndex;
@property (readonly) float earliestBeginSeconds;
@property (readonly) float earliestDurationSeconds;
@end
```
|
```c++
/*******************************************************************************
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*******************************************************************************/
#ifndef GPU_INTEL_JIT_PASS_ALLOC_HPP
#define GPU_INTEL_JIT_PASS_ALLOC_HPP
#include "gpu/intel/jit/ir/ir.hpp"
namespace dnnl {
namespace impl {
namespace gpu {
namespace intel {
namespace jit {
// Lifts alloc statements out of loops.
stmt_t lift_alloc(const stmt_t &s, ir_context_t &ir_ctx, bool reuse_headers);
stmt_t optimize_alloc_let(const stmt_t &s, ir_context_t &ir_ctx);
} // namespace jit
} // namespace intel
} // namespace gpu
} // namespace impl
} // namespace dnnl
#endif
```
|
Boników is a village in the administrative district of Gmina Odolanów, within Ostrów Wielkopolski County, Greater Poland Voivodeship, in west-central Poland. It lies approximately south of Odolanów, south of Ostrów Wielkopolski, and south-east of the regional capital Poznań.
References
Villages in Ostrów Wielkopolski County
|
```c
/*your_sha256_hash---------
*
* prepunion.c
* Routines to plan set-operation queries. The filename is a leftover
* from a time when only UNIONs were implemented.
*
* There are two code paths in the planner for set-operation queries.
* If a subquery consists entirely of simple UNION ALL operations, it
* is converted into an "append relation". Otherwise, it is handled
* by the general code in this module (plan_set_operations and its
* subroutines). There is some support code here for the append-relation
* case, but most of the heavy lifting for that is done elsewhere,
* notably in prepjointree.c and allpaths.c.
*
*
*
* IDENTIFICATION
* src/backend/optimizer/prep/prepunion.c
*
*your_sha256_hash---------
*/
#include "postgres.h"
#include "access/htup_details.h"
#include "access/sysattr.h"
#include "catalog/partition.h"
#include "catalog/pg_inherits.h"
#include "catalog/pg_type.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "optimizer/cost.h"
#include "optimizer/pathnode.h"
#include "optimizer/paths.h"
#include "optimizer/planmain.h"
#include "optimizer/planner.h"
#include "optimizer/prep.h"
#include "optimizer/tlist.h"
#include "parser/parse_coerce.h"
#include "parser/parsetree.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/selfuncs.h"
#include "utils/syscache.h"
static RelOptInfo *recurse_set_operations(Node *setOp, PlannerInfo *root,
List *colTypes, List *colCollations,
bool junkOK,
int flag, List *refnames_tlist,
List **pTargetList,
double *pNumGroups);
static RelOptInfo *generate_recursion_path(SetOperationStmt *setOp,
PlannerInfo *root,
List *refnames_tlist,
List **pTargetList);
static RelOptInfo *generate_union_paths(SetOperationStmt *op, PlannerInfo *root,
List *refnames_tlist,
List **pTargetList);
static RelOptInfo *generate_nonunion_paths(SetOperationStmt *op, PlannerInfo *root,
List *refnames_tlist,
List **pTargetList);
static List *plan_union_children(PlannerInfo *root,
SetOperationStmt *top_union,
List *refnames_tlist,
List **tlist_list);
static Path *make_union_unique(SetOperationStmt *op, Path *path, List *tlist,
PlannerInfo *root);
static void postprocess_setop_rel(PlannerInfo *root, RelOptInfo *rel);
static bool choose_hashed_setop(PlannerInfo *root, List *groupClauses,
Path *input_path,
double dNumGroups, double dNumOutputRows,
const char *construct);
static List *generate_setop_tlist(List *colTypes, List *colCollations,
int flag,
Index varno,
bool hack_constants,
List *input_tlist,
List *refnames_tlist);
static List *generate_append_tlist(List *colTypes, List *colCollations,
bool flag,
List *input_tlists,
List *refnames_tlist);
static List *generate_setop_grouplist(SetOperationStmt *op, List *targetlist);
/*
* plan_set_operations
*
* Plans the queries for a tree of set operations (UNION/INTERSECT/EXCEPT)
*
* This routine only deals with the setOperations tree of the given query.
* Any top-level ORDER BY requested in root->parse->sortClause will be handled
* when we return to grouping_planner; likewise for LIMIT.
*
* What we return is an "upperrel" RelOptInfo containing at least one Path
* that implements the set-operation tree. In addition, root->processed_tlist
* receives a targetlist representing the output of the topmost setop node.
*/
RelOptInfo *
plan_set_operations(PlannerInfo *root)
{
Query *parse = root->parse;
SetOperationStmt *topop = castNode(SetOperationStmt, parse->setOperations);
Node *node;
RangeTblEntry *leftmostRTE;
Query *leftmostQuery;
RelOptInfo *setop_rel;
List *top_tlist;
Assert(topop);
/* check for unsupported stuff */
Assert(parse->jointree->fromlist == NIL);
Assert(parse->jointree->quals == NULL);
Assert(parse->groupClause == NIL);
Assert(parse->havingQual == NULL);
Assert(parse->windowClause == NIL);
Assert(parse->distinctClause == NIL);
/*
* In the outer query level, we won't have any true equivalences to deal
* with; but we do want to be able to make pathkeys, which will require
* single-member EquivalenceClasses. Indicate that EC merging is complete
* so that pathkeys.c won't complain.
*/
Assert(root->eq_classes == NIL);
root->ec_merging_done = true;
/*
* We'll need to build RelOptInfos for each of the leaf subqueries, which
* are RTE_SUBQUERY rangetable entries in this Query. Prepare the index
* arrays for those, and for AppendRelInfos in case they're needed.
*/
setup_simple_rel_arrays(root);
/*
* Find the leftmost component Query. We need to use its column names for
* all generated tlists (else SELECT INTO won't work right).
*/
node = topop->larg;
while (node && IsA(node, SetOperationStmt))
node = ((SetOperationStmt *) node)->larg;
Assert(node && IsA(node, RangeTblRef));
leftmostRTE = root->simple_rte_array[((RangeTblRef *) node)->rtindex];
leftmostQuery = leftmostRTE->subquery;
Assert(leftmostQuery != NULL);
/*
* If the topmost node is a recursive union, it needs special processing.
*/
if (root->hasRecursion)
{
setop_rel = generate_recursion_path(topop, root,
leftmostQuery->targetList,
&top_tlist);
}
else
{
/*
* Recurse on setOperations tree to generate paths for set ops. The
* final output paths should have just the column types shown as the
* output from the top-level node, plus possibly resjunk working
* columns (we can rely on upper-level nodes to deal with that).
*/
setop_rel = recurse_set_operations((Node *) topop, root,
topop->colTypes, topop->colCollations,
true, -1,
leftmostQuery->targetList,
&top_tlist,
NULL);
}
/* Must return the built tlist into root->processed_tlist. */
root->processed_tlist = top_tlist;
return setop_rel;
}
/*
* recurse_set_operations
* Recursively handle one step in a tree of set operations
*
* colTypes: OID list of set-op's result column datatypes
* colCollations: OID list of set-op's result column collations
* junkOK: if true, child resjunk columns may be left in the result
* flag: if >= 0, add a resjunk output column indicating value of flag
* refnames_tlist: targetlist to take column names from
*
* Returns a RelOptInfo for the subtree, as well as these output parameters:
* *pTargetList: receives the fully-fledged tlist for the subtree's top plan
* *pNumGroups: if not NULL, we estimate the number of distinct groups
* in the result, and store it there
*
* The pTargetList output parameter is mostly redundant with the pathtarget
* of the returned RelOptInfo, but for the moment we need it because much of
* the logic in this file depends on flag columns being marked resjunk.
* Pending a redesign of how that works, this is the easy way out.
*
* We don't have to care about typmods here: the only allowed difference
* between set-op input and output typmods is input is a specific typmod
* and output is -1, and that does not require a coercion.
*/
static RelOptInfo *
recurse_set_operations(Node *setOp, PlannerInfo *root,
List *colTypes, List *colCollations,
bool junkOK,
int flag, List *refnames_tlist,
List **pTargetList,
double *pNumGroups)
{
RelOptInfo *rel = NULL; /* keep compiler quiet */
/* Guard against stack overflow due to overly complex setop nests */
check_stack_depth();
if (IsA(setOp, RangeTblRef))
{
RangeTblRef *rtr = (RangeTblRef *) setOp;
RangeTblEntry *rte = root->simple_rte_array[rtr->rtindex];
Query *subquery = rte->subquery;
PlannerInfo *subroot;
RelOptInfo *final_rel;
Path *subpath;
Path *path;
List *tlist;
Assert(subquery != NULL);
/* Build a RelOptInfo for this leaf subquery. */
rel = build_simple_rel(root, rtr->rtindex, NULL);
/* plan_params should not be in use in current query level */
Assert(root->plan_params == NIL);
/* Generate a subroot and Paths for the subquery */
subroot = rel->subroot = subquery_planner(root->glob, subquery,
root,
false,
root->tuple_fraction);
/*
* It should not be possible for the primitive query to contain any
* cross-references to other primitive queries in the setop tree.
*/
if (root->plan_params)
elog(ERROR, "unexpected outer reference in set operation subquery");
/* Figure out the appropriate target list for this subquery. */
tlist = generate_setop_tlist(colTypes, colCollations,
flag,
rtr->rtindex,
true,
subroot->processed_tlist,
refnames_tlist);
rel->reltarget = create_pathtarget(root, tlist);
/* Return the fully-fledged tlist to caller, too */
*pTargetList = tlist;
/*
* Mark rel with estimated output rows, width, etc. Note that we have
* to do this before generating outer-query paths, else
* cost_subqueryscan is not happy.
*/
set_subquery_size_estimates(root, rel);
/*
* Since we may want to add a partial path to this relation, we must
* set its consider_parallel flag correctly.
*/
final_rel = fetch_upper_rel(subroot, UPPERREL_FINAL, NULL);
rel->consider_parallel = final_rel->consider_parallel;
/*
* For the moment, we consider only a single Path for the subquery.
* This should change soon (make it look more like
* set_subquery_pathlist).
*/
subpath = get_cheapest_fractional_path(final_rel,
root->tuple_fraction);
/*
* Stick a SubqueryScanPath atop that.
*
* We don't bother to determine the subquery's output ordering since
* it won't be reflected in the set-op result anyhow; so just label
* the SubqueryScanPath with nil pathkeys. (XXX that should change
* soon too, likely.)
*/
path = (Path *) create_subqueryscan_path(root, rel, subpath,
NIL, NULL);
add_path(rel, path);
/*
* If we have a partial path for the child relation, we can use that
* to build a partial path for this relation. But there's no point in
* considering any path but the cheapest.
*/
if (rel->consider_parallel && bms_is_empty(rel->lateral_relids) &&
final_rel->partial_pathlist != NIL)
{
Path *partial_subpath;
Path *partial_path;
partial_subpath = linitial(final_rel->partial_pathlist);
partial_path = (Path *)
create_subqueryscan_path(root, rel, partial_subpath,
NIL, NULL);
add_partial_path(rel, partial_path);
}
/*
* Estimate number of groups if caller wants it. If the subquery used
* grouping or aggregation, its output is probably mostly unique
* anyway; otherwise do statistical estimation.
*
* XXX you don't really want to know about this: we do the estimation
* using the subquery's original targetlist expressions, not the
* subroot->processed_tlist which might seem more appropriate. The
* reason is that if the subquery is itself a setop, it may return a
* processed_tlist containing "varno 0" Vars generated by
* generate_append_tlist, and those would confuse estimate_num_groups
* mightily. We ought to get rid of the "varno 0" hack, but that
* requires a redesign of the parsetree representation of setops, so
* that there can be an RTE corresponding to each setop's output.
*/
if (pNumGroups)
{
if (subquery->groupClause || subquery->groupingSets ||
subquery->distinctClause ||
subroot->hasHavingQual || subquery->hasAggs)
*pNumGroups = subpath->rows;
else
*pNumGroups = estimate_num_groups(subroot,
get_tlist_exprs(subquery->targetList, false),
subpath->rows,
NULL,
NULL);
}
}
else if (IsA(setOp, SetOperationStmt))
{
SetOperationStmt *op = (SetOperationStmt *) setOp;
/* UNIONs are much different from INTERSECT/EXCEPT */
if (op->op == SETOP_UNION)
rel = generate_union_paths(op, root,
refnames_tlist,
pTargetList);
else
rel = generate_nonunion_paths(op, root,
refnames_tlist,
pTargetList);
if (pNumGroups)
*pNumGroups = rel->rows;
/*
* If necessary, add a Result node to project the caller-requested
* output columns.
*
* XXX you don't really want to know about this: setrefs.c will apply
* fix_upper_expr() to the Result node's tlist. This would fail if the
* Vars generated by generate_setop_tlist() were not exactly equal()
* to the corresponding tlist entries of the subplan. However, since
* the subplan was generated by generate_union_paths() or
* generate_nonunion_paths(), and hence its tlist was generated by
* generate_append_tlist(), this will work. We just tell
* generate_setop_tlist() to use varno 0.
*/
if (flag >= 0 ||
!tlist_same_datatypes(*pTargetList, colTypes, junkOK) ||
!tlist_same_collations(*pTargetList, colCollations, junkOK))
{
PathTarget *target;
ListCell *lc;
*pTargetList = generate_setop_tlist(colTypes, colCollations,
flag,
0,
false,
*pTargetList,
refnames_tlist);
target = create_pathtarget(root, *pTargetList);
/* Apply projection to each path */
foreach(lc, rel->pathlist)
{
Path *subpath = (Path *) lfirst(lc);
Path *path;
Assert(subpath->param_info == NULL);
path = apply_projection_to_path(root, subpath->parent,
subpath, target);
/* If we had to add a Result, path is different from subpath */
if (path != subpath)
lfirst(lc) = path;
}
/* Apply projection to each partial path */
foreach(lc, rel->partial_pathlist)
{
Path *subpath = (Path *) lfirst(lc);
Path *path;
Assert(subpath->param_info == NULL);
/* avoid apply_projection_to_path, in case of multiple refs */
path = (Path *) create_projection_path(root, subpath->parent,
subpath, target);
lfirst(lc) = path;
}
}
}
else
{
elog(ERROR, "unrecognized node type: %d",
(int) nodeTag(setOp));
*pTargetList = NIL;
}
postprocess_setop_rel(root, rel);
return rel;
}
/*
* Generate paths for a recursive UNION node
*/
static RelOptInfo *
generate_recursion_path(SetOperationStmt *setOp, PlannerInfo *root,
List *refnames_tlist,
List **pTargetList)
{
RelOptInfo *result_rel;
Path *path;
RelOptInfo *lrel,
*rrel;
Path *lpath;
Path *rpath;
List *lpath_tlist;
List *rpath_tlist;
List *tlist;
List *groupList;
double dNumGroups;
/* Parser should have rejected other cases */
if (setOp->op != SETOP_UNION)
elog(ERROR, "only UNION queries can be recursive");
/* Worktable ID should be assigned */
Assert(root->wt_param_id >= 0);
/*
* Unlike a regular UNION node, process the left and right inputs
* separately without any intention of combining them into one Append.
*/
lrel = recurse_set_operations(setOp->larg, root,
setOp->colTypes, setOp->colCollations,
false, -1,
refnames_tlist,
&lpath_tlist,
NULL);
lpath = lrel->cheapest_total_path;
/* The right path will want to look at the left one ... */
root->non_recursive_path = lpath;
rrel = recurse_set_operations(setOp->rarg, root,
setOp->colTypes, setOp->colCollations,
false, -1,
refnames_tlist,
&rpath_tlist,
NULL);
rpath = rrel->cheapest_total_path;
root->non_recursive_path = NULL;
/*
* Generate tlist for RecursiveUnion path node --- same as in Append cases
*/
tlist = generate_append_tlist(setOp->colTypes, setOp->colCollations, false,
list_make2(lpath_tlist, rpath_tlist),
refnames_tlist);
*pTargetList = tlist;
/* Build result relation. */
result_rel = fetch_upper_rel(root, UPPERREL_SETOP,
bms_union(lrel->relids, rrel->relids));
result_rel->reltarget = create_pathtarget(root, tlist);
/*
* If UNION, identify the grouping operators
*/
if (setOp->all)
{
groupList = NIL;
dNumGroups = 0;
}
else
{
/* Identify the grouping semantics */
groupList = generate_setop_grouplist(setOp, tlist);
/* We only support hashing here */
if (!grouping_is_hashable(groupList))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("could not implement recursive UNION"),
errdetail("All column datatypes must be hashable.")));
/*
* For the moment, take the number of distinct groups as equal to the
* total input size, ie, the worst case.
*/
dNumGroups = lpath->rows + rpath->rows * 10;
}
/*
* And make the path node.
*/
path = (Path *) create_recursiveunion_path(root,
result_rel,
lpath,
rpath,
result_rel->reltarget,
groupList,
root->wt_param_id,
dNumGroups);
add_path(result_rel, path);
postprocess_setop_rel(root, result_rel);
return result_rel;
}
/*
* Generate paths for a UNION or UNION ALL node
*/
static RelOptInfo *
generate_union_paths(SetOperationStmt *op, PlannerInfo *root,
List *refnames_tlist,
List **pTargetList)
{
Relids relids = NULL;
RelOptInfo *result_rel;
double save_fraction = root->tuple_fraction;
ListCell *lc;
List *pathlist = NIL;
List *partial_pathlist = NIL;
bool partial_paths_valid = true;
bool consider_parallel = true;
List *rellist;
List *tlist_list;
List *tlist;
Path *path;
/*
* If plain UNION, tell children to fetch all tuples.
*
* Note: in UNION ALL, we pass the top-level tuple_fraction unmodified to
* each arm of the UNION ALL. One could make a case for reducing the
* tuple fraction for later arms (discounting by the expected size of the
* earlier arms' results) but it seems not worth the trouble. The normal
* case where tuple_fraction isn't already zero is a LIMIT at top level,
* and passing it down as-is is usually enough to get the desired result
* of preferring fast-start plans.
*/
if (!op->all)
root->tuple_fraction = 0.0;
/*
* If any of my children are identical UNION nodes (same op, all-flag, and
* colTypes) then they can be merged into this node so that we generate
* only one Append and unique-ification for the lot. Recurse to find such
* nodes and compute their children's paths.
*/
rellist = plan_union_children(root, op, refnames_tlist, &tlist_list);
/*
* Generate tlist for Append plan node.
*
* The tlist for an Append plan isn't important as far as the Append is
* concerned, but we must make it look real anyway for the benefit of the
* next plan level up.
*/
tlist = generate_append_tlist(op->colTypes, op->colCollations, false,
tlist_list, refnames_tlist);
*pTargetList = tlist;
/* Build path lists and relid set. */
foreach(lc, rellist)
{
RelOptInfo *rel = lfirst(lc);
pathlist = lappend(pathlist, rel->cheapest_total_path);
if (consider_parallel)
{
if (!rel->consider_parallel)
{
consider_parallel = false;
partial_paths_valid = false;
}
else if (rel->partial_pathlist == NIL)
partial_paths_valid = false;
else
partial_pathlist = lappend(partial_pathlist,
linitial(rel->partial_pathlist));
}
relids = bms_union(relids, rel->relids);
}
/* Build result relation. */
result_rel = fetch_upper_rel(root, UPPERREL_SETOP, relids);
result_rel->reltarget = create_pathtarget(root, tlist);
result_rel->consider_parallel = consider_parallel;
/*
* Append the child results together.
*/
path = (Path *) create_append_path(root, result_rel, pathlist, NIL,
NIL, NULL, 0, false, -1);
/*
* For UNION ALL, we just need the Append path. For UNION, need to add
* node(s) to remove duplicates.
*/
if (!op->all)
path = make_union_unique(op, path, tlist, root);
add_path(result_rel, path);
/*
* Estimate number of groups. For now we just assume the output is unique
* --- this is certainly true for the UNION case, and we want worst-case
* estimates anyway.
*/
result_rel->rows = path->rows;
/*
* Now consider doing the same thing using the partial paths plus Append
* plus Gather.
*/
if (partial_paths_valid)
{
Path *ppath;
ListCell *lc;
int parallel_workers = 0;
/* Find the highest number of workers requested for any subpath. */
foreach(lc, partial_pathlist)
{
Path *path = lfirst(lc);
parallel_workers = Max(parallel_workers, path->parallel_workers);
}
Assert(parallel_workers > 0);
/*
* If the use of parallel append is permitted, always request at least
* log2(# of children) paths. We assume it can be useful to have
* extra workers in this case because they will be spread out across
* the children. The precise formula is just a guess; see
* add_paths_to_append_rel.
*/
if (enable_parallel_append)
{
parallel_workers = Max(parallel_workers,
fls(list_length(partial_pathlist)));
parallel_workers = Min(parallel_workers,
max_parallel_workers_per_gather);
}
Assert(parallel_workers > 0);
ppath = (Path *)
create_append_path(root, result_rel, NIL, partial_pathlist,
NIL, NULL,
parallel_workers, enable_parallel_append,
-1);
ppath = (Path *)
create_gather_path(root, result_rel, ppath,
result_rel->reltarget, NULL, NULL);
if (!op->all)
ppath = make_union_unique(op, ppath, tlist, root);
add_path(result_rel, ppath);
}
/* Undo effects of possibly forcing tuple_fraction to 0 */
root->tuple_fraction = save_fraction;
return result_rel;
}
/*
* Generate paths for an INTERSECT, INTERSECT ALL, EXCEPT, or EXCEPT ALL node
*/
static RelOptInfo *
generate_nonunion_paths(SetOperationStmt *op, PlannerInfo *root,
List *refnames_tlist,
List **pTargetList)
{
RelOptInfo *result_rel;
RelOptInfo *lrel,
*rrel;
double save_fraction = root->tuple_fraction;
Path *lpath,
*rpath,
*path;
List *lpath_tlist,
*rpath_tlist,
*tlist_list,
*tlist,
*groupList,
*pathlist;
double dLeftGroups,
dRightGroups,
dNumGroups,
dNumOutputRows;
bool use_hash;
SetOpCmd cmd;
int firstFlag;
/*
* Tell children to fetch all tuples.
*/
root->tuple_fraction = 0.0;
/* Recurse on children, ensuring their outputs are marked */
lrel = recurse_set_operations(op->larg, root,
op->colTypes, op->colCollations,
false, 0,
refnames_tlist,
&lpath_tlist,
&dLeftGroups);
lpath = lrel->cheapest_total_path;
rrel = recurse_set_operations(op->rarg, root,
op->colTypes, op->colCollations,
false, 1,
refnames_tlist,
&rpath_tlist,
&dRightGroups);
rpath = rrel->cheapest_total_path;
/* Undo effects of forcing tuple_fraction to 0 */
root->tuple_fraction = save_fraction;
/*
* For EXCEPT, we must put the left input first. For INTERSECT, either
* order should give the same results, and we prefer to put the smaller
* input first in order to minimize the size of the hash table in the
* hashing case. "Smaller" means the one with the fewer groups.
*/
if (op->op == SETOP_EXCEPT || dLeftGroups <= dRightGroups)
{
pathlist = list_make2(lpath, rpath);
tlist_list = list_make2(lpath_tlist, rpath_tlist);
firstFlag = 0;
}
else
{
pathlist = list_make2(rpath, lpath);
tlist_list = list_make2(rpath_tlist, lpath_tlist);
firstFlag = 1;
}
/*
* Generate tlist for Append plan node.
*
* The tlist for an Append plan isn't important as far as the Append is
* concerned, but we must make it look real anyway for the benefit of the
* next plan level up. In fact, it has to be real enough that the flag
* column is shown as a variable not a constant, else setrefs.c will get
* confused.
*/
tlist = generate_append_tlist(op->colTypes, op->colCollations, true,
tlist_list, refnames_tlist);
*pTargetList = tlist;
/* Build result relation. */
result_rel = fetch_upper_rel(root, UPPERREL_SETOP,
bms_union(lrel->relids, rrel->relids));
result_rel->reltarget = create_pathtarget(root, tlist);
/*
* Append the child results together.
*/
path = (Path *) create_append_path(root, result_rel, pathlist, NIL,
NIL, NULL, 0, false, -1);
/* Identify the grouping semantics */
groupList = generate_setop_grouplist(op, tlist);
/*
* Estimate number of distinct groups that we'll need hashtable entries
* for; this is the size of the left-hand input for EXCEPT, or the smaller
* input for INTERSECT. Also estimate the number of eventual output rows.
* In non-ALL cases, we estimate each group produces one output row; in
* ALL cases use the relevant relation size. These are worst-case
* estimates, of course, but we need to be conservative.
*/
if (op->op == SETOP_EXCEPT)
{
dNumGroups = dLeftGroups;
dNumOutputRows = op->all ? lpath->rows : dNumGroups;
}
else
{
dNumGroups = Min(dLeftGroups, dRightGroups);
dNumOutputRows = op->all ? Min(lpath->rows, rpath->rows) : dNumGroups;
}
/*
* Decide whether to hash or sort, and add a sort node if needed.
*/
use_hash = choose_hashed_setop(root, groupList, path,
dNumGroups, dNumOutputRows,
(op->op == SETOP_INTERSECT) ? "INTERSECT" : "EXCEPT");
if (groupList && !use_hash)
path = (Path *) create_sort_path(root,
result_rel,
path,
make_pathkeys_for_sortclauses(root,
groupList,
tlist),
-1.0);
/*
* Finally, add a SetOp path node to generate the correct output.
*/
switch (op->op)
{
case SETOP_INTERSECT:
cmd = op->all ? SETOPCMD_INTERSECT_ALL : SETOPCMD_INTERSECT;
break;
case SETOP_EXCEPT:
cmd = op->all ? SETOPCMD_EXCEPT_ALL : SETOPCMD_EXCEPT;
break;
default:
elog(ERROR, "unrecognized set op: %d", (int) op->op);
cmd = SETOPCMD_INTERSECT; /* keep compiler quiet */
break;
}
path = (Path *) create_setop_path(root,
result_rel,
path,
cmd,
use_hash ? SETOP_HASHED : SETOP_SORTED,
groupList,
list_length(op->colTypes) + 1,
use_hash ? firstFlag : -1,
dNumGroups,
dNumOutputRows);
result_rel->rows = path->rows;
add_path(result_rel, path);
return result_rel;
}
/*
* Pull up children of a UNION node that are identically-propertied UNIONs.
*
* NOTE: we can also pull a UNION ALL up into a UNION, since the distinct
* output rows will be lost anyway.
*
* NOTE: currently, we ignore collations while determining if a child has
* the same properties. This is semantically sound only so long as all
* collations have the same notion of equality. It is valid from an
* implementation standpoint because we don't care about the ordering of
* a UNION child's result: UNION ALL results are always unordered, and
* generate_union_paths will force a fresh sort if the top level is a UNION.
*/
static List *
plan_union_children(PlannerInfo *root,
SetOperationStmt *top_union,
List *refnames_tlist,
List **tlist_list)
{
List *pending_rels = list_make1(top_union);
List *result = NIL;
List *child_tlist;
*tlist_list = NIL;
while (pending_rels != NIL)
{
Node *setOp = linitial(pending_rels);
pending_rels = list_delete_first(pending_rels);
if (IsA(setOp, SetOperationStmt))
{
SetOperationStmt *op = (SetOperationStmt *) setOp;
if (op->op == top_union->op &&
(op->all == top_union->all || op->all) &&
equal(op->colTypes, top_union->colTypes))
{
/* Same UNION, so fold children into parent */
pending_rels = lcons(op->rarg, pending_rels);
pending_rels = lcons(op->larg, pending_rels);
continue;
}
}
/*
* Not same, so plan this child separately.
*
* Note we disallow any resjunk columns in child results. This is
* necessary since the Append node that implements the union won't do
* any projection, and upper levels will get confused if some of our
* output tuples have junk and some don't. This case only arises when
* we have an EXCEPT or INTERSECT as child, else there won't be
* resjunk anyway.
*/
result = lappend(result, recurse_set_operations(setOp, root,
top_union->colTypes,
top_union->colCollations,
false, -1,
refnames_tlist,
&child_tlist,
NULL));
*tlist_list = lappend(*tlist_list, child_tlist);
}
return result;
}
/*
* Add nodes to the given path tree to unique-ify the result of a UNION.
*/
static Path *
make_union_unique(SetOperationStmt *op, Path *path, List *tlist,
PlannerInfo *root)
{
RelOptInfo *result_rel = fetch_upper_rel(root, UPPERREL_SETOP, NULL);
List *groupList;
double dNumGroups;
/* Identify the grouping semantics */
groupList = generate_setop_grouplist(op, tlist);
/*
* XXX for the moment, take the number of distinct groups as equal to the
* total input size, ie, the worst case. This is too conservative, but
* it's not clear how to get a decent estimate of the true size. One
* should note as well the propensity of novices to write UNION rather
* than UNION ALL even when they don't expect any duplicates...
*/
dNumGroups = path->rows;
/* Decide whether to hash or sort */
if (choose_hashed_setop(root, groupList, path,
dNumGroups, dNumGroups,
"UNION"))
{
/* Hashed aggregate plan --- no sort needed */
path = (Path *) create_agg_path(root,
result_rel,
path,
create_pathtarget(root, tlist),
AGG_HASHED,
AGGSPLIT_SIMPLE,
groupList,
NIL,
NULL,
dNumGroups);
}
else
{
/* Sort and Unique */
if (groupList)
path = (Path *)
create_sort_path(root,
result_rel,
path,
make_pathkeys_for_sortclauses(root,
groupList,
tlist),
-1.0);
path = (Path *) create_upper_unique_path(root,
result_rel,
path,
list_length(path->pathkeys),
dNumGroups);
}
return path;
}
/*
* postprocess_setop_rel - perform steps required after adding paths
*/
static void
postprocess_setop_rel(PlannerInfo *root, RelOptInfo *rel)
{
/*
* We don't currently worry about allowing FDWs to contribute paths to
* this relation, but give extensions a chance.
*/
if (create_upper_paths_hook)
(*create_upper_paths_hook) (root, UPPERREL_SETOP,
NULL, rel, NULL);
/* Select cheapest path */
set_cheapest(rel);
}
/*
* choose_hashed_setop - should we use hashing for a set operation?
*/
static bool
choose_hashed_setop(PlannerInfo *root, List *groupClauses,
Path *input_path,
double dNumGroups, double dNumOutputRows,
const char *construct)
{
int numGroupCols = list_length(groupClauses);
Size hash_mem_limit = get_hash_memory_limit();
bool can_sort;
bool can_hash;
Size hashentrysize;
Path hashed_p;
Path sorted_p;
double tuple_fraction;
/* Check whether the operators support sorting or hashing */
can_sort = grouping_is_sortable(groupClauses);
can_hash = grouping_is_hashable(groupClauses);
if (can_hash && can_sort)
{
/* we have a meaningful choice to make, continue ... */
}
else if (can_hash)
return true;
else if (can_sort)
return false;
else
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
/* translator: %s is UNION, INTERSECT, or EXCEPT */
errmsg("could not implement %s", construct),
errdetail("Some of the datatypes only support hashing, while others only support sorting.")));
/* Prefer sorting when enable_hashagg is off */
if (!enable_hashagg)
return false;
/*
* Don't do it if it doesn't look like the hashtable will fit into
* hash_mem.
*/
hashentrysize = MAXALIGN(input_path->pathtarget->width) + MAXALIGN(SizeofMinimalTupleHeader);
if (hashentrysize * dNumGroups > hash_mem_limit)
return false;
/*
* See if the estimated cost is no more than doing it the other way.
*
* We need to consider input_plan + hashagg versus input_plan + sort +
* group. Note that the actual result plan might involve a SetOp or
* Unique node, not Agg or Group, but the cost estimates for Agg and Group
* should be close enough for our purposes here.
*
* These path variables are dummies that just hold cost fields; we don't
* make actual Paths for these steps.
*/
cost_agg(&hashed_p, root, AGG_HASHED, NULL,
numGroupCols, dNumGroups,
NIL,
input_path->startup_cost, input_path->total_cost,
input_path->rows, input_path->pathtarget->width);
/*
* Now for the sorted case. Note that the input is *always* unsorted,
* since it was made by appending unrelated sub-relations together.
*/
sorted_p.startup_cost = input_path->startup_cost;
sorted_p.total_cost = input_path->total_cost;
/* XXX cost_sort doesn't actually look at pathkeys, so just pass NIL */
cost_sort(&sorted_p, root, NIL, sorted_p.total_cost,
input_path->rows, input_path->pathtarget->width,
0.0, work_mem, -1.0);
cost_group(&sorted_p, root, numGroupCols, dNumGroups,
NIL,
sorted_p.startup_cost, sorted_p.total_cost,
input_path->rows);
/*
* Now make the decision using the top-level tuple fraction. First we
* have to convert an absolute count (LIMIT) into fractional form.
*/
tuple_fraction = root->tuple_fraction;
if (tuple_fraction >= 1.0)
tuple_fraction /= dNumOutputRows;
if (compare_fractional_path_costs(&hashed_p, &sorted_p,
tuple_fraction) < 0)
{
/* Hashed is cheaper, so use it */
return true;
}
return false;
}
/*
* Generate targetlist for a set-operation plan node
*
* colTypes: OID list of set-op's result column datatypes
* colCollations: OID list of set-op's result column collations
* flag: -1 if no flag column needed, 0 or 1 to create a const flag column
* varno: varno to use in generated Vars
* hack_constants: true to copy up constants (see comments in code)
* input_tlist: targetlist of this node's input node
* refnames_tlist: targetlist to take column names from
*/
static List *
generate_setop_tlist(List *colTypes, List *colCollations,
int flag,
Index varno,
bool hack_constants,
List *input_tlist,
List *refnames_tlist)
{
List *tlist = NIL;
int resno = 1;
ListCell *ctlc,
*cclc,
*itlc,
*rtlc;
TargetEntry *tle;
Node *expr;
forfour(ctlc, colTypes, cclc, colCollations,
itlc, input_tlist, rtlc, refnames_tlist)
{
Oid colType = lfirst_oid(ctlc);
Oid colColl = lfirst_oid(cclc);
TargetEntry *inputtle = (TargetEntry *) lfirst(itlc);
TargetEntry *reftle = (TargetEntry *) lfirst(rtlc);
Assert(inputtle->resno == resno);
Assert(reftle->resno == resno);
Assert(!inputtle->resjunk);
Assert(!reftle->resjunk);
/*
* Generate columns referencing input columns and having appropriate
* data types and column names. Insert datatype coercions where
* necessary.
*
* HACK: constants in the input's targetlist are copied up as-is
* rather than being referenced as subquery outputs. This is mainly
* to ensure that when we try to coerce them to the output column's
* datatype, the right things happen for UNKNOWN constants. But do
* this only at the first level of subquery-scan plans; we don't want
* phony constants appearing in the output tlists of upper-level
* nodes!
*/
if (hack_constants && inputtle->expr && IsA(inputtle->expr, Const))
expr = (Node *) inputtle->expr;
else
expr = (Node *) makeVar(varno,
inputtle->resno,
exprType((Node *) inputtle->expr),
exprTypmod((Node *) inputtle->expr),
exprCollation((Node *) inputtle->expr),
0);
if (exprType(expr) != colType)
{
/*
* Note: it's not really cool to be applying coerce_to_common_type
* here; one notable point is that assign_expr_collations never
* gets run on any generated nodes. For the moment that's not a
* problem because we force the correct exposed collation below.
* It would likely be best to make the parser generate the correct
* output tlist for every set-op to begin with, though.
*/
expr = coerce_to_common_type(NULL, /* no UNKNOWNs here */
expr,
colType,
"UNION/INTERSECT/EXCEPT");
}
/*
* Ensure the tlist entry's exposed collation matches the set-op. This
* is necessary because plan_set_operations() reports the result
* ordering as a list of SortGroupClauses, which don't carry collation
* themselves but just refer to tlist entries. If we don't show the
* right collation then planner.c might do the wrong thing in
* higher-level queries.
*
* Note we use RelabelType, not CollateExpr, since this expression
* will reach the executor without any further processing.
*/
if (exprCollation(expr) != colColl)
expr = applyRelabelType(expr,
exprType(expr), exprTypmod(expr), colColl,
COERCE_IMPLICIT_CAST, -1, false);
tle = makeTargetEntry((Expr *) expr,
(AttrNumber) resno++,
pstrdup(reftle->resname),
false);
/*
* By convention, all non-resjunk columns in a setop tree have
* ressortgroupref equal to their resno. In some cases the ref isn't
* needed, but this is a cleaner way than modifying the tlist later.
*/
tle->ressortgroupref = tle->resno;
tlist = lappend(tlist, tle);
}
if (flag >= 0)
{
/* Add a resjunk flag column */
/* flag value is the given constant */
expr = (Node *) makeConst(INT4OID,
-1,
InvalidOid,
sizeof(int32),
Int32GetDatum(flag),
false,
true);
tle = makeTargetEntry((Expr *) expr,
(AttrNumber) resno++,
pstrdup("flag"),
true);
tlist = lappend(tlist, tle);
}
return tlist;
}
/*
* Generate targetlist for a set-operation Append node
*
* colTypes: OID list of set-op's result column datatypes
* colCollations: OID list of set-op's result column collations
* flag: true to create a flag column copied up from subplans
* input_tlists: list of tlists for sub-plans of the Append
* refnames_tlist: targetlist to take column names from
*
* The entries in the Append's targetlist should always be simple Vars;
* we just have to make sure they have the right datatypes/typmods/collations.
* The Vars are always generated with varno 0.
*
* XXX a problem with the varno-zero approach is that set_pathtarget_cost_width
* cannot figure out a realistic width for the tlist we make here. But we
* ought to refactor this code to produce a PathTarget directly, anyway.
*/
static List *
generate_append_tlist(List *colTypes, List *colCollations,
bool flag,
List *input_tlists,
List *refnames_tlist)
{
List *tlist = NIL;
int resno = 1;
ListCell *curColType;
ListCell *curColCollation;
ListCell *ref_tl_item;
int colindex;
TargetEntry *tle;
Node *expr;
ListCell *tlistl;
int32 *colTypmods;
/*
* First extract typmods to use.
*
* If the inputs all agree on type and typmod of a particular column, use
* that typmod; else use -1.
*/
colTypmods = (int32 *) palloc(list_length(colTypes) * sizeof(int32));
foreach(tlistl, input_tlists)
{
List *subtlist = (List *) lfirst(tlistl);
ListCell *subtlistl;
curColType = list_head(colTypes);
colindex = 0;
foreach(subtlistl, subtlist)
{
TargetEntry *subtle = (TargetEntry *) lfirst(subtlistl);
if (subtle->resjunk)
continue;
Assert(curColType != NULL);
if (exprType((Node *) subtle->expr) == lfirst_oid(curColType))
{
/* If first subplan, copy the typmod; else compare */
int32 subtypmod = exprTypmod((Node *) subtle->expr);
if (tlistl == list_head(input_tlists))
colTypmods[colindex] = subtypmod;
else if (subtypmod != colTypmods[colindex])
colTypmods[colindex] = -1;
}
else
{
/* types disagree, so force typmod to -1 */
colTypmods[colindex] = -1;
}
curColType = lnext(colTypes, curColType);
colindex++;
}
Assert(curColType == NULL);
}
/*
* Now we can build the tlist for the Append.
*/
colindex = 0;
forthree(curColType, colTypes, curColCollation, colCollations,
ref_tl_item, refnames_tlist)
{
Oid colType = lfirst_oid(curColType);
int32 colTypmod = colTypmods[colindex++];
Oid colColl = lfirst_oid(curColCollation);
TargetEntry *reftle = (TargetEntry *) lfirst(ref_tl_item);
Assert(reftle->resno == resno);
Assert(!reftle->resjunk);
expr = (Node *) makeVar(0,
resno,
colType,
colTypmod,
colColl,
0);
tle = makeTargetEntry((Expr *) expr,
(AttrNumber) resno++,
pstrdup(reftle->resname),
false);
/*
* By convention, all non-resjunk columns in a setop tree have
* ressortgroupref equal to their resno. In some cases the ref isn't
* needed, but this is a cleaner way than modifying the tlist later.
*/
tle->ressortgroupref = tle->resno;
tlist = lappend(tlist, tle);
}
if (flag)
{
/* Add a resjunk flag column */
/* flag value is shown as copied up from subplan */
expr = (Node *) makeVar(0,
resno,
INT4OID,
-1,
InvalidOid,
0);
tle = makeTargetEntry((Expr *) expr,
(AttrNumber) resno++,
pstrdup("flag"),
true);
tlist = lappend(tlist, tle);
}
pfree(colTypmods);
return tlist;
}
/*
* generate_setop_grouplist
* Build a SortGroupClause list defining the sort/grouping properties
* of the setop's output columns.
*
* Parse analysis already determined the properties and built a suitable
* list, except that the entries do not have sortgrouprefs set because
* the parser output representation doesn't include a tlist for each
* setop. So what we need to do here is copy that list and install
* proper sortgrouprefs into it (copying those from the targetlist).
*/
static List *
generate_setop_grouplist(SetOperationStmt *op, List *targetlist)
{
List *grouplist = copyObject(op->groupClauses);
ListCell *lg;
ListCell *lt;
lg = list_head(grouplist);
foreach(lt, targetlist)
{
TargetEntry *tle = (TargetEntry *) lfirst(lt);
SortGroupClause *sgc;
if (tle->resjunk)
{
/* resjunk columns should not have sortgrouprefs */
Assert(tle->ressortgroupref == 0);
continue; /* ignore resjunk columns */
}
/* non-resjunk columns should have sortgroupref = resno */
Assert(tle->ressortgroupref == tle->resno);
/* non-resjunk columns should have grouping clauses */
Assert(lg != NULL);
sgc = (SortGroupClause *) lfirst(lg);
lg = lnext(grouplist, lg);
Assert(sgc->tleSortGroupRef == 0);
sgc->tleSortGroupRef = tle->ressortgroupref;
}
Assert(lg == NULL);
return grouplist;
}
```
|
```objective-c
/*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
*/
#ifndef CheckedArithmetic_h
#define CheckedArithmetic_h
#include "wtf/Assertions.h"
#include "wtf/TypeTraits.h"
#include <limits>
#include <stdint.h>
/* Checked<T>
*
* This class provides a mechanism to perform overflow-safe integer arithmetic
* without having to manually ensure that you have all the required bounds checks
* directly in your code.
*
* There are two modes of operation:
* - The default is Checked<T, CrashOnOverflow>, and crashes at the point
* and overflow has occurred.
* - The alternative is Checked<T, RecordOverflow>, which uses an additional
* byte of storage to track whether an overflow has occurred, subsequent
* unchecked operations will crash if an overflow has occured
*
* It is possible to provide a custom overflow handler, in which case you need
* to support these functions:
* - void overflowed();
* This function is called when an operation has produced an overflow.
* - bool hasOverflowed();
* This function must return true if overflowed() has been called on an
* instance and false if it has not.
* - void clearOverflow();
* Used to reset overflow tracking when a value is being overwritten with
* a new value.
*
* Checked<T> works for all integer types, with the following caveats:
* - Mixing signedness of operands is only supported for types narrower than
* 64bits.
* - It does have a performance impact, so tight loops may want to be careful
* when using it.
*
*/
namespace WTF {
enum class CheckedState
{
DidOverflow,
DidNotOverflow
};
class CrashOnOverflow {
protected:
NO_RETURN_DUE_TO_CRASH void overflowed()
{
CRASH();
}
void clearOverflow() { }
public:
bool hasOverflowed() const { return false; }
};
class RecordOverflow {
protected:
RecordOverflow()
: m_overflowed(false)
{
}
void overflowed()
{
m_overflowed = true;
}
void clearOverflow()
{
m_overflowed = false;
}
public:
bool hasOverflowed() const { return m_overflowed; }
private:
unsigned char m_overflowed;
};
template <typename T, class OverflowHandler = CrashOnOverflow> class Checked;
template <typename T> struct RemoveChecked;
template <typename T> struct RemoveChecked<Checked<T>>;
template <typename Target, typename Source, bool targetSigned = std::numeric_limits<Target>::is_signed, bool sourceSigned = std::numeric_limits<Source>::is_signed> struct BoundsChecker;
template <typename Target, typename Source> struct BoundsChecker<Target, Source, false, false> {
static bool inBounds(Source value)
{
// Same signedness so implicit type conversion will always increase precision
// to widest type
return value <= std::numeric_limits<Target>::max();
}
};
template <typename Target, typename Source> struct BoundsChecker<Target, Source, true, true> {
static bool inBounds(Source value)
{
// Same signedness so implicit type conversion will always increase precision
// to widest type
return std::numeric_limits<Target>::min() <= value && value <= std::numeric_limits<Target>::max();
}
};
template <typename Target, typename Source> struct BoundsChecker<Target, Source, false, true> {
static bool inBounds(Source value)
{
// Target is unsigned so any value less than zero is clearly unsafe
if (value < 0)
return false;
// If our (unsigned) Target is the same or greater width we can
// convert value to type Target without losing precision
if (sizeof(Target) >= sizeof(Source))
return static_cast<Target>(value) <= std::numeric_limits<Target>::max();
// The signed Source type has greater precision than the target so
// max(Target) -> Source will widen.
return value <= static_cast<Source>(std::numeric_limits<Target>::max());
}
};
template <typename Target, typename Source> struct BoundsChecker<Target, Source, true, false> {
static bool inBounds(Source value)
{
// Signed target with an unsigned source
if (sizeof(Target) <= sizeof(Source))
return value <= static_cast<Source>(std::numeric_limits<Target>::max());
// Target is Wider than Source so we're guaranteed to fit any value in
// unsigned Source
return true;
}
};
template <typename Target, typename Source, bool CanElide = IsSameType<Target, Source>::value || (sizeof(Target) > sizeof(Source)) > struct BoundsCheckElider;
template <typename Target, typename Source> struct BoundsCheckElider<Target, Source, true> {
static bool inBounds(Source) { return true; }
};
template <typename Target, typename Source> struct BoundsCheckElider<Target, Source, false> : public BoundsChecker<Target, Source> {
};
template <typename Target, typename Source> static inline bool isInBounds(Source value)
{
return BoundsCheckElider<Target, Source>::inBounds(value);
}
template <typename T> struct RemoveChecked {
typedef T CleanType;
static const CleanType DefaultValue = 0;
};
template <typename T> struct RemoveChecked<Checked<T, CrashOnOverflow>> {
typedef typename RemoveChecked<T>::CleanType CleanType;
static const CleanType DefaultValue = 0;
};
template <typename T> struct RemoveChecked<Checked<T, RecordOverflow>> {
typedef typename RemoveChecked<T>::CleanType CleanType;
static const CleanType DefaultValue = 0;
};
// The ResultBase and SignednessSelector are used to workaround typeof not being
// available in MSVC
template <typename U, typename V, bool uIsBigger = (sizeof(U) > sizeof(V)), bool sameSize = (sizeof(U) == sizeof(V))> struct ResultBase;
template <typename U, typename V> struct ResultBase<U, V, true, false> {
typedef U ResultType;
};
template <typename U, typename V> struct ResultBase<U, V, false, false> {
typedef V ResultType;
};
template <typename U> struct ResultBase<U, U, false, true> {
typedef U ResultType;
};
template <typename U, typename V, bool uIsSigned = std::numeric_limits<U>::is_signed, bool vIsSigned = std::numeric_limits<V>::is_signed> struct SignednessSelector;
template <typename U, typename V> struct SignednessSelector<U, V, true, true> {
typedef U ResultType;
};
template <typename U, typename V> struct SignednessSelector<U, V, false, false> {
typedef U ResultType;
};
template <typename U, typename V> struct SignednessSelector<U, V, true, false> {
typedef V ResultType;
};
template <typename U, typename V> struct SignednessSelector<U, V, false, true> {
typedef U ResultType;
};
template <typename U, typename V> struct ResultBase<U, V, false, true> {
typedef typename SignednessSelector<U, V>::ResultType ResultType;
};
template <typename U, typename V> struct Result : ResultBase<typename RemoveChecked<U>::CleanType, typename RemoveChecked<V>::CleanType> {
};
template <typename LHS, typename RHS, typename ResultType = typename Result<LHS, RHS>::ResultType,
bool lhsSigned = std::numeric_limits<LHS>::is_signed, bool rhsSigned = std::numeric_limits<RHS>::is_signed> struct ArithmeticOperations;
template <typename LHS, typename RHS, typename ResultType> struct ArithmeticOperations<LHS, RHS, ResultType, true, true> {
// LHS and RHS are signed types
// Helper function
static inline bool signsMatch(LHS lhs, RHS rhs)
{
return (lhs ^ rhs) >= 0;
}
static inline bool add(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
{
if (signsMatch(lhs, rhs)) {
if (lhs >= 0) {
if ((std::numeric_limits<ResultType>::max() - rhs) < lhs)
return false;
} else {
ResultType temp = lhs - std::numeric_limits<ResultType>::min();
if (rhs < -temp)
return false;
}
} // if the signs do not match this operation can't overflow
result = static_cast<ResultType>(lhs + rhs);
return true;
}
static inline bool sub(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
{
if (!signsMatch(lhs, rhs)) {
if (lhs >= 0) {
if (lhs > std::numeric_limits<ResultType>::max() + rhs)
return false;
} else {
if (rhs > std::numeric_limits<ResultType>::max() + lhs)
return false;
}
} // if the signs match this operation can't overflow
result = static_cast<ResultType>(lhs - rhs);
return true;
}
static inline bool multiply(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
{
if (signsMatch(lhs, rhs)) {
if (lhs >= 0) {
if (lhs && (std::numeric_limits<ResultType>::max() / lhs) < rhs)
return false;
} else {
if (static_cast<ResultType>(lhs) == std::numeric_limits<ResultType>::min() || static_cast<ResultType>(rhs) == std::numeric_limits<ResultType>::min())
return false;
if ((std::numeric_limits<ResultType>::max() / -lhs) < -rhs)
return false;
}
} else {
if (lhs < 0) {
if (rhs && lhs < (std::numeric_limits<ResultType>::min() / rhs))
return false;
} else {
if (lhs && rhs < (std::numeric_limits<ResultType>::min() / lhs))
return false;
}
}
result = static_cast<ResultType>(lhs * rhs);
return true;
}
static inline bool equals(LHS lhs, RHS rhs) { return lhs == rhs; }
};
template <typename LHS, typename RHS, typename ResultType> struct ArithmeticOperations<LHS, RHS, ResultType, false, false> {
// LHS and RHS are unsigned types so bounds checks are nice and easy
static inline bool add(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
{
ResultType temp = lhs + rhs;
if (temp < lhs)
return false;
result = temp;
return true;
}
static inline bool sub(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
{
ResultType temp = lhs - rhs;
if (temp > lhs)
return false;
result = temp;
return true;
}
static inline bool multiply(LHS lhs, RHS rhs, ResultType& result) WARN_UNUSED_RETURN
{
if (!lhs || !rhs) {
result = 0;
return true;
}
if (std::numeric_limits<ResultType>::max() / lhs < rhs)
return false;
result = lhs * rhs;
return true;
}
static inline bool equals(LHS lhs, RHS rhs) { return lhs == rhs; }
};
template <typename ResultType> struct ArithmeticOperations<int, unsigned, ResultType, true, false> {
static inline bool add(int64_t lhs, int64_t rhs, ResultType& result)
{
int64_t temp = lhs + rhs;
if (temp < std::numeric_limits<ResultType>::min())
return false;
if (temp > std::numeric_limits<ResultType>::max())
return false;
result = static_cast<ResultType>(temp);
return true;
}
static inline bool sub(int64_t lhs, int64_t rhs, ResultType& result)
{
int64_t temp = lhs - rhs;
if (temp < std::numeric_limits<ResultType>::min())
return false;
if (temp > std::numeric_limits<ResultType>::max())
return false;
result = static_cast<ResultType>(temp);
return true;
}
static inline bool multiply(int64_t lhs, int64_t rhs, ResultType& result)
{
int64_t temp = lhs * rhs;
if (temp < std::numeric_limits<ResultType>::min())
return false;
if (temp > std::numeric_limits<ResultType>::max())
return false;
result = static_cast<ResultType>(temp);
return true;
}
static inline bool equals(int lhs, unsigned rhs)
{
return static_cast<int64_t>(lhs) == static_cast<int64_t>(rhs);
}
};
template <typename ResultType> struct ArithmeticOperations<unsigned, int, ResultType, false, true> {
static inline bool add(int64_t lhs, int64_t rhs, ResultType& result)
{
return ArithmeticOperations<int, unsigned, ResultType>::add(rhs, lhs, result);
}
static inline bool sub(int64_t lhs, int64_t rhs, ResultType& result)
{
return ArithmeticOperations<int, unsigned, ResultType>::sub(lhs, rhs, result);
}
static inline bool multiply(int64_t lhs, int64_t rhs, ResultType& result)
{
return ArithmeticOperations<int, unsigned, ResultType>::multiply(rhs, lhs, result);
}
static inline bool equals(unsigned lhs, int rhs)
{
return ArithmeticOperations<int, unsigned, ResultType>::equals(rhs, lhs);
}
};
template <typename U, typename V, typename R> static inline bool safeAdd(U lhs, V rhs, R& result)
{
return ArithmeticOperations<U, V, R>::add(lhs, rhs, result);
}
template <typename U, typename V, typename R> static inline bool safeSub(U lhs, V rhs, R& result)
{
return ArithmeticOperations<U, V, R>::sub(lhs, rhs, result);
}
template <typename U, typename V, typename R> static inline bool safeMultiply(U lhs, V rhs, R& result)
{
return ArithmeticOperations<U, V, R>::multiply(lhs, rhs, result);
}
template <typename U, typename V> static inline bool safeEquals(U lhs, V rhs)
{
return ArithmeticOperations<U, V>::equals(lhs, rhs);
}
enum ResultOverflowedTag { ResultOverflowed };
template <typename T, class OverflowHandler> class Checked : public OverflowHandler {
public:
template <typename _T, class _OverflowHandler> friend class Checked;
Checked()
: m_value(0)
{
}
Checked(ResultOverflowedTag)
: m_value(0)
{
this->overflowed();
}
template <typename U> Checked(U value)
{
if (!isInBounds<T>(value))
this->overflowed();
m_value = static_cast<T>(value);
}
template <typename V> Checked(const Checked<T, V>& rhs)
: m_value(rhs.m_value)
{
if (rhs.hasOverflowed())
this->overflowed();
}
template <typename U> Checked(const Checked<U, OverflowHandler>& rhs)
: OverflowHandler(rhs)
{
if (!isInBounds<T>(rhs.m_value))
this->overflowed();
m_value = static_cast<T>(rhs.m_value);
}
template <typename U, typename V> Checked(const Checked<U, V>& rhs)
{
if (rhs.hasOverflowed())
this->overflowed();
if (!isInBounds<T>(rhs.m_value))
this->overflowed();
m_value = static_cast<T>(rhs.m_value);
}
const Checked& operator=(Checked rhs)
{
this->clearOverflow();
if (rhs.hasOverflowed())
this->overflowed();
m_value = static_cast<T>(rhs.m_value);
return *this;
}
template <typename U> const Checked& operator=(U value)
{
return *this = Checked(value);
}
template <typename U, typename V> const Checked& operator=(const Checked<U, V>& rhs)
{
return *this = Checked(rhs);
}
// prefix
const Checked& operator++()
{
if (m_value == std::numeric_limits<T>::max())
this->overflowed();
m_value++;
return *this;
}
const Checked& operator--()
{
if (m_value == std::numeric_limits<T>::min())
this->overflowed();
m_value--;
return *this;
}
// postfix operators
const Checked operator++(int)
{
if (m_value == std::numeric_limits<T>::max())
this->overflowed();
return Checked(m_value++);
}
const Checked operator--(int)
{
if (m_value == std::numeric_limits<T>::min())
this->overflowed();
return Checked(m_value--);
}
// Boolean operators
bool operator!() const
{
if (this->hasOverflowed())
CRASH();
return !m_value;
}
typedef void* (Checked::*UnspecifiedBoolType);
operator UnspecifiedBoolType*() const
{
if (this->hasOverflowed())
CRASH();
return (m_value) ? reinterpret_cast<UnspecifiedBoolType*>(1) : 0;
}
// Value accessors. unsafeGet() will crash if there's been an overflow.
T unsafeGet() const
{
if (this->hasOverflowed())
CRASH();
return m_value;
}
inline CheckedState safeGet(T& value) const WARN_UNUSED_RETURN
{
value = m_value;
if (this->hasOverflowed())
return CheckedState::DidOverflow;
return CheckedState::DidNotOverflow;
}
// Mutating assignment
template <typename U> const Checked operator+=(U rhs)
{
if (!safeAdd(m_value, rhs, m_value))
this->overflowed();
return *this;
}
template <typename U> const Checked operator-=(U rhs)
{
if (!safeSub(m_value, rhs, m_value))
this->overflowed();
return *this;
}
template <typename U> const Checked operator*=(U rhs)
{
if (!safeMultiply(m_value, rhs, m_value))
this->overflowed();
return *this;
}
const Checked operator*=(double rhs)
{
double result = rhs * m_value;
// Handle +/- infinity and NaN
if (!(std::numeric_limits<T>::min() <= result && std::numeric_limits<T>::max() >= result))
this->overflowed();
m_value = (T)result;
return *this;
}
const Checked operator*=(float rhs)
{
return *this *= (double)rhs;
}
template <typename U, typename V> const Checked operator+=(Checked<U, V> rhs)
{
if (rhs.hasOverflowed())
this->overflowed();
return *this += rhs.m_value;
}
template <typename U, typename V> const Checked operator-=(Checked<U, V> rhs)
{
if (rhs.hasOverflowed())
this->overflowed();
return *this -= rhs.m_value;
}
template <typename U, typename V> const Checked operator*=(Checked<U, V> rhs)
{
if (rhs.hasOverflowed())
this->overflowed();
return *this *= rhs.m_value;
}
// Equality comparisons
template <typename V> bool operator==(Checked<T, V> rhs)
{
return unsafeGet() == rhs.unsafeGet();
}
template <typename U> bool operator==(U rhs)
{
if (this->hasOverflowed())
this->overflowed();
return safeEquals(m_value, rhs);
}
template <typename U, typename V> const Checked operator==(Checked<U, V> rhs)
{
return unsafeGet() == Checked(rhs.unsafeGet());
}
template <typename U> bool operator!=(U rhs)
{
return !(*this == rhs);
}
private:
// Disallow implicit conversion of floating point to integer types
Checked(float);
Checked(double);
void operator=(float);
void operator=(double);
void operator+=(float);
void operator+=(double);
void operator-=(float);
void operator-=(double);
T m_value;
};
template <typename U, typename V, typename OverflowHandler> static inline Checked<typename Result<U, V>::ResultType, OverflowHandler> operator+(Checked<U, OverflowHandler> lhs, Checked<V, OverflowHandler> rhs)
{
U x = 0;
V y = 0;
bool overflowed = lhs.safeGet(x) == CheckedState::DidOverflow || rhs.safeGet(y) == CheckedState::DidOverflow;
typename Result<U, V>::ResultType result = 0;
overflowed |= !safeAdd(x, y, result);
if (overflowed)
return ResultOverflowed;
return result;
}
template <typename U, typename V, typename OverflowHandler> static inline Checked<typename Result<U, V>::ResultType, OverflowHandler> operator-(Checked<U, OverflowHandler> lhs, Checked<V, OverflowHandler> rhs)
{
U x = 0;
V y = 0;
bool overflowed = lhs.safeGet(x) == CheckedState::DidOverflow || rhs.safeGet(y) == CheckedState::DidOverflow;
typename Result<U, V>::ResultType result = 0;
overflowed |= !safeSub(x, y, result);
if (overflowed)
return ResultOverflowed;
return result;
}
template <typename U, typename V, typename OverflowHandler> static inline Checked<typename Result<U, V>::ResultType, OverflowHandler> operator*(Checked<U, OverflowHandler> lhs, Checked<V, OverflowHandler> rhs)
{
U x = 0;
V y = 0;
bool overflowed = lhs.safeGet(x) == CheckedState::DidOverflow || rhs.safeGet(y) == CheckedState::DidOverflow;
typename Result<U, V>::ResultType result = 0;
overflowed |= !safeMultiply(x, y, result);
if (overflowed)
return ResultOverflowed;
return result;
}
template <typename U, typename V, typename OverflowHandler> static inline Checked<typename Result<U, V>::ResultType, OverflowHandler> operator+(Checked<U, OverflowHandler> lhs, V rhs)
{
return lhs + Checked<V, OverflowHandler>(rhs);
}
template <typename U, typename V, typename OverflowHandler> static inline Checked<typename Result<U, V>::ResultType, OverflowHandler> operator-(Checked<U, OverflowHandler> lhs, V rhs)
{
return lhs - Checked<V, OverflowHandler>(rhs);
}
template <typename U, typename V, typename OverflowHandler> static inline Checked<typename Result<U, V>::ResultType, OverflowHandler> operator*(Checked<U, OverflowHandler> lhs, V rhs)
{
return lhs * Checked<V, OverflowHandler>(rhs);
}
template <typename U, typename V, typename OverflowHandler> static inline Checked<typename Result<U, V>::ResultType, OverflowHandler> operator+(U lhs, Checked<V, OverflowHandler> rhs)
{
return Checked<U, OverflowHandler>(lhs) + rhs;
}
template <typename U, typename V, typename OverflowHandler> static inline Checked<typename Result<U, V>::ResultType, OverflowHandler> operator-(U lhs, Checked<V, OverflowHandler> rhs)
{
return Checked<U, OverflowHandler>(lhs) - rhs;
}
template <typename U, typename V, typename OverflowHandler> static inline Checked<typename Result<U, V>::ResultType, OverflowHandler> operator*(U lhs, Checked<V, OverflowHandler> rhs)
{
return Checked<U, OverflowHandler>(lhs) * rhs;
}
}
using WTF::Checked;
using WTF::CheckedState;
using WTF::RecordOverflow;
#endif
```
|
Farbo Glacier () is a tributary glacier which drains northeastward and enters the Land Glacier west of Mount McCoy, on the coast of Marie Byrd Land, Antarctica. It was mapped by the United States Geological Survey from surveys and U.S. Navy aerial photographs, 1959–65, and was named by the Advisory Committee on Antarctic Names for Richard R. Farbo, a U.S. Navy equipment operator who wintered-over in Antarctica on three expeditions of Operation Deep Freeze. He was at McMurdo Station in 1959 and 1965, and the South Pole Station in 1969.
References
Glaciers of Marie Byrd Land
|
```html+eex
<h2>New User</h2>
<%= render "form.html", Map.put(assigns, :action, user_path(@conn, :create)) %>
<span><%= link "Back", to: user_path(@conn, :index) %></span>
```
|
Peter Bromley (30 April 1929 – 3 June 2003) was BBC Radio's voice of horse racing for 40 years, and one of the most famous and recognised sports broadcasters in the United Kingdom.
Early life
Born at Heswall on the Wirral (then in Cheshire) Bromley was educated at Cheltenham College and Sandhurst. He served as a lieutenant in the 14th/20th King's Hussars, where he won the Bisley Cup for rifle shooting and came close to qualifying for Britain's modern pentathlon team for the 1952 Summer Olympics. He subsequently became the assistant to the British racehorse trainer Frank Pullen, and rode occasionally as an amateur jockey until he fractured his skull when a horse he was riding collided with a lorry.
Rise as a commentator
In 1955 he became one of the first racecourse commentators in Britain (his first commentary was at Plumpton on 23 March that year - delivering the immortal line 'Atom Bomb has fallen!', after earlier test commentaries at the now-defunct Hurst Park and at Sandown Park), and in four years he commentated at every course apart from Cartmel. He had also begun to commentate on television, initially (briefly) for ITV, but from 1958 for the BBC. On 13 May 1959, at Newmarket, he gave his first radio commentary. From 1 December 1959, he became the BBC's first racing correspondent, the first time the corporation had appointed a specialist correspondent on any sport. This was a full-time job: no commercial involvements or advertisements were permitted, and even opening fetes was frowned upon. He would remain in this position until the summer of 2001, calling home the winners of 202 Classics, with the exception of the 1969 St Leger when he was on holiday - BBC colleague Julian Wilson covered for him - and the 1997 St Leger when Lee McKenzie stood in for him when he hurt his knee and could not climb up the stairs to the commentary box in Doncaster.
By 1960, criticism from the racing fraternity of Raymond Glendenning's commentaries - he showed little interest in the sport and required the assistance of a race reader - was intensifying, and the rise of television was making the field of commentary more specialised. Bromley was advised by Peter Dimmock not to go to radio because Peter O'Sullevan could not go on forever (O'Sullevan was only 42 at the time) and he would be the next in line, but after commentating for radio on a number of races in 1960, Bromley became BBC Radio's main racing commentator from the beginning of 1961 (Glendenning's last racing commentary was on the King George VI Chase at Kempton Park on 26 December 1960, although he would continue to commentate on football, racing and tennis until the early part of 1964). Bromley would, however, continue to commentate for BBC Television on occasions until around 1970.
Broadcasting
For forty years from 1961 to 2001, Peter Bromley gave the radio commentary on virtually every major race in the United Kingdom, plus the Irish Derby and Prix de l'Arc de Triomphe on many occasions, and races in the United States, Hong Kong and South Africa, where he stayed for some time in late 1974 and early 1975. He covered 42 Grand Nationals, 202 Classics, and over 10,000 races in all. His commentaries were heard on the Light Programme, Network Three, Third Network, Radio 2, Radio 5 and Five Live, and his voice became instantly associated with racing among listeners all over the world as his commentaries also went out on the BBC World Service.
His stentorian, almost military tones - which could turn almost instantly from calm Received Pronunciation to a roar of grand excitement - captured the drama and potency of horse racing, and his tireless championing of the sport within the BBC led to a dramatic expansion in the number of races covered - from only 50 a year in the early 1960s to over 250 by the 1980s, although in his later years that number would decline again. He was also responsible for the launch of a daily racing bulletin in 1964, which was cancelled in June 2007 when the bulletin was broadcast on Five Live.
The more memorable the race, the more memorable his commentary seemed to be: Shergar's Derby in 1981 was heralded with the words "It's Shergar ... and you'll need a telescope to see the rest!", encapsulating how far ahead of his field the horse was. The epic Grand National of 1973 was another example: "Red Rum wins it, Crisp second and the rest don't matter - we'll never see a race like this in a hundred years!". An emotional piece of Bromley's commentary was his call in 1981 of Bob Champion winning the Grand National on Aldaniti.
Bromley, who never seemed to betray his partial deafness, was a conscientious professional, working hard to prepare for each commentary, often presenting winning trainers and owners with his charts, featuring the colours of each horse in a race, as souvenirs. In his later years, he was especially angered when his broadcast of the Derby began as the runners were going in the stalls (French Open tennis had interfered), and when he was told through his earphones, near the end of a race at Royal Ascot on 16 June 1998, to finish immediately after the race because Five Live needed to go over to the United States for the result of the Louise Woodward trial.
Later years and retirement
In his later years Bromley seemed to work less, giving much of his previous work over to commentator Lee McKenzie and reporter Cornelius Lysaght. He had intended to retire when he turned 70 in 1999, but continued until the age of 72 mainly because the BBC wanted him to commentate on 200 Classics, a record which is unlikely to be broken. He finally retired after Galileo's Epsom Derby victory on 9 June 2001, 40 years after his first Derby commentary on Psidium's shock 66–1 win.
Bromley's main pastimes were training gundogs and shooting game. He had hoped to continue these when he moved from Berkshire to Suffolk on his retirement, but he began to suffer from pancreatic cancer less than a year after his final broadcast, and fell victim to the cancer 15 months later. He was survived by his second wife (his first wife had been killed in a car crash in 1960) and his three daughters.
References
The Times Digital Archive
The Daily Telegraph obituary (anonymous) and appreciation by J.A. McGrath, 5 June 2003
The Guardian obituary by Julian Wilson, 5 June 2003
The Independent obituary by Tony Smurthwaite, 5 June 2003
1929 births
2003 deaths
14th/20th King's Hussars officers
People from Heswall
British horse racing writers and broadcasters
BBC people
Deaths from pancreatic cancer
People educated at Cheltenham College
Deaths from cancer in England
Graduates of the Royal Military Academy Sandhurst
British racehorse trainers
|
```c++
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file contains the unit tests for the bit utilities.
#include "base/bits.h"
#include <limits>
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
namespace bits {
TEST(BitsTest, Log2Floor)
{
EXPECT_EQ(-1, Log2Floor(0));
EXPECT_EQ(0, Log2Floor(1));
EXPECT_EQ(1, Log2Floor(2));
EXPECT_EQ(1, Log2Floor(3));
EXPECT_EQ(2, Log2Floor(4));
for (int i = 3; i < 31; ++i) {
unsigned int value = 1U << i;
EXPECT_EQ(i, Log2Floor(value));
EXPECT_EQ(i, Log2Floor(value + 1));
EXPECT_EQ(i, Log2Floor(value + 2));
EXPECT_EQ(i - 1, Log2Floor(value - 1));
EXPECT_EQ(i - 1, Log2Floor(value - 2));
}
EXPECT_EQ(31, Log2Floor(0xffffffffU));
}
TEST(BitsTest, Log2Ceiling)
{
EXPECT_EQ(-1, Log2Ceiling(0));
EXPECT_EQ(0, Log2Ceiling(1));
EXPECT_EQ(1, Log2Ceiling(2));
EXPECT_EQ(2, Log2Ceiling(3));
EXPECT_EQ(2, Log2Ceiling(4));
for (int i = 3; i < 31; ++i) {
unsigned int value = 1U << i;
EXPECT_EQ(i, Log2Ceiling(value));
EXPECT_EQ(i + 1, Log2Ceiling(value + 1));
EXPECT_EQ(i + 1, Log2Ceiling(value + 2));
EXPECT_EQ(i, Log2Ceiling(value - 1));
EXPECT_EQ(i, Log2Ceiling(value - 2));
}
EXPECT_EQ(32, Log2Ceiling(0xffffffffU));
}
TEST(BitsTest, Align)
{
const size_t kSizeTMax = std::numeric_limits<size_t>::max();
EXPECT_EQ(0ul, Align(0, 4));
EXPECT_EQ(4ul, Align(1, 4));
EXPECT_EQ(4096ul, Align(1, 4096));
EXPECT_EQ(4096ul, Align(4096, 4096));
EXPECT_EQ(4096ul, Align(4095, 4096));
EXPECT_EQ(8192ul, Align(4097, 4096));
EXPECT_EQ(kSizeTMax - 31, Align(kSizeTMax - 62, 32));
EXPECT_EQ(kSizeTMax / 2 + 1, Align(1, kSizeTMax / 2 + 1));
}
} // namespace bits
} // namespace base
```
|
Jorge Flores (born February 13, 1977) is an American former soccer midfielder who spent four seasons with the Dallas Burn in Major League Soccer. He was a member of the U.S. teams at the 1993 FIFA U-17 World Championship and 1997 FIFA World Youth Championship.
Club
Flores attended Paramount High School in Paramount, California, graduating in 1994. He was an outstanding youth soccer player. In February 1996, the Dallas Burn selected Flores in the 11th round (103rd overall) of the 1996 MLS Inaugural Player Draft. He became a starter with the Burn while continuing to play for the youth national teams. In 1998, he saw limited time due to a stress fracture. In 1999, he played one game for the Boston Bulldogs in the USL A-League and two on loan to the MLS Pro 40. The Burn released him in 2000.
International
In 1993, Flores played every minute for the United States U-17 men's national soccer team at the 1993 FIFA U-17 World Championship. In 1997, he was a member of the United States U-20 men's national soccer team which went to the second round of the 1997 FIFA World Youth Championship. On October 10, 1996, Flores played the first half in the United States men's national soccer team loss to Peru.
References
External links
FIFA Player Profile
1977 births
Living people
American men's soccer players
Boston Bulldogs (soccer) players
FC Dallas players
MLS Pro-40 players
United States men's international soccer players
Major League Soccer players
A-League (1995–2004) players
United States men's youth international soccer players
United States men's under-20 international soccer players
Soccer players from California
Men's association football midfielders
|
```javascript
export { getStaticPaths, a as getStaticProps, foo, bar as baz } from '.'
export default function Test() {
return <div />
}
```
|
```objective-c
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
//
// This Source Code Form is subject to the terms of the Mozilla
// with this file, You can obtain one at path_to_url
#ifndef EIGEN_LLT_H
#define EIGEN_LLT_H
namespace Eigen {
namespace internal{
template<typename MatrixType, int UpLo> struct LLT_Traits;
}
/** \ingroup Cholesky_Module
*
* \class LLT
*
* \brief Standard Cholesky decomposition (LL^T) of a matrix and associated features
*
* \tparam _MatrixType the type of the matrix of which we are computing the LL^T Cholesky decomposition
* \tparam _UpLo the triangular part that will be used for the decompositon: Lower (default) or Upper.
* The other triangular part won't be read.
*
* This class performs a LL^T Cholesky decomposition of a symmetric, positive definite
* matrix A such that A = LL^* = U^*U, where L is lower triangular.
*
* While the Cholesky decomposition is particularly useful to solve selfadjoint problems like D^*D x = b,
* for that purpose, we recommend the Cholesky decomposition without square root which is more stable
* and even faster. Nevertheless, this standard Cholesky decomposition remains useful in many other
* situations like generalised eigen problems with hermitian matrices.
*
* Remember that Cholesky decompositions are not rank-revealing. This LLT decomposition is only stable on positive definite matrices,
* use LDLT instead for the semidefinite case. Also, do not use a Cholesky decomposition to determine whether a system of equations
* has a solution.
*
* Example: \include LLT_example.cpp
* Output: \verbinclude LLT_example.out
*
* This class supports the \link InplaceDecomposition inplace decomposition \endlink mechanism.
*
* \sa MatrixBase::llt(), SelfAdjointView::llt(), class LDLT
*/
/* HEY THIS DOX IS DISABLED BECAUSE THERE's A BUG EITHER HERE OR IN LDLT ABOUT THAT (OR BOTH)
* Note that during the decomposition, only the upper triangular part of A is considered. Therefore,
* the strict lower part does not have to store correct values.
*/
template<typename _MatrixType, int _UpLo> class LLT
{
public:
typedef _MatrixType MatrixType;
enum {
RowsAtCompileTime = MatrixType::RowsAtCompileTime,
ColsAtCompileTime = MatrixType::ColsAtCompileTime,
MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
};
typedef typename MatrixType::Scalar Scalar;
typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
typedef typename MatrixType::StorageIndex StorageIndex;
enum {
PacketSize = internal::packet_traits<Scalar>::size,
AlignmentMask = int(PacketSize)-1,
UpLo = _UpLo
};
typedef internal::LLT_Traits<MatrixType,UpLo> Traits;
/**
* \brief Default Constructor.
*
* The default constructor is useful in cases in which the user intends to
* perform decompositions via LLT::compute(const MatrixType&).
*/
LLT() : m_matrix(), m_isInitialized(false) {}
/** \brief Default Constructor with memory preallocation
*
* Like the default constructor but with preallocation of the internal data
* according to the specified problem \a size.
* \sa LLT()
*/
explicit LLT(Index size) : m_matrix(size, size),
m_isInitialized(false) {}
template<typename InputType>
explicit LLT(const EigenBase<InputType>& matrix)
: m_matrix(matrix.rows(), matrix.cols()),
m_isInitialized(false)
{
compute(matrix.derived());
}
/** \brief Constructs a LDLT factorization from a given matrix
*
* This overloaded constructor is provided for \link InplaceDecomposition inplace decomposition \endlink when
* \c MatrixType is a Eigen::Ref.
*
* \sa LLT(const EigenBase&)
*/
template<typename InputType>
explicit LLT(EigenBase<InputType>& matrix)
: m_matrix(matrix.derived()),
m_isInitialized(false)
{
compute(matrix.derived());
}
/** \returns a view of the upper triangular matrix U */
inline typename Traits::MatrixU matrixU() const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
return Traits::getU(m_matrix);
}
/** \returns a view of the lower triangular matrix L */
inline typename Traits::MatrixL matrixL() const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
return Traits::getL(m_matrix);
}
/** \returns the solution x of \f$ A x = b \f$ using the current decomposition of A.
*
* Since this LLT class assumes anyway that the matrix A is invertible, the solution
* theoretically exists and is unique regardless of b.
*
* Example: \include LLT_solve.cpp
* Output: \verbinclude LLT_solve.out
*
* \sa solveInPlace(), MatrixBase::llt(), SelfAdjointView::llt()
*/
template<typename Rhs>
inline const Solve<LLT, Rhs>
solve(const MatrixBase<Rhs>& b) const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
eigen_assert(m_matrix.rows()==b.rows()
&& "LLT::solve(): invalid number of rows of the right hand side matrix b");
return Solve<LLT, Rhs>(*this, b.derived());
}
template<typename Derived>
void solveInPlace(MatrixBase<Derived> &bAndX) const;
template<typename InputType>
LLT& compute(const EigenBase<InputType>& matrix);
/** \returns an estimate of the reciprocal condition number of the matrix of
* which \c *this is the Cholesky decomposition.
*/
RealScalar rcond() const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
eigen_assert(m_info == Success && "LLT failed because matrix appears to be negative");
return internal::rcond_estimate_helper(m_l1_norm, *this);
}
/** \returns the LLT decomposition matrix
*
* TODO: document the storage layout
*/
inline const MatrixType& matrixLLT() const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
return m_matrix;
}
MatrixType reconstructedMatrix() const;
/** \brief Reports whether previous computation was successful.
*
* \returns \c Success if computation was succesful,
* \c NumericalIssue if the matrix.appears to be negative.
*/
ComputationInfo info() const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
return m_info;
}
/** \returns the adjoint of \c *this, that is, a const reference to the decomposition itself as the underlying matrix is self-adjoint.
*
* This method is provided for compatibility with other matrix decompositions, thus enabling generic code such as:
* \code x = decomposition.adjoint().solve(b) \endcode
*/
const LLT& adjoint() const { return *this; };
inline Index rows() const { return m_matrix.rows(); }
inline Index cols() const { return m_matrix.cols(); }
template<typename VectorType>
LLT rankUpdate(const VectorType& vec, const RealScalar& sigma = 1);
#ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename RhsType, typename DstType>
EIGEN_DEVICE_FUNC
void _solve_impl(const RhsType &rhs, DstType &dst) const;
#endif
protected:
static void check_template_parameters()
{
EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);
}
/** \internal
* Used to compute and store L
* The strict upper part is not used and even not initialized.
*/
MatrixType m_matrix;
RealScalar m_l1_norm;
bool m_isInitialized;
ComputationInfo m_info;
};
namespace internal {
template<typename Scalar, int UpLo> struct llt_inplace;
template<typename MatrixType, typename VectorType>
static Index llt_rank_update_lower(MatrixType& mat, const VectorType& vec, const typename MatrixType::RealScalar& sigma)
{
using std::sqrt;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
typedef typename MatrixType::ColXpr ColXpr;
typedef typename internal::remove_all<ColXpr>::type ColXprCleaned;
typedef typename ColXprCleaned::SegmentReturnType ColXprSegment;
typedef Matrix<Scalar,Dynamic,1> TempVectorType;
typedef typename TempVectorType::SegmentReturnType TempVecSegment;
Index n = mat.cols();
eigen_assert(mat.rows()==n && vec.size()==n);
TempVectorType temp;
if(sigma>0)
{
// This version is based on Givens rotations.
// It is faster than the other one below, but only works for updates,
// i.e., for sigma > 0
temp = sqrt(sigma) * vec;
for(Index i=0; i<n; ++i)
{
JacobiRotation<Scalar> g;
g.makeGivens(mat(i,i), -temp(i), &mat(i,i));
Index rs = n-i-1;
if(rs>0)
{
ColXprSegment x(mat.col(i).tail(rs));
TempVecSegment y(temp.tail(rs));
apply_rotation_in_the_plane(x, y, g);
}
}
}
else
{
temp = vec;
RealScalar beta = 1;
for(Index j=0; j<n; ++j)
{
RealScalar Ljj = numext::real(mat.coeff(j,j));
RealScalar dj = numext::abs2(Ljj);
Scalar wj = temp.coeff(j);
RealScalar swj2 = sigma*numext::abs2(wj);
RealScalar gamma = dj*beta + swj2;
RealScalar x = dj + swj2/beta;
if (x<=RealScalar(0))
return j;
RealScalar nLjj = sqrt(x);
mat.coeffRef(j,j) = nLjj;
beta += swj2/dj;
// Update the terms of L
Index rs = n-j-1;
if(rs)
{
temp.tail(rs) -= (wj/Ljj) * mat.col(j).tail(rs);
if(gamma != 0)
mat.col(j).tail(rs) = (nLjj/Ljj) * mat.col(j).tail(rs) + (nLjj * sigma*numext::conj(wj)/gamma)*temp.tail(rs);
}
}
}
return -1;
}
template<typename Scalar> struct llt_inplace<Scalar, Lower>
{
typedef typename NumTraits<Scalar>::Real RealScalar;
template<typename MatrixType>
static Index unblocked(MatrixType& mat)
{
using std::sqrt;
eigen_assert(mat.rows()==mat.cols());
const Index size = mat.rows();
for(Index k = 0; k < size; ++k)
{
Index rs = size-k-1; // remaining size
Block<MatrixType,Dynamic,1> A21(mat,k+1,k,rs,1);
Block<MatrixType,1,Dynamic> A10(mat,k,0,1,k);
Block<MatrixType,Dynamic,Dynamic> A20(mat,k+1,0,rs,k);
RealScalar x = numext::real(mat.coeff(k,k));
if (k>0) x -= A10.squaredNorm();
if (x<=RealScalar(0))
return k;
mat.coeffRef(k,k) = x = sqrt(x);
if (k>0 && rs>0) A21.noalias() -= A20 * A10.adjoint();
if (rs>0) A21 /= x;
}
return -1;
}
template<typename MatrixType>
static Index blocked(MatrixType& m)
{
eigen_assert(m.rows()==m.cols());
Index size = m.rows();
if(size<32)
return unblocked(m);
Index blockSize = size/8;
blockSize = (blockSize/16)*16;
blockSize = (std::min)((std::max)(blockSize,Index(8)), Index(128));
for (Index k=0; k<size; k+=blockSize)
{
// partition the matrix:
// A00 | - | -
// lu = A10 | A11 | -
// A20 | A21 | A22
Index bs = (std::min)(blockSize, size-k);
Index rs = size - k - bs;
Block<MatrixType,Dynamic,Dynamic> A11(m,k, k, bs,bs);
Block<MatrixType,Dynamic,Dynamic> A21(m,k+bs,k, rs,bs);
Block<MatrixType,Dynamic,Dynamic> A22(m,k+bs,k+bs,rs,rs);
Index ret;
if((ret=unblocked(A11))>=0) return k+ret;
if(rs>0) A11.adjoint().template triangularView<Upper>().template solveInPlace<OnTheRight>(A21);
if(rs>0) A22.template selfadjointView<Lower>().rankUpdate(A21,typename NumTraits<RealScalar>::Literal(-1)); // bottleneck
}
return -1;
}
template<typename MatrixType, typename VectorType>
static Index rankUpdate(MatrixType& mat, const VectorType& vec, const RealScalar& sigma)
{
return Eigen::internal::llt_rank_update_lower(mat, vec, sigma);
}
};
template<typename Scalar> struct llt_inplace<Scalar, Upper>
{
typedef typename NumTraits<Scalar>::Real RealScalar;
template<typename MatrixType>
static EIGEN_STRONG_INLINE Index unblocked(MatrixType& mat)
{
Transpose<MatrixType> matt(mat);
return llt_inplace<Scalar, Lower>::unblocked(matt);
}
template<typename MatrixType>
static EIGEN_STRONG_INLINE Index blocked(MatrixType& mat)
{
Transpose<MatrixType> matt(mat);
return llt_inplace<Scalar, Lower>::blocked(matt);
}
template<typename MatrixType, typename VectorType>
static Index rankUpdate(MatrixType& mat, const VectorType& vec, const RealScalar& sigma)
{
Transpose<MatrixType> matt(mat);
return llt_inplace<Scalar, Lower>::rankUpdate(matt, vec.conjugate(), sigma);
}
};
template<typename MatrixType> struct LLT_Traits<MatrixType,Lower>
{
typedef const TriangularView<const MatrixType, Lower> MatrixL;
typedef const TriangularView<const typename MatrixType::AdjointReturnType, Upper> MatrixU;
static inline MatrixL getL(const MatrixType& m) { return MatrixL(m); }
static inline MatrixU getU(const MatrixType& m) { return MatrixU(m.adjoint()); }
static bool inplace_decomposition(MatrixType& m)
{ return llt_inplace<typename MatrixType::Scalar, Lower>::blocked(m)==-1; }
};
template<typename MatrixType> struct LLT_Traits<MatrixType,Upper>
{
typedef const TriangularView<const typename MatrixType::AdjointReturnType, Lower> MatrixL;
typedef const TriangularView<const MatrixType, Upper> MatrixU;
static inline MatrixL getL(const MatrixType& m) { return MatrixL(m.adjoint()); }
static inline MatrixU getU(const MatrixType& m) { return MatrixU(m); }
static bool inplace_decomposition(MatrixType& m)
{ return llt_inplace<typename MatrixType::Scalar, Upper>::blocked(m)==-1; }
};
} // end namespace internal
/** Computes / recomputes the Cholesky decomposition A = LL^* = U^*U of \a matrix
*
* \returns a reference to *this
*
* Example: \include TutorialLinAlgComputeTwice.cpp
* Output: \verbinclude TutorialLinAlgComputeTwice.out
*/
template<typename MatrixType, int _UpLo>
template<typename InputType>
LLT<MatrixType,_UpLo>& LLT<MatrixType,_UpLo>::compute(const EigenBase<InputType>& a)
{
check_template_parameters();
eigen_assert(a.rows()==a.cols());
const Index size = a.rows();
m_matrix.resize(size, size);
m_matrix = a.derived();
// Compute matrix L1 norm = max abs column sum.
m_l1_norm = RealScalar(0);
// TODO move this code to SelfAdjointView
for (Index col = 0; col < size; ++col) {
RealScalar abs_col_sum;
if (_UpLo == Lower)
abs_col_sum = m_matrix.col(col).tail(size - col).template lpNorm<1>() + m_matrix.row(col).head(col).template lpNorm<1>();
else
abs_col_sum = m_matrix.col(col).head(col).template lpNorm<1>() + m_matrix.row(col).tail(size - col).template lpNorm<1>();
if (abs_col_sum > m_l1_norm)
m_l1_norm = abs_col_sum;
}
m_isInitialized = true;
bool ok = Traits::inplace_decomposition(m_matrix);
m_info = ok ? Success : NumericalIssue;
return *this;
}
/** Performs a rank one update (or dowdate) of the current decomposition.
* If A = LL^* before the rank one update,
* then after it we have LL^* = A + sigma * v v^* where \a v must be a vector
* of same dimension.
*/
template<typename _MatrixType, int _UpLo>
template<typename VectorType>
LLT<_MatrixType,_UpLo> LLT<_MatrixType,_UpLo>::rankUpdate(const VectorType& v, const RealScalar& sigma)
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorType);
eigen_assert(v.size()==m_matrix.cols());
eigen_assert(m_isInitialized);
if(internal::llt_inplace<typename MatrixType::Scalar, UpLo>::rankUpdate(m_matrix,v,sigma)>=0)
m_info = NumericalIssue;
else
m_info = Success;
return *this;
}
#ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename _MatrixType,int _UpLo>
template<typename RhsType, typename DstType>
void LLT<_MatrixType,_UpLo>::_solve_impl(const RhsType &rhs, DstType &dst) const
{
dst = rhs;
solveInPlace(dst);
}
#endif
/** \internal use x = llt_object.solve(x);
*
* This is the \em in-place version of solve().
*
* \param bAndX represents both the right-hand side matrix b and result x.
*
* This version avoids a copy when the right hand side matrix b is not needed anymore.
*
* \sa LLT::solve(), MatrixBase::llt()
*/
template<typename MatrixType, int _UpLo>
template<typename Derived>
void LLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
eigen_assert(m_matrix.rows()==bAndX.rows());
matrixL().solveInPlace(bAndX);
matrixU().solveInPlace(bAndX);
}
/** \returns the matrix represented by the decomposition,
* i.e., it returns the product: L L^*.
* This function is provided for debug purpose. */
template<typename MatrixType, int _UpLo>
MatrixType LLT<MatrixType,_UpLo>::reconstructedMatrix() const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
return matrixL() * matrixL().adjoint().toDenseMatrix();
}
/** \cholesky_module
* \returns the LLT decomposition of \c *this
* \sa SelfAdjointView::llt()
*/
template<typename Derived>
inline const LLT<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::llt() const
{
return LLT<PlainObject>(derived());
}
/** \cholesky_module
* \returns the LLT decomposition of \c *this
* \sa SelfAdjointView::llt()
*/
template<typename MatrixType, unsigned int UpLo>
inline const LLT<typename SelfAdjointView<MatrixType, UpLo>::PlainObject, UpLo>
SelfAdjointView<MatrixType, UpLo>::llt() const
{
return LLT<PlainObject,UpLo>(m_matrix);
}
} // end namespace Eigen
#endif // EIGEN_LLT_H
```
|
The Hartvig Nissen School (), informally referred to as Nissen, is a gymnasium in Oslo, Norway. It is located in the neighborhood Uranienborg in the affluent West End borough of Frogner. It is Norway's oldest high school for girls and is widely considered one of the country's two most prestigious high schools alongside the traditionally male-only Oslo Cathedral School; its alumni include many famous individuals and two members of the Norwegian royal family.
Originally named Nissen's Girls' School, it was founded by Hartvig Nissen and was originally a private, progressive girls' school which was owned by its headmasters and which served the higher bourgeoisie. The school formerly also had its own teachers college. The school and its teachers college have the distinction of being both the first gymnasium and the first higher education institution in Norway which admitted girls and women, and the school and its owners played a key role in promoting female education during the 19th and early 20th century. The school was described in the British House of Commons in 1907 as "the pioneer of higher girls' schools in Norway."
The school was located at the address Rosenkrantz' Gade 7 from 1849 to 1860 and at the address Øvere Voldgade 15 from 1860 to 1899. Then-owner-headmaster Bernhard Pauss moved the school to its current address, Niels Juels gate 56, and commissioned the construction of the current school building which was completed in 1899. In 1991 the school also acquired the building of its former neighbours Frogner School and Haagaas School at Niels Juels gate 52.
The TV series Skam was centered on the school. The then relatively new progressive girls' school is also referenced in the 1862 play Love's Comedy by Henrik Ibsen.
History
It was established in 1849 by Hartvig Nissen and was originally a private girls' school, named Nissen's Girls' School (Nissens Pigeskole, later changed to the modern spelling Nissens Pikeskole). The school was privately owned, usually by its headmasters, until it was sold to Christiania Municipality in 1918. Nissen's Girls' School was the first institution in Norway to offer examen artium—the university entrance exam—for women. Then-owner Bernhard Cathrinus Pauss also established the first tertiary education for women in Norway, a women's teacher's college named Nissen's Teachers' College (Nissens Lærerinneskole).
Nissen's Girls' School mainly served the higher bourgeoisie, and was one of three leading private higher schools in Oslo, alongside Frogner School and Vestheim School. Due to its location in the wealthy borough of Frogner and also because few working-class Norwegians attended gymnasium before the "education revolution" that started in the 1960s, it remained a school of choice for pupils from affluent families also after it was acquired by the municipality, although today, it has pupils from all parts of Oslo and with more diverse backgrounds. Its alumni include two members of the Norwegian royal family, Princess Ragnhild and Princess Astrid.
From 1860 to 1899, the school was located in a building in Øvre Vollgate 15 in central Oslo. The current school building in Niels Juels gate 56 was commissioned by then-owner Bernhard Cathrinus Pauss in 1897, designed by Hartvig Nissen's son, architect Henrik Nissen, and built by Harald Kaas. The girls' school gradually became a co-educational school from the mid-1950s, after four boys were admitted in 1955 alongside hundreds of girls. Nissen's Girls' School changed its name to Nissen School in 1957 and to Hartvig Nissen School in 1963. In 1991, it also acquired the buildings of its neighbour, the former Frogner School and the former Frogner Trade School. The school is famous for its focus on theatre, having many actors among its alumni. It was also the first school in Norway to introduce a pupil's council, in 1919.
Cultural depictions
The school is referenced in the play Love's Comedy by Henrik Ibsen; Ibsen scholar Ivo de Figueiredo notes that "Love's Comedy is rich in so many ways. (...) Its most striking references, however, were to contemporary Christiania, and alert readers could spot references to places such as Kurland, a Kristiania 'Lover's Lane', and institutions such as Hartvig Nissen's girls' school."
The TV series Skam revolved around the school. The show is about teen Norwegian girls and boys who live in Oslo and who attend Hartvig Nissen School.
Owners
Hartvig Nissen (1849–1872, sole owner until 1865, then one third)
Johan Carl Keyser (1865–1899, one third)
Einar Lyche (1865–1899, one third)
Andreas Martin Corneliussen (1899–1900, one half)
Bernhard Cathrinus Pauss (1872–1903, one third until 1899, one half until 1900 and sole owner 1900–1903)
Frogner skoles interessentskap (Thorvald Prebensen, Theodor Haagaas and others) (1903–1918, sole owner)
Christiania/Oslo municipality (sole owner from 1918)
Notable faculty
Notable people who have taught at Nissen's Girls' School/Hartvig Nissen School include:
Peter Ludwig Mejdell Sylow, mathematician who proved foundational results in group theory.
Ole Jacob Broch, mathematician, physicist, economist and government minister.
Notable alumni
Notable people who have graduated from Nissen's Girls' School/Hartvig Nissen School include:
Princess Ragnhild
Princess Astrid
Eva Nansen, mezzo-soprano and wife of Fridtjof Nansen
Margrethe Munthe, children's writer, songwriter and playwright
Clara Holst, first woman to obtain a doctorate in Norway
Margrethe Parm, Christian leader and scout leader
Ragnhild Jølsen, writer
Harriet Backer, painter
Alette Engelhart, women's activist
Lillebjørn Nilsen, songwriter
Toril Brekke, novelist
Ragna Nielsen, pedagogue
Triana Iglesias, model
Tarjei Sandvik Moe, actor
Hege Schøyen, comedian
Jon Balke, jazz musician
Maria Bonnevie, actress
Ulrik Imtiaz Rolfsen, film director
Lea Myren, actress and fashion model
References
External links
Official website
Further reading
Nissens Pigeskole og Privatseminar, Nissens Pigeskole, Christiania, 1900
Einar Boyesen (ed.): Nissens pikeskole 1849–1924, Oslo 1924
Nils A. Ytreberg: Nissen pikeskole 1849–1949, Oslo 1949
Maja Lise Rønneberg: Hartvig Nissens skole 150 år: 1849–1999, Oslo 1999
1849 establishments in Norway
Educational institutions established in 1849
Schools in Oslo
Secondary schools in Norway
|
```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.
*/
#ifndef STDLIB_MATH_STRIDED_SPECIAL_DMSKRAMP_H
#define STDLIB_MATH_STRIDED_SPECIAL_DMSKRAMP_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
/**
* Evaluates the ramp function for each element in a double-precision floating-point strided array `X` according to a strided mask array and assigns the results to elements in a double-precision floating-point strided array `Y`.
*/
void stdlib_strided_dmskramp( const int64_t N, const double *X, const int64_t strideX, const uint8_t *Mask, const int64_t strideMask, double *Y, const int64_t strideY );
#ifdef __cplusplus
}
#endif
#endif // !STDLIB_MATH_STRIDED_SPECIAL_DMSKRAMP_H
```
|
The Mental Health Foundation is a UK charity, whose mission is "to help people to thrive through understanding, protecting, and sustaining their mental health."
History
The Mental Health Foundation was founded in 1949, as the Mental Health Research Fund, by Derek Richter, a neurochemist and director of research at Whitchurch Hospital. Richter enlisted the help of stockbroker Ian Henderson, who became the chair, while Victoria Cross recipient Geoffrey Vickers became chair of the research committee.
In 1972, the Mental Health Foundation took its current name, shifting its "focus away from laboratory research and towards working directly with—and learning from—people [who] experience mental health problems."
The Foundation has also focussed on "overlooked and under-researched areas," including personality disorders and issues affecting various ethnic groups. In 1999, the Foundation took their work with learning disabilities forwards, creating the Foundation for People with Learning Disabilities.
Mental Health Awareness Week
Each year, for a week in May, the Mental Health Foundation leads Mental Health Awareness Week.
Mental Health Awareness Week was first held in 2001, and became one of the biggest mental health awareness events in the world.
Themes
Green ribbon
The green ribbon is the "international symbol for mental health awareness."
The Foundation's green ribbon ambassadors, include: Olly Alexander, Aisling Bea, Olivia Colman, Matt Haig, David Harewood, Nadiya Hussain, Grant Hutchison, Alex Lawther, and Graham Norton.
The movement uses the hashtag #PinItForMentalHealth.
Funding
The Foundation's total income for the financial year ending 31 March 2018 was £5.8m, with sources including donations (individual and corporate), legacies and grants.
Organization
The Foundation is an incorporated UK charity headed by a board of 12 trustees. Aisha Sheikh-Anene was appointed Chair of the board of trustees in 2020.
The president of the Foundation is Dr Jacqui Dyer MBE and the patron is Princess Alexandra.
See also
Foundation for People with Learning Disabilities
Mental health in the United Kingdom
References
Health charities in the United Kingdom
Health in the London Borough of Southwark
Medical and health organisations based in London
Mental health organisations in the United Kingdom
1949 establishments in the United Kingdom
Organisations based in the London Borough of Southwark
Organizations established in 1949
|
```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 reactor.netty.http;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.handler.codec.http2.Http2Connection;
import io.netty.handler.codec.http2.Http2FrameCodec;
import io.netty.handler.ssl.util.InsecureTrustManagerFactory;
import io.netty.handler.ssl.util.SelfSignedCertificate;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.mockito.Mockito;
import org.reactivestreams.Publisher;
import reactor.core.Disposable;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Signal;
import reactor.core.publisher.Sinks;
import reactor.core.scheduler.Schedulers;
import reactor.netty.BaseHttpTest;
import reactor.netty.ByteBufFlux;
import reactor.netty.ByteBufMono;
import reactor.netty.http.client.HttpClient;
import reactor.netty.http.server.HttpServer;
import reactor.netty.internal.shaded.reactor.pool.PoolAcquireTimeoutException;
import reactor.netty.resources.ConnectionProvider;
import reactor.netty.tcp.SslProvider.ProtocolSslContextSpec;
import reactor.test.StepVerifier;
import reactor.util.annotation.Nullable;
import reactor.util.function.Tuple2;
import java.nio.charset.Charset;
import java.security.cert.CertificateException;
import java.time.Duration;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.BiFunction;
import java.util.function.Predicate;
import java.util.stream.IntStream;
import static org.assertj.core.api.Assertions.assertThat;
import static reactor.netty.ConnectionObserver.State.CONFIGURED;
/**
* Holds HTTP/2 specific tests.
*
* @author Violeta Georgieva
* @since 1.0.0
*/
class Http2Tests extends BaseHttpTest {
private static final String H2_WITHOUT_TLS_SERVER = "Configured H2 protocol without TLS. Use" +
" a Clear-Text H2 protocol via HttpServer#protocol or configure TLS" +
" via HttpServer#secure";
private static final String H2C_WITH_TLS_SERVER = "Configured H2 Clear-Text protocol with TLS. Use" +
" the non Clear-Text H2 protocol via HttpServer#protocol or disable TLS" +
" via HttpServer#noSSL())";
private static final String H2_WITHOUT_TLS_CLIENT = "Configured H2 protocol without TLS. Use H2 Clear-Text " +
"protocol via HttpClient#protocol or configure TLS via HttpClient#secure";
private static final String H2C_WITH_TLS_CLIENT = "Configured H2 Clear-Text protocol with TLS. " +
"Use the non Clear-Text H2 protocol via HttpClient#protocol or disable TLS " +
"via HttpClient#noSSL()";
static SelfSignedCertificate ssc;
@BeforeAll
static void createSelfSignedCertificate() throws CertificateException {
ssc = new SelfSignedCertificate();
}
@Test
void testHttpNoSslH2Fails() {
createServer()
.protocol(HttpProtocol.H2)
.handle((req, res) -> res.sendString(Mono.just("Hello")))
.bind()
.as(StepVerifier::create)
.verifyErrorMessage(H2_WITHOUT_TLS_SERVER);
}
@Test
@SuppressWarnings("deprecation")
void testHttpSslH2CFails() {
Http2SslContextSpec serverOptions = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
createServer()
.protocol(HttpProtocol.H2C)
.secure(ssl -> ssl.sslContext(serverOptions))
.handle((req, res) -> res.sendString(Mono.just("Hello")))
.bind()
.as(StepVerifier::create)
.verifyErrorMessage(H2C_WITH_TLS_SERVER);
}
@Test
void testCustomConnectionProvider() {
disposableServer =
createServer()
.protocol(HttpProtocol.H2C)
.route(routes ->
routes.post("/echo", (req, res) -> res.send(req.receive().retain())))
.bindNow();
ConnectionProvider provider = ConnectionProvider.create("testCustomConnectionProvider", 1);
String response =
createClient(provider, disposableServer.port())
.protocol(HttpProtocol.H2C)
.post()
.uri("/echo")
.send(ByteBufFlux.fromString(Mono.just("testCustomConnectionProvider")))
.responseContent()
.aggregate()
.asString()
.block(Duration.ofSeconds(30));
assertThat(response).isEqualTo("testCustomConnectionProvider");
provider.disposeLater()
.block(Duration.ofSeconds(30));
}
@Test
void testIssue1071MaxContentLengthSpecified() {
doTestIssue1071(1024, "doTestIssue1071", 200);
}
@Test
void testIssue1071MaxContentLengthNotSpecified() {
doTestIssue1071(0, "NO RESPONSE", 413);
}
private void doTestIssue1071(int length, String expectedResponse, int expectedCode) {
disposableServer =
createServer()
.protocol(HttpProtocol.H2C, HttpProtocol.HTTP11)
.route(routes ->
routes.post("/echo", (request, response) -> response.send(request.receive().retain())))
.httpRequestDecoder(spec -> spec.h2cMaxContentLength(length))
.bindNow();
Tuple2<String, Integer> response =
createClient(disposableServer.port())
.protocol(HttpProtocol.H2C, HttpProtocol.HTTP11)
.post()
.uri("/echo")
.send(ByteBufFlux.fromString(Mono.just("doTestIssue1071")))
.responseSingle((res, bytes) -> bytes.asString().defaultIfEmpty("NO RESPONSE").zipWith(Mono.just(res.status().code())))
.block(Duration.ofSeconds(30));
assertThat(response).isNotNull();
assertThat(response.getT1()).isEqualTo(expectedResponse);
assertThat(response.getT2()).isEqualTo(expectedCode);
}
@Test
void testMaxActiveStreams_1_CustomPool() throws Exception {
doTestMaxActiveStreams_1_CustomPool(null);
}
@Test
void testMaxActiveStreams_1_CustomPool_Custom_AcquireTimer() throws Exception {
CountDownLatch latch = new CountDownLatch(1);
BiFunction<Runnable, Duration, Disposable> timer = (r, d) -> {
Runnable wrapped = () -> {
r.run();
latch.countDown();
};
return Schedulers.single().schedule(wrapped, d.toNanos(), TimeUnit.NANOSECONDS);
};
doTestMaxActiveStreams_1_CustomPool(timer);
assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue();
}
void doTestMaxActiveStreams_1_CustomPool(@Nullable BiFunction<Runnable, Duration, Disposable> pendingAcquireTimer) throws Exception {
ConnectionProvider.Builder builder =
ConnectionProvider.builder("testMaxActiveStreams_1_CustomPool")
.maxConnections(1)
.pendingAcquireTimeout(Duration.ofMillis(10)); // the default is 45s
if (pendingAcquireTimer != null) {
builder = builder.pendingAcquireTimer(pendingAcquireTimer);
}
ConnectionProvider provider = builder.build();
doTestMaxActiveStreams(HttpClient.create(provider), 1, 1, 1);
provider.disposeLater()
.block(Duration.ofSeconds(5));
}
@Test
void testMaxActiveStreams_2_DefaultPool() throws Exception {
doTestMaxActiveStreams(HttpClient.create(), 2, 2, 0);
}
@Test
void testMaxActiveStreams_2_CustomPool() throws Exception {
ConnectionProvider provider = ConnectionProvider.create("testMaxActiveStreams_2", 1);
doTestMaxActiveStreams(HttpClient.create(provider), 2, 2, 0);
provider.disposeLater()
.block(Duration.ofSeconds(5));
}
@Test
void testMaxActiveStreams_2_NoPool() throws Exception {
doTestMaxActiveStreams(HttpClient.newConnection(), 2, 2, 0);
}
void doTestMaxActiveStreams(HttpClient baseClient, int maxActiveStreams, int expectedOnNext, int expectedOnError) throws Exception {
doTestMaxActiveStreams(baseClient, maxActiveStreams, 256, 32, expectedOnNext, expectedOnError);
}
@SuppressWarnings("deprecation")
void doTestMaxActiveStreams(HttpClient baseClient, int maxActiveStreams, int concurrency, int prefetch, int expectedOnNext, int expectedOnError) throws Exception {
Http2SslContextSpec serverCtx = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
Http2SslContextSpec clientCtx =
Http2SslContextSpec.forClient()
.configure(builder -> builder.trustManager(InsecureTrustManagerFactory.INSTANCE));
disposableServer =
createServer()
.protocol(HttpProtocol.H2)
.secure(spec -> spec.sslContext(serverCtx))
.route(routes ->
routes.post("/echo", (req, res) -> res.send(req.receive()
.aggregate()
.retain()
.delayElement(Duration.ofMillis(100)))))
.http2Settings(setting -> setting.maxConcurrentStreams(maxActiveStreams))
.bindNow();
HttpClient client =
baseClient.port(disposableServer.port())
.protocol(HttpProtocol.H2)
.secure(spec -> spec.sslContext(clientCtx))
.wiretap(true);
CountDownLatch latch = new CountDownLatch(1);
List<? extends Signal<? extends String>> list =
Flux.range(0, 2)
.flatMapDelayError(i ->
client.post()
.uri("/echo")
.send(ByteBufFlux.fromString(Mono.just("doTestMaxActiveStreams")))
.responseContent()
.aggregate()
.asString()
.materialize(),
concurrency, prefetch)
.collectList()
.doFinally(fin -> latch.countDown())
.block(Duration.ofSeconds(30));
assertThat(latch.await(30, TimeUnit.SECONDS)).as("latch 30s").isTrue();
assertThat(list).isNotNull().hasSize(2);
int onNext = 0;
int onError = 0;
String msg = "Pool#acquire(Duration) has been pending for more than the configured timeout of 10ms";
for (int i = 0; i < 2; i++) {
Signal<? extends String> signal = list.get(i);
if (signal.isOnNext()) {
onNext++;
}
else if (signal.getThrowable() instanceof PoolAcquireTimeoutException &&
signal.getThrowable().getMessage().contains(msg)) {
onError++;
}
}
assertThat(onNext).isEqualTo(expectedOnNext);
assertThat(onError).isEqualTo(expectedOnError);
}
@Test
@SuppressWarnings("deprecation")
void testHttp2ForMemoryLeaks() {
Http2SslContextSpec serverCtx = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
Http2SslContextSpec clientCtx =
Http2SslContextSpec.forClient()
.configure(builder -> builder.trustManager(InsecureTrustManagerFactory.INSTANCE));
disposableServer =
HttpServer.create()
.port(0)
.protocol(HttpProtocol.H2)
.secure(spec -> spec.sslContext(serverCtx))
.handle((req, res) ->
res.sendString(Flux.range(0, 10)
.map(i -> "test")
.delayElements(Duration.ofMillis(4))))
.bindNow();
HttpClient client =
HttpClient.create()
.port(disposableServer.port())
.protocol(HttpProtocol.H2)
.secure(spec -> spec.sslContext(clientCtx));
for (int i = 0; i < 1000; ++i) {
try {
client.get()
.uri("/")
.responseContent()
.aggregate()
.asString()
.timeout(Duration.ofMillis(ThreadLocalRandom.current().nextInt(1, 35)))
.block(Duration.ofMillis(100));
}
catch (Throwable t) {
// ignore
}
}
System.gc();
for (int i = 0; i < 100000; ++i) {
@SuppressWarnings("UnusedVariable")
int[] arr = new int[100000];
}
System.gc();
}
@Test
void testHttpClientDefaultSslProvider() {
HttpClient client = HttpClient.create()
.wiretap(true);
doTestHttpClientDefaultSslProvider(client.protocol(HttpProtocol.H2));
doTestHttpClientDefaultSslProvider(client.protocol(HttpProtocol.H2)
.secure());
doTestHttpClientDefaultSslProvider(client.secure()
.protocol(HttpProtocol.H2));
doTestHttpClientDefaultSslProvider(client.protocol(HttpProtocol.HTTP11)
.secure()
.protocol(HttpProtocol.H2));
}
private static void doTestHttpClientDefaultSslProvider(HttpClient client) {
AtomicBoolean channel = new AtomicBoolean();
StepVerifier.create(client.doOnRequest((req, conn) -> channel.set(conn.channel().parent() != null))
.get()
.uri("path_to_url")
.responseContent()
.aggregate()
.asString())
.expectNextMatches(s -> s.contains("Example Domain"))
.expectComplete()
.verify(Duration.ofSeconds(30));
assertThat(channel.get()).isTrue();
}
@Test
void testMonoRequestBodySentAsFullRequest_Flux() {
// sends the message and then last http content
doTestMonoRequestBodySentAsFullRequest(ByteBufFlux.fromString(Mono.just("test")), 2);
}
@Test
void testMonoRequestBodySentAsFullRequest_Mono() {
// sends "full" request
doTestMonoRequestBodySentAsFullRequest(ByteBufMono.fromString(Mono.just("test")), 1);
}
@SuppressWarnings("deprecation")
private void doTestMonoRequestBodySentAsFullRequest(Publisher<? extends ByteBuf> body, int expectedMsg) {
Http2SslContextSpec serverCtx = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
Http2SslContextSpec clientCtx =
Http2SslContextSpec.forClient()
.configure(builder -> builder.trustManager(InsecureTrustManagerFactory.INSTANCE));
AtomicInteger counter = new AtomicInteger();
disposableServer =
createServer()
.protocol(HttpProtocol.H2)
.secure(spec -> spec.sslContext(serverCtx))
.handle((req, res) -> req.receiveContent()
.doOnNext(httpContent -> counter.getAndIncrement())
.then(res.send()))
.bindNow(Duration.ofSeconds(30));
createClient(disposableServer.port())
.protocol(HttpProtocol.H2)
.secure(spec -> spec.sslContext(clientCtx))
.post()
.uri("/")
.send(body)
.responseContent()
.aggregate()
.block(Duration.ofSeconds(30));
assertThat(counter.get()).isEqualTo(expectedMsg);
}
@Test
void testIssue1394_SchemeHttpConfiguredH2CNegotiatedH2C() {
// "prior-knowledge" is used and stream id is 3
doTestIssue1394_SchemeHttp("3", HttpProtocol.H2C);
}
@Test
void testIssue1394_SchemeHttpConfiguredH2CAndH2NegotiatedH2C() {
// "prior-knowledge" is used and stream id is 3
doTestIssue1394_SchemeHttp("3", HttpProtocol.H2, HttpProtocol.H2C);
}
@Test
void testIssue1394_SchemeHttpConfiguredH2CAndHTTP11NegotiatedH2C() {
// "Upgrade" header is used and stream id is 1
doTestIssue1394_SchemeHttp("1", HttpProtocol.HTTP11, HttpProtocol.H2C);
}
@Test
void your_sha256_hash() {
// "Upgrade" header is used and stream id is 1
doTestIssue1394_SchemeHttp("1", HttpProtocol.HTTP11, HttpProtocol.H2, HttpProtocol.H2C);
}
@Test
void testIssue1394_SchemeHttpConfiguredHTTP11NegotiatedHTTP11() {
// there is no header with stream id information
doTestIssue1394_SchemeHttp("null", HttpProtocol.HTTP11);
}
@Test
void testIssue1394_SchemeHttpConfiguredHTTP11AndH2NegotiatedHTTP11() {
// there is no header with stream id information
doTestIssue1394_SchemeHttp("null", HttpProtocol.HTTP11, HttpProtocol.H2);
}
@SuppressWarnings("deprecation")
private void doTestIssue1394_SchemeHttp(String expectedStreamId, HttpProtocol... protocols) {
disposableServer =
createServer()
.host("localhost")
.protocol(HttpProtocol.HTTP11, HttpProtocol.H2C)
.handle((req, res) -> res.sendString(Mono.just("testIssue1394")))
.bindNow(Duration.ofSeconds(30));
ProtocolSslContextSpec clientCtx;
if (protocols.length == 1 && protocols[0] == HttpProtocol.HTTP11) {
clientCtx = Http11SslContextSpec.forClient();
}
else {
clientCtx = Http2SslContextSpec.forClient();
}
HttpClient.create()
.protocol(protocols)
.secure(spec -> spec.sslContext(clientCtx))
.wiretap(true)
.get()
.uri("path_to_url" + disposableServer.port() + "/")
.responseSingle((res, bytes) -> Mono.just(res.responseHeaders().get("x-http2-stream-id", "null")))
.as(StepVerifier::create)
.expectNext(expectedStreamId)
.expectComplete()
.verify(Duration.ofSeconds(30));
}
@Test
void testIssue1394_SchemeHttpsConfiguredH2NegotiatedH2() {
doTestIssue1394_SchemeHttps(s -> !"null".equals(s), HttpProtocol.H2);
}
@Test
void testIssue1394_SchemeHttpsConfiguredH2AndH2CNegotiatedH2() {
doTestIssue1394_SchemeHttps(s -> !"null".equals(s), HttpProtocol.H2, HttpProtocol.H2C);
}
@Test
void your_sha256_hash() {
doTestIssue1394_SchemeHttps(s -> !"null".equals(s), HttpProtocol.HTTP11, HttpProtocol.H2, HttpProtocol.H2C);
}
@Test
void testIssue1394_SchemeHttpsConfiguredH2AndHTTP11NegotiatedH2() {
doTestIssue1394_SchemeHttps(s -> !"null".equals(s), HttpProtocol.HTTP11, HttpProtocol.H2);
}
@Test
void testIssue1394_SchemeHttpsConfiguredHTTP11NegotiatedHTTP11() {
doTestIssue1394_SchemeHttps("null"::equals, HttpProtocol.HTTP11);
}
@Test
void testIssue1394_SchemeHttpsConfiguredHTTP11AndH2CNegotiatedHTTP11() {
doTestIssue1394_SchemeHttps("null"::equals, HttpProtocol.HTTP11, HttpProtocol.H2C);
}
private static void doTestIssue1394_SchemeHttps(Predicate<String> predicate, HttpProtocol... protocols) {
HttpClient.create()
.protocol(protocols)
.wiretap(true)
.get()
.uri("path_to_url")
.responseSingle((res, bytes) -> Mono.just(res.responseHeaders().get("x-http2-stream-id", "null")))
.as(StepVerifier::create)
.expectNextMatches(predicate)
.expectComplete()
.verify(Duration.ofSeconds(30));
}
@Test
void testIssue1394_SchemeHttpConfiguredH2() {
doTestIssue1394_ProtocolSchemeNotCompatible(HttpProtocol.H2, "http", H2_WITHOUT_TLS_CLIENT);
}
@Test
void testIssue1394_SchemeHttpsConfiguredH2C() {
doTestIssue1394_ProtocolSchemeNotCompatible(HttpProtocol.H2C, "https", H2C_WITH_TLS_CLIENT);
}
private static void doTestIssue1394_ProtocolSchemeNotCompatible(HttpProtocol protocol, String scheme, String expectedMessage) {
HttpClient.create()
.protocol(protocol)
.wiretap(true)
.get()
.uri(scheme + "://example.com")
.responseSingle((res, bytes) -> Mono.just(res.responseHeaders().get("x-http2-stream-id")))
.as(StepVerifier::create)
.expectErrorMessage(expectedMessage)
.verify(Duration.ofSeconds(30));
}
/*
* path_to_url
*/
@Test
void testTooManyPermitsReturned_DefaultPool() {
testTooManyPermitsReturned(createClient(() -> disposableServer.address()));
}
/*
* path_to_url
*/
@Test
void testTooManyPermitsReturned_CustomPool() {
ConnectionProvider provider = ConnectionProvider.create("testTooManyPermitsReturned_CustomPool", 2);
try {
testTooManyPermitsReturned(createClient(provider, () -> disposableServer.address()));
}
finally {
provider.disposeLater()
.block(Duration.ofSeconds(5));
}
}
@SuppressWarnings("deprecation")
private void testTooManyPermitsReturned(HttpClient client) {
Http2SslContextSpec serverCtx = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
Http2SslContextSpec clientCtx =
Http2SslContextSpec.forClient()
.configure(builder -> builder.trustManager(InsecureTrustManagerFactory.INSTANCE));
disposableServer =
createServer()
.protocol(HttpProtocol.H2)
.secure(sslContextSpec -> sslContextSpec.sslContext(serverCtx))
.handle((req, res) -> res.sendString(Mono.just("testTooManyPermitsReturned")))
.bindNow();
HttpClient newClient =
client.secure(sslContextSpec -> sslContextSpec.sslContext(clientCtx))
.protocol(HttpProtocol.H2);
IntStream.range(0, 10)
.forEach(index ->
newClient.get()
.uri("/")
.responseContent()
.aggregate()
.asString()
.as(StepVerifier::create)
.expectNext("testTooManyPermitsReturned")
.expectComplete()
.verify(Duration.ofSeconds(30)));
}
@Test
void testIssue1789() throws Exception {
doTestMaxActiveStreams(HttpClient.create(), 1, 1, 1, 2, 0);
}
@Test
void testPR2659_SchemeHttpConfiguredNoSsl() {
doTestPR2659_SchemeHttp("1");
}
private void doTestPR2659_SchemeHttp(String expectedStreamId) {
disposableServer =
createServer()
.host("localhost")
.protocol(HttpProtocol.HTTP11, HttpProtocol.H2C)
.handle((req, res) -> res.sendString(Mono.just("testPR2659")))
.bindNow(Duration.ofSeconds(30));
HttpClient.create()
.protocol(HttpProtocol.HTTP11, HttpProtocol.H2, HttpProtocol.H2C)
.wiretap(true)
.get()
.uri("path_to_url" + disposableServer.port() + "/")
.responseSingle((res, bytes) -> Mono.just(res.responseHeaders().get("x-http2-stream-id", "null")))
.as(StepVerifier::create)
.expectNext(expectedStreamId)
.expectComplete()
.verify(Duration.ofSeconds(30));
}
@Test
void testPR2659_SchemeHttpsConfiguredWithSsl() {
doTestPR2659_SchemeHttps(s -> !"null".equals(s));
}
@SuppressWarnings("deprecation")
private static void doTestPR2659_SchemeHttps(Predicate<String> predicate) {
HttpClient.create()
.protocol(HttpProtocol.HTTP11, HttpProtocol.H2, HttpProtocol.H2C)
.secure(sslContextSpec -> sslContextSpec.sslContext(Http2SslContextSpec.forClient()))
.wiretap(true)
.get()
.uri("path_to_url")
.responseSingle((res, bytes) -> Mono.just(res.responseHeaders().get("x-http2-stream-id", "null")))
.as(StepVerifier::create)
.expectNextMatches(predicate)
.expectComplete()
.verify(Duration.ofSeconds(30));
}
@ParameterizedTest
@MethodSource("h2cCompatibleCombinations")
void testMaxStreamsH2C(HttpProtocol[] serverProtocols, HttpProtocol[] clientProtocols) {
ConnectionProvider provider = ConnectionProvider.create("testMaxStreamsH2C", 1);
try {
doTestMaxStreams(createServer().protocol(serverProtocols),
createClient(provider, () -> disposableServer.address()).protocol(clientProtocols));
}
finally {
provider.disposeLater().block(Duration.ofSeconds(5));
}
}
@ParameterizedTest
@MethodSource("h2CompatibleCombinations")
@SuppressWarnings("deprecation")
void testMaxStreamsH2(HttpProtocol[] serverProtocols, HttpProtocol[] clientProtocols) {
Http2SslContextSpec serverCtx = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
Http2SslContextSpec clientCtx =
Http2SslContextSpec.forClient()
.configure(builder -> builder.trustManager(InsecureTrustManagerFactory.INSTANCE));
ConnectionProvider provider = ConnectionProvider.create("testMaxStreamsH2", 1);
try {
doTestMaxStreams(createServer().protocol(serverProtocols).secure(spec -> spec.sslContext(serverCtx)),
createClient(provider, () -> disposableServer.address()).protocol(clientProtocols).secure(spec -> spec.sslContext(clientCtx)));
}
finally {
provider.disposeLater().block(Duration.ofSeconds(5));
}
}
private void doTestMaxStreams(HttpServer server, HttpClient client) {
Sinks.One<String> goAwaySent = Sinks.one();
disposableServer =
server.childObserve((conn, state) -> {
if (state == CONFIGURED) {
Http2FrameCodec http2FrameCodec = conn.channel().parent().pipeline().get(Http2FrameCodec.class);
Http2Connection.Listener goAwayFrameListener = Mockito.mock(Http2Connection.Listener.class);
Mockito.doAnswer(invocation -> {
goAwaySent.tryEmitValue("goAwaySent");
return null;
})
.when(goAwayFrameListener)
.onGoAwaySent(Mockito.anyInt(), Mockito.anyLong(), Mockito.any());
http2FrameCodec.connection().addListener(goAwayFrameListener);
}
})
.http2Settings(spec -> spec.maxStreams(2))
.handle((req, res) -> res.sendString(Mono.just("doTestMaxStreams")))
.bindNow();
Flux.range(0, 2)
.flatMap(i ->
client.get()
.uri("/")
.responseSingle((res, bytes) -> bytes.asString()))
.collectList()
.zipWith(goAwaySent.asMono())
.as(StepVerifier::create)
.assertNext(t -> assertThat(t.getT1()).isNotNull().hasSize(2).allMatch("doTestMaxStreams"::equals))
.expectComplete()
.verify(Duration.ofSeconds(10));
}
@ParameterizedTest
@MethodSource("h2cCompatibleCombinations")
void testEmptyDataFrameH2C(HttpProtocol[] serverProtocols, HttpProtocol[] clientProtocols) {
doTestEmptyDataFrame(createServer().protocol(serverProtocols),
createClient(() -> disposableServer.address()).protocol(clientProtocols));
}
@ParameterizedTest
@MethodSource("h2CompatibleCombinations")
@SuppressWarnings("deprecation")
void testEmptyDataFrameH2(HttpProtocol[] serverProtocols, HttpProtocol[] clientProtocols) {
Http2SslContextSpec serverCtx = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
Http2SslContextSpec clientCtx =
Http2SslContextSpec.forClient()
.configure(builder -> builder.trustManager(InsecureTrustManagerFactory.INSTANCE));
doTestEmptyDataFrame(createServer().protocol(serverProtocols).secure(spec -> spec.sslContext(serverCtx)),
createClient(() -> disposableServer.address()).protocol(clientProtocols).secure(spec -> spec.sslContext(clientCtx)));
}
private void doTestEmptyDataFrame(HttpServer server, HttpClient client) {
disposableServer =
// Intentionality sends Flux with empty strings as we want to have
// OUTBOUND HEADERS(endStream=false) followed by OUTBOUND DATA(endStream=true length=0)
server.handle((req, res) -> res.sendString(Flux.just("", "")))
.bindNow();
String expectation = "EMPTY";
client.get()
.uri("/")
.response((res, bytes) -> bytes.defaultIfEmpty(Unpooled.wrappedBuffer(expectation.getBytes(Charset.defaultCharset()))))
.as(StepVerifier::create)
.expectNextMatches(buf -> expectation.equals(buf.toString(Charset.defaultCharset())))
.expectComplete()
.verify(Duration.ofSeconds(10));
}
}
```
|
To be distinguished from the painter Juan de la Abadía the elder
Juan de la Abadia ( 15th century) was a marrano who engaged in a project to subvert the Inquisition in Aragon; failing in this, he joined in a plot to assassinate the inquisitor Pedro de Arbués, who was wounded on September 15, 1485, and died two days later. De la Abadia was apprehended, and, according to Heinrich Graetz, committed suicide in prison. However, Meyer Kayserling states that his attempt at suicide was unsuccessful, and that he was drawn, quartered, and consigned to the flames.
Notes
15th-century Sephardi Jews
Conversos
|
Baccle's Farm is a town in Chris Hani District Municipality in the Eastern Cape province of South Africa.
References
Populated places in the Enoch Mgijima Local Municipality
|
The Bradford Shoe Company Building, also known as the Neilston Building, is a historic building in Downtown Columbus, Ohio. It was listed on the National Register of Historic Places in 1994. The four-story building has three distinct parts, built at separate times. The eastern section was built before 1899, while the middle portion was built between 1899 and 1910, and the westernmost around 1910. The Bradford Shoe Company was founded in 1908, and commissioned the westernmost section's construction.
See also
National Register of Historic Places listings in Columbus, Ohio
References
Buildings and structures in Downtown Columbus, Ohio
Commercial buildings completed in 1899
Commercial buildings on the National Register of Historic Places in Ohio
National Register of Historic Places in Columbus, Ohio
|
```objective-c
/*
*/
#ifndef _INTEL_SELFTEST_SCHEDULER_HELPERS_H_
#define _INTEL_SELFTEST_SCHEDULER_HELPERS_H_
#include <linux/types.h>
struct i915_request;
struct intel_engine_cs;
struct intel_gt;
struct intel_selftest_saved_policy {
u32 flags;
u32 reset;
u64 timeslice;
u64 preempt_timeout;
};
enum selftest_scheduler_modify {
SELFTEST_SCHEDULER_MODIFY_NO_HANGCHECK = 0,
SELFTEST_SCHEDULER_MODIFY_FAST_RESET,
};
struct intel_engine_cs *intel_selftest_find_any_engine(struct intel_gt *gt);
int intel_selftest_modify_policy(struct intel_engine_cs *engine,
struct intel_selftest_saved_policy *saved,
enum selftest_scheduler_modify modify_type);
int intel_selftest_restore_policy(struct intel_engine_cs *engine,
struct intel_selftest_saved_policy *saved);
int intel_selftest_wait_for_rq(struct i915_request *rq);
#endif
```
|
Marie Catherine Colvin (January 12, 1956 – February 22, 2012) was an American journalist who worked as a foreign affairs correspondent for the British newspaper The Sunday Times from 1985 until her death. She was one of the most prominent war correspondents of her generation, widely recognized for her extensive coverage on the frontlines of various conflicts across the globe. On February 22, 2012, Colvin was killed in an attack made by Syrian government forces, while she was covering the siege of Homs alongside the French photojournalist Remi Ochlik.
After her death, Stony Brook University established the Marie Colvin Center for International Reporting in her honor. Her family also established the Marie Colvin Memorial Fund through the Long Island Community Foundation, which strives to give donations in Marie's name in honor of her humanitarianism.
In July 2016, lawyers representing Colvin's family filed a civil action against the Syrian Arab Republic in the US District Court for the District of Columbia, claiming they had obtained proof that the Syrian government had directly ordered her assassination. In a verdict issued in 2019, the Columbia District Court found the Assad regime guilty of "extrajudicial killing", terming it as an "unconscionable crime" deliberately committed by the government, and mandated Syria to pay Colvin's family $302 million in compensation for the damages.
Early life and education
Marie Colvin was born in Astoria, Queens, New York, and grew up in East Norwich in the town of Oyster Bay, Nassau County, on Long Island. Her father, William J. Colvin, was a Marine Corps veteran of WWII and an English teacher in New York City public schools. He was also active in Democratic politics in Nassau County. He served as Deputy County Executive under Eugene Nickerson. Her mother, Rosemarie Marron Colvin, was a high school guidance counselor in Long Island public schools. She had two brothers, William and Michael, and two sisters, Aileen and Catherine. She graduated from Oyster Bay High School in 1974, spending her junior year of high school abroad on an exchange program in Brazil and later attended Yale University. She was an anthropology major but took a course with the Pulitzer Prize-winning writer John Hersey.
Colvin also started writing for the Yale Daily News "and decided to be a journalist," her mother said. She graduated with a bachelor's degree in anthropology in 1978. During her time at Yale, Colvin was known for her strong personality and quickly established herself as a "noise-maker" on campus.
Career
Colvin worked briefly for a labor union in New York City, before starting her journalism career with United Press International (UPI), a year after graduating from Yale. She worked for UPI first in Trenton, then New York and Washington. In 1984, Colvin was appointed Paris bureau manager for UPI, before moving to The Sunday Times in 1985.
From 1986, she was the newspaper's Middle East correspondent, and then from 1995 was the Foreign Affairs correspondent. In 1986, she was the first to interview Libyan leader Muammar Gaddafi after Operation El Dorado Canyon. Gaddafi said in this interview that he was at home when U.S. planes bombed Tripoli in April 1986, and that he helped rescue his wife and children while "the house was coming down around us". Gaddafi also said reconciliation between Libya and the United States was impossible so long as Ronald Reagan was in the White House. "I have nothing to say to him (Reagan)", he said, "because he is mad. He is foolish. He is an Israeli dog."
In May 1988, Colvin made an extended appearance on the Channel 4 discussion programme After Dark, alongside Anton Shammas, Gerald Kaufman, Moshe Amirav, Nadia Hijab and others.
Specialising in the Middle East, she also covered conflicts in Chechnya, Serbia, Sierra Leone, Zimbabwe, Sri Lanka and East Timor. In 1999 in East Timor, she was credited with saving the lives of 1,500 women and children from a compound besieged by Indonesian-backed forces. Refusing to abandon them, she stayed with a United Nations force, reporting in her newspaper and on television. They were evacuated after four days. She won the International Women's Media Foundation award for Courage in Journalism for her coverage of Kosovo and Chechnya. She wrote and produced documentaries, including Arafat: Behind the Myth for the BBC. She is featured in the 2005 documentary film Bearing Witness.
Colvin lost the sight in her left eye while reporting on the Sri Lankan Civil War. She was struck by a blast from a Sri Lankan Army rocket-propelled grenade (RPG) on April 16, 2001, while crossing from a Tamil Tigers-controlled area to a Government-controlled area; thereafter she wore an eyepatch. She was attacked even after calling out "journalist, journalist!" She told Lindsey Hilsum of Channel 4 News that her attacker "knew what he was doing." Despite sustaining serious injuries, Colvin, who was 45 at the time, managed to write a 3,000 word article on time to meet the deadline. She had walked over through the Vanni jungle with her Tamil guides to evade government troops; she reported on the humanitarian disaster in the northern Tamil region, including a government blockade of food, medical supplies and prevention of foreign journalist access to the area for six years to cover the war. Colvin later suffered post traumatic stress disorder and required hospitalisation following her injuries.
She was also a witness and an intermediary during the final days of the war in Sri Lanka and reported on war crimes against Tamils that were committed during this phase. Several days after her wounding, the Sri Lankan government said it would allow foreign journalists to travel in rebel-held zones. The director of Government information, Ariya Rubasinghe, stated that: "Journalists can go, we have not debarred them, but they must be fully aware of and accept the risk to their lives."
In 2011, while reporting on the Arab Spring in Tunisia, Egypt and Libya, she was offered an opportunity to interview Gaddafi again, along with two other journalists that she could nominate. For Gaddafi's first international interview since the start of the war, Colvin took along Christiane Amanpour of ABC News and Jeremy Bowen of BBC News.
Colvin noted the importance of shining a light on "humanity in extremes, pushed to the unendurable", stating: "My job is to bear witness. I have never been interested in knowing what make of plane had just bombed a village or whether the artillery that fired at it was 120mm or 155mm."
Personal life
Colvin twice married journalist Patrick Bishop; both marriages ended in divorce. She also married a Bolivian journalist, Juan Carlos Gumucio, a correspondent for the Spanish newspaper El País in Beirut during the Lebanese civil war. He took his own life in February 2002 in Bolivia, following depression and alcoholism.
Colvin lived in Hammersmith, West London.
Death
In February 2012, Colvin crossed into Syria on the back of a motocross motorcycle, ignoring the Syrian government's attempts to prevent foreign journalists from entering Syria to cover the Syrian Civil War without authorization. Colvin was stationed in the western Baba Amr district of the city of Homs. Upon arriving the city, she was welcomed by local activists keen to reveal the ongoing destruction of Homs to the world. Colvin reported that pro-Assad forces were repeatedly firing on her car with grenades and machine guns, forcing her to take cover in emptied buildings. In her last article published in the Sunday Times on 19 February 2012, Colvin wrote: "The scale of human tragedy in the city is immense. The inhabitants are living in terror. Almost every family seems to have suffered the death or injury of a loved one."
Colvin made her last broadcast on the evening of February 21, appearing on the BBC, Channel 4, CNN and ITN News via satellite phone. She described "merciless" shelling and sniper attacks against civilian buildings and people on the streets of Homs by Syrian forces, expressing immense shock at the utter disregard of the government troops for the lives of the city residents. Speaking to Anderson Cooper hours before her death, Colvin described the bombardment of Homs as the worst conflict she had ever experienced. Reporting on her situation, Colvin told Cooper: "Every civilian house on this street has been hit. We're talking about a very poor popular neighborhood. The top floor of the building I'm in has been hit, in fact, totally destroyed. There are no military targets here... There are rockets, shells, tank shells, anti-aircraft being fired in parallel lines into the city. The Syrian Army is simply shelling a city of cold, starving civilians."
Alongside photojournalist Rémi Ochlik, Colvin was killed by direct shelling and rocket attacks from security forces directed at their temporary media center on February 22. Another photographer, Paul Conroy, and French journalist Edith Bouvier of Le Figaro were also injured during the attacks. The nature of the attacks arose suspicions that the Syrian government deliberately bombed the safehouses of the journalists through satellite tracking. Nine other individuals were also killed as a result of the attacks.
An autopsy conducted in Damascus by the Syrian government claimed that Colvin was killed by an "improvised explosive device filled with nails". This account was rejected by photographer Paul Conroy, who was with Colvin and Ochlik and survived the attack. Conroy recalled that Colvin and Ochlik were packing their gear when Syrian artillery fire hit their media centre.
Reactions
Journalist Jean-Pierre Perrin and other sources reported that the building had been targeted by the Syrian Army, identified using satellite phone signals. Their team had been planning an exit strategy a few hours prior.
On the evening of February 22, 2012, people of Homs mourned in the streets in honour of Colvin and Ochlik. Tributes were paid to Colvin across the media industry and political world following her death.
Colvin's personal possessions came with her. This included a backpack containing basic supplies and a 387-page manuscript by her lifelong friend, Gerald Weaver. Colvin's sister, Cathleen 'Cat' Colvin along with Sean Ryan, then foreign editor of The Sunday Times, helped to have his book published.
Colvin's funeral took place in Oyster Bay, New York, on March 12, 2012, in a service attended by 300 mourners, including those who had followed her dispatches, friends and family. She was cremated and half of her ashes were scattered off Long Island, and the other half on the River Thames, near her last home.
Civil lawsuit
In July 2016, Cat Colvin filed a civil action against the government of the Syrian Arab Republic for extrajudicial killing claiming she had obtained proof that the Syrian government had directly ordered Colvin's targeted assassination. In April 2018, the accusations were revealed on court papers filed by her family. In January 2019, an American court ruled that the Syrian government was liable for Colvin's death and ordered that they pay $300m in punitive damages. The judgement stated that Colvin was "specifically targeted because of her profession, for the purpose of silencing those reporting on the growing opposition movement in the country. [The] murder of journalists acting in their professional capacity could have a chilling effect on reporting such events worldwide. A targeted murder of an American citizen, whose courageous work was not only important, but vital to our understanding of war zones and of wars generally, is outrageous, and therefore a punitive damages award that multiples the impact on the responsible state is warranted."
In popular culture
In 2018, a film based on Colvin's life, A Private War, directed by Matthew Heineman, written by Arash Amel, and starring Rosamund Pike as Colvin, was released, based on the 2012 article "Marie Colvin's Private War" in Vanity Fair magazine by Marie Brenner. While being interviewed in 2021, Chris Terrio, who wrote the film Batman v Superman: Dawn of Justice, stated that Lois Lane's arc in the film was inspired by Colvin.
Awards
2000 – Journalist of the Year, Foreign Press Association
2000 – Courage in Journalism, International Women's Media Foundation
2001 – Foreign Reporter of the Year, British Press Awards
2009 – Foreign Reporter of the Year, British Press Awards
2012 – Anna Politkovskaya Award, Reach All Women in War (RAW in WAR)
2012 – Foreign Reporter of the Year, British Press Awards
See also
List of journalists killed during the Syrian civil war
Girls of the Sun, a 2018 French film with the main protagonist inspired by Marie Colvin
A Private War, a 2018 American biographical film about Marie Colvin
Foreign Sovereign Immunities Act
The Intercept: Review of In Extremis ; photograph by Simon Townsley
References
Further reading
"On the Front Line: The Collected Journalism of Marie Colvin". HarperCollins Publishers,
External links
mariecolvin.org
|-
1956 births
2012 deaths
20th-century American women journalists
20th-century American journalists
21st-century women journalists
American expatriates in England
American newspaper reporters and correspondents
American women war correspondents
American writers with disabilities
Journalists killed in Syria
Journalists killed while covering the Syrian civil war
People from Astoria, Queens
People from Oyster Bay (town), New York
The Sunday Times people
War correspondents of the Syrian civil war
Women in 21st-century warfare
Yale College alumni
Eyepatch wearers
|
Francisco de Figueroa may refer to:
Francisco de Figueroa (bishop) (1634–1691), Spanish Roman Catholic bishop
Francisco de Figueroa (poet) (1530–1588), Spanish poet
Francisco Acuña de Figueroa (1791–1862), Uruguayan poet and writer
|
The Infrared Data Association (IrDA) is an industry-driven interest group that was founded in 1994 by around 50 companies. IrDA provides specifications for a complete set of protocols for wireless infrared communications, and the name "IrDA" also refers to that set of protocols. The main reason for using the IrDA protocols had been wireless data transfer over the "last one meter" using point-and-shoot principles. Thus, it has been implemented in portable devices such as mobile telephones, laptops, cameras, printers, and medical devices. The main characteristics of this kind of wireless optical communication are physically secure data transfer, line-of-sight (LOS) and very low bit error rate (BER) that makes it very efficient.
Specifications
IrPHY
The mandatory IrPHY (Infrared Physical Layer Specification) is the physical layer of the IrDA specifications. It comprises optical link definitions, modulation, coding, cyclic redundancy check (CRC) and the framer. Different data rates use different modulation/coding schemes:
SIR: 9.6–115.2 kbit/s, asynchronous, RZI, UART-like, 3/16 pulse. To save energy, the pulse width is often minimized to 3/16 of a 115.2KBAUD pulse width.
MIR: 0.576–1.152 Mbit/s, RZI, 1/4 pulse, HDLC bit stuffing
FIR: 4 Mbit/s, 4PPM
VFIR: 16 Mbit/s, NRZ, HHH(1,13)
UFIR: 96 Mbit/s, NRZI, 8b/10b
GigaIR: 512 Mbit/s – 1 Gbit/s, NRZI, 2-ASK, 4-ASK, 8b/10b
Further characteristics are:
Range:
standard: 2 m;
low-power to low-power: 0.2 m;
standard to low-power: 0.3 m.
The 10 GigaIR also define new usage models that supports higher link distances up to several meters.
Angle: minimum cone ±15°
Speed: 2.4 kbit/s to 1 Gbit/s
Modulation: baseband, no carrier
Infrared window (part of the device body transparent to infrared light beam)
Wavelength: 850–900 nm
The frame size depends on the data rate mostly and varies between 64 B and 64 kB. Additionally, bigger blocks of data can be transferred by sending multiple frames consecutively. This can be adjusted with a parameter called "window size" (1–127). Finally, data blocks up to 8 MB can be sent at once. Combined with a low bit error rate of generally <, that communication could be very efficient compared to other wireless solutions.
IrDA transceivers communicate with infrared pulses (samples) in a cone that extends at least 15 degrees half angle off center. The IrDA physical specifications require the lower and upper limits of irradiance such that a signal is visible up to one meter away, but a receiver is not overwhelmed with brightness when a device comes close. In practice, there are some devices on the market that do not reach one meter, while other devices may reach up to several meters. There are also devices that do not tolerate extreme closeness. The typical sweet spot for IrDA communications is from away from a transceiver, in the center of the cone. IrDA data communications operate in half-duplex mode because while transmitting, a device's receiver is blinded by the light of its own transmitter, and thus full-duplex communication is not feasible. The two devices that communicate simulate full-duplex communication by quickly turning the link around. The primary device controls the timing of the link, but both sides are bound to certain hard constraints and are encouraged to turn the link around as fast as possible.
IrLAP
The mandatory IrLAP (Infrared Link Access Protocol) is the second layer of the IrDA specifications. It lies on top of the IrPHY layer and below the IrLMP layer. It represents the data link layer of the OSI model.
The most important specifications are:
Access control
Discovery of potential communication partners
Establishing of a reliable bidirectional connection
Distribution of the primary/secondary device roles
Negotiation of QoS parameters
On the IrLAP layer the communicating devices are divided into a "primary device" and one or more "secondary devices". The primary device controls the secondary devices. Only if the primary device requests a secondary device to send, is it allowed to do so.
IrLMP
The mandatory IrLMP (Infrared Link Management Protocol) is the third layer of the IrDA specifications. It can be broken down into two parts.
First, the LM-MUX (Link Management Multiplexer), which lies on top of the IrLAP layer. Its most important achievements are:
Provides multiple logical channels
Allows change of primary/secondary devices
Second, the LM-IAS (Link Management Information Access Service), which provides a list, where service providers can register their services so other devices can access these services by querying the LM-IAS.
Tiny TP
The optional Tiny TP (Tiny Transport Protocol) lies on top of the IrLMP layer. It provides:
Transportation of large messages by SAR (Segmentation and Reassembly)
Flow control by giving credits to every logical channel
IrCOMM
The optional IrCOMM (Infrared Communications Protocol) lets the infrared device act like either a serial or parallel port. It lies on top of the IrLMP layer.
OBEX
The optional OBEX (Object Exchange) provides the exchange of arbitrary data objects (e.g., vCard, vCalendar or even applications) between infrared devices. It lies on top of the Tiny TP protocol, so Tiny TP is mandatory for OBEX to work.
IrLAN
The optional IrLAN (Infrared Local Area Network) provides the possibility to connect an infrared device to a local area network. There are three possible methods:
Access point
Peer-to-peer
Hosted
As IrLAN lies on top of the Tiny TP protocol, the Tiny TP protocol must be implemented for IrLAN to work.
IrSimple
IrSimple achieves at least four to ten times faster data transmission speeds by improving the efficiency of the infrared IrDA protocol. A 500 KB normal picture from a cell phone can be transferred within one second.
IrSimpleShot
One of the primary targets of IrSimpleShot (IrSS) is to allow the millions of IrDA-enabled camera phones to wirelessly transfer pictures to printers, printer kiosks and flat-panel TVs.
Infrared Financial Messaging
Infrared Financial Messaging (IrFM) is a wireless payment standard developed by the Infrared Data Association. It was thought to be logical because of the excellent privacy of IrDA, which does not pass through walls.
Power meters
Many modern (2021) implementations are used for semi-automated reading of power meters. This high-volume application is keeping IrDA transceivers in production. Lacking specialized electronics, many power meter implementations utilize a bit-banged SIR phy, running at 9600 BAUD using a minimum-width pulse (i.e. 3/16 of a 115.2KBAUD pulse) to save energy. To drive the LED, a computer-controlled pin is turned on and off at the right time. Cross-talk from the LED to the receiving PIN diode is extreme, so the protocol is half-duplex. To receive, an external interrupt bit is started by the start bit, then polled a half-bit time after following bits. A timer interrupt is often used to free the CPU between pulses. Power meters' higher protocol levels abandon IrDA standards, typically using DLMS/COSEM instead. With IrDA transceivers (a package combining an IR LED and PIN diode), even this crude IrDA SIR is extremely resistant to external optical noise from incandescents, sunlight, etc.
Reception
IrDA was popular on PDAs, laptops and some desktops from the late 1990s through the early 2000s. However, it has been displaced by other wireless technologies such as Bluetooth, and Wi-Fi, favored because they don't need a direct line of sight and can therefore support hardware like mice and keyboards. It is still used in some environments where interference makes radio-based wireless technologies unusable.
An attempt was made to revive IrDA around 2005 with IrSimple protocols by providing sub-1-second transfers of pictures between cell phones, printers, and display devices. IrDA hardware was still less expensive and didn't share the same security problems encountered with wireless technologies such as Bluetooth. For example, some Pentax DSLRs (K-x, K-r) incorporated IrSimple for image transfer and gaming.
See also
Consumer IR
Li-Fi
List of device bandwidths
RZI
References
Further reading
IrDA Principles and Protocols; Knutson and Brown; MCL Press; 214 pages; 2004; .
External links
Official
List of official specifications
Other
Linux Infrared HOWTO
Linux Infrared Remote Control
Linux status of infrared devices (IrDA, ConsumerIR, Remote Control)
IrDA project of Universidad Nacional de Colombia SIE board
Standards organizations in the United States
Organizations based in California
|
Neurolathyrism, is a neurological disease of humans, caused by eating certain legumes of the genus Lathyrus. This disease is mainly associated with the consumption of Lathyrus sativus (also known as grass pea, chickling pea, kesari dal, or almorta) and to a lesser degree with Lathyrus cicera, Lathyrus ochrus and Lathyrus clymenum containing the toxin ODAP.
This is not to be confused with osteolathyrism, a different type of lathyrism that affects the connective tissues. Osteolathyrism results from the ingestion of Lathyrus odoratus seeds (sweet peas) and is often referred to as odoratism. It is caused by a different toxin (beta-aminopropionitrile) which affects the linking of collagen, a protein of connective tissues.
Another type of lathyrism is angiolathyrism which is similar to osteolathyrism in its effects on connective tissue. However, the blood vessels are affected as opposed to bone.
Signs and symptoms
The consumption of large quantities of Lathyrus seeds containing high concentrations of the neurotoxic glutamate analogue β-oxalyl-L-α,β-diaminopropionic acid (ODAP, also known as β-N-oxalyl-amino-L-alanine, or BOAA) causes paralysis, characterized by lack of strength in or inability to move the lower limbs, and may involve pyramidal tracts, producing signs of upper motor neuron damage. The toxin may also cause aortic aneurysm. A unique symptom of lathyrism is the atrophy of gluteal (buttocks) muscles. ODAP is a poison of the mitochondria, leading to excess cell death, especially in motor neurons. Children can additionally develop bone deformity and reduced brain development.
Related conditions
A related disease has been identified and named osteolathyrism, because it affects the bones and connecting tissues, instead of the nervous system. It is a skeletal disorder, caused by the toxin beta-aminopropionitrile (BAPN), and characterized by hernias, aortic dissection, exostoses, and kyphoscoliosis and other skeletal deformities, apparently as the result of defective aging of collagen tissue. The cause of this disease is attributed to beta-aminopropionitrile, which inhibits the copper-containing enzyme lysyl oxidase, responsible for cross-linking procollagen and proelastin. BAPN is also a metabolic product of a compound present in sprouts of grasspea, pea and lentils. Disorders that are clinically similar are konzo and lytico-bodig disease.
Causes
The toxicological cause of the disease has been attributed to the neurotoxin ODAP which acts as a structural analogue of the neurotransmitter glutamate. Lathyrism can also be caused by deliberate food adulteration.
Association with famine
Ingestion of legumes containing the toxin occurs despite an awareness of the means to detoxify Lathyrus. Drought conditions can lead to shortages of both fuel and water, preventing the necessary detoxification steps from being taken, particularly in impoverished countries. Lathyrism usually occurs where the combination of poverty and food insecurity leaves few other food options.
Diagnosis
There are no diagnostic criteria for neurolathyrism. Diagnosis is based on clinical features and exclusion of other diagnoses.
Prevention
Eating the chickling pea with legumes having high concentrations of sulphur-based amino acids reduces the risk of lathyrism if such grain is available. Food preparation is also an important factor. Toxic amino acids are readily soluble in water and can be leached. Bacterial (lactic acid) and fungal (tempeh) fermentation is useful to reduce ODAP content. Moist heat (boiling, steaming) denatures protease inhibitors which otherwise add to the toxic effect of raw chickling pea through depletion of protective sulfur amino acids. During drought and famine, water for steeping and fuel for boiling are often also in short supply. Poor people sometimes know how to reduce the chance of developing lathyrism but face a choice between starvation and risking lathyrism.
Epidemiology
This disease is prevalent in some areas of Bangladesh, Ethiopia, India and Nepal, and affects more men than women. Men between 25 and 40 are particularly vulnerable.
History
The first mentioned intoxication goes back to ancient India and also Hippocrates mentions a neurological disorder 46 B.C. in Greece caused by Lathyrus seed.
During the Spanish War of Independence against Napoleon, grasspea served as a famine food. This was the subject of one of Francisco de Goya's famous aquatint prints titled Gracias a la Almorta ("Thanks to the Grasspea"), depicting poor people surviving on a porridge made from grasspea flour, one of them lying on the floor, already crippled by it.
During WWII, on the order of Colonel I. Murgescu, commandant of the Vapniarka concentration camp in Transnistria, the detainees - most of them Jews - were fed nearly exclusively with fodder pea. Consequently, they became ill from lathyrism.
Modern occurrence
During the post Civil war period in Spain, there were several outbreaks of lathyrism, caused by the shortage of food, which led people to consume excessive amounts of almorta flour.
In Spain, a seed mixture known as comuña consisting of Lathyrus sativus, L. cicera, Vicia sativa and V. ervilia provides a potent mixture of toxic amino acids to poison monogastric (single stomached) animals. Particularly the toxin β-cyanoalanine from seeds of V. sativa enhances the toxicity of such a mixture through its inhibition of sulfur amino acid metabolism (conversion of methionine to cysteine leading to excretion of cystathionine in urine) and hence depletion of protective reduced thiols. Its use for sheep does not pose any lathyrism problems if doses do not exceed 50 percent of the ration.
Ronald Hamilton suggested in his paper The Silent Fire: ODAP and the death of Christopher McCandless that itinerant traveler Christopher McCandless may have died from starvation after being unable to hunt or gather food due to lathyrism-induced paralysis of his legs caused by eating the seeds of Hedysarum alpinum. In 2014, a preliminary lab analysis indicated that the seeds did contain ODAP. However, a more detailed mass spectrometric analysis conclusively ruled out ODAP, with a molecular weight of 176.13 and lathyrism, and instead found that the most significant contributor to his death was the toxic action of L-canavanine, with a molecular weight of 176.00, which was found in significant quantity in the Hedysarum alpinum seeds he was eating.
References
External links
Detection of Toxic Lathyrus sativus flour in Gram Flour
Toxic effect of noxious substances eaten as food
Lathyrus
|
```html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Segment Concept</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="Chapter 1. Geometry">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="concept_ring.html" title="Ring Concept">
<link rel="next" href="../constants.html" title="Constants">
</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="concept_ring.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="../constants.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="geometry.reference.concepts.concept_segment"></a><a class="link" href="concept_segment.html" title="Segment Concept">Segment
Concept</a>
</h4></div></div></div>
<h6>
<a name="geometry.reference.concepts.concept_segment.h0"></a>
<span class="phrase"><a name="geometry.reference.concepts.concept_segment.description"></a></span><a class="link" href="concept_segment.html#geometry.reference.concepts.concept_segment.description">Description</a>
</h6>
<p>
The Segment Concept describes the requirements for a segment type. All
algorithms in Boost.Geometry will check any geometry arguments against
the concept requirements.
</p>
<h6>
<a name="geometry.reference.concepts.concept_segment.h1"></a>
<span class="phrase"><a name="geometry.reference.concepts.concept_segment.concept_definition"></a></span><a class="link" href="concept_segment.html#geometry.reference.concepts.concept_segment.concept_definition">Concept
Definition</a>
</h6>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag</span></code>
defining <code class="computeroutput"><span class="identifier">segment_tag</span></code>
as type
</li>
<li class="listitem">
there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">point_type</span></code>
to define the underlying point type (even if it does not consist of
points, it should define this type, to indicate the points it can work
with)
</li>
<li class="listitem">
there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">indexed_access</span></code>,
per index and per dimension, with two functions:
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<code class="computeroutput"><span class="identifier">get</span></code> to get a
coordinate value
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">set</span></code> to set a
coordinate value (this one is not checked for ConstSegment)
</li>
</ul></div>
</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>
The segment concept is similar to the box concept, defining using another
tag. However, the box concept assumes the index as <code class="computeroutput"><span class="identifier">min_corner</span></code>,
<code class="computeroutput"><span class="identifier">max_corner</span></code>, while for
the segment concept, there is no assumption.
</p></td></tr>
</table></div>
<h6>
<a name="geometry.reference.concepts.concept_segment.h2"></a>
<span class="phrase"><a name="geometry.reference.concepts.concept_segment.available_models"></a></span><a class="link" href="concept_segment.html#geometry.reference.concepts.concept_segment.available_models">Available
Models</a>
</h6>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<a class="link" href="../models/model_segment.html" title="model::segment">model::segment</a>
</li>
<li class="listitem">
<a class="link" href="../models/model_referring_segment.html" title="model::referring_segment">referring
segment</a>
</li>
</ul></div>
</div>
<table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
Gehrels, Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its
affiliates<p>
file LICENSE_1_0.txt or copy at <a href="path_to_url" target="_top">path_to_url
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="concept_ring.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="../constants.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
```
|
```xml
import {
DecryptedPayloadInterface,
DeletedPayloadInterface,
DeltaEmit,
EncryptedPayloadInterface,
FullyFormedPayloadInterface,
PayloadEmitSource,
} from '@standardnotes/models'
export type EmitQueue<P extends FullyFormedPayloadInterface> = QueueElement<P>[]
export type PayloadManagerChangeData = {
/** The payloads are pre-existing but have been changed */
changed: FullyFormedPayloadInterface[]
/** The payloads have been newly inserted */
inserted: FullyFormedPayloadInterface[]
/** The payloads have been deleted from local state (and remote state if applicable) */
discarded: DeletedPayloadInterface[]
/** Payloads for which encrypted overwrite protection is enabled and enacted */
ignored: EncryptedPayloadInterface[]
/** Payloads which were previously error decrypting but now successfully decrypted */
unerrored: DecryptedPayloadInterface[]
source: PayloadEmitSource
sourceKey?: string
}
export type PayloadsChangeObserverCallback = (data: PayloadManagerChangeData) => void
export type PayloadsChangeObserver = {
types: string[]
callback: PayloadsChangeObserverCallback
priority: number
}
export type QueueElement<P extends FullyFormedPayloadInterface = FullyFormedPayloadInterface> = {
emit: DeltaEmit
sourceKey?: string
resolve: (alteredPayloads: P[]) => void
}
```
|
Silvia Salis (born 17 September 1985 in Genoa) is a hammer thrower from Italy.
Biography
Her personal best throw is 71.93 metres, achieved in May 2011 in Savona. She is engaged to the writer and director Fausto Brizzi.
Achievements
National titles
She has won the individual national championship eight times.
3 wins in the discus throw (2010, 2011, 2012)
5 wins in the discus throw at the Italian Winter Throwing Championships (2009, 2010, 2011, 2012, 2014)
See also
Italian all-time lists - Hammer throw
References
External links
1985 births
Living people
Italian female hammer throwers
Italian people of Sardinian descent
Athletes (track and field) at the 2008 Summer Olympics
Athletes (track and field) at the 2012 Summer Olympics
Olympic athletes for Italy
Sportspeople from Genoa
World Athletics Championships athletes for Italy
Mediterranean Games gold medalists for Italy
Mediterranean Games bronze medalists for Italy
Athletes (track and field) at the 2009 Mediterranean Games
Mediterranean Games medalists in athletics
Athletics competitors of Fiamme Azzurre
Athletics competitors of Gruppo Sportivo Forestale
Competitors at the 2007 Summer Universiade
Competitors at the 2009 Summer Universiade
21st-century Italian women
|
Milton A. Waldor (September 28, 1924 – August 20, 1975) was an American Republican Party politician who served in the New Jersey State Senate from 1968 to 1972, representing Essex County in the 11th Legislative District.
Early life
Born in Newark, New Jersey, Waldor graduated from Weequahic High School and Rutgers Law School.
Prior to his becoming an attorney and politician, he had served in the Air Force as First Lieutenant. As such, Waldor was bombardier in the Tenth Air Force in the China Burma India Theater during World War II.
Waldor flew on 68 arduous missions bombing the Japanese installations in captured Burma. Many times his B-24 Liberator was the target for enemy fighter planes and anti-aircraft guns. Flying the China-Burma-India hump was always an extremely dangerous mission. For his bravery in action, Waldor was awarded the Distinguished Flying Cross, the Air Medal with Oak Leaf Cluster, the Nationalist China Award and other American medals. On his many missions he met and became friendly with General Claire Chennault, the leader of the Flying Tigers, who was later to become the commander of the U.S. Air Force in China. When Waldor left the Air Force to return to civilian life, he was a captain. He married and divorced shortly thereafter in the context of rumored domestic violence and undiagnosed post-traumatic stress disorder following from his active combat experience.
Elected office
An attorney from West Orange, Waldor was elected to the State Senate in 1967. He lost a bid for re-election to a second term in 1971. In 1972, he ran for the U.S. House of Representatives in New Jersey's 11th congressional district, but lost to incumbent Democrat Joseph Minish. He authored the book Peddlers of Fear that described the dangers of the extreme right that had been embodied by the John Birch Society in the early 1960s.
References
Politicians from Newark, New Jersey
People from West Orange, New Jersey
Politicians from Essex County, New Jersey
Republican Party New Jersey state senators
Rutgers Law School alumni
Weequahic High School alumni
1924 births
1975 deaths
20th-century American politicians
American expatriates in India
American military personnel of World War II
|
Qarah Jangal (, also Romanized as Qareh Jangal; also known as Qareh Jagal) is a village in Bizaki Rural District, Golbajar District, Chenaran County, Razavi Khorasan Province, Iran. At the 2006 census, its population was 480, in 118 families.
References
Populated places in Chenaran County
|
Universo is an American pay television channel owned by the NBCUniversal Telemundo Enterprises subsidiary of NBCUniversal. The network serves as a companion cable channel to the NBCUniversal's flagship broadcast television network NBC and, to some extent, its Spanish network Telemundo.
Aimed at Hispanic Adults between the ages of 18 and 49, the majority of its programming – which is tailored toward bilingual audiences – consists mainly of sports, scripted and reality series, and music programming. The network is headquartered in Miami Springs, Florida, while its master control operations are housed at the CNBC Global Headquarters in Englewood Cliffs, New Jersey, which serves as master control facilities for most of NBCUniversal's cable networks.
The network was founded by Empresas 1BC as GEMS Television. In 2001, the network was acquired by Telemundo and re-branded as mun2. The network was renamed NBC Universo in February 2015 to align it with Telemundo's sister English-language network NBC. , NBC Universo's programming was available to approximately 39.326 million pay television households (33.8% of cable, satellite and telco customers with at least one television set) in the United States.
Background
The network was launched on October 10, 1993, as GEMS Television, under founding owner Empresas 1BC. Cable television provider Cox Cable (now Cox Communications) acquired an ownership interest in the network the following year. The network's programming was aimed towards Latina women.
As mun2
In 2001, GEMS was purchased by the Telemundo Communications Group (then a joint venture led by Sony Pictures Entertainment and Liberty Media), and revamped its programming format to target younger viewers; it was renamed mun2, a name chosen to reflect the "two worlds" that Latino Americans live in (the name being a Spanish-language pun on "mundo" and the number 2, which is pronounced like "mundos" or "worlds").
Its initial lineup included programs from Telemundo's then sister company Columbia TriStar Television (now Sony Pictures Television), including repeats of Spanish language adaptations of Charlie's Angels (Angeles) and The Dating Game that had aired on Telemundo as part of a failed programming revamp in 1998 in an attempt to counterprogram its rival, Univision. In addition, mun2 ran blocks of programming from the Home Shopping Network's Spanish language network Home Shopping Español (HSE) daily from 12:00 a.m. to 2:00 p.m. Eastern Time.
In 2002, NBC acquired Telemundo and mun2 from Sony Pictures and Liberty Media, and on August 2, 2004, General Electric, then-owners of NBC, acquired an 80% stake in Universal Pictures, merging it with NBC to form NBCUniversal, which was later acquired by Comcast in 2011.
The network's most well known series was the candid reality series I Love Jenni, which featured the life of banda/ranchero singer Jenni Rivera. After her death in a plane crash near Monterrey on December 9, 2012, the final season of the series earned the highest season average of any mun2 original program in its history, reaching a total of 5.5 million people across all of its telecasts during the season's 18-week run. It also ranked as the #1 show among all Hispanic cable networks in every key demographic during its Sunday night premiere. The series on-demand traffic increased, with over eight million video streams on mun2.tv, and over one million video on demand views.
As Universo
thumb|left|Logo used until January 17, 2017.
On December 24, 2014, NBCUniversal announced that it would relaunch mun2 as NBC Universo on February 1, 2015, to coincide with the network's Spanish-language broadcast of Super Bowl XLIX. The relaunch of the network under the NBC name and peacock logo was designed to reflect the broadcaster's commitment to the Spanish-language television market.
Eight months prior to the relaunching announcement, at NBCUniversal Hispanic Enterprises and Content's upfront presentation at New York City's Frederick P. Rose Hall on May 13, 2014, the company announced that NBC Universo would be revamping its programming. The new line-up would increase its focus on sports coverage (which included the re-organization of Telemundo's sports division as Telemundo Deportes, a branch of the English-language NBC Sports division), primarily in preparation for its broadcast of the 2016 Summer Olympics and its assumption of Spanish-language cable rights to FIFA tournaments (such as the 2018 FIFA World Cup), which began with the 2015 FIFA U-20 World Cup.
In February 2017, the channel's name was shortened to Universo as part of a brand refresh.
Programming
Universo's programming consists of sports, original scripted drama series, reality series largely centered on popular Hispanic celebrities, movies, and music videos and music-related magazine programming; it also broadcasts series originating from Telemundo and networks operated as part of sister division NBCUniversal Cable, made up of original series from sister networks Syfy and USA Network, which incorporated Spanish subtitles. To reflect its audience, Universo does not exclusively air programming in Spanish, airing a mix of shows presented in English, dubbed into Spanish and incorporating Spanish language subtitles, and programs presented interchangeably in both languages.
Music programming on the network during its existence as mun2 usually consisted of a mix of music videos in English and Spanish from a variety of genres. In early April 2009, mun2 introduced two new music video-oriented shows called Indie y Nuevo (a program focusing more on independent artists, which has since been cancelled) and The Urban Tip (focusing on R&B, rap and reggaeton videos). In late December 2009, the network dropped its overnight block of infomercials that aired daily from 3:00 to 6:00 a.m. Eastern Time, and replaced it with additional music video programming either in the form of Reventon Mix (focusing on contemporary Latin party music) or Morning Breath (featuring a selection of videos from various artists). In January 2010, the network also began broadcasting a weekly block of feature films on Friday nights.
Sports programming
Universo broadcasts Spanish-language sports programming in conjunction with the Telemundo Deportes branch of the NBC Sports Group. Since the 2015 FIFA Women's World Cup, Universo is the Spanish-language cable rightsholder of FIFA tournaments through 2026.
In January 2010, NBC Universal announced that the channel would continue to broadcast Mexican soccer games (under the brand Fútbol Mexicano); most of the games aired to date were English-language telecasts of matches featured on Telemundo's Fútbol Estelar broadcasts. In February 2010, mun2 debuted mun2 Sports Arena, a half-hour sports news program that aired on Sunday evenings. The network held English-language rights to a 2010 FIFA World Cup qualifiers match between the United States and Mexico on August 12, 2009. mun2 offered a free preview for the day of the match.
On July 23, 2013, NBC Sports announced that Telemundo and mun2 would broadcast NASCAR events in Spanish in beginning in 2015, as part of NBC's new rights deal to cover the second half of the Cup Series and Xfinity Series season. As a prelude to the new contract, mun2 broadcast the opening event of the Toyota Series—NASCAR's Mexican series, at Phoenix International Raceway during the weekend of The Profit on CNBC 500 on February 28, 2014. Through NBC Sports' contract to televise the Premier League, the network began airing Spanish-language simulcasts of select matches broadcast in English on NBCSN with the 2013–14 season.
Through NBC's rights agreement with the NFL, mun2 carried its first Spanish simulcast of an NFL game, airing a Thanksgiving matchup between the Seattle Seahawks and San Francisco 49ers on November 27, 2014; the re-branded channel has served as the Spanish-language broadcaster of the Super Bowl during years NBC holds the rights. NBC had proposed using Telemundo to act as a Spanish-language simulcast partner for years following its 2001 purchase of the network, but this did not occur until the Premier League agreement.
List of programs broadcast by Universo
Current
Original programming
El Vato (April 17, 2016 – present)
I Love Jenni (reruns)
Larrymania (October 7, 2012 – present)
The Riveras (October 16, 2016 – present)
Latinx Now! (October 3, 2018 – present)
Acquired programming
12 Corazones
Atrapados en la aduana
El Socio (July 22, 2018 – present)
Encarcelados
Escuela para maridos
Fuerza especial de fugitivos
La frontera
La ley de Laredo
Mi historia de fantasmas
Motivo para matar (May 27, 2018 – present)
Narcos: Guerra antidrogas
Pandilleros Paraíso perdido Preppers Prison Break ¿Quién da más? Seguridad de frontera: Australia Seguridad de frontera: Canada Seguridad de frontera: USASon of Anarchy The Walking DeadReruns of Telemundo programming
Caso Cerrado Historias de la Virgen Morena Exatlón Estados Unidos (July 17, 2018 – present)
Sports
Premier League (August 16, 2013 - prsesent)
FIFA World Cup (June 14, 2018 – present)
Telenovelas
Pasión de gavilanes (June 8, 2017 – present)
La hija pródiga (October 1, 2018 – present)
Los herederos del Monte (December 3, 2018 – present)
Former
Chiquis 'N Control Day in Day Out El Show Fugitivos De La Ley: Los Angeles Gran Hermano: La Novela Guerra de ídolos Jenni Rivera Presents: Chiquis & Raq-C La Patrona Law & Order Law & Order: LA Los Thunderbirds Lugar Heights mun2 Shuffle Milagros de Navidad Niño Santo One Nation Operación Repo Pablo Escobar, el Patrón del Mal RPM Miami Reto superhumanos Se Habla Rock! Sons of Anarchy South Park Stan Lee's Superhumans
Shockwave Suelta la sopa (July 16, 2018 – August 17, 2018)
The Chicas Project The Look The mun2 Shift Vivo Welcome to Los Vargas WWE ECW (January 9, 2009 – February 19, 2010)
WWE Raw (October 5, 2005 – 2020)
WWE NXT (2010)
WWE SmackDown'' (October 2, 2010 – September 29, 2019)
Notes and references
External links
Telemundo
NBCUniversal networks
NBC Sports
Music video networks in the United States
Television channels and stations established in 1993
Spanish-language television networks in the United States
|
Choi Jae-woo (born 27 February 1994) is a South Korean freestyle skier. He competed at the 2014 Winter Olympics.
References
South Korean male freestyle skiers
Freestyle skiers at the 2014 Winter Olympics
Freestyle skiers at the 2018 Winter Olympics
Olympic freestyle skiers for South Korea
Living people
1994 births
Asian Games medalists in freestyle skiing
Freestyle skiers at the 2011 Asian Winter Games
Freestyle skiers at the 2017 Asian Winter Games
Asian Games silver medalists for South Korea
Medalists at the 2017 Asian Winter Games
21st-century South Korean people
|
Charlotte Johanna of Waldeck-Wildungen (13 December 1664 in Arolsen – 1 February 1699 in Hildburghausen) was a daughter of Count Josias II of Waldeck-Wildungen and his wife, Wilhelmine Christine, a daughter of William of Nassau-Siegen.
Marriage and issue
She married on 2 December 1690 in Maastricht to John Ernest IV, Duke of Saxe-Coburg-Saalfeld, the son of Ernst I, Duke of Saxe-Coburg-Altenburg. She was his second wife. She had eight children:
William Frederick (16 August 1691 in Arolsen – 28 July 1720 in Saalfeld)
Charles Ernest (12 September 1692 in Saalfeld – 30 December 1720 in Cremona)
Sophia Wilhelmina (9 August 1693 in Saalefld – 4 December 1727 in Rudolstadt), married on 8 February 1720 to Frederick Anton, Prince of Schwarzburg-Rudolstadt
Henriette Albertine (8 July 1694 in Saalfeld – 1 April 1695 in Saalfeld)
Louise Emilie (24 August 1695 in Saalfeld – 21 August 1713 in Coburg)
Charlotte (30 October 1696 in Saalfeld – 2 November 1696 in Saalfeld)
Francis Josias, Duke of Saxe-Coburg-Saalfeld (25 September 1697 in Saalefeld – 16 September 1764 in Rodach)
Henriette Albertine (20 November 1698 in Saalfeld – 5 February 1728 in Coburg)
She died in 1699 at the home of her brother-in-law Ernest, Duke of Saxe-Hildburghausen.
References
House of Waldeck
1664 births
1699 deaths
Countesses in Germany
17th-century German people
Duchesses of Saxe-Coburg-Saalfeld
|
Quinapril, sold under the brand name Accupril by the Pfizer corporation. It a medication used to treat high blood pressure (hypertension), heart failure, and diabetic kidney disease. It is a first line treatment for high blood pressure. It is taken by mouth.
Common side effects include headaches, dizziness, feeling tired, and cough. Serious side effects may include liver problems, low blood pressure, angioedema, kidney problems, and high blood potassium. Use in pregnancy and breastfeeding is not recommended. It is among a class of drugs called ACE inhibitors and works by decreasing renin-angiotensin-aldosterone system activity.
Quinapril was patented in 1980 and came into medical use in 1989. It is available as a generic medication. In 2020, it was the 253rd most commonly prescribed medication in the United States, with more than 1million prescriptions.
Medical uses
Quinapril is indicated for the treatment of high blood pressure (hypertension) and as adjunctive therapy in the management of heart failure. It may be used for the treatment of hypertension by itself or in combination with thiazide diuretics, and with diuretics and digoxin for heart failure.
Contraindications
Contraindications include:
Pregnancy
Impaired renal and liver function
Patients with a history of angioedema related to previous treatment with an ACE inhibitor
Hypersensitivity to Quinapril
Side effects
Side effects of Quinapril include dizziness, cough, vomiting, upset stomach, angioedema, and fatigue.
Mechanism of action
Quinapril inhibits angiotensin converting enzyme, an enzyme which catalyses the formation of angiotensin II from its precursor, angiotensin I. Angiotensin II is a powerful vasoconstrictor and increases blood pressure through a variety of mechanisms. Due to reduced angiotensin production, plasma concentrations of aldosterone are also reduced, resulting in increased excretion of sodium in the urine and increased concentrations of potassium in the blood.
Partial Recall
In April of 2022, Pfizer voluntarily recalled five batches of the drug because of the presence of a nitrosamine, NNitroso-quinapril. Testing found that the amount of nitrosamines was above the acceptable daily intake level (all humans are exposed to nitrosamines up to a certain daily level by cured and grilled meats, water, dairy products, and vegetables) set by the U.S.'s Food and Drug Administration (FDA). Though long-term ingestion of NNitroso-quinapril potentially might cause cancer in some individuals, there is not believed to be an imminent risk of harm.
References
External links
ACE inhibitors
Carboxamides
Carboxylate esters
Enantiopure drugs
Pfizer brands
Prodrugs
Tetrahydroisoquinolines
Wikipedia medicine articles ready to translate
Ethyl esters
|
```smalltalk
"
ZnServerSocketBoundEvent signals a new server socket on address:port is bound (opened).
"
Class {
#name : 'ZnServerSocketBoundEvent',
#superclass : 'ZnServerLogEvent',
#instVars : [
'address',
'port'
],
#category : 'Zinc-HTTP-Logging',
#package : 'Zinc-HTTP',
#tag : 'Logging'
}
{ #category : 'accessing' }
ZnServerSocketBoundEvent >> address [
^ address
]
{ #category : 'accessing' }
ZnServerSocketBoundEvent >> address: anObject [
address := anObject
]
{ #category : 'accessing' }
ZnServerSocketBoundEvent >> port [
^ port
]
{ #category : 'accessing' }
ZnServerSocketBoundEvent >> port: anObject [
port := anObject
]
{ #category : 'printing' }
ZnServerSocketBoundEvent >> printContentsOn: stream [
super printContentsOn: stream.
stream << 'Server Socket Bound '.
address do: [ :each | stream print: each ] separatedBy: [ stream nextPut: $. ].
stream nextPut: $:; print: port
]
```
|
The 2007–08 SK Rapid Wien season is the 110th season in club history.
Squad statistics
Goal scorers
Fixtures and results
Bundesliga
League table
Intertoto Cup
UEFA Cup
References
2007-08 Rapid Wien Season
Austrian football clubs 2007–08 season
Austrian football championship-winning seasons
|
```objective-c
/*++ NDK Version: 0098
Header Name:
kdtypes.h
Abstract:
Type definitions for the Kernel Debugger.
Author:
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
--*/
#ifndef _KDTYPES_H
#define _KDTYPES_H
//
// Dependencies
//
#include "umtypes.h"
//
// Debug Filter Levels
//
#define DPFLTR_ERROR_LEVEL 0
#define DPFLTR_WARNING_LEVEL 1
#define DPFLTR_TRACE_LEVEL 2
#define DPFLTR_INFO_LEVEL 3
#define DPFLTR_MASK 0x80000000
//
// Debug Status Codes
//
#define DBG_STATUS_CONTROL_C 1
#define DBG_STATUS_SYSRQ 2
#define DBG_STATUS_BUGCHECK_FIRST 3
#define DBG_STATUS_BUGCHECK_SECOND 4
#define DBG_STATUS_FATAL 5
#define DBG_STATUS_DEBUG_CONTROL 6
#define DBG_STATUS_WORKER 7
//
// DebugService Control Types
//
#define BREAKPOINT_BREAK 0
#define BREAKPOINT_PRINT 1
#define BREAKPOINT_PROMPT 2
#define BREAKPOINT_LOAD_SYMBOLS 3
#define BREAKPOINT_UNLOAD_SYMBOLS 4
#define BREAKPOINT_COMMAND_STRING 5
//
// Debug Control Codes for NtSystemDebugcontrol
//
typedef enum _SYSDBG_COMMAND
{
SysDbgQueryModuleInformation = 0,
SysDbgQueryTraceInformation = 1,
SysDbgSetTracepoint = 2,
SysDbgSetSpecialCall = 3,
SysDbgClearSpecialCalls = 4,
SysDbgQuerySpecialCalls = 5,
SysDbgBreakPoint = 6,
SysDbgQueryVersion = 7,
SysDbgReadVirtual = 8,
SysDbgWriteVirtual = 9,
SysDbgReadPhysical = 10,
SysDbgWritePhysical = 11,
SysDbgReadControlSpace = 12,
SysDbgWriteControlSpace = 13,
SysDbgReadIoSpace = 14,
SysDbgWriteIoSpace = 15,
SysDbgReadMsr = 16,
SysDbgWriteMsr = 17,
SysDbgReadBusData = 18,
SysDbgWriteBusData = 19,
SysDbgCheckLowMemory = 20,
SysDbgEnableKernelDebugger = 21,
SysDbgDisableKernelDebugger = 22,
SysDbgGetAutoKdEnable = 23,
SysDbgSetAutoKdEnable = 24,
SysDbgGetPrintBufferSize = 25,
SysDbgSetPrintBufferSize = 26,
SysDbgGetKdUmExceptionEnable = 27,
SysDbgSetKdUmExceptionEnable = 28,
SysDbgGetTriageDump = 29,
SysDbgGetKdBlockEnable = 30,
SysDbgSetKdBlockEnable = 31,
SysDbgRegisterForUmBreakInfo = 32,
SysDbgGetUmBreakPid = 33,
SysDbgClearUmBreakPid = 34,
SysDbgGetUmAttachPid = 35,
SysDbgClearUmAttachPid = 36,
} SYSDBG_COMMAND;
//
// System Debugger Types
//
typedef struct _SYSDBG_PHYSICAL
{
PHYSICAL_ADDRESS Address;
PVOID Buffer;
ULONG Request;
} SYSDBG_PHYSICAL, *PSYSDBG_PHYSICAL;
typedef struct _SYSDBG_VIRTUAL
{
PVOID Address;
PVOID Buffer;
ULONG Request;
} SYSDBG_VIRTUAL, *PSYSDBG_VIRTUAL;
typedef struct _SYSDBG_CONTROL_SPACE
{
ULONGLONG Address;
PVOID Buffer;
ULONG Request;
ULONG Processor;
} SYSDBG_CONTROL_SPACE, *PSYSDBG_CONTROL_SPACE;
typedef struct _SYSDBG_IO_SPACE
{
ULONGLONG Address;
PVOID Buffer;
ULONG Request;
INTERFACE_TYPE InterfaceType;
ULONG BusNumber;
ULONG AddressSpace;
} SYSDBG_IO_SPACE, *PSYSDBG_IO_SPACE;
typedef struct _SYSDBG_BUS_DATA
{
ULONG Address;
PVOID Buffer;
ULONG Request;
BUS_DATA_TYPE BusDataType;
ULONG BusNumber;
ULONG SlotNumber;
} SYSDBG_BUS_DATA, *PSYSDBG_BUS_DATA;
typedef struct _SYSDBG_MSR
{
ULONG Address;
ULONGLONG Data;
} SYSDBG_MSR, *PSYSDBG_MSR;
typedef struct _SYSDBG_TRIAGE_DUMP
{
ULONG Flags;
ULONG BugCheckCode;
ULONG_PTR BugCheckParam1;
ULONG_PTR BugCheckParam2;
ULONG_PTR BugCheckParam3;
ULONG_PTR BugCheckParam4;
ULONG ProcessHandles;
ULONG ThreadHandles;
PHANDLE Handles;
} SYSDBG_TRIAGE_DUMP, *PSYSDBG_TRIAGE_DUMP;
//
// KD Structures
//
typedef struct _KD_SYMBOLS_INFO
{
PVOID BaseOfDll;
ULONG_PTR ProcessId;
ULONG CheckSum;
ULONG SizeOfImage;
} KD_SYMBOLS_INFO, *PKD_SYMBOLS_INFO;
#endif // _KDTYPES_H
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.