text
stringlengths 1
22.8M
|
|---|
```php
<?php
namespace Illuminate\Queue\Jobs;
use DateTime;
use Illuminate\Support\Str;
abstract class Job
{
/**
* The job handler instance.
*
* @var mixed
*/
protected $instance;
/**
* The IoC container instance.
*
* @var \Illuminate\Container\Container
*/
protected $container;
/**
* The name of the queue the job belongs to.
*
* @var string
*/
protected $queue;
/**
* Indicates if the job has been deleted.
*
* @var bool
*/
protected $deleted = false;
/**
* Indicates if the job has been released.
*
* @var bool
*/
protected $released = false;
/**
* Fire the job.
*
* @return void
*/
abstract public function fire();
/**
* Delete the job from the queue.
*
* @return void
*/
public function delete()
{
$this->deleted = true;
}
/**
* Determine if the job has been deleted.
*
* @return bool
*/
public function isDeleted()
{
return $this->deleted;
}
/**
* Release the job back into the queue.
*
* @param int $delay
* @return void
*/
public function release($delay = 0)
{
$this->released = true;
}
/**
* Determine if the job was released back into the queue.
*
* @return bool
*/
public function isReleased()
{
return $this->released;
}
/**
* Determine if the job has been deleted or released.
*
* @return bool
*/
public function isDeletedOrReleased()
{
return $this->isDeleted() || $this->isReleased();
}
/**
* Get the number of times the job has been attempted.
*
* @return int
*/
abstract public function attempts();
/**
* Get the raw body string for the job.
*
* @return string
*/
abstract public function getRawBody();
/**
* Resolve and fire the job handler method.
*
* @param array $payload
* @return void
*/
protected function resolveAndFire(array $payload)
{
list($class, $method) = $this->parseJob($payload['job']);
$this->instance = $this->resolve($class);
$this->instance->{$method}($this, $this->resolveQueueableEntities($payload['data']));
}
/**
* Parse the job declaration into class and method.
*
* @param string $job
* @return array
*/
protected function parseJob($job)
{
$segments = explode('@', $job);
return count($segments) > 1 ? $segments : [$segments[0], 'fire'];
}
/**
* Resolve the given job handler.
*
* @param string $class
* @return mixed
*/
protected function resolve($class)
{
return $this->container->make($class);
}
/**
* Resolve all of the queueable entities in the given payload.
*
* @param mixed $data
* @return mixed
*/
protected function resolveQueueableEntities($data)
{
if (is_string($data)) {
return $this->resolveQueueableEntity($data);
}
if (is_array($data)) {
$data = array_map(function ($d) {
if (is_array($d)) {
return $this->resolveQueueableEntities($d);
}
return $this->resolveQueueableEntity($d);
}, $data);
}
return $data;
}
/**
* Resolve a single queueable entity from the resolver.
*
* @param mixed $value
* @return \Illuminate\Contracts\Queue\QueueableEntity
*/
protected function resolveQueueableEntity($value)
{
if (is_string($value) && Str::startsWith($value, '::entity::')) {
list($marker, $type, $id) = explode('|', $value, 3);
return $this->getEntityResolver()->resolve($type, $id);
}
return $value;
}
/**
* Call the failed method on the job instance.
*
* @return void
*/
public function failed()
{
$payload = json_decode($this->getRawBody(), true);
list($class, $method) = $this->parseJob($payload['job']);
$this->instance = $this->resolve($class);
if (method_exists($this->instance, 'failed')) {
$this->instance->failed($this->resolveQueueableEntities($payload['data']));
}
}
/**
* Get an entity resolver instance.
*
* @return \Illuminate\Contracts\Queue\EntityResolver
*/
protected function getEntityResolver()
{
return $this->container->make('Illuminate\Contracts\Queue\EntityResolver');
}
/**
* Calculate the number of seconds with the given delay.
*
* @param \DateTime|int $delay
* @return int
*/
protected function getSeconds($delay)
{
if ($delay instanceof DateTime) {
return max(0, $delay->getTimestamp() - $this->getTime());
}
return (int) $delay;
}
/**
* Get the current system time.
*
* @return int
*/
protected function getTime()
{
return time();
}
/**
* Get the name of the queued job class.
*
* @return string
*/
public function getName()
{
return json_decode($this->getRawBody(), true)['job'];
}
/**
* Get the name of the queue the job belongs to.
*
* @return string
*/
public function getQueue()
{
return $this->queue;
}
}
```
|
```c
/*******************************************************************************
* Size: 20 px
* Bpp: 1
* Opts:
******************************************************************************/
#include "../../../lvgl.h"
#if LV_BUILD_TEST
#ifndef TEST_FONT_MONTSERRAT_ASCII_1BPP
#define TEST_FONT_MONTSERRAT_ASCII_1BPP 1
#endif
#if TEST_FONT_MONTSERRAT_ASCII_1BPP
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
0x0,
/* U+0021 "!" */
0xff, 0xff, 0xf0, 0x30,
/* U+0022 "\"" */
0xde, 0xf7, 0xbd, 0x80,
/* U+0023 "#" */
0x8, 0x40, 0x42, 0x2, 0x10, 0xff, 0xf0, 0x8c,
0xc, 0x60, 0x63, 0x3, 0x18, 0x18, 0x87, 0xff,
0x84, 0x20, 0x21, 0x1, 0x8, 0x8, 0x40,
/* U+0024 "$" */
0xc, 0x3, 0x0, 0xc0, 0xfe, 0x6c, 0xb3, 0xc,
0xc3, 0x30, 0xec, 0x1f, 0x81, 0xf8, 0x37, 0xc,
0xc3, 0x38, 0xcf, 0x36, 0x7f, 0x3, 0x0, 0xc0,
0x30,
/* U+0025 "%" */
0x38, 0x8, 0x6c, 0x10, 0xc6, 0x30, 0xc6, 0x20,
0xc6, 0x40, 0x6c, 0xc0, 0x38, 0x9c, 0x1, 0x36,
0x3, 0x63, 0x2, 0x63, 0x4, 0x63, 0xc, 0x63,
0x8, 0x36, 0x10, 0x1c,
/* U+0026 "&" */
0x1f, 0x1, 0x8c, 0xc, 0x60, 0x63, 0x3, 0xb8,
0xf, 0x80, 0x70, 0x7, 0xc0, 0x63, 0x36, 0xd,
0xb0, 0x79, 0x81, 0xc6, 0x1f, 0x1f, 0x98, 0x0,
0x40,
/* U+0027 "'" */
0xff, 0xc0,
/* U+0028 "(" */
0x33, 0x66, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x66,
0x63, 0x30,
/* U+0029 ")" */
0xcc, 0x66, 0x63, 0x33, 0x33, 0x33, 0x33, 0x66,
0x6c, 0xc0,
/* U+002A "*" */
0x11, 0x27, 0xf9, 0xcf, 0xf2, 0x44, 0x0,
/* U+002B "+" */
0x18, 0xc, 0x6, 0x3, 0xf, 0xf8, 0xc0, 0x60,
0x30, 0x18, 0x0,
/* U+002C "," */
0xf6, 0x80,
/* U+002D "-" */
0xf8,
/* U+002E "." */
0xfc,
/* U+002F "/" */
0x1, 0x80, 0x80, 0xc0, 0x60, 0x20, 0x30, 0x18,
0x8, 0xc, 0x6, 0x2, 0x3, 0x1, 0x80, 0x80,
0xc0, 0x60, 0x20, 0x30, 0x18, 0x8, 0x0,
/* U+0030 "0" */
0x1f, 0x6, 0x31, 0x83, 0x30, 0x6c, 0x7, 0x80,
0xf0, 0x1e, 0x3, 0xc0, 0x78, 0xd, 0x3, 0x30,
0x63, 0x18, 0x3e, 0x0,
/* U+0031 "1" */
0xf8, 0xc6, 0x31, 0x8c, 0x63, 0x18, 0xc6, 0x31,
0x8c,
/* U+0032 "2" */
0x7e, 0x30, 0xc0, 0x18, 0x6, 0x1, 0x80, 0xe0,
0x30, 0x1c, 0xe, 0x7, 0x3, 0x81, 0xc0, 0x60,
0x3f, 0xf0,
/* U+0033 "3" */
0x7f, 0xc0, 0x18, 0x6, 0x1, 0x80, 0x70, 0xc,
0x3, 0xe0, 0x1e, 0x0, 0xe0, 0xc, 0x1, 0x80,
0x36, 0xc, 0x7e, 0x0,
/* U+0034 "4" */
0x1, 0x80, 0x30, 0x7, 0x0, 0x60, 0xc, 0x1,
0x80, 0x38, 0xc7, 0xc, 0x60, 0xcf, 0xff, 0x0,
0xc0, 0xc, 0x0, 0xc0, 0xc,
/* U+0035 "5" */
0x7f, 0x98, 0x6, 0x1, 0x80, 0x60, 0x18, 0x7,
0xf0, 0x6, 0x0, 0xc0, 0x30, 0xe, 0x3, 0xc1,
0x9f, 0xc0,
/* U+0036 "6" */
0xf, 0xc6, 0x9, 0x80, 0x20, 0xc, 0x1, 0xbf,
0x3c, 0x37, 0x3, 0xe0, 0x7c, 0xd, 0x81, 0xb0,
0x33, 0xc, 0x3e, 0x0,
/* U+0037 "7" */
0xff, 0xf8, 0x1b, 0x3, 0x60, 0xc0, 0x18, 0x7,
0x0, 0xc0, 0x18, 0x6, 0x0, 0xc0, 0x30, 0x6,
0x1, 0xc0, 0x30, 0x0,
/* U+0038 "8" */
0x3f, 0x8c, 0x1b, 0x1, 0xe0, 0x3c, 0x6, 0xc1,
0x8f, 0xe3, 0x6, 0xc0, 0x78, 0xf, 0x1, 0xe0,
0x36, 0xc, 0x3e, 0x0,
/* U+0039 "9" */
0x3f, 0xc, 0x33, 0x3, 0x60, 0x6c, 0xf, 0x81,
0xd8, 0x79, 0xfb, 0x0, 0x60, 0xc, 0x3, 0x0,
0x64, 0x38, 0xfc, 0x0,
/* U+003A ":" */
0xfc, 0x0, 0xfc,
/* U+003B ";" */
0xfc, 0x0, 0x3d, 0xa0,
/* U+003C "<" */
0x0, 0x81, 0xc3, 0xcf, 0xe, 0x7, 0x80, 0xf0,
0x1f, 0x1, 0x80,
/* U+003D "=" */
0xff, 0x80, 0x0, 0x0, 0x0, 0x7, 0xfc,
/* U+003E ">" */
0x80, 0x70, 0x1f, 0x1, 0xe0, 0x38, 0x3c, 0x79,
0xf0, 0xc0, 0x0,
/* U+003F "?" */
0x3f, 0x38, 0x64, 0xc, 0x3, 0x0, 0xc0, 0x70,
0x38, 0x1c, 0xe, 0x3, 0x0, 0xc0, 0x0, 0x0,
0x3, 0x0,
/* U+0040 "@" */
0x3, 0xf8, 0x1, 0xc1, 0xc0, 0x60, 0xc, 0x18,
0x0, 0xc6, 0x1f, 0x6c, 0xce, 0x3d, 0xb1, 0x83,
0x9e, 0x60, 0x33, 0xcc, 0x6, 0x79, 0x80, 0xcf,
0x30, 0x19, 0xe3, 0x7, 0x36, 0x71, 0xec, 0xc3,
0xe7, 0xc, 0x0, 0x0, 0xc0, 0x0, 0xe, 0x4,
0x0, 0x7f, 0x0,
/* U+0041 "A" */
0x3, 0x80, 0x7, 0x0, 0x1e, 0x0, 0x36, 0x0,
0xcc, 0x1, 0x8c, 0x6, 0x18, 0xc, 0x18, 0x38,
0x30, 0x7f, 0xf0, 0x80, 0x63, 0x0, 0x66, 0x0,
0xd8, 0x1, 0x80,
/* U+0042 "B" */
0xff, 0x8c, 0xc, 0xc0, 0x6c, 0x6, 0xc0, 0x6c,
0xc, 0xff, 0xcc, 0x6, 0xc0, 0x3c, 0x3, 0xc0,
0x3c, 0x3, 0xc0, 0x6f, 0xfc,
/* U+0043 "C" */
0x7, 0xe0, 0xc1, 0xcc, 0x4, 0xc0, 0xc, 0x0,
0x60, 0x3, 0x0, 0x18, 0x0, 0xc0, 0x6, 0x0,
0x18, 0x0, 0x60, 0x21, 0x83, 0x87, 0xf0,
/* U+0044 "D" */
0xff, 0x86, 0x6, 0x30, 0x19, 0x80, 0x6c, 0x1,
0xe0, 0xf, 0x0, 0x78, 0x3, 0xc0, 0x1e, 0x0,
0xf0, 0xd, 0x80, 0xec, 0xc, 0x7f, 0xc0,
/* U+0045 "E" */
0xff, 0xf0, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xf,
0xfb, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0,
0x3f, 0xf0,
/* U+0046 "F" */
0xff, 0xf0, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc,
0x3, 0xfe, 0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0,
0x30, 0x0,
/* U+0047 "G" */
0x7, 0xe0, 0xc1, 0xcc, 0x4, 0xc0, 0xc, 0x0,
0x60, 0x3, 0x0, 0x18, 0x3, 0xc0, 0x1e, 0x0,
0xd8, 0x6, 0x60, 0x31, 0x83, 0x83, 0xf8,
/* U+0048 "H" */
0xc0, 0x3c, 0x3, 0xc0, 0x3c, 0x3, 0xc0, 0x3c,
0x3, 0xff, 0xfc, 0x3, 0xc0, 0x3c, 0x3, 0xc0,
0x3c, 0x3, 0xc0, 0x3c, 0x3,
/* U+0049 "I" */
0xff, 0xff, 0xff, 0xf0,
/* U+004A "J" */
0x7f, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3,
0x3, 0x3, 0x3, 0x83, 0xc6, 0x7c,
/* U+004B "K" */
0xc0, 0x6c, 0xc, 0xc1, 0xcc, 0x38, 0xc7, 0xc,
0xe0, 0xdc, 0xf, 0xe0, 0xf7, 0xe, 0x38, 0xc1,
0x8c, 0xc, 0xc0, 0x6c, 0x7,
/* U+004C "L" */
0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc,
0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0,
0x3f, 0xf0,
/* U+004D "M" */
0xc0, 0x7, 0xc0, 0x1f, 0x80, 0x3f, 0x80, 0xff,
0x1, 0xfb, 0x6, 0xf3, 0x19, 0xe6, 0x33, 0xc6,
0xc7, 0x8d, 0x8f, 0xe, 0x1e, 0x8, 0x3c, 0x0,
0x78, 0x0, 0xc0,
/* U+004E "N" */
0xc0, 0x3e, 0x3, 0xf0, 0x3f, 0x3, 0xd8, 0x3c,
0xc3, 0xce, 0x3c, 0x73, 0xc3, 0x3c, 0x1b, 0xc0,
0xfc, 0xf, 0xc0, 0x7c, 0x3,
/* U+004F "O" */
0x7, 0xc0, 0x30, 0x60, 0xc0, 0x63, 0x0, 0x6c,
0x0, 0x78, 0x0, 0xf0, 0x1, 0xe0, 0x3, 0xc0,
0x7, 0x80, 0xd, 0x80, 0x31, 0x80, 0xc1, 0x83,
0x0, 0xf8, 0x0,
/* U+0050 "P" */
0xff, 0x18, 0x3b, 0x1, 0xe0, 0x3c, 0x7, 0x80,
0xf0, 0x3e, 0xe, 0xff, 0x18, 0x3, 0x0, 0x60,
0xc, 0x1, 0x80, 0x0,
/* U+0051 "Q" */
0x7, 0xc0, 0x18, 0x30, 0x30, 0x18, 0x60, 0xc,
0xc0, 0x6, 0xc0, 0x6, 0xc0, 0x6, 0xc0, 0x6,
0xc0, 0x6, 0xc0, 0x6, 0x60, 0xc, 0x30, 0x18,
0x18, 0x30, 0xf, 0xe0, 0x1, 0xc2, 0x0, 0xe2,
0x0, 0x3c,
/* U+0052 "R" */
0xff, 0x18, 0x3b, 0x1, 0xe0, 0x3c, 0x7, 0x80,
0xf0, 0x3e, 0xe, 0xff, 0x98, 0x63, 0x6, 0x60,
0x6c, 0xd, 0x80, 0xc0,
/* U+0053 "S" */
0x3f, 0x98, 0x6c, 0x3, 0x0, 0xc0, 0x3c, 0x7,
0xf0, 0xfe, 0x7, 0xc0, 0x70, 0xe, 0x3, 0xc1,
0x9f, 0xc0,
/* U+0054 "T" */
0xff, 0xf0, 0x60, 0x6, 0x0, 0x60, 0x6, 0x0,
0x60, 0x6, 0x0, 0x60, 0x6, 0x0, 0x60, 0x6,
0x0, 0x60, 0x6, 0x0, 0x60,
/* U+0055 "U" */
0xc0, 0x3c, 0x3, 0xc0, 0x3c, 0x3, 0xc0, 0x3c,
0x3, 0xc0, 0x3c, 0x3, 0xc0, 0x3c, 0x3, 0xc0,
0x36, 0x6, 0x30, 0xc1, 0xf8,
/* U+0056 "V" */
0xc0, 0xd, 0x80, 0x36, 0x1, 0x8c, 0x6, 0x30,
0x30, 0xe0, 0xc1, 0x86, 0x6, 0x18, 0xc, 0xe0,
0x33, 0x0, 0x6c, 0x1, 0xe0, 0x7, 0x80, 0xc,
0x0,
/* U+0057 "W" */
0xc0, 0x60, 0x1e, 0x3, 0x81, 0xb8, 0x1c, 0xc,
0xc1, 0xa0, 0x66, 0xd, 0x86, 0x38, 0xcc, 0x30,
0xc6, 0x21, 0x86, 0x31, 0x98, 0x3b, 0xc, 0xc0,
0xd8, 0x26, 0x6, 0xc1, 0xe0, 0x3c, 0xf, 0x0,
0xe0, 0x38, 0x7, 0x1, 0x80,
/* U+0058 "X" */
0x60, 0x31, 0x81, 0x8e, 0x18, 0x31, 0x80, 0xdc,
0x3, 0xc0, 0x1c, 0x0, 0xe0, 0xf, 0x80, 0x66,
0x6, 0x38, 0x60, 0xc7, 0x3, 0x30, 0xc,
/* U+0059 "Y" */
0x60, 0x19, 0xc0, 0x63, 0x3, 0x6, 0x18, 0x18,
0x60, 0x33, 0x0, 0xec, 0x1, 0xe0, 0x3, 0x0,
0xc, 0x0, 0x30, 0x0, 0xc0, 0x3, 0x0, 0xc,
0x0,
/* U+005A "Z" */
0xff, 0xe0, 0xe, 0x1, 0xc0, 0x18, 0x3, 0x0,
0x70, 0x6, 0x0, 0xc0, 0x1c, 0x1, 0x80, 0x30,
0x7, 0x0, 0xe0, 0xf, 0xff,
/* U+005B "[" */
0xfc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
0xcc, 0xf0,
/* U+005C "\\" */
0xc0, 0x20, 0x18, 0xc, 0x2, 0x1, 0x80, 0xc0,
0x20, 0x18, 0xc, 0x2, 0x1, 0x80, 0xc0, 0x20,
0x18, 0xc, 0x2, 0x1, 0x80, 0xc0, 0x20,
/* U+005D "]" */
0xf8, 0xc6, 0x31, 0x8c, 0x63, 0x18, 0xc6, 0x31,
0x8c, 0x63, 0x18, 0xfe,
/* U+005E "^" */
0xc, 0x6, 0x7, 0x2, 0xc3, 0x21, 0x18, 0x84,
0xc3, 0x41, 0x80,
/* U+005F "_" */
0xff, 0xc0,
/* U+0060 "`" */
0xe0, 0xc1, 0x80,
/* U+0061 "a" */
0x7e, 0x21, 0x80, 0x60, 0x30, 0x1b, 0xff, 0x87,
0x83, 0xc1, 0xf1, 0xdf, 0x60,
/* U+0062 "b" */
0xc0, 0x18, 0x3, 0x0, 0x60, 0xd, 0xf1, 0xe3,
0x38, 0x36, 0x3, 0xc0, 0x78, 0xf, 0x1, 0xe0,
0x3e, 0xd, 0xe3, 0xb7, 0xc0,
/* U+0063 "c" */
0x1f, 0xc, 0x76, 0xb, 0x0, 0xc0, 0x30, 0xc,
0x3, 0x0, 0x60, 0x8c, 0x71, 0xf0,
/* U+0064 "d" */
0x0, 0x60, 0xc, 0x1, 0x80, 0x31, 0xf6, 0x63,
0xd8, 0x3e, 0x3, 0xc0, 0x78, 0xf, 0x1, 0xe0,
0x36, 0xe, 0xe3, 0xc7, 0xd8,
/* U+0065 "e" */
0x1f, 0x6, 0x31, 0x83, 0x60, 0x3c, 0x7, 0xff,
0xf0, 0x6, 0x0, 0x60, 0x6, 0x18, 0x7e, 0x0,
/* U+0066 "f" */
0x1f, 0x30, 0x30, 0x30, 0xfe, 0x30, 0x30, 0x30,
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
/* U+0067 "g" */
0x1f, 0x6e, 0x3d, 0x83, 0xe0, 0x3c, 0x7, 0x80,
0xf0, 0x1e, 0x3, 0x60, 0xe6, 0x3c, 0x7d, 0x80,
0x30, 0x4, 0xc1, 0x8f, 0xc0,
/* U+0068 "h" */
0xc0, 0x30, 0xc, 0x3, 0x0, 0xdf, 0x38, 0x6e,
0xf, 0x3, 0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xc0,
0xf0, 0x3c, 0xc,
/* U+0069 "i" */
0xc0, 0xff, 0xff, 0xfc,
/* U+006A "j" */
0x18, 0x0, 0x1, 0x8c, 0x63, 0x18, 0xc6, 0x31,
0x8c, 0x63, 0x18, 0xfc,
/* U+006B "k" */
0xc0, 0x18, 0x3, 0x0, 0x60, 0xc, 0x1d, 0x87,
0x31, 0xc6, 0x70, 0xdc, 0x1f, 0x83, 0xd8, 0x73,
0x8c, 0x39, 0x83, 0x30, 0x30,
/* U+006C "l" */
0xff, 0xff, 0xff, 0xfc,
/* U+006D "m" */
0xdf, 0x1f, 0x38, 0x78, 0x6e, 0xe, 0xf, 0x3,
0x3, 0xc0, 0xc0, 0xf0, 0x30, 0x3c, 0xc, 0xf,
0x3, 0x3, 0xc0, 0xc0, 0xf0, 0x30, 0x3c, 0xc,
0xc,
/* U+006E "n" */
0xdf, 0x38, 0x6e, 0xf, 0x3, 0xc0, 0xf0, 0x3c,
0xf, 0x3, 0xc0, 0xf0, 0x3c, 0xc,
/* U+006F "o" */
0x1f, 0x6, 0x31, 0x83, 0x60, 0x3c, 0x7, 0x80,
0xf0, 0x1e, 0x3, 0x60, 0xc6, 0x30, 0x7c, 0x0,
/* U+0070 "p" */
0xdf, 0x1e, 0x33, 0x83, 0x60, 0x3c, 0x7, 0x80,
0xf0, 0x1e, 0x3, 0xe0, 0xde, 0x3b, 0x7c, 0x60,
0xc, 0x1, 0x80, 0x30, 0x0,
/* U+0071 "q" */
0x1f, 0x66, 0x3d, 0x83, 0xe0, 0x3c, 0x7, 0x80,
0xf0, 0x1e, 0x3, 0x60, 0xe6, 0x3c, 0x7d, 0x80,
0x30, 0x6, 0x0, 0xc0, 0x18,
/* U+0072 "r" */
0xdf, 0x8e, 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc,
0x0,
/* U+0073 "s" */
0x3f, 0x30, 0xb0, 0x18, 0xf, 0xc3, 0xf8, 0x7e,
0x7, 0x1, 0xe1, 0xbf, 0x80,
/* U+0074 "t" */
0x30, 0x30, 0x30, 0xfe, 0x30, 0x30, 0x30, 0x30,
0x30, 0x30, 0x30, 0x30, 0x30, 0x1f,
/* U+0075 "u" */
0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xc0, 0xf0, 0x3c,
0xf, 0x3, 0xc1, 0xd8, 0x73, 0xec,
/* U+0076 "v" */
0xc0, 0x6c, 0xd, 0x83, 0x30, 0x63, 0x18, 0x63,
0x6, 0x40, 0xd8, 0xb, 0x1, 0xc0, 0x38, 0x0,
/* U+0077 "w" */
0xc0, 0xc0, 0xd0, 0x30, 0x26, 0x1e, 0x19, 0x87,
0x86, 0x31, 0x21, 0xc, 0xcc, 0xc3, 0x33, 0x30,
0x78, 0x78, 0x1e, 0x1e, 0x3, 0x3, 0x0, 0xc0,
0xc0,
/* U+0078 "x" */
0x60, 0xc6, 0x30, 0xc6, 0xd, 0x80, 0xe0, 0x1c,
0x3, 0x80, 0xd8, 0x31, 0x8e, 0x39, 0x83, 0x0,
/* U+0079 "y" */
0xc0, 0x6c, 0xd, 0x83, 0x30, 0x63, 0x8, 0x63,
0x6, 0x40, 0xd8, 0x1b, 0x1, 0xc0, 0x38, 0x2,
0x0, 0xc1, 0x10, 0x3c, 0x0,
/* U+007A "z" */
0xff, 0x81, 0xc1, 0xc0, 0xc0, 0xc0, 0xe0, 0x60,
0x60, 0x70, 0x70, 0x3f, 0xe0,
/* U+007B "{" */
0x1c, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x33, 0x83,
0xc, 0x30, 0xc3, 0xc, 0x30, 0xc1, 0xc0,
/* U+007C "|" */
0xff, 0xff, 0xff, 0xff, 0xfc,
/* U+007D "}" */
0xe0, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x30, 0x73,
0xc, 0x30, 0xc3, 0xc, 0x30, 0xce, 0x0,
/* U+007E "~" */
0x70, 0xc4, 0x61, 0xc0
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 86, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1, .adv_w = 86, .box_w = 2, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 5, .adv_w = 125, .box_w = 5, .box_h = 5, .ofs_x = 1, .ofs_y = 9},
{.bitmap_index = 9, .adv_w = 225, .box_w = 13, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 32, .adv_w = 199, .box_w = 10, .box_h = 20, .ofs_x = 1, .ofs_y = -3},
{.bitmap_index = 57, .adv_w = 270, .box_w = 16, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 85, .adv_w = 220, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 110, .adv_w = 67, .box_w = 2, .box_h = 5, .ofs_x = 1, .ofs_y = 9},
{.bitmap_index = 112, .adv_w = 108, .box_w = 4, .box_h = 19, .ofs_x = 2, .ofs_y = -4},
{.bitmap_index = 122, .adv_w = 108, .box_w = 4, .box_h = 19, .ofs_x = 1, .ofs_y = -4},
{.bitmap_index = 132, .adv_w = 128, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 8},
{.bitmap_index = 139, .adv_w = 186, .box_w = 9, .box_h = 9, .ofs_x = 1, .ofs_y = 3},
{.bitmap_index = 150, .adv_w = 73, .box_w = 2, .box_h = 5, .ofs_x = 1, .ofs_y = -3},
{.bitmap_index = 152, .adv_w = 123, .box_w = 5, .box_h = 1, .ofs_x = 1, .ofs_y = 5},
{.bitmap_index = 153, .adv_w = 73, .box_w = 2, .box_h = 3, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 154, .adv_w = 113, .box_w = 9, .box_h = 20, .ofs_x = -1, .ofs_y = -2},
{.bitmap_index = 177, .adv_w = 213, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 197, .adv_w = 118, .box_w = 5, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 206, .adv_w = 184, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 224, .adv_w = 183, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 244, .adv_w = 214, .box_w = 12, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 265, .adv_w = 184, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 283, .adv_w = 197, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 303, .adv_w = 191, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 323, .adv_w = 206, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 343, .adv_w = 197, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 363, .adv_w = 73, .box_w = 2, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 366, .adv_w = 73, .box_w = 2, .box_h = 14, .ofs_x = 1, .ofs_y = -3},
{.bitmap_index = 370, .adv_w = 186, .box_w = 9, .box_h = 9, .ofs_x = 1, .ofs_y = 3},
{.bitmap_index = 381, .adv_w = 186, .box_w = 9, .box_h = 6, .ofs_x = 1, .ofs_y = 5},
{.bitmap_index = 388, .adv_w = 186, .box_w = 9, .box_h = 9, .ofs_x = 1, .ofs_y = 3},
{.bitmap_index = 399, .adv_w = 183, .box_w = 10, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 417, .adv_w = 331, .box_w = 19, .box_h = 18, .ofs_x = 1, .ofs_y = -4},
{.bitmap_index = 460, .adv_w = 234, .box_w = 15, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 487, .adv_w = 242, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 508, .adv_w = 231, .box_w = 13, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 531, .adv_w = 264, .box_w = 13, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 554, .adv_w = 214, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 572, .adv_w = 203, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 590, .adv_w = 247, .box_w = 13, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 613, .adv_w = 260, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 634, .adv_w = 99, .box_w = 2, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 638, .adv_w = 164, .box_w = 8, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 652, .adv_w = 230, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 673, .adv_w = 190, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 691, .adv_w = 306, .box_w = 15, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 718, .adv_w = 260, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 739, .adv_w = 269, .box_w = 15, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 766, .adv_w = 231, .box_w = 11, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 786, .adv_w = 269, .box_w = 16, .box_h = 17, .ofs_x = 1, .ofs_y = -3},
{.bitmap_index = 820, .adv_w = 233, .box_w = 11, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 840, .adv_w = 199, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 858, .adv_w = 188, .box_w = 12, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 879, .adv_w = 253, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 900, .adv_w = 228, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 925, .adv_w = 360, .box_w = 21, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 962, .adv_w = 215, .box_w = 13, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 985, .adv_w = 207, .box_w = 14, .box_h = 14, .ofs_x = -1, .ofs_y = 0},
{.bitmap_index = 1010, .adv_w = 210, .box_w = 12, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1031, .adv_w = 107, .box_w = 4, .box_h = 19, .ofs_x = 2, .ofs_y = -4},
{.bitmap_index = 1041, .adv_w = 113, .box_w = 9, .box_h = 20, .ofs_x = -1, .ofs_y = -2},
{.bitmap_index = 1064, .adv_w = 107, .box_w = 5, .box_h = 19, .ofs_x = 0, .ofs_y = -4},
{.bitmap_index = 1076, .adv_w = 187, .box_w = 9, .box_h = 9, .ofs_x = 1, .ofs_y = 3},
{.bitmap_index = 1087, .adv_w = 160, .box_w = 10, .box_h = 1, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1089, .adv_w = 192, .box_w = 6, .box_h = 3, .ofs_x = 2, .ofs_y = 12},
{.bitmap_index = 1092, .adv_w = 191, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1105, .adv_w = 218, .box_w = 11, .box_h = 15, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1126, .adv_w = 183, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1140, .adv_w = 218, .box_w = 11, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1161, .adv_w = 196, .box_w = 11, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1177, .adv_w = 113, .box_w = 8, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1192, .adv_w = 221, .box_w = 11, .box_h = 15, .ofs_x = 1, .ofs_y = -4},
{.bitmap_index = 1213, .adv_w = 218, .box_w = 10, .box_h = 15, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1232, .adv_w = 89, .box_w = 2, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1236, .adv_w = 91, .box_w = 5, .box_h = 19, .ofs_x = -1, .ofs_y = -4},
{.bitmap_index = 1248, .adv_w = 197, .box_w = 11, .box_h = 15, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1269, .adv_w = 89, .box_w = 2, .box_h = 15, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1273, .adv_w = 338, .box_w = 18, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1298, .adv_w = 218, .box_w = 10, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1312, .adv_w = 203, .box_w = 11, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1328, .adv_w = 218, .box_w = 11, .box_h = 15, .ofs_x = 2, .ofs_y = -4},
{.bitmap_index = 1349, .adv_w = 218, .box_w = 11, .box_h = 15, .ofs_x = 1, .ofs_y = -4},
{.bitmap_index = 1370, .adv_w = 131, .box_w = 6, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1379, .adv_w = 160, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1392, .adv_w = 132, .box_w = 8, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1406, .adv_w = 217, .box_w = 10, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1420, .adv_w = 179, .box_w = 11, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1436, .adv_w = 288, .box_w = 18, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1461, .adv_w = 177, .box_w = 11, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1477, .adv_w = 179, .box_w = 11, .box_h = 15, .ofs_x = 0, .ofs_y = -4},
{.bitmap_index = 1498, .adv_w = 167, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1511, .adv_w = 112, .box_w = 6, .box_h = 19, .ofs_x = 1, .ofs_y = -4},
{.bitmap_index = 1526, .adv_w = 96, .box_w = 2, .box_h = 19, .ofs_x = 2, .ofs_y = -4},
{.bitmap_index = 1531, .adv_w = 112, .box_w = 6, .box_h = 19, .ofs_x = 1, .ofs_y = -4},
{.bitmap_index = 1546, .adv_w = 186, .box_w = 9, .box_h = 3, .ofs_x = 1, .ofs_y = 6}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] = {
{
.range_start = 32, .range_length = 95, .glyph_id_start = 1,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*-----------------
* KERNING
*----------------*/
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
2, 6, 7, 8, 9, 10, 9, 10,
11, 12, 0, 13, 14, 15, 16, 17,
18, 19, 12, 20, 20, 0, 0, 0,
21, 22, 23, 24, 25, 22, 26, 27,
28, 29, 29, 30, 31, 32, 29, 29,
22, 33, 34, 35, 3, 36, 30, 37,
37, 38, 39, 40, 41, 42, 43, 0,
44, 0, 45, 46, 47, 48, 49, 50,
51, 45, 52, 52, 53, 48, 45, 45,
46, 46, 54, 55, 56, 57, 51, 58,
58, 59, 58, 60, 41, 0, 0, 9
};
/*Map glyph_ids to kern right classes*/
static const uint8_t kern_right_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
2, 6, 7, 8, 9, 10, 9, 10,
11, 12, 13, 14, 15, 16, 17, 12,
18, 19, 20, 21, 21, 0, 0, 0,
22, 23, 24, 25, 23, 25, 25, 25,
23, 25, 25, 26, 25, 25, 25, 25,
23, 25, 23, 25, 3, 27, 28, 29,
29, 30, 31, 32, 33, 34, 35, 0,
36, 0, 37, 38, 39, 39, 39, 0,
39, 38, 40, 41, 38, 38, 42, 42,
39, 42, 39, 42, 43, 44, 45, 46,
46, 47, 46, 48, 0, 0, 35, 9
};
/*Kern values between classes*/
static const int8_t kern_class_values[] = {
0, 1, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 3, 0, 0, 0,
0, 2, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 14, 0, 9, -7, 0, 0, 0,
0, -18, -19, 2, 15, 7, 5, -13,
2, 16, 1, 13, 3, 10, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 19, 3, -2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -10, 0, 0, 0, 0, 0, -6,
5, 6, 0, 0, -3, 0, -2, 3,
0, -3, 0, -3, -2, -6, 0, 0,
0, 0, -3, 0, 0, -4, -5, 0,
0, -3, 0, -6, 0, 0, 0, 0,
0, 0, 0, 0, 0, -3, -3, 0,
0, -9, 0, -39, 0, 0, -6, 0,
6, 10, 0, 0, -6, 3, 3, 11,
6, -5, 6, 0, 0, -18, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -12, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
-4, -16, 0, -13, -2, 0, 0, 0,
0, 1, 12, 0, -10, -3, -1, 1,
0, -5, 0, 0, -2, -24, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -26, -3, 12, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 11, 0, 3, 0, 0, -6,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 12, 3, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, -12, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
2, 6, 3, 10, -3, 0, 0, 6,
-3, -11, -44, 2, 9, 6, 1, -4,
0, 12, 0, 10, 0, 10, 0, -30,
0, -4, 10, 0, 11, -3, 6, 3,
0, 0, 1, -3, 0, 0, -5, 26,
0, 26, 0, 10, 0, 13, 4, 5,
0, 0, 0, -12, 0, 0, 0, 0,
1, -2, 0, 2, -6, -4, -6, 2,
0, -3, 0, 0, 0, -13, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -21, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, -18, 0, -20, 0, 0, 0, 0,
-2, 0, 32, -4, -4, 3, 3, -3,
0, -4, 3, 0, 0, -17, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -31, 0, 3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 19, 0, 0, -12, 0, 11, 0,
-22, -31, -22, -6, 10, 0, 0, -21,
0, 4, -7, 0, -5, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 8, 10, -39, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 2, 0, 0, 0, 0, 0, 2,
2, -4, -6, 0, -1, -1, -3, 0,
0, -2, 0, 0, 0, -6, 0, -3,
0, -7, -6, 0, -8, -11, -11, -6,
0, -6, 0, -6, 0, 0, 0, 0,
-3, 0, 0, 3, 0, 2, -3, 0,
0, 0, 0, 3, -2, 0, 0, 0,
-2, 3, 3, -1, 0, 0, 0, -6,
0, -1, 0, 0, 0, 0, 0, 1,
0, 4, -2, 0, -4, 0, -5, 0,
0, -2, 0, 10, 0, 0, -3, 0,
0, 0, 0, 0, -1, 1, -2, -2,
0, -3, 0, -3, 0, 0, 0, 0,
0, 0, 0, 0, 0, -2, -2, 0,
-3, -4, 0, 0, 0, 0, 0, 1,
0, 0, -2, 0, -3, -3, -3, 0,
0, 0, 0, 0, 0, 0, 0, 0,
-2, 0, 0, 0, 0, -2, -4, 0,
0, -10, -2, -10, 6, 0, 0, -6,
3, 6, 9, 0, -8, -1, -4, 0,
-1, -15, 3, -2, 2, -17, 3, 0,
0, 1, -17, 0, -17, -3, -28, -2,
0, -16, 0, 6, 9, 0, 4, 0,
0, 0, 0, 1, 0, -6, -4, 0,
0, 0, 0, -3, 0, 0, 0, -3,
0, 0, 0, 0, 0, -2, -2, 0,
-2, -4, 0, 0, 0, 0, 0, 0,
0, -3, -3, 0, -2, -4, -3, 0,
0, -3, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, -3, -3, 0,
0, -2, 0, -6, 3, 0, 0, -4,
2, 3, 3, 0, 0, 0, 0, 0,
0, -2, 0, 0, 0, 0, 0, 2,
0, 0, -3, 0, -3, -2, -4, 0,
0, 0, 0, 0, 0, 0, 3, 0,
-3, 0, 0, 0, 0, -4, -5, 0,
0, 10, -2, 1, -10, 0, 0, 9,
-16, -17, -13, -6, 3, 0, -3, -21,
-6, 0, -6, 0, -6, 5, -6, -20,
0, -9, 0, 0, 2, -1, 3, -2,
0, 3, 0, -10, -12, 0, -16, -8,
-7, -8, -10, -4, -9, -1, -6, -9,
0, 1, 0, -3, 0, 0, 0, 2,
0, 3, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, -3, 0, -2,
0, -1, -3, 0, -5, -7, -7, -1,
0, -10, 0, 0, 0, 0, 0, 0,
-3, 0, 0, 0, 0, 1, -2, 0,
0, 3, 0, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0, 0, 0,
0, 2, 0, 0, 0, -3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -6, 0, 3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
-2, 0, 0, 0, -6, 0, 0, 0,
0, -16, -10, 0, 0, 0, -5, -16,
0, 0, -3, 3, 0, -9, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
-5, 0, 0, -6, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -6, 0, 0, 0, 0, 4, 0,
2, -6, -6, 0, -3, -3, -4, 0,
0, 0, 0, 0, 0, -10, 0, -3,
0, -5, -3, 0, -7, -8, -10, -3,
0, -6, 0, -10, 0, 0, 0, 0,
26, 0, 0, 2, 0, 0, -4, 0,
0, -14, 0, 0, 0, 0, 0, -30,
-6, 11, 10, -3, -13, 0, 3, -5,
0, -16, -2, -4, 3, -22, -3, 4,
0, 5, -11, -5, -12, -11, -13, 0,
0, -19, 0, 18, 0, 0, -2, 0,
0, 0, -2, -2, -3, -9, -11, -1,
0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, -3, 0, -2, -3, -5, 0,
0, -6, 0, -3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, -1, 0, -6, 0, 0, 6,
-1, 4, 0, -7, 3, -2, -1, -8,
-3, 0, -4, -3, -2, 0, -5, -5,
0, 0, -3, -1, -2, -5, -4, 0,
0, -3, 0, 3, -2, 0, -7, 0,
0, 0, -6, 0, -5, 0, -5, -5,
0, 0, 0, 0, 0, 0, 0, 0,
-6, 3, 0, -4, 0, -2, -4, -10,
-2, -2, -2, -1, -2, -4, -1, 0,
0, 0, 0, 0, -3, -3, -3, 0,
0, 0, 0, 4, -2, 0, -2, 0,
0, 0, -2, -4, -2, -3, -4, -3,
3, 13, -1, 0, -9, 0, -2, 6,
0, -3, -13, -4, 5, 0, 0, -15,
-5, 3, -5, 2, 0, -2, -3, -10,
0, -5, 2, 0, 0, -5, 0, 0,
0, 3, 3, -6, -6, 0, -5, -3,
-5, -3, -3, 0, -5, 2, -6, -5,
0, 0, 0, 0, 0, 0, 0, 0,
0, 3, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -5, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, -2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -3, -3, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, -5,
0, 0, -4, 0, 0, -3, -3, 0,
0, 0, 0, -3, 0, 0, 0, 0,
-2, 0, 0, 0, 0, 0, -2, 0,
0, 0, -5, 0, -6, 0, 0, 0,
-11, 0, 2, -7, 6, 1, -2, -15,
0, 0, -7, -3, 0, -13, -8, -9,
0, 0, -14, -3, -13, -12, -15, 0,
-8, 0, 3, 21, -4, 0, -7, -3,
-1, -3, -5, -9, -6, -12, -13, -7,
0, 0, -2, 0, 1, 0, 0, -22,
-3, 10, 7, -7, -12, 0, 1, -10,
0, -16, -2, -3, 6, -29, -4, 1,
0, 0, -21, -4, -17, -3, -23, 0,
0, -22, 0, 19, 1, 0, -2, 0,
0, 0, 0, -2, -2, -12, -2, 0,
0, 0, 0, 0, -10, 0, -3, 0,
-1, -9, -15, 0, 0, -2, -5, -10,
-3, 0, -2, 0, 0, 0, 0, -14,
-3, -11, -10, -3, -5, -8, -3, -5,
0, -6, -3, -11, -5, 0, -4, -6,
-3, -6, 0, 2, 0, -2, -11, 0,
0, -6, 0, 0, 0, 0, 4, 0,
2, -6, 13, 0, -3, -3, -4, 0,
0, 0, 0, 0, 0, -10, 0, -3,
0, -5, -3, 0, -7, -8, -10, -3,
0, -6, 3, 13, 0, 0, 0, 0,
26, 0, 0, 2, 0, 0, -4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
-1, 0, 0, 0, 0, 0, -2, -6,
0, 0, 0, 0, 0, -2, 0, 0,
0, -3, -3, 0, 0, -6, -3, 0,
0, -6, 0, 5, -2, 0, 0, 0,
0, 0, 0, 2, 0, 0, 0, 0,
6, 3, -3, 0, -10, -5, 0, 10,
-11, -10, -6, -6, 13, 6, 3, -28,
-2, 6, -3, 0, -3, 4, -3, -11,
0, -3, 3, -4, -3, -10, -3, 0,
0, 10, 6, 0, -9, 0, -18, -4,
9, -4, -12, 1, -4, -11, -11, -3,
3, 0, -5, 0, -9, 0, 3, 11,
-7, -12, -13, -8, 10, 0, 1, -23,
-3, 3, -5, -2, -7, 0, -7, -12,
-5, -5, -3, 0, 0, -7, -7, -3,
0, 10, 7, -3, -18, 0, -18, -4,
0, -11, -19, -1, -10, -5, -11, -9,
0, 0, -4, 0, -6, -3, 0, -3,
-6, 0, 5, -11, 3, 0, 0, -17,
0, -3, -7, -5, -2, -10, -8, -11,
-7, 0, -10, -3, -7, -6, -10, -3,
0, 0, 1, 15, -5, 0, -10, -3,
0, -3, -6, -7, -9, -9, -12, -4,
6, 0, -5, 0, -16, -4, 2, 6,
-10, -12, -6, -11, 11, -3, 2, -30,
-6, 6, -7, -5, -12, 0, -10, -13,
-4, -3, -3, -3, -7, -10, -1, 0,
0, 10, 9, -2, -21, 0, -19, -7,
8, -12, -22, -6, -11, -13, -16, -11,
0, 0, 0, 0, -4, 0, 0, 3,
-4, 6, 2, -6, 6, 0, 0, -10,
-1, 0, -1, 0, 1, 1, -3, 0,
0, 0, 0, 0, 0, -3, 0, 0,
0, 0, 3, 10, 1, 0, -4, 0,
0, 0, 0, -2, -2, -4, 0, 0,
1, 3, 0, 0, 0, 0, 3, 0,
-3, 0, 12, 0, 6, 1, 1, -4,
0, 6, 0, 0, 0, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 10, 0, 9, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -19, 0, -3, 5, 0, 10, 0,
0, 32, 4, -6, -6, 3, 3, -2,
1, -16, 0, 0, 15, -19, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -22, 12, 45, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, -5, 0, 0, -6, -3, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -2, 0, -9, 0, 0, 1, 0,
0, 3, 41, -6, -3, 10, 9, -9,
3, 0, 0, 3, 3, -4, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -42, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, -9, 0, 0, 0, -9,
0, 0, 0, 0, -7, -2, 0, 0,
0, -7, 0, -4, 0, -15, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -21, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, -3, 0, 0,
0, -5, 0, -9, 0, 0, 0, -5,
3, -4, 0, 0, -9, -3, -7, 0,
0, -9, 0, -3, 0, -15, 0, -4,
0, 0, -26, -6, -13, -4, -12, 0,
0, -21, 0, -9, -2, 0, 0, 0,
0, 0, 0, 0, 0, -5, -6, -3,
0, 0, 0, 0, -7, 0, -7, 4,
-4, 6, 0, -2, -7, -2, -5, -6,
0, -4, -2, -2, 2, -9, -1, 0,
0, 0, -28, -3, -4, 0, -7, 0,
-2, -15, -3, 0, 0, -2, -3, 0,
0, 0, 0, 2, 0, -2, -5, -2,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 4, 0, 0, 0, 0,
0, -7, 0, -2, 0, 0, 0, -6,
3, 0, 0, 0, -9, -3, -6, 0,
0, -9, 0, -3, 0, -15, 0, 0,
0, 0, -31, 0, -6, -12, -16, 0,
0, -21, 0, -2, -5, 0, 0, 0,
0, 0, 0, 0, 0, -3, -5, -2,
1, 0, 0, 5, -4, 0, 10, 16,
-3, -3, -10, 4, 16, 5, 7, -9,
4, 13, 4, 9, 7, 9, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 20, 15, -6, -3, 0, -3, 26,
14, 26, 0, 0, 0, 3, 0, 0,
0, 0, -5, 0, 0, 0, 0, 0,
0, 0, 0, 0, -2, 0, 0, 0,
0, 0, 0, 0, 0, 4, 0, 0,
0, 0, -27, -4, -3, -13, -16, 0,
0, -21, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, -5, 0, 0, 0, 0, 0,
0, 0, 0, 0, -2, 0, 0, 0,
0, 0, 0, 0, 0, 4, 0, 0,
0, 0, -27, -4, -3, -13, -16, 0,
0, -13, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, -3, 0, 0, 0,
-7, 3, 0, -3, 3, 6, 3, -10,
0, -1, -3, 3, 0, 3, 0, 0,
0, 0, -8, 0, -3, -2, -6, 0,
-3, -13, 0, 20, -3, 0, -7, -2,
0, -2, -5, 0, -3, -9, -6, -4,
0, 0, -5, 0, 0, 0, 0, 0,
0, 0, 0, 0, -2, 0, 0, 0,
0, 0, 0, 0, 0, 4, 0, 0,
0, 0, -27, -4, -3, -13, -16, 0,
0, -21, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, -5, 0, -10, -4, -3, 10,
-3, -3, -13, 1, -2, 1, -2, -9,
1, 7, 1, 3, 1, 3, -8, -13,
-4, 0, -12, -6, -9, -13, -12, 0,
-5, -6, -4, -4, -3, -2, -4, -2,
0, -2, -1, 5, 0, 5, -2, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, -2, -3, -3, 0,
0, -9, 0, -2, 0, -5, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -19, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, -3, -3, 0,
0, 0, 0, 0, -3, 0, 0, -5,
-3, 3, 0, -5, -6, -2, 0, -9,
-2, -7, -2, -4, 0, -5, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -21, 0, 10, 0, 0, -6, 0,
0, 0, 0, -4, 0, -3, 0, 0,
0, 0, -2, 0, -7, 0, 0, 13,
-4, -11, -10, 2, 4, 4, -1, -9,
2, 5, 2, 10, 2, 11, -2, -9,
0, 0, -13, 0, 0, -10, -9, 0,
0, -6, 0, -4, -5, 0, -5, 0,
-5, 0, -2, 5, 0, -3, -10, -3,
0, 0, -3, 0, -6, 0, 0, 4,
-7, 0, 3, -3, 3, 0, 0, -11,
0, -2, -1, 0, -3, 4, -3, 0,
0, 0, -13, -4, -7, 0, -10, 0,
0, -15, 0, 12, -3, 0, -6, 0,
2, 0, -3, 0, -3, -10, 0, -3,
0, 0, 0, 0, -2, 0, 0, 3,
-4, 1, 0, 0, -4, -2, 0, -4,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, -20, 0, 7, 0, 0, -3, 0,
0, 0, 0, 1, 0, -3, -3, 0
};
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
.left_class_mapping = kern_left_class_mapping,
.right_class_mapping = kern_right_class_mapping,
.left_class_cnt = 60,
.right_class_cnt = 48,
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = &kern_classes,
.kern_scale = 16,
.cmap_num = 1,
.bpp = 1,
.kern_classes = 1,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t test_font_montserrat_ascii_1bpp = {
#else
lv_font_t test_font_montserrat_ascii_1bpp = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 22, /*The maximum line height required by the font*/
.base_line = 4, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
.underline_position = -1,
.underline_thickness = 1,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if TEST_FONT_MONTSERRAT_ASCII_1BPP*/
#endif /*LV_BUILD_TEST*/
```
|
James Hogan (16 October 1882 – 30 January 1974) was an English football player and coach. He enjoyed some success as a footballer, reaching an FA Cup semi-final with Fulham in 1907–08, but his primary legacy is as a pioneer of the game and as an innovative coach across multiple European club and national sides. Named "the most influential coach there has ever been" by Jonathan Wilson, Hogan is regarded by some as the architect of Total Football.
Early life
James Hogan was born in 1882 into an Irish Catholic family in Nelson, Lancashire, the son of mill worker James Hogan. He grew up in nearby Burnley and received his education at St Mary Magdalene Roman Catholic School in Burnley. His father wanted Hogan to enter priesthood and sent him to study as a boarder at the Salford Diocesan Junior Seminary St Bede's College, Manchester in September 1896. Hogan graduated at midsummer 1900 after deciding not to pursue his vocation any further, although he was College Head Boy in the 1899–1900 Academic Year.
Playing career
Hogan was a promising young inside forward, and in 1903, he was the first signing of Burnley's new secretary-manager, Spen Whittaker. Despite being a first team regular, he felt undervalued and in 1905, he asked to be paid the maximum wage, which was £4 a week. The club turned it down, so he left and joined Fulham. Hogan helped Fulham reach the FA Cup semi-final in 1907–08 before joining Swindon Town and then Bolton Wanderers. During a pre-season tour Bolton beat Dutch club FC Dordrecht 10–0; Hogan vowed to return to Dordrecht in order to "teach those fellows how to play properly".
Coaching and managerial career
1910–1920: The Netherlands, Austria and Hungary
In 1910, Hogan accepted a two-year contract at Dordrecht and set about improving the team in fitness and ball control, as well as implementing the Combination Game. Impressed by his methods, the Royal Dutch Football Association recruited Hogan to manage the Netherlands in a friendly against Germany in October 1910, which Hogan's side won 2–1. Due to his success Hogan also briefly coached Wiener Amateur-SV in 1911 and 1912. Upon the expiry of his contract with Dordrecht in 1912, Hogan returned for a final season as a player at Bolton before returning to Vienna to coach the Austria national football team. However, the outbreak of World War I meant that he was interned as a foreign prisoner of war, but was smuggled to the Hungarian border. He moved to Budapest, where he was allowed out of captivity to coach at MTK Budapest between 1914 and 1918. Hogan laid the foundations for MTK's domination of Hungarian football, as they won ten domestic titles in a row between 1913–14 and 1924–25.
In 1917 Hogan was allowed to go home to be reunited with his family, but found a sour reception. He was told that men who had suffered financially as a result of the war could claim £200 from the F.A. Hogan was almost destitute, but when he went to the FA the secretary, Francis Wall, opened a cupboard and offered him a pair of khaki socks. 'We sent these to the boys at the front and they were grateful.' The unsubtle message was: 'traitor'.
1920s: Switzerland, France, Germany, Hungary and 1924 Olympics
At the end of the First World War in 1918, Hogan travelled to Switzerland and became coach of Young Boys Bern until 1920; he returned to Switzerland in 1924 to coach the Swiss national team alongside his compatriot Teddy Duckworth and Hungarian Izidor Kürschner for the 1924 Summer Olympics in Paris. Switzerland reached the final but lost 3–0 against Uruguay.
After the Olympics, Hogan coached Lausanne Sports and Dresdner SC before returning to Hungary to manage MTK Budapest again between 1925 and 1927. In 1926, Hogan was offered a lucrative contract by the Central German Football Association, after which he toured through Germany; Hogan is said to have shown his tactics to more than 5,000 German football players.
1930-1936: Austria and the Wunderteam, France, Fulham, 1936 Olympics
Hogan next formed a partnership with Hugo Meisl in 1931, coaching the Austria national football team to success during its Wunderteam period when it was recognised as one of the best European teams. Between 1932 and 1934, Hogan managed Racing Club de Paris and Lausanne Sports once again before returning to England to manage Fulham from May 1934. However, the players were not ready for new methods and training routines, and Hogan was sacked after only 31 games whilst lying in a hospital bed, recovering from an appendicitis operation in March 1935.
Hogan was contacted by Meisl to help coach the Austria national team at the 1936 Summer Olympics, which was hosted by Germany. Hogan's team were initially defeated by Peru in the quarter-final (4–2), however, a controversial rematch was scheduled which the Austrians won by default as the Peruvians left Germany in protest. Austria reached the final but were beaten 2–1 by Italy after extra time.
1936-1939: Aston Villa
Aston Villa appointed Hogan as their manager in November 1936, following the club's first ever relegation the previous season. Villa board member Frederick Rinder had witnessed Hogan leading Austria to the final of the 1936 Olympics and persuaded him to return to England. Arriving at Villa, Hogan outlined his philosophy: "I am a teacher and lover of constructive football with every pass, every kick, every movement an object." He won promotion back to the top flight and reached the FA Cup semi-final in 1937–38 – however, the outbreak of World War II meant that his players were paid off whilst Villa Park was commandeered by the War Office, and Hogan left before his managerial career at the club had chance to really take off.
Post-WW2: Brentford, Celtic and a return to Aston Villa
Hogan joined Brentford as coach in September 1948, before joining Celtic in the same year. Celtic's chairman Robert Kelly thought that the team's state of decline needed radical attention, and viewed Hogan as an experienced and innovative coach who was capable of reviving the struggling side. Celtic were at a low point and had avoided relegation in recent seasons. However, the majority of the players viewed Hogan's appointment with scepticism and, at times, mocked his methods. Celtic player Tommy Docherty, who later managed Scotland, Chelsea and Manchester United, credited his managerial success to the school of coaching he received from Hogan, and declared him to be "the finest coach the world had ever known". Docherty also stated: "He used to say football was like a Viennese waltz, a rhapsody. one-two-three, one-two-three, pass-move-pass, pass-move-pass. We were sat there, glued to our seats, because we were so keen to learn. His arrival at Celtic Park was the best thing that ever happened to me."
Hogan left Celtic by mutual consent in 1950, when Aston Villa asked him to return and take over from youth training and advise manager Eric Houghton. Villa won the 1956–57 FA Cup; Houghton and Hogan had laid the groundwork for Joe Mercer's side. Hogan's apprentices included future Aston Villa, West Brom and Manchester United manager Ron Atkinson, who stated: "Everything Hogan did was geared around ball control and passing. When Jimmy came to Villa, he was revolutionary. He would have you in the old car park at the back of Villa Park and he would be saying 'I want you to play the ball with the inside of your right foot, outside of your right foot, inside again, and now turn come back on your left foot inside and outside'. He would get you doing step-overs, little turns and twist on the ball and everything you did was to make you comfortable on the ball."
Hogan retired, aged 77, in November 1959, but continued to scout for both Villa and Burnley. He later returned to live in Burnley and attended several Burnley home games as a supporter.
Death
Hogan died in 1974 whilst living with his sister's daughter Margaret Melia on Brunshaw Avenue, Burnley. He was buried with his sister, Ellen Melia and her husband Peter Melia, in Burnley cemetery. Margaret died in 1992 whereby she joined them in the same grave. The grave is located next to Jimmy's parents' grave, but does not have a headstone.
In 2021, Peter Briggs and his father Charles Briggs, both members of the Turf Moor Memorial Garden located Jimmy's grave and started fundraising to pay for a headstone. The project was financed by the Turf Moor Memorial Garden, Burnley Football Supporters' Club, the Burnley Former Players Association, Aston Villa, former Burnley directors Clive Holt, Martin Hobbs, Terry Crabb and Barry Kilby, along with Burnley director John Banaszkiewicz. Turf Moor Memorial Garden also mounted a plaque next to Turf Moor within their Memorial Garden.
Impact and legacy
Hogan believed that possession-based football was the answer, but that it must be founded upon constant passing and movement, and added versatility in his players and increased fitness that would allow them to bamboozle an opponent with the fluidity of their attacking moves.
In 2012, Spanish magazine Panenka published a pedigree of several influential managers and teams from the 1910s to the 2010s—such as the Brazil national team of the 1950s and Pep Guardiola—placing Hogan as its progenitor; Hogan created a direct lineage for modern football tactics. Influenced by Burnley-born manager Harry Bradshaw and his adoption of the Scottish combination game, Hogan was directly responsible for the coaching foundations of two of the most influential footballing sides in history – Austria's Wunderteam and Hungary's Golden Team.
Hogan is credited with the revolution in European football that saw Hungary defeat England 6–3 at Wembley in 1953, ushering a new football era. After the match, Sándor Barcs, then president of the Hungarian Football Federation, said to the press: "Jimmy Hogan taught us everything we know about football."
Helmut Schön, 1974 FIFA World Cup-winning manager, whom Hogan lectured in Germany, stated: "I greatly admired Jimmy and always regarded him as a shining example of the coaching profession. In my lectures to coaches today I still mention his name frequently". Gusztáv Sebes stated: "We played football as Jimmy Hogan taught us. When our football history is told, his name should be written in gold letters". After his death in 1974, the head of the German Football Association labelled Hogan as "the father of football in modern Germany".
Honours
Player
Fulham
Southern League: 1905–06, 1906–07
Bolton Wanderers
Football League Second Division: 1908–09
Club
MTK Budapest
Nemzeti Bajnokság I: 1916–17, 1917–18, 1918–19, 1919–20, 1920–21
Young Boys Bern
Swiss Serie A: 1919–20
Aston Villa
Football League Second Division: 1937–38
Individual
World Soccer 24th Greatest Manager of All Time: 2013
References
External links
Traitor or Patriot: Jimmy Hogan
1882 births
1974 deaths
English people of Irish descent
English Roman Catholics
People from Nelson, Lancashire
Footballers from Burnley
Footballers educated at St Bede's College, Manchester
English men's footballers
Men's association football forwards
English football managers
Rochdale A.F.C. players
Burnley F.C. players
Nelson F.C. players
Swindon Town F.C. players
Fulham F.C. players
Bolton Wanderers F.C. players
FC Dordrecht managers
Netherlands national football team managers
FK Austria Wien managers
MTK Budapest FC managers
BSC Young Boys managers
Switzerland national football team managers
FC Lausanne-Sport managers
Dresdner SC managers
Fulham F.C. managers
Aston Villa F.C. managers
English expatriate football managers
Expatriate football managers in Austria
Expatriate football managers in France
Expatriate football managers in Hungary
Expatriate football managers in the Netherlands
Expatriate football managers in Switzerland
English expatriate sportspeople in Austria
English expatriate sportspeople in France
English expatriate sportspeople in Hungary
English expatriate sportspeople in the Netherlands
English expatriate sportspeople in Switzerland
Racing Club de France Football managers
Brentford F.C. non-playing staff
Celtic F.C. non-playing staff
Expatriate football managers in Germany
English expatriate sportspeople in Germany
Olympic coaches for Austria
|
```ruby
# frozen_string_literal: true
class Api::V1::FollowRequestsController < Api::BaseController
before_action -> { doorkeeper_authorize! :follow, :read, :'read:follows' }, only: :index
before_action -> { doorkeeper_authorize! :follow, :write, :'write:follows' }, except: :index
before_action :require_user!
after_action :insert_pagination_headers, only: :index
def index
@accounts = load_accounts
render json: @accounts, each_serializer: REST::AccountSerializer
end
def authorize
AuthorizeFollowService.new.call(account, current_account)
LocalNotificationWorker.perform_async(current_account.id, Follow.find_by(account: account, target_account: current_account).id, 'Follow', 'follow')
render json: account, serializer: REST::RelationshipSerializer, relationships: relationships
end
def reject
RejectFollowService.new.call(account, current_account)
render json: account, serializer: REST::RelationshipSerializer, relationships: relationships
end
private
def account
@account ||= Account.find(params[:id])
end
def relationships(**options)
AccountRelationshipsPresenter.new([account], current_user.account_id, **options)
end
def load_accounts
default_accounts.merge(paginated_follow_requests).to_a
end
def default_accounts
Account.without_suspended.includes(:follow_requests, :account_stat, :user).references(:follow_requests)
end
def paginated_follow_requests
FollowRequest.where(target_account: current_account).paginate_by_max_id(
limit_param(DEFAULT_ACCOUNTS_LIMIT),
params[:max_id],
params[:since_id]
)
end
def next_path
api_v1_follow_requests_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
api_v1_follow_requests_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
end
def pagination_max_id
@accounts.last.follow_requests.last.id
end
def pagination_since_id
@accounts.first.follow_requests.first.id
end
def records_continue?
@accounts.size == limit_param(DEFAULT_ACCOUNTS_LIMIT)
end
end
```
|
Berhampore is a community development block that forms an administrative division in the Berhampore subdivision of Murshidabad district in the Indian state of West Bengal.
Geography
Berhampore is located at
Berhampore CD block lies in the Ganges-Bhagirathi Basin, which is a long and narrow river valley. The Bhagirathi River splits the district into two natural physiographic regions – Rarh on the west and Bagri on the east. It has fertile soil suitable for cultivation.
Berhampore CD block is bounded by Murshidabad-Jiaganj CD block in the north, Hariharpara CD block in the east, Beldanga I CD block in the south and Nabagram CD block, in the west.
The Bagri or the eastern part of the district is a low lying alluvial plain with the shape of an isosceles triangle. The Ganges/Padma and the Bhagirathi form the two equal sides; the Jalangi forms the entire base; other offshoots of the Ganges meander within the area. It is liable to be flooded by the spill of the Bhagirathi and other rivers.
Berhampore CD block has an area of 314.19 km2. It has 1 panchayat samity, 17 gram panchayats, 317 gram sansads (village councils), 144 mouzas and 124 inhabited villages. Baharampur and Daulatabad police stations serve this block. Headquarters of this CD block is at Baharampur.
Gram panchayats of Berhampore block/ panchayat samiti are:
Bhakuri I, Bhakuri II, Chhaighari, Doulatabad, Gurudaspur, Haridasmati, Hatinagar, Madanpur, Manindra Nagar, Neallishpara Goaljan, Naoda, Nowdapanur, Radharghat I, Radharghat II, Rajdharpara, Rangamati Chandpara, Sahajadpur and Satui Chowrigachha.
Demographics
Population
According to the 2011 Census of India, Berhampore CD block had a total population of 446,887, of which 337,623 were rural and 109,264 were urban. There were 228,650 (51%) males and 218,237 (49%) females. Population in the age range 0-6 years was 54,097. Scheduled Castes numbered 76,935 (17.22%) and Scheduled Tribes numbered 10,809 (2.42%).
As per 2001 census, Berhampore block has a total population of 378,830, out of which 94,861 were males and 86,466 were females. Berhampore block registered a population growth of 26.80 per cent during the 1991-2001 decade. Decadal growth for the district was 23.70 per cent. Decadal growth in West Bengal was 17.84 per cent.
The decadal growth of population in Berhampore CD block in 2001-2011 was 17.95%.
Decadal Population Growth Rate (%)
Sources:
Census towns and villages
Census towns in Berhampore CD block were (2011 population figures in brackets): Goaljan (4,850), Kasim Bazar (11,724), Banjetia (10,400), Sibdanga Badarpur (12,829), Gopjan (23,415), Gora Bazar (5,200), Ajodhya Nagar (8,883), Chaltia (25,336) and Haridasmati (6,627).
Large villages in Berhampore CD block were (2011 population in brackets): Moktarpur (5,881), Andar Manik (7,938), Shahjadpur (7,299), Nischintapur (5,148), Katalia (4,198), Chumarigacha (4,481), Bara Satui (5,136), Chhota Satui (4,745), Charmahula (4,575), Bezpara (4,612), Sundipara (5,627), Rajdharpara (5,687), Purbba Narayanpur (8,664), Kharasdanga (4,219), Naoda Panur (5,743), Tarakpur (7,584), Bairgachhi (8,148), Kalikapur Kadamkhandi (4,258), Putijol (4,011), Hatinagar (8,057), Janmahmmadpur (6,679), Usta (5,645), Kulbaria (5,659), Daulatabad (5,761), Chutipur (5,001), Selamatpur (8,032), Dadpur (6,300), Chhayaghari (12,388) and Kaladanga (8,182).
Literacy
As per the 2011 census, the total number of literate persons in Berhampore CD block was 288,728 (73.51% of the population over 6 years) out of which males numbered 153,930 (76.52% of the male population over 6 years) and females numbered 134,798 (70.34% of the female population over 6 years). The gender disparity (the difference between female and male literacy rates) was 6.18%.
See also – List of West Bengal districts ranked by literacy rate
Language and religion
In the 2011 census, Muslims numbered 239,651 and formed 53.63% of the population in Berhampore CD block. Hindus numbered 205,321 and formed 45.94% of the population. Others numbered 1,915 and formed 0.43% of the population. In Berhampore CD block while the proportion of Muslims increased from 52.45% in 1991 to 52.83% in 2001,the proportion of Hindus declined from 47.44% in 1991 to 46.84% in 2001.
Murshidabad district had 4,707,573 Muslims who formed 66.27% of the population, 2,359,061 Hindus who formed 33.21% of the population, and 37, 173 persons belonging to other religions who formed 0.52% of the population, in the 2011 census. While the proportion of Muslim population in the district increased from 61.40% in 1991 to 63.67% in 2001, the proportion of Hindu population declined from 38.39% in 1991 to 35.92% in 2001.
Murshidabad was the only Muslim majority district in West Bengal at the time of partition of India in 1947. The proportion of Muslims in the population of Murshidabad district in 1951 was 55.24%. The Radcliffe Line had placed Muslim majority Murshidabad in India and the Hindu majority Khulna in Pakistan, in order to maintain the integrity of the Ganges river system In India.
Bengali is the predominant language, spoken by 97.92% of the population.
Rural poverty
As per the Human Development Report 2004 for West Bengal, the rural poverty ratio in Murshidabad district was 46.12%. Purulia, Bankura and Birbhum districts had higher rural poverty ratios. These estimates were based on Central Sample data of NSS 55th round 1999-2000.
Economy
Livelihood
In Berhampore CD block in 2011, amongst the class of total workers, cultivators formed 17.01%, agricultural labourers 35.12%, household industry workers 4.23% and other workers 43.63%.
Infrastructure
There are 124 inhabited villages in Berhampore CD block. 100% villages have power supply and 123 villages (99.19%) have drinking water supply. 37 villages (29.84%) have post offices. 112 villages (90.32%) have telephones (including landlines, public call offices and mobile phones). 57 villages (45.97%) have a pucca approach road and 51 villages (41.13%) have transport communication (includes bus service, rail facility and navigable waterways). 17 villages (13.71%) have agricultural credit societies and 14 villages (11.21%) have banks.
Agriculture
From 1977 onwards major land reforms took place in West Bengal. Land in excess of land ceiling was acquired and distributed amongst the peasants. Following land reforms land ownership pattern has undergone transformation. In 2013-14, persons engaged in agriculture in Berhampore CD Block could be classified as follows: bargadars 4,950 (4.78%,) patta (document) holders 10,008 (9.66%), small farmers (possessing land between 1 and 2 hectares) 4,432 (4.28%), marginal farmers (possessing land up to 1 hectare) 29,946 (28.92%) and agricultural labourers 103,550 (52.36%).
Berhampore CD block had 119 fertiliser depots, 3 seed stores and 80 fair price shops in 2013-14.
In 2013-14, Berhampore CD block produced 34,732 tonnes of Aman paddy, the main winter crop from 11,654 hectares, 43,306 tonnes of Boro paddy (spring crop) from 11,293 hectares, 3,161 tonnes of Aus paddy (summer crop) from 1,093 hectares, 22,533 tonnes of wheat from 8,478 hectares, 227,638 tonnes of jute from 13,631 hectares, 4,405 tonnes of potatoes from 154 hectares and 79 tonnes of sugar cane from 1 hectare. It also produced pulses and oilseeds.
In 2013-14, the total area irrigated in Berhampore CD block was 10,249 hectares, out of which 1,120 hectares were irrigated with tank water, 1,417 hectares by river lift irrigation, 1,204 hectares by deep tube wells, 108 hectares by shallow tube well and 6,400 hectares by other means.
Silk and handicrafts
Murshidabad is famous for its silk industry since the Middle Ages. There are three distinct categories in this industry, namely (i) Mulberry cultivation and silkworm rearing (ii) Peeling of raw silk (iii) Weaving of silk fabrics.
Ivory carving is an important cottage industry from the era of the Nawabs. The main areas where this industry has flourished are Khagra and Jiaganj. 99% of ivory craft production is exported. In more recent years sandalwood etching has become more popular than ivory carving. Bell metal and Brass utensils are manufactured in large quantities at Khagra, Berhampore, Kandi and Jangipur. Beedi making has flourished in the Jangipur subdivision.
Banking
In 2013-14, Berhampore CD block had offices of 21 commercial banks and 4 gramin banks.
Backward Regions Grant Fund
Murshidabad district is listed as a backward region and receives financial support from the Backward Regions Grant Fund. The fund, created by the Government of India, is designed to redress regional imbalances in development. As of 2012, 272 districts across the country were listed under this scheme. The list includes 11 districts of West Bengal.
Transport
Berhampore CD block has 10 ferry services and 22 originating/ terminating bus routes.
The Ranaghat-Lalgola branch line was opened in 1905. It passes through this CD block and there are stations at Cossimbazar and Berhampore Court railway station.
NH 12 (old number NH 34) passes through this block.
SH 11, running from Mahammad Bazar (in Birbhum district) to Ranaghat (in Nadia district) passes through this CD Block.
Education
In 2013-14, Berhampore CD block had 192 primary schools with 19,964 students, 41 middle schools with 3,991 students, 9 high school with 8,108 students and 26 higher secondary schools with 41,349 students. Berhampore CD Block had 4 technical/ professional institutions with 1,610 students and 683 institutions for special and non-formal education with 30,926 students
In Berhampore CD block, amongst the 124 inhabited villages, 8 villages did not have a school, 67 villages had more than 1 primary school, 63 villages had at least 1 primary school, 53 villages had at least 1 primary and 1 middle school and 26 villages had at least 1 middle and 1 secondary school.
Healthcare
In 2014, Berhampore CD block had 1 block primary health centre, 2 primary health centres and 9 private nursing homes with total 35 beds and 9 doctors (excluding private bodies). It had 57 family welfare subcentres. 6,207 patients were treated indoor and 145,229 patients were treated outdoor in the hospitals, health centres and subcentres of the CD Block.
Berhampore CD block has Karnasuvarna Block Primary Health Centre at PO Karnasuvarna (with 15 beds), Chourigacha Primary Health Centre at PO Satui (with 10 beds), and Hatinagar PHC (with 10 beds).
Berhampore CD block is one of the areas of Murshidabad district where ground water is affected by high level of arsenic contamination. The WHO guideline for arsenic in drinking water is 10 mg/ litre, and the Indian Standard value is 50 mg/ litre. All but one of the 26 blocks of Murshidabad district have arsenic contamination above the WHO level, all but two of the blocks have arsenic concentration above the Indian Standard value and 17 blocks have arsenic concentration above 300 mg/litre. The maximum concentration in Berhampore CD Block is 635 mg/litre.
External links
References
Community development blocks in Murshidabad district
|
Dick Vrij is a retired Dutch professional wrestler and mixed martial artist. A professional competitor from 1995 until 2003, he competed in the Heavyweight division for RINGS and It's Showtime.
Professional wrestling career
A former bodybuilder and club bouncer, Vrij started training martial arts at the Chris Dolman gym. He had his debut to a worldwide audience when he wrestled a special match in Japanese pro wrestling promotion UWF Newborn, facing Yoshiaki Fujiwara in a losing effort. He would return to defeat Yoji Anjo and lose again to Fujiwara. When the promotion closed, Dolman and Vrij followed UWF member Akira Maeda to his Fighting Network RINGS promotion in 1990, becoming full time wrestlers for it.
Mixed martial arts career
Fighting Network RINGS
Vrij took part in RINGS's first main event, wrestling Maeda himself. He later became famous for his kickboxing strikes and intimidating physique, being nicknamed "Cyborg".
Vrij competed both in pro wrestling and shoot matches, having the first of them at the event RINGS Mega Battle IV, where he knocked out Mitsuya Nagai with a palm strike. He would defeat him in a rematch in RINGS Holland, knocking Nagai several times before winning by knee strike. They faced again in a rubber match in RINGS Maelstrom 6, but an improved Nagai capitalized on Vrij's lack of grappling skill and submitted him with a heel hook. Vrij would have another fight in Holland in 1997 against Pedro Palm, but the bout went to no contest due to Vrij landing an illegal kick while Palm was downed.
In February 1998, Vrij took on Ultimate Fighting Championship fighter Paul Varelans in a vale tudo rules match for his return to RINGS Holland. Dick fought in bad health and under heavy ephedrine medication for a foot injury gained in a wrestling match with Valentijn Overeem, but he did not back down from the event. The subsequent match was controversial, as although Dick dominated the first round with multiple unanswered combos, drawing abundant blood from Varelans's face and hitting ground and pound from the mount, the referee repeatedly pushed Vrij aside and restarted the bout instead of stopping it. At the second round, Vrij felt the effects of his health, and Varelans capitalized to land a right punch and knock him out, winning the match.
Vrij bounced back from the loss at the next Holland event, defeating another UFC alumnus in the form of Zane Frazier.
Mixed martial arts record
|-
| Win
| align=center| 7-7 (1)
| Barrington Patterson
| KO (punch)
| It's Showtime: Amsterdam Arena
|
| align=center| 2
| align=center| 1:47
| Amsterdam, Netherlands
|
|-
| Loss
| align=center| 6-7 (1)
| Chris Haseman
| Submission (rear-naked choke)
| RINGS Australia: NR 3
|
| align=center| 1
| align=center| 5:17
| Australia
|
|-
| Win
| align=center| 6-6 (1)
| Zane Frazier
| KO (punch)
| RINGS Holland: Judgement Day
|
| align=center| 1
| align=center| 2:34
| Amsterdam, Netherlands
|
|-
| Loss
| align=center| 5-6 (1)
| Wataru Sakata
| TKO
| RINGS: World Mega Battle Tournament
|
| align=center| 1
| align=center| 2:29
| Japan
|
|-
| Loss
| align=center| 5-5 (1)
| Paul Varelans
| KO (punch)
| RINGS Holland: The King of Rings
|
| align=center| 2
| align=center| 0:30
| Amsterdam, Netherlands
|
|-
| Loss
| align=center| 5-4 (1)
| Magomedkhan Gamzatkhanov
| N/A
| RINGS: Battle Dimensions Tournament 1997 Final
|
| align=center| 0
| align=center| 0:00
| Japan
|
|-
| Win
| align=center| 5-3 (1)
| Tariel Bitsadze
| Submission (rear-naked choke)
| RINGS: Mega Battle Tournament 1997 Semifinal 1
|
| align=center| 1
| align=center| 6:07
| Japan
|
|-
| Win
| align=center| 4-3 (1)
| Tony Halme
| TKO (doctor stoppage)
| RINGS: Extension Fighting 2
|
| align=center| 1
| align=center| 2:42
| Japan
|
|-
| NC
| align=center| 3-3 (1)
| Pedro Palm
| No Contest
| RINGS Holland: The Final Challenge
|
| align=center| 1
| align=center| 1:00
| Amsterdam, Netherlands
|
|-
| Loss
| align=center| 3-3
| Tsuyoshi Kosaka
| N/A
| RINGS: Battle Dimensions Tournament 1996 Opening Round
|
| align=center| 0
| align=center| 0:00
| Japan
|
|-
| Loss
| align=center| 3-2
| Mitsuya Nagai
| Submission (heel hook)
| RINGS: Maelstrom 6
|
| align=center| 1
| align=center| 6:16
| Japan
|
|-
| Win
| align=center| 3-1
| Hubert Numrich
| Submission (forearm choke)
| RINGS Holland: Kings of Martial Arts
|
| align=center| 1
| align=center| 1:48
| Amsterdam, Netherlands
|
|-
| Loss
| align=center| 2-1
| Akira Maeda
| N/A
| RINGS: Battle Dimensions Tournament 1995 Opening Round
|
| align=center| 0
| align=center| 0:00
| Japan
|
|-
| Win
| align=center| 2-0
| Mitsuya Nagai
| KO (knee)
| RINGS Holland: Free Fight
|
| align=center| 1
| align=center| 3:07
| Amsterdam, Netherlands
|
|-
| Win
| align=center| 1-0
| Tony Halme
| KO
| RINGS: Budokan Hall 1995
|
| align=center| 1
| align=center| 2:55
| Tokyo, Japan
|
See also
List of male mixed martial artists
References
External links
Dick Vrij at mixedmartialarts.com
Dick Vrij at fightmatrix.com
Dutch male mixed martial artists
Heavyweight mixed martial artists
Mixed martial artists utilizing kickboxing
Mixed martial artists utilizing wrestling
Dutch male professional wrestlers
Living people
Sportspeople from Amsterdam
1959 births
|
```rhtml
<nav class="navbar navbar-default navbar-fixed-top" >
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="../index.html#">Home</a></li>
<li><a href="../index.html#why">Why?</a></li>
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Download<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="../download.html">Download Ring 1.12</a></li>
<li><a href="../download111.html">Download Ring 1.11</a></li>
<li><a href="../download110.html">Download Ring 1.10</a></li>
<li><a href="../download19.html">Download Ring 1.9</a></li>
<li><a href="../download18.html">Download Ring 1.8</a></li>
<li><a href="../download17.html">Download Ring 1.7</a></li>
<li><a href="../download16.html">Download Ring 1.6</a></li>
<li><a href="../download154.html">Download Ring 1.5</a></li>
<li><a href="../download141.html">Download Ring 1.4</a></li>
<li><a href="../download13.html">Download Ring 1.3</a></li>
<li><a href="../download12.html">Download Ring 1.2</a></li>
<li><a href="../download11.html">Download Ring 1.1</a></li>
<li><a href="../download1.html">Download Ring 1.0</a></li>
</ul>
</li>
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Documentation<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="../doc1.13/index.html" >Ring 1.13 Documentation</a></li>
<li><a href="../doc1.12/index.html" >Ring 1.12 Documentation</a></li>
<li><a href="../doc1.11/index.html" >Ring 1.11 Documentation</a></li>
<li><a href="../doc1.10/index.html" >Ring 1.10 Documentation</a></li>
<li><a href="../doc1.9/index.html" >Ring 1.9 Documentation</a></li>
<li><a href="../doc1.8/index.html" >Ring 1.8 Documentation</a></li>
<li><a href="../doc1.7/index.html" >Ring 1.7 Documentation</a></li>
<li><a href="../doc1.6/index.html" >Ring 1.6 Documentation</a></li>
<li><a href="../doc1.5.4/index.html" >Ring 1.5 Documentation</a></li>
<li><a href="../doc1.4.1/index.html" >Ring 1.4 Documentation</a></li>
<li><a href="../doc1.3/index.html" >Ring 1.3 Documentation</a></li>
<li><a href="../doc1.2/index.html" >Ring 1.2 Documentation</a></li>
<li><a href="../doc1.1/index.html" >Ring 1.1 Documentation</a></li>
<li><a href="../doc/index.html" >Ring 1.0 Documentation</a></li>
</ul>
</li>
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">More<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="../cgi-bin/ringlang.cgi">Try Online</a></li>
<li><a href="../resources.html">Resources</a></li>
<li><a href="path_to_url" target="_blank">GitHub</a></li>
<li><a href="path_to_url#!forum/ring-lang" target="_blank">Group</a></li>
<li><a href="../team.html">Team</a></li>
</ul>
</li>
</ul>
<div style="float:right ; margin-top:0.5% ; margin-right: 1%">
<form class="search" action="../doc1.13/search.html" method="get" style="width:200px" >
<div class="input-group">
<input name="q" type="text" class="form-control" placeholder="Search for...">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">Go!</button>
</span>
</div>
<input name="check_keywords" value="yes" type="hidden">
<input name="area" value="default" type="hidden">
</form>
</div>
</div>
</nav>
<a href="path_to_url" target="_blank" class="hidden-xs" style="float:right ; margin-top:4%">
<img src="../forkme.png" alt="Fork me on GitHub" width="198" height="198">
</a>
<div class="container">
<div class="text-center">
<br><br><br> <br>
<div class="row">
<div class="col-xs-3 hidden-xs">
</div>
<div class="col-xs-6">
<img src="../theringlogo.jpg" width="297px" height="154px">
</div>
<div class="col-xs-3 hidden-xs">
</div>
</div>
<div class="row">
<br>
<div class="col-xs-2">
</div>
<div class="col-sm-12 col-md-2">
<a href="../download.html" class="btn btn-default btn-block" style="">Download</a>
</div>
<div class="col-sm-12 col-md-2">
<a href="../doc1.13/index.html" target="_blank" class="btn btn-default btn-block" style="">Documents</a>
</div>
<div class="col-sm-12 col-md-2">
<a href="../resources.html" class="btn btn-default btn-block" style="">Resources</a>
</div>
<div class="col-sm-12 col-md-2">
<a href="path_to_url#!forum/ring-lang" target="_blank" class="btn btn-default btn-block" style="">Group</a>
</div>
<div class="col-xs-2">
</div>
<br>
</div>
<h3>Innovative and practical general-purpose multi-paradigm language</h3>
</div>
<br>
</div>
```
|
```sqlpl
{% macro get_columns_in_relation(relation) %}
{{ return('a string') }}
{% endmacro %}
```
|
```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 dispatch = require( '@stdlib/strided/dispatch' );
var unary = require( '@stdlib/strided/base/unary' );
var resolve = require( '@stdlib/strided/base/dtype-resolve-enum' );
var types = require( './types.json' );
var meta = require( './meta.json' );
var data = require( './data.js' );
// VARIABLES //
var fcn = dispatch( unary, types, data, meta.nargs, meta.nin, meta.nout );
// MAIN //
/**
* Computes the principal square root for each element in a strided array `x` and assigns the results to elements in a strided array `y`.
*
* @param {integer} N - number of indexed elements
* @param {*} dtypeX - `x` data type
* @param {Collection} x - input array
* @param {integer} strideX - `x` stride length
* @param {*} dtypeY - `y` data type
* @param {Collection} y - destination array
* @param {integer} strideY - `y` stride length
* @throws {TypeError} first argument must be an integer
* @throws {TypeError} third argument must be an array-like object
* @throws {TypeError} fourth argument must be an integer
* @throws {TypeError} sixth argument must be an array-like object
* @throws {TypeError} seventh argument must be an integer
* @throws {Error} insufficient arguments
* @throws {Error} too many arguments
* @throws {RangeError} third argument has insufficient elements based on the associated stride and the number of indexed elements
* @throws {RangeError} sixth argument has insufficient elements based on the associated stride and the number of indexed elements
* @throws {TypeError} unable to resolve a strided array function supporting the provided array argument data types
* @returns {Collection} `y`
*
* @example
* var Float64Array = require( '@stdlib/array/float64' );
*
* var x = new Float64Array( [ 0.0, 4.0, 9.0, 12.0, 24.0 ] );
* var y = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );
*
* sqrt( x.length, 'float64', x, 1, 'float64', y, 1 );
* // y => <Float64Array>[ 0.0, 2.0, 3.0, ~3.464, ~4.899 ]
*/
function sqrt( N, dtypeX, x, strideX, dtypeY, y, strideY ) {
return fcn( N, resolve( dtypeX ), x, strideX, resolve( dtypeY ), y, strideY ); // eslint-disable-line max-len
}
// EXPORTS //
module.exports = sqrt;
```
|
```kotlin
/*
*
*
* 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 examples.kotlin.mybatis3.joins
import org.mybatis.dynamic.sql.AliasableSqlTable
import org.mybatis.dynamic.sql.util.kotlin.elements.column
import java.sql.JDBCType
object UserDynamicSQLSupport {
val user = User()
val userId = user.userId
val userName = user.userName
val parentId = user.parentId
class User : AliasableSqlTable<User>("User", ::User) {
val userId = column<Int>(name = "user_id", jdbcType = JDBCType.INTEGER)
val userName = column<String>(name = "user_name", jdbcType = JDBCType.VARCHAR)
val parentId = column<Int>(name = "parent_id", jdbcType = JDBCType.INTEGER)
}
}
```
|
```php
<?php
namespace Elementor\Modules\AtomicWidgets\Widgets;
use Elementor\Modules\AtomicWidgets\Schema\Constraints\Enum;
use Elementor\Utils;
use Elementor\Modules\AtomicWidgets\Controls\Section;
use Elementor\Modules\AtomicWidgets\Controls\Types\Select_Control;
use Elementor\Modules\AtomicWidgets\Base\Atomic_Widget_Base;
use Elementor\Modules\AtomicWidgets\Schema\Atomic_Prop;
use Elementor\Modules\AtomicWidgets\Controls\Types\Image_Control;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Atomic_Image extends Atomic_Widget_Base {
public function get_icon() {
return 'eicon-image';
}
public function get_title() {
return esc_html__( 'Atomic Image', 'elementor' );
}
public function get_name() {
return 'a-image';
}
protected function render() {
$settings = $this->get_atomic_settings();
$image_url = $settings['image'];
?> <img
src='<?php echo esc_url( $image_url ); ?>'
alt='Atomic Image'
/>
<?php
}
private static function get_image_size_options() {
$wp_image_sizes = self::get_wp_image_sizes();
$image_sizes = [];
foreach ( $wp_image_sizes as $size_key => $size_attributes ) {
$control_title = ucwords( str_replace( '_', ' ', $size_key ) );
if ( is_array( $size_attributes ) ) {
$control_title .= sprintf( ' - %d*%d', $size_attributes['width'], $size_attributes['height'] );
}
$image_sizes[] = [
'label' => $control_title,
'value' => $size_key,
];
}
$image_sizes[] = [
'label' => esc_html__( 'Full', 'elementor' ),
'value' => 'full',
];
return $image_sizes;
}
private static function get_wp_image_sizes() {
$default_image_sizes = get_intermediate_image_sizes();
$additional_sizes = wp_get_additional_image_sizes();
$image_sizes = [];
foreach ( $default_image_sizes as $size ) {
$image_sizes[ $size ] = [
'width' => (int) get_option( $size . '_size_w' ),
'height' => (int) get_option( $size . '_size_h' ),
'crop' => (bool) get_option( $size . '_crop' ),
];
}
if ( $additional_sizes ) {
$image_sizes = array_merge( $image_sizes, $additional_sizes );
}
// /** This filter is documented in wp-admin/includes/media.php */
return apply_filters( 'image_size_names_choose', $image_sizes );
}
protected function define_atomic_controls(): array {
$image_control = Image_Control::bind_to( 'image' );
$options = static::get_image_size_options();
$resolution_control = Select_Control::bind_to( 'image_size' )
->set_label( esc_html__( 'Image Resolution', 'elementor' ) )
->set_options( $options );
$content_section = Section::make()
->set_label( esc_html__( 'Content', 'elementor' ) )
->set_items( [
$image_control,
$resolution_control,
]);
return [
$content_section,
];
}
protected static function define_props_schema(): array {
$image_sizes = array_map(
fn( $size ) => $size['value'],
static::get_image_size_options()
);
return [
'image' => Atomic_Prop::make()
->type( 'image' )
->default( [
'url' => Utils::get_placeholder_image_src(),
] ),
'image_size' => Atomic_Prop::make()
->string()
->constraints( [
Enum::make( $image_sizes ),
] )
->default( 'full' ),
];
}
}
```
|
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `update_partition_map` fn in crate `mentat_db`.">
<meta name="keywords" content="rust, rustlang, rust-lang, update_partition_map">
<title>mentat_db::db::update_partition_map - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css"
id="mainThemeStyle">
<link rel="stylesheet" type="text/css" href="../../dark.css">
<link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle">
<script src="../../storage.js"></script>
</head>
<body class="rustdoc fn">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">☰</div>
<div class="sidebar-elems"><p class='location'><a href='../index.html'>mentat_db</a>::<wbr><a href='index.html'>db</a></p><script>window.sidebarCurrent = {name: 'update_partition_map', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
</nav>
<div class="theme-picker">
<button id="theme-picker" aria-label="Pick another theme!">
<img src="../../brush.svg" width="18" alt="Pick another theme!">
</button>
<div id="theme-choices"></div>
</div>
<script src="../../theme.js"></script>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options"
type="search">
</div>
</form>
</nav>
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Function <a href='../index.html'>mentat_db</a>::<wbr><a href='index.html'>db</a>::<wbr><a class="fn" href=''>update_partition_map</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>−</span>]
</a>
</span><a class='srclink' href='../../src/mentat_db/db.rs.html#973-996' title='goto source code'>[src]</a></span></h1><pre class='rust fn'>pub fn update_partition_map(<br> conn: &Connection, <br> partition_map: &<a class="type" href="../../mentat_db/types/type.PartitionMap.html" title="type mentat_db::types::PartitionMap">PartitionMap</a><br>) -> <a class="type" href="../../mentat_db/errors/type.Result.html" title="type mentat_db::errors::Result">Result</a><<a class="primitive" href="path_to_url">()</a>></pre><div class='docblock'><p>Update the current partition map materialized view.</p>
</div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
<dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
<dt><kbd></kbd></dt>
<dd>Move up in search results</dd>
<dt><kbd></kbd></dt>
<dd>Move down in search results</dd>
<dt><kbd></kbd></dt>
<dd>Switch tab</dd>
<dt><kbd>⏎</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "mentat_db";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>
```
|
Peter Arthur Brideoake (23 April 1945 - 4 February 2022) was an Australian musician, composer, singer, songwriter and lecturer. He gained national success in the 1960s as a member of the Twilights, for which he played guitar and wrote songs. The Twilights had eight consecutive national hit singles including "Needle in a Haystack" and "What's Wrong with the Way I Live". After the Twilights, Brideoake formally studied music and established himself as a multi-talented musician, composer and university lecturer.
Brideoake, as a member of the Twilights, was inducted into the South Australian Music Hall of Fame on 10 April 2015.
Career
Peter Brideoake was born and educated in Adelaide, South Australia, on 23 April 1945. His musical career began as a rhythm guitarist and vocalist in popular Australian pop group the Twilights (1964 - 1969). At times, Brideoake co-wrote with Terry Britten and Glenn Shorrock. The Twilights officially broke up in 1969, but have played reunion or special concerts in 2000, 2002, 2011 and 2015.
In 1969, Brideoake commenced studies in music composition at the University of Adelaide. Following his graduation with a Bachelor of Music (Hons) he began teaching harmony and modern composition techniques. From 1975, he was a career lecturer at the Elder Conservatorium of Music in Adelaide.
After several periods of study in China, Brideoake became a proficient performer on the ancient Chinese zither (ch'in or guqin) instrument. In 1978, he was awarded the John Bishop Memorial Commission; other commissioned works have been composed for the Sydney String Quartet, the Australian Chamber Orchestra, the Seymour Group, the Victorian String Quartet and, more recently, by percussionist Ryszard Pusz.
The Twilights
The musical career of Brideoake began in Adelaide, South Australia, as a rhythm guitarist and vocalist in the popular Australian pop group the Twilights (1964 - 1969) which reached the peak of their success in 1966. The Twilights consisted of Frank Barnard (drums 1964–65), Brideoake (rhythm guitar, vocals), Terry Britten (lead guitar, vocals), John Bywaters (bass, vocals), Clem "Paddy" McCartney (lead vocals), Laurie Pryor (drums 1965–69) and Glenn Shorrock (lead vocals). The Twilights earned acclaim for their body of recorded work, coupled with their status as arguably the most polished and accomplished Australian live act of the era.
Twilight' discography
June 1965* "I'll Be Where You Are" / *"I Don't Know Where The Wind Will Blow Me" (Columbia Records DO-4582)
Oct 1965* "Come On Home" / *"Wanted To Sell" (Columbia DO-4610)
Feb 1966* "If She Finds Out" / *"John Hardy" (Columbia DO-4658)
May 1966 "Baby Let Me Take You Home" / "You've Really Got A Hold On Me" (Columbia DO-4685)
June 1966 "Bad Boy" / "It's Dark" (Columbia DO-4698)
Aug. 1966 "Needle in a Haystack" / "I Won't Be The Same Without Her" (Columbia DO-4717)
Dec. 1966 "You Got Soul" / "Yes I Will" (Columbia DO-4742)
Feb 1967** "What's Wrong With The Way I Live" / "**9.50" (Columbia DO-4764)
May 1967** "Young Girl" / "Time & Motion Study Man" (Columbia DO-4787)
1967 "Bowling Brings Out The Swinger In You" / "instr. version" (EMI Custom PRS 1736 – promo only)
Nov 1967 "Cathy Come Home" / "The Way They Play" (Columbia DO-5030)
May 1968 "Always" / "What A Silly Thing To Do" (Columbia DO-8361)
Aug 1968 "Tell Me Goodbye" / "Comin' On Down" (Columbia DO 8448)
Nov 1968 "Sand In The Sandwiches" *** / "Lotus" *** (Columbia DO-8602)
Singles produced by: David Mackay (producer)
Engineers: Roger Savage and David Page
Studios: Armstrong's Melbourne; AWA and EMI Sydney except:
First three singles self-produced in Adelaide *
Produced by Norman Smith at Abbey Road Studios London **
Produced by Howard Gable at Armstrong's Studios Melbourne ***
Supergroup project
Pastoral Symphony, a "supergroup" project, issued a one-time studio release which was executive-produced by Jimmy Stewart and produced by Geoffrey Edelsten. A substantial hit upon its initial release, it was re-released in a barely noticeable US remix form in 1977. Pastoral Symphony comprised the full Twilights lineup augmented by Terry Walker (The Strangers) on lead vocals, Ronnie Charles (The Groop) doing backup vocals; and the Johnny Hawker Orchestra.
After the Twilights peak period (1964-1969), which included many recordings and performances (stage and television) around Australia, in New Zealand and the United Kingdom, the group disbanded and Brideoake returned to Adelaide in 1969.
Beatles tribute concert
The Twilights reunited for a special Beatles tribute concert in Adelaide in 2000.
"Long Way To The Top" concert tour
The Twilights reformed again for the hugely successful "Long Way To The Top" Australian concert tour in 2002.
"Rock of Ages" concert
The surviving Twilights reunited for the all-star "Rock of Ages" concert promoted by Aztec Music at the Palais Theatre in St Kilda, Melbourne, in 2011.
"Yesterday's Heroes" show
Brideoake and two other original members of the Twilights (John Bywaters and Paddy McCartney) were joined by guest singer / guitarist Peter Tilbrook (Masters Apprentices) to perform "Needle In A Haystack" at "Yesterday's Heroes", a various artists' show promoted by the Adelaide Music Collective in the Mortlock Chamber of the State Library on 9 February 2015 to coincide with a collection of Adelaide music memorabilia at the library.
Education
Elder Conservatorium
After the Twilights main period (1964-1969), the band broke up and Brideoake returned to Adelaide. In 1969, he began studies in composition with Richard Meale at the Elder Conservatorium of Music at the University of Adelaide. Following his graduation with a Bachelor of Music (Hons) he began teaching harmony and modern composition techniques at the conservatorium.
Academia
From 1975, Brideoake was a career lecturer at the Elder Conservatorium of Music in Adelaide for the next 27 years. As well as teaching in composition studies, he introduced a course in Chinese music as the result of an interest in the music, theatre and language of China. A special interest in an ancient Chinese zither (ch'in or guqin) meant that after several periods of study in China, he became a proficient performer on this instrument. In 1978, he was awarded the John Bishop Memorial Commission; other commissioned works have been composed for the Sydney String Quartet, the Australian Chamber Orchestra, the Seymour Group, the Victorian String Quartet and, more recently, by percussionist Ryszard Pusz.
Music compositions
Sonata for Flute and Piano (1969)
Solo for 'Cello (1970)
Music for Orchestra (1970)
Composition for winds (1971)
Gedatsu - solo guitar (1972)
Music for Flute and Two Percussionists (1972)
Chiaroscuro (1978)
String Quartet No. 1 (1980)
Interplay - two clarinets and harp (1981)
Imager - string orchestra (1981)
Shifting Reflections - chamber ensemble (1982)
String Quartet No.2 (1986)
Canto for Clarinet Alone (1987)
Dialogue for Two - clarinet and percussion (1987)
A Poet's Lament - soprano and piano (1988)
Songwriting
Brideoake co-wrote some songs with Terry Britten and Glenn Shorrock during the Twilights era. In 2015, Peter Brideoake co-wrote " Situation Not Normal", a song based on the kidnap for ransom of fellow Australian Warren Rodwell.
Personal life
Brideoake lived in Chengdu, Sichuan Province, in south west China from 2002 to 2009 before returning to his hometown of Adelaide. His death notice lists him as having two sisters and two sons.
References
External links
National Library of Australia
1945 births
2022 deaths
Australian soft rock musicians
Musicians from Adelaide
The Twilights members
20th-century Australian male singers
21st-century Australian male singers
Australian male singer-songwriters
Australian singer-songwriters
|
```javascript
import React from 'react';
import SvgIcon from '../../SvgIcon';
const ActionViewList = (props) => (
<SvgIcon {...props}>
<path d="M4 14h4v-4H4v4zm0 5h4v-4H4v4zM4 9h4V5H4v4zm5 5h12v-4H9v4zm0 5h12v-4H9v4zM9 5v4h12V5H9z"/>
</SvgIcon>
);
ActionViewList.displayName = 'ActionViewList';
ActionViewList.muiName = 'SvgIcon';
export default ActionViewList;
```
|
Sylvan H. Gotshal (March 21, 1897 – August 11, 1968) was an American lawyer, known for his advocacy of industrial design rights. He was a founding partner of Weil, Gotshal & Manges in 1931.
Born in Memphis, Tennessee, to Leopold and Julia (née Hirschman) Gotshal (initially Gottschall), he attended Vanderbilt University and graduated with a Bachelor of Arts degree in 1917. During World War I, he volunteered to serve in the United States Army but saw no combat action. He then earned a LL.B. from Columbia Law School in 1920, and started practicing at Rose & Paskus in New York City.
Together with Frank Weil and Horace Manges he founded Weil, Gotshal & Manges in 1931, which is the 25th largest law firm in the world by revenue. He also became very active in civic affairs and was, at one time, chairman of the American Arbitration Association and the United Jewish Appeal.
He married Violet Kleeman of Nashville in 1918. They had one daughter, Sue Ann Gotshal, who married John L. Weinberg in 1952.
References
1897 births
1968 deaths
Lawyers from Memphis, Tennessee
20th-century American lawyers
Jewish American military personnel
Vanderbilt University alumni
Columbia Law School alumni
Proskauer Rose people
|
David Papineau (; born 1947) is a British academic philosopher, born in Como, Italy. He works as Professor of Philosophy of Science at King's College London and the City University of New York Graduate Center, and previously taught for several years at Cambridge University, where he was a fellow of Robinson College.
Biography
Papineau received a BSc in mathematics from the University of Natal and a BA and PhD in philosophy from the University of Cambridge under the supervision of Ian Hacking.
He has worked in metaphysics, epistemology, and the philosophies of science, mind, and mathematics. His overall stance is naturalist and realist. He is one of the originators of the teleosemantic theory of mental representation, a solution to the problem of intentionality which derives the intentional content of our beliefs from their biological purpose. He is also a defender of the a posteriori physicalist solution to the mind–body problem.
Papineau was elected president of the British Society for the Philosophy of Science for 1993–1995, of the Mind Association for 2009–2010, and of the Aristotelian Society for 2013–2014.
His book Knowing the Score (2017) is written for a general readership and looks at a number of ways in which sporting issues cast light on long-standing philosophical problems.
Papineau lives in London with his wife, Rose Wild.
Publications
For Science in the Social Sciences (1978)
Theory and Meaning (1979)
Reality and Representation (1987)
Philosophical Naturalism (1993)
Introducing Consciousness (2000)
Thinking about Consciousness (2002)
The Roots of Reason: Philosophical Essays on Rationality, Evolution and Probability (2003)
Philosophical Devices (2012)
Knowing the Score (2017)
The Metaphysics of Sensory Experience (2021)
References
External links
Podcast interview with David Papineau on Physicalism on Philosophy Bites
University of Natal alumni
20th-century Italian philosophers
20th-century British philosophers
1947 births
Living people
Philosophers of mind
Philosophers of science
Fellows of Robinson College, Cambridge
Academics of King's College London
Alumni of the University of Cambridge
People from Como
|
```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 resolve = require( 'path' ).resolve;
var tape = require( 'tape' );
var tryRequire = require( '@stdlib/utils/try-require' );
var floor = require( '@stdlib/math/base/special/floor' );
var uniform = require( '@stdlib/random/base/uniform' ).factory;
var abs2 = require( '@stdlib/math/base/special/abs2' );
var filledarray = require( '@stdlib/array/filled' );
var Float64Array = require( '@stdlib/array/float64' );
var Uint8Array = require( '@stdlib/array/uint8' );
var resolveEnum = require( '@stdlib/strided/base/dtype-resolve-enum' );
var enum2str = require( '@stdlib/strided/base/dtype-enum2str' );
var types = require( './../lib/types.json' );
var data = require( './../lib/data.js' );
// VARIABLES //
var strided = tryRequire( resolve( __dirname, './../lib/abs2.native.js' ) );
var opts = {
'skip': ( strided instanceof Error )
};
var rand = uniform( 0.0, 10.0 );
// TESTS //
tape( 'main export is a function', opts, function test( t ) {
t.ok( true, __filename );
t.strictEqual( typeof strided, 'function', 'main export is a function' );
t.end();
});
tape( 'the function has an arity of 7', opts, function test( t ) {
t.strictEqual( strided.length, 7, 'arity of 7' );
t.end();
});
tape( 'the function throws an error if provided a first argument which is not an integer', opts, function test( t ) {
var values;
var i;
values = [
'5',
3.14,
NaN,
true,
false,
null,
void 0,
[],
{},
function noop() {}
];
for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();
function badValue( value ) {
return function badValue() {
var x = new Float64Array( 10 );
var y = new Float64Array( x.length );
strided( value, 'float64', x, 1, 'float64', y, 1 );
};
}
});
tape( 'the function throws an error if provided a second argument which is not a supported dtype', opts, function test( t ) {
var values;
var i;
values = [
3.14,
NaN,
true,
false,
null,
void 0,
[],
{},
function noop() {}
];
for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();
function badValue( value ) {
return function badValue() {
var x = new Float64Array( 10 );
var y = new Float64Array( x.length );
strided( x.length, value, x, 1, 'float64', y, 1 );
};
}
});
tape( 'the function throws an error if provided a third argument which is not an array-like object', opts, function test( t ) {
var values;
var i;
values = [
'5',
3.14,
NaN,
true,
false,
null,
void 0,
{},
function noop() {}
];
for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();
function badValue( value ) {
return function badValue() {
var x = new Float64Array( 10 );
var y = new Float64Array( x.length );
strided( x.length, 'float64', value, 1, 'float64', y, 1 );
};
}
});
tape( 'the function throws an error if provided a fourth argument which is not an integer', opts, function test( t ) {
var values;
var i;
values = [
'5',
3.14,
NaN,
true,
false,
null,
void 0,
[],
{},
function noop() {}
];
for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();
function badValue( value ) {
return function badValue() {
var x = new Float64Array( 10 );
var y = new Float64Array( x.length );
strided( x.length, 'float64', x, value, 'float64', y, 1 );
};
}
});
tape( 'the function throws an error if provided a fifth argument which is not a supported dtype', opts, function test( t ) {
var values;
var i;
values = [
3.14,
NaN,
true,
false,
null,
void 0,
[],
{},
function noop() {}
];
for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();
function badValue( value ) {
return function badValue() {
var x = new Float64Array( 10 );
var y = new Float64Array( x.length );
strided( x.length, 'float64', x, 1, value, y, 1 );
};
}
});
tape( 'the function throws an error if provided a sixth argument which is not an array-like object', opts, function test( t ) {
var values;
var i;
values = [
'5',
3.14,
NaN,
true,
false,
null,
void 0,
{},
function noop() {}
];
for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();
function badValue( value ) {
return function badValue() {
var x = new Float64Array( 10 );
var y = new Float64Array( x.length );
strided( y.length, 'float64', x, 1, 'float64', value, 1 );
};
}
});
tape( 'the function throws an error if provided a seventh argument which is not an integer', opts, function test( t ) {
var values;
var i;
values = [
'5',
3.14,
NaN,
true,
false,
null,
void 0,
[],
{},
function noop() {}
];
for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();
function badValue( value ) {
return function badValue() {
var x = new Float64Array( 10 );
var y = new Float64Array( x.length );
strided( x.length, 'float64', x, 1, 'float64', y, value );
};
}
});
tape( 'the function throws an error if provided a third argument which has insufficient elements', opts, function test( t ) {
var values;
var i;
values = [
new Float64Array( [] ),
new Float64Array( [ rand() ] ),
new Float64Array( [ rand(), rand() ] ),
new Float64Array( [ rand(), rand(), rand() ] )
];
for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided '+values[ i ] );
}
t.end();
function badValue( value ) {
return function badValue() {
var y = new Float64Array( 10 );
strided( y.length, 'float64', value, 1, 'float64', y, 1 );
};
}
});
tape( 'the function throws an error if provided a sixth argument which has insufficient elements', opts, function test( t ) {
var values;
var i;
values = [
new Float64Array( [] ),
new Float64Array( [ rand() ] ),
new Float64Array( [ rand(), rand() ] ),
new Float64Array( [ rand(), rand(), rand() ] )
];
for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided '+values[ i ] );
}
t.end();
function badValue( value ) {
return function badValue() {
var x = new Float64Array( 10 );
strided( x.length, 'float64', x, 1, 'float64', value, 1 );
};
}
});
tape( 'the function throws an error if provided insufficient arguments', opts, function test( t ) {
t.throws( foo, Error, 'throws an error' );
t.end();
function foo() {
strided();
}
});
tape( 'the function throws an error if provided too many arguments', opts, function test( t ) {
t.throws( foo, Error, 'throws an error' );
t.end();
function foo() {
var x = new Float64Array( 10 );
var y = new Float64Array( x.length );
strided( x.length, 'float64', x, 1, 0, 'float64', y, 1, 0 );
}
});
tape( 'the function throws an error if provided unsupported array data types', opts, function test( t ) {
t.throws( foo, TypeError, 'throws an error' );
t.end();
function foo() {
var x = new Float64Array( 10 );
var y = new Uint8Array( x.length );
strided( x.length, 'float64', x, 1, 'uint8', y, 1 );
}
});
tape( 'the function computes the squared absolute value for each element', opts, function test( t ) {
var expected;
var len;
var t1;
var t2;
var x;
var y;
var i;
var j;
len = 10;
for ( i = 0; i < types.length; i += 2 ) {
t1 = enum2str( resolveEnum( types[ i ] ) );
t2 = enum2str( resolveEnum( types[ i+1 ] ) );
x = filledarray( 0.0, len, t1 );
y = filledarray( 0.0, len, t2 );
for ( j = 0; j < len; j++ ) {
x[ j ] = rand();
}
strided( len, t1, x, 1, t2, y, 1 );
for ( j = 0; j < len; j++ ) {
expected = data[ i/2 ]( x[ j ] );
t.strictEqual( y[ j ], expected, 'returns expected value. x: '+x[j]+'. expected: '+expected+'. actual: '+y[j]+'. dtypes: '+t1+','+t2+'.' );
}
}
t.end();
});
tape( 'the function supports an `x` stride', opts, function test( t ) {
var expected;
var x;
var y;
var N;
x = new Float64Array([
rand(), // 0
rand(),
rand(), // 1
rand(),
rand() // 2
]);
y = new Float64Array([
0.0, // 0
0.0, // 1
0.0, // 2
0.0,
0.0
]);
N = 3;
strided( N, 'float64', x, 2, 'float64', y, 1 );
expected = new Float64Array([
abs2( x[ 0 ] ),
abs2( x[ 2 ] ),
abs2( x[ 4 ] ),
0.0,
0.0
]);
t.deepEqual( y, expected, 'deep equal' );
t.end();
});
tape( 'the function supports a `y` stride', opts, function test( t ) {
var expected;
var x;
var y;
var N;
x = new Float64Array([
rand(), // 0
rand(), // 1
rand(), // 2
rand(),
rand()
]);
y = new Float64Array([
0.0, // 0
0.0,
0.0, // 1
0.0,
0.0 // 2
]);
N = 3;
strided( N, 'float64', x, 1, 'float64', y, 2 );
expected = new Float64Array([
abs2( x[ 0 ] ),
0.0,
abs2( x[ 1 ] ),
0.0,
abs2( x[ 2 ] )
]);
t.deepEqual( y, expected, 'deep equal' );
t.end();
});
tape( 'the function returns a reference to the destination array', opts, function test( t ) {
var out;
var x;
var y;
x = new Float64Array( 5 );
y = new Float64Array( x.length );
out = strided( x.length, 'float64', x, 1, 'float64', y, 1 );
t.strictEqual( out, y, 'same reference' );
t.end();
});
tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `y` unchanged', opts, function test( t ) {
var expected;
var x;
var y;
x = new Float64Array( [ rand(), rand(), rand(), rand(), rand() ] );
y = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );
expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );
strided( -1, 'float64', x, 1, 'float64', y, 1 );
t.deepEqual( y, expected, 'returns `y` unchanged' );
strided( 0, 'float64', x, 1, 'float64', y, 1 );
t.deepEqual( y, expected, 'returns `y` unchanged' );
t.end();
});
tape( 'the function supports negative strides', opts, function test( t ) {
var expected;
var x;
var y;
var N;
x = new Float64Array([
rand(), // 2
rand(),
rand(), // 1
rand(),
rand() // 0
]);
y = new Float64Array([
0.0, // 2
0.0, // 1
0.0, // 0
0.0,
0.0
]);
N = 3;
strided( N, 'float64', x, -2, 'float64', y, -1 );
expected = new Float64Array([
abs2( x[ 0 ] ),
abs2( x[ 2 ] ),
abs2( x[ 4 ] ),
0.0,
0.0
]);
t.deepEqual( y, expected, 'deep equal' );
t.end();
});
tape( 'the function supports complex access patterns', opts, function test( t ) {
var expected;
var x;
var y;
var N;
x = new Float64Array([
rand(), // 0
rand(),
rand(), // 1
rand(),
rand(), // 2
rand()
]);
y = new Float64Array([
0.0, // 2
0.0, // 1
0.0, // 0
0.0,
0.0,
0.0
]);
N = 3;
strided( N, 'float64', x, 2, 'float64', y, -1 );
expected = new Float64Array([
abs2( x[ 4 ] ),
abs2( x[ 2 ] ),
abs2( x[ 0 ] ),
0.0,
0.0,
0.0
]);
t.deepEqual( y, expected, 'deep equal' );
t.end();
});
tape( 'the function supports view offsets', opts, function test( t ) {
var expected;
var x0;
var y0;
var x1;
var y1;
var N;
// Initial arrays...
x0 = new Float64Array([
rand(),
rand(), // 2
rand(),
rand(), // 1
rand(),
rand() // 0
]);
y0 = new Float64Array([
0.0,
0.0,
0.0,
0.0, // 0
0.0, // 1
0.0 // 2
]);
// Create offset views...
x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // begin at 2nd element
y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*3 ); // begin at the 4th element
N = floor( x0.length / 2 );
strided( N, 'float64', x1, -2, 'float64', y1, 1 );
expected = new Float64Array([
0.0,
0.0,
0.0,
abs2( x0[ 5 ] ),
abs2( x0[ 3 ] ),
abs2( x0[ 1 ] )
]);
t.deepEqual( y0, expected, 'deep equal' );
t.end();
});
tape( 'the function supports array-like objects', opts, function test( t ) {
var expected;
var x;
var y;
var N;
x = {
'length': 5,
'0': rand(), // 0
'1': rand(),
'2': rand(), // 1
'3': rand(),
'4': rand() // 2
};
y = {
'length': 5,
'0': 0.0, // 0
'1': 0.0, // 1
'2': 0.0, // 2
'3': 0.0,
'4': 0.0
};
N = 3;
strided( N, 'generic', x, 2, 'generic', y, 1 );
expected = {
'length': 5,
'0': abs2( x[ 0 ] ),
'1': abs2( x[ 2 ] ),
'2': abs2( x[ 4 ] ),
'3': 0.0,
'4': 0.0
};
t.deepEqual( y, expected, 'deep equal' );
t.end();
});
```
|
```python
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/image_resizer.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='object_detection/protos/image_resizer.proto',
package='object_detection.protos',
serialized_pb=_b('\n+object_detection/protos/image_resizer.proto\x12\x17object_detection.protos\"\xc6\x01\n\x0cImageResizer\x12T\n\x19keep_aspect_ratio_resizer\x18\x01 \x01(\x0b\x32/.object_detection.protos.KeepAspectRatioResizerH\x00\x12I\n\x13\x66ixed_shape_resizer\x18\x02 \x01(\x0b\x32*.object_detection.protos.FixedShapeResizerH\x00\x42\x15\n\x13image_resizer_oneof\"\x97\x01\n\x16KeepAspectRatioResizer\x12\x1a\n\rmin_dimension\x18\x01 \x01(\x05:\x03\x36\x30\x30\x12\x1b\n\rmax_dimension\x18\x02 \x01(\x05:\x04\x31\x30\x32\x34\x12\x44\n\rresize_method\x18\x03 \x01(\x0e\x32#.object_detection.protos.ResizeType:\x08\x42ILINEAR\"\x82\x01\n\x11\x46ixedShapeResizer\x12\x13\n\x06height\x18\x01 \x01(\x05:\x03\x33\x30\x30\x12\x12\n\x05width\x18\x02 \x01(\x05:\x03\x33\x30\x30\x12\x44\n\rresize_method\x18\x03 \x01(\x0e\x32#.object_detection.protos.ResizeType:\x08\x42ILINEAR*G\n\nResizeType\x12\x0c\n\x08\x42ILINEAR\x10\x00\x12\x14\n\x10NEAREST_NEIGHBOR\x10\x01\x12\x0b\n\x07\x42ICUBIC\x10\x02\x12\x08\n\x04\x41REA\x10\x03')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_RESIZETYPE = _descriptor.EnumDescriptor(
name='ResizeType',
full_name='object_detection.protos.ResizeType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='BILINEAR', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='NEAREST_NEIGHBOR', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='BICUBIC', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='AREA', index=3, number=3,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=560,
serialized_end=631,
)
_sym_db.RegisterEnumDescriptor(_RESIZETYPE)
ResizeType = enum_type_wrapper.EnumTypeWrapper(_RESIZETYPE)
BILINEAR = 0
NEAREST_NEIGHBOR = 1
BICUBIC = 2
AREA = 3
_IMAGERESIZER = _descriptor.Descriptor(
name='ImageResizer',
full_name='object_detection.protos.ImageResizer',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='keep_aspect_ratio_resizer', full_name='object_detection.protos.ImageResizer.keep_aspect_ratio_resizer', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='fixed_shape_resizer', full_name='object_detection.protos.ImageResizer.fixed_shape_resizer', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='image_resizer_oneof', full_name='object_detection.protos.ImageResizer.image_resizer_oneof',
index=0, containing_type=None, fields=[]),
],
serialized_start=73,
serialized_end=271,
)
_KEEPASPECTRATIORESIZER = _descriptor.Descriptor(
name='KeepAspectRatioResizer',
full_name='object_detection.protos.KeepAspectRatioResizer',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='min_dimension', full_name='object_detection.protos.KeepAspectRatioResizer.min_dimension', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=600,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='max_dimension', full_name='object_detection.protos.KeepAspectRatioResizer.max_dimension', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=1024,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='resize_method', full_name='object_detection.protos.KeepAspectRatioResizer.resize_method', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
oneofs=[
],
serialized_start=274,
serialized_end=425,
)
_FIXEDSHAPERESIZER = _descriptor.Descriptor(
name='FixedShapeResizer',
full_name='object_detection.protos.FixedShapeResizer',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='height', full_name='object_detection.protos.FixedShapeResizer.height', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=300,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='width', full_name='object_detection.protos.FixedShapeResizer.width', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=300,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='resize_method', full_name='object_detection.protos.FixedShapeResizer.resize_method', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
oneofs=[
],
serialized_start=428,
serialized_end=558,
)
_IMAGERESIZER.fields_by_name['keep_aspect_ratio_resizer'].message_type = _KEEPASPECTRATIORESIZER
_IMAGERESIZER.fields_by_name['fixed_shape_resizer'].message_type = _FIXEDSHAPERESIZER
_IMAGERESIZER.oneofs_by_name['image_resizer_oneof'].fields.append(
_IMAGERESIZER.fields_by_name['keep_aspect_ratio_resizer'])
_IMAGERESIZER.fields_by_name['keep_aspect_ratio_resizer'].containing_oneof = _IMAGERESIZER.oneofs_by_name['image_resizer_oneof']
_IMAGERESIZER.oneofs_by_name['image_resizer_oneof'].fields.append(
_IMAGERESIZER.fields_by_name['fixed_shape_resizer'])
_IMAGERESIZER.fields_by_name['fixed_shape_resizer'].containing_oneof = _IMAGERESIZER.oneofs_by_name['image_resizer_oneof']
_KEEPASPECTRATIORESIZER.fields_by_name['resize_method'].enum_type = _RESIZETYPE
_FIXEDSHAPERESIZER.fields_by_name['resize_method'].enum_type = _RESIZETYPE
DESCRIPTOR.message_types_by_name['ImageResizer'] = _IMAGERESIZER
DESCRIPTOR.message_types_by_name['KeepAspectRatioResizer'] = _KEEPASPECTRATIORESIZER
DESCRIPTOR.message_types_by_name['FixedShapeResizer'] = _FIXEDSHAPERESIZER
DESCRIPTOR.enum_types_by_name['ResizeType'] = _RESIZETYPE
ImageResizer = _reflection.GeneratedProtocolMessageType('ImageResizer', (_message.Message,), dict(
DESCRIPTOR = _IMAGERESIZER,
__module__ = 'object_detection.protos.image_resizer_pb2'
# @@protoc_insertion_point(class_scope:object_detection.protos.ImageResizer)
))
_sym_db.RegisterMessage(ImageResizer)
KeepAspectRatioResizer = _reflection.GeneratedProtocolMessageType('KeepAspectRatioResizer', (_message.Message,), dict(
DESCRIPTOR = _KEEPASPECTRATIORESIZER,
__module__ = 'object_detection.protos.image_resizer_pb2'
# @@protoc_insertion_point(class_scope:object_detection.protos.KeepAspectRatioResizer)
))
_sym_db.RegisterMessage(KeepAspectRatioResizer)
FixedShapeResizer = _reflection.GeneratedProtocolMessageType('FixedShapeResizer', (_message.Message,), dict(
DESCRIPTOR = _FIXEDSHAPERESIZER,
__module__ = 'object_detection.protos.image_resizer_pb2'
# @@protoc_insertion_point(class_scope:object_detection.protos.FixedShapeResizer)
))
_sym_db.RegisterMessage(FixedShapeResizer)
# @@protoc_insertion_point(module_scope)
```
|
```java
package com.example;
import akka.NotUsed;
import akka.actor.typed.ActorRef;
import akka.actor.typed.Behavior;
import akka.http.javadsl.ConnectHttp;
import akka.http.javadsl.Http;
import akka.http.javadsl.ServerBinding;
import akka.http.javadsl.model.HttpRequest;
import akka.http.javadsl.model.HttpResponse;
import akka.http.javadsl.server.Route;
import akka.stream.Materializer;
import akka.stream.javadsl.Flow;
import akka.actor.typed.javadsl.Adapter;
import akka.actor.typed.javadsl.Behaviors;
import akka.actor.typed.ActorSystem;
import java.net.InetSocketAddress;
import java.util.concurrent.CompletionStage;
//#main-class
public class QuickstartApp {
// #start-http-server
static void startHttpServer(Route route, ActorSystem<?> system) {
CompletionStage<ServerBinding> futureBinding =
Http.get(system).newServerAt("localhost", 8080).bind(route);
futureBinding.whenComplete((binding, exception) -> {
if (binding != null) {
InetSocketAddress address = binding.localAddress();
system.log().info("Server online at http://{}:{}/",
address.getHostString(),
address.getPort());
} else {
system.log().error("Failed to bind HTTP endpoint, terminating system", exception);
system.terminate();
}
});
}
// #start-http-server
public static void main(String[] args) throws Exception {
//#server-bootstrapping
Behavior<NotUsed> rootBehavior = Behaviors.setup(context -> {
ActorRef<UserRegistry.Command> userRegistryActor =
context.spawn(UserRegistry.create(), "UserRegistry");
UserRoutes userRoutes = new UserRoutes(context.getSystem(), userRegistryActor);
startHttpServer(userRoutes.userRoutes(), context.getSystem());
return Behaviors.empty();
});
// boot up server using the route as defined below
ActorSystem.create(rootBehavior, "HelloAkkaHttpServer");
//#server-bootstrapping
}
}
//#main-class
```
|
```c
/* $OpenBSD: xdr_rec.c,v 1.24 2022/12/27 17:10:06 jmc Exp $ */
/*
*
* 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 "Oracle America, Inc." nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER 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.
*/
/*
* xdr_rec.c, Implements TCP/IP based XDR streams with a "record marking"
* layer above tcp (for rpc's use).
*
* These routines interface XDRSTREAMS to a tcp/ip connection.
* There is a record marking layer between the xdr stream
* and the tcp transport level. A record is composed on one or more
* record fragments. A record fragment is a thirty-two bit header followed
* by n bytes of data, where n is contained in the header. The header
* is represented as a htonl(u_int32_t). The high order bit encodes
* whether or not the fragment is the last fragment of the record
* (1 => fragment is last, 0 => more fragments to follow.
* The other 31 bits encode the byte length of the fragment.
*/
#include <sys/types.h>
#include <netinet/in.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <rpc/auth.h>
#include <rpc/clnt.h>
#include <rpc/rpc_msg.h>
#include <rpc/svc.h>
static bool_t xdrrec_getlong(XDR *, long *);
static bool_t xdrrec_putlong(XDR *, long *);
static bool_t xdrrec_getbytes(XDR *, caddr_t, u_int);
static bool_t xdrrec_putbytes(XDR *, caddr_t, u_int);
static u_int xdrrec_getpos(XDR *);
static bool_t xdrrec_setpos(XDR *, u_int);
static int32_t *xdrrec_inline(XDR *, u_int);
static void xdrrec_destroy(XDR *);
/*
* Not clear if these are used externally
*/
bool_t __xdrrec_setnonblock(XDR *, int);
PROTO_STD_DEPRECATED(__xdrrec_setnonblock);
bool_t __xdrrec_getrec(XDR *xdrs, enum xprt_stat *statp, bool_t expectdata);
PROTO_NORMAL(__xdrrec_getrec);
struct ct_data;
static const struct xdr_ops xdrrec_ops = {
xdrrec_getlong,
xdrrec_putlong,
xdrrec_getbytes,
xdrrec_putbytes,
xdrrec_getpos,
xdrrec_setpos,
xdrrec_inline,
xdrrec_destroy,
NULL, /* xdrrec_control */
};
/*
* A record is composed of one or more record fragments.
* A record fragment is a four-byte header followed by zero to
* 2**32-1 bytes. The header is treated as a long unsigned and is
* encode/decoded to the network via htonl/ntohl. The low order 31 bits
* are a byte count of the fragment. The highest order bit is a boolean:
* 1 => this fragment is the last fragment of the record,
* 0 => this fragment is followed by more fragment(s).
*
* The fragment/record machinery is not general; it is constructed to
* meet the needs of xdr and rpc based on tcp.
*/
#define LAST_FRAG ((u_int32_t)(1U << 31))
typedef struct rec_strm {
caddr_t tcp_handle;
/*
* out-goung bits
*/
int (*writeit)(caddr_t, caddr_t, int);
caddr_t out_base; /* output buffer (points to frag header) */
caddr_t out_finger; /* next output position */
caddr_t out_boundry; /* data cannot up to this address */
u_int32_t *frag_header; /* beginning of current fragment */
bool_t frag_sent; /* true if buffer sent in middle of record */
/*
* in-coming bits
*/
int (*readit)(caddr_t, caddr_t, int);
u_long in_size; /* fixed size of the input buffer */
caddr_t in_base;
caddr_t in_finger; /* location of next byte to be had */
caddr_t in_boundry; /* can read up to this location */
long fbtbc; /* fragment bytes to be consumed */
bool_t last_frag;
u_int sendsize;
u_int recvsize;
bool_t nonblock;
bool_t in_haveheader;
u_int32_t in_header;
char *in_hdrp;
int in_hdrlen;
int in_reclen;
int in_received;
int in_maxrec;
} RECSTREAM;
static u_int fix_buf_size(u_int);
static bool_t flush_out(RECSTREAM *, bool_t);
static bool_t fill_input_buf(RECSTREAM *);
static bool_t get_input_bytes(RECSTREAM *, caddr_t, int);
static bool_t set_input_fragment(RECSTREAM *);
static bool_t skip_input_bytes(RECSTREAM *, long);
static bool_t realloc_stream(RECSTREAM *, int);
/*
* Create an xdr handle for xdrrec
* xdrrec_create fills in xdrs. Sendsize and recvsize are
* send and recv buffer sizes (0 => use default).
* tcp_handle is an opaque handle that is passed as the first parameter to
* the procedures readit and writeit. Readit and writeit are read and
* write respectively. They are like the system
* calls expect that they take an opaque handle rather than an fd.
*/
void
xdrrec_create(XDR *xdrs, u_int sendsize, u_int recvsize, caddr_t tcp_handle,
int (*readit)(caddr_t, caddr_t, int), /* like read, but pass it a
tcp_handle, not sock */
int (*writeit)(caddr_t, caddr_t, int)) /* like write, but pass it a
tcp_handle, not sock */
{
RECSTREAM *rstrm =
(RECSTREAM *)mem_alloc(sizeof(RECSTREAM));
if (rstrm == NULL) {
/*
* This is bad. Should rework xdrrec_create to
* return a handle, and in this case return NULL
*/
return;
}
rstrm->sendsize = sendsize = fix_buf_size(sendsize);
rstrm->out_base = malloc(rstrm->sendsize);
if (rstrm->out_base == NULL) {
mem_free(rstrm, sizeof(RECSTREAM));
return;
}
rstrm->recvsize = recvsize = fix_buf_size(recvsize);
rstrm->in_base = malloc(recvsize);
if (rstrm->in_base == NULL) {
mem_free(rstrm->out_base, sendsize);
mem_free(rstrm, sizeof(RECSTREAM));
return;
}
/*
* now the rest ...
*/
xdrs->x_ops = &xdrrec_ops;
xdrs->x_private = (caddr_t)rstrm;
rstrm->tcp_handle = tcp_handle;
rstrm->readit = readit;
rstrm->writeit = writeit;
rstrm->out_finger = rstrm->out_boundry = rstrm->out_base;
rstrm->frag_header = (u_int32_t *)rstrm->out_base;
rstrm->out_finger += sizeof(u_int32_t);
rstrm->out_boundry += sendsize;
rstrm->frag_sent = FALSE;
rstrm->in_size = recvsize;
rstrm->in_boundry = rstrm->in_base;
rstrm->in_finger = (rstrm->in_boundry += recvsize);
rstrm->fbtbc = 0;
rstrm->last_frag = TRUE;
rstrm->in_haveheader = FALSE;
rstrm->in_hdrlen = 0;
rstrm->in_hdrp = (char *)(void *)&rstrm->in_header;
rstrm->nonblock = FALSE;
rstrm->in_reclen = 0;
rstrm->in_received = 0;
}
DEF_WEAK(xdrrec_create);
/*
* The reoutines defined below are the xdr ops which will go into the
* xdr handle filled in by xdrrec_create.
*/
static bool_t
xdrrec_getlong(XDR *xdrs, long int *lp)
{
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
int32_t *buflp = (int32_t *)(rstrm->in_finger);
int32_t mylong;
/* first try the inline, fast case */
if ((rstrm->fbtbc >= sizeof(int32_t)) &&
(((long)rstrm->in_boundry - (long)buflp) >= sizeof(int32_t))) {
*lp = (long)ntohl((u_int32_t)(*buflp));
rstrm->fbtbc -= sizeof(int32_t);
rstrm->in_finger += sizeof(int32_t);
} else {
if (! xdrrec_getbytes(xdrs, (caddr_t)(void *)&mylong,
sizeof(int32_t)))
return (FALSE);
*lp = (long)ntohl((u_int32_t)mylong);
}
return (TRUE);
}
static bool_t
xdrrec_putlong(XDR *xdrs, long int *lp)
{
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
int32_t *dest_lp = ((int32_t *)(rstrm->out_finger));
if ((rstrm->out_finger += sizeof(int32_t)) > rstrm->out_boundry) {
/*
* this case should almost never happen so the code is
* inefficient
*/
rstrm->out_finger -= sizeof(int32_t);
rstrm->frag_sent = TRUE;
if (! flush_out(rstrm, FALSE))
return (FALSE);
dest_lp = ((int32_t *)(void *)(rstrm->out_finger));
rstrm->out_finger += sizeof(int32_t);
}
*dest_lp = (int32_t)htonl((u_int32_t)(*lp));
return (TRUE);
}
static bool_t /* must manage buffers, fragments, and records */
xdrrec_getbytes(XDR *xdrs, caddr_t addr, u_int len)
{
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
int current;
while (len > 0) {
current = rstrm->fbtbc;
if (current == 0) {
if (rstrm->last_frag)
return (FALSE);
if (! set_input_fragment(rstrm))
return (FALSE);
continue;
}
current = (len < current) ? len : current;
if (! get_input_bytes(rstrm, addr, current))
return (FALSE);
addr += current;
rstrm->fbtbc -= current;
len -= current;
}
return (TRUE);
}
static bool_t
xdrrec_putbytes(XDR *xdrs, caddr_t addr, u_int len)
{
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
long current;
while (len > 0) {
current = (u_long)rstrm->out_boundry -
(u_long)rstrm->out_finger;
current = (len < current) ? len : current;
memcpy(rstrm->out_finger, addr, current);
rstrm->out_finger += current;
addr += current;
len -= current;
if (rstrm->out_finger == rstrm->out_boundry) {
rstrm->frag_sent = TRUE;
if (! flush_out(rstrm, FALSE))
return (FALSE);
}
}
return (TRUE);
}
static u_int
xdrrec_getpos(XDR *xdrs)
{
RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
off_t pos;
pos = lseek((int)(long)rstrm->tcp_handle, 0, SEEK_CUR);
if (pos != -1)
switch (xdrs->x_op) {
case XDR_ENCODE:
pos += rstrm->out_finger - rstrm->out_base;
break;
case XDR_DECODE:
pos -= rstrm->in_boundry - rstrm->in_finger;
break;
default:
pos = -1;
break;
}
return ((u_int) pos);
}
static bool_t
xdrrec_setpos(XDR *xdrs, u_int pos)
{
RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
u_int currpos = xdrrec_getpos(xdrs);
int delta = currpos - pos;
caddr_t newpos;
if ((int)currpos != -1)
switch (xdrs->x_op) {
case XDR_ENCODE:
newpos = rstrm->out_finger - delta;
if ((newpos > (caddr_t)(rstrm->frag_header)) &&
(newpos < rstrm->out_boundry)) {
rstrm->out_finger = newpos;
return (TRUE);
}
break;
case XDR_DECODE:
newpos = rstrm->in_finger - delta;
if ((delta < (int)(rstrm->fbtbc)) &&
(newpos <= rstrm->in_boundry) &&
(newpos >= rstrm->in_base)) {
rstrm->in_finger = newpos;
rstrm->fbtbc -= delta;
return (TRUE);
}
break;
case XDR_FREE:
break;
}
return (FALSE);
}
static int32_t *
xdrrec_inline(XDR *xdrs, u_int len)
{
RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
int32_t *buf = NULL;
switch (xdrs->x_op) {
case XDR_ENCODE:
if ((rstrm->out_finger + len) <= rstrm->out_boundry) {
buf = (int32_t *) rstrm->out_finger;
rstrm->out_finger += len;
}
break;
case XDR_DECODE:
if ((len <= rstrm->fbtbc) &&
((rstrm->in_finger + len) <= rstrm->in_boundry)) {
buf = (int32_t *) rstrm->in_finger;
rstrm->fbtbc -= len;
rstrm->in_finger += len;
}
break;
case XDR_FREE:
break;
}
return (buf);
}
static void
xdrrec_destroy(XDR *xdrs)
{
RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
mem_free(rstrm->out_base, rstrm->sendsize);
mem_free(rstrm->in_base, rstrm->recvsize);
mem_free(rstrm, sizeof(RECSTREAM));
}
/*
* Exported routines to manage xdr records
*/
/*
* Before reading (deserializing from the stream, one should always call
* this procedure to guarantee proper record alignment.
*/
bool_t
xdrrec_skiprecord(XDR *xdrs)
{
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
enum xprt_stat xstat;
if (rstrm->nonblock) {
if (__xdrrec_getrec(xdrs, &xstat, FALSE)) {
rstrm->fbtbc = 0;
return (TRUE);
}
if (rstrm->in_finger == rstrm->in_boundry &&
xstat == XPRT_MOREREQS) {
rstrm->fbtbc = 0;
return (TRUE);
}
return (FALSE);
}
while (rstrm->fbtbc > 0 || (! rstrm->last_frag)) {
if (! skip_input_bytes(rstrm, rstrm->fbtbc))
return (FALSE);
rstrm->fbtbc = 0;
if ((! rstrm->last_frag) && (! set_input_fragment(rstrm)))
return (FALSE);
}
rstrm->last_frag = FALSE;
return (TRUE);
}
DEF_WEAK(xdrrec_skiprecord);
/*
* Look ahead function.
* Returns TRUE iff there is no more input in the buffer
* after consuming the rest of the current record.
*/
bool_t
xdrrec_eof(XDR *xdrs)
{
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
while (rstrm->fbtbc > 0 || (! rstrm->last_frag)) {
if (! skip_input_bytes(rstrm, rstrm->fbtbc))
return (TRUE);
rstrm->fbtbc = 0;
if ((! rstrm->last_frag) && (! set_input_fragment(rstrm)))
return (TRUE);
}
if (rstrm->in_finger == rstrm->in_boundry)
return (TRUE);
return (FALSE);
}
DEF_WEAK(xdrrec_eof);
/*
* The client must tell the package when an end-of-record has occurred.
* The second paraemters tells whether the record should be flushed to the
* (output) tcp stream. (This let's the package support batched or
* pipelined procedure calls.) TRUE => immediate flush to tcp connection.
*/
bool_t
xdrrec_endofrecord(XDR *xdrs, int32_t sendnow)
{
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
u_long len; /* fragment length */
if (sendnow || rstrm->frag_sent ||
((u_long)rstrm->out_finger + sizeof(u_int32_t) >=
(u_long)rstrm->out_boundry)) {
rstrm->frag_sent = FALSE;
return (flush_out(rstrm, TRUE));
}
len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->frag_header) -
sizeof(u_int32_t);
*(rstrm->frag_header) = htonl((u_long)len | LAST_FRAG);
rstrm->frag_header = (u_int32_t *)rstrm->out_finger;
rstrm->out_finger += sizeof(u_int32_t);
return (TRUE);
}
DEF_WEAK(xdrrec_endofrecord);
/*
* Fill the stream buffer with a record for a non-blocking connection.
* Return true if a record is available in the buffer, false if not.
*/
bool_t
__xdrrec_getrec(XDR *xdrs, enum xprt_stat *statp, bool_t expectdata)
{
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
ssize_t n;
int fraglen;
if (!rstrm->in_haveheader) {
n = rstrm->readit(rstrm->tcp_handle, rstrm->in_hdrp,
(int)sizeof (rstrm->in_header) - rstrm->in_hdrlen);
if (n == 0) {
*statp = expectdata ? XPRT_DIED : XPRT_IDLE;
return (FALSE);
}
if (n < 0) {
*statp = XPRT_DIED;
return (FALSE);
}
rstrm->in_hdrp += n;
rstrm->in_hdrlen += n;
if (rstrm->in_hdrlen < sizeof (rstrm->in_header)) {
*statp = XPRT_MOREREQS;
return (FALSE);
}
rstrm->in_header = ntohl(rstrm->in_header);
fraglen = (int)(rstrm->in_header & ~LAST_FRAG);
if (fraglen == 0 || fraglen > rstrm->in_maxrec ||
(rstrm->in_reclen + fraglen) > rstrm->in_maxrec) {
*statp = XPRT_DIED;
return (FALSE);
}
rstrm->in_reclen += fraglen;
if (rstrm->in_reclen > rstrm->recvsize)
realloc_stream(rstrm, rstrm->in_reclen);
if (rstrm->in_header & LAST_FRAG) {
rstrm->in_header &= ~LAST_FRAG;
rstrm->last_frag = TRUE;
}
}
n = rstrm->readit(rstrm->tcp_handle,
rstrm->in_base + rstrm->in_received,
(rstrm->in_reclen - rstrm->in_received));
if (n < 0) {
*statp = XPRT_DIED;
return (FALSE);
}
if (n == 0) {
*statp = expectdata ? XPRT_DIED : XPRT_IDLE;
return (FALSE);
}
rstrm->in_received += n;
if (rstrm->in_received == rstrm->in_reclen) {
rstrm->in_haveheader = (FALSE);
rstrm->in_hdrp = (char *)(void *)&rstrm->in_header;
rstrm->in_hdrlen = 0;
if (rstrm->last_frag) {
rstrm->fbtbc = rstrm->in_reclen;
rstrm->in_boundry = rstrm->in_base + rstrm->in_reclen;
rstrm->in_finger = rstrm->in_base;
rstrm->in_reclen = rstrm->in_received = 0;
*statp = XPRT_MOREREQS;
return (TRUE);
}
}
*statp = XPRT_MOREREQS;
return (FALSE);
}
DEF_STRONG(__xdrrec_getrec);
bool_t
__xdrrec_setnonblock(XDR *xdrs, int maxrec)
{
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
rstrm->nonblock = TRUE;
if (maxrec == 0)
maxrec = rstrm->recvsize;
rstrm->in_maxrec = maxrec;
return (TRUE);
}
/*
* Internal useful routines
*/
static bool_t
flush_out(RECSTREAM *rstrm, int32_t eor)
{
u_long eormask = (eor == TRUE) ? LAST_FRAG : 0;
u_int32_t len = (u_long)(rstrm->out_finger) -
(u_long)(rstrm->frag_header) - sizeof(u_int32_t);
*(rstrm->frag_header) = htonl(len | eormask);
len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->out_base);
if ((*(rstrm->writeit))(rstrm->tcp_handle, rstrm->out_base, (int)len)
!= (int)len)
return (FALSE);
rstrm->frag_header = (u_int32_t *)rstrm->out_base;
rstrm->out_finger = (caddr_t)rstrm->out_base + sizeof(u_int32_t);
return (TRUE);
}
static bool_t /* knows nothing about records! Only about input buffers */
fill_input_buf(RECSTREAM *rstrm)
{
caddr_t where;
u_long i;
long len;
if (rstrm->nonblock)
return FALSE;
where = rstrm->in_base;
i = (u_long)rstrm->in_boundry % BYTES_PER_XDR_UNIT;
where += i;
len = rstrm->in_size - i;
if ((len = (*(rstrm->readit))(rstrm->tcp_handle, where, len)) == -1)
return (FALSE);
rstrm->in_finger = where;
where += len;
rstrm->in_boundry = where;
return (TRUE);
}
static bool_t /* knows nothing about records! Only about input buffers */
get_input_bytes(RECSTREAM *rstrm, caddr_t addr, int len)
{
long current;
if (rstrm->nonblock) {
if (len > (int)(rstrm->in_boundry - rstrm->in_finger))
return FALSE;
memcpy(addr, rstrm->in_finger, len);
rstrm->in_finger += len;
return (TRUE);
}
while (len > 0) {
current = (long)rstrm->in_boundry - (long)rstrm->in_finger;
if (current == 0) {
if (! fill_input_buf(rstrm))
return (FALSE);
continue;
}
current = (len < current) ? len : current;
memcpy(addr, rstrm->in_finger, current);
rstrm->in_finger += current;
addr += current;
len -= current;
}
return (TRUE);
}
static bool_t /* next four bytes of the input stream are treated as a header */
set_input_fragment(RECSTREAM *rstrm)
{
u_int32_t header;
if (rstrm->nonblock)
return (FALSE);
if (! get_input_bytes(rstrm, (caddr_t)&header, sizeof(header)))
return (FALSE);
header = (long)ntohl(header);
rstrm->last_frag = ((header & LAST_FRAG) == 0) ? FALSE : TRUE;
/*
* Sanity check. Try not to accept wildly incorrect
* record sizes. Unfortunately, the only record size
* we can positively identify as being 'wildly incorrect'
* is zero. Ridiculously large record sizes may look wrong,
* but we don't have any way to be certain that they aren't
* what the client actually intended to send us.
*/
if (header == 0)
return(FALSE);
rstrm->fbtbc = header & (~LAST_FRAG);
return (TRUE);
}
static bool_t /* consumes input bytes; knows nothing about records! */
skip_input_bytes(RECSTREAM *rstrm, long int cnt)
{
long current;
while (cnt > 0) {
current = (long)rstrm->in_boundry - (long)rstrm->in_finger;
if (current == 0) {
if (! fill_input_buf(rstrm))
return (FALSE);
continue;
}
current = (cnt < current) ? cnt : current;
rstrm->in_finger += current;
cnt -= current;
}
return (TRUE);
}
static u_int
fix_buf_size(u_int s)
{
if (s < 100)
s = 4000;
return (RNDUP(s));
}
/*
* Reallocate the input buffer for a non-block stream.
*/
static bool_t
realloc_stream(RECSTREAM *rstrm, int size)
{
ptrdiff_t diff;
char *buf;
if (size > rstrm->recvsize) {
buf = realloc(rstrm->in_base, size);
if (buf == NULL)
return (FALSE);
diff = buf - rstrm->in_base;
rstrm->in_finger += diff;
rstrm->in_base = buf;
rstrm->in_boundry = buf + size;
rstrm->recvsize = size;
rstrm->in_size = size;
}
return (TRUE);
}
```
|
MomCo by MOPS International is a Christian organization focused on gathering and supporting moms.
MomCo believes in the simple but revolutionary idea that remarkable things happen when moms come together.
MOPS (an acronym that stands for “Mothers of Preschoolers”) International, Inc. is headquartered in Denver, Colorado. The organization had its first meeting in February 1973 in Wheat Ridge, Colorado, established a board of directors in 1981, and was incorporated under the name MOPS Outreach. The name was later changed to MOPS, Inc. In 1988, as they expanded beyond the US, the name was changed again, to MOPS International, Inc.
In 2023, MOPS International rebranded to MomCo.
Original founders included Marlene Seidel and seven others at Trinity Baptist Church.
References
External links
MOPS International, Inc.
MOPs in Holland
Parents' organizations
Christian organizations established in 1973
Women's organizations based in the United States
Christian parachurch organizations
History of women in Colorado
|
The 2013 All-Ireland Senior Hurling Championship was the 126th staging of the All-Ireland championship since its establishment in 1887. The draw for the 2013 fixtures took place on 4 October 2012. The championship began on 5 May 2013 and ended on 28 September 2013 with Clare winning their fourth All Ireland title after a 5–16 to 3–16 win against Cork in the replayed final.
Kilkenny were the defending champions. However, they were knocked out of the Leinster Championship by eventual Leinster champions Dublin at the semi-final stage and Cork saw them off in the All-Ireland quarter-final. Limerick won the Munster Championship for the first time since 1996. Cork defeated Dublin and Clare defeated Limerick in the All-Ireland semi-finals.
The 2013 Championship has been described by many as one of the best ever. In February 2014, the GAA announced that both the 2013 football and hurling Championships brought in €11.9m in gate receipts, an increase of €1.3m for the hurling championship.
The introduction of Hawk-Eye for Championship matches at Croke Park fell foul in a high-profile blunder by the computer system which led to use of Hawk-Eye being suspended during the All-Ireland semi-finals on 18 August. During the minor game between Limerick and Galway, Hawk-Eye ruled a point for Limerick as a miss although the graphic showed the ball passing inside the posts, causing confusion around the stadium - the referee ultimately waved the valid point wide provoking anger from fans, viewers and TV analysts covering the game live. The system was subsequently stood down for the senior game which followed, owing to "an inconsistency in the generation of a graphic". Hawk-Eye admitted they were to blame and as a result Limerick, who were narrowly defeated after extra-time, announced they would be appealing over Hawk-Eye's costly failure. The incident drew attention from the UK, where Hawk-Eye had made its debut in English soccer's Premier League the day before.
Team changes
To Championship
Promoted from the Christy Ring Cup
London
From Championship
Relegated to the Christy Ring Cup
None
Teams
All teams from the 2012 championship continued to line out in hurling's top tier in 2013.
Kilkenny were installed as the favourites to retain the All-Ireland title for a third consecutive year and to secure a remarkable tenth championship in fourteen seasons. Tipperary and Galway, the last two teams to beat Kilkenny in championship hurling, were regarded as the two teams most likely to provide the strongest challenge to Kilkenny's supremacy once again. Limerick were ranked at 20/1 as they hoped to end a forty-year wait for the Liam MacCarthy Cup. Waterford, a team who won four Munster titles between 2002 and 2010, were seen as a team to have missed out on their chance at an All-Ireland title and were ranked at 25/1.
London, the winners of the 2012 Christy Ring Cup, availed of their automatic right to promotion to the top tier and joined the Leinster championship.
Prior to the championship draw it emerged that Croke Park officials had written to the Laois County Board inviting the county hurlers to participate in the 2013 Christy Ring Cup. This was prompted by Laois's poor results during the previous few seasons. In spite of these concerns Laois decided to remain in hurling's top tier and subsequently won two Leinster Championship matches.
General information
Fifteen counties will compete in the All-Ireland Senior Hurling Championship: ten teams in the Leinster Senior Hurling Championship and five teams in the Munster Senior Hurling Championship.
Personnel and kits
Summary
Championships
Broadcasting
RTÉ and TV3 provided live coverage and highlights of matches in Ireland on The Sunday Game Live and Championship Live respectively, with RTÉ showing the All-Ireland Final live. Setanta Sports and TG4 showed highlights of matches in Ireland also. Setanta Sports broadcasts live Championship matches in Australia. Also Setanta Sports provided live matches in Asia.
The Championship Live live programme was presented by Matt Cooper, usually from an on-pitch studio with analysis from Daithí Regan, Jamesie O'Connor, and Nicky English. The Sunday Game live programme was presented by Michael Lyster with analysis usually from Cyril Farrell, Ger Loughnane, Liam Sheedy, and Tomás Mulcahy.
Highlights of all games were shown on The Sunday Game programme which aired usually at 9:30pm on Sundays on RTÉ Two and was presented by Des Cahill with analysis from Eddie Brennan and Donal Óg Cusack.
Television coverage, in particular that of the Leinster Hurling Championship has been criticised in some circles. Neither RTÉ or TV3 decided to broadcast both Leinster Hurling Championship semi-finals. Both channels also declined the offer from the Leinster GAA to reschedule the Dublin - Kilkenny semi-final replay in order for it to be broadcast.
These matches were broadcast live on television in Ireland
Leinster Senior Hurling Championship
Munster Senior Hurling Championship
All-Ireland qualifiers
Teams eliminated prior to the semi-finals of their provincial championship compete in the preliminary rounds and phase 1. Teams eliminated in the provincial semi finals take part in phase 2. Phase 3 sees the winners of phase 1 take on the winners of phase 2, with the winners advancing to the All Ireland quarter-finals
Preliminary round
Phase 1
Phase 2
Phase 3
All-Ireland Senior Hurling Championship
Quarter-finals
Semi-finals
Final
Statistics
Scoring
First goal of the championship: Niall O'Brien for Westmeath against Antrim (Leinster preliminary round, 5 May 2013)
Widest winning margin: 20 points
Clare 1-32 - 0-15 Laois (qualifier phase 1)
Most goals in a match: 8
Clare 5-16 - 3-16 Cork (All-Ireland final replay)
Most points in a match: 47
Clare 1-32 - 0-15 Laois (qualifier phase 1)
Most goals by one team in a match: 5
Clare 5-16 - 3-16 Cork (All-Ireland final replay)
Highest aggregate score: (70 minutes) 56 points
Clare 5-16 - 3-16 Cork (All-Ireland final replay)
Lowest aggregate score: 29 points
Antrim 0-11 - 1-15 Westmeath (qualifier preliminary round)
Most goals scored by a losing team: 4
Offaly 4-9 - 0-26 Kilkenny (Leinster quarter-final)
Top scorers
Overall
Single game
Miscellaneous
In Carlow's defeat of London in the first round of the Leinster championship, Craig Doyle became the first player in the history of the championship to score three goals after coming on as a substitute.
In the Leinster semi-final replay, Dublin record a championship defeat of Kilkenny for the first time since 1942.
The Leinster final was notable for a number of reasons. It was the first final to feature neither Kilkenny or Wexford since 1990. The meeting of Dublin and Galway in the provincial decider was a first, while it was also their first championship meeting since 1942. Dublin maintained their 100% success rate over Galway, with a sixth win from six meetings, to claim the Leinster title for the first time since 1961.
The Munster final between Cork and Limerick was the sides' first meeting at this stage of the championship since 1992. Limerick's victory was their first provincial title since 1996.
Cork and Kilkenny's All-Ireland quarter-final meeting at Semple Stadium was their first championship meeting outside of Croke Park since 1907.
For the first time since 1951, Kilkenny did not play a single championship game in Croke Park. It is also the first time since 1996 that Kilkenny failed to qualify for an All-Ireland semi-final.
The All-Ireland semi-final between Cork and Dublin was the sides' first meeting in the All-Ireland series since 1952.
The All-Ireland semi-final between Clare and Limerick was the sides' first ever meeting at this stage of the championship.
The All-Ireland final was notable for a number of reasons. It was the second ever all-Munster All-Ireland decider and the first time since 1997 that this has happened. It was the first time since 2004 that neither the Leinster or Munster champions contested the All-Ireland final. It was the first ever All-Ireland final meeting of Cork and Clare. For the second successive year the All-Ireland final ended in a draw. The replay was also unique as it was the first All-Ireland final to be played on a Saturday.
Clare win their fourth All-Ireland title to draw level with Galway and Offaly as joint seventh on the all-time roll of honour.
Clare's victory also marked the first time a team outside the traditional "Big Three" of hurling (Kilkennny, Cork and Tipperary) had won the All-Ireland since Offaly in 1998.
Notable matches
2013 will be remembered as a year that the traditionally weaker counties made an impact.
Limerick who hadn't been in an All-Ireland Final since 2007 beat reigning Munster Champions Tipperary by 3 points, 1–18 to 1–15 in a Munster semi-final.
Clare under David Fitzgerald held off Waterford in a Munster Quarter-final winning by 2–20 to 1-15. They were overcome by a stronger Cork side in the Munster Semi-final losing 0–23 to 0-15.
Laois made it to the Leinster semi-final where they put it up to Galway even leading by a point at half time [0-08 - 0-07], but Galway's physicality helped them run out 7 point victors [2-17 - 1-13].
Dublin came into the season after a disappointing 2012 season and a hammering by Tipperary in the league semi-final [4-20 0-17]. In their Leinster Quarter-final they drew with Wexford, 1-17 - 1-17 but in the replay ran out easy 8 point winners, 1-17 - 0-12.
Offaly jumped to a 1–01 to 0–00 start against Kilkenny in their quarter-final clash. They led at half time by 2–06 to 0-11 but failed to stop Kilkenny, although they managed to score 4 goals as Kilkenny won 0–26 to 4-09.
In their semi-final Dublin ran at Kilkenny and held out for a draw in the match, 0-17 - 1-14. In the replay Dublin raced to a 0–04 to 0–01 lead after 10 mins and lead 0–11 to 0–07 at half time. They ran out 3 point winners, 1-17 0-17. Dublin made it to a Leinster final while Kilkenny where exiled to the qualifiers for a second year.
Kilkenny fought hard against Tipperary and sent them out of the Championship, winning by three points.
Dublin beat Galway by 12 points to claim their first Leinster title in 52 years.
Kilkenny knocked out Waterford in the final stage of the Qualifiers after extra time.
Carlow lead Wexford for most of their game in the qualifiers, until a late goal sent them out.
At the quarter-final stage, Cork knocked out Championship favourites and title holders, Kilkenny. Clare knocked out Galway, the previous year's runners-up.
Both Provincial Champions were beaten in the semi-finals. Cork defeated Dublin after the game of the season by 1–24 to 1-19, and Clare beat Limerick by 1–22 to 0-18.
The 2013 Championship was described by many as one of the best ever.
Awards
Monthly awards
Sunday Game Team of the Year
The Sunday Game team of the year was picked on 28 September, which was the night of the final replay.
Clare's victorious All-Ireland winning side had seven players in the hurling team of the year. Tony Kelly of Clare was also picked as The Sunday Game player of the year.
Anthony Nash (Cork)
Shane O’Neill (Cork)
David McInerney (Clare)
Peter Kelly (Dublin)
Brendan Bugler (Clare)
Liam Rushe (Dublin)
Pat Donnellan (Clare)
Paul Browne (Limerick)
Colm Galvin (Clare)
Seamus Harnedy (Cork)
Tony Kelly (Clare)
Danny Sutcliffe (Dublin)
Podge Collins (Clare)
Patrick Horgan (Cork)
Conor McGrath (Clare)
GAA/GPA All Stars
The 2013 All-Star hurling team were announced on 6 November. Speaking at the announcement, GAA President Liam O'Neill said "This year's hurling selection was of particular interest to hurling followers everywhere after the incredible year we had, the players who have made the final cut can take particular satisfaction on doing so in a season of stiff competition as new teams and players emerged - something evidenced in the final make up of the team, I congratulate all 15 players - and those who were nominated too - as their inclusion further underlines their roles as excellent ambassadors through their commitment and dedication to the pursuit of excellence."
Tony Kelly of Clare was named Young Hurler of the Year and Hurler of the Year for 2013 at the All Stars award ceremony on 8 November at Croke Park.
Media
DVD release
In December 2013, LIAM 13 a double DVD was released containing highlights of the 2013 hurling championship season along with full match coverage of the final and final replay.
Documentary
A documentary called The Magic of Hurling aired on 27 December 2013 on RTÉ Two. This documentary featured Davy Fitzgerald, Anthony Daly and Ger Loughnane talking to Ger Canning about the 2013 year in hurling and discussing the tactics that brought the All-Ireland title to Clare.
See also
2013 Clare county hurling team season
2013 Tipperary county hurling team season
References
External links
Top 10 hurling moments of 2013 from The Sunday Game
2013 in hurling
|
The Roslyn Landmark Society (also known as RLS) is a nonprofit historical society headquartered at 36 Main Street in Roslyn, New York. It serves as the historical and landmark society for the Greater Roslyn area.
Description
The Roslyn Landmark Society was founded in 1961. It was founded by Dr. Roger Gerry and his wife, Peggy when the historic downtown of Roslyn was threatened by destruction associated with urbanization. It was created to help preserve the Roslyn area's local history and to educate locals on the area's history.
In the late 2010s, the funds needed were raised to restore the historic Roslyn Grist Mill, which is owned by Nassau County. The project, which the Roslyn Landmark Society is involved in, had been delayed for several decades, and as part of it, the property will be restored, and the Roslyn Landmark Society will use it as an education and research center. The project is ongoing as of 2021.
During the same decade, the Roslyn Landmark Society was also involved in restoring the marble horse tamers originally located at Clarence Mackay's former local estate, Harbor Hill.
In 2020, the Roslyn Landmark Society was one of the organizations involved in preventing a historic home in East Hills from being demolished.
As of 2021, the Roslyn Landmark Society's current presidents are is Howard Kroplick and John Santos. Kroplick had also served as the Town Historian of the Town of North Hempstead for 7 years until retiring from that position in 2019.
The Roslyn Landmark Society gives annual tours of selected historic properties in Roslyn. Some of the Roslyn historic properties protected by the Roslyn Landmark Society have restrictive covenants.
Notable properties
Ellen E. Ward Memorial Clock Tower (in Roslyn)
George W. Denton House (in Flower Hill)
Henry Western Eastman Tennant Cottage (in Roslyn)
Mackay Estate Dairyman's Cottage (in East Hills)
Mackay Estate Gate Lodge (in East Hills)
Mackay Estate Water Tower (in East Hills)
Roslyn House (in Roslyn Heights)
Roslyn National Bank and Trust Building (in Roslyn)
Roslyn Savings Bank Headquarters (in Roslyn)
See also
List of historical societies
References
External links
Official website
Roslyn, New York
Historical societies in New York (state)
|
```xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="path_to_url"
xmlns:xsi="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<parent>
<groupId>io.jpress</groupId>
<artifactId>module-form</artifactId>
<version>5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>io.jpress</groupId>
<artifactId>module-form-web</artifactId>
<dependencies>
<dependency>
<groupId>io.jboot</groupId>
<artifactId>jboot</artifactId>
</dependency>
<dependency>
<groupId>io.jpress</groupId>
<artifactId>jpress-core</artifactId>
</dependency>
<dependency>
<groupId>io.jpress</groupId>
<artifactId>module-form-model</artifactId>
<version>5.0</version>
</dependency>
<dependency>
<groupId>io.jpress</groupId>
<artifactId>module-form-service</artifactId>
<version>5.0</version>
</dependency>
<dependency>
<groupId>io.jpress</groupId>
<artifactId>module-form-service-provider</artifactId>
<version>5.0</version>
</dependency>
<dependency>
<groupId>com.anji-plus</groupId>
<artifactId>captcha</artifactId>
<version>1.3.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
```
|
In the 1951–52 season, USM Marengo is competing in the Division Honneur for the 1st season French colonial era, as well as the Forconi Cup. They competing in Division Honneur, and the Forconi Cup.
Pre-season and friendlies
Competitions
Overview
Division Honneur
League table
Results by round
Matches
Forconi Cup
Squad information
Playing statistics
Goalscorers
Includes all competitive matches. The list is sorted alphabetically by surname when total goals are equal.
References
External links
L'Echo d'Alger : journal républicain du matin
La Dépêche quotidienne : journal républicain du matin
Alger républicain : journal républicain du matin
USMM Hadjout seasons
Algerian football clubs 1951–52 season
|
```c
/*
Simple DirectMedia Layer
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../SDL_internal.h"
/* The high-level video driver subsystem */
#include "SDL.h"
#include "SDL_video.h"
#include "SDL_sysvideo.h"
#include "SDL_blit.h"
#include "SDL_pixels_c.h"
#include "SDL_rect_c.h"
#include "../events/SDL_events_c.h"
#include "../timer/SDL_timer_c.h"
#include "SDL_syswm.h"
#if SDL_VIDEO_OPENGL
#include "SDL_opengl.h"
#endif /* SDL_VIDEO_OPENGL */
#if SDL_VIDEO_OPENGL_ES
#include "SDL_opengles.h"
#endif /* SDL_VIDEO_OPENGL_ES */
/* GL and GLES2 headers conflict on Linux 32 bits */
#if SDL_VIDEO_OPENGL_ES2 && !SDL_VIDEO_OPENGL
#include "SDL_opengles2.h"
#endif /* SDL_VIDEO_OPENGL_ES2 && !SDL_VIDEO_OPENGL */
#ifndef GL_CONTEXT_RELEASE_BEHAVIOR_KHR
#define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB
#endif
/* On Windows, windows.h defines CreateWindow */
#ifdef CreateWindow
#undef CreateWindow
#endif
/* Available video drivers */
static VideoBootStrap *bootstrap[] = {
#if SDL_VIDEO_DRIVER_COCOA
&COCOA_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_X11
&X11_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_MIR
&MIR_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_WAYLAND
&Wayland_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_VIVANTE
&VIVANTE_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_DIRECTFB
&DirectFB_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_WINDOWS
&WINDOWS_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_WINRT
&WINRT_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_HAIKU
&HAIKU_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_PANDORA
&PND_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_UIKIT
&UIKIT_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_ANDROID
&Android_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_PSP
&PSP_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_RPI
&RPI_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_NACL
&NACL_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_EMSCRIPTEN
&Emscripten_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_DUMMY
&DUMMY_bootstrap,
#endif
NULL
};
static SDL_VideoDevice *_this = NULL;
#define CHECK_WINDOW_MAGIC(window, retval) \
if (!_this) { \
SDL_UninitializedVideo(); \
return retval; \
} \
if (!window || window->magic != &_this->window_magic) { \
SDL_SetError("Invalid window"); \
return retval; \
}
#define CHECK_DISPLAY_INDEX(displayIndex, retval) \
if (!_this) { \
SDL_UninitializedVideo(); \
return retval; \
} \
SDL_assert(_this->displays != NULL); \
if (displayIndex < 0 || displayIndex >= _this->num_displays) { \
SDL_SetError("displayIndex must be in the range 0 - %d", \
_this->num_displays - 1); \
return retval; \
}
#define FULLSCREEN_MASK (SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_FULLSCREEN)
#ifdef __MACOSX__
/* Support for Mac OS X fullscreen spaces */
extern SDL_bool Cocoa_IsWindowInFullscreenSpace(SDL_Window * window);
extern SDL_bool Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool state);
#endif
/* Support for framebuffer emulation using an accelerated renderer */
#define SDL_WINDOWTEXTUREDATA "_SDL_WindowTextureData"
typedef struct {
SDL_Renderer *renderer;
SDL_Texture *texture;
void *pixels;
int pitch;
int bytes_per_pixel;
} SDL_WindowTextureData;
static SDL_bool
ShouldUseTextureFramebuffer()
{
const char *hint;
/* If there's no native framebuffer support then there's no option */
if (!_this->CreateWindowFramebuffer) {
return SDL_TRUE;
}
/* If the user has specified a software renderer we can't use a
texture framebuffer, or renderer creation will go recursive.
*/
hint = SDL_GetHint(SDL_HINT_RENDER_DRIVER);
if (hint && SDL_strcasecmp(hint, "software") == 0) {
return SDL_FALSE;
}
/* See if the user or application wants a specific behavior */
hint = SDL_GetHint(SDL_HINT_FRAMEBUFFER_ACCELERATION);
if (hint) {
if (*hint == '0') {
return SDL_FALSE;
} else {
return SDL_TRUE;
}
}
/* Each platform has different performance characteristics */
#if defined(__WIN32__)
/* GDI BitBlt() is way faster than Direct3D dynamic textures right now.
*/
return SDL_FALSE;
#elif defined(__MACOSX__)
/* Mac OS X uses OpenGL as the native fast path */
return SDL_TRUE;
#elif defined(__LINUX__)
/* Properly configured OpenGL drivers are faster than MIT-SHM */
#if SDL_VIDEO_OPENGL
/* Ugh, find a way to cache this value! */
{
SDL_Window *window;
SDL_GLContext context;
SDL_bool hasAcceleratedOpenGL = SDL_FALSE;
window = SDL_CreateWindow("OpenGL test", -32, -32, 32, 32, SDL_WINDOW_OPENGL|SDL_WINDOW_HIDDEN);
if (window) {
context = SDL_GL_CreateContext(window);
if (context) {
const GLubyte *(APIENTRY * glGetStringFunc) (GLenum);
const char *vendor = NULL;
glGetStringFunc = SDL_GL_GetProcAddress("glGetString");
if (glGetStringFunc) {
vendor = (const char *) glGetStringFunc(GL_VENDOR);
}
/* Add more vendors here at will... */
if (vendor &&
(SDL_strstr(vendor, "ATI Technologies") ||
SDL_strstr(vendor, "NVIDIA"))) {
hasAcceleratedOpenGL = SDL_TRUE;
}
SDL_GL_DeleteContext(context);
}
SDL_DestroyWindow(window);
}
return hasAcceleratedOpenGL;
}
#elif SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
/* Let's be optimistic about this! */
return SDL_TRUE;
#else
return SDL_FALSE;
#endif
#else
/* Play it safe, assume that if there is a framebuffer driver that it's
optimized for the current platform.
*/
return SDL_FALSE;
#endif
}
static int
SDL_CreateWindowTexture(SDL_VideoDevice *unused, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch)
{
SDL_WindowTextureData *data;
data = SDL_GetWindowData(window, SDL_WINDOWTEXTUREDATA);
if (!data) {
SDL_Renderer *renderer = NULL;
int i;
const char *hint = SDL_GetHint(SDL_HINT_FRAMEBUFFER_ACCELERATION);
/* Check to see if there's a specific driver requested */
if (hint && *hint != '0' && *hint != '1' &&
SDL_strcasecmp(hint, "software") != 0) {
for (i = 0; i < SDL_GetNumRenderDrivers(); ++i) {
SDL_RendererInfo info;
SDL_GetRenderDriverInfo(i, &info);
if (SDL_strcasecmp(info.name, hint) == 0) {
renderer = SDL_CreateRenderer(window, i, 0);
break;
}
}
}
if (!renderer) {
for (i = 0; i < SDL_GetNumRenderDrivers(); ++i) {
SDL_RendererInfo info;
SDL_GetRenderDriverInfo(i, &info);
if (SDL_strcmp(info.name, "software") != 0) {
renderer = SDL_CreateRenderer(window, i, 0);
if (renderer) {
break;
}
}
}
}
if (!renderer) {
return SDL_SetError("No hardware accelerated renderers available");
}
/* Create the data after we successfully create the renderer (bug #1116) */
data = (SDL_WindowTextureData *)SDL_calloc(1, sizeof(*data));
if (!data) {
SDL_DestroyRenderer(renderer);
return SDL_OutOfMemory();
}
SDL_SetWindowData(window, SDL_WINDOWTEXTUREDATA, data);
data->renderer = renderer;
}
/* Free any old texture and pixel data */
if (data->texture) {
SDL_DestroyTexture(data->texture);
data->texture = NULL;
}
SDL_free(data->pixels);
data->pixels = NULL;
{
SDL_RendererInfo info;
Uint32 i;
if (SDL_GetRendererInfo(data->renderer, &info) < 0) {
return -1;
}
/* Find the first format without an alpha channel */
*format = info.texture_formats[0];
for (i = 0; i < info.num_texture_formats; ++i) {
if (!SDL_ISPIXELFORMAT_FOURCC(info.texture_formats[i]) &&
!SDL_ISPIXELFORMAT_ALPHA(info.texture_formats[i])) {
*format = info.texture_formats[i];
break;
}
}
}
data->texture = SDL_CreateTexture(data->renderer, *format,
SDL_TEXTUREACCESS_STREAMING,
window->w, window->h);
if (!data->texture) {
return -1;
}
/* Create framebuffer data */
data->bytes_per_pixel = SDL_BYTESPERPIXEL(*format);
data->pitch = (((window->w * data->bytes_per_pixel) + 3) & ~3);
data->pixels = SDL_malloc(window->h * data->pitch);
if (!data->pixels) {
return SDL_OutOfMemory();
}
*pixels = data->pixels;
*pitch = data->pitch;
/* Make sure we're not double-scaling the viewport */
SDL_RenderSetViewport(data->renderer, NULL);
return 0;
}
static int
SDL_UpdateWindowTexture(SDL_VideoDevice *unused, SDL_Window * window, const SDL_Rect * rects, int numrects)
{
SDL_WindowTextureData *data;
SDL_Rect rect;
void *src;
data = SDL_GetWindowData(window, SDL_WINDOWTEXTUREDATA);
if (!data || !data->texture) {
return SDL_SetError("No window texture data");
}
/* Update a single rect that contains subrects for best DMA performance */
if (SDL_GetSpanEnclosingRect(window->w, window->h, numrects, rects, &rect)) {
src = (void *)((Uint8 *)data->pixels +
rect.y * data->pitch +
rect.x * data->bytes_per_pixel);
if (SDL_UpdateTexture(data->texture, &rect, src, data->pitch) < 0) {
return -1;
}
if (SDL_RenderCopy(data->renderer, data->texture, NULL, NULL) < 0) {
return -1;
}
SDL_RenderPresent(data->renderer);
}
return 0;
}
static void
SDL_DestroyWindowTexture(SDL_VideoDevice *unused, SDL_Window * window)
{
SDL_WindowTextureData *data;
data = SDL_SetWindowData(window, SDL_WINDOWTEXTUREDATA, NULL);
if (!data) {
return;
}
if (data->texture) {
SDL_DestroyTexture(data->texture);
}
if (data->renderer) {
SDL_DestroyRenderer(data->renderer);
}
SDL_free(data->pixels);
SDL_free(data);
}
static int
cmpmodes(const void *A, const void *B)
{
const SDL_DisplayMode *a = (const SDL_DisplayMode *) A;
const SDL_DisplayMode *b = (const SDL_DisplayMode *) B;
if (a == b) {
return 0;
} else if (a->w != b->w) {
return b->w - a->w;
} else if (a->h != b->h) {
return b->h - a->h;
} else if (SDL_BITSPERPIXEL(a->format) != SDL_BITSPERPIXEL(b->format)) {
return SDL_BITSPERPIXEL(b->format) - SDL_BITSPERPIXEL(a->format);
} else if (SDL_PIXELLAYOUT(a->format) != SDL_PIXELLAYOUT(b->format)) {
return SDL_PIXELLAYOUT(b->format) - SDL_PIXELLAYOUT(a->format);
} else if (a->refresh_rate != b->refresh_rate) {
return b->refresh_rate - a->refresh_rate;
}
return 0;
}
static int
SDL_UninitializedVideo()
{
return SDL_SetError("Video subsystem has not been initialized");
}
int
SDL_GetNumVideoDrivers(void)
{
return SDL_arraysize(bootstrap) - 1;
}
const char *
SDL_GetVideoDriver(int index)
{
if (index >= 0 && index < SDL_GetNumVideoDrivers()) {
return bootstrap[index]->name;
}
return NULL;
}
/*
* Initialize the video and event subsystems -- determine native pixel format
*/
int
SDL_VideoInit(const char *driver_name)
{
SDL_VideoDevice *video;
const char *hint;
int index;
int i;
SDL_bool allow_screensaver;
/* Check to make sure we don't overwrite '_this' */
if (_this != NULL) {
SDL_VideoQuit();
}
#if !SDL_TIMERS_DISABLED
SDL_TicksInit();
#endif
/* Start the event loop */
if (SDL_InitSubSystem(SDL_INIT_EVENTS) < 0 ||
SDL_KeyboardInit() < 0 ||
SDL_MouseInit() < 0 ||
SDL_TouchInit() < 0) {
return -1;
}
/* Select the proper video driver */
index = 0;
video = NULL;
if (driver_name == NULL) {
driver_name = SDL_getenv("SDL_VIDEODRIVER");
}
if (driver_name != NULL) {
for (i = 0; bootstrap[i]; ++i) {
if (SDL_strncasecmp(bootstrap[i]->name, driver_name, SDL_strlen(driver_name)) == 0) {
if (bootstrap[i]->available()) {
video = bootstrap[i]->create(index);
break;
}
}
}
} else {
for (i = 0; bootstrap[i]; ++i) {
if (bootstrap[i]->available()) {
video = bootstrap[i]->create(index);
if (video != NULL) {
break;
}
}
}
}
if (video == NULL) {
if (driver_name) {
return SDL_SetError("%s not available", driver_name);
}
return SDL_SetError("No available video device");
}
_this = video;
_this->name = bootstrap[i]->name;
_this->next_object_id = 1;
/* Set some very sane GL defaults */
_this->gl_config.driver_loaded = 0;
_this->gl_config.dll_handle = NULL;
SDL_GL_ResetAttributes();
_this->current_glwin_tls = SDL_TLSCreate();
_this->current_glctx_tls = SDL_TLSCreate();
/* Initialize the video subsystem */
if (_this->VideoInit(_this) < 0) {
SDL_VideoQuit();
return -1;
}
/* Make sure some displays were added */
if (_this->num_displays == 0) {
SDL_VideoQuit();
return SDL_SetError("The video driver did not add any displays");
}
/* Add the renderer framebuffer emulation if desired */
if (ShouldUseTextureFramebuffer()) {
_this->CreateWindowFramebuffer = SDL_CreateWindowTexture;
_this->UpdateWindowFramebuffer = SDL_UpdateWindowTexture;
_this->DestroyWindowFramebuffer = SDL_DestroyWindowTexture;
}
/* Disable the screen saver by default. This is a change from <= 2.0.1,
but most things using SDL are games or media players; you wouldn't
want a screensaver to trigger if you're playing exclusively with a
joystick, or passively watching a movie. Things that use SDL but
function more like a normal desktop app should explicitly reenable the
screensaver. */
hint = SDL_GetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER);
if (hint) {
allow_screensaver = SDL_atoi(hint) ? SDL_TRUE : SDL_FALSE;
} else {
allow_screensaver = SDL_FALSE;
}
if (!allow_screensaver) {
SDL_DisableScreenSaver();
}
/* If we don't use a screen keyboard, turn on text input by default,
otherwise programs that expect to get text events without enabling
UNICODE input won't get any events.
Actually, come to think of it, you needed to call SDL_EnableUNICODE(1)
in SDL 1.2 before you got text input events. Hmm...
*/
if (!SDL_HasScreenKeyboardSupport()) {
SDL_StartTextInput();
}
/* We're ready to go! */
return 0;
}
const char *
SDL_GetCurrentVideoDriver()
{
if (!_this) {
SDL_UninitializedVideo();
return NULL;
}
return _this->name;
}
SDL_VideoDevice *
SDL_GetVideoDevice(void)
{
return _this;
}
int
SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode)
{
SDL_VideoDisplay display;
SDL_zero(display);
if (desktop_mode) {
display.desktop_mode = *desktop_mode;
}
display.current_mode = display.desktop_mode;
return SDL_AddVideoDisplay(&display);
}
int
SDL_AddVideoDisplay(const SDL_VideoDisplay * display)
{
SDL_VideoDisplay *displays;
int index = -1;
displays =
SDL_realloc(_this->displays,
(_this->num_displays + 1) * sizeof(*displays));
if (displays) {
index = _this->num_displays++;
displays[index] = *display;
displays[index].device = _this;
_this->displays = displays;
if (display->name) {
displays[index].name = SDL_strdup(display->name);
} else {
char name[32];
SDL_itoa(index, name, 10);
displays[index].name = SDL_strdup(name);
}
} else {
SDL_OutOfMemory();
}
return index;
}
int
SDL_GetNumVideoDisplays(void)
{
if (!_this) {
SDL_UninitializedVideo();
return 0;
}
return _this->num_displays;
}
static int
SDL_GetIndexOfDisplay(SDL_VideoDisplay *display)
{
int displayIndex;
for (displayIndex = 0; displayIndex < _this->num_displays; ++displayIndex) {
if (display == &_this->displays[displayIndex]) {
return displayIndex;
}
}
/* Couldn't find the display, just use index 0 */
return 0;
}
void *
SDL_GetDisplayDriverData(int displayIndex)
{
CHECK_DISPLAY_INDEX(displayIndex, NULL);
return _this->displays[displayIndex].driverdata;
}
const char *
SDL_GetDisplayName(int displayIndex)
{
CHECK_DISPLAY_INDEX(displayIndex, NULL);
return _this->displays[displayIndex].name;
}
int
SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect)
{
CHECK_DISPLAY_INDEX(displayIndex, -1);
if (rect) {
SDL_VideoDisplay *display = &_this->displays[displayIndex];
if (_this->GetDisplayBounds) {
if (_this->GetDisplayBounds(_this, display, rect) == 0) {
return 0;
}
}
/* Assume that the displays are left to right */
if (displayIndex == 0) {
rect->x = 0;
rect->y = 0;
} else {
SDL_GetDisplayBounds(displayIndex-1, rect);
rect->x += rect->w;
}
rect->w = display->current_mode.w;
rect->h = display->current_mode.h;
}
return 0;
}
int
SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi)
{
SDL_VideoDisplay *display;
CHECK_DISPLAY_INDEX(displayIndex, -1);
display = &_this->displays[displayIndex];
if (_this->GetDisplayDPI) {
if (_this->GetDisplayDPI(_this, display, ddpi, hdpi, vdpi) == 0) {
return 0;
}
}
return -1;
}
SDL_bool
SDL_AddDisplayMode(SDL_VideoDisplay * display, const SDL_DisplayMode * mode)
{
SDL_DisplayMode *modes;
int i, nmodes;
/* Make sure we don't already have the mode in the list */
modes = display->display_modes;
nmodes = display->num_display_modes;
for (i = 0; i < nmodes; ++i) {
if (cmpmodes(mode, &modes[i]) == 0) {
return SDL_FALSE;
}
}
/* Go ahead and add the new mode */
if (nmodes == display->max_display_modes) {
modes =
SDL_realloc(modes,
(display->max_display_modes + 32) * sizeof(*modes));
if (!modes) {
return SDL_FALSE;
}
display->display_modes = modes;
display->max_display_modes += 32;
}
modes[nmodes] = *mode;
display->num_display_modes++;
/* Re-sort video modes */
SDL_qsort(display->display_modes, display->num_display_modes,
sizeof(SDL_DisplayMode), cmpmodes);
return SDL_TRUE;
}
static int
SDL_GetNumDisplayModesForDisplay(SDL_VideoDisplay * display)
{
if (!display->num_display_modes && _this->GetDisplayModes) {
_this->GetDisplayModes(_this, display);
SDL_qsort(display->display_modes, display->num_display_modes,
sizeof(SDL_DisplayMode), cmpmodes);
}
return display->num_display_modes;
}
int
SDL_GetNumDisplayModes(int displayIndex)
{
CHECK_DISPLAY_INDEX(displayIndex, -1);
return SDL_GetNumDisplayModesForDisplay(&_this->displays[displayIndex]);
}
int
SDL_GetDisplayMode(int displayIndex, int index, SDL_DisplayMode * mode)
{
SDL_VideoDisplay *display;
CHECK_DISPLAY_INDEX(displayIndex, -1);
display = &_this->displays[displayIndex];
if (index < 0 || index >= SDL_GetNumDisplayModesForDisplay(display)) {
return SDL_SetError("index must be in the range of 0 - %d",
SDL_GetNumDisplayModesForDisplay(display) - 1);
}
if (mode) {
*mode = display->display_modes[index];
}
return 0;
}
int
SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode)
{
SDL_VideoDisplay *display;
CHECK_DISPLAY_INDEX(displayIndex, -1);
display = &_this->displays[displayIndex];
if (mode) {
*mode = display->desktop_mode;
}
return 0;
}
int
SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode)
{
SDL_VideoDisplay *display;
CHECK_DISPLAY_INDEX(displayIndex, -1);
display = &_this->displays[displayIndex];
if (mode) {
*mode = display->current_mode;
}
return 0;
}
static SDL_DisplayMode *
SDL_GetClosestDisplayModeForDisplay(SDL_VideoDisplay * display,
const SDL_DisplayMode * mode,
SDL_DisplayMode * closest)
{
Uint32 target_format;
int target_refresh_rate;
int i;
SDL_DisplayMode *current, *match;
if (!mode || !closest) {
SDL_SetError("Missing desired mode or closest mode parameter");
return NULL;
}
/* Default to the desktop format */
if (mode->format) {
target_format = mode->format;
} else {
target_format = display->desktop_mode.format;
}
/* Default to the desktop refresh rate */
if (mode->refresh_rate) {
target_refresh_rate = mode->refresh_rate;
} else {
target_refresh_rate = display->desktop_mode.refresh_rate;
}
match = NULL;
for (i = 0; i < SDL_GetNumDisplayModesForDisplay(display); ++i) {
current = &display->display_modes[i];
if (current->w && (current->w < mode->w)) {
/* Out of sorted modes large enough here */
break;
}
if (current->h && (current->h < mode->h)) {
if (current->w && (current->w == mode->w)) {
/* Out of sorted modes large enough here */
break;
}
/* Wider, but not tall enough, due to a different
aspect ratio. This mode must be skipped, but closer
modes may still follow. */
continue;
}
if (!match || current->w < match->w || current->h < match->h) {
match = current;
continue;
}
if (current->format != match->format) {
/* Sorted highest depth to lowest */
if (current->format == target_format ||
(SDL_BITSPERPIXEL(current->format) >=
SDL_BITSPERPIXEL(target_format)
&& SDL_PIXELTYPE(current->format) ==
SDL_PIXELTYPE(target_format))) {
match = current;
}
continue;
}
if (current->refresh_rate != match->refresh_rate) {
/* Sorted highest refresh to lowest */
if (current->refresh_rate >= target_refresh_rate) {
match = current;
}
}
}
if (match) {
if (match->format) {
closest->format = match->format;
} else {
closest->format = mode->format;
}
if (match->w && match->h) {
closest->w = match->w;
closest->h = match->h;
} else {
closest->w = mode->w;
closest->h = mode->h;
}
if (match->refresh_rate) {
closest->refresh_rate = match->refresh_rate;
} else {
closest->refresh_rate = mode->refresh_rate;
}
closest->driverdata = match->driverdata;
/*
* Pick some reasonable defaults if the app and driver don't
* care
*/
if (!closest->format) {
closest->format = SDL_PIXELFORMAT_RGB888;
}
if (!closest->w) {
closest->w = 640;
}
if (!closest->h) {
closest->h = 480;
}
return closest;
}
return NULL;
}
SDL_DisplayMode *
SDL_GetClosestDisplayMode(int displayIndex,
const SDL_DisplayMode * mode,
SDL_DisplayMode * closest)
{
SDL_VideoDisplay *display;
CHECK_DISPLAY_INDEX(displayIndex, NULL);
display = &_this->displays[displayIndex];
return SDL_GetClosestDisplayModeForDisplay(display, mode, closest);
}
static int
SDL_SetDisplayModeForDisplay(SDL_VideoDisplay * display, const SDL_DisplayMode * mode)
{
SDL_DisplayMode display_mode;
SDL_DisplayMode current_mode;
if (mode) {
display_mode = *mode;
/* Default to the current mode */
if (!display_mode.format) {
display_mode.format = display->current_mode.format;
}
if (!display_mode.w) {
display_mode.w = display->current_mode.w;
}
if (!display_mode.h) {
display_mode.h = display->current_mode.h;
}
if (!display_mode.refresh_rate) {
display_mode.refresh_rate = display->current_mode.refresh_rate;
}
/* Get a good video mode, the closest one possible */
if (!SDL_GetClosestDisplayModeForDisplay(display, &display_mode, &display_mode)) {
return SDL_SetError("No video mode large enough for %dx%d",
display_mode.w, display_mode.h);
}
} else {
display_mode = display->desktop_mode;
}
/* See if there's anything left to do */
current_mode = display->current_mode;
if (SDL_memcmp(&display_mode, ¤t_mode, sizeof(display_mode)) == 0) {
return 0;
}
/* Actually change the display mode */
if (!_this->SetDisplayMode) {
return SDL_SetError("Video driver doesn't support changing display mode");
}
if (_this->SetDisplayMode(_this, display, &display_mode) < 0) {
return -1;
}
display->current_mode = display_mode;
return 0;
}
int
SDL_GetWindowDisplayIndex(SDL_Window * window)
{
int displayIndex;
int i, dist;
int closest = -1;
int closest_dist = 0x7FFFFFFF;
SDL_Point center;
SDL_Point delta;
SDL_Rect rect;
CHECK_WINDOW_MAGIC(window, -1);
if (SDL_WINDOWPOS_ISUNDEFINED(window->x) ||
SDL_WINDOWPOS_ISCENTERED(window->x)) {
displayIndex = (window->x & 0xFFFF);
if (displayIndex >= _this->num_displays) {
displayIndex = 0;
}
return displayIndex;
}
if (SDL_WINDOWPOS_ISUNDEFINED(window->y) ||
SDL_WINDOWPOS_ISCENTERED(window->y)) {
displayIndex = (window->y & 0xFFFF);
if (displayIndex >= _this->num_displays) {
displayIndex = 0;
}
return displayIndex;
}
/* Find the display containing the window */
for (i = 0; i < _this->num_displays; ++i) {
SDL_VideoDisplay *display = &_this->displays[i];
if (display->fullscreen_window == window) {
return i;
}
}
center.x = window->x + window->w / 2;
center.y = window->y + window->h / 2;
for (i = 0; i < _this->num_displays; ++i) {
SDL_GetDisplayBounds(i, &rect);
if (SDL_EnclosePoints(¢er, 1, &rect, NULL)) {
return i;
}
delta.x = center.x - (rect.x + rect.w / 2);
delta.y = center.y - (rect.y + rect.h / 2);
dist = (delta.x*delta.x + delta.y*delta.y);
if (dist < closest_dist) {
closest = i;
closest_dist = dist;
}
}
if (closest < 0) {
SDL_SetError("Couldn't find any displays");
}
return closest;
}
SDL_VideoDisplay *
SDL_GetDisplayForWindow(SDL_Window *window)
{
int displayIndex = SDL_GetWindowDisplayIndex(window);
if (displayIndex >= 0) {
return &_this->displays[displayIndex];
} else {
return NULL;
}
}
int
SDL_SetWindowDisplayMode(SDL_Window * window, const SDL_DisplayMode * mode)
{
CHECK_WINDOW_MAGIC(window, -1);
if (mode) {
window->fullscreen_mode = *mode;
} else {
SDL_zero(window->fullscreen_mode);
}
if (FULLSCREEN_VISIBLE(window) && (window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) {
SDL_DisplayMode fullscreen_mode;
if (SDL_GetWindowDisplayMode(window, &fullscreen_mode) == 0) {
SDL_SetDisplayModeForDisplay(SDL_GetDisplayForWindow(window), &fullscreen_mode);
}
}
return 0;
}
int
SDL_GetWindowDisplayMode(SDL_Window * window, SDL_DisplayMode * mode)
{
SDL_DisplayMode fullscreen_mode;
SDL_VideoDisplay *display;
CHECK_WINDOW_MAGIC(window, -1);
if (!mode) {
return SDL_InvalidParamError("mode");
}
fullscreen_mode = window->fullscreen_mode;
if (!fullscreen_mode.w) {
fullscreen_mode.w = window->windowed.w;
}
if (!fullscreen_mode.h) {
fullscreen_mode.h = window->windowed.h;
}
display = SDL_GetDisplayForWindow(window);
/* if in desktop size mode, just return the size of the desktop */
if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) {
fullscreen_mode = display->desktop_mode;
} else if (!SDL_GetClosestDisplayModeForDisplay(SDL_GetDisplayForWindow(window),
&fullscreen_mode,
&fullscreen_mode)) {
return SDL_SetError("Couldn't find display mode match");
}
if (mode) {
*mode = fullscreen_mode;
}
return 0;
}
Uint32
SDL_GetWindowPixelFormat(SDL_Window * window)
{
SDL_VideoDisplay *display;
CHECK_WINDOW_MAGIC(window, SDL_PIXELFORMAT_UNKNOWN);
display = SDL_GetDisplayForWindow(window);
return display->current_mode.format;
}
static void
SDL_RestoreMousePosition(SDL_Window *window)
{
int x, y;
if (window == SDL_GetMouseFocus()) {
SDL_GetMouseState(&x, &y);
SDL_WarpMouseInWindow(window, x, y);
}
}
#if __WINRT__
extern Uint32 WINRT_DetectWindowFlags(SDL_Window * window);
#endif
static int
SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen)
{
SDL_VideoDisplay *display;
SDL_Window *other;
CHECK_WINDOW_MAGIC(window,-1);
/* if we are in the process of hiding don't go back to fullscreen */
if ( window->is_hiding && fullscreen )
return 0;
#ifdef __MACOSX__
/* if the window is going away and no resolution change is necessary,
do nothing, or else we may trigger an ugly double-transition
*/
if (window->is_destroying && (window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP)
return 0;
/* If we're switching between a fullscreen Space and "normal" fullscreen, we need to get back to normal first. */
if (fullscreen && ((window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP) && ((window->flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN)) {
if (!Cocoa_SetWindowFullscreenSpace(window, SDL_FALSE)) {
return -1;
}
} else if (fullscreen && ((window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN) && ((window->flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP)) {
display = SDL_GetDisplayForWindow(window);
SDL_SetDisplayModeForDisplay(display, NULL);
if (_this->SetWindowFullscreen) {
_this->SetWindowFullscreen(_this, window, display, SDL_FALSE);
}
}
if (Cocoa_SetWindowFullscreenSpace(window, fullscreen)) {
if (Cocoa_IsWindowInFullscreenSpace(window) != fullscreen) {
return -1;
}
window->last_fullscreen_flags = window->flags;
return 0;
}
#elif __WINRT__ && (NTDDI_VERSION < NTDDI_WIN10)
/* HACK: WinRT 8.x apps can't choose whether or not they are fullscreen
or not. The user can choose this, via OS-provided UI, but this can't
be set programmatically.
Just look at what SDL's WinRT video backend code detected with regards
to fullscreen (being active, or not), and figure out a return/error code
from that.
*/
if (fullscreen == !(WINRT_DetectWindowFlags(window) & FULLSCREEN_MASK)) {
/* Uh oh, either:
1. fullscreen was requested, and we're already windowed
2. windowed-mode was requested, and we're already fullscreen
WinRT 8.x can't resolve either programmatically, so we're
giving up.
*/
return -1;
} else {
/* Whatever was requested, fullscreen or windowed mode, is already
in-place.
*/
return 0;
}
#endif
display = SDL_GetDisplayForWindow(window);
if (fullscreen) {
/* Hide any other fullscreen windows */
if (display->fullscreen_window &&
display->fullscreen_window != window) {
SDL_MinimizeWindow(display->fullscreen_window);
}
}
/* See if anything needs to be done now */
if ((display->fullscreen_window == window) == fullscreen) {
if ((window->last_fullscreen_flags & FULLSCREEN_MASK) == (window->flags & FULLSCREEN_MASK)) {
return 0;
}
}
/* See if there are any fullscreen windows */
for (other = _this->windows; other; other = other->next) {
SDL_bool setDisplayMode = SDL_FALSE;
if (other == window) {
setDisplayMode = fullscreen;
} else if (FULLSCREEN_VISIBLE(other) &&
SDL_GetDisplayForWindow(other) == display) {
setDisplayMode = SDL_TRUE;
}
if (setDisplayMode) {
SDL_DisplayMode fullscreen_mode;
SDL_zero(fullscreen_mode);
if (SDL_GetWindowDisplayMode(other, &fullscreen_mode) == 0) {
SDL_bool resized = SDL_TRUE;
if (other->w == fullscreen_mode.w && other->h == fullscreen_mode.h) {
resized = SDL_FALSE;
}
/* only do the mode change if we want exclusive fullscreen */
if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) {
if (SDL_SetDisplayModeForDisplay(display, &fullscreen_mode) < 0) {
return -1;
}
} else {
if (SDL_SetDisplayModeForDisplay(display, NULL) < 0) {
return -1;
}
}
if (_this->SetWindowFullscreen) {
_this->SetWindowFullscreen(_this, other, display, SDL_TRUE);
}
display->fullscreen_window = other;
/* Generate a mode change event here */
if (resized) {
SDL_SendWindowEvent(other, SDL_WINDOWEVENT_RESIZED,
fullscreen_mode.w, fullscreen_mode.h);
} else {
SDL_OnWindowResized(other);
}
SDL_RestoreMousePosition(other);
window->last_fullscreen_flags = window->flags;
return 0;
}
}
}
/* Nope, restore the desktop mode */
SDL_SetDisplayModeForDisplay(display, NULL);
if (_this->SetWindowFullscreen) {
_this->SetWindowFullscreen(_this, window, display, SDL_FALSE);
}
display->fullscreen_window = NULL;
/* Generate a mode change event here */
SDL_OnWindowResized(window);
/* Restore the cursor position */
SDL_RestoreMousePosition(window);
window->last_fullscreen_flags = window->flags;
return 0;
}
#define CREATE_FLAGS \
(SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI)
static void
SDL_FinishWindowCreation(SDL_Window *window, Uint32 flags)
{
window->windowed.x = window->x;
window->windowed.y = window->y;
window->windowed.w = window->w;
window->windowed.h = window->h;
if (flags & SDL_WINDOW_MAXIMIZED) {
SDL_MaximizeWindow(window);
}
if (flags & SDL_WINDOW_MINIMIZED) {
SDL_MinimizeWindow(window);
}
if (flags & SDL_WINDOW_FULLSCREEN) {
SDL_SetWindowFullscreen(window, flags);
}
if (flags & SDL_WINDOW_INPUT_GRABBED) {
SDL_SetWindowGrab(window, SDL_TRUE);
}
if (!(flags & SDL_WINDOW_HIDDEN)) {
SDL_ShowWindow(window);
}
}
SDL_Window *
SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
{
SDL_Window *window;
const char *hint;
if (!_this) {
/* Initialize the video system if needed */
if (SDL_VideoInit(NULL) < 0) {
return NULL;
}
}
/* Some platforms can't create zero-sized windows */
if (w < 1) {
w = 1;
}
if (h < 1) {
h = 1;
}
/* Some platforms blow up if the windows are too large. Raise it later? */
if ((w > 16384) || (h > 16384)) {
SDL_SetError("Window is too large.");
return NULL;
}
/* Some platforms have OpenGL enabled by default */
#if (SDL_VIDEO_OPENGL && __MACOSX__) || __IPHONEOS__ || __ANDROID__ || __NACL__
flags |= SDL_WINDOW_OPENGL;
#endif
if (flags & SDL_WINDOW_OPENGL) {
if (!_this->GL_CreateContext) {
SDL_SetError("No OpenGL support in video driver");
return NULL;
}
if (SDL_GL_LoadLibrary(NULL) < 0) {
return NULL;
}
}
/* Unless the user has specified the high-DPI disabling hint, respect the
* SDL_WINDOW_ALLOW_HIGHDPI flag.
*/
if (flags & SDL_WINDOW_ALLOW_HIGHDPI) {
hint = SDL_GetHint(SDL_HINT_VIDEO_HIGHDPI_DISABLED);
if (hint && SDL_atoi(hint) > 0) {
flags &= ~SDL_WINDOW_ALLOW_HIGHDPI;
}
}
window = (SDL_Window *)SDL_calloc(1, sizeof(*window));
if (!window) {
SDL_OutOfMemory();
return NULL;
}
window->magic = &_this->window_magic;
window->id = _this->next_object_id++;
window->x = x;
window->y = y;
window->w = w;
window->h = h;
if (SDL_WINDOWPOS_ISUNDEFINED(x) || SDL_WINDOWPOS_ISUNDEFINED(y) ||
SDL_WINDOWPOS_ISCENTERED(x) || SDL_WINDOWPOS_ISCENTERED(y)) {
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
int displayIndex;
SDL_Rect bounds;
displayIndex = SDL_GetIndexOfDisplay(display);
SDL_GetDisplayBounds(displayIndex, &bounds);
if (SDL_WINDOWPOS_ISUNDEFINED(x) || SDL_WINDOWPOS_ISCENTERED(x)) {
window->x = bounds.x + (bounds.w - w) / 2;
}
if (SDL_WINDOWPOS_ISUNDEFINED(y) || SDL_WINDOWPOS_ISCENTERED(y)) {
window->y = bounds.y + (bounds.h - h) / 2;
}
}
window->flags = ((flags & CREATE_FLAGS) | SDL_WINDOW_HIDDEN);
window->last_fullscreen_flags = window->flags;
window->brightness = 1.0f;
window->next = _this->windows;
window->is_destroying = SDL_FALSE;
if (_this->windows) {
_this->windows->prev = window;
}
_this->windows = window;
if (_this->CreateWindow && _this->CreateWindow(_this, window) < 0) {
SDL_DestroyWindow(window);
return NULL;
}
#if __WINRT__ && (NTDDI_VERSION < NTDDI_WIN10)
/* HACK: WinRT 8.x apps can't choose whether or not they are fullscreen
or not. The user can choose this, via OS-provided UI, but this can't
be set programmatically.
Just look at what SDL's WinRT video backend code detected with regards
to fullscreen (being active, or not), and figure out a return/error code
from that.
*/
flags = window->flags;
#endif
if (title) {
SDL_SetWindowTitle(window, title);
}
SDL_FinishWindowCreation(window, flags);
/* If the window was created fullscreen, make sure the mode code matches */
SDL_UpdateFullscreenMode(window, FULLSCREEN_VISIBLE(window));
return window;
}
SDL_Window *
SDL_CreateWindowFrom(const void *data)
{
SDL_Window *window;
if (!_this) {
SDL_UninitializedVideo();
return NULL;
}
if (!_this->CreateWindowFrom) {
SDL_Unsupported();
return NULL;
}
window = (SDL_Window *)SDL_calloc(1, sizeof(*window));
if (!window) {
SDL_OutOfMemory();
return NULL;
}
window->magic = &_this->window_magic;
window->id = _this->next_object_id++;
window->flags = SDL_WINDOW_FOREIGN;
window->last_fullscreen_flags = window->flags;
window->is_destroying = SDL_FALSE;
window->brightness = 1.0f;
window->next = _this->windows;
if (_this->windows) {
_this->windows->prev = window;
}
_this->windows = window;
if (_this->CreateWindowFrom(_this, window, data) < 0) {
SDL_DestroyWindow(window);
return NULL;
}
return window;
}
int
SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
{
SDL_bool loaded_opengl = SDL_FALSE;
if ((flags & SDL_WINDOW_OPENGL) && !_this->GL_CreateContext) {
return SDL_SetError("No OpenGL support in video driver");
}
if (window->flags & SDL_WINDOW_FOREIGN) {
/* Can't destroy and re-create foreign windows, hrm */
flags |= SDL_WINDOW_FOREIGN;
} else {
flags &= ~SDL_WINDOW_FOREIGN;
}
/* Restore video mode, etc. */
SDL_HideWindow(window);
/* Tear down the old native window */
if (window->surface) {
window->surface->flags &= ~SDL_DONTFREE;
SDL_FreeSurface(window->surface);
window->surface = NULL;
}
if (_this->DestroyWindowFramebuffer) {
_this->DestroyWindowFramebuffer(_this, window);
}
if (_this->DestroyWindow && !(flags & SDL_WINDOW_FOREIGN)) {
_this->DestroyWindow(_this, window);
}
if ((window->flags & SDL_WINDOW_OPENGL) != (flags & SDL_WINDOW_OPENGL)) {
if (flags & SDL_WINDOW_OPENGL) {
if (SDL_GL_LoadLibrary(NULL) < 0) {
return -1;
}
loaded_opengl = SDL_TRUE;
} else {
SDL_GL_UnloadLibrary();
}
}
window->flags = ((flags & CREATE_FLAGS) | SDL_WINDOW_HIDDEN);
window->last_fullscreen_flags = window->flags;
window->is_destroying = SDL_FALSE;
if (_this->CreateWindow && !(flags & SDL_WINDOW_FOREIGN)) {
if (_this->CreateWindow(_this, window) < 0) {
if (loaded_opengl) {
SDL_GL_UnloadLibrary();
window->flags &= ~SDL_WINDOW_OPENGL;
}
return -1;
}
}
if (flags & SDL_WINDOW_FOREIGN) {
window->flags |= SDL_WINDOW_FOREIGN;
}
if (_this->SetWindowTitle && window->title) {
_this->SetWindowTitle(_this, window);
}
if (_this->SetWindowIcon && window->icon) {
_this->SetWindowIcon(_this, window, window->icon);
}
if (window->hit_test) {
_this->SetWindowHitTest(window, SDL_TRUE);
}
SDL_FinishWindowCreation(window, flags);
return 0;
}
Uint32
SDL_GetWindowID(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window, 0);
return window->id;
}
SDL_Window *
SDL_GetWindowFromID(Uint32 id)
{
SDL_Window *window;
if (!_this) {
return NULL;
}
for (window = _this->windows; window; window = window->next) {
if (window->id == id) {
return window;
}
}
return NULL;
}
Uint32
SDL_GetWindowFlags(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window, 0);
return window->flags;
}
void
SDL_SetWindowTitle(SDL_Window * window, const char *title)
{
CHECK_WINDOW_MAGIC(window,);
if (title == window->title) {
return;
}
SDL_free(window->title);
window->title = SDL_strdup(title ? title : "");
if (_this->SetWindowTitle) {
_this->SetWindowTitle(_this, window);
}
}
const char *
SDL_GetWindowTitle(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window, "");
return window->title ? window->title : "";
}
void
SDL_SetWindowIcon(SDL_Window * window, SDL_Surface * icon)
{
CHECK_WINDOW_MAGIC(window,);
if (!icon) {
return;
}
SDL_FreeSurface(window->icon);
/* Convert the icon into ARGB8888 */
window->icon = SDL_ConvertSurfaceFormat(icon, SDL_PIXELFORMAT_ARGB8888, 0);
if (!window->icon) {
return;
}
if (_this->SetWindowIcon) {
_this->SetWindowIcon(_this, window, window->icon);
}
}
void*
SDL_SetWindowData(SDL_Window * window, const char *name, void *userdata)
{
SDL_WindowUserData *prev, *data;
CHECK_WINDOW_MAGIC(window, NULL);
/* Input validation */
if (name == NULL || name[0] == '\0') {
SDL_InvalidParamError("name");
return NULL;
}
/* See if the named data already exists */
prev = NULL;
for (data = window->data; data; prev = data, data = data->next) {
if (data->name && SDL_strcmp(data->name, name) == 0) {
void *last_value = data->data;
if (userdata) {
/* Set the new value */
data->data = userdata;
} else {
/* Delete this value */
if (prev) {
prev->next = data->next;
} else {
window->data = data->next;
}
SDL_free(data->name);
SDL_free(data);
}
return last_value;
}
}
/* Add new data to the window */
if (userdata) {
data = (SDL_WindowUserData *)SDL_malloc(sizeof(*data));
data->name = SDL_strdup(name);
data->data = userdata;
data->next = window->data;
window->data = data;
}
return NULL;
}
void *
SDL_GetWindowData(SDL_Window * window, const char *name)
{
SDL_WindowUserData *data;
CHECK_WINDOW_MAGIC(window, NULL);
/* Input validation */
if (name == NULL || name[0] == '\0') {
SDL_InvalidParamError("name");
return NULL;
}
for (data = window->data; data; data = data->next) {
if (data->name && SDL_strcmp(data->name, name) == 0) {
return data->data;
}
}
return NULL;
}
void
SDL_SetWindowPosition(SDL_Window * window, int x, int y)
{
CHECK_WINDOW_MAGIC(window,);
if (SDL_WINDOWPOS_ISCENTERED(x) || SDL_WINDOWPOS_ISCENTERED(y)) {
int displayIndex = (x & 0xFFFF);
SDL_Rect bounds;
if (displayIndex > _this->num_displays) {
displayIndex = 0;
}
SDL_zero(bounds);
SDL_GetDisplayBounds(displayIndex, &bounds);
if (SDL_WINDOWPOS_ISCENTERED(x)) {
x = bounds.x + (bounds.w - window->w) / 2;
}
if (SDL_WINDOWPOS_ISCENTERED(y)) {
y = bounds.y + (bounds.h - window->h) / 2;
}
}
if ((window->flags & SDL_WINDOW_FULLSCREEN)) {
if (!SDL_WINDOWPOS_ISUNDEFINED(x)) {
window->windowed.x = x;
}
if (!SDL_WINDOWPOS_ISUNDEFINED(y)) {
window->windowed.y = y;
}
} else {
if (!SDL_WINDOWPOS_ISUNDEFINED(x)) {
window->x = x;
}
if (!SDL_WINDOWPOS_ISUNDEFINED(y)) {
window->y = y;
}
if (_this->SetWindowPosition) {
_this->SetWindowPosition(_this, window);
}
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y);
}
}
void
SDL_GetWindowPosition(SDL_Window * window, int *x, int *y)
{
CHECK_WINDOW_MAGIC(window,);
/* Fullscreen windows are always at their display's origin */
if (window->flags & SDL_WINDOW_FULLSCREEN) {
int displayIndex;
if (x) {
*x = 0;
}
if (y) {
*y = 0;
}
/* Find the window's monitor and update to the
monitor offset. */
displayIndex = SDL_GetWindowDisplayIndex(window);
if (displayIndex >= 0) {
SDL_Rect bounds;
SDL_zero(bounds);
SDL_GetDisplayBounds(displayIndex, &bounds);
if (x) {
*x = bounds.x;
}
if (y) {
*y = bounds.y;
}
}
} else {
if (x) {
*x = window->x;
}
if (y) {
*y = window->y;
}
}
}
void
SDL_SetWindowBordered(SDL_Window * window, SDL_bool bordered)
{
CHECK_WINDOW_MAGIC(window,);
if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
const int want = (bordered != SDL_FALSE); /* normalize the flag. */
const int have = ((window->flags & SDL_WINDOW_BORDERLESS) == 0);
if ((want != have) && (_this->SetWindowBordered)) {
if (want) {
window->flags &= ~SDL_WINDOW_BORDERLESS;
} else {
window->flags |= SDL_WINDOW_BORDERLESS;
}
_this->SetWindowBordered(_this, window, (SDL_bool) want);
}
}
}
void
SDL_SetWindowSize(SDL_Window * window, int w, int h)
{
CHECK_WINDOW_MAGIC(window,);
if (w <= 0) {
SDL_InvalidParamError("w");
return;
}
if (h <= 0) {
SDL_InvalidParamError("h");
return;
}
/* Make sure we don't exceed any window size limits */
if (window->min_w && w < window->min_w)
{
w = window->min_w;
}
if (window->max_w && w > window->max_w)
{
w = window->max_w;
}
if (window->min_h && h < window->min_h)
{
h = window->min_h;
}
if (window->max_h && h > window->max_h)
{
h = window->max_h;
}
window->windowed.w = w;
window->windowed.h = h;
if (window->flags & SDL_WINDOW_FULLSCREEN) {
if (FULLSCREEN_VISIBLE(window) && (window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) {
window->last_fullscreen_flags = 0;
SDL_UpdateFullscreenMode(window, SDL_TRUE);
}
} else {
window->w = w;
window->h = h;
if (_this->SetWindowSize) {
_this->SetWindowSize(_this, window);
}
if (window->w == w && window->h == h) {
/* We didn't get a SDL_WINDOWEVENT_RESIZED event (by design) */
SDL_OnWindowResized(window);
}
}
}
void
SDL_GetWindowSize(SDL_Window * window, int *w, int *h)
{
CHECK_WINDOW_MAGIC(window,);
if (w) {
*w = window->w;
}
if (h) {
*h = window->h;
}
}
void
SDL_SetWindowMinimumSize(SDL_Window * window, int min_w, int min_h)
{
CHECK_WINDOW_MAGIC(window,);
if (min_w <= 0) {
SDL_InvalidParamError("min_w");
return;
}
if (min_h <= 0) {
SDL_InvalidParamError("min_h");
return;
}
if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
window->min_w = min_w;
window->min_h = min_h;
if (_this->SetWindowMinimumSize) {
_this->SetWindowMinimumSize(_this, window);
}
/* Ensure that window is not smaller than minimal size */
SDL_SetWindowSize(window, SDL_max(window->w, window->min_w), SDL_max(window->h, window->min_h));
}
}
void
SDL_GetWindowMinimumSize(SDL_Window * window, int *min_w, int *min_h)
{
CHECK_WINDOW_MAGIC(window,);
if (min_w) {
*min_w = window->min_w;
}
if (min_h) {
*min_h = window->min_h;
}
}
void
SDL_SetWindowMaximumSize(SDL_Window * window, int max_w, int max_h)
{
CHECK_WINDOW_MAGIC(window,);
if (max_w <= 0) {
SDL_InvalidParamError("max_w");
return;
}
if (max_h <= 0) {
SDL_InvalidParamError("max_h");
return;
}
if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
window->max_w = max_w;
window->max_h = max_h;
if (_this->SetWindowMaximumSize) {
_this->SetWindowMaximumSize(_this, window);
}
/* Ensure that window is not larger than maximal size */
SDL_SetWindowSize(window, SDL_min(window->w, window->max_w), SDL_min(window->h, window->max_h));
}
}
void
SDL_GetWindowMaximumSize(SDL_Window * window, int *max_w, int *max_h)
{
CHECK_WINDOW_MAGIC(window,);
if (max_w) {
*max_w = window->max_w;
}
if (max_h) {
*max_h = window->max_h;
}
}
void
SDL_ShowWindow(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window,);
if (window->flags & SDL_WINDOW_SHOWN) {
return;
}
if (_this->ShowWindow) {
_this->ShowWindow(_this, window);
}
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_SHOWN, 0, 0);
}
void
SDL_HideWindow(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window,);
if (!(window->flags & SDL_WINDOW_SHOWN)) {
return;
}
window->is_hiding = SDL_TRUE;
SDL_UpdateFullscreenMode(window, SDL_FALSE);
if (_this->HideWindow) {
_this->HideWindow(_this, window);
}
window->is_hiding = SDL_FALSE;
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_HIDDEN, 0, 0);
}
void
SDL_RaiseWindow(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window,);
if (!(window->flags & SDL_WINDOW_SHOWN)) {
return;
}
if (_this->RaiseWindow) {
_this->RaiseWindow(_this, window);
}
}
void
SDL_MaximizeWindow(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window,);
if (window->flags & SDL_WINDOW_MAXIMIZED) {
return;
}
/* !!! FIXME: should this check if the window is resizable? */
if (_this->MaximizeWindow) {
_this->MaximizeWindow(_this, window);
}
}
void
SDL_MinimizeWindow(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window,);
if (window->flags & SDL_WINDOW_MINIMIZED) {
return;
}
SDL_UpdateFullscreenMode(window, SDL_FALSE);
if (_this->MinimizeWindow) {
_this->MinimizeWindow(_this, window);
}
}
void
SDL_RestoreWindow(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window,);
if (!(window->flags & (SDL_WINDOW_MAXIMIZED | SDL_WINDOW_MINIMIZED))) {
return;
}
if (_this->RestoreWindow) {
_this->RestoreWindow(_this, window);
}
}
int
SDL_SetWindowFullscreen(SDL_Window * window, Uint32 flags)
{
Uint32 oldflags;
CHECK_WINDOW_MAGIC(window, -1);
flags &= FULLSCREEN_MASK;
if (flags == (window->flags & FULLSCREEN_MASK)) {
return 0;
}
/* clear the previous flags and OR in the new ones */
oldflags = window->flags & FULLSCREEN_MASK;
window->flags &= ~FULLSCREEN_MASK;
window->flags |= flags;
if (SDL_UpdateFullscreenMode(window, FULLSCREEN_VISIBLE(window)) == 0) {
return 0;
}
window->flags &= ~FULLSCREEN_MASK;
window->flags |= oldflags;
return -1;
}
static SDL_Surface *
SDL_CreateWindowFramebuffer(SDL_Window * window)
{
Uint32 format;
void *pixels;
int pitch;
int bpp;
Uint32 Rmask, Gmask, Bmask, Amask;
if (!_this->CreateWindowFramebuffer || !_this->UpdateWindowFramebuffer) {
return NULL;
}
if (_this->CreateWindowFramebuffer(_this, window, &format, &pixels, &pitch) < 0) {
return NULL;
}
if (!SDL_PixelFormatEnumToMasks(format, &bpp, &Rmask, &Gmask, &Bmask, &Amask)) {
return NULL;
}
return SDL_CreateRGBSurfaceFrom(pixels, window->w, window->h, bpp, pitch, Rmask, Gmask, Bmask, Amask);
}
SDL_Surface *
SDL_GetWindowSurface(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window, NULL);
if (!window->surface_valid) {
if (window->surface) {
window->surface->flags &= ~SDL_DONTFREE;
SDL_FreeSurface(window->surface);
}
window->surface = SDL_CreateWindowFramebuffer(window);
if (window->surface) {
window->surface_valid = SDL_TRUE;
window->surface->flags |= SDL_DONTFREE;
}
}
return window->surface;
}
int
SDL_UpdateWindowSurface(SDL_Window * window)
{
SDL_Rect full_rect;
CHECK_WINDOW_MAGIC(window, -1);
full_rect.x = 0;
full_rect.y = 0;
full_rect.w = window->w;
full_rect.h = window->h;
return SDL_UpdateWindowSurfaceRects(window, &full_rect, 1);
}
int
SDL_UpdateWindowSurfaceRects(SDL_Window * window, const SDL_Rect * rects,
int numrects)
{
CHECK_WINDOW_MAGIC(window, -1);
if (!window->surface_valid) {
return SDL_SetError("Window surface is invalid, please call SDL_GetWindowSurface() to get a new surface");
}
return _this->UpdateWindowFramebuffer(_this, window, rects, numrects);
}
int
SDL_SetWindowBrightness(SDL_Window * window, float brightness)
{
Uint16 ramp[256];
int status;
CHECK_WINDOW_MAGIC(window, -1);
SDL_CalculateGammaRamp(brightness, ramp);
status = SDL_SetWindowGammaRamp(window, ramp, ramp, ramp);
if (status == 0) {
window->brightness = brightness;
}
return status;
}
float
SDL_GetWindowBrightness(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window, 1.0f);
return window->brightness;
}
int
SDL_SetWindowGammaRamp(SDL_Window * window, const Uint16 * red,
const Uint16 * green,
const Uint16 * blue)
{
CHECK_WINDOW_MAGIC(window, -1);
if (!_this->SetWindowGammaRamp) {
return SDL_Unsupported();
}
if (!window->gamma) {
if (SDL_GetWindowGammaRamp(window, NULL, NULL, NULL) < 0) {
return -1;
}
SDL_assert(window->gamma != NULL);
}
if (red) {
SDL_memcpy(&window->gamma[0*256], red, 256*sizeof(Uint16));
}
if (green) {
SDL_memcpy(&window->gamma[1*256], green, 256*sizeof(Uint16));
}
if (blue) {
SDL_memcpy(&window->gamma[2*256], blue, 256*sizeof(Uint16));
}
if (window->flags & SDL_WINDOW_INPUT_FOCUS) {
return _this->SetWindowGammaRamp(_this, window, window->gamma);
} else {
return 0;
}
}
int
SDL_GetWindowGammaRamp(SDL_Window * window, Uint16 * red,
Uint16 * green,
Uint16 * blue)
{
CHECK_WINDOW_MAGIC(window, -1);
if (!window->gamma) {
int i;
window->gamma = (Uint16 *)SDL_malloc(256*6*sizeof(Uint16));
if (!window->gamma) {
return SDL_OutOfMemory();
}
window->saved_gamma = window->gamma + 3*256;
if (_this->GetWindowGammaRamp) {
if (_this->GetWindowGammaRamp(_this, window, window->gamma) < 0) {
return -1;
}
} else {
/* Create an identity gamma ramp */
for (i = 0; i < 256; ++i) {
Uint16 value = (Uint16)((i << 8) | i);
window->gamma[0*256+i] = value;
window->gamma[1*256+i] = value;
window->gamma[2*256+i] = value;
}
}
SDL_memcpy(window->saved_gamma, window->gamma, 3*256*sizeof(Uint16));
}
if (red) {
SDL_memcpy(red, &window->gamma[0*256], 256*sizeof(Uint16));
}
if (green) {
SDL_memcpy(green, &window->gamma[1*256], 256*sizeof(Uint16));
}
if (blue) {
SDL_memcpy(blue, &window->gamma[2*256], 256*sizeof(Uint16));
}
return 0;
}
void
SDL_UpdateWindowGrab(SDL_Window * window)
{
SDL_Window *grabbed_window;
SDL_bool grabbed;
if ((SDL_GetMouse()->relative_mode || (window->flags & SDL_WINDOW_INPUT_GRABBED)) &&
(window->flags & SDL_WINDOW_INPUT_FOCUS)) {
grabbed = SDL_TRUE;
} else {
grabbed = SDL_FALSE;
}
grabbed_window = _this->grabbed_window;
if (grabbed) {
if (grabbed_window && (grabbed_window != window)) {
/* stealing a grab from another window! */
grabbed_window->flags &= ~SDL_WINDOW_INPUT_GRABBED;
if (_this->SetWindowGrab) {
_this->SetWindowGrab(_this, grabbed_window, SDL_FALSE);
}
}
_this->grabbed_window = window;
} else if (grabbed_window == window) {
_this->grabbed_window = NULL; /* ungrabbing. */
}
if (_this->SetWindowGrab) {
_this->SetWindowGrab(_this, window, grabbed);
}
}
void
SDL_SetWindowGrab(SDL_Window * window, SDL_bool grabbed)
{
CHECK_WINDOW_MAGIC(window,);
if (!!grabbed == !!(window->flags & SDL_WINDOW_INPUT_GRABBED)) {
return;
}
if (grabbed) {
window->flags |= SDL_WINDOW_INPUT_GRABBED;
} else {
window->flags &= ~SDL_WINDOW_INPUT_GRABBED;
}
SDL_UpdateWindowGrab(window);
}
SDL_bool
SDL_GetWindowGrab(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window, SDL_FALSE);
SDL_assert(!_this->grabbed_window || ((_this->grabbed_window->flags & SDL_WINDOW_INPUT_GRABBED) != 0));
return window == _this->grabbed_window;
}
SDL_Window *
SDL_GetGrabbedWindow(void)
{
SDL_assert(!_this->grabbed_window || ((_this->grabbed_window->flags & SDL_WINDOW_INPUT_GRABBED) != 0));
return _this->grabbed_window;
}
void
SDL_OnWindowShown(SDL_Window * window)
{
SDL_OnWindowRestored(window);
}
void
SDL_OnWindowHidden(SDL_Window * window)
{
SDL_UpdateFullscreenMode(window, SDL_FALSE);
}
void
SDL_OnWindowResized(SDL_Window * window)
{
window->surface_valid = SDL_FALSE;
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_SIZE_CHANGED, window->w, window->h);
}
void
SDL_OnWindowMinimized(SDL_Window * window)
{
SDL_UpdateFullscreenMode(window, SDL_FALSE);
}
void
SDL_OnWindowRestored(SDL_Window * window)
{
/*
* FIXME: Is this fine to just remove this, or should it be preserved just
* for the fullscreen case? In principle it seems like just hiding/showing
* windows shouldn't affect the stacking order; maybe the right fix is to
* re-decouple OnWindowShown and OnWindowRestored.
*/
/*SDL_RaiseWindow(window);*/
if (FULLSCREEN_VISIBLE(window)) {
SDL_UpdateFullscreenMode(window, SDL_TRUE);
}
}
void
SDL_OnWindowEnter(SDL_Window * window)
{
if (_this->OnWindowEnter) {
_this->OnWindowEnter(_this, window);
}
}
void
SDL_OnWindowLeave(SDL_Window * window)
{
}
void
SDL_OnWindowFocusGained(SDL_Window * window)
{
SDL_Mouse *mouse = SDL_GetMouse();
if (window->gamma && _this->SetWindowGammaRamp) {
_this->SetWindowGammaRamp(_this, window, window->gamma);
}
if (mouse && mouse->relative_mode) {
SDL_SetMouseFocus(window);
SDL_WarpMouseInWindow(window, window->w/2, window->h/2);
}
SDL_UpdateWindowGrab(window);
}
static SDL_bool
ShouldMinimizeOnFocusLoss(SDL_Window * window)
{
const char *hint;
if (!(window->flags & SDL_WINDOW_FULLSCREEN) || window->is_destroying) {
return SDL_FALSE;
}
#ifdef __MACOSX__
if (Cocoa_IsWindowInFullscreenSpace(window)) {
return SDL_FALSE;
}
#endif
hint = SDL_GetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS);
if (hint) {
if (*hint == '0') {
return SDL_FALSE;
} else {
return SDL_TRUE;
}
}
return SDL_TRUE;
}
void
SDL_OnWindowFocusLost(SDL_Window * window)
{
if (window->gamma && _this->SetWindowGammaRamp) {
_this->SetWindowGammaRamp(_this, window, window->saved_gamma);
}
SDL_UpdateWindowGrab(window);
if (ShouldMinimizeOnFocusLoss(window)) {
SDL_MinimizeWindow(window);
}
}
/* !!! FIXME: is this different than SDL_GetKeyboardFocus()?
!!! FIXME: Also, SDL_GetKeyboardFocus() is O(1), this isn't. */
SDL_Window *
SDL_GetFocusWindow(void)
{
SDL_Window *window;
if (!_this) {
return NULL;
}
for (window = _this->windows; window; window = window->next) {
if (window->flags & SDL_WINDOW_INPUT_FOCUS) {
return window;
}
}
return NULL;
}
void
SDL_DestroyWindow(SDL_Window * window)
{
SDL_VideoDisplay *display;
CHECK_WINDOW_MAGIC(window,);
window->is_destroying = SDL_TRUE;
/* Restore video mode, etc. */
SDL_HideWindow(window);
/* Make sure this window no longer has focus */
if (SDL_GetKeyboardFocus() == window) {
SDL_SetKeyboardFocus(NULL);
}
if (SDL_GetMouseFocus() == window) {
SDL_SetMouseFocus(NULL);
}
/* make no context current if this is the current context window. */
if (window->flags & SDL_WINDOW_OPENGL) {
if (_this->current_glwin == window) {
SDL_GL_MakeCurrent(window, NULL);
}
}
if (window->surface) {
window->surface->flags &= ~SDL_DONTFREE;
SDL_FreeSurface(window->surface);
}
if (_this->DestroyWindowFramebuffer) {
_this->DestroyWindowFramebuffer(_this, window);
}
if (_this->DestroyWindow) {
_this->DestroyWindow(_this, window);
}
if (window->flags & SDL_WINDOW_OPENGL) {
SDL_GL_UnloadLibrary();
}
display = SDL_GetDisplayForWindow(window);
if (display->fullscreen_window == window) {
display->fullscreen_window = NULL;
}
/* Now invalidate magic */
window->magic = NULL;
/* Free memory associated with the window */
SDL_free(window->title);
SDL_FreeSurface(window->icon);
SDL_free(window->gamma);
while (window->data) {
SDL_WindowUserData *data = window->data;
window->data = data->next;
SDL_free(data->name);
SDL_free(data);
}
/* Unlink the window from the list */
if (window->next) {
window->next->prev = window->prev;
}
if (window->prev) {
window->prev->next = window->next;
} else {
_this->windows = window->next;
}
SDL_free(window);
}
SDL_bool
SDL_IsScreenSaverEnabled()
{
if (!_this) {
return SDL_TRUE;
}
return _this->suspend_screensaver ? SDL_FALSE : SDL_TRUE;
}
void
SDL_EnableScreenSaver()
{
if (!_this) {
return;
}
if (!_this->suspend_screensaver) {
return;
}
_this->suspend_screensaver = SDL_FALSE;
if (_this->SuspendScreenSaver) {
_this->SuspendScreenSaver(_this);
}
}
void
SDL_DisableScreenSaver()
{
if (!_this) {
return;
}
if (_this->suspend_screensaver) {
return;
}
_this->suspend_screensaver = SDL_TRUE;
if (_this->SuspendScreenSaver) {
_this->SuspendScreenSaver(_this);
}
}
void
SDL_VideoQuit(void)
{
int i, j;
if (!_this) {
return;
}
/* Halt event processing before doing anything else */
SDL_TouchQuit();
SDL_MouseQuit();
SDL_KeyboardQuit();
SDL_QuitSubSystem(SDL_INIT_EVENTS);
SDL_EnableScreenSaver();
/* Clean up the system video */
while (_this->windows) {
SDL_DestroyWindow(_this->windows);
}
_this->VideoQuit(_this);
for (i = 0; i < _this->num_displays; ++i) {
SDL_VideoDisplay *display = &_this->displays[i];
for (j = display->num_display_modes; j--;) {
SDL_free(display->display_modes[j].driverdata);
display->display_modes[j].driverdata = NULL;
}
SDL_free(display->display_modes);
display->display_modes = NULL;
SDL_free(display->desktop_mode.driverdata);
display->desktop_mode.driverdata = NULL;
SDL_free(display->driverdata);
display->driverdata = NULL;
}
if (_this->displays) {
for (i = 0; i < _this->num_displays; ++i) {
SDL_free(_this->displays[i].name);
}
SDL_free(_this->displays);
_this->displays = NULL;
_this->num_displays = 0;
}
SDL_free(_this->clipboard_text);
_this->clipboard_text = NULL;
_this->free(_this);
_this = NULL;
}
int
SDL_GL_LoadLibrary(const char *path)
{
int retval;
if (!_this) {
return SDL_UninitializedVideo();
}
if (_this->gl_config.driver_loaded) {
if (path && SDL_strcmp(path, _this->gl_config.driver_path) != 0) {
return SDL_SetError("OpenGL library already loaded");
}
retval = 0;
} else {
if (!_this->GL_LoadLibrary) {
return SDL_SetError("No dynamic GL support in video driver");
}
retval = _this->GL_LoadLibrary(_this, path);
}
if (retval == 0) {
++_this->gl_config.driver_loaded;
} else {
if (_this->GL_UnloadLibrary) {
_this->GL_UnloadLibrary(_this);
}
}
return (retval);
}
void *
SDL_GL_GetProcAddress(const char *proc)
{
void *func;
if (!_this) {
SDL_UninitializedVideo();
return NULL;
}
func = NULL;
if (_this->GL_GetProcAddress) {
if (_this->gl_config.driver_loaded) {
func = _this->GL_GetProcAddress(_this, proc);
} else {
SDL_SetError("No GL driver has been loaded");
}
} else {
SDL_SetError("No dynamic GL support in video driver");
}
return func;
}
void
SDL_GL_UnloadLibrary(void)
{
if (!_this) {
SDL_UninitializedVideo();
return;
}
if (_this->gl_config.driver_loaded > 0) {
if (--_this->gl_config.driver_loaded > 0) {
return;
}
if (_this->GL_UnloadLibrary) {
_this->GL_UnloadLibrary(_this);
}
}
}
static SDL_INLINE SDL_bool
isAtLeastGL3(const char *verstr)
{
return (verstr && (SDL_atoi(verstr) >= 3));
}
SDL_bool
SDL_GL_ExtensionSupported(const char *extension)
{
#if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
const GLubyte *(APIENTRY * glGetStringFunc) (GLenum);
const char *extensions;
const char *start;
const char *where, *terminator;
/* Extension names should not have spaces. */
where = SDL_strchr(extension, ' ');
if (where || *extension == '\0') {
return SDL_FALSE;
}
/* See if there's an environment variable override */
start = SDL_getenv(extension);
if (start && *start == '0') {
return SDL_FALSE;
}
/* Lookup the available extensions */
glGetStringFunc = SDL_GL_GetProcAddress("glGetString");
if (!glGetStringFunc) {
return SDL_FALSE;
}
if (isAtLeastGL3((const char *) glGetStringFunc(GL_VERSION))) {
const GLubyte *(APIENTRY * glGetStringiFunc) (GLenum, GLuint);
void (APIENTRY * glGetIntegervFunc) (GLenum pname, GLint * params);
GLint num_exts = 0;
GLint i;
glGetStringiFunc = SDL_GL_GetProcAddress("glGetStringi");
glGetIntegervFunc = SDL_GL_GetProcAddress("glGetIntegerv");
if ((!glGetStringiFunc) || (!glGetIntegervFunc)) {
return SDL_FALSE;
}
#ifndef GL_NUM_EXTENSIONS
#define GL_NUM_EXTENSIONS 0x821D
#endif
glGetIntegervFunc(GL_NUM_EXTENSIONS, &num_exts);
for (i = 0; i < num_exts; i++) {
const char *thisext = (const char *) glGetStringiFunc(GL_EXTENSIONS, i);
if (SDL_strcmp(thisext, extension) == 0) {
return SDL_TRUE;
}
}
return SDL_FALSE;
}
/* Try the old way with glGetString(GL_EXTENSIONS) ... */
extensions = (const char *) glGetStringFunc(GL_EXTENSIONS);
if (!extensions) {
return SDL_FALSE;
}
/*
* It takes a bit of care to be fool-proof about parsing the OpenGL
* extensions string. Don't be fooled by sub-strings, etc.
*/
start = extensions;
for (;;) {
where = SDL_strstr(start, extension);
if (!where)
break;
terminator = where + SDL_strlen(extension);
if (where == start || *(where - 1) == ' ')
if (*terminator == ' ' || *terminator == '\0')
return SDL_TRUE;
start = terminator;
}
return SDL_FALSE;
#else
return SDL_FALSE;
#endif
}
void
SDL_GL_ResetAttributes()
{
if (!_this) {
return;
}
_this->gl_config.red_size = 3;
_this->gl_config.green_size = 3;
_this->gl_config.blue_size = 2;
_this->gl_config.alpha_size = 0;
_this->gl_config.buffer_size = 0;
_this->gl_config.depth_size = 16;
_this->gl_config.stencil_size = 0;
_this->gl_config.double_buffer = 1;
_this->gl_config.accum_red_size = 0;
_this->gl_config.accum_green_size = 0;
_this->gl_config.accum_blue_size = 0;
_this->gl_config.accum_alpha_size = 0;
_this->gl_config.stereo = 0;
_this->gl_config.multisamplebuffers = 0;
_this->gl_config.multisamplesamples = 0;
_this->gl_config.retained_backing = 1;
_this->gl_config.accelerated = -1; /* accelerated or not, both are fine */
_this->gl_config.profile_mask = 0;
#if SDL_VIDEO_OPENGL
_this->gl_config.major_version = 2;
_this->gl_config.minor_version = 1;
#elif SDL_VIDEO_OPENGL_ES2
_this->gl_config.major_version = 2;
_this->gl_config.minor_version = 0;
_this->gl_config.profile_mask = SDL_GL_CONTEXT_PROFILE_ES;
#elif SDL_VIDEO_OPENGL_ES
_this->gl_config.major_version = 1;
_this->gl_config.minor_version = 1;
_this->gl_config.profile_mask = SDL_GL_CONTEXT_PROFILE_ES;
#endif
_this->gl_config.flags = 0;
_this->gl_config.framebuffer_srgb_capable = 0;
_this->gl_config.release_behavior = SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH;
_this->gl_config.share_with_current_context = 0;
}
int
SDL_GL_SetAttribute(SDL_GLattr attr, int value)
{
#if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
int retval;
if (!_this) {
return SDL_UninitializedVideo();
}
retval = 0;
switch (attr) {
case SDL_GL_RED_SIZE:
_this->gl_config.red_size = value;
break;
case SDL_GL_GREEN_SIZE:
_this->gl_config.green_size = value;
break;
case SDL_GL_BLUE_SIZE:
_this->gl_config.blue_size = value;
break;
case SDL_GL_ALPHA_SIZE:
_this->gl_config.alpha_size = value;
break;
case SDL_GL_DOUBLEBUFFER:
_this->gl_config.double_buffer = value;
break;
case SDL_GL_BUFFER_SIZE:
_this->gl_config.buffer_size = value;
break;
case SDL_GL_DEPTH_SIZE:
_this->gl_config.depth_size = value;
break;
case SDL_GL_STENCIL_SIZE:
_this->gl_config.stencil_size = value;
break;
case SDL_GL_ACCUM_RED_SIZE:
_this->gl_config.accum_red_size = value;
break;
case SDL_GL_ACCUM_GREEN_SIZE:
_this->gl_config.accum_green_size = value;
break;
case SDL_GL_ACCUM_BLUE_SIZE:
_this->gl_config.accum_blue_size = value;
break;
case SDL_GL_ACCUM_ALPHA_SIZE:
_this->gl_config.accum_alpha_size = value;
break;
case SDL_GL_STEREO:
_this->gl_config.stereo = value;
break;
case SDL_GL_MULTISAMPLEBUFFERS:
_this->gl_config.multisamplebuffers = value;
break;
case SDL_GL_MULTISAMPLESAMPLES:
_this->gl_config.multisamplesamples = value;
break;
case SDL_GL_ACCELERATED_VISUAL:
_this->gl_config.accelerated = value;
break;
case SDL_GL_RETAINED_BACKING:
_this->gl_config.retained_backing = value;
break;
case SDL_GL_CONTEXT_MAJOR_VERSION:
_this->gl_config.major_version = value;
break;
case SDL_GL_CONTEXT_MINOR_VERSION:
_this->gl_config.minor_version = value;
break;
case SDL_GL_CONTEXT_EGL:
/* FIXME: SDL_GL_CONTEXT_EGL to be deprecated in SDL 2.1 */
if (value != 0) {
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
} else {
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, 0);
};
break;
case SDL_GL_CONTEXT_FLAGS:
if (value & ~(SDL_GL_CONTEXT_DEBUG_FLAG |
SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG |
SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG |
SDL_GL_CONTEXT_RESET_ISOLATION_FLAG)) {
retval = SDL_SetError("Unknown OpenGL context flag %d", value);
break;
}
_this->gl_config.flags = value;
break;
case SDL_GL_CONTEXT_PROFILE_MASK:
if (value != 0 &&
value != SDL_GL_CONTEXT_PROFILE_CORE &&
value != SDL_GL_CONTEXT_PROFILE_COMPATIBILITY &&
value != SDL_GL_CONTEXT_PROFILE_ES) {
retval = SDL_SetError("Unknown OpenGL context profile %d", value);
break;
}
_this->gl_config.profile_mask = value;
break;
case SDL_GL_SHARE_WITH_CURRENT_CONTEXT:
_this->gl_config.share_with_current_context = value;
break;
case SDL_GL_FRAMEBUFFER_SRGB_CAPABLE:
_this->gl_config.framebuffer_srgb_capable = value;
break;
case SDL_GL_CONTEXT_RELEASE_BEHAVIOR:
_this->gl_config.release_behavior = value;
break;
default:
retval = SDL_SetError("Unknown OpenGL attribute");
break;
}
return retval;
#else
return SDL_Unsupported();
#endif /* SDL_VIDEO_OPENGL */
}
int
SDL_GL_GetAttribute(SDL_GLattr attr, int *value)
{
#if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
GLenum (APIENTRY *glGetErrorFunc) (void);
GLenum attrib = 0;
GLenum error = 0;
/*
* Some queries in Core Profile desktop OpenGL 3+ contexts require
* glGetFramebufferAttachmentParameteriv instead of glGetIntegerv. Note that
* the enums we use for the former function don't exist in OpenGL ES 2, and
* the function itself doesn't exist prior to OpenGL 3 and OpenGL ES 2.
*/
#if SDL_VIDEO_OPENGL
const GLubyte *(APIENTRY *glGetStringFunc) (GLenum name);
void (APIENTRY *glGetFramebufferAttachmentParameterivFunc) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
GLenum attachment = GL_BACK_LEFT;
GLenum attachmentattrib = 0;
#endif
/* Clear value in any case */
*value = 0;
switch (attr) {
case SDL_GL_RED_SIZE:
#if SDL_VIDEO_OPENGL
attachmentattrib = GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE;
#endif
attrib = GL_RED_BITS;
break;
case SDL_GL_BLUE_SIZE:
#if SDL_VIDEO_OPENGL
attachmentattrib = GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE;
#endif
attrib = GL_BLUE_BITS;
break;
case SDL_GL_GREEN_SIZE:
#if SDL_VIDEO_OPENGL
attachmentattrib = GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE;
#endif
attrib = GL_GREEN_BITS;
break;
case SDL_GL_ALPHA_SIZE:
#if SDL_VIDEO_OPENGL
attachmentattrib = GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE;
#endif
attrib = GL_ALPHA_BITS;
break;
case SDL_GL_DOUBLEBUFFER:
#if SDL_VIDEO_OPENGL
attrib = GL_DOUBLEBUFFER;
break;
#else
/* OpenGL ES 1.0 and above specifications have EGL_SINGLE_BUFFER */
/* parameter which switches double buffer to single buffer. OpenGL ES */
/* SDL driver must set proper value after initialization */
*value = _this->gl_config.double_buffer;
return 0;
#endif
case SDL_GL_DEPTH_SIZE:
#if SDL_VIDEO_OPENGL
attachment = GL_DEPTH;
attachmentattrib = GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE;
#endif
attrib = GL_DEPTH_BITS;
break;
case SDL_GL_STENCIL_SIZE:
#if SDL_VIDEO_OPENGL
attachment = GL_STENCIL;
attachmentattrib = GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE;
#endif
attrib = GL_STENCIL_BITS;
break;
#if SDL_VIDEO_OPENGL
case SDL_GL_ACCUM_RED_SIZE:
attrib = GL_ACCUM_RED_BITS;
break;
case SDL_GL_ACCUM_GREEN_SIZE:
attrib = GL_ACCUM_GREEN_BITS;
break;
case SDL_GL_ACCUM_BLUE_SIZE:
attrib = GL_ACCUM_BLUE_BITS;
break;
case SDL_GL_ACCUM_ALPHA_SIZE:
attrib = GL_ACCUM_ALPHA_BITS;
break;
case SDL_GL_STEREO:
attrib = GL_STEREO;
break;
#else
case SDL_GL_ACCUM_RED_SIZE:
case SDL_GL_ACCUM_GREEN_SIZE:
case SDL_GL_ACCUM_BLUE_SIZE:
case SDL_GL_ACCUM_ALPHA_SIZE:
case SDL_GL_STEREO:
/* none of these are supported in OpenGL ES */
*value = 0;
return 0;
#endif
case SDL_GL_MULTISAMPLEBUFFERS:
attrib = GL_SAMPLE_BUFFERS;
break;
case SDL_GL_MULTISAMPLESAMPLES:
attrib = GL_SAMPLES;
break;
case SDL_GL_CONTEXT_RELEASE_BEHAVIOR:
#if SDL_VIDEO_OPENGL
attrib = GL_CONTEXT_RELEASE_BEHAVIOR;
#else
attrib = GL_CONTEXT_RELEASE_BEHAVIOR_KHR;
#endif
break;
case SDL_GL_BUFFER_SIZE:
{
int rsize = 0, gsize = 0, bsize = 0, asize = 0;
/* There doesn't seem to be a single flag in OpenGL for this! */
if (SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &rsize) < 0) {
return -1;
}
if (SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &gsize) < 0) {
return -1;
}
if (SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &bsize) < 0) {
return -1;
}
if (SDL_GL_GetAttribute(SDL_GL_ALPHA_SIZE, &asize) < 0) {
return -1;
}
*value = rsize + gsize + bsize + asize;
return 0;
}
case SDL_GL_ACCELERATED_VISUAL:
{
/* FIXME: How do we get this information? */
*value = (_this->gl_config.accelerated != 0);
return 0;
}
case SDL_GL_RETAINED_BACKING:
{
*value = _this->gl_config.retained_backing;
return 0;
}
case SDL_GL_CONTEXT_MAJOR_VERSION:
{
*value = _this->gl_config.major_version;
return 0;
}
case SDL_GL_CONTEXT_MINOR_VERSION:
{
*value = _this->gl_config.minor_version;
return 0;
}
case SDL_GL_CONTEXT_EGL:
/* FIXME: SDL_GL_CONTEXT_EGL to be deprecated in SDL 2.1 */
{
if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) {
*value = 1;
}
else {
*value = 0;
}
return 0;
}
case SDL_GL_CONTEXT_FLAGS:
{
*value = _this->gl_config.flags;
return 0;
}
case SDL_GL_CONTEXT_PROFILE_MASK:
{
*value = _this->gl_config.profile_mask;
return 0;
}
case SDL_GL_SHARE_WITH_CURRENT_CONTEXT:
{
*value = _this->gl_config.share_with_current_context;
return 0;
}
case SDL_GL_FRAMEBUFFER_SRGB_CAPABLE:
{
*value = _this->gl_config.framebuffer_srgb_capable;
return 0;
}
default:
return SDL_SetError("Unknown OpenGL attribute");
}
#if SDL_VIDEO_OPENGL
glGetStringFunc = SDL_GL_GetProcAddress("glGetString");
if (!glGetStringFunc) {
return SDL_SetError("Failed getting OpenGL glGetString entry point");
}
if (attachmentattrib && isAtLeastGL3((const char *) glGetStringFunc(GL_VERSION))) {
glGetFramebufferAttachmentParameterivFunc = SDL_GL_GetProcAddress("glGetFramebufferAttachmentParameteriv");
if (glGetFramebufferAttachmentParameterivFunc) {
glGetFramebufferAttachmentParameterivFunc(GL_FRAMEBUFFER, attachment, attachmentattrib, (GLint *) value);
} else {
return SDL_SetError("Failed getting OpenGL glGetFramebufferAttachmentParameteriv entry point");
}
} else
#endif
{
void (APIENTRY *glGetIntegervFunc) (GLenum pname, GLint * params);
glGetIntegervFunc = SDL_GL_GetProcAddress("glGetIntegerv");
if (glGetIntegervFunc) {
glGetIntegervFunc(attrib, (GLint *) value);
} else {
return SDL_SetError("Failed getting OpenGL glGetIntegerv entry point");
}
}
glGetErrorFunc = SDL_GL_GetProcAddress("glGetError");
if (!glGetErrorFunc) {
return SDL_SetError("Failed getting OpenGL glGetError entry point");
}
error = glGetErrorFunc();
if (error != GL_NO_ERROR) {
if (error == GL_INVALID_ENUM) {
return SDL_SetError("OpenGL error: GL_INVALID_ENUM");
} else if (error == GL_INVALID_VALUE) {
return SDL_SetError("OpenGL error: GL_INVALID_VALUE");
}
return SDL_SetError("OpenGL error: %08X", error);
}
return 0;
#else
return SDL_Unsupported();
#endif /* SDL_VIDEO_OPENGL */
}
SDL_GLContext
SDL_GL_CreateContext(SDL_Window * window)
{
SDL_GLContext ctx = NULL;
CHECK_WINDOW_MAGIC(window, NULL);
if (!(window->flags & SDL_WINDOW_OPENGL)) {
SDL_SetError("The specified window isn't an OpenGL window");
return NULL;
}
ctx = _this->GL_CreateContext(_this, window);
/* Creating a context is assumed to make it current in the SDL driver. */
if (ctx) {
_this->current_glwin = window;
_this->current_glctx = ctx;
SDL_TLSSet(_this->current_glwin_tls, window, NULL);
SDL_TLSSet(_this->current_glctx_tls, ctx, NULL);
}
return ctx;
}
int
SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext ctx)
{
int retval;
if (window == SDL_GL_GetCurrentWindow() &&
ctx == SDL_GL_GetCurrentContext()) {
/* We're already current. */
return 0;
}
if (!ctx) {
window = NULL;
} else {
CHECK_WINDOW_MAGIC(window, -1);
if (!(window->flags & SDL_WINDOW_OPENGL)) {
return SDL_SetError("The specified window isn't an OpenGL window");
}
}
retval = _this->GL_MakeCurrent(_this, window, ctx);
if (retval == 0) {
_this->current_glwin = window;
_this->current_glctx = ctx;
SDL_TLSSet(_this->current_glwin_tls, window, NULL);
SDL_TLSSet(_this->current_glctx_tls, ctx, NULL);
}
return retval;
}
SDL_Window *
SDL_GL_GetCurrentWindow(void)
{
if (!_this) {
SDL_UninitializedVideo();
return NULL;
}
return (SDL_Window *)SDL_TLSGet(_this->current_glwin_tls);
}
SDL_GLContext
SDL_GL_GetCurrentContext(void)
{
if (!_this) {
SDL_UninitializedVideo();
return NULL;
}
return (SDL_GLContext)SDL_TLSGet(_this->current_glctx_tls);
}
void SDL_GL_GetDrawableSize(SDL_Window * window, int *w, int *h)
{
CHECK_WINDOW_MAGIC(window,);
if (_this->GL_GetDrawableSize) {
_this->GL_GetDrawableSize(_this, window, w, h);
} else {
SDL_GetWindowSize(window, w, h);
}
}
int
SDL_GL_SetSwapInterval(int interval)
{
if (!_this) {
return SDL_UninitializedVideo();
} else if (SDL_GL_GetCurrentContext() == NULL) {
return SDL_SetError("No OpenGL context has been made current");
} else if (_this->GL_SetSwapInterval) {
return _this->GL_SetSwapInterval(_this, interval);
} else {
return SDL_SetError("Setting the swap interval is not supported");
}
}
int
SDL_GL_GetSwapInterval(void)
{
if (!_this) {
return 0;
} else if (SDL_GL_GetCurrentContext() == NULL) {
return 0;
} else if (_this->GL_GetSwapInterval) {
return _this->GL_GetSwapInterval(_this);
} else {
return 0;
}
}
void
SDL_GL_SwapWindow(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window,);
if (!(window->flags & SDL_WINDOW_OPENGL)) {
SDL_SetError("The specified window isn't an OpenGL window");
return;
}
if (SDL_GL_GetCurrentWindow() != window) {
SDL_SetError("The specified window has not been made current");
return;
}
_this->GL_SwapWindow(_this, window);
}
void
SDL_GL_DeleteContext(SDL_GLContext context)
{
if (!_this || !context) {
return;
}
if (SDL_GL_GetCurrentContext() == context) {
SDL_GL_MakeCurrent(NULL, NULL);
}
_this->GL_DeleteContext(_this, context);
}
#if 0 /* FIXME */
/*
* Utility function used by SDL_WM_SetIcon(); flags & 1 for color key, flags
* & 2 for alpha channel.
*/
static void
CreateMaskFromColorKeyOrAlpha(SDL_Surface * icon, Uint8 * mask, int flags)
{
int x, y;
Uint32 colorkey;
#define SET_MASKBIT(icon, x, y, mask) \
mask[(y*((icon->w+7)/8))+(x/8)] &= ~(0x01<<(7-(x%8)))
colorkey = icon->format->colorkey;
switch (icon->format->BytesPerPixel) {
case 1:
{
Uint8 *pixels;
for (y = 0; y < icon->h; ++y) {
pixels = (Uint8 *) icon->pixels + y * icon->pitch;
for (x = 0; x < icon->w; ++x) {
if (*pixels++ == colorkey) {
SET_MASKBIT(icon, x, y, mask);
}
}
}
}
break;
case 2:
{
Uint16 *pixels;
for (y = 0; y < icon->h; ++y) {
pixels = (Uint16 *) icon->pixels + y * icon->pitch / 2;
for (x = 0; x < icon->w; ++x) {
if ((flags & 1) && *pixels == colorkey) {
SET_MASKBIT(icon, x, y, mask);
} else if ((flags & 2)
&& (*pixels & icon->format->Amask) == 0) {
SET_MASKBIT(icon, x, y, mask);
}
pixels++;
}
}
}
break;
case 4:
{
Uint32 *pixels;
for (y = 0; y < icon->h; ++y) {
pixels = (Uint32 *) icon->pixels + y * icon->pitch / 4;
for (x = 0; x < icon->w; ++x) {
if ((flags & 1) && *pixels == colorkey) {
SET_MASKBIT(icon, x, y, mask);
} else if ((flags & 2)
&& (*pixels & icon->format->Amask) == 0) {
SET_MASKBIT(icon, x, y, mask);
}
pixels++;
}
}
}
break;
}
}
/*
* Sets the window manager icon for the display window.
*/
void
SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask)
{
if (icon && _this->SetIcon) {
/* Generate a mask if necessary, and create the icon! */
if (mask == NULL) {
int mask_len = icon->h * (icon->w + 7) / 8;
int flags = 0;
mask = (Uint8 *) SDL_malloc(mask_len);
if (mask == NULL) {
return;
}
SDL_memset(mask, ~0, mask_len);
if (icon->flags & SDL_SRCCOLORKEY)
flags |= 1;
if (icon->flags & SDL_SRCALPHA)
flags |= 2;
if (flags) {
CreateMaskFromColorKeyOrAlpha(icon, mask, flags);
}
_this->SetIcon(_this, icon, mask);
SDL_free(mask);
} else {
_this->SetIcon(_this, icon, mask);
}
}
}
#endif
SDL_bool
SDL_GetWindowWMInfo(SDL_Window * window, struct SDL_SysWMinfo *info)
{
CHECK_WINDOW_MAGIC(window, SDL_FALSE);
if (!info) {
SDL_InvalidParamError("info");
return SDL_FALSE;
}
info->subsystem = SDL_SYSWM_UNKNOWN;
if (!_this->GetWindowWMInfo) {
SDL_Unsupported();
return SDL_FALSE;
}
return (_this->GetWindowWMInfo(_this, window, info));
}
void
SDL_StartTextInput(void)
{
SDL_Window *window;
/* First, enable text events */
SDL_EventState(SDL_TEXTINPUT, SDL_ENABLE);
SDL_EventState(SDL_TEXTEDITING, SDL_ENABLE);
/* Then show the on-screen keyboard, if any */
window = SDL_GetFocusWindow();
if (window && _this && _this->ShowScreenKeyboard) {
_this->ShowScreenKeyboard(_this, window);
}
/* Finally start the text input system */
if (_this && _this->StartTextInput) {
_this->StartTextInput(_this);
}
}
SDL_bool
SDL_IsTextInputActive(void)
{
return (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE);
}
void
SDL_StopTextInput(void)
{
SDL_Window *window;
/* Stop the text input system */
if (_this && _this->StopTextInput) {
_this->StopTextInput(_this);
}
/* Hide the on-screen keyboard, if any */
window = SDL_GetFocusWindow();
if (window && _this && _this->HideScreenKeyboard) {
_this->HideScreenKeyboard(_this, window);
}
/* Finally disable text events */
SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE);
SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE);
}
void
SDL_SetTextInputRect(SDL_Rect *rect)
{
if (_this && _this->SetTextInputRect) {
_this->SetTextInputRect(_this, rect);
}
}
SDL_bool
SDL_HasScreenKeyboardSupport(void)
{
if (_this && _this->HasScreenKeyboardSupport) {
return _this->HasScreenKeyboardSupport(_this);
}
return SDL_FALSE;
}
SDL_bool
SDL_IsScreenKeyboardShown(SDL_Window *window)
{
if (window && _this && _this->IsScreenKeyboardShown) {
return _this->IsScreenKeyboardShown(_this, window);
}
return SDL_FALSE;
}
#if SDL_VIDEO_DRIVER_ANDROID
#include "android/SDL_androidmessagebox.h"
#endif
#if SDL_VIDEO_DRIVER_WINDOWS
#include "windows/SDL_windowsmessagebox.h"
#endif
#if SDL_VIDEO_DRIVER_WINRT
#include "winrt/SDL_winrtmessagebox.h"
#endif
#if SDL_VIDEO_DRIVER_COCOA
#include "cocoa/SDL_cocoamessagebox.h"
#endif
#if SDL_VIDEO_DRIVER_UIKIT
#include "uikit/SDL_uikitmessagebox.h"
#endif
#if SDL_VIDEO_DRIVER_X11
#include "x11/SDL_x11messagebox.h"
#endif
// This function will be unused if none of the above video drivers are present.
SDL_UNUSED static SDL_bool SDL_MessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
{
SDL_SysWMinfo info;
SDL_Window *window = messageboxdata->window;
if (!window) {
return SDL_TRUE;
}
SDL_VERSION(&info.version);
if (!SDL_GetWindowWMInfo(window, &info)) {
return SDL_TRUE;
} else {
return (info.subsystem == drivertype);
}
}
int
SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
{
int dummybutton;
int retval = -1;
SDL_bool relative_mode;
int show_cursor_prev;
SDL_bool mouse_captured;
SDL_Window *current_window;
if (!messageboxdata) {
return SDL_InvalidParamError("messageboxdata");
}
current_window = SDL_GetKeyboardFocus();
mouse_captured = current_window && ((SDL_GetWindowFlags(current_window) & SDL_WINDOW_MOUSE_CAPTURE) != 0);
relative_mode = SDL_GetRelativeMouseMode();
SDL_CaptureMouse(SDL_FALSE);
SDL_SetRelativeMouseMode(SDL_FALSE);
show_cursor_prev = SDL_ShowCursor(1);
SDL_ResetKeyboard();
if (!buttonid) {
buttonid = &dummybutton;
}
if (_this && _this->ShowMessageBox) {
retval = _this->ShowMessageBox(_this, messageboxdata, buttonid);
}
/* It's completely fine to call this function before video is initialized */
#if SDL_VIDEO_DRIVER_ANDROID
if (retval == -1 &&
Android_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
#endif
#if SDL_VIDEO_DRIVER_WINDOWS
if (retval == -1 &&
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WINDOWS) &&
WIN_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
#endif
#if SDL_VIDEO_DRIVER_WINRT
if (retval == -1 &&
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WINRT) &&
WINRT_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
#endif
#if SDL_VIDEO_DRIVER_COCOA
if (retval == -1 &&
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_COCOA) &&
Cocoa_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
#endif
#if SDL_VIDEO_DRIVER_UIKIT
if (retval == -1 &&
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_UIKIT) &&
UIKit_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
#endif
#if SDL_VIDEO_DRIVER_X11
if (retval == -1 &&
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
#endif
if (retval == -1) {
SDL_SetError("No message system available");
}
if (current_window) {
SDL_RaiseWindow(current_window);
if (mouse_captured) {
SDL_CaptureMouse(SDL_TRUE);
}
}
SDL_ShowCursor(show_cursor_prev);
SDL_SetRelativeMouseMode(relative_mode);
return retval;
}
int
SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window)
{
SDL_MessageBoxData data;
SDL_MessageBoxButtonData button;
SDL_zero(data);
data.flags = flags;
data.title = title;
data.message = message;
data.numbuttons = 1;
data.buttons = &button;
data.window = window;
SDL_zero(button);
button.flags |= SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT;
button.flags |= SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT;
button.text = "OK";
return SDL_ShowMessageBox(&data, NULL);
}
SDL_bool
SDL_ShouldAllowTopmost(void)
{
const char *hint = SDL_GetHint(SDL_HINT_ALLOW_TOPMOST);
if (hint) {
if (*hint == '0') {
return SDL_FALSE;
} else {
return SDL_TRUE;
}
}
return SDL_TRUE;
}
int
SDL_SetWindowHitTest(SDL_Window * window, SDL_HitTest callback, void *userdata)
{
CHECK_WINDOW_MAGIC(window, -1);
if (!_this->SetWindowHitTest) {
return SDL_Unsupported();
} else if (_this->SetWindowHitTest(window, callback != NULL) == -1) {
return -1;
}
window->hit_test = callback;
window->hit_test_data = userdata;
return 0;
}
float SDL_ComputeDiagonalDPI(int hpix, int vpix, float hinches, float vinches)
{
float den2 = hinches * hinches + vinches * vinches;
if ( den2 <= 0.0f ) {
return 0.0f;
}
return (float)(SDL_sqrt((double)hpix * (double)hpix + (double)vpix * (double)vpix) /
SDL_sqrt((double)den2));
}
/* vi: set ts=4 sw=4 expandtab: */
```
|
Polyspora axillaris () is a species of evergreen trees or shrubs that can grow up to 9 m tall. It has been given the name "Fried Egg Plant" for its white and yellow flower.
P. axillaris is found in Southern China, including Hong Kong and Hainan. Is also grows in the wild in Taiwan and Vietnam, and is a garden tree all over the world.
While earlier grouped under Gordonia, the genus Polyspora has been found to be not closely related to the North American species, thus transferring the species to its own genus.
Description
Polyspora axillaris grows on hillsides, and is adapted to holding on to slopes while being exposed to rain and storms. Its brown bark peels off in rather large smooth pieces. The fruit superficially resembles the green part of an acorn.
The flowers are rather big, with five white petals, and many yellow anthers. They are fragrant and attract bees and butterflies.
Some flowers grow in the leaf axils, leading to its scientific name, P. axillaris. The flower will fall off the tree before wilting.
Distribution
Polyspora axillaris is normally found in forests and thickets at elevations of 100 – 800 m, but has been found at elevations up to 2300 m. It occurs in Guangdong, Guangxi, Hainan, Taiwan and Hong Kong.
In Hong Kong, it is common on hillsides, such as those of Lion Rock.
Gallery
References
Theaceae
Trees of Hong Kong
|
```java
package com.yahoo.jrt;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class QueueTest {
@org.junit.Test
public void testEmpty() {
Queue queue = new Queue();
assertTrue(queue.isEmpty());
assertTrue(queue.size() == 0);
assertTrue(queue.dequeue() == null);
queue.enqueue(new Object());
assertFalse(queue.isEmpty());
assertFalse(queue.size() == 0);
assertFalse(queue.dequeue() == null);
}
@org.junit.Test
public void testEnqueueDequeue() {
Queue queue = new Queue();
Integer int1 = 1;
Integer int2 = 2;
Integer int3 = 3;
Integer int4 = 4;
Integer int5 = 5;
assertEquals(queue.size(), 0);
queue.enqueue(int1);
assertEquals(queue.size(), 1);
assertTrue(queue.dequeue() == int1);
assertEquals(queue.size(), 0);
queue.enqueue(int1);
assertEquals(queue.size(), 1);
queue.enqueue(int2);
assertEquals(queue.size(), 2);
queue.enqueue(int3);
assertEquals(queue.size(), 3);
assertTrue(queue.dequeue() == int1);
assertEquals(queue.size(), 2);
assertTrue(queue.dequeue() == int2);
assertEquals(queue.size(), 1);
assertTrue(queue.dequeue() == int3);
assertEquals(queue.size(), 0);
queue.enqueue(int1);
assertEquals(queue.size(), 1);
queue.enqueue(int2);
assertEquals(queue.size(), 2);
queue.enqueue(int3);
assertEquals(queue.size(), 3);
assertTrue(queue.dequeue() == int1);
assertEquals(queue.size(), 2);
assertTrue(queue.dequeue() == int2);
assertEquals(queue.size(), 1);
queue.enqueue(int4);
assertEquals(queue.size(), 2);
queue.enqueue(int5);
assertEquals(queue.size(), 3);
assertTrue(queue.dequeue() == int3);
assertEquals(queue.size(), 2);
assertTrue(queue.dequeue() == int4);
assertEquals(queue.size(), 1);
assertTrue(queue.dequeue() == int5);
assertEquals(queue.size(), 0);
}
@org.junit.Test
public void testFlush() {
Queue src = new Queue();
Queue dst = new Queue();
Integer int1 = 1;
Integer int2 = 2;
Integer int3 = 3;
assertTrue(src.flush(dst) == 0);
assertEquals(src.size(), 0);
assertEquals(dst.size(), 0);
src.enqueue(int1);
src.enqueue(int2);
src.enqueue(int3);
assertEquals(src.size(), 3);
assertEquals(dst.size(), 0);
assertTrue(src.flush(dst) == 3);
assertEquals(src.size(), 0);
assertEquals(dst.size(), 3);
assertTrue(dst.dequeue() == int1);
assertTrue(dst.dequeue() == int2);
assertTrue(dst.dequeue() == int3);
}
}
```
|
Les Taylor is a former American basketball player best known for his collegiate career at Murray State University between 1970 and 1973. A native of Carbondale, Illinois, Taylor starred at Carbondale Community High School in basketball before enrolling at Murray State. He was named an All-American, and at the time of his decision to attend Murray State he was one of the most highly sought-after recruits the school had ever signed.
During Taylor's first season in 1969–70, NCAA rules prohibited freshmen from playing on their colleges' varsity sports teams, so Taylor played for Murray State's freshman squad and averaged 22.4 points per game. When he became eligible as a sophomore in 1970–71, the 6'3" small forward averaged 15.8 points and 8.8 rebounds per game en route to his first of three consecutive All-Ohio Valley Conference First Team honors. He was also named the conference's Sophomore of the Year. During Taylor's junior season, he averaged a still-standing school record 25.6 points per game (good for eighth in the nation) and twice scored 39 points in a single game. He was named the Evansville Holiday Tournament MVP, and at the end of the season was declared the Ohio Valley Conference Men's Basketball Player of the Year. In his final season, Taylor led the team in scoring and assists per game with averaged of 22.4 and 3.3, respectively. He earned his second consecutive conference player of the year honor as well.
The Cleveland Cavaliers selected him in the ninth round (142nd overall) in the 1973 NBA draft. In the 1973 ABA Draft, the Kentucky Colonels chose him in the seventh round. Despite getting drafted into two different basketball leagues, he played in neither. Taylor was inducted into the Murray State University Hall of Fame in 1987.
References
Year of birth missing (living people)
Living people
American men's basketball players
Basketball players from Illinois
Cleveland Cavaliers draft picks
Kentucky Colonels draft picks
Murray State Racers men's basketball players
People from Carbondale, Illinois
Small forwards
|
```hcl
#
#
# 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.
variable "project_id" {
type = string
description = "GCP project id"
}
variable "namespace" {
type = string
description = "Kubernetes namespace where resources are deployed"
default = "example"
}
variable "service_account" {
type = string
description = "Google Cloud IAM service account for authenticating with GCP services"
default = "gcsfuse-sa"
}
variable "k8s_service_account" {
type = string
description = "k8s service account"
default = "gcsfuse-ksa"
}
variable "gcs_bucket" {
type = string
description = "GCS Bucket name"
default = "test-gcsfuse"
}
```
|
```yaml
apiVersion: v1
data:
config: |-
policy: enabled
alwaysInjectSelector:
[]
neverInjectSelector:
[]
template: |
rewriteAppHTTPProbe: {{ valueOrDefault .Values.sidecarInjectorWebhook.rewriteAppHTTPProbe false }}
{{- if or (not .Values.pilot.cni.enabled) .Values.global.proxy.enableCoreDump }}
initContainers:
{{ if ne (annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode) `NONE` }}
{{- if not .Values.pilot.cni.enabled }}
- name: istio-init
{{- if contains "/" .Values.global.proxy_init.image }}
image: "{{ .Values.global.proxy_init.image }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.global.proxy_init.image }}:{{ .Values.global.tag }}"
{{- end }}
command:
- istio-iptables
- "-p"
- 15001
- "-z"
- "15006"
- "-u"
- 1337
- "-m"
- "{{ annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode }}"
- "-i"
- "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeOutboundIPRanges` .Values.global.proxy.includeIPRanges }}"
- "-x"
- "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/excludeOutboundIPRanges` .Values.global.proxy.excludeIPRanges }}"
- "-b"
- "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeInboundPorts` `*` }}"
- "-d"
- "{{ excludeInboundPort (annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort) (annotation .ObjectMeta `traffic.sidecar.istio.io/excludeInboundPorts` .Values.global.proxy.excludeInboundPorts) }}"
{{ if or (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/includeOutboundPorts`) (ne (valueOrDefault .Values.global.proxy.includeOutboundPorts "") "") -}}
- "-q"
- "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeOutboundPorts` .Values.global.proxy.includeOutboundPorts }}"
{{ end -}}
{{ if or (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/excludeOutboundPorts`) (ne (valueOrDefault .Values.global.proxy.excludeOutboundPorts "") "") -}}
- "-o"
- "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/excludeOutboundPorts` .Values.global.proxy.excludeOutboundPorts }}"
{{ end -}}
{{ if (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/kubevirtInterfaces`) -}}
- "-k"
- "{{ index .ObjectMeta.Annotations `traffic.sidecar.istio.io/kubevirtInterfaces` }}"
{{ end -}}
imagePullPolicy: "{{ valueOrDefault .Values.global.imagePullPolicy `Always` }}"
{{- if .Values.global.proxy_init.resources }}
resources:
{{ toYaml .Values.global.proxy_init.resources | indent 4 }}
{{- else }}
resources: {}
{{- end }}
securityContext:
runAsUser: 0
runAsNonRoot: false
capabilities:
add:
- NET_ADMIN
{{- if .Values.global.proxy.privileged }}
privileged: true
{{- end }}
restartPolicy: Always
{{- end }}
{{ end -}}
{{- if eq .Values.global.proxy.enableCoreDump true }}
- name: enable-core-dump
args:
- -c
- sysctl -w kernel.core_pattern=/var/lib/istio/core.proxy && ulimit -c unlimited
command:
- /bin/sh
{{- if contains "/" .Values.global.proxy_init.image }}
image: "{{ .Values.global.proxy_init.image }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.global.proxy_init.image }}:{{ .Values.global.tag }}"
{{- end }}
imagePullPolicy: "{{ valueOrDefault .Values.global.imagePullPolicy `Always` }}"
resources: {}
securityContext:
runAsUser: 0
runAsNonRoot: false
privileged: true
{{ end }}
{{- end }}
containers:
- name: istio-proxy
{{- if contains "/" (annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image) }}
image: "{{ annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.global.proxy.image }}:{{ .Values.global.tag }}"
{{- end }}
ports:
- containerPort: 15090
protocol: TCP
name: http-envoy-prom
args:
- proxy
- sidecar
- --domain
- $(POD_NAMESPACE).svc.{{ .Values.global.proxy.clusterDomain }}
- --configPath
- "/etc/istio/proxy"
- --binaryPath
- "/usr/local/bin/envoy"
- --serviceCluster
{{ if ne "" (index .ObjectMeta.Labels "app") -}}
- "{{ index .ObjectMeta.Labels `app` }}.$(POD_NAMESPACE)"
{{ else -}}
- "{{ valueOrDefault .DeploymentMeta.Name `istio-proxy` }}.{{ valueOrDefault .DeploymentMeta.Namespace `default` }}"
{{ end -}}
- --drainDuration
- "{{ formatDuration .ProxyConfig.DrainDuration }}"
- --discoveryAddress
- "{{ annotation .ObjectMeta `sidecar.istio.io/discoveryAddress` .ProxyConfig.DiscoveryAddress }}"
{{- if eq .Values.global.proxy.tracer "lightstep" }}
- --lightstepAddress
- "{{ .ProxyConfig.GetTracing.GetLightstep.GetAddress }}"
- --lightstepAccessToken
- "{{ .ProxyConfig.GetTracing.GetLightstep.GetAccessToken }}"
- --lightstepSecure={{ .ProxyConfig.GetTracing.GetLightstep.GetSecure }}
- --lightstepCacertPath
- "{{ .ProxyConfig.GetTracing.GetLightstep.GetCacertPath }}"
{{- else if eq .Values.global.proxy.tracer "zipkin" }}
- --zipkinAddress
- "{{ .ProxyConfig.GetTracing.GetZipkin.GetAddress }}"
{{- else if eq .Values.global.proxy.tracer "datadog" }}
- --datadogAgentAddress
- "{{ .ProxyConfig.GetTracing.GetDatadog.GetAddress }}"
{{- end }}
- --proxyLogLevel={{ annotation .ObjectMeta `sidecar.istio.io/logLevel` .Values.global.proxy.logLevel}}
- --proxyComponentLogLevel={{ annotation .ObjectMeta `sidecar.istio.io/componentLogLevel` .Values.global.proxy.componentLogLevel}}
- --connectTimeout
- "{{ formatDuration .ProxyConfig.ConnectTimeout }}"
{{- if .Values.global.proxy.envoyStatsd.enabled }}
- --statsdUdpAddress
- "{{ .ProxyConfig.StatsdUdpAddress }}"
{{- end }}
{{- if .Values.global.proxy.envoyMetricsService.enabled }}
- --envoyMetricsServiceAddress
- "{{ .ProxyConfig.GetEnvoyMetricsService.GetAddress }}"
{{- end }}
{{- if .Values.global.proxy.envoyAccessLogService.enabled }}
- --envoyAccessLogServiceAddress
- "{{ .ProxyConfig.GetEnvoyAccessLogService.GetAddress }}"
{{- end }}
- --proxyAdminPort
- "{{ .ProxyConfig.ProxyAdminPort }}"
{{ if gt .ProxyConfig.Concurrency 0 -}}
- --concurrency
- "{{ .ProxyConfig.Concurrency }}"
{{ end -}}
{{- if .Values.global.controlPlaneSecurityEnabled }}
- --controlPlaneAuthPolicy
- MUTUAL_TLS
{{- else }}
- --controlPlaneAuthPolicy
- NONE
{{- end }}
- --dnsRefreshRate
- {{ valueOrDefault .Values.global.proxy.dnsRefreshRate "300s" }}
{{- if (ne (annotation .ObjectMeta "status.sidecar.istio.io/port" .Values.global.proxy.statusPort) "0") }}
- --statusPort
- "{{ annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort }}"
- --applicationPorts
- "{{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/applicationPorts` (applicationPorts .Spec.Containers) }}"
{{- end }}
{{- if .Values.global.logAsJson }}
- --log_as_json
{{- end }}
{{- if (isset .ObjectMeta.Annotations `sidecar.istio.io/bootstrapOverride`) }}
- --templateFile=/etc/istio/custom-bootstrap/envoy_bootstrap.json
{{- end }}
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: INSTANCE_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: SERVICE_ACCOUNT
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
{{- if eq .Values.global.proxy.tracer "datadog" }}
{{- if isset .ObjectMeta.Annotations `apm.datadoghq.com/env` }}
{{- range $key, $value := fromJSON (index .ObjectMeta.Annotations `apm.datadoghq.com/env`) }}
- name: {{ $key }}
value: "{{ $value }}"
{{- end }}
{{- end }}
{{- end }}
- name: ISTIO_META_POD_PORTS
value: |-
[
{{- $first := true }}
{{- range $index1, $c := .Spec.Containers }}
{{- range $index2, $p := $c.Ports }}
{{- if (structToJSON $p) }}
{{if not $first}},{{end}}{{ structToJSON $p }}
{{- $first = false }}
{{- end }}
{{- end}}
{{- end}}
]
- name: ISTIO_META_CLUSTER_ID
value: "{{ valueOrDefault .Values.global.multiCluster.clusterName `Kubernetes` }}"
- name: ISTIO_META_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: ISTIO_META_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: ISTIO_META_CONFIG_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SDS_ENABLED
value: "{{ .Values.global.sds.enabled }}"
- name: ISTIO_META_INTERCEPTION_MODE
value: "{{ or (index .ObjectMeta.Annotations `sidecar.istio.io/interceptionMode`) .ProxyConfig.InterceptionMode.String }}"
- name: ISTIO_META_INCLUDE_INBOUND_PORTS
value: "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeInboundPorts` (applicationPorts .Spec.Containers) }}"
{{- if .Values.global.network }}
- name: ISTIO_META_NETWORK
value: "{{ .Values.global.network }}"
{{- end }}
{{ if .ObjectMeta.Labels }}
- name: ISTIO_METAJSON_LABELS
value: |
{{ toJSON .ObjectMeta.Labels }}
{{ end }}
{{- if .DeploymentMeta.Name }}
- name: ISTIO_META_WORKLOAD_NAME
value: {{ .DeploymentMeta.Name }}
{{ end }}
{{- if and .TypeMeta.APIVersion .DeploymentMeta.Name }}
- name: ISTIO_META_OWNER
value: kubernetes://apis/{{ .TypeMeta.APIVersion }}/namespaces/{{ valueOrDefault .DeploymentMeta.Namespace `default` }}/{{ toLower .TypeMeta.Kind}}s/{{ .DeploymentMeta.Name }}
{{- end}}
{{- if (isset .ObjectMeta.Annotations `sidecar.istio.io/bootstrapOverride`) }}
- name: ISTIO_BOOTSTRAP_OVERRIDE
value: "/etc/istio/custom-bootstrap/custom_bootstrap.json"
{{- end }}
{{- if .Values.global.sds.customTokenDirectory }}
- name: ISTIO_META_SDS_TOKEN_PATH
value: "{{ .Values.global.sds.customTokenDirectory -}}/sdstoken"
{{- end }}
{{- if .Values.global.meshID }}
- name: ISTIO_META_MESH_ID
value: "{{ .Values.global.meshID }}"
{{- else if .Values.global.trustDomain }}
- name: ISTIO_META_MESH_ID
value: "{{ .Values.global.trustDomain }}"
{{- end }}
{{- if and (eq .Values.global.proxy.tracer "datadog") (isset .ObjectMeta.Annotations `apm.datadoghq.com/env`) }}
{{- range $key, $value := fromJSON (index .ObjectMeta.Annotations `apm.datadoghq.com/env`) }}
- name: {{ $key }}
value: "{{ $value }}"
{{- end }}
{{- end }}
imagePullPolicy: "{{ valueOrDefault .Values.global.imagePullPolicy `Always` }}"
{{ if ne (annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort) `0` }}
readinessProbe:
httpGet:
path: /healthz/ready
port: {{ annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort }}
initialDelaySeconds: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/initialDelaySeconds` .Values.global.proxy.readinessInitialDelaySeconds }}
periodSeconds: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/periodSeconds` .Values.global.proxy.readinessPeriodSeconds }}
failureThreshold: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/failureThreshold` .Values.global.proxy.readinessFailureThreshold }}
{{ end -}}
securityContext:
{{- if .Values.global.proxy.privileged }}
privileged: true
{{- end }}
{{- if ne .Values.global.proxy.enableCoreDump true }}
readOnlyRootFilesystem: true
{{- end }}
{{ if eq (annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode) `TPROXY` -}}
capabilities:
add:
- NET_ADMIN
runAsGroup: 1337
{{ else -}}
{{ if .Values.global.sds.enabled }}
runAsGroup: 1337
{{- end }}
runAsUser: 1337
{{- end }}
resources:
{{ if or (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory`) -}}
requests:
{{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU`) -}}
cpu: "{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU` }}"
{{ end}}
{{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory`) -}}
memory: "{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory` }}"
{{ end }}
{{ else -}}
{{- if .Values.global.proxy.resources }}
{{ toYaml .Values.global.proxy.resources | indent 4 }}
{{- end }}
{{ end -}}
volumeMounts:
{{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/bootstrapOverride`) }}
- mountPath: /etc/istio/custom-bootstrap
name: custom-bootstrap-volume
{{- end }}
- mountPath: /etc/istio/proxy
name: istio-envoy
{{- if .Values.global.sds.enabled }}
- mountPath: /var/run/sds
name: sds-uds-path
readOnly: true
- mountPath: /var/run/secrets/tokens
name: istio-token
{{- if .Values.global.sds.customTokenDirectory }}
- mountPath: "{{ .Values.global.sds.customTokenDirectory -}}"
name: custom-sds-token
readOnly: true
{{- end }}
{{- else }}
- mountPath: /etc/certs/
name: istio-certs
readOnly: true
{{- end }}
{{- if and (eq .Values.global.proxy.tracer "lightstep") .Values.global.tracer.lightstep.cacertPath }}
- mountPath: {{ directory .ProxyConfig.GetTracing.GetLightstep.GetCacertPath }}
name: lightstep-certs
readOnly: true
{{- end }}
{{- if isset .ObjectMeta.Annotations `sidecar.istio.io/userVolumeMount` }}
{{ range $index, $value := fromJSON (index .ObjectMeta.Annotations `sidecar.istio.io/userVolumeMount`) }}
- name: "{{ $index }}"
{{ toYaml $value | indent 4 }}
{{ end }}
{{- end }}
volumes:
{{- if (isset .ObjectMeta.Annotations `sidecar.istio.io/bootstrapOverride`) }}
- name: custom-bootstrap-volume
configMap:
name: {{ annotation .ObjectMeta `sidecar.istio.io/bootstrapOverride` "" }}
{{- end }}
- emptyDir:
medium: Memory
name: istio-envoy
{{- if .Values.global.sds.enabled }}
- name: sds-uds-path
hostPath:
path: /var/run/sds
- name: istio-token
projected:
sources:
- serviceAccountToken:
path: istio-token
expirationSeconds: 43200
audience: {{ .Values.global.sds.token.aud }}
{{- if .Values.global.sds.customTokenDirectory }}
- name: custom-sds-token
secret:
secretName: sdstokensecret
{{- end }}
{{- else }}
- name: istio-certs
secret:
optional: true
{{ if eq .Spec.ServiceAccountName "" }}
secretName: istio.default
{{ else -}}
secretName: {{ printf "istio.%s" .Spec.ServiceAccountName }}
{{ end -}}
{{- if isset .ObjectMeta.Annotations `sidecar.istio.io/userVolume` }}
{{range $index, $value := fromJSON (index .ObjectMeta.Annotations `sidecar.istio.io/userVolume`) }}
- name: "{{ $index }}"
{{ toYaml $value | indent 2 }}
{{ end }}
{{ end }}
{{- end }}
{{- if and (eq .Values.global.proxy.tracer "lightstep") .Values.global.tracer.lightstep.cacertPath }}
- name: lightstep-certs
secret:
optional: true
secretName: lightstep.cacert
{{- end }}
{{- if .Values.global.podDNSSearchNamespaces }}
dnsConfig:
searches:
{{- range .Values.global.podDNSSearchNamespaces }}
- {{ render . }}
{{- end }}
{{- end }}
injectedAnnotations:
values: '{"certmanager":{"enabled":false,"hub":"quay.io/jetstack","image":"cert-manager-controller","namespace":"istio-system","tag":"v0.6.2"},"cni":{"namespace":"istio-system"},"galley":{"enableAnalysis":false,"enabled":true,"image":"galley","namespace":"istio-system"},"gateways":{"istio-egressgateway":{"autoscaleEnabled":true,"enabled":false,"namespace":"istio-system","ports":[{"name":"http2","port":80},{"name":"https","port":443},{"name":"tls","port":15443,"targetPort":15443}],"secretVolumes":[{"mountPath":"/etc/istio/egressgateway-certs","name":"egressgateway-certs","secretName":"istio-egressgateway-certs"},{"mountPath":"/etc/istio/egressgateway-ca-certs","name":"egressgateway-ca-certs","secretName":"istio-egressgateway-ca-certs"}],"type":"ClusterIP","zvpn":{"enabled":true,"suffix":"global"}},"istio-ingressgateway":{"applicationPorts":"","autoscaleEnabled":true,"debug":"info","domain":"","enabled":true,"meshExpansionPorts":[{"name":"tcp-pilot-grpc-tls","port":15011,"targetPort":15011},{"name":"tcp-citadel-grpc-tls","port":8060,"targetPort":8060},{"name":"tcp-dns-tls","port":853,"targetPort":853}],"namespace":"istio-system","ports":[{"name":"status-port","port":15020,"targetPort":15020},{"name":"http2","port":80,"targetPort":80},{"name":"https","port":443},{"name":"kiali","port":15029,"targetPort":15029},{"name":"prometheus","port":15030,"targetPort":15030},{"name":"grafana","port":15031,"targetPort":15031},{"name":"tracing","port":15032,"targetPort":15032},{"name":"tls","port":15443,"targetPort":15443}],"sds":{"enabled":false,"image":"node-agent-k8s","resources":{"limits":{"cpu":"2000m","memory":"1024Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}},"secretVolumes":[{"mountPath":"/etc/istio/ingressgateway-certs","name":"ingressgateway-certs","secretName":"istio-ingressgateway-certs"},{"mountPath":"/etc/istio/ingressgateway-ca-certs","name":"ingressgateway-ca-certs","secretName":"istio-ingressgateway-ca-certs"}],"type":"LoadBalancer","zvpn":{"enabled":true,"suffix":"global"}}},"global":{"arch":{"amd64":2,"ppc64le":2,"s390x":2},"certificates":[],"configNamespace":"istio-system","configValidation":true,"controlPlaneSecurityEnabled":true,"defaultNodeSelector":{},"defaultPodDisruptionBudget":{"enabled":true},"defaultResources":{"requests":{"cpu":"10m"}},"disablePolicyChecks":true,"enableHelmTest":false,"enableTracing":true,"enabled":true,"hub":"docker.io/istio","imagePullPolicy":"IfNotPresent","imagePullSecrets":[],"istioNamespace":"istio-system","k8sIngress":{"enableHttps":false,"enabled":false,"gatewayName":"ingressgateway"},"localityLbSetting":{"enabled":true},"logAsJson":false,"logging":{"level":"default:info"},"meshExpansion":{"enabled":false,"useILB":false},"meshNetworks":{},"mtls":{"auto":false,"enabled":false},"multiCluster":{"clusterName":"","enabled":false},"namespace":"istio-system","network":"","omitSidecarInjectorConfigMap":false,"oneNamespace":false,"operatorManageWebhooks":false,"outboundTrafficPolicy":{"mode":"ALLOW_ANY"},"policyCheckFailOpen":false,"policyNamespace":"istio-system","priorityClassName":"","prometheusNamespace":"istio-system","proxy":{"accessLogEncoding":"TEXT","accessLogFile":"","accessLogFormat":"","autoInject":"enabled","clusterDomain":"cluster.local","componentLogLevel":"misc:error","concurrency":2,"dnsRefreshRate":"300s","enableCoreDump":false,"envoyAccessLogService":{"enabled":false},"envoyMetricsService":{"enabled":false,"tcpKeepalive":{"interval":"10s","probes":3,"time":"10s"},"tlsSettings":{"mode":"DISABLE","subjectAltNames":[]}},"envoyStatsd":{"enabled":false},"excludeIPRanges":"","excludeInboundPorts":"","excludeOutboundPorts":"","image":"docker.io/istio/proxyv2:1.3.1","includeIPRanges":"*","includeInboundPorts":"*","kubevirtInterfaces":"","logLevel":"warning","privileged":false,"protocolDetectionTimeout":"100ms","readinessFailureThreshold":30,"readinessInitialDelaySeconds":1,"readinessPeriodSeconds":2,"resources":{"limits":{"cpu":"2000m","memory":"1024Mi"},"requests":{"cpu":"100m","memory":"128Mi"}},"statusPort":15020,"tracer":"zipkin"},"proxy_init":{"image":"proxyv2","resources":{"limits":{"cpu":"100m","memory":"50Mi"},"requests":{"cpu":"10m","memory":"10Mi"}}},"sds":{"enabled":false,"token":{"aud":"istio-ca"},"udsPath":""},"securityNamespace":"istio-system","tag":"1.3.1","telemetryNamespace":"istio-system","tracer":{"datadog":{"address":"$(HOST_IP):8126"},"lightstep":{"accessToken":"","address":"","cacertPath":"","secure":true},"zipkin":{"address":""}},"trustDomain":"cluster.local"},"grafana":{"accessMode":"ReadWriteMany","contextPath":"/grafana","dashboardProviders":{"dashboardproviders.yaml":{"apiVersion":1,"providers":[{"disableDeletion":false,"folder":"istio","name":"istio","options":{"path":"/var/lib/grafana/dashboards/istio"},"orgId":1,"type":"file"}]}},"datasources":{"datasources.yaml":{"apiVersion":1}},"enabled":false,"env":{},"envSecrets":{},"image":{"repository":"grafana/grafana","tag":"6.4.3"},"ingress":{"enabled":false,"hosts":["grafana.local"]},"namespace":"istio-system","nodeSelector":{},"persist":false,"podAntiAffinityLabelSelector":[],"podAntiAffinityTermLabelSelector":[],"replicaCount":1,"security":{"enabled":false,"passphraseKey":"passphrase","secretName":"grafana","usernameKey":"username"},"service":{"annotations":{},"externalPort":3000,"name":"http","type":"ClusterIP"},"storageClassName":"","tolerations":[]},"istio_cni":{"enabled":false},"istiocoredns":{"coreDNSImage":"coredns/coredns","coreDNSPluginImage":"istio/coredns-plugin:0.2-istio-1.1","coreDNSTag":"1.6.2","enabled":false,"namespace":"istio-system"},"kiali":{"contextPath":"/kiali","createDemoSecret":false,"dashboard":{"passphraseKey":"passphrase","secretName":"kiali","usernameKey":"username","viewOnlyMode":false},"enabled":false,"hub":"quay.io/kiali","ingress":{"enabled":false,"hosts":["kiali.local"]},"namespace":"istio-system","nodeSelector":{},"podAntiAffinityLabelSelector":[],"podAntiAffinityTermLabelSelector":[],"replicaCount":1,"security":{"cert_file":"/kiali-cert/cert-chain.pem","enabled":false,"private_key_file":"/kiali-cert/key.pem"},"tag":"v1.9"},"mixer":{"adapters":{"kubernetesenv":{"enabled":true},"prometheus":{"enabled":true,"metricsExpiryDuration":"10m"},"stackdriver":{"auth":{"apiKey":"","appCredentials":false,"serviceAccountPath":""},"enabled":false,"tracer":{"enabled":false,"sampleProbability":1}},"stdio":{"enabled":false,"outputAsJson":false},"useAdapterCRDs":false},"policy":{"adapters":{"kubernetesenv":{"enabled":true},"useAdapterCRDs":false},"autoscaleEnabled":true,"enabled":true,"image":"mixer","namespace":"istio-system","sessionAffinityEnabled":false},"telemetry":{"autoscaleEnabled":true,"enabled":true,"env":{"GOMAXPROCS":"6"},"image":"mixer","loadshedding":{"latencyThreshold":"100ms","mode":"enforce"},"namespace":"istio-system","nodeSelector":{},"podAntiAffinityLabelSelector":[],"podAntiAffinityTermLabelSelector":[],"replicaCount":1,"reportBatchMaxEntries":100,"reportBatchMaxTime":"1s","sessionAffinityEnabled":false,"tolerations":[]}},"nodeagent":{"enabled":false,"image":"node-agent-k8s","namespace":"istio-system"},"pilot":{"appNamespaces":[],"autoscaleEnabled":true,"autoscaleMax":5,"autoscaleMin":1,"configMap":true,"configNamespace":"istio-config","cpu":{"targetAverageUtilization":80},"memory":{"targetAverageUtilization":80},"enabled":true,"env":{},"image":"pilot","ingress":{"ingressClass":"istio","ingressControllerMode":"OFF","ingressService":"istio-ingressgateway"},"keepaliveMaxServerConnectionAge":"30m","meshNetworks":{"networks":{}},"namespace":"istio-system","nodeSelector":{},"podAntiAffinityLabelSelector":[],"podAntiAffinityTermLabelSelector":[],"policy":{"enabled":false},"replicaCount":1,"tolerations":[],"traceSampling":1},"prometheus":{"contextPath":"/prometheus","enabled":true,"hub":"docker.io/prom","ingress":{"enabled":false,"hosts":["prometheus.local"]},"namespace":"istio-system","nodeSelector":{},"podAntiAffinityLabelSelector":[],"podAntiAffinityTermLabelSelector":[],"replicaCount":1,"retention":"6h","scrapeInterval":"15s","security":{"enabled":true},"tag":"v2.12.0","tolerations":[]},"security":{"dnsCerts":{"istio-pilot-service-account.istio-control":"istio-pilot.istio-control"},"enableNamespacesByDefault":true,"enabled":true,"image":"citadel","namespace":"istio-system","selfSigned":true,"trustDomain":"cluster.local"},"sidecarInjectorWebhook":{"alwaysInjectSelector":[],"enableNamespacesByDefault":false,"enabled":true,"image":"sidecar_injector","injectLabel":"istio-injection","injectedAnnotations":{},"namespace":"istio-system","neverInjectSelector":[],"nodeSelector":{},"objectSelector":{"autoInject":true,"enabled":false},"podAnnotations":{},"podAntiAffinityLabelSelector":[],"podAntiAffinityTermLabelSelector":[],"replicaCount":1,"resources":{},"rewriteAppHTTPProbe":false,"rollingMaxSurge":"100%","rollingMaxUnavailable":"25%","selfSigned":false,"tolerations":[]},"telemetry":{"enabled":true,"v1":{"enabled":true},"v2":{"enabled":false,"prometheus":{"enabled":true},"stackdriver":{"configOverride":{},"enabled":false,"logging":false,"monitoring":false,"topology":false}}},"tracing":{"enabled":false,"ingress":{"enabled":false},"jaeger":{"accessMode":"ReadWriteMany","enabled":false,"hub":"docker.io/jaegertracing","memory":{"max_traces":50000},"namespace":"istio-system","persist":false,"spanStorageType":"badger","storageClassName":"","tag":"1.20"},"nodeSelector":{},"opencensus":{"exporters":{"stackdriver":{"enable_tracing":true}},"hub":"docker.io/omnition","resources":{"limits":{"cpu":"1","memory":"2Gi"},"requests":{"cpu":"200m","memory":"400Mi"}},"tag":"0.1.9"},"podAntiAffinityLabelSelector":[],"podAntiAffinityTermLabelSelector":[],"provider":"jaeger","service":{"annotations":{},"externalPort":9411,"name":"http-query","type":"ClusterIP"},"zipkin":{"hub":"docker.io/openzipkin","javaOptsHeap":700,"maxSpans":500000,"node":{"cpus":2},"probeStartupDelay":200,"queryPort":9411,"resources":{"limits":{"cpu":"300m","memory":"900Mi"},"requests":{"cpu":"150m","memory":"900Mi"}},"tag":"2.14.2"}},"version":""}'
kind: ConfigMap
metadata:
labels:
app: sidecar-injector
istio: sidecar-injector
operator.istio.io/component: Injector
operator.istio.io/managed: Reconcile
operator.istio.io/version: 1.3.1
release: istio
name: istio-sidecar-injector-canary
namespace: istio-system
```
|
The Ice Hockey Association of the DPR Korea is the governing body of ice hockey in North Korea.
See also
North Korea men's national ice hockey team
North Korea women's national ice hockey team
References
External links
DPR Korea at IIHF.com
Korea Dpr
Korea
Sports governing bodies in North Korea
Sports organizations established in 1963
1963 establishments in North Korea
|
NSND Nguyễn Trung Kiên (Kiến Xương, Thái Bình, 5 November 1939 – 27 January 2021) was a Vietnamese classical singer and People's Artist. With the late Quý Dương and Trần Hiếu, Kiên was counted as the 3C Trio (Vietnamese Tam ca 3C, from tam ca 3 “cụ”) - a term modelled on the Three Tenors.
He was no relation to the younger entertainer MC Trung Kiên.
References
External links
1939 births
2021 deaths
20th-century Vietnamese male singers
People from Thái Bình province
People's Artists of Vietnam
|
Sumbi is a surname. Notable people with the surname include:
Joyce Sumbi (1935–2010), African-American librarian
Dayang Sumbi, mother of Sangkuriang in Indonesian legend
|
Juan Antonio Hernández Pérez de Larrea (September 30, 1730 – April 21, 1803) was a Spanish botanist, director of the Sociedad Económica de los Amigos del País, and Bishop of Valladolid.
Biography
Larrea was born into a noble family. Excelling in theological studies, he became a pastor in the town of Terriente in 1760.
In 1775, he was appointed canon of Zaragoza. Here he became invested in the botanical garden of the city, and experimented on the making of carmine dye and the spinning of silk.
In 1788, he was anointed as a knight of the Order of Charles III.
In 1792 he began to collaborate with the (Royal Academy of Nobles and Fine Arts of San Luis). In 1798, he became the director of the Academy.
Larrea was appointed bishop of the diocese of Valladolid in 1801. It was here he died in 1803.
Legacy
The plant genus Larrea was named in his honor.
Publications
Oración panegirica que en la translación del Santísimo Sacramento a su nueva parroquia de Santa Cruz, executada en el 8 de octubre de 1780. Zaragoza
References
1730 births
1803 deaths
Bishops of Valladolid
19th-century Roman Catholic bishops in Spain
|
Pestalotiopsis mangiferae is a fungal plant pathogen infecting mangoes.
References
External links
USDA ARS Fungal Database
Fungal plant pathogens and diseases
Mango tree diseases
mangiferae
|
Nobody Saves the World is an action role-playing dungeon crawling video game developed and published by DrinkBox Studios. The game was released for Microsoft Windows, Xbox One and Xbox Series X/S in January 2022, which was followed by ports on Nintendo Switch, PlayStation 4 and PlayStation 5 in April 2022.
Gameplay
Nobody Saves the World is an action role-playing game played from a top-down perspective. The game can be played solo, though it also has a cooperative multiplayer mode. In the game, the player controls a blank-state character named Nobody, who is equipped with a wand. The wand allows them to transform into 18 forms, such as magicians, robots and dragons. Each form has two basic skills at the beginning of the game, though as players progress, new abilities will be unlocked. These characters also have different stats and attributes. The skills and the abilities of different Forms can be combined to create devastating attacks. Other Forms can share the gameplay benefits of one Form when it was unlocked.
As players explore the overworld and dungeons which are procedurally generated, players need to complete quests and gameplay objectives in order to earn experience for upgrades and Star, a currency which is used to unlock the legendary dungeons featured in the game. These dungeons are filled with enemies and traps, though players may also find treasure chests and hidden keys if they explore an area thoroughly. In each of the game's dungeons, the only respawn point is located in the area where the player is about to encounter an enemy boss.
Development
The game was developed DrinkBox Studios, who previously released Guacamelee! and its sequel Guacamelee! 2. The game was inspired by The Legend of Zelda and Final Fantasy Tactics, in particular, its Job system that allows players to assume different roles and occupations. Nobody Saves the World is DrinkBox's first multiplayer game after the team was convinced by Microsoft to add online multiplayer. Jim Guthrie, who previously composed the music for Superbrothers: Sword & Sworcery EP and Planet Coaster, will serve as the game's composer.
The game was officially announced in March 2021 during the ID@Xbox Twitch Gaming Showcase. While the game was originally set to be released in 2021, DrinkBox announced that the game would be delayed to early 2022 in August 2021. The game was released on January 18, 2022, for Windows, Xbox One and Xbox Series X and Series S. An expansion for the game, titled Frozen Hearth, which adds new areas, challenges and forms, released on September 13, 2022.
Reception
Nobody Saves the World received "generally favorable reviews" according to review aggregator Metacritic.
Game Informer enjoyed how the game forced the player to constantly change their loadout, "Every dungeon sports a dangerous modifier, which often upset my preferred loadout... The various modifiers made me appreciate the breadth of customization and experimentation for every form". Destructoid liked the cartoon-inspired visuals, writing that the game, "injects a ton of personality into basically every facet of its being. The animation is fantastic: like something straight out of a Cartoon Network show, with characters who have exaggerated, over-the-top emotive reactions". PC Gamer praised the variety each of the game's forms enabled "Each form begins with a unique signature attack and passive ability... But the real fun begins once you can mix and match abilities from different forms in an open-ended system... with a similar onus on freeform experimentation". IGN criticized the endgame, saying it lacked the variety in new forms that was found earlier, "On the other end of that, the last stretch of the 15-hour adventure starts to suffer from a feeling that the well has run dry. I ran out of new forms to chase, I felt like I had seen and experimented with all of the ability synergies that made sense, and I felt like I had easy answers for just about everything". Eurogamer recommended the game, calling it extremely replayable, concluding, "Drinkbox's latest is as polished and colourful as you might expect - and it's as generous too." Shacknews praised the game for its combat, customizable builds, art style, dungeons, characters, and commentary on the RPG genre while criticizing the autosave system. Hardcore Gamer praised the ability to encourage experimentation and its challenge system, calling it "Drinkbox’s most curious but mechanically-satisfying title to date."
References
External links
2022 video games
Action role-playing video games
Cooperative video games
DrinkBox Studios games
Dungeon crawler video games
Indie games
Multiplayer and single-player video games
Nintendo Switch games
PlayStation 4 games
PlayStation 5 games
Video games developed in Canada
Windows games
Xbox One games
Xbox Series X and Series S games
|
Khanbaghi or Khan Baghi () may refer to:
Khanbaghi, East Azerbaijan
Khan Baghi, Fars
Khan Baghi, Kurdistan
|
```go
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ivs
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
// IVS provides the API operation methods for making requests to
// Amazon Interactive Video Service. See this package's package overview docs
// for details on the service.
//
// IVS methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type IVS struct {
*client.Client
}
// Used for custom client initialization logic
var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "ivs" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "ivs" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the IVS client with a session.
// If additional configuration is needed for the client instance use the optional
// aws.Config parameter to add your extra config.
//
// Example:
//
// mySession := session.Must(session.NewSession())
//
// // Create a IVS client from just a session.
// svc := ivs.New(mySession)
//
// // Create a IVS client with additional configuration
// svc := ivs.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *IVS {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "ivs"
}
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *IVS {
svc := &IVS{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2020-07-14",
ResolvedRegion: resolvedRegion,
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(
protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a IVS operation and runs any
// custom request initialization.
func (c *IVS) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}
```
|
```python
#
# This software may be used and distributed according to the terms of the
# no-check-code
from .. import localrepo, ui
from ..node import hex
from .cmdtable import command
@command("debugedenrunpostupdatehook", [])
def edenrunpostupdatehook(ui: ui.ui, repo: localrepo.localrepository) -> None:
"""Run post-update hooks for edenfs"""
with repo.wlock():
parent1, parent2 = ([hex(node) for node in repo.nodes("parents()")] + ["", ""])[
:2
]
repo.hook("preupdate", throw=False, parent1=parent1, parent2=parent2)
repo.hook("update", parent1=parent1, parent2=parent2, error=0)
```
|
Derek Russell Norris (born February 14, 1989) is an American former professional baseball catcher. He played in Major League Baseball (MLB) for the Oakland Athletics, San Diego Padres, and Tampa Bay Rays. Prior to playing professionally, Norris attended Goddard High School. After signing and spending a few seasons in the Washington Nationals' minor-league system, he was traded to the Oakland Athletics at the end of the 2011 season.
He made his MLB debut in 2012 for the Athletics before making his sole All-Star appearance two seasons later. The Athletics traded Norris to the San Diego Padres at the end of the season. He spent two seasons with the Padres, reaching career high statistics in runs, RBI, and home runs in 2015. The Nationals acquired Norris at the end of the 2016 season. Norris was granted free agency by the Nationals with the Tampa Bay Rays signing him. He was designated for assignment midway through the 2017 season, and after being released, he was suspended for the rest of the season due to domestic violence allegations.
Norris signed a minor-league contract with the Detroit Tigers after the end of the 2017 season before being released a few months later. In April 2018, he signed with the Sugar Land Skeeters, an independent league team. He became a free agent at the end of the season.
Background
Norris graduated from Goddard High School in Goddard, Kansas in 2007. At Goddard High, Norris played third base before transitioning to catcher, and also won a Class 6A Championship title. RISE Magazine named Norris its 2006–2007 Kansas Baseball Player of the Year. He committed to attend Wichita State University on a baseball scholarship.
Professional career
Minor League Baseball
The Washington Nationals selected Norris in the fourth round of the 2007 Major League Baseball draft.
Norris spent the 2007 season with the GCL Nationals, Washington's affiliate in the rookie-level Gulf Coast League. He played for the Vermont Lake Monsters of the New York–Penn League in 2008, the Hagerstown Suns of the Class-A South Atlantic League in 2009, the Potomac Nationals of the Class-A Advanced Carolina League in 2010, and the Harrisburg Senators of the Class-AA Eastern League in 2011. Baseball America rated Norris the 38th best prospect in baseball prior to the 2010 season and the 72nd best prospect in baseball prior to the 2011 season. He was also chosen as the Nationals' second best prospect prior to the 2011 season.
Oakland Athletics
On December 23, 2011, the Nationals traded Norris, A. J. Cole, Tommy Milone, and Brad Peacock to the Oakland Athletics for Gio González and Robert Gilliam.
Norris made his MLB debut for the Athletics on June 21, 2012. He was called up to be a backup catcher behind offensively struggling catcher Kurt Suzuki. He went 0 for 3, but made a key defensive play in the ninth inning throwing out Dodgers Dee Gordon attempting to steal second base. On June 24, 2012, the Athletics were trailing 1–2 against the San Francisco Giants when Norris hit his first career home run, and first career walk-off home run. The three-run home run helped the Athletics defeat the Giants, 4–2. When Suzuki was traded to the Washington Nationals on August 3, Norris became the primary catcher for the team, backed up by the newly acquired George Kottaras. Norris finished the 2012 season batting a slash line of .201/.276/.349, with 7 home runs across 209 at bats and 53 starts at catcher.
In 2013, Norris was the primary catcher in a catching platoon, backed up by left-handed hitters John Jaso and Stephen Vogt. Norris missed portions of August and September with a broken toe. He started 71 games at catcher and played in 98 games overall, hitting a slash line of .246/.345/.409 with 9 home runs and 30 RBI.
Norris was selected to play in the 2014 MLB All-Star Game, his first and only career appearance in an All-Star game. He hit a slash line of .270/.361/.403 with 10 home runs across 385 at-bats, while making 93 starts at catcher with John Jaso as a back-up. The Athletics would qualify for the postseason against the Kansas City Royals in the Wild Card game. The game lasted for 12 innings before the Athletics ultimately fell to the Royals, 8–9.
San Diego Padres
On December 18, 2014, the Athletics traded Norris and Seth Streich to the San Diego Padres in exchange for R. J. Alvarez and Jesse Hahn. Norris played in a career high 147 games in 2015, including 116 starts at catcher and 15 starts at first base. Despite moving to the National League, Norris racked up career highs in runs, RBIs, and home runs, and batted .250/.305/.404. Defensively, he threw out 34% of would-be base stealers and his pitch-framing was reported to be much improved from previous years.
In 2016, Norris struggled at the plate, posting a .186(career low)/.255/.328 slash line. Norris finished the season with 14 home runs, tying a career high, and 42 RBI. Defensively, baserunners stole a league-leading 76 bases against him. Despite the Padres pushing to trade Norris at the July 31 deadline, Norris remained with the team.
Washington Nationals (second stint)
On December 2, 2016, the Washington Nationals acquired Norris from the Padres in exchange for Pedro Avila. Norris and the Nationals avoided arbitration over the winter, agreeing to a $4.2 million contract for 2017. After the team signed free agent catcher Matt Wieters, the Nationals reportedly attempted to trade Norris but were unable to find a taker. The Nationals granted Norris his unconditional release on March 15, 2017, rendering him a free agent eligible to sign with any team and allowing the team to pay only one-sixth of Norris' 2017 salary.
Tampa Bay Rays
On March 25, 2017, Norris signed a one-year contract with the Tampa Bay Rays. He was designated for assignment on June 23, 2017 and released two days later. In 2017 he batted .201/.258/.380 with 9 home runs.
On September 1, 2017, Norris was suspended for the remainder of the 2017 season for violating MLB's personal conduct policy, regarding a domestic violence case against his former fiancée. In an Instagram post, his former fiancée stated that Norris verbally and physically abused her and assaulted her in 2015. Norris denied the allegations and there was an investigation by MLB. He did not appeal his suspension, and forfeited the remaining $100,000 that was owed to him by the Rays.
Detroit Tigers
On December 5, 2017, Norris signed a minor league contract with the Detroit Tigers. He was released on March 28, 2018.
Sugar Land Skeeters
On April 14, 2018, Norris signed with the Sugar Land Skeeters of the Atlantic League of Professional Baseball. In 2018 he batted .256/.379/.402 with 12 home runs and 57 RBIs in 410 at bats. He became a free agent following the 2018 season.
References
External links
1989 births
Living people
Oakland Athletics players
San Diego Padres players
Tampa Bay Rays players
Gulf Coast Nationals players
Vermont Lake Monsters players
Hagerstown Suns players
Potomac Nationals players
Harrisburg Senators players
Sacramento River Cats players
Major League Baseball catchers
Baseball players from Kansas
People from Goddard, Kansas
Scottsdale Scorpions players
Sugar Land Skeeters players
American League All-Stars
|
Cowley Wright (6 October 1889 – 18 January 1923) was an English actor.
In 1910 he played the Bishop of Illyria in The Prince and the Beggar Maid at the Lyceum Theatre in London.
Wright was born in Anerley, London, England and died at age 33 in London.
Filmography
The Rocks of Valpre (1919)
The Channings (1920)
Ernest Maltravers (1920)
Sybil (1921)
References
External links
1889 births
1923 deaths
English male film actors
English male silent film actors
Male actors from London
20th-century English male actors
|
Kendall Ciesemier is a writer, producer, and reporter, originally from Wheaton, Illinois. She is also the founder of Kids Caring 4 Kids, a non-profit organization she started at age 11.
Early life and education
Kids Caring 4 Kids
After watching a special of The Oprah Winfrey Show about the AIDS epidemic in Africa, Ciesemier founded the volunteer organization Kids Caring 4 Kids in 2005. In May 2007, Ciesemier was named one of America's top ten youth volunteers by Prudential and the National Association of Secondary School Principals. In 2010, she was named one of Glamour Magazine's top ten women of the year for her service work. Ciesemier was also awarded a Daily Point of Light Award for her work doing Kids Caring 4 Kids by Points of Light. The Daily Point of Light Award was created by President George H.W Bush to "honor individuals and groups creating meaningful change in communities across America".
On August 31, 2007, Ciesemier received a surprise visit from US President Bill Clinton at an assembly at Wheaton North High School in recognition of her service. Clinton and Ciesemier then went to appear on The Oprah Winfrey Show. The episode was broadcast on September 4, 2007. On the show, Clinton announced that his friend would be donating half-a-million dollars to Ciesemier's organization.
Education
Ciesemier attended Franklin Middle School in Wheaton, Illinois, where she was a student when she formed Kids Caring 4 Kids. She graduated from Georgetown University in Washington, DC with a Bachelor of Arts in Sociology. While at Georgetown, she co-hosted a radio show called "He Said, She Said" with her older brother Connor, which covered pop culture and current events.
Ciesemier later attended the New York Film Academy for a six-week program in documentary production.
Career
Ciesemier worked as a production assistant at CBS This Morning during the 2016 presidential election. She later worked as a producer and reporter for both The New York Times''' Opinion Section and Mic.
While at Mic, Ciesemier interviewed Alice Marie Johnson, who was serving life without parole for a first-time nonviolent drug offense. The interview inspired Kim Kardashian to advocate for the clemency of Johnson.
Ciesemier currently works for the American Civil Liberties Union as a host of the podcast At Liberty'' and as a multimedia producer.
Friendship and work with Tonya Ingram
In 2019, at age 27, Tonya Ingram posted on Instagram looking for a living person willing to become her kidney-donor. The organ procurement system (OPS) in the United States, run by the United Network for Organ Sharing (UNOS), as of 2019, failed to recover around 28,000 organs a year. Utilizing journalism, Ingram and writer and organ-recipient, Ciesemier, asked the government to hold the organizations involved in OPS accountable, believing this would result in Ingram receiving a kidney.
Ingram told the House Oversight Subcommittee on Economic and Consumer Policy that she would die without the federal government's urgent action. A year and a half later, on Dec. 30, 2022, Ingram died of complications from kidney failure.
In 2022, Ingram was one of 12,000 people on waiting lists who died or became too sick to receive a transplant.
Ingram's friend and fellow journalist, Ciesemier, commented on future potential for intervention in the organ procurement system by the American government:
Personal life
Ciesemier was born with a rare liver disease called biliary atresia and has undergone two liver transplants at Children's Memorial Hospital in Chicago. In 2010, she was part of the design team for its replacement, the Lurie Children's Hospital. She has stated that her own personal struggles are part of what inspired her to help others.
References
External links
People from Wheaton, Illinois
Date of birth missing (living people)
Place of birth missing (living people)
Living people
Georgetown University College of Arts & Sciences alumni
Liver transplant recipients
Year of birth missing (living people)
21st-century American journalists
American disability rights activists
American medical journalists
American online journalists
American public speakers
|
```python
#
# This file originated from the `graphslam` package:
#
# path_to_url
"""A ``Vertex`` class.
"""
import matplotlib.pyplot as plt
# pylint: disable=too-few-public-methods
class Vertex:
"""A class for representing a vertex in Graph SLAM.
Parameters
----------
vertex_id : int
The vertex's unique ID
pose : graphslam.pose.se2.PoseSE2
The pose associated with the vertex
vertex_index : int, None
The vertex's index in the graph's ``vertices`` list
Attributes
----------
id : int
The vertex's unique ID
index : int, None
The vertex's index in the graph's ``vertices`` list
pose : graphslam.pose.se2.PoseSE2
The pose associated with the vertex
"""
def __init__(self, vertex_id, pose, vertex_index=None):
self.id = vertex_id
self.pose = pose
self.index = vertex_index
def to_g2o(self):
"""Export the vertex to the .g2o format.
Returns
-------
str
The vertex in .g2o format
"""
return "VERTEX_SE2 {} {} {} {}\n".format(self.id, self.pose[0], self.pose[1], self.pose[2])
def plot(self, color='r', marker='o', markersize=3):
"""Plot the vertex.
Parameters
----------
color : str
The color that will be used to plot the vertex
marker : str
The marker that will be used to plot the vertex
markersize : int
The size of the plotted vertex
"""
x, y = self.pose.position
plt.plot(x, y, color=color, marker=marker, markersize=markersize)
```
|
Bushi and similar can refer to:
People
Alban Bushi (born 1973), Albanian footballer
Bushi Moletsane (born 1984), Mosotho footballer
Bushi (wrestler) (born 1983), Japanese professional wrestler
Other uses
Bushi (music), a genre of Japanese folk music
Bushi (region), a region in the Democratic Republic of the Congo
Bushi (warrior), the Japanese word for "warrior" often used to refer to Samurai
Bushi language, a language of Madagascar and Mayotte
Bushi Station, a railway station Iruma, Saitama, Japan
See also
Bushie, a derogatory statement for an American political supporter of George H. W. Bush, George W. Bush, or Jeb Bush
Bushey, a town in Hertfordshire in England
Bushy (disambiguation)
|
Yazīd ibn Hurmuz al-Fārisī was the chief of the Umayyad in Medina, but led the city's against the Umayyad army at the Battle of al-Harra in 683.
Life
Yazid ibn Hurmuz was a Persian (client or freedman) of the Umayyad clan and chief of clan's in Medina during the reign of the Umayyad caliph Yazid I (). His brother Abd Allah ibn Hurmuz was a chief of the Umayyads' in Kufa during the reign of Yazid I's father, Caliph Mu'awiya I (). He was possibly tasked with helping enforce tax collection and later oversaw the army registers of Iraq under the Umayyad governor, al-Hajjaj ibn Yusuf (). After his death in a campaign against the forces of the anti-Umayyad caliph Abd Allah ibn al-Zubayr, his son Abd al-Rahman succeeded him.
During the Second Muslim Civil War (680–692), the people of Medina rebelled against Caliph Yazid, and the latter dispatched an expeditionary force from Syria to suppress the Medinese. Yazid ibn Hurmuz was entrusted by the Medinese to lead the of the city in defense of part of the defensive trench against the Syrians at the Battle of al-Harra in 683. The latter assaulted this part of the trench and called on Yazid ibn Hurmuz to surrender, but his forces held the Syrians off. In contrast, another unit of the Medinese, from the local Banu Haritha family, opened their quarter to the Syrians, allowing them to attack the Medinese defenders from the rear and rout them.
Yazid ibn Hurmuz was cited by early Islamic historians as a transmitter of reports. He died during the reign of the Umayyad caliph Umar II (). His son Abu Bakr Abd Allah al-Asamm (d. 765) was a and transmitter of hadiths in Medina who a key supporter of the anti-Abbasid rebel Muhammad al-Nafs al-Zakiyya.
References
Sources
7th-century people from the Umayyad Caliphate
8th-century deaths
7th-century Iranian people
People of the Second Fitna
Medina under the Umayyad Caliphate
|
Archaeometallurgical slag is slag discovered and studied in the context of archaeology. Slag, the byproduct of iron-working processes such as smelting or smithing, is left at the iron-working site rather than being moved away with the product. As it weathers well, it is readily available for study. The size, shape, chemical composition and microstructure of slag are determined by features of the iron-working processes used at the time of its formation.
Overview
The ores used in ancient smelting processes were rarely pure metal compounds. Impurities were removed from the ore through the process of slagging, which involves adding heat and chemicals. Slag is the material in which the impurities from ores (known as gangue), as well as furnace lining and charcoal ash, collect. The study of slag can reveal information about the smelting process used at the time of its formation.
The finding of slag is direct evidence of smelting having occurred in that place as slag was not removed from the smelting site. Through slag analysis, archaeologists can reconstruct ancient human activities concerned with metal work such as its organization and specialization.
The contemporary knowledge of slagging gives insights into ancient iron production. In a smelting furnace, up to four different phases might co-exist. From the top of the furnace to the bottom, the phases are slag, matte, speiss, and liquid metal.
Slag can be classified as furnace slag, tapping slag or crucible slag depending on the mechanism of production. The slag has three functions. The first is to protect the melt from contamination. The second is to accept unwanted liquid and solid impurities. Finally, slag can help to control the supply of refining media to the melt.
These functions are achieved if the slag has a low melting temperature, low density and high viscosity which ensure a liquid slag that separates well from the melting metal. Slag should also maintain its correct composition so that it can collect more impurities and be immiscible in the melt.
Through chemical and mineralogical analysis of slag, factors such as the identity of the smelted metal, the types of ore used and technical parameters such as working temperature, gas atmosphere and slag viscosity can be learned.
Slag formation
Natural iron ores are mixtures of iron and unwanted impurities, or gangue. In ancient times, these impurities were removed by slagging. Slag was removed by liquation, that is, solid gangue was converted into a liquid slag. The temperature of the process was high enough for the slag to exist in its liquid form.
Smelting was conducted in various types of furnaces. Examples are the bloomery furnace and the blast furnace. The condition in the furnace determines the morphology, chemical composition and the microstructure of the slag.
The bloomery furnace produced iron in a solid state. This is because the bloomery process was conducted at a temperature lower than the melting point of iron metal. Carbon monoxide from the incomplete combustion of charcoal slowly diffused through the hot iron oxide ore, converting it to iron metal and carbon dioxide.
Blast furnaces were used to produce liquid iron. The blast furnace was operated at higher temperatures and at a greater reducing condition than the bloomery furnace. A greater reducing environment was achieved by increasing the fuel to ore ratio. More carbon reacted with the ore and produced a cast iron rather than solid iron. Also, the slag produced was less rich in iron.
A different process was used to make "tapped" slag. Here, only charcoal was added to the furnace. It reacted with oxygen, and generated carbon monoxide, which reduced the iron ore to iron metal. The liquefied slag separated from the ore, and was removed through the tapping arch of the furnace wall.
In addition, the flux (purifying agent), the charcoal ash and the furnace lining contributed to the composition of the slag.
Slag may also form during smithing and refining. The product of the bloomery process is heterogeneous blooms of entrapped slag. Smithing is necessary to cut up and remove the trapped slag by reheating, softening the slag and then squeezing it out. On the other hand, refining is needed for the cast iron produced in the blast furnace. By re-melting the cast iron in an open hearth, the carbon is oxidized and removed from the iron. Liquid slag is formed and removed in this process.
Slag analysis
The analysis of slag is based on its shape, texture, isotopic signature, chemical and mineralogical characteristics. Analytical tools like Optical Microscope, scanning electron microscope (SEM), X-ray Fluorescence (XRF), X-ray diffraction (XRD) and inductively coupled plasma-mass spectrometry (ICP-MS) are widely employed in the study of slag.
Macro-analysis
The first step in the investigation of archaeometallurgical slag is the identification and macro-analysis of slag in the field. Physical properties of slag such as shape, colour, porosity and even smell are used to make a primary classification to ensure representative samples from slag heaps are obtained for future micro-analysis.
For example, tap slag usually has a wrinkled upper face and a flat lower face due to contact with soil.
Furthermore, the macro-analysis of slag heaps can prove an estimated total weight which in turn can be used to determine the scale of production at a particular smelting location.
Bulk chemical analysis
The chemical composition of slag can reveal much about the smelting process. XRF is the most commonly used tool in analysing the chemical composition of slag. Through chemical analysis, the composition of the charge, the firing temperature, the gas atmosphere and the reaction kinetics can be determined.
Ancient slag composition is usually a quaternary eutectic system CaO-SiO2-FeO-Al2O3 simplified to CaO-SiO2-FeO2, giving a low and uniform melting point. In some circumstances, the eutectic system was created according to the proportion of silicates to metal oxides in the gangue, together with the type of ore and the furnace lining. In other instances, a flux was required to achieve the correct system.
The melting temperature of slag can be determined by plotting its chemical composition in a ternary plot.
The viscosity of slag can be calculated through its chemical composition with equation:
where is the index of viscosity.
With recent advances in rotational viscometry techniques, viscosities of iron oxide slags are also widely undertaken. Coupled with phase equilibria studies, these analysis provide a better understanding of physico-chemical behaviour of slags at high temperatures.
In the early stages of smelting, the separation between melting metal and slag is not complete. Hence, the main, minor and trace elements of metal in the slag can be indicators of the type of ore used in the smelting process.
Mineralogical analysis
The optical microscope, scanning electron microscope, X-ray diffraction and petrographic analysis can be used to determine the types and distribution of minerals in slag. The minerals present in the slag are good indicators of the gas atmosphere in the furnace, the cooling rate of the slag and the homogeneity of the slag. The type of ore and flux used in the smelting process can be determined if there are elements of un-decomposed charge or even metal pills trapped in the slag.
Slag minerals are classified as silicates, oxides and sulfides. Bachmann classified the main silicates in slag according to the ratio between metal oxides and silica.
Ratio MeO : SiO2 silicate examples
2 : 1 fayalite
2 : 1 monticellite
1.5 : 1 melilite
1 : 1 pyroxene
Fayalite (Fe2SiO4) is the most common mineral found in ancient slag. By studying the shape of the fayalite, the cooling rates of the slag can be roughly estimated.
Fayalite reacts with oxygen to form magnetite:
3Fe2SiO4 + O2= 2FeO·Fe2O3 + 3SiO2
Therefore, the gas atmosphere in the furnace can be calculated from the ratio of magnetite to fayalite in the slag.
The presence of metal sulfides suggests that a sulfidic ore has been used. Metal sulfides survive the oxidizing stage before smelting and therefore may also indicate a multi-stage smelting process.
When fayalite is replete with CaO, monticellite and pyroxene form. They are an indicator of a high calcium content in the ore.
Lead isotope analysis
Lead isotope analysis is a technique for determining the source of ore in ancient smelting. Lead isotope composition is a signature of ore deposits and varies very little throughout the whole deposit. Also, lead isotope composition is unchanged in the smelting process.
The amount of each of the four stable isotopes of lead are used in the analysis. They are 204Pb, 206Pb, 207Pb and 208Pb. Ratios: 208Pb/207Pb, 207Pb/206Pb and 206Pb/204Pb are measured by mass spectrometry. Apart from 204Pb, the lead isotopes are all products of the radioactive decay of uranium and thorium. When ore is deposited, uranium and thorium are separated from the ore. Thus, deposits formed in different geological periods will have different lead isotope signatures.
238U →206Pb
235U →207Pb
232Th→208Pb
For example, Hauptmann performed lead isotope analysis on slags from Faynan, Jordan. The resulting signature was the same as that from ores from the dolomite, limestone and shale deposits in the Wadi Khalid and Wadi Dana areas of Jordan.
Physical dating
Ancient slag is difficult to date. It has no organic material with which to perform radiocarbon dating. There are no cultural artifacts like pottery shards in the slag with which to date it. Direct physical dating of slag through thermoluminescence dating could be a good method to solve this problem. Thermoluminescence dating is possible if the slag contains crystal elements such as quartz or feldspar. However, the complex composition of slag can make this technique difficult unless the crystal elements can be isolated.
See also
Archaeometallurgy
Bog iron
Iron metallurgy in Africa
Iron Age
References
Archaeometallurgy
History of metallurgy
|
```java
/*
* Bytecode Analysis Framework
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* You should have received a copy of the GNU Lesser General Public
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package edu.umd.cs.findbugs.ba.bcp;
import org.apache.bcel.generic.ConstantPoolGen;
import org.apache.bcel.generic.Instruction;
import org.apache.bcel.generic.InstructionHandle;
import org.apache.bcel.generic.MONITORENTER;
import edu.umd.cs.findbugs.ba.DataflowAnalysisException;
import edu.umd.cs.findbugs.ba.vna.ValueNumberFrame;
/**
* A PatternElement for matching a MONITORENTER instruction.
*
* @author DavidHovemeyer
*/
public class Monitorenter extends OneVariableInstruction {
/**
* Constructor.
*
* @param varName
* name of the variable representing the reference to the object
* being locked
*/
public Monitorenter(String varName) {
super(varName);
}
@Override
public MatchResult match(InstructionHandle handle, ConstantPoolGen cpg, ValueNumberFrame before, ValueNumberFrame after,
BindingSet bindingSet) throws DataflowAnalysisException {
// Instruction must be MONITORENTER.
Instruction ins = handle.getInstruction();
if (!(ins instanceof MONITORENTER)) {
return null;
}
// Ensure the object being locked matches any previous
// instructions which bound our variable name to a value.
Variable lock = new LocalVariable(before.getTopValue());
return addOrCheckDefinition(lock, bindingSet);
}
}
```
|
```java
package com.brianway.learning.java.multithread.communication.example9;
/**
* Created by Brian on 2016/4/14.
*/
public class P_Thread extends Thread {
private Producer p;
public P_Thread(Producer p) {
super();
this.p = p;
}
@Override
public void run() {
while (true) {
p.pushService();
}
}
}
```
|
```objective-c
/* Imported, modified, and debugged by: Majdi Sobain <MajdiSobain@Gmail.com> 2016
Modifications have comments started with *** or *****
Debugging was on Dev-C++ 5.11 and MSVC++ 10.0
All credit goes to the author <Stuart Konen> and his CodeProject article on :
path_to_url
your_sha256_hash---------------------*/
// CRegEntry: interface for the CRegEntry class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(_CREG_REGENTRY_H_INCLUDED)
#define _CREG_REGENTRY_H_INCLUDED
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CRegistry;
class CRegEntry
{
public:
CRegEntry(CRegistry* Owner = NULL);
virtual ~CRegEntry() { if (lpszName) delete [] lpszName; if (lpszStr) delete [] lpszStr; };
/* -----------------------------------------*
* Operators *
* -----------------------------------------*/
CRegEntry& operator =( CRegEntry& cregValue );
CRegEntry& operator =( LPCTSTR lpszValue );
CRegEntry& operator =( LPDWORD lpdwValue );
CRegEntry& operator =( DWORD dwValue ) { return (*this = &dwValue); }
operator LPTSTR();
operator DWORD();
// Data types without implemented conversions
// NOTE: I realize these will only check asserts
// when a value is set and retrieved during the
// same session. But it is better than no check.
REGENTRY_NONCONV_STORAGETYPE(POINT);
REGENTRY_NONCONV_STORAGETYPE(RECT);
// Numeric types with conversions
// If you'd like to add more, follow this form:
// data type, max string length + 1, format specification, from string, from DWORD
REGENTRY_CONV_NUMERIC_STORAGETYPE(__int64, 28, %I64d, _ttoi64(lpszStr), (__int64)dwDWORD)
// *** REGENTRY_CONV_NUMERIC_STORAGETYPE(double, 18, %f, _tcstod(lpszStr, NULL), (double)dwDWORD)
CRegEntry& operator=( double Value );
operator double();
REGENTRY_CONV_NUMERIC_STORAGETYPE(bool, 2, %d, (_ttoi(lpszStr) != 0), (dwDWORD != 0))
REGENTRY_CONV_NUMERIC_STORAGETYPE(int, 12, %d, _ttoi(lpszStr), (int)dwDWORD)
REGENTRY_CONV_NUMERIC_STORAGETYPE(UINT, 11, %d, (UINT)_tcstoul(lpszStr, NULL, NULL), (UINT)dwDWORD)
// Types with conversions: type to/from string, type from unsigned long
REGENTRY_CONV_STORAGETYPE(tstring, _R_BUF(_MAX_REG_VALUE); strcpy_safe((LPTSTR) buffer,Value.c_str()); ,
lpszStr, _ultoa_safe(dwDWORD, lpszStr), _T(""))
/* -----------------------------------------*
* Member Variables and Functions *
* -----------------------------------------*/
LPTSTR lpszName; // The value name
UINT iType; // Value data type
void InitData(CRegistry* Owner = NULL);
void ForceStr();
bool Delete();
// *** This newly added method help in change the entry's name
void SetName(LPCSTR name);
/* The following six functions handle REG_MULTI_SZ support: */
void SetMulti(LPCTSTR lpszValue, size_t nLen, bool bInternal = false);
void MultiRemoveAt(size_t nIndex);
void MultiSetAt(size_t nIndex, LPCTSTR lpszVal);
LPTSTR GetMulti(LPTSTR lpszDest = NULL , size_t nMax = _MAX_REG_VALUE); // *** Make lpszDest optional
LPCTSTR MultiGetAt(size_t nIndex);
size_t MultiLength(bool bInternal = false);
size_t MultiCount();
void SetBinary(LPBYTE lpbValue, size_t nLen);
void GetBinary(LPBYTE lpbDest, size_t nMaxLen);
size_t GetBinaryLength();
/* *** newly added function to get specific byte item in vBytes */
BYTE GetBinaryAt(size_t index) { assert(IsBinary()); return vBytes.at(index); }
bool Convertible() { return __bConvertable; }
// *** updated this method to help adding this entry to the new owner
void SetOwner(CRegistry* Owner) ;
// *** This function has been newly created
__inline bool HasOwner () { return (__cregOwner) ? true : false;}
template <class T>void SetStruct(T &type) { SetBinary((LPBYTE) &type, sizeof(T)); }
template <class T>void GetStruct(T &type) { GetBinary((LPBYTE) &type, sizeof(T)); }
/* *** The next lines ended by //*** has been redefined with explicit data types */
__inline bool IsString() { return (iType == REG_SZ); } // ***
__inline bool IsDWORD() { return (iType == REG_DWORD); } // ***
__inline bool IsBinary() { return (iType == REG_BINARY); } // ***
__inline bool IsMultiString() { return (iType == REG_MULTI_SZ); } // ***
/* newly added due to adding their types */
__inline bool IsExpandSZ() { return (iType == REG_EXPAND_SZ); }
__inline bool IsQWORD() { return (iType == REG_QWORD); }
/* *** newly added function that returns the type of the entry as number */
DWORD Type();
/* *** New functions for REG_EXTAND_SZ */
DWORD SetExpandSZ(LPTSTR value);
LPTSTR GetExpandSZ(bool Expandable = false);
/* *** New functions for REG_QWORD */
DWORD SetQWORD(UINT64 value);
UINT64 GetQWORD();
__inline bool IsStored() { return __bStored; } // ***
/* *** This function updated to return the result of RegQueryValueEx */
DWORD Exists(); // *** { return __bStored; } // ***
__inline void MultiClear() { SetMulti( _T("\0"), 2); } // ***
__inline void MultiAdd(LPCTSTR lpszVal) { MultiSetAt(MultiCount(), lpszVal); } // ***
protected:
CRegistry* __cregOwner;
bool __bConvertable;
bool __bStored;
private:
/* Create a variable for each prominent data type */
DWORD dwDWORD;
LPTSTR lpszStr;
std::vector<BYTE> vBytes;
std::vector<tstring> vMultiString;
};
#endif
```
|
```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';
// MAIN //
/**
* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.
*
* ## Notes
*
* - The first array is sorted in increasing order according to absolute value.
* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.
* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.
* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.
* - The input arrays are sorted in-place (i.e., the input arrays are mutated).
*
* @private
* @param {Array} x - first array
* @param {Array} y - second array
* @returns {void}
*
* @example
* var x = [ -4, -2, 3, 1 ];
* var y = [ 0, 1, 2, 3 ];
*
* sort2ins( x, y );
*
* console.log( x );
* // => [ 1, -2, 3, -4 ]
*
* console.log( y );
* // => [ 3, 1, 2, 0 ]
*/
function sort2ins( x, y ) {
var avx;
var aux;
var ix;
var iy;
var jx;
var jy;
var vx;
var vy;
var ux;
var i;
ix = 1;
iy = 1;
// Sort in increasing order...
for ( i = 1; i < x.length; i++ ) {
vx = x[ ix ];
avx = ( vx < 0 ) ? -vx : vx;
vy = y[ iy ];
jx = ix - 1;
jy = iy - 1;
// Shift all larger values to the left of the current element to the right...
while ( jx >= 0 ) {
ux = x[ jx ];
aux = ( ux < 0 ) ? -ux : ux;
if ( aux <= avx ) {
break;
}
x[ jx+1 ] = ux;
y[ jy+1 ] = y[ jy ];
jx -= 1;
jy -= 1;
}
x[ jx+1 ] = vx;
y[ jy+1 ] = vy;
ix += 1;
iy += 1;
}
}
// EXPORTS //
module.exports = sort2ins;
```
|
The Marka (also Marka Dafing, Meka, or Maraka) people are a Mande people of northwest Mali. They speak the Marka language, a Manding language. Some of the Maraka (Dafin people are found in Ghana.
History
The Marka originated from Soninke people from Wagadu Empire who migrated to the middle Niger between the 11th and 13th centuries. The term 'Maraka' means 'men who rule' in Bambara, which may have originated as a term for the colonists from Wagadu or merely as a term of respect.
Relatively geographically constrained compared to other trading communities such as the Jakhanke and Dyula people, they founded Nyamina and Sansanding during this early period, and Barouéli and Banamba in the 19th century. All four were at various times prominent trading and religious centers.
Muslim merchant communities at the time of the Bambara Empire, the Maraka largely controlled the desert-side trade between the Sahel and nomadic Berbers and Moors of the Sahara. Their economy was based on slave plantation agriculture growing food and cotton to be traded. The Bambara integrated Maraka communities into their state structure, and Maraka trading posts and plantations multiplied in the Segu based state and its Kaarta vassals in the 18th and early 19th centuries. When the pagan Bambara empire was defeated by the Maraka's fellow Muslim Umar Tall in the 1850s, the Maraka's unique trade and landholdings concessions suffered damage from which they never recovered.
Today
Today there are only around 25,000 Marka speakers, and they are largely integrated amongst their Soninke and Bambara neighbors.
Culture
The Marka people are adherents of Islam.
References
Richard L. Roberts. Warriors, Merchants and Slaves: The State and the Economy in the Middle Niger Valley 1700-1914. Stanford University Press (1987), .
Richard L. Roberts. Production and Reproduction of Warrior States: Segu Bambara and Segu Tokolor, c. 1712-1890. The International Journal of African Historical Studies, Vol. 13,No. 3 (1980),pp. 389–419.
Ethnic groups in Mali
History of Mali
Toucouleur Empire
Bamana Empire
Soninke people
|
```yaml
{{- /*
*/}}
{{- if and .Values.applicationSet.enabled .Values.applicationSet.serviceAccount.create .Values.rbac.create }}
kind: RoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "argocd.applicationSet" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ include "argocd.applicationSet.serviceAccountName" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "argocd.applicationSet" . }}
{{- end }}
```
|
The term expanded universe, sometimes called an extended universe, is generally used to denote the "extension" of a media franchise (like a television program or a series of feature films) with other media, generally comics and original novels. This typically involves new stories for existing characters already developed within the franchise, but in some cases entirely new characters and complex mythology are developed. This is not necessarily the same as an adaptation, which is a retelling of the same story that may or may not adhere to the accepted canon. It is contrasted with a sequel that merely continues the previous narrative in a linear sequence. Nearly every media franchise with a committed fan base has some form of expanded universe.
Examples
Two prominent examples of media franchises with an expanded universe are Star Wars and Star Trek, which both have a wide range of original novels, comics, video games, and other media that add to the mythology of their fictional universe in different ways. In both cases, entirely new characters and situations have been developed that exist only within the expanded universe media.
Canonicity
Although there are some exceptions, expanded universe works are generally accepted as canon, or part of the "official" storyline continuity. Otherwise, they are considered apocrypha. In some cases, characters created for an expanded universe are later featured in the primary works associated with that franchise, as in the cases of Aayla Secura and Grand Admiral Thrawn in the Star Wars franchise. When all expanded universe works (films, novels, comic books, video games, role-playing games, etc.) are considered canonical, then the expanded universe is an "imaginary entertainment environment."
See also
Buffyverse
Star Wars expanded universe
View Askewniverse
Whoniverse
Fan fiction
References
External links
List of C-canon elements in the Star Wars films on Wookieepedia
Continuity (fiction)
|
Rejmyre () is a locality situated in Finspång Municipality, Östergötland County, Sweden with 900 inhabitants in 2010. Rejmyre is best known for Reijmyre Glasbruk, a glass manufacturer founded in 1810.
References
Populated places in Östergötland County
Populated places in Finspång Municipality
|
Adam Bashirovich Amirilayev (), born 20 May 1963 in Burtunay, Dagestan Autonomous Soviet Socialist Republic, is a Russian politician.
In 2007, Amirilayev graduated from Dagestan State University with a specialty in jurisprudence.
In the 2007 State Duma elections, he was elected to the State Duma as a United Russia deputy. Amirilayev is Vice-Chairman of the Committee for Public Associations and Religious Organisations.
References
External links
Adam Amirilayev profile at the State Duma website
Profile at United Russia website
1963 births
Living people
People from Kazbekovsky District
Avar people
United Russia politicians
21st-century Russian politicians
Fifth convocation members of the State Duma (Russian Federation)
Sixth convocation members of the State Duma (Russian Federation)
|
This is a list of food and drink magazines. This list also includes food studies journals.
Food and drink magazines
The Arbuturian
L'Art culinaire
Bon Appétit
Food & Beverage Magazine
Buffé
Cherry Bombe
Cocina
Cooking Light
Cook's Illustrated
La Cucina Italiana
Cuisine
La Cuisinière Cordon Bleu
Dark Rye
The Drinks Business
Everyday Food
FDA Consumer
Feel Good Food
Fine Cooking
Food & Wine
Food Network Magazine
Foodies
Goodtoknow Recipes
Gourmet Traveller
Imbibe
INOUT
Lucky Peach
Meatpaper
Olive
Le Pot au Feu
Relish
Restaurant
Restaurant Insider
Saveur
Spirit Journal
Sunset
Tandoori Magazine
Taste of Home
VegNews
Woman's Day
Zester Daily
Beer and pub magazines
All About Beer
Beer & Brewer
Draft Magazine
Morning Advertiser
The Publican
Food studies journals
African Journal of Food, Agriculture, Nutrition and Development
The American Journal of Clinical Nutrition
Appetite
Comprehensive Reviews in Food Science and Food Safety
Food and Bioprocess Technology
Food & History
Food Quality and Preference
Food Science and Technology International
Food Structure
Gastronomica: The Journal of Food and Culture
Innovative Food Science and Emerging Technologies
International Journal of Food Sciences and Nutrition
Journal of Food Biochemistry
Journal of Food Process Engineering
Journal of Food Processing and Preservation
Journal of Food Quality
Journal of Food Safety
Journal of Food Science
The Journal of Food Science Education
Journal of Sensory Studies
Journal of Texture Studies
Lebensmittel-Wissenschaft & Technologie
Petits Propos Culinaires
Trends in Food Science and Technology
Wine magazines
American Winery Guide
Australian and New Zealand Wine Industry Journal
Canadian Wine Annual
Cocina
Decanter
Food & Wine
Gambero Rosso
Harpers Magazine (trade publication)
Quarterly Review of Wines
La Revue du vin de France
Sommelier India
Sommelier Journal
Spirit Journal
The Wine Advocate
Wine & Spirit
Wine & Spirits
Wine Enthusiast
Wine Spectator
Wines & Vines
The World of Fine Wine
See also
List of books about food and drink
List of films about food and drink
List of magazines
List of websites about food and drink
References
Food and drink
magazines
|
Isen Mulang Palace (Indonesian: Istana Isen Mulang) is a building used as official residence of Central Kalimantan governor. The building is located in city of Palangka Raya, in Pahandut district. The building was designed personally by Indonesia's first president Sukarno, who also designed planning of the entire city during its early foundation.
The building was modeled after Dayak traditional longhouse (rumah betang). It is frequently used by governor of Central Kalimantan as a place to meet with high-ranking guests such as presidents or other government officials. It has special guest rooms which was used as a resting place for incoming guest, because previously the city had limited hotel rooms especially during its early days, but today is rarely used.
References
Buildings and structures in Central Kalimantan
Palangka Raya
|
```smalltalk
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// ==========================================================================
using Squidex.Infrastructure;
namespace Squidex.Domain.Apps.Entities.Contents.Commands;
public abstract class ContentCommand : ContentCommandBase
{
public DomainId ContentId { get; set; }
public bool DoNotScript { get; set; }
public override DomainId AggregateId
{
get => DomainId.Combine(AppId, ContentId);
}
}
```
|
```xml
import { useState } from 'react';
import { c, msgid } from 'ttag';
import { Button } from '@proton/atoms';
import type { ModalStateProps } from '@proton/components';
import {
Alert,
Checkbox,
ModalTwo,
ModalTwoContent,
ModalTwoFooter,
ModalTwoHeader,
useModalTwoStatic,
} from '@proton/components';
import { useLoading } from '@proton/hooks';
import { DRIVE_APP_NAME } from '@proton/shared/lib/constants';
import noop from '@proton/utils/noop';
interface Props {
onClose?: () => void;
onSubmit: () => Promise<unknown>;
volumeCount: number;
}
const DeleteLockedVolumesConfirmModal = ({
onClose = noop,
onSubmit,
volumeCount,
...modalProps
}: Props & ModalStateProps) => {
const [isChecked, setIsChecked] = useState(false);
const [isLoading, withLoading] = useLoading();
const modalTitle = c('Label').ngettext(msgid`Delete drive?`, `Delete drives?`, volumeCount);
const warningTitle = c('Label').t`This will permanently delete all files in your locked drive.`;
const warningInfo = c('Info')
.t`Note: data may still be available locally on devices where you have installed ${DRIVE_APP_NAME}.`;
const confirmationText = c('Label').t`Yes, I want to permanently delete my old files`;
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setIsChecked(e.target.checked);
};
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
return withLoading(onSubmit());
};
return (
<ModalTwo
onClose={onClose}
size="small"
as="form"
disableCloseOnEscape={isLoading}
onSubmit={handleSubmit}
{...modalProps}
>
<ModalTwoHeader title={modalTitle} />
<ModalTwoContent>
<Alert type="warning" className="mb-8">
<span>
<strong>{warningTitle}</strong>
</span>
</Alert>
<p>{warningInfo}</p>
<Checkbox onChange={handleChange}>{confirmationText}</Checkbox>
</ModalTwoContent>
<ModalTwoFooter>
<Button type="button" onClick={onClose}>
{c('Action').t`Back`}
</Button>
<Button color="danger" type="submit" disabled={!isChecked} loading={isLoading}>
{c('Action').t`Delete`}
</Button>
</ModalTwoFooter>
</ModalTwo>
);
};
export default DeleteLockedVolumesConfirmModal;
export const useDeleteLockedVolumesConfirmModal = () => {
return useModalTwoStatic(DeleteLockedVolumesConfirmModal);
};
```
|
Tegostoma richteri is a species of moth in the family Crambidae. It is found in Ethiopia.
This species has a wingspan of 16–18 mm.
See also
List of moths of Ethiopia
References
Endemic fauna of Ethiopia
Moths described in 1963
Odontiini
Moths of Africa
Taxa named by Hans Georg Amsel
|
Central-Western Region or Central West Region can refer to:
Central-West Region, Brazil
Central-Western Region, Venezuela
Central West Queensland, a region of Australia
Central West (New South Wales), a region of Australia
See also
Central West
Midwest (disambiguation)
|
The Republican–Socialist Conjunction (, CRS) was a Spanish electoral coalition created in 1909 and lasting until 1919. It comprised different parties during its short lifespan, but it always included the Spanish Socialist Workers' Party (PSOE) and at least several Republican members. It was disbanded in December 1919 after the PSOE left the alliance.
Composition
Electoral performance
Restoration Cortes
References
1893 establishments in Spain
1903 disestablishments in Spain
Defunct political party alliances in Spain
Political parties disestablished in 1903
Political parties established in 1893
Republican parties in Spain
Restoration (Spain)
Spanish Socialist Workers' Party
|
The Platytrochozoa are a proposed basal clade of spiralian animals as the sister group of the Gnathifera. The Platytrochozoa were divided into the Rouphozoa and the Lophotrochozoa. A more recent study suggests that the mesozoans also belong to this group of animals, as sister of the Rouphozoa.
An alternative phylogeny was given in 2019, with a basal grouping of Mollusca and Entoprocta named Tetraneuralia, and a second grouping of Nemertea and Platyhelminthes named Parenchymia as sister of Annelida. In this proposal, Lophotrochozoa would become roughly synonymous with Platytrochozoa, and Rouphozoa would be unsupported.
References
Protostome unranked clades
|
Biedkowo is a village in the administrative district of Gmina Frombork, within Braniewo County, Warmian-Masurian Voivodeship, in northern Poland. It lies approximately south-east of Frombork, south-west of Braniewo, and north-west of the regional capital Olsztyn.
References
Biedkowo
|
```xml
import * as React from 'react';
import { addons, types } from 'storybook/internal/manager-api';
import { ViewportTool } from './components/Tool';
import { ADDON_ID } from './constants';
import { ViewportToolLegacy } from './legacy/ToolLegacy';
addons.register(ADDON_ID, (api) => {
addons.add(ADDON_ID, {
title: 'viewport / media-queries',
type: types.TOOL,
match: ({ viewMode, tabId }) => viewMode === 'story' && !tabId,
render: () =>
FEATURES?.viewportStoryGlobals ? <ViewportTool api={api} /> : <ViewportToolLegacy />,
});
});
```
|
```objective-c
#ifndef _TOOLS_LINUX_RING_BUFFER_H_
#define _TOOLS_LINUX_RING_BUFFER_H_
#include <linux/compiler.h>
static inline __u64 ring_buffer_read_head(struct perf_event_mmap_page *base)
{
return smp_load_acquire(&base->data_head);
}
static inline void ring_buffer_write_tail(struct perf_event_mmap_page *base,
__u64 tail)
{
smp_store_release(&base->data_tail, tail);
}
#endif /* _TOOLS_LINUX_RING_BUFFER_H_ */
```
|
Monni may refer to:
Monni (band), a South Korean rock band
Carlo Monni, an Italian actor
|
```c++
/*
* VideoCore4_Drivers
*
* BCM2708 power management driver.
*/
#pragma once
#include <drivers/IODevice.hpp>
enum cpr_power_result_t {
kCprSuccess = 0,
kCprPowOkTimeout,
kCprMrDoneTimeout,
kCprOscCountTimeout
};
enum cpr_power_domain_t {
kCprPowerDomainImage = 0,
kCprPowerDomainARM,
kCprPowerDomainUSB,
kCprPowerDomainVPU1,
kCprPowerDomain_MAX
};
struct PowerManagementDomain : IODevice {
static PowerManagementDomain* getDeviceForDomain(cpr_power_domain_t domain);
virtual void setReset() = 0;
};
```
|
```c++
/*******************************************************************************
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*******************************************************************************/
#include <set>
#include <utility>
#include "../fusible_op.hpp"
#include "../visitor.hpp"
#include <compiler/ir/graph/dynamic_dispatch_key.hpp>
#include <compiler/ir/graph/dynamic_utils.hpp>
#include <ops/fusible/memory_movement.hpp>
namespace dnnl {
namespace impl {
namespace graph {
namespace gc {
// Helper function to create a block-compressed format for tensor_view transform
// check. The new format tries to convert the axis `with num_of_tiles == 1` to
// previous different axis's block.
// E.g block [128, 1, 1, 6, 1, 384] (ABCDcd) => (ABCDdd)
sc_data_format_t try_compress_format(
const sc_dims &plain_dims, const sc_data_format_t &format) {
auto &fcode = format.format_code_;
auto block_dims = sc_data_format_t::get_blocking_shapes(plain_dims, format);
std::unordered_map<int, std::vector<int>> block_axis
= format.get_blocked_axis();
int blk_idx = 0, new_idx = 0;
std::unordered_map<int, int> axis_count;
std::unordered_map<int, int> block_idx;
sc_data_format_t new_format;
for (int i = 0; i < fcode.ndims(); i++) {
auto orig_dim = fcode.get(i);
auto it = block_axis.find(orig_dim);
// the axis has block and the block shape of idx i is 1.
// the first number of block of axis should be reserved to indicate the
// axis exists.
if (block_dims[i] == 1) {
// blocks or num_of_blocks when block > 1.
if (axis_count[orig_dim] > 0
|| (it != block_axis.end()
&& std::find_if(it->second.begin(),
it->second.end(),
[&](const int &x) { return x > 1; })
!= it->second.end())) {
block_idx[orig_dim]++;
continue;
}
}
new_format.format_code_.set(new_idx++, orig_dim);
if (axis_count[orig_dim] > 0) {
assert(it != block_axis.end());
auto blk = it->second[block_idx[orig_dim]++];
new_format.blocks_[blk_idx++] = blk;
}
axis_count[orig_dim]++;
}
new_format.format_code_.set(sc_data_format_kind_t::MAX_DIMS,
format.format_code_.get_control_block());
return new_format;
}
// Helper function to judge if a reorder should be transformed to tensor
// view. If the reorder actually does not result in memory movement, we
// mark it as should_transform.
bool should_transform_reorder(const sc_op_ptr &node) {
if (can_op_be_dispatched(node)) {
auto key_set = node->get_dispatch_key_set()->get_inner_set();
return std::all_of(key_set.begin(), key_set.end(),
[](const op_dispatch_key_t &key) {
return key.in_out_formats_[0] == key.in_out_formats_[1];
});
}
assert(node->isa<reorder_op_t>());
auto input_plain_shapes = node->get_inputs()[0]->details_.get_plain_dims();
auto output_plain_shapes
= node->get_outputs()[0]->details_.get_plain_dims();
auto input_format = node->get_inputs()[0]->details_.get_format();
auto output_format = node->get_outputs()[0]->details_.get_format();
auto input_blocking_shapes
= node->get_inputs()[0]->details_.get_blocking_dims();
auto output_blocking_shapes
= node->get_outputs()[0]->details_.get_blocking_dims();
// transformation not possible due to stride
if (!node->get_inputs()[0]->details_.is_dense()
|| !node->get_outputs()[0]->details_.is_dense()) {
return false;
}
// inp format is equal to out format
if (input_format == output_format) { return true; }
// reorder for padding
if (sc_data_format_t::get_padded_plain_shapes(
input_blocking_shapes, input_format)
!= sc_data_format_t::get_padded_plain_shapes(
output_blocking_shapes, output_format)) {
return false;
}
input_format = try_compress_format(input_plain_shapes, input_format);
output_format = try_compress_format(output_plain_shapes, output_format);
input_blocking_shapes = sc_data_format_t::get_blocking_shapes(
input_plain_shapes, input_format);
output_blocking_shapes = sc_data_format_t::get_blocking_shapes(
output_plain_shapes, output_format);
int inp_idx = 0, out_idx = 0;
auto &inp_code = input_format.format_code_;
auto &out_code = output_format.format_code_;
// orig axis -> vector of block idx
auto inp_blocked_axis = input_format.get_blocked_axis();
auto out_blocked_axis = output_format.get_blocked_axis();
// orig axis -> current idx of block
std::unordered_map<int, size_t> inp_block_idx, out_block_idx;
for (int i = 0; i < input_format.format_code_.norig_dims(); i++) {
inp_block_idx[i] = -1;
}
for (int i = 0; i < output_format.format_code_.norig_dims(); i++) {
out_block_idx[i] = -1;
}
while (inp_idx < sc_data_format_kind_t::MAX_DIMS
&& out_idx < sc_data_format_kind_t::MAX_DIMS
&& (inp_code.get(inp_idx) != sc_data_format_kind_t::UNDEF_DIM
|| out_code.get(out_idx)
!= sc_data_format_kind_t::UNDEF_DIM)) {
// get next inp_block_idx
inp_block_idx[inp_code.get(inp_idx)]++;
out_block_idx[out_code.get(out_idx)]++;
// skip axis == 1
while (inp_idx < sc_data_format_kind_t::MAX_DIMS
&& inp_code.get(inp_idx) != sc_data_format_kind_t::UNDEF_DIM
&& input_blocking_shapes[inp_idx] == 1) {
inp_idx++;
inp_block_idx[inp_code.get(inp_idx)]++;
}
while (out_idx < sc_data_format_kind_t::MAX_DIMS
&& out_code.get(out_idx) != sc_data_format_kind_t::UNDEF_DIM
&& output_blocking_shapes[out_idx] == 1) {
out_idx++;
out_block_idx[out_code.get(out_idx)]++;
}
if (inp_code.get(inp_idx) != out_code.get(out_idx)) { return false; }
// skip same axis
while (inp_code.get(inp_idx + 1) != sc_data_format_kind_t::UNDEF_DIM
&& inp_code.get(inp_idx + 1) == inp_code.get(inp_idx)) {
inp_block_idx[inp_code.get(inp_idx + 1)]++;
inp_idx++;
}
while (out_code.get(out_idx + 1) != sc_data_format_kind_t::UNDEF_DIM
&& out_code.get(out_idx + 1) == out_code.get(out_idx)) {
out_block_idx[out_code.get(out_idx + 1)]++;
out_idx++;
}
int orig_inp_axis = inp_code.get(inp_idx);
int orig_out_axis = out_code.get(out_idx);
// different axis
if (orig_inp_axis != orig_out_axis) { return false; }
// different block
auto inp_block_itr = inp_blocked_axis.find(orig_inp_axis);
auto out_block_itr = out_blocked_axis.find(orig_out_axis);
if (inp_block_itr != inp_blocked_axis.end()
|| out_block_itr != out_blocked_axis.end()) {
// inp has no block, but out has blocks remained.
if (inp_block_itr == inp_blocked_axis.end()
&& out_block_idx[orig_out_axis]
< out_block_itr->second.size()) {
return false;
}
// out has no block, but inp has blocks remained.
if (out_block_itr == out_blocked_axis.end()
&& inp_block_idx[orig_inp_axis]
< inp_block_itr->second.size()) {
return false;
}
// inp and out both have blocks.
if (inp_block_itr != inp_blocked_axis.end()
&& out_block_itr != out_blocked_axis.end()) {
// inp and out have blocks remained.
if (inp_block_idx[orig_inp_axis] < inp_block_itr->second.size()
&& out_block_idx[orig_out_axis]
< out_block_itr->second.size()) {
// inp and out block remained should be equal.
if (inp_block_itr->second[inp_block_idx[orig_inp_axis]]
!= out_block_itr
->second[out_block_idx[orig_out_axis]]) {
return false;
}
} else if (inp_block_idx[orig_inp_axis]
< inp_block_itr->second.size()) {
return false;
} else if (out_block_idx[orig_out_axis]
< out_block_itr->second.size()) {
return false;
}
// else inp and out have no remained blocks.
}
}
// increase inp_idx
inp_idx++;
out_idx++;
}
return true;
}
static bool should_transform_transpose(const sc_op_ptr &node) {
assert(node->isa<transpose_op_t>());
// all transpose op can be converted to tensor_view as long as layout
// propagation is in effect
if (node->attrs_.get_or_else("layout_transformed", false)) {
// means that we have transformed the data format
return true;
}
return false;
}
// Replace reorder op and transpose op that does not cause data movements with
// tensor_view op
void convert_to_tensor_view(sc_graph_t &graph, const context_ptr &ctx) {
auto vis = op_visitor_t::bfs();
int reorder2tv = graph.attrs_.get_or_else("temp.reorder2tv", 1);
vis.visit_graph(graph, [&](op_visitor_t *vis, const sc_op_ptr &node) {
if (node->isa<reorder_op_t>() && reorder2tv
&& should_transform_reorder(node)
&& !node->attrs_.get_or_else("actually_copy", false)) {
auto tensor_view_out = node->get_outputs()[0]->copy();
tensor_view_out->producer_owner_ = nullptr;
auto view = graph.make("tensor_view", node->get_inputs(),
{tensor_view_out},
{{"shape", tensor_view_out->details_.get_blocking_dims()}});
view->copy_dispatch_key_set_from_op(node);
node->replace_uses_with_and_remove(view);
vis->update_state_for_visited(view);
} else if (node->isa<transpose_op_t>()
&& should_transform_transpose(node)) {
auto tensor_view_out = node->get_outputs()[0]->copy();
tensor_view_out->producer_owner_ = nullptr;
auto view = graph.make("tensor_view", node->get_inputs(),
{tensor_view_out},
{{"shape", tensor_view_out->details_.get_blocking_dims()},
{"order",
node->attrs_.get<std::vector<int>>(
"order")}});
view->copy_dispatch_key_set_from_op(node);
node->replace_uses_with_and_remove(view);
vis->update_state_for_visited(view);
}
});
graph.reset_op_ids();
}
void tensor_view_transform(sc_graph_t &graph, const context_ptr &ctx) {
convert_to_tensor_view(graph, ctx);
}
} // namespace gc
} // namespace graph
} // namespace impl
} // namespace dnnl
```
|
```objective-c
#pragma once
#include <Disks/IDisk.h>
#include <Storages/FileLog/Buffer_fwd.h>
#include <Storages/FileLog/FileLogDirectoryWatcher.h>
#include <Storages/FileLog/FileLogSettings.h>
#include <Core/BackgroundSchedulePool.h>
#include <Storages/IStorage.h>
#include <Common/SettingsChanges.h>
#include <atomic>
#include <condition_variable>
#include <filesystem>
#include <fstream>
#include <mutex>
#include <optional>
namespace DB
{
namespace ErrorCodes
{
extern const int LOGICAL_ERROR;
}
class FileLogDirectoryWatcher;
class StorageFileLog final : public IStorage, WithContext
{
public:
StorageFileLog(
const StorageID & table_id_,
ContextPtr context_,
const ColumnsDescription & columns_,
const String & path_,
const String & metadata_base_path_,
const String & format_name_,
std::unique_ptr<FileLogSettings> settings,
const String & comment,
LoadingStrictnessLevel mode);
using Files = std::vector<String>;
std::string getName() const override { return "FileLog"; }
bool noPushingToViews() const override { return true; }
void startup() override;
void shutdown(bool is_drop) override;
void read(
QueryPlan & query_plan,
const Names & column_names,
const StorageSnapshotPtr & storage_snapshot,
SelectQueryInfo & query_info,
ContextPtr context,
QueryProcessingStage::Enum processed_stage,
size_t max_block_size,
size_t num_streams) override;
void drop() override;
const auto & getFormatName() const { return format_name; }
enum class FileStatus : uint8_t
{
OPEN, /// First time open file after table start up.
NO_CHANGE,
UPDATED,
REMOVED,
};
struct FileContext
{
FileStatus status = FileStatus::OPEN;
UInt64 inode{};
std::optional<std::ifstream> reader = std::nullopt;
};
struct FileMeta
{
String file_name;
UInt64 last_writen_position = 0;
UInt64 last_open_end = 0;
bool operator!() const { return file_name.empty(); }
};
using InodeToFileMeta = std::unordered_map<UInt64, FileMeta>;
using FileNameToContext = std::unordered_map<String, FileContext>;
struct FileInfos
{
InodeToFileMeta meta_by_inode;
FileNameToContext context_by_name;
/// File names without path.
Names file_names;
};
auto & getFileInfos() { return file_infos; }
String getFullMetaPath(const String & file_name) const { return std::filesystem::path(metadata_base_path) / file_name; }
String getFullDataPath(const String & file_name) const { return std::filesystem::path(root_data_path) / file_name; }
static UInt64 getInode(const String & file_name);
void openFilesAndSetPos();
/// Used in FileLogSource when finish generating all blocks.
/// Each stream responsible for close its files and store meta.
void closeFilesAndStoreMeta(size_t start, size_t end);
/// Used in FileLogSource after generating every block
void storeMetas(size_t start, size_t end);
static void assertStreamGood(const std::ifstream & reader);
template <typename K, typename V>
static V & findInMap(std::unordered_map<K, V> & map, const K & key)
{
if (auto it = map.find(key); it != map.end())
return it->second;
else
throw Exception(ErrorCodes::LOGICAL_ERROR, "The key {} doesn't exist.", key);
}
void increaseStreams();
void reduceStreams();
void wakeUp();
const auto & getFileLogSettings() const { return filelog_settings; }
private:
friend class ReadFromStorageFileLog;
std::unique_ptr<FileLogSettings> filelog_settings;
const String path;
bool path_is_directory = true;
/// If path argument of the table is a regular file, it equals to user_files_path
/// otherwise, it equals to user_files_path/ + path_argument/, e.g. path
String root_data_path;
String metadata_base_path;
FileInfos file_infos;
const String format_name;
LoggerPtr log;
DiskPtr disk;
uint64_t milliseconds_to_wait;
/// In order to avoid data race, using a naive trick to forbid execute two select
/// simultaneously, although read is not useful in this engine. Using an atomic
/// variable to records current unfinishing streams, then if have unfinishing streams,
/// later select should forbid to execute.
std::atomic<int> running_streams = 0;
std::mutex mutex;
bool has_new_events = false;
std::condition_variable cv;
std::atomic<bool> mv_attached = false;
std::mutex file_infos_mutex;
struct TaskContext
{
BackgroundSchedulePool::TaskHolder holder;
std::atomic<bool> stream_cancelled {false};
explicit TaskContext(BackgroundSchedulePool::TaskHolder&& task_) : holder(std::move(task_))
{
}
};
std::shared_ptr<TaskContext> task;
std::unique_ptr<FileLogDirectoryWatcher> directory_watch;
void loadFiles();
void loadMetaFiles(bool attach);
void threadFunc();
size_t getPollMaxBatchSize() const;
size_t getMaxBlockSize() const;
size_t getPollTimeoutMillisecond() const;
bool streamToViews();
bool checkDependencies(const StorageID & table_id);
bool updateFileInfos();
size_t getTableDependentCount() const;
/// Used in shutdown()
void serialize() const;
/// Used in FileSource closeFileAndStoreMeta(file_name).
void serialize(UInt64 inode, const FileMeta & file_meta) const;
void deserialize();
void checkOffsetIsValid(const String & filename, UInt64 offset) const;
struct ReadMetadataResult
{
FileMeta metadata;
UInt64 inode = 0;
};
ReadMetadataResult readMetadata(const String & filename) const;
static VirtualColumnsDescription createVirtuals(StreamingHandleErrorMode handle_error_mode);
};
}
```
|
```javascript
const test = require('tape')
const isFunction = require('./isFunction')
const unit = require('./_unit')
const isTypeRepOf = require('./isTypeRepOf')
test('isTypeRepOf internal', t => {
t.ok(isFunction(isTypeRepOf), 'is a function')
const fn =
x => isTypeRepOf(String, x)
t.notOk(fn(undefined), 'returns false for undefined value')
t.notOk(fn(null), 'returns false for null value')
t.notOk(fn(0), 'returns false for falsey number value')
t.notOk(fn(1), 'returns false for truthy number value')
t.notOk(fn(''), 'returns false for falsey string value')
t.notOk(fn('string'), 'returns false for truthy string value')
t.notOk(fn(false), 'returns false for false boolean value')
t.notOk(fn(true), 'returns false for true boolean value')
t.notOk(fn(unit), 'returns false for a function')
t.notOk(fn(Array), 'returns false for different constructor')
t.ok(fn(String), 'returns true for same constructor')
t.end()
})
```
|
Wild grass may refer to:
Grass that is uncultivated.
Wild Grass, the English-language title of Les Herbes folles, a 2009 film directed by Alain Resnais.
|
```java
package com.fishercoder.solutions.secondthousand;
public class _1827 {
public static class Solution1 {
public int minOperations(int[] nums) {
int minsOps = 0;
for (int i = 1; i < nums.length; i++) {
if (nums[i] <= nums[i - 1]) {
minsOps += nums[i - 1] - nums[i] + 1;
nums[i] = nums[i - 1] + 1;
}
}
return minsOps;
}
}
}
```
|
Green Island is one of the Berthelot Islands group, lying off the west coast of Graham Land, Antarctica.
Description
The island is about 20 ha in area. It lies 150 m north
of the largest of the Berthelot Islands group, some 3 km off the
Graham Coast of the Antarctic Peninsula. It is 520 m long from north to south and
500 m wide from east to west, rising to a rounded peak 83 m high. It rises steeply on all sides, with precipitous cliffs on the southern and eastern sides.
Antarctic Specially Protected Area
It is protected as Antarctic Specially Protected Area (ASPA) No.108 because of its vegetation which was described as “probably the most luxuriant anywhere on the west side of the Antarctic Peninsula”. On its north-facing slopes it has well-developed banks of moss turf formed by Polytrichum strictum and Chorisodontium aciphyllum overlying peat more than a metre deep. Antarctic hair grass grows in small patches on the steep, rocky north-western corner of the island near a colony of 500–600 Antarctic shags, one of the largest on the Antarctic Peninsula.
References
Antarctic Specially Protected Areas
Islands of Graham Land
Seabird colonies
|
```php
<?php
/*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
*/
namespace Google\Service\AndroidProvisioningPartner;
class GetDeviceSimLockStateResponse extends \Google\Model
{
/**
* @var string
*/
public $simLockState;
/**
* @param string
*/
public function setSimLockState($simLockState)
{
$this->simLockState = $simLockState;
}
/**
* @return string
*/
public function getSimLockState()
{
return $this->simLockState;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GetDeviceSimLockStateResponse::class, your_sha256_hashesponse');
```
|
William John Glasson (born 2 January 1953) is an Australian ophthalmologist. He was President of the Australian Medical Association 2003–05. He was an unsuccessful candidate for the Liberal National Party of Queensland in the contest for the seat of Griffith, held by the Prime Minister Kevin Rudd, in the 2013 federal election. He was again unsuccessful in the by-election held on 8 February 2014 as a result of Rudd's resignation from Parliament.
Career
Glasson was born in Winton, Queensland on 2 January 1953. His father, also Bill Glasson (1925–2012), was a National Party Queensland state politician 1974–89, and a Cabinet minister in the Government of Joh Bjelke-Petersen, holding the portfolios of Police and Lands, among others.
He was a student at Anglican Church Grammar School (Churchie) in East Brisbane from 1965 to 1969.
He commenced his career as an optometrist, before studying to become an ophthalmologist. He studied at the University of Queensland, gaining a Bachelor of Medicine and Bachelor of Surgery (MBBS). He has a medical and surgical practice in suburban Brisbane. His practice extends to western Queensland and to East Timor, where he oversees the St John Eye Services and education in Oecuzzi.
He is a member of the Australian Army Reserve. He is also a consultant ophthalmologist to the Australian Army with the rank of lieutenant colonel. He was also medical adviser to the Northern Territory Emergency Response Taskforce 2006–07.
He has been President of the Royal Australian and New Zealand College of Ophthalmologists. He is a member of professional organisations such as the Royal Australasian College of Surgeons, American Academy of Ophthalmology, Australian Society of Cataract & Refractive Surgery, American Society of Cataract & Refractive Surgery and Australian Optometry Association. He is an Adjunct Associate Professor with the University of Queensland School of Medicine.
Australian Medical Association
Glasson became involved in the Australian Medical Association (AMA) at the Queensland level in 1995, rising to become State President 2001–02. In 2003 he was elected to succeed Kerryn Phelps as National President of the AMA. He remained in this post until 2005.
Politics
In September 2012 he was chosen as the Liberal National Party of Queensland's candidate for the Brisbane federal seat of Griffith to oppose the Labor sitting member, Kevin Rudd. At that time, Rudd was the former Prime Minister of Australia, as he had resigned the office in June 2010 and Julia Gillard had been elected unopposed in his place. In June 2013, however, Rudd regained the prime ministership. Glasson was unsuccessful at the September 2013 federal election, with Rudd retaining Griffith with 53.0% of the two-party preferred vote, representing a 5.5% swing against the ALP. This swing was the largest suffered by a Labor incumbent in Queensland at the election. Glasson led Rudd on primary votes by 42.2% to 40.4%. In his concession speech after losing the prime ministership to Tony Abbott, Kevin Rudd said "it would be un-prime ministerial of me to say Bill Glasson, eat your heart out, so I won't".
Rudd resigned from Parliament in November 2013, and a Griffith by-election was held on 8 February 2014. Glasson again contested for the LNP, but was defeated by Labor's Terri Butler.
In May 2015 Glasson unsuccessfully sought preselection for the casual vacancy in the representation of Queensland in the Senate caused by resignation of Senator Brett Mason. One of nine candidates, he was defeated by Joanna Lindgren on the final count. The Sydney Morning Herald reported that Lindgren was a "surprise candidate" who "opposes gay marriage, abortion and euthanasia" after Glasson was "called in" to explain his support for gay rights.
Family
Glasson's wife Dr Claire Jackson is a general practitioner and former president of the Royal Australian College of General Practitioners (RACGP). Bill Glasson himself is an Honorary Fellow of the college. They have three children, two daughters and a son.
Honours
In the Australia Day Honours 2008 he was appointed an Officer of the Order of Australia, for services to medicine in rural and remote Australia, to the eye health of indigenous people, and to professional medical organisations.
References
1953 births
Living people
People educated at Anglican Church Grammar School
University of Queensland alumni
Australian ophthalmologists
Liberal National Party of Queensland politicians
Officers of the Order of Australia
Presidents of the Australian Medical Association
|
Vesna Furundžić (; born 1981) is a politician in Serbia. She has served in the Assembly of Vojvodina since 2020 as a member of the Serbian Progressive Party.
Private career
Furundžić holds a bachelor's degree in economics. She lives in Pančevo.
Politician
Furundžić was elected to the Kotež local community council in Pančevo in 2017.
She received the fortieth position on the Progressive Party's Aleksandar Vučić — For Our Children electoral list in the 2020 Vojvodina provincial election and was elected when the list won a majority victory with seventy-six out of 120 mandates. She is now a member of the assembly committee on gender equality and the committee on urban and spatial planning and environmental protection.
She also received the twentieth position on the Progressive Party's list in Pančevo for the concurrent 2020 Serbian local elections and was elected when the list won a majority victory with forty-seven out of seventy mandates.
References
1981 births
Living people
Politicians from Pančevo
Members of the Assembly of Vojvodina
Serbian Progressive Party politicians
|
```php
<?php
/**
* Disable error reporting
*
* Set this to error_reporting( -1 ) for debugging.
*/
error_reporting(0);
/** Set ABSPATH for execution */
define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' );
define( 'WPINC', 'wp-includes' );
$load = $_GET['load'];
if ( is_array( $load ) )
$load = implode( '', $load );
$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
$load = array_unique( explode( ',', $load ) );
if ( empty($load) )
exit;
require( ABSPATH . 'wp-admin/includes/noop.php' );
require( ABSPATH . WPINC . '/script-loader.php' );
require( ABSPATH . WPINC . '/version.php' );
$compress = ( isset($_GET['c']) && $_GET['c'] );
$force_gzip = ( $compress && 'gzip' == $_GET['c'] );
$expires_offset = 31536000; // 1 year
$out = '';
$wp_scripts = new WP_Scripts();
wp_default_scripts($wp_scripts);
if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) {
$protocol = $_SERVER['SERVER_PROTOCOL'];
if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) {
$protocol = 'HTTP/1.0';
}
header( "$protocol 304 Not Modified" );
exit();
}
foreach ( $load as $handle ) {
if ( !array_key_exists($handle, $wp_scripts->registered) )
continue;
$path = ABSPATH . $wp_scripts->registered[$handle]->src;
$out .= get_file($path) . "\n";
}
header("Etag: $wp_version");
header('Content-Type: application/javascript; charset=UTF-8');
header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
header("Cache-Control: public, max-age=$expires_offset");
if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
header('Vary: Accept-Encoding'); // Handle proxies
if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
header('Content-Encoding: deflate');
$out = gzdeflate( $out, 3 );
} elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
header('Content-Encoding: gzip');
$out = gzencode( $out, 3 );
}
}
echo $out;
exit;
```
|
```go
package v1_10 //nolint
import "xorm.io/xorm"
func AddRepoAdminChangeTeamAccessColumnForUser(x *xorm.Engine) error {
type User struct {
RepoAdminChangeTeamAccess bool `xorm:"NOT NULL DEFAULT false"`
}
return x.Sync(new(User))
}
```
|
Autumn is a feminine given name derived from the Latin word autumnus, meaning "fall" or "autumn".
The name has been in use in the United States since at least the late 1960s and has been ranked among the top 100 names for girls there since 1997. It has also been a popular name for girls in Canada, where it ranked 119th among the most popular names for newborn girls in 2021, and the United Kingdom in recent years. Historically, the name has been most common in the Northeastern United States and Canada, in regions with many deciduous trees that seasonally change color, which is considered highly attractive. The name has been less common in regions with less distinctive changes during the season.
People named Autumn
Autumn Bailey (born 1995), Canadian volleyball player
Autumn Burke (born 1973), American politician
Autumn Chiklis (born 1993), American actress and writer
Autumn Christian, American author
Autumn Daly, houseguest on the second season of Big Brother (US)
Autumn de Forest (born 2001), American painter
Autumn de Wilde (born 1970), American photographer
Autumn Durald (born 1979), American cinematographer
Autumn Federici, American model, producer, and actress
Jennifer Blake (wrestler) (born 1983), also known by her ring-name Autumn Frost
Autumn Hurlbert (born 1980), American singer and actress
Autumn Jackson (born 1974), American criminal
Autumn Kent, American mathematician
Autumn Mills (born 1988), Canadian ice hockey player
Autumn Peltier (born 2004), Canadian Anishinaabe climate activist
Autumn Phillips (born 1978), Canadian wife of Peter Phillips, grandson of Queen Elizabeth II
Autumn Rademacher (born 1975), American women's basketball coach, currently at the University of Detroit Mercy
Autumn Reeser (born 1980), American actress
Autumn Rowe (born 1981), American singer and songwriter
Autumn Sandeen, American transgender activist and blogger
Autumn Simunek, American beauty pageant titleholder
Autumn Smithers (born 1997), American professional soccer player
Autumn-Rain Stephens-Daly, New Zealand professional rugby league footballer
Notes
English feminine given names
Feminine given names
Given names derived from seasons
|
```smalltalk
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
namespace tmt
{
class Report
{
const string FileFieldSeparator = "\t";
const string FormattedDuplicateColumnHeader = "Is Duplicate?";
const string FormattedGenericColumnHeader = "Is Generic?";
const string FormattedJavaTypeColumnHeader = "Java type name";
const string FormattedMVIDColumnHeader = "MVID";
const string FormattedManagedTypeColumnHeader = "Managed type name";
const string FormattedTokenIDColumnHeader = "Type token ID";
const string RawJavaTypeNameColumnHeader = FormattedJavaTypeColumnHeader;
const string RawManagedModuleIndexColumnHeader = "Managed module index";
const string RawTypeTokenColumnHeader = FormattedTokenIDColumnHeader;
const string TableJavaToManagedTitle = "Java to Managed";
const string TableManagedToJavaTitle = "Managed to Java";
sealed class Column
{
int width = 0;
public int Width => width;
public string Header { get; }
public List<string> Rows { get; } = new List<string> ();
public Column (string header)
{
Header = header;
width = header.Length;
}
public void Add (string rowValue)
{
if (rowValue.Length > width) {
width = rowValue.Length;
}
Rows.Add (rowValue);
}
public void Add (bool rowValue)
{
Add (rowValue ? "true" : "false");
}
public void Add (uint rowValue)
{
Add ($"0x{rowValue:X08} ({rowValue})");
}
public void Add (Guid rowValue)
{
Add (rowValue.ToString ());
}
}
sealed class Table
{
public Column Duplicate { get; } = new Column (FormattedDuplicateColumnHeader);
public Column Generic { get; } = new Column (FormattedGenericColumnHeader);
public Column JavaType { get; } = new Column (FormattedJavaTypeColumnHeader);
public Column MVID { get; } = new Column (FormattedMVIDColumnHeader);
public Column ManagedType { get; } = new Column (FormattedManagedTypeColumnHeader);
public Column TokenID { get; } = new Column (FormattedTokenIDColumnHeader);
public string Title { get; }
public bool ManagedFirst { get; }
public Table (string title, bool managedFirst)
{
Title = title;
ManagedFirst = managedFirst;
}
}
string outputDirectory;
Regex? filterRegex;
bool full;
bool onlyJava;
bool onlyManaged;
bool generateFiles;
public Report (string outputDirectory, string filterRegex, bool full, bool onlyJava, bool onlyManaged, bool generateFiles)
{
this.outputDirectory = outputDirectory;
this.full = full;
this.onlyJava = onlyJava;
this.onlyManaged = onlyManaged;
this.generateFiles = generateFiles;
if (filterRegex.Length > 0) {
this.filterRegex = new Regex (filterRegex, RegexOptions.Compiled);
}
}
public void Generate (ITypemap typemap)
{
Action<Table, MapEntry, bool> tableGenerator;
Action<MapEntry, bool> consoleGenerator;
var tables = new List<Table> ();
bool filtering = filterRegex != null;
Table table;
if (!onlyManaged) {
typemap.Map.JavaToManaged.Sort ((MapEntry left, MapEntry right) => left.JavaType.Name.CompareTo (right.JavaType.Name));
table = new Table (TableJavaToManagedTitle, managedFirst: false);
tables.Add (table);
if (typemap.Map.Kind == MapKind.Release) {
tableGenerator = TableGenerateJavaToManagedRelease;
consoleGenerator = ConsoleGenerateJavaToManagedRelease;
} else {
tableGenerator = TableGenerateJavaToManagedDebug;
consoleGenerator = ConsoleGenerateJavaToManagedDebug;
}
Generate ("Java to Managed", table, typemap.Map.JavaToManaged, full, tableGenerator, consoleGenerator);
}
if (!onlyJava) {
typemap.Map.ManagedToJava.Sort ((MapEntry left, MapEntry right) => {
int result = String.Compare (left.ManagedType.AssemblyName, right.ManagedType.AssemblyName, StringComparison.OrdinalIgnoreCase);
if (result != 0)
return result;
return left.ManagedType.TypeName.CompareTo (right.ManagedType.TypeName);
});
table = new Table (TableManagedToJavaTitle, managedFirst: true);
tables.Add (table);
if (typemap.Map.Kind == MapKind.Release) {
tableGenerator = TableGenerateManagedToJavaRelease;
consoleGenerator = ConsoleGenerateManagedToJavaRelease;
} else {
tableGenerator = TableGenerateManagedToJavaDebug;
consoleGenerator = ConsoleGenerateManagedToJavaDebug;
}
Generate ("Managed to Java", table, typemap.Map.ManagedToJava, full, tableGenerator, consoleGenerator);
}
string? outputFile = null;
StreamWriter? sw = null;
if (generateFiles) {
outputFile = Utilities.GetOutputFileBaseName (outputDirectory, typemap.FormatVersion, typemap.Map.Kind, typemap.Map.Architecture);
outputFile = $"{outputFile}.md";
Utilities.CreateFileDirectory (outputFile);
sw = new StreamWriter (outputFile, false, new UTF8Encoding (false));
}
try {
if (sw != null) {
sw.WriteLine ("# Info");
sw.WriteLine ();
sw.WriteLine ($"Architecture: **{typemap.MapArchitecture}**");
sw.WriteLine ($" Build kind: **{typemap.Map.Kind}**");
sw.WriteLine ($" Format: **{typemap.FormatVersion}**");
sw.WriteLine ($" Description: **{typemap.Description}**");
sw.WriteLine ();
}
foreach (Table t in tables) {
if (sw != null) {
WriteTable (sw, t);
sw.WriteLine ();
}
}
} finally {
if (sw != null) {
sw.Flush ();
sw.Close ();
sw.Dispose ();
}
}
}
void WriteTable (StreamWriter sw, Table table)
{
sw.WriteLine ($"# {table.Title}");
sw.WriteLine ();
// Just non-empty columns
var columns = new List<Column> ();
if (table.ManagedFirst) {
MaybeAddColumn (table.ManagedType);
MaybeAddColumn (table.JavaType);
} else {
MaybeAddColumn (table.JavaType);
MaybeAddColumn (table.ManagedType);
}
MaybeAddColumn (table.TokenID);
MaybeAddColumn (table.Generic);
MaybeAddColumn (table.Duplicate);
MaybeAddColumn (table.MVID);
if (columns.Count == 0) {
Log.Warning ("No non-empty columns");
return;
}
// All columns must have equal numbers of rows
int rows = columns[0].Rows.Count;
foreach (Column column in columns) {
if (column.Rows.Count != rows) {
throw new InvalidOperationException ($"Column {column.Header} has a different number of rows, {column.Rows.Count}, than the expected value of {rows}");
}
}
var sb = new StringBuilder ();
int width;
string prefix;
var divider = new StringBuilder ();
foreach (Column column in columns) {
width = GetColumnWidth (column);
divider.Append ("| ");
divider.Append ('-', width - 3);
divider.Append (' ');
prefix = $"| {column.Header}";
sw.Write (prefix);
sw.Write (GetPadding (width - prefix.Length));
}
sw.WriteLine ('|');
sw.Write (divider);
sw.WriteLine ('|');
for (int row = 0; row < rows; row++) {
foreach (Column column in columns) {
width = GetColumnWidth (column);
prefix = $"| {column.Rows[row]}";
sw.Write (prefix);
sw.Write (GetPadding (width - prefix.Length));
}
sw.Write ('|');
sw.WriteLine ();
}
void MaybeAddColumn (Column column)
{
if (column.Rows.Count == 0) {
return;
}
columns.Add (column);
}
int GetColumnWidth (Column column) => column.Width + 3; // For the '| ' prefix and ' ' suffix
string GetPadding (int width)
{
sb.Clear ();
return sb.Append (' ', width).ToString ();
}
}
void TableGenerateJavaToManagedDebug (Table table, MapEntry entry, bool full)
{
table.JavaType.Add (entry.JavaType.Name);
table.ManagedType.Add (GetManagedTypeNameDebug (entry));
table.Duplicate.Add (entry.ManagedType.IsDuplicate);
}
void TableGenerateJavaToManagedRelease (Table table, MapEntry entry, bool full)
{
string managedTypeName = GetManagedTypeNameRelease (entry);
string generic = entry.ManagedType.IsGeneric ? IgnoredGeneric : "no";
table.JavaType.Add (entry.JavaType.Name);
table.ManagedType.Add (managedTypeName);
table.Generic.Add (generic);
if (!full) {
return;
}
table.MVID.Add (entry.ManagedType.MVID);
table.TokenID.Add (entry.ManagedType.TokenID);
}
void TableGenerateManagedToJavaDebug (Table table, MapEntry entry, bool full)
{
table.JavaType.Add (entry.JavaType.Name);
table.ManagedType.Add (GetManagedTypeNameDebug (entry));
table.Duplicate.Add (entry.ManagedType.IsDuplicate);
}
void TableGenerateManagedToJavaRelease (Table table, MapEntry entry, bool full)
{
string managedTypeName = GetManagedTypeNameRelease (entry);
string generic = entry.ManagedType.IsGeneric ? IgnoredGeneric : "no";
table.ManagedType.Add (managedTypeName);
table.JavaType.Add (entry.JavaType.Name);
table.Generic.Add (generic);
table.Duplicate.Add (entry.ManagedType.IsDuplicate);
if (!full) {
return;
}
table.MVID.Add (entry.ManagedType.MVID);
table.TokenID.Add (entry.ManagedType.TokenID);
}
void Generate (string label, Table table, List<MapEntry> typemap, bool full, Action<Table, MapEntry, bool> tableGenerator, Action<MapEntry, bool> consoleGenerator)
{
bool firstMatch = true;
foreach (MapEntry entry in typemap) {
if (generateFiles) {
tableGenerator (table, entry, full);
}
if (filterRegex == null || !EntryMatches (entry, filterRegex)) {
continue;
}
if (firstMatch) {
Log.Info ();
Log.Info ($" Matching entries ({label}):");
firstMatch = false;
}
consoleGenerator (entry, full);
}
}
void GenerateOld (ITypemap typemap)
{
string baseOutputFile = generateFiles ? Utilities.GetOutputFileBaseName (outputDirectory, typemap.FormatVersion, typemap.Map.Kind, typemap.Map.Architecture) : String.Empty;
Action<StreamWriter, MapEntry, bool, bool> fileGenerator;
Action<MapEntry, bool> consoleGenerator;
bool filtering = filterRegex != null;
if (!onlyManaged) {
typemap.Map.JavaToManaged.Sort ((MapEntry left, MapEntry right) => left.JavaType.Name.CompareTo (right.JavaType.Name));
if (typemap.Map.Kind == MapKind.Release) {
fileGenerator = FileGenerateJavaToManagedRelease;
consoleGenerator = ConsoleGenerateJavaToManagedRelease;
} else {
fileGenerator = FileGenerateJavaToManagedDebug;
consoleGenerator = ConsoleGenerateJavaToManagedDebug;
}
Generate (
filtering ? "Java to Managed" : "Java to Managed output file",
Utilities.GetJavaOutputFileName (baseOutputFile, "txt"),
typemap.Map.JavaToManaged,
full,
fileGenerator,
consoleGenerator
);
}
if (!onlyJava) {
typemap.Map.ManagedToJava.Sort ((MapEntry left, MapEntry right) => {
int result = String.Compare (left.ManagedType.AssemblyName, right.ManagedType.AssemblyName, StringComparison.OrdinalIgnoreCase);
if (result != 0)
return result;
return left.ManagedType.TypeName.CompareTo (right.ManagedType.TypeName);
});
if (typemap.Map.Kind == MapKind.Release) {
fileGenerator = FileGenerateManagedToJavaRelease;
consoleGenerator = ConsoleGenerateManagedToJavaRelease;
} else {
fileGenerator = FileGenerateManagedToJavaDebug;
consoleGenerator = ConsoleGenerateManagedToJavaDebug;
}
Generate (
filtering ? "Managed to Java" : "Managed to Java output file",
Utilities.GetManagedOutputFileName (baseOutputFile, "txt"),
typemap.Map.ManagedToJava,
full,
fileGenerator,
consoleGenerator
);
}
}
void Generate (string name, string outputFile, List<MapEntry> typemap, bool full, Action<StreamWriter, MapEntry, bool, bool> fileGenerator, Action<MapEntry, bool> consoleGenerator)
{
if (generateFiles) {
Log.Info ($" {name}: {outputFile}");
Utilities.CreateFileDirectory (outputFile);
}
StreamWriter? sw = null;
if (generateFiles) {
sw = new StreamWriter (outputFile, false, new UTF8Encoding (false));
}
bool firstMatch = true;
bool first = true;
try {
foreach (MapEntry entry in typemap) {
if (generateFiles) {
fileGenerator (sw!, entry, full, first);
if (first) {
first = false;
}
}
if (filterRegex == null || !EntryMatches (entry, filterRegex)) {
continue;
}
if (firstMatch) {
Log.Info ();
Log.Info ($" Matching entries ({name}):");
firstMatch = false;
}
consoleGenerator (entry, full);
}
} finally {
if (sw != null) {
sw.Flush ();
sw.Close ();
sw.Dispose ();
}
}
}
string GetTokenID (MapEntry entry)
{
return $"{entry.ManagedType.TokenID} (0x{entry.ManagedType.TokenID:X08})";
}
string GetManagedTypeNameRelease (MapEntry entry)
{
return $"{entry.ManagedType.TypeName}, {entry.ManagedType.AssemblyName}";
}
string GetManagedTypeNameDebug (MapEntry entry)
{
return entry.ManagedType.TypeName;
}
const string IgnoredGeneric = "generic, ignored";
const string Duplicate = "duplicate entry";
void FileGenerateJavaToManagedDebug (StreamWriter sw, MapEntry entry, bool full, bool firstEntry)
{
if (firstEntry) {
string sep = FileFieldSeparator;
sw.WriteLine ($"{FormattedJavaTypeColumnHeader}{sep}{FormattedManagedTypeColumnHeader}{sep}{FormattedDuplicateColumnHeader}");
}
WriteLineToFile (sw,
entry.JavaType.Name,
GetManagedTypeNameDebug (entry),
entry.ManagedType.IsDuplicate ? Duplicate : String.Empty
);
}
void ConsoleGenerateJavaToManagedDebug (MapEntry entry, bool full)
{
Log.Info ($" {entry.JavaType.Name} -> {entry.ManagedType.TypeName}");
}
void FileGenerateJavaToManagedRelease (StreamWriter sw, MapEntry entry, bool full, bool firstEntry)
{
string managedTypeName = GetManagedTypeNameRelease (entry);
string generic = entry.ManagedType.IsGeneric ? IgnoredGeneric : String.Empty;
if (!full) {
if (firstEntry) {
string sep = FileFieldSeparator;
sw.WriteLine ($"{FormattedJavaTypeColumnHeader}{sep}{FormattedManagedTypeColumnHeader}{sep}{FormattedGenericColumnHeader}");
}
WriteLineToFile (
sw,
entry.JavaType.Name,
managedTypeName,
generic
);
return;
}
if (firstEntry) {
string sep = FileFieldSeparator;
sw.WriteLine ($"{FormattedJavaTypeColumnHeader}{sep}{FormattedManagedTypeColumnHeader}{sep}{FormattedGenericColumnHeader}{sep}{FormattedMVIDColumnHeader}{sep}{FormattedTokenIDColumnHeader}");
}
WriteLineToFile (
sw,
entry.JavaType.Name,
managedTypeName,
generic,
entry.ManagedType.MVID.ToString (),
TokenIdToString (entry)
);
}
void ConsoleGenerateJavaToManagedRelease (MapEntry entry, bool full)
{
string managedTypeName = GetManagedTypeNameRelease (entry);
if (!full) {
string generic;
if (entry.ManagedType.IsGeneric) {
generic = $" ({IgnoredGeneric})";
} else {
generic = String.Empty;
}
Log.Info ($" {entry.JavaType.Name} -> {managedTypeName}{generic}");
return;
}
Log.Info ($" {entry.JavaType.Name} -> {managedTypeName}; MVID: {entry.ManagedType.MVID}; Token ID: {TokenIdToString (entry)}");
}
string TokenIdToString (MapEntry entry)
{
if (entry.ManagedType.IsGeneric) {
return "0 (0x00000000)";
} else {
return GetTokenID (entry);
}
}
void FileGenerateManagedToJavaDebug (StreamWriter sw, MapEntry entry, bool full, bool firstEntry)
{
if (firstEntry) {
string sep = FileFieldSeparator;
sw.WriteLine ($"{FormattedManagedTypeColumnHeader}{sep}{FormattedJavaTypeColumnHeader}{sep}{FormattedDuplicateColumnHeader}");
}
WriteLineToFile (sw,
GetManagedTypeNameDebug (entry),
entry.JavaType.Name,
entry.ManagedType.IsDuplicate ? Duplicate : String.Empty
);
}
void ConsoleGenerateManagedToJavaDebug (MapEntry entry, bool full)
{
Log.Info ($" {GetManagedTypeNameDebug (entry)} -> {entry.JavaType.Name}{GetAdditionalInfo (entry)}");
}
void FileGenerateManagedToJavaRelease (StreamWriter sw, MapEntry entry, bool full, bool firstEntry)
{
string managedTypeName = GetManagedTypeNameRelease (entry);
string duplicate = entry.ManagedType.IsDuplicate ? Duplicate : " ";
string generic = entry.ManagedType.IsGeneric ? IgnoredGeneric : " ";
if (full) {
if (firstEntry) {
string sep = FileFieldSeparator;
sw.WriteLine ($"{FormattedManagedTypeColumnHeader}{sep}{FormattedJavaTypeColumnHeader}{sep}{FormattedGenericColumnHeader}{sep}{FormattedDuplicateColumnHeader}{sep}{FormattedMVIDColumnHeader}{sep}{FormattedTokenIDColumnHeader}");
}
WriteLineToFile (
sw,
managedTypeName,
entry.JavaType.Name,
generic,
duplicate,
entry.ManagedType.MVID.ToString (),
GetTokenID (entry)
);
} else {
if (firstEntry) {
string sep = FileFieldSeparator;
sw.WriteLine ($"{FormattedManagedTypeColumnHeader}{sep}{FormattedJavaTypeColumnHeader}{sep}{FormattedGenericColumnHeader}{sep}{FormattedDuplicateColumnHeader}");
}
WriteLineToFile (
sw,
managedTypeName,
entry.JavaType.Name,
generic,
duplicate
);
}
}
void ConsoleGenerateManagedToJavaRelease (MapEntry entry, bool full)
{
if (!full) {
Log.Info ($" {GetManagedTypeNameRelease (entry)} -> {entry.JavaType.Name}{GetAdditionalInfo (entry)}");
} else {
Log.Info ($" {GetManagedTypeNameRelease (entry)}; MVID: {entry.ManagedType.MVID}; Token ID: {TokenIdToString (entry)} -> {entry.JavaType.Name}{GetAdditionalInfo (entry)}");
}
}
string GetAdditionalInfo (MapEntry entry)
{
var status = new List<string> ();
if (entry.ManagedType.IsGeneric) {
status.Add (IgnoredGeneric);
}
if (entry.ManagedType.IsDuplicate) {
status.Add (Duplicate);
}
if (status.Count > 0) {
return " (" + String.Join ("; ", status) + ")";
}
return String.Empty;
}
bool EntryMatches (MapEntry entry, Regex regex)
{
Match match = regex.Match (entry.JavaType.Name);
if (match.Success) {
return true;
}
string managedName;
if (entry.ManagedType.AssemblyName.Length > 0) {
managedName = $"{entry.ManagedType.TypeName}, {entry.ManagedType.AssemblyName}";
} else {
managedName = entry.ManagedType.TypeName;
}
match = regex.Match (managedName);
return match.Success;
}
void WriteLineToFile (StreamWriter sw, params string[] fields)
{
if (fields.Length == 0) {
sw.WriteLine ();
return;
}
for (int i = 0; i < fields.Length; i++) {
if (i > 0)
sw.Write (FileFieldSeparator);
sw.Write (fields [i]);
}
sw.WriteLine ();
}
}
}
```
|
Spine is a biweekly peer-reviewed medical journal covering research in the field of orthopaedics, especially concerning the spine. It was established in 1976 and is published by Lippincott Williams & Wilkins. The current editor-in-chief is Andrew J. Schoenfeld, M.D.. Spine is considered the leading orthopaedic journal covering cutting-edge spine research. Spine is available in print and online. Spine is considered the most cited journal in orthopaedics.
Affiliated societies
The following societies are affiliated with Spine:
References
External links
Biweekly journals
Lippincott Williams & Wilkins academic journals
Academic journals established in 1976
English-language journals
Orthopedics journals
|
Saxe-Römhild (German: Sachsen-Römhild) was an Ernestine duchy in the southern foothills of the Thuringian Forest. It existed for only 30 years, from 1680 to 1710.
History
After the duke of Saxe-Gotha, Ernest the Pious, died on 26 March 1675 in Gotha, the duchy was divided on 24 February 1680 among his seven surviving sons. The lands of Saxe-Römhild went to the fourth son, who became Henry, Duke of Saxe-Römhild (1650–1710). The new duchy included the Districts of Römhild, Königsberg (which was later lost in 1683 to Saxe-Hildburghausen) and Themar, the winery of Behrungen, the monastery estate of Milz, and certain lands of the Echter family of Mespelbrunn that had been lost in 1665 to Saxony. But Duke Henry never had the full sovereignty of his new domains. The actual administration was left to the higher authorities in Gotha – the so-called Nexus Gothanus – because that was the residence of Henry's oldest brother, who ruled as Frederick I, Duke of Saxe-Gotha-Altenburg.
After the death of the childless Henry in 1710, his domains were divided between the four duchies – Saxe-Gotha-Altenburg, Saxe-Coburg-Saalfeld, Saxe-Meiningen and Saxe-Hildburghausen. Saxe-Gotha-Altenburg took seven-twelfths of the District of Themar. Saxe-Coburg-Saalfeld had five-twelfths of the District of Themar and one-third of the District of Römhild. Two-thirds of the District of Römhild went to Saxe-Meiningen. Saxe-Hildburghausen got the rest – the winery of Behrungen, the estate of Milz and the Echter properties.
With the rearrangement of the Ernestine duchies in 1826, all the territories of the former Duchy of Saxe-Römhild were solely concentrated in the Duchy of Saxe-Meiningen.
Duke of Saxe-Römhild
1680–1710 : Henry (1650–1710)
Bibliography
Georg [Karl Friedrich Viktor] von Alten, Handbuch für Heer und Flotte, Band XIII [Handbook for the Army and Navy, Volume XIII] (Berlin, Leipzig, Wien, Stuttgart: Bong & Co., 1913)
Hans Patze, Walter Schlesinger (ed.), Geschichte Thüringens, 5. Band, 1. Teil, 1. Teilbd.: Politische Geschichte in der Neuzeit [History of Thuringia, Volume 5, Part 1, Chapter 1: Political History in the Modern Times] (Cologne: Böhlau, 1982)
Verein für Sachsen-Meiningische Geschichte und Landeskunde [Association of the History and Culture of Saxe-Meningen] (ed.): Neue Landeskunde des Herzogtums Sachsen-Meiningen, 9, B, Geschichtliches; Teil 1: Thüringische Geschichte [New State History of the Duchy of Saxe-Hildburghausen, 9, B, Histories; Part 1: Thuringian History] (Hildburghausen: Kesselbring, 1903)
1680 establishments in the Holy Roman Empire
1710 disestablishments in the Holy Roman Empire
States and territories established in 1680
Romhild
South Thuringia
|
```javascript
import {
Function as FunctionToken,
LeftParenthesis,
RightParenthesis
} from '../../tokenizer/index.js';
export const name = 'GeneralEnclosed';
export const structure = {
kind: String,
function: [String, null],
children: [[]]
};
// <function-token> <any-value> )
// ( <any-value> )
export function parse(kind) {
const start = this.tokenStart;
let functionName = null;
if (this.tokenType === FunctionToken) {
functionName = this.consumeFunctionName();
} else {
this.eat(LeftParenthesis);
}
const children = this.parseWithFallback(
() => {
const startValueToken = this.tokenIndex;
const children = this.readSequence(this.scope.Value);
if (this.eof === false &&
this.isBalanceEdge(startValueToken) === false) {
this.error();
}
return children;
},
() => this.createSingleNodeList(
this.Raw(null, false)
)
);
if (!this.eof) {
this.eat(RightParenthesis);
}
return {
type: 'GeneralEnclosed',
loc: this.getLocation(start, this.tokenStart),
kind,
function: functionName,
children
};
}
export function generate(node) {
if (node.function) {
this.token(FunctionToken, node.function + '(');
} else {
this.token(LeftParenthesis, '(');
}
this.children(node);
this.token(RightParenthesis, ')');
}
```
|
Torre El Pedregal is the tallest building in El Salvador by Mexican architect Ricardo Legorreta, located in Antiguo Cuscatlan. It was built by Grupo Roble. It is 28 stories or tall and it is found in San Salvador.
The construction of urban developments is leading San Salvador to become a modern city. The building was a project f Roble Investment Group, which also built the shopping mall Multiplaza, across the street. The building has 28 levels and a height of and upon its completion it became the tallest in the country and even in Central America (except for Panama). The project was built in one of the most important commercial areas of the city. "El Pedregal is aimed at people who want to live in a safe and enjoyable environment", said Alberto Poma, general manager of Roble Group. The tower is part of a multipurpose project to be developed in phases on a total area of seven blocks (excluding the area of Multiplaza). The plan of the project included a five-star hotel, office buildings, apartments, and the existing mall.
See also
List of tallest buildings in Central America
References
Buildings and structures in San Salvador
Skyscrapers in El Salvador
Residential skyscrapers
Residential buildings completed in 2009
Ricardo Legorreta buildings
|
```smalltalk
namespace Hawk.Core.Connectors
{
public class DataTypeConverter
{
public static string ToType(object value)
{
if (value == null)
return "text";
var type = value.GetType().Name;
switch (type)
{
case "String":
return "text";
case "DateTime":
return "DateTime";
case "Int32":
return "INT";
case "Int64":
case "Long":
return "Long";
case "Float":
case "Double":
return "DOUBLE";
default:
return "text";
}
}
}
}
```
|
General the Hon. Edward Finch (26 April 1756 – 27 October 1843) was a British Army general and a member of parliament.
He was the fifth son of Heneage Finch, 3rd Earl of Aylesford and entered Westminster School in 1768 and Trinity College, Cambridge in 1773. He was awarded a B.A. in 1777.
He joined the British Army as a cornet in the 11th Dragoons in 1778, soon transferring to the 20th Light Dragoons, and the following year was promoted lieutenant into the 87th Regiment of Foot. He served in the West Indies and North America before being promoted a captain in the Coldstream Guards in 1783.
In May 1789 he was elected MP for Cambridge, a seat he held continuously until 1819.
In 1792 he was promoted captain and lieutenant-colonel and went with the Guards Brigade as part of the 1793 Flanders Campaign under General Lake. He was present at the actions of Caesar's Camp, Famars, and Lincelles, and at the battles of Hondschoote, Lannoy, Turcoing, and Tournay, remaining with his corps throughout the campaign. He was promoted colonel in 1796.
He was present with the Guards during the Irish Rebellion of the Irish Rebellion of 1798, and commanded the 1st Battalion, Coldstream Guards in the Anglo-Russian invasion of Holland of 1799 and at the defeat at Bergen in September of that year.
In 1800 he was in Egypt in command of a brigade of cavalry and was promoted major-general on New Year's Day, 1801. In 1804 he was appointed a Groom of the Bedchamber to the King. In 1809 he took a brigade of Guards to Denmark, taking an active role in the bombardment of Copenhagen but did not see active service after that time.
In 1808 he was appointed Regimental Colonel of the 54th Regiment of Foot, transferred in 1809 to the 22nd Foot, and on 12 August 1819 was promoted full general.
He died unmarried in 1843.
References
|-
|-
|-
1756 births
1843 deaths
People educated at Westminster School, London
Alumni of Trinity College, Cambridge
British Army generals
British MPs 1784–1790
British MPs 1790–1796
British MPs 1796–1800
UK MPs 1801–1802
UK MPs 1802–1806
UK MPs 1806–1807
UK MPs 1807–1812
UK MPs 1812–1818
UK MPs 1818–1820
Younger sons of earls
Members of the Parliament of Great Britain for English constituencies
Members of the Parliament of the United Kingdom for English constituencies
|
```smalltalk
"
I create a new more compact changes files with a single version of each method in the image.
"
Class {
#name : 'PharoChangesCondenser',
#superclass : 'Object',
#instVars : [
'newChangesFile',
'stream',
'job',
'remoteStringMap',
'sourceStreams'
],
#category : 'System-SourcesCondenser',
#package : 'System-SourcesCondenser'
}
{ #category : 'helper' }
PharoChangesCondenser class >> condense [
^ self new
condense
]
{ #category : 'private - 3 installing' }
PharoChangesCondenser >> backupOldChanges [
| changesFile |
changesFile := self originalFile.
changesFile moveTo: (changesFile , 'bak') asFileReference nextVersion
]
{ #category : 'private' }
PharoChangesCondenser >> basicCondense [
self
condenseClassesAndTraits;
swapSourcePointers;
updateQuitPosition.
stream flush
]
{ #category : 'private' }
PharoChangesCondenser >> commentRemoteStringFor: org [
^ org commentSourcePointer ifNotNil: [:ptr | SourceFiles remoteStringAt: ptr]
]
{ #category : 'public' }
PharoChangesCondenser >> condense [
job := [
newChangesFile writeStreamDo: [ :aStream |
stream := aStream.
self basicCondense ].
self
installNewChangesFile;
reset
] asJob.
job
title: 'Condensing Changes';
max: Smalltalk classNames size + Smalltalk traitNames size;
run
]
{ #category : 'private' }
PharoChangesCondenser >> condenseClassOrTrait: classOrTrait [
self writeClassComment: classOrTrait.
classOrTrait instanceSide methodsDo: [ :method |
(self shouldCondenseMethod: method)
ifTrue: [ self writeMethodSource: method ]].
classOrTrait classSide methodsDo: [ :method |
(self shouldCondenseMethod: method)
ifTrue: [ self writeMethodSource: method ]]
]
{ #category : 'private' }
PharoChangesCondenser >> condenseClassesAndTraits [
Smalltalk allClassesAndTraitsDo: [ :classOrTrait |
self condenseClassOrTrait: classOrTrait ]
]
{ #category : 'accessing' }
PharoChangesCondenser >> fileIndex [
"Return the index into the SourceFiles:
1: the .sources file
2. the .changes file"
^ 2
]
{ #category : 'initialization' }
PharoChangesCondenser >> initialize [
self reset
]
{ #category : 'private - 3 installing' }
PharoChangesCondenser >> installNewChangesFile [
SourceFiles changesFileStream close.
self backupOldChanges.
self originalFile ensureDelete.
newChangesFile moveTo: self originalFile.
Smalltalk openSourceFiles
]
{ #category : 'helper' }
PharoChangesCondenser >> nextChunkDo: aBlock [
(ChunkWriteStream on: stream) nextPut: (String streamContents: aBlock)
]
{ #category : 'helper' }
PharoChangesCondenser >> nextCommentChunkDo: aBlock [
stream cr; nextPut: $!.
self nextChunkDo: aBlock.
stream cr
]
{ #category : 'accessing' }
PharoChangesCondenser >> originalFile [
^ Smalltalk changesFile asFileReference
]
{ #category : 'initialization' }
PharoChangesCondenser >> reset [
remoteStringMap := IdentityDictionary new.
newChangesFile := self temporaryFile.
"Keep a copy of the source streams for performance"
sourceStreams := Array
with: PharoFilesOpener default sourcesFileOrNil
with: PharoFilesOpener default changesFileOrNil
]
{ #category : 'private - testing' }
PharoChangesCondenser >> shouldCondenseMethod: aMethod [
"Only write methods with changes in the current file (not .sources)"
^ (SourceFiles fileIndexFromSourcePointer: aMethod sourcePointer) == 2
]
{ #category : 'private - 2 swapping' }
PharoChangesCondenser >> swapClassComment: classOrTrait [
remoteStringMap
at: classOrTrait
ifPresent: [ :remoteString |
classOrTrait commentSourcePointer: remoteString sourcePointer]
]
{ #category : 'private - 2 swapping' }
PharoChangesCondenser >> swapSourcePointerOfClassOrTrait: classOrTrait [
self swapClassComment: classOrTrait.
classOrTrait methodsDo: [ :method |
self swapSourcePointerOfMethod: method ].
classOrTrait classSide methodsDo: [ :method |
self swapSourcePointerOfMethod: method ]
]
{ #category : 'private - 2 swapping' }
PharoChangesCondenser >> swapSourcePointerOfMethod: method [
remoteStringMap at: method ifPresent: [ :remoteString |
method setSourcePointer: remoteString sourcePointer ]
]
{ #category : 'private - 2 swapping' }
PharoChangesCondenser >> swapSourcePointers [
job
title: 'Swapping source pointers';
currentValue: 0.
Smalltalk allClassesAndTraitsDo: [ :classOrTrait |
job increment.
self swapSourcePointerOfClassOrTrait: classOrTrait ]
]
{ #category : 'accessing' }
PharoChangesCondenser >> temporaryFile [
^ (Smalltalk changesFile, 'new') nextVersion
]
{ #category : 'private - 3 installing' }
PharoChangesCondenser >> updateQuitPosition [
Smalltalk lastQuitLogPosition: stream position
]
{ #category : 'private - 1 writing' }
PharoChangesCondenser >> writeClassComment: aClass [
| commentRemoteString stamp |
commentRemoteString := self commentRemoteStringFor: aClass.
(commentRemoteString isNil or: [ commentRemoteString sourceFileNumber = 1 ])
ifTrue: [ ^ self ].
self nextCommentChunkDo: [ :strm |
strm
nextPutAll: aClass name;
nextPutAll: ' commentStamp: '.
stamp := aClass commentStamp
ifNil: ['<historical>'].
stamp storeOn: strm ].
self
writeRemoteString: aClass comment
for: aClass
]
{ #category : 'private - 1 writing' }
PharoChangesCondenser >> writeMethodSource: aMethod [
self nextCommentChunkDo: [ :strm |
strm
nextPutAll: aMethod methodClass name;
nextPutAll: ' methodsFor: ';
store: aMethod protocolName asString;
nextPutAll: ' stamp: ';
store: aMethod timeStamp ].
self
writeRemoteString: aMethod sourceCode
for: aMethod.
stream nextPutAll: ' !'; cr
]
{ #category : 'private - 1 writing' }
PharoChangesCondenser >> writeRemoteString: aString for: reference [
| remoteString |
remoteString :=
RemoteString
newString: aString
onFileNumber: self fileIndex
toFile: stream.
remoteStringMap at: reference put: remoteString.
^ remoteString
]
```
|
Le Grand-Saconnex () is a municipality of the Canton of Geneva, Switzerland.
Several international organizations and permanent missions to the United Nations are located in Grand Saconnex. Consequently, the population of Grand Saconnex is quite cosmopolitan one of the most diverse in Switzerland, with nearly 40% of the population being born outside of Switzerland.
Geneva International Airport is partially within the borders of Le Grand-Saconnex.
History
Le Grand-Saconnex is first mentioned in 1128 as Saconai.
Geography
Le Grand-Saconnex has an area, , of . Of this area, or 14.2% is used for agricultural purposes, while or 2.1% is forested. Of the rest of the land, or 83.6% is settled (buildings or roads).
Of the built up area, industrial buildings made up 1.1% of the total area while housing and buildings made up 32.9% and transportation infrastructure made up 41.8%. Power and water infrastructure as well as other special developed areas made up 2.5% of the area while parks, green belts and sports fields made up 5.3%. Out of the forested land, 0.7% of the total land area is heavily forested and 1.4% is covered with orchards or small clusters of trees. Of the agricultural land, 5.9% is used for growing crops and 7.1% is pastures, while 1.1% is used for orchards or vine crops.
The municipality is located just to west of the city of Geneva and forms part of the greater Geneva area. It is on the right bank of Lake Geneva.
The municipality of Le Grand-Saconnex consists of the sub-sections or villages of Aéroport - Arena, Aéroport - fret, Les Blanchets, Grand-Saconnex - Organisations, Grand-Saconnex - village, La Tour - Chapeau-du-Curé, Le Pommier, Grand-Saconnex - Marais, Le Jonc and Palexpo.
Demographics
Le Grand-Saconnex has a population () of . , 43.6% of the population are resident foreign nationals. Over the last 10 years (1999–2009 ) the population has changed at a rate of 37.4%. It has changed at a rate of 31.8% due to migration and at a rate of 5.9% due to births and deaths.
Most of the population () speaks French (5,759 or 71.0%), with English being second most common (550 or 6.8%) and German being third (372 or 4.6%). There are 293 people who speak Italian and 1 person who speaks Romansh.
, the gender distribution of the population was 47.6% male and 52.4% female. The population was made up of 3,058 Swiss men (25.8% of the population) and 2,584 (21.8%) non-Swiss men. There were 3,526 Swiss women (29.8%) and 2,675 (22.6%) non-Swiss women. Of the population in the municipality 1,049 or about 12.9% were born in Le Grand-Saconnex and lived there in 2000. There were 1,727 or 21.3% who were born in the same canton, while 1,166 or 14.4% were born somewhere else in Switzerland, and 3,219 or 39.7% were born outside of Switzerland.
In there were 69 live births to Swiss citizens and 46 births to non-Swiss citizens, and in same time span there were 52 deaths of Swiss citizens and 22 non-Swiss citizen deaths. Ignoring immigration and emigration, the population of Swiss citizens increased by 17 while the foreign population increased by 24. There were 26 Swiss men and 24 Swiss women who emigrated from Switzerland. At the same time, there were 112 non-Swiss men and 65 non-Swiss women who immigrated from another country to Switzerland. The total Swiss population change in 2008 (from all sources, including moves across municipal borders) was an increase of 107 and the non-Swiss population increased by 41 people. This represents a population growth rate of 1.4%.
The age distribution of the population () is children and teenagers (0–19 years old) make up 22.6% of the population, while adults (20–64 years old) make up 64% and seniors (over 64 years old) make up 13.5%.
, there were 3,259 people who were single and never married in the municipality. There were 3,995 married individuals, 346 widows or widowers and 514 individuals who are divorced.
, there were 3,234 private households in the municipality, and an average of 2.2 persons per household. There were 1,154 households that consist of only one person and 163 households with five or more people. Out of a total of 3,314 households that answered this question, 34.8% were households made up of just one person and there were 9 adults who lived with their parents. Of the rest of the households, there are 817 married couples without children, 952 married couples with children There were 268 single parents with a child or children. There were 34 households that were made up of unrelated people and 80 households that were made up of some sort of institution or another collective housing.
there were 536 single-family homes (or 62.5% of the total) out of a total of 858 inhabited buildings. There were 212 multi-family buildings (24.7%), along with 77 multi-purpose buildings that were mostly used for housing (9.0%) and 33 other use buildings (commercial or industrial) that also had some housing (3.8%). Of the single-family homes 43 were built before 1919, while 79 were built between 1990 and 2000. The greatest number of single-family homes (107) were built between 1961 and 1970.
there were 3,731 apartments in the municipality. The most common apartment size was 3 rooms of which there were 960. There were 318 single room apartments and 906 apartments with five or more rooms. Of these apartments, a total of 3,139 apartments (84.1% of the total) were permanently occupied, while 513 apartments (13.7%) were seasonally occupied and 79 apartments (2.1%) were empty. , the construction rate of new housing units was 10.7 new units per 1000 residents. The vacancy rate for the municipality, , was 0.22%.
The historical population is given in the following chart:
Heritage sites of national significance
The World Council of Churches with Archives and the UNESCO Centre de documentation are listed as Swiss heritage site of national significance.
Town twinning
Grand Saconnex is twinned with
Politics
In the 2007 federal election the most popular party was the SVP which received 20.99% of the vote. The next three most popular parties were the SP (17.22%), the Green Party (16.95%) and the FDP (13.11%). In the federal election, a total of 2,039 votes were cast, and the voter turnout was 46.2%.
In the 2009 Grand Conseil election, there were a total of 4,516 registered voters of which 1,679 (37.2%) voted. The most popular party in the municipality for this election was the MCG with 14.3% of the ballots. In the canton-wide election they received the third highest proportion of votes. The second most popular party was the Les Radicaux (with 14.0%), they were sixth in the canton-wide election, while the third most popular party was the Les Verts (with 13.6%), they were second in the canton-wide election.
For the 2009 Conseil d'État election, there were a total of 4,560 registered voters of which 2,023 (44.4%) voted.
In 2011, all the municipalities held local elections, and in Le Grand-Saconnex there were 25 spots open on the municipal council. There were a total of 6,496 registered voters of which 2,571 (39.6%) voted. Out of the 2,571 votes, there were 19 blank votes, 15 null or unreadable votes and 228 votes with a name that was not on the list.
Economy
Geneva International Airport is partially within Le Grand-Saconnex.
Palexpo the convention center of Geneva is within Le Grand-Saconnex. The complex is located next to the airport and held each year a multitude of exhibition. We can highlight the Geneva Motor Show and the Salon du livre.
, Le Grand-Saconnex had an unemployment rate of 6.6%. , there was 1 person employed in the primary economic sector and about 1 business involved in this sector. 243 people were employed in the secondary sector and there were 42 businesses in this sector. 8,955 people were employed in the tertiary sector, with 380 businesses in this sector. There were 4,171 residents of the municipality who were employed in some capacity, of which females made up 47.5% of the workforce.
the total number of full-time equivalent jobs was 8,069. The number of jobs in the primary sector was 1, all of which were in agriculture. The number of jobs in the secondary sector was 230 of which 127 or (55.2%) were in manufacturing and 96 (41.7%) were in construction. The number of jobs in the tertiary sector was 7,838. In the tertiary sector; 1,347 or 17.2% were in wholesale or retail sales or the repair of motor vehicles, 2,856 or 36.4% were in the movement and storage of goods, 456 or 5.8% were in a hotel or restaurant, 232 or 3.0% were in the information industry, 97 or 1.2% were the insurance or financial industry, 302 or 3.9% were technical professionals or scientists, 62 or 0.8% were in education and 331 or 4.2% were in health care.
, there were 5,621 workers who commuted into the municipality and 3,394 workers who commuted away. The municipality is a net importer of workers, with about 1.7 workers entering the municipality for every one leaving. About 11.9% of the workforce coming into Le Grand-Saconnex are coming from outside Switzerland, while 0.3% of the locals commute out of Switzerland for work. Of the working population, 24.9% used public transportation to get to work, and 54.8% used a private car.
Religion
From the , 2,904 or 35.8% were Roman Catholic, while 1,428 or 17.6% belonged to the Swiss Reformed Church. Of the rest of the population, there were 213 members of an Orthodox church (or about 2.63% of the population), there were 3 individuals (or about 0.04% of the population) who belonged to the Christian Catholic Church, and there were 140 individuals (or about 1.73% of the population) who belonged to another Christian church. There were 46 individuals (or about 0.57% of the population) who were Jewish, and 439 (or about 5.41% of the population) who were Islamic. There were 23 individuals who were Buddhist, 34 individuals who were Hindu and 13 individuals who belonged to another church. 1,677 (or about 20.67% of the population) belonged to no church, are agnostic or atheist, and 1,194 individuals (or about 14.72% of the population) did not answer the question.
The Ecumenical Centre - housing the offices of the World Council of Churches, ACT Alliance, the World Student Christian Federation and the Lutheran World Federation - is in Le Grand-Saconnex.
Education
In Le Grand-Saconnex about 2,184 or (26.9%) of the population have completed non-mandatory upper secondary education, and 1,852 or (22.8%) have completed additional higher education (either university or a Fachhochschule). Of the 1,852 who completed tertiary schooling, 28.1% were Swiss men, 24.8% were Swiss women, 26.1% were non-Swiss men and 21.0% were non-Swiss women.
During the 2009-2010 school year there were a total of 2,367 students in the Le Grand-Saconnex school system. The education system in the Canton of Geneva allows young children to attend two years of non-obligatory Kindergarten. During that school year, there were 215 children who were in a pre-kindergarten class. The canton's school system provides two years of non-mandatory kindergarten and requires students to attend six years of primary school, with some of the children attending smaller, specialized classes. In Le Grand-Saconnex there were 321 students in kindergarten or primary school and 27 students were in the special, smaller classes. The secondary school program consists of three lower, obligatory years of schooling, followed by three to five years of optional, advanced schools. There were 321 lower secondary students who attended school in Le Grand-Saconnex. There were 445 upper secondary students from the municipality along with 64 students who were in a professional, non-university track program. An additional 285 students attended a private school.
, there were 57 students in Le Grand-Saconnex who came from another municipality, while 868 residents attended schools outside the municipality.
In 2005 Campus des Nations, a campus of the International School of Geneva, was opened in Le Grand-Saconnex. Campus des Nations is one of three campuses of the International School of Geneva. The campus consists of two individual sites both located in Le Grand-Saconnex. The two sites, Pregny and Nations, collectively also known as the "Saconnex Campus" offer classes to students from year 1 through to year 13, providing both the Primary Years Program (PYP), Middle Years Program (MYP), and Diploma Program (DP), all as a part of the International Baccalaureate. The Nations site is in proximity with many notable international organizations, directly neighboring the International Labor Organization (ILO) headquarters, the World Health Organization (WHO) headquarters, and the World Council of Churches (WCC). The Pregny site is in the vicinity of the United Nations, as well as the Red Cross headquarters.
International School of Geneva has a campus in Grand-Saconnex.
International relations
The Portuguese consulate in Geneva is in Le Grand-Sacconex.
Notable people
Johann Jacob Schweppe (1740-1821) creator of the Schweppes drink
Edouard Sarasin (1843–1917) an independent scientist and mayor of Le Grand-Saconnex 1871-1916
Bruno Boscardin (born 1970 in Le Grand-Saconnex) a former Swiss racing cyclist
References
External links
Grand-Saconnex
Cultural property of national significance in the canton of Geneva
Municipalities of the canton of Geneva
|
```ruby
# frozen_string_literal: true
module Decidim
# The controller to handle the user's account page.
class AccountController < Decidim::ApplicationController
include Decidim::UserProfile
helper Decidim::PasswordsHelper
def show
enforce_permission_to(:show, :user, current_user:)
@account = form(AccountForm).from_model(current_user)
@account.password = nil
end
def update
enforce_permission_to(:update, :user, current_user:)
@account = form(AccountForm).from_params(account_params)
UpdateAccount.call(@account) do
on(:ok) do |email_is_unconfirmed|
flash[:notice] = if email_is_unconfirmed
t("account.update.success_with_email_confirmation", scope: "decidim")
else
t("account.update.success", scope: "decidim")
end
bypass_sign_in(current_user)
redirect_to account_path(locale: current_user.reload.locale)
end
on(:invalid) do |password|
fetch_entered_password(password)
flash[:alert] = t("account.update.error", scope: "decidim")
render action: :show
end
end
end
def delete
enforce_permission_to(:delete, :user, current_user:)
@form = form(DeleteAccountForm).from_model(current_user)
end
def destroy
enforce_permission_to(:delete, :user, current_user:)
@form = form(DeleteAccountForm).from_params(params)
DestroyAccount.call(@form) do
on(:ok) do
sign_out(current_user)
flash[:notice] = t("account.destroy.success", scope: "decidim")
end
on(:invalid) do
flash[:alert] = t("account.destroy.error", scope: "decidim")
end
end
redirect_to decidim.root_path
end
def resend_confirmation_instructions
enforce_permission_to(:update, :user, current_user:)
ResendConfirmationInstructions.call(current_user) do
on(:ok) do
respond_to do |format|
handle_alert(:success, t("resend_successfully", scope: "decidim.account.email_change", unconfirmed_email: current_user.unconfirmed_email))
format.js
end
end
on(:invalid) do
respond_to do |format|
handle_alert(:alert, t("resend_error", scope: "decidim.account.email_change"))
format.js
end
end
end
end
def cancel_email_change
enforce_permission_to(:update, :user, current_user:)
if current_user.unconfirmed_email
current_user.update(unconfirmed_email: nil)
respond_to do |format|
handle_alert(:success, t("cancel_successfully", scope: "decidim.account.email_change"))
format.js
end
else
respond_to do |format|
handle_alert(:alert, t("cancel_error", scope: "decidim.account.email_change"))
format.js
end
end
end
private
def handle_alert(alert_class, text)
@alert_class = alert_class
@text = text
end
def account_params
params[:user].to_unsafe_h
end
def fetch_entered_password(password)
@account.password = password
end
end
end
```
|
```java
package com.fishercoder.solutions.firstthousand;
import java.util.Arrays;
public class _877 {
public static class Solution1 {
/**
* credit: path_to_url
* <p>
* Suppose the ID for Alex is 1, that for Lee is 0
* Alex wants to maximize the score to win while Lee wants to minimize the score to win.
* Each time, each player has two options to pick, we'll use recursion to find the most optimal choice for each of them.
*/
public boolean stoneGame(int[] piles) {
int len = piles.length;
int[][][] dp = new int[len + 1][len + 1][2];
for (int[][] arr : dp) {
for (int[] num : arr) {
Arrays.fill(num, -1);
}
}
return recursion(dp, 0, len - 1, 1, piles) > 0;
}
private int recursion(int[][][] dp, int left, int right, int identifier, int[] piles) {
if (left > right) {
return 0;
}
if (dp[left][right][identifier] != -1) {
return dp[left][right][identifier];
}
int next = Math.abs(identifier - 1);
if (identifier == 1) {
dp[left][right][identifier] = Math.max(piles[left] + recursion(dp, left + 1, right, next, piles), piles[right] + recursion(dp, left, right - 1, next, piles));
} else {
dp[left][right][identifier] = Math.min(-piles[left] + recursion(dp, left + 1, right, next, piles), -piles[right] + recursion(dp, left, right - 1, next, piles));
}
return dp[left][right][identifier];
}
}
}
```
|
The Resistance (La Resistencia) is a Spanish TV talk show that is broadcast in #0 of Movistar +. Its first edition was on 1 February 2018, hosted by David Broncano broadcast from the Arlequín Theater in Madrid and is produced by El Terrat.
History
Coinciding with the second anniversary of channel #0, David Broncano left his usual collaboration in the Late Motiv program and the Locomundo program to present the first late late show in Spain, following the format of some television channels in the United States of linking two nightly shows (in Spanish, the program of the end of the night) in a row. The program is broadcast from the Arlequín Theater, very close to Madrid's Gran Vía and with a live audience.
The irreverent interviews he does in this program have become, in many occasions, viral. The host personality has also helped him win the sympathy of a large audience. As a consequence, the TV show has had great success both on the Movistar + channel and on the YouTube page.
The program is directed by Ricardo Castella, who also acts as a prompter. It has as collaborators with Dani Rovira, Antonio Resines, Ignatius Farray, Quequé, Jorge Ponce, Ernesto Sevilla or Rober Bodegas among others and in the first programs appeared youtuber Ter. Beatboxer Marcos Martínez «Grison» and Ricardo Castella perform the music live.
The song "Hail to the Chief" from the supergroup Prophets of Rage was chosen for the title sequence. In 2019, the show received the Ondas Award for Best Television Entertainment Program.
Sections
Previous show
Daily section that can only be seen by those attending the program at the Arlequín Theater, since it is not broadcast on the televised program. In this part, the audience is entertained with the performance of Jaime Caravaca, resident comedian and Grison Beatbox.
Insults of the public
Daily section of the presenter David Broncano where he receives insults from the public through social networks and comments on them.
Monologues
Daily and initial section presented by David Broncano in which he reviews current affairs in a humorous way, especially the most absurd and surreal news on the scene. Despite having a humorous and casual tone, its most critical side has also been applauded with some of the political and social situations of the moment.
Interview
Program space in which David Broncano interviews a guest, a group or some formation. The guests tend to have a lesser presence in the media than those of other programs on the same network, which allows to discover characters that until now had carried out a few or any interviews. The star question that David Broncano always asks is "How much money do you have?", along with the question of "When was the last time you had sex?". Many guests respond and others prefer not to respond and keep the mystery.
The program has often been applauded because of the great visibility it gives to women's sports in the country by very often inviting athletes who do not have the opportunity to attend other programs to do their promotion.
Who would you rather see dead?
Jorge Ponce shows two photographs of two different celebrities and asks the audience a question: who would you prefer see dead. He presents arguments in favor of each famous and finally it is the public who makes the decision; the most applauded is the one that they prefer to die. Santiago Segura, Joaquín Sabina or Andrés Iniesta are some of the celebrities who have starred in this section, and even Jesús de Nazaret and Barrabás appeared in an edition for Holy Week.
Live connexions from the street
From outside the Arlequín Theater, on Madrid's Gran Vía, Jorge Ponce connects with the set and conducts brief interviews with pedestrians. The most frequent ones consist of judging passers-by by their appearance and interviewing them based on the prejudices they generate. He also asks questions about a specific date or event. The connections until March were broadcast in near live, due to the change of time and daylight hours. Jorge Ponce discovered that they were recorded in the afternoon.
Review of internet forums
Jorge Ponce investigates the most surreal forums on the internet, looking for the most original and strange answers from Internet users.
Musical performance
Ignatius Farray, together with his friend José Luis Petróleo, form a group and perform a chaotic musical performance. Before singing, he presents and comments on the lyrics of the new song, written on a large cardboard. The themes are characterized by being surreal and having a repetitive chorus. During the performance Ignatius sings, his friend plays the guitar, David Broncano is in charge of playing the electronic drums and Grison also accompanies them on the electric guitar.
Ins and outs
Ricardo Castella explains internal issues and anecdotes of the program, revealing some of the secrets related to the preparation of the program.
The weather
Jorge Ponce analyzes the weather situation in a curious way using a free application for tablet.
El "girito"
Jorge Ponce goes with a magnificent stove downtown asking people what they think about controversial issues, using a flute to identify the powerful question.
The "Bad" anthill
Jorge Ponce parodies the best known sections of "The anthill" program, another Spanish TV show broadcast on Antena 3 channel.
Occasional sections
"Blockbuster" Comment
Dani Rovira appears as an occasional collaborator in this section where he talks about a blockbuster and makes a humorous summary of the film. He has commented on films such as The Lord of the Rings, Independence Day and The Bodyguard.
Theatrical performance
Antonio Resines, as a friend of the program, makes this collaboration where with the help of the program team they do a small theatrical performance. There is no intention to make a formal performance, it emphasizes the little preparation, the low budget and the comedy.
Surprise guest
Comedian Héctor de Miguel "Quequé" brings a guest to the show without the host knowing who he is and should try to find out through questions about who he is. The list of these guests stands out for being personalities or groups of which David Broncano has made jokes. This list is made up of Cafe Quijano, Juan Muñoz de Cruz y Raya, Macaco, Dani Martín and the music group Taburete.
Program ideas
Comedians Rober Bodegas and Alberto Casado (Pantomima Full) bring original ideas for programs to sell on Movistar +. All these ideas are presented in a parodic and ironic way and usually these programs are very similar to other existing productions.
Guests
First season
Second season
Third season
References
Spanish television talk shows
|
Brad Beck (born February 10, 1964 in Vancouver) is a Canadian former professional ice hockey defenceman. He was drafted in the 5th round, 91st overall by the Chicago Blackhawks in the 1982 NHL Entry Draft. He never played a single game in NHL but spent two seasons in IHL in Saginaw before heading into Europe.
Career statistics
External links
1964 births
Canadian expatriate ice hockey players in Finland
Saginaw Generals players
Saginaw Hawks players
Porin Ässät (men's ice hockey) players
Indianapolis Ice players
Durham Wasps players
Living people
Chicago Blackhawks draft picks
Penticton Knights players
Michigan State Spartans men's ice hockey players
Richmond Renegades players
Flint Bulldogs players
|
Chacheragh (, also Romanized as Chācherāgh; also known as Ḩaqqābād) is a village in Gowhar Kuh Rural District, Nukabad District, Khash County, Sistan and Baluchestan Province, Iran. At the 2006 census, its population was 33, in 6 families.
References
Populated places in Khash County
|
```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 IS_BROWSER = require( '@stdlib/assert/is-browser' );
var isStringArray = require( '@stdlib/assert/is-string-array' ).primitives;
var abbr = require( './../lib' );
// VARIABLES //
var opts = {
'skip': IS_BROWSER
};
// TESTS //
tape( 'main export is a function', function test( t ) {
t.ok( true, __filename );
t.strictEqual( typeof abbr, 'function', 'main export is a function' );
t.end();
});
tape( 'the function returns an array of strings', opts, function test( t ) {
var data = abbr();
t.equal( isStringArray( data ), true, 'returns an array of strings' );
t.equal( data.length, 50, 'has length of 50' );
t.end();
});
tape( 'the function returns a copy', opts, function test( t ) {
var d1;
var d2;
var v;
d1 = abbr();
d2 = abbr();
t.notEqual( d1, d2, 'different references' );
v = d2[ 5 ];
d1[ 5 ] = 'beep';
t.equal( d1[ 5 ], 'beep', 'expected element' );
t.notEqual( d1[ 5 ], d2[ 5 ], 'no shared state' );
t.equal( d2[ 5 ], v, 'expected element' );
t.end();
});
```
|
The Municipal Museum of Bourg-en-Bresse, sometimes known as the Brou museum, Musée du Monastère Royal de Brou or Beaux-Arts Museum is an art museum located inside the Monastery of Brou in France.
The collections include painting, particularly Flemish and French, from the 15th century to the modern era. Sculpture is also represented, especially ancient religious sculpture.
Location
The museum is located in one of the wings of the second of the three cloisters in the Monastery of Brou, in Bourg-en-Bresse prefecture of the Ain department in the Auvergne-Rhône-Alpes region in Eastern France.
The museum covers 6,000m2.
History
The museum was founded in 1854. The main collection of the museum was originally made up of 120 paintings donated in the middle of the 19th century by Thomas Riboud [FR] (1765–1835), lawyer and deputy of Ain who saved the abbey from destruction and protected it as a national monument.
As of 2022, 434 items were on display.
Collections
Flemish and Dutch paintings
The collection of Flemish and Dutch paintings includes four paintings by the official painter of the Charles V, Holy Roman Emperor, two of which are the portraits of young Charles V and Margaret of Austria, the founder of the monastery of Brou, as well as 15th and 16th century works by Jan de Beer, Adrien Ysenbrandt, Jan Brueghel the Elder, Frans Snyders, Frans Franken, Pieter Codde, Adam Frans van der Meulen, Adriaen van der Kabel, Gerard Seghers, Bartholomeus Breenbergh, Pieter Neefs the Younger and Melchior d'Hondecoeter.
Italian paintings
Italian paintings include two paintings by Defendente Ferrari as well as works by and Pietro della Vecchia and Francesco Fontebasso .
French paintings
French paintings up to the 18th century, include works by Benoît Alhoste and Jacques Bizet's Nature morte aux vieux livres (English: Still life with old books) as well as works by Jean Jouvenet, Nicolas Pierre Loir , René-Antoine Houasse , François de Troy and Nicolas de Largillierre.
19th-century French paintings include paintings in the troubadour style by Fleury François Richard, Pierre Révoil, Gustave Moreau, Gustave Doré (and also one of his sculptures), Jean-François Millet, Elisa Blondel, and Louis Janmot.
French 20th century paintings include works by Jacques-Émile Blanche, Pierre Soulages and Olivier Debré.
Other modern paintings
Other items that have featured in the museum include paintings by Shahabuddin Ahmed.
Other collections
The museum's refectory also houses 12th–17th century religious sculptures, as well as furniture and earthenware.
Exhibitions
2014 – L’Invention du passé, featuring paintings by Fleury Richard, Pierre Révoil, Henriette Lorimer, François-Marius Granet and Louis Daguerre.
2021 – Valadon et ses contemporaines, featuring women painters
References
1854 establishments in France
Art museums and galleries in France
|
```html+erb
# Managed by Chef
APT::Install-Recommends "<%= node['apt']['confd']['install_recommends'] ? 1 : 0 %>";
APT::Install-Suggests "<%= node['apt']['confd']['install_suggests'] ? 1 : 0 %>";
```
|
Koszarawa is a village in Żywiec County, Silesian Voivodeship, in southern Poland, close to the border with Slovakia. It is the seat of the gmina (administrative district) called Gmina Koszarawa. It lies in historic Lesser Poland, approximately east of Żywiec, and south-east of the regional capital, Katowice.
Part of the village forms the separate sołectwo of Koszarawa Bystra.
References
Villages in Żywiec County
|
```forth
*> \brief \b SLARNV returns a vector of random numbers from a uniform or normal distribution.
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* path_to_url
*
*> \htmlonly
*> Download SLARNV + dependencies
*> <a href="path_to_url">
*> [TGZ]</a>
*> <a href="path_to_url">
*> [ZIP]</a>
*> <a href="path_to_url">
*> [TXT]</a>
*> \endhtmlonly
*
* Definition:
* ===========
*
* SUBROUTINE SLARNV( IDIST, ISEED, N, X )
*
* .. Scalar Arguments ..
* INTEGER IDIST, N
* ..
* .. Array Arguments ..
* INTEGER ISEED( 4 )
* REAL X( * )
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SLARNV returns a vector of n random real numbers from a uniform or
*> normal distribution.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] IDIST
*> \verbatim
*> IDIST is INTEGER
*> Specifies the distribution of the random numbers:
*> = 1: uniform (0,1)
*> = 2: uniform (-1,1)
*> = 3: normal (0,1)
*> \endverbatim
*>
*> \param[in,out] ISEED
*> \verbatim
*> ISEED is INTEGER array, dimension (4)
*> On entry, the seed of the random number generator; the array
*> elements must be between 0 and 4095, and ISEED(4) must be
*> odd.
*> On exit, the seed is updated.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> The number of random numbers to be generated.
*> \endverbatim
*>
*> \param[out] X
*> \verbatim
*> X is REAL array, dimension (N)
*> The generated random numbers.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup larnv
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> This routine calls the auxiliary routine SLARUV to generate random
*> real numbers from a uniform (0,1) distribution, in batches of up to
*> 128 using vectorisable code. The Box-Muller method is used to
*> transform numbers from a uniform to a normal distribution.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SLARNV( IDIST, ISEED, N, X )
*
* -- LAPACK auxiliary routine --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
*
* .. Scalar Arguments ..
INTEGER IDIST, N
* ..
* .. Array Arguments ..
INTEGER ISEED( 4 )
REAL X( * )
* ..
*
* =====================================================================
*
* .. Parameters ..
REAL ONE, TWO
PARAMETER ( ONE = 1.0E+0, TWO = 2.0E+0 )
INTEGER LV
PARAMETER ( LV = 128 )
REAL TWOPI
PARAMETER ( TWOPI = 6.28318530717958647692528676655900576839E+0 )
* ..
* .. Local Scalars ..
INTEGER I, IL, IL2, IV
* ..
* .. Local Arrays ..
REAL U( LV )
* ..
* .. Intrinsic Functions ..
INTRINSIC COS, LOG, MIN, SQRT
* ..
* .. External Subroutines ..
EXTERNAL SLARUV
* ..
* .. Executable Statements ..
*
DO 40 IV = 1, N, LV / 2
IL = MIN( LV / 2, N-IV+1 )
IF( IDIST.EQ.3 ) THEN
IL2 = 2*IL
ELSE
IL2 = IL
END IF
*
* Call SLARUV to generate IL2 numbers from a uniform (0,1)
* distribution (IL2 <= LV)
*
CALL SLARUV( ISEED, IL2, U )
*
IF( IDIST.EQ.1 ) THEN
*
* Copy generated numbers
*
DO 10 I = 1, IL
X( IV+I-1 ) = U( I )
10 CONTINUE
ELSE IF( IDIST.EQ.2 ) THEN
*
* Convert generated numbers to uniform (-1,1) distribution
*
DO 20 I = 1, IL
X( IV+I-1 ) = TWO*U( I ) - ONE
20 CONTINUE
ELSE IF( IDIST.EQ.3 ) THEN
*
* Convert generated numbers to normal (0,1) distribution
*
DO 30 I = 1, IL
X( IV+I-1 ) = SQRT( -TWO*LOG( U( 2*I-1 ) ) )*
$ COS( TWOPI*U( 2*I ) )
30 CONTINUE
END IF
40 CONTINUE
RETURN
*
* End of SLARNV
*
END
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.