text:
var platform = {};

if (typeof AppPreferencesLocalStorage === "undefined") {
	try {
		platform = require ('./platform');
	} catch (e) {
	}
} else {
	platform = new AppPreferencesLocalStorage ();
}

/**
 * @constructor
 */
function AppPreferences (defaultArgs) {
	this.defaultArgs = defaultArgs || {};
}

var promiseLib;
if (typeof Promise !== "undefined") {
	promiseLib = Promise;
} else if (typeof WinJS !== "undefined" && WinJS.Promise) {
	promiseLib = WinJS.Promise;
} else if (typeof $ !== "undefined" && $.Deferred) {
	promiseLib = function (init) {
		var d = $.Deferred ();
		init (d.resolve.bind (d), d.reject.bind (d));
		return d.promise ();
	}
}

function promiseCheck (maxArgs, successCallback, errorCallback) {
	if (
		typeof successCallback !== 'function' && typeof errorCallback !== 'function'
		&& arguments.length <= maxArgs + 1 // argCount
		&& promiseLib
	) {
		return true;
	} else {
		return false;
	}
}

if (!platform.nativeExec && typeof cordova !== "undefined")
	platform.nativeExec = cordova.exec.bind (cordova);

AppPreferences.prototype.prepareKey = platform.prepareKey || function (mode, dict, key, value) {

	var args = {};

	for (var k in this.defaultArgs) {
		args[k] = this.defaultArgs[k];
	}

	var argList = [].slice.apply(arguments);
	argList.shift();
	if (
		(mode == 'get' && argList.length == 1) ||
		(mode == 'get' && argList.length == 2 && argList[1] == null) ||
		(mode == 'set' && argList.length == 2) ||
		(mode == 'set' && argList.length == 3 && argList[2] == null)
	) {
		argList.unshift (undefined);
	}

	args.key = argList[1];

	if (argList[0] !== undefined)
		args.dict = argList[0]

	if (mode == 'set')
		args.value = argList[2];

	// console.log (JSON.stringify (argList), JSON.stringify (args));
	return args;
}

/**
 * Get a preference value
 *
 * @param {Function} successCallback The function to call when the value is available
 * @param {Function} errorCallback The function to call when value is unavailable
 * @param {String} dict Dictionary for key (OPTIONAL)
 * @param {String} key Key
 */
AppPreferences.prototype.fetch = platform.fetch || function (
	successCallback, errorCallback, dict, key
) {

	var argCount = 2; // dict, key
	var promise = promiseCheck.apply (this, [argCount].concat ([].slice.call(arguments)));
	// for promises
	if (promise) {
		dict = successCallback;
		key  = errorCallback;
	}

	var args = this.prepareKey ('get', dict, key);

	var _successCallback = function (_value) {
		var value = _value;
		try {
			value = JSON.parse (_value);
		} catch (e) {
		}
		successCallback (value);
	}

	var nativeExec = function (resolve, reject) {
		if (!args.key) {
			return reject ();
		}

		if (resolve !== successCallback) {
			successCallback = resolve;
		}

		if (platform.nativeFetch) {
			return platform.nativeFetch(_successCallback, reject, args);
		}
		return platform.nativeExec(_successCallback, reject, "AppPreferences", "fetch", [args]);
	}

	if (promise) {
		return new promiseLib (nativeExec);
	} else {
		nativeExec (successCallback, errorCallback);
	}

};

/**
 * Set a preference value
 *
 * @param {Function} successCallback The function to call when the value is set successfully
 * @param {Function} errorCallback The function to call when value is not set
 * @param {String} dict Dictionary for key (OPTIONAL)
 * @param {String} key Key
 * @param {String} value Value
 */
AppPreferences.prototype.store = platform.store || function (
	successCallback, errorCallback, dict, key, value
	) {

	var argCount = 3; // dict, key, value
	var promise = promiseCheck.apply (this, [argCount].concat ([].slice.call(arguments)));
	// for promises
	if (promise) {
		value = dict;
		key  = errorCallback;
		dict = successCallback;
	}

	var args = this.prepareKey ('set', dict, key, value);

	args.type  = typeof args.value;

	// VERY IMPORTANT THING
	// WP platform has some limitations, so we need to encode all values to JSON.
	// On plugin side we store value according to it's type.
	// So, every platform plugin must check for type, decode JSON and store
	// value decoded for basic types.
	// TODO: don't think about array of strings, it's android only.
	// Complex structures must be stored as JSON string.
	// On iOS strings stored as strings and JSON stored as NSData
	// Android:
	// Now, interesting thing: how to differentiate between string value
	// and complex value, encoded as json and stored as string?
	// I'm introduce setting named _<preference>_type with value "JSON"
	// Windows Phone ?
	args.value = JSON.stringify (args.value);

	var nativeExec = function (resolve, reject) {
		if (!args.key || args.value === null || args.value === undefined) {
			return reject ();
		}

		if (platform.nativeStore) {
			return platform.nativeStore (resolve, reject, args);
		}
		return platform.nativeExec (resolve, reject, "AppPreferences", "store", [args]);
	}

	if (promise) {
		return new promiseLib (nativeExec);
	} else {
		nativeExec (successCallback, errorCallback);
	}

};

/**
 * Remove value from preferences
 *
 * @param {Function} successCallback The function to call when the value is available
 * @param {Function} errorCallback The function to call when value is unavailable
 * @param {String} dict Dictionary for key (OPTIONAL)
 * @param {String} key Key
 */
AppPreferences.prototype.remove = platform.remove || function (
	successCallback, errorCallback, dict, key
) {

	var argCount = 2; // dict, key
	var promise = promiseCheck.apply (this, [argCount].concat ([].slice.call(arguments)));
	// for promises
	if (promise) {
		key  = errorCallback;
		dict = successCallback;
	}

	var args = this.prepareKey ('get', dict, key);

	var nativeExec = function (resolve, reject) {
		if (!args.key) {
			return reject ();
		}

		if (platform.nativeRemove) {
			return platform.nativeRemove (resolve, reject, args);
		}
		return platform.nativeExec (resolve, reject, "AppPreferences", "remove", [args]);
	}

	if (promise) {
		return new promiseLib (nativeExec);
	} else {
		nativeExec (successCallback, errorCallback);
	}

};

/**
 * Clear preferences
 *
 * @param {Function} successCallback The function to call when the value is available
 * @param {Function} errorCallback The function to call when value is unavailable
 * @param {String} dict Dictionary for key (OPTIONAL)
 * @param {String} key Key
 */
AppPreferences.prototype.clearAll = platform.clearAll || function (
	successCallback, errorCallback
) {

	var argCount = 0;
	var promise = promiseCheck.apply (this, [argCount].concat ([].slice.call(arguments)));

	var nativeExec = function (resolve, reject) {
		return platform.nativeExec (resolve, reject, "AppPreferences", "clearAll", []);
	}

	if (promise) {
		return new promiseLib (nativeExec);
	} else {
		nativeExec (successCallback, errorCallback);
	}

};

/**
 * Show native preferences interface
 *
 * @param {Function} successCallback The function to call when the value is available
 * @param {Function} errorCallback The function to call when value is unavailable
 * @param {String} dict Dictionary for key (OPTIONAL)
 * @param {String} key Key
 */
AppPreferences.prototype.show = platform.show || function (
successCallback, errorCallback
) {

	var argCount = 0;
	var promise = promiseCheck.apply (this, [argCount].concat ([].slice.call(arguments)));

	var nativeExec = function (resolve, reject) {
		return platform.nativeExec (resolve, reject, "AppPreferences", "show", []);
	}

	if (promise) {
		return new promiseLib (nativeExec);
	} else {
		nativeExec (successCallback, errorCallback);
	}
};

/**
 * Watch for preferences change
 *
 * @param {Function} successCallback The function to call when the value is available
 * @param {Function} errorCallback   The function to call when value is unavailable
 * @param {Boolean}  subscribe       true value to subscribe, false - unsubscribe
 * @example How to get notified:
 * ```javascript
 * plugins.appPreferences.watch();
 * document.addEventListener ('preferencesChanged', function (evt) {
 *     // with some platforms can give you details what is changed
 *     if (evt.key) {
 *         // handle key change
 *     } else if (evt.all) {
 *         // after clearAll
 *     }
 * });
 * ```
 */
AppPreferences.prototype.watch = platform.watch || function (
	successCallback, errorCallback
) {

	var nativeExec = function (resolve, reject) {
		return platform.nativeExec (resolve, reject, "AppPreferences", "watch", []);
	}

	nativeExec (successCallback, errorCallback);
};

/**
 * Return iOS Suite configuration context
 * @param   {String}         suiteName suite name
 * @returns {AppPreferences} AppPreferences object, bound to that suite
 */

AppPreferences.prototype.iosSuite = function (suiteName) {
	var appPrefsSuite = new AppPreferences ({iosSuiteName: suiteName});

	return appPrefsSuite;
}

// WIP: functions to bind selected preferences to the form

