text stringlengths 1 22.8M |
|---|
The Capture of Ninh Bình took place on 5 December 1873, during Francis Garnier's expedition in Tonkin. A small party of six seamen and one civilian interpreter led by Aspirant Marc Hautefeuille captured the fortified city of Ninh Bình, at the time defended by 1,700 troops.
Background
On 20 November 1873, the city of Hanoi was captured by Lieutenant Francis Garnier, who had been sent there with a small force to solve dispute pitting a French trader and his mercenaries against local authorities. Following the capture of the city, Lieutenant Garnier declared the Red River open to French trade and sent Ensign Adrien Balny d'Avricourt with the Espingole, one of the expedition's two gunboats, in order to enforce the submission of the fortified cities of Hưng Yên and Phủ Lý.
Hưng Yên submitted without resistance on 24 November, and Phủ Lý fell to the French on 26 November after a very brief confrontation. Following these successes, Balny d'Avricourt and the Espingole left Phủ Lý on 2 December to go and subdue the city of Hải Dương.
Back in Hanoi, Garnier had been informed that the Án sát of Hanoi, the only mandarin who had managed to evade French capture, had sought refuge in Ninh Bình, from where he was organizing alongside the local Governor Nguyễn Vũ to resist the French takeover of the region. Thinking that the Espingole was still in Phủ Lý, Garnier sent 21 years old Aspirant Hautefeuille in a steam launch to the city to carry an order to attack Ninh Bình to Balny d'Avricourt.
Capture of the city
On the morning of 2 December, Hautefeuille left Hanoi, alongside seven sailors, a Vietnamese interpreter from Saigon and two locals from Hanoi that Garnier was sending to Phủ Lý to help with the newly installed administration. The steam launch contained a 4-pounder cannon with 6 shells, and 250 rifle cartridges.
As the steam launch reached Phủ Lý on the evening, Hautefeuille was informed by Lê Van Ba, a pro-French local installed there as replacement for the previous prefect, that Balny and the Espingole had departed for Hải Dương earlier that day. Lê Van Ba also notified him of a large dam that was being built nearby, and thus near 3 am, Hautefeuille, his seven sailors and his interpreter set out for the location of the dam's construction.
They arrived to the site on the morning. As soon as the French landed, all of the workers ran away. Hautefeuille managed to capture an unimportant mandarin of Ninh Bình who was overseeing the work, but he released him soon afterward. The French sank the two hundreds small boats full of bricks that had been gathered on the river and left the place near 9:00 am. However, the steam launch had a breakdown and had to be hauled from the shore to the Catholic mission of Kẻ Sở, where they arrived at about 4:00 pm.
On 4 December, Hautefeuille was informed by the missionaries of a rumor stating that several hundreds soldiers from Ninh Bình had gathered nearby. While two of his sailors were fixing the steam launch, he went on reconnaissance alongside five sailors, his interpreter and a bunch of local volunteers from Phủ Lý. Having encountered no one after a three-hour walk in the stated direction, they returned to Kẻ Sở.
In Kẻ Sở, Hautefeuille was informed that another dam was being erected down the river, right next to the city of Ninh Bình. He promptly decided to destroy this one as well, and at 11:00 pm, he set out for Ninh Bình on the steam launch alongside his seven sailors, his interpreter and a local civilian who was to guide them to the city.
On 5 December near 4:00 am, the steam launch arrived in sight of Ninh Bình. Alerted by the sound of the ship despite the pitch-dark night, many soldiers got on the walls and the French could now discern them from the distance on the torch-lit parapet. Some of the defenders yelled toward the French. Hautefeuille responded by firing one of his six shells on a fort located on a towering rock formation near the citadel. In reaction, the Vietnamese extinguished th torches and neither parties took any more action for the rest of the night. Hautefeuille turned off the steam launch's engine and waited for the day to break.
When the mist and darkness dissipated in the morning, the French could see several hundreds of soldiers looking at them on the walls. As the steam launch approached, it got stranded on shallow, about 200 meters away from the citadel. The French soon set their small ship back afloat, but shortly afterward, as they were trying to move out of the citadel's cannons firing range, the boiler of the old steam launch broke down, rendering the ship completely unusable and covering the small crew with vapor.
After having ordered his men to fix bayonets and carry the flag, Hautefeuille hastily hopped inside the ship's small dinghy with six of his sailors and his interpreter, leaving his remaining sailor and the guide to guard the steam launch and its cannon. Hautefeuille and his seven men then proceeded toward the shore as the citadel's guns fired a few unsuccessful rounds at them, while Vietnamese soldiers were coming out of the fortress in great number.
As the squad landed, they were immediately swarmed with curious and friendly villagers, some of whom even attempted to gift an ox to the young officer. Hautefeuille and his men then marched with firm steps toward the citadel's gate. The small squad was soon surrounded by Vietnamese soldiers, who proceeded to march alongside them while pointing their spears and rifles, without daring to initiate hostilities and probably hoping to catch them alive. As they arrived near the moat, Hautefeuille noticed the province's Governor, Nguyễn Vũ, whom he instantly recognized as such due to the four umbrella bearers around him.
With his pistol in hand, Hautefeuille apologized for having shelled the fort and said it was in response to the yelling. He then asked the Governor what his stance on Garnier's proclamation about open trade on the Red River was. The Governor replied that he fully accepted it and wouldn't oppose the French. As a response, Hautefeuille pulled out an official paper taken from the mandarin he had briefly captured at the dam, two days earlier. The paper was a written order from the Governor, proclaiming the conscription of villagers to build dams on the river. Governor Nguyễn Vũ was quite embarrassed, and Hautefeuille asked him for a written proof of his submission to Garnier's will. The Governor consented, but when Hautefeuille demanded to enter the fortress alongside him to witness the writing, however, Nguyễn Vũ firmly refused to allow him in.
In a sudden and brutal move, the impetuous French officer seized the old Governor by the collar, put a watch on the nearby table and, holding his handgun on the Governor's temple, threatened to blow his brain out if all the local mandarins, plus the runaway Án sát of Hanoi, were not gathered in front of him within the next 15 minutes. Some of the Vietnamese soldiers around them had moved toward them at this sight, but immediately pulled back when French sailors took aim.
Thirteen minutes later, at 7:44, all the mandarins had been gathered and they entered the citadel alongside Hautefeuille and his men. Instead of bringing to Governor to his palace to write the letter of submission as previously stated, the young officer had him and the other mandarins tied up, and then sent a sailor to hoist the French flag on the citadel's tower.
Following, he placed the Governor at a table with some paper to sign a capitulation under the watch of four of his sailors, while he himself went with the province's Lãnh binh (general), the two remaining sailors and his interpreter to inspect the citadel. The Lãnh binh proceeded to give them a guided tour of the fortress, while the 1,700 Vietnamese soldiers had been gathered in the courtyard, down on their knees, their head bowed down and their weapons on the ground besides them.
As he came back to the palace where the mandarins were held captive, Hautefeuille found out that the Án sát of Ninh Bình had managed to flee and that the Governor now refused to take responsibility for the capitulation alone, out of fear about consequences. Hautefeuille declared him a prisoner of war and jailed him in the fort on the high rock. The French only kept the five mandarins in captivity while the soldiers were ordered to leave the place without their weapons, which they readily did.
The amount of weaponry captured was quite massive: 46 cannons, a dozen of swivel guns, hundreds of rifles, thousands of spears and a vast quantity of gunpowder. In the vault of the citadel, Hautefeuille also found a very large amount of strings of cash coins, the local currency.
Aftermath
With just eight men, the 21 years old aspirant had captured the city of Ninh Bình, and effectively the entire province. On 9 December, Lieutenant Garnier, who arrived to Ninh Bình on the gunboat Scorpion, was quite surprised to see the French flag flying at the top of the citadel. After having congratulated Hautefeuille, Garnier replaced his seven sailors with ten different ones and loaded his 4-pounder cannon on the Scorpion before departing for Nam Dinh on the next day, leaving the young officer in charge of the province.
Hautefeuille appointed new mandarins and enlisted locals to his service. He paid some visits to neighbouring villages, accompanied only by his interpreter, and distributed a large amount of the strings of cash coins he had found in the citadel, which soon rendered him quite popular with locals. On 28 December he repulsed an attack by Vietnamese Imperial forces on Gia Viễn. Hautefeuille and his 10 sailors remained in control of the province until 8 January 1874 when Lieutenant Philastre, who had been sent by France to terminate Garnier's rogue expedition, came to fetch them with a ship to bring them back to Saigon.
References
History of Ninh Bình Province
Conflicts in 1873
December 1873 events |
Oleandrose is a type of carbohydrate with the chemical formula C7H14O4. With a six-carbon chain, it is classified as a hexose. With two hydroxyl groups replaced with hydrogen atoms, it is a dideoxy sugar. The hydroxyl group at C3 is methylated.
Occurrence
Oleandrdose is found in the leaves of Nerium oleander and may contribute to the toxicity of the plant. Oleandrose is also a component of several naturally-occurring chemical compounds including the avermectins (emamectin, abamectins, ivermectin, and others), the macrolide antibiotic oleandomycin, and the cardiac glycoside oleandrin.
Laboratory syntheses of L-oleandrose and DL-oleandrose have been reported.
See also
Sarmentose, a diastereomeric dideoxy sugar
References
Hexoses
Deoxy sugars
Methoxy compounds |
```c
/*
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* You may select, at your option, one of the above-listed licenses.
*/
/*-************************************
* Tuning parameters
**************************************/
#ifndef ZSTDCLI_CLEVEL_DEFAULT
# define ZSTDCLI_CLEVEL_DEFAULT 3
#endif
#ifndef ZSTDCLI_CLEVEL_MAX
# define ZSTDCLI_CLEVEL_MAX 19 /* without using --ultra */
#endif
#ifndef ZSTDCLI_NBTHREADS_DEFAULT
# define ZSTDCLI_NBTHREADS_DEFAULT 1
#endif
/*-************************************
* Dependencies
**************************************/
#include "platform.h" /* PLATFORM_POSIX_VERSION */
#include "util.h" /* UTIL_HAS_CREATEFILELIST, UTIL_createFileList, UTIL_isConsole */
#include <stdlib.h> /* getenv */
#include <string.h> /* strcmp, strlen */
#include <stdio.h> /* fprintf(), stdin, stdout, stderr */
#include <errno.h> /* errno */
#include <assert.h> /* assert */
#include "fileio.h" /* stdinmark, stdoutmark, ZSTD_EXTENSION */
#ifndef ZSTD_NOBENCH
# include "benchzstd.h" /* BMK_benchFilesAdvanced */
#endif
#ifndef ZSTD_NODICT
# include "dibio.h" /* ZDICT_cover_params_t, DiB_trainFromFiles() */
#endif
#ifndef ZSTD_NOTRACE
# include "zstdcli_trace.h"
#endif
#include "../lib/zstd.h" /* ZSTD_VERSION_STRING, ZSTD_minCLevel, ZSTD_maxCLevel */
#include "fileio_asyncio.h"
/*-************************************
* Constants
**************************************/
#define COMPRESSOR_NAME "Zstandard CLI"
#ifndef ZSTD_VERSION
# define ZSTD_VERSION "v" ZSTD_VERSION_STRING
#endif
#define AUTHOR "Yann Collet"
#define WELCOME_MESSAGE "*** %s (%i-bit) %s, by %s ***\n", COMPRESSOR_NAME, (int)(sizeof(size_t)*8), ZSTD_VERSION, AUTHOR
#define ZSTD_ZSTDMT "zstdmt"
#define ZSTD_UNZSTD "unzstd"
#define ZSTD_CAT "zstdcat"
#define ZSTD_ZCAT "zcat"
#define ZSTD_GZ "gzip"
#define ZSTD_GUNZIP "gunzip"
#define ZSTD_GZCAT "gzcat"
#define ZSTD_LZMA "lzma"
#define ZSTD_UNLZMA "unlzma"
#define ZSTD_XZ "xz"
#define ZSTD_UNXZ "unxz"
#define ZSTD_LZ4 "lz4"
#define ZSTD_UNLZ4 "unlz4"
#define KB *(1 <<10)
#define MB *(1 <<20)
#define GB *(1U<<30)
#define DISPLAY_LEVEL_DEFAULT 2
static const char* g_defaultDictName = "dictionary";
static const unsigned g_defaultMaxDictSize = 110 KB;
static const int g_defaultDictCLevel = 3;
static const unsigned g_defaultSelectivityLevel = 9;
static const unsigned g_defaultMaxWindowLog = 27;
#define OVERLAP_LOG_DEFAULT 9999
#define LDM_PARAM_DEFAULT 9999 /* Default for parameters where 0 is valid */
static U32 g_overlapLog = OVERLAP_LOG_DEFAULT;
static U32 g_ldmHashLog = 0;
static U32 g_ldmMinMatch = 0;
static U32 g_ldmHashRateLog = LDM_PARAM_DEFAULT;
static U32 g_ldmBucketSizeLog = LDM_PARAM_DEFAULT;
#define DEFAULT_ACCEL 1
typedef enum { cover, fastCover, legacy } dictType;
/*-************************************
* Display Macros
**************************************/
#define DISPLAY_F(f, ...) fprintf((f), __VA_ARGS__)
#define DISPLAYOUT(...) DISPLAY_F(stdout, __VA_ARGS__)
#define DISPLAY(...) DISPLAY_F(stderr, __VA_ARGS__)
#define DISPLAYLEVEL(l, ...) { if (g_displayLevel>=l) { DISPLAY(__VA_ARGS__); } }
static int g_displayLevel = DISPLAY_LEVEL_DEFAULT; /* 0 : no display, 1: errors, 2 : + result + interaction + warnings, 3 : + progression, 4 : + information */
/*-************************************
* Check Version (when CLI linked to dynamic library)
**************************************/
/* Due to usage of experimental symbols and capabilities by the CLI,
* the CLI must be linked against a dynamic library of same version */
static void checkLibVersion(void)
{
if (strcmp(ZSTD_VERSION_STRING, ZSTD_versionString())) {
DISPLAYLEVEL(1, "Error : incorrect library version (expecting : %s ; actual : %s ) \n",
ZSTD_VERSION_STRING, ZSTD_versionString());
DISPLAYLEVEL(1, "Please update library to version %s, or use stand-alone zstd binary \n",
ZSTD_VERSION_STRING);
exit(1);
}
}
/*! exeNameMatch() :
@return : a non-zero value if exeName matches test, excluding the extension
*/
static int exeNameMatch(const char* exeName, const char* test)
{
return !strncmp(exeName, test, strlen(test)) &&
(exeName[strlen(test)] == '\0' || exeName[strlen(test)] == '.');
}
/*-************************************
* Command Line
**************************************/
/* print help either in `stderr` or `stdout` depending on originating request
* error (badusage) => stderr
* help (usage_advanced) => stdout
*/
static void usage(FILE* f, const char* programName)
{
DISPLAY_F(f, "Compress or decompress the INPUT file(s); reads from STDIN if INPUT is `-` or not provided.\n\n");
DISPLAY_F(f, "Usage: %s [OPTIONS...] [INPUT... | -] [-o OUTPUT]\n\n", programName);
DISPLAY_F(f, "Options:\n");
DISPLAY_F(f, " -o OUTPUT Write output to a single file, OUTPUT.\n");
DISPLAY_F(f, " -k, --keep Preserve INPUT file(s). [Default] \n");
DISPLAY_F(f, " --rm Remove INPUT file(s) after successful (de)compression.\n");
#ifdef ZSTD_GZCOMPRESS
if (exeNameMatch(programName, ZSTD_GZ)) { /* behave like gzip */
DISPLAY_F(f, " -n, --no-name Do not store original filename when compressing.\n\n");
}
#endif
DISPLAY_F(f, "\n");
#ifndef ZSTD_NOCOMPRESS
DISPLAY_F(f, " -# Desired compression level, where `#` is a number between 1 and %d;\n", ZSTDCLI_CLEVEL_MAX);
DISPLAY_F(f, " lower numbers provide faster compression, higher numbers yield\n");
DISPLAY_F(f, " better compression ratios. [Default: %d]\n\n", ZSTDCLI_CLEVEL_DEFAULT);
#endif
#ifndef ZSTD_NODECOMPRESS
DISPLAY_F(f, " -d, --decompress Perform decompression.\n");
#endif
DISPLAY_F(f, " -D DICT Use DICT as the dictionary for compression or decompression.\n\n");
DISPLAY_F(f, " -f, --force Disable input and output checks. Allows overwriting existing files,\n");
DISPLAY_F(f, " receiving input from the console, printing output to STDOUT, and\n");
DISPLAY_F(f, " operating on links, block devices, etc. Unrecognized formats will be\n");
DISPLAY_F(f, " passed-through through as-is.\n\n");
DISPLAY_F(f, " -h Display short usage and exit.\n");
DISPLAY_F(f, " -H, --help Display full help and exit.\n");
DISPLAY_F(f, " -V, --version Display the program version and exit.\n");
DISPLAY_F(f, "\n");
}
static void usage_advanced(const char* programName)
{
DISPLAYOUT(WELCOME_MESSAGE);
DISPLAYOUT("\n");
usage(stdout, programName);
DISPLAYOUT("Advanced options:\n");
DISPLAYOUT(" -c, --stdout Write to STDOUT (even if it is a console) and keep the INPUT file(s).\n\n");
DISPLAYOUT(" -v, --verbose Enable verbose output; pass multiple times to increase verbosity.\n");
DISPLAYOUT(" -q, --quiet Suppress warnings; pass twice to suppress errors.\n");
#ifndef ZSTD_NOTRACE
DISPLAYOUT(" --trace LOG Log tracing information to LOG.\n");
#endif
DISPLAYOUT("\n");
DISPLAYOUT(" --[no-]progress Forcibly show/hide the progress counter. NOTE: Any (de)compressed\n");
DISPLAYOUT(" output to terminal will mix with progress counter text.\n\n");
#ifdef UTIL_HAS_CREATEFILELIST
DISPLAYOUT(" -r Operate recursively on directories.\n");
DISPLAYOUT(" --filelist LIST Read a list of files to operate on from LIST.\n");
DISPLAYOUT(" --output-dir-flat DIR Store processed files in DIR.\n");
#endif
#ifdef UTIL_HAS_MIRRORFILELIST
DISPLAYOUT(" --output-dir-mirror DIR Store processed files in DIR, respecting original directory structure.\n");
#endif
if (AIO_supported())
DISPLAYOUT(" --[no-]asyncio Use asynchronous IO. [Default: Enabled]\n");
DISPLAYOUT("\n");
#ifndef ZSTD_NOCOMPRESS
DISPLAYOUT(" --[no-]check Add XXH64 integrity checksums during compression. [Default: Add, Validate]\n");
#ifndef ZSTD_NODECOMPRESS
DISPLAYOUT(" If `-d` is present, ignore/validate checksums during decompression.\n");
#endif
#else
#ifdef ZSTD_NOCOMPRESS
DISPLAYOUT(" --[no-]check Ignore/validate checksums during decompression. [Default: Validate]");
#endif
#endif /* ZSTD_NOCOMPRESS */
DISPLAYOUT("\n");
DISPLAYOUT(" -- Treat remaining arguments after `--` as files.\n");
#ifndef ZSTD_NOCOMPRESS
DISPLAYOUT("\n");
DISPLAYOUT("Advanced compression options:\n");
DISPLAYOUT(" --ultra Enable levels beyond %i, up to %i; requires more memory.\n", ZSTDCLI_CLEVEL_MAX, ZSTD_maxCLevel());
DISPLAYOUT(" --fast[=#] Use to very fast compression levels. [Default: %u]\n", 1);
#ifdef ZSTD_GZCOMPRESS
if (exeNameMatch(programName, ZSTD_GZ)) { /* behave like gzip */
DISPLAYOUT(" --best Compatibility alias for `-9`.\n");
}
#endif
DISPLAYOUT(" --adapt Dynamically adapt compression level to I/O conditions.\n");
DISPLAYOUT(" --long[=#] Enable long distance matching with window log #. [Default: %u]\n", g_defaultMaxWindowLog);
DISPLAYOUT(" --patch-from=REF Use REF as the reference point for Zstandard's diff engine. \n\n");
# ifdef ZSTD_MULTITHREAD
DISPLAYOUT(" -T# Spawn # compression threads. [Default: 1; pass 0 for core count.]\n");
DISPLAYOUT(" --single-thread Share a single thread for I/O and compression (slightly different than `-T1`).\n");
DISPLAYOUT(" --auto-threads={physical|logical}\n");
DISPLAYOUT(" Use physical/logical cores when using `-T0`. [Default: Physical]\n\n");
DISPLAYOUT(" -B# Set job size to #. [Default: 0 (automatic)]\n");
DISPLAYOUT(" --rsyncable Compress using a rsync-friendly method (`-B` sets block size). \n");
DISPLAYOUT("\n");
# endif
DISPLAYOUT(" --exclude-compressed Only compress files that are not already compressed.\n\n");
DISPLAYOUT(" --stream-size=# Specify size of streaming input from STDIN.\n");
DISPLAYOUT(" --size-hint=# Optimize compression parameters for streaming input of approximately size #.\n");
DISPLAYOUT(" --target-compressed-block-size=#\n");
DISPLAYOUT(" Generate compressed blocks of approximately # size.\n\n");
DISPLAYOUT(" --no-dictID Don't write `dictID` into the header (dictionary compression only).\n");
DISPLAYOUT(" --[no-]compress-literals Force (un)compressed literals.\n");
DISPLAYOUT(" --[no-]row-match-finder Explicitly enable/disable the fast, row-based matchfinder for\n");
DISPLAYOUT(" the 'greedy', 'lazy', and 'lazy2' strategies.\n");
DISPLAYOUT("\n");
DISPLAYOUT(" --format=zstd Compress files to the `.zst` format. [Default]\n");
DISPLAYOUT(" --mmap-dict Memory-map dictionary file rather than mallocing and loading all at once");
#ifdef ZSTD_GZCOMPRESS
DISPLAYOUT(" --format=gzip Compress files to the `.gz` format.\n");
#endif
#ifdef ZSTD_LZMACOMPRESS
DISPLAYOUT(" --format=xz Compress files to the `.xz` format.\n");
DISPLAYOUT(" --format=lzma Compress files to the `.lzma` format.\n");
#endif
#ifdef ZSTD_LZ4COMPRESS
DISPLAYOUT( " --format=lz4 Compress files to the `.lz4` format.\n");
#endif
#endif /* !ZSTD_NOCOMPRESS */
#ifndef ZSTD_NODECOMPRESS
DISPLAYOUT("\n");
DISPLAYOUT("Advanced decompression options:\n");
DISPLAYOUT(" -l Print information about Zstandard-compressed files.\n");
DISPLAYOUT(" --test Test compressed file integrity.\n");
DISPLAYOUT(" -M# Set the memory usage limit to # megabytes.\n");
# if ZSTD_SPARSE_DEFAULT
DISPLAYOUT(" --[no-]sparse Enable sparse mode. [Default: Enabled for files, disabled for STDOUT.]\n");
# else
DISPLAYOUT(" --[no-]sparse Enable sparse mode. [Default: Disabled]\n");
# endif
{
char const* passThroughDefault = "Disabled";
if (exeNameMatch(programName, ZSTD_CAT) ||
exeNameMatch(programName, ZSTD_ZCAT) ||
exeNameMatch(programName, ZSTD_GZCAT)) {
passThroughDefault = "Enabled";
}
DISPLAYOUT(" --[no-]pass-through Pass through uncompressed files as-is. [Default: %s]\n", passThroughDefault);
}
#endif /* ZSTD_NODECOMPRESS */
#ifndef ZSTD_NODICT
DISPLAYOUT("\n");
DISPLAYOUT("Dictionary builder:\n");
DISPLAYOUT(" --train Create a dictionary from a training set of files.\n\n");
DISPLAYOUT(" --train-cover[=k=#,d=#,steps=#,split=#,shrink[=#]]\n");
DISPLAYOUT(" Use the cover algorithm (with optional arguments).\n");
DISPLAYOUT(" --train-fastcover[=k=#,d=#,f=#,steps=#,split=#,accel=#,shrink[=#]]\n");
DISPLAYOUT(" Use the fast cover algorithm (with optional arguments).\n\n");
DISPLAYOUT(" --train-legacy[=s=#] Use the legacy algorithm with selectivity #. [Default: %u]\n", g_defaultSelectivityLevel);
DISPLAYOUT(" -o NAME Use NAME as dictionary name. [Default: %s]\n", g_defaultDictName);
DISPLAYOUT(" --maxdict=# Limit dictionary to specified size #. [Default: %u]\n", g_defaultMaxDictSize);
DISPLAYOUT(" --dictID=# Force dictionary ID to #. [Default: Random]\n");
#endif
#ifndef ZSTD_NOBENCH
DISPLAYOUT("\n");
DISPLAYOUT("Benchmark options:\n");
DISPLAYOUT(" -b# Perform benchmarking with compression level #. [Default: %d]\n", ZSTDCLI_CLEVEL_DEFAULT);
DISPLAYOUT(" -e# Test all compression levels up to #; starting level is `-b#`. [Default: 1]\n");
DISPLAYOUT(" -i# Set the minimum evaluation to time # seconds. [Default: 3]\n");
DISPLAYOUT(" -B# Cut file into independent chunks of size #. [Default: No chunking]\n");
DISPLAYOUT(" -S Output one benchmark result per input file. [Default: Consolidated result]\n");
DISPLAYOUT(" --priority=rt Set process priority to real-time.\n");
#endif
}
static void badusage(const char* programName)
{
DISPLAYLEVEL(1, "Incorrect parameters \n");
if (g_displayLevel >= 2) usage(stderr, programName);
}
static void waitEnter(void)
{
int unused;
DISPLAY("Press enter to continue... \n");
unused = getchar();
(void)unused;
}
static const char* lastNameFromPath(const char* path)
{
const char* name = path;
if (strrchr(name, '/')) name = strrchr(name, '/') + 1;
if (strrchr(name, '\\')) name = strrchr(name, '\\') + 1; /* windows */
return name;
}
static void errorOut(const char* msg)
{
DISPLAYLEVEL(1, "%s \n", msg); exit(1);
}
/*! readU32FromCharChecked() :
* @return 0 if success, and store the result in *value.
* allows and interprets K, KB, KiB, M, MB and MiB suffix.
* Will also modify `*stringPtr`, advancing it to position where it stopped reading.
* @return 1 if an overflow error occurs */
static int readU32FromCharChecked(const char** stringPtr, unsigned* value)
{
unsigned result = 0;
while ((**stringPtr >='0') && (**stringPtr <='9')) {
unsigned const max = ((unsigned)(-1)) / 10;
unsigned last = result;
if (result > max) return 1; /* overflow error */
result *= 10;
result += (unsigned)(**stringPtr - '0');
if (result < last) return 1; /* overflow error */
(*stringPtr)++ ;
}
if ((**stringPtr=='K') || (**stringPtr=='M')) {
unsigned const maxK = ((unsigned)(-1)) >> 10;
if (result > maxK) return 1; /* overflow error */
result <<= 10;
if (**stringPtr=='M') {
if (result > maxK) return 1; /* overflow error */
result <<= 10;
}
(*stringPtr)++; /* skip `K` or `M` */
if (**stringPtr=='i') (*stringPtr)++;
if (**stringPtr=='B') (*stringPtr)++;
}
*value = result;
return 0;
}
/*! readU32FromChar() :
* @return : unsigned integer value read from input in `char` format.
* allows and interprets K, KB, KiB, M, MB and MiB suffix.
* Will also modify `*stringPtr`, advancing it to position where it stopped reading.
* Note : function will exit() program if digit sequence overflows */
static unsigned readU32FromChar(const char** stringPtr) {
static const char errorMsg[] = "error: numeric value overflows 32-bit unsigned int";
unsigned result;
if (readU32FromCharChecked(stringPtr, &result)) { errorOut(errorMsg); }
return result;
}
/*! readIntFromChar() :
* @return : signed integer value read from input in `char` format.
* allows and interprets K, KB, KiB, M, MB and MiB suffix.
* Will also modify `*stringPtr`, advancing it to position where it stopped reading.
* Note : function will exit() program if digit sequence overflows */
static int readIntFromChar(const char** stringPtr) {
static const char errorMsg[] = "error: numeric value overflows 32-bit int";
int sign = 1;
unsigned result;
if (**stringPtr=='-') {
(*stringPtr)++;
sign = -1;
}
if (readU32FromCharChecked(stringPtr, &result)) { errorOut(errorMsg); }
return (int) result * sign;
}
/*! readSizeTFromCharChecked() :
* @return 0 if success, and store the result in *value.
* allows and interprets K, KB, KiB, M, MB and MiB suffix.
* Will also modify `*stringPtr`, advancing it to position where it stopped reading.
* @return 1 if an overflow error occurs */
static int readSizeTFromCharChecked(const char** stringPtr, size_t* value)
{
size_t result = 0;
while ((**stringPtr >='0') && (**stringPtr <='9')) {
size_t const max = ((size_t)(-1)) / 10;
size_t last = result;
if (result > max) return 1; /* overflow error */
result *= 10;
result += (size_t)(**stringPtr - '0');
if (result < last) return 1; /* overflow error */
(*stringPtr)++ ;
}
if ((**stringPtr=='K') || (**stringPtr=='M')) {
size_t const maxK = ((size_t)(-1)) >> 10;
if (result > maxK) return 1; /* overflow error */
result <<= 10;
if (**stringPtr=='M') {
if (result > maxK) return 1; /* overflow error */
result <<= 10;
}
(*stringPtr)++; /* skip `K` or `M` */
if (**stringPtr=='i') (*stringPtr)++;
if (**stringPtr=='B') (*stringPtr)++;
}
*value = result;
return 0;
}
/*! readSizeTFromChar() :
* @return : size_t value read from input in `char` format.
* allows and interprets K, KB, KiB, M, MB and MiB suffix.
* Will also modify `*stringPtr`, advancing it to position where it stopped reading.
* Note : function will exit() program if digit sequence overflows */
static size_t readSizeTFromChar(const char** stringPtr) {
static const char errorMsg[] = "error: numeric value overflows size_t";
size_t result;
if (readSizeTFromCharChecked(stringPtr, &result)) { errorOut(errorMsg); }
return result;
}
/** longCommandWArg() :
* check if *stringPtr is the same as longCommand.
* If yes, @return 1 and advances *stringPtr to the position which immediately follows longCommand.
* @return 0 and doesn't modify *stringPtr otherwise.
*/
static int longCommandWArg(const char** stringPtr, const char* longCommand)
{
size_t const comSize = strlen(longCommand);
int const result = !strncmp(*stringPtr, longCommand, comSize);
if (result) *stringPtr += comSize;
return result;
}
#ifndef ZSTD_NODICT
static const unsigned kDefaultRegression = 1;
/**
* parseCoverParameters() :
* reads cover parameters from *stringPtr (e.g. "--train-cover=k=48,d=8,steps=32") into *params
* @return 1 means that cover parameters were correct
* @return 0 in case of malformed parameters
*/
static unsigned parseCoverParameters(const char* stringPtr, ZDICT_cover_params_t* params)
{
memset(params, 0, sizeof(*params));
for (; ;) {
if (longCommandWArg(&stringPtr, "k=")) { params->k = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "d=")) { params->d = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "steps=")) { params->steps = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "split=")) {
unsigned splitPercentage = readU32FromChar(&stringPtr);
params->splitPoint = (double)splitPercentage / 100.0;
if (stringPtr[0]==',') { stringPtr++; continue; } else break;
}
if (longCommandWArg(&stringPtr, "shrink")) {
params->shrinkDictMaxRegression = kDefaultRegression;
params->shrinkDict = 1;
if (stringPtr[0]=='=') {
stringPtr++;
params->shrinkDictMaxRegression = readU32FromChar(&stringPtr);
}
if (stringPtr[0]==',') {
stringPtr++;
continue;
}
else break;
}
return 0;
}
if (stringPtr[0] != 0) return 0;
DISPLAYLEVEL(4, "cover: k=%u\nd=%u\nsteps=%u\nsplit=%u\nshrink%u\n", params->k, params->d, params->steps, (unsigned)(params->splitPoint * 100), params->shrinkDictMaxRegression);
return 1;
}
/**
* parseFastCoverParameters() :
* reads fastcover parameters from *stringPtr (e.g. "--train-fastcover=k=48,d=8,f=20,steps=32,accel=2") into *params
* @return 1 means that fastcover parameters were correct
* @return 0 in case of malformed parameters
*/
static unsigned parseFastCoverParameters(const char* stringPtr, ZDICT_fastCover_params_t* params)
{
memset(params, 0, sizeof(*params));
for (; ;) {
if (longCommandWArg(&stringPtr, "k=")) { params->k = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "d=")) { params->d = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "f=")) { params->f = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "steps=")) { params->steps = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "accel=")) { params->accel = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "split=")) {
unsigned splitPercentage = readU32FromChar(&stringPtr);
params->splitPoint = (double)splitPercentage / 100.0;
if (stringPtr[0]==',') { stringPtr++; continue; } else break;
}
if (longCommandWArg(&stringPtr, "shrink")) {
params->shrinkDictMaxRegression = kDefaultRegression;
params->shrinkDict = 1;
if (stringPtr[0]=='=') {
stringPtr++;
params->shrinkDictMaxRegression = readU32FromChar(&stringPtr);
}
if (stringPtr[0]==',') {
stringPtr++;
continue;
}
else break;
}
return 0;
}
if (stringPtr[0] != 0) return 0;
DISPLAYLEVEL(4, "cover: k=%u\nd=%u\nf=%u\nsteps=%u\nsplit=%u\naccel=%u\nshrink=%u\n", params->k, params->d, params->f, params->steps, (unsigned)(params->splitPoint * 100), params->accel, params->shrinkDictMaxRegression);
return 1;
}
/**
* parseLegacyParameters() :
* reads legacy dictionary builder parameters from *stringPtr (e.g. "--train-legacy=selectivity=8") into *selectivity
* @return 1 means that legacy dictionary builder parameters were correct
* @return 0 in case of malformed parameters
*/
static unsigned parseLegacyParameters(const char* stringPtr, unsigned* selectivity)
{
if (!longCommandWArg(&stringPtr, "s=") && !longCommandWArg(&stringPtr, "selectivity=")) { return 0; }
*selectivity = readU32FromChar(&stringPtr);
if (stringPtr[0] != 0) return 0;
DISPLAYLEVEL(4, "legacy: selectivity=%u\n", *selectivity);
return 1;
}
static ZDICT_cover_params_t defaultCoverParams(void)
{
ZDICT_cover_params_t params;
memset(¶ms, 0, sizeof(params));
params.d = 8;
params.steps = 4;
params.splitPoint = 1.0;
params.shrinkDict = 0;
params.shrinkDictMaxRegression = kDefaultRegression;
return params;
}
static ZDICT_fastCover_params_t defaultFastCoverParams(void)
{
ZDICT_fastCover_params_t params;
memset(¶ms, 0, sizeof(params));
params.d = 8;
params.f = 20;
params.steps = 4;
params.splitPoint = 0.75; /* different from default splitPoint of cover */
params.accel = DEFAULT_ACCEL;
params.shrinkDict = 0;
params.shrinkDictMaxRegression = kDefaultRegression;
return params;
}
#endif
/** parseAdaptParameters() :
* reads adapt parameters from *stringPtr (e.g. "--zstd=min=1,max=19) and store them into adaptMinPtr and adaptMaxPtr.
* Both adaptMinPtr and adaptMaxPtr must be already allocated and correctly initialized.
* There is no guarantee that any of these values will be updated.
* @return 1 means that parsing was successful,
* @return 0 in case of malformed parameters
*/
static unsigned parseAdaptParameters(const char* stringPtr, int* adaptMinPtr, int* adaptMaxPtr)
{
for ( ; ;) {
if (longCommandWArg(&stringPtr, "min=")) { *adaptMinPtr = readIntFromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "max=")) { *adaptMaxPtr = readIntFromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
DISPLAYLEVEL(4, "invalid compression parameter \n");
return 0;
}
if (stringPtr[0] != 0) return 0; /* check the end of string */
if (*adaptMinPtr > *adaptMaxPtr) {
DISPLAYLEVEL(4, "incoherent adaptation limits \n");
return 0;
}
return 1;
}
/** parseCompressionParameters() :
* reads compression parameters from *stringPtr (e.g. "--zstd=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6") into *params
* @return 1 means that compression parameters were correct
* @return 0 in case of malformed parameters
*/
static unsigned parseCompressionParameters(const char* stringPtr, ZSTD_compressionParameters* params)
{
for ( ; ;) {
if (longCommandWArg(&stringPtr, "windowLog=") || longCommandWArg(&stringPtr, "wlog=")) { params->windowLog = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "chainLog=") || longCommandWArg(&stringPtr, "clog=")) { params->chainLog = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "hashLog=") || longCommandWArg(&stringPtr, "hlog=")) { params->hashLog = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "searchLog=") || longCommandWArg(&stringPtr, "slog=")) { params->searchLog = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "minMatch=") || longCommandWArg(&stringPtr, "mml=")) { params->minMatch = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "targetLength=") || longCommandWArg(&stringPtr, "tlen=")) { params->targetLength = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "strategy=") || longCommandWArg(&stringPtr, "strat=")) { params->strategy = (ZSTD_strategy)(readU32FromChar(&stringPtr)); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "overlapLog=") || longCommandWArg(&stringPtr, "ovlog=")) { g_overlapLog = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "ldmHashLog=") || longCommandWArg(&stringPtr, "lhlog=")) { g_ldmHashLog = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "ldmMinMatch=") || longCommandWArg(&stringPtr, "lmml=")) { g_ldmMinMatch = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "ldmBucketSizeLog=") || longCommandWArg(&stringPtr, "lblog=")) { g_ldmBucketSizeLog = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
if (longCommandWArg(&stringPtr, "ldmHashRateLog=") || longCommandWArg(&stringPtr, "lhrlog=")) { g_ldmHashRateLog = readU32FromChar(&stringPtr); if (stringPtr[0]==',') { stringPtr++; continue; } else break; }
DISPLAYLEVEL(4, "invalid compression parameter \n");
return 0;
}
DISPLAYLEVEL(4, "windowLog=%d, chainLog=%d, hashLog=%d, searchLog=%d \n", params->windowLog, params->chainLog, params->hashLog, params->searchLog);
DISPLAYLEVEL(4, "minMatch=%d, targetLength=%d, strategy=%d \n", params->minMatch, params->targetLength, params->strategy);
if (stringPtr[0] != 0) return 0; /* check the end of string */
return 1;
}
static void printVersion(void)
{
if (g_displayLevel < DISPLAY_LEVEL_DEFAULT) {
DISPLAYOUT("%s\n", ZSTD_VERSION_STRING);
return;
}
DISPLAYOUT(WELCOME_MESSAGE);
if (g_displayLevel >= 3) {
/* format support */
DISPLAYOUT("*** supports: zstd");
#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>0) && (ZSTD_LEGACY_SUPPORT<8)
DISPLAYOUT(", zstd legacy v0.%d+", ZSTD_LEGACY_SUPPORT);
#endif
#ifdef ZSTD_GZCOMPRESS
DISPLAYOUT(", gzip");
#endif
#ifdef ZSTD_LZ4COMPRESS
DISPLAYOUT(", lz4");
#endif
#ifdef ZSTD_LZMACOMPRESS
DISPLAYOUT(", lzma, xz ");
#endif
DISPLAYOUT("\n");
if (g_displayLevel >= 4) {
/* library versions */
DISPLAYOUT("zlib version %s\n", FIO_zlibVersion());
DISPLAYOUT("lz4 version %s\n", FIO_lz4Version());
DISPLAYOUT("lzma version %s\n", FIO_lzmaVersion());
/* posix support */
#ifdef _POSIX_C_SOURCE
DISPLAYOUT("_POSIX_C_SOURCE defined: %ldL\n", (long) _POSIX_C_SOURCE);
#endif
#ifdef _POSIX_VERSION
DISPLAYOUT("_POSIX_VERSION defined: %ldL \n", (long) _POSIX_VERSION);
#endif
#ifdef PLATFORM_POSIX_VERSION
DISPLAYOUT("PLATFORM_POSIX_VERSION defined: %ldL\n", (long) PLATFORM_POSIX_VERSION);
#endif
} }
}
#define ZSTD_NB_STRATEGIES 9
static const char* ZSTD_strategyMap[ZSTD_NB_STRATEGIES + 1] = { "", "ZSTD_fast",
"ZSTD_dfast", "ZSTD_greedy", "ZSTD_lazy", "ZSTD_lazy2", "ZSTD_btlazy2",
"ZSTD_btopt", "ZSTD_btultra", "ZSTD_btultra2"};
#ifndef ZSTD_NOCOMPRESS
static void printDefaultCParams(const char* filename, const char* dictFileName, int cLevel) {
unsigned long long fileSize = UTIL_getFileSize(filename);
const size_t dictSize = dictFileName != NULL ? (size_t)UTIL_getFileSize(dictFileName) : 0;
const ZSTD_compressionParameters cParams = ZSTD_getCParams(cLevel, fileSize, dictSize);
if (fileSize != UTIL_FILESIZE_UNKNOWN) DISPLAY("%s (%u bytes)\n", filename, (unsigned)fileSize);
else DISPLAY("%s (src size unknown)\n", filename);
DISPLAY(" - windowLog : %u\n", cParams.windowLog);
DISPLAY(" - chainLog : %u\n", cParams.chainLog);
DISPLAY(" - hashLog : %u\n", cParams.hashLog);
DISPLAY(" - searchLog : %u\n", cParams.searchLog);
DISPLAY(" - minMatch : %u\n", cParams.minMatch);
DISPLAY(" - targetLength : %u\n", cParams.targetLength);
assert(cParams.strategy < ZSTD_NB_STRATEGIES + 1);
DISPLAY(" - strategy : %s (%u)\n", ZSTD_strategyMap[(int)cParams.strategy], (unsigned)cParams.strategy);
}
static void printActualCParams(const char* filename, const char* dictFileName, int cLevel, const ZSTD_compressionParameters* cParams) {
unsigned long long fileSize = UTIL_getFileSize(filename);
const size_t dictSize = dictFileName != NULL ? (size_t)UTIL_getFileSize(dictFileName) : 0;
ZSTD_compressionParameters actualCParams = ZSTD_getCParams(cLevel, fileSize, dictSize);
assert(g_displayLevel >= 4);
actualCParams.windowLog = cParams->windowLog == 0 ? actualCParams.windowLog : cParams->windowLog;
actualCParams.chainLog = cParams->chainLog == 0 ? actualCParams.chainLog : cParams->chainLog;
actualCParams.hashLog = cParams->hashLog == 0 ? actualCParams.hashLog : cParams->hashLog;
actualCParams.searchLog = cParams->searchLog == 0 ? actualCParams.searchLog : cParams->searchLog;
actualCParams.minMatch = cParams->minMatch == 0 ? actualCParams.minMatch : cParams->minMatch;
actualCParams.targetLength = cParams->targetLength == 0 ? actualCParams.targetLength : cParams->targetLength;
actualCParams.strategy = cParams->strategy == 0 ? actualCParams.strategy : cParams->strategy;
DISPLAY("--zstd=wlog=%d,clog=%d,hlog=%d,slog=%d,mml=%d,tlen=%d,strat=%d\n",
actualCParams.windowLog, actualCParams.chainLog, actualCParams.hashLog, actualCParams.searchLog,
actualCParams.minMatch, actualCParams.targetLength, actualCParams.strategy);
}
#endif
/* Environment variables for parameter setting */
#define ENV_CLEVEL "ZSTD_CLEVEL"
#define ENV_NBTHREADS "ZSTD_NBTHREADS" /* takes lower precedence than directly specifying -T# in the CLI */
/* pick up environment variable */
static int init_cLevel(void) {
const char* const env = getenv(ENV_CLEVEL);
if (env != NULL) {
const char* ptr = env;
int sign = 1;
if (*ptr == '-') {
sign = -1;
ptr++;
} else if (*ptr == '+') {
ptr++;
}
if ((*ptr>='0') && (*ptr<='9')) {
unsigned absLevel;
if (readU32FromCharChecked(&ptr, &absLevel)) {
DISPLAYLEVEL(2, "Ignore environment variable setting %s=%s: numeric value too large \n", ENV_CLEVEL, env);
return ZSTDCLI_CLEVEL_DEFAULT;
} else if (*ptr == 0) {
return sign * (int)absLevel;
} }
DISPLAYLEVEL(2, "Ignore environment variable setting %s=%s: not a valid integer value \n", ENV_CLEVEL, env);
}
return ZSTDCLI_CLEVEL_DEFAULT;
}
#ifdef ZSTD_MULTITHREAD
static unsigned init_nbThreads(void) {
const char* const env = getenv(ENV_NBTHREADS);
if (env != NULL) {
const char* ptr = env;
if ((*ptr>='0') && (*ptr<='9')) {
unsigned nbThreads;
if (readU32FromCharChecked(&ptr, &nbThreads)) {
DISPLAYLEVEL(2, "Ignore environment variable setting %s=%s: numeric value too large \n", ENV_NBTHREADS, env);
return ZSTDCLI_NBTHREADS_DEFAULT;
} else if (*ptr == 0) {
return nbThreads;
}
}
DISPLAYLEVEL(2, "Ignore environment variable setting %s=%s: not a valid unsigned value \n", ENV_NBTHREADS, env);
}
return ZSTDCLI_NBTHREADS_DEFAULT;
}
#endif
#define NEXT_FIELD(ptr) { \
if (*argument == '=') { \
ptr = ++argument; \
argument += strlen(ptr); \
} else { \
argNb++; \
if (argNb >= argCount) { \
DISPLAYLEVEL(1, "error: missing command argument \n"); \
CLEAN_RETURN(1); \
} \
ptr = argv[argNb]; \
assert(ptr != NULL); \
if (ptr[0]=='-') { \
DISPLAYLEVEL(1, "error: command cannot be separated from its argument by another command \n"); \
CLEAN_RETURN(1); \
} } }
#define NEXT_UINT32(val32) { \
const char* __nb; \
NEXT_FIELD(__nb); \
val32 = readU32FromChar(&__nb); \
if(*__nb != 0) { \
errorOut("error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed"); \
} \
}
#define NEXT_TSIZE(valTsize) { \
const char* __nb; \
NEXT_FIELD(__nb); \
valTsize = readSizeTFromChar(&__nb); \
if(*__nb != 0) { \
errorOut("error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed"); \
} \
}
typedef enum { zom_compress, zom_decompress, zom_test, zom_bench, zom_train, zom_list } zstd_operation_mode;
#define CLEAN_RETURN(i) { operationResult = (i); goto _end; }
#ifdef ZSTD_NOCOMPRESS
/* symbols from compression library are not defined and should not be invoked */
# define MINCLEVEL -99
# define MAXCLEVEL 22
#else
# define MINCLEVEL ZSTD_minCLevel()
# define MAXCLEVEL ZSTD_maxCLevel()
#endif
int main(int argCount, const char* argv[])
{
int argNb,
followLinks = 0,
allowBlockDevices = 0,
forceStdin = 0,
forceStdout = 0,
hasStdout = 0,
ldmFlag = 0,
main_pause = 0,
adapt = 0,
adaptMin = MINCLEVEL,
adaptMax = MAXCLEVEL,
rsyncable = 0,
nextArgumentsAreFiles = 0,
operationResult = 0,
separateFiles = 0,
setRealTimePrio = 0,
singleThread = 0,
defaultLogicalCores = 0,
showDefaultCParams = 0,
ultra=0,
contentSize=1,
removeSrcFile=0;
ZSTD_paramSwitch_e mmapDict=ZSTD_ps_auto;
ZSTD_paramSwitch_e useRowMatchFinder = ZSTD_ps_auto;
FIO_compressionType_t cType = FIO_zstdCompression;
unsigned nbWorkers = 0;
double compressibility = 0.5;
unsigned bench_nbSeconds = 3; /* would be better if this value was synchronized from bench */
size_t blockSize = 0;
FIO_prefs_t* const prefs = FIO_createPreferences();
FIO_ctx_t* const fCtx = FIO_createContext();
FIO_progressSetting_e progress = FIO_ps_auto;
zstd_operation_mode operation = zom_compress;
ZSTD_compressionParameters compressionParams;
int cLevel = init_cLevel();
int cLevelLast = MINCLEVEL - 1; /* lower than minimum */
unsigned recursive = 0;
unsigned memLimit = 0;
FileNamesTable* filenames = UTIL_allocateFileNamesTable((size_t)argCount); /* argCount >= 1 */
FileNamesTable* file_of_names = UTIL_allocateFileNamesTable((size_t)argCount); /* argCount >= 1 */
const char* programName = argv[0];
const char* outFileName = NULL;
const char* outDirName = NULL;
const char* outMirroredDirName = NULL;
const char* dictFileName = NULL;
const char* patchFromDictFileName = NULL;
const char* suffix = ZSTD_EXTENSION;
unsigned maxDictSize = g_defaultMaxDictSize;
unsigned dictID = 0;
size_t streamSrcSize = 0;
size_t targetCBlockSize = 0;
size_t srcSizeHint = 0;
size_t nbInputFileNames = 0;
int dictCLevel = g_defaultDictCLevel;
unsigned dictSelect = g_defaultSelectivityLevel;
#ifndef ZSTD_NODICT
ZDICT_cover_params_t coverParams = defaultCoverParams();
ZDICT_fastCover_params_t fastCoverParams = defaultFastCoverParams();
dictType dict = fastCover;
#endif
#ifndef ZSTD_NOBENCH
BMK_advancedParams_t benchParams = BMK_initAdvancedParams();
#endif
ZSTD_paramSwitch_e literalCompressionMode = ZSTD_ps_auto;
/* init */
checkLibVersion();
(void)recursive; (void)cLevelLast; /* not used when ZSTD_NOBENCH set */
(void)memLimit;
assert(argCount >= 1);
if ((filenames==NULL) || (file_of_names==NULL)) { DISPLAYLEVEL(1, "zstd: allocation error \n"); exit(1); }
programName = lastNameFromPath(programName);
#ifdef ZSTD_MULTITHREAD
nbWorkers = init_nbThreads();
#endif
/* preset behaviors */
if (exeNameMatch(programName, ZSTD_ZSTDMT)) nbWorkers=0, singleThread=0;
if (exeNameMatch(programName, ZSTD_UNZSTD)) operation=zom_decompress;
if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; FIO_overwriteMode(prefs); forceStdout=1; followLinks=1; FIO_setPassThroughFlag(prefs, 1); outFileName=stdoutmark; g_displayLevel=1; } /* supports multiple formats */
if (exeNameMatch(programName, ZSTD_ZCAT)) { operation=zom_decompress; FIO_overwriteMode(prefs); forceStdout=1; followLinks=1; FIO_setPassThroughFlag(prefs, 1); outFileName=stdoutmark; g_displayLevel=1; } /* behave like zcat, also supports multiple formats */
if (exeNameMatch(programName, ZSTD_GZ)) { /* behave like gzip */
suffix = GZ_EXTENSION; cType = FIO_gzipCompression; removeSrcFile=1;
dictCLevel = cLevel = 6; /* gzip default is -6 */
}
if (exeNameMatch(programName, ZSTD_GUNZIP)) { operation=zom_decompress; removeSrcFile=1; } /* behave like gunzip, also supports multiple formats */
if (exeNameMatch(programName, ZSTD_GZCAT)) { operation=zom_decompress; FIO_overwriteMode(prefs); forceStdout=1; followLinks=1; FIO_setPassThroughFlag(prefs, 1); outFileName=stdoutmark; g_displayLevel=1; } /* behave like gzcat, also supports multiple formats */
if (exeNameMatch(programName, ZSTD_LZMA)) { suffix = LZMA_EXTENSION; cType = FIO_lzmaCompression; removeSrcFile=1; } /* behave like lzma */
if (exeNameMatch(programName, ZSTD_UNLZMA)) { operation=zom_decompress; cType = FIO_lzmaCompression; removeSrcFile=1; } /* behave like unlzma, also supports multiple formats */
if (exeNameMatch(programName, ZSTD_XZ)) { suffix = XZ_EXTENSION; cType = FIO_xzCompression; removeSrcFile=1; } /* behave like xz */
if (exeNameMatch(programName, ZSTD_UNXZ)) { operation=zom_decompress; cType = FIO_xzCompression; removeSrcFile=1; } /* behave like unxz, also supports multiple formats */
if (exeNameMatch(programName, ZSTD_LZ4)) { suffix = LZ4_EXTENSION; cType = FIO_lz4Compression; } /* behave like lz4 */
if (exeNameMatch(programName, ZSTD_UNLZ4)) { operation=zom_decompress; cType = FIO_lz4Compression; } /* behave like unlz4, also supports multiple formats */
memset(&compressionParams, 0, sizeof(compressionParams));
/* init crash handler */
FIO_addAbortHandler();
/* command switches */
for (argNb=1; argNb<argCount; argNb++) {
const char* argument = argv[argNb];
if (!argument) continue; /* Protection if argument empty */
if (nextArgumentsAreFiles) {
UTIL_refFilename(filenames, argument);
continue;
}
/* "-" means stdin/stdout */
if (!strcmp(argument, "-")){
UTIL_refFilename(filenames, stdinmark);
continue;
}
/* Decode commands (note : aggregated commands are allowed) */
if (argument[0]=='-') {
if (argument[1]=='-') {
/* long commands (--long-word) */
if (!strcmp(argument, "--")) { nextArgumentsAreFiles=1; continue; } /* only file names allowed from now on */
if (!strcmp(argument, "--list")) { operation=zom_list; continue; }
if (!strcmp(argument, "--compress")) { operation=zom_compress; continue; }
if (!strcmp(argument, "--decompress")) { operation=zom_decompress; continue; }
if (!strcmp(argument, "--uncompress")) { operation=zom_decompress; continue; }
if (!strcmp(argument, "--force")) { FIO_overwriteMode(prefs); forceStdin=1; forceStdout=1; followLinks=1; allowBlockDevices=1; continue; }
if (!strcmp(argument, "--version")) { printVersion(); CLEAN_RETURN(0); }
if (!strcmp(argument, "--help")) { usage_advanced(programName); CLEAN_RETURN(0); }
if (!strcmp(argument, "--verbose")) { g_displayLevel++; continue; }
if (!strcmp(argument, "--quiet")) { g_displayLevel--; continue; }
if (!strcmp(argument, "--stdout")) { forceStdout=1; outFileName=stdoutmark; removeSrcFile=0; continue; }
if (!strcmp(argument, "--ultra")) { ultra=1; continue; }
if (!strcmp(argument, "--check")) { FIO_setChecksumFlag(prefs, 2); continue; }
if (!strcmp(argument, "--no-check")) { FIO_setChecksumFlag(prefs, 0); continue; }
if (!strcmp(argument, "--sparse")) { FIO_setSparseWrite(prefs, 2); continue; }
if (!strcmp(argument, "--no-sparse")) { FIO_setSparseWrite(prefs, 0); continue; }
if (!strcmp(argument, "--pass-through")) { FIO_setPassThroughFlag(prefs, 1); continue; }
if (!strcmp(argument, "--no-pass-through")) { FIO_setPassThroughFlag(prefs, 0); continue; }
if (!strcmp(argument, "--test")) { operation=zom_test; continue; }
if (!strcmp(argument, "--asyncio")) { FIO_setAsyncIOFlag(prefs, 1); continue;}
if (!strcmp(argument, "--no-asyncio")) { FIO_setAsyncIOFlag(prefs, 0); continue;}
if (!strcmp(argument, "--train")) { operation=zom_train; if (outFileName==NULL) outFileName=g_defaultDictName; continue; }
if (!strcmp(argument, "--no-dictID")) { FIO_setDictIDFlag(prefs, 0); continue; }
if (!strcmp(argument, "--keep")) { removeSrcFile=0; continue; }
if (!strcmp(argument, "--rm")) { removeSrcFile=1; continue; }
if (!strcmp(argument, "--priority=rt")) { setRealTimePrio = 1; continue; }
if (!strcmp(argument, "--show-default-cparams")) { showDefaultCParams = 1; continue; }
if (!strcmp(argument, "--content-size")) { contentSize = 1; continue; }
if (!strcmp(argument, "--no-content-size")) { contentSize = 0; continue; }
if (!strcmp(argument, "--adapt")) { adapt = 1; continue; }
if (!strcmp(argument, "--no-row-match-finder")) { useRowMatchFinder = ZSTD_ps_disable; continue; }
if (!strcmp(argument, "--row-match-finder")) { useRowMatchFinder = ZSTD_ps_enable; continue; }
if (longCommandWArg(&argument, "--adapt=")) { adapt = 1; if (!parseAdaptParameters(argument, &adaptMin, &adaptMax)) { badusage(programName); CLEAN_RETURN(1); } continue; }
if (!strcmp(argument, "--single-thread")) { nbWorkers = 0; singleThread = 1; continue; }
if (!strcmp(argument, "--format=zstd")) { suffix = ZSTD_EXTENSION; cType = FIO_zstdCompression; continue; }
if (!strcmp(argument, "--mmap-dict")) { mmapDict = ZSTD_ps_enable; continue; }
if (!strcmp(argument, "--no-mmap-dict")) { mmapDict = ZSTD_ps_disable; continue; }
#ifdef ZSTD_GZCOMPRESS
if (!strcmp(argument, "--format=gzip")) { suffix = GZ_EXTENSION; cType = FIO_gzipCompression; continue; }
if (exeNameMatch(programName, ZSTD_GZ)) { /* behave like gzip */
if (!strcmp(argument, "--best")) { dictCLevel = cLevel = 9; continue; }
if (!strcmp(argument, "--no-name")) { /* ignore for now */; continue; }
}
#endif
#ifdef ZSTD_LZMACOMPRESS
if (!strcmp(argument, "--format=lzma")) { suffix = LZMA_EXTENSION; cType = FIO_lzmaCompression; continue; }
if (!strcmp(argument, "--format=xz")) { suffix = XZ_EXTENSION; cType = FIO_xzCompression; continue; }
#endif
#ifdef ZSTD_LZ4COMPRESS
if (!strcmp(argument, "--format=lz4")) { suffix = LZ4_EXTENSION; cType = FIO_lz4Compression; continue; }
#endif
if (!strcmp(argument, "--rsyncable")) { rsyncable = 1; continue; }
if (!strcmp(argument, "--compress-literals")) { literalCompressionMode = ZSTD_ps_enable; continue; }
if (!strcmp(argument, "--no-compress-literals")) { literalCompressionMode = ZSTD_ps_disable; continue; }
if (!strcmp(argument, "--no-progress")) { progress = FIO_ps_never; continue; }
if (!strcmp(argument, "--progress")) { progress = FIO_ps_always; continue; }
if (!strcmp(argument, "--exclude-compressed")) { FIO_setExcludeCompressedFile(prefs, 1); continue; }
if (!strcmp(argument, "--fake-stdin-is-console")) { UTIL_fakeStdinIsConsole(); continue; }
if (!strcmp(argument, "--fake-stdout-is-console")) { UTIL_fakeStdoutIsConsole(); continue; }
if (!strcmp(argument, "--fake-stderr-is-console")) { UTIL_fakeStderrIsConsole(); continue; }
if (!strcmp(argument, "--trace-file-stat")) { UTIL_traceFileStat(); continue; }
/* long commands with arguments */
#ifndef ZSTD_NODICT
if (longCommandWArg(&argument, "--train-cover")) {
operation = zom_train;
if (outFileName == NULL)
outFileName = g_defaultDictName;
dict = cover;
/* Allow optional arguments following an = */
if (*argument == 0) { memset(&coverParams, 0, sizeof(coverParams)); }
else if (*argument++ != '=') { badusage(programName); CLEAN_RETURN(1); }
else if (!parseCoverParameters(argument, &coverParams)) { badusage(programName); CLEAN_RETURN(1); }
continue;
}
if (longCommandWArg(&argument, "--train-fastcover")) {
operation = zom_train;
if (outFileName == NULL)
outFileName = g_defaultDictName;
dict = fastCover;
/* Allow optional arguments following an = */
if (*argument == 0) { memset(&fastCoverParams, 0, sizeof(fastCoverParams)); }
else if (*argument++ != '=') { badusage(programName); CLEAN_RETURN(1); }
else if (!parseFastCoverParameters(argument, &fastCoverParams)) { badusage(programName); CLEAN_RETURN(1); }
continue;
}
if (longCommandWArg(&argument, "--train-legacy")) {
operation = zom_train;
if (outFileName == NULL)
outFileName = g_defaultDictName;
dict = legacy;
/* Allow optional arguments following an = */
if (*argument == 0) { continue; }
else if (*argument++ != '=') { badusage(programName); CLEAN_RETURN(1); }
else if (!parseLegacyParameters(argument, &dictSelect)) { badusage(programName); CLEAN_RETURN(1); }
continue;
}
#endif
if (longCommandWArg(&argument, "--threads")) { NEXT_UINT32(nbWorkers); continue; }
if (longCommandWArg(&argument, "--memlimit")) { NEXT_UINT32(memLimit); continue; }
if (longCommandWArg(&argument, "--memory")) { NEXT_UINT32(memLimit); continue; }
if (longCommandWArg(&argument, "--memlimit-decompress")) { NEXT_UINT32(memLimit); continue; }
if (longCommandWArg(&argument, "--block-size")) { NEXT_TSIZE(blockSize); continue; }
if (longCommandWArg(&argument, "--maxdict")) { NEXT_UINT32(maxDictSize); continue; }
if (longCommandWArg(&argument, "--dictID")) { NEXT_UINT32(dictID); continue; }
if (longCommandWArg(&argument, "--zstd=")) { if (!parseCompressionParameters(argument, &compressionParams)) { badusage(programName); CLEAN_RETURN(1); } ; cType = FIO_zstdCompression; continue; }
if (longCommandWArg(&argument, "--stream-size")) { NEXT_TSIZE(streamSrcSize); continue; }
if (longCommandWArg(&argument, "--target-compressed-block-size")) { NEXT_TSIZE(targetCBlockSize); continue; }
if (longCommandWArg(&argument, "--size-hint")) { NEXT_TSIZE(srcSizeHint); continue; }
if (longCommandWArg(&argument, "--output-dir-flat")) {
NEXT_FIELD(outDirName);
if (strlen(outDirName) == 0) {
DISPLAYLEVEL(1, "error: output dir cannot be empty string (did you mean to pass '.' instead?)\n");
CLEAN_RETURN(1);
}
continue;
}
if (longCommandWArg(&argument, "--auto-threads")) {
const char* threadDefault = NULL;
NEXT_FIELD(threadDefault);
if (strcmp(threadDefault, "logical") == 0)
defaultLogicalCores = 1;
continue;
}
#ifdef UTIL_HAS_MIRRORFILELIST
if (longCommandWArg(&argument, "--output-dir-mirror")) {
NEXT_FIELD(outMirroredDirName);
if (strlen(outMirroredDirName) == 0) {
DISPLAYLEVEL(1, "error: output dir cannot be empty string (did you mean to pass '.' instead?)\n");
CLEAN_RETURN(1);
}
continue;
}
#endif
#ifndef ZSTD_NOTRACE
if (longCommandWArg(&argument, "--trace")) { char const* traceFile; NEXT_FIELD(traceFile); TRACE_enable(traceFile); continue; }
#endif
if (longCommandWArg(&argument, "--patch-from")) { NEXT_FIELD(patchFromDictFileName); continue; }
if (longCommandWArg(&argument, "--long")) {
unsigned ldmWindowLog = 0;
ldmFlag = 1;
/* Parse optional window log */
if (*argument == '=') {
++argument;
ldmWindowLog = readU32FromChar(&argument);
} else if (*argument != 0) {
/* Invalid character following --long */
badusage(programName);
CLEAN_RETURN(1);
} else {
ldmWindowLog = g_defaultMaxWindowLog;
}
/* Only set windowLog if not already set by --zstd */
if (compressionParams.windowLog == 0)
compressionParams.windowLog = ldmWindowLog;
continue;
}
#ifndef ZSTD_NOCOMPRESS /* linking ZSTD_minCLevel() requires compression support */
if (longCommandWArg(&argument, "--fast")) {
/* Parse optional acceleration factor */
if (*argument == '=') {
U32 const maxFast = (U32)-ZSTD_minCLevel();
U32 fastLevel;
++argument;
fastLevel = readU32FromChar(&argument);
if (fastLevel > maxFast) fastLevel = maxFast;
if (fastLevel) {
dictCLevel = cLevel = -(int)fastLevel;
} else {
badusage(programName);
CLEAN_RETURN(1);
}
} else if (*argument != 0) {
/* Invalid character following --fast */
badusage(programName);
CLEAN_RETURN(1);
} else {
cLevel = -1; /* default for --fast */
}
continue;
}
#endif
if (longCommandWArg(&argument, "--filelist")) {
const char* listName;
NEXT_FIELD(listName);
UTIL_refFilename(file_of_names, listName);
continue;
}
/* fall-through, will trigger bad_usage() later on */
}
argument++;
while (argument[0]!=0) {
#ifndef ZSTD_NOCOMPRESS
/* compression Level */
if ((*argument>='0') && (*argument<='9')) {
dictCLevel = cLevel = (int)readU32FromChar(&argument);
continue;
}
#endif
switch(argument[0])
{
/* Display help */
case 'V': printVersion(); CLEAN_RETURN(0); /* Version Only */
case 'H': usage_advanced(programName); CLEAN_RETURN(0);
case 'h': usage(stdout, programName); CLEAN_RETURN(0);
/* Compress */
case 'z': operation=zom_compress; argument++; break;
/* Decoding */
case 'd':
#ifndef ZSTD_NOBENCH
benchParams.mode = BMK_decodeOnly;
if (operation==zom_bench) { argument++; break; } /* benchmark decode (hidden option) */
#endif
operation=zom_decompress; argument++; break;
/* Force stdout, even if stdout==console */
case 'c': forceStdout=1; outFileName=stdoutmark; removeSrcFile=0; argument++; break;
/* do not store filename - gzip compatibility - nothing to do */
case 'n': argument++; break;
/* Use file content as dictionary */
case 'D': argument++; NEXT_FIELD(dictFileName); break;
/* Overwrite */
case 'f': FIO_overwriteMode(prefs); forceStdin=1; forceStdout=1; followLinks=1; allowBlockDevices=1; argument++; break;
/* Verbose mode */
case 'v': g_displayLevel++; argument++; break;
/* Quiet mode */
case 'q': g_displayLevel--; argument++; break;
/* keep source file (default) */
case 'k': removeSrcFile=0; argument++; break;
/* Checksum */
case 'C': FIO_setChecksumFlag(prefs, 2); argument++; break;
/* test compressed file */
case 't': operation=zom_test; argument++; break;
/* destination file name */
case 'o': argument++; NEXT_FIELD(outFileName); break;
/* limit memory */
case 'M':
argument++;
memLimit = readU32FromChar(&argument);
break;
case 'l': operation=zom_list; argument++; break;
#ifdef UTIL_HAS_CREATEFILELIST
/* recursive */
case 'r': recursive=1; argument++; break;
#endif
#ifndef ZSTD_NOBENCH
/* Benchmark */
case 'b':
operation=zom_bench;
argument++;
break;
/* range bench (benchmark only) */
case 'e':
/* compression Level */
argument++;
cLevelLast = (int)readU32FromChar(&argument);
break;
/* Modify Nb Iterations (benchmark only) */
case 'i':
argument++;
bench_nbSeconds = readU32FromChar(&argument);
break;
/* cut input into blocks (benchmark only) */
case 'B':
argument++;
blockSize = readU32FromChar(&argument);
break;
/* benchmark files separately (hidden option) */
case 'S':
argument++;
separateFiles = 1;
break;
#endif /* ZSTD_NOBENCH */
/* nb of threads (hidden option) */
case 'T':
argument++;
nbWorkers = readU32FromChar(&argument);
break;
/* Dictionary Selection level */
case 's':
argument++;
dictSelect = readU32FromChar(&argument);
break;
/* Pause at the end (-p) or set an additional param (-p#) (hidden option) */
case 'p': argument++;
#ifndef ZSTD_NOBENCH
if ((*argument>='0') && (*argument<='9')) {
benchParams.additionalParam = (int)readU32FromChar(&argument);
} else
#endif
main_pause=1;
break;
/* Select compressibility of synthetic sample */
case 'P':
argument++;
compressibility = (double)readU32FromChar(&argument) / 100;
break;
/* unknown command */
default : badusage(programName); CLEAN_RETURN(1);
}
}
continue;
} /* if (argument[0]=='-') */
/* none of the above : add filename to list */
UTIL_refFilename(filenames, argument);
}
/* Welcome message (if verbose) */
DISPLAYLEVEL(3, WELCOME_MESSAGE);
#ifdef ZSTD_MULTITHREAD
if ((operation==zom_decompress) && (!singleThread) && (nbWorkers > 1)) {
DISPLAYLEVEL(2, "Warning : decompression does not support multi-threading\n");
}
if ((nbWorkers==0) && (!singleThread)) {
/* automatically set # workers based on # of reported cpus */
if (defaultLogicalCores) {
nbWorkers = (unsigned)UTIL_countLogicalCores();
DISPLAYLEVEL(3, "Note: %d logical core(s) detected \n", nbWorkers);
} else {
nbWorkers = (unsigned)UTIL_countPhysicalCores();
DISPLAYLEVEL(3, "Note: %d physical core(s) detected \n", nbWorkers);
}
}
#else
(void)singleThread; (void)nbWorkers; (void)defaultLogicalCores;
#endif
g_utilDisplayLevel = g_displayLevel;
#ifdef UTIL_HAS_CREATEFILELIST
if (!followLinks) {
unsigned u, fileNamesNb;
unsigned const nbFilenames = (unsigned)filenames->tableSize;
for (u=0, fileNamesNb=0; u<nbFilenames; u++) {
if ( UTIL_isLink(filenames->fileNames[u])
&& !UTIL_isFIFO(filenames->fileNames[u])
) {
DISPLAYLEVEL(2, "Warning : %s is a symbolic link, ignoring \n", filenames->fileNames[u]);
} else {
filenames->fileNames[fileNamesNb++] = filenames->fileNames[u];
} }
if (fileNamesNb == 0 && nbFilenames > 0) /* all names are eliminated */
CLEAN_RETURN(1);
filenames->tableSize = fileNamesNb;
} /* if (!followLinks) */
/* read names from a file */
if (file_of_names->tableSize) {
size_t const nbFileLists = file_of_names->tableSize;
size_t flNb;
for (flNb=0; flNb < nbFileLists; flNb++) {
FileNamesTable* const fnt = UTIL_createFileNamesTable_fromFileName(file_of_names->fileNames[flNb]);
if (fnt==NULL) {
DISPLAYLEVEL(1, "zstd: error reading %s \n", file_of_names->fileNames[flNb]);
CLEAN_RETURN(1);
}
filenames = UTIL_mergeFileNamesTable(filenames, fnt);
}
}
nbInputFileNames = filenames->tableSize; /* saving number of input files */
if (recursive) { /* at this stage, filenameTable is a list of paths, which can contain both files and directories */
UTIL_expandFNT(&filenames, followLinks);
}
#else
(void)followLinks;
#endif
if (operation == zom_list) {
#ifndef ZSTD_NODECOMPRESS
int const ret = FIO_listMultipleFiles((unsigned)filenames->tableSize, filenames->fileNames, g_displayLevel);
CLEAN_RETURN(ret);
#else
DISPLAYLEVEL(1, "file information is not supported \n");
CLEAN_RETURN(1);
#endif
}
/* Check if benchmark is selected */
if (operation==zom_bench) {
#ifndef ZSTD_NOBENCH
if (cType != FIO_zstdCompression) {
DISPLAYLEVEL(1, "benchmark mode is only compatible with zstd format \n");
CLEAN_RETURN(1);
}
benchParams.blockSize = blockSize;
benchParams.nbWorkers = (int)nbWorkers;
benchParams.realTime = (unsigned)setRealTimePrio;
benchParams.nbSeconds = bench_nbSeconds;
benchParams.ldmFlag = ldmFlag;
benchParams.ldmMinMatch = (int)g_ldmMinMatch;
benchParams.ldmHashLog = (int)g_ldmHashLog;
benchParams.useRowMatchFinder = (int)useRowMatchFinder;
if (g_ldmBucketSizeLog != LDM_PARAM_DEFAULT) {
benchParams.ldmBucketSizeLog = (int)g_ldmBucketSizeLog;
}
if (g_ldmHashRateLog != LDM_PARAM_DEFAULT) {
benchParams.ldmHashRateLog = (int)g_ldmHashRateLog;
}
benchParams.literalCompressionMode = literalCompressionMode;
if (cLevel > ZSTD_maxCLevel()) cLevel = ZSTD_maxCLevel();
if (cLevelLast > ZSTD_maxCLevel()) cLevelLast = ZSTD_maxCLevel();
if (cLevelLast < cLevel) cLevelLast = cLevel;
if (cLevelLast > cLevel)
DISPLAYLEVEL(3, "Benchmarking levels from %d to %d\n", cLevel, cLevelLast);
if (filenames->tableSize > 0) {
if(separateFiles) {
unsigned i;
for(i = 0; i < filenames->tableSize; i++) {
int c;
DISPLAYLEVEL(3, "Benchmarking %s \n", filenames->fileNames[i]);
for(c = cLevel; c <= cLevelLast; c++) {
operationResult = BMK_benchFilesAdvanced(&filenames->fileNames[i], 1, dictFileName, c, &compressionParams, g_displayLevel, &benchParams);
} }
} else {
for(; cLevel <= cLevelLast; cLevel++) {
operationResult = BMK_benchFilesAdvanced(filenames->fileNames, (unsigned)filenames->tableSize, dictFileName, cLevel, &compressionParams, g_displayLevel, &benchParams);
} }
} else {
for(; cLevel <= cLevelLast; cLevel++) {
operationResult = BMK_syntheticTest(cLevel, compressibility, &compressionParams, g_displayLevel, &benchParams);
} }
#else
(void)bench_nbSeconds; (void)blockSize; (void)setRealTimePrio; (void)separateFiles; (void)compressibility;
#endif
goto _end;
}
/* Check if dictionary builder is selected */
if (operation==zom_train) {
#ifndef ZSTD_NODICT
ZDICT_params_t zParams;
zParams.compressionLevel = dictCLevel;
zParams.notificationLevel = (unsigned)g_displayLevel;
zParams.dictID = dictID;
if (dict == cover) {
int const optimize = !coverParams.k || !coverParams.d;
coverParams.nbThreads = (unsigned)nbWorkers;
coverParams.zParams = zParams;
operationResult = DiB_trainFromFiles(outFileName, maxDictSize, filenames->fileNames, (int)filenames->tableSize, blockSize, NULL, &coverParams, NULL, optimize, memLimit);
} else if (dict == fastCover) {
int const optimize = !fastCoverParams.k || !fastCoverParams.d;
fastCoverParams.nbThreads = (unsigned)nbWorkers;
fastCoverParams.zParams = zParams;
operationResult = DiB_trainFromFiles(outFileName, maxDictSize, filenames->fileNames, (int)filenames->tableSize, blockSize, NULL, NULL, &fastCoverParams, optimize, memLimit);
} else {
ZDICT_legacy_params_t dictParams;
memset(&dictParams, 0, sizeof(dictParams));
dictParams.selectivityLevel = dictSelect;
dictParams.zParams = zParams;
operationResult = DiB_trainFromFiles(outFileName, maxDictSize, filenames->fileNames, (int)filenames->tableSize, blockSize, &dictParams, NULL, NULL, 0, memLimit);
}
#else
(void)dictCLevel; (void)dictSelect; (void)dictID; (void)maxDictSize; /* not used when ZSTD_NODICT set */
DISPLAYLEVEL(1, "training mode not available \n");
operationResult = 1;
#endif
goto _end;
}
#ifndef ZSTD_NODECOMPRESS
if (operation==zom_test) { FIO_setTestMode(prefs, 1); outFileName=nulmark; removeSrcFile=0; } /* test mode */
#endif
/* No input filename ==> use stdin and stdout */
if (filenames->tableSize == 0) {
/* It is possible that the input
was a number of empty directories. In this case
stdin and stdout should not be used */
if (nbInputFileNames > 0 ){
DISPLAYLEVEL(1, "please provide correct input file(s) or non-empty directories -- ignored \n");
CLEAN_RETURN(0);
}
UTIL_refFilename(filenames, stdinmark);
}
if (filenames->tableSize == 1 && !strcmp(filenames->fileNames[0], stdinmark) && !outFileName)
outFileName = stdoutmark; /* when input is stdin, default output is stdout */
/* Check if input/output defined as console; trigger an error in this case */
if (!forceStdin
&& (UTIL_searchFileNamesTable(filenames, stdinmark) != -1)
&& UTIL_isConsole(stdin) ) {
DISPLAYLEVEL(1, "stdin is a console, aborting\n");
CLEAN_RETURN(1);
}
if ( (!outFileName || !strcmp(outFileName, stdoutmark))
&& UTIL_isConsole(stdout)
&& (UTIL_searchFileNamesTable(filenames, stdinmark) != -1)
&& !forceStdout
&& operation!=zom_decompress ) {
DISPLAYLEVEL(1, "stdout is a console, aborting\n");
CLEAN_RETURN(1);
}
#ifndef ZSTD_NOCOMPRESS
/* check compression level limits */
{ int const maxCLevel = ultra ? ZSTD_maxCLevel() : ZSTDCLI_CLEVEL_MAX;
if (cLevel > maxCLevel) {
DISPLAYLEVEL(2, "Warning : compression level higher than max, reduced to %i \n", maxCLevel);
cLevel = maxCLevel;
} }
#endif
if (showDefaultCParams) {
if (operation == zom_decompress) {
DISPLAYLEVEL(1, "error : can't use --show-default-cparams in decompression mode \n");
CLEAN_RETURN(1);
}
}
if (dictFileName != NULL && patchFromDictFileName != NULL) {
DISPLAYLEVEL(1, "error : can't use -D and --patch-from=# at the same time \n");
CLEAN_RETURN(1);
}
if (patchFromDictFileName != NULL && filenames->tableSize > 1) {
DISPLAYLEVEL(1, "error : can't use --patch-from=# on multiple files \n");
CLEAN_RETURN(1);
}
/* No status message by default when output is stdout */
hasStdout = outFileName && !strcmp(outFileName,stdoutmark);
if (hasStdout && (g_displayLevel==2)) g_displayLevel=1;
/* when stderr is not the console, do not pollute it with progress updates (unless requested) */
if (!UTIL_isConsole(stderr) && (progress!=FIO_ps_always)) progress=FIO_ps_never;
FIO_setProgressSetting(progress);
/* don't remove source files when output is stdout */;
if (hasStdout && removeSrcFile) {
DISPLAYLEVEL(3, "Note: src files are not removed when output is stdout \n");
removeSrcFile = 0;
}
FIO_setRemoveSrcFile(prefs, removeSrcFile);
/* IO Stream/File */
FIO_setHasStdoutOutput(fCtx, hasStdout);
FIO_setNbFilesTotal(fCtx, (int)filenames->tableSize);
FIO_determineHasStdinInput(fCtx, filenames);
FIO_setNotificationLevel(g_displayLevel);
FIO_setAllowBlockDevices(prefs, allowBlockDevices);
FIO_setPatchFromMode(prefs, patchFromDictFileName != NULL);
FIO_setMMapDict(prefs, mmapDict);
if (memLimit == 0) {
if (compressionParams.windowLog == 0) {
memLimit = (U32)1 << g_defaultMaxWindowLog;
} else {
memLimit = (U32)1 << (compressionParams.windowLog & 31);
} }
if (patchFromDictFileName != NULL)
dictFileName = patchFromDictFileName;
FIO_setMemLimit(prefs, memLimit);
if (operation==zom_compress) {
#ifndef ZSTD_NOCOMPRESS
FIO_setCompressionType(prefs, cType);
FIO_setContentSize(prefs, contentSize);
FIO_setNbWorkers(prefs, (int)nbWorkers);
FIO_setBlockSize(prefs, (int)blockSize);
if (g_overlapLog!=OVERLAP_LOG_DEFAULT) FIO_setOverlapLog(prefs, (int)g_overlapLog);
FIO_setLdmFlag(prefs, (unsigned)ldmFlag);
FIO_setLdmHashLog(prefs, (int)g_ldmHashLog);
FIO_setLdmMinMatch(prefs, (int)g_ldmMinMatch);
if (g_ldmBucketSizeLog != LDM_PARAM_DEFAULT) FIO_setLdmBucketSizeLog(prefs, (int)g_ldmBucketSizeLog);
if (g_ldmHashRateLog != LDM_PARAM_DEFAULT) FIO_setLdmHashRateLog(prefs, (int)g_ldmHashRateLog);
FIO_setAdaptiveMode(prefs, adapt);
FIO_setUseRowMatchFinder(prefs, (int)useRowMatchFinder);
FIO_setAdaptMin(prefs, adaptMin);
FIO_setAdaptMax(prefs, adaptMax);
FIO_setRsyncable(prefs, rsyncable);
FIO_setStreamSrcSize(prefs, streamSrcSize);
FIO_setTargetCBlockSize(prefs, targetCBlockSize);
FIO_setSrcSizeHint(prefs, srcSizeHint);
FIO_setLiteralCompressionMode(prefs, literalCompressionMode);
FIO_setSparseWrite(prefs, 0);
if (adaptMin > cLevel) cLevel = adaptMin;
if (adaptMax < cLevel) cLevel = adaptMax;
/* Compare strategies constant with the ground truth */
{ ZSTD_bounds strategyBounds = ZSTD_cParam_getBounds(ZSTD_c_strategy);
assert(ZSTD_NB_STRATEGIES == strategyBounds.upperBound);
(void)strategyBounds; }
if (showDefaultCParams || g_displayLevel >= 4) {
size_t fileNb;
for (fileNb = 0; fileNb < (size_t)filenames->tableSize; fileNb++) {
if (showDefaultCParams)
printDefaultCParams(filenames->fileNames[fileNb], dictFileName, cLevel);
if (g_displayLevel >= 4)
printActualCParams(filenames->fileNames[fileNb], dictFileName, cLevel, &compressionParams);
}
}
if (g_displayLevel >= 4)
FIO_displayCompressionParameters(prefs);
if ((filenames->tableSize==1) && outFileName)
operationResult = FIO_compressFilename(fCtx, prefs, outFileName, filenames->fileNames[0], dictFileName, cLevel, compressionParams);
else
operationResult = FIO_compressMultipleFilenames(fCtx, prefs, filenames->fileNames, outMirroredDirName, outDirName, outFileName, suffix, dictFileName, cLevel, compressionParams);
#else
/* these variables are only used when compression mode is enabled */
(void)contentSize; (void)suffix; (void)adapt; (void)rsyncable;
(void)ultra; (void)cLevel; (void)ldmFlag; (void)literalCompressionMode;
(void)targetCBlockSize; (void)streamSrcSize; (void)srcSizeHint;
(void)ZSTD_strategyMap; (void)useRowMatchFinder; (void)cType;
DISPLAYLEVEL(1, "Compression not supported \n");
#endif
} else { /* decompression or test */
#ifndef ZSTD_NODECOMPRESS
if (filenames->tableSize == 1 && outFileName) {
operationResult = FIO_decompressFilename(fCtx, prefs, outFileName, filenames->fileNames[0], dictFileName);
} else {
operationResult = FIO_decompressMultipleFilenames(fCtx, prefs, filenames->fileNames, outMirroredDirName, outDirName, outFileName, dictFileName);
}
#else
DISPLAYLEVEL(1, "Decompression not supported \n");
#endif
}
_end:
FIO_freePreferences(prefs);
FIO_freeContext(fCtx);
if (main_pause) waitEnter();
UTIL_freeFileNamesTable(filenames);
UTIL_freeFileNamesTable(file_of_names);
#ifndef ZSTD_NOTRACE
TRACE_finish();
#endif
return operationResult;
}
``` |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="ie=7"/>
<title> CMS500 | WooYun-2015-102271 | WooYun.org </title>
<meta name="author" content="80sec"/>
<meta name="copyright" content="path_to_url"/>
<meta name="keywords" content=",,,wooyun,,web,,,,,"/>
<meta name="description" content="
rank|WooYun,,,"/>
<link rel="icon" href="path_to_url" sizes="32x32" />
<link href="../css/style.css?v=201501291909" rel="stylesheet" type="text/css"/>
<script src="path_to_url" type="text/javascript"></script>
</head>
<body id="bugDetail">
<style>
#myBugListTab { position:relative; display:inline; border:none }
#myBugList { position:absolute; display:none; margin-left:309px; * margin-left:-60px; * margin-top:18px ; border:#c0c0c0 1px solid; padding:2px 7px; background:#FFF }
#myBugList li { text-align:left }
</style>
<script type="text/javascript">
$(document).ready(function(){
if ( $("#__cz_push_d_object_box__") ) {
$("script[src^='path_to_url").attr("src"," ").remove();
$("#__cz_push_d_object_box__").empty().remove();
$("a[id^='__czUnion_a']").attr("href","#").remove();
}
if ( $("#ooDiv") ) {
$("#ooDiv").empty().parent("div").remove();
}
$("#myBugListTab").toggle(
function(){
$("#myBugList").css("display","block");
},
function(){
$("#myBugList").css("display","none");
}
);
if ( $(window).scrollTop() > 120 ) {
$("#back-to-top").fadeIn(300);
} else {
$("#back-to-top").fadeOut(300);
}
$(window).scroll(function(){
if ( $(window).scrollTop() > 120 ) {
$("#back-to-top").fadeIn(300);
} else {
$("#back-to-top").fadeOut(300);
}
});
$("#back-to-top a").click(function() {
$('body,html').animate({scrollTop:0},300);
return false;
});
$("#go-to-comment a").click(function() {
var t = $("#replys").offset().top - 52;
$('body,html').animate({scrollTop:t},300);
return false;
});
});
function gofeedback(){
var bugid=$("#fbid").val();
if(bugid){
var url="/feedback.php?bugid="+bugid;
}else{
var url="/feedback.php"
}
window.open(url);
}
</script>
<div class="go-to-wrapper">
<ul class="go-to">
<li id="go-to-comment" title=""><a href="wooyun-2015-0102271#"></a></li>
<li id="go-to-feedback" title=""><a href="javascript:void(0)" onclick="gofeedback()"></a></li>
<li id="back-to-top" title=""><a href="wooyun-2015-0102271#"></a></li>
</ul>
</div>
<div class="banner">
<div class="logo">
<h1>WooYun.org</h1>
<div class="weibo"><iframe width="136" height="24" frameborder="0" allowtransparency="true" marginwidth="0" marginheight="0" scrolling="no" border="0" src="path_to_url"></iframe>
</div>
<div class="wxewm">
<a class="ewmthumb" href="javascript:void(0)"><span><img src="path_to_url"width="220" border="0"></span><img src="path_to_url"width="22" border="0"></a>
</div>
</div>
<div class="login">
<a href="path_to_url"></a> | <a href="path_to_url" class="reg"></a>
</div>
</div>
<div class="nav" id="nav_sc">
<ul>
<li><a href="path_to_url"></a></li>
<li><a href="path_to_url"></a></li>
<li><a href="path_to_url"></a></li>
<li><a href="path_to_url"></a></li>
<li><a href="path_to_url"></a></li>
<li><a href="path_to_url"></a></li>
<li class="new"><a href="path_to_url"></a></li>
<!--li><a href="/corp_actions"></a></li-->
<!--<li><a target='_blank' href="path_to_url"></a></li>-->
<li><a href="path_to_url" target="_blank" style="color:rgb(246,172,110);font-size:14px;font-weight:blod"></a></li>
<!--li><a href="/job/"></a></li-->
<li><a href="path_to_url" target="_blank"></a></li>
<li><a href="path_to_url" target="_blank"></a></li>
<li><a href="path_to_url"></a></li>
</ul>
<form action="path_to_url" method="post" id="searchbox">
<input type="text" name="q" id="search_input" />
<input type="submit" value="" id="search_button" />
</form>
</div>
<div class="bread" style="padding-top: 4px;">
<div style="float:left"><a href="path_to_url">WooYun</a> >> <a href="wooyun-2015-0102271#"></a></div>
</div>
<script language="javascript">
var _LANGJS = {"COMMENT_LIKE_SELF":"\u4e0d\u80fd\u81ea\u5df1\u8d5e\u81ea\u5df1\u7684\u8bc4\u8bba","COMMENT_LIKED":"\u5df2\u8d5e\u6b64\u8bc4\u8bba","COMMENT_NOT":"\u6b64\u8bc4\u8bba\u4e0d\u5b58\u5728","COMMENT_FILL":"\u8bf7\u8f93\u5165\u8bc4\u8bba\u5185\u5bb9","COMMENT_STAT":"\u8bc4\u8bba\u4e0d\u80fd\u4e3a\u7a7a","COMMENT_LOGIN":"\u767b\u9646\u540e\u624d\u80fd\u8bc4\u8bba","COMMENT_GOOD_DONE":"\u5df2\u8d5e\u8fc7\u6b64\u6761\u8bc4\u8bba","COMMENT_SELF":"\u4e0d\u80fd\u8bc4\u4ef7\u81ea\u5df1\u53d1\u5e03\u7684\u8bc4\u8bba","COMMENT_CLICK_FILL":"\u70b9\u51fb\u8f93\u5165\u8bc4\u8bba\u5185\u5bb9","FAIL":"\u64cd\u4f5c\u5931\u8d25","FAIL_MANAGE":"\u64cd\u4f5c\u5931\u8d25\uff0c\u8bf7\u4e0e\u7ba1\u7406\u5458\u8054\u7cfb","FAIL_NO_WHITEHATS":"\u64cd\u4f5c\u5931\u8d25\uff0c\u6ca1\u6709\u6b64\u767d\u5e3d\u5b50","FAIL_NO_CORPS":"\u64cd\u4f5c\u5931\u8d25\uff0c\u6ca1\u6709\u6b64\u5382\u5546","BUGS_CORPS_SELECT":"\u9009\u62e9\u5382\u5546(\u53ef\u8f93\u5165\u5173\u952e\u5b57\u641c\u7d22)","BUGS_CORPS_OTHER":"Other\/\u5176\u5b83\u5382\u5546","BUGS_CORPS_TYPE_STAT":"\u8be5\u6f0f\u6d1e\u5bf9\u5e94\u5382\u5546\u7684\u7c7b\u578b","BUGS_CORPS_NAME_STAT":"\u8be5\u6f0f\u6d1e\u5bf9\u5e94\u5382\u5546\u7684\u540d\u79f0","BUGS_TYPE_STAT":"\u8be5\u6f0f\u6d1e\u7684\u7c7b\u578b\uff0c\u4e71\u9009\u6263\u5206","BUGS_TITLE_STAT":"\u8be5\u6f0f\u6d1e\u7684\u6807\u9898","BUGS_HARMLEVEL_STAT":"\u8be5\u6f0f\u6d1e\u7684\u5371\u5bb3\u7b49\u7ea7","BUGS_DESCRIPTION_STAT":"\u5bf9\u6f0f\u6d1e\u7684\u7b80\u8981\u63cf\u8ff0\uff0c\u53ef\u4ee5\u7b80\u5355\u63cf\u8ff0\u6f0f\u6d1e\u7684\u5371\u5bb3\u548c\u6210\u56e0\uff0c\u4e0d\u8981\u900f\u6f0f\u6f0f\u6d1e\u7684\u7ec6\u8282","BUGS_CONTENT_STAT":"\u5bf9\u6f0f\u6d1e\u7684\u8be6\u7ec6\u63cf\u8ff0\uff0c\u8bf7\u5c3d\u91cf\u591a\u7684\u6df1\u5165\u7ec6\u8282\u4ee5\u65b9\u4fbf\u5bf9\u6f0f\u6d1e\u7684\u7406\u89e3\uff0c\u652f\u6301<code><\/code>\u6807\u7b7e","BUGS_POC_STAT":"\u7ed9\u51fa\u95ee\u9898\u7684\u6982\u5ff5\u6027\u8bc1\u660e\uff0c\u652f\u6301<code><\/code>\u6807\u7b7e","BUGS_PATCH_STAT":"\u5efa\u8bae\u7684\u6f0f\u6d1e\u4fee\u590d\u65b9\u6848\uff0c\u652f\u6301<code><\/code>\u6807\u7b7e","BUGS_TEST_STAT":"\u7ed9\u51fa\u95ee\u9898\u7684\u6807\u51c6\u6d4b\u8bd5\u4ee3\u7801\u4ee5\u66f4\u4e3a\u65b9\u4fbf\u7684\u5bf9\u6f0f\u6d1e\u8fdb\u884c\u6d4b\u8bd5\u548c\u9a8c\u8bc1\uff0c\u6d4b\u8bd5\u4ee3\u7801\u5bf9\u5916\u9ed8\u8ba4\u4e0d\u663e\u793a\uff0c<br\/>\u5176\u4ed6\u767d\u5e3d\u5b50\u652f\u4ed8\u4e4c\u4e91\u5e01\u67e5\u770b\u540e\u4f60\u5c06\u83b7\u5f97\u989d\u5916\u4e4c\u4e91\u5e01\uff0c<br\/>\u540c\u65f6\u4e5f\u5c06\u5728\u4f60\u7684\u4e2a\u4eba\u9875\u9762\u4f53\u73b0\u4f60\u7684\u6d4b\u8bd5\u4ee3\u7801\u7f16\u5199\u80fd\u529b\u3002","BUGS_QUESTION_SELECT":"\u8bf7\u9009\u62e9\u95ee\u9898\u5382\u5546","BUGS_TITLE_NOTICE":"\u6f0f\u6d1e\u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a","BUGS_RANK_NOTICE1":"\u8bf7\u586b\u5199\u81ea\u8bc4Rank","BUGS_RANK_NOTICE2":"\u81ea\u8bc4Rank\u4e3a\u5927\u4e8e0\u7684\u6570\u5b57","BUGS_TYPE_SELECT":"\u8bf7\u9009\u62e9\u6f0f\u6d1e\u7c7b\u578b","BUGS_TYPE_NOTICE":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u7c7b\u578b","BUGS_HARMLEVEL_SELECT":"\u9009\u62e9\u6f0f\u6d1e\u7b49\u7ea7","BUGS_HARMLEVEL_NOTICE":"\u8bf7\u9009\u62e9\u6f0f\u6d1e\u7b49\u7ea7","BUGS_HARMLEVEL_LOWER":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u4f4e \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a1-5","BUGS_HARMLEVEL_MIDDLE":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u4e2d \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a5-10","BUGS_HARMLEVEL_HIGH":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u9ad8 \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a10-20","BUGS_AREA_SELECT":"\u8bf7\u9009\u62e9\u5730\u533a\uff01","BUGS_DOMAILS":"\u6f0f\u6d1e\u6240\u5728\u57df\u540d(\u5982qq.com)","BUGS_DOMAIN_FILL":"\u8bf7\u586b\u5199\u57df\u540d\uff01","BUGS_DETAIL_MORE":"\u67e5\u770b\u8be6\u60c5","BUGS_IGNORE_DAYS":"\u8ddd\u6f0f\u6d1e\u5ffd\u7565\u8fd8\u6709","BUGS_CONFIRM_QUICK":"\u8bf7\u5382\u5546\u5c3d\u5feb","BUGS":"\u6f0f\u6d1e","BUGS_PUBLIC_DAYS":"\u8ddd\u6f0f\u6d1e\u5411\u516c\u4f17\u516c\u5f00\u8fd8\u6709","BUGS_IGNORE_PUBLIC_DAYS":"\u8ddd\u6f0f\u6d1e\u672a\u786e\u8ba4\u65e0\u5f71\u54cd\u5ffd\u7565\u8fd8\u6709","BUGS_REPAIR_QUICK":"\u8bf7\u5382\u5546\u5c3d\u5feb\u4fee\u590d\u6f0f\u6d1e","BUGS_HARMLEVEL_REMIND":"\u8bf7\u9009\u62e9\u5371\u5bb3\u7b49\u7ea7","BUGS_RANK_STAT":"rank\u4e3a1-20\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT1":"rank\u4e3a1-5\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT2":"rank\u4e3a5-10\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT3":"rank\u4e3a10-20\u7684\u6b63\u6574\u6570","BUGS_COMPLEMENT_REASON":"\u6dfb\u52a0\u5bf9\u6f0f\u6d1e\u7684\u8865\u5145\u8bf4\u660e\u4ee5\u53ca\u505a\u51fa\u8bc4\u4ef7\u7684\u7406\u7531","BUGS_REPLY_FILL":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u56de\u590d","BUGS_IGNORE_CONFIRM":"\u786e\u5b9a\u5ffd\u7565\u6b64\u6f0f\u6d1e\u5417","BUGS_STATUS_NEW_UPDATE":"\u66f4\u6539\u6f0f\u6d1e\u7684\u6700\u65b0\u72b6\u6001","BUGS_STATUS_FILL":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u72b6\u6001","BUGS_PUBLIC_ADVANCE":"\u786e\u5b9a\u63d0\u524d\u516c\u5f00\u6b64\u6f0f\u6d1e\u5417","BUGS_COUNT":"\u6f0f\u6d1e\u6570","BUGS_REPLY_HAT":"\u56de\u590d\u6b64\u4eba","BUGS_DELAY_CONFIRM":"\u786e\u5b9a\u8981\u5ef6\u671f\u4e48?","BUGS_DELAY":"\u7533\u8bf7\u5ef6\u671f","BUGS_DELAY_DONE":"\u5df2\u7ecf\u5ef6\u671f","BUGS_RISK_CONFIM":"\u786e\u5b9a\u6b64\u6f0f\u6d1e\u4e3a\u9ad8\u5371\u5417?","BUGS_NULL_EDITE":"\u7559\u7a7a\u8868\u793a\u4e0d\u4fee\u6539","BUGS_DONE_CONFIRM":"\u8be5\u64cd\u4f5c\u6682\u65f6\u4e0d\u53ef\u9006\uff0c\u786e\u5b9a\uff1f","BUGS_UPUBLIC":"\u4f60\u4ece\u53d1\u5e03\u7684\u6f0f\u6d1e","BUGS_UPUBLIC1":"\u91cc\u53c8\u83b7\u5f97\u4e86","BUGS_PRECHECK":"\u6709\u4eba\u63d0\u524d\u67e5\u770b\u4e86\u4f60\u53d1\u5e03\u7684\u6f0f\u6d1e","BUGS_PRECHECK_UNPUBLIC":"\u63d0\u524d\u67e5\u770b\u672a\u516c\u5f00\u6f0f\u6d1e","BUGS_NUM":"\u6f0f\u6d1e\u6570\u91cf","RANKAVG":"\u4eba\u5747\u8d21\u732e Rank","CAPTCHA_GET":"\u83b7\u53d6\u9a8c\u8bc1\u7801","CAPTCHA_FILL":"\u8bf7\u8f93\u5165\u56fe\u7247\u4e2d\u7684\u9a8c\u8bc1\u7801","CAPTCHA_NULL":"\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a","CAPTCHA_ERROR":"\u9a8c\u8bc1\u7801\u8f93\u5165\u9519\u8bef","CAPTCHA_PHONE_ERROR":"\u624b\u673a\u9a8c\u8bc1\u7801\u4e0d\u6b63\u786e","CAPTCHA_PHONE_SEND":"\u9a8c\u8bc1\u7801\u5df2\u53d1\u9001\u5230\u4f60\u7684\u624b\u673a\u4e0a\u8bf7\u6ce8\u610f\u67e5\u6536","CAPTCHA_SEND_AGAIN":"\u540e\u53ef\u91cd\u53d1","CAPTCHA_SEND_OVER":"\u77ed\u4fe1\u5df2\u53d1\u9001\u6210\u529f,\u9a8c\u8bc1\u7801\u533a\u5206\u5927\u5c0f\u5199","CAPTCHA_PHONE_NO":"\u4e0d\u9700\u8981\u77ed\u4fe1\u9a8c\u8bc1\u7801","CAPTCHA_PHONE_NULL":"\u77ed\u4fe1\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","PHONE_TYPE_ERROR":"\u7535\u8bdd\u683c\u5f0f\u4e0d\u5bf9","PHONE_NOTING":"\u7535\u8bdd\u4e0d\u80fd\u4e3a\u7a7a","PHONE_FILL":"\u8bf7\u586b\u5199\u624b\u673a\u53f7","PHONE_CAPTCHA_NOTING":"\u624b\u673a\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_NOTING":"\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_CONFIRM_NOTING":"\u5bc6\u7801\u786e\u8ba4\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_PAY_LESS":"\u652f\u4ed8\u5bc6\u7801\u4e0d\u80fd\u5c11\u4e8e6\u4f4d","PASSWORD_FILL_DIFFERENT":"\u8f93\u5165\u7684\u4e24\u6b21\u5bc6\u7801\u4e0d\u4e00\u6837","PASSWORD_PAY_LOGIN_SAME":"\u652f\u4ed8\u5bc6\u7801\u4e0d\u80fd\u540c\u767b\u9646\u5bc6\u7801\u4e00\u6837","PASSWORD_PAY_FILL":"\u8bf7\u586b\u5199\u652f\u4ed8\u5bc6\u7801","PASSWORD_LENGH_LESS":"\u5bc6\u7801\u957f\u5ea6\u4e0d\u80fd\u5c0f\u4e8e6\u4f4d","PASSWORD_SEND_OK":"\u53d1\u9001\u5bc6\u7801\u90ae\u4ef6\u6210\u529f","PASSWORD_OFER_WRROR":"\u60a8\u63d0\u4f9b\u7684\u627e\u56de\u5bc6\u7801\u4fe1\u606f\u4e0d\u6b63\u786e","PASSWORD_OLD_ERROR":"\u539f\u5bc6\u7801\u9519\u8bef","PASSWORD_UPDATE_OK":"\u5bc6\u7801\u4fee\u6539\u6210\u529f","EMAILL_USED":"\u90ae\u7bb1\u5df2\u88ab\u5360\u7528","EMAILL_NULL":"\u90ae\u7bb1\u4e0d\u80fd\u4e3a\u7a7a\uff01","NOTING":"\u65e0","LEAVEWORDS_NULL":"\u7559\u8a00\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a","LOGIN_FIRST":"\u8bf7\u5148\u767b\u5f55","CONFIRM":"\u786e\u8ba4","YEAR":"\u5e74","DAYS":"\u5929","HOURS":"\u65f6","HOUR":"\u5c0f\u65f6","MINUTE":"\u5206","SECOND":"\u79d2","IS":"\u4e3a","ONE":"\u4e00","TWE":"\u4e8c","TIMES":"\u6b21","COUNTENT_UPDATE_FILL":"\u8bf7\u586b\u5199\u4fee\u6539\u5185\u5bb9","CANCLE":"\u53d6\u6d88","OPERATE_CONFIRM":"\u786e\u5b9a\u6b64\u64cd\u4f5c\u5417\uff1f","USERNAME":"\u59d3\u540d","SUCCESS":"\u64cd\u4f5c\u6210\u529f","FAIL_REPLY":"\u64cd\u4f5c\u5931\u8d25\uff0c\u8bf7\u586b\u5199\u56de\u590d\u4fe1\u606f","SEND_OK":"\u53d1\u9001\u6210\u529f","PHONE_BIND_DONE":"\u5df2\u7ed1\u5b9a","TAGS_USE":"\u4f7f\u7528\u6b64\u6807\u7b7e","WHITEHATS":"\u767d\u5e3d\u5b50","WHITEHATS_VERTIFY":"\u8ba4\u8bc1\u767d\u5e3d\u5b50","WHITEHATES_NAME":"\u8bf7\u8f93\u5165\u767d\u5e3d\u5b50\u7528\u6237\u540d","USER_ZONE_EDIT":"\u7f16\u8f91\u9886\u57df","WB_TRANSFER":"\u6211\u8981\u8f6c\u8d26","WB_TRANSFER_CANCEL":"\u53d6\u6d88\u8f6c\u8d26","WB_NUM":"\u8bf7\u8f93\u5165\u4e4c\u4e91\u5e01\u6570\u91cf","WB_NUMBER":"\u4e4c\u4e91\u5e01\u6570\u91cf\u4e3a\u6b63\u6574\u6570","WB_NEED_LESS":"\u81f3\u5c11\u9700\u8981","WB_NEED_SUM":"\u4e2a\u4e4c\u4e91\u5e01","WB_TRANSFER_OK":"\u8f6c\u8d26\u6210\u529f","WB_MY":"\u6211\u7684\u4e4c\u4e91\u5e01","WB_CAN_USE":"\u53ef\u7528\u7684\u4e4c\u4e91\u5e01","WB_FROZEN":"\u51bb\u7ed3\u7684\u4e4c\u4e91\u5e01","WB_LACK":"\u4e4c\u4e91\u5e01\u4e0d\u8db3","WB_SET_SCOPE":"\u51fa\u4ef7\u8303\u56f4\u4e3a","WB_BIND_CANCEL_STAT":"(\u70b9\u51fb\u201c\u53d6\u6d88\u7ed1\u5b9a\u201d\u83b7\u53d6\u9a8c\u8bc1\u7801\uff0c\u5411\u4e4c\u4e91\u516c\u4f17\u8d26\u53f7\u53d1\u9001\u9a8c\u8bc1\u7801\u53d6\u6d88\u5fae\u4fe1\u7ed1\u5b9a\uff0c\u7136\u540e\u5237\u65b0\u672c\u9875\u9762)","EMAIL_LOGIN_MEXT":"\u90ae\u4ef6\u53d1\u9001\u6210\u529f,\u8bf7\u767b\u9646\u60a8\u7684\u90ae\u7bb1\u8fdb\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c","EMAIL_UPDATE_LOGIN_MEXT":"\u66f4\u6539\u8bf7\u6c42\u5df2\u53d1\u9001\u5230\u90ae\u7bb1,\u8bf7\u767b\u9646\u60a8\u7684\u90ae\u7bb1\u8fdb\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c","EMAIL_SEND_OK":"\u90ae\u4ef6\u53d1\u9001\u6210\u529f\uff01","CORPS":"\u5382\u5546","TEAM_NAME_NULL":"\u56e2\u961f\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a","TEAM_HOMEPAGE_NULL":"\u56e2\u961f\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","TEAM_QQ_NULL":"\u56e2\u961fqq\u4e0d\u80fd\u4e3a\u7a7a","TEAM_BRIEF_NULL":"\u56e2\u961f\u7b80\u4ecb\u4e0d\u80fd\u4e3a\u7a7a","TEAM_EXIST":"\u56e2\u961f\u5df2\u5b58\u5728","TEAM_DISMISS_CONFIRM":"\u786e\u5b9a\u89e3\u6563\u672c\u56e2\u961f\u5417?","TEAM_NAME":"\u56e2\u961f\u540d\u79f0","TEAM_CREATER":"\u521b\u5efa\u4eba","TEAM_DONATER":"\u56e2\u961f\u4e3b\u529b","TEAM_MUMBER":"\u4eba\u6570","TEAM":"\u56e2\u961f","REGISTER_BRIEF":"*\u8bf7\u8f93\u5165\u4e2a\u4eba\u7684\u7b80\u8981\u4ecb\u7ecd","REGISTER_TYPE":"*\u9009\u62e9\u6ce8\u518c\u7c7b\u578b","REGISTER_CORPS_BRIEF":"*\u8f93\u5165\u5382\u5546\u7684\u7b80\u8981\u4ecb\u7ecd","REGISTER_EMAIL":"*\u5382\u5546\u90ae\u4ef6\u5fc5\u987b\u4e3a\u4f01\u4e1a\u4f7f\u7528\u7684\u6b63\u5f0f\u90ae\u4ef6","REGISTER_NAME_NULL":"\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_HOMEPAGE_NULL":"\u4e2a\u4eba\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_BREIF_NULL":"\u7b80\u8981\u4ecb\u7ecd\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_CORPNAME_NULL":"\u5382\u5546\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_CORPHOMEPAGE_NULL":"\u5b98\u65b9\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_LAW_AGREE":"\u540c\u610f\u300a\u4fe1\u606f\u5b89\u5168\u76f8\u5173\u4fdd\u62a4\u548c\u58f0\u660e\u300b\u624d\u80fd\u6ce8\u518c","ATTENTION":"\u5173\u6ce8","ATTENTION_SUM":"\u5173\u6ce8\u6570","ATTENTION_DONE":"\u5df2\u5173\u6ce8","ATTENTION_CANCEL":"\u53d6\u6d88\u5173\u6ce8","ATTENTION_BUG_DONE":"\u5df2\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_BUG_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u6f0f\u6d1e\u7684\u5173\u6ce8","ATTENTION_BUG":"\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_BUG_UNDO":"\u6ca1\u6709\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_HAT_DONE":"\u5df2\u5173\u6ce8\u6b64\u767d\u5e3d\u5b50","ATTENTION_HAT_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u767d\u5e3d\u5b50\u7684\u5173\u6ce8?","COLLECTION":"\u6536\u85cf","COLLECTION_DONE":"\u5df2\u6536\u85cf","COLLECTION_BUG_DONE":"\u5df2\u6536\u85cf\u6b64\u6f0f\u6d1e","COLLECTION_BUG_UNDO":"\u6ca1\u6709\u6536\u85cf\u6b64\u6f0f\u6d1e","COLLECTION_BUG_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u6f0f\u6d1e\u7684\u6536\u85cf","SMS_SEND_NAME":"* \u7528\u6237\u6635\u79f0\/\u5382\u5546\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_TITLE":"* \u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_CONTENT":"* \u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_CAPTCHA":"* \u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a<br \/>","NUMBER":"\u7684\u6b63\u6574\u6570","RATING_SUCCESS":"\u8bc4\u5206\u6210\u529f","RATING_BUGS_DONE":"\u5df2\u5bf9\u6b64\u6f0f\u6d1e\u8fdb\u884c\u8fc7\u8bc4\u5206","RATING_BUGS_SELF":"\u4e0d\u80fd\u5bf9\u81ea\u5df1\u53d1\u5e03\u7684\u6f0f\u6d1e\u8fdb\u884c\u8bc4\u5206","RATING_SUBMIT_CANCLE":"\u53d6\u6d88\u63d0\u4ea4\u8bc4\u5206","RATING_SUBMIT":"\u63d0\u4ea4\u6211\u7684\u8bc4\u5206","RATING_SUBMIT_CHECK":"\u8bf7\u786e\u5b9a\u6bcf\u4e00\u9879\u90fd\u9009\u62e9\u4e86\u8bc4\u5206","RATING_CONFIRM":"\u786e\u5b9a\u63d0\u4ea4\u5bf9\u6b64\u5382\u5546\u7684\u8bc4\u5206\u5417\uff1f","RATING_LOGIN":"\u53ea\u6709\u767b\u5f55\u7684\u767d\u5e3d\u5b50\u624d\u80fd\u8bc4\u5206","RATING_DONE":"\u5df2\u7ecf\u8bc4\u8fc7\u5206\u4e86","WOOYUN_CORPS":"\u4e4c\u4e91\u5382\u5546","MARST_IMAGE":"\u5bf9\u56fe\u7247\u6253\u7801","FEEDBACK_LINK_NULL":"\u94fe\u63a5\u4e0d\u80fd\u4e3a\u7a7a\uff01","FEEDBACK_LINK_ERROR":"\u8bf7\u4e66\u5199\u6b63\u786e\u7684\u94fe\u63a5\u5730\u5740\uff01","FEEDBACK_CONTENT_NULL":"\u95ee\u9898\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a\uff01","FEEDBACK_ALLOW_LIMIT":"\u534a\u5c0f\u65f6\u53ea\u5141\u8bb8\u53cd\u9988\u4e00\u6b21","TOP_RANK":"\u6392\u540d","TOP_BUG_TITLE":"\u6f0f\u6d1e\u6807\u9898","TOP_RANK_NONE":"\u6682\u65e0\u6392\u540d","TOP_BUGS_GOOD":"\u4f18\u8d28\u6f0f\u6d1e\u6570","NICKNAME":"\u6635\u79f0","LEVEL":"\u7b49\u7ea7","VALUE":"\u503c","EDITOR_INSERT_PIC":"\u63d2\u5165\u56fe\u7247","EDITOR_PIC_ADDR":"\u5730\u5740\uff1a","EDITOR_CONFIRM":"\u786e\u5b9a","EDITOR_PIC_NULL":"\u8bf7\u4e0a\u4f20\u56fe\u7247\u6216\u586b\u5199\u56fe\u7247\u5730\u5740","EDITOR_INSERT_VIDIO":"\u63d2\u5165\u89c6\u9891","EDITOR_VIDIO_ADDR":"\u89c6\u9891\u5730\u5740\uff1a","EDITOR_VIDIO_NULL":"\u8bf7\u586b\u5199\u89c6\u9891\u5730\u5740(.swf)","EDITOR_VIDIO_TYPE":"\u76ee\u524d\u4ec5\u652f\u6301.swf\u683c\u5f0f","PIC_SELECT":"\u8bf7\u9009\u62e9\u5f85\u4e0a\u4f20\u7684\u56fe\u7247","PIC_TYPE_IS":"\u56fe\u7247\u7c7b\u578b\u4e3a","UPLOAD":"\u4e0a\u4f20","RANK_AVG":"\u6f0f\u6d1e\u5e73\u5747"};
$(function(){
function getParamsOfShareWindow(width, height) {
return ['toolbar=0,status=0,resizable=1,width=' + width + ',height=' + height + ',left=',(screen.width-width)/2,',top=',(screen.height-height)/2].join('');
}
});
function errimg(img){
tmp=img.src;
nimg=tmp.replace("path_to_url","path_to_url");
img.src=nimg;
$(img).parent().attr('href',nimg);
img.onerror=null;
}
function AttendBug(id){
$.get('/ajaxdo.php',{module:'attendbug',id:id,rid:Math.random(),token:$("#token").val()},function(re){
if(re==1){
$("#attention_num").html(parseInt($("#attention_num").html())+1);
$("#attend_action").html(''+_LANGJS.ATTENTION_DONE+' <a class="btn" href="javascript:void(0)" onclick="AttendCancel('+id+')">'+_LANGJS.ATTENTION_CANCEL+'</a></span>');
}else if(re==2){
alert(_LANGJS.LOGIN_FIRST);
}else if(re==3){
alert(_LANGJS.ATTENTION_BUG_DONE);
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
function AttendCancel(id){
if(confirm(_LANGJS.ATTENTION_BUG_CONFIRM+"?")){
$.get('/ajaxdo.php',{module:'attendcancel',id:id,rid:Math.random(),token:$("#token").val()},function(re){
if(re==1){
$("#attention_num").html(parseInt($("#attention_num").html())-1);
$("#attend_action").html('<a class="btn" href="javascript:void(0)" onclick="AttendBug('+id+')">'+_LANGJS.ATTENTION_BUG+'</a></span>');
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
}
function CollectBug(id,token){
$.get('/ajaxdo.php',{'module':'collect','id':id,'token':token,'rid':Math.random()},function(re){
if(re==1){
$("#collection_num").html(parseInt($("#collection_num").html())+1);
$(".btn-fav").removeClass("fav-add");
$(".btn-fav").addClass("fav-cancel");
$(".btn-fav").unbind();
$(".btn-fav").click(function(){
CollectCancel(id,token);
});
}else if(re==2){
alert(_LANGJS.LOGIN_FIRST);
}else if(re==3){
alert(_LANGJS.COLLECTION_BUG_DONE);
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
function CollectCancel(id,token){
if(confirm(_LANGJS.COLLECTION_BUG_CONFIRM+"?")){
$.get('/ajaxdo.php',{'module':'collectcancel','id':id,'token':token,'rid':Math.random()},function(re){
if(re==1){
$("#collection_num").html(parseInt($("#collection_num").html())-1);
$(".btn-fav").removeClass("fav-cancel");
$(".btn-fav").addClass("fav-add");
$(".btn-fav").unbind();
$(".btn-fav").click(function(){
CollectBug(id,token);
});
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
}
</script>
<div class="content">
<input type="hidden" id="token" style="display:none" value="" />
<h2>
<span style="margin:0 0 0 580px; float:right; position:absolute; font-size:14px; font-weight:normal">(<span id="attention_num">20</span>)
<span id="attend_action">
<a class="btn" href="javascript:void(0)" onclick="AttendBug(102271)"></a></span>
</span></h2>
<h3> <a href="wooyun-2015-0102271">WooYun-2015-102271</a>
<input id="fbid" type="hidden" value="102271">
</h3>
<h3 class='wybug_title'> CMS500 <img src="path_to_url" alt="" class="credit">
</h3>
<h3 class='wybug_corp'> <a href="path_to_url">
</a>
</h3>
<h3 class='wybug_author'> <a href="path_to_url"></a></h3>
<h3 class='wybug_date'> 2015-03-21 11:09</h3>
<h3 class='wybug_open_date'> 2015-06-22 08:32</h3>
<h3 class='wybug_type'> </h3>
<h3 class='wybug_level'> </h3>
<h3>Rank 20</h3>
<h3 class='wybug_status'>
(cncert)
</h3>
<h3> <a href="path_to_url">path_to_url help@wooyun.org</h3>
<h3>Tags
</h3>
<h3>
<!-- Baidu Button BEGIN -->
<div id="share">
<div style="float:right; margin-right:100px;font-size:12px">
<span class="fav-num"><a id="collection_num">0</a></span>
<a style="text-decoration:none; font-size:12px" href="javascript:void(0)" class="fav-add btn-fav"></a>
<script type="text/javascript">
var token="";
var id="102271";
$(".btn-fav").click(function(){ CollectBug(id,token); });
</script>
</div>
<span style="float:left;"></span>
<div id="bdshare" class="bdshare_b" style="line-height: 12px;"><img src="path_to_url" />
<a class="shareCount"></a>
</div>
</div>
<!-- Baidu Button END -->
</h3>
<hr align="center"/>
<h2></h2>
<h3 class="detailTitle"></h3>
<p class="detail" style="padding-bottom:0">
</p>
<p class="detail wybug_open_status">
2015-03-21 <br/>
2015-03-24 <br/>
2015-03-27 <a href="path_to_url" target="_blank"></a><a href="path_to_url" target="_blank"></a><a href="path_to_url" target="_blank"></a><br/>
2015-05-18 <br/>
2015-05-28 <br/>
2015-06-07 <br/>
2015-06-22 <br/>
</p>
<h3 class="detailTitle"></h3>
<p class="detail wybug_description"><br />
rank</p>
<h3 class="detailTitle"></h3>
<div class='wybug_detail'>
<p class="detail"><br />
<br />
</p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>path_to_url class='detail'><br />
<br />
<br />
<br />
/esbclient/layout/make.php<br />
<br />
<br />
<br />
</p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code><?php <br />
$_POST ['code'] = html_entity_decode ( stripslashes ( ($_POST ['code']) ) ); //\html<br />
file_put_contents('content.php',$_POST['code']);<br />
?></code></pre></fieldset><p class='detail'><br />
<br />
file_put_contents...<br />
<br />
<br />
<br />
<br />
<br />
path_to_url />
<br />
POSTcode=<?php $wexiaoma;?><br />
<br />
content.php<br />
<br />
</p>
</div>
<h3 class="detailTitle"></h3>
<div class='wybug_poc'>
<p class="detail"></p><p class="detail usemasaic"><a href="../upload/201503/191059200f32d4ff38ee020ba153292a68dab1fb.png" target="_blank"><img src="../upload/201503/191059200f32d4ff38ee020ba153292a68dab1fb.png" alt="1.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"> </p>
</div>
<h3 class="detailTitle"></h3>
<div class='wybug_patch'>
<p class="detail"> </p>
</div>
<h3 class="detailTitle"> <a style="font-weight:normal" href="path_to_url" title=""></a>@<a style="font-weight:normal" href="path_to_url" title="CMS500"></a></h3>
<hr align="center"/>
<h2 id="bugreply"></h2>
<div class='bug_result'>
<h3 class="detailTitle"></h3>
<p class="detail"></p>
<p class="detail">Rank11 </p>
<p class="detail">2015-03-24 08:30</p>
<h3 class="detailTitle"></h3>
<p class="detail">CNVD,CNVD,.</p>
<h3 class="detailTitle"></h3>
<p class="detail"></p>
</div>
<hr align="center" />
<script type="text/javascript">
var bugid="102271";
var bugRating="-3";
var myRating="";
var ratingCount="0";
function ShowBugRating(k){
var ratingItems=$(".myrating span");
$.each(ratingItems,function(i,n){
var nk=parseInt($(n).attr("rel"));
if(nk<=k){
$(n).addClass("on");
}else{
$(n).removeClass("on");
}
});
$(".myrating span").hover(
function(){
$("#ratingShow").html($(this).attr("data-title"));
},
function(){
$("#ratingShow").html("");
}
);
}
$(document).ready(function(){
if(myRating==""){
var ratingItems=$(".myrating span");
$(".myrating span").hover(
function(){
$(this).addClass("hover");
var k=parseInt($(this).attr("rel"));
$.each(ratingItems,function(i,n){
var nk=parseInt($(n).attr("rel"));
if(nk<k) $(n).addClass("on");
if(nk>k) $(n).removeClass("on");
});
$("#ratingShow").html($(this).attr("data-title"));
},
function(){
$(this).removeClass("hover");
if($("#myRating").val()==""){
$.each(ratingItems,function(i,n){
$(n).removeClass("on");
});
}
$("#ratingShow").html("");
}
);
$(".myrating span").click(function(){
var rating=$(this).attr("rel");
var k=parseInt($(this).attr("rel"));
$.post("/ajaxdo.php?module=bugrating",{"id":bugid,"rating":rating,"token":$("#token").val()},function(re){
//
$(".myrating span").unbind();
re=parseInt(re);
switch(re){
case 1:
$("#ratingShow").html(_LANGJS.RATING_SUCCESS);
$("#ratingSpan").html(parseInt($("#ratingSpan").html())+1);
$.each(ratingItems,function(i,n){
var nk=parseInt($(n).attr("rel"));
if(nk<=k){
$(n).addClass("on");
}else{
$(n).removeClass("on");
}
});
ShowBugRating(rating);
break;
case 2:
$("#ratingShow").html(_LANGJS.LOGIN_FIRST);
break;
case 4:
$("#ratingShow").html(_LANGJS.RATING_BUGS_DONE);
break;
case 6:
$("#ratingShow").html(_LANGJS.RATING_BUGS_SELF);
break;
default:break;
}
});
});
}else{
if(ratingCount>2){
ShowBugRating(bugRating);
}else{
ShowBugRating(-3);
}
}
});
</script>
<h3 class="detailTitle"></h3>
<p class="detail"></p>
<h5 class="rating">
<div class="ratingText"><span>(<span id="ratingSpan">0</span>)</span>:</div>
<div class="myrating">
<span rel="-2" data-title=""></span>
<span rel="-1" data-title=""></span>
<span rel="0" data-title=""></span>
<span rel="1" data-title=""></span>
<span rel="2" data-title=""></span>
<div id="ratingShow">
</div>
</div>
</h5>
<input type="hidden" id="myRating" value="" />
<hr align="center" />
<h2></h2>
<div id="replys" class="replys">
<ol class="replylist">
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-19 11:11</span> |
<a target='_blank' href="path_to_url"></a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:121 :44 | ~~~~ ......)
<div class="likebox">
<span class="likepre" title="" rel="137076"></span>
<span class="liketext liketext_min"><span id="likenum_137076">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p> </p>
</div>
<div class="replylist-act">
<span class="floor">1#</span>
<a title=" " href="javascript:void(0)" class="replyBtn" onclick="Reply('')"></a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-19 11:36</span> |
<a target='_blank' href="path_to_url">zhxs</a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:69 :26 | ...)
<div class="likebox">
<span class="likepre" title="" rel="137081"></span>
<span class="liketext liketext_min"><span id="likenum_137081">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p> </p>
</div>
<div class="replylist-act">
<span class="floor">2#</span>
<a title=" zhxs" href="javascript:void(0)" class="replyBtn" onclick="Reply('zhxs')"></a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-19 11:37</span> |
<a target='_blank' href="path_to_url"></a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:273 :34 | ~)
<div class="likebox">
<span class="likepre" title="" rel="137082"></span>
<span class="liketext liketext_min"><span id="likenum_137082">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p> </p>
</div>
<div class="replylist-act">
<span class="floor">3#</span>
<a title=" " href="javascript:void(0)" class="replyBtn" onclick="Reply('')"></a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-19 12:22</span> |
<a target='_blank' href="path_to_url"></a> <img height="12" width="12" style="vertical-align:-2px;" src="path_to_url" alt="" /> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:44 :2 | )
<div class="likebox">
<span class="likepre" title="" rel="137091"></span>
<span class="liketext liketext_min"><span id="likenum_137091">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p> </p>
</div>
<div class="replylist-act">
<span class="floor">4#</span>
<a title=" " href="javascript:void(0)" class="replyBtn" onclick="Reply('')"></a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-19 13:58</span> |
<a target='_blank' href="path_to_url">an0nym0us</a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:18 :3 | no)
<div class="likebox">
<span class="likepre" title="" rel="137105"></span>
<span class="liketext liketext_min"><span id="likenum_137105">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p>omg! </p>
</div>
<div class="replylist-act">
<span class="floor">5#</span>
<a title=" an0nym0us" href="javascript:void(0)" class="replyBtn" onclick="Reply('an0nym0us')"></a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-19 14:08</span> |
<a target='_blank' href="path_to_url"></a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:255 :83 | ...)
<div class="likebox">
<span class="likepre" title="" rel="137106"></span>
<span class="liketext liketext_min"><span id="likenum_137106">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p> </p>
</div>
<div class="replylist-act">
<span class="floor">6#</span>
<a title=" " href="javascript:void(0)" class="replyBtn" onclick="Reply('')"></a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-24 08:50</span> |
<a target='_blank' href="path_to_url"></a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:63 :10 | ...)
<div class="likebox">
<span class="likepre" title="" rel="137730"></span>
<span class="liketext liketext_min"><span id="likenum_137730">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p> </p>
</div>
<div class="replylist-act">
<span class="floor">7#</span>
<a title=" " href="javascript:void(0)" class="replyBtn" onclick="Reply('')"></a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-26 13:20</span> |
<a target='_blank' href="path_to_url">me1ody</a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:121 :35 | )
<div class="likebox">
<span class="likepre" title="" rel="138134"></span>
<span class="liketext liketext_min"><span id="likenum_138134">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p> </p>
</div>
<div class="replylist-act">
<span class="floor">8#</span>
<a title=" me1ody" href="javascript:void(0)" class="replyBtn" onclick="Reply('me1ody')"></a>
</div>
</div><!-- reply-content End -->
</li>
</ol><!-- replylist End -->
</div><!-- replys End -->
<div id="reply" class="reply">
<a name="comment"></a>
<p class="detail">
<a href="path_to_url"><u></u></a>
</p>
<script type="text/javascript">
var masaic = '0';
function CommentLike(id){
$.post("/ajaxdo.php?module=commentrating",{"id":id,"token":$("#token").val()},function(re){
re=parseInt(re);
switch(re){
case 1:
$("#likenum_"+id).html(parseInt($("#likenum_"+id).html())+1);
break;
case 4:
alert(_LANGJS.COMMENT_GOOD_DONE);
break;
case 6:
alert(_LANGJS.COMMENT_SELF);
break;
default:break;
}
});
}
$(document).ready(function(){
$(".likebox .likepre").click(function(){
CommentLike($(this).attr("rel"));
});
});
</script>
<div>
</div>
<div id="footer">
<span class="copyright fleft">
<a href="path_to_url">ICP15041338-1</a>
<!--a href="path_to_url" target="_blank"><img src="/images/sae_bottom_logo.png" title="Powered by Sina App Engine"></a-->
</span>
<span class="other fright">
<a href="path_to_url"></a>
<a href="path_to_url"></a>
<a href="path_to_url"></a>
<a href="path_to_url"></a>
<a href="path_to_url"></a>
</span>
</div>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fc12f88b5c1cd041a732dea597a5ec94c' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript" id="bdshare_js" data="type=button" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
document.getElementById("bdshell_js").src = "path_to_url" + new Date().getHours();
if (top.location !== self.location) top.location=self.location;
</script>
</body>
</html>
``` |
```yaml
version: "2.0"
intents:
- greet
- goodbye
responses:
utter_greet:
- text: "Hey! How are you?"
utter_chatter:
- text: "Lovely weather today, isn't it?"
``` |
A Reckless Romeo is a 1917 American short silent comedy film directed by and starring Roscoe 'Fatty' Arbuckle.
Plot
A philandering husband's public flirtation with a beautiful girl—and the resulting brawl with the woman's boyfriend—are captured by a newsreel cameraman. When the husband takes his wife and her mother out to the movies, the footage is shown on-screen. The husband tries to flee the theater, only to be spotted and leaped upon by the woman's boyfriend, treating viewers to two simultaneous fights between the same two men, both on-screen and in the aisle.
Cast
Roscoe 'Fatty' Arbuckle as Husband
Al St. John as Rival
Corinne Parquet as Wife
Agnes Neilson as Mother-in-Law
Alice Lake as Girl in Park
Jimmy Bryant
Joe Bordeaux as Newsreel director (uncredited)
Production
The film was released by the Comique Film Corporation when it and many other early film studios in America's first motion picture industry were based in Fort Lee, New Jersey, at the beginning of the 20th century. Some shots were done at Palisades Amusement Park.
The film was originally produced in New Jersey as one of Arbuckle's last Keystone pictures. Filmed between July and September 1916 and later sold to Paramount, it was released as a Comique film on May 21, 1917, after The Butcher Boy and before The Rough House.
Preservation status
Thought to have been lost, a print was discovered in 1998 in the Norwegian Film Archive in an unmarked canister with another lost Arbuckle short, The Cook (1918). The film archive at George Eastman House has a 35 mm positive print.
See also
Fatty Arbuckle filmography
List of rediscovered films
References
External links
1917 films
1917 comedy films
1917 short films
1910s rediscovered films
American black-and-white films
Silent American comedy films
American silent short films
Films directed by Roscoe Arbuckle
Films shot in Fort Lee, New Jersey
Films with screenplays by Roscoe Arbuckle
Rediscovered American films
1910s American films |
Zoller-Frasier Round Barn is a historic round barn located at Newville in Herkimer County, New York. It was built about 1895 and is approximately 80 feet in diameter. It is constructed of clapboard sided stud walls above a low mortared stone foundation. It is built surrounding a self-supporting central silo.
It was listed on the National Register of Historic Places in 1984.
References
Barns on the National Register of Historic Places in New York (state)
Infrastructure completed in 1895
Round barns in New York (state)
Buildings and structures in Herkimer County, New York
National Register of Historic Places in Herkimer County, New York |
```sqlpl
posts: select * from Post where p_cid=?;
public_posts: select * from Post WHERE Post.p_private=0 and p_cid=?;
private_posts: select * from Post WHERE Post.p_private=1 and p_cid=?;
tas: select * from Role WHERE r_role = 1 and r_cid=?;
ta_posts: select * from Post WHERE Post.p_author in (select r_uid from Role WHERE Role.r_role=1) and p_cid=?;
enrolled_in: select r_cid from Role where r_uid=?;
enrolled_students: select r_uid from Role where r_cid=?;
-- vote_count: select postId, COUNT(userId) AS votes FROM Vote GROUP BY postId;
``` |
Großer Fürstenseer See () is a lake in the Mecklenburgische Seenplatte district in Mecklenburg-Vorpommern, Germany. At an elevation of 63.8 m, its surface area is 2.12 km².
External links
Lakes of Mecklenburg-Western Pomerania
LGrosserFurstenseerSee |
```forth
*> \brief \b SSYR
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* path_to_url
*
* Definition:
* ===========
*
* SUBROUTINE SSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
*
* .. Scalar Arguments ..
* REAL ALPHA
* INTEGER INCX,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* REAL A(LDA,*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SSYR performs the symmetric rank 1 operation
*>
*> A := alpha*x*x**T + A,
*>
*> where alpha is a real scalar, x is an n element vector and A is an
*> n by n symmetric matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array A is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of A
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of A
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is REAL
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is REAL array, dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in,out] A
*> \verbatim
*> A is REAL array, dimension ( LDA, N )
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array A must contain the upper
*> triangular part of the symmetric matrix and the strictly
*> lower triangular part of A is not referenced. On exit, the
*> upper triangular part of the array A is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array A must contain the lower
*> triangular part of the symmetric matrix and the strictly
*> upper triangular part of A is not referenced. On exit, the
*> lower triangular part of the array A is overwritten by the
*> lower triangular part of the updated matrix.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup her
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*>
*> -- Written on 22-October-1986.
*> Jack Dongarra, Argonne National Lab.
*> Jeremy Du Croz, Nag Central Office.
*> Sven Hammarling, Nag Central Office.
*> Richard Hanson, Sandia National Labs.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
*
* .. Scalar Arguments ..
REAL ALPHA
INTEGER INCX,LDA,N
CHARACTER UPLO
* ..
* .. Array Arguments ..
REAL A(LDA,*),X(*)
* ..
*
* =====================================================================
*
* .. Parameters ..
REAL ZERO
PARAMETER (ZERO=0.0E+0)
* ..
* .. Local Scalars ..
REAL TEMP
INTEGER I,INFO,IX,J,JX,KX
* ..
* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
* ..
* .. External Subroutines ..
EXTERNAL XERBLA
* ..
* .. Intrinsic Functions ..
INTRINSIC MAX
* ..
*
* Test the input parameters.
*
INFO = 0
IF (.NOT.LSAME(UPLO,'U') .AND. .NOT.LSAME(UPLO,'L')) THEN
INFO = 1
ELSE IF (N.LT.0) THEN
INFO = 2
ELSE IF (INCX.EQ.0) THEN
INFO = 5
ELSE IF (LDA.LT.MAX(1,N)) THEN
INFO = 7
END IF
IF (INFO.NE.0) THEN
CALL XERBLA('SSYR ',INFO)
RETURN
END IF
*
* Quick return if possible.
*
IF ((N.EQ.0) .OR. (ALPHA.EQ.ZERO)) RETURN
*
* Set the start point in X if the increment is not unity.
*
IF (INCX.LE.0) THEN
KX = 1 - (N-1)*INCX
ELSE IF (INCX.NE.1) THEN
KX = 1
END IF
*
* Start the operations. In this version the elements of A are
* accessed sequentially with one pass through the triangular part
* of A.
*
IF (LSAME(UPLO,'U')) THEN
*
* Form A when A is stored in upper triangle.
*
IF (INCX.EQ.1) THEN
DO 20 J = 1,N
IF (X(J).NE.ZERO) THEN
TEMP = ALPHA*X(J)
DO 10 I = 1,J
A(I,J) = A(I,J) + X(I)*TEMP
10 CONTINUE
END IF
20 CONTINUE
ELSE
JX = KX
DO 40 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
IX = KX
DO 30 I = 1,J
A(I,J) = A(I,J) + X(IX)*TEMP
IX = IX + INCX
30 CONTINUE
END IF
JX = JX + INCX
40 CONTINUE
END IF
ELSE
*
* Form A when A is stored in lower triangle.
*
IF (INCX.EQ.1) THEN
DO 60 J = 1,N
IF (X(J).NE.ZERO) THEN
TEMP = ALPHA*X(J)
DO 50 I = J,N
A(I,J) = A(I,J) + X(I)*TEMP
50 CONTINUE
END IF
60 CONTINUE
ELSE
JX = KX
DO 80 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
IX = JX
DO 70 I = J,N
A(I,J) = A(I,J) + X(IX)*TEMP
IX = IX + INCX
70 CONTINUE
END IF
JX = JX + INCX
80 CONTINUE
END IF
END IF
*
RETURN
*
* End of SSYR
*
END
``` |
Nietzsche contra Wagner; Out of the Files of a Psychologist is a critical essay by Friedrich Nietzsche, composed of selections he chose from among his earlier works. The selections are assembled in this essay in order to focus on Nietzsche's thoughts about the composer Richard Wagner. As he says in the preface, when the selections are read "one after the other they will leave no doubt either about Richard Wagner or about myself: we are antipodes." He also describes it as "an essay for psychologists, but not for Germans". It was written in his last year of lucidity (1888–1889), and published by C. G. Naumann in Leipzig in 1889. Nietzsche describes in this short work why he parted ways with his one-time idol and friend, Richard Wagner. Nietzsche attacks Wagner's views, expressing disappointment and frustration in Wagner's life choices (such as Nietzsche's mistaken belief that Wagner had converted to Christianity, perceived as a sign of weakness). Nietzsche evaluates Wagner's philosophy on tonality, music and art; he admires Wagner's power to emote and express himself, but largely disdains what the philosopher deems his religious biases.
It is easy to suspect that Nietzsche's views must be motivated by a personal quarrel with Wagner. However, Nietzsche had nothing to gain by attacking Wagner, his motives were misunderstood by a public who were influenced by Nietzsche’s early admiration of Wagner, and who were now enthralled by Wagner’s genius. These essays would be hard to comprehend, and would be seen as the work of a disloyal fanatic. The attacks also at times, confusingly pause to express an affectionate appreciation for Wagner.
According to Roger Hollinrake, it is reasonable to question Nietzsche’s qualifications to criticize a great musician on very specific musical topics. Nietzsche was a philosopher, and also a musician and composer, though of limited abilities. However gifts of analysis, and gifts of musicianship are not often both given to any one individual. Nietzsche had the broad combined perspective of a scholar, philosopher, historian and poet, abetted by his penetrating insight and an objectivity with a lack of musical bias. Nietzsche's attacks derive from the great importance he gives to art, and from his sense of the seriousness of the artist's duties, and from Nietzsche's fears for the state of culture in his era.
Thirteen sections
The sections are as follows. Nietzsche’s sources, found among his works, are indicated in parentheses:
Foreword
Nietzsche explains that this book consists of selections from his previous writings. They show that he and Wagner are opposites. Nietzsche states that a reader of this book will conclude that it is for psychologists and not for Germans. He says that he has readers almost everywhere, in New York and in Europe, but not in Germany.
Where I Admire Wagner
(cf. The Gay Science, 87)
Nietzsche praises Wagner in a number of ways, saying that Wagner
Nietzsche continues, and then adds that Wagner's music has revealed "some very minute and microscopic aspects of the soul … indeed he is the master of the very minute. But he does not want to be that!" Nietzsche suggests with a metaphor that Wagner prefers to create large works: "His character prefers large walls and audacious frescoes."
Where I Make Objections
(cf. The Gay Science, 368)
Nietzsche's objections to Wagner's music are physiological—as he listens to Wagner’s music his whole body feels discomfort: He does not breathe easily, his feet begin to rebel, as they do not find a desire to dance or march being satisfied. Wagner is seen as an actor, an “enthusiastic mimomaniac”, and his music is merely an opportunity for poses. Nietzsche suggests Wagner needs to be more honest with himself.
Intermezzo
(cf. Ecce Homo, Why I Am So Clever, 7)
Nietzsche wants music to be cheerful, profound, unique, wanton, tender, roguish, and graceful. These qualities are lacking in German music, except for the works of Bach, Handel, and also in Wagner's Siegfried Idyll. He praises Liszt, Chopin, Peter Gast, and Rossini, as well as all Venetian music. The Intermezzo ends with Nietzsche's poem “Venice.”
Wagner as Danger
(cf. Human, All Too Human, II,134; The Wanderer and His Shadow, 165)
1. Nietzsche criticizes Wagner’s idea of "endless melody", which is an idea based on Wagner’s criticism of operas in which the melody exists especially in arias, and the arias are separated by less melodic filler. Wagner’s idea is that an entire opera should be instead a continuous or "endless" melody. Nietzsche's concern is that an opera that is all one "endless melody" has the effect similar to a person walking into the ocean, losing one’s footing, then surrendering to the elements, and being forced to tread water. The danger to music is "degeneration of rhythmic feeling" which would be unaccommodating to the element of dance in performance, and the supplanting of rhythm with chaos, which would result in an emphasis on mere "effect" — on posing.
2. Nietzsche then suggests that Wagner feels that all music, to be effective, "must shake the listener to his very intestines," and that such effects are for idiots and the masses.
A Music Without a Future
(cf. Human All-Too-Human, II,171)
Nietzsche considers that historically, as cultures have developed, music is the last art form to appear — music appears as its culture has begun to fade. "All true, all original music is a swan song." He suggests that the music of his time, "has but a short life span ahead of it", for it arose from a culture that will soon sink and disappear. He speaks specifically of Wagner's music, which may find support and sudden glory, in that the current age was suffering much European warfare and turbulence. But, Nietzsche says, we should not be fooled. "The Germans themselves have no future."
We Antipodes
(cf. The Gay Science, 370)
In this section Nietzsche states that Wagner and the philosopher Arthur Schopenhauer are to Nietzsche antipodes — opposites. At one time, he and Wagner were not antipodes, but were close. They were very close when Nietzsche was writing his first book, The Birth of Tragedy, which he dedicated to Wagner, and which proclaimed Wagner’s music the modern rebirth. Nietzsche at times lived with Wagner and Wagner’s future wife Cosima, Nietzsche’s first book was in part developed out of long conversations with them both, while at the same time, under the same roof, Wagner was beginning to compose and develop the story of what would eventually become Wagner’s Ring Cycle. Nietzsche, who was fast becoming a notable academic lecturer, was in some danger of being completely eclipsed by the celebrated greatness of Wagner. His declaration of opposition to Wagner and Schopenhauer, represents Nietzsche’s journey towards his independence of mind and spirit and his individuation; a journey he describes in the preface to The Case of Wagner.
Nietzsche considers that every art presupposes sufferers and suffering, and serves either a growing or declining life. And that there are some who suffer an impoverishment of life, and therefore demand from art either calmness or else a frenzy that will anesthetize. Such, with their double needs, are the ones that Wagner responds to. Such decadents need mildness and a god for the sick — a healer, a savior. Nietzsche says after exploring Epicureanism and Christianity, and has developed a sharp eye for what he terms “backwards inference” — to understand the creator by knowing the creation, and to ask: “Is it hatred against life, or the excess of life which has become creative?”
Where Wagner Belongs
(cf. Beyond Good and Evil, 254, 256)
In this section Nietzsche considers which culture would be most fitting for Wagner – an unexpected question considering that Wagner’s musical and literary creations are richly associated with Germany, and Wagner was passionately pro-German. Nietzsche’s stance is the opposite of Wagner’s — Nietzsche has nothing good to say about Germany.
Nietzsche begins this section by pointing out that France is the "most spiritual and refined culture in Europe," though such Frenchmen may perhaps be few in number and "not among the sturdiest: partly fatalists, somber and sick, partly pampered and artificial." But "French romanticism and Wagner belong together most closely". Northern Germany, on the other hand, according to Nietzsche, is a place of darkness, where some Germans consider the French to be "barbarians". Nietzsche mentions that the German philosopher Arthur Schopenhauer and the German poet Heinrich Heine both belong in France. Nietzsche feels that "Paris is the real soil for Wagner." Wagner would not be flattered by that suggestion. It is possible Nietzsche may be teasing Wagner, who in his writings has vehemently disparaged the French; or perhaps Nietzsche wants to rescue Wagner from a Germany that does not appreciate his greatness. That second possibility is further developed as the section continues, and Nietzsche asks, "Who could be more incapable of understanding Wagner than, for example, the young Kaiser?"
Nietzsche says, do not be fooled by Wagner himself–it was "disgraceful on Wagner’s part to scoff at Paris, as he did, in its agony in 1871." That was 17 years earlier, when the Prussian army was laying siege to the city of Paris as part of the Franco-Prussian War, and the Prussians were bombarding and starving the French people that were trapped. At the time Wagner expressed jubilance about the military action, as Nietzsche, who had enlisted to tend the wounded earlier in the war, was outraged by the barbarity, the deliberate cruelty, and by Wagner’s vengeful and nationalistic reaction.
Wagner as Apostle of Chastity
(cf. Beyond Good and Evil, 256; On the Genealogy of Morals, III, 2; On the Genealogy of Morals, III, 3)
Here Nietzsche focuses on Wagner’s opera Parsifal. The story of Parsifal is partly based on medieval Germanic legends and Christian ideals, and it dramatizes a conflict between sensuality versus chastity.
1. Part one of "Wagner as Apostle of Chastity" is a verse by Nietzsche, written in the style of a poem by Goethe. Parsifal contains an act of castration, which Nietzsche refers to in line three. Nietzsche’s poem begins by asking:
:"Is this still German?
Out of a German heart, this torrid screeching?
A German body, this self-laceration?
German this priestly affectation, this incense-smelling lurid preaching?"
Nietzsche is asking this of Wagner, who is German and a noted devotee of German literature, music, and culture. Nietzsche concludes his poem by pointing out that the opera Parsifal, though dressed in Germanic knightly romance, is expressing Catholicism:
:"That which you hear is Rome — Rome’s faith without the text."
2. Nietzsche critiques the theme of "sensuality versus chastity" in Wagner’s opera Parsifal. The opera presents those two aspects in such dire opposition, that when a naive young man encounters an alluring siren in the woods, a "long kiss on the lips" threatens to destroy his hopes of salvation by robbing him of his chastity: The young man responds to the kiss in "utmost terror", he then "flings himself in despair on his knees" and cries out: "Redeemer! Saviour! Lord of grace! How can I, a sinner, purge my guilt?"
Nietzsche responds by saying that, in fact, "There is no necessary objection between sensuality and chastity." Sensuality and chastity can coexist in the human experience, and when there is a conflict, it does not need to be tragic. Nietzsche suggests that there are some "mortals", who find balancing their existence between two extremes, angel and animal, to be an attraction to life itself. It is easy to understand that those who are "brought to the point of adoring chastity" will be obsessed with its opposite, and will adore that. Nietzsche metaphorically refers to such people as "animals of Circe". Circe is a sorceress in the legends of ancient Greece who had the power to turn humans into lions, wolves and swine.
Finally, Nietzsche asks why Wagner "at the end of his life" wanted to set this "embarrassing and perfectly superfluous opposition to music and produce it on the stage."
3. Nietzsche asks what the title character, Parsifal ("that innocence from the country … that poor devil and child of nature whom Wagner finally makes a Catholic") means to Wagner. Nietzsche might prefer Wagner's opera to be meant as a satyr play — that "wanton parody on the tragic", and on "earthly seriousness and earthly misery", and on the "anti-nature of the aesthetic ideal". If Parsifal is taken seriously, it would be seen as a "curse on the senses and the spirit", a regression to "sickly Christian and obscurantist ideals", and a "self-abnegation". Nietzsche remembers "how enthusiastically Wagner once fallowed in the footsteps of the philosopher Feuerbach". Ludwig Feuerbach, an influential German philosopher, advocated atheism, considering "God" to be the "idealization of human aspirations". Wagner dedicated his essay "The Art Work of the Future" to Feuerbach. Nietzsche concludes, "The preaching of chastity remains an incitement to anti-nature: I despise everyone who does not experience Parsifal as an attempted assassination of basic ethics."
How I was Set Free from Wagner
(cf. Human All-Too-Human, II, Preface 3-4)
1. By 1876, Wagner had moved to Germany and had become a decaying anti-Semitic Christian. Nietzsche expressed his disappointment and feeling of loss. 2. Nietzsche then became a solitary, courageous pessimist and he completely dedicated himself to his life's arduous task.
The Psychologist has a Word
(cf. Beyond Good and Evil, 269-270)
1. Sympathy interferes with the psychological analysis of great, higher humans. Psychologists should be cheerfully unsympathetic. Revered, great people always eventually decay. This realization might remind the psychologist of his own decadence and may contribute to his own corruption. The great human's work, not his own person, should be venerated. 2. Great artists and other higher humans create works in order to forget their own decadent flaws. Revering higher people with feminine sympathy is detrimental to them. 3. When a higher human knows deep, heartbreaking suffering, there develops immunity to receiving sympathy from lower humans. Noble, profound sufferers feign cheerfulness in order to ward off unwanted pity.
Epilogue
(cf. The Gay Science, Preface 3-4)
1. From a universal perspective, deep suffering is necessary, healthful, and beneficial, if it does not kill.
Great pain is useful and should be welcomed. Amor fati [love your fate]. It makes a philosopher deeply profound. Questions arise concerning beloved life itself. 2. After experiencing profound pain, a taste for artificial, cheering art is acquired. The horror of life is ignored. Like the ancient Dionysian Greeks, we have known the terrible truth about life and now appreciate the effects of an artist's false, wonderful tones, fictional words, and fascinating forms.
On the Poverty of the Richest
(cf. Dionysus-Dithyrambs)
"On the Poverty of the Richest" is one of the poems of the Dionysus-Dithrambs, which use poetic imagery taken from Thus Spoke Zarathustra. This collection he referred to as "The Songs of Zarathustra". They were written over a period from 1883 to 1888. Nietzsche intended this poem to be published at the end of Nietzsche contra Wagner; then changed his mind, and removed it from there, and included it in Dionysus-Dithyrambs. "On the Poverty of the Richest" expresses and explores his truth, the death of Zarathustra, self sacrifice, desiring, superabundance, the tale of King Midas, the experience of striving to gain and share wisdom, and the virtue of poverty.
References
Bibliography
Andreas Urs Sommer, Kommentar zu Nietzsches Der Antichrist. Ecce homo. Dionysos-Dithyramben. Nietzsche contra Wagner (= Heidelberger Akademie der Wissenschaften (Hg.): Historischer und kritischer Kommentar zu Friedrich Nietzsches Werken, vol. 6/2). XXI + 921 pages. Berlin / Boston: Walter de Gruyter 2013. () (the comprehensive standard commentary on "Nietzsche contra Wagner" – only available in German)
External links
Online text of Nietzsche contra Wagner; Out of the Files of a Psychologist
Nietzsche contra Wagner; Out of the Files of a Psychologist
1895 essays
Essays by Friedrich Nietzsche
Wagner studies |
```java
@ExportPackage
@PublicApi
package com.yahoo.search.query.context;
import com.yahoo.api.annotations.PublicApi;
import com.yahoo.osgi.annotation.ExportPackage;
``` |
Wrigley is an English surname originating in the county of Lancashire.
Alan Wrigley (born 1931), Australian writer on topics related to intelligence, defence and security
Ammon Wrigley (1861–1946), English poet and local historian from Saddleworth
Arthur Wrigley (1912–1965), English cricket scorer and statistician
Arthur Joseph Wrigley (1902–1983), obstetrician and gynaecologist
Bernard Wrigley (born 1948), English singer, actor and comedian
David Wrigley, English general practitioner
Derek Fuller Wrigley (born 1924), British-born Australian architect
Drew Wrigley (born 1965), American politician
E.A. Wrigley (1931-2022), British historical demographer
Edgar Wrigley (1886−1958), New Zealand rugby union and rugby league player
George Weston Wrigley (1847–1907), Canadian journalist and social reformer
Henry Wrigley (1892–1987), Royal Australian Air Force (RAAF) officer
Hugh Wrigley (1891–1980), Australian Army officer
Kurt Wrigley (born 1969), Australian rugby league player
Leslie James Wrigley (1875–1933), Australian academic and educationalist
Nicholas Wrigley (born 1955), British merchant banker
Robert Wrigley (born 1951), American poet and educator
Stephen Wrigley (born 1987), Australian football player
Sylvia Spruck Wrigley (born 1968), American/German writer of science fiction, fantasy and aviation non-fiction
Thomas Wrigley, Jr. (born 1988), American economist, educator, and pilot
Tony Wrigley (born 1931), historical demographer
Wilf Wrigley (born 1949), English football player
Zeke Wrigley (1874–1952), baseball player
In the Wm. Wrigley Jr. Company
William Wrigley, Jr. (1861–1932), founder of the Wm. Wrigley Jr. Company
Philip K. Wrigley (1894–1977), son of William Wrigley Jr.
William Wrigley III (1933–99), son of Philip K. Wrigley
William Wrigley, Jr. II (born 1963), son of William Wrigley III, and chairman
In music
The Wrigley Sisters (Jennifer and Hazel), folk music duo
Fictional
Simon 'Bigmac' Wrigley, character in the Johnny Maxwell trilogy by Terry Pratchett
Surnames of English origin |
Modern Stochastics: Theory and Applications is a quarterly peer-reviewed open-access mathematics journal that was established in 2014. It is published cooperatively by Vilnius University (Lithuania), Taras Shevchenko National University of Kyiv (Ukraine), and VTeX (Lithuania). The editors-in-chief are Kestutis Kubilius (Vilnius University) and Yuliya Mishura (Taras Shevchenko National University of Kyiv). The journal covers all aspects of stochastics.
Focus and scope
The journal publishes original research papers in:
probability theory
mathematical statistics
theory of stochastic processes and random fields
stochastic analysis and stochastic differential equations;
probabilistic aspects of fractal analysis
stochastic geometry
financial mathematics
actuarial mathematics and risk theory
applications in economics, biology, physics, engineering
optimization and control
Abstracting and indexing
The journal is abstracted and indexed in:
Current Index to Statistics
Emerging Sources Citation Index
MathSciNet
Scopus
Zentralblatt MATH
References
External links
Statistics journals
Probability journals
English-language journals
Creative Commons Attribution-licensed journals
Quarterly journals
Academic journals established in 2014
Vilnius University
Taras Shevchenko National University of Kyiv |
```c
/*
*
*/
#include <zephyr/arch/arm64/arm-smccc.h>
#include <zephyr/drivers/tee.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/bitarray.h>
#include <zephyr/sys/dlist.h>
#include "optee_msg.h"
#include "optee_rpc_cmd.h"
#include "optee_smc.h"
LOG_MODULE_REGISTER(optee);
#define DT_DRV_COMPAT linaro_optee_tz
/* amount of physical addresses that can be stored in one page */
#define OPTEE_NUMBER_OF_ADDR_PER_PAGE (OPTEE_MSG_NONCONTIG_PAGE_SIZE / sizeof(uint64_t))
/*
* TEE Implementation ID
*/
#define TEE_IMPL_ID_OPTEE 1
/*
* OP-TEE specific capabilities
*/
#define TEE_OPTEE_CAP_TZ BIT(0)
struct optee_rpc_param {
uint32_t a0;
uint32_t a1;
uint32_t a2;
uint32_t a3;
uint32_t a4;
uint32_t a5;
uint32_t a6;
uint32_t a7;
};
typedef void (*smc_call_t)(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3,
unsigned long a4, unsigned long a5, unsigned long a6, unsigned long a7,
struct arm_smccc_res *res);
struct optee_driver_config {
const char *method;
};
struct optee_notify {
sys_dnode_t node;
uint32_t key;
struct k_sem wait;
};
struct optee_supp_req {
sys_dnode_t link;
bool in_queue;
uint32_t func;
uint32_t ret;
size_t num_params;
struct tee_param *param;
struct k_sem complete;
};
struct optee_supp {
/* Serializes access to this struct */
struct k_mutex mutex;
int req_id;
sys_dlist_t reqs;
struct optee_supp_req *current;
struct k_sem reqs_c;
};
struct optee_driver_data {
smc_call_t smc_call;
sys_bitarray_t *notif_bitmap;
sys_dlist_t notif;
struct k_spinlock notif_lock;
struct optee_supp supp;
unsigned long sec_caps;
struct k_sem call_sem;
};
/* Wrapping functions so function pointer can be used */
static void optee_smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3,
unsigned long a4, unsigned long a5, unsigned long a6, unsigned long a7,
struct arm_smccc_res *res)
{
arm_smccc_smc(a0, a1, a2, a3, a4, a5, a6, a7, res);
}
static void optee_smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3,
unsigned long a4, unsigned long a5, unsigned long a6, unsigned long a7,
struct arm_smccc_res *res)
{
arm_smccc_hvc(a0, a1, a2, a3, a4, a5, a6, a7, res);
}
static int param_to_msg_param(const struct tee_param *param, unsigned int num_param,
struct optee_msg_param *msg_param)
{
int i;
const struct tee_param *tp = param;
struct optee_msg_param *mtp = msg_param;
if (!param || !msg_param) {
return -EINVAL;
}
for (i = 0; i < num_param; i++, tp++, mtp++) {
if (!tp || !mtp) {
LOG_ERR("Wrong param on %d iteration", i);
return -EINVAL;
}
switch (tp->attr) {
case TEE_PARAM_ATTR_TYPE_NONE:
mtp->attr = OPTEE_MSG_ATTR_TYPE_NONE;
memset(&mtp->u, 0, sizeof(mtp->u));
break;
case TEE_PARAM_ATTR_TYPE_VALUE_INPUT:
case TEE_PARAM_ATTR_TYPE_VALUE_OUTPUT:
case TEE_PARAM_ATTR_TYPE_VALUE_INOUT:
mtp->attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT + tp->attr -
TEE_PARAM_ATTR_TYPE_VALUE_INPUT;
mtp->u.value.a = tp->a;
mtp->u.value.b = tp->b;
mtp->u.value.c = tp->c;
break;
case TEE_PARAM_ATTR_TYPE_MEMREF_INPUT:
case TEE_PARAM_ATTR_TYPE_MEMREF_OUTPUT:
case TEE_PARAM_ATTR_TYPE_MEMREF_INOUT:
mtp->attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT + tp->attr -
TEE_PARAM_ATTR_TYPE_MEMREF_INPUT;
mtp->u.rmem.shm_ref = tp->c;
mtp->u.rmem.size = tp->b;
mtp->u.rmem.offs = tp->a;
break;
default:
return -EINVAL;
}
}
return 0;
}
static void msg_param_to_tmp_mem(struct tee_param *p, uint32_t attr,
const struct optee_msg_param *mp)
{
struct tee_shm *shm = (struct tee_shm *)mp->u.tmem.shm_ref;
p->attr = TEE_PARAM_ATTR_TYPE_MEMREF_INPUT + attr - OPTEE_MSG_ATTR_TYPE_TMEM_INPUT;
p->b = mp->u.tmem.size;
if (!shm) {
p->a = 0;
p->c = 0;
return;
}
p->a = mp->u.tmem.buf_ptr - k_mem_phys_addr(shm->addr);
p->c = mp->u.tmem.shm_ref;
}
static int msg_param_to_param(struct tee_param *param, unsigned int num_param,
const struct optee_msg_param *msg_param)
{
int i;
struct tee_param *tp = param;
const struct optee_msg_param *mtp = msg_param;
if (!param || !msg_param) {
return -EINVAL;
}
for (i = 0; i < num_param; i++, tp++, mtp++) {
uint32_t attr = mtp->attr & OPTEE_MSG_ATTR_TYPE_MASK;
if (!tp || !mtp) {
LOG_ERR("Wrong param on %d iteration", i);
return -EINVAL;
}
switch (attr) {
case OPTEE_MSG_ATTR_TYPE_NONE:
memset(tp, 0, sizeof(*tp));
tp->attr = TEE_PARAM_ATTR_TYPE_NONE;
break;
case OPTEE_MSG_ATTR_TYPE_VALUE_INPUT:
case OPTEE_MSG_ATTR_TYPE_VALUE_OUTPUT:
case OPTEE_MSG_ATTR_TYPE_VALUE_INOUT:
tp->attr = TEE_PARAM_ATTR_TYPE_VALUE_INPUT + attr -
OPTEE_MSG_ATTR_TYPE_VALUE_INPUT;
tp->a = mtp->u.value.a;
tp->b = mtp->u.value.b;
tp->c = mtp->u.value.c;
break;
case OPTEE_MSG_ATTR_TYPE_RMEM_INPUT:
case OPTEE_MSG_ATTR_TYPE_RMEM_OUTPUT:
case OPTEE_MSG_ATTR_TYPE_RMEM_INOUT:
tp->attr = TEE_PARAM_ATTR_TYPE_MEMREF_INPUT + attr -
OPTEE_MSG_ATTR_TYPE_RMEM_INPUT;
tp->b = mtp->u.rmem.size;
if (!mtp->u.rmem.shm_ref) {
tp->a = 0;
tp->c = 0;
} else {
tp->a = mtp->u.rmem.offs;
tp->c = mtp->u.rmem.shm_ref;
}
break;
case OPTEE_MSG_ATTR_TYPE_TMEM_INPUT:
case OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT:
case OPTEE_MSG_ATTR_TYPE_TMEM_INOUT:
msg_param_to_tmp_mem(tp, attr, mtp);
break;
default:
return -EINVAL;
}
}
return 0;
}
static uint64_t regs_to_u64(uint32_t reg0, uint32_t reg1)
{
return (uint64_t)(((uint64_t)reg0 << 32) | reg1);
}
static void u64_to_regs(uint64_t val, uint32_t *reg0, uint32_t *reg1)
{
*reg0 = val >> 32;
*reg1 = val;
}
static inline bool check_param_input(struct optee_msg_arg *arg)
{
return arg->num_params == 1 &&
arg->params[0].attr == OPTEE_MSG_ATTR_TYPE_VALUE_INPUT;
}
static void *optee_construct_page_list(void *buf, uint32_t len, uint64_t *phys_buf);
static uint32_t optee_call_supp(const struct device *dev, uint32_t func, size_t num_params,
struct tee_param *param)
{
struct optee_driver_data *data = (struct optee_driver_data *)dev->data;
struct optee_supp *supp = &data->supp;
struct optee_supp_req *req;
uint32_t ret;
req = k_malloc(sizeof(*req));
if (!req) {
return TEEC_ERROR_OUT_OF_MEMORY;
}
k_sem_init(&req->complete, 0, 1);
req->func = func;
req->num_params = num_params;
req->param = param;
/* Insert the request in the request list */
k_mutex_lock(&supp->mutex, K_FOREVER);
sys_dlist_append(&supp->reqs, &req->link);
k_mutex_unlock(&supp->mutex);
/* Tell an event listener there's a new request */
k_sem_give(&supp->reqs_c);
/*
* Wait for supplicant to process and return result, once we've
* returned from k_sem_take(&req->c) successfully we have
* exclusive access again.
*/
k_sem_take(&req->complete, K_FOREVER);
ret = req->ret;
k_free(req);
return ret;
}
static int cmd_alloc_suppl(const struct device *dev, size_t sz, struct tee_shm **shm)
{
uint32_t ret;
struct tee_param param;
param.attr = TEE_PARAM_ATTR_TYPE_VALUE_INOUT;
param.a = OPTEE_RPC_SHM_TYPE_APPL;
param.b = sz;
param.c = 0;
ret = optee_call_supp(dev, OPTEE_RPC_CMD_SHM_ALLOC, 1, ¶m);
if (ret) {
return ret;
}
ret = tee_add_shm(dev, (void *)param.c, 0, param.b, 0, shm);
return ret;
}
static void cmd_free_suppl(const struct device *dev, struct tee_shm *shm)
{
struct tee_param param;
param.attr = TEE_PARAM_ATTR_TYPE_VALUE_INOUT;
param.a = OPTEE_RPC_SHM_TYPE_APPL;
param.b = (uint64_t)shm;
param.c = 0;
optee_call_supp(dev, OPTEE_RPC_CMD_SHM_FREE, 1, ¶m);
tee_rm_shm(dev, shm);
}
static void handle_cmd_alloc(const struct device *dev, struct optee_msg_arg *arg,
void **pages)
{
int rc;
struct tee_shm *shm = NULL;
void *pl;
uint64_t pl_phys_and_offset;
arg->ret_origin = TEEC_ORIGIN_COMMS;
if (!check_param_input(arg)) {
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
return;
}
switch (arg->params[0].u.value.a) {
case OPTEE_RPC_SHM_TYPE_KERNEL:
/* TODO handle situation when shm was allocated statically so buffer can be reused*/
rc = tee_add_shm(dev, NULL, 0, arg->params[0].u.value.b, TEE_SHM_ALLOC, &shm);
break;
case OPTEE_RPC_SHM_TYPE_APPL:
rc = cmd_alloc_suppl(dev, arg->params[0].u.value.b, &shm);
break;
default:
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
return;
}
if (rc) {
if (rc == -ENOMEM) {
arg->ret = TEEC_ERROR_OUT_OF_MEMORY;
} else {
arg->ret = TEEC_ERROR_GENERIC;
}
return;
}
pl = optee_construct_page_list(shm->addr, shm->size, &pl_phys_and_offset);
if (!pl) {
arg->ret = TEEC_ERROR_OUT_OF_MEMORY;
goto out;
}
*pages = pl;
arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT | OPTEE_MSG_ATTR_NONCONTIG;
arg->params[0].u.tmem.buf_ptr = pl_phys_and_offset;
arg->params[0].u.tmem.size = shm->size;
arg->params[0].u.tmem.shm_ref = (uint64_t)shm;
arg->ret = TEEC_SUCCESS;
return;
out:
tee_shm_free(dev, shm);
}
static void handle_cmd_free(const struct device *dev, struct optee_msg_arg *arg)
{
int rc = 0;
if (!check_param_input(arg)) {
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
return;
}
switch (arg->params[0].u.value.a) {
case OPTEE_RPC_SHM_TYPE_KERNEL:
rc = tee_rm_shm(dev, (struct tee_shm *)arg->params[0].u.value.b);
break;
case OPTEE_RPC_SHM_TYPE_APPL:
cmd_free_suppl(dev, (struct tee_shm *)arg->params[0].u.value.b);
break;
default:
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
return;
}
if (rc) {
arg->ret = TEEC_ERROR_OUT_OF_MEMORY;
return;
}
arg->ret = TEEC_SUCCESS;
}
static void handle_cmd_get_time(const struct device *dev, struct optee_msg_arg *arg)
{
int64_t ticks;
int64_t up_secs;
int64_t up_nsecs;
if (arg->num_params != 1 ||
(arg->params[0].attr & OPTEE_MSG_ATTR_TYPE_MASK)
!= OPTEE_MSG_ATTR_TYPE_VALUE_OUTPUT) {
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
return;
}
ticks = k_uptime_ticks();
up_secs = ticks / CONFIG_SYS_CLOCK_TICKS_PER_SEC;
up_nsecs = k_ticks_to_ns_floor64(ticks - up_secs * CONFIG_SYS_CLOCK_TICKS_PER_SEC);
arg->params[0].u.value.a = up_secs;
arg->params[0].u.value.b = up_nsecs;
arg->ret = TEEC_SUCCESS;
}
/* This should be called under notif_lock */
static inline bool key_is_pending(struct optee_driver_data *data, uint32_t key)
{
struct optee_notify *iter;
SYS_DLIST_FOR_EACH_CONTAINER(&data->notif, iter, node) {
if (iter->key == key) {
k_sem_give(&iter->wait);
return true;
}
}
return false;
}
static int optee_notif_send(const struct device *dev, uint32_t key)
{
struct optee_driver_data *data = dev->data;
k_spinlock_key_t sp_key;
if (key > CONFIG_OPTEE_MAX_NOTIF) {
return -EINVAL;
}
sp_key = k_spin_lock(&data->notif_lock);
if (!key_is_pending(data, key)) {
/* If nobody is waiting for key - set bit in the bitmap */
sys_bitarray_set_bit(data->notif_bitmap, key);
}
k_spin_unlock(&data->notif_lock, sp_key);
return 0;
}
static int optee_notif_wait(const struct device *dev, uint32_t key)
{
int rc = 0;
struct optee_driver_data *data = dev->data;
struct optee_notify *entry;
k_spinlock_key_t sp_key;
int prev_val;
if (key > CONFIG_OPTEE_MAX_NOTIF)
return -EINVAL;
entry = k_malloc(sizeof(*entry));
if (!entry) {
return -ENOMEM;
}
k_sem_init(&entry->wait, 0, 1);
entry->key = key;
sp_key = k_spin_lock(&data->notif_lock);
/*
* If notif bit was set then SEND command was already received.
* Skipping wait.
*/
rc = sys_bitarray_test_and_clear_bit(data->notif_bitmap, key, &prev_val);
if (rc || prev_val) {
goto out;
}
/*
* If key is already registred, then skip.
*/
if (key_is_pending(data, key)) {
rc = -EBUSY;
goto out;
}
sys_dlist_append(&data->notif, &entry->node);
k_spin_unlock(&data->notif_lock, sp_key);
k_sem_take(&entry->wait, K_FOREVER);
sp_key = k_spin_lock(&data->notif_lock);
sys_dlist_remove(&entry->node);
out:
k_spin_unlock(&data->notif_lock, sp_key);
k_free(entry);
return rc;
}
static void handle_cmd_notify(const struct device *dev, struct optee_msg_arg *arg)
{
if (!check_param_input(arg)) {
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
return;
}
switch (arg->params[0].u.value.a) {
case OPTEE_RPC_NOTIFICATION_SEND:
if (optee_notif_send(dev, arg->params[0].u.value.b)) {
goto err;
}
break;
case OPTEE_RPC_NOTIFICATION_WAIT:
if (optee_notif_wait(dev, arg->params[0].u.value.b)) {
goto err;
}
break;
default:
goto err;
}
arg->ret = TEEC_SUCCESS;
return;
err:
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
}
static void handle_cmd_wait(const struct device *dev, struct optee_msg_arg *arg)
{
if (!check_param_input(arg)) {
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
return;
}
k_sleep(K_MSEC(arg->params[0].u.value.a));
arg->ret = TEEC_SUCCESS;
}
static void free_shm_pages(void **pages)
{
/*
* Clean allocated pages if needed. Some function calls requires pages
* allocation which should be freed after processing new request.
* It is safe to free this list when another SHM op (e,g. another alloc
* or free) was received.
*/
if (*pages) {
k_free(*pages);
*pages = NULL;
}
}
static void handle_rpc_supp_cmd(const struct device *dev, struct optee_msg_arg *arg)
{
struct tee_param *params;
int ret;
arg->ret_origin = TEEC_ORIGIN_COMMS;
params = k_malloc(sizeof(*params) * arg->num_params);
if (!params) {
arg->ret = TEEC_ERROR_OUT_OF_MEMORY;
return;
}
ret = msg_param_to_param(params, arg->num_params, arg->params);
if (ret) {
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
arg->ret_origin = TEEC_ORIGIN_COMMS;
goto out;
}
arg->ret = optee_call_supp(dev, arg->cmd, arg->num_params, params);
ret = param_to_msg_param(params, arg->num_params, arg->params);
if (ret) {
arg->ret = TEEC_ERROR_GENERIC;
arg->ret_origin = TEEC_ORIGIN_COMMS;
}
out:
k_free(params);
}
static uint32_t handle_func_rpc_call(const struct device *dev, struct tee_shm *shm,
void **pages)
{
struct optee_msg_arg *arg = shm->addr;
switch (arg->cmd) {
case OPTEE_RPC_CMD_SHM_ALLOC:
free_shm_pages(pages);
handle_cmd_alloc(dev, arg, pages);
break;
case OPTEE_RPC_CMD_SHM_FREE:
handle_cmd_free(dev, arg);
break;
case OPTEE_RPC_CMD_GET_TIME:
handle_cmd_get_time(dev, arg);
break;
case OPTEE_RPC_CMD_NOTIFICATION:
handle_cmd_notify(dev, arg);
break;
case OPTEE_RPC_CMD_SUSPEND:
handle_cmd_wait(dev, arg);
break;
case OPTEE_RPC_CMD_I2C_TRANSFER:
/* TODO: i2c transfer case is not implemented right now */
return TEEC_ERROR_NOT_IMPLEMENTED;
default:
handle_rpc_supp_cmd(dev, arg);
break;
}
return OPTEE_SMC_CALL_RETURN_FROM_RPC;
}
static void handle_rpc_call(const struct device *dev, struct optee_rpc_param *param,
void **pages)
{
struct tee_shm *shm = NULL;
uint32_t res = OPTEE_SMC_CALL_RETURN_FROM_RPC;
switch (OPTEE_SMC_RETURN_GET_RPC_FUNC(param->a0)) {
case OPTEE_SMC_RPC_FUNC_ALLOC:
if (!tee_add_shm(dev, NULL, OPTEE_MSG_NONCONTIG_PAGE_SIZE,
param->a1,
TEE_SHM_ALLOC, &shm)) {
u64_to_regs((uint64_t)k_mem_phys_addr(shm->addr), ¶m->a1, ¶m->a2);
u64_to_regs((uint64_t)shm, ¶m->a4, ¶m->a5);
} else {
param->a1 = 0;
param->a2 = 0;
param->a4 = 0;
param->a5 = 0;
}
break;
case OPTEE_SMC_RPC_FUNC_FREE:
shm = (struct tee_shm *)regs_to_u64(param->a1, param->a2);
tee_rm_shm(dev, shm);
break;
case OPTEE_SMC_RPC_FUNC_FOREIGN_INTR:
/* Foreign interrupt was raised */
break;
case OPTEE_SMC_RPC_FUNC_CMD:
shm = (struct tee_shm *)regs_to_u64(param->a1, param->a2);
res = handle_func_rpc_call(dev, shm, pages);
break;
default:
break;
}
param->a0 = res;
}
static int optee_call(const struct device *dev, struct optee_msg_arg *arg)
{
struct optee_driver_data *data = (struct optee_driver_data *)dev->data;
struct optee_rpc_param param = {
.a0 = OPTEE_SMC_CALL_WITH_ARG
};
void *pages = NULL;
u64_to_regs((uint64_t)k_mem_phys_addr(arg), ¶m.a1, ¶m.a2);
k_sem_take(&data->call_sem, K_FOREVER);
while (true) {
struct arm_smccc_res res;
data->smc_call(param.a0, param.a1, param.a2, param.a3,
param.a4, param.a5, param.a6, param.a7, &res);
if (OPTEE_SMC_RETURN_IS_RPC(res.a0)) {
param.a0 = res.a0;
param.a1 = res.a1;
param.a2 = res.a2;
param.a3 = res.a3;
handle_rpc_call(dev, ¶m, &pages);
} else {
free_shm_pages(&pages);
k_sem_give(&data->call_sem);
return res.a0 == OPTEE_SMC_RETURN_OK ? TEEC_SUCCESS :
TEEC_ERROR_BAD_PARAMETERS;
}
}
}
static int optee_get_version(const struct device *dev, struct tee_version_info *info)
{
if (!info) {
return -EINVAL;
}
/*
* TODO Version and capabilities should be requested from
* OP-TEE OS.
*/
info->impl_id = TEE_IMPL_ID_OPTEE;
info->impl_caps = TEE_OPTEE_CAP_TZ;
info->gen_caps = TEE_GEN_CAP_GP | TEE_GEN_CAP_REG_MEM;
return 0;
}
static int optee_close_session(const struct device *dev, uint32_t session_id)
{
int rc;
struct tee_shm *shm;
struct optee_msg_arg *marg;
rc = tee_add_shm(dev, NULL, OPTEE_MSG_NONCONTIG_PAGE_SIZE,
OPTEE_MSG_GET_ARG_SIZE(0),
TEE_SHM_ALLOC, &shm);
if (rc) {
LOG_ERR("Unable to get shared memory, rc = %d", rc);
return rc;
}
marg = shm->addr;
marg->num_params = 0;
marg->cmd = OPTEE_MSG_CMD_CLOSE_SESSION;
marg->session = session_id;
rc = optee_call(dev, marg);
if (tee_rm_shm(dev, shm)) {
LOG_ERR("Unable to free shared memory");
}
return rc;
}
static int optee_open_session(const struct device *dev, struct tee_open_session_arg *arg,
unsigned int num_param, struct tee_param *param,
uint32_t *session_id)
{
int rc, ret;
struct tee_shm *shm;
struct optee_msg_arg *marg;
if (!arg || !session_id) {
return -EINVAL;
}
rc = tee_add_shm(dev, NULL, OPTEE_MSG_NONCONTIG_PAGE_SIZE,
OPTEE_MSG_GET_ARG_SIZE(num_param + 2),
TEE_SHM_ALLOC, &shm);
if (rc) {
LOG_ERR("Unable to get shared memory, rc = %d", rc);
return rc;
}
marg = shm->addr;
memset(marg, 0, OPTEE_MSG_GET_ARG_SIZE(num_param + 2));
marg->num_params = num_param + 2;
marg->cmd = OPTEE_MSG_CMD_OPEN_SESSION;
marg->params[0].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | OPTEE_MSG_ATTR_META;
marg->params[1].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | OPTEE_MSG_ATTR_META;
memcpy(&marg->params[0].u.value, arg->uuid, sizeof(arg->uuid));
memcpy(&marg->params[1].u.value, arg->uuid, sizeof(arg->clnt_uuid));
marg->params[1].u.value.c = arg->clnt_login;
rc = param_to_msg_param(param, num_param, marg->params + 2);
if (rc) {
goto out;
}
arg->ret = optee_call(dev, marg);
if (arg->ret) {
arg->ret_origin = TEEC_ORIGIN_COMMS;
goto out;
}
rc = msg_param_to_param(param, num_param, marg->params);
if (rc) {
arg->ret = TEEC_ERROR_COMMUNICATION;
arg->ret_origin = TEEC_ORIGIN_COMMS;
/*
* Ret is needed here only to print an error. Param conversion error
* should be returned from the function.
*/
ret = optee_close_session(dev, marg->session);
if (ret) {
LOG_ERR("Unable to close session: %d", ret);
}
goto out;
}
*session_id = marg->session;
arg->ret = marg->ret;
arg->ret_origin = marg->ret_origin;
out:
ret = tee_rm_shm(dev, shm);
if (ret) {
LOG_ERR("Unable to free shared memory");
}
return (rc) ? rc : ret;
}
static int optee_cancel(const struct device *dev, uint32_t session_id, uint32_t cancel_id)
{
int rc;
struct tee_shm *shm;
struct optee_msg_arg *marg;
rc = tee_add_shm(dev, NULL, OPTEE_MSG_NONCONTIG_PAGE_SIZE,
OPTEE_MSG_GET_ARG_SIZE(0),
TEE_SHM_ALLOC, &shm);
if (rc) {
LOG_ERR("Unable to get shared memory, rc = %d", rc);
return rc;
}
marg = shm->addr;
marg->num_params = 0;
marg->cmd = OPTEE_MSG_CMD_CANCEL;
marg->cancel_id = cancel_id;
marg->session = session_id;
rc = optee_call(dev, marg);
if (tee_rm_shm(dev, shm)) {
LOG_ERR("Unable to free shared memory");
}
return rc;
}
static int optee_invoke_func(const struct device *dev, struct tee_invoke_func_arg *arg,
unsigned int num_param, struct tee_param *param)
{
int rc, ret;
struct tee_shm *shm;
struct optee_msg_arg *marg;
if (!arg) {
return -EINVAL;
}
rc = tee_add_shm(dev, NULL, OPTEE_MSG_NONCONTIG_PAGE_SIZE,
OPTEE_MSG_GET_ARG_SIZE(num_param),
TEE_SHM_ALLOC, &shm);
if (rc) {
LOG_ERR("Unable to get shared memory, rc = %d", rc);
return rc;
}
marg = shm->addr;
memset(marg, 0, OPTEE_MSG_GET_ARG_SIZE(num_param));
marg->num_params = num_param;
marg->cmd = OPTEE_MSG_CMD_INVOKE_COMMAND;
marg->func = arg->func;
marg->session = arg->session;
rc = param_to_msg_param(param, num_param, marg->params);
if (rc) {
goto out;
}
arg->ret = optee_call(dev, marg);
if (arg->ret) {
arg->ret_origin = TEEC_ORIGIN_COMMS;
goto out;
}
rc = msg_param_to_param(param, num_param, marg->params);
if (rc) {
arg->ret = TEEC_ERROR_COMMUNICATION;
arg->ret_origin = TEEC_ORIGIN_COMMS;
goto out;
}
arg->ret = marg->ret;
arg->ret_origin = marg->ret_origin;
out:
ret = tee_rm_shm(dev, shm);
if (ret) {
LOG_ERR("Unable to free shared memory");
}
return (rc) ? rc : ret;
}
static void *optee_construct_page_list(void *buf, uint32_t len, uint64_t *phys_buf)
{
const size_t page_size = OPTEE_MSG_NONCONTIG_PAGE_SIZE;
const size_t num_pages_in_pl = OPTEE_NUMBER_OF_ADDR_PER_PAGE - 1;
uint32_t page_offset = (uintptr_t)buf & (page_size - 1);
uint8_t *buf_page;
uint32_t num_pages;
uint32_t list_size;
/* see description of OPTEE_MSG_ATTR_NONCONTIG */
struct {
uint64_t pages[OPTEE_NUMBER_OF_ADDR_PER_PAGE - 1];
uint64_t next_page;
} *pl;
BUILD_ASSERT(sizeof(*pl) == OPTEE_MSG_NONCONTIG_PAGE_SIZE);
num_pages = ROUND_UP(page_offset + len, page_size) / page_size;
list_size = DIV_ROUND_UP(num_pages, num_pages_in_pl) * page_size;
pl = k_aligned_alloc(page_size, list_size);
if (!pl) {
return NULL;
}
memset(pl, 0, list_size);
buf_page = (uint8_t *)ROUND_DOWN((uintptr_t)buf, page_size);
for (uint32_t pl_idx = 0; pl_idx < list_size / page_size; pl_idx++) {
for (uint32_t page_idx = 0; num_pages && page_idx < num_pages_in_pl; page_idx++) {
pl[pl_idx].pages[page_idx] = k_mem_phys_addr(buf_page);
buf_page += page_size;
num_pages--;
}
if (!num_pages) {
break;
}
pl[pl_idx].next_page = k_mem_phys_addr(pl + 1);
}
/* 12 least significant bits of optee_msg_param.u.tmem.buf_ptr should hold page offset
* of user buffer
*/
*phys_buf = k_mem_phys_addr(pl) | page_offset;
return pl;
}
static int optee_shm_register(const struct device *dev, struct tee_shm *shm)
{
struct tee_shm *shm_arg;
struct optee_msg_arg *msg_arg;
void *pl;
uint64_t pl_phys_and_offset;
int rc;
rc = tee_add_shm(dev, NULL, OPTEE_MSG_NONCONTIG_PAGE_SIZE, OPTEE_MSG_GET_ARG_SIZE(1),
TEE_SHM_ALLOC, &shm_arg);
if (rc) {
return rc;
}
msg_arg = shm_arg->addr;
memset(msg_arg, 0, OPTEE_MSG_GET_ARG_SIZE(1));
pl = optee_construct_page_list(shm->addr, shm->size, &pl_phys_and_offset);
if (!pl) {
rc = -ENOMEM;
goto out;
}
/* for this command op-tee os should support CFG_CORE_DYN_SHM */
msg_arg->cmd = OPTEE_MSG_CMD_REGISTER_SHM;
/* op-tee OS ingnore this cmd in case when TYPE_TMEM_OUTPUT and NONCONTIG aren't set */
msg_arg->params->attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT | OPTEE_MSG_ATTR_NONCONTIG;
msg_arg->num_params = 1;
msg_arg->params->u.tmem.buf_ptr = pl_phys_and_offset;
msg_arg->params->u.tmem.shm_ref = (uint64_t)shm;
msg_arg->params->u.tmem.size = shm->size;
if (optee_call(dev, msg_arg)) {
rc = -EINVAL;
}
k_free(pl);
out:
tee_rm_shm(dev, shm_arg);
return rc;
}
static int optee_shm_unregister(const struct device *dev, struct tee_shm *shm)
{
struct tee_shm *shm_arg;
struct optee_msg_arg *msg_arg;
int rc;
rc = tee_add_shm(dev, NULL, OPTEE_MSG_NONCONTIG_PAGE_SIZE, OPTEE_MSG_GET_ARG_SIZE(1),
TEE_SHM_ALLOC, &shm_arg);
if (rc) {
return rc;
}
msg_arg = shm_arg->addr;
memset(msg_arg, 0, OPTEE_MSG_GET_ARG_SIZE(1));
msg_arg->cmd = OPTEE_MSG_CMD_UNREGISTER_SHM;
msg_arg->num_params = 1;
msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT;
msg_arg->params[0].u.rmem.shm_ref = (uint64_t)shm;
if (optee_call(dev, msg_arg)) {
rc = -EINVAL;
}
tee_rm_shm(dev, shm_arg);
return rc;
}
static int optee_suppl_recv(const struct device *dev, uint32_t *func, unsigned int *num_params,
struct tee_param *param)
{
struct optee_driver_data *data = (struct optee_driver_data *)dev->data;
struct optee_supp *supp = &data->supp;
struct optee_supp_req *req = NULL;
while (true) {
k_mutex_lock(&supp->mutex, K_FOREVER);
req = (struct optee_supp_req *)sys_dlist_peek_head(&supp->reqs);
if (req) {
if (supp->current) {
LOG_ERR("Concurrent supp_recv calls are not supported");
k_mutex_unlock(&supp->mutex);
return -EBUSY;
}
if (*num_params < req->num_params) {
LOG_ERR("Not enough space for params, need at least %lu",
req->num_params);
k_mutex_unlock(&supp->mutex);
return -EINVAL;
}
supp->current = req;
sys_dlist_remove(&req->link);
}
k_mutex_unlock(&supp->mutex);
if (req) {
break;
}
k_sem_take(&supp->reqs_c, K_FOREVER);
}
*func = req->func;
*num_params = req->num_params;
memcpy(param, req->param, sizeof(struct tee_param) * req->num_params);
return 0;
}
static int optee_suppl_send(const struct device *dev, unsigned int ret, unsigned int num_params,
struct tee_param *param)
{
struct optee_driver_data *data = (struct optee_driver_data *)dev->data;
struct optee_supp *supp = &data->supp;
struct optee_supp_req *req = NULL;
size_t n;
k_mutex_lock(&supp->mutex, K_FOREVER);
if (supp->current && num_params >= supp->current->num_params) {
req = supp->current;
supp->current = NULL;
} else {
LOG_ERR("Invalid number of parameters, expected %lu got %u", req->num_params,
num_params);
}
k_mutex_unlock(&supp->mutex);
if (!req) {
return -EINVAL;
}
/* Update out and in/out parameters */
for (n = 0; n < req->num_params; n++) {
struct tee_param *p = req->param + n;
switch (p->attr & TEE_PARAM_ATTR_TYPE_MASK) {
case TEE_PARAM_ATTR_TYPE_VALUE_OUTPUT:
case TEE_PARAM_ATTR_TYPE_VALUE_INOUT:
p->a = param[n].a;
p->b = param[n].b;
p->c = param[n].c;
break;
case TEE_PARAM_ATTR_TYPE_MEMREF_OUTPUT:
case TEE_PARAM_ATTR_TYPE_MEMREF_INOUT:
LOG_WRN("Memref params are not fully tested");
p->a = param[n].a;
p->b = param[n].b;
p->c = param[n].c;
break;
default:
break;
}
}
req->ret = ret;
/* Let the requesting thread continue */
k_mutex_lock(&supp->mutex, K_FOREVER);
supp->current = NULL;
k_mutex_unlock(&supp->mutex);
k_sem_give(&req->complete);
return 0;
}
static int set_optee_method(const struct device *dev)
{
const struct optee_driver_config *conf = dev->config;
struct optee_driver_data *data = dev->data;
if (!strcmp("hvc", conf->method)) {
data->smc_call = optee_smccc_hvc;
} else if (!strcmp("smc", conf->method)) {
data->smc_call = optee_smccc_smc;
} else {
LOG_ERR("Invalid smc_call method");
return -EINVAL;
}
return 0;
}
static bool optee_check_uid(const struct device *dev)
{
struct arm_smccc_res res;
struct optee_driver_data *data = (struct optee_driver_data *)dev->data;
data->smc_call(OPTEE_SMC_CALLS_UID, 0, 0, 0, 0, 0, 0, 0, &res);
if (res.a0 == OPTEE_MSG_UID_0 && res.a1 == OPTEE_MSG_UID_1 &&
res.a2 == OPTEE_MSG_UID_2 && res.a3 == OPTEE_MSG_UID_3) {
return true;
}
return false;
}
static void optee_get_revision(const struct device *dev)
{
struct optee_driver_data *data = (struct optee_driver_data *)dev->data;
struct arm_smccc_res res = { 0 };
data->smc_call(OPTEE_SMC_CALL_GET_OS_REVISION, 0, 0, 0, 0, 0, 0, 0, &res);
if (res.a2) {
LOG_INF("OPTEE revision %lu.%lu (%08lx)", res.a0,
res.a1, res.a2);
} else {
LOG_INF("OPTEE revision %lu.%lu", res.a0, res.a1);
}
}
static bool optee_exchange_caps(const struct device *dev, unsigned long *sec_caps)
{
struct optee_driver_data *data = (struct optee_driver_data *)dev->data;
struct arm_smccc_res res = { 0 };
unsigned long a1 = 0;
if (!IS_ENABLED(CONFIG_SMP) || arch_num_cpus() == 1) {
a1 |= OPTEE_SMC_NSEC_CAP_UNIPROCESSOR;
}
data->smc_call(OPTEE_SMC_EXCHANGE_CAPABILITIES, a1, 0, 0, 0, 0, 0, 0, &res);
if (res.a0 != OPTEE_SMC_RETURN_OK) {
return false;
}
*sec_caps = res.a1;
return true;
}
static unsigned long optee_get_thread_count(const struct device *dev, unsigned long *thread_count)
{
struct optee_driver_data *data = (struct optee_driver_data *)dev->data;
struct arm_smccc_res res = { 0 };
unsigned long a1 = 0;
data->smc_call(OPTEE_SMC_GET_THREAD_COUNT, a1, 0, 0, 0, 0, 0, 0, &res);
if (res.a0 != OPTEE_SMC_RETURN_OK) {
return false;
}
*thread_count = res.a1;
return true;
}
static int optee_init(const struct device *dev)
{
struct optee_driver_data *data = dev->data;
unsigned long thread_count;
if (set_optee_method(dev)) {
return -ENOTSUP;
}
sys_dlist_init(&data->notif);
k_mutex_init(&data->supp.mutex);
k_sem_init(&data->supp.reqs_c, 0, 1);
sys_dlist_init(&data->supp.reqs);
if (!optee_check_uid(dev)) {
LOG_ERR("OPTEE API UID mismatch");
return -EINVAL;
}
optee_get_revision(dev);
if (!optee_exchange_caps(dev, &data->sec_caps)) {
LOG_ERR("OPTEE capabilities exchange failed\n");
return -EINVAL;
}
if (!(data->sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM)) {
LOG_ERR("OPTEE does not support dynamic shared memory");
return -ENOTSUP;
}
if (!optee_get_thread_count(dev, &thread_count)) {
LOG_ERR("OPTEE unable to get maximum thread count");
return -ENOTSUP;
}
k_sem_init(&data->call_sem, thread_count, thread_count);
return 0;
}
static const struct tee_driver_api optee_driver_api = {
.get_version = optee_get_version,
.open_session = optee_open_session,
.close_session = optee_close_session,
.cancel = optee_cancel,
.invoke_func = optee_invoke_func,
.shm_register = optee_shm_register,
.shm_unregister = optee_shm_unregister,
.suppl_recv = optee_suppl_recv,
.suppl_send = optee_suppl_send,
};
/*
* Bitmap of the ongoing notificatons, received from OP-TEE. Maximum number is
* CONFIG_OPTEE_MAX_NOTIF. This bitmap is needed to handle case when SEND command
* was received before WAIT command from OP-TEE. In this case WAIT will not create
* locks.
*/
#define OPTEE_DT_DEVICE_INIT(inst) \
SYS_BITARRAY_DEFINE_STATIC(notif_bitmap_##inst, CONFIG_OPTEE_MAX_NOTIF); \
\
static struct optee_driver_config optee_config_##inst = { \
.method = DT_INST_PROP(inst, method) \
}; \
\
static struct optee_driver_data optee_data_##inst = { \
.notif_bitmap = ¬if_bitmap_##inst \
}; \
\
DEVICE_DT_INST_DEFINE(inst, optee_init, NULL, &optee_data_##inst, \
&optee_config_##inst, POST_KERNEL, \
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
&optee_driver_api); \
DT_INST_FOREACH_STATUS_OKAY(OPTEE_DT_DEVICE_INIT)
``` |
```smalltalk
// snippet-start:[BedrockRuntime.dotnetv3.InvokeModel_Ai21LabsJurassic2]
// Use the native inference API to send a text message to AI21 Labs Jurassic-2.
using System;
using System.IO;
using System.Text.Json;
using System.Text.Json.Nodes;
using Amazon;
using Amazon.BedrockRuntime;
using Amazon.BedrockRuntime.Model;
// Create a Bedrock Runtime client in the AWS Region you want to use.
var client = new AmazonBedrockRuntimeClient(RegionEndpoint.USEast1);
// Set the model ID, e.g., Jurassic-2 Mid.
var modelId = "ai21.j2-mid-v1";
// Define the user message.
var userMessage = "Describe the purpose of a 'hello world' program in one line.";
//Format the request payload using the model's native structure.
var nativeRequest = JsonSerializer.Serialize(new
{
prompt = userMessage,
maxTokens = 512,
temperature = 0.5
});
// Create a request with the model ID and the model's native request payload.
var request = new InvokeModelRequest()
{
ModelId = modelId,
Body = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(nativeRequest)),
ContentType = "application/json"
};
try
{
// Send the request to the Bedrock Runtime and wait for the response.
var response = await client.InvokeModelAsync(request);
// Decode the response body.
var modelResponse = await JsonNode.ParseAsync(response.Body);
// Extract and print the response text.
var responseText = modelResponse["completions"]?[0]?["data"]?["text"] ?? "";
Console.WriteLine(responseText);
}
catch (AmazonBedrockRuntimeException e)
{
Console.WriteLine($"ERROR: Can't invoke '{modelId}'. Reason: {e.Message}");
throw;
}
// snippet-end:[BedrockRuntime.dotnetv3.InvokeModel_Ai21LabsJurassic2]
// Create a partial class to make the top-level script testable.
namespace Ai21LabsJurassic2 { public partial class InvokeModel { } }
``` |
Christian Djidagui Nassif (born 1 January 1994 in Bangui, Central African Republic) is a Central African swimmer specializing in freestyle. He competed in the 50 m event at the 2012 Summer Olympics and finished with a rank of 55. He also competed in the 50 meter event at the 2013 World Aquatics Championships.
References
External links
1994 births
Living people
Sportspeople from Bangui
Central African Republic male freestyle swimmers
Swimmers at the 2012 Summer Olympics
Swimmers at the 2016 Summer Olympics
Olympic swimmers for the Central African Republic |
```ruby
# coding: US-ASCII
# frozen_string_literal: false
require 'logger'
class TestLoggerSeverity < Test::Unit::TestCase
def test_enum
logger_levels = Logger.constants
levels = ["WARN", "UNKNOWN", "INFO", "FATAL", "DEBUG", "ERROR"]
Logger::Severity.constants.each do |level|
assert(levels.include?(level.to_s))
assert(logger_levels.include?(level))
end
assert_equal(levels.size, Logger::Severity.constants.size)
end
def test_level_assignment
logger = Logger.new(nil)
Logger::Severity.constants.each do |level|
next if level == :UNKNOWN
logger.send("#{level.downcase}!")
assert(logger.level) == Logger::Severity.const_get(level)
end
end
end
``` |
```scss
// Import your custom theme
@import '../../theme.scss';
.footer-list {
padding: 0 2em;
margin-bottom: 2em;
&__title {
color: mat-color($monocular-app-primary);
font-weight: bold;
vertical-align: top;
margin-bottom: 1em;
}
&__list {
ul {
list-style: none;
padding: 0;
margin: 0;
li {
padding: 0;
margin-bottom: .5em;
}
}
}
@include mappy-bp(small) {
&, &__title, &__list {
display: inline-block;
}
&__list {
ul {
padding-left: 2em;
}
}
}
}
``` |
Vamshi is an Indian Kannada-language action drama film starring Puneeth Rajkumar and Nikita Thukral. It is directed by Prakash and produced by Parvathamma Rajkumar. The film was released on 2 October 2008.
Plot
Vamshi is a trainee in police academy, also short-tempered which makes him land in trouble. Once after training, while he is about to be transferred to Bangalore for posting, Vamshi's past reveals that he is the son of a Kotnal Ramanna (KR), a former crime boss, who was recently murdered by the other group led by a rival gangster Jayachandra.
Vamshi's anger and his parentage, along with DCP Reddy's involvement with Jayachandra, ends Vamshi's police interview being botched. Dejected, Vamshi is forced to join KR's team as its new leader, and is helped by another politician to kill Jayachandra and other enemies. While doing so, he drifts away from his mother and his girlfriend Sharadha aka Sharu.
After killing Jayachandra, Vamshi learns about his mother's tragic past and also about the importance, love and affection of the near ones. Vamshi changes back to the normal life, but his own team and the politician, who sided with Reddy turn against him, because they want Vamshi to continue to be in the syndicate business. A fight ensues between the group and Vamshi, in which Vamshi finally kills the gang and Reddy. Finally, Vamshi takes up the job as a school teacher and lives happily with Sharu and his mother.
Cast
Soundtrack
The background score and soundtrack of the film was composed by R. P. Patnaik, with lyrics for the soundtrack penned by V. Nagendra Prasad and Ram Narayan. The song "Thayi Thayi" was reused from the 1993 Kannada film Hoovu Hannu, which also starred Lakshmi. The soundtrack album comprises six tracks.
Reception
Rediff.com wrote, "Vamshi is a different film for director Prakash and actor Puneet Raj Kumar. However, despite Prakash's emotionally-charged narration the story of this Kannada flick lacks credibility". A critic from Bangalore Mirror wrote "Puneeth is impressive in action and song sequences but that does not compensate for a narrative that is lethargic in parts and music that is uninspired. Rajkumar’s decade old song from the film Hoovu Hannu is a highlight. A disappointment overall from the Puneeth-Prakash duo whose last film Milana ran for a year".
Box office
Despite the mixed reviews, the film was declared as a super hit at the box-office . It completed 100 days in more than 12 centers across the state. The movie was dubbed in Malayalam.
References
External links
2000s Kannada-language films
2008 films
Indian action drama films
2000s masala films
Films shot in Bangalore
Films shot in Switzerland
Fictional portrayals of the Karnataka Police
Indian police films
2000s vigilante films
Indian vigilante films
2008 action drama films |
```python
#
#
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
import torch
import time
import argparse
from ipex_llm.transformers import AutoModelForCausalLM
from transformers import LlamaTokenizer
# you could tune the prompt based on your own model,
# here the prompt tuning refers to path_to_url#prompt-style
DEFAULT_SYSTEM_PROMPT = """\
"""
def get_prompt(message: str, chat_history: list[tuple[str, str]],
system_prompt: str) -> str:
texts = [f'<s>[INST] <<SYS>>\n{system_prompt}\n<</SYS>>\n\n']
# The first user input is _not_ stripped
do_strip = False
for user_input, response in chat_history:
user_input = user_input.strip() if do_strip else user_input
do_strip = True
texts.append(f'{user_input} [/INST] {response.strip()} </s><s>[INST] ')
message = message.strip() if do_strip else message
texts.append(f'{message} [/INST]')
return ''.join(texts)
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Predict Tokens using `generate()` API for Llama2 model')
parser.add_argument('--repo-id-or-model-path', type=str, default="LinkSoul/Chinese-Llama-2-7b",
help='The huggingface repo id for the Chinese Llama2 (e.g. `LinkSoul/Chinese-Llama-2-7b`) to be downloaded'
', or the path to the huggingface checkpoint folder')
parser.add_argument('--prompt', type=str, default="AI",
help='Prompt to infer')
parser.add_argument('--n-predict', type=int, default=32,
help='Max tokens to predict')
args = parser.parse_args()
model_path = args.repo_id_or_model_path
# Load model in 4 bit,
# which convert the relevant layers in the model into INT4 format
# if your selected model is capable of utilizing previous key/value attentions
# to enhance decoding speed, but has `"use_cache": false` in its model config,
# it is important to set `use_cache=True` explicitly to obtain optimal
# performance with IPEX-LLM INT4 optimizations
# When running LLMs on Intel iGPUs for Windows users, we recommend setting `cpu_embedding=True` in the from_pretrained function.
# This will allow the memory-intensive embedding layer to utilize the CPU instead of iGPU.
model = AutoModelForCausalLM.from_pretrained(model_path,
load_in_4bit=True,
optimize_model=True,
trust_remote_code=True,
use_cache=True)
model = model.to('xpu')
# Load tokenizer
tokenizer = LlamaTokenizer.from_pretrained(model_path, trust_remote_code=True)
# Generate predicted tokens
with torch.inference_mode():
prompt = get_prompt(args.prompt, [], system_prompt=DEFAULT_SYSTEM_PROMPT)
input_ids = tokenizer.encode(prompt, return_tensors="pt").to('xpu')
# ipex_llm model needs a warmup, then inference time can be accurate
output = model.generate(input_ids,
max_new_tokens=args.n_predict)
# start inference
st = time.time()
output = model.generate(input_ids,
max_new_tokens=args.n_predict)
torch.xpu.synchronize()
end = time.time()
output = output.cpu()
output_str = tokenizer.decode(output[0], skip_special_tokens=True)
print(f'Inference time: {end-st} s')
print('-'*20, 'Prompt', '-'*20)
print(prompt)
print('-'*20, 'Output', '-'*20)
print(output_str)
``` |
Game of Four (Détrompez-vous) is a 2007 French comedy film directed by Bruno Dega.
Plot
Lisa and Thomas are lovers. They give appointments in hotels and have so far managed to avoid arousing the suspicions of their respective spouses, Lionel and Carole. One day, Carole goes to a new gynecologist (hers is on maternity leave!) And falls on Lionel, she had met shortly before leaving school, their children being in the same class. A detail then puts their chip ear, they even decorated the pen came from Seville, which had been offered by the husband and wife. They eventually realize that Lisa and Thomas were in the same place at the same time. Lionel and Carole each follow their spouse and discover their connection. They will then work independently of each other to separate the two lovers ...
Cast
Mathilde Seigner as Lisa
Roschdy Zem as Thomas
François Cluzet as Lionel
Alice Taglioni as Carole
Florence Foresti as Brigitte
Artus de Penguern as François
Philippe Lefebvre as Damien
Talina Boyaci as Zoé
Titouan Laporte as Eliot
Laurent Olmedo as Manuel
Sylvie Fourrier as Muriel
Macha Béranger as Madame Olga
Elisabeth Macocco as Madame Lambert-Charpentier
References
External links
Films shot in Corse-du-Sud
Films shot in Lyon
Pan-Européenne films
2007 films
French comedy films
2000s French-language films
2007 comedy films
2000s French films |
The Returned () is a French supernatural drama television series created by Fabrice Gobert, based on the 2004 French film They Came Back (Les Revenants), directed by Robin Campillo. The series debuted on 26 November 2012 on Canal+ and completed its first season, consisting of eight episodes, on 17 December. In 2013, the first season won an International Emmy for Best Drama Series.
The second season, also comprising eight episodes, premiered on 28 September 2015 on Canal+. It premiered in the UK on 16 October 2015 on More4, and in the US on 31 October 2015 on SundanceTV.
Premise
In a small French mountain town many dead people reappear apparently alive and normal, including teenage school bus crash victim Camille, suicidal bridegroom Simon, a small boy called "Victor" who was murdered by burglars, and serial killer Serge. While they try to resume their lives, strange phenomena take place: recurring power outages; a mysterious lowering of the local reservoir's water level, revealing the presence of dead animals and a church steeple; and the appearance of strange marks on the bodies of the living and the dead.
Cast and characters
Main characters
The "Returned"
Yara Pilartz as Camille Séguret, 15-year-old girl killed in a bus accident four years earlier, and younger Léna
Swann Nambotin as Victor/Louis Lewanski, 8-year-old boy who died 35 years prior
Pierre Perrier as Simon Delaître, 23 years old, died the day of his wedding to Adèle a decade earlier
Guillaume Gouix as Serge Garrel, a serial killer who was killed by his brother Toni seven years earlier
Ana Girardot as Lucy Clarsen, murdered waitress
Laetitia de Fombelle as Viviane Costa, 45 years old, wife of Michel Costa, died 34 years earlier
Ernst Umhauer as Virgil, teenager murdered 35 years ago (season 2)
Armande Boulanger as Audrey Sabatini, daughter of Sandrine and Yan, classmate of Camille who died in the same bus accident (season 2)
Thomas Doret as Esteban Koretzky, died in the bus accident (season 2)
Mélodie Richard as Esther, a young woman killed seven years before (season 2)
Michaël Abiteboul as Milan Garrel, father of Serge and Toni, who died 35 years earlier (season 2)
Vladimir Consigny as Morgane, boyfriend/client of Lucy's, died 35 years earlier
Others
Jenna Thiam as Léna Séguret, Camille's twin sister, now 19
Anne Consigny as Claire Séguret, mother of Léna and Camille
Frédéric Pierrot as Jérôme Séguret, father of Léna and Camille, now separated from Claire
Jean-François Sivadier as Pierre
Grégory Gadebois as Toni Garrel, brother of Serge
Clotilde Hesme as Adèle Werther, Simon's former fiancée
Brune Martin as Chloé Delaitre, 9, daughter of Adèle Werther and Simon Delaitre
Céline Sallette as Julie Meyer, a doctor who finds and cares for "Victor"
Claude Leveque as Michel Costa, elderly widower of Viviane Costa, who is attended to by Julie Meyer
Samir Guesmi as Thomas Mézache
Alix Poisson as Laure Valère
Constance Dollé as Sandrine Sabatini
Jérôme Kircher as Father Jean-François
Laurent Lucas as Berg
Recurring characters
Bertrand Constant as Bruno
Matila Malliarakis as Frédéric
Guillaume Marquet as Alcide
Franck Adrien as Yan Sabatini
Carole Franck as Mademoiselle Payet
Laurent Capelluto as the army major
Alice Butaud as Madame Lewanski
Pauline Parigot as Ophélie
Nicolas Wanczycki as Lieutenant Janvier
Aurélien Recoing as Etienne Berg
Episodes
Season 1 (2012)
Season 2 (2015)
Production
The series was shot in Haute-Savoie, mainly in the city of Annecy, and in Seynod, Menthon-Saint-Bernard, Poisy, Cran-Gevrier, Sévrier, Annecy-le-Vieux, Veyrier-du-Lac, and Semnoz. The dam, which plays an important role, is the Barrage de Tignes. The first season of the series was filmed in April and May 2012. It was directed by Fabrice Gobert and Frédéric Mermoud.
The second season of the series was directed by Fabrice Gobert and Frédéric Goupil. It was originally to be filmed in February and March 2014, for screening from November 2014. However, delays in the writing process pushed filming back until the second half of 2014, and broadcast began in 2015. The synopsis for the second season was released in August 2014, which confirmed there would be a total of eight episodes. Filming for the second season ended on 7 April 2015.
Music
The series' music was composed by the Scottish post-rock band Mogwai. The band's guitarist John Cummings said in an interview with The Quietus, "They wanted us to start writing it before they started filming it. They described it as inspiring them, they wanted some kind of musical mood in place before they started, so we were working a bit dry at first ... we'd (only) seen the first couple of scripts in English". The band released a four-track sampler of the music (Les Revenants EP) on 17 December 2012, the day of the showing of the final episode. A full-length soundtrack album, Les Revenants, was released on 25 February 2013. In August 2014, it was confirmed that Mogwai would also write the soundtrack for the second season.
Reception
The series has been critically acclaimed. On Rotten Tomatoes, the first season holds an approval rating of 100% with an average score of 9.2 out of 10 based on 39 reviews and a critics' consensus of, "A pleasant change from typically gory zombie shows, The Returned is a must-see oddity that's both smart and sure to disturb". The second season of the show holds a rating of 95%, with an average score of 9.1 out of 10 based on 20 reviews and a consensus of, "After a long wait, The Returned is back with more of the chilling, deliberate, and masterful storytelling that made season one a spooky success". Le Monde said the series marked a resurgence in the fantasy genre with the dead appearing out of nowhere, trying to regain their lives where they left off. Libération said the series recalled the atmosphere of Twin Peaks by David Lynch. In France, viewing figures averaged 1.4 million over the eight episodes, on Canal+.
For its American showing, the series received a 92 out of 100 rating from Metacritic, which averages critics' reviews, based on 28 reviews. The second season received an 82 out of 100 rating based on 11 reviews.
During a visit to Paris, Stephen King remarked on being a big fan of the show and later tweeted about it.
Accolades
In 2013, for the 41st International Emmy Award, The Returned won for Best Drama Series. For the 18th Satellite Awards, it received a nomination for Best Television Series or Miniseries, Genre. In 2014, it was awarded with a Peabody Award. It received a nomination for Outstanding Achievement in Movies, Miniseries and Specials for the 2014 TCA Awards. Fabien Adda and Fabrice Gobert received a nomination for Best Screenplay for the episode "The Horde", for the 2013 Bram Stoker Awards.
International broadcasts
Season 1 was broadcast in the United Kingdom from 9 June 2013 on Channel 4. It was the first "fully subtitled drama" on the channel in more than 20 years and was screened in French, with English subtitles. First announced under the English name Rebound, the title was amended to The Returned prior to broadcast. The channel made a feature of the subtitles by broadcasting a specially commissioned advertisement break in French with English subtitles. In the United States, SundanceTV began broadcasting the series' first season on 31 October 2013, before picking up the second season on 11 January 2014. The series began airing in Australia on SBS Two on 11 February 2014. In Canada, the series debuted on 26 April 2014 on Space.
In advance of the second-season premiere, the first two episodes of the season received an advance preview screening at the 2015 Toronto International Film Festival, as part of the festival's new Primetime platform of selected television projects. The second season premiered on 16 October 2015 on More4 in the United Kingdom and on 31 October 2015 in the U.S. on SundanceTV.
International ratings
Season 1
Season 2
Home media release
The first season was released on DVD in France on 20 December 2012 and in the UK on 9 September 2013. In the United States, the first season was released on both DVD and Blu-ray on 11 February 2014 and the second season on 17 December 2019.
Adaptations
In May 2013, it was revealed that an English-language adaptation was in development by Paul Abbott and FremantleMedia, with the working title They Came Back. In September 2013, it was revealed that Abbott was no longer involved with the project and that A&E would develop it. In April 2014, A&E ordered 10 episodes with Carlton Cuse and Raelle Tucker as executive producers. The series premiered on 9 March 2015 and was cancelled after one season.
References
External links
2010s French drama television series
2012 French television series debuts
2015 French television series endings
French horror fiction television series
French-language television shows
Nonlinear narrative television series
Peabody Award-winning television programs
Serial drama television series
Live action television shows based on films
Television shows set in France
Zombies in television
Canal+ original programming
French supernatural television series |
The White Rose Cycle Route in Yorkshire, England, part of the National Cycle Network (NCN), was opened by Sustrans in 1998. It linked Middlesbrough with the City of Kingston upon Hull via the North York Moors, the Vale of York, the Yorkshire Wolds, a distance of and in some descriptions continued to Hornsea on the coast (). A map and guide for the route were published in 1999 and 2000.
The route is no longer branded as the White Rose Route.
NCN routes on White Rose route
Route 1
Route 65
Route 66
Route 71
Route 656
Route 657
Route 658
References
Cycleways in England
Cycling in Yorkshire |
Zé Carlos is a nickname for people with the given name José Carlos; it can refer to:
Zé Carlos (footballer, born 1943), full name José Carlos Gaspar Ferreira, Brazilian football defender
Zé Carlos (footballer, 1945–2018), full name José Carlos Bernardo, Brazilian football centre-back
Zé Carlos (poet) (1949-1977), full name José Carlos Schwarz, Bissau-Guinean people poet and musician
Zé Carlos (footballer, born 1954), full name José Carlos dos Santos, Brazilian football forward
Zé Carlos (footballer, born 1955), full name José Carlos Pessanha, Brazilian football goalkeeper
Zé Carlos (footballer, born 1962), full name José Carlos da Costa Araújo, Brazilian football goalkeeper
Zé Carlos (footballer, born 1965), full name José Carlos Pereira do Nascimento, Brazilian football defender
Zé Carlos (footballer, born 1968), full name José Carlos de Almeida, Brazilian football defender
Zé Carlos (footballer, born 1975), full name José Carlos Santos Silva, Brazilian football forward
Zé Carlos (footballer, born 1979), full name José Carlos Gomes Filho, Brazilian football midfielder
Zé Carlos (footballer, born 1983), full name José Carlos Ferreira Filho, Brazilian football striker
Zé Carlos (footballer, born 1985), full name José Carlos dos Anjos Sávio, Brazilian football goalkeeper
Zé Carlos Semedo (born 1992), Santomean football forward
Zé Carlos (footballer, born 1998), full name José Carlos Teixeira Lopes Reis Gonçalves, Portuguese football right-back
Zé Carlos (footballer, born 2001), full name José Carlos Natário Ferreira, Portuguese football right-back
Zé Carlos, the 8th series of Gato Fedorento, a Portuguese comedy show
See also
José Carlos (disambiguation)
Portuguese masculine given names
Masculine given names
Brazilian given names |
Drasteria aberrans is a moth of the family Erebidae. It is found in central Asia (Kyrghyzstan, Turkmenistan, Tajikistan, Uzbekistan, Mongolia and China (Xinjiang)).
References
Drasteria
Moths described in 1888
Moths of Asia |
"I'm Bugged at My Ol' Man" is a song written by Brian Wilson for the American rock band The Beach Boys. It was released on their 1965 album Summer Days (and Summer Nights!!). However, when Summer Days (and Summer Nights!!) was reissued in the early 1970s as California Girls, the track was cut from the running order.
Background
"I'm Bugged at My Ol' Man" was inspired by Brian Wilson's tumultuous relationship with his father, Murry, who was well known for his abusive treatment of his children. In the song, the singer's father uses extreme punishments to reprimand minor incidents, resulting in the singer being locked in his room, his windows being boarded up, his surfboard and radio being taken away, his hair cut off, and a meager meal of bread crumbs and water being the only thing for him to eat.
Critical opinion
AllMusic critic Thomas Ward said of the song, "'I'm Bugged at My Ol' Man' is one of the least complex songs in the Beach Boys' canon, yet it is not without its charms, even though group leader Brian Wilson was too embarrassed to own up to singing it on the album credits. What is essentially a Fats Domino-style boogie and some awful, trite lyrics ('Can't drive, can't do a doggone thing/I'm bugged at my ol' man/And he doesn't even know where it's at') is at least rendered bearable by some wonderfully primitive piano playing and, truth be told, a clichéd but gorgeous bridge that has Brian Wilson's stamp all over it." Author Peter Ames Carlin described the track as "a tossed-off piano blues number" and "one of the weirdest pieces of humor to ever turn up on anyone's album."
Personnel
Credits from Craig Slowinski.
Brian Wilson (Credited as "Too Embarrassed") – lead and backing vocals, piano
Carl Wilson – backing vocals
Dennis Wilson – backing vocals
Marilyn Wilson – backing vocals
References
1965 songs
Blues songs
Comedy rock songs
The Beach Boys songs
Songs written by Brian Wilson
Song recordings produced by Brian Wilson
Songs about fathers |
```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 bench = require( '@stdlib/bench' );
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
var pkg = require( './../package.json' ).name;
var iterNone = require( './../lib' );
// FUNCTIONS //
function createIterator( arr ) {
var len;
var it;
var i;
len = arr.length;
i = -1;
it = {};
it.next = next;
it.reset = reset;
return it;
function next() {
i += 1;
if ( i < len ) {
return {
'value': arr[ i ],
'done': false
};
}
i = -1; // reset index
return {
'done': true
};
}
function reset() {
i = -1;
}
}
// MAIN //
bench( pkg, function benchmark( b ) {
var bool;
var arr;
var i;
arr = createIterator( [ 0, 0, 0, 0, 0, 1 ] );
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
bool = iterNone( arr );
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
arr.reset();
}
b.toc();
if ( !isBoolean( bool ) ) {
b.fail( 'should return a boolean' );
}
b.pass( 'benchmark finished' );
b.end();
});
bench( pkg+'::loop', function benchmark( b ) {
var values;
var bool;
var arr;
var i;
var j;
values = [ 0, 0, 0, 0, 0, 1 ];
arr = createIterator( values );
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
bool = true;
for ( j = 0; j < values.length; j++ ) {
if ( arr.next().value ) {
bool = false;
break;
}
}
if ( typeof bool !== 'boolean' ) {
b.fail( 'should be a boolean' );
}
arr.reset();
}
b.toc();
if ( !isBoolean( bool ) ) {
b.fail( 'should be a boolean' );
}
b.pass( 'benchmark finished' );
b.end();
});
``` |
```smalltalk
Class {
#name : 'MetacelloPackageSpecTestCase',
#superclass : 'MetacelloSpecTestCase',
#category : 'Metacello-TestsMCCore',
#package : 'Metacello-TestsMCCore'
}
{ #category : 'tests' }
MetacelloPackageSpecTestCase >> testPackageMergeSpec [
| packageA packageB package repository |
packageA := self packageSpec
name: 'Package';
name: 'Package';
requires: 'AnotherPackage';
includes: 'IncludedPackage';
answers: #(#('preload' 'preload answer') #('postload' 'postload answer'));
file: 'Package-dkh.1';
preLoadDoIt: #preLoadDoIt;
postLoadDoIt: #postLoadDoIt;
repository: 'path_to_url username: 'dkh' password: 'password';
repository: '/opt/gemstone/repository';
yourself.
packageB := self packageSpec
name: 'Package';
requires: 'AndAnotherPackage';
includes: 'AndIncludedPackage';
answers: #(#('xpostload' 'xpostload answer'));
file: 'Package-dkh.2';
repository: 'path_to_url username: 'DaleHenrichs' password: 'secret';
repository: '/opt/gemstone/repo';
yourself.
package := packageA mergeSpec: packageB.
self assert: package name equals: 'Package'.
self assert: package requires equals: #('AnotherPackage' 'AndAnotherPackage').
self assert: package includes equals: #('IncludedPackage' 'AndIncludedPackage').
self assert: package answers equals: #(#('preload' 'preload answer') #('postload' 'postload answer') #('xpostload' 'xpostload answer')).
self assert: package file equals: 'Package-dkh.2'.
self assert: package preLoadDoIt value identicalTo: #preLoadDoIt.
self assert: package postLoadDoIt value identicalTo: #postLoadDoIt.
repository := package repositories map at: '/opt/gemstone/repository' ifAbsent: [ self assert: false ].
self assert: repository type equals: 'directory'.
repository := package repositories map at: '/opt/gemstone/repo' ifAbsent: [ self assert: false ].
self assert: repository type equals: 'directory'.
repository := package repositories map at: 'path_to_url ifAbsent: [ self assert: false ].
self assert: repository type equals: 'http'.
self assert: repository username equals: 'DaleHenrichs'.
self assert: repository password equals: 'secret'
]
{ #category : 'tests' }
MetacelloPackageSpecTestCase >> testPackageSpec [
| package repository |
package := self packageSpec
name: 'Package';
requires: 'AnotherPackage';
includes: 'IncludedPackage';
answers: #(#('preload' 'preload answer') #('postload' 'postload answer'));
file: 'Package-dkh.1';
preLoadDoIt: #preLoadDoIt;
postLoadDoIt: #postLoadDoIt;
repository: 'path_to_url username: 'dkh' password: 'password';
repository: '/opt/gemstone/repository';
yourself.
self assert: package name equals: 'Package'.
self assert: package requires equals: #('AnotherPackage').
self assert: package includes equals: #('IncludedPackage').
self assert: package answers equals: #(#('preload' 'preload answer') #('postload' 'postload answer')).
self assert: package file equals: 'Package-dkh.1'.
self assert: package preLoadDoIt value identicalTo: #preLoadDoIt.
self assert: package postLoadDoIt value identicalTo: #postLoadDoIt.
repository := package repositories map at: '/opt/gemstone/repository' ifAbsent: [ self assert: false ].
self assert: repository type equals: 'directory'.
repository := package repositories map at: 'path_to_url ifAbsent: [ self assert: false ].
self assert: repository type equals: 'http'.
self assert: repository username equals: 'dkh'.
self assert: repository password equals: 'password'
]
``` |
Cheap Thrills is the second studio album by American rock band Big Brother and the Holding Company, issued by Columbia Records in 1968. Cheap Thrills was the band's final album with lead singer Janis Joplin before she left to begin a solo career. For Cheap Thrills, the band and producer John Simon incorporated recordings of crowd noises to give the impression of a live album, for which it was subsequently mistaken by many listeners. Only "Ball and Chain" was actually recorded in concert at the Winterland Ballroom.
Cheap Thrills reached number one on the charts for eight
nonconsecutive weeks in 1968.
In 2007, Cheap Thrills was inducted into the Grammy Hall of Fame.
History
Big Brother obtained a considerable amount of attention after their 1967 performance at the Monterey Pop Festival and had released their debut album soon after. The followup, Cheap Thrills, was a great success, reaching number one on the charts for eight nonconsecutive weeks in 1968. Columbia Records offered the band a new recording contract, but it took months to get through since they were still signed to Mainstream Records. The album features three cover songs ("Summertime", "Piece of My Heart" and "Ball and Chain"). The album also features Bill Graham, who introduces the band at the beginning of "Combination of the Two". The album's overall raw sound effectively captures the band's energetic and lively concerts. The LP was released in both stereo and mono formats with the original monophonic pressing now a rare collector's item. The album had been considered for quadraphonic format in the early '70s and eventually in 2002, was released as a Multichannel Sony SACD. The original quadraphonic mix remains unreleased.
Artwork and title
The cover was drawn by underground cartoonist Robert Crumb after the band's original cover idea, a photo of the group naked in bed together, was vetoed by Columbia Records. Crumb had originally intended his art for the LP back cover, with a portrait of Janis Joplin to grace the front. But Joplin—an avid fan of underground comics, especially the work of Crumb—so loved the Cheap Thrills illustration that she demanded Columbia place it on the front cover. It is number nine on Rolling Stones list of 100 greatest album covers. Crumb later authorized the sale of prints of the cover, some of which he signed before sale.
In an interview for the AIGA, Columbia Records art director John Berg told design professor Paul Nini, "[Janis] Joplin commissioned it, and she delivered Cheap Thrills to me personally in the office. There were no changes with R. Crumb. He refused to be paid, saying, 'I don't want Columbia's filthy lucre.'"
In at least one early edition, the words "HARRY KIRSHNER! (D. GETZ)" are faintly visible in the word balloon of the turbaned man, apparently referring to a track that was dropped from the final sequence. The words "ART: R. CRUMB" replace them.
Initially, the album was to be called Sex, Dope and Cheap Thrills, but the title was not received well by Columbia Records.
Release and reception
Cheap Thrills was released in the summer of 1968, one year after Big Brother's debut album, and reached number one on the Billboard charts in its eighth week in October. It kept the top spot for eight (nonconsecutive) weeks, while the single "Piece of My Heart" also became a huge hit. By the end of the year, it was the most successful album of 1968, having sold nearly a million copies. The success was short-lived, however, as Joplin left the group for a solo career in December 1968.
Outtakes originally to have appeared on the album have since been released on Janis Joplin compilations such as Farewell Song (in which Big Brother's original instruments were replaced with studio musicians from 1983, angering the band) and the Janis compilation box set featuring all original studio songs and live recordings. The 1999 re-release of Cheap Thrills features the outtakes "Flower in the Sun" and "Roadblock" as well as live performances of "Magic of Love" and "Catch Me Daddy" as bonus material. In 2018, Columbia released Sex, Dope & Cheap Thrills, an album of outtakes, etc., from the Cheap Thrills sessions.
Critical reception
In a contemporary review, Rolling Stone magazine's John Hardin panned Cheap Thrills as living up to its title and being merely satisfactory: "What this record is not is 1) a well-produced, good rock and roll recording; 2) Janis Joplin at her highest and most intense moments; and 3) better than the Mainstream record issued last year."
Robert Christgau was more enthusiastic in his column for Esquire and called it Big Brother's "first physically respectable effort", as it "not only gets Janis's voice down, it also does justice to her always-underrated and ever-improving musicians." He named it the third best album of 1968 in his ballot for Jazz & Pop magazine's critics poll.
In a retrospective review penned in the 2000s, AllMusic's William Ruhlmann hailed Cheap Thrills as Joplin's "greatest moment" and said it sounds like "a musical time capsule [today] and remains a showcase for one of rock's most distinctive singers."
Marc Weingarten of Entertainment Weekly called it the peak of blues-rock, while Paul Evans wrote in The Rolling Stone Album Guide (2004) that the record epitomizes acid rock "in all its messy, pseudo-psychedelic glory". Cheap Thrills was ranked number 338 on Rolling Stone magazine's list of the 500 greatest albums of all time, and later ranked number 372 in the 2020 edition. The magazine previously ranked it #50 on their Top 100 Albums of the Past 20 Years list in 1987. It is also listed in the book 1001 Albums You Must Hear Before You Die. On March 22, 2013, the album was deemed "culturally, historically, or aesthetically significant" by the Library of Congress and thus it was preserved into the National Recording Registry for the 2012 register. The album was named the 163rd best album of the 1960s by Pitchfork.
Track listing
Personnel
Big Brother and the Holding Company
Janis Joplinvocals
Sam Andrew guitar, bass on "Oh, Sweet Mary", vocals
James Gurleyguitar
Peter Albinbass, lead guitar on "Oh, Sweet Mary", lead acoustic guitar on "Turtle Blues".
Dave Getzdrums
Additional personnel
John Simon – piano, producer
Vic Anesini – mastering, mixing
Nicholas Bennett – packaging manager
Steven Berkowitz – A&R
Fred Catero – engineer
John Byrne Cooke – liner notes
Robert Crumb – cover artwork
David Diller – engineer
Mark Feldman – project director
David Gahr – photography
Diana Reid Haig – digital editing, mixing
Jerry Hochman – engineer
Bob Irwin – producer, reissue producer
Elliott Landy – photography, tray photo (gatefold photograph)
Jim Marshall – photography
Patti Matheny – A&R
Elliot Mazer – producer, mixing, assistant producer
Nathan Rosenberg – digital editing
Roy Segal – engineer
Smay Vision – art direction
Thomas Weir – photography, back cover
Jen Wyler – editing, mastering, assembly, authoring
Chart positions
Certifications
References
1968 albums
Big Brother and the Holding Company albums
Albums produced by John Simon (record producer)
Columbia Records albums
Live at the Fillmore East albums
United States National Recording Registry recordings
United States National Recording Registry albums |
Górka Pabianicka is a village in the administrative district of Gmina Pabianice, within Pabianice County, Łódź Voivodeship, in central Poland. It lies approximately north-west of Pabianice and south-west of the regional capital Łódź.
References
Villages in Pabianice County |
```go
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
//go:build go1.16 && integration
// +build go1.16,integration
package kinesis_test
import (
"context"
"testing"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/awstesting/integration"
"github.com/aws/aws-sdk-go/service/kinesis"
)
var _ aws.Config
var _ awserr.Error
var _ request.Request
func TestInteg_00_ListStreams(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-west-2")
svc := kinesis.New(sess)
params := &kinesis.ListStreamsInput{}
_, err := svc.ListStreamsWithContext(ctx, params, func(r *request.Request) {
r.Handlers.Validate.RemoveByName("core.ValidateParametersHandler")
})
if err != nil {
t.Errorf("expect no error, got %v", err)
}
}
func TestInteg_01_DescribeStream(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-west-2")
svc := kinesis.New(sess)
params := &kinesis.DescribeStreamInput{
StreamName: aws.String("bogus-stream-name"),
}
_, err := svc.DescribeStreamWithContext(ctx, params, func(r *request.Request) {
r.Handlers.Validate.RemoveByName("core.ValidateParametersHandler")
})
if err == nil {
t.Fatalf("expect request to fail")
}
aerr, ok := err.(awserr.RequestFailure)
if !ok {
t.Fatalf("expect awserr, was %T", err)
}
if len(aerr.Code()) == 0 {
t.Errorf("expect non-empty error code")
}
if len(aerr.Message()) == 0 {
t.Errorf("expect non-empty error message")
}
if v := aerr.Code(); v == request.ErrCodeSerialization {
t.Errorf("expect API error code got serialization failure")
}
}
``` |
Ogcocephalus radiatus or the polka-dot batfish is an arrow-shaped fish in the family Ogcocephalidae with an elongated thin tail. It is dorso-ventrally flattened with round pectoral fins that sit flat on the bottom of the sea floor. It uses its pectoral fins and pelvic fins to "walk" along the bottom in a side-to-side shuffling motion.
Description
The polka-dot batfish is a bottom-dwelling fish that can measure up to from head to tail. It is a broad, dorso-ventrally flattened, arrow-shaped fish similar in appearance to a ray. The pelvic fins are located further forward than the broad, pectoral fins which flare out on both sides, supported by arm-like stalks. The polka-dot batfish looks similar to the short-nose batfish (Ogcocephalus nasutus), although the pectoral fins of the polka-dot batfish are speckled with small spots whereas those of the short-nose are plain. The colouring of the polka-dot batfish is variable; it is usually brown with darker spots, some rimmed with white, and scattered patches of reddish or orangish-brown. This colouration provides camouflage as the fish lies on the seabed waiting for prey. The top of the head and body are covered in tubercles, giving it a rough texture and warty appearance; it does not have scales. The polka-dot batfish has an elongated rostrum (a unicorn-like projection between the eyes) on its large bony head. The dorsal fin has become modified to a single spine located under the rostrum.
Distribution
The polka-dot batfish is native to the Atlantic coast of the United States with its range extending from North Carolina to Florida, the Bahamas and the Campeche Bank off the coast of Mexico. They
have been found in waters up to deep, but most are found at shallower depths. It is a benthic (bottom dweller) fish, usually found on sandy or muddy seabeds, coral rubble or seagrass meadows.
Behaviour
The polka-dot batfish preys on juvenile fish, crabs, shrimps, molluscs, and worms. It hunts by clinging to the bottom with its pectoral fins and wiggling the moveable, modified dorsal fin beneath its rostrum to attract prey. The rostrum also contains a chemical that helps attract the prey. When the prey is sufficiently close, it snatches the victim with its circular mouth. They sit and wait for their prey to come to them instead of chasing after their prey. They are very stealthy and stalk their prey before attacking. If approached by predators, the batfish bury themselves in the sand with their pectoral fins or scurry across the ocean bottom like a crab.
References
External links
Ogcocephalidae
Fish described in 1818 |
```julia
using Test, Random
using Flux: activations
@testset "basic" begin
@testset "helpers" begin
@testset "activations" begin
dummy_model = Chain(x->x.^2, x->x .- 3, x -> tan.(x))
x = randn(10)
@test activations(dummy_model, x)[1] == x.^2
@test activations(dummy_model, x)[2] == (x.^2 .- 3)
@test activations(dummy_model, x)[3] == tan.(x.^2 .- 3)
@test activations(Chain(), x) == ()
@test activations(Chain(identity, x->:foo), x)[2] == :foo # results include `Any` type
end
end
@testset "Chain" begin
@test_nowarn Chain(Dense(10, 5, ), Dense(5, 2))(randn32(10))
@test_throws DimensionMismatch Chain(Dense(10, 5, ),Dense(2, 1))(randn32(10))
# numeric test should be put into testset of corresponding layer
@test_nowarn Chain(first = Dense(10, 5, ), second = Dense(5, 2))(randn32(10))
m = Chain(first = Dense(10, 5, ), second = Dense(5, 2))
@test m[:first] == m[1]
@test m[1:2] == m
@test m == m
@test m == fmap(identity, m) # does not forget names
@test_throws ArgumentError Chain(layers = Dense(10, 10), two = identity) # reserved name
@test_nowarn Chain([Dense(10, 5, ), Dense(5, 2)])(randn(Float32, 10)) # vector of layers
c = Chain(Dense(10, 5, ), Dense(5, 2), Dense(2, 1, relu))
@test c[1] == c[begin]
@test c[3] == c[end]
end
@testset "Activations" begin
c = Chain(Dense(3,5,relu), Dense(5,1,relu))
X = Float32.([1.0; 1.0; 1.0])
@test_nowarn gradient(()->Flux.activations(c, X)[2][1], Flux.params(c))
c2 = Chain(enc = c[1], dec = c[2])
@test Flux.activations(c, X) == Flux.activations(c2, X)
@test_nowarn gradient(()->Flux.activations(c2, X)[2][1], Flux.params(c2))
end
@testset "Dense" begin
@testset "constructors" begin
@test size(Dense(10, 100).weight) == (100, 10)
@test size(Dense(10, 100).bias) == (100,)
@test Dense(rand(100,10), rand(100)). == identity
@test Dense(rand(100,10)). == identity
@test Dense(rand(100,10), false). == identity
@test Dense(rand(100,10), false, tanh). == tanh
@test Dense(rand(100,10), rand(100)). == identity
@test Dense(rand(Float16, 100,10), true).bias isa Vector{Float16} # creates matching type
@test Dense(rand(Float16, 100,10), rand(100)).bias isa Vector{Float16} # converts to match
@test Dense(3,4; init=Base.randn, bias=true).bias isa Vector{Float64}
@test Dense(3,4; init=Base.randn, bias=[1,2,3,4]).bias isa Vector{Float64}
@test_throws MethodError Dense(10, 10.5)
@test_throws MethodError Dense(10, 10.5, tanh)
@test_throws DimensionMismatch Dense(3,4; bias=rand(5))
@test_throws DimensionMismatch Dense(rand(4,3), rand(5))
@test_throws MethodError Dense(rand(5))
@test_throws MethodError Dense(rand(5), rand(5))
@test_throws MethodError Dense(rand(5), rand(5), tanh)
end
@testset "dimensions" begin
@test length(Dense(10 => 5)(randn32(10))) == 5
@test_throws DimensionMismatch Dense(10 => 5)(randn32(1))
@test_throws MethodError Dense(10 => 5)(1) # avoid broadcasting
@test_throws MethodError Dense(10 => 5).(randn32(10)) # avoid broadcasting
@test size(Dense(10, 5)(randn(10))) == (5,)
@test size(Dense(10, 5)(randn(10,2))) == (5,2)
@test size(Dense(10, 5)(randn(10,2,3))) == (5,2,3)
@test size(Dense(10, 5)(randn(10,2,3,4))) == (5,2,3,4)
@test_throws DimensionMismatch Dense(10, 5)(randn(11,2,3))
end
@testset "zeros" begin
@test Dense(10, 1, identity, init = ones)(ones(10,1)) == 10*ones(1, 1)
@test Dense(10, 1, identity, init = ones)(ones(10,2)) == 10*ones(1, 2)
@test Dense(10, 2, identity, init = ones)(ones(10,1)) == 10*ones(2, 1)
@test Dense(10, 2, identity, init = ones)([ones(10,1) 2*ones(10,1)]) == [10 20; 10 20]
@test Dense(10, 2, identity, init = ones, bias = false)([ones(10,1) 2*ones(10,1)]) == [10 20; 10 20]
end
@testset "type matching" begin
d1 = Dense(2 => 3)
d2 = Dense(d1.weight, false)
x1 = randn(Float32, 2, 4)
@test d1(x1) d2(x1) d1.weight * x1
x2 = Float64.(x1)
@test d1(x2) d2(x2) d1.weight * x2
@test d1(x2) isa Array{Float32} # tests _match_eltype, will print a warning
@test d2(x2) isa Array{Float32}
x3 = rand(-5:5, 2, 4)
@test d1(x3) d2(x3) d1.weight * x3
x4 = rand(Bool, 2, 4)
@test d1(x4) d2(x4) d1.weight * x4
x5 = Flux.onehotbatch(rand(Bool, 5), (true, false))
@test d1(x5) d2(x5) d1.weight * x5
end
end
@testset "Scale" begin
@test length(Flux.Scale(10)(randn(10))) == 10
@test length(Flux.Scale(10)(randn(1))) == 10
@test length(Flux.Scale(10; bias = false)(randn(10))) == 10
@test length(Flux.Scale(10, tanh)(randn(10))) == 10
@test_throws DimensionMismatch Flux.Scale(10)(randn(2))
@test Flux.Scale(2)([1 2]) == [1 2; 1 2]
@test Flux.Scale(2)([1, 2]) == [1, 2]
@test Flux.Scale(2; init = randn)([1, 2]) != [1, 2]
@test Flux.Scale(2; bias = false)([1 2; 3 4]) == [1 2; 3 4]
@test Flux.Scale(2, abs2; bias = false, init = ones)([1 2; 3 4]) == [1 4; 9 16]
@test Flux.Scale(2)(rand(2, 3, 4)) |> size == (2, 3, 4)
@test Flux.Scale(2, 3;)(rand(2, 3, 4)) |> size == (2, 3, 4)
@test Flux.Scale(2, 3, 4; bias = false)(rand(2, 3, 4)) |> size == (2, 3, 4)
@test Flux.Scale(2, 3; bias = false)(rand(2, 1, 4)) |> size == (2, 3, 4)
@test Flux.Scale(2, 3, tanh; bias = false, init = zeros)(rand(2, 1, 4)) == zeros(2, 3, 4)
@test_throws MethodError Flux.Scale(1.)
@test_throws MethodError Flux.Scale(1., 2.)
@test_throws Exception Flux.Scale()
@test_throws MethodError Flux.Scale(sin)
end
@testset "Maxout" begin
# Note that the normal common usage of Maxout is as per the docstring
# These are abnormal constructors used for testing purposes
@testset "Constructor" begin
mo = Maxout(() -> identity, 4)
input = rand(40)
@test mo(input) == input
end
@testset "simple alternatives" begin
mo = Maxout(x -> x, x -> 2x, x -> 0.5x)
input = rand(40)
@test mo(input) == 2*input
end
@testset "complex alternatives" begin
mo = Maxout(x -> [0.5; 0.1]*x, x -> [0.2; 0.7]*x)
input = [3.0 2.0]
target = [0.5, 0.7].*input
@test mo(input) == target
end
@testset "params" begin
mo = Maxout(()->Dense(32, 64), 4)
ps = Flux.params(mo)
@test length(ps) == 8 #4 alts, each with weight and bias
end
end
@testset "SkipConnection" begin
@testset "zero sum" begin
input = randn(10, 10, 10, 10)
@test SkipConnection(x -> zeros(size(x)), (a,b) -> a + b)(input) == input
end
@testset "concat size" begin
input = randn(10, 2)
@test size(SkipConnection(Dense(10,10), (a,b) -> cat(a, b, dims = 2))(input)) == (10,4)
end
end
@testset "Bilinear" begin
@testset "SkipConnection recombinator" begin
d = Dense(10, 10)
b = Flux.Bilinear(10, 10, 5)
x = randn(Float32,10,9)
sc = SkipConnection(d, b)
@test size(sc(x)) == (5,9)
end
@testset "Two-streams zero sum" begin
x = zeros(Float32,10,9)
y = zeros(Float32,2,9)
b = Flux.Bilinear(10, 2, 3)
@test size(b(x,y)) == (3,9)
@test sum(abs2, b(x,y)) == 0f0
end
@testset "Inner interactions" begin
x = randn(Float32,11,7)
b = Flux.Bilinear(11, 11, 3)
@test size(b(x)) == (3,7)
@test_nowarn gs = gradient(() -> sum(abs2.(b(x))), params(b))
end
@testset "constructors" begin
b1 = Flux.Bilinear(randn(3,4,5))
@test b1.bias isa Vector{Float64}
@test b1. == identity
b2 = Flux.Bilinear(randn(3,4,5), false)
@test b2.bias === false
b3 = Flux.Bilinear(randn(Float16, 3,4,5), true, tanh)
@test b3. == tanh
@test b3.bias isa Vector{Float16}
@test size(b3(rand(4), rand(5))) == (3,)
b4 = Flux.Bilinear(3,3,7; bias=1:7, init=Flux.zeros32)
@test_skip b4.bias isa Vector{Float32}
@test_throws ArgumentError Flux.Bilinear(rand(3)) # expects a 3-array
@test_throws ArgumentError Flux.Bilinear(rand(3,4), false, tanh)
@test_throws DimensionMismatch Flux.Bilinear(rand(3,4,5), rand(6), tanh) # wrong length bias
end
end
@testset "Parallel" begin
@testset "zero sum" begin
input = randn(10, 10, 10, 10)
@test Parallel(+, x -> zeros(size(x)), identity)(input) == input
end
@testset "concat size" begin
input = randn(10, 2)
@test size(Parallel((a, b) -> cat(a, b; dims=2), Dense(10, 10), identity)(input)) == (10, 4)
@test size(Parallel(hcat, one = Dense(10, 10), two = identity)(input)) == (10, 4)
end
@testset "vararg input" begin
inputs = randn(10), randn(5), randn(4)
@test size(Parallel(+, Dense(10, 2), Dense(5, 2), Dense(4, 2))(inputs)) == (2,)
@test size(Parallel(+; a = Dense(10, 2), b = Dense(5, 2), c = Dense(4, 2))(inputs)) == (2,)
@test_throws ArgumentError Parallel(+, sin, cos)(1,2,3) # wrong number of inputs
@test Parallel(+, sin, cos)(pi/2) 1
end
@testset "named access" begin
m = Parallel(hcat, one = Dense(10, 10), two = identity)
@test m[1] == m[:one]
@test m[1:2] == m
@test_throws ArgumentError Parallel(hcat, layers = Dense(10, 10), two = identity) # reserved names
@test_throws ArgumentError Parallel(hcat, connection = Dense(10, 10), two = identity)
@test m == fmap(identity, m) # does not forget names
@test Parallel(vcat, x = log)(1) == [0]
@test Parallel(vcat, log)(1) == [0]
end
@testset "trivial cases" begin
@test Parallel(hcat) isa Parallel{typeof(hcat), Tuple{}} # not a NamedTuple
@test Parallel(hcat)(1) == hcat()
@test Parallel(hcat, inv)(2) == hcat(1/2) # still calls connection once.
end
@testset "connection is called once" begin
CNT = Ref(0)
f_cnt = (x...) -> (CNT[]+=1; +(x...))
Parallel(f_cnt, sin, cos, tan)(1)
@test CNT[] == 1
Parallel(f_cnt, sin, cos, tan)(1,2,3)
@test CNT[] == 2
Parallel(f_cnt, sin)(1)
@test CNT[] == 3
end
# Ref path_to_url
@testset "Input domain" begin
struct Input
x
end
struct L1
x
end
(l::L1)(x) = l.x * x
Flux.@functor L1
Base.:*(a::AbstractArray, b::Input) = a * b.x
par = Parallel(+, L1(rand(Float32, 3,3)), L1(rand(Float32, 3,3)))
ip = Input(rand(Float32, 3,3))
ip2 = Input(rand(Float32, 3,3))
@test par(ip) par.layers[1](ip.x) + par.layers[2](ip.x)
@test par(ip, ip2) par.layers[1](ip.x) + par.layers[2](ip2.x)
gs = gradient((par, x...) -> sum(par(x...)), par, ip, ip2)
gs_reg = gradient(par, ip, ip2) do par, x, y
sum(par.layers[1](x.x) + par.layers[2](y.x))
end
for (a,b) in zip(gs[1].layers, gs_reg[1].layers)
@test a.x b.x
end
@test gs[2].x gs_reg[2].x
@test gs[3].x gs_reg[3].x
end
end
@testset "Embedding" begin
vocab_size, embed_size = 10, 4
m = Embedding(vocab_size, embed_size)
@test size(m.weight) == (embed_size, vocab_size)
# one index
@test m(1) isa Vector{Float32}
@test m(2) m.weight[:,2]
@test m(OneHotVector(3, vocab_size)) m.weight[:,3]
@test_throws DimensionMismatch m(OneHotVector(3, 1000))
@test m(4) m((1:vocab_size) .== 4)
# a batch of indices
x = rand(1:vocab_size, 3)
y = m(x)
@test y isa Matrix{Float32}
@test y m.weight[:,x]
x2 = OneHotMatrix(x, vocab_size)
y2 = m(x2)
@test y2 isa Matrix{Float32}
@test y2 y
@test_throws DimensionMismatch m(OneHotMatrix(x, 1000))
@test y m(x' .== (1:vocab_size))
# more dimensions via reshape
x = rand(1:vocab_size, 3, 4)
y = m(x)
@test y isa Array{Float32, 3}
@test size(y) == (embed_size, 3, 4)
x3 = Flux.onehotbatch(x, 1:1:vocab_size)
@test size(x3) == (vocab_size, 3, 4)
y3 = m(x3)
@test size(y3) == (embed_size, 3, 4)
end
@testset "EmbeddingBag" begin
# test _splitat
data = [1, 2, 3, 4, 5, 6, 7, 8, 9]
offsets_good = [1, 3, 6]
offsets_each = [1,2,3,4,5,6,7,8,9]
offsets_just_one = [1]
offsets_all_but_last = [1, 9]
@test Flux._splitat(data, offsets_good) == [[1, 2], [3, 4, 5], [6, 7, 8, 9]]
@test Flux._splitat(data, offsets_each) == [[1], [2], [3], [4], [5], [6], [7], [8], [9]]
@test Flux._splitat(data, offsets_just_one) == [[1,2,3,4,5,6,7,8,9]]
@test Flux._splitat(data, offsets_all_but_last) == [[1,2,3,4,5,6,7,8], [9]]
offsets_non_monotonic = [1, 2, 2, 5]
offsets_non_sorted = [1, 5, 2]
offsets_non_one = [2, 3, 5]
offsets_too_large = [1, 5, 11]
@test_throws ArgumentError Flux._splitat(data, offsets_non_monotonic)
@test_throws ArgumentError Flux._splitat(data, offsets_non_sorted)
@test_throws ArgumentError Flux._splitat(data, offsets_non_one)
@test_throws ArgumentError Flux._splitat(data, offsets_too_large)
@testset for reduction in [sum, Statistics.mean, maximum]
vocab_size, embed_size = 10, 4
emb_bag = Flux.EmbeddingBag(vocab_size => embed_size, reduction)
emb = Flux.Embedding(emb_bag.weight)
@test size(emb_bag.weight) == (embed_size, vocab_size)
@test_throws ErrorException emb_bag(2)
# single bag (input as a vector)
x = rand(1:vocab_size, 3)
y = emb_bag(x)
z = vec(reduction(emb(x), dims=2))
@test y isa Vector{Float32}
@test y z
# PyTorch style `input`/`offset` bagging
@test emb_bag([1,3,2,4,5,7], [1,3,5]) emb_bag([[1,3], [2,4], [5,7]])
@test emb_bag([1,3,2,4,5,7], [1,3,5]) emb_bag([1 2 5; 3 4 7])
@test_throws ArgumentError emb_bag([1,2,3,4,5,6], [2, 4])
@test_throws ArgumentError emb_bag([1,2,3,4,5,6], [1, 12])
# docstring example
@test emb_bag([1,2,3,4,5,6,7,8,9,10], [1,5,6,8]) emb_bag([[1,2,3,4], [5], [6,7], [8,9,10]])
# multiple bags (input as a vector of vectors)
x = [rand(1:vocab_size, 3) for _ in 1:4]
y = emb_bag(x)
z = reduce(hcat, reduction.(emb.(x), dims=2))
@test y isa Matrix{Float32}
@test y z
# multiple bags (input as a matrix)
x = rand(1:vocab_size, (3, 5))
xvec = collect(eachcol(x))
y = emb_bag(x)
z = reduce(hcat, reduction.(emb.(xvec), dims=2))
@test y emb_bag(xvec)
@test y z
# a one-hot matrix is a bag, but a one-hot vector is not.
@test_throws ErrorException emb_bag(Flux.OneHotVector(3, vocab_size))
i2 = rand(1:vocab_size, 3)
x2 = Flux.OneHotMatrix(i2, vocab_size)
y2 = emb_bag(x2)
z2 = emb(i2)
@test y2 isa Vector{Float32}
@test y2 vec(reduction(z2, dims=2))
@test_throws DimensionMismatch emb_bag(Flux.OneHotMatrix(1:5, 1000))
end
end
end
@testset "second derivatives" begin
m1 = Chain(Dense(3,4,tanh; bias=false), Dense(4,2))
@test Zygote.hessian_dual(summ1, [1,2,3]) Zygote.hessian_reverse(summ1, [1,2,3])
m1v = Chain([m1[1], m1[2]]) # vector of layers
@test Zygote.hessian_dual(summ1v, [1,2,3]) Zygote.hessian_dual(summ1, [1,2,3])
@test Zygote.hessian_dual(summ1v, [1,2,3]) Zygote.hessian_reverse(summ1v, [1,2,3])
# NNlib's softmax gradient writes in-place
m2 = Chain(Dense(3,4,tanh), Dense(4,2), softmax)
@test_broken Zygote.hessian_dual(summ2, [1,2,3]) Zygote.hessian_reverse(summ2, [1,2,3])
# path_to_url
m3 = Chain(Conv((3,), 2 => 3, relu), Dense(2,2))
x3 = cat(Float32[1 2; 3 4; 5 6; 7 8]; dims=3)
@test Zygote.hessian_dual(summ3, x3) Zygote.hessian_reverse(summ3, x3)
end
@testset "gradients of Chain{Vector}" begin
m1 = Chain(Dense(3,4,tanh; bias=false), Dense(4,2))
m1v = Chain([m1[1], m1[2]])
@test sum(length, params(m1)) == sum(length, params(m1v))
x1 = randn(Float32,3,5)
@test m1(x1) m1v(x1)
y1 = rand(Bool,2,5)
g1 = gradient(() -> Flux.Losses.logitcrossentropy(m1(x1), y1), params(m1))
g1v = gradient(() -> Flux.Losses.logitcrossentropy(m1v(x1), y1), params(m1v))
@test g1[m1[1].weight] g1v[m1v[1].weight]
@test g1[m1[2].bias] g1v[m1v[2].bias]
@test Flux.destructure(m1)[1] Flux.destructure(m1v)[1]
z1 = rand(22);
@test Flux.destructure(m1)[2](z1)[1].weight Flux.destructure(m1v)[2](z1)[1].weight
# Note that Flux.destructure(m1v)[2](z) has a Chain{Tuple}, as does m1v[1:2]
end
@testset "PairwiseFusion" begin
x = (rand(1, 10), rand(30, 10))
layer = PairwiseFusion(+, Dense(1, 30), Dense(30, 10))
y = layer(x)
@test length(y) == 2
@test size(y[1]) == (30, 10)
@test size(y[2]) == (10, 10)
x = rand(1, 10)
layer = PairwiseFusion(.+, Dense(1, 10), Dense(10, 1))
y = layer(x)
@test length(y) == 2
@test size(y[1]) == (10, 10)
@test size(y[2]) == (1, 10)
@test PairwiseFusion(vcat, x->x.+1, x->x.+2, x->x.^3)(2, 10, 20) == (3, [5, 12], [125, 1728, 8000])
@test PairwiseFusion(vcat, x->x.+1, x->x.+2, x->x.^3)(7) == (8, [10, 9], [1000, 729, 343])
end
``` |
```javascript
const fields = ['id', 'name', 'username'];
const id = '1';
module.exports = /* GraphQL */ `
query getUser {
user(id: ${id}) {
${fields.join('\n')}
}
}
`;
``` |
The 2018–20 World Boxing Super Series – cruiserweight division was a World Boxing Super Series professional boxing tournament which took place between October 2018 and September 2020 in several countries. The Super Series features eight top-rated cruiserweight boxers in a single-elimination tournament. The tournament was organized by Comosa AG.
This tournament will be the second World Boxing Super Series held at cruiserweight, following the 2017–18 edition, which saw Oleksandr Usyk unify all four major world titles.
Participants
Brackets
Source:
Quarter-finals
The quarterfinals are held from 13 October to 10 November 2018.
Semi-finals
Both semifinal fights were held on 15 June 2019, at Arēna Rīga, Riga, Latvia.
Final
The final originally was to be held on 16 May 2020 at Arēna Rīga, Riga, Latvia, the same place as the semi-finals, for the IBF and The Ring titles, but was postponed to 26 September 2020 at Plazamedia Broadasting Center, Munich, Germany due to the COVID-19 pandemic and will be played behind closed doors.
References
World Boxing Super Series
World Boxing Super Series
World Boxing Super Series
World Boxing Super Series |
In mathematical group theory, a subgroup of a group is termed a special abelian subgroup or SA-subgroup if the centralizer of any nonidentity element in the subgroup is precisely the subgroup. Equivalently, an SA subgroup is a centrally closed abelian subgroup.
Any SA subgroup is a maximal abelian subgroup, that is, it is not properly contained in another abelian subgroup.
For a CA group, the SA subgroups are precisely the maximal abelian subgroups.
SA subgroups are known for certain characters associated with them termed exceptional characters.
References
Subgroup properties
Finite groups |
Tarmount is a town and commune in M'Sila Province, Algeria. According to the 1998 census it has a population of 9438.
References
Communes of M'Sila Province
Cities in Algeria |
The year 1919 in science and technology involved some significant events, listed below.
Astronomy
The International Astronomical Union is established in Paris.
Chemistry
June 1 – The term covalence in relation to chemical bonding is first used by Irving Langmuir.
F. W. Aston discovers multiple stable isotopes for neon.
History of science
Leonard Eugene Dickson begins publication of History of the Theory of Numbers.
Mathematics
Viggo Brun proves Brun's theorem B2 for twin primes.
Medicine
Dr George Newman is appointed as the first Chief Medical Officer to the Ministry of Health in England and Wales.
Physics
May 29 – Einstein's theory of general relativity is tested by Arthur Eddington's observation of the "bending of light" during the total solar eclipse on this day observed in Principe, and by Andrew Crommelin in Sobral, Ceará, Brazil (confirmed November 6).
Arnold Sommerfeld and Walther Kossel publish their displacement law.
James Jeans discovers that the dynamical constants of motion determine the distribution function for a system of particles.
Betz's law is published by German physicist Albert Betz, indicating the maximum power that can be extracted from the wind, independent of the design of a wind turbine in open flow.
Psychology
In Berlin Dr Magnus Hirschfeld and Arthur Kronfeld found the Institut für Sexualwissenschaft.
Technology
First crossings of the Atlantic Ocean by air.
May 8–27 – United States Navy Curtiss flying boat NC-4 commanded by Albert Cushing Read makes the first transatlantic flight, from Naval Air Station Rockaway to Lisbon via Newfoundland and the Azores.
June 14–15 – A Vickers Vimy flown by John Alcock and Arthur Whitten Brown makes the first nonstop transatlantic flight, from St. John's, Newfoundland, to Clifden, Ireland.
July 2–6 – British airship R34 makes the first transatlantic flight by dirigible, and the first westbound flight, from RAF East Fortune, Scotland, to Mineola, New York.
May 29 – Charles Strite files a United States patent for the electric pop-up bread toaster.
October 17 – Dr. Frank Conrad begins broadcasting from 8XK in Pittsburgh (United States).
Lee De Forest files his first United States patent for the Phonofilm sound-on-film process.
United States firearms designer John Browning finalizes the design of the M1919 Browning machine gun.
United States firearms designer John T. Thompson finalizes the design of the Thompson submachine gun.
A United States patent for the self-folding shirt collar is obtained by the Phillips-Jones Corporation.
Awards
Nobel Prize
Physics – Johannes Stark
Chemistry – not awarded
Medicine – Jules Bordet
Births
January 23 – Hans Hass (died 2013), Austrian zoologist and oceanographer.
February 25 – Karl H. Pribram (died 2015), Austrian-American neuroscientist.
April 1 – Joseph Murray (died 2012), American Nobel Prize-winning transplant surgeon.
June 22 – Henri Tajfel (died 1982), Polish-born social psychologist.
July 26 – James Lovelock (died 2022), English environmentalist and futurologist.
August 12 – Margaret Burbidge, born Eleanor Margaret Peachey (died 2020), English-born American astronomer.
August 30 – Maurice Hilleman (died 2005), American vaccinologist.
September 6 – Wilson Greatbatch (died 2011), American biomedical engineer.
September 21 – Mario Bunge (died 2020), Argentine-born philosopher of science.
November 10 – Mikhail Kalashnikov (died 2013), Russian small arms designer.
December 8 – Kateryna Yushchenko (died 2001), Ukrainian computer scientist and academic.
Deaths
January 15 – Rosa Luxemburg (born 1871), Polish Marxist theorist, philosopher, economist, anti-war activist, and revolutionary socialist.
February 19 – Frederick DuCane Godman (born 1834), English lepidopterist, entomologist and ornithologist.
April 4 – Sir William Crookes (born 1832), English chemist and physicist.
April 17 – Bernhard Sigmund Schultze (born 1827), German obstetrician.
May 8 – LaMarcus Adna Thompson (born 1848), American inventor.
c. June 1 – Caroline Still Anderson (born 1848), African American physician, educator and activist.
June 30 – John William Strutt, 3rd Baron Rayleigh (born 1842), English Nobel Prize-winning physicist.
July 15 – Emil Fischer (born 1852), German Nobel Prize-winning chemist (suicide).
July 21 – Gustaf Retzius (born 1842), Swedish anatomist.
August 8 – Ernst Haeckel (born 1834), German zoologist.
August 23 – Augustus George Vernon Harcourt (born 1834), English chemist.
November 23 – Henry Gantt (born 1861), American project engineer.
December 16 – Julia Lermontova (born 1846), Russian chemist.
December 29 – Sir William Osler (born 1849), Canadian-born physician.
References
20th century in science
1910s in science |
Léonore Porchet, (born 9 July 1989) is a Swiss politician. A member of the Green Party of Switzerland, Porchet has represented Vaud canton in the National Council since the 2019 Swiss federal election.
Biography
Léonore Porchet was born on 9 July 1989 in Châtel-Saint-Denis, but grew up in the town of Muntelier.
Porchet spent her youth in the northern part of Vaud, then studied history and art at University of Lausanne, where she received her Master of Letters degree in 2015. Her thesis focused on the use of comics as political communication in Geneva.
Porchet began her career as a communications specialist and project manager, specializing in health, culture and urban planning. At the end of 2019, she began working as a freelance professional.
Political career
Porchet served as a Communal Councilor and leader of the Greens in Lausanne from 2015 to 2017 and was later elected to the Grand Council of Vaud Canton in 2017. In the 2019 Swiss federal election, Porchet was elected to the National Council.
During her political career, Porchet has focused on issues around equality, combatting street harassment, health, universal basic income, career training for students, arts and culture, as well as mobility and exercise.
In the National Council, Porchet sits on the Public Health and Social Security Committee, the National Security Committee and the Judicial Committee.
Outside of her political work, Porchet has been on the board of the diabetes charity Diabète Vaud since 2019 and has been president of the Organization EyesUp since 2018.
Prior to the 2015 Swiss federal election, Porchet was featured on MoiCandidat.ch, a documentary series by Radio Télévision Suisse that followed candidates on the campaign trail.
References
External links
1989 births
Living people
Green Party of Switzerland politicians
People from the canton of Fribourg
University of Lausanne alumni
Members of the National Council (Switzerland) |
Pakman is a surname. Notable people with the surname include:
David Pakman (born 1984), Argentine-American host, political commentator, and YouTube personality
David B. Pakman (born 1969), internet entrepreneur and venture capitalist
See also
Akman
Pac-Man (disambiguation) |
Central Hungary () is one of the seven statistical regions in Hungary (NUTS 1 and NUTS 2). It includes (the capital of the region) and .
Administration
Central Hungary's subregions (population figures from the Hungarian Central Statistical Office as of 2009)
Demography
Total population 2,925,500 (2009)
14% aged 0–14 years
69% aged 15–64 years
17% aged 65 and over
Economy
Central Hungary is the richest and most developed region of the country. The unemployment rate stood at 2.7% in 2017 and was much lower than the national and the european average.
Tourism
Central Hungary is part of the Budapest Central Transdanubia Tourist Region.
Budapest
In 1987 a World Heritage Site was declared which includes Buda Castle, the Danube Riverbank, the Andrássy Avenue and its historic surroundings, the Millennium Underground Railway and Heroes' Square.
Other important landmarks in Buda are the Gellért Hill and the tomb of Gül Baba and Rudas Baths built during the Ottoman rule of Hungary, ruins of Old Buda, the Coliseum in Nagyszombat Street and the ruins of Aquincum. In the Buda Hills are the Chairlift, the Children's railway and caves with stalagmites and stalactites.
The most important landmarks in Pest are the Hungarian Parliament Building, the St. Stephen's Basilica, the Inner City Parish Church, the Hungarian Academy of Sciences, the Vigadó Concert Hall, the Hungarian National Museum, the New York Palace on the Small Boulevard, the Dohány Street Synagogue, the Grand Boulevard, and the Museum of Applied Arts.
Other important displays are at the Museum of Fine Arts, the Hungarian National Gallery, the Ethnographic Museum, the Budapest History Museum and Statue Park.
Important landmarks are Budapest's oldest bridges, such as the Széchenyi Chain Bridge, the Margaret Bridge, the Liberty Bridge. The biggest parks are very popular, especially the City Park with Vajdahunyad Castle, the Széchenyi thermal bath, the Budapest Zoo and Botanical Garden and the Margaret Island. Budapest is world-famous for its hot spas too.
Budapest holds many perennial events, for example Budapest Fair, Fireworks and Budapest Parade.
Places of interest in are Gödöllő (Royal Castle and Arboretum), Ráckeve (Serbian cathedral and Savoya Castle), Szentendre (Baroque town square, Margit Kovács Museum, Ethnographic Open Air Museum), Vác (cathedral, triumphal arch) and Visegrád (Visegrád Castle).
Other landmarks are the church (built in the Middle Ages) in Zsámbék, the Reformed church of the Holy Roman Empire, the church in Fót in the Romantic style, Apaj plain, ancient juniper fields in Tatárszentgyörgy, equestrianism in Pusztavacs, Attila Rise in Tápiószentmárton, the arboretum in Vácrátót and the bear sanctuary in Veresegyház.
The Pilis Mountains offer plenty of opportunities for hiking. There are also the Visegrád Hills, Ördögmalom waterfall, Gödöllő National Park and Ócsa National Park.
See also
List of regions of Hungary
References
External links
NUTS 1 statistical regions of the European Union
NUTS 2 statistical regions of the European Union |
```java
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package org.activiti.examples.mgmt;
import java.util.Arrays;
import java.util.Map;
import org.activiti.engine.impl.test.PluggableFlowableTestCase;
import org.flowable.common.engine.api.management.TableMetaData;
import org.flowable.engine.ManagementService;
/**
* Test case for the various operations of the {@link ManagementService}
*
* @author Tom Baeyens
* @author Joram Barrez
*/
public class ManagementServiceTest extends PluggableFlowableTestCase {
public void testTableCount() {
Map<String, Long> tableCount = managementService.getTableCount();
String tablePrefix = processEngineConfiguration.getDatabaseTablePrefix();
assertEquals(Long.valueOf(13), tableCount.get(tablePrefix + "ACT_GE_PROPERTY"));
assertEquals(Long.valueOf(0), tableCount.get(tablePrefix + "ACT_GE_BYTEARRAY"));
assertEquals(Long.valueOf(0), tableCount.get(tablePrefix + "ACT_RE_DEPLOYMENT"));
assertEquals(Long.valueOf(0), tableCount.get(tablePrefix + "ACT_RU_EXECUTION"));
assertEquals(Long.valueOf(0), tableCount.get(tablePrefix + "ACT_ID_GROUP"));
assertEquals(Long.valueOf(0), tableCount.get(tablePrefix + "ACT_ID_MEMBERSHIP"));
assertEquals(Long.valueOf(0), tableCount.get(tablePrefix + "ACT_ID_USER"));
assertEquals(Long.valueOf(0), tableCount.get(tablePrefix + "ACT_RE_PROCDEF"));
assertEquals(Long.valueOf(0), tableCount.get(tablePrefix + "ACT_RU_TASK"));
assertEquals(Long.valueOf(0), tableCount.get(tablePrefix + "ACT_RU_IDENTITYLINK"));
}
public void testGetTableMetaData() {
String tablePrefix = processEngineConfiguration.getDatabaseTablePrefix();
TableMetaData tableMetaData = managementService.getTableMetaData(tablePrefix + "ACT_RU_TASK");
assertEquals(tableMetaData.getColumnNames().size(), tableMetaData.getColumnTypes().size());
assertEquals(37, tableMetaData.getColumnNames().size());
int assigneeIndex = tableMetaData.getColumnNames().indexOf("ASSIGNEE_");
int createTimeIndex = tableMetaData.getColumnNames().indexOf("CREATE_TIME_");
assertTrue(assigneeIndex >= 0);
assertTrue(createTimeIndex >= 0);
assertOneOf(new String[] { "VARCHAR", "NVARCHAR2", "nvarchar", "NVARCHAR", "CHARACTER VARYING" }, tableMetaData.getColumnTypes().get(assigneeIndex));
assertOneOf(new String[] { "TIMESTAMP", "TIMESTAMP(6)", "datetime", "DATETIME" }, tableMetaData.getColumnTypes().get(createTimeIndex));
}
private void assertOneOf(String[] possibleValues, String currentValue) {
for (String value : possibleValues) {
if (currentValue.equals(value)) {
return;
}
}
fail("Value '" + currentValue + "' should be one of: " + Arrays.deepToString(possibleValues));
}
}
``` |
Hippocampus casscsio, the Beibu Bay seahorse, is a species of marine fish of the family Syngnathidae. It is found off the coast of Hainan, China, and from sites around Beibu Bay/the Gulf of Tonkin. It inhabits shallow coastal waters to depths of . It is expected to consume small benthic and planktonic crustaceans such as copepods, shrimps, and mysids, similar to other seahorses. This species is ovoviviparous, with males brooding eggs in a brood pouch before giving birth to live young. It grows to a length of .
References
Further reading
WoRMS
iSeahorse
IUCN Seahorse, Pipefish & Stickleback Specialist Group
casscsio
Fish described in 2016
Marine fish |
Iris sikkimensis is a plant species in the genus Iris, it is also in the subgenus Iris and in the section Pseudoregelia. It is a rhizomatous perennial, from Sikkim (a landlocked Indian state located in the Himalayan mountains). It has pale green or light green thin leaves, slender stem (similar height to the leaves), 2 or 3 lilac or purple flowers, with a white beard with orange tips. It is thought to be a hybrid of Iris hookeriana and Iris kumaonensis.
Description
It has a slender, gnarled rhizome, which has the fibrous remains of old leaves on the top. It forms clumps of plants.
It has pale green, or light green leaves, that can grow up to between long (at flowering time), and between 1.2 and 2 cm wide. After flowering, they extend up to between long. They are linear, erect, ensiform (sword shaped), and semi-deciduous.
It has a slender stem, that can grow up to between tall. The stem appears in April, from a tuft of 4 reduced Basal leaf leaves.
The stem has pale green, lanceolate spathes (leaves of the flower bud). They are (scarious) membranous, in the top third of the leaf and along the edges.
The stems hold 2 or 3 terminal (top of stem) flowers, blooming between March and April.
The flowers come in shades of lilac or purple, with a darker mottling.
It has a deep purple, trigonal, long perianth tube, and a 1.2–2 cm long pedicel.
Like other irises, it has 2 pairs of petals, 3 large sepals (outer petals), known as the 'falls' and 3 inner, smaller petals (or tepals), known as the 'standards'. The falls have an obovate (narrower end at the base) shaped blade, they are long and 2.5 cm wide. The haft (or part of the petal beside the stem) is wedge shaped and white with purple blotching, or marbling. In the centre of the petal is a white beard with orange tips.
The erect standards are oblong, 5 cm long and 2 cm wide. They are lighter in colour to the falls, pale mauve, or lilac, with a fainter mottling of a darker shade.
It has narrow, deep purple styles, with faint stripes, or pale at the edges, and are 2.5 cm long. The style branch has triangular crests. It has pale violet filaments, bi-lobed stigma and creamy white anthers.
It also has a green ovary, that is 2 cm long, mottled and striped purple.
After the iris has flowered, it does not produce a seed capsule or seeds.
Biochemistry
As most irises are diploid, having two sets of chromosomes, this can be used to identify hybrids and classification of groupings.
It has a chromosome count: 2n=22
Taxonomy
It is sometimes commonly known as 'Sikkim Iris'.
It is pronounced as (Iris) EYE-ris (sikkimensis) sik-im-EN-sis.
The Latin specific epithet sikkimensis refers to the region of Sikkim (Indian Himalayas) where the iris was found.
Mr William Rickatson Dykes had received this plant originally from Mr. Barr (a plant collector with Messrs. Barr. & Sons,) in about 1906, and was labelled Iris kamaonensis caulescens. He then published and described the iris as Iris kumaonensis var. caulescens. 4 years later, he changed his mind after raising the plant from seed in his garden. He thought that it was a distinct species in its own right.
It was then published and described by William Rickatson Dykes in his book 'The Genus Iris' (Gen. Iris) on page134. in 1913, or 1912.
It is similar in form to both Iris hookeriana and Iris kemaonensis, but the range of both irises does not spread as far as the Himalayas. Due to the fact that Iris sikkimensis does not set seed, it has thought to be more of a hybrid species between the two.
The lack of seed production has also meant it is thought to be extinct in the wild. It is also very rare in cultivation, specimens have been lost in Indian herbaria and botanical gardens. No plants are found in the UK as well.
It was verified by United States Department of Agriculture and the Agricultural Research Service on 9 January 2003, then updated on 1 March 2007.
It is listed as an 'unresolved name' in The Plant List.
Iris sikkimensis is an accepted name by the RHS, it was also last listed in the 'RHS Plant Finder' in 2010.
Distribution and habitat
It is thought to be native to temperate Asia.
Range
It was found in Sikkim, in India, within the eastern Himalayas.
It was listed in 'Flowering Plants Of Sikkim' in 2008.
Cultivation
It is hardy, and can survive winter frosts. It can also tolerate moisture during the winter.
But prefers to have a dry period during the summer.
A specimen of the iris can be found in 'The Arboretum and Botanical Garden' of the University of Bergen in Norway, and it can also be found in University Botanic Gardens of Ljubljana in Slovenia.
Propagation
It can only be propagated by division as it seems not to produce seeds.
Toxicity
Like many other irises, most parts of the plant are poisonous (rhizome and leaves), and if mistakenly ingested can cause stomach pains and vomiting. Also, handling the plant may cause a skin irritation or an allergic reaction.
References
Other sources
Liberty Hyde Bailey Hortorium. 1976. Hortus third.
Mathew, B. 1981. The Iris. 68.
External links
Image of the iris in flower in the Himalayas
Has illustration of the Iris from Dykes, W.R., The Genus Iris on page 134
sikkimensis
Flora of Sikkim
Flora of East Himalaya
Garden plants of Asia
Plants described in 1912 |
The Association of Fundamental Baptist Churches in the Philippines (AFBCP) is an organization guiding cooperative ministries of Independent Baptist churches on the islands of the Philippines.
History
The Association of Fundamental Baptist Churches shares a common early history with the Convention of Philippine Baptist Churches. Both bodies are an outgrowth of the first mission work on the islands. The work began in 1900 with Eric Lund (a Swedish missionary working with the American Baptist Missionary Union) and Braulio Manikin (a Filipino converted during Lund's work in Spain) on the island of Panay. Neither national organization actually existed at the time of the split.
In 1927, Dr. Raphael C. Thomas was told to give up making evangelistic trips and concentrate his work solely to the hospital in Jaro. This Dr. Thomas refused to do, choosing rather to resign from his work with the American Baptist Foreign Mission Society and return to the United States. In August of that year, a group met in Watch Hill, Rhode Island at the invitation of Marguerite Doane (1868–1954; daughter of hymn writer William Doane). Out of this meeting came a new agency for sending and supporting missionaries - the Association of Baptists for Evangelism in the Orient (now Association of Baptists for World Evangelism). Dr. Thomas returned to the Philippines in 1928, settling in Manila. The first church established by ABEO and Thomas was the First Baptist Church of Manila.
World War II brought much devastation to Baptist missionary work in the Philippines, and much reorganization was required. The Association of Fundamental Baptist Churches was formed in 1948. A Philippine Association of Baptists for World Evangelism was organized in 1957 for the purpose of sending missionaries to Borneo. They now have about a dozen missionaries in southeast Asia.
The Association of Fundamental Baptist Churches and the Association of Bible Believing Churches of the Philippines reconciled at a convention held in 1997. Together, they have over 2000 churches in the Philippines. Bethel Baptist Hospital is a non-profit institution affiliated with the Association. The Association participates in the International Partnership of Fundamental Baptist Ministries, and is a member of the Far Eastern Council of Christian Churches, and the International Council of Christian Churches. Rev. Arleen D. Fidel as of 2004, serves the body as chairman.
External links
The Game was worth the Candle (provides early history of ABWE in the Philippines)
References
Baptists Around the World, by Albert W. Wardin, Jr.
The Baptist Heritage: Four Centuries of Baptist Witness, by H. Leon McBeth
Baptist Christianity in the Philippines
Christian organizations established in 1948
Baptist denominations in Asia
Independent Baptist denominations
Baptist denominations established in the 20th century
1948 establishments in the Philippines |
Michael Louis Bernacchi (1911–1983) was a British colonial administrator, who was the Resident Commissioner of the Gilbert and Ellice Islands from 1952 to 1961.
Bernacchi also served as a Lieutenant Commander in the Royal Navy, and as a district officer in the Colonial Office in British Malaya during the Malayan Emergency.
He was the eldest son of Louis Bernacchi, an Australian physicist and astronomer best known for his role in several Antarctic expeditions. He married Elaine Chapman from Navua, Fiji. Chapman was the granddaughter of Sir John Maynard Hedstrom, founder of Morris Hedstrom and Company, the largest trading corporation in Fiji.
Between 1966 and 1983 he lived in Christchurch, New Zealand. He donated many of his father's Antarctic collection to the Canterbury Museum, that related to the Carstens Borchgrevink's Southern Cross expedition (1898–1900) and the Discovery expedition led by Robert Falcon Scott (1901–1904).
References
1911 births
1983 deaths
Colonial Administrative Service officers
Governors of the Gilbert and Ellice Islands
Companions of the Order of St Michael and St George
Officers of the Order of the British Empire
Royal Navy officers
Magdalene College, Cambridge |
The HTC Titan (stylized and marketed as uppercase HTC TITAN; also known as the HTC Eternity in China, and HTC Ultimate in Brazil), is a smartphone running the Windows Phone OS 7.5 (codename Mango) operating system. The phone was designed and manufactured by HTC Corporation. It is the successor to the HTC HD7.
Description
HTC announced the HTC Titan on September 1, 2011, in London. It has a 4.7-inch S-LCD screen which was the largest available on any Windows Phone at the time of its release. The HTC Titan also has a 1.5 GHz processor with 512 MB RAM and 16 GB internal memory.
On 9 January 2012, the successor to the Titan, the Titan II, was announced as the first Windows Phone handset with LTE. The Titan II is similar to the Titan, with the major changes being LTE enabled and improving the camera to 16 megapixels.
Reception
The phone has been well received by reviewers. It has been called the flagship Windows phone by multiple reviewers.
See also
Windows Phone
References
External links
Official HTC Titan homepage
Windows Phone devices
HTC smartphones
Mobile phones introduced in 2011
Discontinued smartphones |
Roger Lim (born June 4, 1968) is an American actor, director, producer, and screenwriter.
Education and early career
Born and raised in San Francisco, California, he graduated from the University of San Francisco with a B.A. in Psychology. As a junior at the Lowell High School (San Francisco), he was named All-City pitcher after winning his school's first-ever playoff-championship game at Candlestick Park. After a career threatening rotator cuff injury his senior year, he managed to walk on as an outfielder his freshman year at USF. With his arm fully recovered, he transferred to Cal State East Bay in Hayward, where he finished as the team's second leading hitter. In between college seasons, he competed at third base in front of professional scouts at recruitment camps for the Seattle Mariners, Philadelphia Phillies, and the Major League Scouting Bureau. After returning to USF to earn his degree, he converted to a full-time catcher, playing on various semi-pro teams around Northern and Southern California. After settling in L.A., he began training concurrently in massage therapy and acting courses. During that time, he landed various talent agents, leading him to model in over 150 print ad campaigns. During his studies at the Larry Moss Studios he started writing. Soon afterwards he began scripting his AmerAsian Trilogy.
Filmmaker
Rush Hour 2 (2001) — Lim's first-ever job behind the camera was as a stand-in for Jackie Chan during the final stages of production in Los Angeles. Watching Jackie work so closely with Brett Ratner was an extremely enlightening experience, teaching him the value of timing, precision and perfection.
AmerAsian (2009) — Lim's first AmerAsian film as actor/ director/ producer/ screenwriter was completed in 2009. Eric Young, stagnant and lifeless since his father's death, is coerced by his best friend, Sean, to borrow an identity and take back a forgone year of baseball eligibility. Once in class, Eric immediately connects with Monica, the charming, All-American daughter of his coach, Coach Donovan. Although Eric works harder than anyone to earn playing time, the jealous Donovan permanently relegates him to the bench. Due to his own hidden motives, Sean warns Eric to steer clear of Monica and to focus strictly on baseball. But when Eric turns the other ear, he finds the closer he grows to Monica, the darker the secrets that surface from her abusive past. Eric is ultimately forced to the weigh the challenges of his own mental well-being against the psychological pain which causes Monica to spiral out of control.
Great American Dream (2011) — Lim's second AmerAsian film is nearing completion. Eric Young and his new friend, Danny, re-enroll in college under false identities, attempting to erase their imperfect baseball pasts. As Eric tries his best to fit in on the team, he repeatedly finds himself the victim of jealous circumstances. However, Eric, still suffering from the loss of his father, connects deeply with Coach Pierce, still suffering from the loss of his son. But the closer the pair become, the further Danny distances himself, as he experiments with performance-enhancing drugs. When a pair of racist enemies from the past unexpectedly resurface, Eric's career swings full circle, presenting a bittersweet chance at redemption. Thus, Eric, forced to enter biggest game of his life, must stay completely hidden behind the catcher's mask, or jeopardize his identity amidst an increasingly ominous situation.
Young Again aka AmerAsian3 (2012) — Lim's 3rd installment of the AmerAsian Trilogy is currently in production with principal photography concluding in Summer 2009. Eric Young begins his final journey in graduate school where he's dared by Frates, his roommate, to try out for the Volcano baseball team by passing himself off as a decade younger. After Eric barely makes the cut, he returns the favor by mentoring Frates at catcher, despite the increasing suspicion of Smaller, the assistant coach, and Barber, the starting catcher. When the Volcanos learn they'll play a crucial exhibition against a minor league team, attracting several professional scouts, a physical and mental battle ignites between Eric and Frates for the starting job. But as the competition intensifies, Frates opts to take the ultimate short cut, causing tempers to fly out of control, and forcing Eric to learn the hard way just who Frates really is.
Filmography
Vanilla Sky (2001) – actor
Rush Hour 2 (2001) – actor and stand-in for Jackie Chan
Alias (2002) – actor
The Young and the Restless (2002) – actor
Tequila Express (2002 film) – actor
The Tonight Show with Jay Leno (2003–04) – actor (various characters)
Rumor Has It… (2005) – actor
Coach Carter (2005) – actor
It Is Written (2007) – actor (various characters)
L.A. Forensics (2007) – actor
NCIS (2007) – actor
AmerAsian (2009) -- actor, director, producer, screenwriter
Great American Dream (2010) -- actor, director, producer, screenwriter
Young Again (2020) -- actor, director, producer, screenwriter
References
External links
Living people
1968 births
University of San Francisco alumni
Los Angeles Pierce College people
California State University, East Bay alumni |
Alexander Vladimirovich Kasjanov (, born 30 September 1983) is a Russian bobsledder who has competed since 2006. He has competed at the 2014 Winter Olympics, where he got 4th place in two-man and four-men event. On November 29, 2017, he was disqualified for doping and received a life-time ban from the Olympics.
World Cup Podiums
References
External links
1983 births
Bobsledders at the 2014 Winter Olympics
Living people
Olympic bobsledders for Russia
Russian male bobsledders
People from Bratsk
Russian sportspeople in doping cases
Doping cases in bobsleigh
Sportspeople from Irkutsk Oblast |
```html
<!--
(See accompanying file LICENSE.md or copy at path_to_url
-->
<!-- boost-no-inspect -->
<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Boost.Hana: boost/hana/filter.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
// (See accompanying file LICENSE.md or copy at path_to_url
MathJax.Hub.Config({
"HTML-CSS": {
linebreaks: {
automatic: true,
width: "75% container"
}
}
});
</script><script type="text/javascript" src="path_to_url"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<!-- Additional javascript for drawing charts. -->
<script type="text/javascript" src="highcharts.js"></script>
<script type="text/javascript" src="highcharts-data.js"></script>
<script type="text/javascript" src="highcharts-exporting.js"></script>
<script type="text/javascript" src="chart.js"></script>
<script type="text/javascript" src="hana.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="Boost.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Boost.Hana
 <span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Your standard library for metaprogramming</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('filter_8hpp.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle">
<div class="title">filter.hpp File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Defines <code><a class="el" href="group__group-MonadPlus.html#ga65cc6d9f522fb9e8e3b28d80ee5c822a" title="Filter a monadic structure using a custom predicate.Given a monadic structure and a predicate...">boost::hana::filter</a></code>.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceboost_1_1hana"><td class="memItemLeft" align="right" valign="top">  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1hana.html">boost::hana</a></td></tr>
<tr class="memdesc:namespaceboost_1_1hana"><td class="mdescLeft"> </td><td class="mdescRight">Namespace containing everything in the library. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Defines <code><a class="el" href="group__group-MonadPlus.html#ga65cc6d9f522fb9e8e3b28d80ee5c822a" title="Filter a monadic structure using a custom predicate.Given a monadic structure and a predicate...">boost::hana::filter</a></code>. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!--
(See accompanying file LICENSE.md or copy at path_to_url
-->
<!-- boost-no-inspect -->
<!-- HTML footer for doxygen 1.8.9.1-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_1878a3f4746a95c6aad317458cc7ef80.html">boost</a></li><li class="navelem"><a class="el" href="dir_daf74c896eae580804ddb7810f485dad.html">hana</a></li><li class="navelem"><a class="el" href="filter_8hpp.html">filter.hpp</a></li>
</ul>
</div>
</body>
</html>
``` |
The Director of Operations, Planning and Development for Military Commissions serves as the point of contact between the Office of Military Commissions and other United States military and civilian agencies. The position was created on 19 September 2008.
Reporting structure
The position was to be filled by a flag officer, who was to report directly to the Department of Defense's General Counsel, who was at the time William J. Haynes. Haynes has subsequently resigned, and the first Director reported to United States Deputy Secretary of Defense Gordon R. England and acting General Counsel Daniel J. Dell'Orto.
Directors
The first officer to be appointed Director was Brigadier Thomas W. Hartmann a military lawyer in the United States Air Force Reserve. Hartmann had previously been the Legal Advisor to the Convening Authority for the Office of Military Commissions. The Convening Authority is a civilian position, currently held by VADM Bruce MacDonald, the former TJAG of the US Navy (Pentagon). As Legal Advisor Hartmann was essentially the second-in-command.
Hartmann had been reassigned from the position of Legal Advisor after the officers Presiding over three separate Guantanamo military commissions had barred him from participation after he was accused of putting "undue command influence" on Prosecutors. On 2 November 2008 Carol Rosenberg, writing in the Miami Herald, reported that Hartmann had filed a request to retire from the Air Force on 17 February 2008.
Hartmann was replaced by his deputy Michael Chapman, who had been the deputy Legal Advisor since April 2005.
Hartmann attributed his reassignment, and appointment to the new position, to the "explosive growth of the commissions over the last 10 or 12 months."
The Air Force described Hartmann new appointment as a promotion. Hartmann's boss at the Pentagon, William J. Haynes, had resigned in February.
The Operations Director position was "civilianized" in the fall of 2009 following Hartman's retirement. The current Director of Operations, Ward K. Johnson, III, was appointed to the post in November 2009. Johnson had previously served on active duty with the U.S. Army as a Branch Chief, Presiding Officer and Tribunal President with the Office for the Administrative Review of the Detention of Enemy Combatants under the control of Deputy Secretary of Defense England. Johnson had previously served as Director of Operations of the North Dakota National Guard, Provost Marshal for the North Dakota Joint Forces Headquarters, and Commander of the North Dakota Joint Training Center among other senior positions in the North Dakota National Guard. Johnson is a 2005 graduate of the United States Army War College and has been a lawyer licensed to practice law since 1988.
References
External links
ndcourts.com , lawyers
Guantanamo Bay captives legal and administrative procedures |
Richard Pierce Havens (January 21, 1941 – April 22, 2013) was an American singer-songwriter and guitarist. His music encompassed elements of folk, soul (both of which he frequently covered), and rhythm and blues. He had a rhythmic guitar style (often in open tunings). He was the opening act at Woodstock, sang many jingles for television commercials, and was also the voice of the GeoSafari toys.
Early life
Born in Bedford–Stuyvesant, Brooklyn, New York City, New York, Havens was the oldest of nine children. He was of Native American (Blackfoot) descent on his father's side and of the British West Indies on his mother's. His grandfather was Blackfoot of the Montana/South Dakota area.
Havens's grandfather and great-uncle joined Buffalo Bill's Wild West Show, moved to New York City thereafter, and settled on the Shinnecock Reservation on Long Island. Havens's grandfather married, then moved to Brooklyn.
As a youth, Havens began organizing his neighborhood friends into a street corner doo-wop group. At age 16, he was performing with the McCrea Gospel Singers.
Career
Early career
At age 20, Havens left his hometown of Brooklyn, seeking artistic stimulation in Greenwich Village in Manhattan. "I saw the Village as a place to escape to, in order to express yourself," he recalled. "I had first gone there during the beatnik days of the 1950s to perform poetry, then I drew portraits for two years and stayed up all night listening to folk music in the clubs. It took a while before I thought of picking up a guitar."
Havens's solo performances quickly spread beyond the Village folk music circles. After cutting two records for Douglas Records, he signed on with Bob Dylan's manager, Albert Grossman, and landed a record deal with the Verve Folkways (later Verve Forecast) label. Verve released Mixed Bag in late 1966, which featured tracks such as "Handsome Johnny" (co-written by Havens and actor Louis Gossett Jr.), "Follow," and a cover of Bob Dylan's "Just Like a Woman". Havens released his first single, "No Opportunity Necessary", in 1967.
Something Else Again (1968) became his first album to hit the Billboard charts, and it pulled Mixed Bag back onto the charts. By 1969, he had released five albums. Two of those albums were unauthorized and were released by Douglas Records (or Douglas International): Electric Havens (released June 1, 1968) and Richie Havens Record (1969).
Woodstock and rise in fame
Havens's live performances earned widespread notice. His opening 1969 appearance at Woodstock in a trio with Paul "Deano" Williams on guitar and singing backing vocals and Daniel Ben Zebulon on percussion catapulted him into stardom and was a major turning point in his career. Despite Havens's recollection that he performed for nearly three hours, the actual recording and setlist reflect that he played about fifty minutes. Havens continued playing because the musicians after him were delayed by traffic, including the originally scheduled opening act, Sweetwater. Havens concluded his set by riffing off the old spiritual "Motherless Child". In an interview with Cliff Smith, for Music-Room, Havens explained:
I'd already played every song I knew and I was stalling, asking for more guitar and mic, trying to think of something else to play – and then it just came to me ... The establishment was foolish enough to give us all this freedom and we used it in every way we could.
The subsequent Woodstock movie release helped Havens reach a worldwide audience. He also appeared two weeks later at the Isle of Wight Festival, in late August 1969.
Havens also began acting during the 1970s. He was featured in the original 1972 stage presentation of The Who's Tommy, as Othello in the 1974 film Catch My Soul, in Greased Lightning alongside Richard Pryor, and in Bob Dylan's Hearts of Fire.
In July 1978, he was a featured performer at the Benefit Concert for The Longest Walk, an American Indian spiritual walk from Alcatraz to Washington, D.C. affirming treaty rights, as a result of legislation that had been introduced to abrogate Indian treaties.
Branching into other media
Havens continued to release music and tour during the 1980s and 90s. He made advertisements for NBC, CBS and ABC, and commercials for Amtrak and for Coca-Cola. Havens also did corporate commercial work for Maxwell House Coffee and Folgers as well as sang "The Fabric of Our Lives" theme for the cotton industry. In 1982, he appeared at the UK's Glastonbury Festival, closing the show on the Sunday night. He has also made guest appearances on Sesame Street from 1974 to 1975.
On Jun 22, 1990, Richie Havens played at a packed Yankee Stadium concert in honor of Nelson Mandela who had come to New York for three days after Mandela’s release from the South African prison, Robben Island. Other performers at the concert were Judy Collins, Tracy Chapman and The Mighty Sparrows.
In 1993, Havens performed at the inauguration of President Bill Clinton. Among the selections was the "Cotton" song, made famous by a series of television commercials from the early 1990s. In 1999, Havens played at the Tibetan Freedom Concert for an audience of more than 100,000.
The release of 1993's Resume, The Best of Richie Havens, on Rhino Records, collected his late 1960s and early 1970s recordings.
Havens played a small role, as a character named Daze, in the film Street Hunter (1990), starring John Leguizamo. He played himself in "Rock of Ages", an episode of the TV sitcom Married... with Children (Season 7, Episode 9).
Havens was the 20th living recipient of the Peace Abbey Courage of Conscience Award, presented in Sherborn, Massachusetts, on April 12, 1991.
Final years
In 2000, Havens teamed with the electronic music duo Groove Armada for the retro 1970s-style song "Hands of Time". The song was featured on the soundtrack of the film Collateral; that song was also used in the films Domino, A Lot Like Love, Tell No One and in the Cold Case episodes The Badlands & Street Money. Havens was also featured on "Little By Little" and "Healing" on the band's third album, Goodbye Country.
In 2000, he published They Can't Hide Us Anymore, an autobiography co-written with Steve Davidowitz. Havens maintained his status as a folk icon and continued to tour. In 2002 he sang, uncredited, Dylan's "The Times They Are a Changin'" in the TV series The West Wing (Season 4, Episode 7). Also in 2002, he released Wishing Well, followed by the 2004 album Grace of the Sun.
On October 15, 2006, Havens was inducted into the Long Island Music Hall of Fame.
In 2007, Havens appeared as Old Man Arvin in the Todd Haynes film I'm Not There. In a front-porch jam scene, he is shown singing the Bob Dylan song "Tombstone Blues" with Marcus Carl Franklin and Tyrone Benskin. Havens's version of the song also appears on the I'm Not There soundtrack. In February 2008, Havens performed at The Jazz Café in London.
Havens was invited to perform at the 2008 Cannes Film Festival opening ceremony. He played "Freedom" at the request of the jury president Sean Penn. Havens also performed at the London, Ontario, Blues Festival in July 2008.
In March 2008, Havens released a new studio album, Nobody Left To Crown. The first single release was the country-tinged "The Key".
Havens appeared in the acclaimed 2009 film Soundtrack for a Revolution, which provided a general history of the modern Civil Rights Movement and featured modern artists performing many of the era's musical classics. In the film, Havens performed a haunting rendition of "Will the Circle Be Unbroken?"
On May 3, 2009, Havens performed at the fundraising concert in honor of Pete Seeger's 90th birthday. In June 2009, he performed at the fifth annual Mountain Jam Festival. The event, hosted by The Allman Brothers Band and Gov't Mule guitarist Warren Haynes, was held at the Hunter Mountain Ski Resort in Hunter, New York. As is the tradition, the festival took place on the weekend following Memorial Day.
On June 20, 2009, Havens performed at the Clearwater Festival. On July 4, 2009, he performed at the Woodstock Tribute festival in Ramsey, New Jersey. On August 8, 2010, he performed at Musikfest 2010, at Foy Hall at Moravian College in Bethlehem, Pennsylvania.
Personal life
Health issues
In 2010, Havens underwent kidney surgery but did not recover fully enough to perform as he had before. In March 2012, he announced on his Facebook page that he would retire from touring after 45 years, due to health concerns.
Death
On April 22, 2013, Havens died of a heart attack at the age of 72. The BBC referred to him as a "Woodstock icon", while Stephen Stills of Crosby, Stills, Nash & Young said Havens "could never be replicated". The Daily Telegraph stated Havens "made an indelible mark on contemporary music", while Douglas Martin of The New York Times reported that Havens had "riveted Woodstock".
Pursuant to Havens's request, he was cremated, and his ashes were scattered from the air over the original site of the Woodstock Festival, in a ceremony held on August 18, 2013, the 44th anniversary of the festival's last day.
Havens was survived by his wife Nancy, three children, five grandchildren, and two great-grandchildren.
Discography
Studio albums
Live albums
Compilations
Singles
Appearances
A Long Time Comin' by The Electric Flag – sitar and percussion (1968)
Sesame Street (1970), He sings a remake of “Imagination Rain.” Music by Steve Zuckerman. Also appears singing several songs solo
Please Don't Touch by Steve Hackett (1978)
Music and Songs from Starlight Express (1987) – performing "Light at the End of the Tunnel" and the "Starlight Sequence"
Goya... a Life in Song – vocal and guitar performance on "Dog in the Quicksand".
Songs of the Civil War (1991) – "Follow the Drinking Gourd" and "Give Us a Flag"
OVO by Peter Gabriel (2000) (soundtrack of the Millennium Dome Show)
"Freedom" on The Best of The Jammy's Volume One with the Mutaytor
"The Long Road" (duet with Cliff Eberhardt) on 1990 album The Long Road
"Gay Cavalier" (duet with Pino Daniele) on 1983 album Common Ground
Some Assembly Required by Assembly of Dust's 2009
Married... with Children (1992), "Rock of Ages" – guest appearance as himself
"El Lugar (The Place)" by Francesco Bruno (1995), in which he appears as co-author and interpreter of the song
Lifelines Live by Peter, Paul and Mary (1996)
Warriors of Virtue (1997) – "Inside of You"
Goodbye Country by Groove Armada (2001) – "Little by Little" and "Healing"
Lovebox (Groove Armada) by Groove Armada (2002) – "Hands of Time"
References
External links
1941 births
2013 deaths
Blackfoot people
American acoustic guitarists
American male guitarists
American autobiographers
American folk singers
American people of West Indian descent
American rhythm and blues singer-songwriters
American blues guitarists
American blues singers
American folk guitarists
American soul guitarists
American soul singers
A&M Records artists
Elektra Records artists
Polydor Records artists
Musicians from Jersey City, New Jersey
Verve Forecast Records artists
SOLAR Records artists
Singers from New York City
Singer-songwriters from New Jersey
Guitarists from New Jersey
Guitarists from New York City
20th-century American guitarists
Musicians from Bedford–Stuyvesant, Brooklyn
Musicians from Greenwich Village
African-American guitarists
20th-century African-American male singers
21st-century African-American male singers
African-American male singer-songwriters
Singer-songwriters from New York (state) |
```java
package chapter3.section2;
import edu.princeton.cs.algs4.Queue;
import edu.princeton.cs.algs4.StdOut;
import java.util.NoSuchElementException;
/**
* Created by Rene Argento on 03/06/17.
*/
public class Exercise28_SoftwareCaching {
private class BinarySearchTree<Key extends Comparable<Key>, Value>{
private class Node {
private Key key;
private Value value;
private Node left;
private Node right;
private int size; //# of nodes in subtree rooted here
public Node(Key key, Value value, int size) {
this.key = key;
this.value = value;
this.size = size;
}
}
private Node root;
private Node cacheItem;
public int size() {
return size(root);
}
private int size(Node node) {
if (node == null) {
return 0;
}
return node.size;
}
public Value get(Key key) {
if (cacheItem != null && cacheItem.key == key) {
StdOut.println("Cache hit");
return cacheItem.value;
}
StdOut.println("Cache miss");
return get(root, key);
}
private Value get(Node node, Key key) {
if (node == null) {
return null;
}
int compare = key.compareTo(node.key);
if (compare < 0) {
return get(node.left, key);
} else if (compare > 0) {
return get(node.right, key);
} else {
cacheItem = node;
return node.value;
}
}
public void put(Key key, Value value) {
if (cacheItem != null && cacheItem.key == key) {
cacheItem.value = value;
StdOut.println("Cache hit");
return;
}
StdOut.println("Cache miss");
root = put(root, key, value);
}
private Node put(Node node, Key key, Value value) {
if (node == null) {
Node newNode = new Node(key, value, 1);
cacheItem = newNode;
return newNode;
}
int compare = key.compareTo(node.key);
if (compare < 0) {
node.left = put(node.left, key, value);
} else if (compare > 0) {
node.right = put(node.right, key, value);
} else {
node.value = value;
cacheItem = node;
}
node.size = size(node.left) + 1 + size(node.right);
return node;
}
public Key min() {
if (root == null) {
throw new NoSuchElementException("Empty binary search tree");
}
return min(root).key;
}
private Node min(Node node) {
if (node.left == null) {
cacheItem = node;
return node;
}
return min(node.left);
}
public Key max() {
if (root == null) {
throw new NoSuchElementException("Empty binary search tree");
}
return max(root).key;
}
private Node max(Node node) {
if (node.right == null) {
cacheItem = node;
return node;
}
return max(node.right);
}
public Key floor(Key key) {
Node node = floor(root, key);
if (node == null) {
return null;
}
cacheItem = node;
return node.key;
}
private Node floor(Node node, Key key) {
if (node == null) {
return null;
}
int compare = key.compareTo(node.key);
if (compare == 0) {
return node;
} else if (compare < 0) {
return floor(node.left, key);
} else {
Node rightNode = floor(node.right, key);
if (rightNode != null) {
return rightNode;
} else {
return node;
}
}
}
public Key ceiling(Key key) {
Node node = ceiling(root, key);
if (node == null) {
return null;
}
cacheItem = node;
return node.key;
}
private Node ceiling(Node node, Key key) {
if (node == null) {
return null;
}
int compare = key.compareTo(node.key);
if (compare == 0) {
return node;
} else if (compare > 0) {
return ceiling(node.right, key);
} else {
Node leftNode = ceiling(node.left, key);
if (leftNode != null) {
return leftNode;
} else {
return node;
}
}
}
public Key select(int index) {
if (index >= size()) {
throw new IllegalArgumentException("Index is higher than tree size");
}
return select(root, index).key;
}
private Node select(Node node, int index) {
int leftSubtreeSize = size(node.left);
if (leftSubtreeSize == index) {
cacheItem = node;
return node;
} else if (leftSubtreeSize > index) {
return select(node.left, index);
} else {
return select(node.right, index - leftSubtreeSize - 1);
}
}
public int rank(Key key) {
return rank(root, key);
}
private int rank(Node node, Key key) {
if (node == null) {
return 0;
}
//Returns the number of keys less than node.key in the subtree rooted at node
int compare = key.compareTo(node.key);
if (compare < 0) {
return rank(node.left, key);
} else if (compare > 0) {
return size(node.left) + 1 + rank(node.right, key);
} else {
cacheItem = node;
return size(node.left);
}
}
public void deleteMin() {
root = deleteMin(root);
}
private Node deleteMin(Node node) {
if (node == null) {
return null;
}
if (node.left == null) {
if (cacheItem != null && cacheItem == node) {
invalidateCache();
}
return node.right;
}
node.left = deleteMin(node.left);
node.size = size(node.left) + 1 + size(node.right);
return node;
}
public void deleteMax() {
root = deleteMax(root);
}
private Node deleteMax(Node node) {
if (node == null) {
return null;
}
if (node.right == null) {
if (cacheItem != null && cacheItem == node) {
invalidateCache();
}
return node.left;
}
node.right = deleteMax(node.right);
node.size = size(node.left) + 1 + size(node.right);
return node;
}
public void delete(Key key) {
if (cacheItem != null && cacheItem.key == key) {
invalidateCache();
}
root = delete(root, key);
}
private Node delete(Node node, Key key) {
if (node == null) {
return null;
}
int compare = key.compareTo(node.key);
if (compare < 0) {
node.left = delete(node.left, key);
} else if (compare > 0) {
node.right = delete(node.right, key);
} else {
if (node.left == null) {
return node.right;
} else if (node.right == null) {
return node.left;
} else {
Node aux = node;
node = min(aux.right);
node.right = deleteMin(aux.right);
node.left = aux.left;
}
}
node.size = size(node.left) + 1 + size(node.right);
return node;
}
public Iterable<Key> keys() {
return keys(min(), max());
}
public Iterable<Key> keys(Key low, Key high) {
Queue<Key> queue = new Queue<>();
keys(root, queue, low, high);
return queue;
}
private void keys(Node node, Queue<Key> queue, Key low, Key high) {
if (node == null) {
return;
}
int compareLow = low.compareTo(node.key);
int compareHigh = high.compareTo(node.key);
if (compareLow < 0) {
keys(node.left, queue, low, high);
}
if (compareLow <= 0 && compareHigh >= 0) {
queue.enqueue(node.key);
}
if (compareHigh > 0) {
keys(node.right, queue, low, high);
}
}
private void invalidateCache() {
cacheItem = null;
}
}
public static void main(String[] args) {
Exercise28_SoftwareCaching softwareCaching = new Exercise28_SoftwareCaching();
BinarySearchTree<Integer, String> binarySearchTree = softwareCaching.new BinarySearchTree<>();
for (int i = 0; i < 10; i++) {
binarySearchTree.put(i, "Value " + i);
}
//Cache on get operation
StdOut.println("\nGet key 2:");
binarySearchTree.get(2);
StdOut.println("Expected: cache miss");
StdOut.println("\nGet key 2:");
binarySearchTree.get(2);
StdOut.println("Expected: cache hit");
StdOut.println("\nDelete key 4:");
binarySearchTree.delete(4);
StdOut.println("\nGet key 7:");
binarySearchTree.get(7);
StdOut.println("Expected: cache miss");
StdOut.println("\nGet key 7:");
binarySearchTree.get(7);
StdOut.println("Expected: cache hit");
StdOut.println("\nDelete key 7:");
binarySearchTree.delete(7);
binarySearchTree.min();
StdOut.println("\nGet key 0:");
binarySearchTree.get(0);
StdOut.println("Expected: cache hit");
StdOut.println("\nGet key 9:");
binarySearchTree.get(9);
StdOut.println("Expected: cache miss");
binarySearchTree.select(3);
StdOut.println("\nGet key 3:");
binarySearchTree.get(3);
StdOut.println("Expected: cache hit");
binarySearchTree.max();
StdOut.println("\nGet key 9:");
binarySearchTree.get(9);
StdOut.println("Expected: cache hit");
}
}
``` |
Balkh District () is a district in Balkh province, Afghanistan.
References
Districts of Balkh Province |
Vasile Puşcaş (; b. Surduc, July 8, 1952) is a Romanian politician, diplomat and International Relations professor.
Biography
During 2000–2004 he was the Romanian Chief Negotiator with the European Union, and he is considered by many "responsible" for Romania's accession to the EU.
A member of the Romanian Chamber of Deputies from 2000 to 2008, he belongs to the Social Democratic Party (PSD).
Works
România spre Uniunea Europeană. Negocierile de aderare (2000–2004), Iaşi: Institutul European, 2007
România şi iar România. Note pentru o istorie prezentă, Cluj-Napoca: Eikon, 2007
European Negotiations. A Case Study: The Romania's Accession to EU. Gorizia, IUIES, 2006
“Sticks and Carrots”. Regranting the Most-Favored-Nation Status for Romania (US Congress, 1990–1996) / “Bastoane şi Morcovi”, Reacordarea clauzei naţiunii celei mai favorizate (Congresul SUA, 1990–1996), Cluj-Napoca: Eikon, 2006
Relaţii internaţionale/transnaţionale, Cluj-Napoca: Sincron, 2005
Negociind cu Uniunea Europeană, 6 volume, ed. Economică, București, 2003:
vol. I - „Documente iniţiale de poziţie la capitolele de negociere” (2003)
vol. II – „Initial Position Documents” (2003)
vol. III – „Preparing the External Environment of Negotiations” (2003)
vol. IV – „Pregătirea mediului intern de negociere” (2003)
vol. V – „Pregătirea mediului de negociere, 2003–2004” (2005)
vol. VI – „Comunicarea publică şi negocierea pentru aderare, 2003–2004” (2005)
Universitate-Societate-Modernizare, Presa Univ. Clujeană, Cluj-Napoca, 1995; Ediţia a II-a, 2003
Speranţă şi disperare - Negocieri româno-aliate, 1943–1944, București, Ed.Litera, 1995; Ediţia a II-a, 2003
Relaţii internaţionale contemporane, Cluj-Napoca, Sincron, 1999; Ediţia a II-a, 2003
Căderea României în Balcani, Cluj-Napoca, Dacia, 2000
Pulsul istoriei în Europa Centrală, Cluj-Napoca, Sincron, 1998
Transilvania si aranjamentele europene. 1940–1944, Cluj-Napoca, Ed.FCR, 1995
Alma Mater Napocensis – Idealul universităţii moderne, Cluj-Napoca, Ed. FCR 1994
Dr. Petru Groza – pentru o "lume nouă", Editura Dacia, 1985 (a fost interzisă şi arsă întreaga ediţie)
References
External links
Biography
1952 births
Living people
Members of the Chamber of Deputies (Romania)
Social Democratic Party (Romania) politicians
Romanian political scientists
Romanian academics
People from Sălaj County
Romanian essayists
Babeș-Bolyai University alumni
Romanian biographers
Romanian male writers
Male biographers
Romanian textbook writers
20th-century Romanian historians
21st-century Romanian historians
Romanian journalists
Romanian memoirists
Romanian science writers
Romanian civil servants
Male essayists |
The Walter Dean Myers Award for Outstanding Children's Literature, known as "The Walters,” was created by the American nonprofit We Need Diverse Books (WNDB) in 2014, and the inaugural award was presented in 2016. Named after young adult author Walter Dean Myers, the award recognizes published, diverse authors who champion marginalized voices in their stories. The awards program is managed by WNDB's co-directors Kathie Weinberg and Terry Hong. In 2018, WNDB changed the categories from a single category of young adult titles to two categories of teen and young readers. Subsequent awards include both categories.
Recipients
References
Awards established in 2014
American literary awards
21st-century literary awards
English-language literary awards |
Boddupalli Amit (born 30 March 1988) is an Indian cricketer who played for Bengal from 2013/14 to 2019/20. He made his List A debut for Bengal in the 2013–14 Vijay Hazare Trophy on 27 February 2014. He made his first-class debut for Bengal in the 2017–18 Ranji Trophy on 6 October 2017.
References
External links
1988 births
Living people
Indian cricketers
Bengal cricketers
Cricketers from Kolkata |
Barmouth ( (formal); Y Bermo (colloquial)) is a seaside town and community in the county of Gwynedd, north-west Wales; it lies on the estuary of the Afon Mawddach and Cardigan Bay. Located in the historic county of Merionethshire, the Welsh form of the name is derived from aber (estuary) and the river's name, Mawddach. The English form of the name is a corruption of the earlier Welsh form Abermawdd. The community includes the villages of Llanaber, Cutiau and Caerdeon.
History
The town grew around the shipbuilding industry, and more recently as a seaside resort. Notable buildings include the medieval tower house, the 19th century roundhouse prison and St John's Church.
William Wordsworth, a visitor to Barmouth in the 19th century, described it thus: "With a fine sea view in front, the mountains behind, the glorious estuary running inland, and within compass of a day's walk, Barmouth can always hold its own against any rival."
(Citadel of Light), which is located east of the town on the adjoining hillside, was the first tract of land to be donated to the National Trust. Panorama Walk, to the east of the town, was developed as a coastal footpath in the Victorian era to contribute to the town's attractions for visitors. The walk is designated at Grade II on the Cadw/ICOMOS Register of Parks and Gardens of Special Historic Interest in Wales. On the route of the walk stands the Glan-y-Mawddach estate. Originally a Regency villa, the house, which is listed at Grade II, was extended in the late 19th and early 20th centuries and an important garden laid out which is designated at Grade II* on the Cadw/ICOMOS register.
Barmouth features prominently in the novel Austerlitz by Max Sebald. The town is featured in an idyllic light, with the narrator visiting several times during his childhood [see box].
In January 2014, two trains were stranded at Barmouth after severe winter storms destroyed the sea wall at nearby .
Transport
The town is served by Barmouth railway station. Transport for Wales operate northbound services to via , and ; eastbound services travel to Birmingham International via , , , , and .
Connections for southbound services to and can be made at Dovey Junction or Machynlleth. Barmouth Bridge, which takes the Cambrian Line over the River Mawddach, was also previously at the end of the Ruabon–Barmouth line; this line passed through Bala and Dolgellau. The southern end of the bridge is now the start of the Mawddach Trail, a cycle path and walkway that uses the old trackbed.
Local bus services are provided by Lloyds Coaches and link the town with nearby destinations such as Harlech, Tan-y-Bwlch, Porthmadog and Dolgellau. Cross-country bus services are available to Wrexham via Bala, Corwen and Llangollen, as part of the Welsh Government funded TrawsCymru network.
The Barmouth Ferry sails from Barmouth to Penrhyn Point, where it connects with the narrow-gauge Fairbourne Railway for the village of Fairbourne. The town has a RNLI lifeboat station, which includes a visitors' centre with shop and viewing gallery.
Sport
The nearest rugby club is in Dolgellau, away. Barmouth has one major football team: Barmouth & Dyffryn United, which competes in the Welsh Alliance League. Barmouth is the venue for the annual Barmouth Beach Race, a motocross event. Usually taking place on the last weekend in October, the event sees riders take part in beach racing, using a temporary motocross course constructed on the beach. Over 200 riders typically take part in this event, with spectators attending free of charge. The event attracts champion riders from England and Wales. The harbour hosts the annual Three Peaks yacht race.
Notable people
John Griffith (1821-1877), a journalist, brought up in Barmouth
Fanny Talbot (1824–1917), landowner and philanthropist, donated Cliff of Light (Dinas Olau in Welsh), to the National Trust.
Jim Valentine (1866–1904), rugby union and Northern Union player for Swinton Lions.
Herbert Tudor Buckland (1869–1951), architect, known for his seminal Arts and Crafts movement houses.
Commander Harold Lowe (1882–1944), fifth officer of the RMS Titanic.
John Rippiner Heath (1887–1950), physician and composer.
Major Bill Tilman, (1898–1977), English mountaineer and explorer, known for his Himalayan climbs and sailing voyages, lived in Barmouth for many years.
Adrian Dingle (1911–1974), Cornish-Canadian artist.
Johnny Williams (1926–2007), boxer, once both the British and Empire heavyweight champion.
Tommy Nutter (1943–1992), British tailor, reinvented the Savile Row suit in the 1960s.
Russell Davies (born 1946), journalist and broadcaster, presents Brain of Britain on BBC Radio 4.
Charlie Brooks (born 1981), actress, known for EastEnders.
Gallery
See also
St David's Church, Barmouth
St John's Church, Barmouth
St Tudwal's Church, Barmouth
St Mary and St Bodfan Church, Llanaber
References
External links
Barmouth community website latest news from Barmouth and historical photo gallery and much more.
www.geograph.co.uk : photos of Barmouth and surrounding area
1935 historic film of Barmouth holidaying, carnival and sport
Towns in Gwynedd
Registered historic parks and gardens in Gwynedd
Listed buildings in Gwynedd |
St Lawrence College is a co-educational independent school situated in Ramsgate, Kent and has been established as a "public school" ever since it was founded.
History
The college was founded in 1879 as South Eastern College (colours: gold and black). The name was changed in September 1906 because of its location in the St Lawrence area of Ramsgate. New colours were also given: maroon and white. The school rapidly outgrew the single house, leading to the main building of the present day college by 1884. The chapel was completed in 1927. During the world wars, the school was evacuated to Chester (1915) and Courteenhall in Northamptonshire (1940), seat of Sir Herewood Wake, because of its position on the South-East coast. Later in the school's existence, girls were admitted, and the current mix of sexes is now roughly equal.
There were initially four houses: Light Red, Dark Red, Light Blue and Dark Blue; these later became Grange, Tower, Manor and Lodge. During World War II a fifth house was added called Courtenay when a nearby school having failed to maintain numbers was incorporated into the school. Newlands was later added for day scholars and Deacon followed as the Junior end of this house.
In 1930, Richard Maunsell designed for the Southern Railway a fleet of 40 "Schools Class" locomotives one of which was named St Lawrence. These locos were compact but particularly powerful, weighing over 100 tons with tender. As late as 1958 the St Lawrence Loco (BR 30934) was attached to the School Train departing from Ramsgate. Parts of the tender still exist on the Bluebell Railway.
Senior and middle school
The Senior School is divided into five separate houses. The oldest, Tower and Lodge, the two boys' boarding houses, were created in 1889. Newlands is the boys' day house, while Laing is the girls' day house. Boarding girls are part of Bellerby. All houses are located in the main school building except Bellerby, who have their own building which is situated in the site of the previous Taylor Hall.
Cameron and Courtenay are mixed boarding and day sub-houses, respectively, for the Middle School (Kirby). They accommodate students from age 11 to 13. They are housed in the modern Kirby House Building, which opened in January 2007 by the Archbishop of Canterbury, Rowan Williams. In January 2013, Mark Aitken retired his post of Headmaster and was succeeded by Antony Spencer.
Junior school
St Lawrence College Junior School is located on the same site as the Middle and Senior schools and accommodates pupils from age 3 to 11. The Junior School pupils study in the Hamblen Block which includes classrooms for Years 3-6.
Performance
In 2009, the Daily Telegraph placed the school 330 in its League Table of Independent School A-level results, with 48.81% of pupils gaining A or B grades at A-level. In 2012, the school gained a pass rate of 92.9% with 18% of them being at grades of A and A* at A-level. The GCSE results had a pass rate of 86.5% and 15.5% being at grades of A*.
In 2017, the school had 30% A*/A grades at A-level, and 33% A*/A at GCSE, despite the introduction of the new exams.
Notable former pupils
Old Lawrentians (OLs) of note include:
Alfred Bellerby, Olympic long jumper
Hubert Broad, World War I aviator and test pilot
John Russell Carlisle, Director of the Tobacco Manufacturers' Association
John Carr, first-class cricketer and British Army officer
Sir Conrad Corfield KCIE, CSI, MC and Chief Advisor in India
Professor Durward Cruickshank FRS, crystallographer
Michael Curtis, Newspaper Editor
General Richard Dannatt, Baron Dannatt GCB, CBE, MC, DL, former Chief of the General Staff, defence advisor to the Conservative party.
Gordon Edington, CBE, chair NCH
Captain David Hart Dyke CBE, LVO, ADC, Captain of HMS Coventry during the Falklands War
Ted Fillary, Cricketer
Humphrey Hawksley, BBC World Affairs Correspondent (BBC News)
John Ironmonger, Novelist
Sir Maurice Laing CBE, DL, FRICS, construction industry entrepreneur, first president of the CBI
Herbert Linnell, cricketer
Eric Mansfield, Aeronautical Engineer, won the Royal Medal in 1994
Sir George Middleton, diplomat
Major Claude Myburgh, cricketer and soldier
Major General Frank Crowther Roberts VC, DSO, OBE, MC
John Ruddock, Actor
Clifford Dyce Sharp, Journalist and Editor
Herbert Sharp, cricketer and soldier
Alexander Siddig, Actor
Michael Steed, Political scientist
The Right Honourable John Stevens, Baron Stevens of Kirkwhelpington, former commissioner of the Metropolitan Police
Robert Summerhayes, cricketer
John Vernon Taylor, Bishop of Winchester
Colin Tilsley, Missionary
References
External links
St Lawrence College website
Old Lawrentian Society
Profile on the ISC website
Profile on the HMC website
Private schools in Kent
Boarding schools in Kent
Ramsgate
Educational institutions established in 1879
1879 establishments in England
Member schools of the Headmasters' and Headmistresses' Conference |
```javascript
import { Feature } from 'toolkit/extension/features/feature';
import { getCurrentRouteName } from 'toolkit/extension/utils/ynab';
export class ViewZeroAsEmpty extends Feature {
shouldInvoke() {
return getCurrentRouteName().indexOf('reports.income-expense') !== -1;
}
destroy() {
$('.income-expense-level2 .user-data.zero').removeClass('tk-hidden');
}
invoke() {
$('.income-expense-level2 .user-data.zero').addClass('tk-hidden');
}
onRouteChanged() {
if (!this.shouldInvoke()) return;
this.invoke();
}
}
``` |
Hervé Bazin (; 17 April 191117 February 1996) was a French writer, whose best-known novels covered semi-autobiographical topics of teenage rebellion and dysfunctional families.
Biography
Bazin, born Jean-Pierre Hervé-Bazin in Angers, Maine-et-Loire, France came from a high-bourgeois Catholic family. He was the great-nephew of the writer René Bazin. His father was a magistrate who with his wife had been sent to China to take up a diplomatic post. Hervé and his brother were brought up in the ancestral home, the chateau of Le Patys, by their grandmother. When she died, his mother returned from Hanoi with reluctance. She sent Bazin to a variety of clerical establishments and then to the military academy, the Prytanée de la Fleche, from which he was expelled as incompetent. He opposed his authoritarian mother, ran away several times during his teens, and refused Catholic teachings. At the age of 20 he broke up with his family.
Leaving his home for Paris, he took a degree in literature at the Sorbonne. During fifteen years of writing poetry with little success, Bazin worked in many small jobs. Notable work of this period included founding a poetic review, la Coquille (The Shell, only eight volumes), named after the medieval poet-beggars, the coquillards of Villon's days, and "À la poursuite d'Iris" in 1948. He won the 1947 Prix Apollinaire for Jour, his first book of poetry.
Following the advice of Paul Valéry, he left poetry to focus on prose.
Childhood conflicts with his mother inspired the novel Viper in the Fist in 1948. The novel portrays the hatred between a mother nicknamed Folcoche (from the French "folle" (crazy) and "cochonne" (pig) and her children, including the narrator Jean Rezeau, called "Brasse-bouillon". Maurice Nadeau described the novel as "Atrides in duffle-coat" . The book was immensely successful in postwar France, and was followed by La Mort du Petit Cheval and Le Cri de la Chouette to create a trilogy. In other works, Bazin returned to the theme of the family. In addition to novels, he also wrote short stories and essays.
Bazin became a member of the Académie Goncourt in 1958, replacing Francis Carco. He became its president in 1973, and was replaced, after his death, by Jorge Semprún, while the presidency was given to François Nourissier.
Politically, Bazin belonged to the Mouvement de la Paix, in relation with the communist party of which he was a sympathizer. He obtained the Lenin Peace Prize in 1979. This made Roger Peyrefitte say jokingly: "Hervé Bazin had two prizes which fitted each other: the Lenin Peace Prize and the black humour prize."
In 1995, he gave his manuscripts and letters to the record office of the town of Nancy, which already owned the archives of the Goncourt brothers, who originated from the town. Bazin died in Angers.
Due to a juridical imbroglio, the six children of his first marriages obtained, against the will of his last spouse and last son, the auction of the archive at the Hôtel Drouot on 29 October 2004. With help from the district's authorities, the university library of Angers managed to preempt almost the whole of the estate, meaning 22 manuscripts and about 9000 letters which were made available to the research community, as the author wished.
Orthography and punctuation
In his 1966 essay Plumons l’Oiseau ("Let's pluck the bird"): Bazin proposed a nearly phonemic orthography for the French language called "l’ortografiǝ lojikǝ"(logical orthography).
{| class="wikitable"
!Letter
!Name
!Name (IPA)
! Note
|-
| a || a (wvèr) || () ||
|-
| (á) || a fèrmé || || optional
|-
| e || e || ||
|-
| é || é || ||
|-
| è || è || ||
|-
| œ || œ (wvèr) || () ||
|-
| (œ́) || œ fèrmé || || optional
|-
| o || ɔ (wvèr) || () ||
|-
| ó || ó (fèrmé) || () || required
|-
| i || i || ||
|-
| u || u || ||
|-
| w || w || || ou vowel
|-
| ã || ã || ||
|-
| ẽ || ẽ || ||
|-
| õ || õ || ||
|-
| œ̃ || œ̃ || ||
|-
| b || bé || ||
|-
| k || ké || ||
|-
| d || dé || ||
|-
| f || fé || ||
|-
| g || gé || || always hard
|-
| h || hé || || soft ch
|-
| j || jé || ||
|-
| l || lé || ||
|-
| m || mé || ||
|-
| n || né || ||
|-
| ñ || ñé || , ||
|-
| p || pé || ||
|-
| r || ré || ||
|-
| s || sé || || never voiced
|-
| t || té || ||
|-
| v || vé || ||
|-
| z || zé || ||
|-
| y || yé || ||
|-
| u͐ || u͐e || ||
|-
| w͐ || w͐e || ||
|-
| ɔ || le siñə dur || || /h/ where necessary
|-
| ə || le siñə mw || || sometimes-silent /e/
|-
| × || le siñə du pluryèl ɛ̃sonor || || sometimes-silent plural (e.g. femmes → fam×)
|-
| ◌̇ || le point de différenciation || || marker of homophones (e.g. ça → ṡa, whereas sa → sa)
|}
He also proposed six new "points d’intonation" (punctuation marks):
Example:
Published works
Jour, poems, 1947
A la poursuite d'Iris, poems, 1948
Vipère au poing (Viper in the Fist), autobiographical novel, 1948
La Tête contre les murs, novel, publié en 1949
La Mort du petit cheval, autobiographical novel, 1950
Le bureau des mariages, short stories, 1951
Lève-toi et marche, novel, 1952
Humeurs, poems, 1953
Contre vents et marées, 1953
L'Huile sur le feu, novel, 1954
Qui j'ose aimer, novel, 1956
La fin des asiles, essay, 1959
Au nom du fils, novel, 1960
Chapeau bas, short stories, 1963 : Chapeau bas, Bouc émissaire, La hotte, M. le conseiller du coeur, Souvenirs d'un amnésique, Mansarde à louer, La Clope
Plumons l'oiseau, essay, 1966
Le Matrimoine, novel, 1967
Les bienheureux de La Désolation, account, 1970
Le Cri de la chouette, autobiographical novel, 1972
Madame Ex, novel, 1975
Traits, 1976
Ce que je crois, 1977
Un feu dévore un autre feu, 1978
L'Église verte, novel, 1981
Qui est le prince?, 1981
Abécédaire, 1984
Le Démon de minuit, 1988
L'École des pères, novel, 1991
Le grand méchant doux, 1992
Le Neuvième jour, 1994
Notes
References
Sources
Jean-Louis de Rambures, "Comment travaillent les écrivains", Paris 1978 (interview with Hervé Bazin, in French)
External links
Hervé Bazin at the library of the University of Angers
1911 births
1996 deaths
People from Angers
University of Paris alumni
20th-century French poets
20th-century French male writers
Recipients of the Lenin Peace Prize
20th-century French novelists
French male essayists
French male poets
French male novelists
French male short story writers
French short story writers
Prix Guillaume Apollinaire winners
20th-century French essayists |
Beti Sekulovski (born 17 May 1983) is a former professional tennis player from Australia.
Biography
Sekulovski was born in Melbourne, to parents who emigrated from Macedonia.
On the professional tour, she had a highest singles ranking of 273 and was ranked 120 in the world for doubles.
She made two main-draw appearances in the women's doubles at the Australian Open, both times as a wildcard pairing with Cindy Watson.
Since retiring, she has worked as a tennis coach and is currently coaching Jaimee Fourlis.
ITF Circuit finals
Singles: 7 (4 titles, 3 runner-ups)
Doubles: 14 (4 titles, 10 runner-ups)
References
External links
1983 births
Living people
Australian female tennis players
Tennis players from Melbourne
Australian tennis coaches
Australian people of Macedonian descent
Sportswomen from Victoria (state) |
```shell
#!/bin/sh
#
# Test sudoers owner check
#
: ${TESTSUDOERS=testsudoers}
exec 2>&1
$TESTSUDOERS -U 1 root id <<EOF
@include $TESTDIR/test2.inc
EOF
exit 0
``` |
Czaar Peterbuurt is a neighborhood of Amsterdam, Netherlands.
Neighbourhoods of Amsterdam |
Thomas Nörber (19 December 1846 in Waldstetten – 27 July 1920 in Freiburg im Breisgau) was a German Roman Catholic clergyman. From 1898 until his death he served as Archbishop of Freiburg.
Sources
Archbishops of Freiburg
1920 deaths
1846 births
People from Neckar-Odenwald-Kreis |
Corbett's electrostatic machine is a static electricity generating device that was made by the Shaker physician Thomas Corbett in 1810. Intended to treat rheumatism, the device built up a static charge and stored it in a Leyden jar, an early type of capacitor.
Description
Corbett was a medical physician for the Shakers, a religious group of colonial America. He was a botanist and preferred herbal medicines to bloodletting. His machine was hand-operated. Rotating a glass cylinder in contact with a silk pad caused a static charge to accumulate on the cylinder. A metal comb collected this charge, which was then stored in a Leyden jar. From the jar, the electrical charge could then be released into the patient, producing a shock akin to "touching a doorknob after walking across carpet in dry weather".
See also
Franklin's electrostatic machine
References
Electrostatic generators
Historical scientific instruments
Shaker inventions
19th-century inventions |
Claudia Gerini (; born 18 December 1971) is an Italian actress and singer.
Life and career
Born in Rome, Gerini won the National Competition of Miss Teenager in 1985. She got her first part in a film, La ballata di Eva, at 14. She subsequently played in Ciao mà, Roba da ricchi and Night Club, by Sergio Corbucci, and many others. At 19 she worked for the popular TV show Non è la Rai, a sort of academy with one hundred girls singing, dancing and gaming.
Gerini's first major role was in Il padre e il figlio, directed by Pasquale Pozzessere. She later moved to Paris to learn French for several months, travelling a lot between Italy and France without leaving off University. At 22 she returned to Italy and got a role as protagonist in Angelo e Beatrice, a theatrical work by Francesco Apolloni (writer and director) presented on the stage at the Theater Coliseum in Rome, where director and actor Carlo Verdone noticed her. The encounter with Verdone produced Viaggi di nozze and I'm Crazy About Iris Blond, both Christmas box-office successes.
Gerini later collaborated with Leonardo Pieraccioni, Massimo Ceccherini, Antonio Rezza and Antonello De Leo, and moved both to Los Angeles, U.S. and Madrid, Spain to improve her English and Spanish, respectively. In Spain she starred in Desafinado by M. G. Pereira and La playa de Los Galagos by M. Camus. Other roles include Francesca e Nunziata, directed by Lina Wertmüller, Al cuore si comanda, Non ti muovere, La sconosciuta and the recent Nero bifamiliare, directed by her then-partner, singer-songwriter Federico Zampaglione (Tiromancino).
Personal life
Claudia is the mother of two daughters, Rosa and Linda.
Filmography
Films
Television
Stage
Video games
Awards and nominations
2014: Nominated to David di Donatello for Best Supporting Actress for her performance in Tutta colpa di Freud
References
External links
1971 births
Actresses from Rome
Italian television personalities
Living people |
Cercospora beticola is a fungal plant pathogen which typically infects plants of the genus Beta, within the family of Chenopodiaceae. It is the cause of Cercospora leaf spot disease in sugar beets, spinach and swiss chard. Of these hosts, Cercospora leaf spot is the most economically impactful in sugar beets (Beta vulgaris). Cercospora beticola is a deuteromycete fungus that reproduces using conidia. There is no teleomorph stage. C. beticola is a necrotrophic fungus that uses phytotoxins specifically Cercospora beticola toxin (CBT) to kill infected plants. CBT causes the leaf spot symptom and prevents root formation. Yield losses from Cercospora leaf spot are around 20 percent.
Hosts and symptoms
Hosts of Cercospora beticola include sugar beets (Beta vulgaris), swiss chard (Beta vulgaris L. subsp. cicla) and other leafy greens. Symptoms include the random distribution of spots with brownish red rings which eventually cause leaf collapse. Older leaves will have spots of larger diameters as rings grow outward. Conidia are not observable by the unaided eye
Disease cycle
Stromata (a sclerotia-like survival structure containing conidia when made) in field debris starts the life cycle. Under favorable wet conditions, conidia are rain-splashed and insect-carried to new hosts, where, under humid and wet conditions, they germinate and penetrate through stomata. These conidia germinate in polycyclic microcycles until the end of the growing season. At the end of the growing season, C. beticola produces stromata again as a survival structure. Microcycles like the one used by C. beticola are very effective at producing many conidia. Because these conidia are effective at penetrating the host, mycelium is not necessary, and conidia produce their own conidia at each new infection (microcycle). There have been no direct observations of sexual spores in C. beticola.
Management
Copper was historically used to control C. beticola in the field, though today fungicides are more common. C. beticola has been shown to have some resistance to benzimidazole and thiophanate class fungicides. As a result, experts often have recommended fungicide rotation to kill any potential fungicide resistant strains. Some varieties of sugar beet also show resistance to C. beticola, unfortunately they have all had low yields in lab tests. Today the most common fungicides used are QoI, Headline, Proline, Inspire SB, Eminent and Super Tin or Agri Tin
Gallery
References
beticola
Fungal plant pathogens and diseases
Eudicot diseases |
Ibn Abī Uṣaybiʿa Muʾaffaq al-Dīn Abū al-ʿAbbās Aḥmad Ibn Al-Qāsim Ibn Khalīfa al-Khazrajī (; 1203–1270), commonly referred to as Ibn Abi Usaibia (also Usaibi'ah, Usaybea, Usaibi`a, Usaybiʿah, etc.), was an Arab physician from Syria in the 13th century CE. He compiled a biographical encyclopedia of notable physicians, from the Greeks, Romans and Indians up to the year 650AH/1252AD in the Islamic era.
Biography
Ibn Abi Usaibia was born at Damascus, a member of the Banu Khazraj tribe. The son of a physician, he studied medicine at Damascus and Cairo. In 1236, he was appointed physician to a new hospital in Cairo, but the following year he took up an offer by ruler of Damascus, of a post in Salkhad, near Damascus, where he lived until his death. His only surviving work is Lives of the Physicians. In that work, he mentions another of his works, but it has not survived.
Lives of the Physicians
The title in Arabic, Uyūn ul-Anbāʾ fī Ṭabaqāt al-Aṭibbā (), is translatable loosely and expansively as "Sources of News on Classes of Physicians", commonly translated into English as History of Physicians, Lives of the Physicians, Classes of Physicians, or Biographical Encyclopedia of Physicians. The book opens with a summary of the physicians from ancient Greece, Syria, India and Rome but the main focus of the book's 700 pages is physicians of medieval Islam. A first version appeared in 1245–1246 and was dedicated to the Ayyubid physician and vizier Amīn al-Dawlah. A second and enlarged recension of the work was produced in the last years of the life of the author, and circulated in at least two different versions, as shown by the extant manuscripts.
Editions
The text has been published five times in all. When the first edition by August Müller (Cairo, 1882), published under the pseudonym "Imrū l-Qays", was found to be marred by typos and errors and a corrected version was subsequently issued (Königsberg, 1884). Relying on Müller's work, Niẓār Riḍā published a non-critical edition of the text in Beirut in 1965, which was subsequently reworked by Qāsim Wahhāb for yet another edition issued in Beirut in 1997. ʿĀmir al-Najjār published his own critical edition (not based on Müller) in Cairo in 1996.
A team of scholars from the universities of Oxford and Warwick has published a new critical edition and a full annotated English translation of the Uyūn al-Anbā. Their work is available in Open Access at Brill Scholarly Editions.
In 2020, a new translation was published by Oxford World's Classics under the name Anecdotes and Antidotes: A Medieval Arabic History of Physicians.
See also
Ibn Wahshiyya
References
External links
AlWaraq.net
English translation of the Lives of the Physicians, translated by L. Kopf, 1954.
Notes and comments on Ibn Abi Usaibia's work
A Literary History of Medicine on the Oxford/Warwick Project and the new manuscripts of the work
Brill Scholarly Editions containing a critical text edition, English translation, and essays on Ibn Abi Usaibia's Lives of the Physicians.
1203 births
1270 deaths
Historians from the Ayyubid Sultanate
13th-century Syrian historians
People from Damascus
13th-century physicians
13th-century Arabic-language writers
Physicians from the Ayyubid Sultanate |
```markdown
# Array2D
In C and Objective-C, you can write the following line,
int cookies[9][7];
to make a 9x7 grid of cookies. This creates a two-dimensional array of 63 elements. To find the cookie at column 3 and row 6, you can write:
myCookie = cookies[3][6];
This statement is not acceptable in Swift. To create a multi-dimensional array in Swift, you can write:
```swift
var cookies = [[Int]]()
for _ in 1...9 {
var row = [Int]()
for _ in 1...7 {
row.append(0)
}
cookies.append(row)
}
```
Then, to find a cookie, you can write:
```swift
let myCookie = cookies[3][6]
```
You can also create the array in a single line of code:
```swift
var cookies = [[Int]](repeating: [Int](repeating: 0, count: 7), count: 9)
```
This looks complicated, but you can simplify it with a helper function:
```swift
func dim<T>(_ count: Int, _ value: T) -> [T] {
return [T](repeating: value, count: count)
}
```
Then, you can create the array:
```swift
var cookies = dim(9, dim(7, 0))
```
Swift infers that the datatype of the array must be `Int` because you specified `0` as the default value of the array elements. To use a string instead, you can write:
```swift
var cookies = dim(9, dim(7, "yum"))
```
The `dim()` function makes it easy to go into even more dimensions:
```swift
var threeDimensions = dim(2, dim(3, dim(4, 0)))
```
The downside of using multi-dimensional arrays or multiple nested arrays in this way is to lose track of what dimension represents what.
Instead, you can create your own type that acts like a 2-D array which is more convenient to use:
```swift
public struct Array2D<T> {
public let columns: Int
public let rows: Int
fileprivate var array: [T]
public init(columns: Int, rows: Int, initialValue: T) {
self.columns = columns
self.rows = rows
array = .init(repeating: initialValue, count: rows*columns)
}
public subscript(column: Int, row: Int) -> T {
get {
precondition(column < columns, "Column \(column) Index is out of range. Array<T>(columns: \(columns), rows:\(rows))")
precondition(row < rows, "Row \(row) Index is out of range. Array<T>(columns: \(columns), rows:\(rows))")
return array[row*columns + column]
}
set {
precondition(column < columns, "Column \(column) Index is out of range. Array<T>(columns: \(columns), rows:\(rows))")
precondition(row < rows, "Row \(row) Index is out of range. Array<T>(columns: \(columns), rows:\(rows))")
array[row*columns + column] = newValue
}
}
}
```
`Array2D` is a generic type, so it can hold any kind of object, not just numbers.
To create an instance of `Array2D`, you can write:
```swift
var cookies = Array2D(columns: 9, rows: 7, initialValue: 0)
```
By using the `subscript` function, you can retrieve an object from the array:
```swift
let myCookie = cookies[column, row]
```
Or, you can change it:
```swift
cookies[column, row] = newCookie
```
Internally, `Array2D` uses a single one-dimensional array to store the data. The index of an object in that array is given by `(row x numberOfColumns) + column`, but as a user of `Array2D`, you only need to think in terms of "column" and "row", and the details will be done by `Array2D`. This is the advantage of wrapping primitive types into a wrapper class or struct.
*Written for Swift Algorithm Club by Matthijs Hollemans*
``` |
```c
/* vi:set et sw=2 sts=2 cin cino=t0,f0,(0,{s,>2s,n-s,^-s,e-s:
*
* This program 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
*
* Authors:
* Alexander Larsson <alexl@redhat.com>
*/
#include "config.h"
#include <errno.h>
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <gio/gio.h>
#include <gio/gunixfdlist.h>
#include "flatpak-dbus-generated.h"
#include "flatpak-session-helper.h"
#include "flatpak-utils-base-private.h"
static GStrv original_environ = NULL;
static char *monitor_dir;
static char *p11_kit_server_socket_path;
static int p11_kit_server_pid = 0;
static GHashTable *client_pid_data_hash = NULL;
static GDBusConnection *session_bus = NULL;
static void
do_atexit (void)
{
if (p11_kit_server_pid != 0)
kill (p11_kit_server_pid, SIGTERM);
}
static void
handle_sigterm (int signum)
{
struct sigaction action = { 0 };
do_atexit ();
action.sa_handler = SIG_DFL;
sigaction (signum, &action, NULL);
raise (signum);
}
typedef struct
{
GPid pid;
char *client;
guint child_watch;
gboolean watch_bus;
} PidData;
static void
pid_data_free (PidData *data)
{
g_free (data->client);
g_free (data);
}
static gboolean
handle_request_session (FlatpakSessionHelper *object,
GDBusMethodInvocation *invocation,
gpointer user_data)
{
GVariantBuilder builder;
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&builder, "{s@v}", "path",
g_variant_new_variant (g_variant_new_string (monitor_dir)));
if (p11_kit_server_socket_path)
g_variant_builder_add (&builder, "{s@v}", "pkcs11-socket",
g_variant_new_variant (g_variant_new_string (p11_kit_server_socket_path)));
flatpak_session_helper_complete_request_session (object, invocation,
g_variant_builder_end (&builder));
return G_DBUS_METHOD_INVOCATION_HANDLED;
}
static void
child_watch_died (GPid pid,
gint status,
gpointer user_data)
{
PidData *pid_data = user_data;
g_autoptr(GVariant) signal_variant = NULL;
g_info ("Client Pid %d died", pid_data->pid);
signal_variant = g_variant_ref_sink (g_variant_new ("(uu)", pid, status));
g_dbus_connection_emit_signal (session_bus,
pid_data->client,
FLATPAK_SESSION_HELPER_PATH_DEVELOPMENT,
FLATPAK_SESSION_HELPER_INTERFACE_DEVELOPMENT,
"HostCommandExited",
signal_variant,
NULL);
/* This frees the pid_data, so be careful */
g_hash_table_remove (client_pid_data_hash, GUINT_TO_POINTER (pid_data->pid));
}
typedef struct
{
int from;
int to;
int final;
} FdMapEntry;
typedef struct
{
FdMapEntry *fd_map;
int fd_map_len;
gboolean set_tty;
int tty;
} ChildSetupData;
static void
child_setup_func (gpointer user_data)
{
ChildSetupData *data = (ChildSetupData *) user_data;
FdMapEntry *fd_map = data->fd_map;
sigset_t set;
int i;
/* Unblock all signals */
sigemptyset (&set);
if (pthread_sigmask (SIG_SETMASK, &set, NULL) == -1)
{
g_error ("Failed to unblock signals when starting child");
return;
}
/* Reset the handlers for all signals to their defaults. */
for (i = 1; i < NSIG; i++)
{
if (i != SIGSTOP && i != SIGKILL)
signal (i, SIG_DFL);
}
for (i = 0; i < data->fd_map_len; i++)
{
if (fd_map[i].from != fd_map[i].to)
{
dup2 (fd_map[i].from, fd_map[i].to);
close (fd_map[i].from);
}
}
/* Second pass in case we needed an in-between fd value to avoid conflicts */
for (i = 0; i < data->fd_map_len; i++)
{
if (fd_map[i].to != fd_map[i].final)
{
dup2 (fd_map[i].to, fd_map[i].final);
close (fd_map[i].to);
}
}
/* We become our own session and process group, because it never makes sense
to share the flatpak-session-helper dbus activated process group */
setsid ();
setpgid (0, 0);
if (data->set_tty)
{
/* data->tty is our from fd which is closed at this point.
* so locate the destination fd and use it for the ioctl.
*/
for (i = 0; i < data->fd_map_len; i++)
{
if (fd_map[i].from == data->tty)
{
if (ioctl (fd_map[i].final, TIOCSCTTY, 0) == -1)
g_info ("ioctl(%d, TIOCSCTTY, 0) failed: %s",
fd_map[i].final, strerror (errno));
break;
}
}
}
}
static gboolean
handle_host_command (FlatpakDevelopment *object,
GDBusMethodInvocation *invocation,
GUnixFDList *fd_list,
const gchar *arg_cwd_path,
const gchar *const *arg_argv,
GVariant *arg_fds,
GVariant *arg_envs,
guint flags)
{
g_autoptr(GError) error = NULL;
ChildSetupData child_setup_data = { NULL };
GPid pid;
PidData *pid_data;
gsize i, j, n_fds, n_envs;
const gint *fds;
g_autofree FdMapEntry *fd_map = NULL;
gchar **env;
gint32 max_fd;
if (*arg_cwd_path == 0)
arg_cwd_path = NULL;
if (arg_argv == NULL || *arg_argv == NULL || *arg_argv[0] == 0)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_INVALID_ARGS,
"No command given");
return G_DBUS_METHOD_INVOCATION_HANDLED;
}
if (!g_variant_is_of_type (arg_fds, G_VARIANT_TYPE ("a{uh}")) ||
!g_variant_is_of_type (arg_envs, G_VARIANT_TYPE ("a{ss}")) ||
(flags & ~(FLATPAK_HOST_COMMAND_FLAGS_CLEAR_ENV |
FLATPAK_HOST_COMMAND_FLAGS_WATCH_BUS)) != 0)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_INVALID_ARGS,
"Unexpected argument");
return G_DBUS_METHOD_INVOCATION_HANDLED;
}
g_info ("Running host command %s", arg_argv[0]);
n_fds = 0;
fds = NULL;
if (fd_list != NULL)
{
n_fds = g_variant_n_children (arg_fds);
fds = g_unix_fd_list_peek_fds (fd_list, NULL);
}
fd_map = g_new0 (FdMapEntry, n_fds);
child_setup_data.fd_map = fd_map;
child_setup_data.fd_map_len = n_fds;
max_fd = -1;
for (i = 0; i < n_fds; i++)
{
gint32 handle, fd;
g_variant_get_child (arg_fds, i, "{uh}", &fd, &handle);
fd_map[i].to = fd;
fd_map[i].from = fds[i];
fd_map[i].final = fd_map[i].to;
/* If stdin/out/err is a tty we try to set it as the controlling
tty for the app, this way we can use this to run in a terminal. */
if ((fd == 0 || fd == 1 || fd == 2) &&
!child_setup_data.set_tty &&
isatty (fds[i]))
{
child_setup_data.set_tty = TRUE;
child_setup_data.tty = fds[i];
}
max_fd = MAX (max_fd, fd_map[i].to);
max_fd = MAX (max_fd, fd_map[i].from);
}
/* We make a second pass over the fds to find if any "to" fd index
overlaps an already in use fd (i.e. one in the "from" category
that are allocated randomly). If a fd overlaps "to" fd then its
a caller issue and not our fault, so we ignore that. */
for (i = 0; i < n_fds; i++)
{
int to_fd = fd_map[i].to;
gboolean conflict = FALSE;
/* At this point we're fine with using "from" values for this
value (because we handle to==from in the code), or values
that are before "i" in the fd_map (because those will be
closed at this point when dup:ing). However, we can't
reuse a fd that is in "from" for j > i. */
for (j = i + 1; j < n_fds; j++)
{
int from_fd = fd_map[j].from;
if (from_fd == to_fd)
{
conflict = TRUE;
break;
}
}
if (conflict)
fd_map[i].to = ++max_fd;
}
if (flags & FLATPAK_HOST_COMMAND_FLAGS_CLEAR_ENV)
{
char *empty[] = { NULL };
env = g_strdupv (empty);
}
else
env = g_strdupv (original_environ);
n_envs = g_variant_n_children (arg_envs);
for (i = 0; i < n_envs; i++)
{
const char *var = NULL;
const char *val = NULL;
g_variant_get_child (arg_envs, i, "{&s&s}", &var, &val);
env = g_environ_setenv (env, var, val, TRUE);
}
if (!g_spawn_async_with_pipes (arg_cwd_path,
(char **) arg_argv,
env,
G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
child_setup_func, &child_setup_data,
&pid,
NULL,
NULL,
NULL,
&error))
{
gint code = G_DBUS_ERROR_FAILED;
if (g_error_matches (error, G_SPAWN_ERROR, G_SPAWN_ERROR_ACCES))
code = G_DBUS_ERROR_ACCESS_DENIED;
else if (g_error_matches (error, G_SPAWN_ERROR, G_SPAWN_ERROR_NOENT))
code = G_DBUS_ERROR_FILE_NOT_FOUND;
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, code,
"Failed to start command: %s",
error->message);
return G_DBUS_METHOD_INVOCATION_HANDLED;
}
pid_data = g_new0 (PidData, 1);
pid_data->pid = pid;
pid_data->client = g_strdup (g_dbus_method_invocation_get_sender (invocation));
pid_data->watch_bus = (flags & FLATPAK_HOST_COMMAND_FLAGS_WATCH_BUS) != 0;
pid_data->child_watch = g_child_watch_add_full (G_PRIORITY_DEFAULT,
pid,
child_watch_died,
pid_data,
NULL);
g_info ("Client Pid is %d", pid_data->pid);
g_hash_table_replace (client_pid_data_hash, GUINT_TO_POINTER (pid_data->pid),
pid_data);
flatpak_development_complete_host_command (object, invocation, NULL,
pid_data->pid);
return G_DBUS_METHOD_INVOCATION_HANDLED;
}
static gboolean
handle_host_command_signal (FlatpakDevelopment *object,
GDBusMethodInvocation *invocation,
guint arg_pid,
guint arg_signal,
gboolean to_process_group)
{
PidData *pid_data = NULL;
pid_data = g_hash_table_lookup (client_pid_data_hash, GUINT_TO_POINTER (arg_pid));
if (pid_data == NULL ||
strcmp (pid_data->client, g_dbus_method_invocation_get_sender (invocation)) != 0)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN,
"No such pid");
return G_DBUS_METHOD_INVOCATION_HANDLED;
}
g_info ("Sending signal %d to client pid %d", arg_signal, arg_pid);
if (to_process_group)
killpg (pid_data->pid, arg_signal);
else
kill (pid_data->pid, arg_signal);
flatpak_development_complete_host_command_signal (object, invocation);
return G_DBUS_METHOD_INVOCATION_HANDLED;
}
static void
name_owner_changed (GDBusConnection *connection,
const gchar *sender_name,
const gchar *object_path,
const gchar *interface_name,
const gchar *signal_name,
GVariant *parameters,
gpointer user_data)
{
const char *name, *from, *to;
g_variant_get (parameters, "(&s&s&s)", &name, &from, &to);
if (name[0] == ':' &&
strcmp (name, from) == 0 &&
strcmp (to, "") == 0)
{
GHashTableIter iter;
PidData *pid_data = NULL;
gpointer value = NULL;
GList *list = NULL, *l;
g_hash_table_iter_init (&iter, client_pid_data_hash);
while (g_hash_table_iter_next (&iter, NULL, &value))
{
pid_data = value;
if (pid_data->watch_bus && g_str_equal (pid_data->client, name))
list = g_list_prepend (list, pid_data);
}
for (l = list; l; l = l->next)
{
pid_data = l->data;
killpg (pid_data->pid, SIGINT);
}
g_list_free (list);
}
}
#define DBUS_NAME_DBUS "org.freedesktop.DBus"
#define DBUS_INTERFACE_DBUS DBUS_NAME_DBUS
#define DBUS_PATH_DBUS "/org/freedesktop/DBus"
static void
on_bus_acquired (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
FlatpakSessionHelper *helper;
FlatpakDevelopment *devel;
GError *error = NULL;
g_dbus_connection_signal_subscribe (connection,
DBUS_NAME_DBUS,
DBUS_INTERFACE_DBUS,
"NameOwnerChanged",
DBUS_PATH_DBUS,
NULL,
G_DBUS_SIGNAL_FLAGS_NONE,
name_owner_changed,
NULL, NULL);
helper = flatpak_session_helper_skeleton_new ();
flatpak_session_helper_set_version (FLATPAK_SESSION_HELPER (helper), 1);
g_signal_connect (helper, "handle-request-session", G_CALLBACK (handle_request_session), NULL);
if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (helper),
connection,
FLATPAK_SESSION_HELPER_PATH,
&error))
{
g_warning ("error: %s", error->message);
g_error_free (error);
}
devel = flatpak_development_skeleton_new ();
flatpak_development_set_version (FLATPAK_DEVELOPMENT (devel), 1);
g_signal_connect (devel, "handle-host-command", G_CALLBACK (handle_host_command), NULL);
g_signal_connect (devel, "handle-host-command-signal", G_CALLBACK (handle_host_command_signal), NULL);
if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (devel),
connection,
FLATPAK_SESSION_HELPER_PATH_DEVELOPMENT,
&error))
{
g_warning ("error: %s", error->message);
g_error_free (error);
}
}
static void
on_name_acquired (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
}
static void
on_name_lost (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
exit (1);
}
/*
* In the case that the monitored file is a symlink, we set up a separate
* GFileMonitor for the real target of the link so that we don't miss updates
* to the linked file contents. This is critical in the case of resolv.conf
* which on stateless systems is often a symlink to a dyamically-generated
* or updated file in /run.
*/
typedef struct
{
const gchar *source;
char *real;
GFileMonitor *monitor_source;
GFileMonitor *monitor_real;
} MonitorData;
static void
monitor_data_free (MonitorData *data)
{
free (data->real);
g_signal_handlers_disconnect_by_data (data->monitor_source, data);
g_object_unref (data->monitor_source);
if (data->monitor_real)
{
g_signal_handlers_disconnect_by_data (data->monitor_real, data);
g_object_unref (data->monitor_real);
}
g_free (data);
}
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MonitorData, monitor_data_free)
static void
copy_file (const char *source,
const char *target_dir)
{
char *basename = g_path_get_basename (source);
char *dest = g_build_filename (target_dir, basename, NULL);
gchar *contents = NULL;
gsize len;
if (g_file_get_contents (source, &contents, &len, NULL))
g_file_set_contents (dest, contents, len, NULL);
g_free (basename);
g_free (dest);
g_free (contents);
}
static void file_changed (GFileMonitor *monitor,
GFile *file,
GFile *other_file,
GFileMonitorEvent event_type,
MonitorData *data);
static void
update_real_monitor (MonitorData *data)
{
char *real = realpath (data->source, NULL);
if (real == NULL)
{
g_info ("unable to get real path to monitor host file %s: %s", data->source,
g_strerror (errno));
return;
}
/* source path matches real path, second monitor is not required, but an old
* one may still exist. set to NULL and compare to what we have. */
if (!g_strcmp0 (data->source, real))
{
free (real);
real = NULL;
}
/* no more work needed if the monitor we have matches the additional monitor
we need (including NULL == NULL) */
if (!g_strcmp0 (data->real, real))
{
free (real);
return;
}
/* otherwise we're not monitoring the right thing and need to remove
any old monitor and make a new one if needed */
free (data->real);
data->real = real;
if (data->monitor_real)
{
g_signal_handlers_disconnect_by_data (data->monitor_real, data);
g_clear_object (&(data->monitor_real));
}
if (!real)
return;
g_autoptr(GFile) r = g_file_new_for_path (real);
g_autoptr(GError) err = NULL;
data->monitor_real = g_file_monitor_file (r, G_FILE_MONITOR_NONE, NULL, &err);
if (!data->monitor_real)
{
g_info ("failed to monitor host file %s (real path of %s): %s",
real, data->source, err->message);
return;
}
g_signal_connect (data->monitor_real, "changed", G_CALLBACK (file_changed), data);
}
static void
file_monitor_do (MonitorData *data)
{
update_real_monitor (data);
copy_file (data->source, monitor_dir);
if (strcmp (data->source, "/etc/localtime") == 0)
{
/* We can't update the /etc/localtime symlink at runtime, nor can we make it a of the
* correct form "../usr/share/zoneinfo/$timezone". So, instead we use the old debian
* /etc/timezone file for telling the sandbox the timezone. */
g_autofree char *dest = g_build_filename (monitor_dir, "timezone", NULL);
g_autofree char *raw_timezone = flatpak_get_timezone ();
g_autofree char *timezone_content = g_strdup_printf ("%s\n", raw_timezone);
g_file_set_contents (dest, timezone_content, -1, NULL);
}
}
static void
file_changed (GFileMonitor *monitor,
GFile *file,
GFile *other_file,
GFileMonitorEvent event_type,
MonitorData *data)
{
if (event_type != G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT)
return;
file_monitor_do (data);
}
static MonitorData *
setup_file_monitor (const char *source)
{
g_autoptr(GFile) s = g_file_new_for_path (source);
g_autoptr(GError) err = NULL;
GFileMonitor *monitor = NULL;
MonitorData *data = NULL;
data = g_new0 (MonitorData, 1);
data->source = source;
monitor = g_file_monitor_file (s, G_FILE_MONITOR_NONE, NULL, &err);
if (monitor)
{
data->monitor_source = monitor;
g_signal_connect (monitor, "changed", G_CALLBACK (file_changed), data);
}
else
{
g_info ("failed to monitor host file %s: %s", source, err->message);
}
file_monitor_do (data);
return data;
}
static void
message_handler (const gchar *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer user_data)
{
/* Make this look like normal console output */
if (log_level & (G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO))
g_printerr ("F: %s\n", message);
else
g_printerr ("%s: %s\n", g_get_prgname (), message);
}
static void
start_p11_kit_server (const char *flatpak_dir)
{
g_autofree char *socket_basename = g_strdup_printf ("pkcs11-flatpak-%d", getpid ());
g_autofree char *socket_path = g_build_filename (flatpak_dir, socket_basename, NULL);
g_autofree char *p11_kit_stdout = NULL;
gint exit_status;
g_autoptr(GError) local_error = NULL;
g_auto(GStrv) stdout_lines = NULL;
int i;
char *p11_argv[] = {
"p11-kit", "server",
/* We explicitly request --sh here, because we then fail on earlier versions that doesn't support
* this flag. This is good, because those earlier versions did not properly daemonize and caused
* the spawn_sync to hang forever, waiting for the pipe to close.
*/
"--sh",
"-n", socket_path,
"--provider", "p11-kit-trust.so",
"pkcs11:model=p11-kit-trust?write-protected=yes",
NULL
};
g_info ("starting p11-kit server");
if (!g_spawn_sync (NULL,
p11_argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL,
NULL, NULL,
&p11_kit_stdout, NULL,
&exit_status, &local_error))
{
g_warning ("Unable to start p11-kit server: %s", local_error->message);
return;
}
if (!g_spawn_check_exit_status (exit_status, &local_error))
{
g_warning ("Unable to start p11-kit server: %s", local_error->message);
return;
}
stdout_lines = g_strsplit (p11_kit_stdout, "\n", 0);
/* Output is something like:
P11_KIT_SERVER_ADDRESS=unix:path=/run/user/1000/p11-kit/pkcs11-2603742; export P11_KIT_SERVER_ADDRESS;
P11_KIT_SERVER_PID=2603743; export P11_KIT_SERVER_PID;
*/
for (i = 0; stdout_lines[i] != NULL; i++)
{
char *line = stdout_lines[i];
if (g_str_has_prefix (line, "P11_KIT_SERVER_PID="))
{
char *pid = line + strlen ("P11_KIT_SERVER_PID=");
char *p = pid;
while (g_ascii_isdigit (*p))
p++;
*p = 0;
p11_kit_server_pid = atol (pid);
}
}
if (p11_kit_server_pid != 0)
{
g_info ("Using p11-kit socket path %s, pid %d", socket_path, p11_kit_server_pid);
p11_kit_server_socket_path = g_steal_pointer (&socket_path);
}
else
g_info ("Not using p11-kit due to older version");
}
int
main (int argc,
char **argv)
{
guint owner_id;
GMainLoop *loop;
gboolean replace;
gboolean verbose;
gboolean show_version;
g_autoptr(GOptionContext) context = NULL;
GBusNameOwnerFlags flags;
g_autofree char *pk11_program = NULL;
g_autofree char *flatpak_dir = NULL;
g_autoptr(GError) error = NULL;
const GOptionEntry options[] = {
{ "replace", 'r', 0, G_OPTION_ARG_NONE, &replace, "Replace old daemon.", NULL },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Enable debug output.", NULL },
{ "version", 0, 0, G_OPTION_ARG_NONE, &show_version, "Show program version.", NULL},
{ NULL }
};
g_autoptr(MonitorData) m_resolv_conf = NULL,
m_host_conf = NULL,
m_hosts = NULL,
m_gai_conf = NULL,
m_localtime = NULL;
struct sigaction action;
/* Save the enviroment before changing anything, so that subprocesses
* can get the unchanged version */
original_environ = g_get_environ ();
atexit (do_atexit);
memset (&action, 0, sizeof (struct sigaction));
action.sa_handler = handle_sigterm;
sigaction (SIGTERM, &action, NULL);
sigaction (SIGHUP, &action, NULL);
sigaction (SIGINT, &action, NULL);
setlocale (LC_ALL, "");
g_setenv ("GIO_USE_VFS", "local", TRUE);
g_set_prgname (argv[0]);
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, message_handler, NULL);
context = g_option_context_new ("");
replace = FALSE;
verbose = FALSE;
show_version = FALSE;
g_option_context_set_summary (context, "Flatpak session helper");
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
if (!g_option_context_parse (context, &argc, &argv, &error))
{
g_printerr ("%s: %s", g_get_application_name (), error->message);
g_printerr ("\n");
g_printerr ("Try \"%s --help\" for more information.",
g_get_prgname ());
g_printerr ("\n");
return 1;
}
g_clear_pointer (&context, g_option_context_free);
if (show_version)
{
g_print (PACKAGE_STRING "\n");
return 0;
}
if (verbose)
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, message_handler, NULL);
client_pid_data_hash = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) pid_data_free);
session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
if (session_bus == NULL)
{
g_printerr ("Can't find bus: %s\n", error->message);
return 1;
}
flatpak_dir = g_build_filename (g_get_user_runtime_dir (), ".flatpak-helper", NULL);
if (g_mkdir_with_parents (flatpak_dir, 0700) != 0)
{
g_print ("Can't create %s\n", monitor_dir);
exit (1);
}
pk11_program = g_find_program_in_path ("p11-kit");
if (pk11_program)
start_p11_kit_server (flatpak_dir);
else
g_info ("p11-kit not found");
monitor_dir = g_build_filename (flatpak_dir, "monitor", NULL);
if (g_mkdir_with_parents (monitor_dir, 0755) != 0)
{
g_print ("Can't create %s\n", monitor_dir);
exit (1);
}
m_resolv_conf = setup_file_monitor ("/etc/resolv.conf");
m_host_conf = setup_file_monitor ("/etc/host.conf");
m_hosts = setup_file_monitor ("/etc/hosts");
m_gai_conf = setup_file_monitor ("/etc/gai.conf");
m_localtime = setup_file_monitor ("/etc/localtime");
flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;
if (replace)
flags |= G_BUS_NAME_OWNER_FLAGS_REPLACE;
owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
FLATPAK_SESSION_HELPER_BUS_NAME,
flags,
on_bus_acquired,
on_name_acquired,
on_name_lost,
NULL,
NULL);
loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (loop);
g_bus_unown_name (owner_id);
g_strfreev (original_environ);
return 0;
}
``` |
Robert "Buck" Friedman (September 11, 1921 – December 9, 1989) was an American football tackle.
Friedman was born in Allentown, Pennsylvania, in 1921. He attended Allentown High School and the University of Washington. He played college football for Washington from 1940 to 1942.
He played professional football in the National Football League (NFL) for the Philadelphia Eagles in 1944, appearing in ten games, eight of them as starter. In 1946, he also played for the Bethlehem Bulldogs of the American Association.
Friedman died in 1989 at age 68.
References
1921 births
1989 deaths
Philadelphia Eagles players
American football tackles
Players of American football from Allentown, Pennsylvania |
The Retaruke River is a river in the North Island of New Zealand. It joins with the Whanganui River at Whakahoro just above Wade's Landing and downstream from Taumarunui. The river flows through the farming communities of Upper and then Lower Retaruke Valley. Downstream from this junction is the Mangapurua Landing with its Bridge to Nowhere, servicing the ill-fated Mangapurua Valley farming community.
Sources
The river source is located south west of National Park in the Erua Forest. The river initially flows south west through the forest before bending to flow north west.
Geology
Most of the valley is made up of Early Miocene Mahoenui Group rocks. About 65,000 years ago movement of the Waimarino Fault probably allowed capture of the Waimarino Stream and/or Makatote River by the Manganuiateao River, which would have reduced erosion by ending the incidence of lahars and reducing flows in the Retaruke River.
Coal was discovered in 1909 in the Late Miocene Whangamomona Group. During the 1960s and 1970s, an opencast coal mine operated at the top end of Retaruke Road. Between 1938 and 1984 it produced about 3,000 tons of coal.
Upper Retaruke valley community
1 kilometre up the Upper Retaruke Valley road is the location of the annual Kaitieke Collie club sheepdog trials. Next is the location of a "Victory Hall". Further up the valley there was a coal mine, and it was along the upper Retaruke river that fossil whalebones were found by Ken McNaught.
Kaitieke County
The Retaruke valley is contained within the original Kaitieke County.
This county was created by the Kaitieke County Act 1910 from portions of Waimarino and West Taupo Counties. Its eastern boundary was the Main Trunk line from Erua to Taumarunui, and its western boundary was the Whanganui River down to Te Auroa, about east of Waitotara. Other settlements in the county included Manunui, Raurimu, Ōwhango, Kakahi, and Piriaka. Manunui Town Board was split from the county in 1911 and the county became part of Taumarunui County in 1956.
The Kaitieke Council Chambers were located at Raurimu near the old Raurimu District High School.
The Kaitieke County stockyards are located at the junction of the Upper and Lower Retaruke Roads . There stands the World War I memorial, a set of stockyards for auctioning of sheep stock, and a defunct manual telephone exchange. Previously in near proximity to the stockyards, there was a postal depot, a general store and then an automatic telephone exchange.
Lower Retaruke valley community
Portions of the Lower Retaruke Valley were settled about 1900 by government run farm ballot. Other portions were independently purchased from the Māori community. The land was then cleared, grassed, and sheep flocks herded in from Raurimu to stock the hills.
The valley previously had a tiny Mangaroa Primary School(). At a location further up there still remain the community hall and sports field, here there are annual children's Christmas parties, occasional Dances/Social and the annual Retaruke Easter Sports Day are run.
Access to the Valley is via three main roads: Oio Road, Kawautahi Road or the Raurimu-Kaitieke Road from Raurimu. However, on foot the valley can be accessed via the old Mangapurua Road, or by jetboat or via the Whanganui River. (Other access routes such as the Kokako Road & Kuotoroa East Road (to Ruatiti), Te Mata Road from Whakahoro to Taumarunui have long since been abandoned. Some of these roads were examples of pack horse tracks that were expanded to roads during the Great Depression 1930s as job creation schemes.)
Historically, the wealth of the valley has come from the production of wool. Early on there were also some small dairy farms producing cream/"butterfat" for the Kaitieke dairy factory that was located in Piriaka near Taumarunui.
Reserves
The Retaruke valley has several scenic reserves. Hautonu , Papapotu , Ngataumata , Ngamoturiki and Rotokahu were gazetted in 1913 and Ngamoturiki in 1979. The original vegetation was mainly rimu, rata, tawa, hinau, rewarewa, hard beech, and kamahi. Since about 1960, many kamahi around the headwaters of the river have died. The highest and steepest hills in the Retaruke catchment have residual tawa-dominated stands or secondary growth of kamahi and some kanuka and rewarewa. The rest of the valley was largely converted from native bush to pasture in about 40 years from the 1880s.
Tributaries
References
Rivers of Manawatū-Whanganui
Rivers of New Zealand |
```c++
#include <Storages/ReadInOrderOptimizer.h>
#include <Core/Settings.h>
#include <Interpreters/ExpressionActions.h>
#include <Interpreters/ExpressionAnalyzer.h>
#include <Interpreters/TreeRewriter.h>
#include <Interpreters/replaceAliasColumnsInQuery.h>
#include <Functions/IFunction.h>
#include <Functions/FunctionFactory.h>
#include <Interpreters/TableJoin.h>
#include <Interpreters/Context.h>
#include <Parsers/ASTSelectQuery.h>
#include <Parsers/ASTFunction.h>
#include <Parsers/ASTIdentifier.h>
namespace DB
{
namespace ErrorCodes
{
extern const int LOGICAL_ERROR;
}
namespace
{
/// Finds expression like x = 'y' or f(x) = 'y',
/// where `x` is identifier, 'y' is literal and `f` is injective functions.
ASTPtr getFixedPoint(const ASTPtr & ast, const ContextPtr & context)
{
const auto * func = ast->as<ASTFunction>();
if (!func || func->name != "equals")
return nullptr;
if (!func->arguments || func->arguments->children.size() != 2)
return nullptr;
const auto & lhs = func->arguments->children[0];
const auto & rhs = func->arguments->children[1];
if (!lhs->as<ASTLiteral>() && !rhs->as<ASTLiteral>())
return nullptr;
/// Case of two literals doesn't make sense.
if (lhs->as<ASTLiteral>() && rhs->as<ASTLiteral>())
return nullptr;
/// If indetifier is wrapped into injective functions, remove them.
auto argument = lhs->as<ASTLiteral>() ? rhs : lhs;
while (const auto * arg_func = argument->as<ASTFunction>())
{
if (!arg_func->arguments || arg_func->arguments->children.size() != 1)
return nullptr;
auto func_resolver = FunctionFactory::instance().tryGet(arg_func->name, context);
if (!func_resolver || !func_resolver->isInjective({}))
return nullptr;
argument = arg_func->arguments->children[0];
}
return argument->as<ASTIdentifier>() ? argument : nullptr;
}
NameSet getFixedSortingColumns(
const ASTSelectQuery & query, const Names & sorting_key_columns, const ContextPtr & context)
{
ASTPtr condition;
if (query.where() && query.prewhere())
condition = makeASTFunction("and", query.where(), query.prewhere());
else if (query.where())
condition = query.where();
else if (query.prewhere())
condition = query.prewhere();
if (!condition)
return {};
/// Convert condition to CNF for more convenient analysis.
auto cnf = TreeCNFConverter::tryConvertToCNF(condition);
if (!cnf)
return {};
NameSet fixed_points;
NameSet sorting_key_columns_set(sorting_key_columns.begin(), sorting_key_columns.end());
/// If we met expression like 'column = x', where 'x' is literal,
/// in clause of size 1 in CNF, then we can guarantee
/// that in all filtered rows 'column' will be equal to 'x'.
cnf->iterateGroups([&](const auto & group)
{
if (group.size() == 1 && !group.begin()->negative)
{
auto fixed_point = getFixedPoint(group.begin()->ast, context);
if (fixed_point)
{
auto column_name = fixed_point->getColumnName();
if (sorting_key_columns_set.contains(column_name))
fixed_points.insert(column_name);
}
}
});
return fixed_points;
}
struct MatchResult
{
/// One of {-1, 0, 1} - direction of the match. 0 means - doesn't match.
int direction = 0;
/// If true then current key must be the last in the matched prefix of sort description.
bool is_last_key = false;
};
/// Optimize in case of exact match with order key element
/// or in some simple cases when order key element is wrapped into monotonic function.
MatchResult matchSortDescriptionAndKey(
const ExpressionActions::Actions & actions,
const SortColumnDescription & sort_column,
const String & sorting_key_column)
{
/// If required order depend on collation, it cannot be matched with primary key order.
/// Because primary keys cannot have collations.
if (sort_column.collator)
return {};
MatchResult result{sort_column.direction, false};
/// For the path: order by (sort_column, ...)
if (sort_column.column_name == sorting_key_column)
return result;
/// For the path: order by (function(sort_column), ...)
/// Allow only one simple monotonic functions with one argument
/// Why not allow multi monotonic functions?
bool found_function = false;
for (const auto & action : actions)
{
if (action.node->type != ActionsDAG::ActionType::FUNCTION)
continue;
if (found_function)
return {};
found_function = true;
if (action.node->children.size() != 1 || action.node->children.at(0)->result_name != sorting_key_column)
return {};
const auto & func = *action.node->function_base;
if (!func.hasInformationAboutMonotonicity())
return {};
auto monotonicity = func.getMonotonicityForRange(*func.getArgumentTypes().at(0), {}, {});
if (!monotonicity.is_monotonic)
return {};
/// If function is not strict monotonic, it can break order
/// if it's not last in the prefix of sort description.
/// E.g. if we have ORDER BY (d, u) -- ('2020-01-01', 1), ('2020-01-02', 0), ('2020-01-03', 1)
/// ORDER BY (toStartOfMonth(d), u) -- ('2020-01-01', 1), ('2020-01-01', 0), ('2020-01-01', 1)
if (!monotonicity.is_strict)
result.is_last_key = true;
if (!monotonicity.is_positive)
result.direction *= -1;
}
if (!found_function)
return {};
return result;
}
}
ReadInOrderOptimizer::ReadInOrderOptimizer(
const ASTSelectQuery & query_,
const ManyExpressionActions & elements_actions_,
const SortDescription & required_sort_description_,
const TreeRewriterResultPtr & syntax_result)
: elements_actions(elements_actions_)
, required_sort_description(required_sort_description_)
, query(query_)
{
if (elements_actions.size() != required_sort_description.size())
throw Exception(ErrorCodes::LOGICAL_ERROR, "Sizes of sort description and actions are mismatched");
/// Do not analyze joined columns.
/// They may have aliases and come to description as is.
/// We can mismatch them with order key columns at stage of fetching columns.
forbidden_columns = syntax_result->getArrayJoinSourceNameSet();
// array join result columns cannot be used in alias expansion.
array_join_result_to_source = syntax_result->array_join_result_to_source;
}
InputOrderInfoPtr ReadInOrderOptimizer::getInputOrderImpl(
const StorageMetadataPtr & metadata_snapshot,
const SortDescription & description,
const ManyExpressionActions & actions,
const ContextPtr & context,
UInt64 limit) const
{
const Names & sorting_key_columns = metadata_snapshot->getSortingKeyColumns();
int read_direction = description.at(0).direction;
auto fixed_sorting_columns = getFixedSortingColumns(query, sorting_key_columns, context);
SortDescription sort_description_for_merging;
sort_description_for_merging.reserve(description.size());
size_t desc_pos = 0;
size_t key_pos = 0;
while (desc_pos < description.size() && key_pos < sorting_key_columns.size())
{
if (forbidden_columns.contains(description[desc_pos].column_name))
break;
auto match = matchSortDescriptionAndKey(actions[desc_pos]->getActions(), description[desc_pos], sorting_key_columns[key_pos]);
bool is_matched = match.direction && (desc_pos == 0 || match.direction == read_direction);
if (!is_matched)
{
/// If one of the sorting columns is constant after filtering,
/// skip it, because it won't affect order anymore.
if (fixed_sorting_columns.contains(sorting_key_columns[key_pos]))
{
++key_pos;
continue;
}
break;
}
if (desc_pos == 0)
read_direction = match.direction;
sort_description_for_merging.push_back(description[desc_pos]);
++desc_pos;
++key_pos;
if (match.is_last_key)
break;
}
if (sort_description_for_merging.empty())
return {};
return std::make_shared<InputOrderInfo>(std::move(sort_description_for_merging), key_pos, read_direction, limit);
}
InputOrderInfoPtr ReadInOrderOptimizer::getInputOrder(
const StorageMetadataPtr & metadata_snapshot, ContextPtr context, UInt64 limit) const
{
if (!metadata_snapshot->hasSortingKey())
return {};
auto aliased_columns = metadata_snapshot->getColumns().getAliases();
/// Replace alias column with proper expressions.
/// Currently we only support alias column without any function wrapper,
/// i.e.: `order by aliased_column` can have this optimization, but `order by function(aliased_column)` can not.
/// This suits most cases.
if (context->getSettingsRef().optimize_respect_aliases && !aliased_columns.empty())
{
SortDescription aliases_sort_description = required_sort_description;
ManyExpressionActions aliases_actions = elements_actions;
for (size_t i = 0; i < required_sort_description.size(); ++i)
{
if (!aliased_columns.contains(required_sort_description[i].column_name))
continue;
auto column_expr = metadata_snapshot->getColumns().get(required_sort_description[i].column_name).default_desc.expression->clone();
replaceAliasColumnsInQuery(column_expr, metadata_snapshot->getColumns(), array_join_result_to_source, context);
auto syntax_analyzer_result = TreeRewriter(context).analyze(column_expr, metadata_snapshot->getColumns().getAll());
auto expression_analyzer = ExpressionAnalyzer(column_expr, syntax_analyzer_result, context);
aliases_sort_description[i].column_name = column_expr->getColumnName();
aliases_actions[i] = expression_analyzer.getActions(true);
}
return getInputOrderImpl(metadata_snapshot, aliases_sort_description, aliases_actions, context, limit);
}
return getInputOrderImpl(metadata_snapshot, required_sort_description, elements_actions, context, limit);
}
}
``` |
Juice Wrld: Into the Abyss is a 2021 documentary film, directed by Tommy Oliver. Focusing on the life and death of American rapper and singer Juice Wrld, the documentary is the sixth and final part of the HBO Max documentary series Music Box. It premiered at the AFI Fest on November 12, 2021, where it won the AFI Fest Documentary Audience Award, and it officially debuted on December 16, 2021, with an exclusive preview at the Juice WRLD Day event held at Chicago's United Center on December 9.
Cast
All star as themselves.
Juice Wrld (archival footage)
Ally Lotti
Cole Bennett
Benny Blanco
DJ Scheme
G Herbo
iLoveMakonnen
The Kid Laroi
Lil Bibby
Polo G
Rex Kudo
Ski Mask the Slump God
D-Savage
Production
Shot, edited, and produced by Oliver, the documentary contains footage from Juice's last years, and contains appearances from numerous friends and family of his, including his protégé The Kid Laroi, girlfriend Ally Lotti, and manager Lil Bibby. It also features numerous frequent collaborators of Juice's, including rappers Ski Mask the Slump God, Polo G, and G Herbo, producers Benny Blanco, Rex Kudo, and Hit-Boy, and music video director Cole Bennett.
Release
Into the Abyss premiered at the AFI Fest on November 12, 2021, where it won the AFI Fest Documentary Audience Award, and it officially debuted on December 16, 2021, with an exclusive preview at the Juice WRLD Day event held at Chicago's United Center on December 9.
The documentary's release was preceded by the release of Juice's fourth studio album and second to be released posthumously, Fighting Demons. The first single from the album, "Already Dead", was released to streaming services on November 12, 2021. The album was officially released by Juice's labels, Grade A and Interscope Records on December 10, 2021.
Critical response
The film received mostly positive reviews from critics. Conversely, film critic Steve Pulaski of Influx Magazine gave the film a negative review, saying, "Into the Abyss is perhaps the grimiest documentary that could be made about the late Chicago legend. Sloppy editing is one thing, but to show intimate footage of the 21-year-old artist’s spiral into addiction in such an uncritical way feels especially cruel."
See also
Everybody's Everything (film)
Look at Me (2022 film)
References
Documentary films about hip hop music and musicians
2021 documentary films
2021 films
American documentary films
2020s English-language films
2020s American films |
The Johann Heinrich Voß Prize in Translation () is awarded yearly by the German Academy for Language and Poetry in Darmstadt.
Established 1958, it was named after the German poet and philologist Johann Heinrich Voß.
Not to be confused with the .
Award-winners
1958: Edwin Muir and Willa Muir
1959: Benno Geiger
1960: E. K. Rahsin (Elisabeth „Less“ Kaerrick)
1961: Jakob Hegner
1962: Rudolf Alexander Schröder
1963: Friedhelm Kemp
1964: Michael Hamburger
1965: Wolfgang Schadewaldt
1966: Eva Rechel-Mertens, Philippe Jaccottet
1967: Witold Wirpsza, Karl Dedecius
1968: Eva Hesse
1969: Hans Hennecke
1970: Janheinz Jahn
1971: Karl August Horst
1972: Elmar Tophoven
1973: Peter Gan (Richard Moering)
1974: Peter Urban
1975: Curt Meyer-Clason
1976: Hanns Grössel
1977: Edwin Maria Landau
1978: Übersetzerkollegium der Deutschen Thomas von Aquin-Ausgabe
1979: Gerda Scheffel and Helmut Scheffel
1980: Annemarie Schimmel
1981: Wolfgang Kasack
1982: Heinz von Sauter
1983: Rolf-Dietrich Keil
1984: Anneliese Botond
1985: Elisabeth Schnack
1986: Hanno Helbling
1987: Rudolf Wittkopf
1988: Traugott König
1989: Michael Walter
1990: Manfred Fuhrmann
1991: Fritz Vogelgsang
1992: Simon Werle
1993: Roswitha Matwin-Buschmann
1994: Werner von Koppenfels
1995: Rosemarie Tietze
1996: Joachim Kalka
1997: Hans-Horst Henschen
1998: Gustav Just
1999: Harry Rowohlt
2000: Armin Eidherr
2001: Burkhart Kroeber
2002: Gisela Perlet
2003: Hans Wolf
2004: Michael von Albrecht
2005: Elisabeth Edl
2006: Ralph Dutli
2007: Stefan Weidner
2008: Verena Reichel
2009: Susanne Lange
2010: Zsuzsanna Gahse
2011: Frank Günther
2012: Gabriele Leupold
2013: Wolfgang Kubin
2014: Sabine Stöhr
2015: Anne Birkenhauer
2016: Anne Weber
2017: Renate Schmidgall
2018: Wolfgang Schlüter
2019:
2020: Ernest Wichner
2021: Barbara Kleiner
2022: Rainer G. Schmidt
References
External links
Translation awards
Awards established in 1958
1958 establishments in Germany |
```javascript
/* your_sha256_hash--------------
*
* # D3.js - histogram chart
*
* Demo d3.js histogram chart setup with tooltip and random data
*
* Version: 1.0
* Latest update: August 1, 2015
*
* your_sha256_hash------------ */
$(function () {
// Initialize chart
stackedMultiples('#d3-histogram', 400);
// Chart setup
function stackedMultiples(element, height) {
// Basic setup
// ------------------------------
// Define main variables
var d3Container = d3.select(element),
margin = {top: 15, right: 20, bottom: 20, left: 60},
width = d3Container.node().getBoundingClientRect().width - margin.left - margin.right,
height = height - margin.top - margin.bottom - 5;
// Generate a Bates distribution of 10 random variables.
var values = d3.range(1000).map(d3.random.bates(4));
// Data format
var formatCount = d3.format(",.0f");
// Construct scales
// ------------------------------
// Horizontal
var x = d3.scale.linear()
.domain([0, 1])
.range([0, width]);
// Generate a histogram using twenty uniformly-spaced bins.
var data = d3.layout.histogram()
.bins(x.ticks(20))
(values);
// Vertical
var y = d3.scale.linear()
.domain([0, d3.max(data, function(d) { return d.y; })])
.range([height, 0]);
// Colors
var color = d3.scale.ordinal().range(["#98abc5", "#8a89a6", "#7b6888", "#6b486b", "#a05d56", "#d0743c", "#ff8c00"]);
// Create axes
// ------------------------------
// Horizontal
var xAxis = d3.svg.axis()
.scale(x)
.orient("bottom");
// Create chart
// ------------------------------
// Add SVG element
var container = d3Container.append("svg");
// Add SVG group
var svg = container
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
// Add tooltip
// ------------------------------
// Create tooltip
var tip = d3.tip()
.attr('class', 'd3-tip')
.offset([-25, 0])
.html(function(d) {
return "Current value: " + "<span class='text-semibold'>" + formatCount(d.y) + "</span>";
})
// Initialize tooltip
svg.call(tip);
//
// Append chart elements
//
// Add bars
// ------------------------------
// Group each bar
var bar = svg.selectAll(".d3-bar")
.data(data)
.enter()
.append("g")
.attr("class", "d3-bar")
.attr("transform", function(d) { return "translate(" + x(d.x) + "," + y(d.y) + ")"; })
.on('mouseover', tip.show)
.on('mouseout', tip.hide);
// Append bars
bar.append("rect")
.attr("x", 1)
.attr("width", x(data[0].dx) - 3)
.attr("height", function(d) { return height - y(d.y); })
.style("fill", function(d) { return color(d); });
// Append text
bar.append("text")
.attr("dy", ".75em")
.attr("y", -15)
.attr("x", x(data[0].dx) / 2)
.style("text-anchor", "middle")
.style("fill", "#333")
.text(function(d) { return formatCount(d.y); });
// Append axes
// ------------------------------
// Horizontal
svg.append("g")
.attr("class", "d3-axis d3-axis-horizontal d3-axis-strong")
.attr("transform", "translate(0," + height + ")")
.call(xAxis);
// Resize chart
// ------------------------------
// Call function on window resize
$(window).on('resize', resize);
// Call function on sidebar width change
$('.sidebar-control').on('click', resize);
// Resize function
//
// Since D3 doesn't support SVG resize by default,
// we need to manually specify parts of the graph that need to
// be updated on window resize
function resize() {
// Layout variables
width = d3Container.node().getBoundingClientRect().width - margin.left - margin.right;
// Layout
// -------------------------
// Main svg width
container.attr("width", width + margin.left + margin.right);
// Width of appended group
svg.attr("width", width + margin.left + margin.right);
// Axes
// -------------------------
// Horizontal range
x.range([0, width]);
// Horizontal axis
svg.selectAll('.d3-axis-horizontal').call(xAxis);
// Chart elements
// -------------------------
// Bar group
svg.selectAll('.d3-bar').attr("transform", function(d) { return "translate(" + x(d.x) + "," + y(d.y) + ")"; });
// Bar rect
svg.selectAll('.d3-bar rect').attr("x", 1).attr("width", x(data[0].dx) - 3);
// Bar text
svg.selectAll('.d3-bar text').attr("x", x(data[0].dx) / 2);
}
}
});
``` |
```yaml
Resources:
NotSupportedPullTrigger:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://sam-demo-bucket/filtered_events.zip
Handler: index.handler
Runtime: nodejs16.x
Events:
DDBEvent:
Type: DynamoDB
Properties:
Stream: arn:aws:dynamodb:us-east-1:012345678901:table/TestTable/stream/2015-05-11T21:21:33.291
StartingPosition: TRIM_HORIZON
ConsumerGroupId: consumergroup1
NotSupportedPushTrigger:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://sam-demo-bucket/filtered_events.zip
Handler: index.handler
Runtime: nodejs16.x
Events:
SNSEvent:
Type: SNS
Properties:
Topic: arn:aws:sns:us-east-1:123456789012:my_topic
ConsumerGroupId: consumergroup1
``` |
Ruthie Gilor also known as is a lawn and indoor international bowler.
Bowls career
Gilor represented Israel during the 2000 World Outdoor Bowls Championship and 2004 World Outdoor Bowls Championship (in which she reached the singles quarter final) and the 2012 World Outdoor Bowls Championship. In 2005 she became the first person to reach all four disciplines in the Israeli National championships and successfully defended her singles crown winning of the third time.
In 2007, she won the singles silver medal and bronze pairs medal at the Atlantic Bowls Championships.
In 2009, she won the singles gold medal at the Atlantic Bowls Championships In 2011, she won a bronze medal at the European Bowls Championships in Portugal.
In 2019, ten years after her last Atlantic medal she won the singles gold again at the 2019 Atlantic Bowls Championships. In 2020, was selected for the 2020 World Outdoor Bowls Championship but the event was cancelled due to the COVID-19 pandemic. In 2022, she won singles bronze at the European Bowls Championships.
In 2023, she was selected as part of the team to represent Israel at the 2023 World Outdoor Bowls Championship. She participated in the women's singles and the women's triples events.
References
Living people
1965 births
Place of birth missing (living people)
Israeli female bowls players |
William James Barratt (25 January 1823 – 10 September 1889) was an English convert to Mormonism and became the first Latter Day Saint to live in Australia when he was sent there as a missionary of the Church of Jesus Christ of Latter Day Saints. However, he ultimately apostatized from Mormonism.
Barratt was born in Burslem, North Staffordshire, England. The date of Barratt's conversion to Mormonism is unknown, but Latter Day Saint missionaries first preached in the Burslem area in 1839. He was the only member of his family to join the Church of Jesus Christ of Latter Day Saints. On 11 July 1840, apostle George A. Smith recorded in his diary that he had ordained the 17-year-old Barratt to the office of elder and had set him apart to preach as a missionary in Australia. Barratt's parents had already decided to emigrate to Australia and Barratt had decided that he would accompany them and eventually join the main gathering of Latter-day Saints in Utah Territory. On 17 July, Barratt's ship left London for Australia.
The Barratts arrived in Adelaide on 16 November 1840. Barratt found employment as a shepherd's cook in Mount Barker. Barratt tried preaching in Australia, and was successful in baptizing a few people, but quickly became discouraged at the moral tone of the settlers there. One of the people he did baptize in 1842 was Robert Beauchamp. Shortly thereafter, Barratt lost interest in Mormonism and became involved in the Congregational church in Encounter Bay. Because of this, Beauchamp, not Barratt, became the leader of the Church of Jesus Christ of Latter-day Saints (LDS Church) in Australia and eventually the president of the church's Australasian Mission. Although missionaries from the LDS Church arrived in Australia in 1851, there is no record of Barratt attempting to contact them or vice versa.
Barratt became a prominent land owner in the Bald Hills and Inman Valley areas of South Australia. He married Ann Gibson and fathered seven children. Barratt died at Bald Hills, South Australia and is buried at Victor Harbor, South Australia.
References
John Devitry-Smith, "William James Barratt: The First Mormon 'Down Under'", BYU Studies, vol. 28, no. 3 (June 2007) pp. 53–66
Ruth Goldthorpe (1989). Our Honourable Inheritance : A History of The Church of Jesus Christ of Latter-day Saints in Australia (Adelaide)
Marjorie A. Newton, “Pioneering the Gospel in Australia,” Ensign, October 1986, pp. 32–41
—— (1991). Southern Cross Saints: The Mormons in Australia (Laie, Hawaii: Institute for Polynesian Studies)
External links
Letter from William Barratt to Alfred Cordon 15 July 1840
1823 births
1889 deaths
19th-century Mormon missionaries
Australian Latter Day Saints
Australian leaders of the Church of Jesus Christ of Latter-day Saints
British Latter Day Saints
Christian missionaries in Australia
Converts to Mormonism
English Latter Day Saint missionaries
English Latter Day Saints
English emigrants to colonial Australia
English leaders of the Church of Jesus Christ of Latter-day Saints
Former Latter Day Saints
Mission presidents (LDS Church)
People from Burslem
People from South Australia |
```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\Contactcenterinsights;
class your_sha256_hashscriptObjectConfig extends \Google\Model
{
/**
* @var string
*/
public $medium;
/**
* @param string
*/
public function setMedium($medium)
{
$this->medium = $medium;
}
/**
* @return string
*/
public function getMedium()
{
return $this->medium;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(your_sha256_hashscriptObjectConfig::class, your_sha256_hashightsV1IngestConversationsRequestTranscriptObjectConfig');
``` |
Angélique Villeneuve (born 1965) is a French writer. She was born in Paris and lived in Sweden and India before returning to France. She has written eight novels as well as numerous books for children. She is best known for her novel Les Fleurs d’hiver (Editions Phébus, 2014) which won a raft of literary prizes:
the 2014 Prix Millepages
the 2015 Prix La Passerelle
the 2015 Prix de la Ville de Rambouillet
the 2016 Prix du Livre de Caractère de Quintin.
The book has been translated into English by Adriana Hunter and published by Peirene Press. She also won the SGDL Grand Prix for her 2018 novel Maria. Her recent work, La Belle Lumière, is a fictional account of the life of Helen Keller’s mother.
References
1965 births
Living people
21st-century French novelists
21st-century French women writers
Writers from Paris |
The Electric Banana was a nightclub in Pittsburgh, Pennsylvania. Beginning as a disco in the 1970s, it was a punk rock music venue from 1980 until 2000, and helped establish a place in alternative culture for the city of Pittsburgh.
The venue hosted such acts as The Wurms, Black Flag, Circle Jerks, The Misfits, Hüsker Dü, Sonny Vincent and the Extreme, Half-Life, Dead Milkmen, Meat Puppets, Descendents, Rhythm Pigs, Snakefinger, Wreckless Eric, Ian Dury, Sepultura, Candlemass, Morbid Angel, New Model Army, They Might Be Giants, Minutemen, Jimmy’s Rose Farm, The Dancing Cigarettes, and countless others. Located at 3887 Bigelow Boulevard, it was transformed by owner Johnny "Banana" Zarra into an Italian restaurant called "Zarra's: A Taste Of Southern Italy."
History
The Electric Banana became a punk rock club in early 1980, after stints as both a regular go-go bar and a gay go-go bar. Zarra and wife Judy (a former go-go dancer) took up an offer from local punk and other "unique" bands and artists who needed a venue to play. Within a couple of years, The Banana became the epicenter of Pittsburgh's punk scene. By 1982, most of the "name" bands of the national underground punk scene had played the Banana.
Amongst the local acts, there was the aforementioned Half-Life, Watch for Busses, The Cynics, S.M.D.(Screaming Mailboxes of Destiny), Boystown, The Beating, The Cowboys from Hell, the past three mentioned bands all had members in common which were Phil Crists (drums) Mike Kastelic currently of the Cynics (vocals) Rick Pegg (guitar/vocal) who died in 2008 and Ron Cambest (guitar/vocal). The Beating and the Cowboys from Hell also coined the phrase and developed the genre "CowPunk" by combining Cowboy music and Punk Rock creating a new sound. 99 cents, The Five, The Cardboards, Societys Victim, The visually outrageous Suburban Death Row & their punk rock soap opera; Savage Amused, Flak, 99 Cents, The Garden, White Wreckage, Moist, Real Enemy, The Feedback, The Throbbing Dogs (1995 House Band), AMS and Carsickness, all of which became regular acts at The Banana, and often "hosted" the national acts coming through.
Cultural impact
A mention is made to the Electric Banana in the song "Pittsburgh" by They Might Be Giants on their 2004 Venue Songs Album. The song concentrates on Mr. Smalls theater in Millvale, but The Banana is mentioned in the lines:
I still have dreams about a place / called the Electric Banana / where we're falling into space
The Electric Banana was also known for its stylized yellow matchbook covers. The image of a banana may have been copied from Andy Warhol's icon used for the Velvet Underground.
See also
List of Italian restaurants
References
Punk rock party ends with Blues-Barry Paris Pittsburgh Post Gazette August 30, 1979
Electric Banana is a Lab for New Music -Peter B King Pittsburgh Press February 6, 1986
Our Own Slice of Nirvana Pittsburgh Post-Gazette April 9, 1993
Music Makers Mike Kalina Pittsburgh Post Gazette Aug 9, 1976
Punk goes the trend - Mikie Kalinia Pittsburgh Post Gazette Jan 30, 1981
Tales from the Electric Banana—Pittsburgh's punk laboratory - By Doug Hughey Pittsburgh Post Gazette November 14, 2010
Pittsburgh’s Rocking Past – By A.J. of the X Mondesis House Blog January 2008
Pioneers of early Pittsburgh scene gather for a reunion weekend - By Scott Mervis, Pittsburgh Post-Gazette August 17, 2006
Local Scene: Introducing the Wandering Rocks - Scot Mervis Pittsburgh Post Gazette January 17, 2013
Tour pairs Reid Paley and a Pixie - Scot Mervis Pittsburgh Post Gazette February 12, 2013
External links
ElectricBananaClub.net
pittsburghsigns.org
Electric Banana Pitttsburgh Music History
Music venues in Pittsburgh
Restaurants in Pittsburgh
Italian restaurants in the United States |
In February 2019, the Russian archipelago of Novaya Zemlya in the Arctic Ocean experienced a mass invasion of polar bears.
Dozens of polar bears were seen trying to enter homes, civic buildings, and inhabited areas. The Arkhangelsk Oblast authorities declared a state of emergency on the 16th of February 2019.
According to the local report agency, at least 52 bears entered the area near Belushya Guba, the main settlement on the island. Footage shows the polar bears looking for food in the rubbish at a local dump. Polar bears cannot subsist on a garbage-based diet because of a lack of enough protein and fat.
Local administrator Alexander Minayev said at least between 6 and 10 bears came into the settlement's territory. People were frightened and did not want to leave their homes, so their planned daily routines were stopped. "Parents are afraid to let the children go to school or kindergarten," Minayev said. He also said that the bears "literally chased people in the region".
Zhigansha Musin, the head of the local administration, said, "There have never been so many polar bears in this area since 1983".
Hunting polar bears and shooting them has been prohibited by law in Russia, and vehicle patrols and dogs were not successful in deterring them.
A team of experts was dispatched to the Arctic region to remove polar bears coming into the inhabited area and its vicinity.
Climate change effects
Russia's World Wildlife Fund said "Today, polar bears are entering human areas more frequently than in the past and climate change is the reason. Global warming is reducing sea-ice and this phenomenon forces polar bears to come to land in order to find new sources of food". Liz Greengrass, a director at the UK animal conservation charity Born Free Foundation told CNN that seals are the most popular food for polar bears, but global warming is shrinking their environment, so polar bears must change their food regime.
According to a 2013 study in the journal Nature, global warming is increasingly affecting the planet more than in the past. Model suggestions say that Arctic sea ice is declining at a rate of 13 percent per decade. Scientists believed this climate change is the main reason for the aggressive behavior of the polar bears.
Aftermath
The local authorities have taken a number of safety measures, such as hunting down designated problem bears, securing a local school with fencing and sending military personnel to their posts by "special vehicles."
References
Polar bears
2019 in Russia
Bear attacks
Climate change in Russia
February 2019 events in Russia |
Magomeni (Kata ya Magomeni, in Swahili) is an administrative ward in Kinondoni District of the Dar es Salaam Region in Tanzania. The ward is surrounded on its northern side by the wards of Makumbusho, Mwananyamala, and Hananasif. The ward is bordered to the east by the Ilala MC wards of Upanga West and Mchikichini. Wards Mzimuni and Ndugumbi form the southern and western borders. According to the 2012 census, the ward has a population of 24,400.
Administration
The postal code for Magomeni ward is 14101.
The ward is divided into the following neighborhoods (Mitaa):
Dossi
Idrisa, Magomeni
Makuti "A"
Makuti "B"
Suna
Government
The ward, like every other ward in the country, has local government offices based on the population served. The Magomeni Ward administration building houses a court as per the Ward Tribunal Act of 1988, including other vital departments for the administration the ward. The ward has the following administration offices:
Magomeni Ward Police Station
Magomeni Ward Government Office (Afisa Mtendaji)
Magomeni Ward Tribunal (Baraza La Kata) is a Department inside Ward Government Office
In the local government system of Tanzania, the ward is the smallest democratic unit. Each ward is composed of a committee of eight elected council members which include a chairperson, one salaried officer (with no voting rights), and an executive officer. One-third of seats are reserved for women councillors.
Demographics
The Zaramo people lived in the ward and a major portion of the district at one time. As the city progressed, the ward transformed into an international neighborhood. There are 24,400 people living in the ward.
Education and health
Education
The ward is home to these educational institutions:
Mwongozo Primary School
Hazina Primary School
Magomeni Secoundary School
Healthcare
The ward is home to the following health institutions:
Magomeni Dispensary
Magomeni Health Center, Makumbusho
References
Kinondoni District
Wards of Dar es Salaam Region |
SGF may mean:
Smart Game Format, a computer file format
Société générale de financement, Québeca, Canada
South Glens Falls, a village in upstate New York
Sovereign Grace Fellowship of Canada, for Baptist churches
Springfield–Branson National Airport, Springfield, Missouri, US, IATA code
The Spaceguard Foundation, to protect Earth from collisions with astronomical objects |
The Pastoral Suite (in Swedish: ), Op. 19, is a three-movement suite for orchestra written in 1938 by Swedish composer Lars-Erik Larsson. The suite remains not only one of Larsson's most celebrated compositions, but also one of the most frequently performed pieces of Swedish art music. In particular, the Romance (No. 2) is often performed and recorded as a stand-alone concert piece.
Background
Beginning in 1937, the Swedish Broadcasting Corporation—the country's national, publicly-funded radio—employed Larsson as a composer-in-residence, music producer, and conductor; his main task was to write music to accompany various radio programs. One of Larsson's colleagues was the Swedish poet Hjalmar Gullberg, who had joined Swedish Radio the year before and headed its drama division. Together, the two men developed a genre of popular entertainment they called the "lyrical suite", which alternated recited poetry with musical interludes. Larsson's first commission of this type was to compose four orchestral vignettes to accompany the 1938 radio recitation of a Swedish-language translation Shakespeare's The Winter's Tale; he subsequently published these as A Winter's Tale (; Op. 18).
After the success of A Winter's Tale, Larsson began composing a second lyrical suite for Swedish Radio: The Hours of the Day (). He contributed six orchestral movements to accompany six poems by various Swedish authors:
No. 1: Adagio
Recitation: A Day () by Verner von Heidenstam
No. 1 (): Allegro
Recitation: The Earth Sings () by Erik Blomberg
No. 2: Andantino con moto
Recitation: Siesta by Oscar Levertin
No. 3: Adagio
Recitation: The Two Tones () by Kerstin Hed
No. 4: Vivice
Recitation: An Afternoon () by
No. 5: Andantino
Recitation: Man's Home () by Erik Blomberg
No. 6: Andante tranquillo
The Hours of the Day—and, by extension, what would later become the Pastoral Suite—premiered over Swedish Radio on 11 October 1938, with Larsson conducting the Radio Entertainment Orchestra () in Stockholm; the Swedish actor Gunnar Sjöberg read the first, second, third, and fifth poems, while the Swedish actress Gunn Wållgren read the third and fourth poems. Afterwards, Larsson excerpted Nos. 1, 3, and 4 as the Pastoral Suite, while Nos. 2, 5, and 6 faded into obscurity.
Structure
The Pastoral Suite, which lasts about 12 to 13 minutes, is in three movements. They are as follows:
As a whole, the piece is in the neoclassical style that was "fashionable" in Swedish between the two world wars. In the Scherzo, Larsson's writing recalls the concerto grosso form.
Instrumentation
The Pastoral Suite is scored the following instruments:
Woodwinds: 2 flutes, 2 oboes, 2 clarinets (in B), and 2 bassoons
Brass: 2 horns (in F) and 2 trumpets (in C)
Percussion: timpani
Strings: violins, violas, cellos, and double basses
The two outer movements are for full orchestras, whereas the central Romance is for strings. published the suite in 1942.
Recordings
The sortable table below lists commercially available recordings of the Pastoral Suite:
Notes, references, and sources
Notes
References
Sources
Compositions by Lars-Erik Larsson
20th-century classical music
Classical music in Sweden
1938 compositions
Orchestral suites |
Triphoreae is an orchid tribe in the subfamily Epidendroideae.
See also
Taxonomy of the Orchidaceae
References
Epidendroideae tribes |
Euzophera tintilla is a species of snout moth in the genus Euzophera. It was described by Harrison Gray Dyar Jr. in 1914, and is known from Panama.
References
Moths described in 1914
Phycitini
Moths of Central America
Taxa named by Harrison Gray Dyar Jr. |
Trimethylolpropane triglycidyl ether (TMPTGE) is an organic chemical in the glycidyl ether family. It has the formula C15H26O6 and the IUPAC name is 2-[2,2-bis(oxiran-2-ylmethoxymethyl)butoxymethyl]oxirane, and the CAS number 3454-29-3. It also has another CAS number of 30499-70-8 A key use is as a modifier for epoxy resins as a reactive diluent.
Alternative names
Oxirane, 2,2′-[[2-ethyl-2-[(2-oxiranylmethoxy)methyl]-1,3-propanediyl]bis(oxymethylene)]bis-
Butane, 1-(2,3-epoxypropoxy)-2,2-bis[(2,3-epoxypropoxy)methyl]-
Oxirane, 2,2′-[[2-ethyl-2-[(oxiranylmethoxy)methyl]-1,3-propanediyl]bis(oxymethylene)]bis-
2,2′-[[2-Ethyl-2-[(2-oxiranylmethoxy)methyl]-1,3-propanediyl]bis(oxymethylene)]bis[oxirane]
1,1,1-Trimethylolpropane triglycidyl ether
Manufacture
Trimethylolpropane and epichlorohydrin are reacted with a Lewis acid catalyst to form a halohydrin. The next step is dehydrochlorination with sodium hydroxide. This forms the triglycidyl ether.
Uses
As the molecule has 3 oxirane functionalities, a key use is modifying and reducing the viscosity of epoxy resins. These reactive diluent modified epoxy resins may then be further formulated into CASE applications: Coatings, Adhesives, Sealants, Elastomers. The use of the diluent does effect mechanical properties and microstructure of epoxy resins. It produces epoxy coatings with high impact resistance
Polymer systems with shape memory may also be produced with this particular molecule. Fluoropolymers have also been produced with the material via a photoinitiated mechanism. Production of biocompatible materials is also possible.
See also
Epoxide
Glycidol
References
Further reading
External websites
Hexion Poly-functional Modifiers
Denacol epoxy diluent range
Cargill Reactive diluents
Reactive diluents
Glycidyl ethers |
Laurence Henry Maguire (born 8 February 1997) is an English professional footballer who plays as a defender for Crawley Town on loan from Chesterfield.
Club career
Maguire started his career in the academy at Chesterfield, where he was the captain before being handed his first professional contract by the Spireites on 1 June 2015. He made his professional debut in the club's 2–1 EFL Trophy victory against Wolverhampton Wanderers U23 on 30 August 2016. He then made his League One debut in the 3–3 home draw with Gillingham on 27 September. He scored his first senior goal on 6 December in a 2–0 EFL Trophy win at Rochdale.
On 17 February 2017, Maguire was sent out on loan to AFC Fylde of National League North until 21 March. The next day, he made his debut in a 3–1 win over Brackley Town.
On 30 August 2023, Maguire joined League Two side Crawley Town on loan until the end of January 2024.
International career
In October 2018, Maguire was called up to the England C squad.
Personal life
Maguire's older brothers, Joe and Harry, are also footballers. Joe plays for Glossop North End, and Harry plays for Manchester United and the England national team.
Career statistics
References
External links
1997 births
Living people
Footballers from Sheffield
Chesterfield F.C. players
AFC Fylde players
Crawley Town F.C. players
English Football League players
National League (English football) players
Men's association football defenders
English men's footballers
People from Mosborough
England men's semi-pro international footballers |
The Ministry of Local Government, Rural and Urban Development is a government ministry, responsible for local government in Zimbabwe. The incumbent minister is July Moyo and the deputy minister is Sesel Zvidzai. It oversees:
Municipalities of Zimbabwe
Districts of Zimbabwe
Provinces of Zimbabwe
References
Government of Zimbabwe
Zimbabwe
Zimbabwe |
```objective-c
/**
* @file TinyGsmClientSim7080.h
* @author Volodymyr Shymanskyy
* @license LGPL-3.0
* @date Nov 2016
*/
#ifndef SRC_TINYGSMCLIENTSIM7080_H_
#define SRC_TINYGSMCLIENTSIM7080_H_
// #define TINY_GSM_DEBUG Serial
// #define TINY_GSM_USE_HEX
#define TINY_GSM_MUX_COUNT 12
#define TINY_GSM_BUFFER_READ_AND_CHECK_SIZE
#include "TinyGsmClientSIM70xx.h"
#include "TinyGsmTCP.tpp"
#include "TinyGsmSSL.tpp"
#include "TinyGsmSMS.tpp"
#include "TinyGsmGSMLocation.tpp"
#include "TinyGsmTime.tpp"
#include "TinyGsmNTP.tpp"
#include "TinyGsmBattery.tpp"
class TinyGsmSim7080 : public TinyGsmSim70xx<TinyGsmSim7080>,
public TinyGsmTCP<TinyGsmSim7080, TINY_GSM_MUX_COUNT>,
public TinyGsmSSL<TinyGsmSim7080, TINY_GSM_MUX_COUNT>,
public TinyGsmSMS<TinyGsmSim7080>,
public TinyGsmGSMLocation<TinyGsmSim7080>,
public TinyGsmTime<TinyGsmSim7080>,
public TinyGsmNTP<TinyGsmSim7080>,
public TinyGsmBattery<TinyGsmSim7080> {
friend class TinyGsmSim70xx<TinyGsmSim7080>;
friend class TinyGsmModem<TinyGsmSim7080>;
friend class TinyGsmGPRS<TinyGsmSim7080>;
friend class TinyGsmTCP<TinyGsmSim7080, TINY_GSM_MUX_COUNT>;
friend class TinyGsmSSL<TinyGsmSim7080, TINY_GSM_MUX_COUNT>;
friend class TinyGsmSMS<TinyGsmSim7080>;
friend class TinyGsmGSMLocation<TinyGsmSim7080>;
friend class TinyGsmGPS<TinyGsmSim7080>;
friend class TinyGsmTime<TinyGsmSim7080>;
friend class TinyGsmNTP<TinyGsmSim7080>;
friend class TinyGsmBattery<TinyGsmSim7080>;
/*
* Inner Client
*/
public:
class GsmClientSim7080 : public GsmClient {
friend class TinyGsmSim7080;
public:
GsmClientSim7080() {}
explicit GsmClientSim7080(TinyGsmSim7080& modem, uint8_t mux = 0) {
init(&modem, mux);
}
bool init(TinyGsmSim7080* modem, uint8_t mux = 0) {
this->at = modem;
sock_available = 0;
prev_check = 0;
sock_connected = false;
got_data = false;
if (mux < TINY_GSM_MUX_COUNT) {
this->mux = mux;
} else {
this->mux = (mux % TINY_GSM_MUX_COUNT);
}
at->sockets[this->mux] = this;
return true;
}
public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
sock_connected = at->modemConnect(host, port, mux, false, timeout_s);
return sock_connected;
}
TINY_GSM_CLIENT_CONNECT_OVERRIDES
void stop(uint32_t maxWaitMs) {
dumpModemBuffer(maxWaitMs);
at->sendAT(GF("+CACLOSE="), mux);
sock_connected = false;
at->waitResponse(3000);
}
void stop() override {
stop(15000L);
}
/*
* Extended API
*/
String remoteIP() TINY_GSM_ATTR_NOT_IMPLEMENTED;
};
/*
* Inner Secure Client
*/
public:
class GsmClientSecureSIM7080 : public GsmClientSim7080 {
public:
GsmClientSecureSIM7080() {}
explicit GsmClientSecureSIM7080(TinyGsmSim7080& modem, uint8_t mux = 0)
: GsmClientSim7080(modem, mux) {}
bool setCertificate(const String& certificateName) {
return at->setCertificate(certificateName, mux);
}
int connect(const char* host, uint16_t port, int timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
sock_connected = at->modemConnect(host, port, mux, true, timeout_s);
return sock_connected;
}
TINY_GSM_CLIENT_CONNECT_OVERRIDES
};
/*
* Constructor
*/
public:
explicit TinyGsmSim7080(Stream& stream)
: TinyGsmSim70xx<TinyGsmSim7080>(stream) {
memset(sockets, 0, sizeof(sockets));
}
/*
* Basic functions
*/
protected:
bool initImpl(const char* pin = nullptr) {
DBG(GF("### TinyGSM Version:"), TINYGSM_VERSION);
DBG(GF("### TinyGSM Compiled Module: TinyGsmClientSIM7080"));
bool gotATOK = false;
for (uint32_t start = millis(); millis() - start < 10000L;) {
sendAT(GF(""));
int8_t resp = waitResponse(200L, GFP(GSM_OK), GFP(GSM_ERROR), GF("AT"));
if (resp == 1) {
gotATOK = true;
break;
} else if (resp == 3) {
waitResponse(200L); // get the OK
sendAT(GF("E0")); // Echo Off
DBG(GF("## Turning off echo!"));
waitResponse(2000L);
}
delay(100);
}
if (!gotATOK) { return false; }
#ifdef TINY_GSM_DEBUG
sendAT(GF("+CMEE=2")); // turn on verbose error codes
#else
sendAT(GF("+CMEE=0")); // turn off error codes
#endif
waitResponse();
DBG(GF("### Modem:"), getModemName());
// Enable Local Time Stamp for getting network time
sendAT(GF("+CLTS=1"));
if (waitResponse(10000L) != 1) { return false; }
// Enable battery checks
sendAT(GF("+CBATCHK=1"));
if (waitResponse() != 1) { return false; }
SimStatus ret = getSimStatus();
// if the sim isn't ready and a pin has been provided, try to unlock the sim
if (ret != SIM_READY && pin != nullptr && strlen(pin) > 0) {
simUnlock(pin);
return (getSimStatus() == SIM_READY);
} else {
// if the sim is ready, or it's locked but no pin has been provided,
// return true
return (ret == SIM_READY || ret == SIM_LOCKED);
}
}
void maintainImpl() {
// Keep listening for modem URC's and proactively iterate through
// sockets asking if any data is avaiable
bool check_socks = false;
for (int mux = 0; mux < TINY_GSM_MUX_COUNT; mux++) {
GsmClientSim7080* sock = sockets[mux];
if (sock && sock->got_data) {
sock->got_data = false;
check_socks = true;
}
}
// modemGetAvailable checks all socks, so we only want to do it once
// modemGetAvailable calls modemGetConnected(), which also checks allf
if (check_socks) { modemGetAvailable(0); }
while (stream.available()) { waitResponse(15, nullptr, nullptr); }
}
/*
* Power functions
*/
protected:
bool restartImpl(const char* pin = nullptr) {
bool success = true;
bool gotATOK = false;
for (uint32_t start = millis(); millis() - start < 10000L;) {
sendAT(GF(""));
int8_t resp = waitResponse(200L, GFP(GSM_OK), GFP(GSM_ERROR), GF("AT"));
if (resp == 1) {
gotATOK = true;
break;
} else if (resp == 3) {
waitResponse(200L); // get the OK
DBG(GF("## Turning off echo!"));
sendAT(GF("E0")); // Echo Off
waitResponse(2000L);
}
delay(100);
}
if (!gotATOK) { return false; }
sendAT(GF("+CREBOOT")); // Reboot
success &= waitResponse() == 1;
waitResponse(30000L, GF("SMS Ready"));
success &= initImpl(pin);
return success;
}
/*
* Generic network functions
*/
protected:
String getLocalIPImpl() {
sendAT(GF("+CNACT?"));
if (waitResponse(GF(AT_NL "+CNACT:")) != 1) { return ""; }
streamSkipUntil('\"');
String res = stream.readStringUntil('\"');
waitResponse();
return res;
}
/*
* Secure socket layer (SSL) functions
*/
// Follows functions as inherited from TinyGsmSSL.tpp
/*
* WiFi functions
*/
// No functions of this type supported
/*
* GPRS functions
*/
protected:
bool gprsConnectImpl(const char* apn, const char* user = nullptr,
const char* pwd = nullptr) {
gprsDisconnect();
// Define the PDP context
sendAT(GF("+CGDCONT=1,\"IP\",\""), apn, '"');
waitResponse();
// Attach to GPRS
sendAT(GF("+CGATT=1"));
if (waitResponse(60000L) != 1) { return false; }
// NOTE: **DO NOT** activate the PDP context
// For who only knows what reason, doing so screws up the rest of the
// process
// Check the APN returned by the server
// not sure why, but the connection is more consistent with this
sendAT(GF("+CGNAPN"));
waitResponse();
// Bearer settings for applications based on IP
// Set the user name and password
// AT+CNCFG=<pdpidx>,<ip_type>,[<APN>,[<usename>,<password>,[<authentication>]]]
// <pdpidx> PDP Context Identifier - for reasons not understood by me,
// use PDP context identifier of 0 for what we defined as 1 above
// <ip_type> 0: Dual PDN Stack
// 1: Internet Protocol Version 4
// 2: Internet Protocol Version 6
// <authentication> 0: NONE
// 1: PAP
// 2: CHAP
// 3: PAP or CHAP
if (pwd && strlen(pwd) > 0 && user && strlen(user) > 0) {
sendAT(GF("+CNCFG=0,1,\""), apn, "\",\"", user, "\",\"", pwd, "\",3");
waitResponse();
} else if (user && strlen(user) > 0) {
// Set the user name only
sendAT(GF("+CNCFG=0,1,\""), apn, "\",\"", user, '"');
waitResponse();
} else {
// Set the APN only
sendAT(GF("+CNCFG=0,1,\""), apn, '"');
waitResponse();
}
// Activate application network connection
// AT+CNACT=<pdpidx>,<action>
// <pdpidx> PDP Context Identifier - for reasons not understood by me,
// use PDP context identifier of 0 for what we defined as 1 above
// <action> 0: Deactive
// 1: Active
// 2: Auto Active
bool res = false;
int ntries = 0;
while (!res && ntries < 5) {
sendAT(GF("+CNACT=0,1"));
res = waitResponse(60000L, GF(AT_NL "+APP PDP: 0,ACTIVE"),
GF(AT_NL "+APP PDP: 0,DEACTIVE"));
waitResponse();
ntries++;
}
return res;
}
bool gprsDisconnectImpl() {
// Shut down the general application TCP/IP connection
// CNACT will close *all* open application connections
sendAT(GF("+CNACT=0,0"));
if (waitResponse(60000L) != 1) { return false; }
sendAT(GF("+CGATT=0")); // Deactivate the bearer context
if (waitResponse(60000L) != 1) { return false; }
return true;
}
/*
* SIM card functions
*/
// Follows functions as inherited from TinyGsmClientSIM70xx.h
/*
* Phone Call functions
*/
// No functions of this type supported
/*
* Audio functions
*/
// No functions of this type supported
/*
* Text messaging (SMS) functions
*/
// Follows all text messaging (SMS) functions as inherited from TinyGsmSMS.tpp
/*
* GSM Location functions
*/
// Follows all GSM-based location functions as inherited from
// TinyGsmGSMLocation.tpp
/*
* GPS/GNSS/GLONASS location functions
*/
// Follows functions as inherited from TinyGsmClientSIM70xx.h
/*
* Time functions
*/
// Follows all clock functions as inherited from TinyGsmTime.tpp
/*
* NTP server functions
*/
protected:
byte NTPServerSyncImpl(String server = "pool.ntp.org", int TimeZone = 0) {
// Set GPRS bearer profile to associate with NTP sync
// this may fail, it's not supported by all modules
sendAT(GF("+CNTPCID=0")); // CID must be 0. With 1 (like other modules)
// does not work!
waitResponse(10000L);
// Set NTP server and timezone
sendAT(GF("+CNTP=\""), server, "\",", String(TimeZone));
if (waitResponse(10000L) != 1) { return -1; }
// Request network synchronization
sendAT(GF("+CNTP"));
if (waitResponse(10000L, GF("+CNTP:"))) {
String result = stream.readStringUntil('\n');
// Check for ',' in case the module appends the time next to the return
// code. Eg: +CNTP: <code>[,<time>]
int index = result.indexOf(',');
if (index > 0) { result.remove(index); }
result.trim();
if (TinyGsmIsValidNumber(result)) { return result.toInt(); }
} else {
return -1;
}
return -1;
}
String ShowNTPErrorImpl(byte error) {
switch (error) {
case 1: return "Network time synchronization is successful";
case 61: return "Network error";
case 62: return "DNS resolution error";
case 63: return "Connection error";
case 64: return "Service response error";
case 65: return "Service response timeout";
default: return "Unknown error: " + String(error);
}
}
/*
* BLE functions
*/
// No functions of this type supported
/*
* Battery functions
*/
// Follows all battery functions as inherited from TinyGsmBattery.tpp
/*
* Temperature functions
*/
// No functions of this type supported
/*
* Client related functions
*/
protected:
bool modemConnect(const char* host, uint16_t port, uint8_t mux,
bool ssl = false, int timeout_s = 75) {
uint32_t timeout_ms = ((uint32_t)timeout_s) * 1000;
// set the connection (mux) identifier to use
sendAT(GF("+CACID="), mux);
if (waitResponse(timeout_ms) != 1) return false;
if (ssl) {
// set the ssl version
// AT+CSSLCFG="SSLVERSION",<ctxindex>,<sslversion>
// <ctxindex> PDP context identifier - for reasons not understood by me,
// use PDP context identifier of 0 for what we defined as 1 in
// the gprsConnect function
// <sslversion> 0: QAPI_NET_SSL_PROTOCOL_UNKNOWN
// 1: QAPI_NET_SSL_PROTOCOL_TLS_1_0
// 2: QAPI_NET_SSL_PROTOCOL_TLS_1_1
// 3: QAPI_NET_SSL_PROTOCOL_TLS_1_2
// 4: QAPI_NET_SSL_PROTOCOL_DTLS_1_0
// 5: QAPI_NET_SSL_PROTOCOL_DTLS_1_2
// NOTE: despite docs using caps, "sslversion" must be in lower case
sendAT(GF("+CSSLCFG=\"sslversion\",0,3")); // TLS 1.2
if (waitResponse(5000L) != 1) return false;
}
// enable or disable ssl
// AT+CASSLCFG=<cid>,"SSL",<sslFlag>
// <cid> Application connection ID (set with AT+CACID above)
// <sslFlag> 0: Not support SSL
// 1: Support SSL
sendAT(GF("+CASSLCFG="), mux, ',', GF("SSL,"), ssl);
waitResponse();
if (ssl) {
// set the PDP context to apply SSL to
// AT+CSSLCFG="CTXINDEX",<ctxindex>
// <ctxindex> PDP context identifier - for reasons not understood by me,
// use PDP context identifier of 0 for what we defined as 1 in
// the gprsConnect function
// NOTE: despite docs using "CRINDEX" in all caps, the module only
// accepts the command "ctxindex" and it must be in lower case
sendAT(GF("+CSSLCFG=\"ctxindex\",0"));
if (waitResponse(5000L, GF("+CSSLCFG:")) != 1) return false;
streamSkipUntil('\n'); // read out the certificate information
waitResponse();
if (certificates[mux] != "") {
// apply the correct certificate to the connection
// AT+CASSLCFG=<cid>,"CACERT",<caname>
// <cid> Application connection ID (set with AT+CACID above)
// <certname> certificate name
sendAT(GF("+CASSLCFG="), mux, ",CACERT,\"", certificates[mux].c_str(),
"\"");
if (waitResponse(5000L) != 1) return false;
}
// set the SSL SNI (server name indication)
// AT+CSSLCFG="SNI",<ctxindex>,<servername>
// <ctxindex> PDP context identifier - for reasons not understood by me,
// use PDP context identifier of 0 for what we defined as 1 in
// the gprsConnect function
// NOTE: despite docs using caps, "sni" must be in lower case
sendAT(GF("+CSSLCFG=\"sni\",0,"), GF("\""), host, GF("\""));
waitResponse();
}
// actually open the connection
// AT+CAOPEN=<cid>,<pdp_index>,<conn_type>,<server>,<port>[,<recv_mode>]
// <cid> TCP/UDP identifier
// <pdp_index> Index of PDP connection; we set up PCP context 1 above
// <conn_type> "TCP" or "UDP"
// <recv_mode> 0: The received data can only be read manually using
// AT+CARECV=<cid>
// 1: After receiving the data, it will automatically report
// URC:
// +CAURC:
// "recv",<id>,<length>,<remoteIP>,<remote_port><CR><LF><data>
// NOTE: including the <recv_mode> fails
sendAT(GF("+CAOPEN="), mux, GF(",0,\"TCP\",\""), host, GF("\","), port);
if (waitResponse(timeout_ms, GF(AT_NL "+CAOPEN:")) != 1) { return 0; }
// returns OK/r/n/r/n+CAOPEN: <cid>,<result>
// <result> 0: Success
// 1: Socket error
// 2: No memory
// 3: Connection limit
// 4: Parameter invalid
// 6: Invalid IP address
// 7: Not support the function
// 12: Cant bind the port
// 13: Cant listen the port
// 20: Cant resolve the host
// 21: Network not active
// 23: Remote refuse
// 24: Certificates time expired
// 25: Certificates common name does not match
// 26: Certificates common name does not match and time expired
// 27: Connect failed
streamSkipUntil(','); // Skip mux
// make sure the connection really opened
int8_t res = streamGetIntBefore('\n');
waitResponse();
return 0 == res;
}
int16_t modemSend(const void* buff, size_t len, uint8_t mux) {
// send data on prompt
sendAT(GF("+CASEND="), mux, ',', (uint16_t)len);
if (waitResponse(GF(">")) != 1) { return 0; }
stream.write(reinterpret_cast<const uint8_t*>(buff), len);
stream.flush();
// OK after posting data
if (waitResponse() != 1) { return 0; }
return len;
}
size_t modemRead(size_t size, uint8_t mux) {
if (!sockets[mux]) { return 0; }
sendAT(GF("+CARECV="), mux, ',', (uint16_t)size);
if (waitResponse(GF("+CARECV:")) != 1) { return 0; }
// uint8_t ret_mux = stream.parseInt();
// streamSkipUntil(',');
// const int16_t len_confirmed = streamGetIntBefore('\n');
// DBG("### READING:", len_confirmed, "from", ret_mux);
// if (ret_mux != mux) {
// DBG("### Data from wrong mux! Got", ret_mux, "expected", mux);
// waitResponse();
// sockets[mux]->sock_available = modemGetAvailable(mux);
// return 0;
// }
// NOTE: manual says the mux number is returned before the number of
// characters available, but in tests only the number is returned
int16_t len_confirmed = stream.parseInt();
streamSkipUntil(','); // skip the comma
if (len_confirmed <= 0) {
waitResponse();
sockets[mux]->sock_available = modemGetAvailable(mux);
return 0;
}
for (int i = 0; i < len_confirmed; i++) {
uint32_t startMillis = millis();
while (!stream.available() &&
(millis() - startMillis < sockets[mux]->_timeout)) {
TINY_GSM_YIELD();
}
char c = stream.read();
sockets[mux]->rx.put(c);
}
waitResponse();
// make sure the sock available number is accurate again
sockets[mux]->sock_available = modemGetAvailable(mux);
return len_confirmed;
}
size_t modemGetAvailable(uint8_t mux) {
// If the socket doesn't exist, just return
if (!sockets[mux]) { return 0; }
// NOTE: This gets how many characters are available on all connections that
// have data. It does not return all the connections, just those with data.
sendAT(GF("+CARECV?"));
for (int muxNo = 0; muxNo < TINY_GSM_MUX_COUNT; muxNo++) {
// after the last connection, there's an ok, so we catch it right away
int res = waitResponse(3000, GF("+CARECV:"), GFP(GSM_OK), GFP(GSM_ERROR));
// if we get the +CARECV: response, read the mux number and the number of
// characters available
if (res == 1) {
int ret_mux = streamGetIntBefore(',');
size_t result = streamGetIntBefore('\n');
GsmClientSim7080* sock = sockets[ret_mux];
if (sock) { sock->sock_available = result; }
// if the first returned mux isn't 0 (or is higher than expected)
// we need to fill in the missing muxes
if (ret_mux > muxNo) {
for (int extra_mux = muxNo; extra_mux < ret_mux; extra_mux++) {
GsmClientSim7080* isock = sockets[extra_mux];
if (isock) { isock->sock_available = 0; }
}
muxNo = ret_mux;
}
} else if (res == 2) {
// if we get an OK, we've reached the last socket with available data
// so we set any we haven't gotten to yet to 0
for (int extra_mux = muxNo; extra_mux < TINY_GSM_MUX_COUNT;
extra_mux++) {
GsmClientSim7080* isock = sockets[extra_mux];
if (isock) { isock->sock_available = 0; }
}
break;
} else {
// if we got an error, give up
break;
}
// Should be a final OK at the end.
// If every connection was returned, catch the OK here.
// If only a portion were returned, catch it above.
if (muxNo == TINY_GSM_MUX_COUNT - 1) { waitResponse(); }
}
modemGetConnected(mux); // check the state of all connections
if (!sockets[mux]) { return 0; }
return sockets[mux]->sock_available;
}
bool modemGetConnected(uint8_t mux) {
// NOTE: This gets the state of all connections that have been opened
// since the last connection
sendAT(GF("+CASTATE?"));
for (int muxNo = 0; muxNo < TINY_GSM_MUX_COUNT; muxNo++) {
// after the last connection, there's an ok, so we catch it right away
int res = waitResponse(3000, GF("+CASTATE:"), GFP(GSM_OK),
GFP(GSM_ERROR));
// if we get the +CASTATE: response, read the mux number and the status
if (res == 1) {
int ret_mux = streamGetIntBefore(',');
size_t status = streamGetIntBefore('\n');
// 0: Closed by remote server or internal error
// 1: Connected to remote server
// 2: Listening (server mode)
GsmClientSim7080* sock = sockets[ret_mux];
if (sock) { sock->sock_connected = (status == 1); }
// if the first returned mux isn't 0 (or is higher than expected)
// we need to fill in the missing muxes
if (ret_mux > muxNo) {
for (int extra_mux = muxNo; extra_mux < ret_mux; extra_mux++) {
GsmClientSim7080* isock = sockets[extra_mux];
if (isock) { isock->sock_connected = false; }
}
muxNo = ret_mux;
}
} else if (res == 2) {
// if we get an OK, we've reached the last socket with available data
// so we set any we haven't gotten to yet to 0
for (int extra_mux = muxNo; extra_mux < TINY_GSM_MUX_COUNT;
extra_mux++) {
GsmClientSim7080* isock = sockets[extra_mux];
if (isock) { isock->sock_connected = false; }
}
break;
} else {
// if we got an error, give up
break;
}
// Should be a final OK at the end.
// If every connection was returned, catch the OK here.
// If only a portion were returned, catch it above.
if (muxNo == TINY_GSM_MUX_COUNT - 1) { waitResponse(); }
}
return sockets[mux]->sock_connected;
}
/*
* Utilities
*/
public:
bool handleURCs(String& data) {
if (data.endsWith(GF("+CARECV:"))) {
int8_t mux = streamGetIntBefore(',');
int16_t len = streamGetIntBefore('\n');
if (mux >= 0 && mux < TINY_GSM_MUX_COUNT && sockets[mux]) {
sockets[mux]->got_data = true;
if (len >= 0 && len <= 1024) { sockets[mux]->sock_available = len; }
}
data = "";
DBG("### Got Data:", len, "on", mux);
return true;
} else if (data.endsWith(GF("+CADATAIND:"))) {
int8_t mux = streamGetIntBefore('\n');
if (mux >= 0 && mux < TINY_GSM_MUX_COUNT && sockets[mux]) {
sockets[mux]->got_data = true;
}
data = "";
DBG("### Got Data:", mux);
return true;
} else if (data.endsWith(GF("+CASTATE:"))) {
int8_t mux = streamGetIntBefore(',');
int8_t state = streamGetIntBefore('\n');
if (mux >= 0 && mux < TINY_GSM_MUX_COUNT && sockets[mux]) {
if (state != 1) {
sockets[mux]->sock_connected = false;
DBG("### Closed: ", mux);
}
}
data = "";
return true;
} else if (data.endsWith(GF("*PSNWID:"))) {
streamSkipUntil('\n'); // Refresh network name by network
data = "";
DBG("### Network name updated.");
return true;
} else if (data.endsWith(GF("*PSUTTZ:"))) {
streamSkipUntil('\n'); // Refresh time and time zone by network
data = "";
DBG("### Network time and time zone updated.");
return true;
} else if (data.endsWith(GF("+CTZV:"))) {
streamSkipUntil('\n'); // Refresh network time zone by network
data = "";
DBG("### Network time zone updated.");
return true;
} else if (data.endsWith(GF("DST: "))) {
streamSkipUntil('\n'); // Refresh Network Daylight Saving Time by network
data = "";
DBG("### Daylight savings time state updated.");
return true;
} else if (data.endsWith(GF(AT_NL "SMS Ready" AT_NL))) {
data = "";
DBG("### Unexpected module reset!");
init();
data = "";
return true;
}
return false;
}
protected:
GsmClientSim7080* sockets[TINY_GSM_MUX_COUNT];
String certificates[TINY_GSM_MUX_COUNT];
};
#endif // SRC_TINYGSMCLIENTSIM7080_H_
``` |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>15G1004</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>IntelMausiEthernet</string>
<key>CFBundleIdentifier</key>
<string>com.insanelymac.IntelMausiEthernet</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>IntelMausiEthernet</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>2.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2.2.0</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>7D1014</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>15E60</string>
<key>DTSDKName</key>
<string>macosx10.11</string>
<key>DTXcode</key>
<string>0731</string>
<key>DTXcodeBuild</key>
<string>7D1014</string>
<key>IOKitPersonalities</key>
<dict>
<key>IntelMausi</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.insanelymac.IntelMausiEthernet</string>
<key>Driver_Version</key>
<string>2.2.0</string>
<key>IOClass</key>
<string>IntelMausi</string>
<key>IOPCIMatch</key>
<string>0x10EA8086 0x10EB8086 0x10EF8086 0x10F08086 0x15028086 0x15038086 0x153A8086 0x153B8086 0x155A8086 0x15598086 0x15A08086 0x15A18086 0x15A28086 0x15A38086 0x156F8086 0x15708086 0x15B78086 0x15B88086</string>
<key>IOProbeScore</key>
<integer>1000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>enableCSO6</key>
<true/>
<key>enableTSO4</key>
<false/>
<key>enableTSO6</key>
<false/>
<key>maxIntrRate</key>
<integer>7000</integer>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IONetworkingFamily</key>
<string>1.5.0</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>1.7</string>
<key>com.apple.kpi.bsd</key>
<string>8.10.0</string>
<key>com.apple.kpi.iokit</key>
<string>8.10.0</string>
<key>com.apple.kpi.libkern</key>
<string>8.10.0</string>
<key>com.apple.kpi.mach</key>
<string>8.10.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Network-Root</string>
</dict>
</plist>
``` |
Thomas Smales (born 19 December ) is an English former professional rugby league footballer who played in the 1950s and 1960s, and coached in the 1970s and 1980s. He played at club level for Wigan, Barrow and Featherstone Rovers as a , and coached at club level for Dewsbury (two spells), Featherstone Rovers, Bramley, Doncaster and Batley.
Background
Smales' birth was registered in Pontefract district, West Riding of Yorkshire, England.
He is the father of the rugby league footballer; Ian Smales.
Playing career
Smales made his début for Wigan in the 46–5 victory over Featherstone Rovers at Central Park, Wigan on Saturday 20 September 1958, he scored his first try (2-tries) for Wigan in the 23–16 victory over Rochdale Hornets at Athletic Ground, Rochdale on Saturday 4 October 1958, he scored his last try for Wigan in the 16–14 victory over Swinton at Station Road, Swinton on Saturday 23 April 1960, and he played his last match for Wigan in the 17–23 defeat by Hunslet at Central Park, Wigan on Saturday 10 September 1960, and made his début for Featherstone Rovers on Saturday 23 August 1952.
After a period spent playing for Barrow, Smales then played for Featherstone Rovers (Heritage № 456). He played , and scored 3-goals in Featherstone Rovers' 12–25 defeat by Hull Kingston Rovers in the 1966–67 Yorkshire County Cup Final during the 1966–67 season at Headingley Rugby Stadium, Leeds on Saturday 15 October 1966. Smales played , scored a try, two conversion's, and a penalty, in Featherstone Rovers' 17–12 victory over Barrow in the 1966–67 Challenge Cup Final during the 1966–67 season at Wembley Stadium, London on Saturday 13 May 1967, in front of a crowd of 76,290. He played in Featherstone Rovers' 9–12 defeat by Hull F.C. in the 1969–70 Yorkshire County Cup Final during the 1969–70 season at Headingley Rugby Stadium, Leeds on Saturday 20 September 1969.
Coaching career
During the 1972–73 Northern Rugby Football League season Smales was the coach in Dewsbury's 22–13 victory over Leeds in the Championship Final at Odsal Stadium, Bradford on Saturday 19 May 1973. Smales was the coach of Batley from June 1979 to October 1981.
References
External links
Statistics at wigan.rlfans.com
Wigan RL History – 1958–59 Season at wigan.rlfans.com
Wigan RL History – 1959–60 Season at wigan.rlfans.com
Wigan RL History – 1960–61 Season at wigan.rlfans.com
To date Batley and Dewsbury have met 199 times…
Wembley trip makes top double for faithful
Rogers receives late call-up
Rogers receives late call-up
Fax banking on Tommy's magic.
(archived by web.archive.org) Barrow RL class of '67 set to gather
(archived by web.archive.org) Reunion for class of '67
Playing at Smales pace sank champions
Pain of defeat serves Dewsbury well to prevent any repeat performance
Search for "Tommy Smales" at britishnewspaperarchive.co.uk
Search for "Tom Smales" at britishnewspaperarchive.co.uk
Search for "Thomas Smales" at britishnewspaperarchive.co.uk
1939 births
Living people
Barrow Raiders players
Batley Bulldogs coaches
Bramley R.L.F.C. coaches
Dewsbury Rams coaches
Doncaster R.L.F.C. coaches
English rugby league coaches
English rugby league players
Featherstone Rovers coaches
Featherstone Rovers players
Rugby league locks
Rugby league players from Pontefract
Wigan Warriors players |
Marie Antoine Alexandre Guilliermond (19 August 1876 – 1 April 1945) was a French botanist and mycologist who specialized in cytological studies of the yeasts, fungi, and algae. He was among the first to identify sexual reproduction in yeast and published a major review on the yeasts in 1912.
Born in Lyons to physician Jacques Guilliermond (1841-1878) and Madeleine Rollet (1856-1893), daughter of professor of hygiene Joseph Rollet, Guilliermond grew up with a numerous physicians in the family. He lost his father at a young age and after his mother remarried he grew up as a shy and reticent youth. He became interested in botany after joining the faculty of sciences at Lyon in 1897. He was influenced by the teaching of Maurice Caullery, Eugène Bataillon, and Louis Matruchot. He graduated in 1899 and began to study the yeasts, receiving a doctorate in 1902. He became a lecturer at the University of Paris in 1913 and became a chair of botany at Sorbonne in 1935 where he succeeded Pierre Augustin Dangeard.
Guilliermond identified isogamous copulation in the yeast Zygosaccharomyces chevalieri and the formation of an ascus in Schizosaccharomyces octosporus. Prior to his work, the vacuole and nucleus of yeast had been confused. He suggested a taxonomy of yeasts in 1928 with 22 genera which was based on morphology, presence or absence of ascospores and their ability to fermentation specific substrates.
A genus Guilliermondia (Mirangiaceae), and several species including Debaryomyces guilliermondii, Hanseniaspora guilliermondii, Saccharomyces guilliermondii, Zygosaccharomycodes guilliermondii, and Candida guilliermondii are named after him.
Authority abbreviation
References
External links
The Yeasts (1920, English translation by W.F. Tanner)
Les levures (Original in French, 1912)
The cytoplasm of the plant cell (1941)
Recherches cytologiques sur les levures et quelques moisissures à formes levures (1902 thesis)
Titres et travaux scientifiques (1921)
1876 births
1945 deaths
French mycologists
Cell biologists
French botanists
Academic staff of the University of Lyon
University of Lyon alumni |
Rev. William Morrison (April 24, 1891 – January 1, 1970) was a farmer, church minister, soldier and politician from Alberta, Canada. He served as a member of the Legislative Assembly of Alberta for a short time in 1935 sitting with the Social Credit caucus in government.
Early life
William Morrison born on April 24, 1891, in Megantic, Quebec. His family moved west in 1906 and they settled at Okotoks, Alberta. He took his early schooling in Okotoks while helping his father run the farm. Morrison took his post secondary education at Robertson College he graduated in 1925. That year he was also ordained as a United Church Minister.
Morrison served several years in the Canadian Armed Forces attaining the rank of Sergeant. He served with the Edmonton Highlanders and the 5th Canadian Railway Troop.
Political career
Morrison ran for a seat to the Alberta Legislature as a Social Credit candidate in the electoral district of Okotoks-High River in the 1935 Alberta general election. He defeated former cabinet minister George Hoadley and two other candidates with a landslide majority to pick up the seat for his party.
The first Social Credit caucus meeting saw Morrison sponsor a motion with John Hugill to confirm William Aberhart as party leader and Premier of the province. He also decided to vacate his seat for the new Premier who did not have one. He did so along with Clarence Tade who vacated his seat for Charles Ross the new Minister of Lands and Mines. Aberhart convinced Morrison to resign so that he could take the seat and provide cabinet representation to southern Alberta to quell complaints about the lack of ministers for the region. His resignation occurred before the newly elected Legislative Assembly had its first sitting.
After resigning Morrison regretted his decision telling the press that he made his decision with too much haste and he did not have time to think about it. Backlash from Morrison's campaign supporters living in and around his home town in Blackie, Alberta spilled over to the federal election campaign being waged in the Macleod electoral district at the time. His supporters threatened to deliver half the votes that Morrison got in the provincial election away from Social Credit candidate Ernest Hansell to incumbent UFA MP George Coote to ensure his re-election. That support did not quite materialize, however, and Coote was defeated.
References
External links
Legislative Assembly of Alberta Members Listing
1891 births
1970 deaths
Alberta Social Credit Party MLAs
People from Lac-Mégantic, Quebec |
```c++
/*
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkBitmapProcState.h"
#include "SkBitmapScaler.h"
#include "SkColorPriv.h"
#include "SkPaint.h"
#include "SkUtils.h"
static void SI8_D16_nofilter_DX_mips_dsp(const SkBitmapProcState& s,
const uint32_t* SK_RESTRICT xy,
int count, uint16_t* SK_RESTRICT colors) {
SkASSERT(count > 0 && colors != NULL);
SkASSERT(s.fInvType <= (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask));
SkASSERT(kNone_SkFilterQuality == s.fFilterLevel);
const uint16_t* SK_RESTRICT table = s.fPixmap.ctable()->read16BitCache();
const uint8_t* SK_RESTRICT srcAddr = (const uint8_t*)s.fPixmap.addr();
SkASSERT((unsigned)xy[0] < (unsigned)s.fPixmap.height());
srcAddr = (const uint8_t*)((const char*)srcAddr + xy[0] * s.fPixmap.rowBytes());
uint8_t src;
if (1 == s.fPixmap.width()) {
src = srcAddr[0];
uint16_t dstValue = table[src];
sk_memset16(colors, dstValue, count);
} else {
int count8;
const uint16_t* SK_RESTRICT xx = (const uint16_t*)(xy + 1);
__asm__ volatile (
".set push \n\t"
".set noreorder \n\t"
".set noat \n\t"
"sra %[count8], %[count], 3 \n\t"
"beqz %[count8], 3f \n\t"
" addiu %[count8], %[count8], -1 \n\t"
"1: \n\t"
"beqz %[count8], 2f \n\t"
" addiu %[count8], %[count8], -1 \n\t"
"pref 0, 16(%[xx]) \n\t"
"lhu $t0, 0(%[xx]) \n\t"
"lhu $t1, 2(%[xx]) \n\t"
"lhu $t2, 4(%[xx]) \n\t"
"lhu $t3, 6(%[xx]) \n\t"
"lhu $t4, 8(%[xx]) \n\t"
"lhu $t5, 10(%[xx]) \n\t"
"lhu $t6, 12(%[xx]) \n\t"
"lhu $t7, 14(%[xx]) \n\t"
"pref 0, 8(%[srcAddr]) \n\t"
"lbux $t0, $t0(%[srcAddr]) \n\t"
"lbux $t1, $t1(%[srcAddr]) \n\t"
"lbux $t2, $t2(%[srcAddr]) \n\t"
"lbux $t3, $t3(%[srcAddr]) \n\t"
"lbux $t4, $t4(%[srcAddr]) \n\t"
"lbux $t5, $t5(%[srcAddr]) \n\t"
"lbux $t6, $t6(%[srcAddr]) \n\t"
"lbux $t7, $t7(%[srcAddr]) \n\t"
"addu $t0, $t0, $t0 \n\t"
"addu $t1, $t1, $t1 \n\t"
"addu $t2, $t2, $t2 \n\t"
"addu $t3, $t3, $t3 \n\t"
"addu $t4, $t4, $t4 \n\t"
"addu $t5, $t5, $t5 \n\t"
"addu $t6, $t6, $t6 \n\t"
"addu $t7, $t7, $t7 \n\t"
"pref 0, 16(%[table]) \n\t"
"lhx $t0, $t0(%[table]) \n\t"
"lhx $t1, $t1(%[table]) \n\t"
"lhx $t2, $t2(%[table]) \n\t"
"lhx $t3, $t3(%[table]) \n\t"
"lhx $t4, $t4(%[table]) \n\t"
"lhx $t5, $t5(%[table]) \n\t"
"lhx $t6, $t6(%[table]) \n\t"
"lhx $t7, $t7(%[table]) \n\t"
"sh $t0, 0(%[colors]) \n\t"
"sh $t1, 2(%[colors]) \n\t"
"sh $t2, 4(%[colors]) \n\t"
"sh $t3, 6(%[colors]) \n\t"
"sh $t4, 8(%[colors]) \n\t"
"sh $t5, 10(%[colors]) \n\t"
"sh $t6, 12(%[colors]) \n\t"
"sh $t7, 14(%[colors]) \n\t"
"addiu %[xx], %[xx], 16 \n\t"
"bgtz %[count8], 1b \n\t"
" addiu %[colors], %[colors], 16 \n\t"
"2: \n\t"
"lhu $t0, 0(%[xx]) \n\t"
"lhu $t1, 2(%[xx]) \n\t"
"lhu $t2, 4(%[xx]) \n\t"
"lhu $t3, 6(%[xx]) \n\t"
"lhu $t4, 8(%[xx]) \n\t"
"lhu $t5, 10(%[xx]) \n\t"
"lhu $t6, 12(%[xx]) \n\t"
"lhu $t7, 14(%[xx]) \n\t"
"lbux $t0, $t0(%[srcAddr]) \n\t"
"lbux $t1, $t1(%[srcAddr]) \n\t"
"lbux $t2, $t2(%[srcAddr]) \n\t"
"lbux $t3, $t3(%[srcAddr]) \n\t"
"lbux $t4, $t4(%[srcAddr]) \n\t"
"lbux $t5, $t5(%[srcAddr]) \n\t"
"lbux $t6, $t6(%[srcAddr]) \n\t"
"lbux $t7, $t7(%[srcAddr]) \n\t"
"addu $t0, $t0, $t0 \n\t"
"addu $t1, $t1, $t1 \n\t"
"addu $t2, $t2, $t2 \n\t"
"addu $t3, $t3, $t3 \n\t"
"addu $t4, $t4, $t4 \n\t"
"addu $t5, $t5, $t5 \n\t"
"addu $t6, $t6, $t6 \n\t"
"addu $t7, $t7, $t7 \n\t"
"lhx $t0, $t0(%[table]) \n\t"
"lhx $t1, $t1(%[table]) \n\t"
"lhx $t2, $t2(%[table]) \n\t"
"lhx $t3, $t3(%[table]) \n\t"
"lhx $t4, $t4(%[table]) \n\t"
"lhx $t5, $t5(%[table]) \n\t"
"lhx $t6, $t6(%[table]) \n\t"
"lhx $t7, $t7(%[table]) \n\t"
"sh $t0, 0(%[colors]) \n\t"
"sh $t1, 2(%[colors]) \n\t"
"sh $t2, 4(%[colors]) \n\t"
"sh $t3, 6(%[colors]) \n\t"
"sh $t4, 8(%[colors]) \n\t"
"sh $t5, 10(%[colors]) \n\t"
"sh $t6, 12(%[colors]) \n\t"
"sh $t7, 14(%[colors]) \n\t"
"addiu %[xx], %[xx], 16 \n\t"
"addiu %[colors], %[colors], 16 \n\t"
"3: \n\t"
".set pop \n\t"
: [xx]"+r"(xx), [count8]"=&r"(count8), [colors]"+r"(colors)
: [table]"r"(table), [srcAddr]"r"(srcAddr), [count]"r"(count)
: "memory","t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"
);
for (int i = (count & 7); i > 0; --i) {
src = srcAddr[*xx++]; *colors++ = table[src];
}
}
}
static void SI8_opaque_D32_nofilter_DX_mips_dsp(const SkBitmapProcState& s,
const uint32_t* SK_RESTRICT xy,
int count, SkPMColor* SK_RESTRICT colors) {
SkASSERT(count > 0 && colors != NULL);
SkASSERT(s.fInvType <= (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask));
SkASSERT(kNone_SkFilterQuality == s.fFilterLevel);
const SkPMColor* SK_RESTRICT table = s.fPixmap.ctable()->readColors();
const uint8_t* SK_RESTRICT srcAddr = (const uint8_t*)s.fPixmap.addr();
srcAddr = (const uint8_t*)((const char*)srcAddr + xy[0] * s.fPixmap.rowBytes());
if (1 == s.fPixmap.width()) {
uint8_t src = srcAddr[0];
SkPMColor dstValue = table[src];
sk_memset32(colors, dstValue, count);
} else {
const uint16_t* xx = (const uint16_t*)(xy + 1);
int s0, s1, s2, s3, s4, s5, s6, s7;
__asm__ volatile (
".set push \n\t"
".set noreorder \n\t"
".set noat \n\t"
"srl $t8, %[count], 4 \n\t"
"beqz $t8, 3f \n\t"
" nop \n\t"
"1: \n\t"
"addiu $t8, $t8, -1 \n\t"
"beqz $t8, 2f \n\t"
" addiu %[count], %[count], -16 \n\t"
"pref 0, 32(%[xx]) \n\t"
"lhu $t0, 0(%[xx]) \n\t"
"lhu $t1, 2(%[xx]) \n\t"
"lhu $t2, 4(%[xx]) \n\t"
"lhu $t3, 6(%[xx]) \n\t"
"lhu $t4, 8(%[xx]) \n\t"
"lhu $t5, 10(%[xx]) \n\t"
"lhu $t6, 12(%[xx]) \n\t"
"lhu $t7, 14(%[xx]) \n\t"
"lhu %[s0], 16(%[xx]) \n\t"
"lhu %[s1], 18(%[xx]) \n\t"
"lhu %[s2], 20(%[xx]) \n\t"
"lhu %[s3], 22(%[xx]) \n\t"
"lhu %[s4], 24(%[xx]) \n\t"
"lhu %[s5], 26(%[xx]) \n\t"
"lhu %[s6], 28(%[xx]) \n\t"
"lhu %[s7], 30(%[xx]) \n\t"
"lbux $t0, $t0(%[srcAddr]) \n\t"
"lbux $t1, $t1(%[srcAddr]) \n\t"
"lbux $t2, $t2(%[srcAddr]) \n\t"
"lbux $t3, $t3(%[srcAddr]) \n\t"
"lbux $t4, $t4(%[srcAddr]) \n\t"
"lbux $t5, $t5(%[srcAddr]) \n\t"
"lbux $t6, $t6(%[srcAddr]) \n\t"
"lbux $t7, $t7(%[srcAddr]) \n\t"
"lbux %[s0], %[s0](%[srcAddr]) \n\t"
"lbux %[s1], %[s1](%[srcAddr]) \n\t"
"lbux %[s2], %[s2](%[srcAddr]) \n\t"
"lbux %[s3], %[s3](%[srcAddr]) \n\t"
"lbux %[s4], %[s4](%[srcAddr]) \n\t"
"lbux %[s5], %[s5](%[srcAddr]) \n\t"
"lbux %[s6], %[s6](%[srcAddr]) \n\t"
"lbux %[s7], %[s7](%[srcAddr]) \n\t"
"sll $t0, $t0, 2 \n\t"
"sll $t1, $t1, 2 \n\t"
"sll $t2, $t2, 2 \n\t"
"sll $t3, $t3, 2 \n\t"
"sll $t4, $t4, 2 \n\t"
"sll $t5, $t5, 2 \n\t"
"sll $t6, $t6, 2 \n\t"
"sll $t7, $t7, 2 \n\t"
"sll %[s0], %[s0], 2 \n\t"
"sll %[s1], %[s1], 2 \n\t"
"sll %[s2], %[s2], 2 \n\t"
"sll %[s3], %[s3], 2 \n\t"
"sll %[s4], %[s4], 2 \n\t"
"sll %[s5], %[s5], 2 \n\t"
"sll %[s6], %[s6], 2 \n\t"
"sll %[s7], %[s7], 2 \n\t"
"pref 0, 64(%[table]) \n\t"
"lwx $t0, $t0(%[table]) \n\t"
"lwx $t1, $t1(%[table]) \n\t"
"lwx $t2, $t2(%[table]) \n\t"
"lwx $t3, $t3(%[table]) \n\t"
"lwx $t4, $t4(%[table]) \n\t"
"lwx $t5, $t5(%[table]) \n\t"
"lwx $t6, $t6(%[table]) \n\t"
"lwx $t7, $t7(%[table]) \n\t"
"lwx %[s0], %[s0](%[table]) \n\t"
"lwx %[s1], %[s1](%[table]) \n\t"
"lwx %[s2], %[s2](%[table]) \n\t"
"lwx %[s3], %[s3](%[table]) \n\t"
"lwx %[s4], %[s4](%[table]) \n\t"
"lwx %[s5], %[s5](%[table]) \n\t"
"lwx %[s6], %[s6](%[table]) \n\t"
"lwx %[s7], %[s7](%[table]) \n\t"
"pref 30, 64(%[colors]) \n\t"
"sw $t0, 0(%[colors]) \n\t"
"sw $t1, 4(%[colors]) \n\t"
"sw $t2, 8(%[colors]) \n\t"
"sw $t3, 12(%[colors]) \n\t"
"sw $t4, 16(%[colors]) \n\t"
"sw $t5, 20(%[colors]) \n\t"
"sw $t6, 24(%[colors]) \n\t"
"sw $t7, 28(%[colors]) \n\t"
"sw %[s0], 32(%[colors]) \n\t"
"sw %[s1], 36(%[colors]) \n\t"
"sw %[s2], 40(%[colors]) \n\t"
"sw %[s3], 44(%[colors]) \n\t"
"sw %[s4], 48(%[colors]) \n\t"
"sw %[s5], 52(%[colors]) \n\t"
"sw %[s6], 56(%[colors]) \n\t"
"sw %[s7], 60(%[colors]) \n\t"
"addiu %[xx], %[xx], 32 \n\t"
"b 1b \n\t"
" addiu %[colors], %[colors], 64 \n\t"
"2: \n\t"
"lhu $t0, 0(%[xx]) \n\t"
"lhu $t1, 2(%[xx]) \n\t"
"lhu $t2, 4(%[xx]) \n\t"
"lhu $t3, 6(%[xx]) \n\t"
"lhu $t4, 8(%[xx]) \n\t"
"lhu $t5, 10(%[xx]) \n\t"
"lhu $t6, 12(%[xx]) \n\t"
"lhu $t7, 14(%[xx]) \n\t"
"lhu %[s0], 16(%[xx]) \n\t"
"lhu %[s1], 18(%[xx]) \n\t"
"lhu %[s2], 20(%[xx]) \n\t"
"lhu %[s3], 22(%[xx]) \n\t"
"lhu %[s4], 24(%[xx]) \n\t"
"lhu %[s5], 26(%[xx]) \n\t"
"lhu %[s6], 28(%[xx]) \n\t"
"lhu %[s7], 30(%[xx]) \n\t"
"lbux $t0, $t0(%[srcAddr]) \n\t"
"lbux $t1, $t1(%[srcAddr]) \n\t"
"lbux $t2, $t2(%[srcAddr]) \n\t"
"lbux $t3, $t3(%[srcAddr]) \n\t"
"lbux $t4, $t4(%[srcAddr]) \n\t"
"lbux $t5, $t5(%[srcAddr]) \n\t"
"lbux $t6, $t6(%[srcAddr]) \n\t"
"lbux $t7, $t7(%[srcAddr]) \n\t"
"lbux %[s0], %[s0](%[srcAddr]) \n\t"
"lbux %[s1], %[s1](%[srcAddr]) \n\t"
"lbux %[s2], %[s2](%[srcAddr]) \n\t"
"lbux %[s3], %[s3](%[srcAddr]) \n\t"
"lbux %[s4], %[s4](%[srcAddr]) \n\t"
"lbux %[s5], %[s5](%[srcAddr]) \n\t"
"lbux %[s6], %[s6](%[srcAddr]) \n\t"
"lbux %[s7], %[s7](%[srcAddr]) \n\t"
"sll $t0, $t0, 2 \n\t"
"sll $t1, $t1, 2 \n\t"
"sll $t2, $t2, 2 \n\t"
"sll $t3, $t3, 2 \n\t"
"sll $t4, $t4, 2 \n\t"
"sll $t5, $t5, 2 \n\t"
"sll $t6, $t6, 2 \n\t"
"sll $t7, $t7, 2 \n\t"
"sll %[s0], %[s0], 2 \n\t"
"sll %[s1], %[s1], 2 \n\t"
"sll %[s2], %[s2], 2 \n\t"
"sll %[s3], %[s3], 2 \n\t"
"sll %[s4], %[s4], 2 \n\t"
"sll %[s5], %[s5], 2 \n\t"
"sll %[s6], %[s6], 2 \n\t"
"sll %[s7], %[s7], 2 \n\t"
"lwx $t0, $t0(%[table]) \n\t"
"lwx $t1, $t1(%[table]) \n\t"
"lwx $t2, $t2(%[table]) \n\t"
"lwx $t3, $t3(%[table]) \n\t"
"lwx $t4, $t4(%[table]) \n\t"
"lwx $t5, $t5(%[table]) \n\t"
"lwx $t6, $t6(%[table]) \n\t"
"lwx $t7, $t7(%[table]) \n\t"
"lwx %[s0], %[s0](%[table]) \n\t"
"lwx %[s1], %[s1](%[table]) \n\t"
"lwx %[s2], %[s2](%[table]) \n\t"
"lwx %[s3], %[s3](%[table]) \n\t"
"lwx %[s4], %[s4](%[table]) \n\t"
"lwx %[s5], %[s5](%[table]) \n\t"
"lwx %[s6], %[s6](%[table]) \n\t"
"lwx %[s7], %[s7](%[table]) \n\t"
"sw $t0, 0(%[colors]) \n\t"
"sw $t1, 4(%[colors]) \n\t"
"sw $t2, 8(%[colors]) \n\t"
"sw $t3, 12(%[colors]) \n\t"
"sw $t4, 16(%[colors]) \n\t"
"sw $t5, 20(%[colors]) \n\t"
"sw $t6, 24(%[colors]) \n\t"
"sw $t7, 28(%[colors]) \n\t"
"sw %[s0], 32(%[colors]) \n\t"
"sw %[s1], 36(%[colors]) \n\t"
"sw %[s2], 40(%[colors]) \n\t"
"sw %[s3], 44(%[colors]) \n\t"
"sw %[s4], 48(%[colors]) \n\t"
"sw %[s5], 52(%[colors]) \n\t"
"sw %[s6], 56(%[colors]) \n\t"
"sw %[s7], 60(%[colors]) \n\t"
"addiu %[xx], %[xx], 32 \n\t"
"beqz %[count], 4f \n\t"
" addiu %[colors], %[colors], 64 \n\t"
"3: \n\t"
"addiu %[count], %[count], -1 \n\t"
"lhu $t0, 0(%[xx]) \n\t"
"lbux $t1, $t0(%[srcAddr]) \n\t"
"sll $t1, $t1, 2 \n\t"
"lwx $t2, $t1(%[table]) \n\t"
"sw $t2, 0(%[colors]) \n\t"
"addiu %[xx], %[xx], 2 \n\t"
"bnez %[count], 3b \n\t"
" addiu %[colors], %[colors], 4 \n\t"
"4: \n\t"
".set pop \n\t"
: [xx]"+r"(xx), [count]"+r"(count), [colors]"+r"(colors),
[s0]"=&r"(s0), [s1]"=&r"(s1), [s2]"=&r"(s2), [s3]"=&r"(s3),
[s4]"=&r"(s4), [s5]"=&r"(s5), [s6]"=&r"(s6), [s7]"=&r"(s7)
: [table]"r"(table), [srcAddr]"r"(srcAddr)
: "memory", "t0", "t1", "t2", "t3",
"t4", "t5", "t6", "t7", "t8"
);
}
}
/* If we replace a sampleproc, then we null-out the associated shaderproc,
otherwise the shader won't even look at the matrix/sampler
*/
void SkBitmapProcState::platformProcs() {
bool isOpaque = 256 == fAlphaScale;
bool justDx = false;
if (fInvType <= (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask)) {
justDx = true;
}
switch (fPixmap.colorType()) {
case kIndex_8_SkColorType:
if (justDx && kNone_SkFilterQuality == fFilterLevel) {
fSampleProc16 = SI8_D16_nofilter_DX_mips_dsp;
fShaderProc16 = NULL;
if (isOpaque) {
fSampleProc32 = SI8_opaque_D32_nofilter_DX_mips_dsp;
fShaderProc32 = NULL;
}
}
break;
default:
break;
}
}
void SkBitmapScaler::PlatformConvolutionProcs(SkConvolutionProcs*) {}
``` |
Waldstein Castle () is a ruined castle on an eminence near Franzosenhof in the Waldstein valley near the village of Fischerbach in Ortenaukreis in the south German state of Baden-Württemberg.
The hill castle was built by the lords of Waldstein, was mentioned in the records in 1353, but fell into ruins after 1500. Of the former castle site on a rock plateau of 40 by 10 metres, only a few sections of the ruined walls remain.
See also
List of castles in Baden-Württemberg
Sources
Klein, Kurt (1997). Burgen, Schlösser und Ruinen. Zeugen der Vergangenheit im Ortenaukreis. Reiff Schwarzwaldverlag. Offenburg.
External links
Waldstein Castle at burgeninventar.de
Ruined castles in Germany |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.