text:
package com.ecspringcloud.easycloud.common.base;

import com.alibaba.fastjson.JSON;
import com.ecspringcloud.easycloud.common.bean.Token;
import com.ecspringcloud.easycloud.common.enums.ResultEnum;
import com.ecspringcloud.easycloud.common.utils.Const;
import com.ecspringcloud.easycloud.common.utils.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author sunping
 * @create 2017/8/17
 */
public class BaseController {

    @Autowired
    protected HttpServletRequest request;

    @Autowired
    protected HttpServletResponse response;

    /**
     * 是否外部请求
     * @return
     */
    protected boolean isOuterRequest() {
        String value = request.getHeader(Const.GATEWAY_HEAD_KEY);
        if (value != null && value.equals(Const.GATEWAY_HEAD_VALUE)) {
            return true;
        }
        return false;
    }

    /**
     * 获取token对象
     * @return
     */
    protected Token getToken(){
        String jwt=request.getHeader(Const.GATEWAY_JWT_KEY);
        if(StringUtil.isAnyBlank(jwt)){
           return null;
        }
        return JSON.parseObject(jwt,Token.class);
    }

    /**
     * 返回成功结果
     * @return
     */
    protected ApiResult successResult(){
        return result(ResultEnum.SUCCESS.getValue(),ResultEnum.SUCCESS.getName());
    }

    /**
     * 返回成功结果带数据
     * @param data
     * @return
     */
    protected ApiResult successResultWithData(Object data){
        ApiResult result=successResult();
        result.setData(data);
        return result;
    }

    /**
     * 返回成功结果
     * @param message
     * @return
     */
    protected ApiResult successResult(String message){
        return result(ResultEnum.SUCCESS.getValue(),message);
    }

    /**
     * 返回失败结果
     * @param resultEnum
     * @return
     */
    protected ApiResult failResult(ResultEnum resultEnum){
        return result(resultEnum.getValue(),resultEnum.getName());
    }

    /**
     * 返回失败结果
     * @param status
     * @param message
     * @return
     */
    protected ApiResult failResult(Integer status,String message){
        return result(status,message);
    }

    /**
     * 结果
     * @param status
     * @param message
     * @return
     */
    private ApiResult result(Integer status,String message){
        ApiResult apiResult=new ApiResult();
        apiResult.setStatus(status);
        apiResult.setMessage(message);
        return apiResult;
    }

}


text:
package org.biouno.unochoice.model;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.jenkinsci.plugins.scriptler.util.ScriptHelper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;

@RunWith(PowerMockRunner.class)
@PrepareForTest({ScriptHelper.class})
public class TestGroovyScript {

	@Test
	public void testConstructors() {
		GroovyScript script = new GroovyScript("return ['a', 'b']", "return ['EMPTY!']");

		assertEquals("return ['a', 'b']", script.getScript());
		assertEquals("return ['EMPTY!']", script.getFallbackScript());
	}

	@SuppressWarnings("unchecked")
	@Test
	public void testEvals() {
		GroovyScript script = new GroovyScript("return [flag, 'b']", "return ['EMPTY!']");

		List<String> returnValue = (List<String>) script.eval(null);
		assertEquals(Arrays.asList(new String[]{"EMPTY!"}), returnValue);

		Map<String, String> parameters = new HashMap<String, String>();
		parameters.put("flag", "true");

		returnValue = (List<String>) script.eval(null,parameters);
		assertEquals(Arrays.asList(new String[]{"true", "b"}), returnValue);
	}

	@Test
	public void testEquals() {
		GroovyScript script1 = new GroovyScript("return [flag, 'b']", "return ['EMPTY!']");
		GroovyScript script2 = new GroovyScript("return [flag, 'b']", "return ['EMPTY!']");
		assertEquals(script1, script2);

		GroovyScript script3 = new GroovyScript("return [flag, 'c', 'd']", "return ['EMPTY!']");
		assertNotEquals(script1, script3);
	}

}

redpajama_set_name: RedPajamaGithub


text:
using System.Collections.Generic;

namespace P03.RequestParser
{
    using System;

    public class RequestParser
    {
        private static string HttpResponseHeader = "HTTP/1.1 {0}\nContent-Length: {1}\nContent-Type: text/plain\n\n{2}";
        private static Dictionary<int, string> StatusTextByResponseCode = new Dictionary<int, string>
        {
            {200,"OK"},
            {404,"Not Found"}
        };
        private static Dictionary<string, HashSet<string>> ValidActions = new Dictionary<string, HashSet<string>>();

        static void Main()
        {
            GetValidActions();
            string httpRequest = Console.ReadLine();
            string httpResponce = GetHttpResponce(httpRequest);
            Console.WriteLine(httpResponce);
        }

        private static string GetHttpResponce(string httpRequest)
        {
            var requestParams = httpRequest.Split(new[] { ' ', '/' }, StringSplitOptions.RemoveEmptyEntries);
            var method = requestParams[0].ToLower();
            if (method != "get" && method != "post")
            {
                return GetStatusMessage(404);
            }

            var path = requestParams[1];
            var protocol = requestParams[2];
            var version = requestParams[3];

            if (ValidActions.ContainsKey(path) && ValidActions[path].Contains(method))
            {
                return GetStatusMessage(200);
            }

            return GetStatusMessage(404);
        }

        private static string GetStatusMessage(int statusCode)
        {
            return string.Format(HttpResponseHeader, $"{statusCode} {StatusTextByResponseCode[statusCode]}", StatusTextByResponseCode[statusCode].Length, StatusTextByResponseCode[statusCode]);
        }

        private static void GetValidActions()
        {
            string currentPath = string.Empty;

            while ((currentPath = Console.ReadLine()).ToUpper() != "END")
            {
                string[] pathArgs = currentPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
                string path = pathArgs[0];
                string method = pathArgs[1];

                if (!ValidActions.ContainsKey(path))
                {
                    ValidActions.Add(path, new HashSet<string>());
                }

                ValidActions[path].Add(method.ToLower());
            }
        }
    }
}


text:
/*
 * Functionality for the CodeIgniter Debug Toolbar.
 */

