text:
package org.pikater.core.experiments;

import org.pikater.core.agents.experiment.computing.Agent_WekaRBFNetworkCA;
import org.pikater.core.ontology.subtrees.batchdescription.*;
import org.pikater.core.ontology.subtrees.batchdescription.evaluationmethod.CrossValidation;
import org.pikater.core.ontology.subtrees.newoption.base.NewOption;
import org.pikater.core.ontology.subtrees.newoption.values.DoubleValue;
import org.pikater.core.ontology.subtrees.newoption.values.QuestionMarkRange;

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

/**
 * Created by Martin Pilat on 28.12.13.
 */
public class SearchOnly implements ITestExperiment {

    public ComputationDescription createDescription() {

        FileDataProvider fdp = new FileDataProvider();
        fdp.setFileURI("iris.arff");
        DataSourceDescription dsd = new DataSourceDescription();
        dsd.setDataProvider(fdp);

        ComputingAgent ca = new ComputingAgent();
        ca.setTrainingData(dsd);
        ca.setTestingData(dsd);
        ca.setValidationData(dsd);
        ca.setAgentType(Agent_WekaRBFNetworkCA.class.getName());
        ca.setEvaluationMethod(new EvaluationMethod(CrossValidation.class.getName()));
        //"whatever.mlp.is.in.MLP"

        List<NewOption> options = new ArrayList<NewOption>();
        NewOption lr = new NewOption("L",
        		new QuestionMarkRange(
        				new DoubleValue(0.0), new DoubleValue(0.0)));

        NewOption hr = new NewOption( "H",4);

        options.add(lr);
        options.add(hr);

        ca.setOptions(options);

        CARecSearchComplex crsc = new CARecSearchComplex();
        crsc.setComputingAgent(ca);

        ErrorSourceDescription ed = new ErrorSourceDescription();
        ed.setProvider(ca);
        ed.setOutputType("mse");

        List<ErrorSourceDescription> eds = new ArrayList<ErrorSourceDescription>();
        eds.add(ed);

        crsc.setErrors(eds);

        Search sa = new Search();
        sa.setAgentType("whatever.ea.is.in.EA");

        List<NewOption> searchParameters = new ArrayList<NewOption>();

        NewOption pr = new NewOption(
        		 "ea.popSize",50);

        NewOption ear = new NewOption( "ea.mutationRate",0.03);

        searchParameters.add(pr);
        searchParameters.add(ear);

        crsc.setSearch(sa);

        DataSourceDescription cAds = new DataSourceDescription();
        cAds.setDataProvider(ca);
        cAds.setOutputType("trained");

        FileDataSaver fds = new FileDataSaver();
        fds.setDataSource(cAds);

        ComputationDescription cd = new ComputationDescription();
        cd.addRootElement(fds);

        return cd;
    }

}


text:
(function(){

	var logOutModule = angular.module("AlphaApp");

	logOutModule.component("logout", {
		controller: function(auth, $timeout, $location, $sessionStorage, $localStorage){
			auth.$signOut();
			$sessionStorage.$reset();
			$localStorage.$reset();

			$timeout(function(){
				$location.path("/security/login");
			}, 500);
		}
	});

}());

redpajama_set_name: RedPajamaGithub


text:
function Recaptcha(){
  var self = this;
  this.api = {
    host:'www.google.com',
    script:'/recaptcha/api.js',
    verify:'/recaptcha/api/siteverify'
  };

  this.middleware = {
    render:function(req,res,next){
      req.recaptcha = self.render();
      next();
    },
    verify: function(req,res,next){
      self.verify(req,function(error){
        req.recaptcha = {error:error};
        next();
      });
    }
  }
};

Recaptcha.prototype.init = function(site_key, secret_key, options){
  this.site_key = site_key;
  this.secret_key = secret_key;
  this.options = options || {checkremoteip:false};
  if (!this.site_key) throw new Error('site_key is required');
  if (!this.secret_key) throw new Error('secret_key is required');
};

Recaptcha.prototype.render = function(){
  var query_string = '';
  var captcha_attr = '';
  this.options = this.options || {};
  if (this.options.onload) query_string += '&onload='+this.options.onload;
  if (this.options.render) query_string += '&render='+this.options.render;
  if (this.options.hl) query_string += '&hl='+this.options.hl;
  if (this.options.theme) captcha_attr += ' data-theme="'+this.options.theme+'"';
  if (this.options.type) captcha_attr += ' data-type="'+this.options.type+'"';
  if (this.options.callback) captcha_attr += ' data-callback="'+this.options.callback+'"';
  if (this.options.expired_callback) captcha_attr += ' data-expired-callback="'+this.options.expired_callback+'"';
  if (this.options.size) captcha_attr += ' data-size="'+this.options.size+'"';
  if (this.options.tabindex) captcha_attr += ' data-tabindex="'+this.options.tabindex+'"';

  query_string = query_string.replace(/^&/,'?');
  var tpl = ''+
  '

';
  return tpl;
};

Recaptcha.prototype.verify = function(req, cb){
  var response = null;
  var post_options = null;

  if (!req) throw new Error('req is required');
  if(req.body && req.body['g-recaptcha-response']) response = req.body['g-recaptcha-response'];
  if(req.query && req.query['g-recaptcha-response']) response = req.query['g-recaptcha-response'];

  var query_string = 'secret='+this.secret_key+'&response='+response;
  if (this.options.checkremoteip){
    var remote_ip = req.headers && req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] : req.connection.remoteAddress;
    if (remote_ip) query_string += '&remoteip=' + remote_ip;
  }
  post_options = {
    host: this.api.host,
    port: '443',
    path: this.api.verify,
    method: 'POST',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Content-Length': Buffer.byteLength(query_string)
    }
  };

  var request = https.request(post_options,function(res) {
    var body = '';

    res.setEncoding('utf8');
    res.on('data', function(chunk) {
      body += chunk;
    });
    res.on('end', function() {
      var result = JSON.parse(body);
      var error = result['error-codes'] && result['error-codes'].length > 0 ? result['error-codes'][0] : 'invalid-input-response';
      if (result.success) cb(null);
      else cb(error);
    });
    res.on('error', function(e) {
      cb(e.message);
    })
  });
  request.write(query_string);
  request.end();
};

module.exports = new Recaptcha();
var https = require('https');


text:
import os
import io
import flax
import functools
import jax
import jax.numpy as jnp
import math
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import numpy as np
from PIL import ImageFilter, Image
import requests
import tensorflow.compat.v1 as tf

def visualize_images(images, title='', figsize=(30, 6)):
  batch_size, height, width, c = images.shape
  images = images.swapaxes(0, 1)
  image_grid = images.reshape(height, batch_size*width, c)

  image_grid = np.clip(image_grid, 0, 1)

  plt.figure(figsize=figsize)
  plt.imshow(image_grid)
  plt.axis("off")
  plt.title(title)

def read_image_from_url(url, height=None, width=None):
  resp = requests.get(url)
  resp.raise_for_status()
  image_bytes = io.BytesIO(resp.content)
  pil_image = Image.open(image_bytes).convert('RGB')
  img_width, img_height = pil_image.size
  if height is not None and width is not None:
    pil_image = pil_image.resize((width, height), Image.BICUBIC)
  return np.float32(pil_image) / 255.

def restore_from_path(path):
  with tf.io.gfile.GFile(path, "rb") as f:
    state = flax.serialization.from_bytes(None, f.read())
  return state

class Bbox(object):
    def __init__(self, top_left_height_width):
       self.top, self.left, self.height, self.width = [
           int(x) for x in top_left_height_width.split('_')
       ]

def draw_image_with_bbox(image, bbox):
  fig, ax = plt.subplots()
  ax.imshow(image)
  rect = patches.Rectangle((bbox.left, bbox.top), bbox.width, bbox.height, linewidth=1, edgecolor='r', facecolor='none')
  ax.add_patch(rect)
  ax.axis("off")
  plt.title("input")
  plt.show()


text:
void plain_verify_callback(enum passdb_result result,
			   struct auth_request *request)
{
	switch (result) {
	case PASSDB_RESULT_OK:
		auth_request_success(request, NULL, 0);
		break;
	case PASSDB_RESULT_INTERNAL_FAILURE:
		auth_request_internal_failure(request);
		break;
	default:
		auth_request_fail(request);
		break;
	}
}


text:
package br.org.itai.amqpservice.convertion.interfaces;

public enum ConverterType {

	XML, JSON, String;
}


text:
<!doctype html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  <title>Homecooked.nl | Bas Langenberg</title>
  <meta name="viewport" content="width=device-width,initial-scale=1">

  <link rel="shortcut icon" href="{% include avatar_url %}?s=16">
  <link rel="stylesheet" href="/css/reset.css">
  <link rel="stylesheet" href="/css/font.css">
  <link rel="stylesheet" href="/css/mobile.css">
  <link rel="stylesheet" href="/css/desktop.css" media="(min-width:40em)">
  <link rel="stylesheet" href="/css/pygments.css">
  <link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700|Ubuntu:300,500,300italic,500italic|Ubuntu+Condensed' rel='stylesheet' type='text/css'>

    {% include header.html %}

{{page.title}}

          {{ content }}

    {% include footer.html %}
    {% include analytics.html %}

{% include scripts.html %}


text:
iOS-LiveRenderedCharts
======================

A sample project for demonstrating how to get live rendering in
IB of Xcode 6 to work with ShinobiCharts.

No guarantees.


text:
package compose

// isSupportedPlatform returns whether or not a Docker platform (i.e. OS) is
// supported by Mutagen's Docker Compose integration.
// TODO: Add support for Windows.
func isSupportedPlatform(platform string) bool {
	switch platform {
	case "linux":
		return true
	default:
		return false
	}
}


text:
import os

import requests

from jumeaux.models import *
from jumeaux.notification_handlers import NotificationHandler

class SlackPayload(OwlMixin):
    text: str
    channel: str
    username: str
    icon_emoji: TOption[str]
    icon_url: TOption[str]
    link_names: int = 1

class SlackNotificationHandler(NotificationHandler):
    channel: str
    username: str = "jumeaux"
    icon_emoji: TOption[str]
    icon_url: TOption[str]

    def __init__(
        self, channel: str, username: str, icon_emoji: TOption[str], icon_url: TOption[str]
    ):
        self.channel = channel
        self.username = username
        self.icon_emoji = icon_emoji
        self.icon_url = icon_url

    def notify(self, message: str) -> TOption[str]:
        p = SlackPayload.from_dict(
            {
                "text": message,
                "channel": self.channel,
                "username": self.username,
                "icon_emoji": self.icon_emoji.map(lambda x: f":{x}:").get(),
                "icon_url": self.icon_url.get(),
                "link_names": 1,
            }
        )
        r: Response = Response.from_requests(
            requests.post(
                os.environ["SLACK_INCOMING_WEBHOOKS_URL"], data=p.to_json().encode("utf8")
            )
        )
        return TOption(r.text if not r.ok else None)


