text:
package org.apache.amber.oauth2.ext.dynamicreg.client.response;

import org.apache.amber.oauth2.common.error.OAuthError;
import org.apache.amber.oauth2.common.exception.OAuthProblemException;
import org.apache.amber.oauth2.common.utils.JSONUtils;
import org.apache.amber.oauth2.ext.dynamicreg.client.validators.RegistrationValidator;
import org.apache.amber.oauth2.ext.dynamicreg.common.OAuthRegistration;
import org.codehaus.jettison.json.JSONException;
import org.apache.amber.oauth2.client.response.OAuthClientResponse;

/**
 * @author Maciej Machulak (m.p.machulak@ncl.ac.uk)
 * @author Lukasz Moren (lukasz.moren@ncl.ac.uk)
 * @author Aad van Moorsel (aad.vanmoorsel@ncl.ac.uk)
 */
public class OAuthClientRegistrationResponse extends OAuthClientResponse {

    public OAuthClientRegistrationResponse() {
    }

    @Override
    protected void init(String body, String contentType, int responseCode) throws OAuthProblemException {
        validator = new RegistrationValidator();
        super.init(body, contentType, responseCode);
    }

    @Override
    public String getParam(String param) {
        return parameters.get(param);
    }

    protected void setBody(String body) throws OAuthProblemException {
        try {
            this.body = body;
            parameters = JSONUtils.parseJSON(body);
        } catch (JSONException e) {
            throw OAuthProblemException.error(OAuthError.CodeResponse.UNSUPPORTED_RESPONSE_TYPE,
                "Invalid response! Response body is not application/json encoded");
        }
    }

    protected void setResponseCode(int responseCode) {
        this.responseCode = responseCode;
    }

    protected void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public String getClientId() {
        return parameters.get(OAuthRegistration.Response.CLIENT_ID);
    }

    public String getClientSecret() {
        return parameters.get(OAuthRegistration.Response.CLIENT_SECRET);
    }

    public String getIssuedAt() {
        return parameters.get(OAuthRegistration.Response.ISSUED_AT);
    }

    public String getExpiresIn() {
        return parameters.get(OAuthRegistration.Response.EXPIRES_IN);
    }

}

redpajama_set_name: RedPajamaGithub


text:
class QtImage : public AbstractImage
{
public:
    QtImage();
    ~QtImage();
    bool loadFromFile(const std::string& fileName) override;
    bool saveToFile(const std::string& fileName) const override;
    bool isNull() const override;
    bool loadFromRawData(DataFormat dt, int width, int height, uint8_t* data, size_t dataSize, void* parameter) override;
    QImage toQImage() const;
protected:
    QImage img_;
};

#endif // QTIMAGE_H


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
gov.nih.nci.cabig.caaers.service
</TITLE>

<META NAME="keywords" CONTENT="gov.nih.nci.cabig.caaers.service package">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Package gov.nih.nci.cabig.caaers.service

Interface Summary

AgentSpecificAdverseEventListService

EvaluationService
This service interface is used to implement various caaers business rules.

InteroperationService
This service class is used to send AE reports to the study calendar.

OrganizationHierarchyService
Interface to determine organization hierarchy

SchedulerService
This is the service interface which is used to schedule notification for report.

Class Summary

AbstractImportServiceImpl
Abstract that sets up the template for import of various domain objects like study, routine AE
 and study.

AgentSpecificAdverseEventListServiceImpl

AgentSpecificAdverseEventListServiceTest

DomainObjectImportOutcome<T extends MutableDomainObject>

DomainObjectImportOutcome.Message

FreeMarkerService

FreeMarkerServiceTest

InteroperationServiceImpl

MailerStub

MockInteroperationService
Contains do-nothing implementations of InteroperationService, suitable for local
 testing.

ParticipantImportServiceImpl

ParticipantImportServiceIntegrationTest

ReportSubmissionService
This class is responsible for submission of an ExpeditedAdverseEventReport

ReportSubmissionService.ReportSubmissionContext
This class maintains the submission context, across various template methods.

ReportSubmissionServiceTest

ReportSubmittability

ReportSubmittability.Message

ReportWithdrawalService
This service is used to withdraw report from external agency, via ServiceMix

ScheduledNotificationProcessService
The implementation here will process the ScheduledNotification

ScheduledNotificationProcessServiceIntegrationTest

SchedulerServiceImpl
This service will schedule the ScheduledNotification objects present in the Report, using Quartz
 scheduling engine.

SchedulerServiceImplTest

SchedulerServiceStub

StudyImportServiceImpl
This class is used to import the study into caAERS system.

Enum Summary

DomainObjectImportOutcome.Severity

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes


text:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>

    <title>Getting Started</title>

		<title>Pig Setup</title>

 <title>Requirements</title>

Mandatory

Unix and Windows users need the following:

 Hadoop 0.20.2, 020.203, or 020.204 - http://hadoop.apache.org/common/releases.html (You can run Pig with different versions of Hadoop by setting HADOOP_HOME to point to the directory where you have installed Hadoop. If you do not set HADOOP_HOME, by default Pig will run with the embedded version, currently Hadoop 0.20.2.)

 Java 1.6 - http://java.sun.com/javase/downloads/index.jsp (set JAVA_HOME to the root of your Java installation)

Windows users also need to install Cygwin and the Perl package:  http://www.cygwin.com/

Optional

 Python 2.5 - http://jython.org/downloads.html (when using Python UDFs or embedding Pig in Python)

 JavaScript 1.7 - https://developer.mozilla.org/en/Rhino_downloads_archive and http://mirrors.ibiblio.org/pub/mirrors/maven2/rhino/js/  (when using JavaScript UDFs or embedding Pig in JavaScript)

 Ant 1.7 - http://ant.apache.org/ (for builds)

 JUnit 4.5 - http://junit.sourceforge.net/ (for unit tests)

 <title>Download Pig</title>

To get a Pig distribution, do the following:

Download a recent stable release from one of the Apache Download Mirrors
	(see  Pig Releases).

Unpack the downloaded Pig distribution, and then note the following:

The Pig script file, pig, is located in the bin directory (/pig-n.n.n/bin/pig).
	    The Pig environment variables are described in the Pig script file.

The Pig properties file, pig.properties, is located in the conf directory (/pig-n.n.n/conf/pig.properties).
	    You can specify an alternate location using the PIG_CONF_DIR environment variable.

Add /pig-n.n.n/bin to your path. Use export (bash,sh,ksh) or setenv (tcsh,csh). For example:

	$ export PATH=/<my-path-to-pig>/pig-n.n.n/bin:$PATH

Test the Pig installation with this simple command: $ pig -help

<title>Build Pig</title>

To build pig, do the following:

 Check out the Pig code from SVN: svn co http://svn.apache.org/repos/asf/pig/trunk

 Build the code from the top directory: ant

	  If the build is successful, you should see the pig.jar file created in that directory.

 Validate the pig.jar  by running a unit test: ant test

	<title>Running Pig </title>

You can run Pig (execute Pig Latin statements and Pig commands) using various modes.

    Local Mode
    Mapreduce Mode

	Interactive Mode
    yes
    yes

	Batch Mode
    yes
    yes

	<title>Execution Modes</title>

Pig has two execution modes or exectypes:

Local Mode - To run Pig in local mode, you need access to a single machine; all files are installed and run using your local host and file system. Specify local mode using the -x flag (pig -x local).

Mapreduce Mode - To run Pig in mapreduce mode, you need access to a Hadoop cluster and HDFS installation. Mapreduce mode is the default mode; you can, but don't need to, specify it using the -x flag (pig OR pig -x mapreduce).

You can run Pig in either mode using the "pig" command (the bin/pig Perl script) or the "java" command (java -cp pig.jar ...).

<title>Examples</title>

This example shows how to run Pig in local and mapreduce mode using the pig command.

<source>
/* local mode */
$ pig -x local ...

/* mapreduce mode */
$ pig ...
or
$ pig -x mapreduce ...
</source>

This example shows how to run Pig in local and mapreduce mode using the java command.

<source>
/* local mode */
$ java -cp pig.jar org.apache.pig.Main -x local ...

/* mapreduce mode */
$ java -cp pig.jar org.apache.pig.Main ...
or
$ java -cp pig.jar org.apache.pig.Main -x mapreduce ...
</source>

<title>Interactive Mode</title>

You can run Pig in interactive mode using the Grunt shell. Invoke the Grunt shell using the "pig" command (as shown below) and then enter your Pig Latin statements and Pig commands interactively at the command line.

<title>Example</title>

These Pig Latin statements extract all user IDs from the /etc/passwd file. First, copy the /etc/passwd file to your local working directory. Next, invoke the Grunt shell by typing the "pig" command (in local or hadoop mode). Then, enter the Pig Latin statements interactively at the grunt prompt (be sure to include the semicolon after each statement). The DUMP operator will display the results to your terminal screen.

<source>
grunt> A = load 'passwd' using PigStorage(':');
grunt> B = foreach A generate $0 as id;
grunt> dump B;
</source>

Local Mode

<source>
$ pig -x local
... - Connecting to ...
grunt>
</source>

Mapreduce Mode

<source>
$ pig -x mapreduce
... - Connecting to ...
grunt>

or

$ pig
... - Connecting to ...
grunt>
</source>

<title>Batch Mode</title>

You can run Pig in batch mode using Pig scripts and the "pig" command (in local or hadoop mode).

<title>Example</title>

The Pig Latin statements in the Pig script (id.pig) extract all user IDs from the /etc/passwd file. First, copy the /etc/passwd file to your local working directory. Next, run the Pig script from the command line (using local or mapreduce mode). The STORE operator will write the results to a file (id.out).

<source>
/* id.pig */

A = load 'passwd' using PigStorage(':');  -- load the passwd file
B = foreach A generate $0 as id;  -- extract the user IDs
store B into 'id.out';  -- write the results to a file name id.out
</source>

Local Mode

<source>
$ pig -x local id.pig
</source>

Mapreduce Mode

<source>
$ pig id.pig
or
$ pig -x mapreduce id.pig
</source>

	<title>Pig Scripts</title>

