text:
UINT LCRetDeleteCharHandler::Execute(LCRetDeleteChar* pPacket, Player* pPlayer )
{
    __ENTER_FUNCTION

        if(MyGetCurrentThreadID() == g_pProcessPlayerManager->m_ThreadID)
        {
            LoginPlayer*    pLoginPlayer = (LoginPlayer*)pPlayer ;
            if( pLoginPlayer==NULL )
            {
                Assert(FALSE) ;
                return PACKET_EXE_CONTINUE ;
            }
            //检查账号是否正确
            if(strcmp(pLoginPlayer->GetAccount(),pPacket->GetAccount()) != 0)
            {
                Log::SaveLog(LOGIN_LOGFILE,"LCRetDeleteCharHandler::Execute() ....OK acc=%s,packacc=%s",
                    pLoginPlayer->GetAccount(),pPacket->GetAccount());
                return PACKET_EXE_CONTINUE;
            }
            pLoginPlayer->SendPacket(pPacket);
            Log::SaveLog(LOGIN_LOGFILE,"LCRetDeleteCharHandler::Execute() ....OK");

        }
        else
        {
            AssertEx(FALSE,"LCRetDeleteCharHandler 线程资源执行错误!");
        }

        return PACKET_EXE_CONTINUE;

    __LEAVE_FUNCTION

        return PACKET_EXE_ERROR;
}


text:
from __future__ import absolute_import, unicode_literals

class InvalidFilterSpecError(ValueError):
    pass

redpajama_set_name: RedPajamaGithub


text:
alias emt="emacs --no-window-system"
alias emd="emacs --daemon"
alias emc="emacsclient"


text:
package org.destinationsol.game.maze;

import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.utils.JsonValue;
import org.destinationsol.TextureManager;
import org.destinationsol.common.SolMath;
import org.destinationsol.files.HullConfigManager;
import org.destinationsol.game.PathLoader;
import org.destinationsol.game.ShipConfig;
import org.destinationsol.game.chunk.SpaceEnvConfig;
import org.destinationsol.game.item.ItemManager;

import java.util.ArrayList;
import java.util.List;

public class MazeConfig {
  public final ArrayList<MazeTile> innerWalls;
  public final ArrayList<MazeTile> innerPasses;
  public final ArrayList<MazeTile> borderWalls;
  public final ArrayList<MazeTile> borderPasses;
  public final ArrayList<ShipConfig> outerEnemies;
  public final ArrayList<ShipConfig> innerEnemies;
  public final ArrayList<ShipConfig> bosses;
  public final SpaceEnvConfig envConfig;

  public MazeConfig(ArrayList<MazeTile> innerWalls, ArrayList<MazeTile> innerPasses, ArrayList<MazeTile> borderWalls,
    ArrayList<MazeTile> borderPasses, ArrayList<ShipConfig> outerEnemies, ArrayList<ShipConfig> innerEnemies,
    ArrayList<ShipConfig> bosses, SpaceEnvConfig envConfig)
  {
    this.innerWalls = innerWalls;
    this.innerPasses = innerPasses;
    this.borderWalls = borderWalls;
    this.borderPasses = borderPasses;
    this.outerEnemies = outerEnemies;
    this.innerEnemies = innerEnemies;
    this.bosses = bosses;
    this.envConfig = envConfig;
  }

  public static MazeConfig load(TextureManager textureManager, HullConfigManager hullConfigs, JsonValue mazeNode, FileHandle configFile,
    ItemManager itemManager)
  {
    String dirName = "mazeTiles/" + mazeNode.name + "/";
    PathLoader pathLoader = new PathLoader("mazes/" + mazeNode.name);
    PathLoader.Model paths = pathLoader.getInternalModel();
    List<TextureAtlas.AtlasRegion> innerBgs = textureManager.getPack(dirName + "innerBg", configFile);
    List<TextureAtlas.AtlasRegion> borderBgs = textureManager.getPack(dirName + "borderBg", configFile);
    ArrayList<TextureAtlas.AtlasRegion> wallTexs = textureManager.getPack(dirName + "wall", configFile);
    ArrayList<TextureAtlas.AtlasRegion> passTexs = textureManager.getPack(dirName + "pass", configFile);

    boolean metal = mazeNode.getBoolean("isMetal");
    ArrayList<MazeTile> innerWalls = new ArrayList<MazeTile>();
    buildTiles(paths, innerWalls, true, metal, innerBgs, wallTexs);
    ArrayList<MazeTile> innerPasses = new ArrayList<MazeTile>();
    buildTiles(paths, innerPasses, false, metal, innerBgs, passTexs);
    ArrayList<MazeTile> borderWalls = new ArrayList<MazeTile>();
    buildTiles(paths, borderWalls, true, metal, borderBgs, wallTexs);
    ArrayList<MazeTile> borderPasses = new ArrayList<MazeTile>();
    buildTiles(paths, borderPasses, false, metal, borderBgs, passTexs);

    ArrayList<ShipConfig> outerEnemies = ShipConfig.loadList(mazeNode.get("outerEnemies"), hullConfigs, itemManager);
    ArrayList<ShipConfig> innerEnemies = ShipConfig.loadList(mazeNode.get("innerEnemies"), hullConfigs, itemManager);
    ArrayList<ShipConfig> bosses = ShipConfig.loadList(mazeNode.get("bosses"), hullConfigs, itemManager);

    SpaceEnvConfig envConfig = new SpaceEnvConfig(mazeNode.get("environment"), textureManager, configFile);
    return new MazeConfig(innerWalls, innerPasses, borderWalls, borderPasses, outerEnemies, innerEnemies, bosses, envConfig);
  }

  private static void buildTiles(PathLoader.Model paths,
    ArrayList<MazeTile> list, boolean wall, boolean metal, List<TextureAtlas.AtlasRegion> bgTexs,
    ArrayList<TextureAtlas.AtlasRegion> texs)
  {
    for (TextureAtlas.AtlasRegion tex : texs) {
      String pathEntry = tex.name + "_" + tex.index + ".png";
      TextureAtlas.AtlasRegion bgTex = SolMath.elemRnd(bgTexs);
      MazeTile iw = MazeTile.load(tex, paths, wall, pathEntry, metal, bgTex);
      list.add(iw);
    }
  }
}


text:
package org.apache.batik.dom.svg;

import org.apache.batik.anim.values.AnimatableValue;
import org.apache.batik.dom.AbstractDocument;
import org.apache.batik.util.SVGTypes;

import org.w3c.dom.Node;
import org.w3c.dom.svg.SVGAnimatedNumber;
import org.w3c.dom.svg.SVGFESpotLightElement;

/**
 * This class implements {@link SVGFESpotLightElement}.
 *
 * @author Stephane Hillion
 * @version $Id$
 */
public class SVGOMFESpotLightElement
    extends    SVGOMElement
    implements SVGFESpotLightElement {

    /**
     * Creates a new SVGOMFESpotLightElement object.
     */
    protected SVGOMFESpotLightElement() {
    }

    /**
     * Creates a new SVGOMFESpotLightElement object.
     * @param prefix The namespace prefix.
     * @param owner The owner document.
     */
    public SVGOMFESpotLightElement(String prefix,
                                   AbstractDocument owner) {
        super(prefix, owner);
    }

    /**
     * DOM: Implements {@link Node#getLocalName()}.
     */
    public String getLocalName() {
        return SVG_FE_SPOT_LIGHT_TAG;
    }

    /**
     * DOM: Implements {@link SVGFESpotLightElement#getX()}.
     */
    public SVGAnimatedNumber getX() {
        return getAnimatedNumberAttribute(null, SVG_X_ATTRIBUTE, 0f);
    }

    /**
     * DOM: Implements {@link SVGFESpotLightElement#getY()}.
     */
    public SVGAnimatedNumber getY() {
        return getAnimatedNumberAttribute(null, SVG_Y_ATTRIBUTE, 0f);
    }

    /**
     * DOM: Implements {@link SVGFESpotLightElement#getZ()}.
     */
    public SVGAnimatedNumber getZ() {
        return getAnimatedNumberAttribute(null, SVG_Z_ATTRIBUTE, 0f);
    }

    /**
     * DOM: Implements {@link SVGFESpotLightElement#getPointsAtX()}.
     */
    public SVGAnimatedNumber getPointsAtX() {
        return getAnimatedNumberAttribute(null, SVG_POINTS_AT_X_ATTRIBUTE, 0f);
    }

    /**
     * DOM: Implements {@link SVGFESpotLightElement#getPointsAtY()}.
     */
    public SVGAnimatedNumber getPointsAtY() {
        return getAnimatedNumberAttribute(null, SVG_POINTS_AT_Y_ATTRIBUTE, 0f);
    }

    /**
     * DOM: Implements {@link SVGFESpotLightElement#getPointsAtZ()}.
     */
    public SVGAnimatedNumber getPointsAtZ() {
        return getAnimatedNumberAttribute(null, SVG_POINTS_AT_Z_ATTRIBUTE, 0f);
    }

    /**
     * DOM: Implements {@link
     * SVGFESpotLightElement#getSpecularExponent()}.
     */
    public SVGAnimatedNumber getSpecularExponent() {
        return getAnimatedNumberAttribute
            (null, SVG_SPECULAR_EXPONENT_ATTRIBUTE, 1f);
    }

    /**
     * DOM: Implements {@link
     * SVGFESpotLightElement#getLimitingConeAngle()}.
     */
    public SVGAnimatedNumber getLimitingConeAngle() {
        return getAnimatedNumberAttribute
            (null, SVG_LIMITING_CONE_ANGLE_ATTRIBUTE, 0f);
    }

    /**
     * Returns a new uninitialized instance of this object's class.
     */
    protected Node newNode() {
        return new SVGOMFESpotLightElement();
    }

    // ExtendedTraitAccess ///////////////////////////////////////////////////

    /**
     * Returns whether the given XML attribute is animatable.
     */
    public boolean isAttributeAnimatable(String ns, String ln) {
        if (ns == null) {
            if (ln.equals(SVG_X_ATTRIBUTE)
                    || ln.equals(SVG_Y_ATTRIBUTE)
                    || ln.equals(SVG_Z_ATTRIBUTE)
                    || ln.equals(SVG_POINTS_AT_X_ATTRIBUTE)
                    || ln.equals(SVG_POINTS_AT_Y_ATTRIBUTE)
                    || ln.equals(SVG_POINTS_AT_Z_ATTRIBUTE)
                    || ln.equals(SVG_SPECULAR_EXPONENT_ATTRIBUTE)
                    || ln.equals(SVG_LIMITING_CONE_ANGLE_ATTRIBUTE)) {
                return true;
            }
        }
        return super.isAttributeAnimatable(ns, ln);
    }

    /**
     * Returns the type of the given attribute.
     */
    public int getAttributeType(String ns, String ln) {
        if (ns == null) {
            if (ln.equals(SVG_X_ATTRIBUTE)
                    || ln.equals(SVG_Y_ATTRIBUTE)
                    || ln.equals(SVG_Z_ATTRIBUTE)
                    || ln.equals(SVG_POINTS_AT_X_ATTRIBUTE)
                    || ln.equals(SVG_POINTS_AT_Y_ATTRIBUTE)
                    || ln.equals(SVG_POINTS_AT_Z_ATTRIBUTE)
                    || ln.equals(SVG_SPECULAR_EXPONENT_ATTRIBUTE)
                    || ln.equals(SVG_LIMITING_CONE_ANGLE_ATTRIBUTE)) {
                return SVGTypes.TYPE_NUMBER;
            }
        }
        return super.getAttributeType(ns, ln);
    }

    // AnimationTarget ///////////////////////////////////////////////////////

    /**
     * Updates an attribute value in this target.
     */
    public void updateAttributeValue(String ns, String ln,
                                     AnimatableValue val) {
        if (ns == null) {
            if (ln.equals(SVG_X_ATTRIBUTE)) {
                updateNumberAttributeValue(getX(), val);
                return;
            } else if (ln.equals(SVG_Y_ATTRIBUTE)) {
                updateNumberAttributeValue(getY(), val);
                return;
            } else if (ln.equals(SVG_Z_ATTRIBUTE)) {
                updateNumberAttributeValue(getZ(), val);
                return;
            } else if (ln.equals(SVG_POINTS_AT_X_ATTRIBUTE)) {
                updateNumberAttributeValue(getPointsAtX(), val);
                return;
            } else if (ln.equals(SVG_POINTS_AT_Y_ATTRIBUTE)) {
                updateNumberAttributeValue(getPointsAtY(), val);
                return;
            } else if (ln.equals(SVG_POINTS_AT_Z_ATTRIBUTE)) {
                updateNumberAttributeValue(getPointsAtZ(), val);
                return;
            } else if (ln.equals(SVG_SPECULAR_EXPONENT_ATTRIBUTE)) {
                updateNumberAttributeValue(getSpecularExponent(), val);
                return;
            } else if (ln.equals(SVG_LIMITING_CONE_ANGLE_ATTRIBUTE)) {
                updateNumberAttributeValue(getLimitingConeAngle(), val);
                return;
            }
        }
        super.updateAttributeValue(ns, ln, val);
    }

    /**
     * Returns the underlying value of an animatable XML attribute.
     */
    public AnimatableValue getUnderlyingValue(String ns, String ln) {
        if (ns == null) {
            if (ln.equals(SVG_X_ATTRIBUTE)) {
                return getBaseValue(getX());
            } else if (ln.equals(SVG_Y_ATTRIBUTE)) {
                return getBaseValue(getY());
            } else if (ln.equals(SVG_Z_ATTRIBUTE)) {
                return getBaseValue(getZ());
            } else if (ln.equals(SVG_POINTS_AT_X_ATTRIBUTE)) {
                return getBaseValue(getPointsAtX());
            } else if (ln.equals(SVG_POINTS_AT_Y_ATTRIBUTE)) {
                return getBaseValue(getPointsAtY());
            } else if (ln.equals(SVG_POINTS_AT_Z_ATTRIBUTE)) {
                return getBaseValue(getPointsAtZ());
            } else if (ln.equals(SVG_SPECULAR_EXPONENT_ATTRIBUTE)) {
                return getBaseValue(getSpecularExponent());
            } else if (ln.equals(SVG_LIMITING_CONE_ANGLE_ATTRIBUTE)) {
                return getBaseValue(getLimitingConeAngle());
            }
        }
        return super.getUnderlyingValue(ns, ln);
    }
}


