text:
module.exports = {
  enable: false,
  topic: 'yaktor-auditlog',
  partition: 0,
  attributes: 0,
  createTopic: true,
  // see https://www.npmjs.com/package/kafka-node#clientconnectionstring-clientid-zkoptions-noackbatchoptions-ssloptions
  client: {
    clientId: 'yaktor-auditlog',
    connectionString: 'zookeeper:2181/',
    // see https://github.com/alexguan/node-zookeeper-client#client-createclientconnectionstring-options
    zkOptions: null,
    noAckBatchOptions: null,
    sslOptions: null
  },
  // see https://www.npmjs.com/package/kafka-node#producerclient-options
  producer: null
}


text:
import { NextSortDirection } from '../../utils/utils';

export class HeaderCellController{
  /**
   * Calculates the styles for the header cell directive
   * @return {styles}
   */
  styles(){
    return {
      width: this.column.width  + 'px',
      minWidth: this.column.minWidth  + 'px',
      maxWidth: this.column.maxWidth  + 'px',
      height: this.column.height  + 'px'
    };
  }

  /**
   * Calculates the css classes for the header cell directive
   */
  cellClass(){
    var cls = {
      'sortable': this.column.sortable,
      'resizable': this.column.resizable
    };

    if(this.column.headerClassName){
      cls[this.column.headerClassName] = true;
    }

    return cls;
  }

  /**
   * Toggles the sorting on the column
   */
  onSorted(){
    if(this.column.sortable){
      this.column.sort = NextSortDirection(this.sortType, this.column.sort);

      if (this.column.sort === undefined){
        this.column.sortPriority = undefined;
      }

      this.onSort({
        column: this.column
      });
    }
  }

  /**
   * Toggles the css class for the sort button
   */
  sortClass(){
    return {
      'sort-btn': true,
      'sort-asc icon-down': this.column.sort === 'asc',
      'sort-desc icon-up': this.column.sort === 'desc'
    };
  }

  /**
   * Updates the column width on resize
   * @param  {width}
   * @param  {column}
   */
  onResized(width, column){
    this.onResize({
      column: column,
      width: width
    });
  }

  /**
   * Invoked when the header cell directive checkbox was changed
   */
  onCheckboxChange(){
    this.onCheckboxChanged();
  }

}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Redking\ParseBundle\Mapping\Driver;

use Redking\ParseBundle\Mapping\ClassMetadata as ParseClassMetadata;
use Doctrine\Persistence\Mapping\ClassMetadata;
use Doctrine\Persistence\Mapping\Driver\FileDriver;
use Doctrine\Persistence\Mapping\Driver\SymfonyFileLocator;
use Symfony\Component\Yaml\Yaml;
use Redking\ParseBundle\Mapping\Builder\ObjectListenerBuilder;

/**
 * The YamlDriver reads the mapping metadata from yaml schema files.
 *
 * @since       1.0
 *
 * @author      Jonathan H. Wage <jonwage@gmail.com>
 * @author      Roman Borschel <roman@code-factory.org>
 */
class YamlDriver extends FileDriver
{
    const DEFAULT_FILE_EXTENSION = '.parse.yml';

    /**
     * {@inheritdoc}
     */
    public function __construct($prefixes, $fileExtension = self::DEFAULT_FILE_EXTENSION)
    {
        $locator = new SymfonyFileLocator((array) $prefixes, $fileExtension);
        parent::__construct($locator, $fileExtension);
    }

    /**
     * {@inheritdoc}
     */
    public function loadMetadataForClass($className, ClassMetadata $class): void
    {
        /* @var $class ClassMetadata */
        $element = $this->getElement($className);
        if (!$element) {
            return;
        }
        $element['type'] = isset($element['type']) ? $element['type'] : 'document';

        if (isset($element['collection'])) {
            $class->setCollection($element['collection']);
        }
        if ($element['type'] == 'document') {
            if (isset($element['repositoryClass'])) {
                $class->setCustomRepositoryClass($element['repositoryClass']);
            }
        } elseif ($element['type'] === 'mappedSuperclass') {
            $class->setCustomRepositoryClass(
                isset($element['repositoryClass']) ? $element['repositoryClass'] : null
            );
            $class->isMappedSuperclass = true;
        } elseif ($element['type'] === 'embeddedDocument') {
            $class->isEmbeddedDocument = true;
        }
        if (isset($element['indexes'])) {
            foreach ($element['indexes'] as $index) {
                $class->addIndex($index['keys'], isset($index['options']) ? $index['options'] : array());
            }
        }
        if (isset($element['inheritanceType'])) {
            $class->setInheritanceType(constant('Redking\ParseBundle\Mapping\ClassMetadata::INHERITANCE_TYPE_'.strtoupper($element['inheritanceType'])));
        }
        if (isset($element['discriminatorField'])) {
            $class->setDiscriminatorField($this->parseDiscriminatorField($element['discriminatorField']));
        }
        if (isset($element['discriminatorMap'])) {
            $class->setDiscriminatorMap($element['discriminatorMap']);
        }
        if (isset($element['defaultDiscriminatorValue'])) {
            $class->setDefaultDiscriminatorValue($element['defaultDiscriminatorValue']);
        }
        if (isset($element['changeTrackingPolicy'])) {
            $class->setChangeTrackingPolicy(constant('Redking\ParseBundle\Mapping\ClassMetadata::CHANGETRACKING_'
                    .strtoupper($element['changeTrackingPolicy'])));
        }
        if (isset($element['requireIndexes'])) {
            $class->setRequireIndexes($element['requireIndexes']);
        }
        if (isset($element['slaveOkay'])) {
            $class->setSlaveOkay($element['slaveOkay']);
        }

        $this->addMandatoryFieldMapping($class);

        if (isset($element['fields'])) {
            foreach ($element['fields'] as $fieldName => $mapping) {
                if (is_string($mapping)) {
                    $type = $mapping;
                    $mapping = array();
                    $mapping['type'] = $type;
                }
                if (!isset($mapping['fieldName'])) {
                    $mapping['fieldName'] = $fieldName;
                }
                if (isset($mapping['type']) && !empty($mapping['embedded'])) {
                    $this->addMappingFromEmbed($class, $fieldName, $mapping, $mapping['type']);
                } elseif (isset($mapping['type']) && !empty($mapping['reference'])) {
                    $this->addMappingFromReference($class, $fieldName, $mapping, $mapping['type']);
                } else {
                    $this->addFieldMapping($class, $mapping);
                }
            }
        }
        if (isset($element['referenceOne'])) {
            foreach ($element['referenceOne'] as $fieldName => $reference) {
                $this->addMappingFromReference($class, $fieldName, $reference, 'one');
            }
        }
        if (isset($element['referenceMany'])) {
            foreach ($element['referenceMany'] as $fieldName => $reference) {
                $this->addMappingFromReference($class, $fieldName, $reference, 'many');
            }
        }
        if (isset($element['alsoLoadMethods'])) {
            foreach ($element['alsoLoadMethods'] as $methodName => $fieldName) {
                $class->registerAlsoLoadMethod($methodName, $fieldName);
            }
        }

        // Evaluate lifeCycleCallbacks
        if (isset($element['lifecycleCallbacks'])) {
            foreach ($element['lifecycleCallbacks'] as $type => $methods) {
                foreach ($methods as $method) {
                    $class->addLifecycleCallback($method, constant('Redking\ParseBundle\Events::' . $type));
                }
            }
        }

        // Evaluate objectListeners
        if (isset($element['objectListeners'])) {
            foreach ($element['objectListeners'] as $className => $objectListener) {
                // Evaluate the listener using naming convention.
                if (empty($objectListener)) {
                    ObjectListenerBuilder::bindObjectListener($class, $className);

                    continue;
                }

                foreach ($objectListener as $eventName => $callbackElement){
                    foreach ($callbackElement as $methodName){
                        $class->addObjectListener($eventName, $className, $methodName);
                    }
                }
            }
        }
    }

    private function addMandatoryFieldMapping(ClassMetadata $class)
    {
        $mappings = [
            'id' => [
                'id' => true,
                'type' => 'string',
                'fieldName' => 'id',
            ],
            'createdAt' => [
                'type' => 'DateTime',
                'fieldName' => 'createdAt',
            ],

            'updatedAt' => [
                'type' => 'DateTime',
                'fieldName' => 'updatedAt',
            ],
        ];

        foreach ($mappings as $mapping) {
            $class->mapField($mapping);
        }
    }

    private function addFieldMapping(ClassMetadata $class, $mapping)
    {
        if (isset($mapping['name'])) {
            $name = $mapping['name'];
        } elseif (isset($mapping['fieldName'])) {
            $name = $mapping['fieldName'];
        } else {
            throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping');
        }

        $class->mapField($mapping);

        if (!(isset($mapping['index']) || isset($mapping['unique']) || isset($mapping['sparse']))) {
            return;
        }

        // Multiple index specifications in one field mapping is ambiguous
        if ((isset($mapping['index']) && is_array($mapping['index'])) +
            (isset($mapping['unique']) && is_array($mapping['unique'])) +
            (isset($mapping['sparse']) && is_array($mapping['sparse'])) > 1) {
            throw new \InvalidArgumentException('Multiple index specifications found among index, unique, and/or sparse fields');
        }

        // Index this field if either "index", "unique", or "sparse" are set
        $keys = array($name => 'asc');

        /* The "order" option is only used in the index specification and should
         * not be passed along as an index option.
         */
        if (isset($mapping['index']['order'])) {
            $keys[$name] = $mapping['index']['order'];
            unset($mapping['index']['order']);
        } elseif (isset($mapping['unique']['order'])) {
            $keys[$name] = $mapping['unique']['order'];
            unset($mapping['unique']['order']);
        } elseif (isset($mapping['sparse']['order'])) {
            $keys[$name] = $mapping['sparse']['order'];
            unset($mapping['sparse']['order']);
        }

        /* Initialize $options from any array value among index, unique, and
         * sparse. Any boolean values for unique or sparse should be merged into
         * the options afterwards to ensure consistent parsing.
         */
        $options = array();
        $unique = null;
        $sparse = null;

        if (isset($mapping['index']) && is_array($mapping['index'])) {
            $options = $mapping['index'];
        }

        if (isset($mapping['unique'])) {
            if (is_array($mapping['unique'])) {
                $options = $mapping['unique'] + array('unique' => true);
            } else {
                $unique = (boolean) $mapping['unique'];
            }
        }

        if (isset($mapping['sparse'])) {
            if (is_array($mapping['sparse'])) {
                $options = $mapping['sparse'] + array('sparse' => true);
            } else {
                $sparse = (boolean) $mapping['sparse'];
            }
        }

        if (isset($unique)) {
            $options['unique'] = $unique;
        }

        if (isset($sparse)) {
            $options['sparse'] = $sparse;
        }

        $class->addIndex($keys, $options);
    }