function setFormFields (formEl, fieldsData) {
	for (var i = 0; i < formEl.elements.length; i ++) {
		var formField = formEl.elements[i];
		if (!(formField.name in fieldsData)) {
			continue;
		}

		// TODO: multiple checkboxes value for one form field
		if (formField.type === 'radio' || formField.type === 'checkbox') {
			if (
				formField.value === fieldsData[formField.name]
				|| formField.value === fieldsData[formField.name].toString()
			) {
				formField.checked = true;
			}
		} else {
			formField.value = fieldsData[formField.name];
		}
	}
}

function bindFormToData (formEl, formData) {
	[].slice.apply (formEl.elements).forEach (function (el) {
		if (el.type.match (/^(?:radio|checkbox)$/)) {
			el.addEventListener ('change', getFormFields.bind (window, formEl, formData), false);
		} else {
			el.addEventListener ('input', getFormFields.bind (window, formEl, formData), false);
		}
	});
}

function getFormFields (formEl, formData) {
	formData = formData || {};
	for (var k in formData) {
		delete formData[k];
	}
	for (var i = 0; i < formEl.elements.length; i ++) {
		var formField = formEl.elements[i];
		var checkedType = formField.type.match (/^(?:radio|checkbox)$/);
		if ((checkedType && formField.checked) || !checkedType) {
			formData[formField.name] = formField.value;
		}
	}
	// console.log (formData);
	return formData;
}

if (typeof module !== "undefined") {
	module.exports = new AppPreferences();
}


text:
typedef struct EthernetSettings {
  uint8_t        eth_address;
  int            eth_power;
  int            eth_mdc;
  int            eth_mdio;
  eth_phy_type_t eth_type;
  eth_clock_mode_t eth_clk_mode;
} ethernet_settings;

extern const ethernet_settings ethernetBoards[];

#define WLED_ETH_RSVD_PINS_COUNT 6
extern const managed_pin_type esp32_nonconfigurable_ethernet_pins[WLED_ETH_RSVD_PINS_COUNT];
#endif

#endif

redpajama_set_name: RedPajamaGithub


text:
<!doctype html>

    <title>Thanks!</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/global.css">

Thanks for your interest!  I'll get back to you as soon as possible!

Click here to return to the homepage.


text:
<?php

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

require '../bootstrap.php';

use OndraKoupil\Testing\ArrayAccessTestObject;
use \Tester\Assert;
use \Tester\TestCase;

use OndraKoupil\Tools\Strings;

class StringsTestCase extends TestCase {

	function getPluralArgs() {
		return array(
			array(2, "2 dny"),
			array(1, "1 den"),
			array(6, "6 dnů"),
			array(0, "0 dnů")
		);
	}

	/**
	 * @dataProvider getPluralArgs
	 */
	function testPlural($arg, $expected) {

		Assert::equal( $expected, Strings::plural($arg, "%% den", "%% dny", "%% dnů") );

	}

	function testPluralSpecialZero() {

		Assert::equal( "nic", Strings::plural(0, "%% den", "%% dny", "%% dnů", "nic") );

		Assert::equal( "4 stavení", Strings::plural(4, "%% stavení") );
		Assert::equal( "6 staveních", Strings::plural(6, "%% stavení", "%% staveních") ); // ano, jsem buran

	}

	function testStrlen() {
		Assert::equal(16, Strings::strlen("Příliš žluťoučký"));
		Assert::equal(16, Strings::length("Příliš žluťoučký"));
	}

	function testLowerUpper() {
		Assert::equal("příliš", Strings::lower("Příliš"));
		Assert::equal("příliš", Strings::strToLower("Příliš"));
		Assert::equal("PŘÍLIŠ", Strings::upper("Příliš"));
		Assert::equal("PŘÍLIŠ", Strings::strToUpper("Příliš"));
	}

	function getSubstrArgs() {
		return array(
			array("čřž", 2, 3),
			array("ěš", 0, 2),
			array("řžý", 3),
			array("žý", -2),
			array("ěščř", 0, -2)
		);
	}

	/**
	 * @dataProvider getSubstrArgs
	 */
	function testSubstr($expected, $arg1, $arg2 = null) {
		$str = "ěščřžý";

		Assert::equal($expected, Strings::substr($str, $arg1, $arg2));
		Assert::equal($expected, Strings::substring($str, $arg1, $arg2));
	}

	function testContains() {
		Assert::true( Strings::contains("Psisko", "Psi") );
		Assert::true( Strings::contains("Psisko", "isk") );
		Assert::false( Strings::contains("Psisko", "SIs") );
		Assert::true( Strings::icontains("Psisko", "SIs") );
	}