text:
#import "NSObject.h"

// Not exported
@interface ML3AlbumData : NSObject
{
    int _userRating;
    long long _albumPid;
}

@property(nonatomic) int userRating; // @synthesize userRating=_userRating;
@property(nonatomic) long long albumPid; // @synthesize albumPid=_albumPid;
- (id)initWithState:(long long)arg1 userRating:(int)arg2;

@end


text:
var mongoose = require('mongoose'),
    extend = require('mongoose-schema-extend'),
    Schema = mongoose.Schema,
    Match = require('../models/match');

/*
 * This is our first module, but each module needs the following:
 *
 * ID
 * Name
 * Game atch model inheriting from base match model, with added state property and separate collection
 * Optional: Description
 *
 */

exports.id = "quadrow";

exports.name = "Quadrow";

exports.description = "Your favorite four in a row game";

var boardValidator = function(board) {
  if (board.length != 7) return false;

  var additions = 0;

  for (var x = 0; x < board.length; x++) {
    var column = board[x];
    if (! column instanceof Array) return false;
    if (column.length > 6) return false;
    additions += column.length - this.state.board[x].length;

    for (var y = 0; y < column.length; y++) {
      var row = column[y];
      if (row >= this.participants.length) return false;
    }
  };

  if (additions > 1) return false;

  return true;
};

var matchSchema = Match.schema.extend({
  state : {
    board: { type: [Schema.Types.Mixed], default: [ [], [], [], [], [], [], [] ], validate: [ boardValidator, 'invalid_state' ] }
  }
}, {
  collection : exports.id + '.matches'
});

exports.match = mongoose.model(exports.id + 'Match', matchSchema);


text:
package br.com.tamandua.sitemap;

import java.io.IOException;

import br.com.tamandua.sitemap.generator.SitemapGenerator;

public class App {

    public static void main( String[] args ) throws IOException {
        //------------------- sitemap -------------------------
        SitemapGenerator.generate();
    }
}


text:
{% extends "_base_core.html" %}
{% load static %}{% load common_tags %}
{% block page_title %}ART nightly tests{% endblock %}
{% block css_page %}
    <link rel="stylesheet" href="{% static "css/art/art-style.css" %}?{% cache_bust "css/art/art-style.css" %}">
{% endblock %}
{% block subtitle %}ART nightly tests {{ viewParams.selection|safe }}{% endblock %}
{% block body %}

 Back to main page
{% if requestParams.view and requestParams.view == 'branches' %}
     Switch to packages view
{% else %}
     Switch to branches view
{% endif %}

  {% if taskids|length == 1 %}
     Show job consumption plots
  {% elif taskids|length >= 0 and taskids|length < 50 %}
    PanDA job list
  {% endif %}

{% if requestParams.package %}Package: {{ requestParams.package }}
{% endif %}
{% if requestParams.branch %}Branch: {{ requestParams.branch }}
{% endif %}
{% if requestParams.ntag %}Listed tests are for builds done on {{ requestParams.ntag|date:"d b Y" }}
{% endif %}
{% if requestParams.ntag_from %}Listed tests are for builds done from {{ requestParams.ntag_from|date:"d b Y" }}{% endif %}
{% if requestParams.ntag_to %}to {{ requestParams.ntag_to|date:"d b Y" }}
{% endif %}
{% if requestParams.ntag_full %}Nightly tag is {{ requestParams.ntag_full }}
{% endif %}
{% if requestParams.ntag_full or gitlabids|length == 1 %}Gitlab ID: {{ gitlabids.0 }}{% endif %}
{% if requestParams.package and artjobs.values|length == 1 %} {% if reportto.jira|length == 1 or reportto.mail|length == 1 %}Report an issue to responsible,
    {% if reportto.jira|length == 1 %} JIRA: {% with reportjira=reportto.jira %}{% for jiraproject, jiralink in reportjira.items %} {{ jiraproject }} {% endfor %} {% endwith %} {% endif %}
    {% if reportto.mail|length == 1 %} ,  {% with reportmail=reportto.mail %}{% for email in reportmail %} email {% endfor %} {% endwith %} {% endif %}
{% endif %} {% endif %}

{% if artjobs|length > 0 %}

      {% for pname,pack in artjobs.items %}

        {{ pname }}

            {% for brname, tests in pack.items %}

                  {{ brname }}

                                  {% if ntaglist|length == 1 %}
                                    Show output container
                                  {% endif %}

                              {% for test in tests %}
                                  {% if forloop.first %}
                                      {% for ntag in ntaglist %}
                                          {% for ntname,status in test.items %}
                                              {% if ntname == ntag %}

                                                    {{ status.ntag_hf }}

                                                {% if ntaglist|length == 1 %}
                                                    Computing site
                                                    Duration, h:m:s
                                                    CPU time, s
                                                    MaxRSS, MB
                                                    CPU type
                                                {% endif %}
                                              {% endif %}
                                          {% endfor %}
                                      {% endfor %}
                                  {% endif %}
                                {% endfor %}

                          {% if ntaglist|length == 1 %}

                                    Output container(s):
                                      {% for poc, brdict in outputcontainers.items %}
                                          {% if poc == pname %}
                                              {% for broc, ocs in brdict.items %}
                                                  {% if broc == brname %}
                                                      {% for oc in ocs %}
                                                            {{ oc }} {% if not forloop.last %},
{% endif %}
                                                      {% endfor %}
                                                  {% endif %}
                                              {% endfor %}
                                          {% endif %}
                                      {% endfor %}

                                    Test directory:
                                      {% for ptd, brdict in testdirectories.items %}
                                          {% if ptd == pname %}
                                              {% for brtd, tdirs in brdict.items %}
                                                  {% if brtd == brname %}
                                                      {% for tdir in tdirs %}
                                                            {{ tdir }} {% if not forloop.last %},
{% endif %}
                                                      {% endfor %}
                                                  {% endif %}
                                              {% endfor %}
                                          {% endif %}
                                      {% endfor %}

                          {% endif %}
                          {% for test in tests %}

                                  {% if test.gitlablink %}
                                    {{ test.testname }}
                                  {% else %}
                                    {{ test.testname }}
                                  {% endif %}

                              {% for ntag in ntaglist %}
                                  {% for ntname,jobs in test.items  %}
                                    {% if ntname == ntag %}

                                        {% if jobs.jobs|length > 0 %}
                                            {% for job in jobs.jobs %}
                                                {% if job.jobstatus %}

                                                      {% if ntaglist|length == 1 or requestParams.extra == 'subresults' %}

{% for r in job.subresults %}
 0 %}failed{% else %}finished{% endif %}test tooltiptestresult" {% if r.name|length > 0 or r.result > 0 %}style="text-decoration: underline"{% endif %}>{{ forloop.counter }}{% if r.name|length > 1 %} {{ r.name }}:{% endif %}{{ r.result }}
{% endfor %}

                                                      {% endif %}

 {{ job.finalresult }}

                                                          {{ job.origpandaid }}

                                                             {{ job.ntagtime }}
                                                           {{ job.tarindex }}Index of tar file
                                                           {{ job.attemptnr }}/{{ job.maxattempt }}Attempt number / max attempts
                                                          Link to logs of last attempt
                                                          {% if job.linktopreviousattemptlogs %}
                                                              Link to logs of previous attempt
                                                          {% endif %}
                                                          {% if job.finalresult != 'active' %}
                                                              Link to EOS copy area
                                                          {% endif %}
                                                          {% if job.finalresult != 'active' and job.htmllink %}
                                                              Link to result HTML
                                                          {% endif %}

                                                    {% if jobs.jobs|length > 1 %}
 {% endif %}
                                                {% else %}

                                                        ---

                                                {% endif %}
                                            {% endfor %}
                                        {% else %}

                                                ---

                                        {% endif %}

                                      {% if ntaglist|length == 1 %}

                                            {% for job in jobs.jobs %}

