text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Pseudopeziza subcalycella Rehm

### Remarks
null


text:
// This file was generated by Mendix Modeler.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
// Special characters, e.g., é, ö, à, etc. are supported in comments.

package oracleconnector.actions;

import com.mendix.core.Core;
import com.mendix.logging.ILogNode;
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.webui.CustomJavaAction;
import oracleconnector.impl.JdbcConnector;

public class SetInParameterDecimal extends CustomJavaAction<java.lang.Boolean>
{
	private java.math.BigDecimal DecimalValue;

	public SetInParameterDecimal(IContext context, java.math.BigDecimal DecimalValue)
	{
		super(context);
		this.DecimalValue = DecimalValue;
	}

	@Override
	public java.lang.Boolean executeAction() throws Exception
	{
		// BEGIN USER CODE
		connector.setInParameterDecimal(this.DecimalValue);
		return true;
		// END USER CODE
	}

	/**
	 * Returns a string representation of this action
	 */
	@Override
	public java.lang.String toString()
	{
		return "SetInParameterDecimal";
	}

	// BEGIN EXTRA CODE
	private final ILogNode logNode = Core.getLogger(JdbcConnector.LOGNAME);
	private final JdbcConnector connector = new JdbcConnector(logNode);

	// END EXTRA CODE
}

redpajama_set_name: RedPajamaGithub