var ciDebugBar = {

	toolbarContainer : null,
	toolbar : null,
	icon : null,

	init : function () {
		this.toolbarContainer = document.getElementById('toolbarContainer');
		this.toolbar          = document.getElementById('debug-bar');
		this.icon             = document.getElementById('debug-icon');

		ciDebugBar.createListeners();
		ciDebugBar.setToolbarState();
		ciDebugBar.setToolbarPosition();
		ciDebugBar.setToolbarTheme();
		ciDebugBar.toggleViewsHints();
		ciDebugBar.routerLink();

		document.getElementById('debug-bar-link').addEventListener('click', ciDebugBar.toggleToolbar, true);
		document.getElementById('debug-icon-link').addEventListener('click', ciDebugBar.toggleToolbar, true);

		// Allows to highlight the row of the current history request
		var btn = this.toolbar.querySelector('button[data-time="' + localStorage.getItem('debugbar-time') + '"]');
		ciDebugBar.addClass(btn.parentNode.parentNode, 'current');

		historyLoad = this.toolbar.getElementsByClassName('ci-history-load');

		for (var i = 0; i < historyLoad.length; i++)
		{
			historyLoad[i].addEventListener('click', function () {
				loadDoc(this.getAttribute('data-time'));
			}, true);
		}

		// Display the active Tab on page load
		var tab = ciDebugBar.readCookie('debug-bar-tab');
		if (document.getElementById(tab))
		{
			var el           = document.getElementById(tab);
			el.style.display = 'block';
			ciDebugBar.addClass(el, 'active');
			tab = document.querySelector('[data-tab=' + tab + ']');
			if (tab)
			{
				ciDebugBar.addClass(tab.parentNode, 'active');
			}
		}
	},

	createListeners : function () {
		var buttons = [].slice.call(this.toolbar.querySelectorAll('.ci-label a'));

		for (var i = 0; i < buttons.length; i++)
		{
			buttons[i].addEventListener('click', ciDebugBar.showTab, true);
		}

		// Hook up generic toggle via data attributes `data-toggle="foo"`
		var links = this.toolbar.querySelectorAll('[data-toggle]');
		for (var i = 0; i < links.length; i++)
		{
			links[i].addEventListener('click', ciDebugBar.toggleRows, true);
		}
	},

	showTab: function () {
		// Get the target tab, if any
		var tab = document.getElementById(this.getAttribute('data-tab'));

		// If the label have not a tab stops here
		if (! tab)
		{
			return;
		}

		// Remove debug-bar-tab cookie
		ciDebugBar.createCookie('debug-bar-tab', '', -1);

		// Check our current state.
		var state = tab.style.display;

		// Hide all tabs
		var tabs = document.querySelectorAll('#debug-bar .tab');

		for (var i = 0; i < tabs.length; i++)
		{
			tabs[i].style.display = 'none';
		}

		// Mark all labels as inactive
		var labels = document.querySelectorAll('#debug-bar .ci-label');

		for (var i = 0; i < labels.length; i++)
		{
			ciDebugBar.removeClass(labels[i], 'active');
		}

		// Show/hide the selected tab
		if (state != 'block')
		{
			tab.style.display = 'block';
			ciDebugBar.addClass(this.parentNode, 'active');
			// Create debug-bar-tab cookie to persistent state
			ciDebugBar.createCookie('debug-bar-tab', this.getAttribute('data-tab'), 365);
		}
	},

	addClass : function (el, className) {
		if (el.classList)
		{
			el.classList.add(className);
		}
		else
		{
			el.className += ' ' + className;
		}
	},

	removeClass : function (el, className) {
		if (el.classList)
		{
			el.classList.remove(className);
		}
		else
		{
			el.className = el.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
		}
	},

	/**
	 * Toggle display of another object based on
	 * the data-toggle value of this object
	 *
	 * @param event
	 */
	toggleRows : function(event) {
		if(event.target)
		{
			let row = event.target.closest('tr');
			let target = document.getElementById(row.getAttribute('data-toggle'));
			target.style.display = target.style.display === 'none' ? 'table-row' : 'none';
		}
	},

	/**
	 * Toggle display of a data table
	 *
	 * @param obj
	 */
	toggleDataTable : function (obj) {
		if (typeof obj == 'string')
		{
			obj = document.getElementById(obj + '_table');
		}

		if (obj)
		{
			obj.style.display = obj.style.display === 'none' ? 'block' : 'none';
		}
	},

	/**
	 * Toggle display of timeline child elements
	 *
	 * @param obj
	 */
	toggleChildRows : function (obj) {
		if (typeof obj == 'string')
		{
			par = document.getElementById(obj + '_parent')
			obj = document.getElementById(obj + '_children');
		}

		if (par && obj)
		{
			obj.style.display = obj.style.display === 'none' ? '' : 'none';
			par.classList.toggle('timeline-parent-open');
		}
	},

	//--------------------------------------------------------------------

	/**
	 *   Toggle tool bar from full to icon and icon to full
	 */
	toggleToolbar : function () {
		var open = ciDebugBar.toolbar.style.display != 'none';

		ciDebugBar.icon.style.display    = open == true ? 'inline-block' : 'none';
		ciDebugBar.toolbar.style.display = open == false ? 'inline-block' : 'none';

		// Remember it for other page loads on this site
		ciDebugBar.createCookie('debug-bar-state', '', -1);
		ciDebugBar.createCookie('debug-bar-state', open == true ? 'minimized' : 'open' , 365);
	},

	/**
	 * Sets the initial state of the toolbar (open or minimized) when
	 * the page is first loaded to allow it to remember the state between refreshes.
	 */
	setToolbarState: function () {
		var open = ciDebugBar.readCookie('debug-bar-state');

		ciDebugBar.icon.style.display    = open != 'open' ? 'inline-block' : 'none';
		ciDebugBar.toolbar.style.display = open == 'open' ? 'inline-block' : 'none';
	},

	toggleViewsHints: function () {
		// Avoid toggle hints on history requests that are not the initial
		if (localStorage.getItem('debugbar-time') != localStorage.getItem('debugbar-time-new'))
		{
			var a  = document.querySelector('a[data-tab="ci-views"]');
			a.href = '#';
			return;
		}

		var nodeList       = []; // [ Element, NewElement( 1 )/OldElement( 0 ) ]
		var sortedComments = [];
		var comments       = [];

		var getComments = function () {
			var nodes        = [];
			var result       = [];
			var xpathResults = document.evaluate( "//comment()[starts-with(., ' DEBUG-VIEW')]", document, null, XPathResult.ANY_TYPE, null);
			var nextNode     = xpathResults.iterateNext();
			while ( nextNode )
			{
				nodes.push( nextNode );
				nextNode = xpathResults.iterateNext();
			}

			// sort comment by opening and closing tags
			for (var i = 0; i < nodes.length; ++i)
			{
				// get file path + name to use as key
				var path = nodes[i].nodeValue.substring( 18, nodes[i].nodeValue.length - 1 );

				if ( nodes[i].nodeValue[12] === 'S' ) // simple check for start comment
				{
					// create new entry
					result[path] = [ nodes[i], null ];
				}
				else if (result[path])
				{
					// add to existing entry
					result[path][1] = nodes[i];
				}
			}

			return result;
		};

		// find node that has TargetNode as parentNode
		var getParentNode = function ( node, targetNode ) {
			if ( node.parentNode === null )
			{
				return null;
			}

			if ( node.parentNode !== targetNode )
			{
				return getParentNode( node.parentNode, targetNode );
			}

			return node;
		};

		// define invalid & outer ( also invalid ) elements
		const INVALID_ELEMENTS = [ 'NOSCRIPT', 'SCRIPT', 'STYLE' ];
		const OUTER_ELEMENTS   = [ 'HTML', 'BODY', 'HEAD' ];

		var getValidElementInner = function ( node, reverse ) {
			// handle invalid tags
			if ( OUTER_ELEMENTS.indexOf( node.nodeName ) !== -1 )
			{
				for (var i = 0; i < document.body.children.length; ++i)
				{
					var index   = reverse ? document.body.children.length - ( i + 1 ) : i;
					var element = document.body.children[index];

					// skip invalid tags
					if ( INVALID_ELEMENTS.indexOf( element.nodeName ) !== -1 )
					{
						continue;
					}

					return [ element, reverse ];
				}

				return null;
			}

			// get to next valid element
			while ( node !== null && INVALID_ELEMENTS.indexOf( node.nodeName ) !== -1 )
			{
				node = reverse ? node.previousElementSibling : node.nextElementSibling;
			}

			// return non array if we couldnt find something
			if ( node === null )
			{
				return null;
			}

			return [ node, reverse ];
		};

		// get next valid element ( to be safe to add divs )
		// @return [ element, skip element ] or null if we couldnt find a valid place
		var getValidElement = function ( nodeElement ) {
			if (nodeElement)
			{
				if ( nodeElement.nextElementSibling !== null )
				{
					return getValidElementInner( nodeElement.nextElementSibling, false )
						|| getValidElementInner( nodeElement.previousElementSibling, true );
				}
				if ( nodeElement.previousElementSibling !== null )
				{
					return getValidElementInner( nodeElement.previousElementSibling, true );
				}
			}

			// something went wrong! -> element is not in DOM
			return null;
		};

		function showHints()
		{
			// Had AJAX? Reset view blocks
			sortedComments = getComments();

			for (var key in sortedComments)
			{
				var startElement = getValidElement( sortedComments[key][0] );
				var endElement   = getValidElement( sortedComments[key][1] );

				// skip if we couldnt get a valid element
				if ( startElement === null || endElement === null )
				{
					continue;
				}

				// find element which has same parent as startelement
				var jointParent = getParentNode( endElement[0], startElement[0].parentNode );
				if ( jointParent === null )
				{
					// find element which has same parent as endelement
					jointParent = getParentNode( startElement[0], endElement[0].parentNode );
					if ( jointParent === null )
					{
						// both tries failed
						continue;
					}
					else
					{
						startElement[0] = jointParent;
					}
				}
				else
				{
					endElement[0] = jointParent;
				}

				var debugDiv   = document.createElement( 'div' ); // holder
				var debugPath  = document.createElement( 'div' ); // path
				var childArray = startElement[0].parentNode.childNodes; // target child array
				var parent     = startElement[0].parentNode;
				var start, end;

				// setup container
				debugDiv.classList.add( 'debug-view' );
				debugDiv.classList.add( 'show-view' );
				debugPath.classList.add( 'debug-view-path' );
				debugPath.innerText = key;
				debugDiv.appendChild( debugPath );

				// calc distance between them
				// start
				for (var i = 0; i < childArray.length; ++i)
				{
					// check for comment ( start & end ) -> if its before valid start element
					if ( childArray[i] === sortedComments[key][1] ||
						childArray[i] === sortedComments[key][0] ||
						childArray[i] === startElement[0] )
					{
						start = i;
						if ( childArray[i] === sortedComments[key][0] )
						{
							start++; // increase to skip the start comment
						}
						break;
					}
				}
				// adjust if we want to skip the start element
				if ( startElement[1] )
				{
					start++;
				}

				// end
				for (var i = start; i < childArray.length; ++i)
				{
					if ( childArray[i] === endElement[0] )
					{
						end = i;
						// dont break to check for end comment after end valid element
					}
					else if ( childArray[i] === sortedComments[key][1] )
					{
						// if we found the end comment, we can break
						end = i;
						break;
					}
				}

				// move elements
				var number = end - start;
				if ( endElement[1] )
				{
					number++;
				}
				for (var i = 0; i < number; ++i)
				{
					if ( INVALID_ELEMENTS.indexOf( childArray[start] ) !== -1 )
					{
						// skip invalid childs that can cause problems if moved
						start++;
						continue;
					}
					debugDiv.appendChild( childArray[start] );
				}

				// add container to DOM
				nodeList.push( parent.insertBefore( debugDiv, childArray[start] ) );
			}

			ciDebugBar.createCookie('debug-view', 'show', 365);
			ciDebugBar.addClass(btn, 'active');
		}

		function hideHints()
		{
			for (var i = 0; i < nodeList.length; ++i)
			{
				var index;

				// find index
				for (var j = 0; j < nodeList[i].parentNode.childNodes.length; ++j)
				{
					if ( nodeList[i].parentNode.childNodes[j] === nodeList[i] )
					{
						index = j;
						break;
					}
				}

				// move child back
				while ( nodeList[i].childNodes.length !== 1 )
				{
					nodeList[i].parentNode.insertBefore( nodeList[i].childNodes[1], nodeList[i].parentNode.childNodes[index].nextSibling  );
					index++;
				}

				nodeList[i].parentNode.removeChild( nodeList[i] );
			}
			nodeList.length = 0;

			ciDebugBar.createCookie('debug-view', '', -1);
			ciDebugBar.removeClass(btn, 'active');
		}

		var btn = document.querySelector('[data-tab=ci-views]');

		// If the Views Collector is inactive stops here
		if (! btn)
		{
			return;
		}

		btn.parentNode.onclick = function () {
			if (ciDebugBar.readCookie('debug-view'))
			{
				hideHints();
			}
			else
			{
				showHints();
			}
		};

		// Determine Hints state on page load
		if (ciDebugBar.readCookie('debug-view'))
		{
			showHints();
		}
	},

	setToolbarPosition: function () {
		var btnPosition = this.toolbar.querySelector('#toolbar-position');

		if (ciDebugBar.readCookie('debug-bar-position') === 'top')
		{
			ciDebugBar.addClass(ciDebugBar.icon, 'fixed-top');
			ciDebugBar.addClass(ciDebugBar.toolbar, 'fixed-top');
		}

		btnPosition.addEventListener('click', function () {
			var position = ciDebugBar.readCookie('debug-bar-position');

			ciDebugBar.createCookie('debug-bar-position', '', -1);

			if (!position || position === 'bottom')
			{
				ciDebugBar.createCookie('debug-bar-position', 'top', 365);
				ciDebugBar.addClass(ciDebugBar.icon, 'fixed-top');
				ciDebugBar.addClass(ciDebugBar.toolbar, 'fixed-top');
			}
			else
			{
				ciDebugBar.createCookie('debug-bar-position', 'bottom', 365);
				ciDebugBar.removeClass(ciDebugBar.icon, 'fixed-top');
				ciDebugBar.removeClass(ciDebugBar.toolbar, 'fixed-top');
			}
		}, true);
	},

	setToolbarTheme: function () {
		var btnTheme    = this.toolbar.querySelector('#toolbar-theme');
		var isDarkMode  = window.matchMedia("(prefers-color-scheme: dark)").matches;
		var isLightMode = window.matchMedia("(prefers-color-scheme: light)").matches;

		// If a cookie is set with a value, we force the color scheme
		if (ciDebugBar.readCookie('debug-bar-theme') === 'dark')
		{
			ciDebugBar.removeClass(ciDebugBar.toolbarContainer, 'light');
			ciDebugBar.addClass(ciDebugBar.toolbarContainer, 'dark');
		}
		else if (ciDebugBar.readCookie('debug-bar-theme') === 'light')
		{
			ciDebugBar.removeClass(ciDebugBar.toolbarContainer, 'dark');
			ciDebugBar.addClass(ciDebugBar.toolbarContainer, 'light');
		}

		btnTheme.addEventListener('click', function () {
			var theme = ciDebugBar.readCookie('debug-bar-theme');

			if (!theme && window.matchMedia("(prefers-color-scheme: dark)").matches)
			{
				// If there is no cookie, and "prefers-color-scheme" is set to "dark"
				// It means that the user wants to switch to light mode
				ciDebugBar.createCookie('debug-bar-theme', 'light', 365);
				ciDebugBar.removeClass(ciDebugBar.toolbarContainer, 'dark');
				ciDebugBar.addClass(ciDebugBar.toolbarContainer, 'light');
			}
			else
			{
				if (theme === 'dark')
				{
					ciDebugBar.createCookie('debug-bar-theme', 'light', 365);
					ciDebugBar.removeClass(ciDebugBar.toolbarContainer, 'dark');
					ciDebugBar.addClass(ciDebugBar.toolbarContainer, 'light');
				}
				else
				{
					// In any other cases: if there is no cookie, or the cookie is set to
					// "light", or the "prefers-color-scheme" is "light"...
					ciDebugBar.createCookie('debug-bar-theme', 'dark', 365);
					ciDebugBar.removeClass(ciDebugBar.toolbarContainer, 'light');
					ciDebugBar.addClass(ciDebugBar.toolbarContainer, 'dark');
				}
			}
		}, true);
	},

	/**
	 * Helper to create a cookie.
	 *
	 * @param name
	 * @param value
	 * @param days
	 */
	createCookie : function (name,value,days) {
		if (days)
		{
			var date = new Date();

			date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));

			var expires = "; expires=" + date.toGMTString();
		}
		else
		{
			var expires = "";
		}

		document.cookie = name + "=" + value + expires + "; path=/; samesite=Lax";
	},

	readCookie : function (name) {
		var nameEQ = name + "=";
		var ca     = document.cookie.split(';');

		for (var i = 0; i < ca.length; i++)
		{
			var c = ca[i];
			while (c.charAt(0) == ' ')
			{
				c = c.substring(1,c.length);
			}
			if (c.indexOf(nameEQ) == 0)
			{
				return c.substring(nameEQ.length,c.length);
			}
		}
		return null;
	},

	trimSlash: function (text) {
		return text.replace(/^\/|\/$/g, '');
	},

	routerLink: function () {
		var row, _location;
		var rowGet = this.toolbar.querySelectorAll('td[data-debugbar-route="GET"]');
		var patt   = /\((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\)/;

		for (var i = 0; i < rowGet.length; i++)
		{
			row = rowGet[i];
			if (!/\/\(.+?\)/.test(rowGet[i].innerText))
			{
				row.style = 'cursor: pointer;';
				row.setAttribute('title', location.origin + '/' + ciDebugBar.trimSlash(row.innerText));
				row.addEventListener('click', function (ev) {
					_location          = location.origin + '/' + ciDebugBar.trimSlash(ev.target.innerText);
					var redirectWindow = window.open(_location, '_blank');
					redirectWindow.location;
				});
			}
			else
			{
				row.innerHTML = '<div>' + row.innerText + '</div>'
					+ '<form data-debugbar-route-tpl="' + ciDebugBar.trimSlash(row.innerText.replace(patt, '?')) + '">'
					+ row.innerText.replace(patt, '<input type="text" placeholder="$1">')
					+ '<input type="submit" value="Go" style="margin-left: 4px;">'
					+ '</form>';
			}
		}

		rowGet = this.toolbar.querySelectorAll('td[data-debugbar-route="GET"] form');
		for (var i = 0; i < rowGet.length; i++)
		{
			row = rowGet[i];

			row.addEventListener('submit', function (event) {
				event.preventDefault()
				var inputArray = [], t = 0;
				var input      = event.target.querySelectorAll('input[type=text]');
				var tpl        = event.target.getAttribute('data-debugbar-route-tpl');

				for (var n = 0; n < input.length; n++)
				{
					if (input[n].value.length > 0)
					{
						inputArray.push(input[n].value);
					}
				}

				if (inputArray.length > 0)
				{
					_location = location.origin + '/' + tpl.replace(/\?/g, function () {
						return inputArray[t++]
					});

					var redirectWindow = window.open(_location, '_blank');
					redirectWindow.location;
				}
			})
		}
	}
};


