text:
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
 *  (C) 2001 by Argonne National Laboratory.
 *      See COPYRIGHT in top-level directory.
 *
 * This file is automatically generated by buildiface
 * DO NOT EDIT
 */
#include "mpi_fortimpl.h"

/* Begin MPI profiling block */
#if defined(USE_WEAK_SYMBOLS) && !defined(USE_ONLY_MPI_NAMES)
#if defined(HAVE_MULTIPLE_PRAGMA_WEAK)
extern FORT_DLL_SPEC void FORT_CALL MPI_INIT( MPI_Fint * );
extern FORT_DLL_SPEC void FORT_CALL mpi_init__( MPI_Fint * );
extern FORT_DLL_SPEC void FORT_CALL mpi_init( MPI_Fint * );
extern FORT_DLL_SPEC void FORT_CALL mpi_init_( MPI_Fint * );

#if defined(F77_NAME_UPPER)
#pragma weak MPI_INIT = PMPI_INIT
#pragma weak mpi_init__ = PMPI_INIT
#pragma weak mpi_init_ = PMPI_INIT
#pragma weak mpi_init = PMPI_INIT
#elif defined(F77_NAME_LOWER_2USCORE)
#pragma weak MPI_INIT = pmpi_init__
#pragma weak mpi_init__ = pmpi_init__
#pragma weak mpi_init_ = pmpi_init__
#pragma weak mpi_init = pmpi_init__
#elif defined(F77_NAME_LOWER_USCORE)
#pragma weak MPI_INIT = pmpi_init_
#pragma weak mpi_init__ = pmpi_init_
#pragma weak mpi_init_ = pmpi_init_
#pragma weak mpi_init = pmpi_init_
#else
#pragma weak MPI_INIT = pmpi_init
#pragma weak mpi_init__ = pmpi_init
#pragma weak mpi_init_ = pmpi_init
#pragma weak mpi_init = pmpi_init
#endif

#elif defined(HAVE_PRAGMA_WEAK)

#if defined(F77_NAME_UPPER)
extern FORT_DLL_SPEC void FORT_CALL MPI_INIT( MPI_Fint * );

#pragma weak MPI_INIT = PMPI_INIT
#elif defined(F77_NAME_LOWER_2USCORE)
extern FORT_DLL_SPEC void FORT_CALL mpi_init__( MPI_Fint * );

#pragma weak mpi_init__ = pmpi_init__
#elif !defined(F77_NAME_LOWER_USCORE)
extern FORT_DLL_SPEC void FORT_CALL mpi_init( MPI_Fint * );

#pragma weak mpi_init = pmpi_init
#else
extern FORT_DLL_SPEC void FORT_CALL mpi_init_( MPI_Fint * );

#pragma weak mpi_init_ = pmpi_init_
#endif

#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
#if defined(F77_NAME_UPPER)
#pragma _HP_SECONDARY_DEF PMPI_INIT  MPI_INIT
#elif defined(F77_NAME_LOWER_2USCORE)
#pragma _HP_SECONDARY_DEF pmpi_init__  mpi_init__
#elif !defined(F77_NAME_LOWER_USCORE)
#pragma _HP_SECONDARY_DEF pmpi_init  mpi_init
#else
#pragma _HP_SECONDARY_DEF pmpi_init_  mpi_init_
#endif

#elif defined(HAVE_PRAGMA_CRI_DUP)
#if defined(F77_NAME_UPPER)
#pragma _CRI duplicate MPI_INIT as PMPI_INIT
#elif defined(F77_NAME_LOWER_2USCORE)
#pragma _CRI duplicate mpi_init__ as pmpi_init__
#elif !defined(F77_NAME_LOWER_USCORE)
#pragma _CRI duplicate mpi_init as pmpi_init
#else
#pragma _CRI duplicate mpi_init_ as pmpi_init_
#endif
#endif /* HAVE_PRAGMA_WEAK */
#endif /* USE_WEAK_SYMBOLS */
/* End MPI profiling block */

/* These definitions are used only for generating the Fortran wrappers */
#if defined(USE_WEAK_SYMBOLS) && defined(HAVE_MULTIPLE_PRAGMA_WEAK) && \
    defined(USE_ONLY_MPI_NAMES)
extern FORT_DLL_SPEC void FORT_CALL MPI_INIT( MPI_Fint * );
extern FORT_DLL_SPEC void FORT_CALL mpi_init__( MPI_Fint * );
extern FORT_DLL_SPEC void FORT_CALL mpi_init( MPI_Fint * );
extern FORT_DLL_SPEC void FORT_CALL mpi_init_( MPI_Fint * );

#if defined(F77_NAME_UPPER)
#pragma weak mpi_init__ = MPI_INIT
#pragma weak mpi_init_ = MPI_INIT
#pragma weak mpi_init = MPI_INIT
#elif defined(F77_NAME_LOWER_2USCORE)
#pragma weak MPI_INIT = mpi_init__
#pragma weak mpi_init_ = mpi_init__
#pragma weak mpi_init = mpi_init__
#elif defined(F77_NAME_LOWER_USCORE)
#pragma weak MPI_INIT = mpi_init_
#pragma weak mpi_init__ = mpi_init_
#pragma weak mpi_init = mpi_init_
#else
#pragma weak MPI_INIT = mpi_init
#pragma weak mpi_init__ = mpi_init
#pragma weak mpi_init_ = mpi_init
#endif

#endif

/* Map the name to the correct form */
#ifndef MPICH_MPI_FROM_PMPI
#if defined(USE_WEAK_SYMBOLS) && defined(HAVE_MULTIPLE_PRAGMA_WEAK)
/* Define the weak versions of the PMPI routine*/
#ifndef F77_NAME_UPPER
extern FORT_DLL_SPEC void FORT_CALL PMPI_INIT( MPI_Fint *, MPI_Fint * );
#endif
#ifndef F77_NAME_LOWER_2USCORE
extern FORT_DLL_SPEC void FORT_CALL pmpi_init__( MPI_Fint *, MPI_Fint * );
#endif
#ifndef F77_NAME_LOWER_USCORE
extern FORT_DLL_SPEC void FORT_CALL pmpi_init_( MPI_Fint *, MPI_Fint * );
#endif
#ifndef F77_NAME_LOWER
extern FORT_DLL_SPEC void FORT_CALL pmpi_init( MPI_Fint *, MPI_Fint * );

#endif

#if defined(F77_NAME_UPPER)
#pragma weak pmpi_init__ = PMPI_INIT
#pragma weak pmpi_init_ = PMPI_INIT
#pragma weak pmpi_init = PMPI_INIT
#elif defined(F77_NAME_LOWER_2USCORE)
#pragma weak PMPI_INIT = pmpi_init__
#pragma weak pmpi_init_ = pmpi_init__
#pragma weak pmpi_init = pmpi_init__
#elif defined(F77_NAME_LOWER_USCORE)
#pragma weak PMPI_INIT = pmpi_init_
#pragma weak pmpi_init__ = pmpi_init_
#pragma weak pmpi_init = pmpi_init_
#else
#pragma weak PMPI_INIT = pmpi_init
#pragma weak pmpi_init__ = pmpi_init
#pragma weak pmpi_init_ = pmpi_init
#endif /* Test on name mapping */
#endif /* Use multiple pragma weak */

#ifdef F77_NAME_UPPER
#define mpi_init_ PMPI_INIT
#elif defined(F77_NAME_LOWER_2USCORE)
#define mpi_init_ pmpi_init__
#elif !defined(F77_NAME_LOWER_USCORE)
#define mpi_init_ pmpi_init
#else
#define mpi_init_ pmpi_init_
#endif /* Test on name mapping */

/* This defines the routine that we call, which must be the PMPI version
   since we're renaming the Fortran entry as the pmpi version.  The MPI name
   must be undefined first to prevent any conflicts with previous renamings,
   such as those put in place by the globus device when it is building on
   top of a vendor MPI. */
#undef MPI_Init
#define MPI_Init PMPI_Init

#else

#ifdef F77_NAME_UPPER
#define mpi_init_ MPI_INIT
#elif defined(F77_NAME_LOWER_2USCORE)
#define mpi_init_ mpi_init__
#elif !defined(F77_NAME_LOWER_USCORE)
#define mpi_init_ mpi_init
/* Else leave name alone */
#endif

#endif /* MPICH_MPI_FROM_PMPI */

/* Prototypes for the Fortran interfaces */
#include "fproto.h"
FORT_DLL_SPEC void FORT_CALL mpi_init_ ( MPI_Fint *ierr ){
#ifndef F77_RUNTIME_VALUES
    /* any compile/link time values go here */
#else
#   error "Fortran values must be determined at configure time"
#endif
    mpirinitf_(); MPIR_F_NeedInit = 0;
    *ierr = MPI_Init( 0, 0 );
}


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('payments', '0007_optionalworkshop_instructor'),
    ]

    operations = [
        migrations.AddField(
            model_name='workshop',
            name='draft',
            field=models.BooleanField(default=True, help_text='Draft workshop does not show up on the workshop list overview'),
            preserve_default=False,
        ),
    ]

redpajama_set_name: RedPajamaGithub