{{ job.computingsite }}

                                            {% endfor %}

                                             {% for job in jobs.jobs %}
                                              {{ job.duration }}

                                            {% endfor %}

                                            {% for job in jobs.jobs %}
                                              {{ job.cpuconsumptiontime }}

                                            {% endfor %}

                                            {% for job in jobs.jobs %}
                                              {{ job.maxrss }}

                                            {% endfor %}

                                            {% for job in jobs.jobs %}
                                              {{ job.cpuconsumptionunit }}

                                            {% endfor %}

                                      {% endif %}
                                    {% endif %}
                                  {%  endfor %}
                              {% endfor %}

                          {% endfor %}

            {% endfor %}

      {% endfor %}

{% else %}

No tests were found for provided selection parameters!

    <button class="close-button small" aria-label="Dismiss alert" type="button" data-close>
        ×
  </button>

{% endif %}

{% endblock %}

{% block js_body_page %}

{% endblock %}

{% block help %}

    {% include "artHelp.html" %}
{% endblock %}


text:
package com.dt.hippo.web.controller.api;

import java.io.File;
import java.io.IOException;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.dt.hippo.business.base.BaseController;
import com.dt.hippo.business.common.ConfigurationHelper;
import com.dt.hippo.business.model.com.FileCom;

@Controller
public class UtilController extends BaseController
{

	@Resource
	private ConfigurationHelper configure;

	// @RequestMapping(value = "/uploadFile", method = RequestMethod.GET)
	// public @ResponseBody FileCom uploadFileHandler()
	// {
	// return new FileCom();
	// }
	@RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
	public @ResponseBody FileCom uploadFileHandler(
			@RequestParam(value = "action", required = false) String action,
			@RequestParam(value = "file", required = false) MultipartFile file)
	{

		FileCom com = new FileCom();
		com.setResult(-1);
		if (!file.isEmpty())
		{
			String filename = this.utils.getUniqueFileName();
			File targetFile = new File(configure.getFileDir(),
					filename);
			try
			{
				file.transferTo(targetFile);
				com.setFileUniqueName(filename);
				com.setResult(0);
			} catch (IllegalStateException e)
			{
				logger.error(action + ", File upload error:", e);
			} catch (IOException e)
			{
				logger.error(action + ", File upload error:", e);
			}
			// ;
		}
		return com;
	}
}


text:
namespace MasterChef.Web.Models
{
    using System;

    public class RecipeViewModel
    {
        public int ID { get; set; }

        public string Name { get; set; }

        public string Description { get; set; }

        public DateTime CreatedOn { get; set; }

        public string CreatorID { get; set; }

        public string Creator { get; set; }

        public string ImagePath { get; set; }

        public bool isCold { get; set; }

        public bool isHot { get; set; }

        public bool isSweet { get; set; }

        public bool isVegitarian { get; set; }

        public int Likes { get; set; }
    }
}


text:
<?php namespace Adviser\Validators;

class CIValidatorTest extends \Adviser\Testing\ValidatorTestCase
{

    /**
     * @test
     */
    public function it_does_its_job()
    {
        // Setup.
        $validator = new CIValidator(null);

        $file = $this->mockUtility("File");

        $file->shouldReceive("exists")
             ->times(3)
             ->with("/.travis.yml")
             ->andReturn(false, true, true);

        $file->shouldReceive("read")
             ->twice()
             ->with("/.travis.yml")
             ->andReturn(null, null);

        $YAMLParser = $this->mockUtility("YAMLParser");

        $YAMLParser->shouldReceive("parse")
                   ->twice()
                   ->andReturn(
                       ["php" => ["5.1", "5.2", "5.3", "weird"]],
                       ["php" => ["5.4", "5.5", "5.6", "hhvm"]]
                   );

        $validator->utility("File", $file);
        $validator->utility("YAMLParser", $YAMLParser);

        // Test.
        // 1st scenario: no .travis.yml file was found in the root directory of the project.
        $messages = $this->runValidator($validator);

        $this->assertTrue($messages->first()->isError());

        // 2nd scenario: .travis.yml file is present, but PHP versions are outdated.
        $messages = $this->runValidator($validator);

        $this->assertTrue($messages->first()->isWarning());

        // 3rd scenario: everything is fine.
        $messages = $this->runValidator($validator);

        $this->assertTrue($messages->first()->isNormal());
    }
}


text:
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
  set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/LLVM")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
  if(BUILD_TYPE)
    string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
  else()
    set(CMAKE_INSTALL_CONFIG_NAME "Release")
  endif()
  message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()

# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
  if(COMPONENT)
    message(STATUS "Install component: \"${COMPONENT}\"")
    set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
  else()
    set(CMAKE_INSTALL_COMPONENT)
  endif()
endif()

if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "llvm-dsymutil")
  if("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")
    file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "C:/Users/petit/Documents/Reflect_build123/build-clang/msvc/generated/Debug/bin/llvm-dsymutil.exe")
  elseif("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$")
    file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "C:/Users/petit/Documents/Reflect_build123/build-clang/msvc/generated/Release/bin/llvm-dsymutil.exe")
  elseif("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$")
    file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "C:/Users/petit/Documents/Reflect_build123/build-clang/msvc/generated/MinSizeRel/bin/llvm-dsymutil.exe")
  elseif("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$")
    file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "C:/Users/petit/Documents/Reflect_build123/build-clang/msvc/generated/RelWithDebInfo/bin/llvm-dsymutil.exe")
  endif()
endif()


text:
<?php

namespace aRvi\Dispatcher;

class DispatcherFileNotFoundException extends \Exception {
}


text:
namespace __asan {

Flags asan_flags_dont_use_directly;  // use via flags().

static const char *MaybeCallAsanDefaultOptions() {
  return (&__asan_default_options) ? __asan_default_options() : "";
}

static const char *MaybeUseAsanDefaultOptionsCompileDefinition() {
#ifdef ASAN_DEFAULT_OPTIONS
  return SANITIZER_STRINGIFY(ASAN_DEFAULT_OPTIONS);
#else
  return "";
#endif
}

void Flags::SetDefaults() {
#define ASAN_FLAG(Type, Name, DefaultValue, Description) Name = DefaultValue;
#include "asan_flags.inc"
#undef ASAN_FLAG
}

static void RegisterAsanFlags(FlagParser *parser, Flags *f) {
#define ASAN_FLAG(Type, Name, DefaultValue, Description) \
  RegisterFlag(parser, #Name, Description, &f->Name);
#include "asan_flags.inc"
#undef ASAN_FLAG
}

void InitializeFlags() {
  // Set the default values and prepare for parsing ASan and common flags.
  SetCommonFlagsDefaults();
  {
    CommonFlags cf;
    cf.CopyFrom(*common_flags());
    cf.detect_leaks = cf.detect_leaks && CAN_SANITIZE_LEAKS;
    cf.external_symbolizer_path = GetEnv("ASAN_SYMBOLIZER_PATH");
    cf.malloc_context_size = kDefaultMallocContextSize;
    cf.intercept_tls_get_addr = true;
    cf.exitcode = 1;
    OverrideCommonFlags(cf);
  }
  Flags *f = flags();
  f->SetDefaults();

  FlagParser asan_parser;
  RegisterAsanFlags(&asan_parser, f);
  RegisterCommonFlags(&asan_parser);

  // Set the default values and prepare for parsing LSan and UBSan flags
  // (which can also overwrite common flags).
#if CAN_SANITIZE_LEAKS
  __lsan::Flags *lf = __lsan::flags();
  lf->SetDefaults();

  FlagParser lsan_parser;
  __lsan::RegisterLsanFlags(&lsan_parser, lf);
  RegisterCommonFlags(&lsan_parser);
#endif

#if CAN_SANITIZE_UB
  __ubsan::Flags *uf = __ubsan::flags();
  uf->SetDefaults();

  FlagParser ubsan_parser;
  __ubsan::RegisterUbsanFlags(&ubsan_parser, uf);
  RegisterCommonFlags(&ubsan_parser);
#endif

  if (SANITIZER_MAC) {
    // Support macOS MallocScribble and MallocPreScribble:
    // <https://developer.apple.com/library/content/documentation/Performance/
    // Conceptual/ManagingMemory/Articles/MallocDebug.html>
    if (GetEnv("MallocScribble")) {
      f->max_free_fill_size = 0x1000;
    }
    if (GetEnv("MallocPreScribble")) {
      f->malloc_fill_byte = 0xaa;
    }
  }

  // Override from ASan compile definition.
  const char *asan_compile_def = MaybeUseAsanDefaultOptionsCompileDefinition();
  asan_parser.ParseString(asan_compile_def);

  // Override from user-specified string.
  const char *asan_default_options = MaybeCallAsanDefaultOptions();
  asan_parser.ParseString(asan_default_options);
#if CAN_SANITIZE_UB
  const char *ubsan_default_options = __ubsan::MaybeCallUbsanDefaultOptions();
  ubsan_parser.ParseString(ubsan_default_options);
#endif
#if CAN_SANITIZE_LEAKS
  const char *lsan_default_options = __lsan::MaybeCallLsanDefaultOptions();
  lsan_parser.ParseString(lsan_default_options);
#endif

  // Override from command line.
  asan_parser.ParseString(GetEnv("ASAN_OPTIONS"));
#if CAN_SANITIZE_LEAKS
  lsan_parser.ParseString(GetEnv("LSAN_OPTIONS"));
#endif
#if CAN_SANITIZE_UB
  ubsan_parser.ParseString(GetEnv("UBSAN_OPTIONS"));
#endif

  InitializeCommonFlags();

  // TODO(eugenis): dump all flags at verbosity>=2?
  if (Verbosity()) ReportUnrecognizedFlags();

  if (common_flags()->help) {
    // TODO(samsonov): print all of the flags (ASan, LSan, common).
    asan_parser.PrintFlagDescriptions();
  }

  // Flag validation:
  if (!CAN_SANITIZE_LEAKS && common_flags()->detect_leaks) {
    Report("%s: detect_leaks is not supported on this platform.\n",
           SanitizerToolName);
    Die();
  }
  // Ensure that redzone is at least SHADOW_GRANULARITY.
  if (f->redzone < (int)SHADOW_GRANULARITY)
    f->redzone = SHADOW_GRANULARITY;
  // Make "strict_init_order" imply "check_initialization_order".
  // TODO(samsonov): Use a single runtime flag for an init-order checker.
  if (f->strict_init_order) {
    f->check_initialization_order = true;
  }
  CHECK_LE((uptr)common_flags()->malloc_context_size, kStackTraceMax);
  CHECK_LE(f->min_uar_stack_size_log, f->max_uar_stack_size_log);
  CHECK_GE(f->redzone, 16);
  CHECK_GE(f->max_redzone, f->redzone);
  CHECK_LE(f->max_redzone, 2048);
  CHECK(IsPowerOfTwo(f->redzone));
  CHECK(IsPowerOfTwo(f->max_redzone));
  if (SANITIZER_RTEMS) {
    CHECK(!f->unmap_shadow_on_exit);
    CHECK(!f->protect_shadow_gap);
  }

  // quarantine_size is deprecated but we still honor it.
  // quarantine_size can not be used together with quarantine_size_mb.
  if (f->quarantine_size >= 0 && f->quarantine_size_mb >= 0) {
    Report("%s: please use either 'quarantine_size' (deprecated) or "
           "quarantine_size_mb, but not both\n", SanitizerToolName);
    Die();
  }
  if (f->quarantine_size >= 0)
    f->quarantine_size_mb = f->quarantine_size >> 20;
  if (f->quarantine_size_mb < 0) {
    const int kDefaultQuarantineSizeMb =
        (ASAN_LOW_MEMORY) ? 1UL << 4 : 1UL << 8;
    f->quarantine_size_mb = kDefaultQuarantineSizeMb;
  }
  if (f->thread_local_quarantine_size_kb < 0) {
    const u32 kDefaultThreadLocalQuarantineSizeKb =
        // It is not advised to go lower than 64Kb, otherwise quarantine batches
        // pushed from thread local quarantine to global one will create too
        // much overhead. One quarantine batch size is 8Kb and it  holds up to
        // 1021 chunk, which amounts to 1/8 memory overhead per batch when
        // thread local quarantine is set to 64Kb.
        (ASAN_LOW_MEMORY) ? 1 << 6 : FIRST_32_SECOND_64(1 << 8, 1 << 10);
    f->thread_local_quarantine_size_kb = kDefaultThreadLocalQuarantineSizeKb;
  }
  if (f->thread_local_quarantine_size_kb == 0 && f->quarantine_size_mb > 0) {
    Report("%s: thread_local_quarantine_size_kb can be set to 0 only when "
           "quarantine_size_mb is set to 0\n", SanitizerToolName);
    Die();
  }
  if (!f->replace_str && common_flags()->intercept_strlen) {
    Report("WARNING: strlen interceptor is enabled even though replace_str=0. "
           "Use intercept_strlen=0 to disable it.");
  }
  if (!f->replace_str && common_flags()->intercept_strchr) {
    Report("WARNING: strchr* interceptors are enabled even though "
           "replace_str=0. Use intercept_strchr=0 to disable them.");
  }
  if (!f->replace_str && common_flags()->intercept_strndup) {
    Report("WARNING: strndup* interceptors are enabled even though "
           "replace_str=0. Use intercept_strndup=0 to disable them.");
  }
}

}  // namespace __asan

SANITIZER_INTERFACE_WEAK_DEF(const char*, __asan_default_options, void) {
  return "";
}


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