text:
import sys
import xml.etree.ElementTree as ET

file=sys.argv[1]
version=len(sys.argv) > 2 and sys.argv[2] == '-v'

tree = ET.parse(file)
root = tree.getroot()

feature = None
version = None

for child in root:
        if child.attrib['key'] == 'node-feature-symbolic-name':
            feature = child.attrib['value']
            if not version:
                break
        elif child.attrib['key'] == 'node-feature-version':
            version = child.attrib['value']
        if feature != None and version != None:
            break

# org.knime.features.base.feature.group is bound to the org.knime.product.desktop
if feature != None and feature != "org.knime.features.base.feature.group" and feature != None:
    if version:
        print feature + '/' + version
    else:
        print feature


text:
import path from 'path'
import express from 'express'
import favicon from 'serve-favicon'

import webpack from 'webpack'
import webpackDevMiddleware from 'webpack-dev-middleware'
import webpackHotMiddleware from 'webpack-hot-middleware'

import cors from 'cors'

import config from '../config'
import webpackConfig from '../webpack/webpack.config.dev.babel.js'

const app = express()

if (!config.isProduction) {
  app.use(cors())
}

app.use(favicon(path.join(process.cwd(), 'static/favicon.ico')))
app.use(express.static(path.join(process.cwd(), 'static')))

if (!config.isProduction) {
  const compiler = webpack(webpackConfig)

  // Webpack DashboardPlugin
  // const Dashboard = require('webpack-dashboard')
  // const DashboardPlugin = require('webpack-dashboard/plugin')
  // const dashboard = new Dashboard()
  // compiler.apply(new DashboardPlugin(dashboard.setData))

  app.use(webpackDevMiddleware(compiler, {
    noInfo: true,
    publicPath: webpackConfig.output.publicPath
  }))
  app.use(webpackHotMiddleware(compiler))
}

app.listen(config.wdsPort, (err) => {
  if (err) {
    console.log(err)
    return
  }
  console.log(`Webpack Dev Server listening on ${config.host}:${config.wdsPort}`)
})


text:
<?php

/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2015
 * $Id$
 *
 */
class CRM_Core_IDS {

  /**
   * Define the threshold for the ids reactions.
   */
  private $threshold = array(
    'log' => 25,
    'warn' => 50,
    'kick' => 75,
  );

  /**
   * The init object
   */
  private $init = NULL;

  /**
   * This function includes the IDS vendor parts and runs the
   * detection routines on the request array.
   *
   * @param object $args cake controller object
   *
   * @return bool
   */
  public function check(&$args) {
    // lets bypass a few civicrm urls from this check
    static $skip = array('civicrm/admin/setting/updateConfigBackend', 'civicrm/admin/messageTemplates');
    $path = implode('/', $args);
    if (in_array($path, $skip)) {
      return NULL;
    }

    #add request url and user agent
    $_REQUEST['IDS_request_uri'] = $_SERVER['REQUEST_URI'];
    if (isset($_SERVER['HTTP_USER_AGENT'])) {
      $_REQUEST['IDS_user_agent'] = $_SERVER['HTTP_USER_AGENT'];
    }

    $configFile = self::createConfigFile(FALSE);

    // init the PHPIDS and pass the REQUEST array
    require_once 'IDS/Init.php';
    try {
      $init = IDS_Init::init($configFile);
      $ids = new IDS_Monitor($_REQUEST, $init);
    }
    catch (Exception $e) {
      // might be an old stale copy of Config.IDS.ini
      // lets try to rebuild it again and see if it works
      $configFile = self::createConfigFile(TRUE);
      $init = IDS_Init::init($configFile);
      $ids = new IDS_Monitor($_REQUEST, $init);
    }

    $result = $ids->run();
    if (!$result->isEmpty()) {
      $this->react($result);
    }

    return TRUE;
  }

  /**
   * Create the default config file for the IDS system.
   *
   * @param bool $force
   *   Should we recreate it irrespective if it exists or not.
   *
   * @return string
   *   the full path to the config file
   */
  public static function createConfigFile($force = FALSE) {
    $config = CRM_Core_Config::singleton();
    $configFile = $config->configAndLogDir . 'Config.IDS.ini';
    if (!$force && file_exists($configFile)) {
      return $configFile;
    }

    $tmpDir = empty($config->uploadDir) ? CIVICRM_TEMPLATE_COMPILEDIR : $config->uploadDir;

    // also clear the stat cache in case we are upgrading
    clearstatcache();

    global $civicrm_root;
    $contents = "
[General]
    filter_type         = xml
    filter_path         = {$civicrm_root}/packages/IDS/default_filter.xml
    tmp_path            = $tmpDir
    HTML_Purifier_Path  = IDS/vendors/htmlpurifier/HTMLPurifier.auto.php
    HTML_Purifier_Cache = $tmpDir
    scan_keys           = false
    exceptions[]        = __utmz
    exceptions[]        = __utmc
    exceptions[]        = widget_code
    exceptions[]        = html_message
    exceptions[]        = text_message
    exceptions[]        = body_html
    exceptions[]        = msg_html
    exceptions[]        = msg_text
    exceptions[]        = msg_subject
    exceptions[]        = description
    exceptions[]        = intro
    exceptions[]        = thankyou_text
    exceptions[]        = intro_text
    exceptions[]        = body_text
    exceptions[]        = footer_text
    exceptions[]        = thankyou_text
    exceptions[]        = tf_thankyou_text
    exceptions[]        = thankyou_footer
    exceptions[]        = thankyou_footer_text
    exceptions[]        = new_text
    exceptions[]        = renewal_text
    exceptions[]        = help_pre
    exceptions[]        = help_post
    exceptions[]        = confirm_title
    exceptions[]        = confirm_text
    exceptions[]        = confirm_footer_text
    exceptions[]        = confirm_email_text
    exceptions[]        = report_header
    exceptions[]        = report_footer
    exceptions[]        = data
    exceptions[]        = json
    exceptions[]        = instructions
    exceptions[]        = suggested_message
    exceptions[]        = page_text
";
    if (file_put_contents($configFile, $contents) === FALSE) {
      CRM_Core_Error::movedSiteError($configFile);
    }

    // also create the .htaccess file so we prevent the reading of the log and ini files
    // via a browser, CRM-3875
    CRM_Utils_File::restrictAccess($config->configAndLogDir);

    return $configFile;
  }

  /**
   * This function rects on the values in
   * the incoming results array.
   *
   * Depending on the impact value certain actions are
   * performed.
   *
   * @param IDS_Report $result
   *
   * @return bool
   */
  private function react(IDS_Report $result) {

    $impact = $result->getImpact();
    if ($impact >= $this->threshold['kick']) {
      $this->log($result, 3, $impact);
      $this->kick($result);
      return TRUE;
    }
    elseif ($impact >= $this->threshold['warn']) {
      $this->log($result, 2, $impact);
      $this->warn($result);
      return TRUE;
    }
    elseif ($impact >= $this->threshold['log']) {
      $this->log($result, 0, $impact);
      return TRUE;
    }
    else {
      return TRUE;
    }
  }

  /**
   * This function writes an entry about the intrusion
   * to the intrusion database
   *
   * @param array $result
   * @param int $reaction
   *
   * @return bool
   */
  private function log($result, $reaction = 0) {
    $ip = (isset($_SERVER['SERVER_ADDR']) &&
      $_SERVER['SERVER_ADDR'] != '127.0.0.1') ? $_SERVER['SERVER_ADDR'] : (
      isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : '127.0.0.1'
      );

    $data = array();
    $session = CRM_Core_Session::singleton();
    foreach ($result as $event) {
      $data[] = array(
        'name' => $event->getName(),
        'value' => stripslashes($event->getValue()),
        'page' => $_SERVER['REQUEST_URI'],
        'userid' => $session->get('userID'),
        'session' => session_id() ? session_id() : '0',
        'ip' => $ip,
        'reaction' => $reaction,
        'impact' => $result->getImpact(),
      );
    }

    CRM_Core_Error::debug_var('IDS Detector Details', $data);
    return TRUE;
  }

  /**
   * //todo
   */
  private function warn($result) {
    return $result;
  }

  /**
   *  //todo
   */
  private function kick($result) {
    $session = CRM_Core_Session::singleton();
    $session->reset(2);

    $msg = ts('There is a validation error with your HTML input. Your activity is a bit suspicious, hence aborting');

    $path = implode('/', $args);
    if (in_array(
      $path,
      array("civicrm/ajax/rest", "civicrm/api/json")
    )) {
      require_once "api/v3/utils.php";
      $error = civicrm_api3_create_error(
        $msg,
        array(
          'IP' => $_SERVER['REMOTE_ADDR'],
          'error_code' => 'IDS_KICK',
          'level' => 'security',
          'referer' => $_SERVER['HTTP_REFERER'],
          'reason' => 'XSS suspected',
        )
      );
      CRM_Utils_JSON::output($error);
    }
    CRM_Core_Error::fatal($msg);
  }

}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">

<?php include_once('header.php')?>

Creative Development

  Kailashtilla gas field is one of the largest gas fields in Bangladesh with six wells. It has been producing gas since 1983.

App Development & Design

  Kailashtilla gas field is one of the largest gas fields in Bangladesh with six wells. It has been producing gas since 1983.

Project Management

  Kailashtilla gas field is one of the largest gas fields in Bangladesh with six wells. It has been producing gas since 1983.

Intelligence meets imagination

Call

                    <button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Request</button>

                               Send A request

About Our Company

  Kailashtilla gas field is one of the largest gas fields in Bangladesh with six wells. It has been producing gas since 1983.

                <address>
                    Tangina Tushar

                    3248/A-5, Bonorpa R/A

                    Pahartoli, Chittagong

                    Mobile 012345676778
                </address>

                <address>
                    E-mail

                    tanjina_tushar@yahoo.com
                </address>

<?php include_once ('footer.php')?>


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

namespace _05.Dict_Ref_Advanced
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();

            Dictionary<string, List<int>> info = new Dictionary<string, List<int>>();

            while (input != "end")
            {
                string[] tokens = input.Split(new string[] { " -> " }, StringSplitOptions.RemoveEmptyEntries);
                string[] test = tokens[1].Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries);
                int temp;

                if (int.TryParse(test[0], out temp))
                {
                    string name = tokens[0];
                    int[] numbers = tokens[1].Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();

                    if (!info.ContainsKey(name))
                    {
                        info.Add(name, new List<int>());
                        for (int i = 0; i < numbers.Length; i++)
                        {
                            info[name].Add(numbers[i]);
                        }
                    }
                    else
                    {
                        for (int i = 0; i < numbers.Length; i++)
                        {
                            info[name].Add(numbers[i]);
                        }
                    }
                }
                else
                {
                    string firstName = tokens[0];
                    string secondName = tokens[1];

                    if (info.ContainsKey(secondName))
                    {
                        info.Add(firstName, new List<int>());

                        for (int i = 0; i < info[secondName].Count; i++)
                        {
                            info[firstName].Add(info[secondName][i]);
                        }
                    }
                }

                input = Console.ReadLine();
            }

            foreach (KeyValuePair<string, List<int>> nameValue in info)
            {
                Console.WriteLine($"{nameValue.Key} === {string.Join(", ", nameValue.Value)}");
            }
        }
    }
}