text:
/* */
module.exports = function(hljs) {
  var OPENING_LONG_BRACKET = '\\[=*\\[';
  var CLOSING_LONG_BRACKET = '\\]=*\\]';
  var LONG_BRACKETS = {
    begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET,
    contains: ['self']
  };
  var COMMENTS = [
    hljs.COMMENT('--(?!' + OPENING_LONG_BRACKET + ')', '$'),
    hljs.COMMENT(
      '--' + OPENING_LONG_BRACKET,
      CLOSING_LONG_BRACKET,
      {
        contains: [LONG_BRACKETS],
        relevance: 10
      }
    )
  ];
  return {
    lexemes: hljs.UNDERSCORE_IDENT_RE,
    keywords: {
      keyword:
        'and break do else elseif end false for if in local nil not or repeat return then ' +
        'true until while',
      built_in:
        '_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load ' +
        'loadfile loadstring module next pairs pcall print rawequal rawget rawset require ' +
        'select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug ' +
        'io math os package string table'
    },
    contains: COMMENTS.concat([
      {
        className: 'function',
        beginKeywords: 'function', end: '\\)',
        contains: [
          hljs.inherit(hljs.TITLE_MODE, {begin: '([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*'}),
          {
            className: 'params',
            begin: '\\(', endsWithParent: true,
            contains: COMMENTS
          }
        ].concat(COMMENTS)
      },
      hljs.C_NUMBER_MODE,
      hljs.APOS_STRING_MODE,
      hljs.QUOTE_STRING_MODE,
      {
        className: 'string',
        begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET,
        contains: [LONG_BRACKETS],
        relevance: 5
      }
    ])
  };
};


text:
<?php

namespace Statamic\Dipper;

class Dipper
{
	/**
	 * A list of replacements extracts from the raw data string
	 * @public array
	 */
	public static $replacements = array();

	/**
	 * Replacement types
	 * @public array
	 */
	public static $replacement_types = array();

	/**
	 * The size of the indent (in spaces) being used
	 * @private int
	 */
	public static $indent_size = 0;

	/**
	 * A string representation of one empty indent (based on self::$indent_size)
	 * @private null
	 */
	public static $empty_indent = null;

	/**
	 * Iterator used for replacements
	 * @private int
	 */
	public static $i = 0;

	/**
	 * List of strings that register as booleans/null values and their mappings
	 * @private array
	 */
	public static $booleans = array(
		'true'  => true,
		'false' => false,
		'~'     => null,
		'null'  => null
	);

	// public interface
	// --------------------------------------------------------------------------------

	/**
	 * Takes a given piece of text and parses it for YAML
	 *
	 * @param string  $yaml  The YAML to parse
	 * @return array
	 */
	public static function parse($yaml)
	{
		// reset replacements since these don't apply from parse to parse
		self::$replacements = array();
		self::$replacement_types = array();
		self::$i = 0;

		// prepare the YAML by removing comments, standardizing line-endings
		$yaml = self::prepare($yaml);

		// get indent
		self::setIndent($yaml);

		// break into structures
		$structures = self::breakIntoStructures($yaml);

		// parse structures
		return self::parseStructures($structures, true);
	}

	// the guts
	// --------------------------------------------------------------------------------

	/**
	 * Loops through the given structures, parsing each individually
	 *
	 * @param array  $structures  List of structures that need parsing
	 * @param boolean  $is_root  Is this the top-most structure?
	 * @return array
	 */
	private static function parseStructures($structures, $is_root=false)
	{
		$output = array();

		// loop through each structure, escaping quoted content and comments, then parsing it
		foreach ($structures as $structure) {
			// remove double-quoted strings
			if (strpos($structure, '"') !== false) {
				$structure = preg_replace_callback('/".*?(?<!\\\)"/m', function($item) {
					$key = '__r@-' . Dipper::$i++ . '__';
					Dipper::$replacement_types[$key] = '"';
					Dipper::$replacements[$key] = substr($item[0], 1, -1);
					return $key;
				}, $structure);
			}

			// remove single-quoted strings
			if (strpos($structure, '\'') !== false) {
				$structure = preg_replace_callback('/\'.*?(?<!\\\)\'/m', function($item) {
					$key = '__r@-' . Dipper::$i++ . '__';
					Dipper::$replacement_types[$key] = '\'';
					Dipper::$replacements[$key] = substr($item[0], 1, -1);
					return $key;
				}, $structure);
			}

			// remove comments
			if (strpos($structure, '#') !== false) {
				$colon = strpos($structure, ':');
				if ($colon !== false) {
					$first_value_char = substr(trim(substr($structure, $colon + 1)), 0, 1);
					if ($first_value_char !== '>' && $first_value_char !== '|') {
						$structure = preg_replace('/#.*?$/m', '', $structure);
					}
				}
			}

			// add to $output
			if ($result = self::parseStructure($structure)) {
				if ($is_root && $structure[0] === '-' && empty($result[1]) && !empty($result[0])) {
					// handles cases where the outer-most element is just a list
					$output[] = $result[0];
				} else {
					$output[$result[0]] = $result[1];
				}
			}
		}

		return $output;
	}

	/**
	 * Takes one structure or single value and parses it
	 *
	 * @param mixed  $structure  Structure or value to parse
	 * @return array|float|null|number|string
	 */
	private static function parseStructure($structure)
	{
		// separate key from value
		$out    = self::breakIntoKeyValue($structure);
		$key    = $out[0];  // this is slightly faster...
		$value  = $out[1];  // ...than using list() out of the method

		// transformations that are used more than once
		$first_two        = substr($value, 0, 2);
		$first_character  = $first_two[0];
		$trimmed_value    = trim($value);
		$trimmed_lower    = strtolower($trimmed_value);

		// this is empty, abort
		if (!isset($key) && empty($value)) {
			return null;
		}

		// what is this?
		if ($value === '') {
			// it's a nothing!
			$new_value = null;
		} elseif ($first_two === '__' && substr($value, 0, 5) === '__r@-') {
			// it's a replaceable value!
			$new_value = self::unreplace($value);
		} elseif (array_key_exists($trimmed_lower, self::$booleans)) {
			// it's a boolean!
			$new_value = self::$booleans[$trimmed_lower];
		} elseif ($first_character === '[' && substr($trimmed_lower, -1) === ']') {
			// it's a short-hand list!
			$new_value = explode(',', trim($value, '[]'));
			foreach ($new_value as &$line) {
				$line = self::unreplaceAll(trim($line));
			}
		} elseif ($first_character === '|') {
			// it's a literal scalar!
			$new_value = self::unreplaceAll(substr($value, strpos($value, "\n") + 1), true);
		} elseif ($first_character === '>') {
			// it's a fold-able scalar!
			$new_value = self::unreplaceAll(preg_replace('/^(\S[^\n]*)\n(?=\S)/m', '$1 ', substr($value, strpos($value, "\n") + 1)));
		} elseif ($first_two === '- ' || $first_two === "-\n") {
			// it's a standard list!
			$items = self::breakIntoStructures($value);

			$new_value = array();
			foreach ($items as $item) {
				$item = trim(self::outdent(substr($item, 1)));

				if (strpos($item, ': ') || strpos($item, ":\n")) {
					$structures = self::breakIntoStructures($item);
					$new_value[] = self::parseStructures($structures);
				} else {
					$new_value[] = self::parseStructure($item);
				}
			}
		} elseif (strpos($value, ': ') || strpos($value, ":\n")) {
			// it's a map! which in this system, means it's a structure
			$structures  = self::breakIntoStructures(self::outdent($value));
			$new_value   = self::parseStructures($structures);
		} elseif (is_numeric($trimmed_lower) || $first_two === '0o') {
			// it's a number!
			if (strpos($value, '.') !== false) {
				// float
				$new_value = (float)$value;
			} elseif ($first_two === '0x') {
				// hex
				$new_value = hexdec($value);
			} elseif ($first_character === '0') {
				// octal
				$new_value = octdec($value);
			} else {
				// plain-old integer
				$new_value = (int)$value;
			}
		} elseif ($first_two === '0o') {
			// it's a yaml 1.2 octal
			$new_value = octdec(substr($value, 2));
		} elseif ($trimmed_lower === '.inf' || $trimmed_lower === '(inf)') {
			// it's infinite!
			$new_value = INF;
		} elseif ($trimmed_lower === '-.inf' || $trimmed_lower === '(-inf)') {
			// it's negatively infinite!
			$new_value = -INF;
		} elseif ($trimmed_value === '.NaN' || $trimmed_lower === '(NaN)') {
			// it's specifically not a number!
			$new_value = NAN;
		} else {
			// it is what it is, a string probably!
			$new_value = rtrim(self::unreplaceAll($value));
		}

		if (empty($key)) {
			// no key is set, so this is probably a value-parsing end-point
			return $new_value;
		} else {
			// there's a key, so this is probably a structure-parsing end-point
			return array(trim(self::unreplace($key)), $new_value);
		}
	}

	/**
	 * Breaks the given text into a key/value pair
	 *
	 * @param string  $text  Text to break into key/value pair
	 * @return array
	 */
	private static function breakIntoKeyValue($text)
	{
		$colon = strpos($text, ':');

		if (empty($colon)) {
			return array(null, self::outdent($text));
		}

		$key    = substr($text, 0, $colon);
		$value  = self::outdent(substr($text, $colon + 1));

		return array($key, $value);
	}

	/**
	 * Sets the indent level currently being used
	 *
	 * @param string  $yaml  YAML to examine for indents
	 */
	private static function setIndent($yaml)
	{
		self::$indent_size = 0;
		if (preg_match('/^( +)\S/m', $yaml, $matches)) {
			self::$indent_size = strlen($matches[1]);
		}

		// create an empty indent for later
		self::$empty_indent = str_repeat(' ', self::$indent_size);
	}

	/**
	 * Removes any full-line comments and document separators, standardize line-endings
	 *
	 * @param string  $yaml  YAML string to parse
	 * @return string
	 */
	private static function prepare($yaml)
	{
		$first_pass = '';

		// slightly faster than array_map
		$lines = explode(PHP_EOL, $yaml);
		foreach ($lines as $line) {
			$trimmed = ltrim($line);
			if (substr($line, 0, 1) !== '#' && strpos($trimmed, '---') !== 0) {
				$first_pass = $first_pass . "\n" . $line;
			}
		}

		return substr($first_pass, 1);
	}