    <groupId>org.opennars</groupId>
    <artifactId>opennars</artifactId>
    <version>3.0.4-SNAPSHOT</version>
    <packaging>jar</packaging>

    <parent>
        <groupId>org.opennars</groupId>
        <artifactId>opennars-parent</artifactId>
        <version>1-SNAPSHOT</version>
    </parent>

    <prerequisites>
        <maven>3.5.0</maven>
    </prerequisites>

    <name>OpenNARS</name>
    <description>A Non-Axiomatic Reasoning engine</description>
    <url>http://OpenNARS.org</url>

    <licenses>
        <license>
            <name>MIT</name>
            <url>https://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <organization>
        <name>OpenNARS</name>
        <url>http://OpenNARS.org</url>
    </organization>

    <scm>
        <connection>scm:git:https://github.com/opennars/opennars.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/opennars/opennars.git</developerConnection>
        <url>https://github.com/opennars/opennars</url>
    </scm>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/opennars/opennars/issues</url>
    </issueManagement>

    <developers>
		<developer>
            <id>peiwang</id>
            <name>Pei Wang</name>
            <email>pei.wang@gmail.com</email>
            <organization>OpenNARS</organization>
            <organizationUrl>http://OpenNARS.org</organizationUrl>
            <roles>
                <role>Project Owner</role>
                <role>Developer</role>
            </roles>
            <timezone>-5</timezone>
        </developer>
        <developer>
            <id>patham9</id>
            <name>Patrick Hammer</name>
            <email>patham9@gmail.com</email>
            <organization>OpenNARS</organization>
            <organizationUrl>http://OpenNARS.org</organizationUrl>
            <roles>
                <role>Project Owner</role>
                <role>Developer</role>
            </roles>
            <timezone>-5</timezone>
        </developer>
        <developer>
            <id>TonyLo1</id>
            <name>Tony Lofthouse</name>
            <email>Tony_Lofthouse@BTInternet.com</email>
            <organization>OpenNARS</organization>
            <organizationUrl>http://OpenNARS.org</organizationUrl>
            <roles>
                <role>Project Owner</role>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>GMPow2</id>
            <name>Robert Wuensche</name>
            <email></email>
            <organization>OpenNARS</organization>
            <organizationUrl>http://OpenNARS.org</organizationUrl>
            <roles>
                <role>Project Owner</role>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>JeffreyPhillipsFreeman</id>
            <name>Jeffrey Phillips Freeman</name>
            <email>Jeffrey.Freeman@Syncleus.com</email>
            <url>http://JeffreyFreeman.me</url>
            <organization>Syncleus</organization>
            <organizationUrl>http://syncleus.com</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>-5</timezone>
        </developer>
        <developer>
            <id>jim</id>
            <name>Jim Northrup</name>
            <email>jim@cydesign.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>-5</timezone>
        </developer>
        <developer>
            <id>TreverShick</id>
            <name>Trever Shick</name>
            <url>http://trevershick.github.io</url>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>-5</timezone>
        </developer>
    </developers>

    <repositories>
        <repository>
            <id>ossrh.snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.7</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>25.1-jre</version>
        </dependency>
    </dependencies>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <defaultGoal>package</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <show>private</show>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
                <configuration>
                    <server>github</server>
                    <message>Creating site for aparapi</message>
                    <merge>true</merge>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>site</goal>
                        </goals>
                        <phase>site</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                      <version>2.5</version>
                        <configuration>
                            <testFailureIgnore>true</testFailureIgnore>
                            <forkMode>once</forkMode>
                        </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                <!-- Configures the created archive -->
                    <archive>
                    <!-- Configures the content of the created manifest -->
                        <manifest>
                        <!-- Adds the classpath to the created manifest -->
                            <addClasspath>true</addClasspath>
                            <!--
                            Specifies that all dependencies of our application are found
                            from the lib directory.
                            -->
                            <classpathPrefix>lib/</classpathPrefix>
                            <!-- Configures the main class of the application -->
                            <mainClass>org.opennars.main.Shell</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>sign</id>
            <build>
                <plugins>

                </plugins>
            </build>
        </profile>
    </profiles>
</project>


text:
/* eslint-env mocha */
import App, { CerebralError, ModuleClass, state } from './'

import Module from './Module'
import assert from 'assert'
import { sequence } from './factories'

describe('Module', () => {
  it('should instantiate with initial state', () => {
    const rootModule = new Module({
      state: {
        foo: 'bar',
      },
    })
    const controller = App(rootModule)

    assert.deepStrictEqual(controller.getState(), { foo: 'bar' })
    assert.ok(rootModule instanceof ModuleClass)
  })
  it('should instantiate with sequences', () => {
    const rootModule = new Module({
      sequences: {
        bar: [],
      },
    })
    const controller = App(rootModule)

    assert.ok(controller.getSequence('bar'))
  })
  it('should instantiate with sequences defined as sequence', () => {
    const rootModule = new Module({
      sequences: {
        bar: sequence('bar', []),
      },
    })
    const controller = App(rootModule)

    assert.ok(controller.getSequence('bar'))
  })
  it('should run sequences with providers', () => {
    const rootModule = new Module({
      modules: {
        foo: new Module({
          sequences: {
            sequenceA: [
              (context) => {
                assert.strictEqual(context.foo.get(), 'foo')
                assert.strictEqual(context.bar.get(), 'bar')
              },
            ],
          },
          providers: {
            foo: {
              get() {
                return 'foo'
              },
            },
          },
        }),
        bar: new Module({
          sequences: {
            sequenceB: [
              (context) => {
                assert.strictEqual(context.bar.get(), 'bar')
                assert.strictEqual(context.foo.get(), 'foo')
              },
            ],
          },
          providers: {
            bar: {
              get() {
                return 'bar'
              },
            },
          },
        }),
      },
    })
    const controller = App(rootModule)

    controller.getSequence('foo.sequenceA')()
    controller.getSequence('bar.sequenceB')()
  })
  it('should be able to define sequences with sequence property', () => {
    const rootModule = new Module({
      state: {
        foo: 'bar',
      },
      sequences: {
        test: ({ store }) => store.set(state`foo`, 'bar2'),
      },
    })
    const controller = App(rootModule)

    controller.getSequence('test')()
    assert.deepStrictEqual(controller.getState(), { foo: 'bar2' })
  })
  it('should be able to define module with catch property and custom errors', () => {
    const catchError = ({ props, store }) =>
      store.set(state`foo`, props.error.message)
    const rootModule = new Module({
      state: {
        foo: 'bar',
      },
      sequences: {
        test: () => {
          throw new Error('bar2')
        },
      },
      catch: [[Error, catchError]],
    })
    const controller = App(rootModule, { throwToConsole: false })

    controller.getSequence('test')()
    assert.deepStrictEqual(controller.getState(), { foo: 'bar2' })
  })
  it('should be able to define module with catch property using CerebralError', () => {
    const catchError = ({ props, store }) =>
      store.set(state`foo`, props.error.message)
    const rootModule = new Module({
      state: {
        foo: 'bar',
      },
      sequences: {
        test: () => {
          throw new CerebralError('bar2')
        },
      },
      catch: [[CerebralError, catchError]],
    })
    const controller = App(rootModule, { throwToConsole: false })

    controller.getSequence('test')()
    assert.deepStrictEqual(controller.getState(), { foo: 'bar2' })
  })
  it('should throw when no matching custom catch type', () => {
    class TestError {}
    const catchError = ({ props, store }) =>
      store.set(state`foo`, props.error.message)
    const rootModule = new Module({
      state: {
        foo: 'bar',
      },
      sequences: {
        test: [
          () => {
            throw new TestError('bar2')
          },
        ],
      },
      catch: [[Error, catchError]],
    })
    const controller = App(rootModule)

    assert.throws(() => {
      controller.getSequence('test')()
    })
    assert.deepStrictEqual(controller.getState(), { foo: 'bar' })
  })
  it('should throw when sequence is not set properly', () => {
    assert.throws(() => {
      App(
        new Module({
          sequences: {
            test: undefined,
          },
        })
      )
    })
  })
})


text:
package cola.machine.game.myblocks.model;

import cola.machine.game.myblocks.engine.Constants;
import cola.machine.game.myblocks.math.Vector3i;
import cola.machine.game.myblocks.model.textture.TextureInfo;
import cola.machine.game.myblocks.registry.CoreRegistry;
import com.dozenx.game.engine.command.ChunkRequestCmd;
import com.dozenx.game.engine.command.ItemType;
import com.dozenx.game.engine.element.model.ShapeFace;
import com.dozenx.game.graphics.shader.ShaderManager;
import com.dozenx.game.network.client.Client;
import com.dozenx.game.opengl.util.ShaderConfig;
import com.dozenx.game.opengl.util.ShaderUtils;
import com.dozenx.game.opengl.util.Vao;
import glmodel.GL_Matrix;
import glmodel.GL_Vector;

public class StairBlock extends DirectionFourBlock {