text:
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://developers.liveperson.com/rt-interactions-window-sdk-event-structure.html" />
</head>
</html>


text:
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite failures="0" time="0.254" errors="0" skipped="0" tests="1" name="com.springgae.app.SignGuestbookServletTest">
  <properties>
    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
    <property name="sun.boot.library.path" value="D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre\bin"/>
    <property name="java.vm.version" value="24.65-b04"/>
    <property name="java.vm.vendor" value="Oracle Corporation"/>
    <property name="java.vendor.url" value="http://java.oracle.com/"/>
    <property name="path.separator" value=";"/>
    <property name="guice.disable.misplaced.annotation.check" value="true"/>
    <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
    <property name="file.encoding.pkg" value="sun.io"/>
    <property name="user.script" value=""/>
    <property name="user.country" value="US"/>
    <property name="sun.java.launcher" value="SUN_STANDARD"/>
    <property name="sun.os.patch.level" value="Service Pack 1"/>
    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
    <property name="user.dir" value="D:\CLLLAENT\ws\spring-gae-app"/>
    <property name="java.runtime.version" value="1.7.0_65-b19"/>
    <property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
    <property name="java.endorsed.dirs" value="D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre\lib\endorsed"/>
    <property name="os.arch" value="amd64"/>
    <property name="java.io.tmpdir" value="C:\Users\HARITK~1\AppData\Local\Temp\"/>
    <property name="line.separator" value="
"/>
    <property name="java.vm.specification.vendor" value="Oracle Corporation"/>
    <property name="user.variant" value=""/>
    <property name="os.name" value="Windows 7"/>
    <property name="classworlds.conf" value="D:\CLLLAENT\ws\.metadata\.plugins\org.eclipse.m2e.launching\launches\m2conf735466885904903683.tmp"/>
    <property name="sun.jnu.encoding" value="Cp1252"/>
    <property name="java.library.path" value="D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Java\jdk1.8.0_31\bin;C:\Program Files\Java\jre1.8.0_31\bin;D:\BINARY_DIST\apache-maven-3.2.5\bin;D:\BINARY_DIST\apache-ant-1.9.4\bin;;."/>
    <property name="java.specification.name" value="Java Platform API Specification"/>
    <property name="java.class.version" value="51.0"/>
    <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
    <property name="os.version" value="6.1"/>
    <property name="user.home" value="C:\Users\haritkumar"/>
    <property name="user.timezone" value="Asia/Calcutta"/>
    <property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
    <property name="java.specification.version" value="1.7"/>
    <property name="file.encoding" value="Cp1252"/>
    <property name="user.name" value="haritkumar"/>
    <property name="java.class.path" value="/D:/BINARY_DIST/eclipse_jee/plugins/org.eclipse.m2e.maven.runtime_1.5.1.20150109-1819/jars/plexus-classworlds-2.5.1.jar"/>
    <property name="org.slf4j.simpleLogger.defaultLogLevel" value="info"/>
    <property name="java.vm.specification.version" value="1.7"/>
    <property name="sun.arch.data.model" value="64"/>
    <property name="java.home" value="D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre"/>
    <property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -B appengine:update"/>
    <property name="java.specification.vendor" value="Oracle Corporation"/>
    <property name="user.language" value="en"/>
    <property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
    <property name="java.vm.info" value="mixed mode"/>
    <property name="java.version" value="1.7.0_65"/>
    <property name="java.ext.dirs" value="D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre\lib\ext;C:\Windows\Sun\Java\lib\ext"/>
    <property name="sun.boot.class.path" value="D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre\lib\resources.jar;D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre\lib\rt.jar;D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre\lib\sunrsasign.jar;D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre\lib\jsse.jar;D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre\lib\jce.jar;D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre\lib\charsets.jar;D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre\lib\jfr.jar;D:\BINARY_DIST\jdk7\Java\jdk1.7.0_65\jre\classes"/>
    <property name="java.vendor" value="Oracle Corporation"/>
    <property name="maven.home" value="D:\CLLLAENT\ws\spring-gae-app\EMBEDDED"/>
    <property name="file.separator" value="\"/>
    <property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
    <property name="sun.cpu.endian" value="little"/>
    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
    <property name="sun.desktop" value="windows"/>
    <property name="sun.cpu.isalist" value="amd64"/>
  </properties>
  <testcase time="0.254" classname="com.springgae.app.SignGuestbookServletTest" name="testDoPost"/>
</testsuite>


text:
	<?php
		include_once $_SERVER['DOCUMENT_ROOT'].'/OfertaAki/includes/logo.php';
	?>

	<?php

	include_once $_SERVER['DOCUMENT_ROOT'].'/OfertaAki/class/protect.class.php';
	$protect = new protect();

	if($protect->geral()){

	?>

			<input type="text" placeholder="Informe o nome do produto desejado ..."
			class="col-sm-10" id="buscaGeral">

				<input type="submit" value="Buscar"
				onclick="buscaGeral($('#buscaGeral').val());">

	<?php
	}
	?>

	<?php
		include_once $_SERVER['DOCUMENT_ROOT'].'/OfertaAki/includes/carrinho.php';
	?>


text:
/* globals module */
/**
 * @module baasicPermissionsRouteService
 * @description Baasic Permissions Route Service provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use Baasic Permissions Route Service to obtain needed routes while other routes will be obtained through HAL. By convention, all route services use the same function names as their corresponding services.
*/
(function (angular, module, undefined) {
    'use strict';
    module.service('baasicPermissionsRouteService', ['baasicUriTemplateService',
        function (uriTemplateService) {
            return {
                /**
                * Parses find route which can be expanded with additional options. Supported items are:
                * - `section` - Section abbreviation which identifies part of the application for which security privileges can be retrieved and managed.
                * - `searchQuery` - A string value used to identify access policy resources using the phrase search.
                * - `sort` - A string used to set the access policy property to sort the result collection by.
                * @method
                * @example
baasicPermissionsRouteService.find(
	'sectionName'
).expand(
	{searchQuery: '<search-phrase>'}
);
                **/
                find: function (section) {
                    return uriTemplateService.parse('permissions/sections/{section}/{?searchQuery,sort}', section);
                },
                /**
                * Parses getActions route which can be expanded with additional options. Supported items are:
                * - `searchQuery` - A string value used to identify access action resources using the phrase search.
                * - `sort` - A string used to set the access action property to sort the result collection by.
                * @method
                * @example
baasicPermissionsRouteService.getActions.expand(
	{searchQuery: '<search-phrase>'}
);
                **/
                getActions: uriTemplateService.parse('permissions/actions/{?searchQuery,sort}'),
                /**
                * Parses getRoles route which can be expanded with additional options. Supported items are:
                * - `searchQuery` - A string value used to identify access policy resources using the phrase search.
                * - `sort` - A string used to set the access policy property to sort the result collection by.
                * - `page` - A value used to set the page number, i.e. to retrieve certain access policy subset from the storage.
                * - `rpp` - A value used to limit the size of result set per page.
                * @method
                * @example
baasicPermissionsRouteService.getRoles.expand(
	{searchQuery: '<search-phrase>'}
);
                **/
                getRoles: uriTemplateService.parse('lookups/roles/{?searchQuery,page,rpp,sort}'),
                /**
                * Parses getUsers route which can be expanded with additional options. Supported items are:
                * - `searchQuery` - A string value used to identify access policy resources using the phrase search.
                * - `sort` - A string used to set the access policy property to sort the result collection by.
                * - `page` - A value used to set the page number, i.e. to retrieve certain access policy subset from the storage.
                * - `rpp` - A value used to limit the size of result set per page.
                * @method
                * @example
baasicPermissionsRouteService.getRoles.expand(
	{searchQuery: '<search-phrase>'}
);
                **/
                getUsers: uriTemplateService.parse('users/{?searchQuery,page,rpp,sort}'),
                /**
                * Parses create permission route; this URI template doesn't expose any additional properties.
                * @method
                * @example baasicPermissionsRouteService.create.expand({});
                **/
                create: uriTemplateService.parse('permissions/'),
				/**
				* Parses and expands URI templates based on [RFC6570](http://tools.ietf.org/html/rfc6570) specifications. For more information please visit the project [GitHub](https://github.com/Baasic/uritemplate-js) page.
				* @method tags.parse
				* @example
baasicPermissionsRouteService.parse(
	'<route>/{?embed,fields,options}'
).expand(
	{embed: '<embedded-resource>'}
);
				**/
                parse: uriTemplateService.parse
            };
        }]);
}(angular, module));
/**
 * @copyright (c) 2017 Mono Ltd
 * @license MIT
 * @author Mono Ltd
 * @overview
 ***Notes:**
 - Refer to the [Baasic REST API](http://dev.baasic.com/api/reference/home) for detailed information about available Baasic REST API end-points.
 - [URI Template](https://github.com/Baasic/uritemplate-js) syntax enables expanding the Baasic route templates to Baasic REST URIs providing it with an object that contains URI parameters.
 - All end-point objects are transformed by the associated route service.
*/


text:
package de.tomgrill.gdxfirebase.core.admob;

public interface VideoRewardAd {

    boolean isLoaded();

    void load(String adUnit);

    void show();

    void setRewardVideoAdListener(RewardedVideoAdListener rewardVideoAdListener);

    int getErrorCode();
}


text:
import random
import sqlalchemy
from legendary_waffle import models

# Temp database code

def inmem_db():
    db_engine = sqlalchemy.create_engine("sqlite://")
    models.MODELBASE.metadata.create_all(db_engine)
    models.MODELBASE.metadata.bind = db_engine
    db_session = sqlalchemy.orm.sessionmaker(bind=db_engine)
    return db_session()

# Account management functions