Use Pig scripts to place Pig Latin statements and Pig commands in a single file. While not required, it is good practice to identify the file using the *.pig extension.

You can run Pig scripts from the command line and from the Grunt shell
(see the run and exec commands).

Pig scripts allow you to pass values to parameters using parameter substitution.

Comments in Scripts

You can include comments in Pig scripts:

For multi-line comments use /* …. */

For single-line comments use --

<source>
/* myscript.pig
My script is simple.
It includes three Pig Latin statements.
*/

A = LOAD 'student' USING PigStorage() AS (name:chararray, age:int, gpa:float); -- loading data
B = FOREACH A GENERATE name;  -- transforming data
DUMP B;  -- retrieving results
</source>

Scripts and Distributed File Systems

Pig supports running scripts (and Jar files) that are stored in HDFS, Amazon S3, and other distributed file systems. The script's full location URI is required (see REGISTER for information about Jar files). For example, to run a Pig script on HDFS, do the following:

<source>
$ pig hdfs://nn.mydomain.com:9020/myscripts/script.pig
</source>

	<title>Pig Latin Statements</title>

Pig Latin statements are the basic constructs you use to process data using Pig.
   A Pig Latin statement is an operator that takes a relation as input and produces another relation as output.
   (This definition applies to all Pig Latin operators except LOAD and STORE which read data from and write data to the file system.)
   Pig Latin statements may include expressions and schemas.
   Pig Latin statements can span multiple lines and must end with a semi-colon ( ; ).
   By default, Pig Latin statements are processed using multi-query execution.

Pig Latin statements are generally organized as follows:

A LOAD statement to read data from the file system.

A series of "transformation" statements to process the data.

A DUMP statement to view results or a STORE statement to save the results.

Note that a DUMP or STORE statement is required to generate output.

In this example Pig will validate, but not execute, the LOAD and FOREACH statements.

<source>
A = LOAD 'student' USING PigStorage() AS (name:chararray, age:int, gpa:float);
B = FOREACH A GENERATE name;
</source>

In this example, Pig will validate and then execute the LOAD, FOREACH, and DUMP statements.

<source>
A = LOAD 'student' USING PigStorage() AS (name:chararray, age:int, gpa:float);
B = FOREACH A GENERATE name;
DUMP B;
(John)
(Mary)
(Bill)
(Joe)
</source>

   <title>Loading Data</title>

Use the  LOAD operator and the load/store functions to read data into Pig (PigStorage is the default load function).

   <title>Working with Data</title>

Pig allows you to transform data in many ways. As a starting point, become familiar with these operators:

Use the FILTER operator to work with tuples or rows of data.
         Use the FOREACH operator to work with columns of data.

Use the GROUP operator to group data in a single relation.
         Use the COGROUP,
         inner JOIN, and
         outer JOIN
         operators  to group or join data in two or more relations.

Use the UNION operator to merge the contents of two or more relations.
         Use the SPLIT operator to partition the contents of a relation into multiple relations.

   <title>Storing Intermediate Results</title>

Pig stores the intermediate data generated between MapReduce jobs in a temporary location on HDFS.
   This location must already exist on HDFS prior to use.
   This location can be configured using the pig.temp.dir property. The property's default value is "/tmp" which is the same
   as the hardcoded location in Pig 0.7.0 and earlier versions.

   <title>Storing Final Results</title>

Use the  STORE operator and the load/store functions
   to write results to the file system (PigStorage is the default store function).

Note: During the testing/debugging phase of your implementation, you can use DUMP to display results to your terminal screen.
However, in a production environment you always want to use the STORE operator to save your results (see Store vs. Dump).

   <title>Debugging Pig Latin</title>

Pig Latin provides operators that can help you debug your Pig Latin statements:

Use the  DUMP operator to display results to your terminal screen.

Use the  DESCRIBE operator to review the schema of a relation.

Use the  EXPLAIN operator to view the logical, physical, or map reduce execution plans to compute a relation.

Use the  ILLUSTRATE operator to view the step-by-step execution of a series of statements.

<title>Pig Properties</title>

Pig supports a number of Java properties that you can use to customize Pig behavior. You can retrieve a list of the properties using the help properties command. All of these properties are optional; none are required.

To specify Pig properties use one of these mechanisms:

The pig.properties file (add the directory that contains the pig.properties file to the classpath)

The -D command line option and a Pig property (pig -Dpig.tmpfilecompression=true)

The -P command line option and a properties file (pig -P mypig.properties)

The set command (set pig.exec.nocombiner true)

Note: The properties file uses standard Java property file format.

The following precedence order is supported: pig.properties > -D Pig property > -P properties file > set command. This means that if the same property is provided using the –D command line option as well as the –P command line option and a properties file, the value of the property in the properties file will take precedence.

To specify Hadoop properties you can use the same mechanisms:

The hadoop-site.xml file (add the directory that contains the hadoop-site.xml file to the classpath)

The -D command line option and a Hadoop property (pig –Dmapreduce.task.profile=true)

The -P command line option and a property file (pig -P property_file)

The set command (set mapred.map.tasks.speculative.execution false)

The same precedence holds: hadoop-site.xml > -D Hadoop property > -P properties_file > set command.

Hadoop properties are not interpreted by Pig but are passed directly to Hadoop. Any Hadoop property can be passed this way.

All properties that Pig collects, including Hadoop properties, are available to any UDF via the UDFContext object. To get access to the properties, you can call the getJobConf method.

<title>Pig Tutorial </title>

The Pig tutorial shows you how to run Pig scripts using Pig's local mode and mapreduce mode (see Execution Modes).

To get started, do the following preliminary tasks:

Make sure the JAVA_HOME environment variable is set the root of your Java installation.

Make sure your PATH includes bin/pig (this enables you to run the tutorials using the "pig" command).
<source>
$ export PATH=/<my-path-to-pig>/pig-0.9.0/bin:$PATH
</source>

Set the PIG_HOME environment variable:
<source>
$ export PIG_HOME=/<my-path-to-pig>/pig-0.9.0
</source>

Create the pigtutorial.tar.gz file:

Move to the Pig tutorial directory (.../pig-0.9.0/tutorial).

Edit the build.xml file in the tutorial directory.
<source>
Change this:   <property name="pigjar" value="../pig.jar" />
To this:       <property name="pigjar" value="../pig-0.9.0-core.jar" />
</source>

Run the "ant" command from the tutorial directory. This will create the pigtutorial.tar.gz file.

Copy the pigtutorial.tar.gz file from the Pig tutorial directory to your local directory.

Unzip the pigtutorial.tar.gz file.
<source>
$ tar -xzf pigtutorial.tar.gz
</source>

A new directory named pigtmp is created. This directory contains the Pig Tutorial Files. These files work with Hadoop 0.20.2 and include everything you need to run Pig Script 1 and Pig Script 2.

<title> Running the Pig Scripts in Local Mode</title>

To run the Pig scripts in local mode, do the following:

Move to the pigtmp directory.

Execute the following command (using either script1-local.pig or script2-local.pig).
<source>
$ pig -x local script1-local.pig
</source>

Review the result files, located in the part-r-00000 directory.

The output may contain a few Hadoop warnings which can be ignored:

<source>
2010-04-08 12:55:33,642 [main] INFO  org.apache.hadoop.metrics.jvm.JvmMetrics
- Cannot initialize JVM Metrics with processName=JobTracker, sessionId= - already initialized
</source>

<title> Running the Pig Scripts in Mapreduce Mode</title>

To run the Pig scripts in mapreduce mode, do the following:

Move to the pigtmp directory.

Copy the excite.log.bz2 file from the pigtmp directory to the HDFS directory.
<source>
$ hadoop fs –copyFromLocal excite.log.bz2 .
</source>

Set the PIG_CLASSPATH environment variable to the location of the cluster configuration directory (the directory that contains the core-site.xml, hdfs-site.xml and mapred-site.xml files):
<source>
export PIG_CLASSPATH=/mycluster/conf
</source>

Set the HADOOP_CONF_DIR environment variable to the location of the cluster configuration directory:
<source>
export HADOOP_CONF_DIR=/mycluster/conf
</source>

Execute the following command (using either script1-hadoop.pig or script2-hadoop.pig):
<source>
$ pig script1-hadoop.pig
</source>

Review the result files, located in the script1-hadoop-results or script2-hadoop-results HDFS directory:
<source>
$ hadoop fs -ls script1-hadoop-results
$ hadoop fs -cat 'script1-hadoop-results/*' | less
</source>

<title> Pig Tutorial Files</title>

The contents of the Pig tutorial file (pigtutorial.tar.gz) are described here.

 File

 Description

 pig.jar

 Pig JAR file

 tutorial.jar

 User defined functions (UDFs) and Java classes

 script1-local.pig

 Pig Script 1, Query Phrase Popularity (local mode)

 script1-hadoop.pig

 Pig Script 1, Query Phrase Popularity (mapreduce mode)

 script2-local.pig

 Pig Script 2, Temporal Query Phrase Popularity (local mode)

 script2-hadoop.pig

 Pig Script 2, Temporal Query Phrase Popularity (mapreduce mode)

 excite-small.log

 Log file, Excite search engine (local mode)

 excite.log.bz2

 Log file, Excite search engine (mapreduce)

The user defined functions (UDFs) are described here.

 UDF

 Description

 ExtractHour

 Extracts the hour from the record.

 NGramGenerator

 Composes n-grams from the set of words.

 NonURLDetector

 Removes the record if the query field is empty or a URL.

 ScoreGenerator

 Calculates a "popularity" score for the n-gram.

 ToLower

 Changes the query field to lowercase.

 TutorialUtil

 Divides the query string into a set of words.

<title> Pig Script 1: Query Phrase Popularity</title>

The Query Phrase Popularity script (script1-local.pig or script1-hadoop.pig) processes a search query log file from the Excite search engine and finds search phrases that occur with particular high frequency during certain times of the day.

The script is shown here:

 Register the tutorial JAR file so that the included UDFs can be called in the script.

<source>
REGISTER ./tutorial.jar;
</source>

 Use the PigStorage function to load the excite log file (excite.log or excite-small.log) into the "raw" bag as an array of records with the fields user, time, and query.