text:
[![Build Status](https://travis-ci.org/khamaileon/backbone-socket-sync.svg?branch=master)](https://travis-ci.org/khamaileon/backbone-socket-sync)

Synchronize Backbone models and collections using socket.io.

## Install

```
bower install backbone-socket-sync
```

## Usage

```html
<script src="/socket.io/socket.io.js"></script>
<script src="jquery.js"></script>
<script src="underscore.js"></script>
<script src="backbone.js"></script>
<script src="backbone-socket-sync.js"></script>

<script>
Backbone.socket = io();

// Create a model.
var Book = Backbone.Model.extend({urlRoot : '/books'});
var book = new Book({id: 1});

// Fetch data and subscribe.
book.fetch();
</script>
```

## Model / collection events

### "sync:request"

Emitted when a resource need to be sync.

## Fetch options

### subscribe

It's possible to set the option `subscribe` to `false` to not subscribe for a specific fetch.

If you active subscribe, a header "X-Subscribe-Api" is setted to "true".

### socket

Provide a custom socket.

## Socket events

- "<" : client to server

### < "sync"

Emitted by the server when a new resource need to be synced.

```js
{
    url: '/events/promotions?type=x',
    data: {
        id: 2,
        type: 'x',
        title: 'hello'
    }
}
```

## License

MIT


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package mynn;

/**
 *
 * @author Tirta
 * @param <X>
 * @param <Y>
 */

public class Tuple<X, Y> {
  public final X node;
  public final Y weight;
  public Tuple(X x, Y y) {
    this.node = x;
    this.weight = y;
  }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Aqua_Weather_Station: EthernetWeather.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Aqua_Weather_Station
    1

Main Page

Classes

Files

File List

File Members

Classes

EthernetWeather.h File Reference

#include "Arduino.h"

#include <Ethernet.h>

Go to the source code of this file.

Classes

class  	EthernetWeather

<address class="footer">
Generated on Tue Jun 17 2014 13:45:58 for Aqua_Weather_Station by

 1.8.1.2
</address>


text:
namespace AdTools.Library.Commands.BackupGpoReports
{
    public class RemoveReadTimestamp
    {
        public const bool True = true;
        public const bool False = true;
    }
}


text:
package elastic

import (
	"encoding/json"
	"fmt"
	"strings"
)

// BulkIndexRequest is a bulk request to add a document to Elasticsearch.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
// for details.
type BulkIndexRequest struct {
	BulkableRequest
	index       string
	typ         string
	id          string
	opType      string
	routing     string
	parent      string
	timestamp   string
	ttl         int64
	refresh     *bool
	version     int64  // default is MATCH_ANY
	versionType string // default is "internal"
	doc         interface{}

	source []string
}

// NewBulkIndexRequest returns a new BulkIndexRequest.
// The operation type is "index" by default.
func NewBulkIndexRequest() *BulkIndexRequest {
	return &BulkIndexRequest{
		opType: "index",
	}
}

// Index specifies the Elasticsearch index to use for this index request.
// If unspecified, the index set on the BulkService will be used.
func (r *BulkIndexRequest) Index(index string) *BulkIndexRequest {
	r.index = index
	r.source = nil
	return r
}

// Type specifies the Elasticsearch type to use for this index request.
// If unspecified, the type set on the BulkService will be used.
func (r *BulkIndexRequest) Type(typ string) *BulkIndexRequest {
	r.typ = typ
	r.source = nil
	return r
}

// Id specifies the identifier of the document to index.
func (r *BulkIndexRequest) Id(id string) *BulkIndexRequest {
	r.id = id
	r.source = nil
	return r
}

// OpType specifies if this request should follow create-only or upsert
// behavior. This follows the OpType of the standard document index API.
// See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#operation-type
// for details.
func (r *BulkIndexRequest) OpType(opType string) *BulkIndexRequest {
	r.opType = opType
	r.source = nil
	return r
}

// Routing specifies a routing value for the request.
func (r *BulkIndexRequest) Routing(routing string) *BulkIndexRequest {
	r.routing = routing
	r.source = nil
	return r
}

// Parent specifies the identifier of the parent document (if available).
func (r *BulkIndexRequest) Parent(parent string) *BulkIndexRequest {
	r.parent = parent
	r.source = nil
	return r
}

// Timestamp can be used to index a document with a timestamp.
// This is deprecated as of 2.0.0-beta2; you should use a normal date field
// and set its value explicitly.
func (r *BulkIndexRequest) Timestamp(timestamp string) *BulkIndexRequest {
	r.timestamp = timestamp
	r.source = nil
	return r
}

// Ttl (time to live) sets an expiration date for the document. Expired
// documents will be expunged automatically.
// This is deprecated as of 2.0.0-beta2 and will be replaced by a different
// implementation in a future version.
func (r *BulkIndexRequest) Ttl(ttl int64) *BulkIndexRequest {
	r.ttl = ttl
	r.source = nil
	return r
}

// Refresh indicates whether to update the shards immediately after
// the request has been processed. Newly added documents will appear
// in search immediately at the cost of slower bulk performance.
func (r *BulkIndexRequest) Refresh(refresh bool) *BulkIndexRequest {
	r.refresh = &refresh
	r.source = nil
	return r
}

// Version indicates the version of the document as part of an optimistic
// concurrency model.
func (r *BulkIndexRequest) Version(version int64) *BulkIndexRequest {
	r.version = version
	r.source = nil
	return r
}

// VersionType specifies how versions are created. It can be e.g. internal,
// external, external_gte, or force.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-versioning
// for details.
func (r *BulkIndexRequest) VersionType(versionType string) *BulkIndexRequest {
	r.versionType = versionType
	r.source = nil
	return r
}

// Doc specifies the document to index.
func (r *BulkIndexRequest) Doc(doc interface{}) *BulkIndexRequest {
	r.doc = doc
	r.source = nil
	return r
}

// String returns the on-wire representation of the index request,
// concatenated as a single string.
func (r *BulkIndexRequest) String() string {
	lines, err := r.Source()
	if err != nil {
		return fmt.Sprintf("error: %v", err)
	}
	return strings.Join(lines, "\n")
}

// Source returns the on-wire representation of the index request,
// split into an action-and-meta-data line and an (optional) source line.
// See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
// for details.
func (r *BulkIndexRequest) Source() ([]string, error) {
	// { "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
	// { "field1" : "value1" }

	if r.source != nil {
		return r.source, nil
	}

	lines := make([]string, 2)

	// "index" ...
	command := make(map[string]interface{})
	indexCommand := make(map[string]interface{})
	if r.index != "" {
		indexCommand["_index"] = r.index
	}
	if r.typ != "" {
		indexCommand["_type"] = r.typ
	}
	if r.id != "" {
		indexCommand["_id"] = r.id
	}
	if r.routing != "" {
		indexCommand["_routing"] = r.routing
	}
	if r.parent != "" {
		indexCommand["_parent"] = r.parent
	}
	if r.timestamp != "" {
		indexCommand["_timestamp"] = r.timestamp
	}
	if r.ttl > 0 {
		indexCommand["_ttl"] = r.ttl
	}
	if r.version > 0 {
		indexCommand["_version"] = r.version
	}
	if r.versionType != "" {
		indexCommand["_version_type"] = r.versionType
	}
	if r.refresh != nil {
		indexCommand["refresh"] = *r.refresh
	}
	command[r.opType] = indexCommand
	line, err := json.Marshal(command)
	if err != nil {
		return nil, err
	}
	lines[0] = string(line)

	// "field1" ...
	if r.doc != nil {
		switch t := r.doc.(type) {
		default:
			body, err := json.Marshal(r.doc)
			if err != nil {
				return nil, err
			}
			lines[1] = string(body)
		case json.RawMessage:
			lines[1] = string(t)
		case *json.RawMessage:
			lines[1] = string(*t)
		case string:
			lines[1] = t
		case *string:
			lines[1] = *t
		}
	} else {
		lines[1] = "{}"
	}

	r.source = lines
	return lines, nil
}


text:
/**
 * Contains the project's data model classes.
 *
 * @author Martijn van de Rijdt
 */
package nl.mvdr.snake.model;


text:
namespace blink {

class V8PerformanceObserverCallback final : public PerformanceObserverCallback, public ActiveDOMCallback {
    USING_GARBAGE_COLLECTED_MIXIN(V8PerformanceObserverCallback);
public:
    static V8PerformanceObserverCallback* create(v8::Local<v8::Function> callback, v8::Local<v8::Object> owner, ScriptState* scriptState)
    {
        return new V8PerformanceObserverCallback(callback, owner, scriptState);
    }

    ~V8PerformanceObserverCallback() override;

    DECLARE_VIRTUAL_TRACE();

    void handleEvent(PerformanceObserverEntryList*, PerformanceObserver*) override;
    ExecutionContext* getExecutionContext() const override { return ContextLifecycleObserver::getExecutionContext(); }
private:
    CORE_EXPORT V8PerformanceObserverCallback(v8::Local<v8::Function>, v8::Local<v8::Object>, ScriptState*);

    static void setWeakCallback(const v8::WeakCallbackInfo<V8PerformanceObserverCallback>&);

    ScopedPersistent<v8::Function> m_callback;
    RefPtr<ScriptState> m_scriptState;
};

} // namespace blink
#endif // V8PerformanceObserverCallback_h


text:
    <a href="<?= base_url(); ?>">FrameKAY

  <?php
  echo (isset($notif)) ? '
' . $notif . '
' : '' ;
  echo ($this->session->flashdata('notif') != '') ? '
' . $this->session->flashdata('notif') . '
' : '' ;
    ?>

Sign in to start your session

    <form action="<?= base_url('user/auth'); ?>?url=<?= $this->input->get('url') ?>" method="POST">

        <input type="email" name="email" value="<?= (isset($_POST['email'])) ? $_POST['email'] : '' ; ?>" autocomplete="off" class="form-control" placeholder="Email" REQUIRED>

        <input type="password" name="password" class="form-control" placeholder="Password" REQUIRED>

              <input type="checkbox" name="remember"  />

          <button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>

    </form>

---------------------- OR ------------------------

       Sign in using
        Facebook
       Sign in using
        Google+

    <a href="<?= base_url('user/forgot_password'); ?>">I forgot my password

    Register a new membership


text:
"""
Abstract classes and utilities for template engines
"""
from hyde.exceptions import HydeException

import abc

from commando.util import getLoggerWithNullHandler, load_python_object

DEFAULT_TEMPLATE = 'hyde.ext.templates.jinja.Jinja2Template'

class HtmlWrap(object):

    """
    A wrapper class for raw html.

    Provides pyquery interface if available.
    Otherwise raw html access.
    """

    def __init__(self, html):
        super(HtmlWrap, self).__init__()
        self.raw = html
        try:
            from pyquery import PyQuery
        except:
            PyQuery = None
        self.q = PyQuery(html) if PyQuery else None

    def __unicode__(self):
        return self.raw

    def __call__(self, selector=None):
        if not self.q:
            return self.raw
        return self.q(selector).html()

class Template(object):

    """
    Interface for hyde template engines. To use a different template engine,
    the following interface must be implemented.
    """

    __metaclass__ = abc.ABCMeta

    def __init__(self, sitepath):
        self.sitepath = sitepath
        self.logger = getLoggerWithNullHandler(self.__class__.__name__)

    @abc.abstractmethod
    def configure(self, site, engine):
        """
        The site object should contain a config attribute. The config object
        is a simple YAML object with required settings. The template
        implementations are responsible for transforming this object to match
        the `settings` required for the template engines.

        The engine is an informal protocol to provide access to some
        hyde internals.

        The preprocessor attribute must contain the function that trigger the
        hyde plugins to preprocess the template after load.

        A context_for_path attribute must contain the function that returns
        the context object that is populated with the appropriate variables
        for the given path.
        """
        return

    def clear_caches(self):
        """
        Clear all caches to prepare for regeneration
        """
        return

    def get_dependencies(self, text):
        """
        Finds the dependencies based on the included
        files.
        """
        return None

    @abc.abstractmethod
    def render_resource(self, resource, context):
        """
        This function must load the file represented by the resource
        object and return the rendered text.
        """
        return ''

    @abc.abstractmethod
    def render(self, text, context):
        """
        Given the text, and the context, this function must return the
        rendered string.
        """

        return ''

    @abc.abstractproperty
    def exception_class(self):
        return HydeException

    @abc.abstractproperty
    def patterns(self):
        """
        Patterns for matching selected template statements.
        """
        return {}

    @abc.abstractmethod
    def get_include_statement(self, path_to_include):
        """
        Returns an include statement for the current template,
        given the path to include.
        """
        return '{%% include \'%s\' %%}' % path_to_include

    @abc.abstractmethod
    def get_extends_statement(self, path_to_extend):
        """
        Returns an extends statement for the current template,
        given the path to extend.
        """
        return '{%% extends \'%s\' %%}' % path_to_extend

    @abc.abstractmethod
    def get_open_tag(self, tag, params):
        """
        Returns an open tag statement.
        """
        return '{%% %s %s %%}' % (tag, params)

    @abc.abstractmethod
    def get_close_tag(self, tag, params):
        """
        Returns an open tag statement.
        """
        return '{%% end%s %%}' % tag

    @abc.abstractmethod
    def get_content_url_statement(self, url):
        """
        Returns the content url statement.
        """
        return '/' + url

    @abc.abstractmethod
    def get_media_url_statement(self, url):
        """
        Returns the media url statement.
        """
        return '/media/' + url

    @staticmethod
    def find_template(site):
        """
        Reads the configuration to find the appropriate template.
        """
        template_object = site.config.get('template', DEFAULT_TEMPLATE)
        template_cls = load_python_object(template_object)
        template = template_cls(site.sitepath)
        return template


text:
'use strict';

tripExchange.controller('TripCreateCtrl', ['$scope', '$location', 'auth', 'notifier', 'TripsResource', 'CitiesResource',
    function TripCreateCtrl($scope, $location, auth, notifier, TripsResource, CitiesResource) {
        auth.userInfo()
            .then(function(userInfo) {
                $scope.userInfo = userInfo;
                if (userInfo.isDriver) {
                    $scope.cities = CitiesResource.all();

                    $scope.createTrip = function(trip) {
                        TripsResource.create(trip)
                            .then(function() {
                                notifier.success('Trip created successfully!!');
                                $location.path('/trips');
                            });
                    }
                }
            })
    }]);


text:
using System;
using SpriteMeshEngine;

namespace UniverseEngine
{
    public class TileTypes
    {
        static private TileType[] tileTypes;
        static private SpriteSheet tilemapSpriteSheet;

        static public TileType[] GetTileTypes()
        {
            if (tileTypes == null)
                InitTileTypes();

            return tileTypes;
        }

        static public TileType GetTileType(byte id)
        {
            return GetTileTypes()[id];
        }

        static private void InitTileTypes()
        {
            tilemapSpriteSheet = SpriteSheetManager.GetSpriteSheet("Tilemap");

            tileTypes = new TileType[256];

            tileTypes[1].center = GetTileSubtypeUV("grassCenter");
            tileTypes[1].top = GetTileSubtypeUV("grassMid");

            tileTypes[2].center = GetTileSubtypeUV("sandCenter");
            tileTypes[2].top = GetTileSubtypeUV("sandMid");

            tileTypes[3].center = GetTileSubtypeUV("snowCenter");
            tileTypes[3].top = GetTileSubtypeUV("snowMid");

            tileTypes[4].center = GetTileSubtypeUV("stoneCenter");
            tileTypes[4].top = GetTileSubtypeUV("stoneMid");

            tileTypes[5].center = GetTileSubtypeUV("sun1Center");
            tileTypes[5].top = GetTileSubtypeUV("sun1Mid");

            tileTypes[6].center = GetTileSubtypeUV("sun2Center");
            tileTypes[6].top = GetTileSubtypeUV("sun2Mid");
        }

        static private TileSubtype GetTileSubtypeUV(string id)
        {
            TileSubtype subtype = new TileSubtype();

            UnityEngine.Rect rect = tilemapSpriteSheet.GetSpriteDefinition(id).UV;

            subtype.uvFromX = rect.xMin;
            subtype.uvToX = rect.xMax;
            subtype.uvFromY = rect.yMin;
            subtype.uvToY = rect.yMax;

            return subtype;
        }
    }
}


text:
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { CognitoUser, AuthenticationDetails } from 'amazon-cognito-identity-js';
import Login from '../components/Login';

const mapDispatchToProps = (dispatch) => {
	return {
		loginUser: (userPool, userPoolId, userPoolURL, email, password) => {
			let authData = {
				Username : email,
				Password : password,
			};
			let authDetails = new AuthenticationDetails(authData);
			let userData = {
				Username : email,
				Pool : userPool
			};
			let cognitoUser = new CognitoUser(userData);
			cognitoUser.authenticateUser(authDetails, {
				onSuccess: function (result) {
					window.location.href = "/";
				},
				onFailure: function(err) {
					let error = document.getElementById("error");
					error.style.display = "block";
					error.innerHTML = err.message;
				}
			});
		}
	};
};

function mapStateToProps(state, ownProps){
	return {
		app: state.app
	};
};

export default connect(mapStateToProps, mapDispatchToProps)(Login);


text:
<!DOCTYPE html>

  <link href="http://gmpg.org/xfn/11" rel="profile">
  <meta charset="UTF-8">

  <meta name="description" content="Portfolio showcasing my work in web development and global health">

	<meta name="author" content="Andy Tran">

  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">

  <title>

      A Sample pangram · Hello, this is Andy

  </title>

  <meta name="twitter:card" value="summary">

  <meta property="og:title" content="A Sample pangram" />
  <meta property="og:type" content="article" />
  <meta property="og:url" content="/2014/a-sample-pangram" />
  <meta property="og:description" content="" />

  <link rel="stylesheet" href="http://xanadhi.github.io//assets/css/bootstrap.css">
  <link rel="stylesheet" href="http://xanadhi.github.io//assets/css/app.css">
  <link rel="stylesheet" href="http://xanadhi.github.io//assets/css/github.css">
  <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

  <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css'>
  <link href='http://fonts.googleapis.com/css?family=Slabo+13px' rel='stylesheet' type='text/css'>

  <link rel="apple-touch-icon-precomposed" sizes="128x128" href="http://xanadhi.github.io//assets/images/favicon-128.png">
  <link rel="shortcut icon" href="http://xanadhi.github.io//assets/images/favicon-16.ico">

  <link rel="alternate" type="application/rss+xml" title="RSS" href="/feed.xml">

            About

            Resume

            Blog

            Tags

            Archive

A Sample pangram

           Published On June 23, 2014

The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz.
Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim.

Sex-charged fop blew my junk TV quiz. How quickly daft jumping zebras vex. Two driven jocks help fax my big quiz. Quick, Baz, get my woven flax jodhpurs!
"Now fax quiz Jack! " my brave ghost pled. Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk.
A very bad quack might jinx zippy fowls.

Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack!
Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard's job is to vex chumps quickly in fog.
Watch "Jeopardy! ", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz. Brawny gods just flocked up to quiz and vex him.
Adjusting quiver and bow, Zompyc[1] killed the fox. My faxed joke won a pager in the cable TV quiz show.
Amazingly few discotheques provide jukeboxes. My girl wove six dozen plaid jackets before she quit. Six big devils from Japan quickly forgot how they won the game

        Tags:

            Sample

            Pangram

Comments:

        Please enable JavaScript to view the comments powered by Disqus.
        comments powered by Disqus

        	← Previous

        	Next →

            © 2015 - Andy Tran. All rights reserved

            Built using

            Jekyll


text:
/*jshint esversion: 6 */
var Config = require('../config.json');
var selfsigned = require('selfsigned');
var forge = require('node-forge');
var jsonfile = require('jsonfile');
var fs = require('fs');

var DATABOX_DEV = process.env.DATABOX_DEV

var attrs = [{ name: 'commonName', value: 'databox' }];
var config = { days: 365, keySize: 2048, days: 3650, algorithm: 'sha256' };
var rootPems;

const devCertPath = './certs/certs.json';
const devCAPath = './certs/containerManager.crt';

//Generate the CM root cert at startup.
//If in DEV mode we need to use the same certs at restart because the docker demon has to trust the container manger CA to verify
//the local registry. If we are not in dev mode then the certs are generated at each restart of the container manger.
var init = function() {
    return new Promise( (resolve, reject) =>  {

        jsonfile.readFile(devCertPath, function (err, obj) {

            //return cached certs if we have them and are in DEV mode
            if(err === null && DATABOX_DEV) {
                rootPems = obj;
                resolve({rootCAcert:rootPems.cert});
                return;
            }

            selfsigned.generate(attrs, config, function (err, pems) {
                if(err) {
                    reject(err);
                }
                rootPems = pems;

                //Cash the certs in dev mode. These are new certs so display the update instructions and exit.
                if(DATABOX_DEV) {
                    jsonfile.writeFileSync(devCertPath, rootPems);
                    fs.writeFileSync(devCAPath, rootPems.cert);

                    reject(
                        "\n###################### INSTALL INSTRUCTIONS ######################\n" +
                        "\n"+
                        "\n"+
                        " You will need to add the container manager CA to the docker keychain \n"+
                        "\n"+
                        " \t Ubuntu: sudo install -m 044 -D "+devCAPath+" /etc/docker/certs.d/"+Config.registryUrl_dev+"/ca.crt \n"+
                        " \t MAC OSX: sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "+devCAPath+" \n"+
                        "\n"+
                        "Then restart docker:\n"+
                        "\n \t Ubuntu: sudo service docker restart \n"+
                        "\n \t MAC OSX:: use the gui! \n"+
                        "Then restart the container manager:\n"+
                        "\n \t DATABOX_DEV=1 npm start \n"+
                        "Then seed the local docker registry with the demo images:\n"+
                        "\n \t sh ./updateLocalRegistry.sh \n"+
                        "\n#################### END INSTALL INSTRUCTIONS #####################\n"
                    );
                }

                resolve({rootCAcert:rootPems.cert});
            });
        });

    });
};

var getRootCert =  function () {
    return rootPems.cert;
};

//based on code extracted from the selfsigned module Licence MIT
var createClientCert =  function (commonName) {

    function toPositiveHex(hexString){
    var mostSiginficativeHexAsInt = parseInt(hexString[0], 16);
    if (mostSiginficativeHexAsInt < 8){
        return hexString;
    }

    mostSiginficativeHexAsInt -= 8;
    return mostSiginficativeHexAsInt.toString() + hexString.substring(1);
    }

    return new Promise( (resolve, reject) =>  {

    var pki = forge.pki;
    pem = {};

    var clientkeys = forge.pki.rsa.generateKeyPair(2048);
    var clientcert = forge.pki.createCertificate();
    clientcert.serialNumber = toPositiveHex(forge.util.bytesToHex(forge.random.getBytesSync(9)));
    clientcert.validity.notBefore = new Date();
    clientcert.validity.notAfter = new Date();
    clientcert.validity.notAfter.setFullYear(clientcert.validity.notBefore.getFullYear() + 10);

    var clientAttrs = [{ name: 'commonName', value: commonName }];

    clientcert.setSubject(clientAttrs);
    // Set the issuer to the parent key
    clientcert.setIssuer(attrs);

    clientcert.setExtensions([{
        name: 'basicConstraints',
        cA: true
    }, {
        name: 'keyUsage',
        keyCertSign: true,
        digitalSignature: true,
        nonRepudiation: true,
        keyEncipherment: true,
        dataEncipherment: true
    }, {
        name: 'subjectAltName',
        altNames: [
            {
                type: 2, // DNS name
                value: commonName
            },
            {
                type: 2, // DNS name
                value: 'localhost'
            }
        ]
    }]);

    clientcert.publicKey = clientkeys.publicKey;

    // Sign client cert with root cert
    try {
        rootPrivateKey = pki.privateKeyFromPem(rootPems.private);
        clientcert.sign(rootPrivateKey);
    } catch (e) {
        reject("ERROR",e);
    }
    pem.clientprivate = forge.pki.privateKeyToPem(clientkeys.privateKey);
    pem.clientpublic = forge.pki.publicKeyToPem(clientkeys.publicKey);
    pem.clientcert = forge.pki.certificateToPem(clientcert);

    resolve(pem);
    });
};

module.exports = {init:init, createClientCert:createClientCert, getRootCert:getRootCert};


text:
"""This file handles the storage of data from loading and analysis.

More accurately, the files written and read from this file describe how to read/write actual data, such that the
actual format of any data need not be tightly defined.
"""

import json

class Persistor(object):
    _storage = {"corpus": None, "models": {}}

    def __init__(self, filename=None):
        if filename:
            self.load_data(filename)

    def store_corpus(self, data_dict):
        self._storage["corpus"] = data_dict

    def store_model(self, model_id, model_dict):
        self._storage["models"][model_id] = model_dict

    def get_corpus_dict(self):
        return self._storage["corpus"]

    def get_model_details(self, model_id):
        return self._storage["models"].get(model_id, None)

    def list_available_models(self):
        return self._storage["models"].keys()

    def persist_data(self, filename):
        with open(filename, "w") as f:
            json.dump(self._storage, f)

    def load_data(self, filename):
        with open(filename, "r") as f:
            self._storage = json.load(f)


text:
using System.Globalization;
using NGraphics.Custom.Interfaces;
using NGraphics.Custom.Models.Brushes;

namespace NGraphics.Custom.Models.Elements
{
    public class Ellipse : Element
    {
        public Ellipse(Rect frame, Pen pen = null, BaseBrush baseBrush = null)
            : base(pen, baseBrush)
        {
            this.frame = frame;
        }

        public Ellipse(Point position, Size size, Pen pen = null, BaseBrush baseBrush = null)
            : this(new Rect(position, size), pen, baseBrush)
        {
        }

        public Ellipse(Point position, double diameter)
            : this(position, new Size(diameter))
        {
        }

        public Ellipse(double diameter)
            : this(Point.Zero, new Size(diameter))
        {
        }

        private readonly Rect frame;

        protected override void DrawElement(ICanvas canvas)
        {
            canvas.DrawEllipse(frame, Pen, Brush);
        }

        public override string ToString()
        {
            return string.Format(CultureInfo.InvariantCulture, "Ellipse ({0})", frame);
        }
    }
}


text:
package org.nextime.ion.backoffice.form;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.nextime.ion.framework.xml.XML;

public class EditPublicationForm extends ActionForm {

    private String date;
    private String data;

    /**
     * @see org.apache.struts.action.ActionForm#validate(ActionMapping, HttpServletRequest)
     */
    public ActionErrors myValidate(HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
        try {
            XML.getInstance().getDocument(getData());
        } catch (Exception e) {
            ActionError error
                    = new ActionError("error.general.badXml", e.getMessage());
            errors.add("data", error);
        }
        return errors;
    }

    /**
     * @see org.apache.struts.action.ActionForm#reset(ActionMapping, HttpServletRequest)
     */
    public void reset(ActionMapping arg0, HttpServletRequest arg1) {
        setDate(null);
        setData(null);
    }

    /**
     * Returns the date.
     *
     * @return Date
     */
    public String getDate() {
        return date;
    }

    /**
     * Sets the date.
     *
     * @param date The date to set
     */
    public void setDate(String date) {
        this.date = date;
    }

    /**
     * Returns the data.
     *
     * @return String
     */
    public String getData() {
        return data;
    }

    /**
     * Sets the data.
     *
     * @param data The data to set
     */
    public void setData(String data) {
        if (data != null) {
            this.data
                    = data.replaceFirst(
                            ".*<\\x3Fxml.*\\x3F>",
                            "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
            this.data = this.data.replaceAll("ion:lang", "xml:lang");
            // hack for euro symbol
        } else {
            data = null;
        }
    }

}


text:
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Web.Mvc;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.DataContracts;

namespace GMailLabelCleanup.Core.Attributes.ActionFilters
{
    public class InsightsErrorAttribute : HandleErrorAttribute
    {

        public override void OnException(ExceptionContext filterContext)
        {
            if (filterContext != null && filterContext.Exception != null)
            {
                var telemetry = new ExceptionTelemetry(filterContext.Exception)
                {
                    Timestamp = DateTimeOffset.UtcNow
                };
                foreach (var item in GetErrorProperties(filterContext.Exception, 0))
                {
                    telemetry.Properties.Add(item.Item1, item.Item2);
                }

                new TelemetryClient().TrackException(telemetry);
            }

            base.OnException(filterContext);
        }
        private IEnumerable<Tuple<string, string>> GetErrorProperties(Exception ex, int level)
        {
            if (ex == null)
                yield break;

            yield return new Tuple<string, string>(string.Format("Message_Level{0}", level), ex.Message);
            yield return new Tuple<string, string>(string.Format("StackTrace_Level{0}", level), ex.StackTrace);

            foreach (var child in GetErrorProperties(ex.InnerException, level + 1))
            {
                yield return child;
            }
        }

    }
}


text:
#include <sg.h>

#include "unittests.h"

void u0032_repo__test_ids(SG_context* pCtx)
{
	SG_repo* pRepo = NULL;
	SG_pathname* pPath_repo = NULL;
	SG_vhash* pvhPartialDescriptor = NULL;
    char buf_repo_id[SG_GID_BUFFER_LENGTH];
    char buf_admin_id[SG_GID_BUFFER_LENGTH];
	char* pszRepoImpl = NULL;
	char* pszStoredAdminId = NULL;
	char* pszStoredRepoId = NULL;

	VERIFY_ERR_CHECK(  SG_gid__generate(pCtx, buf_repo_id, sizeof(buf_repo_id))  );
	VERIFY_ERR_CHECK(  SG_gid__generate(pCtx, buf_admin_id, sizeof(buf_admin_id))  );

	/* Get our paths fixed up */
	VERIFY_ERR_CHECK(  SG_PATHNAME__ALLOC(pCtx, &pPath_repo)  );
	VERIFY_ERR_CHECK(  SG_pathname__set__from_cwd(pCtx, pPath_repo)  );
	VERIFY_ERR_CHECK(  SG_pathname__append__from_sz(pCtx, pPath_repo, "repo")  );

	SG_ERR_IGNORE(  SG_fsobj__mkdir__pathname(pCtx, pPath_repo)  );

	/* Create the repo */

	VERIFY_ERR_CHECK(  SG_VHASH__ALLOC(pCtx,&pvhPartialDescriptor)  );
	VERIFY_ERR_CHECK_DISCARD(  SG_localsettings__get__sz(pCtx, SG_LOCALSETTING__NEWREPO_DRIVER, NULL, &pszRepoImpl, NULL)  );
    if (pszRepoImpl)
    {
        VERIFY_ERR_CHECK_DISCARD(  SG_vhash__add__string__sz(pCtx, pvhPartialDescriptor, SG_RIDESC_KEY__STORAGE, pszRepoImpl)  );
    }
	VERIFY_ERR_CHECK(  SG_vhash__add__string__sz(pCtx,pvhPartialDescriptor, SG_RIDESC_FSLOCAL__PATH_PARENT_DIR, SG_pathname__sz(pPath_repo))  );
	VERIFY_ERR_CHECK(  SG_repo__create_repo_instance(pCtx,NULL,pvhPartialDescriptor,SG_TRUE,NULL,buf_repo_id,buf_admin_id,&pRepo)  );

	VERIFY_ERR_CHECK(  SG_repo__get_admin_id(pCtx, pRepo, &pszStoredAdminId)  );

	VERIFY_COND("intital adminid == stored adminid", 0 == strcmp(pszStoredAdminId, buf_admin_id));

	VERIFY_ERR_CHECK(  SG_repo__get_repo_id(pCtx, pRepo, &pszStoredRepoId)  );

	VERIFY_COND("initial repoid == stored repoid", 0 == strcmp(pszStoredRepoId, buf_repo_id));

	SG_NULLFREE(pCtx, pszStoredAdminId);
	SG_NULLFREE(pCtx, pszStoredRepoId);
	SG_VHASH_NULLFREE(pCtx, pvhPartialDescriptor);
	SG_PATHNAME_NULLFREE(pCtx, pPath_repo);
	SG_REPO_NULLFREE(pCtx, pRepo);
    SG_NULLFREE(pCtx, pszRepoImpl);

	return;
fail:
	SG_NULLFREE(pCtx, pszStoredAdminId);
	SG_NULLFREE(pCtx, pszStoredRepoId);
	SG_VHASH_NULLFREE(pCtx, pvhPartialDescriptor);
	SG_PATHNAME_NULLFREE(pCtx, pPath_repo);
	SG_REPO_NULLFREE(pCtx, pRepo);
    SG_NULLFREE(pCtx, pszRepoImpl);
}

void u0032_repo__test_delete(SG_context* pCtx)
{
	SG_repo* pRepo = NULL;
	SG_pathname* pPath_repo = NULL;
	SG_vhash* pvhPartialDescriptor = NULL;
    const SG_vhash * pvhRepoDescriptor_ref = NULL;
	char buf_descriptor_name[SG_GID_BUFFER_LENGTH];
    char buf_repo_id[SG_GID_BUFFER_LENGTH];
    char buf_admin_id[SG_GID_BUFFER_LENGTH];
	char* pszRepoImpl = NULL;
	SG_closet_descriptor_handle* ph = NULL;

    SG_rbtree * pBefore = NULL;
    SG_uint32 count_before = 0;
    SG_rbtree * pDuring = NULL;
    SG_uint32 count_during = 0;
    SG_rbtree * pAfter = NULL;
    SG_uint32 count_after = 0;

    SG_rbtree_iterator * pItBefore = NULL;
    SG_rbtree_iterator * pItAfter = NULL;

	VERIFY_ERR_CHECK(  SG_PATHNAME__ALLOC(pCtx, &pPath_repo)  );
	VERIFY_ERR_CHECK(  SG_pathname__set__from_cwd(pCtx, pPath_repo)  );
	VERIFY_ERR_CHECK(  SG_pathname__append__from_sz(pCtx, pPath_repo, "repo")  );
	SG_ERR_IGNORE(  SG_fsobj__mkdir__pathname(pCtx, pPath_repo)  );

    VERIFY_ERR_CHECK(  SG_dir__list(pCtx, pPath_repo, NULL, NULL, NULL, &pBefore)  );
    VERIFY_ERR_CHECK(  SG_rbtree__count(pCtx, pBefore, &count_before)  );

	VERIFY_ERR_CHECK(  SG_gid__generate(pCtx, buf_descriptor_name, sizeof(buf_descriptor_name))  );
	VERIFY_ERR_CHECK(  SG_gid__generate(pCtx, buf_repo_id, sizeof(buf_repo_id))  );
	VERIFY_ERR_CHECK(  SG_gid__generate(pCtx, buf_admin_id, sizeof(buf_admin_id))  );

	VERIFY_ERR_CHECK(  SG_closet__descriptors__add_begin(pCtx, buf_descriptor_name, NULL, buf_repo_id, buf_admin_id,
		NULL, &pvhPartialDescriptor, &ph)  );
	VERIFY_ERR_CHECK(  SG_vhash__update__string__sz(pCtx,pvhPartialDescriptor, SG_RIDESC_FSLOCAL__PATH_PARENT_DIR, SG_pathname__sz(pPath_repo))  );
	VERIFY_ERR_CHECK(  SG_repo__create_repo_instance(pCtx,buf_descriptor_name,pvhPartialDescriptor,SG_TRUE,NULL,buf_repo_id,buf_admin_id,&pRepo)  );

    VERIFY_ERR_CHECK(  SG_repo__get_descriptor(pCtx, pRepo, &pvhRepoDescriptor_ref)  );
	VERIFY_ERR_CHECK(  SG_closet__descriptors__add_commit(pCtx, &ph, pvhRepoDescriptor_ref, SG_REPO_STATUS__NORMAL)  );

    SG_REPO_NULLFREE(pCtx, pRepo);

    VERIFY_ERR_CHECK(  SG_dir__list(pCtx, pPath_repo, NULL, NULL, NULL, &pDuring)  );
    VERIFY_ERR_CHECK(  SG_rbtree__count(pCtx, pDuring, &count_during)  );

    INFOP("", ("]Fwiw, creating the repo seems to have created %d new folder(s) on disk.[][", count_during-count_before));

    VERIFY_ERR_CHECK(  SG_repo__delete_repo_instance(pCtx, buf_descriptor_name)  );
	VERIFY_ERR_CHECK(  SG_closet__descriptors__remove(pCtx, buf_descriptor_name)  );

    VERIFY_ERR_CHECK(  SG_dir__list(pCtx, pPath_repo, NULL, NULL, NULL, &pAfter)  );
    VERIFY_ERR_CHECK(  SG_rbtree__count(pCtx, pAfter, &count_after)  );

    VERIFY_COND("", count_before==count_after);
    if(count_before==count_after)
    {
        SG_bool ok1;
        SG_bool ok2;
        const char * szBefore;
        const char * szAfter;
        VERIFY_ERR_CHECK(  SG_rbtree__iterator__first(pCtx, &pItBefore, pBefore, &ok1, &szBefore, NULL)  );
        VERIFY_ERR_CHECK(  SG_rbtree__iterator__first(pCtx, &pItAfter, pAfter, &ok2, &szAfter, NULL)  );
        while(ok1&&ok2)
        {
            VERIFY_COND("", strcmp(szBefore, szAfter)==0);
            VERIFY_ERR_CHECK(  SG_rbtree__iterator__next(pCtx, pItBefore, &ok1, &szBefore, NULL)  );
            VERIFY_ERR_CHECK(  SG_rbtree__iterator__next(pCtx, pItAfter, &ok2, &szAfter, NULL)  );
        }
        SG_RBTREE_ITERATOR_NULLFREE(pCtx, pItBefore);
        SG_RBTREE_ITERATOR_NULLFREE(pCtx, pItAfter);
    }

	SG_REPO__OPEN_REPO_INSTANCE(pCtx, buf_descriptor_name, &pRepo);
	VERIFY_COND("", SG_context__has_err(pCtx));
	VERIFY_COND("", pRepo==NULL);
	SG_context__err_reset(pCtx);

    SG_RBTREE_NULLFREE(pCtx, pBefore);
    SG_RBTREE_NULLFREE(pCtx, pDuring);
    SG_RBTREE_NULLFREE(pCtx, pAfter);

	SG_VHASH_NULLFREE(pCtx, pvhPartialDescriptor);
	SG_PATHNAME_NULLFREE(pCtx, pPath_repo);
    SG_NULLFREE(pCtx, pszRepoImpl);

    return;
fail:
	SG_VHASH_NULLFREE(pCtx, pvhPartialDescriptor);
	SG_PATHNAME_NULLFREE(pCtx, pPath_repo);
	SG_REPO_NULLFREE(pCtx, pRepo);
    SG_NULLFREE(pCtx, pszRepoImpl);
    SG_RBTREE_NULLFREE(pCtx, pBefore);
    SG_RBTREE_NULLFREE(pCtx, pDuring);
    SG_RBTREE_NULLFREE(pCtx, pAfter);
    SG_RBTREE_ITERATOR_NULLFREE(pCtx, pItBefore);
    SG_RBTREE_ITERATOR_NULLFREE(pCtx, pItAfter);
}

TEST_MAIN(u0032_repo)
{
	TEMPLATE_MAIN_START;

	BEGIN_TEST(  u0032_repo__test_ids(pCtx)  );
    BEGIN_TEST(  u0032_repo__test_delete(pCtx)  );

	TEMPLATE_MAIN_END;
}


text:
package org.artifactory.converters.helpers;

import org.artifactory.converters.ArtifactoryConverterAdapter;
import org.artifactory.version.CompoundVersionDetails;

import java.io.FileOutputStream;

/**
 * @author Gidi Shabat
 */
public class MockHomeConverter implements ArtifactoryConverterAdapter {
    private String parh;

    public MockHomeConverter(String parh) {
        this.parh = parh;
    }

    @Override
    public void convert(CompoundVersionDetails source, CompoundVersionDetails target) {
        try {
            FileOutputStream fileOutputStream = new FileOutputStream(parh);
            fileOutputStream.close();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    @Override
    public boolean isInterested(CompoundVersionDetails source, CompoundVersionDetails target) {
        return source.getVersion().before(target.getVersion());
    }

    @Override
    public void revert() {

    }

    @Override
    public void backup() {

    }

    @Override
    public void clean() {

    }
}


text:
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.DotNet.RemoteExecutor;
using Xunit;

namespace System.Diagnostics.Tests
{
    public class ProcessWaitingTests : ProcessTestBase
    {
        [Fact]
        [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
        public void MultipleProcesses_StartAllKillAllWaitAll()
        {
            const int Iters = 10;
            Process[] processes = Enumerable.Range(0, Iters).Select(_ => CreateProcessLong()).ToArray();

            foreach (Process p in processes) p.Start();
            foreach (Process p in processes) p.Kill();
            foreach (Process p in processes) Assert.True(p.WaitForExit(WaitInMS));
        }

        [Fact]
        [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
        public void MultipleProcesses_SerialStartKillWait()
        {
            const int Iters = 10;
            for (int i = 0; i < Iters; i++)
            {
                Process p = CreateProcessLong();
                p.Start();
                p.Kill();
                p.WaitForExit(WaitInMS);
            }
        }

        [Fact]
        [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
        public void MultipleProcesses_ParallelStartKillWait()
        {
            const int Tasks = 4, ItersPerTask = 10;
            Action work = () =>
            {
                for (int i = 0; i < ItersPerTask; i++)
                {
                    Process p = CreateProcessLong();
                    p.Start();
                    p.Kill();
                    p.WaitForExit(WaitInMS);
                }
            };
            Task.WaitAll(Enumerable.Range(0, Tasks).Select(_ => Task.Run(work)).ToArray());
        }

        [Theory]
        [InlineData(0)]  // poll
        [InlineData(10)] // real timeout
        public void CurrentProcess_WaitNeverCompletes(int milliseconds)
        {
            Assert.False(Process.GetCurrentProcess().WaitForExit(milliseconds));
        }

        [Fact]
        [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
        public void SingleProcess_TryWaitMultipleTimesBeforeCompleting()
        {
            Process p = CreateProcessLong();
            p.Start();

            // Verify we can try to wait for the process to exit multiple times
            Assert.False(p.WaitForExit(0));
            Assert.False(p.WaitForExit(0));

            // Then wait until it exits and concurrently kill it.
            // There's a race condition here, in that we really want to test
            // killing it while we're waiting, but we could end up killing it
            // before hand, in which case we're simply not testing exactly
            // what we wanted to test, but everything should still work.
            Task.Delay(10).ContinueWith(_ => p.Kill());
            Assert.True(p.WaitForExit(WaitInMS));
            Assert.True(p.WaitForExit(0));
        }

        [Theory]
        [InlineData(false)]
        [InlineData(true)]
        [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
        public async Task SingleProcess_WaitAfterExited(bool addHandlerBeforeStart)
        {
            Process p = CreateProcessLong();
            p.EnableRaisingEvents = true;

            var tcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
            if (addHandlerBeforeStart)
            {
                p.Exited += delegate { tcs.SetResult(true); };
            }
            p.Start();
            if (!addHandlerBeforeStart)
            {
                p.Exited += delegate { tcs.SetResult(true); };
            }

            p.Kill();
            Assert.True(await tcs.Task);

            Assert.True(p.WaitForExit(0));
        }

        [Theory]
        [InlineData(0)]
        [InlineData(1)]
        [InlineData(127)]
        public async Task SingleProcess_EnableRaisingEvents_CorrectExitCode(int exitCode)
        {
            using (Process p = CreateProcessPortable(RemotelyInvokable.ExitWithCode, exitCode.ToString()))
            {
                var tcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
                p.EnableRaisingEvents = true;
                p.Exited += delegate
                { tcs.SetResult(true); };
                p.Start();
                Assert.True(await tcs.Task);
                Assert.Equal(exitCode, p.ExitCode);
            }
        }

        [Fact]
        [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
        public void SingleProcess_CopiesShareExitInformation()
        {
            Process p = CreateProcessLong();
            p.Start();

            Process[] copies = Enumerable.Range(0, 3).Select(_ => Process.GetProcessById(p.Id)).ToArray();

            Assert.False(p.WaitForExit(0));
            p.Kill();
            Assert.True(p.WaitForExit(WaitInMS));

            foreach (Process copy in copies)
            {
                Assert.True(copy.WaitForExit(0));
            }
        }

        [Fact]
        [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting handle of child process running on UAP is not possible")]
        public void WaitForPeerProcess()
        {
            Process child1 = CreateProcessLong();
            child1.Start();

            Process child2 = CreateProcess(peerId =>
            {
                Process peer = Process.GetProcessById(int.Parse(peerId));
                Console.WriteLine("Signal");
                Assert.True(peer.WaitForExit(WaitInMS));
                return RemoteExecutor.SuccessExitCode;
            }, child1.Id.ToString());
            child2.StartInfo.RedirectStandardOutput = true;
            child2.Start();
            char[] output = new char[6];
            child2.StandardOutput.Read(output, 0, output.Length);
            Assert.Equal("Signal", new string(output)); // wait for the signal before killing the peer

            child1.Kill();
            Assert.True(child1.WaitForExit(WaitInMS));
            Assert.True(child2.WaitForExit(WaitInMS));

            Assert.Equal(RemoteExecutor.SuccessExitCode, child2.ExitCode);
        }

        [Fact]
        public void WaitForSignal()
        {
            const string expectedSignal = "Signal";
            const string successResponse = "Success";
            const int timeout = 30 * 1000; // 30 seconds, to allow for very slow machines

            Process p = CreateProcessPortable(RemotelyInvokable.WriteLineReadLine);
            p.StartInfo.RedirectStandardInput = true;
            p.StartInfo.RedirectStandardOutput = true;
            var mre = new ManualResetEventSlim(false);

            int linesReceived = 0;
            p.OutputDataReceived += (s, e) =>
            {
                if (e.Data != null)
                {
                    linesReceived++;

                    if (e.Data == expectedSignal)
                    {
                        mre.Set();
                    }
                }
            };

            p.Start();
            p.BeginOutputReadLine();

            Assert.True(mre.Wait(timeout));
            Assert.Equal(1, linesReceived);

            // Wait a little bit to make sure process didn't exit on itself
            Thread.Sleep(100);
            Assert.False(p.HasExited, "Process has prematurely exited");

            using (StreamWriter writer = p.StandardInput)
            {
                writer.WriteLine(successResponse);
            }

            Assert.True(p.WaitForExit(timeout), "Process has not exited");
            Assert.Equal(RemotelyInvokable.SuccessExitCode, p.ExitCode);
        }

        [Fact]
        [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not applicable on uap - RemoteInvoke does not give back process handle")]
        [ActiveIssue(15844, TestPlatforms.AnyUnix)]
        public void WaitChain()
        {
            Process root = CreateProcess(() =>
            {
                Process child1 = CreateProcess(() =>
                {
                    Process child2 = CreateProcess(() =>
                    {
                        Process child3 = CreateProcess(() => RemoteExecutor.SuccessExitCode);
                        child3.Start();
                        Assert.True(child3.WaitForExit(WaitInMS));
                        return child3.ExitCode;
                    });
                    child2.Start();
                    Assert.True(child2.WaitForExit(WaitInMS));
                    return child2.ExitCode;
                });
                child1.Start();
                Assert.True(child1.WaitForExit(WaitInMS));
                return child1.ExitCode;
            });
            root.Start();
            Assert.True(root.WaitForExit(WaitInMS));
            Assert.Equal(RemoteExecutor.SuccessExitCode, root.ExitCode);
        }

        [Fact]
        public void WaitForSelfTerminatingChild()
        {
            Process child = CreateProcessPortable(RemotelyInvokable.SelfTerminate);
            child.Start();
            Assert.True(child.WaitForExit(WaitInMS));
            Assert.NotEqual(RemoteExecutor.SuccessExitCode, child.ExitCode);
        }

        [Fact]
        public void WaitForInputIdle_NotDirected_ThrowsInvalidOperationException()
        {
            var process = new Process();
            Assert.Throws<InvalidOperationException>(() => process.WaitForInputIdle());
        }

        [Fact]
        public void WaitForExit_NotDirected_ThrowsInvalidOperationException()
        {
            var process = new Process();
            Assert.Throws<InvalidOperationException>(() => process.WaitForExit());
        }
    }
}


text:
package biz.arpius.acercade;

import utilidades.TextViewEx;
import biz.arpius.miningtool.R;
import android.content.Intent;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

public class AcercaDe extends FragmentActivity {

	TextView tituloAD = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE); //para no mostrar la barra de título
		setContentView(R.layout.activity_acerca_de);

		tituloAD = (TextView) findViewById(R.id.txtTituloAcercaDe);

		TextViewEx textoJustificado = (TextViewEx) findViewById(R.id.txtContenidoAcercaDe);
		textoJustificado.setText(getString(R.string.contenido_acerca_de), true);

		Typeface fuente = Typeface.createFromAsset(getAssets(), "tiza.ttf"); //fuente personalizada

		tituloAD.setTypeface(fuente);
	}

	@Override
	public void onBackPressed() {
		finish();
	}

	public void mostrarTwitter(View v) {
		Intent i = new Intent(android.content.Intent.ACTION_VIEW,
							Uri.parse("https://twitter.com/MiningTool") );
		startActivity(i);
	}

	public void mostrarGithub(View v) {
		Intent i = new Intent(android.content.Intent.ACTION_VIEW,
							Uri.parse("https://github.com/arpius") );
		startActivity(i);
	}

	public void enviarCorreo(View v) {
		String[] to = {"miningtool.app@gmail.com"};
        String[] cc = {"usuario@dominio.es"};

        mandarEmail(
        		to,
        		cc );
	}

	private void mandarEmail( String[] direccion, String[] cc ) {
        Intent i = new Intent(Intent.ACTION_SEND);

        i.setData( Uri.parse("mailto:") );
        i.putExtra(Intent.EXTRA_EMAIL, direccion);
        i.putExtra(Intent.EXTRA_CC, cc);
        i.setType("message/rfc822");

        startActivity( Intent.createChooser(i, "Email") );
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>tinyesb</artifactId>
        <groupId>org.tinyesb</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>jsshell</artifactId>

    <dependencies>
        <dependency>
            <groupId>org.tinyesb</groupId>
            <artifactId>orchestration</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>

</project>


text:
import re
import urllib
from scrapy.utils.url import urljoin_rfc
from six.moves.urllib_parse import urlparse

CSS_IMPORT = re.compile(r'''@import\s*["']([^"']+)["']''')
CSS_URL = re.compile(r'''\burl\(("[^"]+"|'[^']+'|[^"')][^)]+)\)''')
BAD_CSS = re.compile(r'''(-moz-binding|expression\s*\(|javascript\s*:)''', re.I)

def wrap_url(url, tabid, base=None):
    url = url.strip()
    referer = None
    if base:
        referer = urlparse(base.strip()).netloc
        url = urljoin_rfc(base, url)
    parsed = urlparse(url)
    referer = referer or parsed.netloc

    if parsed.scheme == 'data':
        return url  # TODO: process CSS inside data: urls
    if parsed.scheme not in ('http', 'https', 'ftp'):
        return 'data:text/plain,invalid_scheme'

    return "/proxy?" + urllib.urlencode({
        "url": url,
        "referer": referer,
        "tabid": tabid
    })

def process_css(css_source, tabid, base_uri):
    """
    Wraps urls in css source.

    >>> url = 'http://scrapinghub.com/style.css'
    >>> process_css('@import "{}"'.format(url), 0, url) # doctest: +ELLIPSIS
    '@import "/proxy?..."'
    """
    def _absolutize_css_import(match):
        return '@import "{}"'.format(wrap_url(match.group(1), tabid,
                                              base_uri).replace('"', '%22'))

    def _absolutize_css_url(match):
        url = match.group(1).strip("\"'")
        return 'url("{}")'.format(wrap_url(url, tabid,
                                           base_uri).replace('"', '%22'))

    css_source = CSS_IMPORT.sub(_absolutize_css_import, css_source)
    css_source = CSS_URL.sub(_absolutize_css_url, css_source)
    css_source = BAD_CSS.sub('portia-blocked', css_source)
    return css_source


text:
__author__ = "mozman <mozman@gmx.at>"

import unittest

from dxfwrite.tableentries import Layer
from dxfwrite import dxfstr, DXFEngine, const

class TestLayerTableEntry(unittest.TestCase):
    expected = "  0\nLAYER\n  2\nStandard\n 70\n0\n 62\n1\n  6\nCONTINUOUS\n"
    def test_create_table_entry(self):
        layer = Layer('Standard', linetype='CONTINUOUS')
        self.assertEqual(dxfstr(layer), self.expected)

    def test_layer_by_factory(self):
        layer = DXFEngine.layer('Standard', linetype='CONTINUOUS')
        self.assertEqual(dxfstr(layer), self.expected)

    def test_layer_off_on(self):
        layer = Layer('Standard', flags=0, color=-7)
        layer.on()
        self.assertEqual(layer['color'], 7)

    def test_layer_on_on(self):
        layer = Layer('Standard', flags=0, color=7)
        layer.on()
        self.assertEqual(layer['color'], 7)

    def test_layer_on_off(self):
        layer = Layer('Standard', flags=0, color=7)
        layer.off()
        self.assertEqual(layer['color'], -7)

    def test_layer_off_off(self):
        layer = Layer('Standard', flags=0, color=-7)
        layer.off()
        self.assertEqual(layer['color'], -7)

    def test_layer_lock(self):
        layer = Layer('Standard', flags=0)
        layer.lock()
        self.assertEqual(layer['flags'], const.STD_FLAGS_LAYER_LOCKED)

    def test_layer_unlock(self):
        layer = Layer('Standard', flags=const.STD_FLAGS_LAYER_LOCKED)
        layer.unlock()
        self.assertEqual(layer['flags'], 0)

    def test_layer_freeze(self):
        layer = Layer('Standard', flags=0)
        layer.freeze()
        self.assertEqual(layer['flags'], const.STD_FLAGS_LAYER_FROZEN)

    def test_layer_thaw(self):
        layer = Layer('Standard', flags=const.STD_FLAGS_LAYER_FROZEN)
        layer.thaw()
        self.assertEqual(layer['flags'], 0)

if __name__=='__main__':
    unittest.main()


text:
package city.seattle.api.dto.pagination;

/**
 * Created by niuqinghua on 2014/9/16.
 */
public class PaginationQueryDto {

    private int pageNo;

    private int pageSize;

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    @Override
    public String toString() {
        return "PaginationQuery{" +
                "pageNo=" + pageNo +
                ", pageSize=" + pageSize +
                '}';
    }
}


text:
require "bricky/bricks/base"

require "bricky/bricks/helper"
require "bricky/bricks/bundle"
require "bricky/bricks/debian"
require "bricky/bricks/mounts"
require "bricky/bricks/rails"
require "bricky/bricks/ruby"
require "bricky/bricks/version"
require 'bricky/bricks/dotenv'
require 'bricky/bricks/system'

module Bricky
  module Bricks
    extend self

    def resolve
      default_bricks + Bricky.config.bricks.collect do |name, config|
       resolve_and_initialize(name, config)
      end.uniq
    end

    private
      def default_bricks
        [Bricky::Bricks::Helper.new({})]
      end

      def resolve_and_initialize(name, config)
        Bricky::Bricks.const_get("#{name.to_s.capitalize}").new(config)
      end
  end
end


text:
<?php

declare(strict_types=1);

namespace Picodexter\ParameterEncryptionBundle\Tests\Console\Processor;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Picodexter\ParameterEncryptionBundle\Console\Processor\TransformedKey;
use Picodexter\ParameterEncryptionBundle\Console\Processor\TransformedKeyFactory;
use Picodexter\ParameterEncryptionBundle\Encryption\Value\Encoding\Base64EncoderInterface;

class TransformedKeyFactoryTest extends TestCase
{
    /**
     * @var Base64EncoderInterface|MockObject
     */
    private $encoder;

    /**
     * @var TransformedKeyFactory
     */
    private $factory;

    /**
     * PHPUnit: setUp.
     */
    public function setUp()
    {
        $this->encoder = $this->createBase64EncoderInterfaceMock();

        $this->factory = new TransformedKeyFactory($this->encoder);
    }

    /**
     * PHPUnit: tearDown.
     */
    public function tearDown()
    {
        $this->factory = null;
        $this->encoder = null;
    }

    public function testCreateTransformedKeySuccess()
    {
        $originalKey = 'some original key';
        $finalKey = 'some final key';
        $finalKeyEncoded = 'some encoded final key';

        $this->encoder->expects($this->once())
            ->method('encode')
            ->with($this->identicalTo($finalKey))
            ->will($this->returnValue($finalKeyEncoded));

        $transformedKey = $this->factory->createTransformedKey($originalKey, $finalKey);

        $this->assertInstanceOf(TransformedKey::class, $transformedKey);
        $this->assertSame($finalKey, $transformedKey->getFinalKey());
        $this->assertSame($finalKeyEncoded, $transformedKey->getFinalKeyEncoded());
        $this->assertSame($originalKey, $transformedKey->getOriginalKey());
    }

    /**
     * Create mock for Base64EncoderInterface.
     *
     * @return Base64EncoderInterface|MockObject
     */
    private function createBase64EncoderInterfaceMock()
    {
        return $this->getMockBuilder(Base64EncoderInterface::class)->getMock();
    }
}


text:
{% load stylesheet %}
{% load bootstrap3 %}
{% load i18n %}
{# This file is meant to be included in gloss_detail.html #}
{# The purpose of this file is to make gloss_detail easier to handle #}

{% if perms.dictionary.view_advanced_properties %}

                {# Translators: #}

                    {% blocktrans %}Morphology{% endblocktrans %}

                    {# Translators: #}
                    {% blocktrans %}Type{% endblocktrans %}
                    {# Translators: #}
                    {% blocktrans %}Morpheme{% endblocktrans %}

                {% for morphdef in gloss.parent_glosses.all %}

                                        {# Translators: Header2 #}

{% blocktrans %}Delete This Morphology{% endblocktrans %}

                                        {# Translators: Question #}

{% blocktrans %}Are you sure you want to delete this? This cannot be
                                            undone.{% endblocktrans %}

                                    <form action='{% url "dictionary:update_gloss" gloss.id %}' method='post'>
                                        {% csrf_token %}
                                        <input type='hidden' name='id'
                                               value='morphology-definition-delete_{{morphdef.id}}'>
                                        <input type='hidden' name='value' value='confirmed'>

                                            {# Translators: Button #}
                                            <button type="button" class="btn btn-default" data-dismiss="modal">
                                                {% blocktrans %}Cancel{% endblocktrans %}
                                            </button>
                                            {# Translators: Submit button #}
                                            <input type="submit" class="btn btn-primary"
                                                   value='{% blocktrans %}Confirm Delete{% endblocktrans %}'>

                                    </form>

                        {{morphdef.role}}

                        {{morphdef.morpheme}}

                    (view)

                {% endfor %}

            {% if perms.dictionary.change_gloss %}
            <form id='add_morphologydefinition_form' method='post' action='{% url 'dictionary:add_morphologydefinition' %}'>
                {% csrf_token %}
                <input type='hidden' name='parent_gloss_id' value='{{gloss.pk}}'>

                        {{morphologyform.role}}
                        {# Translators: Placeholder #}
                        <input class='form-control glosstypeahead'
                                   placeholder='{% blocktrans %}Gloss{% endblocktrans %}'
                                   name='morpheme_id'>
                        {# Translators: Submit button #}
                        <input class='btn btn-primary'
                                   value='{% blocktrans %}Add Morphology Definition{% endblocktrans %}' type='submit'>

            </form>
            {% endif %}

                {# Translators: #}

                    {% blocktrans %}Phonology{% endblocktrans %}

                {% for value,name,label,kind in phonology_fields %}

                    {{label}}
{% if kind == "check" and value %}Yes{% elif kind == "check" %}No{% else %}{% value value %}{% endif %}

                {% endfor %}

                {# Translators: #}

                    {% blocktrans %}Semantics{% endblocktrans %}

                {% for value,name,label,kind in semantics_fields %}

                    {{label}}
                    {% value value %}

                {% endfor %}

                {# Translators: #}

                    {% blocktrans %}Relations to Other Signs{% endblocktrans %}

                {% for rel in gloss.relation_sources.all %}

                                        {# Translators: Header2 #}

                                            {% blocktrans %}Delete This Relation{% endblocktrans %}

                                        {# Translators: #}

{% blocktrans trimmed %}This action will delete the {{rel.get_role_display}}
                                            relation between {{rel.source}} and {{rel.target}}. It cannot be
                                            undone.{% endblocktrans %}

                                    <form action='{% url "dictionary:update_gloss" gloss.id %}' method='post'>
                                        {% csrf_token %}
                                        <input type='hidden' name='id' value='relationdelete_{{rel.id}}'>
                                        <input type='hidden' name='value' value='confirmed'>

                                            {# Translators: Button #}
                                            <button type="button" class="btn btn-default" data-dismiss="modal">
                                                {% blocktrans %}Cancel{% endblocktrans %}
                                            </button>
                                            {# Translators: Submit button #}
                                            <input type="submit" class="btn btn-primary"
                                                   value='{% blocktrans %}Confirm Delete{% endblocktrans %}'>

                                    </form>

                    {{rel.role}}
                    {{rel.target}}
                    (view)

                {% endfor %}

            {% if perms.dictionary.change_gloss %}
            <form id='add_relation_form' method='post' action='{% url 'dictionary:add_relation' %}'>
            {% csrf_token %}
            <input type='hidden' name='sourceid' value='{{gloss.pk}}'>

                    {{relationform.role}}
                    {# Translators: #}
                    <input class='form-control glosstypeahead'
                               placeholder='{% blocktrans %}ID Gloss/Annotation ID Gloss{% endblocktrans %}'
                               name='targetid'>
                    {# Translators: Submit button #}
                    <input class='btn btn-primary' value='{% blocktrans %}Add Relation{% endblocktrans %}'
                               type='submit'>

            </form>
            {% endif %}

                {# Translators: #}

                    {% blocktrans %}Relations to Foreign Signs{% endblocktrans %}

                    {# Translators: Loan from another language(?) #}
                    {% blocktrans %}Loan{% endblocktrans %}
                    {# Translators: #}
                    {% blocktrans %}Related Language{% endblocktrans %}
                    {# Translators: Equivalent Gloss in related language #}
                    {% blocktrans %}Gloss in related language{% endblocktrans %}

                {% for rel in gloss.relationtoforeignsign_set.all %}

                                        {# Translators: Header2 #}

                                            {% blocktrans %}Delete This Relation{% endblocktrans %}

                                        {# Translators: Question #}

{% blocktrans %}Are you sure you want to delete this? This cannot be
                                            undone.{% endblocktrans %}

                                    <form action='{% url "dictionary:update_gloss" gloss.id %}' method='post'>
                                        {% csrf_token %}
                                        <input type='hidden' name='id' value='relationforeigndelete_{{rel.id}}'>
                                        <input type='hidden' name='value' value='confirmed'>

                                            {# Translators: Button #}
                                            <button type="button" class="btn btn-default" data-dismiss="modal">
                                                {% blocktrans %}Cancel{% endblocktrans %}
                                            </button>
                                            {# Translators: Submit button #}
                                            <input type="submit" class="btn btn-primary"
                                                   value='{% blocktrans %}Confirm Delete{% endblocktrans %}'>

                                    </form>

                    {{rel.loan}}
                    {{rel.other_lang}}

                        {{rel.other_lang_gloss}}

                    {% endfor %}

            {% if perms.dictionary.change_gloss %}
            <form id='add_relationtoforeignsign_form' method='post' action='{% url 'dictionary:add_relationtoforeignsign' %}'>
            {% csrf_token %}
            <input type='hidden' name='sourceid' value='{{gloss.pk}}'>

                    <input class='checkbox' name='loan' type='checkbox'>
                    {# Translators: #}
                    <input class='form-control'
                               placeholder='{% blocktrans %}Related language{% endblocktrans %}' name='other_lang'
                               type='text'>
                    {# Translators: #}
                    <input class='form-control'
                               placeholder='{% blocktrans %}Gloss in related language{% endblocktrans %}'
                               name='other_lang_gloss' type='text'>
                    {# Translators: #}
                    <input class='btn btn-primary'
                               value='{% blocktrans %}Add Relation to Foreign Sign{% endblocktrans %}'
                               type='submit'>

            </form>
            {% endif %}

                {# Translators: #}

                    {% blocktrans %}Frequency{% endblocktrans %}

                {% for value,name,label,kind in frequency_fields %}

                    {{label}}
                    {% value value %}

                {% endfor %}

{% endif %}


text:
package org.dita.dost;

import org.junit.Ignore;
import org.junit.Test;

import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.stream.Collectors;

import static java.util.Arrays.asList;
import static org.dita.dost.AbstractIntegrationTest.Transtype.*;
import static org.junit.Assert.fail;

public abstract class IntegrationTest extends AbstractIntegrationTest {

    public abstract AbstractIntegrationTest builder();

    @Test
    public void testreltableHeaders() throws Throwable {
        builder().name("reltableHeaders")
                .transtype(PREPROCESS)
                .input(Paths.get("reltableheader.ditamap"))
                .test();
    }

    @Test
    public void testreltableTextlink() throws Throwable {
        builder().name("reltableTextlink")
                .transtype(PREPROCESS)
                .input(Paths.get("1132.ditamap"))
                .errorCount(1)
                .test();
    }

    @Test
    public void testlocktitle() throws Throwable {
        builder().name("locktitle")
                .transtype(PREPROCESS)
                .input(Paths.get("TestingLocktitle.ditamap"))
                .test();
    }

    @Test
    public void testchunk_uplevel() throws Throwable {
        builder().name("chunk_uplevel")
                .transtype(PREPROCESS)
                .input(Paths.get("main/chunkup.ditamap"))
                .put("outer.control", "quiet")
                .test();
    }

    @Test
    public void testcopyto_extensions_metadata() throws Throwable {
        builder().name("copyto_extensions_metadata")
                .transtype(PREPROCESS)
                .input(Paths.get("TC1.ditamap"))
                .warnCount(3)
                .test();
    }

    @Test
    public void testcopyto() throws Throwable {
        builder().name("copyto")
                .transtype(PREPROCESS)
                .input(Paths.get("TC2.ditamap"))
                .warnCount(2)
                .test();
    }

    @Test
    public void testcopyto_sametarget() throws Throwable {
        builder().name("copyto_sametarget")
                .transtype(PREPROCESS)
                .input(Paths.get("TC3.ditamap"))
                .warnCount(3)
                .test();
    }

    @Test
    public void testcopyto_circulartarget() throws Throwable {
        builder().name("copyto_circulartarget")
                .transtype(PREPROCESS)
                .input(Paths.get("TC4.ditamap"))
                .test();
    }

    @Test
    public void testcopyto_linktarget() throws Throwable {
        builder().name("copyto_linktarget")
                .transtype(PREPROCESS)
                .input(Paths.get("linktarget.ditamap"))
                .errorCount(2)
                .warnCount(0)
                .test();
    }

    @Test
    public void testcopyto_sametarget2() throws Throwable {
        builder().name("copyto_sametarget2")
                .transtype(PREPROCESS)
                .input(Paths.get("TC6.ditamap"))
                .warnCount(4)
                .test();
    }

    @Test
    public void testtable_colwidth() throws Throwable {
        builder().name("table_colwidth")
                .transtype(PREPROCESS)
                .input(Paths.get("test.dita"))
                .test();
    }

    @Test
    public void testconkeyref_push() throws Throwable {
        builder().name("conkeyref_push")
                .transtype(PREPROCESS)
                .input(Paths.get("conref-push-test.ditamap"))
                .put("dita.ext", ".dita")
                .test();
    }

    @Test
    public void testlink_foreignshortdesc() throws Throwable {
        builder().name("link_foreignshortdesc")
                .transtype(PREPROCESS)
                .input(Paths.get("main.ditamap"))
                .put("validate", "false")
                .warnCount(1)
                .test();
    }

    @Test
    public void testconref_push() throws Throwable {
        builder().name("conref_push")
                .transtype(PREPROCESS)
                .input(Paths.get("push.ditamap"))
                .put("dita.ext", ".dita")
                .warnCount(2)
                .test();
    }

    @Test
    public void testconrefend() throws Throwable {
        builder().name("conrefend")
                .transtype(PREPROCESS)
                .input(Paths.get("range.ditamap"))
                .test();
    }

    @Test
    public void testmapref_topicrefID() throws Throwable {
        builder().name("mapref_topicrefID")
                .transtype(PREPROCESS)
                .input(Paths.get("bookmap.ditamap"))
                .test();
    }

    @Test
    public void testmapref_to_conref() throws Throwable {
        builder().name("mapref_to_conref")
                .transtype(PREPROCESS)
                .input(Paths.get("root.ditamap"))
                .test();
    }

    @Test
    public void testMetadataInheritance() throws Throwable {
        test("MetadataInheritance");
    }

    @Test
    public void testmapref_reltables() throws Throwable {
        builder().name("mapref_reltables")
                .transtype(PREPROCESS)
                .input(Paths.get("main.ditamap"))
                .test();
    }

    @Test
    public void testcoderef_source() throws Throwable {
        builder().name("coderef_source")
                .transtype(PREPROCESS)
                .input(Paths.get("mp.ditamap"))
                .put("transtype", "preprocess")
                .put("dita.ext", ".dita")
                .put("validate", "false")
                .warnCount(1)
                .test();
    }

    @Test
    public void testconref() throws Throwable {
        builder().name("conref")
                .transtype(PREPROCESS)
                .input(Paths.get("lang-common1.dita"))
                .put("validate", "false")
                .warnCount(2)
                .test();
    }

    @Test
    public void testconref_to_specialization() throws Throwable {
        builder().name("conref_to_specialization")
                .transtype(PREPROCESS)
                .input(Paths.get("conref_to_specialization.dita"))
                .put("validate", "false")
                .warnCount(1)
                .test();
    }

    @Test
    public void testpushAfter_between_Specialization() throws Throwable {
        builder().name("pushAfter_between_Specialization")
                .transtype(PREPROCESS)
                .input(Paths.get("pushAfter.ditamap"))
//                        .put("validate", "false")
                .test();
    }

    @Test
    public void testpushAfter_with_crossRef() throws Throwable {
        builder().name("pushAfter_with_crossRef")
                .transtype(PREPROCESS)
                .input(Paths.get("pushAfter.ditamap"))
//                        .put("validate", "false")
                .test();
    }

    @Test
    public void testpushAfter_with_InvalidTarget() throws Throwable {
        builder().name("pushAfter_with_InvalidTarget")
                .transtype(PREPROCESS)
                .input(Paths.get("pushAfter.ditamap"))
//                        .put("validate", "false")
                .warnCount(1)
                .test();
    }

    @Test
    public void testpushAfter_without_conref() throws Throwable {
        builder().name("pushAfter_without_conref")
                .transtype(PREPROCESS)
                .input(Paths.get("pushAfter.ditamap"))
//                        .put("validate", "false")
                .test();
    }

    @Test
    public void testsimple_pushAfter() throws Throwable {
        builder().name("simple_pushAfter")
                .transtype(PREPROCESS)
                .input(Paths.get("pushAfter.ditamap"))
//                        .put("validate", "false")
                .test();
    }

    @Test
    public void testpushBefore_between_Specialization() throws Throwable {
        builder().name("pushBefore_between_Specialization")
                .transtype(PREPROCESS)
                .input(Paths.get("pushBefore.ditamap"))
//                        .put("validate", "false")
                .test();
    }

    @Test
    public void testpushBefore_with_crossRef() throws Throwable {
        builder().name("pushBefore_with_crossRef")
                .transtype(PREPROCESS)
                .input(Paths.get("pushBefore.ditamap"))
//                        .put("validate", "false")
                .warnCount(1)
                .test();
    }

    @Test
    public void testpushBefore_with_InvalidTarget() throws Throwable {
        builder().name("pushBefore_with_InvalidTarget")
                .transtype(PREPROCESS)
                .input(Paths.get("pushBefore.ditamap"))
//                        .put("validate", "false")
                .warnCount(1)
                .test();
    }

    @Test
    public void testpushBefore_without_conref() throws Throwable {
        builder().name("pushBefore_without_conref")
                .transtype(PREPROCESS)
                .input(Paths.get("pushBefore.ditamap"))
//                        .put("validate", "false")
                .test();
    }

    @Test
    public void testsimple_pushBefore() throws Throwable {
        builder().name("simple_pushBefore")
                .transtype(PREPROCESS)
                .input(Paths.get("pushBefore.ditamap"))
//                        .put("validate", "false")
                .test();
    }

    @Test
    public void testpushReplace_between_Specialization() throws Throwable {
        builder().name("pushReplace_between_Specialization")
                .transtype(PREPROCESS)
                .input(Paths.get("pushReplace.ditamap"))
//                        .put("validate", "false")
                .test();
    }

    @Test
    public void testpushReplace_with_crossRef() throws Throwable {
        builder().name("pushReplace_with_crossRef")
                .transtype(PREPROCESS)
                .input(Paths.get("pushReplace.ditamap"))
//                        .put("validate", "false")
                .test();
    }

    @Test
    public void testpushReplace_with_InvalidTarget() throws Throwable {
        builder().name("pushReplace_with_InvalidTarget")
                .transtype(PREPROCESS)
                .input(Paths.get("pushReplace.ditamap"))
//                        .put("validate", "false")
                .warnCount(1).errorCount(4)
                .test();
    }

    @Test
    public void testpushReplace_without_conref() throws Throwable {
        builder().name("pushReplace_without_conref")
                .transtype(PREPROCESS)
                .input(Paths.get("pushReplace.ditamap"))
//                        .put("validate", "false")
                .test();
    }

    @Test
    public void testsimple_pushReplace() throws Throwable {
        builder().name("simple_pushReplace")
                .transtype(PREPROCESS)
                .input(Paths.get("pushReplace.ditamap"))
//                        .put("validate", "false")
                .test();
    }

    @Test
    public void testconrefbreaksxref() throws Throwable {
        builder().name("conrefbreaksxref")
                .transtype(PREPROCESS)
                .input(Paths.get("conrefbreaksxref.dita"))
                .test();
    }

    @Test
    public void testconrefinsubmap() throws Throwable {
        builder().name("conrefinsubmap")
                .transtype(PREPROCESS)
                .input(Paths.get("rootmap.ditamap"))
                .test();
    }

    @Test
    public void testconrefmissingfile() throws Throwable {
        builder().name("conrefmissingfile")
                .transtype(PREPROCESS)
                .input(Paths.get("badconref.dita"))
                .put("validate", "false")
                .warnCount(1)
                .errorCount(2)
                .test();
    }

    @Test
    public void testcontrolValueFile1() throws Throwable {
        builder().name("map13_filter1")
                .transtype(PREPROCESS)
                .input(Paths.get("map13.ditamap"))
                .put("args.filter", Paths.get("filter1.ditaval"))
                .test();
    }

    @Test
    public void testcontrolValueFile2() throws Throwable {
        builder().name("map13_filter2")
                .transtype(PREPROCESS)
                .input(Paths.get("map13.ditamap"))
                .put("args.filter", Paths.get("filter2.ditaval"))
                .test();
    }

    @Test
    public void testcontrolValueFile3() throws Throwable {
        builder().name("map13_filter3")
                .transtype(PREPROCESS)
                .input(Paths.get("map13.ditamap"))
                .put("args.filter", Paths.get("filter3.ditaval"))
                .test();
    }

    @Test
    public void testcontrolValueFile4() throws Throwable {
        builder().name("map31_filter_multi")
                .transtype(PREPROCESS)
                .input(Paths.get("map31.ditamap"))
                .put("args.filter", Paths.get("filter_multi.ditaval"))
                .warnCount(1)
                .test();
    }

    @Test
    public void testcontrolValueFile5() throws Throwable {
        builder().name("map32_filter_multi")
                .transtype(PREPROCESS)
                .input(Paths.get("map32.ditamap"))
                .put("args.filter", Paths.get("filter_multi.ditaval"))
                .warnCount(1)
                .test();
    }

    @Test
    public void testcontrolValueFile6() throws Throwable {
        builder().name("map33_filter2")
                .transtype(PREPROCESS)
                .input(Paths.get("map33.ditamap"))
                .put("args.filter", Paths.get("filter2.ditaval"))
                .test();
    }

    @Test
    public void testcontrolValueFile7() throws Throwable {
        builder().name("map33_filter3")
                .transtype(PREPROCESS)
                .input(Paths.get("map33.ditamap"))
                .put("args.filter", Paths.get("filter3.ditaval"))
                .test();
    }

    // TODO Move the Eclipse Help plugin
    @Test
    @Ignore
    public void testexportanchors() throws Throwable {
        builder().name("exportanchors")
                .transtype(PREPROCESS)
                .input(Paths.get("test.ditamap"))
                .put("transtype", "eclipsehelp")
                .test();
    }

    @Test
    public void testkeyref() throws Throwable {
        builder().name("keyref")
                .transtype(PREPROCESS)
                .input(Paths.get("test.ditamap"))
                .test();
    }

    @Test
    public void testmapref() throws Throwable {
        builder().name("mapref")
                .transtype(PREPROCESS)
                .input(Paths.get("test.ditamap"))
                .put("generate-debug-attributes", "false")
                .test();
    }

    @Test
    public void testuplevelslink() throws Throwable {
        builder().name("uplevelslink")
                .transtype(PREPROCESS)
                .input(Paths.get("main/uplevel-in-topic.ditamap"))
                .put("outer.control", "quiet")
                .test();
    }

    @Test
    public void testuplevelslinkOnlytopic() throws Throwable {
        builder().name("uplevelslink")
                .transtype(PREPROCESS)
                .input(Paths.get("main/uplevel-in-topic.ditamap"))
                .put("outer.control", "quiet")
                .put("onlytopic.in.map", "true")
                .test();
    }

    @Test
    public void testmappull_topicid() throws Throwable {
        builder().name("mappull-topicid")
                .transtype(PREPROCESS)
                .input(Paths.get("reftopicid.ditamap"))
                .put("validate", "false")
                .warnCount(1)
                .test();
    }

    @Test
    public void testCrawlTopicPreprocess() throws Throwable {
        builder().name("crawl_topic")
                .transtype(PREPROCESS)
                .input(Paths.get("input.ditamap"))
                .put("link-crawl", "topic")
                .test();
    }

    @Test
    public void testCrawlMapPreprocess() throws Throwable {
        builder().name("crawl_map")
                .transtype(PREPROCESS)
                .input(Paths.get("input.ditamap"))
                .put("link-crawl", "map")
                .errorCount(2)
                .warnCount(0)
                .test();
    }

    @Test
    public void testRng() throws Throwable {
        builder().name("rng")
                .transtype(PREPROCESS)
                .input(Paths.get("root.ditamap"))
                .test();
    }

    @Test
    public void resource_map() throws Throwable {
        builder().name("resource_map")
                .transtype(PREPROCESS)
                .input(Paths.get("map.ditamap"))
                .put("args.resources", Paths.get("keys.ditamap"))
                .test();
    }

    @Test
    public void resource_topic() throws Throwable {
        builder().name("resource_topic")
                .transtype(PREPROCESS)
                .input(Paths.get("topic.dita"))
                .put("args.resources", Paths.get("keys.ditamap"))
                .test();
    }
}


text:
  <title></title>

    <wicket:extend>

          <wicket:message key="lastLoginDate"/>:

          <wicket:message key="failedLogins"/>:

          <wicket:message key="changePwdDate"/>:

          <wicket:message key="tokenExpireTime"/>

          <wicket:message key="token"/>:

    </wicket:extend>