def enroll_player(db_session, universe_pkid, player_pkid):
    """
    Conditions that must be met to enroll a player
    - Universe pkid must exist
    - Player pkid must exist
    - Player is not already enrolled
    - Number of enrolled players is less than max_players
    """
    # Get the referenced objects
    universe = models.model_read(db_session, models.Universe, pkid=universe_pkid)
    player = models.model_read(db_session, models.User, pkid=player_pkid)
    # Check the logical conditions
    if len(universe.enrolled_players) == universe.max_players:
        message = "Universe '{}' is at player capacity.".format(universe.name)
        raise ValueError(message)
    for i in universe.enrolled_players:
        if i.pkid == player.pkid:
            message = "Player '{}' is already enrolled in universe '{}'."
            raise ValueError(message.format(player.name, universe.name))
    # Mark the player as enrolled in the universe
    universe.enrolled_players.append(player)
    # Assign a planet to the player (this is done in a super crappy way)
    uncontrolled_planets = universe.get_uncontrolled_planets(db_session)
    if len(uncontrolled_planets) == 0:
        message = ("Unable to find an empty planet in universe '{}' to assign"
                   "player '{}'.")
        raise ValueError(message.format(universe.name, player.name))
    planet = random.choice(uncontrolled_planets)
    planet.player_control = player.pkid
    # Create the default buildings on the players planet
    for i in universe.starter_buildings:
        new_building = i.get_instance(universe_pkid=universe.pkid,
                                      planet_pkid=planet.pkid,
                                      player_pkid=player.pkid)
        db_session.add(new_building)
    # Save everything
    db_session.commit()

# Player interaction functions

def get_controlled_planets(db_session, player_pkid):
    return_list = []
    planets = models.model_read(db_session, models.Planet)
    for i in planets:
        if i.player_control == player_pkid:
            return_list.append(i)
    return return_list


text:
package io.herbert.codebase.openapimodel2;

import com.fasterxml.jackson.annotation.JsonProperty;

public class OpenAPIModel2 {

    private String swaggerVersion;

    @JsonProperty("swagger")
    public void setSwaggerVersion(String versionString) {
        swaggerVersion = versionString;
    }