    private function addMappingFromReference(ClassMetadata $class, $fieldName, $reference, $type)
    {
        $mapping = array(
            'cascade' => isset($reference['cascade']) ? $reference['cascade'] : null,
            'orphanRemoval' => isset($reference['orphanRemoval']) ? $reference['orphanRemoval'] : false,
            'type' => $type,
            'reference' => true,
            'simple' => isset($reference['simple']) ? (boolean) $reference['simple'] : false,
            'targetDocument' => isset($reference['targetDocument']) ? $reference['targetDocument'] : null,
            'fieldName' => $fieldName,
            'inversedBy' => isset($reference['inversedBy']) ? (string) $reference['inversedBy'] : null,
            'mappedBy' => isset($reference['mappedBy']) ? (string) $reference['mappedBy'] : null,
            'repositoryMethod' => isset($reference['repositoryMethod']) ? (string) $reference['repositoryMethod'] : null,
            'limit' => isset($reference['limit']) ? (integer) $reference['limit'] : null,
            'skip' => isset($reference['skip']) ? (integer) $reference['skip'] : null,
            'discriminatorField' => isset($reference['discriminatorField']) ? $this->parseDiscriminatorField($reference['discriminatorField']) : null,
            'discriminatorMap' => isset($reference['discriminatorMap']) ? $reference['discriminatorMap'] : null,
            'defaultDiscriminatorValue' => isset($reference['defaultDiscriminatorValue']) ? $reference['defaultDiscriminatorValue'] : null,
            'sort' => isset($reference['sort']) ? $reference['sort'] : [],
            'criteria' => isset($reference['criteria']) ? $reference['criteria'] : [],
        );
        if (isset($reference['name'])) {
            $mapping['name'] = $reference['name'];
        }

        if (isset($reference['fetch'])) {
            $mapping['fetch'] = constant('Redking\ParseBundle\Mapping\ClassMetadata::FETCH_' . $reference['fetch']);
        }

        if ($type === ParseClassMetadata::MANY) {
            $mapping['implementation'] = isset($mapping['implementation']) ? constant('Redking\ParseBundle\Mapping\ClassMetadata::ASSOCIATION_IMPL_' . strtoupper($reference['implementation'])) : ParseClassMetadata::ASSOCIATION_IMPL_ARRAY;
            $mapping['lazyLoad'] = isset($reference['lazyLoad']) ? $reference['lazyLoad'] : true;
            $mapping['includeKeys'] = isset($reference['includeKeys']) ? $reference['includeKeys'] : null;
        }
        $this->addFieldMapping($class, $mapping);
    }

    /**
     * Parses the class or field-level "discriminatorField" option.
     *
     * If the value is an array, check the "name" option before falling back to
     * the deprecated "fieldName" option (for BC). Otherwise, the value must be
     * a string.
     *
     * @param array|string $discriminatorField
     *
     * @return string
     *
     * @throws \InvalidArgumentException if the value is neither a string nor an
     *                                   array with a "name" or "fieldName" key.
     */
    private function parseDiscriminatorField($discriminatorField)
    {
        if (is_string($discriminatorField)) {
            return $discriminatorField;
        }

        if (!is_array($discriminatorField)) {
            throw new \InvalidArgumentException('Expected array or string for discriminatorField; found: '.gettype($discriminatorField));
        }

        if (isset($discriminatorField['name'])) {
            return (string) $discriminatorField['name'];
        }

        if (isset($discriminatorField['fieldName'])) {
            return (string) $discriminatorField['fieldName'];
        }

        throw new \InvalidArgumentException('Expected "name" or "fieldName" key in discriminatorField array; found neither.');
    }

    /**
     * {@inheritdoc}
     */
    protected function loadMappingFile($file): array
    {
        return Yaml::parse(file_get_contents($file));
    }
}


text:
/* eslint no-script-url: 0 */

var React = require('react');
var { Glyph, Container, Table, Col, Row, Card, Button } = require('elemental');

var ExampleSource = require('../components/ExampleSource');

const GLYPH_COLOR_TYPES = [
	'danger',
	'default',
	'muted',
	'primary',
	'success',
	'warning'
];

var Glyphs = React.createClass({
	displayName: 'VIEW_Glyphs',
	renderGlyphColorTypes() {
		return GLYPH_COLOR_TYPES.map(color => {
			return {color}{' '};
		});
	},
	renderGlyphColors(icon) {
		return GLYPH_COLOR_TYPES.map(color => {
			return (

					<Glyph icon={icon} type={color} />
					{' '}
					{color}

			);
		});
	},
	renderGlyphColorsExample(icon) {
		var stringRep = '';
		GLYPH_COLOR_TYPES.forEach(color => {
			stringRep += `<Glyph icon='${icon}' type='${color}' />\n`;
		});
		return stringRep;
	},
	renderGlyphGrid(perRow) {
		var rows = [];
		var colSize = '1/' + perRow;

		var row = [];
		Glyph.names.forEach((glyph, index) => {
			if (index % perRow === 0) {
				rows.push(row);
				row = [];
			}
			row.push(glyph);
		});

		return rows.map((row, index) => {
				var cols = row.map(glyph => {
					return (
						<Col key={'col_'+glyph} sm={colSize}>
							<Card className="code-example--glyph__icon">
								<Glyph key={glyph} icon={glyph} />

									{glyph}

							</Card>
						</Col>
					);
				});
				return <Row key={'row_' + index}>{cols}</Row>;
		});

	},
	render () {
		return (
			<Container maxWidth={800} className="demo-container">

Glyphs

Basic Example

						<Glyph icon="thumbsup" />

					<ExampleSource>
						{`
							<Glyph icon="thumbsup" />
						`}
					</ExampleSource>

								Prop
								Type
								Default
								Description

								icon
								string
								''
								Required. Icon name from Octicons.

								type
								enum
								'default'

									One of:

									{this.renderGlyphColorTypes()}

Icons

Elemental uses the wonderful Octicons Suite from GitHub

				{this.renderGlyphGrid(6)}

Colors

Glyph colors can be customized.

Glyph colors

							{this.renderGlyphColors('heart')}

					<ExampleSource>
						{this.renderGlyphColorsExample('heart')}
					</ExampleSource>

Buttons

Glyphs work well with Buttons.

Buttons

							<Button type="primary"><Glyph icon="beaker"/></Button>
							{' '}
							<Button type="danger"><Glyph icon="flame"/></Button>
							{' '}
							<Button type="success"><Glyph icon="squirrel"/></Button>
							{' '}
							<Button type="warning"><Glyph icon="beaker"/></Button>

					<ExampleSource>
						{`
							<Button type="primary"><Glyph icon="beaker" /></Button>
							<Button type="danger"><Glyph icon="flame" /></Button>
							<Button type="success"><Glyph icon="squirrel" /></Button>
							<Button type="warning"><Glyph icon="beaker" /></Button>
						`}
					</ExampleSource>

Link Buttons

							<Button type="link"><Glyph icon="bug"/></Button>
							<Button type="link"><Glyph icon="squirrel" type="danger" /></Button>
							<Button type="link-delete"><Glyph icon="circle-slash" /></Button>

					<ExampleSource>
						{`
							<Button type="link"><Glyph icon="bug" /></Button>
							<Button type="link"><Glyph icon="squirrel" type="danger" /></Button>
							<Button type="link-delete"><Glyph icon="delete" /></Button>
						`}
					</ExampleSource>

			</Container>
		);
	}
});

module.exports = Glyphs;


text:
import { BattleOutcome, UnderEachTeam } from "battlemovr";
import { MenuDialogRaw } from "menugraphr";

import { BattleTeam } from "../../Battles";

/**
 * Texts for the player attempting to flee a battle.
 */
export interface FleeTextGenerators {
    /**
     * Text for the player failing to flee a battle.
     */
    fail(): string;

    /**
     * Text for the player succeeding in fleeing a battle.
     */
    success(): string;
}

/**
 * Generates text for a Pokemon using a move.
 *
 * @param team   Team controlling the Pokemon.
 * @param pokemon   Name of the Pokemon using the move.
 * @param move   Name of the move.
 * @returns Text for the Pokemon using the move.
 */
export type MoveTextGenerator = (
    team: BattleTeam,
    pokemon: string,
    move: string
) => MenuDialogRaw;

/**
 * Generates text for a Pokemon being retracted.
 *
 * @param team   Team controlling the Pokemon.
 * @param pokemon   Name of the Pokemon being retracted.
 * @returns Text for the Pokemon being retracted.
 */
export type RetractTextGenerator = (team: BattleTeam, pokemon: string) => MenuDialogRaw;

/**
 * Generates text for a Pokemon being sent out.
 *
 * @param team   Team controlling the Pokemon.
 * @param pokemon   Name of the Pokemon being sent out.
 * @returns Text for the Pokemon being sent out.
 */
export type SendOutTextGenerator = (team: BattleTeam, pokemon: string) => MenuDialogRaw;

/**
 * Generates text for a team winning a battle.
 *
 * @param victor   Winning team.
 * @param loser   Losing team.
 * @returns Text for the victor winning a battle.
 */
export type VictoryTextGenerator = (victor: BattleTeam, loser: BattleTeam) => MenuDialogRaw;

/**
 * Generates text for a battle starting.
 *
 * @param team   Team starting a battle.
 * @returns Text for the team starting a battle.
 */
export type TextStartGenerator = (team: BattleTeam) => MenuDialogRaw;

/**
 * Generates text for a battle concluding.
 *
 * @param outcome   Why the battle finished.
 * @returns Text for the battle concluding.
 */
export type BattleOutcomeTextGenerator = (outcome: BattleOutcome) => MenuDialogRaw;

/**
 * Generators for a battle concluding, keyed by outcome descriptor.
 */
export interface BattleOutcomeTextGenerators {
    [i: number /* BattleOutcome */]: BattleOutcomeTextGenerator;
}

/**
 * Texts a team uses in battle.
 */
export interface TeamsTexts {
    /**
     * Text for a Pokemon using a move.
     */
    move: MoveTextGenerator;

    /**
     * Text for a trainer retracting a Pokemon.
     */
    retract: RetractTextGenerator;

    /**
     * Text for a trainer sending out a Pokemon.
     */
    sendOut: SendOutTextGenerator;
}
/**
 * Optional texts to display in battle menus.
 */
export interface PartialTextGenerators {
    /**
     * Text to display after a battle victory when in the real world again.
     */
    afterBattle?(): MenuDialogRaw;

    /**
     * Texts for the player attempting to flee the battle.
     */
    flee?: Partial<FleeTextGenerators>;

    /**
     * Text generators for the outcome of the battle.
     */
    outcomes?: BattleOutcomeTextGenerators;

    /**
     * Text for when the battle starts. The opponent's name is between the strings.
     */
    start?: Partial<TextStartGenerator>;

    /**
     * Texts specific to each team.
     */
    teams?: UnderEachTeam<Partial<TeamsTexts>>;
}

/**
 * Texts to display in battle menus.
 */
export interface BattleTextGenerators extends PartialTextGenerators {
    /**
     * Texts for the player attempting to flee the battle.
     */
    flee: FleeTextGenerators;

    /**
     * Text generators for the outcome of the battle.
     */
    outcomes: BattleOutcomeTextGenerators;

    /**
     * Text for when the battle starts. The opponent's name is between the strings.
     */
    start: TextStartGenerator;

    /**
     * Texts specific to each team.
     */
    teams: UnderEachTeam<TeamsTexts>;

    /**
     * Text to display after a battle victory when in the real world again.
     */
    afterBattle?(): MenuDialogRaw;
}

/**
 * Battle text generators.
 */
export class Texts {
    /**
     * Default options for battle texts.
     */
    public readonly defaultBattleTexts: BattleTextGenerators = {
        flee: {
            fail: (): string => "Can't escape!",
            success: (): string => "Got away safely!",
        },
        outcomes: {},
        teams: {
            player: {
                move: (_team: BattleTeam, pokemon: string, move: string): string =>
                    `${pokemon} used ${move}!`,
                retract: (_team: BattleTeam, pokemon: string): string =>
                    `${pokemon}, enough! Come back!`,
                sendOut: (_team: BattleTeam, pokemon: string): string => `Go, ${pokemon}!`,
            },
            opponent: {
                move: (_team: BattleTeam, pokemon: string, move: string): string =>
                    `ENEMY ${pokemon} used ${move}!`,
                retract: (): string => "wat",
                sendOut: (team: BattleTeam, pokemon: string): string => {
                    let text = ` sent out ${pokemon}!`;

                    if (team.leader) {
                        text = `${team.leader.nickname.join("")}${text}`;
                    }

                    return "ENEMY " + text;
                },
            },
        },
        start: (team: BattleTeam): string =>
            team.leader
                ? `${team.leader.nickname.join("")} wants to fight!`
                : `WILD ${team.actors[0].title.join("")} appeared!`,
    };
}


