text:
;
(function($, window, document, undefined) {
	var pluginName = "traditionalLogin";
	var defaults = {
		title : "",
		user : "",
		url : "",
	};

	var TraditionalLogin = function(element, options) {
		this.element = element;
		this.options = $.extend({
			title : "",
			user : "",
			url : "",
		}, defaults, options);
		this._defaults = defaults;
		this._name = pluginName;
		this.topparent;
		this.title = options.title;
		this.init(options);
		//this.check_cookie();
	};

	TraditionalLogin.prototype.init = function(options) {

		var container = document.createElement("DIV");
		this.element.appendChild(container);
		container.style.marginTop = "2px";

		var panel = document.createElement("DIV");
		panel.className = "panel panel-default";
		container.appendChild(panel);
		panel.style.border = "0px";

		var panelbody = document.createElement("DIV");
		panelbody.className = "panel-body";
		panel.appendChild(panelbody);

		//登录框
		this.form = document.createElement("form");
		this.form.className = "form-horizontal";
		panelbody.appendChild(this.form);

		// 账号/手机号/邮箱/证件号码
		this.formgroup1 = document.createElement("DIV");
		this.formgroup1.className = "form-group";
		this.form.appendChild(this.formgroup1);

		var inputbody1 = document.createElement("DIV");
		inputbody1.className = "col-lg-12 col-md-12 col-sm-12 col-xs-12";
		this.formgroup1.appendChild(inputbody1);

		//username输入框
		this.inputvalue1 = document.createElement("INPUT");
		this.inputvalue1.setAttribute("type", "username");
		this.inputvalue1.className = "form-control";
		this.inputvalue1.id = "username";
		this.inputvalue1.placeholder = "用户账号/手机号/邮箱/证件号码";
		this.inputvalue1.required = true;
		this.inputvalue1.setAttribute("validity", false);
		this.inputvalue1.addEventListener("keypress", this, false);  //监听enter
		this.inputvalue1.addEventListener("blur", this, false);  //监听光标
		inputbody1.appendChild(this.inputvalue1);

		//验证账号错误结果
		this.inputvalueSPAN1 = document.createElement("SPAN");
		this.inputvalueSPAN1.innerHTML = "输入账号";
		this.inputvalueSPAN1.className = "help-block";
		this.inputvalueSPAN1.style.display = "none";
		inputbody1.appendChild(this.inputvalueSPAN1);

		// 输入密码
		this.formgroup2 = document.createElement("DIV");
		this.formgroup2.className = "form-group";
		this.form.appendChild(this.formgroup2);

		var inputbody2 = document.createElement("DIV");
		inputbody2.className = "col-lg-12 col-md-12 col-sm-12 col-xs-12";
		this.formgroup2.appendChild(inputbody2);

		//password输入框
		this.inputvalue2 = document.createElement("INPUT");
		this.inputvalue2.setAttribute("type", "password");
		this.inputvalue2.className = "form-control";
		this.inputvalue2.id = "password";
		this.inputvalue2.placeholder = "请输入密码";
		this.inputvalue2.required = true;
		this.inputvalue2.setAttribute("validity", false);
		this.inputvalue2.addEventListener("keypress", this, false);  //监听enter
		this.inputvalue2.setAttribute("autocomplete", "password");
		this.inputvalue2.addEventListener("blur", this, false);  //监听光标离开
		inputbody2.appendChild(this.inputvalue2);

		//验证密码错误结果
		this.inputvalueSPAN2 = document.createElement("SPAN");
		this.inputvalueSPAN2.innerHTML = "输入密码";
		this.inputvalueSPAN2.className = "help-block";
		this.inputvalueSPAN2.style.display = "none";
		inputbody2.appendChild(this.inputvalueSPAN2);

		// 记住密码
		var gDiv3 = document.createElement("DIV");
		this.form.appendChild(gDiv3);
		gDiv3.className = "form-group";
		gDiv3.id = "fm3";

		var gColDiv3 = document.createElement("DIV");
		gDiv3.appendChild(gColDiv3);
		gColDiv3.className = "checkbox col-sm-offset-2 col-sm-6";
		var gLabel3 = document.createElement("label");
		gColDiv3.appendChild(gLabel3);
		this.inputvalue3 = document.createElement("INPUT");
		gLabel3.appendChild(this.inputvalue3);
		this.inputvalue3.type = "checkbox";
		this.inputvalue3.id = "rememberme";
		this.inputvalue3.checked = true;
		this.inputvalue3.addEventListener("click", this, false);
		gLabel3.appendChild(document.createTextNode("记住我"));

//		var forgotpassword = document.createElement("A");
//		gDiv3.appendChild(forgotpassword);
//		forgotpassword.href = "forgotpassword.html";
//		forgotpassword.target = "_blank";
//		forgotpassword.innerText = "忘记密码?";

		// 登录按钮
		var formgroup4 = document.createElement("DIV");
		formgroup4.className = "form-group";
		this.form.appendChild(formgroup4);

		var inputbody4 = document.createElement("DIV");
		inputbody4.className = "col-sm-12";
		formgroup4.appendChild(inputbody4);

		this.inputvalue4 = document.createElement("BUTTON");
		this.inputvalue4.setAttribute("type", "button");
		this.inputvalue4.className = "btn btn-default btn-lg btn-primary btn-block";
		this.inputvalue4.innerText = "登录";
		this.inputvalue4.id = "traditionalLoginButton";
		this.inputvalue4.addEventListener("click", this, false);
		inputbody4.appendChild(this.inputvalue4);

		var formGroup5=document.createElement("div");
		formGroup5.className="form-group";
		this.form.appendChild(formGroup5);

		var a=document.createElement("a");
		a.innerText="还没有轩琦云账号?10秒注册";
		a.className="pull-right";
		a.href="/om/signup4user.jsp";
		formGroup5.appendChild(a);

		// //显示服务器ip的二维码
		// this.ipQrCode = document.createElement("div");
		// form.appendChild(this.ipQrCode);
        // this.ipQrCode.id = "serverIpQrCode";
		// this.ipQrCode.src = this.createIpQrCode();
		// this.ipQrCode.className = "col-xs-6 col-sm-6 col-md-6 col-lg-6";

		// //下载apk的二维码
		// this.downloadQrCode = document.createElement("div");
		// form.appendChild(this.downloadQrCode);
		// this.downloadQrCode.id = "serverDownloadQrCode";
		// this.downloadQrCode.src = this.createDownloadQrCode();
		// this.downloadQrCode.className = "col-xs-6 col-sm-6 col-md-6 col-lg-6";

	};

	TraditionalLogin.prototype.handleEvent = function(e) {
		switch (e.type) {
			case "click":
				this.doClick(e);
				break;
			case "keypress":
				var keyvalue = e.which;
				if (keyvalue == 13) { //enter
					this.doKeyPress(e);
				}
				break;
			case "blur":
				this.doBlur(e);
				break;
			}
	};

	TraditionalLogin.prototype.setStatus = function(active) { // 焦点离开本输入框
		this.inputvalue4.disabled = active;
		this.inputvalue3.disabled = active;
		this.inputvalue1.disabled = active;
		this.inputvalue2.disabled = active;
	};

	TraditionalLogin.prototype.doBlur = function(evt) { // 焦点离开本输入框
		if (evt.target.id == "username") {
			this.verifyUsername(evt);
		} else if (evt.target.id == "password") {
			this.verifyPassword(evt);
		}
	};

	TraditionalLogin.prototype.doClick = function(evt) { // 点击事件
		if (evt.target.id == "traditionalLoginButton") {
			//点击登录按钮
			if (this.inputvalue1.getAttribute("validity") == 'true'  //判断密码合法
				&& this.inputvalue2.getAttribute("validity") == 'true') {
				if(this.inputvalue3.checked){
					//this.remember();
				}else{
					 //this.remove();
				}
				this.disabledLoginButton();
				document.body.style.cursor = "wait";//鼠标加载状态
				this.sendLoginInformation();//发送用户登录信息
			} else if (this.inputvalue1.getAttribute("validity") == 'true'  //判断密码合法
				&& this.inputvalue2.getAttribute("validity") == 'false') {
				this.formgroup2.classList.add("has-error");
				this.inputvalueSPAN2.style.display = "block";
				this.inputvalue2.setAttribute("validity", false);
				this.inputvalueSPAN2.innerHTML = "请输入密码";
				this.disabledLoginButton();
				return;
			} else if (this.inputvalue1.getAttribute("validity") == 'false'  //判断密码合法
				&& this.inputvalue2.getAttribute("validity") == 'true') {
				this.formgroup1.classList.add("has-error");
				this.inputvalueSPAN1.style.display = "block";
				this.inputvalue1.setAttribute("validity", false);
				this.inputvalueSPAN1.innerHTML = "请输入账号/手机号/邮箱/身份证号!";
				this.disabledLoginButton();
				return;
			} else {
				this.formgroup2.classList.add("has-error");
				this.inputvalueSPAN2.style.display = "block";
				this.inputvalue2.setAttribute("validity", false);
				this.inputvalueSPAN2.innerHTML = "请输入密码";
				this.formgroup1.classList.add("has-error");
				this.inputvalueSPAN1.style.display = "block";
				this.inputvalue1.setAttribute("validity", false);
				this.inputvalueSPAN1.innerHTML = "请输入账号/手机号/邮箱/身份证号!";
				this.disabledLoginButton();
				return;
			}
		}
	};

	TraditionalLogin.prototype.doKeyPress = function(evt) { // enter事件
		if (evt.target.id == "password") {
			this.verifyUsername(evt);
		}
	};

	TraditionalLogin.prototype.verifyUsername = function(evt) {
		this.formgroup1.classList.remove("has-error");
		this.inputvalueSPAN1.style.display = "none";
		this.inputvalueSPAN1.innerHTML = "";
		this.enableLoginButton();
		var username = evt.target.value;
		if (username == null || username == "") {
			this.formgroup1.classList.add("has-error");
			this.inputvalueSPAN1.style.display = "block";
			this.inputvalue1.setAttribute("validity", false);
			this.inputvalueSPAN1.innerHTML = "请输入账号/手机号/邮箱/身份证号!";
			//this.disabledLoginButton();
			return;
		} else {
			this.inputvalue1.setAttribute("validity", true);
		}
	};

	TraditionalLogin.prototype.verifyPassword = function(evt) {
		//首先取消错误提示,在根据情况判断是否添加错误提示
		this.formgroup2.classList.remove("has-error");
		this.inputvalueSPAN2.style.display = "none";
		this.inputvalueSPAN2.innerHTML = "";
		this.enableLoginButton();
		var password = evt.target.value;
		if (password == null || password == "") {
			this.formgroup2.classList.add("has-error");
			this.inputvalueSPAN2.style.display = "block";
			this.inputvalue2.setAttribute("validity", false);
			this.inputvalueSPAN2.innerHTML = "请输入密码";
			//this.disabledLoginButton();
			return;
		} else {
			this.inputvalue2.setAttribute("validity", true);
		}
	};

	TraditionalLogin.prototype.sendLoginInformation = function() {  //登录方法
		that = this;
		var username = that.inputvalue1.value;
		username = username.replace(/\s+/g,"");
		var password = that.inputvalue2.value;
		password = password.replace(/\s+/g,"");
		$.post(this.options.url, {
			username : username,
			password : calcMD5(password),
			rememberme : $("#rememberme").is(':checked'),
		}, function(data) {
			if (data.status == 1) {
				window.location.replace(data.url1+data.url2+data.url3);
				that.enableLoginButton();
				document.body.style.cursor = "default";
			} else if (data.status == 0) {
				that.shownMessage("您所输入的用户帐号不存在");
				that.enableLoginButton();
				document.body.style.cursor = "default";
			} else if (data.status == -1) {
				that.shownMessage("您所输入的账号或密码不正确");
				that.enableLoginButton();
				document.body.style.cursor = "default";
			} else if (data.status == -2) {
				that.shownMessage("您的账号已经被禁用");
				this.enableLoginButton();
				document.body.style.cursor = "default";
			} else if (data.status == -3) {
				that.shownMessage("您还没有得到授权进入系统");
				this.enableLoginButton();
				document.body.style.cursor = "default";
			} else if (data.status == -9) {
				that.shownMessage("您的密码已经过期了,请点击忘记密码,然后进入该页重置密码页");
				this.enableLoginButton();
				document.body.style.cursor = "default";
			} else if (data.status == -4) {
				that.shownMessage("无效登录");
				this.enableLoginButton();
				document.body.style.cursor = "default";
			} else if (data.status == -10) {
				that.shownMessage("您的帐号已经被永久封掉,请联系云BPM公司系统管理员");
				this.enableLoginButton();
				document.body.style.cursor = "default";
			}
		});
	};
	TraditionalLogin.prototype.shownMessage = function(msg) {
		this.formgroup2.classList.add("has-error");
		this.inputvalueSPAN2.style.display = "block";
		this.inputvalue2.setAttribute("validity", false);
		this.inputvalueSPAN2.innerHTML = msg;
	};

	TraditionalLogin.prototype.remember = function() {  //记住我
		if(typeof(Storage)!=="undefined"){   //判断是否可以用localStorage
			var localStorage = window.localStorage;
			var inputUsername = this.inputvalue1.value;
			var inputPassword = this.inputvalue2.value;
			// localStorage.setItem("Username",inputUsername);
			// localStorage.setItem("Password",inputPassword);
		}else{
			if(navigator.cookieEnabled){       //判断cookie是否可用
				var inputUsername = this.inputvalue1.value;
				var inputPassword = this.inputvalue2.value;
				// setCookie("username", inputUsername, 7);//调用设置Cooke的方法
				// setCookie("password", inputPassword, 7)
			}else{
				alert("浏览器Cooike被禁用");
			}
		}
	};
	TraditionalLogin.prototype.check_cookie = function() {
		var localStorage = window.localStorage;
		var username = null;
		var password = null;
		$("#rememberme").prop("checked",true);
		if(typeof(Storage)!=="undefined"){
			var inputUsername = localStorage.hasOwnProperty("Username");
			if(inputUsername==null||inputUsername==""){
				if (document.cookie !== null) {
					if (document.cookie !== "") {
						username = getCookie("username");
						password = getCookie("password");
					} else {
						username = "";
						password = "";
					}
				}
			}else{
				username = localStorage.getItem("Username");
				password = localStorage.getItem("Password");
			}
			username = this.inputvalue1.value;
			password = this.inputvalue2.value;
		}
	};
	TraditionalLogin.prototype.remove = function(){ //删除cookie
		if (typeof(Storage)!=="undefined") {
			localStorage.removeItem("Username");
			localStorage.removeItem("Password");
		} else {
			if (navigator.cookieEnabled) {
				setCookie("username","",-1);//调用设置Cooke的方法
				setCookie("password","",-1)
			}
		}
	};

	TraditionalLogin.prototype.disabledLoginButton = function() {
		this.inputvalue4.setAttribute("disabled", "");
	};
	TraditionalLogin.prototype.enableLoginButton = function() {
		this.inputvalue4.removeAttribute("disabled");
	};

	$.fn[pluginName] = function(options) {
		return this.each(function() {
			if (!$.data(this, pluginName)) {
				$.data(this, pluginName, new TraditionalLogin(this, options));
			} else if ($.isFunction(Plugin.prototype[options])) {
				$.data(this, pluginName)[options]();
			}
		});
	};

})(jQuery, window, document);