    public StairBlock(String name, int id, boolean isAlpha) {
        super(name, id, isAlpha);
    }

    int isTop;
    int open;
    int face;

    public void setValue(int face, int open, int isTop) {
        //super();
        this.isTop = isTop;
        this.open = open;
        this.face = face;
    }

    @Override
    public void setValue(int value) {
        super.setValue(value);
        isTop = value >> 10 & 1;
        open = value >> 9 & 1;
    }

    public int getValue() {

        return isTop << 11 | open << 10 | dir << 8 | ItemType.wood_door.id;

    }

    //画出四个面
    //@Override
    public void renderShader(Vao vao, ShapeFace shapeFace, TextureInfo ti, int x, int y, int z) {
        //获取condition
        //itemDefinition.getShape().getTopFace();
//1111 1111 1111 1111  1111 1 物品开关 1上下方向 11 物品4个方向  1111 1111 物品id
        int degree = 0;
        if (dir == Constants.BACK) {
            ShaderUtils.draw3dImage(ShaderManager.terrainShaderConfig, vao, shapeFace.getVertices(), shapeFace.getTexcoords(), shapeFace.getNormals(),
                    shapeFace.getFaces()[0], ti, x, y, z);
        } else {

            if (dir == Constants.FRONT) {

                degree = 180;

            } else if (dir == Constants.LEFT) {
                degree = -90;
            } else if (dir == Constants.RIGHT) {
                degree = 90;
            }
            if (this.open == 1) {
                degree += 90;
            }
            GL_Matrix translateMatrix = GL_Matrix.translateMatrix(0.5f, 0, 0.5f);
            translateMatrix = GL_Matrix.multiply(translateMatrix, GL_Matrix.rotateMatrix(0, -degree * Constants.PI1, 0));

            translateMatrix = GL_Matrix.multiply(translateMatrix, GL_Matrix.translateMatrix(-0.5f, 0, -0.5f));

            ShaderUtils.draw3dImage(ShaderManager.terrainShaderConfig, vao, shapeFace.getVertices(), shapeFace.getTexcoords(), shapeFace.getNormals(),
                    shapeFace.getFaces()[0], ti, x, y, z, translateMatrix);
        }
    }

    public boolean use(GL_Vector placePoint) {
        return false;
    }

    public boolean beuse() {

        //通过一个通用的方式获得点击的面在哪里
        //  int chunkX = MathUtil.getBelongChunkInt(targetPoint.x);
        // int chunkZ = MathUtil.getBelongChunkInt(targetPoint.z);
        //   TreeBlock treeBlock =new TreeBlock(hitPoint);
        //treeBlock.startPosition=hitPoint;
        //  treeBlock.generator();
        //  int blockX = MathUtil.floor(targetPoint.x) - chunkX * 16;
        //  int blockY = MathUtil.floor(targetPoint.y);
        //  int blockZ = MathUtil.floor(targetPoint.z) - chunkZ * 16;

        int chunkX = chunk.chunkPos.x;
        int chunkZ = chunk.chunkPos.z;
        ChunkRequestCmd cmd = new ChunkRequestCmd(new Vector3i(chunkX, 0, chunkZ));
        cmd.cx = (int) this.getX();
        cmd.cz = (int) this.getZ();
        cmd.cy = (int) this.getY();
        cmd.type = 1;
        this.open = Math.abs(this.open - 1);
        this.penetration = !penetration;
        chunk.getBlock(cmd.cx, cmd.cy + 1, cmd.cz).setPenetrate(this.penetration);
        /*if(open==0){
            open=1;
        }else{
            open=0;
        }*/

        int newId = ((penetration ? 1 : 0) << 12 | this.dir << 8) | this.id;
        cmd.blockType = newId;
       /* int realBlockType = ByteUtil.get8_0Value(blockType);

        if(realBlockType==ItemType.wood_door.ordinal()){
            //判断当前是开还是关
            int state = ByteUtil.get16_12Value(blockType);
            if(state == 0 ){
                //是关
                blockType = 1<<12| blockType;
            }else{
                blockType = ByteUtil.HEX_0_1_1_1 & blockType;
            }*/
        // cmd.blockType= blockType;
        CoreRegistry.get(Client.class).send(cmd);
        return true;
        // }
    }

    @Override
    public IBlock clone() {
        StairBlock block = new StairBlock(this.getName(), this.getId(), this.getAlpha());
        block.itemDefinition = itemDefinition;
        return block;
    }

    @Override
    public void renderShaderInGivexyzwht(ShaderConfig config, Vao vao, float parentX, float parentY, float parentZ, float childX, float childY, float childZ, float width, float height, float thick, boolean top, boolean bottom, boolean left, boolean right, boolean front, boolean back) {

    }

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<Manifest xmlns="http://schemas.tizen.org/2012/12/manifest">
	<Id>::APP_PACKAGE::</Id>
	<Version>1.0.0</Version>
	<Type>C++App</Type>
	<Requirements>
	<Feature Name="http://tizen.org/feature/platform.native.api.version">2.2</Feature>
	</Requirements>
	<Apps>
		<ApiVersion>2.2</ApiVersion>
		<Privileges></Privileges>
		<UiApp Name="::APP_FILE::" Main="True" MenuIconVisible="False">
			<UiScalability CoordinateSystem="Logical" BaseScreenSize="Normal" LogicalCoordinate="720"></UiScalability>
			<UiTheme SystemTheme="White"></UiTheme>
			<DisplayNames>
				<DisplayName Locale="eng-GB">::APP_TITLE::</DisplayName>
			</DisplayNames>
			<Icons>
				<Icon Section="MainMenu">mainmenu.png</Icon>
			</Icons>
		</UiApp>
	</Apps>
</Manifest>


text:
package org.apache.isis.core.runtime.authorization;

import org.apache.isis.applib.annotation.Programmatic;
import org.apache.isis.core.commons.config.IsisConfiguration;
import org.apache.isis.core.metamodel.facetapi.MetaModelRefiner;

public abstract class AuthorizationManagerAbstract implements AuthorizationManager, MetaModelRefiner {

    private final IsisConfiguration configuration;

    // /////////////////////////////////////////////////////////
    // Constructor
    // /////////////////////////////////////////////////////////

    public AuthorizationManagerAbstract(final IsisConfiguration configuration) {
        this.configuration = configuration;
    }

    @Programmatic
    public IsisConfiguration getConfiguration() {
        return configuration;
    }

}


text:
from oslo_log import log
from oslo_utils import encodeutils
import six

import keystone.conf
from keystone.i18n import _, _LW

CONF = keystone.conf.CONF
LOG = log.getLogger(__name__)

# Tests use this to make exception message format errors fatal
_FATAL_EXCEPTION_FORMAT_ERRORS = False

def _format_with_unicode_kwargs(msg_format, kwargs):
    try:
        return msg_format % kwargs
    except UnicodeDecodeError:
        try:
            kwargs = {k: encodeutils.safe_decode(v)
                      for k, v in kwargs.items()}
        except UnicodeDecodeError:
            # NOTE(jamielennox): This is the complete failure case
            # at least by showing the template we have some idea
            # of where the error is coming from
            return msg_format

        return msg_format % kwargs

class Error(Exception):
    """Base error class.

    Child classes should define an HTTP status code, title, and a
    message_format.

    """

    code = None
    title = None
    message_format = None

    def __init__(self, message=None, **kwargs):
        try:
            message = self._build_message(message, **kwargs)
        except KeyError:
            # if you see this warning in your logs, please raise a bug report
            if _FATAL_EXCEPTION_FORMAT_ERRORS:
                raise
            else:
                LOG.warning(_LW('missing exception kwargs (programmer error)'))
                message = self.message_format

        super(Error, self).__init__(message)

    def _build_message(self, message, **kwargs):
        """Build and returns an exception message.

        :raises KeyError: given insufficient kwargs

        """
        if message:
            return message
        return _format_with_unicode_kwargs(self.message_format, kwargs)

class ValidationError(Error):
    message_format = _("Expecting to find %(attribute)s in %(target)s."
                       " The server could not comply with the request"
                       " since it is either malformed or otherwise"
                       " incorrect. The client is assumed to be in error.")
    code = 400
    title = 'Bad Request'

class URLValidationError(ValidationError):
    message_format = _("Cannot create an endpoint with an invalid URL:"
                       " %(url)s.")

class PasswordValidationError(ValidationError):
    message_format = _("Password validation error: %(detail)s.")

class PasswordRequirementsValidationError(PasswordValidationError):
    message_format = _("The password does not match the requirements:"
                       " %(detail)s.")

class PasswordHistoryValidationError(PasswordValidationError):
    message_format = _("The new password cannot be identical to a "
                       "previous password. The number of previous "
                       "passwords that must be unique is "
                       "%(unique_count)s.")

class PasswordAgeValidationError(PasswordValidationError):
    message_format = _("You cannot change your password at this time due "
                       "to the minimum password age. Once you change your "
                       "password, it must be used for %(min_age_days)d day(s) "
                       "before it can be changed. Please try again in "
                       "%(days_left)d day(s) or contact your administrator to "
                       "reset your password.")

class SchemaValidationError(ValidationError):
    # NOTE(lbragstad): For whole OpenStack message consistency, this error
    # message has been written in a format consistent with WSME.
    message_format = _("%(detail)s")

class ValidationTimeStampError(Error):
    message_format = _("Timestamp not in expected format."
                       " The server could not comply with the request"
                       " since it is either malformed or otherwise"
                       " incorrect. The client is assumed to be in error.")
    code = 400
    title = 'Bad Request'

class InvalidOperatorError(ValidationError):
    message_format = _("The given operator %(_op)s is not valid."
                       " It must be one of the following:"
                       " 'eq', 'neq', 'lt', 'lte', 'gt', or 'gte'.")

class ValidationExpirationError(Error):
    message_format = _("The 'expires_at' must not be before now."
                       " The server could not comply with the request"
                       " since it is either malformed or otherwise"
                       " incorrect. The client is assumed to be in error.")
    code = 400
    title = 'Bad Request'

class StringLengthExceeded(ValidationError):
    message_format = _("String length exceeded. The length of"
                       " string '%(string)s' exceeds the limit"
                       " of column %(type)s(CHAR(%(length)d)).")

class ValidationSizeError(Error):
    message_format = _("Request attribute %(attribute)s must be"
                       " less than or equal to %(size)i. The server"
                       " could not comply with the request because"
                       " the attribute size is invalid (too large)."
                       " The client is assumed to be in error.")
    code = 400
    title = 'Bad Request'

class CircularRegionHierarchyError(Error):
    message_format = _("The specified parent region %(parent_region_id)s "
                       "would create a circular region hierarchy.")
    code = 400
    title = 'Bad Request'

class ForbiddenNotSecurity(Error):
    """When you want to return a 403 Forbidden response but not security.

    Use this for errors where the message is always safe to present to the user
    and won't give away extra information.

    """

