text
stringlengths 1
22.8M
|
|---|
```xml
<?xml version="1.0" encoding="utf-8"?>
<!--
~ All Rights Reserved.
-->
<me.zhanghai.android.douya.ui.DispatchInsetsDrawerLayout
xmlns:android="path_to_url"
xmlns:app="path_to_url"
xmlns:tools="path_to_url"
android:id="@+id/drawer"
android:layout_height="match_parent"
android:layout_width="match_parent"
tools:context=".main.ui.MainActivity">
<me.zhanghai.android.douya.ui.InsetBackgroundFrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:insetBackground="?colorPrimaryDarkWithoutSystemWindowScrim" />
<fragment
android:id="@+id/navigation_fragment"
android:name="me.zhanghai.android.douya.navigation.ui.NavigationFragment"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
tools:layout="@layout/navigation_fragment" />
<me.zhanghai.android.douya.ui.MaxDimensionDispatchInsetsFrameLayout
android:id="@+id/notification_list_drawer"
android:layout_width="wrap_content"
android:maxWidth="@dimen/drawer_max_width"
android:layout_height="match_parent"
android:layout_gravity="end"
android:background="?android:colorBackground" />
</me.zhanghai.android.douya.ui.DispatchInsetsDrawerLayout>
```
|
Isaabad (, also Romanized as ‘Īsáābād; also known as ‘Īsāābād-e Sar Bonān, and Īsīābād) is a village in Sarbanan Rural District of the Central District of Zarand County, Kerman province, Iran.
At the 2006 National Census, its population was 609 in 145 households. The following census in 2011 counted 610 people in 162 households. The latest census in 2016 showed a population of 665 people in 196 households. It was the largest village in its rural district.
References
Zarand County
Populated places in Kerman Province
Populated places in Zarand County
|
```java
package home.smart.fly.animations.customview;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Camera;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Point;
import androidx.annotation.Nullable;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.View;
import home.smart.fly.animations.R;
/**
* Created by engineer on 2017/9/2.
*/
public class TransformView extends View {
private static final String TAG = "TransformView";
private Paint mPaint;
private Matrix mMatrix;
private Camera mCamera;
private Paint helpPaint;
//
private Bitmap mBitmap;
//
private Point center;
private int viewW, viewH;
//
private float degreeX, degreeY, degreeZ;
private float scaleX = 1, scaleY = 1;
private boolean isFixed = true;
private boolean UpDownFlipView = true, LeftRightFlipView;
public TransformView(Context context) {
super(context);
init();
}
public TransformView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init();
}
public TransformView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
private void init() {
//
mPaint = new Paint();
mCamera = new Camera();
mMatrix = new Matrix();
initBitmap();
//
helpPaint = new Paint();
helpPaint.setStyle(Paint.Style.STROKE);
}
private void initBitmap() {
if (UpDownFlipView || LeftRightFlipView) {
mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.cat);
center = new Point((viewW - mBitmap.getWidth()) / 2,
(viewH - mBitmap.getHeight()) / 2);
//
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
float newZ = -displayMetrics.density * 6;
mCamera.setLocation(0, 0, newZ);
} else {
mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.android_robot);
center = new Point((viewW - mBitmap.getWidth()) / 2,
(viewH - mBitmap.getHeight()) / 2);
}
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
mCamera.save();
mMatrix.reset();
mCamera.rotateX(degreeX);
mCamera.rotateY(degreeY);
mCamera.rotateZ(degreeZ);
mCamera.getMatrix(mMatrix);
mCamera.restore();
if (isFixed) {
mMatrix.preTranslate(-center.x - mBitmap.getWidth() / 2, -center.y - mBitmap.getHeight() / 2);
mMatrix.postTranslate(center.x + mBitmap.getWidth() / 2, center.y + mBitmap.getHeight() / 2);
}
mMatrix.postScale(scaleX, scaleY, center.x + mBitmap.getWidth() / 2, center.y + mBitmap.getHeight() / 2);
//FlipView
if (UpDownFlipView) {
canvas.save();
canvas.clipRect(center.x, center.y, center.x + mBitmap.getWidth(), center.y + mBitmap.getHeight() / 2);
canvas.drawBitmap(mBitmap, center.x, center.y, mPaint);
canvas.restore();
canvas.save();
canvas.concat(mMatrix);
canvas.clipRect(center.x, center.y + mBitmap.getHeight() / 2, center.x + mBitmap.getWidth(),
center.y + mBitmap.getHeight());
canvas.drawBitmap(mBitmap, center.x, center.y, mPaint);
canvas.restore();
} else if (LeftRightFlipView) {
canvas.save();
canvas.clipRect(center.x + mBitmap.getWidth() / 2, center.y, center.x + mBitmap.getWidth(),
center.y + mBitmap.getHeight());
canvas.drawBitmap(mBitmap, center.x, center.y, mPaint);
canvas.restore();
canvas.save();
canvas.concat(mMatrix);
canvas.clipRect(center.x, center.y, center.x + mBitmap.getWidth() / 2, center.y + mBitmap.getHeight());
canvas.drawBitmap(mBitmap, center.x, center.y, mPaint);
canvas.restore();
} else {
canvas.save();
canvas.concat(mMatrix);
canvas.drawBitmap(mBitmap, center.x, center.y, mPaint);
canvas.restore();
}
canvas.drawRect(center.x, center.y,
center.x + mBitmap.getWidth(), center.y + mBitmap.getHeight(), helpPaint);
}
public void setDegreeX(float degree) {
this.degreeX = degree;
invalidate();
}
public void setDegreeY(float degree) {
this.degreeY = degree;
invalidate();
}
public void setDegreeZ(float degreeZ) {
this.degreeZ = degreeZ;
invalidate();
}
@Override
public void setScaleX(float scaleX) {
this.scaleX = scaleX;
invalidate();
}
@Override
public void setScaleY(float scaleY) {
this.scaleY = scaleY;
invalidate();
}
public void setFixed(boolean fixed) {
isFixed = fixed;
}
public void setUpDownFlipView(boolean upDownFlipView) {
UpDownFlipView = upDownFlipView;
initBitmap();
invalidate();
}
public void setLeftRightFlipView(boolean leftRightFlipView) {
LeftRightFlipView = leftRightFlipView;
initBitmap();
invalidate();
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
viewW = w;
viewH = h;
center = new Point((w - mBitmap.getWidth()) / 2,
(h - mBitmap.getHeight()) / 2);
}
}
```
|
```kotlin
package mega.privacy.android.domain.entity.mediaplayer
/**
* The entity for playback information
*
* @property mediaId the media id of media item
* @property totalDuration the total duration of media item
* @property currentPosition the current position of media item
*/
data class PlaybackInformation(
val mediaId: Long?,
val totalDuration: Long,
val currentPosition: Long,
)
```
|
```objective-c
#pragma once
#ifndef __TTWAIN_STATE_PD_H__
#define __TTWAIN_STATE_PD_H__
#ifdef __cplusplus
extern "C" {
#endif
int TTWAIN_LoadSourceManagerPD(void);
int TTWAIN_UnloadSourceManagerPD(void);
int TTWAIN_UnloadSourceManagerPD(void);
void TTWAIN_EmptyMessageQueuePD(void);
#ifdef __cplusplus
}
#endif
#endif
```
|
Djúpavík () is a small village in the North-West of Iceland. It is located at the head of Reykjarfjörður on the Strandir coast in the Westfjords region (Vestfirðir), in the municipality of Árneshreppur.
It is approximately 70 km away from Hólmavík (the nearest settlement of any account), 280 km from Ísafjörður and 340 km from the country's capital Reykjavík. At present it only consists of seven houses, a hotel and the ruins of a herring factory. It can be reached by car via road 643 or by plane via the nearby Gjögur Airport.
History of settlement
Before 1917
Prior to 1917, the area around Djúpavík hosted farmsteads for hundreds of years. Around 1916 only one family lived there.
1917-1934
The village of Djúpavík was first settled in 1917 when Elías Stefánsson built a herring salting factory there. Guðjón Jónsson moved to Djúpavík in 1917 with his wife Krístín Guðmundsdóttir and three children to serve as the factory's supervisor. They were the village's first residents. That year brought many challenges to the herring industry in Iceland. There were shortages of fuel oil and salt, and the import price of coal and other supplies rose sharply. Both cod and herring catches were small. In the following year, the Armistice of 11 November 1918 led to reduced demand for exports from Iceland. The enterprise went bankrupt in 1919. Although the business was briefly taken over by others, the site was abandoned during the 1920s. Guðjón stayed on at the factory until 1921.
1934-1983
In 1934, a decline in demand for salted fish led to new investments in factories that could produce valuable herring oil. This year saw the resettlement of Djúpavík. The decision to establish Djúpavík Ltd. was made at Hótel Borg in Reykjavík on September 22, 1934. Because financing was difficult to obtain in Iceland, Djúpavík Ltd. sent representatives to Sweden to negotiate a loan to build a new herring factory. Solberg Bank in Stockholm loaned the company 400,000 Swedish krona.
Guðmundur Guðjónsson, an engineer, designed the factory and oversaw its construction. The new factory was built, and at 90 meters (300 ft) in length it was the largest concrete building in Iceland and one of the largest in Europe. There were no roads to Djúpavík so all supplies arrived by ship. Despite the harsh conditions, the construction was completed within the span of just one year and the factory was operational by July 1935. It was one of 12 new herring oil and meal factories in Iceland. However, the Djúpavík factory was unique. It was the first fully automated fish factory in Europe, with conveyor belts running from dock to basement storage rooms, then to coal-fired steam cookers, oil-extraction presses, coal-fired dryers, and meal grinders. Powerful electric fans then blew the hot fish meal through ducts that passed outside the factory for cooling and finally to chutes in the upper level where 100 kg (220 lb) meal bags were filled for transport. Electricity was generated by four German-built diesel engines salvaged from submarines and an Icelandic guard ship. The 60-tonne boiler used to generate steam for cooking was also salvaged from a ship. Initial worries that the catches would not meet requirements proved unfounded and during its early years the enterprise boomed, bringing improved financial status and living standards to the whole region.
Guðmundur Guðjónsson was the factory director from 1936, until the factory ceased operations in 1954. His wife was Ragnheiður Jörensdóttir Hansen. Their adopted daughter María Guðmundsdóttir (filmmaker) became Miss Iceland.
Herring catches started to decline after 1944, with a sharp drop in 1948 (when there were almost no catches for two years) and, despite attempts to keep the enterprise running by processing other fish besides herring, the factory closed in 1954 while Djúpavík Ltd. was officially dissolved in 1968. Some residents remained until about 1980.
1984-present
In 1984 Ásbjörn Þorgilsson, the grandson of a former Djúpavík resident, and his wife Eva Sigurbjörnsdóttir bought the herring factory, intending to repair it and start a fish breeding program. They chose instead to renovate the women's dormitory for use as a hotel to support increasing tourism in the area. Over the years, business increased, with significant growth after 2010. Ásbjörn and Eva have taken care to preserve the cultural heritage of the site and the environment. As of 2016, Hotel Djúpavík was "the only eco-friendly tourism service in Strandir...." During this time, they also made repairs to prevent further deterioration of the factory and other buildings.
Hotel business is confined mostly to the Summer months. The nearest major route (road 61) is located 60 km (37 mi) to the south, and the nearest airport is at Gjögur, 14 km (9 mi) to the north. Road 643 is the only connection between Djúpavík and these locations. This road is classified as a secondary road and is in snow clearance group G. Snow on group G roads is not cleared during the Winter months causing Djúpavík to be cut off from road transportation. However, in recent years the hotel has hosted snowmobile adventurers who follow snowmobile guides from Hólmavík to Djúpavík.
Life in Djúpavík
1935-1954
Djúpavík was unlike other villages in the region. The streets were not named. There were no police, churches, liquor stores or bars. There were, however, a shop and bakery owned by Djúpavík Ltd.
The population of Djúpavík was approximately 260 during much of this period. While most of the population was seasonal, the manager and his family lived there year-round.
Men and women sought work at the factory during the Summer fishing season. Men worked inside the factory loading coal into ovens, operating machinery, and loading meal bags onto transport vehicles. Women worked long hours outdoors near the dock, often in adverse weather conditions. They removed the heads and bones, packed the herring in salt, and placed them in large wooden barrels. While men were paid for the time they worked, women were paid for each barrel they filled. Although they earned significantly less than the men in the factory, many women sought this work because they earned more than they could doing clerical and domestic work in Reykjavik.
One of Elías Stefánsson's timber houses was refurbished and served as a women's dormitory. Men slept in the former freight and passenger ship Suðurland (ship) - known as M. Davidsen (ship) prior to 1919 - which was purchased by Djúpavík Ltd. in 1935 and docked next to the factory for that purpose. The upper cabins were comfortable. However, the lower cabins had no portholes and poor ventilation. Other men slept in the upper floor of the canteen. Married couples who wanted to be together were required to sleep in tents away from the other living quarters. Men were served meals in a cafeteria located behind the factory. Women prepared their own meals in the dormitory kitchen. For entertainment, dances were held on the first floor of the women's dormitory. There was no access from the dance hall to the dormitory kitchen or the stairs leading to the second floor. To avoid unwanted pregnancies, much care was taken to keep men away from the women's quarters.
1985 to present
When Ásbjörn, Eva and their three children moved to Djúpavík in 1985, they were its only residents. Finances were difficult while renovating the hotel and during the early years of operation. To repair the factory, they bought supplies as they could afford them and did much of the work themselves. The two younger children attended school in Trékyllisvík, about 20 km (12 mi) by road to the north. When snow made the road impassible, Ásbjörn transported his children to and from Gjögur in a small boat. Windy conditions sometimes made docking impossible, causing the children to either stay home from school or remain at school for weeks. After a particularly harrowing incident when his daughter nearly fell from the jetty at Gjögur, Ásbjörn bought a snowmobile for Winter transportation to and from school. From 10th grade until graduation the children attended school in Hólmavík and stayed there during the winter.
As of 2010 Djúpavík had two year-round residents and three Summer residents
Restoration of buildings
In 1984, there was significant damage and decay in the factory due to decades of neglect and vandalism. The original intent was to repair the factory and establish a fish farm. After considering the economics of fish farming and the increase in tourism, Ásbjörn and Eva decided to preserve the factory as a museum. One of the first tasks was to replace the windows. Over many years masonry has been patched and roofs repaired. As of November 2017 roof repairs continue. The work is done primarily by family members and a few hired workers.
The core of the factory contains the original machinery as it was found in 1984 and educational displays which preserve the history of Djúpavík. The large storage areas of the factory are used for art exhibitions, concerts, and special events such as weddings. Events like these help finance the preservation of the site without interfering with its cultural heritage.
In the hotel, necessary structural repairs were made, plumbing was added, and the dining room, kitchen, and bedrooms were updated to make them suitable for hosting overnight guests. Beyond that, the historic features of the building remain, including the original floorboards and staircase. Two other buildings have been updated similarly to provide additional hotel rooms. Other buildings on the site are owned by summer residents.
Notable visitors
In 2006, Sigur Rós performed a concert in the factory as part of their Heima tour. They chose to record their song Gitardjamm inside one of the large, empty herring oil tanks to make use of the unusual acoustics.
In 2016, Ben Affleck, Gal Gadot, Willem Dafoe, and Jason Momoa were on site to film portions of Justice League (film).
In 2017, Of Monsters and Men band spent time at Djúpavík to write songs.
Artist Erró is a friend of the owners and has artwork on display at the hotel.
Musician Svavar Knútur has visited and performed regularly.
María Guðmundsdóttir (filmmaker), filmmaker, photographer, actor, supermodel, and Miss Iceland 1961, returned several times to visit her hometown of Djúpavík.
In popular media
In the 2017 movie Justice League, Bruce Wayne goes to Djúpavík to look for Aquaman.
References
Citations
Sources
#
External links
djupavik.is Homepage of Hotel Djúpavík
Populated places in Westfjords
Populated places established in 1917
|
The Loo Tai Cho Building is an historic building in Victoria, British Columbia, Canada.
See also
List of historic places in Victoria, British Columbia
References
External links
Buildings and structures in Victoria, British Columbia
|
Mary Karen Campbell is an American former competitive ice dancer. With her skating partner, Johnny Johns, she became the 1971 North American bronze medalist, 1972 Nebelhorn Trophy champion, and 1973 U.S. national champion.
Results
Ice dance with Johns:
References
Navigation
American female ice dancers
Living people
Year of birth missing (living people)
|
The Diocese of Fronta () is a suppressed and titular see of the Roman Catholic Church.
During the Roman Empire the Diocese of Fronta, was of the Roman province of Mauretania Caesariensis. The location of the seat of the diocese remains unknown but has been tentatively identified with Fortassa, Uzès-le-Duc in modern Algeria. The only known bishop of this diocese from antiquity is Donato, who took part in the synod assembled in Carthage in 484 by the Vandal King Huneric, after which the bishop was exiled.
Today Fronta survives as a titular bishopric and the current bishop is Josef Grünwald, of Augsburg.
References
Roman towns and cities in Mauretania Caesariensis
Catholic titular sees in Africa
Ancient Berber cities
|
was a Japanese samurai lord and a powerful gokenin of the Kamakura Shogunate during the Kamakura period. He was related to the ruling Minamoto clan through his daughter's marriage. He, and much of the Hiki clan, were killed for allegedly conspiring to have one of the Minamoto clan's heirs killed, in order to gain power himself.
Life
Originally from Musashi Province, Hiki Yoshikazu rose to prominence in the shogunal government as a result of being adopted by Minamoto no Yoritomo's wet nurse.
Hiki's daughter was married to Minamoto no Yoriie, the second shōgun of the Kamakura shogunate. Seriously ill, Yoriie proposed to name both his younger brother Sanetomo, and his young son (Hiki's grandson) Minamoto no Ichiman to succeed him; the two would split power, governing separate parts of the country. It seemed natural that Hiki would then be the regent, even if unofficially, to young Ichiman. He therefore suggested to Yoriie, who would be assassinated shortly afterwards by a separate faction (the Hōjō clan), that they arrange to have Sanetomo killed. Hōjō Masako, Yoriie's mother and wife of the first shōgun Yoritomo, overheard this conversation.
Though Masako may have sought to have Hiki formally accused of treason and executed, the Hōjō, under Hōjō Tokimasa, got to him first. In their schemes to dominate the regency and control the shogunate as a puppet government under their clan, Hōjō warriors assassinated Hiki Yoshikazu, and then attacked the palace of young Ichiman, setting a fire and killing both the young heir and a great number of members of the extended Hiki family.
Notes
References
Frederic, Louis (2002). "Japan Encyclopedia." Cambridge, Massachusetts: Harvard University Press.
Sansom, George (1958). 'A History of Japan to 1334'. Stanford, California: Stanford University Press.
12th-century births
1203 deaths
Minamoto clan
People of Heian-period Japan
People of Kamakura-period Japan
|
```go
package main
import (
"bytes"
"fmt"
"log"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"text/tabwriter"
"time"
"unicode"
"unicode/utf8"
"github.com/gdamore/tcell/v2"
"github.com/mattn/go-runewidth"
"golang.org/x/term"
)
const gEscapeCode = 27
var gKeyVal = map[tcell.Key]string{
tcell.KeyEnter: "<enter>",
tcell.KeyBackspace: "<backspace>",
tcell.KeyTab: "<tab>",
tcell.KeyBacktab: "<backtab>",
tcell.KeyEsc: "<esc>",
tcell.KeyBackspace2: "<backspace2>",
tcell.KeyDelete: "<delete>",
tcell.KeyInsert: "<insert>",
tcell.KeyUp: "<up>",
tcell.KeyDown: "<down>",
tcell.KeyLeft: "<left>",
tcell.KeyRight: "<right>",
tcell.KeyHome: "<home>",
tcell.KeyEnd: "<end>",
tcell.KeyUpLeft: "<upleft>",
tcell.KeyUpRight: "<upright>",
tcell.KeyDownLeft: "<downleft>",
tcell.KeyDownRight: "<downright>",
tcell.KeyCenter: "<center>",
tcell.KeyPgDn: "<pgdn>",
tcell.KeyPgUp: "<pgup>",
tcell.KeyClear: "<clear>",
tcell.KeyExit: "<exit>",
tcell.KeyCancel: "<cancel>",
tcell.KeyPause: "<pause>",
tcell.KeyPrint: "<print>",
tcell.KeyF1: "<f-1>",
tcell.KeyF2: "<f-2>",
tcell.KeyF3: "<f-3>",
tcell.KeyF4: "<f-4>",
tcell.KeyF5: "<f-5>",
tcell.KeyF6: "<f-6>",
tcell.KeyF7: "<f-7>",
tcell.KeyF8: "<f-8>",
tcell.KeyF9: "<f-9>",
tcell.KeyF10: "<f-10>",
tcell.KeyF11: "<f-11>",
tcell.KeyF12: "<f-12>",
tcell.KeyF13: "<f-13>",
tcell.KeyF14: "<f-14>",
tcell.KeyF15: "<f-15>",
tcell.KeyF16: "<f-16>",
tcell.KeyF17: "<f-17>",
tcell.KeyF18: "<f-18>",
tcell.KeyF19: "<f-19>",
tcell.KeyF20: "<f-20>",
tcell.KeyF21: "<f-21>",
tcell.KeyF22: "<f-22>",
tcell.KeyF23: "<f-23>",
tcell.KeyF24: "<f-24>",
tcell.KeyF25: "<f-25>",
tcell.KeyF26: "<f-26>",
tcell.KeyF27: "<f-27>",
tcell.KeyF28: "<f-28>",
tcell.KeyF29: "<f-29>",
tcell.KeyF30: "<f-30>",
tcell.KeyF31: "<f-31>",
tcell.KeyF32: "<f-32>",
tcell.KeyF33: "<f-33>",
tcell.KeyF34: "<f-34>",
tcell.KeyF35: "<f-35>",
tcell.KeyF36: "<f-36>",
tcell.KeyF37: "<f-37>",
tcell.KeyF38: "<f-38>",
tcell.KeyF39: "<f-39>",
tcell.KeyF40: "<f-40>",
tcell.KeyF41: "<f-41>",
tcell.KeyF42: "<f-42>",
tcell.KeyF43: "<f-43>",
tcell.KeyF44: "<f-44>",
tcell.KeyF45: "<f-45>",
tcell.KeyF46: "<f-46>",
tcell.KeyF47: "<f-47>",
tcell.KeyF48: "<f-48>",
tcell.KeyF49: "<f-49>",
tcell.KeyF50: "<f-50>",
tcell.KeyF51: "<f-51>",
tcell.KeyF52: "<f-52>",
tcell.KeyF53: "<f-53>",
tcell.KeyF54: "<f-54>",
tcell.KeyF55: "<f-55>",
tcell.KeyF56: "<f-56>",
tcell.KeyF57: "<f-57>",
tcell.KeyF58: "<f-58>",
tcell.KeyF59: "<f-59>",
tcell.KeyF60: "<f-60>",
tcell.KeyF61: "<f-61>",
tcell.KeyF62: "<f-62>",
tcell.KeyF63: "<f-63>",
tcell.KeyF64: "<f-64>",
tcell.KeyCtrlA: "<c-a>",
tcell.KeyCtrlB: "<c-b>",
tcell.KeyCtrlC: "<c-c>",
tcell.KeyCtrlD: "<c-d>",
tcell.KeyCtrlE: "<c-e>",
tcell.KeyCtrlF: "<c-f>",
tcell.KeyCtrlG: "<c-g>",
tcell.KeyCtrlJ: "<c-j>",
tcell.KeyCtrlK: "<c-k>",
tcell.KeyCtrlL: "<c-l>",
tcell.KeyCtrlN: "<c-n>",
tcell.KeyCtrlO: "<c-o>",
tcell.KeyCtrlP: "<c-p>",
tcell.KeyCtrlQ: "<c-q>",
tcell.KeyCtrlR: "<c-r>",
tcell.KeyCtrlS: "<c-s>",
tcell.KeyCtrlT: "<c-t>",
tcell.KeyCtrlU: "<c-u>",
tcell.KeyCtrlV: "<c-v>",
tcell.KeyCtrlW: "<c-w>",
tcell.KeyCtrlX: "<c-x>",
tcell.KeyCtrlY: "<c-y>",
tcell.KeyCtrlZ: "<c-z>",
tcell.KeyCtrlSpace: "<c-space>",
tcell.KeyCtrlUnderscore: "<c-_>",
tcell.KeyCtrlRightSq: "<c-]>",
tcell.KeyCtrlBackslash: "<c-\\>",
tcell.KeyCtrlCarat: "<c-^>",
}
var gValKey map[string]tcell.Key
func init() {
gValKey = make(map[string]tcell.Key)
for k, v := range gKeyVal {
gValKey[v] = k
}
}
type win struct {
w, h, x, y int
}
func newWin(w, h, x, y int) *win {
return &win{w, h, x, y}
}
func (win *win) renew(w, h, x, y int) {
win.w, win.h, win.x, win.y = w, h, x, y
}
func printLength(s string) int {
ind := 0
off := 0
for i := 0; i < len(s); i++ {
r, w := utf8.DecodeRuneInString(s[i:])
if r == gEscapeCode && i+1 < len(s) && s[i+1] == '[' {
j := strings.IndexAny(s[i:min(len(s), i+64)], "mK")
if j == -1 {
continue
}
i += j
continue
}
i += w - 1
if r == '\t' {
ind += gOpts.tabstop - (ind-off)%gOpts.tabstop
} else {
ind += runewidth.RuneWidth(r)
}
}
return ind
}
func (win *win) print(screen tcell.Screen, x, y int, st tcell.Style, s string) tcell.Style {
off := x
var comb []rune
for i := 0; i < len(s); i++ {
r, w := utf8.DecodeRuneInString(s[i:])
if r == gEscapeCode && i+1 < len(s) && s[i+1] == '[' {
j := strings.IndexAny(s[i:min(len(s), i+64)], "mK")
if j == -1 {
continue
}
if s[i+j] == 'm' {
st = applyAnsiCodes(s[i+2:i+j], st)
}
i += j
continue
}
for {
rc, wc := utf8.DecodeRuneInString(s[i+w:])
if !unicode.Is(unicode.Mn, rc) {
break
}
comb = append(comb, rc)
i += wc
}
if x < win.w {
screen.SetContent(win.x+x, win.y+y, r, comb, st)
comb = nil
}
i += w - 1
if r == '\t' {
s := gOpts.tabstop - (x-off)%gOpts.tabstop
for i := 0; i < s && x+i < win.w; i++ {
screen.SetContent(win.x+x+i, win.y+y, ' ', nil, st)
}
x += s
} else {
x += runewidth.RuneWidth(r)
}
}
return st
}
func (win *win) printf(screen tcell.Screen, x, y int, st tcell.Style, format string, a ...interface{}) {
win.print(screen, x, y, st, fmt.Sprintf(format, a...))
}
func (win *win) printLine(screen tcell.Screen, x, y int, st tcell.Style, s string) {
win.printf(screen, x, y, st, "%s%*s", s, win.w-printLength(s), "")
}
func (win *win) printRight(screen tcell.Screen, y int, st tcell.Style, s string) {
win.print(screen, win.w-printLength(s), y, st, s)
}
func (win *win) printReg(screen tcell.Screen, reg *reg, previewLoading bool, sxs *sixelScreen) {
if reg == nil {
return
}
st := tcell.StyleDefault
if reg.loading {
if previewLoading {
st = st.Reverse(true)
win.print(screen, 2, 0, st, "loading...")
}
return
}
for i, l := range reg.lines {
if i > win.h-1 {
break
}
st = win.print(screen, 2, i, st, l)
}
sxs.printSixel(win, screen, reg)
}
var gThisYear = time.Now().Year()
func infotimefmt(t time.Time) string {
if t.Year() == gThisYear {
return t.Format(gOpts.infotimefmtnew)
}
return t.Format(gOpts.infotimefmtold)
}
func fileInfo(f *file, d *dir) string {
var info string
for _, s := range getInfo(d.path) {
switch s {
case "size":
if f.IsDir() && gOpts.dircounts {
switch {
case f.dirCount < -1:
info = fmt.Sprintf("%s !", info)
case f.dirCount < 0:
info = fmt.Sprintf("%s ?", info)
case f.dirCount < 1000:
info = fmt.Sprintf("%s %4d", info, f.dirCount)
default:
info = fmt.Sprintf("%s 999+", info)
}
continue
}
var sz string
if f.IsDir() && f.dirSize < 0 {
sz = "-"
} else {
sz = humanize(f.TotalSize())
}
info = fmt.Sprintf("%s %4s", info, sz)
case "time":
info = fmt.Sprintf("%s %*s", info, max(len(gOpts.infotimefmtnew), len(gOpts.infotimefmtold)), infotimefmt(f.ModTime()))
case "atime":
info = fmt.Sprintf("%s %*s", info, max(len(gOpts.infotimefmtnew), len(gOpts.infotimefmtold)), infotimefmt(f.accessTime))
case "ctime":
info = fmt.Sprintf("%s %*s", info, max(len(gOpts.infotimefmtnew), len(gOpts.infotimefmtold)), infotimefmt(f.changeTime))
default:
log.Printf("unknown info type: %s", s)
}
}
return info
}
type dirContext struct {
selections map[string]int
saves map[string]bool
tags map[string]string
}
type dirRole byte
const (
Active dirRole = iota
Parent
Preview
)
type dirStyle struct {
colors styleMap
icons iconMap
role dirRole
}
func (win *win) printDir(ui *ui, dir *dir, context *dirContext, dirStyle *dirStyle, previewLoading bool) {
if win.w < 5 || dir == nil {
return
}
messageStyle := tcell.StyleDefault.Reverse(true)
if dir.noPerm {
win.print(ui.screen, 2, 0, messageStyle, "permission denied")
return
}
if (dir.loading && len(dir.files) == 0) || (dirStyle.role == Preview && dir.loading && gOpts.dirpreviews) {
if dirStyle.role != Preview || previewLoading {
win.print(ui.screen, 2, 0, messageStyle, "loading...")
}
return
}
if dirStyle.role == Preview && gOpts.dirpreviews && len(gOpts.previewer) > 0 {
// Print previewer result instead of default directory print operation.
st := tcell.StyleDefault
for i, l := range dir.lines {
if i > win.h-1 {
break
}
st = win.print(ui.screen, 2, i, st, l)
}
return
}
if len(dir.files) == 0 {
win.print(ui.screen, 2, 0, messageStyle, "empty")
return
}
beg := max(dir.ind-dir.pos, 0)
end := min(beg+win.h, len(dir.files))
if beg > end {
return
}
var lnwidth int
if dirStyle.role == Active && (gOpts.number || gOpts.relativenumber) {
lnwidth = 1
if gOpts.number && gOpts.relativenumber {
lnwidth++
}
for j := 10; j <= len(dir.files); j *= 10 {
lnwidth++
}
}
for i, f := range dir.files[beg:end] {
st := dirStyle.colors.get(f)
if lnwidth > 0 {
var ln string
if gOpts.number && (!gOpts.relativenumber) {
ln = fmt.Sprintf("%*d", lnwidth, i+1+beg)
} else if gOpts.relativenumber {
switch {
case i < dir.pos:
ln = fmt.Sprintf("%*d", lnwidth, dir.pos-i)
case i > dir.pos:
ln = fmt.Sprintf("%*d", lnwidth, i-dir.pos)
case gOpts.number:
ln = fmt.Sprintf("%*d ", lnwidth-1, i+1+beg)
default:
ln = fmt.Sprintf("%*d", lnwidth, 0)
}
}
win.print(ui.screen, 0, i, tcell.StyleDefault, fmt.Sprintf(optionToFmtstr(gOpts.numberfmt), ln))
}
path := filepath.Join(dir.path, f.Name())
if _, ok := context.selections[path]; ok {
win.print(ui.screen, lnwidth, i, parseEscapeSequence(gOpts.selectfmt), " ")
} else if cp, ok := context.saves[path]; ok {
if cp {
win.print(ui.screen, lnwidth, i, parseEscapeSequence(gOpts.copyfmt), " ")
} else {
win.print(ui.screen, lnwidth, i, parseEscapeSequence(gOpts.cutfmt), " ")
}
}
// make space for select marker, and leave another space at the end
maxWidth := win.w - lnwidth - 2
// make extra space to separate windows if drawbox is not enabled
if !gOpts.drawbox {
maxWidth -= 1
}
tag := " "
if val, ok := context.tags[path]; ok && len(val) > 0 {
tag = val
}
var icon []rune
var iconDef iconDef
if gOpts.icons {
iconDef = dirStyle.icons.get(f)
icon = append(icon, []rune(iconDef.icon)...)
icon = append(icon, ' ')
}
// subtract space for tag and icon
maxFilenameWidth := maxWidth - 1 - runeSliceWidth(icon)
info := fileInfo(f, dir)
showInfo := len(info) > 0 && 2*len(info) < maxWidth
if showInfo {
maxFilenameWidth -= len(info)
}
filename := []rune(f.Name())
if runeSliceWidth(filename) > maxFilenameWidth {
truncatePos := (maxFilenameWidth - 1) * gOpts.truncatepct / 100
lastPart := runeSliceWidthLastRange(filename, maxFilenameWidth-truncatePos-1)
filename = runeSliceWidthRange(filename, 0, truncatePos)
filename = append(filename, []rune(gOpts.truncatechar)...)
filename = append(filename, lastPart...)
}
for j := runeSliceWidth(filename); j < maxFilenameWidth; j++ {
filename = append(filename, ' ')
}
if showInfo {
filename = append(filename, []rune(info)...)
}
if i == dir.pos {
var cursorFmt string
switch dirStyle.role {
case Active:
cursorFmt = optionToFmtstr(gOpts.cursoractivefmt)
case Parent:
cursorFmt = optionToFmtstr(gOpts.cursorparentfmt)
case Preview:
cursorFmt = optionToFmtstr(gOpts.cursorpreviewfmt)
}
// print tag separately as it can contain color escape sequences
win.print(ui.screen, lnwidth+1, i, st, fmt.Sprintf(cursorFmt, tag))
line := append(icon, filename...)
line = append(line, ' ')
win.print(ui.screen, lnwidth+2, i, st, fmt.Sprintf(cursorFmt, string(line)))
} else {
if tag != " " {
tagStr := fmt.Sprintf(optionToFmtstr(gOpts.tagfmt), tag)
win.print(ui.screen, lnwidth+1, i, tcell.StyleDefault, tagStr)
}
if len(icon) > 0 {
iconStyle := st
if iconDef.hasStyle {
iconStyle = iconDef.style
}
win.print(ui.screen, lnwidth+2, i, iconStyle, string(icon))
}
win.print(ui.screen, lnwidth+2+runeSliceWidth(icon), i, st, string(filename))
}
}
}
func getWidths(wtot int) []int {
rsum := 0
for _, r := range gOpts.ratios {
rsum += r
}
wlen := len(gOpts.ratios)
widths := make([]int, wlen)
if gOpts.drawbox {
wtot -= (wlen + 1)
}
wsum := 0
for i := 0; i < wlen-1; i++ {
widths[i] = gOpts.ratios[i] * wtot / rsum
wsum += widths[i]
}
widths[wlen-1] = wtot - wsum
return widths
}
func getWins(screen tcell.Screen) []*win {
wtot, htot := screen.Size()
var wins []*win
widths := getWidths(wtot)
wacc := 0
wlen := len(widths)
for i := 0; i < wlen; i++ {
if gOpts.drawbox {
wacc++
wins = append(wins, newWin(widths[i], htot-4, wacc, 2))
} else {
wins = append(wins, newWin(widths[i], htot-2, wacc, 1))
}
wacc += widths[i]
}
return wins
}
type ui struct {
screen tcell.Screen
sxScreen sixelScreen
polling bool
wins []*win
promptWin *win
msgWin *win
menuWin *win
msg string
msgIsStat bool
regPrev *reg
dirPrev *dir
exprChan chan expr
keyChan chan string
tevChan chan tcell.Event
evChan chan tcell.Event
menuBuf *bytes.Buffer
cmdPrefix string
cmdAccLeft []rune
cmdAccRight []rune
cmdYankBuf []rune
cmdTmp []rune
keyAcc []rune
keyCount []rune
styles styleMap
icons iconMap
currentFile string
}
func newUI(screen tcell.Screen) *ui {
wtot, htot := screen.Size()
ui := &ui{
screen: screen,
polling: true,
wins: getWins(screen),
promptWin: newWin(wtot, 1, 0, 0),
msgWin: newWin(wtot, 1, 0, htot-1),
menuWin: newWin(wtot, 1, 0, htot-2),
msgIsStat: true,
exprChan: make(chan expr, 1000),
keyChan: make(chan string, 1000),
tevChan: make(chan tcell.Event, 1000),
evChan: make(chan tcell.Event, 1000),
styles: parseStyles(),
icons: parseIcons(),
currentFile: "",
sxScreen: sixelScreen{},
}
go ui.pollEvents()
return ui
}
func (ui *ui) winAt(x, y int) (int, *win) {
for i := len(ui.wins) - 1; i >= 0; i-- {
w := ui.wins[i]
if x >= w.x && y >= w.y && y < w.y+w.h {
return i, w
}
}
return -1, nil
}
func (ui *ui) pollEvents() {
var ev tcell.Event
for {
ev = ui.screen.PollEvent()
if ev == nil {
ui.polling = false
return
}
ui.tevChan <- ev
}
}
func (ui *ui) renew() {
ui.wins = getWins(ui.screen)
wtot, htot := ui.screen.Size()
ui.promptWin.renew(wtot, 1, 0, 0)
ui.msgWin.renew(wtot, 1, 0, htot-1)
ui.menuWin.renew(wtot, 1, 0, htot-2)
}
func (ui *ui) sort() {
if ui.dirPrev == nil {
return
}
name := ui.dirPrev.name()
ui.dirPrev.sort()
ui.dirPrev.sel(name, ui.wins[0].h)
}
func (ui *ui) echo(msg string) {
ui.msg = msg
ui.msgIsStat = false
}
func (ui *ui) echomsg(msg string) {
ui.echo(msg)
log.Print(msg)
}
func optionToFmtstr(optstr string) string {
if !strings.Contains(optstr, "%s") {
return optstr + "%s\033[0m"
} else {
return optstr
}
}
func (ui *ui) echoerr(msg string) {
ui.echo(fmt.Sprintf(optionToFmtstr(gOpts.errorfmt), msg))
log.Printf("error: %s", msg)
}
func (ui *ui) echoerrf(format string, a ...interface{}) {
ui.echoerr(fmt.Sprintf(format, a...))
}
type reg struct {
loading bool
volatile bool
loadTime time.Time
path string
lines []string
sixel *string
}
func (ui *ui) loadFile(app *app, volatile bool) {
if !app.nav.init {
return
}
curr, err := app.nav.currFile()
if err != nil {
return
}
if curr.path != ui.currentFile {
ui.currentFile = curr.path
onSelect(app)
}
if volatile {
app.nav.previewChan <- ""
}
if !gOpts.preview {
return
}
if curr.IsDir() {
ui.dirPrev = app.nav.loadDir(curr.path)
} else if curr.Mode().IsRegular() {
ui.regPrev = app.nav.loadReg(curr.path, volatile)
}
}
func (ui *ui) loadFileInfo(nav *nav) {
if !nav.init {
return
}
curr, err := nav.currFile()
if err != nil {
return
}
if curr.err != nil {
ui.echoerrf("stat: %s", curr.err)
return
}
statfmt := strings.ReplaceAll(gOpts.statfmt, "|", "\x1f")
replace := func(s string, val string) {
if val == "" {
val = "\x00"
}
statfmt = strings.ReplaceAll(statfmt, s, val)
}
replace("%p", curr.Mode().String())
replace("%c", linkCount(curr))
replace("%u", userName(curr))
replace("%g", groupName(curr))
replace("%s", humanize(curr.Size()))
replace("%S", fmt.Sprintf("%4s", humanize(curr.Size())))
replace("%t", curr.ModTime().Format(gOpts.timefmt))
replace("%l", curr.linkTarget)
fileInfo := ""
for _, section := range strings.Split(statfmt, "\x1f") {
if !strings.Contains(section, "\x00") {
fileInfo += section
}
}
ui.msg = fileInfo
ui.msgIsStat = true
}
func (ui *ui) drawPromptLine(nav *nav) {
st := tcell.StyleDefault
dir := nav.currDir()
pwd := dir.path
if strings.HasPrefix(pwd, gUser.HomeDir) {
pwd = filepath.Join("~", strings.TrimPrefix(pwd, gUser.HomeDir))
}
sep := string(filepath.Separator)
var fname string
curr, err := nav.currFile()
if err == nil {
fname = filepath.Base(curr.path)
}
var prompt string
prompt = strings.ReplaceAll(gOpts.promptfmt, "%u", gUser.Username)
prompt = strings.ReplaceAll(prompt, "%h", gHostname)
prompt = strings.ReplaceAll(prompt, "%f", fname)
if printLength(strings.ReplaceAll(strings.ReplaceAll(prompt, "%w", pwd), "%d", pwd)) > ui.promptWin.w {
names := strings.Split(pwd, sep)
for i := range names {
if names[i] == "" {
continue
}
r, _ := utf8.DecodeRuneInString(names[i])
names[i] = string(r)
if printLength(strings.ReplaceAll(strings.ReplaceAll(prompt, "%w", strings.Join(names, sep)), "%d", strings.Join(names, sep))) <= ui.promptWin.w {
break
}
}
pwd = strings.Join(names, sep)
}
prompt = strings.ReplaceAll(prompt, "%w", pwd)
if !strings.HasSuffix(pwd, sep) {
pwd += sep
}
prompt = strings.ReplaceAll(prompt, "%d", pwd)
if len(dir.filter) != 0 {
prompt = strings.ReplaceAll(prompt, "%F", fmt.Sprint(dir.filter))
} else {
prompt = strings.ReplaceAll(prompt, "%F", "")
}
// spacer
avail := ui.promptWin.w - printLength(prompt) + 2
if avail > 0 {
prompt = strings.Replace(prompt, "%S", strings.Repeat(" ", avail), 1)
}
prompt = strings.ReplaceAll(prompt, "%S", "")
ui.promptWin.print(ui.screen, 0, 0, st, prompt)
}
func formatRulerOpt(name string, val string) string {
// handle escape character so it doesn't mess up the ruler
val = strings.ReplaceAll(val, "\033", "\033[7m\\033\033[0m")
// display name of builtin options for clarity
if !strings.HasPrefix(name, "lf_user_") {
val = fmt.Sprintf("%s=%s", strings.TrimPrefix(name, "lf_"), val)
}
return val
}
func (ui *ui) drawRuler(nav *nav) {
st := tcell.StyleDefault
dir := nav.currDir()
ui.msgWin.print(ui.screen, 0, 0, st, ui.msg)
tot := len(dir.files)
ind := min(dir.ind+1, tot)
hid := len(dir.allFiles) - tot
acc := string(ui.keyCount) + string(ui.keyAcc)
copy := 0
move := 0
if len(nav.saves) > 0 {
for _, cp := range nav.saves {
if cp {
copy++
} else {
move++
}
}
}
currSelections := nav.currSelections()
progress := []string{}
if nav.copyTotal > 0 {
percentage := int((100 * float64(nav.copyBytes)) / float64(nav.copyTotal))
progress = append(progress, fmt.Sprintf("[%d%%]", percentage))
}
if nav.moveTotal > 0 {
progress = append(progress, fmt.Sprintf("[%d/%d]", nav.moveCount, nav.moveTotal))
}
if nav.deleteTotal > 0 {
progress = append(progress, fmt.Sprintf("[%d/%d]", nav.deleteCount, nav.deleteTotal))
}
opts := getOptsMap()
rulerfmt := strings.ReplaceAll(gOpts.rulerfmt, "|", "\x1f")
rulerfmt = reRulerSub.ReplaceAllStringFunc(rulerfmt, func(s string) string {
var result string
switch s {
case "%a":
result = acc
case "%p":
result = strings.Join(progress, " ")
case "%m":
result = fmt.Sprintf("%.d", move)
case "%c":
result = fmt.Sprintf("%.d", copy)
case "%s":
result = fmt.Sprintf("%.d", len(currSelections))
case "%f":
result = strings.Join(dir.filter, " ")
case "%i":
result = fmt.Sprint(ind)
case "%t":
result = fmt.Sprint(tot)
case "%h":
result = fmt.Sprint(hid)
case "%d":
result = diskFree(dir.path)
default:
s = strings.TrimSuffix(strings.TrimPrefix(s, "%{"), "}")
if val, ok := opts[s]; ok {
result = formatRulerOpt(s, val)
}
}
if result == "" {
return "\x00"
}
return result
})
ruler := ""
for _, section := range strings.Split(rulerfmt, "\x1f") {
if !strings.Contains(section, "\x00") {
ruler += section
}
}
ui.msgWin.printRight(ui.screen, 0, st, ruler)
}
func (ui *ui) drawBox() {
st := parseEscapeSequence(gOpts.borderfmt)
w, h := ui.screen.Size()
for i := 1; i < w-1; i++ {
ui.screen.SetContent(i, 1, tcell.RuneHLine, nil, st)
ui.screen.SetContent(i, h-2, tcell.RuneHLine, nil, st)
}
for i := 2; i < h-2; i++ {
ui.screen.SetContent(0, i, tcell.RuneVLine, nil, st)
ui.screen.SetContent(w-1, i, tcell.RuneVLine, nil, st)
}
if gOpts.roundbox {
ui.screen.SetContent(0, 1, '', nil, st)
ui.screen.SetContent(w-1, 1, '', nil, st)
ui.screen.SetContent(0, h-2, '', nil, st)
ui.screen.SetContent(w-1, h-2, '', nil, st)
} else {
ui.screen.SetContent(0, 1, tcell.RuneULCorner, nil, st)
ui.screen.SetContent(w-1, 1, tcell.RuneURCorner, nil, st)
ui.screen.SetContent(0, h-2, tcell.RuneLLCorner, nil, st)
ui.screen.SetContent(w-1, h-2, tcell.RuneLRCorner, nil, st)
}
wacc := 0
for wind := 0; wind < len(ui.wins)-1; wind++ {
wacc += ui.wins[wind].w + 1
ui.screen.SetContent(wacc, 1, tcell.RuneTTee, nil, st)
for i := 2; i < h-2; i++ {
ui.screen.SetContent(wacc, i, tcell.RuneVLine, nil, st)
}
ui.screen.SetContent(wacc, h-2, tcell.RuneBTee, nil, st)
}
}
func (ui *ui) dirOfWin(nav *nav, wind int) *dir {
wins := len(ui.wins)
if gOpts.preview {
wins--
}
ind := len(nav.dirs) - wins + wind
if ind < 0 {
return nil
}
return nav.dirs[ind]
}
func (ui *ui) draw(nav *nav) {
st := tcell.StyleDefault
context := dirContext{selections: nav.selections, saves: nav.saves, tags: nav.tags}
// XXX: manual clean without flush to avoid flicker on Windows
wtot, htot := ui.screen.Size()
for i := 0; i < wtot; i++ {
for j := 0; j < htot; j++ {
ui.screen.SetContent(i, j, ' ', nil, st)
}
}
ui.sxScreen.sixel = nil
ui.drawPromptLine(nav)
wins := len(ui.wins)
if gOpts.preview {
wins--
}
for i := 0; i < wins; i++ {
role := Parent
if i == wins-1 {
role = Active
}
if dir := ui.dirOfWin(nav, i); dir != nil {
ui.wins[i].printDir(ui, dir, &context,
&dirStyle{colors: ui.styles, icons: ui.icons, role: role},
nav.previewLoading)
}
}
switch ui.cmdPrefix {
case "":
ui.drawRuler(nav)
ui.screen.HideCursor()
case ">":
maxWidth := ui.msgWin.w - 1 // leave space for cursor at the end
prefix := runeSliceWidthRange([]rune(ui.cmdPrefix), 0, maxWidth)
left := runeSliceWidthLastRange(ui.cmdAccLeft, maxWidth-runeSliceWidth(prefix)-printLength(ui.msg))
ui.msgWin.printLine(ui.screen, 0, 0, st, string(prefix)+ui.msg)
ui.msgWin.print(ui.screen, runeSliceWidth(prefix)+printLength(ui.msg), 0, st, string(left)+string(ui.cmdAccRight))
ui.screen.ShowCursor(ui.msgWin.x+runeSliceWidth(prefix)+printLength(ui.msg)+runeSliceWidth(left), ui.msgWin.y)
default:
maxWidth := ui.msgWin.w - 1 // leave space for cursor at the end
prefix := runeSliceWidthRange([]rune(ui.cmdPrefix), 0, maxWidth)
left := runeSliceWidthLastRange(ui.cmdAccLeft, maxWidth-runeSliceWidth(prefix))
ui.msgWin.printLine(ui.screen, 0, 0, st, string(prefix)+string(left)+string(ui.cmdAccRight))
ui.screen.ShowCursor(ui.msgWin.x+runeSliceWidth(prefix)+runeSliceWidth(left), ui.msgWin.y)
}
if gOpts.preview {
curr, err := nav.currFile()
if err == nil {
preview := ui.wins[len(ui.wins)-1]
if curr.IsDir() {
preview.printDir(ui, ui.dirPrev, &context,
&dirStyle{colors: ui.styles, icons: ui.icons, role: Preview},
nav.previewLoading)
} else if curr.Mode().IsRegular() {
preview.printReg(ui.screen, ui.regPrev, nav.previewLoading, &ui.sxScreen)
}
}
}
if gOpts.drawbox {
ui.drawBox()
}
if ui.menuBuf != nil {
lines := strings.Split(ui.menuBuf.String(), "\n")
lines = lines[:len(lines)-1]
ui.menuWin.h = len(lines) - 1
ui.menuWin.y = ui.wins[0].h - ui.menuWin.h
if gOpts.drawbox {
ui.menuWin.y += 2
}
ui.menuWin.printLine(ui.screen, 0, 0, st.Bold(true), lines[0])
for i, line := range lines[1:] {
ui.menuWin.printLine(ui.screen, 0, i+1, st, "")
ui.menuWin.print(ui.screen, 0, i+1, st, line)
}
}
ui.screen.Show()
if ui.menuBuf == nil && ui.cmdPrefix == "" && ui.sxScreen.sixel != nil {
ui.sxScreen.lastFile = ui.regPrev.path
ui.sxScreen.showSixels()
}
}
func findBinds(keys map[string]expr, prefix string) (binds map[string]expr, ok bool) {
binds = make(map[string]expr)
for key, expr := range keys {
if !strings.HasPrefix(key, prefix) {
continue
}
binds[key] = expr
if key == prefix {
ok = true
}
}
return
}
func listExprMap(binds map[string]expr, title string) *bytes.Buffer {
t := new(tabwriter.Writer)
b := new(bytes.Buffer)
var keys []string
for k := range binds {
keys = append(keys, k)
}
sort.Strings(keys)
t.Init(b, 0, gOpts.tabstop, 2, '\t', 0)
fmt.Fprintf(t, "%s\tcommand\n", title)
for _, k := range keys {
fmt.Fprintf(t, "%s\t%v\n", k, binds[k])
}
t.Flush()
return b
}
func listBinds(binds map[string]expr) *bytes.Buffer {
return listExprMap(binds, "keys")
}
func listCmds() *bytes.Buffer {
return listExprMap(gOpts.cmds, "name")
}
func listJumps(jumps []string, ind int) *bytes.Buffer {
t := new(tabwriter.Writer)
b := new(bytes.Buffer)
maxlength := len(strconv.Itoa(max(ind, len(jumps)-1-ind)))
t.Init(b, 0, gOpts.tabstop, 2, '\t', 0)
fmt.Fprintln(t, " jump\tpath")
// print jumps in order of most recent, Vim uses the opposite order
for i := len(jumps) - 1; i >= 0; i-- {
switch {
case i < ind:
fmt.Fprintf(t, " %*d\t%s\n", maxlength, ind-i, jumps[i])
case i > ind:
fmt.Fprintf(t, " %*d\t%s\n", maxlength, i-ind, jumps[i])
default:
fmt.Fprintf(t, "> %*d\t%s\n", maxlength, 0, jumps[i])
}
}
t.Flush()
return b
}
func listHistory(history []cmdItem) *bytes.Buffer {
t := new(tabwriter.Writer)
b := new(bytes.Buffer)
maxlength := len(strconv.Itoa(len(history)))
t.Init(b, 0, gOpts.tabstop, 2, '\t', 0)
fmt.Fprintln(t, "number\tcommand")
for i, cmd := range history {
fmt.Fprintf(t, "%*d\t%s%s\n", maxlength, i+1, cmd.prefix, cmd.value)
}
t.Flush()
return b
}
func listMarks(marks map[string]string) *bytes.Buffer {
t := new(tabwriter.Writer)
b := new(bytes.Buffer)
var keys []string
for k := range marks {
keys = append(keys, k)
}
sort.Strings(keys)
t.Init(b, 0, gOpts.tabstop, 2, '\t', 0)
fmt.Fprintln(t, "mark\tpath")
for _, k := range keys {
fmt.Fprintf(t, "%s\t%s\n", k, marks[k])
}
t.Flush()
return b
}
func (ui *ui) pollEvent() tcell.Event {
select {
case val := <-ui.keyChan:
var ch rune
var mod tcell.ModMask
k := tcell.KeyRune
if key, ok := gValKey[val]; ok {
return tcell.NewEventKey(key, ch, mod)
}
switch {
case utf8.RuneCountInString(val) == 1:
ch, _ = utf8.DecodeRuneInString(val)
case val == "<lt>":
ch = '<'
case val == "<gt>":
ch = '>'
case val == "<space>":
ch = ' '
case reModKey.MatchString(val):
matches := reModKey.FindStringSubmatch(val)
switch matches[1] {
case "c":
mod = tcell.ModCtrl
case "s":
mod = tcell.ModShift
case "a":
mod = tcell.ModAlt
}
val = matches[2]
if utf8.RuneCountInString(val) == 1 {
ch, _ = utf8.DecodeRuneInString(val)
break
} else if key, ok := gValKey["<"+val+">"]; ok {
k = key
break
}
fallthrough
default:
k = tcell.KeyESC
ui.echoerrf("unknown key: %s", val)
}
return tcell.NewEventKey(k, ch, mod)
case ev := <-ui.tevChan:
return ev
}
}
func addSpecialKeyModifier(val string, mod tcell.ModMask) string {
switch {
case !strings.HasPrefix(val, "<"):
return val
case mod == tcell.ModCtrl && !strings.HasPrefix(val, "<c-"):
return "<c-" + val[1:]
case mod == tcell.ModShift:
return "<s-" + val[1:]
case mod == tcell.ModAlt:
return "<a-" + val[1:]
default:
return val
}
}
// This function is used to read a normal event on the client side. For keys,
// digits are interpreted as command counts but this is only done for digits
// preceding any non-digit characters (e.g. "42y2k" as 42 times "y2k").
func (ui *ui) readNormalEvent(ev tcell.Event, nav *nav) expr {
draw := &callExpr{"draw", nil, 1}
count := 0
switch tev := ev.(type) {
case *tcell.EventKey:
// KeyRune is a regular character
if tev.Key() == tcell.KeyRune {
switch {
case tev.Rune() == '<':
ui.keyAcc = append(ui.keyAcc, []rune("<lt>")...)
case tev.Rune() == '>':
ui.keyAcc = append(ui.keyAcc, []rune("<gt>")...)
case tev.Rune() == ' ':
ui.keyAcc = append(ui.keyAcc, []rune("<space>")...)
case tev.Modifiers() == tcell.ModAlt:
ui.keyAcc = append(ui.keyAcc, '<', 'a', '-', tev.Rune(), '>')
case unicode.IsDigit(tev.Rune()) && len(ui.keyAcc) == 0:
ui.keyCount = append(ui.keyCount, tev.Rune())
default:
ui.keyAcc = append(ui.keyAcc, tev.Rune())
}
} else {
val := gKeyVal[tev.Key()]
val = addSpecialKeyModifier(val, tev.Modifiers())
if val == "<esc>" && string(ui.keyAcc) != "" {
ui.keyAcc = nil
ui.keyCount = nil
ui.menuBuf = nil
return draw
}
ui.keyAcc = append(ui.keyAcc, []rune(val)...)
}
if len(ui.keyAcc) == 0 {
return draw
}
binds, ok := findBinds(gOpts.keys, string(ui.keyAcc))
switch len(binds) {
case 0:
ui.echoerrf("unknown mapping: %s", string(ui.keyAcc))
ui.keyAcc = nil
ui.keyCount = nil
ui.menuBuf = nil
return draw
default:
if ok {
if len(ui.keyCount) > 0 {
c, err := strconv.Atoi(string(ui.keyCount))
if err != nil {
log.Printf("converting command count: %s", err)
}
count = c
}
expr := gOpts.keys[string(ui.keyAcc)]
if e, ok := expr.(*callExpr); ok && count != 0 {
expr = &callExpr{e.name, e.args, e.count}
expr.(*callExpr).count = count
} else if e, ok := expr.(*listExpr); ok && count != 0 {
expr = &listExpr{e.exprs, e.count}
expr.(*listExpr).count = count
}
ui.keyAcc = nil
ui.keyCount = nil
ui.menuBuf = nil
return expr
}
ui.menuBuf = listBinds(binds)
return draw
}
case *tcell.EventMouse:
if ui.cmdPrefix != "" {
return nil
}
var button string
switch tev.Buttons() {
case tcell.Button1:
button = "<m-1>"
case tcell.Button2:
button = "<m-2>"
case tcell.Button3:
button = "<m-3>"
case tcell.Button4:
button = "<m-4>"
case tcell.Button5:
button = "<m-5>"
case tcell.Button6:
button = "<m-6>"
case tcell.Button7:
button = "<m-7>"
case tcell.Button8:
button = "<m-8>"
case tcell.WheelUp:
button = "<m-up>"
case tcell.WheelDown:
button = "<m-down>"
case tcell.WheelLeft:
button = "<m-left>"
case tcell.WheelRight:
button = "<m-right>"
case tcell.ButtonNone:
return nil
}
if tev.Modifiers() == tcell.ModCtrl {
button = "<c-" + button[1:]
}
if expr, ok := gOpts.keys[button]; ok {
return expr
}
if button != "<m-1>" && button != "<m-2>" {
ui.echoerrf("unknown mapping: %s", button)
ui.keyAcc = nil
ui.keyCount = nil
ui.menuBuf = nil
return draw
}
x, y := tev.Position()
wind, w := ui.winAt(x, y)
if wind == -1 {
return nil
}
var dir *dir
if gOpts.preview && wind == len(ui.wins)-1 {
curr, err := nav.currFile()
if err != nil {
return nil
} else if !curr.IsDir() || gOpts.dirpreviews {
if tev.Buttons() != tcell.Button2 {
return nil
}
return &callExpr{"open", nil, 1}
}
dir = ui.dirPrev
} else {
dir = ui.dirOfWin(nav, wind)
if dir == nil {
return nil
}
}
var file *file
ind := dir.ind - dir.pos + y - w.y
if ind < len(dir.files) {
file = dir.files[ind]
}
if file != nil {
sel := &callExpr{"select", []string{file.path}, 1}
if tev.Buttons() == tcell.Button1 {
return sel
}
if file.IsDir() {
return &callExpr{"cd", []string{file.path}, 1}
}
return &listExpr{[]expr{sel, &callExpr{"open", nil, 1}}, 1}
}
if tev.Buttons() == tcell.Button1 {
return &callExpr{"cd", []string{dir.path}, 1}
}
case *tcell.EventResize:
return &callExpr{"redraw", nil, 1}
case *tcell.EventError:
log.Printf("Got EventError: '%s' at %s", tev.Error(), tev.When())
case *tcell.EventInterrupt:
log.Printf("Got EventInterrupt: at %s", tev.When())
case *tcell.EventFocus:
if tev.Focused {
return &callExpr{"on-focus-gained", nil, 1}
} else {
return &callExpr{"on-focus-lost", nil, 1}
}
}
return nil
}
func readCmdEvent(ev tcell.Event) expr {
switch tev := ev.(type) {
case *tcell.EventKey:
if tev.Key() == tcell.KeyRune {
if tev.Modifiers() == tcell.ModMask(tcell.ModAlt) {
val := string([]rune{'<', 'a', '-', tev.Rune(), '>'})
if expr, ok := gOpts.cmdkeys[val]; ok {
return expr
}
} else {
return &callExpr{"cmd-insert", []string{string(tev.Rune())}, 1}
}
} else {
val := gKeyVal[tev.Key()]
val = addSpecialKeyModifier(val, tev.Modifiers())
if expr, ok := gOpts.cmdkeys[val]; ok {
return expr
}
}
}
return nil
}
func (ui *ui) readEvent(ev tcell.Event, nav *nav) expr {
if ev == nil {
return nil
}
if _, ok := ev.(*tcell.EventKey); ok && ui.cmdPrefix != "" {
return readCmdEvent(ev)
}
return ui.readNormalEvent(ev, nav)
}
func (ui *ui) readExpr() {
go func() {
for {
ui.evChan <- ui.pollEvent()
}
}()
}
func (ui *ui) suspend() error {
return ui.screen.Suspend()
}
func (ui *ui) resume() error {
err := ui.screen.Resume()
if !ui.polling {
go ui.pollEvents()
ui.polling = true
}
return err
}
func (ui *ui) exportMode() {
getMode := func() string {
if strings.HasPrefix(ui.cmdPrefix, "delete") {
return "delete"
}
if strings.HasPrefix(ui.cmdPrefix, "replace") || strings.HasPrefix(ui.cmdPrefix, "create") {
return "rename"
}
switch ui.cmdPrefix {
case "filter: ":
return "filter"
case "find: ", "find-back: ":
return "find"
case "mark-save: ", "mark-load: ", "mark-remove: ":
return "mark"
case "rename: ":
return "rename"
case "/", "?":
return "search"
case ":":
return "command"
case "$", "%", "!", "&":
return "shell"
case ">":
return "pipe"
case "":
return "normal"
default:
return "unknown"
}
}
os.Setenv("lf_mode", getMode())
}
func (ui *ui) exportSizes() {
w, h := ui.screen.Size()
os.Setenv("lf_width", strconv.Itoa(w))
os.Setenv("lf_height", strconv.Itoa(h))
}
func anyKey() {
fmt.Fprint(os.Stderr, gOpts.waitmsg)
defer fmt.Fprint(os.Stderr, "\n")
oldState, err := term.MakeRaw(int(os.Stdin.Fd()))
if err != nil {
panic(err)
}
defer term.Restore(int(os.Stdin.Fd()), oldState)
b := make([]byte, 1)
os.Stdin.Read(b)
}
func listMatches(screen tcell.Screen, matches []string, selectedInd int) *bytes.Buffer {
if len(matches) < 2 {
return nil
}
b := new(bytes.Buffer)
wtot, _ := screen.Size()
wcol := 0
for _, m := range matches {
wcol = max(wcol, len(m))
}
wcol += gOpts.tabstop - wcol%gOpts.tabstop
ncol := max(wtot/wcol, 1)
b.WriteString("possible matches\n")
for i := 0; i < len(matches); {
for j := 0; j < ncol && i < len(matches); i, j = i+1, j+1 {
target := matches[i]
if selectedInd == i {
target = fmt.Sprintf("\033[7m%s\033[0m%*s", target, wcol-len(target), "")
} else {
target = fmt.Sprintf("%s%*s", target, wcol-len(target), "")
}
b.WriteString(target)
}
b.WriteByte('\n')
}
return b
}
```
|
```go
package input
import (
"rsprd.com/spread/pkg/entity"
)
// Input represents a source of Entities and metadata.
type Input interface {
entity.Builder
}
```
|
```objective-c
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
/*
* The following is auto-generated. Do not manually edit. See scripts/loops.js.
*/
#ifndef STDLIB_NDARRAY_BASE_UNARY_B_T_H
#define STDLIB_NDARRAY_BASE_UNARY_B_T_H
#include "stdlib/ndarray/ctor.h"
#include <stdint.h>
/*
* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* Applies a unary callback to an input ndarray and assigns results to elements in an output ndarray.
*/
int8_t stdlib_ndarray_b_t( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a zero-dimensional input ndarray and assigns results to elements in a zero-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_0d( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a one-dimensional input ndarray and assigns results to elements in a one-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_1d( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a two-dimensional input ndarray and assigns results to elements in a two-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_2d( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a two-dimensional input ndarray and assigns results to elements in a two-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_2d_blocked( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a three-dimensional input ndarray and assigns results to elements in a three-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_3d( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a three-dimensional input ndarray and assigns results to elements in a three-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_3d_blocked( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a four-dimensional input ndarray and assigns results to elements in a four-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_4d( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a four-dimensional input ndarray and assigns results to elements in a four-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_4d_blocked( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a five-dimensional input ndarray and assigns results to elements in a five-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_5d( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a five-dimensional input ndarray and assigns results to elements in a five-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_5d_blocked( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a six-dimensional input ndarray and assigns results to elements in a six-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_6d( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a six-dimensional input ndarray and assigns results to elements in a six-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_6d_blocked( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a seven-dimensional input ndarray and assigns results to elements in a seven-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_7d( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a seven-dimensional input ndarray and assigns results to elements in a seven-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_7d_blocked( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to an eight-dimensional input ndarray and assigns results to elements in an eight-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_8d( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to an eight-dimensional input ndarray and assigns results to elements in an eight-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_8d_blocked( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a nine-dimensional input ndarray and assigns results to elements in a nine-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_9d( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a nine-dimensional input ndarray and assigns results to elements in a nine-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_9d_blocked( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a ten-dimensional input ndarray and assigns results to elements in a ten-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_10d( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to a ten-dimensional input ndarray and assigns results to elements in a ten-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_10d_blocked( struct ndarray *arrays[], void *fcn );
/**
* Applies a unary callback to an n-dimensional input ndarray and assigns results to elements in an n-dimensional output ndarray.
*/
int8_t stdlib_ndarray_b_t_nd( struct ndarray *arrays[], void *fcn );
#ifdef __cplusplus
}
#endif
#endif // !STDLIB_NDARRAY_BASE_UNARY_B_T_H
```
|
```toml
[package]
org = "sameera"
name = "myproject"
version = "0.1.0"
[[platform.java17.dependency]]
path = "./libs/one-1.0.0.jar"
graalvmCompatible = true
[[platform.java11.dependency]]
path = "./libs/one-1.0.1.jar"
graalvmCompatible = false
```
|
```go
package fontscan
import (
"fmt"
"log"
"os"
"path/filepath"
"runtime"
"sort"
"sync"
"github.com/go-text/typesetting/font"
"github.com/go-text/typesetting/language"
meta "github.com/go-text/typesetting/opentype/api/metadata"
"github.com/go-text/typesetting/opentype/loader"
)
type cacheEntry struct {
Location
Family string
meta.Aspect
}
// Logger is a type that can log warnings.
type Logger interface {
Printf(format string, args ...interface{})
}
// The family substitution algorithm is copied from fontconfig
// and the match algorithm is inspired from Rust font-kit library
// FontMap provides a mechanism to select a [font.Face] from a font description.
// It supports system and user-provided fonts, and implements the CSS font substitutions
// rules.
//
// Note that [FontMap] is NOT safe for concurrent use, but several font maps may coexist
// in an application.
//
// [FontMap] is designed to work with an index built by scanning the system fonts,
// which is a costly operation (see [UseSystemFonts] for more details).
// A lightweight alternative is provided by the [FindFont] function, which only uses
// file paths to select a font.
type FontMap struct {
logger Logger
// caches of already loaded faceCache : the two maps are updated conjointly
firstFace font.Face
faceCache map[Location]font.Face
metaCache map[font.Font]cacheEntry
// the database to query, either loaded from an index
// or populated with the [UseSystemFonts], [AddFont], and/or [AddFace] method.
database fontSet
scriptMap map[language.Script][]int
lru runeLRU
// built holds whether the candidates are populated.
built bool
// the candidates for the current query, which influences ResolveFace output
candidates candidates
// internal buffers used in SetQuery
footprintsBuffer scoredFootprints
cribleBuffer familyCrible
query Query // current query
}
// NewFontMap return a new font map, which should be filled with the `UseSystemFonts`
// or `AddFont` methods. The provided logger will be used to record non-fatal errors
// encountered during font loading. If logger is nil, log.Default() is used.
func NewFontMap(logger Logger) *FontMap {
if logger == nil {
logger = log.New(log.Writer(), "fontscan", log.Flags())
}
fm := &FontMap{
logger: logger,
faceCache: make(map[Location]font.Face),
metaCache: make(map[font.Font]cacheEntry),
cribleBuffer: make(familyCrible),
scriptMap: make(map[language.Script][]int),
}
fm.lru.maxSize = 4096
return fm
}
// SetRuneCacheSize configures the size of the cache powering [FontMap.ResolveFace].
// Applications displaying large quantities of text should tune this value to be greater
// than the number of unique glyphs they expect to display at one time in order to achieve
// optimal performance when segmenting text by face rune coverage.
func (fm *FontMap) SetRuneCacheSize(size int) {
fm.lru.maxSize = size
}
// UseSystemFonts loads the system fonts and adds them to the font map.
// This method is safe for concurrent use, but should only be called once
// per font map.
// The first call of this method trigger a rather long scan.
// A per-application on-disk cache is used to speed up subsequent initialisations.
// Callers can provide an appropriate directory path within which this cache may be
// stored. If the empty string is provided, the FontMap will attempt to infer a correct,
// platform-dependent cache path.
//
// NOTE: On Android, callers *must* provide a writable path manually, as it cannot
// be inferred without access to the Java runtime environment of the application.
func (fm *FontMap) UseSystemFonts(cacheDir string) error {
// safe for concurrent use; subsequent calls are no-ops
err := initSystemFonts(fm.logger, cacheDir)
if err != nil {
return err
}
// systemFonts is read-only, so may be used concurrently
fm.appendFootprints(systemFonts.flatten()...)
fm.built = false
fm.lru.Clear()
return nil
}
// appendFootprints adds the provided footprints to the database and maps their script
// coverage.
func (fm *FontMap) appendFootprints(footprints ...footprint) {
startIdx := len(fm.database)
fm.database = append(fm.database, footprints...)
// Insert entries into scriptMap for each footprint's covered scripts.
for i, fp := range footprints {
dbIdx := startIdx + i
for _, script := range fp.scripts {
fm.scriptMap[script] = append(fm.scriptMap[script], dbIdx)
}
}
}
// systemFonts is a global index of the system fonts.
// initSystemFontsOnce protects the initial assignment,
// and `systemFonts` use is then read-only
var (
systemFonts systemFontsIndex
initSystemFontsOnce sync.Once
)
func cacheDir(userProvided string) (string, error) {
if userProvided != "" {
return userProvided, nil
}
// load an existing index
if runtime.GOOS == "android" {
// There is no stable way to infer the proper place to store the cache
// with access to the Java runtime for the application. Rather than
// clutter our API with that, require the caller to provide a path.
return "", fmt.Errorf("user must provide cache directory on android")
}
configDir, err := os.UserCacheDir()
if err != nil {
return "", fmt.Errorf("resolving index cache path: %s", err)
}
return configDir, nil
}
// initSystemFonts scan the system fonts and update `SystemFonts`.
// If the returned error is nil, `SystemFonts` is guaranteed to contain
// at least one valid font.Face.
// It is protected by sync.Once, and is then safe to use by multiple goroutines.
func initSystemFonts(logger Logger, userCacheDir string) error {
var err error
initSystemFontsOnce.Do(func() {
const cacheFilePattern = "font_index_v%d.cache"
// load an existing index
var dir string
dir, err = cacheDir(userCacheDir)
if err != nil {
return
}
cachePath := filepath.Join(dir, fmt.Sprintf(cacheFilePattern, cacheFormatVersion))
systemFonts, err = refreshSystemFontsIndex(logger, cachePath)
})
return err
}
func refreshSystemFontsIndex(logger Logger, cachePath string) (systemFontsIndex, error) {
fontDirectories, err := DefaultFontDirectories(logger)
if err != nil {
return nil, fmt.Errorf("searching font directories: %s", err)
}
logger.Printf("using system font dirs %q", fontDirectories)
currentIndex, _ := deserializeIndexFile(cachePath)
// if an error occured (the cache file does not exists or is invalid), we start from scratch
updatedIndex, err := scanFontFootprints(logger, currentIndex, fontDirectories...)
if err != nil {
return nil, fmt.Errorf("scanning system fonts: %s", err)
}
// since ResolveFace must always return a valid face, we make sure
// at least one font exists and is valid.
// Otherwise, the font map is useless; this is an extreme case anyway.
err = updatedIndex.assertValid()
if err != nil {
return nil, fmt.Errorf("loading system fonts: %s", err)
}
// write back the index in the cache file
err = updatedIndex.serializeToFile(cachePath)
if err != nil {
return nil, fmt.Errorf("updating cache: %s", err)
}
return updatedIndex, nil
}
// [AddFont] loads the faces contained in [fontFile] and add them to
// the font map.
// [fileID] is used as the [Location.File] entry returned by [FontLocation].
//
// If `familyName` is not empty, it is used as the family name for `fontFile`
// instead of the one found in the font file.
//
// An error is returned if the font resource is not supported.
//
// The order of calls to [AddFont] and [AddFace] determines relative priority
// of manually loaded fonts. See [ResolveFace] for details about when this matters.
func (fm *FontMap) AddFont(fontFile font.Resource, fileID, familyName string) error {
loaders, err := loader.NewLoaders(fontFile)
if err != nil {
return fmt.Errorf("unsupported font resource: %s", err)
}
// eagerly load the faces
faces, err := font.ParseTTC(fontFile)
if err != nil {
return fmt.Errorf("unsupported font resource: %s", err)
}
// by construction of fonts.Loader and fonts.FontDescriptor,
// fontDescriptors and face have the same length
if len(faces) != len(loaders) {
panic("internal error: inconsistent font descriptors and loader")
}
var addedFonts []footprint
for i, fontDesc := range loaders {
fp, _, err := newFootprintFromLoader(fontDesc, true, scanBuffer{})
// the font won't be usable, just ignore it
if err != nil {
continue
}
fp.Location.File = fileID
fp.Location.Index = uint16(i)
// TODO: for now, we do not handle variable fonts
if familyName != "" {
// give priority to the user provided family
fp.Family = meta.NormalizeFamily(familyName)
}
addedFonts = append(addedFonts, fp)
fm.cache(fp, faces[i])
}
if len(addedFonts) == 0 {
return fmt.Errorf("empty font resource %s", fileID)
}
fm.appendFootprints(addedFonts...)
fm.built = false
fm.lru.Clear()
return nil
}
// [AddFace] inserts an already-loaded font.Face into the FontMap. The caller
// is responsible for ensuring that [md] is accurate for the face.
//
// The order of calls to [AddFont] and [AddFace] determines relative priority
// of manually loaded fonts. See [ResolveFace] for details about when this matters.
func (fm *FontMap) AddFace(face font.Face, md meta.Description) {
fp := newFootprintFromFont(face.Font, md)
fm.cache(fp, face)
fm.appendFootprints(fp)
fm.built = false
fm.lru.Clear()
}
func (fm *FontMap) cache(fp footprint, face font.Face) {
if fm.firstFace == nil {
fm.firstFace = face
}
fm.faceCache[fp.Location] = face
fm.metaCache[face.Font] = cacheEntry{fp.Location, fp.Family, fp.Aspect}
}
// FontLocation returns the origin of the provided font. If the font was not
// previously returned from this FontMap by a call to ResolveFace, the zero
// value will be returned instead.
func (fm *FontMap) FontLocation(ft font.Font) Location {
return fm.metaCache[ft].Location
}
// FontMetadata returns a description of the provided font. If the font was not
// previously returned from this FontMap by a call to ResolveFace, the zero
// value will be returned instead.
func (fm *FontMap) FontMetadata(ft font.Font) (family string, aspect meta.Aspect) {
item := fm.metaCache[ft]
return item.Family, item.Aspect
}
// SetQuery set the families and aspect required, influencing subsequent
// `ResolveFace` calls.
func (fm *FontMap) SetQuery(query Query) {
if len(query.Families) == 0 {
query.Families = []string{""}
}
fm.query = query
fm.built = false
}
// candidates is a cache storing the indices into FontMap.database of footprints matching a Query
type candidates struct {
// the two fallback slices have the same length: the number of family in the query
withFallback [][]int // for each queried family
withoutFallback []int // for each queried family, only one footprint is selected
manual []int // manually inserted faces to be tried if the other candidates fail.
}
func (cd *candidates) resetWithSize(candidateSize int) {
if cap(cd.withFallback) < candidateSize { // reallocate
cd.withFallback = make([][]int, candidateSize)
cd.withoutFallback = make([]int, candidateSize)
}
// only reslice
cd.withFallback = cd.withFallback[0:candidateSize]
cd.withoutFallback = cd.withoutFallback[0:candidateSize]
// reset to "zero" values
for i := range cd.withoutFallback {
cd.withFallback[i] = nil
cd.withoutFallback[i] = -1
}
cd.manual = cd.manual[0:]
}
func (fm *FontMap) buildCandidates() {
if fm.built {
return
}
fm.candidates.resetWithSize(len(fm.query.Families))
selectFootprints := func(systemFallback bool) {
for familyIndex, family := range fm.query.Families {
candidates := fm.database.selectByFamily(family, systemFallback, &fm.footprintsBuffer, fm.cribleBuffer)
if len(candidates) == 0 {
continue
}
// select the correct aspects
candidates = fm.database.retainsBestMatches(candidates, fm.query.Aspect)
if systemFallback {
// candidates is owned by fm.footprintsBuffer: copy its content
S := fm.candidates.withFallback[familyIndex]
if L := len(candidates); cap(S) < L {
S = make([]int, L)
} else {
S = S[:L]
}
copy(S, candidates)
fm.candidates.withFallback[familyIndex] = S
} else {
// when no systemFallback is required, the CSS spec says
// that only one font among the candidates must be tried
fm.candidates.withoutFallback[familyIndex] = candidates[0]
}
}
}
selectFootprints(false)
selectFootprints(true)
fm.candidates.manual = fm.database.filterUserProvided(fm.candidates.manual)
fm.candidates.manual = fm.database.retainsBestMatches(fm.candidates.manual, fm.query.Aspect)
fm.built = true
}
// returns nil if not candidates supports the rune `r`
func (fm *FontMap) resolveForRune(candidates []int, r rune) font.Face {
// we first look up for an exact family match, without substitutions
for _, footprintIndex := range candidates {
// check the coverage
if fp := fm.database[footprintIndex]; fp.Runes.Contains(r) {
// try to use the font
face, err := fm.loadFont(fp)
if err != nil { // very unlikely; try an other family
fm.logger.Printf("failed loading face: %v", err)
continue
}
return face
}
}
return nil
}
// ResolveFace select a font based on the current query (see `SetQuery`),
// and supporting the given rune, applying CSS font selection rules.
// The function will return nil if the underlying font database is empty,
// or if the file system is broken; otherwise the returned [font.Face] is always valid.
//
// If no fonts match the current query for the current rune according to the
// builtin matching process, the fonts added manually by [AddFont] and [AddFace]
// will be searched in the order in which they were added for a font with coverage
// for the provided rune. The first font covering the requested rune will be returned.
//
// If no fonts match after the manual font search, an arbitrary face will be returned.
func (fm *FontMap) ResolveFace(r rune) (face font.Face) {
key := fm.lru.KeyFor(fm.query, r)
face, ok := fm.lru.Get(key, fm.query)
if ok {
return face
}
defer func() {
fm.lru.Put(key, fm.query, face)
}()
// Build the candidates if we missed the cache. If they're already built this is a
// no-op.
fm.buildCandidates()
// we first look up for an exact family match, without substitutions
for _, footprintIndex := range fm.candidates.withoutFallback {
if footprintIndex == -1 {
continue
}
if face := fm.resolveForRune([]int{footprintIndex}, r); face != nil {
return face
}
}
// if no family has matched so far, try again with system fallback
for _, footprintIndexList := range fm.candidates.withFallback {
if face := fm.resolveForRune(footprintIndexList, r); face != nil {
return face
}
}
// try manually loaded faces even if the typeface doesn't match, looking for matching aspects
// and rune coverage.
for _, footprintIndex := range fm.candidates.manual {
if footprintIndex == -1 {
continue
}
if face := fm.resolveForRune([]int{footprintIndex}, r); face != nil {
return face
}
}
fm.logger.Printf("No font matched for %q and rune %U (%c) -> searching by script coverage and aspect", fm.query.Families, r, r)
script := language.LookupScript(r)
scriptCandidates, ok := fm.scriptMap[language.LookupScript(r)]
if ok {
aspectCandidates := make([]int, len(scriptCandidates))
copy(aspectCandidates, scriptCandidates)
// Filter candidates to those matching the requested aspect first.
aspectCandidates = fm.database.retainsBestMatches(aspectCandidates, fm.query.Aspect)
if face := fm.resolveForRune(aspectCandidates, r); face != nil {
return face
}
fm.logger.Printf("No font matched for aspect %v, script %s, and rune %U (%c) -> searching by script coverage only", fm.query.Aspect, script, r, r)
// aspectCandidates has been filtered down and has exactly enough excess capacity to hold
// the other original candidates.
allCandidates := aspectCandidates[len(aspectCandidates):len(aspectCandidates):cap(aspectCandidates)]
// Populate allCandidates with every script candidate that isn't in aspectCandidates.
for _, idx := range scriptCandidates {
possibleIdx := sort.Search(len(aspectCandidates), func(i int) bool {
return aspectCandidates[i] >= idx
})
if possibleIdx < len(aspectCandidates) && aspectCandidates[possibleIdx] == idx {
continue
}
allCandidates = append(allCandidates, idx)
}
// Try allCandidates.
if face := fm.resolveForRune(allCandidates, r); face != nil {
return face
}
}
fm.logger.Printf("No font matched for script %s and rune %U (%c) -> returning arbitrary face", script, r, r)
// return an arbitrary face
if fm.firstFace == nil && len(fm.database) > 0 {
for _, fp := range fm.database {
face, err := fm.loadFont(fp)
if err != nil {
// very unlikely; warn and keep going
fm.logger.Printf("failed loading face: %v", err)
continue
}
return face
}
}
return fm.firstFace
// refreshSystemFontsIndex makes sure at least one face is valid
// and AddFont also check for valid font files, meaning that
// a valid FontMap should always contain a valid face,
// and we should never return a nil face.
}
func (fm *FontMap) loadFont(fp footprint) (font.Face, error) {
if face, hasCached := fm.faceCache[fp.Location]; hasCached {
return face, nil
}
// since user provided fonts are added to `fonts`
// we may now assume the font is stored on the file system
face, err := fp.loadFromDisk()
if err != nil {
return nil, err
}
// add the face to the cache
fm.cache(fp, face)
return face, nil
}
```
|
James Higson (born 1876) was an English footballer. His regular position was as a forward. He was born in Manchester. He played for Manchester Wednesday and Manchester United.
External links
MUFCInfo.com profile
1876 births
English men's footballers
Manchester United F.C. players
Year of death missing
Men's association football forwards
Footballers from Manchester
|
```php
<?php
require_once __DIR__ . '/../bootstrap.php';
$source = Rx\Observable::range(0, 9)->average();
$subscription = $source->subscribe($stdoutObserver);
```
|
```php
<?php
/*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
*/
namespace Google\Service\GKEOnPrem;
class ValidationCheckStatus extends \Google\Collection
{
protected $collection_key = 'result';
protected $resultType = ValidationCheckResult::class;
protected $resultDataType = 'array';
/**
* @param ValidationCheckResult[]
*/
public function setResult($result)
{
$this->result = $result;
}
/**
* @return ValidationCheckResult[]
*/
public function getResult()
{
return $this->result;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ValidationCheckStatus::class, 'Google_Service_GKEOnPrem_ValidationCheckStatus');
```
|
Caleb Scudder (1795 in New Jersey – 1866 in Indianapolis, Indiana) was the third mayor of the city of Indianapolis, Indiana, and served from 1851 to 1854 as a member of the Whig Party. Born in New Jersey, Scudder moved at a young age to Dayton, Ohio. He was a cabinet-maker by trade, but also served as a magistrate before his term as mayor.
References
1795 births
1866 deaths
Mayors of Indianapolis
Indiana Whigs
19th-century American politicians
|
```javascript
import { BaseItemCounts } from '../lib/BaseItemCounts.js'
import * as Factory from '../lib/factory.js'
import { createRelatedNoteTagPairPayload } from '../lib/Items.js'
chai.use(chaiAsPromised)
const expect = chai.expect
describe('importing', function () {
this.timeout(Factory.TenSecondTimeout)
let expectedItemCount
let application
let email
let password
let context
afterEach(async function () {
if (application) {
await Factory.safeDeinit(application)
}
localStorage.clear()
application = undefined
context = undefined
})
describe('fake crypto', function () {
beforeEach(async function () {
localStorage.clear()
expectedItemCount = BaseItemCounts.DefaultItems
context = await Factory.createAppContext()
await context.launch()
application = context.application
email = UuidGenerator.GenerateUuid()
password = UuidGenerator.GenerateUuid()
Factory.handlePasswordChallenges(application, password)
})
it('should not import backups made from unsupported versions', async function () {
const result = await application.importData({
version: '-1',
items: [],
})
expect(result.isFailed()).to.be.true
})
it('should not import backups made from 004 into 003 account', async function () {
await Factory.registerOldUser({
application,
email,
password,
version: ProtocolVersion.V003,
})
const result = await application.importData({
version: ProtocolVersion.V004,
items: [],
})
expect(result.isFailed()).to.be.true
})
it('importing existing data should keep relationships valid', async function () {
const pair = createRelatedNoteTagPairPayload()
const notePayload = pair[0]
const tagPayload = pair[1]
await application.mutator.emitItemsFromPayloads([notePayload, tagPayload], PayloadEmitSource.LocalChanged)
expectedItemCount += 2
const note = application.items.getItems([ContentType.TYPES.Note])[0]
const tag = application.items.getItems([ContentType.TYPES.Tag])[0]
expect(tag.content.references.length).to.equal(1)
expect(tag.noteCount).to.equal(1)
expect(note.content.references.length).to.equal(0)
expect(application.items.itemsReferencingItem(note).length).to.equal(1)
await application.importData(
{
items: [notePayload, tagPayload],
},
true,
)
expect(application.items.items.length).to.equal(expectedItemCount)
expect(tag.content.references.length).to.equal(1)
expect(tag.noteCount).to.equal(1)
expect(note.content.references.length).to.equal(0)
expect(application.items.itemsReferencingItem(note).length).to.equal(1)
})
it('importing same note many times should create only one duplicate', async function () {
/**
* Used strategy here will be KEEP_LEFT_DUPLICATE_RIGHT
* which means that new right items will be created with different
*/
const notePayload = Factory.createNotePayload()
await application.mutator.emitItemFromPayload(notePayload, PayloadEmitSource.LocalChanged)
expectedItemCount++
const mutatedNote = new DecryptedPayload({
...notePayload,
content: {
...notePayload.content,
title: `${Math.random()}`,
},
})
await application.importData(
{
items: [mutatedNote, mutatedNote, mutatedNote],
},
true,
)
expectedItemCount++
expect(application.items.getDisplayableNotes().length).to.equal(2)
const imported = application.items.getDisplayableNotes().find((n) => n.uuid !== notePayload.uuid)
expect(imported.content.title).to.equal(mutatedNote.content.title)
})
it('importing a tag with lesser references should not create duplicate', async function () {
const pair = createRelatedNoteTagPairPayload()
const tagPayload = pair[1]
await application.mutator.emitItemsFromPayloads(pair, PayloadEmitSource.LocalChanged)
const mutatedTag = new DecryptedPayload({
...tagPayload,
content: {
...tagPayload.content,
references: [],
},
})
await application.importData(
{
items: [mutatedTag],
},
true,
)
expect(application.items.getDisplayableTags().length).to.equal(1)
expect(application.items.findItem(tagPayload.uuid).content.references.length).to.equal(1)
})
it('importing data with differing content should create duplicates', async function () {
const pair = createRelatedNoteTagPairPayload()
const notePayload = pair[0]
const tagPayload = pair[1]
await application.mutator.emitItemsFromPayloads(pair, PayloadEmitSource.LocalChanged)
expectedItemCount += 2
const note = application.items.getDisplayableNotes()[0]
const tag = application.items.getDisplayableTags()[0]
const mutatedNote = new DecryptedPayload({
...notePayload,
content: {
...notePayload.content,
title: `${Math.random()}`,
},
})
const mutatedTag = new DecryptedPayload({
...tagPayload,
content: {
...tagPayload.content,
title: `${Math.random()}`,
},
})
await application.importData(
{
items: [mutatedNote, mutatedTag],
},
true,
)
expectedItemCount += 2
expect(application.items.items.length).to.equal(expectedItemCount)
const newNote = application.items.getDisplayableNotes().find((n) => n.uuid !== notePayload.uuid)
const newTag = application.items.getDisplayableTags().find((t) => t.uuid !== tagPayload.uuid)
expect(newNote.uuid).to.not.equal(note.uuid)
expect(newTag.uuid).to.not.equal(tag.uuid)
const refreshedTag = application.items.findItem(tag.uuid)
expect(refreshedTag.content.references.length).to.equal(2)
expect(refreshedTag.noteCount).to.equal(2)
const refreshedNote = application.items.findItem(note.uuid)
expect(refreshedNote.content.references.length).to.equal(0)
expect(application.items.itemsReferencingItem(refreshedNote).length).to.equal(2)
expect(newTag.content.references.length).to.equal(1)
expect(newTag.noteCount).to.equal(1)
expect(newNote.content.references.length).to.equal(0)
expect(application.items.itemsReferencingItem(newNote).length).to.equal(1)
})
it('when importing items, imported values should not be used to determine if changed', async function () {
/**
* If you have a note and a tag, and the tag has 1 reference to the note,
* and you import the same two items, except modify the note value so that
* a duplicate is created, we expect only the note to be duplicated, and the
* tag not to. However, if only the note changes, and you duplicate the note,
* which causes the tag's references content to change, then when the incoming
* tag is being processed, it will also think it has changed, since our local
* value now doesn't match what's coming in. The solution is to get all values
* ahead of time before any changes are made.
*/
const note = await Factory.createMappedNote(application)
const tag = await Factory.createMappedTag(application)
expectedItemCount += 2
await application.mutator.changeItem(tag, (mutator) => {
mutator.e2ePendingRefactor_addItemAsRelationship(note)
})
const externalNote = Object.assign(
{},
{
uuid: note.uuid,
content: note.getContentCopy(),
content_type: note.content_type,
},
)
externalNote.content.text = `${Math.random()}`
const externalTag = Object.assign(
{},
{
uuid: tag.uuid,
content: tag.getContentCopy(),
content_type: tag.content_type,
},
)
await application.importData(
{
items: [externalNote, externalTag],
},
true,
)
expectedItemCount += 1
/** We expect now that the total item count is 3, not 4. */
expect(application.items.items.length).to.equal(expectedItemCount)
const refreshedTag = application.items.findItem(tag.uuid)
/** References from both items have merged. */
expect(refreshedTag.content.references.length).to.equal(2)
})
it('should import decrypted data and keep items that were previously deleted', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
Factory.handlePasswordChallenges(application, password)
const [note, tag] = await Promise.all([
Factory.createMappedNote(application),
Factory.createMappedTag(application),
])
await application.sync.sync({ awaitAll: true })
await application.mutator.deleteItem(note)
await application.sync.sync()
expect(application.items.findItem(note.uuid)).to.not.exist
await application.mutator.deleteItem(tag)
await application.sync.sync()
expect(application.items.findItem(tag.uuid)).to.not.exist
await application.importData(
{
items: [note, tag],
},
true,
)
expect(application.items.getDisplayableNotes().length).to.equal(1)
expect(application.items.findItem(note.uuid).deleted).to.not.be.ok
expect(application.items.getDisplayableTags().length).to.equal(1)
expect(application.items.findItem(tag.uuid).deleted).to.not.be.ok
})
it('should duplicate notes by alternating UUIDs when dealing with conflicts during importing', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
const note = await Factory.createSyncedNote(application)
/** Sign into another account and import the same item. It should get a different UUID. */
application = await Factory.signOutApplicationAndReturnNew(application)
email = UuidGenerator.GenerateUuid()
Factory.handlePasswordChallenges(application, password)
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
await application.importData(
{
items: [note.payload],
},
true,
)
expect(application.items.getDisplayableNotes().length).to.equal(1)
expect(application.items.getDisplayableNotes()[0].uuid).to.not.equal(note.uuid)
})
it('should maintain consistency between storage and PayloadManager after an import with conflicts', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
const note = await Factory.createSyncedNote(application)
/** Sign into another account and import the same items. They should get a different UUID. */
application = await Factory.signOutApplicationAndReturnNew(application)
email = UuidGenerator.GenerateUuid()
Factory.handlePasswordChallenges(application, password)
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
await application.importData(
{
items: [note],
},
true,
)
const storedPayloads = await application.storage.getAllRawPayloads()
expect(application.items.items.length).to.equal(storedPayloads.length)
const notes = storedPayloads.filter((p) => p.content_type === ContentType.TYPES.Note)
const itemsKeys = storedPayloads.filter((p) => p.content_type === ContentType.TYPES.ItemsKey)
expect(notes.length).to.equal(1)
expect(itemsKeys.length).to.equal(1)
})
it('should import encrypted data and keep items that were previously deleted', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
const [note, tag] = await Promise.all([
Factory.createMappedNote(application),
Factory.createMappedTag(application),
])
const backupData = (await application.createEncryptedBackupFile.execute({ skipAuthorization: true })).getValue()
await application.sync.sync({ awaitAll: true })
await application.mutator.deleteItem(note)
await application.sync.sync()
expect(application.items.findItem(note.uuid)).to.not.exist
await application.mutator.deleteItem(tag)
await application.sync.sync()
expect(application.items.findItem(tag.uuid)).to.not.exist
await application.importData(backupData, true)
expect(application.items.getDisplayableNotes().length).to.equal(1)
expect(application.items.findItem(note.uuid).deleted).to.not.be.ok
expect(application.items.getDisplayableTags().length).to.equal(1)
expect(application.items.findItem(tag.uuid).deleted).to.not.be.ok
})
it('should import decrypted data and all items payload source should be FileImport', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
const [note, tag] = await Promise.all([
Factory.createMappedNote(application),
Factory.createMappedTag(application),
])
const backupData = (await application.createEncryptedBackupFile.execute({ skipAuthorization: true })).getValue()
await Factory.safeDeinit(application)
application = await Factory.createInitAppWithFakeCrypto()
Factory.handlePasswordChallenges(application, password)
await application.importData(backupData, true)
const importedNote = application.items.findItem(note.uuid)
const importedTag = application.items.findItem(tag.uuid)
expect(importedNote.payload.source).to.be.equal(PayloadSource.FileImport)
expect(importedTag.payload.source).to.be.equal(PayloadSource.FileImport)
})
it('should import encrypted data and all items payload source should be FileImport', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
const [note, tag] = await Promise.all([
Factory.createMappedNote(application),
Factory.createMappedTag(application),
])
const backupData = (await application.createEncryptedBackupFile.execute({ skipAuthorization: true })).getValue()
await Factory.safeDeinit(application)
application = await Factory.createInitAppWithFakeCrypto()
Factory.handlePasswordChallenges(application, password)
await application.importData(backupData, true)
const importedNote = application.items.findItem(note.uuid)
const importedTag = application.items.findItem(tag.uuid)
expect(importedNote.payload.source).to.be.equal(PayloadSource.FileImport)
expect(importedTag.payload.source).to.be.equal(PayloadSource.FileImport)
})
it('should import data from 003 encrypted payload using client generated backup', async function () {
const oldVersion = ProtocolVersion.V003
await Factory.registerOldUser({
application: application,
email: email,
password: password,
version: oldVersion,
})
const noteItem = await application.mutator.createItem(ContentType.TYPES.Note, {
title: 'Encrypted note',
text: 'On protocol version 003.',
})
const backupData = (await application.createEncryptedBackupFile.execute({ skipAuthorization: true })).getValue()
await Factory.safeDeinit(application)
application = await Factory.createInitAppWithFakeCrypto()
Factory.handlePasswordChallenges(application, password)
const result = (await application.importData(backupData, true)).getValue()
expect(result.affectedItems.length).to.be.eq(backupData.items.length)
expect(result.errorCount).to.be.eq(0)
const decryptedNote = application.items.findItem(noteItem.uuid)
expect(decryptedNote.title).to.be.eq('Encrypted note')
expect(decryptedNote.text).to.be.eq('On protocol version 003.')
expect(application.items.getDisplayableNotes().length).to.equal(1)
})
it('should import data from 004 encrypted payload', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
const noteItem = await application.mutator.createItem(ContentType.TYPES.Note, {
title: 'Encrypted note',
text: 'On protocol version 004.',
})
const backupData = (await application.createEncryptedBackupFile.execute({ skipAuthorization: true })).getValue()
await Factory.safeDeinit(application)
application = await Factory.createInitAppWithFakeCrypto()
Factory.handlePasswordChallenges(application, password)
const result = (await application.importData(backupData, true)).getValue()
expect(result.affectedItems.length).to.be.eq(backupData.items.length)
expect(result.errorCount).to.be.eq(0)
const decryptedNote = application.items.findItem(noteItem.uuid)
expect(decryptedNote.title).to.be.eq('Encrypted note')
expect(decryptedNote.text).to.be.eq('On protocol version 004.')
expect(application.items.getDisplayableNotes().length).to.equal(1)
})
it('should return correct errorCount', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
const noteItem = await application.mutator.createItem(ContentType.TYPES.Note, {
title: 'This is a valid, encrypted note',
text: 'On protocol version 004.',
})
const backupData = (await application.createEncryptedBackupFile.execute({ skipAuthorization: true })).getValue()
await Factory.safeDeinit(application)
application = await Factory.createInitAppWithFakeCrypto()
Factory.handlePasswordChallenges(application, password)
const madeUpPayload = JSON.parse(JSON.stringify(noteItem))
madeUpPayload.items_key_id = undefined
madeUpPayload.content = '004:somenonsense'
madeUpPayload.enc_item_key = '003:anothernonsense'
madeUpPayload.version = '004'
madeUpPayload.uuid = 'fake-uuid'
backupData.items = [...backupData.items, madeUpPayload]
const result = (await application.importData(backupData, true)).getValue()
expect(result.affectedItems.length).to.be.eq(backupData.items.length - 1)
expect(result.errorCount).to.be.eq(1)
})
it('should not import data from 003 encrypted payload if an invalid password is provided', async function () {
const oldVersion = ProtocolVersion.V003
await Factory.registerOldUser({
application: application,
email: email,
password: UuidGenerator.GenerateUuid(),
version: oldVersion,
})
await application.mutator.createItem(ContentType.TYPES.Note, {
title: 'Encrypted note',
text: 'On protocol version 003.',
})
const backupData = (await application.createEncryptedBackupFile.execute({ skipAuthorization: true })).getValue()
await Factory.safeDeinit(application)
application = await Factory.createInitAppWithFakeCrypto()
application.setLaunchCallback({
receiveChallenge: (challenge) => {
const values = challenge.prompts.map((prompt) =>
CreateChallengeValue(
prompt,
prompt.validation === ChallengeValidation.None ? 'incorrect password' : password,
),
)
application.submitValuesForChallenge(challenge, values)
},
})
const result = (await application.importData(backupData, true)).getValue()
expect(result.affectedItems.length).to.be.eq(0)
expect(result.errorCount).to.be.eq(backupData.items.length)
expect(application.items.getDisplayableNotes().length).to.equal(0)
})
it('should not import data from 004 encrypted payload if an invalid password is provided', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
await application.mutator.createItem(ContentType.TYPES.Note, {
title: 'This is a valid, encrypted note',
text: 'On protocol version 004.',
})
const backupData = (await application.createEncryptedBackupFile.execute({ skipAuthorization: true })).getValue()
await Factory.safeDeinit(application)
application = await Factory.createInitAppWithFakeCrypto()
application.setLaunchCallback({
receiveChallenge: (challenge) => {
const values = challenge.prompts.map((prompt) => CreateChallengeValue(prompt, 'incorrect password'))
application.submitValuesForChallenge(challenge, values)
},
})
const result = (await application.importData(backupData, true)).getValue()
expect(result.affectedItems.length).to.be.eq(0)
expect(result.errorCount).to.be.eq(backupData.items.length)
expect(application.items.getDisplayableNotes().length).to.equal(0)
})
it('should not import encrypted data with no keyParams or auth_params', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
await application.mutator.createItem(ContentType.TYPES.Note, {
title: 'Encrypted note',
text: 'On protocol version 004.',
})
const backupData = (await application.createEncryptedBackupFile.execute({ skipAuthorization: true })).getValue()
delete backupData.keyParams
await Factory.safeDeinit(application)
application = await Factory.createInitAppWithFakeCrypto()
const result = await application.importData(backupData)
expect(result.isFailed()).to.be.true
})
it('should not import payloads if the corresponding ItemsKey is not present within the backup file', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
Factory.handlePasswordChallenges(application, password)
await application.mutator.createItem(ContentType.TYPES.Note, {
title: 'Encrypted note',
text: 'On protocol version 004.',
})
const backupData = (await application.createEncryptedBackupFile.execute({ skipAuthorization: true })).getValue()
backupData.items = backupData.items.filter((payload) => payload.content_type !== ContentType.TYPES.ItemsKey)
await Factory.safeDeinit(application)
application = await Factory.createInitAppWithFakeCrypto()
Factory.handlePasswordChallenges(application, password)
const result = (await application.importData(backupData, true)).getValue()
expect(result.affectedItems.length).to.equal(BaseItemCounts.BackupFileRootKeyEncryptedItems)
expect(result.errorCount).to.be.eq(backupData.items.length - BaseItemCounts.BackupFileRootKeyEncryptedItems)
expect(application.items.getDisplayableNotes().length).to.equal(0)
})
it('importing another accounts notes/tags should correctly keep relationships', async function () {
await Factory.registerUserToApplication({
application: application,
email: email,
password: password,
})
Factory.handlePasswordChallenges(application, password)
const pair = createRelatedNoteTagPairPayload()
await application.mutator.emitItemsFromPayloads(pair, PayloadEmitSource.LocalChanged)
await application.sync.sync()
const backupData = (await application.createEncryptedBackupFile.execute({ skipAuthorization: true })).getValue()
await Factory.safeDeinit(application)
application = await Factory.createInitAppWithFakeCrypto()
Factory.handlePasswordChallenges(application, password)
await Factory.registerUserToApplication({
application: application,
email: `${Math.random()}`,
password: password,
})
await application.importData(backupData, true)
expect(application.items.getDisplayableNotes().length).to.equal(1)
expect(application.items.getDisplayableTags().length).to.equal(1)
const importedNote = application.items.getDisplayableNotes()[0]
const importedTag = application.items.getDisplayableTags()[0]
expect(application.items.referencesForItem(importedTag).length).to.equal(1)
expect(application.items.itemsReferencingItem(importedNote).length).to.equal(1)
await Factory.safeDeinit(application)
}).timeout(Factory.TwentySecondTimeout)
})
describe('real crypto', function () {
let identifier = 'standardnotes'
it('should import data from 003 encrypted payload using server generated backup with 004 key params', async function () {
context = await Factory.createAppContextWithRealCrypto(identifier)
await context.launch()
application = context.application
const backupData = {
items: [
{
uuid: 'eb1b7eed-e43d-48dd-b257-b7fc8ccba3da',
duplicate_of: null,
items_key_id: null,
content:
'003:your_sha256_hash:eb1b7eed-e43d-48dd-b257-b7fc8ccba3da:9f38642b7a3f57546520a9e32aa7c0ad:your_sha256_hash5Aqxc5FqhvuF0+dE1f4+uQOeiRFNX73V2pJJY0w5Qq7l7ZuhB08ZtOMY4Ctq7evBBSIVZ+your_sha256_hashbP6XAm8U/la1bdtdMO112XjUW7ixkWi3POWcM=:your_sha256_hashyour_sha256_hashyour_sha256_hashMyJ9',
content_type: 'Note',
enc_item_key:
'003:your_sha256_hash:eb1b7eed-e43d-48dd-b257-b7fc8ccba3da:14721ff8dbdd36fb57ae4bf7414c5eab:odmq91dfaTZG/zeSUA09fD/PdB2OkiDxcQZ0FL06GPstxdvxnU17k1rtsWoA7HoNNnd5494BZ/b7YiKqUb76ddd8x3/+cTZgCa4tYxNINmb1T3wwUX0Ebxc8xynAhg6nTY/BGq+ba6jTyl8zw12dL3kBEGGglRCHnO0ZTeylwQW7asfONN8s0BwrvHdonRlx:your_sha256_hashyour_sha256_hashyour_sha256_hashMyJ9',
auth_hash: null,
created_at: '2019-05-12T02:29:21.789000Z',
updated_at: '2019-11-12T21:47:48.382708Z',
deleted: false,
},
{
uuid: '10051be7-4ca2-4af3-aae9-021939df4fab',
duplicate_of: null,
items_key_id: null,
content:
'004:77a986823b8ffdd87164b6f541de6ed420b70ac67e055774:+8cjww1QbyXNX+PSKeCwmnysv0rAoEaKh409VWQJpDbEy/your_sha256_hash2tdreW4J8v9pFEzPMec1oq40u+c+UI/Y6ChOLV/4ozyWmpQCK3y8Ugm7B1/your_sha256_hashe3trabdU0ICu0WMvDVii4qNlQo/inD41oHXKeV5QwnYoGjPrLJIaP0hiLKhDURTHygCdvWdp63OWI+aGxv0/HI+nfcRsqSE+aYECrWB/kp/c5yTrEqBEafuWZkw==:your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashdiI6IjAwNCJ9',
content_type: 'SN|ItemsKey',
enc_item_key:
'004:d25deb224251b4705a44d8ce125a62f6a2f0e0e856603e8f:FEv1pfU/VfY7XhJrTfpcdhaSBfmNySTQtHohFYDm8V84KlyF5YaXRKV7BfXsa77DKTjOCU/EHHsWwhBEEfsNnzNySHxTHNc26bpoz0V8h50=:your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashdiI6IjAwNCJ9',
auth_hash: null,
created_at: '2020-09-07T12:22:06.562000Z',
updated_at: '2021-03-03T15:09:55.741107Z',
deleted: false,
},
],
auth_params: {
identifier: 'playground@bitar.io',
pw_nonce: your_sha256_hash,
version: '004',
},
}
Factory.handlePasswordChallenges(application, 'password')
const result = (await application.importData(backupData, true)).getValue()
expect(result.affectedItems.length).to.be.eq(backupData.items.length)
expect(result.errorCount).to.be.eq(0)
})
it('importing data with no items key should use the root key generated by the file password', async function () {
/**
* In SNJS 2.0.12, this file import would fail with "incorrect password" on file.
* The reason was that we would use the default items key we had for the current account
* instead of using the password generated root key for the file.
*
* Note this test will not be able to properly sync as the credentials are invalid.
* This test is only meant to test successful local importing.
*/
const application = await Factory.createApplicationWithRealCrypto(identifier)
/** Create legacy migrations value so that base migration detects old app */
await application.device.setRawStorageValue(
'keychain',
JSON.stringify({
[identifier]: {
version: '003',
masterKey: your_sha256_hash,
dataAuthenticationKey: your_sha256_hash,
},
}),
)
await application.device.setRawStorageValue(
'descriptors',
JSON.stringify({
[identifier]: {
identifier: 'standardnotes',
label: 'Main Application',
primary: true,
},
}),
)
await application.device.setRawStorageValue('standardnotes-snjs_version', '2.0.11')
await application.device.saveDatabaseEntry(
{
content:
'003:your_sha256_hash:58e3322b-269a-4be3-a658-b035dffcd70f:9140b23a0fa989e224e292049f133154:SESTNOgIGf2+ZqmJdFnGU4EMgQkhKOzpZNoSzx76SJaImsayzctAgbUmJ+UU2gSQAHADS3+your_sha256_hash8hS+kNW2j1DjM4YWqd0JQxMOeOrMIrxr/6Awn5TzYE+9wCbXZdYHyvRQcp9ui/G02ZJ67IA86vNEdjTTBAAWipWqTqKH9VDZbSQ2W/IOKfIquB373SFDKZb1S1NmBFvcoG2G7w//fAl/+ehYiL6UdiNH5MhXCDAOTQRFNfOh57HFDWVnz1VIp8X+VAPy6d9zzQH+8aws1JxHq/7BOhXrFE8UCueV6kERt9njgQxKJzd9AH32ShSiUB9X/sPi0fUXbS178xAZMJrNx3w==:your_sha256_hashyour_sha256_hashyour_sha256_hashIm9yaWdpbmF0aW9uIjoicmVnaXN0cmF0aW9uIn0=',
content_type: 'SN|ItemsKey',
created_at: new Date(),
enc_item_key:
'003:your_sha256_hash:58e3322b-269a-4be3-a658-b035dffcd70f:2384a22d8f8bf671ba6517c6e1d0be30:0qXjBDPLCcMlNTnuUDcFiJPIXU9OP6b4ttTVE58n2Jn7971xMhx6toLbAZWWLPk/ezX/19EYE9xmRngWsG4jJaZMxGZIz/melU08K7AHH3oahQpHwZvSM3iV2ufsN7liQywftdVH6NNzULnZnFX+FgEfpDquru++R4aWDLvsSegWYmde9zD62pPNUB9Kik6P:your_sha256_hashyour_sha256_hashyour_sha256_hashIm9yaWdpbmF0aW9uIjoicmVnaXN0cmF0aW9uIn0=',
updated_at: new Date(),
uuid: '58e3322b-269a-4be3-a658-b035dffcd70f',
},
identifier,
)
/**
* Note that this storage contains "sync.standardnotes.org" as the API Host param.
*/
await application.device.setRawStorageValue(
'standardnotes-storage',
JSON.stringify({
wrapped: {
uuid: '15af096f-4e9d-4cde-8d67-f132218fa757',
content_type: 'SN|EncryptedStorage',
enc_item_key:
'003:your_sha256_hash:15af096f-4e9d-4cde-8d67-f132218fa757:09a4da52d5214e76642f0363246daa99:zt5fnmxYSZOqC+your_sha256_hash6Y4Y25rqO4lIerKjxxNqPwDze9mtPOGeoR48csUPiMIHiH78bLGZZs4VoBwYKAP+uEygXEFYRuscGnDOrFV7fnwGDL/nkhr6xpM159OTUKBgiBpVMS:your_sha256_hashyour_sha256_hashyour_sha256_hashIm9yaWdpbmF0aW9uIjoicmVnaXN0cmF0aW9uIn0=',
content:
'003:your_sha256_hash:15af096f-4e9d-4cde-8d67-f132218fa757:b92fb4b030ac51f4d3eef0ada35f3d5f:your_sha256_hash6EKHOT7zyCytR5l2B9b1J7Tls00uVgfEKs3zX7n3F6ne+ju0++WsJuy0Gre5your_sha512_hash+your_sha256_hashyour_sha256_hashtdvNOom3Vjwyour_sha512_hash+jb2vmv+TGHUV4kZJPluG7A9IEphMZrMWwiU56FdSlSDD82qd9iG+C3Pux+X/GYCMiWS2T/BoyI6a9OERSARuTUuom2bv59hqD1yUoj7VQXhqXmverSwLE1zDeF+dc0tMwuTNCNOTk08A6wRKTR9ZjuFlLcxHsg/VZyfIdCkElFh1FrliMbW2ZsgsPFaZAI+YN8pid1tTw+Ou1cOfyD85aki98DDvg/cTi8ahrrm8UvxRQwhIW17Cm1RnKxhIvaq5HRjEN76Y46ubkZv7/HjhNwJt9vPEr9wyOrMH6XSxCnSIFD1kbVHI33q444xyUWa/EQju8SoEGGU92HhpMWd1kIz37SJRJTC7u2ah2Xg60JGcUcCNtHG3IHMPVP+UKUjx5nKP6t/NVSa+xsjIvM/your_sha256_hash0Ze22HoouKBPAtWlYJ8fmvg2HiW6nX/L9DqoxK4OXt/LnC2BTEvtP4PUzBqx8WoqmVNNnYp+FgYptLcgxmgckle41w1eMr6NYGeaaC1Jk3i/e9Piw0w0XjV/lB+yn03gEMYPTT2yiXMQrfPmkUNYNN7/xfhY3bqqwfER7iXdr/80Lc+x9byywChXLvg8VCjHWGd+Sky3NHyMdxLY8IqefyyZWMeXtt1aNYH6QW9DeK5KvK3DI+your_sha256_hashfbMU06bYt0vszT2szAkOnVuyi6TBRiGLyjMxYI0csM0SHZWZUQK0z7ZoQAWR5D+adX29tOvrKc2kJA8Lrzgeqw/rJIh6zPg3kmsd2rFbo+Qfe3J6XrlZU+J+your_sha256_hasha6F2fEHPiXs4+9:your_sha256_hashyour_sha256_hashyour_sha256_hashIm9yaWdpbmF0aW9uIjoicmVnaXN0cmF0aW9uIn0=',
created_at: '2020-11-24T00:53:42.057Z',
updated_at: '1970-01-01T00:00:00.000Z',
},
nonwrapped: {
ROOT_KEY_PARAMS: {
pw_nonce: your_sha256_hash,
pw_cost: 110000,
identifier: 'nov2322@bitar.io',
version: '003',
},
},
}),
)
const password = 'password'
await application.prepareForLaunch({
receiveChallenge: (challenge) => {
if (challenge.reason === ChallengeReason.Custom) {
return
}
if (
challenge.reason === ChallengeReason.DecryptEncryptedFile ||
challenge.reason === ChallengeReason.ImportFile
) {
application.submitValuesForChallenge(
challenge,
challenge.prompts.map((prompt) =>
CreateChallengeValue(
prompt,
prompt.validation !== ChallengeValidation.ProtectionSessionDuration
? password
: UnprotectedAccessSecondsDuration.OneMinute,
),
),
)
}
},
})
await application.launch(false)
await application.setHost.execute(Factory.getDefaultHost())
const backupFile = {
items: [
{
uuid: '11204d02-5a8b-47c0-ab94-ae0727d656b5',
content_type: 'Note',
created_at: '2020-11-23T17:11:06.322Z',
enc_item_key:
'003:your_sha256_hash:11204d02-5a8b-47c0-ab94-ae0727d656b5:62de2b95cca4d7948f70516d12f5cb3a:lhUF/EoQP2DC8CSVrXyLp1yXsiJUXxwmtkwXtLUJ5sm4E0your_sha512_hash0EfuT/SJ9IqVbjgYhKA5xt/lMgw4JSbiW8ZkVQ5tVDfgt0omhDRLlkh758ou:your_sha256_hashyour_sha256_hashImlkZW50aWZpZXIiOiJub3YyMzVAYml0YXIuaW8iLCJ2ZXJzaW9uIjoiMDAzIn0=',
content:
'003:your_sha256_hash:11204d02-5a8b-47c0-ab94-ae0727d656b5:84a2b760019a62d7ad9c314bc7a5564a:G8Mm9fy9ybuo92VbV4NUERruJ1VA7garv1+fBg4KRDRjsRGoLvORhHldQHRfUQmSR6PkrG6ol/your_sha256_hashGFhAbYcVX4xrHKbkiuLQnu9bZp9zbR6txB1NtLoNFvwDZTMko7Q+28fM4TKBbQCCw3NufLHVUnfEwS7tLLFFPdEyyMXOerKP93u8X+7NG2eDmsUetPsPOq:your_sha256_hashyour_sha256_hashImlkZW50aWZpZXIiOiJub3YyMzVAYml0YXIuaW8iLCJ2ZXJzaW9uIjoiMDAzIn0=',
auth_hash: null,
updated_at: '2020-11-23T17:11:40.399Z',
},
],
auth_params: {
pw_nonce: your_sha256_hash,
pw_cost: 110000,
identifier: 'nov235@bitar.io',
version: '003',
},
}
const result = (await application.importData(backupFile, false)).getValue()
expect(result.errorCount).to.equal(0)
await Factory.safeDeinit(application)
})
})
})
```
|
The Canadian Science and Engineering Hall of Fame, was located at the Canada Science and Technology Museum in Ottawa, Ontario, honoured Canadians who have made outstanding contributions to society in science and engineering. It also promoted role models to encourage young Canadians to pursue careers in science, engineering and technology. The hall included a permanent exhibition, a traveling exhibition, a virtual gallery, and events and programming to celebrate inductees. In 2017, the hall of fame was closed down.
History
The Canadian Science and Engineering Hall of Fame was established in 1991 through a joint partnership by the Canada Science and Technology Museum, the National Research Council of Canada (NRC), Industry Canada and the Association of Partners in Education, to mark the NRC's 75th anniversary. The hall became a major feature of the Canada Science and Technology Museum, and has become a part of the museum's permanent Innovation Canada exhibition.
Induction Process
The museum used an open process for nomination of new members. A selection committee reviewed nominations annually. Nominees must have met the following criteria:
They must have contributed in an exceptional way to the advancement of science and engineering in Canada;
Their work must have brought great benefits to society and their communities as a whole;
They must possess leadership qualities that can serve as an inspiration to young Canadians to pursue careers in science, engineering or technology.
In April 2015, two members of the selection committee, Judy Illes and Dr. Catherine Anderson, resigned over concerns that, for the second year in a row, there were no female candidates in the list of finalists.
Members
The following people have been inducted into the Canadian Science and Engineering Hall of Fame (listed by date of birth):
William Edmond Logan (1798–1875)
John William Dawson (1820–1899)
Sandford Fleming (1827–1915)
Alexander Graham Bell (1847–1922)
Reginald Fessenden (1866–1932)
Charles Edward Saunders (1867–1937)
Maude Abbott (1869–1940)
Wallace Rupert Turnbull (1870–1954)
Ernest Rutherford (1871–1937)
Harriet Brooks Pitcher (1876–1933)
Frances Gertrude McGill (1882–1959)
Alice Evelyn Wilson (1881–1964)
Frère Marie-Victorin (1885–1944)
John A.D. McCurdy (1886–1961)
Andrew McNaughton (1887–1966)
Margaret Newton (1887–1971)
Chalmers Jack Mackenzie (1888–1984)
Henry Norman Bethune (1890–1939), inducted in 2010
Frederick Banting (1891–1941)
Wilder Penfield (1891–1976)
E.W.R. "Ned" Steacie (1900–1962)
George J. Klein (1904–1992), inducted in 1995
Gerhard Herzberg (1904–1999)
Elizabeth "Elsie" MacGill (1905–1980)
George C. Laurence (1905–1987), inducted in 2010
Helen Sawyer Hogg (1905–1993)
Joseph-Armand Bombardier (1907–1964)
Alphonse Ouimet (1908–1988)
John Tuzo Wilson (1908–1993)
Arthur Porter (1910-2010)
Pierre Dansereau (1911–2011), inducted in 2001
M. Vera Peters (1911-1993)
Hugh Le Caine (1914–1977)
Douglas Harold Copp (1915–1998)
Harold Elford Johns (1915–1998), inducted in 2000
James Hillier 1915-2007, inducted in 2002
Bertram Neville Brockhouse 1918-2003
Brenda Milner 1918-
John "Jack" A. Hopps 1919-1998
Gerald Heffernan (1919–2007)
James Milton Ham (1920–1997)
Raymond Urgel Lemieux (1920–2000)
Lawrence Morley 1920-2013
Louis Siminovitch (1920–)
Ursula Franklin (1921–2016)
Gerald Hatch (1922–2014)
Willard Boyle (1924–2011), inducted in 2005
Ernest McCulloch (1926–2011), inducted in 2010
Sylvia Fedoruk (1927–2012)
Sidney van den Bergh (1929-)
John Polanyi (1929–)
Richard E. Taylor (1929–), inducted in 2008
Vernon Burrows (1930–)
Charles Robert Scriver (1930–), inducted in 2001
James Till (1931–), inducted in 2010
Michael Smith (1932–2000)
Hubert Reeves (1932–)
Kelvin K. Ogilvie (1942-)
Arthur B. McDonald (1943–)
Ransom A. Myers (1952–2007)
References
External links
Canadian Science and Engineering Hall of Fame official webpage. Canada Science and Technology Museum official website
Science and technology halls of fame
Halls of fame in Canada
Culture of Ottawa
Awards established in 1991
1991 establishments in Canada
2017 disestablishments in Canada
|
Burj el-Shemali (Arabic: البرج الشمالي) is a municipality located some 86 km south of Beirut and 3 km east of the Tyre/Sour peninsula, merging into its urban area. It is part of the Tyre Union of Municipalities within the Tyre District of the South Governorate of Lebanon.
It is particularly known for hosting the second-largest of the twelve Palestinian refugee camps in the country as a de facto autonomous exclave effectively out of the reach of Lebanese officials: The camp is ruled by Popular Committees of Palestinian parties under the leadership of the Palestinian Liberation Organisation (PLO) which is de facto recognised by the municipality through some degree of coordination and cooperation. The United Nations Relief and Works Agency for Palestine Refugees in the Near East (UNRWA) has the mandate to provide basic services, assisted by local and international NGOs. The Lebanese Armed Forces control entry and exit through the camp's main gate.
Name
Burj el-Shemali – also transliterated into the spellings of "Borj" or "Bourj" combined with a version of "Shimali", "Shamali", "Shemâly", "Chemali", "Chamali", or "Chmali" with or without the article "el", "al", "ech", "esh", or "ash" – is commonly translated as "Northern Tower", as done by E. H. Palmer in the 1881 Survey of Western Palestine (SWP).
The settlement is named after a medieval tower on its main hill that overlooks Tyre. The Arabic word "Burj" reportedly originated from the Ancient Greek "pyrgos".
Territory
Burj el-Shemali reportedly covers an area of 1.069 hectare, rising to an elevation of more than 60 metres on a hill overlooking Tyre/Sour peninsula.
Together with the built-up areas of three adjacent municipalities – Sour on the peninsula and the coastal areas to the West, Abbasiyet Sour to the North, and Ain Baal to the South-East – the urban part of Burj el-Shemali (6.8 km2) has integrated into one greater metropolitan Tyre. There are also unpopulated agricultural lands, especially in its Northern and Southern parts. Altogether there are 24 distinct neighbourhoods in Burj el-Shemali. The Palestinian camp is only one of them:
Though Burj el-Shemali is often used as a synonym for the camp, it is important to see that it has just a size of about 135,000 square meters and thus covers but a tiny fraction - little less than 1% - of the municipality's overall territory. While it is less dense than other refugee camps in Lebanon, it is still one of the world's most densely populated areas. A 2017 census counted 1,243 buildings inside the camp and in adjacent gatherings with 2,807 households.
There are five unofficial entrances: former village streets barricaded with cement blocks that allow pedestrians to pass, but not cars. The camp is irregularly shaped, following the property lines of land rented by the Lebanese government for 99 years. [..] When you cross that border, you are in a zone of urban informality. The unplanned streets and haphazard buildings announce that this is a place of legal exception, outside regulation, where a state of emergency is the norm. [..] The camp is divided informally into neighborhoods named after agricultural villages in the Safad and Tiberias regions of Palestine.
The only exception is one neighborhood which is known as Morocco, referring to the North African origin of the residents, whose ancestors moved to historic Palestine during the Ottoman Empire.
History
Ancient Times
According to Ali Badawi, the long-time chief-archaeologist for Southern Lebanon at the Directorate-General of Antiquities, it can be generally assumed that all villages around Tyre were established already during prehistoric times like the neolithic age (5.000 BCE).
Phoenician stelas and other artefacts found in Burj el-Shemali give evidence that the place was used in the 5th to 4th century BCE for funerary purposes. If there were settlements during that time, they were probably demolished by the army of Alexander the Great, who had all the coastal villages destroyed and the building materials used to connect the island of Tyre with a mole during the siege of 332 BCE. There are indications though of settlements at Burj el-Shemali dating back at least to the first century BCE.
During Roman times, parts of Burj el-Shemali continued to be used as a necropolis. A number of its hypogea - underground tombs - with Roman-era frescos are on display at the National Museum in Beirut. The remains of a Roman-Byzantine road are preserved underneath the modern main road.
Medieval Times
It is not clear whether Burj el-Shemali continued to be settled and/or used as a funerary place after the Arab armies defeated the Byzantine empire in the region and took over Tyre in 635 CE for half a millennium of Islamic rule.
When the Tyre was taken over by a Frankish army in the aftermath of the First Crusade, the new rulers constructed a fortified tower on the hill of Burj el-Shemali overlooking the peninsula of Tyre. The village then adapted its name from that tower. There are also remains of another Crusader tower known as Al-Burj Al-Qobli in the Southern part of town. Like in ancient times, the lands of Burj el-Shemali were used as cemeteries in medieval periods.
Ottoman Times
Although the Ottoman Empire conquered the Levant in 1516, Jabal Amel (modern-day Southern Lebanon) remained mostly untouched for almost another century. When the Ottoman leadership at the Sublime Porte appointed the Druze leader Fakhreddine II of the Maan family to administer the area at the beginning of the 17th century, the Emir encouraged many Metwali – the discriminated Shia Muslims of what is now Lebanon – to settle to the East of Tyre to secure the road to Damascus. He thus also laid the foundation of the Lebanese part of modern Burj el-Shemali demographics as a predominantly Shiite place.
In 1881, the London-based Palestine Exploration Fund's Survey of Western Palestine (SWP) described it as
A large village built of stone, containing about 300 Metawileh, placed on a low ridge, with figs, olives, and arable land around. There are two good springs near.
and further noted that it was
a village with a similar tower of drafted masonry (as that of Borj Rahal). The hill is crowned by a stronghold, the vaults of which, slightly ogival, do not appear older than the Crusaders, but it was constructed of older blocks, some in drafted masonry and others completely smoothed. About a mile to the south-west of this hill is a subterranean series of tombs, each containing several ranges of loculi, which was explored by Renan.
Modern Times
French Mandate colonial rule (1920–1943)
Little has been recorded about developments in Burj el-Shemali after the French rulers proclaimed the new State of Greater Lebanon on the first of September 1920:
In 1937, a richly decorated Roman tomb with frescoes from the 2nd century CE was accidentally discovered there in an ancient necropolis area. Two years later, the archaeologist Maurice Dunand had the frescoes dismantled and restored in the basement of the National Museum of Beirut (see gallery below).
Post-Independence (since 1943)
Following Lebanese independence from France on 22 November 1943, Southern Lebanon enjoyed less than five years of peace. The border with British-ruled Mandatory Palestine was still open during those times, and many Palestianian Jews used to spend holidays in Tyre, while vice versa many Southern Lebanese would travel freely to Haifa and Tel Aviv.
1948 Palestine Nakba
However, when the state of Israel was declared in May 1948, an estimated 127,000 Palestinians fled to Lebanon alone until the end of that year. Confronted with this exodus – also known as the Nakba – a camp of tents was set up in Burj El Shimali by the League of Red Cross Societies. The refugees were mainly from Hawla, Lubieh, Saffuri, Tiberias, and Safed, where they mostly led agricultural existences. An oral history project recorded the following:
Refugees from 1948 often begin their narratives by telling of what used to be cultivated in the past. One refugee family in Burj el-Shemali, for example, began their description of life before the exodus by telling how they used to grow yellow and white corn, wheat, cereals, sesame, big beans, white beans, lentils. There were plenty of vegetables and fruits, apricots, peach trees, plums, grapes, cherries (quite rare in the region), really big and sweet watermelons and honeydew melons."
The refugees at first suffered from particularly poor conditions as the camp was initially only meant to be temporary and became a transit point:"[It ]was disbanded in June 1949 and its 6,010 refugees distributed among four camps in the Saida and Beqa'a Districts. This operation was carried out in the record time of four days by the League staff in collaboration with the Lebanese Government."Many of them seem to have moved back to Burj el-Shemali though once the current "footprint" was established in 1955. At that time UNRWA started providing humanitarian assistance – infrastructure services (water, sewage, electricity, road networks and shelter), school education and health care – to the residents of the camp.
Meanwhile, more Palestinian refugees settled in the area of Maachouk – 1 km to the West of Burj El Shemali – on agricultural lands owned by the Lebanese State as a neighbourhood rather than a camp. Its eastern side, which is an industrial zone, as well as the main road's southern side with many commercial activities fall within the jurisdiction of Burj el-Shemali municipality which demonstrates the arbitrariness of many boundaries.
The Tyrian public expressed solidarity with the Palestinian cause in that early post-independence era, especially thanks to the politics of Tyre's long-time Imam and social-reformer Abdulhussein Sharafeddin, who had given shelter to the Grand Mufti of Jerusalem Amin al-Husseini shortly after the beginning of the 1936–1939 Arab revolt in Palestine. After Sharafeddin's death in 1957 the balance of power in Southern Lebanon and the whole country gradually started to shift though with the arrival of a newcomer to the political scene:
In 1959, the Iran-born Shiite cleric Sayed Musa Sadr moved to Tyre to succeed the late Sharafeddin. As "one of his first significant acts" he established a vocational training center in Burj el-Shemali that became "an important symbol of his leadership". Reportedly, one of the first directors of the institute was a Maronite, while its Iraq-born Shiite principal started military trainings for Shia youth with support from Palestinian fighters at the camp.
By 1968, there were 7,159 registered Palestinian refugees in the camp of Burj el-Seimali. At the same time, during the course of the decade, Greater Tyre metropolitan area, including Burj el-Shemali, increasingly became subject to a rural-to-urban movement that has been ongoing ever since and resulted in growing settlements around the camp.
The solidarity of the Lebanese Tyrians with the Palestinians was especially demonstrated in January 1969 through a general strike to demand the repulsion of Israeli attacks on Palestinian targets in Beirut. However, this sentiment changed during the first half of the 1970s when the local population got increasingly caught up in the crossfire between the Palestinian insurgency in South Lebanon and reprisals from Israel's counter-insurgency.
In 1974, the Israeli military attacked: on 20 June, the Israeli Air Force (IAF) bombed the camp and, according to the Lebanese army, killed 8 people, while 30 were injured.
In the same year, Sadr founded Harakat al-Mahroumin ("Movement of the Deprived") and one year later – shortly before the beginning of the Lebanese Civil War – its de facto military wing: Afwaj al-Muqawama al-Lubnaniyya (Amal). The Iranian director of Sadr's technical school, Mostafa Chamran, who was married to Amal activist Ghada Ja'bar, became a major instructor of guerilla warfare. The US-trained physicist went on to become the first defense minister of post-revolutionary Iran. Military training and weaponry for Amal fighters was still mainly provided by Palestinian militants, but Sadr increasingly distanced himself from them as the situation escalated into a civil war:
Lebanese Civil War (1975-1990)
In January 1975, a unit of the Popular Front for the Liberation of Palestine (PFLP) attacked the Tyre barracks of the Lebanese Army. While the assault was denounced by the PLO as "a premeditated and reckless act", it launched in March a commando of its own eight to sail from the coast of Tyre to Tel Aviv to mount the Savoy Hotel attack, during which eight civilian Hostages and three Israeli soldiers were killed as well as seven of the eight attackers. Five months later Israel attacked Tyre "from land, sea and air" in a series of assaults over some weeks.
Then, in 1976, local commanders of the PLO took over the municipal government of Tyre with support from their allies of the Lebanese Arab Army. They occupied the army barracks, set up roadblocks and started collecting customs at the port. However, the new rulers quickly lost support from the Lebanese-Tyrian population because of their "arbitrary and often brutal behavior". Even Tyre's veteran politician Jafar Sharafeddin, whose family has promoted freedom for the Palestinians over generations, was quoted as criticising the PLO for "its violations and sabotage of the Palestinian cause" during that time.
In 1977, three Lebanese fishermen in Tyre lost their lives in an Israeli attack. Palestinian militants retaliated with rocket fire on the Israeli town of Nahariya, leaving three civilians dead. Israel in turn retaliated by killing "over a hundred" mainly Lebanese Shiite civilians in the Southern Lebanese countryside. Some sources reported that these lethal events took place in July, whereas others dated them to November. According to the latter, the IDF also conducted heavy airstrikes as well as artillery and gunboat shelling on Tyre and surrounding villages, but especially on the Palestinian refugee camps in Rashidieh, Burj El Shimali and El Bass.
1978 South Lebanon conflict with Israel
On 11 March 1978, Dalal Mughrabi – a young woman from the Palestinian refugee camp of Sabra in Beirut – and a dozen Palestinian fedayeen fighters sailed from Tyre to a beach north of Tel Aviv. Their attacks on civilian targets became known as the Coastal Road massacre that killed 38 Israeli civilians, including 13 children, and wounded 71. The PLO claimed responsibility for the bloodbath and three days later the Israel Defense Forces (IDF) invaded Lebanon and after a few days occupied the whole South, except Tyre urban area. Nevertheless, Tyre was badly affected in the fighting during the Operation Litani, with civilians bearing the brunt of the war, both in human lives and economically. The IDF targeted especially the harbour on claims that the PLO received arms from there and the Palestinian refugee camps.
On 23 March 1978 the first troops of the newly established United Nations Interim Force in Lebanon (UNIFIL) arrived in Southern Lebanon, but the Palestinian forces were unwilling to give up their positions in and around Tyre. UNIFIL was unable to expel those militants and sustained heavy casualties. It therefore accepted an enclave of Palestinian fighters in its area of operation which was dubbed the "Tyre Pocket". In effect, the PLO kept ruling Tyre with its Lebanese allies of the Lebanese National Movement, which was in disarray though after the 1977 assassination of its leader Kamal Jumblatt.
1978 Musa Sadr disappearance
Amal founder Sadr mysteriously disappeared following a visit to Libyan leader Muammar Gaddafi on 31 August 1978. His legacy has continued into the present: he has been widely credited with "bringing the Shi'ite community onto an equal footing with the other major Lebanese communities." And while the loss of Sadr was great, it also became and has remained a major rallying point for the Shia community across Lebanon, particularly in Southern Lebanon.
Frequent IDF bombardments of greater Tyre from ground, sea and air raids continued after 1978. In January 1979, Israel started naval attacks on the city. According to Palestinian witnesses, two women were killed in the Burj El Shemali camp, 15 houses totally destroyed and 70 damaged.
The PLO, on the other side, reportedly converted itself into a quasi-regular army by purchasing large weapon systems, including Soviet WWII-era T-34 tanks, which it deployed in the "Tyre Pocket" with an estimated 1,500 fighters. From there it kept shelling into Galilee, especially with Katyusha rockets, until a cease-fire in July 1981.
As discontent within the Shiite population about the suffering from the conflict between Israel and the Palestinian factions grew, so did tensions between Amal and the Palestinian militants. The power struggle was exacerbated by the fact that the PLO supported Saddam Hussein's camp during the Iraq-Iran-War, whereas Amal sided with Teheran. Eventually, the political polarisation between the former allies escalated into violent clashes in many villages of Southern Lebanon, including the Tyre area. The heaviest such incident took place in April 1982, when the PLO (Fateh) bombarded Amal's technical training institute in Burj el-Shemali for ten hours.
1982 Israeli invasion
Following an assassination attempt on Israeli ambassador Shlomo Argov in London, the IDF on 6 June 1982 launched what they called Operation Peace for Galilee and once again invaded Lebanon. In Burj el-Shemali - as in many other camps - Palestinian combatants "put up a determined fight". The aerial attacks with phosphorus bombs reportedly killed some 100 civilians in one shelter alone. The total number of non-combatant casualties was estimated to be more than 200 in that camp alone. Estimates of IDF casualties in Rashidieh and Burj El Shimali ranged between 21 and "nearly 120".
The fighting in Burj Shemali [..] continued for three and a half days, during which repeated attempts to penetrate the camp were firmly repulsed."
According to UNRWA, the camp in Burj el-Shemali "was badly damaged" An international commission to enquire into reported violations of international law by Israel during its invasion found that the IDF had destroyed 35 percent of the houses in the camp. Much of the destruction was done "systematically" after the actual combat with Palestinian fighters had stopped.
At the same time, the IDF set up a large compound right next to the Amal technical training center founded by Musa Sadr:
The centre doubled as office of the Amal leader in South Lebanon, Dawud Sulayman Dawud, nicknamed "David David" because of his alleged readiness to negotiate with Israel. He was a native of Tarbikha, one of the five Shi'ite villages in northern Galilee, which were depoluated in October/November 1948, and his Lebanese opponents often called him a Palestinian. Dawud and other Amal leaders did not avoid discreet contacts with Israelis, but refused open clientship. The IDF soon lost patience and arrested thirteen Amal leaders as early as the summer of 1982.
The situation soon escalated further: On 11 November 1982, a suicide-attack with an explosive-laden car destroyed the Israeli military and intelligence headquarters in Tyre. As many as ninety soldiers, officers, and spies were killed as well as an unknown number of Lebanese and Palestinians detainees. As initially nobody claimed responsibility for the assault, Amal came under suspicion as well. In May 1983, the IDF searched the training center and reportedly opened fire on a group of pupils in the schoolyard, killing one boy and wounding nine. Dawud called for mourning strike and threatened resistance.
Then, in November 1983, another suicide-attack on the new Israeli headquarters in Tyre killed 29 Israeli soldiers and officers, wounding another thirty. 32 Lebanese and Palestinians died as well, most of them detainees. Only in 1985 was responsibility assumed for both attacks by an organisation that would go on to become a major player: Hezbollah.
1985 Amal takeover
Meanwhile, in February 1985, an Amal member from Tyre launched a suicide-attack on an IDF convoy in Burj El Shimali, injuring ten soldiers. "Israeli reprisals in the area east of Tyre killed fifteen and wounded dozens." The IDF particularly retaliated against Amal's technical training center and Southern Headquarters in Burj el-Shemali, "igniting a new circle of violence." Under the growing pressure the Israeli forces withdrew from Greater Tyre area by the end of April 1985 and Amal took over power there:
The priority of Amal remained to prevent the return of any armed Palestinian presence to the South, primarily because this might provoke renewed Israeli intervention in recently evacuated areas. The approximately 60,000 Palestinian refugees in the camps around Tyre (al-Bass, Rashidiya, Burj al-Shimali) were cut off from the outside world, although Amal never succeeded in fully controlling the camps themselves. In the Sunni 'canton' of Sidon, the armed PLO returned in force.
In September 1986, tensions between Amal and the PLO exploded into the War of the Camps, which is considered as "one of the most brutal episodes in a brutal civil war": When a group of Palestinians fired on an Amal patrol in Rashidieh, the Shi'ite militia put a siege on the camp as well as on those in Al Bass and Burj el-Shemali. After one month, Amal attacked Rashidieh, reportedly assisted by its allies from the Progressive Socialist Party, As-Saiqa and "Popular Front for the Liberation of Palestine – General Command". Fighting spread and continued for one month. By that time some 7,000 refugees in the Tyre area were displaced once more.
Amal [..] overran the unarmed camps of El Buss and Burj el-Shemali, burning homes and taking more than a thousand men into custody.
The siege lasted until January 1988 and caused death for hundreds of Palestinians in the camps all over Lebanon. The number of casualties in the camp of Burj el-Shemali is unknown. The conflict ended with the withdrawal of Palestinian forces loyal to PLO leader Yasser Arafat from Beirut and their redeployment to the camps in Southern Lebanon. The one in Burj el-Shemali likewise continued to be controlled by Arafat's Fatah party and loyalist contingents of other PLO factions, though some forces opposed to them - including Islamists - kept a presence and representation there as well.
In September 1988, the intra-Shia conflict between Amal and Hezbollah had at least one very prominent casualty from Burj el-Shemali: Amal's leader for Southern Lebanon Dawud Dawud, who got killed in Beirut during renewed clashes.
Post-Civil War (since 1991)
After the end of Lebanon's devastating civil war through the Taif Agreement in 1990, units of the Lebanese Army deployed along the coastal highway and around the Palestinian refugee camps of Tyre, including Burj el-Shemali. It has continued to be ruled by a Popular Committee dominated by Fatah and other allied PLO-factions, but included other groups like the PFLP.
in 1994 many residents of the camp in Burj el-Shemali seem to have benefited from an exceptional process of naturalisation: while Lebanese citizenship - along with many basic rights - has generally been denied to Palestinian refugees, the government in Beirut now granted passports to refugees and their descendants from the seven predominantly Shia Villages in Palestine and from the Galilee Panhandle. They had been given citizenship of Greater Lebanon by France in 1921, but were attached to British Mandatory Palestine two years later by the Paulet-Newcombe commission. In the 1948 Nakba, many fled to the greater Tyre area and settled in Burj el Shemali camp. The governmental decree no. 5247 of 1994 provided
an opening for activity in the camp by some Lebanese parties and parliamentarians especially during the parliamentary campaign of 1996 and the municipal campaign of 1998.In 2004, long-standing restrictions on bringing building materials into the camp were relaxed by the Lebanese government. The camp had already seen an informal building boom since the 1990s, as Palestinians living abroad invested money to improve their family houses or to build their own retirement homes.
2006 War between Israel and Hezbollah
During Israel's invasion in the 2006 Lebanon War, Burj El Shimali was severely hit again:
on July 9, the Plastimed and Plastic Medical Component Factories were struck in an assault by the Israeli Air Force (IAF);
on July 16, five civilians were killed by in another IAF attack on a former soap factory, including two children;
on August 13, another five civilians were killed by an IAF missile, amongst them three children and one Sri Lankan maid.
Post-2006 War
In December 2009, two men from Burj el-Shemali who were officials of the Islamist Hamas group got killed in a "mysterious bomb attack" in Southern Beirut.
In December 2011, a roadside bomb hit a French UNIFIL patrol in Burj el-Shemali, wounding five peacekeepers and one Lebanese civilian.
According to a 2014 study paper, the majority of Palestinian refugees in Burj el-Shemali supported Fatah. However, it noted that there was – unlike in the other Tyrian camp of Rashidieh – also a considerable presence of Hamas. In addition, the PFLP, the Democratic Front for the Liberation of Palestine (DFLP), and the Islamic Jihad Movement in Palestine were represented in the Popular Committees that rule the camp.
In 2016, the mayor of Burj el-Shemali was Hajj Ali Dib.
Demographics
Lebanese Municipality
There are no official figures for the Lebanese and Non-Lebanese population in Burj el-Shemali outside of the camp. Estimates calculated the number to be 22,311 in 1997 and 32,886 in 2011. These figures included Palestinians living around the camp:
Upwardly mobile refugees look for ways to move outside the camp. Nearby apartments in the village are inhabited by the Palestinian middle class: doctors, nurses, teachers, and administrators who can afford higher quality housing but want to remain close to their community and relief services like healthcare and education.
Indeed, despite the clear-cut borders of the camp, some boundaries of territories and cultural identities are much more blurred and fluid. For instance, in 2017 at least, one member of the municipal council was a naturalised Palestinian from Burj el Shemali camp, as he probably originated from one of the seven predominantly Shi'ite villages in Palestine (see above). However, a Japanese study paper found that "many people from other villages as well had obtained nationality by claiming to be residents of the Seven Villages."
After the beginning of the Syrian civil war in 2011 hundreds of Syrian refugees set up tents on public lands of the Burj el-Shemali municipality, but faced short-notice evictions.
In 2016, the total number people living in Burj el-Shemali - including the camp - was estimated to be 61,973.
With further regard to blurred lines between spaces and (self-)affiliations it is noteworthy that there are also many poor Lebanese who have moved into Palestinian camps since rents are relatively cheap there. It is unclear if this is a large phenomenon in Burj el-Shemali like in other camps, but safe to assume that it exists there as well:
Palestinian Refugee Camp
The number of registered refugees in the camp has more than tripled since 1968 when the figure was 7,159. By 1982 it went up to 11,256 and by 2008 to 19,074. As of June 2018, this number had grown to 24,929. This increase was mainly attributable to the arrival of many Syrian refugees and – especially – Palestinian refugees from Syria (PRS). In 2016, the official number of Syrians stood at 2,498 and that of PRS at 2416. The already overcrowded living conditions have further deteriorated with the plight of these twice-over refugees. UNRWA describes the situation as follows:
the camp is one of the poorest camps in Lebanon. Unemployment is extremely high, with seasonal agricultural work the most common source of income for both men and women.
However, the second, third and fourth generation refugees have lost the subsistence agricultural existences of their ancestors from Palestine due to the very limited space and denial of land-ownership. The average wage for fruit pickers in the orchards and fields near Tyre used to be around ten US$ per day before the arrival of Syrian refugees who get exploited for less. In 2011 it was estimated that two thirds of the population in the camp lived in poverty.
In addition to these plights, there is a very high incidence of genetic disorders - namely thalassemia and sickle cell disease - among camp inhabitants. UNRWA operates a clinic in the camp. In January 2016, a Palestinian resident suffering from thalessemia set himself on fire to protest against new healthcare regulations by UNRWA. These demanded patients to pay for a minor part of their hospital expenses and also ended coverage for Palestinians with Lebanese nationality or dual citizenship. Already almost two decades earlier, a fact-finding mission of the Danish Immigration Service reported that UNRWA aid had been scaled down.
The Danish researchers were also told by various sources that many residents at Burj el Shemali camp were Shiites and had been granted Lebanese nationality in 1994. However, a lot of them seem to have moved out of the camp since then. While it was estimated that there were some 600 inhabitants with Lebanese citizenship around 2010, their number reportedly went down to just "a few" Shiite families and only one Christian family by 2016.
More than half of the population is under eighteen years old. Poverty has pushed a lot of residents to sell their belongings in search for a better future abroad.
Many families rely on funds from relatives abroad, and young people dream of emigrating. The hottest gossip is about migration routes and costs, and which mafia groups to trust along the way. Everyone shares stories of those who have made it to Europe.
Foreigners need a permit from the military intelligence to enter the camp:
The permit system deters curious strangers and helps authorities monitor the population. It also makes the camp feel like an open-air prison.
Education and cultural life
In the Palestinian refugee camp, the PLO has funded the construction of a large community center, including a youth-center and a kindergarten. UNRWA operates a women's center and schools. In addition, there are a number of other centers for young people offering educational activities, some run by Islamic organisations. A bagpipe troupe was founded in 1996, named "Guirab" after one of the Arabic words for the instrument. It has conducted several concert tours in Europe. In the late 2010s, it had some 20 male and female members who practised in a community center run by the Palestinian NGO Beit Atfal Assumoud.
A 2010 study found that the camp had a population that was "less westernized" than in other camps but "tolerant".
Gallery
Exhibits at the National Museum of Beirut
Funerary items
Terracotta Mask of a Satyr painted in red
Crusader tower
See also
Palestinians in Lebanon
References
External links
Burj Shemali Camp, from UNWRA
Palestinian refugee camps in Lebanon
Populated places in Tyre District
|
```javascript
javascript: (function () {
window.bookmarkver = "1.4";
var isReddit =
document.location.hostname.split(".").slice(-2).join(".") === "reddit.com";
var isOverview = document.location.href.match(/\/overview\b/);
if (isReddit && isOverview) {
var cachBustUrl = `?${new Date().getDate()}`;
var cachBustUrl = 'path_to_url + (new Date().getDate());
// var cachBustUrl = "path_to_url" + (new Date().getDate());
fetch(cachBustUrl)
.then(function (response) {
return response.text();
})
.then(function (data) {
var script = document.createElement("script");
script.id = "pd-script";
script.innerHTML = data;
document.getElementsByTagName("head")[0].appendChild(script);
})
.catch(function () {
alert("Error retrieving PowerDeleteSuite from github");
});
} else if (
confirm(
"This script can only be run from your own user profile on reddit. Would you like to go there now?"
)
) {
document.location = "path_to_url";
} else {
alert("Please go to your reddit profile before running this script");
}
})();
```
|
```smalltalk
/***************** NCore Softwares Pvt. Ltd., India **************************
ColorBox
This program is provided to you under the terms of the Microsoft Public
***********************************************************************************/
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Markup;
namespace ColorBox
{
internal class Spinner : ContentControl
{
static Spinner()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(Spinner), new FrameworkPropertyMetadata(typeof(Spinner)));
}
public static readonly DependencyProperty ValidSpinDirectionProperty = DependencyProperty.Register("ValidSpinDirection", typeof(ValidSpinDirections), typeof(Spinner), new PropertyMetadata(ValidSpinDirections.Increase | ValidSpinDirections.Decrease, OnValidSpinDirectionPropertyChanged));
public ValidSpinDirections ValidSpinDirection
{
get { return (ValidSpinDirections)GetValue(ValidSpinDirectionProperty); }
set { SetValue(ValidSpinDirectionProperty, value); }
}
public static void OnValidSpinDirectionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
ValidSpinDirections oldvalue = (ValidSpinDirections)e.OldValue;
ValidSpinDirections newvalue = (ValidSpinDirections)e.NewValue;
}
public event EventHandler<SpinEventArgs> Spin;
protected virtual void OnSpin(SpinEventArgs e)
{
EventHandler<SpinEventArgs> handler = Spin;
if (handler != null)
handler(this, e);
}
}
}
```
|
```c
#include <stdio.h>
static struct sss{
long double f;
short snd;
} sss;
#define _offsetof(st,f) ((char *)&((st *) 16)->f - (char *) 16)
int main (void) {
printf ("+++Struct longdouble-short:\n");
printf ("size=%d,align=%d,offset-longdouble=%d,offset-short=%d,\nalign-longdouble=%d,align-short=%d\n",
sizeof (sss), __alignof__ (sss),
_offsetof (struct sss, f), _offsetof (struct sss, snd),
__alignof__ (sss.f), __alignof__ (sss.snd));
return 0;
}
```
|
Gamochaeta purpurea, the purple cudweed, purple everlasting, or spoonleaf purple everlasting, is a plant native to North America.
Description
It is a small annual herb that produces lanceolate, alternate, wooly leaves and peg-shaped flowerheads in terminal clusters. The seeds are windborne.
Habitat
It can grow on most any type of soil that is moderately moist, but prefers meadows, rocky terrain, and farmland.
Conservation status in the United States
It is listed as endangered in Massachusetts and New York, as possibly extirpated in Maine, as historical in Rhode Island, and as a special concern species in Connecticut, where it is believed extirpated.
Ethnobotany
The Houma people take a decoction of the dried plant for colds and influenza.
Gallery
References
purpurea
Plants used in traditional Native American medicine
Taxa named by Ángel Lulio Cabrera
|
```sqlpl
ALTER TABLE users ADD COLUMN lastfm_username TEXT;
ALTER TABLE users ADD COLUMN lastfm_session_key TEXT;
```
|
```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 google.registry.util;
import static google.registry.util.GcpJsonFormatter.getCurrentTraceId;
import static google.registry.util.GcpJsonFormatter.setCurrentTraceId;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.SimpleTimeLimiter;
import java.util.List;
import java.util.concurrent.AbstractExecutorService;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
public class TimeLimiter {
private static class NewRequestThreadExecutorService extends AbstractExecutorService {
@Override
public void execute(Runnable command) {
MoreExecutors.platformThreadFactory().newThread(new LogTracingRunnable(command)).start();
}
@Override
public boolean isShutdown() {
return false;
}
@Override
public boolean isTerminated() {
return false;
}
@Override
public void shutdown() {
throw new UnsupportedOperationException();
}
@Override
public List<Runnable> shutdownNow() {
throw new UnsupportedOperationException();
}
@Override
public boolean awaitTermination(long timeout, TimeUnit unit) {
throw new UnsupportedOperationException();
}
}
private static class LogTracingRunnable implements Runnable {
private final Runnable runnable;
@Nullable private final String logTraceId;
LogTracingRunnable(Runnable runnable) {
this.runnable = runnable;
logTraceId = getCurrentTraceId();
}
@Override
public void run() {
setCurrentTraceId(logTraceId);
try {
this.runnable.run();
} finally {
setCurrentTraceId(null);
}
}
}
public static com.google.common.util.concurrent.TimeLimiter create() {
return SimpleTimeLimiter.create(new NewRequestThreadExecutorService());
}
}
```
|
```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.
//
///////////////////////////////////////////////////////////////////////////
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.health.HealthCheckRegistry;
import com.code_intelligence.jazzer.api.FuzzedDataProvider;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonFactoryBuilder;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.dropwizard.core.Configuration;
import io.dropwizard.core.server.DefaultServerFactory;
import io.dropwizard.core.setup.Environment;
// Generated with path_to_url
// Minor modifications to beautify code and ensure exception is caught.
// jvm-autofuzz-heuristics-6
// Heuristic name: jvm-autofuzz-heuristics-6
// Target method: [io.dropwizard.core.server.DefaultServerFactory] public void
// configure(io.dropwizard.core.setup.Environment)
public class DefaultServerFactoryFuzzer {
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
DefaultServerFactory obj = new DefaultServerFactory();
obj.setAdminMaxThreads(data.consumeInt());
obj.setAdminMinThreads(data.consumeInt());
obj.setApplicationContextPath(data.consumeString(data.remainingBytes() / 2));
obj.setAdminContextPath(data.consumeString(data.remainingBytes() / 2));
obj.configure(new Environment(data.consumeRemainingAsString()));
}
}
```
|
```c++
#include "PowerTelemetryContainer.h"
#include "../ControlLib/Exceptions.h"
#include <algorithm>
#include <ranges>
#include <functional>
#include "../CommonUtilities/log/GlogShim.h"
bool PowerTelemetryContainer::Repopulate() {
try {
telemetry_providers_.clear();
telemetry_adapters_.clear();
// create providers
for (int iVendor = 0; iVendor < int(PM_DEVICE_VENDOR_UNKNOWN); iVendor++) {
try {
if (auto pProvider = pwr::PowerTelemetryProviderFactory::Make(
PM_DEVICE_VENDOR(iVendor))) {
telemetry_providers_.push_back(std::move(pProvider));
}
}
catch (const TelemetrySubsystemAbsent& e) {
LOG(INFO) << "Skipping Telemetry Provider: " << e.what();
}
catch (const std::runtime_error& e) {
LOG(INFO) << "Power Telemetry Failure: " << e.what();
}
catch (...) {
LOG(INFO) << "Unknown Telemetry Failure.";
}
}
// collect all adapters together from providers
for (const auto& pProvider : telemetry_providers_) {
auto& adapters = pProvider->GetAdapters();
telemetry_adapters_.insert(telemetry_adapters_.end(), adapters.begin(),
adapters.end());
}
// bail if there are not adapters
if (telemetry_adapters_.size() == 0) {
return false;
}
// Re-sort adapters based on video memory size in an attempt to return back the most
// capable adapters
constexpr auto ComparisonField = &pwr::PowerTelemetryAdapter::GetDedicatedVideoMemory;
std::ranges::sort(telemetry_adapters_, std::greater{}, ComparisonField);
return true;
}
catch (...) {
return false;
}
}
```
|
A macrometer is an instrument for measuring the size and distance of distant objects. Distant in this sense means a length that can not be readily measured by a calibrated length. The optical version of this instrument used two mirrors on a common sextant. By aligning the object on the mirrors using a precise vernier, the position of the mirrors could be used to compute the range to the object. The distance and the angular size of the object would then yield the actual size.
See also
Rangefinder
Theodolite
References
Surveying instruments
Surveying
Length, distance, or range measuring devices
|
The Brewster Bulldogs were a minor league professional ice hockey team in the Federal Hockey League playing in Brewster, New York. The team played in the 2015–16 FHL season.
History
On April 3, 2015, the Danbury Ice Arena announced that it did not want to renew its contract with the Danbury Whalers and gave them a notice to evict by April 17, leaving the team homeless.
On June 13, 2015, it was announced that due to the eviction of the Whalers, a new team called the Stateline Whalers would play the 2015–16 season at the Brewster Ice Arena under former Danbury Whalers CEO and managing partner Herm Sorcher. The team was announced as being owned by Barry Soskin, who also owns the Port Huron Prowlers and Danville Dashers and formerly the Dayton Demonz. The Danbury Whalers were officially considered to be on hiatus for the season by the FHL, but gave up their naming and territorial rights to the new Brewster team.
On June 27, it was reported that the FHL had approved of a new team in Danbury, Connecticut, to replace the now departed Whalers. Local businessmen Bruce Bennett and Edward Crowe were announced as the ownership group. Bennett announced the new team as the Danbury Titans. On July 15, during the Titans' inaugural booster club meeting, the ownership confirmed that the league had re-organized and they would also own the new Brewster team (which had formerly announced as the Stateline Whalers and signed a lease for the Brewster Ice Arena) and Barry Soskin would no longer be involved in Brewster. On July 18, Bennett announced the team would be called the Brewster Bulldogs and that neither of his teams (the Bulldogs and Titans) would have any connection with the former Whalers.
The team failed to make the playoffs in the six-team league after the 2015–16 regular season. In June 2016 after their inaugural season ended, owner Bruce Bennett announced that he had given up operating the team to focus on managing the Danbury Titans. The team officially ceased operation on July 14, 2016.
References
External links
Brewster Bulldogs official website
FHL website
Federal Prospects Hockey League teams
Putnam County, New York
Ice hockey teams in New York (state)
Ice hockey clubs established in 2015
2015 establishments in New York (state)
|
Coronaspis is a genus of true bugs belonging to the family Diaspididae.
Species:
Coronaspis coronifera
Coronaspis malabarica
Coronaspis malesiana
References
Diaspididae
|
```yaml
apiVersion: v1
name: primary-replica
description: Deploy a basic crunchy primary and replica cluster
version: 5.3.1
appVersion: 5.3.1
keywords:
- postgresql
- postgres
- database
- sql
home: path_to_url
icon: path_to_url
sources:
- path_to_url
```
|
The Villa of the Mysteries () is a well-preserved suburban ancient Roman villa on the outskirts of Pompeii, southern Italy. It is famous for the series of exquisite frescos in Room 5, which are usually interpreted as showing the initiation of a bride into a Greco-Roman mystery cult. These are now among the best known of the relatively rare survivals of Ancient Roman painting from the 1st century BC.
Like the rest of the Roman city of Pompeii, the villa was buried in the eruption of Mount Vesuvius in 79 AD. It was excavated from 1909 onwards. It is now a popular part of tourist visits to Pompeii and forms part of the UNESCO World Heritage Site at Pompeii.
Location
The villa is located some 400 m northwest of the town walls, between the roads Via Delle Tombe and Via Superiore lined with funerary monuments leading to the Herculaneum Gate of Pompeii, and is near the Villa of Diomedes and the so-called Villa of Cicero. It lies on a hill with an expansive view of the current Gulf of Naples; it rests on a slope and is partly supported by a cryptoporticus formed by blind arches.
History
The villa was built in the 2nd century BC and reached its period of maximum splendor during the Augustan age when it was considerably enlarged and embellished. Recent research, however, has posited that the villa was built in the early 1st century BC around the time of Sulla. This analysis is based on stratigraphic evidence and the dating of the Second Style frescoes, which are the earliest decoration in the villa stylistically dating to the early 1st century BC. After construction, it was then a villa urbana, which is a type of suburban villa, with large rooms and hanging gardens, in a panoramic position. Following the earthquake of 62 AD, it fell into disrepair, as did much of the city, and was transformed into a villa rustica with the addition of agricultural equipment such as a wine press. The building was then mainly used for the production and sale of wine.
The ownership of the Villa is unknown, as is the case with many private homes in Pompeii. A bronze seal was found in the villa that names L. Istacidius Zosimus, a freedman of the powerful Istacidii family, who was either the owner of the Villa or the overseer of its reconstruction after the earthquake of 62 AD. The presence of a statue of Livia, wife of Augustus, has led some historians to suggest that she was the owner.
Discovery and excavation
The villa, initially called Villa Item, was uncovered between 1909 and 1910 in an excavation conducted by Giuseppe Spano; a more in-depth investigation was carried out between 1929 and 1930 by Amadeo Maiuri, following the expropriation imposed by the Italian State.
Important restoration and conservation work on the frescoes took place from 2013 to 2015.
In 2018, archaeologists discovered the unique remains of harnessed horses. The stable was excavated following the discovery in 2017 of illegal tunnels around the walls of the villa to steal artifacts, which had destroyed one of the bodies.
Description
Although covered with meters of pumice and ash, the Villa sustained only minor damage during the eruption of Mount Vesuvius in 79 AD. Most of its walls, ceilings, and particularly its frescoes survived largely intact.
The ancient entrance, which is located directly opposite the modern entrance, had benches for waiting clients and led to service rooms, including a courtyard for storing and unloading produce, servants' quarters, and rooms for agricultural equipment. A wine press discovered during excavations has been restored to its original location. It was not uncommon for the homes of the very wealthy to include areas for the production of wine, olive oil, or other agricultural products, especially since many elite Romans owned farmland or orchards in the immediate vicinity of their villas. Past the entrance is the peristyle, the bathing and kitchen quarters, and the main atrium with an impluvium which leads into a triclinium with access to a portico with a view of the Gulf of Naples. Room 5, which is decorated with the famous frescoes for which the villa is named, lies to the right of Room 4, which is a cubiculum often identified as a "nuptial chamber."
Though often believed to be a triclinium, Room 5 could have been a cubiculum or, as Brenda Longfellow posits, even multifunctional and used by various family members at different times of day or on different days. Because the exact use of the room is uncertain, it is also often referred to as an oecus, but it cannot securely be characterized as such. Room 5 is located at the back of the villa off of a peristyle with only one entrance and exit, making it one of the least accessible rooms in the villa to visitors. Because of its rich decoration and relative inaccessibility, it is thought to have been used on special occasions for invited guests.
The bodies of two women and a child were found in lower pumice eruption layers of the Villa, suggesting that they were caught in the early stages of the eruption of Mount Vesuvius. They were on the upper floor of the farm section and plaster casts were made of them as in other areas of Pompeii and Herculaneum. Six bodies (one girl near the entrance, one woman, four others in the cryptoporticus) were found in the later higher pyroclastic eruption layers indicating they had survived the first part of the catastrophe.
Frescoes
The villa is named for the paintings Room 5, which are in the Second Style and dated to about 70-60 BC. Although the actual subject of the frescoes is debated, the most common interpretation is that they depict the initiation of a woman into matrimony in accordance with the Dionysian Mysteries, a mystery cult devoted to the god known to the Romans as Bacchus. Specific rites were required to become a member. A key feature that helps to identify these scenes as Bacchic is the depiction of maenads, the deity's female followers. These devotees are often shown dancing with swirling drapery on painted Greek pottery from the sixth century BC onward. There are many different interpretations of the frescoes, but they are commonly believed to depict a religious rite in some form. A common theory is that the frescoes depict a bride initiating into the Bacchic Mysteries in preparation for marriage. In this hypothesis, the elaborate costume worn by the main figure is believed to be wedding apparel.
Restorations
The famous frescoes of the villa were first discovered in 1909, but they were soon damaged by a combination of poor protection from the elements and an earthquake that occurred in June. The major problems that developed were damp and salt-residues that leached from the ground, causing white stains to appear on the surface of the paintings. To counteract this, large sections of the frescoes were removed and re-attached after the walls were rebuilt with new stone to better resist the damp and salt leaching.
According to the preservation methods prevalent at the time, coatings of wax and petroleum were applied to remove the residues and provide protection, which accounts for the glossy sheen which was characteristic of the frescoes in the 20th/early 21st centuries. These coatings proved remarkably effective in protecting the paintings from further damage, but one side effect was that they distorted the original colouring, making the red background appear darker than the original pigment. Later in 1909, a German team of archaeologists undertook further restorations onsite.
Between 2013 and 2015, restorations were undertaken on the frescoes using modern techniques. This included treatment with the antibiotic amoxicillin, which removed the manganese dioxide that had leached into the paintings from the ground, and the streptococci bacteria which feed on the pigments and cause deterioration. Other treatment included the analysis and restoration of the original colour tones, after laser technology was used to remove the layers of wax and petroleum applied in the early 20th century.
Interpretation of the frescoes
Based on the subject matter and order of the frescoes, they are intended to be read as a single narrative. The scenes represent different moments in the initiation ritual into the Bacchic Mysteries. Women and satyrs are featured prominently, with the villa owner's family possibly acting as models for the women and children depicted in the frescoes. Given the widely accepted theory that the murals portray aspects of the cult of Bacchus, some propose that the frescoed room itself was used to conduct initiations and other rituals, although the exact use of this room is heavily debated. Molly Swetnam-Burland has argued against this interpretation of the room, stating that that when compared to other depictions of Bacchus in religious contexts around Pompeii, the Bacchus in these frescoes is different in key aspects, demonstrating that this is not a religious space.
The first mural shows a noble Roman woman approaching a priestess or matron seated on a throne, by which stands a small boy reading a scroll – presumably the declaration of the initiation into the cult or singing a hymn. On the other side of the throne a young woman is shown in a purple robe and myrtle crown, holding a sprig of laurel and a tray of cakes. She appears to be a serving girl and may be bringing an offering to the god or goddess.
The second mural depicts another priestess (or senior initiate) and her assistants preparing the liknon basket; at her feet are the legs of the bench she is sitting on that could be mistaken as mushrooms. At one side a Silenus (a creature part man and part horse) is playing a lyre. Silenus, the name of the tutor and companion of Bacchus, was also a general term used to describe his mythological species.
The third mural shows a satyr playing the panpipes and a nymph suckling a goat in an Arcadian scene. To their right is a figure some have identified as the goddess Aura. Others have identified her as the initiate or bride.
In the direction to which she stares in horror, the fourth mural shows a young satyr being offered a bowl of wine by Silenus, while behind him, another satyr holds up a frightening mask which the drinking satyr sees reflected in the bowl (this may parallel the mirror into which young Bacchus stares in the Orphic rites). Next to them sits a goddess, perhaps Ariadne or Semele, with Bacchus lying across her lap.
The fifth mural shows a woman carrying a staff and wearing a cap, items often presented after the successful completion of an initiation. She kneels before a priestess and appears to be whipped by a winged female figure. Next to her is a dancing figure (a Maenad or Thyiad) and a gowned figure with a thyrsus (an initiation symbol of Bacchus) made of long stalks of wrapped fennel, topped with a pine cone.
In the sixth mural a woman is dressed by an attendant, while a cupid holds a mirror (or portrait) up to her. This scene is often interpreted as a bride being readied before her marriage ceremony. To the right of the bride is another image of a cupid staring up at her.
In the seventh mural, a matron is shown enthroned and in an elaborate costume.
In light of the recent restorations, Elaine K. Gazda has reexamined the figures and their relationship to each other in the frescoes and in life. Gazda argues that the restorations have made possible the identification of the women depicted in the frescoes, not as the same woman repeated throughout an initiation scene, but as portraits of different women with their own individualized features. She identifies the matron in the last mural as the domina of the villa, the bride in the sixth mural as her daughter, the Bacchus as the dominus, and the others as the men and women of the familia, such as relatives and enslaved people.
Music and mass media
in 2011 the band Corde Oblique released the track "Slide", inspired by the frescoes of the mysteries. Few ancient musical instrument reconstructions have been performed in this song, like the lyre and the Pan flute. The song is included in the album "A hail of bitter almonds".
See also
Roman architecture
List of Roman domes
Pompei Scavi-Villa dei Misteri railway station
References
External links
Preservation of the Villa featured on archaeology.org
Villa of the Mysteries on www.art-and-archaeology.com
Romano-Campanian Wall-Painting (English, Italian, Spanish and French introduction)
Pompeii | Villa of Mysteries
Ancient Roman religion
Cult of Dionysus
M
Greco-Roman mysteries
|
```python
# coding=utf-8
from pprint import pprint
from flask import Response
import requests
from urllib.parse import quote_plus, unquote_plus
from .base_class import ZmirrorTestBase
from .utils import *
class TestConnectionPool(ZmirrorTestBase):
"""testing using path_to_url"""
class C(ZmirrorTestBase.C):
my_host_name = 'b.test.com'
my_host_scheme = 'path_to_url
target_domain = 'httpbin.org'
target_scheme = 'path_to_url
external_domains = ('eu.httpbin.org',)
force_https_domains = 'ALL'
enable_automatic_domains_whitelist = False
# verbose_level = 4
possible_charsets = None
enable_connection_keep_alive = True
# developer_string_trace = r"http:\\/\\/httpbin.org\\/extdomains\\/httpbin.org\\/4xxx.png?a=238"
# developer_do_not_verify_ssl = True
# is_use_proxy = True
# requests_proxies = dict(
# http='path_to_url
# https='path_to_url
# )
def test_keep_alive(self):
"""path_to_url"""
self.rv = self.client.head(
self.url("/"),
environ_base=env(),
headers=headers(),
) # type: Response
time_non_alive = self.zmirror.parse.remote_response.elapsed
max_fail_count = 3
for _ in range(10):
self.rv2 = self.client.head(
self.url("/"),
environ_base=env(),
headers=headers(),
) # type: Response
time_alive = self.zmirror.parse.remote_response.elapsed
print("TestKeepAlive: NonAlive:", time_non_alive, "Alive:", time_alive)
try:
self.assertGreater(time_non_alive, time_alive, msg=self.dump())
except:
max_fail_count -= 1
if not max_fail_count:
raise
def test_clear(self):
self.rv = self.client.head(
self.url("/"),
environ_base=env(),
headers=headers(),
) # type: Response
self.zmirror.connection_pool.clear()
self.zmirror.connection_pool.clear(force_flush=True)
```
|
Ann Drummond-Grant (1905 – 11 September 1959) was a British singer and actress, best known for her performances in contralto roles of the Gilbert and Sullivan operas with the D'Oyly Carte Opera Company.
Drummond-Grant began her career as a soprano. She joined D'Oyly Carte in 1933, but was considered by the company's management as too tall to be an ideal performer of the Savoy Operas' young soprano heroines, and left the company in 1938. During World War II she toured in a variety of theatrical shows. She married the D'Oyly Carte musical director, Isidore Godfrey, in 1940, and returned to the company in 1950 as a contralto, playing Gilbert's formidable older women, until shortly before her death at the age of 54.
Life and career
Drummond-Grant was born in Edinburgh and studied singing in Scotland. She sang for five years as leading soprano in a parish church, played in small opera and musical comedy troupes, and did some concert work and broadcasting.
Soprano years
In 1933, Drummond-Grant joined the D'Oyly Carte Opera Company chorus. In 1936 she began to play the small parts of Celia in Iolanthe, Zorah in Ruddigore, and Fiametta in The Gondoliers. She soon moved up to the larger roles of Plaintiff in Trial by Jury and Lady Psyche in Princess Ida, and she also made occasional appearances in the leading soprano roles of Josephine in H.M.S. Pinafore, the title roles in Patience and Princess Ida, and Gianetta in The Gondoliers.
In 1937, Drummond-Grant became one of D'Oyly Carte's principal sopranos. She began the season as the Plaintiff, Josephine, Patience, Phyllis in Iolanthe (sharing the role), the title role in Princess Ida and Elsie Maynard in The Yeomen of the Guard. She was selected to play Aline when The Sorcerer was revived in 1938. She won excellent reviews for her performances. Of her Ida, The Manchester Guardian wrote, "Miss Ann Drummond-Grant sang and acted the heroine's part as finely as any of her predecessors that we can remember." The paper also praised her as Patience and Elsie. However, the company was hiring new sopranos, including Helen Roberts, and Drummond-Grant lost roles or had to share them. The Times later wrote, "Being strikingly tall and well-built, she was judged to be not quite fitted for the leading soprano parts." Seeing herself sidelined, she left the company at the end of 1938.
Drummond-Grant married the D'Oyly Carte musical director, Isidore Godfrey, in 1940. She played throughout the 1940s in non-musical theatre pieces, operettas (notably Waltzes from Vienna with Thomas Round), pantomime and summer shows.
Return as principal contralto
In 1950, she returned to the D'Oyly Carte company, at first as a contralto chorister and understudy to the principal contralto Ella Halman. She deputised on occasion as Dame Carruthers in Yeomen and the Duchess of Plaza-Toro in The Gondoliers. In 1951, on Halman's departure from the company, Drummond-Grant became principal contralto, appearing over the next seven and a half years as Little Buttercup in Pinafore, Ruth in The Pirates of Penzance, Lady Jane in Patience, the Queen of the Fairies in Iolanthe, Lady Blanche in Princess Ida (starting in 1955), Katisha in The Mikado, Dame Hannah in Ruddigore, Dame Carruthers and the Duchess.
Drummond-Grant was less extrovert than some of her predecessors, and, as a young newcomer to the company, Kenneth Sandford was daunted by her "dowager austerity". In general, however, she was seen as "a most likeable and kindly artist" and was something of a mother-figure to the company. She was known to her D'Oyly Carte colleagues as "Drummie", though her husband was always particular about addressing her as "Miss Grant" when in the theatre. Her D'Oyly Carte colleague, the veteran Darrell Fancourt, called her, "one of the very few people who have sung the contralto parts … not as hard, beastly women, but with a true understanding of their light and shade." Of one of her last appearances, The Guardian wrote, "Lady Blanche [was] majestically portrayed last night by Ann Drummond-Grant, in whose hands tradition is always safe."
Drummond-Grant became seriously ill in 1959. She gave her last performance on 23 May in Bournemouth, and underwent surgery, but died less than four months later at the age of 54.
Recordings
There are no known recordings of Drummond-Grant in her soprano roles (she can, however, be heard singing "Coming Through the Rye" as a soprano). In the early 1950s, she recorded several of the principal mezzo-soprano roles from the Gilbert and Sullivan operas, although she never played them on stage. These were Mad Margaret in Ruddigore (1950), Phoebe Meryll in Yeomen (1950), Iolanthe (1951), and Lady Saphir in Patience (1951). Of her contralto roles, she recorded Lady Blanche (1955), Katisha (1957) and Ruth (1957). She was Lady Sangazure in the 1953 recording of The Sorcerer, a role she never played on stage, as the opera was not in the D'Oyly Carte repertory at the time. She played most of the contralto roles in BBC radio broadcasts with D'Oyly Carte between 1953 and 1959.
Notes
References
External links
Profile of Drummond-Grant
Photo of Drummond-Grant in Iolanthe
Drummond-Grant as Ruth in televised scenes from Pirates, D'Oyly Carte Opera Company, 1955
Scottish contraltos
Operatic contraltos
1905 births
1959 deaths
20th-century British women opera singers
Musicians from Edinburgh
|
Solomon Embra Brannan (born September 5, 1942) is a former American football defensive back who played three seasons in the American Football League (AFL) with the Kansas City Chiefs and New York Jets. He played college football at Morris Brown College and attended Tompkins High School in Savannah, Georgia. Brannan has also been a member of the Jacksonville Sharks of the World Football League (WFL). He was a member of the Kansas City Chiefs team that won the 1966 AFL championship.
References
External links
Just Sports Stats
Living people
1942 births
American football defensive backs
American football running backs
African-American players of American football
Morris Brown Wolverines football players
Kansas City Chiefs players
New York Jets players
Jacksonville Sharks (WFL) players
Players of American football from Savannah, Georgia
American Football League players
21st-century African-American people
20th-century African-American sportspeople
|
Kakao Webtoon () is a webtoon platform operated by Kakao.
History
The service originally launched in 2003 by Daum, a popular web portal in Korea, as Daum Webtoon making it the first official webtoon platform in the world. It would operate under Daum up until the company merged with Kakao in 2014. The service operated as Daum Webtoon alongside Kakao's other service, KakaoPage, attracting many readers to its platform. It wasn't until August 1, 2021, when the service was relaunched as Kakao Webtoon in order to expand globally and management changed to the platform now being operated by Kakao Entertainment, a subsidiary of Kakao. The service also expanded to Thailand and Taiwan that same year. In April 2022, an Indonesian language service was launched to replace the Indonesian Kakao Page service.
Adaptations
Adaptations of Daum/Kakao webtoons
See also
KakaoPage
Piccoma
References
External links
Kakao Webtoon
Kakao Webtoon Thailand
Kakao Webtoon Taiwan
Webtoon publishing companies
Webcomic publishing companies
Kakao
Internet properties established in 2003
2003 establishments in South Korea
|
The Curtiss BF2C Goshawk (Model 67) was a United States 1930s naval biplane aircraft that saw limited success and was part of a long line of Hawk Series airplanes made by the Curtiss Aeroplane and Motor Company for the American military, and for export as the Model 68 Hawk III.
Design and development
The United States Navy and Curtiss felt that the F11C-2 possessed development potential, and the Navy decided to procure a variant with retractable landing gear. This variant, which still had the F11C-2's classic "Hawk" wood wing with its flat-bottomed Clark Y airfoil, was designated XF11C-3 by the Navy and Model 67 by Curtiss. The main gear retraction system was inspired by the Grover Loening-designed system on the Grumman XFF-1 prototype, and was manually operated.
The XF11C-3 was first delivered to the USN in May 1933, with a Wright R-1820-80 radial engine rated at . Trials revealed a increase in speed over the F11C-2, but the extra weight caused a decrease in maneuverability. The Navy felt the handling degradation was more than offset by the increase in speed, however. During testing the XF11C-3 had its wood-framed wing replaced by the metal-structured, biconvex, NACA 2212 airfoil wing, and soon after was redesignated XBF2C-1 (Model 67A) in keeping with the new Bomber-Fighter category.
Operational history
Twenty-seven BF2C-1 were ordered by the U.S. Navy, with a raised rear turtledeck, a semi-enclosed cockpit, and a metal-framed lower wing. It was armed with two .30 calibre Browning machine guns and three hardpoints for of external stores. Delivered in October 1934, they were assigned to VB-5B on the aircraft carrier , but served only a few months before difficulties with the landing gear led to their withdrawal. In spite of its short service run, many of the innovations developed for the Goshawk line found wide use in Navy aircraft in the years that followed. They were the last Curtiss fighter accepted for service with the U.S. Navy.
The export version Model 68 Hawk III reverted to the classic wood/Clark Y wings and was powered by a R-1820-F53. Chinese Hawk IIIs served as multi-purpose aircraft when combat operations against the Imperial Japanese Army and Navy Air Forces began in earnest in August 1937, particularly with the Battle of Shanghai and Nanjing, and were considered the Nationalist Chinese Air Force's frontline fighter-pursuit aircraft along with their inventory of Hawk IIs, Boeing Model 281 "Peashooters" and Fiat CR.32s. Col. Gao Zhihang scored a double-kill against the superior Mitsubishi A5M "Claude" (predecessor of the A6M "Zero") over Nanjing on 12 October, 1937 while at the controls of his Hawk III numbered "IV-I" (4th Pursuit Group, Commander).
As the air-interdiction and close-air support for the National Revolutionary Army of China continued at the Battle of Shanghai on 14 October, 1937, the Chinese Air Force launched a major strike against Japanese positions in Shanghai at 16:00 hours with a uniquely mixed force of three Curtiss Hawk IIIs escorting three B-10s, two He-111As, five O-2MCs and five Gammas from Nanjing in the late-afternoon, and then one strike launched every hour from Nanking to Shanghai in the evening until 03:00 hours on 15 October. These combination of attacks with the Hawk IIIs were used against both the Imperial Japanese Army and Navy Air Forces, and against both ground and naval targets with considerable success through the end of 1937, before being superseded by the better-armed and faster Polikarpov I-15 and I-16 fighters that were supplied to the Chinese Air Force through the Sino-Soviet Treaty of 1937.
In early 1935, Thailand placed an order for 24 Curtiss Hawk IIIs at a cost of 63,900 Baht each, and a manufacturing license was also bought. The first 12 Hawk IIIs were shipped to Thailand in August and the remaining 12 arrived in late 1935, which were named Fighter Type 10. A total of 50 Hawk IIIs were locally built during 1937 and 1939. The type was used against the French in the Franco-Thai War and the Japanese invaders in December 1941, then relegated for use as trainers. Some of these aircraft were still active in 1949 and one airframe (KH-10) survives in the Royal Thai Air Force Museum.
The Model 79 Hawk IV demonstrator had a fully enclosed cockpit and a R-1820-F56.
Variants
XBF2C-1 Hawk
The XF11C-3 prototype redesignated as a fighter-bomber.
BF2C-1 Goshawk (Model 67A)
Production version of the XF11C-3; 27 built.
Hawk III (Model 68)
Export version of BF2C-1 with an R-1820-F53 for Argentina, China, Thailand and Turkey; 137 built.
Hawk IV (Model 79)
Export version with an R-1820-F56 engine; one demonstrator built.
Operators
Army Aviation Service operated ten Model 68A Hawk III and 1 Model 79 Hawk IV.
Republic of China Air Force operated 102 Model 68C Hawk III
Royal Thai Air Force operated 24 Model 68B Hawk III
Turkish Air Force operated one Model 68B Hawk III
United States Navy operated 27 BF2C-1s
Specifications (Hawk III)
References
Further reading
External links
Images
"Fast Navy Plane Has Retractable Wheels" Popular Science, July 1934
BF02C
1930s United States fighter aircraft
1930s United States bomber aircraft
Single-engined tractor aircraft
Biplanes
Carrier-based aircraft
Aircraft first flown in 1933
World War II Chinese fighter aircraft
|
is a Japanese women's professional shogi player ranked 2-kyū.
Early life and becoming a women's professional shogi player
Umezu was born in Bunkyō, Tokyo on September 1, 2007. She became interested in shogi from watching the anime TV series version of the manga March Comes In like a Lion. Under the guidance of shogi professional Makoto Tobe, she entered the Kantō branch of Japan Shogi Association's training group system in September 2021 as a member of training group B2, was subsequently promoted to training group B1 in December 2021, and qualified for women's professional status in April 2022 for entering the training group system at training group B2 or above and playing 48 games or more at that level.
Promotion history
Umezu's promotion history is as follows.
2-kyū: July 1, 2022
Note: All ranks are women's professional ranks.
References
External links
ShogiHub: Umezu, Mikoto
2007 births
Living people
Japanese shogi players
Women's professional shogi players
Professional shogi players from Tokyo Metropolis
People from Bunkyō
|
```c
/*********************************************************************/
/* */
/* Optimized BLAS libraries */
/* By Kazushige Goto <kgoto@tacc.utexas.edu> */
/* */
/* UNIVERSITY EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES CONCERNING */
/* THIS SOFTWARE AND DOCUMENTATION, INCLUDING ANY WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR ANY PARTICULAR PURPOSE, */
/* NON-INFRINGEMENT AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY */
/* THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF */
/* TRADE. NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO */
/* THE USE OF THE SOFTWARE OR DOCUMENTATION. */
/* Under no circumstances shall University be liable for incidental, */
/* special, indirect, direct or consequential damages or loss of */
/* profits, interruption of business, or related expenses which may */
/* arise from use of Software or Documentation, including but not */
/* limited to those resulting from defects in Software and/or */
/* Documentation, or loss or inaccuracy of data of any kind. */
/*********************************************************************/
#include <stdio.h>
#include <ctype.h>
#include "common.h"
const static FLOAT dm1 = -1.;
#undef GEMV_UNROLL
#define GEMV_UNROLL DTB_ENTRIES
int CNAME(BLASLONG m, FLOAT *a, BLASLONG lda, FLOAT *b, BLASLONG incb, void *buffer){
BLASLONG i, is, min_i;
FLOAT *gemvbuffer = (FLOAT *)buffer;
FLOAT *B = b;
if (incb != 1) {
B = buffer;
gemvbuffer = (FLOAT *)(((BLASLONG)buffer + m * sizeof(FLOAT) + 4095) & ~4095);
COPY_K(m, b, incb, buffer, 1);
}
for (is = 0; is < m; is += GEMV_UNROLL){
min_i = MIN(m - is, GEMV_UNROLL);
#ifdef TRANSA
if (is > 0){
GEMV_T(is, min_i, 0, dm1,
a + is * lda , lda,
B, 1,
B + is, 1, gemvbuffer);
}
#endif
for (i = 0; i < min_i; i++) {
FLOAT *AA = a + is + (i + is) * lda;
FLOAT *BB = B + is;
#ifdef TRANSA
if (i > 0) BB[i] -= DOTU_K(i, AA, 1, BB, 1);
#endif
#ifndef UNIT
BB[i] /= AA[i];
#endif
#ifndef TRANSA
if (i < min_i - 1) {
AXPYU_K(min_i - i - 1 , 0, 0, - BB[i],
AA + i + 1, 1, BB + i + 1, 1, NULL, 0);
}
#endif
}
#ifndef TRANSA
if (m - is > min_i){
GEMV_N(m - is - min_i, min_i, 0, dm1,
a + is + min_i + is * lda, lda,
B + is, 1,
B + (is + min_i), 1, gemvbuffer);
}
#endif
}
if (incb != 1) {
COPY_K(m, buffer, 1, b, incb);
}
return 0;
}
```
|
```python
#!/usr/bin/env python
import sys
if (sys.version_info < (3, 0)):
raise Exception("Please follow the installation instruction on 'path_to_url")
import numpy as np
import argparse
import pprint
import logging
import multiprocessing as mp
# Theano
import theano.sandbox.cuda
from lib.config import cfg, cfg_from_file, cfg_from_list
from lib.test_net import test_net
from lib.train_net import train_net
def parse_args():
parser = argparse.ArgumentParser(description='Main 3Deverything train/test file')
parser.add_argument(
'--gpu',
dest='gpu_id',
help='GPU device id to use [gpu0]',
default=cfg.CONST.DEVICE,
type=str)
parser.add_argument(
'--cfg',
dest='cfg_files',
action='append',
help='optional config file',
default=None,
type=str)
parser.add_argument(
'--rand', dest='randomize', help='randomize (do not use a fixed seed)', action='store_true')
parser.add_argument(
'--test', dest='test', help='randomize (do not use a fixed seed)', action='store_true')
parser.add_argument('--net', dest='net_name', help='name of the net', default=None, type=str)
parser.add_argument(
'--model', dest='model_name', help='name of the network model', default=None, type=str)
parser.add_argument(
'--batch-size',
dest='batch_size',
help='name of the net',
default=cfg.CONST.BATCH_SIZE,
type=int)
parser.add_argument(
'--iter',
dest='iter',
help='number of iterations',
default=cfg.TRAIN.NUM_ITERATION,
type=int)
parser.add_argument(
'--dataset', dest='dataset', help='dataset config file', default=None, type=str)
parser.add_argument(
'--set', dest='set_cfgs', help='set config keys', default=None, nargs=argparse.REMAINDER)
parser.add_argument('--exp', dest='exp', help='name of the experiment', default=None, type=str)
parser.add_argument(
'--weights', dest='weights', help='Initialize network from the weights file', default=None)
parser.add_argument('--out', dest='out_path', help='set output path', default=cfg.DIR.OUT_PATH)
parser.add_argument(
'--init-iter',
dest='init_iter',
help='Start from the specified iteration',
default=cfg.TRAIN.INITIAL_ITERATION)
args = parser.parse_args()
return args
def main():
args = parse_args()
print('Called with args:')
print(args)
# Set main gpu
theano.sandbox.cuda.use(args.gpu_id)
if args.cfg_files is not None:
for cfg_file in args.cfg_files:
cfg_from_file(cfg_file)
if args.set_cfgs is not None:
cfg_from_list(args.set_cfgs)
if not args.randomize:
np.random.seed(cfg.CONST.RNG_SEED)
if args.batch_size is not None:
cfg_from_list(['CONST.BATCH_SIZE', args.batch_size])
if args.iter is not None:
cfg_from_list(['TRAIN.NUM_ITERATION', args.iter])
if args.net_name is not None:
cfg_from_list(['NET_NAME', args.net_name])
if args.model_name is not None:
cfg_from_list(['CONST.NETWORK_CLASS', args.model_name])
if args.dataset is not None:
cfg_from_list(['DATASET', args.dataset])
if args.exp is not None:
cfg_from_list(['TEST.EXP_NAME', args.exp])
if args.out_path is not None:
cfg_from_list(['DIR.OUT_PATH', args.out_path])
if args.weights is not None:
cfg_from_list(['CONST.WEIGHTS', args.weights, 'TRAIN.RESUME_TRAIN', True,
'TRAIN.INITIAL_ITERATION', int(args.init_iter)])
print('Using config:')
pprint.pprint(cfg)
if not args.test:
train_net()
else:
test_net()
if __name__ == '__main__':
mp.log_to_stderr()
logger = mp.get_logger()
logger.setLevel(logging.INFO)
main()
```
|
```c++
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Tencent is pleased to support the open source community by making behaviac available.
//
//
//
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//your_sha256_hash--------
//your_sha256_hash--------
#include "behaviac/common/meta/meta.h"
#include "test.h"
SUITE(behaviac)
{
SUITE(Type)
{
struct TrueCheck
{
enum { Result = 1 };
};
struct FalseCheck
{
enum { Result = 2 };
};
TEST(IfThenElse, Test4)
{
const int32_t trueCheck = behaviac::Meta::IfThenElse< true, TrueCheck, FalseCheck >::Result::Result;
const int32_t falseCheck = behaviac::Meta::IfThenElse< false, TrueCheck, FalseCheck >::Result::Result;
CHECK_EQUAL(1, trueCheck);
CHECK_EQUAL(2, falseCheck);
}
}
}
```
|
```objective-c
/*
*
* in the file LICENSE in the source distribution or at
* path_to_url
*/
#ifndef HEADER_BN_H
# define HEADER_BN_H
# include <openssl/e_os2.h>
# ifndef OPENSSL_NO_STDIO
# include <stdio.h>
# endif
# include <openssl/opensslconf.h>
# include <openssl/ossl_typ.h>
# include <openssl/crypto.h>
# include <openssl/bnerr.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* 64-bit processor with LP64 ABI
*/
# ifdef SIXTY_FOUR_BIT_LONG
# define BN_ULONG unsigned long
# define BN_BYTES 8
# endif
/*
* 64-bit processor other than LP64 ABI
*/
# ifdef SIXTY_FOUR_BIT
# define BN_ULONG unsigned long long
# define BN_BYTES 8
# endif
# ifdef THIRTY_TWO_BIT
# define BN_ULONG unsigned int
# define BN_BYTES 4
# endif
# define BN_BITS2 (BN_BYTES * 8)
# define BN_BITS (BN_BITS2 * 2)
# define BN_TBIT ((BN_ULONG)1 << (BN_BITS2 - 1))
# define BN_FLG_MALLOCED 0x01
# define BN_FLG_STATIC_DATA 0x02
/*
* avoid leaking exponent information through timing,
* BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
* BN_div() will call BN_div_no_branch,
* BN_mod_inverse() will call BN_mod_inverse_no_branch.
*/
# define BN_FLG_CONSTTIME 0x04
# define BN_FLG_SECURE 0x08
# if OPENSSL_API_COMPAT < 0x00908000L
/* deprecated name for the flag */
# define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME
# define BN_FLG_FREE 0x8000 /* used for debugging */
# endif
void BN_set_flags(BIGNUM *b, int n);
int BN_get_flags(const BIGNUM *b, int n);
/* Values for |top| in BN_rand() */
#define BN_RAND_TOP_ANY -1
#define BN_RAND_TOP_ONE 0
#define BN_RAND_TOP_TWO 1
/* Values for |bottom| in BN_rand() */
#define BN_RAND_BOTTOM_ANY 0
#define BN_RAND_BOTTOM_ODD 1
/*
* get a clone of a BIGNUM with changed flags, for *temporary* use only (the
* two BIGNUMs cannot be used in parallel!). Also only for *read only* use. The
* value |dest| should be a newly allocated BIGNUM obtained via BN_new() that
* has not been otherwise initialised or used.
*/
void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int flags);
/* Wrapper function to make using BN_GENCB easier */
int BN_GENCB_call(BN_GENCB *cb, int a, int b);
BN_GENCB *BN_GENCB_new(void);
void BN_GENCB_free(BN_GENCB *cb);
/* Populate a BN_GENCB structure with an "old"-style callback */
void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback) (int, int, void *),
void *cb_arg);
/* Populate a BN_GENCB structure with a "new"-style callback */
void BN_GENCB_set(BN_GENCB *gencb, int (*callback) (int, int, BN_GENCB *),
void *cb_arg);
void *BN_GENCB_get_arg(BN_GENCB *cb);
# define BN_prime_checks 0 /* default: select number of iterations based
* on the size of the number */
/*
* BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
* that will be done for checking that a random number is probably prime. The
* error rate for accepting a composite number as prime depends on the size of
* the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
* and so the level is what you would expect for a key of double the size of the
* prime.
*
* This table is generated using the algorithm of FIPS PUB 186-4
* Digital Signature Standard (DSS), section F.1, page 117.
* (path_to_url
*
* The following magma script was used to generate the output:
* securitybits:=125;
* k:=1024;
* for t:=1 to 65 do
* for M:=3 to Floor(2*Sqrt(k-1)-1) do
* S:=0;
* // Sum over m
* for m:=3 to M do
* s:=0;
* // Sum over j
* for j:=2 to m do
* s+:=(RealField(32)!2)^-(j+(k-1)/j);
* end for;
* S+:=2^(m-(m-1)*t)*s;
* end for;
* A:=2^(k-2-M*t);
* B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
* pkt:=2.00743*Log(2)*k*2^-k*(A+B);
* seclevel:=Floor(-Log(2,pkt));
* if seclevel ge securitybits then
* printf "k: %5o, security: %o bits (t: %o, M: %o)\n",k,seclevel,t,M;
* break;
* end if;
* end for;
* if seclevel ge securitybits then break; end if;
* end for;
*
* It can be run online at:
* path_to_url
*
* And will output:
* k: 1024, security: 129 bits (t: 6, M: 23)
*
* k is the number of bits of the prime, securitybits is the level we want to
* reach.
*
* prime length | RSA key size | # MR tests | security level
* -------------+--------------|------------+---------------
* (b) >= 6394 | >= 12788 | 3 | 256 bit
* (b) >= 3747 | >= 7494 | 3 | 192 bit
* (b) >= 1345 | >= 2690 | 4 | 128 bit
* (b) >= 1080 | >= 2160 | 5 | 128 bit
* (b) >= 852 | >= 1704 | 5 | 112 bit
* (b) >= 476 | >= 952 | 5 | 80 bit
* (b) >= 400 | >= 800 | 6 | 80 bit
* (b) >= 347 | >= 694 | 7 | 80 bit
* (b) >= 308 | >= 616 | 8 | 80 bit
* (b) >= 55 | >= 110 | 27 | 64 bit
* (b) >= 6 | >= 12 | 34 | 64 bit
*/
# define BN_prime_checks_for_size(b) ((b) >= 3747 ? 3 : \
(b) >= 1345 ? 4 : \
(b) >= 476 ? 5 : \
(b) >= 400 ? 6 : \
(b) >= 347 ? 7 : \
(b) >= 308 ? 8 : \
(b) >= 55 ? 27 : \
/* b >= 6 */ 34)
# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8)
int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w);
int BN_is_zero(const BIGNUM *a);
int BN_is_one(const BIGNUM *a);
int BN_is_word(const BIGNUM *a, const BN_ULONG w);
int BN_is_odd(const BIGNUM *a);
# define BN_one(a) (BN_set_word((a),1))
void BN_zero_ex(BIGNUM *a);
# if OPENSSL_API_COMPAT >= 0x00908000L
# define BN_zero(a) BN_zero_ex(a)
# else
# define BN_zero(a) (BN_set_word((a),0))
# endif
const BIGNUM *BN_value_one(void);
char *BN_options(void);
BN_CTX *BN_CTX_new(void);
BN_CTX *BN_CTX_secure_new(void);
void BN_CTX_free(BN_CTX *c);
void BN_CTX_start(BN_CTX *ctx);
BIGNUM *BN_CTX_get(BN_CTX *ctx);
void BN_CTX_end(BN_CTX *ctx);
int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom);
int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
int BN_priv_rand_range(BIGNUM *rnd, const BIGNUM *range);
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
int BN_num_bits(const BIGNUM *a);
int BN_num_bits_word(BN_ULONG l);
int BN_security_bits(int L, int N);
BIGNUM *BN_new(void);
BIGNUM *BN_secure_new(void);
void BN_clear_free(BIGNUM *a);
BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
void BN_swap(BIGNUM *a, BIGNUM *b);
BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
int BN_bn2bin(const BIGNUM *a, unsigned char *to);
int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen);
BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen);
BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
/** BN_set_negative sets sign of a BIGNUM
* \param b pointer to the BIGNUM object
* \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise
*/
void BN_set_negative(BIGNUM *b, int n);
/** BN_is_negative returns 1 if the BIGNUM is negative
* \param b pointer to the BIGNUM object
* \return 1 if a < 0 and 0 otherwise
*/
int BN_is_negative(const BIGNUM *b);
int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
BN_CTX *ctx);
# define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx))
int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
BN_CTX *ctx);
int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
const BIGNUM *m);
int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
BN_CTX *ctx);
int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
const BIGNUM *m);
int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
BN_CTX *ctx);
int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
BN_CTX *ctx);
int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
int BN_mul_word(BIGNUM *a, BN_ULONG w);
int BN_add_word(BIGNUM *a, BN_ULONG w);
int BN_sub_word(BIGNUM *a, BN_ULONG w);
int BN_set_word(BIGNUM *a, BN_ULONG w);
BN_ULONG BN_get_word(const BIGNUM *a);
int BN_cmp(const BIGNUM *a, const BIGNUM *b);
void BN_free(BIGNUM *a);
int BN_is_bit_set(const BIGNUM *a, int n);
int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
int BN_lshift1(BIGNUM *r, const BIGNUM *a);
int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx);
int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx,
BN_MONT_CTX *in_mont);
int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
BN_CTX *ctx, BN_MONT_CTX *m_ctx);
int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx);
int BN_mask_bits(BIGNUM *a, int n);
# ifndef OPENSSL_NO_STDIO
int BN_print_fp(FILE *fp, const BIGNUM *a);
# endif
int BN_print(BIO *bio, const BIGNUM *a);
int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
int BN_rshift1(BIGNUM *r, const BIGNUM *a);
void BN_clear(BIGNUM *a);
BIGNUM *BN_dup(const BIGNUM *a);
int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
int BN_set_bit(BIGNUM *a, int n);
int BN_clear_bit(BIGNUM *a, int n);
char *BN_bn2hex(const BIGNUM *a);
char *BN_bn2dec(const BIGNUM *a);
int BN_hex2bn(BIGNUM **a, const char *str);
int BN_dec2bn(BIGNUM **a, const char *str);
int BN_asc2bn(BIGNUM **a, const char *str);
int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
* -2 for
* error */
BIGNUM *BN_mod_inverse(BIGNUM *ret,
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
BIGNUM *BN_mod_sqrt(BIGNUM *ret,
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
/* Deprecated versions */
DEPRECATEDIN_0_9_8(BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
const BIGNUM *add,
const BIGNUM *rem,
void (*callback) (int, int,
void *),
void *cb_arg))
DEPRECATEDIN_0_9_8(int
BN_is_prime(const BIGNUM *p, int nchecks,
void (*callback) (int, int, void *),
BN_CTX *ctx, void *cb_arg))
DEPRECATEDIN_0_9_8(int
BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
void (*callback) (int, int, void *),
BN_CTX *ctx, void *cb_arg,
int do_trial_division))
/* Newer versions */
int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
const BIGNUM *rem, BN_GENCB *cb);
int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
int do_trial_division, BN_GENCB *cb);
int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
const BIGNUM *Xp, const BIGNUM *Xp1,
const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
BN_GENCB *cb);
int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
BN_CTX *ctx, BN_GENCB *cb);
BN_MONT_CTX *BN_MONT_CTX_new(void);
int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
BN_MONT_CTX *mont, BN_CTX *ctx);
int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
BN_CTX *ctx);
int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
BN_CTX *ctx);
void BN_MONT_CTX_free(BN_MONT_CTX *mont);
int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, CRYPTO_RWLOCK *lock,
const BIGNUM *mod, BN_CTX *ctx);
/* BN_BLINDING flags */
# define BN_BLINDING_NO_UPDATE 0x00000001
# define BN_BLINDING_NO_RECREATE 0x00000002
BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
void BN_BLINDING_free(BN_BLINDING *b);
int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
BN_CTX *);
int BN_BLINDING_is_current_thread(BN_BLINDING *b);
void BN_BLINDING_set_current_thread(BN_BLINDING *b);
int BN_BLINDING_lock(BN_BLINDING *b);
int BN_BLINDING_unlock(BN_BLINDING *b);
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
int (*bn_mod_exp) (BIGNUM *r,
const BIGNUM *a,
const BIGNUM *p,
const BIGNUM *m,
BN_CTX *ctx,
BN_MONT_CTX *m_ctx),
BN_MONT_CTX *m_ctx);
DEPRECATEDIN_0_9_8(void BN_set_params(int mul, int high, int low, int mont))
DEPRECATEDIN_0_9_8(int BN_get_params(int which)) /* 0, mul, 1 high, 2 low, 3
* mont */
BN_RECP_CTX *BN_RECP_CTX_new(void);
void BN_RECP_CTX_free(BN_RECP_CTX *recp);
int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
BN_RECP_CTX *recp, BN_CTX *ctx);
int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx);
int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
BN_RECP_CTX *recp, BN_CTX *ctx);
# ifndef OPENSSL_NO_EC2M
/*
* Functions for arithmetic over binary polynomials represented by BIGNUMs.
* The BIGNUM::neg property of BIGNUMs representing binary polynomials is
* ignored. Note that input arguments are not const so that their bit arrays
* can be expanded to the appropriate size if needed.
*/
/*
* r = a + b
*/
int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
# define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b)
/*
* r=a mod p
*/
int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
/* r = (a * b) mod p */
int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
const BIGNUM *p, BN_CTX *ctx);
/* r = (a * a) mod p */
int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
/* r = (1 / b) mod p */
int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
/* r = (a / b) mod p */
int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
const BIGNUM *p, BN_CTX *ctx);
/* r = (a ^ b) mod p */
int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
const BIGNUM *p, BN_CTX *ctx);
/* r = sqrt(a) mod p */
int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
BN_CTX *ctx);
/* r^2 + r = a mod p */
int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
BN_CTX *ctx);
# define BN_GF2m_cmp(a, b) BN_ucmp((a), (b))
/*-
* Some functions allow for representation of the irreducible polynomials
* as an unsigned int[], say p. The irreducible f(t) is then of the form:
* t^p[0] + t^p[1] + ... + t^p[k]
* where m = p[0] > p[1] > ... > p[k] = 0.
*/
/* r = a mod p */
int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
/* r = (a * b) mod p */
int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
const int p[], BN_CTX *ctx);
/* r = (a * a) mod p */
int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
BN_CTX *ctx);
/* r = (1 / b) mod p */
int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
BN_CTX *ctx);
/* r = (a / b) mod p */
int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
const int p[], BN_CTX *ctx);
/* r = (a ^ b) mod p */
int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
const int p[], BN_CTX *ctx);
/* r = sqrt(a) mod p */
int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
const int p[], BN_CTX *ctx);
/* r^2 + r = a mod p */
int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
const int p[], BN_CTX *ctx);
int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
# endif
/*
* faster mod functions for the 'NIST primes' 0 <= a < p^2
*/
int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
const BIGNUM *BN_get0_nist_prime_192(void);
const BIGNUM *BN_get0_nist_prime_224(void);
const BIGNUM *BN_get0_nist_prime_256(void);
const BIGNUM *BN_get0_nist_prime_384(void);
const BIGNUM *BN_get0_nist_prime_521(void);
int (*BN_nist_mod_func(const BIGNUM *p)) (BIGNUM *r, const BIGNUM *a,
const BIGNUM *field, BN_CTX *ctx);
int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range,
const BIGNUM *priv, const unsigned char *message,
size_t message_len, BN_CTX *ctx);
/* Primes from RFC 2409 */
BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn);
BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn);
/* Primes from RFC 3526 */
BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn);
BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn);
BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn);
BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
# if OPENSSL_API_COMPAT < 0x10100000L
# define get_rfc2409_prime_768 BN_get_rfc2409_prime_768
# define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024
# define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536
# define get_rfc3526_prime_2048 BN_get_rfc3526_prime_2048
# define get_rfc3526_prime_3072 BN_get_rfc3526_prime_3072
# define get_rfc3526_prime_4096 BN_get_rfc3526_prime_4096
# define get_rfc3526_prime_6144 BN_get_rfc3526_prime_6144
# define get_rfc3526_prime_8192 BN_get_rfc3526_prime_8192
# endif
int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
# ifdef __cplusplus
}
# endif
#endif
```
|
Jaakko Tapio Oksanen (born 7 November 2000) is a Finnish professional footballer who plays as a midfielder for KuPS.
Oksanen is a product of the HJK Helsinki academy in his native Finland. Following years in England with Brentford, he returned to Finland to join KuPS in 2022. Oksanen is a current Finland international.
Club career
HJK Helsinki
A holding midfielder, Oksanen began his career in his native Finland as a youth with KP-75 and KOPSE, before entering the academy at Veikkausliiga club HJK Helsinki at the age of 12. He made his debut for Klubi 04 during an injury-hit 2016 season and signed a new one-year contract in December 2016. Oksanen made 24 appearances and scored two goals during a successful 2017 season for Klubi 04, which ended with promotion to the Ykkönen, via the playoffs. One week after the playoff victory, Oksanen made his senior debut for HJK Helsinki, as an 81st-minute substitute for Evans Mensah in a 3–2 defeat to RoPS on 28 October 2017. It proved to be his only appearance for the first team and he departed the Telia 5G -areena on 13 January 2018.
Brentford
On 13 January 2018, Oksanen moved to England to sign for the B team at Championship club Brentford on a -year contract for an undisclosed fee. An injury crisis saw Oksanen feature as an unused substitute during three first team matches in November 2018, before he suffered an ankle ligament injury. After returning to fitness, Oksanen was a regular inclusion in matchday squads during the final two months of the 2018–19 season and made his debut as a substitute for Sergi Canós late in a 3–0 victory over Preston North End on the final day. He was also a member of the B team's 2018–19 Middlesex Senior Cup-winning squad.
Oksanen spent the majority of the 2019–20 pre-season with the first team squad and made two appearances during the regular season. Entering the final months of his contract, Oksanen signed a two-year extension in March 2020 and his B team performances were recognised with the team's 2019–20 Player of the Year award. On 13 August 2020, Oksanen joined League One club AFC Wimbledon on a season-long loan. Either side of two months out due to a mid-season ankle injury, he made 30 appearances during his spell.
On 31 August 2021, Oksanen joined Scottish Championship club Greenock Morton on loan until 3 January 2022 and made 16 appearances during his spell. He played the remainder of the 2021–22 season with Brentford B and was a part of the London Senior Cup-winning squad. Following years with Brentford (during which he made 88 B team appearances and three first team appearances), Oksanen was released when his contract expired at the end of the 2021–22 season.
KuPS
On 10 July 2022, Oksanen transferred to Veikkausliiga club KuPS and signed an 18-month contract, with the option of a further year, effective 13 July 2022. During the remainder of the 2022 season, he made 17 appearances, scored two goals and was a part of the club's 2022 Finnish Cup-winning squad. In recognition of his performances, Oksanen was voted the club's Player of the Year and Young Player of the Year and was twice named in the Veikkausliiga Team of the Month.
International career
Oksanen has been capped by Finland at U16, U17, U18, U19 and U21 level. He appeared in each of Finland's three matches at the 2018 European U19 Championship and his development during 2018 was recognised with the SPL Most Promising Young Player of the Year award.
On 30 December 2022, Oksanen won his maiden call into the full Finland squad for a January 2022 training camp in Algarve, which included two friendly matches. He made his full international debut with a start in the second match, a 1–0 defeat to Estonia.
Career statistics
International
Honours
Klubi 04
Kakkonen play-offs: 2017
Brentford B
Middlesex Senior Cup: 2018–19
London Senior Cup: 2021–22
KuPS
Finnish Cup: 2022
Individual
SPL Most Promising Young Player of the Year: 2018
Brentford B Player of the Year: 2019–20
Veikkausliiga Team of the Month: August 2022, October 2022
KuPS Player of the Year: 2022
KuPS Young Player of the Year: 2022
References
External links
Jaakko Oksanen at palloliitto.fi
2000 births
Living people
Finnish men's footballers
Helsingin Jalkapalloklubi players
Finland men's youth international footballers
Veikkausliiga players
Finnish expatriate sportspeople in England
Footballers from Helsinki
Klubi 04 players
Men's association football midfielders
Brentford F.C. players
Kakkonen players
Finland men's under-21 international footballers
AFC Wimbledon players
Greenock Morton F.C. players
Finnish expatriate men's footballers
Finnish expatriate sportspeople in Scotland
Expatriate men's footballers in England
Expatriate men's footballers in Scotland
Scottish Professional Football League players
Kuopion Palloseura players
Finland men's international footballers
|
Paterson Museum is a museum in Paterson, in Passaic County, New Jersey, in the United States. Founded in 1925, it is owned and run by the city of Paterson and its mission is to preserve and display the industrial history of Paterson. It is located in the Old Great Falls Historic District.
Since 1982 the museum has been housed in the Thomas Rogers Building on Market Street, the former erecting shop of Rogers Locomotive and Machine Works, a major 19th-century manufacturer of railroad steam locomotives. Prior to 1982 the museum was located in the former carriage house of Nathan Barnert, civic figure and philanthropist.
Inventory
The museum has some notable old-found items. It has a range of old guns, Native American artifacts, to gem stones and old locomotives. Many tours are constantly coming from schools and other towns to inspect and check out these old items. The museum additionally has a beautiful painting collection, although to make room for more 'notable' items, they have put a lot of these paintings into personal hold.
The museum has a vast collection of medicine that was used in the early 1900s, along with beautiful paintings of medicine covers. The number of old medicine caps that they have vary in the hundreds. They also have paintings of old hospital assistants, and how life back in the infirmary was in the early years.
Notable exhibits include the Fenian Ram, the submarine designed by John Philip Holland for use by the Fenian Brotherhood and their earlier Holland I. The museum also houses an archive of Holland's life and work. A large collection of early Colt firearms and the façade of a playhouse built by Lou Costello for his children are also on display. There is a display of industrial equipment from the former silk-weaving factories that used to be a prominent part of Paterson's economy, including automated looms. The museum has a railroad track at its entrance, with live toy-model train going around the track.
In popular culture
The museum's first head curator was James Ferdinand Morton Jr., who held the position from the museum's founding in 1925 until his death in 1941. Morton was friends with author H. P. Lovecraft, and based on this friendship, Lovecraft includes the Paterson Museum in a scene in his famous 1926 short story "The Call of Cthulhu". Lovecraft's 1935 short story "The Haunter of the Dark" includes an artifact called the Shining Trapezohedron; it has been proposed that Lovecraft based this artifact on a trapezoidal piece of almandine on display at the Paterson Museum.
See also
John P. Holland Centre
References
External links
A History of Paterson — The Rogers Locomotive & Machine Works
New Jersey Historic Trust — preservation efforts on the remaining Rogers erecting shop building.
Fenian Ram Photos of Fenian Ram at the Paterson Museum
Buildings and structures in Paterson, New Jersey
John Philip Holland
Industry museums in New Jersey
Museums in Passaic County, New Jersey
Museums established in 1925
History museums in New Jersey
Railroad museums in New Jersey
1925 establishments in New Jersey
|
The Walls Came Tumbling Down: The Collapse of Communism in Eastern Europe was published by Oxford University Press, New York in 1993 and is a work of non-fiction based on events in Eastern Europe from 1968 to 1991. It was written by Gale Stokes, then a professor emeritus of history at Rice University. The book received the 1993 Wayne S. Vucinich Prize of the American Association for the Advancement of Slavic Studies for the Best Book Published in Russian and East European Studies.
Summary
Beginning with the 1968 Soviet-led invasion of Czechoslovakia and culminating in the 1989-1991 revolutions, The Walls Came Tumbling Down is a narrative of the gradual collapse of Eastern European communism. Focusing on the decades of unrest that precipitated 1989's tumultuous events, Stokes provides a history of the various communist regimes and the opposition movements that brought them down, including the "March Days" and Solidarity, the 1975 Helsinki Accords, Czechoslovakia's Charter 77 opposition movement, and the autocratic policies of Romania's Nicolae Ceauşescu that precipitated the 1989 Revolution. Stokes examines the first tottering steps in 1990-1991 toward pluralist government, from the resignation of Mikhail Gorbachev to the bloody partitioning of war-torn Yugoslavia.
See also
Gender roles in post-communist Central and Eastern Europe
1993 non-fiction books
History books about Eastern Europe
History books about Czechoslovakia
History books about Romania
History books about communism
History books about Yugoslavia
|
```go
//
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing, software
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
package resource // import "go.opentelemetry.io/otel/sdk/resource"
import (
"bufio"
"context"
"errors"
"io"
"os"
"regexp"
semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
)
type containerIDProvider func() (string, error)
var (
containerID containerIDProvider = getContainerIDFromCGroup
cgroupContainerIDRe = regexp.MustCompile(`^.*/(?:.*[-:])?([0-9a-f]+)(?:\.|\s*$)`)
)
type cgroupContainerIDDetector struct{}
const cgroupPath = "/proc/self/cgroup"
// Detect returns a *Resource that describes the id of the container.
// If no container id found, an empty resource will be returned.
func (cgroupContainerIDDetector) Detect(ctx context.Context) (*Resource, error) {
containerID, err := containerID()
if err != nil {
return nil, err
}
if containerID == "" {
return Empty(), nil
}
return NewWithAttributes(semconv.SchemaURL, semconv.ContainerID(containerID)), nil
}
var (
defaultOSStat = os.Stat
osStat = defaultOSStat
defaultOSOpen = func(name string) (io.ReadCloser, error) {
return os.Open(name)
}
osOpen = defaultOSOpen
)
// getContainerIDFromCGroup returns the id of the container from the cgroup file.
// If no container id found, an empty string will be returned.
func getContainerIDFromCGroup() (string, error) {
if _, err := osStat(cgroupPath); errors.Is(err, os.ErrNotExist) {
// File does not exist, skip
return "", nil
}
file, err := osOpen(cgroupPath)
if err != nil {
return "", err
}
defer file.Close()
return getContainerIDFromReader(file), nil
}
// getContainerIDFromReader returns the id of the container from reader.
func getContainerIDFromReader(reader io.Reader) string {
scanner := bufio.NewScanner(reader)
for scanner.Scan() {
line := scanner.Text()
if id := getContainerIDFromLine(line); id != "" {
return id
}
}
return ""
}
// getContainerIDFromLine returns the id of the container from one string line.
func getContainerIDFromLine(line string) string {
matches := cgroupContainerIDRe.FindStringSubmatch(line)
if len(matches) <= 1 {
return ""
}
return matches[1]
}
```
|
Sarıhasanlı is a village in the Ağaçören District, Aksaray Province, Turkey. Its population is 184 (2021).
References
Villages in Ağaçören District
|
```php
<?php
/*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
*/
namespace Google\Service\AccessContextManager;
class BasicLevel extends \Google\Collection
{
protected $collection_key = 'conditions';
/**
* @var string
*/
public $combiningFunction;
protected $conditionsType = Condition::class;
protected $conditionsDataType = 'array';
/**
* @param string
*/
public function setCombiningFunction($combiningFunction)
{
$this->combiningFunction = $combiningFunction;
}
/**
* @return string
*/
public function getCombiningFunction()
{
return $this->combiningFunction;
}
/**
* @param Condition[]
*/
public function setConditions($conditions)
{
$this->conditions = $conditions;
}
/**
* @return Condition[]
*/
public function getConditions()
{
return $this->conditions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BasicLevel::class, 'Google_Service_AccessContextManager_BasicLevel');
```
|
Corey Alan Elkins (born February 23, 1985) is an American former ice hockey center who played3 games in the National Hockey League with the Los Angeles Kings. The rest of his career, which lasted from 2009 to 2020, was spent in the minor leagues and then in Europe.
Playing career
Undrafted, Elkins attended Keith Elementary school in West Bloomfield, Michigan. Elkins played collegiate hockey with Ohio State University of the Central Collegiate Hockey Association before signing an entry-level contract and appearing in 3 games with the Los Angeles Kings of the National Hockey League (NHL)
After just two seasons within the Kings organization, Elkins left for abroad, linking up with HC Pardubice of the Czech Extraliga (ELH).
On July 9, 2012, Elkins signed a one-year, two-way contract with the Anaheim Ducks. During the 2012–13 season, Elkins was assigned to Ducks affiliates. On January 5, 2013, Elkins was granted a mutual release of his contract and returned to Europe in signing for the remainder of the year in Finland with HIFK of the SM-liiga.
Elkins played 5 seasons in the Liiga with HIFK, before concluding his tenure in Finland after the 2016–17 season. As a free agent, Elkins opted to return to North America, agreeing to a one-year AHL contract with the Grand Rapids Griffins on May 2, 2017. In his return to the AHL in the 2017–18 season, Elkins did not miss a game with the Griffins, contributing with 9 goals and 20 points in 76 games.
After a first-round exit in the post-season, Elkins left Grand Rapids as a free agent, agreeing to continue his career in Germany on a one-year contract with Grizzlys Wolfsburg of the DEL on May 14, 2018. During preparation with the Grizzlys for the 2018–19 campaign, Albert suffered a long-term injury, forcing him out for the entirety of the season.
Career statistics
Regular season and playoffs
References
External links
1985 births
Living people
American expatriate ice hockey players in Finland
American expatriate ice hockey players in Norway
American expatriate ice hockey players in the Czech Republic
American men's ice hockey centers
Fort Wayne Komets players
HC Dynamo Pardubice players
Grand Rapids Griffins players
HIFK (ice hockey) players
Ice hockey players from Michigan
Los Angeles Kings players
Manchester Monarchs (AHL) players
Norfolk Admirals players
Ohio State Buckeyes men's ice hockey players
People from West Bloomfield, Michigan
Ice hockey people from Oakland County, Michigan
St. Louis Heartland Eagles players
Sioux City Musketeers players
Undrafted National Hockey League players
|
```c++
//your_sha256_hash--------------
// CLING - the C++ LLVM-based InterpreterG :)
// author: Vassil Vassilev <vvasilev@cern.ch>
//
// This file is dual-licensed: you can choose to license it under the University
// LICENSE.TXT for details.
//your_sha256_hash--------------
#include "clang/Frontend/FrontendPluginRegistry.h"
#include "clang/Lex/Preprocessor.h"
struct PluginConsumer : public clang::ASTConsumer {
bool HandleTopLevelDecl(clang::DeclGroupRef /*DGR*/) override {
llvm::outs() << "PluginConsumer::HandleTopLevelDecl\n";
return true; // Happiness
}
};
template<typename ConsumerType>
class Action : public clang::PluginASTAction {
protected:
std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(clang::CompilerInstance&,
llvm::StringRef /*InFile*/) override {
llvm::outs() << "Action::CreateASTConsumer\n";
return std::unique_ptr<clang::ASTConsumer>(new ConsumerType());
}
bool ParseArgs(const clang::CompilerInstance &,
const std::vector<std::string>&) override {
llvm::outs() << "Action::ParseArgs\n";
// return false; // Tells clang not to create the plugin.
return true; // Happiness
}
PluginASTAction::ActionType getActionType() override {
return AddBeforeMainAction;
}
};
// Define a pragma handler for #pragma demoplugin
class DemoPluginPragmaHandler : public clang::PragmaHandler {
public:
DemoPluginPragmaHandler() : clang::PragmaHandler("demoplugin") { }
void HandlePragma(clang::Preprocessor &/*PP*/,
clang::PragmaIntroducer /*Introducer*/,
clang::Token &/*PragmaTok*/) override {
llvm::outs() << "DemoPluginPragmaHandler::HandlePragma\n";
// Handle the pragma
}
};
// Register the PluginASTAction in the registry.
static clang::FrontendPluginRegistry::Add<Action<PluginConsumer> >
X("DemoPlugin", "Used to test plugin mechanisms in cling.");
// Register the DemoPluginPragmaHandler in the registry.
static clang::PragmaHandlerRegistry::Add<DemoPluginPragmaHandler>
Y("demoplugin","Used to test plugin-attached pragrams in cling.");
```
|
```css
Position elements with `position: sticky`
Difference between `display: none` and `visibility: hidden`
Controlling cellpadding and cellspacing in CSS
Vertically-center anything
Equal width table cells
```
|
```javascript
/* Flot plugin for stacking data sets rather than overlyaing them.
The plugin assumes the data is sorted on x (or y if stacking horizontally).
For line charts, it is assumed that if a line has an undefined gap (from a
null point), then the line above it should have the same gap - insert zeros
instead of "null" if you want another behaviour. This also holds for the start
and end of the chart. Note that stacking a mix of positive and negative values
in most instances doesn't make sense (so it looks weird).
Two or more series are stacked when their "stack" attribute is set to the same
key (which can be any number or string or just "true"). To specify the default
stack, you can set the stack option like this:
series: {
stack: null/false, true, or a key (number/string)
}
You can also specify it for a single series, like this:
$.plot( $("#placeholder"), [{
data: [ ... ],
stack: true
}])
The stacking order is determined by the order of the data series in the array
(later series end up on top of the previous).
Internally, the plugin modifies the datapoints in each series, adding an
offset to the y value. For line series, extra data points are inserted through
interpolation. If there's a second y value, it's also adjusted (e.g for bar
charts or filled areas).
*/
(function ($) {
var options = {
series: { stack: null } // or number/string
};
function init(plot) {
function findMatchingSeries(s, allseries) {
var res = null;
for (var i = 0; i < allseries.length; ++i) {
if (s == allseries[i])
break;
if (allseries[i].stack == s.stack)
res = allseries[i];
}
return res;
}
function stackData(plot, s, datapoints) {
if (s.stack == null || s.stack === false)
return;
var other = findMatchingSeries(s, plot.getData());
if (!other)
return;
var ps = datapoints.pointsize,
points = datapoints.points,
otherps = other.datapoints.pointsize,
otherpoints = other.datapoints.points,
newpoints = [],
px, py, intery, qx, qy, bottom,
withlines = s.lines.show,
horizontal = s.bars.horizontal,
withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y),
withsteps = withlines && s.lines.steps,
fromgap = true,
keyOffset = horizontal ? 1 : 0,
accumulateOffset = horizontal ? 0 : 1,
i = 0, j = 0, l, m;
while (true) {
if (i >= points.length)
break;
l = newpoints.length;
if (points[i] == null) {
// copy gaps
for (m = 0; m < ps; ++m)
newpoints.push(points[i + m]);
i += ps;
}
else if (j >= otherpoints.length) {
// for lines, we can't use the rest of the points
if (!withlines) {
for (m = 0; m < ps; ++m)
newpoints.push(points[i + m]);
}
i += ps;
}
else if (otherpoints[j] == null) {
// oops, got a gap
for (m = 0; m < ps; ++m)
newpoints.push(null);
fromgap = true;
j += otherps;
}
else {
// cases where we actually got two points
px = points[i + keyOffset];
py = points[i + accumulateOffset];
qx = otherpoints[j + keyOffset];
qy = otherpoints[j + accumulateOffset];
bottom = 0;
if (px == qx) {
for (m = 0; m < ps; ++m)
newpoints.push(points[i + m]);
newpoints[l + accumulateOffset] += qy;
bottom = qy;
i += ps;
j += otherps;
}
else if (px > qx) {
// we got past point below, might need to
// insert interpolated extra point
if (withlines && i > 0 && points[i - ps] != null) {
intery = py + (points[i - ps + accumulateOffset] - py) * (qx - px) / (points[i - ps + keyOffset] - px);
newpoints.push(qx);
newpoints.push(intery + qy);
for (m = 2; m < ps; ++m)
newpoints.push(points[i + m]);
bottom = qy;
}
j += otherps;
}
else { // px < qx
if (fromgap && withlines) {
// if we come from a gap, we just skip this point
i += ps;
continue;
}
for (m = 0; m < ps; ++m)
newpoints.push(points[i + m]);
// we might be able to interpolate a point below,
// this can give us a better y
if (withlines && j > 0 && otherpoints[j - otherps] != null)
bottom = qy + (otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx) / (otherpoints[j - otherps + keyOffset] - qx);
newpoints[l + accumulateOffset] += bottom;
i += ps;
}
fromgap = false;
if (l != newpoints.length && withbottom)
newpoints[l + 2] += bottom;
}
// maintain the line steps invariant
if (withsteps && l != newpoints.length && l > 0
&& newpoints[l] != null
&& newpoints[l] != newpoints[l - ps]
&& newpoints[l + 1] != newpoints[l - ps + 1]) {
for (m = 0; m < ps; ++m)
newpoints[l + ps + m] = newpoints[l + m];
newpoints[l + 1] = newpoints[l - ps + 1];
}
}
datapoints.points = newpoints;
}
plot.hooks.processDatapoints.push(stackData);
}
$.plot.plugins.push({
init: init,
options: options,
name: 'stack',
version: '1.2'
});
})(jQuery);
```
|
Mount Adams is a mountain in the West Coast region of New Zealand's South Island. The summit is roughly 19 km south of Harihari and reaches in height.
Mount Adams lies to the west of the main divide of the Southern Alps and drains into the Whataroa and Poerua catchments. Both of these rivers flow westwards to the Tasman Sea. There are two small glaciers on the south-eastern slopes that drain the summit ice cap; the Escape Glacier (about 2.1 km in length) and the Siege Glacier (about 3.6 km).
Climate
This area, like much of the West Coast region, is subject to high precipitation by world standards. There are no rainfall gauges on Mount Adams, but a gauge in Whataroa valley at the bridge 10 km south-west of the summit at 60 metres above sea level, records a mean annual rainfall of and daily falls of up to . It is likely that the precipitation at higher elevations on Mount Adams will be significantly greater than this, and a rain gauge in the Cropp River 42 km north-east of Mount Adams at 860 metres above sea level, records a mean annual rainfall of and daily falls of up to .
Geology
The Alpine Fault runs across the lower North-western slopes of the mountain near the edge of the coastal outwash plain, and is the boundary between the Pacific and Indo-Australian tectonic plates. Mount Adams itself is composed primarily of schist of Permian–Triassic (depositional) age, which is increasingly metamorphosed closer to the Alpine Fault.
On 6 October 1999, a large rock landslide originating near the northern summit of Mount Adams deposited c.10–15 million cubic metres of rock in the Poerua River below. This created a high landslide dam, which formed a lake that extended 1.2 kilometres upstream. The dam failed six days later during heavy rain. Fears of major damage did not turn into reality when the dam was breached, though significant quantities of coarse gravel were deposited downstream and the river's path was changed in places.
Access
Mount Adams is unique in that it is one of the only glaciated peaks situated on or to the west of the main divide that is accessible as a weekend trip from a west coast road end. The standard route to the summit starts from a hidden layby off SH6 and heads up Dry Creek/Little Man River to a steep spur where a marked route starts. The marked route ends at the bushline and the remainder of the climb is on tussock, rock, and eventually the summit ice cap glacier.
Although this route is technically not difficult, it involves multiple river crossings, off track travel up Dry Creek/Little Man River and above the bushline, and glacial travel requiring an ice axe and crampons. The overall elevation gain, from highway to summit, is approximately . Most parties take two days to summit and return to SH6, though it is possible in a long summer day.
References
Westland District
Mountains of the West Coast, New Zealand
Southern Alps
|
```yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: restricted-pods-role
rules:
- apiGroups:
- extensions
resources:
- podsecuritypolicies
resourceNames:
- restricted-psp
verbs:
- use
```
|
Bennington is a town in Bennington County, Vermont, United States. It is one of two shire towns (county seats) of the county, the other being Manchester. As of the 2020 US Census, the population was 15,333. Bennington is the most populous town in southern Vermont, the second-largest town in Vermont (after Colchester) and the sixth-largest municipality in the state, including the cities of Burlington, Rutland, and South Burlington.
The town is home to the Bennington Battle Monument, which is the tallest human-made structure in the state of Vermont. The town has a long history of manufacturing, primarily within wood processing. The town is also recognized nationally for its pottery, iron, and textiles.
History
First of the New Hampshire Grants, Bennington was chartered on January 3, 1749, by Colonial Governor Benning Wentworth and named in his honor. It was granted to William Williams and 61 others, mostly from Portsmouth, New Hampshire, making the town the oldest to be chartered in Vermont and outside of what is now New Hampshire, though Brattleboro had been settled earlier as a fort. The town was first settled in 1761 by four families from Hardwick and two from Amherst, Massachusetts. They were led by Capt. Samuel Robinson, who camped in the river valley on his return from the French and Indian War.
Prior to the arrival of colonists, the land belonged to the Western Abenaki of the Wabanaki Confederacy. These peoples were indigenous to Ndakinna—most of what is now northern New England, southern Quebec, and the southern Canadian Maritimes.
There are three historic districts within the town today: Old Bennington, Downtown Bennington and North Bennington. Of these, Old Bennington is the original settlement, dating back to 1761, when Congregational Separatists arrived from Connecticut and from Amherst and Hardwick, Massachusetts. In the early 1800s, Downtown Bennington started developing, and by 1854 the county's population had reached 18,589.
Battle of Bennington
The town is known in particular for the Battle of Bennington, which took place during the Revolutionary War. Although the battle took place approximately to the west in what is now the state of New York, an ammunition storage building located in Bennington was an important strategic target. On August 16, 1777, Gen. John Stark's 1,500-strong New Hampshire Militia defeated 800 German (Hessian) mercenaries, local Loyalists, Canadians and Indians under the command of German Lt. Col. Friedrich Baum. German reinforcements under the command of Lt. Col. Heinrich von Breymann looked set to reverse the outcome, but were prevented by the arrival of Seth Warner's Green Mountain Boys, the Vermont militia founded by Ethan Allen.
In 1891, the Bennington Battle Monument was opened. The monument is a stone obelisk that is the tallest human-made structure in Vermont. It is a popular tourist attraction.
Geography
Bennington is located in southwestern Bennington County at .
To the west is New York State; Pownal is to the south; Shaftsbury is to the north; and Woodford is to the east.
Located in the southwesternmost portion of Vermont, it is geographically closer to the capital cities of Albany, New York; Hartford, Connecticut; and Concord, New Hampshire than to its own state capital, Montpelier.
According to the United States Census Bureau, the town has a total area of , of which are land and , or 0.59%, is water. Bennington is drained by the Walloomsac River and its tributaries, flowing to the Hoosic and then the Hudson River. The town is located along the western edge of the Green Mountains, including Bald Mountain, which occupies the northeastern edge of town. (Its summit is just over the town line in Woodford.) In the southwest part of town is Mount Anthony, part of the Taconic Range.
Climate
Bennington experiences a humid continental climate (Köppen Dfb) with cold, snowy winters and warm to hot, humid summers. Snowfall can vary greatly from year to year. The town can experience snowfall as early as October and as late as April, and the surrounding high country can receive snow as late as May. Nor'easters, accompanied by high winds, often dump heavy snow on the town during the winter, and accumulations of one foot of snow or greater are not uncommon when these storms move through the area. One such storm dumped very wet, heavy snow on October 4, 1987, catching many residents off guard, because it occurred quite early in that year's fall season. The storm resulted in many downed trees and power lines, due in part to that year's fall foliage still being intact. Abundant sunshine, along with heavy showers and thunderstorms, are frequent during the summer months. Although tornadoes seldom occur there, an F2 tornado did hit North Bennington on May 31, 1998, during an extremely rare tornado outbreak in the region.
The record high is , set in 1955. The record low is , set in 1994. July is typically the wettest month, and February is the driest. Bennington averages of snow annually.
Bennington lies in USDA plant hardiness zone 5a.
Demographics
As of the 2010 US census, there were 15,764 people, 6,246 households, and 3,716 families residing in the town. The population density was 370.92 people per square mile (143.18/km2). There were 6,763 housing units at an average density of 159.3 per square mile (61.4/km2). The ethnic/racial makeup of the town was 95.9% White, 1.3% from two or more races, 1.2% Black, 0.8% Asian, 0.4% from other races, 0.3% Native American, and 0.1% Pacific Islander. Latino of any race were 1.7% of the population.
There were 6,246 households, out of which 25.9% had children under the age of 18 living with them, 40.2% were couples living together and joined in either marriage or civil union, 14.2% had a female householder with no husband present, and 40.5% were non-families. 33.0% of all households were made up of individuals, and 14.5% had someone living alone who was 65 years of age or older. The average household size was 2.29 and the average family size was 2.88.
In the town, the population was spread out, with 23.5% under the age of 18, 10.7% from 18 to 24, 26.1% from 25 to 44, 22.0% from 45 to 64, and 17.8% who were 65 years of age or older. The median age was 38 years. For every 100 females, there were 87.0 males. For every 100 females age 18 and over, there were 82.6 males.
The median income for a household in the town was $39,765, and the median income for a family was $51,489. Males had a median income of $39,406 versus $30,322 for females. The per capita income for the town was $23,560. About 14.2% of families and 15.1% of the population were below the poverty line, including 25.0% of those under age 18 and 6.9% of those age 65 or over.
Government
Bennington employs an open town meeting form of local government, with an elected seven-member Select Board elected by the town's citizens at large from two districts. The Select Board is considered the "executive branch" of the town's government, which in turn hires and supervises a Town Manager. As of 2021, the town manager is Stuart A. Hurd. The current Town Clerk is Cassandra J. Barbeau.
Four representatives from Bennington's two voting districts currently represent the town in Montpelier. Bennington County is also represented by two state senators.
Fire department
The town is protected by both the Bennington Fire Department and the Bennington Rural Fire Department. The current chief of the Bennington Fire Department is Jeff Vickers, and the current chief of the Bennington Rural Fire Department is Wayne Davis.
Police
The town is protected by the Bennington Police Department, which consists of 40 sworn and non-sworn officials serving the town, including the villages of Old Bennington and North Bennington. The police station's home is at 118 South Street in downtown Bennington. Its current Chief of Police is Paul J. Doucette.
Economy
Industries related to agriculture, forestry, fishing, trade and retail, tourism, shipping by air, health care and government related jobs help shape and play a vital role in Bennington's economy. Bennington County has 15,194 non-farm employees living or working within the county as of 2013. Southwestern Vermont Medical Center, with a workforce of approximately 1,300 employees, is the town's largest employer and the seventh largest in Vermont. Its largest for-profit manufacturing employer is NSK Steering Systems America, Inc., with a workforce of 864 as of March 2013. Saint Gobain owns a plastic factory, the former ChemFab plant, which has contaminated the environment with Perfluoroalkyl and Polyfluoroalkyl Substances (PFAS).
Bennington leaders have formed the Bennington Economic Development Partners to facilitate and expedite economic growth, working from a newly created Strategic Economic Development Plan that promotes the benefits afforded to companies located in the local area. Low interest loans, site-ready properties for manufacturing, R&D, Retail, and Technology are a few of the benefits available to new and existing industries.
The Town of Bennington Economic and Community Development Office, the Better Bennington Corporation, the Bennington Area Chamber of Commerce, Bennington County Regional Commission, and Bennington County Industrial Corporation are just some of the partners that coordinate the efforts of the Strategic Plan.
Bennington's "big box" development is mostly confined to the Northside Drive and Kocher Drive corridor in the northern portion of town.
Long time ski clothing company, CB Sports was headquartered in Bennington. They operated a popular factory outlet store in town which closed in 2008, due to slow sales as a result of the Great Recession.
Downtown
Bennington has a historic downtown with businesses that include a chocolatier, bakery, cafes, pizza parlors, Chinese restaurant, live theatre, breweries and distilleries, bookshop, men's and women's clothiers, jewelers, Vermont crafts and products, toy stores, antique stores, music shops, a hobby shop, a country store, an art shop, a museum, and several galleries.
Downtown Bennington is also home to Bennington Potters, Oldcastle Theatre, Hemmings Motor News, Robert Frost's Grave and the Old First Church, the Bennington Museum, Grandma Moses' Schoolhouse, Old Blacksmith Shop Visitor Center, Lucky Dragon, and Madison's Brewery.
The downtown area is noted for its historically preserved architecture, outdoor seasonal dining, locally owned shops, cafés, Memorial Fountain Park, antique shops, and river walk paralleling the Walloomsac River.
Downtown Bennington is a designated "Vermont Main Street" participant overseen and operated by the Better Bennington Corporation, a nationally accredited National Main Street Program by the National Trust for Historic Preservation.
Big box bylaw
In January 2005, the Select Board proposed a big box bylaw, primarily in response to Wal-Mart's plans to raze its existing outlet and replace it with a Supercenter. The potential negative impact on the town's local economy, the low wages paid by Wal-Mart to its employees, and controversies associated with Wal-Mart in general were cited as reasons in support of the bylaw. The bylaw called for a cap on big box stores. In addition, any retailer wishing to build a store greater than of aggregate store space would be required to submit and pay for an evaluation known as a Community Impact Study to the Select Board for approval. Residents voted against the initial proposal in April 2005. However, the Select Board passed a new bylaw on August 1, 2005, that went into effect August 22.
Transportation
Roads and highways
Bennington is the largest town, and the second-largest municipality in Vermont (after Rutland City), that is not located on or near either of Vermont's two major Interstate highways. It is, however, signed on Interstate 91 at Exit 2 in Brattleboro and Interstate 787 at Exit 9E in Green Island, New York.
Five highways cross the town, including two limited-access freeways. They are:
U.S. Route 7 ("Ethan Allen Highway")
Vermont Route 9 ("Molly Stark Trail")
Vermont Route 7A ("Shires of Vermont Byway")
Vermont Route 67A
Vermont Route 279 ("Bennington Bypass")
U.S. Route 7, originating in Connecticut and continuing northward to the Canada–US border, enters Bennington from the town of Pownal.
VT Route 9 enters the town from the New York border in Hoosick, where the roadway continues west as NY Route 7, connecting to New York state's Capital District.
VT Route 279, also known as the Bennington Bypass, is a Super 2 freeway. The western segment continues westward as NY Reference Route 915G (unsigned) into Hoosick, New York, before meeting NY Route 7. This road forms a rough semi-circle shape around and north of the unincorporated portion of the town, loosely parallelling VT Route 9 while doing so. A Vermont Welcome Center, located at the center of Route 279's interchange with US 7.
Historic VT Route 7A, so named to distinguish it from the freeway portion of US 7, is the former alignment of that road prior to the freeway being built.
Vermont Route 67A remains within Bennington for its entire length.
Bus
Bennington is home to the Green Mountain Community Network, who operate the local Green Mountain Express bus service. As of September 29, 2014, they provide 5 in-town routes Monday through Saturday from 7:35 am to 6 pm on weekdays, and 3 out of town commuter routes serving Manchester (weekdays and Saturdays), Williamstown (weekdays) and Wilmington (weekdays in collaboration with Southeast Vermont Transit, formerly the Deerfield Valley Transit Association's, "MOOver"), and intermediate points.
Intercity bus service is provided by the weekday operating Yankee Trails World Travel's Albany-Bennington Shuttle, as well as by Premier Coach's Vermont Translines, in its partnership with Greyhound, which operates its Albany to Burlington bus line daily. Both buses serve the town from GMCN's bus terminal.
Taxi
A few taxi companies, including Bennington Taxi, Walt's Taxi and Monument Taxi, currently serve Bennington and surrounding areas. Uber and Lyft ridesharing is also available there.
Rail
The Vermont Railway freight rail line, and an exempt rail spur, traverses Bennington in the northern portions. The closest Amtrak train station is at the Joseph Scelsi Intermodal Transportation Center in Pittsfield, Massachusetts, served by the Boston to Chicago Lake Shore Limited train. Amtrak train service is also available from Renssalaer, New York.
Air
William H. Morse State Airport is a public-use, state-owned airport located about west of downtown Bennington. Also referred to as "Southwest Vermont's Airport", it sits near the northern flank of Mount Anthony and close to the Bennington Battle Monument. Based at this airport is the hub of cargo air carrier AirNow. The closest commercial passenger airport to Bennington is Albany International Airport.
Education
Bennington is home to a variety of municipal, parochial and private schools. Continuing education is supported by a diverse mix of colleges and career development centers. Bennington College is a progressive four-year liberal arts college ranked 89 in Tier 1 by U.S. News College Rankings. Southern Vermont College was a private, four-year liberal arts college offering a career-directed curriculum, but has since closed indefinitely following the 2018–2019 academic year. Northeastern Baptist College opened in 2013. Bennington also has separate satellite campuses of the Community College of Vermont and Vermont Technical College, both located downtown.
Bennington currently has four K–12 public elementary schools:
Village School of North Bennington (formerly North Bennington Graded School)
Bennington Elementary School
Monument Elementary School
Molly Stark Elementary School
There is one public middle school, the Mount Anthony Union Middle School (MAUMS), and one public high school, the Mount Anthony Union High School (MAUHS). The Southwest Vermont Supervisory Union oversees Bennington's public school system, which also includes a career center, the Southwestern Vermont Career Development Center, located on MAUHS' campus.
Grace Christian School is a private, faith-based K–12 school founded in 1995.
High school sports
Bennington is home to the 33-time defending state wrestling champion Mount Anthony Patriots. They have won 33 consecutive Vermont state wrestling championships as of the 2022 season. This is the national record.
As of 2010, the Mount Anthony Patriots have also been state champions in men's and women's nordic skiing, baseball, football, golf and women's lacrosse.
Places of worship
There are 22 places of worship in Bennington, 21 Christian and one Jewish, and at least 18 denominations. The following list does not include places of worship in North Bennington, which is an incorporated village in Bennington.
Bennington Church of Christ (Churches of Christ)
Bennington Friends Meeting (Quaker)
Bennington Seventh-day Adventist Church (Seventh-day Adventist)
Bible Baptist Church of Bennington (Independent Baptist)
Church Of God Iglesia De Dios Alfa & Omega
The Church of Jesus Christ of Latter-day Saints – Bennington, Vermont (Latter-day Saints)
Congregation Beth El (Reconstructionist Judaism)
First Baptist Church of Bennington (American Baptist Churches USA)
First Congregational Church of Bennington (National Association of Congregational Christian Churches)
Green Mountain Christian Center (Assemblies of God USA)
Green Mountain Mennonite Fellowship (Mennonite: Nationwide Fellowship Churches)
Harvest Christian Ministries
Kingdom Hall of Jehovah's Witnesses (Jehovah's Witnesses)
Missionary Alliance Church (Christian and Missionary Alliance)
Sacred Heart Saint Francis de Sales Church (Roman Catholic)
Second Congregational Church (United Church of Christ)
St. Peter's Episcopal Church (Episcopal)
Unitarian Universalist Fellowship of Bennington (Unitarian Universalist)
Mission City Church
Former places of worship
Chapel Road Church of God
First Church of Christ, Scientist (Christian Science)
Sacred Heart Church (Roman Catholic)
Parks and recreation
The town runs Willow Park, a large park north of downtown, which hosts athletic fields, an 18-hole disc-golf course, a common area for group functions and a large children's playground. The town also runs a recreation center on Gage Street, which contains a large indoor year-round swimming pool, softball fields, outdoor basketball court and weight room. Bennington also has a small network of mostly disconnected multi-use recreational trails; there are plans to better connect these paths in the future.
The closest state parks to Bennington are Lake Shaftsbury State Park in Shaftsbury and Woodford State Park in Woodford. The Long Trail and Appalachian Trail overlap each other as they pass the town just to the east.
Culture
Arts
Bennington is the former home of the Chamber Music Conference and Composers' Forum of the East, a summer institute for amateur musicians. The Conference was held on the campus of Bennington College. Bennington is also home to the Oldcastle Theatre Company, a small professional theatre with a special interest in encouraging New England plays.
Bennington College, in the village of North Bennington, has been the home base for Sage City Symphony since its founding in 1973 by Louis Calabro. The Symphony plays a challenging program of the traditional repertoire as well as commissioning a new work each year.
The Vermont Arts Exchange (VAE) is a non-profit community arts organization based in North Bennington. The mission of the VAE is to strengthen communities and neighborhoods through the arts. VAE hosts exhibitions, artist and community workspaces, and the Basement Music Series. Concerts run year-round and showcase a variety of nationally acclaimed musicians.
Bennington is home to the Bennington County Choral Society, the Bennington Children's Chorus and the Green Mountain Youth Orchestra.
Annual events
First Fridays in Downtown Bennington, July through October
Fallapalooza!, store-to-store trick-or-treating on the Saturday before Halloween
The Winter Festival and Penguin Plunge at Lake Paran in North Bennington in late January benefits Special Olympics of Vermont.
The St. Patrick's Day Parade in March
Mayfest in May, an annual showcase of local business vendors
The Memorial Day Parade in May
Midnight Madness in July, hours and discounts vary but nearly all retailers participate; 7 p.m. to midnight
The Bennington Battle Day Parade in August
The Garlic and Herb Festival during Labor Day weekend
The Festival of Trees in late November and early December
Print media
Bennington's local newspaper is the Bennington Banner, with a daily circulation of 7,800. News is also carried in the Troy Record, Rutland Herald and Manchester Journal.
Radio and television
Bennington is located in a fringe viewing area of the Albany-Schenectady-Troy television market. In addition to the Albany television stations, which include WRGB (CBS), WTEN (ABC), WNYT (NBC), WXXA-TV (Fox) and WMHT (PBS), Comcast carries WCAX-TV, the Burlington CBS affiliate, and Rutland Vermont PBS outlet WVER.
The radio stations WBTN-AM 1370 and VPR affiliate WBTN-FM 94.3 broadcast from, and are licensed to Bennington. The alternative music radio station WEQX is located in nearby Manchester. Bennington is also within range of several stations from Glens Falls and the Capital District.
Bennington is also the town of license for these radio station translators:
93.5 FM W228BL (VPR Classical)
98.5 FM W253AF (translator of WNGN-FM from Argyle, NY, Contemporary Christian)
Sites of interest
Bennington Battle Monument
Grandma Moses Gallery at the Bennington Museum
Park-McCullough Historic House, a well-preserved, 35-room, Victorian country house
Robert Frost's grave
Bennington College
Southern Vermont College
Photo gallery
Infrastructure
Health care
Bennington is home to Southwestern Vermont Medical Center, a community hospital that serves southern Vermont, northwestern Massachusetts, and neighboring eastern New York counties. It also and has satellite clinics in Manchester, Pownal and Wilmington, and Deerfield Valley. The 99-bed medical center is known for its excellence in nursing, receiving the American Nurses Credentialing Center's Magnet designation four times consecutively since 2002, and is also associated with a large modern cancer center
The Bennington Rescue Squad provides Primary 911 service in Bennington as well as non-emergency and interfacility transfers and is staffed at the paramedic level by paid career employees.
A number of primary and specialty care providers practice in the Bennington area. Most are affiliated with the Southwestern Vermont Healthcare system.
United Counseling Services (UCS) provides Bennington, and the remainder of Bennington County, with services for mental health, developmental disabilities, and substance abuse. The agency is headquartered in Bennington and has a satellite office in Manchester.
Utilities
Bennington's electricity is supplied by Green Mountain Power. Non-purchased surface and groundwater is supplied by the Bolles Brook in Woodford and the Morgan Spring in Bennington, respectively. The Bennington Water Department manages both water sources.
Cable television in Bennington is provided by Comcast. Comcast and Consolidated Communications also provide the town with landline phone and high speed Internet service.
Notable people
In popular culture
Author Shirley Jackson's memoirs, Life Among the Savages and Raising Demons, depict mid-20th century life in Bennington.
Much of the 1974 action film , starring Horst Buchholz, Ann Wedgeworth and Polly Holliday, was filmed in Bennington.
The Walloomsac Farmers Market, held in Bennington each Saturday, ranked #72 on The Daily Meal's 101 Best Farmer's Markets for 2014 list.
Southern Vermont College's Everett Mansion was featured in a 2015 episode of SyFy's Ghost Hunters.
See also
Bennington Free Library
Bennington Triangle
References
External links
Town of Bennington official website
Bennington Area Chamber of Commerce
Bennington Historical Society
Micropolitan areas of Vermont
Towns in Vermont
County seats in Vermont
Towns in Bennington County, Vermont
|
```c
/* -*- mode: C; c-file-style: "gnu" -*- */
/* xdgmimemagic.: Private file. Datastructure for storing magic files.
*
* More info can be found at path_to_url
*
*
* Or under the following terms:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* You should have received a copy of the GNU Lesser General Public
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <assert.h>
#include "xdgmimemagic.h"
#include "xdgmimeint.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#ifndef FALSE
#define FALSE (0)
#endif
#ifndef TRUE
#define TRUE (!FALSE)
#endif
#if !defined getc_unlocked && !defined HAVE_GETC_UNLOCKED
# define getc_unlocked(fp) getc (fp)
#endif
typedef struct XdgMimeMagicMatch XdgMimeMagicMatch;
typedef struct XdgMimeMagicMatchlet XdgMimeMagicMatchlet;
typedef enum
{
XDG_MIME_MAGIC_SECTION,
XDG_MIME_MAGIC_MAGIC,
XDG_MIME_MAGIC_ERROR,
XDG_MIME_MAGIC_EOF
} XdgMimeMagicState;
struct XdgMimeMagicMatch
{
const char *mime_type;
int priority;
XdgMimeMagicMatchlet *matchlet;
XdgMimeMagicMatch *next;
};
struct XdgMimeMagicMatchlet
{
int indent;
int offset;
unsigned int value_length;
unsigned char *value;
unsigned char *mask;
unsigned int range_length;
unsigned int word_size;
XdgMimeMagicMatchlet *next;
};
struct XdgMimeMagic
{
XdgMimeMagicMatch *match_list;
int max_extent;
};
static XdgMimeMagicMatch *
_xdg_mime_magic_match_new (void)
{
return calloc (1, sizeof (XdgMimeMagicMatch));
}
static XdgMimeMagicMatchlet *
_xdg_mime_magic_matchlet_new (void)
{
XdgMimeMagicMatchlet *matchlet;
matchlet = malloc (sizeof (XdgMimeMagicMatchlet));
matchlet->indent = 0;
matchlet->offset = 0;
matchlet->value_length = 0;
matchlet->value = NULL;
matchlet->mask = NULL;
matchlet->range_length = 1;
matchlet->word_size = 1;
matchlet->next = NULL;
return matchlet;
}
static void
_xdg_mime_magic_matchlet_free (XdgMimeMagicMatchlet *mime_magic_matchlet)
{
if (mime_magic_matchlet)
{
if (mime_magic_matchlet->next)
_xdg_mime_magic_matchlet_free (mime_magic_matchlet->next);
if (mime_magic_matchlet->value)
free (mime_magic_matchlet->value);
if (mime_magic_matchlet->mask)
free (mime_magic_matchlet->mask);
free (mime_magic_matchlet);
}
}
/* Frees mime_magic_match and the remainder of its list
*/
static void
_xdg_mime_magic_match_free (XdgMimeMagicMatch *mime_magic_match)
{
XdgMimeMagicMatch *ptr, *next;
ptr = mime_magic_match;
while (ptr)
{
next = ptr->next;
if (ptr->mime_type)
free ((void *) ptr->mime_type);
if (ptr->matchlet)
_xdg_mime_magic_matchlet_free (ptr->matchlet);
free (ptr);
ptr = next;
}
}
/* Reads in a hunk of data until a newline character or a '\000' is hit. The
* returned string is null terminated, and doesn't include the newline.
*/
static unsigned char *
_xdg_mime_magic_read_to_newline (FILE *magic_file,
int *end_of_file)
{
unsigned char *retval;
int c;
int len, pos;
len = 128;
pos = 0;
retval = malloc (len);
*end_of_file = FALSE;
while (TRUE)
{
c = getc_unlocked (magic_file);
if (c == EOF)
{
*end_of_file = TRUE;
break;
}
if (c == '\n' || c == '\000')
break;
retval[pos++] = (unsigned char) c;
if (pos % 128 == 127)
{
len = len + 128;
retval = realloc (retval, len);
}
}
retval[pos] = '\000';
return retval;
}
/* Returns the number read from the file, or -1 if no number could be read.
*/
static int
_xdg_mime_magic_read_a_number (FILE *magic_file,
int *end_of_file)
{
/* LONG_MAX is about 20 characters on my system */
#define MAX_NUMBER_SIZE 30
char number_string[MAX_NUMBER_SIZE + 1];
int pos = 0;
int c;
long retval = -1;
while (TRUE)
{
c = getc_unlocked (magic_file);
if (c == EOF)
{
*end_of_file = TRUE;
break;
}
if (! isdigit (c))
{
ungetc (c, magic_file);
break;
}
number_string[pos] = (char) c;
pos++;
if (pos == MAX_NUMBER_SIZE)
break;
}
if (pos > 0)
{
number_string[pos] = '\000';
errno = 0;
retval = strtol (number_string, NULL, 10);
if ((retval < INT_MIN) || (retval > INT_MAX) || (errno != 0))
return -1;
}
return retval;
}
/* Headers are of the format:
* [<priority>:<mime-type>]
*/
static XdgMimeMagicState
_xdg_mime_magic_parse_header (FILE *magic_file, XdgMimeMagicMatch *match)
{
int c;
char *buffer;
char *end_ptr;
int end_of_file = 0;
assert (magic_file != NULL);
assert (match != NULL);
c = getc_unlocked (magic_file);
if (c == EOF)
return XDG_MIME_MAGIC_EOF;
if (c != '[')
return XDG_MIME_MAGIC_ERROR;
match->priority = _xdg_mime_magic_read_a_number (magic_file, &end_of_file);
if (end_of_file)
return XDG_MIME_MAGIC_EOF;
if (match->priority == -1)
return XDG_MIME_MAGIC_ERROR;
c = getc_unlocked (magic_file);
if (c == EOF)
return XDG_MIME_MAGIC_EOF;
if (c != ':')
return XDG_MIME_MAGIC_ERROR;
buffer = (char *)_xdg_mime_magic_read_to_newline (magic_file, &end_of_file);
if (end_of_file)
{
free (buffer);
return XDG_MIME_MAGIC_EOF;
}
end_ptr = buffer;
while (*end_ptr != ']' && *end_ptr != '\000' && *end_ptr != '\n')
end_ptr++;
if (*end_ptr != ']')
{
free (buffer);
return XDG_MIME_MAGIC_ERROR;
}
*end_ptr = '\000';
match->mime_type = strdup (buffer);
free (buffer);
return XDG_MIME_MAGIC_MAGIC;
}
static XdgMimeMagicState
_xdg_mime_magic_parse_error (FILE *magic_file)
{
int c;
while (1)
{
c = getc_unlocked (magic_file);
if (c == EOF)
return XDG_MIME_MAGIC_EOF;
if (c == '\n')
return XDG_MIME_MAGIC_SECTION;
}
}
/* Headers are of the format:
* [ indent ] ">" start-offset "=" value
* [ "&" mask ] [ "~" word-size ] [ "+" range-length ] "\n"
*/
static XdgMimeMagicState
_xdg_mime_magic_parse_magic_line (FILE *magic_file,
XdgMimeMagicMatch *match)
{
XdgMimeMagicMatchlet *matchlet;
int c;
int end_of_file;
int indent = 0;
int bytes_read;
assert (magic_file != NULL);
/* Sniff the buffer to make sure it's a valid line */
c = getc_unlocked (magic_file);
if (c == EOF)
return XDG_MIME_MAGIC_EOF;
else if (c == '[')
{
ungetc (c, magic_file);
return XDG_MIME_MAGIC_SECTION;
}
else if (c == '\n')
return XDG_MIME_MAGIC_MAGIC;
/* At this point, it must be a digit or a '>' */
end_of_file = FALSE;
if (isdigit (c))
{
ungetc (c, magic_file);
indent = _xdg_mime_magic_read_a_number (magic_file, &end_of_file);
if (end_of_file)
return XDG_MIME_MAGIC_EOF;
if (indent == -1)
return XDG_MIME_MAGIC_ERROR;
c = getc_unlocked (magic_file);
if (c == EOF)
return XDG_MIME_MAGIC_EOF;
}
if (c != '>')
return XDG_MIME_MAGIC_ERROR;
matchlet = _xdg_mime_magic_matchlet_new ();
matchlet->indent = indent;
matchlet->offset = _xdg_mime_magic_read_a_number (magic_file, &end_of_file);
if (end_of_file)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_EOF;
}
if (matchlet->offset == -1)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_ERROR;
}
c = getc_unlocked (magic_file);
if (c == EOF)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_EOF;
}
else if (c != '=')
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_ERROR;
}
/* Next two bytes determine how long the value is */
matchlet->value_length = 0;
c = getc_unlocked (magic_file);
if (c == EOF)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_EOF;
}
matchlet->value_length = c & 0xFF;
matchlet->value_length = matchlet->value_length << 8;
c = getc_unlocked (magic_file);
if (c == EOF)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_EOF;
}
matchlet->value_length = matchlet->value_length + (c & 0xFF);
matchlet->value = malloc (matchlet->value_length);
/* OOM */
if (matchlet->value == NULL)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_ERROR;
}
bytes_read = fread (matchlet->value, 1, matchlet->value_length, magic_file);
if (bytes_read != matchlet->value_length)
{
_xdg_mime_magic_matchlet_free (matchlet);
if (feof (magic_file))
return XDG_MIME_MAGIC_EOF;
else
return XDG_MIME_MAGIC_ERROR;
}
c = getc_unlocked (magic_file);
if (c == '&')
{
matchlet->mask = malloc (matchlet->value_length);
/* OOM */
if (matchlet->mask == NULL)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_ERROR;
}
bytes_read = fread (matchlet->mask, 1, matchlet->value_length, magic_file);
if (bytes_read != matchlet->value_length)
{
_xdg_mime_magic_matchlet_free (matchlet);
if (feof (magic_file))
return XDG_MIME_MAGIC_EOF;
else
return XDG_MIME_MAGIC_ERROR;
}
c = getc_unlocked (magic_file);
}
if (c == '~')
{
matchlet->word_size = _xdg_mime_magic_read_a_number (magic_file, &end_of_file);
if (end_of_file)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_EOF;
}
if (matchlet->word_size != 0 &&
matchlet->word_size != 1 &&
matchlet->word_size != 2 &&
matchlet->word_size != 4)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_ERROR;
}
c = getc_unlocked (magic_file);
}
if (c == '+')
{
matchlet->range_length = _xdg_mime_magic_read_a_number (magic_file, &end_of_file);
if (end_of_file)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_EOF;
}
if (matchlet->range_length == -1)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_ERROR;
}
c = getc_unlocked (magic_file);
}
if (c == '\n')
{
/* We clean up the matchlet, byte swapping if needed */
if (matchlet->word_size > 1)
{
#if LITTLE_ENDIAN
int i;
#endif
if (matchlet->value_length % matchlet->word_size != 0)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_ERROR;
}
/* FIXME: need to get this defined in a <config.h> style file */
#if LITTLE_ENDIAN
for (i = 0; i < matchlet->value_length; i = i + matchlet->word_size)
{
if (matchlet->word_size == 2)
*((xdg_uint16_t *) matchlet->value + i) = SWAP_BE16_TO_LE16 (*((xdg_uint16_t *) (matchlet->value + i)));
else if (matchlet->word_size == 4)
*((xdg_uint32_t *) matchlet->value + i) = SWAP_BE32_TO_LE32 (*((xdg_uint32_t *) (matchlet->value + i)));
if (matchlet->mask)
{
if (matchlet->word_size == 2)
*((xdg_uint16_t *) matchlet->mask + i) = SWAP_BE16_TO_LE16 (*((xdg_uint16_t *) (matchlet->mask + i)));
else if (matchlet->word_size == 4)
*((xdg_uint32_t *) matchlet->mask + i) = SWAP_BE32_TO_LE32 (*((xdg_uint32_t *) (matchlet->mask + i)));
}
}
#endif
}
matchlet->next = match->matchlet;
match->matchlet = matchlet;
return XDG_MIME_MAGIC_MAGIC;
}
_xdg_mime_magic_matchlet_free (matchlet);
if (c == EOF)
return XDG_MIME_MAGIC_EOF;
return XDG_MIME_MAGIC_ERROR;
}
static int
_xdg_mime_magic_matchlet_compare_to_data (XdgMimeMagicMatchlet *matchlet,
const void *data,
size_t len)
{
int i, j;
for (i = matchlet->offset; i < matchlet->offset + matchlet->range_length; i++)
{
int valid_matchlet = TRUE;
if (i + matchlet->value_length > len)
return FALSE;
if (matchlet->mask)
{
for (j = 0; j < matchlet->value_length; j++)
{
if ((matchlet->value[j] & matchlet->mask[j]) !=
((((unsigned char *) data)[j + i]) & matchlet->mask[j]))
{
valid_matchlet = FALSE;
break;
}
}
}
else
{
for (j = 0; j < matchlet->value_length; j++)
{
if (matchlet->value[j] != ((unsigned char *) data)[j + i])
{
valid_matchlet = FALSE;
break;
}
}
}
if (valid_matchlet)
return TRUE;
}
return FALSE;
}
static int
_xdg_mime_magic_matchlet_compare_level (XdgMimeMagicMatchlet *matchlet,
const void *data,
size_t len,
int indent)
{
while ((matchlet != NULL) && (matchlet->indent == indent))
{
if (_xdg_mime_magic_matchlet_compare_to_data (matchlet, data, len))
{
if ((matchlet->next == NULL) ||
(matchlet->next->indent <= indent))
return TRUE;
if (_xdg_mime_magic_matchlet_compare_level (matchlet->next,
data,
len,
indent + 1))
return TRUE;
}
do
{
matchlet = matchlet->next;
}
while (matchlet && matchlet->indent > indent);
}
return FALSE;
}
static int
_xdg_mime_magic_match_compare_to_data (XdgMimeMagicMatch *match,
const void *data,
size_t len)
{
return _xdg_mime_magic_matchlet_compare_level (match->matchlet, data, len, 0);
}
static void
_xdg_mime_magic_insert_match (XdgMimeMagic *mime_magic,
XdgMimeMagicMatch *match)
{
XdgMimeMagicMatch *list;
if (mime_magic->match_list == NULL)
{
mime_magic->match_list = match;
return;
}
if (match->priority > mime_magic->match_list->priority)
{
match->next = mime_magic->match_list;
mime_magic->match_list = match;
return;
}
list = mime_magic->match_list;
while (list->next != NULL)
{
if (list->next->priority < match->priority)
{
match->next = list->next;
list->next = match;
return;
}
list = list->next;
}
list->next = match;
match->next = NULL;
}
XdgMimeMagic *
_xdg_mime_magic_new (void)
{
return calloc (1, sizeof (XdgMimeMagic));
}
void
_xdg_mime_magic_free (XdgMimeMagic *mime_magic)
{
if (mime_magic) {
_xdg_mime_magic_match_free (mime_magic->match_list);
free (mime_magic);
}
}
int
_xdg_mime_magic_get_buffer_extents (XdgMimeMagic *mime_magic)
{
return mime_magic->max_extent;
}
const char *
_xdg_mime_magic_lookup_data (XdgMimeMagic *mime_magic,
const void *data,
size_t len,
int *result_prio,
const char *mime_types[],
int n_mime_types)
{
XdgMimeMagicMatch *match;
const char *mime_type;
int n;
int prio;
prio = 0;
mime_type = NULL;
for (match = mime_magic->match_list; match; match = match->next)
{
if (_xdg_mime_magic_match_compare_to_data (match, data, len))
{
prio = match->priority;
mime_type = match->mime_type;
break;
}
else
{
for (n = 0; n < n_mime_types; n++)
{
if (mime_types[n] &&
_xdg_mime_mime_type_equal (mime_types[n], match->mime_type))
mime_types[n] = NULL;
}
}
}
if (mime_type == NULL)
{
for (n = 0; n < n_mime_types; n++)
{
if (mime_types[n])
mime_type = mime_types[n];
}
}
if (result_prio)
*result_prio = prio;
return mime_type;
}
static void
_xdg_mime_update_mime_magic_extents (XdgMimeMagic *mime_magic)
{
XdgMimeMagicMatch *match;
int max_extent = 0;
for (match = mime_magic->match_list; match; match = match->next)
{
XdgMimeMagicMatchlet *matchlet;
for (matchlet = match->matchlet; matchlet; matchlet = matchlet->next)
{
int extent;
extent = matchlet->value_length + matchlet->offset + matchlet->range_length;
if (max_extent < extent)
max_extent = extent;
}
}
mime_magic->max_extent = max_extent;
}
static XdgMimeMagicMatchlet *
_xdg_mime_magic_matchlet_mirror (XdgMimeMagicMatchlet *matchlets)
{
XdgMimeMagicMatchlet *new_list;
XdgMimeMagicMatchlet *tmp;
if ((matchlets == NULL) || (matchlets->next == NULL))
return matchlets;
new_list = NULL;
tmp = matchlets;
while (tmp != NULL)
{
XdgMimeMagicMatchlet *matchlet;
matchlet = tmp;
tmp = tmp->next;
matchlet->next = new_list;
new_list = matchlet;
}
return new_list;
}
static void
_xdg_mime_magic_read_magic_file (XdgMimeMagic *mime_magic,
FILE *magic_file)
{
XdgMimeMagicState state;
XdgMimeMagicMatch *match = NULL; /* Quiet compiler */
state = XDG_MIME_MAGIC_SECTION;
while (state != XDG_MIME_MAGIC_EOF)
{
switch (state)
{
case XDG_MIME_MAGIC_SECTION:
match = _xdg_mime_magic_match_new ();
state = _xdg_mime_magic_parse_header (magic_file, match);
if (state == XDG_MIME_MAGIC_EOF || state == XDG_MIME_MAGIC_ERROR)
_xdg_mime_magic_match_free (match);
break;
case XDG_MIME_MAGIC_MAGIC:
state = _xdg_mime_magic_parse_magic_line (magic_file, match);
if (state == XDG_MIME_MAGIC_SECTION ||
(state == XDG_MIME_MAGIC_EOF && match->mime_type))
{
match->matchlet = _xdg_mime_magic_matchlet_mirror (match->matchlet);
_xdg_mime_magic_insert_match (mime_magic, match);
}
else if (state == XDG_MIME_MAGIC_EOF || state == XDG_MIME_MAGIC_ERROR)
_xdg_mime_magic_match_free (match);
break;
case XDG_MIME_MAGIC_ERROR:
state = _xdg_mime_magic_parse_error (magic_file);
break;
case XDG_MIME_MAGIC_EOF:
default:
/* Make the compiler happy */
assert (0);
}
}
_xdg_mime_update_mime_magic_extents (mime_magic);
}
void
_xdg_mime_magic_read_from_file (XdgMimeMagic *mime_magic,
const char *file_name)
{
FILE *magic_file;
char header[12];
magic_file = fopen (file_name, "r");
if (magic_file == NULL)
return;
if (fread (header, 1, 12, magic_file) == 12)
{
if (memcmp ("MIME-Magic\0\n", header, 12) == 0)
_xdg_mime_magic_read_magic_file (mime_magic, magic_file);
}
fclose (magic_file);
}
```
|
```python
import logging
def test_logging(caplog):
logger = logging.getLogger(__name__)
caplog.set_level(logging.DEBUG) # Set minimum log level to capture
logger.debug("This is a debug message.")
logger.info("This is an info message.")
logger.warning("This is a warning message.")
logger.error("This is an error message.")
logger.critical("This is a critical message.")
```
|
The Edmonton Alberta Temple is the 67th operating temple of the Church of Jesus Christ of Latter-day Saints (LDS Church), located in Edmonton, Alberta, Canada.
The temple was the second to be built in Alberta; the first was built in Cardston in 1923. The temple serves about 15,700 members in the area. The exterior of the temple is white granite and has a single spire topped by a statue of the angel Moroni.
History
The groundbreaking services were held on February 27, 1999, presided over by Yoshihiko Kikuchi. Before the dedication of the temple, a public open house was held. Approximately 40,000 people toured the temple during the weeklong open house.
LDS Church president Gordon B. Hinckley dedicated the temple on December 11–12, 1999. The Edmonton Alberta Temple has a total of , two ordinance rooms, and two sealing rooms.
In 2020, the Edmonton Alberta Temple was closed in response to the coronavirus pandemic.
See also
Comparison of temples of The Church of Jesus Christ of Latter-day Saints
List of temples of The Church of Jesus Christ of Latter-day Saints
List of temples of The Church of Jesus Christ of Latter-day Saints by geographic region
Temple architecture (Latter-day Saints)
The Church of Jesus Christ of Latter-day Saints in Canada
References
Additional reading
External links
Edmonton Alberta Temple Official site
Edmonton Alberta Temple at ChurchofJesusChristTemples.org
Construction and Renovation photos of the Edmonton Alberta Temple
20th-century Latter Day Saint temples
Religious buildings and structures in Edmonton
Temples (LDS Church) completed in 1999
Temples (LDS Church) in Alberta
1999 establishments in Alberta
20th-century churches in Canada
|
```python
import functools
import re
from openpilot.tools.lib.auth_config import get_token
from openpilot.tools.lib.api import CommaApi
from openpilot.tools.lib.helpers import RE
@functools.total_ordering
class Bootlog:
def __init__(self, url: str):
self._url = url
r = re.search(RE.BOOTLOG_NAME, url)
if not r:
raise Exception(f"Unable to parse: {url}")
self._id = r.group('log_id')
self._dongle_id = r.group('dongle_id')
@property
def url(self) -> str:
return self._url
@property
def dongle_id(self) -> str:
return self._dongle_id
@property
def id(self) -> str:
return self._id
def __str__(self):
return f"{self._dongle_id}/{self._id}"
def __eq__(self, b) -> bool:
if not isinstance(b, Bootlog):
return False
return self.id == b.id
def __lt__(self, b) -> bool:
if not isinstance(b, Bootlog):
return False
return self.id < b.id
def get_bootlog_from_id(bootlog_id: str) -> Bootlog | None:
# TODO: implement an API endpoint for this
bl = Bootlog(bootlog_id)
for b in get_bootlogs(bl.dongle_id):
if b == bl:
return b
return None
def get_bootlogs(dongle_id: str) -> list[Bootlog]:
api = CommaApi(get_token())
r = api.get(f'v1/devices/{dongle_id}/bootlogs')
return [Bootlog(b) for b in r]
```
|
The Academy is the eponymous debut EP of The Academy Is..., released on March 23, 2004 by LLR Recordings. The CD was originally released before the band appended the "Is..." to their name. It features drummer Mike DelPrincipe and guitarist AJ LaTrace, who left the band after the recording of their full-length debut, Almost Here (2005).
Track listing
Personnel
William Beckett – vocals
Mike Carden – rhythm guitar
Michael DelPrincipe – drums
AJ LaTrace – lead guitar
Adam T. Siska – bass
References
The Academy Is... albums
2004 debut EPs
|
Dombrava () is a settlement in the lower Vipava Valley in the Municipality of Renče–Vogrsko in the Littoral region of Slovenia.
Name
The name Dombrava, with an m reflecting the old nasal vowel *ǫ, shares its origin with the more frequent place name Dobrava (e.g., Dolenja Dobrava). Both are derived from Slavic *dǫbra̋va 'area with deciduous or oak woods' (cf. modern Slovene dobrava 'gently rolling partially wooded land'), referring to the local geography. This, in turn, is derived from Slavic *dǫ̂bъ 'deciduous tree, oak'.
References
External links
Dombrava on Geopedia
Populated places in the Municipality of Renče-Vogrsko
|
```objective-c
/** @file
* @brief Service Discovery Protocol handling.
*/
/*
*
*/
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_SDP_H_
#define ZEPHYR_INCLUDE_BLUETOOTH_SDP_H_
/**
* @file
* @brief Service Discovery Protocol (SDP)
* @defgroup bt_sdp Service Discovery Protocol (SDP)
* @ingroup bluetooth
* @{
*/
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/conn.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* All definitions are based on Bluetooth Assigned Numbers
* of the Bluetooth Specification
*/
/**
* @name Service class identifiers of standard services and service groups
* @{
*/
#define BT_SDP_SDP_SERVER_SVCLASS 0x1000 /**< Service Discovery Server */
#define BT_SDP_BROWSE_GRP_DESC_SVCLASS 0x1001 /**< Browse Group Descriptor */
#define BT_SDP_PUBLIC_BROWSE_GROUP 0x1002 /**< Public Browse Group */
#define BT_SDP_SERIAL_PORT_SVCLASS 0x1101 /**< Serial Port */
#define BT_SDP_LAN_ACCESS_SVCLASS 0x1102 /**< LAN Access Using PPP */
#define BT_SDP_DIALUP_NET_SVCLASS 0x1103 /**< Dialup Networking */
#define BT_SDP_IRMC_SYNC_SVCLASS 0x1104 /**< IrMC Sync */
#define BT_SDP_OBEX_OBJPUSH_SVCLASS 0x1105 /**< OBEX Object Push */
#define BT_SDP_OBEX_FILETRANS_SVCLASS 0x1106 /**< OBEX File Transfer */
#define BT_SDP_IRMC_SYNC_CMD_SVCLASS 0x1107 /**< IrMC Sync Command */
#define BT_SDP_HEADSET_SVCLASS 0x1108 /**< Headset */
#define BT_SDP_CORDLESS_TELEPHONY_SVCLASS 0x1109 /**< Cordless Telephony */
#define BT_SDP_AUDIO_SOURCE_SVCLASS 0x110a /**< Audio Source */
#define BT_SDP_AUDIO_SINK_SVCLASS 0x110b /**< Audio Sink */
#define BT_SDP_AV_REMOTE_TARGET_SVCLASS 0x110c /**< A/V Remote Control Target */
#define BT_SDP_ADVANCED_AUDIO_SVCLASS 0x110d /**< Advanced Audio Distribution */
#define BT_SDP_AV_REMOTE_SVCLASS 0x110e /**< A/V Remote Control */
#define BT_SDP_AV_REMOTE_CONTROLLER_SVCLASS 0x110f /**< A/V Remote Control Controller */
#define BT_SDP_INTERCOM_SVCLASS 0x1110 /**< Intercom */
#define BT_SDP_FAX_SVCLASS 0x1111 /**< Fax */
#define BT_SDP_HEADSET_AGW_SVCLASS 0x1112 /**< Headset AG */
#define BT_SDP_WAP_SVCLASS 0x1113 /**< WAP */
#define BT_SDP_WAP_CLIENT_SVCLASS 0x1114 /**< WAP Client */
#define BT_SDP_PANU_SVCLASS 0x1115 /**< Personal Area Networking User */
#define BT_SDP_NAP_SVCLASS 0x1116 /**< Network Access Point */
#define BT_SDP_GN_SVCLASS 0x1117 /**< Group Network */
#define BT_SDP_DIRECT_PRINTING_SVCLASS 0x1118 /**< Direct Printing */
#define BT_SDP_REFERENCE_PRINTING_SVCLASS 0x1119 /**< Reference Printing */
#define BT_SDP_IMAGING_SVCLASS 0x111a /**< Basic Imaging Profile */
#define BT_SDP_IMAGING_RESPONDER_SVCLASS 0x111b /**< Imaging Responder */
#define BT_SDP_IMAGING_ARCHIVE_SVCLASS 0x111c /**< Imaging Automatic Archive */
#define BT_SDP_IMAGING_REFOBJS_SVCLASS 0x111d /**< Imaging Referenced Objects */
#define BT_SDP_HANDSFREE_SVCLASS 0x111e /**< Handsfree */
#define BT_SDP_HANDSFREE_AGW_SVCLASS 0x111f /**< Handsfree Audio Gateway */
#define BT_SDP_DIRECT_PRT_REFOBJS_SVCLASS 0x1120 /**< Direct Printing Reference Objects Service */
#define BT_SDP_REFLECTED_UI_SVCLASS 0x1121 /**< Reflected UI */
#define BT_SDP_BASIC_PRINTING_SVCLASS 0x1122 /**< Basic Printing */
#define BT_SDP_PRINTING_STATUS_SVCLASS 0x1123 /**< Printing Status */
#define BT_SDP_HID_SVCLASS 0x1124 /**< Human Interface Device Service */
#define BT_SDP_HCR_SVCLASS 0x1125 /**< Hardcopy Cable Replacement */
#define BT_SDP_HCR_PRINT_SVCLASS 0x1126 /**< HCR Print */
#define BT_SDP_HCR_SCAN_SVCLASS 0x1127 /**< HCR Scan */
#define BT_SDP_CIP_SVCLASS 0x1128 /**< Common ISDN Access */
#define BT_SDP_VIDEO_CONF_GW_SVCLASS 0x1129 /**< Video Conferencing Gateway */
#define BT_SDP_UDI_MT_SVCLASS 0x112a /**< UDI MT */
#define BT_SDP_UDI_TA_SVCLASS 0x112b /**< UDI TA */
#define BT_SDP_AV_SVCLASS 0x112c /**< Audio/Video */
#define BT_SDP_SAP_SVCLASS 0x112d /**< SIM Access */
#define BT_SDP_PBAP_PCE_SVCLASS 0x112e /**< Phonebook Access Client */
#define BT_SDP_PBAP_PSE_SVCLASS 0x112f /**< Phonebook Access Server */
#define BT_SDP_PBAP_SVCLASS 0x1130 /**< Phonebook Access */
#define BT_SDP_MAP_MSE_SVCLASS 0x1132 /**< Message Access Server */
#define BT_SDP_MAP_MCE_SVCLASS 0x1133 /**< Message Notification Server */
#define BT_SDP_MAP_SVCLASS 0x1134 /**< Message Access Profile */
#define BT_SDP_GNSS_SVCLASS 0x1135 /**< GNSS */
#define BT_SDP_GNSS_SERVER_SVCLASS 0x1136 /**< GNSS Server */
#define BT_SDP_MPS_SC_SVCLASS 0x113a /**< MPS SC */
#define BT_SDP_MPS_SVCLASS 0x113b /**< MPS */
#define BT_SDP_PNP_INFO_SVCLASS 0x1200 /**< PnP Information */
#define BT_SDP_GENERIC_NETWORKING_SVCLASS 0x1201 /**< Generic Networking */
#define BT_SDP_GENERIC_FILETRANS_SVCLASS 0x1202 /**< Generic File Transfer */
#define BT_SDP_GENERIC_AUDIO_SVCLASS 0x1203 /**< Generic Audio */
#define BT_SDP_GENERIC_TELEPHONY_SVCLASS 0x1204 /**< Generic Telephony */
#define BT_SDP_UPNP_SVCLASS 0x1205 /**< UPnP Service */
#define BT_SDP_UPNP_IP_SVCLASS 0x1206 /**< UPnP IP Service */
#define BT_SDP_UPNP_PAN_SVCLASS 0x1300 /**< UPnP IP PAN */
#define BT_SDP_UPNP_LAP_SVCLASS 0x1301 /**< UPnP IP LAP */
#define BT_SDP_UPNP_L2CAP_SVCLASS 0x1302 /**< UPnP IP L2CAP */
#define BT_SDP_VIDEO_SOURCE_SVCLASS 0x1303 /**< Video Source */
#define BT_SDP_VIDEO_SINK_SVCLASS 0x1304 /**< Video Sink */
#define BT_SDP_VIDEO_DISTRIBUTION_SVCLASS 0x1305 /**< Video Distribution */
#define BT_SDP_HDP_SVCLASS 0x1400 /**< HDP */
#define BT_SDP_HDP_SOURCE_SVCLASS 0x1401 /**< HDP Source */
#define BT_SDP_HDP_SINK_SVCLASS 0x1402 /**< HDP Sink */
#define BT_SDP_GENERIC_ACCESS_SVCLASS 0x1800 /**< Generic Access Profile */
#define BT_SDP_GENERIC_ATTRIB_SVCLASS 0x1801 /**< Generic Attribute Profile */
#define BT_SDP_APPLE_AGENT_SVCLASS 0x2112 /**< Apple Agent */
/**
* @}
*/
#define BT_SDP_SERVER_RECORD_HANDLE 0x0000
/**
* @name Attribute identifier codes
*
* Possible values for attribute-id are listed below.
* See SDP Spec, section "Service Attribute Definitions" for more details.
*
* @{
*/
#define BT_SDP_ATTR_RECORD_HANDLE 0x0000 /**< Service Record Handle */
#define BT_SDP_ATTR_SVCLASS_ID_LIST 0x0001 /**< Service Class ID List */
#define BT_SDP_ATTR_RECORD_STATE 0x0002 /**< Service Record State */
#define BT_SDP_ATTR_SERVICE_ID 0x0003 /**< Service ID */
#define BT_SDP_ATTR_PROTO_DESC_LIST 0x0004 /**< Protocol Descriptor List */
#define BT_SDP_ATTR_BROWSE_GRP_LIST 0x0005 /**< Browse Group List */
#define BT_SDP_ATTR_LANG_BASE_ATTR_ID_LIST 0x0006 /**< Language Base Attribute ID List */
#define BT_SDP_ATTR_SVCINFO_TTL 0x0007 /**< Service Info Time to Live */
#define BT_SDP_ATTR_SERVICE_AVAILABILITY 0x0008 /**< Service Availability */
#define BT_SDP_ATTR_PROFILE_DESC_LIST 0x0009 /**< Bluetooth Profile Descriptor List */
#define BT_SDP_ATTR_DOC_URL 0x000a /**< Documentation URL */
#define BT_SDP_ATTR_CLNT_EXEC_URL 0x000b /**< Client Executable URL */
#define BT_SDP_ATTR_ICON_URL 0x000c /**< Icon URL */
#define BT_SDP_ATTR_ADD_PROTO_DESC_LIST 0x000d /**< Additional Protocol Descriptor List */
#define BT_SDP_ATTR_GROUP_ID 0x0200 /**< Group ID */
#define BT_SDP_ATTR_IP_SUBNET 0x0200 /**< IP Subnet */
#define BT_SDP_ATTR_VERSION_NUM_LIST 0x0200 /**< Version Number List */
#define BT_SDP_ATTR_SUPPORTED_FEATURES_LIST 0x0200 /**< Supported Features List */
#define BT_SDP_ATTR_GOEP_L2CAP_PSM 0x0200 /**< GOEP L2CAP PSM */
#define BT_SDP_ATTR_SVCDB_STATE 0x0201 /**< Service Database State */
#define BT_SDP_ATTR_MPSD_SCENARIOS 0x0200 /**< MPSD Scenarios */
#define BT_SDP_ATTR_MPMD_SCENARIOS 0x0201 /**< MPMD Scenarios */
#define BT_SDP_ATTR_MPS_DEPENDENCIES 0x0202 /**< Supported Profiles & Protocols */
#define BT_SDP_ATTR_SERVICE_VERSION 0x0300 /**< Service Version */
#define BT_SDP_ATTR_EXTERNAL_NETWORK 0x0301 /**< External Network */
#define BT_SDP_ATTR_SUPPORTED_DATA_STORES_LIST 0x0301 /**< Supported Data Stores List */
#define BT_SDP_ATTR_DATA_EXCHANGE_SPEC 0x0301 /**< Data Exchange Specification */
#define BT_SDP_ATTR_NETWORK 0x0301 /**< Network */
#define BT_SDP_ATTR_FAX_CLASS1_SUPPORT 0x0302 /**< Fax Class 1 Support */
#define BT_SDP_ATTR_REMOTE_AUDIO_VOLUME_CONTROL 0x0302 /**< Remote Audio Volume Control */
#define BT_SDP_ATTR_MCAP_SUPPORTED_PROCEDURES 0x0302 /**< MCAP Supported Procedures */
#define BT_SDP_ATTR_FAX_CLASS20_SUPPORT 0x0303 /**< Fax Class 2.0 Support */
#define BT_SDP_ATTR_SUPPORTED_FORMATS_LIST 0x0303 /**< Supported Formats List */
#define BT_SDP_ATTR_FAX_CLASS2_SUPPORT 0x0304 /**< Fax Class 2 Support (vendor-specific)*/
#define BT_SDP_ATTR_AUDIO_FEEDBACK_SUPPORT 0x0305 /**< Audio Feedback Support */
#define BT_SDP_ATTR_NETWORK_ADDRESS 0x0306 /**< Network Address */
#define BT_SDP_ATTR_WAP_GATEWAY 0x0307 /**< WAP Gateway */
#define BT_SDP_ATTR_HOMEPAGE_URL 0x0308 /**< Homepage URL */
#define BT_SDP_ATTR_WAP_STACK_TYPE 0x0309 /**< WAP Stack Type */
#define BT_SDP_ATTR_SECURITY_DESC 0x030a /**< Security Description */
#define BT_SDP_ATTR_NET_ACCESS_TYPE 0x030b /**< Net Access Type */
#define BT_SDP_ATTR_MAX_NET_ACCESSRATE 0x030c /**< Max Net Access Rate */
#define BT_SDP_ATTR_IP4_SUBNET 0x030d /**< IPv4 Subnet */
#define BT_SDP_ATTR_IP6_SUBNET 0x030e /**< IPv6 Subnet */
#define BT_SDP_ATTR_SUPPORTED_CAPABILITIES 0x0310 /**< BIP Supported Capabilities */
#define BT_SDP_ATTR_SUPPORTED_FEATURES 0x0311 /**< BIP Supported Features */
#define BT_SDP_ATTR_SUPPORTED_FUNCTIONS 0x0312 /**< BIP Supported Functions */
#define BT_SDP_ATTR_TOTAL_IMAGING_DATA_CAPACITY 0x0313 /**< BIP Total Imaging Data Capacity */
#define BT_SDP_ATTR_SUPPORTED_REPOSITORIES 0x0314 /**< Supported Repositories */
#define BT_SDP_ATTR_MAS_INSTANCE_ID 0x0315 /**< MAS Instance ID */
#define BT_SDP_ATTR_SUPPORTED_MESSAGE_TYPES 0x0316 /**< Supported Message Types */
#define BT_SDP_ATTR_PBAP_SUPPORTED_FEATURES 0x0317 /**< PBAP Supported Features */
#define BT_SDP_ATTR_MAP_SUPPORTED_FEATURES 0x0317 /**< MAP Supported Features */
#define BT_SDP_ATTR_SPECIFICATION_ID 0x0200 /**< Specification ID */
#define BT_SDP_ATTR_VENDOR_ID 0x0201 /**< Vendor ID */
#define BT_SDP_ATTR_PRODUCT_ID 0x0202 /**< Product ID */
#define BT_SDP_ATTR_VERSION 0x0203 /**< Version */
#define BT_SDP_ATTR_PRIMARY_RECORD 0x0204 /**< Primary Record */
#define BT_SDP_ATTR_VENDOR_ID_SOURCE 0x0205 /**< Vendor ID Source */
#define BT_SDP_ATTR_HID_DEVICE_RELEASE_NUMBER 0x0200 /**< HID Device Release Number */
#define BT_SDP_ATTR_HID_PARSER_VERSION 0x0201 /**< HID Parser Version */
#define BT_SDP_ATTR_HID_DEVICE_SUBCLASS 0x0202 /**< HID Device Subclass */
#define BT_SDP_ATTR_HID_COUNTRY_CODE 0x0203 /**< HID Country Code */
#define BT_SDP_ATTR_HID_VIRTUAL_CABLE 0x0204 /**< HID Virtual Cable */
#define BT_SDP_ATTR_HID_RECONNECT_INITIATE 0x0205 /**< HID Reconnect Initiate */
#define BT_SDP_ATTR_HID_DESCRIPTOR_LIST 0x0206 /**< HID Descriptor List */
#define BT_SDP_ATTR_HID_LANG_ID_BASE_LIST 0x0207 /**< HID Language ID Base List */
#define BT_SDP_ATTR_HID_SDP_DISABLE 0x0208 /**< HID SDP Disable */
#define BT_SDP_ATTR_HID_BATTERY_POWER 0x0209 /**< HID Battery Power */
#define BT_SDP_ATTR_HID_REMOTE_WAKEUP 0x020a /**< HID Remote Wakeup */
#define BT_SDP_ATTR_HID_PROFILE_VERSION 0x020b /**< HID Profile Version */
#define BT_SDP_ATTR_HID_SUPERVISION_TIMEOUT 0x020c /**< HID Supervision Timeout */
#define BT_SDP_ATTR_HID_NORMALLY_CONNECTABLE 0x020d /**< HID Normally Connectable */
#define BT_SDP_ATTR_HID_BOOT_DEVICE 0x020e /**< HID Boot Device */
/**
* @}
*/
/*
* These identifiers are based on the SDP spec stating that
* "base attribute id of the primary (universal) language must be 0x0100"
*
* Other languages should have their own offset; e.g.:
* #define XXXLangBase yyyy
* #define AttrServiceName_XXX 0x0000+XXXLangBase
*/
#define BT_SDP_PRIMARY_LANG_BASE 0x0100
#define BT_SDP_ATTR_SVCNAME_PRIMARY (0x0000 + BT_SDP_PRIMARY_LANG_BASE)
#define BT_SDP_ATTR_SVCDESC_PRIMARY (0x0001 + BT_SDP_PRIMARY_LANG_BASE)
#define BT_SDP_ATTR_PROVNAME_PRIMARY (0x0002 + BT_SDP_PRIMARY_LANG_BASE)
/**
* @name The Data representation in SDP PDUs (pps 339, 340 of BT SDP Spec)
*
* These are the exact data type+size descriptor values
* that go into the PDU buffer.
*
* The datatype (leading 5bits) + size descriptor (last 3 bits)
* is 8 bits. The size descriptor is critical to extract the
* right number of bytes for the data value from the PDU.
*
* For most basic types, the datatype+size descriptor is
* straightforward. However for constructed types and strings,
* the size of the data is in the next "n" bytes following the
* 8 bits (datatype+size) descriptor. Exactly what the "n" is
* specified in the 3 bits of the data size descriptor.
*
* TextString and URLString can be of size 2^{8, 16, 32} bytes
* DataSequence and DataSequenceAlternates can be of size 2^{8, 16, 32}
* The size are computed post-facto in the API and are not known apriori.
* @{
*/
#define BT_SDP_DATA_NIL 0x00 /**< Nil, the null type */
#define BT_SDP_UINT8 0x08 /**< Unsigned 8-bit integer */
#define BT_SDP_UINT16 0x09 /**< Unsigned 16-bit integer */
#define BT_SDP_UINT32 0x0a /**< Unsigned 32-bit integer */
#define BT_SDP_UINT64 0x0b /**< Unsigned 64-bit integer */
#define BT_SDP_UINT128 0x0c /**< Unsigned 128-bit integer */
#define BT_SDP_INT8 0x10 /**< Signed 8-bit integer */
#define BT_SDP_INT16 0x11 /**< Signed 16-bit integer */
#define BT_SDP_INT32 0x12 /**< Signed 32-bit integer */
#define BT_SDP_INT64 0x13 /**< Signed 64-bit integer */
#define BT_SDP_INT128 0x14 /**< Signed 128-bit integer */
#define BT_SDP_UUID_UNSPEC 0x18 /**< UUID, unspecified size */
#define BT_SDP_UUID16 0x19 /**< UUID, 16-bit */
#define BT_SDP_UUID32 0x1a /**< UUID, 32-bit */
#define BT_SDP_UUID128 0x1c /**< UUID, 128-bit */
#define BT_SDP_TEXT_STR_UNSPEC 0x20 /**< Text string, unspecified size */
#define BT_SDP_TEXT_STR8 0x25 /**< Text string, 8-bit length */
#define BT_SDP_TEXT_STR16 0x26 /**< Text string, 16-bit length */
#define BT_SDP_TEXT_STR32 0x27 /**< Text string, 32-bit length */
#define BT_SDP_BOOL 0x28 /**< Boolean */
#define BT_SDP_SEQ_UNSPEC 0x30 /**< Data element sequence, unspecified size */
#define BT_SDP_SEQ8 0x35 /**< Data element sequence, 8-bit length */
#define BT_SDP_SEQ16 0x36 /**< Data element sequence, 16-bit length */
#define BT_SDP_SEQ32 0x37 /**< Data element sequence, 32-bit length */
#define BT_SDP_ALT_UNSPEC 0x38 /**< Data element alternative, unspecified size */
#define BT_SDP_ALT8 0x3d /**< Data element alternative, 8-bit length */
#define BT_SDP_ALT16 0x3e /**< Data element alternative, 16-bit length */
#define BT_SDP_ALT32 0x3f /**< Data element alternative, 32-bit length */
#define BT_SDP_URL_STR_UNSPEC 0x40 /**< URL string, unspecified size */
#define BT_SDP_URL_STR8 0x45 /**< URL string, 8-bit length */
#define BT_SDP_URL_STR16 0x46 /**< URL string, 16-bit length */
#define BT_SDP_URL_STR32 0x47 /**< URL string, 32-bit length */
/**
* @}
*/
#define BT_SDP_TYPE_DESC_MASK 0xf8
#define BT_SDP_SIZE_DESC_MASK 0x07
#define BT_SDP_SIZE_INDEX_OFFSET 5
/** @brief SDP Generic Data Element Value. */
struct bt_sdp_data_elem {
uint8_t type; /**< Type of the data element */
uint32_t data_size; /**< Size of the data element */
uint32_t total_size; /**< Total size of the data element */
const void *data;
};
/** @brief SDP Attribute Value. */
struct bt_sdp_attribute {
uint16_t id; /**< Attribute ID */
struct bt_sdp_data_elem val; /**< Attribute data */
};
/** @brief SDP Service Record Value. */
struct bt_sdp_record {
uint32_t handle; /**< Redundant, for quick ref */
struct bt_sdp_attribute *attrs; /**< Base addr of attr array */
size_t attr_count; /**< Number of attributes */
uint8_t index; /**< Index of the record in LL */
struct bt_sdp_record *next; /**< Next service record */
};
/*
* --------------------------------------------------- ------------------
* | Service Hdl | Attr list ptr | Attr count | Next | -> | Service Hdl | ...
* --------------------------------------------------- ------------------
*/
/**
* @brief Declare an array of 8-bit elements in an attribute.
*/
#define BT_SDP_ARRAY_8(...) ((uint8_t[]) {__VA_ARGS__})
/**
* @brief Declare an array of 16-bit elements in an attribute.
*/
#define BT_SDP_ARRAY_16(...) ((uint16_t[]) {__VA_ARGS__})
/**
* @brief Declare an array of 32-bit elements in an attribute.
*/
#define BT_SDP_ARRAY_32(...) ((uint32_t[]) {__VA_ARGS__})
/**
* @brief Declare a fixed-size data element header.
*
* @param _type Data element header containing type and size descriptors.
*/
#define BT_SDP_TYPE_SIZE(_type) .type = _type, \
.data_size = BIT(_type & BT_SDP_SIZE_DESC_MASK), \
.total_size = BIT(_type & BT_SDP_SIZE_DESC_MASK) + 1
/**
* @brief Declare a variable-size data element header.
*
* @param _type Data element header containing type and size descriptors.
* @param _size The actual size of the data.
*/
#define BT_SDP_TYPE_SIZE_VAR(_type, _size) .type = _type, \
.data_size = _size, \
.total_size = BIT((_type & BT_SDP_SIZE_DESC_MASK) - \
BT_SDP_SIZE_INDEX_OFFSET) + _size + 1
/**
* @brief Declare a list of data elements.
*/
#define BT_SDP_DATA_ELEM_LIST(...) ((struct bt_sdp_data_elem[]) {__VA_ARGS__})
/**
* @brief SDP New Service Record Declaration Macro.
*
* Helper macro to declare a new service record.
* Default attributes: Record Handle, Record State,
* Language Base, Root Browse Group
*
*/
#define BT_SDP_NEW_SERVICE \
{ \
BT_SDP_ATTR_RECORD_HANDLE, \
{ BT_SDP_TYPE_SIZE(BT_SDP_UINT32), BT_SDP_ARRAY_32(0) } \
}, \
{ \
BT_SDP_ATTR_RECORD_STATE, \
{ BT_SDP_TYPE_SIZE(BT_SDP_UINT32), BT_SDP_ARRAY_32(0) } \
}, \
{ \
BT_SDP_ATTR_LANG_BASE_ATTR_ID_LIST, \
{ BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 9), \
BT_SDP_DATA_ELEM_LIST( \
{ BT_SDP_TYPE_SIZE(BT_SDP_UINT16), BT_SDP_ARRAY_8('n', 'e') }, \
{ BT_SDP_TYPE_SIZE(BT_SDP_UINT16), BT_SDP_ARRAY_16(106) }, \
{ BT_SDP_TYPE_SIZE(BT_SDP_UINT16), \
BT_SDP_ARRAY_16(BT_SDP_PRIMARY_LANG_BASE) } \
), \
} \
}, \
{ \
BT_SDP_ATTR_BROWSE_GRP_LIST, \
{ BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 3), \
BT_SDP_DATA_ELEM_LIST( \
{ BT_SDP_TYPE_SIZE(BT_SDP_UUID16), \
BT_SDP_ARRAY_16(BT_SDP_PUBLIC_BROWSE_GROUP) }, \
), \
} \
}
/**
* @brief Generic SDP List Attribute Declaration Macro.
*
* Helper macro to declare a list attribute.
*
* @param _att_id List Attribute ID.
* @param _data_elem_seq Data element sequence for the list.
* @param _type_size SDP type and size descriptor.
*/
#define BT_SDP_LIST(_att_id, _type_size, _data_elem_seq) \
{ \
_att_id, { _type_size, _data_elem_seq } \
}
/**
* @brief SDP Service ID Attribute Declaration Macro.
*
* Helper macro to declare a service ID attribute.
*
* @param _uuid Service ID 16bit UUID.
*/
#define BT_SDP_SERVICE_ID(_uuid) \
{ \
BT_SDP_ATTR_SERVICE_ID, \
{ BT_SDP_TYPE_SIZE(BT_SDP_UUID16), &((struct bt_uuid_16) _uuid) } \
}
/**
* @brief SDP Name Attribute Declaration Macro.
*
* Helper macro to declare a service name attribute.
*
* @param _name Service name as a string (up to 256 chars).
*/
#define BT_SDP_SERVICE_NAME(_name) \
{ \
BT_SDP_ATTR_SVCNAME_PRIMARY, \
{ BT_SDP_TYPE_SIZE_VAR(BT_SDP_TEXT_STR8, (sizeof(_name)-1)), _name } \
}
/**
* @brief SDP Supported Features Attribute Declaration Macro.
*
* Helper macro to declare supported features of a profile/protocol.
*
* @param _features Feature mask as 16bit unsigned integer.
*/
#define BT_SDP_SUPPORTED_FEATURES(_features) \
{ \
BT_SDP_ATTR_SUPPORTED_FEATURES, \
{ BT_SDP_TYPE_SIZE(BT_SDP_UINT16), BT_SDP_ARRAY_16(_features) } \
}
/**
* @brief SDP Service Declaration Macro.
*
* Helper macro to declare a service.
*
* @param _attrs List of attributes for the service record.
*/
#define BT_SDP_RECORD(_attrs) \
{ \
.attrs = _attrs, \
.attr_count = ARRAY_SIZE((_attrs)), \
}
/* Server API */
/** @brief Register a Service Record.
*
* Register a Service Record. Applications can make use of
* macros such as BT_SDP_DECLARE_SERVICE, BT_SDP_LIST,
* BT_SDP_SERVICE_ID, BT_SDP_SERVICE_NAME, etc.
* A service declaration must start with BT_SDP_NEW_SERVICE.
*
* @param service Service record declared using BT_SDP_DECLARE_SERVICE.
*
* @return 0 in case of success or negative value in case of error.
*/
int bt_sdp_register_service(struct bt_sdp_record *service);
/* Client API */
/** @brief Generic SDP Client Query Result data holder */
struct bt_sdp_client_result {
/** buffer containing unparsed SDP record result for given UUID */
struct net_buf *resp_buf;
/** flag pointing that there are more result chunks for given UUID */
bool next_record_hint;
/** Reference to UUID object on behalf one discovery was started */
const struct bt_uuid *uuid;
};
/** @brief Helper enum to be used as return value of bt_sdp_discover_func_t.
* The value informs the caller to perform further pending actions or stop them.
*/
enum {
BT_SDP_DISCOVER_UUID_STOP = 0,
BT_SDP_DISCOVER_UUID_CONTINUE,
};
/** @typedef bt_sdp_discover_func_t
*
* @brief Callback type reporting to user that there is a resolved result
* on remote for given UUID and the result record buffer can be used by user
* for further inspection.
*
* A function of this type is given by the user to the bt_sdp_discover_params
* object. It'll be called on each valid record discovery completion for given
* UUID. When UUID resolution gives back no records then NULL is passed
* to the user. Otherwise user can get valid record(s) and then the internal
* hint 'next record' is set to false saying the UUID resolution is complete or
* the hint can be set by caller to true meaning that next record is available
* for given UUID.
* The returned function value allows the user to control retrieving follow-up
* resolved records if any. If the user doesn't want to read more resolved
* records for given UUID since current record data fulfills its requirements
* then should return BT_SDP_DISCOVER_UUID_STOP. Otherwise returned value means
* more subcall iterations are allowable.
*
* @param conn Connection object identifying connection to queried remote.
* @param result Object pointing to logical unparsed SDP record collected on
* base of response driven by given UUID.
*
* @return BT_SDP_DISCOVER_UUID_STOP in case of no more need to read next
* record data and continue discovery for given UUID. By returning
* BT_SDP_DISCOVER_UUID_CONTINUE user allows this discovery continuation.
*/
typedef uint8_t (*bt_sdp_discover_func_t)
(struct bt_conn *conn, struct bt_sdp_client_result *result);
/** @brief Main user structure used in SDP discovery of remote. */
struct bt_sdp_discover_params {
sys_snode_t _node;
/** UUID (service) to be discovered on remote SDP entity */
const struct bt_uuid *uuid;
/** Discover callback to be called on resolved SDP record */
bt_sdp_discover_func_t func;
/** Memory buffer enabled by user for SDP query results */
struct net_buf_pool *pool;
};
/** @brief Allows user to start SDP discovery session.
*
* The function performs SDP service discovery on remote server driven by user
* delivered discovery parameters. Discovery session is made as soon as
* no SDP transaction is ongoing between peers and if any then this one
* is queued to be processed at discovery completion of previous one.
* On the service discovery completion the callback function will be
* called to get feedback to user about findings.
*
* @param conn Object identifying connection to remote.
* @param params SDP discovery parameters.
*
* @return 0 in case of success or negative value in case of error.
*/
int bt_sdp_discover(struct bt_conn *conn,
const struct bt_sdp_discover_params *params);
/** @brief Release waiting SDP discovery request.
*
* It can cancel valid waiting SDP client request identified by SDP discovery
* parameters object.
*
* @param conn Object identifying connection to remote.
* @param params SDP discovery parameters.
*
* @return 0 in case of success or negative value in case of error.
*/
int bt_sdp_discover_cancel(struct bt_conn *conn,
const struct bt_sdp_discover_params *params);
/* Helper types & functions for SDP client to get essential data from server */
/** @brief Protocols to be asked about specific parameters */
enum bt_sdp_proto {
BT_SDP_PROTO_RFCOMM = 0x0003,
BT_SDP_PROTO_L2CAP = 0x0100,
};
/** @brief Give to user parameter value related to given stacked protocol UUID.
*
* API extracts specific parameter associated with given protocol UUID
* available in Protocol Descriptor List attribute.
*
* @param buf Original buffered raw record data.
* @param proto Known protocol to be checked like RFCOMM or L2CAP.
* @param param On success populated by found parameter value.
*
* @return 0 on success when specific parameter associated with given protocol
* value is found, or negative if error occurred during processing.
*/
int bt_sdp_get_proto_param(const struct net_buf *buf, enum bt_sdp_proto proto,
uint16_t *param);
/** @brief Get additional parameter value related to given stacked protocol UUID.
*
* API extracts specific parameter associated with given protocol UUID
* available in Additional Protocol Descriptor List attribute.
*
* @param buf Original buffered raw record data.
* @param proto Known protocol to be checked like RFCOMM or L2CAP.
* @param param_index There may be more than one parameter related to the
* given protocol UUID. This function returns the result that is
* indexed by this parameter. It's value is from 0, 0 means the
* first matched result, 1 means the second matched result.
* @param[out] param On success populated by found parameter value.
*
* @return 0 on success when a specific parameter associated with a given protocol
* value is found, or negative if error occurred during processing.
*/
int bt_sdp_get_addl_proto_param(const struct net_buf *buf, enum bt_sdp_proto proto,
uint8_t param_index, uint16_t *param);
/** @brief Get profile version.
*
* Helper API extracting remote profile version number. To get it proper
* generic profile parameter needs to be selected usually listed in SDP
* Interoperability Requirements section for given profile specification.
*
* @param buf Original buffered raw record data.
* @param profile Profile family identifier the profile belongs.
* @param version On success populated by found version number.
*
* @return 0 on success, negative value if error occurred during processing.
*/
int bt_sdp_get_profile_version(const struct net_buf *buf, uint16_t profile,
uint16_t *version);
/** @brief Get SupportedFeatures attribute value
*
* Allows if exposed by remote retrieve SupportedFeature attribute.
*
* @param buf Buffer holding original raw record data from remote.
* @param features On success object to be populated with SupportedFeature
* mask.
*
* @return 0 on success if feature found and valid, negative in case any error
*/
int bt_sdp_get_features(const struct net_buf *buf, uint16_t *features);
#ifdef __cplusplus
}
#endif
/**
* @}
*/
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_SDP_H_ */
```
|
```css
Make text unselectable
The difference between `visibility:hidden` and `display:none`
Use `border-radius` to style rounded corners of an element
At-Rules (`@`)
Use pseudo-elements to style specific parts of an element
```
|
The Parliamentary Elections Act 1770 (also known as the Grenville Act) is an Act of the Parliament of Great Britain (10 Geo. 3. c. 16). The Act transferred the power of trying election petitions from the House of Commons as a whole to a less politicised committee of the House. All contested elections were to be considered by a committee of thirteen members selected by ballot. The Act was initially limited to one year, but was extended several times. A bill was passed in 1774 to make it perpetual – by that time five cases had already been tried.
This Act was repealed by section 1 of the Controverted Elections Act 1828 (9 Geo. 4. c. 22).
References
Erskine May, Chapter VI, pp. 362–75, Election Petitions: Places and Pensions
Election law in the United Kingdom
Repealed Great Britain Acts of Parliament
Election legislation
Great Britain Acts of Parliament 1770
Elections in the Kingdom of Great Britain
|
```c
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: expandtab:ts=8:sw=4:softtabstop=4:
///////////////////////////////////////////////////////////////////////////////
//
/// \file common.h
/// \brief Common functions needed in many places in liblzma
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
/////////////
// Version //
/////////////
extern LZMA_API(uint32_t)
lzma_version_number(void)
{
return LZMA_VERSION;
}
extern LZMA_API(const char *)
lzma_version_string(void)
{
return LZMA_VERSION_STRING;
}
///////////////////////
// Memory allocation //
///////////////////////
extern void * lzma_attribute((malloc))
lzma_alloc(size_t size, lzma_allocator *allocator)
{
// Some malloc() variants return NULL if called with size == 0.
if (size == 0)
size = 1;
void *ptr;
if (allocator != NULL && allocator->alloc != NULL)
ptr = allocator->alloc(allocator->opaque, 1, size);
else
ptr = malloc(size);
return ptr;
}
extern void
lzma_free(void *ptr, lzma_allocator *allocator)
{
if (allocator != NULL && allocator->free != NULL)
allocator->free(allocator->opaque, ptr);
else
free(ptr);
return;
}
//////////
// Misc //
//////////
extern size_t
lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size)
{
const size_t in_avail = in_size - *in_pos;
const size_t out_avail = out_size - *out_pos;
const size_t copy_size = MIN(in_avail, out_avail);
memcpy(out + *out_pos, in + *in_pos, copy_size);
*in_pos += copy_size;
*out_pos += copy_size;
return copy_size;
}
extern lzma_ret
lzma_next_filter_init(lzma_next_coder *next, lzma_allocator *allocator,
const lzma_filter_info *filters)
{
lzma_next_coder_init(filters[0].init, next, allocator);
return filters[0].init == NULL
? LZMA_OK : filters[0].init(next, allocator, filters);
}
extern void
lzma_next_end(lzma_next_coder *next, lzma_allocator *allocator)
{
if (next->init != (uintptr_t)(NULL)) {
// To avoid tiny end functions that simply call
// lzma_free(coder, allocator), we allow leaving next->end
// NULL and call lzma_free() here.
if (next->end != NULL)
next->end(next->coder, allocator);
else
lzma_free(next->coder, allocator);
// Reset the variables so the we don't accidentally think
// that it is an already initialized coder.
*next = LZMA_NEXT_CODER_INIT;
}
return;
}
//////////////////////////////////////
// External to internal API wrapper //
//////////////////////////////////////
extern lzma_ret
lzma_strm_init(lzma_stream *strm)
{
if (strm == NULL)
return LZMA_PROG_ERROR;
if (strm->internal == NULL) {
strm->internal = lzma_alloc(sizeof(lzma_internal),
strm->allocator);
if (strm->internal == NULL)
return LZMA_MEM_ERROR;
strm->internal->next = LZMA_NEXT_CODER_INIT;
}
strm->internal->supported_actions[LZMA_RUN] = false;
strm->internal->supported_actions[LZMA_SYNC_FLUSH] = false;
strm->internal->supported_actions[LZMA_FULL_FLUSH] = false;
strm->internal->supported_actions[LZMA_FINISH] = false;
strm->internal->sequence = ISEQ_RUN;
strm->total_in = 0;
strm->total_out = 0;
return LZMA_OK;
}
extern LZMA_API(lzma_ret)
lzma_code(lzma_stream *strm, lzma_action action)
{
// Sanity checks
if ((strm->next_in == NULL && strm->avail_in != 0)
|| (strm->next_out == NULL && strm->avail_out != 0)
|| strm->internal == NULL
|| strm->internal->next.code == NULL
|| (unsigned int)(action) > LZMA_FINISH
|| !strm->internal->supported_actions[action])
return LZMA_PROG_ERROR;
switch (strm->internal->sequence) {
case ISEQ_RUN:
switch (action) {
case LZMA_RUN:
break;
case LZMA_SYNC_FLUSH:
strm->internal->sequence = ISEQ_SYNC_FLUSH;
break;
case LZMA_FULL_FLUSH:
strm->internal->sequence = ISEQ_FULL_FLUSH;
break;
case LZMA_FINISH:
strm->internal->sequence = ISEQ_FINISH;
break;
}
break;
case ISEQ_SYNC_FLUSH:
// The same action must be used until we return
// LZMA_STREAM_END, and the amount of input must not change.
if (action != LZMA_SYNC_FLUSH
|| strm->internal->avail_in != strm->avail_in)
return LZMA_PROG_ERROR;
break;
case ISEQ_FULL_FLUSH:
if (action != LZMA_FULL_FLUSH
|| strm->internal->avail_in != strm->avail_in)
return LZMA_PROG_ERROR;
break;
case ISEQ_FINISH:
if (action != LZMA_FINISH
|| strm->internal->avail_in != strm->avail_in)
return LZMA_PROG_ERROR;
break;
case ISEQ_END:
return LZMA_STREAM_END;
case ISEQ_ERROR:
default:
return LZMA_PROG_ERROR;
}
size_t in_pos = 0;
size_t out_pos = 0;
lzma_ret ret = strm->internal->next.code(
strm->internal->next.coder, strm->allocator,
strm->next_in, &in_pos, strm->avail_in,
strm->next_out, &out_pos, strm->avail_out, action);
strm->next_in += in_pos;
strm->avail_in -= in_pos;
strm->total_in += in_pos;
strm->next_out += out_pos;
strm->avail_out -= out_pos;
strm->total_out += out_pos;
strm->internal->avail_in = strm->avail_in;
switch (ret) {
case LZMA_OK:
// Don't return LZMA_BUF_ERROR when it happens the first time.
// This is to avoid returning LZMA_BUF_ERROR when avail_out
// was zero but still there was no more data left to written
// to next_out.
if (out_pos == 0 && in_pos == 0) {
if (strm->internal->allow_buf_error)
ret = LZMA_BUF_ERROR;
else
strm->internal->allow_buf_error = true;
} else {
strm->internal->allow_buf_error = false;
}
break;
case LZMA_STREAM_END:
if (strm->internal->sequence == ISEQ_SYNC_FLUSH
|| strm->internal->sequence == ISEQ_FULL_FLUSH)
strm->internal->sequence = ISEQ_RUN;
else
strm->internal->sequence = ISEQ_END;
// Fall through
case LZMA_NO_CHECK:
case LZMA_UNSUPPORTED_CHECK:
case LZMA_GET_CHECK:
case LZMA_MEMLIMIT_ERROR:
// Something else than LZMA_OK, but not a fatal error,
// that is, coding may be continued (except if ISEQ_END).
strm->internal->allow_buf_error = false;
break;
default:
// All the other errors are fatal; coding cannot be continued.
assert(ret != LZMA_BUF_ERROR);
strm->internal->sequence = ISEQ_ERROR;
break;
}
return ret;
}
extern LZMA_API(void)
lzma_end(lzma_stream *strm)
{
if (strm != NULL && strm->internal != NULL) {
lzma_next_end(&strm->internal->next, strm->allocator);
lzma_free(strm->internal, strm->allocator);
strm->internal = NULL;
}
return;
}
extern LZMA_API(lzma_check)
lzma_get_check(const lzma_stream *strm)
{
// Return LZMA_CHECK_NONE if we cannot know the check type.
// It's a bug in the application if this happens.
if (strm->internal->next.get_check == NULL)
return LZMA_CHECK_NONE;
return strm->internal->next.get_check(strm->internal->next.coder);
}
extern LZMA_API(uint64_t)
lzma_memusage(const lzma_stream *strm)
{
uint64_t memusage;
uint64_t old_memlimit;
if (strm == NULL || strm->internal == NULL
|| strm->internal->next.memconfig == NULL
|| strm->internal->next.memconfig(
strm->internal->next.coder,
&memusage, &old_memlimit, 0) != LZMA_OK)
return 0;
return memusage;
}
extern LZMA_API(uint64_t)
lzma_memlimit_get(const lzma_stream *strm)
{
uint64_t old_memlimit;
uint64_t memusage;
if (strm == NULL || strm->internal == NULL
|| strm->internal->next.memconfig == NULL
|| strm->internal->next.memconfig(
strm->internal->next.coder,
&memusage, &old_memlimit, 0) != LZMA_OK)
return 0;
return old_memlimit;
}
extern LZMA_API(lzma_ret)
lzma_memlimit_set(lzma_stream *strm, uint64_t new_memlimit)
{
// Dummy variables to simplify memconfig functions
uint64_t old_memlimit;
uint64_t memusage;
if (strm == NULL || strm->internal == NULL
|| strm->internal->next.memconfig == NULL)
return LZMA_PROG_ERROR;
if (new_memlimit != 0 && new_memlimit < LZMA_MEMUSAGE_BASE)
return LZMA_MEMLIMIT_ERROR;
return strm->internal->next.memconfig(strm->internal->next.coder,
&memusage, &old_memlimit, new_memlimit);
}
```
|
NYU Tandon Digital Learning, formerly known as NYU Tandon Online and NYU-ePoly, is the digital learning department at New York University Tandon School of Engineering, a noted school of engineering, technology, management and applied sciences in the United States.
Currently, the School of Engineering offers a range of graduate-level programs online, including four master's degrees and an advanced certificate. Nasir Memon joined the department as its head in 2017 and introduced the unit's first non-credit course offering, A Bridge to Tandon (now named NYU Tandon Bridge), an innovative, online course to prepare non-STEM students for graduate engineering studies. NYU Tandon Digital Learning's master's degree programs offer the same curriculum and credentials as their on-campus counterparts and benefit from an active learning approach that engages students in interactive, high-quality learning modules paired with the university and school's time-honored pedagogical approaches. The platform has been recognized by the Alfred P. Sloan Foundation, Online Learning Consortium & by U.S. News & World Report.
History
NYU Tandon Digital Learning's story began back in 2006 as “e-Poly,” the online learning wing of the then Polytechnic University. The department was initially designed to enable its on-campus students to blend and accelerate their time to degree completion by taking some courses online. The first program offered entirely online was the Cybersecurity master's degree, which is still the leading program by enrollment. By 2009, e-Poly program offerings included three master's degrees and two advanced certificates. In 2009, e-Poly was renamed NYU-ePoly, in recognition of the university's affiliation with NYU. Following the school's name change in October 2015, the department was renamed NYU Tandon Online. Today NYU Tandon Online offers over 65 NYU-developed online courses in diverse technology and management fields.
Academics
Programs
NYU Tandon Digital Learning offers online graduate programs developed, designed and delivered in conjunction with various departments at NYU Tandon School of Engineering, including Cybersecurity, Bioinformatics, Emerging Technologies, and Management of Technology, offering the same curriculum and approach as their on-campus counterparts, entirely online. In addition to the master's programs, advanced certificate programs, non-credit professional education courses, and the NYU Tandon Bridge pathway program are offered.
Non-credit Programs
NYU Tandon Digital Learning launched its first non-credit offering in 2016. The NYU Tandon Bridge program, a computer science and STEM "bridge" for non-computer scientists, provides, for total tuition of $1850, three traditional courses that, upon successful completion, qualify students to apply for the Computer Science, Cybersecurity, Bioinformatics, or Computer Engineering master's degree programs at NYU Tandon and an array of accepting partner institutions.
Visiting Students
Apart from the regular master's and certificate programs, NYU Tandon Online also allows individuals to take up to nine credits at NYU Tandon School of Engineering, without completing formal admission. This option is especially beneficial for students who want to learn an advanced topic for personal and professional development or who wish to experience a master's program before fully committing.
NYU Cyber Fellows
A distinctive offering of NYU Tandon Digital Learning is its NYU Cyber Fellows program which provides a 75% scholarship towards tuition for all students admitted to this online Cybersecurity master’s degree. Offered for $18,000, NYU Cyber Fellows is a part-time or full-time program of 10 courses designed to be completed in 2–3 years, entirely online. Access to a hands-on virtual lab, industry collaborations, an industry-reviewed curriculum, exclusive speaker events, and peer mentors are also offered. Following graduation, students are given access to updated course materials for 5 years.
In 2021 the application for this program was streamlined to take as little as 15 minutes to complete. In addition, applicants receive an admission decision in 15 business days.
Accreditation
NYU Tandon School of Engineering is accredited by the Middle States Commission on Higher Education and New York State Education Department to award master's and graduate certificate degrees.
Affiliations
NYU Tandon Digital Learning is associated with many corporations, societies and companies. NYU Tandon Online is also associated with the National Security Agency through their National Centers of Academic Excellence in Cyber Operations Program. Under the direction of NYU Enterprise Learning, the unit partnered with Scientific American to provide interactive short courses called Professional Learning.
Rankings
34th Best Online Graduate Computer Information Technology Program by U.S. News & World Report in 2023.
72nd Best Online Graduate Engineering Program by U.S. News & World Report in 2023.
4th The 30 Most technologically Savvy online Schools by Online Schools Center for 2015.
Awards
Sloan-C named the online Cybersecurity Master's program as the Nation's "Outstanding Online Program" in 2011.
Received the Ralph E. Gomory Award for Quality Online Education from the Online Learning Consortium (formerly known as Sloan-C) in 2015.
See also
New York University Tandon School of Engineering
NYU
Online Learning Consortium
Online degree
Distance education
Virtual university
References
External links
Distance education institutions based in the United States
Polytechnic School of Engineering
Engineering universities and colleges in New York (state)
Universities and colleges in Brooklyn
2006 establishments in New York (state)
|
```html
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Archives: 2019/6 | Here. There.</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=3, minimum-scale=1">
<meta name="author" content="">
<meta name="description" content="html5, js, angularjs, jQuery, ">
<link rel="alternate" href="/atom.xml" title="Here. There." type="application/atom+xml">
<link rel="icon" href="/img/favicon.ico">
<link rel="apple-touch-icon" href="/img/pacman.jpg">
<link rel="apple-touch-icon-precomposed" href="/img/pacman.jpg">
<link rel="stylesheet" href="/css/style.css">
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?3d902de4a19cf2bf179534ffd2dd7b7f";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<meta name="generator" content="Hexo 6.3.0"></head>
<body>
<header>
<div>
<div id="imglogo">
<a href="/"><img src="/img/sun.png" alt="Here. There." title="Here. There."/></a>
</div>
<div id="textlogo">
<h1 class="site-name"><a href="/" title="Here. There.">Here. There.</a></h1>
<h2 class="blog-motto">Love ice cream. Love sunshine. Love life. Love the world. Love myself. Love you.</h2>
</div>
<div class="navbar"><a class="navbutton navmobile" href="#" title="">
</a></div>
<nav class="animated">
<ul>
<li><a href="/"></a></li>
<li><a target="_blank" rel="noopener" href="path_to_url"></a></li>
<li><a href="/archives"></a></li>
<li><a href="/categories"></a></li>
<li><a href="path_to_url"></a></li>
<li><a href="/about"></a></li>
</ul>
</nav>
</div>
</header>
<div id="container">
<div class="archive-title" >
<h2 class="archive-icon">2019/6</h2>
<div class="archiveslist archive-float clearfix">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2024/08/"> 2024</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2024/07/"> 2024</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2024/06/"> 2024</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2024/05/"> 2024</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2024/04/"> 2024</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2024/03/"> 2024</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2024/02/"> 2024</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2024/01/"> 2024</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/12/"> 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/11/"> 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/10/"> 2023</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/09/"> 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/08/"> 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/07/"> 2023</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/06/"> 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/05/"> 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/04/"> 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/03/"> 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/01/"> 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/12/"> 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/11/"> 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/10/"> 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/09/"> 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/08/"> 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/07/"> 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/06/"> 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/05/"> 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/04/"> 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/03/"> 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/02/"> 2022</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/01/"> 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/12/"> 2021</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/11/"> 2021</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/10/"> 2021</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/09/"> 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/08/"> 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/07/"> 2021</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/06/"> 2021</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/05/"> 2021</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/04/"> 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/03/"> 2021</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/02/"> 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/01/"> 2021</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/11/"> 2020</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/10/"> 2020</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/08/"> 2020</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/07/"> 2020</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/06/"> 2020</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/04/"> 2020</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/03/"> 2020</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/02/"> 2020</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/12/"> 2019</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/11/"> 2019</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/10/"> 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/09/"> 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/08/"> 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/07/"> 2019</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/06/"> 2019</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/05/"> 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/04/"> 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/03/"> 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/02/"> 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/01/"> 2019</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/12/"> 2018</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/11/"> 2018</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/10/"> 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/09/"> 2018</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/08/"> 2018</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/07/"> 2018</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/06/"> 2018</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/05/"> 2018</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/04/"> 2018</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/03/"> 2018</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/"> 2018</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/01/"> 2018</a><span class="archive-list-count">9</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/12/"> 2017</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/11/"> 2017</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/10/"> 2017</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/09/"> 2017</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/08/"> 2017</a><span class="archive-list-count">11</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/07/"> 2017</a><span class="archive-list-count">9</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/06/"> 2017</a><span class="archive-list-count">10</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/"> 2017</a><span class="archive-list-count">15</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/04/"> 2017</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/03/"> 2017</a><span class="archive-list-count">10</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/02/"> 2017</a><span class="archive-list-count">41</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/01/"> 2017</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/12/"> 2016</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/11/"> 2016</a><span class="archive-list-count">9</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/10/"> 2016</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/09/"> 2016</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/08/"> 2016</a><span class="archive-list-count">9</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/07/"> 2016</a><span class="archive-list-count">14</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/06/"> 2016</a><span class="archive-list-count">9</span></li></ul>
</div>
</div>
<div id="main" class="all-list-box clearfix"><!--class: archive-part-->
<div id="archive-page" class=""><!--class: all-list-box-->
<section class="post" itemscope itemprop="blogPost">
<a href="/2019/06/30/about-front-end-2-principle/" title="--2." itemprop="url">
<h1 itemprop="name">--2.</h1>
<p itemprop="description" >~</p>
<time datetime="2019-06-30T07:09:58.000Z" itemprop="datePublished">2019-06-30</time>
</a>
</section>
<section class="post" itemscope itemprop="blogPost">
<a href="/2019/06/27/vue-for-everyone-1/" title="9102Vue--1.Vue" itemprop="url">
<h1 itemprop="name">9102Vue--1.Vue</h1>
<p itemprop="description" > Vue Vue Vue </p>
<time datetime="2019-06-27T15:09:59.000Z" itemprop="datePublished">2019-06-27</time>
</a>
</section>
<section class="post" itemscope itemprop="blogPost">
<a href="/2019/06/17/wxapp-latest-20190617/" title="20190617" itemprop="url">
<h1 itemprop="name">20190617</h1>
<p itemprop="description" >~~</p>
<time datetime="2019-06-17T15:17:13.000Z" itemprop="datePublished">2019-06-17</time>
</a>
</section>
</div>
</div>
</div>
<footer><div id="footer" >
<section class="info">
<p> ^_^ </p>
</section>
<p class="copyright">Powered by <a href="path_to_url" target="_blank" title="hexo">hexo</a> and Theme by <a href="path_to_url" target="_blank" title="Pacman">Pacman</a> 2024
<a href="path_to_url" target="_blank" title=""></a>
</p>
</div>
</footer>
<script src="/js/jquery-2.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.navbar').click(function(){
$('header nav').toggleClass('shownav');
});
var myWidth = 0;
function getSize(){
if( typeof( window.innerWidth ) == 'number' ) {
myWidth = window.innerWidth;
} else if( document.documentElement && document.documentElement.clientWidth) {
myWidth = document.documentElement.clientWidth;
};
};
var m = $('#main'),
a = $('#asidepart'),
c = $('.closeaside'),
o = $('.openaside');
$(window).resize(function(){
getSize();
if (myWidth >= 1024) {
$('header nav').removeClass('shownav');
}else
{
m.removeClass('moveMain');
a.css('display', 'block').removeClass('fadeOut');
o.css('display', 'none');
}
});
c.click(function(){
a.addClass('fadeOut').css('display', 'none');
o.css('display', 'block').addClass('fadeIn');
m.addClass('moveMain');
});
o.click(function(){
o.css('display', 'none').removeClass('beforeFadeIn');
a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');
m.removeClass('moveMain');
});
$(window).scroll(function(){
o.css("top",Math.max(80,260-$(this).scrollTop()));
});
});
</script>
</body>
</html>
```
|
```glsl
uniform sampler2D inputImageTexture;
varying highp vec2 textureCoordinate;
uniform lowp float temperature;
uniform lowp float tint;
const lowp vec3 warmFilter = vec3(0.93, 0.54, 0.0);
const mediump mat3 RGBtoYIQ = mat3(0.299, 0.587, 0.114, 0.596, -0.274, -0.322, 0.212, -0.523, 0.311);
const mediump mat3 YIQtoRGB = mat3(1.0, 0.956, 0.621, 1.0, -0.272, -0.647, 1.0, -1.105, 1.702);
void main()
{
lowp vec4 source = texture2D(inputImageTexture, textureCoordinate);
mediump vec3 yiq = RGBtoYIQ * source.rgb; //adjusting tint
yiq.b = clamp(yiq.b + tint*0.5226*0.1, -0.5226, 0.5226);
lowp vec3 rgb = YIQtoRGB * yiq;
lowp vec3 processed = vec3(
(rgb.r < 0.5 ? (2.0 * rgb.r * warmFilter.r) : (1.0 - 2.0 * (1.0 - rgb.r) * (1.0 - warmFilter.r))), //adjusting temperature
(rgb.g < 0.5 ? (2.0 * rgb.g * warmFilter.g) : (1.0 - 2.0 * (1.0 - rgb.g) * (1.0 - warmFilter.g))),
(rgb.b < 0.5 ? (2.0 * rgb.b * warmFilter.b) : (1.0 - 2.0 * (1.0 - rgb.b) * (1.0 - warmFilter.b))));
gl_FragColor = vec4(mix(rgb, processed, temperature), source.a);
}
```
|
```turing
#!/usr/bin/perl -Tw
use strict;
use Test::More tests=>19;
BEGIN {
use_ok( 'Locale::Maketext' );
}
print "#\n# Testing non-tight insertion of super-ordinate language tags...\n#\n";
my @in = grep m/\S/, split /[\n\r]/, q{
NIX => NIX
sv => sv
en => en
hai => hai
pt-br => pt-br pt
pt-br fr => pt-br fr pt
pt-br fr pt => pt-br fr pt
pt-br fr pt de => pt-br fr pt de
de pt-br fr pt => de pt-br fr pt
de pt-br fr => de pt-br fr pt
hai pt-br fr => hai pt-br fr pt
# Now test multi-part complicateds:
pt-br-janeiro fr => pt-br-janeiro fr pt-br pt
pt-br-janeiro de fr => pt-br-janeiro de fr pt-br pt
pt-br-janeiro de pt fr => pt-br-janeiro de pt fr pt-br
ja pt-br-janeiro fr => ja pt-br-janeiro fr pt-br pt
ja pt-br-janeiro de fr => ja pt-br-janeiro de fr pt-br pt
ja pt-br-janeiro de pt fr => ja pt-br-janeiro de pt fr pt-br
pt-br-janeiro de pt-br fr => pt-br-janeiro de pt-br fr pt
# an odd case, since we don't filter for uniqueness in this sub
};
$Locale::Maketext::MATCH_SUPERS_TIGHTLY = 0;
foreach my $in ( @in ) {
$in =~ s/^\s+//s;
$in =~ s/\s+$//s;
$in =~ s/#.+//s;
next unless $in =~ m/\S/;
die "What kind of line is <$in>?!"
unless $in =~ m/^(.+)=>(.+)$/s;
my ($i,$s) = ($1, $2);
my @in = ($i =~ m/(\S+)/g);
my @should = ($s =~ m/(\S+)/g);
my @out = Locale::Maketext->_add_supers(
("@in" eq 'NIX') ? () : @in
);
@out = 'NIX' unless @out;
is_deeply( \@out, \@should, "Happily got [@out] from $in" );
}
```
|
Arktikugol () is a Russian coal mining unitary enterprise which operates on the island of Spitsbergen in Svalbard, Norway. Owned by the government of Russia, Arktikugol currently performs limited mining in Barentsburg. It has carried out mining operations in the towns of Pyramiden and Grumant, which it still owns, and once operated a port at Colesbukta. The company is headquartered in Moscow and is the official agency through which Russia, and previously the Soviet Union, exercised its Svalbard policy.
The company was established on 7 October 1931 to take over all Soviet mining interests on Svalbard. At the time Grumant and Pyramiden were bought, although only Grumant was in operation. It also bought Barentsburg from Dutch interests. The company retained operation there and in Grumant until 1941, when all employees were evacuated to the mainland as part of Operation Gauntlet. Mining resumed in 1947 and commenced in Pyramiden in 1955. Declining coal deposits resulted in Grumant being closed in 1961.
From the 1960s through the 1980s, Arktikugol carried out a series of oil drilling attempts on the archipelago but never succeeded at finding profitable reservoirs. From the 1990s, the company lost many of its subsidies and cut production, resulting in Pyramiden being closed in 1998. The company has attempted to diversify without success.
History
Background
The first Russian expedition exploring Svalbard for coal was conducted by Vladimir Alexandtrovitch Rusanov in 1912. It explored the areas around Bellsund and van Mijenfjorden. It later went northwards to Isfjorden and visited Grønfjorden and Adventfjorden, and it occupied a claim at Colesbukta on 7 August. On 16 March 1913 the financiers of the expedition established the company Handelshuset Grumant – A. G. Agafeloff & Co. to exploit the mine. They sent an expedition that summer and started breaking coal at Colesbukta with a force of 25 men. In 1920 The Anglo Russian Grumant Company Ltd. was established to purchase the operations at Grumant, the mining town which grew up at Colesbukta. At the time a challenge for the Russian interests on Spitsbergen was that the Soviet Union was not yet party to the Svalbard Treaty.
In 1925 the company sold its rights around Kvalvågen and Agarddhbukta to Severoles, which created the Moscow-based company Russki Grumant Ltd. It issued a series of claims to the Commissioner of Mines, most of which were contested by the Government of Norway and various mining companies. A particular intense issue was that of what would become the settlement of Pyramiden on Billefjorden. Both Svenska Stenkolsaktiebolaget Spetsbergen and Severoles claimed the area. In a settlement, Severoles was given the claims to Pyramiden. The Government of Norway protested, stating that a foreign state could not claim land on Svalbard. Thus Russki Grumant took over the claims. By 1927 all Russian claim disputes were resolved.
The Russian authorities announced on 22 June 1931 that the company Sojusljesprom would be operating Grumant. The first shipment of crew arrived on 12 July. Work started immediately to build a settlement, while a port was to be built at Colesbukta, away. The first season was regarded as a trial. On 17 November 1931 The Anglo Russian Grumant Co. sold all its mining claims to the newly established Arktikugol. The company had been incorporated on 7 October the same year and had its head office in Moscow.
Pre–Second World War
Barentsburg was established by the Nederlandsche Spitsbergen Compagnie, who closed operations in 1926. The company announced in 1931 that the town was for sale, and Arktikugol offered to purchase the entire company. Barentsburg was sold on 25 July 1932, including the claims and land at Bohemanflya. When purchasing Grumant, the Russian company had agreed to forfeit its right to operate a long-distance radio station. This arrangement did not apply to Barentsburg, allowing Arktikugol to establish a telegraphy station there. The issue was raised to a diplomatic level, but resolved itself after it became clear that Grumant Radio would only be relaying via Barentsburg. Arktikugol continued to build infrastructure in Grumant and mined ca. 10,000 tonnes of coal in the winter of 1931–32.
By 1932 the population had reached 300 in Grumant and 500 in Barentsburg. The company had commenced prospecting in Colesbukta, and hoped to bring production to 120,000 tonnes from Grumant and 300,000 tonnes from Barentsburg per year. The Governor of Svalbard conducted the first inspection of the two towns in July 1933. By the winter of 1933–34 the population of Barentsburg had risen to 1,261, including about 100 children. The summer population was about 1,500, and the mines produced 180,000 tonnes in 1934. The same year Grumant had 230 employees and produced 38,000 tonnes. The following year production increased to 349,000 tonnes for both towns.
Meanwhile, Arktikugol was working on prospecting at Pyramiden. Prospects were carried out at Kapp Heer during the winter of 1938–39, concluding with that there was only a single seam of coal. Barentsburg had a population of 1515 in 1939, of which 259 were women and 65 were children. Grumant had a population of 399, of which 56 were women and 12 children. By 1939 a town and mining complex was under construction at Pyramiden. Production started in 1940,with a crew of 80 men.
The break-out of the Second World War initially had little influence on the operations. Norwegian and British authorities agreed on 12 August that all Allied settlements on Svalbard would be evacuated. Operation Gauntlet was initiated, with the troop carrier Empress of Canada arriving on 25 August. It evacuated the entire Soviet population and brought them to the mouth of the Northern Dvina River. Four days later it evacuated the Norwegian settlements. Key infrastructure, such as docks and power stations, were destroyed and the coal heaps set ablaze. The goal was to hinder German operation while making resuming of operation easy. On 8 September 1943 the German Wehrmacht carried out Operation Zitronella, whereby all the settlements on Isfjorden, including Barentsburg and Grumant, were destroyed by fire from the battleships Tirpitz and Scharnhorst and nine destroyers.
Cold War
By the end of the war the settlement in Pyramiden was still standing. Barentsburg and Kapp Heer were destroyed and full reconstruction of the town was necessary. Grumant was in the same situation. The only structure that was usable was a water tower. Although an inspection was carried out in 1945, Arktikugol did not commence reconstruction until November 1946. It stationed an ice-breaker in Pyramiden to keep an ice-free path between the two towns. By the summer of 1947 there were 350 people working in Pyramiden, although mining had yet to commence. By November the populations had reached 500 in Pyramiden and Barentsburg, and 200 in Grumant. Barentsburg and Grumant were sufficiently rebuilt by 1948 to allow mining to commence. Prospecting was carried out in Colesbukta and by 1949 there were 2,438 Soviet citizens on the archipelago, of which 51 were children. Barentsburg had 1,180 people, Grumant 965 and Pyramiden 293.
At the end of the war there was established a Soviet consulate in Pyramiden. It was moved to Barentsburg in 1950. A new dock, allowing 10,000-tonnes ships, was built in Colesbukta. Meanwhile, a railway line was being built between Grumant and Colesbukta, to allow the Grumant coal to be shipped out from the better port at Colesbukta. The Commissioner of Mines carried out annual inspections of all mines each summer. For the first time, Arktikugol attempted, in violation of the Mining Code, to hinder such an inspection on 10 July 1952. Arktikugol had also initiated simple building at Kapp Boheman and broken 4,000 tonnes of coal. That year the mines in Barentsburg produced 130,000 tonnes and 122,000 tonnes were produced in Grumant.
Production in Pyramiden commenced in 1955, with an output of 38,000 tonnes the first year. Two years later production there reached 107,000 tonnes, exceeding that of Grumant, at 93,000 tonnes. Along with Barentsburgs 193,000 tonnes, Arktikugols annual production reached 394,000 tonnes. The population in Pyramiden had reached 728, while it was 965 in Grumant and 1,039 in Barentsburg. Arktikugol built a new power station at Colesbukta, but the quality of the coal mined at Grumant was diminishing. The company therefore decided to terminate operations there from the fall of 1961 and abandon the settlements in Grumant and Colesbukta. In its final full year of production, in 1960, Grumant contributed with 125,000 tonnes of coal towards Arktikugol's total 480,000 tonnes. Grumant produced 73,000 tonnes in 1961, and featured a population 1,047 in 1959. The closing of Grumant resulted of a significant fall in the Russian population, from 2,667 people in 1960 to 1,700 in 1965. However, Arktikugol retained a small workforce at Grumant until 1967.
The American oil company Caltex and later Norsk Polar Navigasjon commenced oil prospecting on Svalbard in 1960. This caught the interest of Soviet authorities, who started working on their own petroleum prospecting plans from 1962. Arktikugol was at the time not making any money from the coal mining, and it saw advantages of establishing an alternative, potentially more profitable industry. As in coal mining, the Svalbard Treaty hindered any non-discrimination compared with other country's economic activities. The company registered 71 petroleum claims in January 1963, based on geological indications. At the time there was uncertainty is this was sufficient, or if samples would need to be provided for the claims to be approved. The claims were rejected in May, but was met with protests as the Soviet Union claimed they were being discriminated against in comparison with Caltex. The issue received a temporary closing on 17 July 1965, when Arktikugol accepted to pay royalties on any production.
Svalbard Airport, Longyear opened on 2 September 1975. An agreement is made so that Arktikugol can fly its workers to the mainland via the airport with Aeroflot. The airline also starts operating a helicopter shuttle service between Longyearbyen and Barentsburg with the construction of Barentsburg Heliport, Heerodden. A Soviet helicopter crashed at Hansbreen in August 1977, although no-one was killed. Norwegian authorities give an operating permit to the heliport in 1978. Arktikugol commenced prospecting in Colesbukta from 1981 and 1988, and between 40 and 50 people were quartered in the abandoned town in the summers. The company experience another helicopter accident, at Hornsund, in 1982.
Arktikugol carried out oil drilling at Vassdalen at van Mijenfjorden from 1985 to 1989. The company opened new cultural centers, both including swimming pools, in Barentsburg and Pyramiden in 1987. A hotel was opened in Pyramiden in 1989 and the company started initiatives to attract tourists to the town. That year there were 715 residents in Pyramiden and 918 in Barentsburg.
Post-dissolution
With the dissolution of the Soviet Union in 1991, Deputy Foreign Minister Andrei Fyodorov stated that the Russian state no longer had any interests in remaining in Svalbard. Reforms in the coal industry were a priority and on 30 December 1992 Boris Yeltsin announced the coal industry's privatization and that subsidies would cease from 1994. Arktikugol was as an exception allowed to continue with subsidies and with state ownership. However, the company no longer was to sell coal to Russia, but instead to Western Europe. This would allow the company access to hard currency, although the coal's poor quality and high sulfur content gave low prices. Production at this point amounted to ca. 400,000 tonnes per year, of which about a fifth went to local consumption.
The company started looking for alternative sources of revenue. It was inspired by Longyearbyen, which was carrying out a diversification process. Arktikugol announced several plans, including opening for tourism and converting one of the residential apartment buildings to a hotel; establishing a tourist market; plans for bottling water and plans for the construction of a fishing station. An application for tourist flights with the Mi-8 helicopters was sent, but rejected by the Governor of environmental and safety reasons. The hotel received few visitors. Surveying in Pyramiden commenced in 1990 and concluded in 1996.
Without sufficient income, the company was forced to cut its welfare services. Maintenance was cut to a minimum, and in 1995 the schools and kindergartens were closed and children and most wives returned to the mainland. Both towns became dominated by young men. The Arktikugol-chartered Vnukovo Airlines Flight 2801 crashed into Operafjellet on 29 August 1996, killing all 141 people on board. All of the passengers were Arktikugol employees. On 18 September 1997, twenty-three miners were killed in an explosion—the most deadly mining accident ever on Norwegian soil. In the first accident the Russians sent their own rescue crew and equipment and proposed a joint Norwegian-Russian investigation. This was rejected by the Governor. Following the 1997 accident the Governor led the investigation without questions from Arktikugol—a significant shift the relationship between the two countries.
The Government of Russia passed a new, confidential Svalbard politic on 31 December 1997. It change the policy towards a long-term presence, and proposed closing coal mining and replacing it with other industry. By the 1990s both Barentsburg and Pyramiden were running low on coal reserves. New finds in Colesbukta teased Arktikugol to plan for expansion there. This, along with Barentsburg's better port and with Arktikugol's main administration, caused the company to prefer to keep it in operations. Closure of Pyramiden was discussed at a meeting in Moscow on 28 July 1997. The plan for closing was finalized and approved by the Ministry of Energy on 23 March 1998. The last breaking of coal took place on 1 April and by the late summer the town had been shut down, and all activities moved to Barentsburg.
Arktikugol's head office was moved to Murmansk in 1999, but then returned to Moscow in 2004. During this period the company underwent a series of restructurings. From 2000 the government decided that all Russian activities on Svalbard will be financed through subsidies to Arktikugol. Arktikugol continued to reduce its welfare level: employees' wages were cut, free food was withdrawn and the barn closed. A group of workers went on strike, just to be sent home by the first ship. In 2004 two men in Barentsburg were apprehended for manslaughter. The rescue corps in Barentsburg had function as its police, but for the first time the Governor arrived and arrested a Russian subject in Barentsburg.
The Accounts Chamber of Russia published a report in 2005 which was highly critical of the management of Arktikugol. Large sums of money could not be accounted for, government instructions and plans had not been implemented and the Russian presence had not been managed in a suitable way, especially related to diversification. The company did not have an auditor, had an unaccounted for account in the bank in Longyearbyen and did not keep books for its tourist revenue. The infrastructure was dilapidated, the subsidies per produced tonne of coal were increasing rapidly and 17.5 percent of all man-hours were being used on resolving accidents. A delegation was dispatched in March 2006, followed by two more that year. In January 2006 a fire started in one of the seams. Proper extinction was not carried out and was estimated to be able to burn for years or even decades, halting production. At the same time the issue was straining the relationship with Norway and the Governor.
The company's management was replaced in late 2006 and the state grants were given for fire fighting equipment to quench the political embarrassment. Within six months the fire was extinguished. The new management also announced plans to invest in new infrastructure, including a shopping mall equaling that in Longyearbyen. A small group of employees were moved to Pyramiden in 2007 to keep it maintained and clean it up, including the construction of a dam to keep a river from flooding the town. A total renovation of the power station started the same year. A new management was appointed in 2008. From that year a series of safety and environment requirements investments were made, largely to comply with Norwegian standards. However, on 30 March a Mi-8 crashed at Heerodden, killing three. Two months later a fire broke out and killed three miners. Caused by faulty technical conditions, the fire was not extinguished until it had been filled with water—a process that took a year.
Operations
Over its history, Arktikugol has mined more than 22 million tonnes of coal. In 2006, Arktikugol produced 120,000 tonnes of coal per year. The company has operated at a deficit since the 1990s. Observers including Øyvind Nordsletten, the former Norwegian ambassador to Russia, have theorized that the Russian government continues funding its operations in order to maintain a foothold in the Arctic, not out of an actual need for Svalbard's resources.
Incidents
In 1989, five people were killed in an explosion at the Barentsburg mine. On 18 September 1997, 23 Russian and Ukrainian miners were killed in an explosion at the Barentsburg mine. This was the most serious mining accident ever on Norwegian soil. In April 2008, two people died in the fire at the Barentsburg mine.
On 17 October 2006 Norwegian inspectors detected an underground, smoldering fire in Barentsburg, prompting fears that an open fire might break out, which would have forced the evacuation of all of Barentsburg for an indefinite period of time, and also caused unknown environmental problems for the entire archipelago.
References
Bibliography
External links
Coal companies of Norway
Coal companies of Russia
Mining in Svalbard
Companies based in Svalbard
Energy companies established in 1931
Non-renewable resource companies established in 1931
1931 establishments in the Soviet Union
1931 establishments in Norway
Mining companies of the Soviet Union
Energy in the Soviet Union
Barentsburg
Pyramiden
Norway–Soviet Union relations
Companies based in Moscow
Federal State Unitary Enterprises of Russia
|
The Pabst Mine disaster was an incident that occurred on September 24, 1926, at the Pabst Iron Mine in Ironwood, Michigan, United States, when a mine shaft containing 46 iron ore miners unexpectedly collapsed. Three miners were killed in the initial collapse, while 43 survivors were left trapped for 129 hours. The subsequent rescue of the trapped miners, with the last miner removed from the rubble at 11.22p.m. on the fifth day, made national headlines in the United States.
Background
The Pabst mine was named after the Milwaukee brewer Frederick Pabst, who owned the mining lease briefly in the late 19th century. It passed through a number of corporate owners before being purchased by the Oliver Iron Mining Company, which became a subsidiary of the United States Steel Corporation in 1901. Three years later, the company added another shaft to the mine, named "G" shaft, which would become one of their most productive. This new shaft was dug on a sixty-four degree incline towards the north, and was by 18 feet 8 inches. It descended nearly through quartz slate and, for safety, its walls were lined with concrete and wood planks held in place with steel. The mine elevator that was installed on rails along one of its walls could travel as fast as per minute.
The area around Ironwood, Michigan had received significant rainfall throughout September 1926. A source claims that as much as 11 inches of rain fell prior to the mine disaster on September 24. The rains were so intense that the county fair closed early, a local river flooded, high school football games were canceled, and work came to a halt on local building projects. Some of this rain would likely have run down the mine shaft and seeped into cracks along its length.
After the accident, mine employees claimed that there had been a series of problems with the shaft before the collapse. On a number of occasions the shaft walls bowed out due to settling in the rock, bending the rails upon which the mine elevator rode. When this happened, the elevator would derail, damaging the steel sets that held the concrete and wood planks lining the walls. Repairs would quickly be done, and the shaft would again enter operation.
Collapse
On September 24, 1926, 43 men were inside the mine, and three electricians began traveling down the shaft in the elevator. Sources disagree whether it was a failure of the elevator or the result of falling rock, but in either case the elevator fell down the shaft, killing its three occupants. A rock fall then sealed the shaft above the eighth level of the mine, trapping 40 miners there, two on the 13th and another on the 18th.
The miners, now trapped and unsure when and if help would arrive, attempted to ration the remaining food from their lunches. However, the food ran out before the second day, and the only nourishment they had left was tea they made from birch bark scraped from the wooden planks lining the mine walls and heated with the miners' carbide lamps.
Rescue
Soon after the collapse, a miner named Alfred Maki descended the shaft and heard signals from the men trapped inside. Over the next five days, rescuers began digging from the neighboring "H" shaft to try to reach the trapped miners. They descended first to nearly the bottom of "H" shaft, where a tunnel connected the two shafts, and then began working their way up the ladderway of "G" shaft. On the fifth day, they were able to reach the trapped miners. According to news reports, the first rescuer to reach them asked what they wanted most, and when they replied that they wanted tobacco, he supplied them with a cigar.
When news reached Ironwood that the miners had been found, much of the population rushed to the mine, including families of the trapped miners. As many as 5,000 people were waiting at the top of the shaft when the miners came in small groups up the elevator in "H" shaft. The miners, who had been trapped in the mine for 129 hours, were transported to a local hospital before being released. The story of the rescue made newspaper headlines across the country.
Commemoration
Residents of the area have established an organization to advocate for the establishment of a Miners Memorial Heritage Park. This organization continues to honor the memory of the mine disaster.
Notes
History of Michigan
1926 in Michigan
Gogebic County, Michigan
Mining disasters in the United States
Mining in Michigan
1926 mining disasters
1926 disasters in the United States
|
Timothy G. Dang (born August 4, 1958) is an American actor and theatre director originally from Hawaii of Asian origin. He served as the artistic director at the Asian American theatre company, East West Players (EWP), in Little Tokyo, Los Angeles, California until 2016.
Early life and education
Dang was born on August 4, 1958, in Honolulu, Hawaii to Peter You Fu and Eloise Yuk ( Ung) Dang. Of Chinese American descent, his father was an accountant at Shell Oil and his mother was a clerk for the local District Court of Honolulu. Tim had four older siblings: Peter, Stephen, Edwin, and Kathleen. Peter Dang died in January 1971 when Tim was 12.
Tim Dang attended St. Patrick School, a Catholic parochial school in Honolulu. Music and theatre were a large part of student life, and helped Dang to express himself. He then attended Saint Louis School, a college preparatory institution for boys. He was an excellent student, and was taking classes at the University of Hawaii while still in high school. Although he intended to major in math or science in college, Dang was more attracted to the theatre as a high school student. Although the expense was significant, his mother paid for him to take dancing, piano, and singing lessons so he could advance his dreams of being on stage.
Encouraged by his oldest brother, Peter, to attend a mainland college, Tim enrolled at the University of Southern California in the fall of 1976. A financial aid package covered most of his expenses. His first role in college was as a dancer in a production of Follies, and he was frequently cast in leading roles in plays at USC.
When he was a senior, Jack Rowe, a professor (and later associate dean and director of the BFA Acting program) at the USC School of Dramatic Arts, warned him that mainland film, television, and theatrical productions were not very inclusive, and he would have a tough time making a living as an actor. Rowe encouraged him to find work with the East West Players.
Tim Dang graduated with a bachelor of Fine Arts degree in theatre in 1980.
Career
After graduation, Dang became a member of East West Players. He paid $35 a month in dues, which allowed him to take acting classes with the troupe's founders and permitted him to audition for EWP productions. He waited table and appeared in television commercials to earn a living.
He became artistic director in 1993, succeeding Nobu McCarthy, guiding the company's transition from a small theatre company producing Equity 99-seat shows, to a mid-sized company in a 240-seat house in 1995. As a director, he has mounted productions at Singapore Repertory Theatre, Asian American Theater Company in San Francisco, Mark Taper Forum New Works Festival, Celebration Theatre, West Coast Ensemble, and the Perseverance Theatre in Juneau, Alaska. He has won numerous awards for directing and performing, including two Ovation Awards. He has served on the board of LA Stage Alliance.
In 2019, Dang was awarded the Visionary Award at EWP's annual gala for his contributions toward furthering API visibility in the industry.
Personal life
Even though Asians and Pacific Islanders make up the majority of the population in Hawaii, Dang saw very few Asian actors on film or television as a child. Seeing George Takei play Mr. Sulu on Star Trek impressed him, as Takei was one of the very few actors of Asian descent on TV. Dang later said that Takei became the role model for him and inspired his acting career.
Dang is married to Darrel Cummings, retired chief of staff at the Los Angeles LGBT Center.
Dang and Cummings have been important supporters of actor Wilson Cruz. When work was scarce for Cruz in 2002, Cummings (then with the National Gay & Lesbian Task Force) hired him to give him an income. During another lull in his career, Dang and Cummings took Cruz into their home. "You put a roof over my head, fed me, you kept me safe, in an act of generosity that I promise you I will never forget," Cruz said in 2022.
Filmography
References
External links
American male stage actors
American male television actors
American male voice actors
American gay actors
LGBT people from Hawaii
LGBT actors
American dramatists and playwrights of Chinese descent
American theatre directors of Chinese descent
USC School of Dramatic Arts alumni
Living people
Place of birth missing (living people)
1958 births
|
Kate Atkinson (born 28 June 1972) is an Australian film, television and theatre actress. She is best known for her roles on television series SeaChange as police officer Karen Miller and Offspring as Renee. From 2013 to 2021 she appeared in a regular role in Wentworth as Deputy Governor (later Governor) Vera Bennett.
Atkinson has also had regular roles in the television series Fat Cow Motel, Blue Heelers, The Cooks and Kath & Kim. Film roles include Japanese Story, The Hard Word and The Jammed.
Biography
Atkinson was born in Kalgoorlie, Western Australia, on 28 June 1972 to an English mother and Tasmanian father. She was raised in Perth, Western Australia. She studied English at Curtin University in Perth from 1990 to 1993, earning a BA with a double major in theatre and film and television.
Atkinson appeared in long running drama Wentworth as Vera Bennett from series 1 to the finale in 2021. She reprised the role in 2020 when the series returned to production for series 8. Atkinson appeared in 100 episodes of the show and was a part of the "100 club", alongside co-stars Jacquie Brennan, Katrina Milosevic and Robbie Magasiva. Atkinson revealed in 2021 that she had planned to walk away from acting before she was offered her role in Wentworth.
Atkinson appeared in Underbelly: Vanishing Act as con woman Melissa Caddick. She was cast in the role as Caddick's story was of high public interest at the time. The mini series, which aired over two nights, told the story of Caddick's disappearance. After the show went to air Atkinson said "There was still a lot of hurt" for the victims of Caddick's crimes.
In 2022 Atkinson appeared at the "Wentworth Con" fan convention in Melbourne alongside many others in the Wentworth cast and also appeared frequently for events in the UK.
Filmography
Film
Television
References
External links
Kate Atkinson at Sue Barnett & Associates
Australian film actresses
Australian stage actresses
Australian television actresses
Living people
1972 births
Actresses from Perth, Western Australia
People from Kalgoorlie
20th-century Australian actresses
21st-century Australian actresses
Curtin University alumni
|
```c
/*
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* You should have received a copy of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* X-Face common data and utilities definition.
*/
#include "libavutil/avassert.h"
#include "xface.h"
void ff_big_add(BigInt *b, uint8_t a)
{
int i;
uint8_t *w;
uint16_t c;
a &= XFACE_WORDMASK;
if (a == 0)
return;
w = b->words;
c = a;
for (i = 0; i < b->nb_words && c; i++) {
c += *w;
*w++ = c & XFACE_WORDMASK;
c >>= XFACE_BITSPERWORD;
}
if (i == b->nb_words && c) {
av_assert0(b->nb_words < XFACE_MAX_WORDS);
b->nb_words++;
*w = c & XFACE_WORDMASK;
}
}
void ff_big_div(BigInt *b, uint8_t a, uint8_t *r)
{
int i;
uint8_t *w;
uint16_t c, d;
a &= XFACE_WORDMASK;
if (a == 1 || b->nb_words == 0) {
*r = 0;
return;
}
/* treat this as a == WORDCARRY and just shift everything right a WORD */
if (a == 0) {
i = --b->nb_words;
w = b->words;
*r = *w;
while (i--) {
*w = *(w + 1);
w++;
}
*w = 0;
return;
}
i = b->nb_words;
w = b->words + i;
c = 0;
while (i--) {
c <<= XFACE_BITSPERWORD;
c += *--w;
d = c / (uint16_t)a;
c = c % (uint16_t)a;
*w = d & XFACE_WORDMASK;
}
*r = c;
if (b->words[b->nb_words - 1] == 0)
b->nb_words--;
}
void ff_big_mul(BigInt *b, uint8_t a)
{
int i;
uint8_t *w;
uint16_t c;
a &= XFACE_WORDMASK;
if (a == 1 || b->nb_words == 0)
return;
if (a == 0) {
/* treat this as a == WORDCARRY and just shift everything left a WORD */
av_assert0(b->nb_words < XFACE_MAX_WORDS);
i = b->nb_words++;
w = b->words + i;
while (i--) {
*w = *(w - 1);
w--;
}
*w = 0;
return;
}
i = b->nb_words;
w = b->words;
c = 0;
while (i--) {
c += (uint16_t)*w * (uint16_t)a;
*(w++) = c & XFACE_WORDMASK;
c >>= XFACE_BITSPERWORD;
}
if (c) {
av_assert0(b->nb_words < XFACE_MAX_WORDS);
b->nb_words++;
*w = c & XFACE_WORDMASK;
}
}
const ProbRange ff_xface_probranges_per_level[4][3] = {
// black grey white
{ { 1, 255}, {251, 0}, { 4, 251} }, /* Top of tree almost always grey */
{ { 1, 255}, {200, 0}, { 55, 200} },
{ { 33, 223}, {159, 0}, { 64, 159} },
{ {131, 0}, { 0, 0}, {125, 131} }, /* Grey disallowed at bottom */
};
const ProbRange ff_xface_probranges_2x2[16] = {
{ 0, 0}, {38, 0}, {38, 38}, {13, 152},
{38, 76}, {13, 165}, {13, 178}, { 6, 230},
{38, 114}, {13, 191}, {13, 204}, { 6, 236},
{13, 217}, { 6, 242}, { 5, 248}, { 3, 253},
};
/*
* The "guess the next pixel" tables follow. Normally there are 12
* neighbour pixels used to give 1<<12 cases as we get closer to the
* upper left corner lesser numbers of neighbours are available.
*
* Each byte in the tables represents 8 boolean values starting from
* the most significant bit.
*/
static const uint8_t g_00[] = {
0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0xe3, 0xdf, 0x05, 0x17,
0x05, 0x0f, 0x00, 0x1b, 0x0f, 0xdf, 0x00, 0x04, 0x00, 0x00,
0x0d, 0x0f, 0x03, 0x7f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1d,
0x45, 0x2f, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x0a, 0xff, 0xff,
0x00, 0x04, 0x00, 0x05, 0x01, 0x3f, 0xcf, 0xff, 0x10, 0x01,
0x80, 0xc9, 0x0f, 0x0f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
0x1b, 0x1f, 0xff, 0xff, 0x4f, 0x54, 0x07, 0x1f, 0x57, 0x47,
0xd7, 0x3d, 0xff, 0xff, 0x5f, 0x1f, 0x7f, 0xff, 0x7f, 0x7f,
0x05, 0x0f, 0x01, 0x0f, 0x0f, 0x5f, 0x9b, 0xdf, 0x7f, 0xff,
0x5f, 0x1d, 0x5f, 0xff, 0x0f, 0x1f, 0x0f, 0x5f, 0x03, 0x1f,
0x4f, 0x5f, 0xf7, 0x7f, 0x7f, 0xff, 0x0d, 0x0f, 0xfb, 0xff,
0xf7, 0xbf, 0x0f, 0x4f, 0xd7, 0x3f, 0x4f, 0x7f, 0xff, 0xff,
0x67, 0xbf, 0x56, 0x25, 0x1f, 0x7f, 0x9f, 0xff, 0x00, 0x00,
0x00, 0x05, 0x5f, 0x7f, 0x01, 0xdf, 0x14, 0x00, 0x05, 0x0f,
0x07, 0xa2, 0x09, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x5f,
0x18, 0xd7, 0x94, 0x71, 0x00, 0x05, 0x1f, 0xb7, 0x0c, 0x07,
0x0f, 0x0f, 0x00, 0x0f, 0x0f, 0x1f, 0x84, 0x8f, 0x05, 0x15,
0x05, 0x0f, 0x4f, 0xff, 0x87, 0xdf, 0x05, 0x01, 0x10, 0x00,
0x0f, 0x0f, 0x00, 0x08, 0x05, 0x04, 0x04, 0x01, 0x4f, 0xff,
0x9f, 0x8f, 0x4a, 0x40, 0x5f, 0x5f, 0xff, 0xfe, 0xdf, 0xff,
0x7f, 0xf7, 0xff, 0x7f, 0xff, 0xff, 0x7b, 0xff, 0x0f, 0xfd,
0xd7, 0x5f, 0x4f, 0x7f, 0x7f, 0xdf, 0xff, 0xff, 0xff, 0xff,
0xff, 0x77, 0xdf, 0x7f, 0x4f, 0xef, 0xff, 0xff, 0x77, 0xff,
0xff, 0xff, 0x6f, 0xff, 0x0f, 0x4f, 0xff, 0xff, 0x9d, 0xff,
0x0f, 0xef, 0xff, 0xdf, 0x6f, 0xff, 0xff, 0xff, 0x4f, 0xff,
0xcd, 0x0f, 0x4f, 0xff, 0xff, 0xdf, 0x00, 0x00, 0x00, 0x0b,
0x05, 0x02, 0x02, 0x0f, 0x04, 0x00, 0x00, 0x0c, 0x01, 0x06,
0x00, 0x0f, 0x20, 0x03, 0x00, 0x00, 0x05, 0x0f, 0x40, 0x08,
0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x0c, 0x0f, 0x01, 0x00,
0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x14, 0x01, 0x05,
0x01, 0x15, 0xaf, 0x0f, 0x00, 0x01, 0x10, 0x00, 0x08, 0x00,
0x46, 0x0c, 0x20, 0x00, 0x88, 0x00, 0x0f, 0x15, 0xff, 0xdf,
0x02, 0x00, 0x00, 0x0f, 0x7f, 0x5f, 0xdb, 0xff, 0x4f, 0x3e,
0x05, 0x0f, 0x7f, 0xf7, 0x95, 0x4f, 0x0d, 0x0f, 0x01, 0x0f,
0x4f, 0x5f, 0x9f, 0xdf, 0x25, 0x0e, 0x0d, 0x0d, 0x4f, 0x7f,
0x8f, 0x0f, 0x0f, 0xfa, 0x04, 0x4f, 0x4f, 0xff, 0xf7, 0x77,
0x47, 0xed, 0x05, 0x0f, 0xff, 0xff, 0xdf, 0xff, 0x4f, 0x6f,
0xd8, 0x5f, 0x0f, 0x7f, 0xdf, 0x5f, 0x07, 0x0f, 0x94, 0x0d,
0x1f, 0xff, 0xff, 0xff, 0x00, 0x02, 0x00, 0x03, 0x46, 0x57,
0x01, 0x0d, 0x01, 0x08, 0x01, 0x0f, 0x47, 0x6c, 0x0d, 0x0f,
0x02, 0x00, 0x00, 0x00, 0x0b, 0x4f, 0x00, 0x08, 0x05, 0x00,
0x95, 0x01, 0x0f, 0x7f, 0x0c, 0x0f, 0x01, 0x0e, 0x00, 0x00,
0x0f, 0x41, 0x00, 0x00, 0x04, 0x24, 0x0d, 0x0f, 0x0f, 0x7f,
0xcf, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00,
0x06, 0x26, 0xcf, 0x05, 0xcf, 0x7f, 0xdf, 0xdf, 0x00, 0x00,
0x17, 0x5f, 0xff, 0xfd, 0xff, 0xff, 0x46, 0x09, 0x4f, 0x5f,
0x7f, 0xfd, 0xdf, 0xff, 0x0a, 0x88, 0xa7, 0x7f, 0x7f, 0xff,
0xff, 0xff, 0x0f, 0x04, 0xdf, 0x7f, 0x4f, 0xff, 0x9f, 0xff,
0x0e, 0xe6, 0xdf, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x0f, 0xec,
0x8f, 0x4f, 0x7f, 0xff, 0xdf, 0xff, 0x0f, 0xcf, 0xdf, 0xff,
0x6f, 0x7f, 0xff, 0xff, 0x03, 0x0c, 0x9d, 0x0f, 0x7f, 0xff,
0xff, 0xff,
};
static const uint8_t g_01[] = {
0x37, 0x73, 0x00, 0x19, 0x57, 0x7f, 0xf5, 0xfb, 0x70, 0x33,
0xf0, 0xf9, 0x7f, 0xff, 0xff, 0xff,
};
static const uint8_t g_02[] = {
0x50,
};
static const uint8_t g_10[] = {
0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0xf3, 0x5f, 0x84, 0x04,
0x17, 0x9f, 0x04, 0x23, 0x05, 0xff, 0x00, 0x00, 0x00, 0x02,
0x03, 0x03, 0x33, 0xd7, 0x05, 0x03, 0x5f, 0x3f, 0x17, 0x33,
0xff, 0xff, 0x00, 0x80, 0x02, 0x04, 0x12, 0x00, 0x11, 0x57,
0x05, 0x25, 0x05, 0x03, 0x35, 0xbf, 0x9f, 0xff, 0x07, 0x6f,
0x20, 0x40, 0x17, 0x06, 0xfa, 0xe8, 0x01, 0x07, 0x1f, 0x9f,
0x1f, 0xff, 0xff, 0xff,
};
static const uint8_t g_20[] = {
0x04, 0x00, 0x01, 0x01, 0x43, 0x2e, 0xff, 0x3f,
};
static const uint8_t g_30[] = {
0x11, 0x11, 0x11, 0x11, 0x51, 0x11, 0x13, 0x11, 0x11, 0x11,
0x13, 0x11, 0x11, 0x11, 0x33, 0x11, 0x13, 0x11, 0x13, 0x13,
0x13, 0x13, 0x31, 0x31, 0x11, 0x01, 0x11, 0x11, 0x71, 0x11,
0x11, 0x75,
};
static const uint8_t g_40[] = {
0x00, 0x0f, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x0d, 0x00, 0x0f,
0x00, 0x4e, 0xe4, 0x0d, 0x10, 0x0f, 0x00, 0x0f, 0x44, 0x4f,
0x00, 0x1e, 0x0f, 0x0f, 0xae, 0xaf, 0x45, 0x7f, 0xef, 0xff,
0x0f, 0xff, 0x00, 0x09, 0x01, 0x11, 0x00, 0x01, 0x1c, 0xdd,
0x00, 0x15, 0x00, 0xff, 0x00, 0x10, 0x00, 0xfd, 0x00, 0x0f,
0x4f, 0x5f, 0x3d, 0xff, 0xff, 0xff, 0x4f, 0xff, 0x1c, 0xff,
0xdf, 0xff, 0x8f, 0xff, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x15,
0x01, 0x07, 0x00, 0x01, 0x02, 0x1f, 0x01, 0x11, 0x05, 0x7f,
0x00, 0x1f, 0x41, 0x57, 0x1f, 0xff, 0x05, 0x77, 0x0d, 0x5f,
0x4d, 0xff, 0x4f, 0xff, 0x0f, 0xff, 0x00, 0x00, 0x02, 0x05,
0x00, 0x11, 0x05, 0x7d, 0x10, 0x15, 0x2f, 0xff, 0x40, 0x50,
0x0d, 0xfd, 0x04, 0x0f, 0x07, 0x1f, 0x07, 0x7f, 0x0f, 0xbf,
0x0d, 0x7f, 0x0f, 0xff, 0x4d, 0x7d, 0x0f, 0xff,
};
static const uint8_t g_11[] = {
0x01, 0x13, 0x03, 0x7f,
};
static const uint8_t g_21[] = {
0x17,
};
static const uint8_t g_31[] = {
0x55, 0x57, 0x57, 0x7f,
};
static const uint8_t g_41[] = {
0x01, 0x01, 0x01, 0x1f, 0x03, 0x1f, 0x3f, 0xff,
};
static const uint8_t g_12[] = {
0x40,
};
static const uint8_t g_22[] = {
0x00,
};
static const uint8_t g_32[] = {
0x10,
};
static const uint8_t g_42[] = {
0x10,
};
void ff_xface_generate_face(uint8_t *dst, uint8_t * const src)
{
int h, i, j, k, l, m;
for (j = 0; j < XFACE_HEIGHT; j++) {
for (i = 0; i < XFACE_WIDTH; i++) {
h = i + j * XFACE_WIDTH;
k = 0;
/*
Compute k, encoding the bits *before* the current one, contained in the
image buffer. That is, given the grid:
l i
| |
v v
+--+--+--+--+--+
m -> | 1| 2| 3| 4| 5|
+--+--+--+--+--+
| 6| 7| 8| 9|10|
+--+--+--+--+--+
j -> |11|12| *| | |
+--+--+--+--+--+
the value k for the pixel marked as "*" will contain the bit encoding of
the values in the matrix marked from "1" to "12". In case the pixel is
near the border of the grid, the number of values contained within the
grid will be lesser than 12.
*/
for (l = i - 2; l <= i + 2; l++) {
for (m = j - 2; m <= j; m++) {
if (l >= i && m == j)
continue;
if (l > 0 && l <= XFACE_WIDTH && m > 0)
k = 2*k + src[l + m * XFACE_WIDTH];
}
}
/*
Use the guess for the given position and the computed value of k.
The following table shows the number of digits in k, depending on
the position of the pixel, and shows the corresponding guess table
to use:
i=1 i=2 i=3 i=w-1 i=w
+----+----+----+ ... +----+----+
j=1 | 0 | 1 | 2 | | 2 | 2 |
|g22 |g12 |g02 | |g42 |g32 |
+----+----+----+ ... +----+----+
j=2 | 3 | 5 | 7 | | 6 | 5 |
|g21 |g11 |g01 | |g41 |g31 |
+----+----+----+ ... +----+----+
j=3 | 5 | 9 | 12 | | 10 | 8 |
|g20 |g10 |g00 | |g40 |g30 |
+----+----+----+ ... +----+----+
*/
#define GEN(table) dst[h] ^= (table[k>>3]>>(7-(k&7)))&1
switch (i) {
case 1:
switch (j) {
case 1: GEN(g_22); break;
case 2: GEN(g_21); break;
default: GEN(g_20); break;
}
break;
case 2:
switch (j) {
case 1: GEN(g_12); break;
case 2: GEN(g_11); break;
default: GEN(g_10); break;
}
break;
case XFACE_WIDTH - 1:
switch (j) {
case 1: GEN(g_42); break;
case 2: GEN(g_41); break;
default: GEN(g_40); break;
}
break;
case XFACE_WIDTH:
switch (j) {
case 1: GEN(g_32); break;
case 2: GEN(g_31); break;
default: GEN(g_30); break;
}
break;
default:
switch (j) {
case 1: GEN(g_02); break;
case 2: GEN(g_01); break;
default: GEN(g_00); break;
}
break;
}
}
}
}
```
|
```smalltalk
"
I am a Null object representing the absence of a Keymap.
"
Class {
#name : 'KMNoKeymap',
#superclass : 'Object',
#category : 'Keymapping-Core-Base',
#package : 'Keymapping-Core',
#tag : 'Base'
}
```
|
```viml
" vim-airline template by chartoin (path_to_url
" Base 16 Oceanic Next Scheme by Chris Kempson (path_to_url
let g:airline#themes#base16_oceanicnext#palette = {}
let s:gui00 = "#1b2b34"
let s:gui01 = "#343d46"
let s:gui02 = "#4f5b66"
let s:gui03 = "#65737e"
let s:gui04 = "#a7adba"
let s:gui05 = "#c0c5ce"
let s:gui06 = "#cdd3de"
let s:gui07 = "#d8dee9"
let s:gui08 = "#ec5f67"
let s:gui09 = "#f99157"
let s:gui0A = "#fac863"
let s:gui0B = "#99c794"
let s:gui0C = "#5fb3b3"
let s:gui0D = "#6699cc"
let s:gui0E = "#c594c5"
let s:gui0F = "#ab7967"
" Terminal color definitions
let s:cterm00 = 00
let s:cterm03 = 08
let s:cterm05 = 07
let s:cterm07 = 15
let s:cterm08 = 01
let s:cterm0A = 03
let s:cterm0B = 02
let s:cterm0C = 06
let s:cterm0D = 04
let s:cterm0E = 05
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = 18
let s:cterm02 = 19
let s:cterm04 = 20
let s:cterm06 = 21
let s:cterm09 = 16
let s:cterm0F = 17
else
let s:cterm01 = 10
let s:cterm02 = 11
let s:cterm04 = 12
let s:cterm06 = 13
let s:cterm09 = 09
let s:cterm0F = 14
endif
let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ]
let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ]
let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ]
let g:airline#themes#base16_oceanicnext#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ]
let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ]
let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ]
let g:airline#themes#base16_oceanicnext#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ]
let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ]
let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ]
let g:airline#themes#base16_oceanicnext#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ]
let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ]
let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ]
let g:airline#themes#base16_oceanicnext#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]
let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]
let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]
let g:airline#themes#base16_oceanicnext#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp
" variable so that related functionality is loaded iff the user is using
" ctrlp. Note that this is optional, and if you do not define ctrlp colors
" they will be chosen automatically from the existing palette.
if !get(g:, 'loaded_ctrlp', 0)
finish
endif
let g:airline#themes#base16_oceanicnext#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(
\ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ],
\ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ],
\ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ])
```
|
Amy Elizabeth Freeze (born June 19, 1974) is an American television meteorologist. She is currently a co-anchor of Weather Command on Fox Weather.
She was the weekend meteorologist at WABC-TV in New York City, New York. She has filled in on ABC's Good Morning America.
Freeze was the first female Chief Meteorologist in Chicago, Illinois, for Fox owned-and-operated station WFLD in Chicago, serving from 2007 to 2011.
Early life and education
Born in Utah and raised in Indiana, Freeze is the first of five daughters born to Bill and Linda Freeze.
She graduated from Jeffersonville High School in Jeffersonville, Indiana, in 1992. She earned a Bachelor of Arts degree in Communications from Brigham Young University, in Provo, Utah, in 1995. Freeze also received Bachelor of Science degree in Geosciences from Mississippi State University in Starkville, Mississippi, She has a master's degree from the University of Pennsylvania in Philadelphia, Pennsylvania. Her thesis was creation of "the Storm Water Action Alert Program," dealing with major cities and combined sewer overflows.
Career
Before joining WFLD, Freeze worked for NBC's WCAU in Philadelphia as a meteorologist and co-Host of 10, a live entertainment show on NBC10. During that time she also worked at Rockefeller Center in New York City as a substitute for NBC's Weekend Today and MSNBC. Freeze worked in Denver, Colorado, at both KWGN and KMGH. She began her broadcasting career in Portland, Oregon, at KPTV on Good Day Oregon.
Freeze had a cameo appearance in the episode "My Life in Four Cameras" (2005) of the comedy-drama television series Scrubs (2001–2010). Her name has been featured in the American quiz show “Jeopardy” in two different categories.
She uses digital photos from viewers sent in via Twitter, Facebook and email that capture the weather, including them in her forecasts as "Freeze Frame," "Super Cat Saturday" and "Big Dog Sunday." She created "The Freeze Factor" a special segment where she rates the next day's weather on a scale of one to 10. Freeze was named Top Forecaster in New York 2017 by NJ.com.
During her time in Chicago, Freeze visited more than 10,000 area students each year giving weather presentations on tornadoes and other severe weather. She hosted the first ever Weather Education Days for MLB's Chicago White Sox, the Chicago Cubs, and for the Chicago Wolves hockey team. Freeze was the first-ever female sideline reporter for Major League Soccer working for the Colorado Rapids, LA Galaxy, and the Chicago Fire. She also worked on the sidelines for the NFL Chicago Bears for four seasons.
Freeze has certificate number 111 from the American Meteorological Society as a Certified Broadcast Meteorologist she was one of the first 20 women in the world to receive this certification. In addition, Freeze has her National Weather Association and American Meteorological Society Seals of Approval. She is a 5-time National Academy of Television Arts and Sciences Emmy Award winner.
Freeze is a runner who has completed nine marathons; she has climbed to the summit of Mount Snowdon in Wales, all seven peaks of Mount Fuji, and the summit of Mount Timpanogos. Freeze surfs and she is also a certified scuba diver.
On October 6, 2021, Fox News Media announced that Freeze is joining Fox Weather as their anchor.
In January 2023, it was announced that Fox Weather was debuting a new day time and evening lineup. Freeze was named anchor of Weather Command from 9am—12pm.
Personal life
Freeze has 4 children. She resides in Manhattan. Freeze has been divorced from Gary Arbuckle since 2016.
References
External links
Place of birth missing (living people)
1974 births
Latter Day Saints from Indiana
Brigham Young University alumni
Television meteorologists from Chicago
Mississippi State University alumni
Living people
Television meteorologists in New York City
News & Documentary Emmy Award winners
Television anchors from Philadelphia
Philadelphia television reporters
Mass media people from Denver
People from Jeffersonville, Indiana
People from the Upper West Side
Television personalities from Portland, Oregon
Latter Day Saints from Utah
University of Pennsylvania alumni
American women television personalities
Women meteorologists
Latter Day Saints from Mississippi
Latter Day Saints from Pennsylvania
Latter Day Saints from Oregon
Latter Day Saints from Colorado
Latter Day Saints from Illinois
Latter Day Saints from New York (state)
Scientists from New York (state)
American Broadcasting Company people
American female marathon runners
Fox News people
|
```java
package com.eveningoutpost.dexdrip.cgm.sharefollow;
import com.google.gson.annotations.Expose;
/**
* jamorham
* <p>
* Class to model the parameters required in the authentication json
*/
public class ShareLoginBody {
@Expose
public String applicationId;
@Expose
public String accountId;
@Expose
public String password;
ShareLoginBody(final String password, final String accountId) {
this.applicationId = ShareConstants.APPLICATION_ID;
this.accountId = accountId;
this.password = password;
}
}
```
|
Dracunculiasis, also called Guinea-worm disease, is a parasitic infection by the Guinea worm, Dracunculus medinensis. A person typically becomes infected by drinking water containing water fleas infected with guinea worm larvae. The larvae penetrate the digestive tract and escape into the body where the females and males mate. Around a year later, the adult female migrates to an exit site – usually a lower limb – and induces an intensely painful blister on the skin. The blister eventually bursts to form an intensely painful wound, out of which the worm slowly crawls over several weeks. The wound remains painful throughout the worm's emergence, disabling the infected person for the three to ten weeks it takes the worm to emerge. During this time, the open wound can become infected with bacteria, leading to death in around 1% of cases.
There is no known antihelminthic agent to expel the Guinea worm. Instead, the mainstay of treatment is the careful wrapping of the emerging worm around a small stick or gauze to encourage its exit. Each day, a few more centimeters of the worm emerge, and the stick is turned to maintain gentle tension. Too much tension can break and kill the worm in the wound, causing severe pain and swelling at the ulcer site. Dracunculiasis is a disease of extreme poverty, occurring in places with poor access to clean drinking water. Prevention efforts center on filtering drinking water to remove water fleas, as well as public education campaigns to discourage people from soaking their emerging worms in sources of drinking water.
Humans have had dracunculiasis since at least 1,000 BCE, and accounts consistent with dracunculiasis appear in surviving documents from physicians of antiquity. In the 19th and early 20th centuries, dracunculiasis was widespread across much of Africa and South Asia, affecting as many as 48 million people per year. The effort to eradicate dracunculiasis began in the 1980s following the successful eradication of smallpox. By 1995, every country with endemic dracunculiasis had established a national eradication program. In the ensuing years, dracunculiasis cases have dropped precipitously, with only a few dozen annual cases worldwide since 2015. Fifteen previously endemic countries have been certified to have eradicated dracunculiasis, leaving the disease endemic in just four countries: Chad, Ethiopia, Mali, and South Sudan. A record low 13 cases of dracunculiasis were reported worldwide in 2022. If the eradication program succeeds, dracunculiasis will become the second human disease known to have been eradicated, after smallpox.
Signs and symptoms
The first signs of dracunculiasis occur around a year after infection, as the full-grown female worm prepares to leave the infected person's body. As the worm migrates to its exit site – typically the lower leg, though they can emerge anywhere on the body – some people have allergic reactions, including hives, fever, dizziness, nausea, vomiting, and diarrhea. Upon reaching its destination, the worm forms a fluid-filled blister under the skin. Over 1–3 days, the blister grows larger, begins to cause severe burning pain, and eventually bursts leaving a small open wound. The wound remains intensely painful as the worm slowly emerges over several weeks to months.
In an attempt to alleviate the excruciating burning pain, the host will nearly always attempt to submerge the affected body part in water. When the worm is exposed to water, it spews a white substance containing thousands of larvae. As the worm emerges, the open blister often becomes infected with bacteria, resulting in redness and swelling, the formation of abscesses, or in severe cases gangrene, sepsis or lockjaw. When the secondary infection is near a joint (typically the ankle), the damage to the joint can result in stiffness, arthritis, or contractures.
Infected people commonly harbor multiple worms – with an average 1.8 worms per person; up to 40 at a time – which will emerge from separate blisters at the same time. 90% of worms emerge from the legs or feet. However, worms can emerge from anywhere on the body.
Cause
Dracunculiasis is caused by infection with the roundworm Dracunculus medinensis. D. medinensis larvae reside within small aquatic crustaceans called copepods or water fleas. When humans drink the water, they can unintentionally ingest infected copepods. During digestion the copepods die, releasing the D. medinensis larvae. The larvae exit the digestive tract by penetrating the stomach and intestine, taking refuge in the abdomen or retroperitoneal space. Over the next two to three months the larvae develop into adult male and female worms. The male remains small at long and wide; the female is comparatively large, often over long and wide. Once the worms reach their adult size they mate, and the male dies. Over the ensuing months, the female migrates to connective tissue or along bones, and continues to develop.
About a year after the initial infection, the female migrates to the skin, forms an ulcer, and emerges. When the wound touches freshwater, the female spews a milky-white substance containing hundreds of thousands of larvae into the water. Over the next several days as the female emerges from the wound, she can continue to discharge larvae into surrounding water. The larvae are eaten by copepods, and after two to three weeks of development, they are infectious to humans again.
Diagnosis
Dracunculiasis is diagnosed by visual examination – the thin white worm emerging from the blister is unique to this disease. Dead worms sometimes calcify and can be seen in the subcutaneous tissue by X-ray.
Treatment
There is no medicine to kill D. medinensis or prevent it from causing disease once within the body. Instead, treatment focuses on slowly and carefully removing the worm from the wound over days to weeks. Once the blister bursts and the worm begins to emerge, the wound is soaked in a bucket of water, allowing the worm to empty itself of larvae away from a source of drinking water. As the first part of the worm emerges, it is typically wrapped around a piece of gauze or a stick to maintain steady tension on the worm, encouraging its exit. Each day, several centimeters of the worm emerge from the blister, and the stick is wound to maintain tension. This is repeated daily until the full worm emerges, typically within a month. If too much pressure is applied at any point, the worm can break and die, leading to severe swelling and pain at the site of the ulcer.
Treatment for dracunculiasis also tends to include regular wound care to avoid infection of the open ulcer while the worm is leaving. The U.S. Centers for Disease Control and Prevention (CDC) recommends cleaning the wound before the worm emerges. Once the worm begins to exit the body, the CDC recommends daily wound care: cleaning the wound, applying antibiotic ointment, and replacing the bandage with fresh gauze. Painkillers like aspirin or ibuprofen can help ease the pain of the worm's exit.
Outcomes
Dracunculiasis is a debilitating disease, causing substantial disability in around half of those infected. People with worms emerging can be disabled for the three to ten weeks it takes the worms to fully emerge. When worms emerge near joints, the inflammation around a dead worm, or infection of the open wound can result in permanent stiffness, pain, or destruction of the joint. Some people with dracunculiasis have continuing pain for 12 to 18 months after the worm has emerged. Around 1% of dracunculiasis cases result in death from secondary infections of the wound.
When dracunculiasis was widespread, it would often affect entire villages at once. Outbreaks occurring during planting and harvesting seasons severely impair a community's agricultural operations – earning dracunculiasis the moniker "empty granary disease" in some places. Communities affected by dracunculiasis also see reduced school attendance as children of affected parents must take over farm or household duties, and affected children may be physically prevented from walking to school for weeks.
Infection does not create immunity, so people can repeatedly experience dracunculiasis throughout their lives.
Prevention
There is no vaccine for dracunculiasis, and once infected with D. medinensis there is no way to prevent the disease from running its full course. Consequently, nearly all effort to reduce the burden of dracunculiasis focuses on preventing the transmission of D. medinensis from person to person. This is primarily accomplished by filtering drinking water to physically remove copepods. Nylon filters, finely woven cloth, or specialized filter straws are all effective means of copepod removal. Sources of drinking water can be treated with the larvicide temephos, which kills copepods, and contaminated water can also be treated via boiling. Where possible, open sources of drinking water are replaced by deep wells that can serve as new sources of clean water. Public education campaigns inform people in affected areas how dracunculiasis spreads and encourage those with the disease to avoid soaking their wounds in bodies of water that are used for drinking.
Epidemiology
Dracunculiasis is nearly eradicated, with just 15 cases reported worldwide in 2021 and 13 in 2022. This is down from 27 cases in 2020, and dramatically less than the estimated 3.5 million annual cases in 20 countries in 1986 – the year the World Health Assembly called for dracunculiasis' eradication. Dracunculiasis remains endemic in just four countries: Chad, Ethiopia, Mali, and South Sudan.
Dracunculiasis is a disease of extreme poverty, occurring in places where there is poor access to clean drinking water. Cases tend to be split roughly equally between males and females, and can occur in all age groups. Within a given place, dracunculiasis risk is linked to occupation; people who farm or fetch drinking water are most likely to be infected.
Cases of dracunculiasis have a seasonal cycle, though the timing varies by location. Along the Sahara desert's southern edge, cases peak during the mid-year rainy season (May–October) when stagnant water sources are more abundant. Along the Gulf of Guinea, cases are more common during the dry season (October–March) when flowing water sources dry up.
History
Dracunculiasis has been with humans for at least 3,000 years, as the remnants of a guinea worm infection have been found in the mummy of a girl entombed in Egypt around 1,000 BCE. Diseases consistent with the effects of dracunculiasis are referenced by writers throughout antiquity. The disease of "fiery serpents" that plagues the Hebrews in the Old Testament (around 1250 BCE) is often attributed to dracunculiasis. Plutarch's Symposiacon refers to a (lost) description of a similar disease by the 2nd century BCE writer Agatharchides concerning a "hitherto unheard of disease" in which "small worms issue from [people's] arms and legs ... insinuating themselves between the muscles [to] give rise to horrible sufferings". Rufus of Ephesus, who lived at the time of Emperor Trajan, is the first medical author to describe the disease, which he claims to have observed in Egypt, and to observe its spread through water: In Arabia there is a disease called ‘Ophis’, which in Greek means tendon (νεῦρον). The animal is thick like a string (of the lyra) and coils in the flesh like a snake, mainly in the thigh and calf regions, although also in other parts of the body. I saw an Arab in Egypt who had this disease, and every time it [the worm] wanted to explode, he felt pain and had fever. The man now had this apparition on his calf, but his servant in the navel region and another woman in the loin region. But when I asked if this disease was common among Arabs, people said that both Arabs and many foreigners who came there and were affected when they drank the water suffered from this disease. Because this is mainly the cause (Quaest. med. 65-69). Many of antiquity's famous physicians also write of diseases consistent with dracunculiasis, including Galen, Rhazes, and Avicenna; though there was some disagreement as to the nature of the disease, with some attributing it to a worm, while others considered it to be a corrupted part of the body emerging. In his 1674 treatise on dracunculiasis, Georg Hieronymous Velschius first proposed that the Rod of Asclepius, a common symbol of the medical profession, depicts a recently extracted guinea worm.
Carl Linnaeus included the guinea worm in his 1758 edition of Systema Naturae, naming it Gordius medinensis. The name medinensis refers to the worm's longstanding association with the city of Medina, with Avicenna writing as early as his The Canon of Medicine (published in 1025) "The disease is commonest at Medina, whence it takes its name". In Johann Friedrich Gmelin's 13th edition of Systema Naturae (1788), he renamed the worm Filaria medinensis, leaving Gordius for free-living worms. Henry Bastian authored the first detailed description of the worm itself, published in 1863. The following year, in his book Entozoa, Thomas Spencer Cobbold used the name Dracunculus medinensis, which was enshrined as the official name by the International Commission on Zoological Nomenclature in 1915. Despite longstanding knowledge that the worm was associated with water, the lifecycle of D. medinensis was the topic of protracted debate. Alexei Pavlovich Fedchenko filled a major gap with his 1870 publication describing that D. medinensis larvae can infect and develop inside Cyclops crustaceans. The next step was shown by Robert Thomson Leiper, who described in a 1907 paper that monkeys fed D. medinensis-infected Cyclops developed mature guinea worms, while monkeys directly fed D. medinensis larvae did not.
In the 19th and 20th centuries, dracunculiasis was widespread across nearly all of Africa and South Asia, though no exact case counts exist from the pre-eradication era. In a 1947 article in the Journal of Parasitology, Norman R. Stoll used rough estimates of populations in endemic areas to suggest that there could be as many as 48 million cases of dracunculiasis per year. In 1976, the WHO estimated the global burden at 10 million cases per year. Ten years later, as the eradication effort was beginning, the WHO estimated 3.5 million cases per year worldwide.
Eradication
The campaign to eradicate dracunculiasis began at the urging of the CDC in 1980. Following smallpox eradication (last case in 1977; eradication certified in 1981), dracunculiasis was considered an achievable eradication target since it was relatively uncommon and preventable with only behavioral changes. In 1981, the steering committee for the United Nations International Drinking Water Supply and Sanitation Decade (a program to improve global drinking water during the decade from 1981 to 1990) adopted the goal of eradicating dracunculiasis as part of their efforts. The following June, an international meeting termed "Workshop on Opportunities for Control of Dracunculiasis" concluded that dracunculiasis could be eradicated through public education, drinking water improvement, and larvicide treatments. In response, India began its national eradication program in 1983. In 1986, the 39th World Health Assembly issued a statement endorsing dracunculiasis eradication and calling on member states to craft eradication plans. The same year, The Carter Center began collaborating with the government of Pakistan to initiate its national program, which then launched in 1988. By 1996, national eradication programs had been launched in every country with endemic dracunculiasis: Ghana and Nigeria in 1989; Cameroon in 1991; Togo, Burkina Faso, Senegal, and Uganda in 1992; Benin, Mauritania, Niger, Mali, and Côte d'Ivoire in 1993; Sudan, Kenya, Chad, and Ethiopia in 1994; Yemen and the Central African Republic in 1995.
Each national eradication program had three phases. The first phase consisted of a nationwide search to identify the extent of dracunculiasis transmission and develop national and regional plans of action. The second phase involved the training and distribution of staff and volunteers to provide public education village-by-village, surveil for cases, and deliver water filters. This continued and evolved as needed until the national burden of disease was very low. Then in a third phase, programs intensified surveillance efforts with the goal of identifying each case within 24 hours of the worm emerging and preventing the person from contaminating drinking water supplies. Most national programs offered voluntary in-patient centers, where those affected could stay and receive food and care until their worms were removed.
In May 1991, the 44th World Health Assembly called for an international certification system to verify dracunculiasis eradication country-by-country. To this end, in 1995 the WHO established the International Commission for the Certification of Dracunculiasis Eradication (ICCDE). Once a country reports zero cases of dracunculiasis for a calendar year, the ICCDE considers that country to have interrupted guinea worm transmission, and is then in the "precertification phase". If the country repeats this feat with zero cases in each of the next three calendar years, the ICCDE sends a team to the country to assess the country's disease surveillance systems and to verify the country's reports. The ICCDE can then formally recommend the WHO Director-General certify a country as free of dracunculiasis.
Since the initiation of the global eradication program, the ICCDE has certified 15 of the original endemic countries as having eradicated dracunculiasis: Pakistan in 1997; India in 2000; Senegal and Yemen in 2004; the Central African Republic and Cameroon in 2007; Benin, Mauritania, and Uganda in 2009; Burkina Faso and Togo in 2011; Côte d'Ivoire, Niger, and Nigeria in 2013; and Ghana in 2015.
Other animals
In addition to humans, D. medinensis can infect dogs. Infections of domestic dogs have been particularly common in Chad, where they helped reignite dracunculiasis transmission in 2010. Dogs are thought to be infected by eating a paratenic host, likely a fish or amphibian. As with humans, prevention efforts have focused on preventing infection by encouraging people in affected areas to bury fish entrails as well as to identify and tie up dogs with emerging worms so that they cannot access drinking water sources until after the worms have emerged. Domestic ferrets can be infected with D. medinensis in laboratory settings, and have been used as an animal disease model for human dracunculiasis.
Different Dracunculus species can infect snakes, turtles, and other mammals. Animal infections are most widespread in snakes, with nine different species of Dracunculus described in snakes in the United States, Brazil, India, Vietnam, Australia, Papua New Guinea, Benin, Madagascar, and Italy. The only other reptile affected is the snapping turtle with infected common snapping turtles described in several U.S. states, and a single infected South American snapping turtle described in Costa Rica. Infections of other mammals are limited to the Americas. Raccoons in the U.S. and Canada are most widely impacted, particularly by D. insignis; however, Dracunculus worms have also been reported in American skunks, coyotes, foxes, opossums, domestic dogs, domestic cats, and (rarely) muskrats and beavers.
Notes
References
Works cited
External links
Nicholas D. Kristof from the New York Times follows a young Sudanese boy with a Guinea Worm parasite infection who is quarantined for treatment as part of the Carter program
Tropical Medicine Central Resource: "Guinea Worm Infection (Dracunculiasis)"
World Health Organization on Dracunculiasis
Infectious diseases with eradication efforts
Helminthiases
Parasitic infestations, stings, and bites of the skin
Rare infectious diseases
Tropical diseases
Waterborne diseases
|
```java
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package org.flowable.engine.test.bpmn.event.error;
import java.io.Serializable;
import java.util.concurrent.Future;
import org.flowable.engine.delegate.BpmnError;
import org.flowable.engine.delegate.JavaDelegate;
import org.flowable.engine.impl.util.CommandContextUtil;
/**
* @author Falko Menge
*/
public class BpmnErrorBean implements Serializable {
private static final long serialVersionUID = 1L;
public void throwBpmnError() {
throw new BpmnError("23", "This is a business fault, which can be caught by a BPMN Error Event.");
}
public Future<?> throwBpmnErrorInFuture() {
return CommandContextUtil.getProcessEngineConfiguration()
.getAsyncTaskInvoker()
.submit(() -> {
throw new BpmnError("23", "This is a business fault, which can be caught by a BPMN Error Event.");
});
}
public void throwComplexBpmnError(String errorCode, String errorMessage, String... additionalData) {
BpmnError error = new BpmnError(errorCode, errorMessage);
if (additionalData.length > 1) {
for (int i = 1; i < additionalData.length; i+=2) {
String key = additionalData[i - 1];
String value = additionalData[i];
error.addAdditionalData(key, value);
}
}
throw error;
}
public JavaDelegate getDelegate() {
return new ThrowBpmnErrorDelegate();
}
}
```
|
```objective-c
/*
*
*/
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "esp_err.h"
#include "soc/soc_caps.h"
#include "soc/periph_defs.h"
#include "hal/modem_clock_types.h"
#include "esp_private/esp_pmu.h"
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
#include "hal/modem_clock_hal.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Enable the clock of modem module
*
* Solve the clock dependency between modem modules, For example, the wifi
* module depends on the wifi mac, wifi baseband and FE, when wifi module
* clock is enabled, the wifi MAC, baseband and FE clocks will be enabled
*
* This interface and modem_clock_module_disable will jointly maintain the
* ref_cnt of each device clock source. The ref_cnt indicates how many modules
* are relying on the clock source. Each enable ops will add 1 to the ref_cnt of
* the clock source that the module depends on, and only when the ref_cnt of
* the module is from 0 to 1 will the clock enable be actually configured.
*
* !!! Do not use the hal/ll layer interface to configure the clock for the
* consistency of the hardware state maintained in the driver and the hardware
* actual state.
*
* @param module modem module
*/
void modem_clock_module_enable(periph_module_t module);
/**
* @brief Disable the clock of modem module
*
* This interface and modem_clock_module_enable will jointly maintain the ref_cnt
* of each device clock source. The ref_cnt indicates how many modules are relying
* on the clock source. Each disable ops will minus 1 to the ref_cnt of the clock
* source that the module depends on, and only when the ref_cnt of the module is
* from 1 to 0 will the clock disable be actually configured.
*
* !!! Do not use the hal/ll layer interface to configure the clock for the
* consistency of the hardware state maintained in the driver and the hardware
* actual state.
*
* @param module modem module
*/
void modem_clock_module_disable(periph_module_t module);
/**
* @brief Reset the mac of modem module
*
* @param module modem module, must be one of
* PERIPH_WIFI_MODULE / PERIPH_BT_MODULE /PERIPH_IEEE802154_MODULE
*/
void modem_clock_module_mac_reset(periph_module_t module);
#if SOC_BLE_USE_WIFI_PWR_CLK_WORKAROUND
/**
* @brief Enable modem clock domain clock gate to gate it's output
*
* @param domain modem module clock domain
* @param mode PMU HP system ACTIVE, MODEM and SLEEP state
*
* @return
* - ESP_OK on success
* - ESP_ERR_INVALID_ARG if the argument value are not correct
*/
esp_err_t modem_clock_domain_clk_gate_enable(modem_clock_domain_t domain, pmu_hp_icg_modem_mode_t mode);
/**
* @brief Disable modem clock domain clock gate to ungate it's output
*
* @param domain modem module clock domain
* @param mode PMU HP system ACTIVE, MODEM and SLEEP state
*
* @return
* - ESP_OK on success
* - ESP_ERR_INVALID_ARG if the argument value are not correct
*/
esp_err_t modem_clock_domain_clk_gate_disable(modem_clock_domain_t domain, pmu_hp_icg_modem_mode_t mode);
#endif
/**
* @brief Select the modem module lowpower clock source and configure the clock divider
*
* @param module modem module
* @param src lowpower clock source
* @param divider divider value to lowpower clock source
*/
void modem_clock_select_lp_clock_source(periph_module_t module, modem_clock_lpclk_src_t src, uint32_t divider);
/**
* @brief Disable lowpower clock source selection
*/
void modem_clock_deselect_lp_clock_source(periph_module_t module);
/**
* @brief Reset wifi mac
*/
void modem_clock_wifi_mac_reset(void);
/**
* @brief Enable clock registers which shared by both modem and ADC. Need a ref count to enable/disable them
*
* @param enable true: enable; false: disable
*/
void modem_clock_shared_enable(bool enable);
#ifdef __cplusplus
}
#endif
```
|
Qaradagh may refer to:
Qaradagh, Iran
Qaradagh, Iraq
|
Spaniblennius clandestinus is a species of combtooth blenny found in the eastern central Atlantic Ocean. It is known from a single specimen, the holotype, which was collected at Goree in Senegal
References
clandestinus
Taxa named by Hans Bath
Taxa named by Peter Wirtz
Fish described in 1989
|
```xml
import {MusicSystem} from "../MusicSystem";
import {SystemLinesEnum} from "../SystemLinesEnum";
import {SystemLinePosition} from "../SystemLinePosition";
import {GraphicalMeasure} from "../GraphicalMeasure";
import {SystemLine} from "../SystemLine";
import {VexFlowStaffLine} from "./VexFlowStaffLine";
import {VexFlowMeasure} from "./VexFlowMeasure";
import {VexFlowConverter} from "./VexFlowConverter";
import {StaffLine} from "../StaffLine";
import {EngravingRules} from "../EngravingRules";
import { VexFlowInstrumentBracket } from "./VexFlowInstrumentBracket";
import { VexFlowInstrumentBrace } from "./VexFlowInstrumentBrace";
import { SkyBottomLineCalculator } from "../SkyBottomLineCalculator";
export class VexFlowMusicSystem extends MusicSystem {
constructor(id: number, rules: EngravingRules) {
super(id);
this.rules = rules;
}
public calculateBorders(rules: EngravingRules): void {
if (this.staffLines.length === 0) {
return;
}
const width: number = this.calcBracketsWidth();
this.boundingBox.BorderLeft = -width;
this.boundingBox.BorderMarginLeft = -width;
//this.boundingBox.BorderRight = this.rules.SystemRightMargin;
this.boundingBox.XBordersHaveBeenSet = true;
const topSkyBottomLineCalculator: SkyBottomLineCalculator = this.staffLines[0].SkyBottomLineCalculator;
const top: number = topSkyBottomLineCalculator.getSkyLineMin();
this.boundingBox.BorderTop = top;
this.boundingBox.BorderMarginTop = top;
const lastStaffLine: StaffLine = this.staffLines[this.staffLines.length - 1];
const bottomSkyBottomLineCalculator: SkyBottomLineCalculator = lastStaffLine.SkyBottomLineCalculator;
const bottom: number = bottomSkyBottomLineCalculator.getBottomLineMax()
+ lastStaffLine.PositionAndShape.RelativePosition.y;
this.boundingBox.BorderBottom = bottom;
this.boundingBox.BorderMarginBottom = bottom;
this.boundingBox.XBordersHaveBeenSet = true;
this.boundingBox.YBordersHaveBeenSet = true;
}
/**
* This method creates all the graphical lines and dots needed to render a system line (e.g. bold-thin-dots..).
* @param xPosition
* @param lineWidth
* @param lineType
* @param linePosition indicates if the line belongs to start or end of measure
* @param musicSystem
* @param topMeasure
* @param bottomMeasure
*/
protected createSystemLine(xPosition: number, lineWidth: number, lineType: SystemLinesEnum, linePosition: SystemLinePosition,
musicSystem: MusicSystem, topMeasure: GraphicalMeasure, bottomMeasure: GraphicalMeasure = undefined): SystemLine {
const vfTopMeasure: VexFlowMeasure = topMeasure as VexFlowMeasure;
let renderInitialLine: boolean = false;
if (bottomMeasure) {
renderInitialLine = true;
// create here the correct lines according to the given lineType.
(bottomMeasure as VexFlowMeasure).lineTo(topMeasure as VexFlowMeasure, VexFlowConverter.line(lineType, linePosition));
(bottomMeasure as VexFlowMeasure).addMeasureLine(lineType, linePosition);
//Double repeat. VF doesn't have concept of double repeat. Need to add stave connector to begin of next measure
if (lineType === SystemLinesEnum.DotsBoldBoldDots) {
const nextIndex: number = bottomMeasure.ParentStaffLine.Measures.indexOf(bottomMeasure) + 1;
const nextBottomMeasure: VexFlowMeasure = bottomMeasure.ParentStaffLine.Measures[nextIndex] as VexFlowMeasure;
const nextTopMeasure: VexFlowMeasure = topMeasure.ParentStaffLine.Measures[nextIndex] as VexFlowMeasure;
if (nextBottomMeasure && nextTopMeasure) {
nextBottomMeasure.lineTo(nextTopMeasure, VexFlowConverter.line(SystemLinesEnum.BoldThinDots, linePosition));
nextBottomMeasure.addMeasureLine(SystemLinesEnum.BoldThinDots, linePosition);
}
}
}
if (vfTopMeasure) {
vfTopMeasure.addMeasureLine(lineType, linePosition, renderInitialLine);
}
return new SystemLine(lineType, linePosition, this, topMeasure, bottomMeasure);
}
/**
* creates an instrument brace for the given dimension.
* The height and positioning can be inferred from the given staff lines.
* @param firstStaffLine the upper StaffLine (use a cast to get the VexFlowStaffLine) of the brace to create
* @param lastStaffLine the lower StaffLine (use a cast to get the VexFlowStaffLine) of the brace to create
*/
protected createInstrumentBracket(firstStaffLine: StaffLine, lastStaffLine: StaffLine): void {
// You could write this in one line but the linter doesn't let me.
const firstVexStaff: VexFlowStaffLine = (firstStaffLine as VexFlowStaffLine);
const lastVexStaff: VexFlowStaffLine = (lastStaffLine as VexFlowStaffLine);
const vexFlowBracket: VexFlowInstrumentBrace = new VexFlowInstrumentBrace(firstVexStaff, lastVexStaff);
this.InstrumentBrackets.push(vexFlowBracket);
return;
}
/**
* creates an instrument group bracket for the given dimension.
* There can be cascaded bracket (e.g. a group of 2 in a group of 4) -
* The recursion depth informs about the current depth level (needed for positioning)
* @param firstStaffLine the upper staff line of the bracket to create
* @param lastStaffLine the lower staff line of the bracket to create
* @param recursionDepth
*/
protected createGroupBracket(firstStaffLine: StaffLine, lastStaffLine: StaffLine, recursionDepth: number): void {
const firstVexStaff: VexFlowStaffLine = (firstStaffLine as VexFlowStaffLine);
const lastVexStaff: VexFlowStaffLine = (lastStaffLine as VexFlowStaffLine);
if (recursionDepth === 0) {
const vexFlowBracket: VexFlowInstrumentBracket = new VexFlowInstrumentBracket(firstVexStaff, lastVexStaff, recursionDepth);
this.GroupBrackets.push(vexFlowBracket);
} else {
const vexFlowBrace: VexFlowInstrumentBrace = new VexFlowInstrumentBrace(firstVexStaff, lastVexStaff, recursionDepth);
this.GroupBrackets.push(vexFlowBrace);
}
return;
}
}
```
|
Raj Gupta may refer to:
Rajat Gupta, former Managing Director of McKinsey & Company implicated in an insider trading scandale
Rajiv L. Gupta, chairman of Delphi Automotive
See also
Rajiv Gupta (disambiguation)
...
|
```yaml
organizations:
- name: org1
connProfilePath: ./connection-profile/connection_profile_org1.yaml
- name: org2
connProfilePath: ./connection-profile/connection_profile_org2.yaml
createChannel:
- channelName: your_sha256_hashyour_sha256_hashyour_sha256_hash22422422422422422422422422422422422422422422422422
channelTxPath: ./channel-artifacts/your_sha256_hashyour_sha256_hashyour_sha256_hash22422422422422422422422422422422422422422422422422/your_sha256_hashyour_sha256_hashyour_sha256_hash22422422422422422422422422422422422422422422422422.tx
organizations: org1
anchorPeerUpdate:
- channelName: your_sha256_hashyour_sha256_hashyour_sha256_hash22422422422422422422422422422422422422422422422422
organizations: org1
anchorPeerUpdateTxPath: ./channel-artifacts/your_sha256_hashyour_sha256_hashyour_sha256_hash22422422422422422422422422422422422422422422422422/your_sha256_hashyour_sha256_hashyour_sha256_hash22422422422422422422422422422422422422422422422422org1anchor.tx
joinChannel:
- channelName: your_sha256_hashyour_sha256_hashyour_sha256_hash22422422422422422422422422422422422422422422422422
organizations: org1
installChaincode:
# installs chaincode with specified name on all peers in listed organziations
- name: samplecc
sdk: cli
version: v1
path: github.com/hyperledger/fabric-test/chaincodes/samplecc/go
organizations: org1,org2
language: golang
metadataPath: ""
instantiateChaincode:
- channelName: your_sha256_hashyour_sha256_hashyour_sha256_hash22422422422422422422422422422422422422422422422422
name: samplecc
sdk: cli
version: v1
args: ""
organizations: org1
endorsementPolicy: 1of(org1,org2)
collectionPath: ""
invokes:
- channelName: your_sha256_hashyour_sha256_hashyour_sha256_hash22422422422422422422422422422422422422422422422422
name: samplecc
targetPeers: OrgAnchor
nProcPerOrg: 1
nRequest: 1
runDur: 0
organizations: org1
txnOpt:
- mode: constant
options:
constFreq: 0
devFreq: 0
queryCheck: 100
eventOpt:
type: FilteredBlock
listener: Block
timeout: 240000
ccOpt:
ccType: ccchecker
keyStart: 0
payLoadMin: 1024
payLoadMax: 2048
args: "put,a1,1"
queries:
- channelName: your_sha256_hashyour_sha256_hashyour_sha256_hash22422422422422422422422422422422422422422422422422
name: samplecc
targetPeers: OrgAnchor
nProcPerOrg: 1
nRequest: 1
runDur: 0
organizations: org1
ccOpt:
ccType: ccchecker
keyStart: 0
txnOpt:
- mode: constant
options:
constFreq: 0
devFreq: 0
args: "get,a1"
```
|
```cmake
# Source: path_to_url#file-bin2h-cmake
# Added modifications to suit prusaslicer
include(CMakeParseArguments)
# Function to wrap a given string into multiple lines at the given column position.
# Parameters:
# VARIABLE - The name of the CMake variable holding the string.
# AT_COLUMN - The column position at which string will be wrapped.
function(WRAP_STRING)
set(oneValueArgs VARIABLE AT_COLUMN)
cmake_parse_arguments(WRAP_STRING "${options}" "${oneValueArgs}" "" ${ARGN})
string(LENGTH ${${WRAP_STRING_VARIABLE}} stringLength)
math(EXPR offset "0")
while(stringLength GREATER 0)
if(stringLength GREATER ${WRAP_STRING_AT_COLUMN})
math(EXPR length "${WRAP_STRING_AT_COLUMN}")
else()
math(EXPR length "${stringLength}")
endif()
string(SUBSTRING ${${WRAP_STRING_VARIABLE}} ${offset} ${length} line)
set(lines "${lines}\n${line}")
math(EXPR stringLength "${stringLength} - ${length}")
math(EXPR offset "${offset} + ${length}")
endwhile()
set(${WRAP_STRING_VARIABLE} "${lines}" PARENT_SCOPE)
endfunction()
# Function to embed contents of a file as byte array in C/C++ header file(.h). The header file
# will contain a byte array and integer variable holding the size of the array.
# Parameters
# SOURCE_FILE - The path of source file whose contents will be embedded in the header file.
# VARIABLE_NAME - The name of the variable for the byte array. The string "_SIZE" will be append
# to this name and will be used a variable name for size variable.
# HEADER_FILE - The path of header file.
# APPEND - If specified appends to the header file instead of overwriting it
# NULL_TERMINATE - If specified a null byte(zero) will be append to the byte array. This will be
# useful if the source file is a text file and we want to use the file contents
# as string. But the size variable holds size of the byte array without this
# null byte.
# Usage:
# bin2h(SOURCE_FILE "Logo.png" HEADER_FILE "Logo.h" VARIABLE_NAME "LOGO_PNG")
function(BIN2H)
set(options APPEND NULL_TERMINATE ADD_WARNING_TEXT)
set(oneValueArgs SOURCE_FILE VARIABLE_NAME HEADER_FILE)
cmake_parse_arguments(BIN2H "${options}" "${oneValueArgs}" "" ${ARGN})
# reads source file contents as hex string
file(READ ${BIN2H_SOURCE_FILE} hexString HEX)
string(LENGTH ${hexString} hexStringLength)
# appends null byte if asked
if(BIN2H_NULL_TERMINATE)
set(hexString "${hexString}00")
endif()
# wraps the hex string into multiple lines at column 32(i.e. 16 bytes per line)
wrap_string(VARIABLE hexString AT_COLUMN 32)
math(EXPR arraySize "${hexStringLength} / 2")
# adds '0x' prefix and comma suffix before and after every byte respectively
string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1, " arrayValues ${hexString})
# removes trailing comma
string(REGEX REPLACE ", $" "" arrayValues ${arrayValues})
# converts the variable name into proper C identifier
string(MAKE_C_IDENTIFIER "${BIN2H_VARIABLE_NAME}" BIN2H_VARIABLE_NAME)
# string(TOUPPER "${BIN2H_VARIABLE_NAME}" BIN2H_VARIABLE_NAME)
# declares byte array and the length variables
set(arrayDefinition "const unsigned char ${BIN2H_VARIABLE_NAME}[] = { ${arrayValues} };")
set(arraySizeDefinition "const size_t ${BIN2H_VARIABLE_NAME}_SIZE = ${arraySize};")
set(warnTxt "")
if (BIN2H_ADD_WARNING_TEXT)
set(warnTxt "/* WARN: This file is auto-generated from ${BIN2H_SOURCE_FILE} */\n")
endif ()
set(declarations "${warnTxt}${arrayDefinition}\n\n${arraySizeDefinition}\n\n")
if(BIN2H_APPEND)
file(APPEND ${BIN2H_HEADER_FILE} "${declarations}")
else()
file(WRITE ${BIN2H_HEADER_FILE} "${declarations}")
endif()
endfunction()
```
|
U godini is the fifteenth studio album by Serbian singer Dragana Mirković and a collaborative album with Zlaja Band. It was released in 1999.
Track listing
U godini (In the year)
Koliko je prevarenih (How many are deceived)
Danima (By days)
Bilo čija (Anyone)
Otrov i melem (Poison and balm)
Ostavljeni (Left)
Da li znaš (Do you know)
Nema te nema (You're gone)
Još si meni drag (I still like you)
Nema vatre (There's no fire)
Kada te ugledam (When I look at you)
Bog zna (God knows)
Plače mi se (I want to cry)
References
1999 albums
Dragana Mirković albums
Grand Production albums
|
Tae Kwon Do Times is a magazine devoted to the martial art of taekwondo, and is published in the United States of America. While the title suggests that it focuses on taekwondo exclusively, the magazine also covers other Korean martial arts. Tae Kwon Do Times has published articles by a wide range of authors, including He-Young Kimm, Thomas Kurz, Scott Shaw, and Mark Van Schuyver.
Tae Kwon Do Times is a widely known publication within the international taekwondo community, appearing in several organizations' websites and individuals' biographies. Shaw lists it as one of five important taekwondo periodicals in his book, Taekwondo basics. Tae Kwon Do Times is also one of five named publications listed in Black Belt magazine's reader surveys in 1999, and one of ten key periodicals listed in Marc Tedeschi's book, Combattimento con le armi: Autodifesa armata e disarmata (The art of weapons: Armed and unarmed self-defense).
Tae Kwon Do Times was founded in 1980 by Chung Eun Kim (1941–2010), a taekwondo master, and his wife, Soja Kim. The Kims retired from their involvement in the magazine in 2005. Currently, Woo Jin Jung is the Publisher and Chief Executive Officer of the magazine. Tae Kwon Do Times maintains correspondents both inside the USA, such as Jere Hilland, and outside the USA, such as Joon No in Australia and George Ashiru in Nigeria.
Notes
a. Several martial art schools and other martial art organizations mention Tae Kwon Do Times, cite articles from it, or reproduce portions of it.
b. Several martial artists refer to their biographies, articles, or awards published in Tae Kwon Do Times.
c. The other periodicals listed are: Australasian Taekwondo (Australia), Black Belt Magazine (USA), Martial Arts (USA), and Taekwondo Choc Magazine (France).
d. The other periodicals listed are: Karate/Kung Fu Illustrated, Martial Arts Training, Inside Kung Fu, and Inside Karate (all published in the USA).
e. The other periodicals listed are: Aikido Journal (Japan), Black Belt (USA), Dragon Times (USA), The Empty Vessel: A journal of contemporary Taoism (USA), Inside Karate (USA), Inside Kung Fu (USA), Internal Martial Arts (USA), Journal of Asian Martial Arts (USA), and Tai Chi and Alternative Health (UK).
References
External links
Tae Kwon Do Times
Bimonthly magazines published in the United States
Sports magazines published in the United States
Magazines established in 1980
Magazines published in Iowa
Martial arts magazines
Taekwondo
|
The Townshend Acts () or Townshend Duties were a series of British acts of Parliament passed during 1767 and 1768 introducing a series of taxes and regulations to fund administration of the British colonies in America. They are named after the Chancellor of the Exchequer who proposed the programme. Historians vary slightly as to which acts they include under the heading "Townshend Acts", but five are often listed:
The Revenue Act 1767 passed on 29 June 1767.
The Commissioners of Customs Act 1767 passed on 29 June 1767.
The Indemnity Act 1767 passed on 2 July 1767.
The New York Restraining Act 1767 passed on 2 July 1767.
The Vice Admiralty Court Act 1768 passed on 8 March 1768.
The purposes of the acts were to
raise revenue in the colonies to pay the salaries of governors and judges so that they would remain loyal to Great Britain,
create more effective means of enforcing compliance with trade regulations,
punish the Province of New York for failing to comply with the 1765 Quartering Act, and
establish the precedent that the British Parliament had the right to tax the colonies.
The Townshend Acts met resistance in the colonies. People debated them in the streets, and in the colonial newspapers. Opponents of the Acts gradually became violent, leading to the Boston Massacre of 1770. The Acts placed an indirect tax on glass, lead, paints, paper, and tea, all of which had to be imported from Britain. This form of revenue generation was Townshend's response to the failure of the Stamp Act 1765, which had provided the first form of direct taxation placed upon the colonies. However, the import duties proved to be similarly controversial. Colonial indignation over the acts was expressed in John Dickinson's Letters from a Farmer in Pennsylvania and in the Massachusetts Circular Letter. There was widespread protest, and American port cities refused to import British goods, so Parliament began to partially repeal the Townshend duties. In March 1770, most of the taxes from the Townshend Acts were repealed by Parliament under Frederick, Lord North. However, the import duty on tea was retained in order to demonstrate to the colonists that Parliament held the sovereign authority to tax its colonies, in accordance with the Declaratory Act 1766. The British government continued to tax the American colonies without providing representation in Parliament. American resentment, corrupt British officials, and abusive enforcement spurred colonial attacks on British ships, including the burning of the Gaspee in 1772. The Townshend Acts' taxation of imported tea was enforced once again by the Tea Act 1773, and this led to the Boston Tea Party in 1773 in which Bostonians destroyed a large shipment of taxed tea. Parliament responded with severe punishments in the Intolerable Acts 1774. The Thirteen Colonies drilled their militia units, and war finally erupted in Lexington and Concord in April 1775, launching the American Revolution.
Background
Following the Seven Years' War (1756–1763), the British government was deep in debt. To pay a small fraction of the costs of the newly expanded empire, the Parliament of Great Britain decided to levy new taxes on the colonies of British America. Previously, through the Trade and Navigation Acts, Parliament had used taxation to regulate the trade of the empire. But with the Sugar Act of 1764, Parliament sought, for the first time, to tax the colonies for the specific purpose of raising revenue. American colonists argued that there were constitutional issues involved.
The Americans claimed they were not represented in Parliament, but the British government retorted that they had "virtual representation", a concept the Americans rejected. This issue, only briefly debated following the Sugar Act, became a major point of contention after Parliament's passage of the Stamp Act 1765. The Stamp Act proved to be wildly unpopular in the colonies, contributing to its repeal the following year, along with the failure to raise substantial revenue.
Implicit in the Stamp Act dispute was an issue more fundamental than taxation and representation: the question of the extent of Parliament's authority in the colonies. Parliament provided its answer to this question when it repealed the Stamp Act in 1766 by simultaneously passing the Declaratory Act, which proclaimed that Parliament could legislate for the colonies "in all cases whatsoever".
The Five Townshend Acts
The Revenue Act 1767
This act was the (joint) first act, passed on 29 June 1767, the same day as the Commissioners of Customs Act (see below).
It placed taxes on glass, lead, "painters' colors" (paint), paper, and tea. It also gave the supreme court of each colony the power to issue "writs of assistance", general warrants that could be issued to customers officers and used to search private property for smuggled goods.
There was an angry response from colonists, who deemed the taxes a threat to their rights as British subjects. The use of writs of assistance was significantly controversial since the right to be secure in one's private property was an established right in Britain.
The Commissioners of Customs Act 1767
This act was passed on 29 June 1767. It created a new Customs Board for the North American colonies, to be headquartered in Boston with five customs commissioners. New offices were eventually opened in other ports as well. The board was created to enforce shipping regulations and increase tax revenue. Previously, customs enforcement was handled by the Customs Board back in England. Due to the distance, enforcement was poor, taxes were avoided and smuggling was rampant.
Once the new Customs Board was in operation, enforcement increased, leading to a confrontation with smuggling colonists. Incidents between customs officials, military personnel and colonists broke out across the colonies, eventually leading to the occupation of Boston by British troops. This led to the Boston Massacre.
The New York Restraining Act 1767
This was the (joint) third of the five acts, passed on 2 July 1767, the same day as the Indemnity Act.
It forbade the New York Assembly and the governor of New York from passing any new bills until they complied with the Quartering Act 1765. That act required New York to provide housing, food and supplies for the British troops stationed there to defend the colony. New York resisted the Quartering Act saying they were being taxed, yet had no direct representation in Parliament. Furthermore, New York didn't think British soldiers were needed any more, since the French and Indian War had come to an end.
Before the act was implemented, New York reluctantly agreed to provide some of the soldiers' needs, so it was never applied.
The Indemnity Act 1767
This Act was passed together with the New York Restraining Act, on 2 July 1767.
'Indemnity' means 'security or protection against a loss or other financial burden'. The Indemnity Act 1767 reduced taxes on the British East India Company when they imported tea into England. This allowed them to re-export the tea to the colonies more cheaply and resell it to the colonists. Until this time, all items had to be shipped to England first from wherever they were made and then re-exported to their destination, including to the colonies. This followed from the principle of mercantilism in England, which meant the colonies were forced to trade only with England.
The British East India Company was one of England's largest companies but was on the verge of collapse due to much cheaper smuggled Dutch tea. Part of the purpose of the entire series of Townshend Acts was to save the company from imploding. Since tea smuggling had become a common and successful practice, Parliament realized how difficult it was to enforce the taxing of tea. The Act stated that no more taxes would be placed on tea, and it made the cost of the East India Company's tea less than tea that was smuggled via Holland. It was an incentive for the colonists to purchase the East India Company tea.
The Vice Admiralty Court Act 1768
This was the last of the five acts passed. It was not passed until 8 March 1768, the year after the other four. Lord Charles Townshend, the Chancellor of the Exchequer, after whom the Townshend Acts were named, had died suddenly in September 1767, and so did not introduce this Act.
The Act was passed to aid the prosecution of smugglers. It gave admiralty courts, rather than colonial courts, jurisdiction over all matters concerning customs violations and smuggling. Before the Act, customs violators could be tried in an admiralty court in Halifax, Nova Scotia, if royal prosecutors believed they would not get a favourable outcome using a local judge and jury.
The Vice-Admiralty Court Act added three new admiralty courts in Boston, Philadelphia and Charleston to aid in more effective prosecutions. These courts were run by judges appointed by the Crown and whose salaries were paid, in the first instance, from fines levied. when they found someone guilty.
The decisions were made solely by the judge, without the option of trial by jury, which was considered to be a fundamental right of British subjects. In addition, the accused person had to travel to the court of jurisdiction at his own expense; if he did not appear, he was automatically considered guilty.
Townshend's program
Raising revenue
The first of the Townshend Acts, sometimes simply known as the Townshend Act, was the Revenue Act 1767 (7 Geo 3 c 46). This act represented the Chatham ministry's new approach to generating tax revenue in the American colonies after the repeal of the Stamp Act in 1766. The British government had gotten the impression that because the colonists had objected to the Stamp Act on the grounds that it was a direct (or "internal") tax, colonists would therefore accept indirect (or "external") taxes, such as taxes on imports. With this in mind, Charles Townshend, the Chancellor of the Exchequer, devised a plan that placed new duties on paper, paint, lead, glass, and tea that were imported into the colonies. These were items that were not produced in North America and that the colonists were only allowed to buy from Great Britain.
The colonists' objection to "internal" taxes did not mean that they would accept "external" taxes; the colonial position was that any tax laid by Parliament for the purpose of raising revenue was unconstitutional. "Townshend's mistaken belief that Americans regarded internal taxes as unconstitutional and external taxes constitutional", wrote historian John Phillip Reid, "was of vital importance in the history of events leading to the Revolution." The Townshend Revenue Act received royal assent on 29 June 1767. There was little opposition expressed in Parliament at the time. "Never could a fateful measure have had a more quiet passage", wrote historian Peter Thomas.
The Revenue Act was passed in conjunction with the Indemnity Act 1767 (7 Geo 3 c 56), which was intended to make the tea of the British East India Company more competitive with smuggled Dutch tea. The Indemnity Act repealed taxes on tea imported to England, allowing it to be re-exported more cheaply to the colonies. This tax cut in England would be partially offset by the new Revenue Act taxes on tea in the colonies. The Revenue Act also reaffirmed the legality of writs of assistance, or general search warrants, which gave customs officials broad powers to search houses and businesses for smuggled goods.
The original stated purpose of the Townshend duties was to raise a revenue to help pay the cost of maintaining an army in North America. Townshend changed the purpose of the tax plan, however, and instead decided to use the revenue to pay the salaries of some colonial governors and judges. Previously, the colonial assemblies had paid these salaries, but Parliament hoped to take the "power of the purse" away from the colonies. According to historian John C. Miller, "Townshend ingeniously sought to take money from Americans by means of parliamentary taxation and to employ it against their liberties by making colonial governors and judges independent of the assemblies."
Some members of Parliament objected because Townshend's plan was expected to generate only £40,000 in yearly revenue, but he explained that once the precedent for taxing the colonists had been firmly established, the program could gradually be expanded until the colonies paid for themselves. According to historian Peter Thomas, Townshend's "aims were political rather than financial".
American Board of Customs Commissioners
To better collect the new taxes, the Commissioners of Customs Act 1767 (7 Geo 3 c 41) established the American Board of Customs Commissioners, which was modeled on the British Board of Customs. The board was created because of the difficulties the British Board faced in enforcing trade regulations in the distant colonies. Five commissioners were appointed to the board, which was headquartered in Boston. The American Customs Board would generate considerable hostility in the colonies towards the British government. According to historian Oliver Dickerson, "The actual separation of the continental colonies from the rest of the Empire dates from the creation of this independent administrative board."
The American Board of Customs Commissioners was notoriously corrupt, according to historians. Political scientist Peter Andreas argues:
Historian Edmund Morgan says:
Historian Doug Krehbiel argues:
Another measure to enforce the trade laws was the Vice Admiralty Court Act 1768 (8 Geo 3 c 22). Although often included in discussions of the Townshend Acts, this act was initiated by the Cabinet when Townshend was not present and was not passed until after his death. Before this act, there was just one vice admiralty court in North America, located in Halifax, Nova Scotia. Established in 1764, this court proved to be too remote to serve all of the colonies, and so the 1768 Vice Admiralty Court Act created four district courts, which were located at Halifax, Boston, Philadelphia, and Charleston. One purpose of the vice admiralty courts, which did not have juries, was to help customs officials prosecute smugglers since colonial juries were reluctant to convict persons for violating unpopular trade regulations.
Townshend also faced the problem of what to do about the New York General Assembly, which had refused to comply with the Quartering Act 1765 because its members saw the act's financial provisions as levying an unconstitutional tax. The New York Restraining Act (7 Geo 3 c 59), which according to historian Robert Chaffin was "officially a part of the Townshend Acts", suspended the power of the Assembly until it complied with the Quartering Act. The Restraining Act never went into effect because, by the time it was passed, the New York Assembly had already appropriated money to cover the costs of the Quartering Act. The Assembly avoided conceding the right of Parliament to tax the colonies by making no reference to the Quartering Act when appropriating this money; they also passed a resolution stating that Parliament could not constitutionally suspend an elected legislature.
Reaction
Townshend knew that his program would be controversial in the colonies, but he argued that, "The superiority of the mother country can at no time be better exerted than now." The Townshend Acts did not create an instant uproar like the Stamp Act had done two years earlier, but before long, opposition to the programme had become widespread. Townshend did not live to see this reaction, having died suddenly on 4 September 1767.
The most influential colonial response to the Townshend Acts was a series of twelve essays by John Dickinson entitled "Letters from a Farmer in Pennsylvania", which began appearing in December 1767. Eloquently articulating ideas already widely accepted in the colonies, Dickinson argued that there was no difference between "internal" and "external" taxes, and that any taxes imposed on the colonies by Parliament for the sake of raising a revenue were unconstitutional. Dickinson warned colonists not to concede to the taxes just because the rates were low since this would set a dangerous precedent.
Dickinson sent a copy of his "Letters" to James Otis of Massachusetts, informing Otis that "whenever the Cause of American Freedom is to be vindicated, I look towards the Province of Massachusetts Bay". The Massachusetts House of Representatives began a campaign against the Townshend Acts by first sending a petition to King George asking for the repeal of the Revenue Act, and then sending a letter to the other colonial assemblies, asking them to join the resistance movement. Upon receipt of the Massachusetts Circular Letter, other colonies also sent petitions to the king. Virginia and Pennsylvania also sent petitions to Parliament, but the other colonies did not, believing that it might have been interpreted as an admission of Parliament's sovereignty over them. Parliament refused to consider the petitions of Virginia and Pennsylvania.
In Great Britain, Lord Hillsborough, who had recently been appointed to the newly created office of Colonial Secretary, was alarmed by the actions of the Massachusetts House. In April 1768 he sent a letter to the colonial governors in America, instructing them to dissolve the colonial assemblies if they responded to the Massachusetts Circular Letter. He also sent a letter to Massachusetts Governor Francis Bernard, instructing him to have the Massachusetts House rescind the Circular Letter. By a vote of 92 to 17, the House refused to comply, and Bernard promptly dissolved the legislature.
When news of the outrage among the colonists finally reached Franklin in London he wrote a number of essays in 1768 calling for "civility and good manners", even though he did not approve of the measures. In 1770, Franklin continued writing essays against the Townsend Acts and Lord Hillsborough and wrote eleven attacking the Acts that appeared in the Public Advertiser, a London daily newspaper. The essays were published between January 8 and February 19, 1770, and can be found in The Papers of Benjamin Franklin.
Boycotts
Merchants in the colonies, some of them smugglers, organized economic boycotts to put pressure on their British counterparts to work for repeal of the Townshend Acts. Boston merchants organized the first non-importation agreement, which called for merchants to suspend importation of certain British goods effective 1 January 1768. Merchants in other colonial ports, including New York City and Philadelphia, eventually joined the boycott. In Virginia, the non-importation effort was organized by George Washington and George Mason. When the Virginia House of Burgesses passed a resolution stating that Parliament had no right to tax Virginians without their consent, Governor Lord Botetourt dissolved the assembly. The members met at Raleigh Tavern and adopted a boycott agreement known as the "Association".
The non-importation movement was not as effective as promoters had hoped. British exports to the colonies declined by 38 percent in 1769, but there were many merchants who did not participate in the boycott. The boycott movement began to fail by 1770 and came to an end in 1771.
Unrest in Boston
The newly created American Customs Board was seated in Boston, so it was there that the Board concentrated on enforcing the Townshend Acts. The acts were so unpopular in Boston that the Customs Board requested assistance. Commodore Samuel Hood sent the fifty-gun fourth-rate ship HMS Romney, which arrived in Boston Harbor in May 1768.
On 10 June 1768, customs officials seized the Liberty, a sloop owned by leading Boston merchant John Hancock, on allegations that the ship had been involved in smuggling. Bostonians, already angry because the captain of the Romney had been impressing local sailors, began to riot. Customs officials fled to Castle William for protection. With John Adams serving as his lawyer, Hancock was prosecuted in a highly publicized trial by a vice-admiralty court, but the charges were eventually dropped.
Given the unstable state of affairs in Massachusetts, Hillsborough instructed Governor Bernard to try to find evidence of treason in Boston. Parliament had determined that the Treason Act 1543 was still in force, which would allow Bostonians to be transported to England to stand trial for treason. Bernard could find no one who was willing to provide reliable evidence, however, and so there were no treason trials. The possibility that American colonists might be arrested and sent to England for trial produced alarm and outrage in the colonies.
Even before the Liberty riot, Hillsborough had decided to send troops to Boston. On 8 June 1768, he instructed General Thomas Gage, Commander-in-Chief, North America, to send "such Force as You shall think necessary to Boston", although he conceded that this might lead to "consequences not easily foreseen". Hillsborough suggested that Gage might send one regiment to Boston, but the Liberty incident convinced officials that more than one regiment would be needed.
People in Massachusetts learned in September 1768 that troops were on the way. Samuel Adams organized an emergency, extralegal convention of towns and passed resolutions against the imminent occupation of Boston, but on 1 October 1768, the first of four regiments of the British Army began disembarking in Boston, and the Customs Commissioners returned to town. The "Journal of Occurrences", an anonymously written series of newspaper articles, chronicled clashes between civilians and soldiers during the military occupation of Boston, apparently with some exaggeration. Tensions rose after Christopher Seider, a Boston teenager, was killed by a customs employee on 22 February 1770. Although British soldiers were not involved in that incident, resentment against the occupation escalated in the days that followed, resulting in the killing of five civilians in the Boston Massacre of 5 March 1770. After the incident, the troops were withdrawn to Castle William.
Partial repeal
On 5 March 1770—the same day as the Boston Massacre, although news traveled slowly at the time, and neither side of the Atlantic was aware of this coincidence—Lord North, the new Prime Minister, presented a motion in the House of Commons that called for partial repeal of the Townshend Revenue Act. Although some in Parliament advocated a complete repeal of the act, North disagreed, arguing that the tea duty should be retained to assert "the right of taxing the Americans". After debate, the Repeal Act (10 Geo 3 c 17) received royal assent on 12 April 1770.
Historian Robert Chaffin argued that little had actually changed:
The Townshend duty on tea was retained when the 1773 Tea Act was passed, which allowed the East India Company to ship tea directly to the colonies. The Boston Tea Party soon followed, which set the stage for the American Revolution.
Notes
References
Bibliography
Further reading
External links
Text of the Townshend Revenue Act
Article on the Townshend Acts, with some period documents, from the Massachusetts Historical Society
Documents on the Townshend Acts and Period 1767–1768
1767 in the Thirteen Colonies
Acts of the Parliament of Great Britain
Great Britain Acts of Parliament 1766
Laws leading to the American Revolution
History of the Thirteen Colonies
|
Sâmbăta () is a commune in Bihor County, Crișana, Romania with a population of 1,475 people. It is composed of six villages: Copăceni (Kapocsány), Ogești (Csékehodos), Rogoz (Venterrogoz), Rotărești (Kerekesfalva), Sâmbăta and Zăvoiu (Törpefalva).
References
Communes in Bihor County
Localities in Crișana
|
```xml
// Components
import React, {PureComponent} from 'react'
import {connect} from 'react-redux'
// Libraries
import _ from 'lodash'
import {Link} from 'react-router'
// Components
import AlertsTableRow from 'src/alerts/components/AlertsTableRow'
import InfiniteScroll from 'src/shared/components/InfiniteScroll'
import SearchBar from 'src/alerts/components/SearchBar'
// Constants
import {ALERTS_TABLE} from 'src/alerts/constants/tableSizing'
// Types
import {Alert} from 'src/types/alerts'
import {Source, TimeZones} from 'src/types'
// Decorators
import {ErrorHandling} from 'src/shared/decorators/errors'
enum Direction {
ASC = 'asc',
DESC = 'desc',
NONE = 'none',
}
interface OwnProps {
alerts: Alert[]
source: Source
shouldNotBeFilterable: boolean
limit: number
isAlertsMaxedOut: boolean
alertsCount: number
onGetMoreAlerts: () => void
}
interface StateProps {
timeZone: TimeZones
}
interface State {
searchTerm: string
filteredAlerts: Alert[]
sortDirection: Direction
sortKey: string
}
type Props = OwnProps & StateProps
class AlertsTable extends PureComponent<Props, State> {
constructor(props) {
super(props)
this.state = {
searchTerm: '',
filteredAlerts: this.props.alerts,
sortDirection: Direction.NONE,
sortKey: '',
}
}
public UNSAFE_componentWillReceiveProps(newProps) {
this.filterAlerts(this.state.searchTerm, newProps.alerts)
}
public render() {
const {
shouldNotBeFilterable,
limit,
onGetMoreAlerts,
isAlertsMaxedOut,
alertsCount,
} = this.props
return shouldNotBeFilterable ? (
<div className="alerts-widget">
{this.renderTable()}
{limit && alertsCount ? (
<button
className="btn btn-sm btn-default btn-block"
onClick={onGetMoreAlerts}
disabled={isAlertsMaxedOut}
style={{marginBottom: '20px'}}
>
{isAlertsMaxedOut
? `All ${alertsCount} Alerts displayed`
: 'Load next 30 Alerts'}
</button>
) : null}
</div>
) : (
<div className="panel">
<div className="panel-heading">
<h2 className="panel-title">{this.props.alerts.length} Alerts</h2>
{this.props.alerts.length ? (
<SearchBar onSearch={this.filterAlerts} />
) : null}
</div>
<div className="panel-body">{this.renderTable()}</div>
</div>
)
}
private filterAlerts = (searchTerm: string, newAlerts?: Alert[]): void => {
const alerts = newAlerts || this.props.alerts
const filterText = searchTerm.toLowerCase()
const filteredAlerts = alerts.filter(({name, host, level}) => {
return (
(name && name.toLowerCase().includes(filterText)) ||
(host && host.toLowerCase().includes(filterText)) ||
(level && level.toLowerCase().includes(filterText))
)
})
this.setState({searchTerm, filteredAlerts})
}
private changeSort = (key: string): (() => void) => (): void => {
// if we're using the key, reverse order; otherwise, set it with ascending
if (this.state.sortKey === key) {
const reverseDirection: Direction =
this.state.sortDirection === Direction.ASC
? Direction.DESC
: Direction.ASC
this.setState({sortDirection: reverseDirection})
} else {
this.setState({sortKey: key, sortDirection: Direction.ASC})
}
}
private sortableClasses = (key: string): string => {
if (this.state.sortKey === key) {
if (this.state.sortDirection === Direction.ASC) {
return 'alert-history-table--th sortable-header sorting-ascending'
}
return 'alert-history-table--th sortable-header sorting-descending'
}
return 'alert-history-table--th sortable-header'
}
private sort = (
alerts: Alert[],
key: string,
direction: Direction
): Alert[] => {
switch (direction) {
case Direction.ASC:
return _.sortBy<Alert>(alerts, e => e[key])
case Direction.DESC:
return _.sortBy<Alert>(alerts, e => e[key]).reverse()
default:
return alerts
}
}
private renderTable(): JSX.Element {
const {
source: {id},
timeZone,
} = this.props
const alerts = this.sort(
this.state.filteredAlerts,
this.state.sortKey,
this.state.sortDirection
)
const {colName, colLevel, colTime, colHost, colValue} = ALERTS_TABLE
return this.props.alerts.length ? (
<div className="alert-history-table">
<div className="alert-history-table--thead">
<div
onClick={this.changeSort('name')}
className={this.sortableClasses('name')}
style={{width: colName}}
>
Name <span className="icon caret-up" />
</div>
<div
onClick={this.changeSort('level')}
className={this.sortableClasses('level')}
style={{width: colLevel}}
>
Level <span className="icon caret-up" />
</div>
<div
onClick={this.changeSort('time')}
className={this.sortableClasses('time')}
style={{width: colTime}}
>
Time ({timeZone})<span className="icon caret-up" />
</div>
<div
onClick={this.changeSort('host')}
className={this.sortableClasses('host')}
style={{width: colHost}}
>
Host <span className="icon caret-up" />
</div>
<div
onClick={this.changeSort('value')}
className={this.sortableClasses('value')}
style={{width: colValue}}
>
Value <span className="icon caret-up" />
</div>
</div>
<InfiniteScroll
className="alert-history-table--tbody"
itemHeight={25}
items={alerts.map((alert, i) => (
<div className="alert-history-table--tr" key={i}>
<AlertsTableRow sourceID={id} {...alert} timeZone={timeZone} />
</div>
))}
/>
</div>
) : (
this.renderTableEmpty()
)
}
private renderTableEmpty(): JSX.Element {
const {
source: {id},
shouldNotBeFilterable,
} = this.props
return shouldNotBeFilterable ? (
<div className="graph-empty">
<p>
Learn how to configure your first <strong>Rule</strong> in
<br />
the <em>Getting Started</em> guide
</p>
</div>
) : (
<div className="generic-empty-state">
<h4 className="no-user-select">There are no Alerts to display</h4>
<br />
<h6 className="no-user-select">
Try changing the Time Range or
<Link
style={{marginLeft: '10px'}}
to={`/sources/${id}/alert-rules/new`}
className="btn btn-primary btn-sm"
>
Create an Alert Rule
</Link>
</h6>
</div>
)
}
}
const mstp = ({app}) => ({
timeZone: app.persisted.timeZone,
})
export default connect(mstp, null)(ErrorHandling(AlertsTable))
```
|
```vue
<!--{}-->
<template>
<div
:class="{
foo:
a === b &&
c === d
}"
/>
</template>
```
|
```objective-c
// The template and inlines for the -*- C++ -*- internal _Meta class.
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// invalidate any other reasons why the executable file might be covered by
/** @file valarray_after.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
#ifndef _VALARRAY_AFTER_H
#define _VALARRAY_AFTER_H 1
#pragma GCC system_header
_GLIBCXX_BEGIN_NAMESPACE(std)
//
// gslice_array closure.
//
template<class _Dom>
class _GBase
{
public:
typedef typename _Dom::value_type value_type;
_GBase (const _Dom& __e, const valarray<size_t>& __i)
: _M_expr (__e), _M_index(__i) {}
value_type
operator[] (size_t __i) const
{ return _M_expr[_M_index[__i]]; }
size_t
size () const
{ return _M_index.size(); }
private:
const _Dom& _M_expr;
const valarray<size_t>& _M_index;
};
template<typename _Tp>
class _GBase<_Array<_Tp> >
{
public:
typedef _Tp value_type;
_GBase (_Array<_Tp> __a, const valarray<size_t>& __i)
: _M_array (__a), _M_index(__i) {}
value_type
operator[] (size_t __i) const
{ return _M_array._M_data[_M_index[__i]]; }
size_t
size () const
{ return _M_index.size(); }
private:
const _Array<_Tp> _M_array;
const valarray<size_t>& _M_index;
};
template<class _Dom>
struct _GClos<_Expr, _Dom>
: _GBase<_Dom>
{
typedef _GBase<_Dom> _Base;
typedef typename _Base::value_type value_type;
_GClos (const _Dom& __e, const valarray<size_t>& __i)
: _Base (__e, __i) {}
};
template<typename _Tp>
struct _GClos<_ValArray, _Tp>
: _GBase<_Array<_Tp> >
{
typedef _GBase<_Array<_Tp> > _Base;
typedef typename _Base::value_type value_type;
_GClos (_Array<_Tp> __a, const valarray<size_t>& __i)
: _Base (__a, __i) {}
};
//
// indirect_array closure
//
template<class _Dom>
class _IBase
{
public:
typedef typename _Dom::value_type value_type;
_IBase (const _Dom& __e, const valarray<size_t>& __i)
: _M_expr (__e), _M_index (__i) {}
value_type
operator[] (size_t __i) const
{ return _M_expr[_M_index[__i]]; }
size_t
size() const
{ return _M_index.size(); }
private:
const _Dom& _M_expr;
const valarray<size_t>& _M_index;
};
template<class _Dom>
struct _IClos<_Expr, _Dom>
: _IBase<_Dom>
{
typedef _IBase<_Dom> _Base;
typedef typename _Base::value_type value_type;
_IClos (const _Dom& __e, const valarray<size_t>& __i)
: _Base (__e, __i) {}
};
template<typename _Tp>
struct _IClos<_ValArray, _Tp>
: _IBase<valarray<_Tp> >
{
typedef _IBase<valarray<_Tp> > _Base;
typedef _Tp value_type;
_IClos (const valarray<_Tp>& __a, const valarray<size_t>& __i)
: _Base (__a, __i) {}
};
//
// class _Expr
//
template<class _Clos, typename _Tp>
class _Expr
{
public:
typedef _Tp value_type;
_Expr(const _Clos&);
const _Clos& operator()() const;
value_type operator[](size_t) const;
valarray<value_type> operator[](slice) const;
valarray<value_type> operator[](const gslice&) const;
valarray<value_type> operator[](const valarray<bool>&) const;
valarray<value_type> operator[](const valarray<size_t>&) const;
_Expr<_UnClos<__unary_plus, std::_Expr, _Clos>, value_type>
operator+() const;
_Expr<_UnClos<__negate, std::_Expr, _Clos>, value_type>
operator-() const;
_Expr<_UnClos<__bitwise_not, std::_Expr, _Clos>, value_type>
operator~() const;
_Expr<_UnClos<__logical_not, std::_Expr, _Clos>, bool>
operator!() const;
size_t size() const;
value_type sum() const;
valarray<value_type> shift(int) const;
valarray<value_type> cshift(int) const;
value_type min() const;
value_type max() const;
valarray<value_type> apply(value_type (*)(const value_type&)) const;
valarray<value_type> apply(value_type (*)(value_type)) const;
private:
const _Clos _M_closure;
};
template<class _Clos, typename _Tp>
inline
_Expr<_Clos, _Tp>::_Expr(const _Clos& __c) : _M_closure(__c) {}
template<class _Clos, typename _Tp>
inline const _Clos&
_Expr<_Clos, _Tp>::operator()() const
{ return _M_closure; }
template<class _Clos, typename _Tp>
inline _Tp
_Expr<_Clos, _Tp>::operator[](size_t __i) const
{ return _M_closure[__i]; }
template<class _Clos, typename _Tp>
inline valarray<_Tp>
_Expr<_Clos, _Tp>::operator[](slice __s) const
{
valarray<_Tp> __v = valarray<_Tp>(*this)[__s];
return __v;
}
template<class _Clos, typename _Tp>
inline valarray<_Tp>
_Expr<_Clos, _Tp>::operator[](const gslice& __gs) const
{
valarray<_Tp> __v = valarray<_Tp>(*this)[__gs];
return __v;
}
template<class _Clos, typename _Tp>
inline valarray<_Tp>
_Expr<_Clos, _Tp>::operator[](const valarray<bool>& __m) const
{
valarray<_Tp> __v = valarray<_Tp>(*this)[__m];
return __v;
}
template<class _Clos, typename _Tp>
inline valarray<_Tp>
_Expr<_Clos, _Tp>::operator[](const valarray<size_t>& __i) const
{
valarray<_Tp> __v = valarray<_Tp>(*this)[__i];
return __v;
}
template<class _Clos, typename _Tp>
inline size_t
_Expr<_Clos, _Tp>::size() const
{ return _M_closure.size(); }
template<class _Clos, typename _Tp>
inline valarray<_Tp>
_Expr<_Clos, _Tp>::shift(int __n) const
{
valarray<_Tp> __v = valarray<_Tp>(*this).shift(__n);
return __v;
}
template<class _Clos, typename _Tp>
inline valarray<_Tp>
_Expr<_Clos, _Tp>::cshift(int __n) const
{
valarray<_Tp> __v = valarray<_Tp>(*this).cshift(__n);
return __v;
}
template<class _Clos, typename _Tp>
inline valarray<_Tp>
_Expr<_Clos, _Tp>::apply(_Tp __f(const _Tp&)) const
{
valarray<_Tp> __v = valarray<_Tp>(*this).apply(__f);
return __v;
}
template<class _Clos, typename _Tp>
inline valarray<_Tp>
_Expr<_Clos, _Tp>::apply(_Tp __f(_Tp)) const
{
valarray<_Tp> __v = valarray<_Tp>(*this).apply(__f);
return __v;
}
// XXX: replace this with a more robust summation algorithm.
template<class _Clos, typename _Tp>
inline _Tp
_Expr<_Clos, _Tp>::sum() const
{
size_t __n = _M_closure.size();
if (__n == 0)
return _Tp();
else
{
_Tp __s = _M_closure[--__n];
while (__n != 0)
__s += _M_closure[--__n];
return __s;
}
}
template<class _Clos, typename _Tp>
inline _Tp
_Expr<_Clos, _Tp>::min() const
{ return __valarray_min(_M_closure); }
template<class _Clos, typename _Tp>
inline _Tp
_Expr<_Clos, _Tp>::max() const
{ return __valarray_max(_M_closure); }
template<class _Dom, typename _Tp>
inline _Expr<_UnClos<__logical_not, _Expr, _Dom>, bool>
_Expr<_Dom, _Tp>::operator!() const
{
typedef _UnClos<__logical_not, std::_Expr, _Dom> _Closure;
return _Expr<_Closure, _Tp>(_Closure(this->_M_closure));
}
#define _DEFINE_EXPR_UNARY_OPERATOR(_Op, _Name) \
template<class _Dom, typename _Tp> \
inline _Expr<_UnClos<_Name, std::_Expr, _Dom>, _Tp> \
_Expr<_Dom, _Tp>::operator _Op() const \
{ \
typedef _UnClos<_Name, std::_Expr, _Dom> _Closure; \
return _Expr<_Closure, _Tp>(_Closure(this->_M_closure)); \
}
_DEFINE_EXPR_UNARY_OPERATOR(+, __unary_plus)
_DEFINE_EXPR_UNARY_OPERATOR(-, __negate)
_DEFINE_EXPR_UNARY_OPERATOR(~, __bitwise_not)
#undef _DEFINE_EXPR_UNARY_OPERATOR
#define _DEFINE_EXPR_BINARY_OPERATOR(_Op, _Name) \
template<class _Dom1, class _Dom2> \
inline _Expr<_BinClos<_Name, _Expr, _Expr, _Dom1, _Dom2>, \
typename __fun<_Name, typename _Dom1::value_type>::result_type> \
operator _Op(const _Expr<_Dom1, typename _Dom1::value_type>& __v, \
const _Expr<_Dom2, typename _Dom2::value_type>& __w) \
{ \
typedef typename _Dom1::value_type _Arg; \
typedef typename __fun<_Name, _Arg>::result_type _Value; \
typedef _BinClos<_Name, _Expr, _Expr, _Dom1, _Dom2> _Closure; \
return _Expr<_Closure, _Value>(_Closure(__v(), __w())); \
} \
\
template<class _Dom> \
inline _Expr<_BinClos<_Name, _Expr, _Constant, _Dom, \
typename _Dom::value_type>, \
typename __fun<_Name, typename _Dom::value_type>::result_type> \
operator _Op(const _Expr<_Dom, typename _Dom::value_type>& __v, \
const typename _Dom::value_type& __t) \
{ \
typedef typename _Dom::value_type _Arg; \
typedef typename __fun<_Name, _Arg>::result_type _Value; \
typedef _BinClos<_Name, _Expr, _Constant, _Dom, _Arg> _Closure; \
return _Expr<_Closure, _Value>(_Closure(__v(), __t)); \
} \
\
template<class _Dom> \
inline _Expr<_BinClos<_Name, _Constant, _Expr, \
typename _Dom::value_type, _Dom>, \
typename __fun<_Name, typename _Dom::value_type>::result_type> \
operator _Op(const typename _Dom::value_type& __t, \
const _Expr<_Dom, typename _Dom::value_type>& __v) \
{ \
typedef typename _Dom::value_type _Arg; \
typedef typename __fun<_Name, _Arg>::result_type _Value; \
typedef _BinClos<_Name, _Constant, _Expr, _Arg, _Dom> _Closure; \
return _Expr<_Closure, _Value>(_Closure(__t, __v())); \
} \
\
template<class _Dom> \
inline _Expr<_BinClos<_Name, _Expr, _ValArray, \
_Dom, typename _Dom::value_type>, \
typename __fun<_Name, typename _Dom::value_type>::result_type> \
operator _Op(const _Expr<_Dom,typename _Dom::value_type>& __e, \
const valarray<typename _Dom::value_type>& __v) \
{ \
typedef typename _Dom::value_type _Arg; \
typedef typename __fun<_Name, _Arg>::result_type _Value; \
typedef _BinClos<_Name, _Expr, _ValArray, _Dom, _Arg> _Closure; \
return _Expr<_Closure, _Value>(_Closure(__e(), __v)); \
} \
\
template<class _Dom> \
inline _Expr<_BinClos<_Name, _ValArray, _Expr, \
typename _Dom::value_type, _Dom>, \
typename __fun<_Name, typename _Dom::value_type>::result_type> \
operator _Op(const valarray<typename _Dom::value_type>& __v, \
const _Expr<_Dom, typename _Dom::value_type>& __e) \
{ \
typedef typename _Dom::value_type _Tp; \
typedef typename __fun<_Name, _Tp>::result_type _Value; \
typedef _BinClos<_Name, _ValArray, _Expr, _Tp, _Dom> _Closure; \
return _Expr<_Closure, _Value>(_Closure(__v, __e ())); \
}
_DEFINE_EXPR_BINARY_OPERATOR(+, __plus)
_DEFINE_EXPR_BINARY_OPERATOR(-, __minus)
_DEFINE_EXPR_BINARY_OPERATOR(*, __multiplies)
_DEFINE_EXPR_BINARY_OPERATOR(/, __divides)
_DEFINE_EXPR_BINARY_OPERATOR(%, __modulus)
_DEFINE_EXPR_BINARY_OPERATOR(^, __bitwise_xor)
_DEFINE_EXPR_BINARY_OPERATOR(&, __bitwise_and)
_DEFINE_EXPR_BINARY_OPERATOR(|, __bitwise_or)
_DEFINE_EXPR_BINARY_OPERATOR(<<, __shift_left)
_DEFINE_EXPR_BINARY_OPERATOR(>>, __shift_right)
_DEFINE_EXPR_BINARY_OPERATOR(&&, __logical_and)
_DEFINE_EXPR_BINARY_OPERATOR(||, __logical_or)
_DEFINE_EXPR_BINARY_OPERATOR(==, __equal_to)
_DEFINE_EXPR_BINARY_OPERATOR(!=, __not_equal_to)
_DEFINE_EXPR_BINARY_OPERATOR(<, __less)
_DEFINE_EXPR_BINARY_OPERATOR(>, __greater)
_DEFINE_EXPR_BINARY_OPERATOR(<=, __less_equal)
_DEFINE_EXPR_BINARY_OPERATOR(>=, __greater_equal)
#undef _DEFINE_EXPR_BINARY_OPERATOR
#define _DEFINE_EXPR_UNARY_FUNCTION(_Name) \
template<class _Dom> \
inline _Expr<_UnClos<__##_Name, _Expr, _Dom>, \
typename _Dom::value_type> \
_Name(const _Expr<_Dom, typename _Dom::value_type>& __e) \
{ \
typedef typename _Dom::value_type _Tp; \
typedef _UnClos<__##_Name, _Expr, _Dom> _Closure; \
return _Expr<_Closure, _Tp>(_Closure(__e())); \
} \
\
template<typename _Tp> \
inline _Expr<_UnClos<__##_Name, _ValArray, _Tp>, _Tp> \
_Name(const valarray<_Tp>& __v) \
{ \
typedef _UnClos<__##_Name, _ValArray, _Tp> _Closure; \
return _Expr<_Closure, _Tp>(_Closure(__v)); \
}
_DEFINE_EXPR_UNARY_FUNCTION(abs)
_DEFINE_EXPR_UNARY_FUNCTION(cos)
_DEFINE_EXPR_UNARY_FUNCTION(acos)
_DEFINE_EXPR_UNARY_FUNCTION(cosh)
_DEFINE_EXPR_UNARY_FUNCTION(sin)
_DEFINE_EXPR_UNARY_FUNCTION(asin)
_DEFINE_EXPR_UNARY_FUNCTION(sinh)
_DEFINE_EXPR_UNARY_FUNCTION(tan)
_DEFINE_EXPR_UNARY_FUNCTION(tanh)
_DEFINE_EXPR_UNARY_FUNCTION(atan)
_DEFINE_EXPR_UNARY_FUNCTION(exp)
_DEFINE_EXPR_UNARY_FUNCTION(log)
_DEFINE_EXPR_UNARY_FUNCTION(log10)
_DEFINE_EXPR_UNARY_FUNCTION(sqrt)
#undef _DEFINE_EXPR_UNARY_FUNCTION
#define _DEFINE_EXPR_BINARY_FUNCTION(_Fun) \
template<class _Dom1, class _Dom2> \
inline _Expr<_BinClos<__##_Fun, _Expr, _Expr, _Dom1, _Dom2>, \
typename _Dom1::value_type> \
_Fun(const _Expr<_Dom1, typename _Dom1::value_type>& __e1, \
const _Expr<_Dom2, typename _Dom2::value_type>& __e2) \
{ \
typedef typename _Dom1::value_type _Tp; \
typedef _BinClos<__##_Fun, _Expr, _Expr, _Dom1, _Dom2> _Closure; \
return _Expr<_Closure, _Tp>(_Closure(__e1(), __e2())); \
} \
\
template<class _Dom> \
inline _Expr<_BinClos<__##_Fun, _Expr, _ValArray, _Dom, \
typename _Dom::value_type>, \
typename _Dom::value_type> \
_Fun(const _Expr<_Dom, typename _Dom::value_type>& __e, \
const valarray<typename _Dom::value_type>& __v) \
{ \
typedef typename _Dom::value_type _Tp; \
typedef _BinClos<__##_Fun, _Expr, _ValArray, _Dom, _Tp> _Closure; \
return _Expr<_Closure, _Tp>(_Closure(__e(), __v)); \
} \
\
template<class _Dom> \
inline _Expr<_BinClos<__##_Fun, _ValArray, _Expr, \
typename _Dom::value_type, _Dom>, \
typename _Dom::value_type> \
_Fun(const valarray<typename _Dom::valarray>& __v, \
const _Expr<_Dom, typename _Dom::value_type>& __e) \
{ \
typedef typename _Dom::value_type _Tp; \
typedef _BinClos<__##_Fun, _ValArray, _Expr, _Tp, _Dom> _Closure; \
return _Expr<_Closure, _Tp>(_Closure(__v, __e())); \
} \
\
template<class _Dom> \
inline _Expr<_BinClos<__##_Fun, _Expr, _Constant, _Dom, \
typename _Dom::value_type>, \
typename _Dom::value_type> \
_Fun(const _Expr<_Dom, typename _Dom::value_type>& __e, \
const typename _Dom::value_type& __t) \
{ \
typedef typename _Dom::value_type _Tp; \
typedef _BinClos<__##_Fun, _Expr, _Constant, _Dom, _Tp> _Closure;\
return _Expr<_Closure, _Tp>(_Closure(__e(), __t)); \
} \
\
template<class _Dom> \
inline _Expr<_BinClos<__##_Fun, _Constant, _Expr, \
typename _Dom::value_type, _Dom>, \
typename _Dom::value_type> \
_Fun(const typename _Dom::value_type& __t, \
const _Expr<_Dom, typename _Dom::value_type>& __e) \
{ \
typedef typename _Dom::value_type _Tp; \
typedef _BinClos<__##_Fun, _Constant, _Expr, _Tp, _Dom> _Closure; \
return _Expr<_Closure, _Tp>(_Closure(__t, __e())); \
} \
\
template<typename _Tp> \
inline _Expr<_BinClos<__##_Fun, _ValArray, _ValArray, _Tp, _Tp>, _Tp> \
_Fun(const valarray<_Tp>& __v, const valarray<_Tp>& __w) \
{ \
typedef _BinClos<__##_Fun, _ValArray, _ValArray, _Tp, _Tp> _Closure; \
return _Expr<_Closure, _Tp>(_Closure(__v, __w)); \
} \
\
template<typename _Tp> \
inline _Expr<_BinClos<__##_Fun, _ValArray, _Constant, _Tp, _Tp>, _Tp> \
_Fun(const valarray<_Tp>& __v, const _Tp& __t) \
{ \
typedef _BinClos<__##_Fun, _ValArray, _Constant, _Tp, _Tp> _Closure; \
return _Expr<_Closure, _Tp>(_Closure(__v, __t)); \
} \
\
template<typename _Tp> \
inline _Expr<_BinClos<__##_Fun, _Constant, _ValArray, _Tp, _Tp>, _Tp> \
_Fun(const _Tp& __t, const valarray<_Tp>& __v) \
{ \
typedef _BinClos<__##_Fun, _Constant, _ValArray, _Tp, _Tp> _Closure; \
return _Expr<_Closure, _Tp>(_Closure(__t, __v)); \
}
_DEFINE_EXPR_BINARY_FUNCTION(atan2)
_DEFINE_EXPR_BINARY_FUNCTION(pow)
#undef _DEFINE_EXPR_BINARY_FUNCTION
_GLIBCXX_END_NAMESPACE
#endif /* _CPP_VALARRAY_AFTER_H */
```
|
Luke Leonard (born January 17, 1975) is an American theatre director, designer, actor, playwright, and filmmaker whose work has been described as "outstanding" by The New York Times and "sophisticated and thought-provoking" by Limelight Magazine. He is the Founding Artistic Director of Monk Parrots, a New York City-based not-for-profit that produces new theatre, music theatre, and opera.
Life and career
Luke Landric Leonard was born and raised in Houston, Texas, where he attended Cypress Creek High School, played football, and acted in school plays. After his junior year, he left the football team to become president of Cy Creek's Theatre Department and focus solely on acting to prepare for college auditions. He studied theatre at Sam Houston State University before moving to New York City in 1995 to enroll in the BFA Acting Program at Brooklyn College, where he graduated in 1998.
1996–2001
Leonard was among the pioneering artists living and working in DUMBO, Brooklyn, where he founded DUMBO Theater eXchange a/k/a DTX with Natalie Cook Leonard and Yukihiro Nishiyama. DTX promoted emerging talent by presenting new writers and directors and fostered neighborhood development within the downtown Brooklyn area. DTX; however, did not survive gentrification and the venue was added to the list of artist casualties forced out of DUMBO. On December 15, 2000, a week before Christmas, Leonard and his wife were illegally vacated from their loft on Water Street along with 60 other tenants. DTX presented approximately 30 productions (short and full length) circa 2000–2001 and hosted all theater events for the 4th Annual DUMBO Arts Festival, produced by Joy Glidden/d.u.m.b.o. arts center (dac). Leonard also studied acting and directing with legendary, experimental director Joseph Chaikin during this time and corresponded with Chaikin by letters until his passing in 2003.
2002–2004
Michelle Moskowitz-Brown hired Leonard to create a theatre series for a new performance space at Brooklyn Information and Culture called BRIC Studio (now BRIC Arts Media House). Leonard established Theater Nexus, a monthly series devoted to emerging and established theatre artists. After losing the DUMBO space, BRIC became DTX's new home for promoting alternative theatre in NYC. Curated by S. Melinda Dunlap and Leonard, Theater Nexus presented experimental work by numerous artists, such as, 13P, Mac Wellman, Jeffrey M. Jones, Young Jean Lee, Erin Courtney, Ken Rus Schmoll, Connie Congdon, S. Melinda Dunlap, Luke Leonard, David Todd, B. Walker Sampson, Barbara Cassidy, Jonathan Bernstein and Douglas Green, to name a few. In 2003, Leonard became the father of actress Gates Leonard.
2007–2010
DTX changed its name to Monk Parrots in 2007 and Leonard was accepted to the highly selective graduate directing program at The University of Texas at Austin, where he studied stage direction and studio art and received a Master of Fine Arts in 2010. Leonard was influenced by renowned artists at UT-Austin, such as, Michael Smith, sculptor Margo Sawyer, and playwrights Kirk Lynn and Steven Dietz. In 2009 he worked at Berliner Ensemble for experimental theatre director and visual artist Robert Wilson (director) and directed the Italian Premiere of Israel Horovitz's L'indiano vuole il Bronx (The Indian Wants the Bronx). In 2010 he directed the Texas Premiere of David Lang and Mac Wellman's The Difficulty of Crossing a Field, which was nominated for eight Austin Critics' Table Awards including Best Opera.
2010–2012
Leonard returned to New York to resume his role as artistic director of Monk Parrots and began building a new body of performance work. His concept-driven approach explores the possibilities of theatre and with his company he began to hone an "edgy choreographed directorial style"
Luke Leonard/Monk Parrots made Here I Go with playwright David Todd; a theatrical portrait of a Texan housewife in her 60s contemplating suicide inspired by the death of Leonard's grandmother. It was presented at 59E59 Theaters from May 22, 2012, to June 3, 2012. Leonard created the main character, Lynette, her circumstances and a performance structure, then asked Todd to write six monologues that Monk Parrots could arrange during rehearsals. The staging was created first with five, nonspeaking actors, then a prerecorded voice of Lynette was added to the actors' movements; blurring the lines between dance and theatre. Reviewer David Roberts described Here I Go as "a brilliantly conceived and executed performance work that truly crosses artistic boundaries."
2012–2014
Over brunch in New York, playwright Kirk Lynn asked Leonard what he was working on. Leonard handed him a copy of coaching legend Bum Phillips' autobiography and said he wanted to make an 'opera' based on Phillips' life. Lynn smiled and Leonard asked if he would read the book and consider writing the libretto. Later, Lynn agreed to create the libretto under the following condition, that Peter Stopschinski compose the score.
Former Monk Parrots board member, Steven Beede, Esq., initiated a call for Leonard to speak with Bum and Debbie Phillips. When asked how they felt about an opera based on Bum's life, Bum Phillips replied, "I can't sing a lick!" They arranged to meet in person, then Leonard, Stopschinski, and Leonard's parents traveled to the Phillips' ranch in Goliad, Texas to discuss the performance rights. Upon arrival, Leonard shook hands with Bum Phillips and said, "Mr. Phillips, it's a pleasure to meet you." Phillips replied, "It's a pleasure to want to be met at 89." They ate Subway sandwiches, baked beans, and pecan pie and Leonard and Stopschinski left with the Phillips' blessing to make the opera.
The world premiere of Bum Phillips Opera was presented in the Ellen Stewart Theatre at La MaMa Experimental Theatre Club in New York from March 12, 2014, to March 30, 2014. It was attended by Bum Phillips’ son, coach Wade Phillips, former NFL players, Dan Pastorini and Larry Harris, and featured on the nationally televised program NFL Films Presents produced by NFL Films. Wade Phillips commented, “It’s a great tribute for us and our family. There’s not many people that get an opera, Don Giovanni and the Barber of Seville.” Dan Pastorini said, “Let’s face it, Bum Phillips and opera don't belong in the same sentence," but admitted that he had tears running down his face by the end. After seeing the New York premiere, Pastorini made it a mission to bring the opera to Houston, which he did in September 2015.
The Texas Premiere was presented at The Stafford Centre on September 24, 2015, and attended by Hall of Fame running back Earl Campbell and Luv Ya Blue Houston Oilers, Mike Barber, Vernon Perry, Billy Johnson, Mike Renfro, and many more.
2015–2016
Australian Contemporary Opera Company discovered Leonard's work and hired him as Resident International Stage Director for The Opera Studio Melbourne. He directed and designed the Australian Premiere of The Difficulty of Crossing a Field to critical acclaim for the inaugural Nagambie Lakes Opera Festival, and artistic director Linda Thompson engaged him to direct and design the World Premiere of The Scottish Opera, an 80-minute reimagining of Giuseppe Verdi's Macbeth, arranged by composer Peter Stopschinski for an eight piece orchestra with electric instruments, which premiered at the 2nd Annual Nagambie Lakes Opera Festival.
Work
Opera
The Difficulty of Crossing a Field, 2010, Texas Premiere, Stage Director, Production Designer
The Turn of the Screw, 2012, Opera Moderne, New York, Stage Director, Production Designer
Bum Phillips, 2014, World Premiere, Monk Parrots/La MaMa Experimental Theatre Club, New York, Stage Director, Production Designer
Bum Phillips (opera), 2015, Texas Premiere, Stage Director, Production Designer
The Difficulty of Crossing a Field, 2015, Australian Premiere, Stage Director, Production Designer
The Scottish Opera, 2016, World Premiere, Nagambie Lakes Opera Festival, Australia, Stage Director, Production Designer
BMP: Next Generation, 2018, Beth Morrison (producer) Projects, National Sawdust, Stage Director
The Dinner Party Operas, 2018, American Opera Projects, Brooklyn Museum, Stage Director, Production Designer
The Shepherdess and The Chimney Sweep, chamber opera by Hannah Lash, 2019, American Opera Projects, SITE Santa Fe and Las Puertas, Stage Director, Production Designer
Macbeth (opera), 2019, Yarra Valley Opera Festival, Australia, Stage Director, Production Designer
Theatre
Desiderata, 1996, Writer/Performer
Inside the State Hospital, 1997, Writer/Performer
When We Sleep..., 1997, Writer/Performer
Nil to Nigh, 1998, Writer/Director/Designer/Performer
Bony & Poot, 2000, Writer/Director/Designer
Untitled, 1985, 2000, Writer/Director/Designer
Disposable Play No.2, 2000, Writer/Director/Designer
Broadway, 2000, Writer/Director/Designer
Movement Stolen From Joseph Chaikin's "Firmament" That We're Probably Doing Wrong Anyway, 2000, Writer/Director/Performer/Designer
50 ft of Film, 2001, Writer/Director/Designer/Performer
Mac Wellman's Mister Original Bugg, 2002, Director/Designer
Performance Record #1, 2002, Writer/Director/Designer
Evil-in-Progress, 2002, Writer/Director/Designer
Wonder/Play, 2002, Writer/Director/Designer
Head/line, 2004, Director/Designer/Performer
Jeffrey M. Jones' The Crazy Plays, 2004, Director/Designer
Pitched, 2006, Director/Designer
Our Lady of 121st Street, 2008, Director/Designer
Bad Penny, 2008, Director
L'indiano vuole il Bronx, 2009, Director/Lighting Designer
The Art of Depicting Nature as it is Seen by Toads, 2010, Concept/Director/Designer/Performer
Gay Rodeo By-Laws, 2011, Writer/Director/Designer
Here I Go, 2012, Concept/Director/Designer
After an Earlier Incident, 2013, Concept/Director/Designer
Welcome to the Kingdom of Saudi Arabia, 2015, Writer/Director/Designer
Film
No-Account Film, 1999, (short, unreleased), Writer/Director/Cinematographer/Editor
Urchin, 2007, (feature, released), Cinematographer
Antiquated Play, 2007, (short, unreleased), Writer/Director/Performer/Cinematographer/Editor/Producer
Follow Me Down, 2017, (feature, pre-production), Writer/Director/Producer
love fail (opera film), 2020, (short, released), Director/Designer/Editor
Awards
2015 – Outstanding Stage Director, OperaChaser Melbourne, The Difficulty of Crossing a Field
2016 – Outstanding Lighting Design, OperaChaser Melbourne, The Scottish Opera
See also
Experimental theatre
Devised theatre
Postdramatic theatre
References
External links
Luke Leonard Official site
Monk Parrots Official site
Bum Phillips Opera Official site
NFL Films Presents, Show: #7
Artists from Texas
1975 births
American artists
American theatre directors
Living people
Brooklyn College alumni
|
Dienethal is a municipality in the district of Rhein-Lahn, in Rhineland-Palatinate, in western Germany. It belongs to the association community of Bad Ems-Nassau.
References
Municipalities in Rhineland-Palatinate
Rhein-Lahn-Kreis
|
```go
/*
path_to_url
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package v1
// This file contains a collection of methods that can be used from go-restful to
// generate Swagger API documentation for its models. Please read this PR for more
// information on the implementation: path_to_url
//
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
// they are on one line! For multiple line or blocks that you want to ignore use ---.
// Any context after a --- is ignored.
//
// Those methods can be generated by using hack/update-codegen.sh
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
var map_AggregationRule = map[string]string{
"": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole",
"clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added",
}
func (AggregationRule) SwaggerDoc() map[string]string {
return map_AggregationRule
}
var map_ClusterRole = map[string]string{
"": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.",
"metadata": "Standard object's metadata.",
"rules": "Rules holds all the PolicyRules for this ClusterRole",
"aggregationRule": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.",
}
func (ClusterRole) SwaggerDoc() map[string]string {
return map_ClusterRole
}
var map_ClusterRoleBinding = map[string]string{
"": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
"metadata": "Standard object's metadata.",
"subjects": "Subjects holds references to the objects the role applies to.",
"roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.",
}
func (ClusterRoleBinding) SwaggerDoc() map[string]string {
return map_ClusterRoleBinding
}
var map_ClusterRoleBindingList = map[string]string{
"": "ClusterRoleBindingList is a collection of ClusterRoleBindings",
"metadata": "Standard object's metadata.",
"items": "Items is a list of ClusterRoleBindings",
}
func (ClusterRoleBindingList) SwaggerDoc() map[string]string {
return map_ClusterRoleBindingList
}
var map_ClusterRoleList = map[string]string{
"": "ClusterRoleList is a collection of ClusterRoles",
"metadata": "Standard object's metadata.",
"items": "Items is a list of ClusterRoles",
}
func (ClusterRoleList) SwaggerDoc() map[string]string {
return map_ClusterRoleList
}
var map_PolicyRule = map[string]string{
"": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.",
"verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.",
"apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"\" represents the core API group and \"*\" represents all API groups.",
"resources": "Resources is a list of resources this rule applies to. '*' represents all resources.",
"resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.",
"nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.",
}
func (PolicyRule) SwaggerDoc() map[string]string {
return map_PolicyRule
}
var map_Role = map[string]string{
"": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.",
"metadata": "Standard object's metadata.",
"rules": "Rules holds all the PolicyRules for this Role",
}
func (Role) SwaggerDoc() map[string]string {
return map_Role
}
var map_RoleBinding = map[string]string{
"": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
"metadata": "Standard object's metadata.",
"subjects": "Subjects holds references to the objects the role applies to.",
"roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.",
}
func (RoleBinding) SwaggerDoc() map[string]string {
return map_RoleBinding
}
var map_RoleBindingList = map[string]string{
"": "RoleBindingList is a collection of RoleBindings",
"metadata": "Standard object's metadata.",
"items": "Items is a list of RoleBindings",
}
func (RoleBindingList) SwaggerDoc() map[string]string {
return map_RoleBindingList
}
var map_RoleList = map[string]string{
"": "RoleList is a collection of Roles",
"metadata": "Standard object's metadata.",
"items": "Items is a list of Roles",
}
func (RoleList) SwaggerDoc() map[string]string {
return map_RoleList
}
var map_RoleRef = map[string]string{
"": "RoleRef contains information that points to the role being used",
"apiGroup": "APIGroup is the group for the resource being referenced",
"kind": "Kind is the type of resource being referenced",
"name": "Name is the name of resource being referenced",
}
func (RoleRef) SwaggerDoc() map[string]string {
return map_RoleRef
}
var map_Subject = map[string]string{
"": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
"kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.",
"apiGroup": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.",
"name": "Name of the object being referenced.",
"namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.",
}
func (Subject) SwaggerDoc() map[string]string {
return map_Subject
}
// AUTO-GENERATED FUNCTIONS END HERE
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.