text:
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
import { Directive, Self } from '@angular/core';
import { ControlContainer } from './control_container';
import { NgControl } from './ng_control';
export var AbstractControlStatus = (function () {
    /**
     * @param {?} cd
     */
    function AbstractControlStatus(cd) {
        this._cd = cd;
    }
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassUntouched", {
        /**
         * @return {?}
         */
        get: function () { return this._cd.control ? this._cd.control.untouched : false; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassTouched", {
        /**
         * @return {?}
         */
        get: function () { return this._cd.control ? this._cd.control.touched : false; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassPristine", {
        /**
         * @return {?}
         */
        get: function () { return this._cd.control ? this._cd.control.pristine : false; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassDirty", {
        /**
         * @return {?}
         */
        get: function () { return this._cd.control ? this._cd.control.dirty : false; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassValid", {
        /**
         * @return {?}
         */
        get: function () { return this._cd.control ? this._cd.control.valid : false; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassInvalid", {
        /**
         * @return {?}
         */
        get: function () { return this._cd.control ? this._cd.control.invalid : false; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassPending", {
        /**
         * @return {?}
         */
        get: function () { return this._cd.control ? this._cd.control.pending : false; },
        enumerable: true,
        configurable: true
    });
    return AbstractControlStatus;
}());
function AbstractControlStatus_tsickle_Closure_declarations() {
    /** @type {?} */
    AbstractControlStatus.prototype._cd;
}
export var /** @type {?} */ ngControlStatusHost = {
    '[class.ng-untouched]': 'ngClassUntouched',
    '[class.ng-touched]': 'ngClassTouched',
    '[class.ng-pristine]': 'ngClassPristine',
    '[class.ng-dirty]': 'ngClassDirty',
    '[class.ng-valid]': 'ngClassValid',
    '[class.ng-invalid]': 'ngClassInvalid',
    '[class.ng-pending]': 'ngClassPending',
};
/**
 *  Directive automatically applied to Angular form controls that sets CSS classes
  * based on control status (valid/invalid/dirty/etc).
  * *
 */
export var NgControlStatus = (function (_super) {
    __extends(NgControlStatus, _super);
    /**
     * @param {?} cd
     */
    function NgControlStatus(cd) {
        _super.call(this, cd);
    }
    NgControlStatus.decorators = [
        { type: Directive, args: [{ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost },] },
    ];
    /** @nocollapse */
    NgControlStatus.ctorParameters = function () { return [
        { type: NgControl, decorators: [{ type: Self },] },
    ]; };
    return NgControlStatus;
}(AbstractControlStatus));
function NgControlStatus_tsickle_Closure_declarations() {
    /** @type {?} */
    NgControlStatus.decorators;
    /**
     * @nocollapse
     * @type {?}
     */
    NgControlStatus.ctorParameters;
}
/**
 *  Directive automatically applied to Angular form groups that sets CSS classes
  * based on control status (valid/invalid/dirty/etc).
  * *
 */
export var NgControlStatusGroup = (function (_super) {
    __extends(NgControlStatusGroup, _super);
    /**
     * @param {?} cd
     */
    function NgControlStatusGroup(cd) {
        _super.call(this, cd);
    }
    NgControlStatusGroup.decorators = [
        { type: Directive, args: [{
                    selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',
                    host: ngControlStatusHost
                },] },
    ];
    /** @nocollapse */
    NgControlStatusGroup.ctorParameters = function () { return [
        { type: ControlContainer, decorators: [{ type: Self },] },
    ]; };
    return NgControlStatusGroup;
}(AbstractControlStatus));
function NgControlStatusGroup_tsickle_Closure_declarations() {
    /** @type {?} */
    NgControlStatusGroup.decorators;
    /**
     * @nocollapse
     * @type {?}
     */
    NgControlStatusGroup.ctorParameters;
}
//# sourceMappingURL=ng_control_status.js.map


text:
#ifndef SocketIOClient_H
#define SocketIOClient_H

#include <Arduino.h>
#include <Client.h>
#include <SPI.h>

#include <ArduinoJson.h>

#include "HashMap.h"

//Length of static data buffers
#define DATA_BUFFER_LEN 200
#define SID_LEN 24

//Max size of the HashTable
#define HASH_SIZE 20

class SocketIOClient {
	public:
		SocketIOClient(Client& client);
		//Public connection methods
		bool connect(char* hostname, int port = 80, char* resource = "socket.io", char* nsp = "/");
		//Public event handling methods
		void setEventHandler(char* eventName, void (*handler)(Client& client, JsonArray& data));
		//Public data emitting methods
		void emit(char* event, char* data);
		//Monitoring for incoming data
		void monitor();

	private:
		//Connection attributes
		Client& client;
		char* hostname;
		int port;
		char* resource;
		char* nsp;
		char sid[SID_LEN];
		//Incoming data reading attributes
		char databuffer[DATA_BUFFER_LEN];
		char* dataptr;
		//Event handling attributes
		int nbEvent;
		static HashType<char*, void(*)(Client& client, JsonArray& data)> hashRawArray[HASH_SIZE];
		static HashMap<char*, void(*)(Client& client, JsonArray& data)> eventHandlers;

		//Private incoming data reading methods
		bool waitForInput();
		void eatHeader();
		void readInput();
};

#endif

redpajama_set_name: RedPajamaGithub


text:
var ShaderUtils = {

	lib: {

		/* -------------------------------------------------------------------------
		//	Fresnel shader
		//	- based on Nvidia Cg tutorial
		 ------------------------------------------------------------------------- */

		'fresnel': {

		uniforms: {

		"mRefractionRatio": { type: "f", value: 1.02 },
		"mFresnelBias": { type: "f", value: 0.1 },
		"mFresnelPower": { type: "f", value: 2.0 },
		"mFresnelScale": { type: "f", value: 1.0 },
		"tCube": { type: "t", value: 1, texture: null }

		},

		fragment_shader: [

		"uniform samplerCube tCube;",

		"varying vec3 vReflect;",
		"varying vec3 vRefract[3];",
		"varying float vReflectionFactor;",

		"void main() {",

			"vec4 reflectedColor = textureCube( tCube, vec3( -vReflect.x, vReflect.yz ) );",
			"vec4 refractedColor = vec4( 1.0, 1.0, 1.0, 1.0 );",

			"refractedColor.r = textureCube( tCube, vec3( -vRefract[0].x, vRefract[0].yz ) ).r;",
			"refractedColor.g = textureCube( tCube, vec3( -vRefract[1].x, vRefract[1].yz ) ).g;",
			"refractedColor.b = textureCube( tCube, vec3( -vRefract[2].x, vRefract[2].yz ) ).b;",
			"refractedColor.a = 1.0;",

			"gl_FragColor = mix( refractedColor, reflectedColor, clamp( vReflectionFactor, 0.0, 1.0 ) );",

		"}"

		].join("\n"),

		vertex_shader: [

		"uniform float mRefractionRatio;",
		"uniform float mFresnelBias;",
		"uniform float mFresnelScale;",
		"uniform float mFresnelPower;",

		"varying vec3 vReflect;",
		"varying vec3 vRefract[3];",
		"varying float vReflectionFactor;",

		"void main() {",

			"vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",
			"vec4 mPosition = objectMatrix * vec4( position, 1.0 );",

			"vec3 nWorld = normalize ( mat3( objectMatrix[0].xyz, objectMatrix[1].xyz, objectMatrix[2].xyz ) * normal );",

			"vec3 I = mPosition.xyz - cameraPosition;",

			"vReflect = reflect( I, nWorld );",
			"vRefract[0] = refract( normalize( I ), nWorld, mRefractionRatio );",
			"vRefract[1] = refract( normalize( I ), nWorld, mRefractionRatio * 0.99 );",
			"vRefract[2] = refract( normalize( I ), nWorld, mRefractionRatio * 0.98 );",
			"vReflectionFactor = mFresnelBias + mFresnelScale * pow( 1.0 + dot( normalize( I ), nWorld ), mFresnelPower );",

			"gl_Position = projectionMatrix * mvPosition;",

		"}"

		].join("\n")

		},

		/* -------------------------------------------------------------------------
		//	Normal map shader
		//		- Blinn-Phong
		//		- normal + diffuse + AO + displacement maps
		//		- 1 point and 1 directional lights
		 ------------------------------------------------------------------------- */

		'normal' : {

		uniforms: {

		"enableAO": { type: "i", value: 0 },
		"enableDiffuse": { type: "i", value: 0 },

		"tDiffuse": { type: "t", value: 0, texture: null },
		"tNormal": { type: "t", value: 2, texture: null },
		"tAO": { type: "t", value: 3, texture: null },

		"uNormalScale": { type: "f", value: 1.0 },

		"tDisplacement": { type: "t", value: 4, texture: null },
		"uDisplacementBias": { type: "f", value: -0.5 },
		"uDisplacementScale": { type: "f", value: 2.5 },

		"uPointLightPos": { type: "v3", value: new THREE.Vector3() },
		"uPointLightColor": { type: "c", value: new THREE.Color( 0xeeeeee ) },

		"uDirLightPos":	{ type: "v3", value: new THREE.Vector3() },
		"uDirLightColor": { type: "c", value: new THREE.Color( 0xeeeeee ) },

		"uAmbientLightColor": { type: "c", value: new THREE.Color( 0x050505 ) },

		"uDiffuseColor": { type: "c", value: new THREE.Color( 0xeeeeee ) },
		"uSpecularColor": { type: "c", value: new THREE.Color( 0x111111 ) },
		"uAmbientColor": { type: "c", value: new THREE.Color( 0x050505 ) },
		"uShininess": { type: "f", value: 30 }

		},

		fragment_shader: [

		"uniform vec3 uDirLightPos;",

		"uniform vec3 uAmbientLightColor;",
		"uniform vec3 uDirLightColor;",
		"uniform vec3 uPointLightColor;",

		"uniform vec3 uAmbientColor;",
		"uniform vec3 uDiffuseColor;",
		"uniform vec3 uSpecularColor;",
		"uniform float uShininess;",

		"uniform bool enableDiffuse;",
		"uniform bool enableAO;",

		"uniform sampler2D tDiffuse;",
		"uniform sampler2D tNormal;",
		"uniform sampler2D tAO;",

		"uniform float uNormalScale;",

		"varying vec3 vTangent;",
		"varying vec3 vBinormal;",
		"varying vec3 vNormal;",
		"varying vec2 vUv;",

		"varying vec3 vPointLightVector;",
		"varying vec3 vViewPosition;",

		"void main() {",

			"vec3 diffuseTex = vec3( 1.0, 1.0, 1.0 );",
			"vec3 aoTex = vec3( 1.0, 1.0, 1.0 );",

			"vec3 normalTex = texture2D( tNormal, vUv ).xyz * 2.0 - 1.0;",
			"normalTex.xy *= uNormalScale;",
			"normalTex = normalize( normalTex );",

			"if( enableDiffuse )",
				"diffuseTex = texture2D( tDiffuse, vUv ).xyz;",

			"if( enableAO )",
				"aoTex = texture2D( tAO, vUv ).xyz;",

			"mat3 tsb = mat3( vTangent, vBinormal, vNormal );",
			"vec3 finalNormal = tsb * normalTex;",

			"vec3 normal = normalize( finalNormal );",
			"vec3 viewPosition = normalize( vViewPosition );",

			// point light

			"vec4 pointDiffuse  = vec4( 0.0, 0.0, 0.0, 0.0 );",
			"vec4 pointSpecular = vec4( 0.0, 0.0, 0.0, 0.0 );",

			"vec3 pointVector = normalize( vPointLightVector );",
			"vec3 pointHalfVector = normalize( vPointLightVector + vViewPosition );",

			"float pointDotNormalHalf = dot( normal, pointHalfVector );",
			"float pointDiffuseWeight = max( dot( normal, pointVector ), 0.0 );",

			"float pointSpecularWeight = 0.0;",
			"if ( pointDotNormalHalf >= 0.0 )",
				"pointSpecularWeight = pow( pointDotNormalHalf, uShininess );",

			"pointDiffuse  += vec4( uDiffuseColor, 1.0 ) * pointDiffuseWeight;",
			"pointSpecular += vec4( uSpecularColor, 1.0 ) * pointSpecularWeight;",

			// directional light

			"vec4 dirDiffuse  = vec4( 0.0, 0.0, 0.0, 0.0 );",
			"vec4 dirSpecular = vec4( 0.0, 0.0, 0.0, 0.0 );",

			"vec4 lDirection = viewMatrix * vec4( uDirLightPos, 0.0 );",

			"vec3 dirVector = normalize( lDirection.xyz );",
			"vec3 dirHalfVector = normalize( lDirection.xyz + vViewPosition );",

			"float dirDotNormalHalf = dot( normal, dirHalfVector );",
			"float dirDiffuseWeight = max( dot( normal, dirVector ), 0.0 );",

			"float dirSpecularWeight = 0.0;",
			"if ( dirDotNormalHalf >= 0.0 )",
				"dirSpecularWeight = pow( dirDotNormalHalf, uShininess );",

			"dirDiffuse  += vec4( uDiffuseColor, 1.0 ) * dirDiffuseWeight;",
			"dirSpecular += vec4( uSpecularColor, 1.0 ) * dirSpecularWeight;",

			// all lights contribution summation

			"vec4 totalLight = vec4( uAmbientLightColor * uAmbientColor, 1.0 );",
			"totalLight += vec4( uDirLightColor, 1.0 ) * ( dirDiffuse + dirSpecular );",
			"totalLight += vec4( uPointLightColor, 1.0 ) * ( pointDiffuse + pointSpecular );",

			"gl_FragColor = vec4( totalLight.xyz * aoTex * diffuseTex, 1.0 );",

		"}"
		].join("\n"),

		vertex_shader: [

		"attribute vec4 tangent;",

		"uniform vec3 uPointLightPos;",

		"#ifdef VERTEX_TEXTURES",

			"uniform sampler2D tDisplacement;",
			"uniform float uDisplacementScale;",
			"uniform float uDisplacementBias;",

		"#endif",

		"varying vec3 vTangent;",
		"varying vec3 vBinormal;",
		"varying vec3 vNormal;",
		"varying vec2 vUv;",

		"varying vec3 vPointLightVector;",
		"varying vec3 vViewPosition;",

		"void main() {",

			"vec4 mPosition = objectMatrix * vec4( position, 1.0 );",
			"vViewPosition = cameraPosition - mPosition.xyz;",

			"vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",
			"vNormal = normalize( normalMatrix * normal );",

			// tangent and binormal vectors

			"vTangent = normalize( normalMatrix * tangent.xyz );",

			"vBinormal = cross( vNormal, vTangent ) * tangent.w;",
			"vBinormal = normalize( vBinormal );",

			"vUv = uv;",

			// point light

			"vec4 lPosition = viewMatrix * vec4( uPointLightPos, 1.0 );",
			"vPointLightVector = normalize( lPosition.xyz - mvPosition.xyz );",

			// displacement mapping

			"#ifdef VERTEX_TEXTURES",

				"vec3 dv = texture2D( tDisplacement, uv ).xyz;",
				"float df = uDisplacementScale * dv.x + uDisplacementBias;",
				"vec4 displacedPosition = vec4( vNormal.xyz * df, 0.0 ) + mvPosition;",
				"gl_Position = projectionMatrix * displacedPosition;",

			"#else",

				"gl_Position = projectionMatrix * mvPosition;",

			"#endif",

		"}"

		].join("\n")

		},

		/* -------------------------------------------------------------------------
		//	Cube map shader
		 ------------------------------------------------------------------------- */

		'cube': {

		uniforms: { "tCube": { type: "t", value: 1, texture: null } },

		vertex_shader: [

		"varying vec3 vViewPosition;",

		"void main() {",

			"vec4 mPosition = objectMatrix * vec4( position, 1.0 );",
			"vViewPosition = cameraPosition - mPosition.xyz;",

			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",

		"}"

		].join("\n"),

		fragment_shader: [

		"uniform samplerCube tCube;",

		"varying vec3 vViewPosition;",

		"void main() {",

			"vec3 wPos = cameraPosition - vViewPosition;",
			"gl_FragColor = textureCube( tCube, vec3( - wPos.x, wPos.yz ) );",

		"}"

		].join("\n")

		},

		/* ------------------------------------------------------------------------
		//	Convolution shader
		//	  - ported from o3d sample to WebGL / GLSL
		//			http://o3d.googlecode.com/svn/trunk/samples/convolution.html
		------------------------------------------------------------------------ */

		'convolution': {

		uniforms: {

		"tDiffuse" : { type: "t", value: 0, texture: null },
		"uImageIncrement" : { type: "v2", value: new THREE.Vector2( 0.001953125, 0.0 ) },
		"cKernel" : { type: "fv1", value: [] }
		},

		vertex_shader: [

		"varying vec2 vUv;",

		"uniform vec2 uImageIncrement;",
		//"#define KERNEL_SIZE 25.0",

		"void main(void) {",

			"vUv = uv - ((KERNEL_SIZE - 1.0) / 2.0) * uImageIncrement;",
			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",

		"}"

		].join("\n"),

		fragment_shader: [

		"varying vec2 vUv;",

		"uniform sampler2D tDiffuse;",
		"uniform vec2 uImageIncrement;",

		//"#define KERNEL_SIZE 25",
		"uniform float cKernel[KERNEL_SIZE];",

		"void main(void) {",

			"vec2 imageCoord = vUv;",
			"vec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 );",
			"for( int i=0; i<KERNEL_SIZE; ++i ) {",
				"sum += texture2D( tDiffuse, imageCoord ) * cKernel[i];",
				"imageCoord += uImageIncrement;",
			"}",
			"gl_FragColor = sum;",

		"}"

		].join("\n")

		},

		/* -------------------------------------------------------------------------

		// Film grain & scanlines shader

		//	- ported from HLSL to WebGL / GLSL
		//	  http://www.truevision3d.com/forums/showcase/staticnoise_colorblackwhite_scanline_shaders-t18698.0.html

		// Screen Space Static Postprocessor
		//
		// Produces an analogue noise overlay similar to a film grain / TV static
		//
		// Original implementation and noise algorithm
		// Pat 'Hawthorne' Shearon
		//
		// Optimized scanlines + noise version with intensity scaling
		// Georg 'Leviathan' Steinrohder

		// This version is provided under a Creative Commons Attribution 3.0 License
		// http://creativecommons.org/licenses/by/3.0/
		 ------------------------------------------------------------------------- */

		'film': {

		uniforms: { tDiffuse:   { type: "t", value: 0, texture: null },
					time: 	    { type: "f", value: 0.0 },
					nIntensity: { type: "f", value: 0.5 },
					sIntensity: { type: "f", value: 0.05 },
					sCount: 	{ type: "f", value: 4096 },
					grayscale:  { type: "i", value: 1 }
				  },

		vertex_shader: [

		"varying vec2 vUv;",

		"void main() {",

			"vUv = vec2( uv.x, 1.0 - uv.y );",
			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",

		"}"

		].join("\n"),

		fragment_shader: [

		"varying vec2 vUv;",
		"uniform sampler2D tDiffuse;",

		// control parameter
		"uniform float time;",

		"uniform bool grayscale;",

		// noise effect intensity value (0 = no effect, 1 = full effect)
		"uniform float nIntensity;",

		// scanlines effect intensity value (0 = no effect, 1 = full effect)
		"uniform float sIntensity;",

		// scanlines effect count value (0 = no effect, 4096 = full effect)
		"uniform float sCount;",

		"void main() {",

			// sample the source
			"vec4 cTextureScreen = texture2D( tDiffuse, vUv );",

			// make some noise
			"float x = vUv.x * vUv.y * time *  1000.0;",
			"x = mod( x, 13.0 ) * mod( x, 123.0 );",
			"float dx = mod( x, 0.01 );",

			// add noise
			"vec3 cResult = cTextureScreen.rgb + cTextureScreen.rgb * clamp( 0.1 + dx * 100.0, 0.0, 1.0 );",

			// get us a sine and cosine
			"vec2 sc = vec2( sin( vUv.y * sCount ), cos( vUv.y * sCount ) );",

			// add scanlines
			"cResult += cTextureScreen.rgb * vec3( sc.x, sc.y, sc.x ) * sIntensity;",

			// interpolate between source and result by intensity
			"cResult = cTextureScreen.rgb + clamp( nIntensity, 0.0,1.0 ) * ( cResult - cTextureScreen.rgb );",

			// convert to grayscale if desired
			"if( grayscale ) {",
				"cResult = vec3( cResult.r * 0.3 + cResult.g * 0.59 + cResult.b * 0.11 );",
			"}",

			"gl_FragColor =  vec4( cResult, cTextureScreen.a );",

		"}"

		].join("\n")

		},

		/* -------------------------------------------------------------------------
		//	Full-screen textured quad shader
		 ------------------------------------------------------------------------- */

		'screen': {

		uniforms: { tDiffuse: { type: "t", value: 0, texture: null },
					opacity: { type: "f", value: 1.0 }
				  },

		vertex_shader: [

		"varying vec2 vUv;",

		"void main() {",

			"vUv = vec2( uv.x, 1.0 - uv.y );",
			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",

		"}"

		].join("\n"),

		fragment_shader: [

		"varying vec2 vUv;",
		"uniform sampler2D tDiffuse;",
		"uniform float opacity;",

		"void main() {",

			"vec4 texel = texture2D( tDiffuse, vUv );",
			"gl_FragColor = opacity * texel;",

		"}"

		].join("\n")

		},

		/* -------------------------------------------------------------------------
		//	Simple test shader
		 ------------------------------------------------------------------------- */

		'basic': {

		uniforms: {},

		vertex_shader: [

		"void main() {",

			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",

		"}"

		].join("\n"),

		fragment_shader: [

		"void main() {",

			"gl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );",

		"}"

		].join("\n")

		}

	},

	buildKernel: function( sigma ) {

		// We lop off the sqrt(2 * pi) * sigma term, since we're going to normalize anyway.

		function gauss( x, sigma ) {

			return Math.exp( - (x * x) / (2.0 * sigma * sigma) );

		}

		var i, values, sum, halfWidth, kMaxKernelSize = 25, kernelSize = 2 * Math.ceil( sigma * 3.0 ) + 1;

		if ( kernelSize > kMaxKernelSize ) kernelSize = kMaxKernelSize;
		halfWidth = ( kernelSize - 1 ) * 0.5

		values = new Array( kernelSize );
		sum = 0.0;
		for( i = 0; i < kernelSize; ++i ) {

			values[ i ] = gauss( i - halfWidth, sigma );
			sum += values[ i ];

		}

		// normalize the kernel

		for( i = 0; i < kernelSize; ++i ) values[ i ] /= sum;

		return values;

	}

};


text:
/*
 * SimpleLineCounterTest.java
 * JUnit based test
 *
 * Created on 10. August 2006, 20:08
 */
package org.huberb.nbwordcount.model.counters;

import org.huberb.nbwordcount.model.counters.LineCounterIF.CounterInfo;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author HuberB1
 */
public class SimpleLineCounterTest {

    /**
     * Test of getCountOfCharacter method, of class
     * org.huberb.nbwordcount.model.counters.SimpleLineCounter.
     */
    @Test
    public void testGetCountOfCharacter() {
        SimpleLineCounter instance = new SimpleLineCounter();

        instance.count("abc def");
        Number expResult = new Long(7);
        Number result = instance.getCountOfCharacter();
        assertEquals(expResult, result);
    }

    /**
     * Test of getCountOfWords method, of class
     * org.huberb.nbwordcount.model.counters.SimpleLineCounter.
     */
    @Test
    public void testGetCountOfWords() {
        SimpleLineCounter instance = new SimpleLineCounter();

        instance.count("abc def");
        Number expResult = new Long(2);
        Number result = instance.getCountOfWords();
        assertEquals(expResult, result);

    }

    /**
     * Test of getCountOfLines method, of class
     * org.huberb.nbwordcount.model.counters.SimpleLineCounter.
     */
    @Test
    public void testGetCountOfLines() {

        SimpleLineCounter instance = new SimpleLineCounter();

        instance.count("abc def");
        instance.count("123 456");
        Number expResult = new Long(2);
        Number result = instance.getCountOfLines();
        assertEquals(expResult, result);
    }

    /**
     * Test of count method, of class
     * org.huberb.nbwordcount.model.counters.SimpleLineCounter.
     */
    @Test
    public void testCount() {
        String line = "";
        SimpleLineCounter instance = new SimpleLineCounter();

        instance.count(line);
    }

    /**
     * Test of getCounterInfo method, of class
     * org.huberb.nbwordcount.model.counters.SimpleLineCounter.
     */
    @Test
    public void testGetCounterInfo() {
        SimpleLineCounter instance = new SimpleLineCounter();

        CounterInfo result = instance.getCounterInfo();
        assertNotNull(result);
        assertNotNull(result.getCounterValues());
        assertEquals(3, result.getCounterValues().length);
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>SearchingClassLoader (Mockito 1.10.19 API)</title>
<meta name="date" content="2014-12-31">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

          Mockito 1.10.19 API

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.mockito.internal.creation.util

Class SearchingClassLoader

java.lang.Object

java.lang.ClassLoader

org.mockito.internal.creation.util.SearchingClassLoader

public class SearchingClassLoader
extends java.lang.ClassLoader

Inspired on jMock (thanks jMock guys!!!)

Constructor Summary

Constructors

Constructor and Description

SearchingClassLoader(java.lang.ClassLoader parent,
                    java.lang.ClassLoader nextToSearch)

Method Summary

Methods

Modifier and Type
Method and Description

static java.lang.ClassLoader
combineLoadersOf(java.lang.Class<?>... classes)

protected java.lang.Class<?>
findClass(java.lang.String name)

Methods inherited from class java.lang.ClassLoader

clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SearchingClassLoader

public SearchingClassLoader(java.lang.ClassLoader parent,
                    java.lang.ClassLoader nextToSearch)

Method Detail

combineLoadersOf

public static java.lang.ClassLoader combineLoadersOf(java.lang.Class<?>... classes)

findClass

protected java.lang.Class<?> findClass(java.lang.String name)
                                throws java.lang.ClassNotFoundException

Overrides:

findClass in class java.lang.ClassLoader

Throws:

java.lang.ClassNotFoundException

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

          Mockito 1.10.19 API

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
    resolve: {
        modulesDirectories: ["node_modules", "."],
        extensions: ["", ".js", ".min.js", ".scss"]
    },
    entry: {
        app: ['entry.js']
    },
    devtool: "source-map",
    output: {
        path: path.join(__dirname, 'dist'),
        publicPath: '/dist/',
        filename: 'bundle.js'
    },
    devServer: {
        contentBase: ".",
        inline: true,
        watch: true,
        hot: true
    },
    module: {
        loaders: [
            {
                test: /\.scss$/,
                loader: ExtractTextPlugin.extract("css-loader?sourceMap!sass-loader?sourceMap&sourceMapContents")
            },
            {
                test: /\.(ttf|eot|woff|svg|jpe?g|gif|png)[\?]?.*$/,
                loader: 'url',
                query: {
                    name: '[name][hash].[ext]',
                    limit: 10000
                }
            },
            {
                test: /\.js$/,
                loaders: ["babel-loader?optional[]=runtime"],
                exclude: [
                    /node_modules/,
                    /libs/,
                    /vendor/
                ]
            }
        ]
    },
    plugins: [
        new webpack.HotModuleReplacementPlugin(),
        new webpack.NamedModulesPlugin(),
        new ExtractTextPlugin("styles.css?[hash]")
    ]
};


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

<project name="Makagiga" default="compileandrun" basedir=".">

<!-- help -->
<target name="help">
<echo>
JDK Documentation:
http://docs.oracle.com/javase/8/docs/

JDK API Documentation:
http://docs.oracle.com/javase/8/docs/api/

Ant Manual:
http://ant.apache.org/manual/index.html

Ant Tutorial:
http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html

Common targets ("ant targetname"):

all, compileandrun - compile and run Makagiga
apidoc             - create documentation from the source files (see API directory)
apidoc-web         - like above; smaller version for WWW (see API.web directory)
blob               - merge all .jar files into single .jar file
bin                - create some binary .jar and .zip files
clean              - removes all output/temporary files and directories
                     (WARNING: see "clean" target for more details)
compile            - compile source files
help               - show this info
images             - creates package with all images and icons
run                - run compiled application
                     (use "prog_args" in build.properties file
                     to pass command line parameters)
src                - create source package
test               - compile and run unit tests
test-quick         - compile and run unit tests without building images.jar

Linux only targets:

builddeb           - build RPM and Debian package
buildrpm           - build RPM package
dist               - clean, compile, create binary and source packages
final              - used internally to build ALL packages
                     (requires special configuration)
i18n               - merges i18n messages and creates i18n/Messages_*.class files
                     (see the po directory for translation templates)
installdeb         - reinstalls Makagiga Debian package
installrpm         - reinstalls Makagiga RPM package
release            - build binary packages (including .deb, .rpm and .exe)
sdk                - create SDK package
setup              - create installer for Windows (requires Wine and NSIS)
version            - create files with version info (see build.properties file)

See the "dist" directory for output files.
</echo>
</target>

<description>Makagiga</description>

<!-- Compiler options -->
<property name="javac_source" value="1.8" />
<property name="javac_target" value="1.8" />

<property name="top_dir" location="." /><!-- MUST BE FIRST -->
<property file="${top_dir}/build.properties" />
<property name="apidoc_dir" location="${top_dir}/API" /><!-- javadoc dir -->
<property name="apidoc_web_dir" location="${top_dir}/API.web" /><!-- javadoc dir -->
<property name="build_dir" location="${top_dir}/build" />
<property name="dist_dir" location="${top_dir}/dist" />
<property name="examples_dir" location="${top_dir}/examples" />
<property name="i18n_dir" location="${top_dir}/i18n" />
<property name="images_dir" location="${top_dir}/images" />
<property name="po_dir" location="${top_dir}/po" />
<property name="rpm_dir" location="${user.home}/rpmbuild" />
<property name="sdk_dir" location="${top_dir}/sdk" />
<property name="src_dir" location="${top_dir}/src/org/makagiga" />
<property name="test_dir" location="${top_dir}/test" />
<property name="tools_dir" location="${top_dir}/tools" />
<property name="zip_prefix" value="makagiga-${prog_file_version}" />
<property name="source_zip_prefix" value="makagiga-source-${prog_file_version}" />

<property name="bin_file" location="${dist_dir}/makagiga.jar" />
<property name="blob_file" location="${dist_dir}/makagiga-blob.jar" />
<property name="zipped_bin_file" location="${dist_dir}/makagiga-${prog_file_version}.zip" />
<property name="zipped_bin_file_java" location="${dist_dir}/makagiga-linux-i586-${prog_file_version}.zip" />

<property name="i18n_file" location="${dist_dir}/i18n.jar" />
<property name="images_file" location="${dist_dir}/images.jar" />
<property name="sdk_file" location="${dist_dir}/makagiga-sdk-${prog_file_version}.zip" />
<property name="src_file" location="${dist_dir}/makagiga-source-${prog_file_version}.zip" />

<property name="deb_file" location="${dist_dir}/makagiga_${prog_file_version}-1_all.deb" />
<property name="rpm_file" location="${rpm_dir}/RPMS/noarch/makagiga-${prog_file_version}-1.noarch.rpm" />
<property name="rpm_file_copy" location="${dist_dir}/makagiga-${prog_file_version}-1.noarch.rpm" />
<property name="setup_file" location="${dist_dir}/makagiga-${prog_file_version}.exe" />

<property name="java_linux_dir" location="/opt/java-linux-i586" />

<macrodef name="mg-apidoc">
	<attribute name="profile" />
	<sequential>
		<exec executable="${tools_dir}/apidoc/generate-@{profile}.sh" />
	</sequential>
</macrodef>

<!-- all -->
<target name="all" depends="compileandrun">
</target>

<!-- apidoc -->
<target name="apidoc">
	<mg-apidoc profile="sdk" />
</target>

<!-- apidoc-web -->
<target name="apidoc-web">
	<mg-apidoc profile="web" />
</target>

<!-- bin -->
<target name="bin" depends="distinit">
	<!-- application info -->
	<copy todir="${build_dir}/org/makagiga/resources">
		<fileset dir="${src_dir}/resources" includes="*.properties" />
	</copy>

	<!-- plugin info -->
	<copy todir="${build_dir}/org/makagiga">
		<fileset dir="${src_dir}" includes="**/plugin.properties" />
	</copy>

	<!-- entities -->
	<copy file="${src_dir}/commons/html/entities.data" todir="${build_dir}/org/makagiga/commons/html" />

	<!-- look and feel preview, public key -->
	<copy todir="${build_dir}/org/makagiga/plugins">
		<fileset dir="${src_dir}/plugins" includes="*.png Key.public" />
	</copy>

	<!-- palettes -->
	<copy todir="${build_dir}/org/makagiga/commons/color/palettes">
		<fileset dir="${src_dir}/commons/color/palettes" includes="*LICENSE.txt *.bgpl" />
	</copy>

	<!-- script snippets -->
	<copy todir="${build_dir}/org/makagiga/commons/script/js">
		<fileset dir="${src_dir}/commons/script/js" includes="*.js" />
	</copy>

	<!-- syntax -->
	<copy todir="${build_dir}/org/makagiga/commons/syntax">
		<fileset dir="${src_dir}/commons/syntax" includes="*.syntax" />
	</copy>

	<!-- editor: -->
	<!-- image -->
	<copy todir="${build_dir}/org/makagiga/editors/image/tools">
		<fileset dir="${src_dir}/editors/image/tools" includes="*.png" />
	</copy>

	<!-- internetsearch: -->
	<copy file="${src_dir}/internetsearch/answers/icon.png" todir="${build_dir}/org/makagiga/internetsearch/answers" />
	<copy file="${src_dir}/internetsearch/duckduckgo/icon.png" todir="${build_dir}/org/makagiga/internetsearch/duckduckgo" />
	<copy file="${src_dir}/internetsearch/google/icon.png" todir="${build_dir}/org/makagiga/internetsearch/google" />
	<copy file="${src_dir}/internetsearch/wikipedia/icon.png" todir="${build_dir}/org/makagiga/internetsearch/wikipedia" />
	<copy file="${src_dir}/internetsearch/yahoo/icon.png" todir="${build_dir}/org/makagiga/internetsearch/yahoo" />

	<!-- tips -->
	<copy todir="${build_dir}/org/makagiga/resources/tips">
		<fileset dir="${src_dir}/resources/tips" includes="*.xml" />
	</copy>

	<!-- main jar -->
	<jar destfile="${bin_file}">
		<zipfileset dir="${build_dir}" excludes="makagiga/sdk/**" />
		<zipfileset prefix="META-INF" dir="${top_dir}" includes="splash.png" />
		<manifest>
			<attribute name="Built-By" value="${user.name}" />
			<attribute name="Main-Class" value="org.makagiga.Main" />
			<attribute name="Class-Path" value="images.jar i18n.jar" />
			<attribute name="SplashScreen-Image" value="META-INF/splash.png" />
		</manifest>
	</jar>

	<antcall target="blob" />

	<!-- Version w/o Java -->
	<zip destfile="${zipped_bin_file}" defaultexcludes="no">
		<!-- Common -->
		<zipfileset dir="${top_dir}" includes="LICENSE.txt *.html" prefix="${zip_prefix}/help" />
		<zipfileset dir="${top_dir}" includes="makagiga.ico makagiga.png" prefix="${zip_prefix}" />
		<zipfileset dir="${dist_dir}" filemode="755" includes="makagiga.jar" fullpath="${zip_prefix}/makagiga.jar" />
		<!-- Windows launchers -->
		<zipfileset dir="${tools_dir}/win-launcher" includes="run.exe" fullpath="${zip_prefix}/makagiga.exe" />
		<zipfileset dir="${tools_dir}/win-launcher" includes="run-portable.exe" fullpath="${zip_prefix}/makagiga-portable.exe" />
		<zipfileset dir="${tools_dir}" includes="run_win.bat" fullpath="${zip_prefix}/makagiga.bat" />
		<zipfileset dir="${tools_dir}" includes="run_win_portable.bat" fullpath="${zip_prefix}/makagiga-portable.bat" />
		<!-- Linux launchers -->
		<zipfileset dir="${tools_dir}" filemode="755" includes="run_linux.sh" fullpath="${zip_prefix}/makagiga.sh" />
		<zipfileset dir="${tools_dir}" filemode="755" includes="run_linux_portable.sh" fullpath="${zip_prefix}/makagiga-portable.sh" />
<!-- FIXME: Used by RPM builder only: -->
		<zipfileset dir="${tools_dir}" filemode="644" includes="makagiga" fullpath="${zip_prefix}/tools/makagiga" />
		<zipfileset dir="${tools_dir}" includes="makagiga.desktop" fullpath="${zip_prefix}/tools/makagiga.desktop" />
<!-- TODO: create empty "java-linux-i586/java-windows-i586" placeholder dirs -->
	</zip>

	<!-- Version with bundled Java -->
	<zip destfile="${zipped_bin_file_java}" defaultexcludes="no">
		<!-- Common -->
		<zipfileset dir="${top_dir}" includes="LICENSE.txt *.html" prefix="${zip_prefix}/help" />
		<zipfileset dir="${top_dir}" includes="makagiga.ico makagiga.png" prefix="${zip_prefix}" />
		<zipfileset dir="${dist_dir}" filemode="755" includes="makagiga.jar" fullpath="${zip_prefix}/makagiga.jar" />
		<!-- Windows launchers -->
		<zipfileset dir="${tools_dir}/win-launcher" includes="run.exe" fullpath="${zip_prefix}/makagiga.exe" />
		<zipfileset dir="${tools_dir}/win-launcher" includes="run-portable.exe" fullpath="${zip_prefix}/makagiga-portable.exe" />
		<zipfileset dir="${tools_dir}" includes="run_win.bat" fullpath="${zip_prefix}/makagiga.bat" />
		<zipfileset dir="${tools_dir}" includes="run_win_portable.bat" fullpath="${zip_prefix}/makagiga-portable.bat" />
		<!-- Linux launchers -->
		<zipfileset dir="${tools_dir}" filemode="755" includes="run_linux.sh" fullpath="${zip_prefix}/makagiga.sh" />
		<zipfileset dir="${tools_dir}" filemode="755" includes="run_linux_portable.sh" fullpath="${zip_prefix}/makagiga-portable.sh" />
		<!-- Java -->
		<zipfileset erroronmissingdir="false" dir="${java_linux_dir}" excludes="bin/java" prefix="${zip_prefix}/java-linux-i586" />
<!-- TODO:
* exclude unused JRE files from zip and exe packages:
http://www.oracle.com/technetwork/java/javase/jre-8-readme-2095710.html
* use pack200ed *.jars
			<exclude name=...
-->
		<zipfileset erroronmissingdir="false" dir="${java_linux_dir}/bin" filemode="755" includes="java" fullpath="${zip_prefix}/java-linux-i586/bin/java" />
	</zip>
</target>

<!-- blob -->
<!-- CREDITS: http://java.sun.com/developer/technicalArticles/java_warehouse/single_jar/ -->
<target name="blob" depends="images">
	<delete file="${blob_file}" />
	<jar destfile="${blob_file}" filesetmanifest="skip">
		<zipgroupfileset file="${bin_file}" />
		<zipgroupfileset file="${i18n_file}" />
		<zipgroupfileset file="${images_file}" />
		<manifest>
			<attribute name="Built-By" value="${user.name}" />
			<attribute name="Main-Class" value="org.makagiga.Main" />
			<attribute name="Permissions" value="all-permissions" />
			<attribute name="SplashScreen-Image" value="META-INF/splash.png" />
		</manifest>
	</jar>

	<!-- replace makagiga.jar with makagiga-blob.jar -->
	<move file="${blob_file}" tofile="${bin_file}" />
</target>

<!-- builddeb -->
<target name="builddeb" depends="getos,buildrpm" if="os_linux">
	<echo>Enter the root password to build Debian package:</echo>
	<exec executable="sudo">
		<arg line="sh -c 'echo "Building..." ; ./tools/builddeb.sh ${prog_file_version}'" />
	</exec>
	<exec executable="lintian">
		<arg line="--display-experimental --display-info --pedantic --info -X changelog-file,scripts ${deb_file}" />
	</exec>
	<exec executable="sudo">
		<arg line="rm -Rf "${top_dir}/makagiga-${prog_file_version}" "${top_dir}/makagiga-${prog_file_version}.orig"" />
	</exec>
</target>

<!-- buildrpm -->
<target name="buildrpm" depends="getos" if="os_linux">
	<mkdir dir="${rpm_dir}" />
	<mkdir dir="${rpm_dir}/BUILD" />
	<mkdir dir="${rpm_dir}/BUILDROOT" />
	<mkdir dir="${rpm_dir}/RPMS" />
	<mkdir dir="${rpm_dir}/SOURCES" />
	<mkdir dir="${rpm_dir}/SRPMS" />
	<copy file="${zipped_bin_file}" todir="${rpm_dir}/SOURCES" />
	<echo>Q: error: Couldn't exec /usr/lib/rpm/desktop-file.prov: No such file or directory
A: Copy the missing "desktop-file.prov" file to the "/usr/lib/rpm" directory.
   (see rpm-build*.rpm package)</echo>
	<exec executable="rpmbuild">
	    <arg line="--define='version ${prog_file_version}' -ba "${top_dir}/makagiga.spec" --target noarch" />
	</exec>
	<copy file="${rpm_file}" tofile="${rpm_file_copy}" />
</target>

<!-- checktopdir -->
<target name="checktopdir">
	<available file="${top_dir}/build.xml" property="topdirvalid" />
	<fail unless="topdirvalid" message="Invalid top source directory" />
</target>

<!-- clean -->
<target name="clean" depends="checktopdir" if="topdirvalid">
	<delete dir="${apidoc_dir}" />
	<delete dir="${apidoc_web_dir}" />
	<delete dir="${build_dir}" />
	<delete dir="${dist_dir}" />
	<delete dir="${i18n_dir}" />
	<delete dir="${test_dir}/build" />
	<delete file="${top_dir}/Makagiga.tag" />
</target>

<!-- compile -->
<target name="compile">
	<echo>INFO: Using Java ${java.runtime.version}</echo>
	<echo>HINT: Makagiga 5.x requires Java (1.)8 or newer to compile and run.</echo>
	<echo>      Type "ant help" to see all Ant targets.</echo>
	<!-- NOTE: sync. with "test" -->
	<mkdir dir="${build_dir}" />
	<javac
		includeantruntime="false"
		classpath="."
		srcdir="src"
		destdir="${build_dir}"
		deprecation="on"
		source="${javac_source}"
		target="${javac_target}"
		encoding="UTF-8"
	>
		<!-- TODO: -Werror (current Java compiler can generate invalid warnings after "svn up") -->
		<compilerarg line="-g:lines,source -Xlint:all,-serial -Xmaxerrs 5 -Xdiags:verbose" />
	</javac>
	<!-- excludes="**/package-info.java" -->

	<copy todir="${build_dir}/META-INF/services">
		<fileset dir="${top_dir}/src/META-INF/services" />
	</copy>
</target>

<!-- compileandrun -->
<target name="compileandrun" depends="compile,run">
	<echo>HINT: Run "ant help" to display all Ant targets</echo>
</target>

<!-- convert-gpl -->
<target name="convert-gpl">
	<script language="javascript" src="${top_dir}/tools/build/convert-gpl.js" classpath="${build_dir}" />
</target>

<!-- convert-zip-to-7z -->
<target name="convert-zip-to-7z" depends="getos" if="os_linux">
	<exec dir="${dist_dir}" executable="${tools_dir}/convert-zip-to-7z.sh">
		<arg line="${prog_file_version}" />
	</exec>
</target>

<!-- dist -->
<target name="dist" depends="clean,distinit,version,i18n,images,compile,bin,src">
</target>

<!-- distinit -->
<target name="distinit">
	<mkdir dir="${dist_dir}" />
</target>

<!-- final -->
<target name="final" depends="release,sdk,convert-zip-to-7z,notes">
</target>

<!-- detect os -->
<target name="getos">
	<condition property="os_linux">
		<os family="unix" /><!-- I know - Linux Is Not Unix ;-) -->
	</condition>
</target>

<!-- i18n -->
<target name="i18n" depends="distinit,getos" if="os_linux">
	<echo>HINT: Gettext Utilities are required to create translations</echo>
	<exec executable="${tools_dir}/i18n.sh" />
	<!-- i18n jar -->
	<jar destfile="${i18n_file}" basedir="${i18n_dir}">
		<manifest>
			<attribute name="Built-By" value="${user.name}" />
		</manifest>
	</jar>
</target>

<!-- images -->
<target name="images" depends="distinit,index-images">
	<jar compress="false" destfile="${images_file}">
		<manifest>
			<attribute name="Built-By" value="${user.name}" />
		</manifest>
		<zipfileset prefix="images" dir="${images_dir}" includes="*.jpg *.png *.txt" />
		<zipfileset prefix="images/labels" dir="${images_dir}/labels" includes="*.png" />
		<zipfileset prefix="images/labels/emotion" dir="${images_dir}/labels/emotion" includes="*.png" />
		<zipfileset prefix="images/player" dir="${images_dir}/player" includes="*.png" />
		<zipfileset prefix="images/small" dir="${images_dir}/small" includes="**/*.gif **/*.png" />
		<zipfileset prefix="images/text" dir="${images_dir}/text" includes="*.png" />
		<zipfileset prefix="images/ui" dir="${images_dir}/ui" includes="*.gif *.png" />
	</jar>
</target>

<!-- index-images -->
<target name="index-images">
	<script language="javascript" src="${top_dir}/tools/build/index-images.js" />
</target>

<!-- installdeb -->
<target name="installdeb" depends="getos" if="os_linux">
	<echo>Enter the root password to install Debian package:</echo>
	<exec executable="sudo">
		<arg line="sh -c 'echo "Installing..." ; dpkg -i ./dist/makagiga_${prog_file_version}-1_all.deb'" />
	</exec>
</target>

<!-- installrpm -->
<target name="installrpm" depends="getos" if="os_linux">
	<exec executable="kdesu">
		<arg line="-i makagiga -t -c "rpm -ev makagiga; rpm -iv ${rpm_file_copy}"" />
	</exec>
</target>

<target name="libs" depends="distinit,compile,bin,images">
	<exec executable="${tools_dir}/make-libs.sh">
		<arg line="${prog_file_version}" />
	</exec>
</target>

<!-- notes -->
<target name="notes" depends="getos" if="os_linux">
	<exec dir="${dist_dir}" executable="${tools_dir}/generate-notes.sh">
		<arg line=""${prog_file_version}" "${prog_full_version}"" />
	</exec>

	<exec executable="./tools/generate-pad-file.sh">
		<arg line=""${prog_full_version}" "${prog_file_version}" "./dist/makagiga-${prog_file_version}.zip"" />
	</exec>
</target>

<!-- release -->
<target name="release" depends="dist,libs,builddeb,installdeb,setup,test">
</target>

<!-- run -->
<target name="run">
	<java
		classname="org.makagiga.Main"
		classpath="${top_dir}:${top_dir}/i18n:${top_dir}/src:${build_dir}"
		fork="on"
	>
		<jvmarg line="-Xms16m -Xmx128m ${java_args}" />
		<arg line="${prog_args}" />
	</java>
</target>

<!-- run-sdk -->
<target name="run-sdk">
	<java
		classname="makagiga.sdk.SDK"
		classpath="${top_dir}:${top_dir}/i18n:${top_dir}/src:${build_dir}"
		fork="on"
	>
		<jvmarg line="-Xms16m -Xmx128m ${java_args}" />
		<arg line="--base-dir ./sdk/SDK" />
	</java>
</target>

<!-- sdk -->
<target name="sdk" depends="apidoc,libs">
	<!-- clean up before zip -->
	<exec dir="${examples_dir}/diskfree" executable="ant">
		<arg line="clean" />
	</exec>
	<exec dir="${examples_dir}/minimal" executable="ant">
		<arg line="clean" />
	</exec>

	<property name="sdk_prefix" value="makagiga-sdk-${prog_file_version}" />
	<!-- create sdk.jar -->
	<jar destfile="${sdk_dir}/SDK/lib/sdk.jar">
		<manifest>
			<attribute name="Built-By" value="${user.name}" />
			<attribute name="Main-Class" value="makagiga.sdk.SDK" />
			<!-- like below + makagiga.jar -->
			<attribute name="Class-Path" value="makagiga.jar" />
		</manifest>
		<zipfileset prefix="makagiga/sdk" dir="${build_dir}/makagiga/sdk" />
	</jar>

	<copy file="${bin_file}" tofile="${sdk_dir}/SDK/lib/makagiga.jar" />

	<copy todir="${sdk_dir}/SDK/doc">
		<fileset dir="${top_dir}" includes="ChangeLog *.html *.txt" />
	</copy>

	<zip destfile="${sdk_file}">
		<!-- SDK -->
		<zipfileset dir="${apidoc_dir}" prefix="${sdk_prefix}/SDK/API" />
		<zipfileset dir="${sdk_dir}" filemode="755" includes="*.sh" prefix="${sdk_prefix}" />
		<zipfileset dir="${sdk_dir}/Projects" includes="commons.xml" prefix="${sdk_prefix}/Projects" />
		<zipfileset dir="${sdk_dir}/Projects" filemode="755" includes="*.sh" prefix="${sdk_prefix}/Projects" />
		<zipfileset dir="${sdk_dir}/SDK" filemode="755" includes="i18n.sh" prefix="${sdk_prefix}/SDK" />
		<zipfileset dir="${sdk_dir}/SDK/template" filemode="755" includes="*.sh" prefix="${sdk_prefix}/SDK/template" />
		<zipfileset dir="${sdk_dir}" excludes="*.sh SDK/i18n.sh SDK/template/*.sh Projects/*" prefix="${sdk_prefix}" />
		<zipfileset dir="${top_dir}/src" prefix="${sdk_prefix}/src" />
		<!-- Platform -->
		<zipfileset dir="${dist_dir}/jars" includes="*.jar" prefix="${sdk_prefix}/Platform/lib" />
		<zipfileset dir="${examples_dir}" includes="INFO.txt" fullpath="${sdk_prefix}/Platform/README.txt" />
		<zipfileset dir="${examples_dir}" excludes="INFO.txt" prefix="${sdk_prefix}/Platform/examples" />
		<zipfileset dir="${tools_dir}" filemode="755" includes="sign-and-pack.sh sign-webstart-example.sh" prefix="${sdk_prefix}/Platform/tools" />
	</zip>
</target>

<!-- setup -->
<target name="setup" depends="getos">
	<echo>HINT: NSIS <http://nsis.sourceforge.net/> and Wine are required to create installer</echo>

<echo file="${top_dir}/makagiga.nsh">
# Generated by build.xml, do not modify!
!define APP_FULL_NAME "Makagiga"
!define APP_FULL_VERSION "${prog_full_version}"
!define APP_TITLE "${APP_FULL_NAME} ${APP_FULL_VERSION}"

!define APP_INTERNAL_NAME "makagiga"
!define APP_FILE_VERSION "${prog_file_version}"
</echo>

	<unzip src="${zipped_bin_file}" dest="${top_dir}/setup.tmp" />
	<antcall target="do-setup-linux" />
	<antcall target="do-setup-windows" />

	<delete dir="${top_dir}/setup.tmp" />
	<delete file="${top_dir}/makagiga.nsh" />
</target>

<!-- do-setup-linux -->
<!-- NOTE: "~/.wine/dosdevices/m:" must point to the source top directory -->
<target name="do-setup-linux" if="os_linux">
		<exec executable="wine">
			<arg line=""${user.home}/.wine/dosdevices/c:/Program Files/NSIS/makensis.exe" M:/makagiga.nsi" />
		</exec>
</target>

<!-- do-setup-windows -->
<target name="do-setup-windows" unless="os_linux">
		<exec executable="C:\Program Files\NSIS\makensis.exe">
			<arg line="makagiga.nsi" />
		</exec>
</target>

<!-- src -->
<!-- TODO: include "sdk" directory, ensure all optional source files are packaged -->
<target name="src" depends="distinit,index-images">
	<zip destfile="${src_file}">
		<zipfileset dir="${top_dir}" includes="ChangeLog" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="LICENSE.txt" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="Makefile" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="PORTING.txt" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="TODO.txt" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="*.html" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="build.properties" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="build.xml" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="makagiga.ico" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="makagiga.jnlp" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="makagiga.nsi" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="makagiga.png" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="splash.png" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="splash.svg" prefix="${source_zip_prefix}" />
		<zipfileset dir="${top_dir}" includes="makagiga.spec" prefix="${source_zip_prefix}" />
		<zipfileset dir="${examples_dir}" prefix="${source_zip_prefix}/examples" />
		<zipfileset dir="${images_dir}" excludes="*~" prefix="${source_zip_prefix}/images" />
		<zipfileset dir="${po_dir}" excludes="*~" prefix="${source_zip_prefix}/po" />
		<zipfileset dir="${test_dir}" prefix="${source_zip_prefix}/test" />
		<zipfileset dir="${top_dir}/src/META-INF" prefix="${source_zip_prefix}/src/META-INF" />
		<zipfileset dir="${top_dir}/src/com/jhlabs" excludes="*~" prefix="${source_zip_prefix}/src/com/jhlabs" />
		<zipfileset dir="${top_dir}/src/edu" excludes="*~" prefix="${source_zip_prefix}/src/edu" />
		<zipfileset dir="${top_dir}/src/makagiga" prefix="${source_zip_prefix}/src/makagiga" />
		<zipfileset dir="${top_dir}/src/org" prefix="${source_zip_prefix}/src/org" />
		<zipfileset dir="${tools_dir}/apidoc" excludes="*.sh" prefix="${source_zip_prefix}/tools/apidoc" />
		<zipfileset dir="${tools_dir}/build" prefix="${source_zip_prefix}/tools/build" />
		<zipfileset dir="${tools_dir}/entities" prefix="${source_zip_prefix}/tools/entities" />
		<zipfileset dir="${tools_dir}/win-launcher" prefix="${source_zip_prefix}/tools/win-launcher" />
		<!-- Files with "+x" attribute -->
		<zipfileset
			dir="${tools_dir}"
			filemode="755"
			includes="*.sh makagiga"
			prefix="${source_zip_prefix}/tools"
		/>
		<zipfileset
			dir="${tools_dir}/apidoc"
			filemode="755"
			includes="*.sh"
			prefix="${source_zip_prefix}/tools/apidoc"
		/>
		<zipfileset
			dir="${tools_dir}/icon-theme"
			filemode="755"
			includes="*.sh"
			prefix="${source_zip_prefix}/tools/icon-theme"
		/>
		<!-- Files with normal attribute -->
		<zipfileset
			dir="${tools_dir}"
			includes="*.bat *.desktop *.xml"
			prefix="${source_zip_prefix}/tools"
		/>
		<zipfileset
			dir="${tools_dir}/icon-theme"
			excludes="*.sh build/** */private/**"
			prefix="${source_zip_prefix}/tools/icon-theme"
		/>
		<zipfileset dir="${top_dir}/nbproject" excludes="private/**" prefix="${source_zip_prefix}/nbproject" />

		<!-- Eclipse Project files -->
		<zipfileset dir="${top_dir}/.settings" prefix="${source_zip_prefix}/.settings" />
		<zipfileset dir="${top_dir}" includes=".classpath .project" prefix="${source_zip_prefix}" />
	</zip>
</target>

<!-- do-test -->
<target name="do-test">
	<path id="cp">
		<pathelement location="${build_dir}" />
		<pathelement location="${test_dir}/build" />
	</path>
	<mkdir dir="${test_dir}/build" />
	<javac
		includeantruntime="false"
		classpathref="cp"
		srcdir="${test_dir}/src"
		destdir="${test_dir}/build"
		deprecation="on"
		source="${javac_source}"
		target="${javac_target}"
		encoding="UTF-8"
	>
		<compilerarg line="-g:lines,source -Werror -Xlint:all,-serial -Xmaxerrs 5 -Xdiags:verbose" />
	</javac>

	<!-- test -->
	<java
		classname="org.makagiga.test.Tester"
		classpath="${build_dir}:${images_file}:${test_dir}/src:${top_dir}/src"
		fork="on"
	>
		<jvmarg line="-Xms16m -Xmx128m ${java_args}" />
		<arg line=""${test_dir}/build"" />
	</java>
</target>

<!-- test -->
<target name="test" depends="distinit,compile,images">
	<antcall target="do-test" />
</target>

<!-- test-quick -->
<target name="test-quick" depends="distinit,compile">
	<antcall target="do-test" />
</target>

<!-- version -->
<target name="version">

<tstamp>
	<format property="prog_date" pattern="yyyy-MM-dd" locale="en,US" />
</tstamp>

<echo>Generating version info: full=${prog_full_version}, file=${prog_file_version}, codename=${prog_codename}, date=${prog_date}</echo>

<echo file="${src_dir}/resources/Main.properties"># Generated by build.xml, do not modify!
Application.name = ${ant.project.name}
Application.version = ${prog_full_version}
Application.vendor = (C) 2005-3000 Makagiga Team
Application.homepage = ${prog_www}
Application.description = To-do manager, notepad, RSS reader...

# The bug report page
Application.x.bugs = ${prog_bugs}

# The online documentation
Application.x.documentation = ${prog_docs}

# "MMMM dd yyyy" format
Application.x.buildInfo = ${prog_date}

# The internal version used in file names
Application.x.fileVersion = ${prog_file_version}

# The internal version number in org.makagiga.commons.VersionProperty format
Application.x.internalVersion = ${prog_internal_version}

# The license info
Application.x.licenseName = Free Software, Open-Source
Application.x.licenseURL = http://makagiga.sourceforge.net/README.html#license

# The light brand color
Application.x.lightBrandColor=${prog_light_brand_color}

# The logo icon name
Application.x.logo = makagiga

# The application codename
Application.x.codename = ${prog_codename}

# CalendarComponent resources
x.Calendar.onThisDay=http://en.wikipedia.org/wiki/{@full-month-name}_{@day-of-month}
x.Calendar.news=http://en.wikinews.org/wiki/Category:{@full-month-name}_{@day-of-month},_{@4-digit-year}
</echo>
</target>

</project>


text:
{% load url from future %}
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>{% block title %}EasyBlog{% endblock %}</title>
    <meta name="description" content="{% block description %}{% endblock %}">
    <meta name="author" content="{% block author %}{% endblock %}">
    <meta name="keywords" content="{% block keywords %}{% endblock %}">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    {% block html5shiv %}

    {% endblock html5shiv %}
    {% block cssincludes %}
    <link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap.min.css" />
    <link rel="stylesheet" href="{{ STATIC_URL }}css/easyblog.css" />
    {% endblock cssincludes %}
    {% block icons %}

     {% endblock icons %}

    {% block navigation %}

                EasyBlog

                            Home

    {% endblock navigation %}

EasyBlog super simple django-based blogging platform

              {% block content %}{% endblock %}

              {% block sidebar %}{% endblock %}

© Jason McClellan 2011


text:
layout: post
title: "Using Twitter Authentication with MVC"
excerpt: "Setting up authentication using Twitter is incredibly simply in MVC5. Here is a quick walk-through of its implementation."
tags: [OAuth, ASP.Net, MVC]
comments: true
---

Setting up an authentication service using Twitter is a breeze in MVC (version 5 in this case). Below is a quick walk-through of how this is done.

**Prequisites**:

* Twitter account
* ASP.NET MVC 5 Project

**Steps**:

1. Create App on Twitter Developers
2. Add Consumer Key and Secret to your MVC app.
3. Use your Twitter Auth

## Create an App on Twitter Developers

Head over to [Twitter Developers](https://dev.twitter.com/) site. Just above the footer, in the **Tools** section, click on '*Manage Your App*'.

![screenshot of Twitter Developers Manage App link]({{ site.url }}/images/manage-app.jpg)

In **Twitter Apps** click '*Create New App*' in the upper right hand corner.

* **Name**: Provide application name
* **Description**: Provide application description
* **Website**: Publicly accessible home page. If you do not have this yet, you can add a placeholder url (i.e. http://localhost)
* **Callback URL**: This value is not required, BUT for MVC, it does actually require a value. As note above, you can put a placeholder value here if you do not have a callback url. In our case, MVC will override whatever value you add in here.

Once you are done adding your Application Details, agree to the terms, then '*Create your Twitter application*"

When the App is created, you will find you *Consumer Key* and *Consumer Secret* in the '*Keys and Access Tokens*' section.

![screenshot of Key and Access Tokens]({{ site.url }}/images/keys-and-access-tokens.jpg)

## Add Consumer Key and Secret to your MVC app
Now that you have your Keys, we can add them into our MVC app. Find and open 'Startup.Auth.cs' in the 'App_Start' directory of your Project.

Uncomment the 'app.UseTwitterAuthentication' section and add in your Keys, then save and build your Project.

![screenshot of adding Twitter Keys]({{ site.url }}/images/startup-auth.jpg)

## Use your Twitter Auth
Navigate to your site and you should now see a Twitter button. Clicking this button will now send a request to Twitter to authenticate a user on your site.

![screenshot of Twitter Auth Button]({{ site.url }}/images/twitter-auth-button.jpg)

### Note on the Twitter App Callback URL setting
`Response status code does not indicate success: 401 (Unauthorized).`

If you do forget to add in a Callback URL, you will most likely receive this error. Just make sure your Callback URL is set in the Twitter App.

![screenshot of Twitter Auth Button]({{ site.url }}/images/twitter-app-error.png)


text:
package net.automatalib.util.minimizer;

import java.util.Collection;

import net.automatalib.commons.util.mappings.Mapping;

/**
 * The result structure of a minimization process. The result of a minimization process is a partition on the original
 * set of states. This is represented by a collection of {@link Block}s containing states that are equivalent and thus
 * can be merged.
 *

 * Since all states in a block are equivalent (and thus especially have the same set of outgoing edge labels), a
 * minimized automaton can be created from this partition by instantiating a state for each block. The edges between
 * those states are created in the following way: For each state/block, an original state is chosen arbitrarily from
 * this block. The edges are created according to the edges of this state, only that they point to the states
 * representing the blocks the respective target states belong to (using {@link #getBlockForState(Object)}).
 *

 * The blocks in the result partition are guaranteed to have contiguous IDs (see {@link Block#getId()}), starting at 0.
 * This allows an efficient construction of the resulting automaton.
 *

 * A more convenient way to obtain a representation of the resulting, minimized automaton is using a {@link
 * BlockAutomaton}.
 *
 * @param <S>
 *         state class.
 * @param <L>
 *         transition label class.
 *
 * @author Malte Isberner
 */
public final class MinimizationResult<S, L> {

    // the state storage, used for retrieving the State records
    // for an original state
    private final Mapping<S, State<S, L>> stateStorage;
    // the blocks in the final partition
    private final Collection<Block<S, L>> blocks;

    /**
     * Constructor.
     *
     * @param stateStorage
     *         the state storage,
     * @param blocks
     *         the final partition.
     */
    MinimizationResult(Mapping<S, State<S, L>> stateStorage, Collection<Block<S, L>> blocks) {
        this.stateStorage = stateStorage;
        this.blocks = blocks;
    }

    /**
     * Retrieves all (original) states in a block.
     *
     * @param block
     *         the block.
     *
     * @return a collection containing all original states in this block.
     */
    public static <S, L> Collection<S> getStatesInBlock(Block<S, L> block) {
        return new OriginalStateCollection<>(block.getStates());
    }

    /**
     * Retrieves the number of blocks in the final partition.
     *
     * @return the number of blocks.
     */
    public int getNumBlocks() {
        return blocks.size();
    }

    /**
     * Retrieves all blocks in the final partition.
     *
     * @return the final partition.
     */
    public Collection<Block<S, L>> getBlocks() {
        return blocks;
    }

    /**
     * Chooses a representative (i.e., an arbitrary element of the set of states) from a block.
     *
     * @param block
     *         the block.
     *
     * @return an arbitrary element of the state set of the given block.
     */
    public S getRepresentative(Block<S, L> block) {
        return block.getStates().choose().getOriginalState();
    }

    /**
     * Retrieves the block to which a given original state belongs.
     *
     * @param origState
     *         the original state.
     *
     * @return the corresponding block.
     */
    public Block<S, L> getBlockForState(S origState) {
        State<S, L> state = stateStorage.get(origState);
        return state.getBlock();
    }

    /**
     * Creates a {@link BlockAutomaton} using this results structure.
     *
     * @return the block automaton.
     */
    public BlockAutomaton<S, L> asBlockAutomaton() {
        return new BlockAutomaton<>(this);
    }
}


text:
package org.gradle.api.internal.artifacts.repositories.resolver;

import org.gradle.api.artifacts.ModuleVersionIdentifier;
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChain;
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.DescriptorParseContext;
import org.gradle.internal.component.model.ComponentArtifactMetaData;
import org.gradle.internal.component.model.DefaultDependencyMetaData;
import org.gradle.api.internal.component.ArtifactType;
import org.gradle.internal.resolve.resolver.ArtifactResolver;
import org.gradle.internal.resolve.resolver.DependencyToComponentResolver;
import org.gradle.internal.resolve.result.*;
import org.gradle.internal.resource.DefaultLocallyAvailableExternalResource;
import org.gradle.internal.resource.LocallyAvailableExternalResource;
import org.gradle.internal.resource.local.DefaultLocallyAvailableResource;
import org.gradle.internal.resource.local.LocallyAvailableResource;

import java.io.File;

/**
 * ParserSettings that control the scope of searches carried out during parsing.
 * If the parser asks for a resolver for the currently resolving revision, the resolver scope is only the repository where the module was resolved.
 * If the parser asks for a resolver for a different revision, the resolver scope is all repositories.
 */
public class ExternalResourceResolverDescriptorParseContext implements DescriptorParseContext {
    private final RepositoryChain mainResolvers;

    public ExternalResourceResolverDescriptorParseContext(RepositoryChain mainResolvers) {
        this.mainResolvers = mainResolvers;
    }

    public LocallyAvailableExternalResource getMetaDataArtifact(ModuleVersionIdentifier moduleVersionIdentifier, ArtifactType artifactType) {
        File resolvedArtifactFile = resolveMetaDataArtifactFile(moduleVersionIdentifier, mainResolvers.getDependencyResolver(), mainResolvers.getArtifactResolver(), artifactType);
        LocallyAvailableResource localResource = new DefaultLocallyAvailableResource(resolvedArtifactFile);
        return new DefaultLocallyAvailableExternalResource(resolvedArtifactFile.toURI(), localResource);
    }

    private File resolveMetaDataArtifactFile(ModuleVersionIdentifier moduleVersionIdentifier, DependencyToComponentResolver dependencyResolver,
                                             ArtifactResolver artifactResolver, ArtifactType artifactType) {
        BuildableComponentResolveResult moduleVersionResolveResult = new DefaultBuildableComponentResolveResult();
        dependencyResolver.resolve(new DefaultDependencyMetaData(moduleVersionIdentifier), moduleVersionResolveResult);

        BuildableArtifactSetResolveResult moduleArtifactsResolveResult = new DefaultBuildableArtifactSetResolveResult();
        artifactResolver.resolveModuleArtifacts(moduleVersionResolveResult.getMetaData(), artifactType, moduleArtifactsResolveResult);

        BuildableArtifactResolveResult artifactResolveResult = new DefaultBuildableArtifactResolveResult();
        ComponentArtifactMetaData artifactMetaData = moduleArtifactsResolveResult.getArtifacts().iterator().next();
        artifactResolver.resolveArtifact(artifactMetaData, moduleVersionResolveResult.getMetaData().getSource(), artifactResolveResult);
        return artifactResolveResult.getFile();
    }
}


text:
package org.semanticweb.elk.matching.conclusions;

import org.semanticweb.elk.matching.root.IndexedContextRootMatch;
import org.semanticweb.elk.matching.subsumers.IndexedObjectSomeValuesFromMatch;
import org.semanticweb.elk.owl.interfaces.ElkObjectProperty;
import org.semanticweb.elk.reasoner.saturation.conclusions.model.Propagation;

public class PropagationMatch1
		extends AbstractClassConclusionMatch<Propagation> {

	private final IndexedContextRootMatch destinationMatch_;

	private final ElkObjectProperty subDestinationMatch_;

	private final IndexedObjectSomeValuesFromMatch carryMatch_;

	PropagationMatch1(Propagation parent,
			IndexedContextRootMatch destinationMatch,
			ElkObjectProperty subDestinationMatch,
			IndexedObjectSomeValuesFromMatch carryMatch) {
		super(parent);
		this.destinationMatch_ = destinationMatch;
		this.subDestinationMatch_ = subDestinationMatch;
		this.carryMatch_ = carryMatch;
	}

	public IndexedContextRootMatch getDestinationMatch() {
		return destinationMatch_;
	}

	public ElkObjectProperty getSubDestinationMatch() {
		return subDestinationMatch_;
	}

	public IndexedObjectSomeValuesFromMatch getCarryMatch() {
		return carryMatch_;
	}

	@Override
	public <O> O accept(ClassConclusionMatch.Visitor<O> visitor) {
		return visitor.visit(this);
	}

	/**
	 * A factory for creating instances
	 *
	 * @author Yevgeny Kazakov
	 *
	 */
	public interface Factory {

		PropagationMatch1 getPropagationMatch1(Propagation parent,
				IndexedContextRootMatch destinationMatch,
				ElkObjectProperty subDestinationMatch,
				IndexedObjectSomeValuesFromMatch carryMatch);

	}

	/**
	 * The visitor pattern for instances
	 *
	 * @author Yevgeny Kazakov
	 *
	 * @param <O>
	 *            the type of the output
	 */
	interface Visitor<O> {

		O visit(PropagationMatch1 conclusionMatch);

	}

}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Scaevola ovalifolia var. glabra R.Br.

### Remarks
null


text:
<resources>
    <string name="app_name">PlayToPay</string>
    <string name="play_to_pay_title">PlayToPay</string>

    <!-- Select Player Screen -->
    <string name="select_people_count">How many people are playing?</string>
    <string name="commence_festivities">Commence Festivities</string>

    <!-- Game Select Screen -->
    <string name="game_to_play">What minigame shall you play?</string>
    <string name="player">Player</string>
    <string name="enter_name_for_player">Enter name for player</string>
    <string name="score_to_beat">Score to beat</string>

    <!-- Player Name Screen -->
    <string name="name_empty">Name can\'t be empty</string>
    <string name="name_taken">Name has been taken</string>

    <string name="done">Done</string>
    <string name="play_button">Play</string>
    <string name="hit_me_button">Hit Me!</string>
    <string name="score">Score</string>
    <string name="lets_go">Let\'s Go!</string>

    <!-- Games -->
    <string name="rapid_fire_game">Rapid Fire</string>
    <string name="bust_it_game">Bust It</string>
    <string name="switch_up_game">Switch Up</string>
    <string name="control_panel_game">Control Panel</string>
    <string name="random_game">Random</string>
    <string name="time">Time</string>

    <!-- Player Info -->
    <string name="scored_a">%1$s scored a</string>
    <string name="loser">LOSER</string>
    <string name="and_the_loser_is">And the\nLOSER\nis..</string>

</resources>


text:
package com.frankzhu.androidrecordmaster.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

import com.frankzhu.androidrecordmaster.R;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class HomeActivity extends AppCompatActivity {
    @Bind(R.id.toolbar)
    Toolbar mToolbar;
    @Bind(R.id.recycler_view)
    RecyclerView mRecyclerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);
        ButterKnife.bind(this);
        setSupportActionBar(mToolbar);
    }

    @OnClick(R.id.fab)
    void onAddRecord(View view) {
        startActivity(new Intent(HomeActivity.this, AddRecordActivity.class));
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_home, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}


text:
namespace Guidelines.Core.Bootstrap
{
	public interface IBootstrapTask
	{
		void Bootstrap();

		int Order { get; }
	}
}


text:
using Lw.Diagnostics;

namespace Lw.DirectoryServices
{
    public static class LogCategories
    {
        [LogCategoryDefinition(Lw.LogCategories.CoreDescription)]
        public const string Core = Lw.LogCategories.Core;

        [LogCategoryDefinition(Lw.LogCategories.EclDescription)]
        public const string Ecl = Lw.LogCategories.Ecl;

        [LogCategoryDefinition(Lw.LogCategories.CelDescription)]
        public const string Cel = Lw.LogCategories.Cel;
    }
}


text:
package tablesaw.rules;

import java.io.*;

import tablesaw.rules.Rule;
import org.junit.Before;
import org.junit.After;

import tablesaw.MakeAction;
import tablesaw.TablesawException;
import tablesaw.Tablesaw;

public class RulesHelper
	{
	public static class SimpleMakeAction implements MakeAction
		{
		private int m_ranCount = 0;

		public boolean didRun() { return (m_ranCount != 0); }
		public int getRunCount() { return (m_ranCount); }

		public void doMakeAction(Rule rule)
				throws TablesawException
			{
			m_ranCount ++;
			try
				{
				Iterable<String> targets = rule.getTargets();
				for (String t : targets)
					{
					File f = new File(t);
					if (f.exists())
						f.setLastModified(System.currentTimeMillis());
					else
						{
						f.getParentFile().mkdirs();
						f.createNewFile();
						}
					}
				}
			catch (Exception e)
				{
				throw new TablesawException(e);
				}
			}
		}

	public static String m_baseDirPath = "build/testdata";
	public static File m_baseDir = new File(m_baseDirPath);

	protected Tablesaw m_make;

	//---------------------------------------------------------------------------
	protected void createFile(String path, long mt)
		{
		createFile(path, mt, null);
		}

	//---------------------------------------------------------------------------
	protected void createFile(String path, long mt, String content)
		{
		File f = new File(m_baseDir, path);
		try
			{
			f.getParentFile().mkdirs();
			if (content != null)
				{
				PrintWriter pw = new PrintWriter(f);
				pw.println(content);
				pw.close();
				}
			else
				f.createNewFile();

			f.setLastModified(mt);
			}
		catch (Exception e)
			{
			e.printStackTrace();
			}
		}

	//---------------------------------------------------------------------------
	private void deltree(File directory)
		{
		if (!directory.exists())
			return;
		File[] list = directory.listFiles();

		if (list.length > 0)
			{
			for (int I = 0; I < list.length; I++)
				{
				if (list[I].isDirectory())
					deltree(list[I]);

				list[I].delete();
				}
			}

		directory.delete();
		}

	//---------------------------------------------------------------------------
	@Before
	public void setupFiles()
			throws TablesawException
		{
		m_baseDir.mkdirs();

		createFile("src/java/test/FirstClass.java", 10000L);
		createFile("src/java/test/SecondClass.java", 20000L);

		createFile("src/cpp/main.cpp", 50000L);
		createFile("src/cpp/file.cpp", 50100L);
		createFile("src/cpp/socket.cpp", 50000L);

		m_make = new Tablesaw();
		m_make.init();
		m_make.addSearchPath(".*\\.java", m_baseDirPath+"/src/java");
		m_make.addSearchPath(".*", m_baseDirPath);
		}

	//---------------------------------------------------------------------------
	@After
	public void cleanupFiles()
		{
		deltree(m_baseDir);
		}
	}


text:
layout: post
title: GIT stops after unpacking objects or resolving deltas
date: '2012-10-23T15:32:00.003-07:00'
author: Jan Fajfr
tags:
- Source Control
modified_time: '2014-06-26T14:15:06.778-07:00'
blogger_id: tag:blogger.com,1999:blog-1710034134179566048.post-4011874078382089830
blogger_orig_url: http://hoonzis.blogspot.com/2012/10/git-stops-after-unpacking-objects-or.html
---
This post describes an issues that you can get while using GIT behind NTLM (NT Lan Manager protocol) proxy, often used in corporations with windows networks.

Clone, pull and push all seem to finish fine, but they always stop at "Resolving deltas" or "Unpacking objects". The root of this issue is the fact that MSGIT uses curl, which does not know how to talk to NTLM authenticated proxy. There are two solutions which worked for me, first one not being stable.

### Solution 1: unstable, easiest

This \*usually\* works:

```
git clone -v https://myrepo.git
Cloning into 'myrepo-1'...
Password for 'https://user@myrepo.com':
POST git-upload-pack (174 bytes)
remote: Counting objects: 2287, done.
remote: Compressing objects: 100% (1276/1276), done.
remote: Total 2287 (delta 1340), reused 1692 (delta 883)
Receiving objects: 100% (2287/2287), 53.37 MiB | 632 KiB/s, done.
Resolving deltas: 100% (1340/1340), done.
```

Or another when, when pulling from a repo:

```
remote: Counting objects: 53, done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 28 (delta 23), reused 2 (delta 0)
Unpacking objects: 100% (28/28), done.
```

The problem is that nothing is updated on the disk. I have tried using
**-v** in order to obtain more information about what is going on, but I
never get more than shown above. I am using Git over HTTPS with the
HTTPS proxy well configured - so this should not be an issue.

After un-finished clone, I have noticed, that the **objects** directory
inside the **.git** directory actually changed it's size quite a lot. So
it seems, that the objects are well received but never written to the
actual branch. That might sound like a user-rights issue. But I am admin
on the machine and I have access write rights on the folder. So for now,
I don't know the cause of this problem. I have simple solution to
overcome this issue. What I do to fix the repository is quite
straightforward:

```
$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (2187/2187), done.
dangling commit da575f887db63ccf97f37f9cf96316307398db82
```

**Git fsck** always founds one dangling commit. It is a utility which
checks the integrity of the object database. Here the dangling commit is
a commit which is not used by any branch. To fix the issue I can just
merge the commit with the current branch.

    $git merge da575f887db63ccf97f37f9cf96316307398db82

And everything works just fine...

### Solution 2: stable solution

This needs some more effort. The solution is to use the CNTLM as a proxy
between the NTLM proxy and any application which needs to use it. [The
solution is excellently described on this
blog.](http://sparethought.wordpress.com/2012/12/06/setting-git-to-work-behind-ntlm-authenticated-proxy-cntlm-to-the-rescue/)

### Solution 3: not confirmed

I was not able to confirm this one, but at [this thread on StackOverflow](http://stackoverflow.com/questions/13473341/git-clone-with-ntlm-proxy-hangs-after-resolving-deltas)
someone mentioned to use **verify-pack** function of git. Verify-pack
verifies that *.pack* files, which are packed objects used by git during
the transfer. If the files were transfered correctly you should be able
to restore the commits contained inside the pack files. This actually
did not work on my post, since the pack file was corrupted.


text:
package gamecraft_2016;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import org.lwjgl.glfw.GLFW;
import org.lwjgl.system.Configuration;

/**
 * The main class creates a fixed timestep game and starts it.
 *
 * @author Heiko Brumme
 */
public class Gamecraft {

	private static String PATH_TO_DIRECTORY_CONTAINING_LIBRARIES = "native";

    /**
     * Main function.
     *
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        /* Load native libraries */
        try {
        	System.setProperty("org.lwjgl.librarypath", PATH_TO_DIRECTORY_CONTAINING_LIBRARIES);
            unpackNatives();
        } catch (IOException ex) {
            throw new IllegalStateException("Unable to initialize LWJGL", ex);
        }

        /* Start game */
        CatlineBling game = new FixedTimestepGame();
        try {
            game.start();
        } finally {
            /* GLFW has to be terminated or else the application will run in
             * background */
            GLFW.glfwTerminate();
        }
    }

    /**
     * This method loads the natives libraries required by LWJGL. The specified
     * libraries will get extracted into the folder native.
     *
     * @throw IOException if an error occurs during extracting the libraries
     */
    private static void unpackNatives() throws IOException {
        Path libraryPath = Paths.get("native");

        /* Only unpack if native folder doesn't exist */
        if (!Files.exists(libraryPath)) {
            /* Get OS name and architecture */
            String os = System.getProperty("os.name").toLowerCase();
            String arch = System.getProperty("os.arch").toLowerCase();

            /* Check if JVM is 64 bit */
            boolean is64bit = arch.equals("amd64") || arch.equals("x86_64");

            /* Extract libraries */
            if (!Files.isDirectory(libraryPath)) {
                Files.createDirectory(libraryPath);
            } else if (Files.exists(libraryPath)) {
                return;
            }
            String[] libraries;
            if (os.contains("win")) {
                /* Windows */
                if (is64bit) {
                    libraries = new String[]{
                        "lwjgl.dll",
                        "glfw.dll",
                        "OpenAL.dll",
                        "jemalloc.dll"
                    };
                } else {
                    libraries = new String[]{
                        "lwjgl32.dll",
                        "glfw32.dll",
                        "OpenAL32.dll",
                        "jemalloc32.dll"
                    };
                }
            } else if (os.contains("mac")) {
                /* Mac OS X */
                libraries = new String[]{
                    "liblwjgl.dylib",
                    "libglfw.dylib",
                    "libopenal.dylib",
                    "libjemalloc.dylib"
                };

                /* Mac OS X needs headless mode for AWT */
                System.setProperty("java.awt.headless", "true");
            } else if (os.contains("nix") || os.contains("nux") || os.indexOf("aix") > 0) {
                /* Linux */
                if (is64bit) {
                    libraries = new String[]{
                        "liblwjgl.so",
                        "libglfw.so",
                        "libopenal.so",
                        "libjemalloc.so"
                    };
                } else {
                    libraries = new String[]{
                        "liblwjgl32.so",
                        "libglfw32.so",
                        "libopenal32.so",
                        "libjemalloc32.so"
                    };
                }
            } else {
                /* Not supported */
                throw new RuntimeException("Operating System "
                                           + System.getProperty("os.name") + " is not supported");
            }
            for (String library : libraries) {
                Files.copy(Gamecraft.class.getResourceAsStream("/" + library), libraryPath.resolve(library),
                           StandardCopyOption.REPLACE_EXISTING);
            }
        }

        /* Set LWJGL library path */
        Configuration.LIBRARY_PATH.set(libraryPath.toString());
    }

}


text:
using AmplaData.AmplaData2008;
using Autofac;

namespace AmplaData.Web.Modules
{
    public class SimpleSecurityInjectionModule : Module
    {
        private readonly string userName;
        private readonly string password;

        public SimpleSecurityInjectionModule(string userName, string password)
        {
            this.userName = userName;
            this.password = password;
        }

        protected override void Load(ContainerBuilder builder)
        {
            base.Load(builder);
            builder.Register(c => CredentialsProvider.ForUsernameAndPassword(userName, password))
                   .As<ICredentialsProvider>();

        }
    }
}


text:
import { ChangeDetectionStrategy, Component } from '@angular/core';

@Component({
  selector: 'nb-flip-card-sizes',
  changeDetection: ChangeDetectionStrategy.OnPush,
  templateUrl: './flip-card-sizes.component.html',
})
export class FlipCardSizesComponent {
}


text:
using System.Collections.Generic;

namespace Wikia.RelatedPages
{
    public class RelatedPagesResultSet
    {
        public IDictionary<int, RelatedPage[]> items { get; set; }
        public string basepath { get; set; }
    }
}


text:
/*jslint node: true */
"use strict";

var mongoose = require('mongoose');
var Schema   = mongoose.Schema;

var InfluenceCardSchema = new Schema({
  type:   { type: String },
  share:  { type: String },
  amount: { type: Number },
  action: { type: String }
});

var _model = mongoose.model('InfluenceCard', InfluenceCardSchema);

var _list = function(success, fail) {
  _model.find({}, {__v: 0, token: 0 }, function (err, docs) {
    if (err) {
      fail(err);
    } else {
      success(docs);
    }
  });
};

var _findByObjectId = function (obj_id, success, fail) {
  _model.findOne({_id: obj_id}, function (err, doc) {
    if (err) {
      fail(err);
    } else {
      if (!doc) {
        doc = {};
      }
      success(doc);
    }
  });
};

var _findByType = function (type, success, fail) {
  _model.find({type: type}, {__v: 0}, function (err, doc) {
    if (err) {
      fail(err);
    } else {
      if (!doc) {
        doc = {};
      }
      success(doc);
    }
  });
};

// constants
exports.TYPE_DIVIDEND = "dividend";
exports.TYPE_PRICE    = "price";

exports.model          = _model;
exports.list           = _list;
exports.findByType     = _findByType;
exports.findByObjectId = _findByObjectId;
exports.schema         = InfluenceCardSchema;


text:
package com.joergeschmann.tools.loganalyzer;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.joergeschmann.tools.loganalyzer.filter.FilterProcessor;
import com.joergeschmann.tools.loganalyzer.output.LogEntryProcessor;
import com.joergeschmann.tools.loganalyzer.processing.LogLineParser;
import com.joergeschmann.tools.loganalyzer.processing.observer.LogEntryObserver;

/**
 * Holds the logic to parse a log line and fills a LogEntry with its parts.
 */
public class LogEntryParser implements LogLineParser<DefaultLogEntry> {

    private final Pattern logLineStartPattern;
    private final FilterProcessor<DefaultLogEntry> filterProcessor;
    private final List<LogEntryObserver<DefaultLogEntry>> observers;
    private final LogEntryProcessor valueProcessor;
    private final List<String> outputFieldnames;
    private DefaultLogEntry currentEntry;

    public LogEntryParser(Pattern logLineStartPatter, FilterProcessor<DefaultLogEntry> filterProcessor,
                          LogEntryProcessor valueProcessor) {
        this.logLineStartPattern = logLineStartPatter;
        this.filterProcessor = filterProcessor;
        this.observers = new ArrayList<>();
        this.valueProcessor = valueProcessor;
        this.outputFieldnames = this.valueProcessor.getFieldnames();
        this.currentEntry = new DefaultLogEntry();
    }

    @Override
    public void addObserver(LogEntryObserver<DefaultLogEntry> observer) {
        this.observers.add(observer);
    }

    @Override
    public void processLogLine(String line) {

        Matcher matcher = this.logLineStartPattern.matcher(line);

        /*
         * Log entries can be spread over multiple lines, consequently if the
         * line does not match the pattern, it is most likely another part ot
         * the message
         */
        if (!matcher.matches()) {
            String newMessageLine = valueProcessor.processValue(DefaultLogEntry.MESSAGE_KEY, line);
            currentEntry.appendMessageLine(newMessageLine);
            return;
        }

        /*
        * Output the old entry before creating a new one.
        */
        flush();

        currentEntry = new DefaultLogEntry();
        currentEntry.setOutputFields(outputFieldnames);

        for (String fieldname : outputFieldnames) {
            currentEntry.setValue(fieldname, valueProcessor.processValue(fieldname, matcher.group(fieldname)));
        }

    }

    @Override
    public void flush() {
        if (!currentEntry.hasContent()) {
            return;
        }

        if (!filterProcessor.isRelevant(currentEntry)) {
            return;
        } else {
            notifyObserver();
        }
    }

    private void notifyObserver() {
        for (LogEntryObserver<DefaultLogEntry> observer : observers) {
            observer.notify(currentEntry);
        }
    }

}


text:
/*globals qq*/

// Is the passed object a promise instance?
qq.isGenericPromise = function(maybePromise) {
    "use strict";
    return !!(maybePromise && maybePromise.then && qq.isFunction(maybePromise.then));
};

qq.Promise = function() {
    "use strict";

    var successArgs, failureArgs,
        successCallbacks = [],
        failureCallbacks = [],
        doneCallbacks = [],
        state = 0;

    qq.extend(this, {
        then: function(onSuccess, onFailure) {
            if (state === 0) {
                if (onSuccess) {
                    successCallbacks.push(onSuccess);
                }
                if (onFailure) {
                    failureCallbacks.push(onFailure);
                }
            }
            else if (state === -1) {
                onFailure && onFailure.apply(null, failureArgs);
            }
            else if (onSuccess) {
                onSuccess.apply(null,successArgs);
            }

            return this;
        },

        done: function(callback) {
            if (state === 0) {
                doneCallbacks.push(callback);
            }
            else {
                callback.apply(null, failureArgs === undefined ? successArgs : failureArgs);
            }

            return this;
        },

        success: function() {
            state = 1;
            successArgs = arguments;

            if (successCallbacks.length) {
                qq.each(successCallbacks, function(idx, callback) {
                    callback.apply(null, successArgs);
                });
            }

            if(doneCallbacks.length) {
                qq.each(doneCallbacks, function(idx, callback) {
                    callback.apply(null, successArgs);
                });
            }

            return this;
        },

        failure: function() {
            state = -1;
            failureArgs = arguments;

            if (failureCallbacks.length) {
                qq.each(failureCallbacks, function(idx, callback) {
                    callback.apply(null, failureArgs);
                });
            }

            if(doneCallbacks.length) {
                qq.each(doneCallbacks, function(idx, callback) {
                    callback.apply(null, failureArgs);
                });
            }

            return this;
        }
    });
};


text:
package org.jtwig.parser.parboiled.expression;

import org.jtwig.model.expression.TernaryOperationExpression;
import org.jtwig.parser.parboiled.ParserContext;
import org.jtwig.parser.parboiled.base.PositionTrackerParser;
import org.jtwig.parser.parboiled.base.SpacingParser;
import org.parboiled.Rule;

public class TernaryOperationExpressionParser extends ExpressionParser<TernaryOperationExpression> {
    public TernaryOperationExpressionParser(ParserContext context) {
        super(TernaryOperationExpressionParser.class, context);
    }

    @Override
    public Rule ExpressionRule() {
        SpacingParser spacingParser = parserContext().parser(SpacingParser.class);
        PositionTrackerParser positionTrackerParser = parserContext().parser(PositionTrackerParser.class);
        Rule initial = parserContext().parser(PrimaryExpressionParser.class).ExpressionRule();
        Rule recursive = parserContext().parser(AnyExpressionParser.class).ExpressionRule();
        return Sequence(
                positionTrackerParser.PushPosition(),
                initial, spacingParser.Spacing(),
                String("?"), spacingParser.Spacing(),
                recursive, spacingParser.Spacing(),
                String(":"), spacingParser.Spacing(),
                recursive,
                push(new TernaryOperationExpression(
                        positionTrackerParser.pop(3),
                        pop(2),
                        pop(1),
                        pop()
                ))
        );
    }
}


text:
pyexcel.extract\_a\_sheet\_from\_a\_book
========================================

.. currentmodule:: pyexcel

.. autofunction:: extract_a_sheet_from_a_book


text:
title: "Introduction"
date:
draft: false
weight: 1
---

# Crunchy Data Container Suite

Crunchy Container Suite is a collection of container images for PostgreSQL databases
and various tools to manage them.  The container images provided aim to be highly
configurable, easy to deploy and reliable.

The suite is cloud agnostic and certified for production deployment
with leading container platform technologies. Crunchy Container Suite supports all
major public clouds and enables enables hybrid cloud deployments.

Crunchy Container Suite includes:

* Compatibility with Docker, Kubernetes, Red Hat OpenShift, VMWare Enterprise PKS
* Cloud-agnostic: build your own database-as-a-service in any public, private, or hybrid cloud
* No forks: 100% open source, native PostgreSQL
* Backup, restore, & disaster recovery for terabytes of data
* Graphical database administration tools for simple point-and-click database management
* Open source database monitoring and graphing tools to help analyze and create administration strategies
* PostGIS, robust open source GIS 🌎 functionality, included by default
* Access to certified builds for Crunchy Certified PostgreSQL
* No proprietary software licensing fees

## Why Crunchy Containers?

Enterprise production PostgreSQL deployments require more than just a database.
Advanced capabilities like high availability, high-performant disaster recovery
for terabytes of data, and monitoring solutions are requirements for your
enterprise database cluster.

By providing the necessary microservices, including containers for scaling,
high-availability, disaster recovery, monitoring, and more,
Crunchy Container Suite will meet your production compliance, security,
and performance requirements and give you a trusted open source database experience.

### Elastic PostgreSQL

From creating uniformly managed, cloud-native production
deployments to allowing your engineering team to provision databases that meet
your compliance requirements, Crunchy Container Suite gives your organization the
flexibility to deploy your own personalized database-as-a-service tailored to
your needs.

### Open Source For Enterprise

Crunchy Container Suite comes with essential
open source tools for PostgreSQL management at scale, and lets you use powerful
extensions like geospatial management with PostGIS.

### Compliance At Scale

Deploy Crunchy Certified PostgreSQL with Crunchy Container
Suite to harness the security of a Common Criteria EAL 2+ certified
database on trusted platforms such as Red Hat OpenShift or Pivotal Container Service.


text:
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

 Add Server

                <form class="form-horizontal">

                        Name

                            <input type="text" class="form-control" id="inputEmail3" placeholder="My Server">

                        IP Address

                            <input type="text" class="form-control" id="inputEmail3" placeholder="IP Address">

                        Connect As

                            <input type="text" class="form-control" id="inputEmail3" placeholder="root">

                                    <input type="checkbox" checked> Receives Code Deployments

                        Project Path

                            <input type="text" class="form-control" id="inputEmail3" placeholder="/var/www/system.com">

                </form>

                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save</button>