    code = 403
    title = 'Forbidden'

class PasswordVerificationError(ForbiddenNotSecurity):
    message_format = _("The password length must be less than or equal "
                       "to %(size)i. The server could not comply with the "
                       "request because the password is invalid.")

class RegionDeletionError(ForbiddenNotSecurity):
    message_format = _("Unable to delete region %(region_id)s because it or "
                       "its child regions have associated endpoints.")

class SecurityError(Error):
    """Security error exception.

    Avoids exposing details of security errors, unless in insecure_debug mode.

    """

    amendment = _('(Disable insecure_debug mode to suppress these details.)')

    def __deepcopy__(self):
        """Override the default deepcopy.

        Keystone :class:`keystone.exception.Error` accepts an optional message
        that will be used when rendering the exception object as a string. If
        not provided the object's message_format attribute is used instead.
        :class:`keystone.exception.SecurityError` is a little different in
        that it only uses the message provided to the initializer when
        keystone is in `insecure_debug` mode. Instead it will use its
        `message_format`. This is to ensure that sensitive details are not
        leaked back to the caller in a production deployment.

        This dual mode for string rendering causes some odd behaviour when
        combined with oslo_i18n translation. Any object used as a value for
        formatting a translated string is deep copied.

        The copy causes an issue. The deep copy process actually creates a new
        exception instance with the rendered string. Then when that new
        instance is rendered as a string to use for substitution a warning is
        logged. This is because the code tries to use the `message_format` in
        secure mode, but the required kwargs are not in the deep copy.

        The end result is not an error because when the KeyError is caught the
        instance's ``message`` is used instead and this has the properly
        translated message. The only indication that something is wonky is a
        message in the warning log.
        """
        return self

    def _build_message(self, message, **kwargs):
        """Only returns detailed messages in insecure_debug mode."""
        if message and CONF.insecure_debug:
            if isinstance(message, six.string_types):
                # Only do replacement if message is string. The message is
                # sometimes a different exception or bytes, which would raise
                # TypeError.
                message = _format_with_unicode_kwargs(message, kwargs)
            return _('%(message)s %(amendment)s') % {
                'message': message,
                'amendment': self.amendment}

        return _format_with_unicode_kwargs(self.message_format, kwargs)

class Unauthorized(SecurityError):
    message_format = _("The request you have made requires authentication.")
    code = 401
    title = 'Unauthorized'

class InsufficientAuthMethods(Error):
    # NOTE(notmorgan): This is not a security error, this is meant to
    # communicate real information back to the user.
    message_format = _("Insufficient auth methods received for %(user_id)s. "
                       "Auth Methods Provided: %(methods)s.")
    code = 401
    title = 'Unauthorized'

class PasswordExpired(Unauthorized):
    message_format = _("The password is expired and needs to be changed for "
                       "user: %(user_id)s.")

class AuthPluginException(Unauthorized):
    message_format = _("Authentication plugin error.")

    def __init__(self, *args, **kwargs):
        super(AuthPluginException, self).__init__(*args, **kwargs)
        self.authentication = {}

class UserDisabled(Unauthorized):
    message_format = _("The account is disabled for user: %(user_id)s.")

class AccountLocked(Unauthorized):
    message_format = _("The account is locked for user: %(user_id)s.")

class AuthMethodNotSupported(AuthPluginException):
    message_format = _("Attempted to authenticate with an unsupported method.")

    def __init__(self, *args, **kwargs):
        super(AuthMethodNotSupported, self).__init__(*args, **kwargs)
        self.authentication = {'methods': CONF.auth.methods}

class AdditionalAuthRequired(AuthPluginException):
    message_format = _("Additional authentications steps required.")

    def __init__(self, auth_response=None, **kwargs):
        super(AdditionalAuthRequired, self).__init__(message=None, **kwargs)
        self.authentication = auth_response

class Forbidden(SecurityError):
    message_format = _("You are not authorized to perform the"
                       " requested action.")
    code = 403
    title = 'Forbidden'

class ForbiddenAction(Forbidden):
    message_format = _("You are not authorized to perform the"
                       " requested action: %(action)s.")

class CrossBackendNotAllowed(Forbidden):
    message_format = _("Group membership across backend boundaries is not "
                       "allowed. Group in question is %(group_id)s, "
                       "user is %(user_id)s.")

class InvalidPolicyAssociation(Forbidden):
    message_format = _("Invalid mix of entities for policy association: "
                       "only Endpoint, Service, or Region+Service allowed. "
                       "Request was - Endpoint: %(endpoint_id)s, "
                       "Service: %(service_id)s, Region: %(region_id)s.")

class InvalidDomainConfig(Forbidden):
    message_format = _("Invalid domain specific configuration: %(reason)s.")

class NotFound(Error):
    message_format = _("Could not find: %(target)s.")
    code = 404
    title = 'Not Found'

class EndpointNotFound(NotFound):
    message_format = _("Could not find endpoint: %(endpoint_id)s.")

class PolicyNotFound(NotFound):
    message_format = _("Could not find policy: %(policy_id)s.")

class PolicyAssociationNotFound(NotFound):
    message_format = _("Could not find policy association.")

class RoleNotFound(NotFound):
    message_format = _("Could not find role: %(role_id)s.")

class ImpliedRoleNotFound(NotFound):
    message_format = _("%(prior_role_id)s does not imply %(implied_role_id)s.")

class InvalidImpliedRole(Forbidden):
    message_format = _("%(role_id)s cannot be an implied roles.")

class DomainSpecificRoleMismatch(Forbidden):
    message_format = _("Project %(project_id)s must be in the same domain "
                       "as the role %(role_id)s being assigned.")

class DomainSpecificRoleNotWithinIdPDomain(Forbidden):
    message_format = _("role: %(role_name)s must be within the same domain as "
                       "the identity provider: %(identity_provider)s.")

class RoleAssignmentNotFound(NotFound):
    message_format = _("Could not find role assignment with role: "
                       "%(role_id)s, user or group: %(actor_id)s, "
                       "project or domain: %(target_id)s.")

class RegionNotFound(NotFound):
    message_format = _("Could not find region: %(region_id)s.")

class ServiceNotFound(NotFound):
    message_format = _("Could not find service: %(service_id)s.")

class DomainNotFound(NotFound):
    message_format = _("Could not find domain: %(domain_id)s.")

class ProjectNotFound(NotFound):
    message_format = _("Could not find project: %(project_id)s.")

class TokenNotFound(NotFound):
    message_format = _("Could not find token: %(token_id)s.")

class UserNotFound(NotFound):
    message_format = _("Could not find user: %(user_id)s.")

class GroupNotFound(NotFound):
    message_format = _("Could not find group: %(group_id)s.")

class MappingNotFound(NotFound):
    message_format = _("Could not find mapping: %(mapping_id)s.")

class TrustNotFound(NotFound):
    message_format = _("Could not find trust: %(trust_id)s.")

class TrustUseLimitReached(Forbidden):
    message_format = _("No remaining uses for trust: %(trust_id)s.")

class CredentialNotFound(NotFound):
    message_format = _("Could not find credential: %(credential_id)s.")

class VersionNotFound(NotFound):
    message_format = _("Could not find version: %(version)s.")

class EndpointGroupNotFound(NotFound):
    message_format = _("Could not find Endpoint Group: %(endpoint_group_id)s.")

class IdentityProviderNotFound(NotFound):
    message_format = _("Could not find Identity Provider: %(idp_id)s.")

class ServiceProviderNotFound(NotFound):
    message_format = _("Could not find Service Provider: %(sp_id)s.")

class FederatedProtocolNotFound(NotFound):
    message_format = _("Could not find federated protocol %(protocol_id)s for"
                       " Identity Provider: %(idp_id)s.")

class PublicIDNotFound(NotFound):
    # This is used internally and mapped to either User/GroupNotFound or,
    # Assertion before the exception leaves Keystone.
    message_format = "%(id)s"

class DomainConfigNotFound(NotFound):
    message_format = _('Could not find %(group_or_option)s in domain '
                       'configuration for domain %(domain_id)s.')

class ConfigRegistrationNotFound(Exception):
    # This is used internally between the domain config backend and the
    # manager, so should not escape to the client.  If it did, it is a coding
    # error on our part, and would end up, appropriately, as a 500 error.
    pass

class Conflict(Error):
    message_format = _("Conflict occurred attempting to store %(type)s -"
                       " %(details)s.")
    code = 409
    title = 'Conflict'

class UnexpectedError(SecurityError):
    """Avoids exposing details of failures, unless in insecure_debug mode."""

    message_format = _("An unexpected error prevented the server "
                       "from fulfilling your request.")

    debug_message_format = _("An unexpected error prevented the server "
                             "from fulfilling your request: %(exception)s.")

    def _build_message(self, message, **kwargs):

        # Ensure that exception has a value to be extra defensive for
        # substitutions and make sure the exception doesn't raise an
        # exception.
        kwargs.setdefault('exception', '')

        return super(UnexpectedError, self)._build_message(
            message or self.debug_message_format, **kwargs)