<source>
raw = LOAD 'excite.log' USING PigStorage('\t') AS (user, time, query);
</source>

 Call the NonURLDetector UDF to remove records if the query field is empty or a URL.

<source>
clean1 = FILTER raw BY org.apache.pig.tutorial.NonURLDetector(query);
</source>

 Call the ToLower UDF to change the query field to lowercase.

<source>
clean2 = FOREACH clean1 GENERATE user, time, org.apache.pig.tutorial.ToLower(query) as query;
</source>

 Because the log file only contains queries for a single day, we are only interested in the hour. The excite query log timestamp format is YYMMDDHHMMSS. Call the ExtractHour UDF to extract the hour (HH) from the time field.

<source>
houred = FOREACH clean2 GENERATE user, org.apache.pig.tutorial.ExtractHour(time) as hour, query;
</source>

 Call the NGramGenerator UDF to compose the n-grams of the query.

<source>
ngramed1 = FOREACH houred GENERATE user, hour, flatten(org.apache.pig.tutorial.NGramGenerator(query)) as ngram;
</source>

 Use the DISTINCT operator to get the unique n-grams for all records.

<source>
ngramed2 = DISTINCT ngramed1;
</source>

 Use the GROUP operator to group records by n-gram and hour.

<source>
hour_frequency1 = GROUP ngramed2 BY (ngram, hour);
</source>

 Use the COUNTfunction to get the count (occurrences) of each n-gram.

<source>
hour_frequency2 = FOREACH hour_frequency1 GENERATE flatten($0), COUNT($1) as count;
</source>

 Use the GROUP operator to group records by n-gram only. Each group now corresponds to a distinct n-gram and has the count for each hour.

<source>
uniq_frequency1 = GROUP hour_frequency2 BY group::ngram;
</source>

 For each group, identify the hour in which this n-gram is used with a particularly high frequency. Call the ScoreGenerator UDF to calculate a "popularity" score for the n-gram.

<source>
uniq_frequency2 = FOREACH uniq_frequency1 GENERATE flatten($0), flatten(org.apache.pig.tutorial.ScoreGenerator($1));
</source>

 Use the FOREACH-GENERATE operator to assign names to the fields.

<source>
uniq_frequency3 = FOREACH uniq_frequency2 GENERATE $1 as hour, $0 as ngram, $2 as score, $3 as count, $4 as mean;
</source>

 Use the FILTER operator to move all records with a score less than or equal to 2.0.

<source>
filtered_uniq_frequency = FILTER uniq_frequency3 BY score > 2.0;
</source>

 Use the ORDER operator to sort the remaining records by hour and score.

<source>
ordered_uniq_frequency = ORDER filtered_uniq_frequency BY hour, score;
</source>

 Use the PigStorage function to store the results. The output file contains a list of n-grams with the following fields: hour, ngram, score, count, mean.

<source>
STORE ordered_uniq_frequency INTO '/tmp/tutorial-results' USING PigStorage();
</source>

<title>Pig Script 2: Temporal Query Phrase Popularity</title>

The Temporal Query Phrase Popularity script (script2-local.pig or script2-hadoop.pig) processes a search query log file from the Excite search engine and compares the occurrence of frequency of search phrases across two time periods separated by twelve hours.

The script is shown here:

 Register the tutorial JAR file so that the user defined functions (UDFs) can be called in the script.

<source>
REGISTER ./tutorial.jar;
</source>

 Use the PigStorage function to load the excite log file (excite.log or excite-small.log) into the "raw" bag as an array of records with the fields user, time, and query.

<source>
raw = LOAD 'excite.log' USING PigStorage('\t') AS (user, time, query);
</source>

 Call the NonURLDetector UDF to remove records if the query field is empty or a URL.

<source>
clean1 = FILTER raw BY org.apache.pig.tutorial.NonURLDetector(query);
</source>

 Call the ToLower UDF to change the query field to lowercase.

<source>
clean2 = FOREACH clean1 GENERATE user, time, org.apache.pig.tutorial.ToLower(query) as query;
</source>

 Because the log file only contains queries for a single day, we are only interested in the hour. The excite query log timestamp format is YYMMDDHHMMSS. Call the ExtractHour UDF to extract the hour from the time field.

<source>
houred = FOREACH clean2 GENERATE user, org.apache.pig.tutorial.ExtractHour(time) as hour, query;
</source>

 Call the NGramGenerator UDF to compose the n-grams of the query.

<source>
ngramed1 = FOREACH houred GENERATE user, hour, flatten(org.apache.pig.tutorial.NGramGenerator(query)) as ngram;
</source>

 Use the DISTINCT operator to get the unique n-grams for all records.

<source>
ngramed2 = DISTINCT ngramed1;
</source>

 Use the GROUP operator to group the records by n-gram and hour.

<source>
hour_frequency1 = GROUP ngramed2 BY (ngram, hour);
</source>

 Use the COUNT function to get the count (occurrences) of each n-gram.

<source>
hour_frequency2 = FOREACH hour_frequency1 GENERATE flatten($0), COUNT($1) as count;
</source>

 Use the FOREACH-GENERATE operator to assign names to the fields.

<source>
hour_frequency3 = FOREACH hour_frequency2 GENERATE $0 as ngram, $1 as hour, $2 as count;
</source>

 Use the  FILTERoperator to get the n-grams for hour '00'

<source>
hour00 = FILTER hour_frequency2 BY hour eq '00';
</source>

 Uses the FILTER operators to get the n-grams for hour '12'

<source>
hour12 = FILTER hour_frequency3 BY hour eq '12';
</source>

 Use the JOIN operator to get the n-grams that appear in both hours.

<source>
same = JOIN hour00 BY $0, hour12 BY $0;
</source>

 Use the FOREACH-GENERATE operator to record their frequency.

<source>
same1 = FOREACH same GENERATE hour_frequency2::hour00::group::ngram as ngram, $2 as count00, $5 as count12;
</source>

 Use the PigStorage function to store the results. The output file contains a list of n-grams with the following fields: hour, count00, count12.

<source>
STORE same1 INTO '/tmp/tutorial-join-results' USING PigStorage();
</source>

</document>


text:
<?php
/**
 * Modal implementation, it extends DDElementTemplate like all other elements
 */
	class TF_Modal extends DDElementTemplate {
		public function __construct() {

			parent::__construct();
		}

		// Implementation for the element structure.
		public function create_element_structure() {

			// Add name of the class to deserialize it again when the element is sent back to the server from the web page
			$this->config['php_class'] 		= get_class($this);
			// element id
			$this->config['id']	   		= 'elemenet_modal';
			// element name
			$this->config['name']	 		= __('Modal', 'fusion-core');
			// element icon
			$this->config['icon_url']  		= "icons/sc-modal.png";
			// css class related to this element
			$this->config['css_class'] 		= "fusion_element_box";
			// element icon class
			$this->config['icon_class']		= 'fusion-icon builder-options-icon fusiona-external-link';
			// tooltip that will be displyed upon mouse over the element
			//$this->config['tool_tip']  		= 'Creates a simple text block';
			// any special html data attribute (i.e. data-width) needs to be passed
			// drop_level: elements with higher drop level can be dropped in elements with lower drop_level,
			// i.e. element with drop_level = 2 can be dropped in element with drop_level = 0 or 1 only.
			$this->config['data'] 			= array("drop_level"   => "4");
		}

		// override default implemenation for this function as this element have special view
		public function create_visual_editor( $params ) {

			$innerHtml  = '
';
			$innerHtml .= '
'.__('Modal', 'fusion-core').'
modal name = myModal

';
			$innerHtml .= '
';
			$this->config['innerHtml'] = $innerHtml;
		}

		//this function defines TextBlock sub elements or structure
		function popup_elements() {

			$choices					= Helper::get_shortcode_choices();

			$this->config['subElements'] = array(

			   array("name" 			=> __('Name Of Modal', 'fusion-core'),
					  "desc"			=> __('Needs to be a unique identifier (lowercase), used for button or modal_text_link shortcode to open the modal. ex: mymodal', 'fusion-core'),
					  "id" 				=> "fusion_name",
					  "type" 			=> ElementTypeEnum::INPUT,
					  "value" 			=> ""
					  ),

				array("name" 			=> __('Modal Heading', 'fusion-core'),
					  "desc"			=> __('Heading text for the modal.', 'fusion-core'),
					  "id" 				=> "fusion_title",
					  "type" 			=> ElementTypeEnum::INPUT,
					  "value" 			=> ""
					  ),

				array("name" 			=> __('Size Of Modal', 'fusion-core'),
					  "desc" 			=> __('Select the modal window size.', 'fusion-core'),
					  "id" 				=> "fusion_size",
					  "type" 			=> ElementTypeEnum::SELECT,
					  "value" 			=> "",
					  "allowedValues" 	=> array('small' 			=> __('Small', 'fusion-core'),
												 'large' 			=> __('Large', 'fusion-core')
												 )
					  ),

				array("name" 			=> __('Background Color', 'fusion-core'),
					  "desc" 			=> __('Controls the modal background color. Leave blank for theme option selection.', 'fusion-core'),
					  "id" 				=> "fusion_background",
					  "type" 			=> ElementTypeEnum::COLOR,
					  "value" 			=> ""
					  ),

				array("name" 			=> __('Border Color', 'fusion-core'),
					  "desc" 			=> __('Controls the modal border color. Leave blank for theme option selection.', 'fusion-core'),
					  "id" 				=> "fusion_bordercolor",
					  "type" 			=> ElementTypeEnum::COLOR,
					  "value" 			=> ""
					  ),

				array("name" 			=> __('Show footer', 'fusion-core'),
					  "desc" 			=> __('Choose to show the modal footer with close button.', 'fusion-core'),
					  "id" 				=> "fusion_showfooter",
					  "type" 			=> ElementTypeEnum::SELECT,
					  "value" 			=> "",
					  "allowedValues" 	=> $choices
					  ),

				array("name" 			=> __('Contents of Modal', 'fusion-core'),
					  "desc"			=> __('Add your content to be displayed in modal.', 'fusion-core'),
					  "id" 				=> "fusion_content_wp",
					  "type" 			=> ElementTypeEnum::HTML_EDITOR,
					  "value" 			=> ""
					  ),

				array("name" 			=> __('CSS Class', 'fusion-core'),
					  "desc"			=> __('Add a class to the wrapping HTML element.', 'fusion-core'),
					  "id" 				=> "fusion_class",
					  "type" 			=> ElementTypeEnum::INPUT,
					  "value" 			=> ""
					  ),

				array("name" 			=> __('CSS ID', 'fusion-core'),
					  "desc"			=> __('Add an ID to the wrapping HTML element.', 'fusion-core'),
					  "id" 				=> "fusion_id",
					  "type" 			=> ElementTypeEnum::INPUT,
					  "value" 			=> ""
					  ),

				);
		}
	}