text:
package org.springframework.boot.web.embedded.tomcat;

import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;

/**
 * TLD skip and scan patterns used by Spring Boot.
 *
 * @author Phillip Webb
 * @author Andy Wilkinson
 */
final class TldPatterns {

	private static final Set<String> TOMCAT_SKIP;

	static {
		// Same as Tomcat
		Set<String> skipPatterns = new LinkedHashSet<>();
		skipPatterns.add("ant-*.jar");
		skipPatterns.add("aspectj*.jar");
		skipPatterns.add("commons-beanutils*.jar");
		skipPatterns.add("commons-codec*.jar");
		skipPatterns.add("commons-collections*.jar");
		skipPatterns.add("commons-dbcp*.jar");
		skipPatterns.add("commons-digester*.jar");
		skipPatterns.add("commons-fileupload*.jar");
		skipPatterns.add("commons-httpclient*.jar");
		skipPatterns.add("commons-io*.jar");
		skipPatterns.add("commons-lang*.jar");
		skipPatterns.add("commons-logging*.jar");
		skipPatterns.add("commons-math*.jar");
		skipPatterns.add("commons-pool*.jar");
		skipPatterns.add("geronimo-spec-jaxrpc*.jar");
		skipPatterns.add("h2*.jar");
		skipPatterns.add("hamcrest*.jar");
		skipPatterns.add("hibernate*.jar");
		skipPatterns.add("jaxb-runtime-*.jar");
		skipPatterns.add("jmx*.jar");
		skipPatterns.add("jmx-tools-*.jar");
		skipPatterns.add("jta*.jar");
		skipPatterns.add("junit-*.jar");
		skipPatterns.add("httpclient*.jar");
		skipPatterns.add("log4j-*.jar");
		skipPatterns.add("mail*.jar");
		skipPatterns.add("org.hamcrest*.jar");
		skipPatterns.add("slf4j*.jar");
		skipPatterns.add("tomcat-embed-core-*.jar");
		skipPatterns.add("tomcat-embed-logging-*.jar");
		skipPatterns.add("tomcat-jdbc-*.jar");
		skipPatterns.add("tomcat-juli-*.jar");
		skipPatterns.add("tools.jar");
		skipPatterns.add("wsdl4j*.jar");
		skipPatterns.add("xercesImpl-*.jar");
		skipPatterns.add("xmlParserAPIs-*.jar");
		skipPatterns.add("xml-apis-*.jar");
		TOMCAT_SKIP = Collections.unmodifiableSet(skipPatterns);
	}

	private static final Set<String> ADDITIONAL_SKIP;

	static {
		// Additional typical for Spring Boot applications
		Set<String> skipPatterns = new LinkedHashSet<>();
		skipPatterns.add("antlr-*.jar");
		skipPatterns.add("aopalliance-*.jar");
		skipPatterns.add("aspectjrt-*.jar");
		skipPatterns.add("aspectjweaver-*.jar");
		skipPatterns.add("classmate-*.jar");
		skipPatterns.add("dom4j-*.jar");
		skipPatterns.add("ecj-*.jar");
		skipPatterns.add("ehcache-core-*.jar");
		skipPatterns.add("hibernate-core-*.jar");
		skipPatterns.add("hibernate-commons-annotations-*.jar");
		skipPatterns.add("hibernate-entitymanager-*.jar");
		skipPatterns.add("hibernate-jpa-2.1-api-*.jar");
		skipPatterns.add("hibernate-validator-*.jar");
		skipPatterns.add("hsqldb-*.jar");
		skipPatterns.add("jackson-annotations-*.jar");
		skipPatterns.add("jackson-core-*.jar");
		skipPatterns.add("jackson-databind-*.jar");
		skipPatterns.add("jandex-*.jar");
		skipPatterns.add("javassist-*.jar");
		skipPatterns.add("jboss-logging-*.jar");
		skipPatterns.add("jboss-transaction-api_*.jar");
		skipPatterns.add("jcl-over-slf4j-*.jar");
		skipPatterns.add("jdom-*.jar");
		skipPatterns.add("jul-to-slf4j-*.jar");
		skipPatterns.add("log4j-over-slf4j-*.jar");
		skipPatterns.add("logback-classic-*.jar");
		skipPatterns.add("logback-core-*.jar");
		skipPatterns.add("rome-*.jar");
		skipPatterns.add("slf4j-api-*.jar");
		skipPatterns.add("spring-aop-*.jar");
		skipPatterns.add("spring-aspects-*.jar");
		skipPatterns.add("spring-beans-*.jar");
		skipPatterns.add("spring-boot-*.jar");
		skipPatterns.add("spring-core-*.jar");
		skipPatterns.add("spring-context-*.jar");
		skipPatterns.add("spring-data-*.jar");
		skipPatterns.add("spring-expression-*.jar");
		skipPatterns.add("spring-jdbc-*.jar,");
		skipPatterns.add("spring-orm-*.jar");
		skipPatterns.add("spring-oxm-*.jar");
		skipPatterns.add("spring-tx-*.jar");
		skipPatterns.add("snakeyaml-*.jar");
		skipPatterns.add("tomcat-embed-el-*.jar");
		skipPatterns.add("validation-api-*.jar");
		skipPatterns.add("xml-apis-*.jar");
		ADDITIONAL_SKIP = Collections.unmodifiableSet(skipPatterns);
	}

	static final Set<String> DEFAULT_SKIP;

	static {
		Set<String> skipPatterns = new LinkedHashSet<>();
		skipPatterns.addAll(TOMCAT_SKIP);
		skipPatterns.addAll(ADDITIONAL_SKIP);
		DEFAULT_SKIP = Collections.unmodifiableSet(skipPatterns);
	}

	private static final Set<String> TOMCAT_SCAN;

	static {
		Set<String> scanPatterns = new LinkedHashSet<>();
		scanPatterns.add("log4j-taglib*.jar");
		scanPatterns.add("log4j-web*.jar");
		scanPatterns.add("log4javascript*.jar");
		scanPatterns.add("slf4j-taglib*.jar");
		TOMCAT_SCAN = Collections.unmodifiableSet(scanPatterns);
	}

	static final Set<String> DEFAULT_SCAN;

	static {
		Set<String> scanPatterns = new LinkedHashSet<>();
		scanPatterns.addAll(TOMCAT_SCAN);
		DEFAULT_SCAN = Collections.unmodifiableSet(scanPatterns);
	}

	private TldPatterns() {
	}

}


text:
"""
"""
from __future__ import absolute_import

from ..unitquantity import UnitQuantity
from .mass import gram, kg, ounce, lb
from .length import cm, m, ft
from .time import s
from .acceleration import g_0

N = newton = UnitQuantity(
    'newton',
    kg*m/s**2,
    symbol='N',
    aliases=['newtons']
)
dyne = UnitQuantity(
    'dyne',
    gram*cm/s**2,
    symbol='dyn',
    aliases=['dynes']
)
pond = UnitQuantity(
    'pond',
    g_0*kg,
    symbol='p',
    aliases=['ponds']
)
kgf = force_kilogram = kilogram_force = UnitQuantity(
    'kilogram_force',
    kg*g_0,
    symbol='kgf',
    aliases=['force_kilogram']
)
ozf = force_ounce = ounce_force = UnitQuantity(
    'ounce_force',
    ounce*g_0,
    symbol='ozf',
    aliases=['force_ounce']
)
lbf = force_pound = pound_force = UnitQuantity(
    'pound_force',
    lb*g_0,
    symbol='lbf',
    aliases=['force_pound']
)
poundal = UnitQuantity(
    'poundal',
    lb*ft/s**2,
    symbol='pdl',
    aliases=['poundals']
)
gf = gram_force = force_gram = UnitQuantity(
    'gram_force',
    gram*g_0,
    symbol='gf',
    aliases=['force_gram']
)
force_ton = ton_force = UnitQuantity(
    'ton_force',
    2000*force_pound,
    aliases=['force_ton'])
kip = UnitQuantity(
    'kip', 1000*lbf
)

del UnitQuantity, gram, kg, cm, m, s, g_0


text:
<!DOCTYPE html>

    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<meta name="generator" content="Hugo 0.30.2" />

<title>Ed Reform - @alspur</title>
<meta property="og:title" content="Ed Reform - @alspur">

<link href="/tags/ed-reform/index.xml" rel="alternate" type="application/rss+xml" title="@alspur" />

<link href='//cdn.bootcss.com/highlight.js/9.11.0/styles/github.min.css' rel='stylesheet' type='text/css' />

<link rel="stylesheet" href="/css/fonts.css" media="all">
<link rel="stylesheet" href="/css/main.css" media="all">

About

Projects

Archive

Resume

November 11, 2017

      Measuring Success in Education

Do low-stakes international assessments of student performance accurately describe student ability? According to this recent NBER Working paper, a country’s results may depend on their students’ intrinsic motivation to do well.

The authors used an experimental approach that offered treatment students a small financial incentive to do well on a test. Students in the treatment group were told just before the test that an envelope with the equivalent of $25 (US) was theirs, but that $1 would be subtracted for each incorrect answer. The researchers conducted the experiment in three high schools in China and two in the US. They found no impact of the financial incentive in China, but the effect size in the US was 0.20-0.23 standard deviations.

The authors conclude that the massive difference in treatment effect between countries indicates that “success on low states assessments does not solely reflect differences in ability between students across countries” and that “low-stakes tests do not measure and compare ability in isolation.”

With this in mind, researchers, policymakers, and the public should be a little more cautious when interpreting the results of low-stakes assessments like PISA. Student motivation clearly plays a significant role in the results of a country’s performance - a topic that deserves further investigation. For example, NCES will release new NAEP results in early 2018. Does student motivation vary significantly for NAEP across state lines? If so, how much of a role (if any) is it contributing to state performance?

Low-stakes assessments can be informative, but they may be measuring more than student ability. This study is a reminder to policymakers and advocates to exercise caution when comparing performance on these tests across jurisdictions.

October 10, 2016

      Book Notes - Why Knowledge Matters

E.D. Hirsch is a self-described “hedgehog,” viewing the world through the lens of one big idea:

“[T]he achievement gap is chiefly a knowledge gap and a language gap. It can be greatly ameliorated by knowledge-based schooling.”

The inverse of Hirsch’s “big idea” is the skills-based approach to education that drives instruction in the vast majority of American schools. The Schools We Need & Why We Don’t Have Them” was my first introduction to the “knowledge vs. skills” debate. This book re-introduces Hirsch’s basic case and extends it based on new evidence from the world of cognitive science and the experience of French schools over the past several decades.

The Big Idea

Reading, critical thinking, and problem solving are not general skills that can be developed and applied to any context. Like most human skills, they are domain-specific, becoming stronger or weaker based on a person’s background knowledge of the topic. Hirsch recommends providing all students with a curriculum in the early grades that focuses on developing knowledge, not skills, to promote equity and achievement among all students.

Key Passages

I’ve heard many well-intentioned people, including educators, state that in the age of Google, it’s less important for students to learn a bunch of information they could just look up. Their belief is that we need to equip students with the critical thinking and problem solving skills to apply these tools to the problems they are tackling.

Hirsch provides a great deal of evidence to support the need focusing on building knowledge instead of generalizable skills, but the most powerful rebuttal to this line of thinking is his explanation of the “Matthew Effect” in education:

Reference works, inlcluding those available on the Internet, are immensely valuable to already knowledgeable people. Google is not an equal-opportunity fact-finder; it rewards those already in the know. Instead of being an agent of equality, Google rewards cognitive insiders. It consolidates educational inequity. Just as it takes money to make money, it takes knowledge to gain knowldege.

