text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/apps/script/type/script_manifest.proto

namespace Google\Apps\Script\Type;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Add-on configuration that is shared across all add-on host applications.
 *
 * Generated from protobuf message google.apps.script.type.CommonAddOnManifest
 */
class CommonAddOnManifest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The display name of the add-on.
     *
     * Generated from protobuf field string name = 1;
     */
    protected $name = '';
    /**
     * Required. The URL for the logo image shown in the add-on toolbar.
     *
     * Generated from protobuf field string logo_url = 2;
     */
    protected $logo_url = '';
    /**
     * Common layout properties for the add-on cards.
     *
     * Generated from protobuf field .google.apps.script.type.LayoutProperties layout_properties = 3;
     */
    protected $layout_properties = null;
    /**
     * The widgets used in the add-on. If this field is not specified,
     * it indicates that default set is used.
     *
     * Generated from protobuf field .google.apps.script.type.AddOnWidgetSet add_on_widget_set = 4;
     */
    protected $add_on_widget_set = null;
    /**
     * Whether to pass locale information from host app.
     *
     * Generated from protobuf field bool use_locale_from_app = 5;
     */
    protected $use_locale_from_app = false;
    /**
     * Defines an endpoint that will be executed in any context, in
     * any host. Any cards generated by this function will always be available to
     * the user, but may be eclipsed by contextual content when this add-on
     * declares more targeted triggers.
     *
     * Generated from protobuf field .google.apps.script.type.HomepageExtensionPoint homepage_trigger = 6;
     */
    protected $homepage_trigger = null;
    /**
     * Defines a list of extension points in the universal action menu which
     * serves as a setting menu for the add-on. The extension point can be
     * link URL to open or an endpoint to execute as a form
     * submission.
     *
     * Generated from protobuf field repeated .google.apps.script.type.UniversalActionExtensionPoint universal_actions = 7;
     */
    private $universal_actions;
    /**
     * An OpenLink action
     * can only use a URL with an HTTPS, MAILTO or TEL scheme.  For HTTPS links,
     * the URL must also
     * [match](/gmail/add-ons/concepts/manifests#whitelisting_urls) one of the
     * prefixes specified in this whitelist. If the prefix omits the scheme, HTTPS
     * is assumed.  Notice that HTTP links are automatically rewritten to HTTPS
     * links.
     *
     * Generated from protobuf field .google.protobuf.ListValue open_link_url_prefixes = 8;
     */
    protected $open_link_url_prefixes = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The display name of the add-on.
     *     @type string $logo_url
     *           Required. The URL for the logo image shown in the add-on toolbar.
     *     @type \Google\Apps\Script\Type\LayoutProperties $layout_properties
     *           Common layout properties for the add-on cards.
     *     @type \Google\Apps\Script\Type\AddOnWidgetSet $add_on_widget_set
     *           The widgets used in the add-on. If this field is not specified,
     *           it indicates that default set is used.
     *     @type bool $use_locale_from_app
     *           Whether to pass locale information from host app.
     *     @type \Google\Apps\Script\Type\HomepageExtensionPoint $homepage_trigger
     *           Defines an endpoint that will be executed in any context, in
     *           any host. Any cards generated by this function will always be available to
     *           the user, but may be eclipsed by contextual content when this add-on
     *           declares more targeted triggers.
     *     @type array<\Google\Apps\Script\Type\UniversalActionExtensionPoint>|\Google\Protobuf\Internal\RepeatedField $universal_actions
     *           Defines a list of extension points in the universal action menu which
     *           serves as a setting menu for the add-on. The extension point can be
     *           link URL to open or an endpoint to execute as a form
     *           submission.
     *     @type \Google\Protobuf\ListValue $open_link_url_prefixes
     *           An OpenLink action
     *           can only use a URL with an HTTPS, MAILTO or TEL scheme.  For HTTPS links,
     *           the URL must also
     *           [match](/gmail/add-ons/concepts/manifests#whitelisting_urls) one of the
     *           prefixes specified in this whitelist. If the prefix omits the scheme, HTTPS
     *           is assumed.  Notice that HTTP links are automatically rewritten to HTTPS
     *           links.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Apps\Script\Type\ScriptManifest::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The display name of the add-on.
     *
     * Generated from protobuf field string name = 1;
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The display name of the add-on.
     *
     * Generated from protobuf field string name = 1;
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The URL for the logo image shown in the add-on toolbar.
     *
     * Generated from protobuf field string logo_url = 2;
     * @return string
     */
    public function getLogoUrl()
    {
        return $this->logo_url;
    }

    /**
     * Required. The URL for the logo image shown in the add-on toolbar.
     *
     * Generated from protobuf field string logo_url = 2;
     * @param string $var
     * @return $this
     */
    public function setLogoUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->logo_url = $var;

        return $this;
    }

    /**
     * Common layout properties for the add-on cards.
     *
     * Generated from protobuf field .google.apps.script.type.LayoutProperties layout_properties = 3;
     * @return \Google\Apps\Script\Type\LayoutProperties|null
     */
    public function getLayoutProperties()
    {
        return $this->layout_properties;
    }

    public function hasLayoutProperties()
    {
        return isset($this->layout_properties);
    }

    public function clearLayoutProperties()
    {
        unset($this->layout_properties);
    }

    /**
     * Common layout properties for the add-on cards.
     *
     * Generated from protobuf field .google.apps.script.type.LayoutProperties layout_properties = 3;
     * @param \Google\Apps\Script\Type\LayoutProperties $var
     * @return $this
     */
    public function setLayoutProperties($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Script\Type\LayoutProperties::class);
        $this->layout_properties = $var;

        return $this;
    }

    /**
     * The widgets used in the add-on. If this field is not specified,
     * it indicates that default set is used.
     *
     * Generated from protobuf field .google.apps.script.type.AddOnWidgetSet add_on_widget_set = 4;
     * @return \Google\Apps\Script\Type\AddOnWidgetSet|null
     */
    public function getAddOnWidgetSet()
    {
        return $this->add_on_widget_set;
    }

    public function hasAddOnWidgetSet()
    {
        return isset($this->add_on_widget_set);
    }

    public function clearAddOnWidgetSet()
    {
        unset($this->add_on_widget_set);
    }

    /**
     * The widgets used in the add-on. If this field is not specified,
     * it indicates that default set is used.
     *
     * Generated from protobuf field .google.apps.script.type.AddOnWidgetSet add_on_widget_set = 4;
     * @param \Google\Apps\Script\Type\AddOnWidgetSet $var
     * @return $this
     */
    public function setAddOnWidgetSet($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Script\Type\AddOnWidgetSet::class);
        $this->add_on_widget_set = $var;

        return $this;
    }

    /**
     * Whether to pass locale information from host app.
     *
     * Generated from protobuf field bool use_locale_from_app = 5;
     * @return bool
     */
    public function getUseLocaleFromApp()
    {
        return $this->use_locale_from_app;
    }

    /**
     * Whether to pass locale information from host app.
     *
     * Generated from protobuf field bool use_locale_from_app = 5;
     * @param bool $var
     * @return $this
     */
    public function setUseLocaleFromApp($var)
    {
        GPBUtil::checkBool($var);
        $this->use_locale_from_app = $var;

        return $this;
    }

    /**
     * Defines an endpoint that will be executed in any context, in
     * any host. Any cards generated by this function will always be available to
     * the user, but may be eclipsed by contextual content when this add-on
     * declares more targeted triggers.
     *
     * Generated from protobuf field .google.apps.script.type.HomepageExtensionPoint homepage_trigger = 6;
     * @return \Google\Apps\Script\Type\HomepageExtensionPoint|null
     */
    public function getHomepageTrigger()
    {
        return $this->homepage_trigger;
    }

    public function hasHomepageTrigger()
    {
        return isset($this->homepage_trigger);
    }

    public function clearHomepageTrigger()
    {
        unset($this->homepage_trigger);
    }

    /**
     * Defines an endpoint that will be executed in any context, in
     * any host. Any cards generated by this function will always be available to
     * the user, but may be eclipsed by contextual content when this add-on
     * declares more targeted triggers.
     *
     * Generated from protobuf field .google.apps.script.type.HomepageExtensionPoint homepage_trigger = 6;
     * @param \Google\Apps\Script\Type\HomepageExtensionPoint $var
     * @return $this
     */
    public function setHomepageTrigger($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Script\Type\HomepageExtensionPoint::class);
        $this->homepage_trigger = $var;

        return $this;
    }

    /**
     * Defines a list of extension points in the universal action menu which
     * serves as a setting menu for the add-on. The extension point can be
     * link URL to open or an endpoint to execute as a form
     * submission.
     *
     * Generated from protobuf field repeated .google.apps.script.type.UniversalActionExtensionPoint universal_actions = 7;
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getUniversalActions()
    {
        return $this->universal_actions;
    }

    /**
     * Defines a list of extension points in the universal action menu which
     * serves as a setting menu for the add-on. The extension point can be
     * link URL to open or an endpoint to execute as a form
     * submission.
     *
     * Generated from protobuf field repeated .google.apps.script.type.UniversalActionExtensionPoint universal_actions = 7;
     * @param array<\Google\Apps\Script\Type\UniversalActionExtensionPoint>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setUniversalActions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Script\Type\UniversalActionExtensionPoint::class);
        $this->universal_actions = $arr;

        return $this;
    }

    /**
     * An OpenLink action
     * can only use a URL with an HTTPS, MAILTO or TEL scheme.  For HTTPS links,
     * the URL must also
     * [match](/gmail/add-ons/concepts/manifests#whitelisting_urls) one of the
     * prefixes specified in this whitelist. If the prefix omits the scheme, HTTPS
     * is assumed.  Notice that HTTP links are automatically rewritten to HTTPS
     * links.
     *
     * Generated from protobuf field .google.protobuf.ListValue open_link_url_prefixes = 8;
     * @return \Google\Protobuf\ListValue|null
     */
    public function getOpenLinkUrlPrefixes()
    {
        return $this->open_link_url_prefixes;
    }

    public function hasOpenLinkUrlPrefixes()
    {
        return isset($this->open_link_url_prefixes);
    }

    public function clearOpenLinkUrlPrefixes()
    {
        unset($this->open_link_url_prefixes);
    }

    /**
     * An OpenLink action
     * can only use a URL with an HTTPS, MAILTO or TEL scheme.  For HTTPS links,
     * the URL must also
     * [match](/gmail/add-ons/concepts/manifests#whitelisting_urls) one of the
     * prefixes specified in this whitelist. If the prefix omits the scheme, HTTPS
     * is assumed.  Notice that HTTP links are automatically rewritten to HTTPS
     * links.
     *
     * Generated from protobuf field .google.protobuf.ListValue open_link_url_prefixes = 8;
     * @param \Google\Protobuf\ListValue $var
     * @return $this
     */
    public function setOpenLinkUrlPrefixes($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\ListValue::class);
        $this->open_link_url_prefixes = $var;

        return $this;
    }

}


text:
package org.danann.cernunnos.core;

