text
stringlengths
1
22.8M
```php <?php namespace spec\PhpSpec\Console; use PhpSpec\ObjectBehavior; use Prophecy\Argument; class ApplicationSpec extends ObjectBehavior { function let() { $this->beConstructedWith('test'); } function it_is_initializable() { $this->shouldHaveType('PhpSpec\Console\Application'); } } ```
```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 tan = require( '@stdlib/math/base/special/tan' ); var isInteger = require( '@stdlib/math/base/assert/is-integer' ); var deg2rad = require( '@stdlib/math/base/special/deg2rad' ); var isInfinite = require( '@stdlib/assert/is-infinite' ); // MAIN // /** * Computes the tangent of an angle measured in degrees. * * @param {number} x - input value (in degrees) * @returns {number} tangent * * @example * var v = tand( 0.0 ); * // returns 0.0 * * @example * var v = tand( 90.0 ); * // returns Infinity * * @example * var v = tand( 60.0 ); * // returns ~1.732 * * @example * var v = tand( NaN ); * // returns NaN */ function tand( x ) { var xRad; if ( isInfinite( x ) ) { return NaN; } if ( isInteger( ( ( x / 90.0 ) - 1.0 ) / 2.0 ) ) { return Infinity; } if ( isInteger( ( x / 90.0 ) / 2.0 ) ) { return 0.0; } xRad = deg2rad( x ); return tan( xRad ); } // EXPORTS // module.exports = tand; ```
```php <?php /** * Tests for the wp_cache_set_last_changed() function. * * @group functions * * @covers ::wp_cache_set_last_changed */ class Tests_Functions_wpCacheSetLastChanged extends WP_UnitTestCase { /** * Check the cache key last_changed is set for the specified group. * * @ticket 59737 */ public function test_wp_cache_set_last_changed() { $group = 'group_name'; $this->assertSame( wp_cache_set_last_changed( $group ), wp_cache_get( 'last_changed', $group ) ); } /** * Check the action is called. * * @ticket 59737 */ public function test_wp_cache_set_last_changed_action_is_called() { $a1 = new MockAction(); add_action( 'wp_cache_set_last_changed', array( $a1, 'action' ) ); wp_cache_set_last_changed( 'group_name' ); $this->assertSame( 1, $a1->get_call_count() ); } } ```
```javascript // @license ```
```javascript const Handlebars = require('handlebars'); Handlebars.registerHelper('eq', (value1, value2) => value1 === value2); ```
```objective-c // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_GFX_PATH_WIN_H_ #define UI_GFX_PATH_WIN_H_ #include <windows.h> #include "ui/gfx/gfx_export.h" class SkPath; class SkRegion; namespace gfx { // Creates a new HRGN given |region|. The caller is responsible for destroying // the returned region. GFX_EXPORT HRGN CreateHRGNFromSkRegion(const SkRegion& path); // Creates a new HRGN given |path|. The caller is responsible for destroying // the returned region. Returns empty region (not NULL) for empty path. GFX_EXPORT HRGN CreateHRGNFromSkPath(const SkPath& path); } // namespace gfx #endif // UI_GFX_PATH_WIN_H_ ```
```yaml hoistPattern: - '*' hoistedAliases: /accepts/1.3.7: - accepts /array-flatten/1.1.1: - array-flatten /body-parser/1.19.0: - body-parser included: dependencies: true devDependencies: true optionalDependencies: true layoutVersion: 4 packageManager: pnpm@5.1.8 pendingBuilds: [] registries: default: 'path_to_url shamefullyHoist: false skipped: [] storeDir: /home/zoli/.pnpm-store/v3 virtualStoreDir: .pnpm ```
George Ashiru is a Nigerian Taekwondo grandmaster and sports leader, political leader, and an entrepreneur. He was born to a royal household in the southwestern part of Nigeria. His father became an international diplomat, working in Brussels with the African Caribbean and Pacific (ACP) Group. His mother was a successful entrepreneur and one time president of the Nigerian-American Chamber of Commerce, Kaduna. She was a US "Visitor", having participated in the International Visitor Leadership Programme (IVLP) of the US Government. George was educated in Nigeria and Britain and studied in diverse schools like Irwin Academy (UK), Ijebu Ode Grammar School, Nigeria, Federal Government College, Kaduna, Nigeria, University of Lagos and Middlesex University (UK), and became a professional Fellow of Institute of Consulting and a Chartered Fellow of the Chartered Management Institute of the United Kingdom. He earned the qualification of Certified Management Consultant. Seven times Ashiru was Nigerian Taekwondo champion in the light and welter weight categories and won a silver medal at the 4th All Africa Games in Kenya in 1987. He has been named Best National Player, Best National Referee and then Team Manager to the Beijing 2008 Nigerian Taekwondo Olympic Team. Additionally, he became Africa's first ever 7th Degree Black belt International Master Instructor & International Referee Class A, certified by the International Taekwon-Do Federation (ITF), and 8th Degree Taekwondo, issued in Korea through Taekwondo Jidokwan Korea, named "Taekwondo Ambassador" by Taekwondo Jidokwan Society, and is listed in the World Taekwondo Federation (WTF) Hall of Fame. He is Technical Advisor and two time Inductee of the Official Taekwondo Hall of Fame and a Special Correspondent with the US Taekwondo Times magazine. In 2011 the President of the Kukkiwon awarded him the "Commendation Certificate" for promotion of Taekwondo all over the world. George Ashiru is also an International Referee by the World Taekwondo Federation as well as a graduate of the Kukkiwon Foreign Masters Training Course, 2012. He was appointed Regular Member of the Kukkiwon 2012 Seoul World Taekwondo Leaders Forum. He is also distinguished as a certified Master of Tang Soo Do by the World Tang Soo Do Association and one of the world's leading exponents of Korean Kempo. In Nigeria, he was at various times, an Executive member of the Nigeria Judo Federation, Chairman, Grading Commission of the Nigeria Taekwondo Federation, Chairman, Ogun State Taekwondo Association and a member of the Nigeria Olympic Committee, Marketing Commission. In December 2012 he was "Outstanding Achievement" Awardee of the Korean Ambassador to Nigeria and was in the same period appointed the Continental Director for Africa by the Official Taekwondo Hall of Fame. In May 2013 he was elected the 7th President of the World Taekwondo Federation member national association (MNA), the Nigeria Taekwondo Federation. In 2013 George Ashiru was elected Vice President of the Commonwealth Taekwondo Union. In 2014 he was appointed by the Honourable Minister of Sports in Nigeria as a member of the National High Performance Task Team. He is a board member of the Nigeria Olympic Committee, and vice chairman of the Technical Commission of the NOC. George Ashiru was appointed the International Technical Advisor of the Sierra Leone Taekwondo Association in 2018. In 2017 and 2021 he was International Expert for Olympic Solidarity programmes in Sierra Leone. In February 2022 he was promoted to 9th degree black belt by the World Taekwondo Jidokwan Federation, based in Seoul, Korea. George Ashiru, in addition to his exploits in sports is also highly accomplished in several other areas. He was elected the Lagos State Chairman of the African Democratic Congress Party in May 2017. In 1988 he was named "Mr Nigeria" and represented the country at the 11th Mr & Miss University Pageant in Tokyo, Japan. He was a delegate to the World Student's Festival in the UK in 1990. He was a national television presenter on Nigeria's NTA Youth Scene between 1988 and 1990. While studying at the University of Lagos, Nigeria, he founded the Ultimate Gold/Love Foundations and the University of Lagos Taekwondo Club, both of which have endured since the mid-1980s till today. In recognition of his varied achievements, Nigeria's Vanguard Newspapers named him one of the "40 Young Leaders of The Future" in 1995. In 1997 he was awarded with the prestigious "Men of Achievement Awards" at the Lagos Sheraton Hotels. In 1998, the Comet Newspapers also named him "Leader of the Future". He also produced a television programme for DBN Television in Lagos and was a regular columnist for several magazines, since the then popular but now defunct Classique Magazine, back in the late 80s. In 1997 he led a delegation of business men members of the Nigerian American Chamber of Commerce (Kaduna) to the World Trade Expo, in Detroit, USA. Later that same year, he organised, with the same Chamber, the National Seminar, "Nigeria Can Compete". George is an ordained Minister of the Gospel, with his own Transformation Ministries. In 2003, the Federal Government co-opted him as an official Chaplain for the COJA 2003 All Africa Games in Abuja. He also coordinates the NGO, Town Hall Meetings Project (THMP). He also runs his own IATA Accredited travel business and is an official representative of the London School of Business and Finance (LSBF) in Nigeria. He was, at one time the Vice Chairman of the Tourism Group of the Nigerian American Chamber of Commerce, Lagos. One of George's keen activities is mentoring emerging leaders and giving inspirational talks, to youths, government personnel and the general citizenry, on personal development, entrepreneurship, and nation building. He is also a member of several national prayer intercession groups. References http://www.guardiannewsngr.com/index.php?option=com_content&view=article&id=109173:taekwondo-hall-of-fame-appoints-nigerias-ashiru-as-continental-director-&catid=59:home&Itemid=620 http://aitnews.com.ng/s/2013/05/15/sports-fed-election/ External links George Ashiru profile Living people Year of birth missing (living people) Nigerian male taekwondo practitioners Alumni of Middlesex University University of Lagos alumni Ijebu Ode Grammar School alumni African Games silver medalists for Nigeria African Games medalists in taekwondo Competitors at the 1987 All-Africa Games
Spiritual drunkenness refers to a phenomenon seen in some Christian denominations, particularly those associated with Pentecostalism and the Charismatic Movement, in which individuals who are said to be experiencing intense momentary visitations of—or even possession by—the Holy Spirit exhibit a range of behaviors resembling signs of moderate to severe alcoholic inebriation, including unsteadiness, uncontrollable laughter, silly expressions or gestures, verbal or nonverbal shouting (not typically in the form of glossolalia), sudden intense fatigue, and temporary unconsciousness. The phenomenon typically occurs during Pentecostal and charismatic church services, usually at the prompting of a preacher or pastor, and most often involving multiple members of a congregation at a time, generally after having been "transferred" from one person to another via respiratory blowing or laying on of hands. It also can occur at more intimate settings including housegroups and fellowship meetings of believers, wherever the Holy Spirit is free to move and have His way. The experiences are meant to bring people into a deeper encounter of God's love, power, presence and joy. The result should be a positive one, leading one to a more holy and joyous life. The concept of spiritual drunkenness is controversial among non-Pentecostal denominations. Opponents cite a lack of explicit biblical description of anything resembling spiritual drunkenness, and some posit that the behaviors may even be the product of demonic influence. The Bible however does liken being filled with the Holy Spirit to wine, “And be not drunk with wine, wherein is excess; but be filled with the Spirit." Ephesians 5:18 Acts 2:1-15 says 'When the day of Pentecost came, they were all together in one place. Suddenly a sound like a mighty rushing wind came from heaven and filled the whole house where they were sitting. They saw tongues like flames of fire that separated and came to rest on each of them. And they were all filled with the Holy Spirit and began to speak in other tongues as the Spirit enabled them. Now there were dwelling in Jerusalem God-fearing Jews from every nation under heaven. And when this sound rang out, a crowd came together in bewilderment, because each one heard them speaking his own language. Astounded and amazed, they asked, “Are not all these men who are speaking Galileans? How is it then that each of us hears them in his own native language? Parthians, Medes, and Elamites; residents of Mesopotamia, Judea and Cappadocia, Pontus and Asia, Phrygia and Pamphylia, Egypt and the parts of Libya near Cyrene; visitors from Rome, both Jews and converts to Judaism; Cretans and Arabs—we hear them declaring the wonders of God in our own tongues!” Astounded and perplexed, they asked one another, “What does this mean?” But others mocked them and said, “They are drunk on new wine!” Then Peter stood up with the Eleven, lifted up his voice, and addressed the crowd: “Men of Judea and all who dwell in Jerusalem, let this be known to you, and listen carefully to my words. These men are not drunk, as you suppose. It is only the third hour of the day!' Those who have been 'drunk in the Holy Spirit' describe themselves as being overcome by God's presence and His love with the ability to speak in other tongues powerfully. Some report feeling like they have a new confidence and desire to preach to anyone about Jesus without any fear. The Holy Spirit's presence liberates them. This is because 'where the Spirit of the Lord is there is freedom' 2 Corinthians 3:17. The Holy Spirit has encountered them in a very powerful way. Many who get drunk in the Holy Spirit describe their relationship with Him becoming deeper and more fulfilling. See also Slain in the Spirit Glossolalia Pentecostalism References Charismatic and Pentecostal worship
The Oulunsalo Church is an evangelical Lutheran church in the Finnish city of Oulu. It was part of the town of Oulunsalo until 2013 when that town was merged into Oulu. The wooden church building has been designed in Gothic Revival style by architect Julius Basilier. It was built between 1888 and 1891. The former Oulunsalo church was destroyed in a fire caused by lightning in the summer 1882. References External links Lutheran churches in Oulu Churches completed in 1891 Wooden churches in Finland
The 1949 European Wrestling Championships was held from 3 to 5 June 1949 in Istanbul, Turkey. In the championship where only men's freestyle competitions were held, Turkey ranked first in the team rankings. Individually, Turkey ranked first with 6 gold medals and one silver and bronze medal each, followed by Sweden with two gold and bronze medals each and 3 silver medals, and Iran with 4 silver and 1 bronze medal. Medal table Medal summary Men's freestyle References External links FILA Database 1949 in sport wrestling European Wrestling Championships International wrestling competitions hosted by Turkey Sports competitions in Istanbul European Wrestling Championships Wrestling
Asperula involucrata is a species of flowering plant in the family Rubiaceae. Description Asperula involucrata is endemic to Bulgaria and Turkey. References involucrata Taxa named by Göran Wahlenberg
```javascript 'use strict'; var util = require('util'), Match = require ('../match'); /** * This class matches UTF-16 and UTF-32, both big- and little-endian. The * BOM will be used if it is present. */ module.exports.UTF_16BE = function() { this.name = function() { return 'UTF-16BE'; }; this.match = function(det) { var input = det.fRawInput; if (input.length >= 2 && ((input[0] & 0xff) == 0xfe && (input[1] & 0xff) == 0xff)) { return new Match(det, this, 100); // confidence = 100 } // TODO: Do some statistics to check for unsigned UTF-16BE return null; }; }; module.exports.UTF_16LE = function() { this.name = function() { return 'UTF-16LE'; }; this.match = function(det) { var input = det.fRawInput; if (input.length >= 2 && ((input[0] & 0xff) == 0xff && (input[1] & 0xff) == 0xfe)) { // LE BOM is present. if (input.length >= 4 && input[2] == 0x00 && input[3] == 0x00) { // It is probably UTF-32 LE, not UTF-16 return null; } return new Match(det, this, 100); // confidence = 100 } // TODO: Do some statistics to check for unsigned UTF-16LE return null; } }; function UTF_32() {}; UTF_32.prototype.match = function(det) { var input = det.fRawInput, limit = (det.fRawLength / 4) * 4, numValid = 0, numInvalid = 0, hasBOM = false, confidence = 0; if (limit == 0) { return null; } if (this.getChar(input, 0) == 0x0000FEFF) { hasBOM = true; } for (var i = 0; i < limit; i += 4) { var ch = this.getChar(input, i); if (ch < 0 || ch >= 0x10FFFF || (ch >= 0xD800 && ch <= 0xDFFF)) { numInvalid += 1; } else { numValid += 1; } } // Cook up some sort of confidence score, based on presence of a BOM // and the existence of valid and/or invalid multi-byte sequences. if (hasBOM && numInvalid == 0) { confidence = 100; } else if (hasBOM && numValid > numInvalid * 10) { confidence = 80; } else if (numValid > 3 && numInvalid == 0) { confidence = 100; } else if (numValid > 0 && numInvalid == 0) { confidence = 80; } else if (numValid > numInvalid * 10) { // Probably corrupt UTF-32BE data. Valid sequences aren't likely by chance. confidence = 25; } // return confidence == 0 ? null : new CharsetMatch(det, this, confidence); return confidence == 0 ? null : new Match(det, this, confidence); }; module.exports.UTF_32BE = function() { this.name = function() { return 'UTF-32BE'; }; this.getChar = function(input, index) { return (input[index + 0] & 0xff) << 24 | (input[index + 1] & 0xff) << 16 | (input[index + 2] & 0xff) << 8 | (input[index + 3] & 0xff); }; }; util.inherits(module.exports.UTF_32BE, UTF_32); module.exports.UTF_32LE = function() { this.name = function() { return 'UTF-32LE'; }; this.getChar = function(input, index) { return (input[index + 3] & 0xff) << 24 | (input[index + 2] & 0xff) << 16 | (input[index + 1] & 0xff) << 8 | (input[index + 0] & 0xff); }; }; util.inherits(module.exports.UTF_32LE, UTF_32); ```
The Harvard Negotiation Project is a project created at Harvard University which deals with issues of negotiations and conflict resolution. The stated aims and goal of the project, according to the Harvard Law School site is as follows: The director of the project as of 2008 is Professor James Sebenius. The program was initiated in 1979, at the time of the commencement of activities the joint heads of the project were William Ury and Roger Fisher. The project published a text titled Getting to Yes in 1981. Getting It DONE: How to Lead When You're Not in Charge was published in 1998, Difficult Conversations: How to Discuss What Matters Most in 1999, and Beyond Reason: Using Emotions as you Negotiate was published in 2006. The project at some time identified four crucial factors for negotiation: people, interests, options and criteria (otherwise known as boundary conditions). The activities of the project include: theory building, education and training, publications and a conflict clinic. See also Program on Negotiation Roger Fisher Vicente Blanco Gaspar References External links Klaus Winkler - Negotiations with Asymmetrical Distribution of Power: Conclusions from Dispute Resolution in Network Industries published by Springer Science & Business Media, 12 Oct 2006 Legal organizations based in the United States
```markdown # Working with Streaming Data Learning Objectives 1. Learn how to process real-time data for ML models using Cloud Dataflow 2. Learn how to serve online predictions using real-time data ## Introduction It can be useful to leverage real time data in a machine learning model when making a prediction. However, doing so requires setting up a streaming data pipeline which can be non-trivial. Typically you will have the following: - A series of IoT devices generating and sending data from the field in real-time (in our case these are the taxis) - A messaging bus to that receives and temporarily stores the IoT data (in our case this is Cloud Pub/Sub) - A streaming processing service that subscribes to the messaging bus, windows the messages and performs data transformations on each window (in our case this is Cloud Dataflow) - A persistent store to keep the processed data (in our case this is BigQuery) These steps happen continuously and in real-time, and are illustrated by the blue arrows in the diagram below. Once this streaming data pipeline is established, we need to modify our model serving to leverage it. This simply means adding a call to the persistent store (BigQuery) to fetch the latest real-time data when a prediction request comes in. This flow is illustrated by the red arrows in the diagram below. <img src='../assets/taxi_streaming_data.png' width='80%'> In this lab we will address how to process real-time data for machine learning models. We will use the same data as our previous 'taxifare' labs, but with the addition of `trips_last_5min` data as an additional feature. This is our proxy for real-time traffic. ``` ```python !sudo chown -R jupyter:jupyter /home/jupyter/training-data-analyst ``` ```python import os import googleapiclient.discovery import shutil from google.cloud import bigquery from google.api_core.client_options import ClientOptions from matplotlib import pyplot as plt import numpy as np import tensorflow as tf from tensorflow import keras from tensorflow.keras.callbacks import TensorBoard from tensorflow.keras.layers import Dense, DenseFeatures from tensorflow.keras.models import Sequential print(tf.__version__) ``` ```python PROJECT = 'cloud-training-demos' # REPLACE WITH YOUR PROJECT ID BUCKET = 'cloud-training-demos' # REPLACE WITH YOUR BUCKET NAME REGION = 'us-central1' # REPLACE WITH YOUR BUCKET REGION e.g. us-central1 ``` ```python # For Bash Code os.environ['PROJECT'] = PROJECT os.environ['BUCKET'] = BUCKET os.environ['REGION'] = REGION ``` ```markdown ## Re-train our model with `trips_last_5min` feature In this lab, we want to show how to process real-time data for training and prediction. So, we need to retrain our previous model with this additional feature. Go through the notebook `training-data-analyst/courses/machine_learning/deepdive2/building_production_ml_systems/solutions/4a_streaming_data_training.ipynb`. Open and run the notebook to train and save a model. This notebook is very similar to what we did in the Introduction to Tensorflow module but note the added feature for `trips_last_5min` in the model and the dataset.``` ```markdown ## Simulate Real Time Taxi Data Since we dont actually have real-time taxi data we will synthesize it using a simple python script. The script publishes events to Google Cloud Pub/Sub. Inspect the `iot_devices.py` script in the `taxicab_traffic` folder. It is configured to send about 2,000 trip messages every five minutes with some randomness in the frequency to mimic traffic fluctuations. These numbers come from looking at the historical average of taxi ride frequency in BigQuery. In production this script would be replaced with actual taxis with IoT devices sending trip data to Cloud Pub/Sub. To execute the `iot_devices.py` script, launch a terminal and navigate to the `training-data-analyst/courses/machine_learning/deepdive2/building_production_ml_systems/solutions` directory. Then run the following two commands.``` ```markdown ```bash PROJECT_ID=$(gcloud config list project --format "value(core.project)") python3 ./taxicab_traffic/iot_devices.py --project=$PROJECT_ID `````` ```markdown You will see new messages being published every 5 seconds. **Keep this terminal open** so it continues to publish events to the Pub/Sub topic. If you open [Pub/Sub in your Google Cloud Console](path_to_url you should be able to see a topic called `taxi_rides`.``` ```markdown ## Create a BigQuery table to collect the processed data In the next section, we will create a dataflow pipeline to write processed taxifare data to a BigQuery Table, however that table does not yet exist. Execute the following commands to create a BigQuery dataset called `taxifare` and a table within that dataset called `traffic_realtime`. ``` ```python bq = bigquery.Client() dataset = bigquery.Dataset(bq.dataset("taxifare")) try: bq.create_dataset(dataset) # will fail if dataset already exists print("Dataset created.") except: print("Dataset already exists.") ``` ```markdown Next, we create a table called `traffic_realtime` and set up the schema.``` ```python dataset = bigquery.Dataset(bq.dataset("taxifare")) table_ref = dataset.table("traffic_realtime") SCHEMA = [ bigquery.SchemaField("trips_last_5min", "INTEGER", mode="REQUIRED"), bigquery.SchemaField("time", "TIMESTAMP", mode="REQUIRED"), ] table = bigquery.Table(table_ref, schema=SCHEMA) try: bq.create_table(table) print("Table created.") except: print("Table already exists.") ``` ```markdown ## Launch Streaming Dataflow Pipeline Now that we have our taxi data being pushed to Pub/Sub, and our BigQuery table set up, lets consume the Pub/Sub data using a streaming DataFlow pipeline. The pipeline is defined in `./taxicab_traffic/streaming_count.py`. Open that file and inspect it. There are 5 transformations being applied: - Read from PubSub - Window the messages - Count number of messages in the window - Format the count for BigQuery - Write results to BigQuery **TODO:** Open the file ./taxicab_traffic/streaming_count.py and find the TODO there. Specify a sliding window that is 5 minutes long, and gets recalculated every 15 seconds. Hint: Reference the [beam programming guide](path_to_url#windowing) for guidance. To check your answer reference the solution. For the second transform, we specify a sliding window that is 5 minutes long, and recalculate values every 15 seconds. In a new terminal, launch the dataflow pipeline using the command below. You can change the `BUCKET` variable, if necessary. Here it is assumed to be your `PROJECT_ID`.``` ```markdown ```bash PROJECT_ID=$(gcloud config list project --format "value(core.project)") BUCKET=$PROJECT_ID # CHANGE AS NECESSARY python3 ./taxicab_traffic/streaming_count.py \ --input_topic taxi_rides \ --runner=DataflowRunner \ --project=$PROJECT_ID \ --temp_location=gs://$BUCKET/dataflow_streaming `````` ```markdown Once you've submitted the command above you can examine the progress of that job in the [Dataflow section of Cloud console](path_to_url ``` ```markdown ## Explore the data in the table``` ```markdown After a few moments, you should also see new data written to your BigQuery table as well. Re-run the query periodically to observe new data streaming in! You should see a new row every 15 seconds. ``` ```python %load_ext google.cloud.bigquery ``` ```python %%bigquery SELECT * FROM `taxifare.traffic_realtime` ORDER BY time DESC LIMIT 10 ``` ```markdown ## Make predictions from the new data In the rest of the lab, we'll referece the model we trained and deployed from the previous labs, so make sure you have run the code in the `4a_streaming_data_training.ipynb` notebook. The `add_traffic_last_5min` function below will query the `traffic_realtime` table to find the most recent traffic information and add that feature to our instance for prediction.``` ```python # TODO 2a. Write a function to take most recent entry in `traffic_realtime` table and add it to instance. def add_traffic_last_5min(instance): bq = bigquery.Client() query_string = """ SELECT * FROM `taxifare.traffic_realtime` ORDER BY time DESC LIMIT 1 """ trips = bq.query(query_string).to_dataframe()['trips_last_5min'][0] instance['traffic_last_5min'] = int(trips) return instance ``` ```markdown The `traffic_realtime` table is updated in realtime using Cloud Pub/Sub and Dataflow so, if you run the cell below periodically, you should see the `traffic_last_5min` feature added to the instance and change over time. ``` ```python add_traffic_last_5min(instance={'dayofweek': 4, 'hourofday': 13, 'pickup_longitude': -73.99, 'pickup_latitude': 40.758, 'dropoff_latitude': 41.742, 'dropoff_longitude': -73.07}) ``` ```markdown Finally, we'll use the python api to call predictions on an instance, using the realtime traffic information in our prediction. Just as above, you should notice that our resulting predicitons change with time as our realtime traffic information changes as well.``` ```python # TODO 2b. Write code to call prediction on instance using realtime traffic info. #Hint: Look at the "Serving online predictions" section of this page path_to_urlMODEL_NAME = 'taxifare' VERSION_NAME = 'traffic' endpoint = f'https://{REGION}-ml.googleapis.com' client_options = ClientOptions(api_endpoint=endpoint) service = googleapiclient.discovery.build('ml', 'v1', cache_discovery=False, client_options=client_options) name = 'projects/{}/models/{}/versions/{}'.format(PROJECT, MODEL_NAME, VERSION_NAME) instance = add_traffic_last_5min({'dayofweek': 4, 'hourofday': 13, 'pickup_longitude': -73.99, 'pickup_latitude': 40.758, 'dropoff_latitude': 41.742, 'dropoff_longitude': -73.07}) response = service.projects().predict( name=name, body={'instances': [instance]} ).execute() if 'error' in response: raise RuntimeError(response['error']) else: print(response['predictions'][0][0]) ``` ```markdown ```
Kanose Dam () is a dam in the Niigata Prefecture, Japan, completed in 1928. References Dams in Niigata Prefecture Dams completed in 1928 1928 establishments in Japan
Jean-Marie Trappeniers (13 January 1942 – 2 November 2016) was a Belgian football goalkeeper. He played for R.S.C. Anderlecht and Belgium. In 1964, during a match Belgium-Netherlands, Trappeniers replaced Delhasse on the pitch to join 10 fellows from Anderlecht playing under the national team kit. Later in his career, he also played for Union Saint-Gilloise, Royal Antwerp F.C. and Eendracht Aalst. Trappeniers died on 2 November 2016. Honours Player RSC Anderlecht Belgian First Division: 1961–62, 1963–64, 1964–65, 1965–66, 1966–67, 1967–68 Belgian Cup: 1964–65 Inter-Cities Fairs Cup runners-up: 1969–70 References External links 1942 births 2016 deaths Belgian men's footballers Belgium men's international footballers R.S.C. Anderlecht players 1970 FIFA World Cup players Belgian Pro League players Men's association football goalkeepers People from Vilvoorde Footballers from Flemish Brabant
```java package com.xiecc.seeWeather.modules.main.adapter; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Color; import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import butterknife.BindView; import com.bumptech.glide.Glide; import com.bumptech.glide.request.animation.GlideAnimation; import com.bumptech.glide.request.target.SimpleTarget; import com.xiecc.seeWeather.R; import com.xiecc.seeWeather.base.BaseViewHolder; import com.xiecc.seeWeather.component.PLog; import com.xiecc.seeWeather.common.utils.SharedPreferenceUtil; import com.xiecc.seeWeather.common.utils.Util; import com.xiecc.seeWeather.modules.main.domain.Weather; import java.util.List; public class MultiCityAdapter extends RecyclerView.Adapter<MultiCityAdapter.MultiCityViewHolder> { private Context mContext; private List<Weather> mWeatherList; private onMultiCityClick mMultiCityClick; public void setMultiCityClick(onMultiCityClick multiCityClick) { this.mMultiCityClick = multiCityClick; } public MultiCityAdapter(List<Weather> weatherList) { mWeatherList = weatherList; } @Override public MultiCityViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { mContext = parent.getContext(); return new MultiCityViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_multi_city, parent, false)); } @Override public void onBindViewHolder(MultiCityViewHolder holder, int position) { holder.bind(mWeatherList.get(position)); holder.itemView.setOnLongClickListener(v -> { mMultiCityClick.longClick(mWeatherList.get(holder.getAdapterPosition()).basic.city); return true; }); holder.itemView.setOnClickListener(v -> mMultiCityClick.click(mWeatherList.get(holder.getAdapterPosition()))); } @Override public int getItemCount() { return mWeatherList.size(); } public boolean isEmpty() { return 0 == mWeatherList.size(); } class MultiCityViewHolder extends BaseViewHolder<Weather> { @BindView(R.id.dialog_city) TextView mDialogCity; @BindView(R.id.dialog_icon) ImageView mDialogIcon; @BindView(R.id.dialog_temp) TextView mDialogTemp; @BindView(R.id.cardView) CardView mCardView; public MultiCityViewHolder(View itemView) { super(itemView); } @Override protected void bind(Weather weather) { try { mDialogCity.setText(Util.safeText(weather.basic.city)); mDialogTemp.setText(String.format("%s", weather.now.tmp)); } catch (NullPointerException e) { PLog.e(e.getMessage()); } Glide.with(mContext) .load(SharedPreferenceUtil.getInstance().getInt(weather.now.cond.txt, R.mipmap.none)) .asBitmap() .into(new SimpleTarget<Bitmap>() { @Override public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) { mDialogIcon.setImageBitmap(resource); mDialogIcon.setColorFilter(Color.WHITE); } }); int code = Integer.valueOf(weather.now.cond.code); new CardCityHelper().applyStatus(code, weather.basic.city, mCardView); } } public interface onMultiCityClick { void longClick(String city); void click(Weather weather); } } ```
Tenente Silvio Scaroni (12 May 1893 – 16 February 1977) was an Italian World War I fighter pilot credited with 26 victories. He was the second ranking Italian ace of the war. Early service Silvio Scaroni joined the 2nd Field Artillery Regiment of the Italian Army as a corporal. He was serving with that unit when World War I avalanched through the rest of Europe. On 2 August 1914, Italy announced its neutrality as sides formed up for the conflict. Aerial reconnaissance service Scaroni transferred to the Corpo Aeronautico Militare in March 1915. He began training to fly Bleriots and Caudrons shortly before Italy entered the war on the side of the Triple Entente on 26 April 1915. In September 1915, Scaroni was assigned as a reconnaissance pilot with Squadriglia 4a. In January 1917, he was promoted to first lieutenant and assigned to Squadriglia 43a. Subsequently, he was reassigned to Squadriglia 86a, then to Squadriglia 76a as a fighter pilot. Service as a fighter pilot On 3 November 1917, Scaroni filed his first claim for an aerial victory, but it went unconfirmed and uncredited. On 14 November, Scaroni scored his first official victory, while flying a Nieuport 17. By 19 December, he had scored six victories, and his squadron phased out the Nieuports. For the remainder of his victories, Scaroni would fly a Hanriot HD.1. His 25 victories would make him second only to Belgium's Willy Coppens for success with this type of airplane. His success with the Hanriot began only four days later, as he scored victory number two on the 18th. A win the following day, and one each on 5 and 10 December made him an ace in less than a month. He scored once more on 19 December. Then, the day after Christmas, he was the leading gun in one of the most lopsided aerial battles in World War I. As he himself described it in a magazine article he penned for Nel Cielo, his airfield was attacked by ten enemy bombers. He shot down one of the bombers in flames at 9 AM. He then dueled with another for twenty minutes before it crashed. The observer leapt from the wreckage and lit it on fire to deny its capture. Unfortunately, the observer managed to catch his own clothing on fire in the process. Still more unfortunately, the pilot was still pinned under the debris and burned to death. Meanwhile, Scaroni's squadron-mates shot down six more of the raiders. Scaroni capped off the day by downing another, even larger, bomber at 12:35. He thus ended the year with nine wins. He accumulated another ten victories by 16 June 1918. On that day, or the next, he doubled his firepower by installing a second machine gun on his plane. He scored four more times in June, including a double on the 25 July saw him with two confirmed victories and two unconfirmed on the 7th, and a confirmed and an unconfirmed on the 12th. He was wounded the following day, and saw no further combat in the war. Later life Scaroni attended the Schneider Trophy air races in November, 1926 as part of his duties as Italy's Air Attache to the United States. The race was held just outside Washington, D.C., in the Chesapeake Bay. Italy had a racing team entered; they had come with such expectation of victory that they had smuggled celebratory Chianti in their seaplane floats in violation of America's Prohibition. When they had engine problems, Scaroni suggested switching American spark plugs and gasoline into the Italian planes. That solved their engine woes. Italy sent a military mission to aid the Nationalist Chinese government in 1933. Circa 1934, as part of this mission to China, Colonel Scaroni established a flying school for the Chinese Air Force at Loyang. Its policy was to graduate every pupil. This was done to ingratiate the Italians to the ruling class parents of the flying cadets, and to undercut the popularity of a previously established flying school at Hangchow, which was staffed and run by Americans to stricter United States Army Air Corps standards. The mission would remain in China until 1936. Scaroni would serve there through 1937. The Italian mission also set up an aircraft manufactory to produce Fiat fighters and Savoia-Marchetti bombers under license. During World War II, Scaroni commanded the Italian air forces in Sicily. Writings by Scaroni Scaroni published his memoirs as Impressions and Memories of Aerial Warfare, as noted below. Impressioni e ricordi di guerra aerea. Silvio Scaroni. Danesi, 1922. Battaglie nel cielo; con 30 illustrazioni e una carta fuori testo.: con 30 illustrazioni e una carta fuori testo. Silvio Scaroni. A. Mondadori, 1934. Con Vittorio Emanuele III. Silvio Scaroni, King of Italy Victor Emmanuel, Victor Emmanuel. A. Mondadori, 1954. Missione militare aeronautica in Cina. Silvio Scaroni. Ufficio Storico Aeronautica Militare, 1970. Inline citations References Nieuport Aces of World War 1. Norman Franks. Osprey Publishing, 2000. , . Heroes of Aviation. Laurence La Tourette Driggs. Little, Brown, and Co, 1918. Original from the University of California. Digitized Nov 28, 2007. The Schneider Trophy Story. Edward Eves, L. F. E. Coombs. Motorbooks Intl, 2001. , . The Effectiveness of Airpower in the 20th Century: Part One (1914–1939). John F. O'Connell. iUniverse, Incorporated, 2007. , . China in the Anti-Japanese War, 1937–1945: Politics, Culture and Society. David P. Barrett, Lawrence N. Shyu, Larry N. Shyu. Peter Lang, 2001. Original from the University of Michigan. Digitized Sep 9, 2008. , . Wings of Valor, Wings of Gold. Amy Waters Yarsinske, Flying Machines Press, 1998. , . Italian Air Force personnel Recipients of the Gold Medal of Military Valor Recipients of the Silver Medal of Military Valor Italian World War I flying aces Reconnaissance pilots People from Brescia 1977 deaths 1893 births
```java /* * one or more contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright ownership. */ package io.camunda.optimize.service.security; import static io.camunda.optimize.service.util.importing.EngineConstants.USER_VALIDATION_ENDPOINT; import io.camunda.optimize.dto.engine.AuthenticationResultDto; import io.camunda.optimize.dto.optimize.query.security.CredentialsRequestDto; import io.camunda.optimize.rest.engine.EngineContext; import io.camunda.optimize.service.exceptions.OptimizeRuntimeException; import io.camunda.optimize.service.util.configuration.ConfigurationService; import jakarta.ws.rs.ProcessingException; import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @RequiredArgsConstructor @Component @Slf4j public class EngineAuthenticationProvider { public static final String INVALID_CREDENTIALS_ERROR_MESSAGE = "The provided credentials are invalid. Please check your username and password."; private static final String CONNECTION_WAS_REFUSED_ERROR = "Connection to engine was refused! Please check if the engine is still running."; private final ConfigurationService configurationService; public AuthenticationResultDto performAuthenticationCheck( CredentialsRequestDto credentialsRequestDto, EngineContext engineContext) { try { final Response response = engineContext .getEngineClient() .target( configurationService.getEngineRestApiEndpointOfCustomEngine( engineContext.getEngineAlias())) .path(USER_VALIDATION_ENDPOINT) .request(MediaType.APPLICATION_JSON) .post(Entity.json(credentialsRequestDto)); if (responseIsSuccessful(response)) { AuthenticationResultDto authResult = response.readEntity(AuthenticationResultDto.class); authResult.setEngineAlias(engineContext.getEngineAlias()); if (!authResult.isAuthenticated()) { authResult.setErrorMessage(INVALID_CREDENTIALS_ERROR_MESSAGE); } return authResult; } else { log.error( "Could not validate user [{}] against the engine [{}]. " + "Maybe you did not provide a user or password or the user is locked", credentialsRequestDto.getUsername(), engineContext.getEngineAlias()); // read Exception from the engine response // and rethrow it to forward the error message to the client // e.g when the user is locked, the error message will contain corresponding information Exception runtimeException = response.readEntity(RuntimeException.class); return getAuthenticationResultFromError( credentialsRequestDto, engineContext, runtimeException); } } catch (ProcessingException | OptimizeRuntimeException e) { String errorMessage = String.format( "Could not authenticated against engine [%s]. " + CONNECTION_WAS_REFUSED_ERROR, engineContext.getEngineAlias()); OptimizeRuntimeException optimizeEx = new OptimizeRuntimeException(errorMessage, e); return getAuthenticationResultFromError(credentialsRequestDto, engineContext, optimizeEx); } } private AuthenticationResultDto getAuthenticationResultFromError( final CredentialsRequestDto credentialsRequestDto, final EngineContext engineContext, final Exception exception) { return AuthenticationResultDto.builder() .isAuthenticated(false) .authenticatedUser(credentialsRequestDto.getUsername()) .engineAlias(engineContext.getEngineAlias()) .errorMessage(exception.getMessage()) .build(); } private boolean responseIsSuccessful(Response response) { return response.getStatus() < 300; } } ```
```xml <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.NestedScrollView xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:overScrollMode="never"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:descendantFocusability="beforeDescendants" android:focusable="true" android:focusableInTouchMode="true" android:orientation="vertical" android:paddingTop="@dimen/video_details_margin_top" android:visibility="visible"> <TextView android:id="@+id/tv_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/card_title_margin" android:layout_marginStart="@dimen/card_title_margin" android:lineSpacingExtra="2dp" android:textColor="@color/font_normal" android:textSize="@dimen/default_medium_text_size" /> <Space android:layout_width="match_parent" android:layout_height="@dimen/default_small_padding" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:orientation="horizontal" android:paddingEnd="@dimen/default_general_margin" android:paddingStart="@dimen/default_general_margin"> <ImageView android:layout_width="@dimen/video_info_mini_icons_size" android:layout_height="@dimen/video_info_mini_icons_size" android:src="@drawable/ic_info_views" android:tint="@color/black_alpha_45" /> <TextView android:id="@+id/tv_play_time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/video_info_count_text_margin_start" android:textColor="@color/black_alpha_45" android:textSize="@dimen/default_tiny_text_size" /> <Space android:layout_width="@dimen/activity_vertical_margin" android:layout_height="match_parent" /> <ImageView android:layout_width="@dimen/video_info_mini_icons_size" android:layout_height="@dimen/video_info_mini_icons_size" android:src="@drawable/ic_info_danmakus" android:tint="@color/black_alpha_45" /> <TextView android:id="@+id/tv_review_count" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/video_info_count_text_margin_start" android:textColor="@color/black_alpha_45" android:textSize="@dimen/default_tiny_text_size" /> </LinearLayout> <Space android:layout_width="match_parent" android:layout_height="8dp" /> <TextView android:id="@+id/tv_description" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingEnd="@dimen/default_general_margin" android:paddingStart="@dimen/default_general_margin" android:textAppearance="@style/TextAppearance.AppCompat.Body2" android:textColor="@color/black_alpha_45" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingBottom="@dimen/default_general_margin" android:paddingEnd="@dimen/default_tiny_margin" android:paddingStart="@dimen/default_tiny_margin" android:paddingTop="@dimen/default_general_margin"> <LinearLayout android:id="@+id/btn_share" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <TextView android:id="@+id/share_num" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/default_tiny_padding" android:textColor="@color/green_300" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/daily_video_action_bg" android:clickable="false" android:src="@drawable/ic_share_green" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/default_tiny_padding" android:text="@string/about_menu_action_share" android:textColor="@color/font_normal" android:textSize="@dimen/default_tiny_text_size" /> </LinearLayout> <LinearLayout android:id="@+id/btn_coin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <TextView android:id="@+id/coin_num" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/default_tiny_padding" android:textColor="@color/orange_500" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/daily_video_action_bg" android:src="@drawable/ic_coin" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/default_tiny_padding" android:text="@string/coin" android:textColor="@color/font_normal" android:textSize="@dimen/default_tiny_text_size" /> </LinearLayout> <LinearLayout android:id="@+id/btn_fav" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <TextView android:id="@+id/fav_num" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/default_tiny_padding" android:textColor="@color/pink_text_color" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/daily_video_action_bg" android:src="@drawable/ic_collect" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/default_tiny_padding" android:text="@string/collection" android:textColor="@color/font_normal" android:textSize="@dimen/default_tiny_text_size" /> </LinearLayout> <LinearLayout android:id="@+id/btn_download" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/default_tiny_padding" android:textColor="@color/colorPrimary" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/daily_video_action_bg" android:src="@drawable/ic_download" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/default_tiny_padding" android:text="@string/cache" android:textColor="@color/font_normal" android:textSize="@dimen/default_tiny_text_size" /> </LinearLayout> </LinearLayout> <View android:layout_width="match_parent" android:layout_height="@dimen/line_height" android:background="@color/gray_light" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="@dimen/default_general_margin"> <com.hotbitmapgg.bilibili.widget.UserTagView android:id="@+id/author_tag" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentStart="true" android:layout_centerInParent="true" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_centerInParent="true" android:background="@drawable/btn_pin_bg" android:gravity="center" android:text="@string/add_follow" android:textColor="@color/focus_text_color" /> </RelativeLayout> <View android:layout_width="match_parent" android:layout_height="@dimen/line_height" android:background="@color/gray_light" /> <include layout="@layout/layout_user_chase_bangumi_head" /> <View android:layout_width="match_parent" android:layout_height="@dimen/line_height" android:background="@color/gray_light" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/default_general_margin" android:text="@string/about_tag" android:textColor="@color/font_normal" android:textSize="@dimen/default_small_text_size" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:padding="@dimen/default_general_margin" android:text="@string/tag_edit" android:textColor="@color/black_alpha_45" android:textSize="@dimen/default_tiny_text_size" /> </RelativeLayout> <com.zhy.view.flowlayout.TagFlowLayout android:id="@+id/tags_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/default_tiny_padding" android:layout_marginStart="@dimen/default_tiny_padding" app:max_select="-1" /> <View android:layout_width="match_parent" android:layout_height="@dimen/line_height" android:background="@color/gray_light" /> <RelativeLayout android:id="@+id/layout_video_related" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/default_general_margin" android:text="@string/video_about" android:textColor="@color/font_normal" android:textSize="@dimen/default_small_text_size" /> </RelativeLayout> <android.support.v7.widget.RecyclerView android:id="@+id/recycle" android:layout_width="match_parent" android:layout_height="wrap_content" android:clipToPadding="false" android:overScrollMode="never" android:scrollbars="none" /> </LinearLayout> </android.support.v4.widget.NestedScrollView> ```
Liu Zhiming (; 8 February 1989 – 25 February 2020) was a sprint runner from the People's Republic of China. He ran in the T44 class. In the 2012 Paralympic Games, he won a silver medal as part of the Chinese 4 × 100 m relay team. References 1989 births 2020 deaths Paralympic athletes for China Athletes (track and field) at the 2012 Summer Paralympics Chinese male sprinters Medalists at the 2012 Summer Paralympics Paralympic silver medalists for China Paralympic medalists in athletics (track and field)
```yaml zh-hans: locale_name: nav: about: contribute: index: lead: opensourcefriday: article: table_of_contents: back_to_all_guides: related_guides: footer: contribute: heading: description: button: subscribe: heading: description: GitHub label: button: byline: # [code], [love], and [github] will be replaced by octicons format: " [github] [friends] [love] [code] " # Label for code octicon code_label: # Label for love octicon love_label: # Label for the contributors link friends_label: ```
Dashli ada (), Ignat Dash or Kamen Ignatiya () is an island in the Caspian Sea. It is one of the islands of Baku Archipelago located in the Bay of Baku, 74 km to the south of Baku. Dashli ada is part of the Baku Archipelago, which consists of the following islands: Boyuk Zira, Dash Zira, Qum Island, Zenbil, Sangi-Mugan, Chikil, Qara Su, Khara Zira, Gil and a few smaller ones. The island is located 32.2 km east of Cape Bandovan. The closest island to Dashly - Adsiz Ada - is 13.9 km to the north. The island is of volcanic origin and has a mud volcano. Discovery The island was discovered during Russo-Persian War (1722–1723), the island was named St. Ignatius Rock () on a map drawn by the Russians. The island was named after Ignatius of Antioch because it was explored on his feast day. Volcanic eruptions On July 4, 2021, at 21:51, an 8-minute long strong volcanic eruption from the mud volcano was recorded on the island. The blaze was observed in the form of a red light in the sky off the coast from Azerbaijan, including from the capital Baku, which is 74 km to the north. The flames towered 500 meters into the air. The last previous volcanic eruption on the island was recorded in 1945 and the preceding one in 1920. References Islands of Azerbaijan Islands of the Caspian Sea Mud volcanoes of Azerbaijan
```c #include <math.h> #if __riscv_flen >= 32 float copysignf(float x, float y) { __asm__ ("fsgnj.s %0, %1, %2" : "=f"(x) : "f"(x), "f"(y)); return x; } #else #include "../copysignf.c" #endif ```
Jonathan Putra (born 12 September 1982 in Middlesbrough, United Kingdom), commonly known as JP, is a presenter, actor and disc jockey. Early life Putra spent his childhood in McHenry County, Illinois. During this time he performed around the American midwest with his band, Colour. Putra attended Prairie Ridge High School in Crystal Lake, Illinois and went on to continue his studies in Education and Finance at Broward Community College in Pompano Beach, Florida. Career After completing his education, Putra moved to Malaysia to start a career in entertainment as a video jockey for Channel V International. After presenting on Channel V for nearly two years on a range of shows, including ARCADE and Bid It, he moved to NTV7 to host a new program called Life Session—a lifestyle show which Putra hosted alongside Xandria Ooi and Wan Sariah Jaafar. The show covered topics including from style, health and home decoration, with Putra hosting the cooking segments. After a year long season of Life Session, Putra moved to hosting NTV7's morning talk show, The Breakfast Show, alongside Malaysian television personalities Daphne Iking, Nazrudin Rahman, Hansen Lee, Sharifa Aleya, and Elaine Daly. Aside from hosting television programs, Putra also acts for films and television programs. He is known for his roles as Cikgu Ben in Elly & Epit, Samuel & Danial in the Ariana Rose, Johan in Pengancam Perkhawinan and Ryan in the telemovie Hanya Di Atas Kertas. Putra also officiates events as master of ceremonies, DJs for Air Asia's in-flight radio programs and models for brands, including Dolce & Gabbana. References External links Living people 1982 births VJs (media personalities) People from Middlesbrough Malaysian people of Chinese descent Malaysian people of Indian descent Malaysian people of British descent Malaysian people of English descent Broward College alumni Malaysian Christians
```c++ /******************************************************************************* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *******************************************************************************/ #include <iostream> #include "context.hpp" #include "gtest/gtest.h" #include <compiler/ir/easy_build.hpp> #include <compiler/ir/graph/driver.hpp> #include <compiler/ir/graph/graph.hpp> #include <compiler/ir/graph/lowering.hpp> #include <compiler/ir/graph/pass/pass.hpp> #include <compiler/jit/jit.hpp> #include <ops/fusible/binary_elemwise.hpp> #include <ops/fusible/memory_movement.hpp> using namespace dnnl::impl::graph::gc; TEST(GCCore_CPU_test_eliminate_zero_shaped_tensors, ConcatInputShapeZero1) { REQUIRE_AVX2(); SET_THREADS_OR_SKIP(16); auto ctx = std::make_shared<context_t>(*get_test_ctx()); sc_graph_t graph0; int A = 32, B0 = 32, B1 = 0, C = 128; auto in0 = graph0.make_input({graph_tensor::make( {A, B0, C}, sc_data_format_t(format_kinds::ABC), datatypes::f32)}); auto in1 = graph0.make_input({graph_tensor::make( {A, B0, C}, sc_data_format_t(format_kinds::ABC), datatypes::f32)}); auto in2 = graph0.make_input({graph_tensor::make( {A, B1, C}, sc_data_format_t(format_kinds::ABC), datatypes::f32)}); auto add = graph0.make( "add", {in0->get_outputs()[0], in1->get_outputs()[0]}, {}, {}); // break pre_fuse to show the inputs of concat op. auto concat = graph0.make("concat", {add->get_outputs()[0], in2->get_outputs()[0]}, {}, {{"axis", 1}, {op_attr_key::break_pre_fuse, true}}); auto out = graph0.make_output(concat->get_outputs()); graph_driver(graph0, ctx); EXPECT_TRUE(std::any_of( graph0.ops_.begin(), graph0.ops_.end(), [](const sc_op_ptr &op) { return op->isa<concat_op_t>() && op->info_.inputs_.size() == 1; })); auto ir_mod = lower_graph(ctx, graph0, {in0, in1, in2, out}); auto fptr = jit_engine_t::make(ctx)->get_entry_func(ir_mod); auto input0_data = alloc_array<float>(A * B0 * C); auto input1_data = alloc_array<float>(A * B0 * C); // For tensor whose shape contains 0, use alloc_size 1 auto input2_data = alloc_array<float>(1); auto graph_output0_data = alloc_array<float>(A * (B0 + B1) * C); fptr->call_default(&input0_data[0], &input1_data[0], &input2_data[0], &graph_output0_data[0]); auto ref_output0_data = alloc_array<float>(A * (B0 + B1) * C); for (size_t i = 0; i < ref_output0_data.size(); ++i) { ref_output0_data[i] = input0_data[i] + input1_data[i]; } test_utils::compare_data( graph_output0_data, ref_output0_data, 1e-4f, 1e-5f); } TEST(GCCore_CPU_test_eliminate_zero_shaped_tensors, ConcatInputShapeZero2) { REQUIRE_AVX2(); SET_THREADS_OR_SKIP(16); auto ctx = std::make_shared<context_t>(*get_test_ctx()); sc_graph_t graph0; int A = 4, B0 = 34, B1 = 0, C = 32, D = 128; auto in0 = graph0.make_input({graph_tensor::make({A, B0, C, D}, sc_data_format_t(format_kinds::ABCD), datatypes::f32)}); auto in1 = graph0.make_input({graph_tensor::make({A, C, B1, D}, sc_data_format_t(format_kinds::ABCD), datatypes::f32)}); auto trans = graph0.make("transpose", {in0->get_outputs()[0]}, {}, {{"order", std::vector<int> {0, 2, 1, 3}}}); auto concat = graph0.make("concat", {in1->get_outputs()[0], trans->get_outputs()[0]}, {}, {{"axis", 2}, {op_attr_key::break_pre_fuse, true}, {op_attr_key::break_post_fuse, true}}); auto quant = graph0.make("quantize", concat->get_outputs(), {}, {{"channel_axis", 1}, {"zero_points", std::vector<int> {99}}, {"scales", std::vector<float> {0.00773799f}}, {"per_channel", false}, {"dtype", datatypes::u8}}); auto out = graph0.make_output(quant->get_outputs()); graph_driver(graph0, ctx); EXPECT_TRUE(std::any_of( graph0.ops_.begin(), graph0.ops_.end(), [](const sc_op_ptr &op) { return op->isa<concat_op_t>() && op->info_.inputs_.size() == 1; })); auto ir_mod = lower_graph(ctx, graph0, {in0, in1, out}); auto fptr = jit_engine_t::make(ctx)->get_entry_func(ir_mod); } TEST(GCCore_CPU_test_eliminate_zero_shaped_tensors, ConcatInputShapeAllZero) { REQUIRE_AVX2(); SET_THREADS_OR_SKIP(16); auto ctx = std::make_shared<context_t>(*get_test_ctx()); sc_graph_t graph0; auto in0 = graph0.make_input({graph_tensor::make({4, 0, 1, 2}, sc_data_format_t(format_kinds::ABCD), datatypes::f32)}); auto in1 = graph0.make_input({graph_tensor::make({4, 0, 1, 2}, sc_data_format_t(format_kinds::ABCD), datatypes::f32)}); auto concat = graph0.make("concat", {in0->get_outputs()[0], in1->get_outputs()[0]}, {}, {{"axis", 2}, {op_attr_key::break_pre_fuse, true}, {op_attr_key::break_post_fuse, true}}); auto out = graph0.make_output(concat->get_outputs()); graph_driver(graph0, ctx); auto ir_mod = lower_graph(ctx, graph0, {in0, in1, out}); auto fptr = jit_engine_t::make(ctx)->get_entry_func(ir_mod); } TEST(GCCore_CPU_test_eliminate_zero_shaped_tensors, AddInputShapeZero) { REQUIRE_AVX2(); SET_THREADS_OR_SKIP(16); auto ctx = std::make_shared<context_t>(*get_test_ctx()); int A = 32, B0 = 0, B1 = 32, C = 128; auto input0_data = alloc_array<float>(1); auto input1_data = alloc_array<float>(1); auto input2_data = alloc_array<float>(A * B1 * C); auto graph_output0_data = alloc_array<float>(A * (B0 + B1) * C); auto ref_output0_data = alloc_array<float>(A * (B0 + B1) * C); // graph with zero shaped input tensor { sc_graph_t graph0; auto in0 = graph0.make_input({graph_tensor::make({A, B0, C}, sc_data_format_t(format_kinds::ABC), datatypes::f32)}); auto in1 = graph0.make_input({graph_tensor::make({A, B0, C}, sc_data_format_t(format_kinds::ABC), datatypes::f32)}); auto in2 = graph0.make_input({graph_tensor::make({A, B1, C}, sc_data_format_t(format_kinds::ABC), datatypes::f32)}); auto add = graph0.make( "add", {in0->get_outputs()[0], in1->get_outputs()[0]}, {}, {}); auto concat = graph0.make("concat", {add->get_outputs()[0], in2->get_outputs()[0]}, {}, {{"axis", 1}, {op_attr_key::break_pre_fuse, true}}); auto out = graph0.make_output(concat->get_outputs()); graph_driver(graph0, ctx); // add op is deleted and concat op only has one input left. EXPECT_TRUE(std::none_of(graph0.ops_.begin(), graph0.ops_.end(), [](const sc_op_ptr &op) { return op->isa<add_op_t>(); })); EXPECT_TRUE(std::any_of(graph0.ops_.begin(), graph0.ops_.end(), [](const sc_op_ptr &op) { return op->isa<concat_op_t>() && op->info_.inputs_.size() == 1; })); auto ir_mod = lower_graph(ctx, graph0, {in0, in1, in2, out}); auto fptr = jit_engine_t::make(ctx)->get_entry_func(ir_mod); fptr->call_default(&input0_data[0], &input1_data[0], &input2_data[0], &graph_output0_data[0]); } // equivalent graph { sc_graph_t graph0; auto in0 = graph0.make_input({graph_tensor::make({A, B1, C}, sc_data_format_t(format_kinds::ABC), datatypes::f32)}); auto concat = graph0.make( "concat", {in0->get_outputs()[0]}, {}, {{"axis", 1}}); auto out = graph0.make_output(concat->get_outputs()); graph_driver(graph0, ctx); auto ir_mod = lower_graph(ctx, graph0, {in0, out}); auto fptr = jit_engine_t::make(ctx)->get_entry_func(ir_mod); fptr->call_default(&input2_data[0], &ref_output0_data[0]); } test_utils::compare_data( graph_output0_data, ref_output0_data, 1e-4f, 1e-5f); } TEST(GCCore_CPU_test_eliminate_zero_shaped_tensors, SingleOpShapeZero) { // 64x128x28x0 // graph with zero shaped input tensor { sc_graph_t graph0; auto in0 = graph0.make_input({graph_tensor::make( {64, 128, 28, 0}, sc_data_format_t(), datatypes::f32)}); auto in1 = graph0.make_input({graph_tensor::make( {64, 128, 28, 0}, sc_data_format_t(), datatypes::f32)}); auto add = graph0.make( "add", {in0->get_outputs()[0], in1->get_outputs()[0]}, {}, {}); auto out = graph0.make_output(add->get_outputs()); graph_driver(graph0, get_test_ctx()); auto ir_mod = lower_graph(get_test_ctx(), graph0, {in0, in1, out}); } { sc_graph_t graph0; auto in = graph0.make_input({graph_tensor::make( {64, 128, 28, 0}, sc_data_format_t(), datatypes::f32)}); auto reorder = graph0.make("reorder", in->get_outputs(), {}, {{"internal", true}, {"out_format", sc_data_format_t::NHWC()}}); auto out = graph0.make_output(reorder->get_outputs()); graph_driver(graph0, get_test_ctx()); auto ir_mod = lower_graph(get_test_ctx(), graph0, {in, out}); } } TEST(GCCore_CPU_test_eliminate_zero_shaped_tensors, TunableOpShapeZero) { { sc_graph_t graph; auto in0 = graph.make_input({graph_tensor::make( {0, 64, 56, 56}, sc_data_format_t(), datatypes::f32)}); auto in1 = graph.make_input({graph_tensor::make( {128, 64, 3, 3}, sc_data_format_t(), datatypes::f32)}); auto conv = graph.make("conv_fwd", {in0->get_outputs()[0], in1->get_outputs()[0]}, {}, {{"data_format", "NCX"}, {"weights_format", "OIX"}, {"strides", sc_dims {1, 1}}, {"pads_begin", sc_dims {0, 0}}, {"pads_end", sc_dims {0, 0}}}); auto out = graph.make_output(conv->get_outputs()); graph_driver(graph, get_test_ctx()); auto ir_mod = lower_graph(get_test_ctx(), graph, {in0, in1, out}); } { sc_graph_t graph; auto in0 = graph.make_input({graph_tensor::make( {64, 64}, sc_data_format_t(), datatypes::f32)}); auto in1 = graph.make_input({graph_tensor::make( {64, 0}, sc_data_format_t(), datatypes::f32)}); auto matmul = graph.make("matmul", {in0->get_outputs()[0], in1->get_outputs()[0]}, {}, {}); auto out = graph.make_output(matmul->get_outputs()); graph_driver(graph, get_test_ctx()); auto ir_mod = lower_graph(get_test_ctx(), graph, {in0, in1, out}); } } TEST(GCCore_CPU_test_eliminate_zero_shaped_tensors, NormOpShapeZero) { { sc_graph_t graph; auto in = graph.make_input({graph_tensor::make( {0, 56, 56, 64}, sc_data_format_t(), datatypes::f32)}); auto layernorm = graph.make("layernorm", {in->get_outputs()[0]}, {}, {{"use_affine", false}}); auto out = graph.make_output(layernorm->get_outputs()); graph_driver(graph, get_test_ctx()); auto ir_mod = lower_graph(get_test_ctx(), graph, {in, out}); } { sc_graph_t graph; auto in0 = graph.make_input({graph_tensor::make( {0, 56, 56, 64}, sc_data_format_t(), datatypes::f32)}); auto in1 = graph.make_input( {graph_tensor::make({64}, sc_data_format_t(), datatypes::f32)}); auto in2 = graph.make_input( {graph_tensor::make({64}, sc_data_format_t(), datatypes::f32)}); auto layernorm = graph.make("layernorm", {in0->get_outputs()[0], in1->get_outputs()[0], in2->get_outputs()[0]}, {}, {{"use_affine", true}}); auto out = graph.make_output(layernorm->get_outputs()); graph_driver(graph, get_test_ctx()); auto ir_mod = lower_graph(get_test_ctx(), graph, {in0, in1, in2, out}); } } ```
Hamad Al Marri (; born 12 January 1991) is an Emirati footballer. References External links 1991 births Living people Emirati men's footballers Men's association football midfielders Al Ain FC players Al Dhafra FC players Ittihad Kalba FC players UAE Pro League players
```javascript declare function foo(x: mixed): boolean %checks(x !== null); ```
```kotlin package mega.privacy.android.feature.sync.domain.sync.option import mega.privacy.android.feature.sync.domain.repository.SyncNewFolderParamsRepository import mega.privacy.android.feature.sync.domain.usecase.sync.option.ClearSelectedMegaFolderUseCase import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestInstance import org.mockito.kotlin.mock import org.mockito.kotlin.verify @TestInstance(TestInstance.Lifecycle.PER_CLASS) class ClearSelectedMegaFolderUseCaseTest { private val repository: SyncNewFolderParamsRepository = mock() private val underTest = ClearSelectedMegaFolderUseCase(repository) @Test fun `test that clearSelectedMegaFolder calls repository`() { underTest() verify(repository).clearSelectedMegaFolder() } } ```
```yaml homepage: "path_to_url" language: c++ primary_contact: "joshuasuereth@google.com" auto_ccs : - "p.antoine@catenacyber.fr" sanitizers: - address - memory main_repo: 'path_to_url # opencensus is being archived cf path_to_url disabled: true ```
```java package jvmgo.book.ch09; public class StringTest { public static void main(String[] args) { String s1 = "abc1"; String s2 = "abc1"; System.out.println(s1 == s2); int x = 1; String s3 = "abc" + x; System.out.println(s1 == s3); s3 = s3.intern(); System.out.println(s1 == s3); } } ```
Ace of Diamond is an anime series based on the manga by Yuji Terajima serialized in Weekly Shōnen Magazine. The TV series was produced by Madhouse and Production I.G and began airing on October 6, 2013, on TX Network stations and later on AT-X. The episodes were simulcast in the United States, Canada, United Kingdom, Ireland, Australia, New Zealand, South Africa, Denmark, Finland, Iceland, the Netherlands, Norway, Sweden, Central and South America, Spain, Brazil, and Portugal by Crunchyroll with English and German subtitles. The series was initially planned to be 52 episodes but was extended until March 2015 for a total of 75 episodes. Nine pieces of theme musics are used for the episodes: three opening and six ending themes. From episodes 1–25, the opening theme is "Go EXCEED!!" by Tom-H@ck featuring Masayoshi Ōishi, while the ending themes are "Seek Diamonds" by Yōko Hikasa and "Glory!" (グローリー!) by Suzuko Mimori. From episodes 26–51, the opening theme is "Perfect HERO" by Tom-H@ck featuring Masayoshi Ōishi, while the ending themes are "Mirai e Tsunage" (未来へつなげ) by DŌP and "CLOUD NINE" by Ryōta Ōsaka, Nobunaga Shimazaki, and Natsuki Hanae. From episodes 52–75, the opening theme is "Hashire! Mirai" (疾走れ!ミライ; Run Ahead Toward the Future!) by GLAY, while the ending themes are "PROMISED FIELD" by Ryōta Ōsaka, Nobunaga Shimazaki, and Natsuki Hanae and "FINAL VICTORY" by Ryōta Ōsaka featuring the Seido High School Baseball Team. Episodes References Ace of Diamond episode lists 2013 Japanese television seasons 2014 Japanese television seasons 2015 Japanese television seasons
```sqlpl SET NAMES utf8; DROP TABLE IF EXISTS `countries`; CREATE TABLE `countries` ( `id` int(11) NOT NULL, `alpha_2` char(2) NOT NULL DEFAULT "", `alpha_3` char(3) NOT NULL DEFAULT "", `name` varchar(75) NOT NULL DEFAULT "", PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO `countries` (`id`, `alpha_2`, `alpha_3`, `name`) VALUES (352,"is","isl",""), (372,"ie","irl",""), (31,"az","aze",""), (4,"af","afg",""), (840,"us","usa",""), (784,"ae","are",""), (12,"dz","dza",""), (32,"ar","arg",""), (8,"al","alb",""), (51,"am","arm",""), (24,"ao","ago",""), (28,"ag","atg",""), (20,"ad","and",""), (887,"ye","yem",""), (826,"gb","gbr",""), (376,"il","isr",""), (380,"it","ita",""), (368,"iq","irq",""), (364,"ir","irn",""), (356,"in","ind",""), (360,"id","idn",""), (800,"ug","uga",""), (804,"ua","ukr",""), (860,"uz","uzb",""), (858,"uy","ury",""), (218,"ec","ecu",""), (818,"eg","egy",""), (233,"ee","est",""), (748,"sz","swz",""), (231,"et","eth",""), (232,"er","eri",""), (222,"sv","slv",""), (36,"au","aus",""), (40,"at","aut",""), (512,"om","omn",""), (528,"nl","nld",""), (288,"gh","gha",""), (132,"cv","cpv",""), (328,"gy","guy",""), (398,"kz","kaz",""), (634,"qa","qat",""), (124,"ca","can",""), (266,"ga","gab",""), (120,"cm","cmr",""), (270,"gm","gmb",""), (116,"kh","khm",""), (807,"mk","mkd",""), (324,"gn","gin",""), (624,"gw","gnb",""), (196,"cy","cyp",""), (192,"cu","cub",""), (300,"gr","grc",""), (296,"ki","kir",""), (417,"kg","kgz",""), (320,"gt","gtm",""), (414,"kw","kwt",""), (308,"gd","grd",""), (191,"hr","hrv",""), (404,"ke","ken",""), (384,"ci","civ",""), (188,"cr","cri",""), (174,"km","com",""), (170,"co","col",""), (178,"cg","cog",""), (180,"cd","cod",""), (682,"sa","sau",""), (882,"ws","wsm",""), (678,"st","stp",""), (894,"zm","zmb",""), (674,"sm","smr",""), (694,"sl","sle",""), (262,"dj","dji",""), (388,"jm","jam",""), (268,"ge","geo",""), (760,"sy","syr",""), (702,"sg","sgp",""), (716,"zw","zwe",""), (756,"ch","che",""), (752,"se","swe",""), (729,"sd","sdn",""), (724,"es","esp",""), (740,"sr","sur",""), (144,"lk","lka",""), (703,"sk","svk",""), (705,"si","svn",""), (690,"sc","syc",""), (226,"gq","gnq",""), (686,"sn","sen",""), (688,"rs","srb",""), (659,"kn","kna",""), (670,"vc","vct",""), (662,"lc","lca",""), (706,"so","som",""), (90,"sb","slb",""), (764,"th","tha",""), (410,"kr","kor",""), (762,"tj","tjk",""), (834,"tz","tza",""), (203,"cz","cze",""), (148,"td","tcd",""), (140,"cf","caf",""), (156,"cn","chn",""), (788,"tn","tun",""), (408,"kp","prk",""), (152,"cl","chl",""), (798,"tv","tuv",""), (208,"dk","dnk",""), (276,"de","deu",""), (768,"tg","tgo",""), (214,"do","dom",""), (212,"dm","dma",""), (780,"tt","tto",""), (795,"tm","tkm",""), (792,"tr","tur",""), (776,"to","ton",""), (566,"ng","nga",""), (520,"nr","nru",""), (516,"na","nam",""), (558,"ni","nic",""), (562,"ne","ner",""), (392,"jp","jpn",""), (554,"nz","nzl",""), (524,"np","npl",""), (578,"no","nor",""), (48,"bh","bhr",""), (332,"ht","hti",""), (586,"pk","pak",""), (591,"pa","pan",""), (548,"vu","vut",""), (44,"bs","bhs",""), (598,"pg","png",""), (585,"pw","plw",""), (600,"py","pry",""), (52,"bb","brb",""), (348,"hu","hun",""), (50,"bd","bgd",""), (626,"tl","tls",""), (242,"fj","fji",""), (608,"ph","phl",""), (246,"fi","fin",""), (64,"bt","btn",""), (76,"br","bra",""), (250,"fr","fra",""), (100,"bg","bgr",""), (854,"bf","bfa",""), (96,"bn","brn",""), (108,"bi","bdi",""), (704,"vn","vnm",""), (204,"bj","ben",""), (862,"ve","ven",""), (112,"by","blr",""), (84,"bz","blz",""), (604,"pe","per",""), (56,"be","bel",""), (616,"pl","pol",""), (70,"ba","bih",""), (72,"bw","bwa",""), (68,"bo","bol",""), (620,"pt","prt",""), (340,"hn","hnd",""), (584,"mh","mhl",""), (450,"mg","mdg",""), (454,"mw","mwi",""), (466,"ml","mli",""), (470,"mt","mlt",""), (458,"my","mys",""), (583,"fm","fsm",""), (710,"za","zaf",""), (728,"ss","ssd",""), (104,"mm","mmr",""), (484,"mx","mex",""), (480,"mu","mus",""), (478,"mr","mrt",""), (508,"mz","moz",""), (492,"mc","mco",""), (462,"mv","mdv",""), (498,"md","mda",""), (504,"ma","mar",""), (496,"mn","mng",""), (499,"me","mne",""), (400,"jo","jor",""), (418,"la","lao",""), (428,"lv","lva",""), (440,"lt","ltu",""), (434,"ly","lby",""), (438,"li","lie",""), (430,"lr","lbr",""), (642,"ro","rou",""), (442,"lu","lux",""), (646,"rw","rwa",""), (426,"ls","lso",""), (422,"lb","lbn",""), (643,"ru","rus","") ```
```java package connection; import java.sql.*; import java.util.Properties; public class Docs { // Redshift driver: // "jdbc:redshift://x.y.us-west-2.redshift.amazonaws.com:5439/dev"; // or "jdbc:postgresql://x.y.us-west-2.redshift.amazonaws.com:5439/dev"; static final String dbURL = "***jdbc cluster connection string ****"; static final String MasterUsername = "***master user name***"; static final String MasterUserPassword = "***master user password***"; public static void main(String[] args) { Connection conn = null; Statement stmt = null; try { // Dynamically load driver at runtime. // Redshift JDBC 4.1 driver: com.amazon.redshift.jdbc41.Driver // Redshift JDBC 4 driver: com.amazon.redshift.jdbc4.Driver Class.forName("com.amazon.redshift.jdbc.Driver"); // Open a connection and define properties. System.out.println("Connecting to database..."); Properties props = new Properties(); // Uncomment the following line if using a keystore. // props.setProperty("ssl", "true"); props.setProperty("user", MasterUsername); props.setProperty("password", MasterUserPassword); conn = DriverManager.getConnection(dbURL, props); // Try a simple query. System.out.println("Listing system tables..."); stmt = conn.createStatement(); String sql; sql = "select * from information_schema.tables;"; ResultSet rs = stmt.executeQuery(sql); // Get the data from the result set. while (rs.next()) { // Retrieve two columns. String catalog = rs.getString("table_catalog"); String name = rs.getString("table_name"); // Display values. System.out.print("Catalog: " + catalog); System.out.println(", Name: " + name); } rs.close(); stmt.close(); conn.close(); } catch (Exception ex) { // For convenience, handle all errors here. ex.printStackTrace(); } finally { // Finally block to close resources. try { if (stmt != null) stmt.close(); } catch (Exception ex) { } // nothing we can do try { if (conn != null) conn.close(); } catch (Exception ex) { ex.printStackTrace(); } } System.out.println("Finished connectivity test."); } } ```
```rust use crate::assert_js; #[test] fn referencing_pattern_var() { assert_js!( r#"pub fn main(xs) { case xs { #(x) if x -> 1 _ -> 0 } } "#, ); } #[test] fn rebound_var() { assert_js!( r#"pub fn main() { let x = False let x = True case x { _ if x -> 1 _ -> 0 } } "#, ); } #[test] fn bitarray_with_var() { assert_js!( r#"pub fn main() { case 5 { z if <<z>> == <<z>> -> Nil _ -> Nil } } "#, ) } // path_to_url #[test] fn keyword_var() { assert_js!( r#" pub const function = 5 pub const do = 10 pub fn main() { let class = 5 let while = 10 let var = 7 case var { _ if class == while -> True _ if [class] == [5] -> True function if #(function) == #(5) -> False _ if do == function -> True while if while > 5 -> False class -> False } } "#, ); } #[test] fn operator_wrapping_right() { assert_js!( r#"pub fn main(xs, y: Bool, z: Bool) { case xs { #(x) if x == { y == z } -> 1 _ -> 0 } } "#, ); } #[test] fn operator_wrapping_left() { assert_js!( r#"pub fn main(xs, y: Bool, z: Bool) { case xs { #(x) if { x == y } == z -> 1 _ -> 0 } } "#, ); } #[test] fn eq_scalar() { assert_js!( r#"pub fn main(xs, y: Int) { case xs { #(x) if x == y -> 1 _ -> 0 } } "#, ); } #[test] fn not_eq_scalar() { assert_js!( r#"pub fn main(xs, y: Int) { case xs { #(x) if x != y -> 1 _ -> 0 } } "#, ); } #[test] fn tuple_index() { assert_js!( r#"pub fn main(x, xs: #(Bool, Bool, Bool)) { case x { _ if xs.2 -> 1 _ -> 0 } } "#, ); } #[test] fn not_eq_complex() { assert_js!( r#"pub fn main(xs, y) { case xs { #(x) if xs != y -> x _ -> 0 } } "#, ); } #[test] fn eq_complex() { assert_js!( r#"pub fn main(xs, y) { case xs { #(x) if xs == y -> x _ -> 0 } } "#, ); } #[test] fn constant() { assert_js!( r#"pub fn main(xs) { case xs { #(x) if x == 1 -> x _ -> 0 } } "#, ); } #[test] fn alternative_patterns() { assert_js!( r#"pub fn main(xs) { case xs { 1 | 2 -> 0 _ -> 1 } } "#, ); } #[test] fn alternative_patterns_list() { assert_js!( r#"pub fn main(xs) -> Int { case xs { [1] | [1, 2] -> 0 _ -> 1 } } "#, ); } #[test] fn alternative_patterns_assignment() { assert_js!( r#"pub fn main(xs) -> Int { case xs { [x] | [_, x] -> x _ -> 1 } } "#, ); } #[test] fn alternative_patterns_guard() { assert_js!( r#"pub fn main(xs) -> Int { case xs { [x] | [_, x] if x == 1 -> x _ -> 0 } } "#, ); } #[test] fn field_access() { assert_js!( r#" pub type Person { Person(username: String, name: String, age: Int) } pub fn main() { let given_name = "jack" let raiden = Person("raiden", "jack", 31) case given_name { name if name == raiden.name -> "It's jack" _ -> "It's not jack" } } "# ) } #[test] fn nested_record_access() { assert_js!( r#" pub type A { A(b: B) } pub type B { B(c: C) } pub type C { C(d: Bool) } pub fn a(a: A) { case a { _ if a.b.c.d -> 1 _ -> 0 } } "# ); } #[test] fn module_string_access() { assert_js!( ( "package", "hero", r#" pub const ironman = "Tony Stark" "# ), r#" import hero pub fn main() { let name = "Tony Stark" case name { n if n == hero.ironman -> True _ -> False } } "# ); } #[test] fn module_list_access() { assert_js!( ( "package", "hero", r#" pub const heroes = ["Tony Stark", "Bruce Wayne"] "# ), r#" import hero pub fn main() { let names = ["Tony Stark", "Bruce Wayne"] case names { n if n == hero.heroes -> True _ -> False } } "# ); } #[test] fn module_tuple_access() { assert_js!( ( "package", "hero", r#" pub const hero = #("ironman", "Tony Stark") "# ), r#" import hero pub fn main() { let name = "Tony Stark" case name { n if n == hero.hero.1 -> True _ -> False } } "# ); } #[test] fn module_access() { assert_js!( ( "package", "hero", r#" pub type Hero { Hero(name: String) } pub const ironman = Hero("Tony Stark") "# ), r#" import hero pub fn main() { let name = "Tony Stark" case name { n if n == hero.ironman.name -> True _ -> False } } "# ); } #[test] fn module_access_submodule() { assert_js!( ( "package", "hero/submodule", r#" pub type Hero { Hero(name: String) } pub const ironman = Hero("Tony Stark") "# ), r#" import hero/submodule pub fn main() { let name = "Tony Stark" case name { n if n == submodule.ironman.name -> True _ -> False } } "# ); } #[test] fn module_access_aliased() { assert_js!( ( "package", "hero/submodule", r#" pub type Hero { Hero(name: String) } pub const ironman = Hero("Tony Stark") "# ), r#" import hero/submodule as myhero pub fn main() { let name = "Tony Stark" case name { n if n == myhero.ironman.name -> True _ -> False } } "# ); } #[test] fn module_nested_access() { assert_js!( ( "package", "hero", r#" pub type Person { Person(name: String) } pub type Hero { Hero(secret_identity: Person) } const bruce = Person("Bruce Wayne") pub const batman = Hero(bruce) "# ), r#" import hero pub fn main() { let name = "Bruce Wayne" case name { n if n == hero.batman.secret_identity.name -> True _ -> False } } "# ); } #[test] fn not() { assert_js!( r#"pub fn main(x, y) { case x { _ if !y -> 0 _ -> 1 } } "#, ); } #[test] fn not_two() { assert_js!( r#"pub fn main(x, y) { case x { _ if !y && !x -> 0 _ -> 1 } } "#, ); } #[test] fn custom_type_constructor_imported_and_aliased() { assert_js!( ("package", "other_module", "pub type T { A }"), r#"import other_module.{A as B} fn func() { case B { x if x == B -> True _ -> False } } "#, ); } #[test] fn imported_aliased_ok() { assert_js!( r#"import gleam.{Ok as Y} pub type X { Ok } fn func() { case Y { y if y == Y -> True _ -> False } } "#, ); } #[test] fn imported_ok() { assert_js!( r#"import gleam pub type X { Ok } fn func(x) { case gleam.Ok { _ if [] == [ gleam.Ok ] -> True _ -> False } } "#, ); } ```
```c++ /*============================================================================= file LICENSE_1_0.txt or copy at path_to_url ==============================================================================*/ #ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_SIZE_IMPL_HPP #define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_SIZE_IMPL_HPP namespace boost { namespace fusion { namespace extension { template<typename> struct size_impl; template <> struct size_impl<struct_tag> { template <typename Seq> struct apply : struct_size<typename remove_const<Seq>::type> {}; }; template <> struct size_impl<assoc_struct_tag> : size_impl<struct_tag> {}; }}} #endif ```
```ruby # frozen_string_literal: true require "livecheck/strategy" RSpec.describe Homebrew::Livecheck::Strategy::GithubReleases do subject(:github_releases) { described_class } let(:github_urls) do { release_artifact: "path_to_url", tag_archive: "path_to_url", repository_upload: "path_to_url", } end let(:non_github_url) { "path_to_url" } let(:regex) { github_releases::DEFAULT_REGEX } let(:generated) do { url: "path_to_url", username: "abc", repository: "def", } end # For the sake of brevity, this is a limited subset of the information found # in release objects in a response from the GitHub API. Some of these objects # are somewhat representative of real world scenarios but others are # contrived examples for the sake of exercising code paths. let(:content) do <<~EOS [ { "tag_name": "v1.2.3", "name": "v1.2.3", "draft": false, "prerelease": false }, { "tag_name": "no-version-tag-also", "name": "1.2.2", "draft": false, "prerelease": false }, { "tag_name": "1.2.1", "name": "No version title", "draft": false, "prerelease": false }, { "tag_name": "no-version-tag", "name": "No version title", "draft": false, "prerelease": false }, { "tag_name": "v1.1.2", "name": "v1.1.2", "draft": false, "prerelease": true }, { "tag_name": "v1.1.1", "name": "v1.1.1", "draft": true, "prerelease": false }, { "tag_name": "v1.1.0", "name": "v1.1.0", "draft": true, "prerelease": true }, { "other": "something-else" } ] EOS end let(:json) { JSON.parse(content) } let(:matches) { ["1.2.3", "1.2.2", "1.2.1"] } describe "::match?" do it "returns true for a GitHub release artifact URL" do expect(github_releases.match?(github_urls[:release_artifact])).to be true end it "returns true for a GitHub tag archive URL" do expect(github_releases.match?(github_urls[:tag_archive])).to be true end it "returns true for a GitHub repository upload URL" do expect(github_releases.match?(github_urls[:repository_upload])).to be true end it "returns false for a non-GitHub URL" do expect(github_releases.match?(non_github_url)).to be false end end describe "::generate_input_values" do it "returns a hash containing a url and regex for a GitHub release artifact URL" do expect(github_releases.generate_input_values(github_urls[:release_artifact])).to eq(generated) end it "returns a hash containing a url and regex for a GitHub tag archive URL" do expect(github_releases.generate_input_values(github_urls[:tag_archive])).to eq(generated) end it "returns a hash containing a url and regex for a GitHub repository upload URL" do expect(github_releases.generate_input_values(github_urls[:repository_upload])).to eq(generated) end it "returns an empty hash for a non-GitHub URL" do expect(github_releases.generate_input_values(non_github_url)).to eq({}) end end describe "::versions_from_content" do it "returns an empty array if content is blank" do expect(github_releases.versions_from_content({}, regex)).to eq([]) end it "returns an array of version strings when given content" do expect(github_releases.versions_from_content(json, regex)).to eq(matches) end it "returns an array of version strings when given content and a block" do # Returning a string from block expect(github_releases.versions_from_content(json, regex) { "1.2.3" }).to eq(["1.2.3"]) # Returning an array of strings from block expect(github_releases.versions_from_content(json, regex) do |json, regex| json.map do |release| next if release["draft"] || release["prerelease"] match = release["tag_name"]&.match(regex) next if match.blank? match[1] end end).to eq(["1.2.3", "1.2.1"]) end it "allows a nil return from a block" do expect(github_releases.versions_from_content(json, regex) { next }).to eq([]) end it "errors on an invalid return type from a block" do expect { github_releases.versions_from_content(json, regex) { 123 } } .to raise_error(TypeError, Homebrew::Livecheck::Strategy::INVALID_BLOCK_RETURN_VALUE_MSG) end end end ```
```javascript /*! lazysizes - v3.0.0 */ !function(a,b){var c=b(a,a.document);a.lazySizes=c,"object"==typeof module&&module.exports&&(module.exports=c)}(window,function(a,b){"use strict";if(b.getElementsByClassName){var c,d=b.documentElement,e=a.Date,f=a.HTMLPictureElement,g="addEventListener",h="getAttribute",i=a[g],j=a.setTimeout,k=a.requestAnimationFrame||j,l=a.requestIdleCallback,m=/^picture$/i,n=["load","error","lazyincluded","_lazyloaded"],o={},p=Array.prototype.forEach,q=function(a,b){return o[b]||(o[b]=new RegExp("(\\s|^)"+b+"(\\s|$)")),o[b].test(a[h]("class")||"")&&o[b]},r=function(a,b){q(a,b)||a.setAttribute("class",(a[h]("class")||"").trim()+" "+b)},s=function(a,b){var c;(c=q(a,b))&&a.setAttribute("class",(a[h]("class")||"").replace(c," "))},t=function(a,b,c){var d=c?g:"removeEventListener";c&&t(a,b),n.forEach(function(c){a[d](c,b)})},u=function(a,c,d,e,f){var g=b.createEvent("CustomEvent");return g.initCustomEvent(c,!e,!f,d||{}),a.dispatchEvent(g),g},v=function(b,d){var e;!f&&(e=a.picturefill||c.pf)?e({reevaluate:!0,elements:[b]}):d&&d.src&&(b.src=d.src)},w=function(a,b){return(getComputedStyle(a,null)||{})[b]},x=function(a,b,d){for(d=d||a.offsetWidth;d<c.minSize&&b&&!a._lazysizesWidth;)d=b.offsetWidth,b=b.parentNode;return d},y=function(){var a,c,d=[],e=[],f=d,g=function(){var b=f;for(f=d.length?e:d,a=!0,c=!1;b.length;)b.shift()();a=!1},h=function(d,e){a&&!e?d.apply(this,arguments):(f.push(d),c||(c=!0,(b.hidden?j:k)(g)))};return h._lsFlush=g,h}(),z=function(a,b){return b?function(){y(a)}:function(){var b=this,c=arguments;y(function(){a.apply(b,c)})}},A=function(a){var b,c=0,d=125,f=666,g=f,h=function(){b=!1,c=e.now(),a()},i=l?function(){l(h,{timeout:g}),g!==f&&(g=f)}:z(function(){j(h)},!0);return function(a){var f;(a=a===!0)&&(g=44),b||(b=!0,f=d-(e.now()-c),0>f&&(f=0),a||9>f&&l?i():j(i,f))}},B=function(a){var b,c,d=99,f=function(){b=null,a()},g=function(){var a=e.now()-c;d>a?j(g,d-a):(l||f)(f)};return function(){c=e.now(),b||(b=j(g,d))}},C=function(){var f,k,l,n,o,x,C,E,F,G,H,I,J,K,L,M=/^img$/i,N=/^iframe$/i,O="onscroll"in a&&!/glebot/.test(navigator.userAgent),P=0,Q=0,R=0,S=-1,T=function(a){R--,a&&a.target&&t(a.target,T),(!a||0>R||!a.target)&&(R=0)},U=function(a,c){var e,f=a,g="hidden"==w(b.body,"visibility")||"hidden"!=w(a,"visibility");for(F-=c,I+=c,G-=c,H+=c;g&&(f=f.offsetParent)&&f!=b.body&&f!=d;)g=(w(f,"opacity")||1)>0,g&&"visible"!=w(f,"overflow")&&(e=f.getBoundingClientRect(),g=H>e.left&&G<e.right&&I>e.top-1&&F<e.bottom+1);return g},V=function(){var a,e,g,i,j,m,n,p,q;if((o=c.loadMode)&&8>R&&(a=f.length)){e=0,S++,null==K&&("expand"in c||(c.expand=d.clientHeight>500&&d.clientWidth>500?500:370),J=c.expand,K=J*c.expFactor),K>Q&&1>R&&S>2&&o>2&&!b.hidden?(Q=K,S=0):Q=o>1&&S>1&&6>R?J:P;for(;a>e;e++)if(f[e]&&!f[e]._lazyRace)if(O)if((p=f[e][h]("data-expand"))&&(m=1*p)||(m=Q),q!==m&&(C=innerWidth+m*L,E=innerHeight+m,n=-1*m,q=m),g=f[e].getBoundingClientRect(),(I=g.bottom)>=n&&(F=g.top)<=E&&(H=g.right)>=n*L&&(G=g.left)<=C&&(I||H||G||F)&&(l&&3>R&&!p&&(3>o||4>S)||U(f[e],m))){if(ba(f[e]),j=!0,R>9)break}else!j&&l&&!i&&4>R&&4>S&&o>2&&(k[0]||c.preloadAfterLoad)&&(k[0]||!p&&(I||H||G||F||"auto"!=f[e][h](c.sizesAttr)))&&(i=k[0]||f[e]);else ba(f[e]);i&&!j&&ba(i)}},W=A(V),X=function(a){r(a.target,c.loadedClass),s(a.target,c.loadingClass),t(a.target,Z)},Y=z(X),Z=function(a){Y({target:a.target})},$=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.src=b}},_=function(a){var b,d,e=a[h](c.srcsetAttr);(b=c.customMedia[a[h]("data-media")||a[h]("media")])&&a.setAttribute("media",b),e&&a.setAttribute("srcset",e),b&&(d=a.parentNode,d.insertBefore(a.cloneNode(),a),d.removeChild(a))},aa=z(function(a,b,d,e,f){var g,i,k,l,o,q;(o=u(a,"lazybeforeunveil",b)).defaultPrevented||(e&&(d?r(a,c.autosizesClass):a.setAttribute("sizes",e)),i=a[h](c.srcsetAttr),g=a[h](c.srcAttr),f&&(k=a.parentNode,l=k&&m.test(k.nodeName||"")),q=b.firesLoad||"src"in a&&(i||g||l),o={target:a},q&&(t(a,T,!0),clearTimeout(n),n=j(T,2500),r(a,c.loadingClass),t(a,Z,!0)),l&&p.call(k.getElementsByTagName("source"),_),i?a.setAttribute("srcset",i):g&&!l&&(N.test(a.nodeName)?$(a,g):a.src=g),(i||l)&&v(a,{src:g})),a._lazyRace&&delete a._lazyRace,s(a,c.lazyClass),y(function(){(!q||a.complete&&a.naturalWidth>1)&&(q?T(o):R--,X(o))},!0)}),ba=function(a){var b,d=M.test(a.nodeName),e=d&&(a[h](c.sizesAttr)||a[h]("sizes")),f="auto"==e;(!f&&l||!d||!a.src&&!a.srcset||a.complete||q(a,c.errorClass))&&(b=u(a,"lazyunveilread").detail,f&&D.updateElem(a,!0,a.offsetWidth),a._lazyRace=!0,R++,aa(a,b,f,e,d))},ca=function(){if(!l){if(e.now()-x<999)return void j(ca,999);var a=B(function(){c.loadMode=3,W()});l=!0,c.loadMode=3,W(),i("scroll",function(){3==c.loadMode&&(c.loadMode=2),a()},!0)}};return{_:function(){x=e.now(),f=b.getElementsByClassName(c.lazyClass),k=b.getElementsByClassName(c.lazyClass+" "+c.preloadClass),L=c.hFac,i("scroll",W,!0),i("resize",W,!0),a.MutationObserver?new MutationObserver(W).observe(d,{childList:!0,subtree:!0,attributes:!0}):(d[g]("DOMNodeInserted",W,!0),d[g]("DOMAttrModified",W,!0),setInterval(W,999)),i("hashchange",W,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(a){b[g](a,W,!0)}),/d$|^c/.test(b.readyState)?ca():(i("load",ca),b[g]("DOMContentLoaded",W),j(ca,2e4)),f.length?(V(),y._lsFlush()):W()},checkElems:W,unveil:ba}}(),D=function(){var a,d=z(function(a,b,c,d){var e,f,g;if(a._lazysizesWidth=d,d+="px",a.setAttribute("sizes",d),m.test(b.nodeName||""))for(e=b.getElementsByTagName("source"),f=0,g=e.length;g>f;f++)e[f].setAttribute("sizes",d);c.detail.dataAttr||v(a,c.detail)}),e=function(a,b,c){var e,f=a.parentNode;f&&(c=x(a,f,c),e=u(a,"lazybeforesizes",{width:c,dataAttr:!!b}),e.defaultPrevented||(c=e.detail.width,c&&c!==a._lazysizesWidth&&d(a,f,e,c)))},f=function(){var b,c=a.length;if(c)for(b=0;c>b;b++)e(a[b])},g=B(f);return{_:function(){a=b.getElementsByClassName(c.autosizesClass),i("resize",g)},checkElems:g,updateElem:e}}(),E=function(){E.i||(E.i=!0,D._(),C._())};return function(){var b,d={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2};c=a.lazySizesConfig||a.lazysizesConfig||{};for(b in d)b in c||(c[b]=d[b]);a.lazySizesConfig=c,j(function(){c.init&&E()})}(),{cfg:c,autoSizer:D,loader:C,init:E,uP:v,aC:r,rC:s,hC:q,fire:u,gW:x,rAF:y}}}); ```
```php <?hh // strict class MultiTeam extends Team { protected static string $MC_KEY = 'multiteam:'; protected static Map<string, string> $MC_KEYS = Map { 'ALL_TEAMS' => 'all_teams', 'LEADERBOARD' => 'leaderboard_teams', 'LEADERBOARD_LIMIT' => 'leaderboard_limit', 'POINTS_BY_TYPE' => 'points_by_type', 'ALL_ACTIVE_TEAMS' => 'active_teams', 'ALL_VISIBLE_TEAMS' => 'visible_teams', 'TEAMS_BY_LOGO' => 'logo_teams', 'TEAMS_BY_LEVEL' => 'level_teams', 'TEAMS_NAMES_BY_LEVEL' => 'level_teams_names', 'TEAMS_FIRST_CAP' => 'capture_teams', }; private static async function genTeamArrayFromDB( string $query, int $limit = 0, ): Awaitable<Vector<Map<string, string>>> { $db = await self::genDb(); if ($limit !== 0) { $query .= ' LIMIT '.intval($limit); } $result = await $db->query($query); return $result->mapRows(); } public static async function genAllAdmins(): Awaitable<array<Team>> { $admins = await MultiTeam::genTeamArrayFromDB( 'SELECT * FROM teams WHERE admin = 1', ); $admin_teams = array(); foreach ($admins->items() as $admin) { $admin_teams[] = Team::teamFromRow($admin); } return $admin_teams; } // All teams. public static async function genAllTeamsCache( bool $refresh = false, ): Awaitable<Map<int, Team>> { $mc_result = self::getMCRecords('ALL_TEAMS'); if (!$mc_result || count($mc_result) === 0 || $refresh) { $all_teams = Map {}; $teams = await self::genTeamArrayFromDB('SELECT * FROM teams'); foreach ($teams->items() as $team) { $all_teams->add( Pair {intval($team->get('id')), Team::teamFromRow($team)}, ); } self::setMCRecords('ALL_TEAMS', $all_teams); return $all_teams; } else { invariant( $mc_result instanceof Map, 'cache return should of type Map and not null', ); return $mc_result; } } public static async function genTeam( int $team_id, bool $refresh = false, ): Awaitable<Team> { $all_teams = await self::genAllTeamsCache($refresh); $team = $all_teams->get($team_id); invariant($team instanceof Team, 'team should of type Team and not null'); return $team; } public static async function genLeaderboardLimit(): Awaitable<int> { $limit = false; $limit = self::getMCRecords('LEADERBOARD_LIMIT'); if (!$limit) { $limit = await self::setLeaderboardLimit(); } return intval($limit); } public static async function setLeaderboardLimit(): Awaitable<int> { $leaderboard_limit = await Configuration::gen('leaderboard_limit'); self::setMCRecords('LEADERBOARD_LIMIT', $leaderboard_limit->getValue()); return intval($leaderboard_limit->getValue()); } // Leaderboard order. public static async function genLeaderboard( bool $limit = true, bool $refresh = false, ): Awaitable<array<Team>> { list($leaderboard_limit, $leaderboard_limit_cache, $visible_teams) = await \HH\Asio\va( Configuration::gen('leaderboard_limit'), self::genLeaderboardLimit(), self::genAllVisibleTeams(), ); $teams_count = count($visible_teams); $mc_result = self::getMCRecords('LEADERBOARD'); if (!$mc_result || count($mc_result) === 0 || $leaderboard_limit_cache !== intval($leaderboard_limit->getValue()) || ($limit === false && (count($mc_result) !== $teams_count)) || $refresh) { if ($limit === true) { $teams = await self::genTeamArrayFromDB( 'SELECT * FROM teams WHERE active = 1 AND visible = 1 ORDER BY points DESC, last_score ASC', intval($leaderboard_limit->getValue()), ); } else { $teams = await self::genTeamArrayFromDB( 'SELECT * FROM teams WHERE active = 1 AND visible = 1 ORDER BY points DESC, last_score ASC', ); } $team_leaderboard = array(); foreach ($teams->items() as $team) { $team_leaderboard[] = Team::teamFromRow($team); } self::setMCRecords('LEADERBOARD', $team_leaderboard); return $team_leaderboard; } else { invariant( is_array($mc_result), 'cache return should be an array of Team and not null', ); return $mc_result; } } // Get points by type. public static async function genPointsByType( int $team_id, string $type, bool $refresh = false, ): Awaitable<int> { $mc_result = self::getMCRecords('POINTS_BY_TYPE'); if (!$mc_result || count($mc_result) === 0 || $refresh) { $points_by_type = Map {}; $teams = await self::genTeamArrayFromDB( 'SELECT teams.id, scores_log.type, IFNULL(SUM(scores_log.points), 0) AS points FROM teams LEFT JOIN scores_log ON teams.id = scores_log.team_id GROUP BY teams.id, scores_log.type', ); foreach ($teams->items() as $team) { if ($team->get('type') !== null) { if ($points_by_type->contains(intval($team->get('id')))) { $type_pair = $points_by_type->get(intval($team->get('id'))); invariant( $type_pair instanceof Map, 'type_pair should of type Map and not null', ); $type_pair->add( Pair {$team->get('type'), intval($team->get('points'))}, ); $points_by_type->set(intval($team->get('id')), $type_pair); } else { $type_pair = Map {}; $type_pair->add( Pair {$team->get('type'), intval($team->get('points'))}, ); $points_by_type->add(Pair {intval($team->get('id')), $type_pair}); } } else { $type_pair = Map {}; $type_pair->add(Pair {'quiz', 0}); $type_pair->add(Pair {'flag', 0}); $type_pair->add(Pair {'base', 0}); $points_by_type->add(Pair {intval($team->get('id')), $type_pair}); } } self::setMCRecords('POINTS_BY_TYPE', new Map($points_by_type)); if ($points_by_type->contains($team_id)) { $team_points_by_type = $points_by_type->get($team_id); invariant( $team_points_by_type instanceof Map, 'team_points_by_type should of type Map and not null', ); if ($team_points_by_type->contains($type)) { return intval($team_points_by_type->get($type)); } else { return intval(0); } } else { return intval(0); } } else { invariant( $mc_result instanceof Map, 'cache return should of type Map and not null', ); if ($mc_result->contains($team_id)) { $team_points_by_type = $mc_result->get($team_id); invariant( $team_points_by_type instanceof Map, 'team_points_by_type should of type Map and not null', ); if ($team_points_by_type->contains($type)) { return intval($team_points_by_type->get($type)); } else { return intval(0); } } else { return intval(0); } } } // All active teams. public static async function genAllActiveTeams( bool $refresh = false, ): Awaitable<array<Team>> { $mc_result = self::getMCRecords('ALL_ACTIVE_TEAMS'); if (!$mc_result || count($mc_result) === 0 || $refresh) { $all_active_teams = array(); $teams = await self::genTeamArrayFromDB( 'SELECT * FROM teams WHERE active = 1 ORDER BY id', ); foreach ($teams->items() as $team) { $all_active_teams[] = Team::teamFromRow($team); } self::setMCRecords('ALL_ACTIVE_TEAMS', $all_active_teams); return $all_active_teams; } else { invariant( is_array($mc_result), 'cache return should be an array of Team and not null', ); return $mc_result; } } // All visible teams. public static async function genAllVisibleTeams( bool $refresh = false, ): Awaitable<array<Team>> { $mc_result = self::getMCRecords('ALL_VISIBLE_TEAMS'); if (!$mc_result || count($mc_result) === 0 || $refresh) { $all_visible_teams = array(); $teams = await self::genTeamArrayFromDB( 'SELECT * FROM teams WHERE visible = 1 AND active = 1 ORDER BY id', ); foreach ($teams->items() as $team) { $all_visible_teams[] = Team::teamFromRow($team); } self::setMCRecords('ALL_VISIBLE_TEAMS', $all_visible_teams); return $all_visible_teams; } else { invariant( is_array($mc_result), 'cache return should be an array of Team and not null', ); return $mc_result; } } // Retrieve how many teams are using one logo. public static async function genWhoUses( string $logo, bool $refresh = false, ): Awaitable<array<Team>> { $mc_result = self::getMCRecords('TEAMS_BY_LOGO'); if (!$mc_result || count($mc_result) === 0 || $refresh) { $db = await self::genDb(); $all_teams = await self::genAllTeamsCache(); $teams_by_logo = array(); foreach ($all_teams as $team) { $teams_by_logo[$team->getLogo()][] = $team; } self::setMCRecords('TEAMS_BY_LOGO', new Map($teams_by_logo)); $teams_by_logo = new Map($teams_by_logo); if ((count($teams_by_logo) !== 0) && ($teams_by_logo->contains($logo))) { $teams = $teams_by_logo->get($logo); invariant( is_array($teams), 'teams should be an array of Team and not null', ); return $teams; } else { return array(); } } else { invariant( $mc_result instanceof Map, 'cache return should be of type Map', ); if ((count($mc_result) !== 0) && ($mc_result->contains($logo))) { $teams = $mc_result->get($logo); invariant( is_array($teams), 'cache return should be an array of Team and not null', ); return $teams; } else { return array(); } } } public static async function genCompletedLevel( int $level_id, bool $refresh = false, ): Awaitable<array<Team>> { $mc_result = self::getMCRecords('TEAMS_BY_LEVEL'); if (!$mc_result || count($mc_result) === 0 || $refresh) { $teams_by_completed_level = array(); $scores = await self::genTeamArrayFromDB( 'SELECT level_id, team_id FROM scores_log WHERE level_id IS NOT NULL ORDER BY ts', ); $team_scores_awaitables = Map {}; foreach ($scores->items() as $score) { $team_scores_awaitables->add( Pair { $score->get('level_id'), self::genTeam(intval($score->get('team_id'))), }, ); } $team_scores = await \HH\Asio\m($team_scores_awaitables); foreach ($team_scores as $level_id_key => $team) { if ($team->getActive() === true && $team->getVisible() === true) { $teams_by_completed_level[intval($level_id_key)][] = $team; } } self::setMCRecords( 'TEAMS_BY_LEVEL', new Map($teams_by_completed_level), ); $teams_by_completed_level = new Map($teams_by_completed_level); if ($teams_by_completed_level->contains($level_id)) { $teams = $teams_by_completed_level->get($level_id); invariant( is_array($teams), 'teams should be an array of Team and not null', ); return $teams; } else { return array(); } } else { invariant( $mc_result instanceof Map, 'cache return should of type Map and not null', ); if ($mc_result->contains($level_id)) { $teams = $mc_result->get($level_id); invariant( is_array($teams), 'cache return should be an array of Team and not null', ); return $teams; } else { return array(); } } } public static async function genAllCompletedLevels( bool $refresh = false, ): Awaitable<Map<int, Team>> { $mc_result = self::getMCRecords('TEAMS_BY_LEVEL'); if (!$mc_result || count($mc_result) === 0 || $refresh) { $teams_by_completed_level = array(); $scores = await self::genTeamArrayFromDB( 'SELECT level_id, team_id FROM scores_log WHERE level_id IS NOT NULL ORDER BY ts', ); $team_scores_awaitables = Map {}; foreach ($scores->items() as $score) { if ($team_scores_awaitables->contains( intval($score->get('level_id')), )) { $teams_vector = $team_scores_awaitables->get(intval($score->get('level_id'))); invariant( $teams_vector instanceof Vector, 'teams_map should of type Vector and not null', ); $teams_vector->add(self::genTeam(intval($score->get('team_id')))); $team_scores_awaitables->set( intval($score->get('level_id')), $teams_vector, ); } else { $teams_vector = Vector {}; $teams_vector->add(self::genTeam(intval($score->get('team_id')))); $team_scores_awaitables->add( Pair {intval($score->get('level_id')), $teams_vector}, ); } } $team_scores = await \HH\Asio\mmk( $team_scores_awaitables, async ($level_id_map_key, $teams_map) ==> { $teams = await \HH\Asio\v($teams_map); return $teams; }, ); foreach ($team_scores as $level_id_key => $teams_vector) { foreach ($teams_vector as $team) { if ($team->getActive() === true && $team->getVisible() === true) { $teams_by_completed_level[intval($level_id_key)][] = $team; } } } self::setMCRecords( 'TEAMS_BY_LEVEL', new Map($teams_by_completed_level), ); $teams_by_completed_level = new Map($teams_by_completed_level); invariant( $teams_by_completed_level instanceof Map, 'teams_by_completed_level should be a Map of Team', ); return $teams_by_completed_level; } else { invariant( $mc_result instanceof Map, 'cache return should of type Map and not null', ); return $mc_result; } } public static async function genCompletedLevelTeamNames( int $level_id, bool $refresh = false, ): Awaitable<array<string>> { $mc_result = self::getMCRecords('TEAMS_NAMES_BY_LEVEL'); if (!$mc_result || count($mc_result) === 0 || $refresh) { $team_names = array(); $teams = await self::genAllCompletedLevels(); invariant($teams instanceof Map, 'teams should be a Map of Team'); foreach ($teams as $level => $completed_arr) { invariant( is_array($completed_arr), 'completed_arr should be an array of Team', ); foreach ($completed_arr as $team_obj) { invariant( $team_obj instanceof Team, 'team_obj should be of type Team', ); $team_names[$level][] = $team_obj->getName(); } } self::setMCRecords('TEAMS_NAMES_BY_LEVEL', new Map($team_names)); $team_names = new Map($team_names); if ($team_names->contains($level_id)) { $team_name = $team_names->get($level_id); invariant( is_array($team_name), 'team_name should be an array of string and not null', ); return $team_name; } else { return array(); } } else { invariant( $mc_result instanceof Map, 'cache return should of type string and not null', ); if ($mc_result->contains($level_id)) { $team_name = $mc_result->get($level_id); invariant( is_array($team_name), 'cache return should be an array of string and not null', ); return $team_name; } else { return array(); } } } public static async function genFirstCapture( int $level_id, bool $refresh = false, ): Awaitable<Team> { $mc_result = self::getMCRecords('TEAMS_FIRST_CAP'); if (!$mc_result || count($mc_result) === 0 || $refresh) { $first_team_captured_by_level = array(); $captures = await self::genTeamArrayFromDB( 'SELECT sl.level_id, sl.team_id FROM (SELECT level_id, MIN(ts) ts FROM scores_log LEFT JOIN teams ON team_id = teams.id WHERE teams.visible = 1 AND teams.active = 1 GROUP BY level_id) sl2 JOIN scores_log sl ON sl.level_id = sl2.level_id AND sl.ts = sl2.ts;', ); $team_scores_awaitables = Map {}; foreach ($captures->items() as $capture) { $team_scores_awaitables->add( Pair { $capture->get('level_id'), self::genTeam(intval($capture->get('team_id'))), }, ); } $team_scores = await \HH\Asio\m($team_scores_awaitables); foreach ($team_scores as $level_id_key => $team) { $first_team_captured_by_level[intval($level_id_key)] = $team; } self::setMCRecords( 'TEAMS_FIRST_CAP', new Map($first_team_captured_by_level), ); $first_team_captured_by_level = new Map($first_team_captured_by_level); $team = $first_team_captured_by_level->get($level_id); invariant( $team instanceof Team, 'team should of type Team and not null', ); return $team; } else { invariant( $mc_result instanceof Map, 'cache return should of type Map and not null', ); $team = $mc_result->get($level_id); invariant( $team instanceof Team, 'team return should of type Map and not null', ); return $team; } } public static async function genMyTeamRank( int $team_id, ): Awaitable<(Team, int)> { $team = false; $rank = 1; $leaderboard = await MultiTeam::genLeaderboard(); foreach ($leaderboard as $team) { if ($team_id === $team->getId()) { return tuple($team, $rank); } $rank++; } invariant( $team instanceof Team, 'team return should of type Team and not null', ); return tuple($team, $rank); } } ```
```objective-c // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_REGISTER_CONFIGURATION_H_ #define V8_REGISTER_CONFIGURATION_H_ #include "src/base/macros.h" #include "src/globals.h" #include "src/machine-type.h" #include "src/reglist.h" #include "src/utils.h" namespace v8 { namespace internal { // An architecture independent representation of the sets of registers available // for instruction creation. class V8_EXPORT_PRIVATE RegisterConfiguration { public: enum AliasingKind { // Registers alias a single register of every other size (e.g. Intel). OVERLAP, // Registers alias two registers of the next smaller size (e.g. ARM). COMBINE }; // Architecture independent maxes. static constexpr int kMaxGeneralRegisters = 32; static constexpr int kMaxFPRegisters = 32; static constexpr int kMaxRegisters = Max(kMaxFPRegisters, kMaxGeneralRegisters); // Default RegisterConfigurations for the target architecture. static const RegisterConfiguration* Default(); // Register configuration with reserved masking register. static const RegisterConfiguration* Poisoning(); static const RegisterConfiguration* RestrictGeneralRegisters( RegList registers); RegisterConfiguration(int num_general_registers, int num_double_registers, int num_allocatable_general_registers, int num_allocatable_double_registers, const int* allocatable_general_codes, const int* allocatable_double_codes, AliasingKind fp_aliasing_kind); int num_general_registers() const { return num_general_registers_; } int num_float_registers() const { return num_float_registers_; } int num_double_registers() const { return num_double_registers_; } int num_simd128_registers() const { return num_simd128_registers_; } int num_allocatable_general_registers() const { return num_allocatable_general_registers_; } int num_allocatable_float_registers() const { return num_allocatable_float_registers_; } int num_allocatable_double_registers() const { return num_allocatable_double_registers_; } int num_allocatable_simd128_registers() const { return num_allocatable_simd128_registers_; } AliasingKind fp_aliasing_kind() const { return fp_aliasing_kind_; } int32_t allocatable_general_codes_mask() const { return allocatable_general_codes_mask_; } int32_t allocatable_double_codes_mask() const { return allocatable_double_codes_mask_; } int32_t allocatable_float_codes_mask() const { return allocatable_float_codes_mask_; } int GetAllocatableGeneralCode(int index) const { DCHECK(index >= 0 && index < num_allocatable_general_registers()); return allocatable_general_codes_[index]; } bool IsAllocatableGeneralCode(int index) const { return ((1 << index) & allocatable_general_codes_mask_) != 0; } int GetAllocatableFloatCode(int index) const { DCHECK(index >= 0 && index < num_allocatable_float_registers()); return allocatable_float_codes_[index]; } bool IsAllocatableFloatCode(int index) const { return ((1 << index) & allocatable_float_codes_mask_) != 0; } int GetAllocatableDoubleCode(int index) const { DCHECK(index >= 0 && index < num_allocatable_double_registers()); return allocatable_double_codes_[index]; } bool IsAllocatableDoubleCode(int index) const { return ((1 << index) & allocatable_double_codes_mask_) != 0; } int GetAllocatableSimd128Code(int index) const { DCHECK(index >= 0 && index < num_allocatable_simd128_registers()); return allocatable_simd128_codes_[index]; } bool IsAllocatableSimd128Code(int index) const { return ((1 << index) & allocatable_simd128_codes_mask_) != 0; } const int* allocatable_general_codes() const { return allocatable_general_codes_; } const int* allocatable_float_codes() const { return allocatable_float_codes_; } const int* allocatable_double_codes() const { return allocatable_double_codes_; } const int* allocatable_simd128_codes() const { return allocatable_simd128_codes_; } // Aliasing calculations for floating point registers, when fp_aliasing_kind() // is COMBINE. Currently only implemented for kFloat32, kFloat64, or kSimd128 // reps. Returns the number of aliases, and if > 0, alias_base_index is set to // the index of the first alias. int GetAliases(MachineRepresentation rep, int index, MachineRepresentation other_rep, int* alias_base_index) const; // Returns a value indicating whether two registers alias each other, when // fp_aliasing_kind() is COMBINE. Currently implemented for kFloat32, // kFloat64, or kSimd128 reps. bool AreAliases(MachineRepresentation rep, int index, MachineRepresentation other_rep, int other_index) const; virtual ~RegisterConfiguration() = default; private: const int num_general_registers_; int num_float_registers_; const int num_double_registers_; int num_simd128_registers_; int num_allocatable_general_registers_; int num_allocatable_float_registers_; int num_allocatable_double_registers_; int num_allocatable_simd128_registers_; int32_t allocatable_general_codes_mask_; int32_t allocatable_float_codes_mask_; int32_t allocatable_double_codes_mask_; int32_t allocatable_simd128_codes_mask_; const int* allocatable_general_codes_; int allocatable_float_codes_[kMaxFPRegisters]; const int* allocatable_double_codes_; int allocatable_simd128_codes_[kMaxFPRegisters]; AliasingKind fp_aliasing_kind_; }; } // namespace internal } // namespace v8 #endif // V8_REGISTER_CONFIGURATION_H_ ```
```smalltalk using FlaUI.Core.AutomationElements; using FlaUI.Core.Identifiers; using FlaUI.Core.Patterns.Infrastructure; namespace FlaUI.Core.Patterns { public interface IDragPattern : IPattern { IDragPatternPropertyIds PropertyIds { get; } IDragPatternEventIds EventIds { get; } AutomationProperty<string> DropEffect { get; } AutomationProperty<string[]> DropEffects { get; } AutomationProperty<bool> IsGrabbed { get; } AutomationProperty<AutomationElement[]> GrabbedItems { get; } } public interface IDragPatternPropertyIds { PropertyId DropEffect { get; } PropertyId DropEffects { get; } PropertyId IsGrabbed { get; } PropertyId GrabbedItems { get; } } public interface IDragPatternEventIds { EventId DragCancelEvent { get; } EventId DragCompleteEvent { get; } EventId DragStartEvent { get; } } public abstract class DragPatternBase<TNativePattern> : PatternBase<TNativePattern>, IDragPattern where TNativePattern : class { private AutomationProperty<string> _dropEffect; private AutomationProperty<string[]> _dropEffects; private AutomationProperty<bool> _isGrabbed; private AutomationProperty<AutomationElement[]> _grabbedItems; protected DragPatternBase(FrameworkAutomationElementBase frameworkAutomationElement, TNativePattern nativePattern) : base(frameworkAutomationElement, nativePattern) { } public IDragPatternPropertyIds PropertyIds => Automation.PropertyLibrary.Drag; public IDragPatternEventIds EventIds => Automation.EventLibrary.Drag; public AutomationProperty<string> DropEffect => GetOrCreate(ref _dropEffect, PropertyIds.DropEffect); public AutomationProperty<string[]> DropEffects => GetOrCreate(ref _dropEffects, PropertyIds.DropEffects); public AutomationProperty<bool> IsGrabbed => GetOrCreate(ref _isGrabbed, PropertyIds.IsGrabbed); public AutomationProperty<AutomationElement[]> GrabbedItems => GetOrCreate(ref _grabbedItems, PropertyIds.GrabbedItems); } } ```
```java package org.hongxi.java.util.function; import java.util.function.BiFunction; import java.util.function.Function; /** * Created by shenhongxi on 2021/1/6. */ public class FunctionTest { public static void main(String[] args) { Function<Integer, Integer> f = x -> x * 2; System.out.println("1*2=" + f.apply(1)); BiFunction<Integer, Integer, Integer> f2 = (x, y) -> x - y; BiFunction<Integer, Integer, Integer> f3 = Integer::sum; BiFunction<Integer, Integer, Integer> f4 = FunctionTest::sum; System.out.println("3-1=" + f2.apply(3, 1)); System.out.println("1+2=" + f3.apply(1, 2)); System.out.println("(1+2)*2=" + f4.andThen(f).apply(1, 2)); } public static int sum(int a, int b) { return a + b; } } ```
```go package system // This file implements syscalls for Win32 events which are not implemented // in golang. import ( "syscall" "unsafe" "golang.org/x/sys/windows" ) var ( procCreateEvent = modkernel32.NewProc("CreateEventW") procOpenEvent = modkernel32.NewProc("OpenEventW") procSetEvent = modkernel32.NewProc("SetEvent") procResetEvent = modkernel32.NewProc("ResetEvent") procPulseEvent = modkernel32.NewProc("PulseEvent") ) // CreateEvent implements win32 CreateEventW func in golang. It will create an event object. func CreateEvent(eventAttributes *syscall.SecurityAttributes, manualReset bool, initialState bool, name string) (handle syscall.Handle, err error) { namep, _ := syscall.UTF16PtrFromString(name) var _p1 uint32 if manualReset { _p1 = 1 } var _p2 uint32 if initialState { _p2 = 1 } r0, _, e1 := procCreateEvent.Call(uintptr(unsafe.Pointer(eventAttributes)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(namep))) use(unsafe.Pointer(namep)) handle = syscall.Handle(r0) if handle == syscall.InvalidHandle { err = e1 } return } // OpenEvent implements win32 OpenEventW func in golang. It opens an event object. func OpenEvent(desiredAccess uint32, inheritHandle bool, name string) (handle syscall.Handle, err error) { namep, _ := syscall.UTF16PtrFromString(name) var _p1 uint32 if inheritHandle { _p1 = 1 } r0, _, e1 := procOpenEvent.Call(uintptr(desiredAccess), uintptr(_p1), uintptr(unsafe.Pointer(namep))) use(unsafe.Pointer(namep)) handle = syscall.Handle(r0) if handle == syscall.InvalidHandle { err = e1 } return } // SetEvent implements win32 SetEvent func in golang. func SetEvent(handle syscall.Handle) (err error) { return setResetPulse(handle, procSetEvent) } // ResetEvent implements win32 ResetEvent func in golang. func ResetEvent(handle syscall.Handle) (err error) { return setResetPulse(handle, procResetEvent) } // PulseEvent implements win32 PulseEvent func in golang. func PulseEvent(handle syscall.Handle) (err error) { return setResetPulse(handle, procPulseEvent) } func setResetPulse(handle syscall.Handle, proc *windows.LazyProc) (err error) { r0, _, _ := proc.Call(uintptr(handle)) if r0 != 0 { err = syscall.Errno(r0) } return } var temp unsafe.Pointer // use ensures a variable is kept alive without the GC freeing while still needed func use(p unsafe.Pointer) { temp = p } ```
```pod =pod =head1 NAME SSL_set_shutdown, SSL_get_shutdown - manipulate shutdown state of an SSL connection =head1 SYNOPSIS #include <openssl/ssl.h> void SSL_set_shutdown(SSL *ssl, int mode); int SSL_get_shutdown(const SSL *ssl); =head1 DESCRIPTION SSL_set_shutdown() sets the shutdown state of B<ssl> to B<mode>. SSL_get_shutdown() returns the shutdown mode of B<ssl>. =head1 NOTES The shutdown state of an ssl connection is a bitmask of: =over 4 =item Z<>0 No shutdown setting, yet. =item SSL_SENT_SHUTDOWN A "close notify" shutdown alert was sent to the peer, the connection is being considered closed and the session is closed and correct. =item SSL_RECEIVED_SHUTDOWN A shutdown alert was received form the peer, either a normal "close notify" or a fatal error. =back SSL_SENT_SHUTDOWN and SSL_RECEIVED_SHUTDOWN can be set at the same time. The shutdown state of the connection is used to determine the state of the ssl session. If the session is still open, when L<SSL_clear(3)|SSL_clear(3)> or L<SSL_free(3)|SSL_free(3)> is called, it is considered bad and removed according to RFC2246. The actual condition for a correctly closed session is SSL_SENT_SHUTDOWN (according to the TLS RFC, it is acceptable to only send the "close notify" alert but to not wait for the peer's answer, when the underlying connection is closed). SSL_set_shutdown() can be used to set this state without sending a close alert to the peer (see L<SSL_shutdown(3)|SSL_shutdown(3)>). If a "close notify" was received, SSL_RECEIVED_SHUTDOWN will be set, for setting SSL_SENT_SHUTDOWN the application must however still call L<SSL_shutdown(3)|SSL_shutdown(3)> or SSL_set_shutdown() itself. =head1 RETURN VALUES SSL_set_shutdown() does not return diagnostic information. SSL_get_shutdown() returns the current setting. =head1 SEE ALSO L<ssl(3)|ssl(3)>, L<SSL_shutdown(3)|SSL_shutdown(3)>, L<SSL_CTX_set_quiet_shutdown(3)|SSL_CTX_set_quiet_shutdown(3)>, L<SSL_clear(3)|SSL_clear(3)>, L<SSL_free(3)|SSL_free(3)> =cut ```
```shell #!/bin/bash export JAVA_OPTS="${JAVA_OPTS} -javaagent:${AGENT_PATH}" /entrypoint.py ```
```javascript ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function () { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start": [{ include: ["strings", "url", "comments"] }, { token: "paren.lparen", regex: "\\{", next: "ruleset" }, { token: "paren.rparen", regex: "\\}" }, { token: "string", regex: "@(?!viewport)", next: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "keyword", regex: "%" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant.numeric", regex: numRe }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media": [{ include: ["strings", "url", "comments"] }, { token: "paren.lparen", regex: "\\{", next: "start" }, { token: "paren.rparen", regex: "\\}", next: "start" }, { token: "string", regex: ";", next: "start" }, { token: "keyword", regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + "|page|font|keyframes|viewport|counter-style|font-feature-values" + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" }], "comments": [{ token: "comment", regex: "\\/\\*", push: [{ token: "comment", regex: "\\*\\/", next: "pop" }, { defaultToken: "comment" }] }], "ruleset": [{ regex: "-(webkit|ms|moz|o)-", token: "text" }, { token: "punctuation.operator", regex: "[:;]" }, { token: "paren.rparen", regex: "\\}", next: "start" }, { include: ["strings", "url", "comments"] }, { token: ["constant.numeric", "keyword"], regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token: "constant.numeric", regex: numRe }, { token: "constant.numeric", regex: "#[a-f0-9]{6}" }, { token: "constant.numeric", regex: "#[a-f0-9]{3}" }, { token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: pseudoElements }, { token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: pseudoClasses }, { include: "url" }, { token: keywordMapper, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }], url: [{ token: "support.function", regex: "(?:url(:?-prefix)?|domain|regexp)\\(", push: [{ token: "support.function", regex: "\\)", next: "pop" }, { defaultToken: "string" }] }], strings: [{ token: "string.start", regex: "'", push: [{ token: "string.end", regex: "'|$", next: "pop" }, { include: "escapes" }, { token: "constant.language.escape", regex: /\\$/, consumeLineEnd: true }, { defaultToken: "string" }] }, { token: "string.start", regex: '"', push: [{ token: "string.end", regex: '"|$', next: "pop" }, { include: "escapes" }, { token: "constant.language.escape", regex: /\\$/, consumeLineEnd: true }, { defaultToken: "string" }] }], escapes: [{ token: "constant.language.escape", regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); ace.define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var CssHighlightRules = require('./css_highlight_rules'); var LessHighlightRules = function () { var keywordList = "@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|" + "@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|" + "or|and|when|not"; var keywords = keywordList.split('|'); var properties = CssHighlightRules.supportType.split('|'); var keywordMapper = this.createKeywordMapper({ "support.constant": CssHighlightRules.supportConstant, "keyword": keywordList, "support.constant.color": CssHighlightRules.supportConstantColor, "support.constant.fonts": CssHighlightRules.supportConstantFonts }, "identifier", true); var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; this.$rules = { "start": [ { token: "comment", regex: "\\/\\/.*$" }, { token: "comment", regex: "\\/\\*", next: "comment" }, { token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token: ["constant.numeric", "keyword"], regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token: "constant.numeric", regex: "#[a-f0-9]{6}" }, { token: "constant.numeric", regex: "#[a-f0-9]{3}" }, { token: "constant.numeric", regex: numRe }, { token: ["support.function", "paren.lparen", "string", "paren.rparen"], regex: "(url)(\\()(.*)(\\))" }, { token: ["support.function", "paren.lparen"], regex: "(:extend|[a-z0-9_\\-]+)(\\()" }, { token: function (value) { if (keywords.indexOf(value.toLowerCase()) > -1) return "keyword"; else return "variable"; }, regex: "[@\\$][a-z0-9_\\-@\\$]*\\b" }, { token: "variable", regex: "[@\\$]\\{[a-z0-9_\\-@\\$]*\\}" }, { token: function (first, second) { if (properties.indexOf(first.toLowerCase()) > -1) { return ["support.type.property", "text"]; } else { return ["support.type.unknownProperty", "text"]; } }, regex: "([a-z0-9-_]+)(\\s*:)" }, { token: "keyword", regex: "&" // special case - always treat as keyword }, { token: keywordMapper, regex: "\\-?[@a-z_][@a-z0-9_\\-]*" }, { token: "variable.language", regex: "#[a-z0-9-_]+" }, { token: "variable.language", regex: "\\.[a-z0-9-_]+" }, { token: "variable.language", regex: ":[a-z_][a-z0-9-_]*" }, { token: "constant", regex: "[a-z0-9-_]+" }, { token: "keyword.operator", regex: "<|>|<=|>=|=|!=|-|%|\\+|\\*" }, { token: "paren.lparen", regex: "[[({]" }, { token: "paren.rparen", regex: "[\\])}]" }, { token: "text", regex: "\\s+" }, { caseInsensitive: true } ], "comment": [ { token: "comment", regex: "\\*\\/", next: "start" }, { defaultToken: "comment" } ] }; this.normalizeRules(); }; oop.inherits(LessHighlightRules, TextHighlightRules); exports.LessHighlightRules = LessHighlightRules; }); ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function () { }; (function () { this.checkOutdent = function (line, input) { if (!/^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function (doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({ row: row, column: column }); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column - 1), indent); }; this.$getIndent = function (line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] }; } if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] }; } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] }; } } }); this.add("!important", "insertion", function (state, action, editor, session, text) { if (text === '!' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { return { text: '!important', selection: [10, 10] }; } } }); }; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; var propertyMap = { "background": { "#$0": 1 }, "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, "background-image": { "url('/$0')": 1 }, "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, "background-attachment": { "scroll": 1, "fixed": 1 }, "background-size": { "cover": 1, "contain": 1 }, "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, "border-color": { "#$0": 1 }, "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, "border-collapse": { "collapse": 1, "separate": 1 }, "bottom": { "px": 1, "em": 1, "%": 1 }, "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, "empty-cells": { "show": 1, "hide": 1 }, "float": { "left": 1, "right": 1, "none": 1 }, "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, "font-size": { "px": 1, "em": 1, "%": 1 }, "font-weight": { "bold": 1, "normal": 1 }, "font-style": { "italic": 1, "normal": 1 }, "font-variant": { "normal": 1, "small-caps": 1 }, "height": { "px": 1, "em": 1, "%": 1 }, "left": { "px": 1, "em": 1, "%": 1 }, "letter-spacing": { "normal": 1 }, "line-height": { "normal": 1 }, "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, "margin": { "px": 1, "em": 1, "%": 1 }, "margin-right": { "px": 1, "em": 1, "%": 1 }, "margin-left": { "px": 1, "em": 1, "%": 1 }, "margin-top": { "px": 1, "em": 1, "%": 1 }, "margin-bottom": { "px": 1, "em": 1, "%": 1 }, "max-height": { "px": 1, "em": 1, "%": 1 }, "max-width": { "px": 1, "em": 1, "%": 1 }, "min-height": { "px": 1, "em": 1, "%": 1 }, "min-width": { "px": 1, "em": 1, "%": 1 }, "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, "padding": { "px": 1, "em": 1, "%": 1 }, "padding-top": { "px": 1, "em": 1, "%": 1 }, "padding-right": { "px": 1, "em": 1, "%": 1 }, "padding-bottom": { "px": 1, "em": 1, "%": 1 }, "padding-left": { "px": 1, "em": 1, "%": 1 }, "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, "right": { "px": 1, "em": 1, "%": 1 }, "table-layout": { "fixed": 1, "auto": 1 }, "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, "top": { "px": 1, "em": 1, "%": 1 }, "vertical-align": { "top": 1, "bottom": 1 }, "visibility": { "hidden": 1, "visible": 1 }, "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, "width": { "px": 1, "em": 1, "%": 1 }, "word-spacing": { "normal": 1 }, "filter": { "alpha(opacity=$0100)": 1 }, "text-shadow": { "$02px 2px 2px #777": 1 }, "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, "-moz-border-radius": 1, "-moz-border-radius-topright": 1, "-moz-border-radius-bottomright": 1, "-moz-border-radius-topleft": 1, "-moz-border-radius-bottomleft": 1, "-webkit-border-radius": 1, "-webkit-border-top-right-radius": 1, "-webkit-border-top-left-radius": 1, "-webkit-border-bottom-right-radius": 1, "-webkit-border-bottom-left-radius": 1, "-moz-box-shadow": 1, "-webkit-box-shadow": 1, "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } }; var CssCompletions = function () { }; (function () { this.completionsDefined = false; this.defineCompletions = function () { if (document) { var style = document.createElement('c').style; for (var i in style) { if (typeof style[i] !== 'string') continue; var name = i.replace(/[A-Z]/g, function (x) { return '-' + x.toLowerCase(); }); if (!propertyMap.hasOwnProperty(name)) propertyMap[name] = 1; } } this.completionsDefined = true; }; this.getCompletions = function (state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); var inParens = /\([^)]*$/.test(line); if (inParens) { line = line.substr(line.lastIndexOf('(') + 1); } if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); return this.getPropertyValueCompletions(state, session, pos, prefix); } else { return this.getPropertyCompletions(state, session, pos, prefix, inParens); } } return []; }; this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { skipSemicolon = skipSemicolon || false; var properties = Object.keys(propertyMap); return properties.map(function (property) { return { caption: property, snippet: property + ': $0' + (skipSemicolon ? '' : ';'), meta: "property", score: 1000000 }; }); }; this.getPropertyValueCompletions = function (state, session, pos, prefix) { var line = session.getLine(pos.row).substr(0, pos.column); var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; if (!property) return []; var values = []; if (property in propertyMap && typeof propertyMap[property] === "object") { values = Object.keys(propertyMap[property]); } return values.map(function (value) { return { caption: value, snippet: value, meta: "property value", score: 1000000 }; }); }; }).call(CssCompletions.prototype); exports.CssCompletions = CssCompletions; }); ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function (commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); } }; oop.inherits(FoldMode, BaseFoldMode); (function () { this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function (session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function (session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function (session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); ace.define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/css_completions","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CssCompletions = require("./css_completions").CssCompletions; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function () { this.HighlightRules = LessHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.$completer = new CssCompletions(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function () { this.lineCommentStart = "//"; this.blockComment = { start: "/*", end: "*/" }; this.getNextLineIndent = function (state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length - 1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function (state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function (state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.getCompletions = function (state, session, pos, prefix) { return this.$completer.getCompletions("ruleset", session, pos, prefix); }; this.$id = "ace/mode/less"; }).call(Mode.prototype); exports.Mode = Mode; }); (function() { ace.require(["ace/mode/less"], function(m) { if (typeof module == "object" && typeof exports == "object" && module) { module.exports = m; } }); })(); ```
Haircut () is an independent Portuguese drama film directed by Joaquim Sapinho, produced at Rosa Filmes, which was nominated for the Golden Leopard at the 1995 Locarno International Film Festival. Reception Being nominated for the Golden Leopard at the 1995 Locarno International Film Festival, Haircut also won the award for best film at the 1996 Angers European Film Festival, and the Best Actress Award for Carla Bolito at the Geneva Film Festival. In its home country, Haircut was highly acclaimed both by the critic and by the audience in an unprecedented way for Portugal. It was considered the best depiction of the Portuguese youth of the nineties captured on film. The Brazilian newspaper Estado de São Paulo called it the first post-modern Portuguese film. Production Haircut was not only the directorial debut of Portuguese director Joaquim Sapinho, but also the film debut for most of the cast and crew of the film. Haircut became famous even before having been shot, for its long pre-production, which consisted on thousands of casting calls, which would finally end with the finding of the leading lady Carla Bolito. The film was shot in a series of popular locations in Lisbon where, however, no film had ever been shot before, like the 1960s expressionist Mexicana café (architect Jorge Ferreira Chaves), the 1980s post-modern shopping center Amoreiras or the Príncipe Real Garden where, some years later, the final scene of João César Monteiro's film Vai e Vem would be shot. Plot The film is set in Lisbon, and tells the story of a day in the life of Rita and Paulo, a Portuguese young couple of the 90's, belonging to the first generation of Portuguese to grow up inside the European Union. The fast changing city around them makes them wish to break with all traditions and live the day the get married (only civil marriage) like it is an ordinary day. However, for some reason Rita wants to be absolutely sure Paulo loves her and decides to cut her long black hair short before the ceremony. Rita and Paulo still get married, but Rita's haircut would drastically and unexpectedly change their relationship. Cast as Rita as Paulo Francisco Nascimento as Lucas Orlando Sérgio as the black man References External links Haircut official page at Rosa Filmes web site (click on "ENG", then on "DIRECTORS", then on "JOAQUIM SAPINHO", then on "HAIRCUT") Film review at Variety by David Rooney Films directed by Joaquim Sapinho Films set in Lisbon Portuguese drama films 1990s Portuguese-language films 1995 films 1995 drama films
```java /** * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. * * * 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.quartz.utils.counter.sampled; import org.quartz.utils.counter.Counter; import org.quartz.utils.counter.CounterConfig; /** * Config for a {@link SampledCounter} * * @author <a href="mailto:asanoujam@terracottatech.com">Abhishek Sanoujam</a> * @since 1.7 * */ public class SampledCounterConfig extends CounterConfig { private final int intervalSecs; private final int historySize; private final boolean isReset; /** * Make a new timed counter config (duh) * * @param intervalSecs * the interval (in seconds) between sampling * @param historySize * number of counter samples that will be retained in memory * @param isResetOnSample * true if the counter should be reset to 0 upon each sample */ public SampledCounterConfig(int intervalSecs, int historySize, boolean isResetOnSample, long initialValue) { super(initialValue); if (intervalSecs < 1) { throw new IllegalArgumentException("Interval (" + intervalSecs + ") must be greater than or equal to 1"); } if (historySize < 1) { throw new IllegalArgumentException("History size (" + historySize + ") must be greater than or equal to 1"); } this.intervalSecs = intervalSecs; this.historySize = historySize; this.isReset = isResetOnSample; } /** * Returns the history size * * @return The history size */ public int getHistorySize() { return historySize; } /** * Returns the interval time (seconds) * * @return Interval of the sampling thread in seconds */ public int getIntervalSecs() { return intervalSecs; } /** * Returns true if counters created from this config will reset on each * sample * * @return true if values are reset to the initial value after each sample */ public boolean isResetOnSample() { return this.isReset; } /** * {@inheritDoc} */ @Override public Counter createCounter() { return new SampledCounterImpl(this); } } ```
Bourdet is a French surname. It may refer to: Claude Bourdet (1909-1996), writer and politician Edouard Bourdet (1887-1945), playwright. It may also refer to: Le Bourdet, a commune in the Deux-Sèvres department.
Kord Khvord or Kard Khowrd or Kord Khurd or Kard Khurd or Kard Khvord () may refer to: Kord Khvord-e Olya Kord Khvord-e Sofla
```smalltalk using Microsoft.Build.Framework; using Xamarin.Messaging.Build.Client; namespace Xamarin.MacDev.Tasks { public class ALToolUpload : ALToolTaskBase, ICancelableTask { protected override string ALToolAction => "--upload-app"; public override bool Execute () { if (ShouldExecuteRemotely ()) return new TaskRunner (SessionId, BuildEngine4).RunAsync (this).Result; return base.Execute (); } public override void Cancel () { if (ShouldExecuteRemotely ()) BuildConnection.CancelAsync (BuildEngine4).Wait (); base.Cancel (); } } } ```
```go // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package executor import ( "fmt" "testing" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" "github.com/m3db/m3/src/m3ninx/doc" "github.com/m3db/m3/src/m3ninx/index" "github.com/m3db/m3/src/m3ninx/postings/roaring" "github.com/m3db/m3/src/m3ninx/search" "github.com/m3db/m3/src/x/context" ) func TestIterator(t *testing.T) { mockCtrl := gomock.NewController(t) defer mockCtrl.Finish() // Set up Searcher. firstPL := roaring.NewPostingsList() require.NoError(t, firstPL.Insert(42)) require.NoError(t, firstPL.Insert(47)) secondPL := roaring.NewPostingsList() require.NoError(t, secondPL.Insert(67)) // Set up Readers. docs := []doc.Document{ doc.NewDocumentFromEncoded(doc.Encoded{Bytes: []byte("encodedbytes1")}), doc.NewDocumentFromEncoded(doc.Encoded{Bytes: []byte("encodedbytes2")}), doc.NewDocumentFromEncoded(doc.Encoded{Bytes: []byte("encodedbytes3")}), } firstDocIter := doc.NewMockIterator(mockCtrl) secondDocIter := doc.NewMockIterator(mockCtrl) gomock.InOrder( firstDocIter.EXPECT().Next().Return(true), firstDocIter.EXPECT().Current().Return(docs[0]), firstDocIter.EXPECT().Next().Return(true), firstDocIter.EXPECT().Current().Return(docs[1]), firstDocIter.EXPECT().Next().Return(false), firstDocIter.EXPECT().Err().Return(nil), firstDocIter.EXPECT().Close().Return(nil), secondDocIter.EXPECT().Next().Return(true), secondDocIter.EXPECT().Current().Return(docs[2]), secondDocIter.EXPECT().Next().Return(false), secondDocIter.EXPECT().Err().Return(nil), secondDocIter.EXPECT().Close().Return(nil), ) firstReader := index.NewMockReader(mockCtrl) secondReader := index.NewMockReader(mockCtrl) gomock.InOrder( firstReader.EXPECT().Docs(firstPL).Return(firstDocIter, nil), secondReader.EXPECT().Docs(secondPL).Return(secondDocIter, nil), ) searcher := search.NewMockSearcher(mockCtrl) gomock.InOrder( searcher.EXPECT().Search(firstReader).Return(firstPL, nil), searcher.EXPECT().Search(secondReader).Return(secondPL, nil), ) query := search.NewMockQuery(mockCtrl) query.EXPECT().Searcher().Return(searcher, nil) readers := index.Readers{firstReader, secondReader} // Construct iterator and run tests. iter, err := newIterator(context.NewBackground(), query, readers) require.NoError(t, err) require.False(t, iter.Done()) require.True(t, iter.Next()) require.Equal(t, docs[0], iter.Current()) require.False(t, iter.Done()) require.True(t, iter.Next()) require.Equal(t, docs[1], iter.Current()) require.False(t, iter.Done()) require.True(t, iter.Next()) require.Equal(t, docs[2], iter.Current()) require.True(t, iter.Done()) require.False(t, iter.Next()) require.NoError(t, iter.Err()) require.NoError(t, iter.Close()) } func TestCloseEarly(t *testing.T) { mockCtrl := gomock.NewController(t) defer mockCtrl.Finish() // Set up Searcher. firstPL := roaring.NewPostingsList() require.NoError(t, firstPL.Insert(42)) require.NoError(t, firstPL.Insert(47)) secondPL := roaring.NewPostingsList() require.NoError(t, secondPL.Insert(67)) // Set up Readers. docs := []doc.Document{ doc.NewDocumentFromEncoded(doc.Encoded{Bytes: []byte("encodedbytes1")}), doc.NewDocumentFromEncoded(doc.Encoded{Bytes: []byte("encodedbytes2")}), doc.NewDocumentFromEncoded(doc.Encoded{Bytes: []byte("encodedbytes3")}), } firstDocIter := doc.NewMockIterator(mockCtrl) secondDocIter := doc.NewMockIterator(mockCtrl) gomock.InOrder( firstDocIter.EXPECT().Next().Return(true), firstDocIter.EXPECT().Current().Return(docs[0]), firstDocIter.EXPECT().Next().Return(true), firstDocIter.EXPECT().Current().Return(docs[1]), firstDocIter.EXPECT().Close().Return(nil), secondDocIter.EXPECT().Close().Return(nil), ) firstReader := index.NewMockReader(mockCtrl) secondReader := index.NewMockReader(mockCtrl) gomock.InOrder( firstReader.EXPECT().Docs(firstPL).Return(firstDocIter, nil), secondReader.EXPECT().Docs(secondPL).Return(secondDocIter, nil), ) searcher := search.NewMockSearcher(mockCtrl) gomock.InOrder( searcher.EXPECT().Search(firstReader).Return(firstPL, nil), searcher.EXPECT().Search(secondReader).Return(secondPL, nil), ) query := search.NewMockQuery(mockCtrl) query.EXPECT().Searcher().Return(searcher, nil) readers := index.Readers{firstReader, secondReader} // Construct iterator and run tests. iter, err := newIterator(context.NewBackground(), query, readers) require.NoError(t, err) require.True(t, iter.Next()) require.Equal(t, docs[0], iter.Current()) require.NoError(t, iter.Close()) } func TestErrIterating(t *testing.T) { mockCtrl := gomock.NewController(t) defer mockCtrl.Finish() // Set up Searcher. firstPL := roaring.NewPostingsList() secondPL := roaring.NewPostingsList() // Set up Readers. docs := []doc.Document{ doc.NewDocumentFromEncoded(doc.Encoded{Bytes: []byte("encodedbytes1")}), doc.NewDocumentFromEncoded(doc.Encoded{Bytes: []byte("encodedbytes2")}), doc.NewDocumentFromEncoded(doc.Encoded{Bytes: []byte("encodedbytes3")}), } firstDocIter := doc.NewMockIterator(mockCtrl) secondDocIter := doc.NewMockIterator(mockCtrl) gomock.InOrder( firstDocIter.EXPECT().Next().Return(true), firstDocIter.EXPECT().Current().Return(docs[0]), firstDocIter.EXPECT().Next().Return(false), firstDocIter.EXPECT().Err().Return(fmt.Errorf("failed")), firstDocIter.EXPECT().Close().Return(nil), secondDocIter.EXPECT().Close().Return(nil), ) firstReader := index.NewMockReader(mockCtrl) secondReader := index.NewMockReader(mockCtrl) gomock.InOrder( firstReader.EXPECT().Docs(firstPL).Return(firstDocIter, nil), secondReader.EXPECT().Docs(secondPL).Return(secondDocIter, nil), ) searcher := search.NewMockSearcher(mockCtrl) gomock.InOrder( searcher.EXPECT().Search(firstReader).Return(firstPL, nil), searcher.EXPECT().Search(secondReader).Return(secondPL, nil), ) query := search.NewMockQuery(mockCtrl) query.EXPECT().Searcher().Return(searcher, nil) readers := index.Readers{firstReader, secondReader} // Construct iterator and run tests. iter, err := newIterator(context.NewBackground(), query, readers) require.NoError(t, err) require.False(t, iter.Done()) require.True(t, iter.Next()) require.Equal(t, docs[0], iter.Current()) require.True(t, iter.Done()) require.False(t, iter.Next()) require.Error(t, iter.Err()) require.True(t, iter.Done()) require.NoError(t, iter.Close()) } func TestCloseBeforeNext(t *testing.T) { mockCtrl := gomock.NewController(t) defer mockCtrl.Finish() query := search.NewMockQuery(mockCtrl) query.EXPECT().Searcher().Return(nil, nil) iter, err := newIterator(context.NewBackground(), query, nil) require.NoError(t, err) require.NoError(t, iter.Close()) } func TestNoReaders(t *testing.T) { mockCtrl := gomock.NewController(t) defer mockCtrl.Finish() query := search.NewMockQuery(mockCtrl) query.EXPECT().Searcher().Return(nil, nil) iter, err := newIterator(context.NewBackground(), query, index.Readers{}) require.NoError(t, err) require.False(t, iter.Done()) require.False(t, iter.Next()) require.True(t, iter.Done()) require.NoError(t, iter.Close()) } func TestEmptyReaders(t *testing.T) { mockCtrl := gomock.NewController(t) defer mockCtrl.Finish() // Set up Searcher. firstPL := roaring.NewPostingsList() secondPL := roaring.NewPostingsList() // Set up Readers. firstDocIter := doc.NewMockIterator(mockCtrl) secondDocIter := doc.NewMockIterator(mockCtrl) gomock.InOrder( firstDocIter.EXPECT().Next().Return(false), firstDocIter.EXPECT().Err().Return(nil), firstDocIter.EXPECT().Close().Return(nil), secondDocIter.EXPECT().Next().Return(false), secondDocIter.EXPECT().Err().Return(nil), secondDocIter.EXPECT().Close().Return(nil), ) firstReader := index.NewMockReader(mockCtrl) secondReader := index.NewMockReader(mockCtrl) gomock.InOrder( firstReader.EXPECT().Docs(firstPL).Return(firstDocIter, nil), secondReader.EXPECT().Docs(secondPL).Return(secondDocIter, nil), ) searcher := search.NewMockSearcher(mockCtrl) gomock.InOrder( searcher.EXPECT().Search(firstReader).Return(firstPL, nil), searcher.EXPECT().Search(secondReader).Return(secondPL, nil), ) query := search.NewMockQuery(mockCtrl) query.EXPECT().Searcher().Return(searcher, nil) readers := index.Readers{firstReader, secondReader} // Construct iterator and run tests. iter, err := newIterator(context.NewBackground(), query, readers) require.NoError(t, err) require.False(t, iter.Done()) require.False(t, iter.Next()) require.True(t, iter.Done()) require.NoError(t, iter.Close()) } ```
Pochyta is a genus of African jumping spiders that was first described by Eugène Louis Simon in 1901. Species it contains twelve species, found only in Africa: Pochyta aurantiaca Wesołowska & Szűts, 2021 – Gabon Pochyta equatorialis Wesołowska & Szűts, 2021 – Gabon Pochyta fastibilis Simon, 1903 – Cameroon, Gabon Pochyta insulana Simon, 1910 – São Tomé and Príncipe Pochyta konilokho Wesołowska & Szűts, 2021 – Guinea Pochyta lucida Wesołowska & Szűts, 2021 – Gabon Pochyta maddisoni Wesołowska & Szűts, 2021 – Gabon Pochyta major Simon, 1902 – Cameroon, Gabon, Angola Pochyta minuta Wesołowska & Szűts, 2021 – Nigeria Pochyta pulchra (Thorell, 1899) – Cameroon, Gabon Pochyta spinosa Simon, 1901 (type) – Guinea, Sierra Leone, Ghana, Nigeria, Cameroon, Gabon, Mozambique, Madagascar Pochyta tendicula Wesołowska & Szűts, 2021 – Gabon References Salticidae genera Salticidae Spiders of Africa
```css /*! Chosen, a Select Box Enhancer for jQuery and Prototype by Patrick Filler for Harvest, path_to_url Version 1.5.1 Full source at path_to_url This file is generated by `grunt build`, do not edit it by hand. */ /* @group Base */ .chosen-container { position: relative; display: inline-block; vertical-align: middle; font-size: 13px; -webkit-user-select: none; -moz-user-select: none; user-select: none; } .chosen-container * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .chosen-container .chosen-drop { position: absolute; top: 100%; left: -9999px; z-index: 1010; width: 100%; border: 1px solid #aaa; border-top: 0; background: #fff; box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); } .chosen-container.chosen-with-drop .chosen-drop { left: 0; } .chosen-container a { cursor: pointer; } .chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name { margin-right: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: normal; color: #999999; } .chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after { content: ":"; padding-left: 2px; vertical-align: top; } /* @end */ /* @group Single Chosen */ .chosen-container-single .chosen-single { position: relative; display: block; overflow: hidden; padding: 0 0 0 8px; height: 25px; border: 1px solid #aaa; border-radius: 5px; background-color: #fff; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4)); background: -webkit-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); background: -moz-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); background: -o-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); background: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); background-clip: padding-box; box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1); color: #444; text-decoration: none; white-space: nowrap; line-height: 24px; } .chosen-container-single .chosen-default { color: #999; } .chosen-container-single .chosen-single span { display: block; overflow: hidden; margin-right: 26px; text-overflow: ellipsis; white-space: nowrap; } .chosen-container-single .chosen-single-with-deselect span { margin-right: 38px; } .chosen-container-single .chosen-single abbr { position: absolute; top: 6px; right: 26px; display: block; width: 12px; height: 12px; background: url('chosen-sprite.png') -42px 1px no-repeat; font-size: 1px; } .chosen-container-single .chosen-single abbr:hover { background-position: -42px -10px; } .chosen-container-single.chosen-disabled .chosen-single abbr:hover { background-position: -42px -10px; } .chosen-container-single .chosen-single div { position: absolute; top: 0; right: 0; display: block; width: 18px; height: 100%; } .chosen-container-single .chosen-single div b { display: block; width: 100%; height: 100%; background: url('chosen-sprite.png') no-repeat 0px 2px; } .chosen-container-single .chosen-search { position: relative; z-index: 1010; margin: 0; padding: 3px 4px; white-space: nowrap; } .chosen-container-single .chosen-search input[type="text"] { margin: 1px 0; padding: 4px 20px 4px 5px; width: 100%; height: auto; outline: 0; border: 1px solid #aaa; background: white url('chosen-sprite.png') no-repeat 100% -20px; background: url('chosen-sprite.png') no-repeat 100% -20px; font-size: 1em; font-family: sans-serif; line-height: normal; border-radius: 0; } .chosen-container-single .chosen-drop { margin-top: -1px; border-radius: 0 0 4px 4px; background-clip: padding-box; } .chosen-container-single.chosen-container-single-nosearch .chosen-search { position: absolute; left: -9999px; } /* @end */ /* @group Results */ .chosen-container .chosen-results { color: #444; position: relative; overflow-x: hidden; overflow-y: auto; margin: 0 4px 4px 0; padding: 0 0 0 4px; max-height: 240px; -webkit-overflow-scrolling: touch; } .chosen-container .chosen-results li { display: none; margin: 0; padding: 5px 6px; list-style: none; line-height: 15px; word-wrap: break-word; -webkit-touch-callout: none; } .chosen-container .chosen-results li.active-result { display: list-item; cursor: pointer; } .chosen-container .chosen-results li.disabled-result { display: list-item; color: #ccc; cursor: default; } .chosen-container .chosen-results li.highlighted { background-color: #3875d7; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%); background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%); background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%); background-image: linear-gradient(#3875d7 20%, #2a62bc 90%); color: #fff; } .chosen-container .chosen-results li.no-results { color: #777; display: list-item; background: #f4f4f4; } .chosen-container .chosen-results li.group-result { display: list-item; font-weight: bold; cursor: default; } .chosen-container .chosen-results li.group-option { padding-left: 15px; } .chosen-container .chosen-results li em { font-style: normal; text-decoration: underline; } /* @end */ /* @group Multi Chosen */ .chosen-container-multi .chosen-choices { position: relative; overflow: hidden; margin: 0; padding: 0 5px; width: 100%; height: auto !important; height: 1%; border: 1px solid #aaa; background-color: #fff; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%); background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%); background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%); background-image: linear-gradient(#eeeeee 1%, #ffffff 15%); cursor: text; } .chosen-container-multi .chosen-choices li { float: left; list-style: none; } .chosen-container-multi .chosen-choices li.search-field { margin: 0; padding: 0; white-space: nowrap; } .chosen-container-multi .chosen-choices li.search-field input[type="text"] { margin: 1px 0; padding: 0; height: 25px; outline: 0; border: 0 !important; background: transparent !important; box-shadow: none; color: #999; font-size: 100%; font-family: sans-serif; line-height: normal; border-radius: 0; } .chosen-container-multi .chosen-choices li.search-choice { position: relative; margin: 3px 5px 3px 0; padding: 3px 20px 3px 5px; border: 1px solid #aaa; max-width: 100%; border-radius: 3px; background-color: #eeeeee; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); background-size: 100% 19px; background-repeat: repeat-x; background-clip: padding-box; box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05); color: #333; line-height: 13px; cursor: default; } .chosen-container-multi .chosen-choices li.search-choice span { word-wrap: break-word; } .chosen-container-multi .chosen-choices li.search-choice .search-choice-close { position: absolute; top: 4px; right: 3px; display: block; width: 12px; height: 12px; background: url('chosen-sprite.png') -42px 1px no-repeat; font-size: 1px; } .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover { background-position: -42px -10px; } .chosen-container-multi .chosen-choices li.search-choice-disabled { padding-right: 5px; border: 1px solid #ccc; background-color: #e4e4e4; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); color: #666; } .chosen-container-multi .chosen-choices li.search-choice-focus { background: #d4d4d4; } .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close { background-position: -42px -10px; } .chosen-container-multi .chosen-results { margin: 0; padding: 0; } .chosen-container-multi .chosen-drop .result-selected { display: list-item; color: #ccc; cursor: default; } /* @end */ /* @group Active */ .chosen-container-active .chosen-single { border: 1px solid #5897fb; box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); } .chosen-container-active.chosen-with-drop .chosen-single { border: 1px solid #aaa; -moz-border-radius-bottomright: 0; border-bottom-right-radius: 0; -moz-border-radius-bottomleft: 0; border-bottom-left-radius: 0; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff)); background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%); background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%); background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%); background-image: linear-gradient(#eeeeee 20%, #ffffff 80%); box-shadow: 0 1px 0 #fff inset; } .chosen-container-active.chosen-with-drop .chosen-single div { border-left: none; background: transparent; } .chosen-container-active.chosen-with-drop .chosen-single div b { background-position: -18px 2px; } .chosen-container-active .chosen-choices { border: 1px solid #5897fb; box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); } .chosen-container-active .chosen-choices li.search-field input[type="text"] { color: #222 !important; } /* @end */ /* @group Disabled Support */ .chosen-disabled { opacity: 0.5 !important; cursor: default; } .chosen-disabled .chosen-single { cursor: default; } .chosen-disabled .chosen-choices .search-choice .search-choice-close { cursor: default; } /* @end */ /* @group Right to Left */ .chosen-rtl { text-align: right; } .chosen-rtl .chosen-single { overflow: visible; padding: 0 8px 0 0; } .chosen-rtl .chosen-single span { margin-right: 0; margin-left: 26px; direction: rtl; } .chosen-rtl .chosen-single-with-deselect span { margin-left: 38px; } .chosen-rtl .chosen-single div { right: auto; left: 3px; } .chosen-rtl .chosen-single abbr { right: auto; left: 26px; } .chosen-rtl .chosen-choices li { float: right; } .chosen-rtl .chosen-choices li.search-field input[type="text"] { direction: rtl; } .chosen-rtl .chosen-choices li.search-choice { margin: 3px 5px 3px 0; padding: 3px 5px 3px 19px; } .chosen-rtl .chosen-choices li.search-choice .search-choice-close { right: auto; left: 4px; } .chosen-rtl.chosen-container-single-nosearch .chosen-search, .chosen-rtl .chosen-drop { left: 9999px; } .chosen-rtl.chosen-container-single .chosen-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; } .chosen-rtl .chosen-results li.group-option { padding-right: 15px; padding-left: 0; } .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div { border-right: none; } .chosen-rtl .chosen-search input[type="text"] { padding: 4px 5px 4px 20px; background: white url('chosen-sprite.png') no-repeat -30px -20px; background: url('chosen-sprite.png') no-repeat -30px -20px; direction: rtl; } .chosen-rtl.chosen-container-single .chosen-single div b { background-position: 6px 2px; } .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b { background-position: -12px 2px; } /* @end */ /* @group Retina compatibility */ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) { .chosen-rtl .chosen-search input[type="text"], .chosen-container-single .chosen-single abbr, .chosen-container-single .chosen-single div b, .chosen-container-single .chosen-search input[type="text"], .chosen-container-multi .chosen-choices .search-choice .search-choice-close, .chosen-container .chosen-results-scroll-down span, .chosen-container .chosen-results-scroll-up span { background-image: url('chosen-sprite@2x.png') !important; background-size: 52px 37px !important; background-repeat: no-repeat !important; } } /* @end */ ```
```java /* * * This program and the accompanying materials are made * which is available at path_to_url * */ package org.eclipse.milo.opcua.stack.core.types.structured; import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.experimental.SuperBuilder; import org.eclipse.milo.opcua.stack.core.serialization.SerializationContext; import org.eclipse.milo.opcua.stack.core.serialization.UaDecoder; import org.eclipse.milo.opcua.stack.core.serialization.UaEncoder; import org.eclipse.milo.opcua.stack.core.serialization.UaStructure; import org.eclipse.milo.opcua.stack.core.serialization.codecs.GenericDataTypeCodec; import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId; import org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText; @EqualsAndHashCode( callSuper = false ) @SuperBuilder( toBuilder = true ) @ToString public class EnumValueType extends Structure implements UaStructure { public static final ExpandedNodeId TYPE_ID = ExpandedNodeId.parse("nsu=path_to_url"); public static final ExpandedNodeId XML_ENCODING_ID = ExpandedNodeId.parse("nsu=path_to_url"); public static final ExpandedNodeId BINARY_ENCODING_ID = ExpandedNodeId.parse("nsu=path_to_url"); private final Long value; private final LocalizedText displayName; private final LocalizedText description; public EnumValueType(Long value, LocalizedText displayName, LocalizedText description) { this.value = value; this.displayName = displayName; this.description = description; } @Override public ExpandedNodeId getTypeId() { return TYPE_ID; } @Override public ExpandedNodeId getXmlEncodingId() { return XML_ENCODING_ID; } @Override public ExpandedNodeId getBinaryEncodingId() { return BINARY_ENCODING_ID; } public Long getValue() { return value; } public LocalizedText getDisplayName() { return displayName; } public LocalizedText getDescription() { return description; } public static final class Codec extends GenericDataTypeCodec<EnumValueType> { @Override public Class<EnumValueType> getType() { return EnumValueType.class; } @Override public EnumValueType decode(SerializationContext context, UaDecoder decoder) { Long value = decoder.readInt64("Value"); LocalizedText displayName = decoder.readLocalizedText("DisplayName"); LocalizedText description = decoder.readLocalizedText("Description"); return new EnumValueType(value, displayName, description); } @Override public void encode(SerializationContext context, UaEncoder encoder, EnumValueType value) { encoder.writeInt64("Value", value.getValue()); encoder.writeLocalizedText("DisplayName", value.getDisplayName()); encoder.writeLocalizedText("Description", value.getDescription()); } } } ```
Natural Wild is a reggae album by Jamaican artist Lincoln Thompson and the Rasses released in 1980 and recorded in the United Kingdom. Joe Jackson collaborated on the album whose central theme was the promotion of the culture and morality of the Rastafari movement. Commercially the album was a flop in spite of widespread publicity for it in the UK, in contrast to Thompson's two previous albums. Track listing "Mechanical Devices" "Natural Wild" "My Generation" "Natural (Reprise)" "Spaceship" "People's Minds" "People Love Jah Music" "Smiling Faces" Personnel Lincoln Thompson - guitar, vocals Gary Sanford, Dougie Bryan, Willie Lindo - guitar Bertram "Ranchie" McLean, Graham Maby - bass Dave Houghton, Michael "Boo" Richards - drums Joe Jackson - grand piano, organ, melodica Ansel Collins - keyboards George Oban, Mo Claridge - percussion Tony Gad - synthesizer on "Spaceship" Chris Lane - dub sound effects Norman Mighell - engineer 1980 albums Lincoln Thompson albums United Artists Records albums
Saltanat Abilkhassymkyzy (born 14 January 2000) is a Kazakh Paralympic athlete. She made her maiden Paralympic appearance during the 2020 Summer Paralympics. Career She represented Kazakhstan at the 2020 Summer Paralympics and competed in both women's 100m T35 and women's 200m T35 events. References 2000 births Living people Kazakhstani female sprinters Cerebral Palsy category Paralympic competitors Athletes (track and field) at the 2020 Summer Paralympics Paralympic athletes for Kazakhstan Sportspeople from Taraz 21st-century Kazakhstani women
"(Can't You) Trip Like I Do" is a reworking of "Trip Like I Do", a song featured on The Crystal Method's debut album Vegas. The track was recorded for the 1997 film adaptation of the Spawn comic book series. The song was co-written by Richard Patrick and co-produced by Brian Liesegang, both from Filter who also appeared in the song's video. "(Can't You) Trip Like I Do" is the opening song on the film's soundtrack release, Spawn: The Album and is heard in the end credits. The song was also used for the theatrical trailer of The Matrix and promotional trailers for the Enter the Matrix video game but it does not appear in the film or on the soundtrack. Inspiration for the song came from a friend of Scott Kirkland who was using ecstasy and leaving voice mail messages telling him "I wish you could trip like I do." Track listing "(Can't You) Trip Like I Do" (album version) – 4:25 "(Can't You) Trip Like I Do" (Danny Saber Remix) – 3:39 "(Can't You) Trip Like I Do" (instrumental) – 4:25 "(Can't You) Trip Like I Do" – 7:35 Credits Tracks 1–3 written, recorded and produced by The Crystal Method and Filter Mixed by Ben Grosse Track 1 executive producer: Richard Bishop for 3 A.M. Track 2 remix and additional production by Danny Saber Track 4 written by K. Jordan/S. Kirkland; produced and mixed by The Crystal Method Chart positions References 1997 singles 1997 songs Epic Records singles Filter (band) songs Music videos directed by Floria Sigismondi The Crystal Method songs
```objective-c /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #import "ZXReader.h" /** * This class attempts to decode a barcode from an image, not by scanning the whole image, * but by scanning subsets of the image. This is important when there may be multiple barcodes in * an image, and detecting a barcode may find parts of multiple barcode and fail to decode * (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center * 'quadrant' to cover the case where a barcode is found in the center. */ @interface ZXByQuadrantReader : NSObject <ZXReader> - (id)initWithDelegate:(id<ZXReader>)delegate; @end ```
Hekuran Isai (7 May 1933 in Peqin – 26 March 2008 in Tirana) was an Albanian politician of the Albanian Party of Labour (PPSh). Life After joining the Albanian Party of Labour (Alb: Partia e Punes së Shqipërisë) in 1957, he studied in the Soviet Union from 1957 to 1960. On his return Isai served as a specialist in a petroleum refinery in Cërrik. In 1962, he was elected first-deputy of the People's Assembly (Alb: Kuvendi Popullor) and was also elected as a member of the parliament from the fifth until the end of the eleventh legislative, ending in 1991. He served initially as member of the Committee on Industry, Mining and Construction. At the 5th Congress of the Party in November 1966, he was elected first-candidate of the Central Committee (CC) of the Party. In 1967 he started studying at the Party's School "Vladimir Ilyich Lenin" in Tirana, majoring in Political Economy. Isai worked afterwards as First Secretary of the PPSh in Elbasan District, which at that time included his native town of Peqin, later as First Secretary in Librazhd District from 1970 to 1975, and for a short time First Secretary of the Party in the Dibër District. At the 6th Party Congress in November 1971, he was also elected a member of the Central Committee. In June 1975 he became a member of the Secretariat of the Central Committee of the PPSh and held this function until November 1986. A few months later, in September 1975, he was elevated as member of the Politburo of the Party, as substitute for the recently purged Deputy Prime Minister and Chairman of the State Planning Commission Abdyl Këllezi. Isai, together with Qirjako Mihali, Pali Miska, and Llambi Gegprifti, represented a new generation of leaders within the Party, which emerged with the termination of relations with the People's Republic of China. On January 15, 1982 Isai was appointed Minister of the Interior in the government of Prime Minister Adil Çarçani, succeeding another purged figure, Feçor Shehu. As interior minister, he was also head of the secret service Sigurimi and held these two positions until February 2, 1989. Between February 1987 and February 1989 he was also Deputy Chairman of the Council of Ministers. Between February 1989 and July 1990, he was a member of the Secretariat of the Central Committee. He then took over again on July 9, 1990 until February 22, 1991 as Deputy Prime Minister and Minister of Interior. Most recently, he stated that he opposed the command of the First Secretary of the PPSh (Ramiz Alia) who had ordered shooting at protesters in Tirana during the collapse of communism in February 1991. This claim was however rejected by Alia as untrue. After the dissolution of the PPSh and the establishment of the Socialist Party of Albania (Alb: Partia Socialiste e Shqipërisë) in June 1991, Isai finally retired from the Politburo. In 1994, a special court was formed in Tirana against him and former officials Ramiz Alia, Simon Stefani, and Adil Çarçani. They were indicted for "abuse of authority and violation of civil rights". In July 1994 the following sentences were issued: Alia, nine years of imprisonment; Stefani, eight years; Isai, five years; and Çarcani, five years. A similar trial was brought in 1996 for a list of 36 former officials. Isai's name appeared again. All were released soon after the civil unrest in Albania during 1997. See also Sino-Albanian split Sigurimi Mehmet Shehu References 1933 births 2008 deaths People from Peqin Labour Party of Albania politicians Members of the Politburo of the Labour Party of Albania Members of the Parliament of Albania Government ministers of Albania Deputy Prime Ministers of Albania Interior ministers of Albania
```objective-c // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_TEST_INSPECTOR_PROTOCOL_TASK_RUNNER_H_ #define V8_TEST_INSPECTOR_PROTOCOL_TASK_RUNNER_H_ #include <map> #include "include/v8-inspector.h" #include "include/v8-platform.h" #include "include/v8.h" #include "src/base/macros.h" #include "src/base/platform/platform.h" #include "src/locked-queue-inl.h" #include "src/vector.h" #include "test/inspector/isolate-data.h" class TaskRunner : public v8::base::Thread { public: class Task { public: virtual ~Task() = default; virtual bool is_priority_task() = 0; virtual void Run(IsolateData* data) = 0; }; TaskRunner(IsolateData::SetupGlobalTasks setup_global_tasks, bool catch_exceptions, v8::base::Semaphore* ready_semaphore, v8::StartupData* startup_data, bool with_inspector); ~TaskRunner() override; IsolateData* data() const { return data_.get(); } // Thread implementation. void Run() override; // Should be called from the same thread and only from task. void RunMessageLoop(bool only_protocol); void QuitMessageLoop(); // TaskRunner takes ownership. void Append(Task* task); void Terminate(); private: Task* GetNext(bool only_protocol); v8::Isolate* isolate() const { return data_->isolate(); } IsolateData::SetupGlobalTasks setup_global_tasks_; v8::StartupData* startup_data_; bool with_inspector_; bool catch_exceptions_; v8::base::Semaphore* ready_semaphore_; std::unique_ptr<IsolateData> data_; // deferred_queue_ combined with queue_ (in this order) have all tasks in the // correct order. Sometimes we skip non-protocol tasks by moving them from // queue_ to deferred_queue_. v8::internal::LockedQueue<Task*> queue_; v8::internal::LockedQueue<Task*> deffered_queue_; v8::base::Semaphore process_queue_semaphore_; int nested_loop_count_; std::atomic<int> is_terminated_; DISALLOW_COPY_AND_ASSIGN(TaskRunner); }; #endif // V8_TEST_INSPECTOR_PROTOCOL_TASK_RUNNER_H_ ```
Morières-lès-Avignon (, literally Morières near Avignon; Provençal: Morieras d'Avinhon) is a commune in the Vaucluse department in the Provence-Alpes-Côte d'Azur region in Southeastern France. It is located just east of Avignon, with a population of 8,563 as of 2018. Morières-lès-Avignon is twinned with Caldicot, United Kingdom. Population See also Communes of the Vaucluse department Twinning Morières-lès-Avignon is twinneed with Caldicot, Wales. References Communes of Vaucluse
```smalltalk using System.Text.RegularExpressions; namespace FluentFTP.Helpers { /// <summary> /// Extension methods related to FTP tasks /// </summary> internal static class Permissions { /// <summary> /// Calculates the CHMOD value from the permissions flags /// </summary> public static void CalculateChmod(this FtpListItem item) { item.Chmod = CalcChmod(item.OwnerPermissions, item.GroupPermissions, item.OthersPermissions); } /// <summary> /// Calculates the permissions flags from the CHMOD value /// </summary> public static void CalculateUnixPermissions(this FtpListItem item, string permissions) { var perms = Regex.Match(permissions, @"[\w-]{1}(?<owner>[\w-]{3})(?<group>[\w-]{3})(?<others>[\w-]{3})", RegexOptions.IgnoreCase); if (perms.Success) { if (perms.Groups["owner"].Value.Length == 3) { if (perms.Groups["owner"].Value[0] == 'r') { item.OwnerPermissions |= FtpPermission.Read; } if (perms.Groups["owner"].Value[1] == 'w') { item.OwnerPermissions |= FtpPermission.Write; } if (perms.Groups["owner"].Value[2] == 'x' || perms.Groups["owner"].Value[2] == 's') { item.OwnerPermissions |= FtpPermission.Execute; } if (perms.Groups["owner"].Value[2] == 's' || perms.Groups["owner"].Value[2] == 'S') { item.SpecialPermissions |= FtpSpecialPermissions.SetUserID; } } if (perms.Groups["group"].Value.Length == 3) { if (perms.Groups["group"].Value[0] == 'r') { item.GroupPermissions |= FtpPermission.Read; } if (perms.Groups["group"].Value[1] == 'w') { item.GroupPermissions |= FtpPermission.Write; } if (perms.Groups["group"].Value[2] == 'x' || perms.Groups["group"].Value[2] == 's') { item.GroupPermissions |= FtpPermission.Execute; } if (perms.Groups["group"].Value[2] == 's' || perms.Groups["group"].Value[2] == 'S') { item.SpecialPermissions |= FtpSpecialPermissions.SetGroupID; } } if (perms.Groups["others"].Value.Length == 3) { if (perms.Groups["others"].Value[0] == 'r') { item.OthersPermissions |= FtpPermission.Read; } if (perms.Groups["others"].Value[1] == 'w') { item.OthersPermissions |= FtpPermission.Write; } if (perms.Groups["others"].Value[2] == 'x' || perms.Groups["others"].Value[2] == 't') { item.OthersPermissions |= FtpPermission.Execute; } if (perms.Groups["others"].Value[2] == 't' || perms.Groups["others"].Value[2] == 'T') { item.SpecialPermissions |= FtpSpecialPermissions.Sticky; } } CalculateChmod(item); } } /// <summary> /// Calculate the CHMOD integer value given a set of permissions. /// </summary> public static int CalcChmod(FtpPermission owner, FtpPermission group, FtpPermission other) { var chmod = 0; if (HasPermission(owner, FtpPermission.Read)) { chmod += 400; } if (HasPermission(owner, FtpPermission.Write)) { chmod += 200; } if (HasPermission(owner, FtpPermission.Execute)) { chmod += 100; } if (HasPermission(group, FtpPermission.Read)) { chmod += 40; } if (HasPermission(group, FtpPermission.Write)) { chmod += 20; } if (HasPermission(group, FtpPermission.Execute)) { chmod += 10; } if (HasPermission(other, FtpPermission.Read)) { chmod += 4; } if (HasPermission(other, FtpPermission.Write)) { chmod += 2; } if (HasPermission(other, FtpPermission.Execute)) { chmod += 1; } return chmod; } /// <summary> /// Checks if the permission value has the given flag /// </summary> private static bool HasPermission(FtpPermission owner, FtpPermission flag) { return (owner & flag) == flag; } } } ```
Leonora Armellini (born 25 June 1992) is an Italian pianist. Biography Armellini was born in Padua. She began piano lessons at the age of four under the supervision of Laura Palmieri, a student and heiress of the Arturo Benedetti Michelangelo school. She graduated from the conservatory summa cum laude at the age of 12, after which she continued her studies at the Accademia Nazionale di Santa Cecilia in Rome in the class of Sergio Perticaroli, from which she graduated (also with honors) at the age of 17. From 2011 she studied with Lilya Zilberstein at the Hochschule für Musik und Theater in Hamburg, she was also a student of Boris Petrushansky at the International Piano Academy "Incontri col Maestro" in Imola. Additionally, she studied composition at the Cesare Pollini Conservatory in Padua under Giovanni Bonato. Armellini also benefited from the Theo Lieven Scholar scholarship, which allowed her to study piano with William Grant Naboré at the Lugano Conservatory. Awards and achievements She is a laureate of many Italian piano competitions in which she participated from the age of six. In 2005, she won the first prize at the Venezia Prize (Premio Venezia), a competition for the best graduates of music academies in Italy. In 2009, she won the first prize in the Camillo Togni International Piano Competition in Brescia. At the XVI International Chopin Piano Competition in Warsaw in 2010 she entered the third stage. She also received the Janina Nawrocka Award for "extraordinary musicality and beauty of sound". In May 2013, she was recognized by the Associazione Nazionale Critici Musicali council, by whose decision the prestigious Premio Piero Farulli award was awarded to a music trio whose members, apart from Leonora Armellini, are the violinist Laura Marzadori and the cellist Ludovico Armellini – the artist's brother. On September 23, 2013, at the Teatro La Pergola in Florence, Leonora Armellini received the prestigious international Galileo 2000 award from Zubin Mehta for "courage and musical talent". She was a finalist of the 16th Ferruccio Busoni International Piano Competition in 2017. In 2021 she won the fifth prize in the XVIII International Chopin Piano Competition in Warsaw. Concerts and performances Leonora Armellini's repertoire includes works by, among others, Haydn, Mozart, Beethoven, Mendelssohn, Chopin, Schumann, Clara Schumann, Liszt, Gershwin, Prokofiev and Tchaikovsky. Her artistic achievements include several hundred performances in Italy, Poland, Great Britain, Austria, the Czech Republic, France, Switzerland, Germany, Russia, Tunisia, the United States, India, China, South Korea and Japan. At the age of 17, she performed at the Carnegie Weill Recital Hall in New York. She has performed at a number of festivals, including: Lugano as part of Martha Argerich's Project, at the International Chopin Festival in Duszniki Zdrój, Poland and at the Chopin and His Europe International Music Festival in Warsaw, Poland (2011). She also performed at the International A.B. Michelangeli Festival in Bergamo and Brescia, and Festival Dino Ciani in Cortina d'Ampezzo. In 2006, she gave a recital at the Gran Teatro La Fenice in Venice on the occasion of the official celebration of the 60th anniversary of the Italian Republic. In 2013, instead of the indisposed Daniel Barenboim, she played a concert at the San Remo Festival, broadcast to an audience of approximately 155 million. She has performed with orchestras such as Warsaw Philharmonic, Kronstadt Philharmonic, Turin Philharmonic Orchestra, I Solisti Veneti, Orchestra del Teatro La Fenice in Venice, Teatro Alla Scala Chamber Orchestra in Milan, Orchestra del Teatro Giuseppe Verdi in Trieste, I Virtuosi Italiani, Orchestra dell'Arena di Verona, Orchestra Alpe-Adria or Sinfonia Varsovia. She has collaborated with conductors such as Alexandre Rabinovitch-Barakovsky, Claudio Scimone, Zoltán Peskó, Anton Nanut, Andrea Battistoni, Damian Iorio, Giordano Bellincampi, Christopher Franklin, Massimiliano Caldi, Emilian Madey, Jacek Kaspszyk, Maurizio Dini Ciacci. She also performs as a chamber musician. She has played with Lilya Zilberstein and Jeffrey Swann, Mario Brunelli, Giovanni Angeleri, Trie Broz, Laura Marzadori, Lucia Hall and Sonig Tchakerian, among others. Discography DVD Leonora Armellini. Piano Recital (DVD Video, Continuo Records CR128, 2019) CD (selected) Chopin (SACD, Velut Luna CVLD156, 2007) Chopin: Nokturn cis-moll; Ballada As-dur; Etiuda Es-dur; Koncert c-moll, op. 11 (CD, Fryderyk Chopin Institute NIFCCD615, 2012) Schumann: Album für die Jugend, op. 68 (CD, Acousence Classics ACO-11813, 2014) The Early Years (CD, Velut Luna AUD154, 2016) Johannes Brahms: Complete Music for Two Pianos (Leonora Armellini, Mattia Ometto – pianos) (CD, Da Vinci Classics C00138, 2018) Johannes Brahms: Cello Sonatas (Luca Giovannini – cello, Leonora Armellini – piano) (CD, Velut Luna CVLD327, 2020) Poulenc, Britten, Debussy: Music for 2 Pianos and Piano for 4-hands (Leonora Armellini, Mattia Ometto – pianos) (CD, Brilliant Classics 96163, 2020) Publications She is the co-author (together with the Italian psychiatrist Matteo Rampin) of the book Mozart era un figo, Bach ancora di più (2014), reprinted several times and translated in Spanish. References External links Leonora Armellini's homepage Leonora Armellini at AllMusic Leonora Armellini's discography at Discogs 1992 births Italian classical pianists Prize-winners of the International Chopin Piano Competition 21st-century Italian musicians 21st-century Italian women musicians 21st-century classical pianists Musicians from Padua Living people Accademia Nazionale di Santa Cecilia alumni
```python = 5 def (): print(1) print() () ```
The Faceless Ones is the mostly missing eighth serial of the fourth season in the British science fiction television series Doctor Who, which was first broadcast in six weekly parts from 8 April to 13 May 1967. In this serial, the Second Doctor (Patrick Troughton) and his travelling companions Jamie (Frazer Hines), Ben (Michael Craze) and Polly (Anneke Wills) arrive at Gatwick Airport where identity-stealing aliens known as the Chameleons have taken refuge after their planet was destroyed, preying on university students by abducting them using the false holiday flight organisation 'Chameleon Tours'. It sees the departure of Craze and Wills as Ben and Polly. Only two of the six episodes are held in the BBC archives; four remain missing. An animated version of the serial from BBC Studios was released on 16 March 2020. It became the eighth incomplete Doctor Who serial to receive full-length animated reconstructions of its missing episodes. Plot The TARDIS materializes on the runway of Gatwick Airport. The Second Doctor, Ben, Polly and Jamie emerge only to discover that they are in the path of an oncoming plane. They see a security officer coming for them, so they split up to flee him. Airport security confiscates the TARDIS after thinking the police are playing a practical joke on them. Polly ducks in the Chameleon Tours agency hangar, where she sees Spencer kill another man and report to his superior, Captain Blade. Polly flees, and runs into the Doctor and Jamie. After telling them what she saw, she brings them to the hangar. They examine the body and the Doctor notes that the victim was electrocuted by a weapon that can't possibly exist on Earth at that time. They leave to find someone in authority, and Blade captures Polly without the Doctor or Jamie noticing. He hides her along with the corpse before Jamie and the Doctor return with sceptical airport authorities. Alone again, Spencer revives an alien, a faceless green humanoid with prominent veins. Nurse Pinto brings in unconscious air traffic controller Meadows, and connects him to the alien and a machine. The alien transforms into a doppelgänger of Meadows, and goes to his airport job. Polly exits from a newly landed plane, but rejects the Doctor and Jamie, claiming to be Michelle Leuppi from Zurich. At the Chameleon kiosk, they meet Samantha Briggs who is searching for her brother. On a Chameleon youth tour, he sent a postcard from Rome, but nobody saw him there. Breaking in, the trio find fake postcards from missing tourists, and a monitor of the Tours hangar. The Doctor sees Ben find Polly suspended comatose in a metal cabinet, then himself gets caught and frozen by Blade and Spencer. The Doctor escapes and goes alone to the hangar and tells Jamie and Samantha to stay. They meet Detective Inspector Crossland investigating the disappeared Chameleon customers, and realize the first body was his missing partner, DI Gascoigne. The Doctor finds only comatose Meadows and returns to demonstrate the freezing gun to the Airport Commandant, who gives them 12 hours to investigate. Blade points the ray gun at Crossland to stop him boarding the next flight, and shows him that all the passengers have vanished. Spencer attacks Jamie and Samantha, but they escape. Jamie steals Samantha's ticket and boards. Samantha finds Spencer instead of the airport manager; he ties her up for Pinto to duplicate. The Doctor and Commandant learn from other airports that Chameleon passengers never arrive. Blade eliminates a pursuing RAF fighter and diverts Jamie's plane up to dock in a vast alien craft. When an airsick Jamie emerges from the toilet, he finds the passengers miniaturised in drawers. Blade's assistant Ann catches him, and traps him in a room with two misshapen aliens. The Doctor follows the radar signals to the plane's destination, threatens to remove alien Meadows' life-supporting black armband, and elicits an explanation. An explosion damaged the alien home world, so they want to use 50,000 humans left comatose in orbit as replacements. The Doctor uses the alien Meadows to get at the alien Pinto. She resists and disintegrates, so the real Pinto revives and frees Samantha. She tells the Doctor that Jamie left. Jamie meets the Director of the aliens, a Crossland copy, who says the plane will return to the airport for the remaining Chameleons. The Doctor keeps the identities of copied staff secret, so the Commandant can find their hidden originals. The Doctor pretends to be the alien Meadows and Pinto impersonates her double. They board the last flight to space. The alien Jamie reveals the threat of the Doctor, so Blade sends undisguised Chameleons to capture them. The Doctor offers to spare Gatwick's original aliens, when one onboard disintegrates, proving that Samantha found the real staff in cars in the car park. Blade and Spencer kill the Director and the fake Jamie, whose originals revive. Crossland stays behind when the Doctor, Jamie and Pinto return with freed humans. In the airport, Samantha kisses Jamie goodbye. Ben and Polly learn that the day is 20 July 1966, when they first left in the TARDIS. They leave for home. The Doctor reveals to Jamie that the TARDIS has been released from airport storage, and stolen. Production Working titles for this story include The Chameleons. This story had its origins in a planned Hartnell story by Hulke and Ellis called The Big Store, in which aliens occupied mannequins in a busy department store, while waiting for human hosts to possess. The idea was adapted for the Troughton era and its setting changed to a metropolitan airport. Some of The Faceless Ones was filmed on location at Gatwick Airport in March 1967. Heathrow also accepted the production team's offer, but the team chose Gatwick as the cost was lower. Doctor Who would later film at Heathrow for Time-Flight in 1982. As The Macra Terror saw the debut of a new title sequence, The Faceless Ones saw the minor revision of the theme music that accompanied this new sequence introduced in Episode 2. Cast notes Both Michael Craze and Anneke Wills were released from their contracts after episode 2, leading to their departures during this serial. The characters appear in episode 6 in scenes shot on location prior to the studio recording. Pauline Collins was offered the chance to continue playing the character of Sam Briggs as a new companion, but declined the offer. Collins guest-starred, years later, as Queen Victoria in "Tooth and Claw" (2006). Bernard Kay appears as Inspector Crossland. He had previously appeared as Tyler in The Dalek Invasion of Earth (1964) and Saladin in The Crusade (1965), then later appeared as Caldwell in Colony in Space (1971). Donald Pickering and Wanda Ventham would later star as husband and wife in Time and the Rani (1987). Pickering had previously appeared as Eyesen in The Keys of Marinus (1964) and Ventham would go on to play Thea Ransom in Image of the Fendahl (1977). Christopher Tranchell previously appeared as Roger Colbert in The Massacre of St Bartholomew's Eve (1966) and would return as Leela's love interest Andred in The Invasion of Time (1978). Broadcast, reception and archive Episode is missing Paul Cornell, Martin Day, and Keith Topping gave the serial a favourable review in The Discontinuity Guide (1995), writing that "the realistic backdrop works very well, and the script is well constructed, augmented by the terrifying appearance of the aliens". In 2009, Mark Braxton of Radio Times noted that there were plot holes but the story "unveils its mystery with ease and elegance". Missing episodes Only episodes 1 and 3 of this serial exist in the BBC archives. In addition to the complete version, the archives also holds an incomplete print of episode 1, returned from ABC in Australia in late 1978. The print itself was given to ABC from a private collector living in Australia. The Australian Film Censorship Board removed the following scenes: Spencer killing Inspector Gascoigne with a Chameleon ray-gun; the alien arm emerging from the cupboard; and panning shots of the alien figure (seen only from behind) at the end of the episode. The missing scenes were later recovered along with the other copy of episode 1. A copy of episode 3 was returned to the BBC in 1987 from a private collector living in the United Kingdom. However, 20 seconds of material is missing from episode 3, due to damage to the print. A brief, 3-second moment of the impostor Polly brushing off a remark from the Doctor survives from episode 2. Two brief plane shots used in episode 4 also survive. Commercial releases In print A novelisation of this serial, written by Terrance Dicks, was published by Target Books in December 1986. Home media As with all missing episodes, off-air recordings of the soundtrack exist due to contemporary fan efforts. In February 2002 these were released on CD, accompanied by linking narration from Frazer Hines. In November 2003, episodes one and three of this serial were released on VHS by BBC Worldwide, along with episode one of The Web of Fear, as part of The Reign of Terror boxset; this was the final VHS release, coinciding with the programme's fortieth anniversary. In November 2004, they were included in the three-disc Lost in Time DVD set. A DVD and Blu-ray release occurred on 16 March 2020; this release included both surviving episodes accompanied by an animated version of all six episodes (using the original audio) in Colour and Black and White formats. Also included is the surviving footage from the missing episodes 2 and 4, and a photographic reconstruction of the missing episodes. This also makes The Faceless Ones episodes 1 and 3 the first live-action Doctor Who episodes produced in black and white to be released on Blu-ray, although due to the lower quality of 16mm film prints, they are not pure HD like the original film negatives would have allowed. References External links Photonovel of The Faceless Ones, on the BBC website Doctor Who Locations – The Faceless Ones Target novelisation Doctor Who missing episodes Second Doctor serials Doctor Who serials novelised by Terrance Dicks 1967 British television episodes Doctor Who stories set on Earth Fiction set in 1966
```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 com.google.android.material.datepicker; import android.os.Parcel; import android.os.Parcelable; import androidx.annotation.NonNull; import com.google.android.material.datepicker.CalendarConstraints.DateValidator; import java.util.Arrays; /** * A {@link CalendarConstraints.DateValidator} that enables only dates before a given point. * Defaults to the current moment in device time backwards using {@link * DateValidatorPointBackward#now()}, but can be set to any point, as UTC milliseconds, using {@link * DateValidatorPointBackward#before(long)}. */ public class DateValidatorPointBackward implements DateValidator { private final long point; private DateValidatorPointBackward(long point) { this.point = point; } /** * Returns a {@link CalendarConstraints.DateValidator} which enables only days before {@code * point}, in UTC milliseconds. */ @NonNull public static DateValidatorPointBackward before(long point) { return new DateValidatorPointBackward(point); } /** * Returns a {@link CalendarConstraints.DateValidator} enabled from the current moment in device * time backwards. */ @NonNull public static DateValidatorPointBackward now() { return before(UtcDates.getTodayCalendar().getTimeInMillis()); } /** Part of {@link android.os.Parcelable} requirements. Do not use. */ public static final Parcelable.Creator<DateValidatorPointBackward> CREATOR = new Parcelable.Creator<DateValidatorPointBackward>() { @NonNull @Override public DateValidatorPointBackward createFromParcel(@NonNull Parcel source) { return new DateValidatorPointBackward(source.readLong()); } @NonNull @Override public DateValidatorPointBackward[] newArray(int size) { return new DateValidatorPointBackward[size]; } }; @Override public boolean isValid(long date) { return date <= point; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(@NonNull Parcel dest, int flags) { dest.writeLong(point); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof DateValidatorPointBackward)) { return false; } DateValidatorPointBackward that = (DateValidatorPointBackward) o; return point == that.point; } @Override public int hashCode() { Object[] hashedFields = {point}; return Arrays.hashCode(hashedFields); } } ```
Badecon-le-Pin () is a commune in the Indre département in central France. Population See also Communes of the Indre department References Communes of Indre
Mintel Group Ltd is a global, privately owned market research firm based in London, UK. The corporation also maintains offices in Chicago, Mumbai, Belfast, Shanghai, Tokyo, Sydney, Sao Paulo, Singapore, Kuala Lumpur, Dusseldorf, Bangkok, and Seoul. Mintel databases, analysis, and forecasts are accessible to subscribing clients, those who purchase standalone reports, and to students in participating university libraries. History Products Mintel Comperemedia tracks direct mail and print advertising in the United States and Canada, and email marketing in the United States. This Web-based tool tracks trends and strategies in industries such as credit cards, telecom, banking, insurance, travel and investments. Added in November 2006, Mintel Comperemedia's Email Panel shows emails as they appear in consumers' inboxes. Added in 2010, Mintel Comperemedia tracks online advertising as part of its digital channel. Added in 2007, Mintel GNPD IRIS allows users to differentiate successful and unsuccessful product launches. References Companies based in the City of London Market research companies of the United Kingdom Market research companies of the United States British companies established in 1972 Business services companies established in 1972 Research and analysis firms of the United Kingdom 1972 establishments in England
```smalltalk using System; using Android.Runtime; namespace Java.Lang { [Register ("mono/java/lang/Runnable")] public sealed class Runnable : Java.Lang.Object, Java.Lang.IRunnable { Action handler; public Runnable (Action handler) : base ( JNIEnv.StartCreateInstance ("mono/java/lang/Runnable", "()V"), JniHandleOwnership.TransferLocalRef) { JNIEnv.FinishCreateInstance (Handle, "()V"); if (handler == null) { base.Dispose (); throw new ArgumentNullException ("handler"); } this.handler = handler; } public void Run () { handler (); } } } ```
Costa Rica competed at the 2012 Summer Paralympics in London, United Kingdom from August 29 to September 9, 2012. Athletics Men’s Track and Road Events Cycling Road Men See also Costa Rica at the 2012 Summer Olympics References Nations at the 2012 Summer Paralympics 2012 2012 in Costa Rican sport
The Torre Glòries, formerly known as Torre Agbar (), is a 38-story skyscraper located between Avinguda Diagonal and Carrer Badajoz, near Plaça de les Glòries Catalanes, which marks the gateway to the new technological district of Barcelona, Catalonia, Spain. It was designed by French architect Jean Nouvel in association with the Spanish firm b720 Fermín Vázquez Arquitectos and built by Dragados. The Torre Glòries is located in the Poblenou neighbourhood of Barcelona and it was originally named after its owners, the Agbar Group, a holding company whose interests include the Barcelona water company Aigües de Barcelona. The tower is 144.44 m high with a diameter of 39 m. It has a total of , of which are offices, technical facilities, services, including an auditorium, and parking space. It cost €130 million to build. It opened in June 2005 and was officially opened by King Juan Carlos I on 16 September 2005. It is one in a collection of high-tech architecture examples in Barcelona. The building was owned by the multinational group Agbar, which has its corporate headquarters in the building and which takes up most of the floors, leasing the remainder. The Agbar Tower was acquired in March 2010 for 165 million euros, after reaching an agreement with its former owner, the investment group Azurelau. Azurelau had previously bought the property in mid-2007. The purchase price was not disclosed. By 2017 it was purchased by Merlin Properties real estate group and it was renamed as Torre Glòries after the name of the adjacent square. Design According to Jean Nouvel, Torre Agbar is intended to recall the shape of a geyser rising into the air. It was inspired by Montserrat, a mountain near Barcelona. In an interview, he described the tower as having a phallic character. As a result of its unusual shape, the building is known by several nicknames, such as el supositori ("the suppository"), l'obús ("the shell") and some more scatological ones. It is also somewhat similar in shape to Sir Norman Foster's 30 St. Mary Axe in London, often called "the Gherkin". The Agbar Tower measures in height and consists of 38 storeys, including four underground levels. Its design combines a number of different architectural concepts, resulting in a striking structure built with reinforced concrete, covered with a facade of glass, and over 4,500 window openings cut out of the structural concrete. The building stands out in Barcelona; it is the third tallest building in the city, after the Arts Hotel and the Mapfre Tower, which both stand tall. A defining feature of the building is its nocturnal illumination. It has 4,500 LED devices that allow generation of luminous images on its façade. In addition, the outside of the tower has temperature sensors that regulate the opening and closing of the window blinds of the façade, reducing the consumption of energy for air conditioning. It houses the head office of the Aigües de Barcelona Group, the water supply company of Barcelona. As explained by Nouvel himself, the construction was strongly influenced by one of the most representative symbols of Catalan culture. One side references the bell towers of the Sagrada Familia by the Catalan architect Antoni Gaudí. (These bell towers were based in turn on the idea of the Hotel Attraction, a course project by the teacher Reus in 1908 for some New York hoteliers, which was redesigned in 1956 by his disciple Joan Matamala. These designs were included in Rem Koolhaas' book Delirious New York, a reference for many architects.) An additional tribute to the Sagrada Família lies in the north side of the tower, which was designed with the intention of obtaining an optimal view of the cathedral. Additionally, Nouvel was inspired by the distinctive pinnacles of the Montserrat mountain range, which are of great significance for the people of Catalonia, as Montserrat houses their patron saint, Our Lady of Montserrat. In designing the Agbar Tower, Nouvel said he rejected the prevailing North American opinion of what a skyscraper should look like. It was the architect's intention to give the impression of land that is emerging out of the ground in a particular fashion. The use of the tower by a water utility company led him to the design of a metaphor of a geyser sprouting from the deep sea. Construction Starting in mid-1999, when activities were initiated for preparing the site, Dragados's, construction project dragged on for nearly six years, finally ending in late 2004. Approximately 1170 workers were engaged in its construction. Features Materials The main materials used in the construction of the building are concrete which comprises the structure of the tower and aluminium and glass in the form of 59,619 strips of painted sheet metal of different colours, covering the approximately 16,000 m2 of exterior surface. In addition, the glass has different inclinations and opacities which, combined with the different shades of aluminium, alter the colour balance of the tower as a function of time of day and season of the year. The construction used 25,000 m3 of concrete and 125 tonnes of steel. Form and structure The tower is made up of two concentric concrete oval cylinders which do not come in contact with each other. The outer cylinder, which completely encases the inner cylinder is covered by a dome of glass and steel which gives the tower its characteristic shape of a bullet. This outer cylinder with a thickness of 45 cm at the base and 25 cm at the top contains approximately 4,500 windows, while the inner cylinder measuring 50 cm at the base and 30 cm at the highest point, is where the lifts, stairs and facilities are located. Distribution The building contains 38 floors of which 34 are above ground and four floors are underground. Two of the underground floors host an auditorium for 316 people in addition to other services areas while the other two are intended for parking. Of the 34 floors located above the ground, 28 are for offices, three are technical plants hosting building facilities, one is dedicated to multipurpose rooms, another houses the cafeteria and the last is intended to be a viewing platform just below the top of the tower. Lighting One of the most characteristic elements of the building is its nocturnal illumination. The tower has more than 4,500 luminous devices that can operate independently using LED technology and enables the generation of images on the outside of the tower. The system is capable of creating 16 million colours, thanks to a sophisticated system of hardware and software. It has the ability to quickly transition between colours which can create a shocking effect. During Christmas, New Year and other events the tower changes color in animated computer controlled sequences. The unique lighting system of the building, dubbed by its creator Yann Kersalé as diffraction, who defined it as "a vaporous cloud of colour that seeks moiré", is often used in the celebration of various events such as the naming of Barcelona as the capital of the Union for the Mediterranean or the 50th anniversary of Treaty of Rome. A symbol of Barcelona Once it was finished, the Agbar Tower quickly became an architectural icon of the city of Barcelona and one of its most famous buildings. However, it was not initially immune to criticism from citizens and experts who said that its characteristics did not fit into the architecture of Barcelona. Over time it has become one of the symbols that universally identify the Catalan capital and is one of its tourist attractions. In mid-2008, a number of Catalan public institutions made a list that included the major cultural icons in the Autonomous Community that were meant to serve as models for tourist souvenirs which identity Catalonia, and the tower was included in it. The popularity of the tower to tourists is such that a visit to the tower has become a part of tourist bus routes (and even the helicopter tour) and many tourists take an opportunity to visit the inside. Ringing in the New Year Since 2006, TV3, the main Catalan regional television service, has used the capabilities the special lighting system at the Agbar Tower offered to show end of year celebrations. This has become the venue chosen by thousands of locals and visitors to the city to welcome the New Year. This choice of the tower as an icon of the city for New Year celebrations have allowed Barcelona to begin to appear on television around the world alongside those of famous landmarks in cities such as Sydney, Madrid, Paris, London or New York City. Prior to 2006 this did not occur because the places chosen by TV3 lacked the international recognition that the Jean Nouvel tower provides. Curiosities The tower has twice been climbed by Alain Robert. The first, on 3 August 2006, was an action that sought to call for peace in the conflict in Lebanon. The second was in September 2007. In 2007, "Torre Agbar" was recorded in the Spanish Patent and Trademark office, by the company Aigües de Barcelona, for use as a brand of alcoholic beverages. In 2011, the tower received a green building award from the European Council for its energy efficiency and low CO2 emissions. Gallery See also 30 St Mary Axe, also known as "The Gherkin", and occasionally as The Swiss Re Tower, is an architecturally similar building in London which opened a year and a half earlier, in April 2004. Alain Robert, a famous climber who has scaled the building. References External links Torre Agbar web page (Macromedia Flash) El Poblenou Avinguda Diagonal Buildings and structures completed in 2004 Skyscraper office buildings in Barcelona Sant Martí (district) Jean Nouvel buildings Modernist architecture in Barcelona High-tech architecture
```java /* * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * * path_to_url * * Unless required by applicable law or agreed to in writing, * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * specific language governing permissions and limitations */ package org.apache.pulsar.common.util; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.FileTime; import lombok.Getter; import lombok.ToString; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Class working with file's modified time. */ @ToString public class FileModifiedTimeUpdater { @Getter String fileName; @Getter FileTime lastModifiedTime; public FileModifiedTimeUpdater(String fileName) { this.fileName = fileName; this.lastModifiedTime = updateLastModifiedTime(); } private FileTime updateLastModifiedTime() { if (fileName != null) { Path p = Paths.get(fileName); try { return Files.getLastModifiedTime(p); } catch (IOException e) { LOG.error("Unable to fetch lastModified time for file {}: ", fileName, e); } } return null; } public boolean checkAndRefresh() { FileTime newLastModifiedTime = updateLastModifiedTime(); if (newLastModifiedTime != null && !newLastModifiedTime.equals(lastModifiedTime)) { this.lastModifiedTime = newLastModifiedTime; return true; } return false; } private static final Logger LOG = LoggerFactory.getLogger(FileModifiedTimeUpdater.class); } ```
The greater grison (Galictis vittata) is a species of mustelid native to Southern Mexico, Central America, and South America. Description The greater grison is a slender animal with short legs, a long neck, and a short, bushy tail. They are similar in appearance to the closely related lesser grison, from which they can be most readily distinguished by their greater size, with a head-body length ranging from . Adults weigh between in the wild, but may become larger when reared in captivity. The back, flanks, top of the head, and the tail, are grizzled grey in color, while the rest of the body is much darker, and usually solid black. A narrow whitish stripe separates the darker and lighter fur on the head and shoulder, but not further back, where the two colors may, in some individuals, blur into one another. The tail is long, and covered with bushy hair similar in color to that on the animal's back. The head is flattened and broad, with short, rounded ears, and dark brown to black eyes. The legs are muscular, with five webbed toes, each ending in a sharp, curved claw. Distribution and habitat Greater grisons are native to North and South America, ranging from southern Mexico in the north, to central Brazil, Peru, and Bolivia in the south. They inhabit a wide range of forest and cerrado habitats, and are usually seen near rivers and streams. They are typically found at elevations below , but they may be found as high as in some parts of the Bolivian Andes. In some regions, they may also be found in cultivated areas, such as plantations and rice paddies. Four living, and one fossil subspecies are recognised: Galictis vittata vittata – northern South America Galictis vittata andina – Peru and Bolivia Galictis vittata brasiliensis – Brazil Galictis vittata canaster – Central America and southern Mexico † Galictis vittata fossilis – Pleistocene Brazil Behaviour Greater grisons are primarily terrestrial, although they can climb trees and swim well. They are mostly diurnal, and only occasionally active at night. They live alone or in pairs, with home ranges of at least , and a very low population density, such that they are rarely encountered in the wild. They spend the night sleeping in cavities in hollow logs or beneath tree roots, or else in the abandoned burrows of other animals. Little is known of their diet, although it consists largely of small vertebrates, such as fish, amphibians, birds, and other mammals. While hunting, they move in a zigzag pattern, making short bounds and occasionally stopping to look around with their heads raised and sniff the air. When moving more cautiously, they press their bodies close to the ground in a movement that has been described as 'snake-like'. They have been reported to respond to threats with a series of grunts that rise in intensity and frequency until they become rapid barks, and finally a single loud scream with their teeth bared. Biology Like many other mustelids, greater grisons possess anal scent glands that secrete a yellowish or greenish musk. Although not especially noxious in comparison with that of other species, this can be sprayed at attackers, as well as being used to mark the grison's territory. Litters of up to four young are born from March to September, after a gestation period of 39 days. Newborn young weigh less than , and are initially blind, although with a short coat of hair already bearing the adult pattern. Their eyes open after two weeks, and they begin to eat solid food at three weeks, reaching the adult size in just four months. They have lived for at least ten years in captivity. References Carnivorans of North America Carnivorans of Central America Carnivorans of South America Mammals of Bolivia Mammals of Brazil Mammals of Colombia Mammals of Mexico Mammals of Peru Mammals of Venezuela Fauna of the Amazon Least concern biota of North America Least concern biota of South America Mammals described in 1776 Taxa named by Johann Christian Daniel von Schreber
```objective-c /* path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Author: lode.vandevenne@gmail.com (Lode Vandevenne) Author: jyrki.alakuijala@gmail.com (Jyrki Alakuijala) */ /* The squeeze functions do enhanced LZ77 compression by optimal parsing with a cost model, rather than greedily choosing the longest length or using a single step of lazy matching like regular implementations. Since the cost model is based on the Huffman tree that can only be calculated after the LZ77 data is generated, there is a chicken and egg problem, and multiple runs are done with updated cost models to converge to a better solution. */ #ifndef ZOPFLI_SQUEEZE_H_ #define ZOPFLI_SQUEEZE_H_ #include "lz77.h" /* Calculates lit/len and dist pairs for given data. If instart is larger than 0, it uses values before instart as starting dictionary. */ void ZopfliLZ77Optimal(ZopfliBlockState *s, const unsigned char* in, size_t instart, size_t inend, int numiterations, ZopfliLZ77Store* store); /* Does the same as ZopfliLZ77Optimal, but optimized for the fixed tree of the deflate standard. The fixed tree never gives the best compression. But this gives the best possible LZ77 encoding possible with the fixed tree. This does not create or output any fixed tree, only LZ77 data optimized for using with a fixed tree. If instart is larger than 0, it uses values before instart as starting dictionary. */ void ZopfliLZ77OptimalFixed(ZopfliBlockState *s, const unsigned char* in, size_t instart, size_t inend, ZopfliLZ77Store* store); #endif /* ZOPFLI_SQUEEZE_H_ */ ```
```python from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from . import base from ..constants import namespaces, voidElements from ..constants import spaceCharacters spaceCharacters = "".join(spaceCharacters) class Filter(base.Filter): def __init__(self, source, require_matching_tags=True): super(Filter, self).__init__(source) self.require_matching_tags = require_matching_tags def __iter__(self): open_elements = [] for token in base.Filter.__iter__(self): type = token["type"] if type in ("StartTag", "EmptyTag"): namespace = token["namespace"] name = token["name"] assert namespace is None or isinstance(namespace, text_type) assert namespace != "" assert isinstance(name, text_type) assert name != "" assert isinstance(token["data"], dict) if (not namespace or namespace == namespaces["html"]) and name in voidElements: assert type == "EmptyTag" else: assert type == "StartTag" if type == "StartTag" and self.require_matching_tags: open_elements.append((namespace, name)) for (namespace, name), value in token["data"].items(): assert namespace is None or isinstance(namespace, text_type) assert namespace != "" assert isinstance(name, text_type) assert name != "" assert isinstance(value, text_type) elif type == "EndTag": namespace = token["namespace"] name = token["name"] assert namespace is None or isinstance(namespace, text_type) assert namespace != "" assert isinstance(name, text_type) assert name != "" if (not namespace or namespace == namespaces["html"]) and name in voidElements: assert False, "Void element reported as EndTag token: %(tag)s" % {"tag": name} elif self.require_matching_tags: start = open_elements.pop() assert start == (namespace, name) elif type == "Comment": data = token["data"] assert isinstance(data, text_type) elif type in ("Characters", "SpaceCharacters"): data = token["data"] assert isinstance(data, text_type) assert data != "" if type == "SpaceCharacters": assert data.strip(spaceCharacters) == "" elif type == "Doctype": name = token["name"] assert name is None or isinstance(name, text_type) assert token["publicId"] is None or isinstance(name, text_type) assert token["systemId"] is None or isinstance(name, text_type) elif type == "Entity": assert isinstance(token["name"], text_type) elif type == "SerializerError": assert isinstance(token["data"], text_type) else: assert False, "Unknown token type: %(type)s" % {"type": type} yield token ```
```yaml bounding_box: - - -7.488389900229108 - 60.89207339559458 - - -6.168657472558352 - 62.1530567252827 capacity: hydro: 3.3 oil: 13.6 solar: 0.24 wind: 6 contributors: - corradio - q-- - VIKTORVAV99 - amv213 emissionFactors: direct: biomass: datetime: '2021-01-01' source: BEIS 2021 value: 0 coal: - datetime: '2021-01-01' source: EU-ETS, ENTSO-E 2021 value: 1057.262766 - datetime: '2022-01-01' source: EU-ETS, ENTSO-E 2022 value: 1075.5 gas: - datetime: '2021-01-01' source: EU-ETS, ENTSO-E 2021 value: 481.60707 - datetime: '2022-01-01' source: EU-ETS, ENTSO-E 2022 value: 412.38 oil: - datetime: '2021-01-01' source: EU-ETS, ENTSO-E 2021 value: 880.903938 - datetime: '2022-01-01' source: EU-ETS, ENTSO-E 2022 value: 925.95 lifecycle: biomass: datetime: '2014-01-01' source: BEIS 2021; IPCC 2014 value: 230 coal: - datetime: '2021-01-01' source: EU-ETS, ENTSO-E 2021; Oberschelp, Christopher, et al. "Global emission hotspots of coal power generation." value: 1168.890109 - datetime: '2022-01-01' source: EU-ETS, ENTSO-E 2022; IPCC 2014 value: 1144.294608 gas: - datetime: '2021-01-01' source: EU-ETS, ENTSO-E 2021; IPCC 2014 value: 539.8221756 - datetime: '2022-01-01' source: EU-ETS, ENTSO-E 2022; IPCC 2014 value: 532.38 hydro: datetime: '2020-01-01' source: UNECE 2022 value: 10.7 nuclear: datetime: '2020-01-01' source: UNECE 2022 value: 5.13 oil: - datetime: '2021-01-01' source: EU-ETS, ENTSO-E 2021; IPCC 2014 value: 1124.903938 - datetime: '2022-01-01' source: EU-ETS, ENTSO-E 2022; IPCC 2014 value: 1169.95 wind: datetime: '2014-01-01' source: UNECE 2022, WindEurope "Wind energy in Europe, 2021 Statistics and the outlook for 2022-2026" Wind Europe Proceedings (2021) value: 12.62 parsers: production: FO.fetch_production sources: EU-ETS, ENTSO-E 2021: link: path_to_url EU-ETS, ENTSO-E 2022: link: path_to_url IPCC 2014: link: path_to_url#page=7 UNECE 2022: link: path_to_url ? UNECE 2022, WindEurope "Wind energy in Europe, 2021 Statistics and the outlook for 2022-2026" Wind Europe Proceedings (2021) : link: path_to_url#page=37, path_to_url timezone: Atlantic/Faroe region: Europe country: FO ```
The 1976 U.S. Open was the 76th U.S. Open, held June 17–20 at the Highlands Course of the Atlanta Athletic Club in Duluth, Georgia, a suburb northeast of Atlanta. Tour rookie Jerry Pate won his only major championship, two strokes ahead of runners-up Al Geiberger and Tom Weiskopf. John Mahaffey, who lost the U.S. Open in a playoff the year before, took the lead with a 68 in the second round. He followed that up with a 69 in the third round on Saturday for a two-stroke lead over Jerry Pate after 54 holes, with Geiberger three back and Weiskopf four back. The gap was still two strokes after fourteen holes, but Pate hit a one-iron close and birdied the par-3 15th; and when Mahaffey bogeyed 16, the two were tied. Mahaffey three-putted for bogey on 17 and Pate took a one-stroke lead as Mahaffey fell into a tie for second with Geiberger and Weiskopf, both in the clubhouse with 279. Both Mahaffey and Pate found the rough off the 18th tee. Mahaffey, behind by a shot and trying for birdie, hit his approach shot into the water fronting the green and made bogey, and fell into a tie for fourth. Having a better lie in the rough, Pate gambled that he could clear the water and then hit one of the most memorable shots in U.S. Open history. His 5-iron approach from flew directly on to the green and stopped from the hole, and he made the birdie putt for a two-stroke victory. The U.S. Amateur champion two years earlier in 1974, Pate was only 22 in 1976 and appeared to have a bright future ahead of him, but shoulder injuries significantly shortened his career. He won seven more PGA Tour tournaments, the last in 1982, and finished runner-up in two additional majors in the late 1970s. Future champion Fuzzy Zoeller made his major championship debut at this U.S. Open and finished in 38th place. Mike Reid, a 21-year-old amateur, led by three shots after the first round, but a second-round 81 dashed any hope of an amateur champion. He shared low-amateur honors with John Fought at 300 (+20). Jack Nicklaus finished tied for eleventh and saw his streak of 13 consecutive top-10s in majors come to an end. He began a new streak and finished in the top-10 in the next nine majors. Only Harry Vardon made more consecutive major top-10s when he made sixteen in a row – fifteen Open Championships (1894–1908) and the U.S. Open in 1900. This was the first of four majors held at the Highlands Course; it hosted the PGA Championship in 1981, 2001, and 2011. This was the first year that players were allowed to have their own caddies at the U.S. Open. The other majors and some PGA Tour events had traditionally disallowed players from using their own caddies. The Masters required club caddies from Augusta National through 1982. Course layout Atlanta Athletic Club, Highlands Course Source: Round summaries First round Thursday, June 17, 1976 Amateur Mike Reid, age 21, grabbed the first round lead with a three-under 67, while the rest of the field posted no better than par. Several professionals voiced their concerns over the playing conditions of the course. Source: Second round Friday, June 18, 1976 John Mahaffey shot a 68 and grabbed the lead, while amateur Reid fell into a tie for 32nd place with an 81. Source: Third round Saturday, June 19, 1976 Mahaffey kept the lead with a 69, two strokes ahead of Pate, with Al Geiberger and Tom Weiskopf in third and fourth place. After nine holes, Mahaffey opened up a six-stroke lead but struggled on the back nine and, with Pate making a remarkable eagle on 12, the lead was cut to two when the day ended. Source: Final round Sunday, June 20, 1976 Source: Scorecard Cumulative tournament scores, relative to par Source: References External links GolfCompendium.com:1976 U.S. Open USGA Championship Database USOpen.com - 1976 U.S. Open (golf) Golf in Georgia (U.S. state) Sports in Duluth, Georgia U.S. Open U.S. Open (golf) U.S. Open (golf)
A large number of date cultivars and varieties emerged through history of its cultivation, but the exact number is difficult to assess. Hussain and El-Zeid (1975) have reported 400 varieties, while Nixon (1954) named around 250. Most of those are limited to a particular region, and only a few dozen have attained broader commercial importance. The most renowned cultivars worldwide include Deglet Noor, originally of Algeria; Zahidi and Hallawi of Iraq; Medjool of Morocco; Mazafati of Iran. Most of the information in the following list is from Date Palm Genetic Resources and Utilization by Al-Khayri et al. (2015). List In Gaza The Gaza Strip, especially Deir al-Balah ("Village of Dates"), is known for its exceptionally sweet red dates. See also Date cultivation in Dar al-Manasir#Date cultivars References Further reading – extensive reference about date cultivars of Tunisia Lists of cultivars Lists of foods
United Nations Security Council Resolution 204, adopted unanimously on May 19, 1965, after a complaint by Senegal against Portugal, the Council deplored incursions by the Portuguese Armed Forces into Senegalese territory and requested that they take whatever measures necessary to assure Senegal's territorial integrity. See also List of United Nations Security Council Resolutions 201 to 300 (1965–1971) Portuguese Empire United Nations Security Council Resolution 178 References Text of the Resolution at undocs.org External links 0204 0204 0204 0204 1965 in Portuguese Guinea 1965 in Portugal 1965 in Senegal May 1965 events
```smalltalk " Three fingers are swiping " Class { #name : 'OSTouchThreeFingersSwipeMoveEvent', #superclass : 'OSTouchThreeFingersSwipeEvent', #category : 'OSWindow-Core-Events-Touch', #package : 'OSWindow-Core', #tag : 'Events-Touch' } { #category : 'visitor' } OSTouchThreeFingersSwipeMoveEvent >> accept: aVisitor [ aVisitor visitTouchThreeFingersSwipeMoveEvent: self ] ```
Ethiopia competed at the 2009 World Championships in Athletics from 15 to 23 August. A team of 38 athletes competed after achieving one of the competition's qualifying standards. The squad composed of middle and long distance specialists featured three reigning world champions: Meseret Defar (5000 m), Tirunesh Dibaba (10,000 m), and Kenenisa Bekele (10,000 m). Because a champion is given a bye into the championships, Ethiopia was permitted to enter an extra athlete in those events, and the Ethiopian Athletics Federation also picked a reserve athlete in these events. Team selection Results Men Women References External links Nations at the 2009 World Championships in Athletics World Championships in Athletics Ethiopia at the World Athletics Championships
```c++ // 2016 and later: Unicode, Inc. and others. /* ******************************************************************************* * others. All Rights Reserved. ******************************************************************************* * * File GREGOCAL.CPP * * Modification History: * * Date Name Description * 02/05/97 clhuang Creation. * 03/28/97 aliu Made highly questionable fix to computeFields to * handle DST correctly. * 04/22/97 aliu Cleaned up code drastically. Added monthLength(). * Finished unimplemented parts of computeTime() for * week-based date determination. Removed quetionable * fix and wrote correct fix for computeFields() and * daylight time handling. Rewrote inDaylightTime() * and computeFields() to handle sensitive Daylight to * Standard time transitions correctly. * 05/08/97 aliu Added code review changes. Fixed isLeapYear() to * not cutover. * 08/12/97 aliu Added equivalentTo. Misc other fixes. Updated * add() from Java source. * 07/28/98 stephen Sync up with JDK 1.2 * 09/14/98 stephen Changed type of kOneDay, kOneWeek to double. * Fixed bug in roll() * 10/15/99 aliu Fixed j31, incorrect WEEK_OF_YEAR computation. * 10/15/99 aliu Fixed j32, cannot set date to Feb 29 2000 AD. * {JDK bug 4210209 4209272} * 11/15/99 weiv Added YEAR_WOY and DOW_LOCAL computation * to timeToFields method, updated kMinValues, kMaxValues & kLeastMaxValues * 12/09/99 aliu Fixed j81, calculation errors and roll bugs * in year of cutover. * 01/24/2000 aliu Revised computeJulianDay for YEAR YEAR_WOY WOY. ******************************************************************************** */ #include "unicode/utypes.h" #include <float.h> #if !UCONFIG_NO_FORMATTING #include "unicode/gregocal.h" #include "gregoimp.h" #include "umutex.h" #include "uassert.h" // ***************************************************************************** // class GregorianCalendar // ***************************************************************************** /** * Note that the Julian date used here is not a true Julian date, since * it is measured from midnight, not noon. This value is the Julian * day number of January 1, 1970 (Gregorian calendar) at noon UTC. [LIU] */ static const int16_t kNumDays[] = {0,31,59,90,120,151,181,212,243,273,304,334}; // 0-based, for day-in-year static const int16_t kLeapNumDays[] = {0,31,60,91,121,152,182,213,244,274,305,335}; // 0-based, for day-in-year static const int8_t kMonthLength[] = {31,28,31,30,31,30,31,31,30,31,30,31}; // 0-based static const int8_t kLeapMonthLength[] = {31,29,31,30,31,30,31,31,30,31,30,31}; // 0-based // setTimeInMillis() limits the Julian day range to +/-7F000000. // This would seem to limit the year range to: // ms=+183882168921600000 jd=7f000000 December 20, 5828963 AD // ms=-184303902528000000 jd=81000000 September 20, 5838270 BC // HOWEVER, CalendarRegressionTest/Test4167060 shows that the actual // range limit on the year field is smaller (~ +/-140000). [alan 3.0] static const int32_t kGregorianCalendarLimits[UCAL_FIELD_COUNT][4] = { // Minimum Greatest Least Maximum // Minimum Maximum { 0, 0, 1, 1}, // ERA { 1, 1, 140742, 144683}, // YEAR { 0, 0, 11, 11}, // MONTH { 1, 1, 52, 53}, // WEEK_OF_YEAR {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // WEEK_OF_MONTH { 1, 1, 28, 31}, // DAY_OF_MONTH { 1, 1, 365, 366}, // DAY_OF_YEAR {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // DAY_OF_WEEK { -1, -1, 4, 5}, // DAY_OF_WEEK_IN_MONTH {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // AM_PM {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // HOUR {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // HOUR_OF_DAY {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // MINUTE {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // SECOND {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // MILLISECOND {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // ZONE_OFFSET {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // DST_OFFSET { -140742, -140742, 140742, 144683}, // YEAR_WOY {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // DOW_LOCAL { -140742, -140742, 140742, 144683}, // EXTENDED_YEAR {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // JULIAN_DAY {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // MILLISECONDS_IN_DAY {/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // IS_LEAP_MONTH }; /* * <pre> * Greatest Least * Field name Minimum Minimum Maximum Maximum * ---------- ------- ------- ------- ------- * ERA 0 0 1 1 * YEAR 1 1 140742 144683 * MONTH 0 0 11 11 * WEEK_OF_YEAR 1 1 52 53 * WEEK_OF_MONTH 0 0 4 6 * DAY_OF_MONTH 1 1 28 31 * DAY_OF_YEAR 1 1 365 366 * DAY_OF_WEEK 1 1 7 7 * DAY_OF_WEEK_IN_MONTH -1 -1 4 5 * AM_PM 0 0 1 1 * HOUR 0 0 11 11 * HOUR_OF_DAY 0 0 23 23 * MINUTE 0 0 59 59 * SECOND 0 0 59 59 * MILLISECOND 0 0 999 999 * ZONE_OFFSET -12* -12* 12* 12* * DST_OFFSET 0 0 1* 1* * YEAR_WOY 1 1 140742 144683 * DOW_LOCAL 1 1 7 7 * </pre> * (*) In units of one-hour */ #if defined( U_DEBUG_CALSVC ) || defined (U_DEBUG_CAL) #include <stdio.h> #endif U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(GregorianCalendar) // 00:00:00 UTC, October 15, 1582, expressed in ms from the epoch. // Note that only Italy and other Catholic countries actually // observed this cutover. Most other countries followed in // the next few centuries, some as late as 1928. [LIU] // in Java, -12219292800000L //const UDate GregorianCalendar::kPapalCutover = -12219292800000L; static const uint32_t kCutoverJulianDay = 2299161; static const UDate kPapalCutover = (2299161.0 - kEpochStartAsJulianDay) * U_MILLIS_PER_DAY; //static const UDate kPapalCutoverJulian = (2299161.0 - kEpochStartAsJulianDay); // ------------------------------------- GregorianCalendar::GregorianCalendar(UErrorCode& status) : Calendar(status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(TimeZone* zone, UErrorCode& status) : Calendar(zone, Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(const TimeZone& zone, UErrorCode& status) : Calendar(zone, Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(const Locale& aLocale, UErrorCode& status) : Calendar(TimeZone::createDefault(), aLocale, status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(TimeZone* zone, const Locale& aLocale, UErrorCode& status) : Calendar(zone, aLocale, status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(const TimeZone& zone, const Locale& aLocale, UErrorCode& status) : Calendar(zone, aLocale, status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { setTimeInMillis(getNow(), status); } // ------------------------------------- GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date, UErrorCode& status) : Calendar(TimeZone::createDefault(), Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { set(UCAL_ERA, AD); set(UCAL_YEAR, year); set(UCAL_MONTH, month); set(UCAL_DATE, date); } // ------------------------------------- GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, UErrorCode& status) : Calendar(TimeZone::createDefault(), Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { set(UCAL_ERA, AD); set(UCAL_YEAR, year); set(UCAL_MONTH, month); set(UCAL_DATE, date); set(UCAL_HOUR_OF_DAY, hour); set(UCAL_MINUTE, minute); } // ------------------------------------- GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, int32_t second, UErrorCode& status) : Calendar(TimeZone::createDefault(), Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), fIsGregorian(TRUE), fInvertGregorian(FALSE) { set(UCAL_ERA, AD); set(UCAL_YEAR, year); set(UCAL_MONTH, month); set(UCAL_DATE, date); set(UCAL_HOUR_OF_DAY, hour); set(UCAL_MINUTE, minute); set(UCAL_SECOND, second); } // ------------------------------------- GregorianCalendar::~GregorianCalendar() { } // ------------------------------------- GregorianCalendar::GregorianCalendar(const GregorianCalendar &source) : Calendar(source), fGregorianCutover(source.fGregorianCutover), fCutoverJulianDay(source.fCutoverJulianDay), fNormalizedGregorianCutover(source.fNormalizedGregorianCutover), fGregorianCutoverYear(source.fGregorianCutoverYear), fIsGregorian(source.fIsGregorian), fInvertGregorian(source.fInvertGregorian) { } // ------------------------------------- Calendar* GregorianCalendar::clone() const { return new GregorianCalendar(*this); } // ------------------------------------- GregorianCalendar & GregorianCalendar::operator=(const GregorianCalendar &right) { if (this != &right) { Calendar::operator=(right); fGregorianCutover = right.fGregorianCutover; fNormalizedGregorianCutover = right.fNormalizedGregorianCutover; fGregorianCutoverYear = right.fGregorianCutoverYear; fCutoverJulianDay = right.fCutoverJulianDay; } return *this; } // ------------------------------------- UBool GregorianCalendar::isEquivalentTo(const Calendar& other) const { // Calendar override. return Calendar::isEquivalentTo(other) && fGregorianCutover == ((GregorianCalendar*)&other)->fGregorianCutover; } // ------------------------------------- void GregorianCalendar::setGregorianChange(UDate date, UErrorCode& status) { if (U_FAILURE(status)) return; fGregorianCutover = date; // Precompute two internal variables which we use to do the actual // cutover computations. These are the normalized cutover, which is the // midnight at or before the cutover, and the cutover year. The // normalized cutover is in pure date milliseconds; it contains no time // of day or timezone component, and it used to compare against other // pure date values. int32_t cutoverDay = (int32_t)ClockMath::floorDivide(fGregorianCutover, (double)kOneDay); fNormalizedGregorianCutover = cutoverDay * kOneDay; // Handle the rare case of numeric overflow. If the user specifies a // change of UDate(Long.MIN_VALUE), in order to get a pure Gregorian // calendar, then the epoch day is -106751991168, which when multiplied // by ONE_DAY gives 9223372036794351616 -- the negative value is too // large for 64 bits, and overflows into a positive value. We correct // this by using the next day, which for all intents is semantically // equivalent. if (cutoverDay < 0 && fNormalizedGregorianCutover > 0) { fNormalizedGregorianCutover = (cutoverDay + 1) * kOneDay; } // Normalize the year so BC values are represented as 0 and negative // values. GregorianCalendar *cal = new GregorianCalendar(getTimeZone(), status); /* test for NULL */ if (cal == 0) { status = U_MEMORY_ALLOCATION_ERROR; return; } if(U_FAILURE(status)) return; cal->setTime(date, status); fGregorianCutoverYear = cal->get(UCAL_YEAR, status); if (cal->get(UCAL_ERA, status) == BC) fGregorianCutoverYear = 1 - fGregorianCutoverYear; fCutoverJulianDay = cutoverDay; delete cal; } void GregorianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) { int32_t eyear, month, dayOfMonth, dayOfYear, unusedRemainder; if(U_FAILURE(status)) { return; } #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: jd%d- (greg's %d)- [cut=%d]\n", __FILE__, __LINE__, julianDay, getGregorianDayOfYear(), fCutoverJulianDay); #endif if (julianDay >= fCutoverJulianDay) { month = getGregorianMonth(); dayOfMonth = getGregorianDayOfMonth(); dayOfYear = getGregorianDayOfYear(); eyear = getGregorianYear(); } else { // The Julian epoch day (not the same as Julian Day) // is zero on Saturday December 30, 0 (Gregorian). int32_t julianEpochDay = julianDay - (kJan1_1JulianDay - 2); eyear = (int32_t) ClockMath::floorDivide((4.0*julianEpochDay) + 1464.0, (int32_t) 1461, unusedRemainder); // Compute the Julian calendar day number for January 1, eyear int32_t january1 = 365*(eyear-1) + ClockMath::floorDivide(eyear-1, (int32_t)4); dayOfYear = (julianEpochDay - january1); // 0-based // Julian leap years occurred historically every 4 years starting // with 8 AD. Before 8 AD the spacing is irregular; every 3 years // from 45 BC to 9 BC, and then none until 8 AD. However, we don't // implement this historical detail; instead, we implement the // computatinally cleaner proleptic calendar, which assumes // consistent 4-year cycles throughout time. UBool isLeap = ((eyear&0x3) == 0); // equiv. to (eyear%4 == 0) // Common Julian/Gregorian calculation int32_t correction = 0; int32_t march1 = isLeap ? 60 : 59; // zero-based DOY for March 1 if (dayOfYear >= march1) { correction = isLeap ? 1 : 2; } month = (12 * (dayOfYear + correction) + 6) / 367; // zero-based month dayOfMonth = dayOfYear - (isLeap?kLeapNumDays[month]:kNumDays[month]) + 1; // one-based DOM ++dayOfYear; #if defined (U_DEBUG_CAL) // fprintf(stderr, "%d - %d[%d] + 1\n", dayOfYear, isLeap?kLeapNumDays[month]:kNumDays[month], month ); // fprintf(stderr, "%s:%d: greg's HCF %d -> %d/%d/%d not %d/%d/%d\n", // __FILE__, __LINE__,julianDay, // eyear,month,dayOfMonth, // getGregorianYear(), getGregorianMonth(), getGregorianDayOfMonth() ); fprintf(stderr, "%s:%d: doy %d (greg's %d)- [cut=%d]\n", __FILE__, __LINE__, dayOfYear, getGregorianDayOfYear(), fCutoverJulianDay); #endif } // [j81] if we are after the cutover in its year, shift the day of the year if((eyear == fGregorianCutoverYear) && (julianDay >= fCutoverJulianDay)) { //from handleComputeMonthStart int32_t gregShift = Grego::gregorianShift(eyear); #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: gregorian shift %d ::: doy%d => %d [cut=%d]\n", __FILE__, __LINE__,gregShift, dayOfYear, dayOfYear+gregShift, fCutoverJulianDay); #endif dayOfYear += gregShift; } internalSet(UCAL_MONTH, month); internalSet(UCAL_DAY_OF_MONTH, dayOfMonth); internalSet(UCAL_DAY_OF_YEAR, dayOfYear); internalSet(UCAL_EXTENDED_YEAR, eyear); int32_t era = AD; if (eyear < 1) { era = BC; eyear = 1 - eyear; } internalSet(UCAL_ERA, era); internalSet(UCAL_YEAR, eyear); } // ------------------------------------- UDate GregorianCalendar::getGregorianChange() const { return fGregorianCutover; } // ------------------------------------- UBool GregorianCalendar::isLeapYear(int32_t year) const { // MSVC complains bitterly if we try to use Grego::isLeapYear here // NOTE: year&0x3 == year%4 return (year >= fGregorianCutoverYear ? (((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0))) : // Gregorian ((year&0x3) == 0)); // Julian } // ------------------------------------- int32_t GregorianCalendar::handleComputeJulianDay(UCalendarDateFields bestField) { fInvertGregorian = FALSE; int32_t jd = Calendar::handleComputeJulianDay(bestField); if((bestField == UCAL_WEEK_OF_YEAR) && // if we are doing WOY calculations, we are counting relative to Jan 1 *julian* (internalGet(UCAL_EXTENDED_YEAR)==fGregorianCutoverYear) && jd >= fCutoverJulianDay) { fInvertGregorian = TRUE; // So that the Julian Jan 1 will be used in handleComputeMonthStart return Calendar::handleComputeJulianDay(bestField); } // The following check handles portions of the cutover year BEFORE the // cutover itself happens. //if ((fIsGregorian==TRUE) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */ if ((fIsGregorian==TRUE) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */ #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: jd [invert] %d\n", __FILE__, __LINE__, jd); #endif fInvertGregorian = TRUE; jd = Calendar::handleComputeJulianDay(bestField); #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: fIsGregorian %s, fInvertGregorian %s - ", __FILE__, __LINE__,fIsGregorian?"T":"F", fInvertGregorian?"T":"F"); fprintf(stderr, " jd NOW %d\n", jd); #endif } else { #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: jd [==] %d - %sfIsGregorian %sfInvertGregorian, %d\n", __FILE__, __LINE__, jd, fIsGregorian?"T":"F", fInvertGregorian?"T":"F", bestField); #endif } if(fIsGregorian && (internalGet(UCAL_EXTENDED_YEAR) == fGregorianCutoverYear)) { int32_t gregShift = Grego::gregorianShift(internalGet(UCAL_EXTENDED_YEAR)); if (bestField == UCAL_DAY_OF_YEAR) { #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: [DOY%d] gregorian shift of JD %d += %d\n", __FILE__, __LINE__, fFields[bestField],jd, gregShift); #endif jd -= gregShift; } else if ( bestField == UCAL_WEEK_OF_MONTH ) { int32_t weekShift = 14; #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: [WOY/WOM] gregorian week shift of %d += %d\n", __FILE__, __LINE__, jd, weekShift); #endif jd += weekShift; // shift by weeks for week based fields. } } return jd; } int32_t GregorianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /* useMonth */) const { GregorianCalendar *nonConstThis = (GregorianCalendar*)this; // cast away const // If the month is out of range, adjust it into range, and // modify the extended year value accordingly. if (month < 0 || month > 11) { eyear += ClockMath::floorDivide(month, 12, month); } UBool isLeap = eyear%4 == 0; int32_t y = eyear-1; int32_t julianDay = 365*y + ClockMath::floorDivide(y, 4) + (kJan1_1JulianDay - 3); nonConstThis->fIsGregorian = (eyear >= fGregorianCutoverYear); #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: (hcms%d/%d) fIsGregorian %s, fInvertGregorian %s\n", __FILE__, __LINE__, eyear,month, fIsGregorian?"T":"F", fInvertGregorian?"T":"F"); #endif if (fInvertGregorian) { nonConstThis->fIsGregorian = !fIsGregorian; } if (fIsGregorian) { isLeap = isLeap && ((eyear%100 != 0) || (eyear%400 == 0)); // Add 2 because Gregorian calendar starts 2 days after // Julian calendar int32_t gregShift = Grego::gregorianShift(eyear); #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: (hcms%d/%d) gregorian shift of %d += %d\n", __FILE__, __LINE__, eyear, month, julianDay, gregShift); #endif julianDay += gregShift; } // At this point julianDay indicates the day BEFORE the first // day of January 1, <eyear> of either the Julian or Gregorian // calendar. if (month != 0) { julianDay += isLeap?kLeapNumDays[month]:kNumDays[month]; } return julianDay; } int32_t GregorianCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { // If the month is out of range, adjust it into range, and // modify the extended year value accordingly. if (month < 0 || month > 11) { extendedYear += ClockMath::floorDivide(month, 12, month); } return isLeapYear(extendedYear) ? kLeapMonthLength[month] : kMonthLength[month]; } int32_t GregorianCalendar::handleGetYearLength(int32_t eyear) const { return isLeapYear(eyear) ? 366 : 365; } int32_t GregorianCalendar::monthLength(int32_t month) const { int32_t year = internalGet(UCAL_EXTENDED_YEAR); return handleGetMonthLength(year, month); } // ------------------------------------- int32_t GregorianCalendar::monthLength(int32_t month, int32_t year) const { return isLeapYear(year) ? kLeapMonthLength[month] : kMonthLength[month]; } // ------------------------------------- int32_t GregorianCalendar::yearLength(int32_t year) const { return isLeapYear(year) ? 366 : 365; } // ------------------------------------- int32_t GregorianCalendar::yearLength() const { return isLeapYear(internalGet(UCAL_YEAR)) ? 366 : 365; } // ------------------------------------- /** * After adjustments such as add(MONTH), add(YEAR), we don't want the * month to jump around. E.g., we don't want Jan 31 + 1 month to go to Mar * 3, we want it to go to Feb 28. Adjustments which might run into this * problem call this method to retain the proper month. */ void GregorianCalendar::pinDayOfMonth() { int32_t monthLen = monthLength(internalGet(UCAL_MONTH)); int32_t dom = internalGet(UCAL_DATE); if(dom > monthLen) set(UCAL_DATE, monthLen); } // ------------------------------------- UBool GregorianCalendar::validateFields() const { for (int32_t field = 0; field < UCAL_FIELD_COUNT; field++) { // Ignore DATE and DAY_OF_YEAR which are handled below if (field != UCAL_DATE && field != UCAL_DAY_OF_YEAR && isSet((UCalendarDateFields)field) && ! boundsCheck(internalGet((UCalendarDateFields)field), (UCalendarDateFields)field)) return FALSE; } // Values differ in Least-Maximum and Maximum should be handled // specially. if (isSet(UCAL_DATE)) { int32_t date = internalGet(UCAL_DATE); if (date < getMinimum(UCAL_DATE) || date > monthLength(internalGet(UCAL_MONTH))) { return FALSE; } } if (isSet(UCAL_DAY_OF_YEAR)) { int32_t days = internalGet(UCAL_DAY_OF_YEAR); if (days < 1 || days > yearLength()) { return FALSE; } } // Handle DAY_OF_WEEK_IN_MONTH, which must not have the value zero. // We've checked against minimum and maximum above already. if (isSet(UCAL_DAY_OF_WEEK_IN_MONTH) && 0 == internalGet(UCAL_DAY_OF_WEEK_IN_MONTH)) { return FALSE; } return TRUE; } // ------------------------------------- UBool GregorianCalendar::boundsCheck(int32_t value, UCalendarDateFields field) const { return value >= getMinimum(field) && value <= getMaximum(field); } // ------------------------------------- UDate GregorianCalendar::getEpochDay(UErrorCode& status) { complete(status); // Divide by 1000 (convert to seconds) in order to prevent overflow when // dealing with UDate(Long.MIN_VALUE) and UDate(Long.MAX_VALUE). double wallSec = internalGetTime()/1000 + (internalGet(UCAL_ZONE_OFFSET) + internalGet(UCAL_DST_OFFSET))/1000; return ClockMath::floorDivide(wallSec, kOneDay/1000.0); } // ------------------------------------- // ------------------------------------- /** * Compute the julian day number of the day BEFORE the first day of * January 1, year 1 of the given calendar. If julianDay == 0, it * specifies (Jan. 1, 1) - 1, in whatever calendar we are using (Julian * or Gregorian). */ double GregorianCalendar::computeJulianDayOfYear(UBool isGregorian, int32_t year, UBool& isLeap) { isLeap = year%4 == 0; int32_t y = year - 1; double julianDay = 365.0*y + ClockMath::floorDivide(y, 4) + (kJan1_1JulianDay - 3); if (isGregorian) { isLeap = isLeap && ((year%100 != 0) || (year%400 == 0)); // Add 2 because Gregorian calendar starts 2 days after Julian calendar julianDay += Grego::gregorianShift(year); } return julianDay; } // /** // * Compute the day of week, relative to the first day of week, from // * 0..6, of the current DOW_LOCAL or DAY_OF_WEEK fields. This is // * equivalent to get(DOW_LOCAL) - 1. // */ // int32_t GregorianCalendar::computeRelativeDOW() const { // int32_t relDow = 0; // if (fStamp[UCAL_DOW_LOCAL] > fStamp[UCAL_DAY_OF_WEEK]) { // relDow = internalGet(UCAL_DOW_LOCAL) - 1; // 1-based // } else if (fStamp[UCAL_DAY_OF_WEEK] != kUnset) { // relDow = internalGet(UCAL_DAY_OF_WEEK) - getFirstDayOfWeek(); // if (relDow < 0) relDow += 7; // } // return relDow; // } // /** // * Compute the day of week, relative to the first day of week, // * from 0..6 of the given julian day. // */ // int32_t GregorianCalendar::computeRelativeDOW(double julianDay) const { // int32_t relDow = julianDayToDayOfWeek(julianDay) - getFirstDayOfWeek(); // if (relDow < 0) { // relDow += 7; // } // return relDow; // } // /** // * Compute the DOY using the WEEK_OF_YEAR field and the julian day // * of the day BEFORE January 1 of a year (a return value from // * computeJulianDayOfYear). // */ // int32_t GregorianCalendar::computeDOYfromWOY(double julianDayOfYear) const { // // Compute DOY from day of week plus week of year // // Find the day of the week for the first of this year. This // // is zero-based, with 0 being the locale-specific first day of // // the week. Add 1 to get first day of year. // int32_t fdy = computeRelativeDOW(julianDayOfYear + 1); // return // // Compute doy of first (relative) DOW of WOY 1 // (((7 - fdy) < getMinimalDaysInFirstWeek()) // ? (8 - fdy) : (1 - fdy)) // // Adjust for the week number. // + (7 * (internalGet(UCAL_WEEK_OF_YEAR) - 1)) // // Adjust for the DOW // + computeRelativeDOW(); // } // ------------------------------------- double GregorianCalendar::millisToJulianDay(UDate millis) { return (double)kEpochStartAsJulianDay + ClockMath::floorDivide(millis, (double)kOneDay); } // ------------------------------------- UDate GregorianCalendar::julianDayToMillis(double julian) { return (UDate) ((julian - kEpochStartAsJulianDay) * (double) kOneDay); } // ------------------------------------- int32_t GregorianCalendar::aggregateStamp(int32_t stamp_a, int32_t stamp_b) { return (((stamp_a != kUnset && stamp_b != kUnset) ? uprv_max(stamp_a, stamp_b) : (int32_t)kUnset)); } // ------------------------------------- /** * Roll a field by a signed amount. * Note: This will be made public later. [LIU] */ void GregorianCalendar::roll(EDateFields field, int32_t amount, UErrorCode& status) { roll((UCalendarDateFields) field, amount, status); } void GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) { if((amount == 0) || U_FAILURE(status)) { return; } // J81 processing. (gregorian cutover) UBool inCutoverMonth = FALSE; int32_t cMonthLen=0; // 'c' for cutover; in days int32_t cDayOfMonth=0; // no discontinuity: [0, cMonthLen) double cMonthStart=0.0; // in ms // Common code - see if we're in the cutover month of the cutover year if(get(UCAL_EXTENDED_YEAR, status) == fGregorianCutoverYear) { switch (field) { case UCAL_DAY_OF_MONTH: case UCAL_WEEK_OF_MONTH: { int32_t max = monthLength(internalGet(UCAL_MONTH)); UDate t = internalGetTime(); // We subtract 1 from the DAY_OF_MONTH to make it zero-based, and an // additional 10 if we are after the cutover. Thus the monthStart // value will be correct iff we actually are in the cutover month. cDayOfMonth = internalGet(UCAL_DAY_OF_MONTH) - ((t >= fGregorianCutover) ? 10 : 0); cMonthStart = t - ((cDayOfMonth - 1) * kOneDay); // A month containing the cutover is 10 days shorter. if ((cMonthStart < fGregorianCutover) && (cMonthStart + (cMonthLen=(max-10))*kOneDay >= fGregorianCutover)) { inCutoverMonth = TRUE; } } break; default: ; } } switch (field) { case UCAL_WEEK_OF_YEAR: { // Unlike WEEK_OF_MONTH, WEEK_OF_YEAR never shifts the day of the // week. Also, rolling the week of the year can have seemingly // strange effects simply because the year of the week of year // may be different from the calendar year. For example, the // date Dec 28, 1997 is the first day of week 1 of 1998 (if // weeks start on Sunday and the minimal days in first week is // <= 3). int32_t woy = get(UCAL_WEEK_OF_YEAR, status); // Get the ISO year, which matches the week of year. This // may be one year before or after the calendar year. int32_t isoYear = get(UCAL_YEAR_WOY, status); int32_t isoDoy = internalGet(UCAL_DAY_OF_YEAR); if (internalGet(UCAL_MONTH) == UCAL_JANUARY) { if (woy >= 52) { isoDoy += handleGetYearLength(isoYear); } } else { if (woy == 1) { isoDoy -= handleGetYearLength(isoYear - 1); } } woy += amount; // Do fast checks to avoid unnecessary computation: if (woy < 1 || woy > 52) { // Determine the last week of the ISO year. // We do this using the standard formula we use // everywhere in this file. If we can see that the // days at the end of the year are going to fall into // week 1 of the next year, we drop the last week by // subtracting 7 from the last day of the year. int32_t lastDoy = handleGetYearLength(isoYear); int32_t lastRelDow = (lastDoy - isoDoy + internalGet(UCAL_DAY_OF_WEEK) - getFirstDayOfWeek()) % 7; if (lastRelDow < 0) lastRelDow += 7; if ((6 - lastRelDow) >= getMinimalDaysInFirstWeek()) lastDoy -= 7; int32_t lastWoy = weekNumber(lastDoy, lastRelDow + 1); woy = ((woy + lastWoy - 1) % lastWoy) + 1; } set(UCAL_WEEK_OF_YEAR, woy); set(UCAL_YEAR_WOY,isoYear); return; } case UCAL_DAY_OF_MONTH: if( !inCutoverMonth ) { Calendar::roll(field, amount, status); return; } else { // [j81] 1582 special case for DOM // The default computation works except when the current month // contains the Gregorian cutover. We handle this special case // here. [j81 - aliu] double monthLen = cMonthLen * kOneDay; double msIntoMonth = uprv_fmod(internalGetTime() - cMonthStart + amount * kOneDay, monthLen); if (msIntoMonth < 0) { msIntoMonth += monthLen; } #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: roll DOM %d -> %.0lf ms \n", __FILE__, __LINE__,amount, cMonthLen, cMonthStart+msIntoMonth); #endif setTimeInMillis(cMonthStart + msIntoMonth, status); return; } case UCAL_WEEK_OF_MONTH: if( !inCutoverMonth ) { Calendar::roll(field, amount, status); return; } else { #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: roll WOM %d ??????????????????? \n", __FILE__, __LINE__,amount); #endif // NOTE: following copied from the old // GregorianCalendar::roll( WEEK_OF_MONTH ) code // This is tricky, because during the roll we may have to shift // to a different day of the week. For example: // s m t w r f s // 1 2 3 4 5 // 6 7 8 9 10 11 12 // When rolling from the 6th or 7th back one week, we go to the // 1st (assuming that the first partial week counts). The same // thing happens at the end of the month. // The other tricky thing is that we have to figure out whether // the first partial week actually counts or not, based on the // minimal first days in the week. And we have to use the // correct first day of the week to delineate the week // boundaries. // Here's our algorithm. First, we find the real boundaries of // the month. Then we discard the first partial week if it // doesn't count in this locale. Then we fill in the ends with // phantom days, so that the first partial week and the last // partial week are full weeks. We then have a nice square // block of weeks. We do the usual rolling within this block, // as is done elsewhere in this method. If we wind up on one of // the phantom days that we added, we recognize this and pin to // the first or the last day of the month. Easy, eh? // Another wrinkle: To fix jitterbug 81, we have to make all this // work in the oddball month containing the Gregorian cutover. // This month is 10 days shorter than usual, and also contains // a discontinuity in the days; e.g., the default cutover month // is Oct 1582, and goes from day of month 4 to day of month 15. // Normalize the DAY_OF_WEEK so that 0 is the first day of the week // in this locale. We have dow in 0..6. int32_t dow = internalGet(UCAL_DAY_OF_WEEK) - getFirstDayOfWeek(); if (dow < 0) dow += 7; // Find the day of month, compensating for cutover discontinuity. int32_t dom = cDayOfMonth; // Find the day of the week (normalized for locale) for the first // of the month. int32_t fdm = (dow - dom + 1) % 7; if (fdm < 0) fdm += 7; // Get the first day of the first full week of the month, // including phantom days, if any. Figure out if the first week // counts or not; if it counts, then fill in phantom days. If // not, advance to the first real full week (skip the partial week). int32_t start; if ((7 - fdm) < getMinimalDaysInFirstWeek()) start = 8 - fdm; // Skip the first partial week else start = 1 - fdm; // This may be zero or negative // Get the day of the week (normalized for locale) for the last // day of the month. int32_t monthLen = cMonthLen; int32_t ldm = (monthLen - dom + dow) % 7; // We know monthLen >= DAY_OF_MONTH so we skip the += 7 step here. // Get the limit day for the blocked-off rectangular month; that // is, the day which is one past the last day of the month, // after the month has already been filled in with phantom days // to fill out the last week. This day has a normalized DOW of 0. int32_t limit = monthLen + 7 - ldm; // Now roll between start and (limit - 1). int32_t gap = limit - start; int32_t newDom = (dom + amount*7 - start) % gap; if (newDom < 0) newDom += gap; newDom += start; // Finally, pin to the real start and end of the month. if (newDom < 1) newDom = 1; if (newDom > monthLen) newDom = monthLen; // Set the DAY_OF_MONTH. We rely on the fact that this field // takes precedence over everything else (since all other fields // are also set at this point). If this fact changes (if the // disambiguation algorithm changes) then we will have to unset // the appropriate fields here so that DAY_OF_MONTH is attended // to. // If we are in the cutover month, manipulate ms directly. Don't do // this in general because it doesn't work across DST boundaries // (details, details). This takes care of the discontinuity. setTimeInMillis(cMonthStart + (newDom-1)*kOneDay, status); return; } default: Calendar::roll(field, amount, status); return; } } // ------------------------------------- /** * Return the minimum value that this field could have, given the current date. * For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum(). * @param field the time field. * @return the minimum value that this field could have, given the current date. * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field) instead. */ int32_t GregorianCalendar::getActualMinimum(EDateFields field) const { return getMinimum((UCalendarDateFields)field); } int32_t GregorianCalendar::getActualMinimum(EDateFields field, UErrorCode& /* status */) const { return getMinimum((UCalendarDateFields)field); } /** * Return the minimum value that this field could have, given the current date. * For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum(). * @param field the time field. * @return the minimum value that this field could have, given the current date. * @draft ICU 2.6. */ int32_t GregorianCalendar::getActualMinimum(UCalendarDateFields field, UErrorCode& /* status */) const { return getMinimum(field); } // ------------------------------------ /** * Old year limits were least max 292269054, max 292278994. */ /** * @stable ICU 2.0 */ int32_t GregorianCalendar::handleGetLimit(UCalendarDateFields field, ELimitType limitType) const { return kGregorianCalendarLimits[field][limitType]; } /** * Return the maximum value that this field could have, given the current date. * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar, * for some years the actual maximum for MONTH is 12, and for others 13. * @stable ICU 2.0 */ int32_t GregorianCalendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const { /* It is a known limitation that the code here (and in getActualMinimum) * won't behave properly at the extreme limits of GregorianCalendar's * representable range (except for the code that handles the YEAR * field). That's because the ends of the representable range are at * odd spots in the year. For calendars with the default Gregorian * cutover, these limits are Sun Dec 02 16:47:04 GMT 292269055 BC to Sun * Aug 17 07:12:55 GMT 292278994 AD, somewhat different for non-GMT * zones. As a result, if the calendar is set to Aug 1 292278994 AD, * the actual maximum of DAY_OF_MONTH is 17, not 30. If the date is Mar * 31 in that year, the actual maximum month might be Jul, whereas is * the date is Mar 15, the actual maximum might be Aug -- depending on * the precise semantics that are desired. Similar considerations * affect all fields. Nonetheless, this effect is sufficiently arcane * that we permit it, rather than complicating the code to handle such * intricacies. - liu 8/20/98 * UPDATE: No longer true, since we have pulled in the limit values on * the year. - Liu 11/6/00 */ switch (field) { case UCAL_YEAR: /* The year computation is no different, in principle, from the * others, however, the range of possible maxima is large. In * addition, the way we know we've exceeded the range is different. * For these reasons, we use the special case code below to handle * this field. * * The actual maxima for YEAR depend on the type of calendar: * * Gregorian = May 17, 292275056 BC - Aug 17, 292278994 AD * Julian = Dec 2, 292269055 BC - Jan 3, 292272993 AD * Hybrid = Dec 2, 292269055 BC - Aug 17, 292278994 AD * * We know we've exceeded the maximum when either the month, date, * time, or era changes in response to setting the year. We don't * check for month, date, and time here because the year and era are * sufficient to detect an invalid year setting. NOTE: If code is * added to check the month and date in the future for some reason, * Feb 29 must be allowed to shift to Mar 1 when setting the year. */ { if(U_FAILURE(status)) return 0; Calendar *cal = clone(); if(!cal) { status = U_MEMORY_ALLOCATION_ERROR; return 0; } cal->setLenient(TRUE); int32_t era = cal->get(UCAL_ERA, status); UDate d = cal->getTime(status); /* Perform a binary search, with the invariant that lowGood is a * valid year, and highBad is an out of range year. */ int32_t lowGood = kGregorianCalendarLimits[UCAL_YEAR][1]; int32_t highBad = kGregorianCalendarLimits[UCAL_YEAR][2]+1; while ((lowGood + 1) < highBad) { int32_t y = (lowGood + highBad) / 2; cal->set(UCAL_YEAR, y); if (cal->get(UCAL_YEAR, status) == y && cal->get(UCAL_ERA, status) == era) { lowGood = y; } else { highBad = y; cal->setTime(d, status); // Restore original fields } } delete cal; return lowGood; } default: return Calendar::getActualMaximum(field,status); } } int32_t GregorianCalendar::handleGetExtendedYear() { // the year to return int32_t year = kEpochYear; // year field to use int32_t yearField = UCAL_EXTENDED_YEAR; // There are three separate fields which could be used to // derive the proper year. Use the one most recently set. if (fStamp[yearField] < fStamp[UCAL_YEAR]) yearField = UCAL_YEAR; if (fStamp[yearField] < fStamp[UCAL_YEAR_WOY]) yearField = UCAL_YEAR_WOY; // based on the "best" year field, get the year switch(yearField) { case UCAL_EXTENDED_YEAR: year = internalGet(UCAL_EXTENDED_YEAR, kEpochYear); break; case UCAL_YEAR: { // The year defaults to the epoch start, the era to AD int32_t era = internalGet(UCAL_ERA, AD); if (era == BC) { year = 1 - internalGet(UCAL_YEAR, 1); // Convert to extended year } else { year = internalGet(UCAL_YEAR, kEpochYear); } } break; case UCAL_YEAR_WOY: year = handleGetExtendedYearFromWeekFields(internalGet(UCAL_YEAR_WOY), internalGet(UCAL_WEEK_OF_YEAR)); #if defined (U_DEBUG_CAL) // if(internalGet(UCAL_YEAR_WOY) != year) { fprintf(stderr, "%s:%d: hGEYFWF[%d,%d] -> %d\n", __FILE__, __LINE__,internalGet(UCAL_YEAR_WOY),internalGet(UCAL_WEEK_OF_YEAR),year); //} #endif break; default: year = kEpochYear; } return year; } int32_t GregorianCalendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy) { // convert year to extended form int32_t era = internalGet(UCAL_ERA, AD); if(era == BC) { yearWoy = 1 - yearWoy; } return Calendar::handleGetExtendedYearFromWeekFields(yearWoy, woy); } // ------------------------------------- UBool GregorianCalendar::inDaylightTime(UErrorCode& status) const { if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) return FALSE; // Force an update of the state of the Calendar. ((GregorianCalendar*)this)->complete(status); // cast away const return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE); } // ------------------------------------- /** * Return the ERA. We need a special method for this because the * default ERA is AD, but a zero (unset) ERA is BC. */ int32_t GregorianCalendar::internalGetEra() const { return isSet(UCAL_ERA) ? internalGet(UCAL_ERA) : (int32_t)AD; } const char * GregorianCalendar::getType() const { //static const char kGregorianType = "gregorian"; return "gregorian"; } /** * The system maintains a static default century start date and Year. They are * initialized the first time they are used. Once the system default century date * and year are set, they do not change. */ static UDate gSystemDefaultCenturyStart = DBL_MIN; static int32_t gSystemDefaultCenturyStartYear = -1; static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER; UBool GregorianCalendar::haveDefaultCentury() const { return TRUE; } static void U_CALLCONV initializeSystemDefaultCentury() { // initialize systemDefaultCentury and systemDefaultCenturyYear based // on the current time. They'll be set to 80 years before // the current time. UErrorCode status = U_ZERO_ERROR; GregorianCalendar calendar(status); if (U_SUCCESS(status)) { calendar.setTime(Calendar::getNow(), status); calendar.add(UCAL_YEAR, -80, status); gSystemDefaultCenturyStart = calendar.getTime(status); gSystemDefaultCenturyStartYear = calendar.get(UCAL_YEAR, status); } // We have no recourse upon failure unless we want to propagate the failure // out. } UDate GregorianCalendar::defaultCenturyStart() const { // lazy-evaluate systemDefaultCenturyStart umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); return gSystemDefaultCenturyStart; } int32_t GregorianCalendar::defaultCenturyStartYear() const { // lazy-evaluate systemDefaultCenturyStartYear umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); return gSystemDefaultCenturyStartYear; } U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ //eof ```
Tyne was launched in Newcastle upon Tyne in 1798. She sailed between Dublin and the United States and apparently was captured c. 1801. Tyne first appeared in Lloyd's Register (LR) in 1799. In 1801 LR carried the annotation "captured" by her name. It continued to carry the same entry for some years thereafter. In 1799 Lloyd's List reported that the privateer Hussar had captured Nine Sisters, Simpson, master, and carried her into Surinam on 12 June 1799. She had been on a voyage from Dublin to Jamaica. Nine Sisters, of 208 tons (bm), launched in 1785, too had belonged to Hawksley. Citations 1798 ships Ships built on the River Tyne Age of Sail merchant ships of England Captured ships
```java package com.github.piasy.biv.example.glide; import androidx.annotation.NonNull; import com.bumptech.glide.load.model.GlideUrl; import com.bumptech.glide.load.model.ModelCache; import com.bumptech.glide.load.model.ModelLoader; import com.bumptech.glide.load.model.ModelLoaderFactory; import com.bumptech.glide.load.model.MultiModelLoaderFactory; import java.io.InputStream; public class CustomImageSizeUrlLoaderFactory implements ModelLoaderFactory<CustomImageSizeModel, InputStream> { private ModelCache modelCache = new ModelCache<CustomImageSizeModel, GlideUrl>(500); @NonNull @Override public ModelLoader<CustomImageSizeModel, InputStream> build(@NonNull MultiModelLoaderFactory multiFactory) { ModelLoader<GlideUrl, InputStream> modelLoader = multiFactory.build(GlideUrl.class, InputStream.class); return new CustomImageSizeUrlLoader(modelLoader, modelCache); } @Override public void teardown() { } } ```
Xtal is an informal abbreviation for crystals (as a reference designator on printed circuit boards). Xtal may also refer to: X-tal, a San Francisco-based rock band Xtal DOS, the operating system for the Tatung Einstein personal computer "Xtal", a track by Aphex Twin from the 1992 album Selected Ambient Works 85–92 XTAL, a market identifier code for the European stock exchange in Tallinn, Estonia Xtal, a crystal oscillator (on a PCB design schematics) See also Crystal (disambiguation)
Jon Cornish (born November 5, 1984) is a former Canadian football running back who played nine seasons with the Calgary Stampeders of the Canadian Football League (CFL). He was drafted 13th overall in the 2006 CFL Draft after playing college football at the University of Kansas. Cornish was inducted as a member of the Canadian Football Hall of Fame in 2019 on his first ballot. While at Kansas, Cornish set the KU single-season rushing record with 1,457 yards and was selected First Team All-Big XII in his senior year. During his collegiate career, he was also selected Team Offensive MVP in both his junior year and senior year. Professionally, after taking over starting duties from Calgary's all-time leading rusher Joffrey Reynolds midway through 2011, Cornish rushed for 611 yards in the final seven games of the season, averaging 7.7 yards per carry. In the Stampeders only 2011 playoff game versus the Edmonton Eskimos, he ran for 128 yards and a touchdown while averaging 9.2 yards per carry. Those eight games were enough to garner him the 2011 Calgary Booster Club Male Athlete of the Year award and a CFL West All-star selection. In his first full year as a starter, Cornish led the CFL in rushing with 1,457 rushing yards on the ground. Cornish also broke Normie Kwong’s 56-year-old single-season rushing record for Canadians. This led to him being selected 2012 Most Outstanding Canadian as well as being the runner-up for the Most Outstanding Player award. Cornish was again selected for Calgary's Male Athlete of the Year award. He bettered this in 2013, rushing for 1813 yards and winning both the Most Outstanding Canadian and the Most Outstanding Player awards. Soon after, Cornish was awarded the Lou Marsh Trophy as Canada's top athlete for 2013. In 2014, Cornish led the CFL in rushing for the third time with 1,082 yards, an average of 7.8 yards per carry. This was despite only playing in 9 games, half of the regular season. He was a member of the 2014 Grey Cup Champion Calgary Stampeders. His career achievements were recognized in 2018 when the award for the top Canadian in NCAA Division One football was named the Jon Cornish Trophy honouring his career as a high school and professional player in Canada, and a college player in the NCAA. High school career Cornish attended high school at the highly sports-oriented St. Thomas More Collegiate (STMC) in Burnaby, where he participated actively in basketball, track & field and football. In football, he rushed for 3,200 career yards and 49 touchdowns as a three-year letter-winner for Saint Thomas More High School. Cornish averaged 14.9 yards per carry while rushing for 2,136 yards and 31 touchdowns as a senior. His single-game best was 336 yards and four touchdowns. Cornish is also credited with 152 career tackles, including 89 his senior season and holds his school career record with 37 quarterback sacks, 21 of which he had while a junior. At the end of his senior year, Cornish was selected the British Columbia Provincial Football Player of the Year in the year of its inception. While at STMC, Cornish was on two Varsity AAA Provincial High School Football Championship teams. Collegiate sport career Early collegiate years Following his medical redshirt, Cornish saw very limited playing time, rushing only 3 times for 8 yards in his first two years. Junior year Cornish played in all 12 games of his junior season and was awarded the John Hadl award for most valuable offensive player of the year on his college team despite not starting a single game. Cornish led his team in all rushing categories with 780 total yards, 9 rushing touchdowns and rushing yards per game and yards per carry with 65 and 5.8, respectively. His efforts in the classroom made him an Academic All-Big 12 second-team selection. Against Nebraska on his birthday, November 5, 2005, Cornish contributed a touchdown run of 72 yards to help seal Kansas' first victory over Nebraska in 38 years. In Kansas' second Bowl game appearance under Coach Mangino, playing against the Houston Cougars, Cornish helped his team to their first bowl victory with 101 yards rushing. He also had two touchdown receptions for 13 and 30 yards. Following his junior season, Cornish was drafted in the Canadian Football League draft by the Calgary Stampeders. Senior year In Cornish's senior year, he rushed for 1,457 yards, making him the all-time single-season rusher at the University of Kansas. Cornish averaged 5.8 yards per carry, scored 8 rushing touchdowns, 1 passing touchdown, and had 8 games of 100 yards of rushing or more. Cornish was the Big 12's leader in all-purpose yards with an average of 137.6 yards per contest. Cornish finished the season as the 9th leading rusher in NCAA Division I-A football and the 1st in rushing in the Big 12 Conference. Cornish's efforts were enough to earn him First Team Big XII honours and his second John Hadl team Offensive MVP award. In addition, Cornish's 5.8 yards per carry is the highest single-season mark in school history by a back with more than 200 carries, higher than that of former Kansas greats Gale Sayers and John Riggins. Cornish's career-high rushing in a single game came on November 18, 2006, when he rushed for 201 yards and two touchdowns against Kansas State helping Kansas gain bowl eligibility for the second year in a row. Ultimately, Kansas was not selected for a bowl game. Professional sports career 2007 After going undrafted by the NFL, Cornish chose to play in the CFL instead of testing NFL free agency. The Calgary Stampeders had previously drafted him in 2006 with their 13th overall selection in the 2006 CFL Draft. He signed with the Stampeders on April 30, 2007, spending most of his time with the special teams unit. He went on to lead the team in special teams tackles with 21 in his first year. 2008 Cornish would see increased repetitions with the offence in 2008 backing up Joffrey Reynolds. Despite only having 30 carries on the season, Cornish made the most of his opportunities and ended the season with 254 yards rushing averaging 8.5 yards per carry. His first long run in the CFL was against Hamilton for 48 yards. In 2008, he also scored his first professional touchdown against his hometown BC Lions in the last game of the regular season. He contributed to the Stampeders playoff efforts and was a part of the 2008 Grey Cup Championship Team. 2009 In 2009, a preseason injury caused Cornish to miss 3 games. After he returned, Jon contributed primarily on special teams placing second in special teams tackles for the Stampeders at the end of the year. 2010 In his fourth season in Calgary, Cornish established a number of career highs and earned the Stampeders’ nomination for the Canadian Football League's Most Outstanding Canadian award. His 7.3-yard average per rush was tops in the CFL among running backs, with at least 50 carries and he ran for a career-high 618 yards. He had three carries of at least 50 yards — a 52-yarder against Edmonton on Aug. 15, a 50-yard dash against Saskatchewan on July 24 and another 50-yarder against The Lions on Aug. 28. He also contributed as a receiver, making 14 catches for 226 yards and one touchdown for an average of 16.5 yards per catch, highest of all CFL running backs that year. On special teams, he made 12 tackles and also returned 12 kickoffs for 224 yards. Cornish twice earned top Canadian honours in the CFL player of the week awards during the 2010 season as he was recognized for his efforts in Week 4 and Week 9. During the playoffs Cornish was selected by CFL fans as the winner of the 2010 Reebok Rediscover campaign. In the final round of voting, Jon Cornish's description of what had motivated him as a player prevailed over Roughrider Darian Durant’s narration of his defining moment as an athlete. 2011 Despite not making his first start of the season until Week 13, Cornish led the Stampeders in rushing, was first among all CFL running backs in rushing touchdowns, tied for the league lead in total touchdowns and earned West Division all-star recognition. After being installed as the starter, he ran for 611 yards and seven touchdowns in seven contests. The seven touchdowns were the most of any CFL player during that period and the 611 yards were second only to Toronto’s Cory Boyd. For the season, he posted career highs in carries (119), rushing yards (863), rushing touchdowns (nine), catches (26), receiving yards (385) and receiving touchdowns (two). His 7.3-yard-per-carry average led all CFL players with at least 60 rushing attempts. His 11 total touchdowns tied him for the league lead and were the most by a Canadian Stampeders player since 1995. In addition to his excellent work on offence, Cornish was tied for second on the club with 13 special-teams tackles and returned eight kickoffs for 167 yards. Cornish recorded a pair of 100-yard rushing games during the regular season including a career-high 149-yard performance on Oct. 1 against Saskatchewan that resulted in him being named both the top offensive player and top Canadian in the CFL’s player-of-the-week awards. He also ran for 128 yards on Oct. 14 against Toronto — including a career-best 57-yard dash — and again picked up the CFL’s Canadian player of the week honour. He was also named the CFL’s Canadian of the month for September after posting 336 rushing yards, two touchdowns, a 9.9-yard-per-carry average and eight receptions for 166 yards. He picked up more league recognition in the playoffs as he was named the Canadian player of the week after rushing for 127 yards and one touchdown in the West semifinal against Edmonton. For the second year in a row, Cornish was the Stamps’ nominee for the CFL's Most Outstanding Canadian award. 2012 In his first full season as a starter, Cornish ran for 1,457 yards as he won the CFL rushing title and broke Normie Kwong's 56-year-old single-season rushing record for Canadians. He turned in four games with at least 150 yards over the course of the season, accumulating 170 yards on Aug. 9 in Hamilton, 159 yards at Saskatchewan on Aug. 25, a career-best 185 yards on Sept. 7 in Edmonton and 180 yards in a Sept. 28 home game against the Eskimos. He shared the league lead with 11 rushing touchdowns and was also a threat in the passing game as he had 38 catches for 338 yards and two scores. Cornish was named the CFL's Canadian player of the month in August, September and October/November. He was also voted Canadian player of the week seven times and offensive player of the week once during the regular season and Canadian player of the week twice more in the playoffs. Cornish's rushing total was the best in the CFL since 2009, the second-best since 2006 and the seventh-best single-season total in Stampeders’ franchise history. In the post-season, he racked up a combined total of 51 carries for 278 yards — including 100-yard games in both the West semifinal and West final — and three receptions for 58 yards. Cornish was named the CFL's Most Outstanding Canadian and was the West Division finalist for the Most Outstanding Player. He was also selected to the West Division, CFL and CFLPA all-star teams. 2013 Jon Cornish had an outstanding 2013 season. Cornish played in all but one game of the 18 game regular season. His 258 rushing attempts was identical to his rushing attempts in 2012, but in 2013 he ran for 356 more yards, totalling 1,813. He won Outstanding Canadian of the Week 7 times (4 of them consecutively), Offensive Player of the Week once, Offensive Player of the Month for the month of October, and was the most Outstanding Canadian for the months of July, September and October (3 of the 4 months). His 12 rushing touchdowns and 42 pass receptions were also personal bests. He was nominated by the Stampeders as their Most Outstanding Player and Most Outstanding Canadian. On November 21, 2013, Cornish became the third Canadian to win the CFL MOP award, followed by winning the Lou Marsh Trophy as Canada's top athlete for 2013. 2014 Jon Cornish's 2014 CFL season was limited by various injuries. Nonetheless, Cornish wound up leading the league in rushing yards with 1,082, despite only playing in nine of 18 regular season games. This was his third straight rushing title and third straight 1000-yard season. He ran for more than 100 yards six times, with four of those games being over 150 rushing yards. Cornish won Offensive Player of the Week three times, Outstanding Canadian of the Week six times and he won Offensive Player of the Month and Outstanding Canadian of the Month for the month of September. To cap off his season, he was named a West-division All-Star for the 4th consecutive season. He won the CFL's Most Outstanding Canadian Award for the third consecutive season in 2014. 2015 Similar to his 2014 season Cornish missed 9 games during the 2015 season due to nagging injuries. He suffered a broken thumb in late July before complaining of neck stiffness after a 15–11 loss at home to the Edmonton Eskimos on Oct. 10. He would finish the season with 115 carries for 622 yards (5.4 average) with 4 rushing touchdowns. He also contributed 138 yards on 19 pass receptions. Following the completion of his ninth CFL season Cornish decided to announce his retirement. His decision was based primarily on preserving his health. Sports career statistics via CFL Stats Page Post-sports career Calgary Black Chambers In 2020 Cornish founded Calgary Black Chambers, an organization of professional people who support post-college youth. University of Calgary In April 2022 Cornish was named as the next chancellor of the University of Calgary, breaking another record, as one of the youngest chancellors in North America. References External links Calgary Stampeders profile 1984 births Living people American football running backs Black Canadian players of Canadian football Calgary Stampeders players Canadian Football League Most Outstanding Canadian Award winners Canadian Football League Most Outstanding Player Award winners Canadian football running backs Black Canadian players of American football Kansas Jayhawks football players Northern Star Award winners Players of Canadian football from British Columbia Sportspeople from New Westminster
Darryll James "D. J." Foster (born November 22, 1993) is a former gridiron football running back who is currently the manager of player development at Arizona State University, where he played college football. He signed with the New England Patriots as an undrafted free agent in 2016. He was a member of the Super Bowl LI winning Patriots, though was inactive for the game itself. High school career Foster attended Saguaro High School in Scottsdale, Arizona, where he rushed for more than 5,000 yards in his career. As a senior, he set an Arizona state single-season record with 60 total touchdowns, and also set state marks for rushing yards in a game (508), touchdowns in a game (10), touchdowns in a career, points in a career and points in a season. He helped lead his team to the Arizona Division III State Championship to cap off his high school career. He was chosen by the Arizona Republic as the Big Schools Player of the Year in 2011, and also was named the 2011 Tribune Football Player of the Year by the East Valley Tribune. Considered a four-star recruit by Rivals.com, he was rated as the 5th best athlete prospect of his class, and drew comparisons to Greg Jennings. On January 27, 2012, he announced his commitment to Arizona State over numerous Power 5 offers. College career 2012 season He played in all 13 games, making one start. He scored his first career touchdown against Missouri. He finished second on the team in all-purpose yardage with 1,026 yards (493 rushing and 533 receiving), and recorded six total touchdowns (two rushing, four receiving). 2013 season He entered the season ready for an increased role with the team. He led the nation in receiving yards by a running back and was second overall on the team (653). He finished second on the team in all-purpose yardage (1,170 yards) and ranked second on the team in receptions (63). He totaled 10 total touchdowns for the season (six rushing, four receiving). He had ASU’s only touchdowns (one rush, one receiving) against Stanford in the Pac-12 Championship. 2014 season Following the departure of Marion Grice, Foster took over as the main back and offensive weapon for the Sun Devils. On the season, he had 194 carries for 1,081 rushing yards and nine rushing touchdowns to go along with 62 receptions for 688 receiving yards and six receiving touchdowns. 2015 season On December 30, 2014, Foster announced he would return to Arizona State for his senior season as a wide receiver. Overall, on the 2015 season, he had 59 receptions for 584 receiving yards and three receiving touchdowns to go along with 55 carries for 280 rushing yards and a rushing touchdown. Statistics Professional career Coming out of Arizona State, Foster was projected by many analysts to be either a fifth round selection or priority free-agent. He was ranked the 23rd best running back out of the 204 available by NFLDraftScout.com. Foster went undrafted in the 2016 NFL Draft, and was signed by the Patriots as a rookie free agent. New England Patriots On September 3, 2016, Foster was announced to have made the Patriots final 53-man roster and he made his professional debut on September 18, 2016, in the Patriots 31–24 win over the Miami Dolphins in Week 2. He was released by the Patriots on November 28, 2016, and was re-signed to the practice squad. He was promoted back to the active roster on December 3, 2016. On February 5, 2017, Foster's Patriots appeared in Super Bowl LI. He was inactive for the game. In the game, the Patriots trailed 28–3 in the third quarter, but rallied all the way back to win the game by a score of 34–28 against the Atlanta Falcons, in a game that featured the first overtime Super Bowl and largest comeback in Super Bowl history. Foster was released by the Patriots on September 2, 2017, and signed to the practice squad the next day. Arizona Cardinals On September 12, 2017, Foster was signed by the Arizona Cardinals off the Patriots' practice squad. In the 2017 season, he appeared in seven games and had 17 receptions for 133 receiving yards. On August 27, 2018, Foster suffered a torn MCL and ACL in the Cardinals' third preseason game and was ruled out for the season. On October 28, 2019, Foster was placed on injured reserve with a hamstring injury. On March 27, 2020, Foster re-signed with the Cardinals. Foster was released during final roster cuts on September 5, 2020, and re-signed to the practice squad a day later. He was elevated to the active roster on September 12 and 19 for the team's weeks 1 and 2 games against the San Francisco 49ers and Washington Football Team, and reverted to the practice squad after each game. Foster suffered a quadriceps injury in the Washington game, and he was placed on the practice squad/injured list on September 21. He was activated back to the practice squad on October 20. He was elevated to the active roster again on November 7, November 14, November 19, November 28, and December 5 for the team's weeks 9, 10, 11, 12, and 13 games against the Miami Dolphins, Buffalo Bills, Seattle Seahawks, New England Patriots, and Los Angeles Rams, and reverted to the practice squad after each game. Foster was promoted to the active roster on December 19. Toronto Argonauts On July 19, 2021, Foster signed with the Toronto Argonauts of the Canadian Football League. He played in 10 regular season games where he had 82 carries for 332 yards and two rushing touchdowns and also had 33 receptions for 316 yards and two receiving touchdowns. He also played in the East Final where he had 11 carries for 38 yards and three catches for 57 yards in the loss to the Hamilton Tiger-Cats. He was released by the Argonauts on May 6, 2022, after the signing of Andrew Harris. References External links Arizona State Sun Devils football bio 1993 births Living people African-American players of American football Players of American football from Scottsdale, Arizona American football running backs Arizona State Sun Devils football players New England Patriots players Arizona Cardinals players Toronto Argonauts players 21st-century African-American sportspeople
Jon Loomis (born 1959) is an American poet and writer. He is a professor of English at the University of Wisconsin-Eau Claire. Vanitas Motel (1998), his first book of poetry, won the 1997 annual FIELD prize in poetry. He is also the author of the Frank Coffin mysteries set in Provincetown, Massachusetts, High Season (2007) and Mating Season (2009), both published by St. Martin's Minotaur. The third book in the series, Fire Season, was released on July 17, 2012. Life Loomis was born in 1959 in Athens, Ohio. He holds a BA in creative writing from Ohio University (1981), and a Master of Fine Arts in poetry from the University of Virginia where he studied under the poet Charles Wright. He has been the recipient of grants, fellowships and residencies from the Ohio Arts Council, the Virginia Commission for the Arts, the Fine Arts Work Center in Provincetown, the University of Wisconsin-Madison's Creative Writing Institute, and Yaddo, among others. He lives with his wife and two children in west-central Wisconsin. Bibliography Poetry Vanitas Motel (Oberlin College Press, 1998) The Pleasure Principle (Oberlin College Press, 2001) The Mansion of Happiness (Oberlin College Press, 2016) Novels High Season (2007) Mating Season (2009) Fire Season (2012) References External links The Coffin Diaries “Deer Hit” “Dog Nights” “The Pleasure Principle” “Conspiracy Theory” Living people 21st-century American novelists American male novelists 1959 births American mystery writers University of Wisconsin–Eau Claire faculty People from Athens, Ohio Novelists from Ohio 21st-century American poets American male poets 21st-century American male writers Novelists from Wisconsin
The 2017 New York City Marathon was the 47th running of the annual marathon race in New York City, United States, which took place on November 5, 2017. The women's race was won by Shalane Flanagan, the first American woman to do so since Miki Gorman in 1977. The men's race was won by Kenyan Geoffrey Kamworor. In the wheelchair races, Switzerland's Marcel Hug (1:37:21) and Manuela Schär (1:48:09) won the men's and women's races, respectively. The handcycle races were won by France's Ludovic Narce (1:28:48) and New Zealand's Tiffiney Perry (1:54:09). A total of 50,643 runners finished the race, comprising 29,583 men and 21,060 women. Results Men's race Women's race † Ran in mass race Wheelchair men Wheelchair women Handcycle men Handcycle women References Results TCS New York City Marathon 2017. New York Road Runners. Retrieved 2020-05-06. Men's results. Association of Road Racing Statisticians. Retrieved 2020-05-06. Women's results. Association of Road Racing Statisticians. Retrieved 2020-05-06. External links New York Road Runners website 2017 New York City Marathon Marathon New York City Marathon
The 2021–22 North Dakota Fighting Hawks men's ice hockey season was the 81st season of play for the program. They represented the University of North Dakota in the 2021–22 NCAA Division I men's ice hockey season and for the 9th season in the National Collegiate Hockey Conference (NCHC). The Fighting Hawks were coached by Brad Berry, in his seventh season, and played their home games at Ralph Engelstad Arena. Season North Dakota's lineup saw a great deal of change with 14 of the team's 26 players in their first year with the program. While several were transfers from other schools, head coach Brad Berry had his work cut out for him in getting the team to work together. Despite the turnover, UND was still seen as having a good chance at the title and was ranked in the top-10 in the preseason polls. However, the Hawks struggled with consistency early in the season and only possessed a middling record after the first month of the campaign. Once the team got into its conference schedule, they began playing much better and rose to the top of the NCHC. When they returned after the winter break, North Dakota was in the top-5 in both polls but the offense sputtered. UND lost four games in a row, all to ranked teams, and began sinking in both the rankings and the standings. They recovered at the end of January and then had a tremendous month by winning seven out of eight games in February. The extended winning streak put them back atop the conference standings and had the Hawks set up for a 1st-place finish. Unfortunately, losing to Omaha in the final game of the regular season put UND into a tie with Denver and, because the Pioneers possessed the tie-breaker, meant that North Dakota received the #2 seed for the NCHC tournament. The entire second half of the Hawks season was dominated by the status of Jake Sanderson, the team's top prospect. He wasn't able to play a single game after January 29 due to joining Team USA at the 2022 Winter Olympics. During the competition, He came down with COVID-19, forcing him to miss the first game, and was then injured during the preliminary round. He remained out of the Fighting Hawks lineup for the rest of the regular season before returning for the team's quarterfinal match against Colorado College. Sanderson opened the scoring on his return, however, in spite of the boost his reappearance provided, the Hawks did not play well against the Tigers. North Dakota had almost three times as many wins as CC during the season but they got a huge fight from their opponents. UND only managed to score twice in each of the two games and it was only through the heroics of Zach Driscoll in goal that they managed to squeeze through into the semifinals. To make matters worse, Sanderson was injured while blocking a shot in the second match and ended up needing wrist surgery to repair the damage. While the team had demonstrated an ability to win without the big defenseman, they weren't able to replicate that effort in the semifinal and fell to Western Michigan. NCAA tournament Though the loss was disappointing, North Dakota was already guaranteed a bid for the NCAA tournament and received a #2 seed, one of five NCHC teams in the field. They opened against Notre Dame, a team that played an almost identical style of defensive hockey. The match lived up to predictions as a slow, methodical game with few scoring attempts and solid goaltending. Brent Johnson scored near the end of the first period to give UND the lead but their advantage lasted less than 3 minutes before ND evened the match. Near the end of regulation, when it appeared that the game was heading into overtime, Notre Dame got the puck deep into the Hawks' end before passing it out to an open man in the slot and scored with less than a second to play. While the Irish celebrated, however, the referees reviewed the play and found a discrepancy in the time. The broadcast clock and the official game clock were not in synch and the file was reviewed to determine which was correct. After a long process, it was determined that the game had ended moments before the puck entered the goal and the Hawks were saved from defeat. UND began the extra session on the power play, however, a gaff at the blueline forced Chris Jandric to take a penalty to stop a Notre Dame breakaway. After the ensuing 4-on-4 finished, The Irish got an abbreviated man-advantage and made no mistake, potting the winner and ending North Dakota's season. Departures Recruiting Roster As of September 6, 2021. Standings Schedule and results |- !colspan=12 style=";" | Exhibition |- !colspan=12 style=";" | Regular season |- !colspan=12 style=";" | |- align="center" bgcolor="#e0e0e0" |colspan=12|North Dakota Won Series 2–0 |- !colspan=12 style=";" | Scoring statistics Goaltending statistics Rankings Note: USCHO did not release a poll in week 24. Awards and honors Players drafted into the NHL 2022 NHL Entry Draft † incoming freshman References 2021-22 2021–22 NCHC men's ice hockey season 2021–22 NCAA Division I men's ice hockey by team 2022 in sports in North Dakota 2021 in sports in North Dakota
```xml // // // Microsoft Bot Framework: path_to_url // // Bot Framework Emulator Github: // path_to_url // // All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // export * from './layout'; export * from './splitter'; export * from './utils'; export * from './widget'; ```
```xml import { Localized } from "@fluent/react/compat"; import React, { FunctionComponent, useCallback, useEffect } from "react"; import { graphql, GraphQLTaggedNode, RelayPaginationProp } from "react-relay"; import { SectionFilter } from "coral-common/common/lib/section"; import parseModerationOptions from "coral-framework/helpers/parseModerationOptions"; import { IntersectionProvider } from "coral-framework/lib/intersection"; import { LOCAL_ID, lookup, useLoadMore, useLocal, useMutation, useRefetch, useSubscription, withPaginationContainer, } from "coral-framework/lib/relay"; import { withRouteConfig } from "coral-framework/lib/router"; import { GQLCOMMENT_SORT, GQLMODERATION_QUEUE } from "coral-framework/schema"; import { Spinner } from "coral-ui/components/v2"; import { QueueRoute_queue } from "coral-admin/__generated__/QueueRoute_queue.graphql"; import { QueueRoute_settings } from "coral-admin/__generated__/QueueRoute_settings.graphql"; import { QueueRoute_viewer } from "coral-admin/__generated__/QueueRoute_viewer.graphql"; import { QueueRouteLocal } from "coral-admin/__generated__/QueueRouteLocal.graphql"; import { QueueRoutePaginationPendingQueryVariables } from "coral-admin/__generated__/QueueRoutePaginationPendingQuery.graphql"; import { QueueRoutePaginationReportedQueryVariables } from "coral-admin/__generated__/QueueRoutePaginationReportedQuery.graphql"; import { QueueRoutePaginationUnmoderatedQueryVariables } from "coral-admin/__generated__/QueueRoutePaginationUnmoderatedQuery.graphql"; import EmptyMessage from "./EmptyMessage"; import LoadingQueue from "./LoadingQueue"; import Queue from "./Queue"; import QueueCommentEnteredSubscription from "./QueueCommentEnteredSubscription"; import QueueCommentLeftSubscription from "./QueueCommentLeftSubscription"; import QueueViewNewMutation from "./QueueViewNewMutation"; interface Props { isLoading: boolean; queueName: GQLMODERATION_QUEUE; queue: QueueRoute_queue | null; settings: QueueRoute_settings | null; viewer: QueueRoute_viewer | null; relay: RelayPaginationProp; emptyElement: React.ReactElement; storyID?: string | null; siteID?: string | null; section?: SectionFilter | null; orderBy?: GQLCOMMENT_SORT; } // TODO: use generated types const danglingLogic = (status: string) => ["APPROVED", "REJECTED"].includes(status); export const QueueRoute: FunctionComponent<Props> = ({ isLoading, queueName, queue, settings, viewer, relay, emptyElement, storyID = null, siteID = null, section, }) => { const [{ moderationQueueSort }] = useLocal<QueueRouteLocal>(graphql` fragment QueueRouteLocal on Local { moderationQueueSort } `); const [, isRefetching] = useRefetch< | QueueRoutePaginationPendingQueryVariables | QueueRoutePaginationReportedQueryVariables | QueueRoutePaginationUnmoderatedQueryVariables >(relay, 5, { orderBy: moderationQueueSort, }); const orderBy = moderationQueueSort as GQLCOMMENT_SORT; const [loadMore, isLoadingMore] = useLoadMore(relay, 10); const viewNew = useMutation(QueueViewNewMutation); const onViewNew = useCallback(() => { void viewNew({ queue: queueName, storyID, siteID, section, orderBy, }); }, [viewNew, queueName, storyID, siteID, section, orderBy]); const subscribeToQueueCommentEntered = useSubscription( QueueCommentEnteredSubscription ); const subscribeToQueueCommentLeft = useSubscription( QueueCommentLeftSubscription ); const hasMore = relay.hasMore(); // Handle subscribing/unsubscribe comment left useEffect(() => { const commentLeftSub = subscribeToQueueCommentLeft({ queue: queueName, storyID, siteID, orderBy, section, }); return () => { commentLeftSub.dispose(); }; }, [ orderBy, queueName, section, siteID, storyID, subscribeToQueueCommentLeft, ]); // Handle subscribing/unsubscribe comment entered useEffect(() => { switch (orderBy) { case GQLCOMMENT_SORT.CREATED_AT_ASC: // Oldest first when there is more than one page of content can't // possibly have new comments to show in view! if (hasMore) { return; } // We have all the comments for this story in view! Comments could load! break; case GQLCOMMENT_SORT.CREATED_AT_DESC: // Newest first can always get more comments in view. break; default: // Only chronological sort supports top level live updates of incoming // comments. return; } const commentEnteredSub = subscribeToQueueCommentEntered({ queue: queueName, storyID, siteID, orderBy, section, }); return () => { commentEnteredSub.dispose(); }; }, [ subscribeToQueueCommentEntered, hasMore, orderBy, queueName, storyID, siteID, section, ]); // It's never the case really that the query has loaded but queue or settings // is null, but this was to appease the type system. if (isLoading || !queue || !settings || !viewer) { return <LoadingQueue />; } const comments = queue.comments.edges.map((edge) => edge.node); const viewNewCount = (queue.comments.viewNewEdges && queue.comments.viewNewEdges.length) || 0; if (isRefetching) { // TODO (Nick): make sure this doesn't clash with styles return <Spinner />; } return ( <IntersectionProvider> <Queue comments={comments} settings={settings} viewer={viewer} onLoadMore={loadMore} hasLoadMore={relay.hasMore()} disableLoadMore={isLoadingMore} danglingLogic={danglingLogic} emptyElement={emptyElement} showStoryInfo={!storyID} viewNewCount={viewNewCount} onViewNew={onViewNew} /> </IntersectionProvider> ); }; // TODO: (cvle) If this could be autogenerated.. type FragmentVariables = QueueRoutePaginationPendingQueryVariables; const createQueueRoute = ( queueName: GQLMODERATION_QUEUE, queueQuery: GraphQLTaggedNode, paginationQuery: GraphQLTaggedNode, emptyElement: React.ReactElement ) => { const enhanced = withRouteConfig<Props, any>({ prepareVariables: (params, match) => { const initialOrderBy = lookup( match.context.relayEnvironment, LOCAL_ID )!.moderationQueueSort; return { ...params, initialOrderBy, }; }, query: queueQuery, cacheConfig: { force: true }, render: function QueueRouteRender({ Component, data, match }) { if (!Component) { throw new Error("Missing component"); } const { storyID, siteID, section } = parseModerationOptions(match); if (!data) { return ( <Component isLoading queueName={queueName} queue={null} settings={null} viewer={null} emptyElement={emptyElement} storyID={storyID} siteID={siteID} section={section} /> ); } const queue = // eslint-disable-next-line @typescript-eslint/no-unsafe-argument data.moderationQueues[Object.keys(data.moderationQueues)[0]]; return ( <Component isLoading={false} queueName={queueName} queue={queue} settings={data.settings} viewer={data.viewer} emptyElement={emptyElement} storyID={storyID} siteID={siteID} section={section} /> ); }, })( withPaginationContainer< Props, QueueRoutePaginationPendingQueryVariables, FragmentVariables >( { queue: graphql` fragment QueueRoute_queue on ModerationQueue @argumentDefinitions( count: { type: "Int", defaultValue: 5 } cursor: { type: "Cursor" } orderBy: { type: "COMMENT_SORT", defaultValue: CREATED_AT_DESC } ) { count comments(first: $count, after: $cursor, orderBy: $orderBy) @connection(key: "Queue_comments") { viewNewEdges { cursor node { id site { id } author { commentsRejectedOnSites allCommentsRejected } ...ModerateCardContainer_comment } } edges { node { id site { id } author { commentsRejectedOnSites allCommentsRejected } ...ModerateCardContainer_comment } } } } `, settings: graphql` fragment QueueRoute_settings on Settings { ...ModerateCardContainer_settings } `, viewer: graphql` fragment QueueRoute_viewer on User { ...ModerateCardContainer_viewer } `, }, { getConnectionFromProps(props) { return props.queue && props.queue.comments; }, getVariables(props, { count, cursor }, fragmentVariables) { return { ...fragmentVariables, count, cursor, }; }, query: paginationQuery, } )(QueueRoute) ); return enhanced; }; export const PendingQueueRoute = createQueueRoute( GQLMODERATION_QUEUE.PENDING, graphql` query QueueRoutePendingQuery( $storyID: ID $siteID: ID $section: SectionFilter $initialOrderBy: COMMENT_SORT ) { moderationQueues(storyID: $storyID, siteID: $siteID, section: $section) { pending { ...QueueRoute_queue @arguments(orderBy: $initialOrderBy) } } settings { ...QueueRoute_settings } viewer { ...QueueRoute_viewer } } `, graphql` # Pagination query to be fetched upon calling 'loadMore'. # Notice that we re-use our fragment, and the shape of this query matches our fragment spec. query QueueRoutePaginationPendingQuery( $storyID: ID $siteID: ID $section: SectionFilter $count: Int! $cursor: Cursor $orderBy: COMMENT_SORT ) { moderationQueues(storyID: $storyID, siteID: $siteID, section: $section) { pending { ...QueueRoute_queue @arguments(count: $count, cursor: $cursor, orderBy: $orderBy) } } } `, // eslint-disable-next-line:jsx-wrap-multiline <Localized id="moderate-emptyQueue-pending"> <EmptyMessage> Nicely done! There are no more pending comments to moderate. </EmptyMessage> </Localized> ); export const ReportedQueueRoute = createQueueRoute( GQLMODERATION_QUEUE.REPORTED, graphql` query QueueRouteReportedQuery( $storyID: ID $siteID: ID $section: SectionFilter $initialOrderBy: COMMENT_SORT ) { moderationQueues(storyID: $storyID, siteID: $siteID, section: $section) { reported { ...QueueRoute_queue @arguments(orderBy: $initialOrderBy) } } settings { ...QueueRoute_settings } viewer { ...QueueRoute_viewer } } `, graphql` # Pagination query to be fetched upon calling 'loadMore'. # Notice that we re-use our fragment, and the shape of this query matches our fragment spec. query QueueRoutePaginationReportedQuery( $storyID: ID $siteID: ID $section: SectionFilter $count: Int! $cursor: Cursor $orderBy: COMMENT_SORT ) { moderationQueues(storyID: $storyID, siteID: $siteID, section: $section) { reported { ...QueueRoute_queue @arguments(count: $count, cursor: $cursor, orderBy: $orderBy) } } } `, // eslint-disable-next-line:jsx-wrap-multiline <Localized id="moderate-emptyQueue-reported"> <EmptyMessage> Nicely done! There are no more reported comments to moderate. </EmptyMessage> </Localized> ); export const UnmoderatedQueueRoute = createQueueRoute( GQLMODERATION_QUEUE.UNMODERATED, graphql` query QueueRouteUnmoderatedQuery( $storyID: ID $siteID: ID $section: SectionFilter $initialOrderBy: COMMENT_SORT ) { moderationQueues(storyID: $storyID, siteID: $siteID, section: $section) { unmoderated { ...QueueRoute_queue @arguments(orderBy: $initialOrderBy) } } settings { ...QueueRoute_settings } viewer { ...QueueRoute_viewer } } `, graphql` # Pagination query to be fetched upon calling 'loadMore'. # Notice that we re-use our fragment, and the shape of this query matches our fragment spec. query QueueRoutePaginationUnmoderatedQuery( $storyID: ID $siteID: ID $section: SectionFilter $count: Int! $cursor: Cursor $orderBy: COMMENT_SORT ) { moderationQueues(storyID: $storyID, siteID: $siteID, section: $section) { unmoderated { ...QueueRoute_queue @arguments(count: $count, cursor: $cursor, orderBy: $orderBy) } } } `, // eslint-disable-next-line:jsx-wrap-multiline <Localized id="moderate-emptyQueue-unmoderated"> <EmptyMessage>Nicely done! All comments have been moderated.</EmptyMessage> </Localized> ); ```
```smalltalk namespace Asp.Versioning.OData; public class ApiVersionAnnotationTest { [Fact] public void new_api_version_annotation_should_set_expected_version() { // arrange var annotatedApiVersion = new ApiVersion( 1, 1 ); var annotation = new ApiVersionAnnotation( annotatedApiVersion ); // act var apiVersion = annotation.ApiVersion; // assert apiVersion.Should().Be( annotatedApiVersion ); } } ```
```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 pow = require( '@stdlib/math/base/special/pow' ); var isndarrayLike = require( '@stdlib/assert/is-ndarray-like' ); var zeros = require( '@stdlib/ndarray/base/zeros' ); var pkg = require( './../package.json' ).name; var emptyLike = require( './../lib' ); // FUNCTIONS // /** * Creates a benchmark function. * * @private * @param {PositiveInteger} len - array length * @returns {Function} benchmark function */ function createBenchmark( len ) { var x = zeros( 'complex64', [ len ], 'row-major' ); return benchmark; /** * Benchmark function. * * @private * @param {Benchmark} b - benchmark instance */ function benchmark( b ) { var arr; var i; b.tic(); for ( i = 0; i < b.iterations; i++ ) { arr = emptyLike( x ); if ( arr.length !== len ) { b.fail( 'unexpected length' ); } } b.toc(); if ( !isndarrayLike( arr ) ) { b.fail( 'should return an ndarray' ); } b.pass( 'benchmark finished' ); b.end(); } } // MAIN // /** * Main execution sequence. * * @private */ function main() { var len; var min; var max; var f; var i; min = 1; // 10^min max = 6; // 10^max for ( i = min; i <= max; i++ ) { len = pow( 10, i ); f = createBenchmark( len ); bench( pkg+'::base:dtype=complex64,size='+len, f ); } } main(); ```
Cayo or cayó may refer to: Cayo (film), a 2005 Puerto Rican film starring Roselyn Sánchez Cayo District, a district in the west of the nation of Belize San Ignacio, Belize, a town in the Cayo District (originally named "El Cayo") Caio, Carmarthenshire, a village in Wales sometimes spelt with a 'y' Cayo Hundred, a geographic division named after the village "Cayó", a 2022 song by Arca Elsa Cayo (born 1951), Peruvian filmmaker See also Caio (disambiguation) Cay (sand island)
```javascript import { xor } from 'lodash'; xor([1, 2], [2, 3]); ```
```c++ #include <iostream> using namespace std; int N, pre[30], in[30], t[30]; void deal(int ins, int ine, int prerootindex, int level) { if (ins > ine) return; if (t[level] == 0) { t[level] = pre[prerootindex]; } int pos = ins; while(in[pos] != pre[prerootindex]) ++pos; deal(ins, pos - 1, prerootindex + 1, level + 1); deal(pos + 1, ine, prerootindex + 1 + pos - ins, level + 1); } int main(){ cin >> N; for (int i = 1; i <= N; i++) cin >> in[i]; for (int i = 1; i <= N; i++) cin >> pre[i]; deal(1, N, 1, 1); for (int i = 1; t[i]; i++) { if (i != 1) cout << ' '; cout << t[i]; } return 0; } ```
Lamb of God is the tenth studio album by American heavy metal band Lamb of God. The album was initially set for release on May 8, 2020, through Epic and Nuclear Blast, but was later pushed back to June 19 due to the COVID-19 pandemic. Lamb of God marks the first studio album of all-new material by the band since 2015's VII: Sturm und Drang, making it the longest gap between their albums, and the first to feature Art Cruz as the replacement for original drummer Chris Adler, who left the band in July 2019. Lamb of God was once again produced by longtime collaborator Josh Wilbur, who has worked with the band since 2006's Sacrament. A three-disc deluxe edition with two bonus tracks, along with an additional CD and DVD featuring the band's live stream event from September 18, 2020, in which the band performed Lamb of God in its entirety plus four encore tracks, was released on March 26, 2021, through Nuclear Blast. Critical reception Lamb of God received critical acclaim from music critics upon its release. At review aggregate Metacritic, the album has an average score of 81 out of 100 based on eight reviews, indicating "universal acclaim reviews". At AnyDecentMusic?, the album has an average score of 7.5 out of 10 based on six reviews. James Christopher Monger from AllMusic awarded the album four out of five stars, describing the album "a tense, yet confident album for taut and uncomfortable times." Manus Hopkins from Exclaim! scored the album 7 out of 10, and said that while nothing in Lamb of God feels "groundbreaking" or "cutting-edge" like the band's previous albums, the album is still "essentially what fans should expect from the band at this point." James McMahon from NME also gave the album four out of five stars, calling the album "a record that's the most authentic version of the band Lamb of God want to be." He particularly singled out the song "Memento Mori", which "driven by Mark Morton's unforgiving guitar, flirts with the ethereal goth of the Sisters of Mercy." Kory Grow from Rolling Stone gave the album three out of five stars, stating that the album contains "the sort of piledriving guitar riffs and Olympic-medal-worthy drumming the band has perfected over the last 20 years" which making it easy for the band's "less political fans" to "get in on the fun." He also praised Blythe's "open-minded" and "inclusive" lyrics that make listeners to "strain your ears to make sense of his screeds." Accolades Commercial performance Lamb of God debuted at No. 15 on the Billboard 200, selling 30,000 album-equivalent units in its first week of release, of which 27,000 were pure album sales. The album also debuted at No. 2 on both the Current Album Sales and Top Rock Albums charts, and No. 1 on the Hard Rock Albums charts. Track listing Personnel Credits are adapted from the album's liner notes. Lamb of God Randy Blythe – vocals Mark Morton – lead guitar Willie Adler – rhythm guitar John Campbell – bass Art Cruz – drums Additional musicians Jamey Jasta – guest vocals Chuck Billy – guest vocals Samantha Wilbur – children voice Maxwell Wilbur – children voice Production and design Josh Wilbur – production, engineering, mixing Kevin Billingslea – engineering Nick Rowe – engineering Oliver Roman – engineering Jerred Pollaci – engineering Evan Myaskovsky – engineering Kyle Hynes – engineering Matthew Erlichman – engineering Paul Bruski – engineering Ted Jensen – mastering K3n Adams – artwork, art direction Randy Blythe – photography Travis Shinn – photography Charts Weekly charts Year-end charts References 2020 albums Albums postponed due to the COVID-19 pandemic Epic Records albums Lamb of God (band) albums Nuclear Blast albums