Throughout the book, Hirsch shows how the shift from a universal knowledge-based curriculum in France to a locally-determined and skills-focused approach in 1990 led to disastrous results:

The new localizing and indivudalizing of the schools had been proposed as a way of overcoming the reproduction of social stratification. But the educational results went the opposite way, intensifying inequalities. As the French data from 1987 to 2007 show, the new 1990 arrangements greatly intensified the social reproduction they were supposed to diminish. They systematically deprived poor children of the enabling knowledge that rich children had acquired from their home environments.

Hirsch’s proposed solution, replacing a individual-focused reading curriculum based on “leveled readers” with a knowledge-centered communal curriculum, is paradoxically a better way to encourage students to develop as individuals:

It must not be assumed that a different approach - whole-class instruction of real books and subject matters - means grey uniformity. On the contrary, real knowledge breeds real interest and individuality.

This principle is extended later in the book:

It’s in relation to the community that the individual develops. Only by mastering the shared knowledge and norms of the community can one diverge from those norms effectively.

The Core Knowledge curriculum, developed by Hirsch, is one approach to empowering students with a foundation of communal knowledge. He acknowledges that there can be some differentiation in early grade curricula based on local values while still building a strong foundation of knowledge:

Rival elementary curriculums may reflect rival values but all responsible ones will exhibit a great deal of overlap - out of a sense of obligation to the children who will need knowledge represented by those words in order to function well in American society.

Actionable Items

Hirsch makes a convincing case for the power of a content-rich, coherent, and cumulative curriculum to build a strong foundation of literacy. While research has shown the strong impact of a high-quality curriculum on student achievement, there’s a paucity of publicly available data on school curriculum. In some cases, districts may not even know which textbooks are being used in their classrooms.

One can agree or disagree with the case Hirsch makes, but we should all be able to agree that curricular choices play an important role in student achievement. It would make sense to make information about those choices more transparent so that:

Educators would know which schools/districts are using similar/identical approaches, creating opportunities for highly relevant cross-school/district collaboration.

Researchers could evaluate the relative strength/weakness of curriculum implemented in public schools.

School boards and local school councils would have significantly more information to inform adoption/renewal of curriculum.

None of this is possible without transparent data on curriculum. Collecting information about such an important component of public education shouldn’t require a FOIA request.

September 9, 2016

      The World Turned Upside Down

After 11 years of litigation, Judge Thomas Moukawsher issued a seismic decision in the CCJEF school finance lawsuit. In the decision, Moukawsher not only eviscerated Connecticut’s school finance system, he also detailed flaws in the state’s approach to teacher evaluation, teacher compensation, the lack of clear definitions of success in elementary and secondary education, and gave the state 180 days to come up with a solution to all of it.

There’s a lot to digest, but here are my initial thoughts:

It’s good to see the ruling bring more attention to the distribution of funding than the overall allocation. As I argued nearly two years ago, actual appropriations are not driven by the ECS formula, leading to huge funding disparities (positive and negative) that affect thousands of students.

I’m sympathetic with the desire for better approaches to teacher evaluation and compensation, I’m not sure the order in this ruling is the best way to actually improve how those systems operate. To paraphrase Rick Hess, while judicial orders can make people do things, it cannot make people do those things well.

The timeline is super-aggressive. Staffers at the Connecticut State Department of Education are going to have a busy winter.

Will the state’s proposed solution include magnets, charters, and/or other choice options? The state already spends a significant amount of funding on these schools and the ruling sounds like a mandate for a comprehensive solution. It will be interesting to see how they address this question.

There’s much more to digest in this decision. While the plaintiffs got a partial victory, they’re about to learn an important lesson:

Winning is easy. Governing’s harder.

August 8, 2016

      Long-Term Orientation and Educational Performance

If there’s one common thread between Robin Lake relating The Boys in the Boat to schools, Neerav Kingsland on a recent charter study, and Robert Pondiscio on Hillbilly Elegy, it’s that culture plays a huge role in education. A new NBER Working Paper provides powerful evidence that it may be even more critical than was previously understood.

The authors examine the performance of first and second generation immigrant students in Florida to understand the relationship between the “long-term orientation” of the cultures they come from to their educational outcomes. They find that students from families from countries with a high degree of long-term orientation score higher and grow more over time than similar students from countries with lower long-term orientation. They also are more likely to have better attendance, fewer disciplinary incidents, and enroll in more advanced classes.

To put the size of the “long-term orientation” effect into context, the authors note that their data showed that a student of a mother holding a college degree scored 40% higher in math than the child of a high school dropout. The same data shows that holding everything else equal, moving from the lowest long-term orientation measure (Puerto Rico) to the highest (South Korea) translates to a 73% higher math score, almost twice the impact of a parent with a college education compared to a high school dropout.

Education reform is often focused on factors that can be addressed via policy change, like human capital management, standards/curriculum, and school governance/accountability. Yet as challenging as those issues are, we can’t ignore the power of culture, and more specifically, values that support delayed gratification. Fordham’s Education for Upward Mobility conference is a start, but given the power of culture to impact educational outcomes, this conversation deserves a more prominent place within the ed reform community.

      Aggregation Theory and Education

Five years ago, Marc Andressen took to the pages of the Wall Street Journal to describe how software was “eating the world”:

“More and more major businesses and industries are being run on software and delivered as online services—from movies to agriculture to national defense. Many of the winners are Silicon Valley-style entrepreneurial technology companies that are invading and overturning established industry structures. Over the next 10 years, I expect many more industries to be disrupted by software, with new world-beating Silicon Valley companies doing the disruption in more cases than not.”

It’s not hard to come up with a list of examples of this prediction coming true, from taxis (Uber) to hotels (AirBnB), but software-driven disruption has yet to significantly change K-12 education. Existing online education offerings, such as Coursera and Khan Academy, show promise, but few would argue that their impact on K-12 education to date could be described as anything close to “disruptive.” Jay P. Greene explains why all-online education has failed to gain traction:

Online courses appear to be less effective in getting the average student to learn and I suspect the problem is that teaching online is less able to create social communities and authentic relationships that are necessary to motivate students.  Having a human being in front of students who would be disappointed if students did not learn the material seems important and something that online instruction has not been able to simulate.  Students appear to be better motivated to learn when they have an in-person, authentic relationship with a teacher and when they try to please that teacher by working hard to learn.  Digital instruction or a human being on the other side of the internet may not be able to create that same relationship and motivation.

The question remains: if K-12 education is going to be disrupted by software, what would it look like? Is there a way to combine the scalability of software with the power of strong interpersonal relationships?

Delving deeper into the disruption of other industries might give us an answer. Ben Thompson’s Aggregation Theory provides a great framework to understand how the Internet is changing entire sectors of our economy:

“The value chain for any given consumer market is divided into three parts: suppliers, distributors, and consumers/users. The best way to make outsize profits in any of these markets is to either gain a horizontal monopoly in one of the three parts or to integrate two of the parts such that you have a competitive advantage in delivering a vertical solution. In the pre-Internet era the latter depended on controlling distribution.

For example, printed newspapers were the primary means of delivering content to consumers in a given geographic region, so newspapers integrated backwards into content creation (i.e. supplier) and earned outsized profits through the delivery of advertising. A similar dynamic existed in all kinds of industries, such as book publishers (distribution capabilities integrated with control of authors), video (broadcast availability integrated with purchasing content), taxis (dispatch capabilities integrated with medallions and car ownership), hotels (brand trust integrated with vacant rooms), and more. Note how the distributors in all of these industries integrated backwards into supply: there have always been far more users/consumers than suppliers, which means that in a world where transactions are costly owning the supplier relationship provides significantly more leverage.

The fundamental disruption of the Internet has been to turn this dynamic on its head. First, the Internet has made distribution (of digital goods) free, neutralizing the advantage that pre-Internet distributors leveraged to integrate with suppliers. Secondly, the Internet has made transaction costs zero, making it viable for a distributor to integrate forward with end users/consumers at scale.”

Applying Aggregation Theory, K-12 schools can be viewed as an industry that integrates the supply and distribution of educational content. Like newspapers, this integrated product is limited to a certain geographic area. It also helps us to understand that most popular education reforms only seek to improve certain aspects of this relationship instead of fundamentally changing it. For example, charter schools may introduce more competition for students (customers), but they still (generally) operate with the same model of integrated supply and distribution of educational content to students.

Some tech companies are trying to flip the equation by integrating the delivery of educational content more directly with the student experience, making the actual content more of a modular component. Apple, Google, and Facebook (in collaboration with Summit Charter Schools) each offer products that allow teachers to provide a digital classroom experience for their students while also maintaining in-person relationships. This may help them avoid the pitfalls of the all-online education efforts identified by Green, but can any of them truly change the integration of content and delivery in K-12 education?

Of the three large tech companies, I think the Facebook/Summit approach has the most potential to deliver Aggregation Theory-style disruption. The online classroom products of Apple and Google are mostly abstractions of a traditional classroom in the cloud: teachers assign work to each student, then students submit it by a given due date. All of this happens online, but everyone in the class is still on the same timeline.

The Facebook/Summit collaboration, named Basecamp, takes a more Netflix-ian approach to delivering content. Here’s how it’s described on the Basecamp website:

“Students work through playlists of content at their own pace and take assessments on demand. They also work with teachers to set short-term and long-term goals and connect these back to their daily actions.”

Under the Facebook/Summit approach, time is no longer a constraint for students that have already mastered certain content, nor is it a limitation for students that may need more time to fully grasp a concept before moving on to the next lesson.

This represents a fundamental shift in the relationship between students,how they learn, and  the role of educators in supporting students through that process. The Basecamp platform is still in its infancy and has much room to develop, particularly to address the needs of students with ß or limited English proficiency. However, we should still recognize the potential this approach could have in changing how K-12 schools operate.


text:
self.addEventListener("push", function(event) {
  self.registration.showNotification("Ping!", {
    body: "The Service Worker received a push notification",
    icon: "/static/icon.png",
    tag: "push-demo-notification"
  });
});


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:aop="http://www.springframework.org/schema/aop"
	xsi:schemaLocation="
	http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
	http://www.springframework.org/schema/context
	http://www.springframework.org/schema/context/spring-context-4.0.xsd
	http://www.springframework.org/schema/mvc
	http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
	http://www.springframework.org/schema/aop
	http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
	">

	<bean id="productDAO" class="com.hackerearth.sap.dao.ProductDAOImpl">
		<property name="sessionFactory" ref="hibernate4AnnotatedSessionFactory" />
	</bean>

	<bean id="productService" class="com.hackerearth.sap.dao.service.ProductServiceImpl">
		<property name="productDAO" ref="productDAO"></property>
	</bean>

</beans>


text:
<?php

namespace mkiselev\broadcasting\helpers;

class StrHelper
{
    /**
     * Determine if a given string matches a given pattern.
     *
     * @param  string $pattern
     * @param  string $value
     * @return bool
     */
    public static function is($pattern, $value)
    {
        if ($pattern == $value) {
            return true;
        }
        $pattern = preg_quote($pattern, '#');
        // Asterisks are translated into zero-or-more regular expression wildcards
        // to make it convenient to check if the strings starts with the given
        // pattern such as "library/*", making any string check convenient.
        $pattern = str_replace('\*', '.*', $pattern);

        return (bool)preg_match('#^' . $pattern . '\z#u', $value);
    }

    /**
     * Determine if a given string starts with a given substring.
     *
     * @param  string $haystack
     * @param  string|array $needles
     * @return bool
     */
    public static function startsWith($haystack, $needles)
    {
        foreach ((array)$needles as $needle) {
            if ($needle != '' && substr($haystack, 0, strlen($needle)) === (string)$needle) {
                return true;
            }
        }

        return false;
    }