	/**
	 * Breaks a raw YAML string into easier parse-able chunks that we're calling "structures"
	 *
	 * @param string  $yaml  YAML string to parse
	 * @return array
	 */
	private static function breakIntoStructures($yaml)
	{
		$lines  = explode("\n", $yaml);
		$parts  = array();
		$chunk  = null;

		foreach ($lines as $line) {
			if (isset($line[0]) && $line[0] !== ' ' && $line[0] !== "\n") {
				if ($chunk !== null) {
					$parts[] = rtrim($chunk);
				}

				$chunk = $line;
			} else {
				$chunk = $chunk . "\n" . $line;
			}
		}

		// add what we were last building
		$parts[] = rtrim($chunk);

		return $parts;
	}

	/**
	 * Converts and replaced strings with the original value
	 *
	 * @param string  $text  Text to consider for unreplacing
	 * @return string
	 */
	public static function unreplace($text)
	{
		// check that there's an unreplace-able string here
		if (!isset(self::$replacements[$text]) || strpos($text, '__r@-') === false) {
			return $text;
		}

		return self::$replacements[$text];
	}

	/**
	 * Converts multiple replaced strings with the original values
	 *
	 * @param string  $text  Text to consider for unreplacing
	 * @param bool  $include_type  Should we include the quotes with it?
	 * @return string
	 */
	private static function unreplaceAll($text, $include_type=false)
	{
		// check that there's an unreplace-able string here
		if (!is_string($text) || strpos($text, '__r@-') === false) {
			return $text;
		}

		// unreplace all
		return preg_replace_callback('/__r@-\d+__/', function($matches) use ($include_type) {
			if ($include_type) {
				// we want to add in the same quotes (single or double) that this originally came with
				return Dipper::$replacement_types[$matches[0]] . Dipper::unreplace($matches[0]) . Dipper::$replacement_types[$matches[0]];
			}

			return Dipper::unreplace($matches[0]);
		}, $text);
	}

	/**
	 * Removes one level of indent, according to the current indent size
	 *
	 * @param string  $value  Value to outdent
	 * @return string
	 */
	private static function outdent($value)
	{
		$lines  = explode("\n", $value);
		$out    = '';

		foreach ($lines as $line) {
			if (isset($line[0]) && $line[0] !== ' ' && $line[0] !== "\n") {
				// not something that can be outdent-ed
				return $value;
			}

			if (!isset($line[0])) {
				$out = $out . "\n" . self::$empty_indent;
			} elseif (substr($line, 0, self::$indent_size) === self::$empty_indent) {
				// remove one level of indenting
				$out = $out . "\n" . substr($line, self::$indent_size);
			} else {
				// remove all left-hand space
				$out = $out . ltrim($line, ' ');
			}
		}

		return ltrim($out);
	}
}


text:
class DealsController < ApplicationController
  before_action :require_vendor_login, except: [:index, :show]

  def index
    @deals = Deal.where("end_time > ? AND item_quantity > ?", Time.now, 0).order(created_at: :desc)
    @user = User.new
    @vendor = Vendor.new
  end

  def new
    @deal = Deal.new
  end

  def create
    @deal = Deal.new(deal_params)
    @deal.update_attributes(vendor_id: current_vendor.id, end_time: deal_time)
    @vendor = current_vendor
    if @deal.save
      @vendor.send_sms(@deal)
      UserMailer.email_followers(@deal).deliver_now
      redirect_to current_vendor
    else
      flash[:notice] = "all fields are required."
      redirect_to new_deal_path
    end
  end

  def edit
    @deal = Deal.find(params[:id])
  end

  def update
    deal = Deal.find(params[:id])
    deal.update_attributes(deal_params)
    deal.update_attributes(end_time: deal_time)
    redirect_to current_vendor
  end

  def show
    @deal = Deal.find(params[:id])
    @user = User.new
    @vendor = Vendor.new
  end

  def destroy
    deal = Deal.find(params[:id])
    deal.destroy
    redirect_to current_vendor
  end

  private

    def deal_params
      params.require(:deal).permit(:title, :description, :item_quantity, :item_price)
    end

    def deal_time
      Time.local(params[:deal]["end_time(1i)"].to_i, params[:deal]["end_time(2i)"].to_i, params[:deal]["end_time(3i)"].to_i, params[:deal]["end_time(4i)"].to_i, params[:deal]["end_time(5i)"].to_i)
    end

    def current_vendor
      return Vendor.find(session[:vendor_id])
    end

end


text:
<?php include($_SERVER['DOCUMENT_ROOT'].$T['webroot'].'/templates/header.tpl.php'); ?>

<a href="<?php echo $T['webroot']?>/admin" style="text-decoration:none;">Over-Engineered Unbiased Lunch Selector

  <a href="<?php echo $T['webroot'];?>/pick-random-location">Pick Random Location |
  Refresh

<?php foreach($T['messages'] as $m){ ?>

<?php echo $m;?>

<?php } ?>

Please make TWO suggestions. They can both be the same if you really want to go there.

Add Suggestion

 <a href="<?php echo $T['webroot'];?>/add/lunch-location">Add Location

<form action="" method="post">

  Name

<select name="lunch_suggestion_name">
 <option value="">--Select Name--</option>
<?php foreach($T['people'] as $i){ ?>
 <option value="<?php echo $i;?>"><?php echo $i;?></option>
<?php } ?>
</select>

  Suggestion

<select name="lunch_suggestion_location">
 <option value="">--Select Location--</option>
 <option value="Can't Go">Can't Go</option>
<?php foreach($T['lunch_locations'] as $i){ ?>
 <option value="<?php echo $i['lunch_location_name'];?>"><?php echo $i['lunch_location_name'];?></option>
<?php } ?>
</select>

 <input type="submit" value="Submit"/>

</form>

Suggestions

 Show Suggestions

<?php foreach($T['lunch_suggestions'] as $i){ ?>
 <?php $this_md5 = htmlspecialchars_decode($i['lunch_suggestion_location'],ENT_QUOTES);?>
 <?php #$this_md5 = md5($this_md5);?>
 <?php echo $i['lunch_suggestion_name'];?> => <?php echo $i['lunch_suggestion_location'];?><?php if($T['lunch_suggestions_count'][$this_md5]['percentage']){ ?>:<?php echo number_format((float)$T['lunch_suggestions_count'][$this_md5]['percentage'], 2, '.', '');?>% <?php } ?>: <?php if($_SERVER['REMOTE_ADDR'] == $i['lunch_suggestion_ip_address']){?><a href="<?php echo $T['webroot'];?>/delete/lunch-suggestion/<?php echo $i['lunch_suggestion_id'];?>">[delete]<?php }?>

<?php } ?>

People Percentages

<?php foreach($T['people_percentage'] as $k => $v){?>
 <?php echo $k.' => '.$v.'%';?>

<?php } ?>

Potential Winner

Below, you will see the Winner Generator. This tool will randomly select a name out of the hat every minute. The final winner will be decided when the randomizer stops (<?php echo date('l, F j, Y g:ia',strtotime($T['stop_time']));?>). Good Luck!

Winner Generator

Server Time: <?php echo $T['current_time'];?>

<?php if($T['current_time'] < $T['stop_time']){ ?>
Potential winner: <?php echo $T['potential_winner'];?>

<?php }else{ ?>

Winner: <?php echo $T['potential_winner'];?>

<?php } ?>

Tip: Hitting F5 on your browser will refresh the page so you can see the Winner Generator randomly picking potential winners.

Lunch Winners

<?php foreach($T['lunch_winners'] as $i){ ?>
 <a href="<?php echo $T['webroot'];?>/edit/lunch-winner/<?php echo $i['lunch_winner_id'];?>"><?php echo date('Y-m-d', strtotime($i['lunch_winner_created']));?> => <?php echo $i['lunch_winner_location'];?>

<?php } ?>

<?php include($_SERVER['DOCUMENT_ROOT'].$T['webroot'].'/templates/footer.tpl.php'); ?>


text:
/*global beforeEach, afterEach, describe, it, Stem, $ */

describe('TagSetAsInlineCheckboxGroup View', function () {
    'use strict';

    beforeEach(function () {
        this.$Scaffolding = $('<div>').addClass('scaffolding').css({'left':'-9999px','position': 'absolute'}).appendTo($('body'));
        this.Tags = new Stem.Collections.Tags([
            new Stem.Models.Tag({label: 'subject 1'}),
            new Stem.Models.Tag({label: 'subject 2'})
        ]);
        this.TagSet = new Stem.Models.TagSet({
            tags: this.Tags,
            title: 'title'
        });
        this.TagSetAsInlineCheckboxGroup = new Stem.Views.TagSetAsInlineCheckboxGroup({
            model: this.TagSet,
            el: this.$Scaffolding
        });
    });

    afterEach(function() {
        this.TagSetAsInlineCheckboxGroup.remove();
        this.$Scaffolding.remove();
    });

    it('render method should return the view (for chaining)', function() {
        this.TagSetAsInlineCheckboxGroup.render().should.equal(this.TagSetAsInlineCheckboxGroup);
    });

    it('should enclose the subjects in a form', function() {
        var $el = this.TagSetAsInlineCheckboxGroup.render().$el;
        $el.find('form').length.should.equal(1);
    });

    it('should add a label for the fieldset', function() {
        var $el = this.TagSetAsInlineCheckboxGroup.render().$el;
        $el.find('fieldset > label').first().text().should.equal('title:');
    });

    it('should enclose the model views in the fieldset', function() {
        var $el = this.TagSetAsInlineCheckboxGroup.render().$el;
        $el.find('fieldset label').length.should.equal(3);
    });

});


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Electron + AngularJs</title>

Hello World

     on


text:
package edu.wustl.bulkoperator.appservice;

import java.lang.reflect.Constructor;
import java.util.Map;

import edu.wustl.bulkoperator.util.BulkOperationConstants;
import edu.wustl.bulkoperator.util.BulkOperationException;
import edu.wustl.common.exception.ErrorKey;

