text:
<?php

namespace DeltaCli;

use DeltaCli\Script\Step\Result;
use PHPUnit_Framework_TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\ConsoleOutput;

class ScriptTest extends PHPUnit_Framework_TestCase
{
    /**
     * @var BufferedOutput
     */
    private $output;

    /**
     * @var Script
     */
    private $script;

    /**
     * @var Project
     */
    private $project;

    public function setUp()
    {
        $input = new ArgvInput();

        $this->output  = new BufferedOutput();
        $this->project = new Project(new Application(), $input, $this->output);
        $this->script  = new Script($this->project, 'Test', 'Test Script');
    }

    public function testDryRunSkipsStepsThatDoNotSupportIt()
    {
        $noDryRunSupport = false;

        $this->script->addStep(
            function () use (&$noDryRunSupported) {
                $noDryRunSupported = true;
            }
        );

        $this->script->dryRun($this->project->getOutput());

        $this->assertFalse($noDryRunSupport);
        $this->assertContains(Script::NO_DRY_RUN_SUPPORT_EXPLANATION, $this->output->fetch());
    }

    public function testDryRunMethodOfSupportedStepsIsCalledByScriptDryRun()
    {
        $mainCalled   = false;
        $dryRunCalled = false;

        $this->script->addStep(
            $this->project->phpCallableSupportingDryRun(
                function () use (&$mainCalled) {
                    $mainCalled = true;
                },
                function () use (&$dryRunCalled) {
                    $dryRunCalled = true;
                }
            )
        );

        $this->script->dryRun($this->project->getOutput());

        $this->assertFalse($mainCalled);
        $this->assertTrue($dryRunCalled);
    }

    public function testAllExecutionMethodsGetStepsForTheSelectedEnvironment()
    {
        /* @var $script Script|\PHPUnit_Framework_MockObject_MockObject */
        $script = $this->getMock(
            '\DeltaCli\Script',
            ['getStepsForEnvironment'],
            [$this->project, 'run', 'Runs steps.']
        );

        $script->expects($this->once())
            ->method('getStepsForEnvironment')
            ->will($this->returnValue([]));

        $script->runSteps($this->output);

        /* @var $script Script|\PHPUnit_Framework_MockObject_MockObject */
        $script = $this->getMock(
            '\DeltaCli\Script',
            ['getStepsForEnvironment'],
            [$this->project, 'dry-run', 'Does dry run.']
        );

        $script->expects($this->once())
            ->method('getStepsForEnvironment')
            ->will($this->returnValue([]));

        $script->dryRun($this->output);

        /* @var $script Script|\PHPUnit_Framework_MockObject_MockObject */
        $script = $this->getMock(
            '\DeltaCli\Script',
            ['getStepsForEnvironment'],
            [$this->project, 'list-steps', 'Lists steps.']
        );

        $script->expects($this->once())
            ->method('getStepsForEnvironment')
            ->will($this->returnValue([]));

        $script->listSteps($this->output);
    }

    /**
     * @expectedException \DeltaCli\Exception\RequiredVersionNotInstalled
     */
    public function testRunningScriptWithoutNecessaryDeltaCliVersionThrowsException()
    {
        $input  = new ArgvInput();
        $output = new ConsoleOutput();

        $project = new Project(new Application(), $input, $output);
        $project->requiresVersion('1.50.8');

        /* @var $versionMock \PHPUnit_Framework_MockObject_MockObject|ComposerVersion */
        $versionMock = $this->getMock(
            '\DeltaCli\ComposerVersion',
            ['getCurrentVersion'],
            []
        );

        $versionMock->expects($this->any())
            ->method('getCurrentVersion')
            ->will($this->returnValue('1.20'));

        $script = new Script($project, 'Test', 'Test Script');
        $script->setComposerVersionReader($versionMock);
        $script->checkRequiredVersionForProject();
    }

    public function testRunningScriptWithNecessaryDeltaCliVersionReturnsTrue()
    {
        $input  = new ArgvInput();
        $output = new ConsoleOutput();

        $project = new Project(new Application(), $input, $output);
        $project->requiresVersion('1.50.8');

        /* @var $versionMock \PHPUnit_Framework_MockObject_MockObject|ComposerVersion */
        $versionMock = $this->getMock(
            '\DeltaCli\ComposerVersion',
            ['getCurrentVersion'],
            []
        );

        $versionMock->expects($this->any())
            ->method('getCurrentVersion')
            ->will($this->returnValue('1.80'));

        $script = new Script($project, 'Test', 'Test Script');
        $script->setComposerVersionReader($versionMock);
        $this->assertTrue($script->checkRequiredVersionForProject());
    }

    public function testCanSetEnvironmentUsingString()
    {
        $this->project->createEnvironment('test');
        $this->script->setEnvironment('test');
        $this->assertEquals('test', $this->script->getEnvironment()->getName());
    }

    public function testGetStepsForEnvironmentOnlyIncludesStepsForSelectedEnvironment()
    {
        $this->project->createEnvironment('test');
        $this->project->createEnvironment('other-env');
        $this->script->setEnvironment('test');

        $this->script
            ->addStep('global-step', 'fafafa')
            ->addEnvironmentSpecificStep('test', 'environment-step', 'fafafa')
            ->addEnvironmentSpecificStep('other-env', 'excluded-step', 'fafafa');

        $globalStepFound      = false;
        $excludedStepFound    = false;
        $environmentStepFound = false;

        /* @var $step \DeltaCli\Script\Step\StepInterface */
        foreach ($this->script->getStepsForEnvironment() as $step) {
            if ('global-step' === $step->getName()) {
                $globalStepFound = true;
            }

            if ('environment-step' === $step->getName()) {
                $environmentStepFound = true;
            }

            if ('excluded-step' === $step->getName()) {
                $excludedStepFound = true;
            }
        }

        $this->assertTrue($globalStepFound);
        $this->assertFalse($excludedStepFound);
        $this->assertTrue($environmentStepFound);
    }

    /**
     * @expectedException \DeltaCli\Exception\EnvironmentNotAvailableForStep
     */
    public function testExceptionIsThrownIfStepRequiresEnvironmentAndNoneIsSet()
    {
        $this->script->addStep($this->project->ssh('ls'));
        $this->script->getStepsForEnvironment();
    }

    public function testSelectedEnvironmentIsSetOnStepsThatAcceptIt()
    {
        $this->project->createEnvironment('test');
        $this->script->setEnvironment('test');

        $this->project->createScript('other-script', 'Other script for test.');

        /* @var $requiredStep \DeltaCli\Script\Step\Ssh|\PHPUnit_Framework_MockObject_MockObject */
        $requiredStep = $this->getMock(
            '\DeltaCli\Script\Step\Ssh',
            ['setSelectedEnvironment'],
            ['ls']
        );

        $requiredStep->expects($this->once())
            ->method('setSelectedEnvironment');

        /* @var $requiredStep \DeltaCli\Script\Step\Ssh|\PHPUnit_Framework_MockObject_MockObject */
        $optionalStep = $this->getMock(
            '\DeltaCli\Script\Step\Script',
            ['setSelectedEnvironment'],
            [$this->project->getScript('other-script'), $this->project->getInput(), $this->project->getOutput()]
        );

        $optionalStep->expects($this->once())
            ->method('setSelectedEnvironment');

        $this->script
            ->addStep('required', $requiredStep)
            ->addStep('optional', $optionalStep);

        $this->script->getStepsForEnvironment();
    }

    public function testListStepsOnScriptListsAllStepNamesAndClasses()
    {
        $this->script
            ->addStep('step-one', 'ls')
            ->addStep(
                'step-two',
                function () {

                }
            );

        $this->script->listSteps($this->output);

        $output = $this->output->fetch();

        $this->assertContains('step-one', $output);
        $this->assertContains('step-two', $output);
        $this->assertContains('ShellCommand', $output);
        $this->assertContains('PhpCallable', $output);

        // Full class name shouldn't be there.  Just the last segment of it.
        $this->assertNotContains('DeltaCli\\Script\\Step', $output);
    }

    public function testExecutionWillStopAtFailedStepByDefault()
    {
        $firstStepCalled      = false;
        $subsequentStepCalled = false;

        $this->script
            ->addStep(
                'first-step',
                function () use (&$firstStepCalled) {
                    $firstStepCalled = true;
                }
            )
            ->addStep(
                'failing-step',
                function () {
                    throw new \Exception('Oops!');
                }
            )
            ->addStep(
                'next-step',
                function () use (&$subsequentStepCalled) {
                    $subsequentStepCalled = true;
                }
            );

        $this->script->runSteps($this->output);

        $this->assertTrue($firstStepCalled);
        $this->assertFalse($subsequentStepCalled);
    }

    public function testExecutionWillContinueBeyondFailedStepIfSoConfigured()
    {
        $firstStepCalled      = false;
        $subsequentStepCalled = false;

        $this->script
            ->setStopOnFailure(false)
            ->addStep(
                'first-step',
                function () use (&$firstStepCalled) {
                    $firstStepCalled = true;
                }
            )
            ->addStep(
                'failing-step',
                function () {
                    throw new \Exception('Oops!');
                }
            )
            ->addStep(
                'next-step',
                function () use (&$subsequentStepCalled) {
                    $subsequentStepCalled = true;
                }
            );

        $this->script->runSteps($this->output);

        $this->assertTrue($firstStepCalled);
        $this->assertTrue($subsequentStepCalled);
    }