text:
package signature.compare.model;

import java.util.Set;

import signature.model.IApi;

/**
 * {@code IApiDelta} models the delta between two {@link IApi} instances.
 */
public interface IApiDelta extends IDelta<IApi> {

    /**
     * Returns a set of package deltas or {@code null} if no deltas are
     * available.
     *
     * @return a set of package deltas, maybe {@code null}
     */
    Set<IPackageDelta> getPackageDeltas();
}

redpajama_set_name: RedPajamaGithub


text:
using System.Linq;
using NUnit.Framework;
using Xenon.Tests.Integration;

namespace Xenon.Tests.PageValidationTests
{
	public abstract class BasePageValidationFuncTests<T> : BaseXenonIntegrationTest where T : BaseXenonTest<T>
	{
		private const string ErrorMessage = "Custom Validation Failed";

		public XenonTestOptions Options { get; }
			= new XenonTestOptions
			{
				AssertMethod = Assert.IsTrue,
				PageValidationFunc = page =>
					page.Source.Contains( "
Error
" )
						? ErrorMessage
						: null
			};

		protected BasePageValidationFuncTests()
		{
			XenonTestsResourceLookup.Folder( "PageValidationTests" );
		}

		protected abstract T CreateInstance( IXenonBrowser browser );

		[Test]
		public void GoToUrl_CustomValidationFails_FailsTest()
		{
			using ( var browserTest = new BrowserTest(
				XenonTestsResourceLookup
					.GetContent(
						htmlFileName: "PageWithErrorHeader" ) ) )
			{
				var exception = Assert
					.Throws<AssertionException>(
						() => CreateInstance(
							browserTest.Start() ).GoToUrl( "/" ) );

				Assert.IsTrue( exception.Message.Contains( ErrorMessage ) );
			}
		}

		[Test]
		public void Assertion_CustomValidationFails_FailsTest()
		{
			using ( var browserTest = new BrowserTest(
				XenonTestsResourceLookup
					.GetContent(
						htmlFileName: "PageWithoutErrorHeader" ) ) )
			{
				var loadedPage = CreateInstance( browserTest.Start() ).GoToUrl( "/" );

				var exception = Assert
					.Throws<AssertionException>(
						() =>
						{
							loadedPage
								//trigger the bad page state
								.Click( "button" )
								.Assert( assertion => assertion
									.PageContains( "Make Error" ) );
						} );

				Assert.IsTrue( exception.Message.Contains( ErrorMessage ) );
			}
		}

		[Test]
		public void GoToUrl_CustomValidationPasses_DoesNotFailTest()
		{
			using ( var browserTest = new BrowserTest(
				XenonTestsResourceLookup
					.GetContent(
						htmlFileName: "PageWithoutErrorHeader" ) ) )
			{
				Assert
					.DoesNotThrow(
						() => CreateInstance(
							browserTest.Start() ).GoToUrl( "/" ) );
			}
		}

		[Test]
		public void Assertion_CustomValidationPasses_DoesNotFailTest()
		{
			using ( var browserTest = new BrowserTest(
				XenonTestsResourceLookup
					.GetContent(
						htmlFileName: "PageWithoutErrorHeader" ) ) )
			{
				Assert
					.DoesNotThrow(
						() => CreateInstance(
								browserTest.Start() )
							.GoToUrl( "/" )
							.Assert( assertion => assertion
								.PageContains( "200" ) ) );
			}
		}

		[Test]
		public void ActionTriggeringModal_WhileModalActive_CanHandleModal()
		{
			using ( var browserTest = new BrowserTest(
				XenonTestsResourceLookup
					.GetContent(
						htmlFileName: "PageWithoutErrorHeader" ) ) )
			{
				CreateInstance( browserTest.Start() )
					.GoToUrl( "/" )
					.Click( "a" )
					.Assert( assertion => assertion
						.CustomAssertion( browser => browser
							.DialogBoxIsActive() ) );
			}
		}
	}
}


text:
<?php

class PlaceRepo {