public abstract class AbstractBulkOperationAppService
{
	public AbstractBulkOperationAppService(boolean isAuthenticationRequired,
			String userName, String password) throws Exception
	{
		isAuthRequired = isAuthenticationRequired;
		initialize(userName, password);
	}

	protected transient boolean isAuthRequired = true;

	public boolean isAuthenticationRequired()
	{
		return isAuthRequired;
	}

	public static AbstractBulkOperationAppService getInstance(String migrationAppClassName,
	boolean isAuthenticationRequired, String userName, String password) throws BulkOperationException
	{
		if (migrationAppClassName == null)
		{
			migrationAppClassName = BulkOperationConstants.CA_CORE_MIGRATION_APP_SERVICE;
		}
		AbstractBulkOperationAppService appService = null;
		try
		{
			Class migrationServiceTypeClass = Class.forName(migrationAppClassName);
			Class[] constructorParameters = new Class[3];
			constructorParameters[0] = boolean.class;
			constructorParameters[1] = String.class;
			constructorParameters[2] = String.class;
			Constructor constructor = migrationServiceTypeClass
					.getDeclaredConstructor(constructorParameters);
			appService = (AbstractBulkOperationAppService) constructor.newInstance(
					isAuthenticationRequired, userName, password);
		}
		catch (Exception exp)
		{
			ErrorKey errorKey = ErrorKey.getErrorKey("bulk.invalid.username.password");
			throw new BulkOperationException(errorKey, exp, "");
		}
		return appService;
	}

	abstract public void initialize(String userName, String password) throws Exception;

	abstract public void authenticate(String userName, String password) throws BulkOperationException;

	public Object insert(Object obj) throws Exception
	{
		return insertObject(obj);
	}

	public abstract Long insertDEObject(String entityGroupName,String entityName,final Map<String, Object> dataValue) throws Exception;

	public Object search(Object obj) throws Exception
	{
		return searchObject(obj);
	}

	public Object update(Object obj) throws Exception
	{
		return updateObject(obj);
	}

	public Long hookStaticDEObject(Object hookingInformationObject) throws Exception
	{
		return hookStaticDynExtObject(hookingInformationObject);
	}

	abstract protected Object insertObject(Object obj) throws Exception;

	abstract public void deleteObject(Object obj) throws Exception;

	abstract protected Object updateObject(Object obj) throws Exception;

	abstract protected Object searchObject(Object obj) throws Exception;

	abstract protected Long hookStaticDynExtObject(Object hookingInformationObject) throws Exception;

	abstract public Long insertData(final String categoryName,final Map<String, Object> dataValue)
			throws Exception;
}


text:
FactoryGirl.define do
  factory :partition do
    association :user, factory: :confirmed_user
    sequence(:name) { |n| "Account #{n}" }

    factory :account do
      category "account"
    end

    factory :savings do
      category "savings"
    end

    factory :debt do
      category "debt"
    end
  end
end


text:
//
//  ViewController.m
//  LFLRandomCodeView
//
//  Created by vintop_xiaowei on 2016/11/10.
//  Copyright © 2016年 vintop_DragonLi. All rights reserved.
//

/**
                     绘制图片随机验证码
                     https://github.com/LFL2018
 */
#import "ViewController.h"
#import "LFLRandomCodeView.h"

@interface ViewController ()
{
    LFLRandomCodeView *_randomCodeView;
    UITextField       *_textField;
}
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"绘制图片随机验证码Demo";
    [self LayoutSubviews];
}
- (void)LayoutSubviews{
    CGFloat begainX = 100;
    _randomCodeView = [[LFLRandomCodeView alloc] initWithFrame:CGRectMake(begainX, 100, 100, 40)];
    _textField = [[UITextField alloc]init];
    _textField.frame = CGRectMake(begainX, 200, 120, 30);
    _textField.placeholder = @"输入验证码";

    UIButton *makeSureButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [makeSureButton setTitle:@"验证" forState:UIControlStateNormal];
    makeSureButton.frame = CGRectMake(begainX, 300, 100, 40);
    makeSureButton.backgroundColor = [UIColor redColor];
    [makeSureButton addTarget:self action:@selector(makeSureHandele) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:_randomCodeView];
    [self.view addSubview:_textField];
    [self.view addSubview:makeSureButton];
}
#pragma mark =========================handele method
/**
 用户点击确认是否输入正确 block 回调结果,处理即可
 */