    code = 500
    title = 'Internal Server Error'

class TrustConsumeMaximumAttempt(UnexpectedError):
    debug_message_format = _("Unable to consume trust %(trust_id)s. Unable to "
                             "acquire lock.")

class CertificateFilesUnavailable(UnexpectedError):
    debug_message_format = _("Expected signing certificates are not available "
                             "on the server. Please check Keystone "
                             "configuration.")

class MalformedEndpoint(UnexpectedError):
    debug_message_format = _("Malformed endpoint URL (%(endpoint)s),"
                             " see ERROR log for details.")

class MappedGroupNotFound(UnexpectedError):
    debug_message_format = _("Group %(group_id)s returned by mapping "
                             "%(mapping_id)s was not found in the backend.")

class MetadataFileError(UnexpectedError):
    debug_message_format = _("Error while reading metadata file: %(reason)s.")

class DirectMappingError(UnexpectedError):
    message_format = _("Local section in mapping %(mapping_id)s refers to a "
                       "remote match that doesn't exist "
                       "(e.g. {0} in a local section).")

class AssignmentTypeCalculationError(UnexpectedError):
    debug_message_format = _(
        'Unexpected combination of grant attributes - '
        'User: %(user_id)s, Group: %(group_id)s, Project: %(project_id)s, '
        'Domain: %(domain_id)s.')

class NotImplemented(Error):
    message_format = _("The action you have requested has not"
                       " been implemented.")
    code = 501
    title = 'Not Implemented'

class Gone(Error):
    message_format = _("The service you have requested is no"
                       " longer available on this server.")
    code = 410
    title = 'Gone'

class ConfigFileNotFound(UnexpectedError):
    debug_message_format = _("The Keystone configuration file %(config_file)s "
                             "could not be found.")

class KeysNotFound(UnexpectedError):
    debug_message_format = _('No encryption keys found; run keystone-manage '
                             'fernet_setup to bootstrap one.')

class MultipleSQLDriversInConfig(UnexpectedError):
    debug_message_format = _('The Keystone domain-specific configuration has '
                             'specified more than one SQL driver (only one is '
                             'permitted): %(source)s.')

class MigrationNotProvided(Exception):
    def __init__(self, mod_name, path):
        super(MigrationNotProvided, self).__init__(_(
            "%(mod_name)s doesn't provide database migrations. The migration"
            " repository path at %(path)s doesn't exist or isn't a directory."
        ) % {'mod_name': mod_name, 'path': path})

class UnsupportedTokenVersionException(UnexpectedError):
    debug_message_format = _('Token version is unrecognizable or '
                             'unsupported.')

class SAMLSigningError(UnexpectedError):
    debug_message_format = _('Unable to sign SAML assertion. It is likely '
                             'that this server does not have xmlsec1 '
                             'installed or this is the result of '
                             'misconfiguration. Reason %(reason)s.')

class OAuthHeadersMissingError(UnexpectedError):
    debug_message_format = _('No Authorization headers found, cannot proceed '
                             'with OAuth related calls. If running under '
                             'HTTPd or Apache, ensure WSGIPassAuthorization '
                             'is set to On.')

class TokenlessAuthConfigError(ValidationError):
    message_format = _('Could not determine Identity Provider ID. The '
                       'configuration option %(issuer_attribute)s '
                       'was not found in the request environment.')

class CredentialEncryptionError(Exception):
    message_format = _("An unexpected error prevented the server "
                       "from accessing encrypted credentials.")

class LDAPServerConnectionError(Error):
    message_format = _('Timed out waiting to establish a '
                       'connection to the LDAP Server (%(url)s).')
    code = 504
    title = 'Gateway Timeout'


text:
<?php
/**
 * Created by PhpStorm.
 * User: Luiz
 * Date: 14/04/2015
 * Time: 21:39
 */

namespace Application\Provider;

trait FileMailProvider {

    private $fileMail;

    /**
     * @param mixed $container
     */
    public function setFileMail($fileMail)
    {
        $this->fileMail = $fileMail;
    }
}


text:
using System;
using ZooKeeperNet;

namespace Drogher.Utils
{
    public interface IZooKeeperFactory
    {
        IZooKeeper NewZooKeeper(string connectionString, TimeSpan sessionTimeout, IWatcher watcher);
    }
}


text:
<?php
/**
 * Mime Type: application/json
 * @author Nathan Good <me@nategood.com>
 */

namespace denbora\R_T_G_Services\Httpful\Handlers;

use denbora\R_T_G_Services\Httpful\Exception\JsonParseException;

class JsonHandler extends MimeHandlerAdapter
{
    private $decode_as_array = false;

    public function init(array $args)
    {
        $this->decode_as_array = !!(array_key_exists('decode_as_array', $args) ? $args['decode_as_array'] : false);
    }

    /**
     * @param string $body
     * @return mixed
     * @throws \Exception
     */
    public function parse($body)
    {
        $body = $this->stripBom($body);
        if (empty($body))
            return null;
        $parsed = json_decode($body, $this->decode_as_array);
        if (is_null($parsed) && 'null' !== strtolower($body))
            throw new JsonParseException('Unable to parse response as JSON: ' . json_last_error_msg());
        return $parsed;
    }

    /**
     * @param mixed $payload
     * @return string
     */
    public function serialize($payload)
    {
        return json_encode($payload);
    }
}


text:
title:  Hingamispäeva pärastlõuna
date:   02/03/2019
---

### Selle nädala õppeaine:
Ilm 14:6–12; Mt 24:14; Hs 12:13, 14; 2Ms 20:2–11; Js 21:9; Js 34:8–10.

>
Juhtsalm:

> "Siin olgu kannatlikkust pühadel, kes hoiavad alal Jumala käske ja Jeesuse usku" (Ilm 14:12).

Ilmutusraamatu järgi on Saatana lõpuaja pettus nii edukas, et maailm valib kummardada metsalist ja võtta vastu tema märgi. Ometi räägib Ilm 14:1–5 meile, et Jumalal on oma jääk; need, kes seisavad Issanda poolel, kui enamik maailmast seda ei tee.

Lõpuks tuleb inimestel valida – mitte seda, kas kummardada või mitte (igaüks kummardab ju alati midagi) – vaid seda, keda kummardada. Metsalise kummardajad saavad märgi oma parema käe peale või otsmikule, mis sümboliseerib nende valikut teenida oma tegude ja/või meeltega seda ärataganenud süsteemi.

Samal ajal on maailm tunnistajaks nii suurele evangeeliumi kuulutamisele, millist pole olnud nelipüha ajast alates. Enne, kui Jumala karistused valatakse trotslike inimeste peale, saadab Jumal oma hoiatussõnumi "kõigile paganahõimudele ja suguharudele ja keeltele ja rahvastele" (Ilm 14:6). Jumal ei taha, et keegi hukkuks, vaid et kõik saaksid päästetud; seepärast surigi Kristus kogu inimkonna eest. Küsimus on selles, kes võtab neile pakutava vastu ja kes mitte.

_Selle nädala õppetükki õppides valmistud hingamispäevaks, 9. märtsiks._


text:
package io.grpc;

import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;

import com.google.common.base.Defaults;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Collections;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/**
 * Unit tests for {@link ForwardingChannelBuilder}.
 */
@RunWith(JUnit4.class)
public class ForwardingChannelBuilderTest {
  private final ManagedChannelBuilder<?> mockDelegate = mock(ManagedChannelBuilder.class);

  private final ForwardingChannelBuilder<?> testChannelBuilder = new TestBuilder();

  private final class TestBuilder extends ForwardingChannelBuilder<TestBuilder> {
    @Override
    protected ManagedChannelBuilder<?> delegate() {
      return mockDelegate;
    }
  }

  @Test
  public void allMethodsForwarded() throws Exception {
    ForwardingTestUtil.testMethodsForwarded(
        ManagedChannelBuilder.class,
        mockDelegate,
        testChannelBuilder,
        Collections.<Method>emptyList(),
        new ForwardingTestUtil.ArgumentProvider() {
          @Override
          public Object get(Method method, int argPos, Class<?> clazz) {
            if (method.getName().equals("maxInboundMetadataSize")) {
              assertThat(argPos).isEqualTo(0);
              return 1; // an arbitrary positive number
            }
            return null;
          }
        });
  }

  @Test
  public void allBuilderMethodsReturnThis() throws Exception {
    for (Method method : ManagedChannelBuilder.class.getDeclaredMethods()) {
      if (Modifier.isStatic(method.getModifiers()) || Modifier.isPrivate(method.getModifiers())) {
        continue;
      }
      if (method.getName().equals("build")) {
        continue;
      }
      Class<?>[] argTypes = method.getParameterTypes();
      Object[] args = new Object[argTypes.length];
      for (int i = 0; i < argTypes.length; i++) {
        args[i] = Defaults.defaultValue(argTypes[i]);
      }
      if (method.getName().equals("maxInboundMetadataSize")) {
        args[0] = 1; // an arbitrary positive number
      }

      Object returnedValue = method.invoke(testChannelBuilder, args);

      assertThat(returnedValue).isSameAs(testChannelBuilder);
    }
  }

  @Test
  public void buildReturnsDelegateBuildByDefualt() {
    ManagedChannel mockChannel = mock(ManagedChannel.class);
    doReturn(mockChannel).when(mockDelegate).build();

    assertThat(testChannelBuilder.build()).isSameAs(mockChannel);
  }
}


text:
module SeedUserRoles
  def self.seed
    Role.public || Factory( :role_public )
    Role.learner || Factory( :role_learner )
    Role.user_admin || Factory(:role_user_admin)
    Role.course_admin || Factory(:role_course_admin)
    Role.product_admin || Factory(:role_product_admin)
    Role.tech_support || Factory(:role_tech_support)
    Role.scitent_admin || Factory(:role_scitent_admin)
  end

  def self.clean
    Role.destroy_all
  end
end


text:
//
//  @author sgazeos@gmail.com
//
#ifndef __IMAGE_DRAW_BOUNDING_BOXES_H_HELPERS__
#define __IMAGE_DRAW_BOUNDING_BOXES_H_HELPERS__
#include <array/NDArray.h>
#include <system/op_boilerplate.h>

namespace sd {
namespace ops {
namespace helpers {

SD_LIB_HIDDEN void drawBoundingBoxesFunctor(sd::LaunchContext* context, NDArray* images, NDArray* boxes,
                                            NDArray* colors, NDArray* output);

}
}  // namespace ops
}  // namespace sd
#endif


text:
<?php

use ComputationCloud\Exchange\Redis;

class RedisExchangeTestCase extends PHPUnit_Framework_TestCase
{
    public function testPutGet()
    {
        $exchange = new Redis(['host' => 'localhost']);
        $exchange->put(['this' => 'is test']);
        $data = $exchange->pop();
        $this->assertEquals(['this' => 'is test'], $data, "'test' string was put into exchange");

        $this->setExpectedException("Exception");
        $exchange->pop();
    }

    public function testEmptyGet()
    {
        $exchange = new Redis(['host' => 'localhost']);
        $this->setExpectedException("Exception");
        $exchange->pop();
    }

    public function testId()
    {
        $exchange = new Redis([]);
        $exchange->put('test');
        $id = $exchange->getId();
        $newExchange = new Redis(['id' => $id]);
        $this->assertEquals('test', $newExchange->pop());
    }

}


text:
package noop.operations;

import noop.graph.Controller;
import noop.graph.Edge.EdgeType;
import noop.model.LanguageElement;

/**
 * @author alexeagle@google.com (Alex Eagle)
 */
public class NewEdgeOperation implements MutationOperation {
  public final LanguageElement src;
  public final EdgeType type;
  public final LanguageElement dest;

  public NewEdgeOperation(LanguageElement src, EdgeType type, LanguageElement dest) {
    this.src = src;
    this.type = type;
    this.dest = dest;
  }

