text:
package org.apache.beam.sdk.util;

import org.apache.beam.sdk.transforms.OldDoFn;
import org.apache.beam.sdk.transforms.OldDoFn.RequiresWindowAccess;
import org.apache.beam.sdk.values.KV;

/**
 * {@link OldDoFn} that makes timestamps and window assignments explicit in the value part of each
 * key/value pair.
 *
 * @param <K> the type of the keys of the input and output {@code PCollection}s
 * @param <V> the type of the values of the input {@code PCollection}
 */
@SystemDoFnInternal
public class ReifyTimestampAndWindowsDoFn<K, V> extends OldDoFn<KV<K, V>, KV<K, WindowedValue<V>>>
    implements RequiresWindowAccess {
  @Override
  public void processElement(ProcessContext c) throws Exception {
    KV<K, V> kv = c.element();
    K key = kv.getKey();
    V value = kv.getValue();
    c.output(KV.of(key, WindowedValue.of(value, c.timestamp(), c.window(), c.pane())));
  }
}

redpajama_set_name: RedPajamaGithub


text:
* Lösche logs, zookeeper
* Neustart

* Wird der richtige Port zum Server verwendet? Keine Fehlermeldung bei falschem Port

* Wird der richtige Producer/Consumer ausgeführt?

* Close Consumer/Producer connections. Create new Consumer Group.


text:
module RussianPhone
  class FormatValidator < ActiveModel::Validator
    def validate(record)
      options[:fields].each do |field|
        unless record.send(field).phone.blank?
          record.errors[field] << 'Неверный телефонный номер' unless record.send(field).valid? && record.send(field).city_allowed?
        end
      end
    end
  end
end


text:
/*
 * (c) 2008 MOSA - The Managed Operating System Alliance
 *
 * Licensed under the terms of the New BSD License.
 *
 * Authors:
 *  Michael Ruck (grover) <sharpos@michaelruck.de>
 *  Phil Garcia (tgiphil) <phil@thinkedge.com>
 */

using System;
using System.Text;

namespace Mosa.Compiler.Metadata.Signatures
{
	/// <summary>
	///
	/// </summary>
	public class LocalVariableSignature : Signature
	{
		/// <summary>
		/// Holds the signature types of all local variables in order of definition.
		/// </summary>
		/// <value>The types.</value>
		public VariableSignature[] Locals { get; private set; }

		/// <summary>
		/// Initializes a new instance of the <see cref="LocalVariableSignature" /> class.
		/// </summary>
		/// <param name="reader">The reader.</param>
		public LocalVariableSignature(SignatureReader reader)
			: base(reader)
		{
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="LocalVariableSignature" /> class.
		/// </summary>
		/// <param name="provider">The provider.</param>
		/// <param name="token">The token.</param>
		public LocalVariableSignature(IMetadataProvider provider, HeapIndexToken token)
			: base(provider, token)
		{
		}

		/// <summary>
		/// Parses the signature.
		/// </summary>
		/// <param name="reader">The reader.</param>
		protected override void ParseSignature(SignatureReader reader)
		{
			// Check signature identifier
			if (reader.ReadByte() != 0x07)
				throw new ArgumentException("Token doesn't represent a local variable signature.", "token");

			// Retrieve the number of locals
			int count = reader.ReadCompressedInt32();
			if (count != 0)
			{
				Locals = new VariableSignature[count];
				for (int i = 0; i < count; i++)
				{
					Locals[i] = new VariableSignature(reader);
				}
			}
		}

		public override string ToString()
		{
			StringBuilder sb = new StringBuilder();

			sb.Append(base.ToString());
			sb.Append(' ');

			if (Locals.Length != 0)
			{
				sb.Append(" [ ");

				foreach (var local in Locals)
				{
					sb.Append(local.ToString());
					sb.Append(", ");
				}

				sb.Length = sb.Length - 2;

				sb.Append(" ]");
			}

			return sb.ToString();
		}
	}
}


text:
			Kementerian Perdagangan Republik Indonesia

Jl. M. I. Ridwan Rais, No. 5, Jakarta Pusat 10110, Telepon (021) 3841961/62

Copyright @ 2012 Pusat Hubungan Masyarakat dan Pusat Data dan Informasi Perdagangan


text:
<?php

namespace Zephir\Expression;

use Zephir\Types;
use Zephir\Variable;
use Zephir\CompilationContext;
use Zephir\CompiledExpression;
use Zephir\CompilerException;
use Zephir\Expression;
use Zephir\LiteralCompiledExpression;
use Zephir\Utils;

/**
 * Constants
 *
 * Resolves PHP or Zephir constants into C-Code
 */
class Constants
{
    /**
     * @var bool
     */
    protected $_expecting = true;

    /**
     * @var bool
     */
    protected $_readOnly = false;

    /**
     * @var Variable
     */
    protected $_expectingVariable;

    /**
     * Sets if the variable must be resolved into a direct variable symbol
     * create a temporary value or ignore the return value
     *
     * @param boolean $expecting
     * @param Variable $expectingVariable
     */
    public function setExpectReturn($expecting, Variable $expectingVariable = null)
    {
        $this->_expecting = $expecting;
        $this->_expectingVariable = $expectingVariable;
    }

    /**
     * Sets if the result of the evaluated expression is read only
     *
     * @param boolean $readOnly
     */
    public function setReadOnly($readOnly)
    {
        $this->_readOnly = $readOnly;
    }

    /**
     * Reserved ENV Constants
     * @link http://www.php.net/manual/ru/reserved.constants.php
     * @var array
     */
    protected $envConstans = array(
        'PHP_VERSION',
        'PHP_MAJOR_VERSION',
        'PHP_MINOR_VERSION',
        'PHP_RELEASE_VERSION',
        'PHP_VERSION_ID',
        'PHP_EXTRA_VERSION',
        'PHP_ZTS',
        'PHP_DEBUG',
        'PHP_MAXPATHLEN',
        'PHP_OS',
        'PHP_SAPI',
        'PHP_EOL',
        'PHP_INT_MAX',
        'PHP_INT_SIZE',
        'DEFAULT_INCLUDE_PATH',
        'PHP_BINDIR',
        'PHP_LIBDIR',
        'PHP_DATADIR',
    );

    /**
     * Magick constants
     * @link http://php.net/manual/en/language.constants.predefined.php
     * @var array
     */
    protected $magickConstants = array(
        '__LINE__',
        '__FILE__',
        '__DIR__',
        '__FUNCTION__',
        '__CLASS__',
        '__TRAIT__',
        '__METHOD__',
        '__NAMESPACE__'
    );

    protected $resources = array(
        'STDIN',
        'STDOUT',
        'STDERR'
    );

    /**
     * Resolves a PHP constant value into C-code
     *
     * @param array $expression
     * @param CompilationContext $compilationContext
     * @return CompiledExpression
     * @throws \Zephir\CompilerException
     */
    public function compile(array $expression, CompilationContext $compilationContext)
    {
        $isPhpConstant = false;
        $isZephirConstant = false;

        $constantName    = $expression['value'];

        $mergedConstants = array_merge($this->envConstans, $this->magickConstants, $this->resources);
        if (!defined($expression['value']) && !in_array($constantName, $mergedConstants)) {
            if (!$compilationContext->compiler->isConstant($constantName)) {
                $compilationContext->logger->warning("Constant '" . $constantName . "' does not exist at compile time", 'nonexistent-constant', $expression);
            } else {
                $isZephirConstant = true;
            }
        } else {
            if (strpos($constantName, 'VERSION') !== false) {
                $isPhpConstant = false;
            } else {
                $isPhpConstant = true;
            }
        }

        if ($isZephirConstant && !in_array($constantName, $this->resources)) {
            $constant = $compilationContext->compiler->getConstant($constantName);
            return new LiteralCompiledExpression($constant[0], $constant[1], $expression);
        }

        if ($isPhpConstant && !in_array($constantName, $mergedConstants)) {
            $constantName = constant($constantName);
            $type = strtolower(gettype($constantName));

            switch ($type) {
                case 'integer':
                    return new LiteralCompiledExpression('int', $constantName, $expression);

                case 'double':
                    return new LiteralCompiledExpression('double', $constantName, $expression);

                case 'string':
                    return new LiteralCompiledExpression('string', Utils::addSlashes($constantName, true, Types::STRING), $expression);

                case 'object':
                    throw new CompilerException('?');

                default:
                    return new LiteralCompiledExpression($type, $constantName, $expression);
            }
        }

        if (in_array($constantName, $this->magickConstants)) {
            switch ($constantName) {
                case '__CLASS__':
                    return new CompiledExpression(
                        'string',
                        Utils::addSlashes($compilationContext->classDefinition->getCompleteName(), true, Types::STRING),
                        $expression
                    );
                    //no break
                case '__NAMESPACE__':
                    return new CompiledExpression(
                        'string',
                        Utils::addSlashes($compilationContext->classDefinition->getNamespace(), true, Types::STRING),
                        $expression
                    );
                    //no break
                case '__METHOD__':
                    return new CompiledExpression(
                        'string',
                        $compilationContext->classDefinition->getName() . ':' . $compilationContext->currentMethod->getName(),
                        $expression
                    );
                    //no break
                case '__FUNCTION__':
                    return new CompiledExpression(
                        'string',
                        $compilationContext->currentMethod->getName(),
                        $expression
                    );
                    //no break
            }

            $compilationContext->logger->warning("Magic constant '" . $constantName . "' is not supported", 'not-supported-magic-constant', $expression);
            return new LiteralCompiledExpression('null', null, $expression);
        }

        if ($this->_expecting && $this->_expectingVariable) {
            $symbolVariable = $this->_expectingVariable;

            $symbolVariable->setLocalOnly(false);
            $symbolVariable->setMustInitNull(true);
            $symbolVariable->initVariant($compilationContext);
        } else {
            $symbolVariable = $compilationContext->symbolTable->getTempVariableForWrite('variable', $compilationContext, $expression);
        }

        if (!$symbolVariable->isVariable()) {
            throw new CompilerException('Cannot use variable: ' . $symbolVariable->getType() . ' to assign property value', $expression);
        }

        $compilationContext->codePrinter->output('ZEPHIR_GET_CONSTANT(' . $compilationContext->backend->getVariableCode($symbolVariable) . ', "' . $expression['value'] . '");');
        return new CompiledExpression('variable', $symbolVariable->getName(), $expression);
    }
}


text:
package org.apache.syncope.common.lib.types;

import javax.xml.bind.annotation.XmlEnum;

@XmlEnum
public enum PolicyType {