- (void)makeSureHandele{
    __weak typeof(self) ws=self;
    [_randomCodeView isInputCorrectWithString:_textField.text :^(NSString *statusSTring) {
        UIAlertView * alertView= [[UIAlertView alloc]initWithTitle:nil message:statusSTring delegate:ws cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
        [alertView show];
    }];
}
@end


text:
const inherits = require('inherits');
const ColumnCompiler = require('../../../schema/columncompiler');
const isObject = require('lodash/isObject');

function ColumnCompiler_PG() {
  ColumnCompiler.apply(this, arguments);
  this.modifiers = ['nullable', 'defaultTo', 'comment'];
}
inherits(ColumnCompiler_PG, ColumnCompiler);

Object.assign(ColumnCompiler_PG.prototype, {
  // Types
  // ------
  bigincrements: 'bigserial primary key',
  bigint: 'bigint',
  binary: 'bytea',

  bit(column) {
    return column.length !== false ? `bit(${column.length})` : 'bit';
  },

  bool: 'boolean',

  // Create the column definition for an enum type.
  // Using method "2" here: http://stackoverflow.com/a/10984951/525714
  enu(allowed, options) {
    options = options || {};

    const values =
      options.useNative && options.existingType
        ? undefined
        : allowed.join("', '");

    if (options.useNative) {
      let enumName = '';
      const schemaName = options.schemaName || this.tableCompiler.schemaNameRaw;

      if (schemaName) {
        enumName += `"${schemaName}".`;
      }

      enumName += `"${options.enumName}"`;

      if (!options.existingType) {
        this.tableCompiler.unshiftQuery(
          `create type ${enumName} as enum ('${values}')`
        );
      }

      return enumName;
    }
    return `text check (${this.formatter.wrap(this.args[0])} in ('${values}'))`;
  },

  double: 'double precision',
  decimal(precision, scale) {
    if (precision === null) return 'decimal';
    return `decimal(${this._num(precision, 8)}, ${this._num(scale, 2)})`;
  },
  floating: 'real',
  increments: 'serial primary key',
  json(jsonb) {
    if (jsonb) this.client.logger.deprecate('json(true)', 'jsonb()');
    return jsonColumn(this.client, jsonb);
  },
  jsonb() {
    return jsonColumn(this.client, true);
  },
  smallint: 'smallint',
  tinyint: 'smallint',
  datetime(withoutTz = false, precision) {
    let useTz;
    if (isObject(withoutTz)) {
      ({ useTz, precision } = withoutTz);
    } else {
      useTz = !withoutTz;
    }

    return `${useTz ? 'timestamptz' : 'timestamp'}${
      precision ? '(' + precision + ')' : ''
    }`;
  },
  timestamp(withoutTz = false, precision) {
    let useTz;
    if (isObject(withoutTz)) {
      ({ useTz, precision } = withoutTz);
    } else {
      useTz = !withoutTz;
    }

    return `${useTz ? 'timestamptz' : 'timestamp'}${
      precision ? '(' + precision + ')' : ''
    }`;
  },
  uuid: 'uuid',

  // Modifiers:
  // ------
  comment(comment) {
    const columnName = this.args[0] || this.defaults('columnName');

    this.pushAdditional(function () {
      this.pushQuery(
        `comment on column ${this.tableCompiler.tableName()}.` +
          this.formatter.wrap(columnName) +
          ' is ' +
          (comment ? `'${comment}'` : 'NULL')
      );
    }, comment);
  },
});

function jsonColumn(client, jsonb) {
  if (!client.version || parseFloat(client.version) >= 9.2)
    return jsonb ? 'jsonb' : 'json';
  return 'text';
}

module.exports = ColumnCompiler_PG;


text:
namespace arangodb {
namespace velocypack {
class Slice;
}
namespace aql {
class ExecutionBlock;
class ExecutionPlan;
struct Aggregator;

/// @brief class CollectNode
class CollectNode : public ExecutionNode {
  friend class ExecutionNode;
  friend class ExecutionBlock;

 public:
  CollectNode(
      ExecutionPlan* plan, ExecutionNodeId id, CollectOptions const& options,
      std::vector<GroupVarInfo> const& groupVariables,
      std::vector<AggregateVarInfo> const& aggregateVariables,
      Variable const* expressionVariable, Variable const* outVariable,
      std::vector<Variable const*> const& keepVariables,
      std::unordered_map<VariableId, std::string const> const& variableMap,
      bool isDistinctCommand);

  CollectNode(
      ExecutionPlan*, arangodb::velocypack::Slice const& base,
      Variable const* expressionVariable, Variable const* outVariable,
      std::vector<Variable const*> const& keepVariables,
      std::unordered_map<VariableId, std::string const> const& variableMap,
      std::vector<GroupVarInfo> const& collectVariables,
      std::vector<AggregateVarInfo> const& aggregateVariables,
      bool isDistinctCommand);

  ~CollectNode() override;

  /// @brief return the type of the node
  NodeType getType() const override final;

  /// @brief whether or not the node requires an additional post SORT
  bool isDistinctCommand() const;

  /// @brief whether or not the node is specialized
  bool isSpecialized() const;

  /// @brief specialize the node
  void specialized();

  /// @brief return the aggregation method
  CollectOptions::CollectMethod aggregationMethod() const;

  /// @brief set the aggregation method
  void aggregationMethod(CollectOptions::CollectMethod method);

  /// @brief getOptions
  CollectOptions& getOptions();

  /// @brief calculate the expression register
  void calcExpressionRegister(RegisterId& expressionRegister,
                              RegIdSet& writeableOutputRegisters) const;

  /// @brief calculate the collect register
  void calcCollectRegister(RegisterId& collectRegister,
                           RegIdSet& writeableOutputRegisters) const;

  /// @brief calculate the group registers
  void calcGroupRegisters(
      std::vector<std::pair<RegisterId, RegisterId>>& groupRegisters,
      RegIdSet& readableInputRegisters,
      RegIdSet& writeableOutputRegisters) const;

  /// @brief calculate the aggregate registers
  void calcAggregateRegisters(
      std::vector<std::pair<RegisterId, RegisterId>>& aggregateRegisters,
      RegIdSet& readableInputRegisters,
      RegIdSet& writeableOutputRegisters) const;

  void calcAggregateTypes(
      std::vector<std::unique_ptr<Aggregator>>& aggregateTypes) const;

  std::vector<std::pair<std::string, RegisterId>> calcInputVariableNames()
      const;

  /// @brief creates corresponding ExecutionBlock
  std::unique_ptr<ExecutionBlock> createBlock(
      ExecutionEngine& engine,
      std::unordered_map<ExecutionNode*, ExecutionBlock*> const&)
      const override;

  /// @brief clone ExecutionNode recursively
  ExecutionNode* clone(ExecutionPlan* plan, bool withDependencies,
                       bool withProperties) const override final;

  /// @brief estimateCost
  CostEstimate estimateCost() const override final;

  /// @brief whether or not the node has an outVariable (i.e. INTO ...)
  bool hasOutVariable() const;

  /// @brief return the out variable
  Variable const* outVariable() const;

  /// @brief clear the out variable
  void clearOutVariable();

  /// @brief clear all keep variables
  void clearKeepVariables();

  void setAggregateVariables(
      std::vector<AggregateVarInfo>&& aggregateVariables);

  /// @brief clear one of the aggregates
  void clearAggregates(std::function<bool(AggregateVarInfo const&)> cb);

  /// @brief whether or not the node has an expression variable (i.e. INTO ...
  /// = expr)
  bool hasExpressionVariable() const;

  /// @brief set the expression variable
  void expressionVariable(Variable const* variable);

  /// @brief return whether or not the collect has keep variables
  bool hasKeepVariables() const;

  /// @brief return the keep variables
  std::vector<Variable const*> const& keepVariables() const;

  /// @brief restrict the KEEP variables (which may also be the auto-collected
  /// variables of an unrestricted `INTO var`) to the passed `variables`.
  void restrictKeepVariables(
      containers::HashSet<Variable const*> const& variables);

  /// @brief return the variable map
  std::unordered_map<VariableId, std::string const> const& variableMap() const;

  /// @brief get all group variables (out, in)
  std::vector<GroupVarInfo> const& groupVariables() const;

  /// @brief set all group variables (out, in)
  void groupVariables(std::vector<GroupVarInfo> const& vars);

  /// @brief get all aggregate variables (out, in)
  std::vector<AggregateVarInfo> const& aggregateVariables() const;

  /// @brief get all aggregate variables (out, in)
  std::vector<AggregateVarInfo>& aggregateVariables();

  void replaceVariables(std::unordered_map<VariableId, Variable const*> const&
                            replacements) override;

  /// @brief getVariablesUsedHere, modifying the set in-place
  void getVariablesUsedHere(VarSet& vars) const override final;

  /// @brief getVariablesSetHere
  std::vector<Variable const*> getVariablesSetHere() const override final;

  static void calculateAccessibleUserVariables(
      ExecutionNode const& node, std::vector<Variable const*>& userVariables);

 protected:
  /// @brief export to VelocyPack
  void doToVelocyPack(arangodb::velocypack::Builder&,
                      unsigned flags) const override final;

 private:
  /// @brief options for the aggregation
  CollectOptions _options;

  /// @brief input/output variables for the collection (out, in)
  std::vector<GroupVarInfo> _groupVariables;

  /// @brief input/output variables for the aggregation (out, in)
  std::vector<AggregateVarInfo> _aggregateVariables;

  /// @brief input expression variable (might be null)
  Variable const* _expressionVariable;

  /// @brief output variable to write to (might be null)
  Variable const* _outVariable;

  /// @brief list of variables to keep if INTO is used
  std::vector<Variable const*> _keepVariables;

  /// @brief map of all variable ids and names (needed to construct group data)
  std::unordered_map<VariableId, std::string const> _variableMap;

  /// @brief whether or not the node requires an additional post-SORT
  bool const _isDistinctCommand;

  /// @brief whether or not the node is specialized
  bool _specialized;
};

}  // namespace aql
}  // namespace arangodb


text:
import React from 'react'
import injectSheet from 'react-jss'

import LogoutButton from './authentication/logout-button'
import GetResourceToVerifyButton from './components/get-resource-to-verify-button'

const LeftSideNav = ({ classes, changeFieldValue }) => {
	return (

Information Database

					<GetResourceToVerifyButton changeFieldValue={changeFieldValue} />

				<LogoutButton />

	)
}

const styles = {
	leftSideNav: {
		height: '1023.52px',
		display: 'flex',
		'flex-direction': 'column',
	},
	header: {
		height: '244.52px',
		'background-color': '#000000',
		'box-shadow': '0 3px 6px 0 rgba(0,0,0,0.5)',
	},
	informationDatabase: {
		color: '#FFFFFF',
		'background-color': 'black',
		'font-size': '42px',
		'font-weight': 'bold',
		'font-family': 'sans-serif',
		'letter-spacing': '1.57px',
		'line-height': '47px',
		'padding-top': '109px',
		'padding-left': '35.1px',
	},
	profile: {
		height: '698px',
		'background-color': '#FFFFFF',
		'box-shadow': '0 3px 6px 0 rgba(0,0,0,0.5)',
	},
	getResourceToVerifyButton: {
		'padding-top': '533.68px',
		'padding-left': '30px',
	},
	footer: {
		height: '81.45px',
		'background-color': '#000000',
		'box-shadow': '0 3px 6px 0 rgba(0,0,0,0.5)',
	},
}

export default injectSheet(styles)(LeftSideNav)


text:
/* global process */

const gulp = require('gulp')
const $ = require('gulp-load-plugins')()
const webpack = require('webpack')
const WebpackStream = require('webpack-stream')
const BrowserSync = require('browser-sync')
const ftp = require('vinyl-ftp')
const runSequence = require('run-sequence')
const browserSync = BrowserSync.create()

import ftpConfig from './ftp.config.js'

let developmentMode = true
let isDeployRoot = process.argv[3] == '-r'

process.env.NODE_ENV = 'dev'

function requireUncached($module) {
	delete require.cache[require.resolve($module)]
	return require($module)
}

//==================================================
gulp.task('webpack', () => {
	let config = require('./webpack.config.js')

	// modify conig
	if (developmentMode) {
		config.devtool = 'inline-source-map'
		config.watch = true
	} else {
		config.plugins.push(
			new webpack.optimize.UglifyJsPlugin(),
			new webpack.optimize.DedupePlugin()
		)
	}

	return gulp.src('')
		.pipe($.plumber())
		.pipe(WebpackStream(config))
		.pipe(gulp.dest('public/js'))
    .pipe(browserSync.stream())
})

//==================================================

gulp.task('jade', () => {
	return gulp.src('./src/*.jade')
		.pipe($.plumber())
		.pipe($.data(() => {
			return requireUncached('./src/jade/data.json')
		}))
		.pipe($.jade({pretty: developmentMode}))
		.pipe(gulp.dest('public'))
		.pipe(browserSync.stream())
})

//==================================================
gulp.task('stylus', () => {
	return gulp.src('./src/stylus/*.styl')
		.pipe($.plumber())
		.pipe($.stylus({use: [require('nib')()]}))
		.pipe($.autoprefixer())
		.pipe($.if(!developmentMode, $.combineMq()))
		.pipe($.if(!developmentMode, $.minifyCss()))
		.pipe(gulp.dest('public/css'))
		.pipe(browserSync.stream())
})

//==================================================
gulp.task('browser-sync', () => {
	browserSync.init({
		server: {
			baseDir: './public'
		},
		open: false
	})
})

//==================================================
gulp.task('watch', () => {
	gulp.watch('./src/**/*.styl', ['stylus'])
	gulp.watch(['./src/*.jade', './src/jade/*'], ['jade'])
})

//==================================================
gulp.task('release', () => {
	developmentMode = false
	process.env.NODE_ENV = 'production'
})

//==================================================
gulp.task('deploy', () => {

	if (isDeployRoot) {
		$.util.log('Upload to root directory')
	}

	let conn = ftp.create(ftpConfig)

	let globs = ['./public/**']
	let remotePath = isDeployRoot ? '/ins-stud.io/public_html' : '/ins-stud.io/public_html/studio'

	return gulp.src(globs, {base: './public', buffer: false})
		.pipe( conn.newer(remotePath) )
		.pipe( conn.dest(remotePath) )
})

//==================================================

gulp.task('default', ['webpack', 'jade', 'stylus', 'watch', 'browser-sync'])
gulp.task('build', () => {
	runSequence(
		'release',
		['jade', 'stylus', 'webpack'],
		'deploy'
	)
})


text:
package build.cross.services.types;

import java.util.List;

public class Axis {

	private String name;

	private List<String> value;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<String> getValue() {
		return value;
	}

	public void setValue(List<String> value) {
		this.value = value;
	}

}


text:
<?php

namespace AppBundle\Form;

use AppBundle\Entity\Event;
use AppBundle\Entity\Schedule;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class ScheduleType extends AbstractType
{
    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            // Title & description
            ->add('title', null, ['label' => 'label.title'])
            ->add('description', TextareaType::class, ['label' => 'label.description'])
            // Start date
            ->add('startDate', DateType::class, [
                'label' => 'label.start_date',
                'widget' => 'single_text',
            ])
            // End date
            ->add('endDate', DateType::class, [
                'label' => 'label.end_date',
                'widget' => 'single_text',
            ])
            ->add('events', EntityType::class, [
                'label' => 'Events',
                'choice_label' => 'getTitle',
                'attr' => ['class' => 'select2_multiple'],
                'class' => Event::class,
                'multiple' => true,
            ]);
    }

    /**
     * {@inheritdoc}
     */
    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'data_class' => Schedule::class,
        ]);
    }

    /**
     * {@inheritdoc}
     */
    public function getBlockPrefix()
    {
        return 'appbundle_schedule';
    }
}