  @Override
  public void execute(Controller controller) {
    controller.addEdge(this);
  }
}


text:
libBlinkStick
=============

A [blinkstick](http://www.blinkstick.com/) library written in C

## [API Documentation](http://ebenoist.github.io/libblinkstick/html/libblinkstick_8h.html)

## Requirements
- [hidapi](https://github.com/signal11/hidapi)
- [clang](https://clang.llvm.org/)
- [cmake](https://cmake.org/)

## Getting Started
- `cmake .` to generate the Makefiles for your system
- `make install` to install the shared library and cli tool

## The CLI tool
Mostly a proof of concept for the library, the blinkstick CLI allows you to turn on and off any number of connected devices, set their colors, or target specific LEDs.

After running make, you'll have a `blinkstick` binary in target/

```
$ blinkstick --help
USAGE:
  blinkstick [options...]
OPTIONS
  --color set the color using a three rgb values
  --count set the number of blinkstick devices to address
  --index which led should be set
  --debug turn on debug logging
```

## Contributors
Many thanks to the contributors who have helped out over the years.

* [@jmtd](https://github.com/jmtd)
* @Raag079
* [@DeveloperPaul123](https://github.com/DeveloperPaul123)
* [@shuntaraw](https://github.com/shuntaraw)
* [@rstephan](https://github.com/rstephan)

And many thanks to @arvydas!

## Need a C++ Version?
* https://github.com/teekae/blinkstickcpp


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">SoundHeap</string>
    <string name="record_title">Record</string>
    <string name="recording">Recording.</string>
    <string name="ready">Ready.</string>
    <string name="playback_title">Playback</string>
    <string name="project_title">Tracks</string>
    <string name="delete_action">Erase</string>
    <string name="send_action">Send Track</string>
    <string name="no_intent_to_send">No Program Available</string>
    <string name="open_action">Open Track</string>
    <string name="ignore_silence">Ignore Silence</string>
    <string name="new_file_on_silence">New File on Silence</string>
    <string name="pause_time">Silence Time</string>
    <string name="repository">/sdcard/soundheap/</string>
    <string name="share">Share</string>
    <string name="previous">Previous</string>
    <string name="rewind">Rewind</string>
    <string name="next">Next</string>
    <string name="fast_forward">Fast Forward</string>
    <string name="play_pause">Play/Pause</string>
    <string name="stop">Stop</string>
    <string name="about">About</string>
    <string name="default_file_prefix">soundheap</string>
    <string name="save_file_prefix">File Prefix</string>
    <string name="file_postfix">.(currentDate).ogg</string>
</resources>


text:
         Nouvel utilisateur

        <alert type="danger" ng-if="addUserAdminCtrl.error">
            <errors errors="addUserAdminCtrl.error"></errors>
        </alert>
        <form id="login" role="form" ng-submit="addUserAdminCtrl.submit()">

                <input type="text" required ng-model="addUserAdminCtrl.user.username" class="form-control" name="Nom" placeholder="Nom"/>

                <input type="password" required ng-model="addUserAdminCtrl.user.password" class="form-control" name="Password" placeholder="Mot de passe"/>

                <same-password password="addUserAdminCtrl.user.password" required="required" error="addUserAdminCtrl.error" placeholder="Confirmer votre mot de passe"></same-password>

                <input type="email" ng-model="addUserAdminCtrl.user.email" required class="form-control" name="Email" placeholder="Email"/>

                    <select ng-model="addUserAdminCtrl.user.applicationRole" required class="form-select" name="role" placeholder="Role">
                        <option value=""></option>
                        <option value="{{role}}" ng-repeat="role in addUserAdminCtrl.roles">{{role}}</option>
                    </select>

                <button type="submit"  class="btn btn-info center-block">valider</button>

        </form>


text:
/*
 * File: CatchMeIfYouCan.java
 * -----------------------------
 * Makes a program with one magic blue square and many
 * distractors. The user tries (in vain) to touch the
 * blue square with her mouse.
 */

import java.awt.Color;
import java.awt.event.MouseEvent;

import acm.graphics.*;
import acm.program.*;
import acm.util.RandomGenerator;

public class CatchMeIfYouCanSoln extends GraphicsProgram {

	private static final int DISTRACTOR_SIZE = 40;
	private static final int SQ_SIZE = 45;
	private static final int N_DISTRACTORS = 50;

	private GRect blueSquare = null;
	private RandomGenerator rg = new RandomGenerator();

	public void run() {
		addMouseListeners();
		addBlueSquare();
		addDistractors();
	}

	public void mouseMoved(MouseEvent e) {
		GObject obj = getElementAt(e.getX(), e.getY());
		if(obj == blueSquare) {
			int x = getRandomX(SQ_SIZE);
			int y = getRandomY(SQ_SIZE);
			blueSquare.setLocation(x, y);
		}
	}

	private void addBlueSquare() {
		blueSquare = new GRect(SQ_SIZE, SQ_SIZE);
		blueSquare.setFilled(true);
		blueSquare.setColor(Color.BLUE);
		int x = getRandomX(SQ_SIZE);
		int y = getRandomY(SQ_SIZE);
		add(blueSquare, x, y);
	}

	private void addDistractors() {
		for(int i = 0; i < N_DISTRACTORS; i++) {
			addDistractor();
		}
	}

	private void addDistractor() {
		GRect r = new GRect(DISTRACTOR_SIZE, DISTRACTOR_SIZE);
		r.setFilled(true);
		int x = getRandomX(DISTRACTOR_SIZE);
		int y = getRandomY(DISTRACTOR_SIZE);
		add(r, x, y);
	}

	private int getRandomY(int size) {
		return rg.nextInt(getHeight() - size);
	}

	private int getRandomX(int size) {
		return rg.nextInt(getWidth() - size);
	}

}


text:
A simple abstraction over Hammer's VMF Model that let's you "program" maps.

Sample code:
```
//Creating a simple Map
Map m = new Map();

//Create a room and add it to the map
Room room = new Room
{
  X = 0,
  Y = 0,
  Z = 0,
  Width = 1024,
  Breadth = 512,
  Height = 384
};
m.AddWorldObject(room);

//The string representation of the map is equivalent to the vmf file hammer editor would produce (and can be compiled by it)
Console.WriteLine(m.ToString()); //Save this to a .vmf file
```
Inside the Model folder are the "low level" models, if you want to write code please use the models in the "Structures" folder, such as Block (simple Cube), Room (Simple room with 6 Blocks), ...

Planned features:
Structures for Spawnzones, Bhopzones and much more
Simple Roomconnector that creates a portal at the end of one and a teleport destination at the start of the other
Support for more entities
The actual mapgenerator (Select length, difficulty, standard textures and get a full map with spawn and end)

More info coming. Contact: [Julius (Steam)](https://steamcommunity.com/id/Chefkoch_JJ/)


text:
using System.Linq;
using System.Text.RegularExpressions;
using NSpec;
using NSpec.Domain;

namespace NSpecSpecs
{
    public static class SpecExtensions
    {
        public static Context Find(this ContextCollection contextCollection, string name)
        {
            return contextCollection.AllContexts().SingleOrDefault(c => c.Name == name);
        }

        public static ExampleBase FindExample(this ContextCollection contextCollection, string name)
        {
            return contextCollection.Examples().SingleOrDefault(e => e.Spec == name);
        }

        public static void should_have_passed(this ExampleBase example)
        {
            (example.HasRun && example.Exception == null).is_true();
        }

        public static void should_have_failed(this ExampleBase example)
        {
            (example.HasRun && example.Exception == null).is_false();
        }

        public static string RegexReplace(this string input, string pattern, string replace)
        {
            return Regex.Replace(input, pattern, replace);
        }
    }
}


text:
package net.ssehub.easy.varModel.cstEvaluation;

/**
 * Basic (number) operations. This enumeration is only needed inside {@link IntegerOperations} and
 * {@link RealOperations} for differentiation between different number operations, which can be handled
 * by the same methods.
 * @author El-Sharkawy
 *
 */
enum ArithmeticOperationType {
    PLUS, MINUS, MULTIPLICATION, DIVISION, MODULO;
}


text:
// This file is automatically generated.

package adila.db;

/*
 * Positivo Ypy 07STB
 *
 * DEVICE: YPY_07STB
 * MODEL: YPY_07STB
 */
final class ypy5f07stb_ypy5f07stb {
    public static final String DATA = "Positivo|Ypy 07STB|";
}


text:
namespace Microsoft.Azure.Management.Media.Models
{
    using System;
    using System.Linq;
    using System.Collections.Generic;
    using Newtonsoft.Json;
    using Microsoft.Rest;
    using Microsoft.Rest.Serialization;
    using Microsoft.Rest.Azure;

    /// <summary>
    /// The request body for CheckNameAvailability API.
    /// </summary>
    public partial class CheckNameAvailabilityInput
    {
        /// <summary>
        /// Initializes a new instance of the CheckNameAvailabilityInput class.
        /// </summary>
        public CheckNameAvailabilityInput() { }

        /// <summary>
        /// Initializes a new instance of the CheckNameAvailabilityInput class.
        /// </summary>
        public CheckNameAvailabilityInput(string name = default(string), string type = default(string))
        {
            Name = name;
            Type = type;
        }

        /// <summary>
        /// The name of the resource. A name must be globally unique.
        /// </summary>
        [JsonProperty(PropertyName = "name")]
        public string Name { get; set; }

        /// <summary>
        /// Specifies the type of the resource.
        /// </summary>
        [JsonProperty(PropertyName = "type")]
        public string Type { get; set; }

        /// <summary>
        /// Validate the object. Throws ValidationException if validation fails.
        /// </summary>
        public virtual void Validate()
        {
            if (this.Name != null)
            {
                if (this.Name.Length > 24)
                {
                    throw new ValidationException(ValidationRules.MaxLength, "Name", 24);
                }
                if (this.Name.Length < 3)
                {
                    throw new ValidationException(ValidationRules.MinLength, "Name", 3);
                }
                if (!System.Text.RegularExpressions.Regex.IsMatch(this.Name, "^[a-z0-9]"))
                {
                    throw new ValidationException(ValidationRules.Pattern, "Name", "^[a-z0-9]");
                }
            }
        }
    }
}


text:
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

using Microsoft.IdentityModel.Tokens;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace IdentityServer4.Stores
{
    public interface IValidationKeysStore
    {
        Task<IEnumerable<SecurityKey>> GetValidationKeysAsync();
    }
}


text:
About the runtest library
=========================

Scope
-----

When testing numerical codes against functionality regression, you typically
cannot use a plain diff against the reference outputs due to numerical noise in
the digits and because there may be many numbers that change all the time and
that you do not want to test (e.g. date and time of execution).

The aim of this library is to make the testing and maintenance of tests easy.
The library allows to extract portions of the program output(s) which are
automatically compared to reference outputs with a relative or absolute
numerical tolerance to compensate for numerical noise due to machine precision.

Design decisions
----------------

The library is designed to play well with CTest, to be convenient when used
interactively, and to work without trouble on Linux, Mac, and Windows. It
offers a basic argument parsing for test scripts.


text:
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of SecurityController
 *
 * @author nelly
 */

namespace Subastando\SubastaBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Security\Core\SecurityContext;

class SecurityController extends Controller{

public function loginAction(){
    $request = $this->getRequest();
    $session = $request->getSession();

    if($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)){
        $error = $request->attributes->get(SecurityContext::AUTHENTICATION_ERROR);
    } else {
        $error = $session->get(SecurityContext::AUTHENTICATION_ERROR);
        $session->remove(SecurityContext::AUTHENTICATION_ERROR);
    }

    return $this->render('SubastandoSubastaBundle:Security:login.html.twig',array(
        'last_username'=>$session->get(SecurityContext::LAST_USERNAME),
        'error'        =>$error,

    ));

    }
}

?>