	function testBr2nl() {
		Assert::equal("jeden\ndruhý", Strings::br2nl("jeden
druhý"));
		Assert::equal("jeden\ndruhý\ntřetí", Strings::br2nl("jeden
druhý
třetí"));
		Assert::equal("jeden\ndruhý\ntřetí", Strings::br2nl("jeden
druhý
třetí"));
		Assert::equal("", Strings::br2nl(null));
	}

	function testNl2br() {
		Assert::equal("jeden
druhý", Strings::nl2br("jeden\ndruhý"));
		Assert::equal("jeden
druhý
třetí", Strings::nl2br("jeden\ndruhý\r\ntřetí"));
	}

	function testShorten() {
		$str = "Jeďňó ďřúhé třetí čtvrté slovo";
		Assert::equal("Jeďňó ďřúhé", Strings::shorten($str, 13, ""));

		$str2 = "One two three four five six seven eight";
		Assert::equal("One two", Strings::shorten($str2, 7, ""));
		Assert::equal("One two", Strings::shorten($str2, 8, ""));
		Assert::equal("One two", Strings::shorten($str2, 9, ""));
		Assert::equal("One two", Strings::shorten($str2, 10, ""));
		Assert::equal("One two", Strings::shorten($str2, 11, ""));
		Assert::equal("One two", Strings::shorten($str2, 12, ""));
		Assert::equal("One two three", Strings::shorten($str2, 13, ""));
		Assert::equal("One two three", Strings::shorten($str2, 14, ""));
		Assert::equal("One two three", Strings::shorten($str2, 15, ""));
		Assert::equal("One two three", Strings::shorten($str2, 16, ""));
		Assert::equal("One two three", Strings::shorten($str2, 17, ""));
		Assert::equal("One two three four", Strings::shorten($str2, 19, ""));
		Assert::equal("One two three four", Strings::shorten($str2, 20, ""));

		$str3 = "A description of a cart item that is longer than 40 chars";
		Assert::equal("A description of a cart item that is lon", Strings::shorten($str3, 40, "", true, true));

		Assert::equal($str2, Strings::shorten($str2, 1000, "..."));

		Assert::equal("One twoxxx", Strings::shorten($str2, 7, "xxx"));

		$str3 = "One two three four";;
		Assert::equal("One two...", Strings::shorten($str3, 8, "..."));

		$str4 = " This is a sentence with whitespaces ";;
		Assert::equal("This is a sentence with whitespaces", Strings::shorten($str4, 100, "..."));

		$str5 = " This has some  whitespaces ";;
		Assert::equal("This has some", Strings::shorten($str5, 15, '', true, true));

	}

	function testReplaceEntities() {
		$str = "Lorem %a% %b% %c% %b %c ipsum !a!";

		$repl = Strings::replaceEntities($str, array("a" => "AAA", "c" => "CCC", "d" => "DDD"));
		Assert::equal("Lorem AAA %b% CCC %b %c ipsum !a!", $repl);

		$repl = Strings::replaceEntities($str, array("a" => "AAA", "c" => "CCC", "d" => "DDD"), null, "!");
		Assert::equal("Lorem %a% %b% %c% %b %c ipsum AAA", $repl);

		$str = "Lorem %a% %b% %c% %b %c ipsum !a!";
		$repl = Strings::replaceEntities($str, array("a" => null, "b "=>"BBB", "b" => "BXB", "d" => "DDD"), null, "%", '^%');
		Assert::equal("Lorem  BXB %c% BBBc ipsum !a!", $repl);

		$str = "Lorem %a% %b% %c%";

		$repl = Strings::replaceEntities($str, array("a" => "", "c" => ""), null);
		Assert::equal("Lorem  %b% ", $repl);

		$repl = Strings::replaceEntities($str, array("a" => "", "c" => ""));
		Assert::equal("Lorem <a> %b% </a>", $repl);

		$repl = Strings::replaceEntities($str, array("a" => 2.8, "c" => 10.4), "round");
		Assert::equal("Lorem 3 %b% 10", $repl);

	}

	function testReplaceEntitesWithObject() {

		$str = "Lořém %a% %b% %c% %b %c ipsum !a!";

		$arrayObject = new ArrayAccessTestObject(array('a' => 'bař', 'b' => 10));
		$repl = Strings::replaceEntities($str, $arrayObject);
		Assert::equal("Lořém bař 10 %c% %b %c ipsum !a!", $repl);

		$obj = new stdClass();
		$obj->a = 'fÁČo';
		$obj->c = 100;

		$repl = Strings::replaceEntities($str, $obj);
		Assert::equal("Lořém fÁČo %b% 100 %b %c ipsum !a!", $repl);

	}

	function testParsePhpNumber() {

		Assert::equal(100, Strings::parsePhpNumber(100));
		Assert::equal(100, Strings::parsePhpNumber("100"));
		Assert::equal(100.0, Strings::parsePhpNumber("100,0 "));
		Assert::equal(100.0, Strings::parsePhpNumber(" 100.0"));
		Assert::equal(1024, Strings::parsePhpNumber("1k"));
		Assert::equal(1024 * (-1.23), Strings::parsePhpNumber("-1,23k "));
		Assert::equal(1024, Strings::parsePhpNumber("1K"));
		Assert::equal(1024*1024*2.5, Strings::parsePhpNumber("2.5M"));
		Assert::equal(1024*1024*2.5, Strings::parsePhpNumber("2,5m "));
		Assert::equal(1024*1024*1024*5, Strings::parsePhpNumber("5G"));
		Assert::equal(1024*1024*1024*1024*8, Strings::parsePhpNumber(" 8T"));

		Assert::same(false, Strings::parsePhpNumber(" 8D"));
		Assert::same(false, Strings::parsePhpNumber(" FIJDFOA"));
		Assert::same(false, Strings::parsePhpNumber("1M4K"));

	}

	function testPhoneNumberFormatter() {

		$input = "721374431";
		Assert::equal( "+420721374431", Strings::phoneNumberFormatter($input) );
		Assert::equal( "+420 721 374 431", Strings::phoneNumberFormatter($input, true, true) );
		Assert::equal( "721 374 431", Strings::phoneNumberFormatter($input, false, true) );
		Assert::equal( "721374431", Strings::phoneNumberFormatter($input, false, false) );
		Assert::equal( "721-374-431", Strings::phoneNumberFormatter($input, false, "-") );
		Assert::equal( "+420/721/374/431", Strings::phoneNumberFormatter($input, true, "/") );
		Assert::equal( "420721374431", Strings::phoneNumberFormatter($input, true, false, "") );
		Assert::equal( "00420 721 374 431", Strings::phoneNumberFormatter($input, true, true, "00") );
		Assert::equal( "721 374 431", Strings::phoneNumberFormatter($input, false, true, "00") );
		Assert::equal( "+123 721 374 431", Strings::phoneNumberFormatter($input, true, true, "+", "123") );

		$input = "721/37 44 31";
		Assert::equal( "+420 721 374 431", Strings::phoneNumberFormatter($input, true, true) );
		Assert::equal( "721374431", Strings::phoneNumberFormatter($input, false, false) );
		Assert::equal( "721 374 431", Strings::phoneNumberFormatter($input, false, true) );

		$input = "27916";
		Assert::equal( "27 916", Strings::phoneNumberFormatter($input, false, true) );
		Assert::equal( "+42027916", Strings::phoneNumberFormatter($input, true, false) );

		$input = "+420721374431";
		Assert::equal( "721374431", Strings::phoneNumberFormatter($input, false, false) );
		Assert::equal( "721 374 431", Strings::phoneNumberFormatter($input, false, true) );
		Assert::equal( "+420 721 374 431", Strings::phoneNumberFormatter($input, true, true) );

		$input = "00420721374431";
		Assert::equal( "721374431", Strings::phoneNumberFormatter($input, false, false) );
		Assert::equal( "721 374 431", Strings::phoneNumberFormatter($input, false, true) );
		Assert::equal( "+00420 721 374 431", Strings::phoneNumberFormatter($input, true, true) );

		$input = "";
		Assert::equal( "", Strings::phoneNumberFormatter($input, false, false) );
		Assert::equal( "", Strings::phoneNumberFormatter($input, true, false) );
		Assert::equal( "", Strings::phoneNumberFormatter($input, true, true) );
		Assert::equal( "", Strings::phoneNumberFormatter($input, false, true) );

	}

	function testNumber() {

		Assert::same(110.3, Strings::number(" 110,3"));
		Assert::same(10, Strings::number(" nonsense", 10));
		Assert::same(10, Strings::number(" -10", 10, true));
		Assert::same(20, Strings::number(20));
		Assert::same(0, Strings::number(null));
		Assert::same(15, Strings::number(null, 15));
		Assert::same(20, Strings::number(array(10), 20));

	}

	function testNumberOnly() {
		Assert::same("10;20", Strings::numberOnly(" a10,20", ",", ";"));
	}

	function testFormatSize() {
		Assert::equal("1 B", Strings::formatSize(1));
		Assert::equal("1 kB", Strings::formatSize(1024));
		Assert::equal("1.5 kB", Strings::formatSize(1024 * 1.5));
		Assert::equal("1.9 kB", Strings::formatSize(1024 * 1.9));
		Assert::equal("2 kB", Strings::formatSize(1024 * 1.9, 0));
		Assert::equal("2 MB", Strings::formatSize(1024 * 1024 * 1.942, 0));
		Assert::equal("1.94 MB", Strings::formatSize(1024 * 1024 * 1.942, 2));
		Assert::equal("1.942 MB", Strings::formatSize(1024 * 1024 * 1.942, 3));
		Assert::equal("1.95 MB", Strings::formatSize(1024 * 1024 * 1.948, 2));
		Assert::equal("1.26 GB", Strings::formatSize(1024 * 1024 * 1024 * 1.256, 2));
		Assert::equal("100 TB", Strings::formatSize(1024 * 1024 * 1024 * 1024 * 100, 2));
	}

	function testToAscii() {
		Assert::equal("ZlutoUCKy kun!", Strings::toAscii("ŽluťoUČKý kůň!"));
	}

	function testWebalize() {
		Assert::equal("zlutoucky-kun", Strings::webalize("ŽluťoUČKý kůň!"));
		Assert::equal("ZlutoUCKy-kun", Strings::webalize("ŽluťoUČKý kůň!", null, false));

		Assert::equal("zlutoucky-kun", Strings::webalize("ŽluťoUČKý, !-? kůň!"));

		Assert::equal("zlutoucky-kun", Strings::webalize("ŽluťoUČKý. kůň!"));
		Assert::equal("zlutoucky{-kun!", Strings::webalize("ŽluťoUČKý{,* kůň!,", "!{"));
	}

	function testSafe() {
		Assert::equal("zlutoucky-kun.jpg", Strings::safe("žluťoučký kůň.jpg", true));
		Assert::equal("zlutoucky-kun-jpg", Strings::safe("žluťoučký kůň.jpg", false));
	}

	function testSpecChars() {
		$input = "Toto je tučně & hezky";
		Assert::equal("Toto <b style='url:("some")'>je tučně & hezky", Strings::specChars($input));
	}

	function testRandomString() {
		$str = Strings::randomString(23);
		Assert::same(23, strlen($str));
		Assert::same(preg_match('~^[0-9A-Za-z]{23}$~', $str), 1);

		$str = Strings::randomString(57, true);
		Assert::same(57, strlen($str));
		Assert::same(preg_match('~^[0-9a-z]{57}$~', $str), 1);

		$str = Strings::randomString(1, false);
		Assert::same(1, strlen($str));
		Assert::same(preg_match('~^[0-9a-zA-Z]$~', $str), 1);

		$str = Strings::randomString(2, false);
		Assert::same(2, strlen($str));
		Assert::same(preg_match('~^[0-9a-zA-Z]{2}$~', $str), 1);

	}

	function testExcelToNumber() {

		Assert::same(0, Strings::excelToNumber('a'));
		Assert::same(4, Strings::excelToNumber('e'));
		Assert::same(5, Strings::excelToNumber(' F '));
		Assert::same(26, Strings::excelToNumber('aA'));
		Assert::same(28, Strings::excelToNumber('aC'));
		Assert::same(89, Strings::excelToNumber('CL'));
		Assert::same(962, Strings::excelToNumber('AKA'));

	}

}

$case = new StringsTestCase();
$case->run();


text:
package com.voyage.service.google.map;

import java.util.List;

public class Geometry {

    private Location location;

    private List<String> types;

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    public List<String> getTypes() {
        return types;
    }

    public void setTypes(List<String> types) {
        this.types = types;
    }

}


text:
@interface FlyingSelectPersonTableViewCell : UITableViewCell

@property (weak, nonatomic) IBOutlet UIImageView *ivSelected;
@property (weak, nonatomic) IBOutlet UIImageView *ivAva;
@property (weak, nonatomic) IBOutlet UILabel *lblName;

+ (FlyingSelectPersonTableViewCell*) selectPersonCell;

-(void)settingWithContentData:(RCUserInfo*) userInfo;

@end


text:
.class public Landroid/net/wifi/WifiConfiguration$GroupCipher;
.super Ljava/lang/Object;
.source "WifiConfiguration.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/net/wifi/WifiConfiguration;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "GroupCipher"
.end annotation

# static fields
.field public static final CCMP:I = 0x3

.field public static final TKIP:I = 0x2

.field public static final WEP104:I = 0x1

.field public static final WEP40:I = 0x0

.field public static final strings:[Ljava/lang/String; = null

.field public static final varName:Ljava/lang/String; = "group"

# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    .line 238
    const/4 v0, 0x4

    new-array v0, v0, [Ljava/lang/String;

    const/4 v1, 0x0

    const-string v2, "WEP40"

    aput-object v2, v0, v1

    const/4 v1, 0x1

    const-string v2, "WEP104"

    aput-object v2, v0, v1

    const/4 v1, 0x2

    const-string v2, "TKIP"

    aput-object v2, v0, v1

    const/4 v1, 0x3

    const-string v2, "CCMP"

    aput-object v2, v0, v1

    sput-object v0, Landroid/net/wifi/WifiConfiguration$GroupCipher;->strings:[Ljava/lang/String;

    return-void
.end method

.method private constructor <init>()V
    .locals 0

    .prologue
    .line 225
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


text:
title: TunlrControl 1.0.0.8 ist da!
eyecatch: fa-download
slug: tunlrcontrol-8
description: "TunlrControl 1.0.0.8 ist da!"
date: 2012-04-04T08:00:00
tags: [code, tunlr, tunlrcontrol]
---

Ich habe das Programm überarbeitet.

Was ist neu?

Nun kann jeder, egal ob er über W-LAN, LAN, WebStick oder sonst
irgendetwas online geht TunlrContorl nutzen!

Schaut auf der Programm-Seite vorbei: [TunlrControl 1.0.0.8](http://wedevelop.de/software/tunlrControl/publish.htm)


text:
Rails Locale Data Repository
============================

[![Build Status](https://secure.travis-ci.org/svenfuchs/rails-i18n.png)](http://travis-ci.org/svenfuchs/rails-i18n)

Central point to collect locale data for use in Ruby on Rails.

## Gem installation

Add to your Gemfile:

    gem 'rails-i18n'

or run this command:

    gem install rails-i18n

Note that your rails version must be 3.0 or higher if you want to install `rails-i18n` as a gem. For rails 2.x, install it manually as described below.

## Configuration

By default `rails-i18n` loads all locale files, pluralization and
transliteration rules available in the gem. This behaviour can be changed, if you
specify in `config/environments/*` the locales which have to be loaded via
`I18n.available_locales` option:

    config.i18n.available_locales = ['es-CO', :de]

or

    config.i18n.available_locales = :nl

## Manual installation

Download the locale files that are found in the directory [rails/locale](http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale/) and put them into the `config/locales` directory of your Rails application.

If any translation doesn't suit well to the requirements of your application, edit them or add your own locale files.

For more information, visit [Rails Internationalization (I18n) API](http://guides.rubyonrails.org/i18n.html) on the _RailsGuides._

## Usage on Rails 2.3

Locale data whose structure is compatible with Rails 2.3 are available on the separate branch [rails-2-3](https://github.com/svenfuchs/rails-i18n/tree/rails-2-3).

## Available Locales

Available locales are:

> ar, az, bg, bn-IN, bs, ca, cs, csb, cy, da, de, de-AT, de-CH, dsb, el, en-AU, en-CA, en-GB, en-IN, en-US, eo,
> es, es-AR, es-CL, es-CO, es-MX, es-PE, et, eu, fa, fi, fr, fr-CA, fr-CH, fur, gl-ES,
> gsw-CH, he, hi, hi-IN, hr, hsb, hu, id, is, it, ja, kn, ko, lo, lt, lv, mk, mn, nb,
> nl, nn, pl, pt-BR, pt-PT, rm, ro, ru, sk, sl, sr, sr-Latn, sv-SE, sw, th,
> tl, tr, uk, vi, wo, zh-CN, zh-TW

Following locales are complete:

> az, bg, bs, ca, csb, da, de, de-AT, de-CH, el, en-AU, en-CA, en-GB, en-IN, en-US, eo, es, es-AR, es-CL, es-CO, es-MX, et,
> eu, fa, fi, fr, fr-CA, fr-CH, fur, gsw-CH, he, hi, hi-IN, hr, hu, is, it, ja, kn, ko, lv, mn, nb,
> nl, pt-BR, pt-PT, ru, sk, sv-SE, sw, th, tl, uk, vi, wo, zh-CN, zh-TW

Following locales have some missing translations or pluralizations:

> ar, bn-IN, cs, cy, dsb, es-PE, gl-ES, hsb, id, lo, lt, mk, nn, pl, rm, ro, sl, sr, sr-Latn, tr

We always welcome your contributions!

## How to contribute

### Quick contribution

If you are familiar with GitHub operations, follow the procedures described in the subsequent sections.

If you are not,

* Save your locale data on the [Gist](http://gist.github.com).
* Open an issue with reference to the Gist you created.

### Fetch the `rails-18n` repository

* Get a github account and Git program if you haven't. See [Help.Github](http://help.github.com/) for instructions.
* Fork `svenfuchs/rails-i18n` repository and clone it into your PC.

### Create or edit your locale file

* Have a look in `rails/locale/en-US.yml`, which can be used as the base of your translation.
  Note that we use `&errors_messages` and `<<: *errors_messages` to anchor and merge a part of translation data.
* Create or edit your locale file.
  Please pay attention to save your files as UTF-8.

### Test your locale file

Before committing and pushing your changes, test the integrity of your locale file.

    rake spec

Make sure you have included all translations with:

    rake i18n-spec:completeness rails/locale/en-US.yml rails/locale/YOUR_NEW_LOCALE.yml

You can list all complete locales:

    thor locales:complete

Also, you can list all available locales:

    thor locales:list

### Edit README.md

Add your locale name to the list in `README.md` if it isn't there.

### Send pull request

If you are ready, push the repository into the Github and send us a pull request.

We will do the formality check and publish it as quick as we can.

## See also

* [devise-i18n](https://github.com/tigrish/devise-i18n)
* [will-paginate-i18n](https://github.com/tigrish/will-paginate-i18n)
* [i18n-country-translation](https://github.com/onomojo/i18n-country-translations) for translations of country names

## License

[MIT](https://github.com/svenfuchs/rails-i18n/blob/master/MIT-LICENSE.txt)

## Contributors

See [https://github.com/svenfuchs/rails-i18n/contributors](https://github.com/svenfuchs/rails-i18n/contributors)

## Special thanks

[Tsutomu Kuroda](https://github.com/kuroda) for untiringly taking care of this repository, issues and pull requests


text:
// Import the interface to Tessel hardware
var http = require('http');

var statusCode = 200;
var count = 1;

/* the wifi-cc3000 library is bundled in with Tessel's firmware,
 * so there's no need for an npm install. It's similar
 * to how require('tessel') works.
 */
var wifi = require('wifi-cc3000');
var network = 'NETGEAR03'; // put in your network name here
var pass = 'magicalsocks271'; // put in your password here, or leave blank for unsecured
var security = 'wpa2'; // other options are 'wep', 'wpa', or 'unsecured'
var timeouts = 0;

function connect(){
  wifi.connect({
    security: security
    , ssid: network
    , password: pass
    , timeout: 30 // in seconds
  });
}

connect();

wifi.on('connect', function(data){
  // you're connected
  console.log("connect emitted", data);
});

wifi.on('disconnect', function(data){
  // wifi dropped, probably want to call connect() again
  console.log("disconnect emitted", data);
    connect();
})

wifi.on('timeout', function(err){
  // tried to connect but couldn't, retry
  console.log("timeout emitted");
  timeouts++;
  if (timeouts > 2) {
    // reset the wifi chip if we've timed out too many times
    powerCycle();
  } else {
    // try to reconnect
    connect();
  }
});

wifi.on('error', function(err){
  // one of the following happened
  // 1. tried to disconnect while not connected
  // 2. tried to disconnect while in the middle of trying to connect
  // 3. tried to initialize a connection without first waiting for a timeout or a disconnect
  console.log("error emitted", err);
});

// reset the wifi chip progammatically
function powerCycle(){
  // when the wifi chip resets, it will automatically try to reconnect
  // to the last saved network
  wifi.reset(function(){
    timeouts = 0; // reset timeouts
    console.log("done power cycling");
    // give it some time to auto reconnect
    setTimeout(function(){
      if (!wifi.isConnected()) {
        // try to reconnect
        connect();
      }
      }, 20 *1000); // 20 second wait
  })
}


text:
// Copyright 2014, Yahoo! Inc.
// Copyrights licensed under the Mit License. See the accompanying LICENSE file for terms.

var AbstractServer = require('../abstractServer');

var path = require('path');
var os = require('os');
var fs = require('fs');
var child_process = require('child_process');
var _ = require('underscore');

var Promise = require('promise');
var selenium = require('selenium-server-standalone-jar');

/**
 * @class SeleniumServer
 * @extends AbstractServer
 *
 * @param {object} [options]
 * @param {string} [options.javaPath]
 * @param {int} [options.port=9517]
 * @param {string} [options.logPath]
 * @constructor
 *
 * @property {Process} _childProcess
 */
var SeleniumServer = AbstractServer.extend(

	{
		/**
		 * Initializes the instance
		 *
		 * @method initialize
		 */
		initialize: function () {
			this.__super();

			this._childProcess = null;

			this.getConfiguration().javaPath = this.getJavaPath() || this._findJava();
			this.getConfiguration().port = this.getPort() || 9518;
			this.getConfiguration().logPath = this.getLogPath() || path.join(os.tmpdir(), 'preceptor_selenium.log');
		},

		/**
		 * Finds an installed java instance
		 *
		 * @method _findJava
		 * @return {string}
		 * @private
		 */
		_findJava: function () {

			var javaPath = '',
				javaHome = process.env.JAVA_HOME;

			if (javaHome) {
				javaPath = path.resolve(path.join(javaHome, 'bin', 'java'));
			}

			if (!fs.existsSync(javaPath)) {
				javaPath = '/usr/bin/java';
			}

			if (!fs.existsSync(javaPath)) {
				throw new Error('Cannot find the java binary. Please set the JAVA_HOME environment variable, or install java into /usr/bin/java.');
			}

			return javaPath;
		},

		/**
		 * Gets the path to the java binary
		 *
		 * @method getJavaPath
		 * @return {string}
		 */
		getJavaPath: function () {
			return this.getConfiguration().javaPath;
		},

		/**
		 * Gets the port of the server
		 *
		 * @method getPort
		 * @return {int}
		 */
		getPort: function () {
			return this.getConfiguration().port;
		},

		/**
		 * Gets the path to the log file
		 *
		 * @method getLogPath
		 * @return {string}
		 */
		getLogPath: function () {
			return this.getConfiguration().logPath;
		},

		/**
		 * Gets the additional params
		 *
		 * @method getParams
		 * @return {string[]}
		 */
		getParams: function () {
			return this.getConfiguration().params;
		},

		/**
		 * Startup driver
		 *
		 * @method setup
		 * @param {object} capabilities
		 * @return {Promise}
		 */
		setup: function (capabilities) {

			if (!this._childProcess) {
				var javaPath = this.getJavaPath(),
					seleniumPath = selenium.path,
					additionalParams = this.getParams(),
					params = ["-jar", seleniumPath, "-port", this.getPort(), "-log", this.getLogPath()];

				if (additionalParams) {
					if (_.isArray(additionalParams)) {
						params = params.concat(additionalParams);
					} else {
						throw new Error('Parameter list is not an array.');
					}
				}

				this._childProcess = child_process.execFile(javaPath, params);
			}

			return new Promise(function (resolve, reject) {
				setTimeout(function () { //TODO: Use wait for server
					resolve();
				}, 5000);
			});
		},

		/**
		 * Shutdown driver
		 *
		 * @method tearDown
		 * @return {Promise}
		 */
		tearDown: function () {

			if (this._childProcess) {
				this._childProcess.kill();
				this._childProcess = null;
			}

			return new Promise(function (resolve, reject) {
				setTimeout(function () { //TODO: Use wait for server
					resolve();
				}, 2000);
			});
		},

		/**
		 * Gets the url to the web-driver instance
		 *
		 * @method getUrl
		 * @return {string}
		 */
		getUrl: function () {
			return "http://127.0.0.1:" + this.getPort() + "/wd/hub";
		},

		/**
		 * Augmenting capabilities supplied to the driver
		 *
		 * @method augmentCapabilities
		 * @param {object} capabilities
		 * @return {object}
		 */
		augmentCapabilities: function (capabilities) {
			return capabilities;
		}
	});

module.exports = SeleniumServer;


text:
package org.apache.http.HC4.cookie;

import org.apache.http.cookie.Cookie;

/**
 * ClientCookie extends the standard {@link Cookie} interface with
 * additional client specific functionality such ability to retrieve
 * original cookie attributes exactly as they were specified by the
 * origin server. This is important for generating the {@code Cookie}
 * header because some cookie specifications require that the
 * {@code Cookie} header should include certain attributes only if
 * they were specified in the {@code Set-Cookie} header.
 *
 *
 * @since 4.0
 */
public interface ClientCookie extends Cookie {

    // RFC2109 attributes
    public static final String VERSION_ATTR    = "version";
    public static final String PATH_ATTR       = "path";
    public static final String DOMAIN_ATTR     = "domain";
    public static final String MAX_AGE_ATTR    = "max-age";
    public static final String SECURE_ATTR     = "secure";
    public static final String COMMENT_ATTR    = "comment";
    public static final String EXPIRES_ATTR    = "expires";

    // RFC2965 attributes
    public static final String PORT_ATTR       = "port";
    public static final String COMMENTURL_ATTR = "commenturl";
    public static final String DISCARD_ATTR    = "discard";

    String getAttribute(String name);

    boolean containsAttribute(String name);

}


text:
GArray *
app_net_params_new (void);

void
app_net_params_free (GArray *arr);

void
app_net_params_add_string (GArray *arr, const gchar *name, const gchar *value);

void
app_net_params_add_int64 (GArray *arr, const gchar *name, gint64 value);

gchar*
app_net_params_format (const GArray *arr, gboolean query_string);

#endif


text:
require "appsendr/version"
require "json"
require "rest-client"

module Appsendr
  class App
    API_BASE_URL = "https://api.appsendr.com"

    def self.create(file,icon=nil,identifier=nil)
      #File.new("test.apk", 'rb')

      params = {:app_data => file, :multipart => true}
      params[:icon] = icon if icon
      params[:identifier] = identifier if identifier

      begin
        response = RestClient.post _url("new"), params
        return JSON.parse response.to_str
      rescue => e
        return JSON.parse e.response unless e.response.empty?
      end
    end

    def self.destroy(id, token)
      params = {"token" => token}

      begin
        response = RestClient.delete _url(id, params)

        return (response.code == 204)
      rescue => e
        return false
      end
    end

    def self.details(id)
      begin
        response = RestClient.get _url(id)
        return JSON.parse response.to_str
      rescue => e
        return JSON.parse e.response
      end
    end

    private

    def self._url(path, params=nil)
      if params
        querystring = params.map{|k,v| "#{CGI.escape(k)}=#{CGI.escape(v)}"}.join("&")

        "#{API_BASE_URL}/v1/app/#{path}?#{querystring}"
      else
        "#{API_BASE_URL}/v1/app/#{path}"
      end

    end
  end

end


text:
package org.rapid7.nexpose.api.generators;

import org.w3c.dom.Element;
import org.rapid7.nexpose.utils.StringUtils;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;

/**
 * Represents ReportBaselineGenerator associated with the Report save.
 *
 * @author Murali Rongali
 */
public class ReportBaselineGenerator  implements IContentGenerator
{

   // ///////////////////////////////////////////////////////////////////////
   // Public methods
   // ///////////////////////////////////////////////////////////////////////
   /**
    * Constructs a new ReportBaselineGenerator object.
    *
    * @param compareTo a baseline string that needs to compare to.
    */
   public ReportBaselineGenerator(String compareTo)
   {
      m_compareTo = compareTo;
   }

   /**
    * Constructs a new ReportBaselineGenerator object.
    */
   public ReportBaselineGenerator()
   {
      m_compareTo = null;
   }

   @Override
   public String toString()
   {
      StringBuilder sb = new StringBuilder();
      if(m_compareTo != null) {
         sb.append("<Baseline compareTo=\"");
         sb.append(StringUtils.xmlEscape(m_compareTo));
         sb.append("\"/>");
      }
      return sb.toString();
   }

   @Override
   public void setContents(Element contents)
   {
      try
      {
         final Element elementOrganization = (Element) XPathFactory.newInstance().newXPath().evaluate("Baseline", contents,
            XPathConstants.NODE);
         String m_compareTo = elementOrganization.getAttribute("compareTo");
      }
      catch (XPathExpressionException e)
      {
         System.out.println("Could not parse the generator for ReportBaselineGenerator: " + e.toString());
         throw new RuntimeException("The Generate could not be generated: " + e.toString());
      }
   }

   /**
    * Gets the compareTo value for Baseline element in ReportSave.
    */
   public String getCompareTo()
   {
      return m_compareTo;
   }

   /**
    * Sets the compareTo value.
    *
    * @param compareTo the compareTo value for Baseline element in ReportSave.
    */
   public void setCompareTo(String compareTo)
   {
      m_compareTo = compareTo;
   }

   /////////////////////////////////////////////////////////////////////////
   // non-Public fields
   /////////////////////////////////////////////////////////////////////////

   // The string value for compareTo.
   private String m_compareTo;
}


text:
package exercice1;

public class GroupOfStudent {

	private Students[] students;
	private final String name;

	public GroupOfStudent(int size, String name) {
		students = new Students[size];
		this.name=name;
	}

	public Students getStudent(String name) {
		if(name==null) {
			return null;
		}
		int i=0;
		while(i<this.students.length) {
			if(this.students[i].equals(name)) {
				return this.students[i];
			}
		}
		return null;
	}

	public float getAverage(){
		float sum = 0;
		int nbStudents = 0;
		for(int i=0;i<students.length;i++){
			if(students[i]!=null){
				nbStudents++;
				sum+=students[i].getAge();
			}

		}
		if(nbStudents==0){
			return 0;
		}
		return sum/nbStudents;
	}

	public boolean addStudent(Students Std){
		for(int i=0;i<students.length;i++){
			if(students[i]==null){
				students[i]=Std;
				return true;
			}
		}
		return false;
	}

	public GroupOfStudent getStudents(int age) {
		int size=0;
		int i=0;
		while(students[i]!=null) {
			if(students[i].getAge()==age) {
				size++;
				i++;
			}
		}

		GroupOfStudent group = new GroupOfStudent(size,"Same age");
		i=0;
		while(i<students.length && students[i]!=null) {
			if(students[i].getAge()==age) {
				group.addStudent(students[i]);
				i++;
			}
		}
		return group;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
	xsi:schemaLocation="http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
	<!--
		Copyright 2006-2009 The Kuali Foundation Licensed under the
		Educational Community License, Version 2.0 (the "License"); you may
		not use this file except in compliance with the License. You may
		obtain a copy of the License at
		http://www.opensource.org/licenses/ecl2.php Unless required by
		applicable law or agreed to in writing, software distributed under the
		License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
		CONDITIONS OF ANY KIND, either express or implied. See the License for
		the specific language governing permissions and limitations under the
		License.
	-->
	<bean id="TravelPerDiem" parent="TravelPerDiem-parentBean" />

	<bean id="TravelPerDiem-parentBean" abstract="true" parent="BusinessObjectEntry">
		<property name="businessObjectClass"
			value="org.kuali.kfs.fp.businessobject.TravelPerDiem" />
		<property name="inquiryDefinition">
			<ref bean="TravelPerDiem-inquiryDefinition" />
		</property>
		<property name="lookupDefinition">
			<ref bean="TravelPerDiem-lookupDefinition" />
		</property>
		<property name="titleAttribute" value="perDiemCountryName" />
		<property name="objectLabel" value="Disbursement Voucher Travel Per Diem" />
		<property name="attributes">
			<list>
				<ref bean="TravelPerDiem-universityFiscalYear" />
				<ref bean="TravelPerDiem-perDiemCountryName" />
				<ref bean="TravelPerDiem-perDiemCountryText" />
			</list>
		</property>
	</bean>

	<!-- Attribute Definitions -->

	<bean id="TravelPerDiem-universityFiscalYear" parent="TravelPerDiem-universityFiscalYear-parentBean" />

	<bean id="TravelPerDiem-universityFiscalYear-parentBean" abstract="true"
		parent="AttributeDefinition">
		<property name="name" value="universityFiscalYear" />
		<property name="forceUppercase" value="true" />
		<property name="label" value="Fiscal Year" />
		<property name="shortLabel" value="Year" />
		<property name="maxLength" value="4" />
		<property name="validationPattern">
			<ref bean="NumericValidation" />
		</property>
		<property name="control">
			<ref bean="FourCharacterTextControl" />
		</property>
	</bean>
	<bean id="TravelPerDiem-perDiemCountryName" parent="TravelPerDiem-perDiemCountryName-parentBean" />

	<bean id="TravelPerDiem-perDiemCountryName-parentBean" abstract="true"
		parent="AttributeDefinition">
		<property name="name" value="perDiemCountryName" />
		<property name="forceUppercase" value="true" />
		<property name="label" value="Per Diem Category/Country Name" />
		<property name="shortLabel" value="Name" />
		<property name="maxLength" value="50" />
		<property name="control">
			<ref bean="TenCharacterTextControl" />
		</property>
	</bean>
	<bean id="TravelPerDiem-perDiemCountryText" parent="TravelPerDiem-perDiemCountryText-parentBean" />

	<bean id="TravelPerDiem-perDiemCountryText-parentBean" abstract="true"
		parent="AttributeDefinition">
		<property name="name" value="perDiemCountryText" />
		<property name="label" value="Per Diem Category/Country URL" />
		<property name="shortLabel" value="URL" />
		<property name="maxLength" value="255" />
		<property name="control">
			<bean parent="TextControlDefinition" p:size="75" />
		</property>
	</bean>

	<!-- Business Object Inquiry Definition -->

	<bean id="TravelPerDiem-inquiryDefinition" parent="TravelPerDiem-inquiryDefinition-parentBean" />

	<bean id="TravelPerDiem-inquiryDefinition-parentBean" abstract="true"
		parent="InquiryDefinition">
		<property name="title" value="Disbursement Voucher Travel Per Diem Inquiry" />
		<property name="inquirySections">
			<list>
				<ref bean="TravelPerDiem-inquirySectionDefinition" />
			</list>
		</property>
	</bean>
	<bean id="TravelPerDiem-inquirySectionDefinition" parent="TravelPerDiem-inquirySectionDefinition-parentBean" />
	<bean id="TravelPerDiem-inquirySectionDefinition-parentBean"
		parent="InquirySectionDefinition" abstract="true">
		<property name="title" value="" />
		<property name="numberOfColumns" value="1" />
		<property name="inquiryFields">
			<list>
				<bean parent="FieldDefinition" p:attributeName="universityFiscalYear" />
				<bean parent="FieldDefinition" p:attributeName="perDiemCountryName" />
				<bean parent="FieldDefinition" p:attributeName="perDiemCountryText" />
			</list>
		</property>
	</bean>

	<!-- Business Object Lookup Definition -->

	<bean id="TravelPerDiem-lookupDefinition" parent="TravelPerDiem-lookupDefinition-parentBean" />

	<bean id="TravelPerDiem-lookupDefinition-parentBean" abstract="true"
		parent="LookupDefinition">
		<property name="title" value="Disbursement Voucher Travel Per Diem Lookup" />

		<property name="defaultSort">
			<bean parent="SortDefinition">
				<property name="attributeNames">
					<list>
						<value>perDiemCountryName</value>
					</list>
				</property>
			</bean>
		</property>
		<property name="lookupFields">
			<list>
				<bean parent="FieldDefinition" p:attributeName="universityFiscalYear"
					p:defaultValueFinderClass="org.kuali.kfs.sys.businessobject.defaultvalue.FiscalYearFinder" />
				<bean parent="FieldDefinition" p:attributeName="perDiemCountryName" />
			</list>
		</property>
		<property name="resultFields">
			<list>
				<bean parent="FieldDefinition" p:attributeName="universityFiscalYear" />
				<bean parent="FieldDefinition" p:attributeName="perDiemCountryName" />
				<bean parent="FieldDefinition" p:attributeName="perDiemCountryText" />
			</list>
		</property>
	</bean>
</beans>


text:
import React from 'react';
import ShowVeggies from './ShowVeggies';

class App extends React.Component {

  constructor() {
    super();
    this.state = {things: []};
  }

  componentDidMount() {
    fetch('api/things')
      .then(result => result.json())
      .then(things => this.setState({things: things}));
  }

  render() {
    return (
      <div>
        render your components here.
      </div>
    );
  }
}

export default App;


text:
import { SET_LAT_LON, SET_FORMATTED } from '../Reducers/location';

/**
 * Set location
 */

export const setLocation = (latitude, longitude) => ({
  type: SET_LAT_LON,
  latitude,
  longitude,
});

export const setFormatted = formatted => ({
  type: SET_FORMATTED,
  formatted,
});


text:
using namespace LongHaulTestApp;
using namespace xbox::services::social::manager;

GameData::GameData() :
    m_appState(APP_IN_GAME),
    m_gameState(GAME_PLAY),
    m_heartbeatTimer(0.0f),
    m_userSelectedIndex(0),
    m_activitySelectedIndex(0)
{
}

GAMESTATE GameData::GetGameState()
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    return m_gameState;
}

APPSTATE GameData::GetAppState()
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    return m_appState;
}

void GameData::SetGameState(GAMESTATE gameState)
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    m_gameState = gameState;
}

void GameData::SetState( APPSTATE appState, GAMESTATE gameState )
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    m_appState = appState;
    m_gameState = gameState;
}

void GameData::SetStateResetCritical( APPSTATE appState, GAMESTATE gameState )
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);

    m_appState = appState;
    m_gameState = gameState;
}

void GameData::SetDisplayString( HRESULT hr, Platform::String^ text )
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    if( hr != S_OK )
    {
        m_displayString = text + Utils::GetErrorString(hr);
    }
    else
    {
        m_displayString = text;
    }
}

Platform::String^ GameData::GetDisplayString()
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    return m_displayString;
}

INT GameData::GetViewSelectedIndex()
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    return m_selectedIndex;
}

size_t GameData::GetActivitySelectedIndex()
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    return m_activitySelectedIndex;
}

void GameData::SetActivitySelectedIndex( size_t newIndex )
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    m_activitySelectedIndex = newIndex;
}

void GameData::SetViewSelectedIndex(INT newIndex)
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    m_selectedIndex = newIndex;
}

float GameData::GetViewGameDataOffsetX()
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    return m_currentGameViewOffsetX;
}

void GameData::SetViewGameDataOffsetX(float targetX)
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    m_currentGameViewOffsetX = targetX;
}

float GameData::GetViewDebugOutputOffsetX()
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    return m_currentDebugOutputOffsetX;
}

void GameData::SetViewDebugOutputOffsetX(float targetX)
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    m_currentDebugOutputOffsetX = targetX;
}

float GameData::GetViewCurrentCountersOffsetY()
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    return m_currentCountersOffsetY;
}

void GameData::SetViewCurrentCountersOffsetY(float targetY)
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    m_currentCountersOffsetY = targetY;
}

bool GameData::GetViewDebug()
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    return m_viewDebug;
}

void GameData::SetViewDebug(bool viewDebug)
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    m_viewDebug = viewDebug;
}

UINT GameData::GetUserSelectedIndex()
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    return m_userSelectedIndex;
}

void GameData::SetUserSelectedIndex( UINT newIndex )
{
    Concurrency::critical_section::scoped_lock lock(m_stateLock);
    m_userSelectedIndex = newIndex;
}


text:
layout: page
title: Ryan - Morton Wedding
date: 2016-05-24
author: Cynthia Frederick
tags: weekly links, java
status: published
summary: In ac ex diam. Suspendisse.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 02/01/2019
  endDate: 02/03/2019
  ctyhocn: BGMOWHX
  groupCode: RMW
published: true
---
Quisque vehicula erat sed massa fringilla, eget luctus metus dapibus. Mauris eget finibus metus. Nam tempor ornare nunc id vulputate. Donec non massa volutpat, lobortis sapien laoreet, aliquet leo. Sed tempus id felis eget vulputate. Maecenas sed nibh lobortis, molestie purus at, consequat est. Sed pharetra massa ac lorem elementum ultricies eu sit amet velit. Vestibulum mauris lorem, varius sit amet lobortis ac, ultricies vel nisl.
Donec vitae convallis enim. Suspendisse eu ante a purus malesuada lacinia ut eu felis. Vivamus dignissim placerat condimentum. Cras purus arcu, placerat in interdum et, ultricies feugiat dolor. Aliquam facilisis diam odio, non auctor elit congue vel. Morbi in ullamcorper leo. Duis pretium justo velit. Proin tempor felis ut diam pulvinar sagittis. Praesent sed eleifend urna. Integer bibendum arcu et justo iaculis tempor. Cras aliquam finibus pharetra. Donec vitae turpis placerat, luctus ipsum non, lacinia ligula. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam luctus, urna sit amet consequat accumsan, magna urna rutrum ipsum, id dapibus mi erat a erat. Nulla felis felis, iaculis et neque ac, iaculis volutpat augue. Donec rhoncus nibh nec mauris sodales hendrerit.

* Vestibulum vitae magna rutrum eros imperdiet scelerisque
* Etiam vel quam ac urna ultrices semper mattis at ex
* Vestibulum in eros vel ligula finibus luctus
* Morbi commodo dui a urna vulputate dignissim
* Sed consectetur elit ornare, tristique justo et, rutrum ex
* Cras interdum neque eget libero dapibus finibus.

In at nulla orci. Aliquam erat volutpat. Donec vestibulum lobortis metus vel auctor. In vel ipsum non dolor fermentum sollicitudin ac nec diam. Ut imperdiet mi aliquam justo lobortis blandit. Suspendisse quis nisi feugiat, ultricies nisi eget, vestibulum enim. Quisque vulputate commodo ex eu laoreet.
Aenean convallis, urna at ullamcorper commodo, velit ligula ultricies massa, sed faucibus augue tortor quis ex. Nam elementum auctor diam, quis dapibus dui condimentum vel. Ut a lacus mi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas efficitur maximus nulla, in bibendum nibh tincidunt sed. Morbi viverra dignissim urna, eu accumsan lectus pharetra sit amet. Duis mi dui, hendrerit eu est quis, elementum vestibulum ipsum.


text:
var Issue = require('../issue'),
    proc = require('../process_option');

module.exports = {
    name: 'attr-bans',
    on: ['tag'],
    options: [{
        name: 'attr-bans',
        desc: [
            'The value of this option is a list of strings, each of which is an',
            'attribute name.',
            'Attributes with any of the given names are disallowed.'
            ].join('\n'),
        process: proc.arrayOfStr
    }]
};

module.exports.lint = function (element, opts) {
    var bannedAttrs = opts[this.name];

    var issues = [];

    var attrs = element.attribs;
    bannedAttrs.forEach(function (name) {
        if (attrs.hasOwnProperty(name)) {
            issues.push(new Issue('E062',
                attrs[name].nameLineCol, { attribute: name, lang: opts['template-lang'] }));
        }
    });

    return issues;
};


text:
module Artery
  module NoBrainer
    class Message
      include MessageModel
      include ::NoBrainer::Document

      table_config name: 'artery_messages'

      field :created_at_f, type: Float

      field :version, type: String
      field :model,   type: String, required: true
      field :action,  type: String, required: true
      field :data,    type: Hash,   required: true
      field :_index,  type: Integer, index: true

      alias :index :_index

      after_save :send_to_artery

      around_create :lock_on_model
      before_create :assign_index

      class << self
        def after_index(model, index)
          where(model: model, :_index.gt => index).order(:_index)
        end

        def latest_index(model)
          where(model: model).max(:_index)&.index.to_i
        end

        def delete_old
          where(:created_at_f.lt => MAX_MESSAGE_AGE.ago.to_f).delete_all
        end
      end

      def _create(options = {})
        now = Time.zone.now
        self.created_at_f = now.to_f.round(6) unless created_at_f_changed?
        super
      end

      def previous_index
        return 0 unless index

        self.class.where(model: model, :_index.lt => index).max(:_index)&.index
      end

      def to_artery
        data.merge('_index' => index)
      end

      protected

      def lock_on_model
        ::NoBrainer::Lock.new("#{self.class.table_name}:#{model}").synchronize do
          yield
        end
      end

      def assign_index
        self._index = self.class.latest_index(model).next
      end
    end
  end
end


text:
var openText = function(){

  var file = this.files[0];

  var reader = new FileReader();
  reader.onload = function(progressEvent){
    // Entire file
    console.log(this.result);
    document.getElementById("textention").innerHTML = this.result;
    // By lines
    var lines = this.result.split('\n');
    for(var line = 0; line < lines.length; line++){
      console.log(lines[line]);
    }
  };
  reader.readAsText(file);
};
document.getElementById('file').onchange = openText;
// document.getElementById('openfile').onclick = alert('click');

$(function () {
  $('#openfile').click(open);
})

function open(){
  openText();
  alert('open')
}


text:
⚠ This repo is Continuously Deployed: make sure you [follow the guidance](https://docs.publishing.service.gov.uk/manual/development-pipeline.html#merge-your-own-pull-request) ⚠

## What

## Why

[Trello card?](url)

## How

## Screenshots?


text:
package de.jcup.egradle.eclipse;

import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.presentation.PresentationReconciler;
import org.eclipse.jface.text.quickassist.IQuickAssistAssistant;
import org.eclipse.jface.text.reconciler.IReconciler;
import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.text.source.IAnnotationHover;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.ui.editors.text.EditorsUI;
import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
import org.eclipse.ui.texteditor.ChainedPreferenceStore;

import de.jcup.egradle.eclipse.document.GroovyDefaultTextScanner;
import de.jcup.egradle.eclipse.document.GroovyEditorAnnotationHoover;
import de.jcup.egradle.eclipse.preferences.IEditorPreferences;
import de.jcup.egradle.eclipse.ui.ExtendedSourceViewerConfiguration;
import de.jcup.egradle.eclipse.util.ColorManager;
import de.jcup.egradle.eclipse.util.PreferenceIdentifiable;

public abstract class AbstractGroovySourceViewerConfiguration extends TextSourceViewerConfiguration implements ExtendedSourceViewerConfiguration {

    protected GroovyDefaultTextScanner gradleScanner;
    protected ColorManager colorManager;
    protected TextAttribute defaultTextAttribute;
    protected IAnnotationHover annotationHoover;
    protected IAdaptable adaptable;
    protected ContentAssistant contentAssistant;
    private String[] contentTypes;

    public AbstractGroovySourceViewerConfiguration(IAdaptable adaptable, PreferenceIdentifiable colorNormalText) {
        IPreferenceStore generalTextStore = EditorsUI.getPreferenceStore();

        this.fPreferenceStore = new ChainedPreferenceStore(new IPreferenceStore[] { getPreferences().getPreferenceStore(), generalTextStore });

        this.adaptable = adaptable;
        this.colorManager = adaptable.getAdapter(ColorManager.class);
        Assert.isNotNull(colorManager, " adaptable must support color manager");

        this.annotationHoover = new GroovyEditorAnnotationHoover();

        this.defaultTextAttribute = new TextAttribute(colorManager.getColor(getPreferences().getColor(colorNormalText)));

    }

    /**
     * Returns preferences laber with its preference store. The returned store is
     * containing only preferences for this editor - but has no relation to standard
     * text editor setup.
     *
     * @return
     */
    protected abstract IEditorPreferences getPreferences();

    @Override
    public final String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
        if (contentTypes != null) {
            return contentTypes;
        }
        contentTypes = createDefaultConfiguredContentTypes();
        return contentTypes;
    }

    protected abstract String[] createDefaultConfiguredContentTypes();

    @Override
    public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
        return annotationHoover;
    }

    @Override
    public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
        /*
         * currently we avoid the default quick assitence parts (spell checking etc.)
         */
        return null;
    }

    public IReconciler getReconciler(ISourceViewer sourceViewer) {
        /*
         * currently we avoid the default reconciler mechanism parts (spell checking
         * etc.)
         */
        return null;
    }

    protected void addDefaultPresentation(PresentationReconciler reconciler) {
        DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getGroovyDefaultTextScanner());
        reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
        reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    }

    protected IToken createColorToken(RGB rgb) {
        Token token = new Token(new TextAttribute(colorManager.getColor(rgb)));
        return token;
    }

    protected void addPresentation(PresentationReconciler reconciler, String id, RGB rgb, int style) {
        TextAttribute textAttribute = new TextAttribute(colorManager.getColor(rgb), defaultTextAttribute.getBackground(), style);
        PresentationSupport presentation = new PresentationSupport(textAttribute);
        reconciler.setDamager(presentation, id);
        reconciler.setRepairer(presentation, id);
    }

    protected GroovyDefaultTextScanner getGroovyDefaultTextScanner() {
        if (gradleScanner == null) {
            gradleScanner = new GroovyDefaultTextScanner(colorManager);
            updateTextScannerDefaultColorToken();
        }
        return gradleScanner;
    }

}


text:
SCM_URL=https://github.com/openssl/openssl
SCM_TAG=master

COMPILER=4.9

source $(dirname "${BASH_SOURCE[0]}")/android-build-common.sh

function build {
	if [ $# -ne 5 ];
	then
		echo "Invalid arguments $@"
		exit 1
	fi

	CONFIG=$1
	ARCH_PREFIX=$2
	DST_PREFIX=$3
	TOOLCHAIN_PREFIX=$4
	PLATFORM_PREFIX=$5

	TMP_DIR=$ANDROID_NDK/toolchains/$TOOLCHAIN_PREFIX$COMPILER/prebuilt/
	HOST_PLATFORM=$(ls $TMP_DIR)
	if [ ! -d $TMP_DIR$HOST_POLATFORM ];
	then
		echo "could not determine NDK host platform in $ANDROID_NDK/toolchains/$TOOLCHAIN_PREFIX$COMPILER/prebuilt/"
		exit 1
	fi

	common_run export CROSS_SYSROOT=$ANDROID_NDK/platforms/android-$NDK_TARGET/$PLATFORM_PREFIX
	common_run export ANDROID_DEV=$ANDROID_NDK/platforms/android-$NDK_TARGET/$PLATFORM_PREFIX/usr
	common_run export CROSS_COMPILE=$ARCH_PREFIX
	common_run export PATH=$ANDROID_NDK/toolchains/$TOOLCHAIN_PREFIX$COMPILER/prebuilt/$HOST_PLATFORM/bin/:$ORG_PATH

	echo "CONFIG=$CONFIG"
	echo "ARCH_PREFIX=$ARCH_PREFIX"
	echo "DST_PREFIX=$DST_PREFIX"
	echo "TOOLCHAIN_PREFIX=$TOOLCHAIN_PREFIX"
	echo "PLATFORM_PREFIX=$PLATFORM_PREFIX"
	echo "CROSS_SYSROOT=$CROSS_SYSROOT"
	echo "CROSS_COMPILE=$CROSS_COMPILE"
	echo "PATH=$PATH"

	BASE=$(pwd)
	DST_DIR=$BUILD_DST/$DST_PREFIX
	common_run cd $BUILD_SRC
	common_run git clean -xdf
	common_run ./Configure --openssldir=$DST_DIR $CONFIG shared
	common_run make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" depend
	common_run make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" build_libs

	if [ ! -d $DST_DIR ];
	then
		common_run mkdir -p $DST_DIR
	fi

	common_run cp -L libssl.so $DST_DIR
	common_run cp -L libcrypto.so $DST_DIR
	common_run cd $BASE
}

# Run the main program.
common_parse_arguments $@
common_check_requirements
common_update $SCM_URL $SCM_TAG $BUILD_SRC
common_clean $BUILD_DST

ORG_PATH=$PATH
for ARCH in $BUILD_ARCH
do

	case $ARCH in
	"armeabi")
		 build "android" "arm-linux-androideabi-" \
			$ARCH "arm-linux-androideabi-" "arch-arm"
		 ;;
	 "armeabi-v7a")
		 build "android-armv7" "arm-linux-androideabi-" \
			$ARCH "arm-linux-androideabi-" "arch-arm"
		 ;;
	 "mips")
		 build "android-mips" "mipsel-linux-android-" \
			$ARCH "mipsel-linux-android-" "arch-mips"
		 ;;
	 "mips64")
		echo "[WARNING] Skipping unsupported architecture $ARCH"
		continue
		 build "android-mips" "mipsel-linux-android-" \
			$ARCH "mipsel-linux-android-" "arch-mips"
		 ;;
	 "x86")
		 build "android-x86" "i686-linux-android-" \
			$ARCH "x86-" "arch-x86"
		 ;;
	 "arm64-v8a")
		 build "android64-aarch64" "aarch64-linux-android-" \
			$ARCH "aarch64-linux-android-" "arch-arm64"
		 ;;
	 "x86_64")
		 build "android64" "x86_64-linux-android-" \
			$ARCH "x86_64-" "arch-x86_64"
		 ;;
	*)
		echo "[WARNING] Skipping unsupported architecture $ARCH"
		continue
		;;
	esac