text:
<?php

/**
 * This is the model class for table "good".
 *
 * The followings are the available columns in table 'good':
 * @property string $id
 * @property string $category_id
 * @property string $name
 * @property double $price
 * @property string $article
 * @property string $image
 * @property string $short_description
 * @property string $description
 * @property string $alias
 * @property string $data
 * @property integer $status
 * @property string $create_time
 * @property string $update_time
 * @property string $user_id
 * @property string $change_user_id
 *
 * The followings are the available model relations:
 * @property User $changeUser
 * @property Category $category
 * @property User $user
 */
class Good extends YModel
{
    const SPECIAL_NOT_ACTIVE = 0;
    const SPECIAL_ACTIVE     = 1;

    const STATUS_ZERO       = 0;
    const STATUS_ACTIVE     = 1;
    const STATUS_NOT_ACTIVE = 2;

    /**
     * Returns the static model of the specified AR class.
     * @param string $className active record class name.
     * @return Good the static model class
     */
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

    /**
     * @return string the associated database table name
     */
    public function tableName()
    {
        return '{{catalog_good}}';
    }

    /**
     * @return array validation rules for model attributes.
     */
    public function rules()
    {
        return array(
            array('category_id, name, description, alias', 'required', 'except' => 'search'),
            array('name, description, short_description, image, alias, price, article, data, status, is_special', 'filter', 'filter' => 'trim'),
            array('name, alias, price, article, data, status, is_special', 'filter', 'filter' => array($obj = new CHtmlPurifier(), 'purify')),
            array('status, category_id, is_special, user_id', 'numerical', 'integerOnly' => true),
            array('status, category_id, is_special, user_id', 'length', 'max' => 11),
            array('price', 'numerical'),
            array('name, image', 'length', 'max' => 250),
            array('article', 'length', 'max' => 100),
            array('alias', 'length', 'max' => 150),
            array('status','in','range' => array_keys($this->statusList)),
            array('is_special','in','range' => array(0, 1)),
            array('alias', 'YSLugValidator', 'message' => Yii::t('CatalogModule.catalog', 'Illegal characters in {attribute}')),
            array('alias', 'unique'),
            array('id, category_id, name, price, article, short_description, description, alias, data, status, create_time, update_time, user_id, change_user_id, is_special', 'safe', 'on' => 'search'),
        );
    }

    /**
     * @return array relational rules.
     */
    public function relations()
    {
        // NOTE: you may need to adjust the relation name and the related
        // class name for the relations automatically generated below.
        return array(
            'changeUser' => array(self::BELONGS_TO, 'User', 'change_user_id'),
            'category'   => array(self::BELONGS_TO, 'Category', 'category_id'),
            'user'       => array(self::BELONGS_TO, 'User', 'user_id'),
        );
    }

    public function scopes()
    {
        return array(
            'published' => array(
                'condition' => 'status = :status',
                'params'    => array(':status' => self::STATUS_ACTIVE),
            ),
        );
    }

    /**
     * @return array customized attribute labels (name=>label)
     */
    public function attributeLabels()
    {
        return array(
            'id'                => Yii::t('CatalogModule.catalog', 'ID'),
            'category_id'       => Yii::t('CatalogModule.catalog', 'Category'),
            'name'              => Yii::t('CatalogModule.catalog', 'Title'),
            'price'             => Yii::t('CatalogModule.catalog', 'Price'),
            'article'           => Yii::t('CatalogModule.catalog', 'Article'),
            'image'             => Yii::t('CatalogModule.catalog', 'Image'),
            'short_description' => Yii::t('CatalogModule.catalog', 'Short description'),
            'description'       => Yii::t('CatalogModule.catalog', 'Description'),
            'alias'             => Yii::t('CatalogModule.catalog', 'Alias'),
            'data'              => Yii::t('CatalogModule.catalog', 'Data'),
            'status'            => Yii::t('CatalogModule.catalog', 'Status'),
            'create_time'       => Yii::t('CatalogModule.catalog', 'Added'),
            'update_time'       => Yii::t('CatalogModule.catalog', 'Updated'),
            'user_id'           => Yii::t('CatalogModule.catalog', 'User'),
            'change_user_id'    => Yii::t('CatalogModule.catalog', 'Editor'),
            'is_special'        => Yii::t('CatalogModule.catalog', 'Special'),
        );
    }

    /**
     * @return array customized attribute descriptions (name=>description)
     */
    public function attributeDescriptions()
    {
        return array(
            'id'                => Yii::t('CatalogModule.catalog', 'ID'),
            'category_id'       => Yii::t('CatalogModule.catalog', 'Category'),
            'name'              => Yii::t('CatalogModule.catalog', 'Title'),
            'price'             => Yii::t('CatalogModule.catalog', 'Price'),
            'article'           => Yii::t('CatalogModule.catalog', 'Article'),
            'image'             => Yii::t('CatalogModule.catalog', 'Image'),
            'short_description' => Yii::t('CatalogModule.catalog', 'Short description'),
            'description'       => Yii::t('CatalogModule.catalog', 'Description'),
            'alias'             => Yii::t('CatalogModule.catalog', 'Alias'),
            'data'              => Yii::t('CatalogModule.catalog', 'Data'),
            'status'            => Yii::t('CatalogModule.catalog', 'Status'),
            'create_time'       => Yii::t('CatalogModule.catalog', 'Added'),
            'update_time'       => Yii::t('CatalogModule.catalog', 'Edited'),
            'user_id'           => Yii::t('CatalogModule.catalog', 'User'),
            'change_user_id'    => Yii::t('CatalogModule.catalog', 'Editor'),
            'is_special'        => Yii::t('CatalogModule.catalog', 'Special'),
        );
    }

    /**
     * Retrieves a list of models based on the current search/filter conditions.
     * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
     */
    public function search()
    {
        // Warning: Please modify the following code to remove attributes that
        // should not be searched.

        $criteria = new CDbCriteria;

        $criteria->compare('id', $this->id, true);
        $criteria->compare('category_id', $this->category_id, true);
        $criteria->compare('name', $this->name, true);
        $criteria->compare('price', $this->price);
        $criteria->compare('article', $this->article, true);
        $criteria->compare('image', $this->image, true);
        $criteria->compare('short_description', $this->short_description, true);
        $criteria->compare('description', $this->description, true);
        $criteria->compare('alias', $this->alias, true);
        $criteria->compare('data', $this->data, true);
        $criteria->compare('is_special', $this->is_special, true);
        $criteria->compare('status', $this->status);
        $criteria->compare('create_time', $this->create_time, true);
        $criteria->compare('update_time', $this->update_time, true);
        $criteria->compare('user_id', $this->user_id,true);
        $criteria->compare('change_user_id', $this->change_user_id, true);

        return new CActiveDataProvider(get_class($this), array('criteria' => $criteria));
    }

    public function behaviors()
    {

        $module = Yii::app()->getModule('catalog');
        return array(
            'CTimestampBehavior' => array(
                'class'             => 'zii.behaviors.CTimestampBehavior',
                'setUpdateOnCreate' => true,
                'createAttribute'   => 'create_time',
                'updateAttribute'   => 'update_time',
            ),
            'imageUpload' => array(
                'class'         =>'application.modules.yupe.components.behaviors.ImageUploadBehavior',
                'scenarios'     => array('insert','update'),
                'attributeName' => 'image',
                'minSize'       => $module->minSize,
                'maxSize'       => $module->maxSize,
                'types'         => $module->allowedExtensions,
                'uploadPath'    => $module->getUploadPath(),
                'resize' => array(
                    'quality' => 70,
                    'width' => 1024,
                )
            ),
        );
    }

    public function beforeValidate()
    {
        $this->change_user_id = Yii::app()->user->getId();

        if ($this->isNewRecord)
            $this->user_id = $this->change_user_id;

        if (!$this->alias)
            $this->alias = YText::translit($this->name);

        return parent::beforeValidate();
    }

    public function getPermaLink()
    {
        return Yii::app()->createAbsoluteUrl('/catalog/catalog/show/', array( 'name' => $this->alias ));
    }

    public function getStatusList()
    {
        return array(
            self::STATUS_ZERO       => Yii::t('CatalogModule.catalog', 'Not available'),
            self::STATUS_ACTIVE     => Yii::t('CatalogModule.catalog', 'Active'),
            self::STATUS_NOT_ACTIVE => Yii::t('CatalogModule.catalog', 'Not active'),
        );
    }

    public function getStatus()
    {
        $data = $this->statusList;
        return isset($data[$this->status]) ? $data[$this->status] : Yii::t('CatalogModule.catalog', '*unknown*');
    }

    public function getSpecialList()
    {
        return array(
            self::SPECIAL_NOT_ACTIVE => Yii::t('CatalogModule.catalog', 'No'),
            self::STATUS_ACTIVE      => Yii::t('CatalogModule.catalog', 'Yes'),
        );
    }

    public function getSpecial()
    {
        $data = $this->specialList;
        return isset($data[$this->is_special]) ? $data[$this->is_special] : Yii::t('CatalogModule.catalog', '*unknown*');
    }

    public function getImageUrl()
    {
        return ($this->image)
            ? Yii::app()->baseUrl . '/' .
              Yii::app()->getModule('yupe')->uploadPath . '/' .
              Yii::app()->getModule('catalog')->uploadPath . '/' .
              $this->image
            : false;
    }