    public String getSwaggerVersion() {
        return swaggerVersion;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="app_name">MEEP Home</string>
    <string name="action_settings">Settings</string>
    <string name="hello_world">Hello world!</string>

    <!-- used at menu_icon.xml -->
    <string name="menu_icon_image_content_desription">Meep Icon Image</string>

    <!-- used at menu item -->
    <string name="menu_item_title_news">News</string>
    <string name="menu_item_title_notifications">Notifications</string>
    <string name="menu_item_title_browser">Browser</string>
    <string name="menu_item_title_communicator">Communicator</string>
    <string name="menu_item_title_store">MEEP! Store</string>
    <string name="menu_item_title_youtube">YouTube</string>
    <string name="menu_item_title_parental_portal">Parental Settings</string>
    <string name="menu_item_title_music">Music</string>
    <string name="menu_item_title_game">Games & Apps</string>
    <string name="menu_item_title_picture">Pictures</string>
    <string name="menu_item_title_ebook">e-Books</string>
    <string name="menu_item_title_movie">Videos</string>
    <string name="menu_item_title_help">Safety/Help</string>
    <string name="menu_item_title_camera">Camera</string>
    <string name="menu_item_title_setting">Settings</string>
    <string name="menu_item_title_community">Community</string>
    <string name="menu_item_title_rush">Meep! Rush</string>
    <string name="menu_item_title_academy">Academy</string>

    <!-- used at menu item header -->
    <string name="menu_item_header_edit">edit</string>
    <string name="menu_item_header_recently_used">Recently used</string>
    <string name="menu_item_profile_default_name">MEEPer</string>

    <!-- the package name to used for launch other app -->
    <string name="package_meep_photo">com.android.gallery3d</string>
    <string name="package_meep_music">com.oregonscientific.meep.meepmusic</string>
    <string name="package_meep_ebook">com.oregonscientific.meep.ebook</string>
    <string name="package_meep_game">com.oregonscientific.meep.app</string>
    <string name="package_meep_movie">com.oregonscientific.meep.movie</string>
    <string name="package_meep_browser">com.oregonscientific.meep.browser</string>
    <string name="package_meep_youtube">com.oregonscientific.meep.youtube</string>
    <string name="package_meep_portal">com.oregonscientific.meep.together</string>
    <string name="package_meep_store">com.oregonscientific.meep.store2</string>
    <string name="package_meep_safty">com.oregonscientific.meep.safty</string>
    <string name="package_meep_camera">com.android.gallery3d</string>
    <string name="package_meep_profile">com.oregonscientific.meep.profile</string>
    <string name="package_meep_communicator">com.oregonscientific.meep.communicator</string>
    <string name="meep_app_package_prefix">com.oregonscientific.meep</string>
    <string name="package_meep_notification">com.oregonscientific.meep.notification</string>
    <string name="package_meep_settings">com.android.settings</string>
    <string name="activity_notification">com.oregonscientific.meep.notification.NotificationActivity</string>
    <string name="activity_news">com.oregonscientific.meep.notification.NewsActivity</string>
    <string name="activity_action_image_capture">android.media.action.STILL_IMAGE_CAMERA</string>

    <!-- used for profile setting -->
    <string name="profile_change_wallpaper">Change wallpaper</string>
    <string name="profile_setting_option_title2">Profile picture</string>
    <string name="profile_setting_option_title">Wallpaper</string>
    <string name="profile_serial_number">S/N: </string>
    <string name="profile_version">ver: </string>

    <!-- used for tutorial -->
    <string name="tutorial_back">Back</string>
    <string name="tutorial_next">Next</string>

    <string name="profile_setting_meep_id">MEEP! ID :\u0020</string>
    <string name="profile_setting_serial_number">Serial Number :\u0020</string>
    <string name="profile_setting_software_version">Software version :\u0020</string>

    <!-- title -->
    <string name="title_warning">Warning</string>

    <!-- alert messages -->
    <string name="alert_network_no_connection">No Internet connection! Make sure that your MEEP is connected to a Wi-Fi network</string>
    <string name="alert_volume_too_high">It may harm your hearing if you listen to your MEEP!X2 for a long time with high volume. Do you still want to adjust the volume up?</string>
    <string name="alert_volume_too_low">Volume is too low</string>
    <string name="alert_profile_cannot_edit">The profile can't be edited because your MEEP! is not registered. Please register it first and try again!</string>
    <string name="alert_profile_update_failed">Your profile picture can\u0027t be updated. Please try again!</string>
    <string name="alert_profile_no_network">Please go online in order to change the profile picture.</string>
    <string name="alert_profile_picture_updated">Your profile picture is updated.</string>
    <string name="alert_profile_wallpaper_updated">The wallpaper is updated.</string>

    <string name="alert_button_proceed">Proceed</string>

</resources>


text:
<?php

namespace Binidini\CoreBundle\Entity;

use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;

/**
 * PlaceRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class PlaceRepository extends EntityRepository
{
}


text:
<!DOCTYPE HTML>

	<meta charset='utf-8'>
	<meta http-equiv='X-UA-Compatible' content='IE=edge'>

	<title>${name} | Ractive Test Suite</title>
	<link rel='stylesheet' href='/test/qunit.css' type='text/css' media='screen' />


text:
<root>
    <item>first item to read</item>
    <item>seek will land before hash character: #</item>
    <item>second item to read</item>
</root>


text:
**Calculator**
https://www.cartrade.com/finance/car-loan-emi-calculator

## U Features
##### Fuel Type
Diesel,Petrol,CNG,LPG,Electric

##### My Average Daily Travel

##### Per KM cost

##### Transmission
Automatic, Manual

##### Engine Displacement
~800,800-1000,1000-2000,2000-3000

##### Body Style
Hatchback,Sedans,MUV,Hybrids,Minivans

##### Price range

** Catalogue with picture,price,extra fetures, P features, Tyre size **

    Example
    ECONOMY
    Mileage	21.66 kmpl
    Service Cost	Rs 8,569 /yr
    Fuel Type	Diesel
    Fuel Tank	55 Litres
    PERFORMANCE
    Engine	1498 cc
    BHP	108.4
    No. of Cylinders	4
    No. of Gears	7 Speed
    COMFORT
    Transmission	Automatic
    Rear AC VentsYes
    Seating Capacity 5
    Boot Space460-litres
    SAFETY
    ABSYes
    Driver AirbagYes
    Parking SensorYes
    AirbagsYes
    EMI
    Duration	5 years
    EMI	Rs 33,357

##### Colors

##### Features
Airbags,Keyless entry,ABC,Remote Fuel lid opener,Alloy wheels

Cruse Control,rear ac vents
Navigation system

##### Brand

##### Model Years

## P Features
look of the Vehicle,exterior design, interior design,  Interior space,
comfort during long drive
comfort during short drive
stearing wheel look, Steering noise
pick up when ac on
pick up when ac off
clutch hard,soft,perfect
Boot space
leg space for rear passengers
Ground clearnace
Engine noisy or silent
vibrations of Gear Rod: minute,no, high
dealer is making it mandatory to have accessories
dealer claimed but no intimation from maker

## Rating
Overall
Looks
Performance
Space/Comfort
Fuel Economy
Value For Money

## Latest Car launches

## Upcoming car with prices

## New Car Maintenance Calculator

## 5 years cost to own

## Deals

## Ref
https://www.carwale.com/renault-cars/kwid/userreviews/
https://auto.ndtv.com/research/recommend-cars
https://www.zigwheels.com/new-car-maintenance
https://www.zigwheels.com/forum/


text:
using System.Collections.Generic;
using KaVE.Commons.Model.Naming.Impl.v0.Types;
using KaVE.Commons.Model.Naming.Impl.v0.Types.Organization;
using KaVE.Commons.Model.Naming.Types;
using KaVE.Commons.Utils;
using KaVE.Commons.Utils.Assertion;
using KaVE.Commons.Utils.Collections;
using NUnit.Framework;

namespace KaVE.Commons.Tests.Model.Naming.Impl.v0.Types
{
    internal class TypeParameterNameTest
    {
        [Test, ExpectedException(typeof(AssertException))]
        public void CannotBeInitializedAsUnknownType()
        {
            // ReSharper disable once ObjectCreationAsStatement
            new TypeParameterName("?");
            Assert.IsFalse(TypeParameterName.IsTypeParameterNameIdentifier("?"));
        }

        [TestCaseSource("TypeParametersSource")]
        public void ShouldIdentifyValidTypeParameterNames(string typeParameter, string shortName, string boundType)
        {
            Assert.IsTrue(TypeParameterName.IsTypeParameterNameIdentifier(typeParameter));
            Assert.IsFalse(DelegateTypeName.IsDelegateTypeNameIdentifier(typeParameter));
            Assert.IsFalse(ArrayTypeName.IsArrayTypeNameIdentifier(typeParameter));
            Assert.IsFalse(TypeUtils.IsUnknownTypeIdentifier(typeParameter));
            Assert.IsFalse(PredefinedTypeName.IsPredefinedTypeNameIdentifier(typeParameter));
            Assert.IsFalse(TypeName.IsTypeNameIdentifier(typeParameter));
        }

        [TestCaseSource("TypeParametersSource")]
        public void ShouldParseShortName(string typeParameter, string shortName, string boundType)
        {
            if (!typeParameter.StartsWith("T["))
            {
                var sut = TypeUtils.CreateTypeName(typeParameter).AsTypeParameterName;
                Assert.AreEqual(shortName, sut.TypeParameterShortName);
            }
        }

        [TestCaseSource("TypeParametersSource")]
        public void ShouldParseTypeParameterType(string typeParameter, string shortName, string boundType)
        {
            if (!typeParameter.StartsWith("T["))
            {
                var sut = TypeUtils.CreateTypeName(typeParameter).AsTypeParameterName;
                Assert.AreEqual(boundType, sut.TypeParameterType.Identifier);
            }
        }

        [TestCaseSource("TypeParametersSource")]
        public void ShouldParseShortAndFullName(string typeParameter, string shortName, string boundType)
        {
            foreach (var expectedShortName in new[] {"T[,]", "T[]", "T"})
            {
                if (typeParameter.StartsWith(expectedShortName))
                {
                    var sut = TypeUtils.CreateTypeName(typeParameter);
                    Assert.AreEqual(expectedShortName, sut.Name);
                    Assert.AreEqual(expectedShortName, sut.FullName);
                    return;
                }
            }
            Assert.Fail();
        }

        [TestCaseSource("TypeParametersSource")]
        public void ShouldParseArrayRank(string typeParameter, string shortName, string boundType)
        {
            if (typeParameter.StartsWith("T[,]"))
            {
                var sut = TypeUtils.CreateTypeName(typeParameter).AsArrayTypeName;
                Assert.AreEqual(2, sut.Rank);
            }
            if (typeParameter.StartsWith("T[]"))
            {
                var sut = TypeUtils.CreateTypeName(typeParameter).AsArrayTypeName;
                Assert.AreEqual(1, sut.Rank);
            }
        }

        [TestCaseSource("TypeParametersSource")]
        public void ShouldParseArrayBaseType(string typeParameter, string shortName, string boundType)
        {
            var isBound = typeParameter.Contains(" -> ");
            var baseType = isBound
                ? TypeUtils.CreateTypeName("T -> {0}".FormatEx(boundType))
                : TypeUtils.CreateTypeName("T");
            foreach (var tp in new[] {"T[,]", "T[]"})
            {
                if (typeParameter.StartsWith(tp))
                {
                    var sut = TypeUtils.CreateTypeName(typeParameter).AsArrayTypeName;
                    Assert.AreEqual(baseType, sut.ArrayBaseType);
                }
            }
        }

        [TestCaseSource("TypeParametersSource")]
        public void AllChecksShouldBeFalse(string typeParameter, string shortName, string boundType)
        {
            var sut = TypeUtils.CreateTypeName(typeParameter);

            Assert.IsFalse(sut.IsUnknown);
            Assert.IsFalse(sut.IsHashed);

            var isArray = typeParameter.StartsWith("T[");
            Assert.AreEqual(isArray, sut.IsArray);
            Assert.AreEqual(isArray, sut.IsReferenceType);
            Assert.AreEqual(!isArray, sut.IsTypeParameter);

            Assert.IsFalse(sut.HasTypeParameters);
            Assert.IsFalse(sut.IsClassType);
            Assert.IsFalse(sut.IsDelegateType);
            Assert.IsFalse(sut.IsEnumType);
            Assert.IsFalse(sut.IsInterfaceType);
            Assert.IsFalse(sut.IsNestedType);
            Assert.IsFalse(sut.IsNullableType);
            Assert.IsFalse(sut.IsPredefined);
            Assert.IsFalse(sut.IsSimpleType);
            Assert.IsFalse(sut.IsStructType);
            Assert.IsFalse(sut.IsValueType);
            Assert.IsFalse(sut.IsVoidType);

            Assert.AreEqual(Lists.NewList<ITypeParameterName>(), sut.TypeParameters);

            Assert.AreEqual(new AssemblyName(), sut.Assembly);
            Assert.AreEqual(new NamespaceName(), sut.Namespace);

            Assert.Null(sut.DeclaringType);
        }

        public string[] ValidTypeParameterNamesSource()
        {
            // for the test, the shortnames must be T, to make it easy to detect arrays
            return new[] {"T", "T[]", "T[,]"};
        }

        public string[] Types()
        {
            return new[]
            {
                "?",
                "T",
                "T,P",
                "s:n.S,P",
                "i:n:I,P",
                "n.T+T2,P",
                "n.T`1[[T -> ?]],P",
                "d:[?] [?].()",
                "T[],P"
            };
        }

        public IEnumerable<string[]> TypeParametersSource()
        {
            // typeParameter, shortName, boundType
            ISet<string[]> tps = new HashSet<string[]>();
            foreach (var tp in ValidTypeParameterNamesSource())
            {
                tps.Add(new[] {tp, tp, "?"});

                foreach (var type in Types())
                {
                    tps.Add(new[] {"{0} -> {1}".FormatEx(tp, type), tp, type});
                }
            }
            return tps;
        }

        [Test]
        public void ShouldParseIsBound()
        {
            Assert.IsFalse(new TypeParameterName("T").IsBound);
            Assert.IsTrue(new TypeParameterName("T -> ?").IsBound);
        }

        [Test]
        public void ShouldDifferentiateTypeParamAndArray()
        {
            Assert.IsFalse(new TypeParameterName("T").IsArray);
            Assert.IsTrue(new TypeParameterName("T[]").IsArray);
            Assert.IsTrue(new TypeParameterName("T").IsTypeParameter);
            Assert.IsFalse(new TypeParameterName("T[]").IsTypeParameter);
        }

        [TestCaseSource("ValidTypeParamIds")]
        public void IsTypeParameterId(string typeId)
        {
            Assert.IsTrue(TypeParameterName.IsTypeParameterNameIdentifier(typeId));
        }

        [TestCaseSource("InvalidTypeParamIds")]
        public void IsNoTypeParameterId(string typeId)
        {
            Assert.IsFalse(TypeParameterName.IsTypeParameterNameIdentifier(typeId));
        }

        internal static string[] ValidTypeParamIds()
        {
            return new[]
            {
                "T",
                "t",
                "T1",
                "T -> ?",
                "T -> T,P",
                "T[] -> T,P",
                "T[,] -> T,P"
            };
        }

        internal static string[] InvalidTypeParamIds()
        {
            return new[]
            {
                "?",
                "1",
                "a-z",
                " ",
                ",",
                "(",
                ")",
                "[",
                "]",
                "<",
                ">",
                "{",
                "}"
            };
        }

        [Test, ExpectedException(typeof(AssertException))]
        public void ShouldCrashIfConversionIsNotAppropriate_Array()
        {
            // ReSharper disable once UnusedVariable
            var n = new TypeParameterName("T[]").AsTypeParameterName;
        }

        [Test, ExpectedException(typeof(AssertException))]
        public void ShouldCrashIfConversionIsNotAppropriate_NonArray()
        {
            // ReSharper disable once UnusedVariable
            var n = new TypeParameterName("T").AsArrayTypeName;
        }
    }
}


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

   <input type="hidden" name="id" value="<?php echo $edit_car_makes['id']; ?>">
   Car Make
   <input type="text" class="form-control" id="exampleInputName" name="name" placeholder="Enter name" value="<?php echo $edit_car_makes['name']; ?>">
    <?php echo form_error('name');?>

 <button type="submit" class="btn btn-primary">Submit</button>
</form>


text:
<?php include 'functions.php';?><!doctype html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title></title>
        <meta name="description" content="HTML-first crack at a Flexible Media Browser">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="stylesheet" href="assets/css/eureka.0.0.0.css?nc=<?php echo time() ?>">

        <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" async>


text:
package com.opengamma.financial.analytics.conversion;

import java.util.HashSet;
import java.util.Set;

import com.opengamma.core.holiday.HolidaySource;
import com.opengamma.core.id.ExternalSchemes;
import com.opengamma.core.region.Region;
import com.opengamma.core.region.RegionSource;
import com.opengamma.financial.convention.HolidaySourceCalendarAdapter;
import com.opengamma.financial.convention.calendar.Calendar;
import com.opengamma.id.ExternalId;
import com.opengamma.util.money.Currency;

/**
 * Utilities and constants for {@code Calendar}.
 * <p>
 * This is a thread-safe static utility class.
 * @deprecated  {@link Calendar} is deprecated in the analytics library, as it is not possible to distinguish between
 * weekends and holidays.
 */
@Deprecated
public class CalendarUtils {

  /**
   * Restricted constructor.
   */
  protected CalendarUtils() {
    super();
  }

  //-------------------------------------------------------------------------
  public static Calendar getCalendar(final RegionSource regionSource, final HolidaySource holidaySource,
      final ExternalId regionId) {
    final String separator = getMultipleRegionSeparator(regionId);
    if (separator != null) {
      final String[] regions = regionId.getValue().split(separator);
      final Set<Region> resultRegions = new HashSet<>();
      for (final String region : regions) {
        if (regionId.isScheme(ExternalSchemes.FINANCIAL)) {
          resultRegions.add(regionSource.getHighestLevelRegion(ExternalSchemes.financialRegionId(region)));
        } else if (regionId.isScheme(ExternalSchemes.ISDA_HOLIDAY)) {
          resultRegions.add(regionSource.getHighestLevelRegion(ExternalSchemes.isdaHoliday(region)));
        }
      }
      return new HolidaySourceCalendarAdapter(holidaySource, resultRegions.toArray(new Region[resultRegions.size()]));
    }
    final Region region = regionSource.getHighestLevelRegion(regionId); // we've checked that they are the same.
    return new HolidaySourceCalendarAdapter(holidaySource, region);
  }

  /**
   * Returns the escaped separator character for parsing multiple regions
   *
   * @param regionId the region id to parse.
   * @return the escaped separator charactor.
   */
  private static String getMultipleRegionSeparator(final ExternalId regionId) {
    if (!(regionId.isScheme(ExternalSchemes.FINANCIAL) || regionId.isScheme(ExternalSchemes.ISDA_HOLIDAY))) {
      return null;
    }

    final String regions = regionId.getValue();
    if (regions.contains("+")) {
      return "\\+";
    } else if (regions.contains(",")) {
      return ",";
    } else {
      return null;
    }
  }

  public static Calendar getCalendar(final HolidaySource holidaySource, final Currency... currencies) {
    return new HolidaySourceCalendarAdapter(holidaySource, currencies);
  }

}


text:
var fs = require('fs');
module.exports = function(app) {
  var util = app.util;
  return {
    type: 'command',
    name: 'module',
    listAll: function() { return ['reload', 'unload', 'load']; },
    getHelp: function() { return {
      'reload': '`reload <module-name>` - unload and load the named module',
      'load':   '`load <module-name>` - load the module specified by the name',
      'unload': '`unload <module-name>` - unload the module'
    }},

    init: function(util, alias) {
      alias('reload', 'module.reload');
      alias('load', 'module.load');
      alias('unload', 'module.unload');
    },

    listener: function onModuleCmd(line, words, respond, util) {
      if (!util.matchesHostname(util.config.get('owner'), line.prefix)) {
        respond('you can\'t do this!');
        app.events.emit('system.unauthorized', line.nick, words[0]);
        return;
      }

      // the asterisk
      var call = this.event.slice(7);

      switch (call) {
        case 'reload':
          var name = words[1];
          if (app.modules.hasOwnProperty(name)) {
            app.events.emit('module.reload', name);
            respond('sent the module.reload event for module ' + name);
          }
          break;

        case 'unload':
          var name = words[1];
          if (app.modules.hasOwnProperty(name)) {
            app.events.emit('module.unload', name);
            respond('sent the module.unload event for module ' + name);
          }
          break;

        case 'load':
          var name = words[1];
          fs.exists(__dirname + '/modules/module-'+name+'.js', function doesModuleExist(yes) {
            if (yes) {
              app.events.emit('module.new', name);
              respond('sent the module.new event for module ' + name);
            } else {
              respond('the module was not found - see console for details');
              console.log('the path ' + __dirname + '/modules/module-' + name +
                          '.js apparently doesn\'t exist');
            }
          });
          break;
      }
    }
  }
};


text:
<?php

namespace spec\Sylius\Bundle\UserBundle\Form\Type;

use PhpSpec\ObjectBehavior;
use Sylius\Component\User\Model\CustomerInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver;

final class GenderTypeSpec extends ObjectBehavior
{
    function it_is_initializable()
    {
        $this->shouldHaveType('Sylius\Bundle\UserBundle\Form\Type\GenderType');
    }

    function it_is_a_form()
    {
        $this->shouldHaveType(AbstractType::class);
    }

    function it_has_options(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'choices' => [
                CustomerInterface::UNKNOWN_GENDER => 'sylius.gender.unknown',
                CustomerInterface::MALE_GENDER => 'sylius.gender.male',
                CustomerInterface::FEMALE_GENDER => 'sylius.gender.female',
            ],
        ])->shouldBeCalled();

        $this->configureOptions($resolver);
    }