    /**
     * Replace the first occurrence of a given value in the string.
     *
     * @param  string $search
     * @param  string $replace
     * @param  string $subject
     * @return string
     */
    public static function replaceFirst($search, $replace, $subject)
    {
        if ($search == '') {
            return $subject;
        }
        $position = strpos($subject, $search);
        if ($position !== false) {
            return substr_replace($subject, $replace, $position, strlen($search));
        }

        return $subject;
    }

}


text:
import { Injectable } from '@angular/core';
import { AuthHttp } from '../shared/auth-http.service';
import { ApiConfig } from '../../api.config';
import { Headers } from '@angular/http';
import { Observable } from 'rxjs/Observable';

@Injectable()
export class TestimonialService {

  public constructor(public authHttp: AuthHttp) {
  }

  public getAll(): Observable<any> {
    return this.authHttp.get(
      ApiConfig.url + '/api/testimonial', {
      headers: new Headers({
        'Content-Type': 'application/json'
      })
      }
    );
  }

  public getAllAdmin(): Observable<any> {
    return this.authHttp.get(
      ApiConfig.url + '/api/testimonial/admin', {
      headers: new Headers({
        'Content-Type': 'application/json'
      })
      }
    );
  }

  public post(testimonial: string, anonymous: boolean): Observable<any> {
    return this.authHttp.post(
      ApiConfig.url + '/api/testimonial',
      JSON.stringify({ text: testimonial, anonymous: anonymous }), {
      headers: new Headers({
        'Content-Type': 'application/json'
      })
    });
  }

  public toggleReviewed(testimonialId: string): Observable<any> {
    return this.authHttp.put(
      ApiConfig.url + '/api/testimonial/review',
      JSON.stringify({ id : testimonialId }), {
        headers: new Headers({
          'Content-Type': 'application/json'
        })
      }
    );
  }

  public delete(testimonial) {
    return this.authHttp.delete(
      ApiConfig.url + '/api/testimonial/' + testimonial._id, {
      headers: new Headers({
        'Content-Type': 'application/json'
      })
    });
  }

}


text:
CuSuite* CuApiGetSuite();
CuSuite* CuUtilGetSuite();
CuSuite* CuPlayerGetSuite();

void RunAllTests(void)
{
	CuString *output = CuStringNew();
	CuSuite* suite = CuSuiteNew();

	CuSuiteAddSuite(suite, CuUtilGetSuite());
	CuSuiteAddSuite(suite, CuPlayerGetSuite());
	CuSuiteAddSuite(suite, CuApiGetSuite());

	CuSuiteRun(suite);
	CuSuiteSummary(suite, output);
	CuSuiteDetails(suite, output);
	printf("%s\n", output->buffer);
}

int main(void)
{
	RunAllTests();
	return 0;
}


text:
from nltk.misc.chomsky import generate_chomsky
from nltk.misc.wordfinder import word_finder
from nltk.misc.minimalset import MinimalSet
from nltk.misc.babelfish import babelize_shell


text:
class IEQSQueryResultSourceInterface;
struct FEnvQueryInstance;

class AIMODULE_API FEQSSceneProxy : public FDebugRenderSceneProxy
{
public:
	FEQSSceneProxy(const UPrimitiveComponent* InComponent, const FString& ViewFlagName = TEXT("DebugAI"));
	FEQSSceneProxy(const UPrimitiveComponent* InComponent, const FString& ViewFlagName, const TArray<FSphere>& Spheres, const TArray<FText3d>& Texts);

	virtual void DrawDebugLabels(UCanvas* Canvas, APlayerController*) override;

	virtual FPrimitiveViewRelevance GetViewRelevance(const FSceneView* View) override;

#if  USE_EQS_DEBUGGER
	static void CollectEQSData(const UPrimitiveComponent* InComponent, const IEQSQueryResultSourceInterface* QueryDataSource, TArray<FSphere>& Spheres, TArray<FText3d>& Texts, TArray<EQSDebug::FDebugHelper>& DebugItems);
	static void CollectEQSData(const FEnvQueryResult* ResultItems, const FEnvQueryInstance* QueryInstance, float HighlightRangePct, bool ShouldDrawFailedItems, TArray<FSphere>& Spheres, TArray<FText3d>& Texts, TArray<EQSDebug::FDebugHelper>& DebugItems);
#endif
private:
	FEnvQueryResult QueryResult;
	// can be 0
	AActor* ActorOwner;
	const IEQSQueryResultSourceInterface* QueryDataSource;
	uint32 bDrawOnlyWhenSelected : 1;

	static const FVector ItemDrawRadius;

	bool SafeIsActorSelected() const;
};

UCLASS(hidecategories=Object)
class AIMODULE_API UEQSRenderingComponent : public UPrimitiveComponent
{
	GENERATED_UCLASS_BODY()

	FString DrawFlagName;
	uint32 bDrawOnlyWhenSelected : 1;

#if  USE_EQS_DEBUGGER || ENABLE_VISUAL_LOG
	EQSDebug::FQueryData DebugData;
#endif

	virtual FPrimitiveSceneProxy* CreateSceneProxy() override;
	virtual FBoxSphereBounds CalcBounds(const FTransform &LocalToWorld) const override;
	virtual void CreateRenderState_Concurrent() override;
	virtual void DestroyRenderState_Concurrent() override;
};


text:
using System;
using Xunit;

namespace Maybe.Tests
{
    public class MaybeSpec
    {
        [Fact]
        public void NullToMaybeShouldBeNothing()
        {
            string x = null;
            Assert.IsType<Nothing<string>>(x.ToMaybe());
        }

        [Fact]
        public void SomethingToMaybeShouldBeJust()
        {
            var x = "something";
            Assert.IsType<Just<string>>(x.ToMaybe());
        }

        [Fact]
        public void JustShouldReturnItsValue()
        {
            var something = new Just<string>("test");
            Assert.Equal("test", something.Return());
        }

        [Fact]
        public void NothingShouldReturnDefaultValue()
        {
            var nothing = new Nothing<string>();
            Assert.Null(nothing.Return());
        }

        [Fact]
        public void NothingShouldBindToNothing()
        {
            var nothing = new Nothing<int>();
            Assert.IsType<Nothing<int>>(nothing.Bind(x => (x + 1).ToMaybe()));
        }

        [Fact]
        public void JustShouldBind()
        {
            var something = 1.ToMaybe();
            Assert.Equal("1", something.Bind(x => x.ToString().ToMaybe()).Return());
        }

        [Fact]
        public void NothingToStringShouldReturnNothing()
        {
            Assert.Equal("Nothing", new Nothing<string>().ToString());
        }

        [Fact]
        public void JustToStringShouldReturnStringOfTheValue()
        {
            Assert.Equal("1", 1.ToMaybe().ToString());
        }

        [Fact]
        public void NothingShouldNotEqualToNull()
        {
            Assert.NotEqual(new Nothing<int>(), null);
        }

        [Fact]
        public void NothingShouldEqualToNothing()
        {
            Assert.Equal(new Nothing<int>(), new Nothing<int>());
        }

        [Fact]
        public void JustShouldNotEqualToNull()
        {
            Assert.NotEqual(new Just<int>(1), null);
        }

        [Fact]
        public void JustShoudlEqualJustWhenValuesAreEqual()
        {
            Assert.Equal(new Just<int>(1), new Just<int>(1));
        }

        [Fact]
        public void JustShouldNotEqualJustWhenValuesAreNotEqual()
        {
            Assert.NotEqual(new Just<int>(1), new Just<int>(2));
        }

        [Fact]
        public void JustShouldEqualJustWhenValueReferencesAreSame()
        {
            var x = "test";
            Assert.Equal(new Just<string>(x), new Just<string>(x));
        }

        [Fact]
        public void JustShouldNotEqualToNothing()
        {
            Assert.NotEqual(1.ToMaybe(), new Nothing<int>());
        }

        [Fact]
        public void SameMaybeValuesShouldBeEqual()
        {
            Assert.Equal(1.ToMaybe(), 1.ToMaybe());
        }

        [Fact]
        public void MaybeEqualityOperatorShouldReturnTrueForSameMaybes()
        {
            Assert.True(1.ToMaybe() == 1.ToMaybe());
        }

        [Fact]
        public void MaybeEqualityOperatorShouldReturnTrueForJustSameMaybes()
        {
            Assert.True(1.ToMaybe() == new Just<int>(1));
        }

        [Fact]
        public void MaybeInequalityOperatorShouldReturnTrueForDifferentMaybes()
        {
            Assert.True(1.ToMaybe() != 2.ToMaybe());
        }

        [Fact]
        public void NohingOfSameTypeShouldEqual()
        {
            Assert.True(new Nothing<int>() == new Nothing<int>());
        }

        [Fact]
        public void NullableToMaybeShouldReturnMaybeOfUnderlyingType()
        {
            var x = default(int?);
            Assert.IsAssignableFrom<Maybe<int>>(x.ToMaybe());
        }

        [Fact]
        public void NullableWithValueToMaybeShouldReturnJustValue()
        {
            int? x = 0;
            Assert.Equal(0.ToMaybe(), x.ToMaybe());
        }

        [Fact]
        public void MaybeToMaybeShouldBeMaybe()
        {
            var x = 0.ToMaybe();
            Assert.IsAssignableFrom<Maybe<int>>(x.ToMaybe());
        }

        [Fact]
        public void NullMaybeToMaybeShouldBeNothing()
        {
            Maybe<int> x = null;
            Assert.IsType<Nothing<int>>(x.ToMaybe());
        }
    }
}


text:
package cn.com.sparkle.raptor.core.transport.socket.nio;

import java.nio.channels.SocketChannel;
import java.util.concurrent.atomic.AtomicInteger;

import cn.com.sparkle.raptor.core.buff.IoBuffer;
import cn.com.sparkle.raptor.core.collections.LastAccessTimeLinkedList.Entity;
import cn.com.sparkle.raptor.core.handler.IoHandler;
import cn.com.sparkle.raptor.core.transport.socket.nio.exception.SessionHavaClosedException;

public interface IoSession {

//	public MaximumSizeArrayCycleQueue<ByteBuffer> getDebugQueue();

	public IoHandler getHandler();

	public long getLastActiveTime();

	public SocketChannel getChannel();

	public boolean isClose();

	public NioReadProcessor getReadProcessor();

	public NioWriteProcessor getWriteProcessor();

	public boolean isSuspendRead();

	public void suspendRead();

	public void continueRead();

	public AtomicInteger getRegisterBarrier();

	public boolean tryWrite(IoBuffer message, boolean flush) throws SessionHavaClosedException;

	public void write(Object msg, boolean tryFlushRightNow) throws SessionHavaClosedException;

	public IoBuffer getLastWaitSendBuffer();

	public void flushLastWaitSendBuffer(IoBuffer buffer);

	public void unlockPeekBuffer();

	public IoBuffer lockPeekBuffer();

	public void pollWaitSendBuff();

	public void attach(Object attachment);

	public Object attachment();

	/**
	 *
	 * @return true if close this connection successfully , false if close unsuccessfully or this connection has been closed.
	 *
	 */
	public void closeSession();

	public String getRemoteAddress();

	public String getLocalAddress();

	public Entity<IoSession> getLastAccessTimeLinkedListwrapSession();

	public boolean isTrafficJam();

	public void setisTrafficJam(boolean on);

}


text:
'''
Important Note:
	The server is intended to function as a dedicated server.
	It is recommended that a client is not run on the same machine as a server.
'''

import socket
import sys

def getinput():
    isCleanInput = False
    options = ('R', 'P', 'S')

    while(isCleanInput is False):
        clientInput = raw_input("Enter R, P, or S: ").upper()

        if clientInput in options:
            isCleanInput = True

    return clientInput

def usage():
    print 'USAGE: python client.py <ADDRESS> <PORT> <BUFFERSIZE>'
    exit(0)