done

if [ ! -d $BUILD_DST/include ];
then
	common_run mkdir -p $BUILD_DST/include
fi
common_run cp -L -r $BUILD_SRC/include/openssl $BUILD_DST/include/


text:
\section{Préparation de foie gras}

Pour préparer du foie gras, on doit préalablement saupoudrer le foie frais d'un mélange de sel et de poivre. Ce mélange doit être élaboré selon les proportions suivantes : une dose de poivre pour trois doses de sel.

\begin{questions}
	\question Quel est le coefficient de proportionnalité ?

	\question Compléter le tableau suivant en détaillant les calculs.

	\begin{center}
		\includegraphics*[scale=0.6]{tab2}
	\end{center}
\end{questions}


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('human_feedback_api', '0008_feedback_note'),
    ]

    operations = [
        migrations.AddField(
            model_name='feedback',
            name='experiment_name',
            field=models.TextField(blank=True, null=True, verbose_name=b'name of experiment'),
        ),
    ]


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>MNE-Python Development — MNE 0.24.1 documentation</title>

  <link href="../_static/css/theme.css" rel="stylesheet">
  <link href="../_static/css/index.ff1ffe594081f20da1ef19478df9384b.css" rel="stylesheet">

  <link rel="stylesheet"
    href="../_static/vendor/fontawesome/5.13.0/css/all.min.css">
  <link rel="preload" as="font" type="font/woff2" crossorigin
    href="../_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2">
  <link rel="preload" as="font" type="font/woff2" crossorigin
    href="../_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2">

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/css/blank.css" />
    <link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../_static/bootstrap_divs.css" />
    <link rel="stylesheet" type="text/css" href="../_static/copybutton.css" />
    <link rel="stylesheet" type="text/css" href="../_static/sg_gallery.css" />
    <link rel="stylesheet" type="text/css" href="../_static/sg_gallery-binder.css" />
    <link rel="stylesheet" type="text/css" href="../_static/sg_gallery-dataframe.css" />
    <link rel="stylesheet" type="text/css" href="../_static/sg_gallery-rendered-html.css" />
    <link rel="stylesheet" type="text/css" href="../_static/style.css" />

  <link rel="preload" as="script" href="../_static/js/index.be7d3bbb2ef33a8344ce.js">

    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Contributing guide" href="../install/contributing.html" />
    <link rel="prev" title="Frequently Asked Questions (FAQ)" href="faq.html" />
    <link rel="canonical" href="https://mne.tools/stable/index.html" />

    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="docsearch:language" content="None">

  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-collapsible" aria-controls="navbar-collapsible" aria-expanded="false" aria-label="Toggle navigation">

  </button>

  Install

  Documentation

  API Reference

  Get help

  Development

    <button type="button" class="btn btn-primary btn-sm navbar-btn dropdown-toggle" id="dLabelMore" data-toggle="dropdown">
        v0.24.1

    </button>

        v1.0 (devel)
        v0.24 (stable)
        v0.23
        v0.22
        v0.21
        v0.20
        v0.19
        v0.18
        v0.17
        v0.16
        v0.15
        v0.14
        v0.13
        v0.12
        v0.11

            GitHub

            Twitter

            Discourse

            Discord

<form class="bd-search d-flex align-items-center" action="../search.html" method="get">

  <input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" >
</form>

   Contributing guide

   What's new

   Roadmap

   Project Governance

MNE-Python Development¶

MNE-Python is maintained by a community of scientists and research labs. The
project accepts contributions in the form of bug reports, fixes, feature
additions, and documentation improvements (including typo corrections). The
best way to start contributing is by opening an issue on our GitHub page to
discuss ideas for changes or enhancements, or to tell us about behavior that
you think might be a bug. For general troubleshooting or usage questions,
please consider posting your questions on our MNE Forum.

Users and contributors to MNE-Python are expected to follow our
code of conduct.

The contributing guide has details on the preferred contribution workflow
and the recommended system configuration for a smooth contribution/development
experience.

previous

Frequently Asked Questions (FAQ)

next

Contributing guide

© Copyright 2012–2021, MNE Developers. Last updated <time datetime="2021-12-03T05:52:28.966460+00:00" class="localized">2021-12-03 05:52 UTC</time>