    /**
     * category link
     *
     * @return string html caregory link
     **/
    public function getCategoryLink()
    {
        return $this->category instanceof Category
            ? CHtml::link($this->category->name, array("/category/default/view", "id" => $this->id))
            : '---';
    }
}


text:
package ch.qos.logback.core.util;

import java.lang.reflect.Constructor;
import java.util.Properties;

import ch.qos.logback.core.Context;
import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.spi.ContextAware;
import ch.qos.logback.core.spi.PropertyContainer;
import ch.qos.logback.core.spi.ScanException;
import ch.qos.logback.core.subst.NodeToStringTransformer;

/**
 * @author Ceki Gulcu
 */
public class OptionHelper {

    public static Object instantiateByClassName(String className, Class<?> superClass, Context context) throws IncompatibleClassException,
                    DynamicClassLoadingException {
        ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
        return instantiateByClassName(className, superClass, classLoader);
    }

    public static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, Context context, Class<?> type, Object param)
                    throws IncompatibleClassException, DynamicClassLoadingException {
        ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
        return instantiateByClassNameAndParameter(className, superClass, classLoader, type, param);
    }

    public static Object instantiateByClassName(String className, Class<?> superClass, ClassLoader classLoader) throws IncompatibleClassException,
                    DynamicClassLoadingException {
        return instantiateByClassNameAndParameter(className, superClass, classLoader, null, null);
    }

    public static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, ClassLoader classLoader, Class<?> type, Object parameter)
                    throws IncompatibleClassException, DynamicClassLoadingException {

        if (className == null) {
            throw new NullPointerException();
        }
        try {
            Class<?> classObj = null;
            classObj = classLoader.loadClass(className);
            if (!superClass.isAssignableFrom(classObj)) {
                throw new IncompatibleClassException(superClass, classObj);
            }
            if (type == null) {
                return classObj.newInstance();
            } else {
                Constructor<?> constructor = classObj.getConstructor(type);
                return constructor.newInstance(parameter);
            }
        } catch (IncompatibleClassException ice) {
            throw ice;
        } catch (Throwable t) {
            throw new DynamicClassLoadingException("Failed to instantiate type " + className, t);
        }
    }

    /**
     * Find the value corresponding to key in props.
     * Then perform variable substitution on the found value.
     */
    // public static String findAndSubst(String key, Properties props) {
    // String value = props.getProperty(key);
    //
    // if (value == null) {
    // return null;
    // }
    //
    // try {
    // return substVars(value, props);
    // } catch (IllegalArgumentException e) {
    // return value;
    // }
    // }
    final static String DELIM_START = "${";
    final static char DELIM_STOP = '}';
    final static String DELIM_DEFAULT = ":-";

    final static int DELIM_START_LEN = 2;
    final static int DELIM_STOP_LEN = 1;
    final static int DELIM_DEFAULT_LEN = 2;

    final static String _IS_UNDEFINED = "_IS_UNDEFINED";

    /**
     * @see #substVars(String, PropertyContainer, PropertyContainer)
     */
    public static String substVars(String val, PropertyContainer pc1) {
        return substVars(val, pc1, null);
    }

    /**
     * See  http://logback.qos.ch/manual/configuration.html#variableSubstitution
     */
    public static String substVars(String input, PropertyContainer pc0, PropertyContainer pc1) {
        try {
            return NodeToStringTransformer.substituteVariable(input, pc0, pc1);
        } catch (ScanException e) {
            throw new IllegalArgumentException("Failed to parse input [" + input + "]", e);
        }
    }

    public static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2) {
        String value = null;
        // first try the props passed as parameter
        value = pc1.getProperty(key);

        // then try the pc2
        if (value == null && pc2 != null) {
            value = pc2.getProperty(key);
        }
        // then try in System properties
        if (value == null) {
            value = getSystemProperty(key, null);
        }
        if (value == null) {
            value = getEnv(key);
        }
        return value;
    }

    /**
     * Very similar to System.getProperty except that the
     * {@link SecurityException} is absorbed.
     *
     * @param key The key to search for.
     * @param def The default value to return.
     * @return the string value of the system property, or the default value if
     *         there is no property with that key.
     */
    public static String getSystemProperty(String key, String def) {
        try {
            return System.getProperty(key, def);
        } catch (SecurityException e) {
            return def;
        }
    }

    /**
     * Lookup a key from the environment.
     *
     * @param key
     * @return value corresponding to key from the OS environment
     */
    public static String getEnv(String key) {
        try {
            return System.getenv(key);
        } catch (SecurityException e) {
            return null;
        }
    }

    /**
     * Very similar to System.getProperty except that the
     * {@link SecurityException} is absorbed.
     *
     * @param key The key to search for.
     * @return the string value of the system property.
     */
    public static String getSystemProperty(String key) {
        try {
            return System.getProperty(key);
        } catch (SecurityException e) {
            return null;
        }
    }

    public static void setSystemProperties(ContextAware contextAware, Properties props) {
        for (Object o : props.keySet()) {
            String key = (String) o;
            String value = props.getProperty(key);
            setSystemProperty(contextAware, key, value);
        }
    }

    public static void setSystemProperty(ContextAware contextAware, String key, String value) {
        try {
            System.setProperty(key, value);
        } catch (SecurityException e) {
            contextAware.addError("Failed to set system property [" + key + "]", e);
        }
    }

    /**
     * Very similar to {@link System#getProperties()} except that the
     * {@link SecurityException} is absorbed.
     *
     * @return the system properties
     */
    public static Properties getSystemProperties() {
        try {
            return System.getProperties();
        } catch (SecurityException e) {
            return new Properties();
        }
    }

    /**
     * Return a String[] of size two. The first item containing the key part and the second item
     * containing a default value specified by the user. The second item will be null if no default value
     * is specified.
     *
     * @param key
     * @return
     */
    static public String[] extractDefaultReplacement(String key) {
        String[] result = new String[2];
        if (key == null)
            return result;

        result[0] = key;
        int d = key.indexOf(DELIM_DEFAULT);
        if (d != -1) {
            result[0] = key.substring(0, d);
            result[1] = key.substring(d + DELIM_DEFAULT_LEN);
        }
        return result;
    }

    /**
     * If value is "true", then true is returned. If
     * value is "false", then true is returned.
     * Otherwise, default is returned.
     *

     *
 Case of value is unimportant.
     */
    public static boolean toBoolean(String value, boolean dEfault) {
        if (value == null) {
            return dEfault;
        }

        String trimmedVal = value.trim();

        if ("true".equalsIgnoreCase(trimmedVal)) {
            return true;
        }

        if ("false".equalsIgnoreCase(trimmedVal)) {
            return false;
        }

        return dEfault;
    }

    public static boolean isEmpty(String str) {
        return ((str == null) || CoreConstants.EMPTY_STRING.equals(str));
    }

}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<localizationPack name="Georgia" version="1.0">
	<currencies>
		<currency name="Lari" iso_code="GEL" iso_code_num="981" sign="ლ" blank="1" conversion_rate="2.46684" format="2" decimals="1" />
	</currencies>
	<languages>
		<language iso_code="ka" />
	</languages>
	<taxes>
		<tax id="1" name="დღგ GE 18%" rate="18" />

		<taxRulesGroup name="GE Standard Rate (18%)">
			<taxRule iso_code_country="ge" id_tax="1" />
		</taxRulesGroup>
	</taxes>
	<units>
		<unit type="weight" value="kg" />
		<unit type="volume" value="L" />
		<unit type="short_distance" value="cm" />
		<unit type="base_distance" value="m" />
		<unit type="long_distance" value="km" />
	</units>
</localizationPack>


text:
/* eslint-disable */

const cls = {
  main: 'ps',
  rtl: 'ps__rtl',
  element: {
    thumb: (x) => `ps__thumb-${x}`,
    rail: (x) => `ps__rail-${x}`,
    consuming: 'ps__child--consume',
  },
  state: {
    focus: 'ps--focus',
    clicking: 'ps--clicking',
    active: (x) => `ps--active-${x}`,
    scrolling: (x) => `ps--scrolling-${x}`,
  },
};

export default cls;

/*
 * Helper methods
 */
const scrollingClassTimeout = { x: null, y: null };

export function addScrollingClass(i, x) {
  const classList = i.element.classList;
  const className = cls.state.scrolling(x);

  if (classList.contains(className)) {
    clearTimeout(scrollingClassTimeout[x]);
  } else {
    classList.add(className);
  }
}

export function removeScrollingClass(i, x) {
  scrollingClassTimeout[x] = setTimeout(
    () => i.isAlive && i.element.classList.remove(cls.state.scrolling(x)),
    i.settings.scrollingThreshold
  );
}

export function setScrollingClassInstantly(i, x) {
  addScrollingClass(i, x);
  removeScrollingClass(i, x);
}


text:
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.ADF.BaseClasses;
using ESRI.ArcGIS.ADF.CATIDs;
using System.Runtime.InteropServices;

namespace ZoomFactorExtensionCSharp
{
	[ClassInterface(ClassInterfaceType.None)]
	[Guid("38ec31b1-a442-4231-b304-afe32f186fa2")]
	public sealed class ZoomOut: BaseCommand
	{
		//The HookHelper object that deals with the hook passed to the OnCreate event
		private IHookHelper m_HookHelper = new HookHelperClass();

		#region "Component Category Registration"
		[ComRegisterFunction()]
		static void Reg(string regKey)
		{
			ControlsCommands.Register(regKey);
		}

		[ComUnregisterFunction()]
		static void Unreg(string regKey)
		{
			ControlsCommands.Unregister(regKey);
		}
		#endregion

		public ZoomOut()
		{
			//Set the command properties
			base.m_caption = "Variable Zoom Out";
			base.m_message = "Variable Zoom Out";
			base.m_toolTip = "Variable Zoom Out";
			base.m_category = "ZoomExtension Sample(CSharp)";
			base.m_name = "ZoomExtension Sample(CSharp)_Variable Zoom Out";
			base.m_bitmap = new System.Drawing.Bitmap(GetType().Assembly.GetManifestResourceStream("Commands.zoomoutfxd.bmp"));
		}