    function it_has_a_name()
    {
        $this->getName()->shouldReturn('sylius_gender');
    }

    function it_has_a_parent()
    {
        $this->getParent()->shouldReturn('choice');
    }
}


text:
import datetime

from django.conf import settings
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.sessions.middleware import SessionMiddleware
from django.contrib.sites.models import Site
from django.core import mail
from django.core.exceptions import ImproperlyConfigured
from django.core.handlers.wsgi import WSGIRequest
from django.test import Client
from django.test import TestCase

from registration import forms
from registration import signals
from registration.admin import RegistrationAdmin
from registration.backends import get_backend
from registration.backends.default import DefaultBackend
from registration.backends.simple import SimpleBackend
from registration.models import RegistrationProfile

class _MockRequestClient(Client):
    """
    A ``django.test.Client`` subclass which can return mock
    ``HttpRequest`` objects.

    """
    def request(self, **request):
        """
        Rather than issuing a request and returning the response, this
        simply constructs an ``HttpRequest`` object and returns it.

        """
        environ = {
            'HTTP_COOKIE':      self.cookies,
            'PATH_INFO':         '/',
            'QUERY_STRING':      '',
            'REMOTE_ADDR':       '127.0.0.1',
            'REQUEST_METHOD':    'GET',
            'SCRIPT_NAME':       '',
            'SERVER_NAME':       'testserver',
            'SERVER_PORT':       '80',
            'SERVER_PROTOCOL':   'HTTP/1.1',
            'wsgi.version':      (1,0),
            'wsgi.url_scheme':   'http',
            'wsgi.errors':       self.errors,
            'wsgi.multiprocess': True,
            'wsgi.multithread':  False,
            'wsgi.run_once':     False,
            }
        environ.update(self.defaults)
        environ.update(request)
        request = WSGIRequest(environ)

        # We have to manually add a session since we'll be bypassing
        # the middleware chain.
        session_middleware = SessionMiddleware()
        session_middleware.process_request(request)
        return request

def _mock_request():
    """
    Construct and return a mock ``HttpRequest`` object; this is used
    in testing backend methods which expect an ``HttpRequest`` but
    which are not being called from views.

    """
    return _MockRequestClient().request()

class BackendRetrievalTests(TestCase):
    """
    Test that utilities for retrieving the active backend work
    properly.

    """
    def test_get_backend(self):
        """
        Verify that ``get_backend()`` returns the correct value when
        passed a valid backend.

        """
        self.failUnless(isinstance(get_backend('registration.backends.default.DefaultBackend'),
                                   DefaultBackend))

    def test_backend_error_invalid(self):
        """
        Test that a nonexistent/unimportable backend raises the
        correct exception.

        """
        self.assertRaises(ImproperlyConfigured, get_backend,
                          'registration.backends.doesnotexist.NonExistentBackend')

    def test_backend_attribute_error(self):
        """
        Test that a backend module which exists but does not have a
        class of the specified name raises the correct exception.

        """
        self.assertRaises(ImproperlyConfigured, get_backend,
                          'registration.backends.default.NonexistentBackend')

class DefaultRegistrationBackendTests(TestCase):
    """
    Test the default registration backend.

    Running these tests successfull will require two templates to be
    created for the sending of activation emails; details on these
    templates and their contexts may be found in the documentation for
    the default backend.

    """
    backend = DefaultBackend()

    def setUp(self):
        """
        Create an instance of the default backend for use in testing,
        and set ``ACCOUNT_ACTIVATION_DAYS`` if it's not set already.

        """
        self.old_activation = getattr(settings, 'ACCOUNT_ACTIVATION_DAYS', None)
        if self.old_activation is None:
            settings.ACCOUNT_ACTIVATION_DAYS = 7

    def tearDown(self):
        """
        Yank out ``ACCOUNT_ACTIVATION_DAYS`` back out if it wasn't
        originally set.

        """
        if self.old_activation is None:
            settings.ACCOUNT_ACTIVATION_DAYS = self.old_activation

    def test_registration(self):
        """
        Test the registration process: registration creates a new
        inactive account and a new profile with activation key,
        populates the correct account data and sends an activation
        email.

        """
        new_user = self.backend.register(_mock_request(),
                                         username='bob',
                                         email='bob@example.com',
                                         password1='secret')

        # Details of the returned user must match what went in.
        self.assertEqual(new_user.username, 'bob')
        self.failUnless(new_user.check_password('secret'))
        self.assertEqual(new_user.email, 'bob@example.com')

        # New user must not be active.
        self.failIf(new_user.is_active)

        # A registration profile was created, and an activation email
        # was sent.
        self.assertEqual(RegistrationProfile.objects.count(), 1)
        self.assertEqual(len(mail.outbox), 1)

    def test_registration_no_sites(self):
        """
        Test that registration still functions properly when
        ``django.contrib.sites`` is not installed; the fallback will
        be a ``RequestSite`` instance.

        """
        Site._meta.installed = False

        new_user = self.backend.register(_mock_request(),
                                         username='bob',
                                         email='bob@example.com',
                                         password1='secret')

        self.assertEqual(new_user.username, 'bob')
        self.failUnless(new_user.check_password('secret'))
        self.assertEqual(new_user.email, 'bob@example.com')

        self.failIf(new_user.is_active)

        self.assertEqual(RegistrationProfile.objects.count(), 1)
        self.assertEqual(len(mail.outbox), 1)

        Site._meta.installed = True

    def test_valid_activation(self):
        """
        Test the activation process: activating within the permitted
        window sets the account's ``is_active`` field to ``True`` and
        resets the activation key.

        """
        valid_user = self.backend.register(_mock_request(),
                                           username='alice',
                                           email='alice@example.com',
                                           password1='swordfish')

        valid_profile = RegistrationProfile.objects.get(user=valid_user)
        activated = self.backend.activate(_mock_request(),
                                          valid_profile.activation_key)
        self.assertEqual(activated.username, valid_user.username)
        self.failUnless(activated.is_active)

        # Fetch the profile again to verify its activation key has
        # been reset.
        valid_profile = RegistrationProfile.objects.get(user=valid_user)
        self.assertEqual(valid_profile.activation_key,
                         RegistrationProfile.ACTIVATED)

    def test_invalid_activation(self):
        """
        Test the activation process: trying to activate outside the
        permitted window fails, and leaves the account inactive.

        """
        expired_user = self.backend.register(_mock_request(),
                                             username='bob',
                                             email='bob@example.com',
                                             password1='secret')

        expired_user.date_joined = expired_user.date_joined - datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS)
        expired_user.save()
        expired_profile = RegistrationProfile.objects.get(user=expired_user)
        self.failIf(self.backend.activate(_mock_request(),
                                          expired_profile.activation_key))
        self.failUnless(expired_profile.activation_key_expired())

    def test_allow(self):
        """
        Test that the setting ``REGISTRATION_OPEN`` appropriately
        controls whether registration is permitted.

        """
        old_allowed = getattr(settings, 'REGISTRATION_OPEN', True)
        settings.REGISTRATION_OPEN = True
        self.failUnless(self.backend.registration_allowed(_mock_request()))

        settings.REGISTRATION_OPEN = False
        self.failIf(self.backend.registration_allowed(_mock_request()))
        settings.REGISTRATION_OPEN = old_allowed

    def test_form_class(self):
        """
        Test that the default form class returned is
        ``registration.forms.RegistrationForm``.

        """
        self.failUnless(self.backend.get_form_class(_mock_request()) is forms.RegistrationForm)

    def test_post_registration_redirect(self):
        """
        Test that the default post-registration redirect is the named
        pattern ``registration_complete``.

        """
        self.assertEqual(self.backend.post_registration_redirect(_mock_request(), User()),
                         ('registration_complete', (), {}))

    def test_registration_signal(self):
        """
        Test that registering a user sends the ``user_registered``
        signal.

        """
        def receiver(sender, **kwargs):
            self.failUnless('user' in kwargs)
            self.assertEqual(kwargs['user'].username, 'bob')
            self.failUnless('request' in kwargs)
            self.failUnless(isinstance(kwargs['request'], WSGIRequest))
            received_signals.append(kwargs.get('signal'))

        received_signals = []
        signals.user_registered.connect(receiver, sender=self.backend.__class__)

        self.backend.register(_mock_request(),
                              username='bob',
                              email='bob@example.com',
                              password1='secret')

        self.assertEqual(len(received_signals), 1)
        self.assertEqual(received_signals, [signals.user_registered])

    def test_activation_signal_success(self):
        """
        Test that successfully activating a user sends the
        ``user_activated`` signal.

        """
        def receiver(sender, **kwargs):
            self.failUnless('user' in kwargs)
            self.assertEqual(kwargs['user'].username, 'bob')
            self.failUnless('request' in kwargs)
            self.failUnless(isinstance(kwargs['request'], WSGIRequest))
            received_signals.append(kwargs.get('signal'))

        received_signals = []
        signals.user_activated.connect(receiver, sender=self.backend.__class__)

        new_user = self.backend.register(_mock_request(),
                                         username='bob',
                                         email='bob@example.com',
                                         password1='secret')
        profile = RegistrationProfile.objects.get(user=new_user)
        self.backend.activate(_mock_request(), profile.activation_key)

        self.assertEqual(len(received_signals), 1)
        self.assertEqual(received_signals, [signals.user_activated])

    def test_activation_signal_failure(self):
        """
        Test that an unsuccessful activation attempt does not send the
        ``user_activated`` signal.

        """
        receiver = lambda sender, **kwargs: received_signals.append(kwargs.get('signal'))

        received_signals = []
        signals.user_activated.connect(receiver, sender=self.backend.__class__)

        new_user = self.backend.register(_mock_request(),
                                         username='bob',
                                         email='bob@example.com',
                                         password1='secret')
        new_user.date_joined -= datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS + 1)
        new_user.save()
        profile = RegistrationProfile.objects.get(user=new_user)
        self.backend.activate(_mock_request(), profile.activation_key)

        self.assertEqual(len(received_signals), 0)

    def test_email_send_action(self):
        """
        Test re-sending of activation emails via admin action.

        """
        admin_class = RegistrationAdmin(RegistrationProfile, admin.site)

        alice = self.backend.register(_mock_request(),
                                      username='alice',
                                      email='alice@example.com',
                                      password1='swordfish')

        admin_class.resend_activation_email(_mock_request(),
                                            RegistrationProfile.objects.all())
        self.assertEqual(len(mail.outbox), 2) # One on registering, one more on the resend.

        RegistrationProfile.objects.filter(user=alice).update(activation_key=RegistrationProfile.ACTIVATED)
        admin_class.resend_activation_email(_mock_request(),
                                            RegistrationProfile.objects.all())
        self.assertEqual(len(mail.outbox), 2) # No additional email because the account has activated.

    def test_activation_action(self):
        """
        Test manual activation of users view admin action.

        """
        admin_class = RegistrationAdmin(RegistrationProfile, admin.site)

        alice = self.backend.register(_mock_request(),
                                      username='alice',
                                      email='alice@example.com',
                                      password1='swordfish')

        admin_class.activate_users(_mock_request(),
                                   RegistrationProfile.objects.all())
        self.failUnless(User.objects.get(username='alice').is_active)