    public function testPreRunHookIsCalledBeforeRunningSteps()
    {
        $step = $this->getMock('\DeltaCli\Script\Step\StepInterface');

        $step->expects($this->once())
            ->method('preRun');

        $step->expects($this->once())
            ->method('run');

        $this->script->addStep($step);

        $this->script->runSteps($this->script->getProject()->getOutput());
    }

    public function testPostRunHookIsCalledAfterRunningSteps()
    {
        $step = $this->getMock('\DeltaCli\Script\Step\StepInterface');

        $step->expects($this->once())
            ->method('run')
            ->willReturn(new Result($step, Result::SUCCESS));

        $step->expects($this->once())
            ->method('postRun');

        $this->script->addStep($step);

        $this->script->runSteps($this->script->getProject()->getOutput());
    }

    public function testSkippedStepsAlsoSkipPostRunHookAndPreRunHook()
    {
        $step = $this->getMock('\DeltaCli\Script\Step\StepInterface');

        $step->expects($this->any())
            ->method('getName')
            ->willReturn('skipped-step');

        $step->expects($this->never())
            ->method('preRun');

        $step->expects($this->never())
            ->method('run');

        $step->expects($this->never())
            ->method('postRun');

        $this->script
            ->addStep($step)
            ->setSkippedSteps(['skipped-step']);

        $this->script->runSteps($this->script->getProject()->getOutput());
    }

    public function testAddStepHookIsCalledWhenAddingAnotherStep()
    {
        $stepOne = $this->getMock('\DeltaCli\Script\Step\StepInterface');
        $stepTwo = $this->getMock('\DeltaCli\Script\Step\StepInterface');

        $stepOne->expects($this->once())
            ->method('addStepToScript')
            ->with($this->script, $stepTwo);

        $this->script
            ->addStep($stepOne)
            ->addStep($stepTwo);

        $this->script->runSteps($this->script->getProject()->getOutput());
    }

    public function testSkippedStepsAreSkippedOnRun()
    {
        $skipped  = $this->getMock('\DeltaCli\Script\Step\StepInterface');
        $executed = $this->getMock('\DeltaCli\Script\Step\StepInterface');

        $skipped->expects($this->never())
            ->method('run');

        $skipped->expects($this->any())
            ->method('getName')
            ->willReturn('skipped-step');

        $executed->expects($this->once())
            ->method('run');

        $this->script
            ->setSkippedSteps(['skipped-step'])
            ->addStep($skipped)
            ->addStep($executed);

        $this->script->runSteps($this->script->getProject()->getOutput());
    }

    public function testGettingNonExistentStepReturnsFalse()
    {
        $this->assertFalse($this->script->getStep('nope'));
    }

    public function testInvalidResultDuringDryRunProducesInvalidResult()
    {
        $output = new BufferedOutput();

        $step = $this->getMock(
            '\DeltaCli\Script\Step\PhpCallableSupportingDryRun',
            ['dryRun'],
            [
                function () {

                },
                function () {

                }
            ]
        );

        $this->script->addStep($step);

        $this->script->dryRun($output);

        $this->assertContains('did not return a valid result', $output->fetch());
    }

    public function testDefaultStepsAreAddedOnceFirstStepIsCreated()
    {
        $default = $this->getMock('\DeltaCli\Script\Step\StepInterface');
        $added   = $this->getMock('\DeltaCli\Script\Step\StepInterface');

        $default->expects($this->any())
            ->method('getName')
            ->willReturn('default');

        $added->expects($this->any())
            ->method('getName')
            ->willReturn('added');

        $this->script
            ->addDefaultStep($default)
            ->addStep($added);

        $this->assertInstanceOf('DeltaCli\Script\Step\StepInterface', $this->script->getStep('default'));
        $this->assertInstanceOf('DeltaCli\Script\Step\StepInterface', $this->script->getStep('added'));
    }
}


text:
#ifndef SILHOUETTE_TECHNIQUE_H
#define	SILHOUETTE_TECHNIQUE_H

#include "technique.h"
#include "ogldev_math_3d.h"

class SilhouetteTechnique : public Technique {
public:

    SilhouetteTechnique();

    virtual bool Init();

    void SetWVP(const Matrix4f& WVP);
    void SetWorldMatrix(const Matrix4f& WVP);
    void SetLightPos(const Vector3f& Pos);

private:

    GLuint m_WVPLocation;
    GLuint m_WorldMatrixLocation;
    GLuint m_lightPosLocation;
};

#endif	/* SILHOUETTE_TECHNIQUE_H */

redpajama_set_name: RedPajamaGithub


text:
using System;

namespace KeePassDPG
{
    /// <summary>
    /// Set of options that define how a dictionary password is generated.
    /// </summary>
    public class GeneratorOptions
    {
        /// <summary>
        /// Gets or sets the word length.
        /// </summary>
        public int WordLength { get; set; }

        /// <summary>
        /// Gets or sets whethr to substitute characters.
        /// </summary>
        public bool SubstituteCharacters { get; set; }

        /// <summary>
        /// Gets or sets the substitution list.
        /// </summary>
        public string SubstitutionList { get; set; }

        /// <summary>
        /// Gets or sets the capitalization type.
        /// </summary>
        public CapitalizationTypes CapitalizationType { get; set; }

        /// <summary>
        /// Initializes a new instance of DictionaryPasswordGeneratorProfile
        /// </summary>
        public GeneratorOptions()
        {
            WordLength = 8;
            SubstituteCharacters = false;
            SubstitutionList = string.Empty;
            CapitalizationType = CapitalizationTypes.None;
        }

        /// <summary>
        /// Initializes a new instance of DictionaryPasswordGeneratorProfile.
        /// </summary>
        /// <param name="optionString">The option string.</param>
        public GeneratorOptions(string optionString)
        {
            // Check if a string was passed.
            if (!string.IsNullOrEmpty(optionString))
            {
                // Parse the string.
                var options = optionString.Split('|');

                WordLength = Convert.ToInt32(options[0]);
                SubstituteCharacters = bool.Parse(options[1]);
                SubstitutionList = options[2];
                CapitalizationType = (CapitalizationTypes)Enum.Parse(typeof(CapitalizationTypes), options[3]);
            }
            else
            {
                WordLength = 8;
                SubstituteCharacters = false;
                SubstitutionList = string.Empty;
                CapitalizationType = CapitalizationTypes.None;
            }
        }

        /// <summary>
        /// Ouptut a string representation of the options.
        /// </summary>
        /// <returns>A string.</returns>
        public override string ToString()
        {
            return string.Format("{0}|{1}|{2}|{3}", WordLength, SubstituteCharacters, SubstitutionList, CapitalizationType);
        }
    }
}


text:
  Lozay est
       un village
       localisé dans le département de Charente-Maritime en Poitou-Charentes. On dénombrait 163 habitants en 2008.

Le nombre de logements, à Lozay, était réparti en 2011 en zero appartements et 109 maisons soit
 un marché plutôt équilibré.

La commune offre quelques  aménagements, elle dispose, entre autres, de un centre d'équitation.

À coté de Lozay sont positionnées géographiquement les communes de
La Croix-Comtesse à 5 km, 167 habitants,
La Jarrie-Audouin située à 4 km, 254 habitants,
Puyrolland à 6 km, 206 habitants,
Vergné localisée à 4 km, 152 habitants,
Migré localisée à 3 km, 333 habitants,
La Benâte à 3 km, 410 habitants,
 entre autres. De plus, Lozay est située à seulement dix km de Saint-Jean-d'Angély.