    /**
     * Account policy like:
     * password expire time, change password at first access, ...
     */
    ACCOUNT("Account Policy"),
    GLOBAL_ACCOUNT("Account Global Policy"),
    /**
     * Password policy regarding password syntax.
     */
    PASSWORD("Password Policy"),
    GLOBAL_PASSWORD("Password Global Policy"),
    /**
     * SYNC policy regarding account conflicts resolution.
     */
    SYNC("Synchronization Policy"),
    GLOBAL_SYNC("Synchronization Global Policy"),
    /**
     * PUSH policy regarding account conflicts resolution.
     */
    PUSH("Push Policy"),
    GLOBAL_PUSH("Push Global Policy");

    private String description;

    PolicyType(final String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public boolean isGlobal() {
        return name().startsWith("GLOBAL");
    }

    public static PolicyType fromString(final String value) {
        return PolicyType.valueOf(value.toUpperCase());
    }
}


text:
namespace Azure.ResourceManager.AppService.Models
{
    /// <summary> Current order status. </summary>
    public enum CertificateOrderStatus
    {
        /// <summary> Pendingissuance. </summary>
        Pendingissuance,
        /// <summary> Issued. </summary>
        Issued,
        /// <summary> Revoked. </summary>
        Revoked,
        /// <summary> Canceled. </summary>
        Canceled,
        /// <summary> Denied. </summary>
        Denied,
        /// <summary> Pendingrevocation. </summary>
        Pendingrevocation,
        /// <summary> PendingRekey. </summary>
        PendingRekey,
        /// <summary> Unused. </summary>
        Unused,
        /// <summary> Expired. </summary>
        Expired,
        /// <summary> NotSubmitted. </summary>
        NotSubmitted
    }
}


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<title>Pushpop NavigationBar Demo</title>
	<link rel="stylesheet" href="externals/scrollkit/scrollkit.css">
	<link rel="stylesheet" href="pushpop.css">

        Custom Back Button
        Right Button

      Push Other View

      Push Yet Another View

This is some other view.

        4
        3
        2
        1

      Push Root View Again

This is yet another view.


text:
(async function(){
      //TODO change
    //load confirm delete modal

var rendered = await getTemplate("templates/confirmDelete.mustache");
$("body").append(rendered);

    //codes async and insert codes afterwards into wrapper

    try{
      var data = await fetch("getOwnCodes.php", { credentials: 'include' });
    var result = JSON.parse(await data.text());

    if('error' in await result){
       Error(result.error);
    }

  }catch(e){
    showError(e);
  }
    //la

    const colors = ['orange', 'green', 'red', 'grey', 'blue']; //circle icon colors

     await Promise.all(result.codes.map(async code =>{

                        code.circleColor = colors[ result.codes.indexOf(code) % colors.length];  //TODO

                        let rendered = await getTemplate("templates/code.mustache", code);
                        $("#own-codes-list").append(await rendered);

                        //TODO to move
                        //on edit btn
                        $("[data-action='edit'][for='code-" + code.id + "']").on('click', function(){

                            showBackButton(router.currentRoute);
                            location.hash = 'newCode';
                            loadNewCode(code.short, code.link);

                        }).tooltip({
                            delay: 50
                        });

                        //on delete btn
                        $("[data-action='delete'][for='code-" + code.id + "']").on('click', function(){

                            //TODO
                            if (confirm('Sure?')) {
                                submitDelete(code.id);
                            }

                        }).tooltip({
                            delay: 50
                        });

                    }));

                      Materialize.showStaggeredList('#own-codes-list');

})();

//TODO

var submitDelete = async function (id) {

  var body = new FormData();
  body.append("id", id);

try{
  const data = await fetch("deleteCode.php", {
     credentials: 'include',
     method: 'post',
     body: body
    });

    var response = JSON.parse(await data.text());
    if ('error' in response) {

        showError(response.error);
    }
  }catch(e){
        showError(e);

  }

  if (response.result == 'deleted') {
      $('#code-' + response.id).fadeOut();
      Materialize.toast('Deleted!', 4000);
  }

}


text:
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
    module.exports = isObject;
}

/**
 * Check if value is simple object
 *
 * @param {mixed} value
 * @return {boolean}
 */
function isObject(value) {
    return (!!value) && (value.constructor === Object);
}


text:
namespace Neo.SmartContract.Framework.Services.Neo
{
    public class StorageContext : IApiInterface
    {
        /// <summary>
        /// Returns current StorageContext as ReadOnly
        /// </summary>
        public extern StorageContext AsReadOnly
        {
            [Syscall("System.Storage.AsReadOnly")]
            get;
        }
    }
}


text:
<?xml version="1.0"?>
<Document>

	<Sentence>
		<value>Sleeping sickness is an infection caused by germs carried by certain flies.</value>
		<pattern_crowdsource> [[Sleeping sickness|C0041228]] is an [[infection|C0009450]] caused by germs carried by certain flies.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Sleeping sickness</surface-form>
				<RDF-ID>C0041228</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>infection</surface-form>
				<RDF-ID>C0009450</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>germs</surface-form>
				<RDF-ID>C1517528</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>certain</surface-form>
				<RDF-ID>C0205423</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>flies</surface-form>
				<RDF-ID>C0012578</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0041228 ISA C0009450</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>It results in swelling of the brain.</value>
		<pattern_crowdsource> It results in [[swelling|C0038999]] of the [[brain|C0006104]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>swelling</surface-form>
				<RDF-ID>C0038999</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>brain</surface-form>
				<RDF-ID>C0006104</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0006104 LOCATION_OF C0038999</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>General symptoms include:  - Anxiety  - Mood changes  - Fever  - Headache  - Weakness  - Insomnia at night  - Sleepiness during the day (may be uncontrollable)  - Sweating  - Swollen lymph nodes all over the body  - Swollen, red, painful nodule at site of the fly bite</value>
		<pattern_crowdsource> General symptoms include:  - Anxiety  - Mood changes  - Fever  - Headache  - Weakness  - Insomnia at night  - Sleepiness during the day (may be uncontrollable)  - Sweating  - Swollen lymph nodes all over the body  - Swollen, red, painful [[nodule|C0228505]] at site of the [[fly bite|C0561224]]		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>General symptoms</surface-form>
				<RDF-ID>C0159028</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Anxiety</surface-form>
				<RDF-ID>C0003467</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>changes</surface-form>
				<RDF-ID>C0392747</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Fever</surface-form>
				<RDF-ID>C0015967</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Headache</surface-form>
				<RDF-ID>C0018681</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Weakness</surface-form>
				<RDF-ID>C0004093</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Mood changes  - Fever  - Headache  - Weakness  - Insomnia</surface-form>
				<RDF-ID>C0233505</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>night</surface-form>
				<RDF-ID>C0439552</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Sleepiness</surface-form>
				<RDF-ID>C0013144</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>day</surface-form>
				<RDF-ID>C0439228</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Sweating</surface-form>
				<RDF-ID>C0038990</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Swollen lymph nodes</surface-form>
				<RDF-ID>C0497156</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>over</surface-form>
				<RDF-ID>C0205136</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Swollen</surface-form>
				<RDF-ID>C0038999</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>red</surface-form>
				<RDF-ID>C0332575</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>painful</surface-form>
				<RDF-ID>C0030193</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>nodule</surface-form>
				<RDF-ID>C0228505</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>site</surface-form>
				<RDF-ID>C0205145</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>fly bite</surface-form>
				<RDF-ID>C0561224</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0228505 LOCATION_OF C0561224</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>A physical exam may show inflammation of the brain and its covering.</value>
		<pattern_crowdsource> A physical exam may show [[inflammation|C0021368]] of the [[brain|C0006104]] and its covering.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>physical exam</surface-form>
				<RDF-ID>C0031809</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>inflammation</surface-form>
				<RDF-ID>C0021368</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>brain</surface-form>
				<RDF-ID>C0006104</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0006104 LOCATION_OF C0021368</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Medicines used to treat this disorder include:  - Eflornithine (for T. b. gambiense only)  - Melarsoprol  - Pentamidine (for T. b. gambiense only)  - Suramin (Antrypol)    Some people may receive a combination of these medicines.</value>
		<pattern_crowdsource> [[Medicines|C0013227]] used to treat this [[disorder|C0012634]] include:  - Eflornithine (for T. b. gambiense only)  - Melarsoprol  - Pentamidine (for T. b. gambiense only)  - [[Suramin|C0038880]] ([[Antrypol|C0878171]])    Some [[people|C0027361]] may receive a combination of these [[medicines|C0013227]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Medicines</surface-form>
				<RDF-ID>C0013227</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>disorder</surface-form>
				<RDF-ID>C0012634</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Eflornithine</surface-form>
				<RDF-ID>C0002260</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>T. b. gambiense</surface-form>
				<RDF-ID>C0041232</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Melarsoprol</surface-form>
				<RDF-ID>C0025217</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Pentamidine</surface-form>
				<RDF-ID>C0030863</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>T. b. gambiense</surface-form>
				<RDF-ID>C0041232</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Suramin</surface-form>
				<RDF-ID>C0038880</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Antrypol</surface-form>
				<RDF-ID>C0878171</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>people</surface-form>
				<RDF-ID>C0027361</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>combination</surface-form>
				<RDF-ID>C0205195</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>medicines</surface-form>
				<RDF-ID>C0013227</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0878171 ISA C0038880</triple>
			<triple>C0013227 TREATS C0012634</triple>
			<triple>C0013227 ADMINISTERED_TO C0027361</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Pentamidine injections protect against T. b. gambiense, but not against T. b. rhodesiense.</value>
		<pattern_crowdsource> [[Pentamidine|C0030863]] [[injections|C1533685]] protect against [[T. b. gambiense|C0041232]], but not against T. b. rhodesiense.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Pentamidine</surface-form>
				<RDF-ID>C0030863</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>injections</surface-form>
				<RDF-ID>C1533685</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>T. b. gambiense</surface-form>
				<RDF-ID>C0041232</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>not</surface-form>
				<RDF-ID>C1518422</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>T. b. rhodesiense</surface-form>
				<RDF-ID>C0041233</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C1533685 USES C0030863</triple>
			<triple>C1533685 PREVENTS C0041232</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Because this medicine is toxic, using it for prevention is not recommended.</value>
		<pattern_crowdsource> Because this [[medicine|C0013227]] is toxic, using it for [[prevention|C0199176]] is not recommended.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>medicine</surface-form>
				<RDF-ID>C0013227</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>toxic</surface-form>
				<RDF-ID>C1407029</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>prevention</surface-form>
				<RDF-ID>C0199176</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>not</surface-form>
				<RDF-ID>C1518422</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0199176 USES C0013227</triple>
		</triples>
	</Sentence>

</Document>


text:
/**
 * 2016-12-20
 * view data activity in the application
 * @author JuKyYoon
 * @version 1.0
 */

package pineapple.iq_quest;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import pineapple.for_future.R;

public class ViewData extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.view_lanking);
        MySQLiteOpenHelper dbHelper = MainMenuActivity.helper; //make a SQLiteopenhelper

        TextView result_text = (TextView)findViewById(R.id.result);
        result_text.setText(dbHelper.getResult());

    }