		public override void OnCreate(object hook)
		{
			m_HookHelper.Hook = hook;
		}

		public override bool Enabled
		{
			get
			{
				//Get the extension manager
				IExtensionManager extensionManager = new ExtensionManagerClass();

				//Get the extension from the extension manager
				IExtension extension = extensionManager.FindExtension("Zoom Factor Extension");

				//Get the state of the extension
				IExtensionConfig extensionConfig = (IExtensionConfig) extension;
				if (extensionConfig != null)
				{
					if (extensionConfig.State == esriExtensionState.esriESEnabled) return true;
					else return false;
				}
				else
				{
					return false;
				}
			}
		}

		public override void OnClick()
		{
			//Get the current extent of the active view
			IActiveView activeView = m_HookHelper.ActiveView;
			IEnvelope envelope = activeView.Extent;

			//Get the extension manager
			ExtensionManager extensionManager = new ExtensionManagerClass();
			//Get the extension from the extension manager
			IExtension extension = extensionManager.FindExtension("Zoom Factor Extension");

			//Get the zoom factor from the extension
			double zoomFactor = 1.1;
			if (extension != null)
			{
				IZoomExtension zoomExtension = (IZoomExtension) extension;
				zoomFactor = zoomExtension.ZoomFactor;
			}
			else
			{
				System.Windows.Forms.MessageBox.Show("The extension cannot be found!");
			}

			//Update the current extent of the active view
			envelope.Expand(zoomFactor,zoomFactor,true);
			activeView.Extent = envelope;
			activeView.Refresh();
		}
	}
}


text:
'use strict';

var path = require('path');
var settings = require('./settings');
var bunyan = require('bunyan');
var RotatingFileStream = require('bunyan-rotating-file-stream');
var strformat = require('strformat');
var logDirectory = path.resolve(__dirname + '/../log/');
//var arduino = require('../arduino/index');
var serialport = require('serialport'),
    portName = settings.arduino.portName || process.argv[2],
    portConfig = {
        baudRate: settings.arduino.baudRate,
        // call myPort.on('data') when a newline is received:
        parser: serialport.parsers.readline('\n')
    };

var log = bunyan.createLogger({
    name: 'Accounts managment Auth0 API',
    level: 'error',
    streams: [{
        type: 'raw',
        stream: new RotatingFileStream({
            path: logDirectory + '/error-%Y%m%d.log',
            period: '1d', // daily rotation
            totalFiles: 10, // keep up to 10 back copies
            rotateExisting: true, // Give ourselves a clean file when we start up, based on period
            threshold: '5m', // Rotate log files larger than 5 megabytes
            totalSize: '10m', // Don't keep more than 10mb of archived log files
            gzip: true // Compress the archive log files to save space
        })
    }]
});

function showError(send, err) {
    send["statusCode"] = err.statusCode || 500;
    delete err.statusCode;
    send["error"] = err;
    return send;
}

var appRouter = function(app, router) {

    var interval = 0;

    var myPort = new serialport(portName, portConfig);

    myPort.on('open', function() {
        console.log('port open. Data rate: ' + myPort.options.baudRate);
    });

    myPort.on('data', function(data) {
        console.log(data);
    });

    myPort.on('close', function() {
        console.log('port closed.');
    });

    myPort.on('error', function(error) {
        console.log('Serial port error: ' + error);
    });

    router.use(function(err, req, res, next) {
        // Do logging and user-friendly error message display
        if (err) {
            console.error(err);
            res.status(500).send('internal server error');
        }

        console.log("/" + req.method);

        log.info("/" + req.method);

        next();
    });

    router.get("/", function(req, res) {
        res.sendFile(path.join(__dirname + '/ui/index.html'));
    });

    app.get("/webdoctor/goto/:direction", function(req, res) {

        var direction = req.params.direction.toString();

        clearInterval(interval);

        interval = setInterval(function() {
            myPort.write(direction);
            console.log("Enviado commando: " + direction);
        }, 1000);

        console.log(direction);

        res.sendStatus(200);

    });

    app.get("/webdoctor/stop", function(req, res) {

        clearInterval(interval);

        myPort.write('p');

        console.log("Enviado commando: p");

        res.sendStatus(200);

    });

    app.use("*", function(req, res) {
        res.status(404).send("Oh uh, something went wrong");
    });

}

module.exports = appRouter;


text:
'use strict';
var Alexa = require('alexa-sdk');

var APP_ID = undefined; //OPTIONAL: replace with "amzn1.echo-sdk-ams.app.[your-unique-value-here]";
var SKILL_NAME = 'Space Facts';

/**
 * Array containing space facts.
 */
var FACTS = [
    "A year on Mercury is just 88 days long.",
    "Despite being farther from the Sun, Venus experiences higher temperatures than Mercury.",
    "Venus rotates counter-clockwise, possibly because of a collision in the past with an asteroid.",
    "On Mars, the Sun appears about half the size as it does on Earth.",
    "Earth is the only planet not named after a god.",
    "Jupiter has the shortest day of all the planets.",
    "The Milky Way galaxy will collide with the Andromeda Galaxy in about 5 billion years.",
    "The Sun contains 99.86% of the mass in the Solar System.",
    "The Sun is an almost perfect sphere.",
    "A total solar eclipse can happen once every 1 to 2 years. This makes them a rare event.",
    "Saturn radiates two and a half times more energy into space than it receives from the sun.",
    "The temperature inside the Sun can reach 15 million degrees Celsius.",
    "The Moon is moving approximately 3.8 cm away from our planet every year."
];

exports.handler = function(event, context, callback) {
    var alexa = Alexa.handler(event, context);
    alexa.APP_ID = APP_ID;
    alexa.registerHandlers(handlers);
    alexa.execute();
};

var handlers = {
    'LaunchRequest': function () {
        this.emit('GetFact');
    },
    'GetNewFactIntent': function () {
        this.emit('GetFact');
    },
    'GetFact': function () {
        // Get a random space fact from the space facts list
        var factIndex = Math.floor(Math.random() * FACTS.length);
        var randomFact = FACTS[factIndex];

        // Create speech output
        var speechOutput = "Here's your fact: " + randomFact;

        this.emit(':tellWithCard', speechOutput, SKILL_NAME, randomFact)
    },
    'AMAZON.HelpIntent': function () {
        var speechOutput = "You can say tell me a space fact, or, you can say exit... What can I help you with?";
        var reprompt = "What can I help you with?";
        this.emit(':ask', speechOutput, reprompt);
    },
    'AMAZON.CancelIntent': function () {
        this.emit(':tell', 'Goodbye!');
    },
    'AMAZON.StopIntent': function () {
        this.emit(':tell', 'Goodbye!');
    }
};


text:
#pragma once

class UpdownSession : public NodeSession
{
public:
	UpdownSession();
	virtual ~UpdownSession();

	virtual void onDelete();
	virtual void checkHost(NetData::Ptr in_data);
};


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- ==================================================================== -->
<!-- Appcelerator Project Build                                           -->
<!-- ==================================================================== -->
<project name="build-appcelerator" default="dist" basedir=".">
	<path id="classpath">
		<fileset dir="${lib.dir}" includes="**/*.jar"/>
	</path>
	<target name="dist" depends="banner,clean,init,compile,war" description="* Builds the service and application deployment archives">
	</target>
	<target name="banner">
		<echo>Appcelerator Open Web Platform for Java</echo>
		<echo>Licensed under the Apache License, Version 2</echo>
		<echo>Please see COPYING for more details on license requirements</echo>
	</target>
	<target name="compile" description="Compiles the Java code" depends="init,pre_compile,execute_compile,post_compile">
	</target>
	<target name="war" description="Builds the deployed war" depends="banner,execute_war">
	</target>
	<target name="execute_compile" description="Compiles the Java code" depends="init,pre_compile">
		<mkdir dir="${stage.dir}/java/classes"/>
		<mkdir dir="${stage.dir}/lib"/>
		<javac debug="true" srcdir="${services.dir}" destdir="${stage.dir}/java/classes" classpathref="classpath" includeAntRuntime="false"/>
		<javac debug="true" srcdir="${src.java.dir}" destdir="${stage.dir}/java/classes" classpathref="classpath" includeAntRuntime="false"/>
		<jar destfile="${stage.dir}/lib/${app.name}-${version.major}.${version.minor}.${version.rev}.jar">
			<fileset dir="${stage.dir}/java/classes">
				<include name="**/*"/>
			</fileset>
			<fileset dir="${src.java.dir}">
				<exclude name="**/*.java"/>
			</fileset>
			<fileset dir="${basedir}">
				<include name="build.properties"/>
			</fileset>
		</jar>
	</target>
	<target name="execute_war" depends="banner,pre_war,compile,post_war">
		<war destfile="${stage.dir}/${app.name}.war" webxml="config/WEB-INF/web.xml">
			<lib dir="${lib.dir}" includes="*.jar"/>
			<lib dir="${lib.dir}/compiler" includes="xerces-*.jar,xml-apis-*.jar"/>
			<lib dir="stage/lib" includes="*.jar"/>
			<fileset dir="${web.dir}" includes="**/*"/>
			<fileset dir="${src.war.dir}" includes="**/*"/>
			<zipfileset dir="${config.dir}/META-INF" includes="**/*" prefix="META-INF"/>
			<zipfileset dir="${config.dir}/classes" includes="**/*" prefix="WEB-INF/classes"/>
		</war>
	</target>
	<target name="clean">
		<delete dir="${stage.dir}"/>
	</target>
	<target name="init">
		<mkdir dir="${stage.dir}"/>
	</target>
	<target name="pre_compile" depends="">
		<input message="huh?"/>
	</target>

</project>