Si vous pensez emmenager à Lozay, vous pourrez aisément trouver une maison à acheter.


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!--
  ~ Copyright (C) 2013 tarent AG
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining
  ~ a copy of this software and associated documentation files (the
  ~ "Software"), to deal in the Software without restriction, including
  ~ without limitation the rights to use, copy, modify, merge, publish,
  ~ distribute, sublicense, and/or sell copies of the Software, and to
  ~ permit persons to whom the Software is furnished to do so, subject to
  ~ the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be
  ~ included in all copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  ~ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  ~ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  ~ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  ~ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  ~ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  ~ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.osiam</groupId>
    <artifactId>auth-server</artifactId>
    <version>2.1-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>OSIAM Auth Server</name>
    <description>
        The auth server handles the authentication and authorization to access the resource servers data
    </description>
    <url>https://github.com/osiam/auth-server</url>

    <licenses>
        <license>
            <name>The MIT License (MIT)</name>
            <url>http://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>OSIAM Team</name>
            <email>info@osiam.org</email>
            <timezone>+1</timezone>
            <organization>tarent solutions GmbH</organization>
            <organizationUrl>http://www.tarent.de</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:https://github.com/osiam/auth-server.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/osiam/auth-server.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>osiam-repository</id>
            <name>public evolvis release repository</name>
            <url>scpexe://maven-repo.evolvis.org:/var/www/maven_repo/releases</url>
        </repository>
        <snapshotRepository>
            <id>OSIAM-NG-SNAPSHOT-repository</id>
            <name>public evolvis snapshot repository</name>
            <url>scpexe://maven-repo.evolvis.org:/var/www/maven_repo/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.7</java.version>

        <version.spring>4.1.6.RELEASE</version.spring>
        <version.spring.security>3.2.7.RELEASE</version.spring.security>
        <version.hibernate>4.3.9.Final</version.hibernate>
        <version.slf4j>1.7.12</version.slf4j>
        <version.aspectj>1.8.5</version.aspectj>
        <version.thymeleaf>2.1.4.RELEASE</version.thymeleaf>

        <sonar.core.codeCoveragePlugin>cobertura</sonar.core.codeCoveragePlugin>
        <!-- force sonar to reuse reports generated during build cycle -->
        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.osiam</groupId>
            <artifactId>connector4java</artifactId>
            <version>1.4</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth2</artifactId>
            <version>1.0.5.RELEASE</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-aop</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-beans</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-tx</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-web</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${version.spring}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${version.spring}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${version.spring}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${version.spring}</version>
        </dependency>

        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>3.1</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${version.spring}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>${version.spring}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${version.spring}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${version.spring}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>${version.spring.security}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>${version.spring.security}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>${version.spring.security}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-taglibs</artifactId>
            <version>${version.spring.security}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-ldap</artifactId>
            <version>${version.spring.security}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.directory.server</groupId>
            <artifactId>apacheds-server-jndi</artifactId>
            <version>1.5.5</version>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-servlet_3.0_spec</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
            <version>3.2.1</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>${version.hibernate}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${version.spring}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.5.6</version>
        </dependency>

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>9.4-1201-jdbc41</version>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.35</version>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>${version.spring}</version>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${version.aspectj}</version>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>${version.aspectj}</version>
        </dependency>

        <dependency>
            <groupId>org.thymeleaf</groupId>
            <artifactId>thymeleaf</artifactId>
            <version>${version.thymeleaf}</version>
        </dependency>

        <dependency>
            <groupId>org.thymeleaf</groupId>
            <artifactId>thymeleaf-spring4</artifactId>
            <version>${version.thymeleaf}</version>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>18.0</version>
        </dependency>

        <!-- test dependencies -->

        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>2.4.3</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>1.0-groovy-2.4</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>3.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
            <version>2.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>osiam releases repo</id>
            <url>https://maven-repo.evolvis.org/releases</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>osiam snapshots repo</id>
            <url>https://maven-repo.evolvis.org/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.0.4</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Configure the compiler plugin for Groovy -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <extensions>true</extensions>
                <configuration>
                    <compilerId>groovy-eclipse-compiler</compilerId>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <compilerArgument>-proc:none</compilerArgument>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-batch</artifactId>
                        <version>2.4.3-01</version>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-compiler</artifactId>
                        <version>2.9.2-01</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <argLine>-XX:-UseSplitVerifier</argLine>
                    <parallel>classes</parallel>
                    <threadCount>3</threadCount>
                    <includes>
                        <include>**/*Test.*</include>
                        <include>**/*Spec.*</include>
                    </includes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <inherited>true</inherited>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-maven</artifactId>
                <version>1.1.5</version>
                <configuration>
                    <skip>true</skip>
                    <mutationThreshold>50</mutationThreshold>
                    <targetClasses>
                        <param>org.osiam.*</param>
                    </targetClasses>
                    <targetTests>
                        <param>org.osiam.*</param>
                    </targetTests>
                </configuration>
            </plugin>

            <!-- Build Helper: will add Groovy sources to path -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>add-test-source</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${basedir}/src/test/groovy</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <warName>osiam-auth-server</warName>
                    <attachClasses>true</attachClasses>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-ssh-external</artifactId>
                        <version>2.8</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>distribution</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>2.5.3</version>
                        <executions>
                            <execution>
                                <id>distribution-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <appendAssemblyId>false</appendAssemblyId>
                                    <descriptors>
                                        <descriptor>src/assembly/distribution.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>cobertura-maven-plugin</artifactId>
                        <version>2.7</version>
                        <configuration>
                            <check/>
                            <formats>
                                <format>xml</format>
                            </formats>
                        </configuration>
                        <executions>
                            <execution>
                                <id>generate-data</id>
                                <phase>package</phase>

                                <goals>
                                    <goal>cobertura</goal>
                                </goals>

                                <configuration>
                                    <quiet>true</quiet>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>


text:
@interface GPUberViewElement : NSObject

@property (nonatomic) NSString *productId;
@property (nonatomic) NSString *displayName;
@property (nonatomic) NSURL *image;
@property (nonatomic) NSString *priceEstimate;
@property (nonatomic) NSInteger timeEstimate;
@property (nonatomic) CGFloat surgeMultiplier;

- (id)initWithProduct:(GPUberProduct *)product;
+ (GPUberViewElement *)elementWithProduct:(GPUberProduct *)product;

- (void)parametrizeWithPrice:(GPUberPrice *)price;
- (void)parametrizeWithTime:(GPUberTime *)time;

- (NSString *)timeEstimateString;

@end


text:
'use strict';

var createReactClass = require('create-react-class');
var PropTypes = require('prop-types');
var React = require('react');
var touchStyles = require('./touchStyles');

/**
 * Tappable Component
 * ==================
 */
module.exports = function (mixins) {
	return createReactClass({
		displayName: 'Tappable',

		mixins: mixins,

		propTypes: {
			component: PropTypes.any, // component to create
			className: PropTypes.string, // optional className
			classBase: PropTypes.string, // base for generated classNames
			classes: PropTypes.object, // object containing the active and inactive class names
			style: PropTypes.object, // additional style properties for the component
			disabled: PropTypes.bool // only applies to buttons
		},

		getDefaultProps: function getDefaultProps() {
			return {
				component: 'span',
				classBase: 'Tappable'
			};
		},

		render: function render() {
			var props = this.props;
			var className = props.classBase + (this.state.isActive ? '-active' : '-inactive');

			if (props.className) {
				className += ' ' + props.className;
			}

			if (props.classes) {
				className += ' ' + (this.state.isActive ? props.classes.active : props.classes.inactive);
			}

			var style = {};
			Object.assign(style, touchStyles, props.style);

			var newComponentProps = Object.assign({}, props, {
				style: style,
				className: className,
				disabled: props.disabled,
				handlers: this.handlers
			}, this.handlers());

			delete newComponentProps.activeDelay;
			delete newComponentProps.allowReactivation;
			delete newComponentProps.classBase;
			delete newComponentProps.classes;
			delete newComponentProps.handlers;
			delete newComponentProps.onTap;
			delete newComponentProps.onPress;
			delete newComponentProps.onPinchStart;
			delete newComponentProps.onPinchMove;
			delete newComponentProps.onPinchEnd;
			delete newComponentProps.onDeactivate;
			delete newComponentProps.onReactivate;
			delete newComponentProps.moveThreshold;
			delete newComponentProps.moveXThreshold;
			delete newComponentProps.moveYThreshold;
			delete newComponentProps.pressDelay;
			delete newComponentProps.pressMoveThreshold;
			delete newComponentProps.preventDefault;
			delete newComponentProps.stopPropagation;
			delete newComponentProps.component;

			return React.createElement(props.component, newComponentProps, props.children);
		}
	});
};


text:
<?php

declare(strict_types=1);

namespace Smuuf\Primi\Code;

use \Smuuf\StrictObject;

/**
 * Abstract syntax tree object (result from parsing Primi source code)..
 *
 * @see https://en.wikipedia.org/wiki/Abstract_syntax_tree
 * @internal
 */
class Ast {

	use StrictObject;

	/**
	 * Abstract syntax tree as (nested) array.
	 *
	 * @var TypeDef_AstNode
	 */
	private array $tree;

	/**
	 * @param TypeDef_AstNode $ast
	 */
	public function __construct(array $ast) {
		$this->tree = $ast;
	}

	/**
	 * @return TypeDef_AstNode
	 */
	public function getTree(): array {
		return $this->tree;
	}

}


text:
{% extends "base.html" %}

{% block title %}FAQ - {% endblock %}

{% block content %}

FAQ

 Por qué hiciste la aplicación?

                    Siempre quiero tener a mano la cotización del dólar y queria hacer una aplicación con Flask, de esás dos aplicaciones nació xchange.uy

 De dónde sacas los datos?

                    Un script Python procesa la página del BROU (Banco de la República Oriental del Uruguay) y mediante scrapping extrae los precios de compra y venta.

 A qué hora se extraen los datos?

                    Todos los días a las 0 horas de Uruguay. Todavía estoy por averigüar a que hora el BROU actualiza la página con las cotizaciones.

 Qué significan las flechas al lado de los precios?

                    Es la tendencia del precio respecto al día anterior.

 Vas a agregar más monedas?

                    Lo estoy pensando aunque mi idea es mantener la aplicación lo más minimalista posible como ahora.

 Porqué xchange?

                    La X en inglés se pronuncia igual que EX por lo que XCHANGE se pronunca igual que EXCHANGE (que significa "cambio" en inglés). Digamos que xchange.uy queda menos formal que usar
                    exchange.uy y me gustó.

 Algúna sugerencia?

                    En tu celular si creas un atajo (shortcut) a la aplicación en tu escritorio te aparecerá el icono de la aplicación y podrás ejecutarla como aplicación nativa (sin tener que abrir el navegador).

 Se puede usar en modo offline?

                    Por ahora no. Tal vez le agregue le agregue la feature de guardar la última cotización en el local storage del navegador.

 Porqué el botón "Donar" de Paypal?

                    Porque el hosting sale plata por mes, lo que se done se usará para pagar el hosting donde reside la aplicación.

 La aplicación provee un api para consumir los precios de compra y venta?

                    Si. La extensión Flask-Restless provee un api simple para esos datos. Se pueden consumir en: http://xchange.uy/api/rates/.

 Qué usaste para hacer la aplicación:

 Python

 Flask

 Flask-SQLAlchemy

 Flask-Restless

 SQLAlchemy

 SQLite

 Requests

 lxml

 Skeleton

 Font-Awesome

 El código está disponible en algún lado?

                    Si, está en GitHub: https://github.com/marcelor/xchange.git

{% endblock %}