if len(sys.argv) > 1:
    if sys.argv[1] in ('-h', '-H', '--help', '--HELP'):
        if(sys.argv[1].isDigit()):
            address = int(sys.argv[1])
        elif(not sys.argv[1].isDigit()):
            address = sys.argv[1]
        else:
            usage()
    else:
        if len(sys.argv) > 2:

            address = sys.argv[1]

            if sys.argv[2].isdigit():
                port = int(sys.argv[2])
                if port < 1000 or port > 65535:
                    usage()
        else:
            usage()

        if len(sys.argv) > 3:
            if sys.argv[3].isdigit():
                bufferSize = int(sys.argv[3])
                if bufferSize < 32 or bufferSize > 99999:
                    usage()
        else:
            bufferSize = 1024
else:
    usage()

choices = ('R', 'P', 'S')

target = (address, port)

clientSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
clientSocket.connect(target)

status = clientSocket.recv(bufferSize)
player = '-1'

if '0' in status:
    player = '1'
elif '1' in status:
    player = '2'

print(status)

if 'queue' in status:
    while status == 'queue':
        print 'The room is full, you have been added to the queue.'

        status = clientSocket.recv(bufferSize)
    print(status)
    print 'You are now connected!'

isPlaying = True

while isPlaying:
    clientInput = getinput()

    if clientInput:
        clientSocket.send(clientInput + str(player))
        result = clientSocket.recv(bufferSize)

        if 'wait' in result:
            print 'Waiting for your opponent!'

            result = clientSocket.recv(bufferSize)
            result = clientSocket.recv(bufferSize)

        if '0' in result:
            print 'The match was a draw!'
        elif '1' in result and player == '1':
            print 'You won!'
        elif '1' in result and player == '2':
            print 'You lost!'
        elif '2' in result and player == '1':
            print 'You lost!'
        elif '2' in result and player == '2':
            print 'You Won!'

        print 'Disconnecting to make room for other players. Thank you for playing SPEED-RPS!'

        clientSocket.close()
        isPlaying = False

def reQueue():
    isPlaying = False


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Sitecore.Data;
using Sitecore.Data.Fields;
using Sitecore.Data.Items;
using Synthesis.FieldTypes.Interfaces;

namespace Synthesis.Testing
{
	/// <summary>
	///     Represents a field that has a list of item ID references (a multilist, treelist, etc)
	/// </summary>
	[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Collection suffix would be confusing here")]
	public class TestItemReferenceListField : TestFieldType, IItemReferenceListField
	{
		private readonly List<IStandardTemplateItem> _standardTemplateItems;
		private readonly List<ID> _targetIds;

		public TestItemReferenceListField(ID[] targetsIds = null, IStandardTemplateItem[] targets = null)
		{
			_targetIds = (targetsIds ?? new ID[0]).ToList();
			_standardTemplateItems = (targets ?? new IStandardTemplateItem[0]).ToList();
		}

		/// <summary>
		///     Gets the set of IDs that make up the relationships
		/// </summary>
		public ReadOnlyCollection<ID> TargetIds => _targetIds.AsReadOnly();

		/// <summary>
		///     Gets the items that make up the relationships
		/// </summary>
		public ReadOnlyCollection<IStandardTemplateItem> TargetItems => _standardTemplateItems.AsReadOnly();

		/// <summary>
		///     Checks if the relationship has one or more relations
		/// </summary>
		public override bool HasValue => TargetIds.Count > 0;

		IEnumerator IEnumerable.GetEnumerator()
		{
			return ((IEnumerable) TargetIds).GetEnumerator();
		}

		public IEnumerator<ID> GetEnumerator()
		{
			return TargetIds.ToList().GetEnumerator();
		}

		public void Add(ID itemId)
		{
			_targetIds.Add(itemId);
		}

		public void Add(Item item)
		{
			Add(item.ID);
		}

		public void Add(IStandardTemplateItem item)
		{
			Add(item.Id);
		}

		public bool Remove(ID itemId)
		{
			_targetIds.Remove(itemId);

			return true;
		}

		public bool Remove(Item item)
		{
			return Remove(item.ID);
		}

		public bool Remove(IStandardTemplateItem item)
		{
			return Remove(item.Id);
		}

		public void Clear()
		{
			_targetIds.Clear();
			_standardTemplateItems.Clear();
		}

		public bool Contains(ID item)
		{
			return TargetIds.Contains(item);
		}

		public void CopyTo(ID[] array, int arrayIndex)
		{
			throw new NotImplementedException();
		}

		public int Count => TargetIds.Count;

		public bool IsReadOnly => false;

		public MultilistField ToMultilistField()
		{
			throw new NotImplementedException("Test field types cannot access Sitecore classes.");
		}
	}
}


text:
import { getMetadataArgsStorage } from "../../index";
/**
 * Creates a "level"/"length" column to the table that holds a closure table.
 */
export function TreeLevelColumn() {
    return function (object, propertyName) {
        // create and register a new column metadata
        var args = {
            target: object.constructor,
            propertyName: propertyName,
            mode: "treeLevel",
            options: {}
        };
        getMetadataArgsStorage().columns.push(args);
    };
}

//# sourceMappingURL=TreeLevelColumn.js.map


text:
import { uuid, verifyVariable } from 'utils/utils';

export const defaultState = {
  declarationType: 'HELP',
  label: '',
  position: 'AFTER_QUESTION_TEXT',
  id: null,
  TargetMode: '',
};

export const defaultForm = {
  declarationType: 'HELP',
  label: '',
  position: 'AFTER_QUESTION_TEXT',
  declarations: [],
  TargetMode: [],
};

function defaultCustum(activeQuestionnaire) {
  const form = defaultForm;
  form.TargetMode =
    Object.values(activeQuestionnaire).length > 0
      ? activeQuestionnaire.TargetMode.join()
      : [];
  return form;
}

export function formToState(form) {
  const { declarationType, label, position, TargetMode } = form;
  const id = form.id || uuid();

  return {
    id,
    label: verifyVariable(label),
    declarationType,
    position,
    TargetMode: TargetMode.split(','),
  };
}

export function formToComponentState(form) {
  const { declarations } = form;

  return declarations.reduce((acc, declaration) => {
    const state = formToState(declaration);

    return {
      ...acc,
      [state.id]: state,
    };
  }, {});
}

export function stateToForm(currentState, activeQuestionnaire) {
  const declarations = [];
  Object.keys(currentState).forEach(key => {
    const { id, declarationType, label, position, TargetMode } =
      currentState[key];
    declarations.push({
      id,
      label,
      declarationType,
      position,
      TargetMode: TargetMode.join(),
    });
  });
  return {
    ...defaultCustum(activeQuestionnaire),
    declarations,
  };
}

const Factory = (currentState = [], activeQuestionnaire = {}) => {
  return {
    formToComponentState: form => {
      if (form) currentState = formToComponentState(form);
      return currentState;
    },
    stateToForm: () => {
      return stateToForm(currentState, activeQuestionnaire);
    },
  };
};

export default Factory;


text:
require 'rails_helper'

describe LocalityPolicy do
  subject { described_class }

  let(:admin) { FactoryGirl.build_stubbed :user, role: 'admin' }
  let(:scyp) { FactoryGirl.build_stubbed :user, role: 'scyp' }
  let(:loc_contact) { FactoryGirl.build_stubbed :user, role: 'loc_contact' }
  let(:hosp_contact) { FactoryGirl.build_stubbed :user, role: 'hosp_contact' }
  let(:trainee) { FactoryGirl.build_stubbed :user, role: 'trainee' }
  let(:speaking_brother) { FactoryGirl.build_stubbed :user, role: 'speaking_brother' }
  let(:supporting_brother) { FactoryGirl.build_stubbed :user, role: 'supporting_brother' }
  let(:helper) { FactoryGirl.build_stubbed :user, role: 'helper' }
  let(:yp) { FactoryGirl.build_stubbed :user, role: 'yp' }
  let(:guest) { FactoryGirl.build_stubbed :user, role: 'guest' }

  permissions :index? do
    it 'allows admin users' do
      expect(subject).to permit(admin)
    end

    it 'allows scyp users' do
      expect(subject).to permit(scyp)
    end

    it 'does not allow hosp_contact users' do
      expect(subject).not_to permit(hosp_contact)
    end

    it 'does not allow trainee users' do
      expect(subject).not_to permit(trainee)
    end

    it 'does not allow speaking_brother users' do
      expect(subject).not_to permit(speaking_brother)
    end

    it 'does not allow supporting_brother users' do
      expect(subject).not_to permit(supporting_brother)
    end

    it 'does not allow helper users' do
      expect(subject).not_to permit(helper)
    end

    it 'does not allow yp users' do
      expect(subject).not_to permit(yp)
    end

    it 'does not allow guest users' do
      expect(subject).not_to permit(guest)
    end
  end

  permissions :show?, :new?, :edit?, :update?, :create?, :destroy? do
    it 'denies access to loc_contact users' do
      expect(subject).not_to permit(loc_contact)
    end

    it 'denies access to hosp_contact users' do
      expect(subject).not_to permit(hosp_contact)
    end

    it 'denies access to trainee users' do
      expect(subject).not_to permit(trainee)
    end

    it 'denies access to speaking_brother users' do
      expect(subject).not_to permit(speaking_brother)
    end

    it 'denies access to supporting_brother users' do
      expect(subject).not_to permit(supporting_brother)
    end

    it 'denies access to helper users' do
      expect(subject).not_to permit(helper)
    end

    it 'denies access to yp users' do
      expect(subject).not_to permit(yp)
    end

    it 'denies access to guest users' do
      expect(subject).not_to permit(guest)
    end

    it 'allows admin' do
      expect(subject).to permit(admin)
    end
  end
end


text:
/*
Raspuns: Un client trimite unui server un numar. Serverul va returna clientului sirul divizorilor acestui numar. Are you satisfied with this problem?
*/

var PORT = 1234;
var HOST = '127.0.0.1';

var dgram = require('dgram');
var server = dgram.createSocket('udp4');

function getFactors(integer){
    var factors = [],
    quotient = 0;

    for(var i = 1; i <= integer; i++){
      quotient = integer/i;

      if(quotient === Math.floor(quotient)){
        factors.push(i);
      }
    }
    return factors;
  }

server.on('listening', function () {
    var address = server.address();
    console.log('UDP Server listening on ' + address.address + ":" + address.port);
});

server.on('message', function (message, remote) {
    console.log(remote.address + ':' + remote.port +' - ' + message);
    var res = getFactors(+message).join(", ");
    server.send(res,remote.port,remote.address,function(error){
        if(error){
          client.close();
        }else{
          console.log('Sent factors to', remote.address, remote.port);
        }
      });
});

server.bind(PORT, HOST);


text:
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">

  <object id="Shell" type="TradeHub.StrategyRunner.UserInterface.Shell.ApplicationShell,TradeHub.StrategyRunner.UserInterface.Shell" singleton="true"/>

  <object id="OptimizationShell" type="TradeHub.StrategyRunner.UserInterface.OptimizationShell.Shell,TradeHub.StrategyRunner.UserInterface.OptimizationShell" singleton="false"/>

  <object id="GeneticAlgoShell" type="TradeHub.StrategyRunner.UserInterface.GeneticAlgoShell.GeneticAlgoShell,TradeHub.StrategyRunner.UserInterface.GeneticAlgoShell" singleton="false"/>

  <object id="SettingsPanelViewModel" type="TradeHub.StrategyRunner.UserInterface.SettingsModule.ViewModel.SettingsPanelViewModel,TradeHub.StrategyRunner.UserInterface.SettingsModule"/>
  <object id="SettingsPanelView" type="TradeHub.StrategyRunner.UserInterface.SettingsModule.View.SettingsPanel" singleton="true">
    <constructor-arg index="0" ref="SettingsPanelViewModel"/>
  </object>

