text
stringlengths 1
22.8M
|
|---|
```javascript
//your_sha256_hash---------------------------------------
//your_sha256_hash---------------------------------------
function foo()
{
WScript.Echo("In function foo");
debugger;
var a1 = new Array(10);
a1[0] = {a:"10"};
eval('var inEval = 10;\n inEval++;\n');
debugger;
}
function bar()
{
WScript.Echo("In function bar");
debugger;
var a2 = {b:10};
debugger;
return a2.b;
}
foo();
bar();
WScript.Attach(foo);
WScript.Detach(foo);
```
|
```tex
\hypertarget{dfs__vertex_8h}{}\section{src/graph\+\_\+algorithms/basic\+\_\+graph/graph\+\_\+representation/graph\+\_\+vertex/dfs\+\_\+vertex.h File Reference}
\label{dfs__vertex_8h}\index{src/graph\+\_\+algorithms/basic\+\_\+graph/graph\+\_\+representation/graph\+\_\+vertex/dfs\+\_\+vertex.\+h@{src/graph\+\_\+algorithms/basic\+\_\+graph/graph\+\_\+representation/graph\+\_\+vertex/dfs\+\_\+vertex.\+h}}
{\ttfamily \#include \char`\"{}vertex.\+h\char`\"{}}\\*
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \hyperlink{your_sha256_hash_vertex}{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex$<$ K\+Type $>$}
\begin{DoxyCompactList}\small\item\em D\+F\+S\+\_\+\+Vertex2222.3 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Namespaces}
\begin{DoxyCompactItemize}
\item
\hyperlink{namespace_introduction_to_algorithm}{Introduction\+To\+Algorithm}
\begin{DoxyCompactList}\small\item\em Namespace of Introdunction\+To\+Algorithm. \end{DoxyCompactList}\item
\hyperlink{namespace_introduction_to_algorithm_1_1_graph_algorithm}{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm}
\begin{DoxyCompactList}\small\item\em Namespace of \hyperlink{namespace_introduction_to_algorithm_1_1_graph_algorithm}{Graph\+Algorithm}. \end{DoxyCompactList}\end{DoxyCompactItemize}
```
|
```php
<?php
declare(strict_types=1);
/**
*/
namespace OCP\DB\Events;
/**
* Event to allow apps to register information about missing database columns
*
* This event will be dispatched for checking on the admin settings and when running
* occ db:add-missing-columns which will then create those columns
*
* @since 28.0.0
*/
class AddMissingColumnsEvent extends \OCP\EventDispatcher\Event {
/** @var array<array-key, array{tableName: string, columnName: string, typeName: string, options: array{}}> */
private array $missingColumns = [];
/**
* @param mixed[] $options
* @since 28.0.0
*/
public function addMissingColumn(string $tableName, string $columnName, string $typeName, array $options): void {
$this->missingColumns[] = [
'tableName' => $tableName,
'columnName' => $columnName,
'typeName' => $typeName,
'options' => $options,
];
}
/**
* @since 28.0.0
* @return array<array-key, array{tableName: string, columnName: string, typeName: string, options: array{}}>
*/
public function getMissingColumns(): array {
return $this->missingColumns;
}
}
```
|
```java
/*
*/
package com.lightbend.lagom.javadsl.api.broker.kafka;
import com.lightbend.lagom.javadsl.api.Descriptor;
/**
* Provides a set of Kafka specific properties that can be used when creating a topic descriptor.
*/
public final class KafkaProperties {
private KafkaProperties() {}
private static final Descriptor.Properties.Property PARTITION_KEY_STRATEGY =
new Descriptor.Properties.Property<>(PartitionKeyStrategy.class, "kafkaPartitionKeyStrategy");
/**
* A PartitionKeyStrategy produces a key for each message published to a Kafka topic.
*
* <p>The key is used to determine on which topic's partition a message is published. It is
* guaranteed that messages with the same key will arrive to the same partition, in the order they
* are published.
*/
@SuppressWarnings("unchecked")
public static <Message>
Descriptor.Properties.Property<Message, PartitionKeyStrategy<Message>>
partitionKeyStrategy() {
return PARTITION_KEY_STRATEGY;
}
}
```
|
Climate change in Uruguay describes the effects of climate change in Uruguay. As the result of global temperature increases, Uruguay is expected to have temperature increases of 3 °C by about 2100 and there is expected increases in precipitation. Increases of climate rain in Uruguay and Argentina during 2018 was estimated by the World Meteorological organization to have caused $2.5 billion in damage.
The main sources of carbon emissions in Uruguay are food production and transport. When compared to the rest of the world, Uruguay only contributes 0.05% of the total global emissions. In 2017, Uruguay identified 106 methods of reducing emissions as part of their Nationally Determined Contributions to the Paris Climate Agreement. Activities include reductions of emissions across food and grain production, increases of native and reforested land, restoration of bogland and grasslands as carbon sinks. The Nationally Determined Contribution began a process of revision in 2020 with the objective to provide greater ambition in 2022.
To pursue climate policy, the country created the on 20 de mayo de 2009 the Sistema Nacional de Respuesta al Cambio Climático y variabilidad (SNRCC) through directive 238/09. The SNRCC produces reportes from monitoring and verification of the work to achieve the Nationally Determined Contribution and other policies.
In 2015, a law transformed that organization into a Secretariat for Environment, Water and Climate change. The Secretariat is charged with coordinating public policy across the three areas. The secretary participates in the committee of other actors in the National Environmental System (in Spanish, Sistema Nacional Ambiental (SNA)). Internationally, Uruguay is part of the Kyoto Protocol, Paris Accorde and the Doha Amendment. The private sector in Uruguay has committed to at least 15 actions to mitigate the effects of climate change, according to the NAZCA portal. Uruguay is also a member of the International Renewable Energy Agency.
Emissions inventory
In 2019 Uruguay emitted 6,170 Gg of . The largest source of emissions in Uruguay is transportation with 3,670 Gg of en 2019, with the second being industry (915 Gg), and the sectors of agriculture, fishing and minerals 484 Gg. The energy sector emits 610 Gg.
Environmental impacts
Changes to temperature and Climate
The second map shows the changes in Köppen classification for landscapes in Uruguay.
Mitigation and adaptation methods
The national system for managing public policy for climate change is the Sistema Nacional de Respuesta al Cambio Climático y variabilidad (SNRCC), the Sistema Nacional Ambiental, the Gabinete Nacional Ambiental and the Secretaría Nacional de Ambiente, Agua y Cambio Climático. In 2010 the parties created the National Climate Change Response Plan (Plan Nacional de Respuesta al Cambio Climático).In 2017, they extended and adapted the plan into a national policy for implementing their Nationally Determined Contribution .
Climate finance
For the period of 2015–2021, Uruguay received approximately US$1,153,103,861.08 of climate finance focused on funding mitigation in agriculture, urban mobility and other environmental institutions and programs.
Society and culture
In 2020, a survey of 1500 people in Uruguay, found that 90% of Uruguayans knew climate change was a problem and important for Uruguay to address .
See also
2022-2023 Uruguay drought
2022 Southern Cone heat wave
References
Climate of Uruguay
Uruguay
Environment of Uruguay
|
```javascript
/* global AFRAME */
var styleParser = AFRAME.utils.styleParser;
if (typeof AFRAME === 'undefined') {
throw new Error('Component attempted to register before AFRAME was available.');
}
AFRAME.registerComponent('event-set', {
schema: {
default: '',
parse: function (value) {
return styleParser.parse(value);
}
},
multiple: true,
init: function () {
this.eventHandler = null;
this.eventName = null;
},
update: function (oldData) {
this.removeEventListener();
this.updateEventListener();
this.addEventListener();
},
pause: function () {
this.removeEventListener();
},
play: function () {
this.addEventListener();
},
/**
* Update source-of-truth event listener registry.
* Does not actually attach event listeners yet.
*/
updateEventListener: function () {
var data = this.data;
var el = this.el;
var event;
var target;
var targetEl;
// Set event listener using `_event`.
event = data._event || this.id;
target = data._target;
// Decide the target to `setAttribute` on.
targetEl = target ? el.sceneEl.querySelector(target) : el;
this.eventName = event;
const handler = () => {
var propName;
// Set attributes.
for (propName in data) {
if (propName === '_event' || propName === '_target') { continue; }
AFRAME.utils.entity.setComponentProperty.call(this, targetEl, propName,
data[propName]);
}
};
if (!isNaN(data._delay)) {
// Delay.
this.eventHandler = () => { setTimeout(handler, parseFloat(data._delay)); };
} else {
this.eventHandler = handler;
}
},
addEventListener: function () {
this.el.addEventListener(this.eventName, this.eventHandler);
},
removeEventListener: function () {
this.el.removeEventListener(this.eventName, this.eventHandler);
}
});
```
|
```python
# coding: utf-8
from __future__ import unicode_literals
from ..util import get_doc
from ...tokens import Doc
from ...vocab import Vocab
import pytest
import numpy
@pytest.mark.parametrize('text', [["one", "two", "three"]])
def test_doc_api_compare_by_string_position(en_vocab, text):
doc = get_doc(en_vocab, text)
# Get the tokens in this order, so their ID ordering doesn't match the idx
token3 = doc[-1]
token2 = doc[-2]
token1 = doc[-1]
token1, token2, token3 = doc
assert token1 < token2 < token3
assert not token1 > token2
assert token2 > token1
assert token2 <= token3
assert token3 >= token1
def test_doc_api_getitem(en_tokenizer):
text = "Give it back! He pleaded."
tokens = en_tokenizer(text)
assert tokens[0].text == 'Give'
assert tokens[-1].text == '.'
with pytest.raises(IndexError):
tokens[len(tokens)]
def to_str(span):
return '/'.join(token.text for token in span)
span = tokens[1:1]
assert not to_str(span)
span = tokens[1:4]
assert to_str(span) == 'it/back/!'
span = tokens[1:4:1]
assert to_str(span) == 'it/back/!'
with pytest.raises(ValueError):
tokens[1:4:2]
with pytest.raises(ValueError):
tokens[1:4:-1]
span = tokens[-3:6]
assert to_str(span) == 'He/pleaded'
span = tokens[4:-1]
assert to_str(span) == 'He/pleaded'
span = tokens[-5:-3]
assert to_str(span) == 'back/!'
span = tokens[5:4]
assert span.start == span.end == 5 and not to_str(span)
span = tokens[4:-3]
assert span.start == span.end == 4 and not to_str(span)
span = tokens[:]
assert to_str(span) == 'Give/it/back/!/He/pleaded/.'
span = tokens[4:]
assert to_str(span) == 'He/pleaded/.'
span = tokens[:4]
assert to_str(span) == 'Give/it/back/!'
span = tokens[:-3]
assert to_str(span) == 'Give/it/back/!'
span = tokens[-3:]
assert to_str(span) == 'He/pleaded/.'
span = tokens[4:50]
assert to_str(span) == 'He/pleaded/.'
span = tokens[-50:4]
assert to_str(span) == 'Give/it/back/!'
span = tokens[-50:-40]
assert span.start == span.end == 0 and not to_str(span)
span = tokens[40:50]
assert span.start == span.end == 7 and not to_str(span)
span = tokens[1:4]
assert span[0].orth_ == 'it'
subspan = span[:]
assert to_str(subspan) == 'it/back/!'
subspan = span[:2]
assert to_str(subspan) == 'it/back'
subspan = span[1:]
assert to_str(subspan) == 'back/!'
subspan = span[:-1]
assert to_str(subspan) == 'it/back'
subspan = span[-2:]
assert to_str(subspan) == 'back/!'
subspan = span[1:2]
assert to_str(subspan) == 'back'
subspan = span[-2:-1]
assert to_str(subspan) == 'back'
subspan = span[-50:50]
assert to_str(subspan) == 'it/back/!'
subspan = span[50:-50]
assert subspan.start == subspan.end == 4 and not to_str(subspan)
@pytest.mark.parametrize('text', ["Give it back! He pleaded.",
" Give it back! He pleaded. "])
def test_doc_api_serialize(en_tokenizer, text):
tokens = en_tokenizer(text)
new_tokens = get_doc(tokens.vocab).from_bytes(tokens.to_bytes())
assert tokens.text == new_tokens.text
assert [t.text for t in tokens] == [t.text for t in new_tokens]
assert [t.orth for t in tokens] == [t.orth for t in new_tokens]
def test_doc_api_set_ents(en_tokenizer):
text = "I use goggle chrone to surf the web"
tokens = en_tokenizer(text)
assert len(tokens.ents) == 0
tokens.ents = [(tokens.vocab.strings['PRODUCT'], 2, 4)]
assert len(list(tokens.ents)) == 1
assert [t.ent_iob for t in tokens] == [0, 0, 3, 1, 0, 0, 0, 0]
assert tokens.ents[0].label_ == 'PRODUCT'
assert tokens.ents[0].start == 2
assert tokens.ents[0].end == 4
def test_doc_api_merge(en_tokenizer):
text = "WKRO played songs by the beach boys all night"
# merge 'The Beach Boys'
doc = en_tokenizer(text)
assert len(doc) == 9
doc.merge(doc[4].idx, doc[6].idx + len(doc[6]), tag='NAMED', lemma='LEMMA',
ent_type='TYPE')
assert len(doc) == 7
assert doc[4].text == 'the beach boys'
assert doc[4].text_with_ws == 'the beach boys '
assert doc[4].tag_ == 'NAMED'
# merge 'all night'
doc = en_tokenizer(text)
assert len(doc) == 9
doc.merge(doc[7].idx, doc[8].idx + len(doc[8]), tag='NAMED', lemma='LEMMA',
ent_type='TYPE')
assert len(doc) == 8
assert doc[7].text == 'all night'
assert doc[7].text_with_ws == 'all night'
def test_doc_api_merge_children(en_tokenizer):
"""Test that attachments work correctly after merging."""
text = "WKRO played songs by the beach boys all night"
doc = en_tokenizer(text)
assert len(doc) == 9
doc.merge(doc[4].idx, doc[6].idx + len(doc[6]), tag='NAMED', lemma='LEMMA',
ent_type='TYPE')
for word in doc:
if word.i < word.head.i:
assert word in list(word.head.lefts)
elif word.i > word.head.i:
assert word in list(word.head.rights)
def test_doc_api_merge_hang(en_tokenizer):
text = "through North and South Carolina"
doc = en_tokenizer(text)
doc.merge(18, 32, tag='', lemma='', ent_type='ORG')
doc.merge(8, 32, tag='', lemma='', ent_type='ORG')
def test_doc_api_sents_empty_string(en_tokenizer):
doc = en_tokenizer("")
doc.is_parsed = True
sents = list(doc.sents)
assert len(sents) == 0
def test_doc_api_runtime_error(en_tokenizer):
# Example that caused run-time error while parsing Reddit
text = "67% of black households are single parent \n\n72% of all black babies born out of wedlock \n\n50% of all black kids don\u2019t finish high school"
deps = ['nsubj', 'prep', 'amod', 'pobj', 'ROOT', 'amod', 'attr', '',
'nummod', 'prep', 'det', 'amod', 'pobj', 'acl', 'prep', 'prep',
'pobj', '', 'nummod', 'prep', 'det', 'amod', 'pobj', 'aux', 'neg',
'ROOT', 'amod', 'dobj']
tokens = en_tokenizer(text)
doc = get_doc(tokens.vocab, [t.text for t in tokens], deps=deps)
nps = []
for np in doc.noun_chunks:
while len(np) > 1 and np[0].dep_ not in ('advmod', 'amod', 'compound'):
np = np[1:]
if len(np) > 1:
nps.append((np.start_char, np.end_char, np.root.tag_, np.text, np.root.ent_type_))
for np in nps:
start, end, tag, lemma, ent_type = np
doc.merge(start, end, tag=tag, lemma=lemma, ent_type=ent_type)
def test_doc_api_right_edge(en_tokenizer):
"""Test for bug occurring from Unshift action, causing incorrect right edge"""
text = "I have proposed to myself, for the sake of such as live under the government of the Romans, to translate those books into the Greek tongue."
heads = [2, 1, 0, -1, -1, -3, 15, 1, -2, -1, 1, -3, -1, -1, 1, -2, -1, 1,
-2, -7, 1, -19, 1, -2, -3, 2, 1, -3, -26]
tokens = en_tokenizer(text)
doc = get_doc(tokens.vocab, [t.text for t in tokens], heads=heads)
assert doc[6].text == 'for'
subtree = [w.text for w in doc[6].subtree]
assert subtree == ['for', 'the', 'sake', 'of', 'such', 'as',
'live', 'under', 'the', 'government', 'of', 'the', 'Romans', ',']
assert doc[6].right_edge.text == ','
def test_doc_api_has_vector():
vocab = Vocab()
vocab.reset_vectors(width=2)
vocab.set_vector('kitten', vector=numpy.asarray([0., 2.], dtype='f'))
doc = Doc(vocab, words=['kitten'])
assert doc.has_vector
def test_doc_api_similarity_match():
doc = Doc(Vocab(), words=['a'])
assert doc.similarity(doc[0]) == 1.0
assert doc.similarity(doc.vocab['a']) == 1.0
doc2 = Doc(doc.vocab, words=['a', 'b', 'c'])
assert doc.similarity(doc2[:1]) == 1.0
assert doc.similarity(doc2) == 0.0
def test_lowest_common_ancestor(en_tokenizer):
tokens = en_tokenizer('the lazy dog slept')
doc = get_doc(tokens.vocab, [t.text for t in tokens], heads=[2, 1, 1, 0])
lca = doc.get_lca_matrix()
assert(lca[1, 1] == 1)
assert(lca[0, 1] == 2)
assert(lca[1, 2] == 2)
def test_parse_tree(en_tokenizer):
"""Tests doc.print_tree() method."""
text = 'I like New York in Autumn.'
heads = [1, 0, 1, -2, -3, -1, -5]
tags = ['PRP', 'IN', 'NNP', 'NNP', 'IN', 'NNP', '.']
tokens = en_tokenizer(text)
doc = get_doc(tokens.vocab, [t.text for t in tokens], heads=heads, tags=tags)
# full method parse_tree(text) is a trivial composition
trees = doc.print_tree()
assert len(trees) > 0
tree = trees[0]
assert all(k in list(tree.keys()) for k in ['word', 'lemma', 'NE', 'POS_fine', 'POS_coarse', 'arc', 'modifiers'])
assert tree['word'] == 'like' # check root is correct
```
|
Central Asians in the United Kingdom are Central Asians living in the United Kingdom. They have been present in the country since the 21st century and primarily originate from the countries Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan, and Uzbekistan.
Population history
The UK Government considers the Central Asian sovereign states to be Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan and Uzbekistan. According to United Nations population estimates conducted in 2015, there are over 10,000 Central Asian people residing in the United Kingdom. In 2001, Nooralhaq Nasimi founded the Afghanistan and Central Asian Association (ACAA) in London, which seeks to specifically help Afghan, as well as Central Asian refugees settle in the UK.
Subgroups
Kazakhs
The UN has estimated that there are 5,432 Kazakhs living in the United Kingdom, as of 2015. In 2009, it was reported that Kazakh entrepreneurs were achieving high positions in British industry. Kazakh politician Dariga Nazarbayeva is a part-time resident in London. In 2011, Kazakh businessman Mukhtar Ablyazov was granted asylum in the UK, along with his wife and children. In 2018, a Kazakh TV-feature reported how ethnic Kazakhs in the UK preserved their culture and language while living as part of the diaspora.
Kazakhs have studied at British schools and universities since at least 2006. In the 2006/2007 school year, private school Haileybury and Imperial Service College had 14 Kazakh students. In 2020, it was reported that the UK was the most popular destination of Kazakhstan's Bolashak Programme, allowing the majority of its students to reside and study in Britain.
Kyrgyz
Between 1997 and 2002, Kyrgyz diplomat Roza Otunbayeva resided in London, England, serving as the Central Asian nation's ambassador to the UK. In 2007, the Israeli Government helped support an appeal against the deportation of Kyrgyz nationals from the United Kingdom. The refugees, who were orphaned twin sisters and resided in Birmingham, England, were claiming asylum in the country. Kyrgyz former politician Maxim Bakiyev is a resident in the United Kingdom. In 2015, the UN estimated there were 1,132 Kyrgyz residents in the UK.
Tajiks
In 2013, Tajik child care workers gained temporary residency in the UK, travelling to Falkirk, Scotland for professional training in their field. The sharing of modern child care techniques was administered by Falkirk Council and funded by an EU-backed scheme. By 2015, the UN had estimated a total population of 455 Tajiks in the country.
Turkmens
In 2015, the UN estimated that there were 784 Turkmens residing in the United Kingdom.
Uzbeks
The second largest national subgroup of Central Asians after Kazakhs, the United Nations estimated a total population of 2,864 Uzbeks living in the United Kingdom in 2015.
See also
British Turks
British Asian
East Asians in the United Kingdom
Southeast Asians in the United Kingdom
References
External links
Asian diaspora in the United Kingdom
Central Asian diaspora
|
```go
package templates
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"time"
"golang.org/x/net/context"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
strfmt "github.com/go-openapi/strfmt"
)
// NewTemplatesLibDeleteParams creates a new TemplatesLibDeleteParams object
// with the default values initialized.
func NewTemplatesLibDeleteParams() *TemplatesLibDeleteParams {
var (
scopeDefault = string("global")
)
return &TemplatesLibDeleteParams{
Scope: &scopeDefault,
timeout: cr.DefaultTimeout,
}
}
// NewTemplatesLibDeleteParamsWithTimeout creates a new TemplatesLibDeleteParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewTemplatesLibDeleteParamsWithTimeout(timeout time.Duration) *TemplatesLibDeleteParams {
var (
scopeDefault = string("global")
)
return &TemplatesLibDeleteParams{
Scope: &scopeDefault,
timeout: timeout,
}
}
// NewTemplatesLibDeleteParamsWithContext creates a new TemplatesLibDeleteParams object
// with the default values initialized, and the ability to set a context for a request
func NewTemplatesLibDeleteParamsWithContext(ctx context.Context) *TemplatesLibDeleteParams {
var (
scopeDefault = string("global")
)
return &TemplatesLibDeleteParams{
Scope: &scopeDefault,
Context: ctx,
}
}
// NewTemplatesLibDeleteParamsWithHTTPClient creates a new TemplatesLibDeleteParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewTemplatesLibDeleteParamsWithHTTPClient(client *http.Client) *TemplatesLibDeleteParams {
var (
scopeDefault = string("global")
)
return &TemplatesLibDeleteParams{
Scope: &scopeDefault,
HTTPClient: client,
}
}
/*TemplatesLibDeleteParams contains all the parameters to send to the API endpoint
for the templates lib delete operation typically these are written to a http.Request
*/
type TemplatesLibDeleteParams struct {
/*Name
The name of the template
*/
Name string
/*Scope
The template scope
*/
Scope *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the templates lib delete params
func (o *TemplatesLibDeleteParams) WithTimeout(timeout time.Duration) *TemplatesLibDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the templates lib delete params
func (o *TemplatesLibDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the templates lib delete params
func (o *TemplatesLibDeleteParams) WithContext(ctx context.Context) *TemplatesLibDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the templates lib delete params
func (o *TemplatesLibDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the templates lib delete params
func (o *TemplatesLibDeleteParams) WithHTTPClient(client *http.Client) *TemplatesLibDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the templates lib delete params
func (o *TemplatesLibDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithName adds the name to the templates lib delete params
func (o *TemplatesLibDeleteParams) WithName(name string) *TemplatesLibDeleteParams {
o.SetName(name)
return o
}
// SetName adds the name to the templates lib delete params
func (o *TemplatesLibDeleteParams) SetName(name string) {
o.Name = name
}
// WithScope adds the scope to the templates lib delete params
func (o *TemplatesLibDeleteParams) WithScope(scope *string) *TemplatesLibDeleteParams {
o.SetScope(scope)
return o
}
// SetScope adds the scope to the templates lib delete params
func (o *TemplatesLibDeleteParams) SetScope(scope *string) {
o.Scope = scope
}
// WriteToRequest writes these params to a swagger request
func (o *TemplatesLibDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param name
if err := r.SetPathParam("name", o.Name); err != nil {
return err
}
if o.Scope != nil {
// query param scope
var qrScope string
if o.Scope != nil {
qrScope = *o.Scope
}
qScope := qrScope
if qScope != "" {
if err := r.SetQueryParam("scope", qScope); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
```
|
Ukraine competed at the 2000 Summer Olympics in Sydney, Australia. 230 competitors, 139 men and 91 women, took part in 185 events in 23 sports.
Medalists
Gold
Mykola Milchev — Shooting, Men's Skeet Shooting
Yana Klochkova — Swimming, Women's 200 m Individual Medley
Yana Klochkova — Swimming, Women's 400 m Individual Medley
Silver
Kateryna Serdyuk, Nataliya Burdeyna, and Olena Sadovnycha — Archery, Women's Team
Andreas Kotelnik — Boxing, Men's Lightweight
Serhiy Dotsenko — Boxing, Men's Welterweight
Serhiy Chernyavsky, Oleksandr Fedenko, Serhiy Matveyev, and Oleksandr Symonenko — Cycling, Men's 4000 m Team Pursuit
Oleksandr Beresch, Valeriy Honcharov, Ruslan Myezyentsev, Valeriy Pereshkura, Oleksandr Svitlychyi, and Roman Zozulya — Gymnastics, Men's Team Combined Exercises
Oksana Tsyhuleva — Gymnastics, Women's Trampoline Individual
Denys Sylantyev — Swimming, Men's 200 m Butterfly
Yana Klochkova — Swimming, Women's 800 m Freestyle
Davyd Saldadze — Wrestling, Men's Greco-Roman Heavyweight (97 kg)
Yevhen Buslovych — Wrestling, Men's Freestyle Bantamweight (58 kg)
Bronze
Roman Schurenko — Athletics, Men's Long Jump
Olena Hovorova — Athletics, Women's Triple Jump
Volodymyr Sydorenko — Boxing, Men's Flyweight
Serhiy Danylchenko — Boxing, Men's Bantamweight
Andriy Fedchuk — Boxing, Men's Light Heavyweight
Iryna Yanovych — Cycling, Women's Sprint
Hanna Sorokina and Olena Zhupina — Diving, Women's Synchronised Springboard
Oleksandr Beresch — Gymnastics, Men's All-around Individual
Ruslan Mashurenko — Judo, Men's Middleweight (90 kg)
Olena Pakholchik and Ruslana Taran — Sailing, Women's 470 Team Competition
Archery
The silver medal that the Ukrainian women's team won in Sydney was the best result the Ukrainian archery squad had yet posted.
Men
Women
Athletics
Men
Track & road events
Field events
Combined events – Decathlon
Women
Track & road events
Field events
Combined events – Heptathlon
Badminton
Boxing
Men
Canoeing
Sprint
Men
Women
Qualification Legend: 'R = Qualify to repechage; QS = Qualify to semi-final; QF = Qualify directly to final
Cycling
Road
Men
Women
Track
Men
Pursuit
Points race
Madison
Women
Time trial
Sprint
Mountain biking
Men
Diving
Men
Women
Fencing
Ten fencers, seven men and three women, represented Ukraine in 2000.
Men
Women
Gymnastics
Men
Team
Individual finals
Women
Team
Individual finals
Judo
Men
Women
Modern pentathlon
Rhythmic gymnastics
Women
Rowing
Men
Women
Sailing
Men
Women
Open
M = Medal race; EL = Eliminated – did not advance into the medal race; CAN = Race cancelled
Shooting
Six Ukrainian shooters (four men and two women) qualified to compete in the following events:
Men
Women
Swimming
Men
Women
Synchronized swimming
Women
Table tennis
Women
Tennis
Ukraine nominated two female tennis players to compete in the tournament.
Women
Trampolining
Triathlon
Men
Weightlifting
Men
Women
Wrestling
Men's freestyle
Men's Greco-Roman
Notes
Wallechinsky, David (2004). The Complete Book of the Summer Olympics (Athens 2004 Edition). Toronto, Canada. .
International Olympic Committee (2001). The Results. Retrieved 12 November 2005.
Sydney Organising Committee for the Olympic Games (2001). Official Report of the XXVII Olympiad Volume 1: Preparing for the Games. Retrieved 20 November 2005.
Sydney Organising Committee for the Olympic Games (2001). Official Report of the XXVII Olympiad Volume 2: Celebrating the Games. Retrieved 20 November 2005.
Sydney Organising Committee for the Olympic Games (2001). The Results. Retrieved 20 November 2005.
International Olympic Committee Web Site
References
Nations at the 2000 Summer Olympics
2000
Summer Olympics
|
```objective-c
#pragma once
#include <ATen/record_function.h>
#include <torch/csrc/Export.h>
#include <utility>
namespace torch {
namespace profiler {
namespace impl {
// your_sha256_hash------------
// -- Profiler Config ---------------------------------------------------------
// your_sha256_hash------------
enum class C10_API_ENUM ActivityType {
CPU = 0,
XPU, // XPU kernels, runtime
CUDA, // CUDA kernels, runtime
MTIA, // MTIA kernels, runtime
PrivateUse1, // PrivateUse1 kernels, runtime
NUM_KINETO_ACTIVITIES, // must be the last one
};
inline std::string actToString(ActivityType t) {
const std::string ActivityTypeNames[] = {
"CPU", "XPU", "CUDA", "MTIA", "PrivateUse1"};
return ActivityTypeNames[static_cast<int>(t)];
}
enum class C10_API_ENUM ProfilerState {
Disabled = 0,
CPU, // CPU-only profiling
CUDA, // CPU + CUDA events
NVTX, // only emit NVTX markers
ITT, // only emit ITT markers
PRIVATEUSE1, // only emit PRIVATEUSE1 markers
KINETO, // use libkineto
KINETO_GPU_FALLBACK, // use CUDA events when CUPTI is not available
KINETO_PRIVATEUSE1_FALLBACK, // use PrivateUse1 events
KINETO_ONDEMAND, // run the profiler in on-demand mode
NUM_PROFILER_STATES, // must be the last one
};
enum class C10_API_ENUM ActiveProfilerType {
NONE = 0,
LEGACY,
KINETO,
NVTX,
ITT,
PRIVATEUSE1
};
struct TORCH_API ExperimentalConfig {
ExperimentalConfig(
std::vector<std::string> profiler_metrics = {},
bool profiler_measure_per_kernel = false,
bool verbose = false,
std::vector<std::string> performance_events = {},
bool enable_cuda_sync_events = false,
bool adjust_timestamps = false);
explicit operator bool() const;
std::vector<std::string> profiler_metrics;
bool profiler_measure_per_kernel;
bool verbose;
/*
* List of performance events to be profiled.
* An empty list will disable performance event based profiling altogether.
*/
std::vector<std::string> performance_events;
/*
* For CUDA profiling mode, enable adding CUDA synchronization events
* that expose CUDA device, stream and event synchronization activities.
* This feature is new and currently disabled by default.
*/
bool enable_cuda_sync_events;
/*
* Controls whether or not timestamp adjustment occurs after profiling.
* The purpose of this is to adjust Vulkan event timelines to align with those
* of their parent CPU events.
* This sometimes requires increasing CPU event durations (to fully contain
* their child events) and delaying CPU event start times (to
* prevent overlaps), so this should not be used unless Vulkan events are
* being profiled and it is ok to use this modified timestamp/duration
* information instead of the original information.
*/
bool adjust_timestamps;
};
struct TORCH_API ProfilerConfig {
ProfilerConfig(
ProfilerState state,
bool report_input_shapes = false,
bool profile_memory = false,
bool with_stack = false,
bool with_flops = false,
bool with_modules = false,
ExperimentalConfig experimental_config = ExperimentalConfig());
bool disabled() const;
bool global() const;
ProfilerState state;
ExperimentalConfig experimental_config;
bool report_input_shapes;
bool profile_memory;
bool with_stack;
bool with_flops;
bool with_modules;
// For serialization
at::IValue toIValue() const;
static ProfilerConfig fromIValue(const at::IValue& profilerConfigIValue);
};
// your_sha256_hash------------
// -- Profiler base class -----------------------------------------------------
// your_sha256_hash------------
struct TORCH_API ProfilerStateBase : public c10::MemoryReportingInfoBase {
explicit ProfilerStateBase(ProfilerConfig config);
~ProfilerStateBase() override;
static ProfilerStateBase* get(bool global);
static ProfilerStateBase* get() {
auto* out = get(/*global=*/true);
return out ? out : get(/*global=*/false);
}
static void push(std::shared_ptr<ProfilerStateBase>&& state);
static std::shared_ptr<ProfilerStateBase> pop(bool global);
static std::shared_ptr<ProfilerStateBase> pop() {
auto out = pop(/*global=*/true);
return out ? std::move(out) : pop(/*global=*/false);
}
const ProfilerConfig& config() const {
return config_;
}
void setCallbackHandle(at::CallbackHandle handle);
void removeCallback();
bool memoryProfilingEnabled() const override {
return config_.profile_memory;
}
virtual ActiveProfilerType profilerType() = 0;
protected:
// NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes)
std::mutex state_mutex_;
// NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes)
ProfilerConfig config_ = ProfilerConfig(ProfilerState::Disabled);
// NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes)
at::CallbackHandle handle_ = 0;
};
// Note: The following are only for the active *thread local* profiler.
TORCH_API bool profilerEnabled();
TORCH_API ActiveProfilerType profilerType();
TORCH_API ProfilerConfig getProfilerConfig();
} // namespace impl
} // namespace profiler
} // namespace torch
```
|
Tavistock Hundred was the name of one of thirty two ancient administrative units of Devon, England.
The parishes in the hundred were:
Brentor,
Milton Abbot and
Tavistock
See also
List of hundreds of England and Wales - Devon
References
Hundreds of Devon
|
"If Not for You" is a song by Bob Dylan, also covered by George Harrison and Olivia Newton-John.
If Not for You may also refer to:
If Not for You (album), an album by Olivia Newton-John
If Not for You (TV series), an American sitcom
"If Not for You" (George Jones song), 1969
|
```go
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// EntropyDevice Defines an entropy device.
//
// swagger:model EntropyDevice
type EntropyDevice struct {
// rate limiter
RateLimiter *RateLimiter `json:"rate_limiter,omitempty"`
}
// Validate validates this entropy device
func (m *EntropyDevice) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateRateLimiter(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *EntropyDevice) validateRateLimiter(formats strfmt.Registry) error {
if swag.IsZero(m.RateLimiter) { // not required
return nil
}
if m.RateLimiter != nil {
if err := m.RateLimiter.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("rate_limiter")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("rate_limiter")
}
return err
}
}
return nil
}
// ContextValidate validate this entropy device based on the context it is used
func (m *EntropyDevice) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateRateLimiter(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *EntropyDevice) contextValidateRateLimiter(ctx context.Context, formats strfmt.Registry) error {
if m.RateLimiter != nil {
if err := m.RateLimiter.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("rate_limiter")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("rate_limiter")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *EntropyDevice) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EntropyDevice) UnmarshalBinary(b []byte) error {
var res EntropyDevice
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
```
|
```c
/* packet-ipoib.c
* Routines for decoding IP over InfiniBand (IPoIB) packet disassembly
* See: path_to_url#section-6
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
*
* This program is free software; you can redistribute it and/or
* as published by the Free Software Foundation; either version 2
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include <epan/packet.h>
#include <epan/etypes.h>
#include <wiretap/wtap.h>
void proto_register_ipoib(void);
void proto_reg_handoff_ipoib(void);
static int proto_ipoib = -1;
static int hf_dgid = -1;
static int hf_daddr = -1;
static int hf_daddr_qpn = -1;
static int hf_grh = -1;
static int hf_grh_ip_version = -1;
static int hf_grh_traffic_class = -1;
static int hf_grh_flow_label = -1;
static int hf_grh_sqpn = -1;
static int hf_grh_sgid = -1;
static int hf_type = -1;
static int hf_reserved = -1;
static gint ett_raw = -1;
static gint ett_hdr = -1;
static dissector_handle_t arp_handle;
static dissector_handle_t ip_handle;
static dissector_handle_t ipv6_handle;
static int
dissect_ipoib(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *fh_tree;
proto_tree *fh_subtree;
proto_item *ti;
tvbuff_t *next_tvb;
guint16 type;
int grh_size = 0;
if (pinfo->phdr->pkt_encap == WTAP_ENCAP_IP_OVER_IB_PCAP)
grh_size = 40;
/* load the top pane info. This should be overwritten by
the next protocol in the stack */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPoIB");
col_set_str(pinfo->cinfo, COL_INFO, "IP over Infiniband");
/* populate a tree in the second pane with the IPoIB header data */
if (tree) {
ti = proto_tree_add_item (tree, proto_ipoib, tvb, 0, grh_size + 4, ENC_NA);
fh_tree = proto_item_add_subtree(ti, ett_raw);
/* for PCAP data populate subtree with GRH pseudo header data */
if (pinfo->phdr->pkt_encap == WTAP_ENCAP_IP_OVER_IB_PCAP) {
/* Zero means GRH is not valid (unicast). Only destination
address is set. */
if (tvb_get_ntohs(tvb, 0) == 0) {
ti = proto_tree_add_item (fh_tree, hf_daddr, tvb, 20, 20, ENC_NA);
fh_subtree = proto_item_add_subtree(ti, ett_hdr);
proto_tree_add_item(fh_subtree, hf_daddr_qpn, tvb, 21, 3, ENC_BIG_ENDIAN);
proto_tree_add_item(fh_subtree, hf_dgid, tvb, 24, 16, ENC_NA);
} else {
ti = proto_tree_add_item (fh_tree, hf_grh, tvb, 0, 40, ENC_NA);
fh_subtree = proto_item_add_subtree(ti, ett_hdr);
proto_tree_add_item(fh_subtree, hf_grh_ip_version, tvb, 0, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(fh_subtree, hf_grh_traffic_class, tvb, 0, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(fh_subtree, hf_grh_flow_label,tvb, 0, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(fh_subtree, hf_grh_sqpn, tvb, 5, 3, ENC_BIG_ENDIAN);
proto_tree_add_item(fh_subtree, hf_grh_sgid, tvb, 8, 16, ENC_NA);
proto_tree_add_item(fh_subtree, hf_dgid, tvb, 24, 16, ENC_NA);
}
}
proto_tree_add_item(fh_tree, hf_type, tvb, grh_size + 0, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(fh_tree, hf_reserved, tvb, grh_size + 2, 2, ENC_BIG_ENDIAN);
}
next_tvb = tvb_new_subset_remaining(tvb, grh_size + 4);
type = tvb_get_ntohs(tvb, grh_size + 0);
switch (type) {
case ETHERTYPE_IP:
call_dissector(ip_handle, next_tvb, pinfo, tree);
break;
case ETHERTYPE_IPv6:
call_dissector(ipv6_handle, next_tvb, pinfo, tree);
break;
case ETHERTYPE_ARP:
case ETHERTYPE_REVARP:
call_dissector(arp_handle, next_tvb, pinfo, tree);
break;
default:
break;
}
return tvb_captured_length(tvb);
}
void
proto_register_ipoib(void)
{
static hf_register_info hf[] = {
{ &hf_daddr,
{ "Destination address", "ipoib.daddr",
FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL}},
{ &hf_daddr_qpn,
{ "Destination QPN", "ipoib.daddr.qpn",
FT_UINT24, BASE_HEX, NULL, 0x0,
NULL, HFILL}},
{ &hf_dgid,
{ "Destination GID", "ipoib.dgid",
FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_grh,
{ "Global Route Header", "ipoib.grh",
FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL}},
{ &hf_grh_ip_version, {
"IP Version", "ipoib.grh.ipver",
FT_UINT8, BASE_DEC, NULL, 0xF0,
NULL, HFILL}},
{ &hf_grh_traffic_class, {
"Traffic Class", "ipoib.grh.tclass",
FT_UINT16, BASE_DEC, NULL, 0x0FF0,
NULL, HFILL}},
{ &hf_grh_flow_label, {
"Flow Label", "ipoib.grh.flowlabel",
FT_UINT32, BASE_DEC, NULL, 0x000FFFFF,
NULL, HFILL}},
{ &hf_grh_sqpn,
{ "Source QPN", "ipoib.grh.sqpn",
FT_UINT24, BASE_HEX, NULL, 0x0,
NULL, HFILL}},
{ &hf_grh_sgid,
{ "Source GID", "ipoib.grh.sgid",
FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_type,
{ "Type", "ipoib.type",
FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
NULL, HFILL }},
{ &hf_reserved,
{ "Reserved", "ipoib.reserved",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }}
};
static gint *ett[] = {
&ett_raw,
&ett_hdr
};
proto_ipoib = proto_register_protocol("IP over Infiniband", "IPoIB", "ipoib");
proto_register_field_array(proto_ipoib, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_ipoib(void)
{
dissector_handle_t ipoib_handle;
/*
* Get handles for the ARP, IP and IPv6 dissectors.
*/
arp_handle = find_dissector_add_dependency("arp", proto_ipoib);
ip_handle = find_dissector_add_dependency("ip", proto_ipoib);
ipv6_handle = find_dissector_add_dependency("ipv6", proto_ipoib);
ipoib_handle = create_dissector_handle(dissect_ipoib, proto_ipoib);
dissector_add_uint("wtap_encap", WTAP_ENCAP_IP_OVER_IB_SNOOP, ipoib_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_IP_OVER_IB_PCAP, ipoib_handle);
}
/*
* Editor modelines - path_to_url
*
* Local Variables:
* c-basic-offset: 2
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=2 tabstop=8 expandtab:
* :indentSize=2:tabSize=8:noTabs=true:
*/
```
|
```xml
import * as dotenv from "dotenv";
dotenv.config();
import "./instrument";
import * as http from "http";
import * as cookieParser from "cookie-parser";
import userMiddleware from "./middlewares/userMiddleware";
import pubsub from "./subscription/pubsub";
import {
setAfterMutations,
setBeforeResolvers,
setAfterQueries
} from "./redis";
import * as cors from "cors";
import { retryGetProxyTargets, ErxesProxyTarget } from "./proxy/targets";
import { applyProxiesCoreless, applyProxyToCore } from "./proxy/middleware";
import { startRouter, stopRouter } from "./apollo-router";
import {
startSubscriptionServer,
stopSubscriptionServer
} from "./subscription";
import { applyInspectorEndpoints } from "@erxes/api-utils/src/inspect";
import app from "@erxes/api-utils/src/app";
import { sanitizeHeaders } from "@erxes/api-utils/src/headers";
import { applyGraphqlLimiters } from "./middlewares/graphql-limiter";
import * as Sentry from "@sentry/node";
const { DOMAIN, WIDGETS_DOMAIN, CLIENT_PORTAL_DOMAINS, ALLOWED_ORIGINS, PORT } =
process.env;
(async () => {
app.use((req, _res, next) => {
sanitizeHeaders(req.headers);
next();
});
app.use(cookieParser());
app.use(userMiddleware);
const corsOptions = {
credentials: true,
origin: [
DOMAIN ? DOMAIN : "path_to_url",
WIDGETS_DOMAIN ? WIDGETS_DOMAIN : "path_to_url",
...(CLIENT_PORTAL_DOMAINS || "").split(","),
"path_to_url",
...(ALLOWED_ORIGINS || "").split(",").map(c => c && RegExp(c))
]
};
app.use(cors(corsOptions));
const targets: ErxesProxyTarget[] = await retryGetProxyTargets();
await startRouter(targets);
Sentry.setupExpressErrorHandler(app);
applyGraphqlLimiters(app);
applyProxiesCoreless(app, targets);
const httpServer = http.createServer(app);
httpServer.on("close", () => {
try {
pubsub.close();
} catch (e) {
console.log("PubSub client disconnected");
}
});
await startSubscriptionServer(httpServer);
applyInspectorEndpoints("gateway");
const port = PORT || 4000;
await new Promise<void>(resolve => httpServer.listen({ port }, resolve));
await setBeforeResolvers();
await setAfterMutations();
await setAfterQueries();
await applyProxyToCore(app, targets);
console.log(`Erxes gateway ready at path_to_url{port}/`);
})();
(["SIGINT", "SIGTERM"] as NodeJS.Signals[]).forEach(sig => {
process.on(sig, async () => {
console.log(`Exiting on signal ${sig}`);
await stopSubscriptionServer();
await stopRouter(sig);
process.exit(0);
});
});
```
|
Saluma language can be:
Salumã language (Arawakan)
Salumá language (Cariban)
|
```go
package matrix
import "github.com/TheAlgorithms/Go/constraints"
// IsValid checks if the input matrix has consistent row lengths.
func IsValid[T constraints.Integer](elements [][]T) bool {
if len(elements) == 0 {
return true
}
columns := len(elements[0])
for _, row := range elements {
if len(row) != columns {
return false
}
}
return true
}
```
|
```shell
Search by commit message keyword
Use `short` status to make output more compact
How to write a git commit message
Recover lost code
Ignore files in git
```
|
```yaml
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
host: path_to_url
path: public_looker_explores_us_a3853f40
looks:
bigquery:
read:
folder: 30
test_name:
- id: nwQxvsnQFdBPTk27pZYxjcGNm2rRfNJk
title: Runtime and Estimated Cost by Test Name
date:
- id: 7QKbMmgT5NgPH6RsDfVQmKMdjJysS37x
title: AvgOutputThroughputBytesPerSec by Date
- id: hSqCyCkHkh4whNZSpdVFwB8ksPWrbScb
title: AvgOutputThroughputElementsPerSec by Date
version:
- id: SghzxqjMb5QQwgZn7yHw4MnpGXBgXQft
title: AvgOutputThroughputBytesPerSec by Version
- id: QT6X4GTCnxxykSZ7tpXyBfBFCKMgdzs7
title: AvgOutputThroughputElementsPerSec by Version
write:
folder: 31
test_name:
- id: sHyRfwCfGCPqSwsTWXSsxfbHKH5hXjzc
title: Write BigQuery RunTime and EstimatedCost
date:
- id: p2qnxS58WdWdZTzJhXfSbkhxGyDXMYfY
title: AvgInputThroughputBytesPerSec by Date
- id: Bmg6sv8XPtcn3cGtgPtKP26Zj4cyd2XK
title: AvgInputThroughputElementsPerSec by Date
version:
- id: Q6QvktyfSFrSPq4TSDgQQyV9jttjwQJp
title: AvgInputThroughputBytesPerSec by Version
- id: ktfyZ7Th8yRFFwWgb4WSxngBpmSfz8xh
title: AvgInputThroughputElementsPerSec by Version
bigtable:
read:
folder: 32
test_name:
- id: YQ2W3wdNnBXMgDgpzCRbmQWMHjyPvZny
title: Read BigTable RunTime and EstimatedCost
date:
- id: szvwNfPrwTtmRmMHWv3QFh6wTKxm26TF
title: AvgOutputThroughputBytesPerSec by Date
- id: ZRQw7np2mj35kQHcvgtNDwVGgP855QNF
title: AvgOutputThroughputElementsPerSec by Date
version:
- id: X7y2hQQkJnYY8ctnr2y7NnNx7xrMkjt2
title: AvgOutputThroughputBytesPerSec by Version
- id: B3HwmTtn9nBfzwRC7s3WfQSjf7ckrfXx
title: AvgOutputThroughputElementsPerSec by Version
write:
folder: 33
test_name:
- id: 2sC27RQwWy2MP9DXVHjbvTYSNFYpFvxj
title: Write BigTable RunTime and EstimatedCost
date:
- id: X22sDqD8krBQQ4mRXTFMmpKFvgkZ529g
title: AvgInputThroughputBytesPerSec by Date
- id: WqHVhrjQVrrjpczqgJB9s9k8fvt3Vc2d
title: AvgInputThroughputElementsPerSec by Date
version:
- id: j72shCBz6rJhQP8JwYB3JcVrhv9BWGpD
title: AvgInputThroughputBytesPerSec by Version
- id: 6DyhkfvcNfkJg53hwFnRzxqbJDdGb5t7
title: AvgInputThroughputElementsPerSec by Version
textio:
read:
folder: 34
test_name:
- id: SsfFgvwyMthnHjdRwBjWGNbvfNgym4wb
title: Read TextIO RunTime and EstimatedCost
date:
- id: Pr8MBG66JVgBmdQbDr6HXtRprjr3ybj6
title: AvgOutputThroughputBytesPerSec by Date
- id: CTZYK4KVYM65Zjn6jWgDYYNBWckDYKRQ
title: AvgOutputThroughputElementsPerSec by Date
version:
- id: Dcvfh3XFZySrsmPY4Rm8NYyMg5QQRBF6
title: AvgOutputThroughputBytesPerSec by Version
- id: dN8mTZsVZc7vGDYKJCT8S67BCXzVJT4s
title: AvgOutputThroughputElementsPerSec by Version
write:
folder: 35
test_name:
- id: Mm2j2QPc2x4hZqYNSpZC4bDpH2fgvqvp
title: Write TextIO RunTime and EstimatedCost
date:
- id: J9VXhp3ry5zbPFFGsYNfDRypGNVNMbPV
title: AvgInputThroughputBytesPerSec by Date
- id: KwSCnyz75wMpXhGpZQ8FRp6cwt8pjhfD
title: AvgInputThroughputElementsPerSec by Date
version:
- id: VFXbPV9JGJxmNYnGsypQzH97RPDFjpPN
title: AvgInputThroughputBytesPerSec by Version
- id: fVVHhXCrHNgBG52TJsTjR8VbmWCCQnVN
title: AvgInputThroughputElementsPerSec by Version
```
|
The short-spired elimia, scientific name †Elimia brevis, was a species of freshwater snail with an operculum, an aquatic gastropod mollusk in the family Pleuroceridae. This species was endemic to the United States; it is now extinct.
References
Elimia
Extinct gastropods
Gastropods described in 1860
Taxonomy articles created by Polbot
|
```shell
How to unmodify a modified file
Using aliases for git commands
Remote repositories: viewing, editing and deleting
Recover lost code
Dates in git
```
|
```turing
#!/bin/sh
# $FreeBSD: src/tools/regression/fstest/tests/link/08.t,v 1.1 2007/01/17 01:42:09 pjd Exp $
desc="link returns ELOOP if too many symbolic links were encountered in translating one of the pathnames"
n0=`namegen`
n1=`namegen`
n2=`namegen`
expect 0 symlink ${n0} ${n1}
expect 0 symlink ${n1} ${n0}
expect ELOOP link ${n0}/test ${n2}
expect ELOOP link ${n1}/test ${n2}
expect 0 create ${n2} 0644
expect ELOOP link ${n2} ${n0}/test
expect ELOOP link ${n2} ${n1}/test
expect 0 unlink ${n0}
expect 0 unlink ${n1}
expect 0 unlink ${n2}
```
|
```java
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.graal.compiler.replacements.test;
import jdk.vm.ci.code.InstalledCode;
import jdk.vm.ci.meta.ResolvedJavaMethod;
import jdk.graal.compiler.nodes.StructuredGraph;
import jdk.graal.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration;
import jdk.graal.compiler.options.OptionValues;
import jdk.graal.compiler.replacements.ConstantBindingParameterPlugin;
import org.junit.Test;
public class StringIndexOfConstantTest extends StringIndexOfTestBase {
public StringIndexOfConstantTest(String sourceString, String constantString) {
super(sourceString, constantString);
}
/*
* These test definitions could live in the superclass except that the mx junit individual test
* runner can't find tests in superclasses.
*/
@Override
@Test
public void testStringIndexOfConstant() {
super.testStringIndexOfConstant();
}
@Override
@Test
public void testStringIndexOfConstantOffset() {
super.testStringIndexOfConstantOffset();
}
@Override
@Test
public void testStringBuilderIndexOfConstant() {
super.testStringBuilderIndexOfConstant();
}
@Override
@Test
public void testStringBuilderIndexOfConstantOffset() {
super.testStringBuilderIndexOfConstantOffset();
}
Object[] constantArgs;
@Override
protected GraphBuilderConfiguration editGraphBuilderConfiguration(GraphBuilderConfiguration conf) {
if (constantArgs != null) {
ConstantBindingParameterPlugin constantBinding = new ConstantBindingParameterPlugin(constantArgs, this.getMetaAccess(), this.getSnippetReflection());
conf.getPlugins().appendParameterPlugin(constantBinding);
}
return super.editGraphBuilderConfiguration(conf);
}
@Override
protected Result test(OptionValues options, ResolvedJavaMethod method, Object receiver, Object... args) {
constantArgs = new Object[args.length + 1];
for (int i = 0; i < args.length; i++) {
if (args[i] == constantString) {
constantArgs[i + 1] = constantString;
}
}
return super.test(options, method, receiver, args);
}
@Override
protected InstalledCode getCode(final ResolvedJavaMethod installedCodeOwner, StructuredGraph graph0, boolean ignoreForceCompile, boolean ignoreInstallAsDefault, OptionValues options) {
// Force recompile if constant binding should be done
return super.getCode(installedCodeOwner, graph0,
/* forceCompile */ true, /* installAsDefault */ false, options);
}
}
```
|
```python
# Linear autoencoder (ie PCA) applied to a 3d dataset projecting to 2d
#path_to_url
import superimport
import numpy as np
import matplotlib.pyplot as plt
import os
figdir = "../figures"
def save_fig(fname): plt.savefig(os.path.join(figdir, fname))
import tensorflow as tf
from tensorflow import keras
from sklearn.decomposition import PCA
from mpl_toolkits import mplot3d
from mpl_toolkits.mplot3d import Axes3D
np.random.seed(4)
def generate_3d_data(m, w1=0.1, w2=0.3, noise=0.1):
angles = np.random.rand(m) * 3 * np.pi / 2 - 0.5
data = np.empty((m, 3))
data[:, 0] = np.cos(angles) + np.sin(angles)/2 + noise * np.random.randn(m) / 2
data[:, 1] = np.sin(angles) * 0.7 + noise * np.random.randn(m) / 2
data[:, 2] = data[:, 0] * w1 + data[:, 1] * w2 + noise * np.random.randn(m)
return data
X_train = generate_3d_data(60)
X_train = X_train - X_train.mean(axis=0, keepdims=0)
np.random.seed(42)
tf.random.set_seed(42)
encoder = keras.models.Sequential([keras.layers.Dense(2, input_shape=[3])])
decoder = keras.models.Sequential([keras.layers.Dense(3, input_shape=[2])])
autoencoder = keras.models.Sequential([encoder, decoder])
autoencoder.compile(loss="mse", optimizer=keras.optimizers.SGD(lr=1.5))
history = autoencoder.fit(X_train, X_train, epochs=20)
codings = encoder.predict(X_train)
X = X_train
fig = plt.figure().gca(projection='3d')
fig.scatter(X[:,0], X[:,1], X[:,2], s=50, marker='o')
save_fig("linear-autoecoder-data3d.pdf")
plt.show()
fig = plt.figure(figsize=(4,3))
plt.plot(codings[:,0], codings[:, 1], "b.")
plt.xlabel("$z_1$", fontsize=18)
plt.ylabel("$z_2$", fontsize=18, rotation=0)
plt.grid(True)
save_fig("linear-autoencoder-embedding.pdf")
plt.show()
# PCA version
pca = PCA(n_components=2)
mu = np.mean(X_train, axis=0)
Xc = X_train - mu # center the data
pca.fit(Xc)
W = pca.components_.T # D*K
Z = np.dot(Xc, W) # N * K latent scores
Xrecon = np.dot(Z, W.T) + mu # N*D
fig = plt.figure(figsize=(4,3))
plt.plot(Z[:,0], Z[:, 1], "b.")
plt.xlabel("$z_1$", fontsize=18)
plt.ylabel("$z_2$", fontsize=18, rotation=0)
plt.grid(True)
save_fig("linear-autoencoder-pca.pdf")
plt.show()
```
|
```c
/* Test always_inline attribute, which forces inlining of functions
even at no optimization. */
/* Origin: Aldy Hernandez <aldyh@redhat.com>. */
/* { dg-do compile } */
/* { dg-options "-O0" } */
static inline int sabrina (void) __attribute__((always_inline));
static inline int sabrina (void)
{
return 13;
}
int bar (void)
{
return sabrina () + 68;
}
/* { dg-final { scan-assembler-not "sabrina" } } */
```
|
```scala
package org.thp.thehive.controllers.v0
import org.apache.tinkerpop.gremlin.structure.Vertex
import org.thp.scalligraph.models.UMapping
import org.thp.scalligraph.traversal.TraversalOps._
import org.thp.scalligraph.traversal._
import org.thp.thehive.controllers.v0.Conversion._
import org.thp.thehive.controllers.v1.Conversion.{patternOutput, richProcedureRenderer}
import org.thp.thehive.models._
import org.thp.thehive.services.AlertOps._
import org.thp.thehive.services.AuditOps._
import org.thp.thehive.services.CaseOps._
import org.thp.thehive.services.LogOps._
import org.thp.thehive.services.ObservableOps._
import org.thp.thehive.services.PatternOps._
import org.thp.thehive.services.ProcedureOps._
import org.thp.thehive.services.TaskOps._
import org.thp.thehive.services._
import play.api.libs.json.{JsNumber, JsObject, JsString}
import java.util.{Date, List => JList, Map => JMap}
trait AuditRenderer {
def caseToJson: Traversal.V[Case] => Traversal[JsObject, JList[JMap[String, Any]], Converter[JsObject, JList[JMap[String, Any]]]] =
_.richCaseWithoutPerms.option.domainMap[JsObject](_.fold(JsObject.empty)(_.toJson.as[JsObject]))
def taskToJson: Traversal.V[Task] => Traversal[JsObject, JMap[String, Any], Converter[JsObject, JMap[String, Any]]] =
_.project(
_.by(_.richTaskWithoutActionRequired.option.domainMap(_.fold(JsObject.empty)(_.toJson.as[JsObject])))
.by(t => caseToJson(t.`case`))
).domainMap {
case (task, case0) => task + ("case" -> case0)
}
def alertToJson: Traversal.V[Alert] => Traversal[JsObject, JList[JMap[String, Any]], Converter[JsObject, JList[JMap[String, Any]]]] =
_.richAlert.option.domainMap(_.fold(JsObject.empty)(_.toJson.as[JsObject]))
def logToJson: Traversal.V[Log] => Traversal[JsObject, JMap[String, Any], Converter[JsObject, JMap[String, Any]]] =
_.project(
_.by(_.richLog.option.domainMap(_.fold(JsObject.empty)(_.toJson.as[JsObject])))
.by(l => taskToJson(l.task))
).domainMap { case (log, task) => log + ("case_task" -> task) }
def observableToJson: Traversal.V[Observable] => Traversal[JsObject, JMap[String, Any], Converter[JsObject, JMap[String, Any]]] =
_.project(
_.by(_.richObservable.option.domainMap(_.fold(JsObject.empty)(_.toJson.as[JsObject])))
.by(_.coalesceMulti(o => caseToJson(o.`case`), o => alertToJson(o.alert)))
).domainMap {
case (obs, caseOrAlert) => obs + ((caseOrAlert \ "_type").asOpt[String].getOrElse("<unknown>") -> caseOrAlert)
}
case class Job(
workerId: String,
workerName: String,
workerDefinition: String,
status: String,
startDate: Date,
endDate: Date,
report: Option[JsObject],
cortexId: String,
cortexJobId: String
)
def jobToJson
: Traversal[Vertex, Vertex, IdentityConverter[Vertex]] => Traversal[JsObject, JMap[String, Any], Converter[JsObject, JMap[String, Any]]] =
_.project(_.by.by)
.domainMap {
case (vertex, _) =>
JsObject(
UMapping.string.optional.getProperty(vertex, "workerId").map(v => "analyzerId" -> JsString(v)).toList :::
UMapping.string.optional.getProperty(vertex, "workerName").map(v => "analyzerName" -> JsString(v)).toList :::
UMapping.string.optional.getProperty(vertex, "workerDefinition").map(v => "analyzerDefinition" -> JsString(v)).toList :::
UMapping.string.optional.getProperty(vertex, "status").map(v => "status" -> JsString(v)).toList :::
UMapping.date.optional.getProperty(vertex, "startDate").map(v => "startDate" -> JsNumber(v.getTime)).toList :::
UMapping.date.optional.getProperty(vertex, "endDate").map(v => "endDate" -> JsNumber(v.getTime)).toList :::
UMapping.string.optional.getProperty(vertex, "cortexId").map(v => "cortexId" -> JsString(v)).toList :::
UMapping.string.optional.getProperty(vertex, "cortexJobId").map(v => "cortexJobId" -> JsString(v)).toList :::
UMapping.string.optional.getProperty(vertex, "_createdBy").map(v => "_createdBy" -> JsString(v)).toList :::
UMapping.date.optional.getProperty(vertex, "_createdAt").map(v => "_createdAt" -> JsNumber(v.getTime)).toList :::
UMapping.string.optional.getProperty(vertex, "_updatedBy").map(v => "_updatedBy" -> JsString(v)).toList :::
UMapping.date.optional.getProperty(vertex, "_updatedAt").map(v => "_updatedAt" -> JsNumber(v.getTime)).toList :::
UMapping.string.optional.getProperty(vertex, "_type").map(v => "_type" -> JsString(v)).toList :::
UMapping.string.optional.getProperty(vertex, "_id").map(v => "_id" -> JsString(v)).toList
)
}
def patternToJson: Traversal.V[Pattern] => Traversal[JsObject, JList[JMap[String, Any]], Converter[JsObject, JList[JMap[String, Any]]]] =
_.richPattern.option.domainMap(_.fold(JsObject.empty)(_.toJson.as[JsObject]))
def procedureToJson: Traversal.V[Procedure] => Traversal[JsObject, JMap[String, Any], Converter[JsObject, JMap[String, Any]]] =
_.project(
_.by(_.richProcedure.option.domainMap(_.fold(JsObject.empty)(_.toJson.as[JsObject])))
.by(t => caseToJson(t.`case`))
.by(t => patternToJson(t.pattern))
)
.domainMap {
case (procedure, case0, pattern) => procedure + ("case" -> case0) + ("pattern" -> pattern)
}
def auditRenderer: Traversal.V[Audit] => Traversal[JsObject, JMap[String, Any], Converter[JsObject, JMap[String, Any]]] =
(_: Traversal.V[Audit])
.coalesceIdent[Vertex](_.`object`, _.identity)
.chooseValue(
_.on(_.label)
.option("Case", t => caseToJson(t.v[Case]))
.option("Task", t => taskToJson(t.v[Task]))
.option("Log", t => logToJson(t.v[Log]))
.option("Observable", t => observableToJson(t.v[Observable]))
.option("Alert", t => alertToJson(t.v[Alert]))
.option("Procedure", t => procedureToJson(t.v[Procedure]))
.option("Job", jobToJson)
.none(_.constant2[JsObject, JMap[String, Any]](JsObject.empty))
)
def jsonSummary(auditSrv: AuditSrv, requestId: String)(implicit graph: Graph): JsObject =
auditSrv
.startTraversal
.has(_.requestId, requestId)
.has(_.mainAction, false)
.group(
_.byValue(_.objectType),
_.by(_.groupCount(_.byValue(_.action)))
)
.headOption
.fold(JsObject.empty) { m =>
JsObject(
m.map {
case (o, ac) =>
fromObjectType(o) -> JsObject(ac.map {
case (a, c) =>
actionToOperation(a) -> JsNumber(c)
})
}
)
}
}
```
|
```yaml
apiVersion: release-notes/v2
kind: feature
area: traffic-management
releaseNotes:
- |
**Fixed** an issue causing `hostNetwork` pods to be ignored in ambient mode.
```
|
```python
import glob
import inspect
import logging
import os
from flask import jsonify, Blueprint, request
from kalliope.core.ResourcesManager import ResourcesManager, ResourcesManagerException
from kalliope.core.Utils import Utils
logging.basicConfig()
logger = logging.getLogger("kalliope")
LIST_EXCLUDED_DIR_NAME = ["__pycache__"]
KALLIOPE_WEBSITE_NEURON_URL = "path_to_url" \
"sources/_data/community_neurons.yml"
class NeuronsView(Blueprint):
def __init__(self, name, import_name, app=None, brain=None, settings=None):
self.brain = brain
self.settings = settings
self.app = app
super(NeuronsView, self).__init__(name, import_name)
# routes
self.add_url_rule('/neurons', view_func=self.get_neurons, methods=['GET'])
self.add_url_rule('/neurons/install', view_func=self.install_resource_by_git_url, methods=['POST'])
def get_neurons(self):
"""
list all installed neuron
curl -i --user admin:secret -X GET path_to_url
:return:
"""
data = {
"core": self._get_list_core_neuron(),
"community": self._get_list_installed_community_neuron()
}
logger.debug("[FlaskAPI] get_neurons: all")
data = jsonify(data)
return data, 200
@staticmethod
def install_resource_by_git_url():
"""
Install a new resource from the given git URL. Call the resource manager
curl -i -H "Content-Type: application/json" \
--user admin:secret \
-X POST \
-d '
{
"git_url": "path_to_url",
"sudo_password": "azerty" # TODO add kalliope to sudoer file and remove this
}
' \
path_to_url
"""
if not request.get_json() or 'git_url' not in request.get_json():
data = {
"Error": "Wrong parameters, 'git_url' not set"
}
return jsonify(error=data), 400
parameters = {
"git_url": request.get_json()["git_url"],
"sudo_password": request.get_json()["sudo_password"]
}
res_manager = ResourcesManager(**parameters)
try:
dna = res_manager.install()
except ResourcesManagerException as e:
data = {
"error": "%s" % e
}
return jsonify(data), 400
if dna is not None:
return jsonify(dna.serialize()), 200
else:
data = {
"Error": "Error during resource installation"
}
return jsonify(error=data), 400
def _get_list_core_neuron(self):
current_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
kalliope_core_neuron_folder = Utils.get_current_file_parent_path(Utils.get_current_file_parent_parent_path(current_path)) + os.sep + "neurons/*"
return self._get_neuron_name_list_from_path(kalliope_core_neuron_folder)
def _get_list_installed_community_neuron(self):
if self.settings.resources.neuron_folder is not None:
return self._get_neuron_name_list_from_path(self.settings.resources.neuron_folder + os.sep + "/*")
return list()
@staticmethod
def _get_neuron_name_list_from_path(neuron_path_list):
"""
From a given path, return all folder name as list.
E.g: /home/pi/kalliope/neurons
Will return [wikipedia_searcher, gmail]
:param neuron_path_list: path to the community neurons folder
:return:
"""
glob_neuron_path_list = glob.glob(neuron_path_list)
neuron_name_list = list()
for neuron_path in glob_neuron_path_list:
if os.path.isdir(neuron_path):
neuron_name = os.path.basename(os.path.normpath(neuron_path))
if neuron_name not in LIST_EXCLUDED_DIR_NAME:
neuron_name_list.append(neuron_name)
return neuron_name_list
```
|
```rust
/*
*
* This software may be used and distributed according to the terms of the
*/
use dag::idmap::IdMap;
use dag::idmap::IdMapAssignHead;
use dag::ops::Persist;
use dag::Group;
use dag::Id;
use dag::IdDag;
use dag::IdSet;
use dag::Vertex;
use minibench::bench;
use minibench::elapsed;
use nonblocking::non_blocking_result as nbr;
use tempfile::tempdir;
type ParentsFunc<'a> = Box<dyn Fn(Vertex) -> dag::Result<Vec<Vertex>> + Send + Sync + 'a>;
pub fn main() {
let parents = bindag::parse_bindag(bindag::MOZILLA);
let head_name = Vertex::copy_from(format!("{}", parents.len() - 1).as_bytes());
let parents_by_name = |name: Vertex| -> dag::Result<Vec<Vertex>> {
let i = String::from_utf8(name.as_ref().to_vec())
.unwrap()
.parse::<usize>()
.unwrap();
Ok(parents[i]
.iter()
.map(|p| format!("{}", p).as_bytes().to_vec().into())
.collect())
};
let id_map_dir = tempdir().unwrap();
let mut id_map = IdMap::open(id_map_dir.path()).unwrap();
let mut covered_ids = IdSet::empty();
let reserved_ids = IdSet::empty();
let prepared_segments = nbr(id_map.assign_head(
head_name,
&(Box::new(parents_by_name) as ParentsFunc),
Group::MASTER,
&mut covered_ids,
&reserved_ids,
))
.unwrap();
// Test the size, and generation speed, and ancestor calcuation speed
// with some different segment sizes.
for segment_size in [4, 8, 10, 12, 14, 16, 18, 20, 22, 24, 32, 64, 128] {
let dag_dir = tempdir().unwrap();
let mut dag = IdDag::open(dag_dir.path()).unwrap();
dag.set_new_segment_size(segment_size);
let segment_len = dag
.build_segments_from_prepared_flat_segments(&prepared_segments)
.unwrap();
{
let locked = dag.lock().unwrap();
dag.persist(&locked).unwrap();
}
let log_len = dag_dir.path().join("log").metadata().unwrap().len();
eprintln!("segments: {} log len: {}", segment_len, log_len);
bench(
format!("ancestor calcuation segment_size={}", segment_size),
|| {
let dag = IdDag::open(dag_dir.path()).unwrap();
elapsed(|| {
for i in (0..parents.len() as u64).step_by(10079) {
for j in (1..parents.len() as u64).step_by(2351) {
dag.gca_one((Id(i), Id(j)).into()).unwrap();
}
}
})
},
);
}
}
```
|
The 2019 Missouri Valley Football Conference season was the 34th season of college football play for the Missouri Valley Football Conference and part of the 2019 NCAA Division I FCS football season. This was the MVFC's 8th consecutive season with 10 teams, and would be their last for now as they added North Dakota in the following offseason.
North Dakota State won the conference title and achieved the number 1 overall seed again in the 2019 FCS Playoffs. The Bison would go on to win their 8th National Championship in 9 years. South Dakota State, Illinois State, and Northern Iowa all made the playoffs, with the Jacks being the number 7 overall seed. Illinois State and Northern Iowa both played in the first round. Illinois State beat Southeast Missouri State and Northern Iowa beat San Diego to advance to the second round. In the second round, Illinois State beat 8th overall seed Central Arkansas and Northern Iowa upset South Dakota State to both advance to the quarterfinals. North Dakota State beat Nicholls to advance to the quarterfinals. In the quarterfinals, NDSU beat Illinois State to advance to the semifinals, and Northern Iowa lost to 2nd seeded James Madison. North Dakota State would beat Montana State in the semifinals, and James Madison in the championship.
Previous season
In 2018, North Dakota State won the conference and received the automatic bid to the 2018 playoffs. The Bison won their seventh NCAA Division I Football Championship titlein eight years. South Dakota State and Northern Iowa also made the playoffs. NDSU and SDSU were both national seeds, with the Bison being the number 1 overall seed and the Jacks being the number 5 overall seed and received a bye to the second round. Northern Iowa played in the first round, and beat Lamar to advance to the second round. Northern Iowa lost to UC Davis in the second round. North Dakota State beat Montana State in the second round and Colgate in the quarterfinals, before meeting South Dakota State in the semifinals and winning to advance to the title game. South Dakota State beat Duquesne in the second round, and Kennesaw State in the quarterfinals before losing to NDSU in the semifinals. NDSU beat Eastern Washington in the title game.
Coaching changes
North Dakota State
On December 13, 2018, Matt Entz was named the new head coach at North Dakota State. Entz takes over for Chris Klieman, who left the program for a head coaching job at Kansas State. The Wildcats allowed Klieman to finish out the 2018 playoffs at NDSU before heading to Manhattan.
Preseason
MVFC Media Day
Preseason Poll
The annual preseason poll; voted on by conference coaches, athletic directors, and media members.
Preseason awards
Individual awards
Rankings
Schedule
All times Central time.
† denotes Homecoming game
^ denotes AP Poll ranking for FBS teams
Regular season schedule
Week 0
Week 1
Week 2
Week 3
Week 4
Week 5
Week 6
Week 7
Week 8
Week 9
In Week 9, the 2019 edition of the Dakota Marker was preceded by ESPN's College Gameday on the campus of South Dakota State University.
Week 10
Week 11
Week 12
Week 13
Postseason
In 2019, four MVFC teams made the FCS playoffs. North Dakota State (No. 1) and South Dakota State (No. 7) both received a first round bye. Illinois State and Northern Iowa both were unseeded and played in the first round.
All times Central time.
Tournament seedings in parentheses
First round
Second round
Quarterfinals
Semifinals
National Championship
MVFC records vs other conferences
2019-20 records against non-conference foes (through January 11, 2020):
Post Season
Awards and honors
Player of the week honors
Players of the Year
On November 27, 2021, the Missouri Valley Football Conference released their Players of the Year and All-Conference Honors.
Offensive Player of the Year
Trey Lance, QB (Fr, North Dakota State)
Defensive Player of the Year
Derrek Tuszka, DE (Sr, North Dakota State)
Newcomer of the Year
Trey Lance, QB (Fr, North Dakota State)
Freshman of the Year
Trey Lance, QB (North Dakota State)
Coach of the Year
Matt Entz (North Dakota State)
All-Conference Teams
All-Newcomer Team
Source:
National awards
On November 25, 2019, STATS Perform released their list of finalists for the Walter Payton Award, Buck Buchanan Award, and the Jerry Rice Award, respectively.
Walter Payton Award
The Walter Payton Award is given to the best FCS offensive player. Trey Lance (QB) of North Dakota State won the award. Lance was also the first freshman to win the Walter Payton Award in its 33-year history. Here were the other MVFC finalists:
Cade Johnson (WR - South Dakota State)
James Robinson (RB - Illinois State)
Buck Buchanan Award
The Buck Buchanan Award is given to the best FCS defensive player. Here were the MVFC finalists:
Jeremy Chinn (S - Southern Illinois)
Christian Rozeboom (LB - South Dakota State)
Elerson Smith (DL - Northern Iowa)
Derrek Tuszka (DL - North Dakota State)
Jerry Rice Award
The Jerry Rice Award is given to the best FCS freshman. Trey Lance (QB) of North Dakota State won the award. Here were the other MVFC finalists:
Omar Brown (DB - Northern Iowa)
Javon Williams Jr. (RB - Southern Illinois)
FCS Coach of the Year
Matt Entz of North Dakota State was the only finalist for FCS Coach of the Year.
Finalists source:
Winners source:
All-Americans
Home attendance
Bold - Exceed capacity
†Season high
2020 NFL Draft
The following list includes all MVFC players who were drafted in the 2020 NFL Draft.
Undrafted free agents
Source:
Head coaches
Through January 11, 2020
References
2019 Missouri Valley Football Conference season
|
```c
/*
*
* This file is part of System Informer.
*
* Authors:
*
* dmex 2015-2023
*
*/
#include "toolstatus.h"
static PPH_LIST PhpToolbarGraphList = NULL;
static PPH_HASHTABLE PhpToolbarGraphHashtable = NULL;
typedef struct _TB_GRAPH_CONTEXT
{
LONG GraphDpi;
} TB_GRAPH_CONTEXT, *PTB_GRAPH_CONTEXT;
ULONG CpuHistoryGraphColor1 = 0;
ULONG CpuHistoryGraphColor2 = 0;
ULONG PhysicalHistoryGraphColor1 = 0;
ULONG CommitHistoryGraph1Color1 = 0;
ULONG IoHistoryGraphColor1 = 0;
ULONG IoHistoryGraphColor2 = 0;
TOOLSTATUS_GRAPH_MESSAGE_CALLBACK_DECLARE(CpuHistoryGraphMessageCallback);
TOOLSTATUS_GRAPH_MESSAGE_CALLBACK_DECLARE(PhysicalHistoryGraphMessageCallback);
TOOLSTATUS_GRAPH_MESSAGE_CALLBACK_DECLARE(CommitHistoryGraphMessageCallback);
TOOLSTATUS_GRAPH_MESSAGE_CALLBACK_DECLARE(IoHistoryGraphMessageCallback);
TB_GRAPH_CONTEXT CpuHistoryGraphContext = { 0 };
TB_GRAPH_CONTEXT PhysicalHistoryGraphContext = { 0 };
TB_GRAPH_CONTEXT CommitHistoryGraphContext = { 0 };
TB_GRAPH_CONTEXT IoHistoryGraphContext = { 0 };
VOID ToolbarGraphLoadSettings(
VOID
)
{
PPH_STRING settingsString;
PH_STRINGREF remaining;
settingsString = PhGetStringSetting(SETTING_NAME_TOOLBAR_GRAPH_CONFIG);
if (PhIsNullOrEmptyString(settingsString))
return;
remaining = PhGetStringRef(settingsString);
while (remaining.Length != 0)
{
PH_STRINGREF idPart;
PH_STRINGREF flagsPart;
PH_STRINGREF pluginNamePart;
LONG64 idInteger;
LONG64 flagsInteger;
PhSplitStringRefAtChar(&remaining, L'|', &idPart, &remaining);
PhSplitStringRefAtChar(&remaining, L'|', &flagsPart, &remaining);
PhSplitStringRefAtChar(&remaining, L'|', &pluginNamePart, &remaining);
if (!PhStringToInteger64(&idPart, 10, &idInteger))
break;
if (!PhStringToInteger64(&flagsPart, 10, &flagsInteger))
break;
if (flagsInteger)
{
PPH_TOOLBAR_GRAPH graph;
if (pluginNamePart.Length)
{
if (graph = ToolbarGraphFindByName(&pluginNamePart, (ULONG)idInteger))
{
SetFlag(graph->Flags, TOOLSTATUS_GRAPH_ENABLED);
}
}
else
{
if (graph = ToolbarGraphFindById((ULONG)idInteger))
{
SetFlag(graph->Flags, TOOLSTATUS_GRAPH_ENABLED);
}
}
}
}
PhDereferenceObject(settingsString);
}
VOID ToolbarGraphSaveSettings(
VOID
)
{
PPH_STRING settingsString;
PH_STRING_BUILDER graphListBuilder;
PhInitializeStringBuilder(&graphListBuilder, 100);
for (ULONG i = 0; i < PhpToolbarGraphList->Count; i++)
{
PPH_TOOLBAR_GRAPH graph = PhpToolbarGraphList->Items[i];
PPH_STRING pluginName;
if (!FlagOn(graph->Flags, TOOLSTATUS_GRAPH_ENABLED))
continue;
pluginName = graph->Plugin ? PhGetPluginName(graph->Plugin) : NULL;
PhAppendFormatStringBuilder(
&graphListBuilder,
L"%lu|%lu|%s|",
graph->GraphId,
FlagOn(graph->Flags, TOOLSTATUS_GRAPH_ENABLED) ? 1 : 0,
PhGetStringOrEmpty(pluginName)
);
if (pluginName)
PhDereferenceObject(pluginName);
}
if (graphListBuilder.String->Length != 0)
PhRemoveEndStringBuilder(&graphListBuilder, 1);
settingsString = PhFinalStringBuilderString(&graphListBuilder);
PhSetStringSetting2(SETTING_NAME_TOOLBAR_GRAPH_CONFIG, &settingsString->sr);
PhDereferenceObject(settingsString);
}
VOID ToolbarGraphsInitialize(
VOID
)
{
if (!PhpToolbarGraphList)
{
PhpToolbarGraphList = PhCreateList(10);
PhpToolbarGraphHashtable = PhCreateSimpleHashtable(10);
}
ToolbarRegisterGraph(
PluginInstance,
1,
L"CPU history",
0,
&CpuHistoryGraphContext,
CpuHistoryGraphMessageCallback
);
ToolbarRegisterGraph(
PluginInstance,
2,
L"Physical memory history",
0,
&PhysicalHistoryGraphContext,
PhysicalHistoryGraphMessageCallback
);
ToolbarRegisterGraph(
PluginInstance,
3,
L"Commit charge history",
0,
&CommitHistoryGraphContext,
CommitHistoryGraphMessageCallback
);
ToolbarRegisterGraph(
PluginInstance,
4,
L"I/O history",
0,
&IoHistoryGraphContext,
IoHistoryGraphMessageCallback
);
}
VOID ToolbarGraphsInitializeDpi(
VOID
)
{
memset(&CpuHistoryGraphContext, 0, sizeof(TB_GRAPH_CONTEXT));
memset(&PhysicalHistoryGraphContext, 0, sizeof(TB_GRAPH_CONTEXT));
memset(&CommitHistoryGraphContext, 0, sizeof(TB_GRAPH_CONTEXT));
memset(&IoHistoryGraphContext, 0, sizeof(TB_GRAPH_CONTEXT));
}
VOID ToolbarRegisterGraph(
_In_ struct _PH_PLUGIN *Plugin,
_In_ ULONG Id,
_In_ PWSTR Text,
_In_ ULONG Flags,
_In_opt_ PVOID Context,
_In_opt_ PTOOLSTATUS_GRAPH_MESSAGE_CALLBACK MessageCallback
)
{
PPH_TOOLBAR_GRAPH graph;
//PPH_STRING pluginName;
graph = PhAllocateZero(sizeof(PH_TOOLBAR_GRAPH));
graph->Plugin = Plugin;
graph->Text = Text;
graph->Flags = Flags;
graph->Context = Context;
graph->MessageCallback = MessageCallback;
graph->GraphId = 1000 + Id;
//pluginName = PhGetPluginName(graph->Plugin);
//graph->GraphId = (PhHashStringRef(&pluginName->sr, TRUE) & 0xFFFF) + Id;
//PhDereferenceObject(pluginName);
PhAddItemList(PhpToolbarGraphList, graph);
}
BOOLEAN ToolbarAddGraph(
_In_ PPH_TOOLBAR_GRAPH Graph
)
{
if (!Graph->GraphHandle && RebarHandle && ToolStatusConfig.ToolBarEnabled)
{
UINT rebarHeight = (UINT)SendMessage(RebarHandle, RB_GETROWHEIGHT, REBAR_BAND_ID_TOOLBAR, 0);
if (Graph->GraphHandle = CreateWindow(
PH_GRAPH_CLASSNAME,
NULL,
WS_VISIBLE | WS_CHILD | WS_BORDER,
0,
0,
0,
0,
RebarHandle,
NULL,
NULL,
NULL
))
{
Graph_SetTooltip(Graph->GraphHandle, TRUE);
PhInitializeGraphState(&Graph->GraphState);
PhAddItemSimpleHashtable(PhpToolbarGraphHashtable, Graph->GraphHandle, Graph);
if (!RebarBandExists(Graph->GraphId))
RebarBandInsert(Graph->GraphId, Graph->GraphHandle, 145, rebarHeight); // height: 85
if (!IsWindowVisible(Graph->GraphHandle))
ShowWindow(Graph->GraphHandle, SW_SHOW);
}
}
return TRUE;
}
BOOLEAN ToolbarRemoveGraph(
_In_ PPH_TOOLBAR_GRAPH Graph
)
{
if (RebarBandExists(Graph->GraphId))
RebarBandRemove(Graph->GraphId);
if (Graph->GraphHandle)
{
PhRemoveItemSimpleHashtable(PhpToolbarGraphHashtable, Graph->GraphHandle);
PhDeleteGraphState(&Graph->GraphState);
DestroyWindow(Graph->GraphHandle);
Graph->GraphHandle = NULL;
}
return TRUE;
}
VOID ToolbarCreateGraphs(
VOID
)
{
ToolbarGraphLoadSettings();
for (ULONG i = 0; i < PhpToolbarGraphList->Count; i++)
{
PPH_TOOLBAR_GRAPH graph = PhpToolbarGraphList->Items[i];
if (!FlagOn(graph->Flags, TOOLSTATUS_GRAPH_ENABLED))
continue;
ToolbarAddGraph(graph);
}
}
VOID ToolbarUpdateGraphs(
VOID
)
{
for (ULONG i = 0; i < PhpToolbarGraphList->Count; i++)
{
PPH_TOOLBAR_GRAPH graph = PhpToolbarGraphList->Items[i];
if (!FlagOn(graph->Flags, TOOLSTATUS_GRAPH_ENABLED))
continue;
if (!graph->GraphHandle)
continue;
graph->GraphState.Valid = FALSE;
graph->GraphState.TooltipIndex = ULONG_MAX;
Graph_MoveGrid(graph->GraphHandle, 1);
Graph_Draw(graph->GraphHandle);
Graph_UpdateTooltip(graph->GraphHandle);
InvalidateRect(graph->GraphHandle, NULL, FALSE);
}
}
VOID ToolbarUpdateGraphVisualStates(
VOID
)
{
if (!ToolStatusConfig.ToolBarEnabled)
return;
for (ULONG i = 0; i < PhpToolbarGraphList->Count; i++)
{
PPH_TOOLBAR_GRAPH graph = PhpToolbarGraphList->Items[i];
if (!FlagOn(graph->Flags, TOOLSTATUS_GRAPH_ENABLED))
continue;
if (!graph->GraphHandle)
continue;
graph->GraphState.Valid = FALSE;
graph->GraphState.TooltipIndex = ULONG_MAX;
Graph_Draw(graph->GraphHandle);
}
}
BOOLEAN ToolbarUpdateGraphsInfo(
_In_ HWND WindowHandle,
_In_ LPNMHDR Header
)
{
PPH_TOOLBAR_GRAPH graph;
if (graph = PhFindItemSimpleHashtable2(PhpToolbarGraphHashtable, Header->hwndFrom))
{
if (Header->code == GCN_MOUSEEVENT) // HACK
{
PPH_GRAPH_MOUSEEVENT mouseEvent = (PPH_GRAPH_MOUSEEVENT)Header;
if (mouseEvent->Message == WM_RBUTTONUP)
{
ShowCustomizeMenu(WindowHandle);
}
}
graph->MessageCallback(graph, graph->GraphHandle, &graph->GraphState, Header, graph->Context);
return TRUE;
}
return FALSE;
}
VOID ToolbarSetVisibleGraph(
_In_ PPH_TOOLBAR_GRAPH Graph,
_In_ BOOLEAN Visible
)
{
if (Visible)
{
SetFlag(Graph->Flags, TOOLSTATUS_GRAPH_ENABLED);
ToolbarAddGraph(Graph);
}
else
{
ClearFlag(Graph->Flags, TOOLSTATUS_GRAPH_ENABLED);
ToolbarRemoveGraph(Graph);
}
}
BOOLEAN ToolbarGraphsEnabled(
VOID
)
{
BOOLEAN enabled = FALSE;
for (ULONG i = 0; i < PhpToolbarGraphList->Count; i++)
{
PPH_TOOLBAR_GRAPH graph = PhpToolbarGraphList->Items[i];
if (FlagOn(graph->Flags, TOOLSTATUS_GRAPH_ENABLED))
{
enabled = TRUE;
break;
}
}
return enabled;
}
PPH_TOOLBAR_GRAPH ToolbarGraphFindById(
_In_ ULONG GraphId
)
{
for (ULONG i = 0; i < PhpToolbarGraphList->Count; i++)
{
PPH_TOOLBAR_GRAPH graph = PhpToolbarGraphList->Items[i];
if (graph->GraphId == GraphId)
return graph;
}
return NULL;
}
PPH_TOOLBAR_GRAPH ToolbarGraphFindByName(
_In_ PPH_STRINGREF PluginName,
_In_ ULONG GraphId
)
{
for (ULONG i = 0; i < PhpToolbarGraphList->Count; i++)
{
PPH_TOOLBAR_GRAPH graph = PhpToolbarGraphList->Items[i];
if (graph->Plugin)
{
PPH_STRING pluginName;
pluginName = PhGetPluginName(graph->Plugin);
if (graph->GraphId == GraphId &&
PhEqualStringRef(PluginName, &pluginName->sr, TRUE))
{
PhDereferenceObject(pluginName);
return graph;
}
PhDereferenceObject(pluginName);
}
}
return NULL;
}
VOID ToolbarGraphCreateMenu(
_In_ PPH_EMENU ParentMenu,
_In_ ULONG MenuId
)
{
for (ULONG i = 0; i < PhpToolbarGraphList->Count; i++)
{
PPH_TOOLBAR_GRAPH graph;
PPH_EMENU menuItem;
graph = PhpToolbarGraphList->Items[i];
menuItem = PhCreateEMenuItem(0, MenuId, graph->Text, NULL, graph);
if (FlagOn(graph->Flags, TOOLSTATUS_GRAPH_ENABLED))
{
SetFlag(menuItem->Flags, PH_EMENU_CHECKED);
}
if (FlagOn(graph->Flags, TOOLSTATUS_GRAPH_UNAVAILABLE))
{
PPH_STRING newText;
newText = PhaConcatStrings2(graph->Text, L" (Unavailable)");
PhModifyEMenuItem(menuItem, PH_EMENU_MODIFY_TEXT, PH_EMENU_TEXT_OWNED,
PhAllocateCopy(newText->Buffer, newText->Length + sizeof(UNICODE_NULL)), NULL);
}
PhInsertEMenuItem(ParentMenu, menuItem, ULONG_MAX);
}
}
VOID ToolbarGraphCreatePluginMenu(
_In_ PPH_EMENU ParentMenu,
_In_ ULONG MenuId
)
{
for (ULONG i = 0; i < PhpToolbarGraphList->Count; i++)
{
PPH_TOOLBAR_GRAPH graph;
PPH_EMENU menuItem;
graph = PhpToolbarGraphList->Items[i];
menuItem = PhPluginCreateEMenuItem(PluginInstance, 0, MenuId, graph->Text, graph);
if (FlagOn(graph->Flags, TOOLSTATUS_GRAPH_ENABLED))
{
SetFlag(menuItem->Flags, PH_EMENU_CHECKED);
}
if (FlagOn(graph->Flags, TOOLSTATUS_GRAPH_UNAVAILABLE))
{
PPH_STRING newText;
newText = PhaConcatStrings2(graph->Text, L" (Unavailable)");
PhModifyEMenuItem(menuItem, PH_EMENU_MODIFY_TEXT, PH_EMENU_TEXT_OWNED,
PhAllocateCopy(newText->Buffer, newText->Length + sizeof(UNICODE_NULL)), NULL);
}
PhInsertEMenuItem(ParentMenu, menuItem, ULONG_MAX);
}
}
//
// BEGIN copied from ProcessHacker/sysinfo.c
//
static PPH_PROCESS_RECORD PhSipReferenceMaxCpuRecord(
_In_ LONG Index
)
{
LARGE_INTEGER time;
LONG maxProcessIdLong;
HANDLE maxProcessId;
if (!SystemStatistics.MaxCpuHistory)
return NULL;
// Find the process record for the max. CPU process for the particular time.
maxProcessIdLong = PhGetItemCircularBuffer_ULONG(SystemStatistics.MaxCpuHistory, Index);
if (!maxProcessIdLong)
return NULL;
// This must be treated as a signed integer to handle Interrupts correctly.
maxProcessId = LongToHandle(maxProcessIdLong);
// Note that the time we get has its components beyond seconds cleared.
// For example:
// * At 2.5 seconds a process is started.
// * At 2.75 seconds our process provider is fired, and the process is determined
// to have 75% CPU usage, which happens to be the maximum CPU usage.
// * However the 2.75 seconds is recorded as 2 seconds due to
// RtlTimeToSecondsSince1980.
// * If we call PhFindProcessRecord, it cannot find the process because it was
// started at 2.5 seconds, not 2 seconds or older.
//
// This means we must add one second minus one tick (100ns) to the time, giving us
// 2.9999999 seconds. This will then make sure we find the process.
PhGetStatisticsTime(NULL, Index, &time);
time.QuadPart += PH_TICKS_PER_SEC - 1;
return PhFindProcessRecord(maxProcessId, &time);
}
static PPH_STRING PhSipGetMaxCpuString(
_In_ LONG Index
)
{
PPH_PROCESS_RECORD maxProcessRecord;
FLOAT maxCpuUsage;
if (!SystemStatistics.MaxCpuUsageHistory)
return PhReferenceEmptyString();
if (maxProcessRecord = PhSipReferenceMaxCpuRecord(Index))
{
PPH_STRING maxUsageString;
// We found the process record, so now we construct the max. usage string.
maxCpuUsage = PhGetItemCircularBuffer_FLOAT(SystemStatistics.MaxCpuUsageHistory, Index);
// Make sure we don't try to display the PID of DPCs or Interrupts.
if (!PH_IS_FAKE_PROCESS_ID(maxProcessRecord->ProcessId))
{
PH_FORMAT format[7];
// \n%s (%u): %.2f%%
PhInitFormatC(&format[0], L'\n');
PhInitFormatSR(&format[1], maxProcessRecord->ProcessName->sr);
PhInitFormatS(&format[2], L" (");
PhInitFormatU(&format[3], HandleToUlong(maxProcessRecord->ProcessId));
PhInitFormatS(&format[4], L"): ");
PhInitFormatF(&format[5], maxCpuUsage * 100, 2);
PhInitFormatC(&format[6], L'%');
maxUsageString = PhFormat(format, RTL_NUMBER_OF(format), 128);
}
else
{
PH_FORMAT format[5];
// \n%s: %.2f%%
PhInitFormatC(&format[0], L'\n');
PhInitFormatSR(&format[1], maxProcessRecord->ProcessName->sr);
PhInitFormatS(&format[2], L": ");
PhInitFormatF(&format[3], maxCpuUsage * 100, 2);
PhInitFormatC(&format[4], L'%');
maxUsageString = PhFormat(format, RTL_NUMBER_OF(format), 128);
}
PhDereferenceProcessRecord(maxProcessRecord);
return maxUsageString;
}
return PhReferenceEmptyString();
}
static PPH_PROCESS_RECORD PhSipReferenceMaxIoRecord(
_In_ LONG Index
)
{
LARGE_INTEGER time;
ULONG maxProcessId;
if (!SystemStatistics.MaxIoHistory)
return NULL;
// Find the process record for the max. I/O process for the particular time.
maxProcessId = PhGetItemCircularBuffer_ULONG(SystemStatistics.MaxIoHistory, Index);
if (!maxProcessId)
return NULL;
// See above for the explanation.
PhGetStatisticsTime(NULL, Index, &time);
time.QuadPart += PH_TICKS_PER_SEC - 1;
return PhFindProcessRecord(UlongToHandle(maxProcessId), &time);
}
static PPH_STRING PhSipGetMaxIoString(
_In_ LONG Index
)
{
PPH_PROCESS_RECORD maxProcessRecord;
ULONG64 maxIoReadOther;
ULONG64 maxIoWrite;
if (!(SystemStatistics.MaxIoReadOtherHistory && SystemStatistics.MaxIoWriteHistory))
return PhReferenceEmptyString();
if (maxProcessRecord = PhSipReferenceMaxIoRecord(Index))
{
PPH_STRING maxUsageString;
// We found the process record, so now we construct the max. usage string.
maxIoReadOther = PhGetItemCircularBuffer_ULONG64(SystemStatistics.MaxIoReadOtherHistory, Index);
maxIoWrite = PhGetItemCircularBuffer_ULONG64(SystemStatistics.MaxIoWriteHistory, Index);
if (!PH_IS_FAKE_PROCESS_ID(maxProcessRecord->ProcessId))
{
PH_FORMAT format[8];
// \n%s (%u): R+O: %s, W: %s
PhInitFormatC(&format[0], L'\n');
PhInitFormatSR(&format[1], maxProcessRecord->ProcessName->sr);
PhInitFormatS(&format[2], L" (");
PhInitFormatU(&format[3], HandleToUlong(maxProcessRecord->ProcessId));
PhInitFormatS(&format[4], L"): R+O: ");
PhInitFormatSize(&format[5], maxIoReadOther);
PhInitFormatS(&format[6], L", W: ");
PhInitFormatSize(&format[7], maxIoWrite);
maxUsageString = PhFormat(format, RTL_NUMBER_OF(format), 128);
}
else
{
PH_FORMAT format[6];
// \n%s: R+O: %s, W: %s
PhInitFormatC(&format[0], L'\n');
PhInitFormatSR(&format[1], maxProcessRecord->ProcessName->sr);
PhInitFormatS(&format[2], L": R+O: ");
PhInitFormatSize(&format[3], maxIoReadOther);
PhInitFormatS(&format[4], L", W: ");
PhInitFormatSize(&format[5], maxIoWrite);
maxUsageString = PhFormat(format, RTL_NUMBER_OF(format), 128);
}
PhDereferenceProcessRecord(maxProcessRecord);
return maxUsageString;
}
return PhReferenceEmptyString();
}
//
// END copied from ProcessHacker/sysinfo.c
//
TOOLSTATUS_GRAPH_MESSAGE_CALLBACK_DECLARE(CpuHistoryGraphMessageCallback)
{
switch (Header->code)
{
case GCN_GETDRAWINFO:
{
PTB_GRAPH_CONTEXT context = (PTB_GRAPH_CONTEXT)Context;
PPH_GRAPH_GETDRAWINFO getDrawInfo = (PPH_GRAPH_GETDRAWINFO)Header;
PPH_GRAPH_DRAW_INFO drawInfo = getDrawInfo->DrawInfo;
if (context->GraphDpi == 0)
context->GraphDpi = PhGetWindowDpi(GraphHandle);
drawInfo->Flags = PH_GRAPH_USE_GRID_X | PH_GRAPH_USE_LINE_2;
PhSiSetColorsGraphDrawInfo(drawInfo, CpuHistoryGraphColor1, CpuHistoryGraphColor2, context->GraphDpi);
if (!(SystemStatistics.CpuKernelHistory && SystemStatistics.CpuUserHistory))
break;
PhGraphStateGetDrawInfo(GraphState, getDrawInfo, SystemStatistics.CpuUserHistory->Count);
if (!GraphState->Valid)
{
PhCopyCircularBuffer_FLOAT(SystemStatistics.CpuKernelHistory, GraphState->Data1, drawInfo->LineDataCount);
PhCopyCircularBuffer_FLOAT(SystemStatistics.CpuUserHistory, GraphState->Data2, drawInfo->LineDataCount);
GraphState->Valid = TRUE;
}
}
break;
case GCN_GETTOOLTIPTEXT:
{
PPH_GRAPH_GETTOOLTIPTEXT getTooltipText = (PPH_GRAPH_GETTOOLTIPTEXT)Header;
if (getTooltipText->Index < getTooltipText->TotalCount)
{
if (GraphState->TooltipIndex != getTooltipText->Index)
{
FLOAT cpuKernel;
FLOAT cpuUser;
PH_FORMAT format[5];
cpuKernel = PhGetItemCircularBuffer_FLOAT(SystemStatistics.CpuKernelHistory, getTooltipText->Index);
cpuUser = PhGetItemCircularBuffer_FLOAT(SystemStatistics.CpuUserHistory, getTooltipText->Index);
// %.2f%%%s\n%s
PhInitFormatF(&format[0], ((DOUBLE)cpuKernel + cpuUser) * 100, 2);
PhInitFormatC(&format[1], L'%');
PhInitFormatSR(&format[2], PH_AUTO_T(PH_STRING, PhSipGetMaxCpuString(getTooltipText->Index))->sr);
PhInitFormatC(&format[3], L'\n');
PhInitFormatSR(&format[4], PH_AUTO_T(PH_STRING, PhGetStatisticsTimeString(NULL, getTooltipText->Index))->sr);
PhMoveReference(&GraphState->TooltipText, PhFormat(format, RTL_NUMBER_OF(format), 128));
}
getTooltipText->Text = PhGetStringRef(GraphState->TooltipText);
}
}
break;
case GCN_MOUSEEVENT:
{
PPH_GRAPH_MOUSEEVENT mouseEvent = (PPH_GRAPH_MOUSEEVENT)Header;
PPH_PROCESS_RECORD record = NULL;
if (mouseEvent->Message == WM_LBUTTONDBLCLK)
{
if (PhGetIntegerSetting(SETTING_NAME_SHOWSYSINFOGRAPH))
{
PhShowSystemInformationDialog(L"CPU");
}
else
{
if (mouseEvent->Index < mouseEvent->TotalCount)
{
record = PhSipReferenceMaxCpuRecord(mouseEvent->Index);
}
if (record)
{
PhShowProcessRecordDialog(PhMainWndHandle, record);
PhDereferenceProcessRecord(record);
}
}
}
}
break;
}
}
TOOLSTATUS_GRAPH_MESSAGE_CALLBACK_DECLARE(PhysicalHistoryGraphMessageCallback)
{
switch (Header->code)
{
case GCN_GETDRAWINFO:
{
PTB_GRAPH_CONTEXT context = (PTB_GRAPH_CONTEXT)Context;
PPH_GRAPH_GETDRAWINFO getDrawInfo = (PPH_GRAPH_GETDRAWINFO)Header;
PPH_GRAPH_DRAW_INFO drawInfo = getDrawInfo->DrawInfo;
if (context->GraphDpi == 0)
context->GraphDpi = PhGetWindowDpi(GraphHandle);
drawInfo->Flags = PH_GRAPH_USE_GRID_X;
PhSiSetColorsGraphDrawInfo(drawInfo, PhysicalHistoryGraphColor1, 0, context->GraphDpi);
if (!SystemStatistics.PhysicalHistory)
break;
PhGraphStateGetDrawInfo(GraphState, getDrawInfo, SystemStatistics.PhysicalHistory->Count);
if (!GraphState->Valid)
{
for (ULONG i = 0; i < drawInfo->LineDataCount; i++)
{
GraphState->Data1[i] = (FLOAT)PhGetItemCircularBuffer_ULONG(SystemStatistics.PhysicalHistory, i);
}
PhDivideSinglesBySingle(
GraphState->Data1,
(FLOAT)PhSystemBasicInformation.NumberOfPhysicalPages,
drawInfo->LineDataCount
);
GraphState->Valid = TRUE;
}
}
break;
case GCN_GETTOOLTIPTEXT:
{
PPH_GRAPH_GETTOOLTIPTEXT getTooltipText = (PPH_GRAPH_GETTOOLTIPTEXT)Header;
if (getTooltipText->Index < getTooltipText->TotalCount)
{
if (GraphState->TooltipIndex != getTooltipText->Index)
{
ULONG physicalUsage;
PH_FORMAT format[4];
if (!SystemStatistics.PhysicalHistory)
break;
physicalUsage = PhGetItemCircularBuffer_ULONG(SystemStatistics.PhysicalHistory, getTooltipText->Index);
// Physical memory: %s\n%s
PhInitFormatS(&format[0], L"Physical memory: ");
PhInitFormatSize(&format[1], UInt32x32To64(physicalUsage, PAGE_SIZE));
PhInitFormatC(&format[2], L'\n');
PhInitFormatSR(&format[3], PH_AUTO_T(PH_STRING, PhGetStatisticsTimeString(NULL, getTooltipText->Index))->sr);
PhMoveReference(&GraphState->TooltipText, PhFormat(format, RTL_NUMBER_OF(format), 128));
}
getTooltipText->Text = PhGetStringRef(GraphState->TooltipText);
}
}
break;
case GCN_MOUSEEVENT:
{
PPH_GRAPH_MOUSEEVENT mouseEvent = (PPH_GRAPH_MOUSEEVENT)Header;
if (mouseEvent->Message == WM_LBUTTONDBLCLK)
{
if (PhGetIntegerSetting(SETTING_NAME_SHOWSYSINFOGRAPH))
{
PhShowSystemInformationDialog(L"Memory");
}
}
}
break;
}
}
TOOLSTATUS_GRAPH_MESSAGE_CALLBACK_DECLARE(CommitHistoryGraphMessageCallback)
{
switch (Header->code)
{
case GCN_GETDRAWINFO:
{
PTB_GRAPH_CONTEXT context = (PTB_GRAPH_CONTEXT)Context;
PPH_GRAPH_GETDRAWINFO getDrawInfo = (PPH_GRAPH_GETDRAWINFO)Header;
PPH_GRAPH_DRAW_INFO drawInfo = getDrawInfo->DrawInfo;
if (context->GraphDpi == 0)
context->GraphDpi = PhGetWindowDpi(GraphHandle);
drawInfo->Flags = PH_GRAPH_USE_GRID_X;
PhSiSetColorsGraphDrawInfo(drawInfo, CommitHistoryGraph1Color1, 0, context->GraphDpi);
if (!(SystemStatistics.CommitHistory && SystemStatistics.Performance))
break;
PhGraphStateGetDrawInfo(GraphState, getDrawInfo, SystemStatistics.CommitHistory->Count);
if (!GraphState->Valid)
{
for (ULONG i = 0; i < drawInfo->LineDataCount; i++)
{
GraphState->Data1[i] = (FLOAT)PhGetItemCircularBuffer_ULONG(SystemStatistics.CommitHistory, i);
}
PhDivideSinglesBySingle(
GraphState->Data1,
(FLOAT)SystemStatistics.Performance->CommitLimit,
drawInfo->LineDataCount
);
GraphState->Valid = TRUE;
}
}
break;
case GCN_GETTOOLTIPTEXT:
{
PPH_GRAPH_GETTOOLTIPTEXT getTooltipText = (PPH_GRAPH_GETTOOLTIPTEXT)Header;
if (getTooltipText->Index < getTooltipText->TotalCount)
{
if (GraphState->TooltipIndex != getTooltipText->Index)
{
ULONG commitUsage;
PH_FORMAT format[4];
if (!SystemStatistics.CommitHistory)
break;
commitUsage = PhGetItemCircularBuffer_ULONG(SystemStatistics.CommitHistory, getTooltipText->Index);
// Commit charge: %s\n%s
PhInitFormatS(&format[0], L"Commit charge: ");
PhInitFormatSize(&format[1], UInt32x32To64(commitUsage, PAGE_SIZE));
PhInitFormatC(&format[2], L'\n');
PhInitFormatSR(&format[3], PH_AUTO_T(PH_STRING, PhGetStatisticsTimeString(NULL, getTooltipText->Index))->sr);
PhMoveReference(&GraphState->TooltipText, PhFormat(format, RTL_NUMBER_OF(format), 128));
}
getTooltipText->Text = PhGetStringRef(GraphState->TooltipText);
}
}
break;
case GCN_MOUSEEVENT:
{
PPH_GRAPH_MOUSEEVENT mouseEvent = (PPH_GRAPH_MOUSEEVENT)Header;
if (mouseEvent->Message == WM_LBUTTONDBLCLK)
{
if (PhGetIntegerSetting(SETTING_NAME_SHOWSYSINFOGRAPH))
{
PhShowSystemInformationDialog(L"Memory");
}
}
}
break;
}
}
TOOLSTATUS_GRAPH_MESSAGE_CALLBACK_DECLARE(IoHistoryGraphMessageCallback)
{
switch (Header->code)
{
case GCN_GETDRAWINFO:
{
PTB_GRAPH_CONTEXT context = (PTB_GRAPH_CONTEXT)Context;
PPH_GRAPH_GETDRAWINFO getDrawInfo = (PPH_GRAPH_GETDRAWINFO)Header;
PPH_GRAPH_DRAW_INFO drawInfo = getDrawInfo->DrawInfo;
if (context->GraphDpi == 0)
context->GraphDpi = PhGetWindowDpi(GraphHandle);
drawInfo->Flags = PH_GRAPH_USE_GRID_X | PH_GRAPH_USE_LINE_2;
PhSiSetColorsGraphDrawInfo(drawInfo, IoHistoryGraphColor1, IoHistoryGraphColor2, context->GraphDpi);
if (!(SystemStatistics.IoReadHistory && SystemStatistics.IoOtherHistory && SystemStatistics.IoWriteHistory))
break;
PhGraphStateGetDrawInfo(GraphState, getDrawInfo, SystemStatistics.IoReadHistory->Count);
if (!GraphState->Valid)
{
FLOAT max = 1024 * 1024; // minimum scaling of 1 MB.
for (ULONG i = 0; i < drawInfo->LineDataCount; i++)
{
GraphState->Data1[i] =
(FLOAT)PhGetItemCircularBuffer_ULONG64(SystemStatistics.IoReadHistory, i) +
(FLOAT)PhGetItemCircularBuffer_ULONG64(SystemStatistics.IoOtherHistory, i);
GraphState->Data2[i] =
(FLOAT)PhGetItemCircularBuffer_ULONG64(SystemStatistics.IoWriteHistory, i);
if (max < GraphState->Data1[i] + GraphState->Data2[i])
max = GraphState->Data1[i] + GraphState->Data2[i];
}
PhDivideSinglesBySingle(GraphState->Data1, max, drawInfo->LineDataCount);
PhDivideSinglesBySingle(GraphState->Data2, max, drawInfo->LineDataCount);
GraphState->Valid = TRUE;
}
}
break;
case GCN_GETTOOLTIPTEXT:
{
PPH_GRAPH_GETTOOLTIPTEXT getTooltipText = (PPH_GRAPH_GETTOOLTIPTEXT)Header;
if (getTooltipText->Index < getTooltipText->TotalCount)
{
if (GraphState->TooltipIndex != getTooltipText->Index)
{
ULONG64 ioRead;
ULONG64 ioWrite;
ULONG64 ioOther;
PH_FORMAT format[9];
if (!(SystemStatistics.IoReadHistory && SystemStatistics.IoOtherHistory && SystemStatistics.IoWriteHistory))
break;
ioRead = PhGetItemCircularBuffer_ULONG64(SystemStatistics.IoReadHistory, getTooltipText->Index);
ioWrite = PhGetItemCircularBuffer_ULONG64(SystemStatistics.IoWriteHistory, getTooltipText->Index);
ioOther = PhGetItemCircularBuffer_ULONG64(SystemStatistics.IoOtherHistory, getTooltipText->Index);
// R: %s\nW: %s\nO: %s%s\n%s
PhInitFormatS(&format[0], L"R: ");
PhInitFormatSize(&format[1], ioRead);
PhInitFormatS(&format[2], L"\nW: ");
PhInitFormatSize(&format[3], ioWrite);
PhInitFormatS(&format[4], L"\nO: ");
PhInitFormatSize(&format[5], ioOther);
PhInitFormatSR(&format[6], PH_AUTO_T(PH_STRING, PhSipGetMaxIoString(getTooltipText->Index))->sr);
PhInitFormatC(&format[7], L'\n');
PhInitFormatSR(&format[8], PH_AUTO_T(PH_STRING, PhGetStatisticsTimeString(NULL, getTooltipText->Index))->sr);
PhMoveReference(&GraphState->TooltipText, PhFormat(format, RTL_NUMBER_OF(format), 128));
}
getTooltipText->Text = PhGetStringRef(GraphState->TooltipText);
}
}
break;
case GCN_MOUSEEVENT:
{
PPH_GRAPH_MOUSEEVENT mouseEvent = (PPH_GRAPH_MOUSEEVENT)Header;
PPH_PROCESS_RECORD record = NULL;
if (mouseEvent->Message == WM_LBUTTONDBLCLK)
{
if (PhGetIntegerSetting(SETTING_NAME_SHOWSYSINFOGRAPH))
{
PhShowSystemInformationDialog(L"I/O");
}
else
{
if (mouseEvent->Index < mouseEvent->TotalCount)
{
record = PhSipReferenceMaxIoRecord(mouseEvent->Index);
}
if (record)
{
PhShowProcessRecordDialog(PhMainWndHandle, record);
PhDereferenceProcessRecord(record);
}
}
}
}
break;
}
}
```
|
```c++
///|/
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/
#ifndef slic3r_Utils_WinRegistry_hpp_
#define slic3r_Utils_WinRegistry_hpp_
#ifdef _WIN32
#include <string>
namespace Slic3r {
// Creates a Windows registry key for the files with the given 'extension' and associates them to the application 'prog_id'.
// If 'set_as_default' is true, the application 'prog_id' is set ad default application for the file type 'extension'.
// The file type registration implementation is based on code taken from:
// path_to_url
// The set as default implementation is based on code taken from:
// path_to_url
// path_to_url
void associate_file_type(const std::wstring& extension, const std::wstring& prog_id, const std::wstring& prog_desc, bool set_as_default);
} // namespace Slic3r
#endif // _WIN32
#endif // slic3r_Utils_WinRegistry_hpp_
```
|
Events in the year 2017 in Lithuania.
Incumbents
President: Dalia Grybauskaitė
Prime Minister: Saulius Skvernelis
Seimas Speaker: Viktoras Pranckietis
Deaths
17 March – Laurynas Stankevičius, economist and politician, former Prime Minister (b. 1935)
6 June – Rokas Žilinskas, journalist and politician, member of the Lithuanian Parliament (b. 1972)
References
2010s in Lithuania
Years of the 21st century in Lithuania
2017 in Europe
Lithuania
|
Diran is a mountain in Pakistan.
Diran may also refer to:
Places
Diran, Iran, a village in Zanjan Province, Iran
Persons
Given name
Diran of Armenia, an Armenian King (339-350)
Diran Adebayo (born 1968), British novelist, cultural critic and broadcaster
Diran Alexanian (1881–1954), French Armenian cello teacher and musician
Diran Chrakian (1875-1921), Armenian poet, writer, painter and teacher who was a victim of the Armenian Genocide
Diran Kelekian (1862-1915), Ottoman Armenian journalist, writer, editor and professor who was an Armenian Genocide victim
Diran Manoukian (born 1919), French Armenian field hockey player
Family name
Richard K. Diran (born 1949), American gemologist
Armenian masculine given names
Masculine given names
|
```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.server;
import jakarta.servlet.http.HttpServlet;
/** Pair of servlet path and servlet instance object. */
public record Route(String path, Class<? extends HttpServlet> servletClass) {
/** Creates a new route mapping between a path (may have wildcards) and a servlet. */
public static Route route(String path, Class<? extends HttpServlet> servletClass) {
return new Route(path, servletClass);
}
}
```
|
```c++
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id: memory.cc 52238 2013-01-18 20:21:22Z zardosht $"
/*
COPYING CONDITIONS NOTICE:
This program is free software; you can redistribute it and/or modify
published by the Free Software Foundation, and provided that the
following conditions are met:
* Redistributions of source code must retain this COPYING
CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the
DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the
PATENT MARKING NOTICE (below), and the PATENT RIGHTS
GRANT (below).
* Redistributions in binary form must reproduce this COPYING
CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the
DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the
PATENT MARKING NOTICE (below), and the PATENT RIGHTS
GRANT (below) in the documentation and/or other materials
provided with the distribution.
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
COPYRIGHT NOTICE:
TokuFT, Tokutek Fractal Tree Indexing Library.
DISCLAIMER:
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
UNIVERSITY PATENT NOTICE:
The technology is licensed by the Massachusetts Institute of
Technology, Rutgers State University of New Jersey, and the Research
Foundation of State University of New York at Stony Brook under
United States of America Serial No. 11/760379 and to the patents
and/or patent applications resulting from it.
PATENT MARKING NOTICE:
This software is covered by US Patent No. 8,185,551.
This software is covered by US Patent No. 8,489,638.
PATENT RIGHTS GRANT:
"THIS IMPLEMENTATION" means the copyrightable works distributed by
Tokutek as part of the Fractal Tree project.
"PATENT CLAIMS" means the claims of patents that are owned or
licensable by Tokutek, both currently or in the future; and that in
the absence of this license would be infringed by THIS
IMPLEMENTATION or by using or running THIS IMPLEMENTATION.
"PATENT CHALLENGE" shall mean a challenge to the validity,
patentability, enforceability and/or non-infringement of any of the
PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS.
Tokutek hereby grants to you, for the term and geographical scope of
the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to
make, have made, use, offer to sell, sell, import, transfer, and
otherwise run, modify, and propagate the contents of THIS
IMPLEMENTATION, where such license applies only to the PATENT
CLAIMS. This grant does not include claims that would be infringed
only as a consequence of further modifications of THIS
IMPLEMENTATION. If you or your agent or licensee institute or order
or agree to the institution of patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that
THIS IMPLEMENTATION constitutes direct or contributory patent
infringement, or inducement of patent infringement, then any rights
such litigation is filed. If you or your agent or exclusive
licensee institute or order or agree to the institution of a PATENT
CHALLENGE, then Tokutek may terminate any rights granted to you
*/
#include <sys/mman.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <portability/toku_assert.h>
#include <portability/toku_os.h>
static bool check_huge_pages_config_file(const char *fname)
// Effect: Return true if huge pages are there. If so, print diagnostics.
{
bool huge_pages_enabled = false;
FILE *f = fopen(fname, "r");
if (f) {
// It's redhat and the feature appears to be there. Is it enabled?
char buf[1000];
char *r = fgets(buf, sizeof(buf), f);
assert(r != NULL);
if (strstr(buf, "[always]")) {
fprintf(stderr, "Transparent huge pages are enabled, according to %s\n", fname);
huge_pages_enabled = true;
} else {
huge_pages_enabled =false;
}
fclose(f);
}
return huge_pages_enabled;
}
static bool check_huge_pages_in_practice(void)
// Effect: Return true if huge pages appear to be defined in practice.
{
#ifdef HAVE_MINCORE
#ifdef HAVE_MAP_ANONYMOUS
const int map_anonymous = MAP_ANONYMOUS;
#else
const int map_anonymous = MAP_ANON;
#endif
const size_t TWO_MB = 2UL*1024UL*1024UL;
void *first = mmap(NULL, 2*TWO_MB, PROT_READ|PROT_WRITE, MAP_PRIVATE|map_anonymous, -1, 0);
if ((long)first==-1) perror("mmap failed");
{
int r = munmap(first, 2*TWO_MB);
assert(r==0);
}
void *second_addr = (void*)(((unsigned long)first + TWO_MB) & ~(TWO_MB -1));
void *second = mmap(second_addr, TWO_MB, PROT_READ|PROT_WRITE, MAP_FIXED|MAP_PRIVATE|map_anonymous, -1, 0);
if ((long)second==-1) perror("mmap failed");
assert((long)second%TWO_MB == 0);
const long pagesize = 4096;
const long n_pages = TWO_MB/pagesize;
unsigned char vec[n_pages];
{
int r = mincore(second, TWO_MB, vec);
if (r!=0 && errno==ENOMEM) {
// On some kernels (e.g., Centos 5.8), mincore doesn't work. It seems unlikely that huge pages are here.
munmap(second, TWO_MB);
return false;
}
assert(r==0);
}
for (long i=0; i<n_pages; i++) {
assert(!vec[i]);
}
((char*)second)[0] = 1;
{
int r = mincore(second, TWO_MB, vec);
// If the mincore worked the first time, it probably works here too.x
assert(r==0);
}
assert(vec[0]);
{
int r = munmap(second, TWO_MB);
assert(r==0);
}
if (vec[1]) {
fprintf(stderr, "Transparent huge pages appear to be enabled according to mincore()\n");
return true;
} else {
return false;
}
#else
// No mincore, so no way to check this in practice
return false;
#endif
}
bool toku_os_huge_pages_enabled(void)
// Effect: Return true if huge pages appear to be enabled. If so, print some diagnostics to stderr.
// If environment variable TOKU_HUGE_PAGES_OK is set, then don't complain.
{
char *toku_huge_pages_ok = getenv("TOKU_HUGE_PAGES_OK");
if (toku_huge_pages_ok) {
return false;
} else {
bool conf1 = check_huge_pages_config_file("/sys/kernel/mm/redhat_transparent_hugepage/enabled");
bool conf2 = check_huge_pages_config_file("/sys/kernel/mm/transparent_hugepage/enabled");
bool prac = check_huge_pages_in_practice();
return conf1|conf2|prac;
}
}
```
|
Vibeke Knudsen (10 November 1948 – 18 December 2016) was a Norwegian diplomat. She served as Norway's ambassador to Colombia from 2009 to 2016. She also held a dual accreditation, serving as Norway's ambassador to Ecuador from 2010. She also held diplomatic offices in Venezuela, Greece, Austria and the Netherlands. A social anthropologist by profession, Knudsen obtained a master's degree at the University of Oslo in 1980. That same year, she joined the Foreign Ministry. She retired in September 2016.
Knudsen died on 18 December 2016 at the age of 68.
References
1948 births
2016 deaths
Ambassadors of Norway to Colombia
Ambassadors of Norway to Ecuador
Norwegian anthropologists
Norwegian expatriates in Austria
Norwegian expatriates in Greece
Norwegian expatriates in the Netherlands
University of Oslo alumni
Social anthropologists
Norwegian women ambassadors
Norwegian women anthropologists
|
```c++
//
//
// See accompanying file LICENSE_1_0.txt or copy at
// path_to_url
#include <boost/mp11/utility.hpp>
#include <boost/core/lightweight_test_trait.hpp>
template<class T> struct Xi
{
};
template<> struct Xi<void>
{
using type = void;
};
template<class T> using X = typename Xi<T>::type;
template<class T> using add_pointer = T*;
template<class T> using add_reference = T&;
template<class T> using add_extents = T[];
int main()
{
using boost::mp11::mp_valid;
using boost::mp11::mp_identity;
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_identity>));
BOOST_TEST_TRAIT_TRUE((mp_valid<mp_identity, void>));
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_identity, void, void>));
BOOST_TEST_TRAIT_FALSE((mp_valid<X>));
BOOST_TEST_TRAIT_TRUE((mp_valid<X, void>));
BOOST_TEST_TRAIT_FALSE((mp_valid<X, int>));
BOOST_TEST_TRAIT_FALSE((mp_valid<X, void, void>));
BOOST_TEST_TRAIT_FALSE((mp_valid<add_pointer>));
BOOST_TEST_TRAIT_TRUE((mp_valid<add_pointer, void>));
BOOST_TEST_TRAIT_TRUE((mp_valid<add_pointer, int>));
#if !defined( BOOST_MSVC ) || !BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
// msvc-12.0 can form pointer to reference
BOOST_TEST_TRAIT_FALSE((mp_valid<add_pointer, int&>));
#endif
BOOST_TEST_TRAIT_FALSE((mp_valid<add_pointer, void, void>));
#if !defined( BOOST_GCC ) || !BOOST_WORKAROUND( BOOST_GCC, < 70000 )
// g++ up to at least 6.3 doesn't like add_reference for some reason or other
BOOST_TEST_TRAIT_FALSE((mp_valid<add_reference>));
#if !defined( BOOST_MSVC ) || !BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
// msvc-12.0 gives an internal error here
BOOST_TEST_TRAIT_FALSE((mp_valid<add_reference, void>));
#endif
BOOST_TEST_TRAIT_TRUE((mp_valid<add_reference, int>));
BOOST_TEST_TRAIT_FALSE((mp_valid<add_reference, int, int>));
#endif
BOOST_TEST_TRAIT_FALSE((mp_valid<add_extents>));
BOOST_TEST_TRAIT_TRUE((mp_valid<add_extents, int>));
#if !defined( BOOST_MSVC ) || !BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
// msvc-12.0 can form arrays to void or int&
BOOST_TEST_TRAIT_FALSE((mp_valid<add_extents, void>));
BOOST_TEST_TRAIT_FALSE((mp_valid<add_extents, int&>));
#endif
BOOST_TEST_TRAIT_FALSE((mp_valid<add_extents, int, int>));
return boost::report_errors();
}
```
|
```java
package com.spring.sns;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
public class SubController {
private final SnsService sns;
@Autowired
SubController(
SnsService sns) {
this.sns = sns;
}
@GetMapping("/")
public String root() {
return "index";
}
@GetMapping("/subscribe")
public String add() {
return "sub";
}
// Adds a new item to the database.
@RequestMapping(value = "/addEmail", method = RequestMethod.POST)
@ResponseBody
String addItems(HttpServletRequest request, HttpServletResponse response) {
String email = request.getParameter("email");
return sns.subEmail(email);
}
@RequestMapping(value = "/delSub", method = RequestMethod.POST)
@ResponseBody
String delSub(HttpServletRequest request, HttpServletResponse response) {
String email = request.getParameter("email");
sns.unSubEmail(email);
return email + " was successfully deleted!";
}
@RequestMapping(value = "/addMessage", method = RequestMethod.POST)
@ResponseBody
String addMessage(HttpServletRequest request, HttpServletResponse response) {
String body = request.getParameter("body");
String lang = request.getParameter("lang");
return sns.pubTopic(body, lang);
}
@RequestMapping(value = "/getSubs", method = RequestMethod.GET)
@ResponseBody
String getSubs(HttpServletRequest request, HttpServletResponse response) {
return sns.getAllSubscriptions();
}
}
```
|
David Maher is a computer scientist and the chief technology officer and executive vice president of Intertrust Technologies. He is also a Bell Labs Fellow and was chief architect for AT&T's STU-III secure voice, data and video products used by the White House and the United States Department of Defense.
Life
David Maher joined Intertrust Technologies in 1999 as the chief technology officer. Prior to joining Intertrust, Maher worked at AT&T where he held several positions including Head of Secure Systems Research Department. Maher holds a Ph.D. in mathematics from Lehigh University.
Prior to joining Intertrust, Maher was the chief scientist for AT&T Secure Communications Systems. While at AT&T, he was the security architect for AT&T's Internet services platform as well as the chief architect for the STU-III secure voice, data and video products which have been used by the White House and the Department of Defense. Maher joined Bell Labs in 1981 and was recognized as a Bell Labs Fellow for his work there.
Maher has also taught electrical engineering, mathematics, and computer science at several institutions.
References
Year of birth missing (living people)
Living people
American chief technology officers
American computer scientists
Scientists at Bell Labs
Lehigh University alumni
Place of birth missing (living people)
|
Central Congregational Church Manse is a heritage-listed manse at 21 Quarry Street, Ipswich, City of Ipswich, Queensland, Australia. It was designed and built in 1883 by Samuel Shenton. It was added to the Queensland Heritage Register on 21 October 1992.
History
This two storey timber residence was built as the manse for the pastors of the Congregational Church of Ipswich. The Congregational Church Yearbook of 1883 describes the Manse during its construction as follows: "The edifice will be a two storeyed weather-board house with verandah balcony all round, containing 12 rooms and finished in a style that will do credit to the denomination". It was designed and erected by architect/builder Samuel Shenton, himself a member of the Congregational Church, costing . Construction of the Manse was commenced and finished in 1883.
The Congregational Church of Ipswich was formed on 2 June 1854 as a union of necessity between the Baptist and Independent faiths due to small numbers of each in the pioneer town of Ipswich. The Ipswich Congregational Church was the first Congregational parish in Queensland and it soon expanded throughout the state in the later decades of the nineteenth century. The church was a fiercely independent denomination refusing to accept any government subsidies or land grants. In 1854 the Congregational Church established a building committee and in 1855 the first congregational church building in Ipswich was built by Samuel Shenton who later designed the manse, and who was a founding member of the Congregational Church. It was situated on the southern side of Brisbane Street near East Street and was a simple single story timber building.
In 1870 a new church was constructed to the design of Samuel Shenton adjacent to the old church which was used as a Sunday School. By this time the parish was known as the Central Congregational Church. The new church cost and survived until February 1953 when it was destroyed by fire. The site of the church was bought by the Atlantic Oil Co and became the site of a garage and is now the site of Coles supermarket and carpark. Another congregational church was erected in East Street which is now the East Street City Uniting Church.
In 1936-37 the Manse was sold by the Church and was turned into a number of flats. In 1950 twelve and half perches of the manse grounds was resumed for road works and other sections of the land were subdivided.
Externally the residence remains remarkably intact displaying virtually no changes since a photograph taken in 1896 apart from extra vertical balustrading on the upper storey. The manse remains as the only evidence of the 19th century building activities of the Central Congregational Church in Ipswich.
The architect Samuel Shenton was one of the earliest prominent architects in Ipswich whose works are well known in the city and the surrounding area. He arrived in Ipswich in March 1851 and began work as a carpenter and building contractor. Among his early contracts were Dr Challinor's house and shop in Brisbane Street and fitting out the first Presbyterian Church (1853). Shenton made some significant improvements to central Ipswich in the 1860s with the School of Arts and the Lands Office. During this time he was preparing plans, specifications and quantities and in 1879 his contracting business was taken over by Worley and Whitehead. Shenton practised solely as an architect from 1879 until 1889 when his practice was taken over by employee George Brockwell Gill. Shenton subsequently became heavily involved in community and business ventures as well as local politics. He was an alderman for many years and the Mayor of Ipswich from 1871-1872 and 1889. He died in Ipswich on 3 July 1893. Another of his more notable and extant works is Faerieknowe (Fairy Knoll) built for EW Hargraves.
Heritage listing
Central Congregational Church Manse was listed on the Queensland Heritage Register on 21 October 1992 having satisfied the following criteria.
The place is important in demonstrating the evolution or pattern of Queensland's history.
The former Congregational Church Manse is important in demonstrating the early development of the Congregational Church in Ipswich and in Queensland. The Congregational Church was one of the earliest independent denominations established in Queensland. Few Congregational parishes exist today due to the merge of many Congregationalist parishes into the Uniting Church in the 20th century. The former manse is significant for exemplifying the importance of the Congregational Church in Ipswich and of churches in general to 19th century Queensland communities.
The place is important in demonstrating the principal characteristics of a particular class of cultural places.
It also has special association with the work of architect and builder Samuel Shenton as a fine example of his work in Ipswich. Shenton was a prominent architect and builder in Ipswich from the 1850s to the 1880s.
The place is important because of its aesthetic significance.
The former manse has aesthetic significance for its high streetscape value due to its scale and traditional materials and detailing.
The place has a special association with the life or work of a particular person, group or organisation of importance in Queensland's history.
The former manse has special association with the past congregations of the Congregational Church of Ipswich and the pastors and their families who once lived there.
References
Attribution
Further reading
– available online
External links
Queensland Heritage Register
Ipswich, Queensland
Churches in Queensland
Articles incorporating text from the Queensland Heritage Register
Churches completed in 1883
Houses completed in 1883
Clergy houses in Australia
Former Congregational church buildings in Australia
|
```groff
.\" $OpenBSD: pw_init.3,v 1.15 2022/02/18 23:17:15 jsg Exp $
.\"
.\" The Regents of the University of California. All rights reserved.
.\"
.\" This code is derived from software developed by the Computer Systems
.\" Engineering group at Lawrence Berkeley Laboratory under DARPA contract
.\" BG 91-66 and contributed to Berkeley.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd $Mdocdate: February 18 2022 $
.Dt PW_INIT 3
.Os
.Sh NAME
.Nm pw_init ,
.Nm pw_setdir ,
.Nm pw_file ,
.Nm pw_edit ,
.Nm pw_prompt ,
.Nm pw_copy ,
.Nm pw_scan ,
.Nm pw_error
.Nd utility functions for interactive passwd file updates
.Sh SYNOPSIS
.In pwd.h
.In util.h
.Ft void
.Fn pw_init void
.Ft void
.Fn pw_setdir "const char *directory"
.Ft char *
.Fn pw_file "const char *filename"
.Ft void
.Fn pw_edit "int notsetuid" "const char *filename"
.Ft void
.Fn pw_prompt void
.Ft void
.Fn pw_copy "int ffd" "int tfd" "const struct passwd *pw" "const struct passwd *opw"
.Ft int
.Fn pw_scan "char *bp" "struct passwd *pw" "int *flags"
.Ft void
.Fn pw_error "const char *name" "int err" "int eval"
.Sh DESCRIPTION
These functions are designed as conveniences for interactive programs
which update the passwd file and do nothing else.
They generally
handle errors by printing out a message to the standard error stream
and possibly aborting the process.
.Pp
The
.Fn pw_init
function prepares for a passwd update by unlimiting all resource
constraints, disabling core dumps (thus preventing dumping the
contents of the passwd database into a world-readable file), and
disabling most signals.
.Pp
The
.Fn pw_setdir
function sets an alternative directory where the rest of the functions look
for password-related files.
Use this if you are writing utilities that should
be able to handle password files outside of
.Pa /etc .
.Pp
The
.Fn pw_file
function transforms filenames so that they end up in the directory specified
to the latest
.Fn pw_setdir
call.
The rule is that all directories are stripped of the given name and
only the filename is appended to the directory.
.Pp
The
.Fn pw_edit
function runs an editor (named by the environment variable EDITOR, or
.Pa /usr/bin/vi
if EDITOR is not set) on the file
.Fa filename
(or
.Pa /etc/ptmp
if
.Fa filename
is NULL).
If
.Fa notsetuid
is nonzero,
.Fn pw_edit
will set the effective user and group ID to the real user and group ID
before running the editor.
.Pp
The
.Fn pw_prompt
function asks the user whether they want to re-edit the password
file; if the answer is no,
.Fn pw_prompt
deletes the lock file and exits the process.
.Pp
The
.Fn pw_copy
function reads a passwd file from
.Fa ffd
and writes it to
.Fa tfd ,
updating the entry corresponding to pw-\*(Gtpw_name
with the information in
.Fa pw .
If
.Fa opw
is not NULL, opw-\*(Gtpw_name will be used for matching instead.
Additionally, if the existing entry does not match
.Fa opw ,
the operation is aborted.
The use of
.Fa opw
allows the caller to change the user name in an entry as well as
guarantee that the entry being replaced has not changed in the
meantime.
.Pp
The
.Fn pw_scan
function accepts in
.Fa bp
a passwd entry as it would be represented in
.Pa /etc/master.passwd
and fills in
.Fa pw
with corresponding values; string fields in
.Fa pw
will be pointers into
.Fa bp .
Some characters in
.Fa bp
will be overwritten with 0s in order to terminate the strings pointed
to by
.Fa pw .
If
.Fa flags
is non-null, it is filled in with the following flags:
.Bl -tag -width _PASSWORD_NOGIDxxx
.It Dv _PASSWORD_NOUID
The uid field of
.Fa bp
is empty.
.It Dv _PASSWORD_NOGID
The gid field of
.Fa bp
is empty.
.It Dv _PASSWD_NOCHG
The change field of
.Fa bp
is empty.
.It Dv _PASSWD_NOEXP
The expire field of
.Fa bp
is empty.
.El
.Pp
The
.Fn pw_error
function displays an error message, aborts the current passwd update,
and exits the current process.
If
.Fa err
is non-zero, a warning message beginning with
.Fa name
is printed for the current value of
.Va errno .
The process exits with status
.Fa eval .
.Sh RETURN VALUES
The
.Fn pw_scan
function prints a warning message and returns 0 if the string in the
.Fa bp
argument is not a valid passwd string.
Otherwise,
.Fn pw_scan
returns 1.
.Sh FILES
.Bl -tag -width "/etc/master.passwdXXX" -compact
.It Pa /etc/master.passwd
Current password file.
.It Pa /etc/passwd
Legacy password file.
.It Pa /etc/ptmp
Password lock file.
.It Pa /etc/pwd.db
Insecure password database file.
.It Pa /etc/spwd.db
Secure password database file.
.El
.Sh SEE ALSO
.Xr pw_lock 3 ,
.Xr passwd 5
```
|
Thomas Lionel Hill Jr. (born August 31, 1971) is an American former professional basketball player.
A 6'5" shooting guard, Hill played at Duke University from 1989 to 1993, winning two NCAA Championships (1991 and 1992). His teammates at Duke included Grant Hill (no relation), Christian Laettner, and Bobby Hurley. Thomas Hill received Third Team All-ACC honors in 1991,1992, 1993 and was a team captain during his senior season.
He played in 141 career games for Duke, 6th on their all-time list as of March 28, 2010; directly behind Jon Scheyer, and tied with Brian Davis.
After graduating, Hill was drafted by the Indiana Pacers in the 2nd round (#39 pick overall) of the 1993 NBA draft. Hill never played an NBA regular season game but he did play in preseason games where he scored a high of 14. He played in the Australian National Basketball League for one season (appearing in just nine games) for the Perth Wildcats.
Thomas Hill's father, Thomas Sr., won a bronze medal in the 110-meter hurdles at the 1972 Summer Olympics.
Hill is perhaps best remembered for his emotional reaction after his Duke teammate Christian Laettner hit a last-second shot to defeat Kentucky in the elite eight of the 1992 NCAA Tournament. After Laettner hit the shot, a CBS camera panned to Hill who appeared to be crying of joy with his hands on top of his head.
After his basketball career Hill proceeded to coach for Avenues: The World School in New York City and currently is the head coach of varsity basketball and varsity tennis. He later coached at Howard University.
In 2023, Hill was named the Director of Basketball and Head Coach at the St. Andrews Episcopal School in Austin, TX.
Notes
External links
Finnish League profile
1971 births
Living people
African-American basketball players
American expatriate basketball people in Australia
American expatriate basketball people in Finland
American men's basketball players
Basketball players at the 1991 Pan American Games
Basketball players from Dallas County, Texas
Duke Blue Devils men's basketball players
Fargo-Moorhead Fever players
Fort Wayne Fury players
Indiana Pacers draft picks
Pan American Games bronze medalists for the United States
Pan American Games medalists in basketball
People from Lancaster, Texas
Sportspeople from Ellis County, Texas
Perth Wildcats players
Shooting guards
Medalists at the 1991 Pan American Games
21st-century African-American sportspeople
20th-century African-American sportspeople
|
Farben (German: "color") may refer to:
IG Farben - former German chemical industry conglomerate
IG Farben Building - former corporate headquarters of IG Farben in Frankfurt, Germany
IG Farben Trial - the war crimes trial of 24 IG Farben executives following World War II
Jan Jelinek - German electronic musician, who has performed under the name "Farben"
Farben Lehre - Polish punk rock band
Third movement of Arnold Schoenberg's Five Pieces for Orchestra
|
```scala
package guice
import actor.MailActor
import akka.actor.{Actor, ActorRef, ActorSystem}
import com.github.jurajburian.mailer._
import com.google.inject.name.{Named, Names}
import com.google.inject.{Provides, Singleton}
import com.typesafe.config.Config
import core.guice.injection.GuiceActorRefProvider
import models.MailPayload
import net.codingwell.scalaguice.ScalaModule
import services.MailService
import services.ethereal.EtherealMailService
class MailBinding extends ScalaModule with GuiceActorRefProvider {
override def configure(): Unit = {
bind[Actor].annotatedWith(Names.named(MailActor.name)).to[MailActor]
bind[MailService[Message, MailPayload]].to[EtherealMailService]
}
@Provides
@Named(MailActor.name)
def actor(implicit actorSystem: ActorSystem): ActorRef = provideActorRef(MailActor)
@Provides
@Singleton
@Named("ethereal")
def provideMailer(config: Config): Mailer = {
val session = (SmtpAddress(
config.getString("email.ethereal.host"),
config.getInt("email.ethereal.port")
)
:: SmtpStartTls()
:: SessionFactory()).session(
Some(
config.getString("email.ethereal.user") -> config.getString("email.ethereal.password")
)
)
Mailer(session)
}
}
```
|
```sqlpl
SET enable_analyzer=1;
-- Illegal column String of first argument of function concatWithSeparator. Must be a constant String.
SELECT concatWithSeparator('a', 'b') GROUP BY 'a';
-- use-of-uninitialized-value
SELECT concatWithSeparator('|', 'a', concatWithSeparator('|', CAST('a', 'LowCardinality(String)'))) GROUP BY 'a';
SELECT concatWithSeparator('|', 'a', concatWithSeparator('|', CAST('x', 'LowCardinality(String)'))) GROUP BY 'a';
-- should be const like for the query w/o GROUP BY
select dumpColumnStructure('x') GROUP BY 'x';
select dumpColumnStructure('x');
-- from path_to_url
SELECT cityHash64('limit', _CAST(materialize('World'), 'LowCardinality(String)')) FROM system.one GROUP BY GROUPING SETS ('limit');
WITH (
SELECT dummy AS x
FROM system.one
) AS y
SELECT
y,
min(dummy)
FROM remote('127.0.0.{1,2}', system.one)
GROUP BY y;
WITH (
SELECT dummy AS x
FROM system.one
) AS y
SELECT
y,
min(dummy)
FROM remote('127.0.0.{2,3}', system.one)
GROUP BY y;
CREATE TABLE ttt (hr DateTime, ts DateTime) ENGINE=Memory
as select '2000-01-01' d, d;
SELECT
count(),
now() AS c1
FROM remote('127.0.0.{1,2}', currentDatabase(), ttt)
GROUP BY c1 FORMAT Null;
SELECT
count(),
now() AS c1
FROM remote('127.0.0.{3,2}', currentDatabase(), ttt)
GROUP BY c1 FORMAT Null;
SELECT
count(),
now() AS c1
FROM remote('127.0.0.{1,2}', currentDatabase(), ttt)
GROUP BY c1 + 1 FORMAT Null;
SELECT
count(),
now() AS c1
FROM remote('127.0.0.{3,2}', currentDatabase(), ttt)
GROUP BY c1 + 1 FORMAT Null;
SELECT
count(),
tuple(nullIf(toDateTime(formatDateTime(hr, '%F %T', 'America/Los_Angeles'), 'America/Los_Angeles'), toDateTime(0))) as c1,
defaultValueOfArgumentType(toTimeZone(ts, 'America/Los_Angeles')) as c2,
formatDateTime(hr, '%F %T', 'America/Los_Angeles') as c3
FROM remote('127.0.0.{1,2}', currentDatabase(), ttt)
GROUP BY c1, c2, c3 FORMAT Null;
SELECT
count(),
tuple(nullIf(toDateTime(formatDateTime(hr, '%F %T', 'America/Los_Angeles'), 'America/Los_Angeles'), toDateTime(0))) as c1,
defaultValueOfArgumentType(toTimeZone(ts, 'America/Los_Angeles')) as c2,
formatDateTime(hr, '%F %T', 'America/Los_Angeles') as c3
FROM remote('127.0.0.{3,2}', currentDatabase(), ttt)
GROUP BY c1, c2, c3 FORMAT Null;
```
|
```javascript
#version 310 es
precision mediump float;
layout(location = 0) out vec4 FragColor;
struct Str
{
mat4 foo;
};
layout(binding = 0, std140) uniform UBO1
{
layout(row_major) Str foo;
} ubo1;
layout(binding = 1, std140) uniform UBO2
{
layout(column_major) Str foo;
} ubo0;
void main()
{
FragColor = ubo1.foo.foo[0] + ubo0.foo.foo[0];
}
```
|
The 2017 Tennis Classic of Macon was a professional tennis tournament played on outdoor hard courts. It was the fifth edition of the tournament and was part of the 2017 ITF Women's Circuit. It took place in Macon, United States, on 23–29 October 2017.
Singles main draw entrants
Seeds
1 Rankings as of 16 October 2017.
Other entrants
The following players received a wildcard into the singles main draw:
Alona Bondarenko
Victoria Duval
Nicole Gibbs
Katerina Stewart
The following players received entry from the qualifying draw:
Ulrikke Eikeri
Ashley Kratzer
Ann Li
Ashley Weinhold
Champions
Singles
Anna Karolína Schmiedlová def. Victoria Duval, 6–4, 6–1
Doubles
Kaitlyn Christian / Sabrina Santamaria def. Paula Cristina Gonçalves / Sanaz Marand, 6–1, 6–0
External links
2017 Tennis Classic of Macon at ITFtennis.com
Official website
2017 ITF Women's Circuit
2017 in American tennis
Tennis tournaments in Georgia (U.S. state)
2017 in sports in Georgia (U.S. state)
|
"Graphite reactor" directs here. For the graphite reactor at Oak Ridge National Laboratory, see X-10 Graphite Reactor.
A graphite-moderated reactor is a nuclear reactor that uses carbon as a neutron moderator, which allows natural uranium to be used as nuclear fuel.
The first artificial nuclear reactor, the Chicago Pile-1, used nuclear graphite as a moderator. Graphite-moderated reactors were involved in two of the best-known nuclear disasters: an untested graphite annealing process contributed to the Windscale fire (but the graphite itself did not catch fire), while a graphite fire during the Chernobyl disaster contributed to the spread of radioactive material.
Types
Several types of graphite-moderated nuclear reactors have been used in commercial electricity generation:
Gas-cooled reactors
Magnox
UNGG reactor
Advanced gas-cooled reactor (AGR)
Water-cooled reactors
RBMK
MKER
EGP-6
Hanford N-Reactor (dual use)
High-temperature gas-cooled reactors (past)
Dragon reactor
AVR
Peach Bottom Nuclear Generating Station, Unit 1
THTR-300
Fort St. Vrain Generating Station
High temperature gas-cooled reactors (in development or construction)
Pebble-bed reactor
Very high temperature reactor
Prismatic fuel reactor
UHTREX Ultra-high-temperature reactor experiment
Other
Molten salt reactor
Research reactors
There have been a number of research or test reactors built that use graphite as the moderator.
Chicago Pile-1
Chicago Pile-2
Transient Reactor Test Facility (TREAT)
Molten Salt Reactor Experiment (MSRE)
History
The first artificial nuclear reactor, Chicago Pile-1, a graphite-moderated device that produced between 0.5 watts and 200 watts , was constructed by a team led by Enrico Fermi in 1942. The construction and testing of this reactor (an "atomic pile") was part of the Manhattan Project. This work led to the construction of the X-10 Graphite Reactor at Oak Ridge National Laboratory, which was the first nuclear reactor designed and built for continuous operation, and began operation in 1943.
Accidents
There have been several major accidents in graphite-moderated reactors, with the Windscale fire and the Chernobyl disaster probably the best known.
In the Windscale fire, an untested annealing process for the graphite was used, and that contributed to the accident – however it was the uranium fuel rather than the graphite in the reactor that caught fire. The only graphite moderator damage was found to be localized around burning fuel elements.
In the Chernobyl disaster, the graphite was a contributing factor to the cause of the accident. Due to overheating from lack of adequate cooling, the fuel rods began to deteriorate. After the SCRAM (AZ5) button was pressed to shut down the reactor, the control rods jammed in the middle of the core, causing a positive loop, since the nuclear fuel reacted to graphite. This has been dubbed the "final trigger" of events before the rupture. A graphite fire after the main event contributed to the spread of radioactive material. The massive power excursion in Chernobyl during a mishandled test led to the rupture of the reactor vessel and a series of steam explosions, which destroyed the reactor building. Now exposed to both air and the heat from the reactor core, the graphite moderator in the reactor core caught fire, and this fire sent a plume of highly radioactive fallout into the atmosphere and over an extensive geographical area.
In addition, the French Saint-Laurent Nuclear Power Plant and the Spanish Vandellòs Nuclear Power Plant – both UNGG graphite-moderated natural uranium reactors – suffered major accidents. Particularly noteworthy is a partial core meltdown on 17 October 1969 and a heat excursion during graphite annealing on 13 March 1980 in Saint-Laurent, which were both classified as INES 4. The Vandellòs NPP was damaged on 19 October 1989, and a repair was considered uneconomical.
References
Nuclear power reactor types
|
```c++
/// Source : path_to_url
/// Author : liuyubobobo
/// Time : 2020-10-15
#include <iostream>
#include <vector>
using namespace std;
/// Inoder to store all the elements
/// Time Complexity: init: O(n)
/// others: O(1)
/// Space Complexity: O(n)
/// Definition for a binary tree node.
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
class BSTIterator {
private:
vector<int> v;
int p = -1;
public:
BSTIterator(TreeNode* root): v(), p(-1) {
inorder(root);
}
bool hasNext() {
return p + 1 < v.size();
}
int next() {
return v[++p];
}
bool hasPrev() {
return p - 1 >= 0;
}
int prev() {
return v[--p];
}
private:
void inorder(TreeNode* node){
if(!node) return;
inorder(node->left);
v.push_back(node->val);
inorder(node->right);
}
};
int main() {
return 0;
}
```
|
The 2006 Tim Hortons Brier, the Canadian men's national curling championship, was held from March 11 to 19 at the Brandt Centre in Regina, Saskatchewan. In the final, Quebec's Jean-Michel Ménard rink became only the second Quebec team to win the Brier. They also became the first francophone team to win. They defeated Ontario's Glenn Howard in the final.
Teams
Round-robin standings
Final round-robin standings
Round-robin results
All draw times are listed in Eastern Standard Time (UTC−5).
Draw 1
Saturday, March 11, 15:00
Draw 2
Saturday, March 11, 20:00
Draw 3
Sunday, March 12, 10:00
Draw 4
Sunday, March 12, 15:00
Draw 5
Sunday, March 12, 20:00
Draw 6
Monday, March 13, 10:00
Draw 7
Monday, March 13, 15:00
Draw 8
Monday, March 13, 20:00
Draw 9
Tuesday, March 14, 10:00
Draw 10
Tuesday, March 14, 15:00
Draw 11
Tuesday, March 14, 20:00
Draw 12
Wednesday, March 15, 10:00
Draw 13
Wednesday, March 15, 15:00
Draw 14
Wednesday, March 15, 20:00
Draw 15
Thursday, March 16, 9:30
Draw 16
Thursday, March 16, 14:00
Draw 17
Thursday, March 16, 20:00
Playoffs
The Tim Hortons Brier uses the page playoff system where the top four teams with the best records at the end of round-robin play meet in the playoff rounds. The first and second place teams play each other, with the winner advancing directly to the final. The winner of the other page playoff game between the third and fourth place teams plays the loser of the first/second playoff game in the semi-final. The winner of the semi-final moves on to the final.
1 vs. 2 game
Friday, March 17, 20:00
3 vs. 4 game
Friday, March 17, 13:00
Semifinal
Saturday, March 18, 13:00
Final
Sunday, March 19, 19:00
Statistics
Top 5 player percentages
Round Robin only
Provincial playdowns
Bold indicates winner. Italics indicated defending provincial champion
February 8–12 at the Saville Centre in Edmonton, Alberta
Playoffs
Morris 8–3 Petryk (2B vs 3B)
Ferbey 8–2 MacDonald (2A vs 3A)
Morris 6–5 Ferbey (Quarter-final)
Johnson 5–3 Martin (A1 vs. B1)
Martin 8–4 Morris (Semi-final)
Martin 7–5 Johnson (Final)
February 15–19 at the Chilliwack Curling Club, Chilliwack, British Columbia
Playoffs
Ursel 7–1 Gretzinger (Semi-final)
Windsor 7–6 Ursel (Final)
The defending champion, Deane Horning did not qualify.
February 8–12, T.G. Smith Centre, Steinbach, Manitoba
February 8–12 at the Capital Winter Club, Fredericton, New Brunswick
Playoffs
Sherrard 5–3 Kennedy (Semi-final)
Grattan 9–6 Sherrard (Final)
Defending champion Wade Blanchard played third for Charlie Sullivan
February 7–12, St. John's Curling Club, St. John's, Newfoundland and Labrador
Tie-breakers
Skanes 12–11 Davidge
Oke 7–5 Symonds
Thomas 11–7 Skanes
Oke 9–8 Thomas
Playoffs
Noseworthy 7–4 Oke
Peddigrew 6–5 Noseworthy
Defending champion Brad Gushue did not participate, as at the time he was representing Canada at the 2006 Winter Olympics in Turin, Italy.
Northern Ontario
February 6–12, Nipigon Curling Club, Nipigon, Ontario
Tie-breakers
Harnden 8–6 Salo
Belec 8–6 Burgess
Scharf 9–6 Harnden
Harnden 8–2 Burgess
Scharf 4–3 Belec
Playoffs
Scharf 5–3 Gordon (1 vs. 2)
Harnden 9–1 Belec (3 vs. 4)
Gordon 6–4 Harnden (Semi-final)
Gordon 7–6 Scharf (Final)
Defending champion Mike Jakubo did not qualify.
February 10–15, Liverpool Curling Club, Liverpool, Nova Scotia
The 2006 Ontario Kia Cup was held February 6–12, Guelph Sports Centre, Guelph, Ontario
Tie-breakers
Matchett 11–9 Jeffries
Matchett 7–5 Epping
Playoffs
Howard 8–7 Middaugh (1 vs. 2)
Harris 8–3 Matchett (3 vs. 4)
Middaugh 9–5 Harris (Semi-final)
Howard 9–6 Middaugh (Final)
February 8–12, Charlottetown Curling Club, Charlottetown, Prince Edward Island
February 6–12, Arena Conrad-Parent, Sept-Îles, Quebec
Playoffs
Charette 10–4 Crête (A2 vs B3)
Desjardins 8–5 Kennedy (A3 vs B2)
Ménard 6–4 Lafleur (A1 vs B1)
Charette 8–7 Desjardins (Quarter-final)
Charette 7–6 Lafleur (Semi-final)
Ménard 10–5 Charette (Final)
February 8–12, Weyburn Curlin Club, Weyburn, Saskatchewan
/
February 16–19, Whitehorse Curling Club, Whitehorse, Yukon
References
External links
Final on YouTube
2006
Tim Hortons Brier
Tim Hortons Brier
Tim Hortons Brier
Sports competitions in Regina, Saskatchewan
Curling in Saskatchewan
|
```xml
import { MigrationInterface } from "../../../../src/migration/MigrationInterface"
import { QueryRunner } from "../../../../src/query-runner/QueryRunner"
import { User } from "../entity/user"
export class InsertUser0000000000002 implements MigrationInterface {
public transaction = true
public up(queryRunner: QueryRunner): Promise<any> {
const userRepo = queryRunner.connection.getRepository<User>(User)
return userRepo.save(new User())
}
public down(queryRunner: QueryRunner): Promise<any> {
return Promise.resolve()
}
}
```
|
```java
`ArrayList` vs `LinkedList`
`Math` vs `StrictMath` in java
Converting numbers to strings
Equals operation on different data types
Double brace initialization
```
|
Tomás Alejandro Chancalay (born 1 January 1999) is an Argentine professional footballer who plays as a winger for Major League Soccer club New England Revolution, on loan from Racing Club.
Club career
Born in Viale, Entre Ríos, Chancalay joined Colón's youth setup in 2006, from hometown side Arsenal de Viale. On 10 February 2017, he signed his first professional contract with the club.
Promoted to the first team ahead of the 2017–18 campaign, Chancalay made his professional – and Primera División – debut on 26 August 2017, coming on as a second-half substitute for Nicolás Leguizamón in a 1–1 away draw against Rosario Central. In his next appearance on 8 September, he scored his first senior goal as Colón beat Arsenal de Sarandí away from home. He netted further goals against San Martín and Godoy Cruz in twenty-four total appearances in his first season, as Colón qualified for the 2018 Copa Sudamericana.
On 5 February 2021, Chancalay moved to Primera División side Racing, on a loan deal for the rest of the year, including a purchase option. Racing paid a fee of around 100,000 US dollars for the loan deal. On 14 January 2022, Racing triggered the purchase option, buying 50% of Cahncalay's pass for 1,250,000 dollars. The player signed a deal until the end of 2024. On 7 September 2022, Chancalay left Racing to join Emirati side Al-Wasl on a loan deal until June 2023.
On 10 July 2023, Chancalay joined Major League Soccer club New England Revolution on loan for the remainder of the 2023 season. The deal included a purchase option, and an option to extend the loan through the 2024 season. He played his first minutes for the Revolution on August 13 as part of the club's academy side, New England Revolution II, but departed the match after 20 minutes with a thigh contusion.
On September 2, 2023, Chancalay scored 2 goals for the Revolution against Austin FC.
International career
Chancalay was selected by the Argentina under-20s for the 2018 L'Alcúdia International Football Tournament, but was later removed after Colón chose to withdraw him. He had previously trained with the U20s, including against the full side at the 2018 FIFA World Cup. Chancalay was called up by Fernando Batista for the 2019 FIFA U-20 World Cup. He appeared in two matches at the tournament in Poland, as Argentina were eliminated by Mali on penalties after Chancalay missed the decisive spot-kick.
Career statistics
References
External links
1999 births
Living people
Argentine men's footballers
Argentine expatriate men's footballers
People from Paraná Department
Argentina men's youth international footballers
Argentina men's under-20 international footballers
Footballers from Entre Ríos Province
Men's association football wingers
Argentine Primera División players
UAE Pro League players
Club Atlético Colón footballers
Racing Club de Avellaneda footballers
Al Wasl F.C. players
New England Revolution players
Argentine expatriate sportspeople in the United Arab Emirates
Expatriate men's footballers in the United Arab Emirates
MLS Next Pro players
|
Wiżgóry is a village in the administrative district of Gmina Wiżajny, within Suwałki County, Podlaskie Voivodeship, in north-eastern Poland, close to the border with Lithuania. It lies approximately south-west of Wiżajny, north of Suwałki, and north of the regional capital Białystok.
References
Villages in Suwałki County
|
Gábor Kovács (born 23 October 1987 in Ajka) is a Hungarian striker who currently plays for Zalaegerszegi TE.
External links
HLSZ
1987 births
Living people
People from Ajka
Hungarian men's footballers
Men's association football forwards
FC Ajka players
Zalaegerszegi TE players
Footballers from Veszprém County
|
```xml
// ag-grid-ng2 v6.2.0
import { EventEmitter, ViewContainerRef, ElementRef, QueryList, OnInit, AfterViewInit } from '@angular/core';
import { GridOptions, GridApi, ColumnApi } from 'ag-grid/main';
import { Ng2FrameworkFactory } from "./ng2FrameworkFactory";
import { AgGridColumn } from "./agGridColumn";
export declare class AgGridNg2 implements OnInit, AfterViewInit {
private viewContainerRef;
private ng2FrameworkFactory;
private _nativeElement;
private _initialised;
private _destroyed;
private gridParams;
api: GridApi;
columnApi: ColumnApi;
columns: QueryList<AgGridColumn>;
constructor(elementDef: ElementRef, viewContainerRef: ViewContainerRef, ng2FrameworkFactory: Ng2FrameworkFactory);
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnChanges(changes: any): void;
ngOnDestroy(): void;
private globalEventListener(eventType, event);
/**
* inputs
*/
gridOptions: GridOptions;
slaveGrids: any;
rowData: any;
floatingTopRowData: any;
floatingBottomRowData: any;
columnDefs: any;
rowStyle: any;
context: any;
groupColumnDef: any;
localeText: any;
icons: any;
datasource: any;
viewportDatasource: any;
groupRowRendererParams: any;
aggFuncs: any;
fullWidthCellRendererParams: any;
sortingOrder: any;
rowClass: any;
rowSelection: any;
overlayLoadingTemplate: any;
overlayNoRowsTemplate: any;
headerCellTemplate: any;
quickFilterText: any;
rowModelType: any;
rowHeight: any;
rowBuffer: any;
colWidth: any;
headerHeight: any;
groupDefaultExpanded: any;
minColWidth: any;
maxColWidth: any;
viewportRowModelPageSize: any;
viewportRowModelBufferSize: any;
layoutInterval: any;
autoSizePadding: any;
maxPagesInCache: any;
maxConcurrentDatasourceRequests: any;
paginationOverflowSize: any;
paginationPageSize: any;
paginationInitialRowCount: any;
headerCellRenderer: any;
localeTextFunc: any;
groupRowInnerRenderer: any;
groupRowRenderer: any;
isScrollLag: any;
isExternalFilterPresent: any;
getRowHeight: any;
doesExternalFilterPass: any;
getRowClass: any;
getRowStyle: any;
getHeaderCellTemplate: any;
traverseNode: any;
getContextMenuItems: any;
getMainMenuItems: any;
processRowPostCreate: any;
processCellForClipboard: any;
getNodeChildDetails: any;
groupRowAggNodes: any;
getRowNodeId: any;
isFullWidthCell: any;
fullWidthCellRenderer: any;
doesDataFlower: any;
toolPanelSuppressRowGroups: any;
toolPanelSuppressValues: any;
toolPanelSuppressPivots: any;
toolPanelSuppressPivotMode: any;
suppressRowClickSelection: any;
suppressCellSelection: any;
suppressHorizontalScroll: any;
debug: any;
enableColResize: any;
enableCellExpressions: any;
enableSorting: any;
enableServerSideSorting: any;
enableFilter: any;
enableServerSideFilter: any;
angularCompileRows: any;
angularCompileFilters: any;
angularCompileHeaders: any;
groupSuppressAutoColumn: any;
groupSelectsChildren: any;
groupIncludeFooter: any;
groupUseEntireRow: any;
groupSuppressRow: any;
groupSuppressBlankHeader: any;
forPrint: any;
suppressMenuHide: any;
rowDeselection: any;
unSortIcon: any;
suppressMultiSort: any;
suppressScrollLag: any;
singleClickEdit: any;
suppressLoadingOverlay: any;
suppressNoRowsOverlay: any;
suppressAutoSize: any;
suppressParentsInRowNodes: any;
showToolPanel: any;
suppressColumnMoveAnimation: any;
suppressMovableColumns: any;
suppressFieldDotNotation: any;
enableRangeSelection: any;
suppressEnterprise: any;
rowGroupPanelShow: any;
pivotPanelShow: any;
suppressContextMenu: any;
suppressMenuFilterPanel: any;
suppressMenuMainPanel: any;
suppressMenuColumnPanel: any;
enableStatusBar: any;
rememberGroupStateWhenNewData: any;
enableCellChangeFlash: any;
suppressDragLeaveHidesColumns: any;
suppressMiddleClickScrolls: any;
suppressPreventDefaultOnMouseWheel: any;
suppressUseColIdForGroups: any;
suppressCopyRowsToClipboard: any;
pivotMode: any;
suppressAggFuncInHeader: any;
suppressColumnVirtualisation: any;
suppressFocusAfterRefresh: any;
functionsPassive: any;
functionsReadOnly: any;
/**
* Outputs
*/
gridReady: EventEmitter<any>;
columnEverythingChanged: EventEmitter<any>;
newColumnsLoaded: EventEmitter<any>;
columnPivotModeChanged: EventEmitter<any>;
columnRowGroupChanged: EventEmitter<any>;
columnPivotChanged: EventEmitter<any>;
gridColumnsChanged: EventEmitter<any>;
columnValueChanged: EventEmitter<any>;
columnMoved: EventEmitter<any>;
columnVisible: EventEmitter<any>;
columnPinned: EventEmitter<any>;
columnGroupOpened: EventEmitter<any>;
columnResized: EventEmitter<any>;
displayedColumnsChanged: EventEmitter<any>;
virtualColumnsChanged: EventEmitter<any>;
rowGroupOpened: EventEmitter<any>;
rowDataChanged: EventEmitter<any>;
floatingRowDataChanged: EventEmitter<any>;
rangeSelectionChanged: EventEmitter<any>;
columnRowGroupAddRequest: EventEmitter<any>;
columnRowGroupRemoveRequest: EventEmitter<any>;
columnPivotAddRequest: EventEmitter<any>;
columnPivotRemoveRequest: EventEmitter<any>;
columnValueAddRequest: EventEmitter<any>;
columnValueRemoveRequest: EventEmitter<any>;
columnAggFuncChangeRequest: EventEmitter<any>;
clipboardPaste: EventEmitter<any>;
modelUpdated: EventEmitter<any>;
cellClicked: EventEmitter<any>;
cellDoubleClicked: EventEmitter<any>;
cellContextMenu: EventEmitter<any>;
cellValueChanged: EventEmitter<any>;
cellFocused: EventEmitter<any>;
rowSelected: EventEmitter<any>;
selectionChanged: EventEmitter<any>;
beforeFilterChanged: EventEmitter<any>;
filterChanged: EventEmitter<any>;
afterFilterChanged: EventEmitter<any>;
filterModified: EventEmitter<any>;
beforeSortChanged: EventEmitter<any>;
sortChanged: EventEmitter<any>;
afterSortChanged: EventEmitter<any>;
virtualRowRemoved: EventEmitter<any>;
rowClicked: EventEmitter<any>;
rowDoubleClicked: EventEmitter<any>;
gridSizeChanged: EventEmitter<any>;
viewportChanged: EventEmitter<any>;
dragStarted: EventEmitter<any>;
dragStopped: EventEmitter<any>;
itemsAdded: EventEmitter<any>;
itemsRemoved: EventEmitter<any>;
}
```
|
```rust
/*
*
* This software may be used and distributed according to the terms of the
*/
use metaconfig_types::MultiplexId;
use mononoke_types::Timestamp;
use sql_ext::mononoke_queries;
use crate::OperationKey;
mononoke_queries! {
pub(crate) write WalInsertEntry(values: (
blobstore_key: String,
multiplex_id: MultiplexId,
timestamp: Timestamp,
operation_key: OperationKey,
blob_size: Option<u64>,
)) {
none,
"INSERT INTO blobstore_write_ahead_log (blobstore_key, multiplex_id, timestamp, operation_key, blob_size)
VALUES {values}"
}
// In comparison to the sync-queue, we write blobstore keys to the WAL only once
// during the `put` operation. This way when the healer reads entries from the WAL,
// it doesn't need to filter out distinct operation keys and then blobstore keys
// (because each blobstore key can have multiple appearances with the same and
// with different operation keys).
// The healer can just read all the entries older than the timestamp and they will
// represent a set of different put opertions by design.
pub(crate) read WalReadEntries(multiplex_id: MultiplexId, older_than: Timestamp, limit: usize) -> (
String,
MultiplexId,
Timestamp,
OperationKey,
u64,
Option<u64>,
) {
"SELECT blobstore_key, multiplex_id, timestamp, operation_key, id, blob_size
FROM blobstore_write_ahead_log
WHERE multiplex_id = {multiplex_id} AND timestamp <= {older_than}
LIMIT {limit}
"
}
}
```
|
Ivabradine, sold under the brand name Procoralan among others, is a medication, which is a pacemaker current (If) inhibitor, used for the symptomatic management of heart-related chest pain and heart failure. Patients who qualify for use of Ivabradine for coronary heart failure are patients who have symptomatic heart failure, with reduced ejection volume, and heart rate at least 70 bpm, and the condition not able to be fully managed by beta blockers.
Ivabradine acts by allowing negative chronotropy in the sinoatrial structure thus reducing the heart rate via specific inhibition of the pacemaker current, a mechanism different from that of beta blockers and calcium channel blockers, two commonly prescribed antianginal classes of cardiac pharmaceuticals. Ivabradine has no apparent inotropic properties and may be a cardiotonic agent.
Medical uses
It is used for the symptomatic treatment of chronic stable angina pectoris in patients with normal sinus rhythm who cannot take beta blockers. It is also being used off-label in the treatment of inappropriate sinus tachycardia. Ivabradine stands as a pharmacological option for controlling HR and rhythm without associated side effects in postoperative CABG patients with IST
Chest pain
Ivabradine is as effective as the beta blocker atenolol and comparable with amlodipine in the management of chronic stable angina, as demonstrated by improvements in total exercise duration in non-inferiority trials, hence it can be an alternative therapy for those who cannot tolerate conventional therapies. In people not sufficiently managed with beta blockers for their angina, adding ivabradine can further reduce heart rate and improve total exercise duration.
Heart failure
It is used in combination with beta blockers in people with heart failure with LVEF lower than 35 percent inadequately controlled by beta blockers alone and whose heart rate exceeds 70 beats per minute. In people not sufficiently managed with beta blockers for their heart failure adding ivabradine decreases the risk of hospitalization for heart failure.
Tachycardia
The clinical use of ivabradine is predicated on its mechanism of action on sinoatrial nodal tissue where it selectively inhibits the funny current (If) and results in a decrease in heart rate.
Ivabradine’s most frequent application in electrophysiology is for the treatment of inappropriate sinus tachycardia. Its use for inappropriate sinus tachycardia is not a European Medicines Agency/Food and Drug Administration–approved indication for ivabradine.
It has been used experimentally for the treatment of postural orthostatic tachycardia syndrome in patients with long COVID.
Contraindications
Ivabradine is contraindicated in sick sinus syndrome. It should also not be used concomitantly with potent inhibitors of CYP3A4, including azole antifungals (such as ketoconazole), macrolide antibiotics, nefazodone and the antiretroviral drugs nelfinavir and ritonavir.
Use of ivabradine with verapamil or diltiazem is contraindicated.
Adverse effects
Overall, 14.5% of patients taking ivabradine experience luminous phenomena (by patients described as sensations of enhanced brightness in a fully maintained visual field). This is probably due to blockage of Ih ion channels in the retina, which are very similar to cardiac If. These symptoms are mild, transient, and fully reversible. In clinical studies, about 1% of all patients had to discontinue the drug because of these sensations, which occurred on average 40 days after the drug was started.
In a large clinical trial, bradycardia (unusually slow heart rate) occurred in 2% and 5% of patients taking ivabradine at doses of 7.5 and 10 mg respectively (compared to 4.3% in those taking atenolol). 2.6–4.8% reported headaches. Other common adverse drug reactions (1–10% of patients) include first-degree AV block, ventricular extrasystoles, dizziness and/or blurred vision.
Mechanism of action
Ivabradine acts on the If (f is for "funny", so called because it had unusual properties compared with other current systems known at the time of its discovery) ion current, which is highly expressed in the sinoatrial node. If is a mixed Na+–K+ inward current activated by hyperpolarization and modulated by the autonomic nervous system. It is one of the most important ionic currents for regulating pacemaker activity in the sinoatrial (SA) node. Ivabradine selectively inhibits the pacemaker If current in a dose-dependent manner. Blocking this channel reduces cardiac pacemaker activity, selectively slowing the heart rate and allowing more time for blood to flow to the myocardium. By inhibiting the If channel, Ivabradine reduces the heart rate and workload on the heart. This is relevant in the usage of the medication to treat angina as well as congestive heart failure. This is in contrast to other commonly used rate-reducing medications, such as beta-blockers and calcium channel blockers, which not only reduce heart rate, but also the cardiac contractility. Given the selective decrease in rate without loss of contractility, ivabradine may prove efficacious for treatment of congestive heart failure with reduced ejection fraction.
Ivabradine binds to HCN4 receptors (Potassium/sodium hyperpolarization-activated cyclic nucleotide-gated channel 4), utilizing Y506, F509 and I510 residues.
Clinical trials
Coronary artery disease
The BEAUTIFUL study randomised over 10917 patients having stable coronary artery disease and left ventricle dysfunction (ejection fraction < 40%). Ivabradine did not show a significant reduction in the primary composite endpoint of cardiovascular death, admission to hospital for acute myocardial infarction, and admission to hospital for new onset or worsening heart failure. However, in a prespecified subgroup of patients with a baseline heart rate of more than 70 bpm, ivabradine significantly reduced the following secondary endpoints:
Coronary events by 22% (P=0.023)
Fatal and nonfatal myocardial infarction by 36% (P=0.001)
Coronary revascularization by 30% (P=0.016).
These results were seen in combination therapy with beta blockers, and were found to be safe and effective in improving coronary artery disease outcomes in patients with heart rates of 70 bpm or more.
The SIGNIFY trial randomised 19102 patients with stable coronary artery disease and an elevated heart rate greater than 70 beats per minute were assigned to an intervention of ivabradine or placebo in addition to standard therapy. Ivabradine did not significantly improve the secondary outcomes in patient groups, however did demonstrate a reduction in heart rate. When compared to the SHIFT study, a reduction in cardiovascular death or hospital admission was also demonstrated and hence should be considered when additional therapy is in question.
Chronic heart failure
In the SHIFT study, ivabradine significantly reduced the risk of the primary composite endpoint of hospitalization for worsening heart failure or cardiovascular death by 18% (P<0.0001) compared with placebo on top of optimal therapy. These benefits were observed after 3 months of treatment.
SHIFT also showed that administration of ivabradine to heart failure patients significantly reduced the risk of death from heart failure by 26% (P=0.014) and hospitalization for heart failure by 26% (P<0.0001).
The improvements in outcomes were observed throughout all prespecified subgroups: female and male, with or without beta-blockers at randomization, patients below and over 65 years of age, with heart failure of ischemic or non-ischemic etiology, NYHA class II or class III, IV, with or without diabetes, and with or without hypertension. A 2020 Cochrane review found no difference in cardiovascular mortality and serious adverse events between long-term treatment with ivabradine and placebo/usual care/no treatment in participants with heart failure with a reduced ejection fraction.
A note of caution must be emphasised. Ivabradine, though indicated for chronic heart failure in patients who are clinically stable, is not indicated in acute heart failure where the enhanced heart rate represents cardiac reserve. Indiscriminate use of Ivabradine could destabilise these patients.
Society and culture
Approval
Ivabradine was approved by the European Medicines Agency in 2005, and by the United States Food and Drug Administration in 2015.
Names
It is marketed by Amgen under the trade name Corlanor in the United States, and by Servier in the rest of the world under the trade names Procoralan (worldwide), Coralan (in Hong Kong, Singapore, Australia and some other countries), Corlentor (in Armenia, Spain, Italy and Romania), Lancora (in Canada) and Coraxan (in Russia and Serbia). It is also marketed in India under the brand names Ivabrad, Ivabid. In Iran it's sold under the trademark of "bradix" . IVAMAC and Bradia. During its development, ivabradine was known as S-16257.
References
External links
Antianginals
Benzocyclobutenes
Laboratoires Servier
Phenol ethers
Benzazepanes
Lactams
Tertiary amines
|
The Lancia ECV (standing for Experimental Composite Vehicle) was a prototype Group S rally car developed by the Italian manufacturer Lancia to replace the Lancia Delta S4 in World Rally Championship competition for the 1988 season. However, Group B as well as Group S cars were banned from competition by the FIA in late 1986 due to safety concerns and the ECV never raced. Lancia instead developed the Group A Lancia Delta.
The car originally produced over 600 horsepower (448 kW) from a 1759 cc twin-turbocharged engine. This engine, christened TriFlux, was built in an unusual fashion; the valves were crossed (for each side of the cylinder there was an intake and an exhaust valve), so that the two turbochargers could be fed with two separate manifolds. A single manifold carried the intake air (hence the name, from the three separate air ducts). However, Group S rules would have artificially limited the car's output to 300 hp (224 kW) to limit speeds.
The car made extensive use of the composite materials Kevlar and carbon fibre to save weight and add strength. Overall the car weighed . The car also featured a new Martini colour-scheme, replacing the S4's white bodywork with red-based scheme. Lancia used the new scheme on its competition cars in 1987.
The restored ECV1, rebuilt from the original parts, was displayed at the Rally-Legend Event on 7-8-9 October 2010 in San-Marino, by the owner, Giuseppe Volta. An original TriFlux engine has been re-prepared, with the help of the original designer, Ing. Claudio Lombardi, and modern Turbo-engine preparation expert, Claudio Berri. A website has been opened to note the occasion.
ECV II
Despite the cancellation of Group S, Lancia improved the ECV with the 1988 ECV II. The ECV II carbon-fibre chassis was that of the first ECV. The designer of the car was Carlo Gaino of his newly created design studio: Synthesis Design. The ECV II also made use of the TriFlux engine and featured improved aerodynamics.
References
External links
ECV article
Lancia Motor Club (UK)
Design of Lancia ECV II
ecv1.com
Lancia rally cars
Abarth vehicles
|
```c++
//
//
// path_to_url
//
#include "pxr/base/tf/weakPtrFacade.h"
```
|
The closing ceremony of the 1988 Winter Olympics was held on February 28, 1988, beginning at 19:30 MST (3:30 UTC, February 29) at McMahon Stadium in Calgary, Alberta, Canada. The closing ceremony had 60,000 people in attendance, including 10,000 volunteers who received free admission. It was the first Winter Olympics to stage a closing ceremony outdoors.
The closing ceremonies consisted of a Parade of Athletes less formal then the opening ceremonies as athletes from all nations paraded together. The world's largest temporary ice rink was built in McMahon Stadium to showcase amateur figure skating teams as part of the closing ceremonies.
The Olympic flag was lowered and Mayor of Calgary Ralph Klein passed the flag to the president of the IOC who passed it on to Henri Dujol, Mayor of the French city of Albertville, the host of the 1992 Winter Olympics. After a speech by the President of the Organizing Committee for the Games, the President of the IOC proclaims the closing of the Calgary Games and the Olympic flame was slowly extinguished.
Anthems
National Anthem of Canada
National Anthem of France
Olympic Hymn
References
Works cited
Closing ceremony
Ceremonies in Canada
Olympics closing ceremonies
|
```python
import pytest
from vyper import compile_code
from vyper.exceptions import VyperException
fail_list = [
# VALUE is not set in the constructor
"""
VALUE: immutable(uint256)
@deploy
def __init__():
pass
""",
# no `__init__` function, VALUE not set
"""
VALUE: immutable(uint256)
@view
@external
def get_value() -> uint256:
return VALUE
""",
# VALUE given an initial value
"""
VALUE: immutable(uint256) = 3
@deploy
def __init__():
pass
""",
# setting value outside of constructor
"""
VALUE: immutable(uint256)
@deploy
def __init__():
VALUE = 0
@external
def set_value(_value: uint256):
VALUE = _value
""",
# modifying immutable multiple times in constructor
"""
VALUE: immutable(uint256)
@deploy
def __init__(_value: uint256):
VALUE = _value * 3
VALUE = VALUE + 1
""",
# immutable(public()) banned
"""
VALUE: immutable(public(uint256))
@deploy
def __init__(_value: uint256):
VALUE = _value * 3
""",
]
@pytest.mark.parametrize("bad_code", fail_list)
def test_compilation_fails_with_exception(bad_code):
with pytest.raises(VyperException):
compile_code(bad_code)
types_list = (
"uint256",
"int256",
"int128",
"address",
"bytes32",
"decimal",
"bool",
"Bytes[64]",
"String[10]",
)
@pytest.mark.parametrize("typ", types_list)
def test_compilation_simple_usage(typ):
code = f"""
VALUE: immutable({typ})
@deploy
def __init__(_value: {typ}):
VALUE = _value
@view
@external
def get_value() -> {typ}:
return VALUE
"""
assert compile_code(code)
pass_list = [
# using immutable allowed in constructor
"""
VALUE: immutable(uint256)
@deploy
def __init__(_value: uint256):
VALUE = _value * 3
x: uint256 = VALUE + 1
"""
]
@pytest.mark.parametrize("good_code", pass_list)
def test_compilation_success(good_code):
assert compile_code(good_code)
fail_list_with_messages = [
(
"""
imm: immutable(uint256)
@deploy
def __init__(x: uint256):
self.imm = x
""",
"Immutable variables must be accessed without 'self'",
),
(
"""
imm: immutable(uint256)
@deploy
def __init__(x: uint256):
x = imm
@external
def report():
y: uint256 = imm + imm
""",
"Immutable definition requires an assignment in the constructor",
),
(
"""
imm: immutable(uint256)
@deploy
def __init__(x: uint256):
imm = x
@external
def report():
y: uint256 = imm
z: uint256 = self.imm
""",
"'imm' is not a storage variable, it should not be prepended with self",
),
(
"""
struct Foo:
a : uint256
x: immutable(Foo)
@deploy
def __init__():
x = Foo(a=1)
@external
def hello() :
x.a = 2
""",
"Immutable value cannot be written to",
),
]
@pytest.mark.parametrize(["bad_code", "message"], fail_list_with_messages)
def test_compilation_fails_with_exception_message(bad_code: str, message: str):
with pytest.raises(VyperException) as excinfo:
compile_code(bad_code)
assert excinfo.value.message == message
```
|
The 2017 Currie Cup Premier Division was the top tier of the 2017 Currie Cup competition, an annual South African rugby union competition organised by the South African Rugby Union. It was the 79th edition of the competition and was contested between 21 July and 28 October 2017.
The competition was won by , who beat the 33–21 in the final held in Durban. finished bottom of the log, but retained their Premier Division status by beating the in a relegation play-off.
Competition rules and information
There were seven participating teams in the 2017 Currie Cup Premier Division. These seven teams played twice against each other over the course of the competition, once at home and once away. Teams received four points for a win and two points for a draw. Bonus points were awarded to teams that scored 4 or more tries in a game, as well as to teams that lost a match by 7 points or less. Teams were ranked by log points, then points difference (points scored less points conceded).
The top four teams qualified for the semi-finals, which was followed by a final.
Teams
The teams that participated in the 2017 Currie Cup Premier Division were:
Pool stage
Standings
The final log for the 2017 Currie Cup Premier Division was:
Round-by-round
The table below shows a team's progression throughout the season. For each round, each team's cumulative points total is shown with the overall log position in brackets.
Matches
Round One
Round Two
Round Three
Round Four
Round Five
Round Six
Round Seven
Round Eight
Round Nine
Round Ten
Round Eleven
Round Twelve
Round Thirteen
Round Fourteen
Play-offs
Title play-offs
Semifinals
Final
Relegation play-off
remain in the Currie Cup Premier Division for 2018.
remain in the Currie Cup First Division for 2018.
Honours
The honour roll for the 2017 Currie Cup Premier Division was as follows:
Players
Squads
The following squads were named for the 2017 Currie Cup Premier Division:
References
2017
2017 in South African rugby union
2017 rugby union tournaments for clubs
|
```c
#include <stdint.h>
/*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the University of California, Berkeley nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* CRC16 implementation according to CCITT standards.
*
* Note by @antirez: this is actually the XMODEM CRC 16 algorithm, using the
* following parameters:
*
* Name : "XMODEM", also known as "ZMODEM", "CRC-16/ACORN"
* Width : 16 bit
* Poly : 1021 (That is actually x^16 + x^12 + x^5 + 1)
* Initialization : 0000
* Reflect Input byte : False
* Reflect Output CRC : False
* Xor constant to output CRC : 0000
* Output for "123456789" : 31C3
*/
static const uint16_t crc16tab[256]= {
0x0000,0x1021,0x2042,0x3063,0x4084,0x50a5,0x60c6,0x70e7,
0x8108,0x9129,0xa14a,0xb16b,0xc18c,0xd1ad,0xe1ce,0xf1ef,
0x1231,0x0210,0x3273,0x2252,0x52b5,0x4294,0x72f7,0x62d6,
0x9339,0x8318,0xb37b,0xa35a,0xd3bd,0xc39c,0xf3ff,0xe3de,
0x2462,0x3443,0x0420,0x1401,0x64e6,0x74c7,0x44a4,0x5485,
0xa56a,0xb54b,0x8528,0x9509,0xe5ee,0xf5cf,0xc5ac,0xd58d,
0x3653,0x2672,0x1611,0x0630,0x76d7,0x66f6,0x5695,0x46b4,
0xb75b,0xa77a,0x9719,0x8738,0xf7df,0xe7fe,0xd79d,0xc7bc,
0x48c4,0x58e5,0x6886,0x78a7,0x0840,0x1861,0x2802,0x3823,
0xc9cc,0xd9ed,0xe98e,0xf9af,0x8948,0x9969,0xa90a,0xb92b,
0x5af5,0x4ad4,0x7ab7,0x6a96,0x1a71,0x0a50,0x3a33,0x2a12,
0xdbfd,0xcbdc,0xfbbf,0xeb9e,0x9b79,0x8b58,0xbb3b,0xab1a,
0x6ca6,0x7c87,0x4ce4,0x5cc5,0x2c22,0x3c03,0x0c60,0x1c41,
0xedae,0xfd8f,0xcdec,0xddcd,0xad2a,0xbd0b,0x8d68,0x9d49,
0x7e97,0x6eb6,0x5ed5,0x4ef4,0x3e13,0x2e32,0x1e51,0x0e70,
0xff9f,0xefbe,0xdfdd,0xcffc,0xbf1b,0xaf3a,0x9f59,0x8f78,
0x9188,0x81a9,0xb1ca,0xa1eb,0xd10c,0xc12d,0xf14e,0xe16f,
0x1080,0x00a1,0x30c2,0x20e3,0x5004,0x4025,0x7046,0x6067,
0x83b9,0x9398,0xa3fb,0xb3da,0xc33d,0xd31c,0xe37f,0xf35e,
0x02b1,0x1290,0x22f3,0x32d2,0x4235,0x5214,0x6277,0x7256,
0xb5ea,0xa5cb,0x95a8,0x8589,0xf56e,0xe54f,0xd52c,0xc50d,
0x34e2,0x24c3,0x14a0,0x0481,0x7466,0x6447,0x5424,0x4405,
0xa7db,0xb7fa,0x8799,0x97b8,0xe75f,0xf77e,0xc71d,0xd73c,
0x26d3,0x36f2,0x0691,0x16b0,0x6657,0x7676,0x4615,0x5634,
0xd94c,0xc96d,0xf90e,0xe92f,0x99c8,0x89e9,0xb98a,0xa9ab,
0x5844,0x4865,0x7806,0x6827,0x18c0,0x08e1,0x3882,0x28a3,
0xcb7d,0xdb5c,0xeb3f,0xfb1e,0x8bf9,0x9bd8,0xabbb,0xbb9a,
0x4a75,0x5a54,0x6a37,0x7a16,0x0af1,0x1ad0,0x2ab3,0x3a92,
0xfd2e,0xed0f,0xdd6c,0xcd4d,0xbdaa,0xad8b,0x9de8,0x8dc9,
0x7c26,0x6c07,0x5c64,0x4c45,0x3ca2,0x2c83,0x1ce0,0x0cc1,
0xef1f,0xff3e,0xcf5d,0xdf7c,0xaf9b,0xbfba,0x8fd9,0x9ff8,
0x6e17,0x7e36,0x4e55,0x5e74,0x2e93,0x3eb2,0x0ed1,0x1ef0
};
uint16_t crc16(const char *buf, int len) {
int counter;
uint16_t crc = 0;
for (counter = 0; counter < len; counter++)
crc = (crc<<8) ^ crc16tab[((crc>>8) ^ *buf++)&0x00FF];
return crc;
}
```
|
```smalltalk
using UnityEditor;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Audio.Editor
{
[CustomEditor(typeof(TextToSpeech))]
public class TextToSpeechInspector : UnityEditor.Editor
{
private SerializedProperty voiceProperty;
private void OnEnable()
{
voiceProperty = serializedObject.FindProperty("voice");
}
public override void OnInspectorGUI()
{
if (voiceProperty.intValue == (int)TextToSpeechVoice.Other)
{
DrawDefaultInspector();
EditorGUILayout.HelpBox("Use the links below to find more available voices (for non en-US languages):", MessageType.Info);
using (new EditorGUILayout.HorizontalScope())
{
if (GUILayout.Button("Voices for HoloLens 2", EditorStyles.miniButton))
{
Application.OpenURL("path_to_url");
}
if (GUILayout.Button("Voices for desktop Windows", EditorStyles.miniButton))
{
Application.OpenURL("path_to_url#WindowsVersion=Windows_11");
}
}
}
else
{
DrawPropertiesExcluding(serializedObject, "customVoice");
}
serializedObject.ApplyModifiedProperties();
}
}
}
```
|
```c
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <complex.h>
#include <sys/time.h>
#define NAME "cabs"
#define ITERATIONS 1000000
#define REPEATS 3
/**
* Prints the TAP version.
*/
static void print_version( void ) {
printf( "TAP version 13\n" );
}
/**
* Prints the TAP summary.
*
* @param total total number of tests
* @param passing total number of passing tests
*/
static void print_summary( int total, int passing ) {
printf( "#\n" );
printf( "1..%d\n", total ); // TAP plan
printf( "# total %d\n", total );
printf( "# pass %d\n", passing );
printf( "#\n" );
printf( "# ok\n" );
}
/**
* Prints benchmarks results.
*
* @param elapsed elapsed time in seconds
*/
static void print_results( double elapsed ) {
double rate = (double)ITERATIONS / elapsed;
printf( " ---\n" );
printf( " iterations: %d\n", ITERATIONS );
printf( " elapsed: %0.9f\n", elapsed );
printf( " rate: %0.9f\n", rate );
printf( " ...\n" );
}
/**
* Returns a clock time.
*
* @return clock time
*/
static double tic( void ) {
struct timeval now;
gettimeofday( &now, NULL );
return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
}
/**
* Generates a random number on the interval [0,1).
*
* @return random number
*/
static double rand_double( void ) {
int r = rand();
return (double)r / ( (double)RAND_MAX + 1.0 );
}
/**
* Runs a benchmark.
*
* @return elapsed time in seconds
*/
static double benchmark( void ) {
double complex z;
double elapsed;
double re;
double im;
double y;
double t;
int i;
t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
re = ( 1000.0*rand_double() ) - 500.0;
im = ( 1000.0*rand_double() ) - 500.0;
z = re + im*I;
y = cabs( z );
if ( y != y ) {
printf( "should not return NaN\n" );
break;
}
}
elapsed = tic() - t;
if ( y != y ) {
printf( "should not return NaN\n" );
}
return elapsed;
}
/**
* Main execution sequence.
*/
int main( void ) {
double elapsed;
int i;
// Use the current time to seed the random number generator:
srand( time( NULL ) );
print_version();
for ( i = 0; i < REPEATS; i++ ) {
printf( "# c::%s\n", NAME );
elapsed = benchmark();
print_results( elapsed );
printf( "ok %d benchmark finished\n", i+1 );
}
print_summary( REPEATS, REPEATS );
}
```
|
Robots is an anthology of science fiction short stories edited by Isaac Asimov, Martin H. Greenberg and Charles G. Waugh as the ninth volume in their Isaac Asimov's Wonderful Worlds of Science Fiction series. It was first published in paperback by Signet/New American Library in April 1989. The first British edition was issued in paperback by Robinson in 1989.
The book collects seventeen novelettes and short stories by various science fiction authors, together with an introduction by Asimov.
Contents
"Introduction: Robots" (Isaac Asimov)
"The Tunnel Under the World" (Frederik Pohl)
"Brother Robot" (Henry Slesar)
"The Lifeboat Mutiny" (Robert Sheckley)
"The Warm Space" (David Brin)
"How-2" (Clifford D. Simak)
"Too Robot to Marry" (George H. Smith)
"The Education of Tigress McCardle" (C. M. Kornbluth)
"Sally" (Isaac Asimov)
"Breakfast of Champions" (Thomas A. Easton)
"Sun Up" (A. A. Jackson, IV and Howard Waldrop)
"Second Variety" (Philip K. Dick)
"The Problem Was Lubrication" (David R. Bunch)
"First to Serve" (Algis Budrys)
"Two-Handed Engine" (C. L. Moore and Henry Kuttner)
"Though Dreamers Die" (Lester del Rey)
"Soldier Boy" (Michael Shaara)
"Farewell to the Master" (Harry Bates)
Notes
1989 anthologies
Science fiction anthologies
Martin H. Greenberg anthologies
Isaac Asimov anthologies
Robots in literature
Signet Books books
|
Kareem Walker (born May 18, 1998) is an American football running back who is a free agent. He attended the University of Michigan on a scholarship to play college football for the Michigan Wolverines football team starting during the 2016 season, but left the team in 2018. Walker played as a true freshman at Michigan, then took a redshirt year before transferring to Fort Scott Community College in Kansas in 2018. He played for Mississippi State from 2019 to 2020 and South Alabama in 2021.
High school career
Walker played high school football at DePaul Catholic High School in Wayne, New Jersey. He gained 4,563 rushing yards and scored 57 touchdowns during his high school career, including 1,607 yards and 27 touchdowns as a junior in 2014 and 1,517 yards and 14 touchdowns as a senior in 2015. In July 2014, he was rated by ESPN and 247Sports.com as the No. 1 running back in the class of 2016. He was rated as a four-star prospect by ESPN.com and the No. 45 overall player in the 2016 ESPN 300.
College career
Walker originally committed to Ohio State, during halftime of the 2015 National Championship Game, but withdrew his commitment in November 2015. The following month, he committed to the University of Michigan. Walker enrolled early in January 2016, announced his intention to play as a freshman and added: "But I'm not riding the bench. I came in to be ready." In July 2018, Walker transferred to play at Fort Scott Community College in Kansas.
Walker played for Mississippi State from 2019 to 2020 and South Alabama in 2021.
Professional career
Walker was assigned to the St. Louis BattleHawks of the XFL on January 6, 2023. He was released on August 16, 2023.
References
External links
Michigan Wolverines bio
1998 births
Living people
DePaul Catholic High School alumni
Players of American football from Essex County, New Jersey
American football running backs
Michigan Wolverines football players
Fort Scott Greyhounds football players
Mississippi State Bulldogs football players
South Alabama Jaguars football players
St. Louis BattleHawks players
|
```c++
/*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkPdfWidgetAnnotationDictionary_autogen.h"
#include "SkPdfNativeDoc.h"
SkString SkPdfWidgetAnnotationDictionary::Subtype(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("Subtype", "");
if (doc) {ret = doc->resolveReference(ret);}
if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->nameValue2();
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkString();
}
bool SkPdfWidgetAnnotationDictionary::has_Subtype() const {
return get("Subtype", "") != NULL;
}
SkString SkPdfWidgetAnnotationDictionary::Contents(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("Contents", "");
if (doc) {ret = doc->resolveReference(ret);}
if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->stringValue2();
// TODO(edisonn): warn about missing default value for optional fields
return SkString();
}
bool SkPdfWidgetAnnotationDictionary::has_Contents() const {
return get("Contents", "") != NULL;
}
SkString SkPdfWidgetAnnotationDictionary::H(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("H", "");
if (doc) {ret = doc->resolveReference(ret);}
if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->nameValue2();
// TODO(edisonn): warn about missing default value for optional fields
return SkString();
}
bool SkPdfWidgetAnnotationDictionary::has_H() const {
return get("H", "") != NULL;
}
SkPdfDictionary* SkPdfWidgetAnnotationDictionary::MK(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("MK", "");
if (doc) {ret = doc->resolveReference(ret);}
if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfDictionary*)ret;
// TODO(edisonn): warn about missing default value for optional fields
return NULL;
}
bool SkPdfWidgetAnnotationDictionary::has_MK() const {
return get("MK", "") != NULL;
}
```
|
```c++
/*
This file is part of Mod Organizer.
Mod Organizer is free software: you can redistribute it and/or modify
(at your option) any later version.
Mod Organizer is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with Mod Organizer. If not, see <path_to_url
*/
#include "bbcode.h"
#include <QRegularExpression>
#include <log.h>
#include <map>
namespace BBCode
{
namespace log = MOBase::log;
class BBCodeMap
{
typedef std::map<QString, std::pair<QRegularExpression, QString>> TagMap;
public:
static BBCodeMap& instance()
{
static BBCodeMap s_Instance;
return s_Instance;
}
QString convertTag(QString input, int& length)
{
// extract the tag name
auto match = m_TagNameExp.match(input, 1, QRegularExpression::NormalMatch,
QRegularExpression::AnchoredMatchOption);
QString tagName = match.captured(0).toLower();
TagMap::iterator tagIter = m_TagMap.find(tagName);
if (tagIter != m_TagMap.end()) {
// recognized tag
if (tagName.endsWith('=')) {
tagName.chop(1);
}
int closeTagPos = 0;
int nextTagPos = 0;
int nextTagSearchIndex = input.indexOf("]");
int closeTagLength = 0;
if (tagName == "*") {
// ends at the next bullet point
closeTagPos =
input.indexOf(QRegularExpression("(\\[\\*\\]|</ul>)",
QRegularExpression::CaseInsensitiveOption),
3);
// leave closeTagLength at 0 because we don't want to "eat" the next bullet
// point
} else if (tagName == "line") {
// ends immediately after the tag
closeTagPos = 6;
// leave closeTagLength at 0 because there is no close tag to skip over
} else {
QRegularExpression nextTag(QString("\\[%1[=\\]]?").arg(tagName),
QRegularExpression::CaseInsensitiveOption);
QString closeTag = QString("[/%1]").arg(tagName);
closeTagPos = input.indexOf(closeTag, 0, Qt::CaseInsensitive);
nextTagPos = nextTag.match(input, nextTagSearchIndex).capturedStart(0);
while (nextTagPos != -1 && closeTagPos != -1 && nextTagPos < closeTagPos) {
closeTagPos = input.indexOf(closeTag, closeTagPos + closeTag.size(),
Qt::CaseInsensitive);
nextTagSearchIndex = input.indexOf("]", nextTagPos);
nextTagPos = nextTag.match(input, nextTagSearchIndex).capturedStart(0);
}
if (closeTagPos == -1) {
// workaround to improve compatibility: add fake closing tag
input.append(closeTag);
closeTagPos = input.size() - closeTag.size();
}
closeTagLength = closeTag.size();
}
if (closeTagPos > -1) {
length = closeTagPos + closeTagLength;
QString temp = input.mid(0, length);
tagIter->second.first.setPatternOptions(
QRegularExpression::PatternOption::DotMatchesEverythingOption);
auto match = tagIter->second.first.match(temp);
if (match.hasMatch()) {
if (tagIter->second.second.isEmpty()) {
if (tagName == "color") {
QString color = match.captured(1);
QString content = match.captured(2);
if (color.at(0) == '#') {
return temp.replace(tagIter->second.first,
QString("<font style=\"color: %1;\">%2</font>")
.arg(color, content));
} else {
auto colIter = m_ColorMap.find(color.toLower());
if (colIter != m_ColorMap.end()) {
color = colIter->second;
}
return temp.replace(tagIter->second.first,
QString("<font style=\"color: #%1;\">%2</font>")
.arg(color, content));
}
} else {
log::warn("don't know how to deal with tag {}", tagName);
}
} else {
if (tagName == "*") {
temp.remove(QRegularExpression("(\\[/\\*\\])?(<br/>)?$"));
}
return temp.replace(tagIter->second.first, tagIter->second.second);
}
} else {
// expression doesn't match. either the input string is invalid
// or the expression is
log::warn("{} doesn't match the expression for {}", temp, tagName);
length = 0;
return QString();
}
}
}
// not a recognized tag or tag invalid
length = 0;
return QString();
}
private:
BBCodeMap() : m_TagNameExp("[a-zA-Z*]*=?")
{
m_TagMap["b"] =
std::make_pair(QRegularExpression("\\[b\\](.*)\\[/b\\]"), "<b>\\1</b>");
m_TagMap["i"] =
std::make_pair(QRegularExpression("\\[i\\](.*)\\[/i\\]"), "<i>\\1</i>");
m_TagMap["u"] =
std::make_pair(QRegularExpression("\\[u\\](.*)\\[/u\\]"), "<u>\\1</u>");
m_TagMap["s"] =
std::make_pair(QRegularExpression("\\[s\\](.*)\\[/s\\]"), "<s>\\1</s>");
m_TagMap["sub"] =
std::make_pair(QRegularExpression("\\[sub\\](.*)\\[/sub\\]"), "<sub>\\1</sub>");
m_TagMap["sup"] =
std::make_pair(QRegularExpression("\\[sup\\](.*)\\[/sup\\]"), "<sup>\\1</sup>");
m_TagMap["size="] =
std::make_pair(QRegularExpression("\\[size=([^\\]]*)\\](.*)\\[/size\\]"),
"<font size=\"\\1\">\\2</font>");
m_TagMap["color="] =
std::make_pair(QRegularExpression("\\[color=([^\\]]*)\\](.*)\\[/color\\]"), "");
m_TagMap["font="] =
std::make_pair(QRegularExpression("\\[font=([^\\]]*)\\](.*)\\[/font\\]"),
"<font style=\"font-family: \\1;\">\\2</font>");
m_TagMap["center"] =
std::make_pair(QRegularExpression("\\[center\\](.*)\\[/center\\]"),
"<div align=\"center\">\\1</div>");
m_TagMap["right"] =
std::make_pair(QRegularExpression("\\[right\\](.*)\\[/right\\]"),
"<div align=\"right\">\\1</div>");
m_TagMap["quote"] =
std::make_pair(QRegularExpression("\\[quote\\](.*)\\[/quote\\]"),
"<figure class=\"quote\"><blockquote>\\1</blockquote></figure>");
m_TagMap["quote="] =
std::make_pair(QRegularExpression("\\[quote=([^\\]]*)\\](.*)\\[/quote\\]"),
"<figure class=\"quote\"><blockquote>\\2</blockquote></figure>");
m_TagMap["spoiler"] =
std::make_pair(QRegularExpression("\\[spoiler\\](.*)\\[/spoiler\\]"),
"<details><summary>Spoiler: <div "
"class=\"bbc_spoiler_show\">Show</div></summary><div "
"class=\"spoiler_content\">\\1</div></details>");
m_TagMap["code"] = std::make_pair(QRegularExpression("\\[code\\](.*)\\[/code\\]"),
"<code>\\1</code>");
m_TagMap["heading"] =
std::make_pair(QRegularExpression("\\[heading\\](.*)\\[/heading\\]"),
"<h2><strong>\\1</strong></h2>");
m_TagMap["line"] = std::make_pair(QRegularExpression("\\[line\\]"), "<hr>");
// lists
m_TagMap["list"] =
std::make_pair(QRegularExpression("\\[list\\](.*)\\[/list\\]"), "<ul>\\1</ul>");
m_TagMap["list="] = std::make_pair(
QRegularExpression("\\[list.*\\](.*)\\[/list\\]"), "<ol>\\1</ol>");
m_TagMap["ul"] =
std::make_pair(QRegularExpression("\\[ul\\](.*)\\[/ul\\]"), "<ul>\\1</ul>");
m_TagMap["ol"] =
std::make_pair(QRegularExpression("\\[ol\\](.*)\\[/ol\\]"), "<ol>\\1</ol>");
m_TagMap["li"] =
std::make_pair(QRegularExpression("\\[li\\](.*)\\[/li\\]"), "<li>\\1</li>");
// tables
m_TagMap["table"] = std::make_pair(
QRegularExpression("\\[table\\](.*)\\[/table\\]"), "<table>\\1</table>");
m_TagMap["tr"] =
std::make_pair(QRegularExpression("\\[tr\\](.*)\\[/tr\\]"), "<tr>\\1</tr>");
m_TagMap["th"] =
std::make_pair(QRegularExpression("\\[th\\](.*)\\[/th\\]"), "<th>\\1</th>");
m_TagMap["td"] =
std::make_pair(QRegularExpression("\\[td\\](.*)\\[/td\\]"), "<td>\\1</td>");
// web content
m_TagMap["url"] = std::make_pair(QRegularExpression("\\[url\\](.*)\\[/url\\]"),
"<a href=\"\\1\">\\1</a>");
m_TagMap["url="] =
std::make_pair(QRegularExpression("\\[url=([^\\]]*)\\](.*)\\[/url\\]"),
"<a href=\"\\1\">\\2</a>");
m_TagMap["img"] = std::make_pair(
QRegularExpression(
"\\[img(?:\\s*width=\\d+\\s*,?\\s*height=\\d+)?\\](.*)\\[/img\\]"),
"<img src=\"\\1\">");
m_TagMap["img="] =
std::make_pair(QRegularExpression("\\[img=([^\\]]*)\\](.*)\\[/img\\]"),
"<img src=\"\\2\" alt=\"\\1\">");
m_TagMap["email="] = std::make_pair(
QRegularExpression("\\[email=\"?([^\\]]*)\"?\\](.*)\\[/email\\]"),
"<a href=\"mailto:\\1\">\\2</a>");
m_TagMap["youtube"] =
std::make_pair(QRegularExpression("\\[youtube\\](.*)\\[/youtube\\]"),
"<a "
"href=\"path_to_url">https://"
"www.youtube.com/watch?v=\\1</a>");
// make all patterns non-greedy and case-insensitive
for (TagMap::iterator iter = m_TagMap.begin(); iter != m_TagMap.end(); ++iter) {
iter->second.first.setPatternOptions(
QRegularExpression::CaseInsensitiveOption |
QRegularExpression::InvertedGreedinessOption);
}
// this tag is in fact greedy
m_TagMap["*"] = std::make_pair(QRegularExpression("\\[\\*\\](.*)"), "<li>\\1</li>");
m_ColorMap.insert(std::make_pair<QString, QString>("red", "FF0000"));
m_ColorMap.insert(std::make_pair<QString, QString>("green", "00FF00"));
m_ColorMap.insert(std::make_pair<QString, QString>("blue", "0000FF"));
m_ColorMap.insert(std::make_pair<QString, QString>("black", "000000"));
m_ColorMap.insert(std::make_pair<QString, QString>("gray", "7F7F7F"));
m_ColorMap.insert(std::make_pair<QString, QString>("white", "FFFFFF"));
m_ColorMap.insert(std::make_pair<QString, QString>("yellow", "FFFF00"));
m_ColorMap.insert(std::make_pair<QString, QString>("cyan", "00FFFF"));
m_ColorMap.insert(std::make_pair<QString, QString>("magenta", "FF00FF"));
m_ColorMap.insert(std::make_pair<QString, QString>("brown", "A52A2A"));
m_ColorMap.insert(std::make_pair<QString, QString>("orange", "FFA500"));
m_ColorMap.insert(std::make_pair<QString, QString>("gold", "FFD700"));
m_ColorMap.insert(std::make_pair<QString, QString>("deepskyblue", "00BFFF"));
m_ColorMap.insert(std::make_pair<QString, QString>("salmon", "FA8072"));
m_ColorMap.insert(std::make_pair<QString, QString>("dodgerblue", "1E90FF"));
m_ColorMap.insert(std::make_pair<QString, QString>("greenyellow", "ADFF2F"));
m_ColorMap.insert(std::make_pair<QString, QString>("peru", "CD853F"));
}
private:
QRegularExpression m_TagNameExp;
TagMap m_TagMap;
std::map<QString, QString> m_ColorMap;
};
QString convertToHTML(const QString& inputParam)
{
// this code goes over the input string once and replaces all bbtags
// it encounters. This function is called recursively for every replaced
// string to convert nested tags.
//
// This could be implemented simpler by applying a set of regular expressions
// for each recognized bb-tag one after the other but that would probably be
// very inefficient (O(n^2)).
QString input = inputParam.mid(0).replace("\r\n", "<br/>");
input.replace("\\\"", "\"").replace("\\'", "'");
QString result;
int lastBlock = 0;
int pos = 0;
// iterate over the input buffer
while ((pos = input.indexOf('[', lastBlock)) != -1) {
// append everything between the previous tag-block and the current one
result.append(input.mid(lastBlock, pos - lastBlock));
if ((pos < (input.size() - 1)) && (input.at(pos + 1) == '/')) {
// skip invalid end tag
int tagEnd = input.indexOf(']', pos) + 1;
if (tagEnd == 0) {
// no closing tag found
// move the pos up one so that the opening bracket is ignored next iteration
pos++;
} else {
pos = tagEnd;
}
} else {
// convert the tag and content if necessary
int length = -1;
QString replacement = BBCodeMap::instance().convertTag(input.mid(pos), length);
if (length != 0) {
result.append(convertToHTML(replacement));
// length contains the number of characters in the original tag
pos += length;
} else {
// nothing replaced
result.append('[');
++pos;
}
}
lastBlock = pos;
}
// append the remainder (everything after the last tag)
result.append(input.mid(lastBlock));
return result;
}
} // namespace BBCode
```
|
Eulithidium is a genus of small colorful sea snails, marine gastropod mollusks in the family Phasianellidae, the pheasant shells.
Several species in this genus were originally placed in the genus Eucosmia. However, the name Eucosmia was pre-occupied in zoology for a group of moths established by Stephens in 1829. The molluscan Eucosmia was therefore called Eulithidium to distinguish it from the group of Lepidoptera.
Species
Species within the genus Eulithidium include:
Eulithidium adamsi (Philippi, 1853)
Eulithidium affine (C. B. Adams, 1850)
Eulithidium beaui (Robertson, 1958)
Eulithidium bellum (M. Smith, 1937)
Eulithidium comptum (Gould, 1855)
Eulithidium cyclostoma (Carpenter, 1864)
Eulithidium diantha (McLean, 1970)
Eulithidium macleani (Marincovich, 1973)
Eulithidium perforatum (Philippi, 1848)
Eulithidium phasianella (Philippi, 1849)
Eulithidium pterocladicum (Robertson, 1958)
Eulithidium pulloides (Carpenter, 1865)
Eulithidium rubrilineatum (Strong, 1928)
Eulithidium substriatum (Carpenter, 1864)
Eulithidium tessellatum (Potiez & Michaud, 1838)
Eulithidium thalassicola (Robertson, 1958)
Eulithidium umbilicatum (d'Orbigny, 1840)
Eulithidium variegatum (Carpenter, 1864)
References
Pilsbry H.A. 1898. Note on the subgenus Eucosmia Cpr. The Nautilus, 12: 60.
External links
Phasianellidae
|
Yann Tiersen & Shannon Wright is a collaboration album between French musician Yann Tiersen and American singer and songwriter Shannon Wright.
Reception
Track listing
All lyrics are written by Shannon Wright. All music is composed by Yann Tiersen and Shannon Wright.
Personnel
Musicians
Yann Tiersen – bass, violin, viola, piano, vibraphone, organ, cello, acoustic guitar, guitar, accordion, horns, marimba, electric piano
Shannon Wright – vocals, guitar, drums, piano, electric piano, bass
Production
Fabrice Laureau – recording and mixing
Roger Seibel – mastering
Artwork by Yann Tiersen, Shannon Wright, and others
Charts
References
2004 albums
Shannon Wright albums
Collaborative albums
Yann Tiersen albums
|
```xml
import * as sdk from '@botpress/sdk'
import { bot } from './bot'
export type MessageHandler = Parameters<(typeof bot)['message']>[0]
export type MessageHandlerProps = Parameters<MessageHandler>[0]
export type EventHandler = Parameters<(typeof bot)['event']>[0]
export type EventHandlerProps = Parameters<EventHandler>[0]
export type Client = EventHandlerProps['client']
type TBot = Client extends sdk.BotSpecificClient<infer T> ? T : never
export type BotStates = TBot['states']
export type BotEvents = TBot['events']
```
|
```javascript
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
'use strict';
// MODULES //
var tape = require( 'tape' );
var lucas = require( '@stdlib/math/base/special/lucas' );
var negaLucas = require( '@stdlib/math/base/special/negalucas' );
var factory = require( './../lib/factory.js' );
// TESTS //
tape( 'main export is a function', function test( t ) {
t.ok( true, __filename );
t.strictEqual( typeof factory, 'function', 'main export is a function' );
t.end();
});
tape( 'the function returns a function for evaluating a Lucas polynomial', function test( t ) {
var polyval = factory( 5 );
t.strictEqual( typeof polyval, 'function', 'returns a function' );
t.end();
});
tape( 'the function returns a function which evaluates a Lucas polynomial', function test( t ) {
var expected;
var polyval;
var v;
var x;
var i;
expected = [
2.0,
2.0,
6.0,
14.0,
34.0,
82.0,
198.0
];
x = 2.0;
for ( i = 0; i < expected.length; i++ ) {
polyval = factory( i );
v = polyval( x );
t.strictEqual( v, expected[ i ], 'returns expected value for L_'+i+'('+x+')' );
}
t.end();
});
tape( 'the function returns a function which evaluates a Lucas polynomial (x=1.0)', function test( t ) {
var expected;
var polyval;
var v;
var i;
for ( i = 0; i < 77; i++ ) {
expected = lucas( i );
polyval = factory( i );
v = polyval( 1.0 );
t.strictEqual( v, expected, 'returns the '+i+'th Lucas number' );
}
t.end();
});
tape( 'the function returns a function which evaluates a negaLucas polynomial (x=1.0)', function test( t ) {
var expected;
var polyval;
var v;
var i;
for ( i = 0; i > -77; i-- ) {
expected = negaLucas( i );
polyval = factory( i );
v = polyval( 1.0 );
t.strictEqual( v, expected, 'returns the '+(-i)+'th negaLucas number' );
}
t.end();
});
```
|
```javascript
/*! Select2 4.0.1 | path_to_url */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Elimine ";return t===1?n+="un carcter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Engada ";return t===1?n+="un carcter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando mis resultados"},maximumSelected:function(e){var t="S pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando"}}}),{define:e.define,require:e.require}})();
```
|
Josephine Earle (February 23, 1892 – April 26, 1960/1961) was an American silent film actress who worked in the United States and the United Kingdom. Born as Josephine MacEwan (sometimes listed as McEwan), she was of Scottish descent.
Her first role was in New York as the Beauty in Henry W. Savage's production of Everywoman (1911–12). In late 1917 she accepted an invitation to go to England and appear in the stage production of The Lilac Domino. After a very stormy passage she arrived mid December with bombs dropping on London; "I was really surprised when I arrived to find London was not nearly so black as it was painted in New York." At some point in mid 1919, she was snapped up by the Gaumont Film Company.
Personal life
She was married twice, first, on the Isle of Wight to Captain James Alpheus Glen, DSC (Royal Air Force), a Canadian air force pilot who flew with the RAF during the First World War, and, second, in London to John T. Matthews. Both unions were childless.
Selected filmography
The Two Edged Sword (1916)
The Blue Envelope Mystery (1916)
A Hungry Heart (1917)
Indiscretion (1917)
The Awakening (1917)
The Fall of a Saint (UK, 1920)
The Edge of Youth (1920)
Walls of Prejudice (UK, 1920)
Branded (1920)
The Way of a Man (UK, 1921)
The Knockout (1923)
The Hotel Mouse (UK, 1923)
Woman to Woman (UK, 1923)
Raise the Roof (UK, 1930)
References
External links
1892 births
1960s deaths
American silent film actresses
American expatriate actresses in the United Kingdom
20th-century American actresses
Actresses from Brooklyn
|
```sqlpl
/* src/test/modules/spgist_name_ops/spgist_name_ops--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION spgist_name_ops" to load this file. \quit
CREATE FUNCTION spgist_name_config(internal, internal)
RETURNS void IMMUTABLE PARALLEL SAFE STRICT
AS 'MODULE_PATHNAME' LANGUAGE C;
CREATE FUNCTION spgist_name_choose(internal, internal)
RETURNS void IMMUTABLE PARALLEL SAFE STRICT
AS 'MODULE_PATHNAME' LANGUAGE C;
CREATE FUNCTION spgist_name_inner_consistent(internal, internal)
RETURNS void IMMUTABLE PARALLEL SAFE STRICT
AS 'MODULE_PATHNAME' LANGUAGE C;
CREATE FUNCTION spgist_name_leaf_consistent(internal, internal)
RETURNS boolean IMMUTABLE PARALLEL SAFE STRICT
AS 'MODULE_PATHNAME' LANGUAGE C;
CREATE FUNCTION spgist_name_compress(name)
RETURNS text IMMUTABLE PARALLEL SAFE STRICT
AS 'MODULE_PATHNAME' LANGUAGE C;
CREATE OPERATOR CLASS name_ops DEFAULT FOR TYPE name
USING spgist AS
OPERATOR 1 < ,
OPERATOR 2 <= ,
OPERATOR 3 = ,
OPERATOR 4 >= ,
OPERATOR 5 > ,
FUNCTION 1 spgist_name_config(internal, internal),
FUNCTION 2 spgist_name_choose(internal, internal),
FUNCTION 3 spg_text_picksplit(internal, internal),
FUNCTION 4 spgist_name_inner_consistent(internal, internal),
FUNCTION 5 spgist_name_leaf_consistent(internal, internal),
FUNCTION 6 spgist_name_compress(name),
STORAGE text;
-- Also test old-style where the STORAGE clause is disallowed
CREATE OPERATOR CLASS name_ops_old FOR TYPE name
USING spgist AS
OPERATOR 1 < ,
OPERATOR 2 <= ,
OPERATOR 3 = ,
OPERATOR 4 >= ,
OPERATOR 5 > ,
FUNCTION 1 spgist_name_config(internal, internal),
FUNCTION 2 spgist_name_choose(internal, internal),
FUNCTION 3 spg_text_picksplit(internal, internal),
FUNCTION 4 spgist_name_inner_consistent(internal, internal),
FUNCTION 5 spgist_name_leaf_consistent(internal, internal),
FUNCTION 6 spgist_name_compress(name);
```
|
```javascript
Vue.component("region",{props:["model","content","type"],data:function(){return{itemAdded:!1}},methods:{moveItem:function(e,t){this.model.items.splice(t,0,this.model.items.splice(e,1)[0])},addItem:function(){var e=this;fetch(piranha.baseUrl+"manager/api/content/region/"+this.content+"/"+this.type+"/"+this.model.meta.id).then(function(e){return e.json()}).then(function(t){e.model.items.push(t),e.itemAdded=!0}).catch(function(e){console.log("error:",e)})},removeItem:function(e){this.model.items.splice(this.model.items.indexOf(e),1)},updateTitle:function(e){if(this.model.meta.isCollection)for(var t=0;t<this.model.items.length;t++)for(var i=this.model.items[t],n=0;n<i.fields.length;n++){if(i.fields[n].meta.uid===e.uid){this.model.items[t].title=e.title;break}}}},mounted:function(){if(this.model.meta.isCollection){var e=this;sortable("#"+this.model.meta.uid,{handle:".card-header a:first-child",items:":not(.unsortable)"})[0].addEventListener("sortupdate",function(t){e.moveItem(t.detail.origin.index,t.detail.destination.index)})}},updated:function(){this.model.meta.isCollection&&this.itemAdded&&(sortable("#"+this.model.meta.uid,"disable"),sortable("#"+this.model.meta.uid,"enable"),this.model.meta.expanded||$("#"+this.model.meta.uid+" .card:last-child .card-header > a").click(),this.itemAdded=!1)},template:'\n<div class="row" v-if="!model.meta.isCollection">\n <div class="col-sm-12" v-if="model.meta.description != null">\n <div class="alert alert-info" v-html="model.meta.description"></div>\n </div>\n <div class="form-group" :class="{ \'col-sm-6\': field.meta.isHalfWidth, \'col-sm-12\': !field.meta.isHalfWidth }" v-bind:key="\'field\' + field.meta.uid" v-for="field in model.items[0].fields">\n <label v-if="model.items[0].fields.length > 1">{{ field.meta.name }}</label>\n <div v-if="field.meta.description != null" v-html="field.meta.description" class="field-description small text-muted"></div>\n <div class="field-body">\n <div :id="\'tb-\' + field.meta.uid" class="component-toolbar"></div>\n <component v-if="field.model != null" v-bind:is="field.meta.component" v-bind:uid="field.meta.uid" v-bind:meta="field.meta" v-bind:toolbar="\'tb-\' + field.meta.uid" v-bind:model="field.model"></component>\n </div>\n </div>\n</div>\n<div v-else>\n <div v-if="model.meta.description != null">\n <div class="alert alert-info" v-html="model.meta.description"></div>\n </div>\n <div :id="model.meta.uid" class="accordion sortable" :class="model.items.length !== 0 ? \'mb-3\' : \'\'">\n <div class="card" :key="item.uid" v-for="(item) in model.items">\n <div class="card-header">\n <a href="#" :data-toggle="!model.meta.expanded ? \'collapse\' : false" :data-target="\'#body\' + item.uid">\n <div class="handle">\n <i class="fas fa-ellipsis-v"></i>\n </div>\n {{ item.title }}\n </a>\n <span class="actions float-right">\n <a v-on:click.prevent="removeItem(item)" href="#" class="danger"><i class="fas fa-trash"></i></a>\n </span>\n </div>\n <div :id="\'body\' + item.uid" :class="{ \'collapse\' : !model.meta.expanded }" :data-parent="\'#\' + model.meta.uid">\n <div class="card-body">\n <div class="row">\n <div class="form-group" :class="{ \'col-sm-6\': field.meta.isHalfWidth, \'col-sm-12\': !field.meta.isHalfWidth }" v-bind:key="field.meta.uid" v-for="field in item.fields">\n <label v-if="item.fields.length > 1 || field.meta.id !== \'Default\'">{{ field.meta.name }}</label>\n <div v-if="field.meta.description != null" v-html="field.meta.description" class="field-description small text-muted"></div>\n <div class="field-body">\n <div :id="\'tb-\' + field.meta.uid" class="component-toolbar"></div>\n <component v-if="field.model != null" v-bind:is="field.meta.component" v-bind:uid="field.meta.uid" v-bind:meta="field.meta" v-bind:toolbar="\'tb-\' + field.meta.uid" v-bind:model="field.model" v-on:update-title="updateTitle($event)"></component>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <a href="#" class="block-add" v-on:click.prevent="addItem()">\n <hr>\n <i class="fas fa-plus-circle"></i>\n </a>\n <div v-if="model.items.length === 0" class="empty-info unsortable">\n <p>{{ piranha.resources.texts.emptyAddAbove }}</p>\n </div>\n</div>\n'}),Vue.component("post-archive",{props:["uid","id"],data:function(){return{items:[],categories:[],postTypes:[],totalPosts:0,totalPages:0,index:0,status:"all",category:piranha.resources.texts.allCategories}},methods:{load:function(e){var t=this;e||(e=0),fetch(piranha.baseUrl+"manager/api/post/list/"+t.id+"/"+e).then(function(e){return e.json()}).then(function(e){t.items=e.posts,t.categories=e.categories,t.postTypes=e.postTypes,t.totalPosts=e.totalPosts,t.totalPages=e.totalPages,t.index=e.index}).catch(function(e){console.log("error:",e)})},remove:function(e){var t=this;piranha.alert.open({title:piranha.resources.texts.delete,body:piranha.resources.texts.deletePostConfirm,confirmCss:"btn-danger",confirmIcon:"fas fa-trash",confirmText:piranha.resources.texts.delete,onConfirm:function(){fetch(piranha.baseUrl+"manager/api/post/delete",{method:"delete",headers:piranha.utils.antiForgeryHeaders(),body:JSON.stringify(e)}).then(function(e){return e.json()}).then(function(e){piranha.notifications.push(e),t.load()}).catch(function(e){console.log("error:",e)})}})},first:function(){this.hasPrev()&&this.load(0)},prev:function(){this.hasPrev()&&this.load(this.index-1)},next:function(){this.hasNext()&&this.load(this.index+1)},last:function(){this.hasNext()&&this.load(this.totalPages-1)},hasPrev:function(){return this.index>0},hasNext:function(){return this.index<this.totalPages-1},isSelected:function(e){return(this.category===piranha.resources.texts.allCategories||e.category===this.category)&&("draft"===this.status?"draft"===e.status||"unpublished"===e.status:"scheduled"!==this.status||e.isScheduled)},selectStatus:function(e){this.status=e},selectCategory:function(e){this.category=e},onSaved:function(e){this.load(this.index)}},computed:{selectedPosts:function(){var e=this;return this.items.filter(function(t){return e.isSelected(t)})}},mounted:function(){this.load(),this.eventBus.$on("onSaved",this.onSaved)},beforeDestroy:function(){this.eventBus.$off("onSaved")},template:'\n<div :id="uid">\n <div class="mb-2">\n <div class="btn-group" role="group">\n <button v-on:click="selectStatus(\'all\')" class="btn btn-sm" :class="status === \'all\' ? \'btn-primary\' : \'btn-light\'" href="#">{{ piranha.resources.texts.all }}</button>\n <button v-on:click="selectStatus(\'draft\')" class="btn btn-sm" :class="status === \'draft\' ? \'btn-primary\' : \'btn-light\'" href="#">{{ piranha.resources.texts.drafts }}</button>\n <button v-on:click="selectStatus(\'scheduled\')" class="btn btn-sm" :class="status === \'scheduled\' ? \'btn-primary\' : \'btn-light\'" href="#">{{ piranha.resources.texts.scheduled }}</button>\n </div>\n <div v-if="postTypes.length > 1" class="btn-group" role="group">\n <button type="button" class="btn btn-sm btn-light dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n {{ piranha.resources.texts.all }}\n </button>\n <div class="dropdown-menu dropdown-menu-right">\n <a v-for="type in postTypes" v-bind:key="type.id" href="#" class="dropdown-item">{{ type.title }}</a>\n </div>\n </div>\n <div v-if="categories.length > 1" class="btn-group" role="group">\n <button type="button" class="btn btn-sm dropdown-toggle" :class="category === piranha.resources.texts.allCategories ? \'btn-light\' : \'btn-primary\'" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n {{ category }}\n </button>\n <div class="dropdown-menu dropdown-menu-right">\n <a v-on:click.prevent="selectCategory(piranha.resources.texts.allCategories)" href="#" class="dropdown-item">{{ piranha.resources.texts.allCategories }}</a>\n <a v-on:click.prevent="selectCategory(category.title)" v-for="category in categories" v-bind:key="category.slug" href="#" class="dropdown-item">{{ category.title }}</a>\n </div>\n </div>\n <div v-if="postTypes.length > 1 && piranha.permissions.posts.add" class="btn-group float-right">\n <button id="addPostGroup" class="btn btn-sm btn-primary btn-labeled dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fas fa-plus"></i>{{ piranha.resources.texts.add }}</button>\n <div class="dropdown-menu dropdown-menu-right" aria-labelledby="addPostGroup">\n <a class="dropdown-item" :href="piranha.baseUrl + type.addUrl + id + \'/\' + type.id" v-bind:key="\'add-\' + type.id" v-for="type in postTypes">{{ type.title }}</a>\n </div>\n </div>\n <a v-if="postTypes.length === 1 && piranha.permissions.posts.add" :href="piranha.baseUrl + postTypes[0].addUrl + id + \'/\' + postTypes[0].id" class="btn btn-sm btn-primary btn-labeled float-right"><i class="fas fa-plus"></i>{{ piranha.resources.texts.add }}</a>\n </div>\n <table v-if="items.length > 0" class="table">\n <tbody>\n <tr v-bind:key="post.id" v-for="post in selectedPosts" :class="{ unpublished: post.status === \'unpublished\' || post.isScheduled }">\n <td>\n <a :href="piranha.baseUrl + post.editUrl + post.id">{{ post.title }}</a>\n <small v-if="post.status === \'published\' || post.status === \'draft\'" class="text-muted">| {{ post.published }}</small>\n <small v-else-if="post.status === \'unpublished\'" class="text-muted">| Unpublished</small>\n <span v-if="post.status === \'draft\'" class="badge badge-info float-right">{{ piranha.resources.texts.draft }}</span>\n <span v-if="post.isScheduled" class="badge badge-info float-right">{{ piranha.resources.texts.scheduled }}</span>\n </td>\n <td>\n {{ post.typeName }}\n </td>\n <td>\n {{ post.category }}\n </td>\n <td class="actions one">\n <a v-if="piranha.permissions.posts.delete" v-on:click.prevent="remove(post.id)" class="danger"><i class="fas fa-trash"></i></a>\n </td>\n </tr>\n </tbody>\n </table>\n <div v-else class="empty-info">\n <p>Looks like there\'s no posts here. Click on the Add button above to get started!</p>\n </div>\n <nav v-if="totalPages > 1">\n <ul class="pagination justify-content-center">\n <li class="page-item" :class="{ disabled: !hasPrev() }"><button v-on:click.prevent="first()" :disabled="!hasPrev()" class="page-link" href="#"><i class="fas fa-angle-double-left"></i></button></li>\n <li class="page-item" :class="{ disabled: !hasPrev() }"><button v-on:click.prevent="prev()" :disabled="!hasPrev()" class="page-link" href="#"><i class="fas fa-chevron-left"></i></button></li>\n <li class="page-item disabled"><span class="page-link">{{ index + 1}} / {{ totalPages }}</span></li>\n <li class="page-item" :class="{ disabled: !hasNext() }"><button v-on:click.prevent="next()" :disabled="!hasNext()" class="page-link" href="#"><i class="fas fa-chevron-right"></i></button></li>\n <li class="page-item" :class="{ disabled: !hasNext() }"><button v-on:click.prevent="last()" :disabled="!hasNext()" class="page-link" href="#"><i class="fas fa-angle-double-right"></i></button></li>\n </ul>\n </nav>\n</div>\n'}),Vue.component("block-group",{props:["uid","toolbar","model"],methods:{selectItem:function(e){for(var t=0;t<this.model.items.length;t++)this.model.items[t]==e?this.model.items[t].isActive=!0:this.model.items[t].isActive=!1},removeItem:function(e){var t=e.isActive,i=this.model.items.indexOf(e);this.model.items.splice(i,1),t&&this.selectItem(this.model.items[Math.min(i,this.model.items.length-1)])},addGroupBlock:function(e,t){var i=this;fetch(piranha.baseUrl+"manager/api/content/block/"+e).then(function(e){return e.json()}).then(function(e){i.model.items.push(e.body),i.selectItem(e.body)}).catch(function(e){console.log("error:",e)})},updateTitle:function(e){for(var t=0;t<this.model.items.length;t++)if(this.model.items[t].meta.uid===e.uid){this.model.items[t].meta.title=e.title;break}},toggleHeader:function(){this.model.meta.showHeader=!this.model.meta.showHeader},moveItem:function(e,t){this.model.items.splice(t,0,this.model.items.splice(e,1)[0])}},mounted:function(){var e=this;sortable("#"+this.uid+" .list-group",{items:":not(.unsortable)"})[0].addEventListener("sortupdate",function(t){e.moveItem(t.detail.origin.index,t.detail.destination.index)})},template:'\n<div :id="uid" class="block-group">\n <div v-if="model.fields.length > 0" class="actions block-group-actions">\n <button v-on:click.prevent="toggleHeader()" class="btn btn-sm" :class="{ selected: model.meta.showHeader }">\n <i class="fas fa-list"></i>\n </button>\n </div>\n <div class="block-group-header">\n <div v-if="model.meta.showHeader" class="row">\n <div class="form-group" :class="{ \'col-sm-6\': field.meta.isHalfWidth, \'col-sm-12\': !field.meta.isHalfWidth }" v-bind:key="field.meta.id" v-for="field in model.fields">\n <label>{{ field.meta.name }}</label>\n <div v-if="field.meta.description != null" v-html="field.meta.description" class="field-description small text-muted"></div>\n <component v-bind:is="field.meta.component" v-bind:uid="field.meta.uid" v-bind:meta="field.meta" v-bind:toolbar="toolbar" v-bind:model="field.model"></component>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col-md-4">\n <div class="list-group list-group-flush">\n <div class="list-group-item" :class="{ active: child.isActive }" v-for="child in model.items" v-bind:key="child.meta.uid">\n <a href="#" v-on:click.prevent="selectItem(child)">\n <div class="handle">\n <i class="fas fa-ellipsis-v"></i>\n </div>\n {{ child.meta.title }}\n </a>\n <span class=\'actions\'>\n <a v-on:click.prevent="removeItem(child)" href="#" class="danger"><i class="fas fa-trash"></i></a>\n </span>\n </div>\n </div>\n <button v-on:click.prevent="piranha.blockpicker.open(addGroupBlock, 0, model.type)" class="btn btn-sm btn-primary btn-labeled mt-3">\n <i class="fas fa-plus"></i>{{ piranha.resources.texts.add }}\n </button>\n </div>\n <div class=\'col-md-8\'>\n <div v-if="model.items.length === 0" class="empty-info unsortable">\n <p>{{ piranha.resources.texts.emptyAddLeft }}</p>\n </div>\n <template v-for="child in model.items">\n <div class="block" :class="child.meta.component" v-if="child.isActive" v-bind:key="\'details-\' + child.meta.uid">\n <component v-bind:is="child.meta.component" v-bind:uid="child.meta.uid" v-bind:toolbar="toolbar" v-bind:model="child.model" v-on:update-title="updateTitle($event)"></component>\n </div>\n </template>\n </div>\n </div>\n</div>\n'}),Vue.component("block-group-horizontal",{props:["uid","toolbar","model"],methods:{removeItem:function(e){var t=this.model.items.indexOf(e);this.model.items.splice(t,1)},addGroupBlock:function(e,t){var i=this;fetch(piranha.baseUrl+"manager/api/content/block/"+e).then(function(e){return e.json()}).then(function(e){sortable("#"+i.uid+" .block-group-items","destroy"),i.model.items.push(e.body),Vue.nextTick(function(){sortable("#"+i.uid+" .block-group-items",{handle:".handle",items:":not(.unsortable)",placeholderClass:"col sortable-placeholder"})[0].addEventListener("sortupdate",function(e){i.moveItem(e.detail.origin.index,e.detail.destination.index)})})}).catch(function(e){console.log("error:",e)})},toggleHeader:function(){this.model.meta.showHeader=!this.model.meta.showHeader},moveItem:function(e,t){this.model.items.splice(t,0,this.model.items.splice(e,1)[0])}},mounted:function(){var e=this;sortable("#"+this.uid+" .block-group-items",{handle:".handle",items:":not(.unsortable)",placeholderClass:"col sortable-placeholder"})[0].addEventListener("sortupdate",function(t){e.moveItem(t.detail.origin.index,t.detail.destination.index)})},template:'\n<div :id="uid" class="block-group">\n <div class="actions block-group-actions">\n <button v-on:click.prevent="piranha.blockpicker.open(addGroupBlock, 0, model.type)" class="btn btn-sm add">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent=\'toggleHeader()\' v-if=\'model.fields.length > 0\' class=\'btn btn-sm\' :class=\'{ selected: model.meta.showHeader }\'>\n <i class="fas fa-list"></i>\n </button>\n </div>\n <div v-if="model.meta.showHeader && model.fields.length > 0" class="block-group-header">\n <div class="row">\n <div class="form-group" :class="{ \'col-sm-6\': field.meta.isHalfWidth, \'col-sm-12\': !field.meta.isHalfWidth }" v-bind:key="field.meta.id" v-for="field in model.fields">\n <label>{{ field.meta.name }}</label>\n <div v-if="field.meta.description != null" v-html="field.meta.description" class="field-description small text-muted"></div>\n <component v-bind:is=\'field.meta.component\' v-bind:uid=\'field.meta.uid\' v-bind:meta=\'field.meta\' v-bind:toolbar=\'toolbar\' v-bind:model=\'field.model\'></component>\n </div>\n </div>\n </div>\n <div class="row block-group-items">\n <div v-if="model.items.length === 0" class="col">\n <div class="empty-info unsortable">\n <p>{{ piranha.resources.texts.emptyAddAbove }}</p>\n </div>\n </div>\n <div v-for="child in model.items" v-bind:key="child.meta.uid" class="col">\n <div class="block" :class="child.meta.component">\n <div class="block-header">\n <div class="title">\n <i :class="child.meta.icon"></i><strong>{{ child.meta.name }}</strong>\n </div>\n <div class="actions">\n <span class="btn btn-sm handle">\n <i class="fas fa-ellipsis-v"></i>\n </span>\n <button v-on:click.prevent="removeItem(child)" class="btn btn-sm danger" tabindex="-1">\n <i class="fas fa-trash"></i>\n </button>\n </div>\n </div>\n <component v-bind:is="child.meta.component" v-bind:uid="child.meta.uid" v-bind:toolbar="toolbar" v-bind:model="child.model"></component>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("block-group-vertical",{props:["uid","toolbar","model"],methods:{collapseItem:function(e){e.meta.isCollapsed=!e.meta.isCollapsed},removeItem:function(e){var t=this.model.items.indexOf(e);this.model.items.splice(t,1)},addGroupBlock:function(e,t){var i=this;fetch(piranha.baseUrl+"manager/api/content/block/"+e).then(function(e){return e.json()}).then(function(e){sortable("#"+i.uid+" .block-group-items","destroy"),i.model.items.splice(t,0,e.body),Vue.nextTick(function(){sortable("#"+i.uid+" .block-group-items",{handle:".handle",items:":not(.unsortable)",placeholderClass:"sortable-placeholder"})[0].addEventListener("sortupdate",function(e){i.moveItem(e.detail.origin.index,e.detail.destination.index)})})}).catch(function(e){console.log("error:",e)})},toggleHeader:function(){this.model.meta.showHeader=!this.model.meta.showHeader},moveItem:function(e,t){this.model.items.splice(t,0,this.model.items.splice(e,1)[0])}},mounted:function(){var e=this;sortable("#"+this.uid+" .block-group-items",{handle:".handle",items:":not(.unsortable)",placeholderClass:"sortable-placeholder"})[0].addEventListener("sortupdate",function(t){e.moveItem(t.detail.origin.index,t.detail.destination.index)})},template:'\n<div :id="uid" class="block-group">\n <div class="actions block-group-actions">\n <button v-on:click.prevent="toggleHeader()" v-if="model.fields.length > 0" class="btn btn-sm" :class="{ selected: model.meta.showHeader }">\n <i class="fas fa-list"></i>\n </button>\n </div>\n <div v-if="model.meta.showHeader && model.fields.length > 0" class="block-group-header">\n <div class="row">\n <div class="form-group" :class="{ \'col-sm-6\': field.meta.isHalfWidth, \'col-sm-12\': !field.meta.isHalfWidth }" v-bind:key="field.meta.uid" v-for="field in model.fields">\n <label>{{ field.meta.name }}</label>\n <div v-if="field.meta.description != null" v-html="field.meta.description" class="field-description small text-muted"></div>\n <component v-bind:is="field.meta.component" v-bind:uid="field.meta.uid" v-bind:meta="field.meta" v-bind:toolbar="toolbar" v-bind:model="field.model"></component>\n </div>\n </div>\n </div>\n <div class="block-group-items">\n <a href="#" class="block-add unsortable" v-on:click.prevent="piranha.blockpicker.open(addGroupBlock, 0, model.type)">\n <hr>\n <i class="fas fa-plus-circle"></i>\n </a>\n <div v-if="model.items.length === 0" class="col">\n <div class="empty-info unsortable">\n <p>{{ piranha.resources.texts.emptyAddAbove }}</p>\n </div>\n </div>\n <div v-for="(child, index) in model.items" v-bind:key="child.meta.uid">\n <div class="block" :class="child.meta.component + (child.meta.isCollapsed ? \' collapsed\' : \'\')">\n <div class="block-header">\n <div class="title">\n <i :class="child.meta.icon"></i><strong>{{ child.meta.name }}</strong>\n </div>\n <div class="actions">\n <span v-on:click.prevent="collapseItem(child)" class="btn btn-sm">\n <i v-if="child.meta.isCollapsed" class="fas fa-chevron-down"></i>\n <i v-else class="fas fa-chevron-up"></i>\n </span>\n <span class="btn btn-sm handle">\n <i class="fas fa-ellipsis-v"></i>\n </span>\n <button v-on:click.prevent="removeItem(child)" class="btn btn-sm danger" tabindex="-1">\n <i class="fas fa-trash"></i>\n </button>\n </div>\n </div>\n <component v-bind:is="child.meta.component" v-bind:uid="child.meta.uid" v-bind:toolbar="toolbar" v-bind:model="child.model"></component>\n </div>\n <a href="#" class="block-add unsortable" v-on:click.prevent="piranha.blockpicker.open(addGroupBlock, index + 1, model.type)">\n <hr>\n <i class="fas fa-plus-circle"></i>\n </a>\n </div>\n </div>\n</div>\n'}),Vue.component("generic-block",{props:["uid","toolbar","model"],methods:{updateTitle:function(e){this.$emit("update-title",{uid:this.uid,title:e.title})}},template:'\n<div class="block-body">\n <div class="row">\n <div class="form-group" :class="{ \'col-sm-6\': field.meta.isHalfWidth, \'col-sm-12\': !field.meta.isHalfWidth }" v-bind:key="\'field\' + field.meta.uid" v-for="field in model">\n <label>{{ field.meta.name }}</label>\n <div v-if="field.meta.description != null" v-html="field.meta.description" class="field-description small text-muted"></div>\n <component v-bind:is="field.meta.component" v-bind:uid="field.meta.uid" v-bind:meta="field.meta" v-bind:toolbar="toolbar" v-bind:model="field.model" v-on:update-title="updateTitle($event)"></component>\n </div>\n </div>\n</div>\n'}),Vue.component("audio-block",{props:["uid","model"],methods:{clear:function(){},select:function(){null!=this.model.body.media?piranha.mediapicker.open(this.update,"Audio",this.model.body.media.folderId):piranha.mediapicker.openCurrentFolder(this.update,"Audio")},remove:function(){this.model.body.id=null,this.model.body.media=null},update:function(e){"Audio"===e.type?(this.model.body.id=e.id,this.model.body.media={id:e.id,folderId:e.folderId,type:e.type,filename:e.filename,contentType:e.contentType,publicUrl:e.publicUrl},this.$emit("update-title",{uid:this.uid,title:this.model.body.media.filename})):console.log("No video was selected")}},computed:{isEmpty:function(){return null==this.model.body.media},mediaUrl:function(){if(null!=this.model.body.media)return piranha.utils.formatUrl(this.model.body.media.publicUrl)}},mounted:function(){this.model.getTitle=function(){return null!=this.model.media?this.model.media.filename:"No audio selected"}},template:'\n<div class="block-body has-media-picker d-flex align-items-center" :class="{ empty: isEmpty }">\n <audio class="flex-grow-1 w-50" :src="mediaUrl" controls></audio>\n <div class="media-picker slide-in">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n \n </div>\n <div class="card-body" v-else>\n {{ model.body.media.filename }}\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("content-block",{props:["uid","model"],methods:{select:function(){piranha.contentpicker.open(null,this.update)},remove:function(){this.model.body.id=null,this.model.body.content=null},update:function(e){if(null!==e){var t=this;fetch(piranha.baseUrl+"manager/api/content/info/"+e.id).then(function(e){return e.json()}).then(function(e){t.model.body.id=e.id,t.model.body.content=e,t.$emit("update-title",{uid:t.uid,title:t.model.body.content.title})}).catch(function(e){console.log("error:",e)})}else console.log("No content was selected")}},computed:{isEmpty:function(){return null==this.model.body.content},contentImage:function(){return this.hasContentImage?piranha.baseUrl+"manager/api/media/url/"+this.model.body.content.primaryImage.id+"/446/220":piranha.utils.formatUrl("~/manager/assets/img/empty-image.png")},hasContentImage:function(){return null!==this.model.body.content&&null!==this.model.body.content.primaryImage.media},contentTitle:function(){return this.hasContentTitle?this.model.body.content.title:"Lorem Ipsum"},hasContentTitle:function(){return null!==this.model.body.content},contentExcerpt:function(){return this.hasContentExcerpt?this.model.body.content.excerpt:"Donec id elit non mi porta gravida at eget metus. Cras mattis consectetur purus sit amet fermentum. Integer posuere erat a ante venenatis dapibus posuere velit aliquet."},hasContentExcerpt:function(){return null!==this.model.body.content&&null!==this.model.body.content.excerpt}},mounted:function(){this.model.getTitle=function(){return null!==this.model.body.content?this.model.body.content.title:"No content selected"}},template:'\n<div class="block-body has-media-picker rounded clearfix" :class="{ empty: isEmpty }">\n <div>\n <div class="page-image" :style="\'background-image:url(\' + contentImage + \')\'">\n <img :src="piranha.utils.formatUrl(\'~/manager/assets/img/primaryimage-placeholder.png\')">\n </div>\n <h3 :class="{ \'text-light\': !hasContentTitle }">{{ contentTitle }}</h3>\n <p :class="{ \'text-light\': !hasContentExcerpt }" v-html="contentExcerpt"></p>\n </div>\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n \n </div>\n <div class="card-body" v-else>\n <a :href="piranha.baseUrl + \'manager/content/edit/\' + model.body.content.typeId + \'/\' + model.body.content.id" target="_blank">{{ model.body.content.title }}</a>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("html-block",{props:["uid","toolbar","model"],data:function(){return{body:this.model.body.value}},methods:{onBlur:function(e){this.model.body.value=tinyMCE.activeEditor.getContent()},onChange:function(e){this.model.body.value=e}},computed:{isEmpty:function(){return piranha.utils.isEmptyHtml(this.model.body.value)}},mounted:function(){piranha.editor.addInline(this.uid,this.toolbar,this.onChange)},beforeDestroy:function(){piranha.editor.remove(this.uid)},template:'\n<div class="block-body" :class="{ empty: isEmpty }">\n <div contenteditable="true" :id="uid" v-html="body" v-on:blur="onBlur"></div>\n</div>\n'}),Vue.component("html-column-block",{props:["uid","toolbar","model"],data:function(){return{column1:this.model.column1.value,column2:this.model.column2.value}},methods:{onBlurCol1:function(e){this.model.column1.value=tinyMCE.activeEditor.getContent()},onBlurCol2:function(e){this.model.column2.value=tinyMCE.activeEditor.getContent()},onChangeCol1:function(e){this.model.column1.value=e},onChangeCol2:function(e){this.model.column2.value=e}},computed:{isEmpty1:function(){return piranha.utils.isEmptyHtml(this.model.column1.value)},isEmpty2:function(){return piranha.utils.isEmptyHtml(this.model.column2.value)}},mounted:function(){piranha.editor.addInline(this.uid+1,this.toolbar,this.onChangeCol1),piranha.editor.addInline(this.uid+2,this.toolbar,this.onChangeCol2)},beforeDestroy:function(){piranha.editor.remove(this.uid+1),piranha.editor.remove(this.uid+2)},template:'\n<div class="row block-body">\n <div class="col-md-6">\n <div :class="{ empty: isEmpty1 }">\n <div :id="uid + 1" contenteditable="true" v-html="column1" v-on:blur="onBlurCol1"></div>\n </div>\n </div>\n <div class=\'col-md-6\'>\n <div :class=\'{ empty: isEmpty2 }\'>\n <div :id="uid + 2" contenteditable="true" v-html="column2" v-on:blur="onBlurCol2"></div>\n </div>\n </div>\n</div>\n'}),Vue.component("image-block",{props:["uid","model"],methods:{clear:function(){},select:function(){null!=this.model.body.media?piranha.mediapicker.open(this.update,"Image",this.model.body.media.folderId):piranha.mediapicker.openCurrentFolder(this.update,"Image")},remove:function(){this.model.body.id=null,this.model.body.media=null},update:function(e){"Image"===e.type?(this.model.body.id=e.id,this.model.body.media={id:e.id,folderId:e.folderId,type:e.type,filename:e.filename,contentType:e.contentType,publicUrl:e.publicUrl},this.$emit("update-title",{uid:this.uid,title:this.model.body.media.filename})):console.log("No image was selected")},selectAspect:function(e){this.model.aspect.value=e},isAspectSelected(e){return this.model.aspect.value===e}},computed:{isEmpty:function(){return null==this.model.body.media},mediaUrl:function(){return null!=this.model.body.media?piranha.utils.formatUrl(this.model.body.media.publicUrl):piranha.utils.formatUrl("~/manager/assets/img/empty-image.png")},iconUrl:function(){if(this.model.aspect.value>0){if(1===this.model.aspect.value||3===this.model.aspect.value)return piranha.utils.formatUrl("~/manager/assets/img/icons/img-landscape.svg");if(2==this.model.aspect.value)return piranha.utils.formatUrl("~/manager/assets/img/icons/img-portrait.svg");if(4==this.model.aspect.value)return piranha.utils.formatUrl("~/manager/assets/img/icons/img-square.svg")}return null}},mounted:function(){this.model.getTitle=function(){return null!=this.model.media?this.model.media.filename:"No image selected"}},template:'\n<div class="block-body has-media-picker rounded" :class="{ empty: isEmpty }">\n <img class="rounded" :src="mediaUrl">\n <div class="media-picker">\n <div class="btn-group float-right">\n <button :id="uid + \'-aspect\'" class="btn btn-info btn-aspect text-center" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n <i v-if="model.aspect.value === 0" class="fas fa-cog"></i>\n <img v-else :src="iconUrl">\n </button>\n <div class="dropdown-menu aspect-menu" :aria-labelledby="uid + \'-aspect\'">\n <label class="mb-0">{{ piranha.resources.texts.aspectLabel }}</label>\n <div class="dropdown-divider"></div>\n <a v-on:click.prevent="selectAspect(0)" class="dropdown-item" :class="{ active: isAspectSelected(0) }" href="#">\n <img :src="piranha.utils.formatUrl(\'~/manager/assets/img/icons/img-original.svg\')"><span>{{ piranha.resources.texts.aspectOriginal }}</span>\n </a>\n <a v-on:click.prevent="selectAspect(1)" class="dropdown-item" :class="{ active: isAspectSelected(1) }" href="#">\n <img :src="piranha.utils.formatUrl(\'~/manager/assets/img/icons/img-landscape.svg\')"><span>{{ piranha.resources.texts.aspectLandscape }}</span>\n </a>\n <a v-on:click.prevent="selectAspect(2)" class="dropdown-item" :class="{ active: isAspectSelected(2) }" href="#">\n <img :src="piranha.utils.formatUrl(\'~/manager/assets/img/icons/img-portrait.svg\')"><span>{{ piranha.resources.texts.aspectPortrait }}</span>\n </a>\n <a v-on:click.prevent="selectAspect(3)" class="dropdown-item" :class="{ active: isAspectSelected(3) }" href="#">\n <img :src="piranha.utils.formatUrl(\'~/manager/assets/img/icons/img-landscape.svg\')"><span>{{ piranha.resources.texts.aspectWidescreen }}</span>\n </a>\n <a v-on:click.prevent="selectAspect(4)" class="dropdown-item" :class="{ active: isAspectSelected(4) }" href="#">\n <img :src="piranha.utils.formatUrl(\'~/manager/assets/img/icons/img-square.svg\')"><span>{{ piranha.resources.texts.aspectSquare }}</span>\n </a>\n </div>\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n \n </div>\n <div class="card-body" v-else>\n {{ model.body.media.filename }}\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("markdown-block",{props:["uid","model"],methods:{onBlur:function(e){var t=this.model.body.value.replace(/(<([^>]+)>)/gi,"");t.length>40&&(t=t.substring(0,40)+"..."),this.$emit("update-title",{uid:this.uid,title:t})}},computed:{isEmpty:function(){return piranha.utils.isEmptyText(this.model.body.value)}},template:'\n<div class="block-body" :class="{ empty: isEmpty }">\n <markdown-field :uid="uid" :model="model.body" />\n</div>\n'}),Vue.component("missing-block",{props:["model"],template:'\n<div class="alert alert-danger text-center" role="alert">No component registered for <code>{{ model.type }}</code></div>\n'}),Vue.component("page-block",{props:["uid","model"],methods:{select:function(){piranha.pagepicker.open(this.update)},remove:function(){this.model.body.id=null,this.model.body.page=null},update:function(e){if(null!==e){var t=this;fetch(piranha.baseUrl+"manager/api/page/info/"+e.id).then(function(e){return e.json()}).then(function(e){t.model.body.id=e.id,t.model.body.page=e,t.$emit("update-title",{uid:t.uid,title:t.model.body.page.title})}).catch(function(e){console.log("error:",e)})}else console.log("No page was selected")}},computed:{isEmpty:function(){return null==this.model.body.page},pageImage:function(){return this.hasPageImage?piranha.baseUrl+"manager/api/media/url/"+this.model.body.page.primaryImage.id+"/446/220":piranha.utils.formatUrl("~/manager/assets/img/empty-image.png")},hasPageImage:function(){return null!==this.model.body.page&&null!==this.model.body.page.primaryImage.media},pageTitle:function(){return this.hasPageTitle?this.model.body.page.title:"Lorem Ipsum"},hasPageTitle:function(){return null!==this.model.body.page},pageExcerpt:function(){return this.hasPageExcerpt?this.model.body.page.excerpt:"Donec id elit non mi porta gravida at eget metus. Cras mattis consectetur purus sit amet fermentum. Integer posuere erat a ante venenatis dapibus posuere velit aliquet."},hasPageExcerpt:function(){return null!==this.model.body.page&&null!==this.model.body.page.excerpt}},mounted:function(){this.model.getTitle=function(){return null!==this.model.body.page?this.model.body.page.title:"No page selected"}},template:'\n<div class="block-body has-media-picker rounded clearfix" :class="{ empty: isEmpty }">\n <div>\n <div class="page-image" :style="\'background-image:url(\' + pageImage + \')\'">\n <img :src="piranha.utils.formatUrl(\'~/manager/assets/img/primaryimage-placeholder.png\')">\n </div>\n <h3 :class="{ \'text-light\': !hasPageTitle }">{{ pageTitle }}</h3>\n <p :class="{ \'text-light\': !hasPageExcerpt }" v-html="pageExcerpt"></p>\n </div>\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n \n </div>\n <div class="card-body" v-else>\n <a :href="piranha.baseUrl + \'manager/page/edit/\' + model.body.page.id" target="_blank">{{ model.body.page.title }}</a>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("post-block",{props:["uid","model"],methods:{select:function(){piranha.postpicker.open(this.update)},remove:function(){this.model.body.id=null,this.model.body.post=null},update:function(e){if(null!==e){var t=this;fetch(piranha.baseUrl+"manager/api/post/info/"+e.id).then(function(e){return e.json()}).then(function(e){t.model.body.id=e.id,t.model.body.post=e,t.$emit("update-title",{uid:t.uid,title:t.model.body.post.title})}).catch(function(e){console.log("error:",e)})}else console.log("No post was selected")}},computed:{isEmpty:function(){return null==this.model.body.post},postImage:function(){return this.hasPostImage?piranha.baseUrl+"manager/api/media/url/"+this.model.body.post.primaryImage.id+"/446/220":piranha.utils.formatUrl("~/manager/assets/img/empty-image.png")},hasPostImage:function(){return null!==this.model.body.post&&null!==this.model.body.post.primaryImage.media},postTitle:function(){return this.hasPostTitle?this.model.body.post.title:"Lorem Ipsum"},hasPostTitle:function(){return null!==this.model.body.post},postExcerpt:function(){return this.hasPostExcerpt?this.model.body.post.excerpt:"Donec id elit non mi porta gravida at eget metus. Cras mattis consectetur purus sit amet fermentum. Integer posuere erat a ante venenatis dapibus posuere velit aliquet."},hasPostExcerpt:function(){return null!==this.model.body.post&&null!==this.model.body.post.excerpt}},mounted:function(){this.model.getTitle=function(){return null!==this.model.body.post?this.model.body.post.title:"No post selected"}},template:'\n<div class="block-body has-media-picker rounded clearfix" :class="{ empty: isEmpty }">\n <div>\n <div class="page-image" :style="\'background-image:url(\' + postImage + \')\'">\n <img :src="piranha.utils.formatUrl(\'~/manager/assets/img/primaryimage-placeholder.png\')">\n </div>\n <h3 :class="{ \'text-light\': !hasPostTitle }">{{ postTitle }}</h3>\n <p :class="{ \'text-light\': !hasPostExcerpt }" v-html="postExcerpt"></p>\n </div>\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n \n </div>\n <div class="card-body" v-else>\n <a :href="piranha.baseUrl + \'manager/post/edit/\' + model.body.post.id" target="_blank">{{ model.body.post.title }}</a>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("quote-block",{props:["uid","model"],data:function(){return{placeholder:{body:"",author:""}}},methods:{onAuthorBlur:function(e){this.model.author.value=e.target.innerText},onBodyBlur:function(e){this.model.body.value=e.target.innerText;var t=this.model.body.value.replace(/(<([^>]+)>)/gi,"");t.length>40&&(t=t.substring(0,40)+"..."),this.$emit("update-title",{uid:this.uid,title:t})}},created:function(){var e=[{author:"Nelson Mandela",body:"The greatest glory in living lies not in never falling, but in rising every time we fall."},{author:"Walt Disney",body:"The way to get started is to quit talking and begin doing."},{author:"Eleanor Roosevelt",body:"The future belongs to those who believe in the beauty of their dreams."},{author:"John Lennon",body:"Life is what happens when you're busy making other plans."},{author:"Audrey Hepburn",body:"Nothing is impossible, the word itself says, 'I'm possible!'"},{author:"Mark Twain",body:"Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do."},{author:"Maya Angelou",body:"You will face many defeats in life, but never let yourself be defeated."}];this.placeholder=e[Math.floor(Math.random()*e.length)]},template:'\n<div class="block-body">\n <blockquote class="blockquote">\n <p contenteditable="true" class="blockquote-body" v-html="model.body.value" v-on:blur="onBodyBlur" :data-placeholder="placeholder.body"></p>\n <footer contenteditable="true" class="blockquote-footer" v-html="model.author.value" v-on:blur="onAuthorBlur" :data-placeholder="placeholder.author"></footer>\n </blockquote>\n</div>\n'}),Vue.component("separator-block",{props:["model"],template:"\n<div class='block-body'>\n <hr>\n</div>\n"}),Vue.component("text-block",{props:["uid","model"],methods:{onBlur:function(e){var t=this.model.body.value.replace(/(<([^>]+)>)/gi,"");t.length>40&&(t=t.substring(0,40)+"..."),this.$emit("update-title",{uid:this.uid,title:t})}},computed:{isEmpty:function(){return piranha.utils.isEmptyText(this.model.body.value)}},template:'\n<div class="block-body" :class="{ empty: isEmpty }">\n <pre class="invisible" v-html="model.body.value"></pre>\n <textarea v-model="model.body.value" v-on:blur="onBlur"></textarea>\n</div>\n'}),Vue.component("video-block",{props:["uid","model"],methods:{clear:function(){},select:function(){null!=this.model.body.media?piranha.mediapicker.open(this.update,"Video",this.model.body.media.folderId):piranha.mediapicker.openCurrentFolder(this.update,"Video")},remove:function(){this.model.body.id=null,this.model.body.media=null},update:function(e){"Video"===e.type?(this.model.body.id=e.id,this.model.body.media={id:e.id,folderId:e.folderId,type:e.type,filename:e.filename,contentType:e.contentType,publicUrl:e.publicUrl},this.$emit("update-title",{uid:this.uid,title:this.model.body.media.filename})):console.log("No video was selected")}},computed:{isEmpty:function(){return null==this.model.body.media},mediaUrl:function(){if(null!=this.model.body.media)return piranha.utils.formatUrl(this.model.body.media.publicUrl)}},mounted:function(){this.model.getTitle=function(){return null!=this.model.media?this.model.media.filename:"No video selected"}},template:'\n<div class="block-body has-media-picker" :class="{ empty: isEmpty }">\n <video class="w-100 mx-100" :src="mediaUrl" controls></video>\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n \n </div>\n <div class="card-body" v-else>\n {{ model.body.media.filename }}\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("archivepage-field",{props:["uid","model","meta"],methods:{select:function(){var e=null;this.model.page?e=this.model.page.siteId:piranha.pageedit&&(e=piranha.pageedit.siteId),piranha.archivepicker.open(this.update,e)},remove:function(){this.model.id=null,this.model.page=null},update:function(e){this.model.id=e.id,this.model.page=e,this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:this.model.page.title})}},computed:{isEmpty:function(){return null==this.model.page}},mounted:function(){this.model.getTitle=function(){return null!=this.model.page?this.model.page.title:"No page selected"}},template:'\n<div class="media-field" :class="{ empty: isEmpty }">\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n <span v-if="meta.placeholder != null" class="text-secondary">{{ meta.placeholder }}</span>\n <span v-if="meta.placeholder == null" class="text-secondary"> </span>\n </div>\n <div class="card-body" v-else>\n <a :href="piranha.baseUrl + \'manager/page/edit/\' + model.page.id" target="_blank">{{ model.page.title }}</a>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("audio-field",{props:["uid","model","meta"],methods:{select:function(){null!=this.model.media?piranha.mediapicker.open(this.update,"Audio",this.model.media.folderId):piranha.mediapicker.openCurrentFolder(this.update,"Audio")},remove:function(){this.model.id=null,this.model.media=null},update:function(e){"Audio"===e.type?(this.model.id=e.id,this.model.media={id:e.id,folderId:e.folderId,type:e.type,filename:e.filename,title:e.title,contentType:e.contentType,publicUrl:e.publicUrl},this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:null!=this.model.media.title?this.model.media.title+" ("+this.model.media.filename+")":this.model.media.filename})):console.log("No audio was selected")}},computed:{isEmpty:function(){return null==this.model.media}},mounted:function(){this.model.getTitle=function(){return null!=this.model.media?null!=this.model.media.title?this.model.media.title+" ("+this.model.media.filename+")":this.model.media.filename:"No audio selected"}},template:'\n<div class="media-field" :class="{ empty: isEmpty }">\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n <span v-if="meta.placeholder != null" class="text-secondary">{{ meta.placeholder }}</span>\n <span v-if="meta.placeholder == null" class="text-secondary"> </span>\n </div>\n <div class="card-body" v-else-if="model.media.title != null">\n <a href="#" v-on:click.prevent="piranha.preview.open(model.id)">{{ model.media.title }} ({{ model.media.filename }})</a>\n </div>\n <div class="card-body" v-else>\n <a href="#" v-on:click.prevent="piranha.preview.open(model.id)">{{ model.media.filename }}</a>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("checkbox-field",{props:["uid","model","meta"],template:'\n<div class="form-group form-check">\n <input type="checkbox" class="form-check-input" :id="meta.uid" v-model="model.value">\n <label class="form-check-label" :for="meta.uid">{{ meta.placeholder}}</label>\n</div>\n'}),Vue.component("color-field",{props:["uid","model","meta"],methods:{update:function(){this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:this.model.value})},readonly:function(){return null!=this.meta.settings.DisallowInput&&this.meta.settings.DisallowInput}},template:'\n<div class="input-group color-field">\n <div class="input-group-prepend">\n <div class="color-preview" :style="{ backgroundColor: model.value }"></div>\n <input class="form-control" type="color" v-model="model.value">\n </div>\n <input class="form-control" type="text" v-model="model.value" v-on:change="update()" :readonly="readonly()" :placeholder="meta.placeholder">\n</div> \n'}),Vue.component("content-field",{props:["uid","model","meta"],methods:{select:function(){piranha.contentpicker.open(this.meta.settings.Group,this.update)},remove:function(){this.model.id=null,this.model.content=null},update:function(e){this.model.id=e.id,this.model.content=e,this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:this.model.content.title})}},computed:{isEmpty:function(){return null==this.model.content}},mounted:function(){this.model.getTitle=function(){return null!=this.model.content?this.model.content.title:"No content selected"}},template:'\n<div class="media-field" :class="{ empty: isEmpty }">\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n <span v-if="meta.placeholder != null" class="text-secondary">{{ meta.placeholder }}</span>\n <span v-if="meta.placeholder == null" class="text-secondary"> </span>\n </div>\n <div class="card-body" v-else>\n <a :href="piranha.baseUrl + \'manager/content/edit/\' + model.content.typeId + \'/\' + model.content.id" target="_blank">{{ model.content.title }}</a>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("data-select-field",{props:["uid","model","meta"],methods:{update:function(){this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:this.model.items.$values.find(e=>e.id===this.model.id).name})}},template:'\n<select class="form-control" v-model="model.id" v-on:change="update()">\n <option v-for="(item) in model.items.$values" v-bind:key="item.id" v-bind:value="item.id">\n {{ item.name }}\n </option>\n</select>\n'}),Vue.component("date-field",{props:["uid","model","meta"],components:{datepicker:vuejsDatepicker},methods:{onClosed:function(){var e=this.model.value,t=e.getFullYear()+"-"+(e.getMonth()<9?"0":"")+(e.getMonth()+1)+"-"+(e.getDate()<10?"0":"")+e.getDate();this.model.value=t,this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:this.model.value})}},created:function(){this._options={bootstrapStyling:!0,mondayFirst:!0,format:"yyyy-MM-dd",typeable:!0}},template:'\n<datepicker v-on:closed="onClosed($event)" v-model="model.value" :format="_options.format" :monday-first="_options.mondayFirst" :typeable="_options.typeable" :bootstrap-styling="_options.bootstrapStyling"></datepicker>\n'}),Vue.component("document-field",{props:["uid","model","meta"],methods:{select:function(){null!=this.model.media?piranha.mediapicker.open(this.update,"Document",this.model.media.folderId):piranha.mediapicker.openCurrentFolder(this.update,"Document")},remove:function(){this.model.id=null,this.model.media=null},update:function(e){"Document"===e.type?(this.model.id=e.id,this.model.media={id:e.id,folderId:e.folderId,type:e.type,filename:e.filename,title:e.title,contentType:e.contentType,publicUrl:e.publicUrl},this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:null!=this.model.media.title?this.model.media.title+" ("+this.model.media.filename+")":this.model.media.filename})):console.log("No document was selected")}},computed:{isEmpty:function(){return null==this.model.media}},mounted:function(){this.model.getTitle=function(){return null!=this.model.media?null!=this.model.media.title?this.model.media.title+" ("+this.model.media.filename+")":this.model.media.filename:"No document selected"}},template:'\n<div class="media-field" :class="{ empty: isEmpty }">\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n <span v-if="meta.placeholder != null" class="text-secondary">{{ meta.placeholder }}</span>\n <span v-if="meta.placeholder == null" class="text-secondary"> </span>\n </div>\n <div class="card-body" v-else-if="model.media.title != null">\n <a href="#" v-on:click.prevent="piranha.preview.open(model.id)">{{ model.media.title }} ({{ model.media.filename }})</a>\n </div>\n <div class="card-body" v-else>\n <a href="#" v-on:click.prevent="piranha.preview.open(model.id)">{{ model.media.filename }}</a>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("html-field",{props:["uid","toolbar","model","meta"],data:function(){return{body:this.model.value}},methods:{onBlur:function(e){if(this.model.value=tinyMCE.activeEditor.getContent(),this.meta.notifyChange){var t=this.model.value.replace(/(<([^>]+)>)/gi,"");t.length>40&&(t=t.substring(0,40)+"..."),this.$emit("update-title",{uid:this.uid,title:t})}},onChange:function(e){if(this.model.value=e,this.meta.notifyChange){var t=this.model.value.replace(/(<([^>]+)>)/gi,"");t.length>40&&(t=t.substring(0,40)+"..."),this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:t})}}},computed:{isEmpty:function(){return piranha.utils.isEmptyHtml(this.model.value)}},mounted:function(){piranha.editor.addInline(this.uid,this.toolbar,this.onChange)},beforeDestroy:function(){piranha.editor.remove(this.uid)},template:'\n<div class="field html-field" :class="{ empty: isEmpty }">\n <div contenteditable="true" :id="uid" v-html="body" v-on:blur="onBlur"></div>\n</div>\n'}),Vue.component("image-field",{props:["uid","model","meta"],methods:{select:function(){null!=this.model.media?piranha.mediapicker.open(this.update,"Image",this.model.media.folderId):piranha.mediapicker.openCurrentFolder(this.update,"Image")},remove:function(){this.model.id=null,this.model.media=null},update:function(e){"Image"===e.type?(this.model.id=e.id,this.model.media={id:e.id,folderId:e.folderId,type:e.type,filename:e.filename,title:e.title,contentType:e.contentType,publicUrl:e.publicUrl},this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:null!=this.model.media.title?this.model.media.title+" ("+this.model.media.filename+")":this.model.media.filename})):console.log("No image was selected")}},computed:{isEmpty:function(){return null==this.model.media}},mounted:function(){this.model.getTitle=function(){return null!=this.model.media?null!=this.model.media.title?this.model.media.title+" ("+this.model.media.filename+")":this.model.media.filename:"No image selected"}},template:'\n<div class="media-field" :class="{ empty: isEmpty }">\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n <span v-if="meta.placeholder != null" class="text-secondary">{{ meta.placeholder }}</span>\n <span v-if="meta.placeholder == null" class="text-secondary"> </span>\n </div>\n <div class="card-body" v-else-if="model.media.title != null">\n <a href="#" v-on:click.prevent="piranha.preview.open(model.id)">{{ model.media.title }} ({{ model.media.filename }})</a>\n </div>\n <div class="card-body" v-else>\n <a href="#" v-on:click.prevent="piranha.preview.open(model.id)">{{ model.media.filename }}</a>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("markdown-field",{props:["uid","model","meta"],data:function(){return{body:this.model.value}},methods:{update:function(e){if(this.model.value=e,this.meta&&this.meta.notifyChange){var t=this.model.value;t.length>40&&(t=t.substring(0,40)+"..."),this.$emit("update-title",{uid:this.uid,title:t})}}},computed:{isEmpty:function(){return null==this.model.value||""===this.model.value}},mounted:function(){piranha.editor.addInlineMarkdown(this.uid,this.model.value,this.update)},beforeDestroy:function(){piranha.editor.remove(this.uid)},template:'\n<div class="markdown-field" :class="{ empty: isEmpty }">\n <textarea :id="uid" v-html="model.value"></textarea>\n <div class="markdown-preview"></div>\n</div>\n'}),Vue.component("media-field",{props:["uid","model","meta"],methods:{select:function(){null!=this.model.media?piranha.mediapicker.open(this.update,null,this.model.media.folderId):piranha.mediapicker.openCurrentFolder(this.update,null)},remove:function(){this.model.id=null,this.model.media=null},update:function(e){this.model.id=e.id,this.model.media={id:e.id,folderId:e.folderId,type:e.type,filename:e.filename,title:e.title,contentType:e.contentType,publicUrl:e.publicUrl},this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:null!=this.model.media.title?this.model.media.title+" ("+this.model.media.filename+")":this.model.media.filename})}},computed:{isEmpty:function(){return null==this.model.media}},mounted:function(){this.model.getTitle=function(){return null!=this.model.media?null!=this.model.media.title?this.model.media.title+" ("+this.model.media.filename+")":this.model.media.filename:"No media selected"}},template:'\n<div class="media-field" :class="{ empty: isEmpty }">\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n <span v-if="meta.placeholder != null" class="text-secondary">{{ meta.placeholder }}</span>\n <span v-if="meta.placeholder == null" class="text-secondary"> </span>\n </div>\n <div class="card-body" v-else-if="model.media.title != null">\n <a href="#" v-on:click.prevent="piranha.preview.open(model.id)">{{ model.media.title }} ({{ model.media.filename }})</a>\n </div>\n <div class="card-body" v-else>\n <a href="#" v-on:click.prevent="piranha.preview.open(model.id)">{{ model.media.filename }}</a>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("missing-field",{props:["meta","model"],template:'\n<div class="alert alert-danger text-center" role="alert">No component registered for <code>{{ meta.type }}</code></div>\n'}),Vue.component("number-field",{props:["uid","model","meta"],template:'\n<input class="form-control" type="text" :placeholder="meta.placeholder" v-model="model.value">\n'}),Vue.component("page-field",{props:["uid","model","meta"],methods:{select:function(){var e=null;this.model.page?e=this.model.page.siteId:piranha.pageedit&&(e=piranha.pageedit.siteId),piranha.pagepicker.open(this.update,e)},remove:function(){this.model.id=null,this.model.page=null},update:function(e){this.model.id=e.id,this.model.page=e,this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:this.model.page.title})}},computed:{isEmpty:function(){return null==this.model.page}},mounted:function(){this.model.getTitle=function(){return null!=this.model.page?this.model.page.title:"No page selected"}},template:'\n<div class="media-field" :class="{ empty: isEmpty }">\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n <span v-if="meta.placeholder != null" class="text-secondary">{{ meta.placeholder }}</span>\n <span v-if="meta.placeholder == null" class="text-secondary"> </span>\n </div>\n <div class="card-body" v-else>\n <a :href="piranha.baseUrl + \'manager/page/edit/\' + model.page.id" target="_blank">{{ model.page.title }}</a>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("post-field",{props:["uid","model","meta"],methods:{select:function(){piranha.postpicker.open(this.update)},remove:function(){this.model.id=null,this.model.post=null},update:function(e){this.model.id=e.id,this.model.post=e,this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:this.model.post.title})}},computed:{isEmpty:function(){return null==this.model.post}},mounted:function(){this.model.getTitle=function(){return null!=this.model.post?this.model.post.title:"No post selected"}},template:'\n<div class="media-field" :class="{ empty: isEmpty }">\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n <span v-if="meta.placeholder != null" class="text-secondary">{{ meta.placeholder }}</span>\n <span v-if="meta.placeholder == null" class="text-secondary"> </span>\n </div>\n <div class="card-body" v-else>\n <a :href="piranha.baseUrl + \'manager/post/edit/\' + model.post.id" target="_blank">{{ model.post.title }}</a>\n </div>\n </div>\n </div>\n</div>\n'}),Vue.component("readonly-field",{props:["uid","model","meta"],template:'\n<div class="alert alert-secondary mb-0">\n <pre class="mb-0">{{ model.value }}</pre>\n</div>\n'}),Vue.component("select-field",{props:["uid","model","meta"],methods:{update:function(){this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:this.meta.options[this.model.value]})}},template:'\n<select class="form-control" v-model="model.value" v-on:change="update()">\n <option v-for="(name, value) in meta.options" v-bind:key="value" v-bind:value="value">\n {{ name }}\n </option>\n</select>\n'}),Vue.component("string-field",{props:["uid","model","meta"],methods:{update:function(){this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:this.model.value})},maxLength:function(){return null!=this.meta.settings.MaxLength&&this.meta.settings.MaxLength>0?this.meta.settings.MaxLength:null},isRequired:function(){return!1}},template:'\n<div>\n <div v-if="maxLength() > 0" class="input-group">\n <input class="form-control" type="text" :maxlength="maxLength()" :required="isRequired()" :placeholder="meta.placeholder" v-model="model.value" v-on:change="update()">\n <div class="input-group-append">\n <div class="input-group-text text-muted">\n {{ piranha.utils.strLength(model.value) + "/" + maxLength() }}\n </div>\n </div>\n </div>\n <input v-else class="form-control" type="text" :maxlength="maxLength()" :required="isRequired()" :placeholder="meta.placeholder" v-model="model.value" v-on:change="update()">\n</div>\n'}),Vue.component("text-field",{props:["uid","model","meta"],methods:{update:function(){if(this.meta.notifyChange){var e=this.model.value;e.length>40&&(e=e.substring(0,40)+"..."),this.$emit("update-title",{uid:this.uid,title:e})}},maxLength:function(){return null!=this.meta.settings.MaxLength&&this.meta.settings.MaxLength>0?this.meta.settings.MaxLength:null},isRequired:function(){return!1}},template:'\n<div>\n <div v-if="maxLength() > 0" class="input-group">\n <textarea class="form-control" rows="4" :maxlength="maxLength()" :required="isRequired()" :placeholder="meta.placeholder" v-model="model.value" v-on:change="update()"></textarea>\n <div class="input-group-append">\n <div class="input-group-text text-muted">\n {{ piranha.utils.strLength(model.value) + "/" + maxLength() }}\n </div>\n </div>\n </div>\n <textarea v-else class="form-control" rows="4" :maxlength="maxLength()" :required="isRequired()" :placeholder="meta.placeholder" v-model="model.value" v-on:change="update()"></textarea>\n</div>\n'}),Vue.component("video-field",{props:["uid","model","meta"],methods:{clear:function(){},select:function(){null!=this.model.media?piranha.mediapicker.open(this.update,"Video",this.model.media.folderId):piranha.mediapicker.openCurrentFolder(this.update,"Video")},remove:function(){this.model.id=null,this.model.media=null},update:function(e){"Video"===e.type?(this.model.id=e.id,this.model.media={id:e.id,folderId:e.folderId,type:e.type,filename:e.filename,title:e.title,contentType:e.contentType,publicUrl:e.publicUrl},this.meta.notifyChange&&this.$emit("update-title",{uid:this.uid,title:null!=this.model.media.title?this.model.media.title+" ("+this.model.media.filename+")":this.model.media.filename})):console.log("No video was selected")}},computed:{isEmpty:function(){return null==this.model.media}},mounted:function(){this.model.getTitle=function(){return null!=this.model.media?null!=this.model.media.title?this.model.media.title+" ("+this.model.media.filename+")":this.model.media.filename:"No video selected"}},template:'\n<div class="media-field" :class="{ empty: isEmpty }">\n <div class="media-picker">\n <div class="btn-group float-right">\n <button v-on:click.prevent="select" class="btn btn-primary text-center">\n <i class="fas fa-plus"></i>\n </button>\n <button v-on:click.prevent="remove" class="btn btn-danger text-center">\n <i class="fas fa-times"></i>\n </button>\n </div>\n <div class="card text-left">\n <div class="card-body" v-if="isEmpty">\n <span v-if="meta.placeholder != null" class="text-secondary">{{ meta.placeholder }}</span>\n <span v-if="meta.placeholder == null" class="text-secondary"> </span>\n </div>\n <div class="card-body" v-else-if="model.media.title != null">\n <a href="#" v-on:click.prevent="piranha.preview.open(model.id)">{{ model.media.title }} ({{ model.media.filename }})</a>\n </div>\n <div class="card-body" v-else>\n <a href="#" v-on:click.prevent="piranha.preview.open(model.id)">{{ model.media.filename }}</a>\n </div>\n </div>\n </div>\n</div>\n'});
```
|
The Rising Night is an exclusive to audio Doctor Who story, produced as part of BBC Books' New Series Adventures line, and was the fourth entry in the series to be produced.
Written by Scott Handcock and read by Michelle Ryan, it features the Tenth Doctor and was published in July 2009.
It is set after the events of "Journey's End" and sees the TARDIS arrive in an 18th-century village on the Yorkshire Moors, where livestock has been vanishing from the farmland and strange lights have been seen in the skies.
References
External links
EZ Audiobooks
Audiobooks based on Doctor Who
Tenth Doctor audio plays
2009 audio plays
Yorkshire in fiction
Works by Scott Handcock
|
Eudendrium album is a marine species of cnidaria, a hydroid (Hydrozoa) in the family Eudendriidae.
References
Eudendrium
Animals described in 1898
|
```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 "common.h"
static FLOAT dm1 = -1.;
#ifndef COMPLEX
#define TRSM_KERNEL TRSM_KERNEL_LT
#else
#define TRSM_KERNEL TRSM_KERNEL_LC
#undef SYRK_KERNEL_U
#ifdef XDOUBLE
#define SYRK_KERNEL_U xherk_kernel_UC
#elif defined(DOUBLE)
#define SYRK_KERNEL_U zherk_kernel_UC
#else
#define SYRK_KERNEL_U cherk_kernel_UC
#endif
#endif
#if 0
#undef GEMM_P
#undef GEMM_Q
#undef GEMM_R
#define GEMM_P 8
#define GEMM_Q 20
#define GEMM_R 64
#endif
#define GEMM_PQ MAX(GEMM_P, GEMM_Q)
#define REAL_GEMM_R (GEMM_R - GEMM_PQ)
#if 0
#define SHARED_ARRAY
#define SA aa
#else
#undef SHARED_ARRAY
#define SA sa
#endif
blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLOAT *sb, BLASLONG myid) {
BLASLONG n, lda;
FLOAT *a;
BLASLONG info;
BLASLONG bk, blocking;
BLASLONG is, min_i;
BLASLONG jjs, min_jj;
BLASLONG range_N[2];
BLASLONG j, js, min_j;
#ifdef SHARED_ARRAY
FLOAT *aa;
#endif
FLOAT *sb2 = (FLOAT *)((((BLASLONG)sb
+ GEMM_PQ * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)
+ GEMM_OFFSET_B);
n = args -> n;
a = (FLOAT *)args -> a;
lda = args -> lda;
if (range_n) {
n = range_n[1] - range_n[0];
a += range_n[0] * (lda + 1) * COMPSIZE;
}
if (n <= DTB_ENTRIES / 2) {
info = POTF2_U(args, NULL, range_n, sa, sb, 0);
return info;
}
blocking = GEMM_Q;
if (n <= 4 * GEMM_Q) blocking = (n + 3) / 4;
for (j = 0; j < n; j += blocking) {
bk = n - j;
if (bk > blocking) bk = blocking;
if (!range_n) {
range_N[0] = j;
range_N[1] = j + bk;
} else {
range_N[0] = range_n[0] + j;
range_N[1] = range_n[0] + j + bk;
}
info = CNAME(args, NULL, range_N, sa, sb, 0);
if (info) return info + j;
if (n - j - bk > 0) {
TRSM_IUNCOPY(bk, bk, a + (j + j * lda) * COMPSIZE, lda, 0, sb);
for(js = j + bk; js < n; js += REAL_GEMM_R) {
min_j = n - js;
if (min_j > REAL_GEMM_R) min_j = REAL_GEMM_R;
for(jjs = js; jjs < js + min_j; jjs += GEMM_UNROLL_N){
min_jj = min_j + js - jjs;
if (min_jj > GEMM_UNROLL_N) min_jj = GEMM_UNROLL_N;
GEMM_ONCOPY(bk, min_jj, a + (j + jjs * lda) * COMPSIZE, lda, sb2 + bk * (jjs - js) * COMPSIZE);
for (is = 0; is < bk; is += GEMM_P) {
min_i = bk - is;
if (min_i > GEMM_P) min_i = GEMM_P;
TRSM_KERNEL (min_i, min_jj, bk, dm1,
#ifdef COMPLEX
ZERO,
#endif
sb + bk * is * COMPSIZE,
sb2 + bk * (jjs - js) * COMPSIZE,
a + (j + is + jjs * lda) * COMPSIZE, lda, is);
}
}
for (is = j + bk; is < js + min_j; is += min_i) {
min_i = js + min_j - is;
if (min_i >= GEMM_P * 2) {
min_i = GEMM_P;
} else
if (min_i > GEMM_P) {
min_i = (min_i / 2 + GEMM_UNROLL_MN - 1) & ~(GEMM_UNROLL_MN - 1);
}
#ifdef SHARED_ARRAY
if ((is >= js) && (is + min_i <= js + min_j)) {
aa = sb2 + bk * (is - js) * COMPSIZE;
} else {
GEMM_INCOPY(bk, min_i, a + (j + is * lda) * COMPSIZE, lda, sa);
aa = sa;
}
#else
GEMM_INCOPY(bk, min_i, a + (j + is * lda) * COMPSIZE, lda, sa);
#endif
SYRK_KERNEL_U(min_i, min_j, bk,
dm1,
SA, sb2,
a + (is + js * lda) * COMPSIZE, lda,
is - js);
}
}
}
}
return 0;
}
```
|
Bring Me Morecambe & Wise is a five-part television documentary series that goes behind the scenes of one of Morecambe and Wise acts. The series was first shown on UK television station Gold in November 2012. The first of five sixty minute shows aired on 21 November 2012.
In the series, people close to the duo are interviewed about their shared experiences during the 1970s and 1980s.
The series also showcases never-before-seen sketches and routines from the double act and clips from some of their earliest TV performances, as well as an interview with Eric Morecambe's wife Joan.
Episode list
References
External links
Bring Me Morecambe & Wise at UKTV
2012 British television series debuts
2012 British television series endings
2010s British documentary television series
Morecambe and Wise
Gold (British TV channel) original programming
English-language television shows
|
Hagop Vahram Çerçiyan was a professor of mathematics, geography, and calligraphy at the Robert College of Istanbul, known for designing the signature of Mustafa Kemal Atatürk, the first president of Turkey.
Life
Of Armenian descent, Hagop Vahram Çerçiyan was an educator. He travelled to the United States to study the Palmer Method, which by that time had gained widespread popularity. Çerçiyan was known for teaching this method during his career as a professor. He returned to Istanbul and became a professor of mathematics, geography, and calligraphy at the Robert College in Istanbul. Over his 55-year career at the Robert College, Çerçiyan taught over 25,000 students, among them the future Prime Minister Bülent Ecevit, Foreign Ministers Selim Sarper and Rıfat Turgut Menemencioğlu, ambassadors Talat Halman and Nurver Nures and Cabinet Minister Kasım Gülek.
Atatürk's signature
During the initial years of the Turkish Republic and under the reforms of Atatürk, a Latin-based alphabet was introduced to replace the Perso-Turkic script then in use. As part of the reforms, Turkish citizens were also required to take up a last name under the Surname Law in 1934. Prior to this, Turkey's Christian and Jewish citizens were already using surnames, but Muslims did not use surnames. Muslims were generally referred by their social or professional titles such as "Pasha", "Hoca", "Bey", "Hanım", "Efendi", or their names were complemented with that of their father. Mustafa Kemal himself was required to take up a surname, and the Turkish Parliament gave him the surname Atatürk, meaning father of the Turks. Many members of parliament, including some of Çerçiyan's former students, suggested that Atatürk needed a new signature for his name. On a November morning in 1934, members of parliament presented the proposal to Çerçiyan, who accepted the task. That night, five model signatures were prepared and the following morning, police officers arrived to collect them. Atatürk personally selected the one of "K. Atatürk" from these five model signatures.
Legacy
According to Hagop Çerçiyan's son Dikran Çerçiyan, after the death of Atatürk in 1938, his father's contribution to Atatürk's signature risked being forgotten: "Some tried to introduce others as the creator of the signature. There were efforts to forget my father. But the truth always come[s] to the surface".
See also
Agop Dilâçar
References
Turkish people of Armenian descent
Turkish educators
Turkish calligraphers
Year of birth missing
Year of death missing
|
Stebėkiai () is a village in Panevėžys District Municipality, Lithuania. According to the 2011 census, it had no residents. It is located from Vadokliai town.
Prominent Polish-Lithuanian painter Kanuty Rusiecki was born here.
References
Villages in Panevėžys County
|
```kotlin
package zlc.season.rxdownload4.notification
import android.app.Notification
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent
import android.content.Context
import android.os.Build
import androidx.core.app.NotificationCompat.Action
import androidx.core.app.NotificationCompat.Builder
import androidx.core.app.NotificationManagerCompat
import zlc.season.claritypotion.ClarityPotion.Companion.clarityPotion
import zlc.season.rxdownload4.Progress
import zlc.season.rxdownload4.task.Task
private val notificationManager by lazy {
clarityPotion.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
}
fun cancelNotification(task: Task) {
notificationManager.cancel(task.hashCode())
}
fun isEnableNotification(): Boolean {
val notificationManagerCompat = NotificationManagerCompat.from(clarityPotion)
return notificationManagerCompat.areNotificationsEnabled()
}
fun createNotificationChannel(
channelId: String,
channelName: String,
channelDescription: String
) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val notificationChannel = NotificationChannel(
channelId,
channelName,
NotificationManager.IMPORTANCE_LOW
)
notificationChannel.description = channelDescription
notificationChannel.enableVibration(false)
notificationChannel.enableLights(false)
notificationChannel.vibrationPattern = longArrayOf(0L)
notificationChannel.setSound(null, null)
notificationManager.createNotificationChannel(notificationChannel)
}
}
fun createNotificationBuilder(
channelId: String,
title: String,
content: String,
icon: Int,
intent: PendingIntent? = null,
progress: Progress? = null,
actions: List<Action> = emptyList()
): Builder {
val notificationBuilder = Builder(clarityPotion, channelId)
notificationBuilder.setContentTitle(title)
.setContentText(content)
.setSmallIcon(icon)
.setContentIntent(intent)
.setVibrate(longArrayOf(0L))
.setOngoing(true)
.setSound(null)
.setDefaults(Notification.FLAG_ONLY_ALERT_ONCE)
progress?.let {
notificationBuilder.setProgress(
it.totalSize.toInt(),
it.downloadSize.toInt(),
it.isChunked
)
}
actions.forEach {
notificationBuilder.addAction(it)
}
return notificationBuilder
}
```
|
USS Merrimac, sometimes incorrectly spelt Merrimack, was a cargo steamship that was built in 1894 in England as Solveig for Norwegian owners, and renamed Merrimac when a US shipowner acquired her in 1897.
In 1898 Merrimac was commissioned into the United States Navy as a collier for the Spanish–American War. In June 1898 Spanish Navy ships sank her when she tried to trap them in the harbor of Santiago de Cuba. Merrimac is the only US ship that the Spanish Navy sank in that war.
Solveig
CS Swan & Hunter built the ship in Wallsend on the River Tyne as yard number 194. She was launched on 29 September 1894 as Solveig, and completed her that November. Her registered length was , her beam was and her depth was . Her tonnages were and .
She had a single screw, driven by a three-cylinder triple-expansion steam engine built by North Eastern Marine Engineering of Wallsend. The engine was rated at 289 NHP and gave her a speed of .
Solveigs first owner was Christian Michelsen & Co, who registered her in Bergen, Norway.
Merrimac
On 9 December 1897 John N Robbins & co acquired Solveig, renamed her Merrimac, and registered her in New York. Ownership then passed to a Jefferson T Hogan, who on 12 April 1898 sold Merrimac to the United States Navy.
The ship was commissioned as USS Merrimac under the command of Cmdr JW Miller, fitted out at Norfolk Naval Shipyard as a naval collier. She joined the squadron of Commodore WS Schley off Cienfuegos, Cuba, on 20 May, and accompanied the squadron along the coast until it arrived off Santiago de Cuba on 26 May, where she bunkered several US warships.
Action in Santiago Harbor
A young Lieutenant, Richmond P. Hobson, devised a plan to scuttle Merrimac as a blockship to trap Spanish warships that were thought to be in Santiago harbor. Admiral William T. Sampson approved of his plan, and a skeleton crew of seven volunteers was selected: three from Merrimacs crew, three from the cruiser , and one from the battleship . Command of Merrimac was transferred from Cmdr Miller to Lieut Hobson.
It took two days of intense work to prepare Merrimac for her mission. An anchor was fitted to her stern to help to position her correctly to obstruct the harbor mouth. Ten improvised torpedoes were hung under her hull, to be electrically detonated simultaneously once Merrimac was in the correct position. Merrimac towed a dinghy, in which Hobson planned that he and his men would abandon ship. A launch from USS New York accompanied Merrimac as far as the harbor mouth, where it was to wait to pick up Hobson and his crew from the dinghy.
Merrimac reached the narrowest part of the channel, where he planned to scuttle her. But Spanish coastal artillery howitzers opened fire, and a shell disabled Merrimacs steering gear, which prevented Hobson and his crew from swinging her into position. Enemy fire also damaged some of the electric batteries that were meant to detonate the torpedoes. Hobson was able to detonate only three of the ten torpedoes, and these did not immediately sink her. A Spanish submarine mine tore a hole in her side, and she grounded on a promontory called Estrella Point. The American steamer was later sunk by the combined gunfire and the torpedoes of the protected cruiser Vizcaya, the unprotected cruiser Reina Mercedes, and the destroyer Pluton. She sank in a position that did not obstruct navigation. Hobson and all of his skeleton crew survived, and abandoned ship in the dinghy.
Spanish artillery fire drove off USS New Yorks launch, and at daybreak the Spanish Admiral, Pascual Cervera y Topete, came in his launch to rescue and capture Hobson and his crew. He congratulated his prisoners on their bravery. That afternoon Cervera sent his Chief of Staff, Captain Oviedo, under flag of truce to USS New York to tell Admiral Sampson that Hobson and all of his crew had been safely rescued and captured, that only two were wounded, and that Cervera admired their valor.
Hobson and his crew were held as prisoners of war first in Morro Castle, and then in Santiago. Hobson was kept prisoner in the barracks, andhis men were held in the hospital. A month later, on 3 July 1898, the US Navy destroyed the Spanish fleet in the Battle of Santiago de Cuba. On 6 July, Hobson and his seven crewmen were all released in a prisoner exchange. Each was awarded the Medal of Honor.
Skeleton crew
The eight volunteer crewman of the Merrimac were:
Lieutenant Richmond P. Hobson
Coxswain Claus K. R. Clausen (USS New York)
Coxswain Osborn W. Deignan (USS Merrimac)
Coxswain John E. Murphy (USS Iowa)
Chief Master-At-Arms Daniel Montague (USS New York)
Gunner's Mate First Class George Charette (USS New York)
Machinist First Class George F. Phillips (USS Merrimac)
Watertender Francis Kelly (USS Merrimac)
References
Bibliography
External links
1894 ships
Battles and conflicts without fatalities
Maritime incidents in 1898
Ships built by Swan Hunter
Ships sunk with no fatalities
Spanish–American War naval ships of the United States
Shipwrecks in the Caribbean Sea
Shipwrecks of the Spanish–American War
Steamships of Norway
Steamships of the United States Navy
|
```smalltalk
using System;
using WorkflowCore.Interface;
using WorkflowCore.Persistence.EntityFramework.Services;
using WorkflowCore.Persistence.Sqlite;
using WorkflowCore.UnitTests;
using Xunit;
namespace WorkflowCore.Tests.Sqlite
{
[Collection("Sqlite collection")]
public class SqlitePersistenceProviderFixture : BasePersistenceFixture
{
string _connectionString;
public SqlitePersistenceProviderFixture(SqliteSetup setup)
{
_connectionString = setup.ConnectionString;
}
protected override IPersistenceProvider Subject
{
get
{
var db = new EntityFrameworkPersistenceProvider(new SqliteContextFactory(_connectionString), true, false);
db.EnsureStoreExists();
return db;
}
}
}
}
```
|
```c
/*
*/
#include <zephyr/sys/poweroff.h>
#include <esp_sleep.h>
void z_sys_poweroff(void)
{
/* Forces RTC domain to be always on */
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_ON);
esp_deep_sleep_start();
}
```
|
```c++
// Use, modification and distribution is subject to the Boost Software
// path_to_url
// Authors: Nick Edmonds
// Douglas Gregor
// Andrew Lumsdaine
#ifndef BOOST_DISTRIBUTED_FILTERED_GRAPH_HPP
#define BOOST_DISTRIBUTED_FILTERED_GRAPH_HPP
#ifndef BOOST_GRAPH_USE_MPI
#error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
#endif
#include <boost/graph/parallel/process_group.hpp>
#include <boost/graph/filtered_graph.hpp>
namespace boost {
namespace graph {
namespace parallel {
/// Retrieve the process group from a filtered graph
template<typename Graph, typename EdgePredicate, typename VertexPredicate>
struct process_group_type<filtered_graph<Graph, EdgePredicate, VertexPredicate> >
: process_group_type<Graph> { };
template<typename Graph, typename EdgePredicate, typename VertexPredicate>
struct process_group_type<const filtered_graph<Graph, EdgePredicate, VertexPredicate> >
: process_group_type<Graph> { };
}
}
/// Retrieve the process group from a filtered graph
template<typename Graph, typename EdgePredicate, typename VertexPredicate>
inline typename graph::parallel::process_group_type<Graph>::type
process_group(filtered_graph<Graph, EdgePredicate, VertexPredicate> const& g) {
return process_group(g.m_g);
}
/// Forward vertex() to vertex() of the base graph
template <typename Graph, typename EdgePredicate, typename VertexPredicate>
typename graph_traits<Graph>::vertex_descriptor
vertex(typename graph_traits<Graph>::vertices_size_type i,
filtered_graph<Graph, EdgePredicate, VertexPredicate> const& g)
{ return vertex(i, g.m_g); }
}
#endif // BOOST_DISTRIBUTED_FILTERED_GRAPH_HPP
```
|
```objective-c
#ifndef VALHALLA_THOR_MULTIMODAL_H_
#define VALHALLA_THOR_MULTIMODAL_H_
#include <cstdint>
#include <map>
#include <memory>
#include <unordered_map>
#include <vector>
#include <valhalla/baldr/double_bucket_queue.h>
#include <valhalla/baldr/graphid.h>
#include <valhalla/baldr/graphreader.h>
#include <valhalla/baldr/time_info.h>
#include <valhalla/proto/common.pb.h>
#include <valhalla/sif/dynamiccost.h>
#include <valhalla/sif/edgelabel.h>
#include <valhalla/sif/hierarchylimits.h>
#include <valhalla/thor/astarheuristic.h>
#include <valhalla/thor/edgestatus.h>
#include <valhalla/thor/pathalgorithm.h>
#include <valhalla/thor/pathinfo.h>
namespace valhalla {
namespace thor {
/**
* Multi-modal pathfinding algorithm. Currently supports walking and
* transit (bus, subway, light-rail, etc.).
*/
class MultiModalPathAlgorithm : public PathAlgorithm {
public:
/**
* Constructor.
* @param config A config object of key, value pairs
*/
explicit MultiModalPathAlgorithm(const boost::property_tree::ptree& config = {});
/**
* Destructor
*/
virtual ~MultiModalPathAlgorithm();
/**
* Form multi-modal path between and origin and destination location using
* the supplied costing method.
* @param origin Origin location
* @param dest Destination location
* @param graphreader Graph reader for accessing routing graph.
* @param mode_costing An array of costing methods, one per TravelMode.
* @param mode Travel mode from the origin.
* @return Returns the path edges (and elapsed time/modes at end of
* each edge).
*/
std::vector<std::vector<PathInfo>>
GetBestPath(valhalla::Location& origin,
valhalla::Location& dest,
baldr::GraphReader& graphreader,
const sif::mode_costing_t& mode_costing,
const sif::TravelMode mode,
const Options& options = Options::default_instance()) override;
/**
* Returns the name of the algorithm
* @return the name of the algorithm
*/
virtual const char* name() const override {
return "Multimodal";
}
/**
* Clear the temporary information generated during path construction.
*/
void Clear() override;
protected:
uint32_t max_walking_dist_;
sif::TravelMode mode_; // Current travel mode
uint8_t travel_type_; // Current travel type
bool date_set_;
bool date_before_tile_;
bool disable_transit_;
uint32_t date_;
uint32_t dow_;
uint32_t day_;
uint32_t start_time_;
uint32_t max_seconds_;
uint32_t max_transfer_distance_;
std::string origin_date_time_;
std::unordered_map<std::string, uint32_t> operators_;
std::unordered_set<uint32_t> processed_tiles_;
// Hierarchy limits.
std::vector<sif::HierarchyLimits> hierarchy_limits_;
// A* heuristic
AStarHeuristic astarheuristic_;
// Vector of edge labels (requires access by index).
std::vector<sif::MMEdgeLabel> edgelabels_;
// Adjacency list - approximate double bucket sort
baldr::DoubleBucketQueue<sif::MMEdgeLabel> adjacencylist_;
// Edge status. Mark edges that are in adjacency list or settled.
EdgeStatus edgestatus_;
// Destinations, id and cost
std::map<uint64_t, sif::Cost> destinations_;
/**
* Initializes the hierarchy limits, A* heuristic, and adjacency list.
* @param destll Lat,lng of the destination.
* @param costing Dynamic costing method.
*/
void Init(const midgard::PointLL& destll, const std::shared_ptr<sif::DynamicCost>& costing);
/**
* Add edges at the origin to the adjacency list.
* @param graphreader Graph tile reader.
* @param origin Location information of the origin.
* @param dest Location information of the destination.
* @param costing Dynamic costing.
*/
void SetOrigin(baldr::GraphReader& graphreader,
valhalla::Location& origin,
const valhalla::Location& dest,
const std::shared_ptr<sif::DynamicCost>& costing);
/**
* Set the destination edge(s).
* @param graphreader Graph tile reader.
* @param dest Location information of the destination.
* @param costing Dynamic costing.
* @return Returns the relative density near the destination (0-15)
*/
uint32_t SetDestination(baldr::GraphReader& graphreader,
const valhalla::Location& dest,
const std::shared_ptr<sif::DynamicCost>& costing);
/**
* Expand from the node along the forward search path. Immediately expands
* from the end node of any transition edge (so no transition edges are added
* to the adjacency list or EdgeLabel list). Does not expand transition edges if
* from_transition is false. This method is only used in CanReachDestination.
* @param graphreader Graph tile reader.
* @param node Graph Id of the node being expanded.
* @param pred Predecessor edge label (for costing).
* @param pred_idx Predecessor index into the EdgeLabel list.
* @param costing Current costing method.
* @param edgestatus Local edge status information.
* @param edgelabels Local edge label list.
* @param adjlist Local adjacency list/priority queue.
* @param from_transition True if this method is called from a transition edge.
* @return Returns true if a transit stop has been reached. False, otherwise.
*/
bool ExpandFromNode(baldr::GraphReader& graphreader,
const baldr::GraphId& node,
const sif::EdgeLabel& pred,
const uint32_t pred_idx,
const std::shared_ptr<sif::DynamicCost>& costing,
EdgeStatus& edgestatus,
std::vector<sif::EdgeLabel>& edgelabels,
baldr::DoubleBucketQueue<sif::EdgeLabel>& adjlist,
const bool from_transition);
/**
* Expand from the node using multimodal algorithm.
* @param graphreader Graph reader.
* @param node Graph Id of the node to expand.
* @param pred Edge label of the predecessor edge leading to the node.
* @param pred_idx Index in the edge label list of the predecessor edge.
* @param from_transition Boolean indicating if this expansion is from a transition edge.
* @param pc Pedestrian costing.
* @param tc Transit costing.
* @param mode_costing Array of all costing models.
* @param time_info Information time offset as the route progresses
* @return Returns false if the node could not be expanded from
*/
bool ExpandForward(baldr::GraphReader& graphreader,
const baldr::GraphId& node,
const sif::MMEdgeLabel& pred,
const uint32_t pred_idx,
const bool from_transition,
const std::shared_ptr<sif::DynamicCost>& pc,
const std::shared_ptr<sif::DynamicCost>& tc,
const sif::mode_costing_t& mode_costing,
const baldr::TimeInfo& time_info);
/**
* Check if destination can be reached if walking is the last mode. Checks
* if there are any transit stops within maximum walking distance from
* the destination. This is used to reject impossible routes given the
* modes allowed.
* TODO - once auto/bicycle are allowed modes we need to check if parking
* or bikeshare locations are within walking distance.
*/
bool CanReachDestination(const valhalla::Location& destination,
baldr::GraphReader& graphreader,
const sif::TravelMode dest_mode,
const std::shared_ptr<sif::DynamicCost>& costing);
/**
* Form the path from the adjacency list. Recovers the path from the
* destination backwards towards the origin (using predecessor information)
* @param dest Index in the edge labels of the destination edge.
* @return Returns the path info, a list of GraphIds representing the
* directed edges along the path - ordered from origin to
* destination - along with travel modes and elapsed time.
*/
std::vector<PathInfo> FormPath(const uint32_t dest);
};
} // namespace thor
} // namespace valhalla
#endif // VALHALLA_THOR_MULTIMODAL_H_
```
|
The green-backed robin (Pachycephalopsis hattamensis) is a species of bird in the family Petroicidae.
It is found in New Guinea.
Its natural habitats are subtropical or tropical moist lowland forest and subtropical or tropical moist montane forest.
References
green-backed robin
green-backed robin
Taxonomy articles created by Polbot
|
```python
"""
HAKUNA MATATA
"""
from .convex_hull import ConvexHull
from .delaunay import Delaunay3D
from .kdtree import KDTree
from .voxelgrid import VoxelGrid
ALL_STRUCTURES = {
'convex_hull': ConvexHull,
'delaunay3D': Delaunay3D,
'kdtree': KDTree,
'voxelgrid': VoxelGrid
}
```
|
```javascript
/*
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
import Popover from 'components/Popover/Popover.react';
import PropTypes from 'lib/PropTypes';
import Position from 'lib/Position';
import React from 'react';
import styles from 'components/PushExperimentDropdown/PushExperimentDropdown.scss';
export default class PushExperimentDropdown extends React.Component {
constructor() {
super();
this.state = {
open: false,
selected: false,
};
this.dropdownRef = React.createRef();
}
componentWillMount() {
this.styles = this.props.styles || styles;
}
select(value, e) {
e.stopPropagation();
this.setState(
{
open: false,
selected: true,
},
() => {
this.props.onChange(value);
}
);
}
render() {
const widthStyle = { width: this.props.width || 140 };
const styles = this.styles;
const color = this.props.color;
let content = (
<div
className={[styles.current, styles[color]].join(' ')}
onClick={() => this.setState({ open: true })}
>
<div>
{!this.state.selected && this.props.placeholder && this.props.value === undefined
? this.props.placeholder
: this.props.value}
</div>
</div>
);
if (this.state.open) {
const position = Position.inWindow(this.dropdownRef.current);
content = (
<Popover
fixed={true}
position={position}
onExternalClick={() => this.setState({ open: false })}
>
<div style={widthStyle} className={[styles.menu, styles[color]].join(' ')}>
{this.props.options.map(({ key, style }) => (
<div key={key} style={style} onClick={this.select.bind(this, key)}>
{key}
</div>
))}
</div>
</Popover>
);
}
return (
<div style={widthStyle} className={styles.dropdown} ref={this.dropdownRef}>
{content}
</div>
);
}
}
PushExperimentDropdown.propTypes = {
color: PropTypes.string.describe('Determines the color of the dropdown.'),
value: PropTypes.string.isRequired.describe('The current value of the dropdown.'),
options: PropTypes.arrayOf(PropTypes.object).isRequired.describe(
'An array of options available in the dropdown.'
),
onChange: PropTypes.func.isRequired.describe('A function called when the dropdown is changed.'),
width: PropTypes.string.describe('An optional width override.'),
placeHolder: PropTypes.string.describe('Placeholder text used in place of default selection.'),
styles: PropTypes.object.describe('Styles override used to provide dropdown with differnt skin.'),
};
```
|
Rupp or RUPP can refer to:
Rational Unified Process Product
Royal University of Phnom Penh
Roads used as public paths,
Rights of way in England and Wales
Rights of way in Scotland
Warren Rupp Observatory
Rupp Industries, a Mansfield, Ohio producer of go-karts, mini-bikes, and snowmobiles from the late 1950s until 1978; founded by car racer Mickey Rupp
People called Rupp or Ruppe:
Adolph Rupp (1901–1977), an American basketball coach
Adolph Rupp Trophy, an American basketball trophy
Rupp Arena, an American basketball arena
Bernd Rupp (b. 1942), a German football player
Debra Jo Rupp (b. 1951), an American television actress
Duane Rupp (b. 1938), a Canadian ice hockey player
Ernest Gordon Rupp (1910–1986), a British preacher and historian
Ernst Rupp (1892-1943) Wehrmacht General
Galen Rupp (b. 1986), an American athlete
George Erik Rupp (b. 1942), an American educator and theologian
Hans Georg Rupp (1907-1989), German judge
Heinrich Bernhard Rupp (1688-1719), a German botanist
Herman Rupp (1872–1956), an Australian clergyman and botanist
James H. Rupp (1918-1998), an American politician and businessman
Jean Rupp (1905–1983), French bishop and Vatican diplomat
Jennifer Rupp (b. 1980), materials engineer
Kerry Rupp, an American basketball coach
Leila J. Rupp (b. 1950), an American historian and feminist
Loret Miller Ruppe (1936–1996), an American administrator and diplomat
Lukas Rupp (born 1991), German footballer
Michael Rupp (b. 1980), an American ice hockey player
Mickey Rupp (b. 1936), an American racecar driver
Pat Rupp (1942–2006), an American ice hockey player
Philip Ruppe (b. 1926), an American politician
Rainer Rupp (b. 1945), East German spy
Scott T. Rupp, an American politician
Sieghardt Rupp (1931–2015), an Austrian actor
Terry Rupp (born 1966), an American college baseball coach
Surnames from given names
|
```objective-c
/*
*
*/
#ifndef __MEC5_SOC_H
#define __MEC5_SOC_H
#define SYSCLK_DEFAULT_IOSC_HZ MHZ(96)
#ifndef _ASMLANGUAGE
#include "device_mec5.h"
/* common SoC API */
#include "soc_dt.h"
#include "soc_espi_channels.h"
#include "soc_gpio.h"
#include "soc_pcr.h"
#include "soc_pins.h"
#endif
#endif
```
|
Danielle Nicole Panabaker (born September 19, 1987) is an American actress. She began acting as a teenager and came to prominence for her roles in the Disney films Stuck in the Suburbs (2004), Sky High (2005) and Read It and Weep (2006), and in the HBO miniseries Empire Falls (2005). She won three Young Artist Awards: for guest-starring in an episode of the legal drama television series The Guardian (2004), for her lead role in the TV film Searching for David's Heart (2005) and for her ensemble performance in the family comedy film Yours, Mine & Ours (2005).
Panabaker came to wider attention as a cast member in the CBS legal drama series Shark (2006–2008) and is also noted as a scream queen, having starred in the psychological thriller Mr. Brooks (2007) and the horror films Friday the 13th (2009), The Crazies (2010), John Carpenter's The Ward (2010) and Piranha 3DD (2012).
After starring in recurring roles on Necessary Roughness (2011–2013), Bones (2012–2013) and Justified (2014), Panabaker guest-starred as Caitlin Snow on The CW television series Arrow in April 2014. The actress was then included as Snow in the main cast of the spin-off series The Flash, which premiered that October. Starting with the series' second season, Panabaker began playing the character's alter ego Killer Frost in different capacities, in conjunction with her role as Snow, leading to subsequent guest appearances on Arrow, Supergirl and Legends of Tomorrow. For her role on The Flash as Frost, Panabaker has been nominated for five Teen Choice Awards and won the 2021 Saturn Award for Best Supporting Actress on Television.
Early life
Panabaker was born in Augusta, Georgia, to Donna (née Mayock) and Harold Panabaker. Her younger sister, Kay Panabaker, was also an actress and is currently working as a zoologist. As her father's sales job took them across the country, the family spent time in South Carolina, Pennsylvania, and, for a short time around Panabaker's kindergarten year, in Orange, Texas. She took a theater class at a summer camp, discovered her love of acting, and started acting in community theaters at the age of 12, later auditioning for commercials.
After moving to Naperville, Illinois, in 2000, Panabaker went to Crone Middle School and then Neuqua Valley High School, participating in the speech team. She graduated from high school when she was 14 years old. Panabaker also took ballet and pointe classes up until she was fifteen. In 2003, feeling it was the only way to land acting roles regularly, Panabaker, her sister, and their mother relocated to Los Angeles, California, so she could pursue an acting career. She attended Glendale Community College, studying acting. In 2005, she earned her associate degree and appeared on the national Dean's List. In 2006, she began her senior year at the University of California, Los Angeles, from which she graduated with a Bachelor of Arts in June 2007, again appearing on the Dean's List.
Career
Panabaker followed her initial appearances in commercials with roles in television, including a part in The Guardian (for which she won a Young Artist Award), as well as other television series including Malcolm in the Middle, Law & Order: Special Victims Unit, Medium, and Summerland, and the Disney Channel Original Movie Stuck in the Suburbs. She also appeared in the Lifetime Television productions Sex and the Single Mom and Mom at Sixteen, as well as the well-reviewed miniseries Empire Falls. She considers Empire Falls to be her big break, as it gave her the confidence to pursue her career. In addition, Panabaker appeared in stage productions with roles in musical theater, including West Side Story, Pippin, Once upon a Time, and Beauty Lou and the Country Beast. In 2004, she starred in the ABC film "Searching for David's Heart". In 2005, Panabaker co-starred in two widely released theatrical films, Sky High and Yours, Mine & Ours. Her next role was in the film Home of the Giants (2008). She also had a supporting role in the film Mr. Brooks. In the Disney Channel original movie Read It and Weep, she plays Is, an alternate version of Jamie, who was played by her real-life sister, Kay Panabaker.
From 2006 to 2008, Panabaker starred in the CBS television drama Shark, playing Julie Stark, the daughter of the lead character. In 2009, Panabaker played Jenna, a main character in the Friday the 13th remake. Panabaker next starred in the films The Crazies and The Ward.
In 2011, Panabaker starred as Katie Lapp, the lead character in the Hallmark Channel movie The Shunning, based on the novel by Beverly Lewis. She was to reprise her role in the 2013 sequel The Confession, but a scheduling conflict forced her to drop out, and the role was recast. In 2013, she starred in another Hallmark Channel movie, Nearlyweds. On May 5, 2013, Panabaker joined actors including Philip Baker Hall, Bill Pullman, and Maggie Siff in performing at Cedering Fox's WordTheatre, where they read aloud contemporary short fiction. In 2014, Panabaker starred in Bradley D. King's award-winning science-fiction film Time Lapse, for which she won the award for Best Actor/Actress at the 2014 London Independent Film Festival.
In April 2014, Panabaker guest-starred as Caitlin Snow in a second-season episode of the CW series Arrow; she was later included, playing Snow, in the main cast of the spin-off series The Flash. Panabaker made her directorial debut with the eighteenth episode of the series' fifth season, entitled "Godspeed".
Charity work
Panabaker volunteers for multiple organizations including the Art of Elysium, Unicef, and Young Storytellers Foundation. In May and June 2019, Panabaker, DC Comics co-publisher Jim Lee, writer Tom King, and fellow CW series actresses Nafessa Williams and Candice Patton toured five U.S. military bases in Kuwait with the United Service Organizations (USO), where they visited the approximately 12,000 U.S. military personnel stationed in that country as part of DC's 80th anniversary of Batman celebration.
Personal life
In July 2016, Panabaker announced that she was engaged to her longtime boyfriend Hayes Robbins, and they married on June 24, 2017, They have two children, one born in 2020 and another born in 2022.
Filmography
Film
Television
Music videos
"Misfit" (2003) by Amy Studt, as school girl
Web
Awards and nominations
References
External links
1987 births
21st-century American actresses
Actresses from Augusta, Georgia
Actresses from Georgia (U.S. state)
American child actresses
American film actresses
American musical theatre actresses
American television actresses
Glendale Community College (California) alumni
Living people
University of California, Los Angeles alumni
|
```html
{% extends 'generic/_base.html' %}
{% load helpers %}
{% load form_helpers %}
{% load render_table from django_tables2 %}
{% load i18n %}
{% block title %}{% trans "Search" %}{% endblock %}
{% block tabs %}
<ul class="nav nav-tabs">
<li class="nav-item" role="presentation">
<button class="nav-link active" type="button" role="tab">
{% trans "Results" %}
</button>
</li>
</ul>
{% endblock tabs %}
{% block content %}
<div class="row">
<div class="col col-6 offset-3 py-3">
<form action="{% url 'search' %}" method="get" class="form form-horizontal">
{% render_form form %}
<div class="text-end">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span> {% trans "Search" %}
</button>
</div>
</form>
</div>
</div>
<div class="row">
<div class="col">
<div class="card">
<div class="htmx-container table-responsive" id="object_list">
{% include 'htmx/table.html' %}
</div>
</div>
</div>
</div>
{% endblock content %}
```
|
```scss
// Notes on the classes:
//
// 1. The .carousel-item-left and .carousel-item-right is used to indicate where
// the active slide is heading.
// 2. .active.carousel-item is the current slide.
// 3. .active.carousel-item-left and .active.carousel-item-right is the current
// slide in its in-transition state. Only one of these occurs at a time.
// 4. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
// is the upcoming slide in transition.
.carousel {
position: relative;
}
.carousel-inner {
position: relative;
width: 100%;
overflow: hidden;
}
.carousel-item {
position: relative;
display: none;
align-items: center;
width: 100%;
@include transition($carousel-transition);
backface-visibility: hidden;
perspective: 1000px;
}
.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
display: block;
}
.carousel-item-next,
.carousel-item-prev {
position: absolute;
top: 0;
}
.carousel-item-next.carousel-item-left,
.carousel-item-prev.carousel-item-right {
transform: translateX(0);
@supports (transform-style: preserve-3d) {
transform: translate3d(0, 0, 0);
}
}
.carousel-item-next,
.active.carousel-item-right {
transform: translateX(100%);
@supports (transform-style: preserve-3d) {
transform: translate3d(100%, 0, 0);
}
}
.carousel-item-prev,
.active.carousel-item-left {
transform: translateX(-100%);
@supports (transform-style: preserve-3d) {
transform: translate3d(-100%, 0, 0);
}
}
//
// Alternate transitions
//
.carousel-fade {
.carousel-item {
opacity: 0;
transition-duration: .6s;
transition-property: opacity;
}
.carousel-item.active,
.carousel-item-next.carousel-item-left,
.carousel-item-prev.carousel-item-right {
opacity: 1;
}
.active.carousel-item-left,
.active.carousel-item-right {
opacity: 0;
}
.carousel-item-next,
.carousel-item-prev,
.carousel-item.active,
.active.carousel-item-left,
.active.carousel-item-prev {
transform: translateX(0);
@supports (transform-style: preserve-3d) {
transform: translate3d(0, 0, 0);
}
}
}
//
// Left/right controls for nav
//
.carousel-control-prev,
.carousel-control-next {
position: absolute;
top: 0;
bottom: 0;
// Use flex for alignment (1-3)
display: flex; // 1. allow flex styles
align-items: center; // 2. vertically center contents
justify-content: center; // 3. horizontally center contents
width: $carousel-control-width;
color: $carousel-control-color;
text-align: center;
opacity: $carousel-control-opacity;
// We can't have a transition here because WebKit cancels the carousel
// animation if you trip this while in the middle of another animation.
// Hover/focus state
@include hover-focus {
color: $carousel-control-color;
text-decoration: none;
outline: 0;
opacity: .9;
}
}
.carousel-control-prev {
left: 0;
@if $enable-gradients {
background: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
}
}
.carousel-control-next {
right: 0;
@if $enable-gradients {
background: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
}
}
// Icons for within
.carousel-control-prev-icon,
.carousel-control-next-icon {
display: inline-block;
width: $carousel-control-icon-width;
height: $carousel-control-icon-width;
background: transparent no-repeat center center;
background-size: 100% 100%;
}
.carousel-control-prev-icon {
background-image: $carousel-control-prev-icon-bg;
}
.carousel-control-next-icon {
background-image: $carousel-control-next-icon-bg;
}
// Optional indicator pips
//
// Add an ordered list with the following class and add a list item for each
// slide your carousel holds.
.carousel-indicators {
position: absolute;
right: 0;
bottom: 10px;
left: 0;
z-index: 15;
display: flex;
justify-content: center;
padding-left: 0; // override <ol> default
// Use the .carousel-control's width as margin so we don't overlay those
margin-right: $carousel-control-width;
margin-left: $carousel-control-width;
list-style: none;
li {
position: relative;
flex: 0 1 auto;
width: $carousel-indicator-width;
height: $carousel-indicator-height;
margin-right: $carousel-indicator-spacer;
margin-left: $carousel-indicator-spacer;
text-indent: -999px;
background-color: rgba($carousel-indicator-active-bg, .5);
// Use pseudo classes to increase the hit area by 10px on top and bottom.
&::before {
position: absolute;
top: -10px;
left: 0;
display: inline-block;
width: 100%;
height: 10px;
content: "";
}
&::after {
position: absolute;
bottom: -10px;
left: 0;
display: inline-block;
width: 100%;
height: 10px;
content: "";
}
}
.active {
background-color: $carousel-indicator-active-bg;
}
}
// Optional captions
//
//
.carousel-caption {
position: absolute;
right: ((100% - $carousel-caption-width) / 2);
bottom: 20px;
left: ((100% - $carousel-caption-width) / 2);
z-index: 10;
padding-top: 20px;
padding-bottom: 20px;
color: $carousel-caption-color;
text-align: center;
}
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.