    /**
     * List of places
     * @var array
     */
    private $data;

    public function __construct() {
        $this->data = array();
    }

    /**
     * Create Place entity
     * @param string $name
     * @param array $dis
     */
    public function createPlace($name, $dis) {
        $this->data[] = new Place($name, $dis);
    }

    /**
     * Assign free taxi to Place with the biggest count people
     * @param TaxiRepo $repo
     */
    public function assignFreeTaxis(TaxiRepo $repo) {
        foreach ($repo->getTaxis() as $key => $taxi) {
            if (($taxi->getDistanceLeft() === 0) && !($taxi->getPlace() instanceOf Place) ){
                $place = $this->mostPeople();
                $repo->getTaxis()[$key]->setPlace($place);
                $repo->getTaxis()[$key]->setOnRoad(FALSE);
                $place->addTaxi($repo->getTaxis()[$key]);
            }
        }
    }

    /**
     * Return place with biggest quelle
     * @return Place
     */
    public function mostPeople() {
        $max = -1;
        $index = -1;
        foreach ($this->data as $key => $place) {
            if ($place->getPeople() > $max) {
                $max = $place->getPeople();
                $index = $key;
            }
        }
        if($this->data[$index]->getPeople() == 0 ){
          $min = 999999;
          foreach ($this->data as $key => $place) {
              if ($place->countTaxis() < $min) {
                  $min = $place->countTaxis();
                  $index = $key;
              }
          }
        }
        return $this->data[$index];
    }

    /**
     * One round
     * @param integer $time Seconds from start
     * @param array $distance
     */
    public function round($time, $distance) {
        foreach ($this->data as $place) {
            $place->entrance($distance);
            $place->round($time);
        }
    }