  <object id="SettingsWindowViewModel" type="TradeHub.StrategyRunner.UserInterface.SettingsModule.ViewModel.SettingsWindowViewModel,TradeHub.StrategyRunner.UserInterface.SettingsModule" singleton="false"/>
  <object id="SettingsWindowView" type="TradeHub.StrategyRunner.UserInterface.SettingsModule.View.SettingsWindow" singleton="false">
    <constructor-arg index="0" ref="SettingsWindowViewModel"/>
  </object>

  <object id="SearchViewModel" type="TradeHub.StrategyRunner.UserInterface.SearchModule.ViewModel.SearchViewModel"/>
  <object id="SearchView" type="TradeHub.StrategyRunner.UserInterface.SearchModule.View.SearchView" singleton="true">
    <constructor-arg index="0" ref="SearchViewModel"/>
  </object>

  <object id="StatsViewModel" type="TradeHub.StrategyRunner.UserInterface.StatsModule.ViewModel.StatsViewModel"/>
  <object id="StatsView" type="TradeHub.StrategyRunner.UserInterface.StatsModule.View.StatsView" singleton="true">
    <constructor-arg index="0" ref="StatsViewModel"/>
  </object>

  <object id="StrategyViewModel" type="TradeHub.StrategyRunner.UserInterface.StrategyModule.ViewModel.StrategyViewModel"/>
  <object id="StrategyView" type="TradeHub.StrategyRunner.UserInterface.StrategyModule.View.StrategyView" singleton="true">
    <constructor-arg index="0" ref="StrategyViewModel"/>
  </object>

  <object id="ConstructorViewModel" type="TradeHub.StrategyRunner.UserInterface.SearchModule.ViewModel.ConstructorViewModel" singleton="false"/>
  <object id="ConstructorView" type="TradeHub.StrategyRunner.UserInterface.SearchModule.View.ConstructorView" singleton="false"/>

  <object id="ParametersViewModel" type="TradeHub.StrategyRunner.UserInterface.ParametersModule.ViewModel.ParametersViewModel,TradeHub.StrategyRunner.UserInterface.ParametersModule"/>
  <object id="ParametersView" type="TradeHub.StrategyRunner.UserInterface.ParametersModule.View.ParametersView" singleton="true">
    <constructor-arg index="0" ref="ParametersViewModel"/>
  </object>

  <object id="OptimizationStatsViewModel" type="TradeHub.StrategyRunner.UserInterface.OptimizedStatsModule.ViewModel.OptimizationStatsViewModel,TradeHub.StrategyRunner.UserInterface.OptimizedStatsModule"/>
  <object id="OptimizationStatsView" type="TradeHub.StrategyRunner.UserInterface.OptimizedStatsModule.View.OptimizationStatsView" singleton="true">
    <constructor-arg index="0" ref="OptimizationStatsViewModel"/>
  </object>

  <object id="GaParametersViewModel" type="TradeHub.StrategyRunner.UserInterface.GaParametersModule.ViewModel.GaParametersViewModel,TradeHub.StrategyRunner.UserInterface.GaParametersModule"/>
  <object id="GaParametersView" type="TradeHub.StrategyRunner.UserInterface.GaParametersModule.View.GaParametersView,TradeHub.StrategyRunner.UserInterface.GaParametersModule" singleton="true">
    <constructor-arg index="0" ref="GaParametersViewModel"/>
  </object>

  <object id="GaStatsViewModel" type="TradeHub.StrategyRunner.UserInterface.GaStatsModule.ViewModel.GaStatsViewModel,TradeHub.StrategyRunner.UserInterface.GaStatsModule"/>
  <object id="GaStatsView" type="TradeHub.StrategyRunner.UserInterface.GaStatsModule.View.GaStatsView,TradeHub.StrategyRunner.UserInterface.GaStatsModule" singleton="true">
    <constructor-arg index="0" ref="GaStatsViewModel"/>
  </object>

</objects>


text:
<!DOCTYPE html>

		<meta charset="UTF-8"/>
		<title>Function awe_webcore_are_plugins_enabled</title>
		<link rel="stylesheet" type="text/css" href="../../../styles/ddox.css"/>
		<link rel="stylesheet" href="../../../prettify/prettify.css" type="text/css"/>

								dash

								components

								animation

								assets

								camera

								component

								lights

								material

								mesh

								userinterface

								core

								dgame

								gameobject

								prefabs

								properties

								scene

								editor

								editor

								websockets

								graphics

								adapters

								adapter

								gl

								linux

								win32gl

								shaders

								glsl

								ambientlight

								animatedgeometry

								directionallight

								geometry

								pointlight

								shadowmap

								userinterface

								glsl

								shaders

								adapters

								graphics

								shaders

								net

								connection

								connectionmanager

								packets

								webconnection

								utility

								awesomium

								concurrency

								config

								input

								output

								resources

								soloud

								string

								tasks

								time

								components

								core

								editor

								graphics

								net

								utility

								dash

The search functionality needs JavaScript enabled

						<input id="symbolSearch" type="text" placeholder="Search for symbols" onchange="performSymbolSearch(24);" onkeypress="this.onchange();" onpaste="this.onchange();" oninput="this.onchange();"/>

Function awe_webcore_are_plugins_enabled

 Returns whether or not plugins are enabled.

Prototype

bool awe_webcore_are_plugins_enabled() extern(C);

Authors

Copyright

License


text:
#ifndef MEMCONFIG_H_
#define MEMCONFIG_H_

/*
 * These are chip specific values that indicate the start
 * of flash and start of our gdb_bootloader code
 *
 * Look at linker map, you may have to adjust based on the
 * size of this code. These values are for an msp430g2553
 */

extern unsigned __urom, __user_reset_vector;
const unsigned INFOMEM_ADDR = 0x1000;
const unsigned INFOMEM_END = 0x10c0-1;      // leave INFOA segment alone, just use INFOMEM D..B
const unsigned GDB_LOADER_ADDR = 0xfa00;
const unsigned GDB_BOOT_END = 0xfe00-1;
const unsigned VECTOR_TABLE_SEGMENT = 0xfe00;
const unsigned GDB_BOOT_RESET_VECTOR = 0xfffe;
const unsigned USER_RESET_VECTOR = 0xffbe;
const bool ERASE_INFO_MEM = true;

#endif /* MEMCONFIG_H_ */


text:
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace _02.SignOfProduct
{
    class signOfProduct
    {
        static void Main()
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
            Console.WriteLine("Please enter number a");
            double a = double.Parse(Console.ReadLine());
            Console.WriteLine("Please enter number b");
            double b = double.Parse(Console.ReadLine());
            Console.WriteLine("Please enter number c");
            double c = double.Parse(Console.ReadLine());

            int product = 0;

            if (a < 0)
            {
                product += 1;
            }
            if (b < 0)
            {
                product += 1;
            }
            if (c < 0)
            {
                product += 1;
            }

            if (product  ==  1)
            {
                Console.WriteLine("Negative");
            }
            else if (product == 3)
            {
                Console.WriteLine("Negative");
            }
            else if (product == 0)
            {
                Console.WriteLine("Positive");
            }
            else if (product == 2)
            {
                Console.WriteLine("Positive");
            }
        }
    }
}


text:
namespace Planex.Data.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    using System.Linq;

    using Microsoft.AspNet.Identity;
    using Microsoft.AspNet.Identity.EntityFramework;

    using Planex.Data.Models;

    public sealed class Configuration : DbMigrationsConfiguration<PlanexDbContext>
    {
        public Configuration()
        {
            this.AutomaticMigrationsEnabled = true;
            this.AutomaticMigrationDataLossAllowed = true;
        }

        protected override void Seed(PlanexDbContext context)
        {
            if (context.Roles.Any())
            {
                return;
            }

            this.SeedRoles(context);
        }

        private void SeedRoles(PlanexDbContext context)
        {
            UserManager<User> userManager = new UserManager<User>(new UserStore<User>(context));

            context.Roles.AddOrUpdate(x => x.Name, new IdentityRole("Manager"));
            context.Roles.AddOrUpdate(x => x.Name, new IdentityRole("Lead"));
            context.Roles.AddOrUpdate(x => x.Name, new IdentityRole("Worker"));
            context.Roles.AddOrUpdate(x => x.Name, new IdentityRole("HR"));
            context.SaveChanges();

            var user = new User
                           {
                               UserName = "admin@planex.com",
                               Email = "admin@planex.com",
                               FirstName = "System",
                               LastName = "Message",
                               Salary = 0,
                               CreatedOn = DateTime.Now,
                               ResetPassword = false,
                               IntId = 0
                           };
            userManager.Create(user, "changeme");
            context.SaveChanges();
            userManager.AddToRole(user.Id, "Manager");
            context.SaveChanges();
        }
    }
}


text:
//
//  CommonMacros.h
//  MiAiApp
//
//  Created by icaibei on 2017/5/31.
//  Copyright © 2017年 icaibei. All rights reserved.
//

//全局标记字符串,用于 通知 存储

#ifndef CommonMacros_h
#define CommonMacros_h

#pragma mark - ——————— 用户相关 ————————
//登录状态改变通知
#define KNotificationLoginStateChange @"loginStateChange"

//自动登录成功
#define KNotificationAutoLoginSuccess @"KNotificationAutoLoginSuccess"

//被踢下线
#define KNotificationOnKick @"KNotificationOnKick"

//用户信息缓存 名称
#define KUserCacheName @"KUserCacheName"

//用户model缓存
#define KUserModelCache @"KUserModelCache"

#pragma mark - ——————— 网络状态相关 ————————

//网络状态变化
#define KNotificationNetWorkStateChange @"KNotificationNetWorkStateChange"

#endif /* CommonMacros_h */


text:
package pivotal.cf.cloudops.entity;

/**
 * Created by pivotal on 8/7/15.
 */
public class AccessToken {

    /**
     *  获取到的凭证
     */
    private String token;

    /**
     *  凭证有效时间,单位:秒
     */
    private int expiresIn;

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public int getExpiresIn() {
        return expiresIn;
    }

    public void setExpiresIn(int expiresIn) {
        this.expiresIn = expiresIn;
    }

    public AccessToken(String token, int expiresIn) {
        super();
        this.token = token;
        this.expiresIn = expiresIn;
    }

    public AccessToken() {
        super();
    }
}


text:
<?php
/**
 * Created by PhpStorm.
 * User: amado
 * Date: 5/21/16
 * Time: 8:28 PM
 */

namespace projectivemotion\HotelsPro;

class Query
{
    protected $format;
    protected $pax;
    protected $checkout;
    protected $checkin;
    protected $currency;
    protected $client_nationality;
    protected $limit;
    protected $hotel_code;

    public function setHotelCode($hotel_code)
    {
        $this->hotel_code = $hotel_code;
    }

    public function setCheckin($checkin)
    {
        $this->checkin = $checkin;
    }

    public function setCheckout($checkout)
    {
        $this->checkout = $checkout;
    }

    public function setClientNationality($client_nationality)
    {
        $this->client_nationality = $client_nationality;
    }

    public function setCurrency($currency)
    {
        $this->currency = $currency;
    }

    public function setFormat($format)
    {
        $this->format = $format;
    }

    public function setLimit($limit)
    {
        $this->limit = $limit;
    }

    public function setPax($pax)
    {
        $this->pax = $pax;
    }

    public function getCheckin()
    {
        return $this->checkin;
    }

    public function getCheckout()
    {
        return $this->checkout;
    }

    public function getClientNationality()
    {
        return $this->client_nationality;
    }

    public function getCurrency()
    {
        return $this->currency;
    }

    public function getFormat()
    {
        return $this->format;
    }

    public function getLimit()
    {
        return $this->limit;
    }