class SimpleRegistrationBackendTests(TestCase):
    """
    Test the simple registration backend, which does signup and
    immediate activation.

    """
    backend = SimpleBackend()

    def test_registration(self):
        """
        Test the registration process: registration creates a new
        inactive account and a new profile with activation key,
        populates the correct account data and sends an activation
        email.

        """
        new_user = self.backend.register(_mock_request(),
                                         username='bob',
                                         email='bob@example.com',
                                         password1='secret')

        # Details of the returned user must match what went in.
        self.assertEqual(new_user.username, 'bob')
        self.failUnless(new_user.check_password('secret'))
        self.assertEqual(new_user.email, 'bob@example.com')

        # New user must not be active.
        self.failUnless(new_user.is_active)

    def test_allow(self):
        """
        Test that the setting ``REGISTRATION_OPEN`` appropriately
        controls whether registration is permitted.

        """
        old_allowed = getattr(settings, 'REGISTRATION_OPEN', True)
        settings.REGISTRATION_OPEN = True
        self.failUnless(self.backend.registration_allowed(_mock_request()))

        settings.REGISTRATION_OPEN = False
        self.failIf(self.backend.registration_allowed(_mock_request()))
        settings.REGISTRATION_OPEN = old_allowed

    def test_form_class(self):
        """
        Test that the default form class returned is
        ``registration.forms.RegistrationForm``.

        """
        self.failUnless(self.backend.get_form_class(_mock_request()) is forms.RegistrationForm)

    def test_post_registration_redirect(self):
        """
        Test that the default post-registration redirect is the public
        URL of the new user account.

        """
        new_user = self.backend.register(_mock_request(),
                                         username='bob',
                                         email='bob@example.com',
                                         password1='secret')

        self.assertEqual(self.backend.post_registration_redirect(_mock_request(), new_user),
                         (new_user.get_absolute_url(), (), {}))

    def test_registration_signal(self):
        """
        Test that registering a user sends the ``user_registered``
        signal.

        """
        def receiver(sender, **kwargs):
            self.failUnless('user' in kwargs)
            self.assertEqual(kwargs['user'].username, 'bob')
            self.failUnless('request' in kwargs)
            self.failUnless(isinstance(kwargs['request'], WSGIRequest))
            received_signals.append(kwargs.get('signal'))

        received_signals = []
        signals.user_registered.connect(receiver, sender=self.backend.__class__)

        self.backend.register(_mock_request(),
                              username='bob',
                              email='bob@example.com',
                              password1='secret')

        self.assertEqual(len(received_signals), 1)
        self.assertEqual(received_signals, [signals.user_registered])

    def test_activation(self):
        """
        Test that activating against this backend is an error.

        """
        self.assertRaises(NotImplementedError, self.backend.activate,
                          request=_mock_request())

    def test_post_activation_redirect(self):
        """
        Test that asking for a post-activation redirect from this
        backend is an error.

        """
        self.assertRaises(NotImplementedError, self.backend.post_activation_redirect,
                          request=_mock_request(), user=User())


text:
namespace Topics.Radical
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using Topics.Radical.Validation;

    sealed class ReferenceEqualityComparer<T> : IEqualityComparer, IEqualityComparer<T>
        where T : class
    {
        public ReferenceEqualityComparer()
        {

        }

        public Boolean Equals( T x, T y )
        {
            return Object.Equals( x, y );
        }

        Boolean IEqualityComparer.Equals( Object x, Object y )
        {
            return Object.Equals( x, y );
        }

        int IEqualityComparer.GetHashCode( object obj )
        {
            Ensure.That( obj ).Named( "obj" ).IsNotNull();

            return obj.GetHashCode();
        }

        int IEqualityComparer<T>.GetHashCode( T obj )
        {
            Ensure.That( obj ).Named( "obj" ).IsNotNull();

            return obj.GetHashCode();
        }
    }
}


text:
#import "ASPFieldNamesResponse.h"

@implementation ASPFieldNamesResponse

/**
 * Maps json key to property name.
 * This method is used by `JSONModel`.
 */
+ (JSONKeyMapper *)keyMapper
{
  return [[JSONKeyMapper alloc] initWithDictionary:@{ @"FieldNames": @"fieldNames", @"Code": @"code", @"Status": @"status" }];
}

/**
 * Indicates whether the property with the given name is optional.
 * If `propertyName` is optional, then return `YES`, otherwise return `NO`.
 * This method is used by `JSONModel`.
 */
+ (BOOL)propertyIsOptional:(NSString *)propertyName
{
  NSArray *optionalProperties = @[@"fieldNames", @"code", @"status"];

  if ([optionalProperties containsObject:propertyName]) {
    return YES;
  }
  else {
    return NO;
  }
}

/**
 * Gets the string presentation of the object.
 * This method will be called when logging model object using `NSLog`.
 */
- (NSString *)description {
    return [[self toDictionary] description];
}

@end


text:
module YARD
  module Handlers
    module Ruby
      # Handles automatic detection of dsl-style methods
      class DSLHandler < Base
        include CodeObjects
        include DSLHandlerMethods
        handles method_call
        namespace_only
        process { handle_comments }
      end
    end
  end
end


text:
#ifdef HAVE_CONFIG_H
#  include <dtn-config.h>
#endif

#include "BundleActions.h"
#include "Bundle.h"
#include "BundleDaemon.h"
#include "BundleList.h"
#include "conv_layers/ConvergenceLayer.h"
#include "contacts/Link.h"
#include "storage/BundleStore.h"
#include "FragmentManager.h"
#include "FragmentState.h"