text:
module.exports = function(grunt) {

  // ===========================================================================
  // CONFIGURE GRUNT ===========================================================
  // ===========================================================================
  grunt.initConfig({

    // get the configuration info from package.json ----------------------------
    // this way we can use things like name and version (pkg.name)
    pkg: grunt.file.readJSON('package.json'),
    bowerInstall: {

      target: {

        // Point to the files that should be updated when
        // you run `grunt bower-install`
        src: [
          'app/templates/base.html',   // .html support...
        ],

        // Optional:
        // ---------
        cwd: '',
        dependencies: true,
        devDependencies: false,
        exclude: [],
        fileTypes: {},
        ignorePath: '',
        overrides: {}
      }
    }
  });

  // ===========================================================================
  // LOAD GRUNT PLUGINS ========================================================
  // ===========================================================================
  // we can only load these if they are in our package.json
  // make sure you have run npm install so our app can find these
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-less');
  grunt.loadNpmTasks('grunt-contrib-cssmin');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-bower-install');

};


text:
module Transit
  class Region
    include ActiveModel::Naming
    include ActiveModel::Serialization

    attr_reader :id, :content, :type, :data
    attr_accessor :attributes

    def initialize(data = nil)
      @attributes = (data || {}).stringify_keys!
      @attributes.each do |key, value|
        key = "content" if key.to_s.eql?('value')
        instance_variable_set("@#{key.to_s}", value)
      end
    end
  end
end


text:
package com.lukzdev.grow.model.entities;

import com.lukzdev.grow.model.Box2DWorld;
import com.lukzdev.grow.model.GameWorld;
import com.lukzdev.grow.model.PhysicsObject;

/**
 * Trunk it's a special branch that can get hits from enemies! Take care of it!
 *
 * @author Lukasz Zmudziak, @lukz_dev on 2016-01-16.
 */
public class Trunk extends Branch {

    private Tree tree;

    public Trunk(float x, float y, float width, float height, Box2DWorld box2DWorld, Tree tree) {
        super(x, y, width, height, box2DWorld);

        this.tree = tree;
    }

    @Override
    public void handleBeginContact(PhysicsObject psycho2, GameWorld world) {
        if(psycho2 instanceof Enemy) {
            tree.getHit((Enemy)psycho2);
        }
    }

}


text:
package uk.ac.ebi.quickgo.annotation.service.comm.rest.geneproduct.converter;

import uk.ac.ebi.quickgo.annotation.service.comm.rest.geneproduct.model.BasicGeneProduct;
import uk.ac.ebi.quickgo.rest.search.request.converter.ConvertedFilter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import org.junit.Before;
import org.junit.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;

/**
 * @author Tony Wardell
 * Date: 26/06/2017
 * Time: 15:23
 * Created with IntelliJ IDEA.
 */
public class GeneProductFilterConverterTest {
    private GeneProductFilterConverter converter;

    @Before
    public void setUp() {
        converter = new GeneProductFilterConverter();
    }

    @Test
    public void inputIsValueInConvertedFilter() {
        BasicGeneProduct geneProduct = createBasicGeneProduct();

        ConvertedFilter<BasicGeneProduct> convertedFilter = converter.transform(geneProduct);

        assertThat(convertedFilter.getConvertedValue(), is(geneProduct));
        assertThat(convertedFilter.getFilterContext(), is(Optional.empty()));
    }

    private BasicGeneProduct createBasicGeneProduct() {
        BasicGeneProduct geneProduct = new BasicGeneProduct();
        List<BasicGeneProduct.Result> results = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            BasicGeneProduct.Result result = new BasicGeneProduct.Result();
            result.setId("ID:" + i);
            result.setName("name" + i);
            result.setSynonyms(Collections.singletonList("nameish"+ i));
            results.add(result);
        }
        geneProduct.setResults(results);
        return geneProduct;
    }
}


text:
package com.google.common.collect;

import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Collections.emptyList;

import com.google.common.annotations.GwtCompatible;
import java.util.ArrayList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Optional;
import java.util.stream.Collector;
import org.checkerframework.checker.nullness.qual.Nullable;

/**
 * Collectors not present in {@code java.util.stream.Collectors} that are not otherwise associated
 * with a {@code com.google.common} type.
 *
 * @author Louis Wasserman
 * @since 21.0
 */
@GwtCompatible
@ElementTypesAreNonnullByDefault
public final class MoreCollectors {

  /*
   * TODO(lowasser): figure out if we can convert this to a concurrent AtomicReference-based
   * collector without breaking j2cl?
   */
  private static final Collector<Object, ?, Optional<Object>> TO_OPTIONAL =
      Collector.of(
          ToOptionalState::new,
          ToOptionalState::add,
          ToOptionalState::combine,
          ToOptionalState::getOptional,
          Collector.Characteristics.UNORDERED);

  /**
   * A collector that converts a stream of zero or one elements to an {@code Optional}.
   *
   * @throws IllegalArgumentException if the stream consists of two or more elements.
   * @throws NullPointerException if any element in the stream is {@code null}.
   * @return {@code Optional.of(onlyElement)} if the stream has exactly one element (must not be
   *     {@code null}) and returns {@code Optional.empty()} if it has none.
   */
  @SuppressWarnings("unchecked")
  public static <T> Collector<T, ?, Optional<T>> toOptional() {
    return (Collector) TO_OPTIONAL;
  }

  private static final Object NULL_PLACEHOLDER = new Object();

  private static final Collector<@Nullable Object, ?, @Nullable Object> ONLY_ELEMENT =
      Collector.<@Nullable Object, ToOptionalState, @Nullable Object>of(
          ToOptionalState::new,
          (state, o) -> state.add((o == null) ? NULL_PLACEHOLDER : o),
          ToOptionalState::combine,
          state -> {
            Object result = state.getElement();
            return (result == NULL_PLACEHOLDER) ? null : result;
          },
          Collector.Characteristics.UNORDERED);

  /**
   * A collector that takes a stream containing exactly one element and returns that element. The
   * returned collector throws an {@code IllegalArgumentException} if the stream consists of two or
   * more elements, and a {@code NoSuchElementException} if the stream is empty.
   */
  @SuppressWarnings("unchecked")
  public static <T extends @Nullable Object> Collector<T, ?, T> onlyElement() {
    return (Collector) ONLY_ELEMENT;
  }

  /**
   * This atrocity is here to let us report several of the elements in the stream if there were more
   * than one, not just two.
   */
  private static final class ToOptionalState {
    static final int MAX_EXTRAS = 4;

    @Nullable Object element;
    List<Object> extras;

    ToOptionalState() {
      element = null;
      extras = emptyList();
    }

    IllegalArgumentException multiples(boolean overflow) {
      StringBuilder sb =
          new StringBuilder().append("expected one element but was: <").append(element);
      for (Object o : extras) {
        sb.append(", ").append(o);
      }
      if (overflow) {
        sb.append(", ...");
      }
      sb.append('>');
      throw new IllegalArgumentException(sb.toString());
    }

    void add(Object o) {
      checkNotNull(o);
      if (element == null) {
        this.element = o;
      } else if (extras.isEmpty()) {
        // Replace immutable empty list with mutable list.
        extras = new ArrayList<>(MAX_EXTRAS);
        extras.add(o);
      } else if (extras.size() < MAX_EXTRAS) {
        extras.add(o);
      } else {
        throw multiples(true);
      }
    }

    ToOptionalState combine(ToOptionalState other) {
      if (element == null) {
        return other;
      } else if (other.element == null) {
        return this;
      } else {
        if (extras.isEmpty()) {
          // Replace immutable empty list with mutable list.
          extras = new ArrayList<>();
        }
        extras.add(other.element);
        extras.addAll(other.extras);
        if (extras.size() > MAX_EXTRAS) {
          extras.subList(MAX_EXTRAS, extras.size()).clear();
          throw multiples(true);
        }
        return this;
      }
    }

    Optional<Object> getOptional() {
      if (extras.isEmpty()) {
        return Optional.ofNullable(element);
      } else {
        throw multiples(false);
      }
    }

    Object getElement() {
      if (element == null) {
        throw new NoSuchElementException();
      } else if (extras.isEmpty()) {
        return element;
      } else {
        throw multiples(false);
      }
    }
  }

  private MoreCollectors() {}
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>app/components/nf-svg-path.js - ember-cli-nf-graph</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">

            API Docs for:

APIs

Classes

Modules

                            <input type="search" id="api-filter" placeholder="Type to filter APIs">

components.nf-area

components.nf-area-stack

components.nf-bars

components.nf-crosshair

components.nf-dot

components.nf-gg

components.nf-graph

components.nf-graph-content

components.nf-horizontal-line

components.nf-line

components.nf-plot

components.nf-range-marker

components.nf-range-markers

components.nf-right-tick

components.nf-selection-box

components.nf-svg-image

components.nf-svg-line

components.nf-svg-path

components.nf-svg-rect

components.nf-vertical-line

components.nf-x-axis

components.nf-y-axis

components.nf-y-diff

components.{nf-scroll-area}

mixins.graph-area-utils

mixins.graph-data-graphic

mixins.graph-data-position-utils

mixins.graph-graphic-with-tracking-dot

mixins.graph-has-graph-parent

mixins.graph-line-utils

mixins.graph-registered-graphic

mixins.graph-requires-scale-source

mixins.graph-selectable-graphic

utils.nf.graph-event

utils.nf.graph-mouse-event

utils.nf.graph-position

utils.nf.scroll-area-action-context

utils.parse-property-expression

scale-utils

utils/nf/array-helpers

utils/nf/svg-dom

                    Show:

                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited

                        <input type="checkbox" id="api-show-protected">
                        Protected