text:
package org.cloudname.core;

/**
 * Lease notifications to clients.
 *
 * @author stalehd@gmail.com
 */
public interface LeaseListener {
    /**
     * A new lease is created.
     *
     * @param path The full path of the lease
     * @param data The data stored on the lease
     */
    void leaseCreated(final CloudnamePath path, final String data);

    /**
     * A lease is removed. The lease might not exist anymore at this point in time.
     *
     * @param path The path of the lease.
     */
    void leaseRemoved(final CloudnamePath path);

    /**
     * Lease data have changed in one of the leases the client is listening on.
     *
     * @param path Full path to the lease that have changed
     * @param data The new data element stored in the lease
     */
    void dataChanged(final CloudnamePath path, final String data);
}


text:
.highlight pre .hll { background-color: #ffffcc }
.highlight pre .c { color: #aaaaaa; font-style: italic } /* Comment */
.highlight pre .err { color: #F00000; background-color: #F0A0A0 } /* Error */
.highlight pre .k { color: #0000aa } /* Keyword */
.highlight pre .cm { color: #aaaaaa; font-style: italic } /* Comment.Multiline */
.highlight pre .cp { color: #4c8317 } /* Comment.Preproc */
.highlight pre .c1 { color: #aaaaaa; font-style: italic } /* Comment.Single */
.highlight pre .cs { color: #0000aa; font-style: italic } /* Comment.Special */
.highlight pre .gd { color: #aa0000 } /* Generic.Deleted */
.highlight pre .ge { font-style: italic } /* Generic.Emph */
.highlight pre .gr { color: #aa0000 } /* Generic.Error */
.highlight pre .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight pre .gi { color: #00aa00 } /* Generic.Inserted */
.highlight pre .go { color: #888888 } /* Generic.Output */
.highlight pre .gp { color: #555555 } /* Generic.Prompt */
.highlight pre .gs { font-weight: bold } /* Generic.Strong */
.highlight pre .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight pre .gt { color: #aa0000 } /* Generic.Traceback */
.highlight pre .kc { color: #0000aa } /* Keyword.Constant */
.highlight pre .kd { color: #0000aa } /* Keyword.Declaration */
.highlight pre .kn { color: #0000aa } /* Keyword.Namespace */
.highlight pre .kp { color: #0000aa } /* Keyword.Pseudo */
.highlight pre .kr { color: #0000aa } /* Keyword.Reserved */
.highlight pre .kt { color: #00aaaa } /* Keyword.Type */
.highlight pre .m { color: #009999 } /* Literal.Number */
.highlight pre .s { color: #aa5500 } /* Literal.String */
.highlight pre .na { color: #1e90ff } /* Name.Attribute */
.highlight pre .nb { color: #00aaaa } /* Name.Builtin */
.highlight pre .nc { color: #00aa00; text-decoration: underline } /* Name.Class */
.highlight pre .no { color: #aa0000 } /* Name.Constant */
.highlight pre .nd { color: #888888 } /* Name.Decorator */
.highlight pre .ni { color: #800000; font-weight: bold } /* Name.Entity */
.highlight pre .nf { color: #00aa00 } /* Name.Function */
.highlight pre .nn { color: #00aaaa; text-decoration: underline } /* Name.Namespace */
.highlight pre .nt { color: #1e90ff; font-weight: bold } /* Name.Tag */
.highlight pre .nv { color: #aa0000 } /* Name.Variable */
.highlight pre .ow { color: #0000aa } /* Operator.Word */
.highlight pre .w { color: #bbbbbb } /* Text.Whitespace */
.highlight pre .mf { color: #009999 } /* Literal.Number.Float */
.highlight pre .mh { color: #009999 } /* Literal.Number.Hex */
.highlight pre .mi { color: #009999 } /* Literal.Number.Integer */
.highlight pre .mo { color: #009999 } /* Literal.Number.Oct */
.highlight pre .sb { color: #aa5500 } /* Literal.String.Backtick */
.highlight pre .sc { color: #aa5500 } /* Literal.String.Char */
.highlight pre .sd { color: #aa5500 } /* Literal.String.Doc */
.highlight pre .s2 { color: #aa5500 } /* Literal.String.Double */
.highlight pre .se { color: #aa5500 } /* Literal.String.Escape */
.highlight pre .sh { color: #aa5500 } /* Literal.String.Heredoc */
.highlight pre .si { color: #aa5500 } /* Literal.String.Interpol */
.highlight pre .sx { color: #aa5500 } /* Literal.String.Other */
.highlight pre .sr { color: #009999 } /* Literal.String.Regex */
.highlight pre .s1 { color: #aa5500 } /* Literal.String.Single */
.highlight pre .ss { color: #0000aa } /* Literal.String.Symbol */
.highlight pre .bp { color: #00aaaa } /* Name.Builtin.Pseudo */
.highlight pre .vc { color: #aa0000 } /* Name.Variable.Class */
.highlight pre .vg { color: #aa0000 } /* Name.Variable.Global */
.highlight pre .vi { color: #aa0000 } /* Name.Variable.Instance */
.highlight pre .il { color: #009999 } /* Literal.Number.Integer.Long */


text:
class CreateSubmission < ActiveRecord::Migration
  def change
    create_table :submissions do |t|
      t.integer :user_id
      t.integer :evaluation_id
      t.timestamps null: false
    end

    add_index :submissions, :user_id
    add_index :submissions, :evaluation_id
  end
end


text:
<?php

/**
 * This code was generated by
 * \ / _    _  _|   _  _
 * | (_)\/(_)(_|\/| |(/_  v1.0.0
 * /       /
 */

namespace Twilio\Rest\Events\V1\Sink;

use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;

/**
 * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
 */
class SinkTestList extends ListResource {
    /**
     * Construct the SinkTestList
     *
     * @param Version $version Version that contains the resource
     * @param string $sid A string that uniquely identifies this Sink.
     */
    public function __construct(Version $version, string $sid) {
        parent::__construct($version);

        // Path Solution
        $this->solution = ['sid' => $sid, ];

        $this->uri = '/Sinks/' . \rawurlencode($sid) . '/Test';
    }

    /**
     * Create the SinkTestInstance
     *
     * @return SinkTestInstance Created SinkTestInstance
     * @throws TwilioException When an HTTP error occurs.
     */
    public function create(): SinkTestInstance {
        $payload = $this->version->create('POST', $this->uri);

        return new SinkTestInstance($this->version, $payload, $this->solution['sid']);
    }

    /**
     * Provide a friendly representation
     *
     * @return string Machine friendly representation
     */
    public function __toString(): string {
        return '[Twilio.Events.V1.SinkTestList]';
    }
}


text:
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Winarto on 03/31/2017.
 */
public class TSP_RCM {
  Matrices mainMatrix;
  Matrices rcmMatrix;
  List<Integer> processedBranch;
  int travelCost;
  int jumlahSimpul;

  TSP_RCM(Matrices matrix) {
    mainMatrix = matrix;
    processedBranch = new ArrayList<>();
    processedBranch.add(0);
    jumlahSimpul = 1;
    countReduceCostMatrix(matrix);
  }

  public void solveTSP() {
    Matrices tempMatrix = new Matrices(rcmMatrix);
    while(!getFinishStatus(tempMatrix)) {
      Matrices[] bufMatrix = new Matrices[tempMatrix.getLength()];
      for (int idx = 0; idx < tempMatrix.getLength(); idx++) {
        if (!processedBranch.contains(idx)) {
          int prevBranch = processedBranch.get(processedBranch.size() - 1);
          bufMatrix[idx] = new Matrices(tempMatrix);
          setInfinite(prevBranch, idx, bufMatrix[idx]);
          bufMatrix[idx] = getReducedMatrix(bufMatrix[idx], false);
          bufMatrix[idx] = getReducedMatrix(bufMatrix[idx], true);
          bufMatrix[idx].setCost(bufMatrix[idx].getCost() + rcmMatrix.getMatrices()[prevBranch][idx]);
          jumlahSimpul++;
        }
      }
      int minIdx = getMinCostIdx(bufMatrix);
      processedBranch.add(minIdx);
      tempMatrix = bufMatrix[minIdx];
    }
    processedBranch.add(0);
    travelCost = tempMatrix.getCost();
  }

  public int getJumlahSimpul() {
    return jumlahSimpul;
  }

  public List<Integer> getRoute() {
    return processedBranch;
  }

  public int getMinCost() {
    return travelCost;
  }

  private void countReduceCostMatrix(Matrices matrix) {
    Matrices tempMatrix = getReducedMatrix(matrix,false);
    rcmMatrix = getReducedMatrix(tempMatrix,true);
  }

  private void setInfinite(int row, int col,Matrices matrix) {
    for(int idx = 0;idx < matrix.getLength();idx++) {
      matrix.setValue(row,idx,-1);
      matrix.setValue(idx,col,-1);
    }
    matrix.setValue(col,0,-1);
  }

  private boolean getFinishStatus(Matrices matrix) {
    boolean found = true;
    int row = 0, col = 0;
    while(row < matrix.getLength() && found) {
      while(col < matrix.getLength() && found) {
        int matrixVal = matrix.getMatrices()[row][col];
        if(matrixVal != -1) {
          found = false;
        }
        col++;
      }
      col = 0;
      row++;
    }
    return found;
  }

  private int getMinCostIdx(Matrices[] matrix) {
    int minIdx = 0;
    int min = 9999;
    for(int idx = 0; idx < mainMatrix.getLength();idx++) {
      if(!processedBranch.contains(idx)) {
        if (matrix[idx].getCost() < min) {
          minIdx = idx;
          min = matrix[idx].getCost();
        }
      }
    }
    return minIdx;
  }

  private Matrices getReducedMatrix(Matrices matrix,boolean reverse) {
    Matrices tempMatrix = new Matrices(matrix.getLength());
    int row = 0, col = 0;
    int min = 9999;
    int tempCost = 0;

    while (row < matrix.getLength()) {
      while (col < matrix.getLength()) {
        int matrixVal;

        if(!reverse)
          matrixVal = matrix.getMatrices()[row][col];
        else
          matrixVal = matrix.getMatrices()[col][row];

        if (matrixVal != -1 && matrixVal < min) {
          min = matrixVal;
        }
        col++;
      }
      if(min == 9999) {
        min = 0;
      }
      for (int idx = 0; idx < matrix.getLength(); idx++) {
        int matrixVal;

        if(!reverse) {
          if(matrix.getMatrices()[row][idx] != -1)
            matrixVal = matrix.getMatrices()[row][idx] - min;
          else
            matrixVal = -1;
          tempMatrix.setValue(row, idx, matrixVal);
        }
        else {
          if(matrix.getMatrices()[idx][row] != -1)
            matrixVal = matrix.getMatrices()[idx][row] - min;
          else
            matrixVal = -1;
          tempMatrix.setValue(idx, row, matrixVal);
        }
      }
      tempCost += min;
      min = 9999;
      col = 0;
      row++;
    }
    tempMatrix.setCost(tempCost + matrix.getCost());
    return tempMatrix;
  }
}


text:
package es.tid.netManager.uni;

import java.net.Inet4Address;
import java.util.LinkedList;

public class DeleteLSP extends DispatcherObjects{

	private Inet4Address nodeToChange;
	private String interfaz;
	private String lspName;
	private LinkedList<Inet4Address> path;

	public DeleteLSP(Inet4Address nodeToChange, String interfaz, String lspName, LinkedList<Inet4Address> path){

		this.nodeToChange = nodeToChange;
		this.interfaz = interfaz;
		this.lspName = lspName;
		this.path = path;
		super.setType(5);

	}

	public boolean executeChange(){

		return true;

	}

	public Inet4Address getNodeToChange() {
		return nodeToChange;
	}

	public void setNodeToChange(Inet4Address nodeToChange) {
		this.nodeToChange = nodeToChange;
	}

	public String getInterfaz() {
		return interfaz;
	}

	public void setInterfaz(String interfaz) {
		this.interfaz = interfaz;
	}

	public String getLspName() {
		return lspName;
	}

	public void setLspName(String lspName) {
		this.lspName = lspName;
	}

	public LinkedList<Inet4Address> getPath() {
		return path;
	}

	public void setPath(LinkedList<Inet4Address> path) {
		this.path = path;
	}

}


text:
body{
  margin:0;
  overflow-y: scroll; /* This is optional, but you need it for a full width gallery */
}

.box{
  display: none;
}

img {
  width: auto\9;
}
/* *************************************** CATEGORY NAVIGATION BAR *************************************** */

.category-navbar{
  font-size: 0px;
  list-style: none;
  margin: 0 0 10px 0;
  padding: 7px 0 2px 0px;
  width: 100%;
  border-bottom: 1px solid #ddd;
  background: white;
}

.category-navbar li:first-child{
  margin: 0 0 0 7px;
}

.category-navbar li{
  display: inline-block;
  line-height: 16px;
  margin: 0 0 0 0px;
  padding: 5px 0 5px 0;
}

.category-navbar li a{
  cursor: pointer;
  color: #999;
  font-size: 14px;
  text-decoration: none;
  margin: 0 10px 10px 0;
  padding: 6px 10px;
  border-radius: 1px;
  moz-border-radius: 1px;
  -webkit-border-radius: 1px;
}

.category-navbar li a:hover{
  text-decoration: none;
  background: #eee;
  color: #222;
}

.category-navbar li.select a{
  background: #666;
  color: #fff;
}

/* *************************************** CAPTION STYLE *************************************** */
.box{
  cursor: pointer;
  overflow: hidden;.
}

.lightbox-text{
  display: none;
}

.thumbnail-caption{
  position: absolute;
  width: 100%;
  height: 100%;
  background: #313131;
  background: rgba(0,0,0,.8);/*url(../img/bg-caption.png)*/
  color: #fff;

  display: none;

}

/* The style for centering the caption (vertically and horizontally) */
.thumbnail-caption>div{
  height: 100%;
  width: 100%;
  display: table !important;
}

.thumbnail-caption>div>div{
  padding: 15px;
  display: table-cell !important;
    vertical-align: middle; /* FOR VERTICAL ALIGN */
    text-align:center; /* FOR HORIZONTAL ALIGN */
}

/* *************************************** LOADING STYLE *************************************** */
.grid-loader{
  width: 43px;
  height: 20px;
  padding: 10px 15px 10px 15px;
  background: url(../img/loader.gif) no-repeat;
  background-position:center;
  margin: 20px auto;
}

.grid-loadMore{
  cursor: pointer;
  margin: 20px auto;
  width: 150px;
  height: 20px;
  text-align: center;
  color: white;
  background-color: black;
  background: rgba(0,0,0,.6);
  border-radius: 2px;
  padding: 10px 15px 10px 15px;
  font-size: 14px;
  font-family: sans-serif;
}

.grid-loadMore:hover{
  text-decoration: none;
  color: white;
  background: rgba(0,0,0,.8);
}
/* *************************************** LIGHT-BOX STYLE *************************************** */
.lightbox-timer{
  height: 1px;
  position: absolute;
  bottom: 0;
  left: 0;
  background: white;
}

.lb-loader{
  width: 43px;
  height: 11px;
  background: url(../img/loader.gif);

  margin: 20px auto;
}

.autoGrid-lightbox{
  display: none;
  position: fixed;
  top:0;
  width: 100%;
  height: 100%;
  background: #313131;
  background: rgba(0,0,0,.85);

  text-align: center;
  z-index: 10000;
}

.autoGrid-lightbox img{
  margin-top: 5px;
  max-width: 100%;
}

.autoGrid-nav{
  margin-top: -57px;
  height: 57px;
  width: 100%;
  background: #383838;
  background: #1D1D1D;

  border-bottom: 1px solid #323232;
}

.autoGrid-play, .autoGrid-close, .autoGrid-next, .autoGrid-prev, .autoGrid-font{
  width: 88px;
  height: 57px;
  position: relative;
  cursor: pointer;
}

.autoGrid-play:hover, .autoGrid-close:hover, .autoGrid-next:hover, .autoGrid-prev:hover, .autoGrid-font:hover{
  background: black;
}

.selected{
  background: black;
}

.selected .iconPlay{
  background-position: -164px -3px;
}

.autoGrid-lbcaption{
  float: left;
  color: white;
  height: 57px;
  font-size: 16px;
}

.autoGrid-lbcaption span{
  margin-left: 3px;
  color: #D7D7D7;
  font-size: 11px;
}

.autoGrid-lbcaption>div{
  height: 100%;
  width: 100%;
  display: table !important;
}

.autoGrid-lbcaption>div>div{
  padding: 0 15px 0 15px;
  display: table-cell !important;
    vertical-align: middle; /* FOR VERTICAL ALIGN */
    text-align:center; /* FOR HORIZONTAL ALIGN */
}

.autoGrid-play, .autoGrid-close{
  float: right;
}

.autoGrid-next, .autoGrid-prev{
  float: right;
}

.iconPlay, .iconClose, .iconNext, .iconPrev, .iconFont{
  position: absolute;

  top: 50%;
  left: 50%;

  height: 25px;
  display: block;
}

.iconClose{
  width: 25px;
  margin: -13px 0 0 -13px;

  background: url(../img/icons.png);
  background-position: -2px -3px;
}

.iconPlay{
  width: 17px;
  margin: -13px 0 0 -8px;
  background: url(../img/icons.png);

  background-position: -137px -3px;

  -webkit-transition:all .3s;
     -moz-transition:all .3s;
       -o-transition:all .3s;
      -ms-transition:all .3s;
          transition:all .3s;
}

.iconFont{
  width: 46px;
  margin: -13px 0 0 -23px;

  background: url(../img/icons.png);
  background-position: -85px -3px;
}

.iconNext, .iconPrev{
  width: 15px;
  margin: -13px 0 0 -8px;
  background: url(../img/icons.png);
}

  .iconPrev{
    background-position: -40px -3px;
  }

  .iconNext{
    background-position: -70px -3px;
  }

/* *************************************** GRID STYLE *************************************** */

.centered {
    margin: auto;
}

.box {
  /*margin: 2px;
  padding: 5px;*/
  /*font-size: 11px;*/
  line-height: 1.4em;
  float: left;
  -webkit-border-radius: 0px;
     -moz-border-radius: 0px;
          border-radius: 0px;
}

.box img,
#tumblelog img {
  display: block;
  width: 100%;
}

.rtl .box {
  float: right;
  text-align: right;
  direction: rtl;
}

/**** Transitions ****/

.transitions-enabled.masonry,
.transitions-enabled.masonry .masonry-brick {
  -webkit-transition-duration: 0.7s;
     -moz-transition-duration: 0.7s;
      -ms-transition-duration: 0.7s;
       -o-transition-duration: 0.7s;
          transition-duration: 0.7s;
}

.transitions-enabled.masonry {
  -webkit-transition-property: height, width;
     -moz-transition-property: height, width;
      -ms-transition-property: height, width;
       -o-transition-property: height, width;
          transition-property: height, width;
}

.transitions-enabled.masonry  .masonry-brick {
  -webkit-transition-property: left, right, top;
     -moz-transition-property: left, right, top;
      -ms-transition-property: left, right, top;
       -o-transition-property: left, right, top;
          transition-property: left, right, top;
}

/* disable transitions on container */
.transitions-enabled.infinite-scroll.masonry {
  -webkit-transition-property: none;
     -moz-transition-property: none;
      -ms-transition-property: none;
       -o-transition-property: none;
          transition-property: none;
}

/**** Clearfix ****/
.grid-clearfix:before, .grid-clearfix:after { content: ""; display: table; }
.grid-clearfix:after { clear: both; }
.grid-clearfix { zoom: 1; }

.centered{
  overflow: auto;
}


text:
package com.hannesdorfmann.mosby3.sample.mvi.view.shoppingcartoverview;

import android.graphics.Canvas;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import com.hannesdorfmann.mosby3.mvi.MviFragment;
import com.hannesdorfmann.mosby3.sample.mvi.R;
import com.hannesdorfmann.mosby3.sample.mvi.SampleApplication;
import com.hannesdorfmann.mosby3.sample.mvi.businesslogic.model.Product;
import io.reactivex.Observable;
import io.reactivex.subjects.PublishSubject;
import java.util.List;
import java.util.concurrent.TimeUnit;
import timber.log.Timber;

/**
 * This class doesn't neccessarily has to be a fragment. It's just a fragment because I want to
 * demonstrate that mosby works with fragments in xml layouts too.
 *
 * @author Hannes Dorfmann
 */
public class ShoppingCartOverviewFragment
    extends MviFragment<ShoppingCartOverviewView, ShoppingCartOverviewPresenter>
    implements ShoppingCartOverviewView {

  private ShoppingCartOverviewAdapter adapter;
  private PublishSubject<Product> removeRelay = PublishSubject.create();
  private Unbinder unbinder;
  @BindView(R.id.shoppingCartRecyclerView) RecyclerView recyclerView;

  @Nullable @Override
  public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
      @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_shopping_cart, container, false);
    unbinder = ButterKnife.bind(this, v);
    adapter = new ShoppingCartOverviewAdapter(getActivity());
    recyclerView.setAdapter(adapter);
    recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    setUpItemTouchHelper();
    return v;
  }

  @Override public void onDestroyView() {
    super.onDestroyView();
    unbinder.unbind();
  }

  @NonNull @Override public ShoppingCartOverviewPresenter createPresenter() {
    Timber.d("Create Presenter");
    return SampleApplication.getDependencyInjection(getActivity()).getShoppingCartPresenter();
  }

  @Override public Observable<Boolean> loadItemsIntent() {
    return Observable.just(true);
  }

  @Override public Observable<List<Product>> selectItemsIntent() {
    return adapter.selectedItemsObservable();
  }

  private void setUpItemTouchHelper() {

    //
    // Borrowed from https://github.com/nemanja-kovacevic/recycler-view-swipe-to-delete/blob/master/app/src/main/java/net/nemanjakovacevic/recyclerviewswipetodelete/MainActivity.java
    //

    ItemTouchHelper.SimpleCallback simpleItemTouchCallback =
        new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {

          // we want to cache these and not allocate anything repeatedly in the onChildDraw method
          Drawable background;
          Drawable xMark;
          int xMarkMargin;
          boolean initiated;

          private void init() {
            background =
                new ColorDrawable(ContextCompat.getColor(getActivity(), R.color.delete_background));
            xMark = ContextCompat.getDrawable(getActivity(), R.drawable.ic_remove);
            xMarkMargin = (int) getActivity().getResources().getDimension(R.dimen.ic_clear_margin);
            initiated = true;
          }

          // not important, we don't want drag & drop
          @Override public boolean onMove(RecyclerView recyclerView,
              RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
            return false;
          }

          @Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {
            int swipedPosition = viewHolder.getAdapterPosition();
            Product productAt = adapter.getProductAt(swipedPosition);
            removeRelay.onNext(productAt);
          }

          @Override public void onChildDraw(Canvas c, RecyclerView recyclerView,
              RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState,
              boolean isCurrentlyActive) {
            View itemView = viewHolder.itemView;

            // not sure why, but this method get's called for viewholder that are already swiped away
            if (viewHolder.getAdapterPosition() == -1) {
              // not interested in those
              return;
            }

            if (!initiated) {
              init();
            }

            // draw red background
            background.setBounds(itemView.getRight() + (int) dX, itemView.getTop(),
                itemView.getRight(), itemView.getBottom());
            background.draw(c);

            // draw x mark
            int itemHeight = itemView.getBottom() - itemView.getTop();
            int intrinsicWidth = xMark.getIntrinsicWidth();
            int intrinsicHeight = xMark.getIntrinsicWidth();

            int xMarkLeft = itemView.getRight() - xMarkMargin - intrinsicWidth;
            int xMarkRight = itemView.getRight() - xMarkMargin;
            int xMarkTop = itemView.getTop() + (itemHeight - intrinsicHeight) / 2;
            int xMarkBottom = xMarkTop + intrinsicHeight;
            xMark.setBounds(xMarkLeft, xMarkTop, xMarkRight, xMarkBottom);

            // xMark.draw(c);

            super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);
          }
        };
    ItemTouchHelper mItemTouchHelper = new ItemTouchHelper(simpleItemTouchCallback);
    mItemTouchHelper.attachToRecyclerView(recyclerView);
  }

  @Override public Observable<Product> removeItemIntent() {
    // DELEAY it for 500 miliseconds so that the user sees the swipe to delete animation
    return removeRelay.delay(500, TimeUnit.MILLISECONDS);
  }

  @Override public void render(List<ShoppingCartOverviewItem> itemsInShoppingCart) {
    Timber.d("Render %s ", itemsInShoppingCart);
    adapter.setItems(itemsInShoppingCart);
  }
}


text:
<?xml version="1.0"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">

  <rewriteURI uriStartString="http://transpect.io/xproc-util/merge-hub/" rewritePrefix="../"/>

</catalog>


text:
require 'ghaki/registry/errors'

############################################################################
module Ghaki module Registry
  class Service

    ########################################################################
    attr_accessor :name, :feature, :klass, :failure

    ########################################################################
    def initialize _feature, _name, _klass
      @feature = _feature
      @name = _name
      @klass = _klass
      @enabled = true
      @failure = nil
    end

    ########################################################################
    def to_s; @name.to_s end

    ########################################################################
    def enabled?
      @enabled
    end
    def enable val=true
      @enabled = val
    end
    def disable val=true
      self.enable !val
    end
    def assert_enabled!
      raise PluginDisabledError.new( @feature, @name ) unless enabled?
    end

    ########################################################################
    def failed?
      !@failure.nil?
    end
    def assert_not_failed!
      raise @failure if failed?
    end

    ########################################################################
    def assert_can_create!
      assert_not_failed!
      assert_enabled!
    end
    def create *args
      assert_can_create!
      return @klass.new( *args )
    end

  end
end end
############################################################################


text:
@interface NSMutableArray (myArray)

@end


text:
package lab_visitor;
import java.util.LinkedList;

public interface Visitable {
	public void accept(Visitor v);
}

class Employee implements Visitable{
	protected String  name;
	protected float salary;
	public Employee(String name, float salary) {
		this.name       = name;
		this.salary     = salary;
	}
	public String getName() {
		return name;
	}
	public float getSalary() {
		return salary;
	}
	@Override
	public void accept(Visitor v) {
		v.visit(this);
	}
}

class Boss extends Employee {
	protected float bonus;

	public LinkedList<Visitable> getSubordinates() {
		//TODO
		return null;
	}
	public void addSubordinate(Visitable subordinate) {
		//TODO
	}

	public Boss(String name, float salary, float bonus) {
		super(name, salary);
		this.bonus = bonus;
	}
	public float getBonus() {
		return bonus;
	}
	public void setBonus(float bonus) {
		this.bonus = bonus;
	}

	/*	Ex 1. The purpose of the task is just a reminder of what happens at
		runtime and what happens at compile time: If accept in Boss is not
		overridden then the element passed to the visit method is of type
		Employee not Boss. At compile-time, in accept method from Employee the
		type of the parameter of the v.visit() call is Employee, and since
		overloaded methods are decided at compile-time, the call will be
		visit(Employee).
	*/
	@Override
	public void accept(Visitor v) {
		v.visit(this);
	}
}

//TODO
class Intern{

	private String  name;
	private int duration;  // in months

	public Intern(String name, int duration){
		this.name = name;
		this.duration = duration;
	}

}


text:
TEXTDOMAIN=la-tools
TEXTDOMAINDIR=./
name="Dropbox"
./apt-update.sh
./installed.sh dropbox $name && exit

sources=$(cat /etc/apt/sources.list.d/dropbox.list)
if [ "$sources" != "deb http://linux.dropbox.com/debian wheezy main" ]
then
	echo "deb http://linux.dropbox.com/debian wheezy main" > temp
	sudo mv temp /etc/apt/sources.list.d/geogebra.list
	sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E
	rm temp
fi
sudo apt-get update
if sudo apt-get install dropbox -y
then
	zenity --info --title $"Success" --text $"$name successfully installed"
else
	zenity --error --title $"Error" --text $"An error occurred while installing $name"
fi


text:
<template>

Repository: {{ repoName }}

Branch: {{ gitBranch }}

Commit: {{ gitCommit }}

                <input type="text" ng-disabled="prProgress" ng-model="prName">
                <button class="btn btn-primary" ng-disabled="!selection.length || prProgress" ng-click="pullRequest()">Create Pull Request</button>

                {{ prUrl }}

              <button class="btn btn-primary" ng-disabled="!selection.length" ng-click="zip()">Download</button>

            Show diff <input type="checkbox" checked.bind="showDiff">

            <checkbox large name="selectedScreenshots[]" ng-model="screenshot.selected"></checkbox> ${screenshot.label}

                (  Delete)

            <require from="./elements/layover-image"></require>
            <layover-image show.bind="!$parent.showDiff" first.bind="screenshot.baseline.self" second.bind="screenshot.regression.self" width.bind="screenshot.regression.width" height.bind="screenshot.regression.height"></layover-image>

</template>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycotaxon 35(2): 345 (1989)

#### Original name
Dasyscyphus sulphuricolor Peck

### Remarks
null


text:
[jvm]
Content
operator fun [component2](component2.md)(): [VariableDeclaration](../-variable-declaration/index.md)


text:
import numpy as np
from .GeoVectorizer import FULL_STOP_INDEX

def scale(vectors):
    means = localized_mean(vectors)
    min_maxs = []

    for index, data_point in enumerate(vectors):
        full_stop_point = data_point[:, FULL_STOP_INDEX].tolist()

        try:
            full_stop_point_index = full_stop_point.index(1)
        except Exception as e:  # if a dummy point is encountered
            min_maxs.append([0, 0])
            continue

        min_maxs.append([
            np.min(data_point[..., :full_stop_point_index, :2] - means[index]),
            np.max(data_point[..., :full_stop_point_index, :2] - means[index])
        ])

    return np.std(min_maxs)

def transform(vectors, scale=None):
    localized = np.copy(vectors)
    means = localized_mean(vectors)

    for index, data_point in enumerate(localized):
        full_stop_point = data_point[:, FULL_STOP_INDEX].tolist()

        try:
            full_stop_point_index = full_stop_point.index(1)
        except Exception as e:  # if a dummy point is encountered
            continue

        data_point[..., :full_stop_point_index + 1, :2] -= means[index]
        data_point[..., :full_stop_point_index + 1, :2] /= scale

    return localized

def localized_mean(vectors):
    geom_means = []
    for data_point in vectors:
        full_stop_point = data_point[:, FULL_STOP_INDEX].tolist()

        try:
            full_stop_point_index = full_stop_point.index(1)
        except Exception as e:  # if a dummy point is encountered
            geom_means.append([[[0, 0]]])
            continue

        # Take the mean of all non-null points for localized origin
        geom_mean = np.mean(data_point[0:full_stop_point_index, 0:2], axis=0, keepdims=True)
        geom_means.append(geom_mean)

    return np.array(geom_means)


text:
#ifndef _FSL_DPRC_H
#define _FSL_DPRC_H

/** @addtogroup dprc Data Path Resource Container API
 * Contains DPRC API for managing and querying DPAA resources
 * @{
 */

struct fsl_mc_io;

int dprc_open(struct fsl_mc_io *mc_io,
	      uint32_t cmd_flags,
	      int container_id,
	      uint16_t *token);

int dprc_close(struct fsl_mc_io *mc_io,
	       uint32_t cmd_flags,
	       uint16_t token);

/**
 * struct dprc_endpoint - Endpoint description for link connect/disconnect
 *			operations
 * @type:	Endpoint object type: NULL terminated string
 * @id:		Endpoint object ID
 * @if_id:	Interface ID; should be set for endpoints with multiple
 *		interfaces ("dpsw", "dpdmux"); for others, always set to 0
 */
struct dprc_endpoint {
	char type[16];
	int id;
	uint16_t if_id;
};

int dprc_get_connection(struct fsl_mc_io *mc_io,
			uint32_t cmd_flags,
			uint16_t token,
			const struct dprc_endpoint *endpoint1,
			struct dprc_endpoint *endpoint2,
			int *state);
#endif /* _FSL_DPRC_H */


text:
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.IE;
using OpenQA.Selenium.Chrome;
using Selenium;
using SeShell.Test.Enums;
using System.Net;
using System.ComponentModel;
using System.Linq;
using SeShell.Test.Resources;

namespace SeShell.Test.Core
{
    /// <summary>
    /// Base class is used to make the driver initiate and set the base URL
    /// for other page classes to use
    /// </summary>
    public class BaseClass
    {
        public IWebDriver Driver;
        public string BaseUrl;

        /// <summary>
         /// Navigate the browser to the passed url
         /// </summary>
         /// <param name="url"></param>
        public void NavigateTo(string url)
        {
            var navigateToThisUrl = BaseUrl + url;
            Driver.Navigate().GoToUrl(navigateToThisUrl);
        }

        /// <summary>
        /// Sets the web driver instance.
        /// </summary>
        /// <param name="driver">The driver.</param>
        public void SetWebDriverInstance(IWebDriver driver)
        {
            Driver = driver;
            Driver.Manage().Window.Maximize();
            BaseUrl = Configuration.BaseSiteUrl;
        }
    }
}


text:
<?php

namespace Google\Service\BigtableAdmin;

class ListInstancesResponse extends \Google\Collection
{
  protected $collection_key = 'instances';
  /**
   * @var string[]
   */
  public $failedLocations;
  protected $instancesType = Instance::class;
  protected $instancesDataType = 'array';
  /**
   * @var string
   */
  public $nextPageToken;

  /**
   * @param string[]
   */
  public function setFailedLocations($failedLocations)
  {
    $this->failedLocations = $failedLocations;
  }
  /**
   * @return string[]
   */
  public function getFailedLocations()
  {
    return $this->failedLocations;
  }
  /**
   * @param Instance[]
   */
  public function setInstances($instances)
  {
    $this->instances = $instances;
  }
  /**
   * @return Instance[]
   */
  public function getInstances()
  {
    return $this->instances;
  }
  /**
   * @param string
   */
  public function setNextPageToken($nextPageToken)
  {
    $this->nextPageToken = $nextPageToken;
  }
  /**
   * @return string
   */
  public function getNextPageToken()
  {
    return $this->nextPageToken;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListInstancesResponse::class, 'Google_Service_BigtableAdmin_ListInstancesResponse');


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Proc. Amer. Acad. Arts & Sci. 37: 21 (1901)

#### Original name
Eumonoicomyces californicus Thaxt., 1901

### Remarks
null


text:
#include <aws/cognito-sync/model/Dataset.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Utils::Json;
using namespace Aws::Utils;

namespace Aws
{
namespace CognitoSync
{
namespace Model
{

Dataset::Dataset() :
    m_identityIdHasBeenSet(false),
    m_datasetNameHasBeenSet(false),
    m_creationDateHasBeenSet(false),
    m_lastModifiedDateHasBeenSet(false),
    m_lastModifiedByHasBeenSet(false),
    m_dataStorage(0),
    m_dataStorageHasBeenSet(false),
    m_numRecords(0),
    m_numRecordsHasBeenSet(false)
{
}

Dataset::Dataset(const JsonValue& jsonValue) :
    m_identityIdHasBeenSet(false),
    m_datasetNameHasBeenSet(false),
    m_creationDateHasBeenSet(false),
    m_lastModifiedDateHasBeenSet(false),
    m_lastModifiedByHasBeenSet(false),
    m_dataStorage(0),
    m_dataStorageHasBeenSet(false),
    m_numRecords(0),
    m_numRecordsHasBeenSet(false)
{
  *this = jsonValue;
}

Dataset& Dataset::operator =(const JsonValue& jsonValue)
{
  if(jsonValue.ValueExists("IdentityId"))
  {
    m_identityId = jsonValue.GetString("IdentityId");

    m_identityIdHasBeenSet = true;
  }

  if(jsonValue.ValueExists("DatasetName"))
  {
    m_datasetName = jsonValue.GetString("DatasetName");

    m_datasetNameHasBeenSet = true;
  }

  if(jsonValue.ValueExists("CreationDate"))
  {
    m_creationDate = jsonValue.GetDouble("CreationDate");

    m_creationDateHasBeenSet = true;
  }

  if(jsonValue.ValueExists("LastModifiedDate"))
  {
    m_lastModifiedDate = jsonValue.GetDouble("LastModifiedDate");

    m_lastModifiedDateHasBeenSet = true;
  }

  if(jsonValue.ValueExists("LastModifiedBy"))
  {
    m_lastModifiedBy = jsonValue.GetString("LastModifiedBy");

    m_lastModifiedByHasBeenSet = true;
  }

  if(jsonValue.ValueExists("DataStorage"))
  {
    m_dataStorage = jsonValue.GetInt64("DataStorage");

    m_dataStorageHasBeenSet = true;
  }

  if(jsonValue.ValueExists("NumRecords"))
  {
    m_numRecords = jsonValue.GetInt64("NumRecords");

    m_numRecordsHasBeenSet = true;
  }

  return *this;
}

JsonValue Dataset::Jsonize() const
{
  JsonValue payload;

  if(m_identityIdHasBeenSet)
  {
   payload.WithString("IdentityId", m_identityId);

  }

  if(m_datasetNameHasBeenSet)
  {
   payload.WithString("DatasetName", m_datasetName);

  }

  if(m_creationDateHasBeenSet)
  {
   payload.WithDouble("CreationDate", m_creationDate.SecondsWithMSPrecision());
  }

  if(m_lastModifiedDateHasBeenSet)
  {
   payload.WithDouble("LastModifiedDate", m_lastModifiedDate.SecondsWithMSPrecision());
  }

  if(m_lastModifiedByHasBeenSet)
  {
   payload.WithString("LastModifiedBy", m_lastModifiedBy);

  }

  if(m_dataStorageHasBeenSet)
  {
   payload.WithInt64("DataStorage", m_dataStorage);

  }

  if(m_numRecordsHasBeenSet)
  {
   payload.WithInt64("NumRecords", m_numRecords);

  }

  return payload;
}

} // namespace Model
} // namespace CognitoSync
} // namespace Aws


text:
package mns_open

// EndpointMap Endpoint Data
var EndpointMap map[string]string

// EndpointType regional or central
var EndpointType = "regional"

// GetEndpointMap Get Endpoint Data Map
func GetEndpointMap() map[string]string {
	if EndpointMap == nil {
		EndpointMap = map[string]string{}
	}
	return EndpointMap
}

// GetEndpointType Get Endpoint Type Value
func GetEndpointType() string {
	return EndpointType
}


text:
FOUNDATION_EXPORT double TwinkleVersionNumber;

//! Project version string for Twinkle.
FOUNDATION_EXPORT const unsigned char TwinkleVersionString[];


text:
using System;
using System.Drawing;
using System.IO;

namespace Revenj.DatabasePersistence.Postgres.Converters
{
	public static class DrawingConverter
	{
		public static IPostgresTuple ToTuple(Point value)
		{
			return new PointTuple(value);
		}

		public static IPostgresTuple ToTuple(PointF value)
		{
			return new PointFTuple(value);
		}

		public static IPostgresTuple ToTuple(RectangleF value)
		{
			return new RectangleFTuple(value);
		}

		class PointTuple : IPostgresTuple
		{
			private readonly Point Value;

			public PointTuple(Point value)
			{
				this.Value = value;
			}

			public bool MustEscapeRecord { get { return true; } }
			public bool MustEscapeArray { get { return true; } }

			public void InsertRecord(TextWriter sw, char[] buf, string escaping, Action<TextWriter, char> mappings)
			{
				sw.Write('(');
				sw.Write(Value.X);
				sw.Write(',');
				sw.Write(Value.Y);
				sw.Write(')');
			}

			public void InsertArray(TextWriter sw, char[] buf, string escaping, Action<TextWriter, char> mappings)
			{
				InsertRecord(sw, buf, escaping, mappings);
			}

			public string BuildTuple(bool quote)
			{
				if (quote)
					return "'(" + Value.X + "," + Value.Y + ")'";
				return "(" + Value.X + "," + Value.Y + ")";
			}
		}

		class PointFTuple : IPostgresTuple
		{
			private readonly PointF Value;

			public PointFTuple(PointF value)
			{
				this.Value = value;
			}

			public bool MustEscapeRecord { get { return true; } }
			public bool MustEscapeArray { get { return true; } }

			public void InsertRecord(TextWriter sw, char[] buf, string escaping, Action<TextWriter, char> mappings)
			{
				sw.Write('(');
				sw.Write(Value.X);
				sw.Write(',');
				sw.Write(Value.Y);
				sw.Write(')');
			}

			public void InsertArray(TextWriter sw, char[] buf, string escaping, Action<TextWriter, char> mappings)
			{
				InsertRecord(sw, buf, escaping, mappings);
			}

			public string BuildTuple(bool quote)
			{
				if (quote)
					return "'(" + Value.X + "," + Value.Y + ")'";
				return "(" + Value.X + "," + Value.Y + ")";
			}
		}

		class RectangleFTuple : IPostgresTuple
		{
			private readonly RectangleF Value;

			public RectangleFTuple(RectangleF value)
			{
				this.Value = value;
			}

			public bool MustEscapeRecord { get { return true; } }
			public bool MustEscapeArray { get { return true; } }

			public void InsertRecord(TextWriter sw, char[] buf, string escaping, Action<TextWriter, char> mappings)
			{
				sw.Write('(');
				sw.Write(Value.Right);
				sw.Write(',');
				sw.Write(Value.Bottom);
				sw.Write("),(");
				sw.Write(Value.X);
				sw.Write(',');
				sw.Write(Value.Y);
				sw.Write(')');
			}

			public void InsertArray(TextWriter sw, char[] buf, string escaping, Action<TextWriter, char> mappings)
			{
				InsertRecord(sw, buf, escaping, mappings);
			}

			public string BuildTuple(bool quote)
			{
				if (quote)
					return "'(" + Value.X + "," + Value.Y + ")'";
				return "(" + Value.X + "," + Value.Y + ")";
			}
		}
	}
}


text:
package server

import (
	"net/http"

	log "github.com/Sirupsen/logrus"
	"github.com/nildev/artemis/config"
	"github.com/nildev/artemis/domain"
	"github.com/nildev/artemis/endpoints"
	"github.com/nildev/artemis/version"
)

// Server type
type Server struct {
	stop    chan bool
	cfg     config.Config
	handler http.Handler
}

// New type
func New(cfg config.Config) (*Server, error) {
	endpoints.ASGSupervisor = domain.MakeMultiSupervisor()
	srv := Server{
		cfg:     cfg,
		stop:    nil,
		handler: endpoints.Router(cfg),
	}
	return &srv, nil
}

// Run server
func (s *Server) Run() {
	ctxLog := log.WithField("version", version.Version).WithField("git-hash", version.GitHash).WithField("build-time", version.BuiltTimestamp)

	ctxLog.Infof("Starting artmeisd service [%s:%s]", s.cfg.IP, s.cfg.Port)
	s.stop = make(chan bool)

	go func() {
		ctxLog.Infof("Start ASG supervisor")
		endpoints.ASGSupervisor.Run()
	}()

	go func() {
		ctxLog.Infof("Starting HTTP server ...")
		if err := http.ListenAndServe(s.cfg.IP+":"+s.cfg.Port, s.handler); err != nil {
			ctxLog.Fatalf("Unable to create listener, %s", err)
		}
	}()
}

// Stop server
func (s *Server) Stop() {
	close(s.stop)
}

// Purge server
func (s *Server) Purge() {
}


text:
class DVAPI TXshSoundTextLevel : public TXshLevel
{
	PERSIST_DECLARATION(TXshSoundTextLevel)

	DECLARE_CLASS_CODE

	QList<QString> m_framesText;

public:
	TXshSoundTextLevel(std::wstring name = L"");
	~TXshSoundTextLevel();

	TXshSoundTextLevel *clone() const;

	//! Overridden from TXshLevel
	TXshSoundTextLevel *getSoundTextLevel() { return this; }

	void setFrameText(int frameIndex, QString);
	QString getFrameText(int frameIndex) const;

	void loadData(TIStream &is);
	void saveData(TOStream &os);

	void load(){};
	void save(){};

private:
	// not implemented
	TXshSoundTextLevel(const TXshSoundTextLevel &);
	TXshSoundTextLevel &operator=(const TXshSoundTextLevel &);
};

#ifdef _WIN32
template class DV_EXPORT_API TSmartPointerT<TXshSoundTextLevel>;
#endif
typedef TSmartPointerT<TXshSoundTextLevel> TXshSoundTextLevelP;

#endif //TXSHSOUNDTEXTLEVEL_INCLUDED


text:
import React from 'react';
import DatePicker from '../../components/date_picker';
import TimePicker from '../../components/time_picker';

const datetime = new Date(2015, 10, 16);
const min_datetime = new Date(new Date(datetime).setDate(8));
const max_datetime = new Date(new Date(datetime).setDate(24));
datetime.setHours(17);
datetime.setMinutes(28);
const today = new Date();
today.setHours(0, 0, 0, 0);
const enabledDisabledDates = [new Date(today.getTime()), new Date(today.setDate(today.getDate() - 1))];

class PickersTest extends React.Component {
  state = {
    date2: datetime,
    firstActive: false,
    time2: datetime
  };

  handleChange = (item, value) => {
    const newState = {};
    newState.firstActive = false;
    newState[item] = value;
    this.setState(newState);
  };

  makeFirstUnactive = () => {
    this.setState({ firstActive: false });
  };

  localeExample = {
    months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),
    monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),
    weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),
    weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
    weekdaysLetter: 'ig_al_ar_az_og_ol_lr'.split('_')
  }

  render () {
    return (

Pickers

Date pickers and time pickers with Material flavour.

        <DatePicker
          active={this.state.firstActive}
          label='Birthdate'
          onChange={this.handleChange.bind(this, 'date1')}
          onEscKeyDown={this.makeFirstUnactive}
          onOverlayClick={this.makeFirstUnactive}
          value={this.state.date1}
          sundayFirstDayOfWeek
        />

        <DatePicker
          label='With locale (string) - Spanish (string: en|es|af|ar|be|bg|bn|bo|br|bs|ca|gl|eu|pt|it|fr)'
          locale='es'
          onChange={this.handleChange.bind(this, 'date2')}
          value={this.state.date2}
        />

        <DatePicker
          label='With locale (object) - Basque'
          locale={this.localeExample}
          onChange={this.handleChange.bind(this, 'date2')}
          value={this.state.date2}
        />

        <DatePicker
          label='Expiration date (Read Only)'
          maxDate={max_datetime}
          minDate={min_datetime}
          onChange={this.handleChange.bind(this, 'date2')}
          readonly
          value={this.state.date2}
          sundayFirstDayOfWeek
        />

        <DatePicker
          label='Formatted Date'
          inputFormat={(value) => `${value.getDate()}/${value.getMonth() + 1}/${value.getFullYear()}`}
          onChange={this.handleChange.bind(this, 'date3')}
          value={this.state.date3}
          sundayFirstDayOfWeek
        />

        <DatePicker
          label='Auto Picker'
          autoOk
          sundayFirstDayOfWeek
          onChange={this.handleChange.bind(this, 'date4')}
          value={this.state.date4}
        />

        <DatePicker
          label='Date picker with enabled dates'
          onChange={this.handleChange.bind(this, 'date5')}
          enabledDates={enabledDisabledDates}
          value={this.state.date5}
        />

        <DatePicker
          label='Date picker with disabled dates'
          onChange={this.handleChange.bind(this, 'date6')}
          disabledDates={enabledDisabledDates}
          value={this.state.date6}
        />

        <TimePicker
          label='Start time'
          onChange={this.handleChange.bind(this, 'time1')}
          onEscKeyDown={() => console.log('esc key down')}
          onOverlayClick={() => console.log('overlay click')}
          value={this.state.time1}
        />

        <TimePicker
          format='ampm'
          label='Finishing time (Read Only)'
          readonly
          onChange={this.handleChange.bind(this, 'time2')}
          value={this.state.time2}
        />

    );
  }
}

export default PickersTest;