import org.danann.cernunnos.EntityConfig;
import org.danann.cernunnos.Formula;
import org.danann.cernunnos.Phrase;
import org.danann.cernunnos.Reagent;
import org.danann.cernunnos.ReagentType;
import org.danann.cernunnos.SimpleFormula;
import org.danann.cernunnos.SimpleReagent;
import org.danann.cernunnos.TaskRequest;
import org.danann.cernunnos.TaskResponse;

@Deprecated
public final class ParseIntegerPhrase implements Phrase {

	// Instance Members.
	private Phrase expression;

	/*
	 * Public API.
	 */

	public static final Reagent EXPRESSION = new SimpleReagent("EXPRESSION", "descendant-or-self::text()",
								ReagentType.PHRASE, String.class, "String expression representing an Integer.");

	public Formula getFormula() {
		Reagent[] reagents = new Reagent[] {EXPRESSION};
		return new SimpleFormula(getClass(), reagents);
	}

	public void init(EntityConfig config) {

		// Instance Members.
		this.expression = (Phrase) config.getValue(EXPRESSION);

	}

	public Object evaluate(TaskRequest req, TaskResponse res) {

		Integer rslt = null;	// default...

		String s = (String) expression.evaluate(req, res);
		if (s != null && s.trim().length() > 0) {
			rslt = Integer.valueOf(s);
		}

		return rslt;

	}

}

redpajama_set_name: RedPajamaGithub


text:
<configuration>
    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log.file.management.server}</file>

        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!-- daily rollover -->
            <fileNamePattern>${log.rotation.management.server}</fileNamePattern>

            <!-- keep 30 days' worth of history capped at 10GB total size -->
            <maxHistory>30</maxHistory>
            <totalSizeCap>10GB</totalSizeCap>
        </rollingPolicy>

        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p [%c{3}]%X{logcontextid}%X{ctx}%X{job}%X{workid} %m%n</pattern>
        </encoder>
    </appender>

    <appender name="API" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log.file.management.server.api}</file>

        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!-- daily rollover -->
            <fileNamePattern>${log.rotation.management.server.api}</fileNamePattern>

            <!-- keep 30 days' worth of history capped at 10GB total size -->
            <maxHistory>30</maxHistory>
            <totalSizeCap>10GB</totalSizeCap>
        </rollingPolicy>

        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p [%c{3}]%X{logcontextid}%X{ctx}%X{job}%X{workid} %m%n</pattern>
        </encoder>
    </appender>

    <appender name="APIAGENT" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log.file.management.server.apiagent}</file>

        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!-- daily rollover -->
            <fileNamePattern>${log.rotation.management.server.apiagent}</fileNamePattern>

            <!-- keep 30 days' worth of history capped at 10GB total size -->
            <maxHistory>30</maxHistory>
            <totalSizeCap>10GB</totalSizeCap>
        </rollingPolicy>

        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p [%c{3}]%X{logcontextid}%X{ctx}%X{job}%X{workid} %m%n</pattern>
        </encoder>
    </appender>

    <include resource="logback-custom.xml" />
    <!-- Include your custom logback configuration in /etc/cosmic/management/logback-custom.xml -->

    <logger name="com.cloud.utils.db.GenericDaoBase" level="WARN" />
    <logger name="com.cloud.spring" level="WARN" />

    <logger name="org.springframework" level="WARN" />

    <logger name="org.hibernate" level="WARN" />

    <logger name="org.flywaydb" level="WARN" />

    <logger name="com.cloud.api.ApiServlet" level="DEBUG" additivity="false">
        <appender-ref ref="API" />
    </logger>
    <logger name="com.cloud.api.ApiServer" level="DEBUG" additivity="false">
        <appender-ref ref="API" />
    </logger>

    <logger name="com.cloud.agent.manager.DirectAgentAttache" level="DEBUG" additivity="false">
        <appender-ref ref="APIAGENT" />
    </logger>
    <logger name="com.cloud.common.transport.Request" level="DEBUG" additivity="false">
        <appender-ref ref="APIAGENT" />
    </logger>

    <root level="debug">
        <appender-ref ref="FILE" />
    </root>

</configuration>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Deuteromycotina de Cuba (La Habana), Hyphomycetes 3: 11 (1985)

#### Original name
Corynespora camagueyensis R.F. Castañeda

### Remarks
null


text:
package com.nealxyc.dryunit.parameter.impl;

import java.util.LinkedList;
import java.util.List;

import com.nealxyc.dryunit.parameter.ParamRef;

public class ResolverState {

	protected List<ParamRef> refStack = new LinkedList<ParamRef>() ;
}


text:
greetings = { a: 'hi' }
informal_greeting = greetings[:a]
informal_greeting << ' there'

puts informal_greeting  #  => "hi there"
puts greetings #=> { a: 'hi there' }


text:
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/polymerfire/firebase-auth.html">
<link rel="import" href="../../bower_components/paper-button/paper-button.html">
<link rel="import" href="../../bower_components/paper-material/paper-material.html">
<link rel="import" href="../../bower_components/iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="../../web-components/project-nice-footer-element/project-nice-footer-element.html">
<link rel="import" href="../../web-components/project-nice-user/project-nice-user-behavior.html">

<link rel="import" href="login-page-style.html">

<dom-module id="login-page">
  <template>

    <firebase-auth id="auth" user="{{user}}" on-error="_catchError"></firebase-auth>

        <paper-material style="padding: 20px; padding-bottom: 40px;">

          <paper-button class="login-button" raised id="google" on-tap="login">Login via Google</paper-button>

        </paper-material>

    <project-nice-footer-element></project-nice-footer-element>
  </template>

</dom-module>


text:
package org.guneriu.richdocumentcatalog.config;

import javax.annotation.Resource;

import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.data.solr.core.SolrOperations;
import org.springframework.data.solr.core.SolrTemplate;
import org.springframework.data.solr.repository.config.EnableSolrRepositories;

@Configuration
@EnableSolrRepositories(basePackages = { "org.guneriu.richdocumentcatalog.model.book" }, multicoreSupport = true)
public class SearchContext {

	private static final String PROPERTY_NAME_SOLR_SERVER_URL = "solr.host";

	@Resource
	private Environment environment;

	@Bean
	public SolrServer solrServer() {
		return new HttpSolrServer(environment.getRequiredProperty(PROPERTY_NAME_SOLR_SERVER_URL));

	}

	@Bean
	public SolrOperations solrTemplate() {
		return new SolrTemplate(solrServer());
	}

}


text:
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;

namespace AlarmSystem
{
    internal static class Program
    {
        [DllImport("user32.dll")]
        private static extern bool SetProcessDPIAware();

        /// <summary>
        ///     应用程序的主入口点。
        /// </summary>
        [STAThread]
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            SetProcessDPIAware();

            Application.Run(new FrmAlarm());
        }
    }
}