                        <input type="checkbox" id="api-show-private">
                        Private

                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated

File: app/components/nf-svg-path.js

import Ember from 'ember';
import HasGraphParent from 'ember-cli-nf-graph/mixins/graph-has-graph-parent';
import RequiresScaleSource from 'ember-cli-nf-graph/mixins/graph-requires-scale-source';
import { normalizeScale } from 'ember-cli-nf-graph/utils/nf/scale-utils';
import SelectableGraphic from 'ember-cli-nf-graph/mixins/graph-selectable-graphic';

/**
	An SVG path primitive that plots based on a graph's scale.
	@namespace components
	@class nf-svg-path
	@extends Ember.Component
	@uses mixins.graph-has-graph-parent
	@uses mixins.graph-requires-scale-source
	@uses mixins.graph-selectable-graphic
*/
export default Ember.Component.extend(HasGraphParent, RequiresScaleSource, SelectableGraphic, {
	type: 'path',

	classNameBindings: [':nf-svg-path', 'selectable', 'selected'],

	attributeBindings: ['d'],

	/**
		The array of points to use to plot the path. This is an array of arrays, in the following format:

					// specify path pen commands
					[
						[50, 50, 'L'],
						[100, 100, 'L']
					]

					// or they will default to 'L'
					[
						[50, 50],
						[100, 100]
					]

	@property points
	@type Array
	*/
	points: null,

	/**
		The data points mapped to scale
		@property svgPoints
		@type Array
	*/
	svgPoints: function(){
		var points = this.get('points');
		var xScale = this.get('xScale');
		var yScale = this.get('yScale');
		if(Ember.isArray(points) && points.length > 0) {
			return points.map(function(v) {
				var dx = normalizeScale(xScale, v[0]);
				var dy = normalizeScale(yScale, v[1]);
				var c = v.length > 2 ? v[2] : 'L';
				return [dx, dy, c];
			});
		}
	}.property('points.[]', 'xScale', 'yScale'),

	click: function(){
		if(this.get('selectable')) {
			this.toggleProperty('selected');
		}
	},

	/**
		The raw svg path d attribute output
		@property d
		@type String
	*/
	d: function(){
		var svgPoints = this.get('svgPoints');
		if(Ember.isArray(svgPoints) && svgPoints.length > 0) {
			return svgPoints.reduce(function(d, pt, i) {
				if(i === 0) {
					d += 'M' + pt[0] + ',' + pt[1];
				}
				d += ' ' + pt[2] + pt[0] + ',' + pt[1];
				return d;
			}, '');
		} else {
			return 'M0,0';
		}
	}.property('svgPoints'),
});


text:
<!--
Copyright 2013 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

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

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

<!DOCTYPE html><meta charset="UTF-8">

<script src="../bootstrap.js"></script>
<script>
"use strict";

var globalVar = 0;
var incGlobalVar = function() {
  globalVar += 1;
}
var failed = false;

for (var i = 0; i < 100; i++) {
  document.timeline.play(new Animation(null, incGlobalVar, 1));
}

document.timeline.play(new Animation(null, function() {
  if (globalVar !== 100) {
    failed = true;
  }
  globalVar = 0;
}, 1));

// ensure at least one point is sampled
at(0, function() { });

timing_test(function() {
  at(1, function() { assert_true(!failed); });
  },
  "the 101st animation should always come 101st");

</script>


text:
import angular from 'angular';
import Home from './home/home';
import Login from './auth/login/login';
import Signup from './auth/signup/signup';

let componentModule = angular.module('app.components', [
  Home,
  Login,
  Signup
])

.name;

export default componentModule;


text:
Parse.Cloud.define("hello", function(request, response) {
  response.success("Hello world!");
});

// Status code 0 : request made ; 1 : process started ; 2 : process completed successfully
// Function to set status code to 1 and assign a tutor ; return no tutor availble in ur locality in case of no tutor
// After tutor is assigned , he must be sent a push notification consisting of name of student , subject and topic along with his phone number
// If the tutor accepts the request , a notification must be sent to the student with details of the tutor

Parse.Cloud.define("maestroRequest" , function(request , response) {

	var User = Parse.Object.extend("User");
	var RequestLog = Parse.Object.extend("RequestLog");
	var Installation = Parse.Object.extend("Installation");
	var studentDetails = new Parse.Query(User);
	var maestroDetails = new Parse.Query(User);
	var pushQuery = new Parse.Query(Installation);
	var maestroUsername;

	ObjectId = request.params.ObjectId;
	Subject  = request.params.Subject;
	Topic    = request.params.Topic;
	Place    = request.params.Place;

	studentDetails.equalTo("objectId", ObjectId);
	studentDetails.find({
		success:function(result){
			if(result.length!=1){
				response.success("something is fishy");
			}
			else{
				info = result[0];
				email        = info.get("username");
				studentName  = info.get("Name");
				studentClass = info.get("studentClass");
				mobile       = info.get("Mobile");
			}
		},
		error:function(){
			response.error("Oops !! Could not connect with server");
		}
	});

	maestroDetails.equalTo("isMaestro", true).equalTo("Subject", Subject).equalTo("Location", Place);
	maestroDetails.find({
		success:function(result){
			if(result.length==0){
				response.success("Sorry !! None of the maestros satisfy your conditions");
			}
			else{
				maestroUsername = result[0].get("username").toString();
				pushQuery.equalTo("username", maestroUsername);
				Parse.Push.send({
					where: pushQuery,
					data: {
						alert    : "We have a job for you.",
						action   : "in.co.nebulax.maestro.UPDATE_STATUS",
						name     : studentName.toString(),
						email    : email.toString(),
						topic    : Topic.toString() + ", Class-" + studentClass.toString(),
						city     : Place.toString(),
						mobile   : mobile.toString(),
					}
				}, {
					success: function() {
						// Push was successful
						response.success("Push notification sent.");
					},
					error: function(error) {
						// Handle error
						response.error("Oops !! Could not make the push.")
					}
				});
			}
		},
		error:function(){
			response.error("Oops !! Could not connect with server");
		}
	});
});


text:
def getNumReadsPerAllele(SNPReadFileName, outputFileName):
	# Gets the number of reads from each allele for each SNP
	# ASSUMES THAT SNPReadFile IS SORTED BY CHROMOSOME, POSITION, ALLELE
	# Output file consists of 5 columns
	# 1.  Chromosome
	# 2.  Position
	# 3.  Number of reads from reference allele
	# 4.  Total number of reads
	# 5.  Fraction of reads from reference allele
	SNPReadFile = open(SNPReadFileName)
	outputFile = open(outputFileName, 'w+')
	lastSNP = ("", 0)
	numRef = 0
	numAlt = 0
	for line in SNPReadFile:
		# Iterate through the SNPs and the reads and compute the fraction of each read from the reference allele
		lineElements = line.split("\t")
		currentSNP = (lineElements[2], int(lineElements[3]))
		currentAllele = int(lineElements[1])
		if currentSNP != lastSNP:
			# At a new SNP, so record the results for the last SNP
			numReadsForSNP = numRef + numAlt
			if numReadsForSNP > 0:
				# Not at the first SNP
				fracRef = float(numRef)/float(numReadsForSNP)
				outputFile.write(lastSNP[0] + "\t" + str(lastSNP[1]) + "\t" + str(numRef) + "\t" + str(numReadsForSNP) + "\t" + str(fracRef) + "\n")
				numRef = 0
				numAlt = 0
			lastSNP = currentSNP
		if currentAllele == 0:
			# The current allele is the reference allele
			numRef = numRef + 1
		else:
			# The current allele is the alternate allele
			numAlt = numAlt + 1
	numReadsForSNP = numRef + numAlt
	fracRef = float(numRef)/float(numReadsForSNP)
	outputFile.write(currentSNP[0] + "\t" + str(currentSNP[1]) + "\t" + str(numRef) + "\t" + str(numReadsForSNP) + "\t" + str(fracRef) + "\n")
	SNPReadFile.close()
	outputFile.close()

if __name__=="__main__":
	import sys
	SNPReadFileName = sys.argv[1]
	outputFileName = sys.argv[2]
	getNumReadsPerAllele(SNPReadFileName, outputFileName)


text:
var _ = require('underscore');
var utils = require('../utils/utils.js');
var testUtils = require('../test-utils.js');
var selftest = require('../selftest.js');
var stats = require('../stats.js');
var Sandbox = selftest.Sandbox;
var files = require('../fs/files.js');

selftest.define("create-publish-and-search",
    ["slow", "net", "test-package-server", "checkout"], function () {
  var s = new Sandbox;

  var username = "test";
  var password = "testtest";

  testUtils.login(s, username, password);
  var packageName = utils.randomToken();
  var fullPackageName = username + ":" + packageName;
  var fsPackageName = packageName;
  var githubUrl = "http://github.com/foo/bar";
  var summary = "Package for test";

  // Create a package that has a versionsFrom for a nonexistent release and see
  // that we throw on it.
  var noPack = fullPackageName + "2";
  var noPackDirName = fsPackageName + "2";
  s.createPackage(noPackDirName, noPack, "package-of-two-versions");
  s.cd(noPackDirName, function() {
    var packOpen = s.read("package.js");
    packOpen = packOpen + "\nPackage.onUse(function(api) { \n" +
      "api.versionsFrom(\"THIS-RELEASE-DOES-NOT-EXIST@0.9\");\n" +
      " });";
    s.write("package.js", packOpen);
    run = s.run("publish", "--create");
    run.waitSecs(20);
    run.matchErr("Unknown release");
  });

  // Now create a real package.
  var run = s.run("create", "--package", fullPackageName);
  run.waitSecs(15);
  run.expectExit(0);
  run.match(fullPackageName);

  s.cd(fsPackageName);

  // set a github URL & summary in the package
  var packageJsContents = s.read("package.js");
  var newPackageJsContents = packageJsContents.replace(
      /git: \'.*\'/, "git: \'" + githubUrl + "\'");
  newPackageJsContents = newPackageJsContents.replace(
      /summary: \'.*\'/, "summary: \'" + summary + "\'");
  s.write("package.js", newPackageJsContents);

  // Write some documentation.
  s.write("README.md", "Heading\n==\nDocs here");

  run = s.run("publish");
  run.waitSecs(15);
  run.matchErr("There is no package named"); // need to pass --create
  run.expectExit(1);

  run = s.run("publish", "--create");
  run.waitSecs(30);
  run.match("Published");
  run.expectExit(0);

  run = s.run("search", packageName);
  run.waitSecs(15);
  run.expectExit(0);
  run.match(fullPackageName);

  run = s.run("show", fullPackageName);
  run.waitSecs(15);
  run.expectExit(0);
  run.match("Git");
  run.match(githubUrl);

  // name override.
  packageName = utils.randomToken();
  var newPackageName = username + ":" + packageName;
  var newPackageDirName = packageName;
  var minPack = " Package.describe({ " +
    "summary: 'Test package: " + packageName + "'," +
    "version: '1.0.1'," +
    "documentation: null," +
    "name: '" + newPackageName + "'});";

  s.createPackage(newPackageDirName, newPackageName, "package-of-two-versions");
  s.cd(newPackageDirName, function() {
    s.write("package.js", minPack);
    // If we manage to publish without the --create flag, that's probably an
    // indicator that we are reading the directory instead of the override, or,
    // in any case, that we can't rely on the rest of this test working.
    run = s.run("publish");
    run.waitSecs(15);
    run.matchErr("There is no package named " + newPackageName);
    run.expectExit(1);

    // Might a well actually publish it.
    run = s.run("publish", "--create");
    run.waitSecs(30);
    run.expectExit(0);
    run.match("Published");
  });

  run = s.run("show", newPackageName);
  run.waitSecs(15);
  run.expectExit(0);
  run.match("Package: " + newPackageName);
});

selftest.define("publish-one-arch",
    ["slow", "net", "test-package-server", "checkout"], function () {
  var s = new Sandbox;

  var username = "test";
  var password = "testtest";

  testUtils.login(s, username, password);
  var packageName = utils.randomToken();
  var fullPackageName = username + ":" + packageName;
  var newPackageDirName = packageName;

  s.createPackage(newPackageDirName, fullPackageName,
    "package-of-two-versions");
  s.cd(newPackageDirName);

  var run = s.run("publish", "--create");
  run.waitSecs(15);
  run.expectExit(0);
  run.match("Published");
  run.forbidAll("WARNING");

  packageName = utils.randomToken();
  fullPackageName = username + ":" + packageName;

  s.createPackage(packageName, fullPackageName, "package-with-npm");
  s.cd(packageName);

  run = s.run("publish", "--create");
  run.waitSecs(15);
  run.expectExit(0);
  run.matchErr("This package contains binary code and must be");

});

selftest.define("list-with-a-new-version",
    ["slow", "net", "test-package-server", "checkout"],
    function () {
  var s = new Sandbox;

  var username = "test";
  var password = "testtest";

  testUtils.login(s, username, password);
  var packageName = utils.randomToken();
  var fullPackageName = username + ":" + packageName;
  var run;

  // Now, create a package.
  s.createPackage(packageName, fullPackageName, "package-of-two-versions");
  // Publish the first version.
  s.cd(packageName, function () {
    run = s.run("publish", "--create");
    run.waitSecs(15);
    run.expectExit(0);
    run.match("Published");
  });

  // Create an app. Add the package to it. Check that list shows the package and
  // does not show the new versions available message.
  run = s.run('create', 'mapp');
  run.waitSecs(15);
  run.expectExit(0);
  s.cd('mapp', function () {
    run = s.run("add", fullPackageName);
    run.waitSecs(100);
    run.expectExit(0);
    run = s.run("list");
    run.waitSecs(10);
    run.match(fullPackageName);
    run.match("1.0.0 ");
    run.forbidAll("New versions");
    run.expectExit(0);
  });

  // Change the package to increment version and publish the new package.
  s.cd(packageName, function () {
    setPackageVersion(s, "1.0.1");
    run = s.run("publish");
    run.waitSecs(15);
    run.expectExit(0);
    run.match("Published");
  });

  // cd into the app and run list again. We should get some sort of message.
  s.cd('mapp', function () {
    run = s.run("list");
    run.match(fullPackageName);
    run.match("1.0.0*");
    run.match("New versions");
    run.match("meteor update");
    run.expectExit(0);

    // Switch to the other version.
    run = s.run("add", fullPackageName + "@1.0.1");
    run.waitSecs(100);
    run.expectExit(0);
    run = s.run("list");
    run.waitSecs(10);
    run.match(fullPackageName);
    run.match("1.0.1 ");
    run.forbidAll("New versions");
    run.expectExit(0);

    // Switch back to the first version.
    run = s.run("add", fullPackageName + "@=1.0.0");
    run.waitSecs(100);
    run.expectExit(0);
    run = s.run("list");
    run.waitSecs(10);
    run.match(fullPackageName);
    run.match("1.0.0*");
    run.match("New versions");
    run.match("meteor update");
    run.expectExit(0);

    // ... and back to the second version
    run = s.run("add", fullPackageName + "@=1.0.1");
    run.waitSecs(100);
    run.expectExit(0);
    run = s.run("list");
    run.waitSecs(10);
    run.match(fullPackageName);
    run.match("1.0.1 ");
    run.forbidAll("New versions");
    run.expectExit(0);
  });

  // Now publish an 1.0.4-rc4.
  s.cd(packageName, function () {
    setPackageVersion(s, "1.0.4-rc.4");
    run = s.run("publish");
    run.waitSecs(15);
    run.expectExit(0);
    run.match("Published");
  });

  s.cd('mapp', function () {
    // //
    // run = s.run("search", "asdf");
    // run.waitSecs(100);
    // run.expectExit(0);

    // Because it's an RC, we shouldn't see an update message.
    run = s.run("list");
    run.waitSecs(10);
    run.match(fullPackageName);
    run.match("1.0.1 ");
    run.forbidAll("New versions");
    run.expectExit(0);

    // It works if ask for it, though.
    run = s.run("add", fullPackageName + "@1.0.4-rc.4");
    run.waitSecs(100);
    run.expectExit(0);
    run = s.run("list");
    run.waitSecs(10);
    run.match(fullPackageName);
    run.match("1.0.4-rc.4 ");
    run.forbidAll("New versions");
    run.expectExit(0);
  });
});

// Sets the version on the multi-version package.
var setPackageVersion = function (sandbox, version) {
  var packOpen = sandbox.read("package-version.js");
  packOpen = packOpen.replace(/~version~/g, version);
  sandbox.write("package.js", packOpen);
};

selftest.define("package-depends-on-either-version",
    ["slow", "net", "test-package-server", "checkout"], function () {
  var s = new Sandbox;

  var username = "test";
  var password = "testtest";
  testUtils.login(s, username, password);
  var packageNameDependent = utils.randomToken();
  var run;

  // First, we publish fullPackageNameDep at 1.0.0 and publish it..
  var fullPackageNameDep = username + ":" + packageNameDependent;
  s.createPackage(packageNameDependent, fullPackageNameDep, "package-of-two-versions");
  s.cd(packageNameDependent, function() {
    run = s.run("publish", "--create");
    run.waitSecs(20);
    run.match("Published");
  });

  // Then, we publish fullPackageNameDep at 2.0.0
  s.cd(packageNameDependent, function() {
    setPackageVersion(s, "2.0.0");
    run = s.run("publish");
    run.waitSecs(20);
    run.match("Published");
  });

  // Then, we make another one that depends on either version and publish.
  var another = utils.randomToken();
  var fullPackageAnother = username + ":" + another;
  s.createPackage(another, fullPackageAnother, "package-of-two-versions");
  s.cd(another, function() {
    var packOpen = s.read("package.js");
   packOpen = packOpen + "\nPackage.onUse(function(api) { \n" +
      "api.use(\"" + fullPackageNameDep +
      "@1.0.0 || 2.0.0\");\n" +
      " });";
    s.write("package.js", packOpen);
    run = s.run("publish", "--create");
    run.waitSecs(20);
    run.match("Published");
  });

  // Now we add them to an app.
  // Starting a run
  s.createApp("myapp", "package-tests");
  s.cd("myapp");

  run = s.run("add", fullPackageNameDep + "@=1.0.0");
  run.match(fullPackageNameDep);
  run.expectExit(0);

  var readVersions = function () {
    var lines = s.read(".meteor/versions").split("\n");
    var depend = {};
    _.each(lines, function(line) {
      if (!line) return;
      // Packages are stored of the form foo@1.0.0, so this should give us an
      // array [foo, 1.0.0].
      var split = line.split('@');
      var pack = split[0];
      depend[pack] = split[1];
    });
    return depend;
  };

  var depend = readVersions();
  selftest.expectEqual(depend[fullPackageNameDep], "1.0.0");

  run = s.run("add", fullPackageAnother + "@=1.0.0");
  run.match(fullPackageAnother);
  run.expectExit(0);

  var depend = readVersions();
  selftest.expectEqual(depend[fullPackageNameDep], "1.0.0");
  selftest.expectEqual(depend[fullPackageAnother], "1.0.0");

  run = s.run("add", fullPackageNameDep + "@=2.0.0");
  run.match(fullPackageNameDep);
  run.expectExit(0);

  depend = readVersions();
  selftest.expectEqual(depend[fullPackageNameDep], "2.0.0");
  selftest.expectEqual(depend[fullPackageAnother], "1.0.0");
});


text:
package be.appfoundry.android.bejug;

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import be.appfoundry.android.bejug.dummy.DummyData;

/**
 * A list fragment representing a list of Persons. This fragment
 * also supports tablet devices by allowing list items to be given an
 * 'activated' state upon selection. This helps indicate which item is
 * currently being viewed in a {@link PersonDetailFragment}.
 * <p>
 * Activities containing this fragment MUST implement the {@link PersonSelectedCallback}
 * interface.
 */
public class PersonListFragment extends ListFragment {

    /**
     * The serialization (saved instance state) Bundle key representing the
     * activated person position. Only used on tablets.
     */
    private static final String STATE_ACTIVATED_POSITION = "activated_position";

    /**
     * The fragment's current callback object, which is notified of list item
     * clicks.
     */
    private PersonSelectedCallback mPersonSelectedCallback = sDummyPersonSelectedCallback;

    /**
     * The current activated person position. Only used on tablets.
     */
    private int mActivatedPosition = ListView.INVALID_POSITION;

    /**
     * A callback interface that all activities containing this fragment must
     * implement. This mechanism allows activities to be notified of person
     * selections.
     */
    public interface PersonSelectedCallback {
        /**
         * Callback for when a person has been selected.
         */
        public void onPersonSelected(String id);
    }

    /**
     * A dummy implementation of the {@link PersonSelectedCallback} interface that does
     * nothing. Used only when this fragment is not attached to an activity.
     */
    private static PersonSelectedCallback sDummyPersonSelectedCallback = new PersonSelectedCallback() {
        @Override
        public void onPersonSelected(String id) {
        }
    };

    /**
     * Mandatory empty constructor for the fragment manager to instantiate the
     * fragment (e.g. upon screen orientation changes).
     */
    public PersonListFragment() {
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        PersonAdapter adapter = new PersonAdapter(getActivity(), DummyData.PERSONS);
        setListAdapter(adapter);

    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        // Restore the previously serialized activated item position.
        if (savedInstanceState != null
                && savedInstanceState.containsKey(STATE_ACTIVATED_POSITION)) {
            setActivatedPosition(savedInstanceState.getInt(STATE_ACTIVATED_POSITION));
        }
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);

        // Activities containing this fragment must implement its callbacks.
        if (!(activity instanceof PersonSelectedCallback)) {
            throw new IllegalStateException("Activity must implement fragment's callbacks.");
        }

        mPersonSelectedCallback = (PersonSelectedCallback) activity;
    }

    @Override
    public void onDetach() {
        super.onDetach();

        // Reset the active callbacks interface to the dummy implementation.
        mPersonSelectedCallback = sDummyPersonSelectedCallback;
    }

    @Override
    public void onListItemClick(ListView listView, View view, int position, long id) {
        super.onListItemClick(listView, view, position, id);

        // Notify the active callbacks interface (the activity, if the
        // fragment is attached to one) that a person has been selected.
        mPersonSelectedCallback.onPersonSelected(DummyData.PERSONS.get(position).id);
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        if (mActivatedPosition != ListView.INVALID_POSITION) {
            // Serialize and persist the activated item position.
            outState.putInt(STATE_ACTIVATED_POSITION, mActivatedPosition);
        }
    }

    /**
     * Turns on activate-on-click mode. When this mode is on, list items will be
     * given the 'activated' state when touched.
     */
    public void setActivateOnItemClick(boolean activateOnItemClick) {
        // When setting CHOICE_MODE_SINGLE, ListView will automatically
        // give items the 'activated' state when touched.
        getListView().setChoiceMode(activateOnItemClick
                ? ListView.CHOICE_MODE_SINGLE
                : ListView.CHOICE_MODE_NONE);
    }

    private void setActivatedPosition(int position) {
        if (position == ListView.INVALID_POSITION) {
            getListView().setItemChecked(mActivatedPosition, false);
        } else {
            getListView().setItemChecked(position, true);
        }

        mActivatedPosition = position;
    }
}


text:
#pragma once

#include "../Core/Object.h"

namespace Urho3D
{

/// Resource reloading started.
URHO3D_EVENT(E_RELOADSTARTED, ReloadStarted)
{
}

/// Resource reloading finished successfully.
URHO3D_EVENT(E_RELOADFINISHED, ReloadFinished)
{
}

/// Resource reloading failed.
URHO3D_EVENT(E_RELOADFAILED, ReloadFailed)
{
}

/// Tracked file changed in the resource directories.
URHO3D_EVENT(E_FILECHANGED, FileChanged)
{
    URHO3D_PARAM(P_FILENAME, FileName);                    // String
    URHO3D_PARAM(P_RESOURCENAME, ResourceName);            // String
}

/// Resource loading failed.
URHO3D_EVENT(E_LOADFAILED, LoadFailed)
{
    URHO3D_PARAM(P_RESOURCENAME, ResourceName);            // String
}

/// Resource not found.
URHO3D_EVENT(E_RESOURCENOTFOUND, ResourceNotFound)
{
    URHO3D_PARAM(P_RESOURCENAME, ResourceName);            // String
}

/// Unknown resource type.
URHO3D_EVENT(E_UNKNOWNRESOURCETYPE, UnknownResourceType)
{
    URHO3D_PARAM(P_RESOURCETYPE, ResourceType);            // StringHash
}

/// Resource background loading finished.
URHO3D_EVENT(E_RESOURCEBACKGROUNDLOADED, ResourceBackgroundLoaded)
{
    URHO3D_PARAM(P_RESOURCENAME, ResourceName);            // String
    URHO3D_PARAM(P_SUCCESS, Success);                      // bool
    URHO3D_PARAM(P_RESOURCE, Resource);                    // Resource pointer
}

/// Language changed.
URHO3D_EVENT(E_CHANGELANGUAGE, ChangeLanguage)
{
}

}


text:
@implementation LSTableViewCell

@end


text:
package com.jcwhatever.nucleus.internal.commands.regions;

import com.jcwhatever.nucleus.Nucleus;
import com.jcwhatever.nucleus.internal.NucLang;
import com.jcwhatever.nucleus.managed.commands.CommandInfo;
import com.jcwhatever.nucleus.managed.commands.arguments.ICommandArguments;
import com.jcwhatever.nucleus.managed.commands.exceptions.CommandException;
import com.jcwhatever.nucleus.managed.commands.mixins.IExecutableCommand;
import com.jcwhatever.nucleus.managed.commands.utils.AbstractCommand;
import com.jcwhatever.nucleus.managed.language.Localizable;
import com.jcwhatever.nucleus.managed.messaging.ChatPaginator;
import com.jcwhatever.nucleus.regions.IRegion;
import com.jcwhatever.nucleus.utils.text.TextUtils.FormatTemplate;

import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import java.util.List;

@CommandInfo(
        parent="regions",
        command = "current",
        staticParams = { "page=1" },
        floatingParams = { "search="},
        description = "List the region(s) you are currently standing in.",

        paramDescriptions = {
                "page= {PAGE}"})

class CurrentSubCommand extends AbstractCommand implements IExecutableCommand {

    @Localizable static final String _PAGINATOR_TITLE = "Regions";

    @Override
    public void execute (CommandSender sender, ICommandArguments args) throws CommandException {

        CommandException.checkNotConsole(getPlugin(), this, sender);

        int page = args.getInteger("page");

        ChatPaginator pagin = createPagin(args, 7, NucLang.get(_PAGINATOR_TITLE));

        List<IRegion> regions = Nucleus.getRegionManager().getRegions(((Player) sender).getLocation());

        for (IRegion region : regions) {
            pagin.add(region.getName(), region.getPlugin().getName());
        }

        if (!args.isDefaultValue("search"))
            pagin.setSearchTerm(args.getString("search"));

        pagin.show(sender, page, FormatTemplate.LIST_ITEM_DESCRIPTION);
    }
}


text:
helmpong
========

A pong game written in helm.

![Alt text](/pong.png?raw=true)
This game does not have any winners, only losers.
It does not have any way of keeping scores.


text:
package org.apache.flink.orc;

import org.apache.flink.api.common.serialization.BulkWriter;
import org.apache.flink.configuration.ConfigOption;
import org.apache.flink.configuration.ReadableConfig;
import org.apache.flink.connector.file.src.FileSourceSplit;
import org.apache.flink.connector.file.src.reader.BulkFormat;
import org.apache.flink.orc.shim.OrcShim;
import org.apache.flink.orc.vector.RowDataVectorizer;
import org.apache.flink.orc.writer.OrcBulkWriterFactory;
import org.apache.flink.table.connector.ChangelogMode;
import org.apache.flink.table.connector.format.BulkDecodingFormat;
import org.apache.flink.table.connector.format.EncodingFormat;
import org.apache.flink.table.connector.sink.DynamicTableSink;
import org.apache.flink.table.connector.source.DynamicTableSource;
import org.apache.flink.table.data.RowData;
import org.apache.flink.table.data.vector.VectorizedColumnBatch;
import org.apache.flink.table.expressions.Expression;
import org.apache.flink.table.expressions.ResolvedExpression;
import org.apache.flink.table.factories.BulkReaderFormatFactory;
import org.apache.flink.table.factories.BulkWriterFormatFactory;
import org.apache.flink.table.factories.DynamicTableFactory;
import org.apache.flink.table.filesystem.FileSystemOptions;
import org.apache.flink.table.filesystem.PartitionFieldExtractor;
import org.apache.flink.table.types.DataType;
import org.apache.flink.table.types.logical.LogicalType;
import org.apache.flink.table.types.logical.RowType;

import org.apache.hadoop.conf.Configuration;
import org.apache.orc.TypeDescription;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Properties;
import java.util.Set;

/**
 * Orc format factory for file system.
 */
public class OrcFileFormatFactory implements BulkReaderFormatFactory, BulkWriterFormatFactory {

	public static final String IDENTIFIER = "orc";

	@Override
	public String factoryIdentifier() {
		return IDENTIFIER;
	}

	@Override
	public Set<ConfigOption<?>> requiredOptions() {
		return new HashSet<>();
	}

	@Override
	public Set<ConfigOption<?>> optionalOptions() {
		// support "orc.*"
		return new HashSet<>();
	}

	private static Properties getOrcProperties(ReadableConfig options) {
		Properties orcProperties = new Properties();
		Properties properties = new Properties();
		((org.apache.flink.configuration.Configuration) options).addAllToProperties(properties);
		properties.forEach((k, v) -> orcProperties.put(IDENTIFIER + "." + k, v));
		return orcProperties;
	}

	@Override
	public BulkDecodingFormat<RowData> createDecodingFormat(
			DynamicTableFactory.Context context, ReadableConfig formatOptions) {
		return new BulkDecodingFormat<RowData>() {

			private List<ResolvedExpression> filters;

			@Override
			public BulkFormat<RowData, FileSourceSplit> createRuntimeDecoder(
					DynamicTableSource.Context sourceContext,
					DataType producedDataType) {
				List<OrcFilters.Predicate> orcPredicates = new ArrayList<>();

				if (filters != null) {
					for (Expression pred : filters) {
						OrcFilters.Predicate orcPred = OrcFilters.toOrcPredicate(pred);
						if (orcPred != null) {
							orcPredicates.add(orcPred);
						}
					}
				}

				RowType tableType = (RowType) context.getCatalogTable().getSchema()
						.toPhysicalRowDataType().getLogicalType();
				List<String> tableFieldNames = tableType.getFieldNames();
				RowType projectedType = (RowType) producedDataType.getLogicalType();

				int[] selectedFields = projectedType.getFieldNames().stream()
						.mapToInt(tableFieldNames::indexOf).toArray();

				Properties properties = getOrcProperties(formatOptions);
				Configuration conf = new Configuration();
				properties.forEach((k, v) -> conf.set(k.toString(), v.toString()));

				String defaultPartName = context.getCatalogTable().getOptions().getOrDefault(
						FileSystemOptions.PARTITION_DEFAULT_NAME.key(),
						FileSystemOptions.PARTITION_DEFAULT_NAME.defaultValue());

				return OrcColumnarRowFileInputFormat.createPartitionedFormat(
						OrcShim.defaultShim(),
						conf,
						tableType,
						context.getCatalogTable().getPartitionKeys(),
						PartitionFieldExtractor.forFileSystem(defaultPartName),
						selectedFields,
						orcPredicates,
						VectorizedColumnBatch.DEFAULT_SIZE);
			}

			@Override
			public ChangelogMode getChangelogMode() {
				return ChangelogMode.insertOnly();
			}

			@Override
			public void applyFilters(List<ResolvedExpression> filters) {
				this.filters = filters;
			}
		};
	}

	@Override
	public EncodingFormat<BulkWriter.Factory<RowData>> createEncodingFormat(
			DynamicTableFactory.Context context, ReadableConfig formatOptions) {
		return new EncodingFormat<BulkWriter.Factory<RowData>>() {
			@Override
			public BulkWriter.Factory<RowData> createRuntimeEncoder(
					DynamicTableSink.Context sinkContext, DataType consumedDataType) {
				RowType formatRowType = (RowType) consumedDataType.getLogicalType();
				LogicalType[] orcTypes = formatRowType.getChildren().toArray(new LogicalType[0]);

				TypeDescription typeDescription = OrcSplitReaderUtil.logicalTypeToOrcType(formatRowType);

				return new OrcBulkWriterFactory<>(
						new RowDataVectorizer(typeDescription.toString(), orcTypes),
						getOrcProperties(formatOptions),
						new Configuration());
			}

			@Override
			public ChangelogMode getChangelogMode() {
				return ChangelogMode.insertOnly();
			}
		};
	}
}


text:
import sbt._

class Plugins(info: ProjectInfo) extends PluginDefinition(info) {
  val jettyEmbeddedWar = "net.usersource" % "jetty-embed-plugin" % "0.1-SNAPSHOT"
  val sbtIdeaRepo = "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
  val sbtIdea = "com.github.mpeltonen" % "sbt-idea-plugin" % "0.1-SNAPSHOT"
}


text:
function Exception() {
  this.stack = [];
}

Exception.prototype.append = function (str) {
  if (str !== undefined) this.stack.push(str);
};

Exception.prototype.rethrow = function (str) {
  this.append(str);
  throw this;
};

Exception.prototype.log = function () {
  for (var i = 0; i < this.stack.length; i++) {
    console.log(this.stack[i]);
  }
};


text:
-   interview
-

#### Explain consumer interview project

Flying noogle monster

#### What is privilege?

##### Examining our pricilages

-   La 1/17
-   Draw a horizontal line across the middle. Lable 'Middle'
-   Draw 9 equal-distant lines in the top and bottom portion

table


text:
title: Tool Safety and Tutorials
sub_heading: ''
banner_image: ''
date: 2019-02-12 20:01:35 +0000

---
Tool Safety and Tutorials

## Tutorial Links

* [How to solder through-hole parts](https://www.youtube.com/watch?v=oqV2xU1fee8)
* [How to use a multimeter](https://learn.sparkfun.com/tutorials/how-to-use-a-multimeter). Useful for measuring AC and DC voltages, and also for measuring DC current.
* [How to splice two wires together](https://www.knowyourparts.com/technical-resources/electrical/hand-wire-splicing-technique/) ([video](https://www.youtube.com/watch?v=oqV2xU1fee8)). This is useful if you are fabricating your own long cable from two shorter cables (e.g. attaching two DC pigtails together).
* [How to drill and tap a hole for a screw](https://www.youtube.com/watch?v=X9VhONdGFFg) (used for attaching the mounting plates together).
* How to use a hole saw
* How to use wire strippers ([YouTube search](https://www.youtube.com/results?search_query=how+to+use+wire+strippers))


text:
(bbn => {
  "use strict";
  bbn.fn.autoExtend("vue", {
    /**
     * component Inside Component.
     *
     * @component componentInsideComponent
     */
    componentInsideComponent: {
      props: {
       /**
        * The component that will be rendered inside the main component.
        * @prop {String|Object|Vue} component
        * @memberof componentInsideComponent
        */
        component: {
          type: [String, Object, Vue]
        },
       /**
        * The component's props.
        * @prop {Object} componentOptions
        * @memberof componentInsideComponent
        */
        componentOptions: {
          type: Object,
          default(){
            return {};
          }
        }
      }
    }
  });
})(bbn);


text:
module Fog
  module HP
    class BlockStorageV2
      class Real

        # Delete an existing block storage volume backup
        #
        # ==== Parameters
        # * 'backup_id'<~String> - UUId of the volume backup to delete
        #
        def delete_volume_backup(backup_id)
          response = request(
            :expects  => 202,
            :method   => 'DELETE',
            :path     => "backups/#{backup_id}"
          )
          response
        end

      end

      class Mock # :nodoc:all

        def delete_volume_backup(backup_id)
          response = Excon::Response.new
          if self.data[:volume_backups][backup_id]
            self.data[:volume_backups].delete(backup_id)
            response.status = 202
          else
            raise Fog::HP::BlockStorageV2::NotFound
          end
          response
        end
      end

    end
  end
end


text:
abstract class A<T> {
    abstract String foo(T t);
}

class B extends A<String> {

    @Override
    String foo(String s1) {
        return null;
    }
}

class ABC extends A<Integer> {
    @Override
    String foo(Integer integer) {
        return null;
    }
}


text:
WIP / Real time TCP communication for load-sharing / clustering of servers hosted on different machines using the node-cluster model

##good reads

https://nodejs.org/api/net.html#net_class_net_socket

https://nodejs.org/docs/v0.4.12/api/streams.html

https://nodejs.org/docs/v0.4.12/api/buffers.html

https://nodejs.org/api/cluster.html


text:
package org.opencb.opencga.storage.hadoop.variant.executors;

import org.apache.tools.ant.types.Commandline;
import org.opencb.commons.exec.Command;

import static org.opencb.opencga.storage.hadoop.variant.HadoopVariantStorageOptions.MR_EXECUTOR_SSH_PASSWORD;

/**
 * Created on 18/01/16 .
 *
 * @author Jacobo Coll <jacobo167@gmail.com>
 */
public class SystemMRExecutor extends MRExecutor {

    @Override
    public int run(String executable, String[] args) {
        return run(buildCommandLine(executable, args));
    }

    public int run(String commandLine) {
        Command command = new Command(commandLine, getEnv());
        command.run();
        return command.getExitValue();
    }

    private String buildCommandLine(String executable, String[] args) {
        redactSecureString(args, MR_EXECUTOR_SSH_PASSWORD.key());
        redactSecureString(args, "token");
        return executable + " " + Commandline.toString(args);
    }
}