text:
title: Theme Variables
taxonomy:
    category: docs
---

When you are designing a theme, Grav gives you access to all sorts of objects and variables from your twig templates.  The Twig templating framework provides powerful ways to read and manipulate these objects and variables.  This is [fully explained in their own documentation](http://twig.sensiolabs.org/doc/templates.html) as well as [summarized succinctly in our own documentation](../twig-primer).

!!!! In Twig, you can call methods that take no parameters by just calling the method name, and omitting the parentheses `()`.  If you need to pass parameters, you also need to provide those after the method name.  `page.content` is equivalent to `page.content()`

## Core Objects

There are several **core objects** that are available to a twig template, and each object has a set of **variables** and **functions**.

### base_dir variable

The `{{ base_dir }}` variable returns the base file directory of the Grav installation.

### base_url variable

The `{{ base_url }}` returns the base URL to the Grav site, whether or not this shows the full URL is dependent on the `absolute_urls` [option in the system configuration](../../basics/grav-configuration#system-configuration).

### base_url_relative variable

The `{{ base_url_relative }}` returns the base URL to the Grav site, without the host information.

### base_url_absolute variable

The `{{ base_url_absolute }}` returns the base URL to the Grav site, including the host information.

### theme_dir variable

The `{{ theme_dir }}` variable returns the file directory folder of the current theme.

### theme_url variable

The `{{ theme_url }}` returns the relative URL to the current theme.

!! When linking to assets like images or JavaScript and CSS files, it's recommended to use the `url()` function in combination with the `theme://` stream as described on the [Twig Filters & Functions](/themes/twig-filters-functions#url) page. For JavaScript and CSS, the [Asset Manager](/themes/asset-manager) is even easier to use but in some cases like dynamic or conditional loading of assets, it will not work.

### config object

You can access any Grav configuration setting via the config object as set in the `configuration.yaml` file.  For example:

```
{{ config.system.pages.theme }}{# returns the currently configured theme #}
```

### site object

An alias to the `config.site` object. This represents the configuration as set in the `site.yaml` file.

### page object

Because Grav is built using the structure defined in the `pages/` folder, each page is represented by a **page object**.

The **page object** is probably _the_ most important object you will work with as it contains all the information about the current page you are currently on.

!! The whole list of the Page object methods is available on the [API site](http://learn.getgrav.org/api/Grav/Common/Page/Page.html). Here's a list of the methods you'll find most useful.

##### summary([size])

This returns a truncated or shortened version of your content.  You can provide an optional `size` parameter to specify the maximum length of the summary, in characters.  Alternatively, if no size is provided, the value can be obtained via the site-wide variable `summary.size` from your `site.yaml` configuration.

```
{{ page.summary }}
```

or

```
{{ page.summary(50) }}
```

A third option is to use a manual delimiter of `===` in your content.  Anything before the delimiter will be used for the summary.

##### content()

This returns the entire HTML content of your page.

```
{{ page.content }}
```

##### headers()

This returns the page headers as defined in the YAML front-matter of the page.  For example a page with the following headers:

```
title: My Page
author: Joe Bloggs
```

could be used:

```
The author of this page is: {{ page.header.author }}
```

##### media()

This returns an array containing all the media associated with a page. These include **images**, **videos**, and other **files**.  You can access media methods as described in the [media documentation](../../content/media) for content. Because it is an array, Twig filters and functions can be used.

Get a specific file or image:
```
{% set my_pdf = page.media['myfile.pdf'] %}
```

Get the first image:
```
{% set first_image = page.media.images|first %}
```

Loop over all images and output the HTML tag to display it:
```
{% for image in page.media.images %}
   {{ image.html }}
{% endfor %}
```

##### title()

This returns the title of the page as set in the `title` variable of the YAML headers for the page itself.

```
title: My Page
```

##### menu()

This returns the value of the `menu` variable of the YAML headers of the page.  If none is provided, it defaults to the `title`.

```
title: My Page
menu: my-page
```

##### visible()

This returns whether or not the page is visible.  By default pages with numeric value followed by a period are visible by default (`01.somefolder1`) while those without (`subfolder2`) are not considered visible. This can be overridden in the page headers:

```
title: My Page
visible: true
```

##### routable()

This returns whether or not a page is routable by Grav.  This means if you can point your browser to the page and receive content back.  Non-routable pages can be used in templates, plugins, etc, but cannot be reached directly. This can be set in the page headers:

```
title: My Page
routable: true
```

##### slug()

This returns the direct name as displayed in the URL for this page, for example `my-blog-post`.

##### url([include_host = false])

This returns the URL to the page, for example:

```
{{ page.url }} {# could return /my-section/my-category/my-blog-post #}
```

or

```
{{ page.url(true) }} {# could return http://mysite.com/my-section/my-category/my-blog-post #}
```

##### route()

This returns the internal routing for a page.  This is primarily used for internal routing and dispatching of pages.

##### home()

This returns `true` or `false` based on whether or not this page is configured as the **home** page.  This setting is found in the `system.yaml` file.

##### root()

This returns `true` or `false` based on whether or not this page is the root page of the tree hierarchy.

##### active()

This returns `true` or `false` based on whether or not this page is currently the page your browser is accessing.  This is particularly useful in navigation to know if the page you are on is the active page.

##### modular()

This returns `true` or `false` based on whether or not this page is modular.

##### activeChild()

This returns whether or not this URI's URL contains the URL of the active page. Or in other words, is this page's URL in the current URL. Again this is useful when building your navigation and you wish to know if the page you are iterating over is the parent of an active child page.

##### find(url)

This returns a page object as specified by a route URL.

```
{% include 'modular/author-detail.html.twig' with {'page': page.find('/authors/billy-bloggs')} %}
```

##### collection()

This returns the collection of pages for this context as determined by the [collection page headers](../../content/collections).

```
{% for child in page.collection %}
    {% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %}
{% endfor %}
```

##### isFirst()

This returns `true` or `false` based on whether this page is the first of its siblings.

##### isLast()

This returns `true` or `false` based on whether this page is the last of its siblings.

##### nextSibling()

This returns the next page from the array of siblings based on the current position.

##### prevSibling()

This returns the previous page from the array of siblings based on the current position.

!! nextSibling() and prevSibling() order pages in a stack-like structure. It works best in a blog situation, where the first blog post has nextSibling null and prevSibling is the previous blog post. If this ordering direction confuses you, we suggest to use page.adjacentSibling(-1) to point to the next page instead of page.nextSibling() to reduce the confusion the terminology might make. You can also define a constant in the theme and use that for better readability, like page.adjacentSibling(NEXT_PAGE)

##### children()

This returns an array of child pages for the page as defined in the pages content structure.

##### orderBy()

This returns the order type for any sorted children of the page. Values typically include: `default`, `title`, `date` and `folder`. This value is typically configured in page headers.

##### orderDir()

This returns the order direction for any sorted children of the page.  Values can be either `asc` for ascending or `desc` for descending. This value is typically configured in page headers.

##### orderManual()

This returns an array of manual page ordering for any children of the page. This value is typically configured in page headers.

##### maxCount()

This returns the maximum number of children pages that are allowed to be returned. This value is typically configured in page headers.

##### children.count()

This returns the number of child pages of the page.

##### children.current()

This returns the current child item.  Can be used while iterating over the children.

##### children.next()

This returns the next child in the array of children.

##### children.prev()

This returns the previous child in the array of children.

##### children.nth(position)

This returns the child identified by the `position` which is an integer from `0` to `children.count() - 1` in the array of children.

##### children.sort(orderBy, orderDir)

Reorders the children based on an **orderBy** (`default`, `title`, `date` and `folder`) and **orderDir** (`asc` or `desc`)

##### parent()

This returns the parent page object for this page. This is very useful when you need to navigate back up the nested tree structure of pages.

##### isPage()

This returns `true` or `false` based on whether this page has an actual `.md` file associated with it rather than just a folder for routing.

##### isDir()

This returns `true` or `false` based on whether this page is only a folder for routing.

##### id()

This returns a unique identifier for the page.

##### modified()

This returns a timestamp of when the page was last modified.

##### date()

This returns the date timestamp for the page.  Typically this is set in the headers to represent the date of a page or post.  If no value is defined explicitly, the file modified timestamp is used.

##### template()

This returns the name of the page template without the `.md` extension. For example `default`

##### filePath()

This returns the full file path of the page. For example `/Users/yourname/sites/grav/user/pages/01.home/default.md`

##### filePathClean()

This returns the relative path from the root of the Grav site.  For example `user/pages/01.home/default.md`

##### path()

This returns the full path to the directory containing the page.  For example `/Users/yourname/sites/grav/user/pages/01.home`

##### folder()

This returns the name of the folder for the page.  For example `01.home`

##### taxonomy()

This returns an array of the taxonomy associated with a page.  These can be iterated over. This is particularly useful for displaying items such as tags:

```
{% for tag in page.taxonomy.tag %}
    <a href="search/tag:{{ tag }}">{{ tag }}</a>
{% endfor %}
```

### pages object

!! The whole list of the Pages object methods is available on the [API site](http://learn.getgrav.org/api/Grav/Common/Page/Pages.html). Here's a list of the methods you'll find most useful.

The **pages object** represents a nested tree of every **page object** that Grav knows about.  This is particularly useful for creating a **sitemap**, **navigation** or if you wish to find a particular **page**.

##### children method

This returns the immediate child pages as an array of **page objects**. As the pages object represents the entire tree, you can fully recurse over every page in the Grav pages/ folder.

Get the top-level pages for a simple menu:
```
<ul class="navigation">
    {% for page in pages.children %}
        {% if page.visible %}
            <li><a href="{{ page.url }}">{{ page.menu }}</a></li>
        {% endif %}
    {% endfor %}
</ul>
```

### uri object

!! The whole list of the Uri object methods is available on the [API site](http://learn.getgrav.org/api/Grav/Common/Uri.html). Here's a list of the methods you'll find most useful.

The Uri object has several methods to access parts of the current URI. For the full URL `http://mysite.com/grav/section/category/page.json/param1:foo/param2:bar/?query1=baz&query2=qux`:

##### path()

This returns the path portion of the URL: (e.g. `uri.path` = `/section/category/page`)

##### paths()

This returns the array of path elements: (e.g. `uri.paths` = `[section, category, page]`)

##### route([absolute = false][, domain = false])

This returns the route as either an absolute or relative URL.  (e.g. `uri.route(true)` = `http://mysite.com/grav/section/category/page` or `uri.route()` = `/section/category/page`)

##### params()

This returns the params portion of the URL: (e.g. `uri.params` = `/param1:foo/param2:bar`)

##### param(id)

This returns the value of a particular param.  (e.g. `uri.param('param1')` = `foo`)

##### query()

This returns the query portion of the URL: (e.g. `uri.query` = `query1=bar&query2=qux`)

##### query(id)

You can also retrieve specfic query items: (e.g. `uri.query('query1')` = `bar`)

##### url([include_host = true])

This returns the full URL with or without the host.  (e.g. `uri.url(false)` = `grav/section/category/page/param:foo?query=bar`)

##### extension()

This returns the extension, or will return `html` if not provided: (e.g. `uri.extension` = `json`)

##### host()

This returns the host portion of the URL. (e.g. `uri.host` = `mysite.com`)

##### base()

This returns the base portion of the URL. (e.g. `uri.base` = `http://mysite.com`)

##### rootUrl([include_host = true])

This returns the root url to the grav instance.  (e.g. `uri.rootUrl()` = `http://mysite.com/grav`)

##### referrer()

This returns the referrer information for this page.

### header object

The header object is an alias for `page.header()` of the original page.  It's a convenient way to access the original page headers when you are looping through other `page` objects of child pages or collections.

### content object

The content object is an alias for the `page.content()` of the original page.

### taxonomy object

The global Taxonomy object that contains all the taxonomy information for the site.

### browser object

!! The whole list of the Browser object methods is available on the [API site](http://learn.getgrav.org/api/Grav/Common/Browser.html). Here's a list of the methods you'll find most useful.

Grav has built-in support for programmatically determining the platform, browser, and version of the user.

```
{{ browser.platform}}   # macintosh
{{ browser.browser}}    # chrome
{{ browser.version}}    # 41
```

## Adding Custom Variables

You can easily add custom variables in a variety of ways.  If the variable is a site-wide variable, you can put the variable in your `user/config/site.yaml` file and then access it via:

```
{{ site.my_variable }}
```

Alternatively, if the variable is only needed for a particular page, you can add the variable to your page's YAML front-matter, and access it via the `page.header` object.  For example:

```
title: My Page
author: Joe Bloggs
```

could be used:

```
The author of this page is: {{ page.header.author }}
```

## Adding Custom Objects

An advanced way to add custom objects is to use a plugin to add objects to the Twig object.  This is an advanced topic and is covered in more detail in the [plugins chapter](../../plugins/event-hooks).


text:
namespace blink {
namespace scheduler {

class DeadlineTaskRunnerTest : public testing::Test {
 public:
  DeadlineTaskRunnerTest()
      : task_environment_(
            base::test::TaskEnvironment::TimeSource::MOCK_TIME,
            base::test::TaskEnvironment::ThreadPoolExecutionMode::QUEUED) {}
  ~DeadlineTaskRunnerTest() override = default;

  void SetUp() override {
    deadline_task_runner_ = std::make_unique<DeadlineTaskRunner>(
        base::BindRepeating(&DeadlineTaskRunnerTest::TestTask,
                            base::Unretained(this)),
        task_environment_.GetMainThreadTaskRunner());
    run_times_.clear();
  }

  base::TimeTicks Now() {
    return task_environment_.GetMockTickClock()->NowTicks();
  }

  void TestTask() { run_times_.push_back(Now()); }

  base::test::TaskEnvironment task_environment_;
  std::unique_ptr<DeadlineTaskRunner> deadline_task_runner_;
  std::vector<base::TimeTicks> run_times_;
};

TEST_F(DeadlineTaskRunnerTest, RunOnce) {
  base::TimeTicks start_time = Now();
  base::TimeDelta delay = base::Milliseconds(10);
  deadline_task_runner_->SetDeadline(FROM_HERE, delay, Now());
  task_environment_.FastForwardUntilNoTasksRemain();

  EXPECT_THAT(run_times_, testing::ElementsAre(start_time + delay));
}

TEST_F(DeadlineTaskRunnerTest, RunTwice) {
  base::TimeDelta delay1 = base::Milliseconds(10);
  base::TimeTicks deadline1 = Now() + delay1;
  deadline_task_runner_->SetDeadline(FROM_HERE, delay1, Now());
  task_environment_.FastForwardUntilNoTasksRemain();

  base::TimeDelta delay2 = base::Milliseconds(100);
  base::TimeTicks deadline2 = Now() + delay2;
  deadline_task_runner_->SetDeadline(FROM_HERE, delay2, Now());
  task_environment_.FastForwardUntilNoTasksRemain();

  EXPECT_THAT(run_times_, testing::ElementsAre(deadline1, deadline2));
}

TEST_F(DeadlineTaskRunnerTest, EarlierDeadlinesTakePrecidence) {
  base::TimeTicks start_time = Now();
  base::TimeDelta delay1 = base::Milliseconds(1);
  base::TimeDelta delay10 = base::Milliseconds(10);
  base::TimeDelta delay100 = base::Milliseconds(100);
  deadline_task_runner_->SetDeadline(FROM_HERE, delay100, Now());
  deadline_task_runner_->SetDeadline(FROM_HERE, delay10, Now());
  deadline_task_runner_->SetDeadline(FROM_HERE, delay1, Now());
  task_environment_.FastForwardUntilNoTasksRemain();

  EXPECT_THAT(run_times_, testing::ElementsAre(start_time + delay1));
}

TEST_F(DeadlineTaskRunnerTest, LaterDeadlinesIgnored) {
  base::TimeTicks start_time = Now();
  base::TimeDelta delay100 = base::Milliseconds(100);
  base::TimeDelta delay10000 = base::Milliseconds(10000);
  deadline_task_runner_->SetDeadline(FROM_HERE, delay100, Now());
  deadline_task_runner_->SetDeadline(FROM_HERE, delay10000, Now());
  task_environment_.FastForwardUntilNoTasksRemain();

  EXPECT_THAT(run_times_, testing::ElementsAre(start_time + delay100));
}

TEST_F(DeadlineTaskRunnerTest, DeleteDeadlineTaskRunnerAfterPosting) {
  deadline_task_runner_->SetDeadline(FROM_HERE, base::Milliseconds(10), Now());

  // Deleting the pending task should cancel it.
  deadline_task_runner_.reset(nullptr);
  task_environment_.FastForwardUntilNoTasksRemain();

  EXPECT_TRUE(run_times_.empty());
}

}  // namespace scheduler
}  // namespace blink


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CloudCompare.Domain.Models
{
    #region Feature
    public class Feature
    {
        public virtual int FeatureID { get; set; }
        public virtual string FeatureName { get; set; }
        public virtual List<Category> Categories { get; set; }
        public virtual int FeatureColumnNumber { get; set; }
        public virtual int FeatureRowNumber { get; set; }
        public virtual byte[] RowVersion { get; set; }
    }
    #endregion
}


text:
#region License

#endregion

using System;

namespace Spring.Threading
{
	/// <summary>
	/// Utility class to use an <see cref="ISync"/> with the
	/// C# <c>using () {}</c> idiom
	/// </summary>
	public class SyncHolder : IDisposable
	{
        ISync _sync;

        /// <summary>
        /// Creates a new <see cref="SyncHolder"/> trying to <see cref="ISync.Acquire"/> the given
        /// <see cref="ISync"/>
        /// </summary>
        /// <param name="sync">the <see cref="ISync"/> to be held</param>
	    public SyncHolder (ISync sync)
	    {
            Init (sync);
	    }

	    /// <summary>
        /// Creates a new <see cref="SyncHolder"/> trying to <see cref="ISync.Attempt"/> the given
        /// <see cref="ISync"/>
        /// </summary>
        /// <param name="sync">the <see cref="ISync"/> to be held</param>
        /// <param name="msecs">millisecond to try to acquire the lock</param>
	    public SyncHolder (ISync sync, long msecs)
	    {
            Init(new TimeoutSync(sync, msecs));
	    }

	    /// <summary>
        /// Releases the held <see cref="ISync"/>
        /// </summary>
	    public void Dispose ()
        {
	        _sync.Release();
        }

        /// <summary>
        /// initializes and acquire access to the <see cref="ISync"/>
        /// </summary>
        /// <param name="sync"></param>
        private void Init (ISync sync)
        {
            this._sync = sync;
            _sync.Acquire();
        }
    }
}


text:
package me.ryanhamshire.GriefPrevention.command;

import me.ryanhamshire.GriefPrevention.Claim;
import me.ryanhamshire.GriefPrevention.ClaimsMode;
import me.ryanhamshire.GriefPrevention.CustomLogEntryTypes;
import me.ryanhamshire.GriefPrevention.GriefPrevention;
import me.ryanhamshire.GriefPrevention.Messages;
import me.ryanhamshire.GriefPrevention.PlayerData;
import me.ryanhamshire.GriefPrevention.TextMode;
import me.ryanhamshire.GriefPrevention.Visualization;
import org.spongepowered.api.command.CommandException;
import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.command.args.CommandContext;
import org.spongepowered.api.command.spec.CommandExecutor;
import org.spongepowered.api.entity.living.player.Player;

public class CommandClaimDelete implements CommandExecutor {

    @Override
    public CommandResult execute(CommandSource src, CommandContext ctx) {
        Player player;
        try {
            player = GriefPrevention.checkPlayer(src);
        } catch (CommandException e) {
            src.sendMessage(e.getText());
            return CommandResult.success();
        }
        // determine which claim the player is standing in
        Claim claim = GriefPrevention.instance.dataStore.getClaimAt(player.getLocation(), true /* ignore height */, null);

        if (claim == null) {
            GriefPrevention.sendMessage(player, TextMode.Err, Messages.DeleteClaimMissing);
        }

        else {
            // deleting an admin claim additionally requires the adminclaims permission
            if (!claim.isAdminClaim() || player.hasPermission("griefprevention.adminclaims")) {
                PlayerData playerData = GriefPrevention.instance.dataStore.getPlayerData(player.getWorld(), player.getUniqueId());
                if (claim.children.size() > 0 && !playerData.warnedAboutMajorDeletion) {
                    GriefPrevention.sendMessage(player, TextMode.Warn, Messages.DeletionSubdivisionWarning);
                    playerData.warnedAboutMajorDeletion = true;
                } else {
                    claim.removeSurfaceFluids(null);
                    GriefPrevention.instance.dataStore.deleteClaim(claim, true);

                    // if in a creative mode world, /restorenature the claim
                    if (GriefPrevention.instance.claimModeIsActive(claim.getLesserBoundaryCorner().getExtent().getProperties(), ClaimsMode.Creative)) {
                        GriefPrevention.instance.restoreClaim(claim, 0);
                    }

                    GriefPrevention.sendMessage(player, TextMode.Success, Messages.DeleteSuccess);
                    GriefPrevention.AddLogEntry(
                            player.getName() + " deleted " + claim.getOwnerName() + "'s claim at "
                                    + GriefPrevention.getfriendlyLocationString(claim.getLesserBoundaryCorner()),
                            CustomLogEntryTypes.AdminActivity);

                    // revert any current visualization
                    Visualization.Revert(player);

                    playerData.warnedAboutMajorDeletion = false;
                }
            } else {
                GriefPrevention.sendMessage(player, TextMode.Err, Messages.CantDeleteAdminClaim);
            }
        }

        return CommandResult.success();
    }
}


text:
CREATE TABLE SYSTEM_PROPERTY (
	NAM_PROPERTY VARCHAR(255) UNIQUE NOT NULL,
	DES_VALUE TEXT,
	DAT_CREATION TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
	DAT_UPDATE TIMESTAMP
);

INSERT INTO  SYSTEM_PROPERTY (NAM_PROPERTY, DES_VALUE, DAT_CREATION, DAT_UPDATE) VALUES ('CODE_BLOCK_MAX_HEIGHT', '250', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO  SYSTEM_PROPERTY (NAM_PROPERTY, DES_VALUE, DAT_CREATION, DAT_UPDATE) VALUES ('MOBILE_CODE_BLOCK_MAX_HEIGHT', '250', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);


text:
/*
 * Copyright (C) 2014 Cloudius Systems, Ltd.
 */

#include "core/reactor.hh"
#include "core/app-template.hh"
#include "core/print.hh"

future<bool> test_smp_call() {
    return smp::submit_to(1, [] {
        return make_ready_future<int>(3);
    }).then([] (int ret) {
        return make_ready_future<bool>(ret == 3);
    });
}

struct nasty_exception {};

future<bool> test_smp_exception() {
    print("1\n");
    return smp::submit_to(1, [] {
        print("2\n");
        auto x = make_exception_future<int>(nasty_exception());
        print("3\n");
        return x;
    }).then_wrapped([] (future<int> result) {
        print("4\n");
        try {
            result.get();
            return make_ready_future<bool>(false); // expected an exception
        } catch (nasty_exception&) {
            // all is well
            return make_ready_future<bool>(true);
        } catch (...) {
            // incorrect exception type
            return make_ready_future<bool>(false);
        }
    });
}

int tests, fails;

future<>
report(sstring msg, future<bool>&& result) {
    return std::move(result).then([msg] (bool result) {
        print("%s: %s\n", (result ? "PASS" : "FAIL"), msg);
        tests += 1;
        fails += !result;
    });
}

int main(int ac, char** av) {
    return app_template().run_deprecated(ac, av, [] {
       return report("smp call", test_smp_call()).then([] {
           return report("smp exception", test_smp_exception());
       }).then([] {
           print("\n%d tests / %d failures\n", tests, fails);
           engine().exit(fails ? 1 : 0);
       });
    });
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Navigation3D" inherits="Node3D" version="4.0">
	<brief_description>
		Mesh-based navigation and pathfinding node.
	</brief_description>
	<description>
		Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationRegion3D] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on.
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="get_closest_point" qualifiers="const">
			<return type="Vector3">
			</return>
			<argument index="0" name="to_point" type="Vector3">
			</argument>
			<description>
				Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
			</description>
		</method>
		<method name="get_closest_point_normal" qualifiers="const">
			<return type="Vector3">
			</return>
			<argument index="0" name="to_point" type="Vector3">
			</argument>
			<description>
				Returns the normal for the point returned by [method get_closest_point].
			</description>
		</method>
		<method name="get_closest_point_owner" qualifiers="const">
			<return type="RID">
			</return>
			<argument index="0" name="to_point" type="Vector3">
			</argument>
			<description>
				Returns the owner region RID for the point returned by [method get_closest_point].
			</description>
		</method>
		<method name="get_closest_point_to_segment" qualifiers="const">
			<return type="Vector3">
			</return>
			<argument index="0" name="start" type="Vector3">
			</argument>
			<argument index="1" name="end" type="Vector3">
			</argument>
			<argument index="2" name="use_collision" type="bool" default="false">
			</argument>
			<description>
				Returns the closest point between the navigation surface and the segment.
			</description>
		</method>
		<method name="get_rid" qualifiers="const">
			<return type="RID">
			</return>
			<description>
			</description>
		</method>
		<method name="get_simple_path" qualifiers="const">
			<return type="PackedVector3Array">
			</return>
			<argument index="0" name="start" type="Vector3">
			</argument>
			<argument index="1" name="end" type="Vector3">
			</argument>
			<argument index="2" name="optimize" type="bool" default="true">
			</argument>
			<description>
				Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored.
			</description>
		</method>
	</methods>
	<members>
		<member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3">
		</member>
		<member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="5.0">
		</member>
		<member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector" default="Vector3( 0, 1, 0 )">
			Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction.
		</member>
	</members>
	<constants>
	</constants>
</class>


text:
var Path = require('path');
var Clipper = require('image-clipper');
var Slices = require('slices');
var utils = require('./utils');

var isBrowser = utils.isBrowser();

function ImageToSlices(lineXArray, lineYArray, options) {
  options = options || {};

  this.lineXArray = utils.sortAndUnique(lineXArray) || [];
  this.lineYArray = utils.sortAndUnique(lineYArray) || [];

  // instance properties
  this.options = {};

  // extend instance properties with global defaults and initial properties
  utils.extend(this.options, this.defaults, options);

  // there are no reference lines
  if (!this.lineXArray.length && !this.lineYArray.length) {
    throw new Error('At least one reference line');
  }

  // throws when both saveToDir and saveToDataUrl does not be specified
  if (!this.options.saveToDir && !this.options.saveToDataUrl) {
    throw new Error('Either saveToDir or saveToDataUrl must be specified');
  }

  if (isBrowser && this.options.saveToDir && !this.options.saveToDataUrl) {
    throw new Error('Does not support saving as file in the Browser, use saveToDataUrl instead');
  }

  return this;
}

ImageToSlices.prototype.defaults = {
  saveToDir: null,
  saveToDataUrl: false,
  clipperOptions: null,
  middleBoundaryMode: false
};

/**
 * 按顺序裁切子区域
 *
 * @param {Object} children
 * @param {Number} parentBlockIndex, 父区域索引值
 * @param {Function} callback, 回调
 * */
ImageToSlices.prototype.clipChild = function(children, parentBlockIndex, callback) {
  // 复制一个对象操作
  var target = children.slice();

  var childBlockIndex = 1;
  var imageFormat = this.imageFormat;
  var exportPath = this.options.saveToDir || '';
  var saveToDataUrl = this.options.saveToDataUrl;
  var clipper = this.clipper;
  var dataUrlList = this.dataUrlList;

  function cropper() {
    var item = target.shift();
    var currentBlockIndex = childBlockIndex;
    var saveImageName = 'section-' + parentBlockIndex + '-' + currentBlockIndex + '.' + imageFormat;
    var saveFileName = Path.join(exportPath, saveImageName);

    childBlockIndex++;

    // 没有孩子节点了
    if (!item) {
      callback();
      return;
    }

    // 执行裁切
    clipper
        .reset()
        .crop(item.x, item.y, item.width, item.height);

    // 裁切图片后保存为 data URI
    if (saveToDataUrl) {
      clipper.toDataURL(function(dataUrl) {
        dataUrlList[parentBlockIndex - 1].children[currentBlockIndex - 1].dataURI = dataUrl;
        cropper();
      });
    }
    // 裁切图片后保存为文件
    else {
      clipper.toFile(saveFileName, function() {
        cropper();
      });
    }
  }

  cropper();
};

ImageToSlices.prototype.clip = function(blocks, callback) {
  var self = this;

  var exportPath = this.options.saveToDir || '';
  var saveToDataUrl = this.options.saveToDataUrl;
  var imageFormat = this.imageFormat;
  var clipper = this.clipper;
  var cloneBlocks = blocks.slice();
  var dataUrlList;

  if (saveToDataUrl) {
    dataUrlList = this.dataUrlList || (this.dataUrlList = cloneBlocks);
  }

  if (blocks.length) {
    // 按顺序切割区域
    var blockIndex = 1;

    function cropper() {
      var item = blocks.shift();
      var currentBlockIndex = blockIndex;
      var saveImageName = 'section-' + currentBlockIndex + '.' + imageFormat;
      var saveFileName = Path.join(exportPath, saveImageName);

      blockIndex++;

      // 所有区块切割完成
      if (!item) {
        if (callback) {
          if (saveToDataUrl) {
            callback(dataUrlList);
          } else {
            callback();
          }
        }
        return;
      }

      // 区块下有子区块
      if (item.children) {

        // 裁切图片后保存为文件
        // 先将大背景图导出,并抹除其中的主体部分像素
        // x 轴留出 20 像素是为了背景图和切出的图片融合效果更加完美
        var cleanX = item.boundary.leftTop.x + 20;
        var cleanY = item.boundary.leftTop.y;
        var cleanWidth = item.boundary.rightBottom.x - item.boundary.leftTop.x - 40;
        var cleanHeight = item.boundary.rightBottom.y - item.boundary.leftTop.y;

        // 在同一个实例上多次执行 crop, clear 等操作
        // 需要先执行 reset 以恢复初始的画布
        clipper
            .reset()
            .clear(cleanX, cleanY, cleanWidth, cleanHeight)
            .crop(item.x, item.y, item.width, item.height);

        // 保存为 data URI
        if (saveToDataUrl) {
          // 将挖空的大背景区域转为 data URI
          clipper.toDataURL(function(dataUrl) {
            dataUrlList[currentBlockIndex - 1].dataURI = dataUrl;
            self.clipChild(item.children, currentBlockIndex, cropper);
          });
        }
        // 保存为文件
        else {
          // 将挖空的大背景区域保存为文件
          clipper.toFile(saveFileName, function() {
            self.clipChild(item.children, currentBlockIndex, cropper);
          });
        }

      } else {

        // 执行裁切
        clipper
            .reset()
            .crop(item.x, item.y, item.width, item.height);

        // 裁切图片后保存为 data URI
        if (saveToDataUrl) {
          clipper.toDataURL(function(dataUrl) {
            dataUrlList[currentBlockIndex - 1].dataURI = dataUrl;
            cropper();
          });
        }
        // 裁切图片后保存为文件
        else {
          clipper.toFile(saveFileName, function() {
            cropper();
          });
        }
      }
    }

    cropper();
  }
};

ImageToSlices.prototype.slice = function(imagePath, callback) {
  var self = this;
  var options = this.options;
  var originalLineXArray = this.lineXArray;
  var originalLineYArray = this.lineYArray;

  this.imageFormat = utils.getFileFormat(imagePath);

  // inject node-canvas
  if (options.clipperOptions && options.clipperOptions.canvas) {
    Clipper.configure('canvas', options.clipperOptions.canvas);
  }

  Clipper(imagePath, function() {
    self.clipper = this;

    if (options.clipperOptions) {
      this.configure(options.clipperOptions);
    }

    var width = this.canvas.width;
    var height = this.canvas.height;

    // 生成参考线的 X Y 方向的边界
    originalLineXArray.push(height);
    originalLineYArray.push(width);

    self.lineXArray = utils.sortAndUnique(originalLineXArray);
    self.lineYArray = utils.sortAndUnique(originalLineYArray);

    var blocks = Slices(width, height, self.lineXArray, self.lineYArray, {
      middleBoundaryMode: options.middleBoundaryMode
    });

    self.clip(blocks, callback);
  });
};

/**
 * configure global default properties
 * properties changed in this object (same properties configurable through the constructor)
 * will take effect for every instance created after the change
 *
 * support both configure(name, value) and configure({name: value})
 * @param {String | Object} name, property name or properties list
 * @param {String | Undefined} value, property value or nothing
 * */
ImageToSlices.__configure = function(name, value) {
  var defaults = ImageToSlices.prototype.defaults;
  utils.setter(defaults, name, value);
};

module.exports = ImageToSlices;


text:
set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")

# The top level Makefile was generated from the following files:
set(CMAKE_MAKEFILE_DEPENDS
  "CMakeCache.txt"
  "CMakeFiles/3.5.1/CMakeCCompiler.cmake"
  "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake"
  "CMakeFiles/3.5.1/CMakeSystem.cmake"
  "CMakeLists.txt"
  "catkin/catkin_generated/version/package.cmake"
  "catkin_generated/installspace/_setup_util.py"
  "catkin_generated/ordered_paths.cmake"
  "catkin_generated/package.cmake"
  "package.xml"
  "/opt/ros/kinetic/share/catkin/cmake/../package.xml"
  "/opt/ros/kinetic/share/catkin/cmake/all.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/assert.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/atomic_configure_file.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkinConfig-version.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkin_add_env_hooks.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkin_destinations.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkin_download.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkin_generate_environment.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkin_install_python.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkin_libraries.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkin_metapackage.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkin_python_setup.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/debug_message.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/em/pkg.pc.em"
  "/opt/ros/kinetic/share/catkin/cmake/em_expand.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/empy.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/find_program_required.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/interrogate_setup_dot_py.py"
  "/opt/ros/kinetic/share/catkin/cmake/legacy.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/list_append_deduplicate.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/list_append_unique.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/list_insert_in_workspace_order.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/platform/lsb.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/platform/ubuntu.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/platform/windows.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/python.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/stamp.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/string_starts_with.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/templates/_setup_util.py.in"
  "/opt/ros/kinetic/share/catkin/cmake/templates/env.sh.in"
  "/opt/ros/kinetic/share/catkin/cmake/templates/generate_cached_setup.py.in"
  "/opt/ros/kinetic/share/catkin/cmake/templates/pkg.context.pc.in"
  "/opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig-version.cmake.in"
  "/opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig.cmake.in"
  "/opt/ros/kinetic/share/catkin/cmake/templates/rosinstall.in"
  "/opt/ros/kinetic/share/catkin/cmake/templates/setup.bash.in"
  "/opt/ros/kinetic/share/catkin/cmake/templates/setup.sh.in"
  "/opt/ros/kinetic/share/catkin/cmake/templates/setup.zsh.in"
  "/opt/ros/kinetic/share/catkin/cmake/test/catkin_download_test_data.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/test/nosetests.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/test/tests.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/tools/doxygen.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/tools/libraries.cmake"
  "/opt/ros/kinetic/share/catkin/cmake/tools/rt.cmake"
  "/opt/ros/kinetic/share/cpp_common/cmake/cpp_commonConfig-version.cmake"
  "/opt/ros/kinetic/share/cpp_common/cmake/cpp_commonConfig.cmake"
  "/opt/ros/kinetic/share/message_runtime/cmake/message_runtimeConfig-version.cmake"
  "/opt/ros/kinetic/share/message_runtime/cmake/message_runtimeConfig.cmake"
  "/opt/ros/kinetic/share/rosconsole/cmake/rosconsole-extras.cmake"
  "/opt/ros/kinetic/share/rosconsole/cmake/rosconsoleConfig-version.cmake"
  "/opt/ros/kinetic/share/rosconsole/cmake/rosconsoleConfig.cmake"
  "/opt/ros/kinetic/share/roscpp/cmake/roscpp-msg-extras.cmake"
  "/opt/ros/kinetic/share/roscpp/cmake/roscppConfig-version.cmake"
  "/opt/ros/kinetic/share/roscpp/cmake/roscppConfig.cmake"
  "/opt/ros/kinetic/share/roscpp_serialization/cmake/roscpp_serializationConfig-version.cmake"
  "/opt/ros/kinetic/share/roscpp_serialization/cmake/roscpp_serializationConfig.cmake"
  "/opt/ros/kinetic/share/roscpp_traits/cmake/roscpp_traitsConfig-version.cmake"
  "/opt/ros/kinetic/share/roscpp_traits/cmake/roscpp_traitsConfig.cmake"
  "/opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgs-msg-extras.cmake"
  "/opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgsConfig-version.cmake"
  "/opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgsConfig.cmake"
  "/opt/ros/kinetic/share/rostime/cmake/rostimeConfig-version.cmake"
  "/opt/ros/kinetic/share/rostime/cmake/rostimeConfig.cmake"
  "/opt/ros/kinetic/share/std_msgs/cmake/std_msgs-msg-extras.cmake"
  "/opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig-version.cmake"
  "/opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig.cmake"
  "/opt/ros/kinetic/share/xmlrpcpp/cmake/xmlrpcppConfig-version.cmake"
  "/opt/ros/kinetic/share/xmlrpcpp/cmake/xmlrpcppConfig.cmake"
  "/usr/share/cmake-3.5/Modules/CMakeCInformation.cmake"
  "/usr/share/cmake-3.5/Modules/CMakeCXXInformation.cmake"
  "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake"
  "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake"
  "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake"
  "/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake"
  "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake"
  "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake"
  "/usr/share/cmake-3.5/Modules/CheckIncludeFile.cmake"
  "/usr/share/cmake-3.5/Modules/CheckLibraryExists.cmake"
  "/usr/share/cmake-3.5/Modules/CheckSymbolExists.cmake"
  "/usr/share/cmake-3.5/Modules/Compiler/GNU-C.cmake"
  "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX.cmake"
  "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake"
  "/usr/share/cmake-3.5/Modules/FindGTest.cmake"
  "/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake"
  "/usr/share/cmake-3.5/Modules/FindPackageMessage.cmake"
  "/usr/share/cmake-3.5/Modules/FindPythonInterp.cmake"
  "/usr/share/cmake-3.5/Modules/FindThreads.cmake"
  "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-C.cmake"
  "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-CXX.cmake"
  "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake"
  "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake"
  "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake"
  "/usr/src/gtest/CMakeLists.txt"
  "/usr/src/gtest/cmake/internal_utils.cmake"
  )

# The corresponding makefile is:
set(CMAKE_MAKEFILE_OUTPUTS
  "Makefile"
  "CMakeFiles/cmake.check_cache"
  )

# Byproducts of CMake generate step:
set(CMAKE_MAKEFILE_PRODUCTS
  "catkin_generated/stamps/ear/package.xml.stamp"
  "catkin_generated/installspace/_setup_util.py"
  "catkin_generated/stamps/ear/_setup_util.py.stamp"
  "catkin_generated/installspace/env.sh"
  "catkin_generated/installspace/setup.bash"
  "catkin_generated/installspace/setup.sh"
  "catkin_generated/installspace/setup.zsh"
  "catkin_generated/installspace/.rosinstall"
  "catkin_generated/generate_cached_setup.py"
  "catkin_generated/env_cached.sh"
  "catkin_generated/stamps/ear/interrogate_setup_dot_py.py.stamp"
  "catkin_generated/stamps/ear/package.xml.stamp"
  "catkin_generated/pkg.develspace.context.pc.py"
  "catkin_generated/stamps/ear/pkg.pc.em.stamp"
  "devel/share/ear/cmake/earConfig.cmake"
  "devel/share/ear/cmake/earConfig-version.cmake"
  "catkin_generated/pkg.installspace.context.pc.py"
  "catkin_generated/stamps/ear/pkg.pc.em.stamp"
  "catkin_generated/installspace/earConfig.cmake"
  "catkin_generated/installspace/earConfig-version.cmake"
  "CMakeFiles/CMakeDirectoryInformation.cmake"
  "gtest/CMakeFiles/CMakeDirectoryInformation.cmake"
  )

# Dependency information for all targets:
set(CMAKE_DEPEND_INFO_FILES
  "CMakeFiles/doxygen.dir/DependInfo.cmake"
  "CMakeFiles/roscpp_generate_messages_eus.dir/DependInfo.cmake"
  "CMakeFiles/std_msgs_generate_messages_py.dir/DependInfo.cmake"
  "CMakeFiles/download_extra_data.dir/DependInfo.cmake"
  "CMakeFiles/tests.dir/DependInfo.cmake"
  "CMakeFiles/roscpp_generate_messages_py.dir/DependInfo.cmake"
  "CMakeFiles/rosgraph_msgs_generate_messages_py.dir/DependInfo.cmake"
  "CMakeFiles/run_tests.dir/DependInfo.cmake"
  "CMakeFiles/roscpp_generate_messages_cpp.dir/DependInfo.cmake"
  "CMakeFiles/clean_test_results.dir/DependInfo.cmake"
  "CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake"
  "CMakeFiles/roscpp_generate_messages_lisp.dir/DependInfo.cmake"
  "CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/DependInfo.cmake"
  "CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/DependInfo.cmake"
  "CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/DependInfo.cmake"
  "CMakeFiles/std_msgs_generate_messages_cpp.dir/DependInfo.cmake"
  "CMakeFiles/ear_node.dir/DependInfo.cmake"
  "CMakeFiles/roscpp_generate_messages_nodejs.dir/DependInfo.cmake"
  "CMakeFiles/std_msgs_generate_messages_eus.dir/DependInfo.cmake"
  "CMakeFiles/std_msgs_generate_messages_lisp.dir/DependInfo.cmake"
  "CMakeFiles/std_msgs_generate_messages_nodejs.dir/DependInfo.cmake"
  "gtest/CMakeFiles/gtest.dir/DependInfo.cmake"
  "gtest/CMakeFiles/gtest_main.dir/DependInfo.cmake"
  )


text:
<?php

declare(strict_types=1);

namespace phpDocumentor\Console;

use Jean85\PrettyVersions;
use OutOfBoundsException;
use PackageVersions\Versions;
use Symfony\Bundle\FrameworkBundle\Console\Application as BaseApplication;
use Symfony\Component\Console\Exception\CommandNotFoundException;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\HttpKernel\KernelInterface;
use function file_get_contents;
use function ltrim;
use function sprintf;
use function trim;

class Application extends BaseApplication
{
    public const VERSION = '@package_version@';

    public function __construct(KernelInterface $kernel)
    {
        parent::__construct($kernel);

        $this->setName('phpDocumentor');
        $this->setVersion($this->detectVersion());
    }

    protected function getCommandName(InputInterface $input) : ?string
    {
        try {
            if ($input->getFirstArgument() !== null) {
                $this->find($input->getFirstArgument());

                return $input->getFirstArgument();
            }
        } catch (CommandNotFoundException $e) {
            //Empty by purpose
        }

        // the regular setDefaultCommand option does not allow for options and arguments; with this workaround
        // we can have options and arguments when the first element in the argv options is not a recognized
        // command name.
        return 'project:run';
    }

    protected function getDefaultInputDefinition() : InputDefinition
    {
        $inputDefinition = parent::getDefaultInputDefinition();

        $inputDefinition->addOption(
            new InputOption(
                'config',
                'c',
                InputOption::VALUE_OPTIONAL,
                'Location of a custom configuration file'
            )
        );
        $inputDefinition->addOption(
            new InputOption('log', null, InputOption::VALUE_OPTIONAL, 'Log file to write to')
        );

        return $inputDefinition;
    }

    /**
     * Returns the long version of the application.
     *
     * @return string The long application version
     */
    public function getLongVersion() : string
    {
        return sprintf('%s <info>%s</info>', $this->getName(), $this->getVersion());
    }

    private function detectVersion() : string
    {
        $version = self::VERSION;

        // prevent replacing the version by the PEAR building
        if (sprintf('%s%s%s', '@', 'package_version', '@') === self::VERSION) {
            $version = trim(file_get_contents(__DIR__ . '/../../../VERSION'));
            // @codeCoverageIgnoreStart
            try {
                $version = PrettyVersions::getVersion(Versions::ROOT_PACKAGE_NAME)->getPrettyVersion();
                $version = sprintf('v%s', ltrim($version, 'v'));
            } catch (OutOfBoundsException $e) {
            }

            // @codeCoverageIgnoreEnd
        }

        return $version;
    }
}


text:
package fr.alexdet.android.model.webservices;

import java.io.InputStream;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.content.Context;
import fr.alexdet.android.model.bdd.CourseRepository;
import fr.alexdet.android.model.data.Course;
import fr.alexdet.android.model.data.Notification;

/**
 * Class managing the Course item - Request the data from the DB or the server
 * and parse the json if the data come from the server
 *
 * @author alexisdetalhouet
 *
 */
public class CoursesQuery {

	/*
	 * Course repository
	 */
	private static CourseRepository mCourseDataSet;

	/*
	 * url to make courses request
	 */
	private static String url = "http://23.23.80.185/mep_web_service/cours.php";

	/**
	 * Tag to retrieve the type of notification
	 */
	public static final String NOTIF_TAG = "MDL_COURSE_SECTIONS";

	/*
	 * JSON courses names
	 */
	private static final String TAG_COURSE_COL_ID = "cours";
	private static final String TAG_COURS_USERNAME = "username";
	private static final String TAG_COURS_SHORTNAME = "shortname";
	private static final String TAG_COURS_FULLNAME = "fullname";
	private static final String TAG_COURS_COURSEID = "courseid";
	// private static final String TAG_COURS_COURSE_NB_NOTIF = "nbNotif";

	// JSONArray
	private static JSONArray courses = null;

	private static int mNewCourses;

	/**
	 * Instantiate the Course table
	 *
	 * @param context
	 *            the application context
	 */
	public CoursesQuery(Context context) {
		mCourseDataSet = new CourseRepository(context);
		mNewCourses = 0;
	}

	/**
	 * Instantiate the Course table - Get the JSON from the server
	 *
	 * @param context
	 *            the application context
	 * @param needData
	 *            if true, it is the first time the user is logging in
	 */
	public CoursesQuery(Context context, Boolean needData) {
		mCourseDataSet = new CourseRepository(context);
		mNewCourses = 0;

		if (needData) {
			InputStream jsonIS = QueryRepository
					.getJsonFromServer(context, url);
			CoursesQuery.parseCourseJSON(jsonIS, false);
		}
	}

	/**
	 * Static method parsing the JSON got from the server
	 *
	 * @param jsonIS
	 *            json retrieved by the server
	 * @param isNotification
	 *            TODO
	 *
	 * @return
	 */
	public static Course parseCourseJSON(InputStream jsonIS,
			boolean isNotification) {

		JSONObject json = JSONParser.getJSONObject(jsonIS);

		try {

			courses = json.getJSONArray(TAG_COURSE_COL_ID);
			mCourseDataSet.open();
			for (int i = 0; i < courses.length(); i++) {
				JSONObject c = courses.getJSONObject(i);

				String username = c.getString(TAG_COURS_USERNAME);
				String shortname = c.getString(TAG_COURS_SHORTNAME);
				String fullname = c.getString(TAG_COURS_FULLNAME);
				int courseid = c.getInt(TAG_COURS_COURSEID);
				int nbNotif = 0;

				Course unCours = new Course(username, shortname, fullname,
						courseid, nbNotif);

				mCourseDataSet.Save(unCours);
				mNewCourses++;

				NotificationQuery.addNotification(new Notification(shortname,
						NOTIF_TAG));

				if (isNotification)
					return unCours;
			}
			mCourseDataSet.close();

		} catch (JSONException e) {
			e.printStackTrace();

		}
		return null;
	}

	public static int getNewCourses() {
		return mNewCourses;
	}

	public static List<Course> getListCourses() {
		mCourseDataSet.open();
		List<Course> list = mCourseDataSet.GetAll();
		mCourseDataSet.close();
		return list;
	}

	public static void updateDataSet(Course entite) {
		mCourseDataSet.open();
		mCourseDataSet.Update(entite);
		mCourseDataSet.close();
	}
}


text:
namespace AODtoValidation.Installers
{
    #region using

    using Castle.MicroKernel.Registration;
    using Castle.MicroKernel.SubSystems.Configuration;
    using Castle.Windsor;
    using FluentValidation;
    using Validators;

    #endregion

    public class ValidatorInstaller : IWindsorInstaller
    {
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            container.Register(
                Classes.FromAssemblyContaining(typeof (ValidatorBase<>))
                    .IncludeNonPublicTypes()
                    .BasedOn(typeof (IValidator<>))
                    .WithServiceAllInterfaces()
                    .LifestyleTransient()
                );
        }
    }
}


text:
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-comp-4529',
  templateUrl: './comp-4529.component.html',
  styleUrls: ['./comp-4529.component.css']
})
export class Comp4529Component implements OnInit {

  constructor() { }

  ngOnInit() {
  }

}


text:
checkOne = exports.checkOne = function(x) {
  if (!x) throw new Error();
};

var checkList = exports.checkList = function(xs) {
  for (var i=0; i<xs.length; ++i)
    checkOne(xs[i]);
};