text:
[![Watch The Screencast](https://goin5minutes.com/img/watch-screencast.svg)](https://goin5minutes.com/screencast/episode_12_concurrency_eating_tapas/)

Go in 5 Minutes, episode 12.

This screencast overviews the "Eating Tapas" problem on [Trivial Concurrency Exercises for the Confused Newbie Gopher](http://whipperstacker.com/2015/10/05/3-trivial-concurrency-exercises-for-the-confused-newbie-gopher/), and provides a solution.

We're continuing the concurrency series - see [github.com/arschles/go-in-5-minutes/issues/14](https://github.com/arschles/go-in-5-minutes/issues/14) for progress.

Screencast video: [goin5minutes.com/screencast/episode_12_concurrency_eating_tapas/](https://goin5minutes.com/screencast/episode_12_concurrency_eating_tapas/)

## Outline

1. This problem
   1. Shared state
   2. Don't communicate by sharing memory, share memory by communicating. See https://golang.org/ref/mem
   3. Sidenote: actor model
2. Example code


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.mediadriver.osgi</groupId>
	<artifactId>blueprint-test</artifactId>
	<version>1.0.3-SNAPSHOT</version>

	<name>MD :: OSGi :: Blueprint Test Framework</name>
	<description>A library for setting up OSGi blueprint testing without the full OSGi runtime. All parts based on the work from Apache Camel Test Blueprint.</description>

	<organization>
		<name>Media Driver, LLC</name>
		<url>http://www.mediadriver.com</url>
	</organization>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Matt Pavlovich</name>
			<email>matt@mediadriver.com</email>
			<url>http://mediadriver.com</url>
			<organization>Media Driver</organization>
			<organizationUrl>http://mediadriver.com/</organizationUrl>
		</developer>
	</developers>

	<issueManagement>
		<url>https://github.com/mattrpav/blueprint-test/issues</url>
	</issueManagement>

	<scm>
		<connection>scm:git:https://github.com/mattrpav/blueprint-test.git</connection>
		<developerConnection>scm:git:https://github.com/mattrpav/blueprint-test.git</developerConnection>
		<url>https://github.com/mattrpav/blueprint-test.git</url>
	</scm>

	<properties>
		<aries.proxy.api.version>1.0.1</aries.proxy.api.version>
		<aries.proxy.impl.version>1.0.4</aries.proxy.impl.version>
		<aries.blueprint.api.version>1.0.1</aries.blueprint.api.version>
		<aries.blueprint.core.version>1.4.4</aries.blueprint.core.version>
		<aries.blueprint.cm.version>1.0.6</aries.blueprint.cm.version>
		<aries.util.version>1.1.1</aries.util.version>
		<felix.configadmin.version>1.8.8</felix.configadmin.version>
		<felix.connect.version>0.1.0</felix.connect.version>
		<felix.fileinstall.version>3.5.2</felix.fileinstall.version>
		<pax.swissbox.tinybundles.version>1.3.2</pax.swissbox.tinybundles.version>
		<commons.logging.version>1.2</commons.logging.version>
		<junit.version>4.11</junit.version>
		<slf4j.version>1.7.21</slf4j.version>
		<jaxb.version>2.2.11</jaxb.version>
		<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
		<maven-jar-plugin.version>3.0.0</maven-jar-plugin.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.apache.aries.proxy</groupId>
			<artifactId>org.apache.aries.proxy.api</artifactId>
			<version>${aries.proxy.api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.aries.proxy</groupId>
			<artifactId>org.apache.aries.proxy.impl</artifactId>
			<version>${aries.proxy.impl.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.aries.blueprint</groupId>
			<artifactId>org.apache.aries.blueprint.api</artifactId>
			<version>${aries.blueprint.api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.aries.blueprint</groupId>
			<artifactId>org.apache.aries.blueprint.core</artifactId>
			<version>${aries.blueprint.core.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.aries.blueprint</groupId>
			<artifactId>org.apache.aries.blueprint.cm</artifactId>
			<version>${aries.blueprint.cm.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.aries</groupId>
			<artifactId>org.apache.aries.util</artifactId>
			<version>${aries.util.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.felix</groupId>
			<artifactId>org.apache.felix.connect</artifactId>
			<version>${felix.connect.version}</version>
			<exclusions>
				<exclusion>
					<artifactId>org.osgi.core</artifactId>
					<groupId>org.osgi</groupId>
				</exclusion>
				<exclusion>
					<artifactId>org.osgi.compendium</artifactId>
					<groupId>org.osgi</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.ops4j.pax.swissbox</groupId>
			<artifactId>pax-swissbox-tinybundles</artifactId>
			<version>${pax.swissbox.tinybundles.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>${commons.logging.version}</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.felix</groupId>
			<artifactId>org.apache.felix.configadmin</artifactId>
			<version>${felix.configadmin.version}</version>
			<exclusions>
				<exclusion>
					<artifactId>org.osgi.foundation</artifactId>
					<groupId>org.apache.felix</groupId>
				</exclusion>
				<exclusion>
					<artifactId>org.osgi.core</artifactId>
					<groupId>org.apache.felix</groupId>
				</exclusion>
				<exclusion>
					<artifactId>org.osgi.compendium</artifactId>
					<groupId>org.apache.felix</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.felix</groupId>
			<artifactId>org.apache.felix.fileinstall</artifactId>
			<version>${felix.fileinstall.version}</version>
			<exclusions>
				<exclusion>
					<artifactId>org.osgi.foundation</artifactId>
					<groupId>org.apache.felix</groupId>
				</exclusion>
				<exclusion>
					<artifactId>org.osgi.core</artifactId>
					<groupId>org.apache.felix</groupId>
				</exclusion>
				<exclusion>
					<artifactId>org.osgi.compendium</artifactId>
					<groupId>org.apache.felix</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>${slf4j.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>${slf4j.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-core</artifactId>
			<version>${jaxb.version}</version>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<version>${jaxb.version}</version>
			<exclusions>
				<exclusion>
					<artifactId>jsr181-api</artifactId>
					<groupId>javax.jws</groupId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>${maven-jar-plugin.version}</version>
				<configuration>
					<archive>
						<index>true</index>
						<manifest>
							<addClasspath>true</addClasspath>
						</manifest>
						<manifestEntries>
							<Built-By>mattrpav</Built-By>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>


text:
namespace toy {

/// This is a simple recursive parser for the Toy language. It produces a well
/// formed AST from a stream of Token supplied by the Lexer. No semantic checks
/// or symbol resolution is performed. For example, variables are referenced by
/// string and the code could reference an undeclared variable and the parsing
/// succeeds.
class Parser {
public:
  /// Create a Parser for the supplied lexer.
  Parser(Lexer &lexer) : lexer(lexer) {}

  /// Parse a full Module. A module is a list of function definitions.
  std::unique_ptr<ModuleAST> parseModule() {
    lexer.getNextToken(); // prime the lexer

    // Parse functions one at a time and accumulate in this vector.
    std::vector<FunctionAST> functions;
    while (auto f = parseDefinition()) {
      functions.push_back(std::move(*f));
      if (lexer.getCurToken() == tok_eof)
        break;
    }
    // If we didn't reach EOF, there was an error during parsing
    if (lexer.getCurToken() != tok_eof)
      return parseError<ModuleAST>("nothing", "at end of module");

    return std::make_unique<ModuleAST>(std::move(functions));
  }

private:
  Lexer &lexer;

  /// Parse a return statement.
  /// return :== return ; | return expr ;
  std::unique_ptr<ReturnExprAST> parseReturn() {
    auto loc = lexer.getLastLocation();
    lexer.consume(tok_return);

    // return takes an optional argument
    llvm::Optional<std::unique_ptr<ExprAST>> expr;
    if (lexer.getCurToken() != ';') {
      expr = parseExpression();
      if (!expr)
        return nullptr;
    }
    return std::make_unique<ReturnExprAST>(std::move(loc), std::move(expr));
  }

  /// Parse a literal number.
  /// numberexpr ::= number
  std::unique_ptr<ExprAST> parseNumberExpr() {
    auto loc = lexer.getLastLocation();
    auto result =
        std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue());
    lexer.consume(tok_number);
    return std::move(result);
  }

  /// Parse a literal array expression.
  /// tensorLiteral ::= [ literalList ] | number
  /// literalList ::= tensorLiteral | tensorLiteral, literalList
  std::unique_ptr<ExprAST> parseTensorLiteralExpr() {
    auto loc = lexer.getLastLocation();
    lexer.consume(Token('['));

    // Hold the list of values at this nesting level.
    std::vector<std::unique_ptr<ExprAST>> values;
    // Hold the dimensions for all the nesting inside this level.
    std::vector<int64_t> dims;
    do {
      // We can have either another nested array or a number literal.
      if (lexer.getCurToken() == '[') {
        values.push_back(parseTensorLiteralExpr());
        if (!values.back())
          return nullptr; // parse error in the nested array.
      } else {
        if (lexer.getCurToken() != tok_number)
          return parseError<ExprAST>("<num> or [", "in literal expression");
        values.push_back(parseNumberExpr());
      }

      // End of this list on ']'
      if (lexer.getCurToken() == ']')
        break;

      // Elements are separated by a comma.
      if (lexer.getCurToken() != ',')
        return parseError<ExprAST>("] or ,", "in literal expression");

      lexer.getNextToken(); // eat ,
    } while (true);
    if (values.empty())
      return parseError<ExprAST>("<something>", "to fill literal expression");
    lexer.getNextToken(); // eat ]

    /// Fill in the dimensions now. First the current nesting level:
    dims.push_back(values.size());

    /// If there is any nested array, process all of them and ensure that
    /// dimensions are uniform.
    if (llvm::any_of(values, [](std::unique_ptr<ExprAST> &expr) {
          return llvm::isa<LiteralExprAST>(expr.get());
        })) {
      auto *firstLiteral = llvm::dyn_cast<LiteralExprAST>(values.front().get());
      if (!firstLiteral)
        return parseError<ExprAST>("uniform well-nested dimensions",
                                   "inside literal expression");

      // Append the nested dimensions to the current level
      auto firstDims = firstLiteral->getDims();
      dims.insert(dims.end(), firstDims.begin(), firstDims.end());

      // Sanity check that shape is uniform across all elements of the list.
      for (auto &expr : values) {
        auto *exprLiteral = llvm::cast<LiteralExprAST>(expr.get());
        if (!exprLiteral)
          return parseError<ExprAST>("uniform well-nested dimensions",
                                     "inside literal expression");
        if (exprLiteral->getDims() != firstDims)
          return parseError<ExprAST>("uniform well-nested dimensions",
                                     "inside literal expression");
      }
    }
    return std::make_unique<LiteralExprAST>(std::move(loc), std::move(values),
                                            std::move(dims));
  }

  /// parenexpr ::= '(' expression ')'
  std::unique_ptr<ExprAST> parseParenExpr() {
    lexer.getNextToken(); // eat (.
    auto v = parseExpression();
    if (!v)
      return nullptr;

    if (lexer.getCurToken() != ')')
      return parseError<ExprAST>(")", "to close expression with parentheses");
    lexer.consume(Token(')'));
    return v;
  }

  /// identifierexpr
  ///   ::= identifier
  ///   ::= identifier '(' expression ')'
  std::unique_ptr<ExprAST> parseIdentifierExpr() {
    std::string name(lexer.getId());

    auto loc = lexer.getLastLocation();
    lexer.getNextToken(); // eat identifier.

    if (lexer.getCurToken() != '(') // Simple variable ref.
      return std::make_unique<VariableExprAST>(std::move(loc), name);

    // This is a function call.
    lexer.consume(Token('('));
    std::vector<std::unique_ptr<ExprAST>> args;
    if (lexer.getCurToken() != ')') {
      while (true) {
        if (auto arg = parseExpression())
          args.push_back(std::move(arg));
        else
          return nullptr;

        if (lexer.getCurToken() == ')')
          break;

        if (lexer.getCurToken() != ',')
          return parseError<ExprAST>(", or )", "in argument list");
        lexer.getNextToken();
      }
    }
    lexer.consume(Token(')'));

    // It can be a builtin call to print
    if (name == "print") {
      if (args.size() != 1)
        return parseError<ExprAST>("<single arg>", "as argument to print()");

      return std::make_unique<PrintExprAST>(std::move(loc), std::move(args[0]));
    }

    // Call to a user-defined function
    return std::make_unique<CallExprAST>(std::move(loc), name, std::move(args));
  }

  /// primary
  ///   ::= identifierexpr
  ///   ::= numberexpr
  ///   ::= parenexpr
  ///   ::= tensorliteral
  std::unique_ptr<ExprAST> parsePrimary() {
    switch (lexer.getCurToken()) {
    default:
      llvm::errs() << "unknown token '" << lexer.getCurToken()
                   << "' when expecting an expression\n";
      return nullptr;
    case tok_identifier:
      return parseIdentifierExpr();
    case tok_number:
      return parseNumberExpr();
    case '(':
      return parseParenExpr();
    case '[':
      return parseTensorLiteralExpr();
    case ';':
      return nullptr;
    case '}':
      return nullptr;
    }
  }

  /// Recursively parse the right hand side of a binary expression, the ExprPrec
  /// argument indicates the precedence of the current binary operator.
  ///
  /// binoprhs ::= ('+' primary)*
  std::unique_ptr<ExprAST> parseBinOpRHS(int exprPrec,
                                         std::unique_ptr<ExprAST> lhs) {
    // If this is a binop, find its precedence.
    while (true) {
      int tokPrec = getTokPrecedence();

      // If this is a binop that binds at least as tightly as the current binop,
      // consume it, otherwise we are done.
      if (tokPrec < exprPrec)
        return lhs;

      // Okay, we know this is a binop.
      int binOp = lexer.getCurToken();
      lexer.consume(Token(binOp));
      auto loc = lexer.getLastLocation();

      // Parse the primary expression after the binary operator.
      auto rhs = parsePrimary();
      if (!rhs)
        return parseError<ExprAST>("expression", "to complete binary operator");

      // If BinOp binds less tightly with rhs than the operator after rhs, let
      // the pending operator take rhs as its lhs.
      int nextPrec = getTokPrecedence();
      if (tokPrec < nextPrec) {
        rhs = parseBinOpRHS(tokPrec + 1, std::move(rhs));
        if (!rhs)
          return nullptr;
      }

      // Merge lhs/RHS.
      lhs = std::make_unique<BinaryExprAST>(std::move(loc), binOp,
                                            std::move(lhs), std::move(rhs));
    }
  }

  /// expression::= primary binop rhs
  std::unique_ptr<ExprAST> parseExpression() {
    auto lhs = parsePrimary();
    if (!lhs)
      return nullptr;

    return parseBinOpRHS(0, std::move(lhs));
  }

  /// type ::= < shape_list >
  /// shape_list ::= num | num , shape_list
  std::unique_ptr<VarType> parseType() {
    if (lexer.getCurToken() != '<')
      return parseError<VarType>("<", "to begin type");
    lexer.getNextToken(); // eat <

    auto type = std::make_unique<VarType>();

    while (lexer.getCurToken() == tok_number) {
      type->shape.push_back(lexer.getValue());
      lexer.getNextToken();
      if (lexer.getCurToken() == ',')
        lexer.getNextToken();
    }

    if (lexer.getCurToken() != '>')
      return parseError<VarType>(">", "to end type");
    lexer.getNextToken(); // eat >
    return type;
  }

  /// Parse a variable declaration, it starts with a `var` keyword followed by
  /// and identifier and an optional type (shape specification) before the
  /// initializer.
  /// decl ::= var identifier [ type ] = expr
  std::unique_ptr<VarDeclExprAST> parseDeclaration() {
    if (lexer.getCurToken() != tok_var)
      return parseError<VarDeclExprAST>("var", "to begin declaration");
    auto loc = lexer.getLastLocation();
    lexer.getNextToken(); // eat var

    if (lexer.getCurToken() != tok_identifier)
      return parseError<VarDeclExprAST>("identified",
                                        "after 'var' declaration");
    std::string id(lexer.getId());
    lexer.getNextToken(); // eat id

    std::unique_ptr<VarType> type; // Type is optional, it can be inferred
    if (lexer.getCurToken() == '<') {
      type = parseType();
      if (!type)
        return nullptr;
    }

    if (!type)
      type = std::make_unique<VarType>();
    lexer.consume(Token('='));
    auto expr = parseExpression();
    return std::make_unique<VarDeclExprAST>(std::move(loc), std::move(id),
                                            std::move(*type), std::move(expr));
  }

  /// Parse a block: a list of expression separated by semicolons and wrapped in
  /// curly braces.
  ///
  /// block ::= { expression_list }
  /// expression_list ::= block_expr ; expression_list
  /// block_expr ::= decl | "return" | expr
  std::unique_ptr<ExprASTList> parseBlock() {
    if (lexer.getCurToken() != '{')
      return parseError<ExprASTList>("{", "to begin block");
    lexer.consume(Token('{'));

    auto exprList = std::make_unique<ExprASTList>();

    // Ignore empty expressions: swallow sequences of semicolons.
    while (lexer.getCurToken() == ';')
      lexer.consume(Token(';'));

    while (lexer.getCurToken() != '}' && lexer.getCurToken() != tok_eof) {
      if (lexer.getCurToken() == tok_var) {
        // Variable declaration
        auto varDecl = parseDeclaration();
        if (!varDecl)
          return nullptr;
        exprList->push_back(std::move(varDecl));
      } else if (lexer.getCurToken() == tok_return) {
        // Return statement
        auto ret = parseReturn();
        if (!ret)
          return nullptr;
        exprList->push_back(std::move(ret));
      } else {
        // General expression
        auto expr = parseExpression();
        if (!expr)
          return nullptr;
        exprList->push_back(std::move(expr));
      }
      // Ensure that elements are separated by a semicolon.
      if (lexer.getCurToken() != ';')
        return parseError<ExprASTList>(";", "after expression");

      // Ignore empty expressions: swallow sequences of semicolons.
      while (lexer.getCurToken() == ';')
        lexer.consume(Token(';'));
    }

    if (lexer.getCurToken() != '}')
      return parseError<ExprASTList>("}", "to close block");

    lexer.consume(Token('}'));
    return exprList;
  }

  /// prototype ::= def id '(' decl_list ')'
  /// decl_list ::= identifier | identifier, decl_list
  std::unique_ptr<PrototypeAST> parsePrototype() {
    auto loc = lexer.getLastLocation();

    if (lexer.getCurToken() != tok_def)
      return parseError<PrototypeAST>("def", "in prototype");
    lexer.consume(tok_def);

    if (lexer.getCurToken() != tok_identifier)
      return parseError<PrototypeAST>("function name", "in prototype");

    std::string fnName(lexer.getId());
    lexer.consume(tok_identifier);

    if (lexer.getCurToken() != '(')
      return parseError<PrototypeAST>("(", "in prototype");
    lexer.consume(Token('('));

    std::vector<std::unique_ptr<VariableExprAST>> args;
    if (lexer.getCurToken() != ')') {
      do {
        std::string name(lexer.getId());
        auto loc = lexer.getLastLocation();
        lexer.consume(tok_identifier);
        auto decl = std::make_unique<VariableExprAST>(std::move(loc), name);
        args.push_back(std::move(decl));
        if (lexer.getCurToken() != ',')
          break;
        lexer.consume(Token(','));
        if (lexer.getCurToken() != tok_identifier)
          return parseError<PrototypeAST>(
              "identifier", "after ',' in function parameter list");
      } while (true);
    }
    if (lexer.getCurToken() != ')')
      return parseError<PrototypeAST>(")", "to end function prototype");

    // success.
    lexer.consume(Token(')'));
    return std::make_unique<PrototypeAST>(std::move(loc), fnName,
                                          std::move(args));
  }

  /// Parse a function definition, we expect a prototype initiated with the
  /// `def` keyword, followed by a block containing a list of expressions.
  ///
  /// definition ::= prototype block
  std::unique_ptr<FunctionAST> parseDefinition() {
    auto proto = parsePrototype();
    if (!proto)
      return nullptr;

    if (auto block = parseBlock())
      return std::make_unique<FunctionAST>(std::move(proto), std::move(block));
    return nullptr;
  }

  /// Get the precedence of the pending binary operator token.
  int getTokPrecedence() {
    if (!isascii(lexer.getCurToken()))
      return -1;

    // 1 is lowest precedence.
    switch (static_cast<char>(lexer.getCurToken())) {
    case '-':
      return 20;
    case '+':
      return 20;
    case '*':
      return 40;
    default:
      return -1;
    }
  }

  /// Helper function to signal errors while parsing, it takes an argument
  /// indicating the expected token and another argument giving more context.
  /// Location is retrieved from the lexer to enrich the error message.
  template <typename R, typename T, typename U = const char *>
  std::unique_ptr<R> parseError(T &&expected, U &&context = "") {
    auto curToken = lexer.getCurToken();
    llvm::errs() << "Parse error (" << lexer.getLastLocation().line << ", "
                 << lexer.getLastLocation().col << "): expected '" << expected
                 << "' " << context << " but has Token " << curToken;
    if (isprint(curToken))
      llvm::errs() << " '" << (char)curToken << "'";
    llvm::errs() << "\n";
    return nullptr;
  }
};

} // namespace toy

#endif // MLIR_TUTORIAL_TOY_PARSER_H


text:
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency_code** | **string** | Currency code of the localized value | [optional]
**exchange_rate** | **float** | Exchange rate used to localize | [optional]
**localized** | **float** | Value localized to the customer | [optional]
**localized_formatted** | **string** | Value localized and formatted for the customer | [optional]
**value** | **float** | Value in base currency | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
// Copyright (c) 2017 James Skimming. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

namespace Abioc.Composition.Compositions
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Abioc.Generation;

    /// <summary>
    /// A composition to produce code for a singleton value.
    /// </summary>
    internal class SingletonComposition : IComposition
    {
        private static readonly string NewLine = Environment.NewLine;

        /// <summary>
        /// Initializes a new instance of the <see cref="SingletonComposition"/> class.
        /// </summary>
        /// <param name="inner">The <see cref="Inner"/> <see cref="IComposition"/>.</param>
        public SingletonComposition(IComposition inner)
        {
            if (inner == null)
                throw new ArgumentNullException(nameof(inner));

            Inner = inner;
        }

        /// <summary>
        /// Gets the <see cref="Inner"/> <see cref="IComposition"/>.
        /// </summary>
        public IComposition Inner { get; }

        /// <summary>
        /// Gets the type provided by the <see cref="Inner"/> <see cref="IComposition"/>.
        /// </summary>
        public Type Type => Inner.Type;

        /// <inheritdoc />
        public string GetInstanceExpression(IGenerationContext context)
        {
            if (context == null)
                throw new ArgumentNullException(nameof(context));

            string fieldName = GetLazyFieldName();
            string instanceExpression = fieldName + ".Value";
            return instanceExpression;
        }

        /// <inheritdoc />
        public string GetComposeMethodName(IGenerationContext context)
        {
            if (context == null)
                throw new ArgumentNullException(nameof(context));

            string methodName = "Singleton" + Type.ToCompileMethodName(context.UsingSimpleNames);
            return methodName;
        }

        /// <inheritdoc />
        public IEnumerable<string> GetMethods(IGenerationContext context)
        {
            if (context == null)
                throw new ArgumentNullException(nameof(context));

            IEnumerable<string> innerMethods = Inner.GetMethods(context);
            foreach (string innerMethod in innerMethods)
            {
                yield return innerMethod;
            }

            string methodName = GetComposeMethodName(context);
            string signature = $"private {Type.ToCompileName()} {methodName}()";

            string instanceExpression = GetInstanceExpression(context);
            instanceExpression = CodeGen.Indent(instanceExpression);

            string method =
                string.Format("{0}{2}{{{2}    return {1};{2}}}", signature, instanceExpression, NewLine);
            yield return method;
        }

        /// <inheritdoc />
        public IEnumerable<string> GetFields(IGenerationContext context)
        {
            if (context == null)
                throw new ArgumentNullException(nameof(context));

            IEnumerable<string> innerfields = Inner.GetFields(context);
            foreach (string innerfield in innerfields)
            {
                yield return innerfield;
            }

            string field = $"private readonly System.Lazy<{Type.ToCompileName()}> {GetLazyFieldName()};";
            yield return field;
        }

        /// <inheritdoc />
        public IEnumerable<(string snippet, object value)> GetFieldInitializations(IGenerationContext context)
        {
            if (context == null)
                throw new ArgumentNullException(nameof(context));

            return Inner.GetFieldInitializations(context);
        }

        /// <inheritdoc />
        public IEnumerable<string> GetAdditionalInitializations(IGenerationContext context)
        {
            if (context == null)
                throw new ArgumentNullException(nameof(context));

            IEnumerable<string> innerInitializations = Inner.GetAdditionalInitializations(context);
            foreach (string innerInitialization in innerInitializations)
            {
                yield return innerInitialization;
            }

            string fieldName = GetLazyFieldName();
            string lazyType = $"System.Lazy<{Type.ToCompileName()}>";

            if (Inner.RequiresConstructionContext(context))
            {
                string contextVar = $"var context = {context.ConstructionContext}.Default;";
                string value = $"return {Inner.GetInstanceExpression(context)};";
                string valueFactory = $"() =>{NewLine}{{{NewLine}	{contextVar}{NewLine}	{value}{NewLine}}});";
                valueFactory = CodeGen.Indent(valueFactory);
                string snippet = $"{fieldName} = new {lazyType}({NewLine}    {valueFactory}";
                yield return snippet;
            }
            else
            {
                string valueFactory = $"() => {Inner.GetInstanceExpression(context)}";
                string snippet = $"{fieldName} = new {lazyType}({NewLine}    {valueFactory});";
                yield return snippet;
            }
        }

        /// <inheritdoc />
        public bool RequiresConstructionContext(IGenerationContext context)
        {
            if (context == null)
                throw new ArgumentNullException(nameof(context));

            return false;
        }

        private string GetLazyFieldName() => "Lazy_" + Type.ToCompileMethodName(simpleName: false);
    }
}


text:
package org.gogoup.dddutils.appsession.spi;

import java.util.Date;
import java.util.Map;

import org.gogoup.dddutils.objectsegment.OSDirtyMarker;
import org.gogoup.dddutils.objectsegment.ObjectSegment;

/**
 * This class defines the data structure of a session.
 *
 * @author ruisun
 *
 */
public class AppSessionOS extends OSDirtyMarker {

    private String applicationId;
    private String sessionKey;
    private Map<String, Object> states;
    private Date lastUpdateTime;

    public AppSessionOS(String applicationId, String sessionKey,
            Map<String, Object> states, Date lastUpdateTime) {
        super(null);
        this.applicationId = applicationId;
        this.sessionKey = sessionKey;
        this.states = states;
        this.lastUpdateTime = lastUpdateTime;
        this.cleanMarks();
    }

    public String getApplicationId() {
        return applicationId;
    }

    public String getSessionKey() {
        return sessionKey;
    }

    public Map<String, Object> getStates() {
        return states;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setStates(Map<String, Object> states) {
        this.states = states;
        this.markDirty();
    }

    @Override
    public ObjectSegment copy() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public ObjectSegment copy(ObjectSegment parent) {
        // TODO Auto-generated method stub
        return null;
    }

}


text:
@class DVTSourceCodeLanguage, DVTWeakInterposer, NSArray, NSMapTable, NSMutableArray, NSMutableSet, NSOperationQueue;

@interface DVTTextCompletionDataSource : NSObject
{
    DVTSourceCodeLanguage *_language;
    DVTWeakInterposer *_delegate_dvtWeakInterposer;
    NSMutableArray *_strategies;
    NSMutableSet *_strategyObservers;
    NSOperationQueue *_completionsGeneratorQueue;
    NSMapTable *_lastGeneratedCompletionItemsPerStrategy;
}

@property(retain, nonatomic) DVTSourceCodeLanguage *language; // @synthesize language=_language;
@property(readonly) NSArray *strategies;
- (id)bestMatchForPrefix:(id)arg1 withContext:(id)arg2;
- (void)generateCompletionsForDocumentLocation:(id)arg1 context:(id)arg2 completionBlock:(dispatch_block_t)arg3;
- (id)initWithLanguage:(id)arg1;
- (id)init;
@property __weak id  delegate;

@end


text:
import {readDoc, assert, find} from './util.js';

describe('nav: ', ()=> {
  let doc = readDoc('index.html');
  let encode = encodeURIComponent;

  it('has home and readme link.', ()=>{
    find(doc, '[data-ice="nav"]', (doc)=>{
      assert.includes(doc, 'h1 a:nth-of-type(1)', 'HOME');
      assert.includes(doc, 'h1 a:nth-of-type(1)', './', 'href');

      assert.includes(doc, 'h1 a:nth-of-type(2)', 'README');
      assert.includes(doc, 'h1 a:nth-of-type(2)', '@readme.html', 'href');
    });
  });

  it('has class nav.', ()=>{
    // public
    assert.includes(doc, '[data-ice="classDoc"]:nth-of-type(1)', 'Class1');
    assert.includes(doc, '[data-ice="classDoc"]:nth-of-type(1) a', encode('module:module|module1~Class1.html'), 'href');

    // protected
    assert.includes(doc, '[data-ice="classDoc"]:nth-of-type(2)', 'Class2');
    assert.includes(doc, '[data-ice="classDoc"]:nth-of-type(2) a', encode('module:module|module1~Class2.html'), 'href');

    // private
    assert.includes(doc, '[data-ice="classDoc"]:nth-of-type(3)', 'Class3');
    assert.includes(doc, '[data-ice="classDoc"]:nth-of-type(3) a', encode('module:module|module1~Class3.html'), 'href');

    // variation
    assert.includes(doc, '[data-ice="classDoc"]:nth-of-type(4)', 'NamespaceAndClass');
    assert.includes(doc, '[data-ice="classDoc"]:nth-of-type(4) a', encode('module:module|module1~NamespaceAndClass(2).html'), 'href');
  });

  it('has interface nav.', ()=>{
    // public
    assert.includes(doc, '[data-ice="interfaceDoc"]:nth-of-type(1)', 'Interface1');
    assert.includes(doc, '[data-ice="interfaceDoc"]:nth-of-type(1) a', encode('module:module|module1~Interface1.html'), 'href');

    // protected
    assert.includes(doc, '[data-ice="interfaceDoc"]:nth-of-type(2)', 'Interface2');
    assert.includes(doc, '[data-ice="interfaceDoc"]:nth-of-type(2) a', encode('module:module|module1~Interface2.html'), 'href');

    // private
    assert.includes(doc, '[data-ice="interfaceDoc"]:nth-of-type(3)', 'Interface3');
    assert.includes(doc, '[data-ice="interfaceDoc"]:nth-of-type(3) a', encode('module:module|module1~Interface3.html'), 'href');
  });

  it('has namespace nav.', ()=>{
    // public
    assert.includes(doc, '[data-ice="namespaceDoc"]:nth-of-type(1)', '@global');
    assert.includes(doc, '[data-ice="namespaceDoc"]:nth-of-type(1) a', encode('@global.html'), 'href');
    assert.includes(doc, '[data-ice="namespaceDoc"]:nth-of-type(2)', 'Namespace1');
    assert.includes(doc, '[data-ice="namespaceDoc"]:nth-of-type(2) a', encode('module:module|module1~Namespace1.html'), 'href');

    // protected
    assert.includes(doc, '[data-ice="namespaceDoc"]:nth-of-type(3)', 'Namespace2');
    assert.includes(doc, '[data-ice="namespaceDoc"]:nth-of-type(3) a', encode('module:module|module1~Namespace2.html'), 'href');

    // private
    assert.includes(doc, '[data-ice="namespaceDoc"]:nth-of-type(4)', 'Namespace3');
    assert.includes(doc, '[data-ice="namespaceDoc"]:nth-of-type(4) a', encode('module:module|module1~Namespace3.html'), 'href');

    // variation
    assert.includes(doc, '[data-ice="namespaceDoc"]:nth-of-type(5)', 'NamespaceAndClass');
    assert.includes(doc, '[data-ice="namespaceDoc"]:nth-of-type(5) a', encode('module:module|module1~NamespaceAndClass.html'), 'href');
  });

  it('has module nav.', ()=>{
    // public
    assert.includes(doc, '[data-ice="moduleDoc"]:nth-of-type(1)', 'module/module1');
    assert.includes(doc, '[data-ice="moduleDoc"]:nth-of-type(1) a', encode('module:module|module1.html'), 'href');

    // protected
    assert.includes(doc, '[data-ice="moduleDoc"]:nth-of-type(2)', 'module/module2');
    assert.includes(doc, '[data-ice="moduleDoc"]:nth-of-type(2) a', encode('module:module|module2.html'), 'href');

    // private
    assert.includes(doc, '[data-ice="moduleDoc"]:nth-of-type(3)', 'module/module3');
    assert.includes(doc, '[data-ice="moduleDoc"]:nth-of-type(3) a', encode('module:module|module3.html'), 'href');
  });

  it('has mixin nav.', ()=>{
    // public
    assert.includes(doc, '[data-ice="mixinDoc"]:nth-of-type(1)', 'Mixin1');
    assert.includes(doc, '[data-ice="mixinDoc"]:nth-of-type(1) a', encode('module:module|module1~Mixin1.html'), 'href');

    // protected
    assert.includes(doc, '[data-ice="mixinDoc"]:nth-of-type(2)', 'Mixin2');
    assert.includes(doc, '[data-ice="mixinDoc"]:nth-of-type(2) a', encode('module:module|module1~Mixin2.html'), 'href');

    // private
    assert.includes(doc, '[data-ice="mixinDoc"]:nth-of-type(3)', 'Mixin3');
    assert.includes(doc, '[data-ice="mixinDoc"]:nth-of-type(3) a', encode('module:module|module1~Mixin3.html'), 'href');
  });

  it('has file nav.', ()=>{
    // public
    assert.includes(doc, '[data-ice="fileDoc"]:nth-of-type(1)', 'module/module1.js');
    assert.includes(doc, '[data-ice="fileDoc"]:nth-of-type(1) a', encode('@file-module|module1.js.html'), 'href');

    // protected
    assert.includes(doc, '[data-ice="fileDoc"]:nth-of-type(2)', 'module/module2.js');
    assert.includes(doc, '[data-ice="fileDoc"]:nth-of-type(2) a', encode('@file-module|module2.js.html'), 'href');

    // private
    assert.includes(doc, '[data-ice="fileDoc"]:nth-of-type(3)', 'module/module3.js');
    assert.includes(doc, '[data-ice="fileDoc"]:nth-of-type(3) a', encode('@file-module|module3.js.html'), 'href');
  });
});


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Monograph Univ. Puerto Rico, Series B 2: 163 (1934)

#### Original name
Phyllachora oyedaeae Chardón, 1934

### Remarks
null


text:
"use strict";

/**
 * @author ChalkPE <amato17@naver.com>
 * @since 2014-11-03
 * @copyright 2014-2015 if(Team);
 * @license Apache-2.0
 * @see https://github.com/if-Team/CustomPacket
 * @namespace
 */
var CustomPacket = {};

/**
 * 통신에 사용할 포트입니다
 * @memberof CustomPacket
 * @type {Number}
 * @const
 */
CustomPacket.PORT = 19131;

/**
 * 주기적으로 수신할 때의 딜레이 간격입니다
 * @memberof CustomPacket
 * @type {Number}
 * @const
 */
CustomPacket.HEARTBEAT_SECONDS = 2;

/**
 * 주기적으로 수신할 때 서버에 전송하는 문자열입니다
 * @memberof CustomPacket
 * @type {String}
 * @const
 */
CustomPacket.HEARTBEAT_SIGNAL = String.fromCharCode(16);

/**
 * 통신에 쓰이는 채널입니다
 * @memberof CustomPacket
 * @type {java.nio.channels.DatagramChannel}
 * @private
 */
var channel = null;

/**
 * 서버로부터 수신한 바이트버퍼를 디코드할 디코더입니다
 * @memberof CustomPacket
 * @type {java.nio.charset.CharsetDecoder}
 * @private
 */
var decoder = null;

/**
 * 수신에 쓰일 버퍼입니다
 * @memberof CustomPacket
 * @type {java.nio.ByteBuffer}
 * @private
 */
var buffer = null;

/**
 * 서버의 응답 결과를 받을 콜백입니다
 * @callback Callback
 * @param {String|Error} result - 응답 문자열 및 통신 중 발생한 에러
 */

/**
 * 서버에 연결합니다
 * @param {!String} address - 서버의 IP
 * @param {!String} message - 서버로 보내는 문자열
 * @param {!Callback} callback
 * @memberof CustomPacket
 * @public
 */
CustomPacket.get = function get(address, message, callback){
    new java.lang.Thread({run: function(){
        try{
        	if(channel === null){
                throw new Error("channel is not initialized");
            }

        	if(address === null || message === null || callback === null){
                throw new Error("argument cannot be null");
            }

        	if(typeof address !== "string"){
        		throw new Error("address must be a string");
        	}

        	if(typeof message !== "string"){
        		throw new Error("message must be a string");
        	}

        	if(typeof callback !== "function"){
        		throw new Error("callback must be a function");
        	}

            var src = java.nio.ByteBuffer.wrap(new java.lang.String(message).getBytes("UTF-8"));
            channel.send(src, new java.net.InetSocketAddress(address, CustomPacket.PORT));

            channel.receive(buffer);

            buffer.flip();
            var received = decoder.decode(buffer).toString() + "";
            buffer.clear();

            try{
            	callback(received);
            }catch(e){}
        }catch(error){
        	try{
        		callback(error);
            }catch(e){}
        }
    }}).start();
}

/**
 * 2초에 한 번씩 지속적으로 서버에 연결합니다
 * @param {!String} address - 서버의 IP
 * @param {!Callback} callback
 * @memberof CustomPacket
 * @public
 */
CustomPacket.registerRepeatingHook = function(address, callback){
    try{
        new java.lang.Thread({run: function(){
            while(Server.getAddress() !== null){
                CustomPacket.get(address, CustomPacket.HEARTBEAT_SIGNAL, callback);
                java.lang.Thread.sleep(CustomPacket.HEARTBEAT_SECONDS * 1000);
            }
        }}).start();
    }catch(e){
        print(e);
    }
};

try{
    channel = java.nio.channels.DatagramChannel.open();
    decoder = java.nio.charset.Charset.forName("UTF-8").newDecoder();
    buffer = java.nio.ByteBuffer.allocateDirect(65507);

	Object.freeze(CustomPacket);
}catch(e){
    print(error.name + ": " + error.message + " at line " + error.lineNumber + "\n" + error.stack);
}

/**
 * 맵에 입장할 때마다 라이브러리를 등록합니다
 * @static
 */
function selectLevelHook(){
	var scripts = net.zhuoweizhang.mcpelauncher.ScriptManager.scripts;
    var ScriptableObject = org.mozilla.javascript.ScriptableObject;

    var loaded = false;

	for(var i = 0; i < scripts.size(); i++) {
		var scope = scripts.get(i).scope;
		if(!ScriptableObject.hasProperty(scope, "CustomPacket")){
			ScriptableObject.putProperty(scope, "CustomPacket", CustomPacket);
			loaded = true;
		}
	}

	if(loaded){
		print("CustomPacket has been loaded!");
	}
}


text:
namespace TestCases.DDF
{

    using System;
    using System.Text;
    using System.Collections.Generic;
    using System.IO;

    using NUnit.Framework;
    using NPOI.DDF;
    using NPOI.Util;

using System.Configuration;

    [TestFixture]
    public class TestEscherContainerRecord
    {
        private String ESCHER_DATA_PATH;

        public TestEscherContainerRecord()
        {
            ESCHER_DATA_PATH = ConfigurationManager.AppSettings["escher.data.path"];
        }
        [Test]
        public void TestFillFields()
        {
            IEscherRecordFactory f = new DefaultEscherRecordFactory();
            byte[] data = HexRead.ReadFromString("0F 02 11 F1 00 00 00 00");
            EscherRecord r = f.CreateRecord(data, 0);
            r.FillFields(data, 0, f);
            Assert.IsTrue(r is EscherContainerRecord);
            Assert.AreEqual((short)0x020F, r.Options);
            Assert.AreEqual(unchecked((short)0xF111), r.RecordId);

            data = HexRead.ReadFromString("0F 02 11 F1 08 00 00 00" +
                    " 02 00 22 F2 00 00 00 00");
            r = f.CreateRecord(data, 0);
            r.FillFields(data, 0, f);
            EscherRecord c = r.GetChild(0);
            Assert.IsFalse(c is EscherContainerRecord);
            Assert.AreEqual(unchecked((short)0x0002), c.Options);
            Assert.AreEqual(unchecked((short)0xF222), c.RecordId);
        }
        [Test]
        public void TestSerialize()
        {
            UnknownEscherRecord r = new UnknownEscherRecord();
            r.Options=(short)0x123F;
            r.RecordId=unchecked((short)0xF112);
            byte[] data = new byte[8];
            r.Serialize(0, data);

            Assert.AreEqual("[3F, 12, 12, F1, 00, 00, 00, 00]", HexDump.ToHex(data));

            EscherRecord childRecord = new UnknownEscherRecord();
            childRecord.Options=unchecked((short)0x9999);
            childRecord.RecordId=unchecked((short)0xFF01);
            r.AddChildRecord(childRecord);
            data = new byte[16];
            r.Serialize(0, data);

            Assert.AreEqual("[3F, 12, 12, F1, 08, 00, 00, 00, 99, 99, 01, FF, 00, 00, 00, 00]", HexDump.ToHex(data));

        }
        [Test]
        public void TestToString()
        {
            EscherContainerRecord r = new EscherContainerRecord();
            r.RecordId=EscherContainerRecord.SP_CONTAINER;
            r.Options=(short)0x000F;
            String nl = Environment.NewLine;
            Assert.AreEqual("EscherContainerRecord (SpContainer):" + nl +
                    "  isContainer: True" + nl +
                    "  version: 0x000F" + nl +
                    "  instance: 0x0000" + nl +
                    "  recordId: 0xF004" + nl +
                    "  numchildren: 0" + nl
                    , r.ToString());

            EscherOptRecord r2 = new EscherOptRecord();
            // don't try to shoot in foot, please -- vlsergey
            // r2.setOptions((short) 0x9876);
            r2.RecordId=EscherOptRecord.RECORD_ID;

            String expected;
            r.AddChildRecord(r2);
            expected = "EscherContainerRecord (SpContainer):" + nl +
                       "  isContainer: True" + nl +
                       "  version: 0x000F" + nl +
                       "  instance: 0x0000" + nl +
                       "  recordId: 0xF004" + nl +
                       "  numchildren: 1" + nl +
                       "  children: " + nl +
                       "    Child 0:" + nl +
                       "    EscherOptRecord:" + nl +
                       "      isContainer: False" + nl +
                       "      version: 0x0003" + nl +
                       "      instance: 0x0000" + nl +
                       "      recordId: 0xF00B" + nl +
                       "      numchildren: 0" + nl +
                       "      properties:" + nl +
                       "    " + nl;
            Assert.AreEqual(expected, r.ToString());

            r.AddChildRecord(r2);
            expected = "EscherContainerRecord (SpContainer):" + nl +
                       "  isContainer: True" + nl +
                       "  version: 0x000F" + nl +
                       "  instance: 0x0000" + nl +
                       "  recordId: 0xF004" + nl +
                       "  numchildren: 2" + nl +
                       "  children: " + nl +
                       "    Child 0:" + nl +
                       "    EscherOptRecord:" + nl +
                       "      isContainer: False" + nl +
                       "      version: 0x0003" + nl +
                       "      instance: 0x0000" + nl +
                       "      recordId: 0xF00B" + nl +
                       "      numchildren: 0" + nl +
                       "      properties:" + nl +
                       "    " + nl +
                       "    Child 1:" + nl +
                       "    EscherOptRecord:" + nl +
                       "      isContainer: False" + nl +
                       "      version: 0x0003" + nl +
                       "      instance: 0x0000" + nl +
                       "      recordId: 0xF00B" + nl +
                       "      numchildren: 0" + nl +
                       "      properties:" + nl +
                       "    " + nl;
            Assert.AreEqual(expected, r.ToString());
        }

        private class DummyEscherRecord : EscherRecord
        {
            public DummyEscherRecord() { }
            public override int FillFields(byte[] data, int offset, IEscherRecordFactory recordFactory)
            { return 0; }
            public override int Serialize(int offset, byte[] data, EscherSerializationListener listener)
            { return 0; }
            public override int RecordSize { get { return 10; } }
            public override String RecordName { get { return ""; } }
        }
        [Test]
        public void TestRecordSize()
        {
            EscherContainerRecord r = new EscherContainerRecord();

            r.AddChildRecord(new DummyEscherRecord());

            Assert.AreEqual(18, r.RecordSize);
        }

        /**
         * We were having problems with Reading too much data on an UnknownEscherRecord,
         *  but hopefully we now Read the correct size.
         */
        [Test]
        public void TestBug44857()
        {
            //File f = new File(ESCHER_DATA_PATH, "Container.dat");
            Assert.IsTrue(File.Exists(ESCHER_DATA_PATH+"Container.dat"));

            using (FileStream finp = new FileStream(ESCHER_DATA_PATH + "Container.dat", FileMode.Open, FileAccess.Read))
            {
                byte[] data = IOUtils.ToByteArray(finp);
                finp.Close();

                // This used to fail with an OutOfMemory
                EscherContainerRecord record = new EscherContainerRecord();
                record.FillFields(data, 0, new DefaultEscherRecordFactory());
            }
        }
        /**
	 * Ensure {@link EscherContainerRecord} doesn't spill its guts everywhere
	 */
        [Test]
        public void TestChildren()
        {
            EscherContainerRecord ecr = new EscherContainerRecord();
            List<EscherRecord> children0 = ecr.ChildRecords;
            Assert.AreEqual(0, children0.Count);

            EscherRecord chA = new DummyEscherRecord();
            EscherRecord chB = new DummyEscherRecord();
            EscherRecord chC = new DummyEscherRecord();

            ecr.AddChildRecord(chA);
            ecr.AddChildRecord(chB);
            children0.Add(chC);

            List<EscherRecord> children1 = ecr.ChildRecords;
            Assert.IsTrue(children0 != children1);
            Assert.AreEqual(2, children1.Count);
            Assert.AreEqual(chA, children1[0]);
            Assert.AreEqual(chB, children1[1]);

            Assert.AreEqual(1, children0.Count); // first copy unchanged

            ecr.ChildRecords=(children0);
            ecr.AddChildRecord(chA);
            List<EscherRecord> children2 = ecr.ChildRecords;
            Assert.AreEqual(2, children2.Count);
            Assert.AreEqual(chC, children2[0]);
            Assert.AreEqual(chA, children2[1]);
        }
    }
}


text:
package gov.opm.scrd.services.impl.reporting;

import gov.opm.scrd.entities.application.ReportRequest;

/**
 * This class represents the request for the namesake report.
 Thread-safety: This class is mutable
 * and not thread - safe.

 *
 * @author AleaActaEst, RaitoShum
 * @version 1.0
 */
public class CalculationAuditTrailReportRequest implements ReportRequest {
    /**
     * Represents the flag indicates if current account is included. It is accessible by getter and modified by setter.
     * It can be any value. The default value is null.
     */
    private Boolean includeCurrentAccount;

    /**
     * Represents claim number field. It is accessible by getter and modified by setter. It can be any value. The
     * default value is null.
     */
    private String csd;

    /**
     * Creates a new instance of the {@link CalculationAuditTrailReportRequest} class.
     */
    public CalculationAuditTrailReportRequest() {
    }

    /**
     * Gets the flag indicates if current account is included.
     *
     * @return the field value.
     */
    public Boolean getIncludeCurrentAccount() {
        return includeCurrentAccount;
    }

    /**
     * Sets the flag indicates if current account is included.
     *
     * @param includeCurrentAccount
     *         the field value.
     */
    public void setIncludeCurrentAccount(Boolean includeCurrentAccount) {
        this.includeCurrentAccount = includeCurrentAccount;
    }

    /**
     * Gets the claim number field.
     *
     * @return the field value.
     */
    public String getCsd() {
        return csd;
    }

    /**
     * Sets the claim number field.
     *
     * @param csd
     *         the field value.
     */
    public void setCsd(String csd) {
        this.csd = csd;
    }
}


text:
import { Component, forwardRef } from '@angular/core';
import { Conduit, ConduitZone, ConduitZoneComponent } from '@ux-aspects/ux-aspects';
import { BehaviorSubject } from 'rxjs';

@Component({
    selector: 'uxd-components-conduit-filter',
    templateUrl: './filter.component.html',
    providers: [ConduitZone]
})
export class ComponentsConduitFilterComponent extends ConduitZoneComponent {

    zoneId: string = 'filter-zone';
    acceptsInput: boolean | string[] = true;
    producesOutput: boolean = true;

    @Conduit(forwardRef(() => ({ id: 'search' })) as any)
    search = new BehaviorSubject('');

    @Conduit(forwardRef(() => ({ id: 'show-zones', producesOutput: false })) as any)
    showZones = new BehaviorSubject(false);

}


text:
<?php

namespace Functions;

use Codeception\Specify;
use Oopphp\Functions;
use function Oopphp\Functions\getHelloWorld as helloWorld;
use const Oopphp\Functions\hello as helloDemo;

/**
 * Class FunctionDemoTest
 * @package Functions
 */
class FunctionDemoTest extends \Codeception\Test\Unit
{
    use Specify;
    /**
     * @test
     */
    public function testCanGrabANamespacedFunctionOrConstant()
    {
        $this->specify($statement = "Can grab a function or constant from a namespace", $exec = function () use ($statement) {
            verify($statement . ' Functions\getHelloWorld()', Functions\getHelloWorld())->equals('Hello World');
            verify($statement . 'Functions\hello', Functions\hello)->equals('hello');
        });

        $this->specify($statement = "Can grab an aliased function or constant from a namespace", function () use ($statement) {
            verify($statement . 'helloWorld()', helloWorld())->equals("Hello World");
            verify($statement . 'helloDemo', helloDemo)->equals('hello');
        });
    }
}


text:
- explain what they are what makes them powerful
- key components of it

- a good workflow tells a story and guides the user down specific paths

**Tidy up your diagrams**

It is important that your diagrams have layouts that look good and make sense.

The Diagram UI allows a bit of flexibility on where the Stages appear, so make use it and create nice diagrams

- show where they can be seen in the UI
- makes big difference when they are easy to read and understand
- I hide the labels since I find that they are harder to position and don't provide that much more information

- add example of two diagrams diagrams. Same content: one messy and one clean
  * note how the clean one is much easier to read

**Naming of states**

- This is very important since they need to convey the desired action
- names have to be short or they don't look good in the UI

**Other workflows**

Add screenshots for:
- bug bounty
- development
- other ...

**A simple workflow**

- add example of a simple workflow


text:
\begin{figure}[H]
\centering
\includegraphics[width=6in]{figs/run_47/run_47_turb_visc_vel_grad_vs_r_meshscatter}
\caption{Scatter plot of $\nu_T$ velocity gradient term vs radius at $z/c$=9.00, $V_{free}$=27.08, station 5.}
\label{fig:run_47_turb_visc_vel_grad_vs_r_meshscatter}
\end{figure}


text:
from flask import request, Flask
import ldap

@app.route("/normal")
def normal():
    unsafe_dc = request.args['dc']
    unsafe_filter = request.args['username']

    dn = "dc={}".format(unsafe_dc)
    search_filter = "(user={})".format(unsafe_filter)

    ldap_connection = ldap.initialize("ldap://127.0.0.1")
    user = ldap_connection.search_s(
        dn, ldap.SCOPE_SUBTREE, search_filter)


text:
package com.github.edgar615.gateway.core.definition;

import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;

import io.vertx.core.json.JsonObject;

import java.util.List;
import java.util.NoSuchElementException;
import java.util.Optional;
import java.util.ServiceLoader;

/**
 * Created by Edgar on 2016/10/21.
 *
 * @author Edgar  Date 2016/10/21
 */
public interface ApiPlugin {
    List<ApiPluginFactory> factories = Lists.newArrayList(
            ServiceLoader.load(ApiPluginFactory.class));

    /**
     * @return 插件名称
     */
    String name();

    static ApiPlugin create(String name) {
        return factory(name).create();
    }

    static ApiPluginFactory factory(String name) {
        Preconditions.checkNotNull(name, "name cannot null");
        Optional<ApiPluginFactory> optional
                = factories.stream().filter(f -> name.equalsIgnoreCase(f.name()))
                .findAny();
        if (optional.isPresent()) {
            return optional.get();
        }
        throw new NoSuchElementException("no such factory->" + name);
    }

    default JsonObject encode() {
        return factories.stream().filter(f -> this.name().equalsIgnoreCase(f.name()))
                .map(f -> f.encode(this))
                .findFirst().orElseGet(() -> new JsonObject());
    }

}


text:
<?xml version="1.0" encoding="UTF-8"?><module codename="org.netbeans.modules.sendopts/2">
    <module_version install_time="1475191092042" last="true" origin="installer" specification_version="2.35.1">
        <file crc="3090052921" name="config/Modules/org-netbeans-modules-sendopts.xml"/>
        <file crc="1357017611" name="modules/locale/org-netbeans-modules-sendopts_ja.jar"/>
        <file crc="3736048208" name="modules/locale/org-netbeans-modules-sendopts_pt_BR.jar"/>
        <file crc="142022617" name="modules/locale/org-netbeans-modules-sendopts_ru.jar"/>
        <file crc="1844116798" name="modules/locale/org-netbeans-modules-sendopts_zh_CN.jar"/>
        <file crc="2163605857" name="modules/org-netbeans-modules-sendopts.jar"/>
    </module_version>
</module>


text:
use strict;
use File::Basename;
use Getopt::Long;
use Pod::Usage;
require "bioperl_subfuncs.pl";

if (@ARGV == 0) {
    pod2usage(-verbose => 1);
}

my $runline = "running " . basename($0) . " " . join (" ", @ARGV) . "\n";

my ($fastafile, $resultfile, $gb_file, $start, $end, $oneslice, $help, $slice_list, $concat, $multiple) = 0;
my $type = "CDS";
GetOptions ('fasta=s' => \$fastafile,
            'outputfile=s' => \$resultfile,
            'genbank|gb_file:s' => \$gb_file,
            'slices|slicelist:s' => \$slice_list,
            'start:i' => \$start,
            'end:i' => \$end,
            'concatenate' => \$concat,
            'locus|type:s' => \$type,
            'multiple' => \$multiple,
            'help|?' => \$help) or pod2usage(-msg => "GetOptions failed.", -exitval => 2);

if ($help) {
    pod2usage(-verbose => 1);
}

print $runline;

if ($start && $end) {
	$oneslice = 1;
}

unless (($fastafile && $resultfile)) {
    my $msg = qq{Error: an option was mis-specified:
    fasta=$fastafile
    outputfile=$resultfile
    };

    pod2usage(-msg => $msg, -exitval => 2);
}
my $whole_aln = make_aln_from_fasta_file ($fastafile);

my @alns = ();
my $gene_alns = \@alns;

if ($oneslice) {
	my $curr_slice = $whole_aln->slice($start, $end, 1);
    push @alns, $curr_slice;
} elsif ($gb_file) {
    $gene_alns = slice_fasta_from_genbank_file ($fastafile, $gb_file, $type);
} elsif ($slice_list) {
    open FH, "<", $slice_list or die "Couldn't open slice list $slice_list";
    my @slices = <FH>;
    close FH;

    foreach my $slice (@slices) {
        if ($slice =~ /(.+?)\t(.+?)\t(.+)$/) {
            my $name = $1;
            my $start = $2;
            my $end = $3;
            my $curr_slice = $whole_aln->slice($start, $end, 1);
            $curr_slice->description($name);
            push @alns, $curr_slice;
        } elsif ($slice =~ /^(.+?)-(.+)$/) {
            my $curr_slice = $whole_aln->slice($1, $2, 1);
            push @alns, $curr_slice;
        } else {
            pod2usage(-msg => "Slice file improperly specified.", -exitval => 2);
        }
    }
} else {
    pod2usage(-msg => "Must specify either a genbank file or a start and end point", -exitval => 2);
}

if ($concat) {
    # construct a new SimpleAlign by going seq by seq through gene_alns and adding it to the new concatenated SimpleAlign
    my $concat_aln = new Bio::SimpleAlign();
    my @seqs = @$gene_alns[0]->each_seq();
    for (my $i=0;$i<@seqs;$i++) {
        my $concat_seq = "";
        foreach my $aln (@$gene_alns) {
            $concat_seq .= $aln->get_seq_by_pos($i+1)->seq();
        }
        $concat_aln->add_seq(new Bio::LocatableSeq(-seq => $concat_seq, -id  => $seqs[$i]->id()));
    }
    open FH, ">", $resultfile;
    foreach my $seq ($concat_aln->each_seq()) {
        my $name = $seq->id();
        print FH ">$name\n";
        print FH $seq->seq() . "\n";
    }
	close FH;
} elsif ($multiple) {
    my $i = 1;
    foreach my $aln (@$gene_alns) {
        my $gene_name = $aln->description();
        unless ($gene_name) {
            $gene_name = $i;
            $i++;
        }
        my $filename;
        if (-d $resultfile) {
            $filename = $resultfile . $gene_name . ".fasta";
        } else {
            $filename = $resultfile . "_" . $gene_name . ".fasta";
        }
        open FH, ">", $filename or die "Couldn't open output file $filename";
        foreach my $seq ($aln->each_seq()) {
            my $name = $seq->id();
            print FH ">$name\n";
            print FH $seq->seq() . "\n";
        }
        close FH;
    }
} else {
    open FH, ">", $resultfile or die "Couldn't open output file $resultfile";
    foreach my $aln (@$gene_alns) {
        my $gene_name = $aln->description();
        if ($gene_name) {
            $gene_name = "_".$gene_name;
        }
        foreach my $seq ($aln->each_seq()) {
            my $name = $seq->id() . "$gene_name";
            print FH ">$name\n";
            print FH $seq->seq() . "\n";
        }
    }
    close FH;
}

__END__

=head1 NAME

slice_fasta_file

=head1 SYNOPSIS

slice_fasta_file [-fasta fa_file] [-genbank gb_file [-locus locus_type] | -slices slice_file | -start -end] [-outputfile output_file] [-concatenate]

=head1 OPTIONS

  -fasta:            fasta file of aligned sequences
  -genbank|gb_file:  genbank file with CDS coordinates
  -slices|slicelist: tab-delimited file with CDS coordinates
  -start:            start position of single slice
  -end:              end position of single slice
  -outputfile:       output file name
  -locus|type:       [optional] if present, specifies the type of genbank tag to slice
  -concatenate:      if flag is present, concatenate the slices into one long alignment
  -multiple:         if flag is present, save each slice as a separate file

=head1 DESCRIPTION

Given a fasta file of aligned sequences and a corresponding genbank file
with the CDS coordinates, will create a fasta file with each
CDS corresponding to a separate sequence block.

=cut


text:
function handlingError(err, reply) {
	if (err) {
		if (err.type == 'NotFoundError') {
			reply().code(404);
			return true;
		}
		reply(new Error(err));
		return true;
	}
	return false;
}

module.exports = handlingError;


text:
package com.sequenceiq.cloudbreak.converter.spi;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.inject.Inject;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.google.common.collect.Maps;
import com.sequenceiq.cloudbreak.cloud.model.CloudInstance;
import com.sequenceiq.cloudbreak.cloud.model.CloudStack;
import com.sequenceiq.cloudbreak.cloud.model.Group;
import com.sequenceiq.cloudbreak.cloud.model.Image;
import com.sequenceiq.cloudbreak.cloud.model.InstanceStatus;
import com.sequenceiq.cloudbreak.cloud.model.InstanceTemplate;
import com.sequenceiq.cloudbreak.cloud.model.Network;
import com.sequenceiq.cloudbreak.cloud.model.PortDefinition;
import com.sequenceiq.cloudbreak.cloud.model.Security;
import com.sequenceiq.cloudbreak.cloud.model.SecurityRule;
import com.sequenceiq.cloudbreak.cloud.model.StackTemplate;
import com.sequenceiq.cloudbreak.cloud.model.Subnet;
import com.sequenceiq.cloudbreak.cloud.model.Volume;
import com.sequenceiq.cloudbreak.core.CloudbreakImageNotFoundException;
import com.sequenceiq.cloudbreak.domain.InstanceGroup;
import com.sequenceiq.cloudbreak.domain.InstanceMetaData;
import com.sequenceiq.cloudbreak.domain.Stack;
import com.sequenceiq.cloudbreak.domain.Template;
import com.sequenceiq.cloudbreak.domain.json.Json;
import com.sequenceiq.cloudbreak.repository.SecurityRuleRepository;
import com.sequenceiq.cloudbreak.service.ComponentConfigProvider;
import com.sequenceiq.cloudbreak.service.image.ImageService;
import com.sequenceiq.cloudbreak.service.stack.connector.VolumeUtils;

@Component
public class StackToCloudStackConverter {

    private static final Logger LOGGER = LoggerFactory.getLogger(StackToCloudStackConverter.class);

    @Inject
    private SecurityRuleRepository securityRuleRepository;

    @Inject
    private ImageService imageService;

    @Inject
    private ComponentConfigProvider componentConfigProvider;

    public CloudStack convert(Stack stack) {
        return convert(stack, Collections.emptySet());
    }

    public CloudStack convertForDownscale(Stack stack, Set<String> deleteRequestedInstances) {
        return convert(stack, deleteRequestedInstances);
    }

    public CloudStack convertForTermination(Stack stack, String instanceId) {
        return convert(stack, Collections.singleton(instanceId));
    }

    public CloudStack convert(Stack stack, Set<String> deleteRequestedInstances) {
        Image image = null;
        List<Group> instanceGroups = buildInstanceGroups(stack.getInstanceGroupsAsList(), deleteRequestedInstances);
        try {
            image = imageService.getImage(stack.getId());
        } catch (CloudbreakImageNotFoundException e) {
            LOGGER.info(e.getMessage());
        }
        Network network = buildNetwork(stack);
        StackTemplate stackTemplate = componentConfigProvider.getStackTemplate(stack.getId());
        String template = null;
        if (stackTemplate != null) {
            template = stackTemplate.getTemplate();
        }
        return new CloudStack(instanceGroups, network, image, stack.getParameters(), getUserDefinedTags(stack), template);
    }

    public Map<String, String> getUserDefinedTags(Stack stack) {
        Map<String, String> result = Maps.newHashMap();
        try {
            if (stack.getTags() != null) {
                Map<String, String> userDefined = (Map<String, String>) stack.getTags().get(Map.class).get("userDefined");
                if (userDefined != null) {
                    result = userDefined;
                }
            }
        } catch (IOException e) {
            LOGGER.warn("Exception during converting user defined tags.", e);
        } finally {
            return result;
        }
    }

    public List<Group> buildInstanceGroups(List<InstanceGroup> instanceGroups, Set<String> deleteRequests) {
        // sort by name to avoid shuffling the different instance groups
        Collections.sort(instanceGroups);
        List<Group> groups = new ArrayList<>();
        long privateId = getFirstValidPrivateId(instanceGroups);
        for (InstanceGroup instanceGroup : instanceGroups) {
            if (instanceGroup.getTemplate() != null) {
                CloudInstance skeleton = null;
                List<CloudInstance> instances = new ArrayList<>();
                Template template = instanceGroup.getTemplate();
                int desiredNodeCount = instanceGroup.getNodeCount();
                // existing instances
                for (InstanceMetaData metaData : instanceGroup.getInstanceMetaData()) {
                    InstanceStatus status = getInstanceStatus(metaData, deleteRequests);
                    instances.add(buildInstance(metaData.getInstanceId(), template, instanceGroup.getGroupName(), metaData.getPrivateId(),
                            metaData.getShortHostname(), status));
                }
                // new instances
                int existingNodesSize = instances.size();
                if (existingNodesSize < desiredNodeCount) {
                    for (long i = 0; i < desiredNodeCount - existingNodesSize; i++) {
                        instances.add(buildInstance(null, template, instanceGroup.getGroupName(), privateId++, null, InstanceStatus.CREATE_REQUESTED));
                    }
                }
                if (existingNodesSize == desiredNodeCount && desiredNodeCount == 0) {
                    skeleton = buildInstance(null, template, instanceGroup.getGroupName(), 0L, null, InstanceStatus.CREATE_REQUESTED);
                }
                Json attributes = instanceGroup.getAttributes();
                Map<String, Object> fields = attributes == null ? Collections.emptyMap() : attributes.getMap();
                groups.add(new Group(instanceGroup.getGroupName(), instanceGroup.getInstanceGroupType(), instances, buildSecurity(instanceGroup), skeleton,
                        fields));
            }
        }
        return groups;
    }

    private Security buildSecurity(InstanceGroup ig) {
        List<SecurityRule> rules = new ArrayList<>();
        if (ig.getSecurityGroup() == null) {
            return new Security(rules, null);
        }
        Long id = ig.getSecurityGroup().getId();
        List<com.sequenceiq.cloudbreak.domain.SecurityRule> securityRules = securityRuleRepository.findAllBySecurityGroupId(id);
        for (com.sequenceiq.cloudbreak.domain.SecurityRule securityRule : securityRules) {
            List<PortDefinition> portDefinitions = new ArrayList<>();
            for (String actualPort : securityRule.getPorts()) {
                String[] segments = actualPort.split("-");
                if (segments.length > 1) {
                    portDefinitions.add(new PortDefinition(segments[0], segments[1]));
                } else {
                    portDefinitions.add(new PortDefinition(segments[0], segments[0]));
                }
            }

            rules.add(new SecurityRule(securityRule.getCidr(), portDefinitions.toArray(new PortDefinition[portDefinitions.size()]),
                    securityRule.getProtocol()));
        }
        return new Security(rules, ig.getSecurityGroup().getSecurityGroupId());
    }

    public List<CloudInstance> buildInstances(Stack stack) {
        List<Group> groups = buildInstanceGroups(stack.getInstanceGroupsAsList(), Collections.emptySet());
        List<CloudInstance> cloudInstances = new ArrayList<>();
        for (Group group : groups) {
            cloudInstances.addAll(group.getInstances());
        }
        return cloudInstances;
    }

    public CloudInstance buildInstance(String id, Template template, String name, Long privateId, String hostName, InstanceStatus status) {
        InstanceTemplate instanceTemplate = buildInstanceTemplate(template, name, privateId, status);
        Map<String, Object> params = new HashMap<>();
        if (hostName != null) {
            params.put(CloudInstance.DISCOVERY_NAME, hostName);
        }
        return new CloudInstance(id, instanceTemplate, params);
    }

    public InstanceTemplate buildInstanceTemplate(Template template, String name, Long privateId, InstanceStatus status) {
        Json attributes = template.getAttributes();
        Map<String, Object> fields = attributes == null ? Collections.emptyMap() : attributes.getMap();
        List<Volume> volumes = new ArrayList<>();
        for (int i = 0; i < template.getVolumeCount(); i++) {
            Volume volume = new Volume(VolumeUtils.VOLUME_PREFIX + (i + 1), template.getVolumeType(), template.getVolumeSize());
            volumes.add(volume);
        }
        return new InstanceTemplate(template.getInstanceType(), name, privateId, volumes, status, fields);
    }

    private Network buildNetwork(Stack stack) {
        com.sequenceiq.cloudbreak.domain.Network stackNetwork = stack.getNetwork();
        Network result = null;
        if (stackNetwork != null) {
            Subnet subnet = new Subnet(stackNetwork.getSubnetCIDR());
            Json attributes = stackNetwork.getAttributes();
            Map<String, Object> params = attributes == null ? Collections.emptyMap() : attributes.getMap();
            result = new Network(subnet, params);
        }
        return result;
    }

    private Long getFirstValidPrivateId(List<InstanceGroup> instanceGroups) {
        LOGGER.info("Get first valid PrivateId of instanceGroups");
        long highest = 0;
        for (InstanceGroup instanceGroup : instanceGroups) {
            LOGGER.info("Checking of instanceGroup: {}", instanceGroup.getGroupName());
            for (InstanceMetaData metaData : instanceGroup.getAllInstanceMetaData()) {
                Long privateId = metaData.getPrivateId();
                LOGGER.info("InstanceMetaData metaData: privateId: {}, instanceGroupName: {}, instanceId: {}, status: {}",
                        privateId, metaData.getInstanceGroupName(), metaData.getInstanceId(), metaData.getInstanceStatus());
                if (privateId == null) {
                    continue;
                }
                if (privateId > highest) {
                    highest = privateId;
                }
            }
        }
        LOGGER.info("highest privateId: {}", highest);
        return highest == 0 ? 0 : highest + 1;
    }

    private InstanceStatus getInstanceStatus(InstanceMetaData metaData, Set<String> deleteRequests) {
        return deleteRequests.contains(metaData.getInstanceId()) ? InstanceStatus.DELETE_REQUESTED
                : metaData.getInstanceStatus() == com.sequenceiq.cloudbreak.api.model.InstanceStatus.REQUESTED ? InstanceStatus.CREATE_REQUESTED
                : InstanceStatus.CREATED;
    }

}


text:
package org.spongepowered.common.mixin.api.mcp.entity.projectile;

import net.minecraft.entity.projectile.EntityEgg;
import org.spongepowered.api.entity.projectile.Egg;
import org.spongepowered.asm.mixin.Mixin;

@Mixin(EntityEgg.class)
public abstract class EntityEggMixin_API extends EntityThrowableMixin_API implements Egg {

}