    /**
     * On click.
     * if backtomain is clicked, this activity is finished
     * if delete button is clicked, all database is deleted
     * @param view the view
     * @return void
     */
    public void onClick(View view){
        switch (view.getId()){
            case R.id.backtomain:
                finish();
                break;
            case R.id.delete:
                MySQLiteOpenHelper dbHelper = MainMenuActivity.helper;
                dbHelper.deleteAll();
                TextView result_text = (TextView)findViewById(R.id.result);
                result_text.setText(dbHelper.getResult());
                break;
        }
    }

}


text:
import {ISuperText, ISuperImage} from '../complete';
import {ITerrainId} from "../storage_identifiers";

export interface ITerrain{
  name: ISuperText,
      description: ISuperText,
//  to enable terrain mechanics on custom terrains:
//  e.g.: magical forrest river will have ids of forest and river, so forest and river mechanics will work,
//  but you can add your own
        terrainGroups: ITerrainId[],
        textures:ISuperImage[],
//  which kind of projectiles or other it blocks
        barrier: {
        linear: Boolean,
            ballistic: Boolean,
            occurrence: Boolean,
            unit: Boolean,
            vision: Boolean
    },
    defaultStepCost: number
}


text:
There are two ways to convert images to greyscale:

* vtkImageLuminance uses the [luminance equation](http://www.wikipedia.org/wiki/Luma_(video)) for properly weighting the R, G, and B components;

* vtkImageMagnitude does a simple sum-of-squares computation of the components (i.e. the [Euclidean norm](http://www.wikipedia.org/wiki/Magnitude_(mathematics)#Euclidean_vector_space) -- not the [quadratic mean](http://www.wikipedia.org/wiki/Root_mean_square)!), and is meant for vector data.

For an example of usage of the vtkImageMagnitude filter, see [ImageMagnitude](/Cxx/Images/ImageMagnitude).


text:
/*************************** -*- Mod: C++ -*- ******************************
  P_SSLSNI.h
   Created On      : 05/02/2017

   Description:
   SNI based Configuration in ATS
 ****************************************************************************/
#ifndef __P_SSL_SNI_H__
#define __P_SSL_SNI_H__

#include "ProxyConfig.h"
#include "ts/Map.h"
#include "P_SNIActionPerformer.h"
#include "ts/MatcherUtils.h"
#include "openssl/ossl_typ.h"
#include <vector>
#include <strings.h>
#include "LuaSNIConfig.h"

// Properties for the next hop server
struct NextHopProperty {
  const char *name   = nullptr; // name of the server
  int8_t verifyLevel = 0;       // whether to verify the next hop
  SSL_CTX *ctx       = nullptr; // ctx generated off the certificate to present to this server
  NextHopProperty();
};

typedef std::vector<ActionItem *> actionVector;
typedef HashMap<cchar *, StringHashFns, actionVector *> SNIMap;
typedef HashMap<cchar *, StringHashFns, NextHopProperty *> NextHopPropertyTable;

struct SNIConfigParams : public ConfigInfo {
  char *sni_filename = nullptr;
  SNIMap sni_action_map;
  SNIMap wild_sni_action_map;
  NextHopPropertyTable next_hop_table;
  NextHopPropertyTable wild_next_hop_table;
  LuaSNIConfig L_sni;
  NextHopProperty *getPropertyConfig(cchar *servername) const;
  SNIConfigParams();
  virtual ~SNIConfigParams();
  void cleanup();
  int Initialize();
  void loadSNIConfig();
  actionVector *get(cchar *servername) const;
  void printSNImap() const;
};

struct SNIConfig {
  static void startup();
  static void reconfigure();
  static SNIConfigParams *acquire();
  static void release(SNIConfigParams *params);
  static void cloneProtoSet(); // clones the protoset of all the netaccept objects created and unregisters h2

  typedef ConfigProcessor::scoped_config<SNIConfig, SNIConfigParams> scoped_config;

private:
  static int configid;
};

#endif


text:
<resources>
    <string name="app_name">tdoo</string>

    <!-- Strings related to login -->
    <string name="prompt_email">E-Mail</string>
    <string name="prompt_password">Passwort</string>
    <string name="action_sign_in">Anmelden oder registrieren</string>
    <string name="action_sign_in_short">Einloggen</string>
    <string name="error_invalid_email">E-Mailadresse ist ungültig</string>
    <string name="error_invalid_password">Das Passwort ist zu kurz</string>
    <string name="error_incorrect_password">Das Passwort stimmt nicht</string>
    <string name="error_field_required">Das Feld muss ausgefüllt sein</string>
    <string name="permission_rationale">"Contacts permissions are needed for providing email
        completions."
    </string>
    <string name="title_activity_to_do_overview">tdoo-Übersicht</string>
    <string name="title_todo_list">tdoos</string>
    <string name="title_todo_detail">tdoo Detail</string>
</resources>


text:
package ee.bitweb.ogone.exceptions;

public class ShaComposerException extends Exception {

    public ShaComposerException() {
    }

    public ShaComposerException(String message) {
        super(message);
    }

    public ShaComposerException(String message, Throwable cause) {
        super(message, cause);
    }

}


text:
#ifndef TUTORIAL_HPP
#define TUTORIAL_HPP

#include "system.hpp"

class Window;

class Tutorial
{
public:
  Tutorial(Window* window);

  virtual ~Tutorial() = 0;

  void init();

  virtual void update(ogl::seconds /*delta*/) {}

  void render();

private:
  virtual void renderInternal() = 0;

  virtual void framebufferSizeChanged(int w, int h);

protected:
  Window* mWindow;
};

inline Tutorial::~Tutorial() {}

#endif // TUTORIAL_HPP


text:
//
//  GoogleMapsSubView.m
//  SportsTracker
//
//  Created by Venelin Petkov on 2/7/16.
//  Copyright © 2016 Venelin Petkov. All rights reserved.
//

#import "GoogleMapsSubView.h"

@implementation GoogleMapsSubView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end


text:
/**
 * @enum EStorageBlockFileSystemType
 * @readonly
 */
const EStorageBlockFileSystemType = {
	"Invalid": 0,
	"Unknown": 1,
	"VFat": 2,
	"Ext4": 3,

	// Value-to-name mapping for convenience
	"0": "Invalid",
	"1": "Unknown",
	"2": "VFat",
	"3": "Ext4",
};

module.exports = EStorageBlockFileSystemType;


text:
require "language/node"
require "json"

class Webpack < Formula
  desc "Bundler for JavaScript and friends"
  homepage "https://webpack.js.org/"
  url "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz"
  sha256 "7b46d1be31aab35758b9850c5a5d46fc818a63a0f0bd502b4d47428400dcc07d"
  license "MIT"
  head "https://github.com/webpack/webpack.git", branch: "main"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "d6e8407f8632e62886cab498aeb292c4db4c54872236d041f32c7b8242d26112"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "d6e8407f8632e62886cab498aeb292c4db4c54872236d041f32c7b8242d26112"
    sha256 cellar: :any_skip_relocation, monterey:       "80c37f782d98e7f1be626dc4f3d6a03f80c1b6b2f6d460545198e64f2e66d57a"
    sha256 cellar: :any_skip_relocation, big_sur:        "80c37f782d98e7f1be626dc4f3d6a03f80c1b6b2f6d460545198e64f2e66d57a"
    sha256 cellar: :any_skip_relocation, catalina:       "80c37f782d98e7f1be626dc4f3d6a03f80c1b6b2f6d460545198e64f2e66d57a"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "73c23ad9467c197bddc0e9a22f410c865d0a8dcafd44b2a094802400436c3672"
  end

  depends_on "node"

  resource "webpack-cli" do
    url "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz"
    sha256 "ac434f92d847c9b811154860071f217c871e6e008abbd8342fcc8e9f5faf7f99"
  end

  def install
    (buildpath/"node_modules/webpack").install Dir["*"]
    buildpath.install resource("webpack-cli")

    cd buildpath/"node_modules/webpack" do
      system "npm", "install", *Language::Node.local_npm_install_args, "--legacy-peer-deps"
    end

    # declare webpack as a bundledDependency of webpack-cli
    pkg_json = JSON.parse(File.read("package.json"))
    pkg_json["dependencies"]["webpack"] = version
    pkg_json["bundleDependencies"] = ["webpack"]
    File.write("package.json", JSON.pretty_generate(pkg_json))

    system "npm", "install", *Language::Node.std_npm_install_args(libexec)

    bin.install_symlink libexec/"bin/webpack-cli"
    bin.install_symlink libexec/"bin/webpack-cli" => "webpack"

    # Replace universal binaries with their native slices
    deuniversalize_machos
  end

  test do
    (testpath/"index.js").write <<~EOS
      function component() {
        const element = document.createElement('div');
        element.innerHTML = 'Hello' + ' ' + 'webpack';
        return element;
      }

      document.body.appendChild(component());
    EOS

    system bin/"webpack", "bundle", "--mode", "production", "--entry", testpath/"index.js"
    assert_match "const e=document\.createElement(\"div\");", File.read(testpath/"dist/main.js")
  end
end


text:
const dns = require('dns')
const path = require('path')
const Multiaddr = require('multiaddr')
const PeerId = require('peer-id')
const PeerInfo = require('peer-info')
const RestClient = require('../src/client/api/RestClient')
const { loadIdentity } = require('../src/peer/identity')
import type { NodeStatus } from '../src/client/api/RestClient'

function dnsLookup (hostname: string): Promise<string> {
  return new Promise((resolve, reject) => {
    dns.lookup(hostname, 4, (err, address) => {
      if (err) return reject(err)
      resolve(address)
    })
  })
}

const DIRECTORY_HOSTNAME = 'mcdir'
const NODE_HOSTNAME = 'mcnode'
const DIRECTORY_PORT = 9000
const NODE_P2P_PORT = 9001
const NODE_API_PORT = 9002

function lookupMultiaddr (hostname: string, port: number): Promise<Multiaddr> {
  return dnsLookup(hostname).then(addr => Multiaddr(`/ip4/${addr}/tcp/${port}`))
}

function directoryMultiaddr (): Promise<Multiaddr> {
  return lookupMultiaddr(DIRECTORY_HOSTNAME, DIRECTORY_PORT)
}

function directoryPeerId (): Promise<PeerId> {
  return loadIdentity(path.join(__dirname, 'concat', 'test-identities', 'mcdir', 'identity.node'))
}

function directoryPeerInfo (): Promise<PeerInfo> {
  return Promise.all([directoryMultiaddr(), directoryPeerId()])
    .then(([maddr, peerId]) => {
      const peerInfo = new PeerInfo(peerId)
      peerInfo.multiaddr.add(maddr)
      return peerInfo
    })
}

function concatNodeMultiaddr (): Promise<Multiaddr> {
  return lookupMultiaddr(NODE_HOSTNAME, NODE_P2P_PORT)
}

function concatNodePeerId (): Promise<PeerId> {
  return loadIdentity(path.join(__dirname, 'concat', 'test-identities', 'mcnode', 'identity.node'))
}

function concatNodeClient (): Promise<RestClient> {
  return dnsLookup(NODE_HOSTNAME)
    .then(ipAddr => new RestClient({apiUrl: `http://${ipAddr}:${NODE_API_PORT}`}))
}

function setConcatNodeDirectoryInfo (): Promise<*> {
  return Promise.all([concatNodeClient(), directoryMultiaddr(), directoryPeerId()])
    .then(([client, dirAddr, dirId]) => {
      return client.setDirectoryIds(dirAddr.toString() + '/p2p/' + dirId.toB58String())
    })
}

function setConcatNodeStatus (status: NodeStatus): Promise<NodeStatus> {
  let setupPromise = Promise.resolve()
  if (status === 'public') {
    setupPromise = setConcatNodeDirectoryInfo()
  }

  return setupPromise
    .then(() => concatNodeClient())
    .then(client => client.setStatus(status))
}

function setConcatNodeInfoMessage (message: string): Promise<string> {
  return concatNodeClient()
    .then(client => client.setInfo(message))
}

function concatNodePeerInfo (): Promise<PeerInfo> {
  return Promise.all([concatNodeMultiaddr(), concatNodePeerId()])
    .then(([maddr, peerId]) => {
      const peerInfo = new PeerInfo(peerId)
      peerInfo.multiaddr.add(maddr)
      return peerInfo
    })
}

module.exports = {
  dnsLookup,
  lookupMultiaddr,
  directoryMultiaddr,
  directoryPeerId,
  directoryPeerInfo,
  concatNodeMultiaddr,
  concatNodeClient,
  setConcatNodeStatus,
  setConcatNodeInfoMessage,
  concatNodePeerId,
  concatNodePeerInfo
}


text: source "$(dirname "${BASH_SOURCE[0]:-$0}")/../../presubmit-tests.sh"


text:
  CS_DECLARE_DEFAULT_STATIC_VARIABLE_REGISTRATION
  // Needed to work around some order of initialization issues
  static void csStaticVarCleanup_local (void (*p)())
  { csStaticVarCleanup_csutil (p); }
  CS_DEFINE_STATIC_VARIABLE_REGISTRATION (csStaticVarCleanup_local);
  #define BIND_EXPORT CS_EXPORT_SYM
#else
  #define BIND_EXPORT
#endif
struct BIND_EXPORT _Bind_common_static_plugins
{
  _Bind_common_static_plugins ();
};
struct _static_use { _static_use (); };
_Bind_common_static_plugins::_Bind_common_static_plugins () {}
// Needed to pull in _cs_static_use object file
namespace { _static_use _static_use_bind; }


text:
package com.mthwate.datlib.math.vector;

import com.mthwate.datlib.math.calculator.Calculator;

/**
 * @author mthwate
 * @since 1.3
 */
public abstract class VectorNg<S extends VectorNg, T> {

	protected transient final Calculator<T> calculator;

	public VectorNg(Calculator<T> calculator) {
		this.calculator = calculator;
	}

	public abstract S add(S vector);

	public abstract S add(T n);

	public abstract S subtract(S vector);

	public abstract S subtract(T n);

	public abstract S multiply(S vector);

	public abstract S multiply(T n);

	public abstract S divide(S vector);

	public abstract S divide(T n);

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using DevExpress.XtraPivotGrid;
using EIDSS.RAM_DB.Components;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using bv.tests.common;

namespace bv.tests.AVR.UnitTests
{
    [TestClass]
    public class PivotGridFieldTests
    {
        private const string FieldName = @"sfLHC_CaseID";
        private const string FieldNameWithId = @"sfLHC_CaseID_idfLayoutSearchField_12345678";

        [TestMethod]
        public void FieldNameWithIdTest()
        {
            var field = new WinPivotGridField
                            {
                                Name = @"field" + FieldNameWithId,
                                FieldName = FieldNameWithId,
                                Caption = @"Some caption",
                                Area = PivotArea.DataArea,
                                Visible = true,
                            };

            Assert.AreEqual(FieldNameWithId, field.FieldName);
            Assert.AreEqual(@"field" + FieldNameWithId, field.Name);
            Assert.AreEqual(FieldName, field.OriginalName);
            Assert.AreEqual(12345678L, field.Id);
        }

        [TestMethod]
        public void FieldNameSimpleTest()
        {
            var field = new WinPivotGridField
                            {
                                Name = @"field" + FieldName,
                                FieldName = FieldName,
                                Caption = @"Some caption",
                                Area = PivotArea.DataArea,
                                Visible = true,
                            };

            Assert.AreEqual(FieldName, field.FieldName);
            Assert.AreEqual(@"field" + FieldName, field.Name);
            Assert.AreEqual(FieldName, field.OriginalName);
            Assert.AreEqual(-1L, field.Id);
        }

    }
}


text:
#region S# License

#endregion S# License
namespace StockSharp.Algo.Storages
{
	using System;
	using System.Collections.Generic;
	using System.IO;

	using Ecng.Common;
	using Ecng.Serialization;

	using StockSharp.BusinessEntities;
	using StockSharp.Messages;

	/// <summary>
	/// The interface, describing the storage, associated with <see cref="IMarketDataStorage"/>.
	/// </summary>
	public interface IMarketDataStorageDrive
	{
		/// <summary>
		/// The storage (database, file etc.).
		/// </summary>
		IMarketDataDrive Drive { get; }

		/// <summary>
		/// To get all the dates for which market data are recorded.
		/// </summary>
		IEnumerable<DateTime> Dates { get; }

		/// <summary>
		/// To delete cache-files, containing information on available time ranges.
		/// </summary>
		void ClearDatesCache();

		/// <summary>
		/// To remove market data on specified date from the storage.
		/// </summary>
		/// <param name="date">Date, for which all data shall be deleted.</param>
		void Delete(DateTime date);

		/// <summary>
		/// To save data in the format of StockSharp storage.
		/// </summary>
		/// <param name="date">The date, for which data shall be saved.</param>
		/// <param name="stream">Data in the format of StockSharp storage.</param>
		void SaveStream(DateTime date, Stream stream);

		/// <summary>
		/// To load data in the format of StockSharp storage.
		/// </summary>
		/// <param name="date">Date, for which data shall be loaded.</param>
		/// <returns>Data in the format of StockSharp storage. If no data exists, <see cref="Stream.Null"/> will be returned.</returns>
		Stream LoadStream(DateTime date);
	}

	/// <summary>
	/// The interface, describing the storage (database, file etc.).
	/// </summary>
	public interface IMarketDataDrive : IPersistable, IDisposable
	{
		/// <summary>
		/// Path to market data.
		/// </summary>
		string Path { get; }

		/// <summary>
		/// To get news storage.
		/// </summary>
		/// <param name="serializer">The serializer.</param>
		/// <returns>The news storage.</returns>
		IMarketDataStorage<NewsMessage> GetNewsMessageStorage(IMarketDataSerializer<NewsMessage> serializer);

		/// <summary>
		/// To get the storage for the instrument.
		/// </summary>
		/// <param name="security">Security.</param>
		/// <returns>The storage for the instrument.</returns>
		ISecurityMarketDataDrive GetSecurityDrive(Security security);

		/// <summary>
		/// Get all available instruments.
		/// </summary>
		IEnumerable<SecurityId> AvailableSecurities { get; }

		/// <summary>
		/// Get all available data types.
		/// </summary>
		/// <param name="securityId">Instrument identifier.</param>
		/// <param name="format">Format type.</param>
		/// <returns>Data types.</returns>
		IEnumerable<DataType> GetAvailableDataTypes(SecurityId securityId, StorageFormats format);

		/// <summary>
		/// To get the storage for <see cref="IMarketDataStorage"/>.
		/// </summary>
		/// <param name="securityId">Security ID.</param>
		/// <param name="dataType">Market data type.</param>
		/// <param name="arg">The parameter associated with the <paramref name="dataType" /> type. For example, <see cref="CandleMessage.Arg"/>.</param>
		/// <param name="format">Format type.</param>
		/// <returns>Storage for <see cref="IMarketDataStorage"/>.</returns>
		IMarketDataStorageDrive GetStorageDrive(SecurityId securityId, Type dataType, object arg, StorageFormats format);
	}

	/// <summary>
	/// The base implementation <see cref="IMarketDataDrive"/>.
	/// </summary>
	public abstract class BaseMarketDataDrive : Disposable, IMarketDataDrive
	{
		/// <summary>
		/// Initialize <see cref="BaseMarketDataDrive"/>.
		/// </summary>
		protected BaseMarketDataDrive()
		{
		}

		/// <summary>
		/// Path to market data.
		/// </summary>
		public abstract string Path { get; set; }

		/// <summary>
		/// To get news storage.
		/// </summary>
		/// <param name="serializer">The serializer.</param>
		/// <returns>The news storage.</returns>
		public IMarketDataStorage<NewsMessage> GetNewsMessageStorage(IMarketDataSerializer<NewsMessage> serializer)
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// To get the storage for the instrument.
		/// </summary>
		/// <param name="security">Security.</param>
		/// <returns>The storage for the instrument.</returns>
		public ISecurityMarketDataDrive GetSecurityDrive(Security security)
		{
			return new SecurityMarketDataDrive(this, security);
		}

		/// <summary>
		/// Get all available instruments.
		/// </summary>
		public abstract IEnumerable<SecurityId> AvailableSecurities { get; }

		/// <summary>
		/// Get all available data types.
		/// </summary>
		/// <param name="securityId">Instrument identifier.</param>
		/// <param name="format">Format type.</param>
		/// <returns>Data types.</returns>
		public abstract IEnumerable<DataType> GetAvailableDataTypes(SecurityId securityId, StorageFormats format);

		/// <summary>
		/// Create storage for <see cref="IMarketDataStorage"/>.
		/// </summary>
		/// <param name="securityId">Security ID.</param>
		/// <param name="dataType">Market data type.</param>
		/// <param name="arg">The parameter associated with the <paramref name="dataType" /> type. For example, <see cref="CandleMessage.Arg"/>.</param>
		/// <param name="format">Format type.</param>
		/// <returns>Storage for <see cref="IMarketDataStorage"/>.</returns>
		public abstract IMarketDataStorageDrive GetStorageDrive(SecurityId securityId, Type dataType, object arg, StorageFormats format);

		/// <summary>
		/// Load settings.
		/// </summary>
		/// <param name="storage">Settings storage.</param>
		public virtual void Load(SettingsStorage storage)
		{
			Path = storage.GetValue<string>(nameof(Path));
		}

		/// <summary>
		/// Save settings.
		/// </summary>
		/// <param name="storage">Settings storage.</param>
		public virtual void Save(SettingsStorage storage)
		{
			storage.SetValue(nameof(Path), Path);
		}

		/// <summary>
		/// Returns a string that represents the current object.
		/// </summary>
		/// <returns>A string that represents the current object.</returns>
		public override string ToString()
		{
			return Path;
		}
	}
}


text:
#import "ASScrollNode.h"

@implementation ASScrollNode

- (instancetype)init
{
  return [super initWithViewBlock:^UIView *{
    return [[UIScrollView alloc] init];
  }];
}

@end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using StackExchange.Opserver.Data;
using StackExchange.Opserver.Data.Dashboard;
using StackExchange.Opserver.Helpers;
using TeamCitySharp.DomainEntities;

namespace StackExchange.Opserver.Controllers
{
    public partial class GraphController
    {
        [OutputCache(Duration = 120, VaryByParam = "id;start;end;summary", VaryByContentEncoding = "gzip;deflate")]
        [Route("graph/cpu/json")]
        public ActionResult CPUJson(int id, long start, long end, bool? summary = false)
        {
            var node = DashboardData.GetNodeById(id);
            if (node == null) return JsonNotFound();

            return Json(new
            {
                points = node.GetCPUUtilization(start.ToDateTime(), end.ToDateTime(), 1000).Select(p => new
                    {
                        date = p.DateTime.ToEpochTime(true),
                        value = p.AvgLoad ?? 0
                    }),
                summary = summary.GetValueOrDefault(false) ? node.GetCPUUtilization(null, null, 2000).Select(p => new
                    {
                        date = p.DateTime.ToEpochTime(true),
                        value = p.AvgLoad ?? 0
                    }) : null,
                builds = !BuildStatus.HasCachePrimed ? null : GetBuilds(id, start, end).Select(b => new
                                                                {
                                                                    date = b.StartDate.ToEpochTime(true),
                                                                    text = GetFlagTooltip(b),
                                                                    link = b.WebUrl
                                                                })
            });
        }

        [OutputCache(Duration = 120, VaryByParam = "id;start;end;summary", VaryByContentEncoding = "gzip;deflate")]
        [Route("graph/memory/json")]
        public ActionResult MemoryJson(int id, long start, long end, bool? summary = false)
        {
            var node = DashboardData.GetNodeById(id);
            if (node == null) return JsonNotFound();

            return Json(new
            {
                points = node.GetMemoryUtilization(start.ToDateTime(), end.ToDateTime(), 1000).Select(p => new
                    {
                        date = p.DateTime.ToEpochTime(true),
                        value = (int)(p.AvgMemoryUsed / 1024 / 1024 ?? 0)
                    }),
                summary = summary.GetValueOrDefault(false) ? node.GetMemoryUtilization(null, null, 1000).Select(p => new
                    {
                        date = p.DateTime.ToEpochTime(true),
                        value = (int)(p.AvgMemoryUsed / 1024 / 1024 ?? 0)
                    }) : null,
                builds = !BuildStatus.HasCachePrimed ? null : GetBuilds(id, start, end).Select(b => new
                {
                    date = b.StartDate.ToEpochTime(true),
                    text = GetFlagTooltip(b),
                    link = b.WebUrl
                })
            });
        }

        [OutputCache(Duration = 120, VaryByParam = "id;start;end;summary", VaryByContentEncoding = "gzip;deflate")]
        [Route("graph/network/json")]
        public ActionResult NetworkJson(int id, long start, long end, bool? summary = false)
        {
            var ni = DashboardData.GetInterfaceById(id);
            if (ni == null) return JsonNotFound();

            var traffic = ni.GetUtilization(start.ToDateTime(), end.ToDateTime(), 1000).ToList();

            return Json(new
                {
                    maximums = new
                        {
                            main_in = traffic.Max(i => (int)i.InAvgBps.GetValueOrDefault(0)),
                            main_out = traffic.Max(i => (int)i.OutAvgBps.GetValueOrDefault(0))
                        },
                    points = traffic.Select(i => new
                        {
                            date = i.DateTime.ToEpochTime(true),
                            main_in = (int)(i.InAvgBps.GetValueOrDefault()),
                            main_out = (int)(i.OutAvgBps.GetValueOrDefault())
                        }),
                    summary = summary.GetValueOrDefault()
                                  ? ni.GetUtilization(null, null, 2000).Select(i => new
                                      {
                                          date = i.DateTime.ToEpochTime(true),
                                          main_in = (int)(i.InAvgBps.GetValueOrDefault()),
                                          main_out = (int)(i.OutAvgBps.GetValueOrDefault())
                                      })
                                  : null
                });
        }

        [OutputCache(Duration = 120, VaryByParam = "id;start;end", VaryByContentEncoding = "gzip;deflate")]
        [Route("graph/builds/json")]
        public ActionResult BuildsJson(int id, long start, long end)
        {
            return Json(new
            {
                builds = GetBuilds(id, start, end).Select(b => new
                {
                    date = b.StartDate.ToEpochTime(true),
                    text = GetFlagTooltip(b),
                    link = b.WebUrl
                })
            });
        }

        private static IEnumerable<Build> GetBuilds(int id, long startEpoch, long endEpoch)
        {
            if (!Current.Settings.TeamCity.Enabled) return Enumerable.Empty<Build>();

            // only show builds when zoomed in, say 5 days for starters?
            //TODO: Move this to a setting
            if((endEpoch - startEpoch) > TimeSpan.FromDays(30).TotalSeconds)
                return new List<Build>();

            var node = DashboardData.GetNodeById(id);
            DateTime start = startEpoch.ToDateTime(), end = endEpoch.ToDateTime();
            return BuildStatus.GetBuildsByServer(node.PrettyName).Where(b => b.StartDate >= start && b.StartDate <= end);
        }

        private static string GetFlagTooltip(Build b)
        {
            return string.Format("{0} - {1} #{2}", b.NiceProjectName(), b.NiceName(), b.Number);
        }
    }
}


text:
"""Download helper object implementations."""

from __future__ import unicode_literals

from l2tdevtools.download_helpers import github
from l2tdevtools.download_helpers import pypi
from l2tdevtools.download_helpers import sourceforge

class DownloadHelperFactory(object):
  """Factory class for download helpers."""

  @classmethod
  def NewDownloadHelper(cls, project_definition):
    """Creates a new download helper.

    Args:
      project_definition (ProjectDefinition): project definition.

    Returns:
      DownloadHelper: download helper.

    Raises:
      ValueError: if no corresponding helper could be found for the download
          URL.
    """
    download_url = project_definition.download_url

    if download_url.endswith('/'):
      download_url = download_url[:-1]

    # Unify http:// and https:// URLs for the download helper check.
    if download_url.startswith('https://'):
      download_url = 'http://{0:s}'.format(download_url[8:])

    # Remove URL arguments.
    download_url, _, _ = download_url.partition('?')

    if download_url.startswith('http://pypi.org/project/'):
      return pypi.PyPIDownloadHelper(
          download_url, source_name=project_definition.pypi_source_name)

    if (download_url.startswith('http://sourceforge.net/projects/') and
        download_url.endswith('/files')):
      return sourceforge.SourceForgeDownloadHelper(download_url)

    if (download_url.startswith('http://github.com/') and
        download_url.endswith('/releases')):
      return github.GitHubReleasesDownloadHelper(download_url)

    raise ValueError('Unsupported download URL: {0:s}.'.format(
        project_definition.download_url))


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.07.27 at 08:11:57 PM EEST
//

package uk.org.siri.siri;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for PredictabilityEnumeration.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *

 *

 * <simpleType name="PredictabilityEnumeration">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
 *     <enumeration value="planned"/>
 *     <enumeration value="unplanned"/>
 *     <enumeration value="all"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "PredictabilityEnumeration")
@XmlEnum
public enum PredictabilityEnumeration {

    @XmlEnumValue("planned")
    PLANNED("planned"),
    @XmlEnumValue("unplanned")
    UNPLANNED("unplanned"),
    @XmlEnumValue("all")
    ALL("all");
    private final String value;

    PredictabilityEnumeration(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static PredictabilityEnumeration fromValue(String v) {
        for (PredictabilityEnumeration c: PredictabilityEnumeration.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

}


text:
using System;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;

namespace Lucene
{

    /// <summary>
    /// Thrown when a particular method cannot be found.
    /// <para/>
    /// This is a Java compatibility exception, and should be thrown in
    /// Lucene.NET everywhere Lucene throws it, however catch blocks should
    /// always use the <see cref="ExceptionExtensions.IsNoSuchMethodException(Exception)"/> method.
    /// <code>
    /// catch (Exception ex) when (ex.IsNoSuchMethodException())
    /// </code>
    /// </summary>
    // LUCENENET: It is no longer good practice to use binary serialization.
    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
#if FEATURE_SERIALIZABLE_EXCEPTIONS
    [Serializable]
#endif
    internal class NoSuchMethodException : MissingMethodException
    {
        [Obsolete("Use NoSuchMethodException.Create() instead.", error: true)]
        public NoSuchMethodException()
        {
        }

        [Obsolete("Use NoSuchMethodException.Create() instead.", error: true)]
        public NoSuchMethodException(string message) : base(message)
        {
        }

        [Obsolete("Use NoSuchMethodException.Create() instead.", error: true)]
        public NoSuchMethodException(string message, Exception innerException) : base(message, innerException)
        {
        }

        [Obsolete("Use NoSuchMethodException.Create() instead.", error: true)]
        public NoSuchMethodException(Exception cause)
           : base(cause?.ToString(), cause)
        {
        }

#if FEATURE_SERIALIZABLE_EXCEPTIONS
        /// <summary>
        /// Initializes a new instance of this class with serialized data.
        /// </summary>
        /// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
        /// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
        protected NoSuchMethodException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
#endif

        // Static factory methods

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Exception Create() => new MissingMethodException();

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Exception Create(string message) => new MissingMethodException(message);

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Exception Create(string message, Exception innerException) => new MissingMethodException(message, innerException);

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Exception Create(Exception cause) => new MissingMethodException(cause.Message, cause);
    }
}


text:
package com.jd.living.screen.drawer;

import android.os.Bundle;
import android.preference.PreferenceScreen;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;

import com.jd.living.R;
import com.jd.living.screen.history.HistoryList_;
import com.jd.living.screen.search.Favorites_;
import com.jd.living.screen.search.SearchMain;
import com.jd.living.screen.search.SearchMain_;
import com.jd.living.screen.settings.PreferenceFragment.OnPreferenceAttachedListener;
import com.jd.living.screen.settings.SettingsPreferenceFragment_;
import com.jd.living.database.DatabaseHelper;
import com.jd.living.model.Listing;

import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity;

import java.util.List;

@EActivity
public class MainActivity extends ActionBarActivity implements NavigationFragment.DrawerMenuListener,
        OnPreferenceAttachedListener, DatabaseHelper.SearchDatabaseListener {

    @Bean
    DatabaseHelper database;

    protected NavigationFragment navigationFragment;
    private Fragment currentFragment;

    private static int currentPosition = 1;
    private CharSequence mTitle = "";

    private static boolean searchStarted = false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (savedInstanceState != null) {
            // Restore value of members from saved state
            currentPosition = savedInstanceState.getInt("current");
        } else if (searchStarted) {
            currentPosition = 1;
        }

        setContentView(R.layout.activity_main);
        setupNavigationDrawer();

        navigationFragment.onUpdate(currentPosition);
    }

    @Override
    protected void onResume() {
        super.onResume();
        database.addDatabaseListener(this);
    }

    @Override
    protected void onPause() {
        super.onPause();
        database.removeDatabaseListener(this);
    }

    @Override
    public void onPreferenceAttached(PreferenceScreen root, int xmlId) {

    }

    @Override
    public void onSaveInstanceState(Bundle savedInstanceState) {
        super.onSaveInstanceState(savedInstanceState);
        savedInstanceState.putInt("current", currentPosition);
    }

    @Override
    public void onBackPressed() {
        getSupportActionBar().setTitle(mTitle);
        super.onBackPressed();
    }

    @Override
    public void onUpdate(List<Listing> result) {
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                if (currentPosition == 1 && currentFragment != null && currentFragment instanceof SearchMain) {
                    ((SearchMain) currentFragment).resetTabs();
                } else if (currentPosition == 2 && searchStarted) {
                    currentPosition = 1;
                    navigationFragment.onUpdate(currentPosition);
                }

                searchStarted = false;
            }
        });
    }

    protected void setupNavigationDrawer() {

        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        if (toolbar != null) {
            setSupportActionBar(toolbar);

            navigationFragment = (NavigationFragment) getSupportFragmentManager()
                    .findFragmentById(R.id.navigation_fragment);

            navigationFragment.setUp(
                    R.id.navigation_fragment,
                    (DrawerLayout) findViewById(R.id.drawer_layout),
                    toolbar);

        }
    }

    @Override
    public void onMenuItemClicked(int pos, DrawerMenuAdapter.DrawerMenuItem item) {
        Fragment fragment = null;
        switch (pos) {
            case 1:
                fragment = new SearchMain_();
                break;
            case 2:
                fragment = new HistoryList_();
                break;
            case 3:
                fragment = new Favorites_();
                break;
            case 4:
                fragment = new SettingsPreferenceFragment_();
            default:
                break;
        }

        currentPosition = pos;
        updateFragment(fragment, item);
    }

    protected void updateFragment(Fragment fragment, DrawerMenuAdapter.DrawerMenuItem item) {

        if (fragment != null) {
            currentFragment = fragment;

            FragmentManager fragmentManager = getSupportFragmentManager();
            if (!isFinishing()) {
                fragmentManager.beginTransaction()
                        .replace(R.id.content_frame, fragment)
                        .commitAllowingStateLoss();
            } else {
                fragmentManager.beginTransaction()
                        .replace(R.id.content_frame, fragment)
                        .commit();
            }

        }
        mTitle = item.getLabel();
        setTitle(item.getLabel());
    }

    @Override
    public void onSearchStarted() {
        Log.d("", "onSearchStarted");
        searchStarted = true;
    }

    @Override
    public void onFavoriteUpdated() {

    }
}


text:
@interface PodsDummy_SwiftyTraverson : NSObject
@end
@implementation PodsDummy_SwiftyTraverson
@end


text:
package jenkins.model.lazy;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;

import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.listeners.RunListener;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.SleepBuilder;

public class LazyBuildMixInTest {

    @Rule public JenkinsRule r = new JenkinsRule();

    @Issue("JENKINS-22395")
    @Test public void dropLinksAfterGC() throws Exception {
        RunListener.all().clear();  // see commit message for the discussion

        FreeStyleProject p = r.createFreeStyleProject();
        FreeStyleBuild b1 = r.buildAndAssertSuccess(p);
        FreeStyleBuild b2 = r.buildAndAssertSuccess(p);
        FreeStyleBuild b3 = r.buildAndAssertSuccess(p);
        assertEquals(b2, b1.getNextBuild());
        assertEquals(b3, b2.getNextBuild());
        assertNull(b3.getNextBuild());
        assertNull(b1.getPreviousBuild());
        assertEquals(b1, b2.getPreviousBuild());
        assertEquals(b2, b3.getPreviousBuild());
        b1.getRunMixIn().createReference().clear();
        b2.delete();
        FreeStyleBuild b1a = b2.getPreviousBuild();
        assertNotSame(b1, b1a);
        assertEquals(1, b1a.getNumber());
        assertEquals(b3, b1a.getNextBuild());
    }

    @Issue("JENKINS-22395")
    @Test public void dropLinksAfterGC2() throws Exception {
        RunListener.all().clear();  // see commit message for the discussion

        FreeStyleProject p = r.createFreeStyleProject();
        FreeStyleBuild b1 = r.buildAndAssertSuccess(p);
        FreeStyleBuild b2 = r.buildAndAssertSuccess(p);
        FreeStyleBuild b3 = r.buildAndAssertSuccess(p);
        assertEquals(b2, b1.getNextBuild());
        assertEquals(b3, b2.getNextBuild());
        assertNull(b3.getNextBuild());
        assertNull(b1.getPreviousBuild());
        assertEquals(b1, b2.getPreviousBuild());
        assertEquals(b2, b3.getPreviousBuild());
        b2.delete();
        b1.getRunMixIn().createReference().clear();
        FreeStyleBuild b1a = b2.getPreviousBuild();
        assertNotSame(b1, b1a);
        assertEquals(1, b1a.getNumber());
        assertEquals(b3, b1a.getNextBuild());
    }

    @Issue("JENKINS-20662")
    @Test public void newRunningBuildRelationFromPrevious() throws Exception {
        FreeStyleProject p = r.createFreeStyleProject();
        p.getBuildersList().add(new SleepBuilder(1000));
        FreeStyleBuild b1 = r.buildAndAssertSuccess(p);
        assertNull(b1.getNextBuild());
        FreeStyleBuild b2 = p.scheduleBuild2(0).waitForStart();
        assertSame(b2, b1.getNextBuild());
        r.assertBuildStatusSuccess(r.waitForCompletion(b2));
    }
}


text:
package com.citrix.sharefile.api.models;

import java.io.InputStream;
import java.util.ArrayList;
import java.net.URI;
import java.util.Date;
import java.util.Map;
import java.util.HashMap;

import com.google.gson.annotations.SerializedName;
import com.citrix.sharefile.api.*;
import com.citrix.sharefile.api.enumerations.*;
import com.citrix.sharefile.api.models.*;

public class SFAccountUser extends SFUser {

	@SerializedName("IsAdministrator")
	private Boolean IsAdministrator;
	@SerializedName("CanCreateFolders")
	private Boolean CanCreateFolders;
	@SerializedName("CanUseFileBox")
	private Boolean CanUseFileBox;
	@SerializedName("CanManageUsers")
	private Boolean CanManageUsers;
	@SerializedName("IsVirtualClient")
	private Boolean IsVirtualClient;
	@SerializedName("DiskSpace")
	private Integer DiskSpace;
	@SerializedName("Bandwidth")
	private Integer Bandwidth;
	@SerializedName("StorageQuotaLimitGB")
	private Integer StorageQuotaLimitGB;
	@SerializedName("StorageQuotaPercent")
	private Integer StorageQuotaPercent;
	@SerializedName("EnableHardLimit")
	private Boolean EnableHardLimit;
	@SerializedName("Policies")
	private ArrayList<SFUserPolicy> Policies;

	public Boolean getIsAdministrator() {
		return this.IsAdministrator;
	}

	public void setIsAdministrator(Boolean isadministrator) {
		this.IsAdministrator = isadministrator;
	}
	public Boolean getCanCreateFolders() {
		return this.CanCreateFolders;
	}

	public void setCanCreateFolders(Boolean cancreatefolders) {
		this.CanCreateFolders = cancreatefolders;
	}
	public Boolean getCanUseFileBox() {
		return this.CanUseFileBox;
	}

	public void setCanUseFileBox(Boolean canusefilebox) {
		this.CanUseFileBox = canusefilebox;
	}
	public Boolean getCanManageUsers() {
		return this.CanManageUsers;
	}

	public void setCanManageUsers(Boolean canmanageusers) {
		this.CanManageUsers = canmanageusers;
	}
	public Boolean getIsVirtualClient() {
		return this.IsVirtualClient;
	}

	public void setIsVirtualClient(Boolean isvirtualclient) {
		this.IsVirtualClient = isvirtualclient;
	}
	public Integer getDiskSpace() {
		return this.DiskSpace;
	}

	public void setDiskSpace(Integer diskspace) {
		this.DiskSpace = diskspace;
	}
	public Integer getBandwidth() {
		return this.Bandwidth;
	}

	public void setBandwidth(Integer bandwidth) {
		this.Bandwidth = bandwidth;
	}
	public Integer getStorageQuotaLimitGB() {
		return this.StorageQuotaLimitGB;
	}

	public void setStorageQuotaLimitGB(Integer storagequotalimitgb) {
		this.StorageQuotaLimitGB = storagequotalimitgb;
	}
	public Integer getStorageQuotaPercent() {
		return this.StorageQuotaPercent;
	}

	public void setStorageQuotaPercent(Integer storagequotapercent) {
		this.StorageQuotaPercent = storagequotapercent;
	}
	public Boolean getEnableHardLimit() {
		return this.EnableHardLimit;
	}

	public void setEnableHardLimit(Boolean enablehardlimit) {
		this.EnableHardLimit = enablehardlimit;
	}
	public ArrayList<SFUserPolicy> getPolicies() {
		return this.Policies;
	}

	public void setPolicies(ArrayList<SFUserPolicy> policies) {
		this.Policies = policies;
	}

}


text:
{{if s3.debug:}}
 {{s3.scripts.append("/%s/static/scripts/jquery.dataTables.js" % appname)}}
 {{s3.scripts.append("/%s/static/scripts/jquery.dataTables.fnSetFilteringDelay.js" % appname)}}
 {{s3.scripts.append("/%s/static/scripts/jquery.dataTables.sortFunctions.js" % appname)}}
 {{s3.scripts.append("/%s/static/scripts/S3/s3.dataTables.js" % appname)}}
{{else:}}{{s3.scripts.append("/%s/static/scripts/S3/s3.dataTables.min.js" % appname)}}{{pass}}
<script type="text/javascript">
i18n.all='{{=T("All")}}'
S3.dataTables=new Array()
{{if s3.dataTableID:}}S3.dataTables.id=[{{idlist=[s3.dataTableID] if not isinstance (s3.dataTableID, (tuple, list)) else s3.dataTableID
 for id in idlist:}}'{{=XML(id)}}',{{pass}}
 ]
{{pass}}
{{if s3.actions:}}
 S3.dataTables.Actions={{=XML(s3.actions)}}
 {{if "_jqclick" in s3.actions[-1]:}}
 function S3ActionCallBack(event){
  id=this.id
  {{=XML(s3.actions[-1]["_jqclick"])}}
  event.stopPropagation()
  return false}
 {{pass}}
{{pass}}
{{if response.aadata is not None:}}
 S3.dataTables.oCache={
  iCacheLower:{{=s3.start}},
  iCacheUpper:{{=s3.limit}},
  lastJson:{{=XML(response.aadata)}}
 }
{{pass}}
</script>
{{if s3.dataTableMap:}}{{=XML(s3.dataTableMap)}}{{pass}}


text:
import renewAuth from './renewAuth.js';

export default handleAuthError;

function handleAuthError(retryCallback, rejectCallback) {
  return err => {
    // TODO: should I give up at some point?
    const isInvalidCredentials = (err.status === 401) &&
      err.result && (
        // Google drive returns one error message
        (err.result.error.status === 'UNAUTHENTICATED') ||
        // while google sheets another
        (err.result.error.message === 'Invalid Credentials')
      );

    if (isInvalidCredentials) {
      return renewAuth().then(retryCallback).catch(rejectCallback);
    }

    rejectCallback(err);
  };
}


text:
 .. Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

 ..   http://www.apache.org/licenses/LICENSE-2.0

 .. Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

Installation
------------

.. contents:: :local:

.. toctree::
    :maxdepth: 1
    :caption: Installation
    :hidden:

    Prerequisites <prerequisites>
    Dependencies <dependencies>
    Supported versions <supported-versions>
    Installing from sources <installing-from-sources>
    Installing from PyPI <installing-from-pypi>
    Setting up the database <setting-up-the-database>

This page describes installations options that you might use when considering how to install Airflow.
Airflow consists of many components, often distributed among many physical or virtual machines, therefore
installation of Airflow might be quite complex, depending on the options you choose.

You should also check-out the :doc:`Prerequisites <prerequisites>` that must be fulfilled when installing Airflow
as well as  :doc:`Supported versions <supported-versions>` to know what are the policies for supporting
Airflow, Python and Kubernetes.

Airflow requires additional :doc:`Dependencies <dependencies>` to be installed - which can be done
via extras and providers.

When you install Airflow, you need to :doc:`setup the database <setting-up-the-database>` which must
also be kept updated when Airflow is upgraded.

.. warning::

  As of June 2021 Airflow 1.10 is end-of-life and is not going to receive any fixes even critical
  security fixes. Follow the :doc:`/upgrading-from-1-10/index` to learn
  how to upgrade the end-of-life 1.10 to Airflow 2.

Using released sources
''''''''''''''''''''''

More details: :doc:`installing-from-sources`

**When this option works best**

* This option is best if you expect to build all your software from sources.
* Apache Airflow is one of the projects that belong to the `Apache Software Foundation <https://www.apache.org/>`__ .
  It is a requirement for all ASF projects that they can be installed using official sources released via `Official Apache Mirrors <http://ws.apache.org/mirrors.cgi/>`__ .
* This is the best choice if you have a strong need to `verify the integrity and provenance of the software <https://www.apache.org/dyn/closer.cgi#verify>`__

**Intended users**

* Users who are familiar with installing and building software from sources and are conscious about integrity and provenance
  of the software they use down to the lowest level possible.

**What are you expected to handle**

* You are expected to build and install airflow and its components on your own.
* You should develop and handle the deployment for all components of Airflow.
* You are responsible for setting up database, creating and managing database schema with ``airflow db`` commands,
  automated startup and recovery, maintenance, cleanup and upgrades of Airflow and the Airflow Providers.

**What Apache Airflow Community provides for that method**

* You have `instructions <https://github.com/apache/airflow/blob/main/INSTALL>`__ on how to build the software but due to various environments
  and tools you might want to use, you might expect that there will be problems which are specific to your deployment and environment
  you will have to diagnose and solve.

**Where to ask for help**

* The ``#development`` slack channel for building the software.

* The ``#troubleshooting`` slack is a channel for quick general troubleshooting questions. The
  `GitHub discussions <https://github.com/apache/airflow/discussions>`__ if you look for longer discussion and have more information to share.

* If you can provide description of a reproducible problem with Airflow software, you can open issue at `GitHub issues <https://github.com/apache/airflow/issues>`_

Using PyPI
'''''''''''

More details:  :doc:`/installation/installing-from-pypi`

**When this option works best**

* This installation method is useful when you are not familiar with Containers and Docker and want to install
  Apache Airflow on physical or virtual machines and you are used to installing and running software using custom
  deployment mechanism.

* The only officially supported mechanism of installation is via ``pip`` using constraint mechanisms. The constraint
  files are managed by Apache Airflow release managers to make sure that you can repeatably install Airflow from PyPI with all Providers and
  required dependencies.

* In case of PyPI installation you could also verify integrity and provenance of the packages of the packages
  downloaded from PyPI as described at the installation page, but software you download from PyPI is pre-built
  for you so that you can install it without building, and you do not build the software from sources.

**Intended users**

* Users who are familiar with installing and configuring Python applications, managing Python environments,
  dependencies and running software with their custom deployment mechanisms.

**What are you expected to handle**

* You are expected to install Airflow - all components of it - on your own.
* You should develop and handle the deployment for all components of Airflow.
* You are responsible for setting up database, creating and managing database schema with ``airflow db`` commands,
  automated startup and recovery, maintenance, cleanup and upgrades of Airflow and Airflow Providers.

**What Apache Airflow Community provides for that method**

* You have :doc:`/installation/installing-from-pypi`
  on how to install the software but due to various environments and tools you might want to use, you might
  expect that there will be problems which are specific to your deployment and environment you will have to
  diagnose and solve.
* You have :doc:`/start/local` where you can see an example of Quick Start with running Airflow
  locally which you can use to start Airflow quickly for local testing and development.
  However this is just an inspiration. Do not expect this docker-compose is ready for production installation,
  you need to build your own production-ready deployment in this approach.

**Where to ask for help**

* The ``#troubleshooting`` channel on Airflow Slack for quick general
  troubleshooting questions. The `GitHub discussions <https://github.com/apache/airflow/discussions>`__
  if you look for longer discussion and have more information to share.
* If you can provide description of a reproducible problem with Airflow software, you can open
  issue at `GitHub issues <https://github.com/apache/airflow/issues>`__

Using Production Docker Images
''''''''''''''''''''''''''''''

More details: :doc:`docker-stack:index`

**When this option works best**

This installation method is useful when you are familiar with Container/Docker stack. It provides a capability of
running Airflow components in isolation from other software running on the same physical or virtual machines with easy
maintenance of dependencies.

The images are build by Apache Airflow release managers and they use officially released packages from PyPI
and official constraint files- same that are used for installing Airflow from PyPI.

**Intended users**

* Users who are familiar with Containers and Docker stack and understand how to build their own container images.
* Users who understand how to install providers and dependencies from PyPI with constraints if they want to extend or customize the image.
* Users who know how to create deployments using Docker by linking together multiple docker containers and maintaining such deployments.

**What are you expected to handle**

* You are expected to be able to customize or extend Container/Docker images if you want to
  add extra dependencies. You are expected to put together a deployment built of several containers
  (for example using docker-compose) and to make sure that they are linked together.
* You are responsible for setting up database, creating and managing database schema with ``airflow db`` commands,
  automated startup and recovery, maintenance, cleanup and upgrades of Airflow and the Airflow Providers.
* You are responsible to manage your own customizations and extensions for your custom dependencies.
  With the Official Airflow Docker Images, upgrades of Airflow and Airflow Providers which
  are part of the reference image are handled by the community - you need to make sure to pick up
  those changes when released by upgrading the base image. However you are responsible in creating a
  pipeline of building your own custom images with your own added dependencies and Providers and need to
  repeat the customization step and building your own image when new version of Airflow image is released.
* You should choose the right deployment mechanism. There a number of available options of
  deployments of containers. You can use your own custom mechanism, custom Kubernetes deployments,
  custom Docker Compose, custom Helm charts etc., and you should choose it based on your experience
  and expectations.

**What Apache Airflow Community provides for that method**

* You have instructions: :doc:`docker-stack:build` on how to build and customize your image.
* You have :doc:`/start/docker` where you can see an example of Quick Start which
  you can use to start Airflow quickly for local testing and development. However this is just an inspiration.
  Do not expect to use this ``docker-compose.yml`` file for production installation, you need to get familiar
  with Docker Compose and its capabilities and build your own production-ready deployment with it if
  you choose Docker Compose for your deployment.
* The Docker Image is managed by the same people who build Airflow, and they are committed to keep
  it updated whenever new features and capabilities of Airflow are released.

**Where to ask for help**

* For quick questions with the Official Docker Image there is the ``#production-docker-image`` channel in Airflow Slack.
* The ``#troubleshooting`` channel on Airflow Slack for quick general
  troubleshooting questions. The `GitHub discussions <https://github.com/apache/airflow/discussions>`__
  if you look for longer discussion and have more information to share.
* If you can provide description of a reproducible problem with Airflow software, you can open
  issue at `GitHub issues <https://github.com/apache/airflow/issues>`__

Using Official Airflow Helm Chart
'''''''''''''''''''''''''''''''''

More details: :doc:`helm-chart:index`

**When this option works best**

* This installation method is useful when you are not only familiar with Container/Docker stack but also when you
  use Kubernetes and want to install and maintain Airflow using the community-managed Kubernetes installation
  mechanism via Helm chart.
* It provides not only a capability of running Airflow components in isolation from other software
  running on the same physical or virtual machines and managing dependencies, but also it provides capabilities of
  easier maintaining, configuring and upgrading Airflow in the way that is standardized and will be maintained
  by the community.
* The Chart uses the Official Airflow Production Docker Images to run Airflow.

**Intended users**

* Users who are familiar with Containers and Docker stack and understand how to build their own container images.
* Users who understand how to install providers and dependencies from PyPI with constraints if they want to extend or customize the image.
* Users who manage their infrastructure using Kubernetes and manage their applications on Kubernetes using Helm Charts.

**What are you expected to handle**

* You are expected to be able to customize or extend Container/Docker images if you want to
  add extra dependencies. You are expected to put together a deployment built of several containers
  (for example using Docker Compose) and to make sure that they are linked together.
* You are responsible for setting up database.
* The Helm Chart manages your database schema, automates startup, recovery and restarts of the
  components of the application and linking them together, so you do not have to worry about that.
* You are responsible to manage your own customizations and extensions for your custom dependencies.
  With the Official Airflow Docker Images, upgrades of Airflow and Airflow Providers which
  are part of the reference image are handled by the community - you need to make sure to pick up
  those changes when released by upgrading the base image. However you are responsible in creating a
  pipeline of building your own custom images with your own added dependencies and Providers and need to
  repeat the customization step and building your own image when new version of Airflow image is released.

**What Apache Airflow Community provides for that method**

* You have instructions: :doc:`docker-stack:build` on how to build and customize your image.
* You have :doc:`helm-chart:index` - full documentation on how to configure and install the Helm Chart.
* The Helm Chart is managed by the same people who build Airflow, and they are committed to keep
  it updated whenever new features and capabilities of Airflow are released.

**Where to ask for help**

* For quick questions with the Official Docker Image there is the ``#production-docker-image`` channel in Airflow Slack.
* For quick questions with the official Helm Chart there is the ``#helm-chart-official`` channel in Slack.
* The ``#troubleshooting`` channel on Airflow Slack for quick general
  troubleshooting questions. The `GitHub discussions <https://github.com/apache/airflow/discussions>`__
  if you look for longer discussion and have more information to share.
* If you can provide description of a reproducible problem with Airflow software, you can open
  issue at `GitHub issues <https://github.com/apache/airflow/issues>`__

Using Managed Airflow Services
''''''''''''''''''''''''''''''

Follow the  `Ecosystem <https://airflow.apache.org/ecosystem/>`__ page to find all Managed Services for Airflow.

**When this option works best**

* When you prefer to have someone else manage Airflow installation for you, there are Managed Airflow Services
  that you can use.

**Intended users**

* Users who prefer to get Airflow managed for them and want to pay for it.

**What are you expected to handle**

* The Managed Services usually provide everything you need to run Airflow. Please refer to documentation of
  the Managed Services for details.

**What Apache Airflow Community provides for that method**

* Airflow Community does not provide any specific documentation for managed services.
  Please refer to the documentation of the Managed Services for details.

**Where to ask for help**

* Your first choice should be support that is provided by the Managed services. There are a few
  channels in the Apache Airflow Slack that are dedicated to different groups of users and if you have
  come to conclusion the question is more related to Airflow than the managed service,
  you can use those channels.

Using 3rd-party images, charts, deployments
'''''''''''''''''''''''''''''''''''''''''''

Follow the  `Ecosystem <https://airflow.apache.org/ecosystem/>`__ page to find all 3rd-party deployment options.

**When this option works best**

* Those installation methods are useful in case none of the official methods mentioned before work for you,
  or you have historically used those. It is recommended though that whenever you consider any change,
  you should consider switching to one of the methods that are officially supported by the Apache Airflow
  Community or Managed Services.

**Intended users**

* Users who historically used other installation methods or find the official methods not sufficient for other reasons.

**What are you expected to handle**

* Depends on what the 3rd-party provides. Look at the documentation of the 3rd-party.

**What Apache Airflow Community provides for that method**

* Airflow Community does not provide any specific documentation for 3rd-party methods.
  Please refer to the documentation of the Managed Services for details.

**Where to ask for help**

* Depends on what the 3rd-party provides. Look at the documentation of the 3rd-party deployment you use.


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

// ReSharper disable UnusedMember.Local

namespace Net5Tester.Tests.Helper.Core
{
    [UnitTest]
    public sealed class TestEnumEx
    {
        class MyEnum : EnumEx
        {
            public static readonly MyEnum X1 = new MyEnum();
            public static readonly MyEnum X2 = new MyEnum();
            public static readonly MyEnum X3 = new MyEnum();
            public static readonly MyEnumDerived X4 = new MyEnumDerived();

            [NotAnEnumInstance]
            public static readonly MyEnum Xclude = new MyEnum();

            static readonly MyEnum XPrivate = new MyEnum();
            public static IEnumerable<MyEnum> All => AllInstances<MyEnum>();
        }

        class MyEnumDerived : MyEnum { }

        [UnitTest]
        public void Test()
        {
            var all = MyEnum.All.ToArray();
            Tracer.Assert(all.Length == 4);

            Tracer.Assert(MyEnum.X4.Tag == "X4");
            Tracer.Assert(new MyEnum().Tag == null);
            Tracer.Assert(MyEnum.X1.Tag == "X1");
        }
    }
}


text:
#pragma once
#include <aws/sdb/SimpleDB_EXPORTS.h>
#include <aws/sdb/SimpleDBRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/sdb/model/UpdateCondition.h>
#include <aws/sdb/model/DeletableAttribute.h>

namespace Aws
{
namespace SimpleDB
{
namespace Model
{

  /*
  */
  class AWS_SIMPLEDB_API DeleteAttributesRequest : public SimpleDBRequest
  {
  public:
    DeleteAttributesRequest();
    Aws::String SerializePayload() const override;

    /*
     The name of the domain in which to perform the operation.
    */
    inline const Aws::String& GetDomainName() const{ return m_domainName; }

    /*
     The name of the domain in which to perform the operation.
    */
    inline void SetDomainName(const Aws::String& value) { m_domainNameHasBeenSet = true; m_domainName = value; }

    /*
     The name of the domain in which to perform the operation.
    */
    inline void SetDomainName(Aws::String&& value) { m_domainNameHasBeenSet = true; m_domainName = value; }

    /*
     The name of the domain in which to perform the operation.
    */
    inline void SetDomainName(const char* value) { m_domainNameHasBeenSet = true; m_domainName.assign(value); }

    /*
     The name of the domain in which to perform the operation.
    */
    inline DeleteAttributesRequest& WithDomainName(const Aws::String& value) { SetDomainName(value); return *this;}

    /*
     The name of the domain in which to perform the operation.
    */
    inline DeleteAttributesRequest& WithDomainName(Aws::String&& value) { SetDomainName(value); return *this;}

    /*
     The name of the domain in which to perform the operation.
    */
    inline DeleteAttributesRequest& WithDomainName(const char* value) { SetDomainName(value); return *this;}

    /*
     The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
    */
    inline const Aws::String& GetItemName() const{ return m_itemName; }

    /*
     The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
    */
    inline void SetItemName(const Aws::String& value) { m_itemNameHasBeenSet = true; m_itemName = value; }

    /*
     The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
    */
    inline void SetItemName(Aws::String&& value) { m_itemNameHasBeenSet = true; m_itemName = value; }

    /*
     The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
    */
    inline void SetItemName(const char* value) { m_itemNameHasBeenSet = true; m_itemName.assign(value); }

    /*
     The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
    */
    inline DeleteAttributesRequest& WithItemName(const Aws::String& value) { SetItemName(value); return *this;}

    /*
     The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
    */
    inline DeleteAttributesRequest& WithItemName(Aws::String&& value) { SetItemName(value); return *this;}

    /*
     The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
    */
    inline DeleteAttributesRequest& WithItemName(const char* value) { SetItemName(value); return *this;}

    /*
     A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
    */
    inline const Aws::Vector<DeletableAttribute>& GetAttributes() const{ return m_attributes; }

    /*
     A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
    */
    inline void SetAttributes(const Aws::Vector<DeletableAttribute>& value) { m_attributesHasBeenSet = true; m_attributes = value; }

    /*
     A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
    */
    inline void SetAttributes(Aws::Vector<DeletableAttribute>&& value) { m_attributesHasBeenSet = true; m_attributes = value; }

    /*
     A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
    */
    inline DeleteAttributesRequest& WithAttributes(const Aws::Vector<DeletableAttribute>& value) { SetAttributes(value); return *this;}

    /*
     A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
    */
    inline DeleteAttributesRequest& WithAttributes(Aws::Vector<DeletableAttribute>&& value) { SetAttributes(value); return *this;}

    /*
     A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
    */
    inline DeleteAttributesRequest& AddAttributes(const DeletableAttribute& value) { m_attributesHasBeenSet = true; m_attributes.push_back(value); return *this; }

    /*
     A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
    */
    inline DeleteAttributesRequest& AddAttributes(DeletableAttribute&& value) { m_attributesHasBeenSet = true; m_attributes.push_back(value); return *this; }

    /*
     The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.
    */
    inline const UpdateCondition& GetExpected() const{ return m_expected; }

    /*
     The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.
    */
    inline void SetExpected(const UpdateCondition& value) { m_expectedHasBeenSet = true; m_expected = value; }

    /*
     The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.
    */
    inline void SetExpected(UpdateCondition&& value) { m_expectedHasBeenSet = true; m_expected = value; }

    /*
     The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.
    */
    inline DeleteAttributesRequest& WithExpected(const UpdateCondition& value) { SetExpected(value); return *this;}

    /*
     The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.
    */
    inline DeleteAttributesRequest& WithExpected(UpdateCondition&& value) { SetExpected(value); return *this;}

  private:
    Aws::String m_domainName;
    bool m_domainNameHasBeenSet;
    Aws::String m_itemName;
    bool m_itemNameHasBeenSet;
    Aws::Vector<DeletableAttribute> m_attributes;
    bool m_attributesHasBeenSet;
    UpdateCondition m_expected;
    bool m_expectedHasBeenSet;
  };

} // namespace Model
} // namespace SimpleDB
} // namespace Aws


text:
define([
  'jquery',
  'lodash',
  'backbone',
  'text!templates/header/menu.html'
], function($, _, Backbone, headerMenuTemplate){
  var HeaderMenuView = Backbone.View.extend({
    el: '.main-menu-container',
    initialize: function () {
    },
    render: function () {
      $(this.el).html(headerMenuTemplate);
      $('a[href="' + window.location.hash + '"]').addClass('active');
    },
    events: {
      'click a': 'highlightMenuItem'
    },
    highlightMenuItem: function (ev) {
      $('.active').removeClass('active');
      $(ev.currentTarget).addClass('active');
    }
  });

  return HeaderMenuView;
});