    /**
     * Return all places
     * @return array
     */
    public function getPlaces() {
        return $this->data;
    }

}

?>


text:
'use strict';

var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');

var PATHS = {
    main: path.join(__dirname, 'app', 'client', 'client.js'),   // app folder: source code
    build: path.join(__dirname, 'build'),                       // build folder: bundle code
    style: [
        path.join(__dirname, 'app', 'client', 'styles', 'main.css')
    ]
};

module.exports = {
    devtool: 'eval-source-map',

    entry: {
        main: [
            'webpack-hot-middleware/client?reload=true',
            PATHS.main
        ],
        style: PATHS.style
    },

    output: {
        path: PATHS.build,
        filename: '[name].js',
        publicPath: '/'
    },

    plugins: [
        new HtmlWebpackPlugin({
            template: 'app/client/index.tpl.html',
            inject: 'body',
            filename: 'index.html'
        }),
        new webpack.optimize.OccurenceOrderPlugin(),
        new webpack.HotModuleReplacementPlugin(),
        new webpack.NoErrorsPlugin(),
        new webpack.DefinePlugin({
            'global.GENTLY': false
        }),
        new webpack.DefinePlugin({
            'process.env.NODE_ENV': JSON.stringify('development')
        })
    ],

    module: {
        loaders: [ /*{
            test: /\.js?$/,
            include: path.join(__dirname, 'app'),
            loader: 'react-hot',    // use react-hot-loader
        }, */{
            test: /\.jsx?$/,
            exclude: /node_modules/,
            loader: 'babel',
            query: {
                "presets": ["react", "es2015", "stage-0", "react-hmre"]
            }
        }, {
            test: /\.json?$/,
            loader: 'json-loader'
        }, {
            test: /\.css$/,
            loader: 'style!css?modules&localIdentName=[name]__[local]-[hash:base64:5]',
            include: PATHS.style
        }, {
            test: /\.(png|jpg|jpeg|gif|svg|woff|woff2)$/,
            loader: 'url-loader?limit=10000'
        }]
    },

    node: {
        __dirname: true,
        fs: 'empty'
    }
};


text:
package jvm.jsr292;

import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;

import static helper.MyAssert.assertEquals;

public class LookupTest {

    public LookupTest(String[] x) {}
    private void foo(String[] x) {}
    public void bar(String[] x) {}
    public int f1;
    public static long f2;

    public static void main(String[] args) throws Exception {
        MethodHandles.Lookup lookup = MethodHandles.lookup();
        MethodType mt = MethodType.methodType(void.class, String[].class);

        assertEquals("MethodHandle(String[])void",            lookup.findStatic(LookupTest.class, "main", mt).toString());
        assertEquals("MethodHandle(String[])LookupTest",      lookup.findConstructor(LookupTest.class, mt).toString());
        assertEquals("MethodHandle(LookupTest,String[])void", lookup.findSpecial(LookupTest.class, "foo", mt, LookupTest.class).toString());
        assertEquals("MethodHandle(LookupTest,String[])void", lookup.findVirtual(LookupTest.class, "bar", mt).toString());
        assertEquals("MethodHandle(LookupTest)int",           lookup.findGetter(LookupTest.class, "f1", int.class).toString());
        assertEquals("MethodHandle(LookupTest,int)void",      lookup.findSetter(LookupTest.class, "f1", int.class).toString());
        assertEquals("MethodHandle()long",                    lookup.findStaticGetter(LookupTest.class, "f2", long.class).toString());
        assertEquals("MethodHandle(long)void",                lookup.findStaticSetter(LookupTest.class, "f2", long.class).toString());

        //System.out.println(lookup.findVirtual(LookupTest.class, "toString", MethodType.methodType(String.class)));
        System.out.println("OK!");
    }

}


text:
'use strict';

var getVendorPrefixedEventName = require('./getVendorPrefixedEventName');

/**
 * Types of raw signals from the browser caught at the top level.
 *
 * For events like 'submit' which don't consistently bubble (which we
 * trap at a lower node than `document`), binding at `document` would
 * cause duplicate events so we don't include them here.
 */
var topLevelTypes = {
  topAbort: 'abort',
  topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
  topAnimationIteration: getVendorPrefixedEventName('animationiteration') ||
    'animationiteration',
  topAnimationStart: getVendorPrefixedEventName('animationstart') ||
    'animationstart',
  topBlur: 'blur',
  topCancel: 'cancel',
  topCanPlay: 'canplay',
  topCanPlayThrough: 'canplaythrough',
  topChange: 'change',
  topClick: 'click',
  topClose: 'close',
  topCompositionEnd: 'compositionend',
  topCompositionStart: 'compositionstart',
  topCompositionUpdate: 'compositionupdate',
  topContextMenu: 'contextmenu',
  topCopy: 'copy',
  topCut: 'cut',
  topDoubleClick: 'dblclick',
  topDrag: 'drag',
  topDragEnd: 'dragend',
  topDragEnter: 'dragenter',
  topDragExit: 'dragexit',
  topDragLeave: 'dragleave',
  topDragOver: 'dragover',
  topDragStart: 'dragstart',
  topDrop: 'drop',
  topDurationChange: 'durationchange',
  topEmptied: 'emptied',
  topEncrypted: 'encrypted',
  topEnded: 'ended',
  topError: 'error',
  topFocus: 'focus',
  topInput: 'input',
  topKeyDown: 'keydown',
  topKeyPress: 'keypress',
  topKeyUp: 'keyup',
  topLoadedData: 'loadeddata',
  topLoad: 'load',
  topLoadedMetadata: 'loadedmetadata',
  topLoadStart: 'loadstart',
  topMouseDown: 'mousedown',
  topMouseMove: 'mousemove',
  topMouseOut: 'mouseout',
  topMouseOver: 'mouseover',
  topMouseUp: 'mouseup',
  topPaste: 'paste',
  topPause: 'pause',
  topPlay: 'play',
  topPlaying: 'playing',
  topProgress: 'progress',
  topRateChange: 'ratechange',
  topScroll: 'scroll',
  topSeeked: 'seeked',
  topSeeking: 'seeking',
  topSelectionChange: 'selectionchange',
  topStalled: 'stalled',
  topSuspend: 'suspend',
  topTextInput: 'textInput',
  topTimeUpdate: 'timeupdate',
  topToggle: 'toggle',
  topTouchCancel: 'touchcancel',
  topTouchEnd: 'touchend',
  topTouchMove: 'touchmove',
  topTouchStart: 'touchstart',
  topTransitionEnd: getVendorPrefixedEventName('transitionend') ||
    'transitionend',
  topVolumeChange: 'volumechange',
  topWaiting: 'waiting',
  topWheel: 'wheel',
};

export type TopLevelTypes = $Enum<typeof topLevelTypes>;

var BrowserEventConstants = {
  topLevelTypes,
};

module.exports = BrowserEventConstants;


text:
<!DOCTYPE html>

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

    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="icon" href="../../favicon.ico">

    <title>Non-responsive Template for Bootstrap</title>

    <link href="../../dist/css/bootstrap.min.css" rel="stylesheet">

    <link href="non-responsive.css" rel="stylesheet">

          Project name

Home

About

Contact

              Dropdown

Action

Another action

Something else here

Nav header

Separated link

One more separated link

          <form class="navbar-form navbar-left" role="search">