    public function getPax()
    {
        return $this->pax;
    }

    public function getParams()
    {
        return get_object_vars($this);
    }
}


text:
<<<<<<< HEAD
/*
TO DO:
- get rid of unecessary 0s in front of number
- limit digit size of number
- rounding zeros off
- run timeNow() every 60 sec instead of on click (use setInterval function)
*/

var currentEntry = ""; //tracks # of digits (ie. 6 is 1, 28 is 2, 412 is 3)
var equation = "";
var total = "";
var lastButton;

$(document).ready(function() {
  // DROPDOWN
  $("#dropdown").on("click", function() {
    $("#ddContent").slideToggle("slow");
  });

  // DATE
  function timeNow() {
    var d = new Date(),
        h = (d.getHours() < 10 ? '0' : '') + d.getHours(),
        m = (d.getMinutes() < 10 ? '0' : '') + d.getMinutes();
        return h + ':' + m;
  }

  $("#date").html(timeNow());

  // I think this should maybe be setInterval(timeNow, 60000) not click event
  $("*").on("click", function() {
    $("#date").html(timeNow());
  });

  // ALL CLEAR
  $("#ac").on("click", function() {
    currentEntry = "";
    equation = "";
    total = "";
    lastButton = "ac";
    $("#display").html(0);
  });

  // CLEAR ENTRY
  $("#ce").on("click", function() {
    if (lastButton === "equals") {
      currentEntry = "";
      equation = "";
      total = "";
      $("#display").html(0);
    } else {
      equation = equation.substring(0, equation.length - currentEntry);
      $("#display").html(equation);
    }
    currentEntry = 0;
    lastButton = "ce";
  });

  // NUMBERS
  $(".num").on("click", function() {
    if (lastButton === "equals") {
      equation = "";
    }
    currentEntry++;
    equation += $(this).html();
    $("#display").html(equation);

    lastButton = "number";
  });

  // OPERATORS
  $(".operator").on("click", function() {
    if (lastButton === "equals") {
      equation = total;
    }

    if (lastButton === "operator" || lastButton === "ce") {
      equation = equation.substring(0, equation.length - 1);
      $("#display").html(equation);
    }

    equation += $(this).html();
    $("#display").html(equation);

    currentEntry = 0;
    lastButton = "operator";
  });

  // EQUALS
  $("#equals").on("click", function() {
    total = eval(equation);
    if (total % Math.round(total)) {
      total = total.toFixed(6);
    } //round non-integer answers to 6 decimal places
    $("#display").html(total);

    currentEntry = 0;
    lastButton = "equals";
  });
=======
/*
TO DO:
- get rid of unecessary 0s in front of number
- limit digit size of number
- rounding zeros off
- run timeNow() every 60 sec instead of on click (use setInterval function)
*/

var currentEntry = ""; //tracks # of digits (ie. 6 is 1, 28 is 2, 412 is 3)
var equation = "";
var total = "";
var lastButton;

$(document).ready(function() {
  // DROPDOWN
  $("#dropdown").on("click", function() {
    $("#ddContent").slideToggle("slow");
  });

  // DATE
  function timeNow() {
    var d = new Date(),
        h = (d.getHours() < 10 ? '0' : '') + d.getHours(),
        m = (d.getMinutes() < 10 ? '0' : '') + d.getMinutes();
        return h + ':' + m;
  }

  $("#date").html(timeNow());

  // I think this should maybe be setInterval(timeNow, 60000) not click event
  $("*").on("click", function() {
    $("#date").html(timeNow());
  });

  // ALL CLEAR
  $("#ac").on("click", function() {
    currentEntry = "";
    equation = "";
    total = "";
    lastButton = "ac";
    $("#display").html(0);
  });

  // CLEAR ENTRY
  $("#ce").on("click", function() {
    if (lastButton === "equals") {
      currentEntry = "";
      equation = "";
      total = "";
      $("#display").html(0);
    } else {
      equation = equation.substring(0, equation.length - currentEntry);
      $("#display").html(equation);
    }
    currentEntry = 0;
    lastButton = "ce";
  });

  // NUMBERS
  $(".num").on("click", function() {
    if (lastButton === "equals") {
      equation = "";
    }
    currentEntry++;
    equation += $(this).html();
    $("#display").html(equation);

    lastButton = "number";
  });

  // OPERATORS
  $(".operator").on("click", function() {
    if (lastButton === "equals") {
      equation = total;
    }

    if (lastButton === "operator" || lastButton === "ce") {
      equation = equation.substring(0, equation.length - 1);
      $("#display").html(equation);
    }

    equation += $(this).html();
    $("#display").html(equation);

    currentEntry = 0;
    lastButton = "operator";
  });

  // EQUALS
  $("#equals").on("click", function() {
    total = eval(equation);
    if (total % Math.round(total)) {
      total = total.toFixed(6);
    } //round non-integer answers to 6 decimal places
    $("#display").html(total);

    currentEntry = 0;
    lastButton = "equals";
  });
>>>>>>> 8cd87617556057032e194a56c33637cd1a304c4c
});


text:
using namespace boost::multiprecision;

#ifdef BOOST_MSVC
#pragma warning(disable : 4127)
#endif

template <class T>
T generate_random_int(unsigned bits_wanted)
{
   static boost::random::mt19937               gen;
   typedef boost::random::mt19937::result_type random_type;

   T        max_val;
   unsigned digits;
   if (std::numeric_limits<T>::is_bounded && (bits_wanted == (unsigned)std::numeric_limits<T>::digits))
   {
      max_val = (std::numeric_limits<T>::max)();
      digits  = std::numeric_limits<T>::digits;
   }
   else
   {
      max_val = T(1) << bits_wanted;
      digits  = bits_wanted;
   }

   unsigned bits_per_r_val = std::numeric_limits<random_type>::digits - 1;
   while ((random_type(1) << bits_per_r_val) > (gen.max)())
      --bits_per_r_val;

   unsigned terms_needed = digits / bits_per_r_val + 1;

   T val = 0;
   for (unsigned i = 0; i < terms_needed; ++i)
   {
      val *= (gen.max)();
      val += gen();
   }
   val %= max_val;
   return val;
}

template <class T>
T generate_random(unsigned bits_wanted)
{
   typedef typename component_type<T>::type int_type;
   T                                        val(generate_random_int<int_type>(bits_wanted), generate_random_int<int_type>(bits_wanted));
   return val;
}

template <class From, class To>
void test_convert_neg_val(From from, const std::integral_constant<bool, true>&)
{
   from                                       = -from;
   typename component_type<From>::type answer = numerator(from) / denominator(from);
   To                                  t3(from);
   To                                  t4 = from.template convert_to<To>();
   BOOST_CHECK_EQUAL(answer.str(), t3.str());
   BOOST_CHECK_EQUAL(answer.str(), t4.str());
}
template <class From, class To>
void test_convert_neg_val(From const&, const std::integral_constant<bool, false>&)
{
}

template <class From, class To>
void test_convert_imp(std::integral_constant<int, number_kind_rational> const&, std::integral_constant<int, number_kind_integer> const&)
{
   int bits_wanted = (std::min)((std::min)(std::numeric_limits<From>::digits, std::numeric_limits<To>::digits), 2000);

   for (unsigned i = 0; i < 100; ++i)
   {
      From                                from   = generate_random<From>(bits_wanted);
      typename component_type<From>::type answer = numerator(from) / denominator(from);
      To                                  t1(from);
      To                                  t2 = from.template convert_to<To>();
      BOOST_CHECK_EQUAL(answer.str(), t1.str());
      BOOST_CHECK_EQUAL(answer.str(), t2.str());
      test_convert_neg_val<From, To>(from, std::integral_constant<bool, std::numeric_limits<From>::is_signed && std::numeric_limits<To>::is_signed > ());
   }
}

template <class From, class To>
void test_convert_neg_float_val(From from, To const& tol, const std::integral_constant<bool, true>&)
{
   from      = -from;
   To answer = To(numerator(from)) / To(denominator(from));
   To t3(from);
   To t4 = from.template convert_to<To>();
   BOOST_CHECK_CLOSE_FRACTION(answer, t3, tol);
   BOOST_CHECK_CLOSE_FRACTION(answer, t4, tol);
}
template <class From, class To>
void test_convert_neg_float_val(From const&, To const&, const std::integral_constant<bool, false>&)
{
}

template <class From, class To>
void test_convert_imp(std::integral_constant<int, number_kind_rational> const&, std::integral_constant<int, number_kind_floating_point> const&)
{
   int bits_wanted = (std::min)((std::min)(std::numeric_limits<From>::digits, std::numeric_limits<To>::digits), 2000);

   for (unsigned i = 0; i < 100; ++i)
   {
      From from   = generate_random<From>(bits_wanted);
      To   answer = To(numerator(from)) / To(denominator(from));
      To   t1(from);
      To   t2  = from.template convert_to<To>();
      To   tol = std::numeric_limits<To>::is_specialized ? std::numeric_limits<To>::epsilon() : ldexp(To(1), 1 - bits_wanted);
      tol *= 2;
      BOOST_CHECK_CLOSE_FRACTION(answer, t1, tol);
      BOOST_CHECK_CLOSE_FRACTION(answer, t2, tol);
      test_convert_neg_float_val<From, To>(from, tol, std::integral_constant<bool, std::numeric_limits<From>::is_signed && std::numeric_limits<To>::is_signed > ());
   }
}

template <class From, class To>
void test_convert_neg_rat_val(From from, const std::integral_constant<bool, true>&)
{
   from = -from;
   To t3(from);
   To t4 = from.template convert_to<To>();
   BOOST_CHECK_EQUAL(from.str(), t3.str());
   BOOST_CHECK_EQUAL(from.str(), t4.str());
}
template <class From, class To>
void test_convert_neg_rat_val(From const&, const std::integral_constant<bool, false>&)
{
}

template <class From, class To>
void test_convert_imp(std::integral_constant<int, number_kind_rational> const&, std::integral_constant<int, number_kind_rational> const&)
{
   int bits_wanted = (std::min)((std::min)(std::numeric_limits<From>::digits, std::numeric_limits<To>::digits), 2000);

   for (unsigned i = 0; i < 100; ++i)
   {
      From from = generate_random<From>(bits_wanted);
      To   t1(from);
      To   t2 = from.template convert_to<To>();
      BOOST_CHECK_EQUAL(from.str(), t1.str());
      BOOST_CHECK_EQUAL(from.str(), t2.str());
      test_convert_neg_rat_val<From, To>(from, std::integral_constant<bool, std::numeric_limits<From>::is_signed && std::numeric_limits<To>::is_signed > ());
   }
}

template <class From, class To>
void test_convert()
{
   test_convert_imp<From, To>(typename number_category<From>::type(), typename number_category<To>::type());
}

int main()
{
   test_convert<cpp_rational, cpp_int>();
   test_convert<cpp_rational, int128_t>();
   test_convert<cpp_rational, uint128_t>();

   test_convert<cpp_rational, cpp_bin_float_50>();

   test_convert<cpp_rational, cpp_dec_float_50>();

#if defined(HAS_GMP)
   test_convert<cpp_rational, mpz_int>();
   test_convert<cpp_rational, mpq_rational>();
   test_convert<cpp_rational, mpf_float_50>();
#endif
#if defined(HAS_MPFR)
   test_convert<cpp_rational, mpfr_float_50>();
#endif
#if defined(HAS_MPFI)
   test_convert<cpp_rational, mpfi_float_50>();
#endif
#ifdef HAS_TOMMATH
   test_convert<cpp_rational, tom_int>();
   test_convert<cpp_rational, tom_rational>();
#endif
   return boost::report_errors();
}


text:
__version__ = "0.2.4"
__all__ = [
    'main',
    'languages',
]

from .silp import main
from .language import languages