namespace dtn {

//----------------------------------------------------------------------
void
BundleActions::open_link(const LinkRef& link)
{
    ASSERT(link != NULL);
    if (link->isdeleted()) {
        log_debug("BundleActions::open_link: "
                  "cannot open deleted link %s", link->name());
        return;
    }

    oasys::ScopeLock l(link->lock(), "BundleActions::open_link");

    if (link->isopen() || link->contact() != NULL) {
        log_err("not opening link %s since already open", link->name());
        return;
    }

    if (! link->isavailable()) {
        log_err("not opening link %s since not available", link->name());
        return;
    }

    log_debug("BundleActions::open_link: opening link %s", link->name());

    link->open();
}

//----------------------------------------------------------------------
void
BundleActions::close_link(const LinkRef& link)
{
    ASSERT(link != NULL);

    if (! link->isopen() && ! link->isopening()) {
        log_err("not closing link %s since not open", link->name());
        return;
    }

    log_debug("BundleActions::close_link: closing link %s", link->name());

    link->close();
    ASSERT(link->contact() == NULL);
}

//----------------------------------------------------------------------
bool
BundleActions::queue_bundle(Bundle* bundle, const LinkRef& link,
                            ForwardingInfo::action_t action,
                            const CustodyTimerSpec& custody_timer)
{
    size_t total_len=0;

    BundleRef bref(bundle, "BundleActions::queue_bundle");

    ASSERT(link != NULL);
    if (link->isdeleted()) {
        log_warn("BundleActions::queue_bundle: "
                 "failed to send bundle *%p on link %s",
                 bundle, link->name());
        return false;
    }

    log_debug("trying to find xmit blocks for bundle id:%d on link %s",
              bundle->bundleid(), link->name());

    if (bundle->xmit_blocks()->find_blocks(link) != NULL) {
        log_err("BundleActions::queue_bundle: "
                "link not ready to handle bundle (block vector already exists), "
                "dropping send request");
        return false;
    }

    // XXX/demmer this should be moved somewhere in the router
    // interface so it can select options for the outgoing bundle
    // blocks (e.g. security)
    // XXX/ngoffee It's true the router should be able to select
    // blocks for various purposes, but I'd like the security policy
    // checks and subsequent block selection to remain inside the BPA,
    // with the DP pushing (firewall-like) policies and keys down via
    // a PF_KEY-like interface.
    log_debug("trying to create xmit blocks for bundle id:%d on link %s",
              bundle->bundleid(), link->name());
    BlockInfoVec* blocks = BundleProtocol::prepare_blocks(bundle, link);
    if(blocks == NULL) {
        log_err("BundleActions::queue_bundle: prepare_blocks returned NULL on bundle %d", bundle->bundleid());
        return false;
    }
    total_len = BundleProtocol::generate_blocks(bundle, blocks, link);
    if(total_len == 0) {
        log_err("BundleActions::queue_bundle: generate_blocks returned 0 on bundle %d", bundle->bundleid());
        return false;
    }
    log_debug("BundleActions::queue_bundle: total_len=%d", total_len);
    log_debug("queue bundle *%p on %s link %s (%s) (total len %zu)",
              bundle, link->type_str(), link->name(), link->nexthop(),
              total_len);

    ForwardingInfo::state_t state = bundle->fwdlog()->get_latest_entry(link);
    if (state == ForwardingInfo::QUEUED) {
        log_err("queue bundle *%p on %s link %s (%s): "
                "already queued or in flight",
                bundle, link->type_str(), link->name(), link->nexthop());
        return false;
    }

#ifdef LTP_ENABLED
	// XXXSF: The MTU check makes no sense for LTP where MTU relates to
	// segment size and not bundle size. However, the UDP CL does need
	// this and perhaps others, so I shouldn't move it just yet. But
	// properly speaking I think this should be a CL specific check to
	// make or not make -- Stephen Farrell
	if(link->clayer()->name()!="ltp") {
#endif
    if ((link->params().mtu_ != 0) && (total_len > link->params().mtu_)) {
        log_err("queue bundle *%p on %s link %s (%s): length %zu > mtu %u",
                bundle, link->type_str(), link->name(), link->nexthop(),
                total_len, link->params().mtu_);
        FragmentState *fs = BundleDaemon::instance()->fragmentmgr()->proactively_fragment(bundle, link, link->params().mtu_);
        log_debug("BundleActions::queue_bundle: bundle->payload().length()=%d", bundle->payload().length());
        if(fs != 0) {
            //BundleDaemon::instance()->delete_bundle(bref, BundleProtocol::REASON_NO_ADDTL_INFO);
            log_debug("BundleActions::queue_bundle forcing fragmentation because TestParameters (the twiddle command) says we should");
            oasys::ScopeLock l(fs->fragment_list().lock(), "BundleActions::queue_bundle");
            for(BundleList::iterator it=fs->fragment_list().begin();it!= fs->fragment_list().end();it++) {
                BundleDaemon::post_at_head(
                                new BundleReceivedEvent(*it, EVENTSRC_FRAGMENTATION));

            }
            //if(fs->check_completed(true)) {
            //    for(BundleList::iterator it=fs->fragment_list().begin();it!= fs->fragment_list().end();it++) {
            //        fs->erase_fragment(*it);
            //    }
            //}
            // We need to eliminate the original bundle in this case,
            // because we've already sent it.
            bundle->fwdlog()->add_entry(link, action, ForwardingInfo::SUPPRESSED);
            BundleDaemon::post_at_head(
                  new BundleDeleteRequest(bundle, BundleProtocol::REASON_NO_ADDTL_INFO));
            //BundleDaemon::instance()->delete_bundle(bref, BundleProtocol::REASON_NO_ADDTL_INFO);
            return true;

        }

        return false;
    }
#ifdef LTP_ENABLED
	}
#endif

    // Make sure that the bundle isn't unexpectedly already on the
    // queue or in flight on the link
    if (link->queue()->contains(bundle))
    {
        log_err("queue bundle *%p on link *%p: already queued on link",
                bundle, link.object());
        return false;
    }

    if (link->inflight()->contains(bundle))
    {
        log_err("queue bundle *%p on link *%p: already in flight on link",
                bundle, link.object());
        return false;
    }

    log_debug("adding QUEUED forward log entry for %s link %s "
              "with nexthop %s and remote eid %s to *%p",
              link->type_str(), link->name(),
              link->nexthop(), link->remote_eid().c_str(), bundle);

    bundle->fwdlog()->add_entry(link, action, ForwardingInfo::QUEUED,
                                custody_timer);
    BundleDaemon *daemon = BundleDaemon::instance();
    daemon->actions()->store_update(bundle);

    log_debug("adding *%p to link %s's queue (length %u)",
              bundle, link->name(), link->bundles_queued());

    if (! link->add_to_queue(bref, total_len)) {
        log_err("error adding bundle *%p to link *%p queue",
                bundle, link.object());
    }

    // finally, kick the convergence layer
    link->clayer()->bundle_queued(link, bref);

    return true;
}

//----------------------------------------------------------------------
void
BundleActions::cancel_bundle(Bundle* bundle, const LinkRef& link)
{
    BundleRef bref(bundle, "BundleActions::cancel_bundle");

    ASSERT(link != NULL);
    if (link->isdeleted()) {
        log_debug("BundleActions::cancel_bundle: "
                  "cannot cancel bundle on deleted link %s", link->name());
        return;
    }

    log_debug("BundleActions::cancel_bundle: cancelling *%p on *%p",
              bundle, link.object());

    // First try to remove the bundle from the link's delayed-send
    // queue. If it's there, then safely remove it and post the send
    // cancelled request without involving the convergence layer.
    //
    // If instead it's actually in flight on the link, then call down
    // to the convergence layer to see if it can interrupt
    // transmission, in which case it's responsible for posting the
    // send cancelled event.

    BlockInfoVec* blocks = bundle->xmit_blocks()->find_blocks(link);
    if (blocks == NULL) {
        log_warn("BundleActions::cancel_bundle: "
                 "cancel *%p but no blocks queued or inflight on *%p",
                 bundle, link.object());
        return;
    }

    size_t total_len = BundleProtocol::total_length(blocks);

    if (link->del_from_queue(bref, total_len)) {
        BundleDaemon::post(new BundleSendCancelledEvent(bundle, link));

    } else if (link->inflight()->contains(bundle)) {
        link->clayer()->cancel_bundle(link, bref);
    }
    else {
        log_warn("BundleActions::cancel_bundle: "
                 "cancel *%p but not queued or inflight on *%p",
                 bundle, link.object());
    }
}

//----------------------------------------------------------------------
void
BundleActions::inject_bundle(Bundle* bundle)
{
    PANIC("XXX/demmer fix inject bundle");

    log_debug("inject bundle *%p", bundle);
    BundleDaemon::instance()->pending_bundles()->push_back(bundle);
    store_add(bundle);
}

//----------------------------------------------------------------------
bool
BundleActions::delete_bundle(Bundle* bundle,
                             BundleProtocol::status_report_reason_t reason,
                             bool log_on_error)
{
    BundleRef bref(bundle, "BundleActions::delete_bundle");

    log_debug("attempting to delete bundle *%p from data store", bundle);
    bool del = BundleDaemon::instance()->delete_bundle(bref, reason);

    if (log_on_error && !del) {
        log_err("Failed to delete bundle *%p from data store", bundle);
    }
    return del;
}

//----------------------------------------------------------------------
void
BundleActions::store_add(Bundle* bundle)
{
    log_debug("adding bundle %d to data store", bundle->bundleid());
    bool added = BundleStore::instance()->add(bundle);
    if (! added) {
        log_crit("error adding bundle %d to data store!!", bundle->bundleid());
    }
}

//----------------------------------------------------------------------
void
BundleActions::store_update(Bundle* bundle)
{
    log_debug("updating bundle %d in data store", bundle->bundleid());
    bool updated = BundleStore::instance()->update(bundle);
    if (! updated) {
        log_crit("error updating bundle %d in data store!!", bundle->bundleid());
    }
}

//----------------------------------------------------------------------
void
BundleActions::store_del(Bundle* bundle)
{
    log_debug("removing bundle %d from data store", bundle->bundleid());
    bool removed = BundleStore::instance()->del(bundle);
    if (! removed) {
        log_crit("error removing bundle %d from data store!!",
                 bundle->bundleid());
    }
}

} // namespace dtn


text:
/**
 * Module dependencies.
 */

var factorial = require('factorial');

/**
 * Binomial coefficient.
 *
 * @param {Number} n
 * @param {Number} k
 * @return {Number}
 * @api public
 */

module.exports = function(n, k) {
  return factorial(n) / (factorial(k) * factorial(n - k));
};


text:
module OpenXml
  module Docx
    module Elements
    end
  end
end

require "openxml/docx/element"
require "openxml/has_children"
require "openxml/docx/elements/text"
Dir.glob("#{File.join(File.dirname(__FILE__), "elements", "*.rb")}").each do |file|
  require file
end


text:
package com.farm.database.entities.personality;

import com.farm.database.entities.FarmEntity;
import com.farm.environment.configuration.security.Authority;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Entity
@Table(name = "USER")
@Accessors(chain = true)
@Data
public class User implements FarmEntity, Serializable {
    @Id
    @GeneratedValue
    @Column(name = "ID")
    private Long id;

    @Column(name = "LOGIN", nullable = false, unique = true)
    @NotNull
    private String login;

    @Column(name = "PASSWORD", nullable = false)
    @NotNull
    private String password;

    @ElementCollection(targetClass = Authority.class, fetch = FetchType.EAGER)
    @CollectionTable(name = "ROLES", joinColumns = @JoinColumn(name = "USER_ID"))
    @Column(name = "ROLE", nullable = false)
    @Enumerated(EnumType.STRING)
    private List<Authority> authorities;

    @Column(name = "ACCOUNT_EXPIRATION_DATE", nullable = false)
    @NotNull
    private LocalDateTime accountExpirationDate;

    @Column(name = "PASSWORD_EXPIRATION_DATE", nullable = false)
    @NotNull
    private LocalDateTime passwordExpirationDate;

    @Column(name = "LOCKED", nullable = false)
    @NotNull
    private Boolean locked;

    @Column(name = "ENABLED", nullable = false)
    @NotNull
    private Boolean enabled;
}


text:
XUE_TOOL_DIR="$( cd "$( dirname ${BASH_SOURCE[0]} )" && pwd )"
XUE_ROOT_DIR="$( realpath "${XUE_TOOL_DIR}/../xue/" )"
AMALGAMATE_UTIL="${XUE_TOOL_DIR}/amalgamate-css.sh"
JSBUNDLE_UTIL="${XUE_TOOL_DIR}/bundle-js.sh"

CSS_BUNDLE_PATH="${XUE_ROOT_DIR}/static/xue/css/min"
JS_BUNDLE_PATH="${XUE_ROOT_DIR}/static/xue/js/bundle"

echo "CSS bundle will be stored in ${CSS_BUNDLE_PATH}"
echo " JS bundle will be stored in ${JS_BUNDLE_PATH}"

cd "${XUE_ROOT_DIR}"

cd static/xue/css
echo "Bundling CSS..."
"${AMALGAMATE_UTIL}" > "${CSS_BUNDLE_PATH}/amalgamation.css"

cd ie
echo "Bundling CSS for IE..."
"${AMALGAMATE_UTIL}" > "${CSS_BUNDLE_PATH}/ie-amalgamation.css"

cd "${XUE_ROOT_DIR}"

cd static/xue/js/framework
echo "Bundling JS frameworks..."
"${JSBUNDLE_UTIL}" > "${JS_BUNDLE_PATH}/framework.min.js"

cd ../ie/framework
echo "Bundling JS frameworks for IE..."
"${JSBUNDLE_UTIL}" > "${JS_BUNDLE_PATH}/ie-framework.min.js"

echo "all done"