              <input type="text" class="form-control" placeholder="Search">

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

Link

Link

Link

Non-responsive Bootstrap

Disable the responsiveness of Bootstrap by fixing the width of the container and using the first grid system tier. Read the documentation for more information.

What changes

Note the lack of the <meta name="viewport" content="width=device-width, initial-scale=1">, which disables the zooming aspect of sites in mobile devices. In addition, we reset our container's width and changed the navbar to prevent collapsing, and are basically good to go.

Regarding navbars

As a heads up, the navbar component is rather tricky here in that the styles for displaying it are rather specific and detailed. Overrides to ensure desktop styles display are not as performant or sleek as one would like. Just be aware there may be potential gotchas as you build on top of this example when using the navbar.

Browsers, scrolling, and fixed elements

Non-responsive layouts highlight a key drawback to fixed elements. Any fixed component, such as a fixed navbar, will not be scrollable when the viewport becomes narrower than the page content. In other words, given the non-responsive container width of 970px and a viewport of 800px, you'll potentially hide 170px of content.

There is no way around this as it's default browser behavior. The only solution is a responsive layout or using a non-fixed element.

Non-responsive grid system

One third

One third

One third


text:
	#undef EXPORT
	#define EXPORT
#endif

#if (__GNUC__) || (__clang__)
	#define EXPORT __attribute__((used, __visibility__("default")))
#endif

namespace std {
	extern new_handler __new_handler;
	#ifdef __GNUC__
	extern const nothrow_t nothrow;
	#elif _MSC_VER
	#else
	EXPORT nothrow_t nothrow;
	#endif
}

#define MAGIC_NUMERO	0xdeceaced
#define HEADER_SIZE		16

static void* doAllocate( std::size_t size )
{
	char* ret = reinterpret_cast<char*>(malloc( size + HEADER_SIZE ));
	if ( ret )
	{
		*((int32_t*)ret) = MAGIC_NUMERO;
		ret += HEADER_SIZE;
	}
	return ret;
}

static void doDeallocate( void* mem )
{
	if ( mem )
	{
		char* test = reinterpret_cast<char*>(mem) - HEADER_SIZE;
		if ( *((int32_t*)test) == MAGIC_NUMERO )
			free( test );
		else
			free( mem );
	}
}

EXPORT void *operator new(std::size_t size) throw(std::bad_alloc)
{
	void* result = doAllocate(size);

	if (result == NULL)
		throw std::bad_alloc();

	return result;
}

EXPORT void *operator new(std::size_t size, const std::nothrow_t&) throw()
{
	return doAllocate(size);
}

EXPORT void *operator new[](std::size_t size) throw(std::bad_alloc)
{
	void* result = doAllocate(size);

	if (result == NULL)
		throw std::bad_alloc();

	return result;
}

EXPORT void *operator new[](std::size_t size, const std::nothrow_t&) throw()
{
	return doAllocate(size);
}

EXPORT void operator delete(void *address) throw()
{
	doDeallocate( address );
}

EXPORT void operator delete[](void *address) throw()
{
	doDeallocate( address );
}

EXPORT void operator delete(void *address, const std::nothrow_t&) throw()
{
	doDeallocate( address );
}

EXPORT void operator delete[](void *address, const std::nothrow_t&) throw()
{
	doDeallocate( address );
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Owin.Hosting;
using Owin;

namespace OwinSelfHostExpanded
{
    using AppFunc = Func<IDictionary<string, object>, Task>;

    class Program
    {
        static void Main(string[] args)
        {
            using (WebApp.Start("http://localhost:4242", Startup))
            {
                Console.ReadLine();
            }
        }

        // The factory designer office that decides what the assembly line should look like
        // by ordering a set of assembly line constructor machines.
        private static void Startup(IAppBuilder app)
        {
            // Have to explicitly construct the Func<...> since the argument of
            // Use() is of type object.
            app.Use(new Func<AppFunc, AppFunc>(BasicAuthenticationMiddleware));

            app.Use(new Func<AppFunc, AppFunc>(StartPageMiddleware));
        }

        private static AppFunc BasicAuthenticationMiddleware(AppFunc next)
        {
            return new BasicAuthenticationHandler(next).InvokeAsync;
        }

        // Builds an item in an assembly line, e.g. the robot that paints items as they
        // are manufactured.
        private static AppFunc StartPageMiddleware(AppFunc next)
        {
            return new StartPageHandler(next).InvokeAsync;
        }
    }
}


text:
<resources>
    <string name="app_name">78. RunTime Add Item to MultiAutoCompleteTextView</string>
</resources>


text:
package issues.i2505;

import java.util.Collections;
import java.util.List;
import java.util.Map;

import io.jooby.annotations.GET;
import io.jooby.annotations.Path;

public class Controller2505 {
  @GET
  @Path("/2505")
  public Map<String, String> mapWithStringValue() {
    return Collections.emptyMap();
  }

  @GET
  @Path("/2505/value")
  public Map<String, Value2505> mapWithCustomValue() {
    return Collections.emptyMap();
  }

  @GET
  @Path("/2505/arrayValue")
  public Map<String, List<Value2505>> mapWithCustomArrayValue() {
    return Collections.emptyMap();
  }
}


text:
using System;
using System.Reflection;
using DragonSpark.Sources.Parameterized;

namespace DragonSpark.Windows.Runtime
{
	public class ApplicationDomainProxyFactory<T> : ParameterizedSourceBase<object[], T>
	{
		readonly AppDomain domain;

		public ApplicationDomainProxyFactory( AppDomain domain )
		{
			this.domain = domain;
		}

		public override T Get( object[] parameter )
		{
			var assemblyPath = new Uri( typeof(T).Assembly.CodeBase).LocalPath;
			var result = (T)domain.CreateInstanceFromAndUnwrap(assemblyPath, typeof(T).FullName, false
															   , BindingFlags.CreateInstance | BindingFlags.Public | BindingFlags.Default
															   , null, parameter, null, null );
			return result;
		}
	}
}


text:
/**
 * Created on 18-mei-2003
 */

package craterstudio.util;

import java.awt.Component;
import java.awt.Dialog;
import java.awt.Frame;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.security.AccessControlException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.concurrent.atomic.AtomicLong;

import javax.swing.JDialog;

//import craterstudio.data.tuples.Duo;
//import craterstudio.func.Condition;
import craterstudio.io.Streams;
import craterstudio.text.Text;

public class HighLevel {
	public static String convertThrowableToString(Throwable t) {
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		PrintStream stream = new PrintStream(baos);
		t.printStackTrace(stream);
		return Text.utf8(baos.toByteArray());
	}

	public static List<File> lookupClassPath() {
		ClassLoader parent = HighLevel.class.getClassLoader();

		List<File> cp = new ArrayList<File>();

		if (parent instanceof URLClassLoader) {
			URL[] urls = ((URLClassLoader) parent).getURLs();

			for (URL url : urls) {
				String full = url.toExternalForm();

				if (!full.startsWith("file:")) {
					continue;
				}

				cp.add(new File(Text.after(full, "file:")));
			}
		}

		return cp;
	}

	public static Runnable createMainLauncher(String classpath, String mainclass, String... args) throws Exception {
		return createMainLauncher(Text.split(classpath, File.pathSeparatorChar), mainclass, args);
	}

	public static Runnable createMainLauncher(String[] classpath, String mainclass, final String... args) throws Exception {
		URL[] cpURLs = new URL[classpath.length];

		try {
			for (int i = 0; i < cpURLs.length; i++) {
				cpURLs[i] = new File(classpath[i]).toURI().toURL();
			}
		} catch (MalformedURLException exc) {
			throw new IllegalArgumentException(exc);
		}

		URLClassLoader cl = new URLClassLoader(cpURLs);
		Class<?>[] params = new Class[] { String[].class };
		final Method method = cl.loadClass(mainclass).getMethod("main", params);

		return new Runnable() {
			@Override
			public void run() {
				try {
					method.invoke(null, new Object[] { args });
				} catch (InvocationTargetException exc) {
					if (!(exc.getCause() instanceof ThreadDeath))
						throw new IllegalStateException(exc.getCause());
				} catch (Exception exc) {
					exc.printStackTrace();
				}
			}
		};
	}

	public static final int iteratorElements(Iterator<?> it) {
		int counter = 0;
		while (it.hasNext()) {
			it.next();
			counter++;
		}
		return counter;
	}

	public static final <T> T iteratorElement(Iterator<T> it, int n) {
		if (n < 0)
			throw new IllegalArgumentException("n (" + n + ") must be >= 0");

		int m = n;

		while (it.hasNext()) {
			T t = it.next();
			if ((n--) == 0)
				return t;
		}

		throw new NoSuchElementException("element @ " + m + " not available");
	}

	public static final <T> int indexOfIterator(Iterator<T> it, T find) {
		int i = 0;
		while (it.hasNext()) {
			if (it.next().equals(find))
				return i;
			i++;
		}
		return -1;
	}

	public static final <T> int lastIndexOfIterator(Iterator<T> it, T find) {
		int last = -1;
		int i = 0;
		while (it.hasNext()) {
			if (it.next().equals(find))
				last = i;
			i++;
		}
		return last;
	}

	//

	public static final Thread startDaemon(Runnable task) {
		Thread t = new Thread(task);
		t.setDaemon(true);
		t.start();
		return t;
	}

	private static final AtomicLong threadOff = new AtomicLong();

	public static final Thread start(Runnable task) {
		Thread t = new Thread(task);
		t.start();
		return t;
	}

	public static final Thread start(Runnable task, long stacksize) {
		return start(task, "CustomStackSize-" + threadOff.getAndIncrement(), stacksize);
	}

	public static final Thread start(Runnable task, String name, long stacksize) {
		Thread t = new Thread(Thread.currentThread().getThreadGroup(), task, name, stacksize);
		t.start();
		return t;
	}

	public static final void join(Thread t) {
		do {
			try {
				t.join();

				break;
			} catch (InterruptedException exc) {
				// ignore
			}
		} while (true);
	}

	public static final void wait(Object lock) {
		try {
			lock.wait();
		} catch (InterruptedException exc) {
			// ignore
		}
	}

	public static final void wait(Object lock, long ms) {
		try {
			lock.wait(ms);
		} catch (InterruptedException exc) {
			// ignore
		}
	}

//	public static final void wait(Object lock, long waitMS, Condition con, boolean consumeInterrupts) {
//		synchronized (lock) {
//			while (con == null || (con != null && !con.pass())) {
//				try {
//					lock.wait(waitMS);
//				} catch (InterruptedException exc) {
//					if (consumeInterrupts) {
//						Thread.interrupted();
//					}
//				}
//
//				if (con == null)
//					break;
//			}
//		}
//	}

	public static final void notify(Object lock) {
		synchronized (lock) {
			lock.notify();
		}
	}

	public static final void notifyAll(Object lock) {
		synchronized (lock) {
			lock.notifyAll();
		}
	}

//	public static final void sleep(long waitMS, Condition con, boolean consumeInterrupts) {
//		while (!con.pass()) {
//			HighLevel.sleep(waitMS, consumeInterrupts);
//		}
//	}

	/**
	 * FIELD TO STRING
	 */

	public static final String fieldToString(Class<?> clazz, int fieldValue, String def) {
		try {
			for (Field field : clazz.getFields())
				if (field.getInt(null) == fieldValue)
					return field.getName();

			for (Field field : clazz.getDeclaredFields())
				if (Modifier.isPublic(field.getModifiers()))
					if (field.getInt(null) == fieldValue)
						return field.getName();
		} catch (Exception exc) {
			if (def == null)
				throw new IllegalArgumentException("Field-value (" + fieldValue + ") not found in class " + clazz.getName());

			return def;
		}

		if (def == null)
			throw new IllegalArgumentException("Field-value (" + fieldValue + ") not found in class " + clazz.getName());

		return def;
	}

	public static final List<String> fieldToStrings(Class<?> clazz, int fieldValue) {
		try {
			List<String> fieldNames = new LinkedList<String>();

			for (Field field : clazz.getFields())
				if (field.getInt(null) == fieldValue)
					fieldNames.add(field.getName());

			for (Field field : clazz.getDeclaredFields())
				if (Modifier.isPublic(field.getModifiers()))
					if (field.getInt(null) == fieldValue)
						fieldNames.add(field.getName());

			if (!fieldNames.isEmpty())
				return fieldNames;
		} catch (Exception exc) {
			throw new IllegalArgumentException(exc);
		}

		throw new IllegalArgumentException("Field-value (" + fieldValue + ") not found in class " + clazz.getName());
	}

	public static final int stringToField(Class<?> clazz, String fieldName, int def) {
		try {
			Field field = clazz.getField(fieldName);
			if (field == null)
				throw new IllegalStateException();
			if (field.getType() != int.class)
				throw new IllegalStateException();
			return ((Integer) field.get(null)).intValue();
		} catch (Exception exc) {
			return def;
		}
	}

	/**
	 * PROPERTIES BY PATH
	 */

	public static final void setPropertyByPath(Object obj, String path, Object val) {
		propertyPathBy(obj, path, val, true);
	}

	public static final Object getPropertyByPath(Object obj, String path) {
		return propertyPathBy(obj, path, null, false);
	}

	private static final Object propertyPathBy(Object obj, String path, Object val, boolean set) {
		String orgPath = path;

		while (true) {
			int dot = path.indexOf('.');

			if (dot == -1) {
				if (set) {
					setProperty(obj, path, val);
					return null;
				}

				return getProperty(obj, path);
			}

			obj = getProperty(obj, path.substring(0, dot));
			if (obj == null)
				throw new NullPointerException("\"" + path.substring(0, dot) + "\"==null in \"" + orgPath + "\"");
			path = path.substring(dot + 1);
		}
	}

	/**
	 * PROPERTIES
	 */

	public static final void setProperty(Object obj, String property, Object val) {
		String methodName = "set" + Text.capitalize(property);

		for (Method method : obj.getClass().getMethods()) {
			if (!method.getName().equals(methodName))
				continue;

			if (method.getReturnType() != void.class)
				throw new IllegalStateException("Invalid property: " + property + ", return-type must be void");

			if (method.getParameterTypes().length != 1)
				throw new IllegalStateException("Invalid property: " + property + ", must have 1 parameter");

			try {
				method.invoke(obj, new Object[] { val });
				return;
			} catch (IllegalArgumentException exc) {
				throw new IllegalStateException("" + exc.getMessage() + " prop=" + property + ", val=" + val.getClass().getSimpleName() + ", par=" + method.getParameterTypes()[0].getSimpleName());
			} catch (Exception exc) {
				throw new IllegalStateException(exc);
			}
		}

		throw new IllegalStateException("Couldn't find property: " + property + " as " + methodName);
	}

	public static final Object getProperty(Object obj, String property) {
		for (int i = 0; i < 2; i++) {
			String methodName = ((i == 0) ? "get" : "is") + Text.capitalize(property);

			for (Method method : obj.getClass().getMethods()) {
				if (!method.getName().equals(methodName))
					continue;

				if (method.getReturnType() == void.class)
					throw new IllegalStateException("Invalid property: " + property + ", return-type must not be void");

				if (method.getParameterTypes().length != 0)
					throw new IllegalStateException("Invalid property: " + property + ", must have 0 parameters");

				try {
					return method.invoke(obj, new Object[0]);
				} catch (Exception exc) {
					throw new IllegalStateException(exc);
				}
			}
		}

		throw new IllegalStateException("Couldn't find property: " + property);
	}

	/**
	 * GC
	 */

	public static final long gc() {
		long preUsed = HighLevel.memUsed();
		for (int i = 0; i < 4; i++)
			System.gc();
		long postUsed = HighLevel.memUsed();

		return preUsed - postUsed;
	}

	public static long memUsed() {
		Runtime r = Runtime.getRuntime();
		return r.totalMemory() - r.freeMemory();
	}

	//

	/**
    *
    */

//	public static final Duo<byte[]> executeProcess(String... cmds) {
//		try {
//			Process proc = Runtime.getRuntime().exec(cmds);
//			ByteArrayOutputStream stdout = new ByteArrayOutputStream();
//			ByteArrayOutputStream stderr = new ByteArrayOutputStream();
//			Streams.asynchronousTransfer(proc.getInputStream(), stdout);
//			Streams.asynchronousTransfer(proc.getErrorStream(), stderr);
//			int exitCode = proc.waitFor();
//			if (exitCode != 0)
//				throw new IllegalStateException("exit-code: " + exitCode + " cmds=" + Arrays.toString(cmds));
//
//			return new Duo<byte[]>(stdout.toByteArray(), stderr.toByteArray());
//		} catch (Exception exc) {
//			throw new IllegalStateException(exc);
//		}
//	}

	/**
	 * SLEEP
	 */

	public static final void busySleep(long ms) {
		busyNanoSleep(ms * 1000000L);
	}

	public static final void busyNanoSleep(long ns) {
		long end = System.nanoTime() + ns;
		while (System.nanoTime() < end)
			Thread.yield();
	}

	public static final void sleep() {
		long tenYears = 10 * 365L * 24L * 3600L * 1000L;

		try {
			Thread.sleep(tenYears);
		} catch (InterruptedException exc) {
			return;
		}
	}

	public static final void sleep(long ms) {
		sleep(ms, false);
	}

	public static final void sleep(long ms, boolean consumeInterrupts) {
		try {
			Thread.sleep(ms);
		} catch (InterruptedException exc) {
			if (consumeInterrupts) {
				Thread.currentThread().interrupt();
				Thread.interrupted();
			}
		}
	}

	public static final int sizeof(Class<?> prim) {
		if (prim == byte.class || prim == boolean.class)
			return 1;
		if (prim == short.class || prim == char.class)
			return 2;
		if (prim == int.class || prim == float.class)
			return 4;
		if (prim == long.class || prim == double.class)
			return 8;
		return -1;
	}

	public static JDialog createDialogFromComponentParent(Component c, boolean modal, boolean root) {
		Component target = null;

		while (c.getParent() != null) {
			c = c.getParent();

			if (c instanceof Frame) {
				target = c;
				if (!root)
					break;
			}

			if (c instanceof Dialog) {
				target = c;
				if (!root)
					break;
			}
		}

		if (target instanceof Frame)
			return new JDialog((Frame) target, modal);
		if (target instanceof Dialog)
			return new JDialog((Dialog) target, modal);

		throw new IllegalStateException("Couldn't find root surface");
	}

	//

	public static Field findDeclaredField(Class<?> clazz, String name) {
		do {
			for (Field fld : clazz.getDeclaredFields())
				if (fld.getName().equals(name))
					return fld;

			clazz = clazz.getSuperclass();
		} while (clazz != null);

		return null;
	}

	public static Field[] findDeclaredFields(Class<?> clazz, String name) {
		List<Field> result = new ArrayList<Field>();

		do {
			for (Field fld : clazz.getDeclaredFields())
				if (fld.getName().equals(name))
					result.add(fld);

			clazz = clazz.getSuperclass();
		} while (clazz != null);

		return result.toArray(new Field[result.size()]);
	}

	//

	public static Method findDeclaredMethod(Class<?> clazz, String name) {
		do {
			for (Method mthd : clazz.getDeclaredMethods())
				if (mthd.getName().equals(name))
					return mthd;

			clazz = clazz.getSuperclass();
		} while (clazz != null);

		return null;
	}

	public static Method[] findDeclaredMethods(Class<?> clazz, String name) {
		Class<?> clz = clazz;
		List<Method> result = new ArrayList<Method>();

		try {
			do {
				outer: for (Method mthd1 : clazz.getDeclaredMethods()) {
					if (!mthd1.getName().equals(name))
						continue; // not interested

					for (Method mthd2 : result) {
						// can still be overridden with WIDER modifiers
						// if(mthd1.getModifiers() != mthd2.getModifiers())
						// continue;

						if (!mthd1.getReturnType().equals(mthd2.getReturnType()))
							continue; // not equal

						Class<?>[] c1 = mthd1.getParameterTypes();
						Class<?>[] c2 = mthd2.getParameterTypes();
						if (!Arrays.equals(c1, c2))
							continue; // not equal

						// is overriden by superclass, don't mention
						continue outer;
					}

					// found new method
					result.add(mthd1);
				}

				clazz = clazz.getSuperclass();
			} while (clazz != null);
		} catch (AccessControlException exc) {
			result.clear();
			for (Method mthd : clz.getMethods())
				if (mthd.getName().equals(name))
					result.add(mthd);
		}

		return result.toArray(new Method[result.size()]);
	}

	//

	public static Field[] forceAccess(Field... flds) {
		try {
			for (Field fld : flds)
				if (!fld.isAccessible())
					fld.setAccessible(true);
		} catch (AccessControlException exc) {
			// ignore
		}

		return flds;
	}

	public static Method[] forceAccess(Method... mthds) {
		try {
			for (Method mthd : mthds)
				if (!mthd.isAccessible())
					mthd.setAccessible(true);
			return mthds;
		} catch (AccessControlException exc) {
			// ignore
		}

		return mthds;
	}

	public static List<URL> getBootClassPath() {
		String a = System.getProperty("sun.boot.class.path");
		String b = System.getProperty("path.separator");

		List<URL> urls = new ArrayList<URL>();
		for (String p : Text.split(a, b)) {
			try {
				urls.add(new File(p).toURI().toURL());
			} catch (IOException exc) {
				exc.printStackTrace();
			}
		}
		return urls;
	}

	public static List<URL> getClassPath() {
		String a = System.getProperty("java.class.path");
		String b = System.getProperty("path.separator");

		List<URL> urls = new ArrayList<URL>();
		for (String p : Text.split(a, b)) {
			try {
				urls.add(new File(p).toURI().toURL());
			} catch (IOException exc) {
				exc.printStackTrace();
			}
		}
		return urls;
	}

	public static List<URL> getClassPath0() {
		try {
			ClassLoader loader = HighLevel.class.getClassLoader();

			if (loader instanceof URLClassLoader) {
				URLClassLoader ucl = (URLClassLoader) loader;
				return Arrays.asList(ucl.getURLs());
			}
		} catch (Exception exc) {
			exc.printStackTrace();
		}

		return null;
	}

	public static List<File> getJarsOnClassPath() {
		List<File> files = new ArrayList<File>();

		try {
			ClassLoader loader = HighLevel.class.getClassLoader();

			if (loader instanceof URLClassLoader) {
				URLClassLoader ucl = (URLClassLoader) loader;
				for (URL url : ucl.getURLs()) {
					String full = url.toString();
					if (!full.startsWith("file:")) {
						continue;
					}

					String path = Text.after(full, "file:");

					File file = new File(path);
					if (!file.exists() || file.isDirectory()) {
						continue;
					}

					files.add(file);
				}
			}
		} catch (Exception exc) {
			exc.printStackTrace();
		}

		return files;
	}
}


text:
SYNONYM

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

#### Published in
Mycotaxon 58: 22 (1996)

#### Original name
Gloeocystidiellum heimii Boidin, 1966

### Remarks
null


text:
package com.facebook.buck.dalvik;

import com.facebook.buck.util.HumanReadableException;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableSet;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Collection;
import java.util.Set;

/**
 * Alternative to {@link DefaultZipSplitter} that uses estimates from {@link DalvikStatsTool}
 * to determine how many classes to pack into a dex.
 *

 * It does two passes through the .class files:
 *

 *
During the first pass, it uses the {@code requiredInPrimaryZip} predicate to filter the set
 *       of classes that must be included in the primary dex. These classes are added to
 *       the primary zip.
 *
During the second pass, classes that were not matched during the initial pass are added to
 *        zips as space allows. This is a simple, greedy algorithm.
 *

 */
public class DalvikAwareZipSplitter implements ZipSplitter {

  private final Set<File> inFiles;
  private final File outPrimary;
  private final Predicate<String> requiredInPrimaryZip;
  private final File reportDir;
  private final long linearAllocLimit;
  private final DalvikStatsCache dalvikStatsCache;

  private final MySecondaryDexHelper secondaryDexWriter;
  private DalvikAwareOutputStreamHelper primaryOut;

  /**
   * @see ZipSplitterFactory#newInstance(Set, File, File, String, Predicate, DexSplitStrategy, CanaryStrategy, File)
   */
  private DalvikAwareZipSplitter(
      Set<File> inFiles,
      File outPrimary,
      File outSecondaryDir,
      String secondaryPattern,
      long linearAllocLimit,
      Predicate<String> requiredInPrimaryZip,
      ZipSplitter.CanaryStrategy canaryStrategy,
      File reportDir) {
    if (linearAllocLimit <= 0) {
      throw new HumanReadableException("linear_alloc_hard_limit must be greater than zero.");
    }
    this.inFiles = ImmutableSet.copyOf(inFiles);
    this.outPrimary = Preconditions.checkNotNull(outPrimary);
    this.secondaryDexWriter = new MySecondaryDexHelper(outSecondaryDir, secondaryPattern, canaryStrategy);
    this.requiredInPrimaryZip = Preconditions.checkNotNull(requiredInPrimaryZip);
    this.reportDir = reportDir;
    this.linearAllocLimit = linearAllocLimit;
    this.dalvikStatsCache = new DalvikStatsCache();
  }

  public static DalvikAwareZipSplitter splitZip(
      Set<File> inFiles,
      File outPrimary,
      File outSecondaryDir,
      String secondaryPattern,
      long linearAllocLimit,
      Predicate<String> requiredInPrimaryZip,
      ZipSplitter.CanaryStrategy canaryStrategy,
      File reportDir) {
    return new DalvikAwareZipSplitter(
        inFiles,
        outPrimary,
        outSecondaryDir,
        secondaryPattern,
        linearAllocLimit,
        requiredInPrimaryZip,
        canaryStrategy,
        reportDir);
  }

  @Override
  public Collection<File> execute() throws IOException {
    ClasspathTraverser classpathTraverser = new DefaultClasspathTraverser();

    // Start out by writing the primary zip and recording which entries were added to it.
    primaryOut = newZipOutput(outPrimary);
    secondaryDexWriter.reset();

    // Iterate over all of the inFiles and add all entries that match the requiredInPrimaryZip
    // predicate.
    classpathTraverser.traverse(new ClasspathTraversal(inFiles) {
      @Override
      public void visit(FileLike entry) throws IOException {
        if (requiredInPrimaryZip.apply(entry.getRelativePath())) {
          primaryOut.putEntry(entry);
        }
      }
    });

    // Now that all of the required entries have been added to the primary zip, fill the rest of
    // the zip up with the remaining entries.
    classpathTraverser.traverse(new ClasspathTraversal(inFiles) {
      @Override
      public void visit(FileLike entry) throws IOException {
        if (primaryOut.containsEntry(entry)) {
          return;
        }

        // Even if we have started writing a secondary dex, we still check if there is any leftover
        // room in the primary dex for the current entry in the traversal.
        if (primaryOut.canPutEntry(entry)) {
          primaryOut.putEntry(entry);
        } else {
          secondaryDexWriter.getOutputToWriteTo(entry).putEntry(entry);
        }
      }
    });

    primaryOut.close();
    secondaryDexWriter.close();
    return secondaryDexWriter.getFiles();
  }

  private DalvikAwareOutputStreamHelper newZipOutput(File file) throws FileNotFoundException {
    return new DalvikAwareOutputStreamHelper(file, linearAllocLimit, reportDir, dalvikStatsCache);
  }

  private class MySecondaryDexHelper
      extends SecondaryDexHelper<DalvikAwareOutputStreamHelper> {

    MySecondaryDexHelper(
        File outSecondaryDir,
        String secondaryPattern,
        CanaryStrategy canaryStrategy) {
      super(outSecondaryDir, secondaryPattern, canaryStrategy);
    }

    @Override
    protected DalvikAwareOutputStreamHelper newZipOutput(File file) throws IOException {
      return DalvikAwareZipSplitter.this.newZipOutput(file);
    }
  }
}


text:
<?php declare(strict_types=1);

namespace PHPUnit\TestFixture;

interface InterfaceWithSemiReservedMethodName
{
    public function unset();
}


text:
Introduction
============

The GridBundle adds an entity called ``Grid``. This entity can be used to form a collection of different content
types like text fields, pictures or videos. This allows you to create resources with dynamic content that can still
be rendered in a consistent, orderly way.


text:
package com.beust.testng;

/**
 * For backward compatibility.
 *
 * Created on Jun 18, 2005
 * @author Cedric Beust
 * @deprecated Use org.testng.TestNG
 */
public class TestNG extends org.testng.TestNG {

}